@bigbinary/neeto-payments-frontend 1.2.2 → 1.2.4
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.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +8 -3
- package/src/translations/en.json +191 -0
- package/src/translations/index.js +3 -0
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e,{createContext as t,useContext as n,useState as r,useRef as o,useEffect as a,useMemo as i,useTransition as s}from"react";import{withTitle as l}from"@bigbinary/neeto-commons-frontend/react-utils";import{buildFiltersFromURL as c,Bar as u}from"@bigbinary/neeto-filters-frontend";import p from"@bigbinary/neeto-molecules/Header";import f from"@bigbinary/neeto-molecules/SubHeader";import{Toastr as d,Tooltip as y,Tag as g,Button as m,Typography as h,Modal as v,Table as b,Pane as O,NoData as w,Tab as S,Spinner as P,Alert as x}from"@bigbinary/neetoui";import{QueryClient as k,QueryCache as j,QueryClientProvider as E,useMutation as N,useQuery as A}from"react-query";import{ReactQueryDevtools as R}from"react-query/devtools";import{DEFAULT_STALE_TIME as C,DEFAULT_PAGE_INDEX as I}from"@bigbinary/neeto-commons-frontend/constants";import{Download as L,Down as D,Right as T}from"@bigbinary/neeto-icons";import F from"axios";import{noop as B,isPresent as _,filterBy as M,camelToSnakeCase as U,isNotPresent as z}from"@bigbinary/neeto-commons-frontend/pure";import{createSubscription as H}from"@bigbinary/neeto-commons-frontend/utils";import{curry as q,equals as V,evolve as K,concat as W,map as G,prop as J,isEmpty as $,assoc as Y}from"ramda";import Q from"@bigbinary/neeto-molecules/CopyToClipboardButton";import Z from"@bigbinary/neeto-molecules/DateFormat";import{useLocation as X,useHistory as ee}from"react-router-dom";import te from"@bigbinary/neeto-molecules/PageLoader";import ne from"@bigbinary/neeto-molecules/TableWrapper";import re from"util";import oe from"classnames";import{globalProps as ae}from"@bigbinary/neeto-commons-frontend/initializers";function ie(e){return ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ie(e)}function se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function le(e){var t=function(e,t){if("object"!==ie(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ie(t)?t:String(t)}function ce(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,le(r.key),r)}}function ue(e,t,n){return t&&ce(e.prototype,t),n&&ce(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function fe(e,t){return fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},fe(e,t)}function de(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fe(e,t)}function ye(e,t){if(t&&("object"===ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return pe(e)}function ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ge(e)}function me(e,t,n){return(t=le(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function he(e){if(Array.isArray(e))return e}function ve(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function be(e,t){if(e){if("string"==typeof e)return ve(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ve(e,t):void 0}}function Oe(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function we(e){return he(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||be(e)||Oe()}function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Pe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xe={type:"logger",log:function(e){this.output("log",e)},warn:function(e){this.output("warn",e)},error:function(e){this.output("error",e)},output:function(e,t){console&&console[e]&&console[e].apply(console,t)}},ke=new(function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};se(this,e),this.init(t,n)}return ue(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||xe,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}},{key:"warn",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}},{key:"error",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}},{key:"deprecate",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(e,t,n,r){return r&&!this.debug?null:("string"==typeof e[0]&&(e[0]="".concat(n).concat(this.prefix," ").concat(e[0])),this.logger[t](e))}},{key:"create",value:function(t){return new e(this.logger,Pe(Pe({},{prefix:"".concat(this.prefix,":").concat(t,":")}),this.options))}},{key:"clone",value:function(t){return(t=t||this.options).prefix=t.prefix||this.prefix,new e(this.logger,t)}}]),e}()),je=function(){function e(){se(this,e),this.observers={}}return ue(e,[{key:"on",value:function(e,t){var n=this;return e.split(" ").forEach((function(e){n.observers[e]=n.observers[e]||[],n.observers[e].push(t)})),this}},{key:"off",value:function(e,t){this.observers[e]&&(t?this.observers[e]=this.observers[e].filter((function(e){return e!==t})):delete this.observers[e])}},{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.observers[e]&&[].concat(this.observers[e]).forEach((function(e){e.apply(void 0,n)}));this.observers["*"]&&[].concat(this.observers["*"]).forEach((function(t){t.apply(t,[e].concat(n))}))}}]),e}();function Ee(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}function Ne(e){return null==e?"":""+e}function Ae(e,t,n){function r(e){return e&&e.indexOf("###")>-1?e.replace(/###/g,"."):e}function o(){return!e||"string"==typeof e}for(var a="string"!=typeof t?[].concat(t):t.split(".");a.length>1;){if(o())return{};var i=r(a.shift());!e[i]&&n&&(e[i]=new n),e=Object.prototype.hasOwnProperty.call(e,i)?e[i]:{}}return o()?{}:{obj:e,k:r(a.shift())}}function Re(e,t,n){var r=Ae(e,t,Object);r.obj[r.k]=n}function Ce(e,t){var n=Ae(e,t),r=n.obj,o=n.k;if(r)return r[o]}function Ie(e,t,n){var r=Ce(e,n);return void 0!==r?r:Ce(t,n)}function Le(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):Le(e[r],t[r],n):e[r]=t[r]);return e}function De(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Te={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Fe(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return Te[e]})):e}var Be="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,_e=[" ",",","?","!",";"];function Me(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Me(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Me(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ze(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ge(e);if(t){var o=ge(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ye(this,n)}}function He(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,a=0;a<r.length;++a){if(!o)return;if("string"==typeof o[r[a]]&&a+1<r.length)return;if(void 0===o[r[a]]){for(var i=2,s=r.slice(a,a+i).join(n),l=o[s];void 0===l&&r.length>a+i;)i++,l=o[s=r.slice(a,a+i).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(s)){if("string"==typeof l)return l;if(s&&"string"==typeof l[s])return l[s]}var c=r.slice(a+i).join(n);return c?He(l,c,n):void 0}o=o[r[a]]}return o}}var qe=function(e){de(n,je);var t=ze(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return se(this,n),r=t.call(this),Be&&je.call(pe(r)),r.data=e||{},r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return ue(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,a=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,i=[e,t];n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split("."));var s=Ce(this.data,i);return s||!a||"string"!=typeof n?s:He(this.data&&this.data[e]&&this.data[e][t],n,o)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},a=this.options.keySeparator;void 0===a&&(a=".");var i=[e,t];n&&(i=i.concat(a?n.split(a):n)),e.indexOf(".")>-1&&(r=t,t=(i=e.split("."))[1]),this.addNamespaces(t),Re(this.data,i,r),o.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var o in n)"string"!=typeof n[o]&&"[object Array]"!==Object.prototype.toString.apply(n[o])||this.addResource(e,t,o,n[o],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},i=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(i=e.split("."))[1]),this.addNamespaces(t);var s=Ce(this.data,i)||{};r?Le(s,n,o):s=Ue(Ue({},s),n),Re(this.data,i,s),a.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?Ue(Ue({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(),Ve={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,o){var a=this;return e.forEach((function(e){a.processors[e]&&(t=a.processors[e].process(t,n,r,o))})),t}};function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ge(e);if(t){var o=ge(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ye(this,n)}}var Je={},$e=function(e){de(n,je);var t=Ge(n);function n(e){var r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return se(this,n),r=t.call(this),Be&&je.call(pe(r)),function(e,t,n){e.forEach((function(e){t[e]&&(n[e]=t[e])}))}(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,pe(r)),r.options=o,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=ke.create("translator"),r}return ue(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,o=t.ns||this.options.defaultNS||[],a=n&&e.indexOf(n)>-1,i=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=_e.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var o=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),a=!o.test(e);if(!a){var i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}(e,n,r));if(a&&!i){var s=e.match(this.interpolator.nestingRegexp);if(s&&s.length>0)return{key:e,namespaces:o};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(o=l.shift()),e=l.join(r)}return"string"==typeof o&&(o=[o]),{key:e,namespaces:o}}},{key:"translate",value:function(e,t,r){var o=this;if("object"!==ie(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var a=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,i=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,s=this.extractFromKey(e[e.length-1],t),l=s.key,c=s.namespaces,u=c[c.length-1],p=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(p&&"cimode"===p.toLowerCase()){if(f){var d=t.nsSeparator||this.options.nsSeparator;return a?{res:"".concat(u).concat(d).concat(l),usedKey:l,exactUsedKey:l,usedLng:p,usedNS:u}:"".concat(u).concat(d).concat(l)}return a?{res:l,usedKey:l,exactUsedKey:l,usedLng:p,usedNS:u}:l}var y=this.resolve(e,t),g=y&&y.res,m=y&&y.usedKey||l,h=y&&y.exactUsedKey||l,v=Object.prototype.toString.apply(g),b=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,O=!this.i18nFormat||this.i18nFormat.handleAsObject;if(O&&g&&("string"!=typeof g&&"boolean"!=typeof g&&"number"!=typeof g)&&["[object Number]","[object Function]","[object RegExp]"].indexOf(v)<0&&("string"!=typeof b||"[object Array]"!==v)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,g,We(We({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return a?(y.res=w,y):w}if(i){var S="[object Array]"===v,P=S?[]:{},x=S?h:m;for(var k in g)if(Object.prototype.hasOwnProperty.call(g,k)){var j="".concat(x).concat(i).concat(k);P[k]=this.translate(j,We(We({},t),{joinArrays:!1,ns:c})),P[k]===j&&(P[k]=g[k])}g=P}}else if(O&&"string"==typeof b&&"[object Array]"===v)(g=g.join(b))&&(g=this.extendTranslation(g,e,t,r));else{var E=!1,N=!1,A=void 0!==t.count&&"string"!=typeof t.count,R=n.hasDefaultValue(t),C=A?this.pluralResolver.getSuffix(p,t.count,t):"",I=t["defaultValue".concat(C)]||t.defaultValue;!this.isValidLookup(g)&&R&&(E=!0,g=I),this.isValidLookup(g)||(N=!0,g=l);var L=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&N?void 0:g,D=R&&I!==g&&this.options.updateMissing;if(N||E||D){if(this.logger.log(D?"updateKey":"missingKey",p,u,l,D?I:g),i){var T=this.resolve(l,We(We({},t),{},{keySeparator:!1}));T&&T.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var F=[],B=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&B&&B[0])for(var _=0;_<B.length;_++)F.push(B[_]);else"all"===this.options.saveMissingTo?F=this.languageUtils.toResolveHierarchy(t.lng||this.language):F.push(t.lng||this.language);var M=function(e,n,r){var a=R&&r!==g?r:L;o.options.missingKeyHandler?o.options.missingKeyHandler(e,u,n,a,D,t):o.backendConnector&&o.backendConnector.saveMissing&&o.backendConnector.saveMissing(e,u,n,a,D,t),o.emit("missingKey",e,u,n,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?F.forEach((function(e){o.pluralResolver.getSuffixes(e,t).forEach((function(n){M([e],l+n,t["defaultValue".concat(n)]||I)}))})):M(F,l,I))}g=this.extendTranslation(g,e,t,y,r),N&&g===l&&this.options.appendNamespaceToMissingKey&&(g="".concat(u,":").concat(l)),(N||E)&&this.options.parseMissingKeyHandler&&(g="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(u,":").concat(l):l,E?g:void 0):this.options.parseMissingKeyHandler(g))}return a?(y.res=g,y):g}},{key:"extendTranslation",value:function(e,t,n,r,o){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,We(We({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(We(We({},n),{interpolation:We(We({},this.options.interpolation),n.interpolation)}));var i,s="string"==typeof e&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(s){var l=e.match(this.interpolator.nestingRegexp);i=l&&l.length}var c=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(c=We(We({},this.options.interpolation.defaultVariables),c)),e=this.interpolator.interpolate(e,c,n.lng||this.language,n),s){var u=e.match(this.interpolator.nestingRegexp);i<(u&&u.length)&&(n.nest=!1)}!1!==n.nest&&(e=this.interpolator.nest(e,(function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return o&&o[0]===r[0]&&!n.context?(a.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(t[0])),null):a.translate.apply(a,r.concat([t]))}),n)),n.interpolation&&this.interpolator.reset()}var p=n.postProcess||this.options.postProcess,f="string"==typeof p?[p]:p;return null!=e&&f&&f.length&&!1!==n.applyPostProcessor&&(e=Ve.handle(f,e,t,this.options&&this.options.postProcessPassResolved?We({i18nResolved:r},n):n,this)),e}},{key:"resolve",value:function(e){var t,n,r,o,a,i=this,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!i.isValidLookup(t)){var l=i.extractFromKey(e,s),c=l.key;n=c;var u=l.namespaces;i.options.fallbackNS&&(u=u.concat(i.options.fallbackNS));var p=void 0!==s.count&&"string"!=typeof s.count,f=p&&!s.ordinal&&0===s.count&&i.pluralResolver.shouldUseIntlApi(),d=void 0!==s.context&&("string"==typeof s.context||"number"==typeof s.context)&&""!==s.context,y=s.lngs?s.lngs:i.languageUtils.toResolveHierarchy(s.lng||i.language,s.fallbackLng);u.forEach((function(e){i.isValidLookup(t)||(a=e,!Je["".concat(y[0],"-").concat(e)]&&i.utils&&i.utils.hasLoadedNamespace&&!i.utils.hasLoadedNamespace(a)&&(Je["".concat(y[0],"-").concat(e)]=!0,i.logger.warn('key "'.concat(n,'" for languages "').concat(y.join(", "),'" won\'t get resolved as namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),y.forEach((function(n){if(!i.isValidLookup(t)){o=n;var a,l=[c];if(i.i18nFormat&&i.i18nFormat.addLookupKeys)i.i18nFormat.addLookupKeys(l,c,n,e,s);else{var u;p&&(u=i.pluralResolver.getSuffix(n,s.count,s));var y="".concat(i.options.pluralSeparator,"zero");if(p&&(l.push(c+u),f&&l.push(c+y)),d){var g="".concat(c).concat(i.options.contextSeparator).concat(s.context);l.push(g),p&&(l.push(g+u),f&&l.push(g+y))}}for(;a=l.pop();)i.isValidLookup(t)||(r=a,t=i.getResource(n,e,a,s))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:o,usedNS:a}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){var t="defaultValue";for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}]),n}();function Ye(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Qe=function(){function e(t){se(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ke.create("languageUtils")}return ue(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Ye(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Ye(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Ye(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){if(0===e.indexOf(r))return e}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),o=[],a=function(e){e&&(n.isSupportedCode(e)?o.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):"string"==typeof e&&a(this.formatLanguageCode(e)),r.forEach((function(e){o.indexOf(e)<0&&a(n.formatLanguageCode(e))})),o}}]),e}(),Ze=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Xe={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},et=["v1","v2","v3"],tt={zero:0,one:1,two:2,few:3,many:4,other:5};var nt=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};se(this,e),this.languageUtils=t,this.options=r,this.logger=ke.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=(n={},Ze.forEach((function(e){e.lngs.forEach((function(t){n[t]={numbers:e.nr,plurals:Xe[e.fc]}}))})),n)}return ue(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return tt[e]-tt[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),o=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===o?o="plural":1===o&&(o=""));var a=function(){return n.options.prepend&&o.toString()?n.options.prepend+o.toString():o.toString()};return"v1"===this.options.compatibilityJSON?1===o?"":"number"==typeof o?"_plural_".concat(o.toString()):a():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!et.includes(this.options.compatibilityJSON)}}]),e}();function rt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?rt(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var at=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};se(this,e),this.logger=ke.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return ue(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:Fe,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?De(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?De(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?De(t.nestingPrefix):t.nestingPrefixEscaped||De("$t("),this.nestingSuffix=t.nestingSuffix?De(t.nestingSuffix):t.nestingSuffixEscaped||De(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var o,a,i,s=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(s.formatSeparator)<0){var o=Ie(t,l,e);return s.alwaysFormat?s.format(o,void 0,n,ot(ot(ot({},r),t),{},{interpolationkey:e})):o}var a=e.split(s.formatSeparator),i=a.shift().trim(),c=a.join(s.formatSeparator).trim();return s.format(Ie(t,l,i),c,n,ot(ot(ot({},r),t),{},{interpolationkey:i}))};this.resetRegExp();var p=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return s.escapeValue?c(s.escape(e)):c(e)}}].forEach((function(t){for(i=0;o=t.regex.exec(e);){var n=o[1].trim();if(void 0===(a=u(n)))if("function"==typeof p){var l=p(e,o,r);a="string"==typeof l?l:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a="";else{if(f){a=o[0];continue}s.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),a=""}else"string"==typeof a||s.useRawValueToEscape||(a=Ne(a));var c=t.safeValue(a);if(e=e.replace(o[0],c),f?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=o[0].length):t.regex.lastIndex=0,++i>=s.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,o,a=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function s(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),a="{".concat(r[1]);e=r[0];var i=(a=this.interpolate(a,o)).match(/'/g),s=a.match(/"/g);(i&&i.length%2==0&&!s||s.length%2!=0)&&(a=a.replace(/'/g,'"'));try{o=JSON.parse(a),t&&(o=ot(ot({},t),o))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(a)}return delete o.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){var l=[];(o=(o=ot({},i)).replace&&"string"!=typeof o.replace?o.replace:o).applyPostProcessor=!1,delete o.defaultValue;var c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=t(s.call(this,n[1].trim(),o),o))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=Ne(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce((function(e,t){return a.format(e,t,i.lng,ot(ot({},i),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function it(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function st(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?it(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function lt(e){var t={};return function(n,r,o){var a=r+JSON.stringify(o),i=t[a];return i||(i=e(r,o),t[a]=i),i(n)}}var ct=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};se(this,e),this.logger=ke.create("formatter"),this.options=t,this.formats={number:lt((function(e,t){var n=new Intl.NumberFormat(e,st({},t));return function(e){return n.format(e)}})),currency:lt((function(e,t){var n=new Intl.NumberFormat(e,st(st({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:lt((function(e,t){var n=new Intl.DateTimeFormat(e,st({},t));return function(e){return n.format(e)}})),relativetime:lt((function(e,t){var n=new Intl.RelativeTimeFormat(e,st({},t));return function(e){return n.format(e,t.range||"day")}})),list:lt((function(e,t){var n=new Intl.ListFormat(e,st({},t));return function(e){return n.format(e)}}))},this.init(t)}return ue(e,[{key:"init",value:function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=lt(t)}},{key:"format",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=t.split(this.formatSeparator).reduce((function(e,t){var a=function(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);"currency"===t&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):"relativetime"===t&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach((function(e){if(e){var t=we(e.split(":")),r=t[0],o=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=o),"false"===o&&(n[r.trim()]=!1),"true"===o&&(n[r.trim()]=!0),isNaN(o)||(n[r.trim()]=parseInt(o,10))}}))}return{formatName:t,formatOptions:n}}(t),i=a.formatName,s=a.formatOptions;if(r.formats[i]){var l=e;try{var c=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},u=c.locale||c.lng||o.locale||o.lng||n;l=r.formats[i](e,u,st(st(st({},s),o),c))}catch(e){r.logger.warn(e)}return l}return r.logger.warn("there was no format function for ".concat(i)),e}),e);return a}}]),e}();function ut(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ut(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ut(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ft(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ge(e);if(t){var o=ge(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ye(this,n)}}var dt=function(e){de(n,je);var t=ft(n);function n(e,r,o){var a,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return se(this,n),a=t.call(this),Be&&je.call(pe(a)),a.backend=e,a.store=r,a.services=o,a.languageUtils=o.languageUtils,a.options=i,a.logger=ke.create("backendConnector"),a.waitingReads=[],a.maxParallelReads=i.maxParallelReads||10,a.readingCalls=0,a.maxRetries=i.maxRetries>=0?i.maxRetries:5,a.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,a.state={},a.queue=[],a.backend&&a.backend.init&&a.backend.init(o,i.backend,i),a}return ue(n,[{key:"queueLoad",value:function(e,t,n,r){var o=this,a={},i={},s={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var s="".concat(e,"|").concat(t);!n.reload&&o.store.hasResourceBundle(e,t)?o.state[s]=2:o.state[s]<0||(1===o.state[s]?void 0===i[s]&&(i[s]=!0):(o.state[s]=1,r=!1,void 0===i[s]&&(i[s]=!0),void 0===a[s]&&(a[s]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(s[e]=!0)})),(Object.keys(a).length||Object.keys(i).length)&&this.queue.push({pending:i,pendingCount:Object.keys(i).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(i),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),o=r[0],a=r[1];t&&this.emit("failedLoading",o,a,t),n&&this.store.addResourceBundle(o,a,n),this.state[e]=t?-1:2;var i={};this.queue.forEach((function(n){!function(e,t,n,r){var o=Ae(e,t,Object),a=o.obj,i=o.k;a[i]=a[i]||[],r&&(a[i]=a[i].concat(n)),r||a[i].push(n)}(n.loaded,[o],a),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){i[e]||(i[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===i[e][t]&&(i[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",i),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,i=arguments.length>5?arguments[5]:void 0;if(!e.length)return i(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:o,wait:a,callback:i});else{this.readingCalls++;var s=function(s,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}s&&l&&o<r.maxRetries?setTimeout((function(){r.read.call(r,e,t,n,o+1,2*a,i)}),a):i(s,l)},l=this.backend[n].bind(this.backend);if(2!==l.length)return l(e,t,s);try{var c=l(e,t);c&&"function"==typeof c.then?c.then((function(e){return s(null,e)})).catch(s):s(null,c)}catch(e){s(e)}}}},{key:"prepareLoading",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),o&&o();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var a=this.queueLoad(e,t,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(function(r,i){r&&t.logger.warn("".concat(n,"loading namespace ").concat(a," for language ").concat(o," failed"),r),!r&&i&&t.logger.log("".concat(n,"loaded namespace ").concat(a," for language ").concat(o),i),t.loaded(e,r,i)}))}},{key:"saveMissing",value:function(e,t,n,r,o){var a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},i=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){var s=pt(pt({},a),{},{isUpdate:o}),l=this.backend.create.bind(this.backend);if(l.length<6)try{var c;(c=5===l.length?l(e,t,n,r,s):l(e,t,n,r))&&"function"==typeof c.then?c.then((function(e){return i(null,e)})).catch(i):i(null,c)}catch(e){i(e)}else l(e,t,n,r,i,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}]),n}();function yt(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===ie(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===ie(e[2])||"object"===ie(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function gt(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ht(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?mt(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function vt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ge(e);if(t){var o=ge(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ye(this,n)}}function bt(){}var Ot=function(e){de(n,je);var t=vt(n);function n(){var e,r,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(se(this,n),e=t.call(this),Be&&je.call(pe(e)),e.options=gt(o),e.services={},e.logger=ke,e.modules={external:[]},r=pe(e),Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((function(e){"function"==typeof r[e]&&(r[e]=r[e].bind(r))})),a&&!e.isInitialized&&!o.isClone){if(!e.options.initImmediate)return e.init(o,a),ye(e,pe(e));setTimeout((function(){e.init(o,a)}),0)}return e}return ue(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=yt();function o(e){return e?"function"==typeof e?new e:e:null}if(this.options=ht(ht(ht({},r),this.options),gt(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ht(ht({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var a;this.modules.logger?ke.init(o(this.modules.logger),this.options):ke.init(null,this.options),this.modules.formatter?a=this.modules.formatter:"undefined"!=typeof Intl&&(a=ct);var i=new Qe(this.options);this.store=new qe(this.options.resources,this.options);var s=this.services;s.logger=ke,s.resourceStore=this.store,s.languageUtils=i,s.pluralResolver=new nt(i,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!a||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(s.formatter=o(a),s.formatter.init(s,this.options),this.options.interpolation.format=s.formatter.format.bind(s.formatter)),s.interpolator=new at(this.options),s.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},s.backendConnector=new dt(o(this.modules.backend),s.resourceStore,s,this.options),s.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.languageDetector&&(s.languageDetector=o(this.modules.languageDetector),s.languageDetector.init&&s.languageDetector.init(s,this.options.detection,this.options)),this.modules.i18nFormat&&(s.i18nFormat=o(this.modules.i18nFormat),s.i18nFormat.init&&s.i18nFormat.init(this)),this.translator=new $e(this.services,this.options),this.translator.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];e.emit.apply(e,[t].concat(r))})),this.modules.external.forEach((function(t){t.init&&t.init(e)}))}if(this.format=this.options.interpolation.format,n||(n=bt),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var l=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);l.length>0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var c=Ee(),u=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),c.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),c}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bt,r="string"==typeof e?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&"cimode"===r.toLowerCase())return n();var o=[],a=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(r)a(r);else this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((function(e){return a(e)}));this.options.preload&&this.options.preload.forEach((function(e){return a(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),n(e)}))}else n(null)}},{key:"reloadResources",value:function(e,t,n){var r=Ee();return e||(e=this.languages),t||(t=this.options.ns),n||(n=bt),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&Ve.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t<this.languages.length;t++){var n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=Ee();this.emit("languageChanging",e);var o=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},a=function(a){e||a||!n.services.languageDetector||(a=[]);var i="string"==typeof a?a:n.services.languageUtils.getBestMatchFromCodes(a);i&&(n.language||o(i),n.translator.language||n.translator.changeLanguage(i),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage&&n.services.languageDetector.cacheUserLanguage(i)),n.loadResources(i,(function(e){!function(e,a){a?(o(a),n.translator.changeLanguage(a),n.isLanguageChangingTo=void 0,n.emit("languageChanged",a),n.logger.log("languageChanged",a)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,i)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e):a(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,o=function e(t,o){var a;if("object"!==ie(o)){for(var i=arguments.length,s=new Array(i>2?i-2:0),l=2;l<i;l++)s[l-2]=arguments[l];a=r.options.overloadTranslationOptionHandler([t,o].concat(s))}else a=ht({},o);a.lng=a.lng||e.lng,a.lngs=a.lngs||e.lngs,a.ns=a.ns||e.ns,a.keyPrefix=a.keyPrefix||n||e.keyPrefix;var c,u=r.options.keySeparator||".";return c=a.keyPrefix&&Array.isArray(t)?t.map((function(e){return"".concat(a.keyPrefix).concat(u).concat(e)})):a.keyPrefix?"".concat(a.keyPrefix).concat(u).concat(t):t,r.t(c,a)};return"string"==typeof e?o.lng=e:o.lngs=e,o.ns=t,o.keyPrefix=n,o}},{key:"t",value:function(){var e;return this.translator&&(e=this.translator).translate.apply(e,arguments)}},{key:"exists",value:function(){var e;return this.translator&&(e=this.translator).exists.apply(e,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"hasLoadedNamespace",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],o=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var i=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var s=n.precheck(this,i);if(void 0!==s)return s}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!i(r,e)||o&&!i(a,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=Ee();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=Ee();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],o=e.filter((function(e){return r.indexOf(e)<0}));return o.length?(this.options.preload=r.concat(o),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";var t=this.services&&this.services.languageUtils||new Qe(yt());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:bt,o=ht(ht(ht({},this.options),t),{isClone:!0}),a=new n(o);void 0===t.debug&&void 0===t.prefix||(a.logger=a.logger.clone(t));return["store","services","language"].forEach((function(t){a[t]=e[t]})),a.services=ht({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new $e(a.services,a.options),a.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.emit.apply(a,[e].concat(n))})),a.init(o,r),a.translator.options=a.options,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}();me(Ot,"createInstance",(function(){return new Ot(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1?arguments[1]:void 0)}));var wt=Ot.createInstance();wt.createInstance=Ot.createInstance,wt.createInstance,wt.dir,wt.init,wt.loadResources,wt.reloadResources,wt.use,wt.changeLanguage,wt.getFixedT;var St=wt.t;function Pt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function xt(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];"string"==typeof n[0]&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}wt.exists,wt.setDefaultNamespace,wt.hasLoadedNamespace,wt.loadNamespaces,wt.loadLanguages;var kt={};function jt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];"string"==typeof t[0]&&kt[t[0]]||("string"==typeof t[0]&&(kt[t[0]]=new Date),xt.apply(void 0,t))}function Et(e,t,n){e.loadNamespaces(t,(function(){if(e.isInitialized)n();else{e.on("initialized",(function t(){setTimeout((function(){e.off("initialized",t)}),0),n()}))}}))}var Nt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,At={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Rt=function(e){return At[e]};function Ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function It(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ct(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Lt,Dt={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:function(e){return e.replace(Nt,Rt)}};var Tt={type:"3rdParty",init:function(e){!function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Dt=It(It({},Dt),e)}(e.options.react),function(e){Lt=e}(e)}},Ft=t(),Bt=function(){function e(){se(this,e),this.usedNamespaces={}}return ue(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function _t(e,t){return he(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}(e,t)||be(e,t)||Oe()}function Mt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mt(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var zt=function(e,t){var n=o();return a((function(){n.current=t?n.current:e}),[e,t]),n.current};function Ht(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t.i18n,s=n(Ft)||{},l=s.i18n,c=s.defaultNS,u=i||l||Lt;if(u&&!u.reportNamespaces&&(u.reportNamespaces=new Bt),!u){jt("You will need to pass in an i18next instance by using initReactI18next");var p=function(e,t){return"string"==typeof t?t:t&&"object"===ie(t)&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e},f=[p,{},!1];return f.t=p,f.i18n={},f.ready=!1,f}u.options.react&&void 0!==u.options.react.wait&&jt("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var d=Ut(Ut(Ut({},Dt),u.options.react),t),y=d.useSuspense,g=d.keyPrefix,m=e||c||u.options&&u.options.defaultNS;m="string"==typeof m?[m]:m||["translation"],u.reportNamespaces.addUsedNamespaces&&u.reportNamespaces.addUsedNamespaces(m);var h=(u.isInitialized||u.initializedStoreOnce)&&m.every((function(e){return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.languages&&t.languages.length?void 0!==t.options.ignoreJSONStructure?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],o=!!t.options&&t.options.fallbackLng,a=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var i=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e)||!t.hasResourceBundle(r,e)&&t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages)&&(!i(r,e)||o&&!i(a,e)))}(e,t,n):(jt("i18n.languages were undefined or empty",t.languages),!0)}(e,u,d)}));function v(){return u.getFixedT(null,"fallback"===d.nsMode?m:m[0],g)}var b=_t(r(v),2),O=b[0],w=b[1],S=m.join(),P=zt(S),x=o(!0);a((function(){var e=d.bindI18n,t=d.bindI18nStore;function n(){x.current&&w(v)}return x.current=!0,h||y||Et(u,m,(function(){x.current&&w(v)})),h&&P&&P!==S&&x.current&&w(v),e&&u&&u.on(e,n),t&&u&&u.store.on(t,n),function(){x.current=!1,e&&u&&e.split(" ").forEach((function(e){return u.off(e,n)})),t&&u&&t.split(" ").forEach((function(e){return u.store.off(e,n)}))}}),[u,S]);var k=o(!0);a((function(){x.current&&!k.current&&w(v),k.current=!1}),[u,g]);var j=[O,u,h];if(j.t=O,j.i18n=u,j.ready=h,h)return j;if(!h&&!y)return j;throw new Promise((function(e){Et(u,m,(function(){e()}))}))}var qt={common:{payments:"Payments",id:"ID",identifier:"Identifier",amount:"Amount",status:"Status",paymentTime:"Payment time",all:"All",pending:"Pending",successful:"Successful",declined:"Declined",refunded:"Refunded",cancelled:"Cancelled",kind:"Kind",refundAmount:"Refund amount",refundTime:"Refund time",splits:"Splits",platformTransaction:"Platform transaction",connectedTransaction:"Connected transaction",transferTime:"Transfer time",paymentIdentifier:"Payment identifier",notAvailable:"-",rejected:"Rejected",squarePayments:"Square Payments",completed:"Completed",failed:"Failed",accountIdentifier:"Destination Account Identifier",download:"Download",export:"Export",cancel:"Cancel",paymentAmount:"Payment amount"},alert:{stripe:{connectRestrictionTitle:"Already connected to Stripe split payment",connectRestrictionMessage:"You have already integrated Stripe split payment. Please disconnect from Stripe split payment to connect with Stripe standard payment"},stripePlatform:{connectRestrictionTitle:"Already connected to Stripe standard payment",connectRestrictionMessage:"You have already integrated Stripe standard payment. Please disconnect from Stripe standard payment to connect with Stripe split payment"}},title:{connected:"Payments",platform:"Platform payments",split:"Split payments",transfer:"Transfer payments",refund:"Refunds",squarePayment:"Square payments",squareRefund:"Square refunds"},emptyState:{payment:"There are no payments to show.",refund:"There are no refunds to show."},tagLabels:{refund:{full:"refunded",partial:"partially refunded",successful:"successfully refunded",pending:"refund pending",requires_action:"requires action",failed:"refund failed",canceled:"refund canceled",initiated:"refund initiated",completed:"refund completed",rejected:"refund rejected"},transaction:{connected:"standard",transfer:"split",declined:"declined",successful:"successful",refunded:"refunded",pending:"pending",initiated:"initiated"},payment:{completed:"completed",failed:"failed"},split:{successful:"successful",pending:"pending",cancelled:"cancelled",initiated:"initiated"}},tooltipContent:{identifierUnavailable:"Identifier will be available once splitting is completed successfully",dateUnavailable:"Payment time will be shown once splitting is completed successfully",connectedTransactionUnavailable:"Connected transaction is available once splitting is completed successfully",transaction:{successful:"The payment is complete",declined:"This payment failed because the issuing bank declined it",initiated:"The customer has not entered their payment method.",pending:"Transaction has been authorized, but the funds have not been captured yet",refunded:"Transaction has been refunded"},refund:{successful:"The refund has been successfully processed",pending:"Refund request has been initiated but is still being processed by the payment provider",failed:"The refund process has failed",requires_action:"The process requires further action from the customer to complete",canceled:"The refund process has been canceled",initiated:"The refund request hasn't yet been submitted to the bank for processing",completed:"The refund has been successfully processed",rejected:"The refund request has been rejected by the bank"},split:{successful:"Successful split",pending:"Pending split",cancelled:"The split transaction is cancelled"},payment:{completed:"The payment is complete",failed:"The payment process has failed"}},transactionPane:{transactionId:"Transaction ID:",amount:"Amount:",status:"Status:",netAmount:"Net amount:",paidOn:"Paid on:"},countOf:{platform:"{{count}} platform payment",platform_other:"{{count}} platform payments",split:"{{count}} transfer",split_other:"{{count}} transfers",transfer:"{{count}} transaction",transfer_other:"{{count}} transactions",connected:"{{count}} transaction",connected_other:"{{count}} transactions",refund:"{{count}} refund",refund_other:"{{count}} refunds",squarePayment:"{{count}} payment",squarePayment_other:"{{count}} payments",squareRefund:"{{count}} refund",squareRefund_other:"{{count}} refunds"},export:{title:{refund:"Export refunds",split:"Export split payments",platform:"Export platform payments",connected:"Export payments",transfer:"Export payments"},pleaseWait:"Export request received. Please wait while we generate your report.",fileReady:"The file is ready to be downloaded",download:{refund:"Download a single CSV file containing the refunds.",platform:"Download a single CSV file containing the platform payments.",connected:"Download a single CSV file containing the payments.",transfer:"Download a single CSV file containing the payments",split:"Download a single CSV file containing the split payments."}}};function Vt(){return Vt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Vt.apply(this,arguments)}wt.use(Tt).init({resources:{en:{translation:qt}},lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1,skipOnVariables:!1}});var Kt=new k({queryCache:new j,defaultOptions:{queries:{staleTime:C,keepPreviousData:!0,onError:function(e){return d.error(e)}}}}),Wt=function(t){return function(n){return e.createElement(E,{client:Kt},e.createElement(t,n),e.createElement(R,{initialIsOpen:!1,position:"bottom-right"}))}},Gt="payments",Jt="https://dashboard.stripe.com/",$t=[{label:"USD",value:"usd"},{label:"AED",value:"aed"},{label:"AFN",value:"afn"},{label:"ALL",value:"all"},{label:"AMD",value:"amd"},{label:"ANG",value:"ang"},{label:"AOA",value:"aoa"},{label:"ARS",value:"ars"},{label:"AUD",value:"aud"},{label:"AWG",value:"awg"},{label:"AZN",value:"azn"},{label:"BAM",value:"bam"},{label:"BBD",value:"bbd"},{label:"BDT",value:"bdt"},{label:"BGN",value:"bgn"},{label:"BIF",value:"bif"},{label:"BMD",value:"bmd"},{label:"BND",value:"bnd"},{label:"BOB",value:"bob"},{label:"BRL",value:"brl"},{label:"BSD",value:"bsd"},{label:"BWP",value:"bwp"},{label:"BYN",value:"byn"},{label:"BZD",value:"bzd"},{label:"CAD",value:"cad"},{label:"CDF",value:"cdf"},{label:"CHF",value:"chf"},{label:"CLP",value:"clp"},{label:"CNY",value:"cny"},{label:"COP",value:"cop"},{label:"CRC",value:"crc"},{label:"CVE",value:"cve"},{label:"CZK",value:"czk"},{label:"DJF",value:"djf"},{label:"DKK",value:"dkk"},{label:"DOP",value:"dop"},{label:"DZD",value:"dzd"},{label:"EGP",value:"egp"},{label:"ETB",value:"etb"},{label:"EUR",value:"eur"},{label:"FJD",value:"fjd"},{label:"FKP",value:"fkp"},{label:"GBP",value:"gbp"},{label:"GEL",value:"gel"},{label:"GIP",value:"gip"},{label:"GMD",value:"gmd"},{label:"GNF",value:"gnf"},{label:"GTQ",value:"gtq"},{label:"GYD",value:"gyd"},{label:"HKD",value:"hkd"},{label:"HNL",value:"hnl"},{label:"HTG",value:"htg"},{label:"HUF",value:"huf"},{label:"IDR",value:"idr"},{label:"ILS",value:"ils"},{label:"INR",value:"inr"},{label:"ISK",value:"isk"},{label:"JMD",value:"jmd"},{label:"JPY",value:"jpy"},{label:"KES",value:"kes"},{label:"KGS",value:"kgs"},{label:"KHR",value:"khr"},{label:"KMF",value:"kmf"},{label:"KRW",value:"krw"},{label:"KYD",value:"kyd"},{label:"KZT",value:"kzt"},{label:"LAK",value:"lak"},{label:"LBP",value:"lbp"},{label:"LKR",value:"lkr"},{label:"LRD",value:"lrd"},{label:"LSL",value:"lsl"},{label:"MAD",value:"mad"},{label:"MDL",value:"mdl"},{label:"MGA",value:"mga"},{label:"MKD",value:"mkd"},{label:"MMK",value:"mmk"},{label:"MNT",value:"mnt"},{label:"MOP",value:"mop"},{label:"MRO",value:"mro"},{label:"MUR",value:"mur"},{label:"MVR",value:"mvr"},{label:"MWK",value:"mwk"},{label:"MXN",value:"mxn"},{label:"MYR",value:"myr"},{label:"MZN",value:"mzn"},{label:"NAD",value:"nad"},{label:"NGN",value:"ngn"},{label:"NIO",value:"nio"},{label:"NOK",value:"nok"},{label:"NPR",value:"npr"},{label:"NZD",value:"nzd"},{label:"PAB",value:"pab"},{label:"PEN",value:"pen"},{label:"PGK",value:"pgk"},{label:"PHP",value:"php"},{label:"PKR",value:"pkr"},{label:"PLN",value:"pln"},{label:"PYG",value:"pyg"},{label:"QAR",value:"qar"},{label:"RON",value:"ron"},{label:"RSD",value:"rsd"},{label:"RUB",value:"rub"},{label:"RWF",value:"rwf"},{label:"SAR",value:"sar"},{label:"SBD",value:"sbd"},{label:"SCR",value:"scr"},{label:"SEK",value:"sek"},{label:"SGD",value:"sgd"},{label:"SHP",value:"shp"},{label:"SLE",value:"sle"},{label:"SOS",value:"sos"},{label:"SRD",value:"srd"},{label:"STD",value:"std"},{label:"SZL",value:"szl"},{label:"THB",value:"thb"},{label:"TJS",value:"tjs"},{label:"TOP",value:"top"},{label:"TRY",value:"try"},{label:"TTD",value:"ttd"},{label:"TWD",value:"twd"},{label:"TZS",value:"tzs"},{label:"UAH",value:"uah"},{label:"UGX",value:"ugx"},{label:"UYU",value:"uyu"},{label:"UZS",value:"uzs"},{label:"VND",value:"vnd"},{label:"VUV",value:"vuv"},{label:"WST",value:"wst"},{label:"XAF",value:"xaf"},{label:"XCD",value:"xcd"},{label:"XOF",value:"xof"},{label:"XPF",value:"xpf"},{label:"YER",value:"yer"},{label:"ZAR",value:"zar"},{label:"ZMW",value:"zmw"}],Yt={index:I,size:45},Qt=[{key:"amount",label:St("common.amount"),node:"amount",type:"decimal",showRuleSelector:!0}],Zt={successful:"success",declined:"danger",initiated:"primary",canceled:"secondary",cancelled:"secondary",refunded:"secondary",failed:"danger",completed:"success",rejected:"danger"},Xt={column:"updated_at",direction:"DESC"},en=["ascend","descend"],tn=function(e){return F.post("".concat(Gt,"/api/v1/stripe/exports"),e)},nn=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"".concat(Jt).concat(t?"":"test/","payments/").concat(e)},rn=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"".concat(Jt).concat(t?"":"test/","connect/transfers/").concat(e)},on=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return"".concat(Jt).concat(t,"/").concat(n?"":"test/","payments/").concat(e)},an=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"".concat(Jt).concat(t?"":"test/","connect/accounts/").concat(e)},sn=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"".concat(Jt).concat(t?"":"test/","refunds/").concat(e)},ln=function(t){var n=t.content,r=t.children;return e.createElement("div",{className:"flex items-center space-x-2"},r,_(n)&&e.createElement("div",{className:"identifier-copy-button invisible"},e.createElement(Q,{size:"small",style:"text",value:n})))},cn=function(e){return Zt[e]||"warning"},un=q((function(t,n,r){var o=function(e,t){return"transaction"===e&&(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).isRefunded?"refunded":t}(t,n,r);return e.createElement(y,{content:St("tooltipContent.".concat(t,".").concat(o)),position:"top"},e.createElement("div",{className:"w-fit"},e.createElement(g,{label:St("tagLabels.".concat(t,".").concat(o)),style:cn(o)})))})),pn=function(t){return e.createElement(Z.DateTime,{date:t})},fn=function(t){var n=t.href,r=t.label;return e.createElement(m,{href:n,label:r,size:"small",style:"link",target:"_blank"})},dn=e.memo(fn),yn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.identifier,r=void 0===n?"":n,o=t.live,a=void 0!==o&&o;return e.createElement(ln,{content:r},e.createElement(dn,{href:nn(r,a),label:r}))};q((function(t,n){return e.createElement(y,{content:St("tooltipContent.".concat(t,".").concat(n)),position:"top"},e.createElement("div",{className:"w-fit"},e.createElement(g,{label:St("tagLabels.".concat(t,".").concat(n)),style:"secondary"})))}));var gn=function(t){var n=t.identifier,r=t.live;return n?e.createElement(ln,{content:n},e.createElement(dn,{href:rn(n,r),label:n})):e.createElement(y,{content:St("tooltipContent.identifierUnavailable"),position:"top"},e.createElement("div",{className:"text-center"},e.createElement(h,{style:"body2"},St("common.notAvailable"))))},mn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.identifier,r=void 0===n?"":n,o=t.account,a=void 0===o?{}:o,i=t.live,s=void 0!==i&&i;return r?e.createElement(ln,{content:r},e.createElement(dn,{label:r,href:r.startsWith("py")?on(r,null==a?void 0:a.identifier,s):nn(r,s)})):e.createElement("div",{className:"text-center"},e.createElement(y,{content:St("tooltipContent.connectedTransactionUnavailable"),position:"top"},e.createElement(h,{style:"body2"},St("common.notAvailable"))))},hn=q((function(t,n){return e.createElement(ln,{content:null==n?void 0:n.identifier},e.createElement(m,{label:null==n?void 0:n.identifier,size:"small",style:"link",onClick:function(){return t({transactionId:null==n?void 0:n.id,isOpen:!0})}}))})),vn=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.identifier,r=void 0===n?"":n,o=t.live,a=void 0!==o&&o;return e.createElement(ln,{content:r},e.createElement(dn,{href:sn(r,a),label:r}))},bn={all:"all",successful:"successful",declined:"declined",cancelled:"cancelled",failed:"failed",refunded:"refunded",pending:"pending"},On="platform",wn="connected",Sn="split",Pn="transfer",xn="refund",kn=Object.values(bn),jn={all:{},successful:{},pending:{},declined:{isHidden:{split:!0,refund:!0}},refunded:{isHidden:{split:!0,refund:!0}},failed:{isHidden:{platform:!0,connected:!0,transfer:!0,split:!0}},cancelled:{isHidden:{platform:!0,connected:!0,transfer:!0,refund:!0}}},En={transactionId:"",isOpen:!1},Nn={platform:{node:"identifier,",model:"NeetoPaymentsEngine::Stripe::Transaction,"},split:{node:"identifier,account.identifier,connected_payment.identifier,payment_intent.identifier,",model:"NeetoPaymentsEngine::Stripe::Transactions::Split,NeetoPaymentsEngine::Stripe::Account,NeetoPaymentsEngine::Stripe::Transaction,NeetoPaymentsEngine::Stripe::Transaction,"},connected:{node:"identifier,",model:"NeetoPaymentsEngine::Stripe::Transaction,"},refund:{node:"identifier,payment_intent.identifier,",model:"NeetoPaymentsEngine::Stripe::Refund,NeetoPaymentsEngine::Stripe::Transaction,"},transfer:{node:"identifier,",model:"NeetoPaymentsEngine::Stripe::Transaction,"}},An=[{title:St("common.id"),dataIndex:"id",key:"id",width:"72px"},{title:St("common.identifier"),dataIndex:"identifier",key:"identifier",width:"300px",render:yn},{title:St("common.identifier"),dataIndex:"identifier",key:"splitIdentifier",width:"300px",render:gn},{title:St("common.identifier"),dataIndex:"identifier",key:"refundIdentifier",width:"300px",render:vn},{title:St("common.identifier"),dataIndex:"identifier",key:"transferIdentifier",width:"300px",render:mn},{title:St("common.status"),dataIndex:"status",key:"status",render:un("transaction"),sorter:!0},{title:St("common.amount"),dataIndex:"amount",key:"amount",width:"150px",sorter:!0},{title:St("common.paymentTime"),dataIndex:"paymentAt",key:"paymentTime",width:"220px",render:pn,sorter:!0},{title:St("common.status"),dataIndex:"status",key:"refundStatus",render:un("refund"),sorter:!0},{title:St("common.paymentAmount"),dataIndex:"paymentAmount",key:"paymentAmount",width:"150px",sorter:!0},{title:St("common.refundAmount"),dataIndex:"amount",key:"refundAmount",width:"150px",sorter:!0},{title:St("common.refundTime"),dataIndex:"updatedAt",key:"refundTime",width:"220px",render:pn,sorter:!0},{title:St("common.status"),dataIndex:"status",key:"splitStatus",render:un("split"),sorter:!0},{title:St("common.transferTime"),key:"splitTime",dataIndex:"paymentAt",width:"220px",render:function(t){return _(t)?pn(t):e.createElement(y,{content:St("tooltipContent.dateUnavailable"),position:"top"},e.createElement("div",{className:"text-center"},e.createElement(h,{style:"body2"},St("common.notAvailable"))))},sorter:!0},{title:St("common.paymentIdentifier"),key:"refundPaymentIdentifier",dataIndex:"transaction",width:"300px",render:mn},{title:St("common.connectedTransaction"),dataIndex:["connectedPayment"],key:"connectedPayment",width:"300px",render:mn},{title:St("common.accountIdentifier"),dataIndex:"account",key:"destinationAccount",width:"160px",render:function(t){var n=t.identifier,r=void 0===n?"":n,o=t.live,a=void 0!==o&&o;return e.createElement(ln,{content:r},e.createElement(dn,{href:an(r,a),label:r}))}}],Rn={identifier:{isHidden:{split:!0,transfer:!0,refund:!0}},amount:{isHidden:{refund:!0}},paymentTime:{isHidden:{refund:!0,split:!0}},splitIdentifier:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0,pending:!0}},transferIdentifier:{isHidden:{platform:!0,split:!0,connected:!0,refund:!0}},status:{isHidden:{refund:!0,split:!0,declined:!0,pending:!0,successful:!0,refunded:!0}},refundStatus:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0,failed:!0,pending:!0,successful:!0}},refundAmount:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0}},refundTime:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0}},splitStatus:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0,declined:!0,pending:!0,successful:!0,cancelled:!0}},splitTime:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0}},paymentIntent:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0}},connectedPayment:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0,pending:!0}},refundPaymentIdentifier:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0}},refundIdentifier:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0}},destinationAccount:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0}},paymentAmount:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0}}},Cn=[{key:"amount",label:St("common.amount"),node:"amount",type:"decimal",showRuleSelector:!0},{key:"paymentAmount",label:St("common.paymentAmount"),node:"payment_intent.amount",model:"NeetoPaymentsEngine::Stripe::Transaction",type:"decimal",showRuleSelector:!0},{key:"refundAmount",label:St("common.refundAmount"),node:"amount",type:"decimal",showRuleSelector:!0},{key:"paymentTime",label:St("common.paymentTime"),node:"payment_at",type:"date",showRuleSelector:!0},{key:"refundTime",label:St("common.refundTime"),node:"updated_at",type:"date",showRuleSelector:!0},{key:"splitTime",label:St("common.transferTime"),node:"payment_at",type:"date",showRuleSelector:!0}],In=V(On),Ln=V(wn),Dn=V(Sn),Tn=V(Pn),Fn=V(xn),Bn=function(e){var t=e.tab,n=e.kind,r=e.payableEntityColumns,o=void 0===r?[]:r,a=e.specialColumnArguments,i=void 0===a?{}:a;return An.concat(function(e){var t=e.setPaneStatus;return[{title:St("common.platformTransaction"),dataIndex:"paymentIntent",key:"paymentIntent",width:"290px",render:hn(t)}]}(i)).filter((function(e){var r,o,a,i,s=e.key;return!(null!==(r=Rn[s])&&void 0!==r&&null!==(o=r.isHidden)&&void 0!==o&&o[n]||null!==(a=Rn[s])&&void 0!==a&&null!==(i=a.isHidden)&&void 0!==i&&i[t])})).concat(o.filter((function(e){var r=e.isHidden;return!(null!=r&&r[t]||null!=r&&r[n])})))},_n=function(e,t){return Dn(t)?null==e?void 0:e.splits:Fn(t)?null==e?void 0:e.refunds:null==e?void 0:e.transactions},Mn=function(t){var n=t.showExportModal,o=t.setShowExportModal,s=t.kind,l=t.tab,c=t.filters,u=t.holdableId,p=t.sortProperties,f=Ht().t,d=_t(r(""),2),y=d[0],g=d[1],b=_t(r(!1),2),O=b[0],w=b[1],S=N((function(e){return tn(e)})),P=S.mutate,x=S.isLoading||O,k=i((function(){return"".concat(s,"-report-").concat(([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})))}),[s]),j=function(e){e.download_url&&(g(e.download_url),w(!1))};a((function(){if(n){var e=function(e,t){return H({channel:"NeetoPaymentsEngine::ExportsChannel",pubsub_token:e},{connected:B,disconnected:function(){this.perform("unsubscribed"),this.unsubscribe()},received:function(e){this.perform("unsubscribed"),t(e)}})}(k,j);return g(""),w(!1),function(){e.disconnected()}}}),[n,k]);var E=function(){return o(!1)};return e.createElement(v,{isOpen:n,onClose:E},e.createElement(v.Header,null,e.createElement(h,{style:"h2"},f("export.title.".concat(s)))),e.createElement(v.Body,null,x?e.createElement(h,{style:"body2"},f("export.pleaseWait")):e.createElement(h,{style:"body2"},f(y?"export.fileReady":"export.download.".concat(s)))),e.createElement(v.Footer,{className:"space-x-2"},y?e.createElement(m,{href:y,icon:L,label:f("common.download"),onClick:E}):e.createElement(e.Fragment,null,e.createElement(m,{disabled:x,label:f("common.export"),loading:x,onClick:function(){var e={kind:Tn(s)?"connected":s,token:k,filters:JSON.stringify(c),tab:l,holdableId:u,sortBy:p};P(e,{onSuccess:function(){g(""),w(!0)}})}}),e.createElement(m,{disabled:x,label:f("common.cancel"),style:"text",onClick:E}))))},Un=function(){var e=X().search;return i((function(){return new URLSearchParams(e)}),[e])};function zn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Hn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?zn(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var qn,Vn=function(e){return"payment_amount"===e.column?Y("column",W("neeto_payments_engine_stripe_transactions.amount"),e):e},Kn=function(e){return e.reduce((function(e,t){return Hn(Hn({},e),{},me({},t,Yt))}),{})},Wn=function(e){var t,n,r=e.tab,o=e.filters,a=e.pageProperties,i=e.sortProperties,s=void 0===i?{}:i;return{tab:r,page:null===(t=a[r])||void 0===t?void 0:t.index,limit:null===(n=a[r])||void 0===n?void 0:n.size,filters:JSON.stringify(o),sortBy:Vn(s)}},Gn=function(e){var t=e.data,n=e.pageProperties,r=void 0===n?{}:n,o=e.tab,a=void 0===o?"all":o;return t.map((function(e,t){var n,o;return Hn(Hn({},e),{},{payable:e.payable,identifier:e,id:$(r)?t+1:(null===(n=r[a])||void 0===n?void 0:n.size)*((null===(o=r[a])||void 0===o?void 0:o.index)-1)+t+1})}))},Jn=function(e){var t=e.payableEntityColumns,n=e.kind,o=Un(),a=ee(),i=kn.filter((function(e){var t,r;return!(null!==(t=jn[e])&&void 0!==t&&null!==(r=t.isHidden)&&void 0!==r&&r[n])})),s=_t(r(!1),2),l=s[0],u=s[1],p=_t(r(!1),2),f=p[0],d=p[1],y=_t(r(Kn(i)),2),g=y[0],m=y[1],h=_t(r(Xt),2),v=h[0],b=h[1],O=_t(r(""),2),w=O[0],S=O[1],P=_t(r(bn.all),2),x=P[0],k=P[1],j=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Cn.filter((function(e){var n,r,o=e.key;return!(null!==(n=Rn[o])&&void 0!==n&&null!==(r=n.isHidden)&&void 0!==r&&r[t])}));return W(r,G(J("filterProps"),M({isFilterable:!0,isHidden:function(n){return!(null!=n&&n[e]||null!=n&&n[t])}},n)))}(x,n,t),E=_t(r(c(j)),2),N=E[0],A=E[1],R=_t(r(0),2),C=R[0],I=R[1];return{isFilterButtonVisible:l,isFilterPaneOpen:f,pageProperties:g,filters:N,searchTerm:w,tabs:i,tab:x,dataSize:C,filterableColumns:j,sortProperties:v,setIsFilterButtonVisible:u,setIsFilterPaneOpen:d,setPageProperties:m,setFilters:A,setSearchTerm:S,setTab:k,handleTabChange:function(e){var t,n;o.set("tab",e),o.set("page",null===(t=g[e])||void 0===t?void 0:t.index),o.set("size",null===(n=g[e])||void 0===n?void 0:n.size),a.push({search:o.toString()}),k(e)},setDataSize:I,setSortProperties:b}},$n=function(e){return F.get("".concat(Gt,"/api/v1/stripe/holdable/").concat(e,"/account"))},Yn="undefined"!=typeof Symbol&&Symbol,Qn=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},Zn=Array.prototype.slice,Xn=Object.prototype.toString,er=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==Xn.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,r=Zn.call(arguments,1),o=Math.max(0,t.length-r.length),a=[],i=0;i<o;i++)a.push("$"+i);if(n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof n){var o=t.apply(this,r.concat(Zn.call(arguments)));return Object(o)===o?o:this}return t.apply(e,r.concat(Zn.call(arguments)))})),t.prototype){var s=function(){};s.prototype=t.prototype,n.prototype=new s,s.prototype=null}return n},tr=Function.prototype.bind||er,nr=tr.call(Function.call,Object.prototype.hasOwnProperty),rr=SyntaxError,or=Function,ar=TypeError,ir=function(e){try{return or('"use strict"; return ('+e+").constructor;")()}catch(e){}},sr=Object.getOwnPropertyDescriptor;if(sr)try{sr({},"")}catch(Fi){sr=null}var lr=function(){throw new ar},cr=sr?function(){try{return lr}catch(e){try{return sr(arguments,"callee").get}catch(e){return lr}}}():lr,ur="function"==typeof Yn&&"function"==typeof Symbol&&"symbol"==typeof Yn("foo")&&"symbol"==typeof Symbol("bar")&&Qn(),pr=Object.getPrototypeOf||function(e){return e.__proto__},fr={},dr="undefined"==typeof Uint8Array?qn:pr(Uint8Array),yr={"%AggregateError%":"undefined"==typeof AggregateError?qn:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?qn:ArrayBuffer,"%ArrayIteratorPrototype%":ur?pr([][Symbol.iterator]()):qn,"%AsyncFromSyncIteratorPrototype%":qn,"%AsyncFunction%":fr,"%AsyncGenerator%":fr,"%AsyncGeneratorFunction%":fr,"%AsyncIteratorPrototype%":fr,"%Atomics%":"undefined"==typeof Atomics?qn:Atomics,"%BigInt%":"undefined"==typeof BigInt?qn:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?qn:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?qn:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?qn:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?qn:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?qn:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?qn:FinalizationRegistry,"%Function%":or,"%GeneratorFunction%":fr,"%Int8Array%":"undefined"==typeof Int8Array?qn:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?qn:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?qn:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ur?pr(pr([][Symbol.iterator]())):qn,"%JSON%":"object"==typeof JSON?JSON:qn,"%Map%":"undefined"==typeof Map?qn:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&ur?pr((new Map)[Symbol.iterator]()):qn,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?qn:Promise,"%Proxy%":"undefined"==typeof Proxy?qn:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?qn:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?qn:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&ur?pr((new Set)[Symbol.iterator]()):qn,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?qn:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ur?pr(""[Symbol.iterator]()):qn,"%Symbol%":ur?Symbol:qn,"%SyntaxError%":rr,"%ThrowTypeError%":cr,"%TypedArray%":dr,"%TypeError%":ar,"%Uint8Array%":"undefined"==typeof Uint8Array?qn:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?qn:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?qn:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?qn:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?qn:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?qn:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?qn:WeakSet};try{null.error}catch(Fi){var gr=pr(pr(Fi));yr["%Error.prototype%"]=gr}var mr=function e(t){var n;if("%AsyncFunction%"===t)n=ir("async function () {}");else if("%GeneratorFunction%"===t)n=ir("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=ir("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=pr(o.prototype))}return yr[t]=n,n},hr={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},vr=tr,br=nr,Or=vr.call(Function.call,Array.prototype.concat),wr=vr.call(Function.apply,Array.prototype.splice),Sr=vr.call(Function.call,String.prototype.replace),Pr=vr.call(Function.call,String.prototype.slice),xr=vr.call(Function.call,RegExp.prototype.exec),kr=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,jr=/\\(\\)?/g,Er=function(e,t){var n,r=e;if(br(hr,r)&&(r="%"+(n=hr[r])[0]+"%"),br(yr,r)){var o=yr[r];if(o===fr&&(o=mr(r)),void 0===o&&!t)throw new ar("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new rr("intrinsic "+e+" does not exist!")},Nr=function(e,t){if("string"!=typeof e||0===e.length)throw new ar("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new ar('"allowMissing" argument must be a boolean');if(null===xr(/^%?[^%]*%?$/,e))throw new rr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=Pr(e,0,1),n=Pr(e,-1);if("%"===t&&"%"!==n)throw new rr("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new rr("invalid intrinsic syntax, expected opening `%`");var r=[];return Sr(e,kr,(function(e,t,n,o){r[r.length]=n?Sr(o,jr,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=Er("%"+r+"%",t),a=o.name,i=o.value,s=!1,l=o.alias;l&&(r=l[0],wr(n,Or([0,1],l)));for(var c=1,u=!0;c<n.length;c+=1){var p=n[c],f=Pr(p,0,1),d=Pr(p,-1);if(('"'===f||"'"===f||"`"===f||'"'===d||"'"===d||"`"===d)&&f!==d)throw new rr("property names with quotes must have matching quotes");if("constructor"!==p&&u||(s=!0),br(yr,a="%"+(r+="."+p)+"%"))i=yr[a];else if(null!=i){if(!(p in i)){if(!t)throw new ar("base intrinsic for "+e+" exists, but the property is not available.");return}if(sr&&c+1>=n.length){var y=sr(i,p);i=(u=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:i[p]}else u=br(i,p),i=i[p];u&&!s&&(yr[a]=i)}}return i},Ar={};!function(e){var t=tr,n=Nr,r=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(o,r),i=n("%Object.getOwnPropertyDescriptor%",!0),s=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(s)try{s({},"a",{value:1})}catch(e){s=null}e.exports=function(e){var n=a(t,o,arguments);i&&s&&(i(n,"length").configurable&&s(n,"length",{value:1+l(0,e.length-(arguments.length-1))}));return n};var c=function(){return a(t,r,arguments)};s?s(e.exports,"apply",{value:c}):e.exports.apply=c}({get exports(){return Ar},set exports(e){Ar=e}});var Rr=Nr,Cr=Ar,Ir=Cr(Rr("String.prototype.indexOf")),Lr=re.inspect,Dr="function"==typeof Map&&Map.prototype,Tr=Object.getOwnPropertyDescriptor&&Dr?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Fr=Dr&&Tr&&"function"==typeof Tr.get?Tr.get:null,Br=Dr&&Map.prototype.forEach,_r="function"==typeof Set&&Set.prototype,Mr=Object.getOwnPropertyDescriptor&&_r?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Ur=_r&&Mr&&"function"==typeof Mr.get?Mr.get:null,zr=_r&&Set.prototype.forEach,Hr="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,qr="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,Vr="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,Kr=Boolean.prototype.valueOf,Wr=Object.prototype.toString,Gr=Function.prototype.toString,Jr=String.prototype.match,$r=String.prototype.slice,Yr=String.prototype.replace,Qr=String.prototype.toUpperCase,Zr=String.prototype.toLowerCase,Xr=RegExp.prototype.test,eo=Array.prototype.concat,to=Array.prototype.join,no=Array.prototype.slice,ro=Math.floor,oo="function"==typeof BigInt?BigInt.prototype.valueOf:null,ao=Object.getOwnPropertySymbols,io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,so="function"==typeof Symbol&&"object"==typeof Symbol.iterator,lo="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===so||"symbol")?Symbol.toStringTag:null,co=Object.prototype.propertyIsEnumerable,uo=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function po(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||Xr.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-ro(-e):ro(e);if(r!==e){var o=String(r),a=$r.call(t,o.length+1);return Yr.call(o,n,"$&_")+"."+Yr.call(Yr.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Yr.call(t,n,"$&_")}var fo=Lr,yo=fo.custom,go=Oo(yo)?yo:null;function mo(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function ho(e){return Yr.call(String(e),/"/g,""")}function vo(e){return!("[object Array]"!==Po(e)||lo&&"object"==typeof e&&lo in e)}function bo(e){return!("[object RegExp]"!==Po(e)||lo&&"object"==typeof e&&lo in e)}function Oo(e){if(so)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!io)return!1;try{return io.call(e),!0}catch(e){}return!1}var wo=Object.prototype.hasOwnProperty||function(e){return e in this};function So(e,t){return wo.call(e,t)}function Po(e){return Wr.call(e)}function xo(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function ko(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return ko($r.call(e,0,t.maxStringLength),t)+r}return mo(Yr.call(Yr.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jo),"single",t)}function jo(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+Qr.call(t.toString(16))}function Eo(e){return"Object("+e+")"}function No(e){return e+" { ? }"}function Ao(e,t,n,r){return e+" ("+t+") {"+(r?Ro(n,r):to.call(n,", "))+"}"}function Ro(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+to.call(e,","+n)+"\n"+t.prev}function Co(e,t){var n=vo(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=So(e,o)?t(e[o],e):""}var a,i="function"==typeof ao?ao(e):[];if(so){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var l in e)So(e,l)&&(n&&String(Number(l))===l&&l<e.length||so&&a["$"+l]instanceof Symbol||(Xr.call(/[^\w$]/,l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"==typeof ao)for(var c=0;c<i.length;c++)co.call(e,i[c])&&r.push("["+t(i[c])+"]: "+t(e[i[c]],e));return r}var Io=Nr,Lo=function(e,t){var n=Rr(e,!!t);return"function"==typeof n&&Ir(e,".prototype.")>-1?Cr(n):n},Do=function e(t,n,r,o){var a=n||{};if(So(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(So(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!So(a,"customInspect")||a.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(So(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(So(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return ko(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var l=String(t);return s?po(t,l):l}if("bigint"==typeof t){var c=String(t)+"n";return s?po(t,c):c}var u=void 0===a.depth?5:a.depth;if(void 0===r&&(r=0),r>=u&&u>0&&"object"==typeof t)return vo(t)?"[Array]":"[Object]";var p=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=to.call(Array(e.indent+1)," ")}return{base:n,prev:to.call(Array(t+1),n)}}(a,r);if(void 0===o)o=[];else if(xo(o,t)>=0)return"[Circular]";function f(t,n,i){if(n&&(o=no.call(o)).push(n),i){var s={depth:a.depth};return So(a,"quoteStyle")&&(s.quoteStyle=a.quoteStyle),e(t,s,r+1,o)}return e(t,a,r+1,o)}if("function"==typeof t&&!bo(t)){var d=function(e){if(e.name)return e.name;var t=Jr.call(Gr.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),y=Co(t,f);return"[Function"+(d?": "+d:" (anonymous)")+"]"+(y.length>0?" { "+to.call(y,", ")+" }":"")}if(Oo(t)){var g=so?Yr.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):io.call(t);return"object"!=typeof t||so?g:Eo(g)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var m="<"+Zr.call(String(t.nodeName)),h=t.attributes||[],v=0;v<h.length;v++)m+=" "+h[v].name+"="+mo(ho(h[v].value),"double",a);return m+=">",t.childNodes&&t.childNodes.length&&(m+="..."),m+="</"+Zr.call(String(t.nodeName))+">"}if(vo(t)){if(0===t.length)return"[]";var b=Co(t,f);return p&&!function(e){for(var t=0;t<e.length;t++)if(xo(e[t],"\n")>=0)return!1;return!0}(b)?"["+Ro(b,p)+"]":"[ "+to.call(b,", ")+" ]"}if(function(e){return!("[object Error]"!==Po(e)||lo&&"object"==typeof e&&lo in e)}(t)){var O=Co(t,f);return"cause"in Error.prototype||!("cause"in t)||co.call(t,"cause")?0===O.length?"["+String(t)+"]":"{ ["+String(t)+"] "+to.call(O,", ")+" }":"{ ["+String(t)+"] "+to.call(eo.call("[cause]: "+f(t.cause),O),", ")+" }"}if("object"==typeof t&&i){if(go&&"function"==typeof t[go]&&fo)return fo(t,{depth:u-r});if("symbol"!==i&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!Fr||!e||"object"!=typeof e)return!1;try{Fr.call(e);try{Ur.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var w=[];return Br&&Br.call(t,(function(e,n){w.push(f(n,t,!0)+" => "+f(e,t))})),Ao("Map",Fr.call(t),w,p)}if(function(e){if(!Ur||!e||"object"!=typeof e)return!1;try{Ur.call(e);try{Fr.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var S=[];return zr&&zr.call(t,(function(e){S.push(f(e,t))})),Ao("Set",Ur.call(t),S,p)}if(function(e){if(!Hr||!e||"object"!=typeof e)return!1;try{Hr.call(e,Hr);try{qr.call(e,qr)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return No("WeakMap");if(function(e){if(!qr||!e||"object"!=typeof e)return!1;try{qr.call(e,qr);try{Hr.call(e,Hr)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return No("WeakSet");if(function(e){if(!Vr||!e||"object"!=typeof e)return!1;try{return Vr.call(e),!0}catch(e){}return!1}(t))return No("WeakRef");if(function(e){return!("[object Number]"!==Po(e)||lo&&"object"==typeof e&&lo in e)}(t))return Eo(f(Number(t)));if(function(e){if(!e||"object"!=typeof e||!oo)return!1;try{return oo.call(e),!0}catch(e){}return!1}(t))return Eo(f(oo.call(t)));if(function(e){return!("[object Boolean]"!==Po(e)||lo&&"object"==typeof e&&lo in e)}(t))return Eo(Kr.call(t));if(function(e){return!("[object String]"!==Po(e)||lo&&"object"==typeof e&&lo in e)}(t))return Eo(f(String(t)));if(!function(e){return!("[object Date]"!==Po(e)||lo&&"object"==typeof e&&lo in e)}(t)&&!bo(t)){var P=Co(t,f),x=uo?uo(t)===Object.prototype:t instanceof Object||t.constructor===Object,k=t instanceof Object?"":"null prototype",j=!x&&lo&&Object(t)===t&&lo in t?$r.call(Po(t),8,-1):k?"Object":"",E=(x||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(j||k?"["+to.call(eo.call([],j||[],k||[]),": ")+"] ":"");return 0===P.length?E+"{}":p?E+"{"+Ro(P,p)+"}":E+"{ "+to.call(P,", ")+" }"}return String(t)},To=Io("%TypeError%"),Fo=Io("%WeakMap%",!0),Bo=Io("%Map%",!0),_o=Lo("WeakMap.prototype.get",!0),Mo=Lo("WeakMap.prototype.set",!0),Uo=Lo("WeakMap.prototype.has",!0),zo=Lo("Map.prototype.get",!0),Ho=Lo("Map.prototype.set",!0),qo=Lo("Map.prototype.has",!0),Vo=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},Ko=String.prototype.replace,Wo=/%20/g,Go="RFC3986",Jo={default:Go,formatters:{RFC1738:function(e){return Ko.call(e,Wo,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:Go},$o=Jo,Yo=Object.prototype.hasOwnProperty,Qo=Array.isArray,Zo=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),Xo=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},ea={arrayToObject:Xo,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],a=o.obj[o.prop],i=Object.keys(a),s=0;s<i.length;++s){var l=i[s],c=a[l];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(t.push({obj:a,prop:l}),n.push(c))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(Qo(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,r,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var i="",s=0;s<a.length;++s){var l=a.charCodeAt(s);45===l||46===l||95===l||126===l||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||o===$o.RFC1738&&(40===l||41===l)?i+=a.charAt(s):l<128?i+=Zo[l]:l<2048?i+=Zo[192|l>>6]+Zo[128|63&l]:l<55296||l>=57344?i+=Zo[224|l>>12]+Zo[128|l>>6&63]+Zo[128|63&l]:(s+=1,l=65536+((1023&l)<<10|1023&a.charCodeAt(s)),i+=Zo[240|l>>18]+Zo[128|l>>12&63]+Zo[128|l>>6&63]+Zo[128|63&l])}return i},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(Qo(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(Qo(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!Yo.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var o=t;return Qo(t)&&!Qo(n)&&(o=Xo(t,r)),Qo(t)&&Qo(n)?(n.forEach((function(n,o){if(Yo.call(t,o)){var a=t[o];a&&"object"==typeof a&&n&&"object"==typeof n?t[o]=e(a,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var a=n[o];return Yo.call(t,o)?t[o]=e(t[o],a,r):t[o]=a,t}),o)}},ta=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new To("Side channel does not contain "+Do(e))},get:function(r){if(Fo&&r&&("object"==typeof r||"function"==typeof r)){if(e)return _o(e,r)}else if(Bo){if(t)return zo(t,r)}else if(n)return function(e,t){var n=Vo(e,t);return n&&n.value}(n,r)},has:function(r){if(Fo&&r&&("object"==typeof r||"function"==typeof r)){if(e)return Uo(e,r)}else if(Bo){if(t)return qo(t,r)}else if(n)return function(e,t){return!!Vo(e,t)}(n,r);return!1},set:function(r,o){Fo&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new Fo),Mo(e,r,o)):Bo?(t||(t=new Bo),Ho(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=Vo(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r},na=ea,ra=Jo,oa=Object.prototype.hasOwnProperty,aa={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},ia=Array.isArray,sa=Array.prototype.push,la=function(e,t){sa.apply(e,ia(t)?t:[t])},ca=Date.prototype.toISOString,ua=ra.default,pa={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:na.encode,encodeValuesOnly:!1,format:ua,formatter:ra.formatters[ua],indices:!1,serializeDate:function(e){return ca.call(e)},skipNulls:!1,strictNullHandling:!1},fa={},da=function e(t,n,r,o,a,i,s,l,c,u,p,f,d,y,g,m){for(var h,v=t,b=m,O=0,w=!1;void 0!==(b=b.get(fa))&&!w;){var S=b.get(t);if(O+=1,void 0!==S){if(S===O)throw new RangeError("Cyclic object value");w=!0}void 0===b.get(fa)&&(O=0)}if("function"==typeof l?v=l(n,v):v instanceof Date?v=p(v):"comma"===r&&ia(v)&&(v=na.maybeMap(v,(function(e){return e instanceof Date?p(e):e}))),null===v){if(a)return s&&!y?s(n,pa.encoder,g,"key",f):n;v=""}if("string"==typeof(h=v)||"number"==typeof h||"boolean"==typeof h||"symbol"==typeof h||"bigint"==typeof h||na.isBuffer(v))return s?[d(y?n:s(n,pa.encoder,g,"key",f))+"="+d(s(v,pa.encoder,g,"value",f))]:[d(n)+"="+d(String(v))];var P,x=[];if(void 0===v)return x;if("comma"===r&&ia(v))y&&s&&(v=na.maybeMap(v,s)),P=[{value:v.length>0?v.join(",")||null:void 0}];else if(ia(l))P=l;else{var k=Object.keys(v);P=c?k.sort(c):k}for(var j=o&&ia(v)&&1===v.length?n+"[]":n,E=0;E<P.length;++E){var N=P[E],A="object"==typeof N&&void 0!==N.value?N.value:v[N];if(!i||null!==A){var R=ia(v)?"function"==typeof r?r(j,N):j:j+(u?"."+N:"["+N+"]");m.set(t,O);var C=ta();C.set(fa,m),la(x,e(A,R,r,o,a,i,"comma"===r&&y&&ia(v)?null:s,l,c,u,p,f,d,y,g,C))}}return x},ya=ea,ga=Object.prototype.hasOwnProperty,ma=Array.isArray,ha={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ya.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},va=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},ba=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Oa=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,i=n.depth>0&&/(\[[^[\]]*])/.exec(o),s=i?o.slice(0,i.index):o,l=[];if(s){if(!n.plainObjects&&ga.call(Object.prototype,s)&&!n.allowPrototypes)return;l.push(s)}for(var c=0;n.depth>0&&null!==(i=a.exec(o))&&c<n.depth;){if(c+=1,!n.plainObjects&&ga.call(Object.prototype,i[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(i[1])}return i&&l.push("["+o.slice(i.index)+"]"),function(e,t,n,r){for(var o=r?t:ba(t,n),a=e.length-1;a>=0;--a){var i,s=e[a];if("[]"===s&&n.parseArrays)i=[].concat(o);else{i=n.plainObjects?Object.create(null):{};var l="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(l,10);n.parseArrays||""!==l?!isNaN(c)&&s!==l&&String(c)===l&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(i=[])[c]=o:"__proto__"!==l&&(i[l]=o):i={0:o}}o=i}return o}(l,t,n,r)}},wa=function(e,t){var n,r=e,o=function(e){if(!e)return pa;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||pa.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=ra.default;if(void 0!==e.format){if(!oa.call(ra.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=ra.formatters[n],o=pa.filter;return("function"==typeof e.filter||ia(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:pa.addQueryPrefix,allowDots:void 0===e.allowDots?pa.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:pa.charsetSentinel,delimiter:void 0===e.delimiter?pa.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:pa.encode,encoder:"function"==typeof e.encoder?e.encoder:pa.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:pa.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:pa.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:pa.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:pa.strictNullHandling}}(t);"function"==typeof o.filter?r=(0,o.filter)("",r):ia(o.filter)&&(n=o.filter);var a,i=[];if("object"!=typeof r||null===r)return"";a=t&&t.arrayFormat in aa?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var s=aa[a];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l="comma"===s&&t&&t.commaRoundTrip;n||(n=Object.keys(r)),o.sort&&n.sort(o.sort);for(var c=ta(),u=0;u<n.length;++u){var p=n[u];o.skipNulls&&null===r[p]||la(i,da(r[p],p,s,l,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,c))}var f=i.join(o.delimiter),d=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?d+="utf8=%26%2310003%3B&":d+="utf8=%E2%9C%93&"),f.length>0?d+f:""},Sa={formats:Jo,parse:function(e,t){var n=function(e){if(!e)return ha;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?ha.charset:e.charset;return{allowDots:void 0===e.allowDots?ha.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:ha.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:ha.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:ha.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:ha.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:ha.comma,decoder:"function"==typeof e.decoder?e.decoder:ha.decoder,delimiter:"string"==typeof e.delimiter||ya.isRegExp(e.delimiter)?e.delimiter:ha.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:ha.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:ha.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:ha.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:ha.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:ha.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,i=o.split(t.delimiter,a),s=-1,l=t.charset;if(t.charsetSentinel)for(n=0;n<i.length;++n)0===i[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===i[n]?l="utf-8":"utf8=%26%2310003%3B"===i[n]&&(l="iso-8859-1"),s=n,n=i.length);for(n=0;n<i.length;++n)if(n!==s){var c,u,p=i[n],f=p.indexOf("]="),d=-1===f?p.indexOf("="):f+1;-1===d?(c=t.decoder(p,ha.decoder,l,"key"),u=t.strictNullHandling?null:""):(c=t.decoder(p.slice(0,d),ha.decoder,l,"key"),u=ya.maybeMap(ba(p.slice(d+1),t),(function(e){return t.decoder(e,ha.decoder,l,"value")}))),u&&t.interpretNumericEntities&&"iso-8859-1"===l&&(u=va(u)),p.indexOf("[]=")>-1&&(u=ma(u)?[u]:u),ga.call(r,c)?r[c]=ya.combine(r[c],u):r[c]=u}return r}(e,n):e,o=n.plainObjects?Object.create(null):{},a=Object.keys(r),i=0;i<a.length;++i){var s=a[i],l=Oa(s,r[s],n,"string"==typeof e);o=ya.merge(o,l,n)}return!0===n.allowSparse?o:ya.compact(o)},stringify:wa},Pa=function(e){return F.get("".concat(Gt,"/api/v1/stripe/holdable/transactions"),{params:e,paramsSerializer:function(e){return Sa.stringify(e,{arrayFormat:"brackets"})}})},xa=function(e,t){return F.get("".concat(Gt,"/api/v1/stripe/holdables/").concat(e,"/transactions"),{params:t,paramsSerializer:function(e){return Sa.stringify(e,{arrayFormat:"brackets"})}})},ka="stripe-platform-account-details",ja="transactions-list",Ea="platform-splits-list",Na="connected-account",Aa="stripe-platform-transaction",Ra="stripe-refunds-list",Ca="square-account-details",Ia="payments-list",La="refunds-list",Da=function(e){return F.get("".concat(Gt,"/api/v1/stripe/holdable/refunds"),{params:e,paramsSerializer:function(e){return Sa.stringify(e,{arrayFormat:"brackets"})}})},Ta=function(){return F.get("".concat(Gt,"/api/v1/stripe_platform/account"))},Fa=function(e){return F.get("".concat(Gt,"/api/v1/stripe_platform/splits"),{params:e,paramsSerializer:function(e){return Sa.stringify(e,{arrayFormat:"brackets"})}})},Ba=function(e){return F.get("".concat(Gt,"/api/v1/stripe_platform/transactions"),{params:e,paramsSerializer:function(e){return Sa.stringify(e,{arrayFormat:"brackets"})}})},_a=function(e){return F.get("".concat(Gt,"/api/v1/stripe_platform/transactions/").concat(e))},Ma=[{key:"splitSubId",title:St("common.id"),dataIndex:"id",width:"72px"},{key:"splitSubIdentifier",title:St("common.identifier"),dataIndex:"identifier",width:"300px",render:gn},{key:"splitSubAmount",title:St("common.amount"),dataIndex:"amount",width:"150px"},{key:"splitSubStatus",title:St("common.status"),dataIndex:"status",width:"130px",render:un("split")}],Ua=[{key:"refundId",title:St("common.id"),dataIndex:"id",width:"72px"},{key:"refundIdentifier",title:St("common.identifier"),dataIndex:"identifier",width:"290px",render:vn},{key:"refundAmount",title:St("common.amount"),dataIndex:"amount",width:"150px"},{key:"refundStatus",title:St("common.status"),dataIndex:"status",width:"200px",render:un("refund")}],za=function(t){var n=t.data,r=void 0===n?[]:n,o=t.className,a=void 0===o?"":o,i=t.kind,s=void 0===i?"split":i;return e.createElement("div",{className:a||"ml-12 max-w-3xl"},e.createElement(ne,{hasPagination:!1},e.createElement(b,{fixedHeight:!0,columnData:Dn(s)?Ma:Ua,pagination:!1,rowData:Gn({data:r}),scroll:{y:300}})))},Ha=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.splits,r=void 0===n?[]:n,o=t.refunds,a=void 0===o?[]:o;return e.createElement("div",{className:"my-2 space-y-2"},!$(r)&&e.createElement("div",{className:"space-y-4"},e.createElement(h,{className:"ml-12",style:"h3"},St("common.splits")),e.createElement(za,{data:r})),!$(a)&&e.createElement("div",{className:"space-y-4"},e.createElement(h,{className:"ml-12",style:"h3"},St("title.refund")),e.createElement(za,{data:a,kind:"refund"})))};function qa(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Va(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qa(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qa(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ka=function(e){var t,n,r,o,a,i,s=e.kind,l=e.holdableId,c=e.payload,u=e.isPlatformEnabled,p={};return p.transfer=p.connected=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return A([ja,t],(function(){return _(e)?xa(e,t):Pa(t)}),arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}(l,Va(Va({},c),{},{kind:s}),{enabled:Tn(s)||Ln(s)}),p.refund=function(e){return A([Ra,e],(function(){return Da(e)}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(c,{enabled:Fn(s)}),p.platform=function(e,t){return A([ja,e],(function(){return Ba(e)}),t)}(c,{enabled:In(s)&&u}),p.split=function(e){return A([Ea,e],(function(){return Fa(e)}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(c,{enabled:Dn(s)}),{data:_n(null===(t=p[s])||void 0===t?void 0:t.data,s),dataSize:null===(n=p[s])||void 0===n||null===(r=n.data)||void 0===r||null===(o=r.counts)||void 0===o?void 0:o[null==c?void 0:c.tab],isDataLoading:null===(a=p[s])||void 0===a?void 0:a.isLoading,isDataFetching:null===(i=p[s])||void 0===i?void 0:i.isFetching}},Wa=function(t){var n=t.expanded,r=t.onExpand,o=t.record;return t.expandable&&(n?e.createElement(D,{className:"cursor-pointer",onClick:function(e){return r(o,e)}}):e.createElement(T,{className:"cursor-pointer",onClick:function(e){return r(o,e)}}))},Ga=["transactionId"],Ja=function(t){var n=t.transactionId,r=Pt(t,Ga),o=Ht().t,a=function(e){return A([Aa,e],(function(){return _a(e)}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(n),i=a.isLoading,s=a.data,l=void 0===s?{}:s,c=l.amount,u=l.netAmount,p=l.status,f=l.paymentAt,d=l.identifier,y=l.live,g=l.splits,m=void 0===g?[]:g;return e.createElement(O,Vt({},r,{size:"large"}),e.createElement(O.Header,null,e.createElement(h,{style:"h2"},"Transaction Details")),e.createElement(O.Body,null,i?e.createElement(te,null):e.createElement("div",{className:"w-full space-y-6 p-2"},e.createElement("div",{className:"w-full space-y-2"},e.createElement("div",{className:"grid grid-cols-2 gap-y-2"},e.createElement(h,{style:"body2"},o("transactionPane.transactionId")),e.createElement(h,{style:"body2"},yn({identifier:d,live:y})),e.createElement(h,{style:"body2"},o("transactionPane.amount")),e.createElement(h,{style:"body2"},c),e.createElement(h,{style:"body2"},o("transactionPane.netAmount")),e.createElement(h,{style:"body2"},u),e.createElement(h,{style:"body2"},o("transactionPane.status")),un("transaction",p),e.createElement(h,{style:"body2"},o("transactionPane.paidOn")),e.createElement(h,{style:"body2"},pn(f)))),e.createElement(h,{style:"h3"},"Splits"),e.createElement(za,{className:"ml-0 w-full",data:m}))))},$a=function(t){var n,o,i,s=t.isPlatformEnabled,l=void 0!==s&&s,c=t.kind,u=t.holdableId,p=void 0===u?null:u,f=t.filters,d=t.setIsFilterButtonVisible,y=t.pageProperties,g=t.payableEntityColumns,m=t.setPageProperties,h=t.tab,v=t.handleTabChange,O=t.setDataSize,S=t.sortProperties,P=t.setSortProperties,x=_t(r(En),2),k=x[0],j=x[1],E=Un(),N=ee(),R=Ht().t,C=kn.filter((function(e){var t,n;return!(null!==(t=jn[e])&&void 0!==t&&null!==(n=t.isHidden)&&void 0!==n&&n[c])})),L=Bn({tab:h,kind:c,payableEntityColumns:g,specialColumnArguments:{setPaneStatus:j}}),D=A(ka,(function(){return Ta()}),{enabled:l}),T=D.isLoading,F=D.data,B=(void 0===F?{}:F).platformAccount,M=function(e){return A([Na,e],(function(){return $n(e)}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(p),z=M.isLoading,H=M.data,q=(void 0===H?{}:H).account,V=Ka({kind:c,holdableId:p,payload:Wn({tab:h,filters:f,pageProperties:y,sortProperties:S}),isPlatformEnabled:l}),K=V.data,W=V.isDataLoading,G=V.dataSize,J=V.isDataFetching,Q=(null==q?void 0:q.isConnected)||(null==B?void 0:B.isConnected);a((function(){d(_(K)||_(f)),O(G)}),[K]);var Z=function(e,t){E.set("page",e),E.set("size",t),N.push({search:E.toString()}),m(Y(h,{index:e,size:t}))};a((function(){Z(I,45),P(Xt)}),[f,h]),a((function(){var e,t,n=E.get("tab")||bn.all,r=C.includes(n)?n:bn.all,o=Number(E.get("page"))||(null===(e=y[n])||void 0===e?void 0:e.index),a=Number(E.get("size"))||(null===(t=y[n])||void 0===t?void 0:t.size);v(r),E.set("tab",r),Z(o,a)}),[E]);return z||T||W?e.createElement(te,null):!Q&&G<=0||!_(K)?e.createElement("div",{className:"flex h-full w-full items-center justify-center"},e.createElement(w,{title:Fn(c)?R("emptyState.refund"):R("emptyState.payment")})):e.createElement(e.Fragment,null,e.createElement(ne,{hasPagination:G>(null===(n=y[h])||void 0===n?void 0:n.size)},e.createElement(b,{fixedHeight:!0,allowRowClick:!1,columnData:L,currentPageNumber:null===(o=y[h])||void 0===o?void 0:o.index,handlePageChange:Z,loading:J,rowData:Gn({data:K,pageProperties:y,tab:h}),rowSelection:!1,sortDirections:en,totalCount:G,expandable:{expandedRowRender:Ha,showExpandColumn:In(c),rowExpandable:function(e){return!($(e.splits)&&$(e.refunds))},columnWidth:"64px",expandIcon:Wa},paginationProps:{showSizeChanger:!0,hideOnSinglePage:!0,pageSize:null===(i=y[h])||void 0===i?void 0:i.size,total:G},onChange:function(e,t,n){P(_(null==n?void 0:n.column)?{column:U(n.field),direction:"ascend"===n.order?"ASC":"DESC"}:Xt)}})),e.createElement(Ja,Vt({},k,{onClose:function(){return j(En)}})))};function Ya(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qa(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ya(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ya(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Za=l(Wt((function(t){var n=t.isPlatformEnabled,o=void 0!==n&&n,a=t.searchProps,i=t.headerProps,l=void 0===i?{}:i,c=t.holdableId,d=void 0===c?null:c,y=t.payableEntityColumns,g=void 0===y?[]:y,m=t.kind,v=void 0===m?"connected":m,b=_t(s(),2);b[0];var O=b[1],w=Ht().t,P=_t(r(!1),2),x=P[0],k=P[1],j=Jn({payableEntityColumns:g,kind:v}),E=j.searchTerm,N=j.pageProperties,A=j.filterableColumns,R=j.isFilterButtonVisible,C=j.isFilterPaneOpen,I=j.filters,L=j.tabs,D=j.tab,T=j.dataSize,F=j.sortProperties,B=j.setSearchTerm,_=j.setIsFilterButtonVisible,M=j.setIsFilterPaneOpen,U=j.setFilters,z=j.setPageProperties,H=j.handleTabChange,q=j.setDataSize,V=j.setSortProperties,G=R||"all"!==D,J=Qa(Qa({},function(e){var t,n,r=e.searchProps,o=e.kind;return K({node:W(null===(t=Nn[o])||void 0===t?void 0:t.node),model:W(null===(n=Nn[o])||void 0===n?void 0:n.model)},r)}({searchProps:a,kind:v})),{},{value:E.trim(),setValue:B}),$=function(e){O((function(){U(e)}))};return e.createElement(e.Fragment,null,e.createElement(p,Vt({title:w("title.".concat(v))},l,{searchProps:{onChange:function(e){var t=e.target.value;return B(t)},value:E,placeholder:J.placeholder,className:"w-80"}})),G&&e.createElement(S,null,L.map((function(t){return e.createElement(S.Item,{active:D===t,key:t,onClick:function(){return H(t)}},w("common.".concat(t)))}))),e.createElement(f,{className:"mt-4",leftActionBlock:G&&0!==T&&e.createElement(h,{className:"neeto-ui-gray-800 mr-2 font-semibold",component:"h4"},w("countOf.".concat(v),{count:T})),rightActionBlock:e.createElement(e.Fragment,null,e.createElement(u,{columns:A,keyword:J,setIsPaneOpen:M,onChange:$}),R&&e.createElement(f.RightBlock,{downloadButtonProps:{onClick:function(){return k(!0)}},filterProps:{columns:A,isOpen:C,keyword:J,setIsOpen:M,onChange:$}}))}),e.createElement($a,{filters:I,handleTabChange:H,holdableId:d,isPlatformEnabled:o,kind:v,pageProperties:N,payableEntityColumns:g,setDataSize:q,setIsFilterButtonVisible:_,setPageProperties:z,setSortProperties:V,sortProperties:F,tab:D}),e.createElement(Mn,{filters:I,holdableId:d,kind:v,setShowExportModal:k,showExportModal:x,sortProperties:F,tab:D}))})),St("common.payments"));function Xa(e,t,n,r,o,a,i){try{var s=e[a](i),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,o)}function ei(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Xa(a,r,o,i,s,"next",e)}function s(e){Xa(a,r,o,i,s,"throw",e)}i(void 0)}))}}var ti={},ni={get exports(){return ti},set exports(e){ti=e}},ri={};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}({get exports(){return ri},set exports(e){ri=e}}),function(e){var t=ri.default;function n(){e.exports=n=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var r={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),s=new N(r||[]);return i(a,"_invoke",{value:x(e,n,s)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}r.wrap=f;var y={};function g(){}function m(){}function h(){}var v={};p(v,l,(function(){return this}));var b=Object.getPrototypeOf,O=b&&b(b(A([])));O&&O!==o&&a.call(O,l)&&(v=O);var w=h.prototype=g.prototype=Object.create(v);function S(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,n){function r(o,i,s,l){var c=d(e[o],e,i);if("throw"!==c.type){var u=c.arg,p=u.value;return p&&"object"==t(p)&&a.call(p,"__await")?n.resolve(p.__await).then((function(e){r("next",e,s,l)}),(function(e){r("throw",e,s,l)})):n.resolve(p).then((function(e){u.value=e,s(u)}),(function(e){return r("throw",e,s,l)}))}l(c.arg)}var o;i(this,"_invoke",{value:function(e,t){function a(){return new n((function(n,o){r(e,t,n,o)}))}return o=o?o.then(a,a):a()}})}function x(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return R()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=k(i,n);if(s){if(s===y)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=d(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function k(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=d(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,y;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,y):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function N(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function A(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(a.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:R}}function R(){return{value:void 0,done:!0}}return m.prototype=h,i(w,"constructor",{value:h,configurable:!0}),i(h,"constructor",{value:m,configurable:!0}),m.displayName=p(h,u,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,p(e,u,"GeneratorFunction")),e.prototype=Object.create(w),e},r.awrap=function(e){return{__await:e}},S(P.prototype),p(P.prototype,c,(function(){return this})),r.AsyncIterator=P,r.async=function(e,t,n,o,a){void 0===a&&(a=Promise);var i=new P(f(e,t,n,o),a);return r.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},S(w),p(w,u,"Generator"),p(w,l,(function(){return this})),p(w,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},r.values=A,N.prototype={constructor:N,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var s=a.call(o,"catchLoc"),l=a.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),y}},r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(ni);var oi=ti(),ai=oi;try{regeneratorRuntime=oi}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=oi:Function("r","regeneratorRuntime = r")(oi)}var ii=["focusClassAdded","focusClassRemoved","errorClassAdded","errorClassRemoved","cardBrandChanged","postalCodeChanged"],si={},li=function(t){var n=t.card,o=t.setCard,i=t.id,s=void 0===i?"square-card-container":i,l=t.onChange,c=void 0===l?B:l,u=t.options,p=void 0===u?si:u,f=t.disabled,d=void 0!==f&&f,y=function(){var e=_t(r(),2),t=e[0],n=e[1],o=process.env.SQUARE_APPLICATION_ID,i=process.env.SQUARE_CLIENT_LOCATION;return a((function(){var e=function(){var e=ei(ai.mark((function e(){var t,r,a,s;return ai.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=function(){return Promise.resolve().then((function(){return qi}))},e.next=3,t();case 3:return r=e.sent,a=r.payments,e.next=7,a(o,i);case 7:if(s=e.sent){e.next=10;break}throw new Error("Square Web Payments SDK failed to load");case 10:n(s);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();o&&i&&e()}),[o,i]),t}();return a((function(){var e=function(){var e=ei(ai.mark((function e(){var t;return ai.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==y?void 0:y.card();case 2:return t=e.sent,e.next=5,null==t?void 0:t.attach("#".concat(s));case 5:o(t||null);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[y,s]),a((function(){ii.forEach((function(e){return null==n?void 0:n.addEventListener(e,c)}))}),[n,c]),a((function(){null==n||n.configure(p)}),[n,p]),e.createElement("div",{id:s,className:oe({"pointer-events-none":d,"text-center":!n})},!n&&e.createElement(P,null))};function ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ui(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ci(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var pi=function(t){var n=t.searchProps,r=t.headerProps,o=void 0===r?{}:r,a=t.children,i=t.title,l=t.searchTerm,c=t.filterableColumns,d=t.isFilterButtonVisible,y=t.isFilterPaneOpen,g=t.tabs,m=t.tab,v=t.setSearchTerm,b=t.setIsFilterPaneOpen,O=t.setFilters,w=t.handleTabChange,P=t.dataSize,x=t.kind,k=_t(s(),2);k[0];var j=k[1],E=Ht().t,N=d||"all"!==m,A=ui(ui({},n),{},{value:l.trim(),setValue:v}),R=function(e){j((function(){O(e)}))};return e.createElement(e.Fragment,null,e.createElement(p,Vt({},ui(ui({},o),{},{title:i}),{searchProps:{onChange:function(e){var t=e.target.value;return v(t)},value:l,placeholder:A.placeholder,className:"w-80"}})),N&&e.createElement(S,null,g.map((function(t){return e.createElement(S.Item,{active:m===t,key:t,onClick:function(){return w(t)}},E("common.".concat(t)))}))),e.createElement(f,{className:"mt-4",leftActionBlock:N&&0!==P&&e.createElement(h,{className:"neeto-ui-gray-800 mr-2 font-semibold",component:"h4"},E("countOf.".concat(x),{count:P})),rightActionBlock:e.createElement(e.Fragment,null,e.createElement(u,{columns:c,keyword:A,setIsPaneOpen:b,onChange:R}),d&&e.createElement(f.RightBlock,{filterProps:{columns:c,isOpen:y,keyword:A,setIsOpen:b,onChange:R}}))}),a)},fi=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.identifier,r=void 0===n?"":n,o=t.receiptUrl,a=void 0===o?"":o;return e.createElement(ln,{content:r},e.createElement(m,{href:a,label:r,size:"small",style:"link",target:"_blank"}))},di=[{title:St("common.id"),dataIndex:"id",key:"id",width:"72px"},{title:St("common.identifier"),dataIndex:"identifier",key:"identifier",width:"290px",render:fi},{title:St("common.status"),dataIndex:"status",key:"status",render:un("payment")},{title:St("common.identifier"),dataIndex:"identifier",key:"refundIdentifier",width:"290px",render:function(t){var n=t.identifier;return e.createElement(y,{content:n,position:"top"},e.createElement("div",{className:"w-64 truncate"},n))}},{title:St("common.status"),dataIndex:"status",key:"refundStatus",render:un("refund")},{title:St("common.paymentIdentifier"),dataIndex:"payment",key:"paymentIdentifier",width:"290px",render:fi},{title:St("common.amount"),dataIndex:"amount",key:"amount",width:"150px"},{title:St("common.paymentTime"),dataIndex:"updatedAt",key:"paymentTime",width:"220px",render:pn}],yi={identifier:{isHidden:{squareRefund:!0}},status:{isHidden:{squareRefund:!0,completed:!0,failed:!0}},refundIdentifier:{isHidden:{squarePayment:!0}},refundStatus:{isHidden:{squarePayment:!0,completed:!0,pending:!0,rejected:!0}},paymentIdentifier:{isHidden:{squarePayment:!0}}},gi=V("squareRefund"),mi=V("squarePayment"),hi=function(e){var t=e.payableEntityColumns,n=e.kind,o=e.initialTabs,a=e.tabMetaData,i=Un(),s=ee(),l=o.filter((function(e){var t,r;return!(null!==(t=a[e])&&void 0!==t&&null!==(r=t.isHidden)&&void 0!==r&&r[n])})),u=_t(r(!1),2),p=u[0],f=u[1],d=_t(r(!1),2),y=d[0],g=d[1],m=_t(r(Kn(l)),2),h=m[0],v=m[1],b=_t(r(""),2),O=b[0],w=b[1],S=_t(r("all"),2),P=S[0],x=S[1],k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return W(Qt,G(J("filterProps"),M({isFilterable:!0},e)))}(t),j=_t(r(c(k)),2),E=j[0],N=j[1],A=_t(r(0),2),R=A[0],C=A[1];return{isFilterButtonVisible:p,isFilterPaneOpen:y,pageProperties:h,filters:E,searchTerm:O,tabs:l,tab:P,filterableColumns:k,dataSize:R,setIsFilterButtonVisible:f,setIsFilterPaneOpen:g,setPageProperties:v,setFilters:N,setSearchTerm:w,setTab:x,handleTabChange:function(e){var t,n;i.set("tab",e),i.set("page",null===(t=h[e])||void 0===t?void 0:t.index),i.set("size",null===(n=h[e])||void 0===n?void 0:n.size),s.push({search:i.toString()}),x(e)},setDataSize:C}},vi={all:"all",completed:"completed",pending:"pending",rejected:"rejected",failed:"failed"},bi=Object.values(vi),Oi={all:{},completed:{},pending:{isHidden:{squarePayment:!0}},rejected:{isHidden:{squarePayment:!0}},failed:{isHidden:{squareRefund:!0}}},wi=function(e){return F.get("".concat(Gt,"/api/v1/square/holdables/").concat(e,"/account"))},Si=function(){return F.get("".concat(Gt,"/api/v1/square/holdable/account"))},Pi=function(e){return F.get("".concat(Gt,"/api/v1/square/holdable/payments"),{params:e})},xi=function(e,t){return F.get("".concat(Gt,"/api/v1/square/holdables/").concat(e,"/payments"),{params:t})},ki=function(e){return F.get("".concat(Gt,"/api/v1/square/holdable/refunds"),{params:e})},ji=function(e,t){return F.get("".concat(Gt,"/api/v1/square/holdables/").concat(e,"/refunds"),{params:t})},Ei=function(e){var t,n,r,o,a,i,s,l,c=e.kind,u=e.holdableId,p=e.payload,f={};return f.squarePayment=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return A([Ia,t],(function(){return _(e)?xi(e,t):Pi(t)}),arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}(u,p,{enabled:mi(c)}),f.squareRefund=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return A([La,t],(function(){return _(e)?ji(e,t):ki(t)}),arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}(u,p,{enabled:gi(c)}),{data:mi(c)?null===(t=f[c])||void 0===t||null===(n=t.data)||void 0===n?void 0:n.payments:null===(r=f[c])||void 0===r||null===(o=r.data)||void 0===o?void 0:o.refunds,dataSize:null===(a=f[c])||void 0===a||null===(i=a.data)||void 0===i||null===(s=i.views)||void 0===s?void 0:s[null==p?void 0:p.tab],isDataLoading:null===(l=f[c])||void 0===l?void 0:l.isLoading}},Ni=function(t){var n,r,o,i=t.kind,s=t.holdableId,l=void 0===s?null:s,c=t.filters,u=t.setIsFilterButtonVisible,p=t.pageProperties,f=t.payableEntityColumns,d=t.setPageProperties,y=t.tab,g=t.tabs,m=t.handleTabChange,h=t.setDataSize,v=Un(),O=ee(),S=Ht().t,P=function(e){var t=e.tab,n=e.kind,r=e.payableEntityColumns,o=void 0===r?[]:r;return di.filter((function(e){var r,o,a,i,s=e.key;return!(null!==(r=yi[s])&&void 0!==r&&null!==(o=r.isHidden)&&void 0!==o&&o[n]||null!==(a=yi[s])&&void 0!==a&&null!==(i=a.isHidden)&&void 0!==i&&i[t])})).concat(o.filter((function(e){var r=e.isHidden;return!(null!=r&&r[t]||null!=r&&r[n])})))}({tab:y,kind:i,payableEntityColumns:f}),x=function(e){return A([Ca,e],(function(){return _(e)?wi(e):Si()}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(l),k=x.isLoading,j=x.data,E=(void 0===j?{}:j).account,N=Ei({kind:i,holdableId:l,payload:Wn({tab:y,filters:c,pageProperties:p})}),R=N.data,C=N.isDataLoading,I=N.dataSize;a((function(){u(_(R)||_(c)),h(I)}),[R]);var L=function(e,t){v.set("page",e),v.set("size",t),O.push({search:v.toString()}),d(Y(y,{index:e,size:t}))};return a((function(){var e,t,n=v.get("tab")||vi.all,r=g.includes(n)?n:vi.all,o=Number(v.get("page"))||(null===(e=p[n])||void 0===e?void 0:e.index),a=Number(v.get("size"))||(null===(t=p[n])||void 0===t?void 0:t.size);m(r),v.set("tab",r),L(o,a)}),[v]),k||C?e.createElement(te,null):(null==E||!E.isConnected)&&I<=0||!_(R)?e.createElement("div",{className:"flex h-full w-full items-center justify-center"},e.createElement(w,{title:gi(i)?S("emptyState.refund"):S("emptyState.payment")})):e.createElement(ne,{hasPagination:I>(null===(n=p[y])||void 0===n?void 0:n.size)},e.createElement(b,{fixedHeight:!0,allowRowClick:!1,columnData:P,currentPageNumber:null===(r=p[y])||void 0===r?void 0:r.index,handlePageChange:L,rowData:Gn({data:R,pageProperties:p,tab:y}),rowSelection:!1,totalCount:I,paginationProps:{showSizeChanger:!0,hideOnSinglePage:!0,pageSize:null===(o=p[y])||void 0===o?void 0:o.size,total:I}}))};function Ai(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Ri=l(Wt((function(t){var n=t.searchProps,r=t.headerProps,o=void 0===r?{}:r,a=t.holdableId,i=void 0===a?null:a,s=t.payableEntityColumns,l=void 0===s?[]:s,c=t.kind,u=void 0===c?"squarePayment":c,p=hi({payableEntityColumns:l,kind:u,initialTabs:bi,tabMetaData:Oi}),f=p.filters,d=p.setIsFilterButtonVisible,y=p.pageProperties,g=p.setPageProperties,m=p.tab,h=p.tabs,v=p.handleTabChange,b=p.setDataSize;return e.createElement(pi,Vt({title:mi(u)?St("title.squarePayment"):St("title.squareRefund")},function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ai(Object(n),!0).forEach((function(t){me(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ai(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({headerProps:o,kind:u,searchProps:n},p)),e.createElement(Ni,{filters:f,handleTabChange:v,holdableId:i,kind:u,pageProperties:y,payableEntityColumns:l,setDataSize:b,setIsFilterButtonVisible:d,setPageProperties:g,tab:m,tabs:h}))})),St("common.squarePayments")),Ci={standard:{title:St("alert.stripe.connectRestrictionTitle"),message:St("alert.stripe.connectRestrictionMessage")},platform:{title:St("alert.stripePlatform.connectRestrictionTitle"),message:St("alert.stripePlatform.connectRestrictionMessage")}},Ii=["isOpen","paymentKind","onClose"],Li=function(t){var n=t.isOpen,r=void 0!==n&&n,o=t.paymentKind,a=void 0===o?"standard":o,i=t.onClose,s=void 0===i?B:i,l=Pt(t,Ii);return e.createElement(x,Vt({isOpen:r,onClose:s,message:Ci[a].message,title:Ci[a].title},l))},Di=function(){var e=_t(r((function(){})),2),t=e[0],n=e[1],o=function(){var e=ei(ai.mark((function e(){var n,r;return ai.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return logger.warn("Credit Card button was clicked, but no Credit Card instance was found."),e.abrupt("return","");case 3:return e.prev=3,e.next=6,t.tokenize();case 6:if(null==(n=e.sent)||!n.errors){e.next=10;break}throw r="Status: ".concat(n.status," and Errors: ").concat(JSON.stringify(null==n?void 0:n.errors)),new Error(r);case 10:return e.abrupt("return",null==n?void 0:n.token);case 13:return e.prev=13,e.t0=e.catch(3),logger.error(e.t0),e.abrupt("return","");case 17:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(){return e.apply(this,arguments)}}();return{card:t,setCard:n,tokenizeCard:o}},Ti=function(e){var t=i(ei(ai.mark((function t(){var n,r,o;return ai.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!z(e)){t.next=2;break}return t.abrupt("return",null);case 2:return n=function(){return Promise.resolve().then((function(){return Qi}))},t.prev=3,t.next=6,n();case 6:return r=t.sent,o=r.loadStripe,t.next=10,o(null==ae?void 0:ae.stripePublishableKey,{stripeAccount:e});case 10:return t.abrupt("return",t.sent);case 13:t.prev=13,t.t0=t.catch(3),logger.error(t.t0);case 16:return t.abrupt("return",null);case 17:case"end":return t.stop()}}),t,null,[[3,13]])}))),[e]);return t},Fi=[],Bi=[];!function(e,t){if(e&&"undefined"!=typeof document){var n,r=!0===t.prepend?"prepend":"append",o=!0===t.singleTag,a="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var i=Fi.indexOf(a);-1===i&&(i=Fi.push(a)-1,Bi[i]={}),n=Bi[i]&&Bi[i][r]?Bi[i][r]:Bi[i][r]=s()}else n=s();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function s(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),o=0;o<n.length;o++)e.setAttribute(n[o],t.attributes[n[o]]);var i="prepend"===r?"afterbegin":"beforeend";return a.insertAdjacentElement(i,e),e}}(".ant-table-cell-row-hover .identifier-copy-button{visibility:visible!important}",{});var _i=(e,t,n)=>new Promise(((r,o)=>{var a=e=>{try{s(n.next(e))}catch(e){o(e)}},i=e=>{try{s(n.throw(e))}catch(e){o(e)}},s=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,i);s((n=n.apply(e,t)).next())}));var Mi=null;function Ui(e){return null!==Mi||(Mi=new Promise(((t,n)=>{if("undefined"!=typeof window)if(window.Square)t(window.Square);else try{let r=function(e){return document.querySelector(`script[src="${e}"]`)}(e);r||(r=function(e){let t=document.head||document.body;if(!t)throw new Error("Square.js requires a <body> or <head> element.");let n=document.createElement("script");return n.src=e,t.appendChild(n),n}(e)),r.addEventListener("load",(()=>{window.Square?t(window.Square):n(new Error("Square.js failed to load properly."))})),r.addEventListener("error",(()=>{n(new Error("Error occurred while loading Square.js"))}))}catch(e){n(e)}else t(null)}))),Mi}var zi="v1",Hi=class extends Error{constructor(e="The Payment 'applicationId' option is not in the correct format."){super(e),this.name="InvalidApplicationIdError",Object.setPrototypeOf(this,Hi.prototype)}};var qi=Object.freeze({__proto__:null,payments:function(e,t,n){return _i(this,null,(function*(){let r=void 0!==(null==n?void 0:n.scriptSrc)?n.scriptSrc:function(e){let t="";if(e.startsWith("sq0idp-")&&(t="https://web.squarecdn.com/"),e.startsWith("sandbox-sq0idb-")&&(t="https://sandbox.web.squarecdn.com/"),0===t.length)throw new Hi;return t+=`${zi}/square.js`,t}(e),o=yield Ui(r);return null===o?null:o.payments(e,t)}))}}),Vi="https://js.stripe.com/v3",Ki=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Wi="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Gi=null,Ji=function(e){return null!==Gi||(Gi=new Promise((function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(Wi),window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Vi,'"]')),t=0;t<e.length;t++){var n=e[t];if(Ki.test(n.src))return n}return null}();r&&e?console.warn(Wi):r||(r=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(Vi).concat(t);var r=document.head||document.body;if(!r)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(n),n}(e)),r.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),r.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}))),Gi},$i=Promise.resolve().then((function(){return Ji(null)})),Yi=!1;$i.catch((function(e){Yi||console.warn(e)}));var Qi=Object.freeze({__proto__:null,loadStripe:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Yi=!0;var r=Date.now();return $i.then((function(e){return function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.52.1",startTime:t})}(r,n),r}(e,t,r)}))}});export{$t as CURRENCY_OPTIONS,Za as Dashboard,Li as PaymentKindRestrictionAlert,li as SquareCard,Ri as SquareDashboard,nn as buildStripeTransactionLink,Di as useSquareCard,Ti as useStripePromise};
|
|
1
|
+
import e,{useState as t,useMemo as n,useEffect as r,useTransition as o}from"react";import{t as a}from"i18next";import{withTitle as i}from"@bigbinary/neeto-commons-frontend/react-utils";import{buildFiltersFromURL as l,Bar as c}from"@bigbinary/neeto-filters-frontend";import u from"@bigbinary/neeto-molecules/Header";import s from"@bigbinary/neeto-molecules/SubHeader";import{Toastr as p,Tooltip as d,Tag as f,Button as y,Typography as m,Modal as b,Table as v,Pane as h,NoData as g,Tab as P,Spinner as S,Alert as w}from"@bigbinary/neetoui";import{useTranslation as E}from"react-i18next";import{QueryClient as O,QueryCache as x,QueryClientProvider as j,useMutation as k,useQuery as A}from"react-query";import{ReactQueryDevtools as I}from"react-query/devtools";import{DEFAULT_STALE_TIME as N,DEFAULT_PAGE_INDEX as C}from"@bigbinary/neeto-commons-frontend/constants";import{Download as D,Down as T,Right as F}from"@bigbinary/neeto-icons";import R from"axios";import{noop as _,isPresent as L,filterBy as B,camelToSnakeCase as M,isNotPresent as z}from"@bigbinary/neeto-cist";import{createSubscription as H}from"@bigbinary/neeto-commons-frontend/utils";import{curry as U,equals as q,evolve as W,concat as G,map as V,prop as K,isEmpty as $,assoc as J}from"ramda";import Q from"@bigbinary/neeto-molecules/CopyToClipboardButton";import Y from"@bigbinary/neeto-molecules/DateFormat";import{useLocation as Z,useHistory as X}from"react-router-dom";import ee from"@bigbinary/neeto-molecules/PageLoader";import te from"@bigbinary/neeto-molecules/TableWrapper";import ne from"util";import re from"classnames";import{globalProps as oe}from"@bigbinary/neeto-commons-frontend/initializers";function ae(){return ae=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ae.apply(this,arguments)}function ie(e){return ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ie(e)}function le(e){var t=function(e,t){if("object"!==ie(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===ie(t)?t:String(t)}function ce(e,t,n){return(t=le(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function se(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,a,i,l=[],c=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(l.push(r.value),l.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw o}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ue(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var pe=new O({queryCache:new x,defaultOptions:{queries:{staleTime:N,keepPreviousData:!0,onError:function(e){return p.error(e)}}}}),de=function(t){return function(n){return e.createElement(j,{client:pe},e.createElement(t,n),e.createElement(I,{initialIsOpen:!1,position:"bottom-right"}))}},fe="payments",ye="https://dashboard.stripe.com/",me=[{label:"USD",value:"usd"},{label:"AED",value:"aed"},{label:"AFN",value:"afn"},{label:"ALL",value:"all"},{label:"AMD",value:"amd"},{label:"ANG",value:"ang"},{label:"AOA",value:"aoa"},{label:"ARS",value:"ars"},{label:"AUD",value:"aud"},{label:"AWG",value:"awg"},{label:"AZN",value:"azn"},{label:"BAM",value:"bam"},{label:"BBD",value:"bbd"},{label:"BDT",value:"bdt"},{label:"BGN",value:"bgn"},{label:"BIF",value:"bif"},{label:"BMD",value:"bmd"},{label:"BND",value:"bnd"},{label:"BOB",value:"bob"},{label:"BRL",value:"brl"},{label:"BSD",value:"bsd"},{label:"BWP",value:"bwp"},{label:"BYN",value:"byn"},{label:"BZD",value:"bzd"},{label:"CAD",value:"cad"},{label:"CDF",value:"cdf"},{label:"CHF",value:"chf"},{label:"CLP",value:"clp"},{label:"CNY",value:"cny"},{label:"COP",value:"cop"},{label:"CRC",value:"crc"},{label:"CVE",value:"cve"},{label:"CZK",value:"czk"},{label:"DJF",value:"djf"},{label:"DKK",value:"dkk"},{label:"DOP",value:"dop"},{label:"DZD",value:"dzd"},{label:"EGP",value:"egp"},{label:"ETB",value:"etb"},{label:"EUR",value:"eur"},{label:"FJD",value:"fjd"},{label:"FKP",value:"fkp"},{label:"GBP",value:"gbp"},{label:"GEL",value:"gel"},{label:"GIP",value:"gip"},{label:"GMD",value:"gmd"},{label:"GNF",value:"gnf"},{label:"GTQ",value:"gtq"},{label:"GYD",value:"gyd"},{label:"HKD",value:"hkd"},{label:"HNL",value:"hnl"},{label:"HTG",value:"htg"},{label:"HUF",value:"huf"},{label:"IDR",value:"idr"},{label:"ILS",value:"ils"},{label:"INR",value:"inr"},{label:"ISK",value:"isk"},{label:"JMD",value:"jmd"},{label:"JPY",value:"jpy"},{label:"KES",value:"kes"},{label:"KGS",value:"kgs"},{label:"KHR",value:"khr"},{label:"KMF",value:"kmf"},{label:"KRW",value:"krw"},{label:"KYD",value:"kyd"},{label:"KZT",value:"kzt"},{label:"LAK",value:"lak"},{label:"LBP",value:"lbp"},{label:"LKR",value:"lkr"},{label:"LRD",value:"lrd"},{label:"LSL",value:"lsl"},{label:"MAD",value:"mad"},{label:"MDL",value:"mdl"},{label:"MGA",value:"mga"},{label:"MKD",value:"mkd"},{label:"MMK",value:"mmk"},{label:"MNT",value:"mnt"},{label:"MOP",value:"mop"},{label:"MRO",value:"mro"},{label:"MUR",value:"mur"},{label:"MVR",value:"mvr"},{label:"MWK",value:"mwk"},{label:"MXN",value:"mxn"},{label:"MYR",value:"myr"},{label:"MZN",value:"mzn"},{label:"NAD",value:"nad"},{label:"NGN",value:"ngn"},{label:"NIO",value:"nio"},{label:"NOK",value:"nok"},{label:"NPR",value:"npr"},{label:"NZD",value:"nzd"},{label:"PAB",value:"pab"},{label:"PEN",value:"pen"},{label:"PGK",value:"pgk"},{label:"PHP",value:"php"},{label:"PKR",value:"pkr"},{label:"PLN",value:"pln"},{label:"PYG",value:"pyg"},{label:"QAR",value:"qar"},{label:"RON",value:"ron"},{label:"RSD",value:"rsd"},{label:"RUB",value:"rub"},{label:"RWF",value:"rwf"},{label:"SAR",value:"sar"},{label:"SBD",value:"sbd"},{label:"SCR",value:"scr"},{label:"SEK",value:"sek"},{label:"SGD",value:"sgd"},{label:"SHP",value:"shp"},{label:"SLE",value:"sle"},{label:"SOS",value:"sos"},{label:"SRD",value:"srd"},{label:"STD",value:"std"},{label:"SZL",value:"szl"},{label:"THB",value:"thb"},{label:"TJS",value:"tjs"},{label:"TOP",value:"top"},{label:"TRY",value:"try"},{label:"TTD",value:"ttd"},{label:"TWD",value:"twd"},{label:"TZS",value:"tzs"},{label:"UAH",value:"uah"},{label:"UGX",value:"ugx"},{label:"UYU",value:"uyu"},{label:"UZS",value:"uzs"},{label:"VND",value:"vnd"},{label:"VUV",value:"vuv"},{label:"WST",value:"wst"},{label:"XAF",value:"xaf"},{label:"XCD",value:"xcd"},{label:"XOF",value:"xof"},{label:"XPF",value:"xpf"},{label:"YER",value:"yer"},{label:"ZAR",value:"zar"},{label:"ZMW",value:"zmw"}],be={page:C,pageSize:45},ve=[{key:"amount",label:a("neetoPayments.common.amount"),node:"amount",type:"decimal",showRuleSelector:!0}],he={successful:"success",declined:"danger",initiated:"primary",canceled:"secondary",cancelled:"secondary",refunded:"secondary",failed:"danger",completed:"success",rejected:"danger"},ge={sortBy:"updated_at",orderBy:"DESC"},Pe=["ascend","descend"],Se=function(e){return R.post("".concat(fe,"/api/v1/stripe/exports"),e)},we=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"".concat(ye).concat(t?"":"test/","payments/").concat(e)},Ee=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"".concat(ye).concat(t?"":"test/","connect/transfers/").concat(e)},Oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return"".concat(ye).concat(t,"/").concat(n?"":"test/","payments/").concat(e)},xe=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"".concat(ye).concat(t?"":"test/","connect/accounts/").concat(e)},je=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return"".concat(ye).concat(t?"":"test/","refunds/").concat(e)},ke=function(t){var n=t.content,r=t.children;return e.createElement("div",{className:"flex items-center space-x-2"},r,L(n)&&e.createElement("div",{className:"identifier-copy-button invisible"},e.createElement(Q,{size:"small",style:"text",value:n})))},Ae=function(e){return he[e]||"warning"},Ie=U((function(t,n,r){var o=function(e,t){return"transaction"===e&&(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).isRefunded?"refunded":t}(t,n,r);return e.createElement(d,{content:a("neetoPayments.tooltipContent.".concat(t,".").concat(o)),position:"top"},e.createElement("div",{className:"w-fit"},e.createElement(f,{label:a("neetoPayments.tagLabels.".concat(t,".").concat(o)),style:Ae(o)})))})),Ne=function(t){return e.createElement(Y.DateTime,{date:t})},Ce=function(t){var n=t.href,r=t.label;return e.createElement(y,{href:n,label:r,size:"small",style:"link",target:"_blank"})},De=e.memo(Ce),Te=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.identifier,r=void 0===n?"":n,o=t.live,a=void 0!==o&&o;return e.createElement(ke,{content:r},e.createElement(De,{href:we(r,a),label:r}))};U((function(t,n){return e.createElement(d,{content:a("neetoPayments.tooltipContent.".concat(t,".").concat(n)),position:"top"},e.createElement("div",{className:"w-fit"},e.createElement(f,{label:a("neetoPayments.tagLabels.".concat(t,".").concat(n)),style:"secondary"})))}));var Fe=function(t){var n=t.identifier,r=t.live;return n?e.createElement(ke,{content:n},e.createElement(De,{href:Ee(n,r),label:n})):e.createElement(d,{content:a("neetoPayments.tooltipContent.identifierUnavailable"),position:"top"},e.createElement("div",{className:"text-center"},e.createElement(m,{style:"body2"},a("neetoPayments.common.notAvailable"))))},Re=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.identifier,r=void 0===n?"":n,o=t.account,i=void 0===o?{}:o,l=t.live,c=void 0!==l&&l;return r?e.createElement(ke,{content:r},e.createElement(De,{label:r,href:r.startsWith("py")?Oe(r,null==i?void 0:i.identifier,c):we(r,c)})):e.createElement("div",{className:"text-center"},e.createElement(d,{position:"top",content:a("neetoPayments.tooltipContent.connectedTransactionUnavailable")},e.createElement(m,{style:"body2"},a("neetoPayments.common.notAvailable"))))},_e=U((function(t,n){return e.createElement(ke,{content:null==n?void 0:n.identifier},e.createElement(y,{label:null==n?void 0:n.identifier,size:"small",style:"link",onClick:function(){return t({transactionId:null==n?void 0:n.id,isOpen:!0})}}))})),Le=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.identifier,r=void 0===n?"":n,o=t.live,a=void 0!==o&&o;return e.createElement(ke,{content:r},e.createElement(De,{href:je(r,a),label:r}))},Be={all:"all",successful:"successful",declined:"declined",cancelled:"cancelled",failed:"failed",refunded:"refunded",pending:"pending"},Me="platform",ze="connected",He="split",Ue="transfer",qe="refund",We=Object.values(Be),Ge={all:{},successful:{},pending:{},declined:{isHidden:{split:!0,refund:!0}},refunded:{isHidden:{split:!0,refund:!0}},failed:{isHidden:{platform:!0,connected:!0,transfer:!0,split:!0}},cancelled:{isHidden:{platform:!0,connected:!0,transfer:!0,refund:!0}}},Ve={transactionId:"",isOpen:!1},Ke={platform:{node:"identifier,",model:"NeetoPaymentsEngine::Stripe::Transaction,"},split:{node:"identifier,account.identifier,connected_payment.identifier,payment_intent.identifier,",model:"NeetoPaymentsEngine::Stripe::Transactions::Split,NeetoPaymentsEngine::Stripe::Account,NeetoPaymentsEngine::Stripe::Transaction,NeetoPaymentsEngine::Stripe::Transaction,"},connected:{node:"identifier,",model:"NeetoPaymentsEngine::Stripe::Transaction,"},refund:{node:"identifier,payment_intent.identifier,",model:"NeetoPaymentsEngine::Stripe::Refund,NeetoPaymentsEngine::Stripe::Transaction,"},transfer:{node:"identifier,",model:"NeetoPaymentsEngine::Stripe::Transaction,"}},$e=[{title:a("neetoPayments.common.id"),dataIndex:"id",key:"id",width:"72px"},{title:a("neetoPayments.common.identifier"),dataIndex:"identifier",key:"identifier",width:"300px",render:Te},{title:a("neetoPayments.common.identifier"),dataIndex:"identifier",key:"splitIdentifier",width:"300px",render:Fe},{title:a("neetoPayments.common.identifier"),dataIndex:"identifier",key:"refundIdentifier",width:"300px",render:Le},{title:a("neetoPayments.common.identifier"),dataIndex:"identifier",key:"transferIdentifier",width:"300px",render:Re},{title:a("neetoPayments.common.status"),dataIndex:"status",key:"status",render:Ie("transaction"),sorter:!0},{title:a("neetoPayments.common.amount"),dataIndex:"amount",key:"amount",width:"150px",sorter:!0},{title:a("neetoPayments.common.paymentTime"),dataIndex:"paymentAt",key:"paymentTime",width:"220px",render:Ne,sorter:!0},{title:a("neetoPayments.common.status"),dataIndex:"status",key:"refundStatus",render:Ie("refund"),sorter:!0},{title:a("neetoPayments.common.paymentAmount"),dataIndex:"paymentAmount",key:"paymentAmount",width:"150px",sorter:!0},{title:a("neetoPayments.common.refundAmount"),dataIndex:"amount",key:"refundAmount",width:"150px",sorter:!0},{title:a("neetoPayments.common.refundTime"),dataIndex:"updatedAt",key:"refundTime",width:"220px",render:Ne,sorter:!0},{title:a("neetoPayments.common.status"),dataIndex:"status",key:"splitStatus",render:Ie("split"),sorter:!0},{title:a("neetoPayments.common.transferTime"),key:"splitTime",dataIndex:"paymentAt",width:"220px",render:function(t){return L(t)?Ne(t):e.createElement(d,{content:a("neetoPayments.tooltipContent.dateUnavailable"),position:"top"},e.createElement("div",{className:"text-center"},e.createElement(m,{style:"body2"},a("neetoPayments.common.notAvailable"))))},sorter:!0},{title:a("neetoPayments.common.paymentIdentifier"),key:"refundPaymentIdentifier",dataIndex:"transaction",width:"300px",render:Re},{title:a("neetoPayments.common.connectedTransaction"),dataIndex:["connectedPayment"],key:"connectedPayment",width:"300px",render:Re},{title:a("neetoPayments.common.accountIdentifier"),dataIndex:"account",key:"destinationAccount",width:"160px",render:function(t){var n=t.identifier,r=void 0===n?"":n,o=t.live,a=void 0!==o&&o;return e.createElement(ke,{content:r},e.createElement(De,{href:xe(r,a),label:r}))}}],Je={identifier:{isHidden:{split:!0,transfer:!0,refund:!0}},amount:{isHidden:{refund:!0}},paymentTime:{isHidden:{refund:!0,split:!0}},splitIdentifier:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0,pending:!0}},transferIdentifier:{isHidden:{platform:!0,split:!0,connected:!0,refund:!0}},status:{isHidden:{refund:!0,split:!0,declined:!0,pending:!0,successful:!0,refunded:!0}},refundStatus:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0,failed:!0,pending:!0,successful:!0}},refundAmount:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0}},refundTime:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0}},splitStatus:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0,declined:!0,pending:!0,successful:!0,cancelled:!0}},splitTime:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0}},paymentIntent:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0}},connectedPayment:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0,pending:!0}},refundPaymentIdentifier:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0}},refundIdentifier:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0}},destinationAccount:{isHidden:{platform:!0,refund:!0,connected:!0,transfer:!0}},paymentAmount:{isHidden:{platform:!0,split:!0,connected:!0,transfer:!0}}},Qe=[{key:"amount",label:a("neetoPayments.common.amount"),node:"amount",type:"decimal",showRuleSelector:!0},{key:"paymentAmount",label:a("neetoPayments.common.paymentAmount"),node:"payment_intent.amount",model:"NeetoPaymentsEngine::Stripe::Transaction",type:"decimal",showRuleSelector:!0},{key:"refundAmount",label:a("neetoPayments.common.refundAmount"),node:"amount",type:"decimal",showRuleSelector:!0},{key:"paymentTime",label:a("neetoPayments.common.paymentTime"),node:"payment_at",type:"date",showRuleSelector:!0},{key:"refundTime",label:a("neetoPayments.common.refundTime"),node:"updated_at",type:"date",showRuleSelector:!0},{key:"splitTime",label:a("neetoPayments.common.transferTime"),node:"payment_at",type:"date",showRuleSelector:!0}],Ye=q(Me),Ze=q(ze),Xe=q(He),et=q(Ue),tt=q(qe),nt=function(e){var t=e.tab,n=e.kind,r=e.payableEntityColumns,o=void 0===r?[]:r,i=e.specialColumnArguments,l=void 0===i?{}:i;return $e.concat(function(e){var t=e.setPaneStatus;return[{title:a("neetoPayments.common.platformTransaction"),dataIndex:"paymentIntent",key:"paymentIntent",width:"290px",render:_e(t)}]}(l)).filter((function(e){var r,o,a,i,l=e.key;return!(null!==(r=Je[l])&&void 0!==r&&null!==(o=r.isHidden)&&void 0!==o&&o[n]||null!==(a=Je[l])&&void 0!==a&&null!==(i=a.isHidden)&&void 0!==i&&i[t])})).concat(o.filter((function(e){var r=e.isHidden;return!(null!=r&&r[t]||null!=r&&r[n])})))},rt=function(e,t){return Xe(t)?null==e?void 0:e.splits:tt(t)?null==e?void 0:e.refunds:null==e?void 0:e.transactions};function ot(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var at=function(o){var a=o.showExportModal,i=o.setShowExportModal,l=o.kind,c=o.tab,u=o.filters,s=o.holdableId,p=o.sortProperties,d=void 0===p?{}:p,f=E().t,v=se(t(""),2),h=v[0],g=v[1],P=se(t(!1),2),S=P[0],w=P[1],O=k((function(e){return Se(e)})),x=O.mutate,j=O.isLoading||S,A=n((function(){return"".concat(l,"-report-").concat(([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^crypto.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)})))}),[l]),I=function(e){e.download_url&&(g(e.download_url),w(!1))};r((function(){if(a){var e=function(e,t){return H({channel:"NeetoPaymentsEngine::ExportsChannel",pubsub_token:e},{connected:_,disconnected:function(){this.perform("unsubscribed"),this.unsubscribe()},received:function(e){this.perform("unsubscribed"),t(e)}})}(A,I);return g(""),w(!1),function(){e.disconnected()}}}),[a,A]);var N=function(){return i(!1)};return e.createElement(b,{isOpen:a,onClose:N},e.createElement(b.Header,null,e.createElement(m,{style:"h2"},f("neetoPayments.export.title.".concat(l)))),e.createElement(b.Body,null,j?e.createElement(m,{style:"body2"},f("neetoPayments.export.pleaseWait")):e.createElement(m,{style:"body2"},f(h?"neetoPayments.export.fileReady":"neetoPayments.export.download.".concat(l)))),e.createElement(b.Footer,{className:"space-x-2"},h?e.createElement(y,{href:h,icon:D,label:f("neetoPayments.common.download"),onClick:N}):e.createElement(e.Fragment,null,e.createElement(y,{disabled:j,label:f("neetoPayments.common.export"),loading:j,onClick:function(){var e=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({kind:et(l)?"connected":l,token:A,filters:JSON.stringify(u),tab:c,holdableId:s},d);x(e,{onSuccess:function(){g(""),w(!0)}})}}),e.createElement(y,{disabled:j,label:f("neetoPayments.common.cancel"),style:"text",onClick:N}))))},it=function(){var e=Z().search;return n((function(){return new URLSearchParams(e)}),[e])};function lt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ct(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lt(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ut,st=function(e){return e.reduce((function(e,t){return ct(ct({},e),{},ce({},t,be))}),{})},pt=function(e){var t,n,r=e.tab,o=e.filters,a=e.pageProperties,i=e.sortProperties,l=void 0===i?{}:i;return ct({tab:r,page:null===(t=a[r])||void 0===t?void 0:t.page,pageSize:null===(n=a[r])||void 0===n?void 0:n.pageSize,filters:JSON.stringify(o)},function(e){return"payment_amount"===e.sortBy?J("sortBy",G("neeto_payments_engine_stripe_transactions.amount"),e):e}(l))},dt=function(e){var t=e.data,n=e.pageProperties,r=void 0===n?{}:n,o=e.tab,a=void 0===o?"all":o;return t.map((function(e,t){var n,o;return ct(ct({},e),{},{payable:e.payable,identifier:e,id:$(r)?t+1:(null===(n=r[a])||void 0===n?void 0:n.pageSize)*((null===(o=r[a])||void 0===o?void 0:o.page)-1)+t+1})}))},ft=function(e){var n=e.payableEntityColumns,r=e.kind,o=it(),a=X(),i=We.filter((function(e){var t,n;return!(null!==(t=Ge[e])&&void 0!==t&&null!==(n=t.isHidden)&&void 0!==n&&n[r])})),c=se(t(!1),2),u=c[0],s=c[1],p=se(t(!1),2),d=p[0],f=p[1],y=se(t(st(i)),2),m=y[0],b=y[1],v=se(t(ge),2),h=v[0],g=v[1],P=se(t(""),2),S=P[0],w=P[1],E=se(t(Be.all),2),O=E[0],x=E[1],j=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=Qe.filter((function(e){var n,r,o=e.key;return!(null!==(n=Je[o])&&void 0!==n&&null!==(r=n.isHidden)&&void 0!==r&&r[t])}));return G(r,V(K("filterProps"),B({isFilterable:!0,isHidden:function(n){return!(null!=n&&n[e]||null!=n&&n[t])}},n)))}(O,r,n),k=se(t(l(j)),2),A=k[0],I=k[1],N=se(t(0),2),C=N[0],D=N[1];return{isFilterButtonVisible:u,isFilterPaneOpen:d,pageProperties:m,filters:A,searchTerm:S,tabs:i,tab:O,dataSize:C,filterableColumns:j,sortProperties:h,setIsFilterButtonVisible:s,setIsFilterPaneOpen:f,setPageProperties:b,setFilters:I,setSearchTerm:w,setTab:x,handleTabChange:function(e){var t,n;o.set("tab",e),o.set("page",null===(t=m[e])||void 0===t?void 0:t.page),o.set("page_size",null===(n=m[e])||void 0===n?void 0:n.pageSize),a.push({search:o.toString()}),x(e)},setDataSize:D,setSortProperties:g}},yt=function(e){return R.get("".concat(fe,"/api/v1/stripe/holdable/").concat(e,"/account"))},mt="undefined"!=typeof Symbol&&Symbol,bt=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0},vt=Array.prototype.slice,ht=Object.prototype.toString,gt=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==ht.call(t))throw new TypeError("Function.prototype.bind called on incompatible "+t);for(var n,r=vt.call(arguments,1),o=Math.max(0,t.length-r.length),a=[],i=0;i<o;i++)a.push("$"+i);if(n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof n){var o=t.apply(this,r.concat(vt.call(arguments)));return Object(o)===o?o:this}return t.apply(e,r.concat(vt.call(arguments)))})),t.prototype){var l=function(){};l.prototype=t.prototype,n.prototype=new l,l.prototype=null}return n},Pt=Function.prototype.bind||gt,St=Pt.call(Function.call,Object.prototype.hasOwnProperty),wt=SyntaxError,Et=Function,Ot=TypeError,xt=function(e){try{return Et('"use strict"; return ('+e+").constructor;")()}catch(e){}},jt=Object.getOwnPropertyDescriptor;if(jt)try{jt({},"")}catch(ra){jt=null}var kt=function(){throw new Ot},At=jt?function(){try{return kt}catch(e){try{return jt(arguments,"callee").get}catch(e){return kt}}}():kt,It="function"==typeof mt&&"function"==typeof Symbol&&"symbol"==typeof mt("foo")&&"symbol"==typeof Symbol("bar")&&bt(),Nt=Object.getPrototypeOf||function(e){return e.__proto__},Ct={},Dt="undefined"==typeof Uint8Array?ut:Nt(Uint8Array),Tt={"%AggregateError%":"undefined"==typeof AggregateError?ut:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?ut:ArrayBuffer,"%ArrayIteratorPrototype%":It?Nt([][Symbol.iterator]()):ut,"%AsyncFromSyncIteratorPrototype%":ut,"%AsyncFunction%":Ct,"%AsyncGenerator%":Ct,"%AsyncGeneratorFunction%":Ct,"%AsyncIteratorPrototype%":Ct,"%Atomics%":"undefined"==typeof Atomics?ut:Atomics,"%BigInt%":"undefined"==typeof BigInt?ut:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?ut:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?ut:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?ut:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?ut:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?ut:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?ut:FinalizationRegistry,"%Function%":Et,"%GeneratorFunction%":Ct,"%Int8Array%":"undefined"==typeof Int8Array?ut:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?ut:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?ut:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":It?Nt(Nt([][Symbol.iterator]())):ut,"%JSON%":"object"==typeof JSON?JSON:ut,"%Map%":"undefined"==typeof Map?ut:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&It?Nt((new Map)[Symbol.iterator]()):ut,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?ut:Promise,"%Proxy%":"undefined"==typeof Proxy?ut:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?ut:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?ut:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&It?Nt((new Set)[Symbol.iterator]()):ut,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?ut:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":It?Nt(""[Symbol.iterator]()):ut,"%Symbol%":It?Symbol:ut,"%SyntaxError%":wt,"%ThrowTypeError%":At,"%TypedArray%":Dt,"%TypeError%":Ot,"%Uint8Array%":"undefined"==typeof Uint8Array?ut:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?ut:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?ut:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?ut:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?ut:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?ut:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?ut:WeakSet};try{null.error}catch(ra){var Ft=Nt(Nt(ra));Tt["%Error.prototype%"]=Ft}var Rt=function e(t){var n;if("%AsyncFunction%"===t)n=xt("async function () {}");else if("%GeneratorFunction%"===t)n=xt("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=xt("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=Nt(o.prototype))}return Tt[t]=n,n},_t={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Lt=Pt,Bt=St,Mt=Lt.call(Function.call,Array.prototype.concat),zt=Lt.call(Function.apply,Array.prototype.splice),Ht=Lt.call(Function.call,String.prototype.replace),Ut=Lt.call(Function.call,String.prototype.slice),qt=Lt.call(Function.call,RegExp.prototype.exec),Wt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Gt=/\\(\\)?/g,Vt=function(e,t){var n,r=e;if(Bt(_t,r)&&(r="%"+(n=_t[r])[0]+"%"),Bt(Tt,r)){var o=Tt[r];if(o===Ct&&(o=Rt(r)),void 0===o&&!t)throw new Ot("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:o}}throw new wt("intrinsic "+e+" does not exist!")},Kt=function(e,t){if("string"!=typeof e||0===e.length)throw new Ot("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new Ot('"allowMissing" argument must be a boolean');if(null===qt(/^%?[^%]*%?$/,e))throw new wt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=Ut(e,0,1),n=Ut(e,-1);if("%"===t&&"%"!==n)throw new wt("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new wt("invalid intrinsic syntax, expected opening `%`");var r=[];return Ht(e,Wt,(function(e,t,n,o){r[r.length]=n?Ht(o,Gt,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",o=Vt("%"+r+"%",t),a=o.name,i=o.value,l=!1,c=o.alias;c&&(r=c[0],zt(n,Mt([0,1],c)));for(var u=1,s=!0;u<n.length;u+=1){var p=n[u],d=Ut(p,0,1),f=Ut(p,-1);if(('"'===d||"'"===d||"`"===d||'"'===f||"'"===f||"`"===f)&&d!==f)throw new wt("property names with quotes must have matching quotes");if("constructor"!==p&&s||(l=!0),Bt(Tt,a="%"+(r+="."+p)+"%"))i=Tt[a];else if(null!=i){if(!(p in i)){if(!t)throw new Ot("base intrinsic for "+e+" exists, but the property is not available.");return}if(jt&&u+1>=n.length){var y=jt(i,p);i=(s=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:i[p]}else s=Bt(i,p),i=i[p];s&&!l&&(Tt[a]=i)}}return i},$t={};!function(e){var t=Pt,n=Kt,r=n("%Function.prototype.apply%"),o=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||t.call(o,r),i=n("%Object.getOwnPropertyDescriptor%",!0),l=n("%Object.defineProperty%",!0),c=n("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){var n=a(t,o,arguments);i&&l&&(i(n,"length").configurable&&l(n,"length",{value:1+c(0,e.length-(arguments.length-1))}));return n};var u=function(){return a(t,r,arguments)};l?l(e.exports,"apply",{value:u}):e.exports.apply=u}({get exports(){return $t},set exports(e){$t=e}});var Jt=Kt,Qt=$t,Yt=Qt(Jt("String.prototype.indexOf")),Zt=ne.inspect,Xt="function"==typeof Map&&Map.prototype,en=Object.getOwnPropertyDescriptor&&Xt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,tn=Xt&&en&&"function"==typeof en.get?en.get:null,nn=Xt&&Map.prototype.forEach,rn="function"==typeof Set&&Set.prototype,on=Object.getOwnPropertyDescriptor&&rn?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,an=rn&&on&&"function"==typeof on.get?on.get:null,ln=rn&&Set.prototype.forEach,cn="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,un="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,sn="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,pn=Boolean.prototype.valueOf,dn=Object.prototype.toString,fn=Function.prototype.toString,yn=String.prototype.match,mn=String.prototype.slice,bn=String.prototype.replace,vn=String.prototype.toUpperCase,hn=String.prototype.toLowerCase,gn=RegExp.prototype.test,Pn=Array.prototype.concat,Sn=Array.prototype.join,wn=Array.prototype.slice,En=Math.floor,On="function"==typeof BigInt?BigInt.prototype.valueOf:null,xn=Object.getOwnPropertySymbols,jn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,kn="function"==typeof Symbol&&"object"==typeof Symbol.iterator,An="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===kn||"symbol")?Symbol.toStringTag:null,In=Object.prototype.propertyIsEnumerable,Nn=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function Cn(e,t){if(e===1/0||e===-1/0||e!=e||e&&e>-1e3&&e<1e3||gn.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var r=e<0?-En(-e):En(e);if(r!==e){var o=String(r),a=mn.call(t,o.length+1);return bn.call(o,n,"$&_")+"."+bn.call(bn.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return bn.call(t,n,"$&_")}var Dn=Zt,Tn=Dn.custom,Fn=Mn(Tn)?Tn:null;function Rn(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function _n(e){return bn.call(String(e),/"/g,""")}function Ln(e){return!("[object Array]"!==Un(e)||An&&"object"==typeof e&&An in e)}function Bn(e){return!("[object RegExp]"!==Un(e)||An&&"object"==typeof e&&An in e)}function Mn(e){if(kn)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!jn)return!1;try{return jn.call(e),!0}catch(e){}return!1}var zn=Object.prototype.hasOwnProperty||function(e){return e in this};function Hn(e,t){return zn.call(e,t)}function Un(e){return dn.call(e)}function qn(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function Wn(e,t){if(e.length>t.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return Wn(mn.call(e,0,t.maxStringLength),t)+r}return Rn(bn.call(bn.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Gn),"single",t)}function Gn(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+vn.call(t.toString(16))}function Vn(e){return"Object("+e+")"}function Kn(e){return e+" { ? }"}function $n(e,t,n,r){return e+" ("+t+") {"+(r?Jn(n,r):Sn.call(n,", "))+"}"}function Jn(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+Sn.call(e,","+n)+"\n"+t.prev}function Qn(e,t){var n=Ln(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=Hn(e,o)?t(e[o],e):""}var a,i="function"==typeof xn?xn(e):[];if(kn){a={};for(var l=0;l<i.length;l++)a["$"+i[l]]=i[l]}for(var c in e)Hn(e,c)&&(n&&String(Number(c))===c&&c<e.length||kn&&a["$"+c]instanceof Symbol||(gn.call(/[^\w$]/,c)?r.push(t(c,e)+": "+t(e[c],e)):r.push(c+": "+t(e[c],e))));if("function"==typeof xn)for(var u=0;u<i.length;u++)In.call(e,i[u])&&r.push("["+t(i[u])+"]: "+t(e[i[u]],e));return r}var Yn=Kt,Zn=function(e,t){var n=Jt(e,!!t);return"function"==typeof n&&Yt(e,".prototype.")>-1?Qt(n):n},Xn=function e(t,n,r,o){var a=n||{};if(Hn(a,"quoteStyle")&&"single"!==a.quoteStyle&&"double"!==a.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Hn(a,"maxStringLength")&&("number"==typeof a.maxStringLength?a.maxStringLength<0&&a.maxStringLength!==1/0:null!==a.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var i=!Hn(a,"customInspect")||a.customInspect;if("boolean"!=typeof i&&"symbol"!==i)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Hn(a,"indent")&&null!==a.indent&&"\t"!==a.indent&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Hn(a,"numericSeparator")&&"boolean"!=typeof a.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var l=a.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return Wn(t,a);if("number"==typeof t){if(0===t)return 1/0/t>0?"0":"-0";var c=String(t);return l?Cn(t,c):c}if("bigint"==typeof t){var u=String(t)+"n";return l?Cn(t,u):u}var s=void 0===a.depth?5:a.depth;if(void 0===r&&(r=0),r>=s&&s>0&&"object"==typeof t)return Ln(t)?"[Array]":"[Object]";var p=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=Sn.call(Array(e.indent+1)," ")}return{base:n,prev:Sn.call(Array(t+1),n)}}(a,r);if(void 0===o)o=[];else if(qn(o,t)>=0)return"[Circular]";function d(t,n,i){if(n&&(o=wn.call(o)).push(n),i){var l={depth:a.depth};return Hn(a,"quoteStyle")&&(l.quoteStyle=a.quoteStyle),e(t,l,r+1,o)}return e(t,a,r+1,o)}if("function"==typeof t&&!Bn(t)){var f=function(e){if(e.name)return e.name;var t=yn.call(fn.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),y=Qn(t,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(y.length>0?" { "+Sn.call(y,", ")+" }":"")}if(Mn(t)){var m=kn?bn.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):jn.call(t);return"object"!=typeof t||kn?m:Vn(m)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var b="<"+hn.call(String(t.nodeName)),v=t.attributes||[],h=0;h<v.length;h++)b+=" "+v[h].name+"="+Rn(_n(v[h].value),"double",a);return b+=">",t.childNodes&&t.childNodes.length&&(b+="..."),b+="</"+hn.call(String(t.nodeName))+">"}if(Ln(t)){if(0===t.length)return"[]";var g=Qn(t,d);return p&&!function(e){for(var t=0;t<e.length;t++)if(qn(e[t],"\n")>=0)return!1;return!0}(g)?"["+Jn(g,p)+"]":"[ "+Sn.call(g,", ")+" ]"}if(function(e){return!("[object Error]"!==Un(e)||An&&"object"==typeof e&&An in e)}(t)){var P=Qn(t,d);return"cause"in Error.prototype||!("cause"in t)||In.call(t,"cause")?0===P.length?"["+String(t)+"]":"{ ["+String(t)+"] "+Sn.call(P,", ")+" }":"{ ["+String(t)+"] "+Sn.call(Pn.call("[cause]: "+d(t.cause),P),", ")+" }"}if("object"==typeof t&&i){if(Fn&&"function"==typeof t[Fn]&&Dn)return Dn(t,{depth:s-r});if("symbol"!==i&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!tn||!e||"object"!=typeof e)return!1;try{tn.call(e);try{an.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var S=[];return nn&&nn.call(t,(function(e,n){S.push(d(n,t,!0)+" => "+d(e,t))})),$n("Map",tn.call(t),S,p)}if(function(e){if(!an||!e||"object"!=typeof e)return!1;try{an.call(e);try{tn.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var w=[];return ln&&ln.call(t,(function(e){w.push(d(e,t))})),$n("Set",an.call(t),w,p)}if(function(e){if(!cn||!e||"object"!=typeof e)return!1;try{cn.call(e,cn);try{un.call(e,un)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return Kn("WeakMap");if(function(e){if(!un||!e||"object"!=typeof e)return!1;try{un.call(e,un);try{cn.call(e,cn)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return Kn("WeakSet");if(function(e){if(!sn||!e||"object"!=typeof e)return!1;try{return sn.call(e),!0}catch(e){}return!1}(t))return Kn("WeakRef");if(function(e){return!("[object Number]"!==Un(e)||An&&"object"==typeof e&&An in e)}(t))return Vn(d(Number(t)));if(function(e){if(!e||"object"!=typeof e||!On)return!1;try{return On.call(e),!0}catch(e){}return!1}(t))return Vn(d(On.call(t)));if(function(e){return!("[object Boolean]"!==Un(e)||An&&"object"==typeof e&&An in e)}(t))return Vn(pn.call(t));if(function(e){return!("[object String]"!==Un(e)||An&&"object"==typeof e&&An in e)}(t))return Vn(d(String(t)));if(!function(e){return!("[object Date]"!==Un(e)||An&&"object"==typeof e&&An in e)}(t)&&!Bn(t)){var E=Qn(t,d),O=Nn?Nn(t)===Object.prototype:t instanceof Object||t.constructor===Object,x=t instanceof Object?"":"null prototype",j=!O&&An&&Object(t)===t&&An in t?mn.call(Un(t),8,-1):x?"Object":"",k=(O||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(j||x?"["+Sn.call(Pn.call([],j||[],x||[]),": ")+"] ":"");return 0===E.length?k+"{}":p?k+"{"+Jn(E,p)+"}":k+"{ "+Sn.call(E,", ")+" }"}return String(t)},er=Yn("%TypeError%"),tr=Yn("%WeakMap%",!0),nr=Yn("%Map%",!0),rr=Zn("WeakMap.prototype.get",!0),or=Zn("WeakMap.prototype.set",!0),ar=Zn("WeakMap.prototype.has",!0),ir=Zn("Map.prototype.get",!0),lr=Zn("Map.prototype.set",!0),cr=Zn("Map.prototype.has",!0),ur=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},sr=String.prototype.replace,pr=/%20/g,dr="RFC3986",fr={default:dr,formatters:{RFC1738:function(e){return sr.call(e,pr,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:dr},yr=fr,mr=Object.prototype.hasOwnProperty,br=Array.isArray,vr=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),hr=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},gr={arrayToObject:hr,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],a=o.obj[o.prop],i=Object.keys(a),l=0;l<i.length;++l){var c=i[l],u=a[c];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:a,prop:c}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(br(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,r,o){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var i="",l=0;l<a.length;++l){var c=a.charCodeAt(l);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===yr.RFC1738&&(40===c||41===c)?i+=a.charAt(l):c<128?i+=vr[c]:c<2048?i+=vr[192|c>>6]+vr[128|63&c]:c<55296||c>=57344?i+=vr[224|c>>12]+vr[128|c>>6&63]+vr[128|63&c]:(l+=1,c=65536+((1023&c)<<10|1023&a.charCodeAt(l)),i+=vr[240|c>>18]+vr[128|c>>12&63]+vr[128|c>>6&63]+vr[128|63&c])}return i},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(br(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(br(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!mr.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var o=t;return br(t)&&!br(n)&&(o=hr(t,r)),br(t)&&br(n)?(n.forEach((function(n,o){if(mr.call(t,o)){var a=t[o];a&&"object"==typeof a&&n&&"object"==typeof n?t[o]=e(a,n,r):t.push(n)}else t[o]=n})),t):Object.keys(n).reduce((function(t,o){var a=n[o];return mr.call(t,o)?t[o]=e(t[o],a,r):t[o]=a,t}),o)}},Pr=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new er("Side channel does not contain "+Xn(e))},get:function(r){if(tr&&r&&("object"==typeof r||"function"==typeof r)){if(e)return rr(e,r)}else if(nr){if(t)return ir(t,r)}else if(n)return function(e,t){var n=ur(e,t);return n&&n.value}(n,r)},has:function(r){if(tr&&r&&("object"==typeof r||"function"==typeof r)){if(e)return ar(e,r)}else if(nr){if(t)return cr(t,r)}else if(n)return function(e,t){return!!ur(e,t)}(n,r);return!1},set:function(r,o){tr&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new tr),or(e,r,o)):nr?(t||(t=new nr),lr(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=ur(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r},Sr=gr,wr=fr,Er=Object.prototype.hasOwnProperty,Or={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},xr=Array.isArray,jr=Array.prototype.push,kr=function(e,t){jr.apply(e,xr(t)?t:[t])},Ar=Date.prototype.toISOString,Ir=wr.default,Nr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Sr.encode,encodeValuesOnly:!1,format:Ir,formatter:wr.formatters[Ir],indices:!1,serializeDate:function(e){return Ar.call(e)},skipNulls:!1,strictNullHandling:!1},Cr={},Dr=function e(t,n,r,o,a,i,l,c,u,s,p,d,f,y,m,b){for(var v,h=t,g=b,P=0,S=!1;void 0!==(g=g.get(Cr))&&!S;){var w=g.get(t);if(P+=1,void 0!==w){if(w===P)throw new RangeError("Cyclic object value");S=!0}void 0===g.get(Cr)&&(P=0)}if("function"==typeof c?h=c(n,h):h instanceof Date?h=p(h):"comma"===r&&xr(h)&&(h=Sr.maybeMap(h,(function(e){return e instanceof Date?p(e):e}))),null===h){if(a)return l&&!y?l(n,Nr.encoder,m,"key",d):n;h=""}if("string"==typeof(v=h)||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v||Sr.isBuffer(h))return l?[f(y?n:l(n,Nr.encoder,m,"key",d))+"="+f(l(h,Nr.encoder,m,"value",d))]:[f(n)+"="+f(String(h))];var E,O=[];if(void 0===h)return O;if("comma"===r&&xr(h))y&&l&&(h=Sr.maybeMap(h,l)),E=[{value:h.length>0?h.join(",")||null:void 0}];else if(xr(c))E=c;else{var x=Object.keys(h);E=u?x.sort(u):x}for(var j=o&&xr(h)&&1===h.length?n+"[]":n,k=0;k<E.length;++k){var A=E[k],I="object"==typeof A&&void 0!==A.value?A.value:h[A];if(!i||null!==I){var N=xr(h)?"function"==typeof r?r(j,A):j:j+(s?"."+A:"["+A+"]");b.set(t,P);var C=Pr();C.set(Cr,b),kr(O,e(I,N,r,o,a,i,"comma"===r&&y&&xr(h)?null:l,c,u,s,p,d,f,y,m,C))}}return O},Tr=gr,Fr=Object.prototype.hasOwnProperty,Rr=Array.isArray,_r={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Tr.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},Lr=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},Br=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},Mr=function(e,t,n,r){if(e){var o=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,i=n.depth>0&&/(\[[^[\]]*])/.exec(o),l=i?o.slice(0,i.index):o,c=[];if(l){if(!n.plainObjects&&Fr.call(Object.prototype,l)&&!n.allowPrototypes)return;c.push(l)}for(var u=0;n.depth>0&&null!==(i=a.exec(o))&&u<n.depth;){if(u+=1,!n.plainObjects&&Fr.call(Object.prototype,i[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(i[1])}return i&&c.push("["+o.slice(i.index)+"]"),function(e,t,n,r){for(var o=r?t:Br(t,n),a=e.length-1;a>=0;--a){var i,l=e[a];if("[]"===l&&n.parseArrays)i=[].concat(o);else{i=n.plainObjects?Object.create(null):{};var c="["===l.charAt(0)&&"]"===l.charAt(l.length-1)?l.slice(1,-1):l,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&l!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(i=[])[u]=o:"__proto__"!==c&&(i[c]=o):i={0:o}}o=i}return o}(c,t,n,r)}},zr=function(e,t){var n,r=e,o=function(e){if(!e)return Nr;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||Nr.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=wr.default;if(void 0!==e.format){if(!Er.call(wr.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=wr.formatters[n],o=Nr.filter;return("function"==typeof e.filter||xr(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:Nr.addQueryPrefix,allowDots:void 0===e.allowDots?Nr.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:Nr.charsetSentinel,delimiter:void 0===e.delimiter?Nr.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:Nr.encode,encoder:"function"==typeof e.encoder?e.encoder:Nr.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:Nr.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:Nr.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:Nr.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:Nr.strictNullHandling}}(t);"function"==typeof o.filter?r=(0,o.filter)("",r):xr(o.filter)&&(n=o.filter);var a,i=[];if("object"!=typeof r||null===r)return"";a=t&&t.arrayFormat in Or?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var l=Or[a];if(t&&"commaRoundTrip"in t&&"boolean"!=typeof t.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var c="comma"===l&&t&&t.commaRoundTrip;n||(n=Object.keys(r)),o.sort&&n.sort(o.sort);for(var u=Pr(),s=0;s<n.length;++s){var p=n[s];o.skipNulls&&null===r[p]||kr(i,Dr(r[p],p,l,c,o.strictNullHandling,o.skipNulls,o.encode?o.encoder:null,o.filter,o.sort,o.allowDots,o.serializeDate,o.format,o.formatter,o.encodeValuesOnly,o.charset,u))}var d=i.join(o.delimiter),f=!0===o.addQueryPrefix?"?":"";return o.charsetSentinel&&("iso-8859-1"===o.charset?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),d.length>0?f+d:""},Hr={formats:fr,parse:function(e,t){var n=function(e){if(!e)return _r;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?_r.charset:e.charset;return{allowDots:void 0===e.allowDots?_r.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:_r.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:_r.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:_r.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:_r.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:_r.comma,decoder:"function"==typeof e.decoder?e.decoder:_r.decoder,delimiter:"string"==typeof e.delimiter||Tr.isRegExp(e.delimiter)?e.delimiter:_r.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:_r.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:_r.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:_r.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:_r.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:_r.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var r="string"==typeof e?function(e,t){var n,r={},o=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,a=t.parameterLimit===1/0?void 0:t.parameterLimit,i=o.split(t.delimiter,a),l=-1,c=t.charset;if(t.charsetSentinel)for(n=0;n<i.length;++n)0===i[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===i[n]?c="utf-8":"utf8=%26%2310003%3B"===i[n]&&(c="iso-8859-1"),l=n,n=i.length);for(n=0;n<i.length;++n)if(n!==l){var u,s,p=i[n],d=p.indexOf("]="),f=-1===d?p.indexOf("="):d+1;-1===f?(u=t.decoder(p,_r.decoder,c,"key"),s=t.strictNullHandling?null:""):(u=t.decoder(p.slice(0,f),_r.decoder,c,"key"),s=Tr.maybeMap(Br(p.slice(f+1),t),(function(e){return t.decoder(e,_r.decoder,c,"value")}))),s&&t.interpretNumericEntities&&"iso-8859-1"===c&&(s=Lr(s)),p.indexOf("[]=")>-1&&(s=Rr(s)?[s]:s),Fr.call(r,u)?r[u]=Tr.combine(r[u],s):r[u]=s}return r}(e,n):e,o=n.plainObjects?Object.create(null):{},a=Object.keys(r),i=0;i<a.length;++i){var l=a[i],c=Mr(l,r[l],n,"string"==typeof e);o=Tr.merge(o,c,n)}return!0===n.allowSparse?o:Tr.compact(o)},stringify:zr},Ur=function(e){return R.get("".concat(fe,"/api/v1/stripe/holdable/transactions"),{params:e,paramsSerializer:function(e){return Hr.stringify(e,{arrayFormat:"brackets"})}})},qr=function(e,t){return R.get("".concat(fe,"/api/v1/stripe/holdables/").concat(e,"/transactions"),{params:t,paramsSerializer:function(e){return Hr.stringify(e,{arrayFormat:"brackets"})}})},Wr="stripe-platform-account-details",Gr="transactions-list",Vr="platform-splits-list",Kr="connected-account",$r="stripe-platform-transaction",Jr="stripe-refunds-list",Qr="square-account-details",Yr="payments-list",Zr="refunds-list",Xr=function(e){return R.get("".concat(fe,"/api/v1/stripe/holdable/refunds"),{params:e,paramsSerializer:function(e){return Hr.stringify(e,{arrayFormat:"brackets"})}})},eo=function(){return R.get("".concat(fe,"/api/v1/stripe_platform/account"))},to=function(e){return R.get("".concat(fe,"/api/v1/stripe_platform/splits"),{params:e,paramsSerializer:function(e){return Hr.stringify(e,{arrayFormat:"brackets"})}})},no=function(e){return R.get("".concat(fe,"/api/v1/stripe_platform/transactions"),{params:e,paramsSerializer:function(e){return Hr.stringify(e,{arrayFormat:"brackets"})}})},ro=function(e){return R.get("".concat(fe,"/api/v1/stripe_platform/transactions/").concat(e))},oo=[{key:"splitSubId",title:a("neetoPayments.common.id"),dataIndex:"id",width:"72px"},{key:"splitSubIdentifier",title:a("neetoPayments.common.identifier"),dataIndex:"identifier",width:"300px",render:Fe},{key:"splitSubAmount",title:a("neetoPayments.common.amount"),dataIndex:"amount",width:"150px"},{key:"splitSubStatus",title:a("neetoPayments.common.status"),dataIndex:"status",width:"130px",render:Ie("split")}],ao=[{key:"refundId",title:a("neetoPayments.common.id"),dataIndex:"id",width:"72px"},{key:"refundIdentifier",title:a("neetoPayments.common.identifier"),dataIndex:"identifier",width:"290px",render:Le},{key:"refundAmount",title:a("neetoPayments.common.amount"),dataIndex:"amount",width:"150px"},{key:"refundStatus",title:a("neetoPayments.common.status"),dataIndex:"status",width:"200px",render:Ie("refund")}],io=function(t){var n=t.data,r=void 0===n?[]:n,o=t.className,a=void 0===o?"":o,i=t.kind,l=void 0===i?"split":i;return e.createElement("div",{className:a||"ml-12 max-w-3xl"},e.createElement(te,{hasPagination:!1},e.createElement(v,{fixedHeight:!0,columnData:Xe(l)?oo:ao,pagination:!1,rowData:dt({data:r}),scroll:{y:300}})))},lo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.splits,r=void 0===n?[]:n,o=t.refunds,i=void 0===o?[]:o;return e.createElement("div",{className:"my-2 space-y-2"},!$(r)&&e.createElement("div",{className:"space-y-4"},e.createElement(m,{className:"ml-12",style:"h3"},a("neetoPayments.common.splits")),e.createElement(io,{data:r})),!$(i)&&e.createElement("div",{className:"space-y-4"},e.createElement(m,{className:"ml-12",style:"h3"},a("neetoPayments.title.refund")),e.createElement(io,{data:i,kind:"refund"})))};function co(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function uo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?co(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):co(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var so=function(e){var t,n,r,o,a,i,l=e.kind,c=e.holdableId,u=e.payload,s=e.isPlatformEnabled,p={};return p.transfer=p.connected=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return A([Gr,t],(function(){return L(e)?qr(e,t):Ur(t)}),arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}(c,uo(uo({},u),{},{kind:l}),{enabled:et(l)||Ze(l)}),p.refund=function(e){return A([Jr,e],(function(){return Xr(e)}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(u,{enabled:tt(l)}),p.platform=function(e,t){return A([Gr,e],(function(){return no(e)}),t)}(u,{enabled:Ye(l)&&s}),p.split=function(e){return A([Vr,e],(function(){return to(e)}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(u,{enabled:Xe(l)}),{data:rt(null===(t=p[l])||void 0===t?void 0:t.data,l),dataSize:null===(n=p[l])||void 0===n||null===(r=n.data)||void 0===r||null===(o=r.counts)||void 0===o?void 0:o[null==u?void 0:u.tab],isDataLoading:null===(a=p[l])||void 0===a?void 0:a.isLoading,isDataFetching:null===(i=p[l])||void 0===i?void 0:i.isFetching}},po=function(t){var n=t.expanded,r=t.onExpand,o=t.record;return t.expandable&&(n?e.createElement(T,{className:"cursor-pointer",onClick:function(e){return r(o,e)}}):e.createElement(F,{className:"cursor-pointer",onClick:function(e){return r(o,e)}}))};function fo(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var yo=["transactionId"],mo=function(t){var n=t.transactionId,r=fo(t,yo),o=E().t,a=function(e){return A([$r,e],(function(){return ro(e)}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(n),i=a.isLoading,l=a.data,c=void 0===l?{}:l,u=c.amount,s=c.netAmount,p=c.status,d=c.paymentAt,f=c.identifier,y=c.live,b=c.splits,v=void 0===b?[]:b;return e.createElement(h,ae({},r,{size:"large"}),e.createElement(h.Header,null,e.createElement(m,{style:"h2"},"Transaction Details")),e.createElement(h.Body,null,i?e.createElement(ee,null):e.createElement("div",{className:"w-full space-y-6 p-2"},e.createElement("div",{className:"w-full space-y-2"},e.createElement("div",{className:"grid grid-cols-2 gap-y-2"},e.createElement(m,{style:"body2"},o("neetoPayments.transactionPane.transactionId")),e.createElement(m,{style:"body2"},Te({identifier:f,live:y})),e.createElement(m,{style:"body2"},o("neetoPayments.transactionPane.amount")),e.createElement(m,{style:"body2"},u),e.createElement(m,{style:"body2"},o("neetoPayments.transactionPane.netAmount")),e.createElement(m,{style:"body2"},s),e.createElement(m,{style:"body2"},o("neetoPayments.transactionPane.status")),Ie("transaction",p),e.createElement(m,{style:"body2"},o("neetoPayments.transactionPane.paidOn")),e.createElement(m,{style:"body2"},Ne(d)))),e.createElement(m,{style:"h3"},"Splits"),e.createElement(io,{className:"ml-0 w-full",data:v}))))},bo=function(n){var o,a,i,l=n.isPlatformEnabled,c=void 0!==l&&l,u=n.kind,s=n.holdableId,p=void 0===s?null:s,d=n.filters,f=n.setIsFilterButtonVisible,y=n.pageProperties,m=n.payableEntityColumns,b=n.setPageProperties,h=n.tab,P=n.handleTabChange,S=n.setDataSize,w=n.sortProperties,O=n.setSortProperties,x=se(t(Ve),2),j=x[0],k=x[1],I=it(),N=X(),D=E().t,T=We.filter((function(e){var t,n;return!(null!==(t=Ge[e])&&void 0!==t&&null!==(n=t.isHidden)&&void 0!==n&&n[u])})),F=nt({tab:h,kind:u,payableEntityColumns:m,specialColumnArguments:{setPaneStatus:k}}),R=A(Wr,(function(){return eo()}),{enabled:c}),_=R.isLoading,B=R.data,z=(void 0===B?{}:B).platformAccount,H=function(e){return A([Kr,e],(function(){return yt(e)}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(p),U=H.isLoading,q=H.data,W=(void 0===q?{}:q).account,G=so({kind:u,holdableId:p,payload:pt({tab:h,filters:d,pageProperties:y,sortProperties:w}),isPlatformEnabled:c}),V=G.data,K=G.isDataLoading,Q=G.dataSize,Y=G.isDataFetching,Z=(null==W?void 0:W.isConnected)||(null==z?void 0:z.isConnected);r((function(){f(L(V)||L(d)),S(Q)}),[V]);var ne=function(e,t){I.set("page",e),I.set("page_size",t),N.push({search:I.toString()}),b(J(h,{page:e,pageSize:t}))};r((function(){ne(C,45),O(ge)}),[d,h]),r((function(){var e,t,n=I.get("tab")||Be.all,r=T.includes(n)?n:Be.all,o=Number(I.get("page"))||(null===(e=y[n])||void 0===e?void 0:e.page),a=Number(I.get("page_size"))||(null===(t=y[n])||void 0===t?void 0:t.pageSize);P(r),I.set("tab",r),ne(o,a)}),[I]);return U||_||K?e.createElement(ee,null):!Z&&Q<=0||!L(V)?e.createElement("div",{className:"flex h-full w-full items-center justify-center"},e.createElement(g,{title:tt(u)?D("neetoPayments.emptyState.refund"):D("neetoPayments.emptyState.payment")})):e.createElement(e.Fragment,null,e.createElement(te,{hasPagination:Q>(null===(o=y[h])||void 0===o?void 0:o.pageSize)},e.createElement(v,{fixedHeight:!0,allowRowClick:!1,columnData:F,currentPageNumber:null===(a=y[h])||void 0===a?void 0:a.page,handlePageChange:ne,loading:Y,rowData:dt({data:V,pageProperties:y,tab:h}),rowSelection:!1,sortDirections:Pe,totalCount:Q,expandable:{expandedRowRender:lo,showExpandColumn:Ye(u),rowExpandable:function(e){return!($(e.splits)&&$(e.refunds))},columnWidth:"64px",expandIcon:po},paginationProps:{showSizeChanger:!0,hideOnSinglePage:!0,pageSize:null===(i=y[h])||void 0===i?void 0:i.pageSize,total:Q},onChange:function(e,t,n){O(L(null==n?void 0:n.column)?{sortBy:M(n.field),orderBy:"ascend"===n.order?"ASC":"DESC"}:ge)}})),e.createElement(mo,ae({},j,{onClose:function(){return k(Ve)}})))};function vo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ho(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vo(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var go=i(de((function(n){var r=n.isPlatformEnabled,a=void 0!==r&&r,i=n.searchProps,l=n.headerProps,p=void 0===l?{}:l,d=n.holdableId,f=void 0===d?null:d,y=n.payableEntityColumns,b=void 0===y?[]:y,v=n.kind,h=void 0===v?"connected":v,g=se(o(),2);g[0];var S=g[1],w=E().t,O=se(t(!1),2),x=O[0],j=O[1],k=ft({payableEntityColumns:b,kind:h}),A=k.searchTerm,I=k.pageProperties,N=k.filterableColumns,C=k.isFilterButtonVisible,D=k.isFilterPaneOpen,T=k.filters,F=k.tabs,R=k.tab,_=k.dataSize,L=k.sortProperties,B=k.setSearchTerm,M=k.setIsFilterButtonVisible,z=k.setIsFilterPaneOpen,H=k.setFilters,U=k.setPageProperties,q=k.handleTabChange,V=k.setDataSize,K=k.setSortProperties,$=C||"all"!==R,J=ho(ho({},function(e){var t,n,r=e.searchProps,o=e.kind;return W({node:G(null===(t=Ke[o])||void 0===t?void 0:t.node),model:G(null===(n=Ke[o])||void 0===n?void 0:n.model)},r)}({searchProps:i,kind:h})),{},{value:A.trim(),setValue:B}),Q=function(e){S((function(){H(e)}))};return e.createElement(e.Fragment,null,e.createElement(u,ae({title:w("neetoPayments.title.".concat(h))},p,{searchProps:{onChange:function(e){var t=e.target.value;return B(t)},value:A,placeholder:J.placeholder,className:"w-80"}})),$&&e.createElement(P,null,F.map((function(t){return e.createElement(P.Item,{active:R===t,key:t,onClick:function(){return q(t)}},w("neetoPayments.common.".concat(t)))}))),e.createElement(s,{className:"mt-4",leftActionBlock:$&&0!==_&&e.createElement(m,{className:"neeto-ui-gray-800 mr-2 font-semibold",component:"h4"},w("neetoPayments.countOf.".concat(h),{count:_})),rightActionBlock:e.createElement(e.Fragment,null,e.createElement(c,{columns:N,keyword:J,setIsPaneOpen:z,onChange:Q}),C&&e.createElement(s.RightBlock,{downloadButtonProps:{onClick:function(){return j(!0)}},filterProps:{columns:N,isOpen:D,keyword:J,setIsOpen:z,onChange:Q}}))}),e.createElement(bo,{filters:T,handleTabChange:q,holdableId:f,isPlatformEnabled:a,kind:h,pageProperties:I,payableEntityColumns:b,setDataSize:V,setIsFilterButtonVisible:M,setPageProperties:U,setSortProperties:K,sortProperties:L,tab:R}),e.createElement(at,{filters:T,holdableId:f,kind:h,setShowExportModal:j,showExportModal:x,sortProperties:L,tab:R}))})),a("neetoPayments.common.payments"));function Po(e,t,n,r,o,a,i){try{var l=e[a](i),c=l.value}catch(e){return void n(e)}l.done?t(c):Promise.resolve(c).then(r,o)}function So(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){Po(a,r,o,i,l,"next",e)}function l(e){Po(a,r,o,i,l,"throw",e)}i(void 0)}))}}var wo={},Eo={get exports(){return wo},set exports(e){wo=e}},Oo={};!function(e){function t(n){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}({get exports(){return Oo},set exports(e){Oo=e}}),function(e){var t=Oo.default;function n(){e.exports=n=function(){return r},e.exports.__esModule=!0,e.exports.default=e.exports;var r={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,a=Object.create(o.prototype),l=new A(r||[]);return i(a,"_invoke",{value:O(e,n,l)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}r.wrap=d;var y={};function m(){}function b(){}function v(){}var h={};p(h,c,(function(){return this}));var g=Object.getPrototypeOf,P=g&&g(g(I([])));P&&P!==o&&a.call(P,c)&&(h=P);var S=v.prototype=m.prototype=Object.create(h);function w(e){["next","throw","return"].forEach((function(t){p(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,n){function r(o,i,l,c){var u=f(e[o],e,i);if("throw"!==u.type){var s=u.arg,p=s.value;return p&&"object"==t(p)&&a.call(p,"__await")?n.resolve(p.__await).then((function(e){r("next",e,l,c)}),(function(e){r("throw",e,l,c)})):n.resolve(p).then((function(e){s.value=e,l(s)}),(function(e){return r("throw",e,l,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function(e,t){function a(){return new n((function(n,o){r(e,t,n,o)}))}return o=o?o.then(a,a):a()}})}function O(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return N()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=x(i,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=f(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===y)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}function x(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=f(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,y;var a=o.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,y):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,y)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function I(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(a.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:N}}function N(){return{value:void 0,done:!0}}return b.prototype=v,i(S,"constructor",{value:v,configurable:!0}),i(v,"constructor",{value:b,configurable:!0}),b.displayName=p(v,s,"GeneratorFunction"),r.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},r.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,p(e,s,"GeneratorFunction")),e.prototype=Object.create(S),e},r.awrap=function(e){return{__await:e}},w(E.prototype),p(E.prototype,u,(function(){return this})),r.AsyncIterator=E,r.async=function(e,t,n,o,a){void 0===a&&(a=Promise);var i=new E(d(e,t,n,o),a);return r.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(S),p(S,s,"Generator"),p(S,c,(function(){return this})),p(S,"toString",(function(){return"[object Generator]"})),r.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},r.values=I,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var l=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(l&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:I(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),y}},r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}(Eo);var xo=wo(),jo=xo;try{regeneratorRuntime=xo}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=xo:Function("r","regeneratorRuntime = r")(xo)}var ko=["focusClassAdded","focusClassRemoved","errorClassAdded","errorClassRemoved","cardBrandChanged","postalCodeChanged"],Ao={},Io=function(n){var o,a,i,l,c,u=n.card,s=n.setCard,p=n.id,d=void 0===p?"square-card-container":p,f=n.onChange,y=void 0===f?_:f,m=n.options,b=void 0===m?Ao:m,v=n.disabled,h=void 0!==v&&v,g=(o=se(t(),2),a=o[0],i=o[1],l=process.env.SQUARE_APPLICATION_ID,c=process.env.SQUARE_CLIENT_LOCATION,r((function(){var e=function(){var e=So(jo.mark((function e(){var t,n,r,o;return jo.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=function(){return Promise.resolve().then((function(){return sa}))},e.next=3,t();case 3:return n=e.sent,r=n.payments,e.next=7,r(l,c);case 7:if(o=e.sent){e.next=10;break}throw new Error("Square Web Payments SDK failed to load");case 10:i(o);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();l&&c&&e()}),[l,c]),a);return r((function(){var e=function(){var e=So(jo.mark((function e(){var t;return jo.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null==g?void 0:g.card();case 2:return t=e.sent,e.next=5,null==t?void 0:t.attach("#".concat(d));case 5:s(t||null);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[g,d]),r((function(){ko.forEach((function(e){return null==u?void 0:u.addEventListener(e,y)}))}),[u,y]),r((function(){null==u||u.configure(b)}),[u,b]),e.createElement("div",{id:d,className:re({"pointer-events-none":h,"text-center":!u})},!u&&e.createElement(S,null))};function No(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Co(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?No(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):No(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Do=function(t){var n=t.searchProps,r=t.headerProps,a=void 0===r?{}:r,i=t.children,l=t.title,p=t.searchTerm,d=t.filterableColumns,f=t.isFilterButtonVisible,y=t.isFilterPaneOpen,b=t.tabs,v=t.tab,h=t.setSearchTerm,g=t.setIsFilterPaneOpen,S=t.setFilters,w=t.handleTabChange,O=t.dataSize,x=t.kind,j=se(o(),2);j[0];var k=j[1],A=E().t,I=f||"all"!==v,N=Co(Co({},n),{},{value:p.trim(),setValue:h}),C=function(e){k((function(){S(e)}))};return e.createElement(e.Fragment,null,e.createElement(u,ae({},Co(Co({},a),{},{title:l}),{searchProps:{onChange:function(e){var t=e.target.value;return h(t)},value:p,placeholder:N.placeholder,className:"w-80"}})),I&&e.createElement(P,null,b.map((function(t){return e.createElement(P.Item,{active:v===t,key:t,onClick:function(){return w(t)}},A("neetoPayments.common.".concat(t)))}))),e.createElement(s,{className:"mt-4",leftActionBlock:I&&0!==O&&e.createElement(m,{className:"neeto-ui-gray-800 mr-2 font-semibold",component:"h4"},A("neetoPayments.countOf.".concat(x),{count:O})),rightActionBlock:e.createElement(e.Fragment,null,e.createElement(c,{columns:d,keyword:N,setIsPaneOpen:g,onChange:C}),f&&e.createElement(s.RightBlock,{filterProps:{columns:d,isOpen:y,keyword:N,setIsOpen:g,onChange:C}}))}),i)},To=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.identifier,r=void 0===n?"":n,o=t.receiptUrl,a=void 0===o?"":o;return e.createElement(ke,{content:r},e.createElement(y,{href:a,label:r,size:"small",style:"link",target:"_blank"}))},Fo=[{title:a("neetoPayments.common.id"),dataIndex:"id",key:"id",width:"72px"},{title:a("neetoPayments.common.identifier"),dataIndex:"identifier",key:"identifier",width:"290px",render:To},{title:a("neetoPayments.common.status"),dataIndex:"status",key:"status",render:Ie("payment")},{title:a("neetoPayments.common.identifier"),dataIndex:"identifier",key:"refundIdentifier",width:"290px",render:function(t){var n=t.identifier;return e.createElement(d,{content:n,position:"top"},e.createElement("div",{className:"w-64 truncate"},n))}},{title:a("neetoPayments.common.status"),dataIndex:"status",key:"refundStatus",render:Ie("refund")},{title:a("neetoPayments.common.paymentIdentifier"),dataIndex:"payment",key:"paymentIdentifier",width:"290px",render:To},{title:a("neetoPayments.common.amount"),dataIndex:"amount",key:"amount",width:"150px"},{title:a("neetoPayments.common.paymentTime"),dataIndex:"updatedAt",key:"paymentTime",width:"220px",render:Ne}],Ro={identifier:{isHidden:{squareRefund:!0}},status:{isHidden:{squareRefund:!0,completed:!0,failed:!0}},refundIdentifier:{isHidden:{squarePayment:!0}},refundStatus:{isHidden:{squarePayment:!0,completed:!0,pending:!0,rejected:!0}},paymentIdentifier:{isHidden:{squarePayment:!0}}},_o=q("squareRefund"),Lo=q("squarePayment"),Bo=function(e){var n=e.payableEntityColumns,r=e.kind,o=e.initialTabs,a=e.tabMetaData,i=it(),c=X(),u=o.filter((function(e){var t,n;return!(null!==(t=a[e])&&void 0!==t&&null!==(n=t.isHidden)&&void 0!==n&&n[r])})),s=se(t(!1),2),p=s[0],d=s[1],f=se(t(!1),2),y=f[0],m=f[1],b=se(t(st(u)),2),v=b[0],h=b[1],g=se(t(""),2),P=g[0],S=g[1],w=se(t("all"),2),E=w[0],O=w[1],x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return G(ve,V(K("filterProps"),B({isFilterable:!0},e)))}(n),j=se(t(l(x)),2),k=j[0],A=j[1],I=se(t(0),2),N=I[0],C=I[1];return{isFilterButtonVisible:p,isFilterPaneOpen:y,pageProperties:v,filters:k,searchTerm:P,tabs:u,tab:E,filterableColumns:x,dataSize:N,setIsFilterButtonVisible:d,setIsFilterPaneOpen:m,setPageProperties:h,setFilters:A,setSearchTerm:S,setTab:O,handleTabChange:function(e){var t,n;i.set("tab",e),i.set("page",null===(t=v[e])||void 0===t?void 0:t.page),i.set("page_size",null===(n=v[e])||void 0===n?void 0:n.pageSize),c.push({search:i.toString()}),O(e)},setDataSize:C}},Mo={all:"all",completed:"completed",pending:"pending",rejected:"rejected",failed:"failed"},zo=Object.values(Mo),Ho={all:{},completed:{},pending:{isHidden:{squarePayment:!0}},rejected:{isHidden:{squarePayment:!0}},failed:{isHidden:{squareRefund:!0}}},Uo=function(e){return R.get("".concat(fe,"/api/v1/square/holdables/").concat(e,"/account"))},qo=function(){return R.get("".concat(fe,"/api/v1/square/holdable/account"))},Wo=function(e){return R.get("".concat(fe,"/api/v1/square/holdable/payments"),{params:e})},Go=function(e,t){return R.get("".concat(fe,"/api/v1/square/holdables/").concat(e,"/payments"),{params:t})},Vo=function(e){return R.get("".concat(fe,"/api/v1/square/holdable/refunds"),{params:e})},Ko=function(e,t){return R.get("".concat(fe,"/api/v1/square/holdables/").concat(e,"/refunds"),{params:t})},$o=function(e){var t,n,r,o,a,i,l,c,u=e.kind,s=e.holdableId,p=e.payload,d={};return d.squarePayment=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return A([Yr,t],(function(){return L(e)?Go(e,t):Wo(t)}),arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}(s,p,{enabled:Lo(u)}),d.squareRefund=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return A([Zr,t],(function(){return L(e)?Ko(e,t):Vo(t)}),arguments.length>2&&void 0!==arguments[2]?arguments[2]:{})}(s,p,{enabled:_o(u)}),{data:Lo(u)?null===(t=d[u])||void 0===t||null===(n=t.data)||void 0===n?void 0:n.payments:null===(r=d[u])||void 0===r||null===(o=r.data)||void 0===o?void 0:o.refunds,dataSize:null===(a=d[u])||void 0===a||null===(i=a.data)||void 0===i||null===(l=i.views)||void 0===l?void 0:l[null==p?void 0:p.tab],isDataLoading:null===(c=d[u])||void 0===c?void 0:c.isLoading}},Jo=function(t){var n,o,a,i=t.kind,l=t.holdableId,c=void 0===l?null:l,u=t.filters,s=t.setIsFilterButtonVisible,p=t.pageProperties,d=t.payableEntityColumns,f=t.setPageProperties,y=t.tab,m=t.tabs,b=t.handleTabChange,h=t.setDataSize,P=it(),S=X(),w=E().t,O=function(e){var t=e.tab,n=e.kind,r=e.payableEntityColumns,o=void 0===r?[]:r;return Fo.filter((function(e){var r,o,a,i,l=e.key;return!(null!==(r=Ro[l])&&void 0!==r&&null!==(o=r.isHidden)&&void 0!==o&&o[n]||null!==(a=Ro[l])&&void 0!==a&&null!==(i=a.isHidden)&&void 0!==i&&i[t])})).concat(o.filter((function(e){var r=e.isHidden;return!(null!=r&&r[t]||null!=r&&r[n])})))}({tab:y,kind:i,payableEntityColumns:d}),x=function(e){return A([Qr,e],(function(){return L(e)?Uo(e):qo()}),arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}(c),j=x.isLoading,k=x.data,I=(void 0===k?{}:k).account,N=$o({kind:i,holdableId:c,payload:pt({tab:y,filters:u,pageProperties:p})}),C=N.data,D=N.isDataLoading,T=N.dataSize;r((function(){s(L(C)||L(u)),h(T)}),[C]);var F=function(e,t){P.set("page",e),P.set("page_size",t),S.push({search:P.toString()}),f(J(y,{page:e,pageSize:t}))};return r((function(){var e,t,n=P.get("tab")||Mo.all,r=m.includes(n)?n:Mo.all,o=Number(P.get("page"))||(null===(e=p[n])||void 0===e?void 0:e.page),a=Number(P.get("page_size"))||(null===(t=p[n])||void 0===t?void 0:t.pageSize);b(r),P.set("tab",r),F(o,a)}),[P]),j||D?e.createElement(ee,null):(null==I||!I.isConnected)&&T<=0||!L(C)?e.createElement("div",{className:"flex h-full w-full items-center justify-center"},e.createElement(g,{title:_o(i)?w("neetoPayments.emptyState.refund"):w("neetoPayments.emptyState.payment")})):e.createElement(te,{hasPagination:T>(null===(n=p[y])||void 0===n?void 0:n.pageSize)},e.createElement(v,{fixedHeight:!0,allowRowClick:!1,columnData:O,currentPageNumber:null===(o=p[y])||void 0===o?void 0:o.page,handlePageChange:F,rowData:dt({data:C,pageProperties:p,tab:y}),rowSelection:!1,totalCount:T,paginationProps:{showSizeChanger:!0,hideOnSinglePage:!0,pageSize:null===(a=p[y])||void 0===a?void 0:a.pageSize,total:T}}))};function Qo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var Yo=i(de((function(t){var n=t.searchProps,r=t.headerProps,o=void 0===r?{}:r,i=t.holdableId,l=void 0===i?null:i,c=t.payableEntityColumns,u=void 0===c?[]:c,s=t.kind,p=void 0===s?"squarePayment":s,d=Bo({payableEntityColumns:u,kind:p,initialTabs:zo,tabMetaData:Ho}),f=d.filters,y=d.setIsFilterButtonVisible,m=d.pageProperties,b=d.setPageProperties,v=d.tab,h=d.tabs,g=d.handleTabChange,P=d.setDataSize;return e.createElement(Do,ae({title:Lo(p)?a("neetoPayments.title.squarePayment"):a("neetoPayments.title.squareRefund")},function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qo(Object(n),!0).forEach((function(t){ce(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({headerProps:o,kind:p,searchProps:n},d)),e.createElement(Jo,{filters:f,handleTabChange:g,holdableId:l,kind:p,pageProperties:m,payableEntityColumns:u,setDataSize:P,setIsFilterButtonVisible:y,setPageProperties:b,tab:v,tabs:h}))})),a("neetoPayments.common.squarePayments")),Zo={standard:{title:a("neetoPayments.alert.stripe.connectRestrictionTitle"),message:a("neetoPayments.alert.stripe.connectRestrictionMessage")},platform:{title:a("neetoPayments.alert.stripePlatform.connectRestrictionTitle"),message:a("neetoPayments.alert.stripePlatform.connectRestrictionMessage")}},Xo=["isOpen","paymentKind","onClose"],ea=function(t){var n=t.isOpen,r=void 0!==n&&n,o=t.paymentKind,a=void 0===o?"standard":o,i=t.onClose,l=void 0===i?_:i,c=fo(t,Xo);return e.createElement(w,ae({isOpen:r,onClose:l,message:Zo[a].message,title:Zo[a].title},c))},ta=function(){var e=se(t((function(){})),2),n=e[0],r=e[1],o=function(){var e=So(jo.mark((function e(){var t,r;return jo.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=3;break}return logger.warn("Credit Card button was clicked, but no Credit Card instance was found."),e.abrupt("return","");case 3:return e.prev=3,e.next=6,n.tokenize();case 6:if(null==(t=e.sent)||!t.errors){e.next=10;break}throw r="Status: ".concat(t.status," and Errors: ").concat(JSON.stringify(null==t?void 0:t.errors)),new Error(r);case 10:return e.abrupt("return",null==t?void 0:t.token);case 13:return e.prev=13,e.t0=e.catch(3),logger.error(e.t0),e.abrupt("return","");case 17:case"end":return e.stop()}}),e,null,[[3,13]])})));return function(){return e.apply(this,arguments)}}();return{card:n,setCard:r,tokenizeCard:o}},na=function(e){var t=n(So(jo.mark((function t(){var n,r,o;return jo.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!z(e)){t.next=2;break}return t.abrupt("return",null);case 2:return n=function(){return Promise.resolve().then((function(){return ha}))},t.prev=3,t.next=6,n();case 6:return r=t.sent,o=r.loadStripe,t.next=10,o(null==oe?void 0:oe.stripePublishableKey,{stripeAccount:e});case 10:return t.abrupt("return",t.sent);case 13:t.prev=13,t.t0=t.catch(3),logger.error(t.t0);case 16:return t.abrupt("return",null);case 17:case"end":return t.stop()}}),t,null,[[3,13]])}))),[e]);return t},ra=[],oa=[];!function(e,t){if(e&&"undefined"!=typeof document){var n,r=!0===t.prepend?"prepend":"append",o=!0===t.singleTag,a="string"==typeof t.container?document.querySelector(t.container):document.getElementsByTagName("head")[0];if(o){var i=ra.indexOf(a);-1===i&&(i=ra.push(a)-1,oa[i]={}),n=oa[i]&&oa[i][r]?oa[i][r]:oa[i][r]=l()}else n=l();65279===e.charCodeAt(0)&&(e=e.substring(1)),n.styleSheet?n.styleSheet.cssText+=e:n.appendChild(document.createTextNode(e))}function l(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),t.attributes)for(var n=Object.keys(t.attributes),o=0;o<n.length;o++)e.setAttribute(n[o],t.attributes[n[o]]);var i="prepend"===r?"afterbegin":"beforeend";return a.insertAdjacentElement(i,e),e}}(".ant-table-cell-row-hover .identifier-copy-button{visibility:visible!important}",{});var aa=(e,t,n)=>new Promise(((r,o)=>{var a=e=>{try{l(n.next(e))}catch(e){o(e)}},i=e=>{try{l(n.throw(e))}catch(e){o(e)}},l=e=>e.done?r(e.value):Promise.resolve(e.value).then(a,i);l((n=n.apply(e,t)).next())}));var ia=null;function la(e){return null!==ia||(ia=new Promise(((t,n)=>{if("undefined"!=typeof window)if(window.Square)t(window.Square);else try{let r=function(e){return document.querySelector(`script[src="${e}"]`)}(e);r||(r=function(e){let t=document.head||document.body;if(!t)throw new Error("Square.js requires a <body> or <head> element.");let n=document.createElement("script");return n.src=e,t.appendChild(n),n}(e)),r.addEventListener("load",(()=>{window.Square?t(window.Square):n(new Error("Square.js failed to load properly."))})),r.addEventListener("error",(()=>{n(new Error("Error occurred while loading Square.js"))}))}catch(e){n(e)}else t(null)}))),ia}var ca="v1",ua=class extends Error{constructor(e="The Payment 'applicationId' option is not in the correct format."){super(e),this.name="InvalidApplicationIdError",Object.setPrototypeOf(this,ua.prototype)}};var sa=Object.freeze({__proto__:null,payments:function(e,t,n){return aa(this,null,(function*(){let r=void 0!==(null==n?void 0:n.scriptSrc)?n.scriptSrc:function(e){let t="";if(e.startsWith("sq0idp-")&&(t="https://web.squarecdn.com/"),e.startsWith("sandbox-sq0idb-")&&(t="https://sandbox.web.squarecdn.com/"),0===t.length)throw new ua;return t+=`${ca}/square.js`,t}(e),o=yield la(r);return null===o?null:o.payments(e,t)}))}}),pa="https://js.stripe.com/v3",da=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,fa="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",ya=null,ma=function(e){return null!==ya||(ya=new Promise((function(t,n){if("undefined"!=typeof window&&"undefined"!=typeof document)if(window.Stripe&&e&&console.warn(fa),window.Stripe)t(window.Stripe);else try{var r=function(){for(var e=document.querySelectorAll('script[src^="'.concat(pa,'"]')),t=0;t<e.length;t++){var n=e[t];if(da.test(n.src))return n}return null}();r&&e?console.warn(fa):r||(r=function(e){var t=e&&!e.advancedFraudSignals?"?advancedFraudSignals=false":"",n=document.createElement("script");n.src="".concat(pa).concat(t);var r=document.head||document.body;if(!r)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return r.appendChild(n),n}(e)),r.addEventListener("load",(function(){window.Stripe?t(window.Stripe):n(new Error("Stripe.js not available"))})),r.addEventListener("error",(function(){n(new Error("Failed to load Stripe.js"))}))}catch(e){return void n(e)}else t(null)}))),ya},ba=Promise.resolve().then((function(){return ma(null)})),va=!1;ba.catch((function(e){va||console.warn(e)}));var ha=Object.freeze({__proto__:null,loadStripe:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];va=!0;var r=Date.now();return ba.then((function(e){return function(e,t,n){if(null===e)return null;var r=e.apply(void 0,t);return function(e,t){e&&e._registerWrapper&&e._registerWrapper({name:"stripe-js",version:"1.52.1",startTime:t})}(r,n),r}(e,t,r)}))}});export{me as CURRENCY_OPTIONS,go as Dashboard,ea as PaymentKindRestrictionAlert,Io as SquareCard,Yo as SquareDashboard,we as buildStripeTransactionLink,ta as useSquareCard,na as useStripePromise};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|