(()=>{var e={322:()=>{Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,o=new Array(n);n--;)o[n]=[t[n],e[t[n]]];return o})},1669:e=>{"use strict";e.exports=jQuery},3797:()=>{Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){let t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null})},3869:()=>{String.prototype.includes||(String.prototype.includes=function(e,t){"use strict";return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)})},4600:()=>{[Element.prototype,CharacterData.prototype,DocumentType.prototype].forEach((function(e){e.hasOwnProperty("remove")||Object.defineProperty(e,"remove",{configurable:!0,enumerable:!0,writable:!0,value:function(){this.parentNode.removeChild(this)}})}))},7550:()=>{wp.domReady((()=>{document.querySelector(".edds-requirements-not-met")&&(document.querySelector(".edd-settings-wrap .submit").style.display="none")})),wp.domReady((()=>{const e=document.getElementById("edds-payment-gateways-stripe-unmet-requirements");if(!e)return;const t=document.querySelector('label[for="edd_settings[gateways][stripe]"]');t.parentNode.insertBefore(e,t.nextSibling);const n=document.getElementById("edd_settings[gateways][stripe]");n.disabled=!0,n.checked=!1,e.insertBefore(n,e.querySelector("p")),e.insertBefore(t,e.querySelector("p"))}))}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}(()=>{"use strict";n(7550),n(3869),n(3797),n(322),n(4600);var e=n(1669);function t(e,n,o){null===o||"object"!=typeof o||o instanceof File||o instanceof Blob?e.append(n,null==o?"":o):Object.keys(o).forEach((function(r){t(e,n+"["+r+"]",o[r])}))}function o(n,o){const r={type:"POST",dataType:"json",xhrFields:{withCredentials:!0},url:window.edd_scripts&&window.edd_scripts.ajaxurl||window.ajaxurl};if(o&&o.form_data instanceof FormData){const e=o.form_data;e.delete("edd_action"),e.append("action",n),Object.keys(o).forEach((function(n){"form_data"!==n&&t(e,n,o[n])})),r.data=e,r.processData=!1,r.contentType=!1}else r.data={action:n,...o};const s=e.Deferred((function(t){t.jqXHR=e.ajax(r).done((function(e){"1"!==e&&1!==e||(e={success:!0}),"object"==typeof e&&void 0!==typeof e.success?t[e.success?"resolveWith":"rejectWith"](this,[e.data]):t.rejectWith(this,[e])})).fail((function(){t.rejectWith(this,arguments)}))})),i=s.promise();return i.abort=function(){return s.jqXHR.abort(),this},i}n(1669),wp.domReady((()=>{const e=document.getElementById("edds-stripe-connect-account"),t=document.getElementById("edds-stripe-disconnect-reconnect");if(e&&!e.hasAttribute("data-onboarding-wizard"))return o("edds_stripe_connect_account_info",{...e.dataset}).done((n=>{e.classList.remove("loading"),e.innerHTML=n.message,e.classList.add(`notice-${n.status}`),t.classList.remove("loading"),n.actions&&(t.innerHTML=n.actions);const o=document.getElementById("edd_settings[stripe_statement_descriptor]"),r=document.getElementById("edd_settings[stripe_statement_descriptor_prefix]");if(o.classList.remove("edd-text-loading"),r.classList.remove("edd-text-loading"),n.account){const e=n.account.settings.payments.statement_descriptor||"",t=n.account.settings.card_payments.statement_descriptor_prefix||"";o.value=e||"",r.value=t||""}})).fail((t=>{e.innerHTML=t.message,e.classList.add("notice-error")}))}))})()})();