HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: /var/www/html/bwcdev/wp-content/plugins/woocommerce-payments-old/dist/multi-currency.js
/*! For license information please see multi-currency.js.LICENSE.txt */
(()=>{var e={2485:(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];if(r){var a=typeof r;if("string"===a||"number"===a)e.push(r);else if(Array.isArray(r)){if(r.length){var s=o.apply(null,r);s&&e.push(s)}}else if("object"===a)if(r.toString===Object.prototype.toString)for(var i in r)n.call(r,i)&&r[i]&&e.push(i);else e.push(r.toString())}}return e.join(" ")}e.exports?(o.default=o,e.exports=o):void 0===(r=function(){return o}.apply(t,[]))||(e.exports=r)}()},9387:(e,t,r)=>{"use strict";t.A=function(e){var t=e.size,r=void 0===t?24:t,n=e.onClick,i=(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),l=["gridicon","gridicons-cross-circle",i,!1,!1,!1].filter(Boolean).join(" ");return o.default.createElement("svg",s({className:l,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 s(){return s=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},s.apply(this,arguments)}},4146:(e,t,r)=>{"use strict";var n=r(3404),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},i={};function c(e){return n.isMemo(e)?s:i[e.$$typeof]||o}i[n.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},i[n.Memo]=s;var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,m=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,y=Object.prototype;e.exports=function e(t,r,n){if("string"!=typeof r){if(y){var o=p(r);o&&o!==y&&e(t,o,n)}var s=u(r);d&&(s=s.concat(d(r)));for(var i=c(t),h=c(r),_=0;_<s.length;++_){var f=s[_];if(!(a[f]||n&&n[f]||h&&h[f]||i&&i[f])){var g=m(r,f);try{l(t,f,g)}catch(e){}}}}return t}},3072:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,i=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,u=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,m=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,y=r?Symbol.for("react.suspense_list"):60120,h=r?Symbol.for("react.memo"):60115,_=r?Symbol.for("react.lazy"):60116,f=r?Symbol.for("react.block"):60121,g=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,v=r?Symbol.for("react.scope"):60119;function S(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case u:case d:case a:case i:case s:case p:return e;default:switch(e=e&&e.$$typeof){case l:case m:case _:case h:case c:return e;default:return t}}case o:return t}}}function w(e){return S(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=l,t.ContextProvider=c,t.Element=n,t.ForwardRef=m,t.Fragment=a,t.Lazy=_,t.Memo=h,t.Portal=o,t.Profiler=i,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return w(e)||S(e)===u},t.isConcurrentMode=w,t.isContextConsumer=function(e){return S(e)===l},t.isContextProvider=function(e){return S(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return S(e)===m},t.isFragment=function(e){return S(e)===a},t.isLazy=function(e){return S(e)===_},t.isMemo=function(e){return S(e)===h},t.isPortal=function(e){return S(e)===o},t.isProfiler=function(e){return S(e)===i},t.isStrictMode=function(e){return S(e)===s},t.isSuspense=function(e){return S(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===i||e===s||e===p||e===y||"object"==typeof e&&null!==e&&(e.$$typeof===_||e.$$typeof===h||e.$$typeof===c||e.$$typeof===l||e.$$typeof===m||e.$$typeof===g||e.$$typeof===b||e.$$typeof===v||e.$$typeof===f)},t.typeOf=S},3404:(e,t,r)=>{"use strict";e.exports=r(3072)},8616:e=>{e.exports=function(e,t){var r,n,o=0;function a(){var a,s,i=r,c=arguments.length;e:for(;i;){if(i.args.length===arguments.length){for(s=0;s<c;s++)if(i.args[s]!==arguments[s]){i=i.next;continue e}return i!==r&&(i===n&&(n=i.prev),i.prev.next=i.next,i.next&&(i.next.prev=i.prev),i.next=r,i.prev=null,r.prev=i,r=i),i.val}i=i.next}for(a=new Array(c),s=0;s<c;s++)a[s]=arguments[s];return i={args:a,val:e.apply(null,a)},r?(r.prev=i,i.next=r):n=i,o===t.maxSize?(n=n.prev).next=null:o++,r=i,i.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,s,i=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 l in a=Object(arguments[c]))r.call(a,l)&&(i[l]=a[l]);if(t){s=t(a);for(var u=0;u<s.length;u++)n.call(a,s[u])&&(i[s[u]]=a[s[u]])}}return i}},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 s(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 i,c=[],l=!1,u=-1;function d(){l&&i&&(l=!1,i.length?c=i.concat(c):u=-1,c.length&&m())}function m(){if(!l){var e=s(d);l=!0;for(var t=c.length;t;){for(i=c,c=[];++u<t;)i&&i[u].run();u=-1,t=c.length}i=null,l=!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 p(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 p(e,t)),1!==c.length||l||s(m)},p.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 s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,i=Object.prototype.hasOwnProperty,c={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var n,a={},l=null,u=null;for(n in void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.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:l,ref:u,props:a,_owner:s.current}}t.jsx=l,t.jsxs=l},4848:(e,t,r)=>{"use strict";e.exports=r(1020)},1609:e=>{"use strict";e.exports=window.React}},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:()=>So,getAllDepositsOverviewsError:()=>wo,getDeposit:()=>vo,getDepositQueryError:()=>Oo,getDeposits:()=>To,getDepositsCount:()=>Ro,getDepositsSummary:()=>xo,getDepositsSummaryError:()=>Co,getInstantDeposit:()=>No});var t={};r.r(t),r.d(t,{submitInstantDeposit:()=>Xo,updateAllDepositsOverviews:()=>Ho,updateDeposit:()=>qo,updateDeposits:()=>Vo,updateDepositsCount:()=>Wo,updateDepositsSummary:()=>Qo,updateErrorForAllDepositsOverviews:()=>Yo,updateErrorForDepositQuery:()=>Go,updateErrorForDepositsSummary:()=>Zo,updateInstantDeposit:()=>Ko});var n={};r.r(n),r.d(n,{getAllDepositsOverviews:()=>ea,getDeposit:()=>Jo,getDeposits:()=>na,getDepositsCSV:()=>ra,getDepositsSummary:()=>oa});var o={};r.r(o),r.d(o,{getFraudOutcomeTransactions:()=>ha,getFraudOutcomeTransactionsError:()=>_a,getFraudOutcomeTransactionsSummary:()=>ga,getFraudOutcomeTransactionsSummaryError:()=>ba,getTransactions:()=>la,getTransactionsError:()=>ua,getTransactionsSummary:()=>ma,getTransactionsSummaryError:()=>pa});var a={};r.r(a),r.d(a,{updateErrorForFraudOutcomeTransactions:()=>Ra,updateErrorForFraudOutcomeTransactionsSummary:()=>Aa,updateErrorForTransactions:()=>Sa,updateErrorForTransactionsSummary:()=>Ea,updateFraudOutcomeTransactions:()=>Ta,updateFraudOutcomeTransactionsSummary:()=>Oa,updateTransactions:()=>va,updateTransactionsSummary:()=>wa});var s={};r.r(s),r.d(s,{formatQueryFilters:()=>xa,getFraudOutcomeTransactions:()=>ka,getFraudOutcomeTransactionsExport:()=>Pa,getFraudOutcomeTransactionsSummary:()=>ja,getTransactions:()=>Ca,getTransactionsCSV:()=>Na,getTransactionsSummary:()=>Ia});var i={};r.r(i),r.d(i,{getCharge:()=>Fa,getChargeError:()=>Ma,getChargeFromOrder:()=>La,getChargeFromOrderError:()=>Ua});var c={};r.r(c),r.d(c,{updateCharge:()=>$a,updateErrorForCharge:()=>Ba});var l={};r.r(l),r.d(l,{getCharge:()=>za,getChargeFromOrder:()=>qa});var u={};r.r(u),r.d(u,{getTimeline:()=>Ya,getTimelineError:()=>Va});var d={};r.r(d),r.d(d,{updateErrorForTimeline:()=>Ga,updateTimeline:()=>Wa});var m={};r.r(m),r.d(m,{getTimeline:()=>Qa});var p={};r.r(p),r.d(p,{getCachedDispute:()=>ts,getDispute:()=>Ja,getDisputeError:()=>es,getDisputes:()=>rs,getDisputesSummary:()=>ns});var y={};r.r(y),r.d(y,{refundCharge:()=>cs,updateErrorForPaymentIntent:()=>is,updatePaymentIntent:()=>ss});var h={};r.r(h),r.d(h,{getPaymentIntent:()=>ls});var _={};r.r(_),r.d(_,{acceptDispute:()=>ys,updateDispute:()=>us,updateDisputes:()=>ms,updateDisputesSummary:()=>ps,updateErrorForDispute:()=>ds});var f={};r.r(f),r.d(f,{getDispute:()=>fs,getDisputes:()=>gs,getDisputesCSV:()=>_s,getDisputesSummary:()=>bs});var g={};r.r(g),r.d(g,{getAccountBrandingLogo:()=>Ks,getAccountBusinessName:()=>$s,getAccountBusinessSupportAddress:()=>zs,getAccountBusinessSupportAddressCity:()=>Vs,getAccountBusinessSupportAddressCountry:()=>qs,getAccountBusinessSupportAddressLine1:()=>Hs,getAccountBusinessSupportAddressLine2:()=>Ys,getAccountBusinessSupportAddressPostalCode:()=>Gs,getAccountBusinessSupportAddressState:()=>Ws,getAccountBusinessSupportEmail:()=>Qs,getAccountBusinessSupportPhone:()=>Zs,getAccountBusinessURL:()=>Bs,getAccountDomesticCurrency:()=>Xs,getAccountStatementDescriptor:()=>Ms,getAccountStatementDescriptorKana:()=>Us,getAccountStatementDescriptorKanji:()=>Ls,getAdvancedFraudProtectionSettings:()=>Ci,getAvailablePaymentMethodIds:()=>Ps,getCompletedWaitingPeriod:()=>oi,getCurrentProtectionLevel:()=>xi,getDepositDelayDays:()=>ni,getDepositRestrictions:()=>si,getDepositScheduleInterval:()=>Js,getDepositScheduleMonthlyAnchor:()=>ri,getDepositScheduleWeeklyAnchor:()=>ti,getDepositStatus:()=>ai,getDuplicatedPaymentMethodIds:()=>Is,getEnabledPaymentMethodIds:()=>js,getExportLanguage:()=>ei,getIsCardPresentEligible:()=>vi,getIsDebugLogEnabled:()=>di,getIsDevModeEnabled:()=>li,getIsManualCaptureEnabled:()=>ii,getIsMultiCurrencyEnabled:()=>mi,getIsPaymentRequestEnabled:()=>ui,getIsSavedCardsEnabled:()=>gi,getIsStripeBillingEnabled:()=>ki,getIsStripeBillingMigrationInProgress:()=>ji,getIsSubscriptionsPluginActive:()=>Ei,getIsTestModeEnabled:()=>ci,getIsWCPayEnabled:()=>ks,getIsWCPaySubscriptionsEligible:()=>wi,getIsWCPaySubscriptionsEnabled:()=>Si,getIsWooPayEnabled:()=>Ti,getPaymentMethodStatuses:()=>Ds,getPaymentRequestButtonBorderRadius:()=>fi,getPaymentRequestButtonSize:()=>hi,getPaymentRequestButtonTheme:()=>_i,getPaymentRequestButtonType:()=>yi,getPaymentRequestLocations:()=>pi,getSavingError:()=>bi,getSettings:()=>Cs,getShowExpressCheckoutIncompatibilityNotice:()=>Ii,getShowWooPayIncompatibilityNotice:()=>Ni,getStripeBillingMigratedCount:()=>Di,getStripeBillingSubscriptionCount:()=>Pi,getWooPayCustomMessage:()=>Ri,getWooPayLocations:()=>Ai,getWooPayStoreLogo:()=>Oi,isSavingSettings:()=>Fs});var b={};r.r(b),r.d(b,{saveSettings:()=>hc,submitStripeBillingSubscriptionMigration:()=>Rc,updateAccountBrandingLogo:()=>uc,updateAccountBusinessName:()=>ac,updateAccountBusinessSupportAddress:()=>ic,updateAccountBusinessSupportEmail:()=>cc,updateAccountBusinessSupportPhone:()=>lc,updateAccountBusinessURL:()=>sc,updateAccountStatementDescriptor:()=>rc,updateAccountStatementDescriptorKana:()=>oc,updateAccountStatementDescriptorKanji:()=>nc,updateAdvancedFraudProtectionSettings:()=>Ec,updateAvailablePaymentMethodIds:()=>Wi,updateDepositScheduleInterval:()=>dc,updateDepositScheduleMonthlyAnchor:()=>pc,updateDepositScheduleWeeklyAnchor:()=>mc,updateEnabledPaymentMethodIds:()=>Vi,updateExportLanguage:()=>yc,updateIsCardPresentEligible:()=>Li,updateIsDebugLogEnabled:()=>Ji,updateIsManualCaptureEnabled:()=>Ki,updateIsMultiCurrencyEnabled:()=>ec,updateIsPaymentRequestEnabled:()=>Yi,updateIsSavedCardsEnabled:()=>Mi,updateIsSavingSettings:()=>Gi,updateIsStripeBillingEnabled:()=>Tc,updateIsTestModeEnabled:()=>Xi,updateIsWCPayEnabled:()=>Hi,updateIsWCPaySubscriptionsEnabled:()=>tc,updateIsWooPayEnabled:()=>fc,updatePaymentRequestButtonBorderRadius:()=>zi,updatePaymentRequestButtonSize:()=>$i,updatePaymentRequestButtonTheme:()=>Bi,updatePaymentRequestButtonType:()=>Ui,updatePaymentRequestLocations:()=>_c,updateProtectionLevel:()=>Sc,updateSelectedPaymentMethod:()=>Qi,updateSettings:()=>qi,updateUnselectedPaymentMethod:()=>Zi,updateWooPayCustomMessage:()=>gc,updateWooPayLocations:()=>vc,updateWooPayStoreLogo:()=>bc});var v={};r.r(v),r.d(v,{getSettings:()=>Oc});var S={};r.r(S),r.d(S,{getAvailableCurrencies:()=>Ic,getCurrencies:()=>Nc,getCurrencySettings:()=>Pc,getDefaultCurrency:()=>jc,getEnabledCurrencies:()=>kc,getStoreSettings:()=>Dc});var w={};r.r(w),r.d(w,{submitCurrencySettings:()=>Vc,submitEnabledCurrenciesUpdate:()=>Yc,submitStoreSettingsUpdate:()=>Wc,updateAvailableCurrencies:()=>$c,updateCurrencies:()=>Uc,updateCurrencySettings:()=>qc,updateDefaultCurrency:()=>zc,updateEnabledCurrencies:()=>Bc,updateStoreSettings:()=>Hc});var E={};r.r(E),r.d(E,{getCurrencies:()=>Gc,getCurrencySettings:()=>Qc,getStoreSettings:()=>Zc});var T={};r.r(T),r.d(T,{getCardReaderStats:()=>rl,getCardReaderStatsError:()=>nl,getCardReaders:()=>ol});var R={};r.r(R),r.d(R,{updateCardReaderStats:()=>al,updateCardReaders:()=>sl,updateErrorForCardReaderStats:()=>il,updateErrorForCardReaders:()=>cl});var O={};r.r(O),r.d(O,{getCardReaderStats:()=>ll,getCardReaders:()=>ul});var A={};r.r(A),r.d(A,{getActiveLoanSummary:()=>hl,getActiveLoanSummaryError:()=>_l,getLoans:()=>fl,getLoansError:()=>gl});var x={};r.r(x),r.d(x,{updateActiveLoanSummary:()=>bl,updateErrorForActiveLoanSummary:()=>vl,updateErrorForLoans:()=>wl,updateLoans:()=>Sl});var C={};r.r(C),r.d(C,{getActiveLoanSummary:()=>El,getLoans:()=>Tl});var N={};r.r(N),r.d(N,{getDocuments:()=>Cl,getDocumentsError:()=>Nl,getDocumentsSummary:()=>kl,getDocumentsSummaryError:()=>jl});var I={};r.r(I),r.d(I,{updateDocuments:()=>Pl,updateDocumentsSummary:()=>Fl,updateErrorForDocuments:()=>Dl,updateErrorForDocumentsSummary:()=>Ml});var k={};r.r(k),r.d(k,{formatQueryFilters:()=>Ll,getDocuments:()=>Ul,getDocumentsSummary:()=>$l});var j={};r.r(j),r.d(j,{getPaymentIntent:()=>zl,getPaymentIntentError:()=>ql});var P={};r.r(P),r.d(P,{getAuthorization:()=>Ql,getAuthorizations:()=>Gl,getAuthorizationsError:()=>Zl,getAuthorizationsSummary:()=>Xl,getAuthorizationsSummaryError:()=>Jl,getIsRequesting:()=>eu});var D={};r.r(D),r.d(D,{setIsRequestingAuthorization:()=>au,submitCancelAuthorization:()=>iu,submitCaptureAuthorization:()=>su,updateAuthorization:()=>nu,updateAuthorizations:()=>tu,updateAuthorizationsSummary:()=>ou,updateErrorForAuthorizations:()=>ru,updateErrorForAuthorizationsSummary:()=>cu});var F={};r.r(F),r.d(F,{getAuthorization:()=>uu,getAuthorizations:()=>lu,getAuthorizationsSummary:()=>du});var M={};r.r(M),r.d(M,{getFile:()=>hu,getFileError:()=>_u});var L={};r.r(L),r.d(L,{updateErrorForFiles:()=>gu,updateFiles:()=>fu});var U={};r.r(U),r.d(U,{getFile:()=>bu});var $={};r.r($),r.d($,{getPaymentActivityData:()=>Su});var B={};r.r(B),r.d(B,{updatePaymentActivity:()=>wu});var z={};r.r(z),r.d(z,{getPaymentActivityData:()=>Eu});var q=r(1609),H=r.n(q);const Y=window.ReactDOM;var V=r.n(Y);const W=window.wp.i18n;function G(){return G=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},G.apply(null,arguments)}const Q=window.wp.element;var Z=!!q.useInsertionEffect&&q.useInsertionEffect,K=Z||function(e){return e()};Z||q.useLayoutEffect;var X={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 J(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var ee=/[A-Z]|^ms/g,te=/_EMO_([^_]+?)_([^]*?)_EMO_/g,re=function(e){return 45===e.charCodeAt(1)},ne=function(e){return null!=e&&"boolean"!=typeof e},oe=J((function(e){return re(e)?e:e.replace(ee,"-$&").toLowerCase()})),ae=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(te,(function(e,t,r){return ie={name:t,styles:r,next:ie},t}))}return 1===X[e]||re(e)||"number"!=typeof t||0===t?t:t+"px"};function se(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 ie={name:r.name,styles:r.styles,next:ie},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)ie={name:n.name,styles:n.styles,next:ie},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+=se(e,t,r[o])+";";else for(var a in r){var s=r[a];if("object"!=typeof s)null!=t&&void 0!==t[s]?n+=a+"{"+t[s]+"}":ne(s)&&(n+=oe(a)+":"+ae(a,s)+";");else if(!Array.isArray(s)||"string"!=typeof s[0]||null!=t&&void 0!==t[s[0]]){var i=se(e,t,s);switch(a){case"animation":case"animationName":n+=oe(a)+":"+i+";";break;default:n+=a+"{"+i+"}"}}else for(var c=0;c<s.length;c++)ne(s[c])&&(n+=oe(a)+":"+ae(a,s[c])+";")}return n}(e,t,r);case"function":if(void 0!==e){var o=ie,a=r(e);return ie=o,se(e,t,a)}}if(null==t)return r;var s=t[r];return void 0!==s?s:r}var ie,ce=/label:\s*([^\s;\n{]+)\s*(;|$)/g,le=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="";ie=void 0;var a=e[0];null==a||void 0===a.raw?(n=!1,o+=se(r,t,a)):o+=a[0];for(var s=1;s<e.length;s++)o+=se(r,t,e[s]),n&&(o+=a[s]);ce.lastIndex=0;for(var i,c="";null!==(i=ce.exec(o));)c+="-"+i[1];var l=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:l,styles:o,next:ie}},ue=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}(),de=Math.abs,me=String.fromCharCode,pe=Object.assign;function ye(e){return e.trim()}function he(e,t,r){return e.replace(t,r)}function _e(e,t){return e.indexOf(t)}function fe(e,t){return 0|e.charCodeAt(t)}function ge(e,t,r){return e.slice(t,r)}function be(e){return e.length}function ve(e){return e.length}function Se(e,t){return t.push(e),e}var we=1,Ee=1,Te=0,Re=0,Oe=0,Ae="";function xe(e,t,r,n,o,a,s){return{value:e,root:t,parent:r,type:n,props:o,children:a,line:we,column:Ee,length:s,return:""}}function Ce(e,t){return pe(xe("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ne(){return Oe=Re>0?fe(Ae,--Re):0,Ee--,10===Oe&&(Ee=1,we--),Oe}function Ie(){return Oe=Re<Te?fe(Ae,Re++):0,Ee++,10===Oe&&(Ee=1,we++),Oe}function ke(){return fe(Ae,Re)}function je(){return Re}function Pe(e,t){return ge(Ae,e,t)}function De(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 Fe(e){return we=Ee=1,Te=be(Ae=e),Re=0,[]}function Me(e){return Ae="",e}function Le(e){return ye(Pe(Re-1,Be(91===e?e+2:40===e?e+1:e)))}function Ue(e){for(;(Oe=ke())&&Oe<33;)Ie();return De(e)>2||De(Oe)>3?"":" "}function $e(e,t){for(;--t&&Ie()&&!(Oe<48||Oe>102||Oe>57&&Oe<65||Oe>70&&Oe<97););return Pe(e,je()+(t<6&&32==ke()&&32==Ie()))}function Be(e){for(;Ie();)switch(Oe){case e:return Re;case 34:case 39:34!==e&&39!==e&&Be(Oe);break;case 40:41===e&&Be(e);break;case 92:Ie()}return Re}function ze(e,t){for(;Ie()&&e+Oe!==57&&(e+Oe!==84||47!==ke()););return"/*"+Pe(t,Re-1)+"*"+me(47===e?e:Ie())}function qe(e){for(;!De(ke());)Ie();return Pe(e,Re)}var He="-ms-",Ye="-moz-",Ve="-webkit-",We="comm",Ge="rule",Qe="decl",Ze="@keyframes";function Ke(e,t){for(var r="",n=ve(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Xe(e,t,r,n){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Qe:return e.return=e.return||e.value;case We:return"";case Ze:return e.return=e.value+"{"+Ke(e.children,n)+"}";case Ge:e.value=e.props.join(",")}return be(r=Ke(e.children,n))?e.return=e.value+"{"+r+"}":""}function Je(e){return Me(et("",null,null,null,[""],e=Fe(e),0,[0],e))}function et(e,t,r,n,o,a,s,i,c){for(var l=0,u=0,d=s,m=0,p=0,y=0,h=1,_=1,f=1,g=0,b="",v=o,S=a,w=n,E=b;_;)switch(y=g,g=Ie()){case 40:if(108!=y&&58==fe(E,d-1)){-1!=_e(E+=he(Le(g),"&","&\f"),"&\f")&&(f=-1);break}case 34:case 39:case 91:E+=Le(g);break;case 9:case 10:case 13:case 32:E+=Ue(y);break;case 92:E+=$e(je()-1,7);continue;case 47:switch(ke()){case 42:case 47:Se(rt(ze(Ie(),je()),t,r),c);break;default:E+="/"}break;case 123*h:i[l++]=be(E)*f;case 125*h:case 59:case 0:switch(g){case 0:case 125:_=0;case 59+u:-1==f&&(E=he(E,/\f/g,"")),p>0&&be(E)-d&&Se(p>32?nt(E+";",n,r,d-1):nt(he(E," ","")+";",n,r,d-2),c);break;case 59:E+=";";default:if(Se(w=tt(E,t,r,l,u,o,i,b,v=[],S=[],d),a),123===g)if(0===u)et(E,t,w,w,v,a,d,i,S);else switch(99===m&&110===fe(E,3)?100:m){case 100:case 108:case 109:case 115:et(e,w,w,n&&Se(tt(e,w,w,0,0,o,i,b,o,v=[],d),S),o,S,d,i,n?v:S);break;default:et(E,w,w,w,[""],S,0,i,S)}}l=u=p=0,h=f=1,b=E="",d=s;break;case 58:d=1+be(E),p=y;default:if(h<1)if(123==g)--h;else if(125==g&&0==h++&&125==Ne())continue;switch(E+=me(g),g*h){case 38:f=u>0?1:(E+="\f",-1);break;case 44:i[l++]=(be(E)-1)*f,f=1;break;case 64:45===ke()&&(E+=Le(Ie())),m=ke(),u=d=be(b=E+=qe(je())),g++;break;case 45:45===y&&2==be(E)&&(h=0)}}return a}function tt(e,t,r,n,o,a,s,i,c,l,u){for(var d=o-1,m=0===o?a:[""],p=ve(m),y=0,h=0,_=0;y<n;++y)for(var f=0,g=ge(e,d+1,d=de(h=s[y])),b=e;f<p;++f)(b=ye(h>0?m[f]+" "+g:he(g,/&\f/g,m[f])))&&(c[_++]=b);return xe(e,t,r,0===o?Ge:i,c,l,u)}function rt(e,t,r){return xe(e,t,r,We,me(Oe),ge(e,2,-2),0)}function nt(e,t,r,n){return xe(e,t,r,Qe,ge(e,0,n),ge(e,n+1,-1),n)}var ot=function(e,t,r){for(var n=0,o=0;n=o,o=ke(),38===n&&12===o&&(t[r]=1),!De(o);)Ie();return Pe(e,Re)},at=new WeakMap,st=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)||at.get(r))&&!n){at.set(e,!0);for(var o=[],a=function(e,t){return Me(function(e,t){var r=-1,n=44;do{switch(De(n)){case 0:38===n&&12===ke()&&(t[r]=1),e[r]+=ot(Re-1,t,r);break;case 2:e[r]+=Le(n);break;case 4:if(44===n){e[++r]=58===ke()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=me(n)}}while(n=Ie());return e}(Fe(e),t))}(t,o),s=r.props,i=0,c=0;i<a.length;i++)for(var l=0;l<s.length;l++,c++)e.props[c]=o[i]?a[i].replace(/&\f/g,s[l]):s[l]+" "+a[i]}}},it=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ct(e,t){switch(function(e,t){return 45^fe(e,0)?(((t<<2^fe(e,0))<<2^fe(e,1))<<2^fe(e,2))<<2^fe(e,3):0}(e,t)){case 5103:return Ve+"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 Ve+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ve+e+Ye+e+He+e+e;case 6828:case 4268:return Ve+e+He+e+e;case 6165:return Ve+e+He+"flex-"+e+e;case 5187:return Ve+e+he(e,/(\w+).+(:[^]+)/,Ve+"box-$1$2"+He+"flex-$1$2")+e;case 5443:return Ve+e+He+"flex-item-"+he(e,/flex-|-self/,"")+e;case 4675:return Ve+e+He+"flex-line-pack"+he(e,/align-content|flex-|-self/,"")+e;case 5548:return Ve+e+He+he(e,"shrink","negative")+e;case 5292:return Ve+e+He+he(e,"basis","preferred-size")+e;case 6060:return Ve+"box-"+he(e,"-grow","")+Ve+e+He+he(e,"grow","positive")+e;case 4554:return Ve+he(e,/([^-])(transform)/g,"$1"+Ve+"$2")+e;case 6187:return he(he(he(e,/(zoom-|grab)/,Ve+"$1"),/(image-set)/,Ve+"$1"),e,"")+e;case 5495:case 3959:return he(e,/(image-set\([^]*)/,Ve+"$1$`$1");case 4968:return he(he(e,/(.+:)(flex-)?(.*)/,Ve+"box-pack:$3"+He+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ve+e+e;case 4095:case 3583:case 4068:case 2532:return he(e,/(.+)-inline(.+)/,Ve+"$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(be(e)-1-t>6)switch(fe(e,t+1)){case 109:if(45!==fe(e,t+4))break;case 102:return he(e,/(.+:)(.+)-([^]+)/,"$1"+Ve+"$2-$3$1"+Ye+(108==fe(e,t+3)?"$3":"$2-$3"))+e;case 115:return~_e(e,"stretch")?ct(he(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==fe(e,t+1))break;case 6444:switch(fe(e,be(e)-3-(~_e(e,"!important")&&10))){case 107:return he(e,":",":"+Ve)+e;case 101:return he(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ve+(45===fe(e,14)?"inline-":"")+"box$3$1"+Ve+"$2$3$1"+He+"$2box$3")+e}break;case 5936:switch(fe(e,t+11)){case 114:return Ve+e+He+he(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ve+e+He+he(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ve+e+He+he(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ve+e+He+e+e}return e}var lt=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case Qe:e.return=ct(e.value,e.length);break;case Ze:return Ke([Ce(e,{value:he(e.value,"@","@"+Ve)})],n);case Ge: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 Ke([Ce(e,{props:[he(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return Ke([Ce(e,{props:[he(t,/:(plac\w+)/,":"+Ve+"input-$1")]}),Ce(e,{props:[he(t,/:(plac\w+)/,":-moz-$1")]}),Ce(e,{props:[he(t,/:(plac\w+)/,He+"input-$1")]})],n)}return""}))}}],ut=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||lt,s={},i=[];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++)s[t[r]]=!0;i.push(e)}));var c,l,u,d,m=[Xe,(d=function(e){c.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],p=(l=[st,it].concat(a,m),u=ve(l),function(e,t,r,n){for(var o="",a=0;a<u;a++)o+=l[a](e,t,r,n)||"";return o});o=function(e,t,r,n){c=r,Ke(Je(e?e+"{"+t.styles+"}":t.styles),p),n&&(y.inserted[t.name]=!0)};var y={key:t,sheet:new ue({key:t,container:n,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:o};return y.sheet.hydrate(i),y};function dt(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return le(t)}r(4146);const mt=window.lodash;window.wp.warning;var pt=r(5606);const yt=(0,Q.createContext)({}),ht=()=>(0,Q.useContext)(yt);function _t(e){let{value:t}=e;const r=ht(),n=(0,Q.useRef)(t);return function(e,r){const o=(0,Q.useRef)(!1);(0,Q.useEffect)((()=>{o.current?(0,mt.isEqual)(n.current,t)&&n.current!==t&&void 0!==pt&&pt.env:o.current=!0}),r)}(0,[t]),(0,Q.useMemo)((()=>(0,mt.merge)((0,mt.cloneDeep)(r),t)),[r,t])}const ft=(0,Q.memo)((e=>{let{children:t,value:r}=e;const n=_t({value:r});return(0,Q.createElement)(yt.Provider,{value:n},t)})),gt="data-wp-component",bt="data-wp-c16t",vt="__contextSystemKey__";var St=r(8616),wt=r.n(St);const Et=wt()((function(e){return`components-${(0,mt.kebabCase)(e)}`}));var Tt=r(5606);function Rt(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!==Tt&&Tt.env;let a=o[vt]||[t];return Array.isArray(t)&&(a=[...a,...t]),"string"==typeof t&&(a=[...a,t]),o.displayName=t,o[vt]=(0,mt.uniq)(a),o.selector=`.${Et(t)}`,o}var Ot=/^((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)-.*))$/,At=J((function(e){return Ot.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),xt=q.createContext("undefined"!=typeof HTMLElement?ut({key:"css"}):null),Ct=xt.Provider,Nt=q.createContext({}),It=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},kt=At,jt=function(e){return"theme"!==e},Pt=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?kt:jt},Dt=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},Ft=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return It(t,r,n),K((function(){return function(e,t,r){It(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},Mt=function e(t,r){var n,o,a=t.__emotion_real===t,s=a&&t.__emotion_base||t;void 0!==r&&(n=r.label,o=r.target);var i=Dt(t,r,a),c=i||Pt(s),l=!c("as");return function(){var u=arguments,d=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==n&&d.push("label:"+n+";"),null==u[0]||void 0===u[0].raw)d.push.apply(d,u);else{d.push(u[0][0]);for(var m=u.length,p=1;p<m;p++)d.push(u[p],u[0][p])}var y,h=(y=function(e,t,r){var n,a,u,m,p=l&&e.as||s,y="",h=[],_=e;if(null==e.theme){for(var f in _={},e)_[f]=e[f];_.theme=q.useContext(Nt)}"string"==typeof e.className?(n=t.registered,a=h,u=e.className,m="",u.split(" ").forEach((function(e){void 0!==n[e]?a.push(n[e]+";"):m+=e+" "})),y=m):null!=e.className&&(y=e.className+" ");var g=le(d.concat(h),t.registered,_);y+=t.key+"-"+g.name,void 0!==o&&(y+=" "+o);var b=l&&void 0===i?Pt(p):c,v={};for(var S in e)l&&"as"===S||b(S)&&(v[S]=e[S]);return v.className=y,v.ref=r,q.createElement(q.Fragment,null,q.createElement(Ft,{cache:t,serialized:g,isStringTag:"string"==typeof p}),q.createElement(p,v))},(0,q.forwardRef)((function(e,t){var r=(0,q.useContext)(xt);return y(e,r,t)})));return h.displayName=void 0!==n?n:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",h.defaultProps=t.defaultProps,h.__emotion_real=h,h.__emotion_base=s,h.__emotion_styles=d,h.__emotion_forwardProp=i,Object.defineProperty(h,"toString",{value:function(){return"."+o}}),h.withComponent=function(t,n){return e(t,G({},r,n,{shouldForwardProp:Dt(h,n,!0)})).apply(void 0,d)},h}};const Lt=Mt("div",{target:"em57xhy0"})("");Lt.selector=".components-view",Lt.displayName="View";const Ut=Lt;function $t(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n}function Bt(e,t){if(void 0===e.inserted[t.name])return e.insert("",t,e.sheet,!0)}function zt(e,t,r){var n=[],o=$t(e,n,r);return n.length<2?r:o+t(n)}var qt=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 s in a="",o)o[s]&&s&&(a&&(a+=" "),a+=s);break;default:a=o}a&&(r&&(r+=" "),r+=a)}}return r},Ht=function(){var e=ut({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=le(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 zt(e.registered,t,qt(n))},injectGlobal:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=le(r,e.registered);Bt(e,o)},keyframes:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var o=le(r,e.registered),a="animation-"+o.name;return Bt(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:$t.bind(null,e.registered),merge:zt.bind(null,e.registered,t)}}(),Yt=(Ht.flush,Ht.hydrate,Ht.cx);Ht.merge,Ht.getRegisteredStyles,Ht.injectGlobal,Ht.keyframes,Ht.css,Ht.sheet,Ht.cache;const Vt=()=>{const e=(0,q.useContext)(xt),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 Yt(...r.map((t=>(e=>null!=e&&["name","styles"].every((t=>void 0!==e[t])))(t)?(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)))}),[e]);return t};var Wt=r(5606);function Gt(e,t){const r=ht();void 0===t&&void 0!==Wt&&Wt.env;const n=(null==r?void 0:r[t])||{},o={[bt]:!0,...(a=t,{[gt]:a})};var a;const{_overrides:s,...i}=n,c=Object.entries(i).length?Object.assign({},i,e):e,l=Vt()(Et(t),e.className),u="function"==typeof c.renderChildren?c.renderChildren(c):c.children;for(const e in c)o[e]=c[e];for(const e in s)o[e]=s[e];return o.children=u,o.className=l,o}const Qt={name:"12ip69d",styles:"background:transparent;display:block;margin:0!important;pointer-events:none;position:absolute;will-change:box-shadow"};function Zt(e){var t,r;if(void 0===e)return;if(!e)return"0";const n="number"==typeof e?e:Number(e);return"undefined"!=typeof window&&null!==(t=window.CSS)&&void 0!==t&&null!==(r=t.supports)&&void 0!==r&&r.call(t,"margin",e.toString())||Number.isNaN(n)?e.toString():`calc(4px * ${e})`}var Kt={grad:.9,turn:360,rad:360/(2*Math.PI)},Xt=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Jt=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=Math.pow(10,t)),Math.round(r*e)/r+0},er=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e>r?r:e>t?e:t},tr=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},rr=function(e){return{r:er(e.r,0,255),g:er(e.g,0,255),b:er(e.b,0,255),a:er(e.a)}},nr=function(e){return{r:Jt(e.r),g:Jt(e.g),b:Jt(e.b),a:Jt(e.a,3)}},or=/^#([0-9a-f]{3,8})$/i,ar=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},sr=function(e){var t=e.r,r=e.g,n=e.b,o=e.a,a=Math.max(t,r,n),s=a-Math.min(t,r,n),i=s?a===t?(r-n)/s:a===r?2+(n-t)/s:4+(t-r)/s:0;return{h:60*(i<0?i+6:i),s:a?s/a*100:0,v:a/255*100,a:o}},ir=function(e){var t=e.h,r=e.s,n=e.v,o=e.a;t=t/360*6,r/=100,n/=100;var a=Math.floor(t),s=n*(1-r),i=n*(1-(t-a)*r),c=n*(1-(1-t+a)*r),l=a%6;return{r:255*[n,i,s,s,c,n][l],g:255*[c,n,n,i,s,s][l],b:255*[s,s,c,n,n,i][l],a:o}},cr=function(e){return{h:tr(e.h),s:er(e.s,0,100),l:er(e.l,0,100),a:er(e.a)}},lr=function(e){return{h:Jt(e.h),s:Jt(e.s),l:Jt(e.l),a:Jt(e.a,3)}},ur=function(e){return ir((r=(t=e).s,{h:t.h,s:(r*=((n=t.l)<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:t.a}));var t,r,n},dr=function(e){return{h:(t=sr(e)).h,s:(o=(200-(r=t.s))*(n=t.v)/100)>0&&o<200?r*n/100/(o<=100?o:200-o)*100:0,l:o/2,a:t.a};var t,r,n,o},mr=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,pr=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,yr=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,hr=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,_r={string:[[function(e){var t=or.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Jt(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Jt(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=yr.exec(e)||hr.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:rr({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=mr.exec(e)||pr.exec(e);if(!t)return null;var r,n,o=cr({h:(r=t[1],n=t[2],void 0===n&&(n="deg"),Number(r)*(Kt[n]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return ur(o)},"hsl"]],object:[[function(e){var t=e.r,r=e.g,n=e.b,o=e.a,a=void 0===o?1:o;return Xt(t)&&Xt(r)&&Xt(n)?rr({r:Number(t),g:Number(r),b:Number(n),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,r=e.s,n=e.l,o=e.a,a=void 0===o?1:o;if(!Xt(t)||!Xt(r)||!Xt(n))return null;var s=cr({h:Number(t),s:Number(r),l:Number(n),a:Number(a)});return ur(s)},"hsl"],[function(e){var t=e.h,r=e.s,n=e.v,o=e.a,a=void 0===o?1:o;if(!Xt(t)||!Xt(r)||!Xt(n))return null;var s=function(e){return{h:tr(e.h),s:er(e.s,0,100),v:er(e.v,0,100),a:er(e.a)}}({h:Number(t),s:Number(r),v:Number(n),a:Number(a)});return ir(s)},"hsv"]]},fr=function(e,t){for(var r=0;r<t.length;r++){var n=t[r][0](e);if(n)return[n,t[r][1]]}return[null,void 0]},gr=function(e,t){var r=dr(e);return{h:r.h,s:er(r.s+100*t,0,100),l:r.l,a:r.a}},br=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},vr=function(e,t){var r=dr(e);return{h:r.h,s:r.s,l:er(r.l+100*t,0,100),a:r.a}},Sr=function(){function e(e){this.parsed=function(e){return"string"==typeof e?fr(e.trim(),_r.string):"object"==typeof e&&null!==e?fr(e,_r.object):[null,void 0]}(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Jt(br(this.rgba),2)},e.prototype.isDark=function(){return br(this.rgba)<.5},e.prototype.isLight=function(){return br(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=nr(this.rgba)).r,r=e.g,n=e.b,a=(o=e.a)<1?ar(Jt(255*o)):"","#"+ar(t)+ar(r)+ar(n)+a;var e,t,r,n,o,a},e.prototype.toRgb=function(){return nr(this.rgba)},e.prototype.toRgbString=function(){return t=(e=nr(this.rgba)).r,r=e.g,n=e.b,(o=e.a)<1?"rgba("+t+", "+r+", "+n+", "+o+")":"rgb("+t+", "+r+", "+n+")";var e,t,r,n,o},e.prototype.toHsl=function(){return lr(dr(this.rgba))},e.prototype.toHslString=function(){return t=(e=lr(dr(this.rgba))).h,r=e.s,n=e.l,(o=e.a)<1?"hsla("+t+", "+r+"%, "+n+"%, "+o+")":"hsl("+t+", "+r+"%, "+n+"%)";var e,t,r,n,o},e.prototype.toHsv=function(){return e=sr(this.rgba),{h:Jt(e.h),s:Jt(e.s),v:Jt(e.v),a:Jt(e.a,3)};var e},e.prototype.invert=function(){return wr({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),wr(gr(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),wr(gr(this.rgba,-e))},e.prototype.grayscale=function(){return wr(gr(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),wr(vr(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),wr(vr(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?wr({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Jt(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=dr(this.rgba);return"number"==typeof e?wr({h:e,s:t.s,l:t.l,a:t.a}):Jt(t.h)},e.prototype.isEqual=function(e){return this.toHex()===wr(e).toHex()},e}(),wr=function(e){return e instanceof Sr?e:new Sr(e)},Er=[];function Tr(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return wr(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").alpha(e).toRgbString()}!function(e){e.forEach((function(e){Er.indexOf(e)<0&&(e(Sr,_r),Er.push(e))}))}([function(e,t){var r={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},n={};for(var o in r)n[r[o]]=o;var a={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var o,s,i=n[this.toHex()];if(i)return i;if(null==t?void 0:t.closest){var c=this.toRgb(),l=1/0,u="black";if(!a.length)for(var d in r)a[d]=new e(r[d]).toRgb();for(var m in r){var p=(o=c,s=a[m],Math.pow(o.r-s.r,2)+Math.pow(o.g-s.g,2)+Math.pow(o.b-s.b,2));p<l&&(l=p,u=m)}return u}},t.string.push([function(t){var n=t.toLowerCase(),o="transparent"===n?"#0000":r[n];return o?new e(o).toRgb():null},"name"])}]);const Rr={black:"#000",white:"#fff"},Or={blue:{medium:{focus:"#007cba",focusDark:"#fff"}},gray:{900:"#1e1e1e",700:"#757575",600:"#949494",400:"#ccc",300:"#ddd",200:"#e0e0e0",100:"#f0f0f0"},darkGray:{primary:"#1e1e1e",heading:"#050505"},mediumGray:{text:"#757575"},lightGray:{ui:"#949494",secondary:"#ccc",tertiary:"#e7e8e9"}},Ar={900:"#191e23",800:"#23282d",700:"#32373c",600:"#40464d",500:"#555d66",400:"#606a73",300:"#6c7781",200:"#7e8993",150:"#8d96a0",100:"#8f98a1",placeholder:Tr(Or.gray[900],.62)},xr={900:Tr("#000510",.9),800:Tr("#00000a",.85),700:Tr("#06060b",.8),600:Tr("#000913",.75),500:Tr("#0a1829",.7),400:Tr("#0a1829",.65),300:Tr("#0e1c2e",.62),200:Tr("#162435",.55),100:Tr("#223443",.5),backgroundFill:Tr(Ar[700],.7)},Cr={900:Tr("#304455",.45),800:Tr("#425863",.4),700:Tr("#667886",.35),600:Tr("#7b86a2",.3),500:Tr("#9197a2",.25),400:Tr("#95959c",.2),300:Tr("#829493",.15),200:Tr("#8b8b96",.1),100:Tr("#747474",.05)},Nr={900:"#a2aab2",800:"#b5bcc2",700:"#ccd0d4",600:"#d7dade",500:"#e2e4e7",400:"#e8eaeb",300:"#edeff0",200:"#f3f4f5",100:"#f8f9f9",placeholder:Tr(Rr.white,.65)},Ir={900:Tr(Rr.white,.5),800:Tr(Rr.white,.45),700:Tr(Rr.white,.4),600:Tr(Rr.white,.35),500:Tr(Rr.white,.3),400:Tr(Rr.white,.25),300:Tr(Rr.white,.2),200:Tr(Rr.white,.15),100:Tr(Rr.white,.1),backgroundFill:Tr(Nr[300],.8)},kr={wordpress:{700:"#00669b"},dark:{900:"#0071a1"},medium:{900:"#006589",800:"#00739c",700:"#007fac",600:"#008dbe",500:"#00a0d2",400:"#33b3db",300:"#66c6e4",200:"#bfe7f3",100:"#e5f5fa",highlight:"#b3e7fe",focus:"#007cba"}},jr={theme:`var( --wp-admin-theme-color, ${kr.wordpress[700]})`,themeDark10:`var( --wp-admin-theme-color-darker-10, ${kr.medium.focus})`},Pr={theme:jr.theme,background:Rr.white,backgroundDisabled:Nr[200],border:Or.gray[700],borderHover:Or.gray[700],borderFocus:jr.themeDark10,borderDisabled:Or.gray[400],borderLight:Or.gray[300],label:Ar[500],textDisabled:Ar[150],textDark:Rr.white,textLight:Rr.black},Dr=Object.assign({},Rr,{darkGray:(0,mt.merge)({},Ar,Or.darkGray),darkOpacity:xr,darkOpacityLight:Cr,mediumGray:Or.mediumGray,gray:Or.gray,lightGray:(0,mt.merge)({},Nr,Or.lightGray),lightGrayLight:Ir,blue:(0,mt.merge)({},kr,Or.blue),alert:{yellow:"#f0b849",red:"#d94f4f",green:"#4ab866"},admin:jr,ui:Pr}),Fr="36px",Mr="12px",Lr={controlSurfaceColor:Dr.white,controlTextActiveColor:Dr.ui.theme,controlPaddingX:Mr,controlPaddingXLarge:`calc(${Mr} * 1.3334)`,controlPaddingXSmall:`calc(${Mr} / 1.3334)`,controlBackgroundColor:Dr.white,controlBorderRadius:"2px",controlBorderColor:Dr.gray[700],controlBoxShadow:"transparent",controlBorderColorHover:Dr.gray[700],controlBoxShadowFocus:`0 0 0 0.5px ${Dr.admin.theme}`,controlDestructiveBorderColor:Dr.alert.red,controlHeight:Fr,controlHeightXSmall:`calc( ${Fr} * 0.6 )`,controlHeightSmall:`calc( ${Fr} * 0.8 )`,controlHeightLarge:`calc( ${Fr} * 1.2 )`,controlHeightXLarge:`calc( ${Fr} * 1.4 )`},Ur={toggleGroupControlBackgroundColor:Lr.controlBackgroundColor,toggleGroupControlBorderColor:Dr.ui.border,toggleGroupControlBackdropBackgroundColor:Lr.controlSurfaceColor,toggleGroupControlBackdropBorderColor:Dr.ui.border,toggleGroupControlBackdropBoxShadow:"transparent",toggleGroupControlButtonColorActive:Lr.controlBackgroundColor},$r=Object.assign({},Lr,Ur,{colorDivider:"rgba(0, 0, 0, 0.1)",colorScrollbarThumb:"rgba(0, 0, 0, 0.2)",colorScrollbarThumbHover:"rgba(0, 0, 0, 0.5)",colorScrollbarTrack:"rgba(0, 0, 0, 0.04)",elevationIntensity:1,radiusBlockUi:"2px",borderWidth:"1px",borderWidthFocus:"1.5px",borderWidthTab:"4px",spinnerSize:16,fontSize:"13px",fontSizeH1:"calc(2.44 * 13px)",fontSizeH2:"calc(1.95 * 13px)",fontSizeH3:"calc(1.56 * 13px)",fontSizeH4:"calc(1.25 * 13px)",fontSizeH5:"13px",fontSizeH6:"calc(0.8 * 13px)",fontSizeInputMobile:"16px",fontSizeMobile:"15px",fontSizeSmall:"calc(0.92 * 13px)",fontSizeXSmall:"calc(0.75 * 13px)",fontLineHeightBase:"1.2",fontWeight:"normal",fontWeightHeading:"600",gridBase:"4px",cardBorderRadius:"2px",cardPaddingXSmall:`${Zt(2)}`,cardPaddingSmall:`${Zt(4)}`,cardPaddingMedium:`${Zt(4)} ${Zt(6)}`,cardPaddingLarge:`${Zt(6)} ${Zt(8)}`,surfaceBackgroundColor:Dr.white,surfaceBackgroundSubtleColor:"#F3F3F3",surfaceBackgroundTintColor:"#F5F5F5",surfaceBorderColor:"rgba(0, 0, 0, 0.1)",surfaceBorderBoldColor:"rgba(0, 0, 0, 0.15)",surfaceBorderSubtleColor:"rgba(0, 0, 0, 0.05)",surfaceBackgroundTertiaryColor:Dr.white,surfaceColor:Dr.white,transitionDuration:"200ms",transitionDurationFast:"160ms",transitionDurationFaster:"120ms",transitionDurationFastest:"100ms",transitionTimingFunction:"cubic-bezier(0.08, 0.52, 0.52, 1)",transitionTimingFunctionControl:"cubic-bezier(0.12, 0.8, 0.32, 1)"});function Br(e){return`0 ${e}px ${2*e}px 0\n\trgba(0 ,0, 0, ${e/20})`}const zr=Rt((function(e,t){const r=function(e){const{active:t,borderRadius:r="inherit",className:n,focus:o,hover:a,isInteractive:s=!1,offset:i=0,value:c=0,...l}=Gt(e,"Elevation"),u=Vt(),d=(0,Q.useMemo)((()=>{let e=(0,mt.isNil)(a)?2*c:a,l=(0,mt.isNil)(t)?c/2:t;s||(e=(0,mt.isNil)(a)?void 0:a,l=(0,mt.isNil)(t)?void 0:t);const d=`box-shadow ${$r.transitionDuration} ${$r.transitionTimingFunction}`,m={};return m.Base=dt({borderRadius:r,bottom:i,boxShadow:Br(c),opacity:$r.elevationIntensity,left:i,right:i,top:i,transition:d},function(){let e;switch(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"transition"){case"transition":e="transition-duration: 0ms;";break;case"animation":e="animation-duration: 1ms;";break;default:e="\n\t\t\t\tanimation-duration: 1ms;\n\t\t\t\ttransition-duration: 0ms;\n\t\t\t"}return`\n\t\t@media ( prefers-reduced-motion: reduce ) {\n\t\t\t${e};\n\t\t}\n\t`}("transition"),"",""),(0,mt.isNil)(e)||(m.hover=dt("*:hover>&{box-shadow:",Br(e),";}","")),(0,mt.isNil)(l)||(m.active=dt("*:active>&{box-shadow:",Br(l),";}","")),(0,mt.isNil)(o)||(m.focus=dt("*:focus>&{box-shadow:",Br(o),";}","")),u(Qt,m.Base,m.hover&&m.hover,m.focus&&m.focus,m.active&&m.active,n)}),[t,r,n,u,o,a,s,i,c]);return{...l,className:d,"aria-hidden":!0}}(e);return(0,Q.createElement)(Ut,G({},r,{ref:t}))}),"Elevation"),qr=zr,Hr=`calc(${$r.cardBorderRadius} - 1px)`,Yr=dt("box-shadow:0 0 0 1px ",$r.surfaceBorderColor,";outline:none;",""),Vr={name:"13udsys",styles:"height:100%"},Wr={name:"6ywzd",styles:"box-sizing:border-box;height:auto;max-height:100%"},Gr={name:"c990dr",styles:"box-sizing:border-box;display:block;width:100%"},Qr=dt("&:first-of-type{border-top-left-radius:",Hr,";border-top-right-radius:",Hr,";}&:last-of-type{border-bottom-left-radius:",Hr,";border-bottom-right-radius:",Hr,";}",""),Zr=dt("border-color:",$r.colorDivider,";",""),Kr={name:"1t90u8d",styles:"box-shadow:none"},Xr=dt("border-radius:",Hr,";",""),Jr=dt("padding:",$r.cardPaddingXSmall,";",""),en={large:dt("padding:",$r.cardPaddingLarge,";",""),medium:dt("padding:",$r.cardPaddingMedium,";",""),small:dt("padding:",$r.cardPaddingSmall,";",""),xSmall:Jr,extraSmall:Jr},tn=dt("background-color:",Dr.lightGray[200],";",""),rn=window.wp.deprecated;var nn=r.n(rn);const on=dt("background-color:",$r.surfaceColor,";color:",Dr.darkGray.primary,";position:relative;","");$r.surfaceBackgroundColor;const an=dt("",""),sn=dt("background:",$r.surfaceBackgroundTintColor,";",""),cn=dt("background:",$r.surfaceBackgroundTertiaryColor,";",""),ln=e=>[e,e].join(" "),un=e=>["90deg",[$r.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),dn=e=>[[$r.surfaceBackgroundColor,e].join(" "),"transparent 1%"].join(","),mn=[`linear-gradient( ${[`${$r.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`,`linear-gradient( ${["90deg",`${$r.surfaceBorderSubtleColor} 1px`,"transparent 1px"].join(",")} )`].join(","),pn=(e,t,r)=>{switch(e){case"dotted":return((e,t)=>dt("background:",(e=>[`linear-gradient( ${un(e)} ) center`,`linear-gradient( ${dn(e)} ) center`,$r.surfaceBorderBoldColor].join(","))(t),";background-size:",ln(e),";",""))(t,r);case"grid":return(e=>dt("background:",$r.surfaceBackgroundColor,";background-image:",mn,";background-size:",ln(e),";",""))(t);case"primary":return an;case"secondary":return sn;case"tertiary":return cn}};function yn(e){const{backgroundSize:t=12,borderBottom:r=!1,borderLeft:n=!1,borderRight:o=!1,borderTop:a=!1,className:s,variant:i="primary",...c}=Gt(e,"Surface"),l=Vt(),u=(0,Q.useMemo)((()=>{const e={};return e.borders=function(e){let{borderBottom:t,borderLeft:r,borderRight:n,borderTop:o}=e;const a=`1px solid ${$r.surfaceBorderColor}`;return dt({borderBottom:t?a:void 0,borderLeft:r?a:void 0,borderRight:n?a:void 0,borderTop:o?a:void 0},"","")}({borderBottom:r,borderLeft:n,borderRight:o,borderTop:a}),l(on,e.borders,pn(i,`${t}px`,t-1+"px"),s)}),[t,r,n,o,a,s,l,i]);return{...c,className:u}}const hn=Rt((function(e,t){const{children:r,elevation:n,isBorderless:o,isRounded:a,size:s,...i}=function(e){const{className:t,elevation:r=0,isBorderless:n=!1,isRounded:o=!0,size:a="medium",...s}=Gt(function(e){let{elevation:t,isElevated:r,...n}=e;const o={...n};let a=t;var s;return r&&(nn()("Card isElevated prop",{since:"5.9",alternative:"elevation"}),null!==(s=a)&&void 0!==s||(a=2)),void 0!==a&&(o.elevation=a),o}(e),"Card"),i=Vt();return{...yn({...s,className:(0,Q.useMemo)((()=>i(Yr,n&&Kr,o&&Xr,t)),[t,i,n,o])}),elevation:r,isBorderless:n,isRounded:o,size:a}}(e),c=a?$r.cardBorderRadius:0,l=Vt(),u=(0,Q.useMemo)((()=>l(dt({borderRadius:c},"",""))),[l,c]),d=(0,Q.useMemo)((()=>{const e={size:s,isBorderless:o};return{CardBody:e,CardHeader:e,CardFooter:e}}),[o,s]);return(0,Q.createElement)(ft,{value:d},(0,Q.createElement)(Ut,G({},i,{ref:t}),(0,Q.createElement)(Ut,{className:l(Vr)},r),(0,Q.createElement)(qr,{className:u,isInteractive:!1,value:n?1:0}),(0,Q.createElement)(qr,{className:u,isInteractive:!1,value:n})))}),"Card"),_n=dt("@media only screen and ( min-device-width: 40em ){&::-webkit-scrollbar{height:12px;width:12px;}&::-webkit-scrollbar-track{background-color:transparent;}&::-webkit-scrollbar-track{background:",$r.colorScrollbarTrack,";border-radius:8px;}&::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:",$r.colorScrollbarThumb,";border:2px solid rgba( 0, 0, 0, 0 );border-radius:7px;}&:hover::-webkit-scrollbar-thumb{background-color:",$r.colorScrollbarThumbHover,";}}",""),fn={name:"13udsys",styles:"height:100%"},gn={name:"7zq9w",styles:"scroll-behavior:smooth"},bn={name:"q33xhg",styles:"overflow-x:auto;overflow-y:hidden"},vn={name:"103x71s",styles:"overflow-x:hidden;overflow-y:auto"},Sn={name:"umwchj",styles:"overflow-y:auto"},wn=Rt((function(e,t){const r=function(e){const{className:t,scrollDirection:r="y",smoothScroll:n=!1,...o}=Gt(e,"Scrollable"),a=Vt();return{...o,className:(0,Q.useMemo)((()=>a(fn,_n,n&&gn,"x"===r&&bn,"y"===r&&vn,"auto"===r&&Sn,t)),[t,a,r,n])}}(e);return(0,Q.createElement)(Ut,G({},r,{ref:t}))}),"Scrollable"),En=Rt((function(e,t){const{isScrollable:r,...n}=function(e){const{className:t,isScrollable:r=!1,isShady:n=!1,size:o="medium",...a}=Gt(e,"CardBody"),s=Vt();return{...a,className:(0,Q.useMemo)((()=>s(Wr,Qr,en[o],n&&tn,"components-card__body",t)),[t,s,n,o]),isScrollable:r}}(e);return r?(0,Q.createElement)(wn,G({},n,{ref:t})):(0,Q.createElement)(Ut,G({},n,{ref:t}))}),"CardBody"),Tn=r.p+"../assets/images/logo.svg?ver=cc343b18b042f1622414";var Rn=r(4848);const On=e=>(0,Rn.jsx)("img",{src:Tn,width:"241",height:"64",alt:(0,W.__)("WooPayments logo","woocommerce-payments"),...e}),An=({style:e})=>{let t,r,n,o="woocommerce-payments-banner";return"account-page"===e?(t=196,r=65,n=!0,o+=" account-page"):(t=257,r=70,n=!1),(0,Rn.jsx)(hn,{size:"large",className:o,children:(0,Rn.jsxs)(En,{children:[(0,Rn.jsx)(On,{width:t,height:r,className:"woocommerce-payments-banner-logo"}),n&&(0,Rn.jsx)("div",{className:"woocommerce-payments-banner-pill",children:(0,Rn.jsx)("div",{children:(0,W.__)("Recommended","woocommerce-payments")})})]})})},xn=({children:e,displayBanner:t=!0})=>(0,Rn.jsxs)("div",{className:"wcpay-settings-layout",children:[t&&(0,Rn.jsx)(An,{}),e]});function Cn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function In(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Nn(Object(r),!0).forEach((function(t){Cn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function kn(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function jn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Pn(Object(r),!0).forEach((function(t){jn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Fn(e,t){if(null==e)return{};var r,n,o={},a=Object.keys(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function Mn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Ln(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Mn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var Un=(0,q.createContext)({}),$n=function(e,t,r){void 0===r&&(r=t.children);var n=(0,q.useContext)(Un);return n.useCreateElement?n.useCreateElement(e,t,r):"string"==typeof e&&function(e){return"function"==typeof e}(r)?(t.children,r(Fn(t,["children"]))):(0,q.createElement)(e,t,r)};function Bn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(r),!0).forEach((function(t){Bn(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Hn(e){var t;if(!function(e){return"object"==typeof e&&null!=e}(e))return!1;var r=Object.getPrototypeOf(e);return null==r||(null===(t=r.constructor)||void 0===t?void 0:t.toString())===Object.toString()}function Yn(e,t){for(var r={},n={},o=0,a=Object.keys(e);o<a.length;o++){var s=a[o];t.indexOf(s)>=0?r[s]=e[s]:n[s]=e[s]}return[r,n]}function Vn(e,t){if(void 0===t&&(t=[]),!Hn(e.state))return Yn(e,t);var r=Yn(e,[].concat(t,["state"])),n=r[0],o=r[1],a=n.state,s=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],t.indexOf(r)>=0||(o[r]=e[r]);return o}(n,["state"]);return[qn(qn({},a),s),o]}function Wn(e,t){if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("object"!=typeof e)return!1;if("object"!=typeof t)return!1;var r=Object.keys(e),n=Object.keys(t),o=r.length;if(n.length!==o)return!1;for(var a=0,s=r;a<s.length;a++){var i=s[a];if(e[i]!==t[i])return!1}return!0}function Gn(e){return"normalizePropsAreEqualInner"===e.name?e:function(t,r){return Hn(t.state)&&Hn(r.state)?e(qn(qn({},t.state),t),qn(qn({},r.state),r)):e(t,r)}}function Qn(e){var t=e.as,r=e.useHook,n=e.memo,o=e.propsAreEqual,a=void 0===o?null==r?void 0:r.unstable_propsAreEqual:o,s=e.keys,i=void 0===s?(null==r?void 0:r.__keys)||[]:s,c=e.useCreateElement,l=void 0===c?$n:c,u=function(e,n){var o=e.as,a=void 0===o?t:o,s=Fn(e,["as"]);if(r){var c,u=Vn(s,i),d=u[0],m=u[1],p=r(d,Dn({ref:n},m)),y=p.wrapElement,h=Fn(p,["wrapElement"]),_=(null===(c=a.render)||void 0===c?void 0:c.__keys)||a.__keys,f=_&&Vn(s,_)[0],g=f?Dn(Dn({},h),f):h,b=l(a,g);return y?y(b):b}return l(a,Dn({ref:n},s))};return u=function(e){return(0,q.forwardRef)(e)}(u),n&&(u=function(e,t){return(0,q.memo)(e,t)}(u,a&&Gn(a))),u.__keys=i,u.unstable_propsAreEqual=Gn(a||Wn),u}function Zn(e,t){(0,q.useDebugValue)(e);var r=(0,q.useContext)(Un);return null!=r[e]?r[e]:t}function Kn(e){var t,r,n,o=(n=e.compose,Array.isArray(n)?n:void 0!==n?[n]:[]),a=function(t,r){if(e.useOptions&&(t=e.useOptions(t,r)),e.name&&(t=function(e,t,r){void 0===t&&(t={}),void 0===r&&(r={});var n="use"+e+"Options";(0,q.useDebugValue)(n);var o=Zn(n);return o?Dn(Dn({},t),o(t,r)):t}(e.name,t,r)),e.compose)for(var n,a=Ln(o);!(n=a()).done;)t=n.value.__useOptions(t,r);return t},s=function(t,r,n){if(void 0===t&&(t={}),void 0===r&&(r={}),void 0===n&&(n=!1),n||(t=a(t,r)),e.useProps&&(r=e.useProps(t,r)),e.name&&(r=function(e,t,r){void 0===t&&(t={}),void 0===r&&(r={});var n="use"+e+"Props";(0,q.useDebugValue)(n);var o=Zn(n);return o?o(t,r):r}(e.name,t,r)),e.compose)if(e.useComposeOptions&&(t=e.useComposeOptions(t,r)),e.useComposeProps)r=e.useComposeProps(t,r);else for(var s,i=Ln(o);!(s=i()).done;)r=(0,s.value)(t,r,!0);var c={},l=r||{};for(var u in l)void 0!==l[u]&&(c[u]=l[u]);return c};s.__useOptions=a;var i=o.reduce((function(e,t){return e.push.apply(e,t.__keys||[]),e}),[]);return s.__keys=[].concat(i,(null===(t=e.useState)||void 0===t?void 0:t.__keys)||[],e.keys||[]),s.unstable_propsAreEqual=e.propsAreEqual||(null===(r=o[0])||void 0===r?void 0:r.unstable_propsAreEqual)||Wn,s}var Xn=Kn({name:"Role",keys:["unstable_system"],propsAreEqual:function(e,t){var r=e.unstable_system,n=kn(e,["unstable_system"]),o=t.unstable_system,a=kn(t,["unstable_system"]);return!(r!==o&&!Wn(r,o))&&Wn(n,a)}}),Jn=(Qn({as:"div",useHook:Xn}),Kn({name:"Separator",compose:Xn,keys:["orientation"],useOptions:function(e){var t=e.orientation;return In({orientation:void 0===t?"horizontal":t},kn(e,["orientation"]))},useProps:function(e,t){return In({role:"separator","aria-orientation":e.orientation},t)}})),eo=Qn({as:"hr",memo:!0,useHook:Jn});const to=new RegExp(/-left/g),ro=new RegExp(/-right/g),no=new RegExp(/Left/g),oo=new RegExp(/Right/g);function ao(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return()=>t?(0,W.isRTL)()?dt(t,""):dt(e,""):(0,W.isRTL)()?dt(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,mt.mapKeys)(e,((e,t)=>function(e){return"left"===e?"right":"right"===e?"left":to.test(e)?e.replace(to,"-right"):ro.test(e)?e.replace(ro,"-left"):no.test(e)?e.replace(no,"Right"):oo.test(e)?e.replace(oo,"Left"):e}(t)))}(e),""):dt(e,"")}ao.watch=()=>(0,W.isRTL)();const so={vertical:{start:"marginLeft",end:"marginRight"},horizontal:{start:"marginTop",end:"marginBottom"}};var io={name:"1u4hpl4",styles:"display:inline"};const co=Mt("hr",{target:"e19on6iw0"})("border:0;margin:0;",(e=>{let{"aria-orientation":t="horizontal"}=e;return"vertical"===t?io:void 0})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return dt({["vertical"===t?"borderRight":"borderBottom"]:"1px solid currentColor"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal"}=e;return dt({height:"vertical"===t?"auto":0,width:"vertical"===t?0:"auto"},"","")})," ",(e=>{let{"aria-orientation":t="horizontal",margin:r,marginStart:n,marginEnd:o}=e;return dt(ao({[so[t].start]:Zt(null!=n?n:r),[so[t].end]:Zt(null!=o?o:r)})(),"","")}),";"),lo=Rt((function(e,t){const r=Gt(e,"Divider");return(0,Q.createElement)(eo,G({as:co},r,{ref:t}))}),"Divider"),uo=Rt((function(e,t){const r=function(e){const{className:t,...r}=Gt(e,"CardDivider"),n=Vt();return{...r,className:(0,Q.useMemo)((()=>n(Gr,Zr,"components-card__divider",t)),[t,n])}}(e);return(0,Q.createElement)(lo,G({},r,{ref:t}))}),"CardDivider"),mo=window.wp.data,po=window.wp.dataControls,yo="/wc/v3/payments",ho="wc/payments",_o={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"},fo=e=>JSON.stringify(e,Object.keys(e).sort()),go={byId:{},queries:{},count:0,instant:{}},bo=e=>e&&e.deposits||{},vo=(e,t)=>(bo(e).byId||{})[t],So=e=>{const t=bo(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},s={};for(const[e,t]of Object.entries(a))t?.forEach((t=>{const{currency:r}=t;s[r]||(s[r]={currency:r,lastPaid:void 0,pending:void 0,available:void 0,instant:void 0}),s[r][e]=t}));const i=Object.values(s);return{account:o,currencies:[...i.filter((e=>o.default_currency===e.currency)),...i.filter((e=>o.default_currency!==e.currency))]}},wo=e=>(bo(e).overviews||{}).error,Eo=(e,t)=>{const r=fo(t);return(bo(e).queries||{})[r]||{}},To=(e,t)=>(Eo(e,t).data||[]).map(vo.bind(void 0,e)),Ro=e=>bo(e).count,Oo=(e,t)=>Eo(e,t).error||{},Ao=(e,t)=>{const r=fo(t);return(bo(e).summary||{})[r]||{}},xo=(e,t)=>Ao(e,t).data||{},Co=(e,t)=>Ao(e,t).error||{},No=e=>(bo(e).instant||{}).data,Io=window.wc.currency;var ko=r.n(Io);(0,W.__)("Australian dollar","woocommerce-payments"),(0,W.__)("Canadian dollar","woocommerce-payments"),(0,W.__)("Swiss franc","woocommerce-payments"),(0,W.__)("Danish krone","woocommerce-payments"),(0,W.__)("Euro","woocommerce-payments"),(0,W.__)("Pound sterling","woocommerce-payments"),(0,W.__)("Norwegian krone","woocommerce-payments"),(0,W.__)("New Zealand dollar","woocommerce-payments"),(0,W.__)("Swedish krona","woocommerce-payments"),(0,W.__)("United States (US) dollar","woocommerce-payments");const jo=e=>wcpaySettings.zeroDecimalCurrencies.includes(e.toLowerCase()),Po=(e,t="USD",r=null,n=!1)=>{const o=jo(t);o||(e/=100);const a=e<0,s=a?-1*e:e,i=a?"-":"",c=n?(e=>{const t=e.toUpperCase(),{currencyData:r,connect:{country:n="US"}}=wcpaySettings;if(r[n]?.code===t)return ko()(r[n]);const o=(0,mt.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),ko()(o)}return null})(t):((e,t=null)=>{const{currencyData:r,connect:{country:n="US"}}=wcpaySettings,o=(0,mt.find)(r,{code:e.toUpperCase()});if(o){if(null!==t&&t.toUpperCase()!==e.toUpperCase()||r[n]){const e=t?(0,mt.find)(r,{code:t.toUpperCase()}):r[n];e&&(o.decimalSeparator=e.decimalSeparator,o.thousandSeparator=e.thousandSeparator,o.symbolPosition=e.symbolPosition)}return ko()(o)}return null})(t,r);if(null===c)return i+Do(s,t,o);try{return i+("function"==typeof c.formatAmount?Fo(c.formatAmount(s)):Fo(c.formatCurrency(s)))}catch(e){return i+Fo(Do(s,t,o))}};function Do(e,t,r){try{return e.toLocaleString(void 0,{style:"currency",currency:t,currencyDisplay:"narrowSymbol",dummy:r})}catch(n){return(0,W.sprintf)(r?"%s %i":"%s %.2f",t.toUpperCase(),e)}}function Fo(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}const Mo=window.wp.url,Lo=window.moment;var Uo=r.n(Lo);const $o=window.wp.date,Bo=(window.wc.number,e=>(0,Mo.addQueryArgs)("admin.php",e)),zo=(e,t=!1)=>{const r=t?Uo()(e).endOf("day").utc().toISOString():Uo()(e).startOf("day").utc().toISOString();return e&&(0,$o.dateI18n)("Y-m-d H:i:s",r,!0)};function qo(e){return{type:_o.SET_DEPOSIT,data:e}}function Ho(e){return{type:_o.SET_ALL_DEPOSITS_OVERVIEWS,data:e}}function Yo(e,t){return{type:_o.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS,error:t}}function Vo(e,t){return{type:_o.SET_DEPOSITS,query:e,data:t}}function Wo(e){return{type:_o.SET_DEPOSITS_COUNT,data:e}}function Go(e,t,r){return{type:_o.SET_ERROR_FOR_DEPOSIT_QUERY,query:e,data:t,error:r}}function Qo(e,t){return{type:_o.SET_DEPOSITS_SUMMARY,query:e,data:t}}function Zo(e,t,r){return{type:_o.SET_ERROR_FOR_DEPOSITS_SUMMARY,query:e,data:t,error:r}}function Ko(e){return{type:_o.SET_INSTANT_DEPOSIT,data:e}}function*Xo(e){try{yield(0,mo.dispatch)(ho).startResolution("getInstantDeposit",[e]);const t=yield(0,po.apiFetch)({path:"/wc/v3/payments/deposits",method:"POST",data:{type:"instant",currency:e}});yield Ko(t),yield(0,mo.dispatch)(ho).invalidateResolutionForStoreSelector("getDeposits"),yield(0,mo.dispatch)(ho).invalidateResolutionForStoreSelector("getAllDepositsOverviews"),yield(0,mo.dispatch)("core/notices").createSuccessNotice((0,W.sprintf)((0,W.__)("Instant deposit for %s in transit.","woocommerce-payments"),Po(t.amount)),{actions:[{label:(0,W.__)("View details","woocommerce-payments"),url:Bo({page:"wc-admin",path:"/payments/deposits/details",id:t.id})}]})}catch{yield(0,mo.dispatch)("core/notices").createErrorNotice((0,W.__)("Error creating instant deposit.","woocommerce-payments"))}finally{yield(0,mo.dispatch)(ho).finishResolution("getInstantDeposit",[e])}}function*Jo(e){if(/\W/.test(e))return;const t=(0,Mo.addQueryArgs)(`${yo}/deposits/${e}`);try{const e=yield(0,po.apiFetch)({path:t});yield qo(e)}catch(e){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving deposit.","woocommerce-payments"))}}function*ea(){const e=(0,Mo.addQueryArgs)(`${yo}/deposits/overview-all`);try{const t=yield(0,po.apiFetch)({path:e});yield Ho(t)}catch(e){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving all deposits' overviews.","woocommerce-payments")),yield Yo()}}const ta=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:zo(e.dateBefore,!0),date_after:zo(e.dateAfter),date_between:e.dateBetween&&[zo(e.dateBetween[0]),zo(e.dateBetween[1],!0)],status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.locale});function ra(e){return(0,Mo.addQueryArgs)(`${yo}/deposits/download`,ta(e))}function*na(e){const t=(0,Mo.addQueryArgs)(`${yo}/deposits`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...ta(e)});try{const r=yield(0,po.apiFetch)({path:t})||{};yield Vo(e,r.data),yield Wo(r.total_count);for(const e in r.data)yield mo.controls.dispatch(ho,"finishResolution","getDeposit",[r.data[e].id])}catch(t){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving deposits.","woocommerce-payments")),yield Go(e,null,t)}}function*oa(e){const t=(0,Mo.addQueryArgs)(`${yo}/deposits/summary`,ta(e));try{const r=yield(0,po.apiFetch)({path:t});yield Qo(e,r)}catch(t){yield Zo(e,null,t)}}const aa={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"},sa={summary:{},fraudProtection:{review:{summary:{}},block:{summary:{}}}},ia=e=>e&&e.transactions||{},ca=(e,t)=>{const r=fo(t);return ia(e)[r]||{}},la=(e,t)=>ca(e,t).data||[],ua=(e,t)=>ca(e,t).error||{},da=(e,t)=>{const r=fo(t);return ia(e).summary[r]||{}},ma=(e,t)=>da(e,t).data||{},pa=(e,t)=>da(e,t).error||{},ya=(e,t,r)=>{const n=fo(r);return ia(e).fraudProtection?.[t]?.[n]||{}},ha=(e,t,r)=>ya(e,t,r).data||[],_a=(e,t,r)=>ya(e,t,r).error||{},fa=(e,t,r)=>{const n=fo(r);return ia(e).fraudProtection?.[t]?.summary[n]||{}},ga=(e,t,r)=>fa(e,t,r).data||{},ba=(e,t,r)=>fa(e,t,r).error||{};function va(e,t){return{type:aa.SET_TRANSACTIONS,query:e,data:t}}function Sa(e,t,r){return{type:aa.SET_ERROR_FOR_TRANSACTIONS,query:e,data:t,error:r}}function wa(e,t){return{type:aa.SET_TRANSACTIONS_SUMMARY,query:e,data:t}}function Ea(e,t,r){return{type:aa.SET_ERROR_FOR_TRANSACTIONS_SUMMARY,query:e,data:t,error:r}}function Ta(e,t,r){return{type:aa.SET_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:r}}function Ra(e,t,r){return{type:aa.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS,status:e,query:t,data:null,error:r}}function Oa(e,t,r){return{type:aa.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:r}}function Aa(e,t,r){return{type:aa.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY,status:e,query:t,data:null,error:r}}const xa=e=>({user_email:e.userEmail,match:e.match,date_before:zo(e.dateBefore,!0),date_after:zo(e.dateAfter),date_between:e.dateBetween&&[zo(e.dateBetween[0]),zo(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot,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,search:e.search,user_timezone:Uo()(new Date).format("Z"),locale:e.locale});function*Ca(e){const t=(0,Mo.addQueryArgs)(`${yo}/transactions`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...xa(e)});try{const r=yield(0,po.apiFetch)({path:t});yield va(e,r.data||[])}catch(t){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving transactions.","woocommerce-payments")),yield Sa(e,null,t)}}function Na(e){return(0,Mo.addQueryArgs)(`${yo}/transactions/download`,xa(e))}function*Ia(e){const t=(0,Mo.addQueryArgs)(`${yo}/transactions/summary`,xa(e));try{const r=yield(0,po.apiFetch)({path:t});yield wa(e,r)}catch(t){yield Ea(e,null,t)}}function*ka(e,t){const r=(0,Mo.addQueryArgs)(`${yo}/transactions/fraud-outcomes`,{status:e,page:t.paged,sort:t.orderby,pagesize:t.perPage,direction:t.order,additional_status:t.additionalStatus,...xa(t)});try{const n=yield(0,po.apiFetch)({path:r});yield Ta(e,t,n.data||[])}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield Ta(e,t,[]));yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving transactions.","woocommerce-payments")),yield Ra(e,t,r)}}function*ja(e,t){const r=(0,Mo.addQueryArgs)(`${yo}/transactions/fraud-outcomes/summary`,{status:e,additional_status:t.additionalStatus}),n={count:0,total:0};try{const o=yield(0,po.apiFetch)({path:r});yield Oa(e,t,o||n)}catch(r){if("wcpay_fraud_outcome_not_found"===r.code)return void(yield Oa(e,t,n));yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving on review transactions.","woocommerce-payments")),yield Aa(e,t,r)}}function Pa(e,t){return(0,Mo.addQueryArgs)(`${yo}/transactions/fraud-outcomes/download`,{status:e,sort:t.orderby,direction:t.order,additional_status:t.additionalStatus,...xa(t)})}const Da={SET_CHARGE:"SET_CHARGE",SET_ERROR_FOR_CHARGE:"SET_ERROR_FOR_CHARGE"},Fa=(e,t)=>e.charges[t]&&e.charges[t].data?e.charges[t].data:{},Ma=(e,t)=>e.charges[t]&&e.charges[t].error?e.charges[t].error:{},La=(e,t)=>Fa(e,t),Ua=(e,t)=>Ma(e,t);function $a(e,t){return{type:Da.SET_CHARGE,id:e,data:t}}function Ba(e,t,r){return{type:Da.SET_ERROR_FOR_CHARGE,id:e,data:t,error:r}}function*za(e){try{const t=yield(0,po.apiFetch)({path:`${yo}/charges/${e}`});yield $a(e,t)}catch(t){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving transaction.","woocommerce-payments")),yield Ba(e,null,t)}}function*qa(e){try{const t=yield(0,po.apiFetch)({path:`${yo}/charges/order/${e}`});yield $a(e,t)}catch(t){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving transaction.","woocommerce-payments")),yield Ba(e,null,t)}}const Ha={SET_TIMELINE:"SET_TIMELINE",SET_ERROR_FOR_TIMELINE:"SET_ERROR_FOR_TIMELINE"},Ya=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].data?e.timeline[t].data:{},Va=(e,t)=>e.timeline&&e.timeline[t]&&e.timeline[t].error?e.timeline[t].error:{};function Wa(e,t){return{id:e,type:Ha.SET_TIMELINE,data:t}}function Ga(e,t){return{id:e,type:Ha.SET_ERROR_FOR_TIMELINE,error:t}}function*Qa(e){try{const t=yield(0,po.apiFetch)({path:`${yo}/timeline/${e}`});yield Wa(e,t.data)}catch(t){yield Ga(e,t)}}const Za={SET_DISPUTE:"SET_DISPUTE",SET_ERROR_FOR_DISPUTE:"SET_ERROR_FOR_DISPUTE",SET_DISPUTES:"SET_DISPUTES",SET_DISPUTES_SUMMARY:"SET_DISPUTES_SUMMARY"},Ka={byId:{},queries:{},summary:{},cached:{}},Xa=e=>e&&e.disputes||{},Ja=(e,t)=>(Xa(e).byId||{})[t],es=(e,t)=>{const r=Xa(e).byId||{};return r[t]?.error},ts=(e,t)=>(Xa(e).cached||{})[t],rs=(e,t)=>{const r=((e,t)=>{const r=fo(t);return(Xa(e).queries||{})[r]||{}})(e,t).data||[];return r.map(ts.bind(void 0,e))},ns=(e,t)=>((e,t)=>{const r=fo(t);return(Xa(e).summary||{})[r]||{}})(e,t).data||{};var os;!function(e){e.SET_PAYMENT_INTENT="SET_PAYMENT_INTENT",e.SET_ERROR_FOR_PAYMENT_INTENT="SET_ERROR_FOR_PAYMENT_INTENT"}(os||(os={}));const as=os;function ss(e,t){return{type:as.SET_PAYMENT_INTENT,id:e,data:t}}function is(e,t){return{type:as.SET_ERROR_FOR_PAYMENT_INTENT,id:e,error:t}}function*cs(e,t){var r;const n=e.payment_intent;try{yield(0,po.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.number}}),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getTimeline"),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield mo.controls.dispatch("core/notices","createSuccessNotice",(0,W.sprintf)((0,W.__)("Refunded payment #%s.","woocommerce-payments"),n))}catch(e){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.sprintf)((0,W.__)("There has been an error refunding the payment #%s. Please try again later.","woocommerce-payments"),n))}}function*ls(e){try{const t=yield(0,po.apiFetch)({path:`${yo}/payment_intents/${e}`});yield ss(e,t)}catch(t){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving transaction.","woocommerce-payments")),yield is(e,t)}}function us(e){return{type:Za.SET_DISPUTE,data:e}}function ds(e,t,r){return{type:Za.SET_ERROR_FOR_DISPUTE,id:e,data:t,error:r}}function ms(e,t){return{type:Za.SET_DISPUTES,query:e,data:t}}function ps(e,t){return{type:Za.SET_DISPUTES_SUMMARY,query:e,data:t}}function*ys(e){const{id:t,payment_intent:r}=e;try{yield mo.controls.dispatch(ho,"startResolution","getDispute",[t]);const e=yield(0,po.apiFetch)({path:`${yo}/disputes/${t}/close`,method:"post"});yield us(e),yield ls(r),yield mo.controls.dispatch(ho,"finishResolution","getDispute",[t]);const n=e.order?(0,W.sprintf)((0,W.__)("You have accepted the dispute for order #%s.","woocommerce-payments"),e.order.number):(0,W.__)("You have accepted the dispute.","woocommerce-payments");yield mo.controls.dispatch("core/notices","createSuccessNotice",n)}catch(e){const r=(0,W.__)("There has been an error accepting the dispute. Please try again later.","woocommerce-payments");yield mo.controls.dispatch("core/notices","createErrorNotice",r),yield mo.controls.dispatch(ho,"finishResolution","getDispute",[t])}}const hs=e=>({user_email:e.userEmail,match:e.match,store_currency_is:e.storeCurrencyIs,date_before:zo(e.dateBefore,!0),date_after:zo(e.dateAfter),date_between:e.dateBetween&&[zo(e.dateBetween[0]),zo(e.dateBetween[1],!0)],search:e.search,status_is:e.statusIs,status_is_not:e.statusIsNot,locale:e.locale});function _s(e){return(0,Mo.addQueryArgs)(`${yo}/disputes/download`,hs(e))}function*fs(e){const t=(0,Mo.addQueryArgs)(`${yo}/disputes/${e}`);try{const e=yield(0,po.apiFetch)({path:t});yield us(e)}catch(t){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving dispute.","woocommerce-payments")),yield ds(e,void 0,t)}}function*gs(e){const t=(0,Mo.addQueryArgs)(`${yo}/disputes`,{page:e.paged,pagesize:e.perPage,sort:(0,mt.snakeCase)(e.orderBy),direction:e.order,...hs(e)});try{const r=yield(0,po.apiFetch)({path:t})||{};yield ms(e,r.data)}catch(e){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving disputes.","woocommerce-payments"))}}function*bs(e){const t=(0,Mo.addQueryArgs)(`${yo}/disputes/summary`,{page:e.paged,pagesize:e.perPage,...hs(e)});try{const r=yield(0,po.apiFetch)({path:t});yield ps(e,r)}catch(e){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving the summary of disputes.","woocommerce-payments"))}}const vs=window.wc.wcSettings,Ss=((0,W.__)("Bank cannot process","woocommerce-payments"),(0,W.__)("Check returned","woocommerce-payments"),(0,W.__)("Credit not processed","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("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,W.__)("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,W.__)("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,W.__)("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,W.__)("The cardholder claims a credit was not processed.","woocommerce-payments"),(0,W.__)("Customer initiated","woocommerce-payments"),(0,W.__)("Debit not authorized","woocommerce-payments"),(0,W.__)("Duplicate","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("The customer claims they were charged multiple times for the same product or service.","woocommerce-payments"),(0,W.__)("Demonstrate that each payment was for a separate product or service.","woocommerce-payments"),(0,W.__)("Determine if your customer was incorrectly charged multiple times.","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("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,W.__)("The cardholder claims this is a duplicate transaction.","woocommerce-payments"),(0,W.__)("Transaction unauthorized","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("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,W.__)("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,W.__)("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,W.__)("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,W.__)("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,W.__)("The cardholder claims this is an unauthorized transaction.","woocommerce-payments"),(0,W.__)("General","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("Incorrect account details","woocommerce-payments"),(0,W.__)("Insufficient funds","woocommerce-payments"),(0,W.__)("Product not received","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("The customer claims they did not receive the products or services purchased.","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("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,W.__)("The cardholder claims the product was not received.","woocommerce-payments"),(0,W.__)("Product unacceptable","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("The product or service was received but was defective, damaged, or not as described.","woocommerce-payments"),(0,W.__)("Demonstrate that the product or service was delivered as described at the time of purchase.","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("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,W.__)("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,W.__)("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,W.__)("The cardholder claims the product was unacceptable.","woocommerce-payments"),(0,W.__)("Subscription canceled","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("The customer claims that you continued to charge them after a subscription was canceled.","woocommerce-payments"),(0,W.__)("Prove that the subscription was still active and that the customer was aware of, and did not follow, your cancellation procedure.","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("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,W.__)("The cardholder claims a subscription was canceled.","woocommerce-payments"),(0,W.__)("Unrecognized","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("The customer doesn’t recognize the payment appearing on their card statement.","woocommerce-payments"),(0,W.__)("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,W.__)("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,W.__)("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,W.__)("Inquiry: Needs response","woocommerce-payments"),warning_under_review:(0,W.__)("Inquiry: Under review","woocommerce-payments"),warning_closed:(0,W.__)("Inquiry: Closed","woocommerce-payments"),needs_response:(0,W.__)("Needs response","woocommerce-payments"),under_review:(0,W.__)("Under review","woocommerce-payments"),charge_refunded:(0,W.__)("Charge refunded","woocommerce-payments"),won:(0,W.__)("Won","woocommerce-payments"),lost:(0,W.__)("Lost","woocommerce-payments")}),ws=(Object.entries(Ss).map((([e,t])=>({label:t,value:e}))).filter((function(e){return null!=e})),(0,W.__)("Dispute currency","woocommerce-payments"),(0,W.__)("All currencies","woocommerce-payments"),(0,W.__)("Show","woocommerce-payments"),(0,W.__)("Needs response","woocommerce-payments"),(0,W.__)("All disputes","woocommerce-payments"),(0,W.__)("Advanced filters","woocommerce-payments"),(0,vs.getSetting)("wcVersion")),Es=parseFloat(ws),Ts=(Es<7.8?(0,W.__)("Disputes match {{select /}} filters","woocommerce-payments"):(0,W.__)("Disputes match <select /> filters","woocommerce-payments"),(0,W.__)("Disputed on date","woocommerce-payments"),(0,W.__)("Remove dispute date filter","woocommerce-payments"),(0,W.__)("Select a dispute date filter match","woocommerce-payments"),Es<7.8?(0,W.__)("{{title}}Date{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,W.__)("<title>Date</title> <rule /> <filter />","woocommerce-payments"),(0,W.__)("Select a dispute date","woocommerce-payments"),(0,W.__)("Before","woocommerce-payments"),(0,W.__)("After","woocommerce-payments"),(0,W.__)("Between","woocommerce-payments"),(0,W.__)("Status","woocommerce-payments"),(0,W.__)("Remove dispute status filter","woocommerce-payments"),(0,W.__)("Select a dispute status filter match","woocommerce-payments"),Es<7.8?(0,W.__)("{{title}}Status{{/title}} {{rule /}} {{filter /}}","woocommerce-payments"):(0,W.__)("<title>Status</title> <rule /> <filter />","woocommerce-payments"),(0,W.__)("Select a dispute status","woocommerce-payments"),(0,W._x)("Is","dispute status","woocommerce-payments"),(0,W._x)("Is not","dispute status","woocommerce-payments"),{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"}),Rs={isSaving:!1,savingError:null,data:{}},Os={},As=[],xs=e=>e&&e.settings||Os,Cs=e=>xs(e).data||Os,Ns=e=>Cs(e).account_business_support_address||Os,Is=e=>Cs(e).duplicated_payment_method_ids||Os,ks=e=>Cs(e).is_wcpay_enabled||!1,js=e=>Cs(e).enabled_payment_method_ids||As,Ps=e=>Cs(e).available_payment_method_ids||As,Ds=e=>Cs(e).payment_method_statuses||As,Fs=e=>xs(e).isSaving||!1,Ms=e=>Cs(e).account_statement_descriptor||"",Ls=e=>Cs(e).account_statement_descriptor_kanji||"",Us=e=>Cs(e).account_statement_descriptor_kana||"",$s=e=>Cs(e).account_business_name||"",Bs=e=>Cs(e).account_business_url||"",zs=e=>Cs(e).account_business_support_address||"",qs=e=>Ns(e).country||"",Hs=e=>Ns(e).line1||"",Ys=e=>Ns(e).line2||"",Vs=e=>Ns(e).city||"",Ws=e=>Ns(e).state||"",Gs=e=>Ns(e).postal_code||"",Qs=e=>Cs(e).account_business_support_email||"",Zs=e=>Cs(e).account_business_support_phone||"",Ks=e=>Cs(e).account_branding_logo||"",Xs=e=>Cs(e).account_domestic_currency||"",Js=e=>Cs(e).deposit_schedule_interval||"",ei=e=>Cs(e).reporting_export_language||"",ti=e=>Cs(e).deposit_schedule_weekly_anchor||"",ri=e=>Cs(e).deposit_schedule_monthly_anchor||"",ni=e=>Cs(e).deposit_delay_days||"7",oi=e=>Cs(e).deposit_completed_waiting_period||!1,ai=e=>Cs(e).deposit_status||"",si=e=>Cs(e).deposit_restrictions||"",ii=e=>Cs(e).is_manual_capture_enabled||!1,ci=e=>Cs(e).is_test_mode_enabled||!1,li=e=>Cs(e).is_dev_mode_enabled||!1,ui=e=>Cs(e).is_payment_request_enabled||!1,di=e=>Cs(e).is_debug_log_enabled||!1,mi=e=>Cs(e).is_multi_currency_enabled||!1,pi=e=>Cs(e).payment_request_enabled_locations||As,yi=e=>Cs(e).payment_request_button_type||"",hi=e=>Cs(e).payment_request_button_size||"",_i=e=>Cs(e).payment_request_button_theme||"",fi=e=>{const t=Cs(e)?.payment_request_button_border_radius;return 0===t||"0"===t||t?t:parseInt(null!==(r=wcpaySettings?.defaultExpressCheckoutBorderRadius)&&void 0!==r?r:4,10);var r},gi=e=>Cs(e).is_saved_cards_enabled||!1,bi=e=>xs(e).savingError,vi=e=>Cs(e).is_card_present_eligible||!1,Si=e=>Cs(e).is_wcpay_subscriptions_enabled||!1,wi=e=>Cs(e).is_wcpay_subscriptions_eligible||!1,Ei=e=>Cs(e).is_subscriptions_plugin_active||!1,Ti=e=>Cs(e).is_woopay_enabled||!1,Ri=e=>Cs(e).woopay_custom_message||"",Oi=e=>Cs(e).woopay_store_logo||"",Ai=e=>Cs(e).woopay_enabled_locations||As,xi=e=>Cs(e).current_protection_level||"basic",Ci=e=>Cs(e).advanced_fraud_protection_settings||As,Ni=e=>Cs(e).show_woopay_incompatibility_notice||!1,Ii=e=>Cs(e).show_express_checkout_incompatibility_notice||!1,ki=e=>Cs(e).is_stripe_billing_enabled||!1,ji=e=>Cs(e).is_migrating_stripe_billing||!1,Pi=e=>Cs(e).stripe_billing_subscription_count||0,Di=e=>Cs(e).stripe_billing_migrated_count||0;function Fi(e){return{type:Ts.SET_SETTINGS_VALUES,payload:e}}function Mi(e){return Fi({is_saved_cards_enabled:e})}function Li(e){return Fi({is_card_present_eligible:e})}function Ui(e){return Fi({payment_request_button_type:e})}function $i(e){return Fi({payment_request_button_size:e})}function Bi(e){return Fi({payment_request_button_theme:e})}function zi(e){return Fi({payment_request_button_border_radius:e})}function qi(e){return{type:Ts.SET_SETTINGS,data:e}}function Hi(e){return Fi({is_wcpay_enabled:e})}function Yi(e){return Fi({is_payment_request_enabled:e})}function Vi(e){return Fi({enabled_payment_method_ids:[...e]})}function Wi(e){return Fi({available_payment_method_ids:[...e]})}function Gi(e,t){return{type:Ts.SET_IS_SAVING_SETTINGS,isSaving:e,error:t}}function Qi(e){return{type:Ts.SET_SELECTED_PAYMENT_METHOD,id:e}}function Zi(e){return{type:Ts.SET_UNSELECTED_PAYMENT_METHOD,id:e}}function Ki(e){return Fi({is_manual_capture_enabled:e})}function Xi(e){return Fi({is_test_mode_enabled:e})}function Ji(e){return Fi({is_debug_log_enabled:e})}function ec(e){return Fi({is_multi_currency_enabled:e})}function tc(e){return Fi({is_wcpay_subscriptions_enabled:e})}function rc(e){return Fi({account_statement_descriptor:e})}function nc(e){return Fi({account_statement_descriptor_kanji:e})}function oc(e){return Fi({account_statement_descriptor_kana:e})}function ac(e){return Fi({account_business_name:e})}function sc(e){return Fi({account_business_url:e})}function ic(e){return Fi({account_business_support_address:e})}function cc(e){return Fi({account_business_support_email:e})}function lc(e){return Fi({account_business_support_phone:e})}function uc(e){return Fi({account_branding_logo:e})}function dc(e){return Fi({deposit_schedule_interval:e})}function mc(e){return Fi({deposit_schedule_weekly_anchor:e})}function pc(e){return Fi({deposit_schedule_monthly_anchor:""===e?null:parseInt(e,10)})}function yc(e){return Fi({reporting_export_language:e})}function*hc(){let e=null;try{const e=(0,mo.select)(ho).getSettings();yield Gi(!0,null);const t=yield(0,po.apiFetch)({path:`${yo}/settings`,method:"post",data:e});yield Fi({payment_method_statuses:t.data.payment_method_statuses}),yield(0,mo.dispatch)("core/notices").createSuccessNotice((0,W.__)("Settings saved.","woocommerce-payments"))}catch(t){e=t,yield(0,mo.dispatch)("core/notices").createErrorNotice((0,W.__)("Error saving settings.","woocommerce-payments")),e.server_error&&(yield(0,mo.dispatch)("core/notices").createErrorNotice(e.server_error))}finally{yield Gi(!1,e)}return null===e}function _c(e){return Fi({payment_request_enabled_locations:[...e]})}function fc(e){return Fi({is_woopay_enabled:e})}function gc(e){return Fi({woopay_custom_message:e})}function bc(e){return Fi({woopay_store_logo:e})}function vc(e){return Fi({woopay_enabled_locations:[...e]})}function Sc(e){return Fi({current_protection_level:e})}function Ec(e){return Fi({advanced_fraud_protection_settings:e})}function Tc(e){return Fi({is_stripe_billing_enabled:e})}function*Rc(){try{yield(0,mo.dispatch)(ho).startResolution("scheduleStripeBillingMigration"),yield(0,po.apiFetch)({path:`${yo}/settings/schedule-stripe-billing-migration`,method:"post"})}catch(e){yield(0,mo.dispatch)("core/notices").createErrorNotice((0,W.__)("Error starting the Stripe Billing migration.","woocommerce-payments"))}yield(0,mo.dispatch)(ho).finishResolution("scheduleStripeBillingMigration")}function*Oc(){const e=`${yo}/settings`;try{const t=yield(0,po.apiFetch)({path:e});yield qi(t)}catch(e){yield(0,mo.dispatch)("core/notices").createErrorNotice((0,W.__)("Error retrieving settings.","woocommerce-payments"))}}const Ac={SET_CURRENCIES:"SET_CURRENCIES",SET_AVAILABLE_CURRENCIES:"SET_AVAILABLE_CURRENCIES",SET_ENABLED_CURRENCIES:"SET_ENABLED_CURRENCIES",SET_DEFAULT_CURRENCY:"SET_DEFAULT_CURRENCY",SET_CURRENCY_SETTINGS:"SET_CURRENCY_SETTINGS",SET_STORE_SETTINGS:"SET_STORE_SETTINGS"},xc={},Cc=e=>e&&e.multiCurrency||{},Nc=e=>Cc(e).currencies||{},Ic=e=>Nc(e).available||{},kc=e=>Nc(e).enabled||{},jc=e=>Nc(e).default||{},Pc=e=>Cc(e).currency_settings||{},Dc=e=>Cc(e).settings||{},Fc=window.wp.domReady;var Mc=r.n(Fc);const Lc=(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]}Mc()((()=>{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)}))};function Uc(e){return{type:Ac.SET_CURRENCIES,data:e}}function $c(e){return{type:Ac.SET_AVAILABLE_CURRENCIES,data:e}}function Bc(e){return{type:Ac.SET_ENABLED_CURRENCIES,data:e}}function zc(e){return{type:Ac.SET_DEFAULT_CURRENCY,data:e}}function qc(e,t){return{type:Ac.SET_CURRENCY_SETTINGS,data:{code:e,data:t}}}function Hc(e){return{type:Ac.SET_STORE_SETTINGS,data:e}}function*Yc(e){const t=Object.keys((0,mo.select)(ho).getEnabledCurrencies()),r=e.filter((e=>!t.includes(e))),n=t.filter((t=>!e.includes(t)));try{const t=yield(0,po.apiFetch)({path:`${yo}/multi-currency/update-enabled-currencies`,method:"POST",data:{enabled:e}});yield Uc(t),yield(0,mo.dispatch)("core/notices").createSuccessNotice((0,W.__)("Enabled currencies updated.","woocommerce-payments")),Lc("wcpay_multi_currency_enabled_currencies_updated",{added_currencies:r,removed_currencies:n})}catch(e){yield(0,mo.dispatch)("core/notices").createErrorNotice((0,W.__)("Error updating enabled currencies.","woocommerce-payments"))}}function*Vc(e,t){try{const r=yield(0,po.apiFetch)({path:`${yo}/multi-currency/currencies/${e}`,method:"POST",data:t});yield qc(e,r),yield(0,mo.dispatch)("core/notices").createSuccessNotice((0,W.__)("Currency settings updated.","woocommerce-payments"))}catch(e){yield(0,mo.dispatch)("core/notices").createErrorNotice((0,W.__)("Error updating currency settings.","woocommerce-payments"))}}function*Wc(e,t,r=!1){try{const n=yield(0,po.apiFetch)({path:`${yo}/multi-currency/update-settings`,method:"POST",data:{wcpay_multi_currency_enable_auto_currency:e?"yes":"no",wcpay_multi_currency_enable_storefront_switcher:t?"yes":"no"}});if(yield Hc(n),r)return;yield(0,mo.dispatch)("core/notices").createSuccessNotice((0,W.__)("Store settings saved.","woocommerce-payments"))}catch(e){yield(0,mo.dispatch)("core/notices").createErrorNotice((0,W.__)("Error saving store settings.","woocommerce-payments"))}}function*Gc(){const e=`${yo}/multi-currency/currencies`;try{const t=yield(0,po.apiFetch)({path:e});yield Uc(t)}catch(e){yield(0,mo.dispatch)("core/notices").createErrorNotice((0,W.__)("Error retrieving currencies.","woocommerce-payments"))}}function*Qc(e){const t=`${yo}/multi-currency/currencies/${e}`;try{const r=yield(0,po.apiFetch)({path:t});yield qc(e,r)}catch(e){yield(0,mo.dispatch)("core/notices").createErrorNotice((0,W.__)("Error retrieving single currency settings.","woocommerce-payments"))}}function*Zc(){const e=`${yo}/multi-currency/get-settings`;try{const t=yield(0,po.apiFetch)({path:e});yield Hc(t)}catch(e){yield(0,mo.dispatch)("core/notices").createErrorNotice((0,W.__)("Error retrieving store settings.","woocommerce-payments"))}}const Kc=()=>(0,mo.useSelect)((e=>{const{getCurrencies:t,isResolving:r}=e(ho);return{currencies:t(),isLoading:r("getCurrencies",[])}}),[]),Xc=()=>{const e=(0,mo.useSelect)((e=>{const{getEnabledCurrencies:t}=e(ho);return t()})),{submitEnabledCurrenciesUpdate:t}=(0,mo.useDispatch)(ho);return{enabledCurrencies:e,submitEnabledCurrenciesUpdate:t}},Jc=()=>{const{storeSettings:e,isLoading:t}=(0,mo.useSelect)((e=>{const{getStoreSettings:t,isResolving:r}=e(ho);return{storeSettings:t(),isLoading:r("getStoreSettings",[])}})),{submitStoreSettingsUpdate:r}=(0,mo.useDispatch)(ho);return{storeSettings:e,isLoading:t,submitStoreSettingsUpdate:r}},el=()=>(0,mo.useSelect)((e=>{const{getDefaultCurrency:t}=e(ho);return t()})),tl={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"},rl=(e,t)=>e.readers[t]&&e.readers[t].data?e.readers[t].data:{},nl=(e,t)=>e.readers[t]&&e.readers[t].error?e.readers[t].error:{},ol=e=>e.readers&&e.readers.list?e.readers.list:{};function al(e,t){return{type:tl.SET_CARD_READER_STATS,id:e,data:t}}function sl(e,t){return{type:tl.SET_READERS,query:e,data:t}}function il(e,t,r){return{type:tl.SET_CARD_ERROR_FOR_READER_STATS,id:e,data:t,error:r}}function cl(e,t){return{type:tl.SET_CARD_ERROR_FOR_READERS,data:e,error:t}}function*ll(e,t){try{const r=yield(0,po.apiFetch)({path:`${yo}/readers/charges/${t}`});yield al(e,r)}catch(t){yield il(e,null,t)}}function*ul(e){const t=(0,Mo.addQueryArgs)(`${yo}/readers`,{limit:e.limit});try{const r=yield(0,po.apiFetch)({path:t})||{};yield sl(e,r)}catch(e){yield cl(null,e)}}var dl;!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"}(dl||(dl={}));const ml=dl,pl={},yl=e=>e&&e.capital||{},hl=e=>yl(e).summary,_l=e=>yl(e).summaryError,fl=e=>yl(e).loans||[],gl=e=>yl(e).loansError;function bl(e){return{type:ml.SET_ACTIVE_LOAN_SUMMARY,data:e}}function vl(e){return{type:ml.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY,error:e}}function Sl(e){return{type:ml.SET_LOANS,data:e.data}}function wl(e){return{type:ml.SET_ERROR_FOR_LOANS,error:e}}function*El(){const e=`${yo}/capital/active_loan_summary`;try{const t=yield(0,po.apiFetch)({path:e});yield bl(t)}catch(e){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield vl(e)}}function*Tl(){const e=`${yo}/capital/loans`;try{const t=yield(0,po.apiFetch)({path:e});yield Sl(t)}catch(e){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving the active loan summary.","woocommerce-payments")),yield wl(e)}}const Rl={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"},Ol={summary:{}},Al=e=>e&&e.documents||{},xl=(e,t)=>{const r=fo(t);return Al(e)[r]||{}},Cl=(e,t)=>xl(e,t).data||[],Nl=(e,t)=>xl(e,t).error||{},Il=(e,t)=>{const r=fo(t);return Al(e).summary[r]||{}},kl=(e,t)=>Il(e,t).data||{},jl=(e,t)=>Il(e,t).error||{};function Pl(e,t){return{type:Rl.SET_DOCUMENTS,query:e,data:t}}function Dl(e,t,r){return{type:Rl.SET_ERROR_FOR_DOCUMENTS,query:e,data:t,error:r}}function Fl(e,t){return{type:Rl.SET_DOCUMENTS_SUMMARY,query:e,data:t}}function Ml(e,t,r){return{type:Rl.SET_ERROR_FOR_DOCUMENTS_SUMMARY,query:e,data:t,error:r}}const Ll=e=>({user_email:e.userEmail,match:e.match,date_before:zo(e.dateBefore,!0),date_after:zo(e.dateAfter),date_between:e.dateBetween&&[zo(e.dateBetween[0]),zo(e.dateBetween[1],!0)],type_is:e.typeIs,type_is_not:e.typeIsNot});function*Ul(e){const t=(0,Mo.addQueryArgs)(`${yo}/documents`,{page:e.paged,pagesize:e.perPage,sort:e.orderby,direction:e.order,...Ll(e)});try{const r=yield(0,po.apiFetch)({path:t});yield Pl(e,r.data||[])}catch(t){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving documents.","woocommerce-payments")),yield Dl(e,null,t)}}function*$l(e){const t=(0,Mo.addQueryArgs)(`${yo}/documents/summary`,Ll(e));try{const r=yield(0,po.apiFetch)({path:t});yield Fl(e,r)}catch(t){yield Ml(e,null,t)}}const Bl={},zl=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},ql=({paymentIntents:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}},Hl={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"},Yl={summary:{},byId:{},isRequesting:!1},Vl=e=>e&&e.authorizations||{},Wl=(e,t)=>{const r=fo(t);return Vl(e)[r]||{}},Gl=(e,t)=>Wl(e,t).data||[],Ql=(e,t)=>(Vl(e).byId||{})[t],Zl=(e,t)=>Wl(e,t).error||{},Kl=(e,t)=>{const r=fo(t);return Vl(e).summary[r]||{}},Xl=(e,t)=>Kl(e,t).data||{},Jl=(e,t)=>Kl(e,t).error||{},eu=e=>Vl(e).isRequesting;function tu(e,t){return{type:Hl.SET_AUTHORIZATIONS,data:t,query:e}}function ru(e,t){return{type:Hl.SET_ERROR_FOR_AUTHORIZATIONS,query:e,error:t}}function nu(e){return{type:Hl.SET_AUTHORIZATION,data:e}}function ou(e,t){return{type:Hl.SET_AUTHORIZATIONS_SUMMARY,data:t,query:e}}function au(e){return{type:Hl.SET_IS_REQUESTING_AUTHORIZATION,data:e}}function*su(e,t){try{yield mo.controls.dispatch(ho,"startResolution","getAuthorization",[e]),yield mo.controls.dispatch(ho,"setIsRequestingAuthorization",!0);const r=yield(0,po.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 nu(n),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getAuthorizations"),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getTimeline"),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield mo.controls.dispatch("core/notices","createSuccessNotice",(0,W.sprintf)((0,W.__)("Payment for order #%s captured successfully.","woocommerce-payments"),t))}catch(e){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.sprintf)((0,W.__)("There has been an error capturing the payment for order #%s. Please try again later.","woocommerce-payments"),t))}finally{yield mo.controls.dispatch(ho,"finishResolution","getAuthorization",[e]),yield mo.controls.dispatch(ho,"setIsRequestingAuthorization",!1)}}function*iu(e,t){try{yield mo.controls.dispatch(ho,"startResolution","getAuthorization",[e]),yield mo.controls.dispatch(ho,"setIsRequestingAuthorization",!0);const r=yield(0,po.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 nu(n),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getAuthorizations"),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getAuthorizationsSummary"),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactions"),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getFraudOutcomeTransactionsSummary"),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getTimeline"),yield mo.controls.dispatch(ho,"invalidateResolutionForStoreSelector","getPaymentIntent"),yield mo.controls.dispatch("core/notices","createSuccessNotice",(0,W.sprintf)((0,W.__)("Payment for order #%s canceled successfully.","woocommerce-payments"),t))}catch(e){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.sprintf)((0,W.__)("There has been an error canceling the payment for order #%s. Please try again later.","woocommerce-payments"),t))}finally{yield mo.controls.dispatch(ho,"finishResolution","getAuthorization",[e]),yield mo.controls.dispatch(ho,"setIsRequestingAuthorization",!1)}}function cu(e,t){return{type:Hl.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY,query:e,error:t}}function*lu(e){var t;let{paged:r=1,per_page:n=25,orderby:o="created",order:a="asc"}=e;"capture_by"===o&&(o="created");const s=(0,Mo.addQueryArgs)(`${yo}/authorizations`,{page:r,pagesize:n,sort:o,direction:a});try{const r=yield(0,po.apiFetch)({path:s});yield tu(e,null!==(t=r.data)&&void 0!==t?t:[])}catch(t){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield ru(e,t)}}function*uu(e){try{if(e){const t=yield(0,po.apiFetch)({path:`${yo}/authorizations/${e}`}),{is_captured:r,payment_intent_id:n,created:o}=t;yield nu({payment_intent_id:n,captured:r,created:o})}}catch(e){"authorization_missing"!==e.code&&(yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving authorization.","woocommerce-payments")))}}function*du(e){const t=(0,Mo.addQueryArgs)(`${yo}/authorizations/summary`,{pagesize:e.per_page,sort:e.orderby,direction:e.order,page:e.paged});try{const r=yield(0,po.apiFetch)({path:t});yield ou(e,null!=r?r:[])}catch(t){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving uncaptured transactions.","woocommerce-payments")),yield cu(e,t)}}var mu;!function(e){e.SET_FILE="SET_FILE",e.SET_ERROR_FOR_FILES="SET_ERROR_FOR_FILES"}(mu||(mu={}));const pu=mu,yu={},hu=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.data)||{}},_u=({files:e},t)=>{const r=null==e?void 0:e[t];return(null==r?void 0:r.error)||{}};function fu(e,t){return{type:pu.SET_FILE,id:e,data:t}}function gu(e,t){return{type:pu.SET_ERROR_FOR_FILES,id:e,error:t}}function*bu(e){try{const t=yield(0,po.apiFetch)({path:`${yo}/file/${e}/details`});yield fu(e,t)}catch(t){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving file.","woocommerce-payments")),yield gu(e,t)}}const vu={SET_PAYMENT_ACTIVITY_DATA:"SET_PAYMENT_ACTIVITY_DATA"},Su=(e,t)=>{var r;const n=fo(t);return null===(r=null==e?void 0:e.paymentActivity)||void 0===r?void 0:r[n]};function wu(e,t){return{type:vu.SET_PAYMENT_ACTIVITY_DATA,query:t,data:e}}function*Eu(e){const t=(0,Mo.addQueryArgs)(`${yo}/reporting/payment_activity`,e);try{const r=yield(0,po.apiFetch)({path:t});yield wu(r,e)}catch(e){yield mo.controls.dispatch("core/notices","createErrorNotice",(0,W.__)("Error retrieving payment activity data.","woocommerce-payments"))}}(0,mo.registerStore)(ho,{reducer:(0,mo.combineReducers)({deposits:(e=go,{type:t,query:r={},data:n=[],error:o})=>{const a=fo(r);switch(t){case _o.SET_DEPOSIT:return{...e,byId:{...e.byId,[n.id]:n}};case _o.SET_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,data:n}};case _o.SET_ERROR_FOR_ALL_DEPOSITS_OVERVIEWS:return{...e,overviews:{...e.overviews,error:o}};case _o.SET_DEPOSITS:return{...e,byId:{...e.byId,...(0,mt.keyBy)(n,"id")},queries:{...e.queries,[a]:{data:(0,mt.map)(n,"id")}}};case _o.SET_DEPOSITS_COUNT:return{...e,count:n};case _o.SET_ERROR_FOR_DEPOSIT_QUERY:return{...e,queries:{...e.queries,[a]:{error:o}}};case _o.SET_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:n}}};case _o.SET_ERROR_FOR_DEPOSITS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:o}}};case _o.SET_INSTANT_DEPOSIT:return{...e,instant:{...e.instant,data:n}}}return e},transactions:(e=sa,{type:t,query:r={},data:n=[],error:o,status:a})=>{const s=fo(r);switch(t){case aa.SET_TRANSACTIONS:return{...e,[s]:{data:n}};case aa.SET_ERROR_FOR_TRANSACTIONS:return{...e,[s]:{error:o}};case aa.SET_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[s]:{data:n}}};case aa.SET_ERROR_FOR_TRANSACTIONS_SUMMARY:return{...e,summary:{...e.summary,[s]:{error:o}}};case aa.SET_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[s]:{data:n}}}};case aa.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},[s]:{error:o}}}};case aa.SET_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[s]:{data:n}}}}};case aa.SET_ERROR_FOR_FRAUD_OUTCOME_TRANSACTIONS_SUMMARY:return{...e,fraudProtection:{...e.fraudProtection,[a]:{...e.fraudProtection?.[a]||{},summary:{...e.fraudProtection?.[a]?.summary||{},[s]:{error:o}}}}}}return e},charges:(e={},{type:t,id:r,data:n,error:o})=>{switch(t){case Da.SET_CHARGE:e={...e,[r]:{...e[r],data:n}};break;case Da.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 Ha.SET_TIMELINE:e={...e,[r]:{data:n}};break;case Ha.SET_ERROR_FOR_TIMELINE:e={...e,[r]:{...e[r],error:o}}}return e},disputes:(e=Ka,{type:t,query:r={},data:n=[],id:o,error:a})=>{const s=fo(r);switch(t){case Za.SET_DISPUTE:return{...e,byId:{...e.byId,[n.id]:n}};case Za.SET_ERROR_FOR_DISPUTE:e={...e,byId:{...e.byId,[o]:{error:a}}};break;case Za.SET_DISPUTES:return{...e,cached:{...e.cached,...(0,mt.keyBy)(n,"dispute_id")},queries:{...e.queries,[s]:{data:(0,mt.map)(n,"dispute_id")}}};case Za.SET_DISPUTES_SUMMARY:return{...e,summary:{...e.summary,[s]:{data:n}}}}return e},settings:(e=Rs,{type:t,...r})=>{switch(t){case Ts.SET_SETTINGS:return{...e,data:r.data};case Ts.SET_SETTINGS_VALUES:return{...e,savingError:null,data:{...e.data,...r.payload}};case Ts.SET_IS_SAVING_SETTINGS:return{...e,isSaving:r.isSaving,savingError:r.error};case Ts.SET_SELECTED_PAYMENT_METHOD:return{...e,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.concat(r.id)}};case Ts.SET_UNSELECTED_PAYMENT_METHOD:return{...e,data:{...e.data,enabled_payment_method_ids:e.data.enabled_payment_method_ids.filter((e=>e!==r.id))}}}return e},multiCurrency:(e=xc,{type:t,data:r=[]})=>{switch(t){case Ac.SET_CURRENCIES:return{...e,currencies:r,available:r.available,enabled:r.enabled,default:r.default};case Ac.SET_AVAILABLE_CURRENCIES:return{...e,currencies:{...e,available:r.available},available:r.available};case Ac.SET_ENABLED_CURRENCIES:return{...e,currencies:{...e,enabled:r.enabled},enabled:r.enabled};case Ac.SET_DEFAULT_CURRENCY:return{...e,currencies:{...e,default:r.default},default:r.default};case Ac.SET_CURRENCY_SETTINGS:return{...e,currency_settings:{...e.currency_settings,[r.code]:r.data}};case Ac.SET_STORE_SETTINGS:return{...e,settings:{enable_auto_currency:r.wcpay_multi_currency_enable_auto_currency,enable_storefront_switcher:r.wcpay_multi_currency_enable_storefront_switcher,site_theme:r.site_theme,date_format:r.date_format,time_format:r.time_format,store_url:r.store_url}}}return e},readers:(e={},{type:t,id:r,data:n,error:o})=>{switch(t){case tl.SET_CARD_READER_STATS:e={...e,[r]:{...e[r],data:n}};break;case tl.SET_ERROR_FOR_CARD_READER_STATS:e={...e,[r]:{...e[r],error:o}};break;case tl.SET_READERS:e={...e,list:n}}return e},capital:(e=pl,t)=>{switch(t.type){case ml.SET_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:t.data,summaryError:void 0});case ml.SET_ERROR_FOR_ACTIVE_LOAN_SUMMARY:return Object.assign(Object.assign({},e),{summary:void 0,summaryError:t.error});case ml.SET_LOANS:return Object.assign(Object.assign({},e),{loans:t.data,loansError:void 0});case ml.SET_ERROR_FOR_LOANS:return Object.assign(Object.assign({},e),{loans:void 0,loansError:t.error})}return e},documents:(e=Ol,{type:t,query:r={},data:n=[],error:o})=>{const a=fo(r);switch(t){case Rl.SET_DOCUMENTS:return{...e,[a]:{data:n}};case Rl.SET_ERROR_FOR_DOCUMENTS:return{...e,[a]:{error:o}};case Rl.SET_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{data:n}}};case Rl.SET_ERROR_FOR_DOCUMENTS_SUMMARY:return{...e,summary:{...e.summary,[a]:{error:o}}}}return e},paymentIntents:(e=Bl,t)=>{const{type:r,id:n}=t;switch(r){case as.SET_PAYMENT_INTENT:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{data:t.data})});case as.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=Yl,t)=>{switch(t.type){case Hl.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 Hl.SET_AUTHORIZATIONS:{const{data:r,query:n}=t;return Object.assign(Object.assign({},e),{[fo(n)]:{data:r}})}case Hl.SET_ERROR_FOR_AUTHORIZATIONS:{const{error:r,query:n}=t;return Object.assign(Object.assign({},e),{[fo(n)]:{error:r}})}case Hl.SET_AUTHORIZATIONS_SUMMARY:{const{data:r,query:n}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[fo(n)]:{data:r||{}}})})}case Hl.SET_ERROR_FOR_AUTHORIZATIONS_SUMMARY:{const{query:r,error:n}=t;return Object.assign(Object.assign({},e),{summary:Object.assign(Object.assign({},e.summary),{[fo(r)]:{error:n||""}})})}case Hl.SET_IS_REQUESTING_AUTHORIZATION:{const{data:r}=t;return Object.assign(Object.assign({},e),{isRequesting:r})}}return e},files:(e=yu,t)=>{const{type:r,id:n}=t;switch(r){case pu.SET_FILE:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{data:t.data})});case pu.SET_ERROR_FOR_FILES:return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},e[n]),{error:t.error})});default:return e}},paymentActivity:(e={},{type:t,query:r,data:n})=>{if(!r)return e;const o=fo(r);return t===vu.SET_PAYMENT_ACTIVITY_DATA&&(e=Object.assign(Object.assign({},e),{[o]:n})),e}}),actions:{...t,...a,...c,...d,..._,...b,...w,...R,...x,...I,...y,...D,...L,...B},controls:po.controls,selectors:{...e,...o,...i,...u,...p,...g,...S,...T,...A,...N,...j,...P,...M,...$},resolvers:{...n,...s,...l,...m,...f,...v,...E,...O,...C,...k,...h,...F,...U,...z}});const Tu=({className:e,children:t})=>(0,Rn.jsx)("ul",{className:e,children:t});var Ru=r(2485),Ou=r.n(Ru);const Au=window.wp.compose,xu=window.wp.dom,Cu=window.wp.primitives,Nu=(0,Q.createElement)(Cu.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Q.createElement)(Cu.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"}));function Iu(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 ku=0;function ju(e){const t=document.scrollingElement||document.body;e&&(ku=t.scrollTop);const r=e?"add":"remove";t.classList[r]("lockscroll"),document.documentElement.classList[r]("lockscroll"),e||(t.scrollTop=ku)}let Pu=0;function Du(){return(0,Q.useEffect)((()=>(0===Pu&&ju(!0),++Pu,()=>{1===Pu&&ju(!1),--Pu})),[]),null}var Fu=r(5606);const Mu=(0,Q.createContext)({slots:{},fills:{},registerSlot:()=>{void 0!==Fu&&Fu.env},updateSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{}});function Lu(e){const t=(0,Q.useContext)(Mu),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 Uu=(0,Q.createContext)({registerSlot:()=>{},unregisterSlot:()=>{},registerFill:()=>{},unregisterFill:()=>{},getSlot:()=>{},getFills:()=>{},subscribe:()=>{}});function $u(e){let{name:t,children:r,registerFill:n,unregisterFill:o}=e;const a=(e=>{const{getSlot:t,subscribe:r}=(0,Q.useContext)(Uu),[n,o]=(0,Q.useState)(t(e));return(0,Q.useEffect)((()=>(o(t(e)),r((()=>{o(t(e))})))),[e]),n})(t),s=(0,Q.useRef)({name:t,children:r});return(0,Q.useLayoutEffect)((()=>(n(t,s.current),()=>o(t,s.current))),[]),(0,Q.useLayoutEffect)((()=>{s.current.children=r,a&&a.forceUpdate()}),[r]),(0,Q.useLayoutEffect)((()=>{t!==s.current.name&&(o(s.current.name,s.current),s.current.name=t,n(t,s.current))}),[t]),a&&a.node?((0,mt.isFunction)(r)&&(r=r(a.props.fillProps)),(0,Q.createPortal)(r,a.node)):null}const Bu=e=>(0,Q.createElement)(Uu.Consumer,null,(t=>{let{registerFill:r,unregisterFill:n}=t;return(0,Q.createElement)($u,G({},e,{registerFill:r,unregisterFill:n}))}));class zu 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,mt.map)(n(t,this),(e=>{const t=(0,mt.isFunction)(e.children)?e.children(r):e.children;return Q.Children.map(t,((e,t)=>{if(!e||(0,mt.isString)(e))return e;const r=e.key||t;return(0,Q.cloneElement)(e,{key:r})}))})).filter((0,mt.negate)(Q.isEmptyElement));return(0,Q.createElement)(Q.Fragment,null,(0,mt.isFunction)(e)?e(o):o)}}const qu=e=>(0,Q.createElement)(Uu.Consumer,null,(t=>{let{registerSlot:r,unregisterSlot:n,getFills:o}=t;return(0,Q.createElement)(zu,G({},e,{registerSlot:r,unregisterSlot:n,getFills:o}))}));var Hu,Yu=new Uint8Array(16);function Vu(){if(!Hu&&!(Hu="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 Hu(Yu)}const Wu=/^(?:[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 Gu=[],Qu=0;Qu<256;++Qu)Gu.push((Qu+256).toString(16).substr(1));const Zu=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Gu[e[t+0]]+Gu[e[t+1]]+Gu[e[t+2]]+Gu[e[t+3]]+"-"+Gu[e[t+4]]+Gu[e[t+5]]+"-"+Gu[e[t+6]]+Gu[e[t+7]]+"-"+Gu[e[t+8]]+Gu[e[t+9]]+"-"+Gu[e[t+10]]+Gu[e[t+11]]+Gu[e[t+12]]+Gu[e[t+13]]+Gu[e[t+14]]+Gu[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&Wu.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r},Ku=function(e,t,r){var n=(e=e||{}).random||(e.rng||Vu)();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 Zu(n)},Xu=new Set,Ju=wt()((e=>{let t=Ku().replace(/[0-9]/g,"");for(;Xu.has(t);)t=Ku().replace(/[0-9]/g,"");return Xu.add(t),ut({container:e,key:t})}));function ed(e){let{children:t,document:r}=e;if(!r)return null;const n=Ju(r.head);return(0,Q.createElement)(Ct,{value:n},t)}function td(){const[,e]=(0,Q.useState)({}),t=(0,Q.useRef)(!0);return(0,Q.useEffect)((()=>()=>{t.current=!1}),[]),()=>{t.current&&e({})}}function rd(e){let{name:t,children:r}=e;const n=Lu(t),o=(0,Q.useRef)({rerender:td()});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)(ed,{document:n.ref.current.ownerDocument},r);return(0,Q.createPortal)(a,n.ref.current)}const nd=(0,Q.forwardRef)((function(e,t){let{name:r,fillProps:n={},as:o="div",...a}=e;const s=(0,Q.useContext)(Mu),i=(0,Q.useRef)();return(0,Q.useLayoutEffect)((()=>(s.registerSlot(r,i,n),()=>{s.unregisterSlot(r,i)})),[s.registerSlot,s.unregisterSlot,r]),(0,Q.useLayoutEffect)((()=>{s.updateSlot(r,n)})),(0,Q.createElement)(o,G({ref:(0,Au.useMergeRefs)([t,i])},a))}));function od(e){return(0,Q.createElement)(Q.Fragment,null,(0,Q.createElement)(Bu,e),(0,Q.createElement)(rd,e))}const ad=(0,Q.forwardRef)(((e,t)=>{let{bubblesVirtually:r,...n}=e;return r?(0,Q.createElement)(nd,G({},n,{ref:t})):(0,Q.createElement)(qu,n)}));function sd(e){return"appear"===e?"top":"left"}const id="Popover",cd=(0,Q.createContext)();function ld(e,t){const{paddingTop:r,paddingBottom:n,paddingLeft:o,paddingRight:a}=function(e){return e.ownerDocument.defaultView.getComputedStyle(e)}(t),s=r?parseInt(r,10):0,i=n?parseInt(n,10):0,c=o?parseInt(o,10):0,l=a?parseInt(a,10):0;return{x:e.left+c,y:e.top+s,width:e.width-c-l,height:e.height-s-i,left:e.left+c,right:e.right-l,top:e.top+s,bottom:e.bottom-i}}function ud(e,t,r){r?e.getAttribute(t)!==r&&e.setAttribute(t,r):e.hasAttribute(t)&&e.removeAttribute(t)}function dd(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";e.style[t]!==r&&(e.style[t]=r)}function md(e,t,r){r?e.classList.contains(t)||e.classList.add(t):e.classList.contains(t)&&e.classList.remove(t)}const pd=(0,Q.forwardRef)(((e,t)=>{let{headerTitle:r,onClose:n,children:o,className:a,noArrow:s=!0,isAlternate:i,position:c="bottom right",range:l,focusOnMount:u="firstElement",anchorRef:d,shouldAnchorIncludePadding:m,anchorRect:p,getAnchorRect:y,expandOnMobile:h,animate:_=!0,onFocusOutside:f,__unstableStickyBoundaryElement:g,__unstableSlotName:b=id,__unstableObserveElement:v,__unstableBoundaryParent:S,__unstableForcePosition:w,__unstableForceXAlignment:E,__unstableEditorCanvasWrapper:T,...R}=e;const O=(0,Q.useRef)(null),A=(0,Q.useRef)(null),x=(0,Q.useRef)(),C=(0,Au.useViewportMatch)("medium","<"),[N,I]=(0,Q.useState)(),k=(0,Q.useContext)(cd)||b,j=Lu(k),P=h&&C,[D,F]=(0,Au.useResizeObserver)();s=P||s,(0,Q.useLayoutEffect)((()=>{if(P)return md(x.current,"is-without-arrow",s),md(x.current,"is-alternate",i),ud(x.current,"data-x-axis"),ud(x.current,"data-y-axis"),dd(x.current,"top"),dd(x.current,"left"),dd(A.current,"maxHeight"),void dd(A.current,"maxWidth");const e=()=>{if(!x.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 Iu(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 Iu((0,xu.getRectangleFromRange)(n),n.endContainer.ownerDocument,a);if("function"==typeof(null==n?void 0:n.getBoundingClientRect)){const e=Iu(n.getBoundingClientRect(),n.ownerDocument,a);return o?e:ld(e,n)}const{top:e,bottom:t}=n,r=e.getBoundingClientRect(),s=t.getBoundingClientRect(),i=Iu(new window.DOMRect(r.left,r.top,r.width,s.bottom-r.top),e.ownerDocument,a);return o?i:ld(i,n)}if(!e.current)return;const{parentNode:s}=e.current,i=Iu(s.getBoundingClientRect(),s.ownerDocument,a);return o?i:ld(i,s)}(O,p,y,d,m,x.current);if(!e)return;const{offsetParent:t,ownerDocument:r}=x.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)}S&&(n=x.current.parentElement);const a=F.height?F:A.current.getBoundingClientRect(),{popoverTop:l,popoverLeft:u,xAxis:h,yAxis:_,contentHeight:f,contentWidth:b}=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,s=arguments.length>7?arguments[7]:void 0,i=arguments.length>8?arguments[8]:void 0,c=arguments.length>9?arguments[9]:void 0;const[l,u="center",d]=r.split(" "),m=function(e,t,r,n,o,a,s,i,c){const{height:l}=t;if(o){const t=o.getBoundingClientRect(),n=t.top+l-s,a=t.bottom-l-s;if(e.top<=n)return!c||l+10<c.scrollTop+e.top?{yAxis:r,popoverTop:Math.min(e.bottom,n)}:{yAxis:"bottom",popoverTop:Math.min(e.bottom,a)}}let u=e.top+e.height/2;"bottom"===n?u=e.bottom:"top"===n&&(u=e.top);const d={popoverTop:u,contentHeight:(u-l/2>0?l/2:u)+(u+l/2>window.innerHeight?window.innerHeight-u:l/2)},m={popoverTop:e.top,contentHeight:e.top-10-l>0?l:e.top-10},p={popoverTop:e.bottom,contentHeight:e.bottom+10+l>window.innerHeight?window.innerHeight-10-e.bottom:l};let y,h=r,_=null;if(!o&&!i)if("middle"===r&&d.contentHeight===l)h="middle";else if("top"===r&&m.contentHeight===l)h="top";else if("bottom"===r&&p.contentHeight===l)h="bottom";else{h=m.contentHeight>p.contentHeight?"top":"bottom";const e="top"===h?m.contentHeight:p.contentHeight;_=e!==l?e:null}return y="middle"===h?d.popoverTop:"top"===h?m.popoverTop:p.popoverTop,{yAxis:h,popoverTop:y,contentHeight:_}}(e,t,l,d,n,0,o,s,c),p=function(e,t,r,n,o,a,s,i,c){const{width:l}=t;"left"===r&&(0,W.isRTL)()?r="right":"right"===r&&(0,W.isRTL)()&&(r="left"),"left"===n&&(0,W.isRTL)()?n="right":"right"===n&&(0,W.isRTL)()&&(n="left");const u=Math.round(e.left+e.width/2),d={popoverLeft:u,contentWidth:(u-l/2>0?l/2:u)+(u+l/2>window.innerWidth?window.innerWidth-u:l/2)};let m=e.left;"right"===n?m=e.right:"middle"===a||c||(m=u);let p=e.right;"left"===n?p=e.left:"middle"===a||c||(p=u);const y={popoverLeft:m,contentWidth:m-l>0?l:m},h={popoverLeft:p,contentWidth:p+l>window.innerWidth?window.innerWidth-p:l};let _,f=r,g=null;if(!o&&!i)if("center"===r&&d.contentWidth===l)f="center";else if("left"===r&&y.contentWidth===l)f="left";else if("right"===r&&h.contentWidth===l)f="right";else{f=y.contentWidth>h.contentWidth?"left":"right";const e="left"===f?y.contentWidth:h.contentWidth;l>window.innerWidth&&(g=window.innerWidth),e!==l&&(f="center",d.popoverLeft=window.innerWidth/2)}return _="center"===f?d.popoverLeft:"left"===f?y.popoverLeft:h.popoverLeft,s&&(_=Math.min(_,s.offsetLeft+s.offsetWidth-l),(0,W.isRTL)()||(_=Math.max(_,0))),{xAxis:f,popoverLeft:_,contentWidth:g}}(e,t,u,d,n,m.yAxis,a,s,i);return{...p,...m}}(e,a,c,g,x.current,o,n,w,E,T);"number"==typeof l&&"number"==typeof u&&(dd(x.current,"top",l+"px"),dd(x.current,"left",u+"px")),md(x.current,"is-without-arrow",s||"center"===h&&"middle"===_),md(x.current,"is-alternate",i),ud(x.current,"data-x-axis",h),ud(x.current,"data-y-axis",_),dd(A.current,"maxHeight","number"==typeof f?f+"px":""),dd(A.current,"maxWidth","number"==typeof b?b+"px":""),I(({left:"right",right:"left"}[h]||"center")+" "+({top:"bottom",bottom:"top"}[_]||"middle"))};e();const{ownerDocument:t}=x.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 l=function(e){if(e)return e.endContainer?e.endContainer.ownerDocument:e.top?e.top.ownerDocument:e.ownerDocument}(d);let u;return l&&l!==t&&(l.defaultView.addEventListener("resize",e),l.defaultView.addEventListener("scroll",e,!0)),v&&(u=new r.MutationObserver(e),u.observe(v,{attributes:!0})),()=>{var s,i;r.clearInterval(n),r.removeEventListener("resize",e),r.removeEventListener("scroll",e,!0),r.removeEventListener("click",a),r.cancelAnimationFrame(o),l&&l!==t&&(null===(s=l.defaultView)||void 0===s||s.removeEventListener("resize",e),null===(i=l.defaultView)||void 0===i||i.removeEventListener("scroll",e,!0)),u&&u.disconnect()}}),[P,p,y,d,m,c,F,g,v,S]);const M=(e,t)=>{"focus-outside"===e&&f?f(t):n&&n()},[L,U]=(0,Au.__experimentalUseDialog)({focusOnMount:u,__unstableOnClose:M,onClose:M}),$=(0,Au.useMergeRefs)([x,L,t]),B=Boolean(_&&N)&&function(e){if("loading"===e.type)return Ou()("components-animate__loading");const{type:t,origin:r=sd(t)}=e;if("appear"===t){const[e,t="center"]=r.split(" ");return Ou()("components-animate__appear",{["is-from-"+t]:"center"!==t,["is-from-"+e]:"middle"!==e})}return"slide-in"===t?Ou()("components-animate__slide-in","is-from-"+r):void 0}({type:"appear",origin:N});let z=(0,Q.createElement)("div",G({className:Ou()("components-popover",a,B,{"is-expanded":P,"is-without-arrow":s,"is-alternate":i})},R,{ref:$},U,{tabIndex:"-1"}),P&&(0,Q.createElement)(Du,null),P&&(0,Q.createElement)("div",{className:"components-popover__header"},(0,Q.createElement)("span",{className:"components-popover__header-title"},r),(0,Q.createElement)(Ad,{className:"components-popover__close",icon:Nu,onClick:n})),(0,Q.createElement)("div",{ref:A,className:"components-popover__content"},(0,Q.createElement)("div",{style:{position:"relative"}},D,o)));return j.ref&&(z=(0,Q.createElement)(od,{name:k},z)),d||p?z:(0,Q.createElement)("span",{ref:O},z)}));pd.Slot=(0,Q.forwardRef)((function(e,t){let{name:r=id}=e;return(0,Q.createElement)(ad,{bubblesVirtually:!0,name:r,className:"popover-slot",ref:t})})),pd.__unstableSlotNameProvider=cd.Provider;const yd=pd,hd=function(e){let t,r,{shortcut:n,className:o}=e;return n?((0,mt.isString)(n)&&(t=n),(0,mt.isObject)(n)&&(t=n.display,r=n.ariaLabel),(0,Q.createElement)("span",{className:o,"aria-label":r},t)):null},_d=700,fd=(0,Q.createElement)("div",{className:"event-catcher"}),gd=e=>{let{eventHandlers:t,child:r,childrenWithPopover:n}=e;return(0,Q.cloneElement)((0,Q.createElement)("span",{className:"disabled-element-wrapper"},(0,Q.cloneElement)(fd,t),(0,Q.cloneElement)(r,{children:n})),t)},bd=e=>{let{child:t,eventHandlers:r,childrenWithPopover:n}=e;return(0,Q.cloneElement)(t,{...r,children:n})},vd=(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)},Sd=function(e){const{children:t,position:r,text:n,shortcut:o,delay:a=_d}=e,[s,i]=(0,Q.useState)(!1),[c,l]=(0,Q.useState)(!1),u=(0,Au.useDebounce)(l,a),d=e=>{vd(t,"onMouseDown",e),document.addEventListener("mouseup",y),i(!0)},m=e=>{vd(t,"onMouseUp",e),document.removeEventListener("mouseup",y),i(!1)},p=e=>"mouseUp"===e?m:"mouseDown"===e?d:void 0,y=p("mouseUp"),h=(e,r)=>n=>{if(vd(t,e,n),n.currentTarget.disabled)return;if("focus"===n.type&&s)return;u.cancel();const o=(0,mt.includes)(["focus","mouseenter"],n.type);o!==c&&(r?u(o):l(o))},_=()=>{u.cancel(),document.removeEventListener("mouseup",y)};if((0,Q.useEffect)((()=>_),[]),1!==Q.Children.count(t))return t;const f={onMouseEnter:h("onMouseEnter",!0),onMouseLeave:h("onMouseLeave"),onClick:h("onClick"),onFocus:h("onFocus"),onBlur:h("onBlur"),onMouseDown:p("mouseDown")},g=Q.Children.only(t),{children:b,disabled:v}=g.props,S=v?gd:bd,w=(e=>{let{grandchildren:t,isOver:r,position:n,text:o,shortcut:a}=e;return(0,Q.concatChildren)(t,r&&(0,Q.createElement)(yd,{focusOnMount:!1,position:n,className:"components-tooltip","aria-hidden":"true",animate:!1,noArrow:!0},o,(0,Q.createElement)(hd,{className:"components-tooltip__shortcut",shortcut:a})))})({grandchildren:b,isOver:c,position:r,text:n,shortcut:o});return S({child:g,eventHandlers:f,childrenWithPopover:w})},wd=function(e){let{icon:t,className:r,...n}=e;const o=["dashicon","dashicons","dashicons-"+t,r].filter(Boolean).join(" ");return(0,Q.createElement)("span",G({className:o},n))},Ed=function(e){let{icon:t=null,size:r=24,...n}=e;if("string"==typeof t)return(0,Q.createElement)(wd,G({icon:t},n));if((0,Q.isValidElement)(t)&&wd===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===Cu.SVG)){const e={width:r,height:r,...t.props,...n};return(0,Q.createElement)(Cu.SVG,e)}return(0,Q.isValidElement)(t)?(0,Q.cloneElement)(t,{size:r,...n}):t},Td={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"},Rd=Rt((function(e,t){const{style:r,...n}=Gt(e,"VisuallyHidden");return(0,Q.createElement)(Ut,G({ref:t},n,{style:{...Td,...r||{}}}))}),"VisuallyHidden"),Od=["onMouseDown","onClick"],Ad=(0,Q.forwardRef)((function e(t,r){const{href:n,target:o,isSmall:a,isPressed:s,isBusy:i,isDestructive:c,className:l,disabled:u,icon:d,iconPosition:m="left",iconSize:p,showTooltip:y,tooltipPosition:h,shortcut:_,label:f,children:g,text:b,variant:v,__experimentalIsFocusable:S,describedBy:w,...E}=function(e){let{isDefault:t,isPrimary:r,isSecondary:n,isTertiary:o,isLink:a,variant:s,...i}=e,c=s;var l,u,d,m,p;return r&&(null!==(l=c)&&void 0!==l||(c="primary")),o&&(null!==(u=c)&&void 0!==u||(c="tertiary")),n&&(null!==(d=c)&&void 0!==d||(c="secondary")),t&&(nn()("Button isDefault prop",{since:"5.4",alternative:'variant="secondary"',version:"6.2"}),null!==(m=c)&&void 0!==m||(c="secondary")),a&&(null!==(p=c)&&void 0!==p||(c="link")),{...i,variant:c}}(t),T=(0,Au.useInstanceId)(e,"components-button__description"),R=Ou()("components-button",l,{"is-secondary":"secondary"===v,"is-primary":"primary"===v,"is-small":a,"is-tertiary":"tertiary"===v,"is-pressed":s,"is-busy":i,"is-link":"link"===v,"is-destructive":c,"has-text":!!d&&!!g,"has-icon":!!d}),O=u&&!S,A=void 0===n||O?"button":"a",x="a"===A?{href:n,target:o}:{type:"button",disabled:O,"aria-pressed":s};if(u&&S){x["aria-disabled"]=!0;for(const e of Od)E[e]=e=>{e.stopPropagation(),e.preventDefault()}}const C=!O&&(y&&f||_||!!f&&(!g||(0,mt.isArray)(g)&&!g.length)&&!1!==y),N=w?T:null,I=E["aria-describedby"]||N,k=(0,Q.createElement)(A,G({},x,E,{className:R,"aria-label":E["aria-label"]||f,"aria-describedby":I,ref:r}),d&&"left"===m&&(0,Q.createElement)(Ed,{icon:d,size:p}),b&&(0,Q.createElement)(Q.Fragment,null,b),d&&"right"===m&&(0,Q.createElement)(Ed,{icon:d,size:p}),g);return C?(0,Q.createElement)(Q.Fragment,null,(0,Q.createElement)(Sd,{text:w||f,shortcut:_,position:h},k),w&&(0,Q.createElement)(Rd,null,(0,Q.createElement)("span",{id:N},w))):(0,Q.createElement)(Q.Fragment,null,k,w&&(0,Q.createElement)(Rd,null,(0,Q.createElement)("span",{id:N},w)))}));function xd(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 Cd(e,t){let r,n,o=[];for(let a=0;a<e.length;a++){const s=e[a];if("string"!==s.type){if(void 0===t[s.value])throw new Error(`Invalid interpolation, missing component node: \`${s.value}\``);if("object"!=typeof t[s.value])throw new Error(`Invalid interpolation, component node must be a ReactElement or null: \`${s.value}\``);if("componentClose"===s.type)throw new Error(`Missing opening component token: \`${s.value}\``);if("componentOpen"===s.type){r=t[s.value],n=a;break}o.push(t[s.value])}else o.push(s.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),s=Cd(e.slice(n+1,a),t),i=(0,q.cloneElement)(r,{},s);if(o.push(i),a<e.length-1){const r=Cd(e.slice(a+1),t);o=o.concat(r)}}return o=o.filter(Boolean),0===o.length?null:1===o.length?o[0]:(0,q.createElement)(q.Fragment,null,...o)}function Nd(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(xd)}(t);try{return Cd(o,r)}catch(e){if(n)throw new Error(`Interpolation Error: unable to process \`${t}\` because of error \`${e.message}\``);return t}}const Id=window.wp.keycodes,kd=(0,Q.createElement)(Cu.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Q.createElement)(Cu.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"})),jd=new Set(["alert","status","log","marquee","timer"]);let Pd=[],Dd=!1;let Fd=0;const Md=(0,Q.forwardRef)((function e(t,r){const{bodyOpenClassName:n="modal-open",role:o="dialog",title:a=null,focusOnMount:s=!0,shouldCloseOnEsc:i=!0,shouldCloseOnClickOutside:c=!0,isDismissible:l=!0,aria:u={labelledby:null,describedby:null},onRequestClose:d,icon:m,closeButtonLabel:p,children:y,style:h,overlayClassName:_,className:f,contentLabel:g,onKeyDown:b,isFullScreen:v=!1,__experimentalHideHeader:S=!1}=t,w=(0,Q.useRef)(),E=(0,Au.useInstanceId)(e),T=a?`components-modal-header-${E}`:u.labelledby,R=(0,Au.useFocusOnMount)(s),O=(0,Au.useConstrainedTabbing)(),A=(0,Au.useFocusReturn)(),x=(0,Au.__experimentalUseFocusOutside)(d);return(0,Q.useEffect)((()=>(Fd++,1===Fd&&(function(e){if(Dd)return;const t=document.body.children;(0,mt.forEach)(t,(t=>{t!==e&&function(e){const t=e.getAttribute("role");return!("SCRIPT"===e.tagName||e.hasAttribute("aria-hidden")||e.hasAttribute("aria-live")||jd.has(t))}(t)&&(t.setAttribute("aria-hidden","true"),Pd.push(t))})),Dd=!0}(w.current),document.body.classList.add(n)),()=>{Fd--,0===Fd&&(document.body.classList.remove(n),Dd&&((0,mt.forEach)(Pd,(e=>{e.removeAttribute("aria-hidden")})),Pd=[],Dd=!1))})),[]),(0,Q.createPortal)((0,Q.createElement)("div",{ref:(0,Au.useMergeRefs)([w,r]),className:Ou()("components-modal__screen-overlay",_),onKeyDown:function(e){i&&e.keyCode===Id.ESCAPE&&!e.defaultPrevented&&(e.preventDefault(),d&&d(e))}},(0,Q.createElement)(ed,{document},(0,Q.createElement)("div",G({className:Ou()("components-modal__frame",f,{"is-full-screen":v}),style:h,ref:(0,Au.useMergeRefs)([O,A,R]),role:o,"aria-label":g,"aria-labelledby":g?null:T,"aria-describedby":u.describedby,tabIndex:"-1"},c?x:{},{onKeyDown:b}),(0,Q.createElement)("div",{className:Ou()("components-modal__content",{"hide-header":S}),role:"document"},!S&&(0,Q.createElement)("div",{className:"components-modal__header"},(0,Q.createElement)("div",{className:"components-modal__header-heading-container"},m&&(0,Q.createElement)("span",{className:"components-modal__icon-container","aria-hidden":!0},m),a&&(0,Q.createElement)("h1",{id:T,className:"components-modal__header-heading"},a)),l&&(0,Q.createElement)(Ad,{onClick:d,icon:kd,label:p||(0,W.__)("Close dialog")})),y)))),document.body)}));const Ld=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 H().createElement(Md,Object.assign({className:Ou()("wcpay-confirmation-modal",n)},o),t,H().createElement(Cu.HorizontalRule,{className:"wcpay-confirmation-modal__separator"}),H().createElement("div",{className:"wcpay-confirmation-modal__footer"},r))};var Ud=r(9387);const $d=({symbol:e})=>(0,Rn.jsx)("div",{className:"currency-delete-illustration__wrapper",children:(0,Rn.jsxs)("div",{className:"currency-delete-illustration__illustrations",children:[e,(0,Rn.jsx)(Ud.A,{className:"currency-delete-illustration__currency-cross-icon"})]})}),Bd=({Icon:e,label:t})=>e?(0,Rn.jsxs)("span",{className:Ou()("woocommerce-payments__payment-method-icon"),children:[(0,Rn.jsx)(e,{}),t&&(0,Rn.jsx)("span",{className:"woocommerce-payments__payment-method-icon__label",children:t})]}):null,zd=r.p+"../assets/images/payment-methods/bancontact.svg?ver=439d3f59385fa74e675e",qd=r.p+"../assets/images/payment-methods/eps.svg?ver=7bd9ed62d1b21ca35ceb",Hd=r.p+"../assets/images/payment-methods/giropay.svg?ver=1100c024fff0503b41f7",Yd=r.p+"../assets/images/payment-methods/sofort.svg?ver=b6780ad95a25d8b7b634",Vd=r.p+"../assets/images/payment-methods/sepa-debit.svg?ver=9e42854526214016710d",Wd=r.p+"../assets/images/payment-methods/p24.svg?ver=85e0cf9bc6526516d85f",Gd=r.p+"../assets/images/payment-methods/ideal.svg?ver=c2cc71cf802e14c4f042",Qd=r.p+"../assets/images/payment-methods/bank-debit.svg?ver=d0e134b0067cbbf6403f",Zd=r.p+"../assets/images/payment-methods/affirm-badge.svg?ver=1151b0d701a5ea6ebcae",Kd=r.p+"../assets/images/payment-methods/afterpay-logo.svg?ver=7b4e5ed5741b9cd7ade0",Xd=r.p+"../assets/images/payment-methods/clearpay.svg?ver=1092499f79ea6d761029",Jd=r.p+"../assets/images/payment-methods/jcb.svg?ver=3351f2584f4a62ad094d",em=r.p+"../assets/images/payment-methods/klarna.svg?ver=e031a517911ff23ecaaa",tm=r.p+"../assets/images/cards/visa.svg?ver=f10d76e13a47cb867cca",rm=r.p+"../assets/images/cards/mastercard.svg?ver=d21057587f14a719da45",nm=r.p+"../assets/images/cards/amex.svg?ver=9035aad80e3ae7ac653c",om=r.p+"../assets/images/payment-methods/woo.svg?ver=c063471dc31ce4748a14",am=r.p+"../assets/images/cards/apple-pay.svg?ver=126e07a26632bc8a9c21",sm=r.p+"../assets/images/cards/google-pay.svg?ver=30aba48019e36097a19d",im=r.p+"../assets/images/cards/diners.svg?ver=f5f358185b445ca33039",cm=r.p+"../assets/images/cards/discover.svg?ver=a19341de516c258e11fe",lm=r.p+"../assets/images/cards/cb.svg?ver=375fa3d816484fa4b53c",um=r.p+"../assets/images/cards/unionpay.svg?ver=590378d28822ade6ea0b",dm=r.p+"../assets/images/payment-methods/link.svg?ver=2af3c660d8ddc95442bb",mm=r.p+"../assets/images/payment-methods/cc.svg?ver=e99146e27d67e25c0717";const pm=(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 H().createElement("img",Object.assign({className:Ou()("payment-method__icon",r?"":"no-outline",o),src:e,alt:t},a))},ym=pm(Zd,(0,W.__)("Affirm","woocommerce-payments")),hm=pm(Kd,(0,W.__)("Afterpay","woocommerce-payments")),_m=pm(Xd,(0,W.__)("Clearpay","woocommerce-payments")),fm=(pm(nm,(0,W.__)("American Express","woocommerce-payments")),pm(am,(0,W.__)("Apple Pay","woocommerce-payments")),pm(zd,(0,W.__)("Bancontact","woocommerce-payments"))),gm=pm(Qd,(0,W.__)("BECS Direct Debit","woocommerce-payments")),bm=pm(mm,(0,W.__)("Credit card / Debit card","woocommerce-payments"),!1),vm=(pm(lm,(0,W.__)("Cartes Bancaires","woocommerce-payments")),pm(im,(0,W.__)("Diners Club","woocommerce-payments")),pm(cm,(0,W.__)("Discover","woocommerce-payments")),pm(qd,(0,W.__)("BECS Direct Debit","woocommerce-payments"))),Sm=pm(Hd,(0,W.__)("Giropay","woocommerce-payments")),wm=(pm(sm,(0,W.__)("Google Pay","woocommerce-payments")),pm(Gd,(0,W.__)("iDEAL","woocommerce-payments"))),Em=pm(Jd,(0,W.__)("JCB","woocommerce-payments")),Tm=pm(em,(0,W.__)("Klarna","woocommerce-payments")),Rm=(pm(dm,(0,W.__)("Link","woocommerce-payments")),pm(rm,(0,W.__)("Mastercard","woocommerce-payments")),pm(Wd,(0,W.__)("Przelewy24 (P24)","woocommerce-payments"))),Om=pm(Vd,(0,W.__)("SEPA Direct Debit","woocommerce-payments")),Am=pm(Yd,(0,W.__)("Sofort","woocommerce-payments"));var xm,Cm;pm(um,(0,W.__)("UnionPay","woocommerce-payments")),pm(tm,(0,W.__)("Visa","woocommerce-payments")),pm(om,(0,W.__)("WooPay","woocommerce-payments"));const Nm=(null===(Cm=null===(xm=window.wcpaySettings)||void 0===xm?void 0:xm.accountStatus)||void 0===Cm?void 0:Cm.country)||"US",Im={card:{id:"card",label:(0,W.__)("Credit / Debit card","woocommerce-payments"),description:(0,W.__)("Let your customers pay with major credit and debit cards without leaving your store.","woocommerce-payments"),icon:bm,currencies:[],stripe_key:"card_payments",allows_manual_capture:!0,allows_pay_later:!1,accepts_only_domestic_payment:!1},au_becs_debit:{id:"au_becs_debit",label:(0,W.__)("BECS Direct Debit","woocommerce-payments"),description:(0,W.__)("Bulk Electronic Clearing System — Accept secure bank transfer from Australia.","woocommerce-payments"),icon:gm,currencies:["AUD"],stripe_key:"au_becs_debit_payments",allows_manual_capture:!1,allows_pay_later:!1,accepts_only_domestic_payment:!1},bancontact:{id:"bancontact",label:(0,W.__)("Bancontact","woocommerce-payments"),description:(0,W.__)("Bancontact is a bank redirect payment method offered by more than 80% of online businesses in Belgium.","woocommerce-payments"),icon:fm,currencies:["EUR"],stripe_key:"bancontact_payments",allows_manual_capture:!1,allows_pay_later:!1,accepts_only_domestic_payment:!1},eps:{id:"eps",label:(0,W.__)("EPS","woocommerce-payments"),description:(0,W.__)("Accept your payment with EPS — a common payment method in Austria.","woocommerce-payments"),icon:vm,currencies:["EUR"],stripe_key:"eps_payments",allows_manual_capture:!1,allows_pay_later:!1,accepts_only_domestic_payment:!1},giropay:{id:"giropay",label:(0,W.__)("giropay","woocommerce-payments"),description:(0,W.__)("Expand your business with giropay — Germany’s second most popular payment system.","woocommerce-payments"),icon:Sm,currencies:["EUR"],stripe_key:"giropay_payments",allows_manual_capture:!1,allows_pay_later:!1,accepts_only_domestic_payment:!1},ideal:{id:"ideal",label:(0,W.__)("iDEAL","woocommerce-payments"),description:(0,W.__)("Expand your business with iDEAL — Netherlands’s most popular payment method.","woocommerce-payments"),icon:wm,currencies:["EUR"],stripe_key:"ideal_payments",allows_manual_capture:!1,allows_pay_later:!1,accepts_only_domestic_payment:!1},p24:{id:"p24",label:(0,W.__)("Przelewy24 (P24)","woocommerce-payments"),description:(0,W.__)("Accept payments with Przelewy24 (P24), the most popular payment method in Poland.","woocommerce-payments"),icon:Rm,currencies:["EUR","PLN"],stripe_key:"p24_payments",allows_manual_capture:!1,allows_pay_later:!1,accepts_only_domestic_payment:!1},sepa_debit:{id:"sepa_debit",label:(0,W.__)("SEPA Direct Debit","woocommerce-payments"),description:(0,W.__)("Reach 500 million customers and over 20 million businesses across the European Union.","woocommerce-payments"),icon:Om,currencies:["EUR"],stripe_key:"sepa_debit_payments",allows_manual_capture:!1,allows_pay_later:!1,accepts_only_domestic_payment:!1},sofort:{id:"sofort",label:(0,W.__)("Sofort","woocommerce-payments"),description:(0,W.__)("Accept secure bank transfers from Austria, Belgium, Germany, Italy, Netherlands, and Spain.","woocommerce-payments"),icon:Am,currencies:["EUR"],stripe_key:"sofort_payments",allows_manual_capture:!1,allows_pay_later:!1,accepts_only_domestic_payment:!1},affirm:{id:"affirm",label:(0,W.__)("Affirm","woocommerce-payments"),description:(0,W.__)("Allow customers to pay over time with Affirm. Available to all customers paying in %s.","woocommerce-payments"),icon:ym,currencies:["USD","CAD"],stripe_key:"affirm_payments",allows_manual_capture:!1,allows_pay_later:!0,accepts_only_domestic_payment:!0},afterpay_clearpay:{id:"afterpay_clearpay",label:"GB"===Nm?(0,W.__)("Clearpay","woocommerce-payments"):(0,W.__)("Afterpay","woocommerce-payments"),description:"GB"===Nm?(0,W.__)("Allow customers to pay over time with Clearpay. Available to all customers paying in %s.","woocommerce-payments"):(0,W.__)("Allow customers to pay over time with Afterpay. Available to all customers paying in %s.","woocommerce-payments"),icon:"GB"===Nm?_m:hm,currencies:["USD","AUD","CAD","NZD","GBP"],stripe_key:"afterpay_clearpay_payments",allows_manual_capture:!1,allows_pay_later:!0,accepts_only_domestic_payment:!0},jcb:{id:"jcb",label:(0,W.__)("JCB","woocommerce-payments"),description:(0,W.__)("Let your customers pay with JCB, the only international payment brand based in Japan.","woocommerce-payments"),icon:Em,currencies:["JPY"],stripe_key:"jcb_payments",allows_manual_capture:!1,allows_pay_later:!1,accepts_only_domestic_payment:!1},klarna:{id:"klarna",label:(0,W.__)("Klarna","woocommerce-payments"),description:(0,W.__)("Allow customers to pay over time or pay now with Klarna. Available to all customers paying in %s.","woocommerce-payments"),icon:Tm,currencies:["EUR","GBP","USD","DKK","NOK","SEK"],stripe_key:"klarna_payments",allows_manual_capture:!1,allows_pay_later:!0,accepts_only_domestic_payment:!0}},km=({code:e,label:t,symbol:r,onClick:n,className:o})=>{const[a,s]=(0,Q.useState)(!1),i=window.multiCurrencyPaymentMethodsMap,c=i&&i[e]&&Object.keys(i[e]).length>0,l=c?Object.keys(i[e]):[],u=(0,Q.useCallback)((()=>{c?s(!0):n(e)}),[s,c,n,e]),d=(0,Q.useCallback)((()=>{s(!1),n(e)}),[n,s,e]),m=(0,Q.useCallback)((()=>{s(!1)}),[s]);return(0,Rn.jsxs)(Rn.Fragment,{children:[a&&(0,Rn.jsxs)(Ld,{title:(0,W.sprintf)((0,W.__)("Remove %1$s","woocommerce-payments"),t),onRequestClose:m,className:"enabled-currency-delete-modal",actions:(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsx)(Ad,{onClick:d,isPrimary:!0,isDestructive:!0,children:(0,W.__)("Remove","woocommerce-payments")}),(0,Rn.jsx)(Ad,{onClick:m,isSecondary:!0,children:(0,W.__)("Cancel","woocommerce-payments")})]}),children:[(0,Rn.jsx)($d,{symbol:r}),(0,Rn.jsx)("p",{children:Nd({mixedString:(0,W.sprintf)((0,W.__)("Are you sure you want to remove {{strong}}%s (%s){{/strong}}? Your customers will no longer be able to pay in this currency and use payment methods listed below.","woocommerce-payments"),t,e===r?e:[e,r].join(" ")),components:{strong:(0,Rn.jsx)("strong",{})}})}),(0,Rn.jsx)("ul",{children:l.map((e=>(0,Rn.jsx)("li",{children:(0,Rn.jsx)(Bd,{Icon:Im[e].icon,label:Im[e].label})},e)))}),(0,Rn.jsx)("p",{children:(0,W.sprintf)((0,W.__)("You can add %s (%s) again at any time in Multi-Currency settings.","woocommerce-payments"),t,e===r?e:[e,r].join(" "))})]}),(0,Rn.jsx)(Ad,{isLink:!0,"aria-label":(0,W.sprintf)((0,W.__)("Remove %1$s as an enabled currency","woocommerce-payments"),t),className:o,onClick:u,children:(0,Rn.jsx)(Ed,{icon:"trash"})})]})},jm=(0,q.createContext)(),Pm=({currency:{code:e,flag:t,id:r,is_default:n,name:o,symbol:a,rate:s},defaultCurrency:{code:i,is_zero_decimal:c},onDeleteClick:l})=>{const{openSingleCurrencySettings:u}=(0,q.useContext)(jm);return(0,Rn.jsxs)("li",{className:Ou()("enabled-currency",r),children:[(0,Rn.jsxs)("div",{className:"enabled-currency__container",children:[(0,Rn.jsx)("div",{className:"enabled-currency__flag",children:""!==t?t:(0,Rn.jsx)("div",{className:"enabled-currency__flag-text",children:(0,Rn.jsx)("span",{children:e})})}),(0,Rn.jsx)("div",{className:"enabled-currency__label",children:o}),(0,Rn.jsxs)("div",{className:"enabled-currency__code",children:["(",a+(a===e?"":` ${e}`),")"]})]}),(0,Rn.jsx)("div",{className:"enabled-currency__rate",children:(()=>{const t=c?Number.parseFloat(1e3*s).toFixed(2):Number.parseFloat(s).toFixed(2);return n?(0,W.__)("Default currency","woocommerce-payments"):c?`1,000 ${i} → ${t} ${e}`:`1 ${i} → ${t} ${e}`})()}),(0,Rn.jsxs)("div",{className:"enabled-currency__actions",children:[!n&&(0,Rn.jsx)(Ad,{isLink:!0,onClick:()=>{u(e)},"aria-label":(0,W.sprintf)((0,W.__)("Edit %1$s","woocommerce-payments"),o),className:"enabled-currency__action edit",children:(0,W.__)("manage","woocommerce-payments")}),l&&(0,Rn.jsx)(km,{className:"enabled-currency__action delete",onClick:l,label:o,code:e,symbol:a})]})]})},Dm=({isLoading:e,display:t,placeholder:r,value:n,children:o})=>e?q.createElement("span",{className:t?`is-loadable-placeholder is-${t}`:"is-loadable-placeholder","aria-busy":"true"},void 0===r?o||n:r):q.createElement(q.Fragment,null,o||n),Fm=e=>{const t=q.createElement("p",{style:{lineHeight:e.numLines}},"Block placeholder");return q.createElement(Dm,Object.assign({},e,{placeholder:t,display:"block"}))},Mm=({isLoading:e})=>(0,Rn.jsxs)("li",{className:Ou()("enabled-currency-placeholder","enabled-currency"),children:[(0,Rn.jsxs)("div",{className:"enabled-currency__container",children:[(0,Rn.jsx)("div",{className:"enabled-currency__flag",children:(0,Rn.jsx)(Fm,{isLoading:e,numLines:1,children:(0,Rn.jsx)("div",{className:"enabled-currency__flag-text"})})}),(0,Rn.jsx)("div",{className:"enabled-currency__label",children:(0,Rn.jsx)(Fm,{isLoading:e,numLines:1})}),(0,Rn.jsx)("div",{className:"enabled-currency__code",children:(0,Rn.jsx)(Fm,{isLoading:e,numLines:1})})]}),(0,Rn.jsx)("div",{className:"enabled-currency__rate",children:(0,Rn.jsx)(Fm,{isLoading:e,numLines:1})}),(0,Rn.jsx)("div",{className:"enabled-currency__actions",children:(0,Rn.jsx)(Fm,{isLoading:e,numLines:1})})]}),Lm=({children:e})=>(0,Rn.jsx)("ul",{children:e}),Um=function(e){let{icon:t,size:r=24,...n}=e;return(0,Q.cloneElement)(t,{width:r,height:r,...n})},$m=(0,Q.createElement)(Cu.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Q.createElement)(Cu.Path,{d:"M7 11.5h10V13H7z"})),Bm=(0,Q.createElement)(Cu.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Q.createElement)(Cu.Path,{d:"M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z"})),zm={"default.fontFamily":"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif","default.fontSize":"13px","helpText.fontSize":"12px",mobileTextMinFontSize:"16px"};function qm(e){return(0,mt.get)(zm,e,"")}const Hm=Mt("div",{target:"ej5x27r4"})("font-family:",qm("default.fontFamily"),";font-size:",qm("default.fontSize"),";"),Ym=Mt("div",{target:"ej5x27r3"})((e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&dt("margin-bottom:",Zt(2),";","")})," .components-panel__row &{margin-bottom:inherit;}"),Vm=dt("display:inline-block;margin-bottom:",Zt(2),";",""),Wm=Mt("label",{target:"ej5x27r2"})(Vm,";");var Gm={name:"11yad0w",styles:"margin-bottom:revert"};const Qm=Mt("p",{target:"ej5x27r1"})("margin-top:",Zt(2),";margin-bottom:0;font-size:",qm("helpText.fontSize"),";font-style:normal;color:",Dr.mediumGray.text,";",(e=>{let{__nextHasNoMarginBottom:t=!1}=e;return!t&&Gm}),";"),Zm=Mt("span",{target:"ej5x27r0"})(Vm,";"),Km=e=>{let{__nextHasNoMarginBottom:t=!1,id:r,label:n,hideLabelFromVision:o=!1,help:a,className:s,children:i}=e;return(0,Q.createElement)(Hm,{className:Ou()("components-base-control",s)},(0,Q.createElement)(Ym,{className:"components-base-control__field",__nextHasNoMarginBottom:t},n&&r&&(o?(0,Q.createElement)(Rd,{as:"label",htmlFor:r},n):(0,Q.createElement)(Wm,{className:"components-base-control__label",htmlFor:r},n)),n&&!r&&(o?(0,Q.createElement)(Rd,{as:"label"},n):(0,Q.createElement)(Km.VisualLabel,null,n)),i),!!a&&(0,Q.createElement)(Qm,{id:r?r+"__help":void 0,className:"components-base-control__help",__nextHasNoMarginBottom:t},a))};Km.VisualLabel=e=>{let{className:t,children:r}=e;return(0,Q.createElement)(Zm,{className:Ou()("components-base-control__label",t)},r)};const Xm=Km;function Jm(e){let{label:t,className:r,heading:n,checked:o,indeterminate:a,help:s,onChange:i,...c}=e;n&&nn()("`heading` prop in `CheckboxControl`",{alternative:"a separate element to implement a heading",since:"5.8"});const[l,u]=(0,Q.useState)(!1),[d,m]=(0,Q.useState)(!1),p=(0,Au.useRefEffect)((e=>{e&&(e.indeterminate=!!a,u(e.matches(":checked")),m(e.matches(":indeterminate")))}),[o,a]),y=`inspector-checkbox-control-${(0,Au.useInstanceId)(Jm)}`;return(0,Q.createElement)(Xm,{label:n,id:y,help:s,className:Ou()("components-checkbox-control",r)},(0,Q.createElement)("span",{className:"components-checkbox-control__input-container"},(0,Q.createElement)("input",G({ref:p,id:y,className:"components-checkbox-control__input",type:"checkbox",value:"1",onChange:e=>i(e.target.checked),checked:o,"aria-describedby":s?y+"__help":void 0},c)),d?(0,Q.createElement)(Um,{icon:$m,className:"components-checkbox-control__indeterminate",role:"presentation"}):null,l?(0,Q.createElement)(Um,{icon:Bm,className:"components-checkbox-control__checked",role:"presentation"}):null),(0,Q.createElement)("label",{className:"components-checkbox-control__label",htmlFor:y},t))}const ep=({onChange:e,checked:t=!1,currency:{flag:r,symbol:n,code:o,name:a},testId:s=null})=>{const i=(0,Q.useCallback)((t=>{e(o,t)}),[o,e]);return(0,Rn.jsx)("li",{className:"enabled-currency-checkbox","data-testid":s,children:(0,Rn.jsx)(Jm,{code:o,checked:t,onChange:i,label:Nd({mixedString:"{{flag /}} {{name /}} {{code /}}",components:{flag:(0,Rn.jsx)("span",{className:"enabled-currency-checkbox__flag",children:""!==r?r:(0,Rn.jsx)("div",{className:"enabled-currency-checkbox__flag-text",children:(0,Rn.jsx)("span",{children:o})})}),name:(0,Rn.jsx)("span",{children:a}),code:(0,Rn.jsxs)("span",{className:"enabled-currency-checkbox__code",children:["(",n,n!==o&&" "+o,")"]})}})})})},tp=(0,Q.createElement)(Cu.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,Q.createElement)(Cu.Path,{d:"M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"})),rp=e=>(0,Rn.jsxs)("div",{className:"search",children:[(0,Rn.jsx)(Um,{className:"search__icon",icon:tp}),(0,Rn.jsx)("input",{...e,type:"text",className:"components-text-control__input"})]}),np=({className:e})=>{const t=(0,mo.useSelect)((e=>{const{getAvailableCurrencies:t}=e(ho);return t()})),r=Object.keys(t),n=(0,Q.useRef)(null),{enabledCurrencies:o,submitEnabledCurrenciesUpdate:a}=Xc(),s=Object.keys(o),i=el().code;r.splice(r.indexOf(i),1);const[c,l]=(0,Q.useState)(""),[u,d]=(0,Q.useState)({}),m=c?r.filter((e=>{const{symbol:r,name:n}=t[e];return`${r} ${e} ${n}`.toLocaleLowerCase().indexOf(c.toLocaleLowerCase())>-1})):r,p=(0,Q.useCallback)((()=>{d(r.reduce(((e,t)=>(e[t]=s.includes(t),e)),{}))}),[s,r]);(0,Q.useEffect)((()=>{p()}),[JSON.stringify(r),JSON.stringify(s)]);const y=(e,t)=>{d((r=>({...r,[e]:t})))},[h,_]=(0,Q.useState)(!1),[f,g]=(0,Q.useState)(!1),b=(0,Q.useCallback)((()=>{_(!0)}),[_]),v=(0,Q.useCallback)((()=>{_(!1),g(!1),l(""),p()}),[_,p]);return(0,Q.useEffect)((()=>{h&&n&&!1===f&&g(n.current.offsetWidth)}),[JSON.stringify(m),h]),(0,Rn.jsxs)(Rn.Fragment,{children:[h&&(0,Rn.jsxs)(Ld,{title:(0,W.__)("Add enabled currencies","woocommerce-payments"),onRequestClose:v,className:"add-enabled-currencies-modal",actions:(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsx)(Ad,{isSecondary:!0,onClick:v,children:(0,W.__)("Cancel","woocommerce-payments")}),(0,Rn.jsx)(Ad,{isPrimary:!0,onClick:()=>{_(!1),g(!1),l("");const e=Object.entries(u).filter((([,e])=>e)).map((([e])=>e));e.push(i),e.sort(),a(e)},children:(0,W.__)("Update selected","woocommerce-payments")})]}),children:[(0,Rn.jsx)("div",{className:"add-enabled-currencies-modal__search",children:(0,Rn.jsx)(rp,{value:c,placeholder:(0,W.__)("Search currencies","woocommerce-payments"),onChange:e=>{l(e.target.value)}})}),(0,Rn.jsx)("h3",{children:c?(0,W.sprintf)((0,W.__)("Search results (%1$d currencies)","woocommerce-payments"),m.length):(0,W.__)("All currencies","woocommerce-payments")}),(0,Rn.jsx)("div",{className:"add-enabled-currencies-modal__content",ref:n,style:{width:f||"auto"},children:(0,Rn.jsx)(Lm,{children:m.map((e=>(0,Rn.jsx)(ep,{checked:u[e],onChange:y,currency:t[e]},t[e].id)))})})]}),(0,Rn.jsx)(Ad,{variant:"secondary",className:e,onClick:b,"data-testid":"enabled-currencies-add-button",children:(0,W.__)("Add/remove currencies","woocommerce-payments")})]})},op=({description:e=()=>null,children:t,className:r,id:n})=>H().createElement("div",{className:Ou()("settings-section",r),id:n},H().createElement("div",{className:"settings-section__details"},H().createElement(e,null)),H().createElement("div",{className:"settings-section__controls"},t)),ap=()=>{const e="https://woocommerce.com/document/woopayments/currencies/multi-currency-setup/#enabled-currencies";return(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsx)("h2",{children:(0,W.__)("Enabled currencies","woocommerce-payments")}),(0,Rn.jsx)("p",{children:(0,Q.createInterpolateElement)((0,W.sprintf)((0,W.__)("Accept payments in multiple currencies. Prices are converted based on exchange rates and rounding rules. <learnMoreLink>Learn more</learnMoreLink>","woocommerce-payments"),e),{learnMoreLink:(0,Rn.jsx)("a",{href:e,target:"_blank",rel:"noreferrer"})})})]})},sp=()=>{const{isLoading:e}=Kc(),t=el(),{enabledCurrencies:r,submitEnabledCurrenciesUpdate:n}=Xc(),o="wcpay-multi-currency",a=e=>{const t=Object.keys(r);t.splice(t.indexOf(e),1),n(t)},s=r?Object.keys(r):[];return(0,Rn.jsx)(op,{description:ap,className:"multi-currency-settings-enabled-currencies-section",children:(0,Rn.jsxs)(hn,{className:`${o}__enabled-currencies`,children:[(0,Rn.jsxs)(En,{className:`${o}__enabled-currencies-header`,children:[(0,Rn.jsx)("div",{children:(0,W.__)("Name","woocommerce-payments")}),(0,Rn.jsx)("div",{children:(0,W.__)("Exchange rate","woocommerce-payments")}),(0,Rn.jsx)("div",{})]}),(0,Rn.jsx)(uo,{}),(0,Rn.jsx)(En,{size:null,children:(0,Rn.jsxs)(Tu,{className:"enabled-currencies-list",children:[!e&&r&&s.map((e=>(0,Rn.jsx)(Pm,{currency:r[e],defaultCurrency:t,onDeleteClick:r[e].is_default?void 0:a},r[e].id))),e&&[1,2,3,4,5].map((e=>(0,Rn.jsx)(Mm,{isLoading:1},"loadable-placeholder-"+e)))]})}),(0,Rn.jsx)(uo,{}),(0,Rn.jsx)(En,{className:`${o}__available-currencies-container`,children:r&&(0,Rn.jsx)(np,{className:`${o}__available-currencies-modal`})})]})})},ip=({isPreviewModalOpen:e,setPreviewModalOpen:t,isStorefrontSwitcherEnabledValue:r,isAutomaticSwitchEnabledValue:n})=>{const{storeSettings:o}=Jc();return e&&(0,Rn.jsx)(Md,{title:(0,W.__)("Preview","woocommerce-payments"),isDismissible:!0,className:"multi-currency-store-settings-preview-modal",shouldCloseOnClickOutside:!1,onRequestClose:()=>{t(!1)},children:(0,Rn.jsx)("iframe",{title:(0,W.__)("Preview","woocommerce-payments"),className:"multi-currency-store-settings-preview-iframe",src:"/"+o.store_url+"?is_mc_onboarding_simulation=1&enable_storefront_switcher="+r+"&enable_auto_currency="+n})})},cp=()=>{const e="https://woocommerce.com/document/woopayments/currencies/multi-currency-setup/#store-settings";return(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsx)("h2",{children:(0,W.__)("Store settings","woocommerce-payments")}),(0,Rn.jsx)("p",{children:(0,Q.createInterpolateElement)((0,W.sprintf)((0,W.__)("Store settings allow your customers to choose which currency they would like to use when shopping at your store. <learnMoreLink>Learn more</learnMoreLink>","woocommerce-payments"),e),{learnMoreLink:(0,Rn.jsx)("a",{href:e,target:"_blank",rel:"noreferrer"})})})]})},lp=()=>{const{storeSettings:e,isLoading:t,submitStoreSettingsUpdate:r}=Jc(),[n,o]=(0,q.useState)(!1),[a,s]=(0,q.useState)(!1),[i,c]=(0,q.useState)(!1),[l,u]=(0,q.useState)(!1);return(0,q.useEffect)((()=>{Object.keys(e).length&&(c(e.enable_storefront_switcher),s(e.enable_auto_currency))}),[s,c,e]),(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsx)(op,{description:cp,className:"multi-currency-settings-store-settings-section",children:(0,Rn.jsx)(Fm,{isLoading:t,numLines:10,children:(0,Rn.jsxs)(hn,{className:"multi-currency-settings__wrapper",children:[(0,Rn.jsxs)(En,{children:[(0,Rn.jsx)(Jm,{checked:a,onChange:e=>{s(e)},"data-testid":"enable_auto_currency",label:(0,W.__)("Automatically switch customers to their local currency if it has been enabled","woocommerce-payments")}),(0,Rn.jsx)("div",{className:"multi-currency-settings__description",children:(0,Q.createInterpolateElement)((0,W.__)("Customers will be notified via store alert banner. <previewLink>Preview</previewLink>","woocommerce-payments"),{previewLink:(0,Rn.jsx)(Ad,{isLink:!0,onClick:()=>{u(!0)}})})}),"Storefront"===e.site_theme?(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsx)(Jm,{checked:i,onChange:e=>{c(e)},"data-testid":"enable_storefront_switcher",label:(0,W.__)("Add a currency switcher to the Storefront theme on breadcrumb section.","woocommerce-payments")}),(0,Rn.jsx)("div",{className:"multi-currency-settings__description",children:(0,Q.createInterpolateElement)((0,W.sprintf)((0,W.__)("A currency switcher is also available in your widgets. <linkToWidgets>Configure now</linkToWidgets>","woocommerce-payments"),"widgets.php"),{linkToWidgets:(0,Rn.jsx)("a",{href:"widgets.php"})})})]}):null]}),(0,Rn.jsx)(ip,{isPreviewModalOpen:l,setPreviewModalOpen:u,isStorefrontSwitcherEnabledValue:!1,isAutomaticSwitchEnabledValue:!0})]})})}),(0,Rn.jsx)(op,{className:"multi-currency-settings-save-settings-section",children:(0,Rn.jsx)(Ad,{isPrimary:!0,isBusy:n,disabled:n,onClick:()=>{o(!0),r(a,i),o(!1)},children:(0,W.__)("Save changes","woocommerce-payments")})})]})},up=()=>(0,Rn.jsx)("div",{className:"multi-currency-settings",children:(0,Rn.jsxs)(xn,{displayBanner:!1,children:[(0,Rn.jsx)(sp,{}),(0,Rn.jsx)(lp,{})]})}),dp=window.wc.components,mp=({storeCurrency:e,targetCurrency:t,currencyRate:r=null,roundingValue:n,charmValue:o})=>{const[a,s]=(0,q.useState)(20),[i,c]=(0,q.useState)(0),l=(0,q.useCallback)((e=>{const a=parseFloat(e.toString().replace(/,/g,"."))*parseFloat(r||t.rate),s=(parseFloat(n)?Math.ceil(a/parseFloat(n))*parseFloat(n):a)+parseFloat(o);return isNaN(s)?(0,W.__)("Please enter a valid number","woocommerce-payments"):Po(jo(t.code)?s:100*s,t.code,null,!0)}),[o,r,n,t]);(0,q.useEffect)((()=>{if(t){const e=l(a);c(e)}}),[l,a,t,n,o,r]);const u=e=>{s(e);const t=l(e);c(t)};return(0,Rn.jsx)("div",{className:"single-currency-settings-preview-wrapper",children:(0,Rn.jsx)(hn,{children:(0,Rn.jsxs)(En,{children:[(0,Rn.jsxs)("div",{children:[(0,Rn.jsx)("h4",{children:e.name}),"left"===e.symbol_position?(0,Rn.jsx)(dp.TextControlWithAffixes,{prefix:e.symbol,"data-testid":"store_currency_value",value:a.toString(),onChange:u}):(0,Rn.jsx)(dp.TextControlWithAffixes,{suffix:e.symbol,"data-testid":"store_currency_value",value:a.toString(),onChange:u})]}),(0,Rn.jsxs)("div",{children:[(0,Rn.jsx)("h4",{children:t&&t.name}),(0,Rn.jsx)("div",{children:(0,Rn.jsx)("strong",{"data-testid":"calculated_value",children:i})})]})]})})})},pp={0:(0,W.__)("None","woocommerce-payments"),.25:"0.25","0.50":"0.50","1.00":"1.00 (recommended)","5.00":"5.00","10.00":"10.00"},yp={1:"1",10:"10",25:"25",50:"50",100:"100 (recommended)",500:"500",1e3:"1000"},hp={"0.00":(0,W.__)("None","woocommerce-payments"),"-0.01":"-0.01","-0.05":"-0.05"},_p={"0.00":(0,W.__)("None","woocommerce-payments"),"-1":"-1","-5":"-5","-10":"-10","-20":"-20","-25":"-25","-50":"-50","-100":"-100"},fp=()=>{var e,t;const{currencyCodeToShowSettingsFor:r,closeSingleCurrencySettings:n}=(0,q.useContext)(jm),o=r,{currencies:a}=Kc(),{enabledCurrencies:s}=Xc(),{storeSettings:i}=Jc(),{currencySettings:c,isLoading:l,submitCurrencySettings:u}=(e=>{const{currencySettings:t,isLoading:r}=(0,mo.useSelect)((t=>{const{getCurrencySettings:r,isResolving:n}=t(ho);return{currencySettings:r(e),isLoading:n("getCurrencySettings",[e])}})),{submitCurrencySettings:n}=(0,mo.dispatch)(ho);return{currencySettings:t,isLoading:r,submitCurrencySettings:n}})(o),d=a.default?a.default:{},m=a.available?a.available[o]:{},p=m.is_zero_decimal?yp:pp,y=m.is_zero_decimal?_p:hp,h="automatic",_=m?.is_zero_decimal?"100":"1.00",f="0.00",[g,b]=(0,q.useState)(h),[v,S]=(0,q.useState)(0),[w,E]=(0,q.useState)(_),[T,R]=(0,q.useState)(f),[O,A]=(0,q.useState)(!1);(0,q.useEffect)((()=>{var e;c[o]&&(b(c[o].exchange_rate_type||h),S(c[o].manual_rate||0),E(null!==(e=c[o].price_rounding)&&void 0!==e?e:_),R(c[o].price_charm||f))}),[c,o,_]);const x=null!==(e=i.date_format)&&void 0!==e?e:"M j, Y",C=null!==(t=i.time_format)&&void 0!==t?t:"g:iA",N=m?(0,$o.dateI18n)(`${x} ${C}`,Uo().unix(m.last_updated).toISOString()):"";return(0,Rn.jsx)("div",{className:"single-currency-settings",children:(0,Rn.jsxs)(xn,{displayBanner:!1,children:[(0,Rn.jsxs)("h2",{className:"single-currency-settings-breadcrumb",children:[(0,Rn.jsx)(Ad,{isLink:!0,onClick:()=>n(),children:(0,W.__)("Enabled currencies","woocommerce-payments")})," ","> ",m.name," (",m.code,")"," ",m.flag]}),(0,Rn.jsx)(op,{description:()=>(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsx)("h2",{children:(0,W.__)("Currency settings","woocommerce-payments")}),(0,Rn.jsx)("p",{children:(0,W.__)("Choose between automatic or manual exchange rates and modify formatting rules to refine the display of your prices.","woocommerce-payments")})]}),children:(0,Rn.jsx)(Fm,{isLoading:l,numLines:33,children:(0,Rn.jsx)(hn,{className:"single-currency-settings-currency-settings",children:(0,Rn.jsxs)(En,{children:[(0,Rn.jsx)("h3",{children:(0,W.__)("Exchange rate","woocommerce-payments")}),(0,Rn.jsx)("fieldset",{children:(0,Rn.jsxs)("ul",{children:[(0,Rn.jsx)("li",{children:(0,Rn.jsxs)("label",{htmlFor:"single-currency-settings__automatic_rate_radio",children:[(0,Rn.jsxs)("div",{className:"single-currency-settings-radio-wrapper",children:[(0,Rn.jsx)("input",{name:"wcpay_multi_currency_exchange_rate_aud",id:"single-currency-settings__automatic_rate_radio",value:"automatic",type:"radio",className:"exchange-rate-selector",checked:"automatic"===g,onChange:()=>b("automatic")}),(0,Rn.jsx)("h4",{children:(0,W.__)("Fetch rates automatically","woocommerce-payments")})]}),(0,Rn.jsx)("p",{className:Ou()("single-currency-settings-description","single-currency-settings-description-inset"),children:m.last_updated?(0,W.sprintf)((0,W.__)("Current rate: 1 %s = %s %s (Last updated: %s)","woocommerce-payments"),d.code,m.rate,m.code,N):(0,W.__)("Error - Unable to fetch automatic rate for this currency")})]})}),(0,Rn.jsx)("li",{children:(0,Rn.jsxs)("label",{htmlFor:"single-currency-settings__manual_rate_radio",children:[(0,Rn.jsxs)("div",{className:"single-currency-settings-radio-wrapper",children:[(0,Rn.jsx)("input",{name:"wcpay_multi_currency_exchange_rate_aud",id:"single-currency-settings__manual_rate_radio",value:"manual",type:"radio",className:"exchange-rate-selector",checked:"manual"===g,onChange:()=>{b("manual"),S(v||m.rate)}}),(0,Rn.jsx)("h4",{children:(0,W.__)("Manual","woocommerce-payments")})]}),(0,Rn.jsx)("p",{className:Ou()("single-currency-settings-description","single-currency-settings-description-inset"),children:(0,W.__)("Enter your fixed rate of exchange","woocommerce-payments")})]})}),"manual"===g?(0,Rn.jsxs)("li",{children:[(0,Rn.jsx)("h4",{children:(0,W.__)("Manual Rate","woocommerce-payments")}),(0,Rn.jsx)("input",{type:"text","data-testid":"manual_rate_input",defaultValue:v||m.rate,onChange:e=>S(e.target.value.replace(/,/g,"."))}),(0,Rn.jsx)("p",{className:"single-currency-settings-description",children:(0,W.__)("Enter the manual rate you would like to use. Must be a positive number.","woocommerce-payments")})]}):""]})}),(0,Rn.jsx)("h3",{children:(0,W.__)("Formatting rules","woocommerce-payments")}),(0,Rn.jsx)("fieldset",{children:(0,Rn.jsxs)("ul",{children:[(0,Rn.jsxs)("li",{children:[(0,Rn.jsx)("h4",{children:(0,W.__)("Price rounding","woocommerce-payments")}),(0,Rn.jsx)("select",{value:parseFloat(w),"data-testid":"price_rounding",onChange:e=>E(e.target.value),children:Object.keys(p).map((e=>(0,Rn.jsx)("option",{value:parseFloat(e),children:p[e]},e)))}),(0,Rn.jsxs)("p",{className:"single-currency-settings-description",children:[(0,W.sprintf)((0,W.__)("Make your %s prices consistent by rounding them up after they're converted.","woocommerce-payments"),m.code),(0,Rn.jsx)(Ad,{isLink:!0,onClick:()=>{open("https://woocommerce.com/document/woopayments/currencies/multi-currency-setup/#price-rounding","_blank")},children:(0,W.__)("Learn more","woocommerce-payments")})]})]}),(0,Rn.jsxs)("li",{children:[(0,Rn.jsx)("h4",{children:(0,W.__)("Charm pricing","woocommerce-payments")}),(0,Rn.jsx)("select",{value:parseFloat(T),"data-testid":"price_charm",onChange:e=>R(e.target.value),children:Object.keys(y).map((e=>(0,Rn.jsx)("option",{value:parseFloat(e),children:y[e]},e)))}),(0,Rn.jsxs)("p",{className:"single-currency-settings-description",children:[(0,W.__)("Reduce the converted price for a specific amount","woocommerce-payments"),(0,Rn.jsx)(Ad,{isLink:!0,onClick:()=>{open("https://woocommerce.com/document/woopayments/currencies/multi-currency-setup/#charm-pricing","_blank")},children:(0,W.__)("Learn more","woocommerce-payments")})]})]})]})})]})})})}),(0,Rn.jsx)(op,{description:()=>(0,Rn.jsxs)(Rn.Fragment,{children:[(0,Rn.jsx)("h2",{children:(0,W.__)("Preview","woocommerce-payments")}),(0,Rn.jsx)("p",{children:l?"":(0,W.sprintf)((0,W.__)("Enter a price in your default currency (%s) to see it converted to %s using the exchange rate and formatting rules above.","woocommerce-payments"),d.name,m.name)})]}),children:(0,Rn.jsx)(Fm,{isLoading:l,numLines:8,children:(0,Rn.jsx)(mp,{className:"single-currency-settings-currency-preview",storeCurrency:d,targetCurrency:m,currencyRate:"manual"===g?v:null,roundingValue:w,charmValue:T})})}),(0,Rn.jsx)(op,{className:"single-currency-settings-save-settings-section",children:(0,Rn.jsx)(Ad,{isPrimary:!0,isBusy:O,disabled:O,onClick:()=>{A(!0),u(m.code,{exchange_rate_type:g,manual_rate:v,price_rounding:w,price_charm:T}),isNaN(v)||(s[m.code].rate=Number(v)),A(!1)},children:(0,W.__)("Save changes","woocommerce-payments")})})]})})},gp=()=>{const[e,t]=(0,q.useState)(!1),[r,n]=(0,q.useState)(null);return(0,Rn.jsx)(jm.Provider,{value:{isSingleCurrencyScreenOpen:e,currencyCodeToShowSettingsFor:r,openSingleCurrencySettings:e=>{n(e),t(!0)},closeSingleCurrencySettings:()=>{t(!1),n(null)}},children:e?(0,Rn.jsx)(fp,{}):(0,Rn.jsx)(up,{})})};V().render((0,Rn.jsx)(gp,{}),document.querySelector("#wcpay_multi_currency_settings_container"))})()})();