@leatcom/portal-sessions 0.0.36 → 0.0.38

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.
@@ -1,4 +1,4 @@
1
- (function(ot,H){typeof exports=="object"&&typeof module<"u"?H(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],H):(ot=typeof globalThis<"u"?globalThis:ot||self,H(ot.PortalSessions={},ot.React,ot.ReactDOM))})(this,function(ot,H,sn){"use strict";var Sv=Object.defineProperty;var Pv=(ot,H,sn)=>H in ot?Sv(ot,H,{enumerable:!0,configurable:!0,writable:!0,value:sn}):ot[H]=sn;var Xu=(ot,H,sn)=>(Pv(ot,typeof H!="symbol"?H+"":H,sn),sn);function Ga(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}function Ju(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in e)){const a=Object.getOwnPropertyDescriptor(r,o);a&&Object.defineProperty(e,o,a.get?a:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const le=Ga(H),Yu=Ga(sn);var Rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Xo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jo={exports:{}},Jn={};/**
1
+ (function(Bt,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],k):(Bt=typeof globalThis<"u"?globalThis:Bt||self,k(Bt.PortalSessions={},Bt.React,Bt.ReactDOM))})(this,function(Bt,k,Vn){"use strict";var XE=Object.defineProperty;var e2=(Bt,k,Vn)=>k in Bt?XE(Bt,k,{enumerable:!0,configurable:!0,writable:!0,value:Vn}):Bt[k]=Vn;var gh=(Bt,k,Vn)=>(e2(Bt,typeof k!="symbol"?k+"":k,Vn),Vn);function uu(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}function mh(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}const be=uu(k),yh=uu(Vn);var hr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zo={exports:{}},Fr={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var Xa;function Qu(){if(Xa)return Jn;Xa=1;var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(u,f,g){var h,x={},l=null,v=null;g!==void 0&&(l=""+g),f.key!==void 0&&(l=""+f.key),f.ref!==void 0&&(v=f.ref);for(h in f)r.call(f,h)&&!a.hasOwnProperty(h)&&(x[h]=f[h]);if(u&&u.defaultProps)for(h in f=u.defaultProps,f)x[h]===void 0&&(x[h]=f[h]);return{$$typeof:t,type:u,key:l,ref:v,props:x,_owner:o.current}}return Jn.Fragment=n,Jn.jsx=s,Jn.jsxs=s,Jn}var Yn={};/**
9
+ */var lu;function vh(){if(lu)return Fr;lu=1;var e=k,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(c,h,g){var d,E={},u=null,w=null;g!==void 0&&(u=""+g),h.key!==void 0&&(u=""+h.key),h.ref!==void 0&&(w=h.ref);for(d in h)r.call(h,d)&&!a.hasOwnProperty(d)&&(E[d]=h[d]);if(c&&c.defaultProps)for(d in h=c.defaultProps,h)E[d]===void 0&&(E[d]=h[d]);return{$$typeof:t,type:c,key:u,ref:w,props:E,_owner:i.current}}return Fr.Fragment=n,Fr.jsx=s,Fr.jsxs=s,Fr}var jr={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,25 +14,25 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Ja;function Zu(){return Ja||(Ja=1,process.env.NODE_ENV!=="production"&&function(){var e=H,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),l=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),i=Symbol.iterator,c="@@iterator";function p(T){if(T===null||typeof T!="object")return null;var se=i&&T[i]||T[c];return typeof se=="function"?se:null}var d=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(T){{for(var se=arguments.length,ye=new Array(se>1?se-1:0),xe=1;xe<se;xe++)ye[xe-1]=arguments[xe];y("error",T,ye)}}function y(T,se,ye){{var xe=d.ReactDebugCurrentFrame,Ie=xe.getStackAddendum();Ie!==""&&(se+="%s",ye=ye.concat([Ie]));var Ue=ye.map(function(je){return String(je)});Ue.unshift("Warning: "+se),Function.prototype.apply.call(console[T],console,Ue)}}var b=!1,C=!1,S=!1,k=!1,B=!1,O;O=Symbol.for("react.module.reference");function j(T){return!!(typeof T=="string"||typeof T=="function"||T===r||T===a||B||T===o||T===g||T===h||k||T===v||b||C||S||typeof T=="object"&&T!==null&&(T.$$typeof===l||T.$$typeof===x||T.$$typeof===s||T.$$typeof===u||T.$$typeof===f||T.$$typeof===O||T.getModuleId!==void 0))}function I(T,se,ye){var xe=T.displayName;if(xe)return xe;var Ie=se.displayName||se.name||"";return Ie!==""?ye+"("+Ie+")":ye}function D(T){return T.displayName||"Context"}function M(T){if(T==null)return null;if(typeof T.tag=="number"&&m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof T=="function")return T.displayName||T.name||null;if(typeof T=="string")return T;switch(T){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case g:return"Suspense";case h:return"SuspenseList"}if(typeof T=="object")switch(T.$$typeof){case u:var se=T;return D(se)+".Consumer";case s:var ye=T;return D(ye._context)+".Provider";case f:return I(T,T.render,"ForwardRef");case x:var xe=T.displayName||null;return xe!==null?xe:M(T.type)||"Memo";case l:{var Ie=T,Ue=Ie._payload,je=Ie._init;try{return M(je(Ue))}catch{return null}}}return null}var $=Object.assign,P=0,L,q,K,Q,Z,ee,ue;function ne(){}ne.__reactDisabledLog=!0;function me(){{if(P===0){L=console.log,q=console.info,K=console.warn,Q=console.error,Z=console.group,ee=console.groupCollapsed,ue=console.groupEnd;var T={configurable:!0,enumerable:!0,value:ne,writable:!0};Object.defineProperties(console,{info:T,log:T,warn:T,error:T,group:T,groupCollapsed:T,groupEnd:T})}P++}}function de(){{if(P--,P===0){var T={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},T,{value:L}),info:$({},T,{value:q}),warn:$({},T,{value:K}),error:$({},T,{value:Q}),group:$({},T,{value:Z}),groupCollapsed:$({},T,{value:ee}),groupEnd:$({},T,{value:ue})})}P<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var V=d.ReactCurrentDispatcher,U;function J(T,se,ye){{if(U===void 0)try{throw Error()}catch(Ie){var xe=Ie.stack.trim().match(/\n( *(at )?)/);U=xe&&xe[1]||""}return`
18
- `+U+T}}var w=!1,_;{var N=typeof WeakMap=="function"?WeakMap:Map;_=new N}function R(T,se){if(!T||w)return"";{var ye=_.get(T);if(ye!==void 0)return ye}var xe;w=!0;var Ie=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ue;Ue=V.current,V.current=null,me();try{if(se){var je=function(){throw Error()};if(Object.defineProperty(je.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(je,[])}catch(He){xe=He}Reflect.construct(T,[],je)}else{try{je.call()}catch(He){xe=He}T.call(je.prototype)}}else{try{throw Error()}catch(He){xe=He}T()}}catch(He){if(He&&xe&&typeof He.stack=="string"){for(var Be=He.stack.split(`
19
- `),st=xe.stack.split(`
20
- `),Ge=Be.length-1,Xe=st.length-1;Ge>=1&&Xe>=0&&Be[Ge]!==st[Xe];)Xe--;for(;Ge>=1&&Xe>=0;Ge--,Xe--)if(Be[Ge]!==st[Xe]){if(Ge!==1||Xe!==1)do if(Ge--,Xe--,Xe<0||Be[Ge]!==st[Xe]){var Oe=`
21
- `+Be[Ge].replace(" at new "," at ");return T.displayName&&Oe.includes("<anonymous>")&&(Oe=Oe.replace("<anonymous>",T.displayName)),typeof T=="function"&&_.set(T,Oe),Oe}while(Ge>=1&&Xe>=0);break}}}finally{w=!1,V.current=Ue,de(),Error.prepareStackTrace=Ie}var rt=T?T.displayName||T.name:"",lt=rt?J(rt):"";return typeof T=="function"&&_.set(T,lt),lt}function W(T,se,ye){return R(T,!1)}function G(T){var se=T.prototype;return!!(se&&se.isReactComponent)}function X(T,se,ye){if(T==null)return"";if(typeof T=="function")return R(T,G(T));if(typeof T=="string")return J(T);switch(T){case g:return J("Suspense");case h:return J("SuspenseList")}if(typeof T=="object")switch(T.$$typeof){case f:return W(T.render);case x:return X(T.type,se,ye);case l:{var xe=T,Ie=xe._payload,Ue=xe._init;try{return X(Ue(Ie),se,ye)}catch{}}}return""}var F=Object.prototype.hasOwnProperty,ce={},fe=d.ReactDebugCurrentFrame;function re(T){if(T){var se=T._owner,ye=X(T.type,T._source,se?se.type:null);fe.setExtraStackFrame(ye)}else fe.setExtraStackFrame(null)}function oe(T,se,ye,xe,Ie){{var Ue=Function.call.bind(F);for(var je in T)if(Ue(T,je)){var Be=void 0;try{if(typeof T[je]!="function"){var st=Error((xe||"React class")+": "+ye+" type `"+je+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof T[je]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw st.name="Invariant Violation",st}Be=T[je](se,je,xe,ye,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ge){Be=Ge}Be&&!(Be instanceof Error)&&(re(Ie),m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",xe||"React class",ye,je,typeof Be),re(null)),Be instanceof Error&&!(Be.message in ce)&&(ce[Be.message]=!0,re(Ie),m("Failed %s type: %s",ye,Be.message),re(null))}}}var ge=Array.isArray;function ae(T){return ge(T)}function be(T){{var se=typeof Symbol=="function"&&Symbol.toStringTag,ye=se&&T[Symbol.toStringTag]||T.constructor.name||"Object";return ye}}function Ce(T){try{return Fe(T),!1}catch{return!0}}function Fe(T){return""+T}function Ae(T){if(Ce(T))return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",be(T)),Fe(T)}var Ve=d.ReactCurrentOwner,ze={key:!0,ref:!0,__self:!0,__source:!0},wt,Ke,et;et={};function We(T){if(F.call(T,"ref")){var se=Object.getOwnPropertyDescriptor(T,"ref").get;if(se&&se.isReactWarning)return!1}return T.ref!==void 0}function Ee(T){if(F.call(T,"key")){var se=Object.getOwnPropertyDescriptor(T,"key").get;if(se&&se.isReactWarning)return!1}return T.key!==void 0}function Lt(T,se){if(typeof T.ref=="string"&&Ve.current&&se&&Ve.current.stateNode!==se){var ye=M(Ve.current.type);et[ye]||(m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',M(Ve.current.type),T.ref),et[ye]=!0)}}function ut(T,se){{var ye=function(){wt||(wt=!0,m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",se))};ye.isReactWarning=!0,Object.defineProperty(T,"key",{get:ye,configurable:!0})}}function mt(T,se){{var ye=function(){Ke||(Ke=!0,m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",se))};ye.isReactWarning=!0,Object.defineProperty(T,"ref",{get:ye,configurable:!0})}}var ht=function(T,se,ye,xe,Ie,Ue,je){var Be={$$typeof:t,type:T,key:se,ref:ye,props:je,_owner:Ue};return Be._store={},Object.defineProperty(Be._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Be,"_self",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.defineProperty(Be,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ie}),Object.freeze&&(Object.freeze(Be.props),Object.freeze(Be)),Be};function Wt(T,se,ye,xe,Ie){{var Ue,je={},Be=null,st=null;ye!==void 0&&(Ae(ye),Be=""+ye),Ee(se)&&(Ae(se.key),Be=""+se.key),We(se)&&(st=se.ref,Lt(se,Ie));for(Ue in se)F.call(se,Ue)&&!ze.hasOwnProperty(Ue)&&(je[Ue]=se[Ue]);if(T&&T.defaultProps){var Ge=T.defaultProps;for(Ue in Ge)je[Ue]===void 0&&(je[Ue]=Ge[Ue])}if(Be||st){var Xe=typeof T=="function"?T.displayName||T.name||"Unknown":T;Be&&ut(je,Xe),st&&mt(je,Xe)}return ht(T,Be,st,Ie,xe,Ve.current,je)}}var gt=d.ReactCurrentOwner,Bt=d.ReactDebugCurrentFrame;function yt(T){if(T){var se=T._owner,ye=X(T.type,T._source,se?se.type:null);Bt.setExtraStackFrame(ye)}else Bt.setExtraStackFrame(null)}var xt;xt=!1;function on(T){return typeof T=="object"&&T!==null&&T.$$typeof===t}function _n(){{if(gt.current){var T=M(gt.current.type);if(T)return`
17
+ */var cu;function bh(){return cu||(cu=1,process.env.NODE_ENV!=="production"&&function(){var e=k,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),w=Symbol.for("react.offscreen"),o=Symbol.iterator,l="@@iterator";function p(L){if(L===null||typeof L!="object")return null;var ye=o&&L[o]||L[l];return typeof ye=="function"?ye:null}var f=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function m(L){{for(var ye=arguments.length,De=new Array(ye>1?ye-1:0),Me=1;Me<ye;Me++)De[Me-1]=arguments[Me];b("error",L,De)}}function b(L,ye,De){{var Me=f.ReactDebugCurrentFrame,Qe=Me.getStackAddendum();Qe!==""&&(ye+="%s",De=De.concat([Qe]));var et=De.map(function($e){return String($e)});et.unshift("Warning: "+ye),Function.prototype.apply.call(console[L],console,et)}}var C=!1,S=!1,D=!1,A=!1,N=!1,I;I=Symbol.for("react.module.reference");function _(L){return!!(typeof L=="string"||typeof L=="function"||L===r||L===a||N||L===i||L===g||L===d||A||L===w||C||S||D||typeof L=="object"&&L!==null&&(L.$$typeof===u||L.$$typeof===E||L.$$typeof===s||L.$$typeof===c||L.$$typeof===h||L.$$typeof===I||L.getModuleId!==void 0))}function Q(L,ye,De){var Me=L.displayName;if(Me)return Me;var Qe=ye.displayName||ye.name||"";return Qe!==""?De+"("+Qe+")":De}function $(L){return L.displayName||"Context"}function V(L){if(L==null)return null;if(typeof L.tag=="number"&&m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof L=="function")return L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case g:return"Suspense";case d:return"SuspenseList"}if(typeof L=="object")switch(L.$$typeof){case c:var ye=L;return $(ye)+".Consumer";case s:var De=L;return $(De._context)+".Provider";case h:return Q(L,L.render,"ForwardRef");case E:var Me=L.displayName||null;return Me!==null?Me:V(L.type)||"Memo";case u:{var Qe=L,et=Qe._payload,$e=Qe._init;try{return V($e(et))}catch{return null}}}return null}var K=Object.assign,R=0,U,W,z,ne,re,ae,ge;function le(){}le.__reactDisabledLog=!0;function xe(){{if(R===0){U=console.log,W=console.info,z=console.warn,ne=console.error,re=console.group,ae=console.groupCollapsed,ge=console.groupEnd;var L={configurable:!0,enumerable:!0,value:le,writable:!0};Object.defineProperties(console,{info:L,log:L,warn:L,error:L,group:L,groupCollapsed:L,groupEnd:L})}R++}}function ce(){{if(R--,R===0){var L={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:K({},L,{value:U}),info:K({},L,{value:W}),warn:K({},L,{value:z}),error:K({},L,{value:ne}),group:K({},L,{value:re}),groupCollapsed:K({},L,{value:ae}),groupEnd:K({},L,{value:ge})})}R<0&&m("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var q=f.ReactCurrentDispatcher,G;function Z(L,ye,De){{if(G===void 0)try{throw Error()}catch(Qe){var Me=Qe.stack.trim().match(/\n( *(at )?)/);G=Me&&Me[1]||""}return`
18
+ `+G+L}}var x=!1,M;{var j=typeof WeakMap=="function"?WeakMap:Map;M=new j}function B(L,ye){if(!L||x)return"";{var De=M.get(L);if(De!==void 0)return De}var Me;x=!0;var Qe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var et;et=q.current,q.current=null,xe();try{if(ye){var $e=function(){throw Error()};if(Object.defineProperty($e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($e,[])}catch(Ze){Me=Ze}Reflect.construct(L,[],$e)}else{try{$e.call()}catch(Ze){Me=Ze}L.call($e.prototype)}}else{try{throw Error()}catch(Ze){Me=Ze}L()}}catch(Ze){if(Ze&&Me&&typeof Ze.stack=="string"){for(var je=Ze.stack.split(`
19
+ `),Tt=Me.stack.split(`
20
+ `),ct=je.length-1,ut=Tt.length-1;ct>=1&&ut>=0&&je[ct]!==Tt[ut];)ut--;for(;ct>=1&&ut>=0;ct--,ut--)if(je[ct]!==Tt[ut]){if(ct!==1||ut!==1)do if(ct--,ut--,ut<0||je[ct]!==Tt[ut]){var qe=`
21
+ `+je[ct].replace(" at new "," at ");return L.displayName&&qe.includes("<anonymous>")&&(qe=qe.replace("<anonymous>",L.displayName)),typeof L=="function"&&M.set(L,qe),qe}while(ct>=1&&ut>=0);break}}}finally{x=!1,q.current=et,ce(),Error.prepareStackTrace=Qe}var ft=L?L.displayName||L.name:"",Ot=ft?Z(ft):"";return typeof L=="function"&&M.set(L,Ot),Ot}function X(L,ye,De){return B(L,!1)}function te(L){var ye=L.prototype;return!!(ye&&ye.isReactComponent)}function ee(L,ye,De){if(L==null)return"";if(typeof L=="function")return B(L,te(L));if(typeof L=="string")return Z(L);switch(L){case g:return Z("Suspense");case d:return Z("SuspenseList")}if(typeof L=="object")switch(L.$$typeof){case h:return X(L.render);case E:return ee(L.type,ye,De);case u:{var Me=L,Qe=Me._payload,et=Me._init;try{return ee(et(Qe),ye,De)}catch{}}}return""}var Y=Object.prototype.hasOwnProperty,ve={},Ee=f.ReactDebugCurrentFrame;function fe(L){if(L){var ye=L._owner,De=ee(L.type,L._source,ye?ye.type:null);Ee.setExtraStackFrame(De)}else Ee.setExtraStackFrame(null)}function pe(L,ye,De,Me,Qe){{var et=Function.call.bind(Y);for(var $e in L)if(et(L,$e)){var je=void 0;try{if(typeof L[$e]!="function"){var Tt=Error((Me||"React class")+": "+De+" type `"+$e+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof L[$e]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Tt.name="Invariant Violation",Tt}je=L[$e](ye,$e,Me,De,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ct){je=ct}je&&!(je instanceof Error)&&(fe(Qe),m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Me||"React class",De,$e,typeof je),fe(null)),je instanceof Error&&!(je.message in ve)&&(ve[je.message]=!0,fe(Qe),m("Failed %s type: %s",De,je.message),fe(null))}}}var Oe=Array.isArray;function me(L){return Oe(L)}function Ne(L){{var ye=typeof Symbol=="function"&&Symbol.toStringTag,De=ye&&L[Symbol.toStringTag]||L.constructor.name||"Object";return De}}function Fe(L){try{return ze(L),!1}catch{return!0}}function ze(L){return""+L}function We(L){if(Fe(L))return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ne(L)),ze(L)}var nt=f.ReactCurrentOwner,ot={key:!0,ref:!0,__self:!0,__source:!0},$t,rt,dt;dt={};function at(L){if(Y.call(L,"ref")){var ye=Object.getOwnPropertyDescriptor(L,"ref").get;if(ye&&ye.isReactWarning)return!1}return L.ref!==void 0}function ke(L){if(Y.call(L,"key")){var ye=Object.getOwnPropertyDescriptor(L,"key").get;if(ye&&ye.isReactWarning)return!1}return L.key!==void 0}function jt(L,ye){if(typeof L.ref=="string"&&nt.current&&ye&&nt.current.stateNode!==ye){var De=V(nt.current.type);dt[De]||(m('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',V(nt.current.type),L.ref),dt[De]=!0)}}function vt(L,ye){{var De=function(){$t||($t=!0,m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ye))};De.isReactWarning=!0,Object.defineProperty(L,"key",{get:De,configurable:!0})}}function _t(L,ye){{var De=function(){rt||(rt=!0,m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ye))};De.isReactWarning=!0,Object.defineProperty(L,"ref",{get:De,configurable:!0})}}var bt=function(L,ye,De,Me,Qe,et,$e){var je={$$typeof:t,type:L,key:ye,ref:De,props:$e,_owner:et};return je._store={},Object.defineProperty(je._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(je,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Me}),Object.defineProperty(je,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Qe}),Object.freeze&&(Object.freeze(je.props),Object.freeze(je)),je};function Vt(L,ye,De,Me,Qe){{var et,$e={},je=null,Tt=null;De!==void 0&&(We(De),je=""+De),ke(ye)&&(We(ye.key),je=""+ye.key),at(ye)&&(Tt=ye.ref,jt(ye,Qe));for(et in ye)Y.call(ye,et)&&!ot.hasOwnProperty(et)&&($e[et]=ye[et]);if(L&&L.defaultProps){var ct=L.defaultProps;for(et in ct)$e[et]===void 0&&($e[et]=ct[et])}if(je||Tt){var ut=typeof L=="function"?L.displayName||L.name||"Unknown":L;je&&vt($e,ut),Tt&&_t($e,ut)}return bt(L,je,Tt,Qe,Me,nt.current,$e)}}var Ut=f.ReactCurrentOwner,zt=f.ReactDebugCurrentFrame;function Gt(L){if(L){var ye=L._owner,De=ee(L.type,L._source,ye?ye.type:null);zt.setExtraStackFrame(De)}else zt.setExtraStackFrame(null)}var Yt;Yt=!1;function ht(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function rn(){{if(Ut.current){var L=V(Ut.current.type);if(L)return`
22
22
 
23
- Check the render method of \``+T+"`."}return""}}function A(T){return""}var z={};function Y(T){{var se=_n();if(!se){var ye=typeof T=="string"?T:T.displayName||T.name;ye&&(se=`
23
+ Check the render method of \``+L+"`."}return""}}function F(L){return""}var J={};function ie(L){{var ye=rn();if(!ye){var De=typeof L=="string"?L:L.displayName||L.name;De&&(ye=`
24
24
 
25
- Check the top-level render call using <`+ye+">.")}return se}}function ie(T,se){{if(!T._store||T._store.validated||T.key!=null)return;T._store.validated=!0;var ye=Y(se);if(z[ye])return;z[ye]=!0;var xe="";T&&T._owner&&T._owner!==gt.current&&(xe=" It was passed a child from "+M(T._owner.type)+"."),yt(T),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ye,xe),yt(null)}}function he(T,se){{if(typeof T!="object")return;if(ae(T))for(var ye=0;ye<T.length;ye++){var xe=T[ye];on(xe)&&ie(xe,se)}else if(on(T))T._store&&(T._store.validated=!0);else if(T){var Ie=p(T);if(typeof Ie=="function"&&Ie!==T.entries)for(var Ue=Ie.call(T),je;!(je=Ue.next()).done;)on(je.value)&&ie(je.value,se)}}}function Pe(T){{var se=T.type;if(se==null||typeof se=="string")return;var ye;if(typeof se=="function")ye=se.propTypes;else if(typeof se=="object"&&(se.$$typeof===f||se.$$typeof===x))ye=se.propTypes;else return;if(ye){var xe=M(se);oe(ye,T.props,"prop",xe,T)}else if(se.PropTypes!==void 0&&!xt){xt=!0;var Ie=M(se);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ie||"Unknown")}typeof se.getDefaultProps=="function"&&!se.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function we(T){{for(var se=Object.keys(T.props),ye=0;ye<se.length;ye++){var xe=se[ye];if(xe!=="children"&&xe!=="key"){yt(T),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",xe),yt(null);break}}T.ref!==null&&(yt(T),m("Invalid attribute `ref` supplied to `React.Fragment`."),yt(null))}}var ve={};function Re(T,se,ye,xe,Ie,Ue){{var je=j(T);if(!je){var Be="";(T===void 0||typeof T=="object"&&T!==null&&Object.keys(T).length===0)&&(Be+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var st=A();st?Be+=st:Be+=_n();var Ge;T===null?Ge="null":ae(T)?Ge="array":T!==void 0&&T.$$typeof===t?(Ge="<"+(M(T.type)||"Unknown")+" />",Be=" Did you accidentally export a JSX literal instead of a component?"):Ge=typeof T,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ge,Be)}var Xe=Wt(T,se,ye,Ie,Ue);if(Xe==null)return Xe;if(je){var Oe=se.children;if(Oe!==void 0)if(xe)if(ae(Oe)){for(var rt=0;rt<Oe.length;rt++)he(Oe[rt],T);Object.freeze&&Object.freeze(Oe)}else m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else he(Oe,T)}if(F.call(se,"key")){var lt=M(T),He=Object.keys(se).filter(function(Wa){return Wa!=="key"}),an=He.length>0?"{key: someKey, "+He.join(": ..., ")+": ...}":"{key: someKey}";if(!ve[lt+an]){var Go=He.length>0?"{"+He.join(": ..., ")+": ...}":"{}";m(`A props object containing a "key" prop is being spread into JSX:
25
+ Check the top-level render call using <`+De+">.")}return ye}}function he(L,ye){{if(!L._store||L._store.validated||L.key!=null)return;L._store.validated=!0;var De=ie(ye);if(J[De])return;J[De]=!0;var Me="";L&&L._owner&&L._owner!==Ut.current&&(Me=" It was passed a child from "+V(L._owner.type)+"."),Gt(L),m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',De,Me),Gt(null)}}function Ae(L,ye){{if(typeof L!="object")return;if(me(L))for(var De=0;De<L.length;De++){var Me=L[De];ht(Me)&&he(Me,ye)}else if(ht(L))L._store&&(L._store.validated=!0);else if(L){var Qe=p(L);if(typeof Qe=="function"&&Qe!==L.entries)for(var et=Qe.call(L),$e;!($e=et.next()).done;)ht($e.value)&&he($e.value,ye)}}}function Ve(L){{var ye=L.type;if(ye==null||typeof ye=="string")return;var De;if(typeof ye=="function")De=ye.propTypes;else if(typeof ye=="object"&&(ye.$$typeof===h||ye.$$typeof===E))De=ye.propTypes;else return;if(De){var Me=V(ye);pe(De,L.props,"prop",Me,L)}else if(ye.PropTypes!==void 0&&!Yt){Yt=!0;var Qe=V(ye);m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Qe||"Unknown")}typeof ye.getDefaultProps=="function"&&!ye.getDefaultProps.isReactClassApproved&&m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Pe(L){{for(var ye=Object.keys(L.props),De=0;De<ye.length;De++){var Me=ye[De];if(Me!=="children"&&Me!=="key"){Gt(L),m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Me),Gt(null);break}}L.ref!==null&&(Gt(L),m("Invalid attribute `ref` supplied to `React.Fragment`."),Gt(null))}}var Re={};function Ge(L,ye,De,Me,Qe,et){{var $e=_(L);if(!$e){var je="";(L===void 0||typeof L=="object"&&L!==null&&Object.keys(L).length===0)&&(je+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Tt=F();Tt?je+=Tt:je+=rn();var ct;L===null?ct="null":me(L)?ct="array":L!==void 0&&L.$$typeof===t?(ct="<"+(V(L.type)||"Unknown")+" />",je=" Did you accidentally export a JSX literal instead of a component?"):ct=typeof L,m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ct,je)}var ut=Vt(L,ye,De,Qe,et);if(ut==null)return ut;if($e){var qe=ye.children;if(qe!==void 0)if(Me)if(me(qe)){for(var ft=0;ft<qe.length;ft++)Ae(qe[ft],L);Object.freeze&&Object.freeze(qe)}else m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ae(qe,L)}if(Y.call(ye,"key")){var Ot=V(L),Ze=Object.keys(ye).filter(function(dr){return dr!=="key"}),Zt=Ze.length>0?"{key: someKey, "+Ze.join(": ..., ")+": ...}":"{key: someKey}";if(!Re[Ot+Zt]){var fr=Ze.length>0?"{"+Ze.join(": ..., ")+": ...}":"{}";m(`A props object containing a "key" prop is being spread into JSX:
26
26
  let props = %s;
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,an,lt,Go,lt),ve[lt+an]=!0}}return T===r?we(Xe):Pe(Xe),Xe}}function _e(T,se,ye){return Re(T,se,ye,!0)}function dt(T,se,ye){return Re(T,se,ye,!1)}var ft=dt,Se=_e;Yn.Fragment=r,Yn.jsx=ft,Yn.jsxs=Se}()),Yn}process.env.NODE_ENV==="production"?Jo.exports=Qu():Jo.exports=Zu();var E=Jo.exports,Tn=(e=>(e.REDEEM_GIFTCARD="REDEEM_GIFTCARD",e.TOP_UP_GIFTCARD="TOP_UP_GIFTCARD",e.PORTAL="PORTAL",e.PREPAID="PREPAID",e.SAVE="SAVE",e.VOUCHER="VOUCHER",e))(Tn||{}),Zt=(e=>(e.REDEEM_GIFTCARD="/redeem_giftcard",e.TOP_UP_GIFTCARD="/top_up_giftcard",e.PORTAL="/portal",e.PREPAID="/prepaid",e.SAVE="/save",e.VOUCHER="/voucher",e))(Zt||{});const ed={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Kr{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||ed,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,o){return o&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Kr(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Kr(this.logger,t)}}var Gt=new Kr;class Wr{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const o=this.observers[r].get(n)||0;this.observers[r].set(n,o+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(s=>{let[u,f]=s;for(let g=0;g<f;g++)u(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[u,f]=s;for(let g=0;g<f;g++)u.apply(u,[t,...r])})}}function Qn(){let e,t;const n=new Promise((r,o)=>{e=r,t=o});return n.resolve=e,n.reject=t,n}function Ya(e){return e==null?"":""+e}function td(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const nd=/###/g;function Zn(e,t,n){function r(u){return u&&u.indexOf("###")>-1?u.replace(nd,"."):u}function o(){return!e||typeof e=="string"}const a=typeof t!="string"?t:t.split(".");let s=0;for(;s<a.length-1;){if(o())return{};const u=r(a[s]);!e[u]&&n&&(e[u]=new n),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++s}return o()?{}:{obj:e,k:r(a[s])}}function Qa(e,t,n){const{obj:r,k:o}=Zn(e,t,Object);if(r!==void 0||t.length===1){r[o]=n;return}let a=t[t.length-1],s=t.slice(0,t.length-1),u=Zn(e,s,Object);for(;u.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),u=Zn(e,s,Object),u&&u.obj&&typeof u.obj[`${u.k}.${a}`]<"u"&&(u.obj=void 0);u.obj[`${u.k}.${a}`]=n}function rd(e,t,n,r){const{obj:o,k:a}=Zn(e,t,Object);o[a]=o[a]||[],o[a].push(n)}function Gr(e,t){const{obj:n,k:r}=Zn(e,t);if(n)return n[r]}function od(e,t,n){const r=Gr(e,n);return r!==void 0?r:Gr(t,n)}function Za(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):Za(e[r],t[r],n):e[r]=t[r]);return e}function Nn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var id={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function ad(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>id[t]):e}class sd{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const ld=[" ",",","?","!",";"],cd=new sd(20);function ud(e,t,n){t=t||"",n=n||"";const r=ld.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const o=cd.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!o.test(e);if(!a){const s=e.indexOf(n);s>0&&!o.test(e.substring(0,s))&&(a=!0)}return a}function Yo(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let o=e;for(let a=0;a<r.length;){if(!o||typeof o!="object")return;let s,u="";for(let f=a;f<r.length;++f)if(f!==a&&(u+=n),u+=r[f],s=o[u],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&f<r.length-1)continue;a+=f-a+1;break}o=s}return o}function Xr(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class es extends Wr{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,s=o.ignoreJSONStructure!==void 0?o.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;t.indexOf(".")>-1?u=t.split("."):(u=[t,n],r&&(Array.isArray(r)?u.push(...r):typeof r=="string"&&a?u.push(...r.split(a)):u.push(r)));const f=Gr(this.data,u);return!f&&!n&&!r&&t.indexOf(".")>-1&&(t=u[0],n=u[1],r=u.slice(2).join(".")),f||!s||typeof r!="string"?f:Yo(this.data&&this.data[t]&&this.data[t][n],r,a)}addResource(t,n,r,o){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let u=[t,n];r&&(u=u.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(u=t.split("."),o=n,n=u[1]),this.addNamespaces(n),Qa(this.data,u,o),a.silent||this.emit("added",t,n,r,o)}addResources(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(typeof r[a]=="string"||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});o.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[t,n];t.indexOf(".")>-1&&(u=t.split("."),o=r,r=n,n=u[1]),this.addNamespaces(n);let f=Gr(this.data,u)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),o?Za(f,r,a):f={...f,...r},Qa(this.data,u,f),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(o=>n[o]&&Object.keys(n[o]).length>0)}toJSON(){return this.data}}var ts={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,o){return e.forEach(a=>{this.processors[a]&&(t=this.processors[a].process(t,n,r,o))}),t}};const ns={};class Jr extends Wr{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),td(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Gt.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,u=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!ud(t,r,o);if(s&&!u){const f=t.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:t,namespaces:a};const g=t.split(r);(r!==o||r===o&&this.options.ns.indexOf(g[0])>-1)&&(a=g.shift()),t=g.join(o)}return typeof a=="string"&&(a=[a]),{key:t,namespaces:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const o=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:u}=this.extractFromKey(t[t.length-1],n),f=u[u.length-1],g=n.lng||this.language,h=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(h){const b=n.nsSeparator||this.options.nsSeparator;return o?{res:`${f}${b}${s}`,usedKey:s,exactUsedKey:s,usedLng:g,usedNS:f,usedParams:this.getUsedParamsDetails(n)}:`${f}${b}${s}`}return o?{res:s,usedKey:s,exactUsedKey:s,usedLng:g,usedNS:f,usedParams:this.getUsedParamsDetails(n)}:s}const x=this.resolve(t,n);let l=x&&x.res;const v=x&&x.usedKey||s,i=x&&x.exactUsedKey||s,c=Object.prototype.toString.apply(l),p=["[object Number]","[object Function]","[object RegExp]"],d=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&l&&(typeof l!="string"&&typeof l!="boolean"&&typeof l!="number")&&p.indexOf(c)<0&&!(typeof d=="string"&&Array.isArray(l))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const b=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,l,{...n,ns:u}):`key '${s} (${this.language})' returned an object instead of string.`;return o?(x.res=b,x.usedParams=this.getUsedParamsDetails(n),x):b}if(a){const b=Array.isArray(l),C=b?[]:{},S=b?i:v;for(const k in l)if(Object.prototype.hasOwnProperty.call(l,k)){const B=`${S}${a}${k}`;C[k]=this.translate(B,{...n,joinArrays:!1,ns:u}),C[k]===B&&(C[k]=l[k])}l=C}}else if(m&&typeof d=="string"&&Array.isArray(l))l=l.join(d),l&&(l=this.extendTranslation(l,t,n,r));else{let b=!1,C=!1;const S=n.count!==void 0&&typeof n.count!="string",k=Jr.hasDefaultValue(n),B=S?this.pluralResolver.getSuffix(g,n.count,n):"",O=n.ordinal&&S?this.pluralResolver.getSuffix(g,n.count,{ordinal:!1}):"",j=S&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),I=j&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${B}`]||n[`defaultValue${O}`]||n.defaultValue;!this.isValidLookup(l)&&k&&(b=!0,l=I),this.isValidLookup(l)||(C=!0,l=s);const M=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:l,$=k&&I!==l&&this.options.updateMissing;if(C||b||$){if(this.logger.log($?"updateKey":"missingKey",g,f,s,$?I:l),a){const K=this.resolve(s,{...n,keySeparator:!1});K&&K.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.")}let P=[];const L=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&L&&L[0])for(let K=0;K<L.length;K++)P.push(L[K]);else this.options.saveMissingTo==="all"?P=this.languageUtils.toResolveHierarchy(n.lng||this.language):P.push(n.lng||this.language);const q=(K,Q,Z)=>{const ee=k&&Z!==l?Z:M;this.options.missingKeyHandler?this.options.missingKeyHandler(K,f,Q,ee,$,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(K,f,Q,ee,$,n),this.emit("missingKey",K,f,Q,l)};this.options.saveMissing&&(this.options.saveMissingPlurals&&S?P.forEach(K=>{const Q=this.pluralResolver.getSuffixes(K,n);j&&n[`defaultValue${this.options.pluralSeparator}zero`]&&Q.indexOf(`${this.options.pluralSeparator}zero`)<0&&Q.push(`${this.options.pluralSeparator}zero`),Q.forEach(Z=>{q([K],s+Z,n[`defaultValue${Z}`]||I)})}):q(P,s,I))}l=this.extendTranslation(l,t,n,x,r),C&&l===s&&this.options.appendNamespaceToMissingKey&&(l=`${f}:${s}`),(C||b)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?l=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}:${s}`:s,b?l:void 0):l=this.options.parseMissingKeyHandler(l))}return o?(x.res=l,x.usedParams=this.getUsedParamsDetails(n),x):l}extendTranslation(t,n,r,o,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||o.usedLng,o.usedNS,o.usedKey,{resolved:o});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const g=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(g){const l=t.match(this.interpolator.nestingRegexp);h=l&&l.length}let x=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(x={...this.options.interpolation.defaultVariables,...x}),t=this.interpolator.interpolate(t,x,r.lng||this.language,r),g){const l=t.match(this.interpolator.nestingRegexp),v=l&&l.length;h<v&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&o&&o.res&&(r.lng=o.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var l=arguments.length,v=new Array(l),i=0;i<l;i++)v[i]=arguments[i];return a&&a[0]===v[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):s.translate(...v,n)},r)),r.interpolation&&this.interpolator.reset()}const u=r.postProcess||this.options.postProcess,f=typeof u=="string"?[u]:u;return t!=null&&f&&f.length&&r.applyPostProcessor!==!1&&(t=ts.handle(f,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...o,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,o,a,s,u;return typeof t=="string"&&(t=[t]),t.forEach(f=>{if(this.isValidLookup(r))return;const g=this.extractFromKey(f,n),h=g.key;o=h;let x=g.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const l=n.count!==void 0&&typeof n.count!="string",v=l&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),i=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",c=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);x.forEach(p=>{this.isValidLookup(r)||(u=p,!ns[`${c[0]}-${p}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(u)&&(ns[`${c[0]}-${p}`]=!0,this.logger.warn(`key "${o}" for languages "${c.join(", ")}" won't get resolved as namespace "${u}" 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!!!")),c.forEach(d=>{if(this.isValidLookup(r))return;s=d;const m=[h];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(m,h,d,p,n);else{let b;l&&(b=this.pluralResolver.getSuffix(d,n.count,n));const C=`${this.options.pluralSeparator}zero`,S=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(m.push(h+b),n.ordinal&&b.indexOf(S)===0&&m.push(h+b.replace(S,this.options.pluralSeparator)),v&&m.push(h+C)),i){const k=`${h}${this.options.contextSeparator}${n.context}`;m.push(k),l&&(m.push(k+b),n.ordinal&&b.indexOf(S)===0&&m.push(k+b.replace(S,this.options.pluralSeparator)),v&&m.push(k+C))}}let y;for(;y=m.pop();)this.isValidLookup(r)||(a=y,r=this.getResource(d,p,y,n))}))})}),{res:r,usedKey:o,exactUsedKey:a,usedLng:s,usedNS:u}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,o):this.resourceStore.getResource(t,n,r,o)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let o=r?t.replace:t;if(r&&typeof t.count<"u"&&(o.count=t.count),this.options.interpolation.defaultVariables&&(o={...this.options.interpolation.defaultVariables,...o}),!r){o={...o};for(const a of n)delete o[a]}return o}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function Qo(e){return e.charAt(0).toUpperCase()+e.slice(1)}class rs{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Gt.create("languageUtils")}getScriptPartFromCode(t){if(t=Xr(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=Xr(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(o=>o.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Qo(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=Qo(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=Qo(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const o=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(o))&&(n=o)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const o=this.getLanguagePartFromCode(r);if(this.isSupportedCode(o))return n=o;n=this.options.supportedLngs.find(a=>{if(a===o)return a;if(!(a.indexOf("-")<0&&o.indexOf("-")<0)&&(a.indexOf("-")>0&&o.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===o||a.indexOf(o)===0&&o.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),o=[],a=s=>{s&&(this.isSupportedCode(s)?o.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),r.forEach(s=>{o.indexOf(s)<0&&a(this.formatLanguageCode(s))}),o}}let dd=[{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}],fd={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return 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 e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const hd=["v1","v2","v3"],pd=["v4"],os={zero:0,one:1,two:2,few:3,many:4,other:5};function md(){const e={};return dd.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:fd[t.fc]}})}),e}class gd{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Gt.create("pluralResolver"),(!this.options.compatibilityJSON||pd.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!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=md()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Xr(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(o=>`${n}${o}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((o,a)=>os[o]-os[a]).map(o=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${o}`):r.numbers.map(o=>this.getSuffix(t,o,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=this.getRule(t,r);return o?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${o.select(n)}`:this.getSuffixRetroCompatible(o,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let o=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(o===2?o="plural":o===1&&(o=""));const a=()=>this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString();return this.options.compatibilityJSON==="v1"?o===1?"":typeof o=="number"?`_plural_${o.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!hd.includes(this.options.compatibilityJSON)}}function is(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=od(e,t,n);return!a&&o&&typeof n=="string"&&(a=Yo(e,n,r),a===void 0&&(a=Yo(t,n,r))),a}class yd{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Gt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:o,prefix:a,prefixEscaped:s,suffix:u,suffixEscaped:f,formatSeparator:g,unescapeSuffix:h,unescapePrefix:x,nestingPrefix:l,nestingPrefixEscaped:v,nestingSuffix:i,nestingSuffixEscaped:c,nestingOptionsSeparator:p,maxReplaces:d,alwaysFormat:m}=t.interpolation;this.escape=n!==void 0?n:ad,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=o!==void 0?o:!1,this.prefix=a?Nn(a):s||"{{",this.suffix=u?Nn(u):f||"}}",this.formatSeparator=g||",",this.unescapePrefix=h?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=l?Nn(l):v||Nn("$t("),this.nestingSuffix=i?Nn(i):c||Nn(")"),this.nestingOptionsSeparator=p||",",this.maxReplaces=d||1e3,this.alwaysFormat=m!==void 0?m:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,o){let a,s,u;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function g(i){return i.replace(/\$/g,"$$$$")}const h=i=>{if(i.indexOf(this.formatSeparator)<0){const m=is(n,f,i,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,r,{...o,...n,interpolationkey:i}):m}const c=i.split(this.formatSeparator),p=c.shift().trim(),d=c.join(this.formatSeparator).trim();return this.format(is(n,f,p,this.options.keySeparator,this.options.ignoreJSONStructure),d,r,{...o,...n,interpolationkey:p})};this.resetRegExp();const x=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,l=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:i=>g(i)},{regex:this.regexp,safeValue:i=>this.escapeValue?g(this.escape(i)):g(i)}].forEach(i=>{for(u=0;a=i.regex.exec(t);){const c=a[1].trim();if(s=h(c),s===void 0)if(typeof x=="function"){const d=x(t,a,o);s=typeof d=="string"?d:""}else if(o&&Object.prototype.hasOwnProperty.call(o,c))s="";else if(l){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${c} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Ya(s));const p=i.safeValue(s);if(t=t.replace(a[0],p),l?(i.regex.lastIndex+=s.length,i.regex.lastIndex-=a[0].length):i.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o,a,s;function u(f,g){const h=this.nestingOptionsSeparator;if(f.indexOf(h)<0)return f;const x=f.split(new RegExp(`${h}[ ]*{`));let l=`{${x[1]}`;f=x[0],l=this.interpolate(l,s);const v=l.match(/'/g),i=l.match(/"/g);(v&&v.length%2===0&&!i||i.length%2!==0)&&(l=l.replace(/'/g,'"'));try{s=JSON.parse(l),g&&(s={...g,...s})}catch(c){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,c),`${f}${h}${l}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,f}for(;o=this.nestingRegexp.exec(t);){let f=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let g=!1;if(o[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(o[1])){const h=o[1].split(this.formatSeparator).map(x=>x.trim());o[1]=h.shift(),f=h,g=!0}if(a=n(u.call(this,o[1].trim(),s),s),a&&o[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=Ya(a)),a||(this.logger.warn(`missed to resolve ${o[1]} for nesting ${t}`),a=""),g&&(a=f.reduce((h,x)=>this.format(h,x,r.lng,{...r,interpolationkey:o[1].trim()}),a.trim())),t=t.replace(o[0],a),this.regexp.lastIndex=0}return t}}function vd(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const o=r[1].substring(0,r[1].length-1);t==="currency"&&o.indexOf(":")<0?n.currency||(n.currency=o.trim()):t==="relativetime"&&o.indexOf(":")<0?n.range||(n.range=o.trim()):o.split(";").forEach(s=>{if(s){const[u,...f]=s.split(":"),g=f.join(":").trim().replace(/^'+|'+$/g,""),h=u.trim();n[h]||(n[h]=g),g==="false"&&(n[h]=!1),g==="true"&&(n[h]=!0),isNaN(g)||(n[h]=parseInt(g,10))}})}return{formatName:t,formatOptions:n}}function jn(e){const t={};return function(r,o,a){const s=o+JSON.stringify(a);let u=t[s];return u||(u=e(Xr(o),a),t[s]=u),u(r)}}class bd{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Gt.create("formatter"),this.options=t,this.formats={number:jn((n,r)=>{const o=new Intl.NumberFormat(n,{...r});return a=>o.format(a)}),currency:jn((n,r)=>{const o=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>o.format(a)}),datetime:jn((n,r)=>{const o=new Intl.DateTimeFormat(n,{...r});return a=>o.format(a)}),relativetime:jn((n,r)=>{const o=new Intl.RelativeTimeFormat(n,{...r});return a=>o.format(a,r.range||"day")}),list:jn((n,r)=>{const o=new Intl.ListFormat(n,{...r});return a=>o.format(a)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=jn(n)}format(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((u,f)=>{const{formatName:g,formatOptions:h}=vd(f);if(this.formats[g]){let x=u;try{const l=o&&o.formatParams&&o.formatParams[o.interpolationkey]||{},v=l.locale||l.lng||o.locale||o.lng||r;x=this.formats[g](u,v,{...h,...o,...l})}catch(l){this.logger.warn(l)}return x}else this.logger.warn(`there was no format function for ${g}`);return u},t)}}function wd(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class xd extends Wr{constructor(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=o,this.logger=Gt.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=o.maxParallelReads||10,this.readingCalls=0,this.maxRetries=o.maxRetries>=0?o.maxRetries:5,this.retryTimeout=o.retryTimeout>=1?o.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,o.backend,o)}queueLoad(t,n,r,o){const a={},s={},u={},f={};return t.forEach(g=>{let h=!0;n.forEach(x=>{const l=`${g}|${x}`;!r.reload&&this.store.hasResourceBundle(g,x)?this.state[l]=2:this.state[l]<0||(this.state[l]===1?s[l]===void 0&&(s[l]=!0):(this.state[l]=1,h=!1,s[l]===void 0&&(s[l]=!0),a[l]===void 0&&(a[l]=!0),f[x]===void 0&&(f[x]=!0)))}),h||(u[g]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:o}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(f)}}loaded(t,n,r){const o=t.split("|"),a=o[0],s=o[1];n&&this.emit("failedLoading",a,s,n),r&&this.store.addResourceBundle(a,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const u={};this.queue.forEach(f=>{rd(f.loaded,[a],s),wd(f,t),n&&f.errors.push(n),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(g=>{u[g]||(u[g]={});const h=f.loaded[g];h.length&&h.forEach(x=>{u[g][x]===void 0&&(u[g][x]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(f=>!f.done)}read(t,n,r){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:o,wait:a,callback:s});return}this.readingCalls++;const u=(g,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(g&&h&&o<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,o+1,a*2,s)},a);return}s(g,h)},f=this.backend[r].bind(this.backend);if(f.length===2){try{const g=f(t,n);g&&typeof g.then=="function"?g.then(h=>u(null,h)).catch(u):u(null,g)}catch(g){u(g)}return}return f(t,n,u)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?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();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(t,n,r,o);if(!a.toLoad.length)return a.pending.length||o(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),o=r[0],a=r[1];this.read(o,a,"read",void 0,void 0,(s,u)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${o} failed`,s),!s&&u&&this.logger.log(`${n}loaded namespace ${a} for language ${o}`,u),this.loaded(t,s,u)})}saveMissing(t,n,r,o,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const f={...s,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let h;g.length===5?h=g(t,n,r,o,f):h=g(t,n,r,o),h&&typeof h.then=="function"?h.then(x=>u(null,x)).catch(u):u(null,h)}catch(h){u(h)}else g(t,n,r,o,u,f)}!t||!t[0]||this.store.addResource(t[0],n,r,o)}}}function as(){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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(o=>{n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ss(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Yr(){}function kd(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class er extends Wr{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=ss(t),this.services={},this.logger=Gt,this.modules={external:[]},kd(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const o=as();this.options={...o,...this.options,...ss(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...o.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(h){return h?typeof h=="function"?new h:h:null}if(!this.options.isClone){this.modules.logger?Gt.init(a(this.modules.logger),this.options):Gt.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:typeof Intl<"u"&&(h=bd);const x=new rs(this.options);this.store=new es(this.options.resources,this.options);const l=this.services;l.logger=Gt,l.resourceStore=this.store,l.languageUtils=x,l.pluralResolver=new gd(x,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),h&&(!this.options.interpolation.format||this.options.interpolation.format===o.interpolation.format)&&(l.formatter=a(h),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new yd(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new xd(a(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(v){for(var i=arguments.length,c=new Array(i>1?i-1:0),p=1;p<i;p++)c[p-1]=arguments[p];t.emit(v,...c)}),this.modules.languageDetector&&(l.languageDetector=a(this.modules.languageDetector),l.languageDetector.init&&l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=a(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new Jr(this.services,this.options),this.translator.on("*",function(v){for(var i=arguments.length,c=new Array(i>1?i-1:0),p=1;p<i;p++)c[p-1]=arguments[p];t.emit(v,...c)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Yr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[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(h=>{this[h]=function(){return t.store[h](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=function(){return t.store[h](...arguments),t}});const f=Qn(),g=()=>{const h=(x,l)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(l),r(x,l)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initImmediate?g():setTimeout(g,0),f}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yr;const o=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(o&&o.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],s=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(g=>{g!=="cimode"&&a.indexOf(g)<0&&a.push(g)})};o?s(o):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>s(f)),this.options.preload&&this.options.preload.forEach(u=>s(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(u)})}else r(null)}reloadResources(t,n,r){const o=Qn();return t||(t=this.languages),n||(n=this.options.ns),r||(r=Yr),this.services.backendConnector.reload(t,n,a=>{o.resolve(),r(a)}),o}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&ts.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const o=Qn();this.emit("languageChanging",t);const a=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},s=(f,g)=>{g?(a(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,o.resolve(function(){return r.t(...arguments)}),n&&n(f,function(){return r.t(...arguments)})},u=f=>{!t&&!f&&this.services.languageDetector&&(f=[]);const g=typeof f=="string"?f:this.services.languageUtils.getBestMatchFromCodes(f);g&&(this.language||a(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(g)),this.loadResources(g,h=>{s(h,g)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),o}getFixedT(t,n,r){var o=this;const a=function(s,u){let f;if(typeof u!="object"){for(var g=arguments.length,h=new Array(g>2?g-2:0),x=2;x<g;x++)h[x-2]=arguments[x];f=o.options.overloadTranslationOptionHandler([s,u].concat(h))}else f={...u};f.lng=f.lng||a.lng,f.lngs=f.lngs||a.lngs,f.ns=f.ns||a.ns,f.keyPrefix=f.keyPrefix||r||a.keyPrefix;const l=o.options.keySeparator||".";let v;return f.keyPrefix&&Array.isArray(s)?v=s.map(i=>`${f.keyPrefix}${l}${i}`):v=f.keyPrefix?`${f.keyPrefix}${l}${s}`:s,o.t(v,f)};return typeof t=="string"?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?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;const r=n.lng||this.resolvedLanguage||this.languages[0],o=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(u,f)=>{const g=this.services.backendConnector.state[`${u}|${f}`];return g===-1||g===2};if(n.precheck){const u=n.precheck(this,s);if(u!==void 0)return u}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!o||s(a,t)))}loadNamespaces(t,n){const r=Qn();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(o=>{this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}),this.loadResources(o=>{r.resolve(),n&&n(o)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Qn();typeof t=="string"&&(t=[t]);const o=this.options.preload||[],a=t.filter(s=>o.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=o.concat(a),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["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"],r=this.services&&this.services.languageUtils||new rs(as());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new er(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Yr;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const o={...this.options,...t,isClone:!0},a=new er(o);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(u=>{a[u]=this[u]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new es(this.store.data,o),a.services.resourceStore=a.store),a.translator=new Jr(a.services,o),a.translator.on("*",function(u){for(var f=arguments.length,g=new Array(f>1?f-1:0),h=1;h<f;h++)g[h-1]=arguments[h];a.emit(u,...g)}),a.init(o,n),a.translator.options=o,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const pt=er.createInstance();pt.createInstance=er.createInstance,pt.createInstance,pt.dir,pt.init,pt.loadResources,pt.reloadResources,pt.use,pt.changeLanguage,pt.getFixedT,pt.t,pt.exists,pt.setDefaultNamespace,pt.hasLoadedNamespace,pt.loadNamespaces,pt.loadLanguages;const tr=(e,t="EUR")=>new Intl.NumberFormat(pt.language,{style:"currency",currency:t??"EUR"}).format(e/100),Zo=e=>{window.parent.postMessage(e,"*")};function ls(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ls(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ln(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ls(e))&&(r&&(r+=" "),r+=t);return r}const nr=e=>typeof e=="number"&&!isNaN(e),bn=e=>typeof e=="string",St=e=>typeof e=="function",Qr=e=>bn(e)||St(e)?e:null,ei=e=>H.isValidElement(e)||bn(e)||St(e)||nr(e);function Cd(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:o}=e;requestAnimationFrame(()=>{o.minHeight="initial",o.height=r+"px",o.transition=`all ${n}ms`,requestAnimationFrame(()=>{o.height="0",o.padding="0",o.margin="0",setTimeout(t,n)})})}function Zr(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:o=!0,collapseDuration:a=300}=e;return function(s){let{children:u,position:f,preventExitTransition:g,done:h,nodeRef:x,isIn:l,playToast:v}=s;const i=r?`${t}--${f}`:t,c=r?`${n}--${f}`:n,p=H.useRef(0);return H.useLayoutEffect(()=>{const d=x.current,m=i.split(" "),y=b=>{b.target===x.current&&(v(),d.removeEventListener("animationend",y),d.removeEventListener("animationcancel",y),p.current===0&&b.type!=="animationcancel"&&d.classList.remove(...m))};d.classList.add(...m),d.addEventListener("animationend",y),d.addEventListener("animationcancel",y)},[]),H.useEffect(()=>{const d=x.current,m=()=>{d.removeEventListener("animationend",m),o?Cd(d,h,a):h()};l||(g?m():(p.current=1,d.className+=` ${c}`,d.addEventListener("animationend",m)))},[l]),H.createElement(H.Fragment,null,u)}}function cs(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const vt=new Map;let rr=[];const ti=new Set,Ed=e=>ti.forEach(t=>t(e)),us=()=>vt.size>0;function ds(e,t){var n;if(t)return!((n=vt.get(t))==null||!n.isToastActive(e));let r=!1;return vt.forEach(o=>{o.isToastActive(e)&&(r=!0)}),r}function fs(e,t){ei(e)&&(us()||rr.push({content:e,options:t}),vt.forEach(n=>{n.buildToast(e,t)}))}function hs(e,t){vt.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function Sd(e){const{subscribe:t,getSnapshot:n,setProps:r}=H.useRef(function(a){const s=a.containerId||1;return{subscribe(u){const f=function(h,x,l){let v=1,i=0,c=[],p=[],d=[],m=x;const y=new Map,b=new Set,C=()=>{d=Array.from(y.values()),b.forEach(B=>B())},S=B=>{p=B==null?[]:p.filter(O=>O!==B),C()},k=B=>{const{toastId:O,onOpen:j,updateId:I,children:D}=B.props,M=I==null;B.staleId&&y.delete(B.staleId),y.set(O,B),p=[...p,B.props.toastId].filter($=>$!==B.staleId),C(),l(cs(B,M?"added":"updated")),M&&St(j)&&j(H.isValidElement(D)&&D.props)};return{id:h,props:m,observe:B=>(b.add(B),()=>b.delete(B)),toggle:(B,O)=>{y.forEach(j=>{O!=null&&O!==j.props.toastId||St(j.toggle)&&j.toggle(B)})},removeToast:S,toasts:y,clearQueue:()=>{i-=c.length,c=[]},buildToast:(B,O)=>{if((ue=>{let{containerId:ne,toastId:me,updateId:de}=ue;const V=ne?ne!==h:h!==1,U=y.has(me)&&de==null;return V||U})(O))return;const{toastId:j,updateId:I,data:D,staleId:M,delay:$}=O,P=()=>{S(j)},L=I==null;L&&i++;const q={...m,style:m.toastStyle,key:v++,...Object.fromEntries(Object.entries(O).filter(ue=>{let[ne,me]=ue;return me!=null})),toastId:j,updateId:I,data:D,closeToast:P,isIn:!1,className:Qr(O.className||m.toastClassName),bodyClassName:Qr(O.bodyClassName||m.bodyClassName),progressClassName:Qr(O.progressClassName||m.progressClassName),autoClose:!O.isLoading&&(K=O.autoClose,Q=m.autoClose,K===!1||nr(K)&&K>0?K:Q),deleteToast(){const ue=y.get(j),{onClose:ne,children:me}=ue.props;St(ne)&&ne(H.isValidElement(me)&&me.props),l(cs(ue,"removed")),y.delete(j),i--,i<0&&(i=0),c.length>0?k(c.shift()):C()}};var K,Q;q.closeButton=m.closeButton,O.closeButton===!1||ei(O.closeButton)?q.closeButton=O.closeButton:O.closeButton===!0&&(q.closeButton=!ei(m.closeButton)||m.closeButton);let Z=B;H.isValidElement(B)&&!bn(B.type)?Z=H.cloneElement(B,{closeToast:P,toastProps:q,data:D}):St(B)&&(Z=B({closeToast:P,toastProps:q,data:D}));const ee={content:Z,props:q,staleId:M};m.limit&&m.limit>0&&i>m.limit&&L?c.push(ee):nr($)?setTimeout(()=>{k(ee)},$):k(ee)},setProps(B){m=B},setToggle:(B,O)=>{y.get(B).toggle=O},isToastActive:B=>p.some(O=>O===B),getSnapshot:()=>m.newestOnTop?d.reverse():d}}(s,a,Ed);vt.set(s,f);const g=f.observe(u);return rr.forEach(h=>fs(h.content,h.options)),rr=[],()=>{g(),vt.delete(s)}},setProps(u){var f;(f=vt.get(s))==null||f.setProps(u)},getSnapshot(){var u;return(u=vt.get(s))==null?void 0:u.getSnapshot()}}}(e)).current;r(e);const o=H.useSyncExternalStore(t,n,n);return{getToastToRender:function(a){if(!o)return[];const s=new Map;return o.forEach(u=>{const{position:f}=u.props;s.has(f)||s.set(f,[]),s.get(f).push(u)}),Array.from(s,u=>a(u[0],u[1]))},isToastActive:ds,count:o==null?void 0:o.length}}function Pd(e){const[t,n]=H.useState(!1),[r,o]=H.useState(!1),a=H.useRef(null),s=H.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:u,pauseOnHover:f,closeToast:g,onClick:h,closeOnClick:x}=e;var l,v;function i(){n(!0)}function c(){n(!1)}function p(y){const b=a.current;s.canDrag&&b&&(s.didMove=!0,t&&c(),s.delta=e.draggableDirection==="x"?y.clientX-s.start:y.clientY-s.start,s.start!==y.clientX&&(s.canCloseOnClick=!1),b.style.transform=`translate3d(${e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,b.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function d(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",d);const y=a.current;if(s.canDrag&&s.didMove&&y){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return o(!0),e.closeToast(),void e.collapseAll();y.style.transition="transform 0.2s, opacity 0.2s",y.style.removeProperty("transform"),y.style.removeProperty("opacity")}}(v=vt.get((l={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||v.setToggle(l.id,l.fn),H.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||c(),window.addEventListener("focus",i),window.addEventListener("blur",c),()=>{window.removeEventListener("focus",i),window.removeEventListener("blur",c)}},[e.pauseOnFocusLoss]);const m={onPointerDown:function(y){if(e.draggable===!0||e.draggable===y.pointerType){s.didMove=!1,document.addEventListener("pointermove",p),document.addEventListener("pointerup",d);const b=a.current;s.canCloseOnClick=!0,s.canDrag=!0,b.style.transition="none",e.draggableDirection==="x"?(s.start=y.clientX,s.removalDistance=b.offsetWidth*(e.draggablePercent/100)):(s.start=y.clientY,s.removalDistance=b.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(y){const{top:b,bottom:C,left:S,right:k}=a.current.getBoundingClientRect();y.nativeEvent.type!=="touchend"&&e.pauseOnHover&&y.clientX>=S&&y.clientX<=k&&y.clientY>=b&&y.clientY<=C?c():i()}};return u&&f&&(m.onMouseEnter=c,e.stacked||(m.onMouseLeave=i)),x&&(m.onClick=y=>{h&&h(y),s.canCloseOnClick&&g()}),{playToast:i,pauseToast:c,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:m}}function Bd(e){let{delay:t,isRunning:n,closeToast:r,type:o="default",hide:a,className:s,style:u,controlledProgress:f,progress:g,rtl:h,isIn:x,theme:l}=e;const v=a||f&&g===0,i={...u,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};f&&(i.transform=`scaleX(${g})`);const c=ln("Toastify__progress-bar",f?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${l}`,`Toastify__progress-bar--${o}`,{"Toastify__progress-bar--rtl":h}),p=St(s)?s({rtl:h,type:o,defaultClassName:c}):ln(c,s),d={[f&&g>=1?"onTransitionEnd":"onAnimationEnd"]:f&&g<1?null:()=>{x&&r()}};return H.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},H.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${l} Toastify__progress-bar--${o}`}),H.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:p,style:i,...d}))}let Od=1;const ps=()=>""+Od++;function _d(e){return e&&(bn(e.toastId)||nr(e.toastId))?e.toastId:ps()}function or(e,t){return fs(e,t),t.toastId}function eo(e,t){return{...t,type:t&&t.type||e,toastId:_d(t)}}function to(e){return(t,n)=>or(t,eo(e,n))}function De(e,t){return or(e,eo("default",t))}De.loading=(e,t)=>or(e,eo("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),De.promise=function(e,t,n){let r,{pending:o,error:a,success:s}=t;o&&(r=bn(o)?De.loading(o,n):De.loading(o.render,{...n,...o}));const u={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},f=(h,x,l)=>{if(x==null)return void De.dismiss(r);const v={type:h,...u,...n,data:l},i=bn(x)?{render:x}:x;return r?De.update(r,{...v,...i}):De(i.render,{...v,...i}),l},g=St(e)?e():e;return g.then(h=>f("success",s,h)).catch(h=>f("error",a,h)),g},De.success=to("success"),De.info=to("info"),De.error=to("error"),De.warning=to("warning"),De.warn=De.warning,De.dark=(e,t)=>or(e,eo("default",{theme:"dark",...t})),De.dismiss=function(e){(function(t){var n;if(us()){if(t==null||bn(n=t)||nr(n))vt.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=vt.get(t.containerId);r?r.removeToast(t.id):vt.forEach(o=>{o.removeToast(t.id)})}}else rr=rr.filter(r=>t!=null&&r.options.toastId!==t)})(e)},De.clearWaitingQueue=function(e){e===void 0&&(e={}),vt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},De.isActive=ds,De.update=function(e,t){t===void 0&&(t={});const n=((r,o)=>{var a;let{containerId:s}=o;return(a=vt.get(s||1))==null?void 0:a.toasts.get(r)})(e,t);if(n){const{props:r,content:o}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:ps()};a.toastId!==e&&(a.staleId=e);const s=a.render||o;delete a.render,or(s,a)}},De.done=e=>{De.update(e,{progress:1})},De.onChange=function(e){return ti.add(e),()=>{ti.delete(e)}},De.play=e=>hs(!0,e),De.pause=e=>hs(!1,e);const Rd=typeof window<"u"?H.useLayoutEffect:H.useEffect,no=e=>{let{theme:t,type:n,isLoading:r,...o}=e;return H.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...o})},ni={info:function(e){return H.createElement(no,{...e},H.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return H.createElement(no,{...e},H.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return H.createElement(no,{...e},H.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return H.createElement(no,{...e},H.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return H.createElement("div",{className:"Toastify__spinner"})}},Td=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:o,playToast:a}=Pd(e),{closeButton:s,children:u,autoClose:f,onClick:g,type:h,hideProgressBar:x,closeToast:l,transition:v,position:i,className:c,style:p,bodyClassName:d,bodyStyle:m,progressClassName:y,progressStyle:b,updateId:C,role:S,progress:k,rtl:B,toastId:O,deleteToast:j,isIn:I,isLoading:D,closeOnClick:M,theme:$}=e,P=ln("Toastify__toast",`Toastify__toast-theme--${$}`,`Toastify__toast--${h}`,{"Toastify__toast--rtl":B},{"Toastify__toast--close-on-click":M}),L=St(c)?c({rtl:B,position:i,type:h,defaultClassName:P}):ln(P,c),q=function(ee){let{theme:ue,type:ne,isLoading:me,icon:de}=ee,V=null;const U={theme:ue,type:ne};return de===!1||(St(de)?V=de({...U,isLoading:me}):H.isValidElement(de)?V=H.cloneElement(de,U):me?V=ni.spinner():(J=>J in ni)(ne)&&(V=ni[ne](U))),V}(e),K=!!k||!f,Q={closeToast:l,type:h,theme:$};let Z=null;return s===!1||(Z=St(s)?s(Q):H.isValidElement(s)?H.cloneElement(s,Q):function(ee){let{closeToast:ue,theme:ne,ariaLabel:me="close"}=ee;return H.createElement("button",{className:`Toastify__close-button Toastify__close-button--${ne}`,type:"button",onClick:de=>{de.stopPropagation(),ue(de)},"aria-label":me},H.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},H.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(Q)),H.createElement(v,{isIn:I,done:j,position:i,preventExitTransition:n,nodeRef:r,playToast:a},H.createElement("div",{id:O,onClick:g,"data-in":I,className:L,...o,style:p,ref:r},H.createElement("div",{...I&&{role:S},className:St(d)?d({type:h}):ln("Toastify__toast-body",d),style:m},q!=null&&H.createElement("div",{className:ln("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!D})},q),H.createElement("div",null,u)),Z,H.createElement(Bd,{...C&&!K?{key:`pb-${C}`}:{},rtl:B,theme:$,delay:f,isRunning:t,isIn:I,closeToast:l,hide:x,type:h,style:b,className:y,controlledProgress:K,progress:k||0})))},ro=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Nd=Zr(ro("bounce",!0));Zr(ro("slide",!0)),Zr(ro("zoom")),Zr(ro("flip"));const jd={position:"top-right",transition:Nd,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function ms(e){let t={...jd,...e};const n=e.stacked,[r,o]=H.useState(!0),a=H.useRef(null),{getToastToRender:s,isToastActive:u,count:f}=Sd(t),{className:g,style:h,rtl:x,containerId:l}=t;function v(c){const p=ln("Toastify__toast-container",`Toastify__toast-container--${c}`,{"Toastify__toast-container--rtl":x});return St(g)?g({position:c,rtl:x,defaultClassName:p}):ln(p,Qr(g))}function i(){n&&(o(!0),De.play())}return Rd(()=>{if(n){var c;const p=a.current.querySelectorAll('[data-in="true"]'),d=12,m=(c=t.position)==null?void 0:c.includes("top");let y=0,b=0;Array.from(p).reverse().forEach((C,S)=>{const k=C;k.classList.add("Toastify__toast--stacked"),S>0&&(k.dataset.collapsed=`${r}`),k.dataset.pos||(k.dataset.pos=m?"top":"bot");const B=y*(r?.2:1)+(r?0:d*S);k.style.setProperty("--y",`${m?B:-1*B}px`),k.style.setProperty("--g",`${d}`),k.style.setProperty("--s",""+(1-(r?b:0))),y+=k.offsetHeight,b+=.025})}},[r,f,n]),H.createElement("div",{ref:a,className:"Toastify",id:l,onMouseEnter:()=>{n&&(o(!1),De.pause())},onMouseLeave:i},s((c,p)=>{const d=p.length?{...h}:{...h,pointerEvents:"none"};return H.createElement("div",{className:v(c),style:d,key:`container-${c}`},p.map(m=>{let{content:y,props:b}=m;return H.createElement(Td,{...b,stacked:n,collapseAll:i,isIn:u(b.toastId,b.containerId),style:b.style,key:`toast-${b.key}`},y)}))}))}function gs(e,t){return function(){return e.apply(t,arguments)}}const{toString:Ad}=Object.prototype,{getPrototypeOf:ri}=Object,oo=(e=>t=>{const n=Ad.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),It=e=>(e=e.toLowerCase(),t=>oo(t)===e),io=e=>t=>typeof t===e,{isArray:An}=Array,ir=io("undefined");function Ld(e){return e!==null&&!ir(e)&&e.constructor!==null&&!ir(e.constructor)&&Ot(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const ys=It("ArrayBuffer");function Id(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&ys(e.buffer),t}const Dd=io("string"),Ot=io("function"),vs=io("number"),ao=e=>e!==null&&typeof e=="object",Md=e=>e===!0||e===!1,so=e=>{if(oo(e)!=="object")return!1;const t=ri(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Fd=It("Date"),Ud=It("File"),$d=It("Blob"),Vd=It("FileList"),Hd=e=>ao(e)&&Ot(e.pipe),zd=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ot(e.append)&&((t=oo(e))==="formdata"||t==="object"&&Ot(e.toString)&&e.toString()==="[object FormData]"))},qd=It("URLSearchParams"),[Kd,Wd,Gd,Xd]=["ReadableStream","Request","Response","Headers"].map(It),Jd=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ar(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,o;if(typeof e!="object"&&(e=[e]),An(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let u;for(r=0;r<s;r++)u=a[r],t.call(null,e[u],u,e)}}function bs(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const ws=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,xs=e=>!ir(e)&&e!==ws;function oi(){const{caseless:e}=xs(this)&&this||{},t={},n=(r,o)=>{const a=e&&bs(t,o)||o;so(t[a])&&so(r)?t[a]=oi(t[a],r):so(r)?t[a]=oi({},r):An(r)?t[a]=r.slice():t[a]=r};for(let r=0,o=arguments.length;r<o;r++)arguments[r]&&ar(arguments[r],n);return t}const Yd=(e,t,n,{allOwnKeys:r}={})=>(ar(t,(o,a)=>{n&&Ot(o)?e[a]=gs(o,n):e[a]=o},{allOwnKeys:r}),e),Qd=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Zd=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},ef=(e,t,n,r)=>{let o,a,s;const u={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)s=o[a],(!r||r(s,e,t))&&!u[s]&&(t[s]=e[s],u[s]=!0);e=n!==!1&&ri(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},tf=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},nf=e=>{if(!e)return null;if(An(e))return e;let t=e.length;if(!vs(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},rf=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ri(Uint8Array)),of=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},af=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},sf=It("HTMLFormElement"),lf=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),ks=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),cf=It("RegExp"),Cs=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ar(n,(o,a)=>{let s;(s=t(o,a,e))!==!1&&(r[a]=s||o)}),Object.defineProperties(e,r)},uf=e=>{Cs(e,(t,n)=>{if(Ot(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Ot(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},df=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return An(e)?r(e):r(String(e).split(t)),n},ff=()=>{},hf=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ii="abcdefghijklmnopqrstuvwxyz",Es="0123456789",Ss={DIGIT:Es,ALPHA:ii,ALPHA_DIGIT:ii+ii.toUpperCase()+Es},pf=(e=16,t=Ss.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function mf(e){return!!(e&&Ot(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const gf=e=>{const t=new Array(10),n=(r,o)=>{if(ao(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[o]=r;const a=An(r)?[]:{};return ar(r,(s,u)=>{const f=n(s,o+1);!ir(f)&&(a[u]=f)}),t[o]=void 0,a}}return r};return n(e,0)},yf=It("AsyncFunction"),te={isArray:An,isArrayBuffer:ys,isBuffer:Ld,isFormData:zd,isArrayBufferView:Id,isString:Dd,isNumber:vs,isBoolean:Md,isObject:ao,isPlainObject:so,isReadableStream:Kd,isRequest:Wd,isResponse:Gd,isHeaders:Xd,isUndefined:ir,isDate:Fd,isFile:Ud,isBlob:$d,isRegExp:cf,isFunction:Ot,isStream:Hd,isURLSearchParams:qd,isTypedArray:rf,isFileList:Vd,forEach:ar,merge:oi,extend:Yd,trim:Jd,stripBOM:Qd,inherits:Zd,toFlatObject:ef,kindOf:oo,kindOfTest:It,endsWith:tf,toArray:nf,forEachEntry:of,matchAll:af,isHTMLForm:sf,hasOwnProperty:ks,hasOwnProp:ks,reduceDescriptors:Cs,freezeMethods:uf,toObjectSet:df,toCamelCase:lf,noop:ff,toFiniteNumber:hf,findKey:bs,global:ws,isContextDefined:xs,ALPHABET:Ss,generateString:pf,isSpecCompliantForm:mf,toJSONObject:gf,isAsyncFn:yf,isThenable:e=>e&&(ao(e)||Ot(e))&&Ot(e.then)&&Ot(e.catch)};function Ne(e,t,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}te.inherits(Ne,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:te.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ps=Ne.prototype,Bs={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Bs[e]={value:e}}),Object.defineProperties(Ne,Bs),Object.defineProperty(Ps,"isAxiosError",{value:!0}),Ne.from=(e,t,n,r,o,a)=>{const s=Object.create(Ps);return te.toFlatObject(e,s,function(f){return f!==Error.prototype},u=>u!=="isAxiosError"),Ne.call(s,e.message,t,n,r,o),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const vf=null;function ai(e){return te.isPlainObject(e)||te.isArray(e)}function Os(e){return te.endsWith(e,"[]")?e.slice(0,-2):e}function _s(e,t,n){return e?e.concat(t).map(function(o,a){return o=Os(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function bf(e){return te.isArray(e)&&!e.some(ai)}const wf=te.toFlatObject(te,{},null,function(t){return/^is[A-Z]/.test(t)});function lo(e,t,n){if(!te.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=te.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(c,p){return!te.isUndefined(p[c])});const r=n.metaTokens,o=n.visitor||h,a=n.dots,s=n.indexes,f=(n.Blob||typeof Blob<"u"&&Blob)&&te.isSpecCompliantForm(t);if(!te.isFunction(o))throw new TypeError("visitor must be a function");function g(i){if(i===null)return"";if(te.isDate(i))return i.toISOString();if(!f&&te.isBlob(i))throw new Ne("Blob is not supported. Use a Buffer instead.");return te.isArrayBuffer(i)||te.isTypedArray(i)?f&&typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function h(i,c,p){let d=i;if(i&&!p&&typeof i=="object"){if(te.endsWith(c,"{}"))c=r?c:c.slice(0,-2),i=JSON.stringify(i);else if(te.isArray(i)&&bf(i)||(te.isFileList(i)||te.endsWith(c,"[]"))&&(d=te.toArray(i)))return c=Os(c),d.forEach(function(y,b){!(te.isUndefined(y)||y===null)&&t.append(s===!0?_s([c],b,a):s===null?c:c+"[]",g(y))}),!1}return ai(i)?!0:(t.append(_s(p,c,a),g(i)),!1)}const x=[],l=Object.assign(wf,{defaultVisitor:h,convertValue:g,isVisitable:ai});function v(i,c){if(!te.isUndefined(i)){if(x.indexOf(i)!==-1)throw Error("Circular reference detected in "+c.join("."));x.push(i),te.forEach(i,function(d,m){(!(te.isUndefined(d)||d===null)&&o.call(t,d,te.isString(m)?m.trim():m,c,l))===!0&&v(d,c?c.concat(m):[m])}),x.pop()}}if(!te.isObject(e))throw new TypeError("data must be an object");return v(e),t}function Rs(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function si(e,t){this._pairs=[],e&&lo(e,this,t)}const Ts=si.prototype;Ts.append=function(t,n){this._pairs.push([t,n])},Ts.toString=function(t){const n=t?function(r){return t.call(this,r,Rs)}:Rs;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function xf(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ns(e,t,n){if(!t)return e;const r=n&&n.encode||xf,o=n&&n.serialize;let a;if(o?a=o(t,n):a=te.isURLSearchParams(t)?t.toString():new si(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class js{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){te.forEach(this.handlers,function(r){r!==null&&t(r)})}}const As={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},kf={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:si,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},li=typeof window<"u"&&typeof document<"u",Cf=(e=>li&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Ef=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Sf=li&&window.location.href||"http://localhost",Dt={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:li,hasStandardBrowserEnv:Cf,hasStandardBrowserWebWorkerEnv:Ef,origin:Sf},Symbol.toStringTag,{value:"Module"})),...kf};function Pf(e,t){return lo(e,new Dt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,a){return Dt.isNode&&te.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Bf(e){return te.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Of(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Ls(e){function t(n,r,o,a){let s=n[a++];if(s==="__proto__")return!0;const u=Number.isFinite(+s),f=a>=n.length;return s=!s&&te.isArray(o)?o.length:s,f?(te.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!u):((!o[s]||!te.isObject(o[s]))&&(o[s]=[]),t(n,r,o[s],a)&&te.isArray(o[s])&&(o[s]=Of(o[s])),!u)}if(te.isFormData(e)&&te.isFunction(e.entries)){const n={};return te.forEachEntry(e,(r,o)=>{t(Bf(r),o,n,0)}),n}return null}function _f(e,t,n){if(te.isString(e))try{return(t||JSON.parse)(e),te.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const sr={transitional:As,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=te.isObject(t);if(a&&te.isHTMLForm(t)&&(t=new FormData(t)),te.isFormData(t))return o?JSON.stringify(Ls(t)):t;if(te.isArrayBuffer(t)||te.isBuffer(t)||te.isStream(t)||te.isFile(t)||te.isBlob(t)||te.isReadableStream(t))return t;if(te.isArrayBufferView(t))return t.buffer;if(te.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let u;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Pf(t,this.formSerializer).toString();if((u=te.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return lo(u?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),_f(t)):t}],transformResponse:[function(t){const n=this.transitional||sr.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(te.isResponse(t)||te.isReadableStream(t))return t;if(t&&te.isString(t)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(u){if(s)throw u.name==="SyntaxError"?Ne.from(u,Ne.ERR_BAD_RESPONSE,this,null,this.response):u}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dt.classes.FormData,Blob:Dt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};te.forEach(["delete","get","head","post","put","patch"],e=>{sr.headers[e]={}});const Rf=te.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Tf=e=>{const t={};let n,r,o;return e&&e.split(`
31
- `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||t[n]&&Rf[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Is=Symbol("internals");function lr(e){return e&&String(e).trim().toLowerCase()}function co(e){return e===!1||e==null?e:te.isArray(e)?e.map(co):String(e)}function Nf(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const jf=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ci(e,t,n,r,o){if(te.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!te.isString(t)){if(te.isString(r))return t.indexOf(r)!==-1;if(te.isRegExp(r))return r.test(t)}}function Af(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Lf(e,t){const n=te.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,s){return this[r].call(this,t,o,a,s)},configurable:!0})})}class kt{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(u,f,g){const h=lr(f);if(!h)throw new Error("header name must be a non-empty string");const x=te.findKey(o,h);(!x||o[x]===void 0||g===!0||g===void 0&&o[x]!==!1)&&(o[x||f]=co(u))}const s=(u,f)=>te.forEach(u,(g,h)=>a(g,h,f));if(te.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(te.isString(t)&&(t=t.trim())&&!jf(t))s(Tf(t),n);else if(te.isHeaders(t))for(const[u,f]of t.entries())a(f,u,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=lr(t),t){const r=te.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Nf(o);if(te.isFunction(n))return n.call(this,o,r);if(te.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=lr(t),t){const r=te.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ci(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(s){if(s=lr(s),s){const u=te.findKey(r,s);u&&(!n||ci(r,r[u],u,n))&&(delete r[u],o=!0)}}return te.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||ci(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return te.forEach(this,(o,a)=>{const s=te.findKey(r,a);if(s){n[s]=co(o),delete n[a];return}const u=t?Af(a):String(a).trim();u!==a&&delete n[a],n[u]=co(o),r[u]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return te.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&te.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
32
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Is]=this[Is]={accessors:{}}).accessors,o=this.prototype;function a(s){const u=lr(s);r[u]||(Lf(o,s),r[u]=!0)}return te.isArray(t)?t.forEach(a):a(t),this}}kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),te.reduceDescriptors(kt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),te.freezeMethods(kt);function ui(e,t){const n=this||sr,r=t||n,o=kt.from(r.headers);let a=r.data;return te.forEach(e,function(u){a=u.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Ds(e){return!!(e&&e.__CANCEL__)}function Ln(e,t,n){Ne.call(this,e??"canceled",Ne.ERR_CANCELED,t,n),this.name="CanceledError"}te.inherits(Ln,Ne,{__CANCEL__:!0});function Ms(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ne("Request failed with status code "+n.status,[Ne.ERR_BAD_REQUEST,Ne.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function If(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Df(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,s;return t=t!==void 0?t:1e3,function(f){const g=Date.now(),h=r[a];s||(s=g),n[o]=f,r[o]=g;let x=a,l=0;for(;x!==o;)l+=n[x++],x=x%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),g-s<t)return;const v=h&&g-h;return v?Math.round(l*1e3/v):void 0}}function Mf(e,t){let n=0;const r=1e3/t;let o=null;return function(){const s=this===!0,u=Date.now();if(s||u-n>r)return o&&(clearTimeout(o),o=null),n=u,e.apply(null,arguments);o||(o=setTimeout(()=>(o=null,n=Date.now(),e.apply(null,arguments)),r-(u-n)))}}const uo=(e,t,n=3)=>{let r=0;const o=Df(50,250);return Mf(a=>{const s=a.loaded,u=a.lengthComputable?a.total:void 0,f=s-r,g=o(f),h=s<=u;r=s;const x={loaded:s,total:u,progress:u?s/u:void 0,bytes:f,rate:g||void 0,estimated:g&&u&&h?(u-s)/g:void 0,event:a,lengthComputable:u!=null};x[t?"download":"upload"]=!0,e(x)},n)},Ff=Dt.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(a){let s=a;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=o(window.location.href),function(s){const u=te.isString(s)?o(s):s;return u.protocol===r.protocol&&u.host===r.host}}():function(){return function(){return!0}}(),Uf=Dt.hasStandardBrowserEnv?{write(e,t,n,r,o,a){const s=[e+"="+encodeURIComponent(t)];te.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),te.isString(r)&&s.push("path="+r),te.isString(o)&&s.push("domain="+o),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function $f(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Vf(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Fs(e,t){return e&&!$f(t)?Vf(e,t):t}const Us=e=>e instanceof kt?{...e}:e;function wn(e,t){t=t||{};const n={};function r(g,h,x){return te.isPlainObject(g)&&te.isPlainObject(h)?te.merge.call({caseless:x},g,h):te.isPlainObject(h)?te.merge({},h):te.isArray(h)?h.slice():h}function o(g,h,x){if(te.isUndefined(h)){if(!te.isUndefined(g))return r(void 0,g,x)}else return r(g,h,x)}function a(g,h){if(!te.isUndefined(h))return r(void 0,h)}function s(g,h){if(te.isUndefined(h)){if(!te.isUndefined(g))return r(void 0,g)}else return r(void 0,h)}function u(g,h,x){if(x in t)return r(g,h);if(x in e)return r(void 0,g)}const f={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u,headers:(g,h)=>o(Us(g),Us(h),!0)};return te.forEach(Object.keys(Object.assign({},e,t)),function(h){const x=f[h]||o,l=x(e[h],t[h],h);te.isUndefined(l)&&x!==u||(n[h]=l)}),n}const $s=e=>{const t=wn({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:s,auth:u}=t;t.headers=s=kt.from(s),t.url=Ns(Fs(t.baseURL,t.url),e.params,e.paramsSerializer),u&&s.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let f;if(te.isFormData(n)){if(Dt.hasStandardBrowserEnv||Dt.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((f=s.getContentType())!==!1){const[g,...h]=f?f.split(";").map(x=>x.trim()).filter(Boolean):[];s.setContentType([g||"multipart/form-data",...h].join("; "))}}if(Dt.hasStandardBrowserEnv&&(r&&te.isFunction(r)&&(r=r(t)),r||r!==!1&&Ff(t.url))){const g=o&&a&&Uf.read(a);g&&s.set(o,g)}return t},Hf=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const o=$s(e);let a=o.data;const s=kt.from(o.headers).normalize();let{responseType:u}=o,f;function g(){o.cancelToken&&o.cancelToken.unsubscribe(f),o.signal&&o.signal.removeEventListener("abort",f)}let h=new XMLHttpRequest;h.open(o.method.toUpperCase(),o.url,!0),h.timeout=o.timeout;function x(){if(!h)return;const v=kt.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),c={data:!u||u==="text"||u==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:v,config:e,request:h};Ms(function(d){n(d),g()},function(d){r(d),g()},c),h=null}"onloadend"in h?h.onloadend=x:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(x)},h.onabort=function(){h&&(r(new Ne("Request aborted",Ne.ECONNABORTED,o,h)),h=null)},h.onerror=function(){r(new Ne("Network Error",Ne.ERR_NETWORK,o,h)),h=null},h.ontimeout=function(){let i=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const c=o.transitional||As;o.timeoutErrorMessage&&(i=o.timeoutErrorMessage),r(new Ne(i,c.clarifyTimeoutError?Ne.ETIMEDOUT:Ne.ECONNABORTED,o,h)),h=null},a===void 0&&s.setContentType(null),"setRequestHeader"in h&&te.forEach(s.toJSON(),function(i,c){h.setRequestHeader(c,i)}),te.isUndefined(o.withCredentials)||(h.withCredentials=!!o.withCredentials),u&&u!=="json"&&(h.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&h.addEventListener("progress",uo(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",uo(o.onUploadProgress)),(o.cancelToken||o.signal)&&(f=v=>{h&&(r(!v||v.type?new Ln(null,e,h):v),h.abort(),h=null)},o.cancelToken&&o.cancelToken.subscribe(f),o.signal&&(o.signal.aborted?f():o.signal.addEventListener("abort",f)));const l=If(o.url);if(l&&Dt.protocols.indexOf(l)===-1){r(new Ne("Unsupported protocol "+l+":",Ne.ERR_BAD_REQUEST,e));return}h.send(a||null)})},zf=(e,t)=>{let n=new AbortController,r;const o=function(f){if(!r){r=!0,s();const g=f instanceof Error?f:this.reason;n.abort(g instanceof Ne?g:new Ln(g instanceof Error?g.message:g))}};let a=t&&setTimeout(()=>{o(new Ne(`timeout ${t} of ms exceeded`,Ne.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(f=>{f&&(f.removeEventListener?f.removeEventListener("abort",o):f.unsubscribe(o))}),e=null)};e.forEach(f=>f&&f.addEventListener&&f.addEventListener("abort",o));const{signal:u}=n;return u.unsubscribe=s,[u,()=>{a&&clearTimeout(a),a=null}]},qf=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},Kf=async function*(e,t,n){for await(const r of e)yield*qf(ArrayBuffer.isView(r)?r:await n(String(r)),t)},Vs=(e,t,n,r,o)=>{const a=Kf(e,t,o);let s=0;return new ReadableStream({type:"bytes",async pull(u){const{done:f,value:g}=await a.next();if(f){u.close(),r();return}let h=g.byteLength;n&&n(s+=h),u.enqueue(new Uint8Array(g))},cancel(u){return r(u),a.return()}},{highWaterMark:2})},Hs=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},fo=typeof fetch<"u",zs=fo&&typeof ReadableStream<"u",di=fo&&(typeof TextEncoder<"u"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),Wf=zs&&(()=>{let e=!1;const t=new Request(Dt.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),qs=64*1024,fi=zs&&!!(()=>{try{return te.isReadableStream(new Response("").body)}catch{}})(),ho={stream:fi&&(e=>e.body)};fo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ho[t]&&(ho[t]=te.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new Ne(`Response type '${t}' is not supported`,Ne.ERR_NOT_SUPPORT,r)})})})(new Response);const Gf=async e=>{if(e==null)return 0;if(te.isBlob(e))return e.size;if(te.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(te.isArrayBufferView(e))return e.byteLength;if(te.isURLSearchParams(e)&&(e=e+""),te.isString(e))return(await di(e)).byteLength},Xf=async(e,t)=>{const n=te.toFiniteNumber(e.getContentLength());return n??Gf(t)},hi={http:vf,xhr:Hf,fetch:fo&&(async e=>{let{url:t,method:n,data:r,signal:o,cancelToken:a,timeout:s,onDownloadProgress:u,onUploadProgress:f,responseType:g,headers:h,withCredentials:x="same-origin",fetchOptions:l}=$s(e);g=g?(g+"").toLowerCase():"text";let[v,i]=o||a||s?zf([o,a],s):[],c,p;const d=()=>{!c&&setTimeout(()=>{v&&v.unsubscribe()}),c=!0};let m;try{if(f&&Wf&&n!=="get"&&n!=="head"&&(m=await Xf(h,r))!==0){let S=new Request(t,{method:"POST",body:r,duplex:"half"}),k;te.isFormData(r)&&(k=S.headers.get("content-type"))&&h.setContentType(k),S.body&&(r=Vs(S.body,qs,Hs(m,uo(f)),null,di))}te.isString(x)||(x=x?"cors":"omit"),p=new Request(t,{...l,signal:v,method:n.toUpperCase(),headers:h.normalize().toJSON(),body:r,duplex:"half",withCredentials:x});let y=await fetch(p);const b=fi&&(g==="stream"||g==="response");if(fi&&(u||b)){const S={};["status","statusText","headers"].forEach(B=>{S[B]=y[B]});const k=te.toFiniteNumber(y.headers.get("content-length"));y=new Response(Vs(y.body,qs,u&&Hs(k,uo(u,!0)),b&&d,di),S)}g=g||"text";let C=await ho[te.findKey(ho,g)||"text"](y,e);return!b&&d(),i&&i(),await new Promise((S,k)=>{Ms(S,k,{data:C,headers:kt.from(y.headers),status:y.status,statusText:y.statusText,config:e,request:p})})}catch(y){throw d(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new Ne("Network Error",Ne.ERR_NETWORK,e,p),{cause:y.cause||y}):Ne.from(y,y&&y.code,e,p)}})};te.forEach(hi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ks=e=>`- ${e}`,Jf=e=>te.isFunction(e)||e===null||e===!1,Ws={getAdapter:e=>{e=te.isArray(e)?e:[e];const{length:t}=e;let n,r;const o={};for(let a=0;a<t;a++){n=e[a];let s;if(r=n,!Jf(n)&&(r=hi[(s=String(n)).toLowerCase()],r===void 0))throw new Ne(`Unknown adapter '${s}'`);if(r)break;o[s||"#"+a]=r}if(!r){const a=Object.entries(o).map(([u,f])=>`adapter ${u} `+(f===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
33
- `+a.map(Ks).join(`
34
- `):" "+Ks(a[0]):"as no adapter specified";throw new Ne("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:hi};function pi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ln(null,e)}function Gs(e){return pi(e),e.headers=kt.from(e.headers),e.data=ui.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Ws.getAdapter(e.adapter||sr.adapter)(e).then(function(r){return pi(e),r.data=ui.call(e,e.transformResponse,r),r.headers=kt.from(r.headers),r},function(r){return Ds(r)||(pi(e),r&&r.response&&(r.response.data=ui.call(e,e.transformResponse,r.response),r.response.headers=kt.from(r.response.headers))),Promise.reject(r)})}const Xs="1.7.1",mi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{mi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Js={};mi.transitional=function(t,n,r){function o(a,s){return"[Axios v"+Xs+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return(a,s,u)=>{if(t===!1)throw new Ne(o(s," has been removed"+(n?" in "+n:"")),Ne.ERR_DEPRECATED);return n&&!Js[s]&&(Js[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,u):!0}};function Yf(e,t,n){if(typeof e!="object")throw new Ne("options must be an object",Ne.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],s=t[a];if(s){const u=e[a],f=u===void 0||s(u,a,e);if(f!==!0)throw new Ne("option "+a+" must be "+f,Ne.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ne("Unknown option "+a,Ne.ERR_BAD_OPTION)}}const gi={assertOptions:Yf,validators:mi},cn=gi.validators;class xn{constructor(t){this.defaults=t,this.interceptors={request:new js,response:new js}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
35
- `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=wn(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&gi.assertOptions(r,{silentJSONParsing:cn.transitional(cn.boolean),forcedJSONParsing:cn.transitional(cn.boolean),clarifyTimeoutError:cn.transitional(cn.boolean)},!1),o!=null&&(te.isFunction(o)?n.paramsSerializer={serialize:o}:gi.assertOptions(o,{encode:cn.function,serialize:cn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&te.merge(a.common,a[n.method]);a&&te.forEach(["delete","get","head","post","put","patch","common"],i=>{delete a[i]}),n.headers=kt.concat(s,a);const u=[];let f=!0;this.interceptors.request.forEach(function(c){typeof c.runWhen=="function"&&c.runWhen(n)===!1||(f=f&&c.synchronous,u.unshift(c.fulfilled,c.rejected))});const g=[];this.interceptors.response.forEach(function(c){g.push(c.fulfilled,c.rejected)});let h,x=0,l;if(!f){const i=[Gs.bind(this),void 0];for(i.unshift.apply(i,u),i.push.apply(i,g),l=i.length,h=Promise.resolve(n);x<l;)h=h.then(i[x++],i[x++]);return h}l=u.length;let v=n;for(x=0;x<l;){const i=u[x++],c=u[x++];try{v=i(v)}catch(p){c.call(this,p);break}}try{h=Gs.call(this,v)}catch(i){return Promise.reject(i)}for(x=0,l=g.length;x<l;)h=h.then(g[x++],g[x++]);return h}getUri(t){t=wn(this.defaults,t);const n=Fs(t.baseURL,t.url);return Ns(n,t.params,t.paramsSerializer)}}te.forEach(["delete","get","head","options"],function(t){xn.prototype[t]=function(n,r){return this.request(wn(r||{},{method:t,url:n,data:(r||{}).data}))}}),te.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,u){return this.request(wn(u||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}xn.prototype[t]=n(),xn.prototype[t+"Form"]=n(!0)});class yi{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const s=new Promise(u=>{r.subscribe(u),a=u}).then(o);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,u){r.reason||(r.reason=new Ln(a,s,u),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new yi(function(o){t=o}),cancel:t}}}function Qf(e){return function(n){return e.apply(null,n)}}function Zf(e){return te.isObject(e)&&e.isAxiosError===!0}const vi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(vi).forEach(([e,t])=>{vi[t]=e});function Ys(e){const t=new xn(e),n=gs(xn.prototype.request,t);return te.extend(n,xn.prototype,t,{allOwnKeys:!0}),te.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Ys(wn(e,o))},n}const it=Ys(sr);it.Axios=xn,it.CanceledError=Ln,it.CancelToken=yi,it.isCancel=Ds,it.VERSION=Xs,it.toFormData=lo,it.AxiosError=Ne,it.Cancel=it.CanceledError,it.all=function(t){return Promise.all(t)},it.spread=Qf,it.isAxiosError=Zf,it.mergeConfig=wn,it.AxiosHeaders=kt,it.formToJSON=e=>Ls(te.isHTMLForm(e)?new FormData(e):e),it.getAdapter=Ws.getAdapter,it.HttpStatusCode=vi,it.default=it;const eh=e=>{var n,r,o,a;const t=(n=e.response)==null?void 0:n.status;if(t&&t!==401){const s=(r=e.response)==null?void 0:r.data;console.table(s);const u=(o=e.response)==null?void 0:o.data.errors,f=E.jsxs("div",{children:[E.jsx("p",{children:(a=e.response)==null?void 0:a.data.message}),u&&Object.keys(u).map(g=>u[g].map(h=>E.jsx("li",{children:h},h)))]});De.error(f)}return Promise.reject(e)};class th{constructor(){Xu(this,"instance",it.create())}initialize(t,n){this.instance=it.create({baseURL:n||"https://api.piggy.eu",headers:{Authorization:`Bearer ${t}`}}),this.instance.interceptors.response.use(void 0,eh)}}const tt=new th;var bi={exports:{}},wi={};/**
30
+ <%s key={someKey} {...props} />`,Zt,Ot,fr,Ot),Re[Ot+Zt]=!0}}return L===r?Pe(ut):Ve(ut),ut}}function Ue(L,ye,De){return Ge(L,ye,De,!0)}function At(L,ye,De){return Ge(L,ye,De,!1)}var St=At,_e=Ue;jr.Fragment=r,jr.jsx=St,jr.jsxs=_e}()),jr}process.env.NODE_ENV==="production"?Zo.exports=vh():Zo.exports=bh();var T=Zo.exports,pr=(e=>(e.REDEEM_GIFTCARD="REDEEM_GIFTCARD",e.TOP_UP_GIFTCARD="TOP_UP_GIFTCARD",e.PORTAL="PORTAL",e.PREPAID="PREPAID",e.SAVE="SAVE",e.VOUCHER="VOUCHER",e))(pr||{}),Pn=(e=>(e.REDEEM_GIFTCARD="/redeem_giftcard",e.TOP_UP_GIFTCARD="/top_up_giftcard",e.PORTAL="/portal",e.PREPAID="/prepaid",e.SAVE="/save",e.VOUCHER="/voucher",e))(Pn||{});const wh={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console&&console[e]&&console[e].apply(console,t)}};class Fi{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=t||wh,this.options=n,this.debug=n.debug}log(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"log","",!0)}warn(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","",!0)}error(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"error","")}deprecate(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,r,i){return i&&!this.debug?null:(typeof t[0]=="string"&&(t[0]=`${r}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new Fi(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Fi(this.logger,t)}}var Tn=new Fi;class ji{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}emit(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];this.observers[t]&&Array.from(this.observers[t].entries()).forEach(s=>{let[c,h]=s;for(let g=0;g<h;g++)c(...r)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[c,h]=s;for(let g=0;g<h;g++)c.apply(c,[t,...r])})}}function Lr(){let e,t;const n=new Promise((r,i)=>{e=r,t=i});return n.resolve=e,n.reject=t,n}function fu(e){return e==null?"":""+e}function Eh(e,t,n){e.forEach(r=>{t[r]&&(n[r]=t[r])})}const xh=/###/g;function _r(e,t,n){function r(c){return c&&c.indexOf("###")>-1?c.replace(xh,"."):c}function i(){return!e||typeof e=="string"}const a=typeof t!="string"?t:t.split(".");let s=0;for(;s<a.length-1;){if(i())return{};const c=r(a[s]);!e[c]&&n&&(e[c]=new n),Object.prototype.hasOwnProperty.call(e,c)?e=e[c]:e={},++s}return i()?{}:{obj:e,k:r(a[s])}}function du(e,t,n){const{obj:r,k:i}=_r(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],s=t.slice(0,t.length-1),c=_r(e,s,Object);for(;c.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),c=_r(e,s,Object),c&&c.obj&&typeof c.obj[`${c.k}.${a}`]<"u"&&(c.obj=void 0);c.obj[`${c.k}.${a}`]=n}function Ch(e,t,n,r){const{obj:i,k:a}=_r(e,t,Object);i[a]=i[a]||[],i[a].push(n)}function Li(e,t){const{obj:n,k:r}=_r(e,t);if(n)return n[r]}function Ah(e,t,n){const r=Li(e,n);return r!==void 0?r:Li(t,n)}function hu(e,t,n){for(const r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):hu(e[r],t[r],n):e[r]=t[r]);return e}function gr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Sh={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Th(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,t=>Sh[t]):e}class Oh{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const r=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,r),this.regExpQueue.push(t),r}}const Dh=[" ",",","?","!",";"],Ih=new Oh(20);function Rh(e,t,n){t=t||"",n=n||"";const r=Dh.filter(s=>t.indexOf(s)<0&&n.indexOf(s)<0);if(r.length===0)return!0;const i=Ih.getRegExp(`(${r.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!i.test(e);if(!a){const s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(a=!0)}return a}function Xo(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!e)return;if(e[t])return e[t];const r=t.split(n);let i=e;for(let a=0;a<r.length;){if(!i||typeof i!="object")return;let s,c="";for(let h=a;h<r.length;++h)if(h!==a&&(c+=n),c+=r[h],s=i[c],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&h<r.length-1)continue;a+=h-a+1;break}i=s}return i}function _i(e){return e&&e.indexOf("_")>0?e.replace("_","-"):e}class pu extends ji{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const n=this.options.ns.indexOf(t);n>-1&&this.options.ns.splice(n,1)}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,s=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let c;t.indexOf(".")>-1?c=t.split("."):(c=[t,n],r&&(Array.isArray(r)?c.push(...r):typeof r=="string"&&a?c.push(...r.split(a)):c.push(r)));const h=Li(this.data,c);return!h&&!n&&!r&&t.indexOf(".")>-1&&(t=c[0],n=c[1],r=c.slice(2).join(".")),h||!s||typeof r!="string"?h:Xo(this.data&&this.data[t]&&this.data[t][n],r,a)}addResource(t,n,r,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let c=[t,n];r&&(c=c.concat(s?r.split(s):r)),t.indexOf(".")>-1&&(c=t.split("."),i=n,n=c[1]),this.addNamespaces(n),du(this.data,c,i),a.silent||this.emit("added",t,n,r,i)}addResources(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in r)(typeof r[a]=="string"||Array.isArray(r[a]))&&this.addResource(t,n,a,r[a],{silent:!0});i.silent||this.emit("added",t,n,r)}addResourceBundle(t,n,r,i,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},c=[t,n];t.indexOf(".")>-1&&(c=t.split("."),i=r,r=n,n=c[1]),this.addNamespaces(n);let h=Li(this.data,c)||{};s.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?hu(h,r,a):h={...h,...r},du(this.data,c,h),s.silent||this.emit("added",t,n,r)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,n)}:this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var gu={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(a=>{this.processors[a]&&(t=this.processors[a].process(t,n,r,i))}),t}};const mu={};class Vi extends ji{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Eh(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Tn.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const r=this.resolve(t,n);return r&&r.res!==void 0}extractFromKey(t,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=r&&t.indexOf(r)>-1,c=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Rh(t,r,i);if(s&&!c){const h=t.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:t,namespaces:a};const g=t.split(r);(r!==i||r===i&&this.options.ns.indexOf(g[0])>-1)&&(a=g.shift()),t=g.join(i)}return typeof a=="string"&&(a=[a]),{key:t,namespaces:a}}translate(t,n,r){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],n),h=c[c.length-1],g=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(d){const C=n.nsSeparator||this.options.nsSeparator;return i?{res:`${h}${C}${s}`,usedKey:s,exactUsedKey:s,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(n)}:`${h}${C}${s}`}return i?{res:s,usedKey:s,exactUsedKey:s,usedLng:g,usedNS:h,usedParams:this.getUsedParamsDetails(n)}:s}const E=this.resolve(t,n);let u=E&&E.res;const w=E&&E.usedKey||s,o=E&&E.exactUsedKey||s,l=Object.prototype.toString.apply(u),p=["[object Number]","[object Function]","[object RegExp]"],f=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,m=!this.i18nFormat||this.i18nFormat.handleAsObject;if(m&&u&&(typeof u!="string"&&typeof u!="boolean"&&typeof u!="number")&&p.indexOf(l)<0&&!(typeof f=="string"&&Array.isArray(u))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const C=this.options.returnedObjectHandler?this.options.returnedObjectHandler(w,u,{...n,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return i?(E.res=C,E.usedParams=this.getUsedParamsDetails(n),E):C}if(a){const C=Array.isArray(u),S=C?[]:{},D=C?o:w;for(const A in u)if(Object.prototype.hasOwnProperty.call(u,A)){const N=`${D}${a}${A}`;S[A]=this.translate(N,{...n,joinArrays:!1,ns:c}),S[A]===N&&(S[A]=u[A])}u=S}}else if(m&&typeof f=="string"&&Array.isArray(u))u=u.join(f),u&&(u=this.extendTranslation(u,t,n,r));else{let C=!1,S=!1;const D=n.count!==void 0&&typeof n.count!="string",A=Vi.hasDefaultValue(n),N=D?this.pluralResolver.getSuffix(g,n.count,n):"",I=n.ordinal&&D?this.pluralResolver.getSuffix(g,n.count,{ordinal:!1}):"",_=D&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),Q=_&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${N}`]||n[`defaultValue${I}`]||n.defaultValue;!this.isValidLookup(u)&&A&&(C=!0,u=Q),this.isValidLookup(u)||(S=!0,u=s);const V=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&S?void 0:u,K=A&&Q!==u&&this.options.updateMissing;if(S||C||K){if(this.logger.log(K?"updateKey":"missingKey",g,h,s,K?Q:u),a){const z=this.resolve(s,{...n,keySeparator:!1});z&&z.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.")}let R=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let z=0;z<U.length;z++)R.push(U[z]);else this.options.saveMissingTo==="all"?R=this.languageUtils.toResolveHierarchy(n.lng||this.language):R.push(n.lng||this.language);const W=(z,ne,re)=>{const ae=A&&re!==u?re:V;this.options.missingKeyHandler?this.options.missingKeyHandler(z,h,ne,ae,K,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(z,h,ne,ae,K,n),this.emit("missingKey",z,h,ne,u)};this.options.saveMissing&&(this.options.saveMissingPlurals&&D?R.forEach(z=>{const ne=this.pluralResolver.getSuffixes(z,n);_&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ne.indexOf(`${this.options.pluralSeparator}zero`)<0&&ne.push(`${this.options.pluralSeparator}zero`),ne.forEach(re=>{W([z],s+re,n[`defaultValue${re}`]||Q)})}):W(R,s,Q))}u=this.extendTranslation(u,t,n,E,r),S&&u===s&&this.options.appendNamespaceToMissingKey&&(u=`${h}:${s}`),(S||C)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?u=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${h}:${s}`:s,C?u:void 0):u=this.options.parseMissingKeyHandler(u))}return i?(E.res=u,E.usedParams=this.getUsedParamsDetails(n),E):u}extendTranslation(t,n,r,i,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const g=typeof t=="string"&&(r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(g){const u=t.match(this.interpolator.nestingRegexp);d=u&&u.length}let E=r.replace&&typeof r.replace!="string"?r.replace:r;if(this.options.interpolation.defaultVariables&&(E={...this.options.interpolation.defaultVariables,...E}),t=this.interpolator.interpolate(t,E,r.lng||this.language,r),g){const u=t.match(this.interpolator.nestingRegexp),w=u&&u.length;d<w&&(r.nest=!1)}!r.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(r.lng=i.usedLng),r.nest!==!1&&(t=this.interpolator.nest(t,function(){for(var u=arguments.length,w=new Array(u),o=0;o<u;o++)w[o]=arguments[o];return a&&a[0]===w[0]&&!r.context?(s.logger.warn(`It seems you are nesting recursively key: ${w[0]} in key: ${n[0]}`),null):s.translate(...w,n)},r)),r.interpolation&&this.interpolator.reset()}const c=r.postProcess||this.options.postProcess,h=typeof c=="string"?[c]:c;return t!=null&&h&&h.length&&r.applyPostProcessor!==!1&&(t=gu.handle(h,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),t}resolve(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r,i,a,s,c;return typeof t=="string"&&(t=[t]),t.forEach(h=>{if(this.isValidLookup(r))return;const g=this.extractFromKey(h,n),d=g.key;i=d;let E=g.namespaces;this.options.fallbackNS&&(E=E.concat(this.options.fallbackNS));const u=n.count!==void 0&&typeof n.count!="string",w=u&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),o=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",l=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);E.forEach(p=>{this.isValidLookup(r)||(c=p,!mu[`${l[0]}-${p}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(c)&&(mu[`${l[0]}-${p}`]=!0,this.logger.warn(`key "${i}" for languages "${l.join(", ")}" won't get resolved as namespace "${c}" 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!!!")),l.forEach(f=>{if(this.isValidLookup(r))return;s=f;const m=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(m,d,f,p,n);else{let C;u&&(C=this.pluralResolver.getSuffix(f,n.count,n));const S=`${this.options.pluralSeparator}zero`,D=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(m.push(d+C),n.ordinal&&C.indexOf(D)===0&&m.push(d+C.replace(D,this.options.pluralSeparator)),w&&m.push(d+S)),o){const A=`${d}${this.options.contextSeparator}${n.context}`;m.push(A),u&&(m.push(A+C),n.ordinal&&C.indexOf(D)===0&&m.push(A+C.replace(D,this.options.pluralSeparator)),w&&m.push(A+S))}}let b;for(;b=m.pop();)this.isValidLookup(r)||(a=b,r=this.getResource(f,p,b,n))}))})}),{res:r,usedKey:i,exactUsedKey:a,usedLng:s,usedNS:c}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,n,r,i):this.resourceStore.getResource(t,n,r,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=t.replace&&typeof t.replace!="string";let i=r?t.replace:t;if(r&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const a of n)delete i[a]}return i}static hasDefaultValue(t){const n="defaultValue";for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&n===r.substring(0,n.length)&&t[r]!==void 0)return!0;return!1}}function ea(e){return e.charAt(0).toUpperCase()+e.slice(1)}class yu{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Tn.create("languageUtils")}getScriptPartFromCode(t){if(t=_i(t),!t||t.indexOf("-")<0)return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=_i(t),!t||t.indexOf("-")<0)return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let r=t.split("-");return this.options.lowerCaseLng?r=r.map(i=>i.toLowerCase()):r.length===2?(r[0]=r[0].toLowerCase(),r[1]=r[1].toUpperCase(),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=ea(r[1].toLowerCase()))):r.length===3&&(r[0]=r[0].toLowerCase(),r[1].length===2&&(r[1]=r[1].toUpperCase()),r[0]!=="sgn"&&r[2].length===2&&(r[2]=r[2].toUpperCase()),n.indexOf(r[1].toLowerCase())>-1&&(r[1]=ea(r[1].toLowerCase())),n.indexOf(r[2].toLowerCase())>-1&&(r[2]=ea(r[2].toLowerCase()))),r.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&t.forEach(r=>{if(n)return;const i=this.getLanguagePartFromCode(r);if(this.isSupportedCode(i))return n=i;n=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),typeof t=="string"&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let r=t[n];return r||(r=t[this.getScriptPartFromCode(n)]),r||(r=t[this.formatLanguageCode(n)]),r||(r=t[this.getLanguagePartFromCode(n)]),r||(r=t.default),r||[]}toResolveHierarchy(t,n){const r=this.getFallbackCodes(n||this.options.fallbackLng||[],t),i=[],a=s=>{s&&(this.isSupportedCode(s)?i.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),r.forEach(s=>{i.indexOf(s)<0&&a(this.formatLanguageCode(s))}),i}}let Nh=[{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}],Ph={1:function(e){return+(e>1)},2:function(e){return+(e!=1)},3:function(e){return 0},4:function(e){return 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 e==0?0:e==1?1:e==2?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},6:function(e){return e==1?0:e>=2&&e<=4?1:2},7:function(e){return e==1?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2},8:function(e){return e==1?0:e==2?1:e!=8&&e!=11?2:3},9:function(e){return+(e>=2)},10:function(e){return e==1?0:e==2?1:e<7?2:e<11?3:4},11:function(e){return e==1||e==11?0:e==2||e==12?1:e>2&&e<20?2:3},12:function(e){return+(e%10!=1||e%100==11)},13:function(e){return+(e!==0)},14:function(e){return e==1?0:e==2?1:e==3?2:3},15:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2},16:function(e){return e%10==1&&e%100!=11?0:e!==0?1:2},17:function(e){return e==1||e%10==1&&e%100!=11?0:1},18:function(e){return e==0?0:e==1?1:2},19:function(e){return e==1?0:e==0||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3},20:function(e){return e==1?0:e==0||e%100>0&&e%100<20?1:2},21:function(e){return e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0},22:function(e){return e==1?0:e==2?1:(e<0||e>10)&&e%10==0?2:3}};const Mh=["v1","v2","v3"],Bh=["v4"],vu={zero:0,one:1,two:2,few:3,many:4,other:5};function kh(){const e={};return Nh.forEach(t=>{t.lngs.forEach(n=>{e[n]={numbers:t.nr,plurals:Ph[t.fc]}})}),e}class Fh{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=n,this.logger=Tn.create("pluralResolver"),(!this.options.compatibilityJSON||Bh.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!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=kh()}addRule(t,n){this.rules[t]=n}getRule(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(_i(t==="dev"?"en":t),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return this.shouldUseIntlApi()?r&&r.resolvedOptions().pluralCategories.length>1:r&&r.numbers.length>1}getPluralFormsOfKey(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,r).map(i=>`${n}${i}`)}getSuffixes(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((i,a)=>vu[i]-vu[a]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):r.numbers.map(i=>this.getSuffix(t,i,n)):[]}getSuffix(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,r);return i?this.shouldUseIntlApi()?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:this.getSuffixRetroCompatible(i,n):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,n){const r=t.noAbs?t.plurals(n):t.plurals(Math.abs(n));let i=t.numbers[r];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}shouldUseIntlApi(){return!Mh.includes(this.options.compatibilityJSON)}}function bu(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=Ah(e,t,n);return!a&&i&&typeof n=="string"&&(a=Xo(e,n,r),a===void 0&&(a=Xo(t,n,r))),a}class jh{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Tn.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(n=>n),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:a,prefixEscaped:s,suffix:c,suffixEscaped:h,formatSeparator:g,unescapeSuffix:d,unescapePrefix:E,nestingPrefix:u,nestingPrefixEscaped:w,nestingSuffix:o,nestingSuffixEscaped:l,nestingOptionsSeparator:p,maxReplaces:f,alwaysFormat:m}=t.interpolation;this.escape=n!==void 0?n:Th,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?gr(a):s||"{{",this.suffix=c?gr(c):h||"}}",this.formatSeparator=g||",",this.unescapePrefix=d?"":E||"-",this.unescapeSuffix=this.unescapePrefix?"":d||"",this.nestingPrefix=u?gr(u):w||gr("$t("),this.nestingSuffix=o?gr(o):l||gr(")"),this.nestingOptionsSeparator=p||",",this.maxReplaces=f||1e3,this.alwaysFormat=m!==void 0?m:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,r)=>n&&n.source===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,n,r,i){let a,s,c;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function g(o){return o.replace(/\$/g,"$$$$")}const d=o=>{if(o.indexOf(this.formatSeparator)<0){const m=bu(n,h,o,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(m,void 0,r,{...i,...n,interpolationkey:o}):m}const l=o.split(this.formatSeparator),p=l.shift().trim(),f=l.join(this.formatSeparator).trim();return this.format(bu(n,h,p,this.options.keySeparator,this.options.ignoreJSONStructure),f,r,{...i,...n,interpolationkey:p})};this.resetRegExp();const E=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,u=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:o=>g(o)},{regex:this.regexp,safeValue:o=>this.escapeValue?g(this.escape(o)):g(o)}].forEach(o=>{for(c=0;a=o.regex.exec(t);){const l=a[1].trim();if(s=d(l),s===void 0)if(typeof E=="function"){const f=E(t,a,i);s=typeof f=="string"?f:""}else if(i&&Object.prototype.hasOwnProperty.call(i,l))s="";else if(u){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${l} for interpolating ${t}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=fu(s));const p=o.safeValue(s);if(t=t.replace(a[0],p),u?(o.regex.lastIndex+=s.length,o.regex.lastIndex-=a[0].length):o.regex.lastIndex=0,c++,c>=this.maxReplaces)break}}),t}nest(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,s;function c(h,g){const d=this.nestingOptionsSeparator;if(h.indexOf(d)<0)return h;const E=h.split(new RegExp(`${d}[ ]*{`));let u=`{${E[1]}`;h=E[0],u=this.interpolate(u,s);const w=u.match(/'/g),o=u.match(/"/g);(w&&w.length%2===0&&!o||o.length%2!==0)&&(u=u.replace(/'/g,'"'));try{s=JSON.parse(u),g&&(s={...g,...s})}catch(l){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,l),`${h}${d}${u}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,h}for(;i=this.nestingRegexp.exec(t);){let h=[];s={...r},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let g=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const d=i[1].split(this.formatSeparator).map(E=>E.trim());i[1]=d.shift(),h=d,g=!0}if(a=n(c.call(this,i[1].trim(),s),s),a&&i[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=fu(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),g&&(a=h.reduce((d,E)=>this.format(d,E,r.lng,{...r,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}function Lh(e){let t=e.toLowerCase().trim();const n={};if(e.indexOf("(")>-1){const r=e.split("(");t=r[0].toLowerCase().trim();const i=r[1].substring(0,r[1].length-1);t==="currency"&&i.indexOf(":")<0?n.currency||(n.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?n.range||(n.range=i.trim()):i.split(";").forEach(s=>{if(s){const[c,...h]=s.split(":"),g=h.join(":").trim().replace(/^'+|'+$/g,""),d=c.trim();n[d]||(n[d]=g),g==="false"&&(n[d]=!1),g==="true"&&(n[d]=!0),isNaN(g)||(n[d]=parseInt(g,10))}})}return{formatName:t,formatOptions:n}}function mr(e){const t={};return function(r,i,a){const s=i+JSON.stringify(a);let c=t[s];return c||(c=e(_i(i),a),t[s]=c),c(r)}}class _h{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Tn.create("formatter"),this.options=t,this.formats={number:mr((n,r)=>{const i=new Intl.NumberFormat(n,{...r});return a=>i.format(a)}),currency:mr((n,r)=>{const i=new Intl.NumberFormat(n,{...r,style:"currency"});return a=>i.format(a)}),datetime:mr((n,r)=>{const i=new Intl.DateTimeFormat(n,{...r});return a=>i.format(a)}),relativetime:mr((n,r)=>{const i=new Intl.RelativeTimeFormat(n,{...r});return a=>i.format(a,r.range||"day")}),list:mr((n,r)=>{const i=new Intl.ListFormat(n,{...r});return a=>i.format(a)})},this.init(t)}init(t){const r=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||","}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=mr(n)}format(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((c,h)=>{const{formatName:g,formatOptions:d}=Lh(h);if(this.formats[g]){let E=c;try{const u=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},w=u.locale||u.lng||i.locale||i.lng||r;E=this.formats[g](c,w,{...d,...i,...u})}catch(u){this.logger.warn(u)}return E}else this.logger.warn(`there was no format function for ${g}`);return c},t)}}function Vh(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}class qh extends ji{constructor(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=Tn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(r,i.backend,i)}queueLoad(t,n,r,i){const a={},s={},c={},h={};return t.forEach(g=>{let d=!0;n.forEach(E=>{const u=`${g}|${E}`;!r.reload&&this.store.hasResourceBundle(g,E)?this.state[u]=2:this.state[u]<0||(this.state[u]===1?s[u]===void 0&&(s[u]=!0):(this.state[u]=1,d=!1,s[u]===void 0&&(s[u]=!0),a[u]===void 0&&(a[u]=!0),h[E]===void 0&&(h[E]=!0)))}),d||(c[g]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(c),toLoadNamespaces:Object.keys(h)}}loaded(t,n,r){const i=t.split("|"),a=i[0],s=i[1];n&&this.emit("failedLoading",a,s,n),r&&this.store.addResourceBundle(a,s,r,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2;const c={};this.queue.forEach(h=>{Ch(h.loaded,[a],s),Vh(h,t),n&&h.errors.push(n),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(g=>{c[g]||(c[g]={});const d=h.loaded[g];d.length&&d.forEach(E=>{c[g][E]===void 0&&(c[g][E]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",c),this.queue=this.queue.filter(h=>!h.done)}read(t,n,r){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!t.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:r,tried:i,wait:a,callback:s});return}this.readingCalls++;const c=(g,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const E=this.waitingReads.shift();this.read(E.lng,E.ns,E.fcName,E.tried,E.wait,E.callback)}if(g&&d&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,t,n,r,i+1,a*2,s)},a);return}s(g,d)},h=this.backend[r].bind(this.backend);if(h.length===2){try{const g=h(t,n);g&&typeof g.then=="function"?g.then(d=>c(null,d)).catch(c):c(null,g)}catch(g){c(g)}return}return h(t,n,c)}prepareLoading(t,n){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=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."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(t,n,r,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(t,n,r){this.prepareLoading(t,n,{},r)}reload(t,n,r){this.prepareLoading(t,n,{reload:!0},r)}loadOne(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const r=t.split("|"),i=r[0],a=r[1];this.read(i,a,"read",void 0,void 0,(s,c)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${i} failed`,s),!s&&c&&this.logger.log(`${n}loaded namespace ${a} for language ${i}`,c),this.loaded(t,s,c)})}saveMissing(t,n,r,i,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},c=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(n)){this.logger.warn(`did not save key "${r}" as the namespace "${n}" 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!!!");return}if(!(r==null||r==="")){if(this.backend&&this.backend.create){const h={...s,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let d;g.length===5?d=g(t,n,r,i,h):d=g(t,n,r,i),d&&typeof d.then=="function"?d.then(E=>c(null,E)).catch(c):c(null,d)}catch(d){c(d)}else g(t,n,r,i,c,h)}!t||!t[0]||this.store.addResource(t[0],n,r,i)}}}function wu(){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:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let n={};if(typeof t[1]=="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(i=>{n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Eu(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function qi(){}function Uh(e){Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}class Vr extends ji{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Eu(t),this.services={},this.logger=Tn,this.modules={external:[]},Uh(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(){var t=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(r=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const i=wu();this.options={...i,...this.options,...Eu(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?Tn.init(a(this.modules.logger),this.options):Tn.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl<"u"&&(d=_h);const E=new yu(this.options);this.store=new pu(this.options.resources,this.options);const u=this.services;u.logger=Tn,u.resourceStore=this.store,u.languageUtils=E,u.pluralResolver=new Fh(E,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(u.formatter=a(d),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new jh(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new qh(a(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(w){for(var o=arguments.length,l=new Array(o>1?o-1:0),p=1;p<o;p++)l[p-1]=arguments[p];t.emit(w,...l)}),this.modules.languageDetector&&(u.languageDetector=a(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=a(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new Vi(this.services,this.options),this.translator.on("*",function(w){for(var o=arguments.length,l=new Array(o>1?o-1:0),p=1;p<o;p++)l[p-1]=arguments[p];t.emit(w,...l)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,r||(r=qi),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.length>0&&d[0]!=="dev"&&(this.options.lng=d[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(d=>{this[d]=function(){return t.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return t.store[d](...arguments),t}});const h=Lr(),g=()=>{const d=(E,u)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),h.resolve(u),r(E,u)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return d(null,this.t.bind(this));this.changeLanguage(this.options.lng,d)};return this.options.resources||!this.options.initImmediate?g():setTimeout(g,0),h}loadResources(t){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qi;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const a=[],s=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(g=>{g!=="cimode"&&a.indexOf(g)<0&&a.push(g)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(h=>s(h)),this.options.preload&&this.options.preload.forEach(c=>s(c)),this.services.backendConnector.load(a,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(t,n,r){const i=Lr();return t||(t=this.languages),n||(n=this.options.ns),r||(r=qi),this.services.backendConnector.reload(t,n,a=>{i.resolve(),r(a)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&gu.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!(["cimode","dev"].indexOf(r)>-1)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}}changeLanguage(t,n){var r=this;this.isLanguageChangingTo=t;const i=Lr();this.emit("languageChanging",t);const a=h=>{this.language=h,this.languages=this.services.languageUtils.toResolveHierarchy(h),this.resolvedLanguage=void 0,this.setResolvedLanguage(h)},s=(h,g)=>{g?(a(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,i.resolve(function(){return r.t(...arguments)}),n&&n(h,function(){return r.t(...arguments)})},c=h=>{!t&&!h&&this.services.languageDetector&&(h=[]);const g=typeof h=="string"?h:this.services.languageUtils.getBestMatchFromCodes(h);g&&(this.language||a(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(g)),this.loadResources(g,d=>{s(d,g)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?c(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(c):this.services.languageDetector.detect(c):c(t),i}getFixedT(t,n,r){var i=this;const a=function(s,c){let h;if(typeof c!="object"){for(var g=arguments.length,d=new Array(g>2?g-2:0),E=2;E<g;E++)d[E-2]=arguments[E];h=i.options.overloadTranslationOptionHandler([s,c].concat(d))}else h={...c};h.lng=h.lng||a.lng,h.lngs=h.lngs||a.lngs,h.ns=h.ns||a.ns,h.keyPrefix=h.keyPrefix||r||a.keyPrefix;const u=i.options.keySeparator||".";let w;return h.keyPrefix&&Array.isArray(s)?w=s.map(o=>`${h.keyPrefix}${u}${o}`):w=h.keyPrefix?`${h.keyPrefix}${u}${s}`:s,i.t(w,h)};return typeof t=="string"?a.lng=t:a.lngs=t,a.ns=n,a.keyPrefix=r,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let n=arguments.length>1&&arguments[1]!==void 0?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;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(c,h)=>{const g=this.services.backendConnector.state[`${c}|${h}`];return g===-1||g===2};if(n.precheck){const c=n.precheck(this,s);if(c!==void 0)return c}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(a,t)))}loadNamespaces(t,n){const r=Lr();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(t,n){const r=Lr();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],a=t.filter(s=>i.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=i.concat(a),this.loadResources(s=>{r.resolve(),n&&n(s)}),r):(n&&n(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const n=["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"],r=this.services&&this.services.languageUtils||new yu(wu());return n.indexOf(r.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Vr(t,n)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qi;const r=t.forkResourceStore;r&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new Vr(i);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(c=>{a[c]=this[c]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new pu(this.store.data,i),a.services.resourceStore=a.store),a.translator=new Vi(a.services,i),a.translator.on("*",function(c){for(var h=arguments.length,g=new Array(h>1?h-1:0),d=1;d<h;d++)g[d-1]=arguments[d];a.emit(c,...g)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Qt=Vr.createInstance();Qt.createInstance=Vr.createInstance,Qt.createInstance,Qt.dir,Qt.init,Qt.loadResources,Qt.reloadResources,Qt.use,Qt.changeLanguage,Qt.getFixedT,Qt.t,Qt.exists,Qt.setDefaultNamespace,Qt.hasLoadedNamespace,Qt.loadNamespaces,Qt.loadLanguages;const qr=(e,t="EUR")=>new Intl.NumberFormat(Qt.language,{style:"currency",currency:t??"EUR"}).format(e/100),Ui=e=>{window.parent.postMessage(e,"*")};function xu(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=xu(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function qn(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=xu(e))&&(r&&(r+=" "),r+=t);return r}const Ur=e=>typeof e=="number"&&!isNaN(e),tr=e=>typeof e=="string",on=e=>typeof e=="function",Gi=e=>tr(e)||on(e)?e:null,ta=e=>k.isValidElement(e)||tr(e)||on(e)||Ur(e);function Gh(e,t,n){n===void 0&&(n=300);const{scrollHeight:r,style:i}=e;requestAnimationFrame(()=>{i.minHeight="initial",i.height=r+"px",i.transition=`all ${n}ms`,requestAnimationFrame(()=>{i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)})})}function Yi(e){let{enter:t,exit:n,appendPosition:r=!1,collapse:i=!0,collapseDuration:a=300}=e;return function(s){let{children:c,position:h,preventExitTransition:g,done:d,nodeRef:E,isIn:u,playToast:w}=s;const o=r?`${t}--${h}`:t,l=r?`${n}--${h}`:n,p=k.useRef(0);return k.useLayoutEffect(()=>{const f=E.current,m=o.split(" "),b=C=>{C.target===E.current&&(w(),f.removeEventListener("animationend",b),f.removeEventListener("animationcancel",b),p.current===0&&C.type!=="animationcancel"&&f.classList.remove(...m))};f.classList.add(...m),f.addEventListener("animationend",b),f.addEventListener("animationcancel",b)},[]),k.useEffect(()=>{const f=E.current,m=()=>{f.removeEventListener("animationend",m),i?Gh(f,d,a):d()};u||(g?m():(p.current=1,f.className+=` ${l}`,f.addEventListener("animationend",m)))},[u]),k.createElement(k.Fragment,null,c)}}function Cu(e,t){return e!=null?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const Jt=new Map;let Gr=[];const na=new Set,Yh=e=>na.forEach(t=>t(e)),Au=()=>Jt.size>0;function Su(e,t){var n;if(t)return!((n=Jt.get(t))==null||!n.isToastActive(e));let r=!1;return Jt.forEach(i=>{i.isToastActive(e)&&(r=!0)}),r}function Tu(e,t){ta(e)&&(Au()||Gr.push({content:e,options:t}),Jt.forEach(n=>{n.buildToast(e,t)}))}function Ou(e,t){Jt.forEach(n=>{t!=null&&t!=null&&t.containerId?(t==null?void 0:t.containerId)===n.id&&n.toggle(e,t==null?void 0:t.id):n.toggle(e,t==null?void 0:t.id)})}function Kh(e){const{subscribe:t,getSnapshot:n,setProps:r}=k.useRef(function(a){const s=a.containerId||1;return{subscribe(c){const h=function(d,E,u){let w=1,o=0,l=[],p=[],f=[],m=E;const b=new Map,C=new Set,S=()=>{f=Array.from(b.values()),C.forEach(N=>N())},D=N=>{p=N==null?[]:p.filter(I=>I!==N),S()},A=N=>{const{toastId:I,onOpen:_,updateId:Q,children:$}=N.props,V=Q==null;N.staleId&&b.delete(N.staleId),b.set(I,N),p=[...p,N.props.toastId].filter(K=>K!==N.staleId),S(),u(Cu(N,V?"added":"updated")),V&&on(_)&&_(k.isValidElement($)&&$.props)};return{id:d,props:m,observe:N=>(C.add(N),()=>C.delete(N)),toggle:(N,I)=>{b.forEach(_=>{I!=null&&I!==_.props.toastId||on(_.toggle)&&_.toggle(N)})},removeToast:D,toasts:b,clearQueue:()=>{o-=l.length,l=[]},buildToast:(N,I)=>{if((ge=>{let{containerId:le,toastId:xe,updateId:ce}=ge;const q=le?le!==d:d!==1,G=b.has(xe)&&ce==null;return q||G})(I))return;const{toastId:_,updateId:Q,data:$,staleId:V,delay:K}=I,R=()=>{D(_)},U=Q==null;U&&o++;const W={...m,style:m.toastStyle,key:w++,...Object.fromEntries(Object.entries(I).filter(ge=>{let[le,xe]=ge;return xe!=null})),toastId:_,updateId:Q,data:$,closeToast:R,isIn:!1,className:Gi(I.className||m.toastClassName),bodyClassName:Gi(I.bodyClassName||m.bodyClassName),progressClassName:Gi(I.progressClassName||m.progressClassName),autoClose:!I.isLoading&&(z=I.autoClose,ne=m.autoClose,z===!1||Ur(z)&&z>0?z:ne),deleteToast(){const ge=b.get(_),{onClose:le,children:xe}=ge.props;on(le)&&le(k.isValidElement(xe)&&xe.props),u(Cu(ge,"removed")),b.delete(_),o--,o<0&&(o=0),l.length>0?A(l.shift()):S()}};var z,ne;W.closeButton=m.closeButton,I.closeButton===!1||ta(I.closeButton)?W.closeButton=I.closeButton:I.closeButton===!0&&(W.closeButton=!ta(m.closeButton)||m.closeButton);let re=N;k.isValidElement(N)&&!tr(N.type)?re=k.cloneElement(N,{closeToast:R,toastProps:W,data:$}):on(N)&&(re=N({closeToast:R,toastProps:W,data:$}));const ae={content:re,props:W,staleId:V};m.limit&&m.limit>0&&o>m.limit&&U?l.push(ae):Ur(K)?setTimeout(()=>{A(ae)},K):A(ae)},setProps(N){m=N},setToggle:(N,I)=>{b.get(N).toggle=I},isToastActive:N=>p.some(I=>I===N),getSnapshot:()=>m.newestOnTop?f.reverse():f}}(s,a,Yh);Jt.set(s,h);const g=h.observe(c);return Gr.forEach(d=>Tu(d.content,d.options)),Gr=[],()=>{g(),Jt.delete(s)}},setProps(c){var h;(h=Jt.get(s))==null||h.setProps(c)},getSnapshot(){var c;return(c=Jt.get(s))==null?void 0:c.getSnapshot()}}}(e)).current;r(e);const i=k.useSyncExternalStore(t,n,n);return{getToastToRender:function(a){if(!i)return[];const s=new Map;return i.forEach(c=>{const{position:h}=c.props;s.has(h)||s.set(h,[]),s.get(h).push(c)}),Array.from(s,c=>a(c[0],c[1]))},isToastActive:Su,count:i==null?void 0:i.length}}function Qh(e){const[t,n]=k.useState(!1),[r,i]=k.useState(!1),a=k.useRef(null),s=k.useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,didMove:!1}).current,{autoClose:c,pauseOnHover:h,closeToast:g,onClick:d,closeOnClick:E}=e;var u,w;function o(){n(!0)}function l(){n(!1)}function p(b){const C=a.current;s.canDrag&&C&&(s.didMove=!0,t&&l(),s.delta=e.draggableDirection==="x"?b.clientX-s.start:b.clientY-s.start,s.start!==b.clientX&&(s.canCloseOnClick=!1),C.style.transform=`translate3d(${e.draggableDirection==="x"?`${s.delta}px, var(--y)`:`0, calc(${s.delta}px + var(--y))`},0)`,C.style.opacity=""+(1-Math.abs(s.delta/s.removalDistance)))}function f(){document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",f);const b=a.current;if(s.canDrag&&s.didMove&&b){if(s.canDrag=!1,Math.abs(s.delta)>s.removalDistance)return i(!0),e.closeToast(),void e.collapseAll();b.style.transition="transform 0.2s, opacity 0.2s",b.style.removeProperty("transform"),b.style.removeProperty("opacity")}}(w=Jt.get((u={id:e.toastId,containerId:e.containerId,fn:n}).containerId||1))==null||w.setToggle(u.id,u.fn),k.useEffect(()=>{if(e.pauseOnFocusLoss)return document.hasFocus()||l(),window.addEventListener("focus",o),window.addEventListener("blur",l),()=>{window.removeEventListener("focus",o),window.removeEventListener("blur",l)}},[e.pauseOnFocusLoss]);const m={onPointerDown:function(b){if(e.draggable===!0||e.draggable===b.pointerType){s.didMove=!1,document.addEventListener("pointermove",p),document.addEventListener("pointerup",f);const C=a.current;s.canCloseOnClick=!0,s.canDrag=!0,C.style.transition="none",e.draggableDirection==="x"?(s.start=b.clientX,s.removalDistance=C.offsetWidth*(e.draggablePercent/100)):(s.start=b.clientY,s.removalDistance=C.offsetHeight*(e.draggablePercent===80?1.5*e.draggablePercent:e.draggablePercent)/100)}},onPointerUp:function(b){const{top:C,bottom:S,left:D,right:A}=a.current.getBoundingClientRect();b.nativeEvent.type!=="touchend"&&e.pauseOnHover&&b.clientX>=D&&b.clientX<=A&&b.clientY>=C&&b.clientY<=S?l():o()}};return c&&h&&(m.onMouseEnter=l,e.stacked||(m.onMouseLeave=o)),E&&(m.onClick=b=>{d&&d(b),s.canCloseOnClick&&g()}),{playToast:o,pauseToast:l,isRunning:t,preventExitTransition:r,toastRef:a,eventHandlers:m}}function $h(e){let{delay:t,isRunning:n,closeToast:r,type:i="default",hide:a,className:s,style:c,controlledProgress:h,progress:g,rtl:d,isIn:E,theme:u}=e;const w=a||h&&g===0,o={...c,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused"};h&&(o.transform=`scaleX(${g})`);const l=qn("Toastify__progress-bar",h?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${u}`,`Toastify__progress-bar--${i}`,{"Toastify__progress-bar--rtl":d}),p=on(s)?s({rtl:d,type:i,defaultClassName:l}):qn(l,s),f={[h&&g>=1?"onTransitionEnd":"onAnimationEnd"]:h&&g<1?null:()=>{E&&r()}};return k.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":w},k.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${u} Toastify__progress-bar--${i}`}),k.createElement("div",{role:"progressbar","aria-hidden":w?"true":"false","aria-label":"notification timer",className:p,style:o,...f}))}let Hh=1;const Du=()=>""+Hh++;function Wh(e){return e&&(tr(e.toastId)||Ur(e.toastId))?e.toastId:Du()}function Yr(e,t){return Tu(e,t),t.toastId}function Ki(e,t){return{...t,type:t&&t.type||e,toastId:Wh(t)}}function Qi(e){return(t,n)=>Yr(t,Ki(e,n))}function Xe(e,t){return Yr(e,Ki("default",t))}Xe.loading=(e,t)=>Yr(e,Ki("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Xe.promise=function(e,t,n){let r,{pending:i,error:a,success:s}=t;i&&(r=tr(i)?Xe.loading(i,n):Xe.loading(i.render,{...n,...i}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},h=(d,E,u)=>{if(E==null)return void Xe.dismiss(r);const w={type:d,...c,...n,data:u},o=tr(E)?{render:E}:E;return r?Xe.update(r,{...w,...o}):Xe(o.render,{...w,...o}),u},g=on(e)?e():e;return g.then(d=>h("success",s,d)).catch(d=>h("error",a,d)),g},Xe.success=Qi("success"),Xe.info=Qi("info"),Xe.error=Qi("error"),Xe.warning=Qi("warning"),Xe.warn=Xe.warning,Xe.dark=(e,t)=>Yr(e,Ki("default",{theme:"dark",...t})),Xe.dismiss=function(e){(function(t){var n;if(Au()){if(t==null||tr(n=t)||Ur(n))Jt.forEach(r=>{r.removeToast(t)});else if(t&&("containerId"in t||"id"in t)){const r=Jt.get(t.containerId);r?r.removeToast(t.id):Jt.forEach(i=>{i.removeToast(t.id)})}}else Gr=Gr.filter(r=>t!=null&&r.options.toastId!==t)})(e)},Xe.clearWaitingQueue=function(e){e===void 0&&(e={}),Jt.forEach(t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()})},Xe.isActive=Su,Xe.update=function(e,t){t===void 0&&(t={});const n=((r,i)=>{var a;let{containerId:s}=i;return(a=Jt.get(s||1))==null?void 0:a.toasts.get(r)})(e,t);if(n){const{props:r,content:i}=n,a={delay:100,...r,...t,toastId:t.toastId||e,updateId:Du()};a.toastId!==e&&(a.staleId=e);const s=a.render||i;delete a.render,Yr(s,a)}},Xe.done=e=>{Xe.update(e,{progress:1})},Xe.onChange=function(e){return na.add(e),()=>{na.delete(e)}},Xe.play=e=>Ou(!0,e),Xe.pause=e=>Ou(!1,e);const Jh=typeof window<"u"?k.useLayoutEffect:k.useEffect,$i=e=>{let{theme:t,type:n,isLoading:r,...i}=e;return k.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${n})`,...i})},ra={info:function(e){return k.createElement($i,{...e},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return k.createElement($i,{...e},k.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return k.createElement($i,{...e},k.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return k.createElement($i,{...e},k.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return k.createElement("div",{className:"Toastify__spinner"})}},zh=e=>{const{isRunning:t,preventExitTransition:n,toastRef:r,eventHandlers:i,playToast:a}=Qh(e),{closeButton:s,children:c,autoClose:h,onClick:g,type:d,hideProgressBar:E,closeToast:u,transition:w,position:o,className:l,style:p,bodyClassName:f,bodyStyle:m,progressClassName:b,progressStyle:C,updateId:S,role:D,progress:A,rtl:N,toastId:I,deleteToast:_,isIn:Q,isLoading:$,closeOnClick:V,theme:K}=e,R=qn("Toastify__toast",`Toastify__toast-theme--${K}`,`Toastify__toast--${d}`,{"Toastify__toast--rtl":N},{"Toastify__toast--close-on-click":V}),U=on(l)?l({rtl:N,position:o,type:d,defaultClassName:R}):qn(R,l),W=function(ae){let{theme:ge,type:le,isLoading:xe,icon:ce}=ae,q=null;const G={theme:ge,type:le};return ce===!1||(on(ce)?q=ce({...G,isLoading:xe}):k.isValidElement(ce)?q=k.cloneElement(ce,G):xe?q=ra.spinner():(Z=>Z in ra)(le)&&(q=ra[le](G))),q}(e),z=!!A||!h,ne={closeToast:u,type:d,theme:K};let re=null;return s===!1||(re=on(s)?s(ne):k.isValidElement(s)?k.cloneElement(s,ne):function(ae){let{closeToast:ge,theme:le,ariaLabel:xe="close"}=ae;return k.createElement("button",{className:`Toastify__close-button Toastify__close-button--${le}`,type:"button",onClick:ce=>{ce.stopPropagation(),ge(ce)},"aria-label":xe},k.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},k.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}(ne)),k.createElement(w,{isIn:Q,done:_,position:o,preventExitTransition:n,nodeRef:r,playToast:a},k.createElement("div",{id:I,onClick:g,"data-in":Q,className:U,...i,style:p,ref:r},k.createElement("div",{...Q&&{role:D},className:on(f)?f({type:d}):qn("Toastify__toast-body",f),style:m},W!=null&&k.createElement("div",{className:qn("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!$})},W),k.createElement("div",null,c)),re,k.createElement($h,{...S&&!z?{key:`pb-${S}`}:{},rtl:N,theme:K,delay:h,isRunning:t,isIn:Q,closeToast:u,hide:E,type:d,style:C,className:b,controlledProgress:z,progress:A||0})))},Hi=function(e,t){return t===void 0&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},Zh=Yi(Hi("bounce",!0));Yi(Hi("slide",!0)),Yi(Hi("zoom")),Yi(Hi("flip"));const Xh={position:"top-right",transition:Zh,autoClose:5e3,closeButton:!0,pauseOnHover:!0,pauseOnFocusLoss:!0,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};function Iu(e){let t={...Xh,...e};const n=e.stacked,[r,i]=k.useState(!0),a=k.useRef(null),{getToastToRender:s,isToastActive:c,count:h}=Kh(t),{className:g,style:d,rtl:E,containerId:u}=t;function w(l){const p=qn("Toastify__toast-container",`Toastify__toast-container--${l}`,{"Toastify__toast-container--rtl":E});return on(g)?g({position:l,rtl:E,defaultClassName:p}):qn(p,Gi(g))}function o(){n&&(i(!0),Xe.play())}return Jh(()=>{if(n){var l;const p=a.current.querySelectorAll('[data-in="true"]'),f=12,m=(l=t.position)==null?void 0:l.includes("top");let b=0,C=0;Array.from(p).reverse().forEach((S,D)=>{const A=S;A.classList.add("Toastify__toast--stacked"),D>0&&(A.dataset.collapsed=`${r}`),A.dataset.pos||(A.dataset.pos=m?"top":"bot");const N=b*(r?.2:1)+(r?0:f*D);A.style.setProperty("--y",`${m?N:-1*N}px`),A.style.setProperty("--g",`${f}`),A.style.setProperty("--s",""+(1-(r?C:0))),b+=A.offsetHeight,C+=.025})}},[r,h,n]),k.createElement("div",{ref:a,className:"Toastify",id:u,onMouseEnter:()=>{n&&(i(!1),Xe.pause())},onMouseLeave:o},s((l,p)=>{const f=p.length?{...d}:{...d,pointerEvents:"none"};return k.createElement("div",{className:w(l),style:f,key:`container-${l}`},p.map(m=>{let{content:b,props:C}=m;return k.createElement(zh,{...C,stacked:n,collapseAll:o,isIn:c(C.toastId,C.containerId),style:C.style,key:`toast-${C.key}`},b)}))}))}function Ru(e,t){return function(){return e.apply(t,arguments)}}const{toString:ep}=Object.prototype,{getPrototypeOf:ia}=Object,Wi=(e=>t=>{const n=ep.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pn=e=>(e=e.toLowerCase(),t=>Wi(t)===e),Ji=e=>t=>typeof t===e,{isArray:yr}=Array,Kr=Ji("undefined");function tp(e){return e!==null&&!Kr(e)&&e.constructor!==null&&!Kr(e.constructor)&&sn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Nu=pn("ArrayBuffer");function np(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Nu(e.buffer),t}const rp=Ji("string"),sn=Ji("function"),Pu=Ji("number"),zi=e=>e!==null&&typeof e=="object",ip=e=>e===!0||e===!1,Zi=e=>{if(Wi(e)!=="object")return!1;const t=ia(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},op=pn("Date"),ap=pn("File"),sp=pn("Blob"),up=pn("FileList"),lp=e=>zi(e)&&sn(e.pipe),cp=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||sn(e.append)&&((t=Wi(e))==="formdata"||t==="object"&&sn(e.toString)&&e.toString()==="[object FormData]"))},fp=pn("URLSearchParams"),[dp,hp,pp,gp]=["ReadableStream","Request","Response","Headers"].map(pn),mp=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Qr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),yr(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{const a=n?Object.getOwnPropertyNames(e):Object.keys(e),s=a.length;let c;for(r=0;r<s;r++)c=a[r],t.call(null,e[c],c,e)}}function Mu(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,i;for(;r-- >0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Bu=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ku=e=>!Kr(e)&&e!==Bu;function oa(){const{caseless:e}=ku(this)&&this||{},t={},n=(r,i)=>{const a=e&&Mu(t,i)||i;Zi(t[a])&&Zi(r)?t[a]=oa(t[a],r):Zi(r)?t[a]=oa({},r):yr(r)?t[a]=r.slice():t[a]=r};for(let r=0,i=arguments.length;r<i;r++)arguments[r]&&Qr(arguments[r],n);return t}const yp=(e,t,n,{allOwnKeys:r}={})=>(Qr(t,(i,a)=>{n&&sn(i)?e[a]=Ru(i,n):e[a]=i},{allOwnKeys:r}),e),vp=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),bp=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},wp=(e,t,n,r)=>{let i,a,s;const c={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-- >0;)s=i[a],(!r||r(s,e,t))&&!c[s]&&(t[s]=e[s],c[s]=!0);e=n!==!1&&ia(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ep=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},xp=e=>{if(!e)return null;if(yr(e))return e;let t=e.length;if(!Pu(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Cp=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ia(Uint8Array)),Ap=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const a=i.value;t.call(e,a[0],a[1])}},Sp=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Tp=pn("HTMLFormElement"),Op=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),Fu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Dp=pn("RegExp"),ju=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Qr(n,(i,a)=>{let s;(s=t(i,a,e))!==!1&&(r[a]=s||i)}),Object.defineProperties(e,r)},Ip=e=>{ju(e,(t,n)=>{if(sn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(sn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Rp=(e,t)=>{const n={},r=i=>{i.forEach(a=>{n[a]=!0})};return yr(e)?r(e):r(String(e).split(t)),n},Np=()=>{},Pp=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,aa="abcdefghijklmnopqrstuvwxyz",Lu="0123456789",_u={DIGIT:Lu,ALPHA:aa,ALPHA_DIGIT:aa+aa.toUpperCase()+Lu},Mp=(e=16,t=_u.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Bp(e){return!!(e&&sn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const kp=e=>{const t=new Array(10),n=(r,i)=>{if(zi(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const a=yr(r)?[]:{};return Qr(r,(s,c)=>{const h=n(s,i+1);!Kr(h)&&(a[c]=h)}),t[i]=void 0,a}}return r};return n(e,0)},Fp=pn("AsyncFunction"),de={isArray:yr,isArrayBuffer:Nu,isBuffer:tp,isFormData:cp,isArrayBufferView:np,isString:rp,isNumber:Pu,isBoolean:ip,isObject:zi,isPlainObject:Zi,isReadableStream:dp,isRequest:hp,isResponse:pp,isHeaders:gp,isUndefined:Kr,isDate:op,isFile:ap,isBlob:sp,isRegExp:Dp,isFunction:sn,isStream:lp,isURLSearchParams:fp,isTypedArray:Cp,isFileList:up,forEach:Qr,merge:oa,extend:yp,trim:mp,stripBOM:vp,inherits:bp,toFlatObject:wp,kindOf:Wi,kindOfTest:pn,endsWith:Ep,toArray:xp,forEachEntry:Ap,matchAll:Sp,isHTMLForm:Tp,hasOwnProperty:Fu,hasOwnProp:Fu,reduceDescriptors:ju,freezeMethods:Ip,toObjectSet:Rp,toCamelCase:Op,noop:Np,toFiniteNumber:Pp,findKey:Mu,global:Bu,isContextDefined:ku,ALPHABET:_u,generateString:Mp,isSpecCompliantForm:Bp,toJSONObject:kp,isAsyncFn:Fp,isThenable:e=>e&&(zi(e)||sn(e))&&sn(e.then)&&sn(e.catch)};function He(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}de.inherits(He,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:de.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Vu=He.prototype,qu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{qu[e]={value:e}}),Object.defineProperties(He,qu),Object.defineProperty(Vu,"isAxiosError",{value:!0}),He.from=(e,t,n,r,i,a)=>{const s=Object.create(Vu);return de.toFlatObject(e,s,function(h){return h!==Error.prototype},c=>c!=="isAxiosError"),He.call(s,e.message,t,n,r,i),s.cause=e,s.name=e.name,a&&Object.assign(s,a),s};const jp=null;function sa(e){return de.isPlainObject(e)||de.isArray(e)}function Uu(e){return de.endsWith(e,"[]")?e.slice(0,-2):e}function Gu(e,t,n){return e?e.concat(t).map(function(i,a){return i=Uu(i),!n&&a?"["+i+"]":i}).join(n?".":""):t}function Lp(e){return de.isArray(e)&&!e.some(sa)}const _p=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function Xi(e,t,n){if(!de.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=de.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(l,p){return!de.isUndefined(p[l])});const r=n.metaTokens,i=n.visitor||d,a=n.dots,s=n.indexes,h=(n.Blob||typeof Blob<"u"&&Blob)&&de.isSpecCompliantForm(t);if(!de.isFunction(i))throw new TypeError("visitor must be a function");function g(o){if(o===null)return"";if(de.isDate(o))return o.toISOString();if(!h&&de.isBlob(o))throw new He("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(o)||de.isTypedArray(o)?h&&typeof Blob=="function"?new Blob([o]):Buffer.from(o):o}function d(o,l,p){let f=o;if(o&&!p&&typeof o=="object"){if(de.endsWith(l,"{}"))l=r?l:l.slice(0,-2),o=JSON.stringify(o);else if(de.isArray(o)&&Lp(o)||(de.isFileList(o)||de.endsWith(l,"[]"))&&(f=de.toArray(o)))return l=Uu(l),f.forEach(function(b,C){!(de.isUndefined(b)||b===null)&&t.append(s===!0?Gu([l],C,a):s===null?l:l+"[]",g(b))}),!1}return sa(o)?!0:(t.append(Gu(p,l,a),g(o)),!1)}const E=[],u=Object.assign(_p,{defaultVisitor:d,convertValue:g,isVisitable:sa});function w(o,l){if(!de.isUndefined(o)){if(E.indexOf(o)!==-1)throw Error("Circular reference detected in "+l.join("."));E.push(o),de.forEach(o,function(f,m){(!(de.isUndefined(f)||f===null)&&i.call(t,f,de.isString(m)?m.trim():m,l,u))===!0&&w(f,l?l.concat(m):[m])}),E.pop()}}if(!de.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Yu(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function ua(e,t){this._pairs=[],e&&Xi(e,this,t)}const Ku=ua.prototype;Ku.append=function(t,n){this._pairs.push([t,n])},Ku.toString=function(t){const n=t?function(r){return t.call(this,r,Yu)}:Yu;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Vp(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Qu(e,t,n){if(!t)return e;const r=n&&n.encode||Vp,i=n&&n.serialize;let a;if(i?a=i(t,n):a=de.isURLSearchParams(t)?t.toString():new ua(t,n).toString(r),a){const s=e.indexOf("#");s!==-1&&(e=e.slice(0,s)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class $u{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){de.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Hu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},qp={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:ua,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},la=typeof window<"u"&&typeof document<"u",Up=(e=>la&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),Gp=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Yp=la&&window.location.href||"http://localhost",gn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:la,hasStandardBrowserEnv:Up,hasStandardBrowserWebWorkerEnv:Gp,origin:Yp},Symbol.toStringTag,{value:"Module"})),...qp};function Kp(e,t){return Xi(e,new gn.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,a){return gn.isNode&&de.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function Qp(e){return de.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $p(e){const t={},n=Object.keys(e);let r;const i=n.length;let a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Wu(e){function t(n,r,i,a){let s=n[a++];if(s==="__proto__")return!0;const c=Number.isFinite(+s),h=a>=n.length;return s=!s&&de.isArray(i)?i.length:s,h?(de.hasOwnProp(i,s)?i[s]=[i[s],r]:i[s]=r,!c):((!i[s]||!de.isObject(i[s]))&&(i[s]=[]),t(n,r,i[s],a)&&de.isArray(i[s])&&(i[s]=$p(i[s])),!c)}if(de.isFormData(e)&&de.isFunction(e.entries)){const n={};return de.forEachEntry(e,(r,i)=>{t(Qp(r),i,n,0)}),n}return null}function Hp(e,t,n){if(de.isString(e))try{return(t||JSON.parse)(e),de.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const $r={transitional:Hu,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,a=de.isObject(t);if(a&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return i?JSON.stringify(Wu(t)):t;if(de.isArrayBuffer(t)||de.isBuffer(t)||de.isStream(t)||de.isFile(t)||de.isBlob(t)||de.isReadableStream(t))return t;if(de.isArrayBufferView(t))return t.buffer;if(de.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Kp(t,this.formSerializer).toString();if((c=de.isFileList(t))||r.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return Xi(c?{"files[]":t}:t,h&&new h,this.formSerializer)}}return a||i?(n.setContentType("application/json",!1),Hp(t)):t}],transformResponse:[function(t){const n=this.transitional||$r.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(de.isResponse(t)||de.isReadableStream(t))return t;if(t&&de.isString(t)&&(r&&!this.responseType||i)){const s=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(c){if(s)throw c.name==="SyntaxError"?He.from(c,He.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:gn.classes.FormData,Blob:gn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};de.forEach(["delete","get","head","post","put","patch"],e=>{$r.headers[e]={}});const Wp=de.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Jp=e=>{const t={};let n,r,i;return e&&e.split(`
31
+ `).forEach(function(s){i=s.indexOf(":"),n=s.substring(0,i).trim().toLowerCase(),r=s.substring(i+1).trim(),!(!n||t[n]&&Wp[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},Ju=Symbol("internals");function Hr(e){return e&&String(e).trim().toLowerCase()}function eo(e){return e===!1||e==null?e:de.isArray(e)?e.map(eo):String(e)}function zp(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Zp=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ca(e,t,n,r,i){if(de.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!de.isString(t)){if(de.isString(r))return t.indexOf(r)!==-1;if(de.isRegExp(r))return r.test(t)}}function Xp(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function eg(e,t){const n=de.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,a,s){return this[r].call(this,t,i,a,s)},configurable:!0})})}class Xt{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function a(c,h,g){const d=Hr(h);if(!d)throw new Error("header name must be a non-empty string");const E=de.findKey(i,d);(!E||i[E]===void 0||g===!0||g===void 0&&i[E]!==!1)&&(i[E||h]=eo(c))}const s=(c,h)=>de.forEach(c,(g,d)=>a(g,d,h));if(de.isPlainObject(t)||t instanceof this.constructor)s(t,n);else if(de.isString(t)&&(t=t.trim())&&!Zp(t))s(Jp(t),n);else if(de.isHeaders(t))for(const[c,h]of t.entries())a(h,c,r);else t!=null&&a(n,t,r);return this}get(t,n){if(t=Hr(t),t){const r=de.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return zp(i);if(de.isFunction(n))return n.call(this,i,r);if(de.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Hr(t),t){const r=de.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ca(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function a(s){if(s=Hr(s),s){const c=de.findKey(r,s);c&&(!n||ca(r,r[c],c,n))&&(delete r[c],i=!0)}}return de.isArray(t)?t.forEach(a):a(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const a=n[r];(!t||ca(this,this[a],a,t,!0))&&(delete this[a],i=!0)}return i}normalize(t){const n=this,r={};return de.forEach(this,(i,a)=>{const s=de.findKey(r,a);if(s){n[s]=eo(i),delete n[a];return}const c=t?Xp(a):String(a).trim();c!==a&&delete n[a],n[c]=eo(i),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return de.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&de.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
32
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[Ju]=this[Ju]={accessors:{}}).accessors,i=this.prototype;function a(s){const c=Hr(s);r[c]||(eg(i,s),r[c]=!0)}return de.isArray(t)?t.forEach(a):a(t),this}}Xt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),de.reduceDescriptors(Xt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),de.freezeMethods(Xt);function fa(e,t){const n=this||$r,r=t||n,i=Xt.from(r.headers);let a=r.data;return de.forEach(e,function(c){a=c.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function zu(e){return!!(e&&e.__CANCEL__)}function vr(e,t,n){He.call(this,e??"canceled",He.ERR_CANCELED,t,n),this.name="CanceledError"}de.inherits(vr,He,{__CANCEL__:!0});function Zu(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new He("Request failed with status code "+n.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function tg(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ng(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,a=0,s;return t=t!==void 0?t:1e3,function(h){const g=Date.now(),d=r[a];s||(s=g),n[i]=h,r[i]=g;let E=a,u=0;for(;E!==i;)u+=n[E++],E=E%e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),g-s<t)return;const w=d&&g-d;return w?Math.round(u*1e3/w):void 0}}function rg(e,t){let n=0;const r=1e3/t;let i=null;return function(){const s=this===!0,c=Date.now();if(s||c-n>r)return i&&(clearTimeout(i),i=null),n=c,e.apply(null,arguments);i||(i=setTimeout(()=>(i=null,n=Date.now(),e.apply(null,arguments)),r-(c-n)))}}const to=(e,t,n=3)=>{let r=0;const i=ng(50,250);return rg(a=>{const s=a.loaded,c=a.lengthComputable?a.total:void 0,h=s-r,g=i(h),d=s<=c;r=s;const E={loaded:s,total:c,progress:c?s/c:void 0,bytes:h,rate:g||void 0,estimated:g&&c&&d?(c-s)/g:void 0,event:a,lengthComputable:c!=null};E[t?"download":"upload"]=!0,e(E)},n)},ig=gn.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(a){let s=a;return t&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(s){const c=de.isString(s)?i(s):s;return c.protocol===r.protocol&&c.host===r.host}}():function(){return function(){return!0}}(),og=gn.hasStandardBrowserEnv?{write(e,t,n,r,i,a){const s=[e+"="+encodeURIComponent(t)];de.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),de.isString(r)&&s.push("path="+r),de.isString(i)&&s.push("domain="+i),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ag(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function sg(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xu(e,t){return e&&!ag(t)?sg(e,t):t}const el=e=>e instanceof Xt?{...e}:e;function nr(e,t){t=t||{};const n={};function r(g,d,E){return de.isPlainObject(g)&&de.isPlainObject(d)?de.merge.call({caseless:E},g,d):de.isPlainObject(d)?de.merge({},d):de.isArray(d)?d.slice():d}function i(g,d,E){if(de.isUndefined(d)){if(!de.isUndefined(g))return r(void 0,g,E)}else return r(g,d,E)}function a(g,d){if(!de.isUndefined(d))return r(void 0,d)}function s(g,d){if(de.isUndefined(d)){if(!de.isUndefined(g))return r(void 0,g)}else return r(void 0,d)}function c(g,d,E){if(E in t)return r(g,d);if(E in e)return r(void 0,g)}const h={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c,headers:(g,d)=>i(el(g),el(d),!0)};return de.forEach(Object.keys(Object.assign({},e,t)),function(d){const E=h[d]||i,u=E(e[d],t[d],d);de.isUndefined(u)&&E!==c||(n[d]=u)}),n}const tl=e=>{const t=nr({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:i,xsrfCookieName:a,headers:s,auth:c}=t;t.headers=s=Xt.from(s),t.url=Qu(Xu(t.baseURL,t.url),e.params,e.paramsSerializer),c&&s.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let h;if(de.isFormData(n)){if(gn.hasStandardBrowserEnv||gn.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if((h=s.getContentType())!==!1){const[g,...d]=h?h.split(";").map(E=>E.trim()).filter(Boolean):[];s.setContentType([g||"multipart/form-data",...d].join("; "))}}if(gn.hasStandardBrowserEnv&&(r&&de.isFunction(r)&&(r=r(t)),r||r!==!1&&ig(t.url))){const g=i&&a&&og.read(a);g&&s.set(i,g)}return t},ug=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,r){const i=tl(e);let a=i.data;const s=Xt.from(i.headers).normalize();let{responseType:c}=i,h;function g(){i.cancelToken&&i.cancelToken.unsubscribe(h),i.signal&&i.signal.removeEventListener("abort",h)}let d=new XMLHttpRequest;d.open(i.method.toUpperCase(),i.url,!0),d.timeout=i.timeout;function E(){if(!d)return;const w=Xt.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),l={data:!c||c==="text"||c==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:w,config:e,request:d};Zu(function(f){n(f),g()},function(f){r(f),g()},l),d=null}"onloadend"in d?d.onloadend=E:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(E)},d.onabort=function(){d&&(r(new He("Request aborted",He.ECONNABORTED,i,d)),d=null)},d.onerror=function(){r(new He("Network Error",He.ERR_NETWORK,i,d)),d=null},d.ontimeout=function(){let o=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const l=i.transitional||Hu;i.timeoutErrorMessage&&(o=i.timeoutErrorMessage),r(new He(o,l.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,i,d)),d=null},a===void 0&&s.setContentType(null),"setRequestHeader"in d&&de.forEach(s.toJSON(),function(o,l){d.setRequestHeader(l,o)}),de.isUndefined(i.withCredentials)||(d.withCredentials=!!i.withCredentials),c&&c!=="json"&&(d.responseType=i.responseType),typeof i.onDownloadProgress=="function"&&d.addEventListener("progress",to(i.onDownloadProgress,!0)),typeof i.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",to(i.onUploadProgress)),(i.cancelToken||i.signal)&&(h=w=>{d&&(r(!w||w.type?new vr(null,e,d):w),d.abort(),d=null)},i.cancelToken&&i.cancelToken.subscribe(h),i.signal&&(i.signal.aborted?h():i.signal.addEventListener("abort",h)));const u=tg(i.url);if(u&&gn.protocols.indexOf(u)===-1){r(new He("Unsupported protocol "+u+":",He.ERR_BAD_REQUEST,e));return}d.send(a||null)})},lg=(e,t)=>{let n=new AbortController,r;const i=function(h){if(!r){r=!0,s();const g=h instanceof Error?h:this.reason;n.abort(g instanceof He?g:new vr(g instanceof Error?g.message:g))}};let a=t&&setTimeout(()=>{i(new He(`timeout ${t} of ms exceeded`,He.ETIMEDOUT))},t);const s=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(h=>{h&&(h.removeEventListener?h.removeEventListener("abort",i):h.unsubscribe(i))}),e=null)};e.forEach(h=>h&&h.addEventListener&&h.addEventListener("abort",i));const{signal:c}=n;return c.unsubscribe=s,[c,()=>{a&&clearTimeout(a),a=null}]},cg=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},fg=async function*(e,t,n){for await(const r of e)yield*cg(ArrayBuffer.isView(r)?r:await n(String(r)),t)},nl=(e,t,n,r,i)=>{const a=fg(e,t,i);let s=0;return new ReadableStream({type:"bytes",async pull(c){const{done:h,value:g}=await a.next();if(h){c.close(),r();return}let d=g.byteLength;n&&n(s+=d),c.enqueue(new Uint8Array(g))},cancel(c){return r(c),a.return()}},{highWaterMark:2})},rl=(e,t)=>{const n=e!=null;return r=>setTimeout(()=>t({lengthComputable:n,total:e,loaded:r}))},no=typeof fetch<"u",il=no&&typeof ReadableStream<"u",da=no&&(typeof TextEncoder<"u"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),dg=il&&(()=>{let e=!1;const t=new Request(gn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),ol=64*1024,ha=il&&!!(()=>{try{return de.isReadableStream(new Response("").body)}catch{}})(),ro={stream:ha&&(e=>e.body)};no&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ro[t]&&(ro[t]=de.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new He(`Response type '${t}' is not supported`,He.ERR_NOT_SUPPORT,r)})})})(new Response);const hg=async e=>{if(e==null)return 0;if(de.isBlob(e))return e.size;if(de.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(de.isArrayBufferView(e))return e.byteLength;if(de.isURLSearchParams(e)&&(e=e+""),de.isString(e))return(await da(e)).byteLength},pg=async(e,t)=>{const n=de.toFiniteNumber(e.getContentLength());return n??hg(t)},pa={http:jp,xhr:ug,fetch:no&&(async e=>{let{url:t,method:n,data:r,signal:i,cancelToken:a,timeout:s,onDownloadProgress:c,onUploadProgress:h,responseType:g,headers:d,withCredentials:E="same-origin",fetchOptions:u}=tl(e);g=g?(g+"").toLowerCase():"text";let[w,o]=i||a||s?lg([i,a],s):[],l,p;const f=()=>{!l&&setTimeout(()=>{w&&w.unsubscribe()}),l=!0};let m;try{if(h&&dg&&n!=="get"&&n!=="head"&&(m=await pg(d,r))!==0){let D=new Request(t,{method:"POST",body:r,duplex:"half"}),A;de.isFormData(r)&&(A=D.headers.get("content-type"))&&d.setContentType(A),D.body&&(r=nl(D.body,ol,rl(m,to(h)),null,da))}de.isString(E)||(E=E?"cors":"omit"),p=new Request(t,{...u,signal:w,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:r,duplex:"half",withCredentials:E});let b=await fetch(p);const C=ha&&(g==="stream"||g==="response");if(ha&&(c||C)){const D={};["status","statusText","headers"].forEach(N=>{D[N]=b[N]});const A=de.toFiniteNumber(b.headers.get("content-length"));b=new Response(nl(b.body,ol,c&&rl(A,to(c,!0)),C&&f,da),D)}g=g||"text";let S=await ro[de.findKey(ro,g)||"text"](b,e);return!C&&f(),o&&o(),await new Promise((D,A)=>{Zu(D,A,{data:S,headers:Xt.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:p})})}catch(b){throw f(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new He("Network Error",He.ERR_NETWORK,e,p),{cause:b.cause||b}):He.from(b,b&&b.code,e,p)}})};de.forEach(pa,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const al=e=>`- ${e}`,gg=e=>de.isFunction(e)||e===null||e===!1,sl={getAdapter:e=>{e=de.isArray(e)?e:[e];const{length:t}=e;let n,r;const i={};for(let a=0;a<t;a++){n=e[a];let s;if(r=n,!gg(n)&&(r=pa[(s=String(n)).toLowerCase()],r===void 0))throw new He(`Unknown adapter '${s}'`);if(r)break;i[s||"#"+a]=r}if(!r){const a=Object.entries(i).map(([c,h])=>`adapter ${c} `+(h===!1?"is not supported by the environment":"is not available in the build"));let s=t?a.length>1?`since :
33
+ `+a.map(al).join(`
34
+ `):" "+al(a[0]):"as no adapter specified";throw new He("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return r},adapters:pa};function ga(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new vr(null,e)}function ul(e){return ga(e),e.headers=Xt.from(e.headers),e.data=fa.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),sl.getAdapter(e.adapter||$r.adapter)(e).then(function(r){return ga(e),r.data=fa.call(e,e.transformResponse,r),r.headers=Xt.from(r.headers),r},function(r){return zu(r)||(ga(e),r&&r.response&&(r.response.data=fa.call(e,e.transformResponse,r.response),r.response.headers=Xt.from(r.response.headers))),Promise.reject(r)})}const ll="1.7.1",ma={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ma[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const cl={};ma.transitional=function(t,n,r){function i(a,s){return"[Axios v"+ll+"] Transitional option '"+a+"'"+s+(r?". "+r:"")}return(a,s,c)=>{if(t===!1)throw new He(i(s," has been removed"+(n?" in "+n:"")),He.ERR_DEPRECATED);return n&&!cl[s]&&(cl[s]=!0,console.warn(i(s," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,s,c):!0}};function mg(e,t,n){if(typeof e!="object")throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const a=r[i],s=t[a];if(s){const c=e[a],h=c===void 0||s(c,a,e);if(h!==!0)throw new He("option "+a+" must be "+h,He.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new He("Unknown option "+a,He.ERR_BAD_OPTION)}}const ya={assertOptions:mg,validators:ma},Un=ya.validators;class rr{constructor(t){this.defaults=t,this.interceptors={request:new $u,response:new $u}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let i;Error.captureStackTrace?Error.captureStackTrace(i={}):i=new Error;const a=i.stack?i.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
35
+ `+a):r.stack=a}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=nr(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:a}=n;r!==void 0&&ya.assertOptions(r,{silentJSONParsing:Un.transitional(Un.boolean),forcedJSONParsing:Un.transitional(Un.boolean),clarifyTimeoutError:Un.transitional(Un.boolean)},!1),i!=null&&(de.isFunction(i)?n.paramsSerializer={serialize:i}:ya.assertOptions(i,{encode:Un.function,serialize:Un.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&de.merge(a.common,a[n.method]);a&&de.forEach(["delete","get","head","post","put","patch","common"],o=>{delete a[o]}),n.headers=Xt.concat(s,a);const c=[];let h=!0;this.interceptors.request.forEach(function(l){typeof l.runWhen=="function"&&l.runWhen(n)===!1||(h=h&&l.synchronous,c.unshift(l.fulfilled,l.rejected))});const g=[];this.interceptors.response.forEach(function(l){g.push(l.fulfilled,l.rejected)});let d,E=0,u;if(!h){const o=[ul.bind(this),void 0];for(o.unshift.apply(o,c),o.push.apply(o,g),u=o.length,d=Promise.resolve(n);E<u;)d=d.then(o[E++],o[E++]);return d}u=c.length;let w=n;for(E=0;E<u;){const o=c[E++],l=c[E++];try{w=o(w)}catch(p){l.call(this,p);break}}try{d=ul.call(this,w)}catch(o){return Promise.reject(o)}for(E=0,u=g.length;E<u;)d=d.then(g[E++],g[E++]);return d}getUri(t){t=nr(this.defaults,t);const n=Xu(t.baseURL,t.url);return Qu(n,t.params,t.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(t){rr.prototype[t]=function(n,r){return this.request(nr(r||{},{method:t,url:n,data:(r||{}).data}))}}),de.forEach(["post","put","patch"],function(t){function n(r){return function(a,s,c){return this.request(nr(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}rr.prototype[t]=n(),rr.prototype[t+"Form"]=n(!0)});class va{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(i=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](i);r._listeners=null}),this.promise.then=i=>{let a;const s=new Promise(c=>{r.subscribe(c),a=c}).then(i);return s.cancel=function(){r.unsubscribe(a)},s},t(function(a,s,c){r.reason||(r.reason=new vr(a,s,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new va(function(i){t=i}),cancel:t}}}function yg(e){return function(n){return e.apply(null,n)}}function vg(e){return de.isObject(e)&&e.isAxiosError===!0}const ba={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ba).forEach(([e,t])=>{ba[t]=e});function fl(e){const t=new rr(e),n=Ru(rr.prototype.request,t);return de.extend(n,rr.prototype,t,{allOwnKeys:!0}),de.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return fl(nr(e,i))},n}const kt=fl($r);kt.Axios=rr,kt.CanceledError=vr,kt.CancelToken=va,kt.isCancel=zu,kt.VERSION=ll,kt.toFormData=Xi,kt.AxiosError=He,kt.Cancel=kt.CanceledError,kt.all=function(t){return Promise.all(t)},kt.spread=yg,kt.isAxiosError=vg,kt.mergeConfig=nr,kt.AxiosHeaders=Xt,kt.formToJSON=e=>Wu(de.isHTMLForm(e)?new FormData(e):e),kt.getAdapter=sl.getAdapter,kt.HttpStatusCode=ba,kt.default=kt;const bg=e=>{var n,r,i,a;const t=(n=e.response)==null?void 0:n.status;if(t&&t!==401){const s=(r=e.response)==null?void 0:r.data;console.table(s);const c=(i=e.response)==null?void 0:i.data.errors,h=T.jsxs("div",{children:[T.jsx("p",{children:(a=e.response)==null?void 0:a.data.message}),c&&Object.keys(c).map(g=>c[g].map(d=>T.jsx("li",{children:d},d)))]});Xe.error(h)}return Promise.reject(e)};class wg{constructor(){gh(this,"instance",kt.create())}initialize(t,n){this.instance=kt.create({baseURL:n||"https://api.piggy.eu",headers:{Authorization:`Bearer ${t}`}}),this.instance.interceptors.response.use(void 0,bg)}}const xt=new wg;var wa={exports:{}},Ea={};/**
36
36
  * @license React
37
37
  * use-sync-external-store-shim.production.min.js
38
38
  *
@@ -40,7 +40,7 @@ React keys must be passed directly to JSX without using spread:
40
40
  *
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
- */var Qs;function nh(){if(Qs)return wi;Qs=1;var e=H;function t(x,l){return x===l&&(x!==0||1/x===1/l)||x!==x&&l!==l}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function u(x,l){var v=l(),i=r({inst:{value:v,getSnapshot:l}}),c=i[0].inst,p=i[1];return a(function(){c.value=v,c.getSnapshot=l,f(c)&&p({inst:c})},[x,v,l]),o(function(){return f(c)&&p({inst:c}),x(function(){f(c)&&p({inst:c})})},[x]),s(v),v}function f(x){var l=x.getSnapshot;x=x.value;try{var v=l();return!n(x,v)}catch{return!0}}function g(x,l){return l()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:u;return wi.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,wi}var xi={};/**
43
+ */var dl;function Eg(){if(dl)return Ea;dl=1;var e=k;function t(E,u){return E===u&&(E!==0||1/E===1/u)||E!==E&&u!==u}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function c(E,u){var w=u(),o=r({inst:{value:w,getSnapshot:u}}),l=o[0].inst,p=o[1];return a(function(){l.value=w,l.getSnapshot=u,h(l)&&p({inst:l})},[E,w,u]),i(function(){return h(l)&&p({inst:l}),E(function(){h(l)&&p({inst:l})})},[E]),s(w),w}function h(E){var u=E.getSnapshot;E=E.value;try{var w=u();return!n(E,w)}catch{return!0}}function g(E,u){return u()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?g:c;return Ea.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Ea}var xa={};/**
44
44
  * @license React
45
45
  * use-sync-external-store-shim.development.js
46
46
  *
@@ -48,11 +48,11 @@ React keys must be passed directly to JSX without using spread:
48
48
  *
49
49
  * This source code is licensed under the MIT license found in the
50
50
  * LICENSE file in the root directory of this source tree.
51
- */var Zs;function rh(){return Zs||(Zs=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=H,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(y){{for(var b=arguments.length,C=new Array(b>1?b-1:0),S=1;S<b;S++)C[S-1]=arguments[S];r("error",y,C)}}function r(y,b,C){{var S=t.ReactDebugCurrentFrame,k=S.getStackAddendum();k!==""&&(b+="%s",C=C.concat([k]));var B=C.map(function(O){return String(O)});B.unshift("Warning: "+b),Function.prototype.apply.call(console[y],console,B)}}function o(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&b!==b}var a=typeof Object.is=="function"?Object.is:o,s=e.useState,u=e.useEffect,f=e.useLayoutEffect,g=e.useDebugValue,h=!1,x=!1;function l(y,b,C){h||e.startTransition!==void 0&&(h=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var S=b();if(!x){var k=b();a(S,k)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),x=!0)}var B=s({inst:{value:S,getSnapshot:b}}),O=B[0].inst,j=B[1];return f(function(){O.value=S,O.getSnapshot=b,v(O)&&j({inst:O})},[y,S,b]),u(function(){v(O)&&j({inst:O});var I=function(){v(O)&&j({inst:O})};return y(I)},[y]),g(S),S}function v(y){var b=y.getSnapshot,C=y.value;try{var S=b();return!a(C,S)}catch{return!0}}function i(y,b,C){return b()}var c=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",p=!c,d=p?i:l,m=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d;xi.useSyncExternalStore=m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),xi}process.env.NODE_ENV==="production"?bi.exports=nh():bi.exports=rh();var oh=bi.exports;const un=()=>{},Ct=un(),ki=Object,$e=e=>e===Ct,Xt=e=>typeof e=="function",dn=(e,t)=>({...e,...t}),ih=e=>Xt(e.then),po=new WeakMap;let ah=0;const cr=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let o,a;if(ki(e)===e&&!r&&n!=RegExp){if(o=po.get(e),o)return o;if(o=++ah+"~",po.set(e,o),n==Array){for(o="@",a=0;a<e.length;a++)o+=cr(e[a])+",";po.set(e,o)}if(n==ki){o="#";const s=ki.keys(e).sort();for(;!$e(a=s.pop());)$e(e[a])||(o+=a+":"+cr(e[a])+",");po.set(e,o)}}else o=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return o},en=new WeakMap,Ci={},mo={},Ei="undefined",go=typeof window!=Ei,Si=typeof document!=Ei,sh=()=>go&&typeof window.requestAnimationFrame!=Ei,el=(e,t)=>{const n=en.get(e);return[()=>!$e(t)&&e.get(t)||Ci,r=>{if(!$e(t)){const o=e.get(t);t in mo||(mo[t]=o),n[5](t,dn(o,r),o||Ci)}},n[6],()=>!$e(t)&&t in mo?mo[t]:!$e(t)&&e.get(t)||Ci]};let Pi=!0;const lh=()=>Pi,[Bi,Oi]=go&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[un,un],ch=()=>{const e=Si&&document.visibilityState;return $e(e)||e!=="hidden"},uh=e=>(Si&&document.addEventListener("visibilitychange",e),Bi("focus",e),()=>{Si&&document.removeEventListener("visibilitychange",e),Oi("focus",e)}),dh=e=>{const t=()=>{Pi=!0,e()},n=()=>{Pi=!1};return Bi("online",t),Bi("offline",n),()=>{Oi("online",t),Oi("offline",n)}},fh={isOnline:lh,isVisible:ch},hh={initFocus:uh,initReconnect:dh},tl=!H.useId,ur=!go||"Deno"in window,ph=e=>sh()?window.requestAnimationFrame(e):setTimeout(e,1),_i=ur?H.useEffect:H.useLayoutEffect,Ri=typeof navigator<"u"&&navigator.connection,nl=!ur&&Ri&&(["slow-2g","2g"].includes(Ri.effectiveType)||Ri.saveData),Ti=e=>{if(Xt(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?cr(e):"",[e,t]};let mh=0;const Ni=()=>++mh,rl=0,ol=1,il=2;var dr={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:rl,MUTATE_EVENT:il,RECONNECT_EVENT:ol};async function al(...e){const[t,n,r,o]=e,a=dn({populateCache:!0,throwOnError:!0},typeof o=="boolean"?{revalidate:o}:o||{});let s=a.populateCache;const u=a.rollbackOnError;let f=a.optimisticData;const g=l=>typeof u=="function"?u(l):u!==!1,h=a.throwOnError;if(Xt(n)){const l=n,v=[],i=t.keys();for(const c of i)!/^\$(inf|sub)\$/.test(c)&&l(t.get(c)._k)&&v.push(c);return Promise.all(v.map(x))}return x(n);async function x(l){const[v]=Ti(l);if(!v)return;const[i,c]=el(t,v),[p,d,m,y]=en.get(t),b=()=>{const M=p[v];return(Xt(a.revalidate)?a.revalidate(i().data,l):a.revalidate!==!1)&&(delete m[v],delete y[v],M&&M[0])?M[0](il).then(()=>i().data):i().data};if(e.length<3)return b();let C=r,S;const k=Ni();d[v]=[k,0];const B=!$e(f),O=i(),j=O.data,I=O._c,D=$e(I)?j:I;if(B&&(f=Xt(f)?f(D,j):f,c({data:f,_c:D})),Xt(C))try{C=C(D)}catch(M){S=M}if(C&&ih(C))if(C=await C.catch(M=>{S=M}),k!==d[v][0]){if(S)throw S;return C}else S&&B&&g(S)&&(s=!0,c({data:D,_c:Ct}));if(s&&!S)if(Xt(s)){const M=s(C,D);c({data:M,error:Ct,_c:Ct})}else c({data:C,error:Ct,_c:Ct});if(d[v][1]=Ni(),Promise.resolve(b()).then(()=>{c({_c:Ct})}),S){if(h)throw S;return}return C}}const sl=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},gh=(e,t)=>{if(!en.has(e)){const n=dn(hh,t),r={},o=al.bind(Ct,e);let a=un;const s={},u=(h,x)=>{const l=s[h]||[];return s[h]=l,l.push(x),()=>l.splice(l.indexOf(x),1)},f=(h,x,l)=>{e.set(h,x);const v=s[h];if(v)for(const i of v)i(x,l)},g=()=>{if(!en.has(e)&&(en.set(e,[r,{},{},{},o,f,u]),!ur)){const h=n.initFocus(setTimeout.bind(Ct,sl.bind(Ct,r,rl))),x=n.initReconnect(setTimeout.bind(Ct,sl.bind(Ct,r,ol)));a=()=>{h&&h(),x&&x(),en.delete(e)}}};return g(),[e,o,g,a]}return[e,en.get(e)[4]]},yh=(e,t,n,r,o)=>{const a=n.errorRetryCount,s=o.retryCount,u=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!$e(a)&&s>a||setTimeout(r,u,o)},vh=(e,t)=>cr(e)==cr(t),[ll,bh]=gh(new Map),wh=dn({onLoadingSlow:un,onSuccess:un,onError:un,onErrorRetry:yh,onDiscarded:un,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:nl?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:nl?5e3:3e3,compare:vh,isPaused:()=>!1,cache:ll,mutate:bh,fallback:{}},fh),xh=(e,t)=>{const n=dn(e,t);if(t){const{use:r,fallback:o}=e,{use:a,fallback:s}=t;r&&a&&(n.use=r.concat(a)),o&&s&&(n.fallback=dn(o,s))}return n},kh=H.createContext({}),Ch="$inf$",cl=go&&window.__SWR_DEVTOOLS_USE__,Eh=cl?window.__SWR_DEVTOOLS_USE__:[],Sh=()=>{cl&&(window.__SWR_DEVTOOLS_REACT__=H)},Ph=e=>Xt(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Bh=()=>dn(wh,H.useContext(kh)),Oh=e=>(t,n,r)=>e(t,n&&((...a)=>{const[s]=Ti(t),[,,,u]=en.get(ll);if(s.startsWith(Ch))return n(...a);const f=u[s];return $e(f)?n(...a):(delete u[s],f)}),r),_h=Eh.concat(Oh),Rh=e=>function(...n){const r=Bh(),[o,a,s]=Ph(n),u=xh(r,s);let f=e;const{use:g}=u,h=(g||[]).concat(_h);for(let x=h.length;x--;)f=h[x](f);return f(o,a||u.fetcher||null,u)},Th=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const o=r.indexOf(n);o>=0&&(r[o]=r[r.length-1],r.pop())}};Sh();const ul=H.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),ji={dedupe:!0},Nh=Rh((e,t,n)=>{const{cache:r,compare:o,suspense:a,fallbackData:s,revalidateOnMount:u,revalidateIfStale:f,refreshInterval:g,refreshWhenHidden:h,refreshWhenOffline:x,keepPreviousData:l}=n,[v,i,c,p]=en.get(r),[d,m]=Ti(e),y=H.useRef(!1),b=H.useRef(!1),C=H.useRef(d),S=H.useRef(t),k=H.useRef(n),B=()=>k.current,O=()=>B().isVisible()&&B().isOnline(),[j,I,D,M]=el(r,d),$=H.useRef({}).current,P=$e(s)?n.fallback[d]:s,L=(R,W)=>{for(const G in $){const X=G;if(X==="data"){if(!o(R[X],W[X])&&(!$e(R[X])||!o(de,W[X])))return!1}else if(W[X]!==R[X])return!1}return!0},q=H.useMemo(()=>{const R=!d||!t?!1:$e(u)?B().isPaused()||a?!1:$e(f)?!0:f:u,W=re=>{const oe=dn(re);return delete oe._k,R?{isValidating:!0,isLoading:!0,...oe}:oe},G=j(),X=M(),F=W(G),ce=G===X?F:W(X);let fe=F;return[()=>{const re=W(j());return L(re,fe)?(fe.data=re.data,fe.isLoading=re.isLoading,fe.isValidating=re.isValidating,fe.error=re.error,fe):(fe=re,re)},()=>ce]},[r,d]),K=oh.useSyncExternalStore(H.useCallback(R=>D(d,(W,G)=>{L(G,W)||R()}),[r,d]),q[0],q[1]),Q=!y.current,Z=v[d]&&v[d].length>0,ee=K.data,ue=$e(ee)?P:ee,ne=K.error,me=H.useRef(ue),de=l?$e(ee)?me.current:ee:ue,V=Z&&!$e(ne)?!1:Q&&!$e(u)?u:B().isPaused()?!1:a?$e(ue)?!1:f:$e(ue)||f,U=!!(d&&t&&Q&&V),J=$e(K.isValidating)?U:K.isValidating,w=$e(K.isLoading)?U:K.isLoading,_=H.useCallback(async R=>{const W=S.current;if(!d||!W||b.current||B().isPaused())return!1;let G,X,F=!0;const ce=R||{},fe=!c[d]||!ce.dedupe,re=()=>tl?!b.current&&d===C.current&&y.current:d===C.current,oe={isValidating:!1,isLoading:!1},ge=()=>{I(oe)},ae=()=>{const Ce=c[d];Ce&&Ce[1]===X&&delete c[d]},be={isValidating:!0};$e(j().data)&&(be.isLoading=!0);try{if(fe&&(I(be),n.loadingTimeout&&$e(j().data)&&setTimeout(()=>{F&&re()&&B().onLoadingSlow(d,n)},n.loadingTimeout),c[d]=[W(m),Ni()]),[G,X]=c[d],G=await G,fe&&setTimeout(ae,n.dedupingInterval),!c[d]||c[d][1]!==X)return fe&&re()&&B().onDiscarded(d),!1;oe.error=Ct;const Ce=i[d];if(!$e(Ce)&&(X<=Ce[0]||X<=Ce[1]||Ce[1]===0))return ge(),fe&&re()&&B().onDiscarded(d),!1;const Fe=j().data;oe.data=o(Fe,G)?Fe:G,fe&&re()&&B().onSuccess(G,d,n)}catch(Ce){ae();const Fe=B(),{shouldRetryOnError:Ae}=Fe;Fe.isPaused()||(oe.error=Ce,fe&&re()&&(Fe.onError(Ce,d,Fe),(Ae===!0||Xt(Ae)&&Ae(Ce))&&(!B().revalidateOnFocus||!B().revalidateOnReconnect||O())&&Fe.onErrorRetry(Ce,d,Fe,Ve=>{const ze=v[d];ze&&ze[0]&&ze[0](dr.ERROR_REVALIDATE_EVENT,Ve)},{retryCount:(ce.retryCount||0)+1,dedupe:!0})))}return F=!1,ge(),!0},[d,r]),N=H.useCallback((...R)=>al(r,C.current,...R),[]);if(_i(()=>{S.current=t,k.current=n,$e(ee)||(me.current=ee)}),_i(()=>{if(!d)return;const R=_.bind(Ct,ji);let W=0;const X=Th(d,v,(F,ce={})=>{if(F==dr.FOCUS_EVENT){const fe=Date.now();B().revalidateOnFocus&&fe>W&&O()&&(W=fe+B().focusThrottleInterval,R())}else if(F==dr.RECONNECT_EVENT)B().revalidateOnReconnect&&O()&&R();else{if(F==dr.MUTATE_EVENT)return _();if(F==dr.ERROR_REVALIDATE_EVENT)return _(ce)}});return b.current=!1,C.current=d,y.current=!0,I({_k:m}),V&&($e(ue)||ur?R():ph(R)),()=>{b.current=!0,X()}},[d]),_i(()=>{let R;function W(){const X=Xt(g)?g(j().data):g;X&&R!==-1&&(R=setTimeout(G,X))}function G(){!j().error&&(h||B().isVisible())&&(x||B().isOnline())?_(ji).then(W):W()}return W(),()=>{R&&(clearTimeout(R),R=-1)}},[g,h,x,d]),H.useDebugValue(de),a&&$e(ue)&&d){if(!tl&&ur)throw new Error("Fallback data is required when using suspense in SSR.");S.current=t,k.current=n,b.current=!1;const R=p[d];if(!$e(R)){const W=N(R);ul(W)}if($e(ne)){const W=_(ji);$e(de)||(W.status="fulfilled",W.value=!0),ul(W)}else throw ne}return{mutate:N,get data(){return $.data=!0,de},get error(){return $.error=!0,ne},get isValidating(){return $.isValidating=!0,J},get isLoading(){return $.isLoading=!0,w}}}),fn=(e,t)=>{const n=f=>tt.instance.get(f,{params:t}),{data:r,error:o,isLoading:a,isValidating:s,mutate:u}=Nh(e,n,{shouldRetryOnError:!1,revalidateIfStale:!1});return{data:r,error:o,isLoading:a,isValidating:s,mutate:u}},Je=(e="")=>`/api/v1/portal-sessions/${localStorage.getItem("portal_session_uuid")}/${e}`,dl="contact-attributes",fl={get:()=>tt.instance.get(Je(dl)),update:e=>tt.instance.put(Je(dl),e)},fr="contacts",Ai={get:(e,t)=>tt.instance.get(Je(fr),{params:{contact_uuid:e,email:t}}),exists:e=>tt.instance.get(`${Je(fr)}/exists`,{params:{email:e}}),create:e=>tt.instance.post(`${Je(fr)}`,{email:e}),linkIdentifier:(e,t)=>tt.instance.post(`${Je(fr)}/link-identifier`,{contact_identifier_value:e,email:t})},yo=(e,t)=>{const{data:n,error:r,isLoading:o,isValidating:a,mutate:s}=fn(Je(fr),{contact_uuid:e,email:t});return{contact:n==null?void 0:n.data.data,data:n,error:r,isLoading:o,isValidating:a,mutate:s}},jh="credit-receptions",Ah={create:e=>tt.instance.post(`${Je(jh)}/create`,e)},Li="giftcards",Ii={get:e=>tt.instance.get(`${Je(Li)}/${e}`),transaction:(e,t)=>tt.instance.post(`${Je(Li)}/transaction`,{uuid:e,amount_in_cents:t})},hl=e=>{const{data:t,error:n,isLoading:r,isValidating:o,mutate:a}=fn(Je(Li)+`/${e}`);return{giftcard:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:o,mutate:a}},pl=H.createContext(null),ml=({children:e,apiKey:t,shopUuid:n,sessionUuid:r,onContactLink:o,onClaimReward:a,onRedeemVoucher:s,onUseGiftcard:u,host:f})=>(localStorage.setItem("portal_session_uuid",r),E.jsx(pl.Provider,{value:{apiKey:t,shopUuid:n,sessionUuid:r,onContactLink:o,onClaimReward:a,onRedeemVoucher:s,onUseGiftcard:u,host:f},children:e})),kn=()=>{const e=H.useContext(pl);if(e===null)throw"Only use 'useSession' within a SessionProvider";return e},Di="/api/v1/portal-sessions/",vo={create:e=>tt.instance.post(Di,e),setContact:(e,t)=>tt.instance.put(Di+e,t)},bt=()=>{const{sessionUuid:e}=kn(),{data:t,error:n,isLoading:r,isValidating:o,mutate:a}=fn(Di+e);return{session:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:o,mutate:a}};var Mt=(e=>(e.HAND_SCANNER="hand_scanner",e.CAMERA="camera",e))(Mt||{});const gl="prepaid",Lh={transaction:e=>tt.instance.post(`${Je(gl)}/transaction`,e)},Ih=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Je(gl));return{balance:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}},Mi="rewards",Dh={get:e=>tt.instance.get(`${Je(Mi)}/${e}`),claim:e=>tt.instance.post(`${Je(Mi)}/claim/${e}`)},Mh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Je(Mi));return{rewards:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}},yl="subscriptions",Fh={update:e=>tt.instance.put(Je(yl),e)},Uh=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Je(yl));return{subscriptions:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}};var hr=(e=>(e.SUBSCRIBED="SUBSCRIBED",e.UNSUBSCRIBED="UNSUBSCRIBED",e.PENDING_CONFIRMATION="PENDING_CONFIRMATION",e))(hr||{}),In=(e=>(e.OPT_OUT="OPT_OUT",e.OPT_IN="OPT_IN",e.DOUBLE_OPT_IN="DOUBLE_OPT_IN",e.FUNCTIONAL="FUNCTIONAL",e))(In||{});const bo="vouchers",Fi={get:e=>tt.instance.get(`${Je(bo)}/${e}`),redeemById:e=>tt.instance.post(`${Je(bo)}/redeem/${e}`),redeemByCode:e=>tt.instance.post(`${Je(bo)}/redeem`,{code:e})},$h=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Je(bo));return{rewards:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}};var vl=(e=>(e.INACTIVE="INACTIVE",e.ACTIVE="ACTIVE",e.EXPIRED="EXPIRED",e.LOCKED="LOCKED",e.REDEEMED="REDEEMED",e.DEACTIVATED="DEACTIVATED",e))(vl||{}),bl={exports:{}};/*!
51
+ */var hl;function xg(){return hl||(hl=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=k,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(b){{for(var C=arguments.length,S=new Array(C>1?C-1:0),D=1;D<C;D++)S[D-1]=arguments[D];r("error",b,S)}}function r(b,C,S){{var D=t.ReactDebugCurrentFrame,A=D.getStackAddendum();A!==""&&(C+="%s",S=S.concat([A]));var N=S.map(function(I){return String(I)});N.unshift("Warning: "+C),Function.prototype.apply.call(console[b],console,N)}}function i(b,C){return b===C&&(b!==0||1/b===1/C)||b!==b&&C!==C}var a=typeof Object.is=="function"?Object.is:i,s=e.useState,c=e.useEffect,h=e.useLayoutEffect,g=e.useDebugValue,d=!1,E=!1;function u(b,C,S){d||e.startTransition!==void 0&&(d=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var D=C();if(!E){var A=C();a(D,A)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),E=!0)}var N=s({inst:{value:D,getSnapshot:C}}),I=N[0].inst,_=N[1];return h(function(){I.value=D,I.getSnapshot=C,w(I)&&_({inst:I})},[b,D,C]),c(function(){w(I)&&_({inst:I});var Q=function(){w(I)&&_({inst:I})};return b(Q)},[b]),g(D),D}function w(b){var C=b.getSnapshot,S=b.value;try{var D=C();return!a(S,D)}catch{return!0}}function o(b,C,S){return C()}var l=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",p=!l,f=p?o:u,m=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f;xa.useSyncExternalStore=m,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),xa}process.env.NODE_ENV==="production"?wa.exports=Eg():wa.exports=xg();var Cg=wa.exports;const Gn=()=>{},en=Gn(),Ca=Object,st=e=>e===en,On=e=>typeof e=="function",Yn=(e,t)=>({...e,...t}),Ag=e=>On(e.then),io=new WeakMap;let Sg=0;const Wr=e=>{const t=typeof e,n=e&&e.constructor,r=n==Date;let i,a;if(Ca(e)===e&&!r&&n!=RegExp){if(i=io.get(e),i)return i;if(i=++Sg+"~",io.set(e,i),n==Array){for(i="@",a=0;a<e.length;a++)i+=Wr(e[a])+",";io.set(e,i)}if(n==Ca){i="#";const s=Ca.keys(e).sort();for(;!st(a=s.pop());)st(e[a])||(i+=a+":"+Wr(e[a])+",");io.set(e,i)}}else i=r?e.toJSON():t=="symbol"?e.toString():t=="string"?JSON.stringify(e):""+e;return i},Mn=new WeakMap,Aa={},oo={},Sa="undefined",ao=typeof window!=Sa,Ta=typeof document!=Sa,Tg=()=>ao&&typeof window.requestAnimationFrame!=Sa,pl=(e,t)=>{const n=Mn.get(e);return[()=>!st(t)&&e.get(t)||Aa,r=>{if(!st(t)){const i=e.get(t);t in oo||(oo[t]=i),n[5](t,Yn(i,r),i||Aa)}},n[6],()=>!st(t)&&t in oo?oo[t]:!st(t)&&e.get(t)||Aa]};let Oa=!0;const Og=()=>Oa,[Da,Ia]=ao&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[Gn,Gn],Dg=()=>{const e=Ta&&document.visibilityState;return st(e)||e!=="hidden"},Ig=e=>(Ta&&document.addEventListener("visibilitychange",e),Da("focus",e),()=>{Ta&&document.removeEventListener("visibilitychange",e),Ia("focus",e)}),Rg=e=>{const t=()=>{Oa=!0,e()},n=()=>{Oa=!1};return Da("online",t),Da("offline",n),()=>{Ia("online",t),Ia("offline",n)}},Ng={isOnline:Og,isVisible:Dg},Pg={initFocus:Ig,initReconnect:Rg},gl=!k.useId,Jr=!ao||"Deno"in window,Mg=e=>Tg()?window.requestAnimationFrame(e):setTimeout(e,1),Ra=Jr?k.useEffect:k.useLayoutEffect,Na=typeof navigator<"u"&&navigator.connection,ml=!Jr&&Na&&(["slow-2g","2g"].includes(Na.effectiveType)||Na.saveData),Pa=e=>{if(On(e))try{e=e()}catch{e=""}const t=e;return e=typeof e=="string"?e:(Array.isArray(e)?e.length:e)?Wr(e):"",[e,t]};let Bg=0;const Ma=()=>++Bg,yl=0,vl=1,bl=2;var zr={__proto__:null,ERROR_REVALIDATE_EVENT:3,FOCUS_EVENT:yl,MUTATE_EVENT:bl,RECONNECT_EVENT:vl};async function wl(...e){const[t,n,r,i]=e,a=Yn({populateCache:!0,throwOnError:!0},typeof i=="boolean"?{revalidate:i}:i||{});let s=a.populateCache;const c=a.rollbackOnError;let h=a.optimisticData;const g=u=>typeof c=="function"?c(u):c!==!1,d=a.throwOnError;if(On(n)){const u=n,w=[],o=t.keys();for(const l of o)!/^\$(inf|sub)\$/.test(l)&&u(t.get(l)._k)&&w.push(l);return Promise.all(w.map(E))}return E(n);async function E(u){const[w]=Pa(u);if(!w)return;const[o,l]=pl(t,w),[p,f,m,b]=Mn.get(t),C=()=>{const V=p[w];return(On(a.revalidate)?a.revalidate(o().data,u):a.revalidate!==!1)&&(delete m[w],delete b[w],V&&V[0])?V[0](bl).then(()=>o().data):o().data};if(e.length<3)return C();let S=r,D;const A=Ma();f[w]=[A,0];const N=!st(h),I=o(),_=I.data,Q=I._c,$=st(Q)?_:Q;if(N&&(h=On(h)?h($,_):h,l({data:h,_c:$})),On(S))try{S=S($)}catch(V){D=V}if(S&&Ag(S))if(S=await S.catch(V=>{D=V}),A!==f[w][0]){if(D)throw D;return S}else D&&N&&g(D)&&(s=!0,l({data:$,_c:en}));if(s&&!D)if(On(s)){const V=s(S,$);l({data:V,error:en,_c:en})}else l({data:S,error:en,_c:en});if(f[w][1]=Ma(),Promise.resolve(C()).then(()=>{l({_c:en})}),D){if(d)throw D;return}return S}}const El=(e,t)=>{for(const n in e)e[n][0]&&e[n][0](t)},kg=(e,t)=>{if(!Mn.has(e)){const n=Yn(Pg,t),r={},i=wl.bind(en,e);let a=Gn;const s={},c=(d,E)=>{const u=s[d]||[];return s[d]=u,u.push(E),()=>u.splice(u.indexOf(E),1)},h=(d,E,u)=>{e.set(d,E);const w=s[d];if(w)for(const o of w)o(E,u)},g=()=>{if(!Mn.has(e)&&(Mn.set(e,[r,{},{},{},i,h,c]),!Jr)){const d=n.initFocus(setTimeout.bind(en,El.bind(en,r,yl))),E=n.initReconnect(setTimeout.bind(en,El.bind(en,r,vl)));a=()=>{d&&d(),E&&E(),Mn.delete(e)}}};return g(),[e,i,g,a]}return[e,Mn.get(e)[4]]},Fg=(e,t,n,r,i)=>{const a=n.errorRetryCount,s=i.retryCount,c=~~((Math.random()+.5)*(1<<(s<8?s:8)))*n.errorRetryInterval;!st(a)&&s>a||setTimeout(r,c,i)},jg=(e,t)=>Wr(e)==Wr(t),[xl,Lg]=kg(new Map),_g=Yn({onLoadingSlow:Gn,onSuccess:Gn,onError:Gn,onErrorRetry:Fg,onDiscarded:Gn,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:ml?1e4:5e3,focusThrottleInterval:5*1e3,dedupingInterval:2*1e3,loadingTimeout:ml?5e3:3e3,compare:jg,isPaused:()=>!1,cache:xl,mutate:Lg,fallback:{}},Ng),Vg=(e,t)=>{const n=Yn(e,t);if(t){const{use:r,fallback:i}=e,{use:a,fallback:s}=t;r&&a&&(n.use=r.concat(a)),i&&s&&(n.fallback=Yn(i,s))}return n},qg=k.createContext({}),Ug="$inf$",Cl=ao&&window.__SWR_DEVTOOLS_USE__,Gg=Cl?window.__SWR_DEVTOOLS_USE__:[],Yg=()=>{Cl&&(window.__SWR_DEVTOOLS_REACT__=k)},Kg=e=>On(e[1])?[e[0],e[1],e[2]||{}]:[e[0],null,(e[1]===null?e[2]:e[1])||{}],Qg=()=>Yn(_g,k.useContext(qg)),$g=e=>(t,n,r)=>e(t,n&&((...a)=>{const[s]=Pa(t),[,,,c]=Mn.get(xl);if(s.startsWith(Ug))return n(...a);const h=c[s];return st(h)?n(...a):(delete c[s],h)}),r),Hg=Gg.concat($g),Wg=e=>function(...n){const r=Qg(),[i,a,s]=Kg(n),c=Vg(r,s);let h=e;const{use:g}=c,d=(g||[]).concat(Hg);for(let E=d.length;E--;)h=d[E](h);return h(i,a||c.fetcher||null,c)},Jg=(e,t,n)=>{const r=t[e]||(t[e]=[]);return r.push(n),()=>{const i=r.indexOf(n);i>=0&&(r[i]=r[r.length-1],r.pop())}};Yg();const Al=k.use||(e=>{if(e.status==="pending")throw e;if(e.status==="fulfilled")return e.value;throw e.status==="rejected"?e.reason:(e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e)}),Ba={dedupe:!0},zg=Wg((e,t,n)=>{const{cache:r,compare:i,suspense:a,fallbackData:s,revalidateOnMount:c,revalidateIfStale:h,refreshInterval:g,refreshWhenHidden:d,refreshWhenOffline:E,keepPreviousData:u}=n,[w,o,l,p]=Mn.get(r),[f,m]=Pa(e),b=k.useRef(!1),C=k.useRef(!1),S=k.useRef(f),D=k.useRef(t),A=k.useRef(n),N=()=>A.current,I=()=>N().isVisible()&&N().isOnline(),[_,Q,$,V]=pl(r,f),K=k.useRef({}).current,R=st(s)?n.fallback[f]:s,U=(B,X)=>{for(const te in K){const ee=te;if(ee==="data"){if(!i(B[ee],X[ee])&&(!st(B[ee])||!i(ce,X[ee])))return!1}else if(X[ee]!==B[ee])return!1}return!0},W=k.useMemo(()=>{const B=!f||!t?!1:st(c)?N().isPaused()||a?!1:st(h)?!0:h:c,X=fe=>{const pe=Yn(fe);return delete pe._k,B?{isValidating:!0,isLoading:!0,...pe}:pe},te=_(),ee=V(),Y=X(te),ve=te===ee?Y:X(ee);let Ee=Y;return[()=>{const fe=X(_());return U(fe,Ee)?(Ee.data=fe.data,Ee.isLoading=fe.isLoading,Ee.isValidating=fe.isValidating,Ee.error=fe.error,Ee):(Ee=fe,fe)},()=>ve]},[r,f]),z=Cg.useSyncExternalStore(k.useCallback(B=>$(f,(X,te)=>{U(te,X)||B()}),[r,f]),W[0],W[1]),ne=!b.current,re=w[f]&&w[f].length>0,ae=z.data,ge=st(ae)?R:ae,le=z.error,xe=k.useRef(ge),ce=u?st(ae)?xe.current:ae:ge,q=re&&!st(le)?!1:ne&&!st(c)?c:N().isPaused()?!1:a?st(ge)?!1:h:st(ge)||h,G=!!(f&&t&&ne&&q),Z=st(z.isValidating)?G:z.isValidating,x=st(z.isLoading)?G:z.isLoading,M=k.useCallback(async B=>{const X=D.current;if(!f||!X||C.current||N().isPaused())return!1;let te,ee,Y=!0;const ve=B||{},Ee=!l[f]||!ve.dedupe,fe=()=>gl?!C.current&&f===S.current&&b.current:f===S.current,pe={isValidating:!1,isLoading:!1},Oe=()=>{Q(pe)},me=()=>{const Fe=l[f];Fe&&Fe[1]===ee&&delete l[f]},Ne={isValidating:!0};st(_().data)&&(Ne.isLoading=!0);try{if(Ee&&(Q(Ne),n.loadingTimeout&&st(_().data)&&setTimeout(()=>{Y&&fe()&&N().onLoadingSlow(f,n)},n.loadingTimeout),l[f]=[X(m),Ma()]),[te,ee]=l[f],te=await te,Ee&&setTimeout(me,n.dedupingInterval),!l[f]||l[f][1]!==ee)return Ee&&fe()&&N().onDiscarded(f),!1;pe.error=en;const Fe=o[f];if(!st(Fe)&&(ee<=Fe[0]||ee<=Fe[1]||Fe[1]===0))return Oe(),Ee&&fe()&&N().onDiscarded(f),!1;const ze=_().data;pe.data=i(ze,te)?ze:te,Ee&&fe()&&N().onSuccess(te,f,n)}catch(Fe){me();const ze=N(),{shouldRetryOnError:We}=ze;ze.isPaused()||(pe.error=Fe,Ee&&fe()&&(ze.onError(Fe,f,ze),(We===!0||On(We)&&We(Fe))&&(!N().revalidateOnFocus||!N().revalidateOnReconnect||I())&&ze.onErrorRetry(Fe,f,ze,nt=>{const ot=w[f];ot&&ot[0]&&ot[0](zr.ERROR_REVALIDATE_EVENT,nt)},{retryCount:(ve.retryCount||0)+1,dedupe:!0})))}return Y=!1,Oe(),!0},[f,r]),j=k.useCallback((...B)=>wl(r,S.current,...B),[]);if(Ra(()=>{D.current=t,A.current=n,st(ae)||(xe.current=ae)}),Ra(()=>{if(!f)return;const B=M.bind(en,Ba);let X=0;const ee=Jg(f,w,(Y,ve={})=>{if(Y==zr.FOCUS_EVENT){const Ee=Date.now();N().revalidateOnFocus&&Ee>X&&I()&&(X=Ee+N().focusThrottleInterval,B())}else if(Y==zr.RECONNECT_EVENT)N().revalidateOnReconnect&&I()&&B();else{if(Y==zr.MUTATE_EVENT)return M();if(Y==zr.ERROR_REVALIDATE_EVENT)return M(ve)}});return C.current=!1,S.current=f,b.current=!0,Q({_k:m}),q&&(st(ge)||Jr?B():Mg(B)),()=>{C.current=!0,ee()}},[f]),Ra(()=>{let B;function X(){const ee=On(g)?g(_().data):g;ee&&B!==-1&&(B=setTimeout(te,ee))}function te(){!_().error&&(d||N().isVisible())&&(E||N().isOnline())?M(Ba).then(X):X()}return X(),()=>{B&&(clearTimeout(B),B=-1)}},[g,d,E,f]),k.useDebugValue(ce),a&&st(ge)&&f){if(!gl&&Jr)throw new Error("Fallback data is required when using suspense in SSR.");D.current=t,A.current=n,C.current=!1;const B=p[f];if(!st(B)){const X=j(B);Al(X)}if(st(le)){const X=M(Ba);st(ce)||(X.status="fulfilled",X.value=!0),Al(X)}else throw le}return{mutate:j,get data(){return K.data=!0,ce},get error(){return K.error=!0,le},get isValidating(){return K.isValidating=!0,Z},get isLoading(){return K.isLoading=!0,x}}}),Kn=(e,t)=>{const n=h=>xt.instance.get(h,{params:t}),{data:r,error:i,isLoading:a,isValidating:s,mutate:c}=zg(e,n,{shouldRetryOnError:!1,revalidateIfStale:!1});return{data:r,error:i,isLoading:a,isValidating:s,mutate:c}},pt=(e="")=>`/api/v1/portal-sessions/${localStorage.getItem("portal_session_uuid")}/${e}`,Sl="contact-attributes",Tl={get:()=>xt.instance.get(pt(Sl)),update:e=>xt.instance.put(pt(Sl),e)},Zr="contacts",ka={get:(e,t)=>xt.instance.get(pt(Zr),{params:{contact_uuid:e,email:t}}),exists:e=>xt.instance.get(`${pt(Zr)}/exists`,{params:{email:e}}),create:e=>xt.instance.post(`${pt(Zr)}`,{email:e}),linkIdentifier:(e,t)=>xt.instance.post(`${pt(Zr)}/link-identifier`,{contact_identifier_value:e,email:t})},so=(e,t)=>{const{data:n,error:r,isLoading:i,isValidating:a,mutate:s}=Kn(pt(Zr),{contact_uuid:e,email:t});return{contact:n==null?void 0:n.data.data,data:n,error:r,isLoading:i,isValidating:a,mutate:s}},Zg="credit-receptions",Xg={create:e=>xt.instance.post(`${pt(Zg)}/create`,e)},Fa="giftcards",ja={get:e=>xt.instance.get(`${pt(Fa)}/${e}`),transaction:(e,t)=>xt.instance.post(`${pt(Fa)}/transaction`,{uuid:e,amount_in_cents:t})},Ol=e=>{const{data:t,error:n,isLoading:r,isValidating:i,mutate:a}=Kn(pt(Fa)+`/${e}`);return{giftcard:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:a}},Dl=k.createContext(null),Il=({children:e,apiKey:t,shopUuid:n,sessionUuid:r,onContactLink:i,onClaimReward:a,onRedeemVoucher:s,onUseGiftcard:c,host:h})=>(localStorage.setItem("portal_session_uuid",r),T.jsx(Dl.Provider,{value:{apiKey:t,shopUuid:n,sessionUuid:r,onContactLink:i,onClaimReward:a,onRedeemVoucher:s,onUseGiftcard:c,host:h},children:e})),ir=()=>{const e=k.useContext(Dl);if(e===null)throw"Only use 'useSession' within a SessionProvider";return e},La="/api/v1/portal-sessions/",uo={create:e=>xt.instance.post(La,e),setContact:(e,t)=>xt.instance.put(La+e,t)},Ht=()=>{const{sessionUuid:e}=ir(),{data:t,error:n,isLoading:r,isValidating:i,mutate:a}=Kn(La+e);return{session:t==null?void 0:t.data.data,data:t,error:n,isLoading:r,isValidating:i,mutate:a}};var mn=(e=>(e.HAND_SCANNER="hand_scanner",e.CAMERA="camera",e))(mn||{});const Rl="prepaid",em={transaction:e=>xt.instance.post(`${pt(Rl)}/transaction`,e)},tm=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=Kn(pt(Rl));return{balance:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}},_a="rewards",nm={get:e=>xt.instance.get(`${pt(_a)}/${e}`),claim:e=>xt.instance.post(`${pt(_a)}/claim/${e}`)},rm=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=Kn(pt(_a));return{rewards:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}},Nl="subscriptions",im={update:e=>xt.instance.put(pt(Nl),e)},om=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=Kn(pt(Nl));return{subscriptions:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}};var Xr=(e=>(e.SUBSCRIBED="SUBSCRIBED",e.UNSUBSCRIBED="UNSUBSCRIBED",e.PENDING_CONFIRMATION="PENDING_CONFIRMATION",e))(Xr||{}),br=(e=>(e.OPT_OUT="OPT_OUT",e.OPT_IN="OPT_IN",e.DOUBLE_OPT_IN="DOUBLE_OPT_IN",e.FUNCTIONAL="FUNCTIONAL",e))(br||{});const lo="vouchers",Va={get:e=>xt.instance.get(`${pt(lo)}/${e}`),redeemById:e=>xt.instance.post(`${pt(lo)}/redeem/${e}`),redeemByCode:e=>xt.instance.post(`${pt(lo)}/redeem`,{code:e})},am=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=Kn(pt(lo));return{rewards:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}};var Pl=(e=>(e.INACTIVE="INACTIVE",e.ACTIVE="ACTIVE",e.EXPIRED="EXPIRED",e.LOCKED="LOCKED",e.REDEEMED="REDEEMED",e.DEACTIVATED="DEACTIVATED",e))(Pl||{}),Ml={exports:{}};/*!
52
52
  Copyright (c) 2018 Jed Watson.
53
53
  Licensed under the MIT License (MIT), see
54
54
  http://jedwatson.github.io/classnames
55
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",s=0;s<arguments.length;s++){var u=arguments[s];u&&(a=o(a,r(u)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var u in a)t.call(a,u)&&a[u]&&(s=o(s,u));return s}function o(a,s){return s?a?a+" "+s:a+s:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(bl);var Vh=bl.exports;const pr=Xo(Vh);function Hh(e){return E.jsxs("svg",{...e,"aria-hidden":"true",role:"status",className:pr("inline h-5 w-5 animate-spin fill-[#E5E7EB]",e.className),viewBox:"0 0 100 101",fill:"red",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentFill"}),E.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]})}function Ye({label:e,...t}){const[n,r]=H.useState(!1),o=a=>{t.onClick&&!n&&(r(!0),Promise.resolve(t.onClick(a)).finally(()=>r(!1)))};return E.jsxs("button",{...t,disabled:t.disabled||n,onClick:o,className:"relative flex h-[40px] items-center justify-center rounded-lg border bg-primary-600 px-3 font-normal text-white hover:border-[#101028] hover:bg-primary-700 active:bg-primary-800 disabled:cursor-not-allowed disabled:border-gray-900/[.1] disabled:bg-gray-50 disabled:text-[#353454]",children:[E.jsx("p",{className:`text-sm ${n&&"opacity-0"}`,children:e}),n&&E.jsx(Hh,{className:"absolute"})]})}function qe({className:e,hidden:t,children:n,onClick:r,align:o,size:a="md",weight:s="light",render_as:u="p",dangerously_set_inner_html:f=!1}){const g=pr({"text-xs":a=="xs"},{"text-sm":a=="sm"},{"text-base":a=="md"},{"text-lg":a=="lg"},{"text-xl":a=="xl"},{"text-2xl":a=="2xl"},{"text-3xl":a=="3xl"},{"text-4xl":a=="4xl"},{"text-5xl":a=="5xl"}),h=pr({"font-thin":s=="thin"},{"font-extralight":s=="extralight"},{"font-light":s=="light"},{"font-normal":s=="normal"},{"font-medium":s=="medium"},{"font-semibold":s=="semibold"},{"font-bold":s=="bold"},{"font-extrabold":s=="extrabold"},{"font-black":s=="black"}),x=pr({"text-center":o=="center"},{"text-left":o=="left"},{"text-right":o=="right"}),l=pr(g,h,x,r?"hover:cursor-pointer hover:underline":"",e??"");return u=="label"?E.jsx("label",{hidden:t,className:l,dangerouslySetInnerHTML:f?{__html:n}:void 0,onClick:r,children:f?void 0:n}):u=="span"?E.jsx("span",{hidden:t,className:l,dangerouslySetInnerHTML:f?{__html:n}:void 0,onClick:r,children:f?void 0:n}):E.jsx("p",{hidden:t,className:l,dangerouslySetInnerHTML:f?{__html:n}:void 0,onClick:r,children:f?void 0:n})}function zh(e){const{onClick:t,elements:n}=e;return E.jsx("div",{className:"flex w-full cursor-pointer rounded-lg border border-gray-200 bg-white",children:n.map(r=>E.jsx("div",{onClick:()=>t(r.key),className:`grow border-r border-gray-200 p-2 first-of-type:rounded-l-lg last-of-type:rounded-r-lg last-of-type:border-r-0 ${r.active?"bg-primary-50":"bg-white"}`,children:E.jsx(qe,{className:"mx-2",align:"center",children:r.label})},r.label))})}function Ui(e){return E.jsx("div",{className:"relative mb-2 w-full border-b border-gray-100 pt-3",children:E.jsxs("div",{className:"pb-1 pl-1 pt-1",children:[E.jsx(qe,{weight:"normal",color:"text-gray-500",size:"xs",children:e.label}),E.jsx("div",{className:"min-h-[1.7rem]",children:e.children})]})})}function qh(e){return E.jsx(Ui,{label:e.label,children:E.jsx(qe,{weight:"extralight",children:e.value})})}function Kh(e){const t=n=>E.jsx("div",{className:"mt-1 flex w-fit rounded border border-primary-200 bg-primary-100 px-2 py-px",children:E.jsx(qe,{render_as:"span",size:"sm",weight:"normal",color:"text-primary-800",children:n.value})});return E.jsx(Ui,{label:e.label,children:Array.isArray(e.value)?E.jsx("div",{className:"flex max-w-full gap-1 overflow-x-scroll",children:e.value.map((n,r)=>E.jsx(t,{value:n},r))}):e.value&&E.jsx(t,{value:e.value})})}function Wh(e){switch(e){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;default:return!1}}function Gh(e){return E.jsx(Ui,{label:e.label,children:E.jsxs("div",{className:"flex items-center gap-2",children:[E.jsx("div",{className:`h-fit rounded-full p-1 ${e.underlying_value&&Wh(e.underlying_value)?"bg-green-500":"bg-red-600"}`}),E.jsx(qe,{children:e.value})]})})}function Xh(e){const{type:t,value:n,label:r,underlying_value:o}=e;return t==="select"||t=="multi_select"?E.jsx(Kh,{label:r,value:n}):t==="checkbox"?E.jsx(Gh,{label:r,value:n,underlying_value:o}):E.jsx(qh,{label:r,value:n})}function Jh(e){const{searchable:t,hide_label:n,...r}=e;return e.type==="select"?E.jsx(tp,{...r,onChange:(o,a)=>e.onChange&&e.onChange(o,a)}):e.type==="multi_select"?E.jsx(ep,{...r,onChange:(o,a)=>e.onChange&&e.onChange(o,a)}):E.jsx(Dn,{...r,onChange:(o,a)=>e.onChange&&e.onChange(o,a)})}var wl={exports:{}};/*!
55
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",s=0;s<arguments.length;s++){var c=arguments[s];c&&(a=i(a,r(c)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var c in a)t.call(a,c)&&a[c]&&(s=i(s,c));return s}function i(a,s){return s?a?a+" "+s:a+s:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ml);var sm=Ml.exports;const ei=zo(sm);function um(e){return T.jsxs("svg",{...e,"aria-hidden":"true",role:"status",className:ei("inline h-5 w-5 animate-spin fill-[#E5E7EB]",e.className),viewBox:"0 0 100 101",fill:"red",xmlns:"http://www.w3.org/2000/svg",children:[T.jsx("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentFill"}),T.jsx("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentColor"})]})}function gt({label:e,...t}){const[n,r]=k.useState(!1),i=a=>{t.onClick&&!n&&(r(!0),Promise.resolve(t.onClick(a)).finally(()=>r(!1)))};return T.jsxs("button",{...t,disabled:t.disabled||n,onClick:i,className:"relative flex h-[40px] items-center justify-center rounded-lg border bg-primary-600 px-3 font-normal text-white hover:border-[#101028] hover:bg-primary-700 active:bg-primary-800 disabled:cursor-not-allowed disabled:border-gray-900/[.1] disabled:bg-gray-50 disabled:text-[#353454]",children:[T.jsx("p",{className:`text-sm ${n&&"opacity-0"}`,children:e}),n&&T.jsx(um,{className:"absolute"})]})}function lt({className:e,hidden:t,children:n,onClick:r,align:i,size:a="md",weight:s="light",render_as:c="p",dangerously_set_inner_html:h=!1}){const g=ei({"text-xs":a=="xs"},{"text-sm":a=="sm"},{"text-base":a=="md"},{"text-lg":a=="lg"},{"text-xl":a=="xl"},{"text-2xl":a=="2xl"},{"text-3xl":a=="3xl"},{"text-4xl":a=="4xl"},{"text-5xl":a=="5xl"}),d=ei({"font-thin":s=="thin"},{"font-extralight":s=="extralight"},{"font-light":s=="light"},{"font-normal":s=="normal"},{"font-medium":s=="medium"},{"font-semibold":s=="semibold"},{"font-bold":s=="bold"},{"font-extrabold":s=="extrabold"},{"font-black":s=="black"}),E=ei({"text-center":i=="center"},{"text-left":i=="left"},{"text-right":i=="right"}),u=ei(g,d,E,r?"hover:cursor-pointer hover:underline":"",e??"");return c=="label"?T.jsx("label",{hidden:t,className:u,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n}):c=="span"?T.jsx("span",{hidden:t,className:u,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n}):T.jsx("p",{hidden:t,className:u,dangerouslySetInnerHTML:h?{__html:n}:void 0,onClick:r,children:h?void 0:n})}function lm(e){const{onClick:t,elements:n}=e;return T.jsx("div",{className:"flex w-full cursor-pointer rounded-lg border border-gray-200 bg-white",children:n.map(r=>T.jsx("div",{onClick:()=>t(r.key),className:`grow border-r border-gray-200 p-2 first-of-type:rounded-l-lg last-of-type:rounded-r-lg last-of-type:border-r-0 ${r.active?"bg-primary-50":"bg-white"}`,children:T.jsx(lt,{className:"mx-2",align:"center",children:r.label})},r.label))})}function qa(e){return T.jsx("div",{className:"relative mb-2 w-full border-b border-gray-100 pt-3",children:T.jsxs("div",{className:"pb-1 pl-1 pt-1",children:[T.jsx(lt,{weight:"normal",color:"text-gray-500",size:"xs",children:e.label}),T.jsx("div",{className:"min-h-[1.7rem]",children:e.children})]})})}function cm(e){return T.jsx(qa,{label:e.label,children:T.jsx(lt,{weight:"extralight",children:e.value})})}function fm(e){const t=n=>T.jsx("div",{className:"mt-1 flex w-fit rounded border border-primary-200 bg-primary-100 px-2 py-px",children:T.jsx(lt,{render_as:"span",size:"sm",weight:"normal",color:"text-primary-800",children:n.value})});return T.jsx(qa,{label:e.label,children:Array.isArray(e.value)?T.jsx("div",{className:"flex max-w-full gap-1 overflow-x-scroll",children:e.value.map((n,r)=>T.jsx(t,{value:n},r))}):e.value&&T.jsx(t,{value:e.value})})}function dm(e){switch(e){case!0:case"true":case 1:case"1":case"on":case"yes":return!0;default:return!1}}function hm(e){return T.jsx(qa,{label:e.label,children:T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("div",{className:`h-fit rounded-full p-1 ${e.underlying_value&&dm(e.underlying_value)?"bg-green-500":"bg-red-600"}`}),T.jsx(lt,{children:e.value})]})})}function pm(e){const{type:t,value:n,label:r,underlying_value:i}=e;return t==="select"||t=="multi_select"?T.jsx(fm,{label:r,value:n}):t==="checkbox"?T.jsx(hm,{label:r,value:n,underlying_value:i}):T.jsx(cm,{label:r,value:n})}function gm(e){const{searchable:t,hide_label:n,...r}=e;return e.type==="select"?T.jsx(wm,{...r,onChange:(i,a)=>e.onChange&&e.onChange(i,a)}):e.type==="multi_select"?T.jsx(bm,{...r,onChange:(i,a)=>e.onChange&&e.onChange(i,a)}):T.jsx(wr,{...r,onChange:(i,a)=>e.onChange&&e.onChange(i,a)})}var Bl={exports:{}};/*!
56
56
  *
57
57
  * react-simple-keyboard v3.7.121
58
58
  * https://github.com/hodgef/react-simple-keyboard
@@ -62,15 +62,17 @@ React keys must be passed directly to JSX without using spread:
62
62
  * This source code is licensed under the MIT license found in the
63
63
  * LICENSE file in the root directory of this source tree.
64
64
  *
65
- */(function(e,t){(function(n,r){e.exports=r(H)})(Rn,function(n){return function(){var r={981:function(){typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(u){if("Element"in u){var f="classList",g="prototype",h=u.Element[g],x=Object,l=String[g].trim||function(){return this.replace(/^\s+|\s+$/g,"")},v=Array[g].indexOf||function(b){for(var C=0,S=this.length;C<S;C++)if(C in this&&this[C]===b)return C;return-1},i=function(b,C){this.name=b,this.code=DOMException[b],this.message=C},c=function(b,C){if(C==="")throw new i("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(C))throw new i("INVALID_CHARACTER_ERR","The token must not contain space characters.");return v.call(b,C)},p=function(b){for(var C=l.call(b.getAttribute("class")||""),S=C?C.split(/\s+/):[],k=0,B=S.length;k<B;k++)this.push(S[k]);this._updateClassName=function(){b.setAttribute("class",this.toString())}},d=p[g]=[],m=function(){return new p(this)};if(i[g]=Error[g],d.item=function(b){return this[b]||null},d.contains=function(b){return~c(this,b+"")},d.add=function(){var b,C=arguments,S=0,k=C.length,B=!1;do~c(this,b=C[S]+"")||(this.push(b),B=!0);while(++S<k);B&&this._updateClassName()},d.remove=function(){var b,C,S=arguments,k=0,B=S.length,O=!1;do for(C=c(this,b=S[k]+"");~C;)this.splice(C,1),O=!0,C=c(this,b);while(++k<B);O&&this._updateClassName()},d.toggle=function(b,C){var S=this.contains(b),k=S?C!==!0&&"remove":C!==!1&&"add";return k&&this[k](b),C===!0||C===!1?C:!S},d.replace=function(b,C){var S=c(b+"");~S&&(this.splice(S,1,C),this._updateClassName())},d.toString=function(){return this.join(" ")},x.defineProperty){var y={get:m,enumerable:!0,configurable:!0};try{x.defineProperty(h,f,y)}catch(b){b.number!==void 0&&b.number!==-2146823252||(y.enumerable=!1,x.defineProperty(h,f,y))}}else x[g].__defineGetter__&&h.__defineGetter__(f,m)}}(self),function(){var u=document.createElement("_");if(u.classList.add("c1","c2"),!u.classList.contains("c2")){var f=function(h){var x=DOMTokenList.prototype[h];DOMTokenList.prototype[h]=function(l){var v,i=arguments.length;for(v=0;v<i;v++)l=arguments[v],x.call(this,l)}};f("add"),f("remove")}if(u.classList.toggle("c3",!1),u.classList.contains("c3")){var g=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(h,x){return 1 in arguments&&!this.contains(h)==!x?x:g.call(this,h)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(h,x){var l=this.toString().split(" "),v=l.indexOf(h+"");~v&&(l=l.slice(v),this.remove.apply(this,l),this.add(x),this.add.apply(this,l.slice(1)))}),u=null}())},548:function(u){u.exports=function(){var f={9306:function(l,v,i){var c=i(4901),p=i(6823),d=TypeError;l.exports=function(m){if(c(m))return m;throw new d(p(m)+" is not a function")}},5548:function(l,v,i){var c=i(3517),p=i(6823),d=TypeError;l.exports=function(m){if(c(m))return m;throw new d(p(m)+" is not a constructor")}},3506:function(l,v,i){var c=i(3925),p=String,d=TypeError;l.exports=function(m){if(c(m))return m;throw new d("Can't set "+p(m)+" as a prototype")}},6469:function(l,v,i){var c=i(8227),p=i(2360),d=i(4913).f,m=c("unscopables"),y=Array.prototype;y[m]===void 0&&d(y,m,{configurable:!0,value:p(null)}),l.exports=function(b){y[m][b]=!0}},7829:function(l,v,i){var c=i(8183).charAt;l.exports=function(p,d,m){return d+(m?c(p,d).length:1)}},8551:function(l,v,i){var c=i(34),p=String,d=TypeError;l.exports=function(m){if(c(m))return m;throw new d(p(m)+" is not an object")}},235:function(l,v,i){var c=i(9213).forEach,p=i(4598)("forEach");l.exports=p?[].forEach:function(d){return c(this,d,arguments.length>1?arguments[1]:void 0)}},7916:function(l,v,i){var c=i(6080),p=i(9565),d=i(8981),m=i(6319),y=i(4209),b=i(3517),C=i(6198),S=i(4659),k=i(81),B=i(851),O=Array;l.exports=function(j){var I=d(j),D=b(this),M=arguments.length,$=M>1?arguments[1]:void 0,P=$!==void 0;P&&($=c($,M>2?arguments[2]:void 0));var L,q,K,Q,Z,ee,ue=B(I),ne=0;if(!ue||this===O&&y(ue))for(L=C(I),q=D?new this(L):O(L);L>ne;ne++)ee=P?$(I[ne],ne):I[ne],S(q,ne,ee);else for(q=D?new this:[],Z=(Q=k(I,ue)).next;!(K=p(Z,Q)).done;ne++)ee=P?m(Q,$,[K.value,ne],!0):K.value,S(q,ne,ee);return q.length=ne,q}},9617:function(l,v,i){var c=i(5397),p=i(5610),d=i(6198),m=function(y){return function(b,C,S){var k=c(b),B=d(k);if(B===0)return!y&&-1;var O,j=p(S,B);if(y&&C!=C){for(;B>j;)if((O=k[j++])!=O)return!0}else for(;B>j;j++)if((y||j in k)&&k[j]===C)return y||j||0;return!y&&-1}};l.exports={includes:m(!0),indexOf:m(!1)}},9213:function(l,v,i){var c=i(6080),p=i(9504),d=i(7055),m=i(8981),y=i(6198),b=i(1469),C=p([].push),S=function(k){var B=k===1,O=k===2,j=k===3,I=k===4,D=k===6,M=k===7,$=k===5||D;return function(P,L,q,K){for(var Q,Z,ee=m(P),ue=d(ee),ne=y(ue),me=c(L,q),de=0,V=K||b,U=B?V(P,ne):O||M?V(P,0):void 0;ne>de;de++)if(($||de in ue)&&(Z=me(Q=ue[de],de,ee),k))if(B)U[de]=Z;else if(Z)switch(k){case 3:return!0;case 5:return Q;case 6:return de;case 2:C(U,Q)}else switch(k){case 4:return!1;case 7:C(U,Q)}return D?-1:j||I?I:U}};l.exports={forEach:S(0),map:S(1),filter:S(2),some:S(3),every:S(4),find:S(5),findIndex:S(6),filterReject:S(7)}},597:function(l,v,i){var c=i(9039),p=i(8227),d=i(7388),m=p("species");l.exports=function(y){return d>=51||!c(function(){var b=[];return(b.constructor={})[m]=function(){return{foo:1}},b[y](Boolean).foo!==1})}},4598:function(l,v,i){var c=i(9039);l.exports=function(p,d){var m=[][p];return!!m&&c(function(){m.call(null,d||function(){return 1},1)})}},926:function(l,v,i){var c=i(9306),p=i(8981),d=i(7055),m=i(6198),y=TypeError,b="Reduce of empty array with no initial value",C=function(S){return function(k,B,O,j){var I=p(k),D=d(I),M=m(I);if(c(B),M===0&&O<2)throw new y(b);var $=S?M-1:0,P=S?-1:1;if(O<2)for(;;){if($ in D){j=D[$],$+=P;break}if($+=P,S?$<0:M<=$)throw new y(b)}for(;S?$>=0:M>$;$+=P)$ in D&&(j=B(j,D[$],$,I));return j}};l.exports={left:C(!1),right:C(!0)}},4527:function(l,v,i){var c=i(3724),p=i(4376),d=TypeError,m=Object.getOwnPropertyDescriptor,y=c&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b){return b instanceof TypeError}}();l.exports=y?function(b,C){if(p(b)&&!m(b,"length").writable)throw new d("Cannot set read only .length");return b.length=C}:function(b,C){return b.length=C}},7680:function(l,v,i){var c=i(9504);l.exports=c([].slice)},4488:function(l,v,i){var c=i(7680),p=Math.floor,d=function(m,y){var b=m.length;if(b<8)for(var C,S,k=1;k<b;){for(S=k,C=m[k];S&&y(m[S-1],C)>0;)m[S]=m[--S];S!==k++&&(m[S]=C)}else for(var B=p(b/2),O=d(c(m,0,B),y),j=d(c(m,B),y),I=O.length,D=j.length,M=0,$=0;M<I||$<D;)m[M+$]=M<I&&$<D?y(O[M],j[$])<=0?O[M++]:j[$++]:M<I?O[M++]:j[$++];return m};l.exports=d},7433:function(l,v,i){var c=i(4376),p=i(3517),d=i(34),m=i(8227)("species"),y=Array;l.exports=function(b){var C;return c(b)&&(C=b.constructor,(p(C)&&(C===y||c(C.prototype))||d(C)&&(C=C[m])===null)&&(C=void 0)),C===void 0?y:C}},1469:function(l,v,i){var c=i(7433);l.exports=function(p,d){return new(c(p))(d===0?0:d)}},6319:function(l,v,i){var c=i(8551),p=i(9539);l.exports=function(d,m,y,b){try{return b?m(c(y)[0],y[1]):m(y)}catch(C){p(d,"throw",C)}}},4428:function(l,v,i){var c=i(8227)("iterator"),p=!1;try{var d=0,m={next:function(){return{done:!!d++}},return:function(){p=!0}};m[c]=function(){return this},Array.from(m,function(){throw 2})}catch{}l.exports=function(y,b){try{if(!b&&!p)return!1}catch{return!1}var C=!1;try{var S={};S[c]=function(){return{next:function(){return{done:C=!0}}}},y(S)}catch{}return C}},4576:function(l,v,i){var c=i(9504),p=c({}.toString),d=c("".slice);l.exports=function(m){return d(p(m),8,-1)}},6955:function(l,v,i){var c=i(2140),p=i(4901),d=i(4576),m=i(8227)("toStringTag"),y=Object,b=d(function(){return arguments}())==="Arguments";l.exports=c?d:function(C){var S,k,B;return C===void 0?"Undefined":C===null?"Null":typeof(k=function(O,j){try{return O[j]}catch{}}(S=y(C),m))=="string"?k:b?d(S):(B=d(S))==="Object"&&p(S.callee)?"Arguments":B}},7740:function(l,v,i){var c=i(9297),p=i(5031),d=i(7347),m=i(4913);l.exports=function(y,b,C){for(var S=p(b),k=m.f,B=d.f,O=0;O<S.length;O++){var j=S[O];c(y,j)||C&&c(C,j)||k(y,j,B(b,j))}}},1436:function(l,v,i){var c=i(8227)("match");l.exports=function(p){var d=/./;try{"/./"[p](d)}catch{try{return d[c]=!1,"/./"[p](d)}catch{}}return!1}},2211:function(l,v,i){var c=i(9039);l.exports=!c(function(){function p(){}return p.prototype.constructor=null,Object.getPrototypeOf(new p)!==p.prototype})},2529:function(l){l.exports=function(v,i){return{value:v,done:i}}},6699:function(l,v,i){var c=i(3724),p=i(4913),d=i(6980);l.exports=c?function(m,y,b){return p.f(m,y,d(1,b))}:function(m,y,b){return m[y]=b,m}},6980:function(l){l.exports=function(v,i){return{enumerable:!(1&v),configurable:!(2&v),writable:!(4&v),value:i}}},4659:function(l,v,i){var c=i(3724),p=i(4913),d=i(6980);l.exports=function(m,y,b){c?p.f(m,y,d(0,b)):m[y]=b}},3640:function(l,v,i){var c=i(8551),p=i(4270),d=TypeError;l.exports=function(m){if(c(this),m==="string"||m==="default")m="string";else if(m!=="number")throw new d("Incorrect hint");return p(this,m)}},2106:function(l,v,i){var c=i(283),p=i(4913);l.exports=function(d,m,y){return y.get&&c(y.get,m,{getter:!0}),y.set&&c(y.set,m,{setter:!0}),p.f(d,m,y)}},6840:function(l,v,i){var c=i(4901),p=i(4913),d=i(283),m=i(9433);l.exports=function(y,b,C,S){S||(S={});var k=S.enumerable,B=S.name!==void 0?S.name:b;if(c(C)&&d(C,B,S),S.global)k?y[b]=C:m(b,C);else{try{S.unsafe?y[b]&&(k=!0):delete y[b]}catch{}k?y[b]=C:p.f(y,b,{value:C,enumerable:!1,configurable:!S.nonConfigurable,writable:!S.nonWritable})}return y}},9433:function(l,v,i){var c=i(4475),p=Object.defineProperty;l.exports=function(d,m){try{p(c,d,{value:m,configurable:!0,writable:!0})}catch{c[d]=m}return m}},4606:function(l,v,i){var c=i(6823),p=TypeError;l.exports=function(d,m){if(!delete d[m])throw new p("Cannot delete property "+c(m)+" of "+c(d))}},3724:function(l,v,i){var c=i(9039);l.exports=!c(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4055:function(l,v,i){var c=i(4475),p=i(34),d=c.document,m=p(d)&&p(d.createElement);l.exports=function(y){return m?d.createElement(y):{}}},6837:function(l){var v=TypeError;l.exports=function(i){if(i>9007199254740991)throw v("Maximum allowed index exceeded");return i}},7400:function(l){l.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:function(l,v,i){var c=i(4055)("span").classList,p=c&&c.constructor&&c.constructor.prototype;l.exports=p===Object.prototype?void 0:p},8834:function(l,v,i){var c=i(9392).match(/firefox\/(\d+)/i);l.exports=!!c&&+c[1]},3202:function(l,v,i){var c=i(9392);l.exports=/MSIE|Trident/.test(c)},9088:function(l,v,i){var c=i(4475),p=i(4576);l.exports=p(c.process)==="process"},9392:function(l){l.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7388:function(l,v,i){var c,p,d=i(4475),m=i(9392),y=d.process,b=d.Deno,C=y&&y.versions||b&&b.version,S=C&&C.v8;S&&(p=(c=S.split("."))[0]>0&&c[0]<4?1:+(c[0]+c[1])),!p&&m&&(!(c=m.match(/Edge\/(\d+)/))||c[1]>=74)&&(c=m.match(/Chrome\/(\d+)/))&&(p=+c[1]),l.exports=p},9160:function(l,v,i){var c=i(9392).match(/AppleWebKit\/(\d+)\./);l.exports=!!c&&+c[1]},8727:function(l){l.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:function(l,v,i){var c=i(4475),p=i(7347).f,d=i(6699),m=i(6840),y=i(9433),b=i(7740),C=i(2796);l.exports=function(S,k){var B,O,j,I,D,M=S.target,$=S.global,P=S.stat;if(B=$?c:P?c[M]||y(M,{}):c[M]&&c[M].prototype)for(O in k){if(I=k[O],j=S.dontCallGetSet?(D=p(B,O))&&D.value:B[O],!C($?O:M+(P?".":"#")+O,S.forced)&&j!==void 0){if(typeof I==typeof j)continue;b(I,j)}(S.sham||j&&j.sham)&&d(I,"sham",!0),m(B,O,I,S)}}},9039:function(l){l.exports=function(v){try{return!!v()}catch{return!0}}},9228:function(l,v,i){i(7495);var c=i(9565),p=i(6840),d=i(7323),m=i(9039),y=i(8227),b=i(6699),C=y("species"),S=RegExp.prototype;l.exports=function(k,B,O,j){var I=y(k),D=!m(function(){var L={};return L[I]=function(){return 7},""[k](L)!==7}),M=D&&!m(function(){var L=!1,q=/a/;return k==="split"&&((q={}).constructor={},q.constructor[C]=function(){return q},q.flags="",q[I]=/./[I]),q.exec=function(){return L=!0,null},q[I](""),!L});if(!D||!M||O){var $=/./[I],P=B(I,""[k],function(L,q,K,Q,Z){var ee=q.exec;return ee===d||ee===S.exec?D&&!Z?{done:!0,value:c($,q,K,Q)}:{done:!0,value:c(L,K,q,Q)}:{done:!1}});p(String.prototype,k,P[0]),p(S,I,P[1])}j&&b(S[I],"sham",!0)}},8745:function(l,v,i){var c=i(616),p=Function.prototype,d=p.apply,m=p.call;l.exports=typeof Reflect=="object"&&Reflect.apply||(c?m.bind(d):function(){return m.apply(d,arguments)})},6080:function(l,v,i){var c=i(7476),p=i(9306),d=i(616),m=c(c.bind);l.exports=function(y,b){return p(y),b===void 0?y:d?m(y,b):function(){return y.apply(b,arguments)}}},616:function(l,v,i){var c=i(9039);l.exports=!c(function(){var p=(function(){}).bind();return typeof p!="function"||p.hasOwnProperty("prototype")})},9565:function(l,v,i){var c=i(616),p=Function.prototype.call;l.exports=c?p.bind(p):function(){return p.apply(p,arguments)}},350:function(l,v,i){var c=i(3724),p=i(9297),d=Function.prototype,m=c&&Object.getOwnPropertyDescriptor,y=p(d,"name"),b=y&&(function(){}).name==="something",C=y&&(!c||c&&m(d,"name").configurable);l.exports={EXISTS:y,PROPER:b,CONFIGURABLE:C}},6706:function(l,v,i){var c=i(9504),p=i(9306);l.exports=function(d,m,y){try{return c(p(Object.getOwnPropertyDescriptor(d,m)[y]))}catch{}}},7476:function(l,v,i){var c=i(4576),p=i(9504);l.exports=function(d){if(c(d)==="Function")return p(d)}},9504:function(l,v,i){var c=i(616),p=Function.prototype,d=p.call,m=c&&p.bind.bind(d,d);l.exports=c?m:function(y){return function(){return d.apply(y,arguments)}}},7751:function(l,v,i){var c=i(4475),p=i(4901);l.exports=function(d,m){return arguments.length<2?(y=c[d],p(y)?y:void 0):c[d]&&c[d][m];var y}},851:function(l,v,i){var c=i(6955),p=i(5966),d=i(4117),m=i(6269),y=i(8227)("iterator");l.exports=function(b){if(!d(b))return p(b,y)||p(b,"@@iterator")||m[c(b)]}},81:function(l,v,i){var c=i(9565),p=i(9306),d=i(8551),m=i(6823),y=i(851),b=TypeError;l.exports=function(C,S){var k=arguments.length<2?y(C):S;if(p(k))return d(c(k,C));throw new b(m(C)+" is not iterable")}},6933:function(l,v,i){var c=i(9504),p=i(4376),d=i(4901),m=i(4576),y=i(655),b=c([].push);l.exports=function(C){if(d(C))return C;if(p(C)){for(var S=C.length,k=[],B=0;B<S;B++){var O=C[B];typeof O=="string"?b(k,O):typeof O!="number"&&m(O)!=="Number"&&m(O)!=="String"||b(k,y(O))}var j=k.length,I=!0;return function(D,M){if(I)return I=!1,M;if(p(this))return M;for(var $=0;$<j;$++)if(k[$]===D)return M}}}},5966:function(l,v,i){var c=i(9306),p=i(4117);l.exports=function(d,m){var y=d[m];return p(y)?void 0:c(y)}},2478:function(l,v,i){var c=i(9504),p=i(8981),d=Math.floor,m=c("".charAt),y=c("".replace),b=c("".slice),C=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,S=/\$([$&'`]|\d{1,2})/g;l.exports=function(k,B,O,j,I,D){var M=O+k.length,$=j.length,P=S;return I!==void 0&&(I=p(I),P=C),y(D,P,function(L,q){var K;switch(m(q,0)){case"$":return"$";case"&":return k;case"`":return b(B,0,O);case"'":return b(B,M);case"<":K=I[b(q,1,-1)];break;default:var Q=+q;if(Q===0)return L;if(Q>$){var Z=d(Q/10);return Z===0?L:Z<=$?j[Z-1]===void 0?m(q,1):j[Z-1]+m(q,1):L}K=j[Q-1]}return K===void 0?"":K})}},4475:function(l,v,i){var c=function(p){return p&&p.Math===Math&&p};l.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof i.g=="object"&&i.g)||c(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:function(l,v,i){var c=i(9504),p=i(8981),d=c({}.hasOwnProperty);l.exports=Object.hasOwn||function(m,y){return d(p(m),y)}},421:function(l){l.exports={}},397:function(l,v,i){var c=i(7751);l.exports=c("document","documentElement")},5917:function(l,v,i){var c=i(3724),p=i(9039),d=i(4055);l.exports=!c&&!p(function(){return Object.defineProperty(d("div"),"a",{get:function(){return 7}}).a!==7})},7055:function(l,v,i){var c=i(9504),p=i(9039),d=i(4576),m=Object,y=c("".split);l.exports=p(function(){return!m("z").propertyIsEnumerable(0)})?function(b){return d(b)==="String"?y(b,""):m(b)}:m},3167:function(l,v,i){var c=i(4901),p=i(34),d=i(2967);l.exports=function(m,y,b){var C,S;return d&&c(C=y.constructor)&&C!==b&&p(S=C.prototype)&&S!==b.prototype&&d(m,S),m}},3706:function(l,v,i){var c=i(9504),p=i(4901),d=i(7629),m=c(Function.toString);p(d.inspectSource)||(d.inspectSource=function(y){return m(y)}),l.exports=d.inspectSource},1181:function(l,v,i){var c,p,d,m=i(8622),y=i(4475),b=i(34),C=i(6699),S=i(9297),k=i(7629),B=i(6119),O=i(421),j="Object already initialized",I=y.TypeError,D=y.WeakMap;if(m||k.state){var M=k.state||(k.state=new D);M.get=M.get,M.has=M.has,M.set=M.set,c=function(P,L){if(M.has(P))throw new I(j);return L.facade=P,M.set(P,L),L},p=function(P){return M.get(P)||{}},d=function(P){return M.has(P)}}else{var $=B("state");O[$]=!0,c=function(P,L){if(S(P,$))throw new I(j);return L.facade=P,C(P,$,L),L},p=function(P){return S(P,$)?P[$]:{}},d=function(P){return S(P,$)}}l.exports={set:c,get:p,has:d,enforce:function(P){return d(P)?p(P):c(P,{})},getterFor:function(P){return function(L){var q;if(!b(L)||(q=p(L)).type!==P)throw new I("Incompatible receiver, "+P+" required");return q}}}},4209:function(l,v,i){var c=i(8227),p=i(6269),d=c("iterator"),m=Array.prototype;l.exports=function(y){return y!==void 0&&(p.Array===y||m[d]===y)}},4376:function(l,v,i){var c=i(4576);l.exports=Array.isArray||function(p){return c(p)==="Array"}},4901:function(l){var v=typeof document=="object"&&document.all;l.exports=v===void 0&&v!==void 0?function(i){return typeof i=="function"||i===v}:function(i){return typeof i=="function"}},3517:function(l,v,i){var c=i(9504),p=i(9039),d=i(4901),m=i(6955),y=i(7751),b=i(3706),C=function(){},S=y("Reflect","construct"),k=/^\s*(?:class|function)\b/,B=c(k.exec),O=!k.test(C),j=function(D){if(!d(D))return!1;try{return S(C,[],D),!0}catch{return!1}},I=function(D){if(!d(D))return!1;switch(m(D)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return O||!!B(k,b(D))}catch{return!0}};I.sham=!0,l.exports=!S||p(function(){var D;return j(j.call)||!j(Object)||!j(function(){D=!0})||D})?I:j},2796:function(l,v,i){var c=i(9039),p=i(4901),d=/#|\.prototype\./,m=function(k,B){var O=b[y(k)];return O===S||O!==C&&(p(B)?c(B):!!B)},y=m.normalize=function(k){return String(k).replace(d,".").toLowerCase()},b=m.data={},C=m.NATIVE="N",S=m.POLYFILL="P";l.exports=m},2087:function(l,v,i){var c=i(34),p=Math.floor;l.exports=Number.isInteger||function(d){return!c(d)&&isFinite(d)&&p(d)===d}},4117:function(l){l.exports=function(v){return v==null}},34:function(l,v,i){var c=i(4901);l.exports=function(p){return typeof p=="object"?p!==null:c(p)}},3925:function(l,v,i){var c=i(34);l.exports=function(p){return c(p)||p===null}},6395:function(l){l.exports=!1},788:function(l,v,i){var c=i(34),p=i(4576),d=i(8227)("match");l.exports=function(m){var y;return c(m)&&((y=m[d])!==void 0?!!y:p(m)==="RegExp")}},757:function(l,v,i){var c=i(7751),p=i(4901),d=i(1625),m=i(7040),y=Object;l.exports=m?function(b){return typeof b=="symbol"}:function(b){var C=c("Symbol");return p(C)&&d(C.prototype,y(b))}},9539:function(l,v,i){var c=i(9565),p=i(8551),d=i(5966);l.exports=function(m,y,b){var C,S;p(m);try{if(!(C=d(m,"return"))){if(y==="throw")throw b;return b}C=c(C,m)}catch(k){S=!0,C=k}if(y==="throw")throw b;if(S)throw C;return p(C),b}},3994:function(l,v,i){var c=i(7657).IteratorPrototype,p=i(2360),d=i(6980),m=i(687),y=i(6269),b=function(){return this};l.exports=function(C,S,k,B){var O=S+" Iterator";return C.prototype=p(c,{next:d(+!B,k)}),m(C,O,!1,!0),y[O]=b,C}},1088:function(l,v,i){var c=i(6518),p=i(9565),d=i(6395),m=i(350),y=i(4901),b=i(3994),C=i(2787),S=i(2967),k=i(687),B=i(6699),O=i(6840),j=i(8227),I=i(6269),D=i(7657),M=m.PROPER,$=m.CONFIGURABLE,P=D.IteratorPrototype,L=D.BUGGY_SAFARI_ITERATORS,q=j("iterator"),K="keys",Q="values",Z="entries",ee=function(){return this};l.exports=function(ue,ne,me,de,V,U,J){b(me,ne,de);var w,_,N,R=function(re){if(re===V&&ce)return ce;if(!L&&re&&re in X)return X[re];switch(re){case K:case Q:case Z:return function(){return new me(this,re)}}return function(){return new me(this)}},W=ne+" Iterator",G=!1,X=ue.prototype,F=X[q]||X["@@iterator"]||V&&X[V],ce=!L&&F||R(V),fe=ne==="Array"&&X.entries||F;if(fe&&(w=C(fe.call(new ue)))!==Object.prototype&&w.next&&(d||C(w)===P||(S?S(w,P):y(w[q])||O(w,q,ee)),k(w,W,!0,!0),d&&(I[W]=ee)),M&&V===Q&&F&&F.name!==Q&&(!d&&$?B(X,"name",Q):(G=!0,ce=function(){return p(F,this)})),V)if(_={values:R(Q),keys:U?ce:R(K),entries:R(Z)},J)for(N in _)(L||G||!(N in X))&&O(X,N,_[N]);else c({target:ne,proto:!0,forced:L||G},_);return d&&!J||X[q]===ce||O(X,q,ce,{name:V}),I[ne]=ce,_}},7657:function(l,v,i){var c,p,d,m=i(9039),y=i(4901),b=i(34),C=i(2360),S=i(2787),k=i(6840),B=i(8227),O=i(6395),j=B("iterator"),I=!1;[].keys&&("next"in(d=[].keys())?(p=S(S(d)))!==Object.prototype&&(c=p):I=!0),!b(c)||m(function(){var D={};return c[j].call(D)!==D})?c={}:O&&(c=C(c)),y(c[j])||k(c,j,function(){return this}),l.exports={IteratorPrototype:c,BUGGY_SAFARI_ITERATORS:I}},6269:function(l){l.exports={}},6198:function(l,v,i){var c=i(8014);l.exports=function(p){return c(p.length)}},283:function(l,v,i){var c=i(9504),p=i(9039),d=i(4901),m=i(9297),y=i(3724),b=i(350).CONFIGURABLE,C=i(3706),S=i(1181),k=S.enforce,B=S.get,O=String,j=Object.defineProperty,I=c("".slice),D=c("".replace),M=c([].join),$=y&&!p(function(){return j(function(){},"length",{value:8}).length!==8}),P=String(String).split("String"),L=l.exports=function(q,K,Q){I(O(K),0,7)==="Symbol("&&(K="["+D(O(K),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),Q&&Q.getter&&(K="get "+K),Q&&Q.setter&&(K="set "+K),(!m(q,"name")||b&&q.name!==K)&&(y?j(q,"name",{value:K,configurable:!0}):q.name=K),$&&Q&&m(Q,"arity")&&q.length!==Q.arity&&j(q,"length",{value:Q.arity});try{Q&&m(Q,"constructor")&&Q.constructor?y&&j(q,"prototype",{writable:!1}):q.prototype&&(q.prototype=void 0)}catch{}var Z=k(q);return m(Z,"source")||(Z.source=M(P,typeof K=="string"?K:"")),q};Function.prototype.toString=L(function(){return d(this)&&B(this).source||C(this)},"toString")},741:function(l){var v=Math.ceil,i=Math.floor;l.exports=Math.trunc||function(c){var p=+c;return(p>0?i:v)(p)}},5749:function(l,v,i){var c=i(788),p=TypeError;l.exports=function(d){if(c(d))throw new p("The method doesn't accept regular expressions");return d}},4213:function(l,v,i){var c=i(3724),p=i(9504),d=i(9565),m=i(9039),y=i(1072),b=i(3717),C=i(8773),S=i(8981),k=i(7055),B=Object.assign,O=Object.defineProperty,j=p([].concat);l.exports=!B||m(function(){if(c&&B({b:1},B(O({},"a",{enumerable:!0,get:function(){O(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var I={},D={},M=Symbol("assign detection"),$="abcdefghijklmnopqrst";return I[M]=7,$.split("").forEach(function(P){D[P]=P}),B({},I)[M]!==7||y(B({},D)).join("")!==$})?function(I,D){for(var M=S(I),$=arguments.length,P=1,L=b.f,q=C.f;$>P;)for(var K,Q=k(arguments[P++]),Z=L?j(y(Q),L(Q)):y(Q),ee=Z.length,ue=0;ee>ue;)K=Z[ue++],c&&!d(q,Q,K)||(M[K]=Q[K]);return M}:B},2360:function(l,v,i){var c,p=i(8551),d=i(6801),m=i(8727),y=i(421),b=i(397),C=i(4055),S=i(6119),k="prototype",B="script",O=S("IE_PROTO"),j=function(){},I=function($){return"<"+B+">"+$+"</"+B+">"},D=function($){$.write(I("")),$.close();var P=$.parentWindow.Object;return $=null,P},M=function(){try{c=new ActiveXObject("htmlfile")}catch{}var $,P,L;M=typeof document<"u"?document.domain&&c?D(c):(P=C("iframe"),L="java"+B+":",P.style.display="none",b.appendChild(P),P.src=String(L),($=P.contentWindow.document).open(),$.write(I("document.F=Object")),$.close(),$.F):D(c);for(var q=m.length;q--;)delete M[k][m[q]];return M()};y[O]=!0,l.exports=Object.create||function($,P){var L;return $!==null?(j[k]=p($),L=new j,j[k]=null,L[O]=$):L=M(),P===void 0?L:d.f(L,P)}},6801:function(l,v,i){var c=i(3724),p=i(8686),d=i(4913),m=i(8551),y=i(5397),b=i(1072);v.f=c&&!p?Object.defineProperties:function(C,S){m(C);for(var k,B=y(S),O=b(S),j=O.length,I=0;j>I;)d.f(C,k=O[I++],B[k]);return C}},4913:function(l,v,i){var c=i(3724),p=i(5917),d=i(8686),m=i(8551),y=i(6969),b=TypeError,C=Object.defineProperty,S=Object.getOwnPropertyDescriptor,k="enumerable",B="configurable",O="writable";v.f=c?d?function(j,I,D){if(m(j),I=y(I),m(D),typeof j=="function"&&I==="prototype"&&"value"in D&&O in D&&!D[O]){var M=S(j,I);M&&M[O]&&(j[I]=D.value,D={configurable:B in D?D[B]:M[B],enumerable:k in D?D[k]:M[k],writable:!1})}return C(j,I,D)}:C:function(j,I,D){if(m(j),I=y(I),m(D),p)try{return C(j,I,D)}catch{}if("get"in D||"set"in D)throw new b("Accessors not supported");return"value"in D&&(j[I]=D.value),j}},7347:function(l,v,i){var c=i(3724),p=i(9565),d=i(8773),m=i(6980),y=i(5397),b=i(6969),C=i(9297),S=i(5917),k=Object.getOwnPropertyDescriptor;v.f=c?k:function(B,O){if(B=y(B),O=b(O),S)try{return k(B,O)}catch{}if(C(B,O))return m(!p(d.f,B,O),B[O])}},298:function(l,v,i){var c=i(4576),p=i(5397),d=i(8480).f,m=i(7680),y=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];l.exports.f=function(b){return y&&c(b)==="Window"?function(C){try{return d(C)}catch{return m(y)}}(b):d(p(b))}},8480:function(l,v,i){var c=i(1828),p=i(8727).concat("length","prototype");v.f=Object.getOwnPropertyNames||function(d){return c(d,p)}},3717:function(l,v){v.f=Object.getOwnPropertySymbols},2787:function(l,v,i){var c=i(9297),p=i(4901),d=i(8981),m=i(6119),y=i(2211),b=m("IE_PROTO"),C=Object,S=C.prototype;l.exports=y?C.getPrototypeOf:function(k){var B=d(k);if(c(B,b))return B[b];var O=B.constructor;return p(O)&&B instanceof O?O.prototype:B instanceof C?S:null}},1625:function(l,v,i){var c=i(9504);l.exports=c({}.isPrototypeOf)},1828:function(l,v,i){var c=i(9504),p=i(9297),d=i(5397),m=i(9617).indexOf,y=i(421),b=c([].push);l.exports=function(C,S){var k,B=d(C),O=0,j=[];for(k in B)!p(y,k)&&p(B,k)&&b(j,k);for(;S.length>O;)p(B,k=S[O++])&&(~m(j,k)||b(j,k));return j}},1072:function(l,v,i){var c=i(1828),p=i(8727);l.exports=Object.keys||function(d){return c(d,p)}},8773:function(l,v){var i={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,p=c&&!i.call({1:2},1);v.f=p?function(d){var m=c(this,d);return!!m&&m.enumerable}:i},2551:function(l,v,i){var c=i(6395),p=i(4475),d=i(9039),m=i(9160);l.exports=c||!d(function(){if(!(m&&m<535)){var y=Math.random();__defineSetter__.call(null,y,function(){}),delete p[y]}})},2967:function(l,v,i){var c=i(6706),p=i(34),d=i(7750),m=i(3506);l.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var y,b=!1,C={};try{(y=c(Object.prototype,"__proto__","set"))(C,[]),b=C instanceof Array}catch{}return function(S,k){return d(S),m(k),p(S)&&(b?y(S,k):S.__proto__=k),S}}():void 0)},3179:function(l,v,i){var c=i(2140),p=i(6955);l.exports=c?{}.toString:function(){return"[object "+p(this)+"]"}},4270:function(l,v,i){var c=i(9565),p=i(4901),d=i(34),m=TypeError;l.exports=function(y,b){var C,S;if(b==="string"&&p(C=y.toString)&&!d(S=c(C,y))||p(C=y.valueOf)&&!d(S=c(C,y))||b!=="string"&&p(C=y.toString)&&!d(S=c(C,y)))return S;throw new m("Can't convert object to primitive value")}},5031:function(l,v,i){var c=i(7751),p=i(9504),d=i(8480),m=i(3717),y=i(8551),b=p([].concat);l.exports=c("Reflect","ownKeys")||function(C){var S=d.f(y(C)),k=m.f;return k?b(S,k(C)):S}},9167:function(l,v,i){var c=i(4475);l.exports=c},1056:function(l,v,i){var c=i(4913).f;l.exports=function(p,d,m){m in p||c(p,m,{configurable:!0,get:function(){return d[m]},set:function(y){d[m]=y}})}},6682:function(l,v,i){var c=i(9565),p=i(8551),d=i(4901),m=i(4576),y=i(7323),b=TypeError;l.exports=function(C,S){var k=C.exec;if(d(k)){var B=c(k,C,S);return B!==null&&p(B),B}if(m(C)==="RegExp")return c(y,C,S);throw new b("RegExp#exec called on incompatible receiver")}},7323:function(l,v,i){var c,p,d=i(9565),m=i(9504),y=i(655),b=i(7979),C=i(8429),S=i(5745),k=i(2360),B=i(1181).get,O=i(3635),j=i(8814),I=S("native-string-replace",String.prototype.replace),D=RegExp.prototype.exec,M=D,$=m("".charAt),P=m("".indexOf),L=m("".replace),q=m("".slice),K=(p=/b*/g,d(D,c=/a/,"a"),d(D,p,"a"),c.lastIndex!==0||p.lastIndex!==0),Q=C.BROKEN_CARET,Z=/()??/.exec("")[1]!==void 0;(K||Z||Q||O||j)&&(M=function(ee){var ue,ne,me,de,V,U,J,w=this,_=B(w),N=y(ee),R=_.raw;if(R)return R.lastIndex=w.lastIndex,ue=d(M,R,N),w.lastIndex=R.lastIndex,ue;var W=_.groups,G=Q&&w.sticky,X=d(b,w),F=w.source,ce=0,fe=N;if(G&&(X=L(X,"y",""),P(X,"g")===-1&&(X+="g"),fe=q(N,w.lastIndex),w.lastIndex>0&&(!w.multiline||w.multiline&&$(N,w.lastIndex-1)!==`
66
- `)&&(F="(?: "+F+")",fe=" "+fe,ce++),ne=new RegExp("^(?:"+F+")",X)),Z&&(ne=new RegExp("^"+F+"$(?!\\s)",X)),K&&(me=w.lastIndex),de=d(D,G?ne:w,fe),G?de?(de.input=q(de.input,ce),de[0]=q(de[0],ce),de.index=w.lastIndex,w.lastIndex+=de[0].length):w.lastIndex=0:K&&de&&(w.lastIndex=w.global?de.index+de[0].length:me),Z&&de&&de.length>1&&d(I,de[0],ne,function(){for(V=1;V<arguments.length-2;V++)arguments[V]===void 0&&(de[V]=void 0)}),de&&W)for(de.groups=U=k(null),V=0;V<W.length;V++)U[(J=W[V])[0]]=de[J[1]];return de}),l.exports=M},7979:function(l,v,i){var c=i(8551);l.exports=function(){var p=c(this),d="";return p.hasIndices&&(d+="d"),p.global&&(d+="g"),p.ignoreCase&&(d+="i"),p.multiline&&(d+="m"),p.dotAll&&(d+="s"),p.unicode&&(d+="u"),p.unicodeSets&&(d+="v"),p.sticky&&(d+="y"),d}},1034:function(l,v,i){var c=i(9565),p=i(9297),d=i(1625),m=i(7979),y=RegExp.prototype;l.exports=function(b){var C=b.flags;return C!==void 0||"flags"in y||p(b,"flags")||!d(y,b)?C:c(m,b)}},8429:function(l,v,i){var c=i(9039),p=i(4475).RegExp,d=c(function(){var b=p("a","y");return b.lastIndex=2,b.exec("abcd")!==null}),m=d||c(function(){return!p("a","y").sticky}),y=d||c(function(){var b=p("^r","gy");return b.lastIndex=2,b.exec("str")!==null});l.exports={BROKEN_CARET:y,MISSED_STICKY:m,UNSUPPORTED_Y:d}},3635:function(l,v,i){var c=i(9039),p=i(4475).RegExp;l.exports=c(function(){var d=p(".","s");return!(d.dotAll&&d.test(`
67
- `)&&d.flags==="s")})},8814:function(l,v,i){var c=i(9039),p=i(4475).RegExp;l.exports=c(function(){var d=p("(?<a>b)","g");return d.exec("b").groups.a!=="b"||"b".replace(d,"$<a>c")!=="bc"})},7750:function(l,v,i){var c=i(4117),p=TypeError;l.exports=function(d){if(c(d))throw new p("Can't call method on "+d);return d}},7633:function(l,v,i){var c=i(7751),p=i(2106),d=i(8227),m=i(3724),y=d("species");l.exports=function(b){var C=c(b);m&&C&&!C[y]&&p(C,y,{configurable:!0,get:function(){return this}})}},687:function(l,v,i){var c=i(4913).f,p=i(9297),d=i(8227)("toStringTag");l.exports=function(m,y,b){m&&!b&&(m=m.prototype),m&&!p(m,d)&&c(m,d,{configurable:!0,value:y})}},6119:function(l,v,i){var c=i(5745),p=i(3392),d=c("keys");l.exports=function(m){return d[m]||(d[m]=p(m))}},7629:function(l,v,i){var c=i(6395),p=i(4475),d=i(9433),m="__core-js_shared__",y=l.exports=p[m]||d(m,{});(y.versions||(y.versions=[])).push({version:"3.37.1",mode:c?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(l,v,i){var c=i(7629);l.exports=function(p,d){return c[p]||(c[p]=d||{})}},2293:function(l,v,i){var c=i(8551),p=i(5548),d=i(4117),m=i(8227)("species");l.exports=function(y,b){var C,S=c(y).constructor;return S===void 0||d(C=c(S)[m])?b:p(C)}},8183:function(l,v,i){var c=i(9504),p=i(1291),d=i(655),m=i(7750),y=c("".charAt),b=c("".charCodeAt),C=c("".slice),S=function(k){return function(B,O){var j,I,D=d(m(B)),M=p(O),$=D.length;return M<0||M>=$?k?"":void 0:(j=b(D,M))<55296||j>56319||M+1===$||(I=b(D,M+1))<56320||I>57343?k?y(D,M):j:k?C(D,M,M+2):I-56320+(j-55296<<10)+65536}};l.exports={codeAt:S(!1),charAt:S(!0)}},706:function(l,v,i){var c=i(350).PROPER,p=i(9039),d=i(7452);l.exports=function(m){return p(function(){return!!d[m]()||"​…᠎"[m]()!=="​…᠎"||c&&d[m].name!==m})}},3802:function(l,v,i){var c=i(9504),p=i(7750),d=i(655),m=i(7452),y=c("".replace),b=RegExp("^["+m+"]+"),C=RegExp("(^|[^"+m+"])["+m+"]+$"),S=function(k){return function(B){var O=d(p(B));return 1&k&&(O=y(O,b,"")),2&k&&(O=y(O,C,"$1")),O}};l.exports={start:S(1),end:S(2),trim:S(3)}},4495:function(l,v,i){var c=i(7388),p=i(9039),d=i(4475).String;l.exports=!!Object.getOwnPropertySymbols&&!p(function(){var m=Symbol("symbol detection");return!d(m)||!(Object(m)instanceof Symbol)||!Symbol.sham&&c&&c<41})},8242:function(l,v,i){var c=i(9565),p=i(7751),d=i(8227),m=i(6840);l.exports=function(){var y=p("Symbol"),b=y&&y.prototype,C=b&&b.valueOf,S=d("toPrimitive");b&&!b[S]&&m(b,S,function(k){return c(C,this)},{arity:1})}},1296:function(l,v,i){var c=i(4495);l.exports=c&&!!Symbol.for&&!!Symbol.keyFor},1240:function(l,v,i){var c=i(9504);l.exports=c(1 .valueOf)},5610:function(l,v,i){var c=i(1291),p=Math.max,d=Math.min;l.exports=function(m,y){var b=c(m);return b<0?p(b+y,0):d(b,y)}},5397:function(l,v,i){var c=i(7055),p=i(7750);l.exports=function(d){return c(p(d))}},1291:function(l,v,i){var c=i(741);l.exports=function(p){var d=+p;return d!=d||d===0?0:c(d)}},8014:function(l,v,i){var c=i(1291),p=Math.min;l.exports=function(d){var m=c(d);return m>0?p(m,9007199254740991):0}},8981:function(l,v,i){var c=i(7750),p=Object;l.exports=function(d){return p(c(d))}},2777:function(l,v,i){var c=i(9565),p=i(34),d=i(757),m=i(5966),y=i(4270),b=i(8227),C=TypeError,S=b("toPrimitive");l.exports=function(k,B){if(!p(k)||d(k))return k;var O,j=m(k,S);if(j){if(B===void 0&&(B="default"),O=c(j,k,B),!p(O)||d(O))return O;throw new C("Can't convert object to primitive value")}return B===void 0&&(B="number"),y(k,B)}},6969:function(l,v,i){var c=i(2777),p=i(757);l.exports=function(d){var m=c(d,"string");return p(m)?m:m+""}},2140:function(l,v,i){var c={};c[i(8227)("toStringTag")]="z",l.exports=String(c)==="[object z]"},655:function(l,v,i){var c=i(6955),p=String;l.exports=function(d){if(c(d)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return p(d)}},6823:function(l){var v=String;l.exports=function(i){try{return v(i)}catch{return"Object"}}},3392:function(l,v,i){var c=i(9504),p=0,d=Math.random(),m=c(1 .toString);l.exports=function(y){return"Symbol("+(y===void 0?"":y)+")_"+m(++p+d,36)}},7040:function(l,v,i){var c=i(4495);l.exports=c&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:function(l,v,i){var c=i(3724),p=i(9039);l.exports=c&&p(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},8622:function(l,v,i){var c=i(4475),p=i(4901),d=c.WeakMap;l.exports=p(d)&&/native code/.test(String(d))},511:function(l,v,i){var c=i(9167),p=i(9297),d=i(1951),m=i(4913).f;l.exports=function(y){var b=c.Symbol||(c.Symbol={});p(b,y)||m(b,y,{value:d.f(y)})}},1951:function(l,v,i){var c=i(8227);v.f=c},8227:function(l,v,i){var c=i(4475),p=i(5745),d=i(9297),m=i(3392),y=i(4495),b=i(7040),C=c.Symbol,S=p("wks"),k=b?C.for||C:C&&C.withoutSetter||m;l.exports=function(B){return d(S,B)||(S[B]=y&&d(C,B)?C[B]:k("Symbol."+B)),S[B]}},7452:function(l){l.exports=`
68
- \v\f\r                 \u2028\u2029\uFEFF`},8706:function(l,v,i){var c=i(6518),p=i(9039),d=i(4376),m=i(34),y=i(8981),b=i(6198),C=i(6837),S=i(4659),k=i(1469),B=i(597),O=i(8227),j=i(7388),I=O("isConcatSpreadable"),D=j>=51||!p(function(){var $=[];return $[I]=!1,$.concat()[0]!==$}),M=function($){if(!m($))return!1;var P=$[I];return P!==void 0?!!P:d($)};c({target:"Array",proto:!0,arity:1,forced:!D||!B("concat")},{concat:function($){var P,L,q,K,Q,Z=y(this),ee=k(Z,0),ue=0;for(P=-1,q=arguments.length;P<q;P++)if(M(Q=P===-1?Z:arguments[P]))for(K=b(Q),C(ue+K),L=0;L<K;L++,ue++)L in Q&&S(ee,ue,Q[L]);else C(ue+1),S(ee,ue++,Q);return ee.length=ue,ee}})},2008:function(l,v,i){var c=i(6518),p=i(9213).filter;c({target:"Array",proto:!0,forced:!i(597)("filter")},{filter:function(d){return p(this,d,arguments.length>1?arguments[1]:void 0)}})},3418:function(l,v,i){var c=i(6518),p=i(7916);c({target:"Array",stat:!0,forced:!i(4428)(function(d){Array.from(d)})},{from:p})},4423:function(l,v,i){var c=i(6518),p=i(9617).includes,d=i(9039),m=i(6469);c({target:"Array",proto:!0,forced:d(function(){return!Array(1).includes()})},{includes:function(y){return p(this,y,arguments.length>1?arguments[1]:void 0)}}),m("includes")},5276:function(l,v,i){var c=i(6518),p=i(7476),d=i(9617).indexOf,m=i(4598),y=p([].indexOf),b=!!y&&1/y([1],1,-0)<0;c({target:"Array",proto:!0,forced:b||!m("indexOf")},{indexOf:function(C){var S=arguments.length>1?arguments[1]:void 0;return b?y(this,C,S)||0:d(this,C,S)}})},3792:function(l,v,i){var c=i(5397),p=i(6469),d=i(6269),m=i(1181),y=i(4913).f,b=i(1088),C=i(2529),S=i(6395),k=i(3724),B="Array Iterator",O=m.set,j=m.getterFor(B);l.exports=b(Array,"Array",function(D,M){O(this,{type:B,target:c(D),index:0,kind:M})},function(){var D=j(this),M=D.target,$=D.index++;if(!M||$>=M.length)return D.target=void 0,C(void 0,!0);switch(D.kind){case"keys":return C($,!1);case"values":return C(M[$],!1)}return C([$,M[$]],!1)},"values");var I=d.Arguments=d.Array;if(p("keys"),p("values"),p("entries"),!S&&k&&I.name!=="values")try{y(I,"name",{value:"values"})}catch{}},8598:function(l,v,i){var c=i(6518),p=i(9504),d=i(7055),m=i(5397),y=i(4598),b=p([].join);c({target:"Array",proto:!0,forced:d!==Object||!y("join",",")},{join:function(C){return b(m(this),C===void 0?",":C)}})},2062:function(l,v,i){var c=i(6518),p=i(9213).map;c({target:"Array",proto:!0,forced:!i(597)("map")},{map:function(d){return p(this,d,arguments.length>1?arguments[1]:void 0)}})},2712:function(l,v,i){var c=i(6518),p=i(926).left,d=i(4598),m=i(7388);c({target:"Array",proto:!0,forced:!i(9088)&&m>79&&m<83||!d("reduce")},{reduce:function(y){var b=arguments.length;return p(this,y,b,b>1?arguments[1]:void 0)}})},4782:function(l,v,i){var c=i(6518),p=i(4376),d=i(3517),m=i(34),y=i(5610),b=i(6198),C=i(5397),S=i(4659),k=i(8227),B=i(597),O=i(7680),j=B("slice"),I=k("species"),D=Array,M=Math.max;c({target:"Array",proto:!0,forced:!j},{slice:function($,P){var L,q,K,Q=C(this),Z=b(Q),ee=y($,Z),ue=y(P===void 0?Z:P,Z);if(p(Q)&&(L=Q.constructor,(d(L)&&(L===D||p(L.prototype))||m(L)&&(L=L[I])===null)&&(L=void 0),L===D||L===void 0))return O(Q,ee,ue);for(q=new(L===void 0?D:L)(M(ue-ee,0)),K=0;ee<ue;ee++,K++)ee in Q&&S(q,K,Q[ee]);return q.length=K,q}})},6910:function(l,v,i){var c=i(6518),p=i(9504),d=i(9306),m=i(8981),y=i(6198),b=i(4606),C=i(655),S=i(9039),k=i(4488),B=i(4598),O=i(8834),j=i(3202),I=i(7388),D=i(9160),M=[],$=p(M.sort),P=p(M.push),L=S(function(){M.sort(void 0)}),q=S(function(){M.sort(null)}),K=B("sort"),Q=!S(function(){if(I)return I<70;if(!(O&&O>3)){if(j)return!0;if(D)return D<603;var Z,ee,ue,ne,me="";for(Z=65;Z<76;Z++){switch(ee=String.fromCharCode(Z),Z){case 66:case 69:case 70:case 72:ue=3;break;case 68:case 71:ue=4;break;default:ue=2}for(ne=0;ne<47;ne++)M.push({k:ee+ne,v:ue})}for(M.sort(function(de,V){return V.v-de.v}),ne=0;ne<M.length;ne++)ee=M[ne].k.charAt(0),me.charAt(me.length-1)!==ee&&(me+=ee);return me!=="DGBEFHACIJK"}});c({target:"Array",proto:!0,forced:L||!q||!K||!Q},{sort:function(Z){Z!==void 0&&d(Z);var ee=m(this);if(Q)return Z===void 0?$(ee):$(ee,Z);var ue,ne,me=[],de=y(ee);for(ne=0;ne<de;ne++)ne in ee&&P(me,ee[ne]);for(k(me,function(V){return function(U,J){return J===void 0?-1:U===void 0?1:V!==void 0?+V(U,J)||0:C(U)>C(J)?1:-1}}(Z)),ue=y(me),ne=0;ne<ue;)ee[ne]=me[ne++];for(;ne<de;)b(ee,ne++);return ee}})},4554:function(l,v,i){var c=i(6518),p=i(8981),d=i(5610),m=i(1291),y=i(6198),b=i(4527),C=i(6837),S=i(1469),k=i(4659),B=i(4606),O=i(597)("splice"),j=Math.max,I=Math.min;c({target:"Array",proto:!0,forced:!O},{splice:function(D,M){var $,P,L,q,K,Q,Z=p(this),ee=y(Z),ue=d(D,ee),ne=arguments.length;for(ne===0?$=P=0:ne===1?($=0,P=ee-ue):($=ne-2,P=I(j(m(M),0),ee-ue)),C(ee+$-P),L=S(Z,P),q=0;q<P;q++)(K=ue+q)in Z&&k(L,q,Z[K]);if(L.length=P,$<P){for(q=ue;q<ee-P;q++)Q=q+$,(K=q+P)in Z?Z[Q]=Z[K]:B(Z,Q);for(q=ee;q>ee-P+$;q--)B(Z,q-1)}else if($>P)for(q=ee-P;q>ue;q--)Q=q+$-1,(K=q+P-1)in Z?Z[Q]=Z[K]:B(Z,Q);for(q=0;q<$;q++)Z[q+ue]=arguments[q+2];return b(Z,ee-P+$),L}})},739:function(l,v,i){var c=i(6518),p=i(9039),d=i(8981),m=i(2777);c({target:"Date",proto:!0,arity:1,forced:p(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1})},{toJSON:function(y){var b=d(this),C=m(b,"number");return typeof C!="number"||isFinite(C)?b.toISOString():null}})},9572:function(l,v,i){var c=i(9297),p=i(6840),d=i(3640),m=i(8227)("toPrimitive"),y=Date.prototype;c(y,m)||p(y,m,d)},2010:function(l,v,i){var c=i(3724),p=i(350).EXISTS,d=i(9504),m=i(2106),y=Function.prototype,b=d(y.toString),C=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,S=d(C.exec);c&&!p&&m(y,"name",{configurable:!0,get:function(){try{return S(C,b(this))[1]}catch{return""}}})},3110:function(l,v,i){var c=i(6518),p=i(7751),d=i(8745),m=i(9565),y=i(9504),b=i(9039),C=i(4901),S=i(757),k=i(7680),B=i(6933),O=i(4495),j=String,I=p("JSON","stringify"),D=y(/./.exec),M=y("".charAt),$=y("".charCodeAt),P=y("".replace),L=y(1 .toString),q=/[\uD800-\uDFFF]/g,K=/^[\uD800-\uDBFF]$/,Q=/^[\uDC00-\uDFFF]$/,Z=!O||b(function(){var me=p("Symbol")("stringify detection");return I([me])!=="[null]"||I({a:me})!=="{}"||I(Object(me))!=="{}"}),ee=b(function(){return I("\uDF06\uD834")!=='"\\udf06\\ud834"'||I("\uDEAD")!=='"\\udead"'}),ue=function(me,de){var V=k(arguments),U=B(de);if(C(U)||me!==void 0&&!S(me))return V[1]=function(J,w){if(C(U)&&(w=m(U,this,j(J),w)),!S(w))return w},d(I,null,V)},ne=function(me,de,V){var U=M(V,de-1),J=M(V,de+1);return D(K,me)&&!D(Q,J)||D(Q,me)&&!D(K,U)?"\\u"+L($(me,0),16):me};I&&c({target:"JSON",stat:!0,arity:3,forced:Z||ee},{stringify:function(me,de,V){var U=k(arguments),J=d(Z?ue:I,null,U);return ee&&typeof J=="string"?P(J,q,ne):J}})},2892:function(l,v,i){var c=i(6518),p=i(6395),d=i(3724),m=i(4475),y=i(9167),b=i(9504),C=i(2796),S=i(9297),k=i(3167),B=i(1625),O=i(757),j=i(2777),I=i(9039),D=i(8480).f,M=i(7347).f,$=i(4913).f,P=i(1240),L=i(3802).trim,q="Number",K=m[q],Q=y[q],Z=K.prototype,ee=m.TypeError,ue=b("".slice),ne=b("".charCodeAt),me=function(J){var w,_,N,R,W,G,X,F,ce=j(J,"number");if(O(ce))throw new ee("Cannot convert a Symbol value to a number");if(typeof ce=="string"&&ce.length>2){if(ce=L(ce),(w=ne(ce,0))===43||w===45){if((_=ne(ce,2))===88||_===120)return NaN}else if(w===48){switch(ne(ce,1)){case 66:case 98:N=2,R=49;break;case 79:case 111:N=8,R=55;break;default:return+ce}for(G=(W=ue(ce,2)).length,X=0;X<G;X++)if((F=ne(W,X))<48||F>R)return NaN;return parseInt(W,N)}}return+ce},de=C(q,!K(" 0o1")||!K("0b1")||K("+0x1")),V=function(J){var w,_=arguments.length<1?0:K(function(N){var R=j(N,"number");return typeof R=="bigint"?R:me(R)}(J));return B(Z,w=this)&&I(function(){P(w)})?k(Object(_),this,V):_};V.prototype=Z,de&&!p&&(Z.constructor=V),c({global:!0,constructor:!0,wrap:!0,forced:de},{Number:V});var U=function(J,w){for(var _,N=d?D(w):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),R=0;N.length>R;R++)S(w,_=N[R])&&!S(J,_)&&$(J,_,M(w,_))};p&&Q&&U(y[q],Q),(de||p)&&U(y[q],K)},2637:function(l,v,i){i(6518)({target:"Number",stat:!0},{isInteger:i(2087)})},9085:function(l,v,i){var c=i(6518),p=i(4213);c({target:"Object",stat:!0,arity:2,forced:Object.assign!==p},{assign:p})},7427:function(l,v,i){var c=i(6518),p=i(3724),d=i(2551),m=i(9306),y=i(8981),b=i(4913);p&&c({target:"Object",proto:!0,forced:d},{__defineGetter__:function(C,S){b.f(y(this),C,{get:m(S),enumerable:!0,configurable:!0})}})},3851:function(l,v,i){var c=i(6518),p=i(9039),d=i(5397),m=i(7347).f,y=i(3724);c({target:"Object",stat:!0,forced:!y||p(function(){m(1)}),sham:!y},{getOwnPropertyDescriptor:function(b,C){return m(d(b),C)}})},1278:function(l,v,i){var c=i(6518),p=i(3724),d=i(5031),m=i(5397),y=i(7347),b=i(4659);c({target:"Object",stat:!0,sham:!p},{getOwnPropertyDescriptors:function(C){for(var S,k,B=m(C),O=y.f,j=d(B),I={},D=0;j.length>D;)(k=O(B,S=j[D++]))!==void 0&&b(I,S,k);return I}})},1480:function(l,v,i){var c=i(6518),p=i(9039),d=i(298).f;c({target:"Object",stat:!0,forced:p(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:d})},9773:function(l,v,i){var c=i(6518),p=i(4495),d=i(9039),m=i(3717),y=i(8981);c({target:"Object",stat:!0,forced:!p||d(function(){m.f(1)})},{getOwnPropertySymbols:function(b){var C=m.f;return C?C(y(b)):[]}})},9432:function(l,v,i){var c=i(6518),p=i(8981),d=i(1072);c({target:"Object",stat:!0,forced:i(9039)(function(){d(1)})},{keys:function(m){return d(p(m))}})},6099:function(l,v,i){var c=i(2140),p=i(6840),d=i(3179);c||p(Object.prototype,"toString",d,{unsafe:!0})},4864:function(l,v,i){var c=i(3724),p=i(4475),d=i(9504),m=i(2796),y=i(3167),b=i(6699),C=i(2360),S=i(8480).f,k=i(1625),B=i(788),O=i(655),j=i(1034),I=i(8429),D=i(1056),M=i(6840),$=i(9039),P=i(9297),L=i(1181).enforce,q=i(7633),K=i(8227),Q=i(3635),Z=i(8814),ee=K("match"),ue=p.RegExp,ne=ue.prototype,me=p.SyntaxError,de=d(ne.exec),V=d("".charAt),U=d("".replace),J=d("".indexOf),w=d("".slice),_=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,N=/a/g,R=/a/g,W=new ue(N)!==N,G=I.MISSED_STICKY,X=I.UNSUPPORTED_Y;if(m("RegExp",c&&(!W||G||Q||Z||$(function(){return R[ee]=!1,ue(N)!==N||ue(R)===R||String(ue(N,"i"))!=="/a/i"})))){for(var F=function(re,oe){var ge,ae,be,Ce,Fe,Ae,Ve=k(ne,this),ze=B(re),wt=oe===void 0,Ke=[],et=re;if(!Ve&&ze&&wt&&re.constructor===F)return re;if((ze||k(ne,re))&&(re=re.source,wt&&(oe=j(et))),re=re===void 0?"":O(re),oe=oe===void 0?"":O(oe),et=re,Q&&"dotAll"in N&&(ae=!!oe&&J(oe,"s")>-1)&&(oe=U(oe,/s/g,"")),ge=oe,G&&"sticky"in N&&(be=!!oe&&J(oe,"y")>-1)&&X&&(oe=U(oe,/y/g,"")),Z&&(Ce=function(We){for(var Ee,Lt=We.length,ut=0,mt="",ht=[],Wt=C(null),gt=!1,Bt=!1,yt=0,xt="";ut<=Lt;ut++){if((Ee=V(We,ut))==="\\")Ee+=V(We,++ut);else if(Ee==="]")gt=!1;else if(!gt)switch(!0){case Ee==="[":gt=!0;break;case Ee==="(":de(_,w(We,ut+1))&&(ut+=2,Bt=!0),mt+=Ee,yt++;continue;case(Ee===">"&&Bt):if(xt===""||P(Wt,xt))throw new me("Invalid capture group name");Wt[xt]=!0,ht[ht.length]=[xt,yt],Bt=!1,xt="";continue}Bt?xt+=Ee:mt+=Ee}return[mt,ht]}(re),re=Ce[0],Ke=Ce[1]),Fe=y(ue(re,oe),Ve?this:ne,F),(ae||be||Ke.length)&&(Ae=L(Fe),ae&&(Ae.dotAll=!0,Ae.raw=F(function(We){for(var Ee,Lt=We.length,ut=0,mt="",ht=!1;ut<=Lt;ut++)(Ee=V(We,ut))!=="\\"?ht||Ee!=="."?(Ee==="["?ht=!0:Ee==="]"&&(ht=!1),mt+=Ee):mt+="[\\s\\S]":mt+=Ee+V(We,++ut);return mt}(re),ge)),be&&(Ae.sticky=!0),Ke.length&&(Ae.groups=Ke)),re!==et)try{b(Fe,"source",et===""?"(?:)":et)}catch{}return Fe},ce=S(ue),fe=0;ce.length>fe;)D(F,ue,ce[fe++]);ne.constructor=F,F.prototype=ne,M(p,"RegExp",F,{constructor:!0})}q("RegExp")},7495:function(l,v,i){var c=i(6518),p=i(7323);c({target:"RegExp",proto:!0,forced:/./.exec!==p},{exec:p})},8781:function(l,v,i){var c=i(350).PROPER,p=i(6840),d=i(8551),m=i(655),y=i(9039),b=i(1034),C="toString",S=RegExp.prototype,k=S[C],B=y(function(){return k.call({source:"a",flags:"b"})!=="/a/b"}),O=c&&k.name!==C;(B||O)&&p(S,C,function(){var j=d(this);return"/"+m(j.source)+"/"+m(b(j))},{unsafe:!0})},1699:function(l,v,i){var c=i(6518),p=i(9504),d=i(5749),m=i(7750),y=i(655),b=i(1436),C=p("".indexOf);c({target:"String",proto:!0,forced:!b("includes")},{includes:function(S){return!!~C(y(m(this)),y(d(S)),arguments.length>1?arguments[1]:void 0)}})},7764:function(l,v,i){var c=i(8183).charAt,p=i(655),d=i(1181),m=i(1088),y=i(2529),b="String Iterator",C=d.set,S=d.getterFor(b);m(String,"String",function(k){C(this,{type:b,string:p(k),index:0})},function(){var k,B=S(this),O=B.string,j=B.index;return j>=O.length?y(void 0,!0):(k=c(O,j),B.index+=k.length,y(k,!1))})},8543:function(l,v,i){var c=i(6518),p=i(9565),d=i(7476),m=i(3994),y=i(2529),b=i(7750),C=i(8014),S=i(655),k=i(8551),B=i(4117),O=i(4576),j=i(788),I=i(1034),D=i(5966),M=i(6840),$=i(9039),P=i(8227),L=i(2293),q=i(7829),K=i(6682),Q=i(1181),Z=i(6395),ee=P("matchAll"),ue="RegExp String",ne=ue+" Iterator",me=Q.set,de=Q.getterFor(ne),V=RegExp.prototype,U=TypeError,J=d("".indexOf),w=d("".matchAll),_=!!w&&!$(function(){w("a",/./)}),N=m(function(W,G,X,F){me(this,{type:ne,regexp:W,string:G,global:X,unicode:F,done:!1})},ue,function(){var W=de(this);if(W.done)return y(void 0,!0);var G=W.regexp,X=W.string,F=K(G,X);return F===null?(W.done=!0,y(void 0,!0)):W.global?(S(F[0])===""&&(G.lastIndex=q(X,C(G.lastIndex),W.unicode)),y(F,!1)):(W.done=!0,y(F,!1))}),R=function(W){var G,X,F,ce=k(this),fe=S(W),re=L(ce,RegExp),oe=S(I(ce));return G=new re(re===RegExp?ce.source:ce,oe),X=!!~J(oe,"g"),F=!!~J(oe,"u"),G.lastIndex=C(ce.lastIndex),new N(G,fe,X,F)};c({target:"String",proto:!0,forced:_},{matchAll:function(W){var G,X,F,ce,fe=b(this);if(B(W)){if(_)return w(fe,W)}else{if(j(W)&&(G=S(b(I(W))),!~J(G,"g")))throw new U("`.matchAll` does not allow non-global regexes");if(_)return w(fe,W);if((F=D(W,ee))===void 0&&Z&&O(W)==="RegExp"&&(F=R),F)return p(F,W,fe)}return X=S(fe),ce=new RegExp(W,"g"),Z?p(R,ce,X):ce[ee](X)}}),Z||ee in V||M(V,ee,R)},1761:function(l,v,i){var c=i(9565),p=i(9228),d=i(8551),m=i(4117),y=i(8014),b=i(655),C=i(7750),S=i(5966),k=i(7829),B=i(6682);p("match",function(O,j,I){return[function(D){var M=C(this),$=m(D)?void 0:S(D,O);return $?c($,D,M):new RegExp(D)[O](b(M))},function(D){var M=d(this),$=b(D),P=I(j,M,$);if(P.done)return P.value;if(!M.global)return B(M,$);var L=M.unicode;M.lastIndex=0;for(var q,K=[],Q=0;(q=B(M,$))!==null;){var Z=b(q[0]);K[Q]=Z,Z===""&&(M.lastIndex=k($,y(M.lastIndex),L)),Q++}return Q===0?null:K}]})},5440:function(l,v,i){var c=i(8745),p=i(9565),d=i(9504),m=i(9228),y=i(9039),b=i(8551),C=i(4901),S=i(4117),k=i(1291),B=i(8014),O=i(655),j=i(7750),I=i(7829),D=i(5966),M=i(2478),$=i(6682),P=i(8227)("replace"),L=Math.max,q=Math.min,K=d([].concat),Q=d([].push),Z=d("".indexOf),ee=d("".slice),ue="a".replace(/./,"$0")==="$0",ne=!!/./[P]&&/./[P]("a","$0")==="";m("replace",function(me,de,V){var U=ne?"$":"$0";return[function(J,w){var _=j(this),N=S(J)?void 0:D(J,P);return N?p(N,J,_,w):p(de,O(_),J,w)},function(J,w){var _=b(this),N=O(J);if(typeof w=="string"&&Z(w,U)===-1&&Z(w,"$<")===-1){var R=V(de,_,N,w);if(R.done)return R.value}var W=C(w);W||(w=O(w));var G,X=_.global;X&&(G=_.unicode,_.lastIndex=0);for(var F,ce=[];(F=$(_,N))!==null&&(Q(ce,F),X);)O(F[0])===""&&(_.lastIndex=I(N,B(_.lastIndex),G));for(var fe,re="",oe=0,ge=0;ge<ce.length;ge++){for(var ae,be=O((F=ce[ge])[0]),Ce=L(q(k(F.index),N.length),0),Fe=[],Ae=1;Ae<F.length;Ae++)Q(Fe,(fe=F[Ae])===void 0?fe:String(fe));var Ve=F.groups;if(W){var ze=K([be],Fe,Ce,N);Ve!==void 0&&Q(ze,Ve),ae=O(c(w,void 0,ze))}else ae=M(be,N,Ce,Fe,Ve,w);Ce>=oe&&(re+=ee(N,oe,Ce)+ae,oe=Ce+be.length)}return re+ee(N,oe)}]},!!y(function(){var me=/./;return me.exec=function(){var de=[];return de.groups={a:"7"},de},"".replace(me,"$<a>")!=="7"})||!ue||ne)},744:function(l,v,i){var c=i(9565),p=i(9504),d=i(9228),m=i(8551),y=i(4117),b=i(7750),C=i(2293),S=i(7829),k=i(8014),B=i(655),O=i(5966),j=i(6682),I=i(8429),D=i(9039),M=I.UNSUPPORTED_Y,$=Math.min,P=p([].push),L=p("".slice),q=!D(function(){var Q=/(?:)/,Z=Q.exec;Q.exec=function(){return Z.apply(this,arguments)};var ee="ab".split(Q);return ee.length!==2||ee[0]!=="a"||ee[1]!=="b"}),K="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;d("split",function(Q,Z,ee){var ue="0".split(void 0,0).length?function(ne,me){return ne===void 0&&me===0?[]:c(Z,this,ne,me)}:Z;return[function(ne,me){var de=b(this),V=y(ne)?void 0:O(ne,Q);return V?c(V,ne,de,me):c(ue,B(de),ne,me)},function(ne,me){var de=m(this),V=B(ne);if(!K){var U=ee(ue,de,V,me,ue!==Z);if(U.done)return U.value}var J=C(de,RegExp),w=de.unicode,_=(de.ignoreCase?"i":"")+(de.multiline?"m":"")+(de.unicode?"u":"")+(M?"g":"y"),N=new J(M?"^(?:"+de.source+")":de,_),R=me===void 0?4294967295:me>>>0;if(R===0)return[];if(V.length===0)return j(N,V)===null?[V]:[];for(var W=0,G=0,X=[];G<V.length;){N.lastIndex=M?0:G;var F,ce=j(N,M?L(V,G):V);if(ce===null||(F=$(k(N.lastIndex+(M?G:0)),V.length))===W)G=S(V,G,w);else{if(P(X,L(V,W,G)),X.length===R)return X;for(var fe=1;fe<=ce.length-1;fe++)if(P(X,ce[fe]),X.length===R)return X;G=W=F}}return P(X,L(V,W)),X}]},K||!q,M)},2762:function(l,v,i){var c=i(6518),p=i(3802).trim;c({target:"String",proto:!0,forced:i(706)("trim")},{trim:function(){return p(this)}})},6761:function(l,v,i){var c=i(6518),p=i(4475),d=i(9565),m=i(9504),y=i(6395),b=i(3724),C=i(4495),S=i(9039),k=i(9297),B=i(1625),O=i(8551),j=i(5397),I=i(6969),D=i(655),M=i(6980),$=i(2360),P=i(1072),L=i(8480),q=i(298),K=i(3717),Q=i(7347),Z=i(4913),ee=i(6801),ue=i(8773),ne=i(6840),me=i(2106),de=i(5745),V=i(6119),U=i(421),J=i(3392),w=i(8227),_=i(1951),N=i(511),R=i(8242),W=i(687),G=i(1181),X=i(9213).forEach,F=V("hidden"),ce="Symbol",fe="prototype",re=G.set,oe=G.getterFor(ce),ge=Object[fe],ae=p.Symbol,be=ae&&ae[fe],Ce=p.RangeError,Fe=p.TypeError,Ae=p.QObject,Ve=Q.f,ze=Z.f,wt=q.f,Ke=ue.f,et=m([].push),We=de("symbols"),Ee=de("op-symbols"),Lt=de("wks"),ut=!Ae||!Ae[fe]||!Ae[fe].findChild,mt=function(A,z,Y){var ie=Ve(ge,z);ie&&delete ge[z],ze(A,z,Y),ie&&A!==ge&&ze(ge,z,ie)},ht=b&&S(function(){return $(ze({},"a",{get:function(){return ze(this,"a",{value:7}).a}})).a!==7})?mt:ze,Wt=function(A,z){var Y=We[A]=$(be);return re(Y,{type:ce,tag:A,description:z}),b||(Y.description=z),Y},gt=function(A,z,Y){A===ge&&gt(Ee,z,Y),O(A);var ie=I(z);return O(Y),k(We,ie)?(Y.enumerable?(k(A,F)&&A[F][ie]&&(A[F][ie]=!1),Y=$(Y,{enumerable:M(0,!1)})):(k(A,F)||ze(A,F,M(1,$(null))),A[F][ie]=!0),ht(A,ie,Y)):ze(A,ie,Y)},Bt=function(A,z){O(A);var Y=j(z),ie=P(Y).concat(_n(Y));return X(ie,function(he){b&&!d(yt,Y,he)||gt(A,he,Y[he])}),A},yt=function(A){var z=I(A),Y=d(Ke,this,z);return!(this===ge&&k(We,z)&&!k(Ee,z))&&(!(Y||!k(this,z)||!k(We,z)||k(this,F)&&this[F][z])||Y)},xt=function(A,z){var Y=j(A),ie=I(z);if(Y!==ge||!k(We,ie)||k(Ee,ie)){var he=Ve(Y,ie);return!he||!k(We,ie)||k(Y,F)&&Y[F][ie]||(he.enumerable=!0),he}},on=function(A){var z=wt(j(A)),Y=[];return X(z,function(ie){k(We,ie)||k(U,ie)||et(Y,ie)}),Y},_n=function(A){var z=A===ge,Y=wt(z?Ee:j(A)),ie=[];return X(Y,function(he){!k(We,he)||z&&!k(ge,he)||et(ie,We[he])}),ie};C||(ae=function(){if(B(be,this))throw new Fe("Symbol is not a constructor");var A=arguments.length&&arguments[0]!==void 0?D(arguments[0]):void 0,z=J(A),Y=function(ie){var he=this===void 0?p:this;he===ge&&d(Y,Ee,ie),k(he,F)&&k(he[F],z)&&(he[F][z]=!1);var Pe=M(1,ie);try{ht(he,z,Pe)}catch(we){if(!(we instanceof Ce))throw we;mt(he,z,Pe)}};return b&&ut&&ht(ge,z,{configurable:!0,set:Y}),Wt(z,A)},ne(be=ae[fe],"toString",function(){return oe(this).tag}),ne(ae,"withoutSetter",function(A){return Wt(J(A),A)}),ue.f=yt,Z.f=gt,ee.f=Bt,Q.f=xt,L.f=q.f=on,K.f=_n,_.f=function(A){return Wt(w(A),A)},b&&(me(be,"description",{configurable:!0,get:function(){return oe(this).description}}),y||ne(ge,"propertyIsEnumerable",yt,{unsafe:!0}))),c({global:!0,constructor:!0,wrap:!0,forced:!C,sham:!C},{Symbol:ae}),X(P(Lt),function(A){N(A)}),c({target:ce,stat:!0,forced:!C},{useSetter:function(){ut=!0},useSimple:function(){ut=!1}}),c({target:"Object",stat:!0,forced:!C,sham:!b},{create:function(A,z){return z===void 0?$(A):Bt($(A),z)},defineProperty:gt,defineProperties:Bt,getOwnPropertyDescriptor:xt}),c({target:"Object",stat:!0,forced:!C},{getOwnPropertyNames:on}),R(),W(ae,ce),U[F]=!0},9463:function(l,v,i){var c=i(6518),p=i(3724),d=i(4475),m=i(9504),y=i(9297),b=i(4901),C=i(1625),S=i(655),k=i(2106),B=i(7740),O=d.Symbol,j=O&&O.prototype;if(p&&b(O)&&(!("description"in j)||O().description!==void 0)){var I={},D=function(){var Q=arguments.length<1||arguments[0]===void 0?void 0:S(arguments[0]),Z=C(j,this)?new O(Q):Q===void 0?O():O(Q);return Q===""&&(I[Z]=!0),Z};B(D,O),D.prototype=j,j.constructor=D;var M=String(O("description detection"))==="Symbol(description detection)",$=m(j.valueOf),P=m(j.toString),L=/^Symbol\((.*)\)[^)]+$/,q=m("".replace),K=m("".slice);k(j,"description",{configurable:!0,get:function(){var Q=$(this);if(y(I,Q))return"";var Z=P(Q),ee=M?K(Z,7,-1):q(Z,L,"$1");return ee===""?void 0:ee}}),c({global:!0,constructor:!0,forced:!0},{Symbol:D})}},1510:function(l,v,i){var c=i(6518),p=i(7751),d=i(9297),m=i(655),y=i(5745),b=i(1296),C=y("string-to-symbol-registry"),S=y("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!b},{for:function(k){var B=m(k);if(d(C,B))return C[B];var O=p("Symbol")(B);return C[B]=O,S[O]=B,O}})},2259:function(l,v,i){i(511)("iterator")},2675:function(l,v,i){i(6761),i(1510),i(7812),i(3110),i(9773)},7812:function(l,v,i){var c=i(6518),p=i(9297),d=i(757),m=i(6823),y=i(5745),b=i(1296),C=y("symbol-to-string-registry");c({target:"Symbol",stat:!0,forced:!b},{keyFor:function(S){if(!d(S))throw new TypeError(m(S)+" is not a symbol");if(p(C,S))return C[S]}})},5700:function(l,v,i){var c=i(511),p=i(8242);c("toPrimitive"),p()},8344:function(l,v,i){i(8543)},3500:function(l,v,i){var c=i(4475),p=i(7400),d=i(9296),m=i(235),y=i(6699),b=function(S){if(S&&S.forEach!==m)try{y(S,"forEach",m)}catch{S.forEach=m}};for(var C in p)p[C]&&b(c[C]&&c[C].prototype);b(d)},2953:function(l,v,i){var c=i(4475),p=i(7400),d=i(9296),m=i(3792),y=i(6699),b=i(687),C=i(8227)("iterator"),S=m.values,k=function(O,j){if(O){if(O[C]!==S)try{y(O,C,S)}catch{O[C]=S}if(b(O,j,!0),p[j]){for(var I in m)if(O[I]!==m[I])try{y(O,I,m[I])}catch{O[I]=m[I]}}}};for(var B in p)k(c[B]&&c[B].prototype,B);k(d,"DOMTokenList")}},g={};function h(l){var v=g[l];if(v!==void 0)return v.exports;var i=g[l]={exports:{}};return f[l].call(i.exports,i,i.exports,h),i.exports}h.d=function(l,v){for(var i in v)h.o(v,i)&&!h.o(l,i)&&Object.defineProperty(l,i,{enumerable:!0,get:v[i]})},h.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),h.o=function(l,v){return Object.prototype.hasOwnProperty.call(l,v)},h.r=function(l){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})};var x={};return function(){function l(V){return function(U){if(Array.isArray(U))return i(U)}(V)||function(U){if(typeof Symbol<"u"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}(V)||v(V)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
69
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function v(V,U){if(V){if(typeof V=="string")return i(V,U);var J=Object.prototype.toString.call(V).slice(8,-1);return J==="Object"&&V.constructor&&(J=V.constructor.name),J==="Map"||J==="Set"?Array.from(V):J==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(J)?i(V,U):void 0}}function i(V,U){(U==null||U>V.length)&&(U=V.length);for(var J=0,w=new Array(U);J<U;J++)w[J]=V[J];return w}function c(V){return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},c(V)}function p(V,U){for(var J=0;J<U.length;J++){var w=U[J];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,m(w.key),w)}}function d(V,U,J){return(U=m(U))in V?Object.defineProperty(V,U,{value:J,enumerable:!0,configurable:!0,writable:!0}):V[U]=J,V}function m(V){var U=function(J,w){if(c(J)!="object"||!J)return J;var _=J[Symbol.toPrimitive];if(_!==void 0){var N=_.call(J,w||"default");if(c(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(w==="string"?String:Number)(J)}(V,"string");return c(U)=="symbol"?U:U+""}h.r(x),h.d(x,{SimpleKeyboard:function(){return me},default:function(){return de}}),h(5276),h(8598),h(4782),h(4554),h(2010),h(7427),h(6099),h(7495),h(8781),h(5440),h(744),h(2762),typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(V){if("Element"in V){var U="classList",J="prototype",w=V.Element[J],_=Object,N=String[J].trim||function(){return this.replace(/^\s+|\s+$/g,"")},R=Array[J].indexOf||function(re){for(var oe=0,ge=this.length;oe<ge;oe++)if(oe in this&&this[oe]===re)return oe;return-1},W=function(re,oe){this.name=re,this.code=DOMException[re],this.message=oe},G=function(re,oe){if(oe==="")throw new W("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(oe))throw new W("INVALID_CHARACTER_ERR","The token must not contain space characters.");return R.call(re,oe)},X=function(re){for(var oe=N.call(re.getAttribute("class")||""),ge=oe?oe.split(/\s+/):[],ae=0,be=ge.length;ae<be;ae++)this.push(ge[ae]);this._updateClassName=function(){re.setAttribute("class",this.toString())}},F=X[J]=[],ce=function(){return new X(this)};if(W[J]=Error[J],F.item=function(re){return this[re]||null},F.contains=function(re){return~G(this,re+"")},F.add=function(){var re,oe=arguments,ge=0,ae=oe.length,be=!1;do~G(this,re=oe[ge]+"")||(this.push(re),be=!0);while(++ge<ae);be&&this._updateClassName()},F.remove=function(){var re,oe,ge=arguments,ae=0,be=ge.length,Ce=!1;do for(oe=G(this,re=ge[ae]+"");~oe;)this.splice(oe,1),Ce=!0,oe=G(this,re);while(++ae<be);Ce&&this._updateClassName()},F.toggle=function(re,oe){var ge=this.contains(re),ae=ge?oe!==!0&&"remove":oe!==!1&&"add";return ae&&this[ae](re),oe===!0||oe===!1?oe:!ge},F.replace=function(re,oe){var ge=G(re+"");~ge&&(this.splice(ge,1,oe),this._updateClassName())},F.toString=function(){return this.join(" ")},_.defineProperty){var fe={get:ce,enumerable:!0,configurable:!0};try{_.defineProperty(w,U,fe)}catch(re){re.number!==void 0&&re.number!==-2146823252||(fe.enumerable=!1,_.defineProperty(w,U,fe))}}else _[J].__defineGetter__&&w.__defineGetter__(U,ce)}}(self),function(){var V=document.createElement("_");if(V.classList.add("c1","c2"),!V.classList.contains("c2")){var U=function(w){var _=DOMTokenList.prototype[w];DOMTokenList.prototype[w]=function(N){var R,W=arguments.length;for(R=0;R<W;R++)N=arguments[R],_.call(this,N)}};U("add"),U("remove")}if(V.classList.toggle("c3",!1),V.classList.contains("c3")){var J=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(w,_){return 1 in arguments&&!this.contains(w)==!_?_:J.call(this,w)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(w,_){var N=this.toString().split(" "),R=N.indexOf(w+"");~R&&(N=N.slice(R),this.remove.apply(this,N),this.add(_),this.add.apply(this,N.slice(1)))}),V=null}()),h(2675),h(9463),h(2259),h(5700),h(8706),h(2008),h(3418),h(4423),h(3792),h(2062),h(6910),h(739),h(9572),h(2892),h(9085),h(3851),h(1278),h(9432),h(4864),h(1699),h(7764),h(8344),h(3500),h(2953),h(2712),h(2637),h(1480),h(1761);var y=function(){return V=function w(_){var N=_.getOptions,R=_.getCaretPosition,W=_.getCaretPositionEnd,G=_.dispatch;(function(X,F){if(!(X instanceof F))throw new TypeError("Cannot call a class as a function")})(this,w),d(this,"getOptions",void 0),d(this,"getCaretPosition",void 0),d(this,"getCaretPositionEnd",void 0),d(this,"dispatch",void 0),d(this,"maxLengthReached",void 0),d(this,"isStandardButton",function(X){return X&&!(X[0]==="{"&&X[X.length-1]==="}")}),this.getOptions=N,this.getCaretPosition=R,this.getCaretPositionEnd=W,this.dispatch=G,w.bindMethods(w,this)},U=[{key:"getButtonType",value:function(w){return w.includes("{")&&w.includes("}")&&w!=="{//}"?"functionBtn":"standardBtn"}},{key:"getButtonClass",value:function(w){var _=this.getButtonType(w),N=w.replace("{","").replace("}",""),R="";return _!=="standardBtn"&&(R=" hg-button-".concat(N)),"hg-".concat(_).concat(R)}},{key:"getDefaultDiplay",value:function(){return{"{bksp}":"backspace","{backspace}":"backspace","{enter}":"< enter","{shift}":"shift","{shiftleft}":"shift","{shiftright}":"shift","{alt}":"alt","{s}":"shift","{tab}":"tab","{lock}":"caps","{capslock}":"caps","{accept}":"Submit","{space}":" ","{//}":" ","{esc}":"esc","{escape}":"esc","{f1}":"f1","{f2}":"f2","{f3}":"f3","{f4}":"f4","{f5}":"f5","{f6}":"f6","{f7}":"f7","{f8}":"f8","{f9}":"f9","{f10}":"f10","{f11}":"f11","{f12}":"f12","{numpaddivide}":"/","{numlock}":"lock","{arrowup}":"↑","{arrowleft}":"←","{arrowdown}":"↓","{arrowright}":"→","{prtscr}":"print","{scrolllock}":"scroll","{pause}":"pause","{insert}":"ins","{home}":"home","{pageup}":"up","{delete}":"del","{forwarddelete}":"del","{end}":"end","{pagedown}":"down","{numpadmultiply}":"*","{numpadsubtract}":"-","{numpadadd}":"+","{numpadenter}":"enter","{period}":".","{numpaddecimal}":".","{numpad0}":"0","{numpad1}":"1","{numpad2}":"2","{numpad3}":"3","{numpad4}":"4","{numpad5}":"5","{numpad6}":"6","{numpad7}":"7","{numpad8}":"8","{numpad9}":"9"}}},{key:"getButtonDisplayName",value:function(w,_){return(_=arguments.length>2&&arguments[2]!==void 0&&arguments[2]?Object.assign({},this.getDefaultDiplay(),_):_||this.getDefaultDiplay())[w]||w}},{key:"getUpdatedInput",value:function(w,_,N){var R=arguments.length>3&&arguments[3]!==void 0?arguments[3]:N,W=arguments.length>4&&arguments[4]!==void 0&&arguments[4],G=this.getOptions(),X=[N,R,W],F=_;return(w==="{bksp}"||w==="{backspace}")&&F.length>0?F=this.removeAt.apply(this,[F].concat(X)):(w==="{delete}"||w==="{forwarddelete}")&&F.length>0?F=this.removeForwardsAt.apply(this,[F].concat(X)):w==="{space}"?F=this.addStringAt.apply(this,[F," "].concat(X)):w!=="{tab}"||typeof G.tabCharOnTab=="boolean"&&G.tabCharOnTab===!1?w!=="{enter}"&&w!=="{numpadenter}"||!G.newLineOnEnter?w.includes("numpad")&&Number.isInteger(Number(w[w.length-2]))?F=this.addStringAt.apply(this,[F,w[w.length-2]].concat(X)):w==="{numpaddivide}"?F=this.addStringAt.apply(this,[F,"/"].concat(X)):w==="{numpadmultiply}"?F=this.addStringAt.apply(this,[F,"*"].concat(X)):w==="{numpadsubtract}"?F=this.addStringAt.apply(this,[F,"-"].concat(X)):w==="{numpadadd}"?F=this.addStringAt.apply(this,[F,"+"].concat(X)):w==="{numpaddecimal}"?F=this.addStringAt.apply(this,[F,"."].concat(X)):w==="{"||w==="}"?F=this.addStringAt.apply(this,[F,w].concat(X)):w.includes("{")||w.includes("}")||(F=this.addStringAt.apply(this,[F,w].concat(X))):F=this.addStringAt.apply(this,[F,`
70
- `].concat(X)):F=this.addStringAt.apply(this,[F," "].concat(X)),G.debug&&console.log("Input will be: "+F),F}},{key:"updateCaretPos",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0&&arguments[1],N=this.updateCaretPosAction(w,_);this.dispatch(function(R){R.setCaretPosition(N)})}},{key:"updateCaretPosAction",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0&&arguments[1],N=this.getOptions(),R=this.getCaretPosition();return R!=null&&(_?R>0&&(R-=w):R+=w),N.debug&&console.log("Caret at:",R),R}},{key:"addStringAt",value:function(w,_){var N,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.length,W=arguments.length>3&&arguments[3]!==void 0?arguments[3]:w.length,G=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return R||R===0?(N=[w.slice(0,R),_,w.slice(W)].join(""),this.isMaxLengthReached()||G&&this.updateCaretPos(_.length)):N=w+_,N}},{key:"removeAt",value:function(w){var _,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w.length,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.length,W=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(N===0&&R===0)return w;if(N===R){var G=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;N&&N>=0?w.substring(N-2,N).match(G)?(_=w.substr(0,N-2)+w.substr(N),W&&this.updateCaretPos(2,!0)):(_=w.substr(0,N-1)+w.substr(N),W&&this.updateCaretPos(1,!0)):w.slice(-2).match(G)?(_=w.slice(0,-2),W&&this.updateCaretPos(2,!0)):(_=w.slice(0,-1),W&&this.updateCaretPos(1,!0))}else _=w.slice(0,N)+w.slice(R),W&&this.dispatch(function(X){X.setCaretPosition(N)});return _}},{key:"removeForwardsAt",value:function(w){var _,N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w.length,R=arguments.length>2&&arguments[2]!==void 0?arguments[2]:w.length,W=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return w!=null&&w.length&&N!==null?(N===R?_=w.substring(N,N+2).match(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g)?w.substr(0,N)+w.substr(N+2):w.substr(0,N)+w.substr(N+1):(_=w.slice(0,N)+w.slice(R),W&&this.dispatch(function(G){G.setCaretPosition(N)})),_):w}},{key:"handleMaxLength",value:function(w,_){var N=this.getOptions(),R=N.maxLength,W=w[N.inputName||"default"],G=_.length-1>=R;if(_.length<=W.length)return!1;if(Number.isInteger(R))return N.debug&&console.log("maxLength (num) reached:",G),G?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if(c(R)==="object"){var X=_.length-1>=R[N.inputName||"default"];return N.debug&&console.log("maxLength (obj) reached:",X),X?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return!!this.maxLengthReached}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return!!window.PointerEvent}},{key:"camelCase",value:function(w){return w?w.toLowerCase().trim().split(/[.\-_\s]/g).reduce(function(_,N){return N.length?_+N[0].toUpperCase()+N.slice(1):_}):""}},{key:"chunkArray",value:function(w,_){return l(Array(Math.ceil(w.length/_))).map(function(N,R){return w.slice(_*R,_+_*R)})}},{key:"escapeRegex",value:function(w){return w.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"getRtlOffset",value:function(w,_){var N=w,R=_.indexOf("‫");return R<w&&R!=-1&&N--,_.indexOf("‬")<w&&R!=-1&&N--,N<0?0:N}}],J=[{key:"bindMethods",value:function(w,_){var N,R=function(G,X){var F=typeof Symbol<"u"&&G[Symbol.iterator]||G["@@iterator"];if(!F){if(Array.isArray(G)||(F=v(G))||X){F&&(G=F);var ce=0,fe=function(){};return{s:fe,n:function(){return ce>=G.length?{done:!0}:{done:!1,value:G[ce++]}},e:function(ae){throw ae},f:fe}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
71
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var re,oe=!0,ge=!1;return{s:function(){F=F.call(G)},n:function(){var ae=F.next();return oe=ae.done,ae},e:function(ae){ge=!0,re=ae},f:function(){try{oe||F.return==null||F.return()}finally{if(ge)throw re}}}}(Object.getOwnPropertyNames(w.prototype));try{for(R.s();!(N=R.n()).done;){var W=N.value;W==="constructor"||W==="bindMethods"||(_[W]=_[W].bind(_))}}catch(G){R.e(G)}finally{R.f()}}}],U&&p(V.prototype,U),J&&p(V,J),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,J}();d(y,"noop",function(){});var b=y;function C(V){return C=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},C(V)}function S(V,U){for(var J=0;J<U.length;J++){var w=U[J];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,B(w.key),w)}}function k(V,U,J){return(U=B(U))in V?Object.defineProperty(V,U,{value:J,enumerable:!0,configurable:!0,writable:!0}):V[U]=J,V}function B(V){var U=function(J,w){if(C(J)!="object"||!J)return J;var _=J[Symbol.toPrimitive];if(_!==void 0){var N=_.call(J,w);if(C(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(V,"string");return C(U)=="symbol"?U:U+""}var O=function(){return V=function w(_){var N=this,R=_.dispatch,W=_.getOptions;(function(G,X){if(!(G instanceof X))throw new TypeError("Cannot call a class as a function")})(this,w),k(this,"getOptions",void 0),k(this,"dispatch",void 0),k(this,"isModifierKey",function(G){return G.altKey||G.ctrlKey||G.shiftKey||["Tab","CapsLock","Esc","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(G.code||G.key||N.keyCodeToKey(G==null?void 0:G.keyCode))}),this.dispatch=R,this.getOptions=W,b.bindMethods(w,this)},(U=[{key:"handleHighlightKeyDown",value:function(w){var _=this.getOptions();_.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(w)&&(w.preventDefault(),w.stopImmediatePropagation());var N=this.getSimpleKeyboardLayoutKey(w);this.dispatch(function(R){var W,G,X=R.getButtonElement(N),F=R.getButtonElement("{".concat(N,"}"));if(X)W=X,G=N;else{if(!F)return;W=F,G="{".concat(N,"}")}var ce,fe,re,oe,ge=function(be){be.style.background=_.physicalKeyboardHighlightBgColor||"#dadce4",be.style.color=_.physicalKeyboardHighlightTextColor||"black"};if(W)if(Array.isArray(W)){if(W.forEach(function(be){return ge(be)}),_.physicalKeyboardHighlightPress)if(_.physicalKeyboardHighlightPressUsePointerEvents)(ce=W[0])===null||ce===void 0||(fe=ce.onpointerdown)===null||fe===void 0||fe.call(ce,w);else if(_.physicalKeyboardHighlightPressUseClick){var ae;(ae=W[0])===null||ae===void 0||ae.click()}else R.handleButtonClicked(G,w)}else ge(W),_.physicalKeyboardHighlightPress&&(_.physicalKeyboardHighlightPressUsePointerEvents?(re=W)===null||re===void 0||(oe=re.onpointerdown)===null||oe===void 0||oe.call(re,w):_.physicalKeyboardHighlightPressUseClick?W.click():R.handleButtonClicked(G,w))})}},{key:"handleHighlightKeyUp",value:function(w){var _=this.getOptions();_.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(w)&&(w.preventDefault(),w.stopImmediatePropagation());var N=this.getSimpleKeyboardLayoutKey(w);this.dispatch(function(R){var W,G,X,F=R.getButtonElement(N)||R.getButtonElement("{".concat(N,"}")),ce=function(fe){fe.removeAttribute&&fe.removeAttribute("style")};F&&(Array.isArray(F)?(F.forEach(function(fe){return ce(fe)}),_.physicalKeyboardHighlightPressUsePointerEvents&&((W=F[0])===null||W===void 0||(G=W.onpointerup)===null||G===void 0||G.call(W,w))):(ce(F),_.physicalKeyboardHighlightPressUsePointerEvents&&(F==null||(X=F.onpointerup)===null||X===void 0||X.call(F,w))))})}},{key:"getSimpleKeyboardLayoutKey",value:function(w){var _,N="",R=w.code||w.key||this.keyCodeToKey(w==null?void 0:w.keyCode);return(N=R!=null&&R.includes("Numpad")||R!=null&&R.includes("Shift")||R!=null&&R.includes("Space")||R!=null&&R.includes("Backspace")||R!=null&&R.includes("Control")||R!=null&&R.includes("Alt")||R!=null&&R.includes("Meta")?w.code||"":w.key||this.keyCodeToKey(w==null?void 0:w.keyCode)||"").length>1?(_=N)===null||_===void 0?void 0:_.toLowerCase():N}},{key:"keyCodeToKey",value:function(w){return{8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",91:"Meta",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}[w]||""}}])&&S(V.prototype,U),J&&S(V,J),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,J}();function j(V){return j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},j(V)}function I(V,U){for(var J=0;J<U.length;J++){var w=U[J];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,M(w.key),w)}}function D(V,U,J){return(U=M(U))in V?Object.defineProperty(V,U,{value:J,enumerable:!0,configurable:!0,writable:!0}):V[U]=J,V}function M(V){var U=function(J,w){if(j(J)!="object"||!J)return J;var _=J[Symbol.toPrimitive];if(_!==void 0){var N=_.call(J,w);if(j(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(V,"string");return j(U)=="symbol"?U:U+""}var $=function(){return V=function w(_){var N=_.utilities,R=_.options;(function(W,G){if(!(W instanceof G))throw new TypeError("Cannot call a class as a function")})(this,w),D(this,"utilities",void 0),D(this,"options",void 0),D(this,"candidateBoxElement",void 0),D(this,"pageIndex",0),D(this,"pageSize",void 0),this.utilities=N,this.options=R,b.bindMethods(w,this),this.pageSize=this.utilities.getOptions().layoutCandidatesPageSize||5},U=[{key:"destroy",value:function(){this.candidateBoxElement&&(this.candidateBoxElement.remove(),this.pageIndex=0)}},{key:"show",value:function(w){var _=this,N=w.candidateValue,R=w.targetElement,W=w.onSelect;if(N&&N.length){var G=this.utilities.chunkArray(N.split(" "),this.pageSize);this.renderPage({candidateListPages:G,targetElement:R,pageIndex:this.pageIndex,nbPages:G.length,onItemSelected:function(X,F){W(X,F),_.destroy()}})}}},{key:"renderPage",value:function(w){var _,N=this,R=w.candidateListPages,W=w.targetElement,G=w.pageIndex,X=w.nbPages,F=w.onItemSelected;(_=this.candidateBoxElement)===null||_===void 0||_.remove(),this.candidateBoxElement=document.createElement("div"),this.candidateBoxElement.className="hg-candidate-box";var ce=document.createElement("ul");ce.className="hg-candidate-box-list",R[G].forEach(function(Ce){var Fe,Ae=document.createElement("li"),Ve=function(){var ze=new(N.options.useTouchEvents?TouchEvent:MouseEvent)("click");return Object.defineProperty(ze,"target",{value:Ae}),ze};Ae.className="hg-candidate-box-list-item",Ae.innerHTML=((Fe=N.options.display)===null||Fe===void 0?void 0:Fe[Ce])||Ce,N.options.useTouchEvents?Ae.ontouchstart=function(ze){return F(Ce,ze||Ve())}:Ae.onclick=function(){var ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ve();return F(Ce,ze)},ce.appendChild(Ae)});var fe=G>0,re=document.createElement("div");re.classList.add("hg-candidate-box-prev"),fe&&re.classList.add("hg-candidate-box-btn-active");var oe=function(){fe&&N.renderPage({candidateListPages:R,targetElement:W,pageIndex:G-1,nbPages:X,onItemSelected:F})};this.options.useTouchEvents?re.ontouchstart=oe:re.onclick=oe,this.candidateBoxElement.appendChild(re),this.candidateBoxElement.appendChild(ce);var ge=G<X-1,ae=document.createElement("div");ae.classList.add("hg-candidate-box-next"),ge&&ae.classList.add("hg-candidate-box-btn-active");var be=function(){ge&&N.renderPage({candidateListPages:R,targetElement:W,pageIndex:G+1,nbPages:X,onItemSelected:F})};this.options.useTouchEvents?ae.ontouchstart=be:ae.onclick=be,this.candidateBoxElement.appendChild(ae),W.prepend(this.candidateBoxElement)}}],U&&I(V.prototype,U),J&&I(V,J),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,J}(),P=$;function L(V){return function(U){if(Array.isArray(U))return q(U)}(V)||function(U){if(typeof Symbol<"u"&&U[Symbol.iterator]!=null||U["@@iterator"]!=null)return Array.from(U)}(V)||function(U,J){if(U){if(typeof U=="string")return q(U,J);var w=Object.prototype.toString.call(U).slice(8,-1);return w==="Object"&&U.constructor&&(w=U.constructor.name),w==="Map"||w==="Set"?Array.from(U):w==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(w)?q(U,J):void 0}}(V)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
72
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function q(V,U){(U==null||U>V.length)&&(U=V.length);for(var J=0,w=new Array(U);J<U;J++)w[J]=V[J];return w}function K(V){return K=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},K(V)}function Q(V,U){var J=Object.keys(V);if(Object.getOwnPropertySymbols){var w=Object.getOwnPropertySymbols(V);U&&(w=w.filter(function(_){return Object.getOwnPropertyDescriptor(V,_).enumerable})),J.push.apply(J,w)}return J}function Z(V,U){for(var J=0;J<U.length;J++){var w=U[J];w.enumerable=w.enumerable||!1,w.configurable=!0,"value"in w&&(w.writable=!0),Object.defineProperty(V,ue(w.key),w)}}function ee(V,U,J){return(U=ue(U))in V?Object.defineProperty(V,U,{value:J,enumerable:!0,configurable:!0,writable:!0}):V[U]=J,V}function ue(V){var U=function(J,w){if(K(J)!="object"||!J)return J;var _=J[Symbol.toPrimitive];if(_!==void 0){var N=_.call(J,w);if(K(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(J)}(V,"string");return K(U)=="symbol"?U:U+""}var ne=function(){return V=function w(_,N){var R=this;if(function(oe,ge){if(!(oe instanceof ge))throw new TypeError("Cannot call a class as a function")}(this,w),ee(this,"input",void 0),ee(this,"options",void 0),ee(this,"utilities",void 0),ee(this,"caretPosition",void 0),ee(this,"caretPositionEnd",void 0),ee(this,"keyboardDOM",void 0),ee(this,"keyboardPluginClasses",void 0),ee(this,"keyboardDOMClass",void 0),ee(this,"buttonElements",void 0),ee(this,"currentInstanceName",void 0),ee(this,"allKeyboardInstances",void 0),ee(this,"keyboardInstanceNames",void 0),ee(this,"isFirstKeyboardInstance",void 0),ee(this,"physicalKeyboard",void 0),ee(this,"modules",void 0),ee(this,"activeButtonClass",void 0),ee(this,"holdInteractionTimeout",void 0),ee(this,"holdTimeout",void 0),ee(this,"isMouseHold",void 0),ee(this,"initialized",void 0),ee(this,"candidateBox",void 0),ee(this,"keyboardRowsDOM",void 0),ee(this,"defaultName","default"),ee(this,"activeInputElement",null),ee(this,"handleParams",function(oe,ge){var ae,be,Ce;if(typeof oe=="string")ae=oe.split(".").join(""),be=document.querySelector(".".concat(ae)),Ce=ge;else if(oe instanceof HTMLDivElement){if(!oe.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");ae=oe.className.split(" ")[0],be=oe,Ce=ge}else ae="simple-keyboard",be=document.querySelector(".".concat(ae)),Ce=oe;return{keyboardDOMClass:ae,keyboardDOM:be,options:Ce}}),ee(this,"getOptions",function(){return R.options}),ee(this,"getCaretPosition",function(){return R.caretPosition}),ee(this,"getCaretPositionEnd",function(){return R.caretPositionEnd}),ee(this,"registerModule",function(oe,ge){R.modules[oe]||(R.modules[oe]={}),ge(R.modules[oe])}),ee(this,"getKeyboardClassString",function(){for(var oe=arguments.length,ge=new Array(oe),ae=0;ae<oe;ae++)ge[ae]=arguments[ae];return[R.keyboardDOMClass].concat(ge).filter(function(be){return!!be}).join(" ")}),typeof window<"u"){var W=this.handleParams(_,N),G=W.keyboardDOMClass,X=W.keyboardDOM,F=W.options,ce=F===void 0?{}:F;this.utilities=new b({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=X,this.options=function(oe){for(var ge=1;ge<arguments.length;ge++){var ae=arguments[ge]!=null?arguments[ge]:{};ge%2?Q(Object(ae),!0).forEach(function(be){ee(oe,be,ae[be])}):Object.getOwnPropertyDescriptors?Object.defineProperties(oe,Object.getOwnPropertyDescriptors(ae)):Q(Object(ae)).forEach(function(be){Object.defineProperty(oe,be,Object.getOwnPropertyDescriptor(ae,be))})}return oe}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},ce),this.keyboardPluginClasses="",b.bindMethods(w,this);var fe=this.options.inputName,re=fe===void 0?this.defaultName:fe;if(this.input={},this.input[re]="",this.keyboardDOMClass=G,this.buttonElements={},window.SimpleKeyboardInstances||(window.SimpleKeyboardInstances={}),this.currentInstanceName=this.utilities.camelCase(this.keyboardDOMClass),window.SimpleKeyboardInstances[this.currentInstanceName]=this,this.allKeyboardInstances=window.SimpleKeyboardInstances,this.keyboardInstanceNames=Object.keys(window.SimpleKeyboardInstances),this.isFirstKeyboardInstance=this.keyboardInstanceNames[0]===this.currentInstanceName,this.physicalKeyboard=new O({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new P({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(G,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},U=[{key:"setCaretPosition",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:w;this.caretPosition=w,this.caretPositionEnd=_}},{key:"getInputCandidates",value:function(w){var _=this,N=this.options,R=N.layoutCandidates,W=N.layoutCandidatesCaseSensitiveMatch;if(!R||K(R)!=="object")return{};var G=Object.keys(R).filter(function(ce){var fe=w.substring(0,_.getCaretPositionEnd()||0)||w,re=new RegExp("".concat(_.utilities.escapeRegex(ce),"$"),W?"g":"gi");return!!L(fe.matchAll(re)).length});if(G.length>1){var X=G.sort(function(ce,fe){return fe.length-ce.length})[0];return{candidateKey:X,candidateValue:R[X]}}if(G.length){var F=G[0];return{candidateKey:F,candidateValue:R[F]}}return{}}},{key:"showCandidatesBox",value:function(w,_,N){var R=this;this.candidateBox&&this.candidateBox.show({candidateValue:_,targetElement:N,onSelect:function(W,G){var X=R.options,F=X.layoutCandidatesCaseSensitiveMatch,ce=X.disableCandidateNormalization,fe=X.enableLayoutCandidatesKeyPress,re=W;ce||(re=W.normalize("NFD")),typeof R.options.beforeInputUpdate=="function"&&R.options.beforeInputUpdate(R);var oe=R.getInput(R.options.inputName,!0),ge=R.getCaretPositionEnd()||0,ae=oe.substring(0,ge||0)||oe,be=new RegExp("".concat(R.utilities.escapeRegex(w),"$"),F?"g":"gi"),Ce=ae.replace(be,re),Fe=oe.replace(ae,Ce),Ae=Ce.length-ae.length,Ve=(ge||oe.length)+Ae;Ve<0&&(Ve=0),R.setInput(Fe,R.options.inputName,!0),R.setCaretPosition(Ve),fe&&typeof R.options.onKeyPress=="function"&&R.options.onKeyPress(W,G),typeof R.options.onChange=="function"&&R.options.onChange(R.getInput(R.options.inputName,!0),G),typeof R.options.onChangeAll=="function"&&R.options.onChangeAll(R.getAllInputs(),G)}})}},{key:"handleButtonClicked",value:function(w,_){var N=this.options,R=N.inputName,W=R===void 0?this.defaultName:R,G=N.debug;if(w!=="{//}"){this.input[W]||(this.input[W]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var X=this.utilities.getUpdatedInput(w,this.input[W],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(w)&&this.activeInputElement&&this.input[W]&&this.input[W]===X&&this.caretPosition===0&&this.caretPositionEnd===X.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(w,_);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(w,_),this.input[W]!==X&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(X))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,X))return;var F=this.utilities.getUpdatedInput(w,this.input[W],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput(F,this.options.inputName,!0),G&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),_==null?void 0:_.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),_),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),_),_!=null&&_.target&&this.options.enableLayoutCandidates){var ce,fe=this.getInputCandidates(X),re=fe.candidateKey,oe=fe.candidateValue;re&&oe?this.showCandidatesBox(re,oe,this.keyboardDOM):(ce=this.candidateBox)===null||ce===void 0||ce.destroy()}}this.caretPositionEnd&&this.caretPosition!==this.caretPositionEnd&&(this.setCaretPosition(this.caretPositionEnd,this.caretPositionEnd),this.activeInputElement&&this.activeInputElement.setSelectionRange(this.caretPositionEnd,this.caretPositionEnd),this.options.debug&&console.log("Caret position aligned",this.caretPosition)),G&&console.log("Key pressed:",w)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(w){this.options.syncInstanceInputs?this.dispatch(function(_){_.isMouseHold=w}):this.isMouseHold=w}},{key:"handleButtonMouseDown",value:function(w,_){var N=this;_&&(this.options.preventMouseDownDefault&&_.preventDefault(),this.options.stopMouseDownPropagation&&_.stopPropagation(),_.target.classList.add(this.activeButtonClass)),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdTimeout&&clearTimeout(this.holdTimeout),this.setMouseHold(!0),this.options.disableButtonHold||(this.holdTimeout=window.setTimeout(function(){(N.getMouseHold()&&(!w.includes("{")&&!w.includes("}")||w==="{delete}"||w==="{backspace}"||w==="{bksp}"||w==="{space}"||w==="{tab}")||w==="{arrowright}"||w==="{arrowleft}"||w==="{arrowup}"||w==="{arrowdown}")&&(N.options.debug&&console.log("Button held:",w),N.handleButtonHold(w)),clearTimeout(N.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(w,_){var N=this;_&&(this.options.preventMouseUpDefault&&_.preventDefault&&_.preventDefault(),this.options.stopMouseUpPropagation&&_.stopPropagation&&_.stopPropagation(),!(_.target===this.keyboardDOM||_.target&&this.keyboardDOM.contains(_.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(_.target===this.candidateBox.candidateBoxElement||_.target&&this.candidateBox.candidateBoxElement.contains(_.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(R){R.classList.remove(N.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),w&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(w,_)}},{key:"handleKeyboardContainerMouseDown",value:function(w){this.options.preventMouseDownDefault&&w.preventDefault()}},{key:"handleButtonHold",value:function(w){var _=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){_.getMouseHold()?(_.handleButtonClicked(w),_.handleButtonHold(w)):clearTimeout(_.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var w=this;this.dispatch(function(_){_.replaceInput(w.input),_.setCaretPosition(w.caretPosition,w.caretPositionEnd)})}},{key:"clearInput",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[w]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,_=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!_&&this.syncInstanceInputs(),this.options.rtl?"‫"+this.input[w].replace("‫","").replace("‬","")+"‬":this.input[w]}},{key:"getAllInputs",value:function(){var w=this,_={};return Object.keys(this.input).forEach(function(N){_[N]=w.getInput(N,!0)}),_}},{key:"setInput",value:function(w){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,N=arguments.length>2?arguments[2]:void 0;this.input[_]=w,!N&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(w){this.input=w}},{key:"setOptions",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=this.changedOptions(w);this.options=Object.assign(this.options,w),_.length&&(this.options.debug&&console.log("changedOptions",_),this.onSetOptions(_),this.render())}},{key:"changedOptions",value:function(w){var _=this;return Object.keys(w).filter(function(N){return JSON.stringify(w[N])!==JSON.stringify(_.options[N])})}},{key:"onSetOptions",value:function(){var w=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];w.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(w.includes("layoutCandidatesPageSize")||w.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new P({utilities:this.utilities,options:this.options}))}},{key:"resetRows",value:function(){this.keyboardRowsDOM&&this.keyboardRowsDOM.remove(),this.keyboardDOM.className=this.keyboardDOMClass,this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.buttonElements={}}},{key:"dispatch",value:function(w){if(!window.SimpleKeyboardInstances)throw console.warn("SimpleKeyboardInstances is not defined. Dispatch cannot be called."),new Error("INSTANCES_VAR_ERROR");return Object.keys(window.SimpleKeyboardInstances).forEach(function(_){w(window.SimpleKeyboardInstances[_],_)})}},{key:"addButtonTheme",value:function(w,_){var N=this;_&&w&&(w.split(" ").forEach(function(R){_.split(" ").forEach(function(W){N.options.buttonTheme||(N.options.buttonTheme=[]);var G=!1;N.options.buttonTheme.map(function(X){if(X!=null&&X.class.split(" ").includes(W)){G=!0;var F=X.buttons.split(" ");F.includes(R)||(G=!0,F.push(R),X.buttons=F.join(" "))}return X}),G||N.options.buttonTheme.push({class:W,buttons:w})})}),this.render())}},{key:"removeButtonTheme",value:function(w,_){var N=this;if(!w&&!_)return this.options.buttonTheme=[],void this.render();w&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(w.split(" ").forEach(function(R){var W;(W=N.options)===null||W===void 0||(W=W.buttonTheme)===null||W===void 0||W.map(function(G,X){if(G&&_&&_.includes(G.class)||!_){var F,ce,fe=(F=G)===null||F===void 0?void 0:F.buttons.split(" ").filter(function(re){return re!==R});G&&fe!=null&&fe.length?G.buttons=fe.join(" "):((ce=N.options.buttonTheme)===null||ce===void 0||ce.splice(X,1),G=null)}return G})}),this.render())}},{key:"getButtonElement",value:function(w){var _,N=this.buttonElements[w];return N&&(_=N.length>1?N:N[0]),_}},{key:"inputPatternIsValid",value:function(w){var _,N=this.options.inputPattern;if((_=N instanceof RegExp?N:N[this.options.inputName||this.defaultName])&&w){var R=_.test(w);return this.options.debug&&console.log('inputPattern ("'.concat(_,'"): ').concat(R?"passed":"did not pass!")),R}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var w=this.options.physicalKeyboardHighlightPreventDefault,_=w!==void 0&&w;document.addEventListener("keyup",this.handleKeyUp,_),document.addEventListener("keydown",this.handleKeyDown,_),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(w){this.caretEventHandler(w),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(w)}},{key:"handleKeyDown",value:function(w){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(w)}},{key:"handleMouseUp",value:function(w){this.caretEventHandler(w)}},{key:"handleTouchEnd",value:function(w){this.caretEventHandler(w)}},{key:"handleSelect",value:function(w){this.caretEventHandler(w)}},{key:"handleSelectionChange",value:function(w){navigator.userAgent.includes("Firefox")||this.caretEventHandler(w)}},{key:"caretEventHandler",value:function(w){var _,N=this;w.target.tagName&&(_=w.target.tagName.toLowerCase()),this.dispatch(function(R){var W=w.target===R.keyboardDOM||w.target&&R.keyboardDOM.contains(w.target);if(N.options.syncInstanceInputs&&Array.isArray(w.path)&&(W=w.path.some(function(F){var ce;return F==null||(ce=F.hasAttribute)===null||ce===void 0?void 0:ce.call(F,"data-skInstance")})),(_==="textarea"||_==="input"&&["text","search","url","tel","password"].includes(w.target.type))&&!R.options.disableCaretPositioning){var G=w.target.selectionStart,X=w.target.selectionEnd;R.options.rtl&&(G=R.utilities.getRtlOffset(G,R.getInput()),X=R.utilities.getRtlOffset(X,R.getInput())),R.setCaretPosition(G,X),N.activeInputElement=w.target,R.options.debug&&console.log("Caret at: ",R.getCaretPosition(),R.getCaretPositionEnd(),w&&w.target.tagName.toLowerCase(),"(".concat(R.keyboardDOMClass,")"),w==null?void 0:w.type)}else!R.options.disableCaretPositioning&&W||(w==null?void 0:w.type)==="selectionchange"||(R.setCaretPosition(null),N.activeInputElement=null,R.options.debug&&console.log('Caret position reset due to "'.concat(w==null?void 0:w.type,'" event'),w))})}},{key:"recurseButtons",value:function(w){var _=this;w&&Object.keys(this.buttonElements).forEach(function(N){return _.buttonElements[N].forEach(w)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var w=this.options.physicalKeyboardHighlightPreventDefault,_=w!==void 0&&w;document.removeEventListener("keyup",this.handleKeyUp,_),document.removeEventListener("keydown",this.handleKeyDown,_),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("select",this.handleSelect),document.removeEventListener("selectionchange",this.handleSelectionChange),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null,this.recurseButtons(function(N){N&&(N.onpointerdown=null,N.onpointerup=null,N.onpointercancel=null,N.ontouchstart=null,N.ontouchend=null,N.ontouchcancel=null,N.onclick=null,N.onmousedown=null,N.onmouseup=null,N.remove(),N=null)}),this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.resetRows(),this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=null),this.activeInputElement=null,this.keyboardDOM.removeAttribute("data-skInstance"),this.keyboardDOM.innerHTML="",window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName],this.initialized=!1}},{key:"getButtonThemeClasses",value:function(w){var _=this.options.buttonTheme,N=[];return Array.isArray(_)&&_.forEach(function(R){if(R&&R.class&&typeof R.class=="string"&&R.buttons&&typeof R.buttons=="string"){var W=R.class.split(" ");R.buttons.split(" ").includes(w)&&(N=[].concat(L(N),L(W)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',R)}),N}},{key:"setDOMButtonAttributes",value:function(w,_){var N=this.options.buttonAttributes;Array.isArray(N)&&N.forEach(function(R){R.attribute&&typeof R.attribute=="string"&&R.value&&typeof R.value=="string"&&R.buttons&&typeof R.buttons=="string"?R.buttons.split(" ").includes(w)&&_(R.attribute,R.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',R)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(w){if(w.target.classList.contains("hg-button"))return w.preventDefault(),w.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),typeof this.options.onInit=="function"&&this.options.onInit(this)}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),typeof this.options.beforeFirstRender=="function"&&this.options.beforeFirstRender(this),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){typeof this.options.beforeRender=="function"&&this.options.beforeRender(this)}},{key:"onRender",value:function(){typeof this.options.onRender=="function"&&this.options.onRender(this)}},{key:"onModulesLoaded",value:function(){typeof this.options.onModulesLoaded=="function"&&this.options.onModulesLoaded(this)}},{key:"loadModules",value:function(){var w=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(_){var N=new _(w);N.init&&N.init(w)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(w,_){return!!this.modules[w]&&this.modules[w][_]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(w,_,N,R){var W=this,G=Array.from(w.children),X=0;return G.length&&N.forEach(function(F,ce){var fe=R[ce];if(!(fe&&fe>F))return!1;var re=F-X,oe=fe-X,ge=document.createElement("div");ge.className+="hg-button-container";var ae="".concat(W.options.layoutName,"-r").concat(_,"c").concat(ce);ge.setAttribute("data-skUID",ae);var be=G.splice(re,oe-re+1);X=oe-re,be.forEach(function(Ce){return ge.appendChild(Ce)}),G.splice(re,0,ge),w.innerHTML="",G.forEach(function(Ce){return w.appendChild(Ce)}),W.options.debug&&console.log("rowDOMContainer",be,re,oe,X+1)}),w}},{key:"render",value:function(){var w=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var _="hg-layout-".concat(this.options.layoutName),N=this.options.layout||{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","{lock} a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}",".com @ {space}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'{lock} A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}",".com @ {space}"]},R=this.options.useTouchEvents||!1,W=R?"hg-touch-events":"",G=this.options.useMouseEvents||!1,X=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,_,this.keyboardPluginClasses,W),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",N[this.options.layoutName||this.defaultName].forEach(function(F,ce){var fe=F.split(" ");w.options.excludeFromLayout&&w.options.excludeFromLayout[w.options.layoutName||w.defaultName]&&(fe=fe.filter(function(ae){return w.options.excludeFromLayout&&!w.options.excludeFromLayout[w.options.layoutName||w.defaultName].includes(ae)}));var re=document.createElement("div");re.className+="hg-row";var oe=[],ge=[];fe.forEach(function(ae,be){var Ce,Fe=!X&&typeof ae=="string"&&ae.length>1&&ae.indexOf("[")===0,Ae=!X&&typeof ae=="string"&&ae.length>1&&ae.indexOf("]")===ae.length-1;Fe&&(oe.push(be),ae=ae.replace(/\[/g,"")),Ae&&(ge.push(be),ae=ae.replace(/\]/g,""));var Ve=w.utilities.getButtonClass(ae),ze=w.utilities.getButtonDisplayName(ae,w.options.display,w.options.mergeDisplay),wt=w.options.useButtonTag?"button":"div",Ke=document.createElement(wt);Ke.className+="hg-button ".concat(Ve),(Ce=Ke.classList).add.apply(Ce,L(w.getButtonThemeClasses(ae))),w.setDOMButtonAttributes(ae,function(Ee,Lt){Ke.setAttribute(Ee,Lt)}),w.activeButtonClass="hg-activeButton",!w.utilities.pointerEventsSupported()||R||G?R?(Ke.ontouchstart=function(Ee){w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},Ke.ontouchend=function(Ee){w.handleButtonMouseUp(ae,Ee)},Ke.ontouchcancel=function(Ee){w.handleButtonMouseUp(ae,Ee)}):(Ke.onclick=function(Ee){w.setMouseHold(!1),typeof w.options.onKeyReleased!="function"&&w.handleButtonClicked(ae,Ee)},Ke.onmousedown=function(Ee){typeof w.options.onKeyReleased!="function"||w.isMouseHold||w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},Ke.onmouseup=function(Ee){w.handleButtonMouseUp(ae,Ee)}):(Ke.onpointerdown=function(Ee){w.handleButtonClicked(ae,Ee),w.handleButtonMouseDown(ae,Ee)},Ke.onpointerup=function(Ee){w.handleButtonMouseUp(ae,Ee)},Ke.onpointercancel=function(Ee){w.handleButtonMouseUp(ae,Ee)}),Ke.setAttribute("data-skBtn",ae);var et="".concat(w.options.layoutName,"-r").concat(ce,"b").concat(be);Ke.setAttribute("data-skBtnUID",et);var We=document.createElement("span");We.innerHTML=ze,Ke.appendChild(We),w.buttonElements[ae]||(w.buttonElements[ae]=[]),w.buttonElements[ae].push(Ke),re.appendChild(Ke)}),re=w.parseRowDOMContainers(re,ce,oe,ge),w.keyboardRowsDOM.appendChild(re)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||R||G?R?(document.ontouchend=function(F){return w.handleButtonMouseUp(void 0,F)},document.ontouchcancel=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.ontouchstart=function(F){return w.handleKeyboardContainerMouseDown(F)}):R||(document.onmouseup=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.onmousedown=function(F){return w.handleKeyboardContainerMouseDown(F)}):(document.onpointerup=function(F){return w.handleButtonMouseUp(void 0,F)},this.keyboardDOM.onpointerdown=function(F){return w.handleKeyboardContainerMouseDown(F)}),this.onInit())}}],U&&Z(V.prototype,U),J&&Z(V,J),Object.defineProperty(V,"prototype",{writable:!1}),V;var V,U,J}(),me=ne,de=ne}(),x}()},442:function(u){u.exports=n}},o={};function a(u){var f=o[u];if(f!==void 0)return f.exports;var g=o[u]={exports:{}};return r[u].call(g.exports,g,g.exports,a),g.exports}a.n=function(u){var f=u&&u.__esModule?function(){return u.default}:function(){return u};return a.d(f,{a:f}),f},a.d=function(u,f){for(var g in f)a.o(f,g)&&!a.o(u,g)&&Object.defineProperty(u,g,{enumerable:!0,get:f[g]})},a.o=function(u,f){return Object.prototype.hasOwnProperty.call(u,f)},a.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var s={};return function(){a.r(s),a.d(s,{KeyboardReact:function(){return c},default:function(){return p}}),a(981);var u=a(442),f=a(548),g=a.n(f);function h(d){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},h(d)}function x(d,m){var y=Object.keys(d);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(d);m&&(b=b.filter(function(C){return Object.getOwnPropertyDescriptor(d,C).enumerable})),y.push.apply(y,b)}return y}function l(d){for(var m=1;m<arguments.length;m++){var y=arguments[m]!=null?arguments[m]:{};m%2?x(Object(y),!0).forEach(function(b){v(d,b,y[b])}):Object.getOwnPropertyDescriptors?Object.defineProperties(d,Object.getOwnPropertyDescriptors(y)):x(Object(y)).forEach(function(b){Object.defineProperty(d,b,Object.getOwnPropertyDescriptor(y,b))})}return d}function v(d,m,y){var b;return b=function(C,S){if(h(C)!="object"||!C)return C;var k=C[Symbol.toPrimitive];if(k!==void 0){var B=k.call(C,S||"default");if(h(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(S==="string"?String:Number)(C)}(m,"string"),(m=h(b)=="symbol"?b:b+"")in d?Object.defineProperty(d,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):d[m]=y,d}var i=function(d){return l(l({},d),{},{keyboardRef:null})},c=function(d){var m=d.baseClass||"react-simple-keyboard",y=u.useRef(null),b=u.useRef(null),C=u.useRef(null),S=u.useRef(d);return u.useEffect(function(){return function(){C.current&&C.current.destroy(),y.current=!1}},[]),u.useEffect(function(){var k=function(D){return l(l({},D),{},{theme:"simple-keyboard ".concat(D.theme||"hg-theme-default")})}(d);if(!y.current){y.current=!0,k.debug&&console.log("ReactSimpleKeyboard: Init");var B=b.current,O=".".concat(m);C.current=new(g())(B||O,k),k.keyboardRef&&k.keyboardRef(C.current)}var j=function(D,M){var $=i(M),P=i(D);return Object.keys($).filter(function(L){return $[L]!==P[L]})}(S.current,k);if(j.length){var I=C.current;S.current=k,I==null||I.setOptions(k),k.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",j)}},[y,m,S,d]),u.createElement("div",{className:m,ref:b})},p=c}(),s}()})})(wl);var Yh=wl.exports;const Qh=Xo(Yh);function xl({onChange:e,keyboardRef:t,layout:n,theme:r}){const[o,a]=H.useState("default"),s=u=>{(u==="{shift}"||u==="{lock}")&&a(o==="default"?"shift":"default")};return E.jsx(Qh,{keyboardRef:u=>t.current=u,layoutName:o,layout:n,theme:r,onChange:e,onKeyPress:s,preventMouseDownDefault:!0})}function Zh(){return{subscribe:(r,o)=>{document.addEventListener(r,o)},unsubscribe:(r,o)=>{document.removeEventListener(r,o)},publish:(r,o)=>{const a=new CustomEvent(r,{detail:o});document.dispatchEvent(a)}}}function kl(){const{subscribe:e,unsubscribe:t,publish:n}=Zh();return{initialize:(u,f)=>{e("openKeyboard",u),e("closeKeyboard",f)},terminate:(u,f)=>{t("openKeyboard",u),t("closeKeyboard",f)},open:u=>{n("openKeyboard",{inputId:u.target.id,inputValue:u.target.value})},close:()=>{n("closeKeyboard")}}}function Cl(){const[e,t]=H.useState(!1),n=H.useRef(null),r=H.useRef(null),o=H.useRef(null),[a,s]=H.useState(),{session:u}=bt(),{initialize:f,terminate:g}=kl(),h=c=>{var p,d;r.current=document.getElementById(c.detail.inputId),(p=n.current)==null||p.setInput(c.detail.inputValue),(d=r.current)==null||d.addEventListener("input",m=>{var b;const y=m.target;(b=n.current)==null||b.setInput(y==null?void 0:y.value)}),t(!0)},x=()=>t(!1);H.useEffect(()=>{var p;const c=(p=o.current)==null?void 0:p.getBoundingClientRect();return c&&c.x&&!a&&s(c),f(h,x),()=>{g(h,x)}},[f,g,e]);const l=c=>{var p,d;if(r&&r.current){v(r.current,c);const m=(p=n.current)==null?void 0:p.getCaretPosition();m&&((d=r.current)==null||d.setSelectionRange(m,m))}},v=(c,p)=>{var y;const d=(y=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:y.set;d==null||d.call(c,p);const m=new Event("input",{bubbles:!0});c.dispatchEvent(m)};if(!u||!+(u.input_data.enable_on_screen_keyboard??!1))return E.jsx(E.Fragment,{});const i=()=>{var d;const c=(d=r.current)==null?void 0:d.getBoundingClientRect();let p=!1;return a&&c&&(p=!(a.right<c.left||a.left>c.right||a.bottom<c.top||a.top>c.bottom)),p};return E.jsx("div",{ref:o,className:`mobile:hidden bottom-2 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!e&&"hidden"} ${i()?"b-2 block":"absolute"}`,children:E.jsx(xl,{keyboardRef:n,onChange:l})})}function $i({value:e,valueSetter:t}){const n=H.useRef(null),r=o=>{const a=o?(parseFloat(o)/100).toFixed(2):"";t(a)};return E.jsxs("div",{children:[E.jsx("input",{type:"number",readOnly:!0,className:"mb-4 h-full w-full rounded border-gray-200 p-4 text-center text-4xl text-gray-500 focus:ring-0 focus:ring-offset-0",value:e,placeholder:"0,00",onChange:o=>r(o.target.value)}),E.jsx(xl,{keyboardRef:n,layout:{default:["1 2 3","4 5 6","7 8 9","00 0 {bksp}"]},theme:"hg-theme-default hg-layout-numeric numeric-theme",onChange:r})]})}function Dn(e){const{open:t,close:n}=kl(),r=H.useRef(null),o=async s=>{(async()=>t(s))().then(()=>{var f;return(f=r.current)==null?void 0:f.scrollIntoView(!1)})},a=()=>{n()};return E.jsxs("div",{className:"relative",onFocus:o,onBlur:a,children:[E.jsx("input",{...e,ref:r,type:e.type==="date_time"?"datetime-local":e.type==="birth_date"?"date":e.type,placeholder:" ",className:"peer m-0 block max-h-[58px] w-full rounded border border-solid border-gray-300 bg-white bg-clip-padding px-3 py-4 text-base font-normal leading-tight text-gray-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-2 focus:border-primary-600 focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary-600 [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",onChange:s=>e.onChange&&e.onChange(s.target.name,s.target.value)}),E.jsx("label",{htmlFor:`${e.label}-id`,className:"pointer-events-none absolute left-0 top-0 w-max origin-[0_0] whitespace-nowrap border border-solid border-transparent px-3 py-4 text-gray-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary-600 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none",children:e.label})]})}function ep(e){const t=H.useRef(null),[n,r]=H.useState(!1),[o,a]=H.useState(""),[s,u]=H.useState(e.defaultValue.split(";")),{name:f,onChange:g}=e;return H.useEffect(()=>{function h(x){t.current&&!t.current.contains(x.target)&&r(!1)}return document.addEventListener("mousedown",h),()=>{document.removeEventListener("mousedown",h)}},[]),H.useEffect(()=>{g&&g(f,s.join(";"))},[s]),E.jsxs("div",{ref:t,className:"relative w-full",children:[E.jsx("div",{onClick:()=>r(!n),className:`flex h-[54px] w-full cursor-pointer gap-2 truncate rounded border bg-white p-3 leading-[2.75rem] text-gray-700 ${n?"border-2 border-blue-600":"border-gray-300"}`,children:s.sort().reduce((h,x)=>h+=x+(x===s[s.length-1]?"":", "),"")}),E.jsx("div",{className:`pointer-events-none absolute left-0 top-0 origin-[0_0] border border-solid border-transparent px-3 py-4 transition-[opacity,_transform] duration-200 ease-linear motion-reduce:transition-none ${n?"-translate-y-2 translate-x-[0.15rem] scale-[0.85] text-blue-600":"text-gray-500"} ${s.length&&"-translate-y-2 translate-x-[0.15rem] scale-[0.85]"}`,children:e.label}),n&&E.jsxs("div",{className:"absolute z-20 mt-2 flex w-full flex-col gap-3 rounded bg-white p-3 shadow-md",children:[E.jsx("input",{placeholder:"Search",className:"rounded border border-solid border-gray-300 bg-transparent p-3 outline-none",type:"text",onChange:h=>a(h.target.value)}),E.jsx("hr",{}),!e.options.filter(h=>h.label.toLowerCase().includes(o.toLowerCase())).length&&E.jsx("p",{className:"text-center text-sm font-normal text-neutral-400",children:"No results found"}),e.options.map(h=>{if(!(o&&!h.label.toLowerCase().includes(o.toLowerCase())))return E.jsxs("div",{className:"flex items-center",children:[E.jsx("input",{id:h.value,type:"checkbox",value:h.value,checked:s.includes(h.value),readOnly:!0,className:"h-4 w-4 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-blue-500",onClick:x=>{x.target.checked?u([...s,x.target.value]):u(s.filter(l=>l!==x.target.value))}}),E.jsx("label",{htmlFor:h.value,className:"text-md ml-2 flex-grow font-normal text-gray-700",children:h.label})]},h.value)})]})]})}function tp(e){return E.jsxs("div",{className:"relative",children:[E.jsx("select",{...e,id:e.id,className:"peer m-0 block max-h-[58px] w-full rounded border border-solid border-gray-300 bg-white bg-clip-padding px-2 py-4 text-base font-normal leading-tight text-gray-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-2 focus:border-primary-600 focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary-600 [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",onChange:t=>e.onChange&&e.onChange(t.target.name,t.target.value),children:e.options.map(t=>E.jsx("option",{value:t.value,children:t.label},t.value))}),E.jsx("label",{htmlFor:`${e.label}-id`,className:"pointer-events-none absolute left-0 top-0 w-max origin-[0_0] whitespace-nowrap border border-solid border-transparent px-3 py-4 text-gray-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary-600 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none",children:e.label})]})}function _t({children:e}){return E.jsx("div",{className:"h-full w-full rounded-lg border border-gray-200 bg-white p-4 shadow sm:p-6 md:p-8",children:e})}function El({children:e}){return E.jsxs(_t,{children:[E.jsx("div",{className:"flex items-center justify-center",children:E.jsxs("svg",{className:"stroke h-36 w-36 animate-[scale_.3s_ease-in-out_.9s_both] fill-none stroke-green-600 stroke-2 shadow-[inset_0px_0px_0px_#7ac142]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 52 52",children:[E.jsx("circle",{className:"animate-[stroke_.6s_linear_forwards] fill-none stroke-green-600 stroke-2",style:{strokeDasharray:166,strokeDashoffset:166},cx:"26",cy:"26",r:"25",fill:"none"}),E.jsx("path",{className:"origin-[50%_50%] animate-[stroke_.3s_linear_.8s_forwards]",style:{strokeDasharray:48,strokeDashoffset:48},fill:"none",d:"M14.1 27.2l7.1 7.2 16.7-16.8"})]})}),e]})}const np="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.7002%204.70016L11.2999%2011.2998'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.2998%204.70016L4.70014%2011.2998'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function Mn({title:e,isOpen:t,onClose:n,children:r}){const[o,a]=H.useState(t),s=H.useRef(null);H.useEffect(()=>{a(t)},[t]),H.useEffect(()=>{const g=s.current;g&&(o?g.show():g.close())},[o]);const u=()=>{n&&n(),a(!1)},f=g=>{g.key==="Escape"&&u()};return E.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${o?"flex":"hidden"}`,children:E.jsxs("dialog",{ref:s,onKeyDown:f,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:[E.jsxs("div",{className:"flex w-full justify-between bg-gray-50 p-4",children:[E.jsx("p",{className:"truncate text-lg",children:e}),E.jsx("img",{src:np,alt:"closeButton",className:"h-[25px] w-[25px] cursor-pointer opacity-50 hover:opacity-90",onClick:u})]}),E.jsx("div",{className:"p-6",children:r})]})})}function rp(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const Sl={};function Vi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&Sl[t[0]]||(typeof t[0]=="string"&&(Sl[t[0]]=new Date),rp(...t))}const Pl=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function Bl(e,t,n){e.loadNamespaces(t,Pl(e,n))}function Ol(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(o=>{e.options.ns.indexOf(o)<0&&e.options.ns.push(o)}),e.loadLanguages(t,Pl(e,r))}function op(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],o=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(u,f)=>{const g=t.services.backendConnector.state[`${u}|${f}`];return g===-1||g===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!o||s(a,e)))}function ip(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(Vi("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(o,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&o.services.backendConnector.backend&&o.isLanguageChangingTo&&!a(o.isLanguageChangingTo,e))return!1}}):op(e,t,n)}const ap=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,sp={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},lp=e=>sp[e];let Hi={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(ap,lp)};function cp(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Hi={...Hi,...e}}function up(){return Hi}let _l;function dp(e){_l=e}function fp(){return _l}const hp={type:"3rdParty",init(e){cp(e.options.react),dp(e)}},pp=H.createContext();class mp{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const gp=(e,t)=>{const n=H.useRef();return H.useEffect(()=>{n.current=e},[e,t]),n.current};function Rl(e,t,n,r){return e.getFixedT(t,n,r)}function yp(e,t,n,r){return H.useCallback(Rl(e,t,n,r),[e,t,n,r])}function Qe(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:o}=H.useContext(pp)||{},a=n||r||fp();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new mp),!a){Vi("You will need to pass in an i18next instance by using initReactI18next");const b=(S,k)=>typeof k=="string"?k:k&&typeof k=="object"&&typeof k.defaultValue=="string"?k.defaultValue:Array.isArray(S)?S[S.length-1]:S,C=[b,{},!1];return C.t=b,C.i18n={},C.ready=!1,C}a.options.react&&a.options.react.wait!==void 0&&Vi("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...up(),...a.options.react,...t},{useSuspense:u,keyPrefix:f}=s;let g=o||a.options&&a.options.defaultNS;g=typeof g=="string"?[g]:g||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(g);const h=(a.isInitialized||a.initializedStoreOnce)&&g.every(b=>ip(b,a,s)),x=yp(a,t.lng||null,s.nsMode==="fallback"?g:g[0],f),l=()=>x,v=()=>Rl(a,t.lng||null,s.nsMode==="fallback"?g:g[0],f),[i,c]=H.useState(l);let p=g.join();t.lng&&(p=`${t.lng}${p}`);const d=gp(p),m=H.useRef(!0);H.useEffect(()=>{const{bindI18n:b,bindI18nStore:C}=s;m.current=!0,!h&&!u&&(t.lng?Ol(a,t.lng,g,()=>{m.current&&c(v)}):Bl(a,g,()=>{m.current&&c(v)})),h&&d&&d!==p&&m.current&&c(v);function S(){m.current&&c(v)}return b&&a&&a.on(b,S),C&&a&&a.store.on(C,S),()=>{m.current=!1,b&&a&&b.split(" ").forEach(k=>a.off(k,S)),C&&a&&C.split(" ").forEach(k=>a.store.off(k,S))}},[a,p]),H.useEffect(()=>{m.current&&h&&c(l)},[a,f,h]);const y=[i,a,h];if(y.t=i,y.i18n=a,y.ready=h,h||!h&&!u)return y;throw new Promise(b=>{t.lng?Ol(a,t.lng,g,()=>b()):Bl(a,g,()=>b())})}function zi({callback:e}){const t=kn(),{t:n}=Qe(),[r,o]=H.useState(""),[a,s]=H.useState(!1),[u,f]=H.useState(!1),{session:g,mutate:h}=bt(),x=g==null?void 0:g.input_data.scanner_type,[l,v]=H.useState(""),i=async d=>{if(t.onContactLink){const{data:{data:m}}=await Ai.get(d);m&&t.onContactLink(m)}},c=H.useCallback(()=>{g&&(s(!0),vo.setContact(g.uuid,{contact_identifier_value:r}).then(d=>{i(d.data.data.contact.uuid).then(),h().then(()=>{De.success(n("contactSavedToSession")),e&&e()})}).catch(()=>f(!0)).finally(()=>s(!1)))},[e,r,h,g,n]),p=()=>{s(!0),Ai.linkIdentifier(r,l).then(c).finally(()=>s(!1))};return H.useEffect(()=>{x===Mt.CAMERA&&r&&!a&&c()},[r,a,x,g,c]),E.jsxs(E.Fragment,{children:[E.jsx(wo,{dataSetter:o,type:x,label:n("contactIdentifier")}),x===Mt.HAND_SCANNER&&E.jsx("div",{className:"pt-3",children:E.jsx(Ye,{type:"submit",label:n("submit"),onClick:c,disabled:a})}),E.jsx(Mn,{isOpen:u,title:n("linkContact"),onClose:()=>f(!1),children:E.jsxs("div",{className:"flex min-w-[600px] flex-col gap-3",children:[E.jsx("p",{children:n("fillInXBelow",{x:n("emailAddress").toLowerCase()})}),E.jsx(Dn,{autoFocus:!0,id:"email-input",name:"email",label:n("emailAddress"),type:"email",onChange:(d,m)=>v(m)}),E.jsx("div",{children:E.jsx(Ye,{type:"submit",label:n("linkContact"),onClick:p,disabled:a})})]})})]})}function wo({dataSetter:e,type:t=Mt.CAMERA,label:n=""}){const{t:r}=Qe(),o=a=>{e(a.data)};return t===Mt.HAND_SCANNER?E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx("p",{children:r("fillInXBelow",{x:n.toLowerCase()})}),E.jsx(Dn,{id:`${n}-input`,name:n,label:n,type:"text",onChange:(a,s)=>e(s),autoFocus:!0})]}):E.jsx(vp,{label:n,onDecode:o})}class Le{constructor(t,n,r,o,a){this._legacyCanvasSize=Le.DEFAULT_CANVAS_SIZE,this._preferredCamera="environment",this._maxScansPerSecond=25,this._lastScanTimestamp=-1,this._destroyed=this._flashOn=this._paused=this._active=!1,this.$video=t,this.$canvas=document.createElement("canvas"),r&&typeof r=="object"?this._onDecode=n:(console.warn(r||o||a?"You're using a deprecated version of the QrScanner constructor which will be removed in the future":"Note that the type of the scan result passed to onDecode will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),this._legacyOnDecode=n),n=typeof r=="object"?r:{},this._onDecodeError=n.onDecodeError||(typeof r=="function"?r:this._onDecodeError),this._calculateScanRegion=n.calculateScanRegion||(typeof o=="function"?o:this._calculateScanRegion),this._preferredCamera=n.preferredCamera||a||this._preferredCamera,this._legacyCanvasSize=typeof r=="number"?r:typeof o=="number"?o:this._legacyCanvasSize,this._maxScansPerSecond=n.maxScansPerSecond||this._maxScansPerSecond,this._onPlay=this._onPlay.bind(this),this._onLoadedMetaData=this._onLoadedMetaData.bind(this),this._onVisibilityChange=this._onVisibilityChange.bind(this),this._updateOverlay=this._updateOverlay.bind(this),t.disablePictureInPicture=!0,t.playsInline=!0,t.muted=!0;let s=!1;if(t.hidden&&(t.hidden=!1,s=!0),document.body.contains(t)||(document.body.appendChild(t),s=!0),r=t.parentElement,n.highlightScanRegion||n.highlightCodeOutline){if(o=!!n.overlay,this.$overlay=n.overlay||document.createElement("div"),a=this.$overlay.style,a.position="absolute",a.display="none",a.pointerEvents="none",this.$overlay.classList.add("scan-region-highlight"),!o&&n.highlightScanRegion){this.$overlay.innerHTML='<svg class="scan-region-highlight-svg" viewBox="0 0 238 238" preserveAspectRatio="none" style="position:absolute;width:100%;height:100%;left:0;top:0;fill:none;stroke:#e9b213;stroke-width:4;stroke-linecap:round;stroke-linejoin:round"><path d="M31 2H10a8 8 0 0 0-8 8v21M207 2h21a8 8 0 0 1 8 8v21m0 176v21a8 8 0 0 1-8 8h-21m-176 0H10a8 8 0 0 1-8-8v-21"/></svg>';try{this.$overlay.firstElementChild.animate({transform:["scale(.98)","scale(1.01)"]},{duration:400,iterations:1/0,direction:"alternate",easing:"ease-in-out"})}catch{}r.insertBefore(this.$overlay,this.$video.nextSibling)}n.highlightCodeOutline&&(this.$overlay.insertAdjacentHTML("beforeend",'<svg class="code-outline-highlight" preserveAspectRatio="none" style="display:none;width:100%;height:100%;fill:none;stroke:#e9b213;stroke-width:5;stroke-dasharray:25;stroke-linecap:round;stroke-linejoin:round"><polygon/></svg>'),this.$codeOutlineHighlight=this.$overlay.lastElementChild)}this._scanRegion=this._calculateScanRegion(t),requestAnimationFrame(()=>{let u=window.getComputedStyle(t);u.display==="none"&&(t.style.setProperty("display","block","important"),s=!0),u.visibility!=="visible"&&(t.style.setProperty("visibility","visible","important"),s=!0),s&&(console.warn("QrScanner has overwritten the video hiding style to avoid Safari stopping the playback."),t.style.opacity="0",t.style.width="0",t.style.height="0",this.$overlay&&this.$overlay.parentElement&&this.$overlay.parentElement.removeChild(this.$overlay),delete this.$overlay,delete this.$codeOutlineHighlight),this.$overlay&&this._updateOverlay()}),t.addEventListener("play",this._onPlay),t.addEventListener("loadedmetadata",this._onLoadedMetaData),document.addEventListener("visibilitychange",this._onVisibilityChange),window.addEventListener("resize",this._updateOverlay),this._qrEnginePromise=Le.createQrEngine()}static set WORKER_PATH(t){console.warn("Setting QrScanner.WORKER_PATH is not required and not supported anymore. Have a look at the README for new setup instructions.")}static async hasCamera(){try{return!!(await Le.listCameras(!1)).length}catch{return!1}}static async listCameras(t=!1){if(!navigator.mediaDevices)return[];let n=async()=>(await navigator.mediaDevices.enumerateDevices()).filter(o=>o.kind==="videoinput"),r;try{t&&(await n()).every(o=>!o.label)&&(r=await navigator.mediaDevices.getUserMedia({audio:!1,video:!0}))}catch{}try{return(await n()).map((o,a)=>({id:o.deviceId,label:o.label||(a===0?"Default Camera":`Camera ${a+1}`)}))}finally{r&&(console.warn("Call listCameras after successfully starting a QR scanner to avoid creating a temporary video stream"),Le._stopVideoStream(r))}}async hasFlash(){let t;try{if(this.$video.srcObject){if(!(this.$video.srcObject instanceof MediaStream))return!1;t=this.$video.srcObject}else t=(await this._getCameraStream()).stream;return"torch"in t.getVideoTracks()[0].getSettings()}catch{return!1}finally{t&&t!==this.$video.srcObject&&(console.warn("Call hasFlash after successfully starting the scanner to avoid creating a temporary video stream"),Le._stopVideoStream(t))}}isFlashOn(){return this._flashOn}async toggleFlash(){this._flashOn?await this.turnFlashOff():await this.turnFlashOn()}async turnFlashOn(){if(!this._flashOn&&!this._destroyed&&(this._flashOn=!0,this._active&&!this._paused))try{if(!await this.hasFlash())throw"No flash available";await this.$video.srcObject.getVideoTracks()[0].applyConstraints({advanced:[{torch:!0}]})}catch(t){throw this._flashOn=!1,t}}async turnFlashOff(){this._flashOn&&(this._flashOn=!1,await this._restartVideoStream())}destroy(){this.$video.removeEventListener("loadedmetadata",this._onLoadedMetaData),this.$video.removeEventListener("play",this._onPlay),document.removeEventListener("visibilitychange",this._onVisibilityChange),window.removeEventListener("resize",this._updateOverlay),this._destroyed=!0,this._flashOn=!1,this.stop(),Le._postWorkerMessage(this._qrEnginePromise,"close")}async start(){if(this._destroyed)throw Error("The QR scanner can not be started as it had been destroyed.");if((!this._active||this._paused)&&(window.location.protocol!=="https:"&&console.warn("The camera stream is only accessible if the page is transferred via https."),this._active=!0,!document.hidden))if(this._paused=!1,this.$video.srcObject)await this.$video.play();else try{let{stream:t,facingMode:n}=await this._getCameraStream();!this._active||this._paused?Le._stopVideoStream(t):(this._setVideoMirror(n),this.$video.srcObject=t,await this.$video.play(),this._flashOn&&(this._flashOn=!1,this.turnFlashOn().catch(()=>{})))}catch(t){if(!this._paused)throw this._active=!1,t}}stop(){this.pause(),this._active=!1}async pause(t=!1){if(this._paused=!0,!this._active)return!0;this.$video.pause(),this.$overlay&&(this.$overlay.style.display="none");let n=()=>{this.$video.srcObject instanceof MediaStream&&(Le._stopVideoStream(this.$video.srcObject),this.$video.srcObject=null)};return t?(n(),!0):(await new Promise(r=>setTimeout(r,300)),this._paused?(n(),!0):!1)}async setCamera(t){t!==this._preferredCamera&&(this._preferredCamera=t,await this._restartVideoStream())}static async scanImage(t,n,r,o,a=!1,s=!1){let u,f=!1;n&&("scanRegion"in n||"qrEngine"in n||"canvas"in n||"disallowCanvasResizing"in n||"alsoTryWithoutScanRegion"in n||"returnDetailedScanResult"in n)?(u=n.scanRegion,r=n.qrEngine,o=n.canvas,a=n.disallowCanvasResizing||!1,s=n.alsoTryWithoutScanRegion||!1,f=!0):console.warn(n||r||o||a||s?"You're using a deprecated api for scanImage which will be removed in the future.":"Note that the return type of scanImage will change in the future. To already switch to the new api today, you can pass returnDetailedScanResult: true."),n=!!r;try{let g,h;[r,g]=await Promise.all([r||Le.createQrEngine(),Le._loadImage(t)]),[o,h]=Le._drawToCanvas(g,u,o,a);let x;if(r instanceof Worker){let l=r;n||Le._postWorkerMessageSync(l,"inversionMode","both"),x=await new Promise((v,i)=>{let c,p,d,m=-1;p=b=>{b.data.id===m&&(l.removeEventListener("message",p),l.removeEventListener("error",d),clearTimeout(c),b.data.data!==null?v({data:b.data.data,cornerPoints:Le._convertPoints(b.data.cornerPoints,u)}):i(Le.NO_QR_CODE_FOUND))},d=b=>{l.removeEventListener("message",p),l.removeEventListener("error",d),clearTimeout(c),i("Scanner error: "+(b?b.message||b:"Unknown Error"))},l.addEventListener("message",p),l.addEventListener("error",d),c=setTimeout(()=>d("timeout"),1e4);let y=h.getImageData(0,0,o.width,o.height);m=Le._postWorkerMessageSync(l,"decode",y,[y.data.buffer])})}else x=await Promise.race([new Promise((l,v)=>window.setTimeout(()=>v("Scanner error: timeout"),1e4)),(async()=>{try{var[l]=await r.detect(o);if(!l)throw Le.NO_QR_CODE_FOUND;return{data:l.rawValue,cornerPoints:Le._convertPoints(l.cornerPoints,u)}}catch(v){if(l=v.message||v,/not implemented|service unavailable/.test(l))return Le._disableBarcodeDetector=!0,Le.scanImage(t,{scanRegion:u,canvas:o,disallowCanvasResizing:a,alsoTryWithoutScanRegion:s});throw`Scanner error: ${l}`}})()]);return f?x:x.data}catch(g){if(!u||!s)throw g;let h=await Le.scanImage(t,{qrEngine:r,canvas:o,disallowCanvasResizing:a});return f?h:h.data}finally{n||Le._postWorkerMessage(r,"close")}}setGrayscaleWeights(t,n,r,o=!0){Le._postWorkerMessage(this._qrEnginePromise,"grayscaleWeights",{red:t,green:n,blue:r,useIntegerApproximation:o})}setInversionMode(t){Le._postWorkerMessage(this._qrEnginePromise,"inversionMode",t)}static async createQrEngine(t){if(t&&console.warn("Specifying a worker path is not required and not supported anymore."),t=()=>Promise.resolve().then(()=>Ev).then(r=>r.createWorker()),!(!Le._disableBarcodeDetector&&"BarcodeDetector"in window&&BarcodeDetector.getSupportedFormats&&(await BarcodeDetector.getSupportedFormats()).includes("qr_code")))return t();let n=navigator.userAgentData;return n&&n.brands.some(({brand:r})=>/Chromium/i.test(r))&&/mac ?OS/i.test(n.platform)&&await n.getHighEntropyValues(["architecture","platformVersion"]).then(({architecture:r,platformVersion:o})=>/arm/i.test(r||"arm")&&13<=parseInt(o||"13")).catch(()=>!0)?t():new BarcodeDetector({formats:["qr_code"]})}_onPlay(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay(),this.$overlay&&(this.$overlay.style.display=""),this._scanFrame()}_onLoadedMetaData(){this._scanRegion=this._calculateScanRegion(this.$video),this._updateOverlay()}_onVisibilityChange(){document.hidden?this.pause():this._active&&this.start()}_calculateScanRegion(t){let n=Math.round(.6666666666666666*Math.min(t.videoWidth,t.videoHeight));return{x:Math.round((t.videoWidth-n)/2),y:Math.round((t.videoHeight-n)/2),width:n,height:n,downScaledWidth:this._legacyCanvasSize,downScaledHeight:this._legacyCanvasSize}}_updateOverlay(){requestAnimationFrame(()=>{if(this.$overlay){var t=this.$video,n=t.videoWidth,r=t.videoHeight,o=t.offsetWidth,a=t.offsetHeight,s=t.offsetLeft,u=t.offsetTop,f=window.getComputedStyle(t),g=f.objectFit,h=n/r,x=o/a;switch(g){case"none":var l=n,v=r;break;case"fill":l=o,v=a;break;default:(g==="cover"?h>x:h<x)?(v=a,l=v*h):(l=o,v=l/h),g==="scale-down"&&(l=Math.min(l,n),v=Math.min(v,r))}var[i,c]=f.objectPosition.split(" ").map((d,m)=>{const y=parseFloat(d);return d.endsWith("%")?(m?a-v:o-l)*y/100:y});f=this._scanRegion.width||n,x=this._scanRegion.height||r,g=this._scanRegion.x||0;var p=this._scanRegion.y||0;h=this.$overlay.style,h.width=`${f/n*l}px`,h.height=`${x/r*v}px`,h.top=`${u+c+p/r*v}px`,r=/scaleX\(-1\)/.test(t.style.transform),h.left=`${s+(r?o-i-l:i)+(r?n-g-f:g)/n*l}px`,h.transform=t.style.transform}})}static _convertPoints(t,n){if(!n)return t;let r=n.x||0,o=n.y||0,a=n.width&&n.downScaledWidth?n.width/n.downScaledWidth:1;n=n.height&&n.downScaledHeight?n.height/n.downScaledHeight:1;for(let s of t)s.x=s.x*a+r,s.y=s.y*n+o;return t}_scanFrame(){!this._active||this.$video.paused||this.$video.ended||("requestVideoFrameCallback"in this.$video?this.$video.requestVideoFrameCallback.bind(this.$video):requestAnimationFrame)(async()=>{if(!(1>=this.$video.readyState)){var t=Date.now()-this._lastScanTimestamp,n=1e3/this._maxScansPerSecond;t<n&&await new Promise(o=>setTimeout(o,n-t)),this._lastScanTimestamp=Date.now();try{var r=await Le.scanImage(this.$video,{scanRegion:this._scanRegion,qrEngine:this._qrEnginePromise,canvas:this.$canvas})}catch(o){if(!this._active)return;this._onDecodeError(o)}!Le._disableBarcodeDetector||await this._qrEnginePromise instanceof Worker||(this._qrEnginePromise=Le.createQrEngine()),r?(this._onDecode?this._onDecode(r):this._legacyOnDecode&&this._legacyOnDecode(r.data),this.$codeOutlineHighlight&&(clearTimeout(this._codeOutlineHighlightRemovalTimeout),this._codeOutlineHighlightRemovalTimeout=void 0,this.$codeOutlineHighlight.setAttribute("viewBox",`${this._scanRegion.x||0} ${this._scanRegion.y||0} ${this._scanRegion.width||this.$video.videoWidth} ${this._scanRegion.height||this.$video.videoHeight}`),this.$codeOutlineHighlight.firstElementChild.setAttribute("points",r.cornerPoints.map(({x:o,y:a})=>`${o},${a}`).join(" ")),this.$codeOutlineHighlight.style.display="")):this.$codeOutlineHighlight&&!this._codeOutlineHighlightRemovalTimeout&&(this._codeOutlineHighlightRemovalTimeout=setTimeout(()=>this.$codeOutlineHighlight.style.display="none",100))}this._scanFrame()})}_onDecodeError(t){t!==Le.NO_QR_CODE_FOUND&&console.log(t)}async _getCameraStream(){if(!navigator.mediaDevices)throw"Camera not found.";let t=/^(environment|user)$/.test(this._preferredCamera)?"facingMode":"deviceId",n=[{width:{min:1024}},{width:{min:768}},{}],r=n.map(o=>Object.assign({},o,{[t]:{exact:this._preferredCamera}}));for(let o of[...r,...n])try{let a=await navigator.mediaDevices.getUserMedia({video:o,audio:!1}),s=this._getFacingMode(a)||(o.facingMode?this._preferredCamera:this._preferredCamera==="environment"?"user":"environment");return{stream:a,facingMode:s}}catch{}throw"Camera not found."}async _restartVideoStream(){let t=this._paused;await this.pause(!0)&&!t&&this._active&&await this.start()}static _stopVideoStream(t){for(let n of t.getTracks())n.stop(),t.removeTrack(n)}_setVideoMirror(t){this.$video.style.transform="scaleX("+(t==="user"?-1:1)+")"}_getFacingMode(t){return(t=t.getVideoTracks()[0])?/rear|back|environment/i.test(t.label)?"environment":/front|user|face/i.test(t.label)?"user":null:null}static _drawToCanvas(t,n,r,o=!1){r=r||document.createElement("canvas");let a=n&&n.x?n.x:0,s=n&&n.y?n.y:0,u=n&&n.width?n.width:t.videoWidth||t.width,f=n&&n.height?n.height:t.videoHeight||t.height;return o||(o=n&&n.downScaledWidth?n.downScaledWidth:u,n=n&&n.downScaledHeight?n.downScaledHeight:f,r.width!==o&&(r.width=o),r.height!==n&&(r.height=n)),n=r.getContext("2d",{alpha:!1}),n.imageSmoothingEnabled=!1,n.drawImage(t,a,s,u,f,0,0,r.width,r.height),[r,n]}static async _loadImage(t){if(t instanceof Image)return await Le._awaitImageLoad(t),t;if(t instanceof HTMLVideoElement||t instanceof HTMLCanvasElement||t instanceof SVGImageElement||"OffscreenCanvas"in window&&t instanceof OffscreenCanvas||"ImageBitmap"in window&&t instanceof ImageBitmap)return t;if(t instanceof File||t instanceof Blob||t instanceof URL||typeof t=="string"){let n=new Image;n.src=t instanceof File||t instanceof Blob?URL.createObjectURL(t):t.toString();try{return await Le._awaitImageLoad(n),n}finally{(t instanceof File||t instanceof Blob)&&URL.revokeObjectURL(n.src)}}else throw"Unsupported image type."}static async _awaitImageLoad(t){t.complete&&t.naturalWidth!==0||await new Promise((n,r)=>{let o=a=>{t.removeEventListener("load",o),t.removeEventListener("error",o),a instanceof ErrorEvent?r("Image load error"):n()};t.addEventListener("load",o),t.addEventListener("error",o)})}static async _postWorkerMessage(t,n,r,o){return Le._postWorkerMessageSync(await t,n,r,o)}static _postWorkerMessageSync(t,n,r,o){if(!(t instanceof Worker))return-1;let a=Le._workerMessageId++;return t.postMessage({id:a,type:n,data:r},o),a}}Le.DEFAULT_CANVAS_SIZE=400,Le.NO_QR_CODE_FOUND="No QR code found",Le._disableBarcodeDetector=!1,Le._workerMessageId=0;function vp({label:e="",onDecode:t}){const n=H.useRef(),r=H.useRef(null),[o,a]=H.useState([]);return H.useEffect(()=>(r.current&&!n.current&&(n.current=new Le(r.current,t??(s=>console.log("decoded qr code:",s)),{returnDetailedScanResult:!0,highlightScanRegion:!0,highlightCodeOutline:!0}),Le.listCameras(!0).then(s=>a(s)),n.current.start()),()=>{var s;r.current||(s=n.current)==null||s.stop()}),[t]),E.jsxs("div",{className:"flex flex-col gap-1",children:[E.jsxs("div",{className:"flex flex-col items-center justify-between text-gray-700 sm:flex-row",children:[E.jsx("p",{children:`Scan ${e==null?void 0:e.toLowerCase()}`}),E.jsx("select",{id:"select",className:"appearance-none rounded border bg-transparent px-2.5 py-2 text-sm",onChange:s=>{var u;return(u=n.current)==null?void 0:u.setCamera(s.target.value)},children:o.map(s=>E.jsx("option",{value:s.id,children:s.label},s.id))})]}),E.jsx("video",{className:"h-full w-full rounded border object-cover",ref:r})]})}function Tl(){return E.jsxs("div",{children:[E.jsx("div",{className:"flex animate-pulse justify-end space-y-4",children:E.jsx("div",{className:"h-8 w-32 rounded bg-gray-100"})},"skeleton-item-"),E.jsx("div",{className:"my-6 h-px w-full bg-gray-100"}),E.jsx("div",{className:"space-y-4",children:E.jsx("div",{className:"animate-pulse space-y-4",children:E.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-2",children:[E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),E.jsx("div",{className:"h-12 w-full rounded bg-gray-100"})]})},"skeleton-item-")})]})}var bp=Object.defineProperty,wp=(e,t)=>{for(var n in t)bp(e,n,{get:t[n],enumerable:!0})},Ft={};wp(Ft,{assign:()=>Cp,colors:()=>mn,createStringInterpolator:()=>Zi,skipAnimation:()=>Ml,to:()=>Dl,willAdvance:()=>ea});var qi=gr(),Te=e=>mr(e,qi),Ki=gr();Te.write=e=>mr(e,Ki);var xo=gr();Te.onStart=e=>mr(e,xo);var Wi=gr();Te.onFrame=e=>mr(e,Wi);var Gi=gr();Te.onFinish=e=>mr(e,Gi);var Fn=[];Te.setTimeout=(e,t)=>{const n=Te.now()+t,r=()=>{const a=Fn.findIndex(s=>s.cancel==r);~a&&Fn.splice(a,1),pn-=~a?1:0},o={time:n,handler:e,cancel:r};return Fn.splice(Nl(n),0,o),pn+=1,jl(),o};var Nl=e=>~(~Fn.findIndex(t=>t.time>e)||~Fn.length);Te.cancel=e=>{xo.delete(e),Wi.delete(e),Gi.delete(e),qi.delete(e),Ki.delete(e)},Te.sync=e=>{Ji=!0,Te.batchedUpdates(e),Ji=!1},Te.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...o){t=o,Te.onStart(n)}return r.handler=e,r.cancel=()=>{xo.delete(n),t=null},r};var Xi=typeof window<"u"?window.requestAnimationFrame:()=>{};Te.use=e=>Xi=e,Te.now=typeof performance<"u"?()=>performance.now():Date.now,Te.batchedUpdates=e=>e(),Te.catch=console.error,Te.frameLoop="always",Te.advance=()=>{Te.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Ll()};var hn=-1,pn=0,Ji=!1;function mr(e,t){Ji?(t.delete(e),e(0)):(t.add(e),jl())}function jl(){hn<0&&(hn=0,Te.frameLoop!=="demand"&&Xi(Al))}function xp(){hn=-1}function Al(){~hn&&(Xi(Al),Te.batchedUpdates(Ll))}function Ll(){const e=hn;hn=Te.now();const t=Nl(hn);if(t&&(Il(Fn.splice(0,t),n=>n.handler()),pn-=t),!pn){xp();return}xo.flush(),qi.flush(e?Math.min(64,hn-e):16.667),Wi.flush(),Ki.flush(),Gi.flush()}function gr(){let e=new Set,t=e;return{add(n){pn+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return pn-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,pn-=t.size,Il(t,r=>r(n)&&e.add(r)),pn+=e.size,t=e)}}}function Il(e,t){e.forEach(n=>{try{t(n)}catch(r){Te.catch(r)}})}function Yi(){}var kp=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),pe={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function tn(e,t){if(pe.arr(e)){if(!pe.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var Me=(e,t)=>e.forEach(t);function Jt(e,t,n){if(pe.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var Pt=e=>pe.und(e)?[]:pe.arr(e)?e:[e];function yr(e,t){if(e.size){const n=Array.from(e);e.clear(),Me(n,t)}}var vr=(e,...t)=>yr(e,n=>n(...t)),Qi=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Zi,Dl,mn=null,Ml=!1,ea=Yi,Cp=e=>{e.to&&(Dl=e.to),e.now&&(Te.now=e.now),e.colors!==void 0&&(mn=e.colors),e.skipAnimation!=null&&(Ml=e.skipAnimation),e.createStringInterpolator&&(Zi=e.createStringInterpolator),e.requestAnimationFrame&&Te.use(e.requestAnimationFrame),e.batchedUpdates&&(Te.batchedUpdates=e.batchedUpdates),e.willAdvance&&(ea=e.willAdvance),e.frameLoop&&(Te.frameLoop=e.frameLoop)},br=new Set,Rt=[],ta=[],ko=0,Co={get idle(){return!br.size&&!Rt.length},start(e){ko>e.priority?(br.add(e),Te.onStart(Ep)):(Fl(e),Te(na))},advance:na,sort(e){if(ko)Te.onFrame(()=>Co.sort(e));else{const t=Rt.indexOf(e);~t&&(Rt.splice(t,1),Ul(e))}},clear(){Rt=[],br.clear()}};function Ep(){br.forEach(Fl),br.clear(),Te(na)}function Fl(e){Rt.includes(e)||Ul(e)}function Ul(e){Rt.splice(Sp(Rt,t=>t.priority>e.priority),0,e)}function na(e){const t=ta;for(let n=0;n<Rt.length;n++){const r=Rt[n];ko=r.priority,r.idle||(ea(r),r.advance(e),r.idle||t.push(r))}return ko=0,ta=Rt,ta.length=0,Rt=t,Rt.length>0}function Sp(e,t){const n=e.findIndex(t);return n<0?e.length:n}var Pp=(e,t,n)=>Math.min(Math.max(n,e),t),Bp={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},Ut="[-+]?\\d*\\.?\\d+",Eo=Ut+"%";function So(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var Op=new RegExp("rgb"+So(Ut,Ut,Ut)),_p=new RegExp("rgba"+So(Ut,Ut,Ut,Ut)),Rp=new RegExp("hsl"+So(Ut,Eo,Eo)),Tp=new RegExp("hsla"+So(Ut,Eo,Eo,Ut)),Np=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,jp=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ap=/^#([0-9a-fA-F]{6})$/,Lp=/^#([0-9a-fA-F]{8})$/;function Ip(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ap.exec(e))?parseInt(t[1]+"ff",16)>>>0:mn&&mn[e]!==void 0?mn[e]:(t=Op.exec(e))?(Un(t[1])<<24|Un(t[2])<<16|Un(t[3])<<8|255)>>>0:(t=_p.exec(e))?(Un(t[1])<<24|Un(t[2])<<16|Un(t[3])<<8|Hl(t[4]))>>>0:(t=Np.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=Lp.exec(e))?parseInt(t[1],16)>>>0:(t=jp.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=Rp.exec(e))?($l(Vl(t[1]),Po(t[2]),Po(t[3]))|255)>>>0:(t=Tp.exec(e))?($l(Vl(t[1]),Po(t[2]),Po(t[3]))|Hl(t[4]))>>>0:null}function ra(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function $l(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r,a=ra(o,r,e+1/3),s=ra(o,r,e),u=ra(o,r,e-1/3);return Math.round(a*255)<<24|Math.round(s*255)<<16|Math.round(u*255)<<8}function Un(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function Vl(e){return(parseFloat(e)%360+360)%360/360}function Hl(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Po(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function zl(e){let t=Ip(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,o=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${o}, ${a})`}var wr=(e,t,n)=>{if(pe.fun(e))return e;if(pe.arr(e))return wr({range:e,output:t,extrapolate:n});if(pe.str(e.output[0]))return Zi(e);const r=e,o=r.output,a=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",u=r.extrapolateRight||r.extrapolate||"extend",f=r.easing||(g=>g);return g=>{const h=Mp(g,a);return Dp(g,a[h],a[h+1],o[h],o[h+1],f,s,u,r.map)}};function Dp(e,t,n,r,o,a,s,u,f){let g=f?f(e):e;if(g<t){if(s==="identity")return g;s==="clamp"&&(g=t)}if(g>n){if(u==="identity")return g;u==="clamp"&&(g=n)}return r===o?r:t===n?e<=t?r:o:(t===-1/0?g=-g:n===1/0?g=g-t:g=(g-t)/(n-t),g=a(g),r===-1/0?g=-g:o===1/0?g=g+r:g=g*(o-r)+r,g)}function Mp(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Fp=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,o=t==="end"?Math.floor(r):Math.ceil(r);return Pp(0,1,o/e)},Bo=1.70158,Oo=Bo*1.525,ql=Bo+1,Kl=2*Math.PI/3,Wl=2*Math.PI/4.5,_o=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Up={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>ql*e*e*e-Bo*e*e,easeOutBack:e=>1+ql*Math.pow(e-1,3)+Bo*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Oo+1)*2*e-Oo)/2:(Math.pow(2*e-2,2)*((Oo+1)*(e*2-2)+Oo)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*Kl),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*Kl)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Wl))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Wl)/2+1,easeInBounce:e=>1-_o(1-e),easeOutBounce:_o,easeInOutBounce:e=>e<.5?(1-_o(1-2*e))/2:(1+_o(2*e-1))/2,steps:Fp},xr=Symbol.for("FluidValue.get"),$n=Symbol.for("FluidValue.observers"),Tt=e=>!!(e&&e[xr]),Et=e=>e&&e[xr]?e[xr]():e,Gl=e=>e[$n]||null;function $p(e,t){e.eventObserved?e.eventObserved(t):e(t)}function kr(e,t){const n=e[$n];n&&n.forEach(r=>{$p(r,t)})}var Xl=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Vp(this,e)}},Vp=(e,t)=>Jl(e,xr,t);function Vn(e,t){if(e[xr]){let n=e[$n];n||Jl(e,$n,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Cr(e,t){const n=e[$n];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[$n]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Jl=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Ro=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Hp=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Yl=new RegExp(`(${Ro.source})(%|[a-z]+)`,"i"),zp=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,To=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Ql=e=>{const[t,n]=qp(e);if(!t||Qi())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const o=window.getComputedStyle(document.documentElement).getPropertyValue(n);return o||e}else{if(n&&To.test(n))return Ql(n);if(n)return n}return e},qp=e=>{const t=To.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},oa,Kp=(e,t,n,r,o)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${o})`,Zl=e=>{oa||(oa=mn?new RegExp(`(${Object.keys(mn).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>Et(a).replace(To,Ql).replace(Hp,zl).replace(oa,zl)),n=t.map(a=>a.match(Ro).map(Number)),o=n[0].map((a,s)=>n.map(u=>{if(!(s in u))throw Error('The arity of each "output" value must be equal');return u[s]})).map(a=>wr({...e,output:a}));return a=>{var f;const s=!Yl.test(t[0])&&((f=t.find(g=>Yl.test(g)))==null?void 0:f.replace(Ro,""));let u=0;return t[0].replace(Ro,()=>`${o[u++](a)}${s||""}`).replace(zp,Kp)}},ia="react-spring: ",ec=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${ia}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},Wp=ec(console.warn);function Gp(){Wp(`${ia}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Xp=ec(console.warn);function Jp(){Xp(`${ia}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function No(e){return pe.str(e)&&(e[0]=="#"||/\d/.test(e)||!Qi()&&To.test(e)||e in(mn||{}))}var aa=Qi()?H.useEffect:H.useLayoutEffect,Yp=()=>{const e=H.useRef(!1);return aa(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function tc(){const e=H.useState()[1],t=Yp();return()=>{t.current&&e(Math.random())}}function Qp(e,t){const[n]=H.useState(()=>({inputs:t,result:e()})),r=H.useRef(),o=r.current;let a=o;return a?t&&a.inputs&&Zp(t,a.inputs)||(a={inputs:t,result:e()}):a=n,H.useEffect(()=>{r.current=a,o==n&&(n.inputs=n.result=void 0)},[a]),a.result}function Zp(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var nc=e=>H.useEffect(e,em),em=[];function rc(e){const t=H.useRef();return H.useEffect(()=>{t.current=e}),t.current}var Er=Symbol.for("Animated:node"),tm=e=>!!e&&e[Er]===e,Yt=e=>e&&e[Er],sa=(e,t)=>kp(e,Er,t),jo=e=>e&&e[Er]&&e[Er].getPayload(),oc=class{constructor(){sa(this,this)}getPayload(){return this.payload||[]}},Sr=class extends oc{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,pe.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new Sr(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return pe.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,pe.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},Pr=class extends Sr{constructor(e){super(0),this._string=null,this._toString=wr({output:[e,e]})}static create(e){return new Pr(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(pe.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=wr({output:[this.getValue(),e]})),this._value=0,super.reset()}},Ao={dependencies:null},Lo=class extends oc{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return Jt(this.source,(n,r)=>{tm(n)?t[r]=n.getValue(e):Tt(n)?t[r]=Et(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&Me(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return Jt(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Ao.dependencies&&Tt(e)&&Ao.dependencies.add(e);const t=jo(e);t&&Me(t,n=>this.add(n))}},ic=class extends Lo{constructor(e){super(e)}static create(e){return new ic(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(nm)),!0)}};function nm(e){return(No(e)?Pr:Sr).create(e)}function la(e){const t=Yt(e);return t?t.constructor:pe.arr(e)?ic:No(e)?Pr:Sr}var ac=(e,t)=>{const n=!pe.fun(e)||e.prototype&&e.prototype.isReactComponent;return H.forwardRef((r,o)=>{const a=H.useRef(null),s=n&&H.useCallback(i=>{a.current=im(o,i)},[o]),[u,f]=om(r,t),g=tc(),h=()=>{const i=a.current;if(n&&!i)return;(i?t.applyAnimatedValues(i,u.getValue(!0)):!1)===!1&&g()},x=new rm(h,f),l=H.useRef();aa(()=>(l.current=x,Me(f,i=>Vn(i,x)),()=>{l.current&&(Me(l.current.deps,i=>Cr(i,l.current)),Te.cancel(l.current.update))})),H.useEffect(h,[]),nc(()=>()=>{const i=l.current;Me(i.deps,c=>Cr(c,i))});const v=t.getComponentProps(u.getValue());return le.createElement(e,{...v,ref:s})})},rm=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Te.write(this.update)}};function om(e,t){const n=new Set;return Ao.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Lo(e),Ao.dependencies=null,[e,n]}function im(e,t){return e&&(pe.fun(e)?e(t):e.current=t),t}var sc=Symbol.for("AnimatedComponent"),am=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=o=>new Lo(o),getComponentProps:r=o=>o}={})=>{const o={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=s=>{const u=lc(s)||"Anonymous";return pe.str(s)?s=a[s]||(a[s]=ac(s,o)):s=s[sc]||(s[sc]=ac(s,o)),s.displayName=`Animated(${u})`,s};return Jt(e,(s,u)=>{pe.arr(e)&&(u=lc(s)),a[u]=a(s)}),{animated:a}},lc=e=>pe.str(e)?e:e&&pe.str(e.displayName)?e.displayName:pe.fun(e)&&e.name||null;function Cn(e,...t){return pe.fun(e)?e(...t):e}var Br=(e,t)=>e===!0||!!(t&&e&&(pe.fun(e)?e(t):Pt(e).includes(t))),cc=(e,t)=>pe.obj(e)?t&&e[t]:e,uc=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,sm=e=>e,ca=(e,t=sm)=>{let n=lm;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const o of n){const a=t(e[o],o);pe.und(a)||(r[o]=a)}return r},lm=["config","onProps","onStart","onChange","onPause","onResume","onRest"],cm={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function um(e){const t={};let n=0;if(Jt(e,(r,o)=>{cm[o]||(t[o]=r,n++)}),n)return t}function dc(e){const t=um(e);if(t){const n={to:t};return Jt(e,(r,o)=>o in t||(n[o]=r)),n}return{...e}}function Or(e){return e=Et(e),pe.arr(e)?e.map(Or):No(e)?Ft.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function dm(e){for(const t in e)return!0;return!1}function ua(e){return pe.fun(e)||pe.arr(e)&&pe.obj(e[0])}function fm(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function hm(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var pm={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},da={...pm.default,mass:1,damping:1,easing:Up.linear,clamp:!1},mm=class{constructor(){this.velocity=0,Object.assign(this,da)}};function gm(e,t,n){n&&(n={...n},fc(n,t),t={...n,...t}),fc(e,t),Object.assign(e,t);for(const s in da)e[s]==null&&(e[s]=da[s]);let{frequency:r,damping:o}=e;const{mass:a}=e;return pe.und(r)||(r<.01&&(r=.01),o<0&&(o=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*o*a/r),e}function fc(e,t){if(!pe.und(t.decay))e.duration=void 0;else{const n=!pe.und(t.tension)||!pe.und(t.friction);(n||!pe.und(t.frequency)||!pe.und(t.damping)||!pe.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var hc=[],ym=class{constructor(){this.changed=!1,this.values=hc,this.toValues=null,this.fromValues=hc,this.config=new mm,this.immediate=!1}};function pc(e,{key:t,props:n,defaultProps:r,state:o,actions:a}){return new Promise((s,u)=>{let f,g,h=Br(n.cancel??(r==null?void 0:r.cancel),t);if(h)v();else{pe.und(n.pause)||(o.paused=Br(n.pause,t));let i=r==null?void 0:r.pause;i!==!0&&(i=o.paused||Br(i,t)),f=Cn(n.delay||0,t),i?(o.resumeQueue.add(l),a.pause()):(a.resume(),l())}function x(){o.resumeQueue.add(l),o.timeouts.delete(g),g.cancel(),f=g.time-Te.now()}function l(){f>0&&!Ft.skipAnimation?(o.delayed=!0,g=Te.setTimeout(v,f),o.pauseQueue.add(x),o.timeouts.add(g)):v()}function v(){o.delayed&&(o.delayed=!1),o.pauseQueue.delete(x),o.timeouts.delete(g),e<=(o.cancelId||0)&&(h=!0);try{a.start({...n,callId:e,cancel:h},s)}catch(i){u(i)}}})}var fa=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Hn(e.get()):t.every(n=>n.noop)?mc(e.get()):$t(e.get(),t.every(n=>n.finished)),mc=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),$t=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Hn=e=>({value:e,cancelled:!0,finished:!1});function gc(e,t,n,r){const{callId:o,parentId:a,onRest:s}=t,{asyncTo:u,promise:f}=n;return!a&&e===u&&!t.reset?f:n.promise=(async()=>{n.asyncId=o,n.asyncTo=e;const g=ca(t,(p,d)=>d==="onRest"?void 0:p);let h,x;const l=new Promise((p,d)=>(h=p,x=d)),v=p=>{const d=o<=(n.cancelId||0)&&Hn(r)||o!==n.asyncId&&$t(r,!1);if(d)throw p.result=d,x(p),p},i=(p,d)=>{const m=new yc,y=new vc;return(async()=>{if(Ft.skipAnimation)throw _r(n),y.result=$t(r,!1),x(y),y;v(m);const b=pe.obj(p)?{...p}:{...d,to:p};b.parentId=o,Jt(g,(S,k)=>{pe.und(b[k])&&(b[k]=S)});const C=await r.start(b);return v(m),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),C})()};let c;if(Ft.skipAnimation)return _r(n),$t(r,!1);try{let p;pe.arr(e)?p=(async d=>{for(const m of d)await i(m)})(e):p=Promise.resolve(e(i,r.stop.bind(r))),await Promise.all([p.then(h),l]),c=$t(r.get(),!0,!1)}catch(p){if(p instanceof yc)c=p.result;else if(p instanceof vc)c=p.result;else throw p}finally{o==n.asyncId&&(n.asyncId=a,n.asyncTo=a?u:void 0,n.promise=a?f:void 0)}return pe.fun(s)&&Te.batchedUpdates(()=>{s(c,r,r.item)}),c})()}function _r(e,t){yr(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var yc=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},vc=class extends Error{constructor(){super("SkipAnimationSignal")}},ha=e=>e instanceof pa,vm=1,pa=class extends Xl{constructor(){super(...arguments),this.id=vm++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Yt(this);return e&&e.getValue()}to(...e){return Ft.to(this,e)}interpolate(...e){return Gp(),Ft.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){kr(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||Co.sort(this),kr(this,{type:"priority",parent:this,priority:e})}},En=Symbol.for("SpringPhase"),bc=1,ma=2,ga=4,ya=e=>(e[En]&bc)>0,gn=e=>(e[En]&ma)>0,Rr=e=>(e[En]&ga)>0,wc=(e,t)=>t?e[En]|=ma|bc:e[En]&=~ma,xc=(e,t)=>t?e[En]|=ga:e[En]&=~ga,bm=class extends pa{constructor(e,t){if(super(),this.animation=new ym,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!pe.und(e)||!pe.und(t)){const n=pe.obj(e)?{...e}:{...t,from:e};pe.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(gn(this)||this._state.asyncTo)||Rr(this)}get goal(){return Et(this.animation.to)}get velocity(){const e=Yt(this);return e instanceof Sr?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return ya(this)}get isAnimating(){return gn(this)}get isPaused(){return Rr(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:o}=r;const{config:a}=r,s=jo(r.to);!s&&Tt(r.to)&&(o=Pt(Et(r.to))),r.values.forEach((g,h)=>{if(g.done)return;const x=g.constructor==Pr?1:s?s[h].lastPosition:o[h];let l=r.immediate,v=x;if(!l){if(v=g.lastPosition,a.tension<=0){g.done=!0;return}let i=g.elapsedTime+=e;const c=r.fromValues[h],p=g.v0!=null?g.v0:g.v0=pe.arr(a.velocity)?a.velocity[h]:a.velocity;let d;const m=a.precision||(c==x?.005:Math.min(1,Math.abs(x-c)*.001));if(pe.und(a.duration))if(a.decay){const y=a.decay===!0?.998:a.decay,b=Math.exp(-(1-y)*i);v=c+p/(1-y)*(1-b),l=Math.abs(g.lastPosition-v)<=m,d=p*b}else{d=g.lastVelocity==null?p:g.lastVelocity;const y=a.restVelocity||m/10,b=a.clamp?0:a.bounce,C=!pe.und(b),S=c==x?g.v0>0:c<x;let k,B=!1;const O=1,j=Math.ceil(e/O);for(let I=0;I<j&&(k=Math.abs(d)>y,!(!k&&(l=Math.abs(x-v)<=m,l)));++I){C&&(B=v==x||v>x==S,B&&(d=-d*b,v=x));const D=-a.tension*1e-6*(v-x),M=-a.friction*.001*d,$=(D+M)/a.mass;d=d+$*O,v=v+d*O}}else{let y=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,g.durationProgress>0&&(g.elapsedTime=a.duration*g.durationProgress,i=g.elapsedTime+=e)),y=(a.progress||0)+i/this._memoizedDuration,y=y>1?1:y<0?0:y,g.durationProgress=y),v=c+a.easing(y)*(x-c),d=(v-g.lastPosition)/e,l=y==1}g.lastVelocity=d,Number.isNaN(v)&&(console.warn("Got NaN while animating:",this),l=!0)}s&&!s[h].done&&(l=!1),l?g.done=!0:t=!1,g.setValue(v,a.round)&&(n=!0)});const u=Yt(this),f=u.getValue();if(t){const g=Et(r.to);(f!==g||n)&&!a.decay?(u.setValue(g),this._onChange(g)):n&&a.decay&&this._onChange(f),this._stop()}else n&&this._onChange(f)}set(e){return Te.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(gn(this)){const{to:e,config:t}=this.animation;Te.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return pe.und(e)?(n=this.queue||[],this.queue=[]):n=[pe.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>fa(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),_r(this._state,e&&this._lastCallId),Te.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=pe.obj(n)?n[t]:n,(n==null||ua(n))&&(n=void 0),r=pe.obj(r)?r[t]:r,r==null&&(r=void 0);const o={to:n,from:r};return ya(this)||(e.reverse&&([n,r]=[r,n]),r=Et(r),pe.und(r)?Yt(this)||this._set(n):this._set(r)),o}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,ca(e,(s,u)=>/^on/.test(u)?cc(s,n):s)),Ec(this,e,"onProps"),jr(this,"onProps",e,this);const o=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const a=this._state;return pc(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{Rr(this)||(xc(this,!0),vr(a.pauseQueue),jr(this,"onPause",$t(this,Tr(this,this.animation.to)),this))},resume:()=>{Rr(this)&&(xc(this,!1),gn(this)&&this._resume(),vr(a.resumeQueue),jr(this,"onResume",$t(this,Tr(this,this.animation.to)),this))},start:this._merge.bind(this,o)}}).then(s=>{if(e.loop&&s.finished&&!(t&&s.noop)){const u=kc(e);if(u)return this._update(u,!0)}return s})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Hn(this));const r=!pe.und(e.to),o=!pe.und(e.from);if(r||o)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Hn(this));const{key:a,defaultProps:s,animation:u}=this,{to:f,from:g}=u;let{to:h=f,from:x=g}=e;o&&!r&&(!t.default||pe.und(h))&&(h=x),t.reverse&&([h,x]=[x,h]);const l=!tn(x,g);l&&(u.from=x),x=Et(x);const v=!tn(h,f);v&&this._focus(h);const i=ua(t.to),{config:c}=u,{decay:p,velocity:d}=c;(r||o)&&(c.velocity=0),t.config&&!i&&gm(c,Cn(t.config,a),t.config!==s.config?Cn(s.config,a):void 0);let m=Yt(this);if(!m||pe.und(h))return n($t(this,!0));const y=pe.und(t.reset)?o&&!t.default:!pe.und(x)&&Br(t.reset,a),b=y?x:this.get(),C=Or(h),S=pe.num(C)||pe.arr(C)||No(C),k=!i&&(!S||Br(s.immediate||t.immediate,a));if(v){const I=la(h);if(I!==m.constructor)if(k)m=this._set(C);else throw Error(`Cannot animate between ${m.constructor.name} and ${I.name}, as the "to" prop suggests`)}const B=m.constructor;let O=Tt(h),j=!1;if(!O){const I=y||!ya(this)&&l;(v||I)&&(j=tn(Or(b),C),O=!j),(!tn(u.immediate,k)&&!k||!tn(c.decay,p)||!tn(c.velocity,d))&&(O=!0)}if(j&&gn(this)&&(u.changed&&!y?O=!0:O||this._stop(f)),!i&&((O||Tt(f))&&(u.values=m.getPayload(),u.toValues=Tt(h)?null:B==Pr?[1]:Pt(C)),u.immediate!=k&&(u.immediate=k,!k&&!y&&this._set(f)),O)){const{onRest:I}=u;Me(xm,M=>Ec(this,t,M));const D=$t(this,Tr(this,f));vr(this._pendingCalls,D),this._pendingCalls.add(n),u.changed&&Te.batchedUpdates(()=>{var M;u.changed=!y,I==null||I(D,this),y?Cn(s.onRest,D):(M=u.onStart)==null||M.call(u,D,this)})}y&&this._set(b),i?n(gc(t.to,t,this._state,this)):O?this._start():gn(this)&&!v?this._pendingCalls.add(n):n(mc(b))}_focus(e){const t=this.animation;e!==t.to&&(Gl(this)&&this._detach(),t.to=e,Gl(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Tt(t)&&(Vn(t,this),ha(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Tt(e)&&Cr(e,this)}_set(e,t=!0){const n=Et(e);if(!pe.und(n)){const r=Yt(this);if(!r||!tn(n,r.getValue())){const o=la(n);!r||r.constructor!=o?sa(this,o.create(n)):r.setValue(n),r&&Te.batchedUpdates(()=>{this._onChange(n,t)})}}return Yt(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,jr(this,"onStart",$t(this,Tr(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),Cn(this.animation.onChange,e,this)),Cn(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Yt(this).reset(Et(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),gn(this)||(wc(this,!0),Rr(this)||this._resume())}_resume(){Ft.skipAnimation?this.finish():Co.start(this)}_stop(e,t){if(gn(this)){wc(this,!1);const n=this.animation;Me(n.values,o=>{o.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),kr(this,{type:"idle",parent:this});const r=t?Hn(this.get()):$t(this.get(),Tr(this,e??n.to));vr(this._pendingCalls,r),n.changed&&(n.changed=!1,jr(this,"onRest",r,this))}}};function Tr(e,t){const n=Or(t),r=Or(e.get());return tn(r,n)}function kc(e,t=e.loop,n=e.to){const r=Cn(t);if(r){const o=r!==!0&&dc(r),a=(o||e).reverse,s=!o||o.reset;return Nr({...e,loop:t,default:!1,pause:void 0,to:!a||ua(n)?n:void 0,from:s?e.from:void 0,reset:s,...o})}}function Nr(e){const{to:t,from:n}=e=dc(e),r=new Set;return pe.obj(t)&&Cc(t,r),pe.obj(n)&&Cc(n,r),e.keys=r.size?Array.from(r):null,e}function wm(e){const t=Nr(e);return pe.und(t.default)&&(t.default=ca(t)),t}function Cc(e,t){Jt(e,(n,r)=>n!=null&&t.add(r))}var xm=["onStart","onRest","onChange","onPause","onResume"];function Ec(e,t,n){e.animation[n]=t[n]!==uc(t,n)?cc(t[n],e.key):void 0}function jr(e,t,...n){var r,o,a,s;(o=(r=e.animation)[t])==null||o.call(r,...n),(s=(a=e.defaultProps)[t])==null||s.call(a,...n)}var km=["onStart","onChange","onRest"],Cm=1,Em=class{constructor(e,t){this.id=Cm++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];pe.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Nr(e)),this}start(e){let{queue:t}=this;return e?t=Pt(e).map(Nr):this.queue=[],this._flush?this._flush(this,t):(Rc(this,t),va(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;Me(Pt(t),r=>n[r].stop(!!e))}else _r(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(pe.und(e))this.start({pause:!0});else{const t=this.springs;Me(Pt(e),n=>t[n].pause())}return this}resume(e){if(pe.und(e))this.start({pause:!1});else{const t=this.springs;Me(Pt(e),n=>t[n].resume())}return this}each(e){Jt(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,o=this._changed.size>0;(r&&!this._started||o&&!this._started)&&(this._started=!0,yr(e,([u,f])=>{f.value=this.get(),u(f,this,this._item)}));const a=!r&&this._started,s=o||a&&n.size?this.get():null;o&&t.size&&yr(t,([u,f])=>{f.value=s,u(f,this,this._item)}),a&&(this._started=!1,yr(n,([u,f])=>{f.value=s,u(f,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Te.onFrame(this._onFrame)}};function va(e,t){return Promise.all(t.map(n=>Sc(e,n))).then(n=>fa(e,n))}async function Sc(e,t,n){const{keys:r,to:o,from:a,loop:s,onRest:u,onResolve:f}=t,g=pe.obj(t.default)&&t.default;s&&(t.loop=!1),o===!1&&(t.to=null),a===!1&&(t.from=null);const h=pe.arr(o)||pe.fun(o)?o:void 0;h?(t.to=void 0,t.onRest=void 0,g&&(g.onRest=void 0)):Me(km,c=>{const p=t[c];if(pe.fun(p)){const d=e._events[c];t[c]=({finished:m,cancelled:y})=>{const b=d.get(p);b?(m||(b.finished=!1),y&&(b.cancelled=!0)):d.set(p,{value:null,finished:m||!1,cancelled:y||!1})},g&&(g[c]=t[c])}});const x=e._state;t.pause===!x.paused?(x.paused=t.pause,vr(t.pause?x.pauseQueue:x.resumeQueue)):x.paused&&(t.pause=!0);const l=(r||Object.keys(e.springs)).map(c=>e.springs[c].start(t)),v=t.cancel===!0||uc(t,"cancel")===!0;(h||v&&x.asyncId)&&l.push(pc(++e._lastAsyncId,{props:t,state:x,actions:{pause:Yi,resume:Yi,start(c,p){v?(_r(x,e._lastAsyncId),p(Hn(e))):(c.onRest=u,p(gc(h,c,x,e)))}}})),x.paused&&await new Promise(c=>{x.resumeQueue.add(c)});const i=fa(e,await Promise.all(l));if(s&&i.finished&&!(n&&i.noop)){const c=kc(t,s,o);if(c)return Rc(e,[c]),Sc(e,c,!0)}return f&&Te.batchedUpdates(()=>f(i,e,e.item)),i}function Pc(e,t){const n={...e.springs};return t&&Me(Pt(t),r=>{pe.und(r.keys)&&(r=Nr(r)),pe.obj(r.to)||(r={...r,to:void 0}),_c(n,r,o=>Oc(o))}),Bc(e,n),n}function Bc(e,t){Jt(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Vn(n,e))})}function Oc(e,t){const n=new bm;return n.key=e,t&&Vn(n,t),n}function _c(e,t,n){t.keys&&Me(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function Rc(e,t){Me(t,n=>{_c(e.springs,n,r=>Oc(r,e))})}var Io=({children:e,...t})=>{const n=H.useContext(Do),r=t.pause||!!n.pause,o=t.immediate||!!n.immediate;t=Qp(()=>({pause:r,immediate:o}),[r,o]);const{Provider:a}=Do;return le.createElement(a,{value:t},e)},Do=Sm(Io,{});Io.Provider=Do.Provider,Io.Consumer=Do.Consumer;function Sm(e,t){return Object.assign(e,le.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var Pm=()=>{const e=[],t=function(r){Jp();const o=[];return Me(e,(a,s)=>{if(pe.und(r))o.push(a.start());else{const u=n(r,a,s);u&&o.push(a.start(u))}}),o};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const o=e.indexOf(r);~o&&e.splice(o,1)},t.pause=function(){return Me(e,r=>r.pause(...arguments)),this},t.resume=function(){return Me(e,r=>r.resume(...arguments)),this},t.set=function(r){Me(e,(o,a)=>{const s=pe.fun(r)?r(a,o):r;s&&o.set(s)})},t.start=function(r){const o=[];return Me(e,(a,s)=>{if(pe.und(r))o.push(a.start());else{const u=this._getProps(r,a,s);u&&o.push(a.start(u))}}),o},t.stop=function(){return Me(e,r=>r.stop(...arguments)),this},t.update=function(r){return Me(e,(o,a)=>o.update(this._getProps(r,o,a))),this};const n=function(r,o,a){return pe.fun(r)?r(a,o):r};return t._getProps=n,t};function Bm(e,t,n){const r=pe.fun(t)&&t;r&&!n&&(n=[]);const o=H.useMemo(()=>r||arguments.length==3?Pm():void 0,[]),a=H.useRef(0),s=tc(),u=H.useMemo(()=>({ctrls:[],queue:[],flush(d,m){const y=Pc(d,m);return a.current>0&&!u.queue.length&&!Object.keys(y).some(C=>!d.springs[C])?va(d,m):new Promise(C=>{Bc(d,y),u.queue.push(()=>{C(va(d,m))}),s()})}}),[]),f=H.useRef([...u.ctrls]),g=[],h=rc(e)||0;H.useMemo(()=>{Me(f.current.slice(e,h),d=>{fm(d,o),d.stop(!0)}),f.current.length=e,x(h,e)},[e]),H.useMemo(()=>{x(0,Math.min(h,e))},n);function x(d,m){for(let y=d;y<m;y++){const b=f.current[y]||(f.current[y]=new Em(null,u.flush)),C=r?r(y,b):t[y];C&&(g[y]=wm(C))}}const l=f.current.map((d,m)=>Pc(d,g[m])),v=H.useContext(Io),i=rc(v),c=v!==i&&dm(v);aa(()=>{a.current++,u.ctrls=f.current;const{queue:d}=u;d.length&&(u.queue=[],Me(d,m=>m())),Me(f.current,(m,y)=>{o==null||o.add(m),c&&m.start({default:v});const b=g[y];b&&(hm(m,b.ref),m.ref?m.queue.push(b):m.start(b))})}),nc(()=>()=>{Me(u.ctrls,d=>d.stop(!0))});const p=l.map(d=>({...d}));return o?[p,o]:p}function Om(e,t){const n=pe.fun(e),[[r],o]=Bm(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,o]:r}var _m=class extends pa{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=wr(...t);const n=this._get(),r=la(n);sa(this,r.create(n))}advance(e){const t=this._get(),n=this.get();tn(t,n)||(Yt(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Tc(this._active)&&ba(this)}_get(){const e=pe.arr(this.source)?this.source.map(Et):Pt(Et(this.source));return this.calc(...e)}_start(){this.idle&&!Tc(this._active)&&(this.idle=!1,Me(jo(this),e=>{e.done=!1}),Ft.skipAnimation?(Te.batchedUpdates(()=>this.advance()),ba(this)):Co.start(this))}_attach(){let e=1;Me(Pt(this.source),t=>{Tt(t)&&Vn(t,this),ha(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){Me(Pt(this.source),e=>{Tt(e)&&Cr(e,this)}),this._active.clear(),ba(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=Pt(this.source).reduce((t,n)=>Math.max(t,(ha(n)?n.priority:0)+1),0))}};function Rm(e){return e.idle!==!1}function Tc(e){return!e.size||Array.from(e).every(Rm)}function ba(e){e.idle||(e.idle=!0,Me(jo(e),t=>{t.done=!0}),kr(e,{type:"idle",parent:e}))}Ft.assign({createStringInterpolator:Zl,to:(e,t)=>new _m(e,t)});var Nc=/^--/;function Tm(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Nc.test(e)&&!(Ar.hasOwnProperty(e)&&Ar[e])?t+"px":(""+t).trim()}var jc={};function Nm(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:o,scrollTop:a,scrollLeft:s,viewBox:u,...f}=t,g=Object.values(f),h=Object.keys(f).map(x=>n||e.hasAttribute(x)?x:jc[x]||(jc[x]=x.replace(/([A-Z])/g,l=>"-"+l.toLowerCase())));o!==void 0&&(e.textContent=o);for(const x in r)if(r.hasOwnProperty(x)){const l=Tm(x,r[x]);Nc.test(x)?e.style.setProperty(x,l):e.style[x]=l}h.forEach((x,l)=>{e.setAttribute(x,g[l])}),a!==void 0&&(e.scrollTop=a),s!==void 0&&(e.scrollLeft=s),u!==void 0&&e.setAttribute("viewBox",u)}var Ar={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},jm=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Am=["Webkit","Ms","Moz","O"];Ar=Object.keys(Ar).reduce((e,t)=>(Am.forEach(n=>e[jm(n,t)]=e[t]),e),Ar);var Lm=/^(matrix|translate|scale|rotate|skew)/,Im=/^(translate)/,Dm=/^(rotate|skew)/,wa=(e,t)=>pe.num(e)&&e!==0?e+t:e,Mo=(e,t)=>pe.arr(e)?e.every(n=>Mo(n,t)):pe.num(e)?e===t:parseFloat(e)===t,Mm=class extends Lo{constructor({x:e,y:t,z:n,...r}){const o=[],a=[];(e||t||n)&&(o.push([e||0,t||0,n||0]),a.push(s=>[`translate3d(${s.map(u=>wa(u,"px")).join(",")})`,Mo(s,0)])),Jt(r,(s,u)=>{if(u==="transform")o.push([s||""]),a.push(f=>[f,f===""]);else if(Lm.test(u)){if(delete r[u],pe.und(s))return;const f=Im.test(u)?"px":Dm.test(u)?"deg":"";o.push(Pt(s)),a.push(u==="rotate3d"?([g,h,x,l])=>[`rotate3d(${g},${h},${x},${wa(l,f)})`,Mo(l,0)]:g=>[`${u}(${g.map(h=>wa(h,f)).join(",")})`,Mo(g,u.startsWith("scale")?1:0)])}}),o.length&&(r.transform=new Fm(o,a)),super(r)}},Fm=class extends Xl{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return Me(this.inputs,(n,r)=>{const o=Et(n[0]),[a,s]=this.transforms[r](pe.arr(o)?o:n.map(Et));e+=" "+a,t=t&&s}),t?"none":e}observerAdded(e){e==1&&Me(this.inputs,t=>Me(t,n=>Tt(n)&&Vn(n,this)))}observerRemoved(e){e==0&&Me(this.inputs,t=>Me(t,n=>Tt(n)&&Cr(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),kr(this,e)}},Um=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];Ft.assign({batchedUpdates:sn.unstable_batchedUpdates,createStringInterpolator:Zl,colors:Bp});var $m=am(Um,{applyAnimatedValues:Nm,createAnimatedStyle:e=>new Mm(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Vm=$m.animated;function Ac(e){const{rows:t}=e,n=Om({from:{opacity:0},to:{opacity:1}});return E.jsxs(Vm.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,o)=>E.jsx("div",{className:"h-16 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${o}`)),E.jsx("span",{className:"sr-only",children:"Loading..."})]})}function Hm({item:e}){return E.jsx("th",{className:`h-10 min-w-max items-center px-4 ${e.align==="left"?"text-start":e.align==="center"?"text-center":"text-end"}`,children:E.jsx(qe,{size:"xs",weight:"normal",color:"text-gray-700",children:e&&e.value})})}function zm({row:e,onClick:t}){return E.jsx("tr",{children:e.columns.map((n,r)=>E.jsx("td",{children:E.jsx("div",{className:`my-auto flex h-12 w-full items-center ${n.align==="left"?"justify-start":n.align==="center"?"justify-center":"justify-end"} truncate px-4 font-thin`,children:n.value.type==="button_component"?E.jsx(Ye,{label:n.value.label??"",disabled:n.value.disabled,onClick:()=>t&&t(n.value.id)}):E.jsx(qe,{size:"sm",weight:"light",color:"text-gray-700",children:n.value.title})})},`${n.value}-${r}`))})}function qm(e){return E.jsx(E.Fragment,{children:[...Array(e.rows)].map((t,n)=>E.jsx("tr",{className:"border-b border-gray-50",children:[...Array(e.columns)].map((r,o)=>E.jsx("td",{className:"table-cell animate-pulse",children:E.jsx("div",{className:`flex grow items-center ${e.type=="double"?"h-[72px]":"h-12"}`,children:E.jsx("div",{className:"m-2 h-8 w-28 rounded-lg bg-gray-50"})})},`form_element_skeleton_col_${o}`))},`form_element_skeleton_${n}`))})}function Lc({header:e=[],rows:t=[],pending:n,onClick:r}){const{t:o}=Qe();return E.jsxs("div",{className:"relative overflow-auto rounded-lg rounded-b-lg rounded-t-lg border border-gray-900/10",children:[E.jsxs("table",{className:"table w-full table-auto",children:[E.jsx("thead",{className:"sticky top-0 table-header-group w-full bg-gray-50",children:E.jsx("tr",{children:e.map((a,s)=>E.jsx(Hm,{item:a},`${a.value}-${s}`))})}),E.jsx("tbody",{children:n?E.jsx(qm,{columns:e.length??5,rows:t.length??10}):t.map((a,s)=>E.jsx(zm,{row:a,onClick:r},s))})]}),!t.length&&E.jsx("div",{className:"p-6",children:E.jsx(qe,{color:"text-gray-200",className:"text-center",size:"sm",children:o("noData")})})]})}function xa(e){"@babel/helpers - typeof";return xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xa(e)}function Ic(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":xa(XMLHttpRequest))==="object"}function Km(e){return!!e&&typeof e.then=="function"}function Wm(e){return Km(e)?e:Promise.resolve(e)}function Gm(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var ka={exports:{}},Fo={exports:{}},Dc;function Xm(){return Dc||(Dc=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof Rn<"u"&&Rn,r=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(s){var u=typeof a<"u"&&a||typeof self<"u"&&self||typeof u<"u"&&u,f={searchParams:"URLSearchParams"in u,iterable:"Symbol"in u&&"iterator"in Symbol,blob:"FileReader"in u&&"Blob"in u&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in u,arrayBuffer:"ArrayBuffer"in u};function g(P){return P&&DataView.prototype.isPrototypeOf(P)}if(f.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],x=ArrayBuffer.isView||function(P){return P&&h.indexOf(Object.prototype.toString.call(P))>-1};function l(P){if(typeof P!="string"&&(P=String(P)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(P)||P==="")throw new TypeError('Invalid character in header field name: "'+P+'"');return P.toLowerCase()}function v(P){return typeof P!="string"&&(P=String(P)),P}function i(P){var L={next:function(){var q=P.shift();return{done:q===void 0,value:q}}};return f.iterable&&(L[Symbol.iterator]=function(){return L}),L}function c(P){this.map={},P instanceof c?P.forEach(function(L,q){this.append(q,L)},this):Array.isArray(P)?P.forEach(function(L){this.append(L[0],L[1])},this):P&&Object.getOwnPropertyNames(P).forEach(function(L){this.append(L,P[L])},this)}c.prototype.append=function(P,L){P=l(P),L=v(L);var q=this.map[P];this.map[P]=q?q+", "+L:L},c.prototype.delete=function(P){delete this.map[l(P)]},c.prototype.get=function(P){return P=l(P),this.has(P)?this.map[P]:null},c.prototype.has=function(P){return this.map.hasOwnProperty(l(P))},c.prototype.set=function(P,L){this.map[l(P)]=v(L)},c.prototype.forEach=function(P,L){for(var q in this.map)this.map.hasOwnProperty(q)&&P.call(L,this.map[q],q,this)},c.prototype.keys=function(){var P=[];return this.forEach(function(L,q){P.push(q)}),i(P)},c.prototype.values=function(){var P=[];return this.forEach(function(L){P.push(L)}),i(P)},c.prototype.entries=function(){var P=[];return this.forEach(function(L,q){P.push([q,L])}),i(P)},f.iterable&&(c.prototype[Symbol.iterator]=c.prototype.entries);function p(P){if(P.bodyUsed)return Promise.reject(new TypeError("Already read"));P.bodyUsed=!0}function d(P){return new Promise(function(L,q){P.onload=function(){L(P.result)},P.onerror=function(){q(P.error)}})}function m(P){var L=new FileReader,q=d(L);return L.readAsArrayBuffer(P),q}function y(P){var L=new FileReader,q=d(L);return L.readAsText(P),q}function b(P){for(var L=new Uint8Array(P),q=new Array(L.length),K=0;K<L.length;K++)q[K]=String.fromCharCode(L[K]);return q.join("")}function C(P){if(P.slice)return P.slice(0);var L=new Uint8Array(P.byteLength);return L.set(new Uint8Array(P)),L.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(P){this.bodyUsed=this.bodyUsed,this._bodyInit=P,P?typeof P=="string"?this._bodyText=P:f.blob&&Blob.prototype.isPrototypeOf(P)?this._bodyBlob=P:f.formData&&FormData.prototype.isPrototypeOf(P)?this._bodyFormData=P:f.searchParams&&URLSearchParams.prototype.isPrototypeOf(P)?this._bodyText=P.toString():f.arrayBuffer&&f.blob&&g(P)?(this._bodyArrayBuffer=C(P.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):f.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(P)||x(P))?this._bodyArrayBuffer=C(P):this._bodyText=P=Object.prototype.toString.call(P):this._bodyText="",this.headers.get("content-type")||(typeof P=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):f.searchParams&&URLSearchParams.prototype.isPrototypeOf(P)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},f.blob&&(this.blob=function(){var P=p(this);if(P)return P;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var P=p(this);return P||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(m)}),this.text=function(){var P=p(this);if(P)return P;if(this._bodyBlob)return y(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(b(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},f.formData&&(this.formData=function(){return this.text().then(j)}),this.json=function(){return this.text().then(JSON.parse)},this}var k=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function B(P){var L=P.toUpperCase();return k.indexOf(L)>-1?L:P}function O(P,L){if(!(this instanceof O))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');L=L||{};var q=L.body;if(P instanceof O){if(P.bodyUsed)throw new TypeError("Already read");this.url=P.url,this.credentials=P.credentials,L.headers||(this.headers=new c(P.headers)),this.method=P.method,this.mode=P.mode,this.signal=P.signal,!q&&P._bodyInit!=null&&(q=P._bodyInit,P.bodyUsed=!0)}else this.url=String(P);if(this.credentials=L.credentials||this.credentials||"same-origin",(L.headers||!this.headers)&&(this.headers=new c(L.headers)),this.method=B(L.method||this.method||"GET"),this.mode=L.mode||this.mode||null,this.signal=L.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&q)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(q),(this.method==="GET"||this.method==="HEAD")&&(L.cache==="no-store"||L.cache==="no-cache")){var K=/([?&])_=[^&]*/;if(K.test(this.url))this.url=this.url.replace(K,"$1_="+new Date().getTime());else{var Q=/\?/;this.url+=(Q.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}O.prototype.clone=function(){return new O(this,{body:this._bodyInit})};function j(P){var L=new FormData;return P.trim().split("&").forEach(function(q){if(q){var K=q.split("="),Q=K.shift().replace(/\+/g," "),Z=K.join("=").replace(/\+/g," ");L.append(decodeURIComponent(Q),decodeURIComponent(Z))}}),L}function I(P){var L=new c,q=P.replace(/\r?\n[\t ]+/g," ");return q.split("\r").map(function(K){return K.indexOf(`
73
- `)===0?K.substr(1,K.length):K}).forEach(function(K){var Q=K.split(":"),Z=Q.shift().trim();if(Z){var ee=Q.join(":").trim();L.append(Z,ee)}}),L}S.call(O.prototype);function D(P,L){if(!(this instanceof D))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');L||(L={}),this.type="default",this.status=L.status===void 0?200:L.status,this.ok=this.status>=200&&this.status<300,this.statusText=L.statusText===void 0?"":""+L.statusText,this.headers=new c(L.headers),this.url=L.url||"",this._initBody(P)}S.call(D.prototype),D.prototype.clone=function(){return new D(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new c(this.headers),url:this.url})},D.error=function(){var P=new D(null,{status:0,statusText:""});return P.type="error",P};var M=[301,302,303,307,308];D.redirect=function(P,L){if(M.indexOf(L)===-1)throw new RangeError("Invalid status code");return new D(null,{status:L,headers:{location:P}})},s.DOMException=u.DOMException;try{new s.DOMException}catch{s.DOMException=function(L,q){this.message=L,this.name=q;var K=Error(L);this.stack=K.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function $(P,L){return new Promise(function(q,K){var Q=new O(P,L);if(Q.signal&&Q.signal.aborted)return K(new s.DOMException("Aborted","AbortError"));var Z=new XMLHttpRequest;function ee(){Z.abort()}Z.onload=function(){var ne={status:Z.status,statusText:Z.statusText,headers:I(Z.getAllResponseHeaders()||"")};ne.url="responseURL"in Z?Z.responseURL:ne.headers.get("X-Request-URL");var me="response"in Z?Z.response:Z.responseText;setTimeout(function(){q(new D(me,ne))},0)},Z.onerror=function(){setTimeout(function(){K(new TypeError("Network request failed"))},0)},Z.ontimeout=function(){setTimeout(function(){K(new TypeError("Network request failed"))},0)},Z.onabort=function(){setTimeout(function(){K(new s.DOMException("Aborted","AbortError"))},0)};function ue(ne){try{return ne===""&&u.location.href?u.location.href:ne}catch{return ne}}Z.open(Q.method,ue(Q.url),!0),Q.credentials==="include"?Z.withCredentials=!0:Q.credentials==="omit"&&(Z.withCredentials=!1),"responseType"in Z&&(f.blob?Z.responseType="blob":f.arrayBuffer&&Q.headers.get("Content-Type")&&Q.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(Z.responseType="arraybuffer")),L&&typeof L.headers=="object"&&!(L.headers instanceof c)?Object.getOwnPropertyNames(L.headers).forEach(function(ne){Z.setRequestHeader(ne,v(L.headers[ne]))}):Q.headers.forEach(function(ne,me){Z.setRequestHeader(me,ne)}),Q.signal&&(Q.signal.addEventListener("abort",ee),Z.onreadystatechange=function(){Z.readyState===4&&Q.signal.removeEventListener("abort",ee)}),Z.send(typeof Q._bodyInit>"u"?null:Q._bodyInit)})}return $.polyfill=!0,u.fetch||(u.fetch=$,u.Headers=c,u.Request=O,u.Response=D),s.Headers=c,s.Request=O,s.Response=D,s.fetch=$,s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(Fo,Fo.exports)),Fo.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Rn<"u"&&Rn.fetch?n=Rn.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof Gm<"u"&&typeof window>"u"){var r=n||Xm();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(ka,ka.exports);var Mc=ka.exports;const Fc=Xo(Mc),Uc=Ju({__proto__:null,default:Fc},[Mc]);function $c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Vc(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$c(Object(n),!0).forEach(function(r){Jm(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$c(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jm(e,t,n){return t=Ym(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ym(e){var t=Qm(e,"string");return Sn(t)=="symbol"?t:t+""}function Qm(e,t){if(Sn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Sn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sn(e){"@babel/helpers - typeof";return Sn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sn(e)}var nn;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?nn=global.fetch:typeof window<"u"&&window.fetch?nn=window.fetch:nn=fetch);var Lr;Ic()&&(typeof global<"u"&&global.XMLHttpRequest?Lr=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Lr=window.XMLHttpRequest));var Uo;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Uo=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Uo=window.ActiveXObject)),!nn&&Uc&&!Lr&&!Uo&&(nn=Fc||Uc),typeof nn!="function"&&(nn=void 0);var Ca=function(t,n){if(n&&Sn(n)==="object"){var r="";for(var o in n)r+="&"+encodeURIComponent(o)+"="+encodeURIComponent(n[o]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},Hc=function(t,n,r,o){var a=function(f){if(!f.ok)return r(f.statusText||"Error",{status:f.status});f.text().then(function(g){r(null,{status:f.status,data:g})}).catch(r)};if(o){var s=o(t,n);if(s instanceof Promise){s.then(a).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(a).catch(r):nn(t,n).then(a).catch(r)},zc=!1,Zm=function(t,n,r,o){t.queryStringParams&&(n=Ca(n,t.queryStringParams));var a=Vc({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(a["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(a["Content-Type"]="application/json");var s=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,u=Vc({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:a},zc?{}:s),f=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{Hc(n,u,o,f)}catch(g){if(!s||Object.keys(s).length===0||!g.message||g.message.indexOf("not implemented")<0)return o(g);try{Object.keys(s).forEach(function(h){delete u[h]}),Hc(n,u,o,f),zc=!0}catch(h){o(h)}}},eg=function(t,n,r,o){r&&Sn(r)==="object"&&(r=Ca("",r).slice(1)),t.queryStringParams&&(n=Ca(n,t.queryStringParams));try{var a;Lr?a=new Lr:a=new Uo("MSXML2.XMLHTTP.3.0"),a.open(r?"POST":"GET",n,1),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!t.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var s=t.customHeaders;if(s=typeof s=="function"?s():s,s)for(var u in s)a.setRequestHeader(u,s[u]);a.onreadystatechange=function(){a.readyState>3&&o(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(r)}catch(f){console&&console.log(f)}},tg=function(t,n,r,o){if(typeof r=="function"&&(o=r,r=void 0),o=o||function(){},nn&&n.indexOf("file:")!==0)return Zm(t,n,r,o);if(Ic()||typeof ActiveXObject=="function")return eg(t,n,r,o);o(new Error("No fetch and no xhr implementation found!"))};function zn(e){"@babel/helpers - typeof";return zn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zn(e)}function qc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Ea(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qc(Object(n),!0).forEach(function(r){Kc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qc(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ng(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function rg(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,Wc(r.key),r)}}function og(e,t,n){return t&&rg(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Kc(e,t,n){return t=Wc(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wc(e){var t=ig(e,"string");return zn(t)=="symbol"?t:t+""}function ig(e,t){if(zn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(zn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ag=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,o){return Kc({},r,o||"")},parseLoadPayload:function(n,r){},request:tg,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Gc=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};ng(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return og(e,[{key:"init",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Ea(Ea(Ea({},ag()),this.options||{}),o),this.allOptions=a,this.services&&this.options.reloadInterval){var s=setInterval(function(){return r.reload()},this.options.reloadInterval);zn(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(n,r,o){this._readAny(n,n,r,r,o)}},{key:"read",value:function(n,r,o){this._readAny([n],n,[r],r,o)}},{key:"_readAny",value:function(n,r,o,a,s){var u=this,f=this.options.loadPath;typeof this.options.loadPath=="function"&&(f=this.options.loadPath(n,o)),f=Wm(f),f.then(function(g){if(!g)return s(null,{});var h=u.services.interpolator.interpolate(g,{lng:n.join("+"),ns:o.join("+")});u.loadUrl(h,s,r,a)})}},{key:"loadUrl",value:function(n,r,o,a){var s=this,u=typeof o=="string"?[o]:o,f=typeof a=="string"?[a]:a,g=this.options.parseLoadPayload(u,f);this.options.request(this.options,n,g,function(h,x){if(x&&(x.status>=500&&x.status<600||!x.status))return r("failed loading "+n+"; status code: "+x.status,!0);if(x&&x.status>=400&&x.status<500)return r("failed loading "+n+"; status code: "+x.status,!1);if(!x&&h&&h.message&&h.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+h.message,!0);if(h)return r(h,!1);var l,v;try{typeof x.data=="string"?l=s.options.parse(x.data,o,a):l=x.data}catch{v="failed parsing "+n+" to json"}if(v)return r(v,!1);r(null,l)})}},{key:"create",value:function(n,r,o,a,s){var u=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var f=this.options.parsePayload(r,o,a),g=0,h=[],x=[];n.forEach(function(l){var v=u.options.addPath;typeof u.options.addPath=="function"&&(v=u.options.addPath(l,r));var i=u.services.interpolator.interpolate(v,{lng:l,ns:r});u.options.request(u.options,i,f,function(c,p){g+=1,h.push(c),x.push(p),g===n.length&&typeof s=="function"&&s(h,x)})})}}},{key:"reload",value:function(){var n=this,r=this.services,o=r.backendConnector,a=r.languageUtils,s=r.logger,u=o.language;if(!(u&&u.toLowerCase()==="cimode")){var f=[],g=function(x){var l=a.toResolveHierarchy(x);l.forEach(function(v){f.indexOf(v)<0&&f.push(v)})};g(u),this.allOptions.preload&&this.allOptions.preload.forEach(function(h){return g(h)}),f.forEach(function(h){n.allOptions.ns.forEach(function(x){o.read(h,x,"read",null,null,function(l,v){l&&s.warn("loading namespace ".concat(x," for language ").concat(h," failed"),l),!l&&v&&s.log("loaded namespace ".concat(x," for language ").concat(h),v),o.loaded("".concat(h,"|").concat(x),l,v)})})})}}}])}();Gc.type="backend";const{slice:sg,forEach:lg}=[];function cg(e){return lg.call(sg.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const Xc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,ug=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const o=encodeURIComponent(t);let a=`${e}=${o}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!Xc.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!Xc.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},Jc={create(e,t,n,r){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(o.expires=new Date,o.expires.setTime(o.expires.getTime()+n*60*1e3)),r&&(o.domain=r),document.cookie=ug(e,encodeURIComponent(t),o)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let o=n[r];for(;o.charAt(0)===" ";)o=o.substring(1,o.length);if(o.indexOf(t)===0)return o.substring(t.length,o.length)}return null},remove(e){this.create(e,"",-1)}};var dg={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Jc.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:o,cookieOptions:a}=t;n&&typeof document<"u"&&Jc.create(n,e,r,o,a)}},fg={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:o}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(o=window.location.hash.substring(window.location.hash.indexOf("?")));const s=o.substring(1).split("&");for(let u=0;u<s.length;u++){const f=s[u].indexOf("=");f>0&&s[u].substring(0,f)===t&&(n=s[u].substring(f+1))}}return n}};let Ir=null;const Yc=()=>{if(Ir!==null)return Ir;try{Ir=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ir=!1}return Ir};var hg={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&Yc())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&Yc()&&window.localStorage.setItem(n,e)}};let Dr=null;const Qc=()=>{if(Dr!==null)return Dr;try{Dr=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Dr=!1}return Dr};var pg={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Qc())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Qc()&&window.sessionStorage.setItem(n,e)}},mg={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:o}=navigator;if(n)for(let a=0;a<n.length;a++)t.push(n[a]);r&&t.push(r),o&&t.push(o)}return t.length>0?t:void 0}},gg={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},yg={name:"path",lookup(e){var o;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(o=n[typeof t=="number"?t:0])==null?void 0:o.replace("/",""):void 0}},vg={name:"subdomain",lookup(e){var o,a;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((a=(o=window.location)==null?void 0:o.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function bg(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Zc{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=cg(n,this.options||{},bg()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=o=>o.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(dg),this.addDetector(fg),this.addDetector(hg),this.addDetector(pg),this.addDetector(mg),this.addDetector(gg),this.addDetector(yg),this.addDetector(vg)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let o=this.detectors[r].lookup(this.options);o&&typeof o=="string"&&(o=[o]),o&&(n=n.concat(o))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Zc.type="languageDetector",pt.use(Gc).use(Zc).use(hp).init({fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});function wg({children:e,config:t,payload:n}){const[r,o]=H.useState("");return H.useEffect(()=>{r||(tt.initialize(t.apiKey,t.host),localStorage.setItem("apiKey",JSON.stringify(t.apiKey)),(async()=>{const a=await vo.create(n);o(a.data.data.uuid)})())},[t,n,r]),r?E.jsxs(H.StrictMode,{children:[E.jsx(ml,{...t,sessionUuid:r,children:E.jsx("div",{children:E.jsxs("div",{className:"bg-primary-50 flex h-screen w-screen flex-col",children:[E.jsx("div",{className:"flex h-full overflow-auto",children:e}),r&&E.jsx(Cl,{})]})})}),E.jsx(ms,{position:"bottom-center"})]}):E.jsx(E.Fragment,{children:"Loading..."})}/**
65
+ */(function(e,t){(function(n,r){e.exports=r(k)})(hr,function(n){return function(){var r={981:function(){typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(c){if("Element"in c){var h="classList",g="prototype",d=c.Element[g],E=Object,u=String[g].trim||function(){return this.replace(/^\s+|\s+$/g,"")},w=Array[g].indexOf||function(C){for(var S=0,D=this.length;S<D;S++)if(S in this&&this[S]===C)return S;return-1},o=function(C,S){this.name=C,this.code=DOMException[C],this.message=S},l=function(C,S){if(S==="")throw new o("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(S))throw new o("INVALID_CHARACTER_ERR","The token must not contain space characters.");return w.call(C,S)},p=function(C){for(var S=u.call(C.getAttribute("class")||""),D=S?S.split(/\s+/):[],A=0,N=D.length;A<N;A++)this.push(D[A]);this._updateClassName=function(){C.setAttribute("class",this.toString())}},f=p[g]=[],m=function(){return new p(this)};if(o[g]=Error[g],f.item=function(C){return this[C]||null},f.contains=function(C){return~l(this,C+"")},f.add=function(){var C,S=arguments,D=0,A=S.length,N=!1;do~l(this,C=S[D]+"")||(this.push(C),N=!0);while(++D<A);N&&this._updateClassName()},f.remove=function(){var C,S,D=arguments,A=0,N=D.length,I=!1;do for(S=l(this,C=D[A]+"");~S;)this.splice(S,1),I=!0,S=l(this,C);while(++A<N);I&&this._updateClassName()},f.toggle=function(C,S){var D=this.contains(C),A=D?S!==!0&&"remove":S!==!1&&"add";return A&&this[A](C),S===!0||S===!1?S:!D},f.replace=function(C,S){var D=l(C+"");~D&&(this.splice(D,1,S),this._updateClassName())},f.toString=function(){return this.join(" ")},E.defineProperty){var b={get:m,enumerable:!0,configurable:!0};try{E.defineProperty(d,h,b)}catch(C){C.number!==void 0&&C.number!==-2146823252||(b.enumerable=!1,E.defineProperty(d,h,b))}}else E[g].__defineGetter__&&d.__defineGetter__(h,m)}}(self),function(){var c=document.createElement("_");if(c.classList.add("c1","c2"),!c.classList.contains("c2")){var h=function(d){var E=DOMTokenList.prototype[d];DOMTokenList.prototype[d]=function(u){var w,o=arguments.length;for(w=0;w<o;w++)u=arguments[w],E.call(this,u)}};h("add"),h("remove")}if(c.classList.toggle("c3",!1),c.classList.contains("c3")){var g=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(d,E){return 1 in arguments&&!this.contains(d)==!E?E:g.call(this,d)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(d,E){var u=this.toString().split(" "),w=u.indexOf(d+"");~w&&(u=u.slice(w),this.remove.apply(this,u),this.add(E),this.add.apply(this,u.slice(1)))}),c=null}())},548:function(c){c.exports=function(){var h={9306:function(u,w,o){var l=o(4901),p=o(6823),f=TypeError;u.exports=function(m){if(l(m))return m;throw new f(p(m)+" is not a function")}},5548:function(u,w,o){var l=o(3517),p=o(6823),f=TypeError;u.exports=function(m){if(l(m))return m;throw new f(p(m)+" is not a constructor")}},3506:function(u,w,o){var l=o(3925),p=String,f=TypeError;u.exports=function(m){if(l(m))return m;throw new f("Can't set "+p(m)+" as a prototype")}},6469:function(u,w,o){var l=o(8227),p=o(2360),f=o(4913).f,m=l("unscopables"),b=Array.prototype;b[m]===void 0&&f(b,m,{configurable:!0,value:p(null)}),u.exports=function(C){b[m][C]=!0}},7829:function(u,w,o){var l=o(8183).charAt;u.exports=function(p,f,m){return f+(m?l(p,f).length:1)}},8551:function(u,w,o){var l=o(34),p=String,f=TypeError;u.exports=function(m){if(l(m))return m;throw new f(p(m)+" is not an object")}},235:function(u,w,o){var l=o(9213).forEach,p=o(4598)("forEach");u.exports=p?[].forEach:function(f){return l(this,f,arguments.length>1?arguments[1]:void 0)}},7916:function(u,w,o){var l=o(6080),p=o(9565),f=o(8981),m=o(6319),b=o(4209),C=o(3517),S=o(6198),D=o(4659),A=o(81),N=o(851),I=Array;u.exports=function(_){var Q=f(_),$=C(this),V=arguments.length,K=V>1?arguments[1]:void 0,R=K!==void 0;R&&(K=l(K,V>2?arguments[2]:void 0));var U,W,z,ne,re,ae,ge=N(Q),le=0;if(!ge||this===I&&b(ge))for(U=S(Q),W=$?new this(U):I(U);U>le;le++)ae=R?K(Q[le],le):Q[le],D(W,le,ae);else for(W=$?new this:[],re=(ne=A(Q,ge)).next;!(z=p(re,ne)).done;le++)ae=R?m(ne,K,[z.value,le],!0):z.value,D(W,le,ae);return W.length=le,W}},9617:function(u,w,o){var l=o(5397),p=o(5610),f=o(6198),m=function(b){return function(C,S,D){var A=l(C),N=f(A);if(N===0)return!b&&-1;var I,_=p(D,N);if(b&&S!=S){for(;N>_;)if((I=A[_++])!=I)return!0}else for(;N>_;_++)if((b||_ in A)&&A[_]===S)return b||_||0;return!b&&-1}};u.exports={includes:m(!0),indexOf:m(!1)}},9213:function(u,w,o){var l=o(6080),p=o(9504),f=o(7055),m=o(8981),b=o(6198),C=o(1469),S=p([].push),D=function(A){var N=A===1,I=A===2,_=A===3,Q=A===4,$=A===6,V=A===7,K=A===5||$;return function(R,U,W,z){for(var ne,re,ae=m(R),ge=f(ae),le=b(ge),xe=l(U,W),ce=0,q=z||C,G=N?q(R,le):I||V?q(R,0):void 0;le>ce;ce++)if((K||ce in ge)&&(re=xe(ne=ge[ce],ce,ae),A))if(N)G[ce]=re;else if(re)switch(A){case 3:return!0;case 5:return ne;case 6:return ce;case 2:S(G,ne)}else switch(A){case 4:return!1;case 7:S(G,ne)}return $?-1:_||Q?Q:G}};u.exports={forEach:D(0),map:D(1),filter:D(2),some:D(3),every:D(4),find:D(5),findIndex:D(6),filterReject:D(7)}},597:function(u,w,o){var l=o(9039),p=o(8227),f=o(7388),m=p("species");u.exports=function(b){return f>=51||!l(function(){var C=[];return(C.constructor={})[m]=function(){return{foo:1}},C[b](Boolean).foo!==1})}},4598:function(u,w,o){var l=o(9039);u.exports=function(p,f){var m=[][p];return!!m&&l(function(){m.call(null,f||function(){return 1},1)})}},926:function(u,w,o){var l=o(9306),p=o(8981),f=o(7055),m=o(6198),b=TypeError,C="Reduce of empty array with no initial value",S=function(D){return function(A,N,I,_){var Q=p(A),$=f(Q),V=m(Q);if(l(N),V===0&&I<2)throw new b(C);var K=D?V-1:0,R=D?-1:1;if(I<2)for(;;){if(K in $){_=$[K],K+=R;break}if(K+=R,D?K<0:V<=K)throw new b(C)}for(;D?K>=0:V>K;K+=R)K in $&&(_=N(_,$[K],K,Q));return _}};u.exports={left:S(!1),right:S(!0)}},4527:function(u,w,o){var l=o(3724),p=o(4376),f=TypeError,m=Object.getOwnPropertyDescriptor,b=l&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(C){return C instanceof TypeError}}();u.exports=b?function(C,S){if(p(C)&&!m(C,"length").writable)throw new f("Cannot set read only .length");return C.length=S}:function(C,S){return C.length=S}},7680:function(u,w,o){var l=o(9504);u.exports=l([].slice)},4488:function(u,w,o){var l=o(7680),p=Math.floor,f=function(m,b){var C=m.length;if(C<8)for(var S,D,A=1;A<C;){for(D=A,S=m[A];D&&b(m[D-1],S)>0;)m[D]=m[--D];D!==A++&&(m[D]=S)}else for(var N=p(C/2),I=f(l(m,0,N),b),_=f(l(m,N),b),Q=I.length,$=_.length,V=0,K=0;V<Q||K<$;)m[V+K]=V<Q&&K<$?b(I[V],_[K])<=0?I[V++]:_[K++]:V<Q?I[V++]:_[K++];return m};u.exports=f},7433:function(u,w,o){var l=o(4376),p=o(3517),f=o(34),m=o(8227)("species"),b=Array;u.exports=function(C){var S;return l(C)&&(S=C.constructor,(p(S)&&(S===b||l(S.prototype))||f(S)&&(S=S[m])===null)&&(S=void 0)),S===void 0?b:S}},1469:function(u,w,o){var l=o(7433);u.exports=function(p,f){return new(l(p))(f===0?0:f)}},6319:function(u,w,o){var l=o(8551),p=o(9539);u.exports=function(f,m,b,C){try{return C?m(l(b)[0],b[1]):m(b)}catch(S){p(f,"throw",S)}}},4428:function(u,w,o){var l=o(8227)("iterator"),p=!1;try{var f=0,m={next:function(){return{done:!!f++}},return:function(){p=!0}};m[l]=function(){return this},Array.from(m,function(){throw 2})}catch{}u.exports=function(b,C){try{if(!C&&!p)return!1}catch{return!1}var S=!1;try{var D={};D[l]=function(){return{next:function(){return{done:S=!0}}}},b(D)}catch{}return S}},4576:function(u,w,o){var l=o(9504),p=l({}.toString),f=l("".slice);u.exports=function(m){return f(p(m),8,-1)}},6955:function(u,w,o){var l=o(2140),p=o(4901),f=o(4576),m=o(8227)("toStringTag"),b=Object,C=f(function(){return arguments}())==="Arguments";u.exports=l?f:function(S){var D,A,N;return S===void 0?"Undefined":S===null?"Null":typeof(A=function(I,_){try{return I[_]}catch{}}(D=b(S),m))=="string"?A:C?f(D):(N=f(D))==="Object"&&p(D.callee)?"Arguments":N}},7740:function(u,w,o){var l=o(9297),p=o(5031),f=o(7347),m=o(4913);u.exports=function(b,C,S){for(var D=p(C),A=m.f,N=f.f,I=0;I<D.length;I++){var _=D[I];l(b,_)||S&&l(S,_)||A(b,_,N(C,_))}}},1436:function(u,w,o){var l=o(8227)("match");u.exports=function(p){var f=/./;try{"/./"[p](f)}catch{try{return f[l]=!1,"/./"[p](f)}catch{}}return!1}},2211:function(u,w,o){var l=o(9039);u.exports=!l(function(){function p(){}return p.prototype.constructor=null,Object.getPrototypeOf(new p)!==p.prototype})},2529:function(u){u.exports=function(w,o){return{value:w,done:o}}},6699:function(u,w,o){var l=o(3724),p=o(4913),f=o(6980);u.exports=l?function(m,b,C){return p.f(m,b,f(1,C))}:function(m,b,C){return m[b]=C,m}},6980:function(u){u.exports=function(w,o){return{enumerable:!(1&w),configurable:!(2&w),writable:!(4&w),value:o}}},4659:function(u,w,o){var l=o(3724),p=o(4913),f=o(6980);u.exports=function(m,b,C){l?p.f(m,b,f(0,C)):m[b]=C}},3640:function(u,w,o){var l=o(8551),p=o(4270),f=TypeError;u.exports=function(m){if(l(this),m==="string"||m==="default")m="string";else if(m!=="number")throw new f("Incorrect hint");return p(this,m)}},2106:function(u,w,o){var l=o(283),p=o(4913);u.exports=function(f,m,b){return b.get&&l(b.get,m,{getter:!0}),b.set&&l(b.set,m,{setter:!0}),p.f(f,m,b)}},6840:function(u,w,o){var l=o(4901),p=o(4913),f=o(283),m=o(9433);u.exports=function(b,C,S,D){D||(D={});var A=D.enumerable,N=D.name!==void 0?D.name:C;if(l(S)&&f(S,N,D),D.global)A?b[C]=S:m(C,S);else{try{D.unsafe?b[C]&&(A=!0):delete b[C]}catch{}A?b[C]=S:p.f(b,C,{value:S,enumerable:!1,configurable:!D.nonConfigurable,writable:!D.nonWritable})}return b}},9433:function(u,w,o){var l=o(4475),p=Object.defineProperty;u.exports=function(f,m){try{p(l,f,{value:m,configurable:!0,writable:!0})}catch{l[f]=m}return m}},4606:function(u,w,o){var l=o(6823),p=TypeError;u.exports=function(f,m){if(!delete f[m])throw new p("Cannot delete property "+l(m)+" of "+l(f))}},3724:function(u,w,o){var l=o(9039);u.exports=!l(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})},4055:function(u,w,o){var l=o(4475),p=o(34),f=l.document,m=p(f)&&p(f.createElement);u.exports=function(b){return m?f.createElement(b):{}}},6837:function(u){var w=TypeError;u.exports=function(o){if(o>9007199254740991)throw w("Maximum allowed index exceeded");return o}},7400:function(u){u.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:function(u,w,o){var l=o(4055)("span").classList,p=l&&l.constructor&&l.constructor.prototype;u.exports=p===Object.prototype?void 0:p},8834:function(u,w,o){var l=o(9392).match(/firefox\/(\d+)/i);u.exports=!!l&&+l[1]},3202:function(u,w,o){var l=o(9392);u.exports=/MSIE|Trident/.test(l)},9088:function(u,w,o){var l=o(4475),p=o(4576);u.exports=p(l.process)==="process"},9392:function(u){u.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7388:function(u,w,o){var l,p,f=o(4475),m=o(9392),b=f.process,C=f.Deno,S=b&&b.versions||C&&C.version,D=S&&S.v8;D&&(p=(l=D.split("."))[0]>0&&l[0]<4?1:+(l[0]+l[1])),!p&&m&&(!(l=m.match(/Edge\/(\d+)/))||l[1]>=74)&&(l=m.match(/Chrome\/(\d+)/))&&(p=+l[1]),u.exports=p},9160:function(u,w,o){var l=o(9392).match(/AppleWebKit\/(\d+)\./);u.exports=!!l&&+l[1]},8727:function(u){u.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:function(u,w,o){var l=o(4475),p=o(7347).f,f=o(6699),m=o(6840),b=o(9433),C=o(7740),S=o(2796);u.exports=function(D,A){var N,I,_,Q,$,V=D.target,K=D.global,R=D.stat;if(N=K?l:R?l[V]||b(V,{}):l[V]&&l[V].prototype)for(I in A){if(Q=A[I],_=D.dontCallGetSet?($=p(N,I))&&$.value:N[I],!S(K?I:V+(R?".":"#")+I,D.forced)&&_!==void 0){if(typeof Q==typeof _)continue;C(Q,_)}(D.sham||_&&_.sham)&&f(Q,"sham",!0),m(N,I,Q,D)}}},9039:function(u){u.exports=function(w){try{return!!w()}catch{return!0}}},9228:function(u,w,o){o(7495);var l=o(9565),p=o(6840),f=o(7323),m=o(9039),b=o(8227),C=o(6699),S=b("species"),D=RegExp.prototype;u.exports=function(A,N,I,_){var Q=b(A),$=!m(function(){var U={};return U[Q]=function(){return 7},""[A](U)!==7}),V=$&&!m(function(){var U=!1,W=/a/;return A==="split"&&((W={}).constructor={},W.constructor[S]=function(){return W},W.flags="",W[Q]=/./[Q]),W.exec=function(){return U=!0,null},W[Q](""),!U});if(!$||!V||I){var K=/./[Q],R=N(Q,""[A],function(U,W,z,ne,re){var ae=W.exec;return ae===f||ae===D.exec?$&&!re?{done:!0,value:l(K,W,z,ne)}:{done:!0,value:l(U,z,W,ne)}:{done:!1}});p(String.prototype,A,R[0]),p(D,Q,R[1])}_&&C(D[Q],"sham",!0)}},8745:function(u,w,o){var l=o(616),p=Function.prototype,f=p.apply,m=p.call;u.exports=typeof Reflect=="object"&&Reflect.apply||(l?m.bind(f):function(){return m.apply(f,arguments)})},6080:function(u,w,o){var l=o(7476),p=o(9306),f=o(616),m=l(l.bind);u.exports=function(b,C){return p(b),C===void 0?b:f?m(b,C):function(){return b.apply(C,arguments)}}},616:function(u,w,o){var l=o(9039);u.exports=!l(function(){var p=(function(){}).bind();return typeof p!="function"||p.hasOwnProperty("prototype")})},9565:function(u,w,o){var l=o(616),p=Function.prototype.call;u.exports=l?p.bind(p):function(){return p.apply(p,arguments)}},350:function(u,w,o){var l=o(3724),p=o(9297),f=Function.prototype,m=l&&Object.getOwnPropertyDescriptor,b=p(f,"name"),C=b&&(function(){}).name==="something",S=b&&(!l||l&&m(f,"name").configurable);u.exports={EXISTS:b,PROPER:C,CONFIGURABLE:S}},6706:function(u,w,o){var l=o(9504),p=o(9306);u.exports=function(f,m,b){try{return l(p(Object.getOwnPropertyDescriptor(f,m)[b]))}catch{}}},7476:function(u,w,o){var l=o(4576),p=o(9504);u.exports=function(f){if(l(f)==="Function")return p(f)}},9504:function(u,w,o){var l=o(616),p=Function.prototype,f=p.call,m=l&&p.bind.bind(f,f);u.exports=l?m:function(b){return function(){return f.apply(b,arguments)}}},7751:function(u,w,o){var l=o(4475),p=o(4901);u.exports=function(f,m){return arguments.length<2?(b=l[f],p(b)?b:void 0):l[f]&&l[f][m];var b}},851:function(u,w,o){var l=o(6955),p=o(5966),f=o(4117),m=o(6269),b=o(8227)("iterator");u.exports=function(C){if(!f(C))return p(C,b)||p(C,"@@iterator")||m[l(C)]}},81:function(u,w,o){var l=o(9565),p=o(9306),f=o(8551),m=o(6823),b=o(851),C=TypeError;u.exports=function(S,D){var A=arguments.length<2?b(S):D;if(p(A))return f(l(A,S));throw new C(m(S)+" is not iterable")}},6933:function(u,w,o){var l=o(9504),p=o(4376),f=o(4901),m=o(4576),b=o(655),C=l([].push);u.exports=function(S){if(f(S))return S;if(p(S)){for(var D=S.length,A=[],N=0;N<D;N++){var I=S[N];typeof I=="string"?C(A,I):typeof I!="number"&&m(I)!=="Number"&&m(I)!=="String"||C(A,b(I))}var _=A.length,Q=!0;return function($,V){if(Q)return Q=!1,V;if(p(this))return V;for(var K=0;K<_;K++)if(A[K]===$)return V}}}},5966:function(u,w,o){var l=o(9306),p=o(4117);u.exports=function(f,m){var b=f[m];return p(b)?void 0:l(b)}},2478:function(u,w,o){var l=o(9504),p=o(8981),f=Math.floor,m=l("".charAt),b=l("".replace),C=l("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,D=/\$([$&'`]|\d{1,2})/g;u.exports=function(A,N,I,_,Q,$){var V=I+A.length,K=_.length,R=D;return Q!==void 0&&(Q=p(Q),R=S),b($,R,function(U,W){var z;switch(m(W,0)){case"$":return"$";case"&":return A;case"`":return C(N,0,I);case"'":return C(N,V);case"<":z=Q[C(W,1,-1)];break;default:var ne=+W;if(ne===0)return U;if(ne>K){var re=f(ne/10);return re===0?U:re<=K?_[re-1]===void 0?m(W,1):_[re-1]+m(W,1):U}z=_[ne-1]}return z===void 0?"":z})}},4475:function(u,w,o){var l=function(p){return p&&p.Math===Math&&p};u.exports=l(typeof globalThis=="object"&&globalThis)||l(typeof window=="object"&&window)||l(typeof self=="object"&&self)||l(typeof o.g=="object"&&o.g)||l(typeof this=="object"&&this)||function(){return this}()||Function("return this")()},9297:function(u,w,o){var l=o(9504),p=o(8981),f=l({}.hasOwnProperty);u.exports=Object.hasOwn||function(m,b){return f(p(m),b)}},421:function(u){u.exports={}},397:function(u,w,o){var l=o(7751);u.exports=l("document","documentElement")},5917:function(u,w,o){var l=o(3724),p=o(9039),f=o(4055);u.exports=!l&&!p(function(){return Object.defineProperty(f("div"),"a",{get:function(){return 7}}).a!==7})},7055:function(u,w,o){var l=o(9504),p=o(9039),f=o(4576),m=Object,b=l("".split);u.exports=p(function(){return!m("z").propertyIsEnumerable(0)})?function(C){return f(C)==="String"?b(C,""):m(C)}:m},3167:function(u,w,o){var l=o(4901),p=o(34),f=o(2967);u.exports=function(m,b,C){var S,D;return f&&l(S=b.constructor)&&S!==C&&p(D=S.prototype)&&D!==C.prototype&&f(m,D),m}},3706:function(u,w,o){var l=o(9504),p=o(4901),f=o(7629),m=l(Function.toString);p(f.inspectSource)||(f.inspectSource=function(b){return m(b)}),u.exports=f.inspectSource},1181:function(u,w,o){var l,p,f,m=o(8622),b=o(4475),C=o(34),S=o(6699),D=o(9297),A=o(7629),N=o(6119),I=o(421),_="Object already initialized",Q=b.TypeError,$=b.WeakMap;if(m||A.state){var V=A.state||(A.state=new $);V.get=V.get,V.has=V.has,V.set=V.set,l=function(R,U){if(V.has(R))throw new Q(_);return U.facade=R,V.set(R,U),U},p=function(R){return V.get(R)||{}},f=function(R){return V.has(R)}}else{var K=N("state");I[K]=!0,l=function(R,U){if(D(R,K))throw new Q(_);return U.facade=R,S(R,K,U),U},p=function(R){return D(R,K)?R[K]:{}},f=function(R){return D(R,K)}}u.exports={set:l,get:p,has:f,enforce:function(R){return f(R)?p(R):l(R,{})},getterFor:function(R){return function(U){var W;if(!C(U)||(W=p(U)).type!==R)throw new Q("Incompatible receiver, "+R+" required");return W}}}},4209:function(u,w,o){var l=o(8227),p=o(6269),f=l("iterator"),m=Array.prototype;u.exports=function(b){return b!==void 0&&(p.Array===b||m[f]===b)}},4376:function(u,w,o){var l=o(4576);u.exports=Array.isArray||function(p){return l(p)==="Array"}},4901:function(u){var w=typeof document=="object"&&document.all;u.exports=w===void 0&&w!==void 0?function(o){return typeof o=="function"||o===w}:function(o){return typeof o=="function"}},3517:function(u,w,o){var l=o(9504),p=o(9039),f=o(4901),m=o(6955),b=o(7751),C=o(3706),S=function(){},D=b("Reflect","construct"),A=/^\s*(?:class|function)\b/,N=l(A.exec),I=!A.test(S),_=function($){if(!f($))return!1;try{return D(S,[],$),!0}catch{return!1}},Q=function($){if(!f($))return!1;switch(m($)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return I||!!N(A,C($))}catch{return!0}};Q.sham=!0,u.exports=!D||p(function(){var $;return _(_.call)||!_(Object)||!_(function(){$=!0})||$})?Q:_},2796:function(u,w,o){var l=o(9039),p=o(4901),f=/#|\.prototype\./,m=function(A,N){var I=C[b(A)];return I===D||I!==S&&(p(N)?l(N):!!N)},b=m.normalize=function(A){return String(A).replace(f,".").toLowerCase()},C=m.data={},S=m.NATIVE="N",D=m.POLYFILL="P";u.exports=m},2087:function(u,w,o){var l=o(34),p=Math.floor;u.exports=Number.isInteger||function(f){return!l(f)&&isFinite(f)&&p(f)===f}},4117:function(u){u.exports=function(w){return w==null}},34:function(u,w,o){var l=o(4901);u.exports=function(p){return typeof p=="object"?p!==null:l(p)}},3925:function(u,w,o){var l=o(34);u.exports=function(p){return l(p)||p===null}},6395:function(u){u.exports=!1},788:function(u,w,o){var l=o(34),p=o(4576),f=o(8227)("match");u.exports=function(m){var b;return l(m)&&((b=m[f])!==void 0?!!b:p(m)==="RegExp")}},757:function(u,w,o){var l=o(7751),p=o(4901),f=o(1625),m=o(7040),b=Object;u.exports=m?function(C){return typeof C=="symbol"}:function(C){var S=l("Symbol");return p(S)&&f(S.prototype,b(C))}},9539:function(u,w,o){var l=o(9565),p=o(8551),f=o(5966);u.exports=function(m,b,C){var S,D;p(m);try{if(!(S=f(m,"return"))){if(b==="throw")throw C;return C}S=l(S,m)}catch(A){D=!0,S=A}if(b==="throw")throw C;if(D)throw S;return p(S),C}},3994:function(u,w,o){var l=o(7657).IteratorPrototype,p=o(2360),f=o(6980),m=o(687),b=o(6269),C=function(){return this};u.exports=function(S,D,A,N){var I=D+" Iterator";return S.prototype=p(l,{next:f(+!N,A)}),m(S,I,!1,!0),b[I]=C,S}},1088:function(u,w,o){var l=o(6518),p=o(9565),f=o(6395),m=o(350),b=o(4901),C=o(3994),S=o(2787),D=o(2967),A=o(687),N=o(6699),I=o(6840),_=o(8227),Q=o(6269),$=o(7657),V=m.PROPER,K=m.CONFIGURABLE,R=$.IteratorPrototype,U=$.BUGGY_SAFARI_ITERATORS,W=_("iterator"),z="keys",ne="values",re="entries",ae=function(){return this};u.exports=function(ge,le,xe,ce,q,G,Z){C(xe,le,ce);var x,M,j,B=function(fe){if(fe===q&&ve)return ve;if(!U&&fe&&fe in ee)return ee[fe];switch(fe){case z:case ne:case re:return function(){return new xe(this,fe)}}return function(){return new xe(this)}},X=le+" Iterator",te=!1,ee=ge.prototype,Y=ee[W]||ee["@@iterator"]||q&&ee[q],ve=!U&&Y||B(q),Ee=le==="Array"&&ee.entries||Y;if(Ee&&(x=S(Ee.call(new ge)))!==Object.prototype&&x.next&&(f||S(x)===R||(D?D(x,R):b(x[W])||I(x,W,ae)),A(x,X,!0,!0),f&&(Q[X]=ae)),V&&q===ne&&Y&&Y.name!==ne&&(!f&&K?N(ee,"name",ne):(te=!0,ve=function(){return p(Y,this)})),q)if(M={values:B(ne),keys:G?ve:B(z),entries:B(re)},Z)for(j in M)(U||te||!(j in ee))&&I(ee,j,M[j]);else l({target:le,proto:!0,forced:U||te},M);return f&&!Z||ee[W]===ve||I(ee,W,ve,{name:q}),Q[le]=ve,M}},7657:function(u,w,o){var l,p,f,m=o(9039),b=o(4901),C=o(34),S=o(2360),D=o(2787),A=o(6840),N=o(8227),I=o(6395),_=N("iterator"),Q=!1;[].keys&&("next"in(f=[].keys())?(p=D(D(f)))!==Object.prototype&&(l=p):Q=!0),!C(l)||m(function(){var $={};return l[_].call($)!==$})?l={}:I&&(l=S(l)),b(l[_])||A(l,_,function(){return this}),u.exports={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:Q}},6269:function(u){u.exports={}},6198:function(u,w,o){var l=o(8014);u.exports=function(p){return l(p.length)}},283:function(u,w,o){var l=o(9504),p=o(9039),f=o(4901),m=o(9297),b=o(3724),C=o(350).CONFIGURABLE,S=o(3706),D=o(1181),A=D.enforce,N=D.get,I=String,_=Object.defineProperty,Q=l("".slice),$=l("".replace),V=l([].join),K=b&&!p(function(){return _(function(){},"length",{value:8}).length!==8}),R=String(String).split("String"),U=u.exports=function(W,z,ne){Q(I(z),0,7)==="Symbol("&&(z="["+$(I(z),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),ne&&ne.getter&&(z="get "+z),ne&&ne.setter&&(z="set "+z),(!m(W,"name")||C&&W.name!==z)&&(b?_(W,"name",{value:z,configurable:!0}):W.name=z),K&&ne&&m(ne,"arity")&&W.length!==ne.arity&&_(W,"length",{value:ne.arity});try{ne&&m(ne,"constructor")&&ne.constructor?b&&_(W,"prototype",{writable:!1}):W.prototype&&(W.prototype=void 0)}catch{}var re=A(W);return m(re,"source")||(re.source=V(R,typeof z=="string"?z:"")),W};Function.prototype.toString=U(function(){return f(this)&&N(this).source||S(this)},"toString")},741:function(u){var w=Math.ceil,o=Math.floor;u.exports=Math.trunc||function(l){var p=+l;return(p>0?o:w)(p)}},5749:function(u,w,o){var l=o(788),p=TypeError;u.exports=function(f){if(l(f))throw new p("The method doesn't accept regular expressions");return f}},4213:function(u,w,o){var l=o(3724),p=o(9504),f=o(9565),m=o(9039),b=o(1072),C=o(3717),S=o(8773),D=o(8981),A=o(7055),N=Object.assign,I=Object.defineProperty,_=p([].concat);u.exports=!N||m(function(){if(l&&N({b:1},N(I({},"a",{enumerable:!0,get:function(){I(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var Q={},$={},V=Symbol("assign detection"),K="abcdefghijklmnopqrst";return Q[V]=7,K.split("").forEach(function(R){$[R]=R}),N({},Q)[V]!==7||b(N({},$)).join("")!==K})?function(Q,$){for(var V=D(Q),K=arguments.length,R=1,U=C.f,W=S.f;K>R;)for(var z,ne=A(arguments[R++]),re=U?_(b(ne),U(ne)):b(ne),ae=re.length,ge=0;ae>ge;)z=re[ge++],l&&!f(W,ne,z)||(V[z]=ne[z]);return V}:N},2360:function(u,w,o){var l,p=o(8551),f=o(6801),m=o(8727),b=o(421),C=o(397),S=o(4055),D=o(6119),A="prototype",N="script",I=D("IE_PROTO"),_=function(){},Q=function(K){return"<"+N+">"+K+"</"+N+">"},$=function(K){K.write(Q("")),K.close();var R=K.parentWindow.Object;return K=null,R},V=function(){try{l=new ActiveXObject("htmlfile")}catch{}var K,R,U;V=typeof document<"u"?document.domain&&l?$(l):(R=S("iframe"),U="java"+N+":",R.style.display="none",C.appendChild(R),R.src=String(U),(K=R.contentWindow.document).open(),K.write(Q("document.F=Object")),K.close(),K.F):$(l);for(var W=m.length;W--;)delete V[A][m[W]];return V()};b[I]=!0,u.exports=Object.create||function(K,R){var U;return K!==null?(_[A]=p(K),U=new _,_[A]=null,U[I]=K):U=V(),R===void 0?U:f.f(U,R)}},6801:function(u,w,o){var l=o(3724),p=o(8686),f=o(4913),m=o(8551),b=o(5397),C=o(1072);w.f=l&&!p?Object.defineProperties:function(S,D){m(S);for(var A,N=b(D),I=C(D),_=I.length,Q=0;_>Q;)f.f(S,A=I[Q++],N[A]);return S}},4913:function(u,w,o){var l=o(3724),p=o(5917),f=o(8686),m=o(8551),b=o(6969),C=TypeError,S=Object.defineProperty,D=Object.getOwnPropertyDescriptor,A="enumerable",N="configurable",I="writable";w.f=l?f?function(_,Q,$){if(m(_),Q=b(Q),m($),typeof _=="function"&&Q==="prototype"&&"value"in $&&I in $&&!$[I]){var V=D(_,Q);V&&V[I]&&(_[Q]=$.value,$={configurable:N in $?$[N]:V[N],enumerable:A in $?$[A]:V[A],writable:!1})}return S(_,Q,$)}:S:function(_,Q,$){if(m(_),Q=b(Q),m($),p)try{return S(_,Q,$)}catch{}if("get"in $||"set"in $)throw new C("Accessors not supported");return"value"in $&&(_[Q]=$.value),_}},7347:function(u,w,o){var l=o(3724),p=o(9565),f=o(8773),m=o(6980),b=o(5397),C=o(6969),S=o(9297),D=o(5917),A=Object.getOwnPropertyDescriptor;w.f=l?A:function(N,I){if(N=b(N),I=C(I),D)try{return A(N,I)}catch{}if(S(N,I))return m(!p(f.f,N,I),N[I])}},298:function(u,w,o){var l=o(4576),p=o(5397),f=o(8480).f,m=o(7680),b=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];u.exports.f=function(C){return b&&l(C)==="Window"?function(S){try{return f(S)}catch{return m(b)}}(C):f(p(C))}},8480:function(u,w,o){var l=o(1828),p=o(8727).concat("length","prototype");w.f=Object.getOwnPropertyNames||function(f){return l(f,p)}},3717:function(u,w){w.f=Object.getOwnPropertySymbols},2787:function(u,w,o){var l=o(9297),p=o(4901),f=o(8981),m=o(6119),b=o(2211),C=m("IE_PROTO"),S=Object,D=S.prototype;u.exports=b?S.getPrototypeOf:function(A){var N=f(A);if(l(N,C))return N[C];var I=N.constructor;return p(I)&&N instanceof I?I.prototype:N instanceof S?D:null}},1625:function(u,w,o){var l=o(9504);u.exports=l({}.isPrototypeOf)},1828:function(u,w,o){var l=o(9504),p=o(9297),f=o(5397),m=o(9617).indexOf,b=o(421),C=l([].push);u.exports=function(S,D){var A,N=f(S),I=0,_=[];for(A in N)!p(b,A)&&p(N,A)&&C(_,A);for(;D.length>I;)p(N,A=D[I++])&&(~m(_,A)||C(_,A));return _}},1072:function(u,w,o){var l=o(1828),p=o(8727);u.exports=Object.keys||function(f){return l(f,p)}},8773:function(u,w){var o={}.propertyIsEnumerable,l=Object.getOwnPropertyDescriptor,p=l&&!o.call({1:2},1);w.f=p?function(f){var m=l(this,f);return!!m&&m.enumerable}:o},2551:function(u,w,o){var l=o(6395),p=o(4475),f=o(9039),m=o(9160);u.exports=l||!f(function(){if(!(m&&m<535)){var b=Math.random();__defineSetter__.call(null,b,function(){}),delete p[b]}})},2967:function(u,w,o){var l=o(6706),p=o(34),f=o(7750),m=o(3506);u.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var b,C=!1,S={};try{(b=l(Object.prototype,"__proto__","set"))(S,[]),C=S instanceof Array}catch{}return function(D,A){return f(D),m(A),p(D)&&(C?b(D,A):D.__proto__=A),D}}():void 0)},3179:function(u,w,o){var l=o(2140),p=o(6955);u.exports=l?{}.toString:function(){return"[object "+p(this)+"]"}},4270:function(u,w,o){var l=o(9565),p=o(4901),f=o(34),m=TypeError;u.exports=function(b,C){var S,D;if(C==="string"&&p(S=b.toString)&&!f(D=l(S,b))||p(S=b.valueOf)&&!f(D=l(S,b))||C!=="string"&&p(S=b.toString)&&!f(D=l(S,b)))return D;throw new m("Can't convert object to primitive value")}},5031:function(u,w,o){var l=o(7751),p=o(9504),f=o(8480),m=o(3717),b=o(8551),C=p([].concat);u.exports=l("Reflect","ownKeys")||function(S){var D=f.f(b(S)),A=m.f;return A?C(D,A(S)):D}},9167:function(u,w,o){var l=o(4475);u.exports=l},1056:function(u,w,o){var l=o(4913).f;u.exports=function(p,f,m){m in p||l(p,m,{configurable:!0,get:function(){return f[m]},set:function(b){f[m]=b}})}},6682:function(u,w,o){var l=o(9565),p=o(8551),f=o(4901),m=o(4576),b=o(7323),C=TypeError;u.exports=function(S,D){var A=S.exec;if(f(A)){var N=l(A,S,D);return N!==null&&p(N),N}if(m(S)==="RegExp")return l(b,S,D);throw new C("RegExp#exec called on incompatible receiver")}},7323:function(u,w,o){var l,p,f=o(9565),m=o(9504),b=o(655),C=o(7979),S=o(8429),D=o(5745),A=o(2360),N=o(1181).get,I=o(3635),_=o(8814),Q=D("native-string-replace",String.prototype.replace),$=RegExp.prototype.exec,V=$,K=m("".charAt),R=m("".indexOf),U=m("".replace),W=m("".slice),z=(p=/b*/g,f($,l=/a/,"a"),f($,p,"a"),l.lastIndex!==0||p.lastIndex!==0),ne=S.BROKEN_CARET,re=/()??/.exec("")[1]!==void 0;(z||re||ne||I||_)&&(V=function(ae){var ge,le,xe,ce,q,G,Z,x=this,M=N(x),j=b(ae),B=M.raw;if(B)return B.lastIndex=x.lastIndex,ge=f(V,B,j),x.lastIndex=B.lastIndex,ge;var X=M.groups,te=ne&&x.sticky,ee=f(C,x),Y=x.source,ve=0,Ee=j;if(te&&(ee=U(ee,"y",""),R(ee,"g")===-1&&(ee+="g"),Ee=W(j,x.lastIndex),x.lastIndex>0&&(!x.multiline||x.multiline&&K(j,x.lastIndex-1)!==`
66
+ `)&&(Y="(?: "+Y+")",Ee=" "+Ee,ve++),le=new RegExp("^(?:"+Y+")",ee)),re&&(le=new RegExp("^"+Y+"$(?!\\s)",ee)),z&&(xe=x.lastIndex),ce=f($,te?le:x,Ee),te?ce?(ce.input=W(ce.input,ve),ce[0]=W(ce[0],ve),ce.index=x.lastIndex,x.lastIndex+=ce[0].length):x.lastIndex=0:z&&ce&&(x.lastIndex=x.global?ce.index+ce[0].length:xe),re&&ce&&ce.length>1&&f(Q,ce[0],le,function(){for(q=1;q<arguments.length-2;q++)arguments[q]===void 0&&(ce[q]=void 0)}),ce&&X)for(ce.groups=G=A(null),q=0;q<X.length;q++)G[(Z=X[q])[0]]=ce[Z[1]];return ce}),u.exports=V},7979:function(u,w,o){var l=o(8551);u.exports=function(){var p=l(this),f="";return p.hasIndices&&(f+="d"),p.global&&(f+="g"),p.ignoreCase&&(f+="i"),p.multiline&&(f+="m"),p.dotAll&&(f+="s"),p.unicode&&(f+="u"),p.unicodeSets&&(f+="v"),p.sticky&&(f+="y"),f}},1034:function(u,w,o){var l=o(9565),p=o(9297),f=o(1625),m=o(7979),b=RegExp.prototype;u.exports=function(C){var S=C.flags;return S!==void 0||"flags"in b||p(C,"flags")||!f(b,C)?S:l(m,C)}},8429:function(u,w,o){var l=o(9039),p=o(4475).RegExp,f=l(function(){var C=p("a","y");return C.lastIndex=2,C.exec("abcd")!==null}),m=f||l(function(){return!p("a","y").sticky}),b=f||l(function(){var C=p("^r","gy");return C.lastIndex=2,C.exec("str")!==null});u.exports={BROKEN_CARET:b,MISSED_STICKY:m,UNSUPPORTED_Y:f}},3635:function(u,w,o){var l=o(9039),p=o(4475).RegExp;u.exports=l(function(){var f=p(".","s");return!(f.dotAll&&f.test(`
67
+ `)&&f.flags==="s")})},8814:function(u,w,o){var l=o(9039),p=o(4475).RegExp;u.exports=l(function(){var f=p("(?<a>b)","g");return f.exec("b").groups.a!=="b"||"b".replace(f,"$<a>c")!=="bc"})},7750:function(u,w,o){var l=o(4117),p=TypeError;u.exports=function(f){if(l(f))throw new p("Can't call method on "+f);return f}},7633:function(u,w,o){var l=o(7751),p=o(2106),f=o(8227),m=o(3724),b=f("species");u.exports=function(C){var S=l(C);m&&S&&!S[b]&&p(S,b,{configurable:!0,get:function(){return this}})}},687:function(u,w,o){var l=o(4913).f,p=o(9297),f=o(8227)("toStringTag");u.exports=function(m,b,C){m&&!C&&(m=m.prototype),m&&!p(m,f)&&l(m,f,{configurable:!0,value:b})}},6119:function(u,w,o){var l=o(5745),p=o(3392),f=l("keys");u.exports=function(m){return f[m]||(f[m]=p(m))}},7629:function(u,w,o){var l=o(6395),p=o(4475),f=o(9433),m="__core-js_shared__",b=u.exports=p[m]||f(m,{});(b.versions||(b.versions=[])).push({version:"3.37.1",mode:l?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:function(u,w,o){var l=o(7629);u.exports=function(p,f){return l[p]||(l[p]=f||{})}},2293:function(u,w,o){var l=o(8551),p=o(5548),f=o(4117),m=o(8227)("species");u.exports=function(b,C){var S,D=l(b).constructor;return D===void 0||f(S=l(D)[m])?C:p(S)}},8183:function(u,w,o){var l=o(9504),p=o(1291),f=o(655),m=o(7750),b=l("".charAt),C=l("".charCodeAt),S=l("".slice),D=function(A){return function(N,I){var _,Q,$=f(m(N)),V=p(I),K=$.length;return V<0||V>=K?A?"":void 0:(_=C($,V))<55296||_>56319||V+1===K||(Q=C($,V+1))<56320||Q>57343?A?b($,V):_:A?S($,V,V+2):Q-56320+(_-55296<<10)+65536}};u.exports={codeAt:D(!1),charAt:D(!0)}},706:function(u,w,o){var l=o(350).PROPER,p=o(9039),f=o(7452);u.exports=function(m){return p(function(){return!!f[m]()||"​…᠎"[m]()!=="​…᠎"||l&&f[m].name!==m})}},3802:function(u,w,o){var l=o(9504),p=o(7750),f=o(655),m=o(7452),b=l("".replace),C=RegExp("^["+m+"]+"),S=RegExp("(^|[^"+m+"])["+m+"]+$"),D=function(A){return function(N){var I=f(p(N));return 1&A&&(I=b(I,C,"")),2&A&&(I=b(I,S,"$1")),I}};u.exports={start:D(1),end:D(2),trim:D(3)}},4495:function(u,w,o){var l=o(7388),p=o(9039),f=o(4475).String;u.exports=!!Object.getOwnPropertySymbols&&!p(function(){var m=Symbol("symbol detection");return!f(m)||!(Object(m)instanceof Symbol)||!Symbol.sham&&l&&l<41})},8242:function(u,w,o){var l=o(9565),p=o(7751),f=o(8227),m=o(6840);u.exports=function(){var b=p("Symbol"),C=b&&b.prototype,S=C&&C.valueOf,D=f("toPrimitive");C&&!C[D]&&m(C,D,function(A){return l(S,this)},{arity:1})}},1296:function(u,w,o){var l=o(4495);u.exports=l&&!!Symbol.for&&!!Symbol.keyFor},1240:function(u,w,o){var l=o(9504);u.exports=l(1 .valueOf)},5610:function(u,w,o){var l=o(1291),p=Math.max,f=Math.min;u.exports=function(m,b){var C=l(m);return C<0?p(C+b,0):f(C,b)}},5397:function(u,w,o){var l=o(7055),p=o(7750);u.exports=function(f){return l(p(f))}},1291:function(u,w,o){var l=o(741);u.exports=function(p){var f=+p;return f!=f||f===0?0:l(f)}},8014:function(u,w,o){var l=o(1291),p=Math.min;u.exports=function(f){var m=l(f);return m>0?p(m,9007199254740991):0}},8981:function(u,w,o){var l=o(7750),p=Object;u.exports=function(f){return p(l(f))}},2777:function(u,w,o){var l=o(9565),p=o(34),f=o(757),m=o(5966),b=o(4270),C=o(8227),S=TypeError,D=C("toPrimitive");u.exports=function(A,N){if(!p(A)||f(A))return A;var I,_=m(A,D);if(_){if(N===void 0&&(N="default"),I=l(_,A,N),!p(I)||f(I))return I;throw new S("Can't convert object to primitive value")}return N===void 0&&(N="number"),b(A,N)}},6969:function(u,w,o){var l=o(2777),p=o(757);u.exports=function(f){var m=l(f,"string");return p(m)?m:m+""}},2140:function(u,w,o){var l={};l[o(8227)("toStringTag")]="z",u.exports=String(l)==="[object z]"},655:function(u,w,o){var l=o(6955),p=String;u.exports=function(f){if(l(f)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return p(f)}},6823:function(u){var w=String;u.exports=function(o){try{return w(o)}catch{return"Object"}}},3392:function(u,w,o){var l=o(9504),p=0,f=Math.random(),m=l(1 .toString);u.exports=function(b){return"Symbol("+(b===void 0?"":b)+")_"+m(++p+f,36)}},7040:function(u,w,o){var l=o(4495);u.exports=l&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:function(u,w,o){var l=o(3724),p=o(9039);u.exports=l&&p(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})},8622:function(u,w,o){var l=o(4475),p=o(4901),f=l.WeakMap;u.exports=p(f)&&/native code/.test(String(f))},511:function(u,w,o){var l=o(9167),p=o(9297),f=o(1951),m=o(4913).f;u.exports=function(b){var C=l.Symbol||(l.Symbol={});p(C,b)||m(C,b,{value:f.f(b)})}},1951:function(u,w,o){var l=o(8227);w.f=l},8227:function(u,w,o){var l=o(4475),p=o(5745),f=o(9297),m=o(3392),b=o(4495),C=o(7040),S=l.Symbol,D=p("wks"),A=C?S.for||S:S&&S.withoutSetter||m;u.exports=function(N){return f(D,N)||(D[N]=b&&f(S,N)?S[N]:A("Symbol."+N)),D[N]}},7452:function(u){u.exports=`
68
+ \v\f\r                 \u2028\u2029\uFEFF`},8706:function(u,w,o){var l=o(6518),p=o(9039),f=o(4376),m=o(34),b=o(8981),C=o(6198),S=o(6837),D=o(4659),A=o(1469),N=o(597),I=o(8227),_=o(7388),Q=I("isConcatSpreadable"),$=_>=51||!p(function(){var K=[];return K[Q]=!1,K.concat()[0]!==K}),V=function(K){if(!m(K))return!1;var R=K[Q];return R!==void 0?!!R:f(K)};l({target:"Array",proto:!0,arity:1,forced:!$||!N("concat")},{concat:function(K){var R,U,W,z,ne,re=b(this),ae=A(re,0),ge=0;for(R=-1,W=arguments.length;R<W;R++)if(V(ne=R===-1?re:arguments[R]))for(z=C(ne),S(ge+z),U=0;U<z;U++,ge++)U in ne&&D(ae,ge,ne[U]);else S(ge+1),D(ae,ge++,ne);return ae.length=ge,ae}})},2008:function(u,w,o){var l=o(6518),p=o(9213).filter;l({target:"Array",proto:!0,forced:!o(597)("filter")},{filter:function(f){return p(this,f,arguments.length>1?arguments[1]:void 0)}})},3418:function(u,w,o){var l=o(6518),p=o(7916);l({target:"Array",stat:!0,forced:!o(4428)(function(f){Array.from(f)})},{from:p})},4423:function(u,w,o){var l=o(6518),p=o(9617).includes,f=o(9039),m=o(6469);l({target:"Array",proto:!0,forced:f(function(){return!Array(1).includes()})},{includes:function(b){return p(this,b,arguments.length>1?arguments[1]:void 0)}}),m("includes")},5276:function(u,w,o){var l=o(6518),p=o(7476),f=o(9617).indexOf,m=o(4598),b=p([].indexOf),C=!!b&&1/b([1],1,-0)<0;l({target:"Array",proto:!0,forced:C||!m("indexOf")},{indexOf:function(S){var D=arguments.length>1?arguments[1]:void 0;return C?b(this,S,D)||0:f(this,S,D)}})},3792:function(u,w,o){var l=o(5397),p=o(6469),f=o(6269),m=o(1181),b=o(4913).f,C=o(1088),S=o(2529),D=o(6395),A=o(3724),N="Array Iterator",I=m.set,_=m.getterFor(N);u.exports=C(Array,"Array",function($,V){I(this,{type:N,target:l($),index:0,kind:V})},function(){var $=_(this),V=$.target,K=$.index++;if(!V||K>=V.length)return $.target=void 0,S(void 0,!0);switch($.kind){case"keys":return S(K,!1);case"values":return S(V[K],!1)}return S([K,V[K]],!1)},"values");var Q=f.Arguments=f.Array;if(p("keys"),p("values"),p("entries"),!D&&A&&Q.name!=="values")try{b(Q,"name",{value:"values"})}catch{}},8598:function(u,w,o){var l=o(6518),p=o(9504),f=o(7055),m=o(5397),b=o(4598),C=p([].join);l({target:"Array",proto:!0,forced:f!==Object||!b("join",",")},{join:function(S){return C(m(this),S===void 0?",":S)}})},2062:function(u,w,o){var l=o(6518),p=o(9213).map;l({target:"Array",proto:!0,forced:!o(597)("map")},{map:function(f){return p(this,f,arguments.length>1?arguments[1]:void 0)}})},2712:function(u,w,o){var l=o(6518),p=o(926).left,f=o(4598),m=o(7388);l({target:"Array",proto:!0,forced:!o(9088)&&m>79&&m<83||!f("reduce")},{reduce:function(b){var C=arguments.length;return p(this,b,C,C>1?arguments[1]:void 0)}})},4782:function(u,w,o){var l=o(6518),p=o(4376),f=o(3517),m=o(34),b=o(5610),C=o(6198),S=o(5397),D=o(4659),A=o(8227),N=o(597),I=o(7680),_=N("slice"),Q=A("species"),$=Array,V=Math.max;l({target:"Array",proto:!0,forced:!_},{slice:function(K,R){var U,W,z,ne=S(this),re=C(ne),ae=b(K,re),ge=b(R===void 0?re:R,re);if(p(ne)&&(U=ne.constructor,(f(U)&&(U===$||p(U.prototype))||m(U)&&(U=U[Q])===null)&&(U=void 0),U===$||U===void 0))return I(ne,ae,ge);for(W=new(U===void 0?$:U)(V(ge-ae,0)),z=0;ae<ge;ae++,z++)ae in ne&&D(W,z,ne[ae]);return W.length=z,W}})},6910:function(u,w,o){var l=o(6518),p=o(9504),f=o(9306),m=o(8981),b=o(6198),C=o(4606),S=o(655),D=o(9039),A=o(4488),N=o(4598),I=o(8834),_=o(3202),Q=o(7388),$=o(9160),V=[],K=p(V.sort),R=p(V.push),U=D(function(){V.sort(void 0)}),W=D(function(){V.sort(null)}),z=N("sort"),ne=!D(function(){if(Q)return Q<70;if(!(I&&I>3)){if(_)return!0;if($)return $<603;var re,ae,ge,le,xe="";for(re=65;re<76;re++){switch(ae=String.fromCharCode(re),re){case 66:case 69:case 70:case 72:ge=3;break;case 68:case 71:ge=4;break;default:ge=2}for(le=0;le<47;le++)V.push({k:ae+le,v:ge})}for(V.sort(function(ce,q){return q.v-ce.v}),le=0;le<V.length;le++)ae=V[le].k.charAt(0),xe.charAt(xe.length-1)!==ae&&(xe+=ae);return xe!=="DGBEFHACIJK"}});l({target:"Array",proto:!0,forced:U||!W||!z||!ne},{sort:function(re){re!==void 0&&f(re);var ae=m(this);if(ne)return re===void 0?K(ae):K(ae,re);var ge,le,xe=[],ce=b(ae);for(le=0;le<ce;le++)le in ae&&R(xe,ae[le]);for(A(xe,function(q){return function(G,Z){return Z===void 0?-1:G===void 0?1:q!==void 0?+q(G,Z)||0:S(G)>S(Z)?1:-1}}(re)),ge=b(xe),le=0;le<ge;)ae[le]=xe[le++];for(;le<ce;)C(ae,le++);return ae}})},4554:function(u,w,o){var l=o(6518),p=o(8981),f=o(5610),m=o(1291),b=o(6198),C=o(4527),S=o(6837),D=o(1469),A=o(4659),N=o(4606),I=o(597)("splice"),_=Math.max,Q=Math.min;l({target:"Array",proto:!0,forced:!I},{splice:function($,V){var K,R,U,W,z,ne,re=p(this),ae=b(re),ge=f($,ae),le=arguments.length;for(le===0?K=R=0:le===1?(K=0,R=ae-ge):(K=le-2,R=Q(_(m(V),0),ae-ge)),S(ae+K-R),U=D(re,R),W=0;W<R;W++)(z=ge+W)in re&&A(U,W,re[z]);if(U.length=R,K<R){for(W=ge;W<ae-R;W++)ne=W+K,(z=W+R)in re?re[ne]=re[z]:N(re,ne);for(W=ae;W>ae-R+K;W--)N(re,W-1)}else if(K>R)for(W=ae-R;W>ge;W--)ne=W+K-1,(z=W+R-1)in re?re[ne]=re[z]:N(re,ne);for(W=0;W<K;W++)re[W+ge]=arguments[W+2];return C(re,ae-R+K),U}})},739:function(u,w,o){var l=o(6518),p=o(9039),f=o(8981),m=o(2777);l({target:"Date",proto:!0,arity:1,forced:p(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1})},{toJSON:function(b){var C=f(this),S=m(C,"number");return typeof S!="number"||isFinite(S)?C.toISOString():null}})},9572:function(u,w,o){var l=o(9297),p=o(6840),f=o(3640),m=o(8227)("toPrimitive"),b=Date.prototype;l(b,m)||p(b,m,f)},2010:function(u,w,o){var l=o(3724),p=o(350).EXISTS,f=o(9504),m=o(2106),b=Function.prototype,C=f(b.toString),S=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,D=f(S.exec);l&&!p&&m(b,"name",{configurable:!0,get:function(){try{return D(S,C(this))[1]}catch{return""}}})},3110:function(u,w,o){var l=o(6518),p=o(7751),f=o(8745),m=o(9565),b=o(9504),C=o(9039),S=o(4901),D=o(757),A=o(7680),N=o(6933),I=o(4495),_=String,Q=p("JSON","stringify"),$=b(/./.exec),V=b("".charAt),K=b("".charCodeAt),R=b("".replace),U=b(1 .toString),W=/[\uD800-\uDFFF]/g,z=/^[\uD800-\uDBFF]$/,ne=/^[\uDC00-\uDFFF]$/,re=!I||C(function(){var xe=p("Symbol")("stringify detection");return Q([xe])!=="[null]"||Q({a:xe})!=="{}"||Q(Object(xe))!=="{}"}),ae=C(function(){return Q("\uDF06\uD834")!=='"\\udf06\\ud834"'||Q("\uDEAD")!=='"\\udead"'}),ge=function(xe,ce){var q=A(arguments),G=N(ce);if(S(G)||xe!==void 0&&!D(xe))return q[1]=function(Z,x){if(S(G)&&(x=m(G,this,_(Z),x)),!D(x))return x},f(Q,null,q)},le=function(xe,ce,q){var G=V(q,ce-1),Z=V(q,ce+1);return $(z,xe)&&!$(ne,Z)||$(ne,xe)&&!$(z,G)?"\\u"+U(K(xe,0),16):xe};Q&&l({target:"JSON",stat:!0,arity:3,forced:re||ae},{stringify:function(xe,ce,q){var G=A(arguments),Z=f(re?ge:Q,null,G);return ae&&typeof Z=="string"?R(Z,W,le):Z}})},2892:function(u,w,o){var l=o(6518),p=o(6395),f=o(3724),m=o(4475),b=o(9167),C=o(9504),S=o(2796),D=o(9297),A=o(3167),N=o(1625),I=o(757),_=o(2777),Q=o(9039),$=o(8480).f,V=o(7347).f,K=o(4913).f,R=o(1240),U=o(3802).trim,W="Number",z=m[W],ne=b[W],re=z.prototype,ae=m.TypeError,ge=C("".slice),le=C("".charCodeAt),xe=function(Z){var x,M,j,B,X,te,ee,Y,ve=_(Z,"number");if(I(ve))throw new ae("Cannot convert a Symbol value to a number");if(typeof ve=="string"&&ve.length>2){if(ve=U(ve),(x=le(ve,0))===43||x===45){if((M=le(ve,2))===88||M===120)return NaN}else if(x===48){switch(le(ve,1)){case 66:case 98:j=2,B=49;break;case 79:case 111:j=8,B=55;break;default:return+ve}for(te=(X=ge(ve,2)).length,ee=0;ee<te;ee++)if((Y=le(X,ee))<48||Y>B)return NaN;return parseInt(X,j)}}return+ve},ce=S(W,!z(" 0o1")||!z("0b1")||z("+0x1")),q=function(Z){var x,M=arguments.length<1?0:z(function(j){var B=_(j,"number");return typeof B=="bigint"?B:xe(B)}(Z));return N(re,x=this)&&Q(function(){R(x)})?A(Object(M),this,q):M};q.prototype=re,ce&&!p&&(re.constructor=q),l({global:!0,constructor:!0,wrap:!0,forced:ce},{Number:q});var G=function(Z,x){for(var M,j=f?$(x):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),B=0;j.length>B;B++)D(x,M=j[B])&&!D(Z,M)&&K(Z,M,V(x,M))};p&&ne&&G(b[W],ne),(ce||p)&&G(b[W],z)},2637:function(u,w,o){o(6518)({target:"Number",stat:!0},{isInteger:o(2087)})},9085:function(u,w,o){var l=o(6518),p=o(4213);l({target:"Object",stat:!0,arity:2,forced:Object.assign!==p},{assign:p})},7427:function(u,w,o){var l=o(6518),p=o(3724),f=o(2551),m=o(9306),b=o(8981),C=o(4913);p&&l({target:"Object",proto:!0,forced:f},{__defineGetter__:function(S,D){C.f(b(this),S,{get:m(D),enumerable:!0,configurable:!0})}})},3851:function(u,w,o){var l=o(6518),p=o(9039),f=o(5397),m=o(7347).f,b=o(3724);l({target:"Object",stat:!0,forced:!b||p(function(){m(1)}),sham:!b},{getOwnPropertyDescriptor:function(C,S){return m(f(C),S)}})},1278:function(u,w,o){var l=o(6518),p=o(3724),f=o(5031),m=o(5397),b=o(7347),C=o(4659);l({target:"Object",stat:!0,sham:!p},{getOwnPropertyDescriptors:function(S){for(var D,A,N=m(S),I=b.f,_=f(N),Q={},$=0;_.length>$;)(A=I(N,D=_[$++]))!==void 0&&C(Q,D,A);return Q}})},1480:function(u,w,o){var l=o(6518),p=o(9039),f=o(298).f;l({target:"Object",stat:!0,forced:p(function(){return!Object.getOwnPropertyNames(1)})},{getOwnPropertyNames:f})},9773:function(u,w,o){var l=o(6518),p=o(4495),f=o(9039),m=o(3717),b=o(8981);l({target:"Object",stat:!0,forced:!p||f(function(){m.f(1)})},{getOwnPropertySymbols:function(C){var S=m.f;return S?S(b(C)):[]}})},9432:function(u,w,o){var l=o(6518),p=o(8981),f=o(1072);l({target:"Object",stat:!0,forced:o(9039)(function(){f(1)})},{keys:function(m){return f(p(m))}})},6099:function(u,w,o){var l=o(2140),p=o(6840),f=o(3179);l||p(Object.prototype,"toString",f,{unsafe:!0})},4864:function(u,w,o){var l=o(3724),p=o(4475),f=o(9504),m=o(2796),b=o(3167),C=o(6699),S=o(2360),D=o(8480).f,A=o(1625),N=o(788),I=o(655),_=o(1034),Q=o(8429),$=o(1056),V=o(6840),K=o(9039),R=o(9297),U=o(1181).enforce,W=o(7633),z=o(8227),ne=o(3635),re=o(8814),ae=z("match"),ge=p.RegExp,le=ge.prototype,xe=p.SyntaxError,ce=f(le.exec),q=f("".charAt),G=f("".replace),Z=f("".indexOf),x=f("".slice),M=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,j=/a/g,B=/a/g,X=new ge(j)!==j,te=Q.MISSED_STICKY,ee=Q.UNSUPPORTED_Y;if(m("RegExp",l&&(!X||te||ne||re||K(function(){return B[ae]=!1,ge(j)!==j||ge(B)===B||String(ge(j,"i"))!=="/a/i"})))){for(var Y=function(fe,pe){var Oe,me,Ne,Fe,ze,We,nt=A(le,this),ot=N(fe),$t=pe===void 0,rt=[],dt=fe;if(!nt&&ot&&$t&&fe.constructor===Y)return fe;if((ot||A(le,fe))&&(fe=fe.source,$t&&(pe=_(dt))),fe=fe===void 0?"":I(fe),pe=pe===void 0?"":I(pe),dt=fe,ne&&"dotAll"in j&&(me=!!pe&&Z(pe,"s")>-1)&&(pe=G(pe,/s/g,"")),Oe=pe,te&&"sticky"in j&&(Ne=!!pe&&Z(pe,"y")>-1)&&ee&&(pe=G(pe,/y/g,"")),re&&(Fe=function(at){for(var ke,jt=at.length,vt=0,_t="",bt=[],Vt=S(null),Ut=!1,zt=!1,Gt=0,Yt="";vt<=jt;vt++){if((ke=q(at,vt))==="\\")ke+=q(at,++vt);else if(ke==="]")Ut=!1;else if(!Ut)switch(!0){case ke==="[":Ut=!0;break;case ke==="(":ce(M,x(at,vt+1))&&(vt+=2,zt=!0),_t+=ke,Gt++;continue;case(ke===">"&&zt):if(Yt===""||R(Vt,Yt))throw new xe("Invalid capture group name");Vt[Yt]=!0,bt[bt.length]=[Yt,Gt],zt=!1,Yt="";continue}zt?Yt+=ke:_t+=ke}return[_t,bt]}(fe),fe=Fe[0],rt=Fe[1]),ze=b(ge(fe,pe),nt?this:le,Y),(me||Ne||rt.length)&&(We=U(ze),me&&(We.dotAll=!0,We.raw=Y(function(at){for(var ke,jt=at.length,vt=0,_t="",bt=!1;vt<=jt;vt++)(ke=q(at,vt))!=="\\"?bt||ke!=="."?(ke==="["?bt=!0:ke==="]"&&(bt=!1),_t+=ke):_t+="[\\s\\S]":_t+=ke+q(at,++vt);return _t}(fe),Oe)),Ne&&(We.sticky=!0),rt.length&&(We.groups=rt)),fe!==dt)try{C(ze,"source",dt===""?"(?:)":dt)}catch{}return ze},ve=D(ge),Ee=0;ve.length>Ee;)$(Y,ge,ve[Ee++]);le.constructor=Y,Y.prototype=le,V(p,"RegExp",Y,{constructor:!0})}W("RegExp")},7495:function(u,w,o){var l=o(6518),p=o(7323);l({target:"RegExp",proto:!0,forced:/./.exec!==p},{exec:p})},8781:function(u,w,o){var l=o(350).PROPER,p=o(6840),f=o(8551),m=o(655),b=o(9039),C=o(1034),S="toString",D=RegExp.prototype,A=D[S],N=b(function(){return A.call({source:"a",flags:"b"})!=="/a/b"}),I=l&&A.name!==S;(N||I)&&p(D,S,function(){var _=f(this);return"/"+m(_.source)+"/"+m(C(_))},{unsafe:!0})},1699:function(u,w,o){var l=o(6518),p=o(9504),f=o(5749),m=o(7750),b=o(655),C=o(1436),S=p("".indexOf);l({target:"String",proto:!0,forced:!C("includes")},{includes:function(D){return!!~S(b(m(this)),b(f(D)),arguments.length>1?arguments[1]:void 0)}})},7764:function(u,w,o){var l=o(8183).charAt,p=o(655),f=o(1181),m=o(1088),b=o(2529),C="String Iterator",S=f.set,D=f.getterFor(C);m(String,"String",function(A){S(this,{type:C,string:p(A),index:0})},function(){var A,N=D(this),I=N.string,_=N.index;return _>=I.length?b(void 0,!0):(A=l(I,_),N.index+=A.length,b(A,!1))})},8543:function(u,w,o){var l=o(6518),p=o(9565),f=o(7476),m=o(3994),b=o(2529),C=o(7750),S=o(8014),D=o(655),A=o(8551),N=o(4117),I=o(4576),_=o(788),Q=o(1034),$=o(5966),V=o(6840),K=o(9039),R=o(8227),U=o(2293),W=o(7829),z=o(6682),ne=o(1181),re=o(6395),ae=R("matchAll"),ge="RegExp String",le=ge+" Iterator",xe=ne.set,ce=ne.getterFor(le),q=RegExp.prototype,G=TypeError,Z=f("".indexOf),x=f("".matchAll),M=!!x&&!K(function(){x("a",/./)}),j=m(function(X,te,ee,Y){xe(this,{type:le,regexp:X,string:te,global:ee,unicode:Y,done:!1})},ge,function(){var X=ce(this);if(X.done)return b(void 0,!0);var te=X.regexp,ee=X.string,Y=z(te,ee);return Y===null?(X.done=!0,b(void 0,!0)):X.global?(D(Y[0])===""&&(te.lastIndex=W(ee,S(te.lastIndex),X.unicode)),b(Y,!1)):(X.done=!0,b(Y,!1))}),B=function(X){var te,ee,Y,ve=A(this),Ee=D(X),fe=U(ve,RegExp),pe=D(Q(ve));return te=new fe(fe===RegExp?ve.source:ve,pe),ee=!!~Z(pe,"g"),Y=!!~Z(pe,"u"),te.lastIndex=S(ve.lastIndex),new j(te,Ee,ee,Y)};l({target:"String",proto:!0,forced:M},{matchAll:function(X){var te,ee,Y,ve,Ee=C(this);if(N(X)){if(M)return x(Ee,X)}else{if(_(X)&&(te=D(C(Q(X))),!~Z(te,"g")))throw new G("`.matchAll` does not allow non-global regexes");if(M)return x(Ee,X);if((Y=$(X,ae))===void 0&&re&&I(X)==="RegExp"&&(Y=B),Y)return p(Y,X,Ee)}return ee=D(Ee),ve=new RegExp(X,"g"),re?p(B,ve,ee):ve[ae](ee)}}),re||ae in q||V(q,ae,B)},1761:function(u,w,o){var l=o(9565),p=o(9228),f=o(8551),m=o(4117),b=o(8014),C=o(655),S=o(7750),D=o(5966),A=o(7829),N=o(6682);p("match",function(I,_,Q){return[function($){var V=S(this),K=m($)?void 0:D($,I);return K?l(K,$,V):new RegExp($)[I](C(V))},function($){var V=f(this),K=C($),R=Q(_,V,K);if(R.done)return R.value;if(!V.global)return N(V,K);var U=V.unicode;V.lastIndex=0;for(var W,z=[],ne=0;(W=N(V,K))!==null;){var re=C(W[0]);z[ne]=re,re===""&&(V.lastIndex=A(K,b(V.lastIndex),U)),ne++}return ne===0?null:z}]})},5440:function(u,w,o){var l=o(8745),p=o(9565),f=o(9504),m=o(9228),b=o(9039),C=o(8551),S=o(4901),D=o(4117),A=o(1291),N=o(8014),I=o(655),_=o(7750),Q=o(7829),$=o(5966),V=o(2478),K=o(6682),R=o(8227)("replace"),U=Math.max,W=Math.min,z=f([].concat),ne=f([].push),re=f("".indexOf),ae=f("".slice),ge="a".replace(/./,"$0")==="$0",le=!!/./[R]&&/./[R]("a","$0")==="";m("replace",function(xe,ce,q){var G=le?"$":"$0";return[function(Z,x){var M=_(this),j=D(Z)?void 0:$(Z,R);return j?p(j,Z,M,x):p(ce,I(M),Z,x)},function(Z,x){var M=C(this),j=I(Z);if(typeof x=="string"&&re(x,G)===-1&&re(x,"$<")===-1){var B=q(ce,M,j,x);if(B.done)return B.value}var X=S(x);X||(x=I(x));var te,ee=M.global;ee&&(te=M.unicode,M.lastIndex=0);for(var Y,ve=[];(Y=K(M,j))!==null&&(ne(ve,Y),ee);)I(Y[0])===""&&(M.lastIndex=Q(j,N(M.lastIndex),te));for(var Ee,fe="",pe=0,Oe=0;Oe<ve.length;Oe++){for(var me,Ne=I((Y=ve[Oe])[0]),Fe=U(W(A(Y.index),j.length),0),ze=[],We=1;We<Y.length;We++)ne(ze,(Ee=Y[We])===void 0?Ee:String(Ee));var nt=Y.groups;if(X){var ot=z([Ne],ze,Fe,j);nt!==void 0&&ne(ot,nt),me=I(l(x,void 0,ot))}else me=V(Ne,j,Fe,ze,nt,x);Fe>=pe&&(fe+=ae(j,pe,Fe)+me,pe=Fe+Ne.length)}return fe+ae(j,pe)}]},!!b(function(){var xe=/./;return xe.exec=function(){var ce=[];return ce.groups={a:"7"},ce},"".replace(xe,"$<a>")!=="7"})||!ge||le)},744:function(u,w,o){var l=o(9565),p=o(9504),f=o(9228),m=o(8551),b=o(4117),C=o(7750),S=o(2293),D=o(7829),A=o(8014),N=o(655),I=o(5966),_=o(6682),Q=o(8429),$=o(9039),V=Q.UNSUPPORTED_Y,K=Math.min,R=p([].push),U=p("".slice),W=!$(function(){var ne=/(?:)/,re=ne.exec;ne.exec=function(){return re.apply(this,arguments)};var ae="ab".split(ne);return ae.length!==2||ae[0]!=="a"||ae[1]!=="b"}),z="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;f("split",function(ne,re,ae){var ge="0".split(void 0,0).length?function(le,xe){return le===void 0&&xe===0?[]:l(re,this,le,xe)}:re;return[function(le,xe){var ce=C(this),q=b(le)?void 0:I(le,ne);return q?l(q,le,ce,xe):l(ge,N(ce),le,xe)},function(le,xe){var ce=m(this),q=N(le);if(!z){var G=ae(ge,ce,q,xe,ge!==re);if(G.done)return G.value}var Z=S(ce,RegExp),x=ce.unicode,M=(ce.ignoreCase?"i":"")+(ce.multiline?"m":"")+(ce.unicode?"u":"")+(V?"g":"y"),j=new Z(V?"^(?:"+ce.source+")":ce,M),B=xe===void 0?4294967295:xe>>>0;if(B===0)return[];if(q.length===0)return _(j,q)===null?[q]:[];for(var X=0,te=0,ee=[];te<q.length;){j.lastIndex=V?0:te;var Y,ve=_(j,V?U(q,te):q);if(ve===null||(Y=K(A(j.lastIndex+(V?te:0)),q.length))===X)te=D(q,te,x);else{if(R(ee,U(q,X,te)),ee.length===B)return ee;for(var Ee=1;Ee<=ve.length-1;Ee++)if(R(ee,ve[Ee]),ee.length===B)return ee;te=X=Y}}return R(ee,U(q,X)),ee}]},z||!W,V)},2762:function(u,w,o){var l=o(6518),p=o(3802).trim;l({target:"String",proto:!0,forced:o(706)("trim")},{trim:function(){return p(this)}})},6761:function(u,w,o){var l=o(6518),p=o(4475),f=o(9565),m=o(9504),b=o(6395),C=o(3724),S=o(4495),D=o(9039),A=o(9297),N=o(1625),I=o(8551),_=o(5397),Q=o(6969),$=o(655),V=o(6980),K=o(2360),R=o(1072),U=o(8480),W=o(298),z=o(3717),ne=o(7347),re=o(4913),ae=o(6801),ge=o(8773),le=o(6840),xe=o(2106),ce=o(5745),q=o(6119),G=o(421),Z=o(3392),x=o(8227),M=o(1951),j=o(511),B=o(8242),X=o(687),te=o(1181),ee=o(9213).forEach,Y=q("hidden"),ve="Symbol",Ee="prototype",fe=te.set,pe=te.getterFor(ve),Oe=Object[Ee],me=p.Symbol,Ne=me&&me[Ee],Fe=p.RangeError,ze=p.TypeError,We=p.QObject,nt=ne.f,ot=re.f,$t=W.f,rt=ge.f,dt=m([].push),at=ce("symbols"),ke=ce("op-symbols"),jt=ce("wks"),vt=!We||!We[Ee]||!We[Ee].findChild,_t=function(F,J,ie){var he=nt(Oe,J);he&&delete Oe[J],ot(F,J,ie),he&&F!==Oe&&ot(Oe,J,he)},bt=C&&D(function(){return K(ot({},"a",{get:function(){return ot(this,"a",{value:7}).a}})).a!==7})?_t:ot,Vt=function(F,J){var ie=at[F]=K(Ne);return fe(ie,{type:ve,tag:F,description:J}),C||(ie.description=J),ie},Ut=function(F,J,ie){F===Oe&&Ut(ke,J,ie),I(F);var he=Q(J);return I(ie),A(at,he)?(ie.enumerable?(A(F,Y)&&F[Y][he]&&(F[Y][he]=!1),ie=K(ie,{enumerable:V(0,!1)})):(A(F,Y)||ot(F,Y,V(1,K(null))),F[Y][he]=!0),bt(F,he,ie)):ot(F,he,ie)},zt=function(F,J){I(F);var ie=_(J),he=R(ie).concat(rn(ie));return ee(he,function(Ae){C&&!f(Gt,ie,Ae)||Ut(F,Ae,ie[Ae])}),F},Gt=function(F){var J=Q(F),ie=f(rt,this,J);return!(this===Oe&&A(at,J)&&!A(ke,J))&&(!(ie||!A(this,J)||!A(at,J)||A(this,Y)&&this[Y][J])||ie)},Yt=function(F,J){var ie=_(F),he=Q(J);if(ie!==Oe||!A(at,he)||A(ke,he)){var Ae=nt(ie,he);return!Ae||!A(at,he)||A(ie,Y)&&ie[Y][he]||(Ae.enumerable=!0),Ae}},ht=function(F){var J=$t(_(F)),ie=[];return ee(J,function(he){A(at,he)||A(G,he)||dt(ie,he)}),ie},rn=function(F){var J=F===Oe,ie=$t(J?ke:_(F)),he=[];return ee(ie,function(Ae){!A(at,Ae)||J&&!A(Oe,Ae)||dt(he,at[Ae])}),he};S||(me=function(){if(N(Ne,this))throw new ze("Symbol is not a constructor");var F=arguments.length&&arguments[0]!==void 0?$(arguments[0]):void 0,J=Z(F),ie=function(he){var Ae=this===void 0?p:this;Ae===Oe&&f(ie,ke,he),A(Ae,Y)&&A(Ae[Y],J)&&(Ae[Y][J]=!1);var Ve=V(1,he);try{bt(Ae,J,Ve)}catch(Pe){if(!(Pe instanceof Fe))throw Pe;_t(Ae,J,Ve)}};return C&&vt&&bt(Oe,J,{configurable:!0,set:ie}),Vt(J,F)},le(Ne=me[Ee],"toString",function(){return pe(this).tag}),le(me,"withoutSetter",function(F){return Vt(Z(F),F)}),ge.f=Gt,re.f=Ut,ae.f=zt,ne.f=Yt,U.f=W.f=ht,z.f=rn,M.f=function(F){return Vt(x(F),F)},C&&(xe(Ne,"description",{configurable:!0,get:function(){return pe(this).description}}),b||le(Oe,"propertyIsEnumerable",Gt,{unsafe:!0}))),l({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:me}),ee(R(jt),function(F){j(F)}),l({target:ve,stat:!0,forced:!S},{useSetter:function(){vt=!0},useSimple:function(){vt=!1}}),l({target:"Object",stat:!0,forced:!S,sham:!C},{create:function(F,J){return J===void 0?K(F):zt(K(F),J)},defineProperty:Ut,defineProperties:zt,getOwnPropertyDescriptor:Yt}),l({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:ht}),B(),X(me,ve),G[Y]=!0},9463:function(u,w,o){var l=o(6518),p=o(3724),f=o(4475),m=o(9504),b=o(9297),C=o(4901),S=o(1625),D=o(655),A=o(2106),N=o(7740),I=f.Symbol,_=I&&I.prototype;if(p&&C(I)&&(!("description"in _)||I().description!==void 0)){var Q={},$=function(){var ne=arguments.length<1||arguments[0]===void 0?void 0:D(arguments[0]),re=S(_,this)?new I(ne):ne===void 0?I():I(ne);return ne===""&&(Q[re]=!0),re};N($,I),$.prototype=_,_.constructor=$;var V=String(I("description detection"))==="Symbol(description detection)",K=m(_.valueOf),R=m(_.toString),U=/^Symbol\((.*)\)[^)]+$/,W=m("".replace),z=m("".slice);A(_,"description",{configurable:!0,get:function(){var ne=K(this);if(b(Q,ne))return"";var re=R(ne),ae=V?z(re,7,-1):W(re,U,"$1");return ae===""?void 0:ae}}),l({global:!0,constructor:!0,forced:!0},{Symbol:$})}},1510:function(u,w,o){var l=o(6518),p=o(7751),f=o(9297),m=o(655),b=o(5745),C=o(1296),S=b("string-to-symbol-registry"),D=b("symbol-to-string-registry");l({target:"Symbol",stat:!0,forced:!C},{for:function(A){var N=m(A);if(f(S,N))return S[N];var I=p("Symbol")(N);return S[N]=I,D[I]=N,I}})},2259:function(u,w,o){o(511)("iterator")},2675:function(u,w,o){o(6761),o(1510),o(7812),o(3110),o(9773)},7812:function(u,w,o){var l=o(6518),p=o(9297),f=o(757),m=o(6823),b=o(5745),C=o(1296),S=b("symbol-to-string-registry");l({target:"Symbol",stat:!0,forced:!C},{keyFor:function(D){if(!f(D))throw new TypeError(m(D)+" is not a symbol");if(p(S,D))return S[D]}})},5700:function(u,w,o){var l=o(511),p=o(8242);l("toPrimitive"),p()},8344:function(u,w,o){o(8543)},3500:function(u,w,o){var l=o(4475),p=o(7400),f=o(9296),m=o(235),b=o(6699),C=function(D){if(D&&D.forEach!==m)try{b(D,"forEach",m)}catch{D.forEach=m}};for(var S in p)p[S]&&C(l[S]&&l[S].prototype);C(f)},2953:function(u,w,o){var l=o(4475),p=o(7400),f=o(9296),m=o(3792),b=o(6699),C=o(687),S=o(8227)("iterator"),D=m.values,A=function(I,_){if(I){if(I[S]!==D)try{b(I,S,D)}catch{I[S]=D}if(C(I,_,!0),p[_]){for(var Q in m)if(I[Q]!==m[Q])try{b(I,Q,m[Q])}catch{I[Q]=m[Q]}}}};for(var N in p)A(l[N]&&l[N].prototype,N);A(f,"DOMTokenList")}},g={};function d(u){var w=g[u];if(w!==void 0)return w.exports;var o=g[u]={exports:{}};return h[u].call(o.exports,o,o.exports,d),o.exports}d.d=function(u,w){for(var o in w)d.o(w,o)&&!d.o(u,o)&&Object.defineProperty(u,o,{enumerable:!0,get:w[o]})},d.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),d.o=function(u,w){return Object.prototype.hasOwnProperty.call(u,w)},d.r=function(u){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})};var E={};return function(){function u(q){return function(G){if(Array.isArray(G))return o(G)}(q)||function(G){if(typeof Symbol<"u"&&G[Symbol.iterator]!=null||G["@@iterator"]!=null)return Array.from(G)}(q)||w(q)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
69
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function w(q,G){if(q){if(typeof q=="string")return o(q,G);var Z=Object.prototype.toString.call(q).slice(8,-1);return Z==="Object"&&q.constructor&&(Z=q.constructor.name),Z==="Map"||Z==="Set"?Array.from(q):Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z)?o(q,G):void 0}}function o(q,G){(G==null||G>q.length)&&(G=q.length);for(var Z=0,x=new Array(G);Z<G;Z++)x[Z]=q[Z];return x}function l(q){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},l(q)}function p(q,G){for(var Z=0;Z<G.length;Z++){var x=G[Z];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(q,m(x.key),x)}}function f(q,G,Z){return(G=m(G))in q?Object.defineProperty(q,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}):q[G]=Z,q}function m(q){var G=function(Z,x){if(l(Z)!="object"||!Z)return Z;var M=Z[Symbol.toPrimitive];if(M!==void 0){var j=M.call(Z,x||"default");if(l(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return(x==="string"?String:Number)(Z)}(q,"string");return l(G)=="symbol"?G:G+""}d.r(E),d.d(E,{SimpleKeyboard:function(){return xe},default:function(){return ce}}),d(5276),d(8598),d(4782),d(4554),d(2010),d(7427),d(6099),d(7495),d(8781),d(5440),d(744),d(2762),typeof Element>"u"||"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),typeof self<"u"&&"document"in self&&((!("classList"in document.createElement("_"))||document.createElementNS&&!("classList"in document.createElementNS("http://www.w3.org/2000/svg","g")))&&function(q){if("Element"in q){var G="classList",Z="prototype",x=q.Element[Z],M=Object,j=String[Z].trim||function(){return this.replace(/^\s+|\s+$/g,"")},B=Array[Z].indexOf||function(fe){for(var pe=0,Oe=this.length;pe<Oe;pe++)if(pe in this&&this[pe]===fe)return pe;return-1},X=function(fe,pe){this.name=fe,this.code=DOMException[fe],this.message=pe},te=function(fe,pe){if(pe==="")throw new X("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(pe))throw new X("INVALID_CHARACTER_ERR","The token must not contain space characters.");return B.call(fe,pe)},ee=function(fe){for(var pe=j.call(fe.getAttribute("class")||""),Oe=pe?pe.split(/\s+/):[],me=0,Ne=Oe.length;me<Ne;me++)this.push(Oe[me]);this._updateClassName=function(){fe.setAttribute("class",this.toString())}},Y=ee[Z]=[],ve=function(){return new ee(this)};if(X[Z]=Error[Z],Y.item=function(fe){return this[fe]||null},Y.contains=function(fe){return~te(this,fe+"")},Y.add=function(){var fe,pe=arguments,Oe=0,me=pe.length,Ne=!1;do~te(this,fe=pe[Oe]+"")||(this.push(fe),Ne=!0);while(++Oe<me);Ne&&this._updateClassName()},Y.remove=function(){var fe,pe,Oe=arguments,me=0,Ne=Oe.length,Fe=!1;do for(pe=te(this,fe=Oe[me]+"");~pe;)this.splice(pe,1),Fe=!0,pe=te(this,fe);while(++me<Ne);Fe&&this._updateClassName()},Y.toggle=function(fe,pe){var Oe=this.contains(fe),me=Oe?pe!==!0&&"remove":pe!==!1&&"add";return me&&this[me](fe),pe===!0||pe===!1?pe:!Oe},Y.replace=function(fe,pe){var Oe=te(fe+"");~Oe&&(this.splice(Oe,1,pe),this._updateClassName())},Y.toString=function(){return this.join(" ")},M.defineProperty){var Ee={get:ve,enumerable:!0,configurable:!0};try{M.defineProperty(x,G,Ee)}catch(fe){fe.number!==void 0&&fe.number!==-2146823252||(Ee.enumerable=!1,M.defineProperty(x,G,Ee))}}else M[Z].__defineGetter__&&x.__defineGetter__(G,ve)}}(self),function(){var q=document.createElement("_");if(q.classList.add("c1","c2"),!q.classList.contains("c2")){var G=function(x){var M=DOMTokenList.prototype[x];DOMTokenList.prototype[x]=function(j){var B,X=arguments.length;for(B=0;B<X;B++)j=arguments[B],M.call(this,j)}};G("add"),G("remove")}if(q.classList.toggle("c3",!1),q.classList.contains("c3")){var Z=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(x,M){return 1 in arguments&&!this.contains(x)==!M?M:Z.call(this,x)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(x,M){var j=this.toString().split(" "),B=j.indexOf(x+"");~B&&(j=j.slice(B),this.remove.apply(this,j),this.add(M),this.add.apply(this,j.slice(1)))}),q=null}()),d(2675),d(9463),d(2259),d(5700),d(8706),d(2008),d(3418),d(4423),d(3792),d(2062),d(6910),d(739),d(9572),d(2892),d(9085),d(3851),d(1278),d(9432),d(4864),d(1699),d(7764),d(8344),d(3500),d(2953),d(2712),d(2637),d(1480),d(1761);var b=function(){return q=function x(M){var j=M.getOptions,B=M.getCaretPosition,X=M.getCaretPositionEnd,te=M.dispatch;(function(ee,Y){if(!(ee instanceof Y))throw new TypeError("Cannot call a class as a function")})(this,x),f(this,"getOptions",void 0),f(this,"getCaretPosition",void 0),f(this,"getCaretPositionEnd",void 0),f(this,"dispatch",void 0),f(this,"maxLengthReached",void 0),f(this,"isStandardButton",function(ee){return ee&&!(ee[0]==="{"&&ee[ee.length-1]==="}")}),this.getOptions=j,this.getCaretPosition=B,this.getCaretPositionEnd=X,this.dispatch=te,x.bindMethods(x,this)},G=[{key:"getButtonType",value:function(x){return x.includes("{")&&x.includes("}")&&x!=="{//}"?"functionBtn":"standardBtn"}},{key:"getButtonClass",value:function(x){var M=this.getButtonType(x),j=x.replace("{","").replace("}",""),B="";return M!=="standardBtn"&&(B=" hg-button-".concat(j)),"hg-".concat(M).concat(B)}},{key:"getDefaultDiplay",value:function(){return{"{bksp}":"backspace","{backspace}":"backspace","{enter}":"< enter","{shift}":"shift","{shiftleft}":"shift","{shiftright}":"shift","{alt}":"alt","{s}":"shift","{tab}":"tab","{lock}":"caps","{capslock}":"caps","{accept}":"Submit","{space}":" ","{//}":" ","{esc}":"esc","{escape}":"esc","{f1}":"f1","{f2}":"f2","{f3}":"f3","{f4}":"f4","{f5}":"f5","{f6}":"f6","{f7}":"f7","{f8}":"f8","{f9}":"f9","{f10}":"f10","{f11}":"f11","{f12}":"f12","{numpaddivide}":"/","{numlock}":"lock","{arrowup}":"↑","{arrowleft}":"←","{arrowdown}":"↓","{arrowright}":"→","{prtscr}":"print","{scrolllock}":"scroll","{pause}":"pause","{insert}":"ins","{home}":"home","{pageup}":"up","{delete}":"del","{forwarddelete}":"del","{end}":"end","{pagedown}":"down","{numpadmultiply}":"*","{numpadsubtract}":"-","{numpadadd}":"+","{numpadenter}":"enter","{period}":".","{numpaddecimal}":".","{numpad0}":"0","{numpad1}":"1","{numpad2}":"2","{numpad3}":"3","{numpad4}":"4","{numpad5}":"5","{numpad6}":"6","{numpad7}":"7","{numpad8}":"8","{numpad9}":"9"}}},{key:"getButtonDisplayName",value:function(x,M){return(M=arguments.length>2&&arguments[2]!==void 0&&arguments[2]?Object.assign({},this.getDefaultDiplay(),M):M||this.getDefaultDiplay())[x]||x}},{key:"getUpdatedInput",value:function(x,M,j){var B=arguments.length>3&&arguments[3]!==void 0?arguments[3]:j,X=arguments.length>4&&arguments[4]!==void 0&&arguments[4],te=this.getOptions(),ee=[j,B,X],Y=M;return(x==="{bksp}"||x==="{backspace}")&&Y.length>0?Y=this.removeAt.apply(this,[Y].concat(ee)):(x==="{delete}"||x==="{forwarddelete}")&&Y.length>0?Y=this.removeForwardsAt.apply(this,[Y].concat(ee)):x==="{space}"?Y=this.addStringAt.apply(this,[Y," "].concat(ee)):x!=="{tab}"||typeof te.tabCharOnTab=="boolean"&&te.tabCharOnTab===!1?x!=="{enter}"&&x!=="{numpadenter}"||!te.newLineOnEnter?x.includes("numpad")&&Number.isInteger(Number(x[x.length-2]))?Y=this.addStringAt.apply(this,[Y,x[x.length-2]].concat(ee)):x==="{numpaddivide}"?Y=this.addStringAt.apply(this,[Y,"/"].concat(ee)):x==="{numpadmultiply}"?Y=this.addStringAt.apply(this,[Y,"*"].concat(ee)):x==="{numpadsubtract}"?Y=this.addStringAt.apply(this,[Y,"-"].concat(ee)):x==="{numpadadd}"?Y=this.addStringAt.apply(this,[Y,"+"].concat(ee)):x==="{numpaddecimal}"?Y=this.addStringAt.apply(this,[Y,"."].concat(ee)):x==="{"||x==="}"?Y=this.addStringAt.apply(this,[Y,x].concat(ee)):x.includes("{")||x.includes("}")||(Y=this.addStringAt.apply(this,[Y,x].concat(ee))):Y=this.addStringAt.apply(this,[Y,`
70
+ `].concat(ee)):Y=this.addStringAt.apply(this,[Y," "].concat(ee)),te.debug&&console.log("Input will be: "+Y),Y}},{key:"updateCaretPos",value:function(x){var M=arguments.length>1&&arguments[1]!==void 0&&arguments[1],j=this.updateCaretPosAction(x,M);this.dispatch(function(B){B.setCaretPosition(j)})}},{key:"updateCaretPosAction",value:function(x){var M=arguments.length>1&&arguments[1]!==void 0&&arguments[1],j=this.getOptions(),B=this.getCaretPosition();return B!=null&&(M?B>0&&(B-=x):B+=x),j.debug&&console.log("Caret at:",B),B}},{key:"addStringAt",value:function(x,M){var j,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x.length,X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:x.length,te=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return B||B===0?(j=[x.slice(0,B),M,x.slice(X)].join(""),this.isMaxLengthReached()||te&&this.updateCaretPos(M.length)):j=x+M,j}},{key:"removeAt",value:function(x){var M,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x.length,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x.length,X=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(j===0&&B===0)return x;if(j===B){var te=/([\uD800-\uDBFF][\uDC00-\uDFFF])/g;j&&j>=0?x.substring(j-2,j).match(te)?(M=x.substr(0,j-2)+x.substr(j),X&&this.updateCaretPos(2,!0)):(M=x.substr(0,j-1)+x.substr(j),X&&this.updateCaretPos(1,!0)):x.slice(-2).match(te)?(M=x.slice(0,-2),X&&this.updateCaretPos(2,!0)):(M=x.slice(0,-1),X&&this.updateCaretPos(1,!0))}else M=x.slice(0,j)+x.slice(B),X&&this.dispatch(function(ee){ee.setCaretPosition(j)});return M}},{key:"removeForwardsAt",value:function(x){var M,j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x.length,B=arguments.length>2&&arguments[2]!==void 0?arguments[2]:x.length,X=arguments.length>3&&arguments[3]!==void 0&&arguments[3];return x!=null&&x.length&&j!==null?(j===B?M=x.substring(j,j+2).match(/([\uD800-\uDBFF][\uDC00-\uDFFF])/g)?x.substr(0,j)+x.substr(j+2):x.substr(0,j)+x.substr(j+1):(M=x.slice(0,j)+x.slice(B),X&&this.dispatch(function(te){te.setCaretPosition(j)})),M):x}},{key:"handleMaxLength",value:function(x,M){var j=this.getOptions(),B=j.maxLength,X=x[j.inputName||"default"],te=M.length-1>=B;if(M.length<=X.length)return!1;if(Number.isInteger(B))return j.debug&&console.log("maxLength (num) reached:",te),te?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1);if(l(B)==="object"){var ee=M.length-1>=B[j.inputName||"default"];return j.debug&&console.log("maxLength (obj) reached:",ee),ee?(this.maxLengthReached=!0,!0):(this.maxLengthReached=!1,!1)}}},{key:"isMaxLengthReached",value:function(){return!!this.maxLengthReached}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints}},{key:"pointerEventsSupported",value:function(){return!!window.PointerEvent}},{key:"camelCase",value:function(x){return x?x.toLowerCase().trim().split(/[.\-_\s]/g).reduce(function(M,j){return j.length?M+j[0].toUpperCase()+j.slice(1):M}):""}},{key:"chunkArray",value:function(x,M){return u(Array(Math.ceil(x.length/M))).map(function(j,B){return x.slice(M*B,M+M*B)})}},{key:"escapeRegex",value:function(x){return x.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}},{key:"getRtlOffset",value:function(x,M){var j=x,B=M.indexOf("‫");return B<x&&B!=-1&&j--,M.indexOf("‬")<x&&B!=-1&&j--,j<0?0:j}}],Z=[{key:"bindMethods",value:function(x,M){var j,B=function(te,ee){var Y=typeof Symbol<"u"&&te[Symbol.iterator]||te["@@iterator"];if(!Y){if(Array.isArray(te)||(Y=w(te))||ee){Y&&(te=Y);var ve=0,Ee=function(){};return{s:Ee,n:function(){return ve>=te.length?{done:!0}:{done:!1,value:te[ve++]}},e:function(me){throw me},f:Ee}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
71
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var fe,pe=!0,Oe=!1;return{s:function(){Y=Y.call(te)},n:function(){var me=Y.next();return pe=me.done,me},e:function(me){Oe=!0,fe=me},f:function(){try{pe||Y.return==null||Y.return()}finally{if(Oe)throw fe}}}}(Object.getOwnPropertyNames(x.prototype));try{for(B.s();!(j=B.n()).done;){var X=j.value;X==="constructor"||X==="bindMethods"||(M[X]=M[X].bind(M))}}catch(te){B.e(te)}finally{B.f()}}}],G&&p(q.prototype,G),Z&&p(q,Z),Object.defineProperty(q,"prototype",{writable:!1}),q;var q,G,Z}();f(b,"noop",function(){});var C=b;function S(q){return S=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},S(q)}function D(q,G){for(var Z=0;Z<G.length;Z++){var x=G[Z];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(q,N(x.key),x)}}function A(q,G,Z){return(G=N(G))in q?Object.defineProperty(q,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}):q[G]=Z,q}function N(q){var G=function(Z,x){if(S(Z)!="object"||!Z)return Z;var M=Z[Symbol.toPrimitive];if(M!==void 0){var j=M.call(Z,x);if(S(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Z)}(q,"string");return S(G)=="symbol"?G:G+""}var I=function(){return q=function x(M){var j=this,B=M.dispatch,X=M.getOptions;(function(te,ee){if(!(te instanceof ee))throw new TypeError("Cannot call a class as a function")})(this,x),A(this,"getOptions",void 0),A(this,"dispatch",void 0),A(this,"isModifierKey",function(te){return te.altKey||te.ctrlKey||te.shiftKey||["Tab","CapsLock","Esc","ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(te.code||te.key||j.keyCodeToKey(te==null?void 0:te.keyCode))}),this.dispatch=B,this.getOptions=X,C.bindMethods(x,this)},(G=[{key:"handleHighlightKeyDown",value:function(x){var M=this.getOptions();M.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(x)&&(x.preventDefault(),x.stopImmediatePropagation());var j=this.getSimpleKeyboardLayoutKey(x);this.dispatch(function(B){var X,te,ee=B.getButtonElement(j),Y=B.getButtonElement("{".concat(j,"}"));if(ee)X=ee,te=j;else{if(!Y)return;X=Y,te="{".concat(j,"}")}var ve,Ee,fe,pe,Oe=function(Ne){Ne.style.background=M.physicalKeyboardHighlightBgColor||"#dadce4",Ne.style.color=M.physicalKeyboardHighlightTextColor||"black"};if(X)if(Array.isArray(X)){if(X.forEach(function(Ne){return Oe(Ne)}),M.physicalKeyboardHighlightPress)if(M.physicalKeyboardHighlightPressUsePointerEvents)(ve=X[0])===null||ve===void 0||(Ee=ve.onpointerdown)===null||Ee===void 0||Ee.call(ve,x);else if(M.physicalKeyboardHighlightPressUseClick){var me;(me=X[0])===null||me===void 0||me.click()}else B.handleButtonClicked(te,x)}else Oe(X),M.physicalKeyboardHighlightPress&&(M.physicalKeyboardHighlightPressUsePointerEvents?(fe=X)===null||fe===void 0||(pe=fe.onpointerdown)===null||pe===void 0||pe.call(fe,x):M.physicalKeyboardHighlightPressUseClick?X.click():B.handleButtonClicked(te,x))})}},{key:"handleHighlightKeyUp",value:function(x){var M=this.getOptions();M.physicalKeyboardHighlightPreventDefault&&this.isModifierKey(x)&&(x.preventDefault(),x.stopImmediatePropagation());var j=this.getSimpleKeyboardLayoutKey(x);this.dispatch(function(B){var X,te,ee,Y=B.getButtonElement(j)||B.getButtonElement("{".concat(j,"}")),ve=function(Ee){Ee.removeAttribute&&Ee.removeAttribute("style")};Y&&(Array.isArray(Y)?(Y.forEach(function(Ee){return ve(Ee)}),M.physicalKeyboardHighlightPressUsePointerEvents&&((X=Y[0])===null||X===void 0||(te=X.onpointerup)===null||te===void 0||te.call(X,x))):(ve(Y),M.physicalKeyboardHighlightPressUsePointerEvents&&(Y==null||(ee=Y.onpointerup)===null||ee===void 0||ee.call(Y,x))))})}},{key:"getSimpleKeyboardLayoutKey",value:function(x){var M,j="",B=x.code||x.key||this.keyCodeToKey(x==null?void 0:x.keyCode);return(j=B!=null&&B.includes("Numpad")||B!=null&&B.includes("Shift")||B!=null&&B.includes("Space")||B!=null&&B.includes("Backspace")||B!=null&&B.includes("Control")||B!=null&&B.includes("Alt")||B!=null&&B.includes("Meta")?x.code||"":x.key||this.keyCodeToKey(x==null?void 0:x.keyCode)||"").length>1?(M=j)===null||M===void 0?void 0:M.toLowerCase():j}},{key:"keyCodeToKey",value:function(x){return{8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",65:"A",66:"B",67:"C",68:"D",69:"E",70:"F",71:"G",72:"H",73:"I",74:"J",75:"K",76:"L",77:"M",78:"N",79:"O",80:"P",81:"Q",82:"R",83:"S",84:"T",85:"U",86:"V",87:"W",88:"X",89:"Y",90:"Z",91:"Meta",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9",106:"NumpadMultiply",107:"NumpadAdd",109:"NumpadSubtract",110:"NumpadDecimal",111:"NumpadDivide",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"}[x]||""}}])&&D(q.prototype,G),Z&&D(q,Z),Object.defineProperty(q,"prototype",{writable:!1}),q;var q,G,Z}();function _(q){return _=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},_(q)}function Q(q,G){for(var Z=0;Z<G.length;Z++){var x=G[Z];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(q,V(x.key),x)}}function $(q,G,Z){return(G=V(G))in q?Object.defineProperty(q,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}):q[G]=Z,q}function V(q){var G=function(Z,x){if(_(Z)!="object"||!Z)return Z;var M=Z[Symbol.toPrimitive];if(M!==void 0){var j=M.call(Z,x);if(_(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Z)}(q,"string");return _(G)=="symbol"?G:G+""}var K=function(){return q=function x(M){var j=M.utilities,B=M.options;(function(X,te){if(!(X instanceof te))throw new TypeError("Cannot call a class as a function")})(this,x),$(this,"utilities",void 0),$(this,"options",void 0),$(this,"candidateBoxElement",void 0),$(this,"pageIndex",0),$(this,"pageSize",void 0),this.utilities=j,this.options=B,C.bindMethods(x,this),this.pageSize=this.utilities.getOptions().layoutCandidatesPageSize||5},G=[{key:"destroy",value:function(){this.candidateBoxElement&&(this.candidateBoxElement.remove(),this.pageIndex=0)}},{key:"show",value:function(x){var M=this,j=x.candidateValue,B=x.targetElement,X=x.onSelect;if(j&&j.length){var te=this.utilities.chunkArray(j.split(" "),this.pageSize);this.renderPage({candidateListPages:te,targetElement:B,pageIndex:this.pageIndex,nbPages:te.length,onItemSelected:function(ee,Y){X(ee,Y),M.destroy()}})}}},{key:"renderPage",value:function(x){var M,j=this,B=x.candidateListPages,X=x.targetElement,te=x.pageIndex,ee=x.nbPages,Y=x.onItemSelected;(M=this.candidateBoxElement)===null||M===void 0||M.remove(),this.candidateBoxElement=document.createElement("div"),this.candidateBoxElement.className="hg-candidate-box";var ve=document.createElement("ul");ve.className="hg-candidate-box-list",B[te].forEach(function(Fe){var ze,We=document.createElement("li"),nt=function(){var ot=new(j.options.useTouchEvents?TouchEvent:MouseEvent)("click");return Object.defineProperty(ot,"target",{value:We}),ot};We.className="hg-candidate-box-list-item",We.innerHTML=((ze=j.options.display)===null||ze===void 0?void 0:ze[Fe])||Fe,j.options.useTouchEvents?We.ontouchstart=function(ot){return Y(Fe,ot||nt())}:We.onclick=function(){var ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:nt();return Y(Fe,ot)},ve.appendChild(We)});var Ee=te>0,fe=document.createElement("div");fe.classList.add("hg-candidate-box-prev"),Ee&&fe.classList.add("hg-candidate-box-btn-active");var pe=function(){Ee&&j.renderPage({candidateListPages:B,targetElement:X,pageIndex:te-1,nbPages:ee,onItemSelected:Y})};this.options.useTouchEvents?fe.ontouchstart=pe:fe.onclick=pe,this.candidateBoxElement.appendChild(fe),this.candidateBoxElement.appendChild(ve);var Oe=te<ee-1,me=document.createElement("div");me.classList.add("hg-candidate-box-next"),Oe&&me.classList.add("hg-candidate-box-btn-active");var Ne=function(){Oe&&j.renderPage({candidateListPages:B,targetElement:X,pageIndex:te+1,nbPages:ee,onItemSelected:Y})};this.options.useTouchEvents?me.ontouchstart=Ne:me.onclick=Ne,this.candidateBoxElement.appendChild(me),X.prepend(this.candidateBoxElement)}}],G&&Q(q.prototype,G),Z&&Q(q,Z),Object.defineProperty(q,"prototype",{writable:!1}),q;var q,G,Z}(),R=K;function U(q){return function(G){if(Array.isArray(G))return W(G)}(q)||function(G){if(typeof Symbol<"u"&&G[Symbol.iterator]!=null||G["@@iterator"]!=null)return Array.from(G)}(q)||function(G,Z){if(G){if(typeof G=="string")return W(G,Z);var x=Object.prototype.toString.call(G).slice(8,-1);return x==="Object"&&G.constructor&&(x=G.constructor.name),x==="Map"||x==="Set"?Array.from(G):x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x)?W(G,Z):void 0}}(q)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
72
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function W(q,G){(G==null||G>q.length)&&(G=q.length);for(var Z=0,x=new Array(G);Z<G;Z++)x[Z]=q[Z];return x}function z(q){return z=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(G){return typeof G}:function(G){return G&&typeof Symbol=="function"&&G.constructor===Symbol&&G!==Symbol.prototype?"symbol":typeof G},z(q)}function ne(q,G){var Z=Object.keys(q);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(q);G&&(x=x.filter(function(M){return Object.getOwnPropertyDescriptor(q,M).enumerable})),Z.push.apply(Z,x)}return Z}function re(q,G){for(var Z=0;Z<G.length;Z++){var x=G[Z];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(q,ge(x.key),x)}}function ae(q,G,Z){return(G=ge(G))in q?Object.defineProperty(q,G,{value:Z,enumerable:!0,configurable:!0,writable:!0}):q[G]=Z,q}function ge(q){var G=function(Z,x){if(z(Z)!="object"||!Z)return Z;var M=Z[Symbol.toPrimitive];if(M!==void 0){var j=M.call(Z,x);if(z(j)!="object")return j;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Z)}(q,"string");return z(G)=="symbol"?G:G+""}var le=function(){return q=function x(M,j){var B=this;if(function(pe,Oe){if(!(pe instanceof Oe))throw new TypeError("Cannot call a class as a function")}(this,x),ae(this,"input",void 0),ae(this,"options",void 0),ae(this,"utilities",void 0),ae(this,"caretPosition",void 0),ae(this,"caretPositionEnd",void 0),ae(this,"keyboardDOM",void 0),ae(this,"keyboardPluginClasses",void 0),ae(this,"keyboardDOMClass",void 0),ae(this,"buttonElements",void 0),ae(this,"currentInstanceName",void 0),ae(this,"allKeyboardInstances",void 0),ae(this,"keyboardInstanceNames",void 0),ae(this,"isFirstKeyboardInstance",void 0),ae(this,"physicalKeyboard",void 0),ae(this,"modules",void 0),ae(this,"activeButtonClass",void 0),ae(this,"holdInteractionTimeout",void 0),ae(this,"holdTimeout",void 0),ae(this,"isMouseHold",void 0),ae(this,"initialized",void 0),ae(this,"candidateBox",void 0),ae(this,"keyboardRowsDOM",void 0),ae(this,"defaultName","default"),ae(this,"activeInputElement",null),ae(this,"handleParams",function(pe,Oe){var me,Ne,Fe;if(typeof pe=="string")me=pe.split(".").join(""),Ne=document.querySelector(".".concat(me)),Fe=Oe;else if(pe instanceof HTMLDivElement){if(!pe.className)throw console.warn("Any DOM element passed as parameter must have a class."),new Error("KEYBOARD_DOM_CLASS_ERROR");me=pe.className.split(" ")[0],Ne=pe,Fe=Oe}else me="simple-keyboard",Ne=document.querySelector(".".concat(me)),Fe=pe;return{keyboardDOMClass:me,keyboardDOM:Ne,options:Fe}}),ae(this,"getOptions",function(){return B.options}),ae(this,"getCaretPosition",function(){return B.caretPosition}),ae(this,"getCaretPositionEnd",function(){return B.caretPositionEnd}),ae(this,"registerModule",function(pe,Oe){B.modules[pe]||(B.modules[pe]={}),Oe(B.modules[pe])}),ae(this,"getKeyboardClassString",function(){for(var pe=arguments.length,Oe=new Array(pe),me=0;me<pe;me++)Oe[me]=arguments[me];return[B.keyboardDOMClass].concat(Oe).filter(function(Ne){return!!Ne}).join(" ")}),typeof window<"u"){var X=this.handleParams(M,j),te=X.keyboardDOMClass,ee=X.keyboardDOM,Y=X.options,ve=Y===void 0?{}:Y;this.utilities=new C({getOptions:this.getOptions,getCaretPosition:this.getCaretPosition,getCaretPositionEnd:this.getCaretPositionEnd,dispatch:this.dispatch}),this.caretPosition=null,this.caretPositionEnd=null,this.keyboardDOM=ee,this.options=function(pe){for(var Oe=1;Oe<arguments.length;Oe++){var me=arguments[Oe]!=null?arguments[Oe]:{};Oe%2?ne(Object(me),!0).forEach(function(Ne){ae(pe,Ne,me[Ne])}):Object.getOwnPropertyDescriptors?Object.defineProperties(pe,Object.getOwnPropertyDescriptors(me)):ne(Object(me)).forEach(function(Ne){Object.defineProperty(pe,Ne,Object.getOwnPropertyDescriptor(me,Ne))})}return pe}({layoutName:"default",theme:"hg-theme-default",inputName:"default",preventMouseDownDefault:!1,enableLayoutCandidates:!0,excludeFromLayout:{}},ve),this.keyboardPluginClasses="",C.bindMethods(x,this);var Ee=this.options.inputName,fe=Ee===void 0?this.defaultName:Ee;if(this.input={},this.input[fe]="",this.keyboardDOMClass=te,this.buttonElements={},window.SimpleKeyboardInstances||(window.SimpleKeyboardInstances={}),this.currentInstanceName=this.utilities.camelCase(this.keyboardDOMClass),window.SimpleKeyboardInstances[this.currentInstanceName]=this,this.allKeyboardInstances=window.SimpleKeyboardInstances,this.keyboardInstanceNames=Object.keys(window.SimpleKeyboardInstances),this.isFirstKeyboardInstance=this.keyboardInstanceNames[0]===this.currentInstanceName,this.physicalKeyboard=new I({dispatch:this.dispatch,getOptions:this.getOptions}),this.candidateBox=this.options.enableLayoutCandidates?new R({utilities:this.utilities,options:this.options}):null,!this.keyboardDOM)throw console.warn('".'.concat(te,'" was not found in the DOM.')),new Error("KEYBOARD_DOM_ERROR");this.render(),this.modules={},this.loadModules()}},G=[{key:"setCaretPosition",value:function(x){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:x;this.caretPosition=x,this.caretPositionEnd=M}},{key:"getInputCandidates",value:function(x){var M=this,j=this.options,B=j.layoutCandidates,X=j.layoutCandidatesCaseSensitiveMatch;if(!B||z(B)!=="object")return{};var te=Object.keys(B).filter(function(ve){var Ee=x.substring(0,M.getCaretPositionEnd()||0)||x,fe=new RegExp("".concat(M.utilities.escapeRegex(ve),"$"),X?"g":"gi");return!!U(Ee.matchAll(fe)).length});if(te.length>1){var ee=te.sort(function(ve,Ee){return Ee.length-ve.length})[0];return{candidateKey:ee,candidateValue:B[ee]}}if(te.length){var Y=te[0];return{candidateKey:Y,candidateValue:B[Y]}}return{}}},{key:"showCandidatesBox",value:function(x,M,j){var B=this;this.candidateBox&&this.candidateBox.show({candidateValue:M,targetElement:j,onSelect:function(X,te){var ee=B.options,Y=ee.layoutCandidatesCaseSensitiveMatch,ve=ee.disableCandidateNormalization,Ee=ee.enableLayoutCandidatesKeyPress,fe=X;ve||(fe=X.normalize("NFD")),typeof B.options.beforeInputUpdate=="function"&&B.options.beforeInputUpdate(B);var pe=B.getInput(B.options.inputName,!0),Oe=B.getCaretPositionEnd()||0,me=pe.substring(0,Oe||0)||pe,Ne=new RegExp("".concat(B.utilities.escapeRegex(x),"$"),Y?"g":"gi"),Fe=me.replace(Ne,fe),ze=pe.replace(me,Fe),We=Fe.length-me.length,nt=(Oe||pe.length)+We;nt<0&&(nt=0),B.setInput(ze,B.options.inputName,!0),B.setCaretPosition(nt),Ee&&typeof B.options.onKeyPress=="function"&&B.options.onKeyPress(X,te),typeof B.options.onChange=="function"&&B.options.onChange(B.getInput(B.options.inputName,!0),te),typeof B.options.onChangeAll=="function"&&B.options.onChangeAll(B.getAllInputs(),te)}})}},{key:"handleButtonClicked",value:function(x,M){var j=this.options,B=j.inputName,X=B===void 0?this.defaultName:B,te=j.debug;if(x!=="{//}"){this.input[X]||(this.input[X]=""),typeof this.options.beforeInputUpdate=="function"&&this.options.beforeInputUpdate(this);var ee=this.utilities.getUpdatedInput(x,this.input[X],this.caretPosition,this.caretPositionEnd);if(this.utilities.isStandardButton(x)&&this.activeInputElement&&this.input[X]&&this.input[X]===ee&&this.caretPosition===0&&this.caretPositionEnd===ee.length)return this.setInput("",this.options.inputName,!0),this.setCaretPosition(0),this.activeInputElement.value="",this.activeInputElement.setSelectionRange(0,0),void this.handleButtonClicked(x,M);if(typeof this.options.onKeyPress=="function"&&this.options.onKeyPress(x,M),this.input[X]!==ee&&(!this.options.inputPattern||this.options.inputPattern&&this.inputPatternIsValid(ee))){if(this.options.maxLength&&this.utilities.handleMaxLength(this.input,ee))return;var Y=this.utilities.getUpdatedInput(x,this.input[X],this.caretPosition,this.caretPositionEnd,!0);if(this.setInput(Y,this.options.inputName,!0),te&&console.log("Input changed:",this.getAllInputs()),this.options.debug&&console.log("Caret at: ",this.getCaretPosition(),this.getCaretPositionEnd(),"(".concat(this.keyboardDOMClass,")"),M==null?void 0:M.type),this.options.syncInstanceInputs&&this.syncInstanceInputs(),typeof this.options.onChange=="function"&&this.options.onChange(this.getInput(this.options.inputName,!0),M),typeof this.options.onChangeAll=="function"&&this.options.onChangeAll(this.getAllInputs(),M),M!=null&&M.target&&this.options.enableLayoutCandidates){var ve,Ee=this.getInputCandidates(ee),fe=Ee.candidateKey,pe=Ee.candidateValue;fe&&pe?this.showCandidatesBox(fe,pe,this.keyboardDOM):(ve=this.candidateBox)===null||ve===void 0||ve.destroy()}}this.caretPositionEnd&&this.caretPosition!==this.caretPositionEnd&&(this.setCaretPosition(this.caretPositionEnd,this.caretPositionEnd),this.activeInputElement&&this.activeInputElement.setSelectionRange(this.caretPositionEnd,this.caretPositionEnd),this.options.debug&&console.log("Caret position aligned",this.caretPosition)),te&&console.log("Key pressed:",x)}}},{key:"getMouseHold",value:function(){return this.isMouseHold}},{key:"setMouseHold",value:function(x){this.options.syncInstanceInputs?this.dispatch(function(M){M.isMouseHold=x}):this.isMouseHold=x}},{key:"handleButtonMouseDown",value:function(x,M){var j=this;M&&(this.options.preventMouseDownDefault&&M.preventDefault(),this.options.stopMouseDownPropagation&&M.stopPropagation(),M.target.classList.add(this.activeButtonClass)),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdTimeout&&clearTimeout(this.holdTimeout),this.setMouseHold(!0),this.options.disableButtonHold||(this.holdTimeout=window.setTimeout(function(){(j.getMouseHold()&&(!x.includes("{")&&!x.includes("}")||x==="{delete}"||x==="{backspace}"||x==="{bksp}"||x==="{space}"||x==="{tab}")||x==="{arrowright}"||x==="{arrowleft}"||x==="{arrowup}"||x==="{arrowdown}")&&(j.options.debug&&console.log("Button held:",x),j.handleButtonHold(x)),clearTimeout(j.holdTimeout)},500))}},{key:"handleButtonMouseUp",value:function(x,M){var j=this;M&&(this.options.preventMouseUpDefault&&M.preventDefault&&M.preventDefault(),this.options.stopMouseUpPropagation&&M.stopPropagation&&M.stopPropagation(),!(M.target===this.keyboardDOM||M.target&&this.keyboardDOM.contains(M.target)||this.candidateBox&&this.candidateBox.candidateBoxElement&&(M.target===this.candidateBox.candidateBoxElement||M.target&&this.candidateBox.candidateBoxElement.contains(M.target)))&&this.candidateBox&&this.candidateBox.destroy()),this.recurseButtons(function(B){B.classList.remove(j.activeButtonClass)}),this.setMouseHold(!1),this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),x&&typeof this.options.onKeyReleased=="function"&&this.options.onKeyReleased(x,M)}},{key:"handleKeyboardContainerMouseDown",value:function(x){this.options.preventMouseDownDefault&&x.preventDefault()}},{key:"handleButtonHold",value:function(x){var M=this;this.holdInteractionTimeout&&clearTimeout(this.holdInteractionTimeout),this.holdInteractionTimeout=window.setTimeout(function(){M.getMouseHold()?(M.handleButtonClicked(x),M.handleButtonHold(x)):clearTimeout(M.holdInteractionTimeout)},100)}},{key:"syncInstanceInputs",value:function(){var x=this;this.dispatch(function(M){M.replaceInput(x.input),M.setCaretPosition(x.caretPosition,x.caretPositionEnd)})}},{key:"clearInput",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName;this.input[x]="",this.setCaretPosition(0),this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"getInput",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.inputName||this.defaultName,M=arguments.length>1&&arguments[1]!==void 0&&arguments[1];return this.options.syncInstanceInputs&&!M&&this.syncInstanceInputs(),this.options.rtl?"‫"+this.input[x].replace("‫","").replace("‬","")+"‬":this.input[x]}},{key:"getAllInputs",value:function(){var x=this,M={};return Object.keys(this.input).forEach(function(j){M[j]=x.getInput(j,!0)}),M}},{key:"setInput",value:function(x){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.inputName||this.defaultName,j=arguments.length>2?arguments[2]:void 0;this.input[M]=x,!j&&this.options.syncInstanceInputs&&this.syncInstanceInputs()}},{key:"replaceInput",value:function(x){this.input=x}},{key:"setOptions",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},M=this.changedOptions(x);this.options=Object.assign(this.options,x),M.length&&(this.options.debug&&console.log("changedOptions",M),this.onSetOptions(M),this.render())}},{key:"changedOptions",value:function(x){var M=this;return Object.keys(x).filter(function(j){return JSON.stringify(x[j])!==JSON.stringify(M.options[j])})}},{key:"onSetOptions",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];x.includes("layoutName")&&this.candidateBox&&this.candidateBox.destroy(),(x.includes("layoutCandidatesPageSize")||x.includes("layoutCandidates"))&&this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=new R({utilities:this.utilities,options:this.options}))}},{key:"resetRows",value:function(){this.keyboardRowsDOM&&this.keyboardRowsDOM.remove(),this.keyboardDOM.className=this.keyboardDOMClass,this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.buttonElements={}}},{key:"dispatch",value:function(x){if(!window.SimpleKeyboardInstances)throw console.warn("SimpleKeyboardInstances is not defined. Dispatch cannot be called."),new Error("INSTANCES_VAR_ERROR");return Object.keys(window.SimpleKeyboardInstances).forEach(function(M){x(window.SimpleKeyboardInstances[M],M)})}},{key:"addButtonTheme",value:function(x,M){var j=this;M&&x&&(x.split(" ").forEach(function(B){M.split(" ").forEach(function(X){j.options.buttonTheme||(j.options.buttonTheme=[]);var te=!1;j.options.buttonTheme.map(function(ee){if(ee!=null&&ee.class.split(" ").includes(X)){te=!0;var Y=ee.buttons.split(" ");Y.includes(B)||(te=!0,Y.push(B),ee.buttons=Y.join(" "))}return ee}),te||j.options.buttonTheme.push({class:X,buttons:x})})}),this.render())}},{key:"removeButtonTheme",value:function(x,M){var j=this;if(!x&&!M)return this.options.buttonTheme=[],void this.render();x&&Array.isArray(this.options.buttonTheme)&&this.options.buttonTheme.length&&(x.split(" ").forEach(function(B){var X;(X=j.options)===null||X===void 0||(X=X.buttonTheme)===null||X===void 0||X.map(function(te,ee){if(te&&M&&M.includes(te.class)||!M){var Y,ve,Ee=(Y=te)===null||Y===void 0?void 0:Y.buttons.split(" ").filter(function(fe){return fe!==B});te&&Ee!=null&&Ee.length?te.buttons=Ee.join(" "):((ve=j.options.buttonTheme)===null||ve===void 0||ve.splice(ee,1),te=null)}return te})}),this.render())}},{key:"getButtonElement",value:function(x){var M,j=this.buttonElements[x];return j&&(M=j.length>1?j:j[0]),M}},{key:"inputPatternIsValid",value:function(x){var M,j=this.options.inputPattern;if((M=j instanceof RegExp?j:j[this.options.inputName||this.defaultName])&&x){var B=M.test(x);return this.options.debug&&console.log('inputPattern ("'.concat(M,'"): ').concat(B?"passed":"did not pass!")),B}return!0}},{key:"setEventListeners",value:function(){if(this.isFirstKeyboardInstance||!this.allKeyboardInstances){this.options.debug&&console.log("Caret handling started (".concat(this.keyboardDOMClass,")"));var x=this.options.physicalKeyboardHighlightPreventDefault,M=x!==void 0&&x;document.addEventListener("keyup",this.handleKeyUp,M),document.addEventListener("keydown",this.handleKeyDown,M),document.addEventListener("mouseup",this.handleMouseUp),document.addEventListener("touchend",this.handleTouchEnd),document.addEventListener("selectionchange",this.handleSelectionChange),document.addEventListener("select",this.handleSelect)}}},{key:"handleKeyUp",value:function(x){this.caretEventHandler(x),this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyUp(x)}},{key:"handleKeyDown",value:function(x){this.options.physicalKeyboardHighlight&&this.physicalKeyboard.handleHighlightKeyDown(x)}},{key:"handleMouseUp",value:function(x){this.caretEventHandler(x)}},{key:"handleTouchEnd",value:function(x){this.caretEventHandler(x)}},{key:"handleSelect",value:function(x){this.caretEventHandler(x)}},{key:"handleSelectionChange",value:function(x){navigator.userAgent.includes("Firefox")||this.caretEventHandler(x)}},{key:"caretEventHandler",value:function(x){var M,j=this;x.target.tagName&&(M=x.target.tagName.toLowerCase()),this.dispatch(function(B){var X=x.target===B.keyboardDOM||x.target&&B.keyboardDOM.contains(x.target);if(j.options.syncInstanceInputs&&Array.isArray(x.path)&&(X=x.path.some(function(Y){var ve;return Y==null||(ve=Y.hasAttribute)===null||ve===void 0?void 0:ve.call(Y,"data-skInstance")})),(M==="textarea"||M==="input"&&["text","search","url","tel","password"].includes(x.target.type))&&!B.options.disableCaretPositioning){var te=x.target.selectionStart,ee=x.target.selectionEnd;B.options.rtl&&(te=B.utilities.getRtlOffset(te,B.getInput()),ee=B.utilities.getRtlOffset(ee,B.getInput())),B.setCaretPosition(te,ee),j.activeInputElement=x.target,B.options.debug&&console.log("Caret at: ",B.getCaretPosition(),B.getCaretPositionEnd(),x&&x.target.tagName.toLowerCase(),"(".concat(B.keyboardDOMClass,")"),x==null?void 0:x.type)}else!B.options.disableCaretPositioning&&X||(x==null?void 0:x.type)==="selectionchange"||(B.setCaretPosition(null),j.activeInputElement=null,B.options.debug&&console.log('Caret position reset due to "'.concat(x==null?void 0:x.type,'" event'),x))})}},{key:"recurseButtons",value:function(x){var M=this;x&&Object.keys(this.buttonElements).forEach(function(j){return M.buttonElements[j].forEach(x)})}},{key:"destroy",value:function(){this.options.debug&&console.log("Destroying simple-keyboard instance: ".concat(this.currentInstanceName));var x=this.options.physicalKeyboardHighlightPreventDefault,M=x!==void 0&&x;document.removeEventListener("keyup",this.handleKeyUp,M),document.removeEventListener("keydown",this.handleKeyDown,M),document.removeEventListener("mouseup",this.handleMouseUp),document.removeEventListener("touchend",this.handleTouchEnd),document.removeEventListener("select",this.handleSelect),document.removeEventListener("selectionchange",this.handleSelectionChange),document.onpointerup=null,document.ontouchend=null,document.ontouchcancel=null,document.onmouseup=null,this.recurseButtons(function(j){j&&(j.onpointerdown=null,j.onpointerup=null,j.onpointercancel=null,j.ontouchstart=null,j.ontouchend=null,j.ontouchcancel=null,j.onclick=null,j.onmousedown=null,j.onmouseup=null,j.remove(),j=null)}),this.keyboardDOM.onpointerdown=null,this.keyboardDOM.ontouchstart=null,this.keyboardDOM.onmousedown=null,this.resetRows(),this.candidateBox&&(this.candidateBox.destroy(),this.candidateBox=null),this.activeInputElement=null,this.keyboardDOM.removeAttribute("data-skInstance"),this.keyboardDOM.innerHTML="",window.SimpleKeyboardInstances[this.currentInstanceName]=null,delete window.SimpleKeyboardInstances[this.currentInstanceName],this.initialized=!1}},{key:"getButtonThemeClasses",value:function(x){var M=this.options.buttonTheme,j=[];return Array.isArray(M)&&M.forEach(function(B){if(B&&B.class&&typeof B.class=="string"&&B.buttons&&typeof B.buttons=="string"){var X=B.class.split(" ");B.buttons.split(" ").includes(x)&&(j=[].concat(U(j),U(X)))}else console.warn('Incorrect "buttonTheme". Please check the documentation.',B)}),j}},{key:"setDOMButtonAttributes",value:function(x,M){var j=this.options.buttonAttributes;Array.isArray(j)&&j.forEach(function(B){B.attribute&&typeof B.attribute=="string"&&B.value&&typeof B.value=="string"&&B.buttons&&typeof B.buttons=="string"?B.buttons.split(" ").includes(x)&&M(B.attribute,B.value):console.warn('Incorrect "buttonAttributes". Please check the documentation.',B)})}},{key:"onTouchDeviceDetected",value:function(){this.processAutoTouchEvents(),this.disableContextualWindow()}},{key:"disableContextualWindow",value:function(){window.oncontextmenu=function(x){if(x.target.classList.contains("hg-button"))return x.preventDefault(),x.stopPropagation(),!1}}},{key:"processAutoTouchEvents",value:function(){this.options.autoUseTouchEvents&&(this.options.useTouchEvents=!0,this.options.debug&&console.log("autoUseTouchEvents: Touch device detected, useTouchEvents enabled."))}},{key:"onInit",value:function(){this.options.debug&&console.log("".concat(this.keyboardDOMClass," Initialized")),this.setEventListeners(),typeof this.options.onInit=="function"&&this.options.onInit(this)}},{key:"beforeFirstRender",value:function(){this.utilities.isTouchDevice()&&this.onTouchDeviceDetected(),typeof this.options.beforeFirstRender=="function"&&this.options.beforeFirstRender(this),this.isFirstKeyboardInstance&&this.utilities.pointerEventsSupported()&&!this.options.useTouchEvents&&!this.options.useMouseEvents&&this.options.debug&&console.log("Using PointerEvents as it is supported by this browser"),this.options.useTouchEvents&&this.options.debug&&console.log("useTouchEvents has been enabled. Only touch events will be used.")}},{key:"beforeRender",value:function(){typeof this.options.beforeRender=="function"&&this.options.beforeRender(this)}},{key:"onRender",value:function(){typeof this.options.onRender=="function"&&this.options.onRender(this)}},{key:"onModulesLoaded",value:function(){typeof this.options.onModulesLoaded=="function"&&this.options.onModulesLoaded(this)}},{key:"loadModules",value:function(){var x=this;Array.isArray(this.options.modules)&&(this.options.modules.forEach(function(M){var j=new M(x);j.init&&j.init(x)}),this.keyboardPluginClasses="modules-loaded",this.render(),this.onModulesLoaded())}},{key:"getModuleProp",value:function(x,M){return!!this.modules[x]&&this.modules[x][M]}},{key:"getModulesList",value:function(){return Object.keys(this.modules)}},{key:"parseRowDOMContainers",value:function(x,M,j,B){var X=this,te=Array.from(x.children),ee=0;return te.length&&j.forEach(function(Y,ve){var Ee=B[ve];if(!(Ee&&Ee>Y))return!1;var fe=Y-ee,pe=Ee-ee,Oe=document.createElement("div");Oe.className+="hg-button-container";var me="".concat(X.options.layoutName,"-r").concat(M,"c").concat(ve);Oe.setAttribute("data-skUID",me);var Ne=te.splice(fe,pe-fe+1);ee=pe-fe,Ne.forEach(function(Fe){return Oe.appendChild(Fe)}),te.splice(fe,0,Oe),x.innerHTML="",te.forEach(function(Fe){return x.appendChild(Fe)}),X.options.debug&&console.log("rowDOMContainer",Ne,fe,pe,ee+1)}),x}},{key:"render",value:function(){var x=this;this.resetRows(),this.initialized||this.beforeFirstRender(),this.beforeRender();var M="hg-layout-".concat(this.options.layoutName),j=this.options.layout||{default:["` 1 2 3 4 5 6 7 8 9 0 - = {bksp}","{tab} q w e r t y u i o p [ ] \\","{lock} a s d f g h j k l ; ' {enter}","{shift} z x c v b n m , . / {shift}",".com @ {space}"],shift:["~ ! @ # $ % ^ & * ( ) _ + {bksp}","{tab} Q W E R T Y U I O P { } |",'{lock} A S D F G H J K L : " {enter}',"{shift} Z X C V B N M < > ? {shift}",".com @ {space}"]},B=this.options.useTouchEvents||!1,X=B?"hg-touch-events":"",te=this.options.useMouseEvents||!1,ee=this.options.disableRowButtonContainers;this.keyboardDOM.className=this.getKeyboardClassString(this.options.theme,M,this.keyboardPluginClasses,X),this.keyboardDOM.setAttribute("data-skInstance",this.currentInstanceName),this.keyboardRowsDOM=document.createElement("div"),this.keyboardRowsDOM.className="hg-rows",j[this.options.layoutName||this.defaultName].forEach(function(Y,ve){var Ee=Y.split(" ");x.options.excludeFromLayout&&x.options.excludeFromLayout[x.options.layoutName||x.defaultName]&&(Ee=Ee.filter(function(me){return x.options.excludeFromLayout&&!x.options.excludeFromLayout[x.options.layoutName||x.defaultName].includes(me)}));var fe=document.createElement("div");fe.className+="hg-row";var pe=[],Oe=[];Ee.forEach(function(me,Ne){var Fe,ze=!ee&&typeof me=="string"&&me.length>1&&me.indexOf("[")===0,We=!ee&&typeof me=="string"&&me.length>1&&me.indexOf("]")===me.length-1;ze&&(pe.push(Ne),me=me.replace(/\[/g,"")),We&&(Oe.push(Ne),me=me.replace(/\]/g,""));var nt=x.utilities.getButtonClass(me),ot=x.utilities.getButtonDisplayName(me,x.options.display,x.options.mergeDisplay),$t=x.options.useButtonTag?"button":"div",rt=document.createElement($t);rt.className+="hg-button ".concat(nt),(Fe=rt.classList).add.apply(Fe,U(x.getButtonThemeClasses(me))),x.setDOMButtonAttributes(me,function(ke,jt){rt.setAttribute(ke,jt)}),x.activeButtonClass="hg-activeButton",!x.utilities.pointerEventsSupported()||B||te?B?(rt.ontouchstart=function(ke){x.handleButtonClicked(me,ke),x.handleButtonMouseDown(me,ke)},rt.ontouchend=function(ke){x.handleButtonMouseUp(me,ke)},rt.ontouchcancel=function(ke){x.handleButtonMouseUp(me,ke)}):(rt.onclick=function(ke){x.setMouseHold(!1),typeof x.options.onKeyReleased!="function"&&x.handleButtonClicked(me,ke)},rt.onmousedown=function(ke){typeof x.options.onKeyReleased!="function"||x.isMouseHold||x.handleButtonClicked(me,ke),x.handleButtonMouseDown(me,ke)},rt.onmouseup=function(ke){x.handleButtonMouseUp(me,ke)}):(rt.onpointerdown=function(ke){x.handleButtonClicked(me,ke),x.handleButtonMouseDown(me,ke)},rt.onpointerup=function(ke){x.handleButtonMouseUp(me,ke)},rt.onpointercancel=function(ke){x.handleButtonMouseUp(me,ke)}),rt.setAttribute("data-skBtn",me);var dt="".concat(x.options.layoutName,"-r").concat(ve,"b").concat(Ne);rt.setAttribute("data-skBtnUID",dt);var at=document.createElement("span");at.innerHTML=ot,rt.appendChild(at),x.buttonElements[me]||(x.buttonElements[me]=[]),x.buttonElements[me].push(rt),fe.appendChild(rt)}),fe=x.parseRowDOMContainers(fe,ve,pe,Oe),x.keyboardRowsDOM.appendChild(fe)}),this.keyboardDOM.appendChild(this.keyboardRowsDOM),this.onRender(),this.initialized||(this.initialized=!0,!this.utilities.pointerEventsSupported()||B||te?B?(document.ontouchend=function(Y){return x.handleButtonMouseUp(void 0,Y)},document.ontouchcancel=function(Y){return x.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.ontouchstart=function(Y){return x.handleKeyboardContainerMouseDown(Y)}):B||(document.onmouseup=function(Y){return x.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.onmousedown=function(Y){return x.handleKeyboardContainerMouseDown(Y)}):(document.onpointerup=function(Y){return x.handleButtonMouseUp(void 0,Y)},this.keyboardDOM.onpointerdown=function(Y){return x.handleKeyboardContainerMouseDown(Y)}),this.onInit())}}],G&&re(q.prototype,G),Z&&re(q,Z),Object.defineProperty(q,"prototype",{writable:!1}),q;var q,G,Z}(),xe=le,ce=le}(),E}()},442:function(c){c.exports=n}},i={};function a(c){var h=i[c];if(h!==void 0)return h.exports;var g=i[c]={exports:{}};return r[c].call(g.exports,g,g.exports,a),g.exports}a.n=function(c){var h=c&&c.__esModule?function(){return c.default}:function(){return c};return a.d(h,{a:h}),h},a.d=function(c,h){for(var g in h)a.o(h,g)&&!a.o(c,g)&&Object.defineProperty(c,g,{enumerable:!0,get:h[g]})},a.o=function(c,h){return Object.prototype.hasOwnProperty.call(c,h)},a.r=function(c){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})};var s={};return function(){a.r(s),a.d(s,{KeyboardReact:function(){return l},default:function(){return p}}),a(981);var c=a(442),h=a(548),g=a.n(h);function d(f){return d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(m){return typeof m}:function(m){return m&&typeof Symbol=="function"&&m.constructor===Symbol&&m!==Symbol.prototype?"symbol":typeof m},d(f)}function E(f,m){var b=Object.keys(f);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(f);m&&(C=C.filter(function(S){return Object.getOwnPropertyDescriptor(f,S).enumerable})),b.push.apply(b,C)}return b}function u(f){for(var m=1;m<arguments.length;m++){var b=arguments[m]!=null?arguments[m]:{};m%2?E(Object(b),!0).forEach(function(C){w(f,C,b[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(f,Object.getOwnPropertyDescriptors(b)):E(Object(b)).forEach(function(C){Object.defineProperty(f,C,Object.getOwnPropertyDescriptor(b,C))})}return f}function w(f,m,b){var C;return C=function(S,D){if(d(S)!="object"||!S)return S;var A=S[Symbol.toPrimitive];if(A!==void 0){var N=A.call(S,D||"default");if(d(N)!="object")return N;throw new TypeError("@@toPrimitive must return a primitive value.")}return(D==="string"?String:Number)(S)}(m,"string"),(m=d(C)=="symbol"?C:C+"")in f?Object.defineProperty(f,m,{value:b,enumerable:!0,configurable:!0,writable:!0}):f[m]=b,f}var o=function(f){return u(u({},f),{},{keyboardRef:null})},l=function(f){var m=f.baseClass||"react-simple-keyboard",b=c.useRef(null),C=c.useRef(null),S=c.useRef(null),D=c.useRef(f);return c.useEffect(function(){return function(){S.current&&S.current.destroy(),b.current=!1}},[]),c.useEffect(function(){var A=function($){return u(u({},$),{},{theme:"simple-keyboard ".concat($.theme||"hg-theme-default")})}(f);if(!b.current){b.current=!0,A.debug&&console.log("ReactSimpleKeyboard: Init");var N=C.current,I=".".concat(m);S.current=new(g())(N||I,A),A.keyboardRef&&A.keyboardRef(S.current)}var _=function($,V){var K=o(V),R=o($);return Object.keys(K).filter(function(U){return K[U]!==R[U]})}(D.current,A);if(_.length){var Q=S.current;D.current=A,Q==null||Q.setOptions(A),A.debug&&console.log("ReactSimpleKeyboard - setOptions called due to updated props:",_)}},[b,m,D,f]),c.createElement("div",{className:m,ref:C})},p=l}(),s}()})})(Bl);var mm=Bl.exports;const ym=zo(mm);function kl({onChange:e,keyboardRef:t,layout:n,theme:r}){const[i,a]=k.useState("default"),s=c=>{(c==="{shift}"||c==="{lock}")&&a(i==="default"?"shift":"default")};return T.jsx(ym,{keyboardRef:c=>t.current=c,layoutName:i,layout:n,theme:r,onChange:e,onKeyPress:s,preventMouseDownDefault:!0})}function vm(){return{subscribe:(r,i)=>{document.addEventListener(r,i)},unsubscribe:(r,i)=>{document.removeEventListener(r,i)},publish:(r,i)=>{const a=new CustomEvent(r,{detail:i});document.dispatchEvent(a)}}}function Fl(){const{subscribe:e,unsubscribe:t,publish:n}=vm();return{initialize:(c,h)=>{e("openKeyboard",c),e("closeKeyboard",h)},terminate:(c,h)=>{t("openKeyboard",c),t("closeKeyboard",h)},open:c=>{n("openKeyboard",{inputId:c.target.id,inputValue:c.target.value})},close:()=>{n("closeKeyboard")}}}function jl(){const[e,t]=k.useState(!1),n=k.useRef(null),r=k.useRef(null),i=k.useRef(null),[a,s]=k.useState(),{session:c}=Ht(),{initialize:h,terminate:g}=Fl(),d=l=>{var p,f;r.current=document.getElementById(l.detail.inputId),(p=n.current)==null||p.setInput(l.detail.inputValue),(f=r.current)==null||f.addEventListener("input",m=>{var C;const b=m.target;(C=n.current)==null||C.setInput(b==null?void 0:b.value)}),t(!0)},E=()=>t(!1);k.useEffect(()=>{var p;const l=(p=i.current)==null?void 0:p.getBoundingClientRect();return l&&l.x&&!a&&s(l),h(d,E),()=>{g(d,E)}},[h,g,e]);const u=l=>{var p,f;if(r&&r.current){w(r.current,l);const m=(p=n.current)==null?void 0:p.getCaretPosition();m&&((f=r.current)==null||f.setSelectionRange(m,m))}},w=(l,p)=>{var b;const f=(b=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,"value"))==null?void 0:b.set;f==null||f.call(l,p);const m=new Event("input",{bubbles:!0});l.dispatchEvent(m)};if(!c||!+(c.input_data.enable_on_screen_keyboard??!1))return T.jsx(T.Fragment,{});const o=()=>{var f;const l=(f=r.current)==null?void 0:f.getBoundingClientRect();let p=!1;return a&&l&&(p=!(a.right<l.left||a.left>l.right||a.bottom<l.top||a.top>l.bottom)),p};return T.jsx("div",{ref:i,className:`mobile:hidden bottom-2 left-2 right-2 z-50 mx-auto w-[98vw] max-w-[1200px] ${!e&&"hidden"} ${o()?"b-2 block":"absolute"}`,children:T.jsx(kl,{keyboardRef:n,onChange:u})})}function Ua({value:e,valueSetter:t}){const n=k.useRef(null),r=i=>{const a=i?(parseFloat(i)/100).toFixed(2):"";t(a)};return T.jsxs("div",{children:[T.jsx("input",{type:"number",readOnly:!0,className:"mb-4 h-full w-full rounded border-gray-200 p-4 text-center text-4xl text-gray-500 focus:ring-0 focus:ring-offset-0",value:e,placeholder:"0,00",onChange:i=>r(i.target.value)}),T.jsx(kl,{keyboardRef:n,layout:{default:["1 2 3","4 5 6","7 8 9","00 0 {bksp}"]},theme:"hg-theme-default hg-layout-numeric numeric-theme",onChange:r})]})}function wr(e){const{open:t,close:n}=Fl(),r=k.useRef(null),i=async s=>{(async()=>t(s))().then(()=>{var h;return(h=r.current)==null?void 0:h.scrollIntoView(!1)})},a=()=>{n()};return T.jsxs("div",{className:"relative",onFocus:i,onBlur:a,children:[T.jsx("input",{...e,ref:r,type:e.type==="date_time"?"datetime-local":e.type==="birth_date"?"date":e.type,placeholder:" ",className:"peer m-0 block max-h-[58px] w-full rounded border border-solid border-gray-300 bg-white bg-clip-padding px-3 py-4 text-base font-normal leading-tight text-gray-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-2 focus:border-primary-600 focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary-600 [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",onChange:s=>e.onChange&&e.onChange(s.target.name,s.target.value)}),T.jsx("label",{htmlFor:`${e.label}-id`,className:"pointer-events-none absolute left-0 top-0 w-max origin-[0_0] whitespace-nowrap border border-solid border-transparent px-3 py-4 text-gray-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary-600 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none",children:e.label})]})}function bm(e){const t=k.useRef(null),[n,r]=k.useState(!1),[i,a]=k.useState(""),[s,c]=k.useState(e.defaultValue.split(";")),{name:h,onChange:g}=e;return k.useEffect(()=>{function d(E){t.current&&!t.current.contains(E.target)&&r(!1)}return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[]),k.useEffect(()=>{g&&g(h,s.join(";"))},[s]),T.jsxs("div",{ref:t,className:"relative w-full",children:[T.jsx("div",{onClick:()=>r(!n),className:`flex h-[54px] w-full cursor-pointer gap-2 truncate rounded border bg-white p-3 leading-[2.75rem] text-gray-700 ${n?"border-2 border-blue-600":"border-gray-300"}`,children:s.sort().reduce((d,E)=>d+=E+(E===s[s.length-1]?"":", "),"")}),T.jsx("div",{className:`pointer-events-none absolute left-0 top-0 origin-[0_0] border border-solid border-transparent px-3 py-4 transition-[opacity,_transform] duration-200 ease-linear motion-reduce:transition-none ${n?"-translate-y-2 translate-x-[0.15rem] scale-[0.85] text-blue-600":"text-gray-500"} ${s.length&&"-translate-y-2 translate-x-[0.15rem] scale-[0.85]"}`,children:e.label}),n&&T.jsxs("div",{className:"absolute z-20 mt-2 flex w-full flex-col gap-3 rounded bg-white p-3 shadow-md",children:[T.jsx("input",{placeholder:"Search",className:"rounded border border-solid border-gray-300 bg-transparent p-3 outline-none",type:"text",onChange:d=>a(d.target.value)}),T.jsx("hr",{}),!e.options.filter(d=>d.label.toLowerCase().includes(i.toLowerCase())).length&&T.jsx("p",{className:"text-center text-sm font-normal text-neutral-400",children:"No results found"}),e.options.map(d=>{if(!(i&&!d.label.toLowerCase().includes(i.toLowerCase())))return T.jsxs("div",{className:"flex items-center",children:[T.jsx("input",{id:d.value,type:"checkbox",value:d.value,checked:s.includes(d.value),readOnly:!0,className:"h-4 w-4 rounded border-gray-300 bg-gray-100 text-blue-600 focus:ring-blue-500",onClick:E=>{E.target.checked?c([...s,E.target.value]):c(s.filter(u=>u!==E.target.value))}}),T.jsx("label",{htmlFor:d.value,className:"text-md ml-2 flex-grow font-normal text-gray-700",children:d.label})]},d.value)})]})]})}function wm(e){return T.jsxs("div",{className:"relative",children:[T.jsx("select",{...e,id:e.id,className:"peer m-0 block max-h-[58px] w-full rounded border border-solid border-gray-300 bg-white bg-clip-padding px-2 py-4 text-base font-normal leading-tight text-gray-700 transition duration-200 ease-linear placeholder:text-transparent focus:border-2 focus:border-primary-600 focus:pb-[0.625rem] focus:pt-[1.625rem] focus:text-neutral-700 focus:outline-none peer-focus:text-primary-600 [&:not(:placeholder-shown)]:pb-[0.625rem] [&:not(:placeholder-shown)]:pt-[1.625rem]",onChange:t=>e.onChange&&e.onChange(t.target.name,t.target.value),children:e.options.map(t=>T.jsx("option",{value:t.value,children:t.label},t.value))}),T.jsx("label",{htmlFor:`${e.label}-id`,className:"pointer-events-none absolute left-0 top-0 w-max origin-[0_0] whitespace-nowrap border border-solid border-transparent px-3 py-4 text-gray-500 transition-[opacity,_transform] duration-200 ease-linear peer-focus:-translate-y-2 peer-focus:translate-x-[0.15rem] peer-focus:scale-[0.85] peer-focus:text-primary-600 peer-[:not(:placeholder-shown)]:-translate-y-2 peer-[:not(:placeholder-shown)]:translate-x-[0.15rem] peer-[:not(:placeholder-shown)]:scale-[0.85] motion-reduce:transition-none",children:e.label})]})}function un({children:e}){return T.jsx("div",{className:"h-full w-full rounded-lg border border-gray-200 bg-white p-4 shadow sm:p-6 md:p-8",children:e})}function Ll({children:e}){return T.jsxs(un,{children:[T.jsx("div",{className:"flex items-center justify-center",children:T.jsxs("svg",{className:"stroke h-36 w-36 animate-[scale_.3s_ease-in-out_.9s_both] fill-none stroke-green-600 stroke-2 shadow-[inset_0px_0px_0px_#7ac142]",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 52 52",children:[T.jsx("circle",{className:"animate-[stroke_.6s_linear_forwards] fill-none stroke-green-600 stroke-2",style:{strokeDasharray:166,strokeDashoffset:166},cx:"26",cy:"26",r:"25",fill:"none"}),T.jsx("path",{className:"origin-[50%_50%] animate-[stroke_.3s_linear_.8s_forwards]",style:{strokeDasharray:48,strokeDashoffset:48},fill:"none",d:"M14.1 27.2l7.1 7.2 16.7-16.8"})]})}),e]})}const Em="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.7002%204.70016L11.2999%2011.2998'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20d='M11.2998%204.70016L4.70014%2011.2998'%20stroke='%23000'%20stroke-width='1.8'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/svg%3e";function Er({title:e,isOpen:t,onClose:n,children:r}){const[i,a]=k.useState(t),s=k.useRef(null);k.useEffect(()=>{a(t)},[t]),k.useEffect(()=>{const g=s.current;g&&(i?g.show():g.close())},[i]);const c=()=>{n&&n(),a(!1)},h=g=>{g.key==="Escape"&&c()};return T.jsx("div",{className:`fixed inset-0 z-40 min-h-screen items-center bg-gray-500 bg-opacity-25 ${i?"flex":"hidden"}`,children:T.jsxs("dialog",{ref:s,onKeyDown:h,className:"scrollbar-hide absolute overflow-auto rounded-lg drop-shadow-md",children:[T.jsxs("div",{className:"flex w-full justify-between bg-gray-50 p-4",children:[T.jsx("p",{className:"truncate text-lg",children:e}),T.jsx("img",{src:Em,alt:"closeButton",className:"h-[25px] w-[25px] cursor-pointer opacity-50 hover:opacity-90",onClick:c})]}),T.jsx("div",{className:"p-6",children:r})]})})}function xm(){if(console&&console.warn){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&(t[0]=`react-i18next:: ${t[0]}`),console.warn(...t)}}const _l={};function Ga(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&_l[t[0]]||(typeof t[0]=="string"&&(_l[t[0]]=new Date),xm(...t))}const Vl=(e,t)=>()=>{if(e.isInitialized)t();else{const n=()=>{setTimeout(()=>{e.off("initialized",n)},0),t()};e.on("initialized",n)}};function ql(e,t,n){e.loadNamespaces(t,Vl(e,n))}function Ul(e,t,n,r){typeof n=="string"&&(n=[n]),n.forEach(i=>{e.options.ns.indexOf(i)<0&&e.options.ns.push(i)}),e.loadLanguages(t,Vl(e,r))}function Cm(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=t.languages[0],i=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const s=(c,h)=>{const g=t.services.backendConnector.state[`${c}|${h}`];return g===-1||g===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||s(r,e)&&(!i||s(a,e)))}function Am(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(Ga("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(e,{lng:n.lng,precheck:(i,a)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!a(i.isLanguageChangingTo,e))return!1}}):Cm(e,t,n)}const Sm=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Tm={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Om=e=>Tm[e];let Ya={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:e=>e.replace(Sm,Om)};function Dm(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ya={...Ya,...e}}function Im(){return Ya}let Gl;function Rm(e){Gl=e}function Nm(){return Gl}const Pm={type:"3rdParty",init(e){Dm(e.options.react),Rm(e)}},Mm=k.createContext();class Bm{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const km=(e,t)=>{const n=k.useRef();return k.useEffect(()=>{n.current=e},[e,t]),n.current};function Yl(e,t,n,r){return e.getFixedT(t,n,r)}function Fm(e,t,n,r){return k.useCallback(Yl(e,t,n,r),[e,t,n,r])}function mt(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:n}=t,{i18n:r,defaultNS:i}=k.useContext(Mm)||{},a=n||r||Nm();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Bm),!a){Ga("You will need to pass in an i18next instance by using initReactI18next");const C=(D,A)=>typeof A=="string"?A:A&&typeof A=="object"&&typeof A.defaultValue=="string"?A.defaultValue:Array.isArray(D)?D[D.length-1]:D,S=[C,{},!1];return S.t=C,S.i18n={},S.ready=!1,S}a.options.react&&a.options.react.wait!==void 0&&Ga("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const s={...Im(),...a.options.react,...t},{useSuspense:c,keyPrefix:h}=s;let g=i||a.options&&a.options.defaultNS;g=typeof g=="string"?[g]:g||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(g);const d=(a.isInitialized||a.initializedStoreOnce)&&g.every(C=>Am(C,a,s)),E=Fm(a,t.lng||null,s.nsMode==="fallback"?g:g[0],h),u=()=>E,w=()=>Yl(a,t.lng||null,s.nsMode==="fallback"?g:g[0],h),[o,l]=k.useState(u);let p=g.join();t.lng&&(p=`${t.lng}${p}`);const f=km(p),m=k.useRef(!0);k.useEffect(()=>{const{bindI18n:C,bindI18nStore:S}=s;m.current=!0,!d&&!c&&(t.lng?Ul(a,t.lng,g,()=>{m.current&&l(w)}):ql(a,g,()=>{m.current&&l(w)})),d&&f&&f!==p&&m.current&&l(w);function D(){m.current&&l(w)}return C&&a&&a.on(C,D),S&&a&&a.store.on(S,D),()=>{m.current=!1,C&&a&&C.split(" ").forEach(A=>a.off(A,D)),S&&a&&S.split(" ").forEach(A=>a.store.off(A,D))}},[a,p]),k.useEffect(()=>{m.current&&d&&l(u)},[a,h,d]);const b=[o,a,d];if(b.t=o,b.i18n=a,b.ready=d,d||!d&&!c)return b;throw new Promise(C=>{t.lng?Ul(a,t.lng,g,()=>C()):ql(a,g,()=>C())})}function Ka({callback:e}){const t=ir(),{t:n}=mt(),[r,i]=k.useState(""),[a,s]=k.useState(!1),[c,h]=k.useState(!1),{session:g,mutate:d}=Ht(),E=g==null?void 0:g.input_data.scanner_type,[u,w]=k.useState(""),o=async f=>{if(t.onContactLink){const{data:{data:m}}=await ka.get(f);m&&t.onContactLink(m)}},l=k.useCallback(()=>{g&&(s(!0),uo.setContact(g.uuid,{contact_identifier_value:r}).then(f=>{o(f.data.data.contact.uuid).then(),d().then(()=>{Xe.success(n("contactSavedToSession")),e&&e()})}).catch(()=>h(!0)).finally(()=>s(!1)))},[e,r,d,g,n]),p=()=>{s(!0),ka.linkIdentifier(r,u).then(l).finally(()=>s(!1))};return k.useEffect(()=>{E===mn.CAMERA&&r&&!a&&l()},[r,a,E,g,l]),T.jsxs(T.Fragment,{children:[T.jsx(co,{dataSetter:i,type:E,label:n("contactIdentifier")}),E===mn.HAND_SCANNER&&T.jsx("div",{className:"pt-3",children:T.jsx(gt,{type:"submit",label:n("submit"),onClick:l,disabled:a})}),T.jsx(Er,{isOpen:c,title:n("linkContact"),onClose:()=>h(!1),children:T.jsxs("div",{className:"flex min-w-[600px] flex-col gap-3",children:[T.jsx("p",{children:n("fillInXBelow",{x:n("emailAddress").toLowerCase()})}),T.jsx(wr,{autoFocus:!0,id:"email-input",name:"email",label:n("emailAddress"),type:"email",onChange:(f,m)=>w(m)}),T.jsx("div",{children:T.jsx(gt,{type:"submit",label:n("linkContact"),onClick:p,disabled:a})})]})})]})}function co({dataSetter:e,type:t=mn.CAMERA,label:n=""}){const{t:r}=mt(),i=a=>{e(a[0].rawValue)};return t===mn.HAND_SCANNER?T.jsxs("div",{className:"flex flex-col gap-3",children:[T.jsx("p",{children:r("fillInXBelow",{x:n.toLowerCase()})}),T.jsx(wr,{id:`${n}-input`,name:n,label:n,type:"text",onChange:(a,s)=>e(s),autoFocus:!0})]}):T.jsx(oy,{label:n,onScan:i})}var Kl={},tn={};Object.defineProperty(tn,"__esModule",{value:!0}),tn.compactObject=Wl,tn.deprecated=Km;var jm=tn.detectBrowser=Qm;tn.disableLog=Um,tn.disableWarnings=Gm,tn.extractVersion=fo,tn.filterStats=$m,tn.log=Ym,tn.walkStats=ho,tn.wrapPeerConnectionEvent=qm;function Lm(e,t,n){return t=_m(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _m(e){var t=Vm(e,"string");return Qn(t)=="symbol"?t:t+""}function Vm(e,t){if(Qn(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Qn(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Qn(e){"@babel/helpers - typeof";return Qn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(e)}var Ql=!0,$l=!0;function fo(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function qm(e,t,n){if(e.RTCPeerConnection){var r=e.RTCPeerConnection.prototype,i=r.addEventListener;r.addEventListener=function(s,c){if(s!==t)return i.apply(this,arguments);var h=function(d){var E=n(d);E&&(c.handleEvent?c.handleEvent(E):c(E))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(c,h),i.apply(this,[s,h])};var a=r.removeEventListener;r.removeEventListener=function(s,c){if(s!==t||!this._eventMap||!this._eventMap[t])return a.apply(this,arguments);if(!this._eventMap[t].has(c))return a.apply(this,arguments);var h=this._eventMap[t].get(c);return this._eventMap[t].delete(c),this._eventMap[t].size===0&&delete this._eventMap[t],Object.keys(this._eventMap).length===0&&delete this._eventMap,a.apply(this,[s,h])},Object.defineProperty(r,"on"+t,{get:function(){return this["_on"+t]},set:function(c){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),c&&this.addEventListener(t,this["_on"+t]=c)},enumerable:!0,configurable:!0})}}function Um(e){return typeof e!="boolean"?new Error("Argument type: "+Qn(e)+". Please use a boolean."):(Ql=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function Gm(e){return typeof e!="boolean"?new Error("Argument type: "+Qn(e)+". Please use a boolean."):($l=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function Ym(){if((typeof window>"u"?"undefined":Qn(window))==="object"){if(Ql)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function Km(e,t){$l&&console.warn(e+" is deprecated, please use "+t+" instead.")}function Qm(e){var t={browser:null,version:null};if(typeof e>"u"||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;var n=e.navigator;if(n.userAgentData&&n.userAgentData.brands){var r=n.userAgentData.brands.find(function(i){return i.brand==="Chromium"});if(r)return{browser:"chrome",version:parseInt(r.version,10)}}if(n.mozGetUserMedia)t.browser="firefox",t.version=fo(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=fo(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.RTCPeerConnection&&n.userAgent.match(/AppleWebKit\/(\d+)\./))t.browser="safari",t.version=fo(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype;else return t.browser="Not a supported browser.",t;return t}function Hl(e){return Object.prototype.toString.call(e)==="[object Object]"}function Wl(e){return Hl(e)?Object.keys(e).reduce(function(t,n){var r=Hl(e[n]),i=r?Wl(e[n]):e[n],a=r&&!Object.keys(i).length;return i===void 0||a?t:Object.assign(t,Lm({},n,i))},{}):e}function ho(e,t,n){!t||n.has(t.id)||(n.set(t.id,t),Object.keys(t).forEach(function(r){r.endsWith("Id")?ho(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach(function(i){ho(e,e.get(i),n)})}))}function $m(e,t,n){var r=n?"outbound-rtp":"inbound-rtp",i=new Map;if(t===null)return i;var a=[];return e.forEach(function(s){s.type==="track"&&s.trackIdentifier===t.id&&a.push(s)}),a.forEach(function(s){e.forEach(function(c){c.type===r&&c.trackId===s.id&&ho(e,c,i)})}),i}Object.defineProperty(Kl,"__esModule",{value:!0});var Hm=Kl.shimGetUserMedia=zm,Wm=Jm(tn);function Jl(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Jl=function(i){return i?n:t})(e)}function Jm(e,t){if(e&&e.__esModule)return e;if(e===null||$n(e)!="object"&&typeof e!="function")return{default:e};var n=Jl(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&{}.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function $n(e){"@babel/helpers - typeof";return $n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$n(e)}var zl=Wm.log;function zm(e,t){var n=e&&e.navigator;if(n.mediaDevices){var r=function(g){if($n(g)!=="object"||g.mandatory||g.optional)return g;var d={};return Object.keys(g).forEach(function(E){if(!(E==="require"||E==="advanced"||E==="mediaSource")){var u=$n(g[E])==="object"?g[E]:{ideal:g[E]};u.exact!==void 0&&typeof u.exact=="number"&&(u.min=u.max=u.exact);var w=function(p,f){return p?p+f.charAt(0).toUpperCase()+f.slice(1):f==="deviceId"?"sourceId":f};if(u.ideal!==void 0){d.optional=d.optional||[];var o={};typeof u.ideal=="number"?(o[w("min",E)]=u.ideal,d.optional.push(o),o={},o[w("max",E)]=u.ideal,d.optional.push(o)):(o[w("",E)]=u.ideal,d.optional.push(o))}u.exact!==void 0&&typeof u.exact!="number"?(d.mandatory=d.mandatory||{},d.mandatory[w("",E)]=u.exact):["min","max"].forEach(function(l){u[l]!==void 0&&(d.mandatory=d.mandatory||{},d.mandatory[w(l,E)]=u[l])})}}),g.advanced&&(d.optional=(d.optional||[]).concat(g.advanced)),d},i=function(g,d){if(t.version>=61)return d(g);if(g=JSON.parse(JSON.stringify(g)),g&&$n(g.audio)==="object"){var E=function(p,f,m){f in p&&!(m in p)&&(p[m]=p[f],delete p[f])};g=JSON.parse(JSON.stringify(g)),E(g.audio,"autoGainControl","googAutoGainControl"),E(g.audio,"noiseSuppression","googNoiseSuppression"),g.audio=r(g.audio)}if(g&&$n(g.video)==="object"){var u=g.video.facingMode;u=u&&($n(u)==="object"?u:{ideal:u});var w=t.version<66;if(u&&(u.exact==="user"||u.exact==="environment"||u.ideal==="user"||u.ideal==="environment")&&!(n.mediaDevices.getSupportedConstraints&&n.mediaDevices.getSupportedConstraints().facingMode&&!w)){delete g.video.facingMode;var o;if(u.exact==="environment"||u.ideal==="environment"?o=["back","rear"]:(u.exact==="user"||u.ideal==="user")&&(o=["front"]),o)return n.mediaDevices.enumerateDevices().then(function(l){l=l.filter(function(f){return f.kind==="videoinput"});var p=l.find(function(f){return o.some(function(m){return f.label.toLowerCase().includes(m)})});return!p&&l.length&&o.includes("back")&&(p=l[l.length-1]),p&&(g.video.deviceId=u.exact?{exact:p.deviceId}:{ideal:p.deviceId}),g.video=r(g.video),zl("chrome: "+JSON.stringify(g)),d(g)})}g.video=r(g.video)}return zl("chrome: "+JSON.stringify(g)),d(g)},a=function(g){return t.version>=64?g:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[g.name]||g.name,message:g.message,constraint:g.constraint||g.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}},s=function(g,d,E){i(g,function(u){n.webkitGetUserMedia(u,d,function(w){E&&E(a(w))})})};if(n.getUserMedia=s.bind(n),n.mediaDevices.getUserMedia){var c=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(h){return i(h,function(g){return c(g).then(function(d){if(g.audio&&!d.getAudioTracks().length||g.video&&!d.getVideoTracks().length)throw d.getTracks().forEach(function(E){E.stop()}),new DOMException("","NotFoundError");return d},function(d){return Promise.reject(a(d))})})}}}}var Zl={};Object.defineProperty(Zl,"__esModule",{value:!0});var Zm=Zl.shimGetUserMedia=t0,Xm=e0(tn);function Xl(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(Xl=function(i){return i?n:t})(e)}function e0(e,t){if(e&&e.__esModule)return e;if(e===null||xr(e)!="object"&&typeof e!="function")return{default:e};var n=Xl(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&{}.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function xr(e){"@babel/helpers - typeof";return xr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xr(e)}function t0(e,t){var n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(h,g,d){Xm.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(h).then(g,d)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){var i=function(g,d,E){d in g&&!(E in g)&&(g[E]=g[d],delete g[d])},a=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(h){return xr(h)==="object"&&xr(h.audio)==="object"&&(h=JSON.parse(JSON.stringify(h)),i(h.audio,"autoGainControl","mozAutoGainControl"),i(h.audio,"noiseSuppression","mozNoiseSuppression")),a(h)},r&&r.prototype.getSettings){var s=r.prototype.getSettings;r.prototype.getSettings=function(){var h=s.apply(this,arguments);return i(h,"mozAutoGainControl","autoGainControl"),i(h,"mozNoiseSuppression","noiseSuppression"),h}}if(r&&r.prototype.applyConstraints){var c=r.prototype.applyConstraints;r.prototype.applyConstraints=function(h){return this.kind==="audio"&&xr(h)==="object"&&(h=JSON.parse(JSON.stringify(h)),i(h,"autoGainControl","mozAutoGainControl"),i(h,"noiseSuppression","mozNoiseSuppression")),c.apply(this,[h])}}}}var Dn={};Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.shimAudioContext=f0,Dn.shimCallbacksAPI=a0,Dn.shimConstraints=nc,Dn.shimCreateOfferLegacy=c0;var n0=Dn.shimGetUserMedia=s0;Dn.shimLocalStreamsAPI=i0,Dn.shimRTCIceServerUrls=u0,Dn.shimRemoteStreamsAPI=o0,Dn.shimTrackEventTransceiver=l0;var ec=r0(tn);function tc(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(tc=function(i){return i?n:t})(e)}function r0(e,t){if(e&&e.__esModule)return e;if(e===null||Hn(e)!="object"&&typeof e!="function")return{default:e};var n=tc(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&{}.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function Hn(e){"@babel/helpers - typeof";return Hn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hn(e)}function i0(e){if(!(Hn(e)!=="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){var t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(r){var i=this;this._localStreams||(this._localStreams=[]),this._localStreams.includes(r)||this._localStreams.push(r),r.getAudioTracks().forEach(function(a){return t.call(i,a,r)}),r.getVideoTracks().forEach(function(a){return t.call(i,a,r)})},e.RTCPeerConnection.prototype.addTrack=function(r){for(var i=this,a=arguments.length,s=new Array(a>1?a-1:0),c=1;c<a;c++)s[c-1]=arguments[c];return s&&s.forEach(function(h){i._localStreams?i._localStreams.includes(h)||i._localStreams.push(h):i._localStreams=[h]}),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(r){var i=this;this._localStreams||(this._localStreams=[]);var a=this._localStreams.indexOf(r);if(a!==-1){this._localStreams.splice(a,1);var s=r.getTracks();this.getSenders().forEach(function(c){s.includes(c.track)&&i.removeTrack(c)})}})}}function o0(e){if(!(Hn(e)!=="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(r){var i=this;this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=r),this.addEventListener("track",this._onaddstreampoly=function(a){a.streams.forEach(function(s){if(i._remoteStreams||(i._remoteStreams=[]),!i._remoteStreams.includes(s)){i._remoteStreams.push(s);var c=new Event("addstream");c.stream=s,i.dispatchEvent(c)}})})}});var t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){var r=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(i){i.streams.forEach(function(a){if(r._remoteStreams||(r._remoteStreams=[]),!(r._remoteStreams.indexOf(a)>=0)){r._remoteStreams.push(a);var s=new Event("addstream");s.stream=a,r.dispatchEvent(s)}})}),t.apply(r,arguments)}}}function a0(e){if(!(Hn(e)!=="object"||!e.RTCPeerConnection)){var t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,i=t.setLocalDescription,a=t.setRemoteDescription,s=t.addIceCandidate;t.createOffer=function(g,d){var E=arguments.length>=2?arguments[2]:arguments[0],u=n.apply(this,[E]);return d?(u.then(g,d),Promise.resolve()):u},t.createAnswer=function(g,d){var E=arguments.length>=2?arguments[2]:arguments[0],u=r.apply(this,[E]);return d?(u.then(g,d),Promise.resolve()):u};var c=function(g,d,E){var u=i.apply(this,[g]);return E?(u.then(d,E),Promise.resolve()):u};t.setLocalDescription=c,c=function(g,d,E){var u=a.apply(this,[g]);return E?(u.then(d,E),Promise.resolve()):u},t.setRemoteDescription=c,c=function(g,d,E){var u=s.apply(this,[g]);return E?(u.then(d,E),Promise.resolve()):u},t.addIceCandidate=c}}function s0(e){var t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){var n=t.mediaDevices,r=n.getUserMedia.bind(n);t.mediaDevices.getUserMedia=function(i){return r(nc(i))}}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=(function(a,s,c){t.mediaDevices.getUserMedia(a).then(s,c)}).bind(t))}function nc(e){return e&&e.video!==void 0?Object.assign({},e,{video:ec.compactObject(e.video)}):e}function u0(e){if(e.RTCPeerConnection){var t=e.RTCPeerConnection;e.RTCPeerConnection=function(r,i){if(r&&r.iceServers){for(var a=[],s=0;s<r.iceServers.length;s++){var c=r.iceServers[s];c.urls===void 0&&c.url?(ec.deprecated("RTCIceServer.url","RTCIceServer.urls"),c=JSON.parse(JSON.stringify(c)),c.urls=c.url,delete c.url,a.push(c)):a.push(r.iceServers[s])}r.iceServers=a}return new t(r,i)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return t.generateCertificate}})}}function l0(e){Hn(e)==="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})}function c0(e){var t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(r){if(r){typeof r.offerToReceiveAudio<"u"&&(r.offerToReceiveAudio=!!r.offerToReceiveAudio);var i=this.getTransceivers().find(function(s){return s.receiver.track.kind==="audio"});r.offerToReceiveAudio===!1&&i?i.direction==="sendrecv"?i.setDirection?i.setDirection("sendonly"):i.direction="sendonly":i.direction==="recvonly"&&(i.setDirection?i.setDirection("inactive"):i.direction="inactive"):r.offerToReceiveAudio===!0&&!i&&this.addTransceiver("audio",{direction:"recvonly"}),typeof r.offerToReceiveVideo<"u"&&(r.offerToReceiveVideo=!!r.offerToReceiveVideo);var a=this.getTransceivers().find(function(s){return s.receiver.track.kind==="video"});r.offerToReceiveVideo===!1&&a?a.direction==="sendrecv"?a.setDirection?a.setDirection("sendonly"):a.direction="sendonly":a.direction==="recvonly"&&(a.setDirection?a.setDirection("inactive"):a.direction="inactive"):r.offerToReceiveVideo===!0&&!a&&this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function f0(e){Hn(e)!=="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var rc=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},ic=(e,t,n)=>(rc(e,t,"read from private field"),n?n.call(e):t.get(e)),d0=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},h0=(e,t,n,r)=>(rc(e,t,"write to private field"),t.set(e,n),n);const oc=["Aztec","Codabar","Code128","Code39","Code93","DataBar","DataBarExpanded","DataMatrix","DXFilmEdge","EAN-13","EAN-8","ITF","Linear-Codes","Matrix-Codes","MaxiCode","MicroQRCode","None","PDF417","QRCode","rMQRCode","UPC-A","UPC-E"];function p0(e){return e.join("|")}function g0(e){const t=ac(e);let n=0,r=oc.length-1;for(;n<=r;){const i=Math.floor((n+r)/2),a=oc[i],s=ac(a);if(s===t)return a;s<t?n=i+1:r=i-1}return"None"}function ac(e){return e.toLowerCase().replace(/_-\[\]/g,"")}function m0(e,t){return e.Binarizer[t]}function y0(e,t){return e.CharacterSet[t]}const v0=["Text","Binary","Mixed","GS1","ISO15434","UnknownECI"];function b0(e){return v0[e.value]}function w0(e,t){return e.EanAddOnSymbol[t]}function E0(e,t){return e.TextMode[t]}const Cr={formats:[],tryHarder:!0,tryRotate:!0,tryInvert:!0,tryDownscale:!0,binarizer:"LocalAverage",isPure:!1,downscaleFactor:3,downscaleThreshold:500,minLineCount:2,maxNumberOfSymbols:255,tryCode39ExtendedMode:!1,validateCode39CheckSum:!1,validateITFCheckSum:!1,returnCodabarStartEnd:!1,returnErrors:!1,eanAddOnSymbol:"Read",textMode:"Plain",characterSet:"Unknown"};function sc(e,t){return{...t,formats:p0(t.formats),binarizer:m0(e,t.binarizer),eanAddOnSymbol:w0(e,t.eanAddOnSymbol),textMode:E0(e,t.textMode),characterSet:y0(e,t.characterSet)}}function uc(e){return{...e,format:g0(e.format),eccLevel:e.eccLevel,contentType:b0(e.contentType)}}const x0={locateFile:(e,t)=>{const n=e.match(/_(.+?)\.wasm$/);return n?`https://fastly.jsdelivr.net/npm/zxing-wasm@1.2.11/dist/${n[1]}/${e}`:t+e}};let lc=new WeakMap;function Qa(e,t){var n;const r=lc.get(e);if(r!=null&&r.modulePromise&&t===void 0)return r.modulePromise;const i=(n=r==null?void 0:r.moduleOverrides)!=null?n:x0,a=e({...i});return lc.set(e,{moduleOverrides:i,modulePromise:a}),a}async function C0(e,t,n=Cr){const r={...Cr,...n},i=await Qa(e),{size:a}=t,s=new Uint8Array(await t.arrayBuffer()),c=i._malloc(a);i.HEAPU8.set(s,c);const h=i.readBarcodesFromImage(c,a,sc(i,r));i._free(c);const g=[];for(let d=0;d<h.size();++d)g.push(uc(h.get(d)));return g}async function A0(e,t,n=Cr){const r={...Cr,...n},i=await Qa(e),{data:a,width:s,height:c,data:{byteLength:h}}=t,g=i._malloc(h);i.HEAPU8.set(a,g);const d=i.readBarcodesFromPixmap(g,s,c,sc(i,r));i._free(g);const E=[];for(let u=0;u<d.size();++u)E.push(uc(d.get(u)));return E}({...Cr,formats:[...Cr.formats]});var $a=(()=>{var e=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return function(t={}){var n,r=t,i,a;r.ready=new Promise((v,y)=>{i=v,a=y});var s=Object.assign({},r),c="./this.program",h=typeof window=="object",g=typeof Bun<"u",d=typeof((n=globalThis.WebAssembly)==null?void 0:n.instantiate)=="function",E=typeof importScripts=="function";typeof process=="object"&&typeof process.versions=="object"&&process.versions.node;var u="";function w(v){return r.locateFile?r.locateFile(v,u):u+v}var o;(h||E||g)&&(E?u=self.location.href:typeof document<"u"&&document.currentScript&&(u=document.currentScript.src),e&&(u=e),u.startsWith("blob:")?u="":u=u.substr(0,u.replace(/[?#].*/,"").lastIndexOf("/")+1),E&&(o=v=>{var y=new XMLHttpRequest;return y.open("GET",v,!1),y.responseType="arraybuffer",y.send(null),new Uint8Array(y.response)}));var l=r.print||console.log.bind(console),p=r.printErr||console.error.bind(console);Object.assign(r,s),s=null,r.arguments&&r.arguments,r.thisProgram&&(c=r.thisProgram),r.quit&&r.quit;var f;r.wasmBinary&&(f=r.wasmBinary);var m,b=!1,C,S,D,A,N,I,_,Q;function $(){var v=m.buffer;r.HEAP8=C=new Int8Array(v),r.HEAP16=D=new Int16Array(v),r.HEAPU8=S=new Uint8Array(v),r.HEAPU16=A=new Uint16Array(v),r.HEAP32=N=new Int32Array(v),r.HEAPU32=I=new Uint32Array(v),r.HEAPF32=_=new Float32Array(v),r.HEAPF64=Q=new Float64Array(v)}var V=[],K=[],R=[];function U(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)ne(r.preRun.shift());ee(V)}function W(){ee(K)}function z(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)ae(r.postRun.shift());ee(R)}function ne(v){V.unshift(v)}function re(v){K.unshift(v)}function ae(v){R.unshift(v)}var ge=0,le=null;function xe(v){var y;ge++,(y=r.monitorRunDependencies)===null||y===void 0||y.call(r,ge)}function ce(v){var y;if(ge--,(y=r.monitorRunDependencies)===null||y===void 0||y.call(r,ge),ge==0&&le){var O=le;le=null,O()}}function q(v){var y;(y=r.onAbort)===null||y===void 0||y.call(r,v),v="Aborted("+v+")",p(v),b=!0,v+=". Build with -sASSERTIONS for more info.";var O=new WebAssembly.RuntimeError(v);throw a(O),O}var G="data:application/octet-stream;base64,",Z=v=>v.startsWith(G),x;x="zxing_reader.wasm",Z(x)||(x=w(x));function M(v){if(v==x&&f)return new Uint8Array(f);if(o)return o(v);throw"both async and sync fetching of the wasm failed"}function j(v){return!f&&(h||E||g||d)&&typeof fetch=="function"?fetch(v,{credentials:"same-origin"}).then(y=>{if(!y.ok)throw`failed to load wasm binary file at '${v}'`;return y.arrayBuffer()}).catch(()=>M(v)):Promise.resolve().then(()=>M(v))}function B(v,y,O){return j(v).then(P=>WebAssembly.instantiate(P,y)).then(O,P=>{p(`failed to asynchronously prepare wasm: ${P}`),q(P)})}function X(v,y,O,P){return!v&&typeof WebAssembly.instantiateStreaming=="function"&&!Z(y)&&typeof fetch=="function"?fetch(y,{credentials:"same-origin"}).then(H=>{var oe=WebAssembly.instantiateStreaming(H,O);return oe.then(P,function(se){return p(`wasm streaming compile failed: ${se}`),p("falling back to ArrayBuffer instantiation"),B(y,O,P)})}):B(y,O,P)}function te(){var v={a:NE};function y(P,H){return It=P.exports,m=It.ma,$(),Qd=It.qa,re(It.na),ce(),It}xe();function O(P){y(P.instance)}if(r.instantiateWasm)try{return r.instantiateWasm(v,y)}catch(P){p(`Module.instantiateWasm callback failed with error: ${P}`),a(P)}return X(f,x,v,O).catch(a),{}}var ee=v=>{for(;v.length>0;)v.shift()(r)};r.noExitRuntime;var Y=[],ve=0,Ee=v=>{var y=new Oe(v);return y.get_caught()||(y.set_caught(!0),ve--),y.set_rethrown(!1),Y.push(y),sh(y.excPtr),y.get_exception_ptr()},fe=0,pe=()=>{wt(0,0);var v=Y.pop();ah(v.excPtr),fe=0};class Oe{constructor(y){this.excPtr=y,this.ptr=y-24}set_type(y){I[this.ptr+4>>2]=y}get_type(){return I[this.ptr+4>>2]}set_destructor(y){I[this.ptr+8>>2]=y}get_destructor(){return I[this.ptr+8>>2]}set_caught(y){y=y?1:0,C[this.ptr+12]=y}get_caught(){return C[this.ptr+12]!=0}set_rethrown(y){y=y?1:0,C[this.ptr+13]=y}get_rethrown(){return C[this.ptr+13]!=0}init(y,O){this.set_adjusted_ptr(0),this.set_type(y),this.set_destructor(O)}set_adjusted_ptr(y){I[this.ptr+16>>2]=y}get_adjusted_ptr(){return I[this.ptr+16>>2]}get_exception_ptr(){var y=lh(this.get_type());if(y)return I[this.excPtr>>2];var O=this.get_adjusted_ptr();return O!==0?O:this.excPtr}}var me=v=>{throw fe||(fe=v),fe},Ne=v=>{var y=fe;if(!y)return ki(0),0;var O=new Oe(y);O.set_adjusted_ptr(y);var P=O.get_type();if(!P)return ki(0),y;for(var H in v){var oe=v[H];if(oe===0||oe===P)break;var se=O.ptr+16;if(uh(oe,P,se))return ki(oe),y}return ki(P),y},Fe=()=>Ne([]),ze=v=>Ne([v]),We=(v,y)=>Ne([v,y]),nt=()=>{var v=Y.pop();v||q("no exception to throw");var y=v.excPtr;throw v.get_rethrown()||(Y.push(v),v.set_rethrown(!0),v.set_caught(!1),ve++),fe=y,fe},ot=(v,y,O)=>{var P=new Oe(v);throw P.init(y,O),fe=v,ve++,fe},$t=()=>ve,rt={},dt=v=>{for(;v.length;){var y=v.pop(),O=v.pop();O(y)}};function at(v){return this.fromWireType(I[v>>2])}var ke={},jt={},vt={},_t,bt=v=>{throw new _t(v)},Vt=(v,y,O)=>{v.forEach(function(ue){vt[ue]=y});function P(ue){var we=O(ue);we.length!==v.length&&bt("Mismatched type converter count");for(var Se=0;Se<v.length;++Se)ie(v[Se],we[Se])}var H=new Array(y.length),oe=[],se=0;y.forEach((ue,we)=>{jt.hasOwnProperty(ue)?H[we]=jt[ue]:(oe.push(ue),ke.hasOwnProperty(ue)||(ke[ue]=[]),ke[ue].push(()=>{H[we]=jt[ue],++se,se===oe.length&&P(H)}))}),oe.length===0&&P(H)},Ut=v=>{var y=rt[v];delete rt[v];var O=y.rawConstructor,P=y.rawDestructor,H=y.fields,oe=H.map(se=>se.getterReturnType).concat(H.map(se=>se.setterArgumentType));Vt([v],oe,se=>{var ue={};return H.forEach((we,Se)=>{var Ie=we.fieldName,Je=se[Se],Ye=we.getter,it=we.getterContext,Pt=se[Se+H.length],Wt=we.setter,Et=we.setterContext;ue[Ie]={read:Kt=>Je.fromWireType(Ye(it,Kt)),write:(Kt,Ce)=>{var Be=[];Wt(Et,Kt,Pt.toWireType(Be,Ce)),dt(Be)}}}),[{name:y.name,fromWireType:we=>{var Se={};for(var Ie in ue)Se[Ie]=ue[Ie].read(we);return P(we),Se},toWireType:(we,Se)=>{for(var Ie in ue)if(!(Ie in Se))throw new TypeError(`Missing field: "${Ie}"`);var Je=O();for(Ie in ue)ue[Ie].write(Je,Se[Ie]);return we!==null&&we.push(P,Je),Je},argPackAdvance:he,readValueFromPointer:at,destructorFunction:P}]})},zt=(v,y,O,P,H)=>{},Gt=()=>{for(var v=new Array(256),y=0;y<256;++y)v[y]=String.fromCharCode(y);Yt=v},Yt,ht=v=>{for(var y="",O=v;S[O];)y+=Yt[S[O++]];return y},rn,F=v=>{throw new rn(v)};function J(v,y){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};var P=y.name;if(v||F(`type "${P}" must have a positive integer typeid pointer`),jt.hasOwnProperty(v)){if(O.ignoreDuplicateRegistrations)return;F(`Cannot register type '${P}' twice`)}if(jt[v]=y,delete vt[v],ke.hasOwnProperty(v)){var H=ke[v];delete ke[v],H.forEach(oe=>oe())}}function ie(v,y){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!("argPackAdvance"in y))throw new TypeError("registerType registeredInstance requires argPackAdvance");return J(v,y,O)}var he=8,Ae=(v,y,O,P)=>{y=ht(y),ie(v,{name:y,fromWireType:function(H){return!!H},toWireType:function(H,oe){return oe?O:P},argPackAdvance:he,readValueFromPointer:function(H){return this.fromWireType(S[H])},destructorFunction:null})},Ve=v=>({count:v.count,deleteScheduled:v.deleteScheduled,preservePointerOnDelete:v.preservePointerOnDelete,ptr:v.ptr,ptrType:v.ptrType,smartPtr:v.smartPtr,smartPtrType:v.smartPtrType}),Pe=v=>{function y(O){return O.$$.ptrType.registeredClass.name}F(y(v)+" instance already deleted")},Re=!1,Ge=v=>{},Ue=v=>{v.smartPtr?v.smartPtrType.rawDestructor(v.smartPtr):v.ptrType.registeredClass.rawDestructor(v.ptr)},At=v=>{v.count.value-=1;var y=v.count.value===0;y&&Ue(v)},St=(v,y,O)=>{if(y===O)return v;if(O.baseClass===void 0)return null;var P=St(v,y,O.baseClass);return P===null?null:O.downcast(P)},_e={},L=()=>Object.keys(je).length,ye=()=>{var v=[];for(var y in je)je.hasOwnProperty(y)&&v.push(je[y]);return v},De=[],Me=()=>{for(;De.length;){var v=De.pop();v.$$.deleteScheduled=!1,v.delete()}},Qe,et=v=>{Qe=v,De.length&&Qe&&Qe(Me)},$e=()=>{r.getInheritedInstanceCount=L,r.getLiveInheritedInstances=ye,r.flushPendingDeletes=Me,r.setDelayFunction=et},je={},Tt=(v,y)=>{for(y===void 0&&F("ptr should not be undefined");v.baseClass;)y=v.upcast(y),v=v.baseClass;return y},ct=(v,y)=>(y=Tt(v,y),je[y]),ut=(v,y)=>{(!y.ptrType||!y.ptr)&&bt("makeClassHandle requires ptr and ptrType");var O=!!y.smartPtrType,P=!!y.smartPtr;return O!==P&&bt("Both smartPtrType and smartPtr must be specified"),y.count={value:1},ft(Object.create(v,{$$:{value:y,writable:!0}}))};function qe(v){var y=this.getPointee(v);if(!y)return this.destructor(v),null;var O=ct(this.registeredClass,y);if(O!==void 0){if(O.$$.count.value===0)return O.$$.ptr=y,O.$$.smartPtr=v,O.clone();var P=O.clone();return this.destructor(v),P}function H(){return this.isSmartPointer?ut(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:y,smartPtrType:this,smartPtr:v}):ut(this.registeredClass.instancePrototype,{ptrType:this,ptr:v})}var oe=this.registeredClass.getActualType(y),se=_e[oe];if(!se)return H.call(this);var ue;this.isConst?ue=se.constPointerType:ue=se.pointerType;var we=St(y,this.registeredClass,ue.registeredClass);return we===null?H.call(this):this.isSmartPointer?ut(ue.registeredClass.instancePrototype,{ptrType:ue,ptr:we,smartPtrType:this,smartPtr:v}):ut(ue.registeredClass.instancePrototype,{ptrType:ue,ptr:we})}var ft=v=>typeof FinalizationRegistry>"u"?(ft=y=>y,v):(Re=new FinalizationRegistry(y=>{At(y.$$)}),ft=y=>{var O=y.$$,P=!!O.smartPtr;if(P){var H={$$:O};Re.register(y,H,y)}return y},Ge=y=>Re.unregister(y),ft(v)),Ot=()=>{Object.assign(Ze.prototype,{isAliasOf(v){if(!(this instanceof Ze)||!(v instanceof Ze))return!1;var y=this.$$.ptrType.registeredClass,O=this.$$.ptr;v.$$=v.$$;for(var P=v.$$.ptrType.registeredClass,H=v.$$.ptr;y.baseClass;)O=y.upcast(O),y=y.baseClass;for(;P.baseClass;)H=P.upcast(H),P=P.baseClass;return y===P&&O===H},clone(){if(this.$$.ptr||Pe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var v=ft(Object.create(Object.getPrototypeOf(this),{$$:{value:Ve(this.$$)}}));return v.$$.count.value+=1,v.$$.deleteScheduled=!1,v},delete(){this.$$.ptr||Pe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&F("Object already scheduled for deletion"),Ge(this),At(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Pe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&F("Object already scheduled for deletion"),De.push(this),De.length===1&&Qe&&Qe(Me),this.$$.deleteScheduled=!0,this}})};function Ze(){}var Zt=(v,y)=>Object.defineProperty(y,"name",{value:v}),fr=(v,y,O)=>{if(v[y].overloadTable===void 0){var P=v[y];v[y]=function(){for(var H=arguments.length,oe=new Array(H),se=0;se<H;se++)oe[se]=arguments[se];return v[y].overloadTable.hasOwnProperty(oe.length)||F(`Function '${O}' called with an invalid number of arguments (${oe.length}) - expects one of (${v[y].overloadTable})!`),v[y].overloadTable[oe.length].apply(this,oe)},v[y].overloadTable=[],v[y].overloadTable[P.argCount]=P}},dr=(v,y,O)=>{r.hasOwnProperty(v)?((O===void 0||r[v].overloadTable!==void 0&&r[v].overloadTable[O]!==void 0)&&F(`Cannot register public name '${v}' twice`),fr(r,v,v),r.hasOwnProperty(O)&&F(`Cannot register multiple overloads of a function with the same number of arguments (${O})!`),r[v].overloadTable[O]=y):(r[v]=y,O!==void 0&&(r[v].numArguments=O))},fw=48,dw=57,hw=v=>{if(v===void 0)return"_unknown";v=v.replace(/[^a-zA-Z0-9_]/g,"$");var y=v.charCodeAt(0);return y>=fw&&y<=dw?`_${v}`:v};function pw(v,y,O,P,H,oe,se,ue){this.name=v,this.constructor=y,this.instancePrototype=O,this.rawDestructor=P,this.baseClass=H,this.getActualType=oe,this.upcast=se,this.downcast=ue,this.pureVirtualFunctions=[]}var zs=(v,y,O)=>{for(;y!==O;)y.upcast||F(`Expected null or instance of ${O.name}, got an instance of ${y.name}`),v=y.upcast(v),y=y.baseClass;return v};function gw(v,y){if(y===null)return this.isReference&&F(`null is not a valid ${this.name}`),0;y.$$||F(`Cannot pass "${ru(y)}" as a ${this.name}`),y.$$.ptr||F(`Cannot pass deleted object as a pointer of type ${this.name}`);var O=y.$$.ptrType.registeredClass,P=zs(y.$$.ptr,O,this.registeredClass);return P}function mw(v,y){var O;if(y===null)return this.isReference&&F(`null is not a valid ${this.name}`),this.isSmartPointer?(O=this.rawConstructor(),v!==null&&v.push(this.rawDestructor,O),O):0;(!y||!y.$$)&&F(`Cannot pass "${ru(y)}" as a ${this.name}`),y.$$.ptr||F(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&y.$$.ptrType.isConst&&F(`Cannot convert argument of type ${y.$$.smartPtrType?y.$$.smartPtrType.name:y.$$.ptrType.name} to parameter type ${this.name}`);var P=y.$$.ptrType.registeredClass;if(O=zs(y.$$.ptr,P,this.registeredClass),this.isSmartPointer)switch(y.$$.smartPtr===void 0&&F("Passing raw pointer to smart pointer is illegal"),this.sharingPolicy){case 0:y.$$.smartPtrType===this?O=y.$$.smartPtr:F(`Cannot convert argument of type ${y.$$.smartPtrType?y.$$.smartPtrType.name:y.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:O=y.$$.smartPtr;break;case 2:if(y.$$.smartPtrType===this)O=y.$$.smartPtr;else{var H=y.clone();O=this.rawShare(O,Ln.toHandle(()=>H.delete())),v!==null&&v.push(this.rawDestructor,O)}break;default:F("Unsupporting sharing policy")}return O}function yw(v,y){if(y===null)return this.isReference&&F(`null is not a valid ${this.name}`),0;y.$$||F(`Cannot pass "${ru(y)}" as a ${this.name}`),y.$$.ptr||F(`Cannot pass deleted object as a pointer of type ${this.name}`),y.$$.ptrType.isConst&&F(`Cannot convert argument of type ${y.$$.ptrType.name} to parameter type ${this.name}`);var O=y.$$.ptrType.registeredClass,P=zs(y.$$.ptr,O,this.registeredClass);return P}var vw=()=>{Object.assign(Go.prototype,{getPointee(v){return this.rawGetPointee&&(v=this.rawGetPointee(v)),v},destructor(v){var y;(y=this.rawDestructor)===null||y===void 0||y.call(this,v)},argPackAdvance:he,readValueFromPointer:at,fromWireType:qe})};function Go(v,y,O,P,H,oe,se,ue,we,Se,Ie){this.name=v,this.registeredClass=y,this.isReference=O,this.isConst=P,this.isSmartPointer=H,this.pointeeType=oe,this.sharingPolicy=se,this.rawGetPointee=ue,this.rawConstructor=we,this.rawShare=Se,this.rawDestructor=Ie,!H&&y.baseClass===void 0?P?(this.toWireType=gw,this.destructorFunction=null):(this.toWireType=yw,this.destructorFunction=null):this.toWireType=mw}var Kd=(v,y,O)=>{r.hasOwnProperty(v)||bt("Replacing nonexistent public symbol"),r[v].overloadTable!==void 0&&O!==void 0?r[v].overloadTable[O]=y:(r[v]=y,r[v].argCount=O)},bw=(v,y,O)=>{var P=r["dynCall_"+v];return P(y,...O)},Yo=[],Qd,Dt=v=>{var y=Yo[v];return y||(v>=Yo.length&&(Yo.length=v+1),Yo[v]=y=Qd.get(v)),y},ww=function(v,y){let O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(v.includes("j"))return bw(v,y,O);var P=Dt(y)(...O);return P},Ew=(v,y)=>function(){for(var O=arguments.length,P=new Array(O),H=0;H<O;H++)P[H]=arguments[H];return ww(v,y,P)},Sn=(v,y)=>{v=ht(v);function O(){return v.includes("j")?Ew(v,y):Dt(y)}var P=O();return typeof P!="function"&&F(`unknown function pointer with signature ${v}: ${y}`),P},xw=(v,y)=>{var O=Zt(y,function(P){this.name=y,this.message=P;var H=new Error(P).stack;H!==void 0&&(this.stack=this.toString()+`
73
+ `+H.replace(/^Error(:[^\n]*)?\n/,""))});return O.prototype=Object.create(v.prototype),O.prototype.constructor=O,O.prototype.toString=function(){return this.message===void 0?this.name:`${this.name}: ${this.message}`},O},$d,Hd=v=>{var y=oh(v),O=ht(y);return _n(y),O},Ko=(v,y)=>{var O=[],P={};function H(oe){if(!P[oe]&&!jt[oe]){if(vt[oe]){vt[oe].forEach(H);return}O.push(oe),P[oe]=!0}}throw y.forEach(H),new $d(`${v}: `+O.map(Hd).join([", "]))},Cw=(v,y,O,P,H,oe,se,ue,we,Se,Ie,Je,Ye)=>{Ie=ht(Ie),oe=Sn(H,oe),ue&&(ue=Sn(se,ue)),Se&&(Se=Sn(we,Se)),Ye=Sn(Je,Ye);var it=hw(Ie);dr(it,function(){Ko(`Cannot construct ${Ie} due to unbound types`,[P])}),Vt([v,y,O],P?[P]:[],Pt=>{Pt=Pt[0];var Wt,Et;P?(Wt=Pt.registeredClass,Et=Wt.instancePrototype):Et=Ze.prototype;var Kt=Zt(Ie,function(){if(Object.getPrototypeOf(this)!==Ce)throw new rn("Use 'new' to construct "+Ie);if(Be.constructor_body===void 0)throw new rn(Ie+" has no accessible constructor");for(var hh=arguments.length,Wo=new Array(hh),Jo=0;Jo<hh;Jo++)Wo[Jo]=arguments[Jo];var ph=Be.constructor_body[Wo.length];if(ph===void 0)throw new rn(`Tried to invoke ctor of ${Ie} with invalid number of parameters (${Wo.length}) - expected (${Object.keys(Be.constructor_body).toString()}) parameters instead!`);return ph.apply(this,Wo)}),Ce=Object.create(Et,{constructor:{value:Kt}});Kt.prototype=Ce;var Be=new pw(Ie,Kt,Ce,Ye,Wt,oe,ue,Se);if(Be.baseClass){var Mt,qt;(qt=(Mt=Be.baseClass).__derivedClasses)!==null&&qt!==void 0||(Mt.__derivedClasses=[]),Be.baseClass.__derivedClasses.push(Be)}var kr=new Go(Ie,Be,!0,!1,!1),Ho=new Go(Ie+"*",Be,!1,!1,!1),dh=new Go(Ie+" const*",Be,!1,!0,!1);return _e[v]={pointerType:Ho,constPointerType:dh},Kd(it,Kt),[kr,Ho,dh]})},Zs=(v,y)=>{for(var O=[],P=0;P<v;P++)O.push(I[y+P*4>>2]);return O};function Aw(v){for(var y=1;y<v.length;++y)if(v[y]!==null&&v[y].destructorFunction===void 0)return!0;return!1}function Xs(v,y,O,P,H,oe){var se=y.length;se<2&&F("argTypes array size mismatch! Must at least get return value and 'this' types!");var ue=y[1]!==null&&O!==null,we=Aw(y),Se=y[0].name!=="void",Ie=se-2,Je=new Array(Ie),Ye=[],it=[],Pt=function(){arguments.length!==Ie&&F(`function ${v} called with ${arguments.length} arguments, expected ${Ie}`),it.length=0;var Wt;Ye.length=ue?2:1,Ye[0]=H,ue&&(Wt=y[1].toWireType(it,this),Ye[1]=Wt);for(var Et=0;Et<Ie;++Et)Je[Et]=y[Et+2].toWireType(it,Et<0||arguments.length<=Et?void 0:arguments[Et]),Ye.push(Je[Et]);var Kt=P(...Ye);function Ce(Be){if(we)dt(it);else for(var Mt=ue?1:2;Mt<y.length;Mt++){var qt=Mt===1?Wt:Je[Mt-2];y[Mt].destructorFunction!==null&&y[Mt].destructorFunction(qt)}if(Se)return y[0].fromWireType(Be)}return Ce(Kt)};return Zt(v,Pt)}var Sw=(v,y,O,P,H,oe)=>{var se=Zs(y,O);H=Sn(P,H),Vt([],[v],ue=>{ue=ue[0];var we=`constructor ${ue.name}`;if(ue.registeredClass.constructor_body===void 0&&(ue.registeredClass.constructor_body=[]),ue.registeredClass.constructor_body[y-1]!==void 0)throw new rn(`Cannot register multiple constructors with identical number of parameters (${y-1}) for class '${ue.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return ue.registeredClass.constructor_body[y-1]=()=>{Ko(`Cannot construct ${ue.name} due to unbound types`,se)},Vt([],se,Se=>(Se.splice(1,0,null),ue.registeredClass.constructor_body[y-1]=Xs(we,Se,null,H,oe),[])),[]})},Wd=v=>{v=v.trim();const y=v.indexOf("(");return y!==-1?v.substr(0,y):v},Tw=(v,y,O,P,H,oe,se,ue,we)=>{var Se=Zs(O,P);y=ht(y),y=Wd(y),oe=Sn(H,oe),Vt([],[v],Ie=>{Ie=Ie[0];var Je=`${Ie.name}.${y}`;y.startsWith("@@")&&(y=Symbol[y.substring(2)]),ue&&Ie.registeredClass.pureVirtualFunctions.push(y);function Ye(){Ko(`Cannot call ${Je} due to unbound types`,Se)}var it=Ie.registeredClass.instancePrototype,Pt=it[y];return Pt===void 0||Pt.overloadTable===void 0&&Pt.className!==Ie.name&&Pt.argCount===O-2?(Ye.argCount=O-2,Ye.className=Ie.name,it[y]=Ye):(fr(it,y,Je),it[y].overloadTable[O-2]=Ye),Vt([],Se,Wt=>{var Et=Xs(Je,Wt,Ie,oe,se);return it[y].overloadTable===void 0?(Et.argCount=O-2,it[y]=Et):it[y].overloadTable[O-2]=Et,[]}),[]})},eu=[],jn=[],tu=v=>{v>9&&--jn[v+1]===0&&(jn[v]=void 0,eu.push(v))},Ow=()=>jn.length/2-5-eu.length,Dw=()=>{jn.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=Ow},Ln={toValue:v=>(v||F("Cannot use deleted val. handle = "+v),jn[v]),toHandle:v=>{switch(v){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const y=eu.pop()||jn.length;return jn[y]=v,jn[y+1]=1,y}}}},Iw={name:"emscripten::val",fromWireType:v=>{var y=Ln.toValue(v);return tu(v),y},toWireType:(v,y)=>Ln.toHandle(y),argPackAdvance:he,readValueFromPointer:at,destructorFunction:null},Jd=v=>ie(v,Iw),Rw=(v,y,O)=>{switch(y){case 1:return O?function(P){return this.fromWireType(C[P])}:function(P){return this.fromWireType(S[P])};case 2:return O?function(P){return this.fromWireType(D[P>>1])}:function(P){return this.fromWireType(A[P>>1])};case 4:return O?function(P){return this.fromWireType(N[P>>2])}:function(P){return this.fromWireType(I[P>>2])};default:throw new TypeError(`invalid integer width (${y}): ${v}`)}},Nw=(v,y,O,P)=>{y=ht(y);function H(){}H.values={},ie(v,{name:y,constructor:H,fromWireType:function(oe){return this.constructor.values[oe]},toWireType:(oe,se)=>se.value,argPackAdvance:he,readValueFromPointer:Rw(y,O,P),destructorFunction:null}),dr(y,H)},nu=(v,y)=>{var O=jt[v];return O===void 0&&F(`${y} has unknown type ${Hd(v)}`),O},Pw=(v,y,O)=>{var P=nu(v,"enum");y=ht(y);var H=P.constructor,oe=Object.create(P.constructor.prototype,{value:{value:O},constructor:{value:Zt(`${P.name}_${y}`,function(){})}});H.values[O]=oe,H[y]=oe},ru=v=>{if(v===null)return"null";var y=typeof v;return y==="object"||y==="array"||y==="function"?v.toString():""+v},Mw=(v,y)=>{switch(y){case 4:return function(O){return this.fromWireType(_[O>>2])};case 8:return function(O){return this.fromWireType(Q[O>>3])};default:throw new TypeError(`invalid float width (${y}): ${v}`)}},Bw=(v,y,O)=>{y=ht(y),ie(v,{name:y,fromWireType:P=>P,toWireType:(P,H)=>H,argPackAdvance:he,readValueFromPointer:Mw(y,O),destructorFunction:null})},kw=(v,y,O,P,H,oe,se)=>{var ue=Zs(y,O);v=ht(v),v=Wd(v),H=Sn(P,H),dr(v,function(){Ko(`Cannot call ${v} due to unbound types`,ue)},y-1),Vt([],ue,we=>{var Se=[we[0],null].concat(we.slice(1));return Kd(v,Xs(v,Se,null,H,oe),y-1),[]})},Fw=(v,y,O)=>{switch(y){case 1:return O?P=>C[P]:P=>S[P];case 2:return O?P=>D[P>>1]:P=>A[P>>1];case 4:return O?P=>N[P>>2]:P=>I[P>>2];default:throw new TypeError(`invalid integer width (${y}): ${v}`)}},jw=(v,y,O,P,H)=>{y=ht(y);var oe=Ie=>Ie;if(P===0){var se=32-8*O;oe=Ie=>Ie<<se>>>se}var ue=y.includes("unsigned"),we=(Ie,Je)=>{},Se;ue?Se=function(Ie,Je){return we(Je,this.name),Je>>>0}:Se=function(Ie,Je){return we(Je,this.name),Je},ie(v,{name:y,fromWireType:oe,toWireType:Se,argPackAdvance:he,readValueFromPointer:Fw(y,O,P!==0),destructorFunction:null})},Lw=(v,y,O)=>{var P=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],H=P[y];function oe(se){var ue=I[se>>2],we=I[se+4>>2];return new H(C.buffer,we,ue)}O=ht(O),ie(v,{name:O,fromWireType:oe,argPackAdvance:he,readValueFromPointer:oe},{ignoreDuplicateRegistrations:!0})},_w=(v,y)=>{Jd(v)},zd=(v,y,O,P)=>{if(!(P>0))return 0;for(var H=O,oe=O+P-1,se=0;se<v.length;++se){var ue=v.charCodeAt(se);if(ue>=55296&&ue<=57343){var we=v.charCodeAt(++se);ue=65536+((ue&1023)<<10)|we&1023}if(ue<=127){if(O>=oe)break;y[O++]=ue}else if(ue<=2047){if(O+1>=oe)break;y[O++]=192|ue>>6,y[O++]=128|ue&63}else if(ue<=65535){if(O+2>=oe)break;y[O++]=224|ue>>12,y[O++]=128|ue>>6&63,y[O++]=128|ue&63}else{if(O+3>=oe)break;y[O++]=240|ue>>18,y[O++]=128|ue>>12&63,y[O++]=128|ue>>6&63,y[O++]=128|ue&63}}return y[O]=0,O-H},Vw=(v,y,O)=>zd(v,S,y,O),Zd=v=>{for(var y=0,O=0;O<v.length;++O){var P=v.charCodeAt(O);P<=127?y++:P<=2047?y+=2:P>=55296&&P<=57343?(y+=4,++O):y+=3}return y},Xd=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0,eh=(v,y,O)=>{for(var P=y+O,H=y;v[H]&&!(H>=P);)++H;if(H-y>16&&v.buffer&&Xd)return Xd.decode(v.subarray(y,H));for(var oe="";y<H;){var se=v[y++];if(!(se&128)){oe+=String.fromCharCode(se);continue}var ue=v[y++]&63;if((se&224)==192){oe+=String.fromCharCode((se&31)<<6|ue);continue}var we=v[y++]&63;if((se&240)==224?se=(se&15)<<12|ue<<6|we:se=(se&7)<<18|ue<<12|we<<6|v[y++]&63,se<65536)oe+=String.fromCharCode(se);else{var Se=se-65536;oe+=String.fromCharCode(55296|Se>>10,56320|Se&1023)}}return oe},iu=(v,y)=>v?eh(S,v,y):"",qw=(v,y)=>{y=ht(y);var O=y==="std::string";ie(v,{name:y,fromWireType(P){var H=I[P>>2],oe=P+4,se;if(O)for(var ue=oe,we=0;we<=H;++we){var Se=oe+we;if(we==H||S[Se]==0){var Ie=Se-ue,Je=iu(ue,Ie);se===void 0?se=Je:(se+="\0",se+=Je),ue=Se+1}}else{for(var Ye=new Array(H),we=0;we<H;++we)Ye[we]=String.fromCharCode(S[oe+we]);se=Ye.join("")}return _n(P),se},toWireType(P,H){H instanceof ArrayBuffer&&(H=new Uint8Array(H));var oe,se=typeof H=="string";se||H instanceof Uint8Array||H instanceof Uint8ClampedArray||H instanceof Int8Array||F("Cannot pass non-string to std::string"),O&&se?oe=Zd(H):oe=H.length;var ue=su(4+oe+1),we=ue+4;if(I[ue>>2]=oe,O&&se)Vw(H,we,oe+1);else if(se)for(var Se=0;Se<oe;++Se){var Ie=H.charCodeAt(Se);Ie>255&&(_n(we),F("String has UTF-16 code units that do not fit in 8 bits")),S[we+Se]=Ie}else for(var Se=0;Se<oe;++Se)S[we+Se]=H[Se];return P!==null&&P.push(_n,ue),ue},argPackAdvance:he,readValueFromPointer:at,destructorFunction(P){_n(P)}})},th=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0,Uw=(v,y)=>{for(var O=v,P=O>>1,H=P+y/2;!(P>=H)&&A[P];)++P;if(O=P<<1,O-v>32&&th)return th.decode(S.subarray(v,O));for(var oe="",se=0;!(se>=y/2);++se){var ue=D[v+se*2>>1];if(ue==0)break;oe+=String.fromCharCode(ue)}return oe},Gw=(v,y,O)=>{var P;if((P=O)!==null&&P!==void 0||(O=2147483647),O<2)return 0;O-=2;for(var H=y,oe=O<v.length*2?O/2:v.length,se=0;se<oe;++se){var ue=v.charCodeAt(se);D[y>>1]=ue,y+=2}return D[y>>1]=0,y-H},Yw=v=>v.length*2,Kw=(v,y)=>{for(var O=0,P="";!(O>=y/4);){var H=N[v+O*4>>2];if(H==0)break;if(++O,H>=65536){var oe=H-65536;P+=String.fromCharCode(55296|oe>>10,56320|oe&1023)}else P+=String.fromCharCode(H)}return P},Qw=(v,y,O)=>{var P;if((P=O)!==null&&P!==void 0||(O=2147483647),O<4)return 0;for(var H=y,oe=H+O-4,se=0;se<v.length;++se){var ue=v.charCodeAt(se);if(ue>=55296&&ue<=57343){var we=v.charCodeAt(++se);ue=65536+((ue&1023)<<10)|we&1023}if(N[y>>2]=ue,y+=4,y+4>oe)break}return N[y>>2]=0,y-H},$w=v=>{for(var y=0,O=0;O<v.length;++O){var P=v.charCodeAt(O);P>=55296&&P<=57343&&++O,y+=4}return y},Hw=(v,y,O)=>{O=ht(O);var P,H,oe,se;y===2?(P=Uw,H=Gw,se=Yw,oe=ue=>A[ue>>1]):y===4&&(P=Kw,H=Qw,se=$w,oe=ue=>I[ue>>2]),ie(v,{name:O,fromWireType:ue=>{for(var we=I[ue>>2],Se,Ie=ue+4,Je=0;Je<=we;++Je){var Ye=ue+4+Je*y;if(Je==we||oe(Ye)==0){var it=Ye-Ie,Pt=P(Ie,it);Se===void 0?Se=Pt:(Se+="\0",Se+=Pt),Ie=Ye+y}}return _n(ue),Se},toWireType:(ue,we)=>{typeof we!="string"&&F(`Cannot pass non-string to C++ string type ${O}`);var Se=se(we),Ie=su(4+Se+y);return I[Ie>>2]=Se/y,H(we,Ie+4,Se+y),ue!==null&&ue.push(_n,Ie),Ie},argPackAdvance:he,readValueFromPointer:at,destructorFunction(ue){_n(ue)}})},Ww=(v,y,O,P,H,oe)=>{rt[v]={name:ht(y),rawConstructor:Sn(O,P),rawDestructor:Sn(H,oe),fields:[]}},Jw=(v,y,O,P,H,oe,se,ue,we,Se)=>{rt[v].fields.push({fieldName:ht(y),getterReturnType:O,getter:Sn(P,H),getterContext:oe,setterArgumentType:se,setter:Sn(ue,we),setterContext:Se})},zw=(v,y)=>{y=ht(y),ie(v,{isVoid:!0,name:y,argPackAdvance:0,fromWireType:()=>{},toWireType:(O,P)=>{}})},ou=[],Zw=(v,y,O,P)=>(v=ou[v],y=Ln.toValue(y),v(null,y,O,P)),Xw={},eE=v=>{var y=Xw[v];return y===void 0?ht(v):y},nh=()=>{if(typeof globalThis=="object")return globalThis;function v(y){y.$$$embind_global$$$=y;var O=typeof $$$embind_global$$$=="object"&&y.$$$embind_global$$$==y;return O||delete y.$$$embind_global$$$,O}if(typeof $$$embind_global$$$=="object"||(typeof global=="object"&&v(global)?$$$embind_global$$$=global:typeof self=="object"&&v(self)&&($$$embind_global$$$=self),typeof $$$embind_global$$$=="object"))return $$$embind_global$$$;throw Error("unable to get global object.")},tE=v=>v===0?Ln.toHandle(nh()):(v=eE(v),Ln.toHandle(nh()[v])),nE=v=>{var y=ou.length;return ou.push(v),y},rE=(v,y)=>{for(var O=new Array(v),P=0;P<v;++P)O[P]=nu(I[y+P*4>>2],"parameter "+P);return O},iE=Reflect.construct,oE=(v,y,O)=>{var P=[],H=v.toWireType(P,O);return P.length&&(I[y>>2]=Ln.toHandle(P)),H},aE=(v,y,O)=>{var P=rE(v,y),H=P.shift();v--;var oe=new Array(v),se=(we,Se,Ie,Je)=>{for(var Ye=0,it=0;it<v;++it)oe[it]=P[it].readValueFromPointer(Je+Ye),Ye+=P[it].argPackAdvance;var Pt=O===1?iE(Se,oe):Se.apply(we,oe);return oE(H,Ie,Pt)},ue=`methodCaller<(${P.map(we=>we.name).join(", ")}) => ${H.name}>`;return nE(Zt(ue,se))},sE=v=>{v>9&&(jn[v+1]+=1)},uE=v=>{var y=Ln.toValue(v);dt(y),tu(v)},lE=(v,y)=>{v=nu(v,"_emval_take_value");var O=v.readValueFromPointer(y);return Ln.toHandle(O)},cE=()=>{q("")},fE=(v,y,O)=>S.copyWithin(v,y,y+O),dE=()=>2147483648,hE=v=>{var y=m.buffer,O=(v-y.byteLength+65535)/65536;try{return m.grow(O),$(),1}catch{}},pE=v=>{var y=S.length;v>>>=0;var O=dE();if(v>O)return!1;for(var P=(we,Se)=>we+(Se-we%Se)%Se,H=1;H<=4;H*=2){var oe=y*(1+.2/H);oe=Math.min(oe,v+100663296);var se=Math.min(O,P(Math.max(v,oe),65536)),ue=hE(se);if(ue)return!0}return!1},au={},gE=()=>c||"./this.program",Bi=()=>{if(!Bi.strings){var v=(typeof navigator=="object"&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",y={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:v,_:gE()};for(var O in au)au[O]===void 0?delete y[O]:y[O]=au[O];var P=[];for(var O in y)P.push(`${O}=${y[O]}`);Bi.strings=P}return Bi.strings},mE=(v,y)=>{for(var O=0;O<v.length;++O)C[y++]=v.charCodeAt(O);C[y]=0},yE=(v,y)=>{var O=0;return Bi().forEach((P,H)=>{var oe=y+O;I[v+H*4>>2]=oe,mE(P,oe),O+=P.length+1}),0},vE=(v,y)=>{var O=Bi();I[v>>2]=O.length;var P=0;return O.forEach(H=>P+=H.length+1),I[y>>2]=P,0},bE=v=>52;function wE(v,y,O,P,H){return 70}var EE=[null,[],[]],xE=(v,y)=>{var O=EE[v];y===0||y===10?((v===1?l:p)(eh(O,0)),O.length=0):O.push(y)},CE=(v,y,O,P)=>{for(var H=0,oe=0;oe<O;oe++){var se=I[y>>2],ue=I[y+4>>2];y+=8;for(var we=0;we<ue;we++)xE(v,S[se+we]);H+=ue}return I[P>>2]=H,0},AE=v=>v,Qo=v=>v%4===0&&(v%100!==0||v%400===0),SE=(v,y)=>{for(var O=0,P=0;P<=y;O+=v[P++]);return O},rh=[31,29,31,30,31,30,31,31,30,31,30,31],ih=[31,28,31,30,31,30,31,31,30,31,30,31],TE=(v,y)=>{for(var O=new Date(v.getTime());y>0;){var P=Qo(O.getFullYear()),H=O.getMonth(),oe=(P?rh:ih)[H];if(y>oe-O.getDate())y-=oe-O.getDate()+1,O.setDate(1),H<11?O.setMonth(H+1):(O.setMonth(0),O.setFullYear(O.getFullYear()+1));else return O.setDate(O.getDate()+y),O}return O};function OE(v,y,O){var P=Zd(v)+1,H=new Array(P);return zd(v,H,0,H.length),H}var DE=(v,y)=>{C.set(v,y)},IE=(v,y,O,P)=>{var H=I[P+40>>2],oe={tm_sec:N[P>>2],tm_min:N[P+4>>2],tm_hour:N[P+8>>2],tm_mday:N[P+12>>2],tm_mon:N[P+16>>2],tm_year:N[P+20>>2],tm_wday:N[P+24>>2],tm_yday:N[P+28>>2],tm_isdst:N[P+32>>2],tm_gmtoff:N[P+36>>2],tm_zone:H?iu(H):""},se=iu(O),ue={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var we in ue)se=se.replace(new RegExp(we,"g"),ue[we]);var Se=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],Ie=["January","February","March","April","May","June","July","August","September","October","November","December"];function Je(Ce,Be,Mt){for(var qt=typeof Ce=="number"?Ce.toString():Ce||"";qt.length<Be;)qt=Mt[0]+qt;return qt}function Ye(Ce,Be){return Je(Ce,Be,"0")}function it(Ce,Be){function Mt(kr){return kr<0?-1:kr>0?1:0}var qt;return(qt=Mt(Ce.getFullYear()-Be.getFullYear()))===0&&(qt=Mt(Ce.getMonth()-Be.getMonth()))===0&&(qt=Mt(Ce.getDate()-Be.getDate())),qt}function Pt(Ce){switch(Ce.getDay()){case 0:return new Date(Ce.getFullYear()-1,11,29);case 1:return Ce;case 2:return new Date(Ce.getFullYear(),0,3);case 3:return new Date(Ce.getFullYear(),0,2);case 4:return new Date(Ce.getFullYear(),0,1);case 5:return new Date(Ce.getFullYear()-1,11,31);case 6:return new Date(Ce.getFullYear()-1,11,30)}}function Wt(Ce){var Be=TE(new Date(Ce.tm_year+1900,0,1),Ce.tm_yday),Mt=new Date(Be.getFullYear(),0,4),qt=new Date(Be.getFullYear()+1,0,4),kr=Pt(Mt),Ho=Pt(qt);return it(kr,Be)<=0?it(Ho,Be)<=0?Be.getFullYear()+1:Be.getFullYear():Be.getFullYear()-1}var Et={"%a":Ce=>Se[Ce.tm_wday].substring(0,3),"%A":Ce=>Se[Ce.tm_wday],"%b":Ce=>Ie[Ce.tm_mon].substring(0,3),"%B":Ce=>Ie[Ce.tm_mon],"%C":Ce=>{var Be=Ce.tm_year+1900;return Ye(Be/100|0,2)},"%d":Ce=>Ye(Ce.tm_mday,2),"%e":Ce=>Je(Ce.tm_mday,2," "),"%g":Ce=>Wt(Ce).toString().substring(2),"%G":Wt,"%H":Ce=>Ye(Ce.tm_hour,2),"%I":Ce=>{var Be=Ce.tm_hour;return Be==0?Be=12:Be>12&&(Be-=12),Ye(Be,2)},"%j":Ce=>Ye(Ce.tm_mday+SE(Qo(Ce.tm_year+1900)?rh:ih,Ce.tm_mon-1),3),"%m":Ce=>Ye(Ce.tm_mon+1,2),"%M":Ce=>Ye(Ce.tm_min,2),"%n":()=>`
74
+ `,"%p":Ce=>Ce.tm_hour>=0&&Ce.tm_hour<12?"AM":"PM","%S":Ce=>Ye(Ce.tm_sec,2),"%t":()=>" ","%u":Ce=>Ce.tm_wday||7,"%U":Ce=>{var Be=Ce.tm_yday+7-Ce.tm_wday;return Ye(Math.floor(Be/7),2)},"%V":Ce=>{var Be=Math.floor((Ce.tm_yday+7-(Ce.tm_wday+6)%7)/7);if((Ce.tm_wday+371-Ce.tm_yday-2)%7<=2&&Be++,Be){if(Be==53){var Mt=(Ce.tm_wday+371-Ce.tm_yday)%7;Mt!=4&&(Mt!=3||!Qo(Ce.tm_year))&&(Be=1)}}else{Be=52;var qt=(Ce.tm_wday+7-Ce.tm_yday-1)%7;(qt==4||qt==5&&Qo(Ce.tm_year%400-1))&&Be++}return Ye(Be,2)},"%w":Ce=>Ce.tm_wday,"%W":Ce=>{var Be=Ce.tm_yday+7-(Ce.tm_wday+6)%7;return Ye(Math.floor(Be/7),2)},"%y":Ce=>(Ce.tm_year+1900).toString().substring(2),"%Y":Ce=>Ce.tm_year+1900,"%z":Ce=>{var Be=Ce.tm_gmtoff,Mt=Be>=0;return Be=Math.abs(Be)/60,Be=Be/60*100+Be%60,(Mt?"+":"-")+("0000"+Be).slice(-4)},"%Z":Ce=>Ce.tm_zone,"%%":()=>"%"};se=se.replace(/%%/g,"\0\0");for(var we in Et)se.includes(we)&&(se=se.replace(new RegExp(we,"g"),Et[we](oe)));se=se.replace(/\0\0/g,"%");var Kt=OE(se);return Kt.length>y?0:(DE(Kt,v),Kt.length-1)},RE=(v,y,O,P,H)=>IE(v,y,O,P);_t=r.InternalError=class extends Error{constructor(v){super(v),this.name="InternalError"}},Gt(),rn=r.BindingError=class extends Error{constructor(v){super(v),this.name="BindingError"}},Ot(),$e(),vw(),$d=r.UnboundTypeError=xw(Error,"UnboundTypeError"),Dw();var NE={s:Ee,u:pe,b:Fe,g:ze,q:We,K:nt,f:ot,Y:$t,e:me,ha:Ut,U:zt,ba:Ae,fa:Cw,ea:Sw,w:Tw,aa:Jd,x:Nw,h:Pw,O:Bw,P:kw,t:jw,o:Lw,ga:_w,N:qw,C:Hw,A:Ww,ia:Jw,ca:zw,E:Zw,ka:tu,la:tE,M:aE,Q:sE,R:uE,da:lE,B:cE,$:fE,Z:pE,W:yE,X:vE,_:bE,T:wE,L:CE,F:$E,D:FE,G:QE,m:HE,a:PE,d:LE,p:kE,k:KE,I:GE,v:qE,H:YE,z:JE,S:ZE,l:_E,j:jE,c:BE,n:ME,J:UE,r:WE,i:VE,y:zE,ja:AE,V:RE},It=te(),_n=r._free=v=>(_n=r._free=It.oa)(v),su=r._malloc=v=>(su=r._malloc=It.pa)(v),oh=v=>(oh=It.ra)(v),wt=(v,y)=>(wt=It.sa)(v,y),ki=v=>(ki=It.ta)(v),Rt=()=>(Rt=It.ua)(),Nt=v=>(Nt=It.va)(v),ah=v=>(ah=It.wa)(v),sh=v=>(sh=It.xa)(v),uh=(v,y,O)=>(uh=It.ya)(v,y,O),lh=v=>(lh=It.za)(v);r.dynCall_viijii=(v,y,O,P,H,oe,se)=>(r.dynCall_viijii=It.Aa)(v,y,O,P,H,oe,se),r.dynCall_jiji=(v,y,O,P,H)=>(r.dynCall_jiji=It.Ba)(v,y,O,P,H);var ch=r.dynCall_jiiii=(v,y,O,P,H)=>(ch=r.dynCall_jiiii=It.Ca)(v,y,O,P,H);r.dynCall_iiiiij=(v,y,O,P,H,oe,se)=>(r.dynCall_iiiiij=It.Da)(v,y,O,P,H,oe,se),r.dynCall_iiiiijj=(v,y,O,P,H,oe,se,ue,we)=>(r.dynCall_iiiiijj=It.Ea)(v,y,O,P,H,oe,se,ue,we),r.dynCall_iiiiiijj=(v,y,O,P,H,oe,se,ue,we,Se)=>(r.dynCall_iiiiiijj=It.Fa)(v,y,O,P,H,oe,se,ue,we,Se);function PE(v,y){var O=Rt();try{return Dt(v)(y)}catch(P){if(Nt(O),P!==P+0)throw P;wt(1,0)}}function ME(v,y,O,P){var H=Rt();try{Dt(v)(y,O,P)}catch(oe){if(Nt(H),oe!==oe+0)throw oe;wt(1,0)}}function BE(v,y,O){var P=Rt();try{Dt(v)(y,O)}catch(H){if(Nt(P),H!==H+0)throw H;wt(1,0)}}function kE(v,y,O,P){var H=Rt();try{return Dt(v)(y,O,P)}catch(oe){if(Nt(H),oe!==oe+0)throw oe;wt(1,0)}}function FE(v,y,O,P,H){var oe=Rt();try{return Dt(v)(y,O,P,H)}catch(se){if(Nt(oe),se!==se+0)throw se;wt(1,0)}}function jE(v,y){var O=Rt();try{Dt(v)(y)}catch(P){if(Nt(O),P!==P+0)throw P;wt(1,0)}}function LE(v,y,O){var P=Rt();try{return Dt(v)(y,O)}catch(H){if(Nt(P),H!==H+0)throw H;wt(1,0)}}function _E(v){var y=Rt();try{Dt(v)()}catch(O){if(Nt(y),O!==O+0)throw O;wt(1,0)}}function VE(v,y,O,P,H,oe,se,ue,we,Se,Ie){var Je=Rt();try{Dt(v)(y,O,P,H,oe,se,ue,we,Se,Ie)}catch(Ye){if(Nt(Je),Ye!==Ye+0)throw Ye;wt(1,0)}}function qE(v,y,O,P,H,oe,se){var ue=Rt();try{return Dt(v)(y,O,P,H,oe,se)}catch(we){if(Nt(ue),we!==we+0)throw we;wt(1,0)}}function UE(v,y,O,P,H){var oe=Rt();try{Dt(v)(y,O,P,H)}catch(se){if(Nt(oe),se!==se+0)throw se;wt(1,0)}}function GE(v,y,O,P,H,oe){var se=Rt();try{return Dt(v)(y,O,P,H,oe)}catch(ue){if(Nt(se),ue!==ue+0)throw ue;wt(1,0)}}function YE(v,y,O,P,H,oe,se,ue){var we=Rt();try{return Dt(v)(y,O,P,H,oe,se,ue)}catch(Se){if(Nt(we),Se!==Se+0)throw Se;wt(1,0)}}function KE(v,y,O,P,H){var oe=Rt();try{return Dt(v)(y,O,P,H)}catch(se){if(Nt(oe),se!==se+0)throw se;wt(1,0)}}function QE(v,y,O,P){var H=Rt();try{return Dt(v)(y,O,P)}catch(oe){if(Nt(H),oe!==oe+0)throw oe;wt(1,0)}}function $E(v,y,O,P){var H=Rt();try{return Dt(v)(y,O,P)}catch(oe){if(Nt(H),oe!==oe+0)throw oe;wt(1,0)}}function HE(v){var y=Rt();try{return Dt(v)()}catch(O){if(Nt(y),O!==O+0)throw O;wt(1,0)}}function WE(v,y,O,P,H,oe,se,ue){var we=Rt();try{Dt(v)(y,O,P,H,oe,se,ue)}catch(Se){if(Nt(we),Se!==Se+0)throw Se;wt(1,0)}}function JE(v,y,O,P,H,oe,se,ue,we,Se,Ie,Je){var Ye=Rt();try{return Dt(v)(y,O,P,H,oe,se,ue,we,Se,Ie,Je)}catch(it){if(Nt(Ye),it!==it+0)throw it;wt(1,0)}}function zE(v,y,O,P,H,oe,se,ue,we,Se,Ie,Je,Ye,it,Pt,Wt){var Et=Rt();try{Dt(v)(y,O,P,H,oe,se,ue,we,Se,Ie,Je,Ye,it,Pt,Wt)}catch(Kt){if(Nt(Et),Kt!==Kt+0)throw Kt;wt(1,0)}}function ZE(v,y,O,P,H){var oe=Rt();try{return ch(v,y,O,P,H)}catch(se){if(Nt(oe),se!==se+0)throw se;wt(1,0)}}var $o;le=function v(){$o||fh(),$o||(le=v)};function fh(){if(ge>0||(U(),ge>0))return;function v(){$o||($o=!0,r.calledRun=!0,!b&&(W(),i(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),z()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),v()},1)):v()}if(r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return fh(),t.ready}})();function S0(e){return Qa($a,e)}async function T0(e,t){return C0($a,e,t)}async function O0(e,t){return A0($a,e,t)}const cc=[["aztec","Aztec"],["code_128","Code128"],["code_39","Code39"],["code_93","Code93"],["codabar","Codabar"],["databar","DataBar"],["databar_expanded","DataBarExpanded"],["data_matrix","DataMatrix"],["dx_film_edge","DXFilmEdge"],["ean_13","EAN-13"],["ean_8","EAN-8"],["itf","ITF"],["maxi_code","MaxiCode"],["micro_qr_code","MicroQRCode"],["pdf417","PDF417"],["qr_code","QRCode"],["rm_qr_code","rMQRCode"],["upc_a","UPC-A"],["upc_e","UPC-E"],["linear_codes","Linear-Codes"],["matrix_codes","Matrix-Codes"]],D0=[...cc,["unknown"]].map(e=>e[0]),po=new Map(cc);function I0(e){for(const[t,n]of po)if(e===n)return t;return"unknown"}function R0(e){if(fc(e))return{width:e.naturalWidth,height:e.naturalHeight};if(dc(e))return{width:e.width.baseVal.value,height:e.height.baseVal.value};if(hc(e))return{width:e.videoWidth,height:e.videoHeight};if(gc(e))return{width:e.width,height:e.height};if(yc(e))return{width:e.displayWidth,height:e.displayHeight};if(pc(e))return{width:e.width,height:e.height};if(mc(e))return{width:e.width,height:e.height};throw new TypeError("The provided value is not of type '(Blob or HTMLCanvasElement or HTMLImageElement or HTMLVideoElement or ImageBitmap or ImageData or OffscreenCanvas or SVGImageElement or VideoFrame)'.")}function fc(e){try{return e instanceof HTMLImageElement}catch{return!1}}function dc(e){try{return e instanceof SVGImageElement}catch{return!1}}function hc(e){try{return e instanceof HTMLVideoElement}catch{return!1}}function pc(e){try{return e instanceof HTMLCanvasElement}catch{return!1}}function gc(e){try{return e instanceof ImageBitmap}catch{return!1}}function mc(e){try{return e instanceof OffscreenCanvas}catch{return!1}}function yc(e){try{return e instanceof VideoFrame}catch{return!1}}function vc(e){try{return e instanceof Blob}catch{return!1}}function N0(e){try{return e instanceof ImageData}catch{return!1}}function P0(e,t){try{const n=new OffscreenCanvas(e,t);if(n.getContext("2d")instanceof OffscreenCanvasRenderingContext2D)return n;throw void 0}catch{const n=document.createElement("canvas");return n.width=e,n.height=t,n}}async function bc(e){if(fc(e)&&!await F0(e))throw new DOMException("Failed to load or decode HTMLImageElement.","InvalidStateError");if(dc(e)&&!await j0(e))throw new DOMException("Failed to load or decode SVGImageElement.","InvalidStateError");if(yc(e)&&L0(e))throw new DOMException("VideoFrame is closed.","InvalidStateError");if(hc(e)&&(e.readyState===0||e.readyState===1))throw new DOMException("Invalid element or state.","InvalidStateError");if(gc(e)&&V0(e))throw new DOMException("The image source is detached.","InvalidStateError");const{width:t,height:n}=R0(e);if(t===0||n===0)return null;const r=P0(t,n).getContext("2d");r.drawImage(e,0,0);try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function M0(e){let t;try{if(globalThis.createImageBitmap)t=await createImageBitmap(e);else if(globalThis.Image){t=new Image;let n="";try{n=URL.createObjectURL(e),t.src=n,await t.decode()}finally{URL.revokeObjectURL(n)}}else return e}catch{throw new DOMException("Failed to load or decode Blob.","InvalidStateError")}return await bc(t)}function B0(e){const{width:t,height:n}=e;if(t===0||n===0)return null;const r=e.getContext("2d");try{return r.getImageData(0,0,t,n)}catch{throw new DOMException("Source would taint origin.","SecurityError")}}async function k0(e){if(vc(e))return await M0(e);if(N0(e)){if(_0(e))throw new DOMException("The image data has been detached.","InvalidStateError");return e}return pc(e)||mc(e)?B0(e):await bc(e)}async function F0(e){try{return await e.decode(),!0}catch{return!1}}async function j0(e){var t;try{return await((t=e.decode)==null?void 0:t.call(e)),!0}catch{return!1}}function L0(e){return e.format===null}function _0(e){return e.data.buffer.byteLength===0}function V0(e){return e.width===0&&e.height===0}function wc(e,t){return e instanceof DOMException?new DOMException(`${t}: ${e.message}`,e.name):e instanceof Error?new e.constructor(`${t}: ${e.message}`):new Error(`${t}: ${e}`)}var ti;class Ha extends EventTarget{constructor(t={}){var n;super(),d0(this,ti,void 0);try{const r=(n=t==null?void 0:t.formats)==null?void 0:n.filter(i=>i!=="unknown");if((r==null?void 0:r.length)===0)throw new TypeError("Hint option provided, but is empty.");for(const i of r??[])if(!po.has(i))throw new TypeError(`Failed to read the 'formats' property from 'BarcodeDetectorOptions': The provided value '${i}' is not a valid enum value of type BarcodeFormat.`);h0(this,ti,r??[]),S0().then(i=>{this.dispatchEvent(new CustomEvent("load",{detail:i}))}).catch(i=>{this.dispatchEvent(new CustomEvent("error",{detail:i}))})}catch(r){throw wc(r,"Failed to construct 'BarcodeDetector'")}}static async getSupportedFormats(){return D0.filter(t=>t!=="unknown")}async detect(t){try{const n=await k0(t);if(n===null)return[];let r;try{vc(n)?r=await T0(n,{tryHarder:!0,formats:ic(this,ti).map(i=>po.get(i))}):r=await O0(n,{tryHarder:!0,formats:ic(this,ti).map(i=>po.get(i))})}catch(i){throw console.error(i),new DOMException("Barcode detection service unavailable.","NotSupportedError")}return r.map(i=>{const{topLeft:{x:a,y:s},topRight:{x:c,y:h},bottomLeft:{x:g,y:d},bottomRight:{x:E,y:u}}=i.position,w=Math.min(a,c,g,E),o=Math.min(s,h,d,u),l=Math.max(a,c,g,E),p=Math.max(s,h,d,u);return{boundingBox:new DOMRectReadOnly(w,o,l-w,p-o),rawValue:i.text,format:I0(i.format),cornerPoints:[{x:a,y:s},{x:c,y:h},{x:E,y:u},{x:g,y:d}]}})}catch(n){throw wc(n,"Failed to execute 'detect' on 'BarcodeDetector'")}}}ti=new WeakMap,globalThis.BarcodeDetector!=null||(globalThis.BarcodeDetector=Ha);function q0(e){const{onClick:t,disabled:n,className:r}=e,i={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return k.createElement("svg",{onClick:n?void 0:t,className:r,style:i,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M3 3L6.00007 6.00007M21 21L19.8455 19.8221M9.74194 4.06811C9.83646 4.04279 9.93334 4.02428 10.0319 4.01299C10.1453 4 10.2683 4 10.5141 4H13.5327C13.7786 4 13.9015 4 14.015 4.01299C14.6068 4.08078 15.1375 4.40882 15.4628 4.90782C15.5252 5.00345 15.5802 5.11345 15.6901 5.33333C15.7451 5.44329 15.7726 5.49827 15.8037 5.54609C15.9664 5.79559 16.2318 5.95961 16.5277 5.9935C16.5844 6 16.6459 6 16.7688 6H17.8234C18.9435 6 19.5036 6 19.9314 6.21799C20.3077 6.40973 20.6137 6.71569 20.8055 7.09202C21.0234 7.51984 21.0234 8.0799 21.0234 9.2V15.3496M19.8455 19.8221C19.4278 20 18.8702 20 17.8234 20H6.22344C5.10333 20 4.54328 20 4.11546 19.782C3.73913 19.5903 3.43317 19.2843 3.24142 18.908C3.02344 18.4802 3.02344 17.9201 3.02344 16.8V9.2C3.02344 8.0799 3.02344 7.51984 3.24142 7.09202C3.43317 6.71569 3.73913 6.40973 4.11546 6.21799C4.51385 6.015 5.0269 6.00103 6.00007 6.00007M19.8455 19.8221L14.5619 14.5619M14.5619 14.5619C14.0349 15.4243 13.0847 16 12 16C10.3431 16 9 14.6569 9 13C9 11.9153 9.57566 10.9651 10.4381 10.4381M14.5619 14.5619L10.4381 10.4381M10.4381 10.4381L6.00007 6.00007"}))}function U0(e){const{onClick:t,disabled:n,className:r}=e,i={cursor:n?"default":"pointer",stroke:n?"grey":"yellow",strokeLineJoin:"round",strokeLineCap:"round",strokeWidth:1.5,...e.style};return k.createElement("svg",{onClick:n?void 0:t,className:r,style:i,width:"28px",height:"28px",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{d:"M12 16C13.6569 16 15 14.6569 15 13C15 11.3431 13.6569 10 12 10C10.3431 10 9 11.3431 9 13C9 14.6569 10.3431 16 12 16Z"}),k.createElement("path",{d:"M3 16.8V9.2C3 8.0799 3 7.51984 3.21799 7.09202C3.40973 6.71569 3.71569 6.40973 4.09202 6.21799C4.51984 6 5.0799 6 6.2 6H7.25464C7.37758 6 7.43905 6 7.49576 5.9935C7.79166 5.95961 8.05705 5.79559 8.21969 5.54609C8.25086 5.49827 8.27836 5.44328 8.33333 5.33333C8.44329 5.11342 8.49827 5.00346 8.56062 4.90782C8.8859 4.40882 9.41668 4.08078 10.0085 4.01299C10.1219 4 10.2448 4 10.4907 4H13.5093C13.7552 4 13.8781 4 13.9915 4.01299C14.5833 4.08078 15.1141 4.40882 15.4394 4.90782C15.5017 5.00345 15.5567 5.11345 15.6667 5.33333C15.7216 5.44329 15.7491 5.49827 15.7803 5.54609C15.943 5.79559 16.2083 5.95961 16.5042 5.9935C16.561 6 16.6224 6 16.7454 6H17.8C18.9201 6 19.4802 6 19.908 6.21799C20.2843 6.40973 20.5903 6.71569 20.782 7.09202C21 7.51984 21 8.0799 21 9.2V16.8C21 17.9201 21 18.4802 20.782 18.908C20.5903 19.2843 20.2843 19.5903 19.908 19.782C19.4802 20 18.9201 20 17.8 20H6.2C5.0799 20 4.51984 20 4.09202 19.782C3.71569 19.5903 3.40973 19.2843 3.21799 18.908C3 18.4802 3 17.9201 3 16.8Z"}))}function G0(e){const{scanning:t,startScanning:n,stopScanning:r}=e,[i,a]=k.useState(!1);function s(){a(!0),t?r():n(),setTimeout(()=>a(!1),1e3)}return k.createElement("div",{style:{bottom:85,right:3,position:"absolute",zIndex:2,cursor:i?"default":"pointer"}},t?k.createElement(q0,{disabled:i,onClick:s}):k.createElement(U0,{disabled:i,onClick:s}))}function Y0(e){const{onClick:t,className:n,style:r}=e;return k.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M13.225 9l5.025-7h-7.972l-3.3 11h5.359l-2.452 8.648.75.364L20.374 9zm.438 3H8.322l2.7-9H16.3l-5.025 7h7.101l-6.7 8.953z"}))}function K0(e){const{onClick:t,className:n,style:r}=e;return k.createElement("svg",{onClick:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:r,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.2,stroke:"yellow",fill:"yellow",d:"M14.516 15.158l.714.714-4.595 6.14-.75-.364L12.337 13H6.978L8.22 8.861l.803.803L8.322 12h3.036l1.793 1.792-1.475 5.16zm5.984 4.05L4.793 3.5l.707-.707 3.492 3.492L10.278 2h7.972l-5.025 7h7.149l-3.71 4.957 4.543 4.543zM12.707 10l3.243 3.243L18.376 10zM9.795 7.088l2.079 2.079L16.3 3h-5.278z"}))}function Q0(e){const{status:t,scanning:n,torchToggle:r}=e;function i(a){r(a)}return n&&r?k.createElement("div",{style:{bottom:35,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},t?k.createElement(K0,{onClick:()=>i(!1)}):k.createElement(Y0,{onClick:()=>i(!0)})):null}function $0(e){const{onClick:t,className:n,disabled:r=!1}=e,i={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return k.createElement("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:i,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-7.46,0.5l-1.5,0c-0.645,0 -0.643,-1 -0,-1l1.5,0l-0,-1.5c-0,-0.645 1,-0.643 1,0l-0,1.5l1.5,0c0.645,0 0.643,1 -0,1l-1.5,0l-0,1.5c-0,0.645 -1,0.643 -1,0l-0,-1.5Z"}))}function H0(e){const{onClick:t,className:n,disabled:r=!1}=e,i={cursor:r?"default":"pointer",stroke:r?"grey":"yellow",fill:r?"grey":"yellow",...e.style};return k.createElement("svg",{onClick:r?void 0:t,width:"30px",height:"30px",viewBox:"0 0 24 24",className:n,style:i,xmlns:"http://www.w3.org/2000/svg"},k.createElement("path",{strokeWidth:.3,d:"M16.279,17.039c-1.396,1.209 -3.216,1.941 -5.206,1.941c-4.393,0 -7.96,-3.567 -7.96,-7.96c-0,-4.393 3.567,-7.96 7.96,-7.96c4.393,0 7.96,3.567 7.96,7.96c-0,2.044 -0.772,3.909 -2.04,5.319l0.165,0.165c1.194,1.194 2.388,2.388 3.583,3.582c0.455,0.456 -0.252,1.163 -0.707,0.708l-3.755,-3.755Zm1.754,-6.019c-0,-3.841 -3.119,-6.96 -6.96,-6.96c-3.842,0 -6.96,3.119 -6.96,6.96c-0,3.841 3.118,6.96 6.96,6.96c3.841,0 6.96,-3.119 6.96,-6.96Zm-4.96,-0.5c0.645,0 0.643,1 -0,1l-4,0c-0.645,0 -0.643,-1 -0,-1l4,0Z"}))}function W0(e){const{scanning:t,capabilities:n,onZoom:r,value:i}=e;if(!t||!r)return null;const a=(n.max-n.min)/3;return k.createElement(k.Fragment,null,k.createElement("div",{style:{bottom:130,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},k.createElement(H0,{disabled:i<=n.min,onClick:function(){r(Math.max(i-a,n.min))}})),k.createElement("div",{style:{bottom:180,right:3,position:"absolute",zIndex:2,cursor:"pointer"}},k.createElement($0,{disabled:i>=n.max,onClick:function(){r(Math.min(i+a,n.max))}})))}function J0(e){const{scanning:t,loading:n,capabilities:r,border:i=35,onOff:a,torch:s,zoom:c,startScanning:h,stopScanning:g}=e,d="rgba(255, 0, 0, 0.5)";return k.createElement("div",{style:{position:"relative"}},k.createElement("svg",{viewBox:"0 0 100 100",style:{top:0,left:0,zIndex:1,boxSizing:"border-box",border:`${i>=35?i:35}px solid rgba(0, 0, 0, 0.2)`}},n&&k.createElement("text",{x:"50",y:"50",textAnchor:"middle",fill:"black",fontSize:"8",fontFamily:"Arial",fontWeight:"bold"},"Loading ...",k.createElement("animate",{attributeName:"opacity",values:"0;1;0",dur:"2s",repeatCount:"indefinite"})),k.createElement("path",{fill:"none",d:"M23,0 L0,0 L0,23",stroke:d,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M0,77 L0,100 L23,100",stroke:d,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M77,100 L100,100 L100,77",stroke:d,strokeWidth:3}),k.createElement("path",{fill:"none",d:"M100,23 L100,0 77,0",stroke:d,strokeWidth:3})),a&&k.createElement(G0,{scanning:t,startScanning:h,stopScanning:g}),s&&r.torch&&k.createElement(Q0,{scanning:t,status:s.status,torchToggle:s.toggle}),c&&r.zoom&&k.createElement(W0,{scanning:t,capabilities:r.zoom,value:c.value,onZoom:c.onChange}))}const z0={facingMode:"environment",width:{min:640,ideal:720,max:1920},height:{min:640,ideal:720,max:1080}},Z0={audio:!0,tracker:void 0,onOff:!1,finder:!0,torch:!0,zoom:!1},X0={width:"100%",height:"100%",position:"relative"},ey={top:0,left:0,width:"100%",height:"100%",display:"block",overflow:"hidden"};var ty=function(e){let t,n=!1;return(...r)=>(n||(t=e(r),n=!0),t)}(()=>{const e=jm(window);switch(e.browser){case"chrome":Hm(window,e);break;case"firefox":Zm(window,e);break;case"safari":n0(window,e);break;default:throw new Error("Unsupported browser")}});const ny="data:audio/mp3;base64,//PkZAAhghE0AKToAJra/n0FQygAAAGIkYJgmCYXBMAAGCTJz3zhCEM//z//1hz//8MMMMN08ssV6e5DDWIQreAgCvFKy8bXgIKMkUDDBgzJwIBtkRMQAocxIFdxghQGKDoEziAzQxOBOdH92i/iGi+zDCAEIX46a73HrSybZw1x3JZjXp7dSNy/P68rjcbt7p7fakMP5LVMyzCaj1pjvejYYAIDgDGzECjEAk1Jl3559HIon8hzlfPVTCvGJZzfcKSxXfyMWM88//9VKSxXdtnb9vomOuuRyiWVYbf+X8zp6fKGHIdycuWMMMMMMKSnp+6wsYc/9f/7z7rPPWHN556p6fP8MMMP///PPP/7+GHK9PT6p7f/unldP2np7YeHjweiYA4GLNAgAiI7u57n5//oc5/yfk6znOcPhwOBwggHCMpA4HA4KEyHOc5znO+hPIc5//+fqJh8XQPh90JU5xQinOf//87/zvP+ggAYuhCKHxdA+Hxd0EA4KKHA4ciB3kOXfXB/gmf8p/B96lAMKAgAADU+BujARHgwdisgHMfAUHAiceBg4ASBgZBiBIBH4ZaHOJsLhf8R+HYEciIgYSwj/+Bi7EqBh+AcBn5P6Bh4TuBmrAMBiZH7gaLEWgew//PkZFMlyek60MpYAShzqqZhm6gCUWeEUWAewEWYGN4X4GDEPwGE8S4GDoOIGAYKgIQOkz//gGARAUB+CwGxTwMAACAEgyAwdAlAxKhzAxXiZ///AxcEwAwJjDAziCAAwQgdAwRgdAsJQDAmAcGzYDwAhZIAKAcIQB4GT9TQMJ9/4Gi1Fv/AcAYUqKBAwGgNAwVBAAwGhwAwdBlAxFg1AwlgzAwNBuAkJQDBgEEDEqGECgChFgBgL//CIswYYH//+HKCpk4K0C9AaKKCAOBeMcR4X9C44BwABCgGAsGYCgTwHAcAwXAiAwSAQV///CJP9lwMBQAwAAAWGo5lVLCcaeneVhJAVGai3//ioaUEf//gaTAYGCj8BnEwfrIqDcsIQb/vmhU/8fAs0G8YGGwKST8Igj4GCATipksVzY8p//90FWJwh45AkX//4fCF9wMEgkL3uQc+gbGJ8t4MBAMBP/hEXf9FRuWBcAfIFjYzQdoLCBwh7IWVlxaX/w8oMCP/+EQT5poGB1Ir90DhiV6af/jFYBpT2BgoQyyt2M0ToBdEaZyzt8nTo3xdNDCTSd//o6F06CjooxRr4jVF/0bOKD6OMUNDRxiMUVFR0FFQPhGXRjDpr4MAEA4wIQUhYOIw//PkZE4nrg08sOx4ACQ0CopD2aAAlwTTBxQeMcwd8w8gZTAgABXwGABOkzpI0wAQAExnWfP4x8ZjKunWdZ1o1Qe6lFGKCNULORQCELAAPnRUf/GIx/0FHGfo3SdZ0qP2cukXKLlRtBKFgAQwCkwJgFRYBEEATmDsLSY2QiQYCEnEra+UZo6F1aKMRr6GhoaP/+j//ov+i+hjLqBgMkYoqChoo1GqCjoY06TpRqjjLOYzRRmMuizmgdKhdF8kjTAAAPMCwGswzglgwAJfzqxmioKH/////////////+ijLOAwFmN0f/////////Q///8ZjP/9DGYyFwIDBeB3MA4AlBWidKM5spykAUAQOCakK+udGqN8VDYjTRuN//0bVX//6Kio4xQFv//nf//kKOoAEIB6SY6hcxenp85///4/DEPf/84Xvl4vF4dwtxfEJgCYQHMSgKCROp4+fn////L4tQf0unz89OecLxeL0ul09y6enzp4dIhKAQFA5hKfLu1nU7/Wr71rRKJUBQSUVt////l08GUPVWgAAYAeNKsxbQNAAhQx3/oKGMM6dZ1Yy6sajMbfKio7lNcv0sScZ47lNcw32ekVFMP9fp/f+mklI6at6u/dBMQuW6y+C5BcgwAA//PkZEomGg1HYGe0riWsCqbEwiY0BJFJMxrCcxGgQ2VK8xxCF1wsABgQBBgQBAYAFCkYCgALkK4fJ00E5ctJN1Uxy5au3XoGcM4dSN0EYZwzhW0WCh1PZwzhnFFQxtnbO2d0Kt6CdXbruggkTEX5Rs4TEQUVsdVXaCcuWXIBQUGmwmgoAGcJiM4dSioHQdBnEY+hjcbov//jcb/43G43G/jCRibfxugdBnDqULO2duvQumztncbo4xGKKNxugooxGIxQULoOgFgUMTA/jbrxiMDmETL+eLhcPThzOeeOZfL5fIcBYuXD/OHv8t//LJFxjxQYHHKDGFkZMtlmKM0RgQfbVtxFIHbQBDRuzRguEI1c9XZ/rWmrZfVU3Oc/9utNNygRQkCoHlAYstNN6DJ1IINpoINppv+WG/+g2mmnUmmmpBAoJIJhnwB5xkymn606Df/t000xhU03UXC5Ol8uFyXy+Xy/l8v5w4cLk4XAvwAYUvl/QL5fTdlKZkEEEEGumaKaX00zIOemf6CH///ywI3LKpiQ2Ef4xYWMSDyI0XwzikpL0ajVHZ3j9DGIjeuXcNfjn96/S/TUz/X/vX////5K/r+v7Jn+LlAoGZOIQIwMKBQM/yppKYURmhGZkR2b//PkZE0mHg1HEG8wyiD7mlwAyDU8nJHi5htakZmZGNiRcpkJhBmUmZYQcM1VDEEBggNDV/ASEZRYKFZIhkXKLlKmk7IVTKmZNJ5KhiqVUqpX+k7+qlVKyV/ZIqZDFDWTJlFyi5TJpKhiXKBQyZzIS5JhBoayV/AQWVpGWkcYTV5O/rIVSv8/0nkr+v6/vyR/X9f1/ZN8kf5/n99/n+f5/lTKmf9/mRP8yFUqpWSv4yJUqpX9kj/MmZNJ5K/z/P9J5P/v6yFUz/CEoywgUMqZkz/FssECIsVq0aPRrRRatFFFykQZJ2Ukl///5KjmksOaA7ALROJLDnEsLbq3GTMVrwb/0dGzmM0DlfBlHQOmrdR0MYi92TX6b/cmDHLclyUVYO/4O8sFTKFTKFf8yhUyhUyhXzKlDKlCsr/+ZUoVlSsr/+ZQqZUoZUoceMfcoZUoZUoVlfOPGcmDHKcpynKg9yXJcr3JclyXJclyYO+DXJclyfgxFZVb3KcqD/g2MxzsY72L9LubPR0dCyf5K5NNd+Tv9GXRdV0XJclyfcl/n+k8kf6SX/iVynvXf///4Mg/1OkxguYzmM5jMcLHMxwwGhgNCwXMLAcwMXTLi1MD7w7tmTdBvMmE0xQFzCwHMDAd//PkZGMpigkmAGOUvCfTgcgAuC+ITswMFzC4oMLhYMByn0xvU+p9Tr0xUxf/0xv///1PBYDhgNTFTFTGTGTGTGTGTGTGTGC4GTFMDAcLAdMVMVMULAcMBpgYDhcDGFwsYXFBikLGFwMGA4MBxgcDKfTEMUoAx2BisD+mKp5Tv1OkxkxkxkxkxkxkxkxlO0xVPJi/6nv////U7CwHTFTFTGTGTGTGU+p71PpjJipihYDpipi/6n1Ov//C4GC4GTGTGTGTFU8WBSZdLhWB//yKlotyLZFiLf8tyyRUipFSKkVGRBZQMiWC3yx//wxUGKsSvDFQGHUAL3QMsHDFIYpCYy2Bmagy6BjLgy6Bh3od58DCLAizBgRb+EQiyEQiwGBFuDAi3/////20QqSBJf/qcumv/////wMZdGXAYMu1gYy6MuBEZdBgy4BjLgy6BjLgy6BjLgy6BjLQy6DBlz2cJDLgRGXAMZdGXAYMuhMZcCIy6sJGaoGMuppwNRl3WBjLgy63wiEWAwIt/+EQi0IhFsDCLAi0GBFkGBFgMJCqaqYAgAYIhBBvwf7kwcqRq7V3IctacvlN6NxqgooxRRuNRiijEZjMGRuMvz9FGozQ+1X2qe1T1S//+VhaWAtKwtML//PkZEIkbgcaAHc1xCJrjeAAtfuUAtLAWf///mWePH95ZFgsyssvM88+jzO6K+z7OM48sH+WDiweZx5YOK+zxWLGJWsa6xadAv02fTZLSpsFpvLSga0tMgWgUgWmwgUmyWl8tMgWWmLSoFJsoFlpSwsmyBg4HhEdgwHAYPBwGDgeBg8HwMHg4DB4PBgOAwcOwMHLwDn5lAwcDgiDgYDwMHA/4MB3//+EQeDAdwiDwYLPhEWQYLODBYERZBgt8Ii34GLBaB5pfAZ0FvEAQ/UfwxULlx+IXx+8f5CELH8fxKhAIDFoHBEDRc3////gwHgaRXgMHYMB2EU/gwZ/gYbw3gY3QbgYNgbgYiAbgwN3/+EQbBEG4MBuDAbAwG4RBtAwbg2////+B9B6F//////////hEdD//////////8DRahEQGCInMNg3LBElgNjDciCwG/lgNiwGxWG///mG4bf/+WA3Kw3KyIMNw2Kw3MNg3MNg3MNiIMiQ2OK0xMiA3KyJLAEZgRARmBEDEYFwBBgEgEeomowol5YAJKwCDAIAJ8sAE+gGBgCJYAQUZ/13LubMu5dyiYOAhKwEFGf9AOoz/g4CFAIol/lgAjysAgsAElYBP////lgJksBM//lgRUxF//PkZGApggsIAHt2wiNLoggAqCz8RFSwIqYioipkjEjHCCSN/+WJg5iYOYmPK5krmTmZk5mZ8sTJYmf8yJiNiIisi/ywRmRkZkZGZGRmRERkREZERGRERkREZERGxEf///hETIMEyBiZEyBiZEzwiJgDEwU4DV2gQGFOBgmP8GAiAwRAiBgIgYCIGAi/4MBHAwRgjAwRgjwMEQIgMcgY8DBGCMDBGCMDEyJn///+BiYQIBlObj4eYLIwsjAOBGFkYBoEQ84eULIw88LIA88PKHnw8sPKFkeHlANAiAaFUDAiMYPIHmDzBZBhZB///8GBOA1sH/Awni7AwnhPCITwYE/CKzBgt8Ig8GA4Ig6EQdww4Yb+F1sIgtwYCwGAsAwWAsBgLAYCwDBYCwDBaHUDF+VEDKgC2BgtBaDAWgYLQW////gYLAWQMFgLAMFoLcGAt////4RMABmBSj4NgwMOGHBsHhdcLrwbB4XXC6+F14YcLrww4Ng8MOGHBsHww4Ng8AUC4AoMQMC4fgw3wutV4QIsAgFYIBWCCVgHeVgHeWABCwAIVgH+YBwB5aRAstKgV6Ba1oMg9avtUVN/qdLWciD/cqD3Jg6DFPuTB/////lYAn//mC8C+YLwL5gvgvGC//PkZFEpLgMKYXt2xB5LogAArbdc+C8VgvlYL/mC8C+YLwL5YBfMNgNkwXixDWoHPMc4VUxVA2TBeDZPYXzXl815fK14sLxYXvK1//NeXzXl815fMtdDLSw3UsMtLCstMtLDLSwsFhWWlgt//8sFhW6f/////+WF7zXl8sL5ry+Vrxry+WF/wMLwX4MC+EQv/AwvBfAxsjYAyqpKA0lpLAwvBfBgXv///4RA2DANAYGgNgYGgNgYGwN+EQvf/BgXwYF//8DC+F4Dd6NgGBf4AgFwbB0MMF1wuuDYMBsGwusDYOBsHA2Dvg2DQuuDYOhdcMMF14YYDGYDEGwfhhgbB0MN///4RBaEQWgZByoYRWYMFvwiDsGwaF1gbB34GDwdC64XW/w1aKxDVgatir4YcLrQbBwNg7////////////+ESfgZPyff/////////4MFmBvvMAERZ8CC5adNj02E2S0qbCBSBZaYtN///oFlpU2QMXIFAYuQK9AtAo7IxLTpsIFJs/5aZRxQawaxGfIg9CsrI+PUqkWdOHp7ODsOl6cOHZ4dsulfLI9/8BAAgMBACsBLACVgBjoAWAE5OTM6WDAR0zodMdHCsJLASWAjzCQgsBJhASWAjysI8wkJMICU//PkZFkeqgcaYDd1th6DogAAqCuIxQwtDA5MdMULgyY6YqnXqdep5TpMdMVRNRL/UT9AN6jCiSjKAZRNRhAMomgFQDfCIJwYCQiCAiCMGAkGAgDBJUA3eVAMEgj////8SrDFIYqh5g8kPMHkDzB5OFkYeYPJ+HlDzB5+AYVQDibCyIPLLEZIsjIliWS0WywWyyWuWCyWJaLZbLJYDHgLAItFvy3///4eYPKBlQTh5QYEODBb//hhoNg7/C62DYPFUKwKsVgNWBq8VkVcVkVUVYrH//hGff/8Iz8GT7//////wiX4ML3gwvgwvf4ML3gZeqoHVGyBl4vgZfL2F1oNg4Lrg2DcLrg2DQw0Lrhh8Lr4YcMNBsGhdcGBcMOGGAFGAGMQsF1guuGG4XXV/4uQXOLmF1kL/8lCXkuSk4O8/FzHzuP0hIucf/CIFAMCgFPgYFAKAwCgGBQCgGHYO4GBVM4GgQI4RCMEQKQOtQjUI1CNcI14MqDKwDIAGQDzh5wsjDyw8uHmDzYeUPN+DEYRRhFEIowYgDQgIhWDApgwKAwKQYFAYFQMKkYDOxHAzsRgMKBUGBX/h5v+Hm4ecPNh5A8wBwjhZHhZAHlDzBZAFkAeQPKHnCyILIAsih5QsgDz//PkZLQgIgsMAFp1xCGLogAAA2rkB5w8oeYLIQ8kPMHkCyGHnAMKoGmAgFkUPMHmDYAtfHPHNkr/JYl8c8lCWHPHMkqSo5onMAkBDnfJX//8IgDBgBhEdAaxSQMHUGAEIgAV4risCcipBOMVRVBO////hEvAxsAwvf////8MPDDww4XWC64XXDDww4YcMPC6wYb/wYGgiGwMplMDYhTCIaCIaBga/////8GA+EQdgYPB4MB4GDwdhEH8Ig8Ig8GA6EQcEQf8DBxlBjoAweDuFwgCQXiL//iLiKCKCL4XCiKRFwEgoRT4iqpMQU1FMy4xMDCqqqqqqqr////xuDd8fv/DVwrArEIg6EQdhEHAYPBwMB+ERYBi0WAwWAZ0FoGLYOB+JfgZ0FoGdBaDBYbn+WHm9xW7/Nzzc83PLDzc8reWlA7S0oHamx//6BflpU2C0qbBaf/8yk/ysn+VkMhTKQrKVk8yE8rIVkKyYsAn/5WC+YICmCApWCGTkxtKMcVWlgFMEBTBAX////0C0C0C/////////LTFpvTZLTlpv/0Ci0xaYtOgWmymyWkAxcWmTZTYTY8tMmygUWmLTIFpsFpv9NnywLmLCx2RgWmQKTZ98UjnzZ1/++D4M6/////3//PkZOgjIg8IAFcbxCaTogAAoCuIzfJ8vfJ8Wcs5fBnD5//++L5f////////6nCKv//+o0o0FUYwqDNGCwgUMKC0VVGkVv//4Yf8LrxVCriqDVoasDVuKsNWw1bisBqwVkVkVX//gy/4YYMMGGhhgwwNg4LrhdcLrAYWGAA0zBsH4Ng3C6/////4MAoGBQIDAKBgUCAwCgYEAsDAoEAwKBAYBYMAoGBQIBgUCYGBQIBgUCwiBAYBYMAoRAgRAoGBBMBooCAYFAkIgTEUxFv/EWxFxFhFoi0LhQuFiLCL/EWqTEFNRTMuMTAwqqqq//////8TWJriV/hERAwRgYiEYGIhGBmIRgYiEYMEQMEcDMSiA1GYwMR+UDMTkA7KIgMRGIGGM0SIrRGjRlhEV4jxov8rR/5YRFhEdQSViCsR5iRJWIKxPlgQYgSViSsR5WJMQJLC78IiKERF4REeERGEREERHwMRGOBmIRhERhERAwRAYiEQGIhGBmIRAajkgG5TEEREDBHwYIwYI4REXCIV/4MCmDArgwKAYUO/gYVCkGBUGBTgYUCsGBUIhUDCoUCIVBgVBgVBgUhEKQMKhUDCoUBgVAwoFAYFcGBQDI6oA5+qQiFAMjBUGBXCyEPIFkOH//PkZPMj6gr6AFdVwifkBdwAoC2Ilh5/8PPh5Qsih5IeUA0TAZrE8PP////wMRiIIqID8piAxEIwMxCMDEQjCIj//BiIDRo8Iogii/4MKwYVhEoESkDEiIGJEgYlfBgmDBIMEAYgSBiBIREAwSERH/8I7wPfuCO4I7v/8GBvAw3Bv/////gwN34RBuBg2BuBg2BuBg2BuEQbhEG+EQbAwG4MBtwiDaDAbhEGwMBuDAbAwG4GDYG8DBsDcDBuNwDRWDcIg2AwbA34RBv///CINvCINgMRIN/////wiG4DDeG+TEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq/zB4OLAP8rBxWDisHlYOKxb5WLTFgsMWiw18LDOnjPxZoxadDOgsLAtLAbKymVhsrDZWG/LAb8w2GywGysNlgNFgNGFwuBQuWnTZLToFFpisLJsFp0Cy0voFAQLFZkMCAQwIBCsC/5WBCwBCwBCwBCsCeVgUwIBCwBDEwEMCAQrAhgUClgCFgTlgCGJgJ5gQTGJwKWAKYFApgQTGBQL5kY0HMjQYnAhWJvKwIWAIVgQrApYAhWBPBgECIEBgE/8IgXhECQiBAMCkcDEwEwMCAQGAQIhoIhsGBsIhvgwN//PkZN4irgr2AAOVqiUThegAnCtMgwNwiG/8IhuDA1hENhENgYbKYHb2IBhoNhENAwN////8IhsDKZS////8IhuBhspgc0KQRDWEQ3///CNf4GAIMDAwgAwAAwhAwAwYAIgwiHBgAMAYGAAGHv///CIBqBqESDEIgRYGoGHBiDEIgGoGgMAYgxgwgxCIETwYFYMCoMCuDApBgU8DCoU//gY3G//wYFOBhUKBEKQYFfBgV8IhSEQoBkYK8IhT/wMKhXBgUCIU4RCoRCvgYVCsDCp3A1SqAYFAiFP////gY3G1TEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVgwCAwCBEC///////8IgUIgWEQIBgUCAwTQMCAQDAoEhECAYFIwGaRMBotWAasdwH/KqBmhFgaKI4GRgKVpjCBTCBPMJHNMFMIFKwnlgJ5hUxhUwGWlpAMuMuWLTFpvQKQLQKLTIFJsoFIFFZb/8woQwoT///MIF8rC+WAphAphAppgpYClgsmwBC6bHoFFpUCi0wGXFguWCwFLgUsgX6BZaVNj0Ci03//+EQKEQKEQLCIFAxMBcDAgFAwIBQYBODAKBgUCAYEAuDAKBgUCAYFAgRAngwCgwCwiBIRAmE//PkZN4iogj2AFdVxiUrhewAhOkwQIBgQ0gbOI4GRhOBiYCgYEAv////CIFAyMBQYBf///CIF8IgUDAgFBgEAwIRwMCCcDEwFAwIBf///CIEQGMDGEXCKBpCIDCEQDCAsYInDFQMMAuYSoTQMVfBlf//+DKfBgAiGDAQMIMIgCIQYADAEGAgwP////8ItgNu2/8DAAAiABgHhECBgQGEQARA8GAeEQIMABECEQIMAwYBBgCDAARA4GAAgYACDAARAwiAgwDhED4RABEBCIGBgDoH2dgZwCBgAP//BhX/+DCiTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqF1ww////////hdeGGDDBhwjeF102E2fTYAowMLjE0zTDfyyMYjEDJTwMLSwFi0/gQLoFIFpsegWmyBQsWlQL9ApNgtIWn8tMgX6BaBX+WmQL9Nn02f9NktIgUgWmwWl9Avy06bCBSbJaUtImyWkQKLTIFgYWoFFpAKFwMLzZgwAwvLTIFlpU2fQLQK///4Yf4YaF1sLrg2DAuuDYNDDQw4NgwLrhh4XXC64Ng3C60MNwbB4XWC64YcMODYPCJYDlMQBlwRLg2DOF1v/////PkZM0eKgz0AE+UuCnLFfAAk3Fsg2DAYX/ww//4YaGGDDhdbDDACFwMuXA2DADlygusDYOBsGhhv//wNU/CKQusF1oXX+F1wuuGGC6wXWDDBdbC6wXXhHv//4AHIFgC0BZAA4Ba4FkADwFsC3AtQAOcC0BYAtgAcAA9+BYAsgW4FvgWOABwC1oq+it4RT0VVG0VFGkVywo1/RWU4U59TlFb1GvRX////QK9Nj/9AtNn02fTY9NhNlAr/QK//TYTZLSJsIFemx///oF/5aZNj02U2C0yBaBfoFAS6bKBfoFVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVQiA8GAO/4RAf//////wYA4GAO+EQHAwB4GDoB4GA4HQRB0BhlDIBpEAcBgPDIBgPAeDAHIFAYuLTpspsJsFpi0haRApAtAstIYKClgF/ysF/ysE/ysF//LAJ6plTlYC1ZUypmqtWVK1VqyplSFgBaqqcwAAVIqcrEBAAKmMBERCQhwD5iICIQEyABMAABBVGXF4gIA4DLAAWAEQgLVSsBaq1ZUv+YKClgELAJ////5YBP//LAL5WC+Vgn+WAX/LT+gW//PkZMIhLgrsAFt1yiD7FiB6A9qwmwViybCbCbCBSBabCBSBabPpsegWmwWn9ApApApNgCGBmEwWlLSpsf////hEHgYOB3////4GDkiBxMHhEdgYOB4GDwcBg4HW23gooFYHd/+BnAz8O8Vv//FaBm4rBWh38es2zbAtD1m2PVBqBrBqBrAF7AF3/5el84MkuHTgyy+dL0dRnEajMIyOn8RsZ5HGG/kbIpHIkYUiD0y2WctlZaWSwrKx6FZbxnL54ul04eLhw9Ol84dl86cOHT3Ipb5Z8qKpVx6/j0EkLctVTEFNRTMuMTAwgWQLQAHgLf/////4Fn+EQESEcIgInCIRW9TkrCzH0YIjjWtI+YeCD0woLCBQwsKRWUaRVCBZFZRtRtFRTlTlThRtAr0C0C//02E2fTZQK/0Ck2f9TlFRTlTlFT/9TlFVFRFb/9ThThynIQbWkAREue5S11rKdlkDEVABh61ExYPU+tOD4MQgcn4iwigivxFRFoXDcRQLhoiwioXCeAkFBcNiL8RURQBIKEVEWiLBcKIqIpEXC4QReIoIpCIKAQMxFAFAsIuIr/4YYLr//ww4XWBgwC64XX/hhgw3hhwuv8MNhhguvhdcAUYgaYTAAoWDDg2DQbBg//PkZPYe6gzuADd1uDKsBhBAe89cYYdGjtDT2hDmlD2leaOv9oX0OX/0NNLplNf8ewakNWGrTfTRpphNJtfaeh7T1/tStdtTpqN532lpX/1/kmQ5eaf2hoaV9paGleJAvd0rer2pWu1ar2vk56vVrV5Hj1Nop+/lfv5Zpkem5kX/2vtata2rq783nbvtbW6VjW6a2rq13+rO6VysV58K7tbp0ru6Vrtqa1a67tr6sau1ulYrnfa2v927Vrt21NSuN5X927/D4diAQANh4gEIfxB+IQG/D/4gDw/iGIRD+HRATEFNRTMuMTAwqqqqqqqqqqqqqqqqqiIEK/ititFX///8VcVuK38VsVhXBOQTpq/qm8QCAcBmIxgdfFZCHECpxFBFAuFEUC4cLhsRTEVEUDVoDQD+KrFYirFX+KwKoVgVUVUVeKwGrhWRWBViqFYDV4rMViKyGroauBg/A0YThVgNAEVQqw1fisis4quKxxWYrAatxWIqoqg1dFYxVxWIrAavAaAArIrAqoqhWYrIqvxWMVYrARCADhcKoVYavDVgqhV4qorIrHFWKuKxFViscVUVYasAaAfFY/4YcMNhdfwuuGGC64YfDDA2DwusANygbBwAxhAECwNg8MOF1hD4//PkZOkc4g7yBjd1sDNkDhgqYwtcYoUyiQ0NCkxQ0NCQkSIbGKIyRGEo5mUaNEhGKEHMmaGhI0UokORvMmZmZSZSiMZQkRnKKZkzRoSNCQpQ0NEZoaNFJkhh3KOUJEhIcoSJCQkIzlDlEjMDMyMpQ0JCQzNCRGaNCRISEZoZihoaIwlEHKNGiMzFEjRmSIwlHMyZmcyiGyMxRyhIkIxRSZokSEYGBkiRojAPESNGjQxvKHMmMoSKTJCQkIwlFKLDYWGhoZhYWAAUGBsAwsMDYUAcK4XDPhQVwwLAH/DfgHC6TEFNRaqqBgjwYI//wYI/8GCL///+DBFhERgwRcIiPAzGYgMRKIDcskBgjAxEIwYI4GiRwNEjhFH4MRwYjA0aOEUf8Io/BiLgxGEUYRRQij/BiKDEYMR+DBGBiMRQiIgYIwiIwYIgiIgMRGIDUSjhEReEREBiIRAwR/wYI/8IiP4MEcGCIIiOERH8GCIIiMIiIIiODBHBgjBgjwiIoREcIiOEREDBFCKiAxHJcIiMGCMGCLwYI8IiPhERgwRAwRAYjEUIiIGCP/AxGIgiIsGCL//4REYMEXhERBERhExhExAzyAZiEWDBGERGeKsVsVRVFcVwTnFcVxVgnYqipFUV//PkZPkcfgzeAFaVxDgUBgAgatvIYrgnYqgnQJyK4riqK4rwTsVor4rQAjABAgnQritFSKoqQTsE5C1haxfF7F4XQtULSFqC1i4LwWkXIWkXRdF+LwqAnME4iqCdwToVuK+HAERWAkAlgJB0OB3Doc8OYc8VCsVgIB3DuHAERUAkAkHMOBwOAIisO4dwEAEAEg6AkAl4CeHA4AkKhXioBIOiv8OB3F+LgWkXxeF8XouxcF0XBeF8XBdF8XhdAdouC8AEsXYWsXOKsVBU/FaKmK/FTxXFbFUVPiv/8VfxXitVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVAXX/8MN/wwwYf//DDBh4Yf/+DYODDfCIFAwKBQiaANFgUDAgFAwIBcADwFuBY/At8C1wLfgAdAtwLGBawLcC3AsgWeBYwLX4XW8LrBhgiFgMlhYLrhh4XWhdb8MOGGhdcMP4YaF1gw8LrwuvhhoYYLrYXWDDBdcGwfC60MN/ww8GwZ4XXC64GZQsF1wbBnDD4XXg2DcLrBdaDYPhhgusF1uGGC64YfhhoNg0LrQwwYcMNC62F1/g2DYXW4XXC6+GH8DTIW4YeB/wR/wjwR+DP/y06bJaRAtAtAtAs//PkZNwY2grqBFW1xDhTRegABLBstL6BRaVAstN5aYtN/psIFf5aQtIgWgUWk8tImyWkQL9Avy0qbKbKbJaf02f/0CkCy05adAsC3K7+mx5aVAv0C/TZ8tOmymwB2pspsFpPLSlpy0qbCBSBXlpk2E2E2C0paUtP6Bfpslp0CkCy0ibJaZAosWQLLTJsemwgUmz6BZaYtOgUWmLTpsJsoFJslpPLT+mwmz//6Bfpsf6BSBSbCBXoFeWk9NhNhAr0Cy0/+WnTZ8tJ/oFf6bP+myWn//8tMmz/lpf//////8sPTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVBgJwiCYMBP//gwE//////wiCAMEgkIggIqIDKpUCIIgwE8IzA4j+EYhGAZMIyDJA5gGRhGcIyDIhEQiIGAgwIRDwiAGAAwYMHBghGAZMGRCMhGYRgGRA5gIyDIwZPBk/wZIRmEY/gyOBxIMgIzCMgcTgwRBgjwYJBgngwTwYJhEQBiBGERMIrwOouAxAgGCQYIhERhEQDBGDBAREgwTCIgGCQYJgwSDBHwiI4MEAwSBiRHCIkGCYGJEQiI/Bgn4REYREeBiBIH6XhERhETwogoy04mpZibFmJuWYmx8n//PkZN4ZrgrkAFZUyDcjofgAA9qc0HafZ8HwNrjaG3xtjaDtJwTo+D55Ow7fxNRNSyLPlqJsAr/lmA/FmWYm5acTQVgTkVQTnBOQTgVxVBOBVFWK4J3FUE7gBABOwToVQTsVhUFcVRXBOhUBORWiuKkVYrCqK+KoqgnQrAnEV+K8E7FQE5xWBOQToVQTsVRW8V4qRUFYVgTsVhXioKgrCqKwqAnYqCtBOhUioK+CcisK8VRUFSKnirFQVBVFcE6FcVoJwKoqCrFXFUE7gnAqiuCcQTsE7xU8VP8VYrgnYrCuTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqn3/l/J/8vHL5f/BhwCETgGpIDOATgEIOFoDcHzgEIDgC+pG7eve1S/6tat7rXupDXSStWoIpGS4TSMQNIySMwpIyAaRkkZ8GJGdBtbwYkZ63tCKRkoIpGWDEjLCKRmEkjOvsEUjJOsIpGa6bOrgxIzsEkjIGJGYUkZVKCKRmqoDkgEjMJJGSYMSMAikZJ3qhp0dq9ru3X1I36FujPbXuxwKbr//waABfg0AC6DUDUDXBqBoAmQawJiGrhqDUGoN//PkZL8USgKcAAblrroTgfQAbhtQAag1QawaYNIAuQa12Lv9si7F2NnXa2Vsi7i/DZl2tlL9l+vL8tlUTUTUTUYQDIBlGUAyifqJKJqJ+p5Mf/U7TETEU7CxkxVO1PKdqeU8u4vq2ddnrsbM2Zs/tl9s67V2NlbIu5sgaA1Q14ExAmAaA0BrDVDXhpgTPDQGuBMA0gTKGgCYgTHDQGrDUGgNcNQaw1hoAmcNIaRIAtALVEgC1gteI8FpBaBIAtcRwkAWgFpBaILVBaIkAWgRwjhIiPEeDXwa/4NUGr+DRwaKBgX/8IhP//wiF8GBMGBP/wYEhEKEQmEQuDAoGFTAwLgwLhG/4MvCM8GSDJCNwZQOXg2DwbB8MPDDhhuGGBsHhh8Lrf4MCQYFCIUGJgiE8GBQMIFhELDDhdaGHhdYGwaGGDDhhuDYMBsHg2D8MMGHBsH8GwYDYMhEKEQgMCeDAsIhAiFBgQIhAYFhEKDAkGBMIhYGEC4GFCBELgYUKDAuEQsGBQMKEwiEBgUGBcIhQYFwYFAwgWDAoRC8GBAYE4RCgwKEQvhEJgYUIBhQkIhAiECIUGBIMC4RCgwJCIUGBAiFgaYLwiEA5cGXCNhGBGwZAw4Ng0MPBkqNqcoqorlh//PkZP8cygrkAFI0wjo7lfAAjhq4SnPor//psoFemygWmwWm/0C0Ci05adApNn/TZQLU5RU9FRFVFdTn1OFG1Gywv/UbUa9Ff0VoFgCwBbAtQLUCzAtgAchHAN8ImAbgBvwDd4RwjQDeAN8I0ImEQEQAbwRgiQjBHhHAN0A3vgG6Ab/CIhEgG5AN6EQESAbmEYI4RABvYRoRABuYRgDehEQiAiIRABvcA3QiQDfwjwDfCICPCJCJCJ4RwiYRwjBEwDehEYRgDfCNCOEQEQEcI+BagAd4FrAscCxAswLfwLAFgC1wLNVMQU1FMy4xMDBVVVVVVVVVBlBkwO3wZAZMIz//////+DJwO0IwI0DsA7cGUI34Rn4RgMuEZgywZQjAZP/hGAcmDKEYDIB28GQGQGXhGgcgRoMgRoHYBywZAZYMmBygyQYFCIUDChQYE4MCgaYJ/gwKEQsGBAiEBgXAwgQLrhdcGwcGHBsGA2Dgw4YYGwZC6/hdYMMF14YcLrYYcMPDDhdYGweF1oYb4MCwYEwYEgwJBgTCIQGBIRC/BgQDCBcIhAMKFhEKDAsGBQYFAwgTgwKDAoMCQiEgwIBhAnCIUGBQiFwiEBicIhAiFhEIgIoBooGieDPA+4GeDPCP//PkZOobXgrkAEY0jjazieQgBKKIBGgyBGhGhGgyAdoMmEaDIB2gyhGwZYMsI0GSDIEaDKB2QOWEaDKB2hGgygcoHYBygdkDtgygcngyAyhG4MgMgRgRmDJCNBkA7QjAZIRoRoMuByhGgyAyAyhGwZYHKByAcgMgRoHIEbCNCNA7fCNA7AZAO0GSEYEaDLA7cDthGgyAyAyQjAOwGUIyDKEYEaEYEYEaEbA5AZQZAZAZIMgRkGXBlBkCMgyAyQZYMngcmEb8GUGQIyDIBywZAZOEZhGBGwO2EbwjcI3hGYMqTEFNRTMuMTAwqqqqqqqqqqqqqqqqqqqqquDqz8GMDQIvBj///+DGDEGAMAifBj8IuEThFCIEQGPCLwiQYBFCKESDCETBhhGAZGEZ4MjgcSEY4GoRQigxCIEQGPCKBiBrgxwiBEwMIRAY4MQNMIkImDEGIRYMIRYRAYhFBjwYwNQYgwBgBh4GAMQiwYgxA0gahFBgBjgYBFhFhFCKEWBgEWEUGEIgMQYQMYRAMQigxhFBh4GkIgRIRYRAY4RIMQYgYhFA18IoMQYQihFhEgwhFCIDEGIRQieBiEUIoRQYhEwYDAFwGrBog0waAaQawacGsGiDQp9MZMVT3piJjJjK//PkZOYZBgjoaUJQ0DprofQgbhq0dep71PqeU69TpMdMVT6n1OlPKdJjpiKdFZkxlPKdJiJj+mKp/0xFPBoAmYaw0BpwJhDSBMQ1BqAmIEzDSGgNXDRDRhp+GsNMNAEyAmYagJkBMA1BpDXAmECZhoDXhqAmYawJjgTICZBrDSGsNAExDVDQGqGgNHDWBMIaQ0BrAmcCYgTHAmIEzDWGgNYaOBMw0BqDSBMYaA04aA1hqwJhw0ATKGqBM8NYEz4aQJkGoNMNIag1+GsCY+BMQJlDVw0cCYfDXw1ho4aQ0gTCTEFNRTMuMTAwqqoD37wjuhHf/////hGf////hHf/gycEZwRn4MnYMncIzsGTwOdOA507A507hGeEZ8GTuDJ4Rn4HPn4Mn4RnhGcDJwM3YM3gzdBm6DNwR3QjvA927Bm//Bm7Bm/Bm8GbgZvBm4GboR3gzeEd+DN8GbvBm6EZ+Bzp4Mn4HOnBGfA588IzsDnTgZPCM8Iz+EZ/CM4DnTgOdPBk8Iz4RJwGTidBi7AycTgiT4RJ8GE6ESdhEngZPJwGTieDCcESfwYToMJ3AycTwiTsDJ5OhEnwibwYb+ETdwibwibvCJuwYb/4RN/Btf/jYGyNv8bHLUtSzE0/LQBW//PkZPQcHgjQAFKVrjfDmgAge1eMLITcshNy1LX8si0LUTQtCyLQTUteWQmvLItSz4mgmnTJops0umEymDSPsnR9HwfB8k7Pvn0fAvwtcLXF/F+L4vQtQWuFoC0BaReF7AeBfwtcXBdF4XheFwXAtAui9C1haRdi6LwvirgnUE6FcVBVisKgrCvioK+KoqiqAhh3AQFXhwVYrFYCWHMOioVAI4dFWHPDgCAdDgdDmHcBIBEO+HRWAiKsBMO4dFQCAdATw6HBWHBWAgHBUHMOf/gICsOCoV4qw7+KxWHA6KhVTEFNRTMuMTAwVVVVVVVVVVVVVVVVVVVVC11Fz1+NP+/Xkqpr9OfuhQ6lZNWf+XsZc/si+KNoOj/Ntai9j7IISgZAklTqQhjToNTeQoreRdaSDODWvYAVFaWWkQmVuZPP8bRUzq896vc+XS6mm5gnnW7JLnV4z9N5XnW4k86x+uyHyxnWkmdborzraff2SvOtvljOtjd/5XRW8MivOsry/K3gUzrFPS1eFTOttTsul1+lLGdbV3c53h51mdbK7xPOr1SpnWlM63kedZnV4XPK86onnW7myrnWTmRTOqascoabXd/L+yuzS95dv1efjhl92ntYyTuIb6wuWRZFmWRa//PkZOcb/gqMACDf1LTLofggA9qc/gKRZiblqWYm3E24moSQnR9BJj6JwfBaFqWZZFoWvLUshNPxNuWn6bTZHgozRTSaNAY5oGjFQVgTkE6FUVorioK8VBXBO8VRUioAhxVioK4qAnIrYrCqKsVRVBORXBORVFcVcVwTgVBUBORUisK4rCoKwrxXFYE4FYVATjFcVhX4rcVBVFQV4rxVFSKwqCpFcV+K8VhXFYV4qivFUE4FaCdivBORUBOfBOgToE6FUVYqisKgqCtxWFbFQVxXisKgqRU4qioKuKwqCvxVBkH/4Mgf4Rg4RgfgxZBizhFYEVuDFvhFbBi3CKyEVsGLf/4MgAxaDFoGsWYMWgaxYBrFngxaDFnCKwIrAYswNas+DFgRWYGtWYMWBFZgxbgaxbgxZCKwGLIRWgxZCK2EVmDFmDFgMW4GtW8IrAYtBi3Bi0GLAYsCK0IrQit4MWeEVgRW+DFsI9cDW9AYtgxZhFaBrVgMWgxaDFvCKwIrIGtWhFaBrFuEVvBi3hFZA1i0IrYMWYMWAxaEVkGLAisCKzBizCK0DWrIRg+EYIRgQjABkHwODABkDhGDwODBgyAEYIRoRvww4YcKILYKILfhRg5htjY4OQbQ2hNAH8su//PkZP8cRgjWAFAUYjwDofQAi9pcJry1E1LUsuWvE2E0LQTcB+E2LMTctQFEEcWnFYVwTkAI4rRWFYE6BOhWwToBBAQgnIrisETANwIiAb/COEQEbgG+EcA38A3wjhGCMEeEaEeKoJwK4J2KoARBVBOIJ1FWKoJ0CcCuCdRWFcV4rioK4rAnYJ2K0V8VYr8E4xWFUVBVFQE6FXBORWFSKorxVFcVwToE5wTvBOoqwToVIJziuKwJxAQgnUVBUgnAqQCaCdxWirFaKwrRWFcE7FfFeK4rgnIrAnYrCoKoqgnAqCrip4qgnCr/////8Iu8BjvP4Ry5/8Izggc4Zw4RnD/hGcP8GThBk4eDJwgycIMnDwjOD4MnBA3eu9hF3kGO8gx3vBjvAN3jvMGO8CLvAY72DHeAbvXe+DHehF3kGO8gbvHeBF3oG713gG713vgx3oMd5BjvAi7wGO9A3eu8BjvMDd470Iu9wN3jvQY7wGO9wN3jvIRd4Bu9d6Bu9d6DHeAbvHewi7yEXecGO9BjvQN3rvIG7zykGO9A3eO9CLvYMd6EXegx3gG7x3kDd470Dd472DHewY7yDHeAKomwmhZFkAof8tCy4m5aCbcTUswFYsy0/LQTX9NBqBgJgYaY//PkZPcaTdCuAFgWlkI0DfQAe9r8Jxz6CShr8++JsArgjxNBNC0LQsyyLMsgRxallyyLIsi0LUTUtS0AVwFPia8si0LMTXiacsxNizLMTYTcsi1LMsy0E2LUsuJqJvxNyy/E1LMteWgm4mpZlkJuWRZFmWnLQTfgncVATkVcVQTsVIqQToVxWFeK4rwTmATCsCcAnQJyKoriqKwrxWiqKoqwToVRWBORWBOBVFSKgq4qAnAqAnArRVgnIJ3FYVQAgCriqK4qYqivBOsVoJwKgJ3FYVBWFfBOIqCoCcivipxUFSCd4qRV4rCvFaCc/BOhW8VxWFUVhX4r1eX/+DHgaYMOEX/CJgwwYQY8GODH/wYf4RAiQiAxCKBj4GAMYRQiwYcGEGMIoMfhECIBgEXAwCJhEA1BjhF+BhCIDEGARYGoRAYgxCLwYeESEUGMDEIoGAMAiAwBiBrCJ8GMGGEWEUGIRYMAYAxCKBiBgBqDDA1wiBEBiDAIsGIMANANMIoMAYhEBh4GMGMGARfAxBj8GAMANYRAYBFAwCIBhgYhEwNQMYGIRAMAiwNYRQi4RQYwYgahEBiBqBgESEUIqa6Z6bTBpGkmUwmkwaZpJlNCkifmkaaaBymgm0wmRPxSDTTa//PkZOYYTgboZUAQIkCEFgAAe898YTZpJtMJhNilphNdMJhMGgmemDSNJNmkaX6aNJN9MJhMc0E2mzSNJMpg0umU2mDS5oJlNJtNJnpg0DSTBoml0wmzTE8TRpGgm00mkzzRNNMJg0jQTSb/NFNdNGl02KTzRTfTPTSbTKZNLphNJpNmgmUymkwaaaTKZ/TSYTBoJr/ifptMpr9MJlNptMpg0kymumEwmf+mEwmOmkymTT5ppv80eaHTCYTHTSaNBNJtN80/0yaBoJo0k2aPTPNA0OaSaTJoplMJv9MgBAB4MBUGwbwVwUBkFAYDAU4NBoMBqhAELk//h/y1/vz6/6zMnEglwqnIsVSHBzAMMIqXiLgxS8ucoLCKl7VwipeupwYpeAxS8Z22hSl4U+qE1L2goKUva1GUJqXqwkpeAxS81IQpS8smBqXql6E1LyEVLxdEJqXoSUvAmpeJhFS8rpH3CKl6EVLxPWFKXgDUvVL1LCal4kuDFL2EVLxFlPClLyEVL2FKXhdwYpeswGpeqXkGKXqLAxS8wYpeqWk8KUvATUvQYpehJS9Bil6yoUpegipeZT2x1vN5NR2X3KrRuXjFmaS0AUCyE1BHflmWZacTYsvy05ZgAIs+WQCqJoWZ//PkZOwZ+gaYBgbm6EQMAfQAe9r8ZCbiaFkWv5ZibialoArlryyDtCSnyfR8hrE7PpNmiaIxDTGKafTJalqJoJoWQm4mnLUtSzE1LUsxNyy4mpZlqJpy14mgD8WpagKvLIEcJuWnLItBNhNhNxNgH8tSyLMTflmA/iaCaFqJqWf4mxZFmCdCvFWKwqivgnQJzFfwToAIwqgnOKgqCoK4J2KwqisKwJwKwqCqKgJwK4rYqirgnIJ2K8VhVwTmKorYrioK4JwKwrRWFQE5FUE6BOwTgV4qYqiuCdAnYqAnMVBVFUVATkVBVirioKoqCviuK8VwTjxWFfivFUVxXBOcVuKvFaKoqiuCdeEW3Bjb/gxvhFvCLYGN8GNwi3CLf8DbtuEW//CM7+DG+EW+DG8DbNgi3CLfA2zYItwY3gbZuDG8GT/Bk+DJ+DJ/hGdCM+EZwMnQZP8GT8GToRngc6dBk4IzwZOBk8GTvhGdBk+DG8Dbt8DbtgY2CLbBjYGNwi2A2zYDbN4RbhFtA2zcDbNwNu3CLaEW4RbeEW2DG8DbNwY3BjYDbNgY3A2zYItwi3CLbgbdvA27YGN/CLaDG4RbgxsDG4Rb8ItsI7oR3cGb00m0wmTT6aTZoJgUpMc0kwaa//PkZNcYqeLUAAAUHjw8DgQAe88cYTXTXNBpXiQdfLVpLJoaCSJs0TQNAbRpJpDWleaGlDmlfQ9fQ7tBZoa0IeOw3Ccq44TcHgrufDVzQNA0Om0wmDTNE0EymkymumU2mU0aSY6ZE8NFMmiaaYNDptMGn+aJpdNptNps0OmU0J50wNtMGmmEz/zQTJpppNplMJlM9M8FAYCoKAAApgqDIMACwAQbBsAMGQAQaCkGg0GgyCkGeCgNABwAAUgrwA+CoAQNAeHCAOAeAyIQHBwgDg4QYDAGgMEEOEAeA0Q4DxAHh0PEMGYMBsFQYDPgoDMGQV4NBqryAZfhGfwjMDl4Rv/wjcGT/4R/CPBH//hH4H3gzv4M7A+/gzoR4GdBnAf+DPBnwj4M7BnwivA1QIpCKcIpgaqDFgaqBogMWBqgGqgxQinA0XBi8IqEUCKBFcD7/CPwj0I+DPA/8GfBnQZ8I+EeCPwZ4R6EfhGcI0GSDIDJCNCMBkgdsIwGQDkBk4HIEZgy4RoHZwZQjcDtCMgcoRgRoRgHKDJBl4RgHIDKDIEYEaEZgyYMoRsIwGQGQIwGUGUI3A5AZMI2EaDLBlwjQZQjAjAZQoqIqqN+pypx/qNIqoqqNKNKcqchwGrCAPqN//PkZOsaCgjiBUZRnkhEBfAgw9tw+iu1RUqp2qNUNalOVG1GkV/U58sLU48sLLCiwFU4hAYA+qQQgasVhVIYQNWKwmAKpvasNoHIDm4OQHIDlGwNgbH4D+JuWQm4mhZFoJsWgm4I4TcbA2xtA5ODnGyNoHJ+NgHKDl/LMBXLUtS04mvLQteAqCaCbFoWQmha8bQ2Acg2ht8bI2RsjaGyNrjYGwNvjbByja/GxFYE4ipBOIrwTiK4J2KuK8BAK4rAnAJwKkE4FYE7FUVgEIqgIRVBO4qRXFQVBVBOMVwCcE5itBOoqAnQqCpBOIrxVBOoJ0KwJxgnQrCuKsVBXioCcCqCdAnYJyKsVYqipBOgjwiAj/8InhH4RMIkIioAC4RiJCMRP////CNk//Blkv4M6F8I9C/8GWT/8I2SwjZOEbJQZZIGWShGyYMsnwj0P///CPQ/hGyQRsn8I2SCNkgOyVkoMsnhGyQMslCNkoMsl4MsnhGyXCNk4MsmEbJ/wZZP8I2SA7JWTgyyQMiKDIieEYiAcRIihGIkIxFwZEUIxEA4iREgcRYihGIoHESIkDiJEUIxFwjEQIxEwZEWDIihGIoRiKEYiHcYJRIr9kzDmO5cIaApXE/NA0TTTKZGym/0//PkZMQWjdCsAwAWCsQ8Cfwoe89cyaXTKZACgKxsmybQFQCyPQPUbRtA9x6QAoegHKmRtClpk0RSkwaCYE/GyaaZ6ZFJTaaTCbTabTBomgmk2mxS0x0waSaTI2gcgOcT0T5MiedM9M9NCfCeGgNhMJlNJoT1MdNJhMjaNPptNGkmhtpnmgmv+KQmRSE0aaY6ZTKZTRoJg0U0aBopg0emU1/xPzTTaa5o80DRTZoJs0TRNEUhMikJs0P0x0wmkwmUymkwaKb5pppNJg0OaInhpGgmeaSbTBp9N/ptNJo0DTNAbOCkGAwGABgA4NgwAAAMAPBgAQKAyDAZgoCkFINAABWAEDAUBTAABgMBTgqACDcGAAQYDAUqLUlVt///+Bj4MIRcGH/hE//hEwY/wi8GPBj8GH8IgRcIv4RYMQi+DAIsIsIn8GHCLCJCJ/BhBgBpgwwifhFhEhF/gwCIDAGIMIMAMQYBFhFBgDH4GAMQiQNAYAwwYBECIAMIAMAAiHBgAMIAiAIg4MABgABhADAhEAGAARCBhCEQhEIMABh6EQAwIMABgCEQwMAQYD4MDCIcGACIQiHwYGDAhEOEQ4MAENB8hJD7PsnXJ0fZ98+D6LItQR3PgnZHmgPYYRopk0xj//PkZMkU/gLsKkITrkL0CfzIetvgJtNdNGkmkwCPLITf8s+WpaFmApAjgFUsyz49jSTCaGMmkyaRZlkJsWpaiagKBZlmWomh8c+CdcnROj4Pk+Akh9E6DsJ0fJ8c+OTs+idk4J2Tg+j7Pr8nB9nwfAa59k7598+D74Sk+eEkFQdDmKsOhwBEVYCeAiAmAiHcBEV4CYCIWmCHF6FqC0haRcF4XYvxfF2LwvC+FqC0xcC0C/FwLSFoF0XBfi7C0xei8LwvcLQLoWoXheC0BaIWoXBdiNiMY6cZ8RkZxnjqOojAz4zx0HUdBGozjoMw6iMjpxdi+L4uC5F/xd/haIui/bZ/+DGBp4RYMQYgw8Ivgw/CJ4RfBh/hECKBgEUGODH8InhFwY4GoMcIgRIMcInCIBrBhCIESESBp+DEGARfhEA1gxBjBj4RAYQYgxgYwiYRcIgMAiAwBjCJgYAawYYRQMQMAYhFgagYhEA0AxA1A1CJBhBgEXwMQNAihFhFAxwYAwgaYMPCJA1hEBiBrwYQiwYwiBFwYhFgxgawihFCLA0gYAwCKESBoBpCJ4MIRcGOEVB9ALR8BJj7/PonB9HyEoJwfZ9E4Dt5OeTnlqJtxNAH7nwfHPonJ8E759E6PoJI//PkZOAWKgjoZUAQYka0Ffgge9VcfZOCdE7J0To+Cc8JWTo+D7J0EqPoO0+T5PsJSfJ9n0TkJUfJOeTknPPo+z6J2Ts+ycE759/k7Pg+z5J2TonBOeTkJUTg+T5DtJ0Tvk5Pjk5DXPg+idH2HYfR9E6PgnR9k5JyfZ9cnR9cNYJSfROidE6Ps+Cdn0fB8E6DtPs+CdHwfH5OAlR8nyfB98+SdE4J0ff5OidH2TknfPkJMfYSg+Cd8+D6PsnP/JwTk++fYSQO0+D5J0fZ8HwTjn2AWDgdAL8ApALQCkO8GACwMgyAVBiAVhzwY4BeDIMgFMOh0ArDgc4BeAV4cgFsOhz/wP225HGw7wCsO4M8AqHP/+DEGQ7/8OgzgFoM4Bf4MhwO4BT4cDmHcGfDnw78GcVhUFTFXFeKoqYJ3isKuKkVgTsVoqCsKwrCoKsVQTqKorYWoXhfxeF/xdi58XOL4WmLnFYVQToE4FXiuK0VwTnFQVRVFcVhU4JzFfDgdhzBnDuHfALgyDAMQZBgGQCgBUAoDAMh3BkAsDMGcGAYgxBn+HAC0ArwCwMAS5adAry0yBSBfoFBVaKqKwVUVrRXUa9FUOEqVUjV3ySPLkvkzlNlNn02E2S06pvVKWACECpW//PkZN8VDgj+zymq5krb1ewAxJvkqe1XysDVFSqlVIo2o0ispyFVoqKNIrKcqNKcKcFhSjaKiKyKhYWiv6nCnCKijajSnPorKNKcKcqcIrqNoqKNqcKNoqKNKNqNKcIqKN//orf6BSbKbKBSBXlp0CvQKTYTZ/0C/LTxFxFoigioigCLC4cRYRWItEXC4cRcI0IoFwwXCiKwjQXC8LhRFcRcRQRSFwoikRcLhxFRFguHiKRF8E7FYVhVBOgCYVRUACKKgqgE0E6ACJFYVoJ0CcgnQrAnMVwTgE6ioKoRwDdhHhG4RARgDcCMEaEYIiAbwRIRuESEcIwRwiYRwjQjBEgWoFuBa4FngWkIQQigwhEwigx/CL/4RfCKEQGP/wYiEUwYHwYGDAwYAGA4RCEQBEGB0rCNcGU4RrBlcIsGGDCESBiEWDCBhCIEWBiDAGHCKEUGEGEGMIgMAiwigxCIDADQGIRfCIEQDXgYYRfBgBoESEXwY/CJCKEQIsGIRODEGIRQYgw8IgRYMMGAGGDEDGDAIoMcDQIkGMGGBrgwCKDAIsIkDUDWDGDDA1hE4RQMQYgwBhhFBhBh4MAMYRMIoRAiAxBjhF4mhZFpxNBNy0LQTUTXhKglR9FqWpaAP5Zi//PkZNYXkgTkGEJwlkXcDfQAe9r8bCa/k5JwTriacsizBHE6CSH1w7efHLPgjuJqWnLITYTX8tRNAH/ialqJuJuWZaFkCO4m5aE7J2TonB8E559nyEnJyfB8FmJrxNxNhNS1E3LT8sxNC0E0LTlqJuWQm3E15ZiaFqWRZiaCagP5aCblkKoqCsCdioKoqwToE6FcVwAhRWBOIrCpFbgnEVRVFUVIJ2K4rAnIqioKgrcV4riuK0E4FcVQTsVxUBOoJ3FUE7itFYE7FYVRXFUVwTkVoqAnYJxBO4rReF4XYWsLWLoui4LwuC9AdsLQL0LQA9C8Lgvi6LguBahfFwXAtIvQQ4vCqKwrxX/8E5xXit4JwKzBnwj+DF+F1guvBiQYkDRIR8I/gz8Gd4R/wYsGLBi8I8DPBneDPBnwZ/8I8DP8I8B/0Gd+DPA+8I/+Ef+DOgzvwj4R/hHoM+Ee4M4D74M+Ef/A/7gfcDPBn4R7BnfCPgz4M7Bngf8DPwjwR6B/3CPwj0Gfgz+EfBnhH8GfwioRQGIBqgRUDVAYoGiBFcIoBqoMWEUA1UDRYRUIqEUA1WBooGiAaqBogRUGJwigM8I/gz+DOCPwj/Bnwj3BnBHgZ4M4I+DOhHhNCz5aiaCb//PkZM0YugrgAAASBEUEBfQAe9rclmWompZ8shNyzLMsy1LMBUAfhNxNicBJCcE5J0JpyyLMTcBVLXloCO5aCagKACiAqflqWYmvE3E3BHlmArFnxNRNC1LUBS5aFoWhZFmWR8k5CTnxz4PonZ8E5Pg+j4LUshNQH4TYtSzLMshNBNhNSyAViyE0FQE4FYVoJ0CcRUgnYqisKoJxFWAhiuKgrCtFUE7FQE5iqKgqRVFWKorwTsVxVFYE7FTFTBOxVgnAqRXBOPisK4BOK0VoriuK0E5BOxUivFcE5FYE5FQVBXFQE6FQVBVFYVxWioCcCoLovi4LoWiL0LSL+LouBaIvBahdi6LoWgEMFoC1hacXxdC14uipiqKn8VPFbiqKsVb//Bm/+EXgx4RdhFb///hE1/8GLP//CKwIrQjoGa/wPewZqEdYM1wZqDNAetgzWEd8GagzYM2DN4M1wjoI7Bm+DNhHcD3rA9awZuEdwZvCOwjsGaA964M1A978I7hHQR0DNge98I6hHYR1wZrBmwPWgPWwZsI7wjqB63COvgzQR3BmwZsGaget8D3rCOgZoGa4R1gzYM0EdwZsI6CO+DN4R1wZsD3oGaBmwjqEdAzXCO/4R0DNAzYR0WgI8TQT//PkZL4XFgTcAE6Tekf8EfQAe9t8YTXiagKwCsJuWXLMTUtC1LMTT8TYTUJP+fAdomomoD8JuWoCgWoI7iaFkJqJqfZ8hrk4CSE5Pk+Cdk5PgnBOT7JwTg+uWZaiaCbcsgFAsy0LPlmJsWYmom5ZFmWpaibiaAjy15ZFkWQm5Zll+JsJqJvy1E0CThJz65OQlJ8H2TknZOT759k6J3z4PgTQTcsy0LITflmWfLUsiyLITYTcTT8syzLQsi0LMEcWZa8tSyE1LTibibFqWYI/8shNCyE1LQsy1LUTUBTLLloWXLUsiyLUtBN+JqJvy1E05Z8TcsxNeWn/LTnxydHwfZ9n1ydk4PsnHJyfR9E4JwTgnB8k4588nB9cnR8c+D7PjxV4q4r8VsVgTgE4/itFShX/xV4rirxVFWKoq4qfxX8E6xVxUBOYrCtwTvwTj/xV8E5/irBOsVuKwqRXFTFQVorCrFf/xWioKwrCtioCcxUFUVAToE4FUVxWFQVhUBO4rgnUVIJyKkVgToE4ipFUVoq4qisKsE64qCoCdxUFUVxXFUE78VxWFQV4qiuKgqiuK4CCK2KoqirBOATsE4FWK4qxVFUVhVFYE4gnIriuCcQTiK4rCoCdCtirBORUiqK2//PkZLAWsgzuADQNNkZj/fjIe9r8K/FXFUVwSE5aiaAKgmhaFpxNQkp8n3z5PsJOGsffLQsyyE1LItS1E1Af+CPLMTUTfibFmJoWQmxanzydHwTsnASknBaCalqWom5ZcsxNyc8nASsnHDt59BrhJgkpOicBKg7D7JyfZ8E5Pk+Cd8EeWXE0LQsiyLQtSyLIsi0LUTYsy0E3LITQshNiyLUsiy4I78shNy0LMVcE6ipgnArRVgncE4wTsVIrCqCcCtBOYrwTgE7iuKwqCoKwrcE7BOQTqKgqiqFpBEC1gPYD3F0X4WoLTF0Xxei6FqC0BaAtQWgXxdwtWFqC0haBW/FQVRUBOBUFcE6ioCcAnEVRX4rYrxWFUVBViuLsXgtAuC6FoBDBaYvi7F8XxexdF8XhcFyI//gx//CJBhgxhEwY/+EXwYgx8ImDH8GPhE8GPhEwigwhFwNQNQNfhE+DGDAGHCIBrhEhEBh4RQMAY/gYBFBhhEAxCIDCEUDEDHBiEUIoRQY+DCBp4McGEIgGgMcGIGMGIGIGgRQYgxCKBiBjBgDGESDADWBgEUDEIuDADWBpBiEUDEDDgYgwBgDEDQDUGIGgRAYQYAxCKBhCKEThEBgBiEUGIRQMQiQiwNAY//PkZKwWNgjoZUAQREakFfQAe9t8YMfwi4GBaFoJsWpaFlyyBHctCzE25ZiaFoAocsy1E24Sk+idk6LMTYTYTQsyyLUtCyLQTUswFYJMGuTg+CdHwErPotAFAsuJtxNCz4m4mvBHiafloWZZ8YppBqzTNI0jTNBMpg0jTTZZFqWfE3Af/xNf+WomhZ8suWZZCb8tC1LQtS14m/LQtBNhNOfR8hKCc8nHJ2EqCUE5CSHxydk6Pg+D7Ps+Sdk6LUTQTcTcTctSz4mwmha8TXlmJvyy5ZiaFl+WpZFoWZa8TQshNCz4mhalmJsWfLQsuWRactBNRNC1E1LLlly0E2PgJWfR8h2H2fJOSdnx+fXPs+T5PgNbnzz6Po+T7JwTk+z4PonROglJ84qCvxXxUirFX4q4qeCd1f8InCI/4R/CP//4RMI/CMEYI4RAR8I8IjCJ4REI/gG8ESEfCOERCP4R/+EaERCPCNCNCI4BvQjYRMHINobIOfjZBzDZG3xtja42gcw2PwcvG2Nng5+NgbY2wcn42htDYGwNrjYGwNsbX42vxscbI2gc3Bzg5Qcg2uNvjaGwNgbI2+Dl4OUbI2Qc42RsjbBy//g5eAboR4RwjQDeCP+EcI8IwBuwjwjBEBEA//PkZKoZMgrqADXt9EV8FfQAe9scG+EThEBGCMESESEbhEQjwjwjwjBHCIwiQDcCNCI/hHE0/LQBSLITf/lqWoSvk7LT8BWLMtRNAk58E7Po+CyLQTcsyyLUsi0Afi1LUTUTUtBNS05aFkWpZHzwkoSgnB9HwfQSsTYsizLQtRNRNgFf/8NcJWEmAWCdn0To+T4CUHyGtxNiyLT/lmJqJqJqWgmpZFqJsWgmwmwmwmv5ZiaibiactBNv/yyLTiaFkWZagKgCmJqWQmgmom3E0LTibAKfE0LLiuKgrYqipBO4JzFUE5BORXBOhVioKwqRWBOYJyKkE6BOIrYqCqCcxVxVFUV8E4FSCdcVgAgCuKkLTBDC6CHi+LwuRfha4uC+FpF8XQtAWgB2wtAWoXBchaBfwtQWnFSCdxVxXFUVhUFYV4rgnOK3wTiKir//1eDCsf//7/+wOYd///ei/f6lmiqGXpyOlCSRm+yP3UtDhFIzqBhwCFHAGFHABYGcAnAAMOAAYcAAw4BYKOAIROANgicAQYcABE4AAzgE4B+1wmcAwYcAK+sDOADgFLCJwAlWBnABwABnABwDWraETgEDOADgDBiRkgoJpGaP+64RSMoRSMGBiRkkwMSMlq7AxIy4//PkZJUYEgieBFw3fkL8FgAied8AROAAicA8DOATgAGHAAROAFwM4BOAGBhwADDgAGHANQUcAgicAYROAfgw4AIkbPNNNpo0TSNBNJgUs0l7lomEwmRSOaRp80zQFK4nvTInnTEGgwGwAwYmOmkyaInppJpMJg0k1+KUaaaTCb42U0mBsGiaSaNNNpo0OaKZNE0jTTSY5oGmaZpJrphM9MGkmDQTCZBzpg0OKR+mBtdMJobfTSbTfG2KSaBpGgaZomiaBomn02mOmkwmjSNPpjmmaKZNA0zSNFNCeClJkT40DTTCY5oJk0kyaJpdMppMdMdN80TR6ZTXTfNJNmimumem+aKZTKaTaaTRops0kwaZppk0+aSa6ZTKYTfTfTPTHTKa5omgmEyaJo9NmkaRp/pnmmaf6aNNMplMplMdMpv8TxMJlNplNJn9MdM1OM6hWa/EjiRiRiO/xIcSP+GgCZQ1+GvDRDV//4aP///4I8EwTwTBLwS/4AHgnBHBHgiwR4JgAgS4IwAYPA8ADg+AAAAFwfB4L4WADC2AGAGFwsFwuD2FgAcAPC+F/B8L4X/B7B4L4WwuD+AGDwXACAAC2D2AEFgfCwAAAAXB8LhcLeDwXCwPYPA+ACACD+AH4XwA//PkZJMVIgb2ejVLxkBMEgTIe898vwv4X/ACB/C4WwtgBg/gA4PA9gBeFhLRTXTRomkmP0yJ6J+mPy0NA0OvibNDQmfzTNNMjaFKNATxMiemiaRoGkmE2mkwmTRTHNBMGiaCZTSZTZomh0PaV9fX2hoX14kzSmOaCY5pJr80U0aPTfNFMps0jSNJMmiaSaTKb6aTKYNLphMpg0eaJoGkJ8aBoppMppMJg00xzTTabNFNJpNJpNpnpg0DT6bTRoppoJMWrSh/690NQ5paV5D2le/LND2hoQxDF/rzR1/r/aWhfaWleQxfXmheaevNDS0tLQ0ryGoch/X15D+vLy+0oc0ry/19DUOXuvIc0oav9oXkNX1/r3X18QCGHQGQHB8PiAPAaHgPDsBgcH+Hqv//+DJ0GNuEW4MbQY2wZO4Rn///4R34R3Qjv//8Gbv//8GbgZuwZvCO4GbsD37+Ed3A586DJ4Rn8DnToRn8GTsGT8GToRn4HOngyf4HOnBGeDJ0IzgjOCM8DnTwjOgydwOdP4RnYMncDbtwY2A27cItgNs3CLeDGwMbwY3CLaEWwRbQi3A27eDG0GN4G2bBFvA2zcItgY3A27YGN4G2bAxtA58/gc6eDJwHOnAyfCM7A588//PkZLMYngTSAFAUhEYcDfggw9V8DnzwOdOBk8IzuEZ4MnAyfgychsy7F3oE13Nl9sy7myrsL6qqOU5anCqkHqNDI3KVUTEU8GNU7U6gxyHKchyVV/Xa2Zspfds3rubK2VsjZmztk9djZi/TZV2NnXYu0vsm0yaBoDZNEbA2k0aKZNjmwbH/Nvm2bRtGyBVArD1G0bQPUevg9h6/+PRzZNkCrzZNgesegesermyPQPXzbHpNvm0PQPUPSbJs82TaHqAtj082h6DaNn8eo2DbHrHpNjj1m1zYHqNo2jYNnmwbPNgek2ja5sj0D1m0bJs80xtJlMdMCeps0U0meaaa6b5p/mmmU3zRTfNFN/pgHPzQNPmkaaaTXTKbTRoJk0zS6b/NBNdNJlNGj02aH6Z4IgAEEYJ4I+CMEQJcEUEXBOpHDX/w1Q0Q1Q1cNWGvw0Q0/hp/AmIaA0cCYhow0w1/w0hoDRhpw1w1BrgTLDXw1BrhrDQGgNQEzAmOGuGiGgNfgTHDQGoCZw1w0BrDWBMIEzDVDTDUGgNfAFwGjBrg1A1YNcGsAXAaQaABcBqg1g1QagaINYaoEyw1Bow1YaA1hoDSBMw1gTICYQJkGrDQGoNGGmGsNcNQawJkGuBM4aIa//PkZKAYngTsATQNQkKMFgDifh7AYagJkGsCZ+GkNWGiGsNAaYaOGgCYgTENQaw0Yaw1Q1Q0/hqw1BkAfmkaCb6ZTCY6bNBNLwmqGA5fzSTCb/lgwXOmMmMmTQ5pmkmUwmkymfzRTaZFJ6aNM002NrppMpg0kwKQmE2m0yKUaKaE95o9MJj9N9NJk0UymOaSaE/TabNNNmmmk2mU2aHTKZTCaNDjaTJoGimkyNvpk0TRTHTf6bTRopg001+mU0aXNBMjYNA0k2mjR5pfps0U100mUz0ym02mDRTHTaaTRpplMc0kz0ySA000mDSTKbNI002mzQTHTaYTf//NA0zQTBodNJk0UyKSaaZNJMprmkaP5oGmKUmEymUyaCbTHNBMJlN80DRNBMmkm/00mUwaZpprplNpvmiaJo80+aSa//TaY/6ZaH//wY4ReEX4RIMfwiAxBh/BhCJ/+ESDDwYcIn+EQIoMAiQYAw8IsGIGGETBj4MP4MQiAxhEAwAxAxBjBiEUIgMIMcDCDAGIMcGMDEGGBgEUDTwNfAx4MAiwiQYgwBgEUIgMIRAiQYhFwYAwBhA1CKDEIoGoGgMQi4MeDADGEQIkIgGMDCDAIoMAiQiAYwYYMQNQigwCJBiDEGAR//PkZJwV+gzoZUAQRkZsCfQAe9tcQYgx8GEGIMQiwMAY4MANAMcIoMSyE1E1/LMTUtCz5OD5PkJJz5Pk+uA/FqWRaib8TUTUTQtC05alqWYm4momgI8TYsxNCzE3LUtQFEsgFM+z6J0fB8nz+TsNcnB9BK+Tk+g7CdhJT6LTiaFqWYI7lqWoCvy05ZlnxNy0/LUshNBNvwR4moCj+Wv5ZlkJqWpalkCOE1E1LQsiyLITUBULLlqWZZlmJsWhZcsi1/4CiWpalkJqJuWvLXlkJsJpyy4mwm5ZlmJuWXLUTQteWgmgmwCsJoWfE3LMsiyLP8TTlkJuAolqJryzE1LTibCbloJuWhZFoWYmxZ8TcXIvxeC0i+FrF0B2i4L8LSL4uBaIDyCHF8XRfF6FqgiwtIuYWoXIrYqAncVvxVip8VIqCvUxPqtFbFf/4q/8V/8V/iririr8VATjxXipxWgnYq+KwqfFTFQVoq+KsVBW8VhUisKuK0VRXivFYE4FTBOhVFcVRV4riuCdCuCdCtwTiCcCqCcgnYqxWFcVIJwKsVxWisK8VxVgnArYqRWFeK0V4qgnQrgnYrfBOoqAnAq4J0CciqKviuK3BOoJyKsE4FUVoqisK2KwrAnArgBAFSK4//PkZJ0VagjyJgGtbkOkFfwAbh4AqRViuK4J0KgrCrFUVxVjOEeDQgjlcT4T40xtjaNI0uaI2QciGNJIl4kJZtCGIaSckIm6GL3TQ2zRTY2UwmjSNE0fxS02aY2BsJs0/+mzSE8TQpHTKZTaaG0aQpApZp/mmm+aHTfTCZGwNgUk0E0aRp/ilJlNJgT5MmkJ9zQNA0TQTH6ZG2mk0mk0mk3zQTKY/G3zQTHTabTBpGgmU0aKaTJpJpNJtMphNjYTfNE0emkymE2mEyaCbNBNfmkaJpdNJnpg0k0mDTTCbTaZTBp80k2aCbTfNE00yaCb6bTZoplMmmaKZTKaTJpmiaHTXNJNdMDbTab6Y6Z6ZNNMJhMJhN9NJrmim02m0ymU300aPTSa6Y//5pJpNdN/9NppxWxU4Jx/xWxU/xU4qcV/ipiuKwqxWFbioK/8VIqivFTwTkVgTkVor4JxFXxX8VcVxUFQE4FaCcwTvBOIqwToVuKwqCtFUVYqxXxWFeK0E7FQVYrwTnwTsV4rCqCcfFaCcRVFQE5gnAr4JyK4r4Jz4J0Koqip4rCvisKoJ3xWBOME7iuKgriuKgrAnAqgnArxXiqCcgnYJzFQVQTmAEIVYrwToAIYrwTiKkVQTkE5//PkZK4XGgzsADQNAkIcCfwAe898FXFTFYVxXxUFQVkzzS5oilg5TTTY2kyaJpJtNGgJ8aKaTQ2k2aCaNI0eaSYNJM/tKHEiQxfJG09MmgaSYTRppg0TRNNMJlMptMCfppNprmiaA2jQNLmmaRppk0jRFLNP9NJhMGmaQpZpJhNCkGkmE0J+mxSk0m0x02mjRTKbTCZ42EwaQpJpptNprmgaRpmim00J4mzSNM0kymkyKWmE0muaKYGwNjmgafTPNE0U0mUwJ7+mem01+J8mhSk2mjRTSb6aTCbNBM9MpjpjppMpk0E2mE2mE2mjSTfTaZ6YNFMcT1MpnprptNmim0wmE100aSaTRo9MGjzTTHTaaTfTSaNLpoFMAAFYNBQGwAvwAYM4NgqqkjaAN3d3d3etERNK5CZ/3Ctf8AaiAc/u7vaIn/+8XPv//+GDKv8W1/+AC8K4Yw+94xe940jgceOBwOcRaxGwH4EuNIjBfxazB8HhkwVjIAII/vDkjG/wAcJPeF5e98hNgSYLWMFvhZ73pX06aoehpmh01hMJtM9K3TKY9E10x+memvlIpZM9MUTCbShbUrtM+n5ophNZuXK+0wmemumMCemkmvc0Uwm/lJJlLe5oJZI0SyW6R0mE//PkZLcXlgrzECFvrEmMEfgAfh7k2aORpbTYUo9SBNsekGYNVKgqg6hrUXK4Q42DOwPWbILEzBSumEgkWJPU8S72G5wUuGDwguEKa1Q0UykS3Bn7FJNgg5qoEgpsGabBtGabZt7NrKCNgLYes1idmabBtm2bZsBRm0PQbF9mwPSPUBbMwzB6QojYM42ePTzbMwzR6TaNs1eBVNv81yDUJ2QYhJtD0m0PVe+x6T2M8HsbFwsh6B6D7HpugT2uZhO6HqZhmE7ISZhhkFNcghtmybBnnsD1Ho49ZtG2bZs5PVBc2EEepCaEHNjj1EJHq5smabZtmwbNEEPR+bJse9z2PY2T1SN0rdNJq6yXI06COvNJj9MGmkkGmUj7pI0TToNGlEsNEnCW10ymi5FtNFKpvps0kz0uW3aaTF00mTSzdNJu0KFYz1KjaGAhyoQCFGM//zFARgIUZ/oZpdCttay6M5drW1joSj6Ekk1b7J7R7aoQNlPrWBKLTTzOsGT5yYxLrtHTy2iUxEkES0HIBVD066VjGj31odPkkSjJtbWs6OIjKmlXHR9K5MTv5pdZolE10kk2lly74TFx5KTXeTGLrS6ExiucvJSSDUdXZm3NLn1rtYBCUEoRj77WOhCPc+g5//PkZJ8XPgzoAABMTrz8BfQyY9ONGxJULutaa1TE5LHxWEo+XecmMa3p0kqBCR6qOFaFUGpNJIIjqVi0ylBqJIkiSJIkmJj605EkSRJPetWAyVacmodBUVhGfrAZPF0AUrgRLNiqDU4VHo8h6HRObJJNdqlRBMFT0qdNE0WZhmay2tCuOY6oieWieianCnVSbzjd7SGhrLi6eUSeLcZTWqdML5PM50uOGJms9VqtYU6hrgrm4V0frUzTvYsiegR2FOkqUxSKdVCpmRCSkIAUZ4VPhqEKgFDU2VhUiIhUaIg0RAkTBYEjYBUbBMuCJgLAkCUBUinABgBE3/9EQqFRM0s0qzktk9ZFqqFC6RULE11JVDkd8Y1vVFOx9oUIpZ8Vnq5klkxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq";var ni=e=>e instanceof Date,Ec=e=>e==null;const xc=e=>typeof e=="object";var Cc=e=>!Ec(e)&&!Array.isArray(e)&&xc(e)&&!ni(e),Ac=e=>Ec(e)||!xc(e);function Sc(e,t){if(Ac(e)||Ac(t))return e===t;if(ni(e)&&ni(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n){const a=e[i];if(!r.includes(i))return!1;if(i!=="ref"){const s=t[i];if(ni(a)&&ni(s)||Cc(a)&&Cc(s)||Array.isArray(a)&&Array.isArray(s)?!Sc(a,s):a!==s)return!1}}return!0}function go(e){if(e===null)throw new Error("Canvas should always be defined when component is mounted.");const t=e.getContext("2d");if(t===null)throw new Error("Canvas 2D context should be non-null");t.clearRect(0,0,e.width,e.height)}function ry(e){var t;const{onScan:n,constraints:r,formats:i=["qr_code"],paused:a=!1,components:s,children:c,styles:h,classNames:g,allowMultiple:d,scanDelay:E}=e,u=k.useRef(null),w=k.useRef(null),o=k.useRef(null),l=k.useMemo(()=>({...z0,...r}),[r]),p=k.useMemo(()=>({...Z0,...s}),[s]),[f,m]=k.useState(!1),[b,C]=k.useState(!0),[S,D]=k.useState(l),A=function(){const V=k.useRef(Promise.resolve({type:"stop",data:{}})),K=k.useRef(null),R=k.useRef(null),[U,W]=k.useState({}),[z,ne]=k.useState({}),re=k.useCallback(async(ce,q)=>{var G;if(!window.isSecureContext)throw new Error("camera access is only permitted in secure context. Use HTTPS or localhost rather than HTTP.");if(((G=navigator==null?void 0:navigator.mediaDevices)===null||G===void 0?void 0:G.getUserMedia)===void 0)throw new Error("this browser has no Stream API support");ty();const Z=await navigator.mediaDevices.getUserMedia({audio:!1,video:q});ce.srcObject!==void 0?ce.srcObject=Z:ce.mozSrcObject!==void 0?ce.mozSrcObject=Z:window.URL.createObjectURL?ce.src=window.URL.createObjectURL(Z):window.webkitURL?ce.src=window.webkitURL.createObjectURL(Z):ce.src=Z.id,await Promise.race([ce.play(),new Promise(M=>setTimeout(M,3e3)).then(()=>{throw new Error("Loading camera stream timed out after 3 seconds.")})]),await new Promise(M=>setTimeout(M,500));const[x]=Z.getVideoTracks();return ne(x.getSettings()),W(x.getCapabilities()),K.current=Z,R.current=x,{type:"start",data:{videoEl:ce,stream:Z,constraints:q}}},[]),ae=k.useCallback(async(ce,q)=>{ce.src="",ce.srcObject=null,ce.load();for(const G of q.getTracks())q.removeTrack(G),G.stop();return K.current=null,R.current=null,ne({}),{type:"stop",data:{}}},[]),ge=k.useCallback(async(ce,{constraints:q,restart:G=!1})=>{if(V.current=V.current.then(Z=>{if(Z.type==="start"){const{data:{videoEl:x,stream:M,constraints:j}}=Z;return G||ce!==x||q!==j?ae(x,M).then(()=>re(ce,q)):Z}return re(ce,q)}),(await V.current).type==="stop")throw new Error("Something went wrong with the camera task queue (start task).")},[re,ae]),le=k.useCallback(async()=>{if(V.current=V.current.then(ce=>{if(ce.type==="stop")return ce;const{data:{videoEl:q,stream:G}}=ce;return ae(q,G)}),(await V.current).type==="start")throw new Error("Something went wrong with the camera task queue (stop task).")},[ae]),xe=k.useCallback(async ce=>{const q=R.current;if(!q)throw new Error("No active video track found.");{ce.advanced&&ce.advanced[0].zoom&&q.getCapabilities().torch&&await q.applyConstraints({advanced:[{torch:!1}]}),await q.applyConstraints(ce);const G=q.getCapabilities(),Z=q.getSettings();W(G),ne(Z)}},[]);return k.useEffect(()=>()=>{(async()=>await le())()},[le]),{capabilities:U,settings:z,startCamera:ge,stopCamera:le,updateConstraints:xe}}(),{startScanning:N,stopScanning:I}=function(V){const{videoElementRef:K,onScan:R,onFound:U,retryDelay:W=100,scanDelay:z=0,formats:ne=[],audio:re=!0,allowMultiple:ae=!1}=V,ge=k.useRef(new Ha({formats:ne})),le=k.useRef(null),xe=k.useRef(null);k.useEffect(()=>{ge.current=new Ha({formats:ne})},[ne]),k.useEffect(()=>{typeof window<"u"&&re&&(le.current=new Audio(ny))},[re]);const ce=k.useCallback(q=>async G=>{if(K.current!==null&&K.current.readyState>1){const{lastScan:Z,contentBefore:x,lastScanHadContent:M}=q;if(G-Z<W)xe.current=window.requestAnimationFrame(ce(q));else{const j=await ge.current.detect(K.current),B=j.some(Y=>!x.includes(Y.rawValue)),X=j.length>0;let te=q.lastOnScan;(B||ae&&X&&G-te>=z)&&(re&&le.current&&le.current.paused&&le.current.play().catch(Y=>console.error("Error playing the sound",Y)),te=G,R(j)),X&&U(j),!X&&M&&U(j);const ee={lastScan:G,lastOnScan:te,lastScanHadContent:X,contentBefore:B?j.map(Y=>Y.rawValue):x};xe.current=window.requestAnimationFrame(ce(ee))}}},[K.current,R,U,W]);return{startScanning:k.useCallback(()=>{const q=performance.now(),G={lastScan:q,lastOnScan:q,contentBefore:[],lastScanHadContent:!1};xe.current=window.requestAnimationFrame(ce(G))},[ce]),stopScanning:k.useCallback(()=>{xe.current!==null&&(window.cancelAnimationFrame(xe.current),xe.current=null)},[])}}({videoElementRef:u,onScan:n,onFound:V=>function(K,R,U,W){const z=U;if(z==null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas is always defined.");const ne=R;if(ne==null)throw new Error("onFound handler should only be called when component is mounted. Thus video element is always defined.");if(K.length===0||W===void 0)go(z);else{const re=ne.offsetWidth,ae=ne.offsetHeight,ge=ne.videoWidth,le=ne.videoHeight,xe=Math.max(re/ge,ae/le),ce=ge*xe,q=le*xe,G=ce/ge,Z=q/le,x=(re-ce)/2,M=(ae-q)/2,j=({x:ee,y:Y})=>({x:Math.floor(ee*G),y:Math.floor(Y*Z)}),B=({x:ee,y:Y})=>({x:Math.floor(ee+x),y:Math.floor(Y+M)}),X=K.map(ee=>{const{boundingBox:Y,cornerPoints:ve}=ee,{x:Ee,y:fe}=B(j({x:Y.x,y:Y.y})),{x:pe,y:Oe}=j({x:Y.width,y:Y.height});return{...ee,cornerPoints:ve.map(me=>B(j(me))),boundingBox:DOMRectReadOnly.fromRect({x:Ee,y:fe,width:pe,height:Oe})}});z.width=ne.offsetWidth,z.height=ne.offsetHeight;const te=z.getContext("2d");if(te===null)throw new Error("onFound handler should only be called when component is mounted. Thus tracking canvas 2D context is always defined.");W(X,te)}}(V,u.current,o.current,p.tracker),formats:i,audio:p.audio,allowMultiple:d,retryDelay:p.tracker===void 0?500:10,scanDelay:E});k.useEffect(()=>(m(!0),()=>{m(!1)}),[]),k.useEffect(()=>{f&&(I(),N())},[s==null?void 0:s.tracker]),k.useEffect(()=>{if(!Sc(l,S)){const V=l;r!=null&&r.deviceId&&delete V.facingMode,D(V)}},[r]);const _=k.useMemo(()=>({constraints:S,shouldStream:f&&!a}),[S,f,a]),Q=async()=>{const V=u.current;if(V==null)throw new Error("Video should be defined when component is mounted.");const K=w.current;if(K==null)throw new Error("Canvas should be defined when component is mounted.");const R=K.getContext("2d");if(R==null)throw new Error("Canvas should be defined when component is mounted.");if(_.shouldStream){await A.stopCamera(),C(!1);try{await A.startCamera(V,_),V?C(!0):await A.stopCamera()}catch(U){console.error("error",U)}}else K.width=V.videoWidth,K.height=V.videoHeight,R.drawImage(V,0,0,V.videoWidth,V.videoHeight),await A.stopCamera(),C(!1)};k.useEffect(()=>{(async()=>await Q())()},[_]);const $=k.useMemo(()=>_.shouldStream&&b,[_.shouldStream,b]);return k.useEffect(()=>{if($){if(w.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus pause frame canvas is defined");if(go(w.current),o.current===void 0)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus tracking canvas is defined");if(go(o.current),u.current==null)throw new Error("shouldScan effect should only be triggered when component is mounted. Thus video element is defined");N()}},[$]),k.createElement("div",{style:{...X0,...h==null?void 0:h.container},className:g==null?void 0:g.container},k.createElement("video",{ref:u,style:{...ey,...h==null?void 0:h.video,visibility:a?"hidden":"visible"},className:g==null?void 0:g.video,autoPlay:!0,muted:!0,playsInline:!0}),k.createElement("canvas",{ref:w,style:{display:a?"block":"none",position:"absolute",top:0,left:0,width:"100%"}}),k.createElement("canvas",{ref:o,style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}}),k.createElement("div",{style:{top:0,left:0,position:"absolute",width:"100%",height:"100%"}},p.finder&&k.createElement(J0,{scanning:b,capabilities:A.capabilities,loading:!1,onOff:p.onOff,zoom:p.zoom&&A.settings.zoom?{value:A.settings.zoom,onChange:async V=>{const K={...S,advanced:[{zoom:V}]};await A.updateConstraints(K)}}:void 0,torch:p.torch?{status:(t=A.settings.torch)!==null&&t!==void 0&&t,toggle:async V=>{const K={...S,advanced:[{torch:V}]};await A.updateConstraints(K)}}:void 0,startScanning:async()=>await Q(),stopScanning:async()=>{await A.stopCamera(),go(o.current),C(!1)},border:h==null?void 0:h.finderBorder}),c))}const iy="data:image/svg+xml,%3csvg%20height='24'%20viewBox='0%200%2024%2024'%20width='24'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='m21.25%207.5c.3796958%200%20.693491.28215388.7431534.64822944l.0068466.10177056v8.5c0%201.7330315-1.3564548%203.1492459-3.0655761%203.2448552l-.1844239.0051448h-12.689l.71933009.7196699c.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184c-.26626657.2662665-.68293025.2904726-.97654174.0726181l-.08411844-.0726181-2-2-.06339799-.0720275c-.00244939-.0031685-.00487398-.0063571-.00727348-.0095656l.07067147.0815931c-.03705327-.0370533-.06941902-.077019-.09709724-.1191603-.01316484-.0201549-.025545-.0411423-.03690171-.0627516-.00483354-.0091218-.00919014-.0178526-.01336588-.0266478-.01274712-.0267885-.02425172-.0552483-.03400215-.0845099-.00225837-.0069437-.00418282-.0130149-.00602813-.019105-.02092163-.0684786-.0322748-.1419912-.0322748-.2181555%200-.0383922.00288471-.0761107.00844919-.1129505.00180466-.0115676.0038603-.0232773.00619514-.0349422.00494363-.0250031.01111685-.0492994.01844184-.073091.00362656-.0116598.00765847-.0237092.01200456-.0356703.00848426-.0232976.01778613-.0453662.02808241-.0668678.00549219-.0116011.01179514-.0239381.01846187-.0361292.01323523-.0240158.02734042-.0467392.04258121-.0686124.00392129-.0057417.00832657-.0118713.01283554-.0179483.0251194-.0332177.04801831-.0595185.07261815-.0841184l2-2c.29289322-.2928932.76776696-.2928932%201.06066018%200%20.26626656.2662666.29047261.6829303.07261815.9765418l-.07261815.0841184-.72033009.7196699h12.69c.9181734%200%201.6711923-.7071103%201.7441988-1.6064728l.0058012-.1435272v-8.5c0-.41421356.3357864-.75.75-.75zm-3.0537883-5.35294824.0841184.07261815%202%202c.0254481.02544812.049076.05271652.0706715.08159313l-.0706715-.08159313c.0370533.03705328.069419.07701901.0970972.1191603.0131649.02015493.025545.04114226.0369017.06275154.0048336.00912187.0091902.01785262.0133659.02664784.0127471.02678853.0242517.0552483.0340022.08450994.0022583.00694369.0041828.01301489.0060281.01910493.0209216.06847868.0322748.14199127.0322748.21815554%200%20.03839224-.0028847.07611073-.0084492.11295053-.0014988.0095454-.0031606.01924362-.0050138.02891241-.0051364.02710922-.0117072.05340972-.0196232.07912072-.0036265.0116598-.0076584.02370928-.0120045.03567032-.0084843.02329763-.0177862.04536621-.0280824.06686781-.0054922.01160108-.0117952.02393815-.0184619.03612923-.0132352.02401575-.0273404.04673917-.0425812.06861233-.0039213.00574174-.0083266.01187138-.0128356.0179483-.023778.03144192-.0451015.05615345-.0679264.07938506l-.0046917.00473338-2%202c-.2928932.29289321-.767767.29289321-1.0606602%200-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844.7183301-.71966991h-12.688c-.9181734%200-1.67119234.70711027-1.7441988%201.60647279l-.0058012.14352721v8.5c0%20.4142136-.33578644.75-.75.75-.37969577%200-.69349096-.2821539-.74315338-.6482294l-.00684662-.1017706v-8.5c0-1.73303146%201.35645477-3.14924593%203.06557609-3.24485521l.18442391-.00514479h12.689l-.7193301-.71966991c-.2662665-.26626657-.2904726-.68293025-.0726181-.97654174l.0726181-.08411844c.2662666-.26626656.6829303-.29047261.9765418-.07261815zm-6.1962117%205.85294824c2.209139%200%204%201.790861%204%204s-1.790861%204-4%204-4-1.790861-4-4%201.790861-4%204-4zm0%201.5c-1.3807119%200-2.5%201.1192881-2.5%202.5s1.1192881%202.5%202.5%202.5%202.5-1.1192881%202.5-2.5-1.1192881-2.5-2.5-2.5z'%20fill='%23212121'/%3e%3c/svg%3e";function oy({onScan:e,label:t=""}){const[n,r]=k.useState("user");return T.jsxs("div",{className:"flex flex-col gap-1",children:[T.jsx("p",{children:`Scan ${t==null?void 0:t.toLowerCase()}`}),T.jsxs("div",{className:"relative",children:[T.jsx(ry,{onScan:e,constraints:{facingMode:n},styles:{container:{borderRadius:"0.25rem",overflow:"hidden"},video:{borderRadius:"0.25rem"},finderBorder:100},allowMultiple:!0}),T.jsx("div",{className:"absolute right-2 top-2 flex h-10 w-10 cursor-pointer items-center justify-center rounded bg-white shadow-sm",onClick:()=>r(n==="user"?"environment":"user"),children:T.jsx("img",{src:iy,alt:"camera-switch"})})]})]})}function Tc(){return T.jsxs("div",{children:[T.jsx("div",{className:"flex animate-pulse justify-end space-y-4",children:T.jsx("div",{className:"h-8 w-32 rounded bg-gray-100"})},"skeleton-item-"),T.jsx("div",{className:"my-6 h-px w-full bg-gray-100"}),T.jsx("div",{className:"space-y-4",children:T.jsx("div",{className:"animate-pulse space-y-4",children:T.jsxs("div",{className:"grid grid-cols-2 gap-x-6 gap-y-2",children:[T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"}),T.jsx("div",{className:"h-12 w-full rounded bg-gray-100"})]})},"skeleton-item-")})]})}var ay=Object.defineProperty,sy=(e,t)=>{for(var n in t)ay(e,n,{get:t[n],enumerable:!0})},yn={};sy(yn,{assign:()=>cy,colors:()=>zn,createStringInterpolator:()=>rs,skipAnimation:()=>Mc,to:()=>Pc,willAdvance:()=>is});var Wa=ii(),Ke=e=>ri(e,Wa),Ja=ii();Ke.write=e=>ri(e,Ja);var mo=ii();Ke.onStart=e=>ri(e,mo);var za=ii();Ke.onFrame=e=>ri(e,za);var Za=ii();Ke.onFinish=e=>ri(e,Za);var Ar=[];Ke.setTimeout=(e,t)=>{const n=Ke.now()+t,r=()=>{const a=Ar.findIndex(s=>s.cancel==r);~a&&Ar.splice(a,1),Jn-=~a?1:0},i={time:n,handler:e,cancel:r};return Ar.splice(Oc(n),0,i),Jn+=1,Dc(),i};var Oc=e=>~(~Ar.findIndex(t=>t.time>e)||~Ar.length);Ke.cancel=e=>{mo.delete(e),za.delete(e),Za.delete(e),Wa.delete(e),Ja.delete(e)},Ke.sync=e=>{es=!0,Ke.batchedUpdates(e),es=!1},Ke.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,Ke.onStart(n)}return r.handler=e,r.cancel=()=>{mo.delete(n),t=null},r};var Xa=typeof window<"u"?window.requestAnimationFrame:()=>{};Ke.use=e=>Xa=e,Ke.now=typeof performance<"u"?()=>performance.now():Date.now,Ke.batchedUpdates=e=>e(),Ke.catch=console.error,Ke.frameLoop="always",Ke.advance=()=>{Ke.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):Rc()};var Wn=-1,Jn=0,es=!1;function ri(e,t){es?(t.delete(e),e(0)):(t.add(e),Dc())}function Dc(){Wn<0&&(Wn=0,Ke.frameLoop!=="demand"&&Xa(Ic))}function uy(){Wn=-1}function Ic(){~Wn&&(Xa(Ic),Ke.batchedUpdates(Rc))}function Rc(){const e=Wn;Wn=Ke.now();const t=Oc(Wn);if(t&&(Nc(Ar.splice(0,t),n=>n.handler()),Jn-=t),!Jn){uy();return}mo.flush(),Wa.flush(e?Math.min(64,Wn-e):16.667),za.flush(),Ja.flush(),Za.flush()}function ii(){let e=new Set,t=e;return{add(n){Jn+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return Jn-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,Jn-=t.size,Nc(t,r=>r(n)&&e.add(r)),Jn+=e.size,t=e)}}}function Nc(e,t){e.forEach(n=>{try{t(n)}catch(r){Ke.catch(r)}})}function ts(){}var ly=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),Te={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function Bn(e,t){if(Te.arr(e)){if(!Te.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var tt=(e,t)=>e.forEach(t);function In(e,t,n){if(Te.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var an=e=>Te.und(e)?[]:Te.arr(e)?e:[e];function oi(e,t){if(e.size){const n=Array.from(e);e.clear(),tt(n,t)}}var ai=(e,...t)=>oi(e,n=>n(...t)),ns=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),rs,Pc,zn=null,Mc=!1,is=ts,cy=e=>{e.to&&(Pc=e.to),e.now&&(Ke.now=e.now),e.colors!==void 0&&(zn=e.colors),e.skipAnimation!=null&&(Mc=e.skipAnimation),e.createStringInterpolator&&(rs=e.createStringInterpolator),e.requestAnimationFrame&&Ke.use(e.requestAnimationFrame),e.batchedUpdates&&(Ke.batchedUpdates=e.batchedUpdates),e.willAdvance&&(is=e.willAdvance),e.frameLoop&&(Ke.frameLoop=e.frameLoop)},si=new Set,ln=[],os=[],yo=0,vo={get idle(){return!si.size&&!ln.length},start(e){yo>e.priority?(si.add(e),Ke.onStart(fy)):(Bc(e),Ke(as))},advance:as,sort(e){if(yo)Ke.onFrame(()=>vo.sort(e));else{const t=ln.indexOf(e);~t&&(ln.splice(t,1),kc(e))}},clear(){ln=[],si.clear()}};function fy(){si.forEach(Bc),si.clear(),Ke(as)}function Bc(e){ln.includes(e)||kc(e)}function kc(e){ln.splice(dy(ln,t=>t.priority>e.priority),0,e)}function as(e){const t=os;for(let n=0;n<ln.length;n++){const r=ln[n];yo=r.priority,r.idle||(is(r),r.advance(e),r.idle||t.push(r))}return yo=0,os=ln,os.length=0,ln=t,ln.length>0}function dy(e,t){const n=e.findIndex(t);return n<0?e.length:n}var hy=(e,t,n)=>Math.min(Math.max(n,e),t),py={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},vn="[-+]?\\d*\\.?\\d+",bo=vn+"%";function wo(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var gy=new RegExp("rgb"+wo(vn,vn,vn)),my=new RegExp("rgba"+wo(vn,vn,vn,vn)),yy=new RegExp("hsl"+wo(vn,bo,bo)),vy=new RegExp("hsla"+wo(vn,bo,bo,vn)),by=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,wy=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,Ey=/^#([0-9a-fA-F]{6})$/,xy=/^#([0-9a-fA-F]{8})$/;function Cy(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=Ey.exec(e))?parseInt(t[1]+"ff",16)>>>0:zn&&zn[e]!==void 0?zn[e]:(t=gy.exec(e))?(Sr(t[1])<<24|Sr(t[2])<<16|Sr(t[3])<<8|255)>>>0:(t=my.exec(e))?(Sr(t[1])<<24|Sr(t[2])<<16|Sr(t[3])<<8|Lc(t[4]))>>>0:(t=by.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=xy.exec(e))?parseInt(t[1],16)>>>0:(t=wy.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=yy.exec(e))?(Fc(jc(t[1]),Eo(t[2]),Eo(t[3]))|255)>>>0:(t=vy.exec(e))?(Fc(jc(t[1]),Eo(t[2]),Eo(t[3]))|Lc(t[4]))>>>0:null}function ss(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Fc(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=ss(i,r,e+1/3),s=ss(i,r,e),c=ss(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(s*255)<<16|Math.round(c*255)<<8}function Sr(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function jc(e){return(parseFloat(e)%360+360)%360/360}function Lc(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Eo(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function _c(e){let t=Cy(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${a})`}var ui=(e,t,n)=>{if(Te.fun(e))return e;if(Te.arr(e))return ui({range:e,output:t,extrapolate:n});if(Te.str(e.output[0]))return rs(e);const r=e,i=r.output,a=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",c=r.extrapolateRight||r.extrapolate||"extend",h=r.easing||(g=>g);return g=>{const d=Sy(g,a);return Ay(g,a[d],a[d+1],i[d],i[d+1],h,s,c,r.map)}};function Ay(e,t,n,r,i,a,s,c,h){let g=h?h(e):e;if(g<t){if(s==="identity")return g;s==="clamp"&&(g=t)}if(g>n){if(c==="identity")return g;c==="clamp"&&(g=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?g=-g:n===1/0?g=g-t:g=(g-t)/(n-t),g=a(g),r===-1/0?g=-g:i===1/0?g=g+r:g=g*(i-r)+r,g)}function Sy(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var Ty=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return hy(0,1,i/e)},xo=1.70158,Co=xo*1.525,Vc=xo+1,qc=2*Math.PI/3,Uc=2*Math.PI/4.5,Ao=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,Oy={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>Vc*e*e*e-xo*e*e,easeOutBack:e=>1+Vc*Math.pow(e-1,3)+xo*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Co+1)*2*e-Co)/2:(Math.pow(2*e-2,2)*((Co+1)*(e*2-2)+Co)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*qc),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*qc)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*Uc))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*Uc)/2+1,easeInBounce:e=>1-Ao(1-e),easeOutBounce:Ao,easeInOutBounce:e=>e<.5?(1-Ao(1-2*e))/2:(1+Ao(2*e-1))/2,steps:Ty},li=Symbol.for("FluidValue.get"),Tr=Symbol.for("FluidValue.observers"),cn=e=>!!(e&&e[li]),nn=e=>e&&e[li]?e[li]():e,Gc=e=>e[Tr]||null;function Dy(e,t){e.eventObserved?e.eventObserved(t):e(t)}function ci(e,t){const n=e[Tr];n&&n.forEach(r=>{Dy(r,t)})}var Yc=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");Iy(this,e)}},Iy=(e,t)=>Kc(e,li,t);function Or(e,t){if(e[li]){let n=e[Tr];n||Kc(e,Tr,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function fi(e,t){const n=e[Tr];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Tr]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var Kc=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),So=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ry=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Qc=new RegExp(`(${So.source})(%|[a-z]+)`,"i"),Ny=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,To=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,$c=e=>{const[t,n]=Py(e);if(!t||ns())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&To.test(n))return $c(n);if(n)return n}return e},Py=e=>{const t=To.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},us,My=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,Hc=e=>{us||(us=zn?new RegExp(`(${Object.keys(zn).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>nn(a).replace(To,$c).replace(Ry,_c).replace(us,_c)),n=t.map(a=>a.match(So).map(Number)),i=n[0].map((a,s)=>n.map(c=>{if(!(s in c))throw Error('The arity of each "output" value must be equal');return c[s]})).map(a=>ui({...e,output:a}));return a=>{var h;const s=!Qc.test(t[0])&&((h=t.find(g=>Qc.test(g)))==null?void 0:h.replace(So,""));let c=0;return t[0].replace(So,()=>`${i[c++](a)}${s||""}`).replace(Ny,My)}},ls="react-spring: ",Wc=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${ls}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},By=Wc(console.warn);function ky(){By(`${ls}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var Fy=Wc(console.warn);function jy(){Fy(`${ls}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function Oo(e){return Te.str(e)&&(e[0]=="#"||/\d/.test(e)||!ns()&&To.test(e)||e in(zn||{}))}var cs=ns()?k.useEffect:k.useLayoutEffect,Ly=()=>{const e=k.useRef(!1);return cs(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function Jc(){const e=k.useState()[1],t=Ly();return()=>{t.current&&e(Math.random())}}function _y(e,t){const[n]=k.useState(()=>({inputs:t,result:e()})),r=k.useRef(),i=r.current;let a=i;return a?t&&a.inputs&&Vy(t,a.inputs)||(a={inputs:t,result:e()}):a=n,k.useEffect(()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)},[a]),a.result}function Vy(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var zc=e=>k.useEffect(e,qy),qy=[];function Zc(e){const t=k.useRef();return k.useEffect(()=>{t.current=e}),t.current}var di=Symbol.for("Animated:node"),Uy=e=>!!e&&e[di]===e,Rn=e=>e&&e[di],fs=(e,t)=>ly(e,di,t),Do=e=>e&&e[di]&&e[di].getPayload(),Xc=class{constructor(){fs(this,this)}getPayload(){return this.payload||[]}},hi=class extends Xc{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,Te.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new hi(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return Te.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,Te.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},pi=class extends hi{constructor(e){super(0),this._string=null,this._toString=ui({output:[e,e]})}static create(e){return new pi(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(Te.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=ui({output:[this.getValue(),e]})),this._value=0,super.reset()}},Io={dependencies:null},Ro=class extends Xc{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return In(this.source,(n,r)=>{Uy(n)?t[r]=n.getValue(e):cn(n)?t[r]=nn(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&tt(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return In(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){Io.dependencies&&cn(e)&&Io.dependencies.add(e);const t=Do(e);t&&tt(t,n=>this.add(n))}},ef=class extends Ro{constructor(e){super(e)}static create(e){return new ef(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(Gy)),!0)}};function Gy(e){return(Oo(e)?pi:hi).create(e)}function ds(e){const t=Rn(e);return t?t.constructor:Te.arr(e)?ef:Oo(e)?pi:hi}var tf=(e,t)=>{const n=!Te.fun(e)||e.prototype&&e.prototype.isReactComponent;return k.forwardRef((r,i)=>{const a=k.useRef(null),s=n&&k.useCallback(o=>{a.current=Qy(i,o)},[i]),[c,h]=Ky(r,t),g=Jc(),d=()=>{const o=a.current;if(n&&!o)return;(o?t.applyAnimatedValues(o,c.getValue(!0)):!1)===!1&&g()},E=new Yy(d,h),u=k.useRef();cs(()=>(u.current=E,tt(h,o=>Or(o,E)),()=>{u.current&&(tt(u.current.deps,o=>fi(o,u.current)),Ke.cancel(u.current.update))})),k.useEffect(d,[]),zc(()=>()=>{const o=u.current;tt(o.deps,l=>fi(l,o))});const w=t.getComponentProps(c.getValue());return be.createElement(e,{...w,ref:s})})},Yy=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Ke.write(this.update)}};function Ky(e,t){const n=new Set;return Io.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new Ro(e),Io.dependencies=null,[e,n]}function Qy(e,t){return e&&(Te.fun(e)?e(t):e.current=t),t}var nf=Symbol.for("AnimatedComponent"),$y=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new Ro(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=s=>{const c=rf(s)||"Anonymous";return Te.str(s)?s=a[s]||(a[s]=tf(s,i)):s=s[nf]||(s[nf]=tf(s,i)),s.displayName=`Animated(${c})`,s};return In(e,(s,c)=>{Te.arr(e)&&(c=rf(s)),a[c]=a(s)}),{animated:a}},rf=e=>Te.str(e)?e:e&&Te.str(e.displayName)?e.displayName:Te.fun(e)&&e.name||null;function or(e,...t){return Te.fun(e)?e(...t):e}var gi=(e,t)=>e===!0||!!(t&&e&&(Te.fun(e)?e(t):an(e).includes(t))),of=(e,t)=>Te.obj(e)?t&&e[t]:e,af=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,Hy=e=>e,hs=(e,t=Hy)=>{let n=Wy;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const a=t(e[i],i);Te.und(a)||(r[i]=a)}return r},Wy=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Jy={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function zy(e){const t={};let n=0;if(In(e,(r,i)=>{Jy[i]||(t[i]=r,n++)}),n)return t}function sf(e){const t=zy(e);if(t){const n={to:t};return In(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function mi(e){return e=nn(e),Te.arr(e)?e.map(mi):Oo(e)?yn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Zy(e){for(const t in e)return!0;return!1}function ps(e){return Te.fun(e)||Te.arr(e)&&Te.obj(e[0])}function Xy(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function ev(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}var tv={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},gs={...tv.default,mass:1,damping:1,easing:Oy.linear,clamp:!1},nv=class{constructor(){this.velocity=0,Object.assign(this,gs)}};function rv(e,t,n){n&&(n={...n},uf(n,t),t={...n,...t}),uf(e,t),Object.assign(e,t);for(const s in gs)e[s]==null&&(e[s]=gs[s]);let{frequency:r,damping:i}=e;const{mass:a}=e;return Te.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*i*a/r),e}function uf(e,t){if(!Te.und(t.decay))e.duration=void 0;else{const n=!Te.und(t.tension)||!Te.und(t.friction);(n||!Te.und(t.frequency)||!Te.und(t.damping)||!Te.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var lf=[],iv=class{constructor(){this.changed=!1,this.values=lf,this.toValues=null,this.fromValues=lf,this.config=new nv,this.immediate=!1}};function cf(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((s,c)=>{let h,g,d=gi(n.cancel??(r==null?void 0:r.cancel),t);if(d)w();else{Te.und(n.pause)||(i.paused=gi(n.pause,t));let o=r==null?void 0:r.pause;o!==!0&&(o=i.paused||gi(o,t)),h=or(n.delay||0,t),o?(i.resumeQueue.add(u),a.pause()):(a.resume(),u())}function E(){i.resumeQueue.add(u),i.timeouts.delete(g),g.cancel(),h=g.time-Ke.now()}function u(){h>0&&!yn.skipAnimation?(i.delayed=!0,g=Ke.setTimeout(w,h),i.pauseQueue.add(E),i.timeouts.add(g)):w()}function w(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(E),i.timeouts.delete(g),e<=(i.cancelId||0)&&(d=!0);try{a.start({...n,callId:e,cancel:d},s)}catch(o){c(o)}}})}var ms=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Dr(e.get()):t.every(n=>n.noop)?ff(e.get()):bn(e.get(),t.every(n=>n.finished)),ff=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),bn=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Dr=e=>({value:e,cancelled:!0,finished:!1});function df(e,t,n,r){const{callId:i,parentId:a,onRest:s}=t,{asyncTo:c,promise:h}=n;return!a&&e===c&&!t.reset?h:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const g=hs(t,(p,f)=>f==="onRest"?void 0:p);let d,E;const u=new Promise((p,f)=>(d=p,E=f)),w=p=>{const f=i<=(n.cancelId||0)&&Dr(r)||i!==n.asyncId&&bn(r,!1);if(f)throw p.result=f,E(p),p},o=(p,f)=>{const m=new hf,b=new pf;return(async()=>{if(yn.skipAnimation)throw yi(n),b.result=bn(r,!1),E(b),b;w(m);const C=Te.obj(p)?{...p}:{...f,to:p};C.parentId=i,In(g,(D,A)=>{Te.und(C[A])&&(C[A]=D)});const S=await r.start(C);return w(m),n.paused&&await new Promise(D=>{n.resumeQueue.add(D)}),S})()};let l;if(yn.skipAnimation)return yi(n),bn(r,!1);try{let p;Te.arr(e)?p=(async f=>{for(const m of f)await o(m)})(e):p=Promise.resolve(e(o,r.stop.bind(r))),await Promise.all([p.then(d),u]),l=bn(r.get(),!0,!1)}catch(p){if(p instanceof hf)l=p.result;else if(p instanceof pf)l=p.result;else throw p}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?c:void 0,n.promise=a?h:void 0)}return Te.fun(s)&&Ke.batchedUpdates(()=>{s(l,r,r.item)}),l})()}function yi(e,t){oi(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var hf=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},pf=class extends Error{constructor(){super("SkipAnimationSignal")}},ys=e=>e instanceof vs,ov=1,vs=class extends Yc{constructor(){super(...arguments),this.id=ov++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Rn(this);return e&&e.getValue()}to(...e){return yn.to(this,e)}interpolate(...e){return ky(),yn.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){ci(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||vo.sort(this),ci(this,{type:"priority",parent:this,priority:e})}},ar=Symbol.for("SpringPhase"),gf=1,bs=2,ws=4,Es=e=>(e[ar]&gf)>0,Zn=e=>(e[ar]&bs)>0,vi=e=>(e[ar]&ws)>0,mf=(e,t)=>t?e[ar]|=bs|gf:e[ar]&=~bs,yf=(e,t)=>t?e[ar]|=ws:e[ar]&=~ws,av=class extends vs{constructor(e,t){if(super(),this.animation=new iv,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!Te.und(e)||!Te.und(t)){const n=Te.obj(e)?{...e}:{...t,from:e};Te.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!(Zn(this)||this._state.asyncTo)||vi(this)}get goal(){return nn(this.animation.to)}get velocity(){const e=Rn(this);return e instanceof hi?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return Es(this)}get isAnimating(){return Zn(this)}get isPaused(){return vi(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:a}=r,s=Do(r.to);!s&&cn(r.to)&&(i=an(nn(r.to))),r.values.forEach((g,d)=>{if(g.done)return;const E=g.constructor==pi?1:s?s[d].lastPosition:i[d];let u=r.immediate,w=E;if(!u){if(w=g.lastPosition,a.tension<=0){g.done=!0;return}let o=g.elapsedTime+=e;const l=r.fromValues[d],p=g.v0!=null?g.v0:g.v0=Te.arr(a.velocity)?a.velocity[d]:a.velocity;let f;const m=a.precision||(l==E?.005:Math.min(1,Math.abs(E-l)*.001));if(Te.und(a.duration))if(a.decay){const b=a.decay===!0?.998:a.decay,C=Math.exp(-(1-b)*o);w=l+p/(1-b)*(1-C),u=Math.abs(g.lastPosition-w)<=m,f=p*C}else{f=g.lastVelocity==null?p:g.lastVelocity;const b=a.restVelocity||m/10,C=a.clamp?0:a.bounce,S=!Te.und(C),D=l==E?g.v0>0:l<E;let A,N=!1;const I=1,_=Math.ceil(e/I);for(let Q=0;Q<_&&(A=Math.abs(f)>b,!(!A&&(u=Math.abs(E-w)<=m,u)));++Q){S&&(N=w==E||w>E==D,N&&(f=-f*C,w=E));const $=-a.tension*1e-6*(w-E),V=-a.friction*.001*f,K=($+V)/a.mass;f=f+K*I,w=w+f*I}}else{let b=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,g.durationProgress>0&&(g.elapsedTime=a.duration*g.durationProgress,o=g.elapsedTime+=e)),b=(a.progress||0)+o/this._memoizedDuration,b=b>1?1:b<0?0:b,g.durationProgress=b),w=l+a.easing(b)*(E-l),f=(w-g.lastPosition)/e,u=b==1}g.lastVelocity=f,Number.isNaN(w)&&(console.warn("Got NaN while animating:",this),u=!0)}s&&!s[d].done&&(u=!1),u?g.done=!0:t=!1,g.setValue(w,a.round)&&(n=!0)});const c=Rn(this),h=c.getValue();if(t){const g=nn(r.to);(h!==g||n)&&!a.decay?(c.setValue(g),this._onChange(g)):n&&a.decay&&this._onChange(h),this._stop()}else n&&this._onChange(h)}set(e){return Ke.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if(Zn(this)){const{to:e,config:t}=this.animation;Ke.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return Te.und(e)?(n=this.queue||[],this.queue=[]):n=[Te.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>ms(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),yi(this._state,e&&this._lastCallId),Ke.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=Te.obj(n)?n[t]:n,(n==null||ps(n))&&(n=void 0),r=Te.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return Es(this)||(e.reverse&&([n,r]=[r,n]),r=nn(r),Te.und(r)?Rn(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,hs(e,(s,c)=>/^on/.test(c)?of(s,n):s)),wf(this,e,"onProps"),Ei(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const a=this._state;return cf(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{vi(this)||(yf(this,!0),ai(a.pauseQueue),Ei(this,"onPause",bn(this,bi(this,this.animation.to)),this))},resume:()=>{vi(this)&&(yf(this,!1),Zn(this)&&this._resume(),ai(a.resumeQueue),Ei(this,"onResume",bn(this,bi(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(s=>{if(e.loop&&s.finished&&!(t&&s.noop)){const c=vf(e);if(c)return this._update(c,!0)}return s})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Dr(this));const r=!Te.und(e.to),i=!Te.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Dr(this));const{key:a,defaultProps:s,animation:c}=this,{to:h,from:g}=c;let{to:d=h,from:E=g}=e;i&&!r&&(!t.default||Te.und(d))&&(d=E),t.reverse&&([d,E]=[E,d]);const u=!Bn(E,g);u&&(c.from=E),E=nn(E);const w=!Bn(d,h);w&&this._focus(d);const o=ps(t.to),{config:l}=c,{decay:p,velocity:f}=l;(r||i)&&(l.velocity=0),t.config&&!o&&rv(l,or(t.config,a),t.config!==s.config?or(s.config,a):void 0);let m=Rn(this);if(!m||Te.und(d))return n(bn(this,!0));const b=Te.und(t.reset)?i&&!t.default:!Te.und(E)&&gi(t.reset,a),C=b?E:this.get(),S=mi(d),D=Te.num(S)||Te.arr(S)||Oo(S),A=!o&&(!D||gi(s.immediate||t.immediate,a));if(w){const Q=ds(d);if(Q!==m.constructor)if(A)m=this._set(S);else throw Error(`Cannot animate between ${m.constructor.name} and ${Q.name}, as the "to" prop suggests`)}const N=m.constructor;let I=cn(d),_=!1;if(!I){const Q=b||!Es(this)&&u;(w||Q)&&(_=Bn(mi(C),S),I=!_),(!Bn(c.immediate,A)&&!A||!Bn(l.decay,p)||!Bn(l.velocity,f))&&(I=!0)}if(_&&Zn(this)&&(c.changed&&!b?I=!0:I||this._stop(h)),!o&&((I||cn(h))&&(c.values=m.getPayload(),c.toValues=cn(d)?null:N==pi?[1]:an(S)),c.immediate!=A&&(c.immediate=A,!A&&!b&&this._set(h)),I)){const{onRest:Q}=c;tt(uv,V=>wf(this,t,V));const $=bn(this,bi(this,h));ai(this._pendingCalls,$),this._pendingCalls.add(n),c.changed&&Ke.batchedUpdates(()=>{var V;c.changed=!b,Q==null||Q($,this),b?or(s.onRest,$):(V=c.onStart)==null||V.call(c,$,this)})}b&&this._set(C),o?n(df(t.to,t,this._state,this)):I?this._start():Zn(this)&&!w?this._pendingCalls.add(n):n(ff(C))}_focus(e){const t=this.animation;e!==t.to&&(Gc(this)&&this._detach(),t.to=e,Gc(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;cn(t)&&(Or(t,this),ys(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;cn(e)&&fi(e,this)}_set(e,t=!0){const n=nn(e);if(!Te.und(n)){const r=Rn(this);if(!r||!Bn(n,r.getValue())){const i=ds(n);!r||r.constructor!=i?fs(this,i.create(n)):r.setValue(n),r&&Ke.batchedUpdates(()=>{this._onChange(n,t)})}}return Rn(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,Ei(this,"onStart",bn(this,bi(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),or(this.animation.onChange,e,this)),or(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Rn(this).reset(nn(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),Zn(this)||(mf(this,!0),vi(this)||this._resume())}_resume(){yn.skipAnimation?this.finish():vo.start(this)}_stop(e,t){if(Zn(this)){mf(this,!1);const n=this.animation;tt(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),ci(this,{type:"idle",parent:this});const r=t?Dr(this.get()):bn(this.get(),bi(this,e??n.to));ai(this._pendingCalls,r),n.changed&&(n.changed=!1,Ei(this,"onRest",r,this))}}};function bi(e,t){const n=mi(t),r=mi(e.get());return Bn(r,n)}function vf(e,t=e.loop,n=e.to){const r=or(t);if(r){const i=r!==!0&&sf(r),a=(i||e).reverse,s=!i||i.reset;return wi({...e,loop:t,default:!1,pause:void 0,to:!a||ps(n)?n:void 0,from:s?e.from:void 0,reset:s,...i})}}function wi(e){const{to:t,from:n}=e=sf(e),r=new Set;return Te.obj(t)&&bf(t,r),Te.obj(n)&&bf(n,r),e.keys=r.size?Array.from(r):null,e}function sv(e){const t=wi(e);return Te.und(t.default)&&(t.default=hs(t)),t}function bf(e,t){In(e,(n,r)=>n!=null&&t.add(r))}var uv=["onStart","onRest","onChange","onPause","onResume"];function wf(e,t,n){e.animation[n]=t[n]!==af(t,n)?of(t[n],e.key):void 0}function Ei(e,t,...n){var r,i,a,s;(i=(r=e.animation)[t])==null||i.call(r,...n),(s=(a=e.defaultProps)[t])==null||s.call(a,...n)}var lv=["onStart","onChange","onRest"],cv=1,fv=class{constructor(e,t){this.id=cv++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];Te.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(wi(e)),this}start(e){let{queue:t}=this;return e?t=an(e).map(wi):this.queue=[],this._flush?this._flush(this,t):(Tf(this,t),xs(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;tt(an(t),r=>n[r].stop(!!e))}else yi(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(Te.und(e))this.start({pause:!0});else{const t=this.springs;tt(an(e),n=>t[n].pause())}return this}resume(e){if(Te.und(e))this.start({pause:!1});else{const t=this.springs;tt(an(e),n=>t[n].resume())}return this}each(e){In(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,oi(e,([c,h])=>{h.value=this.get(),c(h,this,this._item)}));const a=!r&&this._started,s=i||a&&n.size?this.get():null;i&&t.size&&oi(t,([c,h])=>{h.value=s,c(h,this,this._item)}),a&&(this._started=!1,oi(n,([c,h])=>{h.value=s,c(h,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Ke.onFrame(this._onFrame)}};function xs(e,t){return Promise.all(t.map(n=>Ef(e,n))).then(n=>ms(e,n))}async function Ef(e,t,n){const{keys:r,to:i,from:a,loop:s,onRest:c,onResolve:h}=t,g=Te.obj(t.default)&&t.default;s&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);const d=Te.arr(i)||Te.fun(i)?i:void 0;d?(t.to=void 0,t.onRest=void 0,g&&(g.onRest=void 0)):tt(lv,l=>{const p=t[l];if(Te.fun(p)){const f=e._events[l];t[l]=({finished:m,cancelled:b})=>{const C=f.get(p);C?(m||(C.finished=!1),b&&(C.cancelled=!0)):f.set(p,{value:null,finished:m||!1,cancelled:b||!1})},g&&(g[l]=t[l])}});const E=e._state;t.pause===!E.paused?(E.paused=t.pause,ai(t.pause?E.pauseQueue:E.resumeQueue)):E.paused&&(t.pause=!0);const u=(r||Object.keys(e.springs)).map(l=>e.springs[l].start(t)),w=t.cancel===!0||af(t,"cancel")===!0;(d||w&&E.asyncId)&&u.push(cf(++e._lastAsyncId,{props:t,state:E,actions:{pause:ts,resume:ts,start(l,p){w?(yi(E,e._lastAsyncId),p(Dr(e))):(l.onRest=c,p(df(d,l,E,e)))}}})),E.paused&&await new Promise(l=>{E.resumeQueue.add(l)});const o=ms(e,await Promise.all(u));if(s&&o.finished&&!(n&&o.noop)){const l=vf(t,s,i);if(l)return Tf(e,[l]),Ef(e,l,!0)}return h&&Ke.batchedUpdates(()=>h(o,e,e.item)),o}function xf(e,t){const n={...e.springs};return t&&tt(an(t),r=>{Te.und(r.keys)&&(r=wi(r)),Te.obj(r.to)||(r={...r,to:void 0}),Sf(n,r,i=>Af(i))}),Cf(e,n),n}function Cf(e,t){In(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Or(n,e))})}function Af(e,t){const n=new av;return n.key=e,t&&Or(n,t),n}function Sf(e,t,n){t.keys&&tt(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function Tf(e,t){tt(t,n=>{Sf(e.springs,n,r=>Af(r,e))})}var No=({children:e,...t})=>{const n=k.useContext(Po),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=_y(()=>({pause:r,immediate:i}),[r,i]);const{Provider:a}=Po;return be.createElement(a,{value:t},e)},Po=dv(No,{});No.Provider=Po.Provider,No.Consumer=Po.Consumer;function dv(e,t){return Object.assign(e,be.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var hv=()=>{const e=[],t=function(r){jy();const i=[];return tt(e,(a,s)=>{if(Te.und(r))i.push(a.start());else{const c=n(r,a,s);c&&i.push(a.start(c))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return tt(e,r=>r.pause(...arguments)),this},t.resume=function(){return tt(e,r=>r.resume(...arguments)),this},t.set=function(r){tt(e,(i,a)=>{const s=Te.fun(r)?r(a,i):r;s&&i.set(s)})},t.start=function(r){const i=[];return tt(e,(a,s)=>{if(Te.und(r))i.push(a.start());else{const c=this._getProps(r,a,s);c&&i.push(a.start(c))}}),i},t.stop=function(){return tt(e,r=>r.stop(...arguments)),this},t.update=function(r){return tt(e,(i,a)=>i.update(this._getProps(r,i,a))),this};const n=function(r,i,a){return Te.fun(r)?r(a,i):r};return t._getProps=n,t};function pv(e,t,n){const r=Te.fun(t)&&t;r&&!n&&(n=[]);const i=k.useMemo(()=>r||arguments.length==3?hv():void 0,[]),a=k.useRef(0),s=Jc(),c=k.useMemo(()=>({ctrls:[],queue:[],flush(f,m){const b=xf(f,m);return a.current>0&&!c.queue.length&&!Object.keys(b).some(S=>!f.springs[S])?xs(f,m):new Promise(S=>{Cf(f,b),c.queue.push(()=>{S(xs(f,m))}),s()})}}),[]),h=k.useRef([...c.ctrls]),g=[],d=Zc(e)||0;k.useMemo(()=>{tt(h.current.slice(e,d),f=>{Xy(f,i),f.stop(!0)}),h.current.length=e,E(d,e)},[e]),k.useMemo(()=>{E(0,Math.min(d,e))},n);function E(f,m){for(let b=f;b<m;b++){const C=h.current[b]||(h.current[b]=new fv(null,c.flush)),S=r?r(b,C):t[b];S&&(g[b]=sv(S))}}const u=h.current.map((f,m)=>xf(f,g[m])),w=k.useContext(No),o=Zc(w),l=w!==o&&Zy(w);cs(()=>{a.current++,c.ctrls=h.current;const{queue:f}=c;f.length&&(c.queue=[],tt(f,m=>m())),tt(h.current,(m,b)=>{i==null||i.add(m),l&&m.start({default:w});const C=g[b];C&&(ev(m,C.ref),m.ref?m.queue.push(C):m.start(C))})}),zc(()=>()=>{tt(c.ctrls,f=>f.stop(!0))});const p=u.map(f=>({...f}));return i?[p,i]:p}function gv(e,t){const n=Te.fun(e),[[r],i]=pv(1,n?e:[e],n?[]:t);return n||arguments.length==2?[r,i]:r}var mv=class extends vs{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=ui(...t);const n=this._get(),r=ds(n);fs(this,r.create(n))}advance(e){const t=this._get(),n=this.get();Bn(t,n)||(Rn(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Of(this._active)&&Cs(this)}_get(){const e=Te.arr(this.source)?this.source.map(nn):an(nn(this.source));return this.calc(...e)}_start(){this.idle&&!Of(this._active)&&(this.idle=!1,tt(Do(this),e=>{e.done=!1}),yn.skipAnimation?(Ke.batchedUpdates(()=>this.advance()),Cs(this)):vo.start(this))}_attach(){let e=1;tt(an(this.source),t=>{cn(t)&&Or(t,this),ys(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){tt(an(this.source),e=>{cn(e)&&fi(e,this)}),this._active.clear(),Cs(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=an(this.source).reduce((t,n)=>Math.max(t,(ys(n)?n.priority:0)+1),0))}};function yv(e){return e.idle!==!1}function Of(e){return!e.size||Array.from(e).every(yv)}function Cs(e){e.idle||(e.idle=!0,tt(Do(e),t=>{t.done=!0}),ci(e,{type:"idle",parent:e}))}yn.assign({createStringInterpolator:Hc,to:(e,t)=>new mv(e,t)});var Df=/^--/;function vv(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!Df.test(e)&&!(xi.hasOwnProperty(e)&&xi[e])?t+"px":(""+t).trim()}var If={};function bv(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{style:r,children:i,scrollTop:a,scrollLeft:s,viewBox:c,...h}=t,g=Object.values(h),d=Object.keys(h).map(E=>n||e.hasAttribute(E)?E:If[E]||(If[E]=E.replace(/([A-Z])/g,u=>"-"+u.toLowerCase())));i!==void 0&&(e.textContent=i);for(const E in r)if(r.hasOwnProperty(E)){const u=vv(E,r[E]);Df.test(E)?e.style.setProperty(E,u):e.style[E]=u}d.forEach((E,u)=>{e.setAttribute(E,g[u])}),a!==void 0&&(e.scrollTop=a),s!==void 0&&(e.scrollLeft=s),c!==void 0&&e.setAttribute("viewBox",c)}var xi={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},wv=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Ev=["Webkit","Ms","Moz","O"];xi=Object.keys(xi).reduce((e,t)=>(Ev.forEach(n=>e[wv(n,t)]=e[t]),e),xi);var xv=/^(matrix|translate|scale|rotate|skew)/,Cv=/^(translate)/,Av=/^(rotate|skew)/,As=(e,t)=>Te.num(e)&&e!==0?e+t:e,Mo=(e,t)=>Te.arr(e)?e.every(n=>Mo(n,t)):Te.num(e)?e===t:parseFloat(e)===t,Sv=class extends Ro{constructor({x:e,y:t,z:n,...r}){const i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(s=>[`translate3d(${s.map(c=>As(c,"px")).join(",")})`,Mo(s,0)])),In(r,(s,c)=>{if(c==="transform")i.push([s||""]),a.push(h=>[h,h===""]);else if(xv.test(c)){if(delete r[c],Te.und(s))return;const h=Cv.test(c)?"px":Av.test(c)?"deg":"";i.push(an(s)),a.push(c==="rotate3d"?([g,d,E,u])=>[`rotate3d(${g},${d},${E},${As(u,h)})`,Mo(u,0)]:g=>[`${c}(${g.map(d=>As(d,h)).join(",")})`,Mo(g,c.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new Tv(i,a)),super(r)}},Tv=class extends Yc{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return tt(this.inputs,(n,r)=>{const i=nn(n[0]),[a,s]=this.transforms[r](Te.arr(i)?i:n.map(nn));e+=" "+a,t=t&&s}),t?"none":e}observerAdded(e){e==1&&tt(this.inputs,t=>tt(t,n=>cn(n)&&Or(n,this)))}observerRemoved(e){e==0&&tt(this.inputs,t=>tt(t,n=>cn(n)&&fi(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),ci(this,e)}},Ov=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];yn.assign({batchedUpdates:Vn.unstable_batchedUpdates,createStringInterpolator:Hc,colors:py});var Dv=$y(Ov,{applyAnimatedValues:bv,createAnimatedStyle:e=>new Sv(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),Iv=Dv.animated;function Rf(e){const{rows:t}=e,n=gv({from:{opacity:0},to:{opacity:1}});return T.jsxs(Iv.div,{style:n,className:"flex w-full animate-pulse flex-col items-start space-y-3",children:[[...Array(t)].map((r,i)=>T.jsx("div",{className:"h-16 w-full rounded-lg bg-gray-100 p-5"},`skeleton_rows_${i}`)),T.jsx("span",{className:"sr-only",children:"Loading..."})]})}function Rv({item:e}){return T.jsx("th",{className:`h-10 min-w-max items-center px-4 ${e.align==="left"?"text-start":e.align==="center"?"text-center":"text-end"}`,children:T.jsx(lt,{size:"xs",weight:"normal",color:"text-gray-700",children:e&&e.value})})}function Nv({row:e,onClick:t}){return T.jsx("tr",{children:e.columns.map((n,r)=>T.jsx("td",{children:T.jsx("div",{className:`my-auto flex h-12 w-full items-center ${n.align==="left"?"justify-start":n.align==="center"?"justify-center":"justify-end"} truncate px-4 font-thin`,children:n.value.type==="button_component"?T.jsx(gt,{label:n.value.label??"",disabled:n.value.disabled,onClick:()=>t&&t(n.value.id)}):T.jsx(lt,{size:"sm",weight:"light",color:"text-gray-700",children:n.value.title})})},`${n.value}-${r}`))})}function Pv(e){return T.jsx(T.Fragment,{children:[...Array(e.rows)].map((t,n)=>T.jsx("tr",{className:"border-b border-gray-50",children:[...Array(e.columns)].map((r,i)=>T.jsx("td",{className:"table-cell animate-pulse",children:T.jsx("div",{className:`flex grow items-center ${e.type=="double"?"h-[72px]":"h-12"}`,children:T.jsx("div",{className:"m-2 h-8 w-28 rounded-lg bg-gray-50"})})},`form_element_skeleton_col_${i}`))},`form_element_skeleton_${n}`))})}function Nf({header:e=[],rows:t=[],pending:n,onClick:r}){const{t:i}=mt();return T.jsxs("div",{className:"relative overflow-auto rounded-lg rounded-b-lg rounded-t-lg border border-gray-900/10",children:[T.jsxs("table",{className:"table w-full table-auto",children:[T.jsx("thead",{className:"sticky top-0 table-header-group w-full bg-gray-50",children:T.jsx("tr",{children:e.map((a,s)=>T.jsx(Rv,{item:a},`${a.value}-${s}`))})}),T.jsx("tbody",{children:n?T.jsx(Pv,{columns:e.length??5,rows:t.length??10}):t.map((a,s)=>T.jsx(Nv,{row:a,onClick:r},s))})]}),!t.length&&T.jsx("div",{className:"p-6",children:T.jsx(lt,{color:"text-gray-200",className:"text-center",size:"sm",children:i("noData")})})]})}function Ss(e){"@babel/helpers - typeof";return Ss=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ss(e)}function Pf(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Ss(XMLHttpRequest))==="object"}function Mv(e){return!!e&&typeof e.then=="function"}function Bv(e){return Mv(e)?e:Promise.resolve(e)}function kv(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ts={exports:{}},Bo={exports:{}},Mf;function Fv(){return Mf||(Mf=1,function(e,t){var n=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof hr<"u"&&hr,r=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(s){var c=typeof a<"u"&&a||typeof self<"u"&&self||typeof c<"u"&&c,h={searchParams:"URLSearchParams"in c,iterable:"Symbol"in c&&"iterator"in Symbol,blob:"FileReader"in c&&"Blob"in c&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in c,arrayBuffer:"ArrayBuffer"in c};function g(R){return R&&DataView.prototype.isPrototypeOf(R)}if(h.arrayBuffer)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],E=ArrayBuffer.isView||function(R){return R&&d.indexOf(Object.prototype.toString.call(R))>-1};function u(R){if(typeof R!="string"&&(R=String(R)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(R)||R==="")throw new TypeError('Invalid character in header field name: "'+R+'"');return R.toLowerCase()}function w(R){return typeof R!="string"&&(R=String(R)),R}function o(R){var U={next:function(){var W=R.shift();return{done:W===void 0,value:W}}};return h.iterable&&(U[Symbol.iterator]=function(){return U}),U}function l(R){this.map={},R instanceof l?R.forEach(function(U,W){this.append(W,U)},this):Array.isArray(R)?R.forEach(function(U){this.append(U[0],U[1])},this):R&&Object.getOwnPropertyNames(R).forEach(function(U){this.append(U,R[U])},this)}l.prototype.append=function(R,U){R=u(R),U=w(U);var W=this.map[R];this.map[R]=W?W+", "+U:U},l.prototype.delete=function(R){delete this.map[u(R)]},l.prototype.get=function(R){return R=u(R),this.has(R)?this.map[R]:null},l.prototype.has=function(R){return this.map.hasOwnProperty(u(R))},l.prototype.set=function(R,U){this.map[u(R)]=w(U)},l.prototype.forEach=function(R,U){for(var W in this.map)this.map.hasOwnProperty(W)&&R.call(U,this.map[W],W,this)},l.prototype.keys=function(){var R=[];return this.forEach(function(U,W){R.push(W)}),o(R)},l.prototype.values=function(){var R=[];return this.forEach(function(U){R.push(U)}),o(R)},l.prototype.entries=function(){var R=[];return this.forEach(function(U,W){R.push([W,U])}),o(R)},h.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);function p(R){if(R.bodyUsed)return Promise.reject(new TypeError("Already read"));R.bodyUsed=!0}function f(R){return new Promise(function(U,W){R.onload=function(){U(R.result)},R.onerror=function(){W(R.error)}})}function m(R){var U=new FileReader,W=f(U);return U.readAsArrayBuffer(R),W}function b(R){var U=new FileReader,W=f(U);return U.readAsText(R),W}function C(R){for(var U=new Uint8Array(R),W=new Array(U.length),z=0;z<U.length;z++)W[z]=String.fromCharCode(U[z]);return W.join("")}function S(R){if(R.slice)return R.slice(0);var U=new Uint8Array(R.byteLength);return U.set(new Uint8Array(R)),U.buffer}function D(){return this.bodyUsed=!1,this._initBody=function(R){this.bodyUsed=this.bodyUsed,this._bodyInit=R,R?typeof R=="string"?this._bodyText=R:h.blob&&Blob.prototype.isPrototypeOf(R)?this._bodyBlob=R:h.formData&&FormData.prototype.isPrototypeOf(R)?this._bodyFormData=R:h.searchParams&&URLSearchParams.prototype.isPrototypeOf(R)?this._bodyText=R.toString():h.arrayBuffer&&h.blob&&g(R)?(this._bodyArrayBuffer=S(R.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(R)||E(R))?this._bodyArrayBuffer=S(R):this._bodyText=R=Object.prototype.toString.call(R):this._bodyText="",this.headers.get("content-type")||(typeof R=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):h.searchParams&&URLSearchParams.prototype.isPrototypeOf(R)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},h.blob&&(this.blob=function(){var R=p(this);if(R)return R;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var R=p(this);return R||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(m)}),this.text=function(){var R=p(this);if(R)return R;if(this._bodyBlob)return b(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(C(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},h.formData&&(this.formData=function(){return this.text().then(_)}),this.json=function(){return this.text().then(JSON.parse)},this}var A=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function N(R){var U=R.toUpperCase();return A.indexOf(U)>-1?U:R}function I(R,U){if(!(this instanceof I))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');U=U||{};var W=U.body;if(R instanceof I){if(R.bodyUsed)throw new TypeError("Already read");this.url=R.url,this.credentials=R.credentials,U.headers||(this.headers=new l(R.headers)),this.method=R.method,this.mode=R.mode,this.signal=R.signal,!W&&R._bodyInit!=null&&(W=R._bodyInit,R.bodyUsed=!0)}else this.url=String(R);if(this.credentials=U.credentials||this.credentials||"same-origin",(U.headers||!this.headers)&&(this.headers=new l(U.headers)),this.method=N(U.method||this.method||"GET"),this.mode=U.mode||this.mode||null,this.signal=U.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&W)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(W),(this.method==="GET"||this.method==="HEAD")&&(U.cache==="no-store"||U.cache==="no-cache")){var z=/([?&])_=[^&]*/;if(z.test(this.url))this.url=this.url.replace(z,"$1_="+new Date().getTime());else{var ne=/\?/;this.url+=(ne.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function _(R){var U=new FormData;return R.trim().split("&").forEach(function(W){if(W){var z=W.split("="),ne=z.shift().replace(/\+/g," "),re=z.join("=").replace(/\+/g," ");U.append(decodeURIComponent(ne),decodeURIComponent(re))}}),U}function Q(R){var U=new l,W=R.replace(/\r?\n[\t ]+/g," ");return W.split("\r").map(function(z){return z.indexOf(`
75
+ `)===0?z.substr(1,z.length):z}).forEach(function(z){var ne=z.split(":"),re=ne.shift().trim();if(re){var ae=ne.join(":").trim();U.append(re,ae)}}),U}D.call(I.prototype);function $(R,U){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');U||(U={}),this.type="default",this.status=U.status===void 0?200:U.status,this.ok=this.status>=200&&this.status<300,this.statusText=U.statusText===void 0?"":""+U.statusText,this.headers=new l(U.headers),this.url=U.url||"",this._initBody(R)}D.call($.prototype),$.prototype.clone=function(){return new $(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},$.error=function(){var R=new $(null,{status:0,statusText:""});return R.type="error",R};var V=[301,302,303,307,308];$.redirect=function(R,U){if(V.indexOf(U)===-1)throw new RangeError("Invalid status code");return new $(null,{status:U,headers:{location:R}})},s.DOMException=c.DOMException;try{new s.DOMException}catch{s.DOMException=function(U,W){this.message=U,this.name=W;var z=Error(U);this.stack=z.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function K(R,U){return new Promise(function(W,z){var ne=new I(R,U);if(ne.signal&&ne.signal.aborted)return z(new s.DOMException("Aborted","AbortError"));var re=new XMLHttpRequest;function ae(){re.abort()}re.onload=function(){var le={status:re.status,statusText:re.statusText,headers:Q(re.getAllResponseHeaders()||"")};le.url="responseURL"in re?re.responseURL:le.headers.get("X-Request-URL");var xe="response"in re?re.response:re.responseText;setTimeout(function(){W(new $(xe,le))},0)},re.onerror=function(){setTimeout(function(){z(new TypeError("Network request failed"))},0)},re.ontimeout=function(){setTimeout(function(){z(new TypeError("Network request failed"))},0)},re.onabort=function(){setTimeout(function(){z(new s.DOMException("Aborted","AbortError"))},0)};function ge(le){try{return le===""&&c.location.href?c.location.href:le}catch{return le}}re.open(ne.method,ge(ne.url),!0),ne.credentials==="include"?re.withCredentials=!0:ne.credentials==="omit"&&(re.withCredentials=!1),"responseType"in re&&(h.blob?re.responseType="blob":h.arrayBuffer&&ne.headers.get("Content-Type")&&ne.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(re.responseType="arraybuffer")),U&&typeof U.headers=="object"&&!(U.headers instanceof l)?Object.getOwnPropertyNames(U.headers).forEach(function(le){re.setRequestHeader(le,w(U.headers[le]))}):ne.headers.forEach(function(le,xe){re.setRequestHeader(xe,le)}),ne.signal&&(ne.signal.addEventListener("abort",ae),re.onreadystatechange=function(){re.readyState===4&&ne.signal.removeEventListener("abort",ae)}),re.send(typeof ne._bodyInit>"u"?null:ne._bodyInit)})}return K.polyfill=!0,c.fetch||(c.fetch=K,c.Headers=l,c.Request=I,c.Response=$),s.Headers=l,s.Request=I,s.Response=$,s.fetch=K,s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var i=n.fetch?n:r;t=i.fetch,t.default=i.fetch,t.fetch=i.fetch,t.Headers=i.Headers,t.Request=i.Request,t.Response=i.Response,e.exports=t}(Bo,Bo.exports)),Bo.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof hr<"u"&&hr.fetch?n=hr.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof kv<"u"&&typeof window>"u"){var r=n||Fv();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Ts,Ts.exports);var Bf=Ts.exports;const kf=zo(Bf),Ff=mh({__proto__:null,default:kf},[Bf]);function jf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Lf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jf(Object(n),!0).forEach(function(r){jv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function jv(e,t,n){return t=Lv(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lv(e){var t=_v(e,"string");return sr(t)=="symbol"?t:t+""}function _v(e,t){if(sr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(sr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function sr(e){"@babel/helpers - typeof";return sr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},sr(e)}var kn;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?kn=global.fetch:typeof window<"u"&&window.fetch?kn=window.fetch:kn=fetch);var Ci;Pf()&&(typeof global<"u"&&global.XMLHttpRequest?Ci=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(Ci=window.XMLHttpRequest));var ko;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?ko=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(ko=window.ActiveXObject)),!kn&&Ff&&!Ci&&!ko&&(kn=kf||Ff),typeof kn!="function"&&(kn=void 0);var Os=function(t,n){if(n&&sr(n)==="object"){var r="";for(var i in n)r+="&"+encodeURIComponent(i)+"="+encodeURIComponent(n[i]);if(!r)return t;t=t+(t.indexOf("?")!==-1?"&":"?")+r.slice(1)}return t},_f=function(t,n,r,i){var a=function(h){if(!h.ok)return r(h.statusText||"Error",{status:h.status});h.text().then(function(g){r(null,{status:h.status,data:g})}).catch(r)};if(i){var s=i(t,n);if(s instanceof Promise){s.then(a).catch(r);return}}typeof fetch=="function"?fetch(t,n).then(a).catch(r):kn(t,n).then(a).catch(r)},Vf=!1,Vv=function(t,n,r,i){t.queryStringParams&&(n=Os(n,t.queryStringParams));var a=Lf({},typeof t.customHeaders=="function"?t.customHeaders():t.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(a["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),r&&(a["Content-Type"]="application/json");var s=typeof t.requestOptions=="function"?t.requestOptions(r):t.requestOptions,c=Lf({method:r?"POST":"GET",body:r?t.stringify(r):void 0,headers:a},Vf?{}:s),h=typeof t.alternateFetch=="function"&&t.alternateFetch.length>=1?t.alternateFetch:void 0;try{_f(n,c,i,h)}catch(g){if(!s||Object.keys(s).length===0||!g.message||g.message.indexOf("not implemented")<0)return i(g);try{Object.keys(s).forEach(function(d){delete c[d]}),_f(n,c,i,h),Vf=!0}catch(d){i(d)}}},qv=function(t,n,r,i){r&&sr(r)==="object"&&(r=Os("",r).slice(1)),t.queryStringParams&&(n=Os(n,t.queryStringParams));try{var a;Ci?a=new Ci:a=new ko("MSXML2.XMLHTTP.3.0"),a.open(r?"POST":"GET",n,1),t.crossDomain||a.setRequestHeader("X-Requested-With","XMLHttpRequest"),a.withCredentials=!!t.withCredentials,r&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.overrideMimeType&&a.overrideMimeType("application/json");var s=t.customHeaders;if(s=typeof s=="function"?s():s,s)for(var c in s)a.setRequestHeader(c,s[c]);a.onreadystatechange=function(){a.readyState>3&&i(a.status>=400?a.statusText:null,{status:a.status,data:a.responseText})},a.send(r)}catch(h){console&&console.log(h)}},Uv=function(t,n,r,i){if(typeof r=="function"&&(i=r,r=void 0),i=i||function(){},kn&&n.indexOf("file:")!==0)return Vv(t,n,r,i);if(Pf()||typeof ActiveXObject=="function")return qv(t,n,r,i);i(new Error("No fetch and no xhr implementation found!"))};function Ir(e){"@babel/helpers - typeof";return Ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ir(e)}function qf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ds(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qf(Object(n),!0).forEach(function(r){Uf(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Gv(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Yv(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,Gf(r.key),r)}}function Kv(e,t,n){return t&&Yv(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function Uf(e,t,n){return t=Gf(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gf(e){var t=Qv(e,"string");return Ir(t)=="symbol"?t:t+""}function Qv(e,t){if(Ir(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Ir(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var $v=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(n){return JSON.parse(n)},stringify:JSON.stringify,parsePayload:function(n,r,i){return Uf({},r,i||"")},parseLoadPayload:function(n,r){},request:Uv,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},Yf=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};Gv(this,e),this.services=t,this.options=n,this.allOptions=r,this.type="backend",this.init(t,n,r)}return Kv(e,[{key:"init",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=n,this.options=Ds(Ds(Ds({},$v()),this.options||{}),i),this.allOptions=a,this.services&&this.options.reloadInterval){var s=setInterval(function(){return r.reload()},this.options.reloadInterval);Ir(s)==="object"&&typeof s.unref=="function"&&s.unref()}}},{key:"readMulti",value:function(n,r,i){this._readAny(n,n,r,r,i)}},{key:"read",value:function(n,r,i){this._readAny([n],n,[r],r,i)}},{key:"_readAny",value:function(n,r,i,a,s){var c=this,h=this.options.loadPath;typeof this.options.loadPath=="function"&&(h=this.options.loadPath(n,i)),h=Bv(h),h.then(function(g){if(!g)return s(null,{});var d=c.services.interpolator.interpolate(g,{lng:n.join("+"),ns:i.join("+")});c.loadUrl(d,s,r,a)})}},{key:"loadUrl",value:function(n,r,i,a){var s=this,c=typeof i=="string"?[i]:i,h=typeof a=="string"?[a]:a,g=this.options.parseLoadPayload(c,h);this.options.request(this.options,n,g,function(d,E){if(E&&(E.status>=500&&E.status<600||!E.status))return r("failed loading "+n+"; status code: "+E.status,!0);if(E&&E.status>=400&&E.status<500)return r("failed loading "+n+"; status code: "+E.status,!1);if(!E&&d&&d.message&&d.message.indexOf("Failed to fetch")>-1)return r("failed loading "+n+": "+d.message,!0);if(d)return r(d,!1);var u,w;try{typeof E.data=="string"?u=s.options.parse(E.data,i,a):u=E.data}catch{w="failed parsing "+n+" to json"}if(w)return r(w,!1);r(null,u)})}},{key:"create",value:function(n,r,i,a,s){var c=this;if(this.options.addPath){typeof n=="string"&&(n=[n]);var h=this.options.parsePayload(r,i,a),g=0,d=[],E=[];n.forEach(function(u){var w=c.options.addPath;typeof c.options.addPath=="function"&&(w=c.options.addPath(u,r));var o=c.services.interpolator.interpolate(w,{lng:u,ns:r});c.options.request(c.options,o,h,function(l,p){g+=1,d.push(l),E.push(p),g===n.length&&typeof s=="function"&&s(d,E)})})}}},{key:"reload",value:function(){var n=this,r=this.services,i=r.backendConnector,a=r.languageUtils,s=r.logger,c=i.language;if(!(c&&c.toLowerCase()==="cimode")){var h=[],g=function(E){var u=a.toResolveHierarchy(E);u.forEach(function(w){h.indexOf(w)<0&&h.push(w)})};g(c),this.allOptions.preload&&this.allOptions.preload.forEach(function(d){return g(d)}),h.forEach(function(d){n.allOptions.ns.forEach(function(E){i.read(d,E,"read",null,null,function(u,w){u&&s.warn("loading namespace ".concat(E," for language ").concat(d," failed"),u),!u&&w&&s.log("loaded namespace ".concat(E," for language ").concat(d),w),i.loaded("".concat(d,"|").concat(E),u,w)})})})}}}])}();Yf.type="backend";const{slice:Hv,forEach:Wv}=[];function Jv(e){return Wv.call(Hv.call(arguments,1),t=>{if(t)for(const n in t)e[n]===void 0&&(e[n]=t[n])}),e}const Kf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,zv=(e,t,n)=>{const r=n||{};r.path=r.path||"/";const i=encodeURIComponent(t);let a=`${e}=${i}`;if(r.maxAge>0){const s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(s)}`}if(r.domain){if(!Kf.test(r.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${r.domain}`}if(r.path){if(!Kf.test(r.path))throw new TypeError("option path is invalid");a+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(a+="; HttpOnly"),r.secure&&(a+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},Qf={create(e,t,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=zv(e,encodeURIComponent(t),i)},read(e){const t=`${e}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(t)===0)return i.substring(t.length,i.length)}return null},remove(e){this.create(e,"",-1)}};var Zv={name:"cookie",lookup(e){let{lookupCookie:t}=e;if(t&&typeof document<"u")return Qf.read(t)||void 0},cacheUserLanguage(e,t){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:a}=t;n&&typeof document<"u"&&Qf.create(n,e,r,i,a)}},Xv={name:"querystring",lookup(e){var r;let{lookupQuerystring:t}=e,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const s=i.substring(1).split("&");for(let c=0;c<s.length;c++){const h=s[c].indexOf("=");h>0&&s[c].substring(0,h)===t&&(n=s[c].substring(h+1))}}return n}};let Ai=null;const $f=()=>{if(Ai!==null)return Ai;try{Ai=window!=="undefined"&&window.localStorage!==null;const e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Ai=!1}return Ai};var e1={name:"localStorage",lookup(e){let{lookupLocalStorage:t}=e;if(t&&$f())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupLocalStorage:n}=t;n&&$f()&&window.localStorage.setItem(n,e)}};let Si=null;const Hf=()=>{if(Si!==null)return Si;try{Si=window!=="undefined"&&window.sessionStorage!==null;const e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{Si=!1}return Si};var t1={name:"sessionStorage",lookup(e){let{lookupSessionStorage:t}=e;if(t&&Hf())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(e,t){let{lookupSessionStorage:n}=t;n&&Hf()&&window.sessionStorage.setItem(n,e)}},n1={name:"navigator",lookup(e){const t=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let a=0;a<n.length;a++)t.push(n[a]);r&&t.push(r),i&&t.push(i)}return t.length>0?t:void 0}},r1={name:"htmlTag",lookup(e){let{htmlTag:t}=e,n;const r=t||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},i1={name:"path",lookup(e){var i;let{lookupFromPathIndex:t}=e;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},o1={name:"subdomain",lookup(e){var i,a;let{lookupFromSubdomainIndex:t}=e;const n=typeof t=="number"?t+1:1,r=typeof window<"u"&&((a=(i=window.location)==null?void 0:i.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};function a1(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:e=>e}}class Wf{constructor(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,n)}init(t){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=Jv(n,this.options||{},a1()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Zv),this.addDetector(Xv),this.addDetector(e1),this.addDetector(t1),this.addDetector(n1),this.addDetector(r1),this.addDetector(i1),this.addDetector(o1)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let n=[];return t.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.map(r=>this.options.convertDetectedLanguage(r)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(t,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(t,this.options)}))}}Wf.type="languageDetector",Qt.use(Yf).use(Wf).use(Pm).init({fallbackLng:"en",interpolation:{escapeValue:!1},backend:{loadPath:"https://translations.piggy.eu/portal-sessions/{{lng}}.json"}});function s1({children:e,config:t,payload:n}){const[r,i]=k.useState("");return k.useEffect(()=>{r||(xt.initialize(t.apiKey,t.host),localStorage.setItem("apiKey",JSON.stringify(t.apiKey)),(async()=>{const a=await uo.create(n);i(a.data.data.uuid)})())},[t,n,r]),r?T.jsxs(k.StrictMode,{children:[T.jsx(Il,{...t,sessionUuid:r,children:T.jsx("div",{children:T.jsxs("div",{className:"bg-primary-50 flex h-screen w-screen flex-col",children:[T.jsx("div",{className:"flex h-full overflow-auto",children:e}),r&&T.jsx(jl,{})]})})}),T.jsx(Iu,{position:"bottom-center"})]}):T.jsx(T.Fragment,{children:"Loading..."})}/**
74
76
  * @remix-run/router v1.16.1
75
77
  *
76
78
  * Copyright (c) Remix Software Inc.
@@ -79,8 +81,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
79
81
  * LICENSE.md file in the root directory of this source tree.
80
82
  *
81
83
  * @license MIT
82
- */function nt(){return nt=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},nt.apply(this,arguments)}var at;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(at||(at={}));function xg(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,o;o=t.map((v,i)=>h(v,typeof v=="string"?null:v.state,i===0?"default":void 0));let a=f(n??o.length-1),s=at.Pop,u=null;function f(v){return Math.min(Math.max(v,0),o.length-1)}function g(){return o[a]}function h(v,i,c){i===void 0&&(i=null);let p=Sa(o?g().pathname:"/",v,i,c);return ct(p.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(v)),p}function x(v){return typeof v=="string"?v:Pn(v)}return{get index(){return a},get action(){return s},get location(){return g()},createHref:x,createURL(v){return new URL(x(v),"http://localhost")},encodeLocation(v){let i=typeof v=="string"?rn(v):v;return{pathname:i.pathname||"",search:i.search||"",hash:i.hash||""}},push(v,i){s=at.Push;let c=h(v,i);a+=1,o.splice(a,o.length,c),r&&u&&u({action:s,location:c,delta:1})},replace(v,i){s=at.Replace;let c=h(v,i);o[a]=c,r&&u&&u({action:s,location:c,delta:0})},go(v){s=at.Pop;let i=f(a+v),c=o[i];a=i,u&&u({action:s,location:c,delta:v})},listen(v){return u=v,()=>{u=null}}}}function ke(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ct(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function kg(){return Math.random().toString(36).substr(2,8)}function Sa(e,t,n,r){return n===void 0&&(n=null),nt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?rn(t):t,{state:n,key:t&&t.key||r||kg()})}function Pn(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function rn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var Ze;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Ze||(Ze={}));const Cg=new Set(["lazy","caseSensitive","path","id","index","children"]);function Eg(e){return e.index===!0}function Pa(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((o,a)=>{let s=[...n,a],u=typeof o.id=="string"?o.id:s.join("-");if(ke(o.index!==!0||!o.children,"Cannot specify children on an index route"),ke(!r[u],'Found a route id collision on id "'+u+`". Route id's must be globally unique within Data Router usages`),Eg(o)){let f=nt({},o,t(o),{id:u});return r[u]=f,f}else{let f=nt({},o,t(o),{id:u,children:void 0});return r[u]=f,o.children&&(f.children=Pa(o.children,t,s,r)),f}})}function qn(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?rn(t):t,o=Vt(r.pathname||"/",n);if(o==null)return null;let a=eu(e);Pg(a);let s=null;for(let u=0;s==null&&u<a.length;++u){let f=Dg(o);s=Lg(a[u],f)}return s}function Sg(e,t){let{route:n,pathname:r,params:o}=e;return{id:n.id,pathname:r,params:o,data:t[n.id],handle:n.handle}}function eu(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let o=(a,s,u)=>{let f={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};f.relativePath.startsWith("/")&&(ke(f.relativePath.startsWith(r),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(r.length));let g=Qt([r,f.relativePath]),h=n.concat(f);a.children&&a.children.length>0&&(ke(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),eu(a.children,t,h,g)),!(a.path==null&&!a.index)&&t.push({path:g,score:jg(g,a.index),routesMeta:h})};return e.forEach((a,s)=>{var u;if(a.path===""||!((u=a.path)!=null&&u.includes("?")))o(a,s);else for(let f of tu(a.path))o(a,s,f)}),t}function tu(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,o=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return o?[a,""]:[a];let s=tu(r.join("/")),u=[];return u.push(...s.map(f=>f===""?a:[a,f].join("/"))),o&&u.push(...s),u.map(f=>e.startsWith("/")&&f===""?"/":f)}function Pg(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Ag(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Bg=/^:[\w-]+$/,Og=3,_g=2,Rg=1,Tg=10,Ng=-2,nu=e=>e==="*";function jg(e,t){let n=e.split("/"),r=n.length;return n.some(nu)&&(r+=Ng),t&&(r+=_g),n.filter(o=>!nu(o)).reduce((o,a)=>o+(Bg.test(a)?Og:a===""?Rg:Tg),r)}function Ag(e,t){return e.length===t.length&&e.slice(0,-1).every((r,o)=>r===t[o])?e[e.length-1]-t[t.length-1]:0}function Lg(e,t){let{routesMeta:n}=e,r={},o="/",a=[];for(let s=0;s<n.length;++s){let u=n[s],f=s===n.length-1,g=o==="/"?t:t.slice(o.length)||"/",h=Ba({path:u.relativePath,caseSensitive:u.caseSensitive,end:f},g);if(!h)return null;Object.assign(r,h.params);let x=u.route;a.push({params:r,pathname:Qt([o,h.pathname]),pathnameBase:Ug(Qt([o,h.pathnameBase])),route:x}),h.pathnameBase!=="/"&&(o=Qt([o,h.pathnameBase]))}return a}function Ba(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Ig(e.path,e.caseSensitive,e.end),o=t.match(n);if(!o)return null;let a=o[0],s=a.replace(/(.)\/+$/,"$1"),u=o.slice(1);return{params:r.reduce((g,h,x)=>{let{paramName:l,isOptional:v}=h;if(l==="*"){let c=u[x]||"";s=a.slice(0,a.length-c.length).replace(/(.)\/+$/,"$1")}const i=u[x];return v&&!i?g[l]=void 0:g[l]=(i||"").replace(/%2F/g,"/"),g},{}),pathname:a,pathnameBase:s,pattern:e}}function Ig(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ct(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,u,f)=>(r.push({paramName:u,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),r]}function Dg(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ct(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Vt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function Mg(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:o=""}=typeof e=="string"?rn(e):e;return{pathname:n?n.startsWith("/")?n:Fg(n,t):t,search:$g(r),hash:Vg(o)}}function Fg(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?n.length>1&&n.pop():o!=="."&&n.push(o)}),n.length>1?n.join("/"):"/"}function Oa(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function ru(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function _a(e,t){let n=ru(e);return t?n.map((r,o)=>o===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Ra(e,t,n,r){r===void 0&&(r=!1);let o;typeof e=="string"?o=rn(e):(o=nt({},e),ke(!o.pathname||!o.pathname.includes("?"),Oa("?","pathname","search",o)),ke(!o.pathname||!o.pathname.includes("#"),Oa("#","pathname","hash",o)),ke(!o.search||!o.search.includes("#"),Oa("#","search","hash",o)));let a=e===""||o.pathname==="",s=a?"/":o.pathname,u;if(s==null)u=n;else{let x=t.length-1;if(!r&&s.startsWith("..")){let l=s.split("/");for(;l[0]==="..";)l.shift(),x-=1;o.pathname=l.join("/")}u=x>=0?t[x]:"/"}let f=Mg(o,u),g=s&&s!=="/"&&s.endsWith("/"),h=(a||s===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(g||h)&&(f.pathname+="/"),f}const Qt=e=>e.join("/").replace(/\/\/+/g,"/"),Ug=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$g=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Vg=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ou{constructor(t,n,r,o){o===void 0&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ta(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const iu=["post","put","patch","delete"],Hg=new Set(iu),zg=["get",...iu],qg=new Set(zg),Kg=new Set([301,302,303,307,308]),Wg=new Set([307,308]),Na={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Gg={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Mr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ja=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Xg=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),au="remix-router-transitions";function Jg(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;ke(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let o;if(e.mapRouteProperties)o=e.mapRouteProperties;else if(e.detectErrorBoundary){let A=e.detectErrorBoundary;o=z=>({hasErrorBoundary:A(z)})}else o=Xg;let a={},s=Pa(e.routes,o,void 0,a),u,f=e.basename||"/",g=e.unstable_dataStrategy||ey,h=nt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),x=null,l=new Set,v=null,i=null,c=null,p=e.hydrationData!=null,d=qn(s,e.history.location,f),m=null;if(d==null){let A=Nt(404,{pathname:e.history.location.pathname}),{matches:z,route:Y}=yu(s);d=z,m={[Y.id]:A}}let y,b=d.some(A=>A.route.lazy),C=d.some(A=>A.route.loader);if(b)y=!1;else if(!C)y=!0;else if(h.v7_partialHydration){let A=e.hydrationData?e.hydrationData.loaderData:null,z=e.hydrationData?e.hydrationData.errors:null,Y=ie=>ie.route.loader?typeof ie.route.loader=="function"&&ie.route.loader.hydrate===!0?!1:A&&A[ie.route.id]!==void 0||z&&z[ie.route.id]!==void 0:!0;if(z){let ie=d.findIndex(he=>z[he.route.id]!==void 0);y=d.slice(0,ie+1).every(Y)}else y=d.every(Y)}else y=e.hydrationData!=null;let S,k={historyAction:e.history.action,location:e.history.location,matches:d,initialized:y,navigation:Na,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},B=at.Pop,O=!1,j,I=!1,D=new Map,M=null,$=!1,P=!1,L=[],q=[],K=new Map,Q=0,Z=-1,ee=new Map,ue=new Set,ne=new Map,me=new Map,de=new Set,V=new Map,U=new Map,J=!1;function w(){if(x=e.history.listen(A=>{let{action:z,location:Y,delta:ie}=A;if(J){J=!1;return}ct(U.size===0||ie!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let he=Wt({currentLocation:k.location,nextLocation:Y,historyAction:z});if(he&&ie!=null){J=!0,e.history.go(ie*-1),ht(he,{state:"blocked",location:Y,proceed(){ht(he,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),e.history.go(ie)},reset(){let Pe=new Map(k.blockers);Pe.set(he,Mr),R({blockers:Pe})}});return}return F(z,Y)}),n){fy(t,D);let A=()=>hy(t,D);t.addEventListener("pagehide",A),M=()=>t.removeEventListener("pagehide",A)}return k.initialized||F(at.Pop,k.location,{initialHydration:!0}),S}function _(){x&&x(),M&&M(),l.clear(),j&&j.abort(),k.fetchers.forEach((A,z)=>wt(z)),k.blockers.forEach((A,z)=>mt(z))}function N(A){return l.add(A),()=>l.delete(A)}function R(A,z){z===void 0&&(z={}),k=nt({},k,A);let Y=[],ie=[];h.v7_fetcherPersist&&k.fetchers.forEach((he,Pe)=>{he.state==="idle"&&(de.has(Pe)?ie.push(Pe):Y.push(Pe))}),[...l].forEach(he=>he(k,{deletedFetchers:ie,unstable_viewTransitionOpts:z.viewTransitionOpts,unstable_flushSync:z.flushSync===!0})),h.v7_fetcherPersist&&(Y.forEach(he=>k.fetchers.delete(he)),ie.forEach(he=>wt(he)))}function W(A,z,Y){var ie,he;let{flushSync:Pe}=Y===void 0?{}:Y,we=k.actionData!=null&&k.navigation.formMethod!=null&&Ht(k.navigation.formMethod)&&k.navigation.state==="loading"&&((ie=A.state)==null?void 0:ie._isRedirect)!==!0,ve;z.actionData?Object.keys(z.actionData).length>0?ve=z.actionData:ve=null:we?ve=k.actionData:ve=null;let Re=z.loaderData?mu(k.loaderData,z.loaderData,z.matches||[],z.errors):k.loaderData,_e=k.blockers;_e.size>0&&(_e=new Map(_e),_e.forEach((Se,T)=>_e.set(T,Mr)));let dt=O===!0||k.navigation.formMethod!=null&&Ht(k.navigation.formMethod)&&((he=A.state)==null?void 0:he._isRedirect)!==!0;u&&(s=u,u=void 0),$||B===at.Pop||(B===at.Push?e.history.push(A,A.state):B===at.Replace&&e.history.replace(A,A.state));let ft;if(B===at.Pop){let Se=D.get(k.location.pathname);Se&&Se.has(A.pathname)?ft={currentLocation:k.location,nextLocation:A}:D.has(A.pathname)&&(ft={currentLocation:A,nextLocation:k.location})}else if(I){let Se=D.get(k.location.pathname);Se?Se.add(A.pathname):(Se=new Set([A.pathname]),D.set(k.location.pathname,Se)),ft={currentLocation:k.location,nextLocation:A}}R(nt({},z,{actionData:ve,loaderData:Re,historyAction:B,location:A,initialized:!0,navigation:Na,revalidation:"idle",restoreScrollPosition:on(A,z.matches||k.matches),preventScrollReset:dt,blockers:_e}),{viewTransitionOpts:ft,flushSync:Pe===!0}),B=at.Pop,O=!1,I=!1,$=!1,P=!1,L=[],q=[]}async function G(A,z){if(typeof A=="number"){e.history.go(A);return}let Y=Aa(k.location,k.matches,f,h.v7_prependBasename,A,h.v7_relativeSplatPath,z==null?void 0:z.fromRouteId,z==null?void 0:z.relative),{path:ie,submission:he,error:Pe}=su(h.v7_normalizeFormMethod,!1,Y,z),we=k.location,ve=Sa(k.location,ie,z&&z.state);ve=nt({},ve,e.history.encodeLocation(ve));let Re=z&&z.replace!=null?z.replace:void 0,_e=at.Push;Re===!0?_e=at.Replace:Re===!1||he!=null&&Ht(he.formMethod)&&he.formAction===k.location.pathname+k.location.search&&(_e=at.Replace);let dt=z&&"preventScrollReset"in z?z.preventScrollReset===!0:void 0,ft=(z&&z.unstable_flushSync)===!0,Se=Wt({currentLocation:we,nextLocation:ve,historyAction:_e});if(Se){ht(Se,{state:"blocked",location:ve,proceed(){ht(Se,{state:"proceeding",proceed:void 0,reset:void 0,location:ve}),G(A,z)},reset(){let T=new Map(k.blockers);T.set(Se,Mr),R({blockers:T})}});return}return await F(_e,ve,{submission:he,pendingError:Pe,preventScrollReset:dt,replace:z&&z.replace,enableViewTransition:z&&z.unstable_viewTransition,flushSync:ft})}function X(){if(Fe(),R({revalidation:"loading"}),k.navigation.state!=="submitting"){if(k.navigation.state==="idle"){F(k.historyAction,k.location,{startUninterruptedRevalidation:!0});return}F(B||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation})}}async function F(A,z,Y){j&&j.abort(),j=null,B=A,$=(Y&&Y.startUninterruptedRevalidation)===!0,xt(k.location,k.matches),O=(Y&&Y.preventScrollReset)===!0,I=(Y&&Y.enableViewTransition)===!0;let ie=u||s,he=Y&&Y.overrideNavigation,Pe=qn(ie,z,f),we=(Y&&Y.flushSync)===!0;if(!Pe){let Se=Nt(404,{pathname:z.pathname}),{matches:T,route:se}=yu(ie);gt(),W(z,{matches:T,loaderData:{},errors:{[se.id]:Se}},{flushSync:we});return}if(k.initialized&&!P&&ay(k.location,z)&&!(Y&&Y.submission&&Ht(Y.submission.formMethod))){W(z,{matches:Pe},{flushSync:we});return}j=new AbortController;let ve=Kn(e.history,z,j.signal,Y&&Y.submission),Re;if(Y&&Y.pendingError)Re=[Fr(Pe).route.id,{type:Ze.error,error:Y.pendingError}];else if(Y&&Y.submission&&Ht(Y.submission.formMethod)){let Se=await ce(ve,z,Y.submission,Pe,{replace:Y.replace,flushSync:we});if(Se.shortCircuited)return;Re=Se.pendingActionResult,he=Ma(z,Y.submission),we=!1,ve=Kn(e.history,ve.url,ve.signal)}let{shortCircuited:_e,loaderData:dt,errors:ft}=await fe(ve,z,Pe,he,Y&&Y.submission,Y&&Y.fetcherSubmission,Y&&Y.replace,Y&&Y.initialHydration===!0,we,Re);_e||(j=null,W(z,nt({matches:Pe},gu(Re),{loaderData:dt,errors:ft})))}async function ce(A,z,Y,ie,he){he===void 0&&(he={}),Fe();let Pe=uy(z,Y);R({navigation:Pe},{flushSync:he.flushSync===!0});let we,ve=Da(ie,z);if(!ve.route.action&&!ve.route.lazy)we={type:Ze.error,error:Nt(405,{method:A.method,pathname:z.pathname,routeId:ve.route.id})};else if(we=(await be("action",A,[ve],ie))[0],A.signal.aborted)return{shortCircuited:!0};if(On(we)){let Re;return he&&he.replace!=null?Re=he.replace:Re=fu(we.response.headers.get("Location"),new URL(A.url),f)===k.location.pathname+k.location.search,await ae(A,we,{submission:Y,replace:Re}),{shortCircuited:!0}}if(Bn(we))throw Nt(400,{type:"defer-action"});if(jt(we)){let Re=Fr(ie,ve.route.id);return(he&&he.replace)!==!0&&(B=at.Push),{pendingActionResult:[Re.route.id,we]}}return{pendingActionResult:[ve.route.id,we]}}async function fe(A,z,Y,ie,he,Pe,we,ve,Re,_e){let dt=ie||Ma(z,he),ft=he||Pe||Cu(dt),Se=u||s,[T,se]=lu(e.history,k,Y,ft,z,h.v7_partialHydration&&ve===!0,h.unstable_skipActionErrorRevalidation,P,L,q,de,ne,ue,Se,f,_e);if(gt(Oe=>!(Y&&Y.some(rt=>rt.route.id===Oe))||T&&T.some(rt=>rt.route.id===Oe)),Z=++Q,T.length===0&&se.length===0){let Oe=Ee();return W(z,nt({matches:Y,loaderData:{},errors:_e&&jt(_e[1])?{[_e[0]]:_e[1].error}:null},gu(_e),Oe?{fetchers:new Map(k.fetchers)}:{}),{flushSync:Re}),{shortCircuited:!0}}if(!$&&(!h.v7_partialHydration||!ve)){se.forEach(rt=>{let lt=k.fetchers.get(rt.key),He=Ur(void 0,lt?lt.data:void 0);k.fetchers.set(rt.key,He)});let Oe;_e&&!jt(_e[1])?Oe={[_e[0]]:_e[1].data}:k.actionData&&(Object.keys(k.actionData).length===0?Oe=null:Oe=k.actionData),R(nt({navigation:dt},Oe!==void 0?{actionData:Oe}:{},se.length>0?{fetchers:new Map(k.fetchers)}:{}),{flushSync:Re})}se.forEach(Oe=>{K.has(Oe.key)&&et(Oe.key),Oe.controller&&K.set(Oe.key,Oe.controller)});let ye=()=>se.forEach(Oe=>et(Oe.key));j&&j.signal.addEventListener("abort",ye);let{loaderResults:xe,fetcherResults:Ie}=await Ce(k.matches,Y,T,se,A);if(A.signal.aborted)return{shortCircuited:!0};j&&j.signal.removeEventListener("abort",ye),se.forEach(Oe=>K.delete(Oe.key));let Ue=vu([...xe,...Ie]);if(Ue){if(Ue.idx>=T.length){let Oe=se[Ue.idx-T.length].key;ue.add(Oe)}return await ae(A,Ue.result,{replace:we}),{shortCircuited:!0}}let{loaderData:je,errors:Be}=pu(k,Y,T,xe,_e,se,Ie,V);V.forEach((Oe,rt)=>{Oe.subscribe(lt=>{(lt||Oe.done)&&V.delete(rt)})}),h.v7_partialHydration&&ve&&k.errors&&Object.entries(k.errors).filter(Oe=>{let[rt]=Oe;return!T.some(lt=>lt.route.id===rt)}).forEach(Oe=>{let[rt,lt]=Oe;Be=Object.assign(Be||{},{[rt]:lt})});let st=Ee(),Ge=Lt(Z),Xe=st||Ge||se.length>0;return nt({loaderData:je,errors:Be},Xe?{fetchers:new Map(k.fetchers)}:{})}function re(A,z,Y,ie){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");K.has(A)&&et(A);let he=(ie&&ie.unstable_flushSync)===!0,Pe=u||s,we=Aa(k.location,k.matches,f,h.v7_prependBasename,Y,h.v7_relativeSplatPath,z,ie==null?void 0:ie.relative),ve=qn(Pe,we,f);if(!ve){Ve(A,z,Nt(404,{pathname:we}),{flushSync:he});return}let{path:Re,submission:_e,error:dt}=su(h.v7_normalizeFormMethod,!0,we,ie);if(dt){Ve(A,z,dt,{flushSync:he});return}let ft=Da(ve,Re);if(O=(ie&&ie.preventScrollReset)===!0,_e&&Ht(_e.formMethod)){oe(A,z,Re,ft,ve,he,_e);return}ne.set(A,{routeId:z,path:Re}),ge(A,z,Re,ft,ve,he,_e)}async function oe(A,z,Y,ie,he,Pe,we){if(Fe(),ne.delete(A),!ie.route.action&&!ie.route.lazy){let He=Nt(405,{method:we.formMethod,pathname:Y,routeId:z});Ve(A,z,He,{flushSync:Pe});return}let ve=k.fetchers.get(A);Ae(A,dy(we,ve),{flushSync:Pe});let Re=new AbortController,_e=Kn(e.history,Y,Re.signal,we);K.set(A,Re);let dt=Q,Se=(await be("action",_e,[ie],he))[0];if(_e.signal.aborted){K.get(A)===Re&&K.delete(A);return}if(h.v7_fetcherPersist&&de.has(A)){if(On(Se)||jt(Se)){Ae(A,yn(void 0));return}}else{if(On(Se))if(K.delete(A),Z>dt){Ae(A,yn(void 0));return}else return ue.add(A),Ae(A,Ur(we)),ae(_e,Se,{fetcherSubmission:we});if(jt(Se)){Ve(A,z,Se.error);return}}if(Bn(Se))throw Nt(400,{type:"defer-action"});let T=k.navigation.location||k.location,se=Kn(e.history,T,Re.signal),ye=u||s,xe=k.navigation.state!=="idle"?qn(ye,k.navigation.location,f):k.matches;ke(xe,"Didn't find any matches after fetcher action");let Ie=++Q;ee.set(A,Ie);let Ue=Ur(we,Se.data);k.fetchers.set(A,Ue);let[je,Be]=lu(e.history,k,xe,we,T,!1,h.unstable_skipActionErrorRevalidation,P,L,q,de,ne,ue,ye,f,[ie.route.id,Se]);Be.filter(He=>He.key!==A).forEach(He=>{let an=He.key,Go=k.fetchers.get(an),Wa=Ur(void 0,Go?Go.data:void 0);k.fetchers.set(an,Wa),K.has(an)&&et(an),He.controller&&K.set(an,He.controller)}),R({fetchers:new Map(k.fetchers)});let st=()=>Be.forEach(He=>et(He.key));Re.signal.addEventListener("abort",st);let{loaderResults:Ge,fetcherResults:Xe}=await Ce(k.matches,xe,je,Be,se);if(Re.signal.aborted)return;Re.signal.removeEventListener("abort",st),ee.delete(A),K.delete(A),Be.forEach(He=>K.delete(He.key));let Oe=vu([...Ge,...Xe]);if(Oe){if(Oe.idx>=je.length){let He=Be[Oe.idx-je.length].key;ue.add(He)}return ae(se,Oe.result)}let{loaderData:rt,errors:lt}=pu(k,k.matches,je,Ge,void 0,Be,Xe,V);if(k.fetchers.has(A)){let He=yn(Se.data);k.fetchers.set(A,He)}Lt(Ie),k.navigation.state==="loading"&&Ie>Z?(ke(B,"Expected pending action"),j&&j.abort(),W(k.navigation.location,{matches:xe,loaderData:rt,errors:lt,fetchers:new Map(k.fetchers)})):(R({errors:lt,loaderData:mu(k.loaderData,rt,xe,lt),fetchers:new Map(k.fetchers)}),P=!1)}async function ge(A,z,Y,ie,he,Pe,we){let ve=k.fetchers.get(A);Ae(A,Ur(we,ve?ve.data:void 0),{flushSync:Pe});let Re=new AbortController,_e=Kn(e.history,Y,Re.signal);K.set(A,Re);let dt=Q,Se=(await be("loader",_e,[ie],he))[0];if(Bn(Se)&&(Se=await ku(Se,_e.signal,!0)||Se),K.get(A)===Re&&K.delete(A),!_e.signal.aborted){if(de.has(A)){Ae(A,yn(void 0));return}if(On(Se))if(Z>dt){Ae(A,yn(void 0));return}else{ue.add(A),await ae(_e,Se);return}if(jt(Se)){Ve(A,z,Se.error);return}ke(!Bn(Se),"Unhandled fetcher deferred data"),Ae(A,yn(Se.data))}}async function ae(A,z,Y){let{submission:ie,fetcherSubmission:he,replace:Pe}=Y===void 0?{}:Y;z.response.headers.has("X-Remix-Revalidate")&&(P=!0);let we=z.response.headers.get("Location");ke(we,"Expected a Location header on the redirect Response"),we=fu(we,new URL(A.url),f);let ve=Sa(k.location,we,{_isRedirect:!0});if(n){let T=!1;if(z.response.headers.has("X-Remix-Reload-Document"))T=!0;else if(ja.test(we)){const se=e.history.createURL(we);T=se.origin!==t.location.origin||Vt(se.pathname,f)==null}if(T){Pe?t.location.replace(we):t.location.assign(we);return}}j=null;let Re=Pe===!0?at.Replace:at.Push,{formMethod:_e,formAction:dt,formEncType:ft}=k.navigation;!ie&&!he&&_e&&dt&&ft&&(ie=Cu(k.navigation));let Se=ie||he;if(Wg.has(z.response.status)&&Se&&Ht(Se.formMethod))await F(Re,ve,{submission:nt({},Se,{formAction:we}),preventScrollReset:O});else{let T=Ma(ve,ie);await F(Re,ve,{overrideNavigation:T,fetcherSubmission:he,preventScrollReset:O})}}async function be(A,z,Y,ie){try{let he=await ty(g,A,z,Y,ie,a,o);return await Promise.all(he.map((Pe,we)=>{if(sy(Pe)){let ve=Pe.result;return{type:Ze.redirect,response:oy(ve,z,Y[we].route.id,ie,f,h.v7_relativeSplatPath)}}return ry(Pe)}))}catch(he){return Y.map(()=>({type:Ze.error,error:he}))}}async function Ce(A,z,Y,ie,he){let[Pe,...we]=await Promise.all([Y.length?be("loader",he,Y,z):[],...ie.map(ve=>{if(ve.matches&&ve.match&&ve.controller){let Re=Kn(e.history,ve.path,ve.controller.signal);return be("loader",Re,[ve.match],ve.matches).then(_e=>_e[0])}else return Promise.resolve({type:Ze.error,error:Nt(404,{pathname:ve.path})})})]);return await Promise.all([xu(A,Y,Pe,Pe.map(()=>he.signal),!1,k.loaderData),xu(A,ie.map(ve=>ve.match),we,ie.map(ve=>ve.controller?ve.controller.signal:null),!0)]),{loaderResults:Pe,fetcherResults:we}}function Fe(){P=!0,L.push(...gt()),ne.forEach((A,z)=>{K.has(z)&&(q.push(z),et(z))})}function Ae(A,z,Y){Y===void 0&&(Y={}),k.fetchers.set(A,z),R({fetchers:new Map(k.fetchers)},{flushSync:(Y&&Y.flushSync)===!0})}function Ve(A,z,Y,ie){ie===void 0&&(ie={});let he=Fr(k.matches,z);wt(A),R({errors:{[he.route.id]:Y},fetchers:new Map(k.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function ze(A){return h.v7_fetcherPersist&&(me.set(A,(me.get(A)||0)+1),de.has(A)&&de.delete(A)),k.fetchers.get(A)||Gg}function wt(A){let z=k.fetchers.get(A);K.has(A)&&!(z&&z.state==="loading"&&ee.has(A))&&et(A),ne.delete(A),ee.delete(A),ue.delete(A),de.delete(A),k.fetchers.delete(A)}function Ke(A){if(h.v7_fetcherPersist){let z=(me.get(A)||0)-1;z<=0?(me.delete(A),de.add(A)):me.set(A,z)}else wt(A);R({fetchers:new Map(k.fetchers)})}function et(A){let z=K.get(A);ke(z,"Expected fetch controller: "+A),z.abort(),K.delete(A)}function We(A){for(let z of A){let Y=ze(z),ie=yn(Y.data);k.fetchers.set(z,ie)}}function Ee(){let A=[],z=!1;for(let Y of ue){let ie=k.fetchers.get(Y);ke(ie,"Expected fetcher: "+Y),ie.state==="loading"&&(ue.delete(Y),A.push(Y),z=!0)}return We(A),z}function Lt(A){let z=[];for(let[Y,ie]of ee)if(ie<A){let he=k.fetchers.get(Y);ke(he,"Expected fetcher: "+Y),he.state==="loading"&&(et(Y),ee.delete(Y),z.push(Y))}return We(z),z.length>0}function ut(A,z){let Y=k.blockers.get(A)||Mr;return U.get(A)!==z&&U.set(A,z),Y}function mt(A){k.blockers.delete(A),U.delete(A)}function ht(A,z){let Y=k.blockers.get(A)||Mr;ke(Y.state==="unblocked"&&z.state==="blocked"||Y.state==="blocked"&&z.state==="blocked"||Y.state==="blocked"&&z.state==="proceeding"||Y.state==="blocked"&&z.state==="unblocked"||Y.state==="proceeding"&&z.state==="unblocked","Invalid blocker state transition: "+Y.state+" -> "+z.state);let ie=new Map(k.blockers);ie.set(A,z),R({blockers:ie})}function Wt(A){let{currentLocation:z,nextLocation:Y,historyAction:ie}=A;if(U.size===0)return;U.size>1&&ct(!1,"A router only supports one blocker at a time");let he=Array.from(U.entries()),[Pe,we]=he[he.length-1],ve=k.blockers.get(Pe);if(!(ve&&ve.state==="proceeding")&&we({currentLocation:z,nextLocation:Y,historyAction:ie}))return Pe}function gt(A){let z=[];return V.forEach((Y,ie)=>{(!A||A(ie))&&(Y.cancel(),z.push(ie),V.delete(ie))}),z}function Bt(A,z,Y){if(v=A,c=z,i=Y||null,!p&&k.navigation===Na){p=!0;let ie=on(k.location,k.matches);ie!=null&&R({restoreScrollPosition:ie})}return()=>{v=null,c=null,i=null}}function yt(A,z){return i&&i(A,z.map(ie=>Sg(ie,k.loaderData)))||A.key}function xt(A,z){if(v&&c){let Y=yt(A,z);v[Y]=c()}}function on(A,z){if(v){let Y=yt(A,z),ie=v[Y];if(typeof ie=="number")return ie}return null}function _n(A){a={},u=Pa(A,o,void 0,a)}return S={get basename(){return f},get future(){return h},get state(){return k},get routes(){return s},get window(){return t},initialize:w,subscribe:N,enableScrollRestoration:Bt,navigate:G,fetch:re,revalidate:X,createHref:A=>e.history.createHref(A),encodeLocation:A=>e.history.encodeLocation(A),getFetcher:ze,deleteFetcher:Ke,dispose:_,getBlocker:ut,deleteBlocker:mt,_internalFetchControllers:K,_internalActiveDeferreds:V,_internalSetRoutes:_n},S}function Yg(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Aa(e,t,n,r,o,a,s,u){let f,g;if(s){f=[];for(let x of t)if(f.push(x),x.route.id===s){g=x;break}}else f=t,g=t[t.length-1];let h=Ra(o||".",_a(f,a),Vt(e.pathname,n)||e.pathname,u==="path");return o==null&&(h.search=e.search,h.hash=e.hash),(o==null||o===""||o===".")&&g&&g.route.index&&!Ia(h.search)&&(h.search=h.search?h.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(h.pathname=h.pathname==="/"?n:Qt([n,h.pathname])),Pn(h)}function su(e,t,n,r){if(!r||!Yg(r))return{path:n};if(r.formMethod&&!cy(r.formMethod))return{path:n,error:Nt(405,{method:r.formMethod})};let o=()=>({path:n,error:Nt(400,{type:"invalid-body"})}),a=r.formMethod||"get",s=e?a.toUpperCase():a.toLowerCase(),u=bu(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ht(s))return o();let l=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((v,i)=>{let[c,p]=i;return""+v+c+"="+p+`
83
- `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:u,formEncType:r.formEncType,formData:void 0,json:void 0,text:l}}}else if(r.formEncType==="application/json"){if(!Ht(s))return o();try{let l=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:u,formEncType:r.formEncType,formData:void 0,json:l,text:void 0}}}catch{return o()}}}ke(typeof FormData=="function","FormData is not available in this environment");let f,g;if(r.formData)f=La(r.formData),g=r.formData;else if(r.body instanceof FormData)f=La(r.body),g=r.body;else if(r.body instanceof URLSearchParams)f=r.body,g=hu(f);else if(r.body==null)f=new URLSearchParams,g=new FormData;else try{f=new URLSearchParams(r.body),g=hu(f)}catch{return o()}let h={formMethod:s,formAction:u,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Ht(h.formMethod))return{path:n,submission:h};let x=rn(n);return t&&x.search&&Ia(x.search)&&f.append("index",""),x.search="?"+f,{path:Pn(x),submission:h}}function Qg(e,t){let n=e;if(t){let r=e.findIndex(o=>o.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function lu(e,t,n,r,o,a,s,u,f,g,h,x,l,v,i,c){let p=c?jt(c[1])?c[1].error:c[1].data:void 0,d=e.createURL(t.location),m=e.createURL(o),y=c&&jt(c[1])?c[0]:void 0,b=y?Qg(n,y):n,C=c?c[1].statusCode:void 0,S=s&&C&&C>=400,k=b.filter((O,j)=>{let{route:I}=O;if(I.lazy)return!0;if(I.loader==null)return!1;if(a)return typeof I.loader!="function"||I.loader.hydrate?!0:t.loaderData[I.id]===void 0&&(!t.errors||t.errors[I.id]===void 0);if(Zg(t.loaderData,t.matches[j],O)||f.some($=>$===O.route.id))return!0;let D=t.matches[j],M=O;return uu(O,nt({currentUrl:d,currentParams:D.params,nextUrl:m,nextParams:M.params},r,{actionResult:p,unstable_actionStatus:C,defaultShouldRevalidate:S?!1:u||d.pathname+d.search===m.pathname+m.search||d.search!==m.search||cu(D,M)}))}),B=[];return x.forEach((O,j)=>{if(a||!n.some(P=>P.route.id===O.routeId)||h.has(j))return;let I=qn(v,O.path,i);if(!I){B.push({key:j,routeId:O.routeId,path:O.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(j),M=Da(I,O.path),$=!1;l.has(j)?$=!1:g.includes(j)?$=!0:D&&D.state!=="idle"&&D.data===void 0?$=u:$=uu(M,nt({currentUrl:d,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:n[n.length-1].params},r,{actionResult:p,unstable_actionStatus:C,defaultShouldRevalidate:S?!1:u})),$&&B.push({key:j,routeId:O.routeId,path:O.path,matches:I,match:M,controller:new AbortController})}),[k,B]}function Zg(e,t,n){let r=!t||n.route.id!==t.route.id,o=e[n.route.id]===void 0;return r||o}function cu(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function uu(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function du(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let o=n[e.id];ke(o,"No route found in manifest");let a={};for(let s in r){let f=o[s]!==void 0&&s!=="hasErrorBoundary";ct(!f,'Route "'+o.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!f&&!Cg.has(s)&&(a[s]=r[s])}Object.assign(o,a),Object.assign(o,nt({},t(o),{lazy:void 0}))}function ey(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function ty(e,t,n,r,o,a,s,u){let f=r.reduce((x,l)=>x.add(l.route.id),new Set),g=new Set,h=await e({matches:o.map(x=>{let l=f.has(x.route.id);return nt({},x,{shouldLoad:l,resolve:i=>(g.add(x.route.id),l?ny(t,n,x,a,s,i,u):Promise.resolve({type:Ze.data,result:void 0}))})}),request:n,params:o[0].params,context:u});return o.forEach(x=>ke(g.has(x.route.id),'`match.resolve()` was not called for route id "'+x.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),h.filter((x,l)=>f.has(o[l].route.id))}async function ny(e,t,n,r,o,a,s){let u,f,g=h=>{let x,l=new Promise((c,p)=>x=p);f=()=>x(),t.signal.addEventListener("abort",f);let v=c=>typeof h!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):h({request:t,params:n.params,context:s},...c!==void 0?[c]:[]),i;return a?i=a(c=>v(c)):i=(async()=>{try{return{type:"data",result:await v()}}catch(c){return{type:"error",result:c}}})(),Promise.race([i,l])};try{let h=n.route[e];if(n.route.lazy)if(h){let x,[l]=await Promise.all([g(h).catch(v=>{x=v}),du(n.route,o,r)]);if(x!==void 0)throw x;u=l}else if(await du(n.route,o,r),h=n.route[e],h)u=await g(h);else if(e==="action"){let x=new URL(t.url),l=x.pathname+x.search;throw Nt(405,{method:t.method,pathname:l,routeId:n.route.id})}else return{type:Ze.data,result:void 0};else if(h)u=await g(h);else{let x=new URL(t.url),l=x.pathname+x.search;throw Nt(404,{pathname:l})}ke(u.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(h){return{type:Ze.error,result:h}}finally{f&&t.signal.removeEventListener("abort",f)}return u}async function ry(e){let{result:t,type:n,status:r}=e;if(wu(t)){let s;try{let u=t.headers.get("Content-Type");u&&/\bapplication\/json\b/.test(u)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(u){return{type:Ze.error,error:u}}return n===Ze.error?{type:Ze.error,error:new ou(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:Ze.data,data:s,statusCode:t.status,headers:t.headers}}if(n===Ze.error)return{type:Ze.error,error:t,statusCode:Ta(t)?t.status:r};if(ly(t)){var o,a;return{type:Ze.deferred,deferredData:t,statusCode:(o=t.init)==null?void 0:o.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}return{type:Ze.data,data:t,statusCode:r}}function oy(e,t,n,r,o,a){let s=e.headers.get("Location");if(ke(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!ja.test(s)){let u=r.slice(0,r.findIndex(f=>f.route.id===n)+1);s=Aa(new URL(t.url),u,o,!0,s,a),e.headers.set("Location",s)}return e}function fu(e,t,n){if(ja.test(e)){let r=e,o=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=Vt(o.pathname,n)!=null;if(o.origin===t.origin&&a)return o.pathname+o.search+o.hash}return e}function Kn(e,t,n,r){let o=e.createURL(bu(t)).toString(),a={signal:n};if(r&&Ht(r.formMethod)){let{formMethod:s,formEncType:u}=r;a.method=s.toUpperCase(),u==="application/json"?(a.headers=new Headers({"Content-Type":u}),a.body=JSON.stringify(r.json)):u==="text/plain"?a.body=r.text:u==="application/x-www-form-urlencoded"&&r.formData?a.body=La(r.formData):a.body=r.formData}return new Request(o,a)}function La(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function hu(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function iy(e,t,n,r,o,a){let s={},u=null,f,g=!1,h={},x=r&&jt(r[1])?r[1].error:void 0;return n.forEach((l,v)=>{let i=t[v].route.id;if(ke(!On(l),"Cannot handle redirect results in processLoaderData"),jt(l)){let c=l.error;x!==void 0&&(c=x,x=void 0),u=u||{};{let p=Fr(e,i);u[p.route.id]==null&&(u[p.route.id]=c)}s[i]=void 0,g||(g=!0,f=Ta(l.error)?l.error.status:500),l.headers&&(h[i]=l.headers)}else Bn(l)?(o.set(i,l.deferredData),s[i]=l.deferredData.data,l.statusCode!=null&&l.statusCode!==200&&!g&&(f=l.statusCode),l.headers&&(h[i]=l.headers)):(s[i]=l.data,l.statusCode&&l.statusCode!==200&&!g&&(f=l.statusCode),l.headers&&(h[i]=l.headers))}),x!==void 0&&r&&(u={[r[0]]:x},s[r[0]]=void 0),{loaderData:s,errors:u,statusCode:f||200,loaderHeaders:h}}function pu(e,t,n,r,o,a,s,u){let{loaderData:f,errors:g}=iy(t,n,r,o,u);for(let h=0;h<a.length;h++){let{key:x,match:l,controller:v}=a[h];ke(s!==void 0&&s[h]!==void 0,"Did not find corresponding fetcher result");let i=s[h];if(!(v&&v.signal.aborted))if(jt(i)){let c=Fr(e.matches,l==null?void 0:l.route.id);g&&g[c.route.id]||(g=nt({},g,{[c.route.id]:i.error})),e.fetchers.delete(x)}else if(On(i))ke(!1,"Unhandled fetcher revalidation redirect");else if(Bn(i))ke(!1,"Unhandled fetcher deferred data");else{let c=yn(i.data);e.fetchers.set(x,c)}}return{loaderData:f,errors:g}}function mu(e,t,n,r){let o=nt({},t);for(let a of n){let s=a.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(o[s]=t[s]):e[s]!==void 0&&a.route.loader&&(o[s]=e[s]),r&&r.hasOwnProperty(s))break}return o}function gu(e){return e?jt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Fr(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function yu(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Nt(e,t){let{pathname:n,routeId:r,method:o,type:a}=t===void 0?{}:t,s="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(s="Bad Request",o&&n&&r?u="You made a "+o+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?u="defer() is not supported in actions":a==="invalid-body"&&(u="Unable to encode submission body")):e===403?(s="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",u='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",o&&n&&r?u="You made a "+o.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":o&&(u='Invalid request method "'+o.toUpperCase()+'"')),new ou(e||500,s,new Error(u),!0)}function vu(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(On(n))return{result:n,idx:t}}}function bu(e){let t=typeof e=="string"?rn(e):e;return Pn(nt({},t,{hash:""}))}function ay(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function sy(e){return wu(e.result)&&Kg.has(e.result.status)}function Bn(e){return e.type===Ze.deferred}function jt(e){return e.type===Ze.error}function On(e){return(e&&e.type)===Ze.redirect}function ly(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function wu(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function cy(e){return qg.has(e.toLowerCase())}function Ht(e){return Hg.has(e.toLowerCase())}async function xu(e,t,n,r,o,a){for(let s=0;s<n.length;s++){let u=n[s],f=t[s];if(!f)continue;let g=e.find(x=>x.route.id===f.route.id),h=g!=null&&!cu(g,f)&&(a&&a[f.route.id])!==void 0;if(Bn(u)&&(o||h)){let x=r[s];ke(x,"Expected an AbortSignal for revalidating fetcher deferred result"),await ku(u,x,o).then(l=>{l&&(n[s]=l||n[s])})}}}async function ku(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Ze.data,data:e.deferredData.unwrappedData}}catch(o){return{type:Ze.error,error:o}}return{type:Ze.data,data:e.deferredData.data}}}function Ia(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Da(e,t){let n=typeof t=="string"?rn(t).search:t.search;if(e[e.length-1].route.index&&Ia(n||""))return e[e.length-1];let r=ru(e);return r[r.length-1]}function Cu(e){let{formMethod:t,formAction:n,formEncType:r,text:o,formData:a,json:s}=e;if(!(!t||!n||!r)){if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:o};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Ma(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function uy(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Ur(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function dy(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function yn(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function fy(e,t){try{let n=e.sessionStorage.getItem(au);if(n){let r=JSON.parse(n);for(let[o,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(o,new Set(a||[]))}}catch{}}function hy(e,t){if(t.size>0){let n={};for(let[r,o]of t)n[r]=[...o];try{e.sessionStorage.setItem(au,JSON.stringify(n))}catch(r){ct(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
84
+ */function Ct(){return Ct=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},Ct.apply(this,arguments)}var Ft;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ft||(Ft={}));function u1(e){e===void 0&&(e={});let{initialEntries:t=["/"],initialIndex:n,v5Compat:r=!1}=e,i;i=t.map((w,o)=>d(w,typeof w=="string"?null:w.state,o===0?"default":void 0));let a=h(n??i.length-1),s=Ft.Pop,c=null;function h(w){return Math.min(Math.max(w,0),i.length-1)}function g(){return i[a]}function d(w,o,l){o===void 0&&(o=null);let p=Is(i?g().pathname:"/",w,o,l);return Lt(p.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(w)),p}function E(w){return typeof w=="string"?w:ur(w)}return{get index(){return a},get action(){return s},get location(){return g()},createHref:E,createURL(w){return new URL(E(w),"http://localhost")},encodeLocation(w){let o=typeof w=="string"?Fn(w):w;return{pathname:o.pathname||"",search:o.search||"",hash:o.hash||""}},push(w,o){s=Ft.Push;let l=d(w,o);a+=1,i.splice(a,i.length,l),r&&c&&c({action:s,location:l,delta:1})},replace(w,o){s=Ft.Replace;let l=d(w,o);i[a]=l,r&&c&&c({action:s,location:l,delta:0})},go(w){s=Ft.Pop;let o=h(a+w),l=i[o];a=o,c&&c({action:s,location:l,delta:w})},listen(w){return c=w,()=>{c=null}}}}function Le(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Lt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function l1(){return Math.random().toString(36).substr(2,8)}function Is(e,t,n,r){return n===void 0&&(n=null),Ct({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Fn(t):t,{state:n,key:t&&t.key||r||l1()})}function ur(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Fn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}var yt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(yt||(yt={}));const c1=new Set(["lazy","caseSensitive","path","id","index","children"]);function f1(e){return e.index===!0}function Rs(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((i,a)=>{let s=[...n,a],c=typeof i.id=="string"?i.id:s.join("-");if(Le(i.index!==!0||!i.children,"Cannot specify children on an index route"),Le(!r[c],'Found a route id collision on id "'+c+`". Route id's must be globally unique within Data Router usages`),f1(i)){let h=Ct({},i,t(i),{id:c});return r[c]=h,h}else{let h=Ct({},i,t(i),{id:c,children:void 0});return r[c]=h,i.children&&(h.children=Rs(i.children,t,s,r)),h}})}function Rr(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Fn(t):t,i=wn(r.pathname||"/",n);if(i==null)return null;let a=Jf(e);h1(a);let s=null;for(let c=0;s==null&&c<a.length;++c){let h=A1(i);s=x1(a[c],h)}return s}function d1(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],handle:n.handle}}function Jf(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(a,s,c)=>{let h={relativePath:c===void 0?a.path||"":c,caseSensitive:a.caseSensitive===!0,childrenIndex:s,route:a};h.relativePath.startsWith("/")&&(Le(h.relativePath.startsWith(r),'Absolute route path "'+h.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),h.relativePath=h.relativePath.slice(r.length));let g=Nn([r,h.relativePath]),d=n.concat(h);a.children&&a.children.length>0&&(Le(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+g+'".')),Jf(a.children,t,d,g)),!(a.path==null&&!a.index)&&t.push({path:g,score:w1(g,a.index),routesMeta:d})};return e.forEach((a,s)=>{var c;if(a.path===""||!((c=a.path)!=null&&c.includes("?")))i(a,s);else for(let h of zf(a.path))i(a,s,h)}),t}function zf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,i=n.endsWith("?"),a=n.replace(/\?$/,"");if(r.length===0)return i?[a,""]:[a];let s=zf(r.join("/")),c=[];return c.push(...s.map(h=>h===""?a:[a,h].join("/"))),i&&c.push(...s),c.map(h=>e.startsWith("/")&&h===""?"/":h)}function h1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:E1(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const p1=/^:[\w-]+$/,g1=3,m1=2,y1=1,v1=10,b1=-2,Zf=e=>e==="*";function w1(e,t){let n=e.split("/"),r=n.length;return n.some(Zf)&&(r+=b1),t&&(r+=m1),n.filter(i=>!Zf(i)).reduce((i,a)=>i+(p1.test(a)?g1:a===""?y1:v1),r)}function E1(e,t){return e.length===t.length&&e.slice(0,-1).every((r,i)=>r===t[i])?e[e.length-1]-t[t.length-1]:0}function x1(e,t){let{routesMeta:n}=e,r={},i="/",a=[];for(let s=0;s<n.length;++s){let c=n[s],h=s===n.length-1,g=i==="/"?t:t.slice(i.length)||"/",d=Ns({path:c.relativePath,caseSensitive:c.caseSensitive,end:h},g);if(!d)return null;Object.assign(r,d.params);let E=c.route;a.push({params:r,pathname:Nn([i,d.pathname]),pathnameBase:O1(Nn([i,d.pathnameBase])),route:E}),d.pathnameBase!=="/"&&(i=Nn([i,d.pathnameBase]))}return a}function Ns(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=C1(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],s=a.replace(/(.)\/+$/,"$1"),c=i.slice(1);return{params:r.reduce((g,d,E)=>{let{paramName:u,isOptional:w}=d;if(u==="*"){let l=c[E]||"";s=a.slice(0,a.length-l.length).replace(/(.)\/+$/,"$1")}const o=c[E];return w&&!o?g[u]=void 0:g[u]=(o||"").replace(/%2F/g,"/"),g},{}),pathname:a,pathnameBase:s,pattern:e}}function C1(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Lt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,c,h)=>(r.push({paramName:c,isOptional:h!=null}),h?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),r]}function A1(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Lt(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function wn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function S1(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:i=""}=typeof e=="string"?Fn(e):e;return{pathname:n?n.startsWith("/")?n:T1(n,t):t,search:D1(r),hash:I1(i)}}function T1(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function Ps(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Xf(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ms(e,t){let n=Xf(e);return t?n.map((r,i)=>i===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Bs(e,t,n,r){r===void 0&&(r=!1);let i;typeof e=="string"?i=Fn(e):(i=Ct({},e),Le(!i.pathname||!i.pathname.includes("?"),Ps("?","pathname","search",i)),Le(!i.pathname||!i.pathname.includes("#"),Ps("#","pathname","hash",i)),Le(!i.search||!i.search.includes("#"),Ps("#","search","hash",i)));let a=e===""||i.pathname==="",s=a?"/":i.pathname,c;if(s==null)c=n;else{let E=t.length-1;if(!r&&s.startsWith("..")){let u=s.split("/");for(;u[0]==="..";)u.shift(),E-=1;i.pathname=u.join("/")}c=E>=0?t[E]:"/"}let h=S1(i,c),g=s&&s!=="/"&&s.endsWith("/"),d=(a||s===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(g||d)&&(h.pathname+="/"),h}const Nn=e=>e.join("/").replace(/\/\/+/g,"/"),O1=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),D1=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,I1=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class ed{constructor(t,n,r,i){i===void 0&&(i=!1),this.status=t,this.statusText=n||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function ks(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const td=["post","put","patch","delete"],R1=new Set(td),N1=["get",...td],P1=new Set(N1),M1=new Set([301,302,303,307,308]),B1=new Set([307,308]),Fs={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},k1={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ti={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},js=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,F1=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),nd="remix-router-transitions";function j1(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Le(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(e.mapRouteProperties)i=e.mapRouteProperties;else if(e.detectErrorBoundary){let F=e.detectErrorBoundary;i=J=>({hasErrorBoundary:F(J)})}else i=F1;let a={},s=Rs(e.routes,i,void 0,a),c,h=e.basename||"/",g=e.unstable_dataStrategy||q1,d=Ct({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),E=null,u=new Set,w=null,o=null,l=null,p=e.hydrationData!=null,f=Rr(s,e.history.location,h),m=null;if(f==null){let F=fn(404,{pathname:e.history.location.pathname}),{matches:J,route:ie}=hd(s);f=J,m={[ie.id]:F}}let b,C=f.some(F=>F.route.lazy),S=f.some(F=>F.route.loader);if(C)b=!1;else if(!S)b=!0;else if(d.v7_partialHydration){let F=e.hydrationData?e.hydrationData.loaderData:null,J=e.hydrationData?e.hydrationData.errors:null,ie=he=>he.route.loader?typeof he.route.loader=="function"&&he.route.loader.hydrate===!0?!1:F&&F[he.route.id]!==void 0||J&&J[he.route.id]!==void 0:!0;if(J){let he=f.findIndex(Ae=>J[Ae.route.id]!==void 0);b=f.slice(0,he+1).every(ie)}else b=f.every(ie)}else b=e.hydrationData!=null;let D,A={historyAction:e.history.action,location:e.history.location,matches:f,initialized:b,navigation:Fs,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||m,fetchers:new Map,blockers:new Map},N=Ft.Pop,I=!1,_,Q=!1,$=new Map,V=null,K=!1,R=!1,U=[],W=[],z=new Map,ne=0,re=-1,ae=new Map,ge=new Set,le=new Map,xe=new Map,ce=new Set,q=new Map,G=new Map,Z=!1;function x(){if(E=e.history.listen(F=>{let{action:J,location:ie,delta:he}=F;if(Z){Z=!1;return}Lt(G.size===0||he!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Ae=Vt({currentLocation:A.location,nextLocation:ie,historyAction:J});if(Ae&&he!=null){Z=!0,e.history.go(he*-1),bt(Ae,{state:"blocked",location:ie,proceed(){bt(Ae,{state:"proceeding",proceed:void 0,reset:void 0,location:ie}),e.history.go(he)},reset(){let Ve=new Map(A.blockers);Ve.set(Ae,Ti),B({blockers:Ve})}});return}return Y(J,ie)}),n){X1(t,$);let F=()=>eb(t,$);t.addEventListener("pagehide",F),V=()=>t.removeEventListener("pagehide",F)}return A.initialized||Y(Ft.Pop,A.location,{initialHydration:!0}),D}function M(){E&&E(),V&&V(),u.clear(),_&&_.abort(),A.fetchers.forEach((F,J)=>$t(J)),A.blockers.forEach((F,J)=>_t(J))}function j(F){return u.add(F),()=>u.delete(F)}function B(F,J){J===void 0&&(J={}),A=Ct({},A,F);let ie=[],he=[];d.v7_fetcherPersist&&A.fetchers.forEach((Ae,Ve)=>{Ae.state==="idle"&&(ce.has(Ve)?he.push(Ve):ie.push(Ve))}),[...u].forEach(Ae=>Ae(A,{deletedFetchers:he,unstable_viewTransitionOpts:J.viewTransitionOpts,unstable_flushSync:J.flushSync===!0})),d.v7_fetcherPersist&&(ie.forEach(Ae=>A.fetchers.delete(Ae)),he.forEach(Ae=>$t(Ae)))}function X(F,J,ie){var he,Ae;let{flushSync:Ve}=ie===void 0?{}:ie,Pe=A.actionData!=null&&A.navigation.formMethod!=null&&En(A.navigation.formMethod)&&A.navigation.state==="loading"&&((he=F.state)==null?void 0:he._isRedirect)!==!0,Re;J.actionData?Object.keys(J.actionData).length>0?Re=J.actionData:Re=null:Pe?Re=A.actionData:Re=null;let Ge=J.loaderData?fd(A.loaderData,J.loaderData,J.matches||[],J.errors):A.loaderData,Ue=A.blockers;Ue.size>0&&(Ue=new Map(Ue),Ue.forEach((_e,L)=>Ue.set(L,Ti)));let At=I===!0||A.navigation.formMethod!=null&&En(A.navigation.formMethod)&&((Ae=F.state)==null?void 0:Ae._isRedirect)!==!0;c&&(s=c,c=void 0),K||N===Ft.Pop||(N===Ft.Push?e.history.push(F,F.state):N===Ft.Replace&&e.history.replace(F,F.state));let St;if(N===Ft.Pop){let _e=$.get(A.location.pathname);_e&&_e.has(F.pathname)?St={currentLocation:A.location,nextLocation:F}:$.has(F.pathname)&&(St={currentLocation:F,nextLocation:A.location})}else if(Q){let _e=$.get(A.location.pathname);_e?_e.add(F.pathname):(_e=new Set([F.pathname]),$.set(A.location.pathname,_e)),St={currentLocation:A.location,nextLocation:F}}B(Ct({},J,{actionData:Re,loaderData:Ge,historyAction:N,location:F,initialized:!0,navigation:Fs,revalidation:"idle",restoreScrollPosition:ht(F,J.matches||A.matches),preventScrollReset:At,blockers:Ue}),{viewTransitionOpts:St,flushSync:Ve===!0}),N=Ft.Pop,I=!1,Q=!1,K=!1,R=!1,U=[],W=[]}async function te(F,J){if(typeof F=="number"){e.history.go(F);return}let ie=Ls(A.location,A.matches,h,d.v7_prependBasename,F,d.v7_relativeSplatPath,J==null?void 0:J.fromRouteId,J==null?void 0:J.relative),{path:he,submission:Ae,error:Ve}=rd(d.v7_normalizeFormMethod,!1,ie,J),Pe=A.location,Re=Is(A.location,he,J&&J.state);Re=Ct({},Re,e.history.encodeLocation(Re));let Ge=J&&J.replace!=null?J.replace:void 0,Ue=Ft.Push;Ge===!0?Ue=Ft.Replace:Ge===!1||Ae!=null&&En(Ae.formMethod)&&Ae.formAction===A.location.pathname+A.location.search&&(Ue=Ft.Replace);let At=J&&"preventScrollReset"in J?J.preventScrollReset===!0:void 0,St=(J&&J.unstable_flushSync)===!0,_e=Vt({currentLocation:Pe,nextLocation:Re,historyAction:Ue});if(_e){bt(_e,{state:"blocked",location:Re,proceed(){bt(_e,{state:"proceeding",proceed:void 0,reset:void 0,location:Re}),te(F,J)},reset(){let L=new Map(A.blockers);L.set(_e,Ti),B({blockers:L})}});return}return await Y(Ue,Re,{submission:Ae,pendingError:Ve,preventScrollReset:At,replace:J&&J.replace,enableViewTransition:J&&J.unstable_viewTransition,flushSync:St})}function ee(){if(ze(),B({revalidation:"loading"}),A.navigation.state!=="submitting"){if(A.navigation.state==="idle"){Y(A.historyAction,A.location,{startUninterruptedRevalidation:!0});return}Y(N||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation})}}async function Y(F,J,ie){_&&_.abort(),_=null,N=F,K=(ie&&ie.startUninterruptedRevalidation)===!0,Yt(A.location,A.matches),I=(ie&&ie.preventScrollReset)===!0,Q=(ie&&ie.enableViewTransition)===!0;let he=c||s,Ae=ie&&ie.overrideNavigation,Ve=Rr(he,J,h),Pe=(ie&&ie.flushSync)===!0;if(!Ve){let _e=fn(404,{pathname:J.pathname}),{matches:L,route:ye}=hd(he);Ut(),X(J,{matches:L,loaderData:{},errors:{[ye.id]:_e}},{flushSync:Pe});return}if(A.initialized&&!R&&$1(A.location,J)&&!(ie&&ie.submission&&En(ie.submission.formMethod))){X(J,{matches:Ve},{flushSync:Pe});return}_=new AbortController;let Re=Nr(e.history,J,_.signal,ie&&ie.submission),Ge;if(ie&&ie.pendingError)Ge=[Oi(Ve).route.id,{type:yt.error,error:ie.pendingError}];else if(ie&&ie.submission&&En(ie.submission.formMethod)){let _e=await ve(Re,J,ie.submission,Ve,{replace:ie.replace,flushSync:Pe});if(_e.shortCircuited)return;Ge=_e.pendingActionResult,Ae=Us(J,ie.submission),Pe=!1,Re=Nr(e.history,Re.url,Re.signal)}let{shortCircuited:Ue,loaderData:At,errors:St}=await Ee(Re,J,Ve,Ae,ie&&ie.submission,ie&&ie.fetcherSubmission,ie&&ie.replace,ie&&ie.initialHydration===!0,Pe,Ge);Ue||(_=null,X(J,Ct({matches:Ve},dd(Ge),{loaderData:At,errors:St})))}async function ve(F,J,ie,he,Ae){Ae===void 0&&(Ae={}),ze();let Ve=z1(J,ie);B({navigation:Ve},{flushSync:Ae.flushSync===!0});let Pe,Re=qs(he,J);if(!Re.route.action&&!Re.route.lazy)Pe={type:yt.error,error:fn(405,{method:F.method,pathname:J.pathname,routeId:Re.route.id})};else if(Pe=(await Ne("action",F,[Re],he))[0],F.signal.aborted)return{shortCircuited:!0};if(cr(Pe)){let Ge;return Ae&&Ae.replace!=null?Ge=Ae.replace:Ge=ud(Pe.response.headers.get("Location"),new URL(F.url),h)===A.location.pathname+A.location.search,await me(F,Pe,{submission:ie,replace:Ge}),{shortCircuited:!0}}if(lr(Pe))throw fn(400,{type:"defer-action"});if(dn(Pe)){let Ge=Oi(he,Re.route.id);return(Ae&&Ae.replace)!==!0&&(N=Ft.Push),{pendingActionResult:[Ge.route.id,Pe]}}return{pendingActionResult:[Re.route.id,Pe]}}async function Ee(F,J,ie,he,Ae,Ve,Pe,Re,Ge,Ue){let At=he||Us(J,Ae),St=Ae||Ve||bd(At),_e=c||s,[L,ye]=id(e.history,A,ie,St,J,d.v7_partialHydration&&Re===!0,d.unstable_skipActionErrorRevalidation,R,U,W,ce,le,ge,_e,h,Ue);if(Ut(qe=>!(ie&&ie.some(ft=>ft.route.id===qe))||L&&L.some(ft=>ft.route.id===qe)),re=++ne,L.length===0&&ye.length===0){let qe=ke();return X(J,Ct({matches:ie,loaderData:{},errors:Ue&&dn(Ue[1])?{[Ue[0]]:Ue[1].error}:null},dd(Ue),qe?{fetchers:new Map(A.fetchers)}:{}),{flushSync:Ge}),{shortCircuited:!0}}if(!K&&(!d.v7_partialHydration||!Re)){ye.forEach(ft=>{let Ot=A.fetchers.get(ft.key),Ze=Di(void 0,Ot?Ot.data:void 0);A.fetchers.set(ft.key,Ze)});let qe;Ue&&!dn(Ue[1])?qe={[Ue[0]]:Ue[1].data}:A.actionData&&(Object.keys(A.actionData).length===0?qe=null:qe=A.actionData),B(Ct({navigation:At},qe!==void 0?{actionData:qe}:{},ye.length>0?{fetchers:new Map(A.fetchers)}:{}),{flushSync:Ge})}ye.forEach(qe=>{z.has(qe.key)&&dt(qe.key),qe.controller&&z.set(qe.key,qe.controller)});let De=()=>ye.forEach(qe=>dt(qe.key));_&&_.signal.addEventListener("abort",De);let{loaderResults:Me,fetcherResults:Qe}=await Fe(A.matches,ie,L,ye,F);if(F.signal.aborted)return{shortCircuited:!0};_&&_.signal.removeEventListener("abort",De),ye.forEach(qe=>z.delete(qe.key));let et=pd([...Me,...Qe]);if(et){if(et.idx>=L.length){let qe=ye[et.idx-L.length].key;ge.add(qe)}return await me(F,et.result,{replace:Pe}),{shortCircuited:!0}}let{loaderData:$e,errors:je}=cd(A,ie,L,Me,Ue,ye,Qe,q);q.forEach((qe,ft)=>{qe.subscribe(Ot=>{(Ot||qe.done)&&q.delete(ft)})}),d.v7_partialHydration&&Re&&A.errors&&Object.entries(A.errors).filter(qe=>{let[ft]=qe;return!L.some(Ot=>Ot.route.id===ft)}).forEach(qe=>{let[ft,Ot]=qe;je=Object.assign(je||{},{[ft]:Ot})});let Tt=ke(),ct=jt(re),ut=Tt||ct||ye.length>0;return Ct({loaderData:$e,errors:je},ut?{fetchers:new Map(A.fetchers)}:{})}function fe(F,J,ie,he){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");z.has(F)&&dt(F);let Ae=(he&&he.unstable_flushSync)===!0,Ve=c||s,Pe=Ls(A.location,A.matches,h,d.v7_prependBasename,ie,d.v7_relativeSplatPath,J,he==null?void 0:he.relative),Re=Rr(Ve,Pe,h);if(!Re){nt(F,J,fn(404,{pathname:Pe}),{flushSync:Ae});return}let{path:Ge,submission:Ue,error:At}=rd(d.v7_normalizeFormMethod,!0,Pe,he);if(At){nt(F,J,At,{flushSync:Ae});return}let St=qs(Re,Ge);if(I=(he&&he.preventScrollReset)===!0,Ue&&En(Ue.formMethod)){pe(F,J,Ge,St,Re,Ae,Ue);return}le.set(F,{routeId:J,path:Ge}),Oe(F,J,Ge,St,Re,Ae,Ue)}async function pe(F,J,ie,he,Ae,Ve,Pe){if(ze(),le.delete(F),!he.route.action&&!he.route.lazy){let Ze=fn(405,{method:Pe.formMethod,pathname:ie,routeId:J});nt(F,J,Ze,{flushSync:Ve});return}let Re=A.fetchers.get(F);We(F,Z1(Pe,Re),{flushSync:Ve});let Ge=new AbortController,Ue=Nr(e.history,ie,Ge.signal,Pe);z.set(F,Ge);let At=ne,_e=(await Ne("action",Ue,[he],Ae))[0];if(Ue.signal.aborted){z.get(F)===Ge&&z.delete(F);return}if(d.v7_fetcherPersist&&ce.has(F)){if(cr(_e)||dn(_e)){We(F,Xn(void 0));return}}else{if(cr(_e))if(z.delete(F),re>At){We(F,Xn(void 0));return}else return ge.add(F),We(F,Di(Pe)),me(Ue,_e,{fetcherSubmission:Pe});if(dn(_e)){nt(F,J,_e.error);return}}if(lr(_e))throw fn(400,{type:"defer-action"});let L=A.navigation.location||A.location,ye=Nr(e.history,L,Ge.signal),De=c||s,Me=A.navigation.state!=="idle"?Rr(De,A.navigation.location,h):A.matches;Le(Me,"Didn't find any matches after fetcher action");let Qe=++ne;ae.set(F,Qe);let et=Di(Pe,_e.data);A.fetchers.set(F,et);let[$e,je]=id(e.history,A,Me,Pe,L,!1,d.unstable_skipActionErrorRevalidation,R,U,W,ce,le,ge,De,h,[he.route.id,_e]);je.filter(Ze=>Ze.key!==F).forEach(Ze=>{let Zt=Ze.key,fr=A.fetchers.get(Zt),dr=Di(void 0,fr?fr.data:void 0);A.fetchers.set(Zt,dr),z.has(Zt)&&dt(Zt),Ze.controller&&z.set(Zt,Ze.controller)}),B({fetchers:new Map(A.fetchers)});let Tt=()=>je.forEach(Ze=>dt(Ze.key));Ge.signal.addEventListener("abort",Tt);let{loaderResults:ct,fetcherResults:ut}=await Fe(A.matches,Me,$e,je,ye);if(Ge.signal.aborted)return;Ge.signal.removeEventListener("abort",Tt),ae.delete(F),z.delete(F),je.forEach(Ze=>z.delete(Ze.key));let qe=pd([...ct,...ut]);if(qe){if(qe.idx>=$e.length){let Ze=je[qe.idx-$e.length].key;ge.add(Ze)}return me(ye,qe.result)}let{loaderData:ft,errors:Ot}=cd(A,A.matches,$e,ct,void 0,je,ut,q);if(A.fetchers.has(F)){let Ze=Xn(_e.data);A.fetchers.set(F,Ze)}jt(Qe),A.navigation.state==="loading"&&Qe>re?(Le(N,"Expected pending action"),_&&_.abort(),X(A.navigation.location,{matches:Me,loaderData:ft,errors:Ot,fetchers:new Map(A.fetchers)})):(B({errors:Ot,loaderData:fd(A.loaderData,ft,Me,Ot),fetchers:new Map(A.fetchers)}),R=!1)}async function Oe(F,J,ie,he,Ae,Ve,Pe){let Re=A.fetchers.get(F);We(F,Di(Pe,Re?Re.data:void 0),{flushSync:Ve});let Ge=new AbortController,Ue=Nr(e.history,ie,Ge.signal);z.set(F,Ge);let At=ne,_e=(await Ne("loader",Ue,[he],Ae))[0];if(lr(_e)&&(_e=await vd(_e,Ue.signal,!0)||_e),z.get(F)===Ge&&z.delete(F),!Ue.signal.aborted){if(ce.has(F)){We(F,Xn(void 0));return}if(cr(_e))if(re>At){We(F,Xn(void 0));return}else{ge.add(F),await me(Ue,_e);return}if(dn(_e)){nt(F,J,_e.error);return}Le(!lr(_e),"Unhandled fetcher deferred data"),We(F,Xn(_e.data))}}async function me(F,J,ie){let{submission:he,fetcherSubmission:Ae,replace:Ve}=ie===void 0?{}:ie;J.response.headers.has("X-Remix-Revalidate")&&(R=!0);let Pe=J.response.headers.get("Location");Le(Pe,"Expected a Location header on the redirect Response"),Pe=ud(Pe,new URL(F.url),h);let Re=Is(A.location,Pe,{_isRedirect:!0});if(n){let L=!1;if(J.response.headers.has("X-Remix-Reload-Document"))L=!0;else if(js.test(Pe)){const ye=e.history.createURL(Pe);L=ye.origin!==t.location.origin||wn(ye.pathname,h)==null}if(L){Ve?t.location.replace(Pe):t.location.assign(Pe);return}}_=null;let Ge=Ve===!0?Ft.Replace:Ft.Push,{formMethod:Ue,formAction:At,formEncType:St}=A.navigation;!he&&!Ae&&Ue&&At&&St&&(he=bd(A.navigation));let _e=he||Ae;if(B1.has(J.response.status)&&_e&&En(_e.formMethod))await Y(Ge,Re,{submission:Ct({},_e,{formAction:Pe}),preventScrollReset:I});else{let L=Us(Re,he);await Y(Ge,Re,{overrideNavigation:L,fetcherSubmission:Ae,preventScrollReset:I})}}async function Ne(F,J,ie,he){try{let Ae=await U1(g,F,J,ie,he,a,i);return await Promise.all(Ae.map((Ve,Pe)=>{if(H1(Ve)){let Re=Ve.result;return{type:yt.redirect,response:K1(Re,J,ie[Pe].route.id,he,h,d.v7_relativeSplatPath)}}return Y1(Ve)}))}catch(Ae){return ie.map(()=>({type:yt.error,error:Ae}))}}async function Fe(F,J,ie,he,Ae){let[Ve,...Pe]=await Promise.all([ie.length?Ne("loader",Ae,ie,J):[],...he.map(Re=>{if(Re.matches&&Re.match&&Re.controller){let Ge=Nr(e.history,Re.path,Re.controller.signal);return Ne("loader",Ge,[Re.match],Re.matches).then(Ue=>Ue[0])}else return Promise.resolve({type:yt.error,error:fn(404,{pathname:Re.path})})})]);return await Promise.all([yd(F,ie,Ve,Ve.map(()=>Ae.signal),!1,A.loaderData),yd(F,he.map(Re=>Re.match),Pe,he.map(Re=>Re.controller?Re.controller.signal:null),!0)]),{loaderResults:Ve,fetcherResults:Pe}}function ze(){R=!0,U.push(...Ut()),le.forEach((F,J)=>{z.has(J)&&(W.push(J),dt(J))})}function We(F,J,ie){ie===void 0&&(ie={}),A.fetchers.set(F,J),B({fetchers:new Map(A.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function nt(F,J,ie,he){he===void 0&&(he={});let Ae=Oi(A.matches,J);$t(F),B({errors:{[Ae.route.id]:ie},fetchers:new Map(A.fetchers)},{flushSync:(he&&he.flushSync)===!0})}function ot(F){return d.v7_fetcherPersist&&(xe.set(F,(xe.get(F)||0)+1),ce.has(F)&&ce.delete(F)),A.fetchers.get(F)||k1}function $t(F){let J=A.fetchers.get(F);z.has(F)&&!(J&&J.state==="loading"&&ae.has(F))&&dt(F),le.delete(F),ae.delete(F),ge.delete(F),ce.delete(F),A.fetchers.delete(F)}function rt(F){if(d.v7_fetcherPersist){let J=(xe.get(F)||0)-1;J<=0?(xe.delete(F),ce.add(F)):xe.set(F,J)}else $t(F);B({fetchers:new Map(A.fetchers)})}function dt(F){let J=z.get(F);Le(J,"Expected fetch controller: "+F),J.abort(),z.delete(F)}function at(F){for(let J of F){let ie=ot(J),he=Xn(ie.data);A.fetchers.set(J,he)}}function ke(){let F=[],J=!1;for(let ie of ge){let he=A.fetchers.get(ie);Le(he,"Expected fetcher: "+ie),he.state==="loading"&&(ge.delete(ie),F.push(ie),J=!0)}return at(F),J}function jt(F){let J=[];for(let[ie,he]of ae)if(he<F){let Ae=A.fetchers.get(ie);Le(Ae,"Expected fetcher: "+ie),Ae.state==="loading"&&(dt(ie),ae.delete(ie),J.push(ie))}return at(J),J.length>0}function vt(F,J){let ie=A.blockers.get(F)||Ti;return G.get(F)!==J&&G.set(F,J),ie}function _t(F){A.blockers.delete(F),G.delete(F)}function bt(F,J){let ie=A.blockers.get(F)||Ti;Le(ie.state==="unblocked"&&J.state==="blocked"||ie.state==="blocked"&&J.state==="blocked"||ie.state==="blocked"&&J.state==="proceeding"||ie.state==="blocked"&&J.state==="unblocked"||ie.state==="proceeding"&&J.state==="unblocked","Invalid blocker state transition: "+ie.state+" -> "+J.state);let he=new Map(A.blockers);he.set(F,J),B({blockers:he})}function Vt(F){let{currentLocation:J,nextLocation:ie,historyAction:he}=F;if(G.size===0)return;G.size>1&&Lt(!1,"A router only supports one blocker at a time");let Ae=Array.from(G.entries()),[Ve,Pe]=Ae[Ae.length-1],Re=A.blockers.get(Ve);if(!(Re&&Re.state==="proceeding")&&Pe({currentLocation:J,nextLocation:ie,historyAction:he}))return Ve}function Ut(F){let J=[];return q.forEach((ie,he)=>{(!F||F(he))&&(ie.cancel(),J.push(he),q.delete(he))}),J}function zt(F,J,ie){if(w=F,l=J,o=ie||null,!p&&A.navigation===Fs){p=!0;let he=ht(A.location,A.matches);he!=null&&B({restoreScrollPosition:he})}return()=>{w=null,l=null,o=null}}function Gt(F,J){return o&&o(F,J.map(he=>d1(he,A.loaderData)))||F.key}function Yt(F,J){if(w&&l){let ie=Gt(F,J);w[ie]=l()}}function ht(F,J){if(w){let ie=Gt(F,J),he=w[ie];if(typeof he=="number")return he}return null}function rn(F){a={},c=Rs(F,i,void 0,a)}return D={get basename(){return h},get future(){return d},get state(){return A},get routes(){return s},get window(){return t},initialize:x,subscribe:j,enableScrollRestoration:zt,navigate:te,fetch:fe,revalidate:ee,createHref:F=>e.history.createHref(F),encodeLocation:F=>e.history.encodeLocation(F),getFetcher:ot,deleteFetcher:rt,dispose:M,getBlocker:vt,deleteBlocker:_t,_internalFetchControllers:z,_internalActiveDeferreds:q,_internalSetRoutes:rn},D}function L1(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Ls(e,t,n,r,i,a,s,c){let h,g;if(s){h=[];for(let E of t)if(h.push(E),E.route.id===s){g=E;break}}else h=t,g=t[t.length-1];let d=Bs(i||".",Ms(h,a),wn(e.pathname,n)||e.pathname,c==="path");return i==null&&(d.search=e.search,d.hash=e.hash),(i==null||i===""||i===".")&&g&&g.route.index&&!Vs(d.search)&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(d.pathname=d.pathname==="/"?n:Nn([n,d.pathname])),ur(d)}function rd(e,t,n,r){if(!r||!L1(r))return{path:n};if(r.formMethod&&!J1(r.formMethod))return{path:n,error:fn(405,{method:r.formMethod})};let i=()=>({path:n,error:fn(400,{type:"invalid-body"})}),a=r.formMethod||"get",s=e?a.toUpperCase():a.toLowerCase(),c=gd(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!En(s))return i();let u=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((w,o)=>{let[l,p]=o;return""+w+l+"="+p+`
85
+ `},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:c,formEncType:r.formEncType,formData:void 0,json:void 0,text:u}}}else if(r.formEncType==="application/json"){if(!En(s))return i();try{let u=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:c,formEncType:r.formEncType,formData:void 0,json:u,text:void 0}}}catch{return i()}}}Le(typeof FormData=="function","FormData is not available in this environment");let h,g;if(r.formData)h=_s(r.formData),g=r.formData;else if(r.body instanceof FormData)h=_s(r.body),g=r.body;else if(r.body instanceof URLSearchParams)h=r.body,g=ld(h);else if(r.body==null)h=new URLSearchParams,g=new FormData;else try{h=new URLSearchParams(r.body),g=ld(h)}catch{return i()}let d={formMethod:s,formAction:c,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(En(d.formMethod))return{path:n,submission:d};let E=Fn(n);return t&&E.search&&Vs(E.search)&&h.append("index",""),E.search="?"+h,{path:ur(E),submission:d}}function _1(e,t){let n=e;if(t){let r=e.findIndex(i=>i.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function id(e,t,n,r,i,a,s,c,h,g,d,E,u,w,o,l){let p=l?dn(l[1])?l[1].error:l[1].data:void 0,f=e.createURL(t.location),m=e.createURL(i),b=l&&dn(l[1])?l[0]:void 0,C=b?_1(n,b):n,S=l?l[1].statusCode:void 0,D=s&&S&&S>=400,A=C.filter((I,_)=>{let{route:Q}=I;if(Q.lazy)return!0;if(Q.loader==null)return!1;if(a)return typeof Q.loader!="function"||Q.loader.hydrate?!0:t.loaderData[Q.id]===void 0&&(!t.errors||t.errors[Q.id]===void 0);if(V1(t.loaderData,t.matches[_],I)||h.some(K=>K===I.route.id))return!0;let $=t.matches[_],V=I;return ad(I,Ct({currentUrl:f,currentParams:$.params,nextUrl:m,nextParams:V.params},r,{actionResult:p,unstable_actionStatus:S,defaultShouldRevalidate:D?!1:c||f.pathname+f.search===m.pathname+m.search||f.search!==m.search||od($,V)}))}),N=[];return E.forEach((I,_)=>{if(a||!n.some(R=>R.route.id===I.routeId)||d.has(_))return;let Q=Rr(w,I.path,o);if(!Q){N.push({key:_,routeId:I.routeId,path:I.path,matches:null,match:null,controller:null});return}let $=t.fetchers.get(_),V=qs(Q,I.path),K=!1;u.has(_)?K=!1:g.includes(_)?K=!0:$&&$.state!=="idle"&&$.data===void 0?K=c:K=ad(V,Ct({currentUrl:f,currentParams:t.matches[t.matches.length-1].params,nextUrl:m,nextParams:n[n.length-1].params},r,{actionResult:p,unstable_actionStatus:S,defaultShouldRevalidate:D?!1:c})),K&&N.push({key:_,routeId:I.routeId,path:I.path,matches:Q,match:V,controller:new AbortController})}),[A,N]}function V1(e,t,n){let r=!t||n.route.id!==t.route.id,i=e[n.route.id]===void 0;return r||i}function od(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function ad(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function sd(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let i=n[e.id];Le(i,"No route found in manifest");let a={};for(let s in r){let h=i[s]!==void 0&&s!=="hasErrorBoundary";Lt(!h,'Route "'+i.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!h&&!c1.has(s)&&(a[s]=r[s])}Object.assign(i,a),Object.assign(i,Ct({},t(i),{lazy:void 0}))}function q1(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function U1(e,t,n,r,i,a,s,c){let h=r.reduce((E,u)=>E.add(u.route.id),new Set),g=new Set,d=await e({matches:i.map(E=>{let u=h.has(E.route.id);return Ct({},E,{shouldLoad:u,resolve:o=>(g.add(E.route.id),u?G1(t,n,E,a,s,o,c):Promise.resolve({type:yt.data,result:void 0}))})}),request:n,params:i[0].params,context:c});return i.forEach(E=>Le(g.has(E.route.id),'`match.resolve()` was not called for route id "'+E.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),d.filter((E,u)=>h.has(i[u].route.id))}async function G1(e,t,n,r,i,a,s){let c,h,g=d=>{let E,u=new Promise((l,p)=>E=p);h=()=>E(),t.signal.addEventListener("abort",h);let w=l=>typeof d!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):d({request:t,params:n.params,context:s},...l!==void 0?[l]:[]),o;return a?o=a(l=>w(l)):o=(async()=>{try{return{type:"data",result:await w()}}catch(l){return{type:"error",result:l}}})(),Promise.race([o,u])};try{let d=n.route[e];if(n.route.lazy)if(d){let E,[u]=await Promise.all([g(d).catch(w=>{E=w}),sd(n.route,i,r)]);if(E!==void 0)throw E;c=u}else if(await sd(n.route,i,r),d=n.route[e],d)c=await g(d);else if(e==="action"){let E=new URL(t.url),u=E.pathname+E.search;throw fn(405,{method:t.method,pathname:u,routeId:n.route.id})}else return{type:yt.data,result:void 0};else if(d)c=await g(d);else{let E=new URL(t.url),u=E.pathname+E.search;throw fn(404,{pathname:u})}Le(c.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(d){return{type:yt.error,result:d}}finally{h&&t.signal.removeEventListener("abort",h)}return c}async function Y1(e){let{result:t,type:n,status:r}=e;if(md(t)){let s;try{let c=t.headers.get("Content-Type");c&&/\bapplication\/json\b/.test(c)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(c){return{type:yt.error,error:c}}return n===yt.error?{type:yt.error,error:new ed(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:yt.data,data:s,statusCode:t.status,headers:t.headers}}if(n===yt.error)return{type:yt.error,error:t,statusCode:ks(t)?t.status:r};if(W1(t)){var i,a;return{type:yt.deferred,deferredData:t,statusCode:(i=t.init)==null?void 0:i.status,headers:((a=t.init)==null?void 0:a.headers)&&new Headers(t.init.headers)}}return{type:yt.data,data:t,statusCode:r}}function K1(e,t,n,r,i,a){let s=e.headers.get("Location");if(Le(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!js.test(s)){let c=r.slice(0,r.findIndex(h=>h.route.id===n)+1);s=Ls(new URL(t.url),c,i,!0,s,a),e.headers.set("Location",s)}return e}function ud(e,t,n){if(js.test(e)){let r=e,i=r.startsWith("//")?new URL(t.protocol+r):new URL(r),a=wn(i.pathname,n)!=null;if(i.origin===t.origin&&a)return i.pathname+i.search+i.hash}return e}function Nr(e,t,n,r){let i=e.createURL(gd(t)).toString(),a={signal:n};if(r&&En(r.formMethod)){let{formMethod:s,formEncType:c}=r;a.method=s.toUpperCase(),c==="application/json"?(a.headers=new Headers({"Content-Type":c}),a.body=JSON.stringify(r.json)):c==="text/plain"?a.body=r.text:c==="application/x-www-form-urlencoded"&&r.formData?a.body=_s(r.formData):a.body=r.formData}return new Request(i,a)}function _s(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function ld(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Q1(e,t,n,r,i,a){let s={},c=null,h,g=!1,d={},E=r&&dn(r[1])?r[1].error:void 0;return n.forEach((u,w)=>{let o=t[w].route.id;if(Le(!cr(u),"Cannot handle redirect results in processLoaderData"),dn(u)){let l=u.error;E!==void 0&&(l=E,E=void 0),c=c||{};{let p=Oi(e,o);c[p.route.id]==null&&(c[p.route.id]=l)}s[o]=void 0,g||(g=!0,h=ks(u.error)?u.error.status:500),u.headers&&(d[o]=u.headers)}else lr(u)?(i.set(o,u.deferredData),s[o]=u.deferredData.data,u.statusCode!=null&&u.statusCode!==200&&!g&&(h=u.statusCode),u.headers&&(d[o]=u.headers)):(s[o]=u.data,u.statusCode&&u.statusCode!==200&&!g&&(h=u.statusCode),u.headers&&(d[o]=u.headers))}),E!==void 0&&r&&(c={[r[0]]:E},s[r[0]]=void 0),{loaderData:s,errors:c,statusCode:h||200,loaderHeaders:d}}function cd(e,t,n,r,i,a,s,c){let{loaderData:h,errors:g}=Q1(t,n,r,i,c);for(let d=0;d<a.length;d++){let{key:E,match:u,controller:w}=a[d];Le(s!==void 0&&s[d]!==void 0,"Did not find corresponding fetcher result");let o=s[d];if(!(w&&w.signal.aborted))if(dn(o)){let l=Oi(e.matches,u==null?void 0:u.route.id);g&&g[l.route.id]||(g=Ct({},g,{[l.route.id]:o.error})),e.fetchers.delete(E)}else if(cr(o))Le(!1,"Unhandled fetcher revalidation redirect");else if(lr(o))Le(!1,"Unhandled fetcher deferred data");else{let l=Xn(o.data);e.fetchers.set(E,l)}}return{loaderData:h,errors:g}}function fd(e,t,n,r){let i=Ct({},t);for(let a of n){let s=a.route.id;if(t.hasOwnProperty(s)?t[s]!==void 0&&(i[s]=t[s]):e[s]!==void 0&&a.route.loader&&(i[s]=e[s]),r&&r.hasOwnProperty(s))break}return i}function dd(e){return e?dn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Oi(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function hd(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function fn(e,t){let{pathname:n,routeId:r,method:i,type:a}=t===void 0?{}:t,s="Unknown Server Error",c="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&n&&r?c="You made a "+i+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":a==="defer-action"?c="defer() is not supported in actions":a==="invalid-body"&&(c="Unable to encode submission body")):e===403?(s="Forbidden",c='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",c='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",i&&n&&r?c="You made a "+i.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(c='Invalid request method "'+i.toUpperCase()+'"')),new ed(e||500,s,new Error(c),!0)}function pd(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(cr(n))return{result:n,idx:t}}}function gd(e){let t=typeof e=="string"?Fn(e):e;return ur(Ct({},t,{hash:""}))}function $1(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function H1(e){return md(e.result)&&M1.has(e.result.status)}function lr(e){return e.type===yt.deferred}function dn(e){return e.type===yt.error}function cr(e){return(e&&e.type)===yt.redirect}function W1(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function md(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function J1(e){return P1.has(e.toLowerCase())}function En(e){return R1.has(e.toLowerCase())}async function yd(e,t,n,r,i,a){for(let s=0;s<n.length;s++){let c=n[s],h=t[s];if(!h)continue;let g=e.find(E=>E.route.id===h.route.id),d=g!=null&&!od(g,h)&&(a&&a[h.route.id])!==void 0;if(lr(c)&&(i||d)){let E=r[s];Le(E,"Expected an AbortSignal for revalidating fetcher deferred result"),await vd(c,E,i).then(u=>{u&&(n[s]=u||n[s])})}}}async function vd(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:yt.data,data:e.deferredData.unwrappedData}}catch(i){return{type:yt.error,error:i}}return{type:yt.data,data:e.deferredData.data}}}function Vs(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function qs(e,t){let n=typeof t=="string"?Fn(t).search:t.search;if(e[e.length-1].route.index&&Vs(n||""))return e[e.length-1];let r=Xf(e);return r[r.length-1]}function bd(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:s}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function Us(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function z1(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Di(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Z1(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Xn(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function X1(e,t){try{let n=e.sessionStorage.getItem(nd);if(n){let r=JSON.parse(n);for(let[i,a]of Object.entries(r||{}))a&&Array.isArray(a)&&t.set(i,new Set(a||[]))}}catch{}}function eb(e,t){if(t.size>0){let n={};for(let[r,i]of t)n[r]=[...i];try{e.sessionStorage.setItem(nd,JSON.stringify(n))}catch(r){Lt(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
84
86
  * React Router v6.23.1
85
87
  *
86
88
  * Copyright (c) Remix Software Inc.
@@ -89,9 +91,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
89
91
  * LICENSE.md file in the root directory of this source tree.
90
92
  *
91
93
  * @license MIT
92
- */function $r(){return $r=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},$r.apply(this,arguments)}const Wn=le.createContext(null);process.env.NODE_ENV!=="production"&&(Wn.displayName="DataRouter");const $o=le.createContext(null);process.env.NODE_ENV!=="production"&&($o.displayName="DataRouterState");const py=le.createContext(null);process.env.NODE_ENV!=="production"&&(py.displayName="Await");const zt=le.createContext(null);process.env.NODE_ENV!=="production"&&(zt.displayName="Navigation");const Vo=le.createContext(null);process.env.NODE_ENV!=="production"&&(Vo.displayName="Location");const qt=le.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(qt.displayName="Route");const Fa=le.createContext(null);process.env.NODE_ENV!=="production"&&(Fa.displayName="RouteError");function my(e,t){let{relative:n}=t===void 0?{}:t;Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useHref() may be used only in the context of a <Router> component."):ke(!1));let{basename:r,navigator:o}=le.useContext(zt),{hash:a,pathname:s,search:u}=Hr(e,{relative:n}),f=s;return r!=="/"&&(f=s==="/"?r:Qt([r,s])),o.createHref({pathname:f,search:u,hash:a})}function Vr(){return le.useContext(Vo)!=null}function vn(){return Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useLocation() may be used only in the context of a <Router> component."):ke(!1)),le.useContext(Vo).location}const Eu="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Su(e){le.useContext(zt).static||le.useLayoutEffect(e)}function At(){let{isDataRoute:e}=le.useContext(qt);return e?Ry():gy()}function gy(){Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useNavigate() may be used only in the context of a <Router> component."):ke(!1));let e=le.useContext(Wn),{basename:t,future:n,navigator:r}=le.useContext(zt),{matches:o}=le.useContext(qt),{pathname:a}=vn(),s=JSON.stringify(_a(o,n.v7_relativeSplatPath)),u=le.useRef(!1);return Su(()=>{u.current=!0}),le.useCallback(function(g,h){if(h===void 0&&(h={}),process.env.NODE_ENV!=="production"&&ct(u.current,Eu),!u.current)return;if(typeof g=="number"){r.go(g);return}let x=Ra(g,JSON.parse(s),a,h.relative==="path");e==null&&t!=="/"&&(x.pathname=x.pathname==="/"?t:Qt([t,x.pathname])),(h.replace?r.replace:r.push)(x,h.state,h)},[t,r,s,a,e])}const yy=le.createContext(null);function vy(e){let t=le.useContext(qt).outlet;return t&&le.createElement(yy.Provider,{value:e},t)}function Pu(){let{matches:e}=le.useContext(qt),t=e[e.length-1];return t?t.params:{}}function Hr(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=le.useContext(zt),{matches:o}=le.useContext(qt),{pathname:a}=vn(),s=JSON.stringify(_a(o,r.v7_relativeSplatPath));return le.useMemo(()=>Ra(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function by(e,t,n,r){Vr()||(process.env.NODE_ENV!=="production"?ke(!1,"useRoutes() may be used only in the context of a <Router> component."):ke(!1));let{navigator:o}=le.useContext(zt),{matches:a}=le.useContext(qt),s=a[a.length-1],u=s?s.params:{},f=s?s.pathname:"/",g=s?s.pathnameBase:"/",h=s&&s.route;if(process.env.NODE_ENV!=="production"){let d=h&&h.path||"";_u(f,!h||d.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+f+'" (under <Route path="'+d+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
94
+ */function Ii(){return Ii=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},Ii.apply(this,arguments)}const Pr=be.createContext(null);process.env.NODE_ENV!=="production"&&(Pr.displayName="DataRouter");const Fo=be.createContext(null);process.env.NODE_ENV!=="production"&&(Fo.displayName="DataRouterState");const tb=be.createContext(null);process.env.NODE_ENV!=="production"&&(tb.displayName="Await");const xn=be.createContext(null);process.env.NODE_ENV!=="production"&&(xn.displayName="Navigation");const jo=be.createContext(null);process.env.NODE_ENV!=="production"&&(jo.displayName="Location");const Cn=be.createContext({outlet:null,matches:[],isDataRoute:!1});process.env.NODE_ENV!=="production"&&(Cn.displayName="Route");const Gs=be.createContext(null);process.env.NODE_ENV!=="production"&&(Gs.displayName="RouteError");function nb(e,t){let{relative:n}=t===void 0?{}:t;Ri()||(process.env.NODE_ENV!=="production"?Le(!1,"useHref() may be used only in the context of a <Router> component."):Le(!1));let{basename:r,navigator:i}=be.useContext(xn),{hash:a,pathname:s,search:c}=Ni(e,{relative:n}),h=s;return r!=="/"&&(h=s==="/"?r:Nn([r,s])),i.createHref({pathname:h,search:c,hash:a})}function Ri(){return be.useContext(jo)!=null}function er(){return Ri()||(process.env.NODE_ENV!=="production"?Le(!1,"useLocation() may be used only in the context of a <Router> component."):Le(!1)),be.useContext(jo).location}const wd="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Ed(e){be.useContext(xn).static||be.useLayoutEffect(e)}function hn(){let{isDataRoute:e}=be.useContext(Cn);return e?yb():rb()}function rb(){Ri()||(process.env.NODE_ENV!=="production"?Le(!1,"useNavigate() may be used only in the context of a <Router> component."):Le(!1));let e=be.useContext(Pr),{basename:t,future:n,navigator:r}=be.useContext(xn),{matches:i}=be.useContext(Cn),{pathname:a}=er(),s=JSON.stringify(Ms(i,n.v7_relativeSplatPath)),c=be.useRef(!1);return Ed(()=>{c.current=!0}),be.useCallback(function(g,d){if(d===void 0&&(d={}),process.env.NODE_ENV!=="production"&&Lt(c.current,wd),!c.current)return;if(typeof g=="number"){r.go(g);return}let E=Bs(g,JSON.parse(s),a,d.relative==="path");e==null&&t!=="/"&&(E.pathname=E.pathname==="/"?t:Nn([t,E.pathname])),(d.replace?r.replace:r.push)(E,d.state,d)},[t,r,s,a,e])}const ib=be.createContext(null);function ob(e){let t=be.useContext(Cn).outlet;return t&&be.createElement(ib.Provider,{value:e},t)}function xd(){let{matches:e}=be.useContext(Cn),t=e[e.length-1];return t?t.params:{}}function Ni(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=be.useContext(xn),{matches:i}=be.useContext(Cn),{pathname:a}=er(),s=JSON.stringify(Ms(i,r.v7_relativeSplatPath));return be.useMemo(()=>Bs(e,JSON.parse(s),a,n==="path"),[e,s,a,n])}function ab(e,t,n,r){Ri()||(process.env.NODE_ENV!=="production"?Le(!1,"useRoutes() may be used only in the context of a <Router> component."):Le(!1));let{navigator:i}=be.useContext(xn),{matches:a}=be.useContext(Cn),s=a[a.length-1],c=s?s.params:{},h=s?s.pathname:"/",g=s?s.pathnameBase:"/",d=s&&s.route;if(process.env.NODE_ENV!=="production"){let f=d&&d.path||"";Sd(h,!d||f.endsWith("*"),"You rendered descendant <Routes> (or called `useRoutes()`) at "+('"'+h+'" (under <Route path="'+f+'">) but the ')+`parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
93
95
 
94
- `+('Please change the parent <Route path="'+d+'"> to <Route ')+('path="'+(d==="/"?"*":d+"/*")+'">.'))}let x=vn(),l;l=x;let v=l.pathname||"/",i=v;if(g!=="/"){let d=g.replace(/^\//,"").split("/");i="/"+v.replace(/^\//,"").split("/").slice(d.length).join("/")}let c=qn(e,{pathname:i});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&ct(h||c!=null,'No routes matched location "'+l.pathname+l.search+l.hash+'" '),process.env.NODE_ENV!=="production"&&ct(c==null||c[c.length-1].route.element!==void 0||c[c.length-1].route.Component!==void 0||c[c.length-1].route.lazy!==void 0,'Matched leaf route at location "'+l.pathname+l.search+l.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),Ey(c&&c.map(d=>Object.assign({},d,{params:Object.assign({},u,d.params),pathname:Qt([g,o.encodeLocation?o.encodeLocation(d.pathname).pathname:d.pathname]),pathnameBase:d.pathnameBase==="/"?g:Qt([g,o.encodeLocation?o.encodeLocation(d.pathnameBase).pathname:d.pathnameBase])})),a,n,r)}function wy(){let e=_y(),t=Ta(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=le.createElement(le.Fragment,null,le.createElement("p",null,"💿 Hey developer 👋"),le.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",le.createElement("code",{style:a},"ErrorBoundary")," or"," ",le.createElement("code",{style:a},"errorElement")," prop on your route."))),le.createElement(le.Fragment,null,le.createElement("h2",null,"Unexpected Application Error!"),le.createElement("h3",{style:{fontStyle:"italic"}},t),n?le.createElement("pre",{style:o},n):null,s)}const xy=le.createElement(wy,null);class ky extends le.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?le.createElement(qt.Provider,{value:this.props.routeContext},le.createElement(Fa.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Cy(e){let{routeContext:t,match:n,children:r}=e,o=le.useContext(Wn);return o&&o.static&&o.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=n.route.id),le.createElement(qt.Provider,{value:t},r)}function Ey(e,t,n,r){var o;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let s=e,u=(o=n)==null?void 0:o.errors;if(u!=null){let h=s.findIndex(x=>x.route.id&&(u==null?void 0:u[x.route.id])!==void 0);h>=0||(process.env.NODE_ENV!=="production"?ke(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(u).join(",")):ke(!1)),s=s.slice(0,Math.min(s.length,h+1))}let f=!1,g=-1;if(n&&r&&r.v7_partialHydration)for(let h=0;h<s.length;h++){let x=s[h];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(g=h),x.route.id){let{loaderData:l,errors:v}=n,i=x.route.loader&&l[x.route.id]===void 0&&(!v||v[x.route.id]===void 0);if(x.route.lazy||i){f=!0,g>=0?s=s.slice(0,g+1):s=[s[0]];break}}}return s.reduceRight((h,x,l)=>{let v,i=!1,c=null,p=null;n&&(v=u&&x.route.id?u[x.route.id]:void 0,c=x.route.errorElement||xy,f&&(g<0&&l===0?(_u("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),i=!0,p=null):g===l&&(i=!0,p=x.route.hydrateFallbackElement||null)));let d=t.concat(s.slice(0,l+1)),m=()=>{let y;return v?y=c:i?y=p:x.route.Component?y=le.createElement(x.route.Component,null):x.route.element?y=x.route.element:y=h,le.createElement(Cy,{match:x,routeContext:{outlet:h,matches:d,isDataRoute:n!=null},children:y})};return n&&(x.route.ErrorBoundary||x.route.errorElement||l===0)?le.createElement(ky,{location:n.location,revalidation:n.revalidation,component:c,error:v,children:m(),routeContext:{outlet:null,matches:d,isDataRoute:!0}}):m()},null)}var Bu=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Bu||{}),zr=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(zr||{});function Ua(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Sy(e){let t=le.useContext(Wn);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ua(e)):ke(!1)),t}function Py(e){let t=le.useContext($o);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ua(e)):ke(!1)),t}function By(e){let t=le.useContext(qt);return t||(process.env.NODE_ENV!=="production"?ke(!1,Ua(e)):ke(!1)),t}function $a(e){let t=By(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?ke(!1,e+' can only be used on routes that contain a unique "id"'):ke(!1)),n.route.id}function Oy(){return $a(zr.UseRouteId)}function _y(){var e;let t=le.useContext(Fa),n=Py(zr.UseRouteError),r=$a(zr.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Ry(){let{router:e}=Sy(Bu.UseNavigateStable),t=$a(zr.UseNavigateStable),n=le.useRef(!1);return Su(()=>{n.current=!0}),le.useCallback(function(o,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&ct(n.current,Eu),n.current&&(typeof o=="number"?e.navigate(o):e.navigate(o,$r({fromRouteId:t},a)))},[e,t])}const Ou={};function _u(e,t,n){!t&&!Ou[e]&&(Ou[e]=!0,process.env.NODE_ENV!=="production"&&ct(!1,n))}function Kt(e){return vy(e.context)}function Ty(e){let{basename:t="/",children:n=null,location:r,navigationType:o=at.Pop,navigator:a,static:s=!1,future:u}=e;Vr()&&(process.env.NODE_ENV!=="production"?ke(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):ke(!1));let f=t.replace(/^\/*/,"/"),g=le.useMemo(()=>({basename:f,navigator:a,static:s,future:$r({v7_relativeSplatPath:!1},u)}),[f,u,a,s]);typeof r=="string"&&(r=rn(r));let{pathname:h="/",search:x="",hash:l="",state:v=null,key:i="default"}=r,c=le.useMemo(()=>{let p=Vt(h,f);return p==null?null:{location:{pathname:p,search:x,hash:l,state:v,key:i},navigationType:o}},[f,h,x,l,v,i,o]);return process.env.NODE_ENV!=="production"&&ct(c!=null,'<Router basename="'+f+'"> is not able to match the URL '+('"'+h+x+l+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),c==null?null:le.createElement(zt.Provider,{value:g},le.createElement(Vo.Provider,{children:n,value:c}))}new Promise(()=>{});function Ny(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:le.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:le.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&ct(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:le.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}function Gn(e,t){return Jg({basename:void 0,future:$r({},void 0,{v7_prependBasename:!0}),history:xg({initialEntries:void 0,initialIndex:void 0}),hydrationData:void 0,routes:e,mapRouteProperties:Ny,unstable_dataStrategy:void 0}).initialize()}/**
96
+ `+('Please change the parent <Route path="'+f+'"> to <Route ')+('path="'+(f==="/"?"*":f+"/*")+'">.'))}let E=er(),u;u=E;let w=u.pathname||"/",o=w;if(g!=="/"){let f=g.replace(/^\//,"").split("/");o="/"+w.replace(/^\//,"").split("/").slice(f.length).join("/")}let l=Rr(e,{pathname:o});return process.env.NODE_ENV!=="production"&&(process.env.NODE_ENV!=="production"&&Lt(d||l!=null,'No routes matched location "'+u.pathname+u.search+u.hash+'" '),process.env.NODE_ENV!=="production"&&Lt(l==null||l[l.length-1].route.element!==void 0||l[l.length-1].route.Component!==void 0||l[l.length-1].route.lazy!==void 0,'Matched leaf route at location "'+u.pathname+u.search+u.hash+'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.')),fb(l&&l.map(f=>Object.assign({},f,{params:Object.assign({},c,f.params),pathname:Nn([g,i.encodeLocation?i.encodeLocation(f.pathname).pathname:f.pathname]),pathnameBase:f.pathnameBase==="/"?g:Nn([g,i.encodeLocation?i.encodeLocation(f.pathnameBase).pathname:f.pathnameBase])})),a,n,r)}function sb(){let e=mb(),t=ks(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:r},a={padding:"2px 4px",backgroundColor:r},s=null;return process.env.NODE_ENV!=="production"&&(console.error("Error handled by React Router default ErrorBoundary:",e),s=be.createElement(be.Fragment,null,be.createElement("p",null,"💿 Hey developer 👋"),be.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",be.createElement("code",{style:a},"ErrorBoundary")," or"," ",be.createElement("code",{style:a},"errorElement")," prop on your route."))),be.createElement(be.Fragment,null,be.createElement("h2",null,"Unexpected Application Error!"),be.createElement("h3",{style:{fontStyle:"italic"}},t),n?be.createElement("pre",{style:i},n):null,s)}const ub=be.createElement(sb,null);class lb extends be.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?be.createElement(Cn.Provider,{value:this.props.routeContext},be.createElement(Gs.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function cb(e){let{routeContext:t,match:n,children:r}=e,i=be.useContext(Pr);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),be.createElement(Cn.Provider,{value:t},r)}function fb(e,t,n,r){var i;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var a;if((a=n)!=null&&a.errors)e=n.matches;else return null}let s=e,c=(i=n)==null?void 0:i.errors;if(c!=null){let d=s.findIndex(E=>E.route.id&&(c==null?void 0:c[E.route.id])!==void 0);d>=0||(process.env.NODE_ENV!=="production"?Le(!1,"Could not find a matching route for errors on route IDs: "+Object.keys(c).join(",")):Le(!1)),s=s.slice(0,Math.min(s.length,d+1))}let h=!1,g=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<s.length;d++){let E=s[d];if((E.route.HydrateFallback||E.route.hydrateFallbackElement)&&(g=d),E.route.id){let{loaderData:u,errors:w}=n,o=E.route.loader&&u[E.route.id]===void 0&&(!w||w[E.route.id]===void 0);if(E.route.lazy||o){h=!0,g>=0?s=s.slice(0,g+1):s=[s[0]];break}}}return s.reduceRight((d,E,u)=>{let w,o=!1,l=null,p=null;n&&(w=c&&E.route.id?c[E.route.id]:void 0,l=E.route.errorElement||ub,h&&(g<0&&u===0?(Sd("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),o=!0,p=null):g===u&&(o=!0,p=E.route.hydrateFallbackElement||null)));let f=t.concat(s.slice(0,u+1)),m=()=>{let b;return w?b=l:o?b=p:E.route.Component?b=be.createElement(E.route.Component,null):E.route.element?b=E.route.element:b=d,be.createElement(cb,{match:E,routeContext:{outlet:d,matches:f,isDataRoute:n!=null},children:b})};return n&&(E.route.ErrorBoundary||E.route.errorElement||u===0)?be.createElement(lb,{location:n.location,revalidation:n.revalidation,component:l,error:w,children:m(),routeContext:{outlet:null,matches:f,isDataRoute:!0}}):m()},null)}var Cd=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Cd||{}),Pi=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Pi||{});function Ys(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function db(e){let t=be.useContext(Pr);return t||(process.env.NODE_ENV!=="production"?Le(!1,Ys(e)):Le(!1)),t}function hb(e){let t=be.useContext(Fo);return t||(process.env.NODE_ENV!=="production"?Le(!1,Ys(e)):Le(!1)),t}function pb(e){let t=be.useContext(Cn);return t||(process.env.NODE_ENV!=="production"?Le(!1,Ys(e)):Le(!1)),t}function Ks(e){let t=pb(e),n=t.matches[t.matches.length-1];return n.route.id||(process.env.NODE_ENV!=="production"?Le(!1,e+' can only be used on routes that contain a unique "id"'):Le(!1)),n.route.id}function gb(){return Ks(Pi.UseRouteId)}function mb(){var e;let t=be.useContext(Gs),n=hb(Pi.UseRouteError),r=Ks(Pi.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function yb(){let{router:e}=db(Cd.UseNavigateStable),t=Ks(Pi.UseNavigateStable),n=be.useRef(!1);return Ed(()=>{n.current=!0}),be.useCallback(function(i,a){a===void 0&&(a={}),process.env.NODE_ENV!=="production"&&Lt(n.current,wd),n.current&&(typeof i=="number"?e.navigate(i):e.navigate(i,Ii({fromRouteId:t},a)))},[e,t])}const Ad={};function Sd(e,t,n){!t&&!Ad[e]&&(Ad[e]=!0,process.env.NODE_ENV!=="production"&&Lt(!1,n))}function An(e){return ob(e.context)}function vb(e){let{basename:t="/",children:n=null,location:r,navigationType:i=Ft.Pop,navigator:a,static:s=!1,future:c}=e;Ri()&&(process.env.NODE_ENV!=="production"?Le(!1,"You cannot render a <Router> inside another <Router>. You should never have more than one in your app."):Le(!1));let h=t.replace(/^\/*/,"/"),g=be.useMemo(()=>({basename:h,navigator:a,static:s,future:Ii({v7_relativeSplatPath:!1},c)}),[h,c,a,s]);typeof r=="string"&&(r=Fn(r));let{pathname:d="/",search:E="",hash:u="",state:w=null,key:o="default"}=r,l=be.useMemo(()=>{let p=wn(d,h);return p==null?null:{location:{pathname:p,search:E,hash:u,state:w,key:o},navigationType:i}},[h,d,E,u,w,o,i]);return process.env.NODE_ENV!=="production"&&Lt(l!=null,'<Router basename="'+h+'"> is not able to match the URL '+('"'+d+E+u+'" because it does not start with the ')+"basename, so the <Router> won't render anything."),l==null?null:be.createElement(xn.Provider,{value:g},be.createElement(jo.Provider,{children:n,value:l}))}new Promise(()=>{});function bb(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(process.env.NODE_ENV!=="production"&&e.element&&process.env.NODE_ENV!=="production"&&Lt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:be.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(process.env.NODE_ENV!=="production"&&e.hydrateFallbackElement&&process.env.NODE_ENV!=="production"&&Lt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:be.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(process.env.NODE_ENV!=="production"&&e.errorElement&&process.env.NODE_ENV!=="production"&&Lt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:be.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}function Mr(e,t){return j1({basename:void 0,future:Ii({},void 0,{v7_prependBasename:!0}),history:u1({initialEntries:void 0,initialIndex:void 0}),hydrationData:void 0,routes:e,mapRouteProperties:bb,unstable_dataStrategy:void 0}).initialize()}/**
95
97
  * React Router DOM v6.23.1
96
98
  *
97
99
  * Copyright (c) Remix Software Inc.
@@ -100,101 +102,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
100
102
  * LICENSE.md file in the root directory of this source tree.
101
103
  *
102
104
  * @license MIT
103
- */function Xn(){return Xn=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},Xn.apply(this,arguments)}function Va(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}const Ho="get",zo="application/x-www-form-urlencoded";function qo(e){return e!=null&&typeof e.tagName=="string"}function jy(e){return qo(e)&&e.tagName.toLowerCase()==="button"}function Ay(e){return qo(e)&&e.tagName.toLowerCase()==="form"}function Ly(e){return qo(e)&&e.tagName.toLowerCase()==="input"}function Iy(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Dy(e,t){return e.button===0&&(!t||t==="_self")&&!Iy(e)}let Ko=null;function My(){if(Ko===null)try{new FormData(document.createElement("form"),0),Ko=!1}catch{Ko=!0}return Ko}const Fy=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ha(e){return e!=null&&!Fy.has(e)?(process.env.NODE_ENV!=="production"&&ct(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+zo+'"')),null):e}function Uy(e,t){let n,r,o,a,s;if(Ay(e)){let u=e.getAttribute("action");r=u?Vt(u,t):null,n=e.getAttribute("method")||Ho,o=Ha(e.getAttribute("enctype"))||zo,a=new FormData(e)}else if(jy(e)||Ly(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||u.getAttribute("action");if(r=f?Vt(f,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||Ho,o=Ha(e.getAttribute("formenctype"))||Ha(u.getAttribute("enctype"))||zo,a=new FormData(u,e),!My()){let{name:g,type:h,value:x}=e;if(h==="image"){let l=g?g+".":"";a.append(l+"x","0"),a.append(l+"y","0")}else g&&a.append(g,x)}}else{if(qo(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Ho,r=null,o=zo,s=e}return a&&o==="text/plain"&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:o,formData:a,body:s}}const $y=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Vy=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],Hy=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],zy="6";try{window.__reactRouterVersion=zy}catch{}const za=le.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(za.displayName="ViewTransition");const Ru=le.createContext(new Map);process.env.NODE_ENV!=="production"&&(Ru.displayName="Fetchers");const Tu=le["startTransition"],Nu=Yu["flushSync"];function qy(e){Tu?Tu(e):e()}function qr(e){Nu?Nu(e):e()}class Ky{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Wy(e){let{fallbackElement:t,router:n,future:r}=e,[o,a]=le.useState(n.state),[s,u]=le.useState(),[f,g]=le.useState({isTransitioning:!1}),[h,x]=le.useState(),[l,v]=le.useState(),[i,c]=le.useState(),p=le.useRef(new Map),{v7_startTransition:d}=r||{},m=le.useCallback(k=>{d?qy(k):k()},[d]),y=le.useCallback((k,B)=>{let{deletedFetchers:O,unstable_flushSync:j,unstable_viewTransitionOpts:I}=B;O.forEach(M=>p.current.delete(M)),k.fetchers.forEach((M,$)=>{M.data!==void 0&&p.current.set($,M.data)});let D=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!I||D){j?qr(()=>a(k)):m(()=>a(k));return}if(j){qr(()=>{l&&(h&&h.resolve(),l.skipTransition()),g({isTransitioning:!0,flushSync:!0,currentLocation:I.currentLocation,nextLocation:I.nextLocation})});let M=n.window.document.startViewTransition(()=>{qr(()=>a(k))});M.finished.finally(()=>{qr(()=>{x(void 0),v(void 0),u(void 0),g({isTransitioning:!1})})}),qr(()=>v(M));return}l?(h&&h.resolve(),l.skipTransition(),c({state:k,currentLocation:I.currentLocation,nextLocation:I.nextLocation})):(u(k),g({isTransitioning:!0,flushSync:!1,currentLocation:I.currentLocation,nextLocation:I.nextLocation}))},[n.window,l,h,p,m]);le.useLayoutEffect(()=>n.subscribe(y),[n,y]),le.useEffect(()=>{f.isTransitioning&&!f.flushSync&&x(new Ky)},[f]),le.useEffect(()=>{if(h&&s&&n.window){let k=s,B=h.promise,O=n.window.document.startViewTransition(async()=>{m(()=>a(k)),await B});O.finished.finally(()=>{x(void 0),v(void 0),u(void 0),g({isTransitioning:!1})}),v(O)}},[m,s,h,n.window]),le.useEffect(()=>{h&&s&&o.location.key===s.location.key&&h.resolve()},[h,l,o.location,s]),le.useEffect(()=>{!f.isTransitioning&&i&&(u(i.state),g({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}),c(void 0))},[f.isTransitioning,i]),le.useEffect(()=>{process.env.NODE_ENV!=="production"&&ct(t==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let b=le.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,B,O)=>n.navigate(k,{state:B,preventScrollReset:O==null?void 0:O.preventScrollReset}),replace:(k,B,O)=>n.navigate(k,{replace:!0,state:B,preventScrollReset:O==null?void 0:O.preventScrollReset})}),[n]),C=n.basename||"/",S=le.useMemo(()=>({router:n,navigator:b,static:!1,basename:C}),[n,b,C]);return le.createElement(le.Fragment,null,le.createElement(Wn.Provider,{value:S},le.createElement($o.Provider,{value:o},le.createElement(Ru.Provider,{value:p.current},le.createElement(za.Provider,{value:f},le.createElement(Ty,{basename:C,location:o.location,navigationType:o.historyAction,navigator:b,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},o.initialized||n.future.v7_partialHydration?le.createElement(Gy,{routes:n.routes,future:n.future,state:o}):t))))),null)}function Gy(e){let{routes:t,future:n,state:r}=e;return by(t,void 0,r,n)}process.env.NODE_ENV;const Xy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Jy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ju=le.forwardRef(function(t,n){let{onClick:r,relative:o,reloadDocument:a,replace:s,state:u,target:f,to:g,preventScrollReset:h,unstable_viewTransition:x}=t,l=Va(t,$y),{basename:v}=le.useContext(zt),i,c=!1;if(typeof g=="string"&&Jy.test(g)&&(i=g,Xy))try{let y=new URL(window.location.href),b=g.startsWith("//")?new URL(y.protocol+g):new URL(g),C=Vt(b.pathname,v);b.origin===y.origin&&C!=null?g=C+b.search+b.hash:c=!0}catch{process.env.NODE_ENV!=="production"&&ct(!1,'<Link to="'+g+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let p=my(g,{relative:o}),d=ev(g,{replace:s,state:u,target:f,preventScrollReset:h,relative:o,unstable_viewTransition:x});function m(y){r&&r(y),y.defaultPrevented||d(y)}return le.createElement("a",Xn({},l,{href:i||p,onClick:c||a?r:m,ref:n,target:f}))});process.env.NODE_ENV!=="production"&&(ju.displayName="Link");const Yy=le.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:o=!1,className:a="",end:s=!1,style:u,to:f,unstable_viewTransition:g,children:h}=t,x=Va(t,Vy),l=Hr(f,{relative:x.relative}),v=vn(),i=le.useContext($o),{navigator:c,basename:p}=le.useContext(zt),d=i!=null&&av(l)&&g===!0,m=c.encodeLocation?c.encodeLocation(l).pathname:l.pathname,y=v.pathname,b=i&&i.navigation&&i.navigation.location?i.navigation.location.pathname:null;o||(y=y.toLowerCase(),b=b?b.toLowerCase():null,m=m.toLowerCase()),b&&p&&(b=Vt(b,p)||b);const C=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let S=y===m||!s&&y.startsWith(m)&&y.charAt(C)==="/",k=b!=null&&(b===m||!s&&b.startsWith(m)&&b.charAt(m.length)==="/"),B={isActive:S,isPending:k,isTransitioning:d},O=S?r:void 0,j;typeof a=="function"?j=a(B):j=[a,S?"active":null,k?"pending":null,d?"transitioning":null].filter(Boolean).join(" ");let I=typeof u=="function"?u(B):u;return le.createElement(ju,Xn({},x,{"aria-current":O,className:j,ref:n,style:I,to:f,unstable_viewTransition:g}),typeof h=="function"?h(B):h)});process.env.NODE_ENV!=="production"&&(Yy.displayName="NavLink");const Qy=le.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:o,replace:a,state:s,method:u=Ho,action:f,onSubmit:g,relative:h,preventScrollReset:x,unstable_viewTransition:l}=e,v=Va(e,Hy),i=ov(),c=iv(f,{relative:h}),p=u.toLowerCase()==="get"?"get":"post",d=m=>{if(g&&g(m),m.defaultPrevented)return;m.preventDefault();let y=m.nativeEvent.submitter,b=(y==null?void 0:y.getAttribute("formmethod"))||u;i(y||m.currentTarget,{fetcherKey:n,method:b,navigate:r,replace:a,state:s,relative:h,preventScrollReset:x,unstable_viewTransition:l})};return le.createElement("form",Xn({ref:t,method:p,action:c,onSubmit:o?g:d},v))});process.env.NODE_ENV!=="production"&&(Qy.displayName="Form"),process.env.NODE_ENV;var Wo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Wo||(Wo={}));var Au;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Au||(Au={}));function Zy(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Lu(e){let t=le.useContext(Wn);return t||(process.env.NODE_ENV!=="production"?ke(!1,Zy(e)):ke(!1)),t}function ev(e,t){let{target:n,replace:r,state:o,preventScrollReset:a,relative:s,unstable_viewTransition:u}=t===void 0?{}:t,f=At(),g=vn(),h=Hr(e,{relative:s});return le.useCallback(x=>{if(Dy(x,n)){x.preventDefault();let l=r!==void 0?r:Pn(g)===Pn(h);f(e,{replace:l,state:o,preventScrollReset:a,relative:s,unstable_viewTransition:u})}},[g,f,h,r,o,n,e,a,s,u])}function tv(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let nv=0,rv=()=>"__"+String(++nv)+"__";function ov(){let{router:e}=Lu(Wo.UseSubmit),{basename:t}=le.useContext(zt),n=Oy();return le.useCallback(function(r,o){o===void 0&&(o={}),tv();let{action:a,method:s,encType:u,formData:f,body:g}=Uy(r,t);if(o.navigate===!1){let h=o.fetcherKey||rv();e.fetch(h,n,o.action||a,{preventScrollReset:o.preventScrollReset,formData:f,body:g,formMethod:o.method||s,formEncType:o.encType||u,unstable_flushSync:o.unstable_flushSync})}else e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:f,body:g,formMethod:o.method||s,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:n,unstable_flushSync:o.unstable_flushSync,unstable_viewTransition:o.unstable_viewTransition})},[e,t,n])}function iv(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=le.useContext(zt),o=le.useContext(qt);o||(process.env.NODE_ENV!=="production"?ke(!1,"useFormAction must be used inside a RouteContext"):ke(!1));let[a]=o.matches.slice(-1),s=Xn({},Hr(e||".",{relative:n})),u=vn();if(e==null){s.search=u.search;let f=new URLSearchParams(s.search);f.has("index")&&f.get("index")===""&&(f.delete("index"),s.search=f.toString()?"?"+f.toString():"")}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Qt([r,s.pathname])),Pn(s)}function av(e,t){t===void 0&&(t={});let n=le.useContext(za);n==null&&(process.env.NODE_ENV!=="production"?ke(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):ke(!1));let{basename:r}=Lu(Wo.useViewTransitionState),o=Hr(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=Vt(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=Vt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ba(o.pathname,s)!=null||Ba(o.pathname,a)!=null}const sv="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.37482%209.55838C0.802045%2011.696%200.887351%2013.9567%201.61959%2016.045C2.35183%2018.1334%203.69695%2019.9524%205.47921%2021.2642C7.26146%2022.5761%209.39798%2023.3199%2011.6096%2023.3985C13.8212%2023.477%2016.0051%2022.8866%2017.876%2021.7045C19.7468%2020.5223%2021.2175%2018.8034%2022.0961%2016.7722C22.9746%2014.7411%2023.2201%2012.4921%2022.8004%2010.3193C22.3807%208.1464%2021.3154%206.15066%2019.7436%204.59277C18.1718%203.03489%2016.1667%201.98732%2013.9902%201.58693M7.14096%202.53681C5.21049%203.48732%203.60119%204.98315%202.51232%206.8391M10.7049%201.48193C10.452%201.51191%2010.2003%201.55066%209.95012%201.59811M18.1995%2015.656C18.757%2014.5927%2019.0317%2013.4039%2018.9971%2012.2038C18.9625%2011.0037%2018.6198%209.83263%2018.002%208.8032C17.3842%207.77377%2016.512%206.92055%2015.4692%206.32553C14.4264%205.73051%2013.2481%205.4137%2012.0476%205.40554C10.847%205.39739%209.66449%205.69816%208.61372%206.27895C7.56295%206.85974%206.67923%207.70104%206.04747%208.72198C5.41572%209.74292%205.05717%2010.9092%205.00628%2012.1087C4.9554%2013.3082%205.21389%2014.5007%205.75691%2015.5714M9.15764%2013.3648C9.00624%2012.9162%208.96314%2012.4382%209.03189%2011.9698C9.10064%2011.5014%209.27926%2011.0559%209.55317%2010.6697C9.82708%2010.2836%2010.1885%209.96774%2010.6079%209.74803C11.0272%209.52832%2011.4926%209.41098%2011.966%209.4056C12.4394%209.40023%2012.9074%209.50697%2013.3316%209.71709C13.7559%209.92722%2014.1244%2010.2348%2014.407%2010.6146C14.6896%2010.9944%2014.8783%2011.4358%2014.9576%2011.9025C15.037%2012.3692%2015.0048%2012.8481%2014.8636%2013.3M14.0993%2010.2622C14.0043%2010.1691%2013.9032%2010.0825%2013.7967%2010.0028M8.2478%2018.3147C9.32147%2018.9965%2010.5606%2019.3728%2011.832%2019.4033C13.1035%2019.4339%2014.3592%2019.1174%2015.4644%2018.488'%20stroke='%233430FF'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e";function lv(){const e=At(),{t}=Qe(),n=kn();return H.useEffect(()=>{n.sessionUuid&&e(`/${n.sessionUuid}`)},[n.sessionUuid,e]),E.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center gap-12 text-center",children:[E.jsxs("div",{className:"flex items-center justify-center gap-3",children:[E.jsx("img",{alt:"logo",src:sv,className:"z-10 h-16 w-16 hover:animate-spin"}),E.jsxs("p",{className:"z-10 text-7xl font-semibold tracking-wide text-gray-600",children:["Welcome to ",E.jsx("span",{className:"italic",children:"PortalSessions"})]})]}),n.sessionUuid?E.jsx(Ye,{style:{padding:"1.5rem 2rem"},label:t("continue"),onClick:()=>e(`/${n.sessionUuid}`)}):E.jsx("p",{className:"text-error-600",children:`${t("somethingWentWrong")} ${t("portalSessionNotFound")}.`})]})}function cv(){const e=At(),{t}=Qe(),{sessionUuid:n}=kn(),{session:r,isLoading:o,mutate:a}=bt();return H.useEffect(()=>{if(!o&&r){const s=r.type in Zt?`/${r.type.toLowerCase()}`:"/";e(s)}},[o,a,e,r]),o?E.jsx(Tl,{}):E.jsx("div",{className:"flex w-full items-center justify-center text-error-600",children:`${t("portalSessionNotFound")} (${n})`})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(qa,{})},{path:"/top-up/:hash",element:E.jsx(Du,{})},{path:"/redeem/:hash",element:E.jsx(Iu,{})}]}]);function qa(){const{t:e}=Qe(),[t,n]=H.useState(""),[r,o]=H.useState(!1),{session:a}=bt(),s=At(),u=a==null?void 0:a.input_data.scanner_type,f=H.useCallback(()=>a.results.remaining_amount??(a==null?void 0:a.input_data.amount_in_cents),[a]),g=H.useCallback(async()=>{o(!0);const{data:{data:h}}=await Ii.get(t);s(`${a.type===Tn.REDEEM_GIFTCARD?"redeem":"top-up"}/${h.hash}`)},[t,s,a]);return H.useEffect(()=>{u===Mt.CAMERA&&t&&!r&&g().then()},[t,r,u,g]),(a==null?void 0:a.type)===Tn.REDEEM_GIFTCARD&&!(a!=null&&a.input_data.amount_in_cents)?E.jsx(E.Fragment,{children:e("xIsRequired",{x:"Amount in cents"})}):E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx(qe,{size:"sm",weight:"extralight",children:e("scanGiftcard")}),(a==null?void 0:a.type)===Tn.REDEEM_GIFTCARD&&E.jsx(qe,{size:"lg",children:`${e("amountToBePaid")}: ${tr(f())}`}),E.jsx(wo,{dataSetter:n,type:u,label:e("hash")}),u===Mt.HAND_SCANNER&&E.jsx("div",{children:E.jsx(Ye,{type:"submit",label:e("submit"),onClick:g})})]})})})}function Iu(){const{t:e}=Qe(),{hash:t}=Pu(),{giftcard:n,mutate:r}=hl(t),{session:o,mutate:a}=bt(),{onUseGiftcard:s}=kn(),u=At(),f=(o==null?void 0:o.input_data.amount_in_cents)??0,g=(o==null?void 0:o.input_data.allow_multiple_giftcards)??!0;if(!n)return E.jsx(E.Fragment,{children:e("giftcardNotFound")});const h=async()=>{const v=await Ii.transaction(n.uuid,-l());await r();const i=await a(),c=i==null?void 0:i.data.data.events;Zo(c),De.success(`${e("transactionSuccessful")}!`),s&&s(v.data.data)},x=()=>o.results.remaining_amount??f,l=()=>Math.min(x(),n.amount_in_cents);return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex h-96 flex-col items-center justify-between",children:[E.jsxs("div",{children:[E.jsxs(qe,{size:"md",align:"center",children:[e("giftcard"),": ",n.hash]}),E.jsx(qe,{size:"sm",align:"center",weight:"light",className:"text-gray-500",children:n.expiration_date?e("expiresAtDate",{date:n.formatted_expiration_date}):n.formatted_expiration_date})]}),E.jsxs("div",{children:[E.jsx(qe,{size:"lg",align:"center",children:e("balance")}),E.jsx(qe,{size:"4xl",align:"center",children:n.display_amount})]}),E.jsx("div",{className:"mx-auto flex gap-2",children:l()?E.jsx(Ye,{label:e("confirmAndPay",{amount:tr(l(),o==null?void 0:o.currency)}),onClick:h}):E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx(qe,{size:"lg",align:"center",className:"text-gray-500",children:e("xOfYPaid",{x:x()?tr(f-x(),o==null?void 0:o.currency):e("fullAmount"),y:tr(f,o==null?void 0:o.currency)})}),g&&x()?E.jsx(Ye,{label:e("useAnotherGiftcard"),onClick:()=>u("../")}):null]})})]})})})}function Du(){const{t:e}=Qe(),{hash:t}=Pu(),{giftcard:n,mutate:r}=hl(t),[o,a]=H.useState(!1),[s,u]=H.useState("");if(!n)return E.jsx(E.Fragment,{children:e("giftcardNotFound")});const f=async()=>{const g=await Ii.transaction(n.uuid,parseFloat(s)*100);await r(),De.success(`${e("transactionSuccessful")}! ${e("totalUpgradedAmount")}: ${tr(g.data.data.amount_in_cents)}`),a(!1)};return E.jsxs("div",{className:"container m-auto",children:[E.jsx(_t,{children:E.jsxs("div",{className:"flex h-96 flex-col items-center justify-between",children:[E.jsxs("div",{children:[E.jsxs(qe,{size:"md",align:"center",children:[e("giftcard"),": ",n.hash]}),E.jsx(qe,{size:"sm",align:"center",weight:"light",className:"text-gray-500",children:n.expiration_date?e("expiresAtDate",{date:n.formatted_expiration_date}):n.formatted_expiration_date})]}),E.jsxs("div",{children:[E.jsx(qe,{size:"lg",align:"center",children:e("balance")}),E.jsx(qe,{size:"4xl",align:"center",children:n.display_amount})]}),E.jsx("div",{className:"mx-auto flex gap-2",children:E.jsx(Ye,{label:e("topUp"),onClick:()=>a(!0)})})]})}),E.jsx(Mn,{isOpen:o,onClose:()=>a(!1),children:E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx($i,{value:s,valueSetter:u}),E.jsx(Ye,{label:e("submit"),onClick:f})]})})]})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Fu,{})},{path:"email",element:E.jsx(Uu,{})},{path:"identifier",element:E.jsx(Ka,{})},{path:"register",element:E.jsx($u,{})}]}]);function uv(){const{t:e}=Qe(),{contact:t,isLoading:n,mutate:r}=yo(),[o,a]=H.useState(),[s,u]=H.useState();H.useEffect(()=>{o||(async()=>{const{data:h}=await fl.get();a(h.data.elements)})()},[t,o]);const f=(h,x)=>{u({...s,[h]:x})},g=async()=>{s&&(await fl.update(s),await r(),De.success(e("contactAttributesUpdated")))};return!o||n?E.jsx(Tl,{}):E.jsxs("div",{className:"flex h-full flex-col gap-6",children:[E.jsx("div",{className:"flex justify-end",children:E.jsx(Ye,{label:e("saveChanges"),onClick:g})}),E.jsx("hr",{}),E.jsx("div",{className:"grid h-full grid-cols-2 gap-x-6 gap-y-2 overflow-y-auto p-1",children:o.map(h=>{if(h.type==="media_upload")return;const x=h.disabled?E.jsx(Xh,{type:h.type,value:t.current_display_values[h.name],label:h.label,underlying_value:t.current_values[h.name]}):E.jsx(Jh,{...h,onChange:f});return E.jsx("div",{children:x},h.id)})})]})}function dv(){const{t:e}=Qe(),{data:t,isLoading:n,mutate:r}=Uh(),o=async s=>{await Fh.update({subscription_type_id:s.subscription_type.id}),await r()},a=s=>{const u=s.subscription_type.strategy,f=s.status;if(u===In.FUNCTIONAL)return e("disabled");switch(f){case hr.SUBSCRIBED:return e("unsubscribe");case hr.UNSUBSCRIBED:return u===In.OPT_IN||In.OPT_OUT?e("subscribe"):e("sendConfirmationEmail");case hr.PENDING_CONFIRMATION:return e("sendReminder");default:return""}};return n?E.jsx(Ac,{rows:5}):E.jsx("div",{children:t.data.data.map(s=>E.jsxs("div",{className:"mb-4 flex justify-between rounded-lg border border-gray-200 px-6 py-4 bg-white",children:[E.jsxs("div",{children:[E.jsxs("div",{className:"flex gap-3",children:[E.jsx(qe,{weight:"normal",children:s.subscription_type.name}),E.jsx("span",{className:`flex gap-2 rounded-full px-2 py-0.5 text-sm font-light ${s.is_subscribed?"bg-[#03985515] text-[#039855]":"bg-[#E0273115] text-[#E02731]"}`,children:s.status.charAt(0)+s.status.substring(1).toLowerCase()})]}),E.jsx(qe,{color:"text-gray-400",size:"sm",children:s.subscription_type.description})]}),E.jsx(Ye,{style:{color:"inherit",backgroundColor:"white",border:"1px solid rgb(229 231 235)"},disabled:s.subscription_type.strategy===In.FUNCTIONAL,onClick:()=>o(s),label:a(s)})]},s.subscription_type.uuid))})}const Mu="contact-identifiers",fv={create:e=>tt.instance.post(Je(Mu),e)},hv=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:o}=fn(Je(Mu));return{identifiers:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:o}};function pv(){const{t:e}=Qe(),{data:t,isLoading:n,mutate:r}=hv(),[o,a]=H.useState(!1),[s,u]=H.useState(""),[f,g]=H.useState(!1),h=()=>{g(!0),fv.create({value:s}).then(()=>{r(),a(!1)}).catch(x=>De.error(x)).finally(()=>g(!1))};return n?E.jsx(Ac,{rows:5}):E.jsxs("div",{className:"flex flex-col gap-2",children:[E.jsx("div",{className:"flex justify-end",children:E.jsx(Ye,{label:e("addIdentifier"),onClick:()=>a(!0)})}),t.data.data.map(x=>E.jsx("div",{className:"flex justify-between rounded-lg border border-gray-200 px-6 py-4 bg-white",children:E.jsxs("div",{children:[E.jsx(qe,{weight:"semibold",children:x.name}),E.jsx(qe,{children:x.value})]})},x.value)),E.jsx(Mn,{isOpen:o,onClose:()=>a(!1),title:e("addIdentifier"),children:E.jsxs("div",{className:"flex flex-col gap-4 min-w-96",children:[E.jsx(Dn,{id:"add-identifier",name:"identifier",label:"Identifier value",type:"text",onChange:(x,l)=>u(l),autoFocus:!0}),E.jsx(Ye,{label:e("addIdentifier"),onClick:h,disabled:f})]})})]})}function mv(){const{t:e}=Qe(),[t,n]=H.useState(),r=H.useMemo(()=>[{id:0,label:e("contactDetails"),icon:E.jsx("path",{d:"M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"}),content:E.jsx(uv,{})},{id:1,label:e("subscriptions"),icon:E.jsx("path",{d:"M18 7.5h-.423l-.452-1.09.3-.3a1.5 1.5 0 0 0 0-2.121L16.01 2.575a1.5 1.5 0 0 0-2.121 0l-.3.3-1.089-.452V2A1.5 1.5 0 0 0 11 .5H9A1.5 1.5 0 0 0 7.5 2v.423l-1.09.452-.3-.3a1.5 1.5 0 0 0-2.121 0L2.576 3.99a1.5 1.5 0 0 0 0 2.121l.3.3L2.423 7.5H2A1.5 1.5 0 0 0 .5 9v2A1.5 1.5 0 0 0 2 12.5h.423l.452 1.09-.3.3a1.5 1.5 0 0 0 0 2.121l1.415 1.413a1.5 1.5 0 0 0 2.121 0l.3-.3 1.09.452V18A1.5 1.5 0 0 0 9 19.5h2a1.5 1.5 0 0 0 1.5-1.5v-.423l1.09-.452.3.3a1.5 1.5 0 0 0 2.121 0l1.415-1.414a1.5 1.5 0 0 0 0-2.121l-.3-.3.452-1.09H18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 18 7.5Zm-8 6a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z"}),content:E.jsx(dv,{})},{id:2,label:e("identifiers"),icon:E.jsx("path",{d:"M18 7.5h-.423l-.452-1.09.3-.3a1.5 1.5 0 0 0 0-2.121L16.01 2.575a1.5 1.5 0 0 0-2.121 0l-.3.3-1.089-.452V2A1.5 1.5 0 0 0 11 .5H9A1.5 1.5 0 0 0 7.5 2v.423l-1.09.452-.3-.3a1.5 1.5 0 0 0-2.121 0L2.576 3.99a1.5 1.5 0 0 0 0 2.121l.3.3L2.423 7.5H2A1.5 1.5 0 0 0 .5 9v2A1.5 1.5 0 0 0 2 12.5h.423l.452 1.09-.3.3a1.5 1.5 0 0 0 0 2.121l1.415 1.413a1.5 1.5 0 0 0 2.121 0l.3-.3 1.09.452V18A1.5 1.5 0 0 0 9 19.5h2a1.5 1.5 0 0 0 1.5-1.5v-.423l1.09-.452.3.3a1.5 1.5 0 0 0 2.121 0l1.415-1.414a1.5 1.5 0 0 0 0-2.121l-.3-.3.452-1.09H18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 18 7.5Zm-8 6a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z"}),content:E.jsx(pv,{})}],[e]);return H.useEffect(()=>{t||n(r[0])},[r,t]),E.jsxs("div",{className:"h-full sm:flex",children:[E.jsx("ul",{className:"flex-column space-y mb-4 space-y-4 text-sm font-medium text-gray-500 md:mb-0 md:me-4",children:r.map(o=>E.jsx("li",{children:E.jsxs("div",{className:`inline-flex w-full cursor-pointer items-center rounded-lg px-4 py-3 ${o.id===(t==null?void 0:t.id)?"bg-primary-600 text-white":"bg-gray-50 hover:bg-gray-100 hover:text-gray-900"}`,onClick:()=>n(o),children:[E.jsx("svg",{className:`me-2 h-4 w-4 ${o.id===(t==null?void 0:t.id)?"text-white":"text-gray-500"}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:o.icon}),E.jsx("p",{className:"truncate",children:o.label})]})},o.id))}),E.jsx("div",{className:"text-medium h-full w-full rounded-lg bg-gray-50 p-6",children:t&&t.content})]})}function gv(){const{data:e,isLoading:t,mutate:n}=Mh(),{mutate:r}=yo(),{onClaimReward:o}=kn(),{t:a}=Qe(),s=async u=>{const f=await Dh.claim(u);n(),r(),De.success(a("rewardClaimed",{name:f.data.data.title})),o&&o(f.data.data)};return E.jsx(Lc,{header:t?[]:e.data.data.header.items,rows:t?[]:e.data.data.rows,pending:t,onClick:s})}function yv(){const{data:e,isLoading:t,mutate:n}=$h(),{mutate:r}=bt(),{onRedeemVoucher:o}=kn(),{t:a}=Qe(),s=async u=>{const f=await Fi.redeemById(u),g=await r(),h=g==null?void 0:g.data.data.events;Zo(h),n(),De.success(a("voucherSuccessfullyRedeemed")),o&&o(f.data.data)};return E.jsx(Lc,{header:t?[]:e.data.data.header.items,rows:t?[]:e.data.data.rows,pending:t,onClick:s})}function vv(){const{t:e}=Qe(),{session:{loyalty_program:t}}=bt(),{contact:n,isLoading:r}=yo();if(r)return E.jsx(E.Fragment,{});const o=[{value:n.credit_balance.balance,label:t.custom_credit_name||e("points")},{value:n.current_display_values.loyalty_number_of_transactions,label:e("transactions")},{value:n.tier?n.tier.name:"-",label:e("tier")}];return E.jsxs("div",{className:"flex w-full justify-between text-inherit",children:[E.jsxs("div",{children:[E.jsx("p",{className:"text-md font-medium",children:`${n.current_display_values.firstname} ${n.current_display_values.lastname}`}),E.jsx("p",{className:"text-sm",children:n.current_display_values.email})]}),E.jsx("div",{className:"flex gap-8",children:o.map(a=>E.jsxs("div",{className:"flex flex-col items-center",children:[E.jsx("p",{className:"text-md font-medium",children:a.value}),E.jsx("p",{className:"text-sm",children:a.label})]},a.label))})]})}function bv(){const{t:e}=Qe(),{session:t}=bt(),n=t.contact,[r,o]=H.useState("rewards");if(!n)return E.jsx(E.Fragment,{children:e("contactNotFound")});const a=()=>{switch(r){case"profile":return E.jsx(mv,{});case"rewards":return E.jsx(gv,{});case"vouchers":return E.jsx(yv,{})}};return E.jsx("div",{className:"container m-auto flex h-full p-4",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex h-full flex-col gap-6",children:[E.jsx(vv,{}),E.jsx("hr",{}),E.jsx("div",{children:E.jsx(zh,{elements:[{key:"profile",label:e("profile"),active:r==="profile"},{key:"rewards",label:e("rewards"),active:r==="rewards"},{key:"vouchers",label:e("vouchers"),active:r==="vouchers"}],onClick:s=>o(s)})}),E.jsx("div",{className:"overflow-y-auto",children:a()})]})})})}function wv(){const{session:e}=bt(),t=At(),{t:n}=Qe();return E.jsxs("div",{className:"m-auto flex flex-col items-center gap-4",children:[E.jsx("p",{children:n("noContactLinked")}),E.jsxs("div",{className:"flex gap-4",children:[e.input_data.enable_registration&&E.jsx(Ye,{label:n("registerNewContact"),onClick:()=>t("register")}),e.input_data.enable_email_identification&&E.jsx(Ye,{label:n("linkViaEmail"),onClick:()=>t("email")}),E.jsx(Ye,{label:n("linkViaCard"),onClick:()=>t("identifier")})]})]})}function Ka(){const e=At();return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsx(zi,{callback:()=>e("../")})})})}function Fu(){const{session:e}=bt();return e&&(e.contact?E.jsx(bv,{}):!e.input_data.enable_registration&&!e.input_data.enable_email_identification?E.jsx(Ka,{}):E.jsx(wv,{}))}function Uu(){const[e,t]=H.useState(""),{session:n,mutate:r}=bt(),o=At(),{t:a}=Qe(),s=async()=>{n&&(await vo.setContact(n.uuid,{email:e}),await r(),De.success(a("contactSavedToSession")),o("../"))};return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})}),E.jsx(Dn,{autoFocus:!0,id:"email-input",name:"email",label:a("emailAddress"),type:"email",onChange:(u,f)=>t(f)}),E.jsx("div",{children:E.jsx(Ye,{type:"submit",label:a("linkContact"),onClick:s})})]})})})}function $u(){const[e,t]=H.useState(""),{session:n,mutate:r}=bt(),o=At(),{t:a}=Qe(),s=async()=>{n&&(await Ai.create(e),await r(),De.success(a("contactSavedToSession")),o("../"))};return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsxs("div",{className:"flex flex-col gap-3",children:[E.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})}),E.jsx(Dn,{autoFocus:!0,id:"email-input",name:"email",label:a("emailAddress"),type:"email",onChange:(u,f)=>t(f)}),E.jsx("div",{children:E.jsx(Ye,{type:"submit",label:a("register"),onClick:s})})]})})})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Vu,{})},{path:"balance",element:E.jsx(Hu,{})}]}]);function Vu(){const e=At();return E.jsx("div",{className:"container m-auto",children:E.jsx(_t,{children:E.jsx(zi,{callback:()=>e("balance")})})})}function Hu(){const{t:e}=Qe(),{balance:t,mutate:n}=Ih(),[r,o]=H.useState(""),[a,s]=H.useState(1),[u,f]=H.useState(!1),g=async()=>{r&&(await Lh.transaction({amount_in_cents:parseFloat(r)*100*a}),await n(),De.success(e("prepaidTransactionCreated")),f(!1))};return E.jsxs("div",{className:"container m-auto",children:[E.jsxs(_t,{children:[E.jsxs(qe,{size:"lg",align:"center",weight:"normal",children:[e("prepaidBalance"),": ",t==null?void 0:t.balance]}),E.jsx("div",{className:"mt-6 flex justify-center",children:E.jsxs("div",{className:"grid w-1/3 grid-cols-2 gap-x-2",children:[E.jsx(Ye,{label:e("upgrade"),onClick:()=>{f(!0),s(1)}}),E.jsx(Ye,{label:e("depreciate"),onClick:()=>{f(!0),s(-1)}})]})})]}),E.jsx(Mn,{isOpen:u,onClose:()=>f(!1),children:E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsx($i,{value:r,valueSetter:o}),E.jsx(Ye,{label:e("submit"),onClick:g})]})})]})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(zu,{})},{path:"success",element:E.jsx(qu,{})}]}]);function zu(){const{t:e}=Qe(),[t,n]=H.useState(""),[r,o]=H.useState(!1),{session:a,mutate:s}=bt(),u=At(),f=async()=>{if(t){const{data:{data:g}}=await Ah.create({unit_value:parseFloat(t)});await s(),u("success",{state:{transaction:g}})}};return H.useEffect(()=>{a&&a.contact&&o(!0)},[u,a]),E.jsxs("div",{className:"container m-auto",children:[E.jsx(_t,{children:E.jsx(zi,{})}),E.jsx(Mn,{isOpen:r,children:E.jsxs("div",{className:"flex flex-col gap-4",children:[E.jsxs("p",{className:"text-center",children:[e("unitValue"),":"]}),E.jsx($i,{value:t,valueSetter:n}),E.jsx(Ye,{label:e("submit"),onClick:f})]})})]})}function qu(){const{state:e}=vn(),{t}=Qe(),{session:{loyalty_program:n}}=bt(),{contact:r}=yo();return E.jsx("div",{className:"m-auto",children:E.jsx(El,{children:E.jsxs("div",{className:"mt-8 flex w-96 flex-col gap-4",children:[E.jsxs(qe,{size:"lg",weight:"bold",align:"center",children:[t("creditReceptionCreated"),"!"]}),e&&e.transaction&&E.jsxs(qe,{color:"text-gray-500",align:"center",children:["+",e.transaction.credits," ",n.custom_credit_name||t("points").toLowerCase()]}),E.jsx("div",{className:"h-24"}),r&&E.jsxs("div",{className:"flex justify-between",children:[E.jsxs(qe,{color:"text-gray-200",children:[t("currentCreditBalance"),":"]}),E.jsxs(qe,{color:"text-gray-200",children:[r.credit_balance.balance," ",n.custom_credit_name||t("points").toLowerCase()]})]})]})})})}Gn([{path:"/",element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Ku,{})},{path:"success",element:E.jsx(Wu,{})}]}]);function Ku(){const{t:e}=Qe(),[t,n]=H.useState(""),[r,o]=H.useState(""),[a,s]=H.useState(!1),[u,f]=H.useState(!1),{session:g,mutate:h}=bt(),x=g==null?void 0:g.input_data.scanner_type,l=At(),v=H.useCallback(async()=>{r&&await vo.setContact(g.uuid,{contact_identifier_value:r});const{data:{data:c}}=await Fi.redeemByCode(t),p=await h(),d=p==null?void 0:p.data.data.events;Zo(d),l("success",{state:{voucher:c}})},[t,r,l,g]),i=H.useCallback(async()=>{if(g){s(!0);const{data:{data:c}}=await Fi.get(t);c.contact||g.contact?await v():f(!0),s(!1)}},[t,v,g]);return H.useEffect(()=>{x===Mt.CAMERA&&t&&!a&&(async()=>await i())()},[t,a,x,i,u]),E.jsxs("div",{className:"container m-auto",children:[E.jsxs(_t,{children:[E.jsx(wo,{dataSetter:n,type:x,label:e("voucherCode")}),x===Mt.HAND_SCANNER&&E.jsx("div",{className:"pt-3",children:E.jsx(Ye,{type:"submit",label:e("redeemVoucher"),onClick:i})})]}),E.jsxs(Mn,{isOpen:u,onClose:()=>f(!1),children:[E.jsx("p",{className:"pb-4 text-error-600",children:e("noContactLinkedToVoucher")}),E.jsx(wo,{dataSetter:o,type:x,label:e("contactIdentifier")}),x===Mt.HAND_SCANNER&&E.jsx("div",{className:"pt-3",children:E.jsx(Ye,{type:"submit",label:e("redeemVoucher"),onClick:v})})]})]})}function Wu(){const{t:e}=Qe(),{state:t}=vn();return E.jsx("div",{className:"m-auto",children:E.jsx(El,{children:E.jsx(qe,{size:"lg",align:"center",className:"pt-6",children:e("voucherWithCodeSuccessfullyRedeemed",{code:t.voucher.code})})})})}const xv=Gn([{path:"/",element:E.jsx(lv,{})},{path:":portalSessionUuid",element:E.jsx(cv,{}),errorElement:E.jsx("div",{children:"No session UUID"})},{path:Zt.REDEEM_GIFTCARD,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(qa,{})},{path:"redeem/:hash",element:E.jsx(Iu,{})}]},{path:Zt.TOP_UP_GIFTCARD,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(qa,{})},{path:"top-up/:hash",element:E.jsx(Du,{})}]},{path:Zt.PORTAL,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Fu,{})},{path:"email",element:E.jsx(Uu,{})},{path:"identifier",element:E.jsx(Ka,{})},{path:"register",element:E.jsx($u,{})}]},{path:Zt.PREPAID,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Vu,{})},{path:"balance",element:E.jsx(Hu,{})}]},{path:Zt.SAVE,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(zu,{})},{path:"success",element:E.jsx(qu,{})}]},{path:Zt.VOUCHER,element:E.jsx(Kt,{}),children:[{index:!0,element:E.jsx(Ku,{})},{path:"success",element:E.jsx(Wu,{})}]}]),Gu=()=>E.jsx(Wy,{router:xv});function kv(e){return E.jsx(wg,{config:e,payload:{type:e.type??Tn.PORTAL,api_key:e.apiKey,shop_uuid:e.shopUuid,contact_uuid:e.contactUuid,...e.amountInCents&&{amount_in_cents:e.amountInCents},...e.allowMultipleGiftcards&&{allow_multiple_giftcards:e.allowMultipleGiftcards},...e.scannerType&&{scanner_type:e.scannerType},...e.enableRegistration&&{enable_registration:e.enableRegistration},...e.enableEmailIdentification&&{enable_email_identification:e.enableEmailIdentification},...e.enableOnScreenKeyboard&&{enable_on_screen_keyboard:e.enableOnScreenKeyboard}},children:E.jsx(Gu,{})})}function Cv({uuid:e,host:t}){const[n,r]=H.useState(!1);return H.useEffect(()=>{n||(tt.initialize(void 0,t),r(!0))},[t,n]),n?E.jsxs(H.StrictMode,{children:[E.jsx(ml,{sessionUuid:e,children:E.jsx("div",{className:"flex h-screen w-screen bg-primary-50",children:E.jsxs("div",{className:"flex h-screen w-screen flex-col bg-primary-50",children:[E.jsx("div",{className:"flex h-full overflow-auto",children:E.jsx(Gu,{})}),e&&E.jsx(Cl,{})]})})}),E.jsx(ms,{position:"bottom-center"})]}):E.jsx(E.Fragment,{children:"Initializing..."})}const Ev=Object.freeze(Object.defineProperty({__proto__:null,createWorker:()=>new Worker(URL.createObjectURL(new Blob([`class x{constructor(a,b){this.width=b;this.height=a.length/b;this.data=a}static createEmpty(a,b){return new x(new Uint8ClampedArray(a*b),a)}get(a,b){return 0>a||a>=this.width||0>b||b>=this.height?!1:!!this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c?1:0}setRegion(a,b,c,d,e){for(let f=b;f<b+d;f++)for(let g=a;g<a+c;g++)this.set(g,f,!!e)}}
104
- class A{constructor(a,b,c){this.width=a;a*=b;if(c&&c.length!==a)throw Error("Wrong buffer size");this.data=c||new Uint8ClampedArray(a)}get(a,b){return this.data[b*this.width+a]}set(a,b,c){this.data[b*this.width+a]=c}}
105
- class ba{constructor(a){this.bitOffset=this.byteOffset=0;this.bytes=a}readBits(a){if(1>a||32<a||a>this.available())throw Error("Cannot read "+a.toString()+" bits");var b=0;if(0<this.bitOffset){b=8-this.bitOffset;var c=a<b?a:b;b-=c;b=(this.bytes[this.byteOffset]&255>>8-c<<b)>>b;a-=c;this.bitOffset+=c;8===this.bitOffset&&(this.bitOffset=0,this.byteOffset++)}if(0<a){for(;8<=a;)b=b<<8|this.bytes[this.byteOffset]&255,this.byteOffset++,a-=8;0<a&&(c=8-a,b=b<<a|(this.bytes[this.byteOffset]&255>>c<<c)>>c,
106
- this.bitOffset+=a)}return b}available(){return 8*(this.bytes.length-this.byteOffset)-this.bitOffset}}var B,C=B||(B={});C.Numeric="numeric";C.Alphanumeric="alphanumeric";C.Byte="byte";C.Kanji="kanji";C.ECI="eci";C.StructuredAppend="structuredappend";var D,E=D||(D={});E[E.Terminator=0]="Terminator";E[E.Numeric=1]="Numeric";E[E.Alphanumeric=2]="Alphanumeric";E[E.Byte=4]="Byte";E[E.Kanji=8]="Kanji";E[E.ECI=7]="ECI";E[E.StructuredAppend=3]="StructuredAppend";let F="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:".split("");
107
- function ca(a,b){let c=[],d="";b=a.readBits([8,16,16][b]);for(let e=0;e<b;e++){let f=a.readBits(8);c.push(f)}try{d+=decodeURIComponent(c.map(e=>\`%\${("0"+e.toString(16)).substr(-2)}\`).join(""))}catch(e){}return{bytes:c,text:d}}
108
- function da(a,b){a=new ba(a);let c=9>=b?0:26>=b?1:2;for(b={text:"",bytes:[],chunks:[],version:b};4<=a.available();){var d=a.readBits(4);if(d===D.Terminator)return b;if(d===D.ECI)0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(7)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(14)}):0===a.readBits(1)?b.chunks.push({type:B.ECI,assignmentNumber:a.readBits(21)}):b.chunks.push({type:B.ECI,assignmentNumber:-1});else if(d===D.Numeric){var e=a,f=[];d="";for(var g=
109
- e.readBits([10,12,14][c]);3<=g;){var h=e.readBits(10);if(1E3<=h)throw Error("Invalid numeric value above 999");var k=Math.floor(h/100),m=Math.floor(h/10)%10;h%=10;f.push(48+k,48+m,48+h);d+=k.toString()+m.toString()+h.toString();g-=3}if(2===g){g=e.readBits(7);if(100<=g)throw Error("Invalid numeric value above 99");e=Math.floor(g/10);g%=10;f.push(48+e,48+g);d+=e.toString()+g.toString()}else if(1===g){e=e.readBits(4);if(10<=e)throw Error("Invalid numeric value above 9");f.push(48+e);d+=e.toString()}b.text+=
110
- d;b.bytes.push(...f);b.chunks.push({type:B.Numeric,text:d})}else if(d===D.Alphanumeric){e=a;f=[];d="";for(g=e.readBits([9,11,13][c]);2<=g;)m=e.readBits(11),k=Math.floor(m/45),m%=45,f.push(F[k].charCodeAt(0),F[m].charCodeAt(0)),d+=F[k]+F[m],g-=2;1===g&&(e=e.readBits(6),f.push(F[e].charCodeAt(0)),d+=F[e]);b.text+=d;b.bytes.push(...f);b.chunks.push({type:B.Alphanumeric,text:d})}else if(d===D.Byte)d=ca(a,c),b.text+=d.text,b.bytes.push(...d.bytes),b.chunks.push({type:B.Byte,bytes:d.bytes,text:d.text});
111
- else if(d===D.Kanji){f=a;d=[];e=f.readBits([8,10,12][c]);for(g=0;g<e;g++)k=f.readBits(13),k=Math.floor(k/192)<<8|k%192,k=7936>k?k+33088:k+49472,d.push(k>>8,k&255);f=(new TextDecoder("shift-jis")).decode(Uint8Array.from(d));b.text+=f;b.bytes.push(...d);b.chunks.push({type:B.Kanji,bytes:d,text:f})}else d===D.StructuredAppend&&b.chunks.push({type:B.StructuredAppend,currentSequence:a.readBits(4),totalSequence:a.readBits(4),parity:a.readBits(8)})}if(0===a.available()||0===a.readBits(a.available()))return b}
112
- class G{constructor(a,b){if(0===b.length)throw Error("No coefficients.");this.field=a;let c=b.length;if(1<c&&0===b[0]){let d=1;for(;d<c&&0===b[d];)d++;if(d===c)this.coefficients=a.zero.coefficients;else for(this.coefficients=new Uint8ClampedArray(c-d),a=0;a<this.coefficients.length;a++)this.coefficients[a]=b[d+a]}else this.coefficients=b}degree(){return this.coefficients.length-1}isZero(){return 0===this.coefficients[0]}getCoefficient(a){return this.coefficients[this.coefficients.length-1-a]}addOrSubtract(a){if(this.isZero())return a;
113
- if(a.isZero())return this;let b=this.coefficients;a=a.coefficients;b.length>a.length&&([b,a]=[a,b]);let c=new Uint8ClampedArray(a.length),d=a.length-b.length;for(var e=0;e<d;e++)c[e]=a[e];for(e=d;e<a.length;e++)c[e]=b[e-d]^a[e];return new G(this.field,c)}multiply(a){if(0===a)return this.field.zero;if(1===a)return this;let b=this.coefficients.length,c=new Uint8ClampedArray(b);for(let d=0;d<b;d++)c[d]=this.field.multiply(this.coefficients[d],a);return new G(this.field,c)}multiplyPoly(a){if(this.isZero()||
114
- a.isZero())return this.field.zero;let b=this.coefficients,c=b.length;a=a.coefficients;let d=a.length,e=new Uint8ClampedArray(c+d-1);for(let f=0;f<c;f++){let g=b[f];for(let h=0;h<d;h++)e[f+h]=H(e[f+h],this.field.multiply(g,a[h]))}return new G(this.field,e)}multiplyByMonomial(a,b){if(0>a)throw Error("Invalid degree less than 0");if(0===b)return this.field.zero;let c=this.coefficients.length;a=new Uint8ClampedArray(c+a);for(let d=0;d<c;d++)a[d]=this.field.multiply(this.coefficients[d],b);return new G(this.field,
115
- a)}evaluateAt(a){let b=0;if(0===a)return this.getCoefficient(0);let c=this.coefficients.length;if(1===a)return this.coefficients.forEach(d=>{b^=d}),b;b=this.coefficients[0];for(let d=1;d<c;d++)b=H(this.field.multiply(a,b),this.coefficients[d]);return b}}function H(a,b){return a^b}
116
- class ea{constructor(a,b,c){this.primitive=a;this.size=b;this.generatorBase=c;this.expTable=Array(this.size);this.logTable=Array(this.size);a=1;for(b=0;b<this.size;b++)this.expTable[b]=a,a*=2,a>=this.size&&(a=(a^this.primitive)&this.size-1);for(a=0;a<this.size-1;a++)this.logTable[this.expTable[a]]=a;this.zero=new G(this,Uint8ClampedArray.from([0]));this.one=new G(this,Uint8ClampedArray.from([1]))}multiply(a,b){return 0===a||0===b?0:this.expTable[(this.logTable[a]+this.logTable[b])%(this.size-1)]}inverse(a){if(0===
117
- a)throw Error("Can't invert 0");return this.expTable[this.size-this.logTable[a]-1]}buildMonomial(a,b){if(0>a)throw Error("Invalid monomial degree less than 0");if(0===b)return this.zero;a=new Uint8ClampedArray(a+1);a[0]=b;return new G(this,a)}log(a){if(0===a)throw Error("Can't take log(0)");return this.logTable[a]}exp(a){return this.expTable[a]}}
118
- function fa(a,b,c,d){b.degree()<c.degree()&&([b,c]=[c,b]);let e=a.zero;for(var f=a.one;c.degree()>=d/2;){var g=b;let h=e;b=c;e=f;if(b.isZero())return null;c=g;f=a.zero;g=b.getCoefficient(b.degree());for(g=a.inverse(g);c.degree()>=b.degree()&&!c.isZero();){let k=c.degree()-b.degree(),m=a.multiply(c.getCoefficient(c.degree()),g);f=f.addOrSubtract(a.buildMonomial(k,m));c=c.addOrSubtract(b.multiplyByMonomial(k,m))}f=f.multiplyPoly(e).addOrSubtract(h);if(c.degree()>=b.degree())return null}d=f.getCoefficient(0);
119
- if(0===d)return null;a=a.inverse(d);return[f.multiply(a),c.multiply(a)]}
120
- function ha(a,b){let c=new Uint8ClampedArray(a.length);c.set(a);a=new ea(285,256,0);var d=new G(a,c),e=new Uint8ClampedArray(b),f=!1;for(var g=0;g<b;g++){var h=d.evaluateAt(a.exp(g+a.generatorBase));e[e.length-1-g]=h;0!==h&&(f=!0)}if(!f)return c;d=new G(a,e);d=fa(a,a.buildMonomial(b,1),d,b);if(null===d)return null;b=d[0];g=b.degree();if(1===g)b=[b.getCoefficient(1)];else{e=Array(g);f=0;for(h=1;h<a.size&&f<g;h++)0===b.evaluateAt(h)&&(e[f]=a.inverse(h),f++);b=f!==g?null:e}if(null==b)return null;e=d[1];
121
- f=b.length;d=Array(f);for(g=0;g<f;g++){h=a.inverse(b[g]);let k=1;for(let m=0;m<f;m++)g!==m&&(k=a.multiply(k,H(1,a.multiply(b[m],h))));d[g]=a.multiply(e.evaluateAt(h),a.inverse(k));0!==a.generatorBase&&(d[g]=a.multiply(d[g],h))}for(e=0;e<b.length;e++){f=c.length-1-a.log(b[e]);if(0>f)return null;c[f]^=d[e]}return c}
122
- let I=[{infoBits:null,versionNumber:1,alignmentPatternCenters:[],errorCorrectionLevels:[{ecCodewordsPerBlock:7,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:13,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:13}]},{ecCodewordsPerBlock:17,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:9}]}]},{infoBits:null,versionNumber:2,alignmentPatternCenters:[6,18],errorCorrectionLevels:[{ecCodewordsPerBlock:10,ecBlocks:[{numBlocks:1,
123
- dataCodewordsPerBlock:34}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:28}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:16}]}]},{infoBits:null,versionNumber:3,alignmentPatternCenters:[6,22],errorCorrectionLevels:[{ecCodewordsPerBlock:15,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:55}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:18,
124
- ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:13}]}]},{infoBits:null,versionNumber:4,alignmentPatternCenters:[6,26],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:80}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:32}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:9}]}]},
125
- {infoBits:null,versionNumber:5,alignmentPatternCenters:[6,30],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:43}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:11},{numBlocks:2,dataCodewordsPerBlock:12}]}]},{infoBits:null,versionNumber:6,alignmentPatternCenters:[6,
126
- 34],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68}]},{ecCodewordsPerBlock:16,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:27}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:31892,versionNumber:7,alignmentPatternCenters:[6,22,38],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:78}]},{ecCodewordsPerBlock:18,
127
- ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:31}]},{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:13},{numBlocks:1,dataCodewordsPerBlock:14}]}]},{infoBits:34236,versionNumber:8,alignmentPatternCenters:[6,24,42],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:97}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:38},
128
- {numBlocks:2,dataCodewordsPerBlock:39}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:18},{numBlocks:2,dataCodewordsPerBlock:19}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:14},{numBlocks:2,dataCodewordsPerBlock:15}]}]},{infoBits:39577,versionNumber:9,alignmentPatternCenters:[6,26,46],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:36},
129
- {numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:12},{numBlocks:4,dataCodewordsPerBlock:13}]}]},{infoBits:42195,versionNumber:10,alignmentPatternCenters:[6,28,50],errorCorrectionLevels:[{ecCodewordsPerBlock:18,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:68},{numBlocks:2,dataCodewordsPerBlock:69}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,
130
- dataCodewordsPerBlock:43},{numBlocks:1,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:15},{numBlocks:2,dataCodewordsPerBlock:16}]}]},{infoBits:48118,versionNumber:11,alignmentPatternCenters:[6,30,54],errorCorrectionLevels:[{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:81}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,
131
- dataCodewordsPerBlock:50},{numBlocks:4,dataCodewordsPerBlock:51}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:22},{numBlocks:4,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:12},{numBlocks:8,dataCodewordsPerBlock:13}]}]},{infoBits:51042,versionNumber:12,alignmentPatternCenters:[6,32,58],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:92},{numBlocks:2,dataCodewordsPerBlock:93}]},
132
- {ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:36},{numBlocks:2,dataCodewordsPerBlock:37}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:20},{numBlocks:6,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:14},{numBlocks:4,dataCodewordsPerBlock:15}]}]},{infoBits:55367,versionNumber:13,alignmentPatternCenters:[6,34,62],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:107}]},
133
- {ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:37},{numBlocks:1,dataCodewordsPerBlock:38}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:20},{numBlocks:4,dataCodewordsPerBlock:21}]},{ecCodewordsPerBlock:22,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:11},{numBlocks:4,dataCodewordsPerBlock:12}]}]},{infoBits:58893,versionNumber:14,alignmentPatternCenters:[6,26,46,66],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:115},
134
- {numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:40},{numBlocks:5,dataCodewordsPerBlock:41}]},{ecCodewordsPerBlock:20,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:16},{numBlocks:5,dataCodewordsPerBlock:17}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:5,dataCodewordsPerBlock:13}]}]},{infoBits:63784,versionNumber:15,alignmentPatternCenters:[6,26,48,70],errorCorrectionLevels:[{ecCodewordsPerBlock:22,
135
- ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:87},{numBlocks:1,dataCodewordsPerBlock:88}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:41},{numBlocks:5,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:12},{numBlocks:7,dataCodewordsPerBlock:13}]}]},{infoBits:68472,versionNumber:16,alignmentPatternCenters:[6,26,50,
136
- 74],errorCorrectionLevels:[{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:98},{numBlocks:1,dataCodewordsPerBlock:99}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:19},{numBlocks:2,dataCodewordsPerBlock:20}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:70749,
137
- versionNumber:17,alignmentPatternCenters:[6,30,54,78],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:1,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:22},{numBlocks:15,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:14},{numBlocks:17,
138
- dataCodewordsPerBlock:15}]}]},{infoBits:76311,versionNumber:18,alignmentPatternCenters:[6,30,56,82],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:120},{numBlocks:1,dataCodewordsPerBlock:121}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:43},{numBlocks:4,dataCodewordsPerBlock:44}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},{numBlocks:1,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,
139
- dataCodewordsPerBlock:14},{numBlocks:19,dataCodewordsPerBlock:15}]}]},{infoBits:79154,versionNumber:19,alignmentPatternCenters:[6,30,58,86],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:113},{numBlocks:4,dataCodewordsPerBlock:114}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:44},{numBlocks:11,dataCodewordsPerBlock:45}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:21},{numBlocks:4,dataCodewordsPerBlock:22}]},
140
- {ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:9,dataCodewordsPerBlock:13},{numBlocks:16,dataCodewordsPerBlock:14}]}]},{infoBits:84390,versionNumber:20,alignmentPatternCenters:[6,34,62,90],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:107},{numBlocks:5,dataCodewordsPerBlock:108}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:41},{numBlocks:13,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},
141
- {numBlocks:5,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:15},{numBlocks:10,dataCodewordsPerBlock:16}]}]},{infoBits:87683,versionNumber:21,alignmentPatternCenters:[6,28,50,72,94],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:116},{numBlocks:4,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:42}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:22},
142
- {numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:16},{numBlocks:6,dataCodewordsPerBlock:17}]}]},{infoBits:92361,versionNumber:22,alignmentPatternCenters:[6,26,50,74,98],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:111},{numBlocks:7,dataCodewordsPerBlock:112}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},
143
- {numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:24,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:13}]}]},{infoBits:96236,versionNumber:23,alignmentPatternCenters:[6,30,54,74,102],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:121},{numBlocks:5,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:47},{numBlocks:14,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},
144
- {numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:16,dataCodewordsPerBlock:15},{numBlocks:14,dataCodewordsPerBlock:16}]}]},{infoBits:102084,versionNumber:24,alignmentPatternCenters:[6,28,54,80,106],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:45},{numBlocks:14,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,
145
- ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:24},{numBlocks:16,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:30,dataCodewordsPerBlock:16},{numBlocks:2,dataCodewordsPerBlock:17}]}]},{infoBits:102881,versionNumber:25,alignmentPatternCenters:[6,32,58,84,110],errorCorrectionLevels:[{ecCodewordsPerBlock:26,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:106},{numBlocks:4,dataCodewordsPerBlock:107}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:47},{numBlocks:13,
146
- dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:13,dataCodewordsPerBlock:16}]}]},{infoBits:110507,versionNumber:26,alignmentPatternCenters:[6,30,58,86,114],errorCorrectionLevels:[{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:114},{numBlocks:2,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,
147
- dataCodewordsPerBlock:46},{numBlocks:4,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:28,dataCodewordsPerBlock:22},{numBlocks:6,dataCodewordsPerBlock:23}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:33,dataCodewordsPerBlock:16},{numBlocks:4,dataCodewordsPerBlock:17}]}]},{infoBits:110734,versionNumber:27,alignmentPatternCenters:[6,34,62,90,118],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
148
- {ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:45},{numBlocks:3,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:8,dataCodewordsPerBlock:23},{numBlocks:26,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:15},{numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:117786,versionNumber:28,alignmentPatternCenters:[6,26,50,74,98,122],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:117},
149
- {numBlocks:10,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:3,dataCodewordsPerBlock:45},{numBlocks:23,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,dataCodewordsPerBlock:24},{numBlocks:31,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:31,dataCodewordsPerBlock:16}]}]},{infoBits:119615,versionNumber:29,alignmentPatternCenters:[6,30,54,78,102,126],errorCorrectionLevels:[{ecCodewordsPerBlock:30,
150
- ecBlocks:[{numBlocks:7,dataCodewordsPerBlock:116},{numBlocks:7,dataCodewordsPerBlock:117}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:21,dataCodewordsPerBlock:45},{numBlocks:7,dataCodewordsPerBlock:46}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:1,dataCodewordsPerBlock:23},{numBlocks:37,dataCodewordsPerBlock:24}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:15},{numBlocks:26,dataCodewordsPerBlock:16}]}]},{infoBits:126325,versionNumber:30,alignmentPatternCenters:[6,
151
- 26,52,78,104,130],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:5,dataCodewordsPerBlock:115},{numBlocks:10,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:47},{numBlocks:10,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:15,dataCodewordsPerBlock:24},{numBlocks:25,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},{numBlocks:25,dataCodewordsPerBlock:16}]}]},
152
- {infoBits:127568,versionNumber:31,alignmentPatternCenters:[6,30,56,82,108,134],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:3,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:46},{numBlocks:29,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:24},{numBlocks:1,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:23,dataCodewordsPerBlock:15},
153
- {numBlocks:28,dataCodewordsPerBlock:16}]}]},{infoBits:133589,versionNumber:32,alignmentPatternCenters:[6,34,60,86,112,138],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:24},{numBlocks:35,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,
154
- dataCodewordsPerBlock:15},{numBlocks:35,dataCodewordsPerBlock:16}]}]},{infoBits:136944,versionNumber:33,alignmentPatternCenters:[6,30,58,86,114,142],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:115},{numBlocks:1,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:21,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:24},{numBlocks:19,dataCodewordsPerBlock:25}]},
155
- {ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:11,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:141498,versionNumber:34,alignmentPatternCenters:[6,34,62,90,118,146],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:115},{numBlocks:6,dataCodewordsPerBlock:116}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:14,dataCodewordsPerBlock:46},{numBlocks:23,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:44,
156
- dataCodewordsPerBlock:24},{numBlocks:7,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:59,dataCodewordsPerBlock:16},{numBlocks:1,dataCodewordsPerBlock:17}]}]},{infoBits:145311,versionNumber:35,alignmentPatternCenters:[6,30,54,78,102,126,150],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:121},{numBlocks:7,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:12,dataCodewordsPerBlock:47},{numBlocks:26,dataCodewordsPerBlock:48}]},
157
- {ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:39,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:22,dataCodewordsPerBlock:15},{numBlocks:41,dataCodewordsPerBlock:16}]}]},{infoBits:150283,versionNumber:36,alignmentPatternCenters:[6,24,50,76,102,128,154],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:6,dataCodewordsPerBlock:121},{numBlocks:14,dataCodewordsPerBlock:122}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:6,
158
- dataCodewordsPerBlock:47},{numBlocks:34,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:46,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:2,dataCodewordsPerBlock:15},{numBlocks:64,dataCodewordsPerBlock:16}]}]},{infoBits:152622,versionNumber:37,alignmentPatternCenters:[6,28,54,80,106,132,158],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:17,dataCodewordsPerBlock:122},{numBlocks:4,dataCodewordsPerBlock:123}]},
159
- {ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:29,dataCodewordsPerBlock:46},{numBlocks:14,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:49,dataCodewordsPerBlock:24},{numBlocks:10,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:24,dataCodewordsPerBlock:15},{numBlocks:46,dataCodewordsPerBlock:16}]}]},{infoBits:158308,versionNumber:38,alignmentPatternCenters:[6,32,58,84,110,136,162],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:4,
160
- dataCodewordsPerBlock:122},{numBlocks:18,dataCodewordsPerBlock:123}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:13,dataCodewordsPerBlock:46},{numBlocks:32,dataCodewordsPerBlock:47}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:48,dataCodewordsPerBlock:24},{numBlocks:14,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:42,dataCodewordsPerBlock:15},{numBlocks:32,dataCodewordsPerBlock:16}]}]},{infoBits:161089,versionNumber:39,alignmentPatternCenters:[6,26,54,82,110,138,166],
161
- errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:117},{numBlocks:4,dataCodewordsPerBlock:118}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:40,dataCodewordsPerBlock:47},{numBlocks:7,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:43,dataCodewordsPerBlock:24},{numBlocks:22,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:10,dataCodewordsPerBlock:15},{numBlocks:67,dataCodewordsPerBlock:16}]}]},{infoBits:167017,
162
- versionNumber:40,alignmentPatternCenters:[6,30,58,86,114,142,170],errorCorrectionLevels:[{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:19,dataCodewordsPerBlock:118},{numBlocks:6,dataCodewordsPerBlock:119}]},{ecCodewordsPerBlock:28,ecBlocks:[{numBlocks:18,dataCodewordsPerBlock:47},{numBlocks:31,dataCodewordsPerBlock:48}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:34,dataCodewordsPerBlock:24},{numBlocks:34,dataCodewordsPerBlock:25}]},{ecCodewordsPerBlock:30,ecBlocks:[{numBlocks:20,dataCodewordsPerBlock:15},
163
- {numBlocks:61,dataCodewordsPerBlock:16}]}]}];function J(a,b){a^=b;for(b=0;a;)b++,a&=a-1;return b}function K(a,b){return b<<1|a}
164
- let ia=[{bits:21522,formatInfo:{errorCorrectionLevel:1,dataMask:0}},{bits:20773,formatInfo:{errorCorrectionLevel:1,dataMask:1}},{bits:24188,formatInfo:{errorCorrectionLevel:1,dataMask:2}},{bits:23371,formatInfo:{errorCorrectionLevel:1,dataMask:3}},{bits:17913,formatInfo:{errorCorrectionLevel:1,dataMask:4}},{bits:16590,formatInfo:{errorCorrectionLevel:1,dataMask:5}},{bits:20375,formatInfo:{errorCorrectionLevel:1,dataMask:6}},{bits:19104,formatInfo:{errorCorrectionLevel:1,dataMask:7}},{bits:30660,formatInfo:{errorCorrectionLevel:0,
165
- dataMask:0}},{bits:29427,formatInfo:{errorCorrectionLevel:0,dataMask:1}},{bits:32170,formatInfo:{errorCorrectionLevel:0,dataMask:2}},{bits:30877,formatInfo:{errorCorrectionLevel:0,dataMask:3}},{bits:26159,formatInfo:{errorCorrectionLevel:0,dataMask:4}},{bits:25368,formatInfo:{errorCorrectionLevel:0,dataMask:5}},{bits:27713,formatInfo:{errorCorrectionLevel:0,dataMask:6}},{bits:26998,formatInfo:{errorCorrectionLevel:0,dataMask:7}},{bits:5769,formatInfo:{errorCorrectionLevel:3,dataMask:0}},{bits:5054,
166
- formatInfo:{errorCorrectionLevel:3,dataMask:1}},{bits:7399,formatInfo:{errorCorrectionLevel:3,dataMask:2}},{bits:6608,formatInfo:{errorCorrectionLevel:3,dataMask:3}},{bits:1890,formatInfo:{errorCorrectionLevel:3,dataMask:4}},{bits:597,formatInfo:{errorCorrectionLevel:3,dataMask:5}},{bits:3340,formatInfo:{errorCorrectionLevel:3,dataMask:6}},{bits:2107,formatInfo:{errorCorrectionLevel:3,dataMask:7}},{bits:13663,formatInfo:{errorCorrectionLevel:2,dataMask:0}},{bits:12392,formatInfo:{errorCorrectionLevel:2,
167
- dataMask:1}},{bits:16177,formatInfo:{errorCorrectionLevel:2,dataMask:2}},{bits:14854,formatInfo:{errorCorrectionLevel:2,dataMask:3}},{bits:9396,formatInfo:{errorCorrectionLevel:2,dataMask:4}},{bits:8579,formatInfo:{errorCorrectionLevel:2,dataMask:5}},{bits:11994,formatInfo:{errorCorrectionLevel:2,dataMask:6}},{bits:11245,formatInfo:{errorCorrectionLevel:2,dataMask:7}}],ja=[a=>0===(a.y+a.x)%2,a=>0===a.y%2,a=>0===a.x%3,a=>0===(a.y+a.x)%3,a=>0===(Math.floor(a.y/2)+Math.floor(a.x/3))%2,a=>0===a.x*a.y%
168
- 2+a.x*a.y%3,a=>0===(a.y*a.x%2+a.y*a.x%3)%2,a=>0===((a.y+a.x)%2+a.y*a.x%3)%2];
169
- function ka(a,b,c){c=ja[c.dataMask];let d=a.height;var e=17+4*b.versionNumber;let f=x.createEmpty(e,e);f.setRegion(0,0,9,9,!0);f.setRegion(e-8,0,8,9,!0);f.setRegion(0,e-8,9,8,!0);for(var g of b.alignmentPatternCenters)for(var h of b.alignmentPatternCenters)6===g&&6===h||6===g&&h===e-7||g===e-7&&6===h||f.setRegion(g-2,h-2,5,5,!0);f.setRegion(6,9,1,e-17,!0);f.setRegion(9,6,e-17,1,!0);6<b.versionNumber&&(f.setRegion(e-11,0,3,6,!0),f.setRegion(0,e-11,6,3,!0));b=[];h=g=0;e=!0;for(let k=d-1;0<k;k-=2){6===
170
- k&&k--;for(let m=0;m<d;m++){let l=e?d-1-m:m;for(let n=0;2>n;n++){let q=k-n;if(!f.get(q,l)){h++;let r=a.get(q,l);c({y:l,x:q})&&(r=!r);g=g<<1|r;8===h&&(b.push(g),g=h=0)}}}e=!e}return b}
171
- function la(a){var b=a.height,c=Math.floor((b-17)/4);if(6>=c)return I[c-1];c=0;for(var d=5;0<=d;d--)for(var e=b-9;e>=b-11;e--)c=K(a.get(e,d),c);d=0;for(e=5;0<=e;e--)for(let g=b-9;g>=b-11;g--)d=K(a.get(e,g),d);a=Infinity;let f;for(let g of I){if(g.infoBits===c||g.infoBits===d)return g;b=J(c,g.infoBits);b<a&&(f=g,a=b);b=J(d,g.infoBits);b<a&&(f=g,a=b)}if(3>=a)return f}
172
- function ma(a){let b=0;for(var c=0;8>=c;c++)6!==c&&(b=K(a.get(c,8),b));for(c=7;0<=c;c--)6!==c&&(b=K(a.get(8,c),b));var d=a.height;c=0;for(var e=d-1;e>=d-7;e--)c=K(a.get(8,e),c);for(e=d-8;e<d;e++)c=K(a.get(e,8),c);a=Infinity;d=null;for(let {bits:f,formatInfo:g}of ia){if(f===b||f===c)return g;e=J(b,f);e<a&&(d=g,a=e);b!==c&&(e=J(c,f),e<a&&(d=g,a=e))}return 3>=a?d:null}
173
- function na(a,b,c){let d=b.errorCorrectionLevels[c],e=[],f=0;d.ecBlocks.forEach(h=>{for(let k=0;k<h.numBlocks;k++)e.push({numDataCodewords:h.dataCodewordsPerBlock,codewords:[]}),f+=h.dataCodewordsPerBlock+d.ecCodewordsPerBlock});if(a.length<f)return null;a=a.slice(0,f);b=d.ecBlocks[0].dataCodewordsPerBlock;for(c=0;c<b;c++)for(var g of e)g.codewords.push(a.shift());if(1<d.ecBlocks.length)for(g=d.ecBlocks[0].numBlocks,b=d.ecBlocks[1].numBlocks,c=0;c<b;c++)e[g+c].codewords.push(a.shift());for(;0<a.length;)for(let h of e)h.codewords.push(a.shift());
174
- return e}function L(a){let b=la(a);if(!b)return null;var c=ma(a);if(!c)return null;a=ka(a,b,c);var d=na(a,b,c.errorCorrectionLevel);if(!d)return null;c=d.reduce((e,f)=>e+f.numDataCodewords,0);c=new Uint8ClampedArray(c);a=0;for(let e of d){d=ha(e.codewords,e.codewords.length-e.numDataCodewords);if(!d)return null;for(let f=0;f<e.numDataCodewords;f++)c[a++]=d[f]}try{return da(c,b.versionNumber)}catch(e){return null}}
175
- function M(a,b,c,d){var e=a.x-b.x+c.x-d.x;let f=a.y-b.y+c.y-d.y;if(0===e&&0===f)return{a11:b.x-a.x,a12:b.y-a.y,a13:0,a21:c.x-b.x,a22:c.y-b.y,a23:0,a31:a.x,a32:a.y,a33:1};let g=b.x-c.x;var h=d.x-c.x;let k=b.y-c.y,m=d.y-c.y;c=g*m-h*k;h=(e*m-h*f)/c;e=(g*f-e*k)/c;return{a11:b.x-a.x+h*b.x,a12:b.y-a.y+h*b.y,a13:h,a21:d.x-a.x+e*d.x,a22:d.y-a.y+e*d.y,a23:e,a31:a.x,a32:a.y,a33:1}}
176
- function oa(a,b,c,d){a=M(a,b,c,d);return{a11:a.a22*a.a33-a.a23*a.a32,a12:a.a13*a.a32-a.a12*a.a33,a13:a.a12*a.a23-a.a13*a.a22,a21:a.a23*a.a31-a.a21*a.a33,a22:a.a11*a.a33-a.a13*a.a31,a23:a.a13*a.a21-a.a11*a.a23,a31:a.a21*a.a32-a.a22*a.a31,a32:a.a12*a.a31-a.a11*a.a32,a33:a.a11*a.a22-a.a12*a.a21}}
177
- function pa(a,b){var c=oa({x:3.5,y:3.5},{x:b.dimension-3.5,y:3.5},{x:b.dimension-6.5,y:b.dimension-6.5},{x:3.5,y:b.dimension-3.5}),d=M(b.topLeft,b.topRight,b.alignmentPattern,b.bottomLeft),e=d.a11*c.a11+d.a21*c.a12+d.a31*c.a13,f=d.a12*c.a11+d.a22*c.a12+d.a32*c.a13,g=d.a13*c.a11+d.a23*c.a12+d.a33*c.a13,h=d.a11*c.a21+d.a21*c.a22+d.a31*c.a23,k=d.a12*c.a21+d.a22*c.a22+d.a32*c.a23,m=d.a13*c.a21+d.a23*c.a22+d.a33*c.a23,l=d.a11*c.a31+d.a21*c.a32+d.a31*c.a33,n=d.a12*c.a31+d.a22*c.a32+d.a32*c.a33,q=d.a13*
178
- c.a31+d.a23*c.a32+d.a33*c.a33;c=x.createEmpty(b.dimension,b.dimension);d=(r,u)=>{const p=g*r+m*u+q;return{x:(e*r+h*u+l)/p,y:(f*r+k*u+n)/p}};for(let r=0;r<b.dimension;r++)for(let u=0;u<b.dimension;u++){let p=d(u+.5,r+.5);c.set(u,r,a.get(Math.floor(p.x),Math.floor(p.y)))}return{matrix:c,mappingFunction:d}}let N=(a,b)=>Math.sqrt(Math.pow(b.x-a.x,2)+Math.pow(b.y-a.y,2));function O(a){return a.reduce((b,c)=>b+c)}
179
- function qa(a,b,c){let d=N(a,b),e=N(b,c),f=N(a,c),g,h,k;e>=d&&e>=f?[g,h,k]=[b,a,c]:f>=e&&f>=d?[g,h,k]=[a,b,c]:[g,h,k]=[a,c,b];0>(k.x-h.x)*(g.y-h.y)-(k.y-h.y)*(g.x-h.x)&&([g,k]=[k,g]);return{bottomLeft:g,topLeft:h,topRight:k}}
180
- function ra(a,b,c,d){d=(O(P(a,c,d,5))/7+O(P(a,b,d,5))/7+O(P(c,a,d,5))/7+O(P(b,a,d,5))/7)/4;if(1>d)throw Error("Invalid module size");b=Math.round(N(a,b)/d);a=Math.round(N(a,c)/d);a=Math.floor((b+a)/2)+7;switch(a%4){case 0:a++;break;case 2:a--}return{dimension:a,moduleSize:d}}
181
- function Q(a,b,c,d){let e=[{x:Math.floor(a.x),y:Math.floor(a.y)}];var f=Math.abs(b.y-a.y)>Math.abs(b.x-a.x);if(f){var g=Math.floor(a.y);var h=Math.floor(a.x);a=Math.floor(b.y);b=Math.floor(b.x)}else g=Math.floor(a.x),h=Math.floor(a.y),a=Math.floor(b.x),b=Math.floor(b.y);let k=Math.abs(a-g),m=Math.abs(b-h),l=Math.floor(-k/2),n=g<a?1:-1,q=h<b?1:-1,r=!0;for(let u=g,p=h;u!==a+n;u+=n){g=f?p:u;h=f?u:p;if(c.get(g,h)!==r&&(r=!r,e.push({x:g,y:h}),e.length===d+1))break;l+=m;if(0<l){if(p===b)break;p+=q;l-=k}}c=
182
- [];for(f=0;f<d;f++)e[f]&&e[f+1]?c.push(N(e[f],e[f+1])):c.push(0);return c}function P(a,b,c,d){let e=b.y-a.y,f=b.x-a.x;b=Q(a,b,c,Math.ceil(d/2));a=Q(a,{x:a.x-f,y:a.y-e},c,Math.ceil(d/2));c=b.shift()+a.shift()-1;return a.concat(c).concat(...b)}function R(a,b){let c=O(a)/O(b),d=0;b.forEach((e,f)=>{d+=Math.pow(a[f]-e*c,2)});return{averageSize:c,error:d}}
183
- function S(a,b,c){try{let d=P(a,{x:-1,y:a.y},c,b.length),e=P(a,{x:a.x,y:-1},c,b.length),f=P(a,{x:Math.max(0,a.x-a.y)-1,y:Math.max(0,a.y-a.x)-1},c,b.length),g=P(a,{x:Math.min(c.width,a.x+a.y)+1,y:Math.min(c.height,a.y+a.x)+1},c,b.length),h=R(d,b),k=R(e,b),m=R(f,b),l=R(g,b),n=(h.averageSize+k.averageSize+m.averageSize+l.averageSize)/4;return Math.sqrt(h.error*h.error+k.error*k.error+m.error*m.error+l.error*l.error)+(Math.pow(h.averageSize-n,2)+Math.pow(k.averageSize-n,2)+Math.pow(m.averageSize-n,2)+
184
- Math.pow(l.averageSize-n,2))/n}catch(d){return Infinity}}function T(a,b){for(var c=Math.round(b.x);a.get(c,Math.round(b.y));)c--;for(var d=Math.round(b.x);a.get(d,Math.round(b.y));)d++;c=(c+d)/2;for(d=Math.round(b.y);a.get(Math.round(c),d);)d--;for(b=Math.round(b.y);a.get(Math.round(c),b);)b++;return{x:c,y:(d+b)/2}}
185
- function sa(a){var b=[],c=[];let d=[];var e=[];for(let p=0;p<=a.height;p++){var f=0,g=!1;let t=[0,0,0,0,0];for(let v=-1;v<=a.width;v++){var h=a.get(v,p);if(h===g)f++;else{t=[t[1],t[2],t[3],t[4],f];f=1;g=h;var k=O(t)/7;k=Math.abs(t[0]-k)<k&&Math.abs(t[1]-k)<k&&Math.abs(t[2]-3*k)<3*k&&Math.abs(t[3]-k)<k&&Math.abs(t[4]-k)<k&&!h;var m=O(t.slice(-3))/3;h=Math.abs(t[2]-m)<m&&Math.abs(t[3]-m)<m&&Math.abs(t[4]-m)<m&&h;if(k){let z=v-t[3]-t[4],y=z-t[2];k={startX:y,endX:z,y:p};m=c.filter(w=>y>=w.bottom.startX&&
186
- y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<m.length?m[0].bottom=k:c.push({top:k,bottom:k})}if(h){let z=v-t[4],y=z-t[3];h={startX:y,y:p,endX:z};k=e.filter(w=>y>=w.bottom.startX&&y<=w.bottom.endX||z>=w.bottom.startX&&y<=w.bottom.endX||y<=w.bottom.startX&&z>=w.bottom.endX&&1.5>t[2]/(w.bottom.endX-w.bottom.startX)&&.5<t[2]/(w.bottom.endX-w.bottom.startX));0<k.length?
187
- k[0].bottom=h:e.push({top:h,bottom:h})}}}b.push(...c.filter(v=>v.bottom.y!==p&&2<=v.bottom.y-v.top.y));c=c.filter(v=>v.bottom.y===p);d.push(...e.filter(v=>v.bottom.y!==p));e=e.filter(v=>v.bottom.y===p)}b.push(...c.filter(p=>2<=p.bottom.y-p.top.y));d.push(...e);c=[];for(var l of b)2>l.bottom.y-l.top.y||(b=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4,e=(l.top.y+l.bottom.y+1)/2,a.get(Math.round(b),Math.round(e))&&(f=[l.top.endX-l.top.startX,l.bottom.endX-l.bottom.startX,l.bottom.y-l.top.y+
188
- 1],f=O(f)/f.length,g=S({x:Math.round(b),y:Math.round(e)},[1,1,3,1,1],a),c.push({score:g,x:b,y:e,size:f})));if(3>c.length)return null;c.sort((p,t)=>p.score-t.score);l=[];for(b=0;b<Math.min(c.length,5);++b){e=c[b];f=[];for(var n of c)n!==e&&f.push(Object.assign(Object.assign({},n),{score:n.score+Math.pow(n.size-e.size,2)/e.size}));f.sort((p,t)=>p.score-t.score);l.push({points:[e,f[0],f[1]],score:e.score+f[0].score+f[1].score})}l.sort((p,t)=>p.score-t.score);let {topRight:q,topLeft:r,bottomLeft:u}=qa(...l[0].points);
189
- l=U(a,d,q,r,u);n=[];l&&n.push({alignmentPattern:{x:l.alignmentPattern.x,y:l.alignmentPattern.y},bottomLeft:{x:u.x,y:u.y},dimension:l.dimension,topLeft:{x:r.x,y:r.y},topRight:{x:q.x,y:q.y}});l=T(a,q);b=T(a,r);c=T(a,u);(a=U(a,d,l,b,c))&&n.push({alignmentPattern:{x:a.alignmentPattern.x,y:a.alignmentPattern.y},bottomLeft:{x:c.x,y:c.y},topLeft:{x:b.x,y:b.y},topRight:{x:l.x,y:l.y},dimension:a.dimension});return 0===n.length?null:n}
190
- function U(a,b,c,d,e){let f,g;try{({dimension:f,moduleSize:g}=ra(d,c,e,a))}catch(l){return null}var h=c.x-d.x+e.x,k=c.y-d.y+e.y;c=(N(d,e)+N(d,c))/2/g;e=1-3/c;let m={x:d.x+e*(h-d.x),y:d.y+e*(k-d.y)};b=b.map(l=>{const n=(l.top.startX+l.top.endX+l.bottom.startX+l.bottom.endX)/4;l=(l.top.y+l.bottom.y+1)/2;if(a.get(Math.floor(n),Math.floor(l))){var q=S({x:Math.floor(n),y:Math.floor(l)},[1,1,1],a)+N({x:n,y:l},m);return{x:n,y:l,score:q}}}).filter(l=>!!l).sort((l,n)=>l.score-n.score);return{alignmentPattern:15<=
191
- c&&b.length?b[0]:m,dimension:f}}
192
- function V(a){var b=sa(a);if(!b)return null;for(let e of b){b=pa(a,e);var c=b.matrix;if(null==c)c=null;else{var d=L(c);if(d)c=d;else{for(d=0;d<c.width;d++)for(let f=d+1;f<c.height;f++)c.get(d,f)!==c.get(f,d)&&(c.set(d,f,!c.get(d,f)),c.set(f,d,!c.get(f,d)));c=L(c)}}if(c)return{binaryData:c.bytes,data:c.text,chunks:c.chunks,version:c.version,location:{topRightCorner:b.mappingFunction(e.dimension,0),topLeftCorner:b.mappingFunction(0,0),bottomRightCorner:b.mappingFunction(e.dimension,e.dimension),bottomLeftCorner:b.mappingFunction(0,
193
- e.dimension),topRightFinderPattern:e.topRight,topLeftFinderPattern:e.topLeft,bottomLeftFinderPattern:e.bottomLeft,bottomRightAlignmentPattern:e.alignmentPattern},matrix:b.matrix}}return null}let ta={inversionAttempts:"attemptBoth",greyScaleWeights:{red:.2126,green:.7152,blue:.0722,useIntegerApproximation:!1},canOverwriteImage:!0};function W(a,b){Object.keys(b).forEach(c=>{a[c]=b[c]})}
194
- function X(a,b,c,d={}){let e=Object.create(null);W(e,ta);W(e,d);d="onlyInvert"===e.inversionAttempts||"invertFirst"===e.inversionAttempts;var f="attemptBoth"===e.inversionAttempts||d;var g=e.greyScaleWeights,h=e.canOverwriteImage,k=b*c;if(a.length!==4*k)throw Error("Malformed data passed to binarizer.");var m=0;if(h){var l=new Uint8ClampedArray(a.buffer,m,k);m+=k}l=new A(b,c,l);if(g.useIntegerApproximation)for(var n=0;n<c;n++)for(var q=0;q<b;q++){var r=4*(n*b+q);l.set(q,n,g.red*a[r]+g.green*a[r+1]+
195
- g.blue*a[r+2]+128>>8)}else for(n=0;n<c;n++)for(q=0;q<b;q++)r=4*(n*b+q),l.set(q,n,g.red*a[r]+g.green*a[r+1]+g.blue*a[r+2]);g=Math.ceil(b/8);n=Math.ceil(c/8);q=g*n;if(h){var u=new Uint8ClampedArray(a.buffer,m,q);m+=q}u=new A(g,n,u);for(q=0;q<n;q++)for(r=0;r<g;r++){var p=Infinity,t=0;for(var v=0;8>v;v++)for(let w=0;8>w;w++){let aa=l.get(8*r+w,8*q+v);p=Math.min(p,aa);t=Math.max(t,aa)}v=(p+t)/2;v=Math.min(255,1.11*v);24>=t-p&&(v=p/2,0<q&&0<r&&(t=(u.get(r,q-1)+2*u.get(r-1,q)+u.get(r-1,q-1))/4,p<t&&(v=t)));
196
- u.set(r,q,v)}h?(q=new Uint8ClampedArray(a.buffer,m,k),m+=k,q=new x(q,b)):q=x.createEmpty(b,c);r=null;f&&(h?(a=new Uint8ClampedArray(a.buffer,m,k),r=new x(a,b)):r=x.createEmpty(b,c));for(b=0;b<n;b++)for(a=0;a<g;a++){c=g-3;c=2>a?2:a>c?c:a;h=n-3;h=2>b?2:b>h?h:b;k=0;for(m=-2;2>=m;m++)for(p=-2;2>=p;p++)k+=u.get(c+m,h+p);c=k/25;for(h=0;8>h;h++)for(k=0;8>k;k++)m=8*a+h,p=8*b+k,t=l.get(m,p),q.set(m,p,t<=c),f&&r.set(m,p,!(t<=c))}f=f?{binarized:q,inverted:r}:{binarized:q};let {binarized:z,inverted:y}=f;(f=V(d?
197
- y:z))||"attemptBoth"!==e.inversionAttempts&&"invertFirst"!==e.inversionAttempts||(f=V(d?z:y));return f}X.default=X;let Y="dontInvert",Z={red:77,green:150,blue:29,useIntegerApproximation:!0};
198
- self.onmessage=a=>{let b=a.data.id,c=a.data.data;switch(a.data.type){case "decode":(a=X(c.data,c.width,c.height,{inversionAttempts:Y,greyScaleWeights:Z}))?self.postMessage({id:b,type:"qrResult",data:a.data,cornerPoints:[a.location.topLeftCorner,a.location.topRightCorner,a.location.bottomRightCorner,a.location.bottomLeftCorner]}):self.postMessage({id:b,type:"qrResult",data:null});break;case "grayscaleWeights":Z.red=c.red;Z.green=c.green;Z.blue=c.blue;Z.useIntegerApproximation=c.useIntegerApproximation;
199
- break;case "inversionMode":switch(c){case "original":Y="dontInvert";break;case "invert":Y="onlyInvert";break;case "both":Y="attemptBoth";break;default:throw Error("Invalid inversion mode");}break;case "close":self.close()}}
200
- `]),{type:"application/javascript"}))},Symbol.toStringTag,{value:"Module"}));ot.DefaultSession=Cv,ot.PortalRoute=Zt,ot.PortalSession=kv,ot.PortalType=Tn,ot.ScannerType=Mt,ot.SubscriptionStatus=hr,ot.SubscriptionStrategy=In,ot.VoucherStatus=vl,Object.defineProperty(ot,Symbol.toStringTag,{value:"Module"})});
105
+ */function Br(){return Br=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},Br.apply(this,arguments)}function Qs(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}const Lo="get",_o="application/x-www-form-urlencoded";function Vo(e){return e!=null&&typeof e.tagName=="string"}function wb(e){return Vo(e)&&e.tagName.toLowerCase()==="button"}function Eb(e){return Vo(e)&&e.tagName.toLowerCase()==="form"}function xb(e){return Vo(e)&&e.tagName.toLowerCase()==="input"}function Cb(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ab(e,t){return e.button===0&&(!t||t==="_self")&&!Cb(e)}let qo=null;function Sb(){if(qo===null)try{new FormData(document.createElement("form"),0),qo=!1}catch{qo=!0}return qo}const Tb=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function $s(e){return e!=null&&!Tb.has(e)?(process.env.NODE_ENV!=="production"&&Lt(!1,'"'+e+'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` '+('and will default to "'+_o+'"')),null):e}function Ob(e,t){let n,r,i,a,s;if(Eb(e)){let c=e.getAttribute("action");r=c?wn(c,t):null,n=e.getAttribute("method")||Lo,i=$s(e.getAttribute("enctype"))||_o,a=new FormData(e)}else if(wb(e)||xb(e)&&(e.type==="submit"||e.type==="image")){let c=e.form;if(c==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||c.getAttribute("action");if(r=h?wn(h,t):null,n=e.getAttribute("formmethod")||c.getAttribute("method")||Lo,i=$s(e.getAttribute("formenctype"))||$s(c.getAttribute("enctype"))||_o,a=new FormData(c,e),!Sb()){let{name:g,type:d,value:E}=e;if(d==="image"){let u=g?g+".":"";a.append(u+"x","0"),a.append(u+"y","0")}else g&&a.append(g,E)}}else{if(Vo(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=Lo,r=null,i=_o,s=e}return a&&i==="text/plain"&&(s=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:s}}const Db=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Ib=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],Rb=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","unstable_viewTransition"],Nb="6";try{window.__reactRouterVersion=Nb}catch{}const Hs=be.createContext({isTransitioning:!1});process.env.NODE_ENV!=="production"&&(Hs.displayName="ViewTransition");const Td=be.createContext(new Map);process.env.NODE_ENV!=="production"&&(Td.displayName="Fetchers");const Od=be["startTransition"],Dd=yh["flushSync"];function Pb(e){Od?Od(e):e()}function Mi(e){Dd?Dd(e):e()}class Mb{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function Bb(e){let{fallbackElement:t,router:n,future:r}=e,[i,a]=be.useState(n.state),[s,c]=be.useState(),[h,g]=be.useState({isTransitioning:!1}),[d,E]=be.useState(),[u,w]=be.useState(),[o,l]=be.useState(),p=be.useRef(new Map),{v7_startTransition:f}=r||{},m=be.useCallback(A=>{f?Pb(A):A()},[f]),b=be.useCallback((A,N)=>{let{deletedFetchers:I,unstable_flushSync:_,unstable_viewTransitionOpts:Q}=N;I.forEach(V=>p.current.delete(V)),A.fetchers.forEach((V,K)=>{V.data!==void 0&&p.current.set(K,V.data)});let $=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!Q||$){_?Mi(()=>a(A)):m(()=>a(A));return}if(_){Mi(()=>{u&&(d&&d.resolve(),u.skipTransition()),g({isTransitioning:!0,flushSync:!0,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})});let V=n.window.document.startViewTransition(()=>{Mi(()=>a(A))});V.finished.finally(()=>{Mi(()=>{E(void 0),w(void 0),c(void 0),g({isTransitioning:!1})})}),Mi(()=>w(V));return}u?(d&&d.resolve(),u.skipTransition(),l({state:A,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation})):(c(A),g({isTransitioning:!0,flushSync:!1,currentLocation:Q.currentLocation,nextLocation:Q.nextLocation}))},[n.window,u,d,p,m]);be.useLayoutEffect(()=>n.subscribe(b),[n,b]),be.useEffect(()=>{h.isTransitioning&&!h.flushSync&&E(new Mb)},[h]),be.useEffect(()=>{if(d&&s&&n.window){let A=s,N=d.promise,I=n.window.document.startViewTransition(async()=>{m(()=>a(A)),await N});I.finished.finally(()=>{E(void 0),w(void 0),c(void 0),g({isTransitioning:!1})}),w(I)}},[m,s,d,n.window]),be.useEffect(()=>{d&&s&&i.location.key===s.location.key&&d.resolve()},[d,u,i.location,s]),be.useEffect(()=>{!h.isTransitioning&&o&&(c(o.state),g({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}),l(void 0))},[h.isTransitioning,o]),be.useEffect(()=>{process.env.NODE_ENV!=="production"&&Lt(t==null||!n.future.v7_partialHydration,"`<RouterProvider fallbackElement>` is deprecated when using `v7_partialHydration`, use a `HydrateFallback` component instead")},[]);let C=be.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:A=>n.navigate(A),push:(A,N,I)=>n.navigate(A,{state:N,preventScrollReset:I==null?void 0:I.preventScrollReset}),replace:(A,N,I)=>n.navigate(A,{replace:!0,state:N,preventScrollReset:I==null?void 0:I.preventScrollReset})}),[n]),S=n.basename||"/",D=be.useMemo(()=>({router:n,navigator:C,static:!1,basename:S}),[n,C,S]);return be.createElement(be.Fragment,null,be.createElement(Pr.Provider,{value:D},be.createElement(Fo.Provider,{value:i},be.createElement(Td.Provider,{value:p.current},be.createElement(Hs.Provider,{value:h},be.createElement(vb,{basename:S,location:i.location,navigationType:i.historyAction,navigator:C,future:{v7_relativeSplatPath:n.future.v7_relativeSplatPath}},i.initialized||n.future.v7_partialHydration?be.createElement(kb,{routes:n.routes,future:n.future,state:i}):t))))),null)}function kb(e){let{routes:t,future:n,state:r}=e;return ab(t,void 0,r,n)}process.env.NODE_ENV;const Fb=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",jb=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Id=be.forwardRef(function(t,n){let{onClick:r,relative:i,reloadDocument:a,replace:s,state:c,target:h,to:g,preventScrollReset:d,unstable_viewTransition:E}=t,u=Qs(t,Db),{basename:w}=be.useContext(xn),o,l=!1;if(typeof g=="string"&&jb.test(g)&&(o=g,Fb))try{let b=new URL(window.location.href),C=g.startsWith("//")?new URL(b.protocol+g):new URL(g),S=wn(C.pathname,w);C.origin===b.origin&&S!=null?g=S+C.search+C.hash:l=!0}catch{process.env.NODE_ENV!=="production"&&Lt(!1,'<Link to="'+g+'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.')}let p=nb(g,{relative:i}),f=qb(g,{replace:s,state:c,target:h,preventScrollReset:d,relative:i,unstable_viewTransition:E});function m(b){r&&r(b),b.defaultPrevented||f(b)}return be.createElement("a",Br({},u,{href:o||p,onClick:l||a?r:m,ref:n,target:h}))});process.env.NODE_ENV!=="production"&&(Id.displayName="Link");const Lb=be.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:i=!1,className:a="",end:s=!1,style:c,to:h,unstable_viewTransition:g,children:d}=t,E=Qs(t,Ib),u=Ni(h,{relative:E.relative}),w=er(),o=be.useContext(Fo),{navigator:l,basename:p}=be.useContext(xn),f=o!=null&&$b(u)&&g===!0,m=l.encodeLocation?l.encodeLocation(u).pathname:u.pathname,b=w.pathname,C=o&&o.navigation&&o.navigation.location?o.navigation.location.pathname:null;i||(b=b.toLowerCase(),C=C?C.toLowerCase():null,m=m.toLowerCase()),C&&p&&(C=wn(C,p)||C);const S=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let D=b===m||!s&&b.startsWith(m)&&b.charAt(S)==="/",A=C!=null&&(C===m||!s&&C.startsWith(m)&&C.charAt(m.length)==="/"),N={isActive:D,isPending:A,isTransitioning:f},I=D?r:void 0,_;typeof a=="function"?_=a(N):_=[a,D?"active":null,A?"pending":null,f?"transitioning":null].filter(Boolean).join(" ");let Q=typeof c=="function"?c(N):c;return be.createElement(Id,Br({},E,{"aria-current":I,className:_,ref:n,style:Q,to:h,unstable_viewTransition:g}),typeof d=="function"?d(N):d)});process.env.NODE_ENV!=="production"&&(Lb.displayName="NavLink");const _b=be.forwardRef((e,t)=>{let{fetcherKey:n,navigate:r,reloadDocument:i,replace:a,state:s,method:c=Lo,action:h,onSubmit:g,relative:d,preventScrollReset:E,unstable_viewTransition:u}=e,w=Qs(e,Rb),o=Kb(),l=Qb(h,{relative:d}),p=c.toLowerCase()==="get"?"get":"post",f=m=>{if(g&&g(m),m.defaultPrevented)return;m.preventDefault();let b=m.nativeEvent.submitter,C=(b==null?void 0:b.getAttribute("formmethod"))||c;o(b||m.currentTarget,{fetcherKey:n,method:C,navigate:r,replace:a,state:s,relative:d,preventScrollReset:E,unstable_viewTransition:u})};return be.createElement("form",Br({ref:t,method:p,action:l,onSubmit:i?g:f},w))});process.env.NODE_ENV!=="production"&&(_b.displayName="Form"),process.env.NODE_ENV;var Uo;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Uo||(Uo={}));var Rd;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Rd||(Rd={}));function Vb(e){return e+" must be used within a data router. See https://reactrouter.com/routers/picking-a-router."}function Nd(e){let t=be.useContext(Pr);return t||(process.env.NODE_ENV!=="production"?Le(!1,Vb(e)):Le(!1)),t}function qb(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:s,unstable_viewTransition:c}=t===void 0?{}:t,h=hn(),g=er(),d=Ni(e,{relative:s});return be.useCallback(E=>{if(Ab(E,n)){E.preventDefault();let u=r!==void 0?r:ur(g)===ur(d);h(e,{replace:u,state:i,preventScrollReset:a,relative:s,unstable_viewTransition:c})}},[g,h,d,r,i,n,e,a,s,c])}function Ub(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let Gb=0,Yb=()=>"__"+String(++Gb)+"__";function Kb(){let{router:e}=Nd(Uo.UseSubmit),{basename:t}=be.useContext(xn),n=gb();return be.useCallback(function(r,i){i===void 0&&(i={}),Ub();let{action:a,method:s,encType:c,formData:h,body:g}=Ob(r,t);if(i.navigate===!1){let d=i.fetcherKey||Yb();e.fetch(d,n,i.action||a,{preventScrollReset:i.preventScrollReset,formData:h,body:g,formMethod:i.method||s,formEncType:i.encType||c,unstable_flushSync:i.unstable_flushSync})}else e.navigate(i.action||a,{preventScrollReset:i.preventScrollReset,formData:h,body:g,formMethod:i.method||s,formEncType:i.encType||c,replace:i.replace,state:i.state,fromRouteId:n,unstable_flushSync:i.unstable_flushSync,unstable_viewTransition:i.unstable_viewTransition})},[e,t,n])}function Qb(e,t){let{relative:n}=t===void 0?{}:t,{basename:r}=be.useContext(xn),i=be.useContext(Cn);i||(process.env.NODE_ENV!=="production"?Le(!1,"useFormAction must be used inside a RouteContext"):Le(!1));let[a]=i.matches.slice(-1),s=Br({},Ni(e||".",{relative:n})),c=er();if(e==null){s.search=c.search;let h=new URLSearchParams(s.search);h.has("index")&&h.get("index")===""&&(h.delete("index"),s.search=h.toString()?"?"+h.toString():"")}return(!e||e===".")&&a.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:Nn([r,s.pathname])),ur(s)}function $b(e,t){t===void 0&&(t={});let n=be.useContext(Hs);n==null&&(process.env.NODE_ENV!=="production"?Le(!1,"`unstable_useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"):Le(!1));let{basename:r}=Nd(Uo.useViewTransitionState),i=Ni(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=wn(n.currentLocation.pathname,r)||n.currentLocation.pathname,s=wn(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Ns(i.pathname,s)!=null||Ns(i.pathname,a)!=null}const Hb="data:image/svg+xml,%3csvg%20width='24'%20height='25'%20viewBox='0%200%2024%2025'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1.37482%209.55838C0.802045%2011.696%200.887351%2013.9567%201.61959%2016.045C2.35183%2018.1334%203.69695%2019.9524%205.47921%2021.2642C7.26146%2022.5761%209.39798%2023.3199%2011.6096%2023.3985C13.8212%2023.477%2016.0051%2022.8866%2017.876%2021.7045C19.7468%2020.5223%2021.2175%2018.8034%2022.0961%2016.7722C22.9746%2014.7411%2023.2201%2012.4921%2022.8004%2010.3193C22.3807%208.1464%2021.3154%206.15066%2019.7436%204.59277C18.1718%203.03489%2016.1667%201.98732%2013.9902%201.58693M7.14096%202.53681C5.21049%203.48732%203.60119%204.98315%202.51232%206.8391M10.7049%201.48193C10.452%201.51191%2010.2003%201.55066%209.95012%201.59811M18.1995%2015.656C18.757%2014.5927%2019.0317%2013.4039%2018.9971%2012.2038C18.9625%2011.0037%2018.6198%209.83263%2018.002%208.8032C17.3842%207.77377%2016.512%206.92055%2015.4692%206.32553C14.4264%205.73051%2013.2481%205.4137%2012.0476%205.40554C10.847%205.39739%209.66449%205.69816%208.61372%206.27895C7.56295%206.85974%206.67923%207.70104%206.04747%208.72198C5.41572%209.74292%205.05717%2010.9092%205.00628%2012.1087C4.9554%2013.3082%205.21389%2014.5007%205.75691%2015.5714M9.15764%2013.3648C9.00624%2012.9162%208.96314%2012.4382%209.03189%2011.9698C9.10064%2011.5014%209.27926%2011.0559%209.55317%2010.6697C9.82708%2010.2836%2010.1885%209.96774%2010.6079%209.74803C11.0272%209.52832%2011.4926%209.41098%2011.966%209.4056C12.4394%209.40023%2012.9074%209.50697%2013.3316%209.71709C13.7559%209.92722%2014.1244%2010.2348%2014.407%2010.6146C14.6896%2010.9944%2014.8783%2011.4358%2014.9576%2011.9025C15.037%2012.3692%2015.0048%2012.8481%2014.8636%2013.3M14.0993%2010.2622C14.0043%2010.1691%2013.9032%2010.0825%2013.7967%2010.0028M8.2478%2018.3147C9.32147%2018.9965%2010.5606%2019.3728%2011.832%2019.4033C13.1035%2019.4339%2014.3592%2019.1174%2015.4644%2018.488'%20stroke='%233430FF'%20stroke-width='2'%20stroke-linecap='round'/%3e%3c/svg%3e";function Wb(){const e=hn(),{t}=mt(),n=ir();return k.useEffect(()=>{n.sessionUuid&&e(`/${n.sessionUuid}`)},[n.sessionUuid,e]),T.jsxs("div",{className:"relative flex w-full flex-col items-center justify-center gap-12 text-center",children:[T.jsxs("div",{className:"flex items-center justify-center gap-3",children:[T.jsx("img",{alt:"logo",src:Hb,className:"z-10 h-16 w-16 hover:animate-spin"}),T.jsxs("p",{className:"z-10 text-7xl font-semibold tracking-wide text-gray-600",children:["Welcome to ",T.jsx("span",{className:"italic",children:"PortalSessions"})]})]}),n.sessionUuid?T.jsx(gt,{style:{padding:"1.5rem 2rem"},label:t("continue"),onClick:()=>e(`/${n.sessionUuid}`)}):T.jsx("p",{className:"text-error-600",children:`${t("somethingWentWrong")} ${t("portalSessionNotFound")}.`})]})}function Jb(){const e=hn(),{t}=mt(),{sessionUuid:n}=ir(),{session:r,isLoading:i,mutate:a}=Ht();return k.useEffect(()=>{if(!i&&r){const s=r.type in Pn?`/${r.type.toLowerCase()}`:"/";e(s)}},[i,a,e,r]),i?T.jsx(Tc,{}):T.jsx("div",{className:"flex w-full items-center justify-center text-error-600",children:`${t("portalSessionNotFound")} (${n})`})}Mr([{path:"/",element:T.jsx(An,{}),children:[{index:!0,element:T.jsx(Ws,{})},{path:"/top-up/:hash",element:T.jsx(Md,{})},{path:"/redeem/:hash",element:T.jsx(Pd,{})}]}]);function Ws(){const{t:e}=mt(),[t,n]=k.useState(""),[r,i]=k.useState(!1),{session:a}=Ht(),s=hn(),c=a==null?void 0:a.input_data.scanner_type,h=k.useCallback(()=>a.results.remaining_amount??(a==null?void 0:a.input_data.amount_in_cents),[a]),g=k.useCallback(async()=>{i(!0);const{data:{data:d}}=await ja.get(t);s(`${a.type===pr.REDEEM_GIFTCARD?"redeem":"top-up"}/${d.hash}`)},[t,s,a]);return k.useEffect(()=>{c===mn.CAMERA&&t&&!r&&g().then()},[t,r,c,g]),(a==null?void 0:a.type)===pr.REDEEM_GIFTCARD&&!(a!=null&&a.input_data.amount_in_cents)?T.jsx(T.Fragment,{children:e("xIsRequired",{x:"Amount in cents"})}):T.jsx("div",{className:"container m-auto max-w-3xl",children:T.jsx(un,{children:T.jsxs("div",{className:"flex flex-col gap-3",children:[T.jsx(lt,{size:"sm",weight:"extralight",children:e("scanGiftcard")}),(a==null?void 0:a.type)===pr.REDEEM_GIFTCARD&&T.jsx(lt,{size:"lg",children:`${e("amountToBePaid")}: ${qr(h())}`}),T.jsx(co,{dataSetter:n,type:c,label:e("hash")}),c===mn.HAND_SCANNER&&T.jsx("div",{children:T.jsx(gt,{type:"submit",label:e("submit"),onClick:g})})]})})})}function Pd(){const{t:e}=mt(),{hash:t}=xd(),{giftcard:n,mutate:r}=Ol(t),{session:i,mutate:a}=Ht(),{onUseGiftcard:s}=ir(),c=hn(),h=(i==null?void 0:i.input_data.amount_in_cents)??0,g=(i==null?void 0:i.input_data.allow_multiple_giftcards)??!0;if(!n)return T.jsx(T.Fragment,{children:e("giftcardNotFound")});const d=async()=>{const w=await ja.transaction(n.uuid,-u());await r();const o=await a(),l=o==null?void 0:o.data.data.events;Ui(l),Xe.success(`${e("transactionSuccessful")}!`),s&&s(w.data.data)},E=()=>i.results.remaining_amount??h,u=()=>Math.min(E(),n.amount_in_cents);return T.jsx("div",{className:"container m-auto",children:T.jsx(un,{children:T.jsxs("div",{className:"flex h-96 flex-col items-center justify-between",children:[T.jsxs("div",{children:[T.jsxs(lt,{size:"md",align:"center",children:[e("giftcard"),": ",n.hash]}),T.jsx(lt,{size:"sm",align:"center",weight:"light",className:"text-gray-500",children:n.expiration_date?e("expiresAtDate",{date:n.formatted_expiration_date}):n.formatted_expiration_date})]}),T.jsxs("div",{children:[T.jsx(lt,{size:"lg",align:"center",children:e("balance")}),T.jsx(lt,{size:"4xl",align:"center",children:n.display_amount})]}),T.jsx("div",{className:"mx-auto flex gap-2",children:u()?T.jsx(gt,{label:e("confirmAndPay",{amount:qr(u(),i==null?void 0:i.currency)}),onClick:d}):T.jsxs("div",{className:"flex flex-col gap-4",children:[T.jsx(lt,{size:"lg",align:"center",className:"text-gray-500",children:e("xOfYPaid",{x:E()?qr(h-E(),i==null?void 0:i.currency):e("fullAmount"),y:qr(h,i==null?void 0:i.currency)})}),g&&E()?T.jsx(gt,{label:e("useAnotherGiftcard"),onClick:()=>c("../")}):null]})})]})})})}function Md(){const{t:e}=mt(),{hash:t}=xd(),{giftcard:n,mutate:r}=Ol(t),[i,a]=k.useState(!1),[s,c]=k.useState("");if(!n)return T.jsx(T.Fragment,{children:e("giftcardNotFound")});const h=async()=>{const g=await ja.transaction(n.uuid,parseFloat(s)*100);await r(),Xe.success(`${e("transactionSuccessful")}! ${e("totalUpgradedAmount")}: ${qr(g.data.data.amount_in_cents)}`),a(!1)};return T.jsxs("div",{className:"container m-auto",children:[T.jsx(un,{children:T.jsxs("div",{className:"flex h-96 flex-col items-center justify-between",children:[T.jsxs("div",{children:[T.jsxs(lt,{size:"md",align:"center",children:[e("giftcard"),": ",n.hash]}),T.jsx(lt,{size:"sm",align:"center",weight:"light",className:"text-gray-500",children:n.expiration_date?e("expiresAtDate",{date:n.formatted_expiration_date}):n.formatted_expiration_date})]}),T.jsxs("div",{children:[T.jsx(lt,{size:"lg",align:"center",children:e("balance")}),T.jsx(lt,{size:"4xl",align:"center",children:n.display_amount})]}),T.jsx("div",{className:"mx-auto flex gap-2",children:T.jsx(gt,{label:e("topUp"),onClick:()=>a(!0)})})]})}),T.jsx(Er,{isOpen:i,onClose:()=>a(!1),children:T.jsxs("div",{className:"flex flex-col gap-4",children:[T.jsx(Ua,{value:s,valueSetter:c}),T.jsx(gt,{label:e("submit"),onClick:h})]})})]})}Mr([{path:"/",element:T.jsx(An,{}),children:[{index:!0,element:T.jsx(kd,{})},{path:"email",element:T.jsx(Fd,{})},{path:"identifier",element:T.jsx(Js,{})},{path:"register",element:T.jsx(jd,{})}]}]);function zb(){const{t:e}=mt(),{contact:t,isLoading:n,mutate:r}=so(),[i,a]=k.useState(),[s,c]=k.useState();k.useEffect(()=>{i||(async()=>{const{data:d}=await Tl.get();a(d.data.elements)})()},[t,i]);const h=(d,E)=>{c({...s,[d]:E})},g=async()=>{s&&(await Tl.update(s),await r(),Xe.success(e("contactAttributesUpdated")))};return!i||n?T.jsx(Tc,{}):T.jsxs("div",{className:"flex h-full flex-col gap-6",children:[T.jsx("div",{className:"flex justify-end",children:T.jsx(gt,{label:e("saveChanges"),onClick:g})}),T.jsx("hr",{}),T.jsx("div",{className:"grid h-full grid-cols-2 gap-x-6 gap-y-2 overflow-y-auto p-1",children:i.map(d=>{if(d.type==="media_upload")return;const E=d.disabled?T.jsx(pm,{type:d.type,value:t.current_display_values[d.name],label:d.label,underlying_value:t.current_values[d.name]}):T.jsx(gm,{...d,onChange:h});return T.jsx("div",{children:E},d.id)})})]})}function Zb(){const{t:e}=mt(),{data:t,isLoading:n,mutate:r}=om(),i=async s=>{await im.update({subscription_type_id:s.subscription_type.id}),await r()},a=s=>{const c=s.subscription_type.strategy,h=s.status;if(c===br.FUNCTIONAL)return e("disabled");switch(h){case Xr.SUBSCRIBED:return e("unsubscribe");case Xr.UNSUBSCRIBED:return c===br.OPT_IN||br.OPT_OUT?e("subscribe"):e("sendConfirmationEmail");case Xr.PENDING_CONFIRMATION:return e("sendReminder");default:return""}};return n?T.jsx(Rf,{rows:5}):T.jsx("div",{children:t.data.data.map(s=>T.jsxs("div",{className:"mb-4 flex justify-between rounded-lg border border-gray-200 px-6 py-4 bg-white",children:[T.jsxs("div",{children:[T.jsxs("div",{className:"flex gap-3",children:[T.jsx(lt,{weight:"normal",children:s.subscription_type.name}),T.jsx("span",{className:`flex gap-2 rounded-full px-2 py-0.5 text-sm font-light ${s.is_subscribed?"bg-[#03985515] text-[#039855]":"bg-[#E0273115] text-[#E02731]"}`,children:s.status.charAt(0)+s.status.substring(1).toLowerCase()})]}),T.jsx(lt,{color:"text-gray-400",size:"sm",children:s.subscription_type.description})]}),T.jsx(gt,{style:{color:"inherit",backgroundColor:"white",border:"1px solid rgb(229 231 235)"},disabled:s.subscription_type.strategy===br.FUNCTIONAL,onClick:()=>i(s),label:a(s)})]},s.subscription_type.uuid))})}const Bd="contact-identifiers",Xb={create:e=>xt.instance.post(pt(Bd),e)},ew=()=>{const{data:e,error:t,isLoading:n,isValidating:r,mutate:i}=Kn(pt(Bd));return{identifiers:e==null?void 0:e.data.data,data:e,error:t,isLoading:n,isValidating:r,mutate:i}};function tw(){const{t:e}=mt(),{data:t,isLoading:n,mutate:r}=ew(),[i,a]=k.useState(!1),[s,c]=k.useState(""),[h,g]=k.useState(!1),d=()=>{g(!0),Xb.create({value:s}).then(()=>{r(),a(!1)}).catch(E=>Xe.error(E)).finally(()=>g(!1))};return n?T.jsx(Rf,{rows:5}):T.jsxs("div",{className:"flex flex-col gap-2",children:[T.jsx("div",{className:"flex justify-end",children:T.jsx(gt,{label:e("addIdentifier"),onClick:()=>a(!0)})}),t.data.data.map(E=>T.jsx("div",{className:"flex justify-between rounded-lg border border-gray-200 px-6 py-4 bg-white",children:T.jsxs("div",{children:[T.jsx(lt,{weight:"semibold",children:E.name}),T.jsx(lt,{children:E.value})]})},E.value)),T.jsx(Er,{isOpen:i,onClose:()=>a(!1),title:e("addIdentifier"),children:T.jsxs("div",{className:"flex flex-col gap-4 min-w-96",children:[T.jsx(wr,{id:"add-identifier",name:"identifier",label:"Identifier value",type:"text",onChange:(E,u)=>c(u),autoFocus:!0}),T.jsx(gt,{label:e("addIdentifier"),onClick:d,disabled:h})]})})]})}function nw(){const{t:e}=mt(),[t,n]=k.useState(),r=k.useMemo(()=>[{id:0,label:e("contactDetails"),icon:T.jsx("path",{d:"M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"}),content:T.jsx(zb,{})},{id:1,label:e("subscriptions"),icon:T.jsx("path",{d:"M18 7.5h-.423l-.452-1.09.3-.3a1.5 1.5 0 0 0 0-2.121L16.01 2.575a1.5 1.5 0 0 0-2.121 0l-.3.3-1.089-.452V2A1.5 1.5 0 0 0 11 .5H9A1.5 1.5 0 0 0 7.5 2v.423l-1.09.452-.3-.3a1.5 1.5 0 0 0-2.121 0L2.576 3.99a1.5 1.5 0 0 0 0 2.121l.3.3L2.423 7.5H2A1.5 1.5 0 0 0 .5 9v2A1.5 1.5 0 0 0 2 12.5h.423l.452 1.09-.3.3a1.5 1.5 0 0 0 0 2.121l1.415 1.413a1.5 1.5 0 0 0 2.121 0l.3-.3 1.09.452V18A1.5 1.5 0 0 0 9 19.5h2a1.5 1.5 0 0 0 1.5-1.5v-.423l1.09-.452.3.3a1.5 1.5 0 0 0 2.121 0l1.415-1.414a1.5 1.5 0 0 0 0-2.121l-.3-.3.452-1.09H18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 18 7.5Zm-8 6a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z"}),content:T.jsx(Zb,{})},{id:2,label:e("identifiers"),icon:T.jsx("path",{d:"M18 7.5h-.423l-.452-1.09.3-.3a1.5 1.5 0 0 0 0-2.121L16.01 2.575a1.5 1.5 0 0 0-2.121 0l-.3.3-1.089-.452V2A1.5 1.5 0 0 0 11 .5H9A1.5 1.5 0 0 0 7.5 2v.423l-1.09.452-.3-.3a1.5 1.5 0 0 0-2.121 0L2.576 3.99a1.5 1.5 0 0 0 0 2.121l.3.3L2.423 7.5H2A1.5 1.5 0 0 0 .5 9v2A1.5 1.5 0 0 0 2 12.5h.423l.452 1.09-.3.3a1.5 1.5 0 0 0 0 2.121l1.415 1.413a1.5 1.5 0 0 0 2.121 0l.3-.3 1.09.452V18A1.5 1.5 0 0 0 9 19.5h2a1.5 1.5 0 0 0 1.5-1.5v-.423l1.09-.452.3.3a1.5 1.5 0 0 0 2.121 0l1.415-1.414a1.5 1.5 0 0 0 0-2.121l-.3-.3.452-1.09H18a1.5 1.5 0 0 0 1.5-1.5V9A1.5 1.5 0 0 0 18 7.5Zm-8 6a3.5 3.5 0 1 1 0-7 3.5 3.5 0 0 1 0 7Z"}),content:T.jsx(tw,{})}],[e]);return k.useEffect(()=>{t||n(r[0])},[r,t]),T.jsxs("div",{className:"h-full sm:flex",children:[T.jsx("ul",{className:"flex-column space-y mb-4 space-y-4 text-sm font-medium text-gray-500 md:mb-0 md:me-4",children:r.map(i=>T.jsx("li",{children:T.jsxs("div",{className:`inline-flex w-full cursor-pointer items-center rounded-lg px-4 py-3 ${i.id===(t==null?void 0:t.id)?"bg-primary-600 text-white":"bg-gray-50 hover:bg-gray-100 hover:text-gray-900"}`,onClick:()=>n(i),children:[T.jsx("svg",{className:`me-2 h-4 w-4 ${i.id===(t==null?void 0:t.id)?"text-white":"text-gray-500"}`,"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20",children:i.icon}),T.jsx("p",{className:"truncate",children:i.label})]})},i.id))}),T.jsx("div",{className:"text-medium h-full w-full rounded-lg bg-gray-50 p-6",children:t&&t.content})]})}function rw(){const{data:e,isLoading:t,mutate:n}=rm(),{mutate:r}=so(),{onClaimReward:i}=ir(),{t:a}=mt(),{mutate:s}=Ht(),c=async h=>{const g=await nm.claim(h);n(),r();const d=await s(),E=d==null?void 0:d.data.data.events;Ui(E);const u=E.filter(o=>o.data.reward.uuid===g.data.data.uuid),{data:{uuid:w}}=u.reduce((o,l)=>new Date(o.created_at)>new Date(l.created_at)?o:l);Xe.success(a("rewardClaimed",{name:g.data.data.title})),i&&i(g.data.data,w)};return T.jsx(Nf,{header:t?[]:e.data.data.header.items,rows:t?[]:e.data.data.rows,pending:t,onClick:c})}function iw(){const{data:e,isLoading:t,mutate:n}=am(),{mutate:r}=Ht(),{onRedeemVoucher:i}=ir(),{t:a}=mt(),s=async c=>{const h=await Va.redeemById(c),g=await r(),d=g==null?void 0:g.data.data.events;Ui(d),n(),Xe.success(a("voucherSuccessfullyRedeemed")),i&&i(h.data.data)};return T.jsx(Nf,{header:t?[]:e.data.data.header.items,rows:t?[]:e.data.data.rows,pending:t,onClick:s})}function ow(){const{t:e}=mt(),{session:{loyalty_program:t}}=Ht(),{contact:n,isLoading:r}=so();if(r)return T.jsx(T.Fragment,{});const i=[{value:n.credit_balance.balance,label:t.custom_credit_name||e("points")},{value:n.current_display_values.loyalty_number_of_transactions,label:e("transactions")},{value:n.tier?n.tier.name:"-",label:e("tier")}];return T.jsxs("div",{className:"flex w-full justify-between text-inherit",children:[T.jsxs("div",{children:[T.jsx("p",{className:"text-md font-medium",children:`${n.current_display_values.firstname} ${n.current_display_values.lastname}`}),T.jsx("p",{className:"text-sm",children:n.current_display_values.email})]}),T.jsx("div",{className:"flex gap-8",children:i.map(a=>T.jsxs("div",{className:"flex flex-col items-center",children:[T.jsx("p",{className:"text-md font-medium",children:a.value}),T.jsx("p",{className:"text-sm",children:a.label})]},a.label))})]})}function aw(){const{t:e}=mt(),{session:t}=Ht(),n=t.contact,[r,i]=k.useState("rewards");if(!n)return T.jsx(T.Fragment,{children:e("contactNotFound")});const a=()=>{switch(r){case"profile":return T.jsx(nw,{});case"rewards":return T.jsx(rw,{});case"vouchers":return T.jsx(iw,{})}};return T.jsx("div",{className:"container m-auto flex h-full p-4",children:T.jsx(un,{children:T.jsxs("div",{className:"flex h-full flex-col gap-6",children:[T.jsx(ow,{}),T.jsx("hr",{}),T.jsx("div",{children:T.jsx(lm,{elements:[{key:"profile",label:e("profile"),active:r==="profile"},{key:"rewards",label:e("rewards"),active:r==="rewards"},{key:"vouchers",label:e("vouchers"),active:r==="vouchers"}],onClick:s=>i(s)})}),T.jsx("div",{className:"overflow-y-auto",children:a()})]})})})}function sw(){const{session:e}=Ht(),t=hn(),{t:n}=mt();return T.jsxs("div",{className:"m-auto flex flex-col items-center gap-4",children:[T.jsx("p",{children:n("noContactLinked")}),T.jsxs("div",{className:"flex gap-4",children:[e.input_data.enable_registration&&T.jsx(gt,{label:n("registerNewContact"),onClick:()=>t("register")}),e.input_data.enable_email_identification&&T.jsx(gt,{label:n("linkViaEmail"),onClick:()=>t("email")}),T.jsx(gt,{label:n("linkViaCard"),onClick:()=>t("identifier")})]})]})}function Js(){const e=hn();return T.jsx("div",{className:"container m-auto max-w-3xl",children:T.jsx(un,{children:T.jsx(Ka,{callback:()=>e("../")})})})}function kd(){const{session:e}=Ht();return e&&(e.contact?T.jsx(aw,{}):!e.input_data.enable_registration&&!e.input_data.enable_email_identification?T.jsx(Js,{}):T.jsx(sw,{}))}function Fd(){const[e,t]=k.useState(""),{session:n,mutate:r}=Ht(),i=hn(),{t:a}=mt(),s=async()=>{n&&(await uo.setContact(n.uuid,{email:e}),await r(),Xe.success(a("contactSavedToSession")),i("../"))};return T.jsx("div",{className:"container m-auto",children:T.jsx(un,{children:T.jsxs("div",{className:"flex flex-col gap-3",children:[T.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})}),T.jsx(wr,{autoFocus:!0,id:"email-input",name:"email",label:a("emailAddress"),type:"email",onChange:(c,h)=>t(h)}),T.jsx("div",{children:T.jsx(gt,{type:"submit",label:a("linkContact"),onClick:s})})]})})})}function jd(){const[e,t]=k.useState(""),{session:n,mutate:r}=Ht(),i=hn(),{t:a}=mt(),s=async()=>{n&&(await ka.create(e),await r(),Xe.success(a("contactSavedToSession")),i("../"))};return T.jsx("div",{className:"container m-auto",children:T.jsx(un,{children:T.jsxs("div",{className:"flex flex-col gap-3",children:[T.jsx("p",{children:a("fillInXBelow",{x:a("emailAddress").toLowerCase()})}),T.jsx(wr,{autoFocus:!0,id:"email-input",name:"email",label:a("emailAddress"),type:"email",onChange:(c,h)=>t(h)}),T.jsx("div",{children:T.jsx(gt,{type:"submit",label:a("register"),onClick:s})})]})})})}Mr([{path:"/",element:T.jsx(An,{}),children:[{index:!0,element:T.jsx(Ld,{})},{path:"balance",element:T.jsx(_d,{})}]}]);function Ld(){const e=hn();return T.jsx("div",{className:"container m-auto max-w-3xl",children:T.jsx(un,{children:T.jsx(Ka,{callback:()=>e("balance")})})})}function _d(){const{t:e}=mt(),{balance:t,mutate:n}=tm(),[r,i]=k.useState(""),[a,s]=k.useState(1),[c,h]=k.useState(!1),g=async()=>{r&&(await em.transaction({amount_in_cents:parseFloat(r)*100*a}),await n(),Xe.success(e("prepaidTransactionCreated")),h(!1))};return T.jsxs("div",{className:"container m-auto",children:[T.jsxs(un,{children:[T.jsxs(lt,{size:"lg",align:"center",weight:"normal",children:[e("prepaidBalance"),": ",t==null?void 0:t.balance]}),T.jsx("div",{className:"mt-6 flex justify-center",children:T.jsxs("div",{className:"grid w-1/3 grid-cols-2 gap-x-2",children:[T.jsx(gt,{label:e("upgrade"),onClick:()=>{h(!0),s(1)}}),T.jsx(gt,{label:e("depreciate"),onClick:()=>{h(!0),s(-1)}})]})})]}),T.jsx(Er,{isOpen:c,onClose:()=>h(!1),children:T.jsxs("div",{className:"flex flex-col gap-4",children:[T.jsx(Ua,{value:r,valueSetter:i}),T.jsx(gt,{label:e("submit"),onClick:g})]})})]})}Mr([{path:"/",element:T.jsx(An,{}),children:[{index:!0,element:T.jsx(Vd,{})},{path:"success",element:T.jsx(qd,{})}]}]);function Vd(){const{t:e}=mt(),[t,n]=k.useState(""),[r,i]=k.useState(!1),{session:a,mutate:s}=Ht(),c=hn(),h=async()=>{if(t){const{data:{data:g}}=await Xg.create({unit_value:parseFloat(t)});await s(),c("success",{state:{transaction:g}})}};return k.useEffect(()=>{a&&a.contact&&i(!0)},[c,a]),T.jsxs("div",{className:"container m-auto max-w-3xl",children:[T.jsx(un,{children:T.jsx(Ka,{})}),T.jsx(Er,{isOpen:r,children:T.jsxs("div",{className:"flex flex-col gap-4",children:[T.jsxs("p",{className:"text-center",children:[e("unitValue"),":"]}),T.jsx(Ua,{value:t,valueSetter:n}),T.jsx(gt,{label:e("submit"),onClick:h})]})})]})}function qd(){const{state:e}=er(),{t}=mt(),{session:{loyalty_program:n}}=Ht(),{contact:r}=so();return T.jsx("div",{className:"m-auto",children:T.jsx(Ll,{children:T.jsxs("div",{className:"mt-8 flex w-96 flex-col gap-4",children:[T.jsxs(lt,{size:"lg",weight:"bold",align:"center",children:[t("creditReceptionCreated"),"!"]}),e&&e.transaction&&T.jsxs(lt,{color:"text-gray-500",align:"center",children:["+",e.transaction.credits," ",n.custom_credit_name||t("points").toLowerCase()]}),T.jsx("div",{className:"h-24"}),r&&T.jsxs("div",{className:"flex justify-between",children:[T.jsxs(lt,{color:"text-gray-200",children:[t("currentCreditBalance"),":"]}),T.jsxs(lt,{color:"text-gray-200",children:[r.credit_balance.balance," ",n.custom_credit_name||t("points").toLowerCase()]})]})]})})})}Mr([{path:"/",element:T.jsx(An,{}),children:[{index:!0,element:T.jsx(Ud,{})},{path:"success",element:T.jsx(Gd,{})}]}]);function Ud(){const{t:e}=mt(),[t,n]=k.useState(""),[r,i]=k.useState(""),[a,s]=k.useState(!1),[c,h]=k.useState(!1),{session:g,mutate:d}=Ht(),E=g==null?void 0:g.input_data.scanner_type,u=hn(),w=k.useCallback(async()=>{r&&await uo.setContact(g.uuid,{contact_identifier_value:r});const{data:{data:l}}=await Va.redeemByCode(t),p=await d(),f=p==null?void 0:p.data.data.events;Ui(f),u("success",{state:{voucher:l}})},[t,r,u,g]),o=k.useCallback(async()=>{if(g){s(!0);const{data:{data:l}}=await Va.get(t);l.contact||g.contact?await w():h(!0),s(!1)}},[t,w,g]);return k.useEffect(()=>{E===mn.CAMERA&&t&&!a&&(async()=>await o())()},[t,a,E,o,c]),T.jsxs("div",{className:"container m-auto max-w-3xl",children:[T.jsxs(un,{children:[T.jsx(co,{dataSetter:n,type:E,label:e("voucherCode")}),E===mn.HAND_SCANNER&&T.jsx("div",{className:"pt-3",children:T.jsx(gt,{type:"submit",label:e("redeemVoucher"),onClick:o})})]}),T.jsxs(Er,{isOpen:c,onClose:()=>h(!1),children:[T.jsx("p",{className:"text-error-600 pb-4",children:e("noContactLinkedToVoucher")}),T.jsx(co,{dataSetter:i,type:E,label:e("contactIdentifier")}),E===mn.HAND_SCANNER&&T.jsx("div",{className:"pt-3",children:T.jsx(gt,{type:"submit",label:e("redeemVoucher"),onClick:w})})]})]})}function Gd(){const{t:e}=mt(),{state:t}=er();return T.jsx("div",{className:"m-auto",children:T.jsx(Ll,{children:T.jsx(lt,{size:"lg",align:"center",className:"pt-6",children:e("voucherWithCodeSuccessfullyRedeemed",{code:t.voucher.code})})})})}const uw=Mr([{path:"/",element:T.jsx(Wb,{})},{path:":portalSessionUuid",element:T.jsx(Jb,{}),errorElement:T.jsx("div",{children:"No session UUID"})},{path:Pn.REDEEM_GIFTCARD,element:T.jsx(An,{}),children:[{index:!0,element:T.jsx(Ws,{})},{path:"redeem/:hash",element:T.jsx(Pd,{})}]},{path:Pn.TOP_UP_GIFTCARD,element:T.jsx(An,{}),children:[{index:!0,element:T.jsx(Ws,{})},{path:"top-up/:hash",element:T.jsx(Md,{})}]},{path:Pn.PORTAL,element:T.jsx(An,{}),children:[{index:!0,element:T.jsx(kd,{})},{path:"email",element:T.jsx(Fd,{})},{path:"identifier",element:T.jsx(Js,{})},{path:"register",element:T.jsx(jd,{})}]},{path:Pn.PREPAID,element:T.jsx(An,{}),children:[{index:!0,element:T.jsx(Ld,{})},{path:"balance",element:T.jsx(_d,{})}]},{path:Pn.SAVE,element:T.jsx(An,{}),children:[{index:!0,element:T.jsx(Vd,{})},{path:"success",element:T.jsx(qd,{})}]},{path:Pn.VOUCHER,element:T.jsx(An,{}),children:[{index:!0,element:T.jsx(Ud,{})},{path:"success",element:T.jsx(Gd,{})}]}]),Yd=()=>T.jsx(Bb,{router:uw});function lw(e){return T.jsx(s1,{config:e,payload:{type:e.type??pr.PORTAL,api_key:e.apiKey,shop_uuid:e.shopUuid,contact_uuid:e.contactUuid,...e.amountInCents&&{amount_in_cents:e.amountInCents},...e.allowMultipleGiftcards&&{allow_multiple_giftcards:e.allowMultipleGiftcards},...e.scannerType&&{scanner_type:e.scannerType},...e.enableRegistration&&{enable_registration:e.enableRegistration},...e.enableEmailIdentification&&{enable_email_identification:e.enableEmailIdentification},...e.enableOnScreenKeyboard&&{enable_on_screen_keyboard:e.enableOnScreenKeyboard}},children:T.jsx(Yd,{})})}function cw({uuid:e,host:t}){const[n,r]=k.useState(!1);return k.useEffect(()=>{n||(xt.initialize(void 0,t),r(!0))},[t,n]),n?T.jsxs(k.StrictMode,{children:[T.jsx(Il,{sessionUuid:e,children:T.jsx("div",{className:"flex h-screen w-screen bg-primary-50",children:T.jsxs("div",{className:"flex h-screen w-screen flex-col bg-primary-50",children:[T.jsx("div",{className:"flex h-full overflow-auto",children:T.jsx(Yd,{})}),e&&T.jsx(jl,{})]})})}),T.jsx(Iu,{position:"bottom-center"})]}):T.jsx(T.Fragment,{children:"Initializing..."})}Bt.DefaultSession=cw,Bt.PortalRoute=Pn,Bt.PortalSession=lw,Bt.PortalType=pr,Bt.ScannerType=mn,Bt.SubscriptionStatus=Xr,Bt.SubscriptionStrategy=br,Bt.VoucherStatus=Pl,Object.defineProperty(Bt,Symbol.toStringTag,{value:"Module"})});