@yuno-payments/dashboard-api-mfe 0.36.65 → 0.36.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -220,7 +220,7 @@ function ra(e){const t=ia.parse(e),n={};for(const e in t)void 0!==t[e]&&(n[e]=t[
220
220
  *
221
221
  * This source code is licensed under the MIT license found in the
222
222
  * LICENSE file in the root directory of this source tree.
223
- */"production"===process.env.NODE_ENV?wf.exports=function(){if(xf)return jf;xf=1;var e=x,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,o=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function r(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!t(e,o)}catch(e){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),c=n({inst:{value:s,getSnapshot:t}}),u=c[0].inst,l=c[1];return a((function(){u.value=s,u.getSnapshot=t,r(u)&&l({inst:u})}),[e,s,t]),o((function(){return r(u)&&l({inst:u}),e((function(){r(u)&&l({inst:u})}))}),[e]),i(s),s};return jf.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:s,jf}():wf.exports=(_f||(_f=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!n(e,o)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=x,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=t.useState,a=t.useEffect,i=t.useLayoutEffect,r=t.useDebugValue,s=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(u,l){s||void 0===t.startTransition||(s=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=l();if(!c){var d=l();n(p,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var m=(d=o({inst:{value:p,getSnapshot:l}}))[0].inst,h=d[1];return i((function(){m.value=p,m.getSnapshot=l,e(m)&&h({inst:m})}),[u,p,l]),a((function(){return e(m)&&h({inst:m}),u((function(){e(m)&&h({inst:m})}))}),[u]),r(p),p};Ef.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ef);var Cf=wf.exports;const Sf=Cf.useSyncExternalStore,Rf=k.createContext(void 0),Tf=k.createContext(!1);function Of(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Rf),window.ReactQueryClientContext):Rf)}const Af=({context:e}={})=>{const t=k.useContext(Of(e,k.useContext(Tf)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},If=({client:e,children:t,context:n,contextSharing:o=!1})=>{k.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]),"production"!==process.env.NODE_ENV&&o&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const a=Of(n,o);return k.createElement(Tf.Provider,{value:!n&&o},k.createElement(a.Provider,{value:e},t))},zf=k.createContext(!1);zf.Provider;const Lf=k.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function Pf(e,t){return"function"==typeof e?e(...t):!!e}function Df(e,t){const n=Af({context:e.context}),o=k.useContext(zf),a=k.useContext(Lf),i=n.defaultQueryOptions(e);i._optimisticResults=o?"isRestoring":"optimistic",i.onError&&(i.onError=rf.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=rf.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=rf.batchCalls(i.onSettled)),(e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)})(i),((e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))})(i,a),(e=>{k.useEffect((()=>{e.clearReset()}),[e])})(a);const[r]=k.useState((()=>new t(n,i))),s=r.getOptimisticResult(i);if(Sf(k.useCallback((e=>{const t=o?()=>{}:r.subscribe(rf.batchCalls(e));return r.updateResult(),t}),[r,o]),(()=>r.getCurrentResult()),(()=>r.getCurrentResult())),k.useEffect((()=>{r.setOptions(i,{listeners:!1})}),[i,r]),((e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n))(i,s,o))throw((e,t,n)=>t.fetchOptimistic(e).then((({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)})).catch((t=>{n.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)})))(i,r,a);if((({result:e,errorResetBoundary:t,useErrorBoundary:n,query:o})=>e.isError&&!t.isReset()&&!e.isFetching&&Pf(n,[e.error,o]))({result:s,errorResetBoundary:a,useErrorBoundary:i.useErrorBoundary,query:r.getCurrentQuery()}))throw s.error;return i.notifyOnChangeProps?s:r.trackResult(s)}function qf(e,t,n){return Df(zh(e,t,n),ff)}function Nf(e,t,n){const o=function(e,t,n){return Vh(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}(e,t,n),a=Af({context:o.context}),[i]=k.useState((()=>new kf(a,o)));k.useEffect((()=>{i.setOptions(o)}),[i,o]);const r=Sf(k.useCallback((e=>i.subscribe(rf.batchCalls(e))),[i]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),s=k.useCallback(((e,t)=>{i.mutate(e,t).catch(Mf)}),[i]);if(r.error&&Pf(i.options.useErrorBoundary,[r.error]))throw r.error;return{...r,mutate:s,mutateAsync:r.mutate}}function Mf(){}function Ff(e){return Nf((function(e){var t=e.payload;return Sh.getInstance().postWebhookV2MultiAccount({payload:t})}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Uf(e){return Nf((function(e){var t=e.code,n=e.accountCode;return Sh.getInstance().deleteWebhookV2(t,n)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Bf(e){return Nf((function(e){var t=e.code,n=e.payload,o=e.accountCode;return Sh.getInstance().updateWebhookV2(t,n,o)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Hf(){return Nf((function(e){var t=e.name,n=e.principal;return Sh.getInstance().postAccount(t,n)}))}function Wf(){return Nf((function(e){var t=e.name,n=e.code,o=e.principal;return Sh.getInstance().patchAccountV2({name:t,code:n,principal:o})}))}function Gf(){return Nf((function(e){var t=e.account_code;return Sh.getInstance().putAccountPrincipal({account_code:t})}))}function Vf(){return Nf((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Sh.getInstance().putAccountsUserMassive(t,n,o)}))}function $f(){return Nf((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Sh.getInstance().deleteAccountsUserMassive(t,n,o)}))}function Kf(){return Nf(["post-validate-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Sh.getInstance().postValidateStatusConnection({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Qf(){return Nf(["post-change-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Sh.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Jf(){return Nf((function(e){return Sh.getInstance().putCosts(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Xf(){return Nf(["post-connection"],(function(e){var t=e.payload;return Sh.getInstance().postMultiConnection({payload:t}).then((function(e){return null==e?void 0:e.data}))}))}function Yf(){return Nf(["new-post-connection-validate"],(function(){return Sh.getInstance().postMultiConnectionValidate().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Zf(){return Nf(["patch-connection"],(function(e){var t=e.payload,n=e.connectionCode;return Sh.getInstance().patchConnection({payload:t,connectionCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function eg(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postDefaultRoutes({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function tg(){return Nf((function(e){return Sh.getInstance().postValidateCredentials(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function ng(){return Nf(["patch-organizations"],(function(){return Sh.getInstance().updateOrganizationStatus().then((function(e){return null==e?void 0:e.data}))}))}function og(){return Nf((function(e){return Sh.getInstance().getOrgByName(e).then((function(e){return null==e?void 0:e.data}))}))}function ag(){var e=this;return Nf((function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Sh.getInstance().changePasswordV2(o).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}))}function ig(e){return Nf((function(e){return Sh.getInstance().updateProfile(e)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function rg(){return Nf((function(e){return Sh.getInstance().inviteUsersMassive(e,e.organizationCode)}))}function sg(){return Nf((function(e){var t=e.userCode,n=e.organizationCode;return Sh.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})}))}function cg(){return Nf((function(e){return Sh.getInstance().createUserAuth0(e)}))}function ug(){return Nf((function(e){return Sh.getInstance().postCall(e)}))}function lg(){return Nf((function(e){return Sh.getInstance().changeLoginMethods(e)}))}function pg(e){return Nf((function(e){return Sh.getInstance().updateIsActiveCheckout(e)}),e)}function dg(){return Nf((function(e){var t=e.accountCode,n=e.template;return Sh.getInstance().updateCheckoutTemplate({accountCode:t,template:n}).then((function(e){return null==e?void 0:e.data}))}))}function mg(){return Nf((function(e){var t=e.accountCode,n=e.theme;return Sh.getInstance().updateStylingTheme({accountCode:t,theme:n}).then((function(e){return null==e?void 0:e.data}))}))}function hg(){return Nf((function(e){var t=e.payload,n=e.transactionId,o=e.paymentId,a=e.action;return Sh.getInstance().createOperationTransaction(t,n,o,a)}))}function fg(){return Nf((function(e){var t=e.payload,n=e.paymentId,o=e.transactionId,a=e.handleSetProgress;return Sh.getInstance().uploadChargebacks(t,n,o,a)}))}var gg=new uf({}),yg=new class{constructor(e={}){this.queryCache=e.queryCache||new uf,this.mutationCache=e.mutationCache||new df,this.logger=e.logger||af,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,"production"!==process.env.NODE_ENV&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=Jh.subscribe((()=>{Jh.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())})),this.unsubscribeOnline=Yh.subscribe((()=>{Yh.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=Lh(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const o=zh(e,t,n),a=this.getQueryData(o.queryKey);return a?Promise.resolve(a):this.fetchQuery(o)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const o=this.queryCache.find(e),a=function(e,t){return"function"==typeof e?e(t):e}(t,null==o?void 0:o.state.data);if(void 0===a)return;const i=zh(e),r=this.defaultQueryOptions(i);return this.queryCache.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return rf.batch((()=>this.getQueryCache().findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=Lh(e,t),o=this.queryCache;rf.batch((()=>{o.findAll(n).forEach((e=>{o.remove(e)}))}))}resetQueries(e,t,n){const[o,a]=Lh(e,t,n),i=this.queryCache,r={type:"active",...o};return rf.batch((()=>(i.findAll(o).forEach((e=>{e.reset()})),this.refetchQueries(r,a))))}cancelQueries(e,t,n){const[o,a={}]=Lh(e,t,n);void 0===a.revert&&(a.revert=!0);const i=rf.batch((()=>this.queryCache.findAll(o).map((e=>e.cancel(a)))));return Promise.all(i).then(Oh).catch(Oh)}invalidateQueries(e,t,n){const[o,a]=Lh(e,t,n);return rf.batch((()=>{var e,t;if(this.queryCache.findAll(o).forEach((e=>{e.invalidate()})),"none"===o.refetchType)return Promise.resolve();const n={...o,type:null!=(e=null!=(t=o.refetchType)?t:o.type)?e:"active"};return this.refetchQueries(n,a)}))}refetchQueries(e,t,n){const[o,a]=Lh(e,t,n),i=rf.batch((()=>this.queryCache.findAll(o).filter((e=>!e.isDisabled())).map((e=>{var t;return e.fetch(void 0,{...a,cancelRefetch:null==(t=null==a?void 0:a.cancelRefetch)||t,meta:{refetchPage:o.refetchPage}})}))));let r=Promise.all(i).then(Oh);return null!=a&&a.throwOnError||(r=r.catch(Oh)),r}fetchQuery(e,t,n){const o=zh(e,t,n),a=this.defaultQueryOptions(o);void 0===a.retry&&(a.retry=!1);const i=this.queryCache.build(this,a);return i.isStaleByTime(a.staleTime)?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(Oh).catch(Oh)}fetchInfiniteQuery(e,t,n){const o=zh(e,t,n);return o.behavior=mf(),this.fetchQuery(o)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(Oh).catch(Oh)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find((t=>Nh(e)===Nh(t.queryKey)));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find((t=>Mh(e,t.queryKey)));if("production"!==process.env.NODE_ENV){this.queryDefaults.filter((t=>Mh(e,t.queryKey))).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults.")}return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find((t=>Nh(e)===Nh(t.mutationKey)));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find((t=>Mh(e,t.mutationKey)));if("production"!==process.env.NODE_ENV){this.mutationDefaults.filter((t=>Mh(e,t.mutationKey))).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults.")}return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=qh(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,retry:!1,staleTime:3e5,useErrorBoundary:!0}},queryCache:gg});function vg(){return Nf((function(e){return Sh.getInstance().createReconciliationsReportV2(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function bg(){return Nf((function(e){return Sh.getInstance().createReportV2(e).then((function(e){return null==e?void 0:e.data}))}))}function kg(){return Nf((function(e){return Sh.getInstance().getTotalRowsForExport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function xg(){return Nf((function(e){return Sh.getInstance().cancelReport(e).then((function(e){return null==e?void 0:e.data}))}))}function wg(o){var a=this;return Nf((function(){return t(a,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().createReportTemplate(o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onMutate:function(o){return t(a,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return[4,yg.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return n.sent(),t=yg.getQueryData(["GET/reports/templates"]),yg.setQueryData(["GET/reports/templates"],(function(t){return e(e([],t,!0),[o],!1)})),[2,{previousTemplates:t}]}}))}))},onError:function(e,t,n){yg.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){yg.invalidateQueries({queryKey:["GET/reports/templates"]})}})}function jg(e){return Nf((function(){return Sh.getInstance().updateReportTemplate(e).then((function(e){return null==e?void 0:e.data}))}))}function _g(e,o,a){var i=this;return void 0===a&&(a=null),Nf((function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().postSmartRoutingCreateWorkflow(e,o).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,t.sent()]}}))}))}),a)}function Eg(e,o){var a=this,i=e.versionCode,r=e.accountCode,s=e.organizationCode;return void 0===o&&(o=null),Nf((function(){return t(a,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Sh.getInstance().postSmartRoutingPublishVersion(r,i,s).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}),o)}function Cg(e,t){var n=e.data,o=e.accountCode;return void 0===t&&(t=null),Nf((function(){return Sh.getInstance().putSmartRoutingUpdateWorkflow(o,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),t)}function Sg(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Nf((function(){return Sh.getInstance().deleteSmartRoutingVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)}function Rg(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Nf((function(){return Sh.getInstance().postSmartRoutingDuplicateVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)}function Tg(e,t){var n=e.paymentMethod,o=e.active,a=e.accountCode;return void 0===t&&(t=null),Nf((function(){return Sh.getInstance().putSmartRoutingToggleMethod(a,n,o).then((function(e){return null==e?void 0:e.data}))}),t)}function Og(e,t){var n=e.declinedId,o=e.accountCode;return void 0===t&&(t=null),Nf((function(e){return void 0===e&&(e=null),Sh.getInstance().updateSmartRoutingDeclinedGroup(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)}function Ag(e){var t=e.accountCode;return Nf((function(e){return void 0===e&&(e=null),Sh.getInstance().createSmartRoutingDeclinedGroup(t,e).then((function(e){return null==e?void 0:e.data}))}),e.options)}function Ig(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Nf((function(e){return void 0===e&&(e=!1),Sh.getInstance().updateSmartRoutingFavorite(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)}function zg(e,t){var n=e.code,o=e.name,a=e.accountCode;return void 0===t&&(t=null),Nf((function(){return Sh.getInstance().putSmartRoutingUpdateWorkflowName(a,{code:n,name:o}).then((function(e){return null==e?void 0:e.data}))}),t)}function Lg(e,t){var n=e.accountCode,o=e.workflowVersionCode;return void 0===t&&(t=null),Nf((function(e){return Sh.getInstance().simulateSmartRoutingTransaction(n,o,e).then((function(e){return null==e?void 0:e.data}))}),t)}function Pg(e,t){return void 0===t&&(t=null),Nf((function(t){return Sh.getInstance().updateMonitorRedistribution(e,t).then((function(e){return null==e?void 0:e.data}))}),t)}function Dg(e,t){return void 0===t&&(t={}),Nf((function(t){var n=t.declinedGroupCode;return Sh.getInstance().removeDeclinedGroup(e,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),a(a({},t),{useErrorBoundary:!1}))}function qg(e,t){return void 0===t&&(t={}),Nf((function(t){var n=t.payload;return Sh.getInstance().multiAccountDeclinedGroupCreate(e,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),a(a({},t),{useErrorBoundary:!1}))}var Ng=function(e){return Nf((function(t){return Sh.getInstance().createMonitorThreshold(t,e).then((function(e){return e.data}))}))},Mg=function(e){return Nf((function(t){return Sh.getInstance().createMonitorTemplate(t,e).then((function(e){return e.data}))}))};function Fg(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postSlackMessageChannel(t).then((function(e){return null==e?void 0:e.data}))}))}function Ug(){return Nf((function(e){var t=e.userCode,n=e.organizationCode;return Sh.getInstance().deleteUserTeamV2({userCode:t,organizationCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function Bg(){return Nf((function(){return Sh.getInstance().setCustodian().then((function(e){return null==e?void 0:e.data}))}))}function Hg(){return Nf((function(e){var t=e.payload,n=e.accountCode;return Sh.getInstance().createRoles(t,n).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Wg(){var e=this;return Nf((function(o){var a=o.payload,i=o.id,r=o.accountCode;return t(e,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().editRoles({payload:a,id:i},r)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}}))}))}),{useErrorBoundary:!1})}function Gg(){return Nf((function(e){return Sh.getInstance().deleteRoles(e).then((function(e){return null==e?void 0:e.data}))}))}function Vg(){return Nf(["post-payment-links"],(function(e){var t=e.payload,n=e.accountCode;return Sh.getInstance().postPaymentLinks({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function $g(){return Nf(["post-delete-payment-link"],(function(e){var t=e.code;return Sh.getInstance().postDeletePaymentLink({code:t}).then((function(e){return null==e?void 0:e.data}))}))}function Kg(){return Nf(["patch-payment-links"],(function(e){var t=e.payload,n=e.accountCode,o=e.paymentLinkCode;return Sh.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:o}).then((function(e){return null==e?void 0:e.data}))}))}function Qg(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postUserSettings(t)}),{onMutate:function(e){return e}})}function Jg(){return Nf((function(e){return Sh.getInstance().postUserThemeSettings(e)}))}function Xg(){return Nf((function(e){var t=e.payload,n=e.section;return Sh.getInstance().postUserSettingsTables(t,n)}),{onMutate:function(e){return e},onSuccess:function(e){var t=yg.getQueryData(["fetch-profile"]);e.data&&yg.setQueryData(["fetch-profile"],a(a({},t),{settings:e.data}))}})}function Yg(e){return Nf(["pinned-sections"],(function(e){var t=e.payload;return Sh.getInstance().postUserSettingsPinned(t)}),{onMutate:function(t){var n=t.payload;return e({payload:n})}})}function Zg(){return Nf((function(e){var t=e.password,n=e.otp;return Sh.getInstance().getMfaTokenValidation(t,n).then((function(e){return null==e?void 0:e.data}))}))}function ey(){return Nf((function(){return Sh.getInstance().getEmailOtp().then((function(e){return null==e?void 0:e.data}))}))}function ty(){return Nf((function(e){return Sh.getInstance().confirmMfaOtp(e).then((function(e){return null==e?void 0:e.data}))}))}function ny(){return Nf((function(e){return Sh.getInstance().unrollMfa(e).then((function(e){return null==e?void 0:e.data}))}))}function oy(){return Nf((function(){return Sh.getInstance().validatePasswordStatus().then((function(e){return null==e?void 0:e.data})).catch((function(e){return{valid:!1}}))}))}function ay(){return Nf(["post-get-allowlist-items"],(function(e){var t=e.payload;return Sh.getInstance().postAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function iy(){return Nf(["post-get-allowlist-multi-account"],(function(e){var t=e.payload;return Sh.getInstance().postGetAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function ry(){return Nf(["post-create-allowlist-multi-account"],(function(e){var t=e.payload;return Sh.getInstance().postCreateAllowlistMultiAccount({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function sy(){return Nf(["patch-change-status-allowlist"],(function(e){var t=e.payload;return Sh.getInstance().patchChangeStatusAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function cy(){return Nf(["patch-change-status-allowlist-item"],(function(e){var t=e.payload;return Sh.getInstance().patchChangeStatusAllowlistItem({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function uy(){return Nf(["post-add-allowlist-items"],(function(e){var t=e.payload;return Sh.getInstance().patchAddAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function ly(){return Nf(["patch-allowlist"],(function(e){var t=e.payload;return Sh.getInstance().patchAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function py(){return Nf(["post-blacklist-multi-account"],(function(e){var t=e.payload;return Sh.getInstance().postBlackListMultiAccount({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function dy(){return Nf(["put-blacklist"],(function(e){return Sh.getInstance().putBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function my(){return Nf(["change-blacklist"],(function(e){return Sh.getInstance().changeBlackListStatus(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function hy(){return Nf(["change-blacklist-item"],(function(e){return Sh.getInstance().changeBlackListStatusItem(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function fy(){return Nf(["post-blacklist-items"],(function(e){var t=e.payload;return Sh.getInstance().postBlackListItems({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function gy(){return Nf(["delete-blacklist"],(function(e){var t=e.black_list_code;return Sh.getInstance().deleteBlackListType({black_list_code:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function yy(e){var t=e.handleSetProgress;return Nf(["post-blacklist-batch"],(function(e){var n=e.blacklist_code,o=e.expiration_days,a=e.file;return Sh.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:o,file:a,handleSetProgress:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function vy(){return Nf(["change-payments-webhook"],(function(e){var t=e.status,n=e.paymentCode;return Sh.getInstance().postChangePaymentsWebhook({status:t,paymentCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function by(){return Nf(["delete-blacklist-items"],(function(e){var t=e.blocklist_code,n=e.blocklist_item_id,o=e.account_code;return Sh.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function ky(){return Nf(["valiate-blacklist-items"],(function(e){return Sh.getInstance().valiateBlockListItems({payload:e}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function xy(){return Nf(["delete-allowlist-item"],(function(e){return Sh.getInstance().deleteAllowlistItem({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function wy(){return Nf(["validate-allowlist-items"],(function(e){return Sh.getInstance().validateAllowlistItems({payload:e}).then((function(e){return e.data})).catch((function(e){return e}))}))}function jy(e){var t=e.fileName,n=e.onSuccess,o=e.onError,a=w(0),i=a[0],r=a[1],s=j({cancel:function(){return null}}),c=Nf(["upload-file-chargeback",t],(function(e){var t=Sh.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:r}),a=t.promise,i=t.cancel;return s.current.cancel=i,a.then((function(e){return null==n||n(null==e?void 0:e.data),null==e?void 0:e.data})).catch((function(e){throw null==o||o(),e}))}),{useErrorBoundary:!1});return{mutation:c,cancelRequest:s.current.cancel,progress:i}}function _y(){return Nf((function(e){return Sh.getInstance().uploadBatchRefundsV2({payload:e}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Ey(){var e=this;return Nf((function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().batchRefundByFile({payload:o}).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function Cy(){var e=this;return Nf((function(o){var a=o.batchRefundId,i=o.organizationCode,r=o.accountCode;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().getBatchRefundProcessedFileDownload(a,i,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function Sy(){var e=this;return Nf((function(o){var a=o.batchRefundId,i=o.organizationCode,r=o.accountCode;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().getBatchRefundUserFileDownload(a,i,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function Ry(){var e=j({cancel:function(){return null}}),t=Nf(["upload-file"],(function(t){var n=Sh.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),o=n.promise,a=n.cancel;return e.current.cancel=a,o.then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}));return{mutation:t,cancelRequest:e.current.cancel}}function Ty(){return Nf((function(e){var t=e.payload,n=e.organizationCode;return Sh.getInstance().updateMFAConfig(t,n)}))}function Oy(){return Nf((function(e){var t=e.payload,n=e.organizationCode;return Sh.getInstance().mfaExcludeUsers(t,n)}))}function Ay(e){return qf(["GET/scheduled-reports",e],(function(){return Sh.getInstance().getScheduledReport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Iy(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postScheduledReport(t).then((function(e){return{data:e.data,status:e.status}})).catch((function(e){return e}))}))}function zy(){return Nf((function(e){var t=e.reportCode,n=e.payload;return Sh.getInstance().updateScheduledReport(t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Ly(){return Nf((function(e){return Sh.getInstance().deleteScheduledReport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Py(){return Nf((function(e){return Sh.getInstance().getConditionalConfigRules(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Dy(){return Nf((function(e){return Sh.getInstance().getRule(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function qy(){return Nf((function(e){var t=e.payload,n=e.accountCode;return Sh.getInstance().postCreateRuleMultiAccount(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Ny(){return Nf((function(e){var t=e.payload,n=e.ruleId,o=e.accountCode;return Sh.getInstance().postEditRule(t,n,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function My(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postCreateCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Fy(){return Nf((function(e){var t=e.payload,n=e.code;return Sh.getInstance().pathCreateCustomizedApiKeys(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Uy(){return Nf((function(e){var t=e.code,n=e.password;return Sh.getInstance().getCustomizedApiKeysToken(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))}function By(){return Nf((function(e){var t=e.passwordOtp;return Sh.getInstance().getDeveloperCredentialsValidatePassword(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))}function Hy(){return Nf((function(e){var t=e.code;return Sh.getInstance().deleteCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Wy(){return Nf((function(e){var t=e.payload,n=e.code;return Sh.getInstance().patchApiKeysEditNote(t,n).then((function(e){return e.data})).catch((function(e){return e}))}))}function Gy(){return Nf((function(e){var t=e.payload,n=e.code,o=e.password;return Sh.getInstance().postApiKeysRoll(t,n,o).then((function(e){return e.data})).catch((function(e){return e}))}))}function Vy(){return Nf((function(e){var t=e.password,n=e.accountCode;return Sh.getInstance().getDeveloperCredentials(t,n).then((function(e){return a(a({},null==e?void 0:e.data),{isValid:!0})})).catch((function(e){var t,n;return{isValid:!1,status:e.response.status,error:null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.data}}))}))}function $y(e){return Nf((function(e){var t=e.payload;return Sh.getInstance().postAuditMonitors(t)}),{onMutate:e.onMutate})}function Ky(o){var a=this;return Nf((function(){return Sh.getInstance().createReconciliationReportTemplate(o).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{onMutate:function(o){return t(a,void 0,void 0,(function(){var t,a;return n(this,(function(n){switch(n.label){case 0:return[4,yg.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return n.sent(),t=null===(a=yg.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===a?void 0:a.templates,yg.setQueryData(["GET/reconciliation/reports/templates"],(function(t){return{templates:e(e([],t.templates,!0),[o],!1)}})),[2,{previousTemplates:t}]}}))}))},onError:function(e,t,n){yg.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){yg.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})}function Qy(e){return Nf((function(){return Sh.getInstance().updateReconciliationReportTemplate(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Jy(){return Nf(["POST/reconciliation/alerts"],(function(e){return Sh.getInstance().postReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yg.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function Xy(){return Nf(["DELETE/reconciliation/alerts"],(function(e){return Sh.getInstance().deleteReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yg.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function Yy(){return Nf(["UPDATE/reconciliation/alerts"],(function(e){return Sh.getInstance().updateReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yg.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function Zy(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postCreateInsightsReport(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function ev(){return Nf((function(e){return Sh.getInstance().createSamlConfig(e)}))}function tv(){return Nf((function(e){return Sh.getInstance().updateSamlConfig(e)}))}function nv(){return Nf((function(){return Sh.getInstance().deleteSamlConfig()}))}function ov(e,t){return void 0===t&&(t={}),Nf((function(t){return Sh.getInstance().generateAIWorkflowRoutes(e,t).then((function(e){return null==e?void 0:e.data}))}),a(a({},t),{useErrorBoundary:!1}))}function av(e){return void 0===e&&(e={}),Nf((function(e){return Sh.getInstance().postAIGenerationFeedback(e).then((function(e){return null==e?void 0:e.data}))}),a(a({},e),{useErrorBoundary:!1}))}function iv(){return Nf((function(e){return Sh.getInstance().createChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function rv(){return Nf((function(e){return Sh.getInstance().deleteChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function sv(){return Nf((function(e){var t=e.chart_id,n=e.type,o=e.name,a=e.user_prompt,i=void 0===a?"":a;return Sh.getInstance().patchChartGPTChart(t,{type:n,name:o,user_prompt:i}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function cv(){var e=this;return Nf((function(o){return t(e,void 0,void 0,(function(){var e,a,i,r,s,c,u,l,p,d=this;return n(this,(function(m){switch(m.label){case 0:return[4,(e=Sh.getInstance()).createChartGPTChart(o)];case 1:if(a=m.sent(),!(i=null!==(l=null===(u=null==a?void 0:a.data)||void 0===u?void 0:u.chartgpt_id)&&void 0!==l?l:null===(p=null==a?void 0:a.data)||void 0===p?void 0:p.chart_id))throw new Error("Failed to create chart: No chart ID returned");return r=function(){return t(d,void 0,void 0,(function(){var o=this;return n(this,(function(a){return[2,new Promise((function(a,r){var s=setInterval((function(){return t(o,void 0,void 0,(function(){var t,o,c;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.getChartById(i)];case 1:return t=n.sent(),"ERROR"===(null==(o=null==t?void 0:t.data)?void 0:o.status)&&(clearInterval(s),a(o)),"DRAFT"===(null==o?void 0:o.status)&&(clearInterval(s),a(o)),[3,3];case 2:return c=n.sent(),clearInterval(s),r(c),[3,3];case 3:return[2]}}))}))}),1e4)}))]}))}))},[4,r()];case 2:return s=m.sent(),[4,e.executeChartGPTChart(i)];case 3:return c=m.sent(),[2,{chart:s,chartgpt_id:i,execution:null==c?void 0:c.data}]}}))}))}),{useErrorBoundary:!1})}var uv=function(){var e,t;return null===(t=null===(e=function(e){var t=localStorage.getItem(e),n=w(t&&JSON.parse(t)),o=n[0],a=n[1];return _((function(){var t=function(t){if(t.key===e){var n=t.newValue;a(n)}};return window.addEventListener("storage",t),function(){window.removeEventListener("storage",t)}}),[e]),o}("account"))||void 0===e?void 0:e.value)||void 0===t?void 0:t.organization_code};function lv(e){var o=this;return qf(["fetch-payments-lazy",e],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().postPaymentsLazy(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function pv(e){return qf(["fetch-payments-evaluated",e],(function(){return Sh.getInstance().postPaymentsEvaluated(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function dv(e){var o=this,a=e.paymentCode,i=e.enabled,r=void 0===i||i,s=Sh.getInstance();return qf(["get-payment-v2",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getPaymentV2(a).then((function(e){return e.data}))]}))}))}),{enabled:r,cacheTime:500,useErrorBoundary:!1})}function mv(e){var o=this,a=e.payment_code,i=e.enabled,r=void 0===i||i,s=Sh.getInstance();return qf(["get-payment-transaction-details-v2",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getTransactionDetailsV2({payment_code:a}).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!a&&r,cacheTime:0,useErrorBoundary:!1})}function hv(e){var o=this,a=e.transaction_code,i=e.enabled,r=void 0===i||i,s=Sh.getInstance();return qf(["get-payment-transaction-raw-response",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getTransactionRawResponse({transaction_code:a})]}))}))}),{enabled:!!a&&r,cacheTime:0,useErrorBoundary:!1})}function fv(e){var t=uv();return qf(["payment-methods",e],(function(){return Sh.getInstance().getPaymentMethodsByCountry({provider_id:null==e?void 0:e.provider_id,country:null==e?void 0:e.country},t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e&&!!(null==e?void 0:e.provider_id),useErrorBoundary:!1})}function gv(){return qf({queryKey:["/payment-methods/providers"],queryFn:function(){return Sh.getInstance().getPaymentMethodsAndProviders().then((function(e){return null==e?void 0:e.data}))},cacheTime:864e5,useErrorBoundary:!1})}function yv(){return qf(["GET/catalog/card-brands"],(function(){return Sh.getInstance().getCardBrands().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function vv(e,t){return void 0===e&&(e=!0),void 0===t&&(t=Nd.PAYMENTS),qf(["payment-filters",e,t],(function(){return Sh.getInstance().getPaymentFilters(t).then((function(e){return null==e?void 0:e.data}))}),{enabled:e,useErrorBoundary:!1,cacheTime:3e5})}function bv(){return qf(["payment-metrics-filters"],(function(){return Sh.getInstance().getPaymentMetricsFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function kv(e){var t=e.transaction_code,n=e.enabled;return qf(["payment-transaction-details",t],(function(){return Sh.getInstance().getPaymentTransactionsDetails({transaction_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function xv(e){var t=e.payment_code,n=e.enabled;return qf(["transaction-history",t],(function(){return Sh.getInstance().getTransactionHistoryByPaymentCode({payment_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function wv(e){var o=this;return qf(["POST/transactions",JSON.stringify(e)],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().postTransactions(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function jv(e){var o=this;return qf(["POST/fraud-transactions",JSON.stringify(e)],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().postFraudTransactions(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function _v(e){return qf(["GET/payout-detail",JSON.stringify(e)],(function(){var t=Sh.getInstance();return e.organization_code?t.getPayoutDetails(e).then((function(e){return null==e?void 0:e.data})):{}}),{enabled:!!e.organization_code&&!!e&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function Ev(e){return qf(["GET/payout-transaction-detail",JSON.stringify(e)],(function(){return Sh.getInstance().getPayoutTransactionDetails(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e&&!!(null==e?void 0:e.transaction_code)&&(null==e?void 0:e.enabled),cacheTime:0,useErrorBoundary:!1})}function Cv(e){var t=uv();return qf(["GET/payout-history-detail",JSON.stringify(e)],(function(){return Sh.getInstance().getPayoutHistoryDetails(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.payout_code)&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function Sv(e,o){var a=this,i=uv();return qf(["GET/useGetProofOfCancel",i,e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getProofOfCancel(e,i,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&!!i&&!!o,cacheTime:0,useErrorBoundary:!1})}function Rv(e,o){var a=this,i=uv();return qf(["GET/useGetProofOfPayment",i,e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getProofOfPayment(e,i,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&!!i&&!!o,cacheTime:0,useErrorBoundary:!1})}function Tv(e,o,a){var i=this,r=Sh.getInstance();return qf(["send-payment-notification",e,o],(function(){return t(i,void 0,void 0,(function(){var t,i;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r.sendPaymentNotification(e,o)];case 1:return t=n.sent(),a.onSuccess(),[2,t.data];case 2:throw i=n.sent(),a.onError(),i;case 3:return[2]}}))}))}),{enabled:a.enabled,cacheTime:0,useErrorBoundary:!1})}function Ov(e){return qf(["usePayoutsList",e&&JSON.stringify(e)],(function(){var t=Sh.getInstance();if(e)return t.postPayouts(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&!!Object.values(e).length,cacheTime:0})}function Av(e){var o=this;void 0===e&&(e=!0);var a=uv();return qf(["getPayoutsFilters",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().getPayoutsFilters(a).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))]}))}))}),{enabled:e&&!!a})}function Iv(e){var t=e.password,n=e.accountCode;return qf(["developers"],(function(){return Sh.getInstance().getDeveloperCredentials(t,n).then((function(e){return a(a({},null==e?void 0:e.data),{isValid:!0})})).catch((function(e){var t,n;return{isValid:!1,status:e.response.status,error:null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.data}}))}),{enabled:!1,cacheTime:0})}function zv(){return qf(["fetch-customized-api-keys-members"],(function(){return Sh.getInstance().getCustomizedApiKeysMembers().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function Lv(){return qf(["developers-get-allowed-ips"],(function(){return Sh.getInstance().getAllowedIps().then((function(e){return(null==e?void 0:e.data)?a(a({},null==e?void 0:e.data),{isError:!1}):null})).catch((function(e){return a(a({},e),{isError:!0})}))}),{enabled:!1,cacheTime:0})}function Pv(){return qf(["fetch-customized-api-keys-accounts"],(function(){return Sh.getInstance().getCustomizedApiKeysAccounts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function Dv(e){return qf(["fetch-customized-api-keys",e],(function(){return Sh.getInstance().postCustomizedApiKeys(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!(null==e?void 0:e.length)})}function qv(){return qf(["fetch-customized-api-keys-products"],(function(){return Sh.getInstance().getCustomizedApiKeysProducts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{cacheTime:0})}function Nv(){return Nf(["developers-patch-allowed-ips"],(function(e){return Sh.getInstance().patchAllowedIps(e).then((function(e){return(null==e?void 0:e.data)?a(a({},null==e?void 0:e.data),{isError:!1}):null})).catch((function(e){return a(a({},e),{isError:!0})}))}),{cacheTime:0})}function Mv(){return qf(["fetch-organizations"],(function(){return Sh.getInstance().getOrganization().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function Fv(){return qf(["fetch-all-organizations",uv()],(function(){return Sh.getInstance().getAllOrganization().then((function(e){return(null==e?void 0:e.data)||[]}))}),{cacheTime:36e5,keepPreviousData:!0,useErrorBoundary:!1})}function Uv(e){var t=uv();return qf(["organizations-provider-params",e],(function(e){var n=e.queryKey;return Sh.getInstance().getProviderParams(n[1],t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.id),useErrorBoundary:!1})}function Bv(e){var t=e.integration_code,n=e.enabled,o=e.accountCode;return qf(["integration-params",t,o],(function(){return t.includes("undefined")?{}:Sh.getInstance().getIntegrationParams({accountCode:o,integration_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,useErrorBoundary:!1})}function Hv(e){var t=e.accountCode,n=e.organizationCode,o=uv(),a=qf(["organizations-account-integrations",t,n],(function(){return Sh.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||o}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,enabled:!!t,useErrorBoundary:!1});return a}function Wv(e){var t=e.accountCode,n=e.paymentMethod;return qf(["fetch-connections-by-payment-method",n,t],(function(){return Sh.getInstance().getConnectionsByPaymentMethod(t,n).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!n&&!!t,cacheTime:0,useErrorBoundary:!1})}function Gv(){var e=this;return qf(["fetch-hash-pylon"],(function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().getHashPylon()]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})}function Vv(){return qf(["connections"],(function(){return Sh.getInstance().getConnections().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function $v(){return qf(["dialogs"],(function(){return Sh.getInstance().getDialogs().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,retryDelay:2e3,cacheTime:36e5})}function Kv(){return qf(["params-catalog"],(function(){return Sh.getInstance().getWebhookParamsV2().then((function(e){return null==e?void 0:e.data}))}))}function Qv(e){var t=e.accountCode,n=e.name;return qf(["webhooks",t,n],(function(){return Sh.getInstance().getWebhooksV3({accountCode:t,name:n}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t,useErrorBoundary:!1})}function Jv(e){var t=e.accountCode,n=e.enabled;return qf(["webhooks-detail",t],(function(){return Sh.getInstance().getWebhooksV2Detail({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!n})}function Xv(e){var t,n=uv(),o=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return qf({queryKey:["accounts",o],queryFn:function(){return Sh.getInstance().getAccounts(o).then((function(e){return null==e?void 0:e.data}))},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!o})}function Yv(e){return qf(["accountsV2",e],(function(){return Sh.getInstance().getAccountsV2().then((function(e){return(null==e?void 0:e.data)||[]})).catch((function(e){throw e}))}),{keepPreviousData:!0,enabled:!!e,useErrorBoundary:!1})}function Zv(e){return qf(["accountsV2-by-user",e],(function(){return e?Sh.getInstance().getAccountsByUser(e).then((function(e){return{accountsV2ByUser:(null==e?void 0:e.data)||null}})).catch((function(e){return{accountsV2ByUser:[],error:e}})):{accountsV2ByUser:[]}}),{enabled:!!e,staleTime:0})}function eb(){return qf(["menu"],(function(){return Sh.getInstance().getMenu().then((function(e){return lh(e)?yh:null==e?void 0:e.data})).catch((function(){return yh}))}))}function tb(){return qf(["/payment/statuses/style"],(function(){return Sh.getInstance().useGetPaymentStatusesStyles().then((function(e){return lh(e)?ph:null==e?void 0:e.data})).catch((function(){return ph}))}))}function nb(){return qf(["/transaction/statuses/style"],(function(){return Sh.getInstance().useGetTransactionStatusesStyles().then((function(e){return lh(e)?dh:null==e?void 0:e.data})).catch((function(){return dh}))}),{cacheTime:36e5,useErrorBoundary:!1})}function ob(){return qf(["/reconciliation/transaction/statuses/style"],(function(){return Sh.getInstance().useGetReconciliationTransactionStatusesStyles().then((function(e){return lh(e)?mh:null==e?void 0:e.data})).catch((function(){return mh}))}))}function ab(){return qf(["timezone-catalog"],(function(){return Sh.getInstance().useGetTimeZoneCatalog().then((function(e){return lh(e)?hh:null==e?void 0:e.data})).catch((function(){return hh}))}))}function ib(){return qf(["/cms/audit-logs-filters"],(function(){return Sh.getInstance().useGetAuditLogsFilters().then((function(e){return lh(e)?fh:null==e?void 0:e.data})).catch((function(){return fh}))}))}function rb(){return qf(["/cms/static-contents"],(function(){return Sh.getInstance().getDashboardStaticContents().then((function(e){var t,n;return lh(e)?gh:(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||{}}))}),{cacheTime:6048e5,useErrorBoundary:!1})}function sb(){return qf(["/cms/locales"],(function(){return Sh.getInstance().getLocales().then((function(e){return lh(e)?vh:e.data})).catch((function(){return vh}))}))}var cb=function(){var e=w("ON"===localStorage.getItem("isTesting")),t=e[0],n=e[1];return _((function(){window.addEventListener("storage",(function(e){"isTesting"===e.key&&n("ON"===e.newValue)}))}),[]),{isTesting:t}};function ub(e){return qf(["smart-routing-methods",e],(function(){return Sh.getInstance().getSmartRoutingMethods(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function lb(e,t){return qf(["smart-routing-workflow",t,e],(function(){return Sh.getInstance().getSmartRoutingWorkflow(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e,cacheTime:0,retry:!1})}function pb(e,t){return qf(["smart-routing-condition-types",e,t],(function(){return Sh.getInstance().getSmartRoutingConditionTypes(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e})}function db(e,t){return qf(["smart-routing-condition-payment-method",e,t],(function(){return Sh.getInstance().getSmartRoutingConditionPaymentMethod(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:null!==t})}function mb(e,t){return qf(["smart-routing-condition-types-values",t,e],(function(){return Sh.getInstance().getSmartRoutingConditionTypesValues(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&!!e,useErrorBoundary:!1})}function hb(e){var t=e.accountCode,n=e.workflowVersionId;return qf(["smart-routing-workflow-version",n,t],(function(){return Sh.getInstance().getSmartRoutingWorkflowVersion(t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!n&&!!t,cacheTime:0})}function fb(e,t,n){return qf(["smart-routing-next-route",e,n,t],(function(){return Sh.getInstance().getSmartRoutingNextSteps(e,t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function gb(e){return qf(["smart-routing-decline-groups",e],(function(){return Sh.getInstance().getSmartRoutingDeclinedGroup(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function yb(e,t){return qf(["smart-routing-payment-route",e,t],(function(){return Sh.getInstance().getSmartRoutingPaymentRoute(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&!!t,cacheTime:0})}function vb(e){return qf(["smart-routing-simulate-condition-type-values",e],(function(){return Sh.getInstance().getSmartRoutingSimulateConditionTypeValues(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function bb(e){var t=e.text,n=e.conditionType;return qf(["smart-routing-search-condition-values",t,n],(function(){return Sh.getInstance().getSmartRoutingSearchConditionValues(n,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!n&&!!t,cacheTime:0})}function kb(){return qf(["smart-routing-conversion-rates"],(function(){return Sh.getInstance().getProviderConversionRatesData().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!1,useErrorBoundary:!1})}function xb(){var e=this;return qf({queryKey:["smart-routing-3ds-excemptions"],queryFn:function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Sh.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})}function wb(){var e=this;return qf({queryKey:["smart-routing-network-tokens-onboarding"],queryFn:function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Sh.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})}function jb(e){return qf(["fetch-routing-monitors-templates",e],(function(){return Sh.getInstance().getRoutingMonitorsTemplates(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function _b(e,t){return qf(["fetch-routing-monitors-template",e],(function(){return Sh.getInstance().getRoutingMonitorsTemplate(e,t).then((function(e){return e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:!!e&&!!t&&"NONE"!==e,useErrorBoundary:!1})}function Eb(e){var t=e.accountCode;return qf(["checkouts",t],(function(){return Sh.getInstance().getCheckouts({accountCode:t}).then((function(e){return e.data}))}),{cacheTime:0,enabled:Boolean(t)})}function Cb(e){var t=e.accountCode;return qf(["checkouts-template"],(function(){return Sh.getInstance().getCheckoutTemplate({accountCode:t}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,enabled:Boolean(t)})}var Sb=function(e){return["checkout-builder-name-and-icon",e.paymentMethodType,e.type]},Rb=function(e,t){var n=e.paymentMethodType,o=e.type;return qf(Sb({paymentMethodType:n,type:o}),(function(){return Sh.getInstance().getNameAndIcon({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)},Tb=function(e){return["checkout-builder-required-fields",e.paymentMethodType,e.type]},Ob=function(e,t){var n=e.paymentMethodType,o=e.type;return qf(Tb({paymentMethodType:n,type:o}),(function(){return Sh.getInstance().getRequiredFields({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)};function Ab(e){var t=e.accountCode;return qf(["styling-sdk-dynamic",t],(function(){return Sh.getInstance().getStylingSdkDynamic({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Ib(e){var t=e.accountCode;return qf(["styling-theme",t],(function(){return Sh.getInstance().getStylingTheme({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function zb(e){var t=e.accountCode;return qf(["styling-settings",t],(function(){return Sh.getInstance().getStylingSettings({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Lb(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n;return qf(["styling-settings-v2",t],(function(){return Sh.getInstance().getStylingSettingsV2({accountCode:t,environment:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Pb(){return Nf((function(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n,a=e.payload;return Sh.getInstance().changeStylingSettings({accountCode:t,environment:o,payload:a}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function Db(){return qf(["fetch-profile"],(function(){return Sh.getInstance().getProfile().then((function(e){var t=null==e?void 0:e.data;return t&&localStorage.setItem("user",JSON.stringify(t)),t})).catch((function(e){throw e}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function qb(){var e=this;return qf(["get-user-full"],(function(){return t(e,void 0,void 0,(function(){var e,t;return n(this,(function(n){switch(n.label){case 0:e=Sh.getInstance(),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.getUserFull()];case 2:return t=n.sent(),[2,null==t?void 0:t.data];case 3:throw n.sent();case 4:return[2]}}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})}function Nb(e,t){return qf(["fetch-permissions",e,t],(function(){var e,t,n,o=localStorage.getItem("account"),a=localStorage.getItem("user"),i=o&&JSON.parse(o),r=a&&JSON.parse(a);return((null==r?void 0:r.merlin)?null===(e=null==r?void 0:r.merlin)||void 0===e?void 0:e.permissions:null===(n=null===(t=null==i?void 0:i.value)||void 0===t?void 0:t.role)||void 0===n?void 0:n.permission_ids.map((function(e){return{permission_name:e,description:e,resource_server_name:e,resource_server_identifier:e}})))||[]}))}function Mb(e){return qf(["email-verification",e],(function(){return Sh.getInstance().emailVerification(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function Fb(){return qf({queryKey:["get-login-methods"],queryFn:function(){return Sh.getInstance().getLoginMethods().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}})}function Ub(){return qf(["fetch-impersonation-users"],(function(){return Sh.getInstance().getImpersonationUsers().then((function(e){var t;return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.result)||[]}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Bb(){return qf(["fetch-impersonation-enabled"],(function(){return Sh.getInstance().getImpersonationEnabled().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Hb(e){var o=this;return qf(["get-users-to-impersonate",e],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getUsersToImpersonate(e).then((function(e){var t;return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.users)||[]}))]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function Wb(e){var t;return qf(["fetch-communications",e],(function(){return Sh.getInstance().getCommunications(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null===(t=e.account_codes)||void 0===t?void 0:t.length),useErrorBoundary:!1,cacheTime:3e3})}function Gb(){return qf(["fetch-communications-filters"],(function(){return Sh.getInstance().getCommunicationsFilters().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Vb(e,t){return qf(["fetch-communication-details",e],(function(){return Sh.getInstance().getCommunicationDetails(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e,useErrorBoundary:!1,cacheTime:0})}function $b(e){return qf(["notifications-customer",e],(function(){return Sh.getInstance().getNotificationsCustomer(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,keepPreviousData:!1})}function Kb(e){return qf(["validate-opsgenie-key",e],(function(){return Sh.getInstance().getValidateOpsgenieKey(e).then((function(e){return null==e?void 0:e.data})).catch((function(){return{error:!0}}))}),{enabled:!!e,cacheTime:0})}function Qb(){return qf(["notifications-merged"],(function(){return Sh.getInstance().getMergedNotifications().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{keepPreviousData:!1,cacheTime:0})}function Jb(){return Nf((function(e){return Sh.getInstance().getNotificationsNumber(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Xb(){var e=this;return Nf((function(o){return t(e,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().pathNotification(o)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}}))}))}))}var Yb={key:"metadata_fields",name:"metadata_fields"};function Zb(){return qf(["reports"],(function(){return Sh.getInstance().reportsList().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function ek(e){return void 0===e&&(e=!0),qf(["reports-multi-env"],(function(){return Sh.getInstance().reportsListMultiEnv().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e})}function tk(e,t,n){return void 0===t&&(t=!1),qf(["reports/".concat(e)],(function(){return Sh.getInstance().downloadReports(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:t,onSuccess:n,useErrorBoundary:!1})}function nk(e){return qf(["GET/reports/templates"],(function(){return Sh.getInstance().getReportTemplates().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e,useErrorBoundary:!1})}function ok(o,a,i){var r=this;return qf(["GET/reports/columns/".concat(a,"/").concat(i)],(function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getReportColumns(a,i).then((function(t){return a===Hd.ALL&&i===Bd.PAYMENTS?e(e([],null==t?void 0:t.data,!0),[Yb],!1):null==t?void 0:t.data})).catch((function(e){return e}))]}))}))}),{enabled:o,useErrorBoundary:!1})}function ak(e,o){var a=this,i=uv();return qf(["getRefundPdf",e,i,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getRefundPdf(e,i,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))]}))}))}),{enabled:!!e&&!!i,useErrorBoundary:!1})}function ik(){var e=uv();return qf(["teams-filters-members"],(function(){return Sh.getInstance().teamsFiltersMembers({organizationCode:e}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})}function rk(e){var t=e.organizationCode,n=e.accountCodes,o=e.email,a=e.page,i=e.pageSize,r=uv();return qf(["fetch-post-members-v2",t,n,o,a,i],(function(){return Sh.getInstance().postMembersPaginatedV2({organizationCode:r,accountCodes:n,email:o,page:a,pageSize:i}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&!!n,cacheTime:0,useErrorBoundary:!1})}function sk(){return qf(["fetch-roles"],(function(){return Sh.getInstance().getRoles().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function ck(){return qf(["fetch-rolespermissions"],(function(){return Sh.getInstance().getRolesPermissions().then((function(e){return null==e?void 0:e.data}))}))}function uk(){return qf(["fetch-permissions-catalog"],(function(){return Sh.getInstance().getPermissionsCatalog().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function lk(e){return qf(["data-report",e],(function(){return Sh.getInstance().getSmartRoutingDataReport(e).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,useErrorBoundary:!1})}function pk(e,t,n){return void 0===n&&(n=!0),qf(["get-insights-conversion-rate-metrics-v2",e,t],(function(){return Sh.getInstance().getInsightsMetricsConversionRateV2(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:n&&(!!(null==e?void 0:e.currency_code)&&"Empty"!==(null==e?void 0:e.currency_code)&&"string"==typeof(null==e?void 0:e.currency_code)||Array.isArray(null==e?void 0:e.currency_code)&&0===(null==e?void 0:e.currency_code.length)),staleTime:3e5,cacheTime:3e5,useErrorBoundary:!1,retry:1})}function dk(e,t){return qf(["get-insights-conversion-rate-view-more-metrics",t,e],(function(){return Sh.getInstance().getInsightsMetricsConversionRateViewMore(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.enabled)&&!!t,cacheTime:200,useErrorBoundary:!1})}function mk(e){return qf(["get-insights-conversion-rate-fallback-metrics",e],(function(){return Sh.getInstance().getInsightFallbackMetrics(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.enabled),cacheTime:200,useErrorBoundary:!1})}function hk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,qf(["get-insights-volume-metrics",t,e],(function(){return Sh.getInstance().getInsightsMetricsVolume(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function fk(e,t,n,o){return void 0===o&&(o=!0),delete t.account_code,qf(["get-insights-volume-metrics-v2",t,e,n],(function(){return Sh.getInstance().getInsightsMetricsVolumeV2(e,n,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:o,cacheTime:200,useErrorBoundary:!1})}function gk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,qf(["get-insights-total-payment-fraud-metrics",t,e],(function(){return Sh.getInstance().getInsightsMetricsTotalPaymentsAndFraud(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function yk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,qf(["get-insights-customer-payment-fraud-metrics",t,e],(function(){return Sh.getInstance().getInsightsMetricsCustomerPaymentsAndFraud(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function vk(e){return qf(["get-insights-overview",e],(function(){return Sh.getInstance().getInsightOverview(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.enabled)&&void 0!==e.account_code,cacheTime:200,useErrorBoundary:!1})}function bk(e,t){var n=!!(null==e?void 0:e.enabled)&&void 0!==(null==e?void 0:e.account_code);return qf(["get-insights-overview-v3",e,t],(function(){return Sh.getInstance().getInsightOverviewV3(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:0,useErrorBoundary:!1})}function kk(e){return qf(["get-insights-home-metrics",e],(function(){return Sh.getInstance().getInsighstHomeMetrics(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.currency_code)&&!!(null==e?void 0:e.account_codes)&&!!(null==e?void 0:e.organization_code)&&(null==e?void 0:e.isLiveMode)&&!!(null==e?void 0:e.timezone),cacheTime:200,useErrorBoundary:!1})}function xk(e){return qf(["get-insights-reports",e],(function(){return Sh.getInstance().getInsightsReport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!(null==e?void 0:e.type),cacheTime:0,useErrorBoundary:!1})}function wk(e){return qf(["get-insights-reports-again",e],(function(){return Sh.getInstance().getInsightsReportAgain(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!(null==e?void 0:e.code),cacheTime:0,useErrorBoundary:!1})}function jk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-fraud-screening-volume-and-count-tx",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsFraudScreeningVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function _k(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-fraud-screening-conversion-rate",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsFraudScreeningConversionRate(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ek(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-3ds-volume-and-count-tx",o,e],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsights3dsVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ck(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-3ds-conversion-rate-and-evolution",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsights3dsConversionRateAndEvolution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Sk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-3ds-decline-reasons",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsights3dsDeclineReasons(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Rk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-3ds-frictionless-vs-challenge",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsights3dsFrictionlessVsChallenge(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Tk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-volume-and-count-tx",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ok(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-total-rate-and-evolution",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksTotalRateAndEvolution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ak(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-win-rate",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksWinRate(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ik(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-disputed",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksDisputed(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function zk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksByProviderAndCardBrand(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Lk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-reasons-distribution",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksReasonsDistribution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Pk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-status-distribution",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksStatusDistribution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Dk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-by-card-brand",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksByCardBrand(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function qk(e,t){return qf(["fetch-reconciliation-transaction",e],(function(){return Sh.getInstance().getReconciliationTransactions(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!!t,useErrorBoundary:!1})}function Nk(e,t){return qf(["fetch-reconciliation-settlements",e],(function(){return Sh.getInstance().getReconciliationSettlements(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!!t,useErrorBoundary:!1})}function Mk(e,t){return qf(["fetch-reconciliation-metrics",e],(function(){return Sh.getInstance().getReconciliationMetrics(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t,cacheTime:500})}function Fk(){return qf(["GET-reconciliation-filters"],(function(){return Sh.getInstance().getReconciliationFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Uk(e){return qf(["GET/v1/reconciliation/table/".concat(e,"/columns")],(function(){return Sh.getInstance().getAllTableColumns(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Bk(){return qf(["GET/v1/reconciliation/active"],(function(){return Sh.getInstance().getReconciliationActive().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Hk(e,t,n){return qf(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],(function(){return Sh.getInstance().getReconciliationsReportColumns(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{enabled:e,useErrorBoundary:!1})}function Wk(e){return qf(["GET/reconciliation/reports/templates"],(function(){return Sh.getInstance().getReconciliationReportTemplates().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{enabled:e,useErrorBoundary:!1})}function Gk(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/alerts/list",t,n],(function(){return Sh.getInstance().getReconciliationAlerts(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function Vk(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/agenda/list",t,n],(function(){return Sh.getInstance().getReconciliationAgenda(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function $k(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/agenda/insights",t,n],(function(){return Sh.getInstance().getReconciliationAgendaInsightByKey(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function Kk(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/sales/list",t,n],(function(){return Sh.getInstance().getReconciliationSales(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function Qk(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/advancements/list",t,n],(function(){return Sh.getInstance().getReconciliationAdvancements(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function Jk(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/fees/list",t,n],(function(){return Sh.getInstance().getReconciliationFees(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function Xk(e){var o=this,a=Object.values(e).filter(Boolean);return qf(["feature-flags",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getFeatureFlagId(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:a.length>1,useErrorBoundary:!1})}function Yk(e){var o=this,a=qf({queryKey:["all-feature-flags",Object.values(e).filter(Boolean)],queryFn:function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getFeatureFlagIdAll({accountCode:e.account_code}).then((function(e){return null==e?void 0:e.data}))]}))}))},enabled:!!e.account_code&&!!e.organization_code&&!!e.email,cacheTime:9e5,useErrorBoundary:!1}),i=Af();return _((function(){i.setQueryData(["cached-feature-flags"],a)}),[a,i]),a}function Zk(e){var t=Af();return qf({queryKey:["cached-feature-flags"],queryFn:function(){},enabled:!1,select:function(t){var n;return{result:null===(n=t.data)||void 0===n?void 0:n[e]}},initialData:function(){var e=t.getQueryData(["cached-feature-flags"]);return(null==e?void 0:e.data)||{}}})}function ex(e){return qf(["events",e],(function(){return Sh.getInstance().getAuditEvents(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e.account_code&&!!e.organizationCode,cacheTime:0,keepPreviousData:!0,useErrorBoundary:!1})}function tx(e){return qf(["audit-monitor-event-detail",e],(function(){return Sh.getInstance().getAuditMonitorDetail(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:null!==e,cacheTime:0,useErrorBoundary:!1})}function nx(e,t){return qf(["fetch-payment-links",e,t],(function(){return Sh.getInstance().getPaymentLinks(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t,cacheTime:0})}function ox(e){return qf(["payment-link"],(function(){return Sh.getInstance().getPaymentLinksByCode(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function ax(e){return void 0===e&&(e=!0),qf(["countries",e],(function(){return Sh.getInstance().useGetCountriesConfig().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e,keepPreviousData:!0})}function ix(e){var t=localStorage.getItem("lang")||"en",n=e||t;return qf(["countries-v2",n],(function(){return Sh.getInstance().useGetCountriesConfigV2(n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!0,keepPreviousData:!0})}function rx(e){return qf(["timezone"],(function(){return Sh.getInstance().getTimezone(e).then((function(e){return lh(e)?hh:null==e?void 0:e.data})).catch((function(){return hh}))}),{enabled:!0,keepPreviousData:!0})}function sx(e){return Nf((function(e){var t=e.payload;return Sh.getInstance().firebaseUserSubscribe(t)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function cx(e,t){return qf(["get-cofig-allow-list",e],(function(){return Sh.getInstance().getConfigAllowlist(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!e&&!!t})}function ux(e){return qf(["get-black-list",e],(function(){return Sh.getInstance().getBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!e})}function lx(e,t,n,o){var a;return qf(["post-black-list",e],(function(){return Sh.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=o?o:25).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:(null===(a=e[0])||void 0===a?void 0:a.length)>0&&null!==t,useErrorBoundary:!1})}function px(e,t,n){return qf(["get-block-list-summary",e,t,n],(function(){var o=Sh.getInstance();return n?o.getBlackListSummary(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e})):Promise.resolve({})}),{enabled:!!e&&!!n})}function dx(e,t,n,o,a,i){return qf(["black-list-detail",e,t,o,a,i],(function(){return Sh.getInstance().getBlacklistDetail(e,t,n,o,a).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&i,cacheTime:0})}function mx(e,t,n){return qf(["allow-list-detail",e],(function(){return Sh.getInstance().getAllowlistDetail(e,t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{enabled:!!e&&!!n})}function hx(e){return qf(["query-post-get-allowlist-multi-account",JSON.stringify(e)],(function(){return Sh.getInstance().postGetAllowlist({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function fx(e,o){var a=this;return void 0===e&&(e=26),void 0===o&&(o=0),qf(["batch-refunds",e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getBatchRefunds(e,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))]}))}))}),{cacheTime:0})}function gx(e){return qf(["velocity-rules",e],(function(){var t=Sh.getInstance();return e?t.getVelocityRules(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e})):Promise.resolve({})}),{enabled:!!e,keepPreviousData:!0})}function yx(){return qf(["config-rules"],(function(){return Sh.getInstance().getAllConfigRules().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0})}function vx(e,t){var n=e.organizationCode;return qf(["mfa-excluded-users",n],(function(){return Sh.getInstance().getMFAExcludedUsers({organizationCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function bx(e,t){var n=e.organizationCode;return qf(["mfa-config",n],(function(){return Sh.getInstance().getMFAConfig({organizationCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function kx(e,t){return qf(["mfa-enforcement-status",e.accountCode],(function(){return Sh.getInstance().getMFAEnforcementStatus().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function xx(e){return qf(["fetch-organization-saml-config",e],(function(){return Sh.getInstance().getSamlConfig().then((function(e){return e.data}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function wx(e){return qf(["chartgpt-chart-execute",e],(function(){return Sh.getInstance().executeChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e})}function jx(){return qf(["chartgpt-user-charts"],(function(){return Sh.getInstance().getChartsByUser().then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})}function _x(){var e=this;return qf(["chartgpt-user-charts-with-results"],(function(){return t(e,void 0,void 0,(function(){var e,o,i,r=this;return n(this,(function(s){switch(s.label){case 0:return[4,(e=Sh.getInstance()).getChartsByUser()];case 1:return o=s.sent(),i=(null==o?void 0:o.data)||[],[4,Promise.all(i.map((function(o){return t(r,void 0,void 0,(function(){var t,i,r,s,c,u,l,p;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.executeChartGPTChart(o.chart_id)];case 1:return t=n.sent(),[2,a(a({},o),{user_prompt:null!==(s=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.user_prompt)&&void 0!==s?s:o.user_prompt,unit_to_display:null!==(u=null===(c=null==t?void 0:t.data)||void 0===c?void 0:c.unit_to_display)&&void 0!==u?u:o.unit_to_display,results:null!==(p=null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.results)&&void 0!==p?p:[]})];case 2:return i=n.sent(),console.error("Failed to execute chart ".concat(o.chart_id,":"),i),[2,a(a({},o),{results:[]})];case 3:return[2]}}))}))})))];case 2:return[2,s.sent()]}}))}))}))}function Ex(e,o,a){var i=this;return void 0===a&&(a=!0),qf(["chartgpt-patch-and-execute",e,o],(function(){return t(i,void 0,void 0,(function(){var t,a,i,r,s;return n(this,(function(n){switch(n.label){case 0:return[4,(t=Sh.getInstance()).patchChartGPTChart(e,o)];case 1:return a=n.sent(),i=null==a?void 0:a.data,[4,t.executeChartGPTChart(e)];case 2:return r=n.sent(),s=null==r?void 0:r.data,[2,{chart:i,execution:s}]}}))}))}),{enabled:a&&!!e,retry:!1})}function Cx(){return qf(["languages"],(function(){return Sh.getInstance().getLanguages().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:300})}function Sx(){var e=localStorage.getItem("lang")||"en";return qf(["translations",e],(function(){return Sh.getInstance().getTranslations(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:3e4})}function Rx(){return Rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Rx.apply(this,arguments)}
223
+ */"production"===process.env.NODE_ENV?wf.exports=function(){if(xf)return jf;xf=1;var e=x,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useState,o=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function r(e){var n=e.getSnapshot;e=e.value;try{var o=n();return!t(e,o)}catch(e){return!0}}var s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var s=t(),c=n({inst:{value:s,getSnapshot:t}}),u=c[0].inst,l=c[1];return a((function(){u.value=s,u.getSnapshot=t,r(u)&&l({inst:u})}),[e,s,t]),o((function(){return r(u)&&l({inst:u}),e((function(){r(u)&&l({inst:u})}))}),[e]),i(s),s};return jf.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:s,jf}():wf.exports=(_f||(_f=1,"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!n(e,o)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=x,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=t.useState,a=t.useEffect,i=t.useLayoutEffect,r=t.useDebugValue,s=!1,c=!1,u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(u,l){s||void 0===t.startTransition||(s=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var p=l();if(!c){var d=l();n(p,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}var m=(d=o({inst:{value:p,getSnapshot:l}}))[0].inst,h=d[1];return i((function(){m.value=p,m.getSnapshot=l,e(m)&&h({inst:m})}),[u,p,l]),a((function(){return e(m)&&h({inst:m}),u((function(){e(m)&&h({inst:m})}))}),[u]),r(p),p};Ef.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:u,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ef);var Cf=wf.exports;const Sf=Cf.useSyncExternalStore,Rf=k.createContext(void 0),Tf=k.createContext(!1);function Of(e,t){return e||(t&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Rf),window.ReactQueryClientContext):Rf)}const Af=({context:e}={})=>{const t=k.useContext(Of(e,k.useContext(Tf)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},If=({client:e,children:t,context:n,contextSharing:o=!1})=>{k.useEffect((()=>(e.mount(),()=>{e.unmount()})),[e]),"production"!==process.env.NODE_ENV&&o&&e.getLogger().error("The contextSharing option has been deprecated and will be removed in the next major version");const a=Of(n,o);return k.createElement(Tf.Provider,{value:!n&&o},k.createElement(a.Provider,{value:e},t))},zf=k.createContext(!1);zf.Provider;const Lf=k.createContext(function(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}());function Pf(e,t){return"function"==typeof e?e(...t):!!e}function Df(e,t){const n=Af({context:e.context}),o=k.useContext(zf),a=k.useContext(Lf),i=n.defaultQueryOptions(e);i._optimisticResults=o?"isRestoring":"optimistic",i.onError&&(i.onError=rf.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=rf.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=rf.batchCalls(i.onSettled)),(e=>{e.suspense&&"number"!=typeof e.staleTime&&(e.staleTime=1e3)})(i),((e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))})(i,a),(e=>{k.useEffect((()=>{e.clearReset()}),[e])})(a);const[r]=k.useState((()=>new t(n,i))),s=r.getOptimisticResult(i);if(Sf(k.useCallback((e=>{const t=o?()=>{}:r.subscribe(rf.batchCalls(e));return r.updateResult(),t}),[r,o]),(()=>r.getCurrentResult()),(()=>r.getCurrentResult())),k.useEffect((()=>{r.setOptions(i,{listeners:!1})}),[i,r]),((e,t,n)=>(null==e?void 0:e.suspense)&&((e,t)=>e.isLoading&&e.isFetching&&!t)(t,n))(i,s,o))throw((e,t,n)=>t.fetchOptimistic(e).then((({data:t})=>{null==e.onSuccess||e.onSuccess(t),null==e.onSettled||e.onSettled(t,null)})).catch((t=>{n.clearReset(),null==e.onError||e.onError(t),null==e.onSettled||e.onSettled(void 0,t)})))(i,r,a);if((({result:e,errorResetBoundary:t,useErrorBoundary:n,query:o})=>e.isError&&!t.isReset()&&!e.isFetching&&Pf(n,[e.error,o]))({result:s,errorResetBoundary:a,useErrorBoundary:i.useErrorBoundary,query:r.getCurrentQuery()}))throw s.error;return i.notifyOnChangeProps?s:r.trackResult(s)}function qf(e,t,n){return Df(zh(e,t,n),ff)}function Nf(e,t,n){const o=function(e,t,n){return Vh(e)?"function"==typeof t?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:"function"==typeof e?{...t,mutationFn:e}:{...e}}(e,t,n),a=Af({context:o.context}),[i]=k.useState((()=>new kf(a,o)));k.useEffect((()=>{i.setOptions(o)}),[i,o]);const r=Sf(k.useCallback((e=>i.subscribe(rf.batchCalls(e))),[i]),(()=>i.getCurrentResult()),(()=>i.getCurrentResult())),s=k.useCallback(((e,t)=>{i.mutate(e,t).catch(Mf)}),[i]);if(r.error&&Pf(i.options.useErrorBoundary,[r.error]))throw r.error;return{...r,mutate:s,mutateAsync:r.mutate}}function Mf(){}function Ff(e){return Nf((function(e){var t=e.payload;return Sh.getInstance().postWebhookV2MultiAccount({payload:t})}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Uf(e){return Nf((function(e){var t=e.code,n=e.accountCode;return Sh.getInstance().deleteWebhookV2(t,n)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Bf(e){return Nf((function(e){var t=e.code,n=e.payload,o=e.accountCode;return Sh.getInstance().updateWebhookV2(t,n,o)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function Hf(){return Nf((function(e){var t=e.name,n=e.principal;return Sh.getInstance().postAccount(t,n)}))}function Wf(){return Nf((function(e){var t=e.name,n=e.code,o=e.principal;return Sh.getInstance().patchAccountV2({name:t,code:n,principal:o})}))}function Gf(){return Nf((function(e){var t=e.account_code;return Sh.getInstance().putAccountPrincipal({account_code:t})}))}function Vf(){return Nf((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Sh.getInstance().putAccountsUserMassive(t,n,o)}))}function $f(){return Nf((function(e){var t=e.organizationCode,n=e.userCode,o=e.payload;return Sh.getInstance().deleteAccountsUserMassive(t,n,o)}))}function Kf(){return Nf(["post-validate-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Sh.getInstance().postValidateStatusConnection({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Qf(){return Nf(["post-change-status-connection"],(function(e){var t=e.payload,n=e.accountCode;return Sh.getInstance().postChangeStatusConnection({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Jf(){return Nf((function(e){return Sh.getInstance().putCosts(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Xf(){return Nf(["post-connection"],(function(e){var t=e.payload;return Sh.getInstance().postMultiConnection({payload:t}).then((function(e){return null==e?void 0:e.data}))}))}function Yf(){return Nf(["new-post-connection-validate"],(function(){return Sh.getInstance().postMultiConnectionValidate().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Zf(){return Nf(["patch-connection"],(function(e){var t=e.payload,n=e.connectionCode;return Sh.getInstance().patchConnection({payload:t,connectionCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function eg(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postDefaultRoutes({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function tg(){return Nf((function(e){return Sh.getInstance().postValidateCredentials(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function ng(){return Nf(["patch-organizations"],(function(){return Sh.getInstance().updateOrganizationStatus().then((function(e){return null==e?void 0:e.data}))}))}function og(){return Nf((function(e){return Sh.getInstance().getOrgByName(e).then((function(e){return null==e?void 0:e.data}))}))}function ag(){var e=this;return Nf((function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Sh.getInstance().changePasswordV2(o).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}))}function ig(e){return Nf((function(e){return Sh.getInstance().updateProfile(e)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function rg(){return Nf((function(e){return Sh.getInstance().inviteUsersMassive(e,e.organizationCode)}))}function sg(){return Nf((function(e){var t=e.userCode,n=e.organizationCode;return Sh.getInstance().unInviteUsersV2({userCode:t,organizationCode:n})}))}function cg(){return Nf((function(e){return Sh.getInstance().createUserAuth0(e)}))}function ug(){return Nf((function(e){return Sh.getInstance().postCall(e)}))}function lg(){return Nf((function(e){return Sh.getInstance().changeLoginMethods(e)}))}function pg(e){return Nf((function(e){return Sh.getInstance().updateIsActiveCheckout(e)}),e)}function dg(){return Nf((function(e){var t=e.accountCode,n=e.template;return Sh.getInstance().updateCheckoutTemplate({accountCode:t,template:n}).then((function(e){return null==e?void 0:e.data}))}))}function mg(){return Nf((function(e){var t=e.accountCode,n=e.theme;return Sh.getInstance().updateStylingTheme({accountCode:t,theme:n}).then((function(e){return null==e?void 0:e.data}))}))}function hg(){return Nf((function(e){var t=e.payload,n=e.transactionId,o=e.paymentId,a=e.action;return Sh.getInstance().createOperationTransaction(t,n,o,a)}))}function fg(){return Nf((function(e){var t=e.payload,n=e.paymentId,o=e.transactionId,a=e.handleSetProgress;return Sh.getInstance().uploadChargebacks(t,n,o,a)}))}var gg=new uf({}),yg=new class{constructor(e={}){this.queryCache=e.queryCache||new uf,this.mutationCache=e.mutationCache||new df,this.logger=e.logger||af,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0,"production"!==process.env.NODE_ENV&&e.logger&&this.logger.error("Passing a custom logger has been deprecated and will be removed in the next major version.")}mount(){this.mountCount++,1===this.mountCount&&(this.unsubscribeFocus=Jh.subscribe((()=>{Jh.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())})),this.unsubscribeOnline=Yh.subscribe((()=>{Yh.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})))}unmount(){var e,t;this.mountCount--,0===this.mountCount&&(null==(e=this.unsubscribeFocus)||e.call(this),this.unsubscribeFocus=void 0,null==(t=this.unsubscribeOnline)||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=Lh(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state.data}ensureQueryData(e,t,n){const o=zh(e,t,n),a=this.getQueryData(o.queryKey);return a?Promise.resolve(a):this.fetchQuery(o)}getQueriesData(e){return this.getQueryCache().findAll(e).map((({queryKey:e,state:t})=>[e,t.data]))}setQueryData(e,t,n){const o=this.queryCache.find(e),a=function(e,t){return"function"==typeof e?e(t):e}(t,null==o?void 0:o.state.data);if(void 0===a)return;const i=zh(e),r=this.defaultQueryOptions(i);return this.queryCache.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return rf.batch((()=>this.getQueryCache().findAll(e).map((({queryKey:e})=>[e,this.setQueryData(e,t,n)]))))}getQueryState(e,t){var n;return null==(n=this.queryCache.find(e,t))?void 0:n.state}removeQueries(e,t){const[n]=Lh(e,t),o=this.queryCache;rf.batch((()=>{o.findAll(n).forEach((e=>{o.remove(e)}))}))}resetQueries(e,t,n){const[o,a]=Lh(e,t,n),i=this.queryCache,r={type:"active",...o};return rf.batch((()=>(i.findAll(o).forEach((e=>{e.reset()})),this.refetchQueries(r,a))))}cancelQueries(e,t,n){const[o,a={}]=Lh(e,t,n);void 0===a.revert&&(a.revert=!0);const i=rf.batch((()=>this.queryCache.findAll(o).map((e=>e.cancel(a)))));return Promise.all(i).then(Oh).catch(Oh)}invalidateQueries(e,t,n){const[o,a]=Lh(e,t,n);return rf.batch((()=>{var e,t;if(this.queryCache.findAll(o).forEach((e=>{e.invalidate()})),"none"===o.refetchType)return Promise.resolve();const n={...o,type:null!=(e=null!=(t=o.refetchType)?t:o.type)?e:"active"};return this.refetchQueries(n,a)}))}refetchQueries(e,t,n){const[o,a]=Lh(e,t,n),i=rf.batch((()=>this.queryCache.findAll(o).filter((e=>!e.isDisabled())).map((e=>{var t;return e.fetch(void 0,{...a,cancelRefetch:null==(t=null==a?void 0:a.cancelRefetch)||t,meta:{refetchPage:o.refetchPage}})}))));let r=Promise.all(i).then(Oh);return null!=a&&a.throwOnError||(r=r.catch(Oh)),r}fetchQuery(e,t,n){const o=zh(e,t,n),a=this.defaultQueryOptions(o);void 0===a.retry&&(a.retry=!1);const i=this.queryCache.build(this,a);return i.isStaleByTime(a.staleTime)?i.fetch(a):Promise.resolve(i.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(Oh).catch(Oh)}fetchInfiniteQuery(e,t,n){const o=zh(e,t,n);return o.behavior=mf(),this.fetchQuery(o)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(Oh).catch(Oh)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find((t=>Nh(e)===Nh(t.queryKey)));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find((t=>Mh(e,t.queryKey)));if("production"!==process.env.NODE_ENV){this.queryDefaults.filter((t=>Mh(e,t.queryKey))).length>1&&this.logger.error("[QueryClient] Several query defaults match with key '"+JSON.stringify(e)+"'. The first matching query defaults are used. Please check how query defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetquerydefaults.")}return null==t?void 0:t.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find((t=>Nh(e)===Nh(t.mutationKey)));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find((t=>Mh(e,t.mutationKey)));if("production"!==process.env.NODE_ENV){this.mutationDefaults.filter((t=>Mh(e,t.mutationKey))).length>1&&this.logger.error("[QueryClient] Several mutation defaults match with key '"+JSON.stringify(e)+"'. The first matching mutation defaults are used. Please check how mutation defaults are registered. Order does matter here. cf. https://react-query.tanstack.com/reference/QueryClient#queryclientsetmutationdefaults.")}return null==t?void 0:t.defaultOptions}defaultQueryOptions(e){if(null!=e&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(null==e?void 0:e.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=qh(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.useErrorBoundary&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return null!=e&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(null==e?void 0:e.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}({defaultOptions:{queries:{refetchOnWindowFocus:!1,refetchOnReconnect:!1,retry:!1,staleTime:3e5,useErrorBoundary:!0}},queryCache:gg});function vg(){return Nf((function(e){return Sh.getInstance().createReconciliationsReportV2(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function bg(){return Nf((function(e){return Sh.getInstance().createReportV2(e).then((function(e){return null==e?void 0:e.data}))}))}function kg(){return Nf((function(e){return Sh.getInstance().getTotalRowsForExport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function xg(){return Nf((function(e){return Sh.getInstance().cancelReport(e).then((function(e){return null==e?void 0:e.data}))}))}function wg(o){var a=this;return Nf((function(){return t(a,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().createReportTemplate(o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{onMutate:function(o){return t(a,void 0,void 0,(function(){var t;return n(this,(function(n){switch(n.label){case 0:return[4,yg.cancelQueries({queryKey:["GET/reports/templates"]})];case 1:return n.sent(),t=yg.getQueryData(["GET/reports/templates"]),yg.setQueryData(["GET/reports/templates"],(function(t){return e(e([],t,!0),[o],!1)})),[2,{previousTemplates:t}]}}))}))},onError:function(e,t,n){yg.setQueryData(["GET/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){yg.invalidateQueries({queryKey:["GET/reports/templates"]})}})}function jg(e){return Nf((function(){return Sh.getInstance().updateReportTemplate(e).then((function(e){return null==e?void 0:e.data}))}))}function _g(e,o,a){var i=this;return void 0===a&&(a=null),Nf((function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().postSmartRoutingCreateWorkflow(e,o).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,t.sent()]}}))}))}),a)}function Eg(e,o){var a=this,i=e.versionCode,r=e.accountCode,s=e.organizationCode;return void 0===o&&(o=null),Nf((function(){return t(a,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Sh.getInstance().postSmartRoutingPublishVersion(r,i,s).then((function(e){return null==e?void 0:e.data}))];case 1:return[2,e.sent()]}}))}))}),o)}function Cg(e,t){var n=e.data,o=e.accountCode;return void 0===t&&(t=null),Nf((function(){return Sh.getInstance().putSmartRoutingUpdateWorkflow(o,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),t)}function Sg(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Nf((function(){return Sh.getInstance().deleteSmartRoutingVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)}function Rg(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Nf((function(){return Sh.getInstance().postSmartRoutingDuplicateVersion(o,n).then((function(e){return null==e?void 0:e.data}))}),t)}function Tg(e,t){var n=e.paymentMethod,o=e.active,a=e.accountCode;return void 0===t&&(t=null),Nf((function(){return Sh.getInstance().putSmartRoutingToggleMethod(a,n,o).then((function(e){return null==e?void 0:e.data}))}),t)}function Og(e,t){var n=e.declinedId,o=e.accountCode;return void 0===t&&(t=null),Nf((function(e){return void 0===e&&(e=null),Sh.getInstance().updateSmartRoutingDeclinedGroup(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)}function Ag(e){var t=e.accountCode;return Nf((function(e){return void 0===e&&(e=null),Sh.getInstance().createSmartRoutingDeclinedGroup(t,e).then((function(e){return null==e?void 0:e.data}))}),e.options)}function Ig(e,t){var n=e.versionCode,o=e.accountCode;return void 0===t&&(t=null),Nf((function(e){return void 0===e&&(e=!1),Sh.getInstance().updateSmartRoutingFavorite(o,n,e).then((function(e){return null==e?void 0:e.data}))}),t)}function zg(e,t){var n=e.code,o=e.name,a=e.accountCode;return void 0===t&&(t=null),Nf((function(){return Sh.getInstance().putSmartRoutingUpdateWorkflowName(a,{code:n,name:o}).then((function(e){return null==e?void 0:e.data}))}),t)}function Lg(e,t){var n=e.accountCode,o=e.workflowVersionCode;return void 0===t&&(t=null),Nf((function(e){return Sh.getInstance().simulateSmartRoutingTransaction(n,o,e).then((function(e){return null==e?void 0:e.data}))}),t)}function Pg(e,t){return void 0===t&&(t=null),Nf((function(t){return Sh.getInstance().updateMonitorRedistribution(e,t).then((function(e){return null==e?void 0:e.data}))}),t)}function Dg(e,t){return void 0===t&&(t={}),Nf((function(t){var n=t.declinedGroupCode;return Sh.getInstance().removeDeclinedGroup(e,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),a(a({},t),{useErrorBoundary:!1}))}function qg(e,t){return void 0===t&&(t={}),Nf((function(t){var n=t.payload;return Sh.getInstance().multiAccountDeclinedGroupCreate(e,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),a(a({},t),{useErrorBoundary:!1}))}var Ng=function(e){return Nf((function(t){return Sh.getInstance().createMonitorThreshold(t,e).then((function(e){return e.data}))}))},Mg=function(e){return Nf((function(t){return Sh.getInstance().createMonitorTemplate(t,e).then((function(e){return e.data}))}))};function Fg(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postSlackMessageChannel(t).then((function(e){return null==e?void 0:e.data}))}))}function Ug(){return Nf((function(e){var t=e.userCode,n=e.organizationCode;return Sh.getInstance().deleteUserTeamV2({userCode:t,organizationCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function Bg(){return Nf((function(){return Sh.getInstance().setCustodian().then((function(e){return null==e?void 0:e.data}))}))}function Hg(){return Nf((function(e){var t=e.payload,n=e.accountCode;return Sh.getInstance().createRoles(t,n).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Wg(){var e=this;return Nf((function(o){var a=o.payload,i=o.id,r=o.accountCode;return t(e,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().editRoles({payload:a,id:i},r)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}}))}))}),{useErrorBoundary:!1})}function Gg(){return Nf((function(e){return Sh.getInstance().deleteRoles(e).then((function(e){return null==e?void 0:e.data}))}))}function Vg(){return Nf(["post-payment-links"],(function(e){var t=e.payload,n=e.accountCode;return Sh.getInstance().postPaymentLinks({payload:t,accountCode:n}).then((function(e){return null==e?void 0:e.data}))}))}function $g(){return Nf(["post-delete-payment-link"],(function(e){var t=e.code;return Sh.getInstance().postDeletePaymentLink({code:t}).then((function(e){return null==e?void 0:e.data}))}))}function Kg(){return Nf(["patch-payment-links"],(function(e){var t=e.payload,n=e.accountCode,o=e.paymentLinkCode;return Sh.getInstance().patchPaymentLinks({payload:t,accountCode:n,paymentLinkCode:o}).then((function(e){return null==e?void 0:e.data}))}))}function Qg(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postUserSettings(t)}),{onMutate:function(e){return e}})}function Jg(){return Nf((function(e){return Sh.getInstance().postUserThemeSettings(e)}))}function Xg(){return Nf((function(e){var t=e.payload,n=e.section;return Sh.getInstance().postUserSettingsTables(t,n)}),{onMutate:function(e){return e},onSuccess:function(e){var t=yg.getQueryData(["fetch-profile"]);e.data&&yg.setQueryData(["fetch-profile"],a(a({},t),{settings:e.data}))}})}function Yg(e){return Nf(["pinned-sections"],(function(e){var t=e.payload;return Sh.getInstance().postUserSettingsPinned(t)}),{onMutate:function(t){var n=t.payload;return e({payload:n})}})}function Zg(){return Nf((function(e){var t=e.password,n=e.otp;return Sh.getInstance().getMfaTokenValidation(t,n).then((function(e){return null==e?void 0:e.data}))}))}function ey(){return Nf((function(){return Sh.getInstance().getEmailOtp().then((function(e){return null==e?void 0:e.data}))}))}function ty(){return Nf((function(e){return Sh.getInstance().confirmMfaOtp(e).then((function(e){return null==e?void 0:e.data}))}))}function ny(){return Nf((function(e){return Sh.getInstance().unrollMfa(e).then((function(e){return null==e?void 0:e.data}))}))}function oy(){return Nf((function(){return Sh.getInstance().validatePasswordStatus().then((function(e){return null==e?void 0:e.data})).catch((function(e){return{valid:!1}}))}))}function ay(){return Nf(["post-get-allowlist-items"],(function(e){var t=e.payload;return Sh.getInstance().postAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function iy(){return Nf(["post-get-allowlist-multi-account"],(function(e){var t=e.payload;return Sh.getInstance().postGetAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function ry(){return Nf(["post-create-allowlist-multi-account"],(function(e){var t=e.payload;return Sh.getInstance().postCreateAllowlistMultiAccount({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function sy(){return Nf(["patch-change-status-allowlist"],(function(e){var t=e.payload;return Sh.getInstance().patchChangeStatusAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function cy(){return Nf(["patch-change-status-allowlist-item"],(function(e){var t=e.payload;return Sh.getInstance().patchChangeStatusAllowlistItem({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function uy(){return Nf(["post-add-allowlist-items"],(function(e){var t=e.payload;return Sh.getInstance().patchAddAllowlistItems({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function ly(){return Nf(["patch-allowlist"],(function(e){var t=e.payload;return Sh.getInstance().patchAllowlist({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function py(){return Nf(["post-blacklist-multi-account"],(function(e){var t=e.payload;return Sh.getInstance().postBlackListMultiAccount({payload:t}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function dy(){return Nf(["put-blacklist"],(function(e){return Sh.getInstance().putBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function my(){return Nf(["change-blacklist"],(function(e){return Sh.getInstance().changeBlackListStatus(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function hy(){return Nf(["change-blacklist-item"],(function(e){return Sh.getInstance().changeBlackListStatusItem(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function fy(){return Nf(["post-blacklist-items"],(function(e){var t=e.payload;return Sh.getInstance().postBlackListItems({payload:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function gy(){return Nf(["delete-blacklist"],(function(e){var t=e.black_list_code;return Sh.getInstance().deleteBlackListType({black_list_code:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function yy(e){var t=e.handleSetProgress;return Nf(["post-blacklist-batch"],(function(e){var n=e.blacklist_code,o=e.expiration_days,a=e.file;return Sh.getInstance().postBlackListBatch({blacklist_code:n,expiration_days:o,file:a,handleSetProgress:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function vy(){return Nf(["change-payments-webhook"],(function(e){var t=e.status,n=e.paymentCode;return Sh.getInstance().postChangePaymentsWebhook({status:t,paymentCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function by(){return Nf(["delete-blacklist-items"],(function(e){var t=e.blocklist_code,n=e.blocklist_item_id,o=e.account_code;return Sh.getInstance().deleteBlockListItem({blocklist_code:t,blocklist_item_id:n,account_code:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function ky(){return Nf(["valiate-blacklist-items"],(function(e){return Sh.getInstance().valiateBlockListItems({payload:e}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function xy(){return Nf(["delete-allowlist-item"],(function(e){return Sh.getInstance().deleteAllowlistItem({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function wy(){return Nf(["validate-allowlist-items"],(function(e){return Sh.getInstance().validateAllowlistItems({payload:e}).then((function(e){return e.data})).catch((function(e){return e}))}))}function jy(e){var t=e.fileName,n=e.onSuccess,o=e.onError,a=w(0),i=a[0],r=a[1],s=j({cancel:function(){return null}}),c=Nf(["upload-file-chargeback",t],(function(e){var t=Sh.getInstance().uploadFileS3ClientBatchRefunds({payload:e,handleSetProgress:r}),a=t.promise,i=t.cancel;return s.current.cancel=i,a.then((function(e){return null==n||n(null==e?void 0:e.data),null==e?void 0:e.data})).catch((function(e){throw null==o||o(),e}))}),{useErrorBoundary:!1});return{mutation:c,cancelRequest:s.current.cancel,progress:i}}function _y(){return Nf((function(e){return Sh.getInstance().uploadBatchRefundsV2({payload:e}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Ey(){var e=this;return Nf((function(o){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().batchRefundByFile({payload:o}).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function Cy(){var e=this;return Nf((function(o){var a=o.batchRefundId,i=o.organizationCode,r=o.accountCode;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().getBatchRefundProcessedFileDownload(a,i,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function Sy(){var e=this;return Nf((function(o){var a=o.batchRefundId,i=o.organizationCode,r=o.accountCode;return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().getBatchRefundUserFileDownload(a,i,r).then((function(e){return null==e?void 0:e.data}))]}))}))}),{useErrorBoundary:!1})}function Ry(){var e=j({cancel:function(){return null}}),t=Nf(["upload-file"],(function(t){var n=Sh.getInstance().uploadFileS3ClientBatchRefunds({payload:t}),o=n.promise,a=n.cancel;return e.current.cancel=a,o.then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}));return{mutation:t,cancelRequest:e.current.cancel}}function Ty(){return Nf((function(e){var t=e.payload,n=e.organizationCode;return Sh.getInstance().updateMFAConfig(t,n)}))}function Oy(){return Nf((function(e){var t=e.payload,n=e.organizationCode;return Sh.getInstance().mfaExcludeUsers(t,n)}))}function Ay(e){return qf(["GET/scheduled-reports",e],(function(){return Sh.getInstance().getScheduledReport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function Iy(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postScheduledReport(t).then((function(e){return{data:e.data,status:e.status}})).catch((function(e){return e}))}))}function zy(){return Nf((function(e){var t=e.reportCode,n=e.payload;return Sh.getInstance().updateScheduledReport(t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Ly(){return Nf((function(e){return Sh.getInstance().deleteScheduledReport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Py(){return Nf((function(e){return Sh.getInstance().getConditionalConfigRules(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Dy(){return Nf((function(e){return Sh.getInstance().getRule(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function qy(){return Nf((function(e){var t=e.payload,n=e.accountCode;return Sh.getInstance().postCreateRuleMultiAccount(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Ny(){return Nf((function(e){var t=e.payload,n=e.ruleId,o=e.accountCode;return Sh.getInstance().postEditRule(t,n,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function My(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postCreateCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Fy(){return Nf((function(e){var t=e.payload,n=e.code;return Sh.getInstance().pathCreateCustomizedApiKeys(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Uy(){return Nf((function(e){var t=e.code,n=e.password;return Sh.getInstance().getCustomizedApiKeysToken(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))}function By(){return Nf((function(e){var t=e.passwordOtp;return Sh.getInstance().getDeveloperCredentialsValidatePassword(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}))}function Hy(){return Nf((function(e){var t=e.code;return Sh.getInstance().deleteCustomizedApiKeys(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Wy(){return Nf((function(e){var t=e.payload,n=e.code;return Sh.getInstance().patchApiKeysEditNote(t,n).then((function(e){return e.data})).catch((function(e){return e}))}))}function Gy(){return Nf((function(e){var t=e.payload,n=e.code,o=e.password;return Sh.getInstance().postApiKeysRoll(t,n,o).then((function(e){return e.data})).catch((function(e){return e}))}))}function Vy(){return Nf((function(e){var t=e.password,n=e.accountCode;return Sh.getInstance().getDeveloperCredentials(t,n).then((function(e){return a(a({},null==e?void 0:e.data),{isValid:!0})})).catch((function(e){var t,n;return{isValid:!1,status:e.response.status,error:null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.data}}))}))}function $y(e){return Nf((function(e){var t=e.payload;return Sh.getInstance().postAuditMonitors(t)}),{onMutate:e.onMutate})}function Ky(o){var a=this;return Nf((function(){return Sh.getInstance().createReconciliationReportTemplate(o).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{onMutate:function(o){return t(a,void 0,void 0,(function(){var t,a;return n(this,(function(n){switch(n.label){case 0:return[4,yg.cancelQueries({queryKey:["GET/reconciliation/reports/templates"]})];case 1:return n.sent(),t=null===(a=yg.getQueryData(["GET/reconciliation/reports/templates"]))||void 0===a?void 0:a.templates,yg.setQueryData(["GET/reconciliation/reports/templates"],(function(t){return{templates:e(e([],t.templates,!0),[o],!1)}})),[2,{previousTemplates:t}]}}))}))},onError:function(e,t,n){yg.setQueryData(["GET/reconciliation/reports/templates"],null==n?void 0:n.previousTemplates)},onSettled:function(){yg.invalidateQueries({queryKey:["GET/reconciliation/reports/templates"]})},useErrorBoundary:!1})}function Qy(e){return Nf((function(){return Sh.getInstance().updateReconciliationReportTemplate(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function Jy(){return Nf(["POST/reconciliation/alerts"],(function(e){return Sh.getInstance().postReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yg.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function Xy(){return Nf(["DELETE/reconciliation/alerts"],(function(e){return Sh.getInstance().deleteReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yg.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function Yy(){return Nf(["UPDATE/reconciliation/alerts"],(function(e){return Sh.getInstance().updateReconciliationAlert(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{onSuccess:function(){yg.invalidateQueries(["GET/reconciliation/alerts/list"])},useErrorBoundary:!1})}function Zy(){return Nf((function(e){var t=e.payload;return Sh.getInstance().postCreateInsightsReport(t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function ev(){return Nf((function(e){return Sh.getInstance().createSamlConfig(e)}))}function tv(){return Nf((function(e){return Sh.getInstance().updateSamlConfig(e)}))}function nv(){return Nf((function(){return Sh.getInstance().deleteSamlConfig()}))}function ov(e,t){return void 0===t&&(t={}),Nf((function(t){return Sh.getInstance().generateAIWorkflowRoutes(e,t).then((function(e){return null==e?void 0:e.data}))}),a(a({},t),{useErrorBoundary:!1}))}function av(e){return void 0===e&&(e={}),Nf((function(e){return Sh.getInstance().postAIGenerationFeedback(e).then((function(e){return null==e?void 0:e.data}))}),a(a({},e),{useErrorBoundary:!1}))}function iv(){return Nf((function(e){return Sh.getInstance().createChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function rv(){return Nf((function(e){return Sh.getInstance().deleteChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function sv(){return Nf((function(e){var t=e.chart_id,n=e.type,o=e.name,a=e.user_prompt,i=void 0===a?"":a;return Sh.getInstance().patchChartGPTChart(t,{type:n,name:o,user_prompt:i}).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function cv(){var e=this;return Nf((function(o){return t(e,void 0,void 0,(function(){var e,a,i,r,s,c,u,l,p,d=this;return n(this,(function(m){switch(m.label){case 0:return[4,(e=Sh.getInstance()).createChartGPTChart(o)];case 1:if(a=m.sent(),!(i=null!==(l=null===(u=null==a?void 0:a.data)||void 0===u?void 0:u.chartgpt_id)&&void 0!==l?l:null===(p=null==a?void 0:a.data)||void 0===p?void 0:p.chart_id))throw new Error("Failed to create chart: No chart ID returned");return r=function(){return t(d,void 0,void 0,(function(){var o=this;return n(this,(function(a){return[2,new Promise((function(a,r){var s=setInterval((function(){return t(o,void 0,void 0,(function(){var t,o,c;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.getChartById(i)];case 1:return t=n.sent(),"ERROR"===(null==(o=null==t?void 0:t.data)?void 0:o.status)&&(clearInterval(s),a(o)),"DRAFT"===(null==o?void 0:o.status)&&(clearInterval(s),a(o)),[3,3];case 2:return c=n.sent(),clearInterval(s),r(c),[3,3];case 3:return[2]}}))}))}),1e4)}))]}))}))},[4,r()];case 2:return s=m.sent(),[4,e.executeChartGPTChart(i)];case 3:return c=m.sent(),[2,{chart:s,chartgpt_id:i,execution:null==c?void 0:c.data}]}}))}))}),{useErrorBoundary:!1})}var uv=function(){var e,t;return null===(t=null===(e=function(e){var t=localStorage.getItem(e),n=w(t&&JSON.parse(t)),o=n[0],a=n[1];return _((function(){var t=function(t){if(t.key===e){var n=t.newValue;a(n)}};return window.addEventListener("storage",t),function(){window.removeEventListener("storage",t)}}),[e]),o}("account"))||void 0===e?void 0:e.value)||void 0===t?void 0:t.organization_code};function lv(e){var o=this;return qf(["fetch-payments-lazy",e],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().postPaymentsLazy(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function pv(e){return qf(["fetch-payments-evaluated",e],(function(){return Sh.getInstance().postPaymentsEvaluated(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function dv(e){var o=this,a=e.paymentCode,i=e.enabled,r=void 0===i||i,s=Sh.getInstance();return qf(["get-payment-v2",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getPaymentV2(a).then((function(e){return e.data}))]}))}))}),{enabled:r,cacheTime:500,useErrorBoundary:!1})}function mv(e){var o=this,a=e.payment_code,i=e.enabled,r=void 0===i||i,s=Sh.getInstance();return qf(["get-payment-transaction-details-v2",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getTransactionDetailsV2({payment_code:a}).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!a&&r,cacheTime:0,useErrorBoundary:!1})}function hv(e){var o=this,a=e.transaction_code,i=e.enabled,r=void 0===i||i,s=Sh.getInstance();return qf(["get-payment-transaction-raw-response",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,s.getTransactionRawResponse({transaction_code:a})]}))}))}),{enabled:!!a&&r,cacheTime:0,useErrorBoundary:!1})}function fv(e){var t=uv();return qf(["payment-methods",e],(function(){return Sh.getInstance().getPaymentMethodsByCountry({provider_id:null==e?void 0:e.provider_id,country:null==e?void 0:e.country},t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e&&!!(null==e?void 0:e.provider_id),useErrorBoundary:!1})}function gv(){return qf({queryKey:["/payment-methods/providers"],queryFn:function(){return Sh.getInstance().getPaymentMethodsAndProviders().then((function(e){return null==e?void 0:e.data}))},cacheTime:864e5,useErrorBoundary:!1})}function yv(){return qf(["GET/catalog/card-brands"],(function(){return Sh.getInstance().getCardBrands().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function vv(e,t){return void 0===e&&(e=!0),void 0===t&&(t=Nd.PAYMENTS),qf(["payment-filters",e,t],(function(){return Sh.getInstance().getPaymentFilters(t).then((function(e){return null==e?void 0:e.data}))}),{enabled:e,useErrorBoundary:!1,cacheTime:3e5})}function bv(){return qf(["payment-metrics-filters"],(function(){return Sh.getInstance().getPaymentMetricsFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function kv(e){var t=e.transaction_code,n=e.enabled;return qf(["payment-transaction-details",t],(function(){return Sh.getInstance().getPaymentTransactionsDetails({transaction_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function xv(e){var t=e.payment_code,n=e.enabled;return qf(["transaction-history",t],(function(){return Sh.getInstance().getTransactionHistoryByPaymentCode({payment_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&(void 0===n||n),useErrorBoundary:!1})}function wv(e){var o=this;return qf(["POST/transactions",JSON.stringify(e)],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().postTransactions(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e,cacheTime:0,useErrorBoundary:!1})}function jv(e){var o=this;return qf(["POST/fraud-transactions",JSON.stringify(e)],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().postFraudTransactions(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&Object.keys(e).length>0,cacheTime:0,useErrorBoundary:!1})}function _v(e){return qf(["GET/payout-detail",JSON.stringify(e)],(function(){var t=Sh.getInstance();return e.organization_code?t.getPayoutDetails(e).then((function(e){return null==e?void 0:e.data})):{}}),{enabled:!!e.organization_code&&!!e&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function Ev(e){return qf(["GET/payout-transaction-detail",JSON.stringify(e)],(function(){return Sh.getInstance().getPayoutTransactionDetails(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e&&!!(null==e?void 0:e.transaction_code)&&(null==e?void 0:e.enabled),cacheTime:0,useErrorBoundary:!1})}function Cv(e){var t=uv();return qf(["GET/payout-history-detail",JSON.stringify(e)],(function(){return Sh.getInstance().getPayoutHistoryDetails(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.payout_code)&&e.enabled,cacheTime:0,useErrorBoundary:!1})}function Sv(e,o){var a=this,i=uv();return qf(["GET/useGetProofOfCancel",i,e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getProofOfCancel(e,i,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&!!i&&!!o,cacheTime:0,useErrorBoundary:!1})}function Rv(e,o){var a=this,i=uv();return qf(["GET/useGetProofOfPayment",i,e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getProofOfPayment(e,i,o).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:!!e&&!!i&&!!o,cacheTime:0,useErrorBoundary:!1})}function Tv(e,o,a){var i=this,r=Sh.getInstance();return qf(["send-payment-notification",e,o],(function(){return t(i,void 0,void 0,(function(){var t,i;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,r.sendPaymentNotification(e,o)];case 1:return t=n.sent(),a.onSuccess(),[2,t.data];case 2:throw i=n.sent(),a.onError(),i;case 3:return[2]}}))}))}),{enabled:a.enabled,cacheTime:0,useErrorBoundary:!1})}function Ov(e){return qf(["usePayoutsList",e&&JSON.stringify(e)],(function(){var t=Sh.getInstance();if(e)return t.postPayouts(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&!!Object.values(e).length,cacheTime:0})}function Av(e){var o=this;void 0===e&&(e=!0);var a=uv();return qf(["getPayoutsFilters",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().getPayoutsFilters(a).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))]}))}))}),{enabled:e&&!!a})}function Iv(e){var t=e.password,n=e.accountCode;return qf(["developers"],(function(){return Sh.getInstance().getDeveloperCredentials(t,n).then((function(e){return a(a({},null==e?void 0:e.data),{isValid:!0})})).catch((function(e){var t,n;return{isValid:!1,status:e.response.status,error:null===(n=null===(t=null==e?void 0:e.response)||void 0===t?void 0:t.data)||void 0===n?void 0:n.data}}))}),{enabled:!1,cacheTime:0})}function zv(){return qf(["fetch-customized-api-keys-members"],(function(){return Sh.getInstance().getCustomizedApiKeysMembers().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function Lv(){return qf(["developers-get-allowed-ips"],(function(){return Sh.getInstance().getAllowedIps().then((function(e){return(null==e?void 0:e.data)?a(a({},null==e?void 0:e.data),{isError:!1}):null})).catch((function(e){return a(a({},e),{isError:!0})}))}),{enabled:!1,cacheTime:0})}function Pv(){return qf(["fetch-customized-api-keys-accounts"],(function(){return Sh.getInstance().getCustomizedApiKeysAccounts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function Dv(e){return qf(["fetch-customized-api-keys",e],(function(){return Sh.getInstance().postCustomizedApiKeys(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!(null==e?void 0:e.length)})}function qv(){return qf(["fetch-customized-api-keys-products"],(function(){return Sh.getInstance().getCustomizedApiKeysProducts().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{cacheTime:0})}function Nv(){return Nf(["developers-patch-allowed-ips"],(function(e){return Sh.getInstance().patchAllowedIps(e).then((function(e){return(null==e?void 0:e.data)?a(a({},null==e?void 0:e.data),{isError:!1}):null})).catch((function(e){return a(a({},e),{isError:!0})}))}),{cacheTime:0})}function Mv(){return qf(["fetch-organizations"],(function(){return Sh.getInstance().getOrganization().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{keepPreviousData:!0})}function Fv(){return qf(["fetch-all-organizations",uv()],(function(){return Sh.getInstance().getAllOrganization().then((function(e){return(null==e?void 0:e.data)||[]}))}),{cacheTime:36e5,keepPreviousData:!0,useErrorBoundary:!1})}function Uv(e){var t=uv();return qf(["organizations-provider-params",e],(function(e){var n=e.queryKey;return Sh.getInstance().getProviderParams(n[1],t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.id),useErrorBoundary:!1})}function Bv(e){var t=e.integration_code,n=e.enabled,o=e.accountCode;return qf(["integration-params",t,o],(function(){return t.includes("undefined")?{}:Sh.getInstance().getIntegrationParams({accountCode:o,integration_code:t}).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,useErrorBoundary:!1})}function Hv(e){var t=e.accountCode,n=e.organizationCode,o=uv(),a=qf(["organizations-account-integrations",t,n],(function(){return Sh.getInstance().getIntegrationByAccountV2({accountCode:t,organizationCode:n||o}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,enabled:!!t,useErrorBoundary:!1});return a}function Wv(e){var t=e.accountCode,n=e.paymentMethod;return qf(["fetch-connections-by-payment-method",n,t],(function(){return Sh.getInstance().getConnectionsByPaymentMethod(t,n).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!n&&!!t,cacheTime:0,useErrorBoundary:!1})}function Gv(){var e=this;return qf(["fetch-hash-pylon"],(function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){return[2,Sh.getInstance().getHashPylon()]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})}function Vv(){return qf(["connections"],(function(){return Sh.getInstance().getConnections().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function $v(){return qf(["dialogs"],(function(){return Sh.getInstance().getDialogs().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,retryDelay:2e3,cacheTime:36e5})}function Kv(){return qf(["params-catalog"],(function(){return Sh.getInstance().getWebhookParamsV2().then((function(e){return null==e?void 0:e.data}))}))}function Qv(e){var t=e.accountCode,n=e.name;return qf(["webhooks",t,n],(function(){return Sh.getInstance().getWebhooksV3({accountCode:t,name:n}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t,useErrorBoundary:!1})}function Jv(e){var t=e.accountCode,n=e.enabled;return qf(["webhooks-detail",t],(function(){return Sh.getInstance().getWebhooksV2Detail({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!n})}function Xv(e){var t,n=uv(),o=null!==(t=null!=e?e:n)&&void 0!==t?t:null;return qf({queryKey:["accounts",o],queryFn:function(){return Sh.getInstance().getAccounts(o).then((function(e){return null==e?void 0:e.data}))},keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!o})}function Yv(e){return qf(["accountsV2",e],(function(){return Sh.getInstance().getAccountsV2().then((function(e){return(null==e?void 0:e.data)||[]})).catch((function(e){throw e}))}),{keepPreviousData:!0,enabled:!!e,useErrorBoundary:!1})}function Zv(e){return qf(["accountsV2-by-user",e],(function(){return e?Sh.getInstance().getAccountsByUser(e).then((function(e){return{accountsV2ByUser:(null==e?void 0:e.data)||null}})).catch((function(e){return{accountsV2ByUser:[],error:e}})):{accountsV2ByUser:[]}}),{enabled:!!e,staleTime:0})}function eb(){return qf(["menu"],(function(){return Sh.getInstance().getMenu().then((function(e){return lh(e)?yh:null==e?void 0:e.data})).catch((function(){return yh}))}))}function tb(){return qf(["/payment/statuses/style"],(function(){return Sh.getInstance().useGetPaymentStatusesStyles().then((function(e){return lh(e)?ph:null==e?void 0:e.data})).catch((function(){return ph}))}))}function nb(){return qf(["/transaction/statuses/style"],(function(){return Sh.getInstance().useGetTransactionStatusesStyles().then((function(e){return lh(e)?dh:null==e?void 0:e.data})).catch((function(){return dh}))}),{cacheTime:36e5,useErrorBoundary:!1})}function ob(){return qf(["/reconciliation/transaction/statuses/style"],(function(){return Sh.getInstance().useGetReconciliationTransactionStatusesStyles().then((function(e){return lh(e)?mh:null==e?void 0:e.data})).catch((function(){return mh}))}))}function ab(){return qf(["timezone-catalog"],(function(){return Sh.getInstance().useGetTimeZoneCatalog().then((function(e){return lh(e)?hh:null==e?void 0:e.data})).catch((function(){return hh}))}))}function ib(){return qf(["/cms/audit-logs-filters"],(function(){return Sh.getInstance().useGetAuditLogsFilters().then((function(e){return lh(e)?fh:null==e?void 0:e.data})).catch((function(){return fh}))}))}function rb(){return qf(["/cms/static-contents"],(function(){return Sh.getInstance().getDashboardStaticContents().then((function(e){var t,n;return lh(e)?gh:(null===(n=null===(t=null==e?void 0:e.data)||void 0===t?void 0:t[0])||void 0===n?void 0:n.data)||{}}))}),{cacheTime:6048e5,useErrorBoundary:!1})}function sb(){return qf(["/cms/locales"],(function(){return Sh.getInstance().getLocales().then((function(e){return lh(e)?vh:e.data})).catch((function(){return vh}))}))}var cb=function(){var e=w("ON"===localStorage.getItem("isTesting")),t=e[0],n=e[1];return _((function(){window.addEventListener("storage",(function(e){"isTesting"===e.key&&n("ON"===e.newValue)}))}),[]),{isTesting:t}};function ub(e){return qf(["smart-routing-methods",e],(function(){return Sh.getInstance().getSmartRoutingMethods(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function lb(e,t){return qf(["smart-routing-workflow",t,e],(function(){return Sh.getInstance().getSmartRoutingWorkflow(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e,cacheTime:0,retry:!1})}function pb(e,t){return qf(["smart-routing-condition-types",e,t],(function(){return Sh.getInstance().getSmartRoutingConditionTypes(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t&&!!e})}function db(e,t){return qf(["smart-routing-condition-payment-method",e,t],(function(){return Sh.getInstance().getSmartRoutingConditionPaymentMethod(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:null!==t})}function mb(e,t){return qf(["smart-routing-condition-types-values",t,e],(function(){return Sh.getInstance().getSmartRoutingConditionTypesValues(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&!!e,useErrorBoundary:!1})}function hb(e){var t=e.accountCode,n=e.workflowVersionId;return qf(["smart-routing-workflow-version",n,t],(function(){return Sh.getInstance().getSmartRoutingWorkflowVersion(t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!n&&!!t,cacheTime:0})}function fb(e,t,n){return qf(["smart-routing-next-route",e,n,t],(function(){return Sh.getInstance().getSmartRoutingNextSteps(e,t,n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function gb(e){return qf(["smart-routing-decline-groups",e],(function(){return Sh.getInstance().getSmartRoutingDeclinedGroup(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function yb(e,t){return qf(["smart-routing-payment-route",e,t],(function(){return Sh.getInstance().getSmartRoutingPaymentRoute(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&!!t,cacheTime:0})}function vb(e){return qf(["smart-routing-simulate-condition-type-values",e],(function(){return Sh.getInstance().getSmartRoutingSimulateConditionTypeValues(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function bb(e){var t=e.text,n=e.conditionType;return qf(["smart-routing-search-condition-values",t,n],(function(){return Sh.getInstance().getSmartRoutingSearchConditionValues(n,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!n&&!!t,cacheTime:0})}function kb(){return qf(["smart-routing-conversion-rates"],(function(){return Sh.getInstance().getProviderConversionRatesData().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!1,useErrorBoundary:!1})}function xb(){var e=this;return qf({queryKey:["smart-routing-3ds-excemptions"],queryFn:function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Sh.getInstance().get3DSExemptions()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})}function wb(){var e=this;return qf({queryKey:["smart-routing-network-tokens-onboarding"],queryFn:function(){return t(e,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,Sh.getInstance().getNetworkTokensOnboarding()];case 1:return[2,e.sent().data]}}))}))},useErrorBoundary:!1})}function jb(e){return qf(["fetch-routing-monitors-templates",e],(function(){return Sh.getInstance().getRoutingMonitorsTemplates(e).then((function(e){return e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function _b(e,t){return qf(["fetch-routing-monitors-template",e],(function(){return Sh.getInstance().getRoutingMonitorsTemplate(e,t).then((function(e){return e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:!!e&&!!t&&"NONE"!==e,useErrorBoundary:!1})}function Eb(e){var t=e.accountCode;return qf(["checkouts",t],(function(){return Sh.getInstance().getCheckouts({accountCode:t}).then((function(e){return e.data}))}),{cacheTime:0,enabled:Boolean(t)})}function Cb(e){var t=e.accountCode;return qf(["checkouts-template"],(function(){return Sh.getInstance().getCheckoutTemplate({accountCode:t}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,enabled:Boolean(t)})}var Sb=function(e){return["checkout-builder-name-and-icon",e.paymentMethodType,e.type]},Rb=function(e,t){var n=e.paymentMethodType,o=e.type;return qf(Sb({paymentMethodType:n,type:o}),(function(){return Sh.getInstance().getNameAndIcon({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)},Tb=function(e){return["checkout-builder-required-fields",e.paymentMethodType,e.type]},Ob=function(e,t){var n=e.paymentMethodType,o=e.type;return qf(Tb({paymentMethodType:n,type:o}),(function(){return Sh.getInstance().getRequiredFields({paymentMethodType:n,type:o}).then((function(e){return null==e?void 0:e.data}))}),t)};function Ab(e){var t=e.accountCode;return qf(["styling-sdk-dynamic",t],(function(){return Sh.getInstance().getStylingSdkDynamic({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Ib(e){var t=e.accountCode;return qf(["styling-theme",t],(function(){return Sh.getInstance().getStylingTheme({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function zb(e){var t=e.accountCode;return qf(["styling-settings",t],(function(){return Sh.getInstance().getStylingSettings({accountCode:t}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Lb(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n;return qf(["styling-settings-v2",t],(function(){return Sh.getInstance().getStylingSettingsV2({accountCode:t,environment:o}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{cacheTime:0,enabled:Boolean(t),useErrorBoundary:!1})}function Pb(){return Nf((function(e){var t=e.accountCode,n=e.environment,o=void 0===n?"live":n,a=e.payload;return Sh.getInstance().changeStylingSettings({accountCode:t,environment:o,payload:a}).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}))}function Db(){return qf(["fetch-profile"],(function(){return Sh.getInstance().getProfile().then((function(e){var t=null==e?void 0:e.data;return t&&localStorage.setItem("user",JSON.stringify(t)),t})).catch((function(e){throw e}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function qb(){var e=this;return qf(["get-user-full"],(function(){return t(e,void 0,void 0,(function(){var e,t,o;return n(this,(function(n){switch(n.label){case 0:e=Sh.getInstance(),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,e.getUserFull()];case 2:return t=n.sent(),(o=null==t?void 0:t.data)&&localStorage.setItem("user",JSON.stringify(o.user)),[2,o];case 3:throw n.sent();case 4:return[2]}}))}))}),{keepPreviousData:!0,useErrorBoundary:!1})}function Nb(e,t){return qf(["fetch-permissions",e,t],(function(){var e,t,n,o=localStorage.getItem("account"),a=localStorage.getItem("user"),i=o&&JSON.parse(o),r=a&&JSON.parse(a);return((null==r?void 0:r.merlin)?null===(e=null==r?void 0:r.merlin)||void 0===e?void 0:e.permissions:null===(n=null===(t=null==i?void 0:i.value)||void 0===t?void 0:t.role)||void 0===n?void 0:n.permission_ids.map((function(e){return{permission_name:e,description:e,resource_server_name:e,resource_server_identifier:e}})))||[]}))}function Mb(e){return qf(["email-verification",e],(function(){return Sh.getInstance().emailVerification(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function Fb(){return qf({queryKey:["get-login-methods"],queryFn:function(){return Sh.getInstance().getLoginMethods().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}})}function Ub(){return qf(["fetch-impersonation-users"],(function(){return Sh.getInstance().getImpersonationUsers().then((function(e){var t;return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.result)||[]}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Bb(){return qf(["fetch-impersonation-enabled"],(function(){return Sh.getInstance().getImpersonationEnabled().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Hb(e){var o=this;return qf(["get-users-to-impersonate",e],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getUsersToImpersonate(e).then((function(e){var t;return(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.users)||[]}))]}))}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3,enabled:!!e})}function Wb(e){var t;return qf(["fetch-communications",e],(function(){return Sh.getInstance().getCommunications(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null===(t=e.account_codes)||void 0===t?void 0:t.length),useErrorBoundary:!1,cacheTime:3e3})}function Gb(){return qf(["fetch-communications-filters"],(function(){return Sh.getInstance().getCommunicationsFilters().then((function(e){return null==e?void 0:e.data}))}),{keepPreviousData:!0,useErrorBoundary:!1,cacheTime:3e3})}function Vb(e,t){return qf(["fetch-communication-details",e],(function(){return Sh.getInstance().getCommunicationDetails(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e,useErrorBoundary:!1,cacheTime:0})}function $b(e){return qf(["notifications-customer",e],(function(){return Sh.getInstance().getNotificationsCustomer(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e,keepPreviousData:!1})}function Kb(e){return qf(["validate-opsgenie-key",e],(function(){return Sh.getInstance().getValidateOpsgenieKey(e).then((function(e){return null==e?void 0:e.data})).catch((function(){return{error:!0}}))}),{enabled:!!e,cacheTime:0})}function Qb(){return qf(["notifications-merged"],(function(){return Sh.getInstance().getMergedNotifications().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{keepPreviousData:!1,cacheTime:0})}function Jb(){return Nf((function(e){return Sh.getInstance().getNotificationsNumber(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}))}function Xb(){var e=this;return Nf((function(o){return t(e,void 0,void 0,(function(){var e;return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().pathNotification(o)];case 1:return[2,null==(e=t.sent())?void 0:e.data]}}))}))}))}var Yb={key:"metadata_fields",name:"metadata_fields"};function Zb(){return qf(["reports"],(function(){return Sh.getInstance().reportsList().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function ek(e){return void 0===e&&(e=!0),qf(["reports-multi-env"],(function(){return Sh.getInstance().reportsListMultiEnv().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e})}function tk(e,t,n){return void 0===t&&(t=!1),qf(["reports/".concat(e)],(function(){return Sh.getInstance().downloadReports(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:t,onSuccess:n,useErrorBoundary:!1})}function nk(e){return qf(["GET/reports/templates"],(function(){return Sh.getInstance().getReportTemplates().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e,useErrorBoundary:!1})}function ok(o,a,i){var r=this;return qf(["GET/reports/columns/".concat(a,"/").concat(i)],(function(){return t(r,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getReportColumns(a,i).then((function(t){return a===Hd.ALL&&i===Bd.PAYMENTS?e(e([],null==t?void 0:t.data,!0),[Yb],!1):null==t?void 0:t.data})).catch((function(e){return e}))]}))}))}),{enabled:o,useErrorBoundary:!1})}function ak(e,o){var a=this,i=uv();return qf(["getRefundPdf",e,i,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getRefundPdf(e,i,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))]}))}))}),{enabled:!!e&&!!i,useErrorBoundary:!1})}function ik(){var e=uv();return qf(["teams-filters-members"],(function(){return Sh.getInstance().teamsFiltersMembers({organizationCode:e}).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})}function rk(e){var t=e.organizationCode,n=e.accountCodes,o=e.email,a=e.page,i=e.pageSize,r=uv();return qf(["fetch-post-members-v2",t,n,o,a,i],(function(){return Sh.getInstance().postMembersPaginatedV2({organizationCode:r,accountCodes:n,email:o,page:a,pageSize:i}).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t&&!!n,cacheTime:0,useErrorBoundary:!1})}function sk(){return qf(["fetch-roles"],(function(){return Sh.getInstance().getRoles().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function ck(){return qf(["fetch-rolespermissions"],(function(){return Sh.getInstance().getRolesPermissions().then((function(e){return null==e?void 0:e.data}))}))}function uk(){return qf(["fetch-permissions-catalog"],(function(){return Sh.getInstance().getPermissionsCatalog().then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{useErrorBoundary:!1})}function lk(e){return qf(["data-report",e],(function(){return Sh.getInstance().getSmartRoutingDataReport(e).then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0,useErrorBoundary:!1})}function pk(e,t,n){return void 0===n&&(n=!0),qf(["get-insights-conversion-rate-metrics-v2",e,t],(function(){return Sh.getInstance().getInsightsMetricsConversionRateV2(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:n&&(!!(null==e?void 0:e.currency_code)&&"Empty"!==(null==e?void 0:e.currency_code)&&"string"==typeof(null==e?void 0:e.currency_code)||Array.isArray(null==e?void 0:e.currency_code)&&0===(null==e?void 0:e.currency_code.length)),staleTime:3e5,cacheTime:3e5,useErrorBoundary:!1,retry:1})}function dk(e,t){return qf(["get-insights-conversion-rate-view-more-metrics",t,e],(function(){return Sh.getInstance().getInsightsMetricsConversionRateViewMore(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.enabled)&&!!t,cacheTime:200,useErrorBoundary:!1})}function mk(e){return qf(["get-insights-conversion-rate-fallback-metrics",e],(function(){return Sh.getInstance().getInsightFallbackMetrics(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.enabled),cacheTime:200,useErrorBoundary:!1})}function hk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,qf(["get-insights-volume-metrics",t,e],(function(){return Sh.getInstance().getInsightsMetricsVolume(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function fk(e,t,n,o){return void 0===o&&(o=!0),delete t.account_code,qf(["get-insights-volume-metrics-v2",t,e,n],(function(){return Sh.getInstance().getInsightsMetricsVolumeV2(e,n,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:o,cacheTime:200,useErrorBoundary:!1})}function gk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,qf(["get-insights-total-payment-fraud-metrics",t,e],(function(){return Sh.getInstance().getInsightsMetricsTotalPaymentsAndFraud(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function yk(e,t,n){return void 0===n&&(n=!0),delete t.account_code,qf(["get-insights-customer-payment-fraud-metrics",t,e],(function(){return Sh.getInstance().getInsightsMetricsCustomerPaymentsAndFraud(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:200,useErrorBoundary:!1})}function vk(e){return qf(["get-insights-overview",e],(function(){return Sh.getInstance().getInsightOverview(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.enabled)&&void 0!==e.account_code,cacheTime:200,useErrorBoundary:!1})}function bk(e,t){var n=!!(null==e?void 0:e.enabled)&&void 0!==(null==e?void 0:e.account_code);return qf(["get-insights-overview-v3",e,t],(function(){return Sh.getInstance().getInsightOverviewV3(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:n,cacheTime:0,useErrorBoundary:!1})}function kk(e){return qf(["get-insights-home-metrics",e],(function(){return Sh.getInstance().getInsighstHomeMetrics(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!(null==e?void 0:e.currency_code)&&!!(null==e?void 0:e.account_codes)&&!!(null==e?void 0:e.organization_code)&&(null==e?void 0:e.isLiveMode)&&!!(null==e?void 0:e.timezone),cacheTime:200,useErrorBoundary:!1})}function xk(e){return qf(["get-insights-reports",e],(function(){return Sh.getInstance().getInsightsReport(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!(null==e?void 0:e.type),cacheTime:0,useErrorBoundary:!1})}function wk(e){return qf(["get-insights-reports-again",e],(function(){return Sh.getInstance().getInsightsReportAgain(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!(null==e?void 0:e.code),cacheTime:0,useErrorBoundary:!1})}function jk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-fraud-screening-volume-and-count-tx",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsFraudScreeningVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function _k(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-fraud-screening-conversion-rate",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsFraudScreeningConversionRate(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ek(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-3ds-volume-and-count-tx",o,e],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsights3dsVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ck(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-3ds-conversion-rate-and-evolution",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsights3dsConversionRateAndEvolution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Sk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-3ds-decline-reasons",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsights3dsDeclineReasons(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Rk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-3ds-frictionless-vs-challenge",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsights3dsFrictionlessVsChallenge(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Tk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-volume-and-count-tx",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksVolumeAndCountTx(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ok(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-total-rate-and-evolution",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksTotalRateAndEvolution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ak(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-win-rate",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksWinRate(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Ik(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-disputed",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksDisputed(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function zk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-by-provider-and-card-brand",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksByProviderAndCardBrand(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Lk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-reasons-distribution",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksReasonsDistribution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Pk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-status-distribution",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksStatusDistribution(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function Dk(e,o,a){var i=this;return void 0===a&&(a={enabled:!0}),qf({queryKey:["post-insights-chargebacks-by-card-brand",e,o],queryFn:function(){return t(i,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,Sh.getInstance().getInsightsChargebacksByCardBrand(e,o)];case 1:return[2,t.sent()]}}))}))},enabled:a.enabled&&void 0!==e.account_codes,cacheTime:200,useErrorBoundary:!1})}function qk(e,t){return qf(["fetch-reconciliation-transaction",e],(function(){return Sh.getInstance().getReconciliationTransactions(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!!t,useErrorBoundary:!1})}function Nk(e,t){return qf(["fetch-reconciliation-settlements",e],(function(){return Sh.getInstance().getReconciliationSettlements(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:!!t,useErrorBoundary:!1})}function Mk(e,t){return qf(["fetch-reconciliation-metrics",e],(function(){return Sh.getInstance().getReconciliationMetrics(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!t,cacheTime:500})}function Fk(){return qf(["GET-reconciliation-filters"],(function(){return Sh.getInstance().getReconciliationFilters().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1})}function Uk(e){return qf(["GET/v1/reconciliation/table/".concat(e,"/columns")],(function(){return Sh.getInstance().getAllTableColumns(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Bk(){return qf(["GET/v1/reconciliation/active"],(function(){return Sh.getInstance().getReconciliationActive().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}))}function Hk(e,t,n){return qf(["GET/reconciliation/reports/columns/".concat(t,"/").concat(n)],(function(){return Sh.getInstance().getReconciliationsReportColumns(t,n).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{enabled:e,useErrorBoundary:!1})}function Wk(e){return qf(["GET/reconciliation/reports/templates"],(function(){return Sh.getInstance().getReconciliationReportTemplates().then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){throw e}))}),{enabled:e,useErrorBoundary:!1})}function Gk(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/alerts/list",t,n],(function(){return Sh.getInstance().getReconciliationAlerts(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function Vk(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/agenda/list",t,n],(function(){return Sh.getInstance().getReconciliationAgenda(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function $k(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/agenda/insights",t,n],(function(){return Sh.getInstance().getReconciliationAgendaInsightByKey(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function Kk(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/sales/list",t,n],(function(){return Sh.getInstance().getReconciliationSales(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function Qk(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/advancements/list",t,n],(function(){return Sh.getInstance().getReconciliationAdvancements(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function Jk(e){var t=e.body,n=e.params,o=e.enabled;return qf(["GET/reconciliation/fees/list",t,n],(function(){return Sh.getInstance().getReconciliationFees(t,n).then((function(e){return e.data}))}),{enabled:o,useErrorBoundary:!1})}function Xk(e){var o=this,a=Object.values(e).filter(Boolean);return qf(["feature-flags",a],(function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getFeatureFlagId(e).then((function(e){return null==e?void 0:e.data}))]}))}))}),{enabled:a.length>1,useErrorBoundary:!1})}function Yk(e){var o=this,a=qf({queryKey:["all-feature-flags",Object.values(e).filter(Boolean)],queryFn:function(){return t(o,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getFeatureFlagIdAll({accountCode:e.account_code}).then((function(e){return null==e?void 0:e.data}))]}))}))},enabled:!!e.account_code&&!!e.organization_code&&!!e.email,cacheTime:9e5,useErrorBoundary:!1}),i=Af();return _((function(){i.setQueryData(["cached-feature-flags"],a)}),[a,i]),a}function Zk(e){var t=Af();return qf({queryKey:["cached-feature-flags"],queryFn:function(){},enabled:!1,select:function(t){var n;return{result:null===(n=t.data)||void 0===n?void 0:n[e]}},initialData:function(){var e=t.getQueryData(["cached-feature-flags"]);return(null==e?void 0:e.data)||{}}})}function ex(e){return qf(["events",e],(function(){return Sh.getInstance().getAuditEvents(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e.account_code&&!!e.organizationCode,cacheTime:0,keepPreviousData:!0,useErrorBoundary:!1})}function tx(e){return qf(["audit-monitor-event-detail",e],(function(){return Sh.getInstance().getAuditMonitorDetail(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){throw e}))}),{enabled:null!==e,cacheTime:0,useErrorBoundary:!1})}function nx(e,t){return qf(["fetch-payment-links",e,t],(function(){return Sh.getInstance().getPaymentLinks(e,t).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!t,cacheTime:0})}function ox(e){return qf(["payment-link"],(function(){return Sh.getInstance().getPaymentLinksByCode(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e})}function ax(e){return void 0===e&&(e=!0),qf(["countries",e],(function(){return Sh.getInstance().useGetCountriesConfig().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:e,keepPreviousData:!0})}function ix(e){var t=localStorage.getItem("lang")||"en",n=e||t;return qf(["countries-v2",n],(function(){return Sh.getInstance().useGetCountriesConfigV2(n).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!0,keepPreviousData:!0})}function rx(e){return qf(["timezone"],(function(){return Sh.getInstance().getTimezone(e).then((function(e){return lh(e)?hh:null==e?void 0:e.data})).catch((function(){return hh}))}),{enabled:!0,keepPreviousData:!0})}function sx(e){return Nf((function(e){var t=e.payload;return Sh.getInstance().firebaseUserSubscribe(t)}),{onMutate:function(e){return e},onSuccess:e.onSuccessCallback})}function cx(e,t){return qf(["get-cofig-allow-list",e],(function(){return Sh.getInstance().getConfigAllowlist(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!e&&!!t})}function ux(e){return qf(["get-black-list",e],(function(){return Sh.getInstance().getBlackListType(e).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:!!e})}function lx(e,t,n,o){var a;return qf(["post-black-list",e],(function(){return Sh.getInstance().postBlockList(e,null!=t?t:"",null!=n?n:0,null!=o?o:25).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:(null===(a=e[0])||void 0===a?void 0:a.length)>0&&null!==t,useErrorBoundary:!1})}function px(e,t,n){return qf(["get-block-list-summary",e,t,n],(function(){var o=Sh.getInstance();return n?o.getBlackListSummary(e,t).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e})):Promise.resolve({})}),{enabled:!!e&&!!n})}function dx(e,t,n,o,a,i){return qf(["black-list-detail",e,t,o,a,i],(function(){return Sh.getInstance().getBlacklistDetail(e,t,n,o,a).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{enabled:!!e&&i,cacheTime:0})}function mx(e,t,n){return qf(["allow-list-detail",e],(function(){return Sh.getInstance().getAllowlistDetail(e,t).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{enabled:!!e&&!!n})}function hx(e){return qf(["query-post-get-allowlist-multi-account",JSON.stringify(e)],(function(){return Sh.getInstance().postGetAllowlist({payload:e}).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e}))}),{enabled:!!e,cacheTime:0})}function fx(e,o){var a=this;return void 0===e&&(e=26),void 0===o&&(o=0),qf(["batch-refunds",e,o],(function(){return t(a,void 0,void 0,(function(){return n(this,(function(t){return[2,Sh.getInstance().getBatchRefunds(e,o).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))]}))}))}),{cacheTime:0})}function gx(e){return qf(["velocity-rules",e],(function(){var t=Sh.getInstance();return e?t.getVelocityRules(e).then((function(e){return(null==e?void 0:e.data)||null})).catch((function(e){return e})):Promise.resolve({})}),{enabled:!!e,keepPreviousData:!0})}function yx(){return qf(["config-rules"],(function(){return Sh.getInstance().getAllConfigRules().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0})}function vx(e,t){var n=e.organizationCode;return qf(["mfa-excluded-users",n],(function(){return Sh.getInstance().getMFAExcludedUsers({organizationCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function bx(e,t){var n=e.organizationCode;return qf(["mfa-config",n],(function(){return Sh.getInstance().getMFAConfig({organizationCode:n}).then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function kx(e,t){return qf(["mfa-enforcement-status",e.accountCode],(function(){return Sh.getInstance().getMFAEnforcementStatus().then((function(e){return null==e?void 0:e.data})).catch((function(e){return e}))}),{cacheTime:0,enabled:t})}function xx(e){return qf(["fetch-organization-saml-config",e],(function(){return Sh.getInstance().getSamlConfig().then((function(e){return e.data}))}),{cacheTime:0,enabled:!!e,useErrorBoundary:!1})}function wx(e){return qf(["chartgpt-chart-execute",e],(function(){return Sh.getInstance().executeChartGPTChart(e).then((function(e){return null==e?void 0:e.data}))}),{enabled:!!e})}function jx(){return qf(["chartgpt-user-charts"],(function(){return Sh.getInstance().getChartsByUser().then((function(e){return null==e?void 0:e.data}))}),{cacheTime:0})}function _x(){var e=this;return qf(["chartgpt-user-charts-with-results"],(function(){return t(e,void 0,void 0,(function(){var e,o,i,r=this;return n(this,(function(s){switch(s.label){case 0:return[4,(e=Sh.getInstance()).getChartsByUser()];case 1:return o=s.sent(),i=(null==o?void 0:o.data)||[],[4,Promise.all(i.map((function(o){return t(r,void 0,void 0,(function(){var t,i,r,s,c,u,l,p;return n(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,e.executeChartGPTChart(o.chart_id)];case 1:return t=n.sent(),[2,a(a({},o),{user_prompt:null!==(s=null===(r=null==t?void 0:t.data)||void 0===r?void 0:r.user_prompt)&&void 0!==s?s:o.user_prompt,unit_to_display:null!==(u=null===(c=null==t?void 0:t.data)||void 0===c?void 0:c.unit_to_display)&&void 0!==u?u:o.unit_to_display,results:null!==(p=null===(l=null==t?void 0:t.data)||void 0===l?void 0:l.results)&&void 0!==p?p:[]})];case 2:return i=n.sent(),console.error("Failed to execute chart ".concat(o.chart_id,":"),i),[2,a(a({},o),{results:[]})];case 3:return[2]}}))}))})))];case 2:return[2,s.sent()]}}))}))}))}function Ex(e,o,a){var i=this;return void 0===a&&(a=!0),qf(["chartgpt-patch-and-execute",e,o],(function(){return t(i,void 0,void 0,(function(){var t,a,i,r,s;return n(this,(function(n){switch(n.label){case 0:return[4,(t=Sh.getInstance()).patchChartGPTChart(e,o)];case 1:return a=n.sent(),i=null==a?void 0:a.data,[4,t.executeChartGPTChart(e)];case 2:return r=n.sent(),s=null==r?void 0:r.data,[2,{chart:i,execution:s}]}}))}))}),{enabled:a&&!!e,retry:!1})}function Cx(){return qf(["languages"],(function(){return Sh.getInstance().getLanguages().then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:300})}function Sx(){var e=localStorage.getItem("lang")||"en";return qf(["translations",e],(function(){return Sh.getInstance().getTranslations(e).then((function(e){return null==e?void 0:e.data}))}),{useErrorBoundary:!1,cacheTime:3e4})}function Rx(){return Rx=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},Rx.apply(this,arguments)}
224
224
  /**
225
225
  * match-sorter-utils
226
226
  *