Current File : /home/kelaby89/muzza.fit/wp-content/plugins/woocommerce-payments/dist/payment-gateways.js |
/*! For license information please see payment-gateways.js.LICENSE.txt */
(()=>{var e={9387:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,s=(e.icon,e.className),c=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],0<=t.indexOf(r)||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,a),u=["gridicon","gridicons-cross-circle",s,!1,!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",i({className:u,height:r,width:r,onClick:n},c,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"}),o.default.createElement("g",null,o.default.createElement("path",{d:"M19.1 4.9C15.2 1 8.8 1 4.9 4.9S1 15.2 4.9 19.1s10.2 3.9 14.1 0 4-10.3.1-14.2zm-4.3 11.3L12 13.4l-2.8 2.8-1.4-1.4 2.8-2.8-2.8-2.8 1.4-1.4 2.8 2.8 2.8-2.8 1.4 1.4-2.8 2.8 2.8 2.8-1.4 1.4z"})))};var n,o=(n=r(1609))&&n.__esModule?n:{default:n},a=["size","onClick","icon","className"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t,r=1;r<arguments.length;r++)for(var n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)}},8616:e=>{e.exports=function(e,t){var r,n,o=0;function a(){var a,i,s=r,c=arguments.length;e:for(;s;){if(s.args.length===arguments.length){for(i=0;i<c;i++)if(s.args[i]!==arguments[i]){s=s.next;continue e}return s!==r&&(s===n&&(n=s.prev),s.prev.next=s.next,s.next&&(s.next.prev=s.prev),s.next=r,s.prev=null,r.prev=s,r=s),s.val}s=s.next}for(a=new Array(c),i=0;i<c;i++)a[i]=arguments[i];return s={args:a,val:e.apply(null,a)},r?(r.prev=s,s.next=r):n=s,o===t.maxSize?(n=n.prev).next=null:o++,r=s,s.val}return t=t||{},a.clear=function(){r=null,n=null,o=0},a}},5228:e=>{"use strict";var t=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(e){n[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var a,i,s=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),c=1;c<arguments.length;c++){for(var u in a=Object(arguments[c]))r.call(a,u)&&(s[u]=a[u]);if(t){i=t(a);for(var l=0;l<i.length;l++)n.call(a,i[l])&&(s[i[l]]=a[i[l]])}}return s}},5606:e=>{var t,r,n=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(e){t=o}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var s,c=[],u=!1,l=-1;function d(){u&&s&&(u=!1,s.length?c=s.concat(c):l=-1,c.length&&p())}function p(){if(!u){var e=i(d);u=!0;for(var t=c.length;t;){for(s=c,c=[];++l<t;)s&&s[l].run();l=-1,t=c.length}s=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function y(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];c.push(new m(e,t)),1!==c.length||u||i(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=y,n.addListener=y,n.once=y,n.off=y,n.removeListener=y,n.removeAllListeners=y,n.emit=y,n.prependListener=y,n.prependOnceListener=y,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},1020:(e,t,r)=>{"use strict";r(5228);var n=r(1609),o=60103;if(t.Fragment=60107,"function"==typeof Symbol&&Symbol.for){var a=Symbol.for;o=a("react.element"),t.Fragment=a("react.fragment")}var i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var n,a={},u=null,l=null;for(n in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(l=t.ref),t)s.call(t,n)&&!c.hasOwnProperty(n)&&(a[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===a[n]&&(a[n]=t[n]);return{$$typeof:o,type:e,key:u,ref:l,props:a,_owner:i.current}}t.jsx=u,t.jsxs=u},4848:(e,t,r)=>{"use strict";e.exports=r(1020)},1609:e=>{"use strict";e.exports=window.React},6942:(e,t)=>{var r;!function(){"use strict";var n={}.hasOwnProperty;function o(){for(var e="",t=0;t<arguments.length;t++){var r=arguments[t];r&&(e=i(e,a(r)))}return e}function a(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return o.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var r in e)n.call(e,r)&&e[r]&&(t=i(t,r));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.g.importScripts&&(e=r.g.location+"");var t=r.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!e||!/^http(s?):/.test(e));)e=n[o--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),r.p=e})(),r.p=window.wcpayAssets.url,(()=>{"use strict";var e={};r.r(e),r.d(e,{getAllDepositsOverviews:()=>Xr,getAllDepositsOverviewsError:()=>Jr,getDeposit:()=>Kr,getDepositQueryError:()=>nn,getDeposits:()=>tn,getDepositsCount:()=>rn,getDepositsSummary:()=>an,getDepositsSummaryError:()=>sn,getInstantDeposit:()=>cn});var t={};r.r(t),r.d(t,{submitInstantDeposit:()=>Dn,updateAllDepositsOverviews:()=>bn,updateDeposit:()=>wn,updateDeposits:()=>Rn,updateDepositsCount:()=>On,updateDepositsSummary:()=>In,updateErrorForAllDepositsOverviews:()=>Tn,updateErrorForDepositQuery:()=>An,updateErrorForDepositsSummary:()=>Cn,updateInstantDeposit:()=>Nn});var n={};r.r(n),r.d(n,{getAllDepositsOverviews:()=>Fn,getDeposit:()=>Pn,getDeposits:()=>Un,getDepositsSummary:()=>Ln,getPayoutsCSVRequestURL:()=>kn,payoutsDownloadEndpoint:()=>xn});var o={};r.r(o),r.d(o,{getFraudOutcomeTransactions:()=>Qn,getFraudOutcomeTransactionsError:()=>Zn,getFraudOutcomeTransactionsSummary:()=>Xn,getFraudOutcomeTransactionsSummaryError:()=>Jn,getTransactions:()=>Yn,getTransactionsError:()=>Bn,getTransactionsSummary:()=>Hn,getTransactionsSummaryError:()=>Vn});var a={};r.r(a),r.d(a,{updateErrorForFraudOutcomeTransactions:()=>ao,updateErrorForFraudOutcomeTransactionsSummary:()=>so,updateErrorForTransactions:()=>to,updateErrorForTransactionsSummary:()=>no,updateFraudOutcomeTransactions:()=>oo,updateFraudOutcomeTransactionsSummary:()=>io,updateTransactions:()=>eo,updateTransactionsSummary:()=>ro});var i={};r.r(i),r.d(i,{formatQueryFilters:()=>co,getFraudOutcomeTransactions:()=>yo,getFraudOutcomeTransactionsExport:()=>ho,getFraudOutcomeTransactionsSummary:()=>_o,getTransactions:()=>uo,getTransactionsCSVRequestURL:()=>po,getTransactionsSummary:()=>mo,transactionsDownloadEndpoint:()=>lo});var s={};r.r(s),r.d(s,{getCharge:()=>go,getChargeError:()=>So,getChargeFromOrder:()=>Eo,getChargeFromOrderError:()=>vo});var c={};r.r(c),r.d(c,{updateCharge:()=>wo,updateErrorForCharge:()=>bo});var u={};r.r(u),r.d(u,{getCharge:()=>To,getChargeFromOrder:()=>Ro});var l={};r.r(l),r.d(l,{getTimeline:()=>Ao,getTimelineError:()=>Io});var d={};r.r(d),r.d(d,{updateErrorForTimeline:()=>No,updateTimeline:()=>Co});var p={};r.r(p),r.d(p,{getTimeline:()=>Do});var m={};r.r(m),r.d(m,{getCachedDispute:()=>Uo,getDispute:()=>xo,getDisputeError:()=>ko,getDisputes:()=>Lo,getDisputesSummary:()=>jo});var y={};r.r(y),r.d(y,{refundCharge:()=>Bo,updateErrorForPaymentIntent:()=>Yo,updatePaymentIntent:()=>qo});var _={};r.r(_),r.d(_,{getPaymentIntent:()=>Wo});var h={};r.r(h),r.d(h,{acceptDispute:()=>Zo,updateDispute:()=>Ho,updateDisputes:()=>Go,updateDisputesSummary:()=>Qo,updateErrorForDispute:()=>Vo});var f={};r.r(f),r.d(f,{disputesDownloadEndpoint:()=>na,getDispute:()=>aa,getDisputes:()=>ia,getDisputesCSVRequestURL:()=>oa,getDisputesSummary:()=>sa});var g={};r.r(g),r.d(g,{getAccountBusinessSupportEmail:()=>Ta,getAccountBusinessSupportPhone:()=>Ra,getAccountDomesticCurrency:()=>Oa,getAccountStatementDescriptor:()=>va,getAccountStatementDescriptorKana:()=>ba,getAccountStatementDescriptorKanji:()=>wa,getAdvancedFraudProtectionSettings:()=>oi,getAvailablePaymentMethodIds:()=>fa,getCompletedWaitingPeriod:()=>Da,getCurrentProtectionLevel:()=>ni,getDepositDelayDays:()=>Na,getDepositRestrictions:()=>Fa,getDepositScheduleInterval:()=>Aa,getDepositScheduleMonthlyAnchor:()=>Ca,getDepositScheduleWeeklyAnchor:()=>Ia,getDepositStatus:()=>Pa,getDuplicatedPaymentMethodIds:()=>ya,getEnabledPaymentMethodIds:()=>ha,getIsCardPresentEligible:()=>Ga,getIsDebugLogEnabled:()=>ja,getIsDevModeEnabled:()=>Ua,getIsManualCaptureEnabled:()=>Ma,getIsMultiCurrencyEnabled:()=>za,getIsPaymentRequestEnabled:()=>La,getIsSavedCardsEnabled:()=>Ha,getIsStripeBillingEnabled:()=>ii,getIsStripeBillingMigrationInProgress:()=>si,getIsSubscriptionsPluginActive:()=>Ka,getIsTestModeEnabled:()=>xa,getIsTestModeOnboarding:()=>ka,getIsWCPayEnabled:()=>_a,getIsWCPaySubscriptionsEligible:()=>Za,getIsWCPaySubscriptionsEnabled:()=>Qa,getIsWooPayEnabled:()=>Xa,getIsWooPayGlobalThemeSupportEnabled:()=>Ja,getPaymentMethodStatuses:()=>ga,getPaymentRequestButtonBorderRadius:()=>Wa,getPaymentRequestButtonSize:()=>Ya,getPaymentRequestButtonTheme:()=>Ba,getPaymentRequestButtonType:()=>qa,getPaymentRequestLocations:()=>$a,getSavingError:()=>Va,getSettings:()=>ma,getShowWooPayIncompatibilityNotice:()=>ai,getStripeBillingMigratedCount:()=>ui,getStripeBillingSubscriptionCount:()=>ci,getWooPayCustomMessage:()=>ei,getWooPayLocations:()=>ri,getWooPayStoreLogo:()=>ti,isDirty:()=>Ea,isSavingSettings:()=>Sa});var S={};r.r(S),r.d(S,{saveOption:()=>Zi,saveSettings:()=>ji,submitStripeBillingSubscriptionMigration:()=>Qi,updateAccountBusinessSupportEmail:()=>Mi,updateAccountBusinessSupportPhone:()=>xi,updateAccountStatementDescriptor:()=>Di,updateAccountStatementDescriptorKana:()=>Fi,updateAccountStatementDescriptorKanji:()=>Pi,updateAdvancedFraudProtectionSettings:()=>Vi,updateDepositScheduleInterval:()=>ki,updateDepositScheduleMonthlyAnchor:()=>Li,updateDepositScheduleWeeklyAnchor:()=>Ui,updateEnabledPaymentMethodIds:()=>wi,updateIsCardPresentEligible:()=>yi,updateIsDebugLogEnabled:()=>Ii,updateIsManualCaptureEnabled:()=>Oi,updateIsMultiCurrencyEnabled:()=>Ci,updateIsPaymentRequestEnabled:()=>vi,updateIsSavedCardsEnabled:()=>mi,updateIsSavingSettings:()=>bi,updateIsStripeBillingEnabled:()=>Gi,updateIsTestModeEnabled:()=>Ai,updateIsWCPayEnabled:()=>Ei,updateIsWCPaySubscriptionsEnabled:()=>Ni,updateIsWooPayEnabled:()=>$i,updateIsWooPayGlobalThemeSupportEnabled:()=>qi,updatePaymentRequestButtonBorderRadius:()=>gi,updatePaymentRequestButtonSize:()=>hi,updatePaymentRequestButtonTheme:()=>fi,updatePaymentRequestButtonType:()=>_i,updatePaymentRequestLocations:()=>zi,updateProtectionLevel:()=>Hi,updateSelectedPaymentMethod:()=>Ti,updateSettings:()=>Si,updateUnselectedPaymentMethod:()=>Ri,updateWooPayCustomMessage:()=>Yi,updateWooPayLocations:()=>Wi,updateWooPayStoreLogo:()=>Bi});var E={};r.r(E),r.d(E,{getSettings:()=>Ki});var v={};r.r(v),r.d(v,{getCardReaderStats:()=>Ji,getCardReaderStatsError:()=>es,getCardReaders:()=>ts});var w={};r.r(w),r.d(w,{updateCardReaderStats:()=>rs,updateCardReaders:()=>ns,updateErrorForCardReaderStats:()=>os,updateErrorForCardReaders:()=>as});var b={};r.r(b),r.d(b,{getCardReaderStats:()=>is,getCardReaders:()=>ss});var T={};r.r(T),r.d(T,{getActiveLoanSummary:()=>ps,getActiveLoanSummaryError:()=>ms,getLoans:()=>ys,getLoansError:()=>_s});var R={};r.r(R),r.d(R,{updateActiveLoanSummary:()=>hs,updateErrorForActiveLoanSummary:()=>fs,updateErrorForLoans:()=>Ss,updateLoans:()=>gs});var O={};r.r(O),r.d(O,{getActiveLoanSummary:()=>Es,getLoans:()=>vs});var A={};r.r(A),r.d(A,{getDocuments:()=>Os,getDocumentsError:()=>As,getDocumentsSummary:()=>Cs,getDocumentsSummaryError:()=>Ns});var I={};r.r(I),r.d(I,{updateDocuments:()=>Ds,updateDocumentsSummary:()=>Fs,updateErrorForDocuments:()=>Ps,updateErrorForDocumentsSummary:()=>Ms});var C={};r.r(C),r.d(C,{formatQueryFilters:()=>xs,getDocuments:()=>ks,getDocumentsSummary:()=>Us});var N={};r.r(N),r.d(N,{getPaymentIntent:()=>js,getPaymentIntentError:()=>zs});var D={};r.r(D),r.d(D,{getAuthorization:()=>Hs,getAuthorizations:()=>Ws,getAuthorizationsError:()=>Vs,getAuthorizationsSummary:()=>Qs,getAuthorizationsSummaryError:()=>Zs,getIsRequesting:()=>Ks});var P={};r.r(P),r.d(P,{setIsRequestingAuthorization:()=>nc,submitCancelAuthorization:()=>ac,submitCaptureAuthorization:()=>oc,updateAuthorization:()=>tc,updateAuthorizations:()=>Js,updateAuthorizationsSummary:()=>rc,updateErrorForAuthorizations:()=>ec,updateErrorForAuthorizationsSummary:()=>ic});var F={};r.r(F),r.d(F,{getAuthorization:()=>cc,getAuthorizations:()=>sc,getAuthorizationsSummary:()=>uc});var M={};r.r(M),r.d(M,{getFile:()=>mc,getFileError:()=>yc});var x={};r.r(x),r.d(x,{updateErrorForFiles:()=>hc,updateFiles:()=>_c});var k={};r.r(k),r.d(k,{getFile:()=>fc});var U=r(1609),L=r.n(U);const j=window.ReactDOM;var z=r.n(j);function $(){return $=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$.apply(null,arguments)}const q=window.wp.element;var Y=r(6942),B=r.n(Y);const W=window.lodash,H=window.wp.deprecated;var V=r.n(H);const G=window.wp.compose,Q=window.wp.dom,Z=window.wp.primitives,K=(0,q.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,q.createElement)(Z.Path,{d:"M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z"})),X=window.wp.i18n;function J(e,t,r){const{defaultView:n}=t,{frameElement:o}=n;if(!o||t===r.ownerDocument)return e;const a=o.getBoundingClientRect();return new n.DOMRect(e.left+a.left,e.top+a.top,e.width,e.height)}let ee=0;function te(e){const t=document.scrollingElement||document.body;e&&(ee=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=ee)}let re=0;function ne(){return(0,q.useEffect)((()=>(0===re&&te(!0),++re,()=>{1===re&&te(!1),--re})),[]),null}window.wp.warning;var oe=r(5606);const ae=(0,q.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==oe&&oe.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function ie(e){const t=(0,q.useContext)(ae),r=t.slots[e]||{},n=t.fills[e],o=(0,q.useMemo)((()=>n||[]),[n]);return{...r,updateSlot:(0,q.useCallback)((r=>{t.updateSlot(e,r)}),[e,t.updateSlot]),unregisterSlot:(0,q.useCallback)((r=>{t.unregisterSlot(e,r)}),[e,t.unregisterSlot]),fills:o,registerFill:(0,q.useCallback)((r=>{t.registerFill(e,r)}),[e,t.registerFill]),unregisterFill:(0,q.useCallback)((r=>{t.unregisterFill(e,r)}),[e,t.unregisterFill])}}const se=(0,q.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function ce(e){let{name:t,children:r,registerFill:n,unregisterFill:o}=e;const a=(e=>{const{getSlot:t,subscribe:r}=(0,q.useContext)(se),[n,o]=(0,q.useState)(t(e));return(0,q.useEffect)((()=>(o(t(e)),r((()=>{o(t(e))})))),[e]),n})(t),i=(0,q.useRef)({name:t,children:r});return(0,q.useLayoutEffect)((()=>(n(t,i.current),()=>o(t,i.current))),[]),(0,q.useLayoutEffect)((()=>{i.current.children=r,a&&a.forceUpdate()}),[r]),(0,q.useLayoutEffect)((()=>{t!==i.current.name&&(o(i.current.name,i.current),i.current.name=t,n(t,i.current))}),[t]),a&&a.node?((0,W.isFunction)(r)&&(r=r(a.props.fillProps)),(0,q.createPortal)(r,a.node)):null}const ue=e=>(0,q.createElement)(se.Consumer,null,(t=>{let{registerFill:r,unregisterFill:n}=t;return(0,q.createElement)(ce,$({},e,{registerFill:r,unregisterFill:n}))}));class le extends q.Component{constructor(){super(...arguments),this.isUnmounted=!1,this.bindNode=this.bindNode.bind(this)}componentDidMount(){const{registerSlot:e}=this.props;e(this.props.name,this)}componentWillUnmount(){const{unregisterSlot:e}=this.props;this.isUnmounted=!0,e(this.props.name,this)}componentDidUpdate(e){const{name:t,unregisterSlot:r,registerSlot:n}=this.props;e.name!==t&&(r(e.name),n(t,this))}bindNode(e){this.node=e}forceUpdate(){this.isUnmounted||super.forceUpdate()}render(){const{children:e,name:t,fillProps:r={},getFills:n}=this.props,o=(0,W.map)(n(t,this),(e=>{const t=(0,W.isFunction)(e.children)?e.children(r):e.children;return q.Children.map(t,((e,t)=>{if(!e||(0,W.isString)(e))return e;const r=e.key||t;return(0,q.cloneElement)(e,{key:r})}))})).filter((0,W.negate)(q.isEmptyElement));return(0,q.createElement)(q.Fragment,null,(0,W.isFunction)(e)?e(o):o)}}const de=e=>(0,q.createElement)(se.Consumer,null,(t=>{let{registerSlot:r,unregisterSlot:n,getFills:o}=t;return(0,q.createElement)(le,$({},e,{registerSlot:r,unregisterSlot:n,getFills:o}))}));var pe=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{r.insertRule(e,r.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0},e}(),me=Math.abs,ye=String.fromCharCode,_e=Object.assign;function he(e){return e.trim()}function fe(e,t,r){return e.replace(t,r)}function ge(e,t){return e.indexOf(t)}function Se(e,t){return 0|e.charCodeAt(t)}function Ee(e,t,r){return e.slice(t,r)}function ve(e){return e.length}function we(e){return e.length}function be(e,t){return t.push(e),e}var Te=1,Re=1,Oe=0,Ae=0,Ie=0,Ce="";function Ne(e,t,r,n,o,a,i){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:Te,column:Re,length:i,return:""}}function De(e,t){return _e(Ne("",null,null,"",null,null,0),e,{length:-e.length},t)}function Pe(){return Ie=Ae>0?Se(Ce,--Ae):0,Re--,10===Ie&&(Re=1,Te--),Ie}function Fe(){return Ie=Ae<Oe?Se(Ce,Ae++):0,Re++,10===Ie&&(Re=1,Te++),Ie}function Me(){return Se(Ce,Ae)}function xe(){return Ae}function ke(e,t){return Ee(Ce,e,t)}function Ue(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Le(e){return Te=Re=1,Oe=ve(Ce=e),Ae=0,[]}function je(e){return Ce="",e}function ze(e){return he(ke(Ae-1,Ye(91===e?e+2:40===e?e+1:e)))}function $e(e){for(;(Ie=Me())&&Ie<33;)Fe();return Ue(e)>2||Ue(Ie)>3?"":" "}function qe(e,t){for(;--t&&Fe()&&!(Ie<48||Ie>102||Ie>57&&Ie<65||Ie>70&&Ie<97););return ke(e,xe()+(t<6&&32==Me()&&32==Fe()))}function Ye(e){for(;Fe();)switch(Ie){case e:return Ae;case 34:case 39:34!==e&&39!==e&&Ye(Ie);break;case 40:41===e&&Ye(e);break;case 92:Fe()}return Ae}function Be(e,t){for(;Fe()&&e+Ie!==57&&(e+Ie!==84||47!==Me()););return"/*"+ke(t,Ae-1)+"*"+ye(47===e?e:Fe())}function We(e){for(;!Ue(Me());)Fe();return ke(e,Ae)}var He="-ms-",Ve="-moz-",Ge="-webkit-",Qe="comm",Ze="rule",Ke="decl",Xe="@keyframes";function Je(e,t){for(var r="",n=we(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function et(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Ke:return e.return=e.return||e.value;case Qe:return"";case Xe:return e.return=e.value+"{"+Je(e.children,n)+"}";case Ze:e.value=e.props.join(",")}return ve(r=Je(e.children,n))?e.return=e.value+"{"+r+"}":""}function tt(e){return je(rt("",null,null,null,[""],e=Le(e),0,[0],e))}function rt(e,t,r,n,o,a,i,s,c){for(var u=0,l=0,d=i,p=0,m=0,y=0,_=1,h=1,f=1,g=0,S="",E=o,v=a,w=n,b=S;h;)switch(y=g,g=Fe()){case 40:if(108!=y&&58==Se(b,d-1)){-1!=ge(b+=fe(ze(g),"&","&\f"),"&\f")&&(f=-1);break}case 34:case 39:case 91:b+=ze(g);break;case 9:case 10:case 13:case 32:b+=$e(y);break;case 92:b+=qe(xe()-1,7);continue;case 47:switch(Me()){case 42:case 47:be(ot(Be(Fe(),xe()),t,r),c);break;default:b+="/"}break;case 123*_:s[u++]=ve(b)*f;case 125*_:case 59:case 0:switch(g){case 0:case 125:h=0;case 59+l:-1==f&&(b=fe(b,/\f/g,"")),m>0&&ve(b)-d&&be(m>32?at(b+";",n,r,d-1):at(fe(b," ","")+";",n,r,d-2),c);break;case 59:b+=";";default:if(be(w=nt(b,t,r,u,l,o,s,S,E=[],v=[],d),a),123===g)if(0===l)rt(b,t,w,w,E,a,d,s,v);else switch(99===p&&110===Se(b,3)?100:p){case 100:case 108:case 109:case 115:rt(e,w,w,n&&be(nt(e,w,w,0,0,o,s,S,o,E=[],d),v),o,v,d,s,n?E:v);break;default:rt(b,w,w,w,[""],v,0,s,v)}}u=l=m=0,_=f=1,S=b="",d=i;break;case 58:d=1+ve(b),m=y;default:if(_<1)if(123==g)--_;else if(125==g&&0==_++&&125==Pe())continue;switch(b+=ye(g),g*_){case 38:f=l>0?1:(b+="\f",-1);break;case 44:s[u++]=(ve(b)-1)*f,f=1;break;case 64:45===Me()&&(b+=ze(Fe())),p=Me(),l=d=ve(S=b+=We(xe())),g++;break;case 45:45===y&&2==ve(b)&&(_=0)}}return a}function nt(e,t,r,n,o,a,i,s,c,u,l){for(var d=o-1,p=0===o?a:[""],m=we(p),y=0,_=0,h=0;y<n;++y)for(var f=0,g=Ee(e,d+1,d=me(_=i[y])),S=e;f<m;++f)(S=he(_>0?p[f]+" "+g:fe(g,/&\f/g,p[f])))&&(c[h++]=S);return Ne(e,t,r,0===o?Ze:s,c,u,l)}function ot(e,t,r){return Ne(e,t,r,Qe,ye(Ie),Ee(e,2,-2),0)}function at(e,t,r,n){return Ne(e,t,r,Ke,Ee(e,0,n),Ee(e,n+1,-1),n)}var it=function(e,t,r){for(var n=0,o=0;n=o,o=Me(),38===n&&12===o&&(t[r]=1),!Ue(o);)Fe();return ke(e,Ae)},st=new WeakMap,ct=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||st.get(r))&&!n){st.set(e,!0);for(var o=[],a=function(e,t){return je(function(e,t){var r=-1,n=44;do{switch(Ue(n)){case 0:38===n&&12===Me()&&(t[r]=1),e[r]+=it(Ae-1,t,r);break;case 2:e[r]+=ze(n);break;case 4:if(44===n){e[++r]=58===Me()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=ye(n)}}while(n=Fe());return e}(Le(e),t))}(t,o),i=r.props,s=0,c=0;s<a.length;s++)for(var u=0;u<i.length;u++,c++)e.props[c]=o[s]?a[s].replace(/&\f/g,i[u]):i[u]+" "+a[s]}}},ut=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function lt(e,t){switch(function(e,t){return 45^Se(e,0)?(((t<<2^Se(e,0))<<2^Se(e,1))<<2^Se(e,2))<<2^Se(e,3):0}(e,t)){case 5103:return Ge+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Ge+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ge+e+Ve+e+He+e+e;case 6828:case 4268:return Ge+e+He+e+e;case 6165:return Ge+e+He+"flex-"+e+e;case 5187:return Ge+e+fe(e,/(\w+).+(:[^]+)/,Ge+"box-$1$2"+He+"flex-$1$2")+e;case 5443:return Ge+e+He+"flex-item-"+fe(e,/flex-|-self/,"")+e;case 4675:return Ge+e+He+"flex-line-pack"+fe(e,/align-content|flex-|-self/,"")+e;case 5548:return Ge+e+He+fe(e,"shrink","negative")+e;case 5292:return Ge+e+He+fe(e,"basis","preferred-size")+e;case 6060:return Ge+"box-"+fe(e,"-grow","")+Ge+e+He+fe(e,"grow","positive")+e;case 4554:return Ge+fe(e,/([^-])(transform)/g,"$1"+Ge+"$2")+e;case 6187:return fe(fe(fe(e,/(zoom-|grab)/,Ge+"$1"),/(image-set)/,Ge+"$1"),e,"")+e;case 5495:case 3959:return fe(e,/(image-set\([^]*)/,Ge+"$1$`$1");case 4968:return fe(fe(e,/(.+:)(flex-)?(.*)/,Ge+"box-pack:$3"+He+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ge+e+e;case 4095:case 3583:case 4068:case 2532:return fe(e,/(.+)-inline(.+)/,Ge+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ve(e)-1-t>6)switch(Se(e,t+1)){case 109:if(45!==Se(e,t+4))break;case 102:return fe(e,/(.+:)(.+)-([^]+)/,"$1"+Ge+"$2-$3$1"+Ve+(108==Se(e,t+3)?"$3":"$2-$3"))+e;case 115:return~ge(e,"stretch")?lt(fe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Se(e,t+1))break;case 6444:switch(Se(e,ve(e)-3-(~ge(e,"!important")&&10))){case 107:return fe(e,":",":"+Ge)+e;case 101:return fe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ge+(45===Se(e,14)?"inline-":"")+"box$3$1"+Ge+"$2$3$1"+He+"$2box$3")+e}break;case 5936:switch(Se(e,t+11)){case 114:return Ge+e+He+fe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ge+e+He+fe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ge+e+He+fe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ge+e+He+e+e}return e}var dt=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Ke:e.return=lt(e.value,e.length);break;case Xe:return Je([De(e,{value:fe(e.value,"@","@"+Ge)})],n);case Ze:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return Je([De(e,{props:[fe(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Je([De(e,{props:[fe(t,/:(plac\w+)/,":"+Ge+"input-$1")]}),De(e,{props:[fe(t,/:(plac\w+)/,":-moz-$1")]}),De(e,{props:[fe(t,/:(plac\w+)/,He+"input-$1")]})],n)}return""}))}}],pt=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var n,o,a=e.stylisPlugins||dt,i={},s=[];n=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r<t.length;r++)i[t[r]]=!0;s.push(e)}));var c,u,l,d,p=[et,(d=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],m=(u=[ct,ut].concat(a,p),l=we(u),function(e,t,r,n){for(var o="",a=0;a<l;a++)o+=u[a](e,t,r,n)||"";return o});o=function(e,t,r,n){c=r,Je(tt(e?e+"{"+t.styles+"}":t.styles),m),n&&(y.inserted[t.name]=!0)};var y={key:t,sheet:new pe({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:o};return y.sheet.hydrate(s),y},mt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function yt(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var _t=/[A-Z]|^ms/g,ht=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ft=function(e){return 45===e.charCodeAt(1)},gt=function(e){return null!=e&&"boolean"!=typeof e},St=yt((function(e){return ft(e)?e:e.replace(_t,"-$&").toLowerCase()})),Et=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(ht,(function(e,t,r){return wt={name:t,styles:r,next:wt},t}))}return 1===mt[e]||ft(e)||"number"!=typeof t||0===t?t:t+"px"};function vt(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return wt={name:r.name,styles:r.styles,next:wt},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)wt={name:n.name,styles:n.styles,next:wt},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=vt(e,t,r[o])+";";else for(var a in r){var i=r[a];if("object"!=typeof i)null!=t&&void 0!==t[i]?n+=a+"{"+t[i]+"}":gt(i)&&(n+=St(a)+":"+Et(a,i)+";");else if(!Array.isArray(i)||"string"!=typeof i[0]||null!=t&&void 0!==t[i[0]]){var s=vt(e,t,i);switch(a){case"animation":case"animationName":n+=St(a)+":"+s+";";break;default:n+=a+"{"+s+"}"}}else for(var c=0;c<i.length;c++)gt(i[c])&&(n+=St(a)+":"+Et(a,i[c])+";")}return n}(e,t,r);case"function":if(void 0!==e){var o=wt,a=r(e);return wt=o,vt(e,t,a)}}if(null==t)return r;var i=t[r];return void 0!==i?i:r}var wt,bt,Tt=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Rt=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,o="";wt=void 0;var a=e[0];null==a||void 0===a.raw?(n=!1,o+=vt(r,t,a)):o+=a[0];for(var i=1;i<e.length;i++)o+=vt(r,t,e[i]),n&&(o+=a[i]);Tt.lastIndex=0;for(var s,c="";null!==(s=Tt.exec(o));)c+="-"+s[1];var u=function(e){for(var t,r=0,n=0,o=e.length;o>=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+c;return{name:u,styles:o,next:wt}},Ot=!!U.useInsertionEffect&&U.useInsertionEffect,At=Ot||function(e){return e()},It=(Ot||U.useLayoutEffect,U.createContext("undefined"!=typeof HTMLElement?pt({key:"css"}):null)),Ct=It.Provider,Nt=U.createContext({}),Dt=r(8616),Pt=r.n(Dt),Ft=new Uint8Array(16);function Mt(){if(!bt&&!(bt="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return bt(Ft)}const xt=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var kt=[],Ut=0;Ut<256;++Ut)kt.push((Ut+256).toString(16).substr(1));const Lt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(kt[e[t+0]]+kt[e[t+1]]+kt[e[t+2]]+kt[e[t+3]]+"-"+kt[e[t+4]]+kt[e[t+5]]+"-"+kt[e[t+6]]+kt[e[t+7]]+"-"+kt[e[t+8]]+kt[e[t+9]]+"-"+kt[e[t+10]]+kt[e[t+11]]+kt[e[t+12]]+kt[e[t+13]]+kt[e[t+14]]+kt[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&xt.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r},jt=function(e,t,r){var n=(e=e||{}).random||(e.rng||Mt)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var o=0;o<16;++o)t[r+o]=n[o];return t}return Lt(n)},zt=new Set,$t=Pt()((e=>{let t=jt().replace(/[0-9]/g,"");for(;zt.has(t);)t=jt().replace(/[0-9]/g,"");return zt.add(t),pt({container:e,key:t})}));function qt(e){let{children:t,document:r}=e;if(!r)return null;const n=$t(r.head);return(0,q.createElement)(Ct,{value:n},t)}function Yt(){const[,e]=(0,q.useState)({}),t=(0,q.useRef)(!0);return(0,q.useEffect)((()=>()=>{t.current=!1}),[]),()=>{t.current&&e({})}}function Bt(e){let{name:t,children:r}=e;const n=ie(t),o=(0,q.useRef)({rerender:Yt()});if((0,q.useEffect)((()=>(n.registerFill(o),()=>{n.unregisterFill(o)})),[n.registerFill,n.unregisterFill]),!n.ref||!n.ref.current)return null;"function"==typeof r&&(r=r(n.fillProps));const a=(0,q.createElement)(qt,{document:n.ref.current.ownerDocument},r);return(0,q.createPortal)(a,n.ref.current)}const Wt=(0,q.forwardRef)((function(e,t){let{name:r,fillProps:n={},as:o="div",...a}=e;const i=(0,q.useContext)(ae),s=(0,q.useRef)();return(0,q.useLayoutEffect)((()=>(i.registerSlot(r,s,n),()=>{i.unregisterSlot(r,s)})),[i.registerSlot,i.unregisterSlot,r]),(0,q.useLayoutEffect)((()=>{i.updateSlot(r,n)})),(0,q.createElement)(o,$({ref:(0,G.useMergeRefs)([t,s])},a))}));function Ht(e){return(0,q.createElement)(q.Fragment,null,(0,q.createElement)(ue,e),(0,q.createElement)(Bt,e))}const Vt=(0,q.forwardRef)(((e,t)=>{let{bubblesVirtually:r,...n}=e;return r?(0,q.createElement)(Wt,$({},n,{ref:t})):(0,q.createElement)(de,n)}));function Gt(e){return"appear"===e?"top":"left"}const Qt="Popover",Zt=(0,q.createContext)();function Kt(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:a}=function(e){return e.ownerDocument.defaultView.getComputedStyle(e)}(t),i=r?parseInt(r,10):0,s=n?parseInt(n,10):0,c=o?parseInt(o,10):0,u=a?parseInt(a,10):0;return{x:e.left+c,y:e.top+i,width:e.width-c-u,height:e.height-i-s,left:e.left+c,right:e.right-u,top:e.top+i,bottom:e.bottom-s}}function Xt(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function Jt(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==r&&(e.style[t]=r)}function er(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const tr=(0,q.forwardRef)(((e,t)=>{let{headerTitle:r,onClose:n,children:o,className:a,noArrow:i=!0,isAlternate:s,position:c="bottom right",range:u,focusOnMount:l="firstElement",anchorRef:d,shouldAnchorIncludePadding:p,anchorRect:m,getAnchorRect:y,expandOnMobile:_,animate:h=!0,onFocusOutside:f,__unstableStickyBoundaryElement:g,__unstableSlotName:S=Qt,__unstableObserveElement:E,__unstableBoundaryParent:v,__unstableForcePosition:w,__unstableForceXAlignment:b,__unstableEditorCanvasWrapper:T,...R}=e;const O=(0,q.useRef)(null),A=(0,q.useRef)(null),I=(0,q.useRef)(),C=(0,G.useViewportMatch)("medium","<"),[N,D]=(0,q.useState)(),P=(0,q.useContext)(Zt)||S,F=ie(P),M=_&&C,[x,k]=(0,G.useResizeObserver)();i=M||i,(0,q.useLayoutEffect)((()=>{if(M)return er(I.current,"is-without-arrow",i),er(I.current,"is-alternate",s),Xt(I.current,"data-x-axis"),Xt(I.current,"data-y-axis"),Jt(I.current,"top"),Jt(I.current,"left"),Jt(A.current,"maxHeight"),void Jt(A.current,"maxWidth");const e=()=>{if(!I.current||!A.current)return;let e=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0;if(t)return t;if(r){if(!e.current)return;const t=r(e.current);return J(t,t.ownerDocument||e.current.ownerDocument,a)}if(!1!==n){if(!(n&&window.Range&&window.Element&&window.DOMRect))return;if("function"==typeof(null==n?void 0:n.cloneRange))return J((0,Q.getRectangleFromRange)(n),n.endContainer.ownerDocument,a);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=J(n.getBoundingClientRect(),n.ownerDocument,a);return o?e:Kt(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),s=J(new window.DOMRect(r.left,r.top,r.width,i.bottom-r.top),e.ownerDocument,a);return o?s:Kt(s,n)}if(!e.current)return;const{parentNode:i}=e.current,s=J(i.getBoundingClientRect(),i.ownerDocument,a);return o?s:Kt(s,i)}(O,m,y,d,p,I.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=I.current;let n,o=0;if(t&&t!==r.body){const r=t.getBoundingClientRect();o=r.top,e=new window.DOMRect(e.left-r.left,e.top-r.top,e.width,e.height)}v&&(n=I.current.parentElement);const a=k.height?k:A.current.getBoundingClientRect(),{popoverTop:u,popoverLeft:l,xAxis:_,yAxis:h,contentHeight:f,contentWidth:S}=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top",n=arguments.length>3?arguments[3]:void 0,o=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,i=arguments.length>7?arguments[7]:void 0,s=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0;const[u,l="center",d]=r.split(" "),p=function(e,t,r,n,o,a,i,s,c){const{height:u}=t;if(o){const t=o.getBoundingClientRect(),n=t.top+u-i,a=t.bottom-u-i;if(e.top<=n)return!c||u+10<c.scrollTop+e.top?{yAxis:r,popoverTop:Math.min(e.bottom,n)}:{yAxis:"bottom",popoverTop:Math.min(e.bottom,a)}}let l=e.top+e.height/2;"bottom"===n?l=e.bottom:"top"===n&&(l=e.top);const d={popoverTop:l,contentHeight:(l-u/2>0?u/2:l)+(l+u/2>window.innerHeight?window.innerHeight-l:u/2)},p={popoverTop:e.top,contentHeight:e.top-10-u>0?u:e.top-10},m={popoverTop:e.bottom,contentHeight:e.bottom+10+u>window.innerHeight?window.innerHeight-10-e.bottom:u};let y,_=r,h=null;if(!o&&!s)if("middle"===r&&d.contentHeight===u)_="middle";else if("top"===r&&p.contentHeight===u)_="top";else if("bottom"===r&&m.contentHeight===u)_="bottom";else{_=p.contentHeight>m.contentHeight?"top":"bottom";const e="top"===_?p.contentHeight:m.contentHeight;h=e!==u?e:null}return y="middle"===_?d.popoverTop:"top"===_?p.popoverTop:m.popoverTop,{yAxis:_,popoverTop:y,contentHeight:h}}(e,t,u,d,n,0,o,i,c),m=function(e,t,r,n,o,a,i,s,c){const{width:u}=t;"left"===r&&(0,X.isRTL)()?r="right":"right"===r&&(0,X.isRTL)()&&(r="left"),"left"===n&&(0,X.isRTL)()?n="right":"right"===n&&(0,X.isRTL)()&&(n="left");const l=Math.round(e.left+e.width/2),d={popoverLeft:l,contentWidth:(l-u/2>0?u/2:l)+(l+u/2>window.innerWidth?window.innerWidth-l:u/2)};let p=e.left;"right"===n?p=e.right:"middle"===a||c||(p=l);let m=e.right;"left"===n?m=e.left:"middle"===a||c||(m=l);const y={popoverLeft:p,contentWidth:p-u>0?u:p},_={popoverLeft:m,contentWidth:m+u>window.innerWidth?window.innerWidth-m:u};let h,f=r,g=null;if(!o&&!s)if("center"===r&&d.contentWidth===u)f="center";else if("left"===r&&y.contentWidth===u)f="left";else if("right"===r&&_.contentWidth===u)f="right";else{f=y.contentWidth>_.contentWidth?"left":"right";const e="left"===f?y.contentWidth:_.contentWidth;u>window.innerWidth&&(g=window.innerWidth),e!==u&&(f="center",d.popoverLeft=window.innerWidth/2)}return h="center"===f?d.popoverLeft:"left"===f?y.popoverLeft:_.popoverLeft,i&&(h=Math.min(h,i.offsetLeft+i.offsetWidth-u),(0,X.isRTL)()||(h=Math.max(h,0))),{xAxis:f,popoverLeft:h,contentWidth:g}}(e,t,l,d,n,p.yAxis,a,i,s);return{...m,...p}}(e,a,c,g,I.current,o,n,w,b,T);"number"==typeof u&&"number"==typeof l&&(Jt(I.current,"top",u+"px"),Jt(I.current,"left",l+"px")),er(I.current,"is-without-arrow",i||"center"===_&&"middle"===h),er(I.current,"is-alternate",s),Xt(I.current,"data-x-axis",_),Xt(I.current,"data-y-axis",h),Jt(A.current,"maxHeight","number"==typeof f?f+"px":""),Jt(A.current,"maxWidth","number"==typeof S?S+"px":""),D(({left:"right",right:"left"}[_]||"center")+" "+({top:"bottom",bottom:"top"}[h]||"middle"))};e();const{ownerDocument:t}=I.current,{defaultView:r}=t,n=r.setInterval(e,500);let o;const a=()=>{r.cancelAnimationFrame(o),o=r.requestAnimationFrame(e)};r.addEventListener("click",a),r.addEventListener("resize",e),r.addEventListener("scroll",e,!0);const u=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(d);let l;return u&&u!==t&&(u.defaultView.addEventListener("resize",e),u.defaultView.addEventListener("scroll",e,!0)),E&&(l=new r.MutationObserver(e),l.observe(E,{attributes:!0})),()=>{var i,s;r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",a),r.cancelAnimationFrame(o),u&&u!==t&&(null===(i=u.defaultView)||void 0===i||i.removeEventListener("resize",e),null===(s=u.defaultView)||void 0===s||s.removeEventListener("scroll",e,!0)),l&&l.disconnect()}}),[M,m,y,d,p,c,k,g,E,v]);const U=(e,t)=>{"focus-outside"===e&&f?f(t):n&&n()},[L,j]=(0,G.__experimentalUseDialog)({focusOnMount:l,__unstableOnClose:U,onClose:U}),z=(0,G.useMergeRefs)([I,L,t]),Y=Boolean(h&&N)&&function(e){if("loading"===e.type)return B()("components-animate__loading");const{type:t,origin:r=Gt(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return B()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?B()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:N});let W=(0,q.createElement)("div",$({className:B()("components-popover",a,Y,{"is-expanded":M,"is-without-arrow":i,"is-alternate":s})},R,{ref:z},j,{tabIndex:"-1"}),M&&(0,q.createElement)(ne,null),M&&(0,q.createElement)("div",{className:"components-popover__header"},(0,q.createElement)("span",{className:"components-popover__header-title"},r),(0,q.createElement)(jr,{className:"components-popover__close",icon:K,onClick:n})),(0,q.createElement)("div",{ref:A,className:"components-popover__content"},(0,q.createElement)("div",{style:{position:"relative"}},x,o)));return F.ref&&(W=(0,q.createElement)(Ht,{name:P},W)),d||m?W:(0,q.createElement)("span",{ref:O},W)}));tr.Slot=(0,q.forwardRef)((function(e,t){let{name:r=Qt}=e;return(0,q.createElement)(Vt,{bubblesVirtually:!0,name:r,className:"popover-slot",ref:t})})),tr.__unstableSlotNameProvider=Zt.Provider;const rr=tr,nr=function(e){let t,r,{shortcut:n,className:o}=e;return n?((0,W.isString)(n)&&(t=n),(0,W.isObject)(n)&&(t=n.display,r=n.ariaLabel),(0,q.createElement)("span",{className:o,"aria-label":r},t)):null},or=700,ar=(0,q.createElement)("div",{className:"event-catcher"}),ir=e=>{let{eventHandlers:t,child:r,childrenWithPopover:n}=e;return(0,q.cloneElement)((0,q.createElement)("span",{className:"disabled-element-wrapper"},(0,q.cloneElement)(ar,t),(0,q.cloneElement)(r,{children:n})),t)},sr=e=>{let{child:t,eventHandlers:r,childrenWithPopover:n}=e;return(0,q.cloneElement)(t,{...r,children:n})},cr=(e,t,r)=>{if(1!==q.Children.count(e))return;const n=q.Children.only(e);n.props.disabled||"function"==typeof n.props[t]&&n.props[t](r)},ur=function(e){const{children:t,position:r,text:n,shortcut:o,delay:a=or}=e,[i,s]=(0,q.useState)(!1),[c,u]=(0,q.useState)(!1),l=(0,G.useDebounce)(u,a),d=e=>{cr(t,"onMouseDown",e),document.addEventListener("mouseup",y),s(!0)},p=e=>{cr(t,"onMouseUp",e),document.removeEventListener("mouseup",y),s(!1)},m=e=>"mouseUp"===e?p:"mouseDown"===e?d:void 0,y=m("mouseUp"),_=(e,r)=>n=>{if(cr(t,e,n),n.currentTarget.disabled)return;if("focus"===n.type&&i)return;l.cancel();const o=(0,W.includes)(["focus","mouseenter"],n.type);o!==c&&(r?l(o):u(o))},h=()=>{l.cancel(),document.removeEventListener("mouseup",y)};if((0,q.useEffect)((()=>h),[]),1!==q.Children.count(t))return t;const f={onMouseEnter:_("onMouseEnter",!0),onMouseLeave:_("onMouseLeave"),onClick:_("onClick"),onFocus:_("onFocus"),onBlur:_("onBlur"),onMouseDown:m("mouseDown")},g=q.Children.only(t),{children:S,disabled:E}=g.props,v=E?ir:sr,w=(e=>{let{grandchildren:t,isOver:r,position:n,text:o,shortcut:a}=e;return(0,q.concatChildren)(t,r&&(0,q.createElement)(rr,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,(0,q.createElement)(nr,{className:"components-tooltip__shortcut",shortcut:a})))})({grandchildren:S,isOver:c,position:r,text:n,shortcut:o});return v({child:g,eventHandlers:f,childrenWithPopover:w})},lr=function(e){let{icon:t,className:r,...n}=e;const o=["dashicon","dashicons","dashicons-"+t,r].filter(Boolean).join(" ");return(0,q.createElement)("span",$({className:o},n))},dr=function(e){let{icon:t=null,size:r=24,...n}=e;if("string"==typeof t)return(0,q.createElement)(lr,$({icon:t},n));if((0,q.isValidElement)(t)&&lr===t.type)return(0,q.cloneElement)(t,{...n});if("function"==typeof t)return t.prototype instanceof q.Component?(0,q.createElement)(t,{size:r,...n}):t({size:r,...n});if(t&&("svg"===t.type||t.type===Z.SVG)){const e={width:r,height:r,...t.props,...n};return(0,q.createElement)(Z.SVG,e)}return(0,q.isValidElement)(t)?(0,q.cloneElement)(t,{size:r,...n}):t};var pr=r(5606);const mr=(0,q.createContext)({}),yr=()=>(0,q.useContext)(mr);function _r(e){let{value:t}=e;const r=yr(),n=(0,q.useRef)(t);return function(e,r){const o=(0,q.useRef)(!1);(0,q.useEffect)((()=>{o.current?(0,W.isEqual)(n.current,t)&&n.current!==t&&void 0!==pr&&pr.env:o.current=!0}),r)}(0,[t]),(0,q.useMemo)((()=>(0,W.merge)((0,W.cloneDeep)(r),t)),[r,t])}(0,q.memo)((e=>{let{children:t,value:r}=e;const n=_r({value:r});return(0,q.createElement)(mr.Provider,{value:n},t)}));const hr="data-wp-component",fr="data-wp-c16t",gr="__contextSystemKey__",Sr=Pt()((function(e){return`components-${(0,W.kebabCase)(e)}`}));function Er(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n}function vr(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function wr(e,t,r){var n=[],o=Er(e,n,r);return n.length<2?r:o+t(n)}var br=function e(t){for(var r="",n=0;n<t.length;n++){var o=t[n];if(null!=o){var a=void 0;switch(typeof o){case"boolean":break;case"object":if(Array.isArray(o))a=e(o);else for(var i in a="",o)o[i]&&i&&(a&&(a+=" "),a+=i);break;default:a=o}a&&(r&&(r+=" "),r+=a)}}return r},Tr=function(){var e=pt({key:"css"});e.sheet.speedy=function(e){this.isSpeedy=e},e.compat=!0;var t=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=Rt(r,e.registered,void 0);return function(e,t){!function(e,t){var r=e.key+"-"+t.name;void 0===e.registered[r]&&(e.registered[r]=t.styles)}(e,t);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var n=t;do{e.insert(t===n?"."+r:"",n,e.sheet,!0),n=n.next}while(void 0!==n)}}(e,o),e.key+"-"+o.name};return{css:t,cx:function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return wr(e.registered,t,br(n))},injectGlobal:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=Rt(r,e.registered);vr(e,o)},keyframes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=Rt(r,e.registered),a="animation-"+o.name;return vr(e,{name:o.name,styles:"@keyframes "+a+"{"+o.styles+"}"}),a},hydrate:function(t){t.forEach((function(t){e.inserted[t]=!0}))},flush:function(){e.registered={},e.inserted={},e.sheet.flush()},sheet:e.sheet,cache:e,getRegisteredStyles:Er.bind(null,e.registered),merge:wr.bind(null,e.registered,t)}}(),Rr=(Tr.flush,Tr.hydrate,Tr.cx);Tr.merge,Tr.getRegisteredStyles,Tr.injectGlobal,Tr.keyframes,Tr.css,Tr.sheet,Tr.cache;r(5606);var Or=r(5606);const Ar={border:0,clip:"rect(1px, 1px, 1px, 1px)",WebkitClipPath:"inset( 50% )",clipPath:"inset( 50% )",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",wordWrap:"normal"};var Ir=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Cr=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},Nr=yt((function(e){return Ir.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Dr=function(e){return"theme"!==e},Pr=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Nr:Dr},Fr=function(e,t,r){var n;if(t){var o=t.shouldForwardProp;n=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},Mr=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return Cr(t,r,n),At((function(){return function(e,t,r){Cr(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+n:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,r,n)})),null};const xr=function e(t,r){var n,o,a=t.__emotion_real===t,i=a&&t.__emotion_base||t;void 0!==r&&(n=r.label,o=r.target);var s=Fr(t,r,a),c=s||Pr(i),u=!c("as");return function(){var l=arguments,d=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&d.push("label:"+n+";"),null==l[0]||void 0===l[0].raw)d.push.apply(d,l);else{d.push(l[0][0]);for(var p=l.length,m=1;m<p;m++)d.push(l[m],l[0][m])}var y,_=(y=function(e,t,r){var n,a,l,p,m=u&&e.as||i,y="",_=[],h=e;if(null==e.theme){for(var f in h={},e)h[f]=e[f];h.theme=U.useContext(Nt)}"string"==typeof e.className?(n=t.registered,a=_,l=e.className,p="",l.split(" ").forEach((function(e){void 0!==n[e]?a.push(n[e]+";"):p+=e+" "})),y=p):null!=e.className&&(y=e.className+" ");var g=Rt(d.concat(_),t.registered,h);y+=t.key+"-"+g.name,void 0!==o&&(y+=" "+o);var S=u&&void 0===s?Pr(m):c,E={};for(var v in e)u&&"as"===v||S(v)&&(E[v]=e[v]);return E.className=y,E.ref=r,U.createElement(U.Fragment,null,U.createElement(Mr,{cache:t,serialized:g,isStringTag:"string"==typeof m}),U.createElement(m,E))},(0,U.forwardRef)((function(e,t){var r=(0,U.useContext)(It);return y(e,r,t)})));return _.displayName=void 0!==n?n:"Styled("+("string"==typeof i?i:i.displayName||i.name||"Component")+")",_.defaultProps=t.defaultProps,_.__emotion_real=_,_.__emotion_base=i,_.__emotion_styles=d,_.__emotion_forwardProp=s,Object.defineProperty(_,"toString",{value:function(){return"."+o}}),_.withComponent=function(t,n){return e(t,$({},r,n,{shouldForwardProp:Fr(_,n,!0)})).apply(void 0,d)},_}}("div",{target:"em57xhy0"})("");xr.selector=".components-view",xr.displayName="View";const kr=xr,Ur=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{memo:n=!1}=r;let o=(0,q.forwardRef)(e);n&&(o=(0,q.memo)(o)),void 0===t&&void 0!==Or&&Or.env;let a=o[gr]||[t];return Array.isArray(t)&&(a=[...a,...t]),"string"==typeof t&&(a=[...a,t]),o.displayName=t,o[gr]=(0,W.uniq)(a),o.selector=`.${Sr(t)}`,o}((function(e,t){const{style:r,...n}=function(e,t){const r=yr(),n=(null==r?void 0:r[t])||{},o={[fr]:!0,...(a=t,{[hr]:a})};var a;const{_overrides:i,...s}=n,c=Object.entries(s).length?Object.assign({},s,e):e,u=(()=>{const e=(0,U.useContext)(It),t=(0,q.useCallback)((function(){if(null===e)throw new Error("The `useCx` hook should be only used within a valid Emotion Cache Context");for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return Rr(...r.map((t=>{return null!=(r=t)&&["name","styles"].every((e=>void 0!==r[e]))?(function(e,t){var r=e.key+"-"+t.name;if(void 0===e.registered[r]&&(e.registered[r]=t.styles),void 0===e.inserted[t.name]){var n=t;do{e.insert(t===n?"."+r:"",n,e.sheet,!0),n=n.next}while(void 0!==n)}}(e,t),`${e.key}-${t.name}`):t;var r})))}),[e]);return t})()(Sr(t),e.className),l="function"==typeof c.renderChildren?c.renderChildren(c):c.children;for(const e in c)o[e]=c[e];for(const e in i)o[e]=i[e];return o.children=l,o.className=u,o}(e,"VisuallyHidden");return(0,q.createElement)(kr,$({ref:t},n,{style:{...Ar,...r||{}}}))}),"VisuallyHidden"),Lr=["onMouseDown","onClick"],jr=(0,q.forwardRef)((function e(t,r){const{href:n,target:o,isSmall:a,isPressed:i,isBusy:s,isDestructive:c,className:u,disabled:l,icon:d,iconPosition:p="left",iconSize:m,showTooltip:y,tooltipPosition:_,shortcut:h,label:f,children:g,text:S,variant:E,__experimentalIsFocusable:v,describedBy:w,...b}=function(e){let{isDefault:t,isPrimary:r,isSecondary:n,isTertiary:o,isLink:a,variant:i,...s}=e,c=i;var u,l,d,p,m;return r&&(null!==(u=c)&&void 0!==u||(c="primary")),o&&(null!==(l=c)&&void 0!==l||(c="tertiary")),n&&(null!==(d=c)&&void 0!==d||(c="secondary")),t&&(V()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"',version:"6.2"}),null!==(p=c)&&void 0!==p||(c="secondary")),a&&(null!==(m=c)&&void 0!==m||(c="link")),{...s,variant:c}}(t),T=(0,G.useInstanceId)(e,"components-button__description"),R=B()("components-button",u,{"is-secondary":"secondary"===E,"is-primary":"primary"===E,"is-small":a,"is-tertiary":"tertiary"===E,"is-pressed":i,"is-busy":s,"is-link":"link"===E,"is-destructive":c,"has-text":!!d&&!!g,"has-icon":!!d}),O=l&&!v,A=void 0===n||O?"button":"a",I="a"===A?{href:n,target:o}:{type:"button",disabled:O,"aria-pressed":i};if(l&&v){I["aria-disabled"]=!0;for(const e of Lr)b[e]=e=>{e.stopPropagation(),e.preventDefault()}}const C=!O&&(y&&f||h||!!f&&(!g||(0,W.isArray)(g)&&!g.length)&&!1!==y),N=w?T:null,D=b["aria-describedby"]||N,P=(0,q.createElement)(A,$({},I,b,{className:R,"aria-label":b["aria-label"]||f,"aria-describedby":D,ref:r}),d&&"left"===p&&(0,q.createElement)(dr,{icon:d,size:m}),S&&(0,q.createElement)(q.Fragment,null,S),d&&"right"===p&&(0,q.createElement)(dr,{icon:d,size:m}),g);return C?(0,q.createElement)(q.Fragment,null,(0,q.createElement)(ur,{text:w||f,shortcut:h,position:_},P),w&&(0,q.createElement)(Ur,null,(0,q.createElement)("span",{id:N},w))):(0,q.createElement)(q.Fragment,null,P,w&&(0,q.createElement)(Ur,null,(0,q.createElement)("span",{id:N},w)))}));function zr(e){return e.startsWith("{{/")?{type:"componentClose",value:e.replace(/\W/g,"")}:e.endsWith("/}}")?{type:"componentSelfClosing",value:e.replace(/\W/g,"")}:e.startsWith("{{")?{type:"componentOpen",value:e.replace(/\W/g,"")}:{type:"string",value:e}}function $r(e,t){let r,n,o=[];for(let a=0;a<e.length;a++){const i=e[a];if("string"!==i.type){if(void 0===t[i.value])throw new Error(`Invalid interpolation, missing component node: \`${i.value}\``);if("object"!=typeof t[i.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${i.value}\``);if("componentClose"===i.type)throw new Error(`Missing opening component token: \`${i.value}\``);if("componentOpen"===i.type){r=t[i.value],n=a;break}o.push(t[i.value])}else o.push(i.value)}if(r){const a=function(e,t){const r=t[e];let n=0;for(let o=e+1;o<t.length;o++){const e=t[o];if(e.value===r.value){if("componentOpen"===e.type){n++;continue}if("componentClose"===e.type){if(0===n)return o;n--}}}throw new Error("Missing closing component token `"+r.value+"`")}(n,e),i=$r(e.slice(n+1,a),t),s=(0,U.cloneElement)(r,{},i);if(o.push(s),a<e.length-1){const r=$r(e.slice(a+1),t);o=o.concat(r)}}return o=o.filter(Boolean),0===o.length?null:1===o.length?o[0]:(0,U.createElement)(U.Fragment,null,...o)}function qr(e){const{mixedString:t,components:r,throwErrors:n}=e;if(!r)return t;if("object"!=typeof r){if(n)throw new Error(`Interpolation Error: unable to process \`${t}\` because components is not an object`);return t}const o=function(e){return e.split(/(\{\{\/?\s*\w+\s*\/?\}\})/g).map(zr)}(t);try{return $r(o,r)}catch(e){if(n)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}const Yr=window.wp.data,Br=window.wp.dataControls,Wr="/wc/v3/payments",Hr="wc/payments",Vr={SET_DEPOSIT:"SET_DEPOSIT",SET_DEPOSITS:"SET_DEPOSITS",SET_DEPOSITS_COUNT:"SET_DEPOSITS_COUNT",SET_ERROR_FOR_DEPOSIT_QUERY:"SET_ERROR_FOR_DEPOSIT_QUERY",SET_DEPOSITS_SUMMARY:"SET_DEPOSITS_SUMMARY",SET_ERROR_FOR_DEPOSITS_SUMMARY:"SET_ERROR_FOR_DEPOSITS_SUMMARY",SET_INSTANT_DEPOSIT:"SET_INSTANT_DEPOSIT",SET_ALL_DEPOSITS_OVERVIEWS:"SET_ALL_DEPOSITS_OVERVIEWS",SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:"SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS"},Gr=e=>JSON.stringify(e,Object.keys(e).sort()),Qr={byId:{},queries:{},count:0,instant:{}},Zr=e=>e&&e.deposits||{},Kr=(e,t)=>(Zr(e).byId||{})[t],Xr=e=>{const t=Zr(e).overviews||{};if(!t.data)return{account:null,currencies:[]};const{deposit:r,balance:n,account:o}=t.data,a={lastPaid:r.last_paid,pending:n.pending,available:n.available,instant:n.instant},i={};for(const[e,t]of Object.entries(a))t?.forEach((t=>{const{currency:r}=t;i[r]||(i[r]={currency:r,lastPaid:void 0,pending:void 0,available:void 0,instant:void 0}),i[r][e]=t}));const s=Object.values(i);return{account:o,currencies:[...s.filter((e=>o.default_currency===e.currency)),...s.filter((e=>o.default_currency!==e.currency))]}},Jr=e=>(Zr(e).overviews||{}).error,en=(e,t)=>{const r=Gr(t);return(Zr(e).queries||{})[r]||{}},tn=(e,t)=>(en(e,t).data||[]).map(Kr.bind(void 0,e)),rn=e=>Zr(e).count,nn=(e,t)=>en(e,t).error||{},on=(e,t)=>{const r=Gr(t);return(Zr(e).summary||{})[r]||{}},an=(e,t)=>on(e,t).data||{},sn=(e,t)=>on(e,t).error||{},cn=e=>(Zr(e).instant||{}).data,un=window.wp.domReady;var ln=r.n(un);(0,U.createContext)(window.wcpaySettings),(0,U.createContext)({isActive:!1,setActive:()=>null,isCompleted:!1,setCompleted:()=>null,taskId:""});const dn=window.wc.currency;var pn=r.n(dn);(0,X.__)("Australian dollar","woocommerce-payments"),(0,X.__)("Canadian dollar","woocommerce-payments"),(0,X.__)("Swiss franc","woocommerce-payments"),(0,X.__)("Danish krone","woocommerce-payments"),(0,X.__)("Euro","woocommerce-payments"),(0,X.__)("Pound sterling","woocommerce-payments"),(0,X.__)("Norwegian krone","woocommerce-payments"),(0,X.__)("New Zealand dollar","woocommerce-payments"),(0,X.__)("Swedish krona","woocommerce-payments"),(0,X.__)("United States (US) dollar","woocommerce-payments");const mn=(e,t="USD",r=null,n=!1)=>{const o=(e=>wcpaySettings.zeroDecimalCurrencies.includes(e.toLowerCase()))(t);o||(e/=100);const a=e<0,i=a?-1*e:e,s=a?"-":"",c=n?(e=>{const t=e.toUpperCase(),{currencyData:r,connect:{country:n="US"}}=wcpaySettings;if(r[n]?.code===t)return pn()(r[n]);const o=(0,W.find)(r,{code:t});if(o){const{defaultLocale:e={}}=o;return e.hasOwnProperty("decimalSeparator")&&e.hasOwnProperty("thousandSeparator")&&e.hasOwnProperty("symbolPosition")&&(o.decimalSeparator=e.decimalSeparator,o.thousandSeparator=e.thousandSeparator,o.symbolPosition=e.symbolPosition),pn()(o)}return null})(t):((e,t=null)=>{const{currencyData:r,connect:{country:n="US"}}=wcpaySettings,o=(0,W.find)(r,{code:e.toUpperCase()});if(o){if(null!==t&&t.toUpperCase()!==e.toUpperCase()||r[n]){const e=t?(0,W.find)(r,{code:t.toUpperCase()}):r[n];e&&(o.decimalSeparator=e.decimalSeparator,o.thousandSeparator=e.thousandSeparator,o.symbolPosition=e.symbolPosition)}return pn()(o)}return null})(t,r);if(null===c)return s+yn(i,t,o);try{return s+("function"==typeof c.formatAmount?_n(c.formatAmount(i)):_n(c.formatCurrency(i)))}catch(e){return s+_n(yn(i,t,o))}};function yn(e,t,r){try{return e.toLocaleString(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",dummy:r})}catch(n){return(0,X.sprintf)(r?"%s %i":"%s %.2f",t.toUpperCase(),e)}}function _n(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}const hn=window.wp.url,fn=window.moment;var gn=r.n(fn);const Sn=window.wp.date,En=(window.wc.number,e=>(0,hn.addQueryArgs)("admin.php",e)),vn=(e,t=!1)=>{const r=t?gn()(e).endOf("day").utc().toISOString():gn()(e).startOf("day").utc().toISOString();return e&&(0,Sn.dateI18n)("Y-m-d H:i:s",r,!0)};function wn(e){return{type:Vr.SET_DEPOSIT,data:e}}function bn(e){return{type:Vr.SET_ALL_DEPOSITS_OVERVIEWS,data:e}}function Tn(e,t){return{type:Vr.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS,error:t}}function Rn(e,t){return{type:Vr.SET_DEPOSITS,query:e,data:t}}function On(e){return{type:Vr.SET_DEPOSITS_COUNT,data:e}}function An(e,t,r){return{type:Vr.SET_ERROR_FOR_DEPOSIT_QUERY,query:e,data:t,error:r}}function In(e,t){return{type:Vr.SET_DEPOSITS_SUMMARY,query:e,data:t}}function Cn(e,t,r){return{type:Vr.SET_ERROR_FOR_DEPOSITS_SUMMARY,query:e,data:t,error:r}}function Nn(e){return{type:Vr.SET_INSTANT_DEPOSIT,data:e}}function*Dn(e){try{yield(0,Yr.dispatch)(Hr).startResolution("getInstantDeposit",[e]);const t=yield(0,Br.apiFetch)({path:"/wc/v3/payments/deposits",method:"POST",data:{type:"instant",currency:e}});yield Nn(t),yield(0,Yr.dispatch)(Hr).invalidateResolutionForStoreSelector("getDeposits"),yield(0,Yr.dispatch)(Hr).invalidateResolutionForStoreSelector("getAllDepositsOverviews"),yield(0,Yr.dispatch)("core/notices").createSuccessNotice((0,X.sprintf)((0,X.__)("Instant payout for %s in transit.","woocommerce-payments"),mn(t.amount)),{actions:[{label:(0,X.__)("View details","woocommerce-payments"),url:En({page:"wc-admin",path:"/payments/payouts/details",id:t.id})}]})}catch{yield(0,Yr.dispatch)("core/notices").createErrorNotice((0,X.__)("Error creating instant payout.","woocommerce-payments"))}finally{yield(0,Yr.dispatch)(Hr).finishResolution("getInstantDeposit",[e])}}function*Pn(e){if(/\W/.test(e))return;const t=(0,hn.addQueryArgs)(`${Wr}/deposits/${e}`);try{const e=yield(0,Br.apiFetch)({path:t});yield wn(e)}catch(e){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving payout.","woocommerce-payments"))}}function*Fn(){const e=(0,hn.addQueryArgs)(`${Wr}/deposits/overview-all`);try{const t=yield(0,Br.apiFetch)({path:e});yield bn(t)}catch(e){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving all payouts' overviews.","woocommerce-payments")),yield Tn()}}const Mn=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:vn(e.dateBefore,!0),date_after:vn(e.dateAfter),date_between:e.dateBetween&&[vn(e.dateBetween[0]),vn(e.dateBetween[1],!0)],status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.userLocale}),xn=`${Wr}/deposits/download`;function kn(e){return(0,hn.addQueryArgs)(xn,Mn(e))}function*Un(e){const t=(0,hn.addQueryArgs)(`${Wr}/deposits`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...Mn(e)});try{const r=yield(0,Br.apiFetch)({path:t})||{};yield Rn(e,r.data),yield On(r.total_count);for(const e in r.data)yield Yr.controls.dispatch(Hr,"finishResolution","getDeposit",[r.data[e].id])}catch(t){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving payouts.","woocommerce-payments")),yield An(e,null,t)}}function*Ln(e){const t=(0,hn.addQueryArgs)(`${Wr}/deposits/summary`,Mn(e));try{const r=yield(0,Br.apiFetch)({path:t});yield In(e,r)}catch(t){yield Cn(e,null,t)}}const jn={SET_TRANSACTIONS:"SET_TRANSACTIONS",SET_ERROR_FOR_TRANSACTIONS:"SET_ERROR_FOR_TRANSACTIONS",SET_TRANSACTIONS_SUMMARY:"SET_TRANSACTIONS_SUMMARY",SET_ERROR_FOR_TRANSACTIONS_SUMMARY:"SET_ERROR_FOR_TRANSACTIONS_SUMMARY",SET_FRAUD_OUTCOME_TRANSACTIONS:"SET_FRAUD_OUTCOME_TRANSACTIONS",SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:"SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS",SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:"SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY",SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:"SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY"},zn={summary:{},fraudProtection:{review:{summary:{}},block:{summary:{}}}},$n=e=>e&&e.transactions||{},qn=(e,t)=>{const r=Gr(t);return $n(e)[r]||{}},Yn=(e,t)=>qn(e,t).data||[],Bn=(e,t)=>qn(e,t).error||{},Wn=(e,t)=>{const r=Gr(t);return $n(e).summary[r]||{}},Hn=(e,t)=>Wn(e,t).data||{},Vn=(e,t)=>Wn(e,t).error||{},Gn=(e,t,r)=>{const n=Gr(r);return $n(e).fraudProtection?.[t]?.[n]||{}},Qn=(e,t,r)=>Gn(e,t,r).data||[],Zn=(e,t,r)=>Gn(e,t,r).error||{},Kn=(e,t,r)=>{const n=Gr(r);return $n(e).fraudProtection?.[t]?.summary[n]||{}},Xn=(e,t,r)=>Kn(e,t,r).data||{},Jn=(e,t,r)=>Kn(e,t,r).error||{};function eo(e,t){return{type:jn.SET_TRANSACTIONS,query:e,data:t}}function to(e,t,r){return{type:jn.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:r}}function ro(e,t){return{type:jn.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function no(e,t,r){return{type:jn.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:r}}function oo(e,t,r){return{type:jn.SET_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:r}}function ao(e,t,r){return{type:jn.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:null,error:r}}function io(e,t,r){return{type:jn.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:r}}function so(e,t,r){return{type:jn.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:null,error:r}}const co=e=>({user_email:e.userEmail,match:e.match,date_before:vn(e.dateBefore,!0),date_after:vn(e.dateAfter),date_between:e.dateBetween&&[vn(e.dateBetween[0]),vn(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot,type_is_in:e.typeIsIn,source_device_is:e.sourceDeviceIs,source_device_is_not:e.sourceDeviceIsNot,channel_is:e.channelIs,channel_is_not:e.channelIsNot,customer_country_is:e.customerCountryIs,customer_country_is_not:e.customerCountryIsNot,risk_level_is:e.riskLevelIs,risk_level_is_not:e.riskLevelIsNot,store_currency_is:e.storeCurrencyIs,loan_id_is:e.loanIdIs,deposit_id:e.depositId,customer_currency_is:e.customerCurrencyIs,customer_currency_is_not:e.customerCurrencyIsNot,source_is:e.sourceIs,source_is_not:e.sourceIsNot,search:e.search,user_timezone:gn()(new Date).format("Z"),locale:e.userLocale});function*uo(e){const t=(0,hn.addQueryArgs)(`${Wr}/transactions`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...co(e)});try{const r=yield(0,Br.apiFetch)({path:t});yield eo(e,r.data||[])}catch(t){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving transactions.","woocommerce-payments")),yield to(e,null,t)}}const lo=`${Wr}/transactions/download`;function po(e){return(0,hn.addQueryArgs)(lo,co(e))}function*mo(e){const t=(0,hn.addQueryArgs)(`${Wr}/transactions/summary`,co(e));try{const r=yield(0,Br.apiFetch)({path:t});yield ro(e,r)}catch(t){yield no(e,null,t)}}function*yo(e,t){const r=(0,hn.addQueryArgs)(`${Wr}/transactions/fraud-outcomes`,{status:e,page:t.paged,sort:t.orderby,pagesize:t.perPage,direction:t.order,additional_status:t.additionalStatus,...co(t)});try{const n=yield(0,Br.apiFetch)({path:r});yield oo(e,t,n.data||[])}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield oo(e,t,[]));yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving transactions.","woocommerce-payments")),yield ao(e,t,r)}}function*_o(e,t){const r=(0,hn.addQueryArgs)(`${Wr}/transactions/fraud-outcomes/summary`,{status:e,additional_status:t.additionalStatus}),n={count:0,total:0};try{const o=yield(0,Br.apiFetch)({path:r});yield io(e,t,o||n)}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield io(e,t,n));yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving on review transactions.","woocommerce-payments")),yield so(e,t,r)}}function ho(e,t){return(0,hn.addQueryArgs)(`${Wr}/transactions/fraud-outcomes/download`,{status:e,sort:t.orderby,direction:t.order,additional_status:t.additionalStatus,...co(t)})}const fo={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"},go=(e,t)=>e.charges[t]&&e.charges[t].data?e.charges[t].data:{},So=(e,t)=>e.charges[t]&&e.charges[t].error?e.charges[t].error:{},Eo=(e,t)=>go(e,t),vo=(e,t)=>So(e,t);function wo(e,t){return{type:fo.SET_CHARGE,id:e,data:t}}function bo(e,t,r){return{type:fo.SET_ERROR_FOR_CHARGE,id:e,data:t,error:r}}function*To(e){try{const t=yield(0,Br.apiFetch)({path:`${Wr}/charges/${e}`});yield wo(e,t)}catch(t){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving transaction.","woocommerce-payments")),yield bo(e,null,t)}}function*Ro(e){try{const t=yield(0,Br.apiFetch)({path:`${Wr}/charges/order/${e}`});yield wo(e,t)}catch(t){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving transaction.","woocommerce-payments")),yield bo(e,null,t)}}const Oo={SET_TIMELINE:"SET_TIMELINE",SET_ERROR_FOR_TIMELINE:"SET_ERROR_FOR_TIMELINE"},Ao=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].data?e.timeline[t].data:{},Io=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].error?e.timeline[t].error:{};function Co(e,t){return{id:e,type:Oo.SET_TIMELINE,data:t}}function No(e,t){return{id:e,type:Oo.SET_ERROR_FOR_TIMELINE,error:t}}function*Do(e){try{const t=yield(0,Br.apiFetch)({path:`${Wr}/timeline/${e}`});yield Co(e,t.data)}catch(t){yield No(e,t)}}const Po={SET_DISPUTE:"SET_DISPUTE",SET_ERROR_FOR_DISPUTE:"SET_ERROR_FOR_DISPUTE",SET_DISPUTES:"SET_DISPUTES",SET_DISPUTES_SUMMARY:"SET_DISPUTES_SUMMARY"},Fo={byId:{},queries:{},summary:{},cached:{}},Mo=e=>e&&e.disputes||{},xo=(e,t)=>(Mo(e).byId||{})[t],ko=(e,t)=>{const r=Mo(e).byId||{};return r[t]?.error},Uo=(e,t)=>(Mo(e).cached||{})[t],Lo=(e,t)=>{const r=((e,t)=>{const r=Gr(t);return(Mo(e).queries||{})[r]||{}})(e,t).data||[];return r.map(Uo.bind(void 0,e))},jo=(e,t)=>((e,t)=>{const r=Gr(t);return(Mo(e).summary||{})[r]||{}})(e,t).data||{};var zo;!function(e){e.SET_PAYMENT_INTENT="SET_PAYMENT_INTENT",e.SET_ERROR_FOR_PAYMENT_INTENT="SET_ERROR_FOR_PAYMENT_INTENT"}(zo||(zo={}));const $o=zo;function qo(e,t){return{type:$o.SET_PAYMENT_INTENT,id:e,data:t}}function Yo(e,t){return{type:$o.SET_ERROR_FOR_PAYMENT_INTENT,id:e,error:t}}function*Bo(e,t){var r;const n=e.payment_intent;try{yield(0,Br.apiFetch)({path:"/wc/v3/payments/refund/",method:"post",data:{charge_id:e.id,amount:e.amount,reason:t,order_id:null===(r=null==e?void 0:e.order)||void 0===r?void 0:r.id}}),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getTimeline"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Yr.controls.dispatch("core/notices","createSuccessNotice",(0,X.sprintf)((0,X.__)("Refunded payment #%s.","woocommerce-payments"),n))}catch(e){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.sprintf)((0,X.__)("There has been an error refunding the payment #%s. Please try again later.","woocommerce-payments"),n))}}function*Wo(e){try{const t=yield(0,Br.apiFetch)({path:`${Wr}/payment_intents/${e}`});yield qo(e,t)}catch(t){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving transaction.","woocommerce-payments")),yield Yo(e,t)}}function Ho(e){return{type:Po.SET_DISPUTE,data:e}}function Vo(e,t,r){return{type:Po.SET_ERROR_FOR_DISPUTE,id:e,data:t,error:r}}function Go(e,t){return{type:Po.SET_DISPUTES,query:e,data:t}}function Qo(e,t){return{type:Po.SET_DISPUTES_SUMMARY,query:e,data:t}}function*Zo(e){const{id:t,payment_intent:r}=e;try{yield Yr.controls.dispatch(Hr,"startResolution","getDispute",[t]);const e=yield(0,Br.apiFetch)({path:`${Wr}/disputes/${t}/close`,method:"post"});yield Ho(e),yield Wo(r),yield Yr.controls.dispatch(Hr,"finishResolution","getDispute",[t]);const n=e.order?(0,X.sprintf)((0,X.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),e.order.number):(0,X.__)("You have accepted the dispute.","woocommerce-payments");yield Yr.controls.dispatch("core/notices","createSuccessNotice",n)}catch(e){const r=(0,X.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments");yield Yr.controls.dispatch("core/notices","createErrorNotice",r),yield Yr.controls.dispatch(Hr,"finishResolution","getDispute",[t])}}const Ko=window.wc.wcSettings,Xo=((0,X.__)("Bank cannot process","woocommerce-payments"),(0,X.__)("Check returned","woocommerce-payments"),(0,X.__)("Credit not processed","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If your customer was not refunded appropriately, you will need to accept the dispute, or resolve the issue with your customer. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The customer claims that the purchased product was returned or the transaction was otherwise canceled, but you have not yet provided a refund or credit.","woocommerce-payments"),(0,X.__)("Demonstrate that you have refunded your customer through other means or that your customer is not entitled to a refund. You cannot issue a refund while a payment is being disputed. If you believe that your customer was entitled a refund that you did not provide, you can accept the dispute.","woocommerce-payments"),(0,X.__)("You should first get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),(0,X.__)("If the cardholder agrees to withdraw the dispute, you should still submit evidence for the dispute using the forms on the next screen. In addition to the following evidence, your submission should include correspondence with the cardholder saying they would withdraw the dispute and a written statement from their card issuer confirming that the dispute has been withdrawn.","woocommerce-payments"),(0,X.__)("The cardholder claims a credit was not processed.","woocommerce-payments"),(0,X.__)("Customer initiated","woocommerce-payments"),(0,X.__)("Debit not authorized","woocommerce-payments"),(0,X.__)("Duplicate","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If there were duplicate payments, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments"),(0,X.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments"),(0,X.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),(0,X.__)("If they were not, collect any and all information documenting that each payment was made separately, such as copies of receipts. If the receipts don’t include the items purchased, be sure to include an itemized list. Each receipt should clearly indicate that the payments are for separate purchases of items or services. If you’ve been able to get in touch with the customer you should be sure to address any concerns they had in your evidence.","woocommerce-payments"),(0,X.__)("If there have been two or more separate payments, you should get in touch with your customer. If you understand what their complaint is, there is a chance for you to explain the misunderstanding or to make it right. If you’re able to resolve the issue with your customer, you can ask that they withdraw the dispute.","woocommerce-payments"),(0,X.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,X.__)("The cardholder claims this is a duplicate transaction.","woocommerce-payments"),(0,X.__)("Transaction unauthorized","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If you believe the payment was actually made using a stolen credit card, you will need to accept the dispute. The credit card networks place liability for accepting unauthorized transactions with you, the business.","woocommerce-payments"),(0,X.__)("This is the most common reason for a dispute, and happens when a cardholder claims that they didn’t authorize the payment. This can happen if the card was lost or stolen and used to make an unauthorized transaction. It can also happen if the cardholder doesn’t recognize the payment as it appears on the billing statement from their card issuer.","woocommerce-payments"),(0,X.__)("Provide adequate payment and order details so that a legitimate customer recognizes it, or proves to the card issuer that their cardholder authorized the transaction.","woocommerce-payments"),(0,X.__)("Try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction.","woocommerce-payments"),(0,X.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,X.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments"),(0,X.__)("The cardholder claims this is an unauthorized transaction.","woocommerce-payments"),(0,X.__)("General","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("This is an uncategorized dispute, so you should contact the customer for additional details to find out why the payment was disputed.","woocommerce-payments"),(0,X.__)("Incorrect account details","woocommerce-payments"),(0,X.__)("Insufficient funds","woocommerce-payments"),(0,X.__)("Product not received","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If you can not prove the customer received their product or service, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments"),(0,X.__)("Prove that the customer received a physical product or offline service, or made use of a digital product or online service. This must have occurred prior to the date the dispute was initiated.","woocommerce-payments"),(0,X.__)("First, get in touch with your customer. Understanding why they filed the dispute will be important for helping make sure your customer gets the product and will give you critical information to prevent this from happening to others.","woocommerce-payments"),(0,X.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,X.__)("The cardholder claims the product was not received.","woocommerce-payments"),(0,X.__)("Product unacceptable","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If you can not prove the customer received their product or service as described, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments"),(0,X.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments"),(0,X.__)("If the product or service is as described, provide specific information (invoice, contract, etc.) to refute the cardholder’s claims. Quality disputes are where the customer does not agree with the condition of merchandise or service received (e.g., a car repair situation or quality of a hotel room). There may be instances where you will need to obtain a neutral third-party opinion to help corroborate your claim against the cardholder. Provide as much specific information and documentation as possible to refute the cardholder’s claims. It is recommended that you address each point that the cardholder has made.","woocommerce-payments"),(0,X.__)("If the customer has not yet returned the product or canceled the service, provide specific information to that effect. You should double-check your incoming shipping records to verify that you have not received a return before you respond. If you have processed a credit or reversal for this transaction, provide evidence of this which includes the amount and date processed.","woocommerce-payments"),(0,X.__)("For products that have been repaired or replaced, provide evidence that the cardholder agreed to a repair or replacement, it has been received by the customer, and the repair or replacement has not since been disputed.","woocommerce-payments"),(0,X.__)("If your customer made no attempt to return the product or cancel the service, or if you provided a replacement product or service, make sure to note that as well.","woocommerce-payments"),(0,X.__)("If the customer withdraws their dispute you should still submit evidence using the forms on the next screen. Be sure to provide a letter or email from the cardholder stating that they are no longer in dispute.","woocommerce-payments"),(0,X.__)("The cardholder claims the product was unacceptable.","woocommerce-payments"),(0,X.__)("Subscription canceled","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancellation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments"),(0,X.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,X.__)("First, get in touch with your customer. If you understand what they believe happened, there is a chance for you to explain the misunderstanding or to make it right. ","woocommerce-payments"),(0,X.__)("Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence using the forms on the next screen. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,X.__)("Otherwise, use the forms on the next screen to submit evidence that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,X.__)("The cardholder claims a subscription was canceled.","woocommerce-payments"),(0,X.__)("Unrecognized","woocommerce-payments"),(0,X.__)("If you believe the dispute is invalid, you can challenge it by submitting the appropriate evidence using the response forms on the next screen.","woocommerce-payments"),(0,X.__)("If you can not prove the customer’s subscription was canceled, and or they did not follow your cancellation policy, you should accept the dispute. You cannot issue a refund while a payment is being disputed. The credit card networks place liability for accepting disputed payments with you, the business.","woocommerce-payments"),(0,X.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments"),(0,X.__)("Get your customer to withdraw the dispute by helping them identify the payment. Otherwise, challenge the dispute with appropriate evidence that proves the purchase was legitimate. ","woocommerce-payments"),(0,X.__)("First, try to get in touch with your customer. Sometimes people forget about payments they make or don’t recognize the way they appear on their card statement. If this is the case, ask them to contact their card issuer and let them know they no longer dispute the transaction. Even if your customer agrees to withdraw the dispute, you must still submit appropriate evidence. Simply saying that your customer is going to withdraw the dispute is not sufficient evidence.","woocommerce-payments"),(0,X.__)("It may be more efficient—and provide a better customer experience—to accept an accidental dispute and charge the customer again, if appropriate. Even when a dispute is withdrawn, it usually takes approximately 75 days to be finalized. Remember, it doesn’t matter to the card networks whether you win or lose a dispute; what matters is how many disputes a business receives, regardless of how many disputes are won.","woocommerce-payments"),{warning_needs_response:(0,X.__)("Inquiry: Needs response","woocommerce-payments"),warning_under_review:(0,X.__)("Inquiry: Under review","woocommerce-payments"),warning_closed:(0,X.__)("Inquiry: Closed","woocommerce-payments"),needs_response:(0,X.__)("Needs response","woocommerce-payments"),under_review:(0,X.__)("Under review","woocommerce-payments"),charge_refunded:(0,X.__)("Charge refunded","woocommerce-payments"),won:(0,X.__)("Won","woocommerce-payments"),lost:(0,X.__)("Lost","woocommerce-payments")}),Jo=(Object.entries(Xo).map((([e,t])=>({label:t,value:e}))).filter((function(e){return null!=e})),["needs_response","warning_needs_response"]),ea=((0,X.__)("Dispute currency","woocommerce-payments"),(0,X.__)("All currencies","woocommerce-payments"),(0,X.__)("Show","woocommerce-payments"),(0,X.__)("Needs response","woocommerce-payments"),(0,X.__)("All disputes","woocommerce-payments"),(0,X.__)("Advanced filters","woocommerce-payments"),(0,Ko.getSetting)("wcVersion")),ta=parseFloat(ea),ra=(ta<7.8?(0,X.__)("Disputes match {{select /}} filters","woocommerce-payments"):(0,X.__)("Disputes match <select /> filters","woocommerce-payments"),(0,X.__)("Disputed on date","woocommerce-payments"),(0,X.__)("Remove dispute date filter","woocommerce-payments"),(0,X.__)("Select a dispute date filter match","woocommerce-payments"),ta<7.8?(0,X.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,X.__)("<title>Date</title> <rule /> <filter />","woocommerce-payments"),(0,X.__)("Select a dispute date","woocommerce-payments"),(0,X.__)("Before","woocommerce-payments"),(0,X.__)("After","woocommerce-payments"),(0,X.__)("Between","woocommerce-payments"),(0,X.__)("Status","woocommerce-payments"),(0,X.__)("Remove dispute status filter","woocommerce-payments"),(0,X.__)("Select a dispute status filter match","woocommerce-payments"),ta<7.8?(0,X.__)("{{title}}Status{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,X.__)("<title>Status</title> <rule /> <filter />","woocommerce-payments"),(0,X.__)("Select a dispute status","woocommerce-payments"),(0,X._x)("Is","dispute status","woocommerce-payments"),(0,X._x)("Is not","dispute status","woocommerce-payments"),e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:vn(e.dateBefore,!0),date_after:vn(e.dateAfter),date_between:e.dateBetween&&[vn(e.dateBetween[0]),vn(e.dateBetween[1],!0)],search:"awaiting_response"===e.filter?Jo:e.search,status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.userLocale})),na=`${Wr}/disputes/download`;function oa(e){return(0,hn.addQueryArgs)(na,ra(e))}function*aa(e){const t=(0,hn.addQueryArgs)(`${Wr}/disputes/${e}`);try{const e=yield(0,Br.apiFetch)({path:t});yield Ho(e)}catch(t){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving dispute.","woocommerce-payments")),yield Vo(e,void 0,t)}}function*ia(e){const t=(0,hn.addQueryArgs)(`${Wr}/disputes`,{page:e.paged,pagesize:e.perPage,sort:(0,W.snakeCase)(e.orderBy),direction:e.order,...ra(e)});try{const r=yield(0,Br.apiFetch)({path:t})||{};yield Go(e,r.data)}catch(e){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving disputes.","woocommerce-payments"))}}function*sa(e){const t=(0,hn.addQueryArgs)(`${Wr}/disputes/summary`,{page:e.paged,pagesize:e.perPage,...ra(e)});try{const r=yield(0,Br.apiFetch)({path:t});yield Qo(e,r)}catch(e){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving the summary of disputes.","woocommerce-payments"))}}const ca={SET_SETTINGS:"SET_SETTINGS",SET_SETTINGS_VALUES:"SET_SETTINGS_VALUES",SET_IS_SAVING_SETTINGS:"SET_IS_SAVING_SETTINGS",SET_SELECTED_PAYMENT_METHOD:"SET_SELECTED_PAYMENT_METHOD",SET_UNSELECTED_PAYMENT_METHOD:"SET_UNSELECTED_PAYMENT_METHOD"},ua={isDirty:!1,isSaving:!1,savingError:null,data:{}},la={},da=[],pa=e=>e&&e.settings||la,ma=e=>pa(e).data||la,ya=e=>ma(e).duplicated_payment_method_ids||la,_a=e=>ma(e).is_wcpay_enabled||!1,ha=e=>ma(e).enabled_payment_method_ids||da,fa=e=>ma(e).available_payment_method_ids||da,ga=e=>ma(e).payment_method_statuses||la,Sa=e=>pa(e).isSaving||!1,Ea=e=>pa(e).isDirty||!1,va=e=>ma(e).account_statement_descriptor||"",wa=e=>ma(e).account_statement_descriptor_kanji||"",ba=e=>ma(e).account_statement_descriptor_kana||"",Ta=e=>ma(e).account_business_support_email||"",Ra=e=>ma(e).account_business_support_phone||"",Oa=e=>ma(e).account_domestic_currency||"",Aa=e=>ma(e).deposit_schedule_interval||"",Ia=e=>ma(e).deposit_schedule_weekly_anchor||"",Ca=e=>ma(e).deposit_schedule_monthly_anchor||"",Na=e=>ma(e).deposit_delay_days||"7",Da=e=>ma(e).deposit_completed_waiting_period||!1,Pa=e=>ma(e).deposit_status||"",Fa=e=>ma(e).deposit_restrictions||"",Ma=e=>ma(e).is_manual_capture_enabled||!1,xa=e=>ma(e).is_test_mode_enabled||!1,ka=e=>ma(e).is_test_mode_onboarding||!1,Ua=e=>ma(e).is_dev_mode_enabled||!1,La=e=>ma(e).is_payment_request_enabled||!1,ja=e=>ma(e).is_debug_log_enabled||!1,za=e=>ma(e).is_multi_currency_enabled||!1,$a=e=>ma(e).payment_request_enabled_locations||da,qa=e=>ma(e).payment_request_button_type||"",Ya=e=>ma(e).payment_request_button_size||"",Ba=e=>ma(e).payment_request_button_theme||"",Wa=e=>{const t=ma(e)?.payment_request_button_border_radius;return 0===t||"0"===t||t?t:"undefined"==typeof wcpaySettings?4:parseInt(window?.wcpaySettings?.defaultExpressCheckoutBorderRadius||4,10)},Ha=e=>ma(e).is_saved_cards_enabled||!1,Va=e=>pa(e).savingError,Ga=e=>ma(e).is_card_present_eligible||!1,Qa=e=>ma(e).is_wcpay_subscriptions_enabled||!1,Za=e=>ma(e).is_wcpay_subscriptions_eligible||!1,Ka=e=>ma(e).is_subscriptions_plugin_active||!1,Xa=e=>ma(e).is_woopay_enabled||!1,Ja=e=>ma(e).is_woopay_global_theme_support_enabled||!1,ei=e=>ma(e).woopay_custom_message||"",ti=e=>ma(e).woopay_store_logo||"",ri=e=>ma(e).woopay_enabled_locations||da,ni=e=>ma(e).current_protection_level||"basic",oi=e=>ma(e).advanced_fraud_protection_settings||da,ai=e=>ma(e).show_woopay_incompatibility_notice||!1,ii=e=>ma(e).is_stripe_billing_enabled||!1,si=e=>ma(e).is_migrating_stripe_billing||!1,ci=e=>ma(e).stripe_billing_subscription_count||0,ui=e=>ma(e).stripe_billing_migrated_count||0,li=window.wp.apiFetch;var di=r.n(li);function pi(e){return{type:ca.SET_SETTINGS_VALUES,payload:e}}function mi(e){return pi({is_saved_cards_enabled:e})}function yi(e){return pi({is_card_present_eligible:e})}function _i(e){return pi({payment_request_button_type:e})}function hi(e){return pi({payment_request_button_size:e})}function fi(e){return pi({payment_request_button_theme:e})}function gi(e){return pi({payment_request_button_border_radius:e})}function Si(e){return{type:ca.SET_SETTINGS,data:e}}function Ei(e){return pi({is_wcpay_enabled:e})}function vi(e){return pi({is_payment_request_enabled:e})}function wi(e){return pi({enabled_payment_method_ids:[...e]})}function bi(e,t){return{type:ca.SET_IS_SAVING_SETTINGS,isSaving:e,error:t}}function Ti(e){return{type:ca.SET_SELECTED_PAYMENT_METHOD,id:e}}function Ri(e){return{type:ca.SET_UNSELECTED_PAYMENT_METHOD,id:e}}function Oi(e){return pi({is_manual_capture_enabled:e})}function Ai(e){return pi({is_test_mode_enabled:e})}function Ii(e){return pi({is_debug_log_enabled:e})}function Ci(e){return pi({is_multi_currency_enabled:e})}function Ni(e){return pi({is_wcpay_subscriptions_enabled:e})}function Di(e){return pi({account_statement_descriptor:e})}function Pi(e){return pi({account_statement_descriptor_kanji:e})}function Fi(e){return pi({account_statement_descriptor_kana:e})}function Mi(e){return pi({account_business_support_email:e})}function xi(e){return pi({account_business_support_phone:e})}function ki(e){return pi({deposit_schedule_interval:e})}function Ui(e){return pi({deposit_schedule_weekly_anchor:e})}function Li(e){return pi({deposit_schedule_monthly_anchor:""===e?null:parseInt(e,10)})}function*ji(){let e=null;try{const e=(0,Yr.select)(Hr).getSettings();yield bi(!0,null);const t=yield(0,Br.apiFetch)({path:`${Wr}/settings`,method:"post",data:e});yield pi({payment_method_statuses:t.data.payment_method_statuses}),yield(0,Yr.dispatch)("core/notices").createSuccessNotice((0,X.__)("Settings saved.","woocommerce-payments"))}catch(t){e=t,yield(0,Yr.dispatch)("core/notices").createErrorNotice((0,X.__)("Error saving settings.","woocommerce-payments")),e.server_error&&(yield(0,Yr.dispatch)("core/notices").createErrorNotice(e.server_error))}finally{yield bi(!1,e)}return null===e}function zi(e){return pi({payment_request_enabled_locations:[...e]})}function $i(e){return pi({is_woopay_enabled:e})}function qi(e){return pi({is_woopay_global_theme_support_enabled:e})}function Yi(e){return pi({woopay_custom_message:e})}function Bi(e){return pi({woopay_store_logo:e})}function Wi(e){return pi({woopay_enabled_locations:[...e]})}function Hi(e){return pi({current_protection_level:e})}function Vi(e){return pi({advanced_fraud_protection_settings:e})}function Gi(e){return pi({is_stripe_billing_enabled:e})}function*Qi(){try{yield(0,Yr.dispatch)(Hr).startResolution("scheduleStripeBillingMigration"),yield(0,Br.apiFetch)({path:`${Wr}/settings/schedule-stripe-billing-migration`,method:"post"})}catch(e){yield(0,Yr.dispatch)("core/notices").createErrorNotice((0,X.__)("Error starting the Stripe Billing migration.","woocommerce-payments"))}yield(0,Yr.dispatch)(Hr).finishResolution("scheduleStripeBillingMigration")}function Zi(e,t){di()({path:`${Wr}/settings/${e}`,method:"post",data:{value:t}}).catch((()=>{(0,Yr.dispatch)("core/notices").createErrorNotice((0,X.__)("Error saving option","woocommerce-payments"))}))}function*Ki(){const e=`${Wr}/settings`;try{const t=yield(0,Br.apiFetch)({path:e});yield Si(t)}catch(e){yield(0,Yr.dispatch)("core/notices").createErrorNotice((0,X.__)("Error retrieving settings.","woocommerce-payments"))}}const Xi={SET_CARD_READER_STATS:"SET_CARD_READER_STATS",SET_ERROR_FOR_CARD_READER_STATS:"SET_ERROR_FOR_CARD_READER_STATS",SET_READERS:"SET_READERS",SET_ERROR_FOR_CARD_READERS:"SET_ERROR_FOR_CARD_READERS"},Ji=(e,t)=>e.readers[t]&&e.readers[t].data?e.readers[t].data:{},es=(e,t)=>e.readers[t]&&e.readers[t].error?e.readers[t].error:{},ts=e=>e.readers&&e.readers.list?e.readers.list:{};function rs(e,t){return{type:Xi.SET_CARD_READER_STATS,id:e,data:t}}function ns(e,t){return{type:Xi.SET_READERS,query:e,data:t}}function os(e,t,r){return{type:Xi.SET_CARD_ERROR_FOR_READER_STATS,id:e,data:t,error:r}}function as(e,t){return{type:Xi.SET_CARD_ERROR_FOR_READERS,data:e,error:t}}function*is(e,t){try{const r=yield(0,Br.apiFetch)({path:`${Wr}/readers/charges/${t}`});yield rs(e,r)}catch(t){yield os(e,null,t)}}function*ss(e){const t=(0,hn.addQueryArgs)(`${Wr}/readers`,{limit:e.limit});try{const r=yield(0,Br.apiFetch)({path:t})||{};yield ns(e,r)}catch(e){yield as(null,e)}}var cs;!function(e){e.SET_ACTIVE_LOAN_SUMMARY="SET_ACTIVE_LOAN_SUMMARY",e.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY="SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY",e.SET_LOANS="SET_LOANS",e.SET_ERROR_FOR_LOANS="SET_ERROR_FOR_LOANS"}(cs||(cs={}));const us=cs,ls={},ds=e=>e&&e.capital||{},ps=e=>ds(e).summary,ms=e=>ds(e).summaryError,ys=e=>ds(e).loans||[],_s=e=>ds(e).loansError;function hs(e){return{type:us.SET_ACTIVE_LOAN_SUMMARY,data:e}}function fs(e){return{type:us.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY,error:e}}function gs(e){return{type:us.SET_LOANS,data:e.data}}function Ss(e){return{type:us.SET_ERROR_FOR_LOANS,error:e}}function*Es(){const e=`${Wr}/capital/active_loan_summary`;try{const t=yield(0,Br.apiFetch)({path:e});yield hs(t)}catch(e){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield fs(e)}}function*vs(){const e=`${Wr}/capital/loans`;try{const t=yield(0,Br.apiFetch)({path:e});yield gs(t)}catch(e){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield Ss(e)}}const ws={SET_DOCUMENTS:"SET_DOCUMENTS",SET_ERROR_FOR_DOCUMENTS:"SET_ERROR_FOR_DOCUMENTS",SET_DOCUMENTS_SUMMARY:"SET_DOCUMENTS_SUMMARY",SET_ERROR_FOR_DOCUMENTS_SUMMARY:"SET_ERROR_FOR_DOCUMENTS_SUMMARY"},bs={summary:{}},Ts=e=>e&&e.documents||{},Rs=(e,t)=>{const r=Gr(t);return Ts(e)[r]||{}},Os=(e,t)=>Rs(e,t).data||[],As=(e,t)=>Rs(e,t).error||{},Is=(e,t)=>{const r=Gr(t);return Ts(e).summary[r]||{}},Cs=(e,t)=>Is(e,t).data||{},Ns=(e,t)=>Is(e,t).error||{};function Ds(e,t){return{type:ws.SET_DOCUMENTS,query:e,data:t}}function Ps(e,t,r){return{type:ws.SET_ERROR_FOR_DOCUMENTS,query:e,data:t,error:r}}function Fs(e,t){return{type:ws.SET_DOCUMENTS_SUMMARY,query:e,data:t}}function Ms(e,t,r){return{type:ws.SET_ERROR_FOR_DOCUMENTS_SUMMARY,query:e,data:t,error:r}}const xs=e=>({user_email:e.userEmail,match:e.match,date_before:vn(e.dateBefore,!0),date_after:vn(e.dateAfter),date_between:e.dateBetween&&[vn(e.dateBetween[0]),vn(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot});function*ks(e){const t=(0,hn.addQueryArgs)(`${Wr}/documents`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...xs(e)});try{const r=yield(0,Br.apiFetch)({path:t});yield Ds(e,r.data||[])}catch(t){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving documents.","woocommerce-payments")),yield Ps(e,null,t)}}function*Us(e){const t=(0,hn.addQueryArgs)(`${Wr}/documents/summary`,xs(e));try{const r=yield(0,Br.apiFetch)({path:t});yield Fs(e,r)}catch(t){yield Ms(e,null,t)}}const Ls={},js=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},zs=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}},$s={SET_AUTHORIZATIONS:"SET_AUTHORIZATIONS",SET_AUTHORIZATION:"SET_AUTHORIZATION",SET_ERROR_FOR_AUTHORIZATIONS:"SET_ERROR_FOR_AUTHORIZATIONS",SET_AUTHORIZATIONS_SUMMARY:"SET_AUTHORIZATIONS_SUMMARY",SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:"SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY",SET_IS_REQUESTING_AUTHORIZATION:"SET_IS_REQUESTING_AUTHORIZATION"},qs={summary:{},byId:{},isRequesting:!1},Ys=e=>e&&e.authorizations||{},Bs=(e,t)=>{const r=Gr(t);return Ys(e)[r]||{}},Ws=(e,t)=>Bs(e,t).data||[],Hs=(e,t)=>(Ys(e).byId||{})[t],Vs=(e,t)=>Bs(e,t).error||{},Gs=(e,t)=>{const r=Gr(t);return Ys(e).summary[r]||{}},Qs=(e,t)=>Gs(e,t).data||{},Zs=(e,t)=>Gs(e,t).error||{},Ks=e=>Ys(e).isRequesting,Xs=e=>{var t;const r={wcpay_missing_order:(0,X.__)("The order could not be found.","woocommerce-payments"),wcpay_refunded_order_uncapturable:(0,X.__)("Payment cannot be processed for partially or fully refunded orders.","woocommerce-payments"),wcpay_intent_order_mismatch:(0,X.__)("The payment cannot be processed due to a mismatch with order details.","woocommerce-payments"),wcpay_payment_uncapturable:(0,X.__)("This payment cannot be processed in its current state.","woocommerce-payments"),wcpay_capture_error:e=>{var t;return"amount_too_small"===(null===(t=e.data)||void 0===t?void 0:t.error_type)?(e=>{var t,r,n,o;if(!(null===(r=null===(t=e.data)||void 0===t?void 0:t.extra_details)||void 0===r?void 0:r.minimum_amount)||!(null===(o=null===(n=e.data)||void 0===n?void 0:n.extra_details)||void 0===o?void 0:o.minimum_amount_currency))return(0,X.__)("The payment amount is too small to be processed.","woocommerce-payments");const a=e.data.extra_details.minimum_amount_currency,i=mn(e.data.extra_details.minimum_amount,a);return(0,X.sprintf)((0,X.__)("The minimum amount that can be processed is %1$s %2$s.","woocommerce-payments"),i,a.toUpperCase())})(e):(0,X.__)("The payment capture failed to complete.","woocommerce-payments")},wcpay_cancel_error:(0,X.__)("The payment cancellation failed to complete.","woocommerce-payments"),wcpay_server_error:(0,X.__)("An unexpected error occurred. Please try again later.","woocommerce-payments")},n=r[null!==(t=e.code)&&void 0!==t?t:""];return"function"==typeof n?n(e):null!=n?n:(0,X.__)("Unable to process the payment. Please try again later.","woocommerce-payments")};function Js(e,t){return{type:$s.SET_AUTHORIZATIONS,data:t,query:e}}function ec(e,t){return{type:$s.SET_ERROR_FOR_AUTHORIZATIONS,query:e,error:t}}function tc(e){return{type:$s.SET_AUTHORIZATION,data:e}}function rc(e,t){return{type:$s.SET_AUTHORIZATIONS_SUMMARY,data:t,query:e}}function nc(e){return{type:$s.SET_IS_REQUESTING_AUTHORIZATION,data:e}}function*oc(e,t){try{yield Yr.controls.dispatch(Hr,"startResolution","getAuthorization",[e]),yield Yr.controls.dispatch(Hr,"setIsRequestingAuthorization",!0);const r=yield(0,Br.apiFetch)({path:`/wc/v3/payments/orders/${t}/capture_authorization`,method:"post",data:{payment_intent_id:e}}),n={payment_intent_id:r.id,captured:"succeeded"===r.status};yield tc(n),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getAuthorizations"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getTimeline"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getTransactions"),yield Yr.controls.dispatch("core/notices","createSuccessNotice",(0,X.sprintf)((0,X.__)("Payment for order #%s captured successfully.","woocommerce-payments"),t))}catch(e){const r=(0,X.sprintf)((0,X.__)("There has been an error capturing the payment for order #%s.","woocommerce-payments"),t),n=Xs(e);yield Yr.controls.dispatch("core/notices","createErrorNotice",`${r} ${n}`)}finally{yield Yr.controls.dispatch(Hr,"finishResolution","getAuthorization",[e]),yield Yr.controls.dispatch(Hr,"setIsRequestingAuthorization",!1)}}function*ac(e,t){try{yield Yr.controls.dispatch(Hr,"startResolution","getAuthorization",[e]),yield Yr.controls.dispatch(Hr,"setIsRequestingAuthorization",!0);const r=yield(0,Br.apiFetch)({path:`/wc/v3/payments/orders/${t}/cancel_authorization`,method:"post",data:{payment_intent_id:e}}),n={payment_intent_id:r.id,captured:"succeeded"===r.status};yield tc(n),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getAuthorizations"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getTimeline"),yield Yr.controls.dispatch(Hr,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield Yr.controls.dispatch("core/notices","createSuccessNotice",(0,X.sprintf)((0,X.__)("Payment for order #%s canceled successfully.","woocommerce-payments"),t))}catch(e){const r=(0,X.sprintf)((0,X.__)("There has been an error canceling the payment for order #%s.","woocommerce-payments"),t),n=Xs(e);yield Yr.controls.dispatch("core/notices","createErrorNotice",`${r} ${n}`)}finally{yield Yr.controls.dispatch(Hr,"finishResolution","getAuthorization",[e]),yield Yr.controls.dispatch(Hr,"setIsRequestingAuthorization",!1)}}function ic(e,t){return{type:$s.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY,query:e,error:t}}function*sc(e){var t;let{paged:r=1,per_page:n=25,orderby:o="created",order:a="asc"}=e;"capture_by"===o&&(o="created");const i=(0,hn.addQueryArgs)(`${Wr}/authorizations`,{page:r,pagesize:n,sort:o,direction:a});try{const r=yield(0,Br.apiFetch)({path:i});yield Js(e,null!==(t=r.data)&&void 0!==t?t:[])}catch(t){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield ec(e,t)}}function*cc(e){try{if(e){const t=yield(0,Br.apiFetch)({path:`${Wr}/authorizations/${e}`}),{is_captured:r,payment_intent_id:n,created:o}=t;yield tc({payment_intent_id:n,captured:r,created:o})}}catch(e){"authorization_missing"!==e.code&&(yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving authorization.","woocommerce-payments")))}}function*uc(e){const t=(0,hn.addQueryArgs)(`${Wr}/authorizations/summary`,{pagesize:e.per_page,sort:e.orderby,direction:e.order,page:e.paged});try{const r=yield(0,Br.apiFetch)({path:t});yield rc(e,null!=r?r:[])}catch(t){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield ic(e,t)}}var lc;!function(e){e.SET_FILE="SET_FILE",e.SET_ERROR_FOR_FILES="SET_ERROR_FOR_FILES"}(lc||(lc={}));const dc=lc,pc={},mc=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},yc=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}};function _c(e,t){return{type:dc.SET_FILE,id:e,data:t}}function hc(e,t){return{type:dc.SET_ERROR_FOR_FILES,id:e,error:t}}function*fc(e){try{const t=yield(0,Br.apiFetch)({path:`${Wr}/file/${e}/details`});yield _c(e,t)}catch(t){yield Yr.controls.dispatch("core/notices","createErrorNotice",(0,X.__)("Error retrieving file.","woocommerce-payments")),yield hc(e,t)}}function gc(e){var t,r,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(r=gc(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}(0,Yr.registerStore)(Hr,{reducer:(0,Yr.combineReducers)({deposits:(e=Qr,{type:t,query:r={},data:n=[],error:o})=>{const a=Gr(r);switch(t){case Vr.SET_DEPOSIT:return{...e,byId:{...e.byId,[n.id]:n}};case Vr.SET_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,data:n}};case Vr.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,error:o}};case Vr.SET_DEPOSITS:return{...e,byId:{...e.byId,...(0,W.keyBy)(n,"id")},queries:{...e.queries,[a]:{data:(0,W.map)(n,"id")}}};case Vr.SET_DEPOSITS_COUNT:return{...e,count:n};case Vr.SET_ERROR_FOR_DEPOSIT_QUERY:return{...e,queries:{...e.queries,[a]:{error:o}}};case Vr.SET_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:n}}};case Vr.SET_ERROR_FOR_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:o}}};case Vr.SET_INSTANT_DEPOSIT:return{...e,instant:{...e.instant,data:n}}}return e},transactions:(e=zn,{type:t,query:r={},data:n=[],error:o,status:a})=>{const i=Gr(r);switch(t){case jn.SET_TRANSACTIONS:return{...e,[i]:{data:n}};case jn.SET_ERROR_FOR_TRANSACTIONS:return{...e,[i]:{error:o}};case jn.SET_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[i]:{data:n}}};case jn.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[i]:{error:o}}};case jn.SET_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[i]:{data:n}}}};case jn.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[i]:{error:o}}}};case jn.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[i]:{data:n}}}}};case jn.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[i]:{error:o}}}}}}return e},charges:(e={},{type:t,id:r,data:n,error:o})=>{switch(t){case fo.SET_CHARGE:e={...e,[r]:{...e[r],data:n}};break;case fo.SET_ERROR_FOR_CHARGE:e={...e,[r]:{...e[r],error:o}}}return e},timeline:(e={},{type:t,id:r,data:n,error:o})=>{switch(t){case Oo.SET_TIMELINE:e={...e,[r]:{data:n}};break;case Oo.SET_ERROR_FOR_TIMELINE:e={...e,[r]:{...e[r],error:o}}}return e},disputes:(e=Fo,{type:t,query:r={},data:n=[],id:o,error:a})=>{const i=Gr(r);switch(t){case Po.SET_DISPUTE:return{...e,byId:{...e.byId,[n.id]:n}};case Po.SET_ERROR_FOR_DISPUTE:e={...e,byId:{...e.byId,[o]:{error:a}}};break;case Po.SET_DISPUTES:return{...e,cached:{...e.cached,...(0,W.keyBy)(n,"dispute_id")},queries:{...e.queries,[i]:{data:(0,W.map)(n,"dispute_id")}}};case Po.SET_DISPUTES_SUMMARY:return{...e,summary:{...e.summary,[i]:{data:n}}}}return e},settings:(e=ua,{type:t,...r})=>{switch(t){case ca.SET_SETTINGS:return{...e,data:r.data,isDirty:!1};case ca.SET_SETTINGS_VALUES:return{...e,savingError:null,isDirty:!0,data:{...e.data,...r.payload}};case ca.SET_IS_SAVING_SETTINGS:return{...e,isDirty:!(!r.isSaving&&!r.error)&&e.isDirty,isSaving:r.isSaving,savingError:r.error};case ca.SET_SELECTED_PAYMENT_METHOD:return{...e,isDirty:!0,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.concat(r.id)}};case ca.SET_UNSELECTED_PAYMENT_METHOD:return{...e,isDirty:!0,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.filter((e=>e!==r.id))}}}return e},readers:(e={},{type:t,id:r,data:n,error:o})=>{switch(t){case Xi.SET_CARD_READER_STATS:e={...e,[r]:{...e[r],data:n}};break;case Xi.SET_ERROR_FOR_CARD_READER_STATS:e={...e,[r]:{...e[r],error:o}};break;case Xi.SET_READERS:e={...e,list:n}}return e},capital:(e=ls,t)=>{switch(t.type){case us.SET_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:t.data,summaryError:void 0});case us.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:void 0,summaryError:t.error});case us.SET_LOANS:return Object.assign(Object.assign({},e),{loans:t.data,loansError:void 0});case us.SET_ERROR_FOR_LOANS:return Object.assign(Object.assign({},e),{loans:void 0,loansError:t.error})}return e},documents:(e=bs,{type:t,query:r={},data:n=[],error:o})=>{const a=Gr(r);switch(t){case ws.SET_DOCUMENTS:return{...e,[a]:{data:n}};case ws.SET_ERROR_FOR_DOCUMENTS:return{...e,[a]:{error:o}};case ws.SET_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:n}}};case ws.SET_ERROR_FOR_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:o}}}}return e},paymentIntents:(e=Ls,t)=>{const{type:r,id:n}=t;switch(r){case $o.SET_PAYMENT_INTENT:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{data:t.data})});case $o.SET_ERROR_FOR_PAYMENT_INTENT:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{error:t.error})});default:return e}},authorizations:(e=qs,t)=>{switch(t.type){case $s.SET_AUTHORIZATION:{const{data:r}=t;return Object.assign(Object.assign({},e),{byId:Object.assign(Object.assign({},e.byId),{[r.payment_intent_id]:Object.assign(Object.assign({},e.byId[r.payment_intent_id]),r)})})}case $s.SET_AUTHORIZATIONS:{const{data:r,query:n}=t;return Object.assign(Object.assign({},e),{[Gr(n)]:{data:r}})}case $s.SET_ERROR_FOR_AUTHORIZATIONS:{const{error:r,query:n}=t;return Object.assign(Object.assign({},e),{[Gr(n)]:{error:r}})}case $s.SET_AUTHORIZATIONS_SUMMARY:{const{data:r,query:n}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[Gr(n)]:{data:r||{}}})})}case $s.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:{const{query:r,error:n}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[Gr(r)]:{error:n||""}})})}case $s.SET_IS_REQUESTING_AUTHORIZATION:{const{data:r}=t;return Object.assign(Object.assign({},e),{isRequesting:r})}}return e},files:(e=pc,t)=>{const{type:r,id:n}=t;switch(r){case dc.SET_FILE:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{data:t.data})});case dc.SET_ERROR_FOR_FILES:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{error:t.error})});default:return e}}}),actions:{...t,...a,...c,...d,...h,...S,...w,...R,...I,...y,...P,...x},controls:Br.controls,selectors:{...e,...o,...s,...l,...m,...g,...v,...T,...A,...N,...D,...M},resolvers:{...n,...i,...u,...p,...f,...E,...b,...O,...C,..._,...F,...k}});const Sc=function(){for(var e,t,r=0,n="",o=arguments.length;r<o;r++)(e=arguments[r])&&(t=gc(e))&&(n&&(n+=" "),n+=t);return n};var Ec=r(4848);const vc=({Icon:e,label:t})=>e?(0,Ec.jsxs)("span",{className:Sc("woocommerce-payments__payment-method-icon"),children:[(0,Ec.jsx)(e,{}),t&&(0,Ec.jsx)("span",{className:"woocommerce-payments__payment-method-icon__label",children:t})]}):null;var bc=r(9387);const Tc=({hasBorder:e,icon:t=()=>null})=>L().createElement("div",{className:"payment-delete-illustration__wrapper"},L().createElement("div",{className:"payment-delete-illustration__illustrations"},L().createElement(t,{className:Sc("payment-delete-illustration__payment-icon",{"has-border":e})}),L().createElement(bc.A,{className:"payment-delete-illustration__payment-cross-icon"}))),Rc=r.p+"../assets/images/cards/woo-card.svg?ver=937562a736e3127af927",Oc=window.wp.keycodes,Ac=(0,q.createElement)(Z.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,q.createElement)(Z.Path,{d:"M12 13.06l3.712 3.713 1.061-1.06L13.061 12l3.712-3.712-1.06-1.06L12 10.938 8.288 7.227l-1.061 1.06L10.939 12l-3.712 3.712 1.06 1.061L12 13.061z"})),Ic=new Set(["alert","status","log","marquee","timer"]);let Cc=[],Nc=!1;let Dc=0;const Pc=(0,q.forwardRef)((function e(t,r){const{bodyOpenClassName:n="modal-open",role:o="dialog",title:a=null,focusOnMount:i=!0,shouldCloseOnEsc:s=!0,shouldCloseOnClickOutside:c=!0,isDismissible:u=!0,aria:l={labelledby:null,describedby:null},onRequestClose:d,icon:p,closeButtonLabel:m,children:y,style:_,overlayClassName:h,className:f,contentLabel:g,onKeyDown:S,isFullScreen:E=!1,__experimentalHideHeader:v=!1}=t,w=(0,q.useRef)(),b=(0,G.useInstanceId)(e),T=a?`components-modal-header-${b}`:l.labelledby,R=(0,G.useFocusOnMount)(i),O=(0,G.useConstrainedTabbing)(),A=(0,G.useFocusReturn)(),I=(0,G.__experimentalUseFocusOutside)(d);return(0,q.useEffect)((()=>(Dc++,1===Dc&&(function(e){if(Nc)return;const t=document.body.children;(0,W.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||Ic.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),Cc.push(t))})),Nc=!0}(w.current),document.body.classList.add(n)),()=>{Dc--,0===Dc&&(document.body.classList.remove(n),Nc&&((0,W.forEach)(Cc,(e=>{e.removeAttribute("aria-hidden")})),Cc=[],Nc=!1))})),[]),(0,q.createPortal)((0,q.createElement)("div",{ref:(0,G.useMergeRefs)([w,r]),className:B()("components-modal__screen-overlay",h),onKeyDown:function(e){s&&e.keyCode===Oc.ESCAPE&&!e.defaultPrevented&&(e.preventDefault(),d&&d(e))}},(0,q.createElement)(qt,{document},(0,q.createElement)("div",$({className:B()("components-modal__frame",f,{"is-full-screen":E}),style:_,ref:(0,G.useMergeRefs)([O,A,R]),role:o,"aria-label":g,"aria-labelledby":g?null:T,"aria-describedby":l.describedby,tabIndex:"-1"},c?I:{},{onKeyDown:S}),(0,q.createElement)("div",{className:B()("components-modal__content",{"hide-header":v}),role:"document"},!v&&(0,q.createElement)("div",{className:"components-modal__header"},(0,q.createElement)("div",{className:"components-modal__header-heading-container"},p&&(0,q.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},p),a&&(0,q.createElement)("h1",{id:T,className:"components-modal__header-heading"},a)),u&&(0,q.createElement)(jr,{onClick:d,icon:Ac,label:m||(0,X.__)("Close dialog")})),y)))),document.body)}));const Fc=e=>{var{children:t,actions:r,className:n}=e,o=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(e,["children","actions","className"]);return L().createElement(Pc,Object.assign({className:Sc("wcpay-confirmation-modal",n)},o),t,L().createElement(Z.HorizontalRule,{className:"wcpay-confirmation-modal__separator"}),L().createElement("div",{className:"wcpay-confirmation-modal__footer"},r))},Mc=r.p+"../assets/images/payment-methods/jcb.svg?ver=3351f2584f4a62ad094d",xc=r.p+"../assets/images/cards/visa.svg?ver=f10d76e13a47cb867cca",kc=r.p+"../assets/images/cards/mastercard.svg?ver=d21057587f14a719da45",Uc=r.p+"../assets/images/cards/amex.svg?ver=9035aad80e3ae7ac653c",Lc=r.p+"../assets/images/payment-methods/woo.svg?ver=86a2411c2b2a56f57bc5",jc=r.p+"../assets/images/payment-methods/woo-short.svg?ver=e7eb126add68e8fde2b6",zc=r.p+"../assets/images/cards/apple-pay.svg?ver=126e07a26632bc8a9c21",$c=r.p+"../assets/images/cards/google-pay.svg?ver=30aba48019e36097a19d",qc=r.p+"../assets/images/cards/diners.svg?ver=62451ea54fcf12af5e0d",Yc=r.p+"../assets/images/cards/discover.svg?ver=a19341de516c258e11fe",Bc=r.p+"../assets/images/cards/cb.svg?ver=375fa3d816484fa4b53c",Wc=r.p+"../assets/images/cards/unionpay.svg?ver=e60ed9d9db08315ff5c9",Hc=r.p+"../assets/images/payment-methods/link.svg?ver=2af3c660d8ddc95442bb";const Vc=(e,t,r=!0)=>n=>{var{className:o}=n,a=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r}(n,["className"]);return L().createElement("img",Object.assign({className:Sc("payment-method__icon",r?"":"no-border",o),src:e,alt:t},a))},Gc=(Vc(Uc,(0,X.__)("American Express","woocommerce-payments")),Vc(zc,(0,X.__)("Apple Pay","woocommerce-payments"))),Qc=(Vc(Bc,(0,X.__)("Cartes Bancaires","woocommerce-payments")),Vc(qc,(0,X.__)("Diners Club","woocommerce-payments")),Vc(Yc,(0,X.__)("Discover","woocommerce-payments")),Vc($c,(0,X.__)("Google Pay","woocommerce-payments"))),Zc=Vc(Mc,(0,X.__)("JCB","woocommerce-payments")),Kc=Vc(Hc,(0,X.__)("Link","woocommerce-payments")),Xc=(Vc(kc,(0,X.__)("Mastercard","woocommerce-payments")),Vc(Wc,(0,X.__)("UnionPay","woocommerce-payments")),Vc(xc,(0,X.__)("Visa","woocommerce-payments")),Vc(Lc,(0,X.__)("WooPay","woocommerce-payments"),!1),Vc(jc,(0,X.__)("WooPay","woocommerce-payments"),!1));if("undefined"==typeof wooPaymentsPaymentMethodDefinitions)throw new Error("wooPaymentsPaymentMethodDefinitions is undefined");const Jc=Object.keys(wooPaymentsPaymentMethodDefinitions).reduce(((e,t)=>(e[t]=Object.assign(Object.assign({},wooPaymentsPaymentMethodDefinitions[t]),{icon:({className:e})=>L().createElement("img",{src:wooPaymentsPaymentMethodDefinitions[t].settings_icon_url,alt:wooPaymentsPaymentMethodDefinitions[t].label,className:Sc("payment-method__icon",e)})}),e)),{jcb:{id:"jcb",label:(0,X.__)("JCB","woocommerce-payments"),description:(0,X.__)("Let your customers pay with JCB, the only international payment brand based in Japan.","woocommerce-payments"),icon:Zc,currencies:["JPY"],stripe_key:"jcb_payments",allows_manual_capture:!1,allows_pay_later:!1,accepts_only_domestic_payment:!1,settings_icon_url:""}}),eu=({onClose:e,onConfirm:t})=>{const[r]=(()=>{const{updateEnabledPaymentMethodIds:e}=(0,Yr.useDispatch)(Hr);return[(0,Yr.useSelect)((e=>e(Hr).getEnabledPaymentMethodIds())),e]})(),[n]=(()=>{const{updateIsWooPayEnabled:e}=(0,Yr.useDispatch)(Hr);return[(0,Yr.useSelect)((e=>e(Hr).getIsWooPayEnabled())),e]})(),[o]=(()=>{const{updateIsPaymentRequestEnabled:e}=(0,Yr.useDispatch)(Hr);return[(0,Yr.useSelect)((e=>e(Hr).getIsPaymentRequestEnabled())),e]})(),a=Boolean(r.find((e=>"link"===e)));return(0,Ec.jsxs)(Fc,{title:(0,X.sprintf)((0,X.__)("Disable %s","woocommerce-payments"),"WooPayments"),onRequestClose:e,actions:(0,Ec.jsxs)(Ec.Fragment,{children:[(0,Ec.jsx)(jr,{onClick:t,isPrimary:!0,isDestructive:!0,children:"Disable"}),(0,Ec.jsx)(jr,{onClick:e,isSecondary:!0,children:"Cancel"})]}),children:[(0,Ec.jsx)(Tc,{icon:e=>(0,Ec.jsx)("img",{src:Rc,alt:"WooCard",...e})}),(0,Ec.jsx)("p",{children:qr({mixedString:(0,X.sprintf)((0,X.__)("%s is currently powering multiple popular payment methods on your store. Without it, they will no longer be available to your customers, which may influence sales.","woocommerce-payments"),"WooPayments"),components:{strong:(0,Ec.jsx)("strong",{})}})}),(0,Ec.jsx)("p",{children:(0,X.sprintf)((0,X.__)("Payment methods that need %s:","woocommerce-payments"),"WooPayments")}),(0,Ec.jsxs)("ul",{className:"disable-confirmation-modal__payment-methods-list",children:[r.filter((e=>"link"!==e)).map((e=>(0,Ec.jsx)("li",{children:(0,Ec.jsx)(vc,{Icon:Jc[e].icon,label:Jc[e].label})},e))),o&&(0,Ec.jsxs)(Ec.Fragment,{children:[(0,Ec.jsx)("li",{children:(0,Ec.jsx)(vc,{Icon:Qc,label:(0,X.__)("Google Pay","woocommerce-payments")})}),(0,Ec.jsx)("li",{children:(0,Ec.jsx)(vc,{Icon:Gc,label:(0,X.__)("Apple Pay","woocommerce-payments")})})]}),a&&(0,Ec.jsx)("li",{children:(0,Ec.jsx)(vc,{Icon:Kc,label:(0,X.__)("Link by Stripe","woocommerce-payments")})}),n&&(0,Ec.jsx)("li",{children:(0,Ec.jsx)(vc,{Icon:Xc,label:(0,X.__)("WooPay","woocommerce-payments")})})]}),(0,Ec.jsx)("p",{className:"no-padding",children:qr({mixedString:(0,X.sprintf)((0,X.__)("{{strong}}Need help?{{/strong}} Learn more about {{wooCommercePaymentsLink}}%s{{/wooCommercePaymentsLink}} or {{contactSupportLink}}contact WooCommerce Support{{/contactSupportLink}}.","woocommerce-payments"),"WooPayments"),components:{strong:(0,Ec.jsx)("strong",{}),wooCommercePaymentsLink:(0,Ec.jsx)("a",{href:"https://woocommerce.com/document/woopayments/"}),contactSupportLink:(0,Ec.jsx)("a",{href:"https://woocommerce.com/my-account/create-a-ticket/?select=5278104"})}})})]})},tu=()=>{(()=>{const{saveSettings:e}=(0,Yr.useDispatch)(Hr);(0,Yr.useSelect)((e=>e(Hr).isSavingSettings())),(0,Yr.useSelect)((e=>e(Hr).isDirty()));(0,Yr.useSelect)((e=>{e(Hr).getSettings();const t=e(Hr).isResolving("getSettings"),r=e(Hr).hasFinishedResolution("getSettings");return t||!r}))})();const[e,t]=(0,U.useState)(!1),r=(0,U.useRef)(!1),n=(0,U.useCallback)((()=>{t(!1),r.current=!0,jQuery('tr[data-gateway_id="woocommerce_payments"] .wc-payment-gateway-method-toggle-enabled').trigger("click"),((e,t={})=>{var r;if(window.wcpaySettings){Object.assign(t,{is_test_mode:wcpaySettings.testMode,jetpack_connected:wcpaySettings.isJetpackConnected,wcpay_version:wcpaySettings.version,woo_country_code:wcpaySettings.connect.country,hosting_provider:null===(r=wcpaySettings.trackingInfo)||void 0===r?void 0:r.hosting_provider});for(const e in t)void 0===t[e]&&delete t[e]}ln()((()=>{var r,n;(null!==(n=null===(r=null===wc||void 0===wc?void 0:wc.tracks)||void 0===r?void 0:r.recordEvent)&&void 0!==n?n:wcTracks.recordEvent)(e,t)}))})("wcpay_gateway_toggle",{action:"disable",context:"wc-payments-settings"})}),[t]),o=(0,U.useCallback)((()=>{t(!1)}),[t]);return(0,U.useEffect)((()=>{const e=(e,n,o)=>{!0!==r.current?woocommerce_admin.ajax_url===o.url&&o.data.includes("action=woocommerce_toggle_gateway_enabled")&&o.data.includes("gateway_id=woocommerce_payments")&&1!==jQuery('tr[data-gateway_id="woocommerce_payments"] .woocommerce-input-toggle--disabled').length&&(n.abort(),jQuery('tr[data-gateway_id="woocommerce_payments"] .woocommerce-input-toggle--loading').removeClass("woocommerce-input-toggle--loading"),t(!0)):r.current=!1};return jQuery(document).on("ajaxSend",e),()=>{jQuery(document).off("ajaxSend",e)}}),[]),e?(0,Ec.jsx)(eu,{onClose:o,onConfirm:n}):null},ru=document.getElementById("wcpay-payment-gateways-container");ru&&z().render((0,Ec.jsx)(tu,{}),ru)})()})();