芝麻web文件管理V1.00
编辑当前文件:/home/royashxg/public_html/wp-content/plugins/blocksy-companion/static/bundle/account.js
!function(){"use strict";var e={n:function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,{a:r}),r},d:function(t,r){for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.ctEvents,r=e.n(t),o=window.ctFrontend;function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r
')).val(t),r.parent().append(o)),"function"==typeof e&&e(!0)}))}));else{var o=jQuery("#wfls-captcha-token");o.length?o.val("grecaptcha-missing"):r.length&&((o=jQuery('
')).val("grecaptcha-missing"),r.parent().append(o)),"function"==typeof e&&e(!0)}},s=function(e){a(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.classList.contains("anr_captcha_field")?grecaptcha.reset(parseFloat(e.firstElementChild.id.replace("anr_captcha_field_",""))-1):grecaptcha.reset(e.gID)}))},l=function(e){return new Promise((function(t){(function(e,t){return!(!window.WFLSVars||!parseInt(WFLSVars.useCAPTCHA)||(i((function(){return e()}),t),0))})(t,e)||t()}))},u=window.jQuery,d=e.n(u),f=function(e){var t=function(){var t=e.closest("form");!function(e,t){var r=d()(e).find(".woocommerce-password-strength");""===d()(t).val()?(r.hide(),d()(document.body).trigger("wc-password-strength-hide")):0===r.length?(d()(t.nextElementSibling).after('
'),d()(document.body).trigger("wc-password-strength-added")):(r.show(),d()(document.body).trigger("wc-password-strength-show"))}(t,e);var r=function(e,t){var r=d()(e).find(".woocommerce-password-strength"),o=d()(e).find(".woocommerce-password-hint"),n='
'+wc_password_strength_meter_params.i18n_password_hint+"
",a=wp.passwordStrength.meter(d()(t).val(),wp.passwordStrength.userInputDisallowedList()),c="";if(r.removeClass("short bad good strong"),o.remove(),r.is(":hidden"))return a;switch(a
0&&r
'),c=d()('
'),i=d()('
');i.text("Wordfence 2FA Code "),i.append(d()('
')),i=d()("
").append(i);var l=d()('
'),u=d()('
');u.find("label").append("Remember for 30 days");var f=d()('
');f.find("input[type=submit]").val("Log In"),c.append(i),c.append(l),parseInt(WFLSVars.allowremember)&&c.append(u),c.append(f),a.append(c),d()(n).css("position","relative").append(a),d()("#wfls-token").focus(),new(d().Zebra_Tooltips)(d()(".wfls-tooltip-trigger"))}}else{var m=new FormData(t);m.append("redirect_to",location.href),fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_login"),{method:t.method,body:m}).then((function(e){return e.json()})).then((function(e){var t=e.data,r=(t.html,t.redirect_to);location=r}))}t.loginProceed=!0}(!r||r&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&s(t.closest(".ct-login-form"))}))}));l(t).then((function(){fetch(o,{method:t.method,body:r}).then((function(e){return e.redirected&&e.url?{data:{html:"",redirect_to:e.url}}:e.json()})).then((function(e){var r=e.data,o=r.html,n=r.redirect_to,a=y(t.closest(".ct-login-form"),o),c=a.doc,i=a.hasError;i?v(t):m(t,c)||setTimeout((function(){location=n}),2e3),(!i||i&&-1===t.closest(".ct-login-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&s(t.closest(".ct-login-form"))}))}))}}))},h=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.add("ct-loading")},v=function(e){var t=e.querySelector('[name*="submit"]');t&&t.classList.remove("ct-loading")},g=function(e,t){var r=t.screen,o=void 0===r?"login":r;e.querySelector(".ct-".concat(o,"-form"))||(o="login"),e.querySelector("ul")&&e.querySelector("ul .ct-".concat(o))&&(e.querySelector("ul .active").classList.remove("active"),e.querySelector("ul .ct-".concat(o)).classList.add("active")),e.querySelector('[class*="-form"].active').classList.remove("active"),e.querySelector(".ct-".concat(o,"-form")).classList.add("active"),e.querySelector(".ct-".concat(o,"-form form"))&&e.querySelector(".ct-".concat(o,"-form form")).reset(),e.querySelector(".ct-account-modal").classList.remove("ct-error");var n=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification");n&&n.remove();var c=e.querySelector(".ct-".concat(o,"-form")).querySelector(".ct-form-notification-error");c&&c.remove(),function(e){a(e.querySelectorAll(".g-recaptcha, .anr_captcha_field")).map((function(e){e.gID||(e.innerHTML="",e.gID=grecaptcha.render(e))}))}(e)},w=function(e,t){var r=e.querySelector(".ct-form-notification-error");r&&r.remove(),e.closest(".ct-account-modal").classList.remove("ct-error"),t&&(e.insertAdjacentHTML("afterbegin",'
'.concat(t,"
")),requestAnimationFrame((function(){e.closest(".ct-account-modal").classList.add("ct-error")})))},y=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector("#login_error"),n="";return o&&(n=o.innerHTML),w(e,n),{hasError:!!o,doc:r}},b=function(e,t){var r=e.querySelector(".ct-form-notification");r&&r.remove(),e.closest(".ct-account-modal").classList.remove("ct-error"),t&&e.insertAdjacentHTML("afterbegin",'
'.concat(t,"
"))},_=function(e,t){var r=(new DOMParser).parseFromString(t,"text/html"),o=r.querySelector(".message"),n="";return o&&(n=o.innerHTML),b(e,n),{doc:r}},S="",q={login:".ct-account-modal #loginform .cf-turnstile",lostpassword:".ct-account-modal #lostpasswordform .cf-turnstile",register:".ct-account-modal #registerform .cf-turnstile"},L=function(){window.anr_onloadCallback&&window.anr_onloadCallback(),window.turnstile&&Object.keys(q).forEach((function(e){document.querySelector(q[e])&&turnstile.render(q[e])})),window.Dokan_Vendor_Registration&&window.Dokan_Vendor_Registration.init()};(0,o.registerDynamicChunk)("blocksy_account",{mount:function(e,t){var o=t.event;if(!document.body.dataset.panel){if(!S){var n=document.querySelector("#account-modal");if(!n)return void(location=document.querySelector('[data-id="account"] .ct-account-item')?document.querySelector('[data-id="account"] .ct-account-item').href:e.href);S=n.outerHTML,window.turnstile&&Object.keys(q).forEach((function(e){document.querySelector(q[e])&&(turnstile.remove(q[e]),"register"===e&&turnstile.remove(".ct-account-modal #registerform .sct-woocommerce-register"))})),n.remove()}var c=document.querySelector("#account-modal");c||(document.querySelector(".ct-drawer-canvas").insertAdjacentHTML("beforeend",S),c=document.querySelector(".ct-drawer-canvas").lastChild);!function(e){if(e&&!e.hasListeners){e.hasListeners=!0,p(e);var t=e.querySelector('[name="loginform"]'),o=e.querySelector('[name="registerform"]'),n=e.querySelector('[name="lostpasswordform"]');if(e.addEventListener("click",(function(r){r.target.href&&r.target.href.indexOf("lostpassword")>-1&&(g(e,{screen:"forgot-password"}),r.preventDefault()),r.target.href&&r.target.classList.contains("showlogin")&&(g(e,{screen:"login"}),r.preventDefault()),r.target.href&&(r.target.href.indexOf("wp-login")>-1||t&&r.target.href===t.action||r.target.href.indexOf("login")>-1||"yes"===r.target.dataset.login)&&-1===r.target.href.indexOf("lostpassword")&&(g(e,{screen:"login"}),r.preventDefault())}),!0),e.querySelectorAll(".show-password-input + .show-password-input")&&e.querySelectorAll(".show-password-input + .show-password-input").forEach((function(e){e.remove()})),a(e.querySelectorAll(".show-password-input")).map((function(e){e.addEventListener("click",(function(t){e.previousElementSibling.type="password"===e.previousElementSibling.type?"text":"password"}))})),o){o.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(h(o),l(o).then((function(){return fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_registration"),{method:o.method,body:new FormData(o)}).then((function(e){return e.text()})).then((function(e){var t=y(o.closest(".ct-register-form"),e),n=(t.doc,t.hasError);v(o),n||_(o.closest(".ct-register-form"),e),r().trigger("blocksy:account:register:".concat(n?"error":"success")),n||o.querySelector('[name="redirect_to"]')&&o.querySelector('[name="role"][value="seller"]:checked')&&(location=o.querySelector('[name="redirect_to"]').value),(!n||n&&-1===o.closest(".ct-register-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&s(o.closest(".ct-register-form"))}))})))}));var c=o.querySelector("#user_pass_register");c&&f(c)}n&&n.addEventListener("submit",(function(e){e.preventDefault(),window.ct_customizer_localizations||(h(n),fetch("".concat(ct_localizations.ajax_url,"?action=blc_implement_user_lostpassword"),{method:n.method,body:new FormData(n)}).then((function(e){return e.text()})).then((function(e){var t=y(n.closest(".ct-forgot-password-form"),e),r=(t.doc,t.hasError);v(n),r||_(n.closest(".ct-forgot-password-form"),e),(!r||r&&-1===n.closest(".ct-forgot-password-form").querySelector(".ct-form-notification-error").innerHTML.indexOf("Captcha"))&&s(n.closest(".ct-forgot-password-form"))})))})),["login","register","forgot-password"].map((function(t){Array.from(e.querySelectorAll(".ct-".concat(t))).map((function(r){r.addEventListener("click",(function(r){r.preventDefault(),g(e,{screen:t})})),r.addEventListener("keyup",(function(r){13===r.keyCode&&(r.preventDefault(),g(e,{screen:t}))}))}))}))}}(c),g(c,{screen:e.dataset.view||"login"}),L(),r().trigger("ct:overlay:handle-click",{e:o,href:"#account-modal",options:{isModal:!0,computeScrollContainer:function(){if(c.closest("body"))return c.querySelector(".ct-account-forms")}}})}}}),r().on("ct:modal:closed",(function(e){e.closest("#account-modal")&&e.remove()}))}();