@nizza/core 0.6.0-beta.6 → 0.6.0-beta.8

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.
Files changed (75) hide show
  1. package/dist/index.cjs +69 -21
  2. package/dist/index.cjs.map +1 -1
  3. package/dist/index.mjs +6104 -2748
  4. package/dist/index.mjs.map +1 -1
  5. package/dist/lib/index.d.ts +1 -0
  6. package/dist/lib/index.d.ts.map +1 -1
  7. package/dist/lib/ivs-socket/core/domain/entities/event-chat-room.entity.d.ts +11 -0
  8. package/dist/lib/ivs-socket/core/domain/entities/event-chat-room.entity.d.ts.map +1 -0
  9. package/dist/lib/ivs-socket/core/domain/entities/index.d.ts +3 -0
  10. package/dist/lib/ivs-socket/core/domain/entities/index.d.ts.map +1 -0
  11. package/dist/lib/ivs-socket/core/domain/entities/ivs-chat-client-socket.entity.d.ts +14 -0
  12. package/dist/lib/ivs-socket/core/domain/entities/ivs-chat-client-socket.entity.d.ts.map +1 -0
  13. package/dist/lib/ivs-socket/core/domain/index.d.ts +4 -0
  14. package/dist/lib/ivs-socket/core/domain/index.d.ts.map +1 -0
  15. package/dist/lib/ivs-socket/core/domain/repositories/event-chat-room.repository.d.ts +7 -0
  16. package/dist/lib/ivs-socket/core/domain/repositories/event-chat-room.repository.d.ts.map +1 -0
  17. package/dist/lib/ivs-socket/core/domain/repositories/index.d.ts +2 -0
  18. package/dist/lib/ivs-socket/core/domain/repositories/index.d.ts.map +1 -0
  19. package/dist/lib/ivs-socket/core/domain/shared/constants.d.ts +2 -0
  20. package/dist/lib/ivs-socket/core/domain/shared/constants.d.ts.map +1 -0
  21. package/dist/lib/ivs-socket/core/domain/shared/errors.d.ts +6 -0
  22. package/dist/lib/ivs-socket/core/domain/shared/errors.d.ts.map +1 -0
  23. package/dist/lib/ivs-socket/core/domain/shared/index.d.ts +4 -0
  24. package/dist/lib/ivs-socket/core/domain/shared/index.d.ts.map +1 -0
  25. package/dist/lib/ivs-socket/core/domain/shared/types.d.ts +12 -0
  26. package/dist/lib/ivs-socket/core/domain/shared/types.d.ts.map +1 -0
  27. package/dist/lib/ivs-socket/core/index.d.ts +8 -0
  28. package/dist/lib/ivs-socket/core/index.d.ts.map +1 -0
  29. package/dist/lib/ivs-socket/core/infrastructure/graphql-event-chat-room.repository.d.ts +10 -0
  30. package/dist/lib/ivs-socket/core/infrastructure/graphql-event-chat-room.repository.d.ts.map +1 -0
  31. package/dist/lib/ivs-socket/core/infrastructure/index.d.ts +2 -0
  32. package/dist/lib/ivs-socket/core/infrastructure/index.d.ts.map +1 -0
  33. package/dist/lib/ivs-socket/core/services/event-chat-room.service.d.ts +11 -0
  34. package/dist/lib/ivs-socket/core/services/event-chat-room.service.d.ts.map +1 -0
  35. package/dist/lib/ivs-socket/core/services/index.d.ts +2 -0
  36. package/dist/lib/ivs-socket/core/services/index.d.ts.map +1 -0
  37. package/dist/lib/ivs-socket/hooks/index.d.ts +6 -0
  38. package/dist/lib/ivs-socket/hooks/index.d.ts.map +1 -0
  39. package/dist/lib/ivs-socket/hooks/use-connect-ivs-chat.hook.d.ts +29 -0
  40. package/dist/lib/ivs-socket/hooks/use-connect-ivs-chat.hook.d.ts.map +1 -0
  41. package/dist/lib/ivs-socket/hooks/use-event-chat-room.hook.d.ts +11 -0
  42. package/dist/lib/ivs-socket/hooks/use-event-chat-room.hook.d.ts.map +1 -0
  43. package/dist/lib/ivs-socket/hooks/use-ivs-chat-actions.hook.d.ts +10 -0
  44. package/dist/lib/ivs-socket/hooks/use-ivs-chat-actions.hook.d.ts.map +1 -0
  45. package/dist/lib/ivs-socket/hooks/use-ivs-chat-client.hook.d.ts +9 -0
  46. package/dist/lib/ivs-socket/hooks/use-ivs-chat-client.hook.d.ts.map +1 -0
  47. package/dist/lib/ivs-socket/hooks/use-ivs-chat-handlers.hook.d.ts +9 -0
  48. package/dist/lib/ivs-socket/hooks/use-ivs-chat-handlers.hook.d.ts.map +1 -0
  49. package/dist/lib/ivs-socket/index.d.ts +5 -0
  50. package/dist/lib/ivs-socket/index.d.ts.map +1 -0
  51. package/dist/lib/ivs-socket/logger.d.ts +3 -0
  52. package/dist/lib/ivs-socket/logger.d.ts.map +1 -0
  53. package/dist/lib/ivs-socket/state.d.ts +12 -0
  54. package/dist/lib/ivs-socket/state.d.ts.map +1 -0
  55. package/dist/lib/ivs-socket/utils/add-question-data.util.d.ts +4 -0
  56. package/dist/lib/ivs-socket/utils/add-question-data.util.d.ts.map +1 -0
  57. package/dist/lib/ivs-socket/utils/connect-to-socket.util.d.ts +11 -0
  58. package/dist/lib/ivs-socket/utils/connect-to-socket.util.d.ts.map +1 -0
  59. package/dist/lib/ivs-socket/utils/get-random-color.util.d.ts +2 -0
  60. package/dist/lib/ivs-socket/utils/get-random-color.util.d.ts.map +1 -0
  61. package/dist/lib/ivs-socket/utils/index.d.ts +5 -0
  62. package/dist/lib/ivs-socket/utils/index.d.ts.map +1 -0
  63. package/dist/lib/ivs-socket/utils/normalize-chat-message.util.d.ts +4 -0
  64. package/dist/lib/ivs-socket/utils/normalize-chat-message.util.d.ts.map +1 -0
  65. package/dist/lib/types/api-graphql-types.d.ts +32 -0
  66. package/dist/lib/types/api-graphql-types.d.ts.map +1 -1
  67. package/dist/lib/types/nizza/highlight-product.entity.d.ts +7 -0
  68. package/dist/lib/types/nizza/highlight-product.entity.d.ts.map +1 -0
  69. package/dist/lib/types/nizza/index.d.ts +1 -0
  70. package/dist/lib/types/nizza/index.d.ts.map +1 -1
  71. package/dist/lib/types/nizza/product.d.ts +1 -0
  72. package/dist/lib/types/nizza/product.d.ts.map +1 -1
  73. package/dist/lib/types/runtime/base.d.ts +1 -1
  74. package/dist/lib/types/runtime/base.d.ts.map +1 -1
  75. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var To=Object.defineProperty;var xo=(t,e,n)=>e in t?To(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var w=(t,e,n)=>(xo(t,typeof e!="symbol"?e+"":e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const z=require("react"),la=require("react-dom"),Ro=require("@tanstack/react-query"),Po=require("react/jsx-runtime");var W={NZ_AWS_REGION:"us-east-1",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1,STAGE:"dev"};let $o=0;function Lo(t,e){const n=`atom${++$o}`,i={toString:()=>n};return i.init=t,i.read=Do,i.write=Io,i}function Do(t){return t(this)}function Io(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const Hn=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,Gn=t=>"init"in t,Kn=t=>!!t.write,tn=new WeakMap,Vo=(t,e)=>{tn.set(t,e),t.catch(()=>{}).finally(()=>tn.delete(t))},er=(t,e)=>{const n=tn.get(t);n&&(tn.delete(t),n(e))},tr=(t,e)=>{t.status="fulfilled",t.value=e},nr=(t,e)=>{t.status="rejected",t.reason=e},jo=t=>typeof(t==null?void 0:t.then)=="function",ot=(t,e)=>!!t&&"v"in t&&"v"in e&&Object.is(t.v,e.v),ir=(t,e)=>!!t&&"e"in t&&"e"in e&&Object.is(t.e,e.e),Ue=t=>!!t&&"v"in t&&t.v instanceof Promise,Uo=(t,e)=>"v"in t&&"v"in e&&t.v.orig&&t.v.orig===e.v.orig,Bt=t=>{if("e"in t)throw t.e;return t.v},ua=()=>{const t=new WeakMap,e=new WeakMap,n=[],i=new WeakMap;let r,a;(W?"production":void 0)!=="production"&&(r=new Set,a=new Set);const s=g=>t.get(g),o=(g,O)=>{O.d.forEach((E,v)=>{var b;if(!i.has(v)){const A=s(v);(b=n[n.length-1])==null||b.add(v),i.set(v,[A,new Set]),A&&o(v,A)}i.get(v)[1].add(g)})},l=(g,O)=>{var E;(W?"production":void 0)!=="production"&&Object.freeze(O);const v=s(g);if(t.set(g,O),i.has(g)||((E=n[n.length-1])==null||E.add(g),i.set(g,[v,new Set]),o(g,O)),Ue(v)){const b="v"in O?O.v instanceof Promise?O.v:Promise.resolve(O.v):Promise.reject(O.e);v.v!==b&&er(v.v,b)}},u=(g,O,E,v)=>{const b=new Map(v?O.d:null);let A=!1;E.forEach((N,C)=>{!N&&Hn(g,C)&&(N=O),N?(b.set(C,N),O.d.get(C)!==N&&(A=!0)):(W?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(A||O.d.size!==b.size)&&(O.d=b)},d=(g,O,E,v)=>{const b=s(g),A={d:(b==null?void 0:b.d)||new Map,v:O};if(E&&u(g,A,E,v),ot(b,A)&&b.d===A.d)return b;if(Ue(b)&&Ue(A)&&Uo(b,A)){if(b.d===A.d)return b;A.v=b.v}return l(g,A),A},c=(g,O,E,v)=>{if(jo(O)){let b;const A=()=>{const C=s(g);if(!Ue(C)||C.v!==N)return;const V=d(g,N,E);e.has(g)&&C.d!==V.d&&P(g,V,C.d)},N=new Promise((C,V)=>{let R=!1;O.then($=>{R||(R=!0,tr(N,$),C($),A())},$=>{R||(R=!0,nr(N,$),V($),A())}),b=$=>{R||(R=!0,$.then(q=>tr(N,q),q=>nr(N,q)),C($))}});return N.orig=O,N.status="pending",Vo(N,C=>{C&&b(C),v==null||v()}),d(g,N,E,!0)}return d(g,O,E)},f=(g,O,E)=>{const v=s(g),b={d:(v==null?void 0:v.d)||new Map,e:O};return E&&u(g,b,E),ir(v,b)&&v.d===b.d?v:(l(g,b),b)},k=(g,O)=>{const E=s(g);if(!O&&E&&(e.has(g)||Array.from(E.d).every(([R,$])=>{if(R===g)return!0;const q=k(R);return q===$||ot(q,$)})))return E;const v=new Map;let b=!0;const A=R=>{if(Hn(g,R)){const q=s(R);if(q)return v.set(R,q),Bt(q);if(Gn(R))return v.set(R,void 0),R.init;throw new Error("no atom init")}const $=k(R);return v.set(R,$),Bt($)};let N,C;const V={get signal(){return N||(N=new AbortController),N.signal},get setSelf(){return(W?"production":void 0)!=="production"&&!Kn(g)&&console.warn("setSelf function cannot be used with read-only atom"),!C&&Kn(g)&&(C=(...R)=>{if((W?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return y(g,...R)}),C}};try{const R=g.read(A,V);return c(g,R,v,()=>N==null?void 0:N.abort())}catch(R){return f(g,R,v)}finally{b=!1}},p=g=>Bt(k(g)),m=g=>{const O=N=>{var C,V;const R=new Set((C=e.get(N))==null?void 0:C.t);return(V=i.get(N))==null||V[1].forEach($=>{R.add($)}),R},E=new Array,v=new Set,b=N=>{if(!v.has(N)){v.add(N);for(const C of O(N))N!==C&&b(C);E.push(N)}};b(g);const A=new Set([g]);for(let N=E.length-1;N>=0;--N){const C=E[N],V=s(C);if(!V)continue;let R=!1;for(const $ of V.d.keys())if($!==C&&A.has($)){R=!0;break}if(R){const $=k(C,!0);ot(V,$)||A.add(C)}}},S=(g,...O)=>{const E=A=>Bt(k(A)),v=(A,...N)=>{const C=n.length>0;C||n.push(new Set([A]));let V;if(Hn(g,A)){if(!Gn(A))throw new Error("atom not writable");const R=s(A),$=c(A,N[0]);ot(R,$)||m(A)}else V=S(A,...N);if(!C){const R=j(n.pop());(W?"production":void 0)!=="production"&&r.forEach($=>$({type:"async-write",flushed:R}))}return V};return g.write(E,v,...O)},y=(g,...O)=>{n.push(new Set([g]));const E=S(g,...O),v=j(n.pop());return(W?"production":void 0)!=="production"&&r.forEach(b=>b({type:"write",flushed:v})),E},x=(g,O,E)=>{var v;const b=e.get(g);if(b)return O&&b.t.add(O),b;const A=E||[];(v=s(g))==null||v.d.forEach((C,V)=>{V!==g&&x(V,g,A)}),k(g);const N={t:new Set(O&&[O]),l:new Set};if(e.set(g,N),(W?"production":void 0)!=="production"&&a.add(g),Kn(g)&&g.onMount){const{onMount:C}=g;A.push(()=>{const V=C((...R)=>y(g,...R));V&&(N.u=V)})}return E||A.forEach(C=>C()),N},U=(g,O)=>!O.l.size&&(!O.t.size||O.t.size===1&&O.t.has(g)),F=(g,O)=>{if(!U(g,O))return;const E=O.u;E&&E(),e.delete(g),(W?"production":void 0)!=="production"&&a.delete(g);const v=s(g);v?(Ue(v)&&er(v.v),v.d.forEach((b,A)=>{if(A!==g){const N=e.get(A);N&&(N.t.delete(g),F(A,N))}})):(W?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",g)},P=(g,O,E)=>{const v=new Set(O.d.keys()),b=new Set;E==null||E.forEach((A,N)=>{if(v.has(N)){v.delete(N);return}b.add(N);const C=e.get(N);C&&C.t.delete(g)}),v.forEach(A=>{x(A,g)}),b.forEach(A=>{const N=e.get(A);N&&F(A,N)})},j=g=>{let O;(W?"production":void 0)!=="production"&&(O=new Set);const E=[],v=b=>{var A;if(!i.has(b))return;const[N,C]=i.get(b);i.delete(b),E.push([b,N]),C.forEach(v),(A=s(b))==null||A.d.forEach((V,R)=>v(R))};if(g.forEach(v),E.forEach(([b,A])=>{const N=s(b);if(!N){(W?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush");return}if(N!==A){const C=e.get(b);C&&N.d!==(A==null?void 0:A.d)&&P(b,N,A==null?void 0:A.d),C&&!(!Ue(A)&&(ot(A,N)||ir(A,N)))&&(C.l.forEach(V=>V()),(W?"production":void 0)!=="production"&&O.add(b))}}),(W?"production":void 0)!=="production")return O},M=(g,O)=>{const E=x(g),v=j([g]),b=E.l;return b.add(O),(W?"production":void 0)!=="production"&&r.forEach(A=>A({type:"sub",flushed:v})),()=>{b.delete(O),F(g,E),(W?"production":void 0)!=="production"&&r.forEach(A=>A({type:"unsub"}))}};return(W?"production":void 0)!=="production"?{get:p,set:y,sub:M,dev_subscribe_store:g=>(r.add(g),()=>{r.delete(g)}),dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:g=>t.get(g),dev_get_mounted:g=>e.get(g),dev_restore_atoms:g=>{n.push(new Set);for(const[E,v]of g)Gn(E)&&(c(E,v),m(E));const O=j(n.pop());r.forEach(E=>E({type:"restore",flushed:O}))}}:{get:p,set:y,sub:M}};let lt;const Mo=()=>(lt||(lt=ua(),(W?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=lt),globalThis.__JOTAI_DEFAULT_STORE__!==lt&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),lt),Bo=ua,zo=Mo;var Ho={NZ_AWS_REGION:"us-east-1",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1,STAGE:"dev"};const Go=z.createContext(void 0),da=t=>z.useContext(Go)||zo(),Ko=t=>typeof(t==null?void 0:t.then)=="function",qo=z.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)});function Wo(t,e){const n=da(),[[i,r,a],s]=z.useReducer(u=>{const d=n.get(t);return Object.is(u[0],d)&&u[1]===n&&u[2]===t?u:[d,n,t]},void 0,()=>[n.get(t),n,t]);let o=i;return(r!==n||a!==t)&&(s(),o=n.get(t)),z.useEffect(()=>{const u=n.sub(t,()=>{s()});return s(),u},[n,t,void 0]),z.useDebugValue(o),Ko(o)?qo(o):o}function Jo(t,e){const n=da();return z.useCallback((...r)=>{if((Ho?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...r)},[n,t])}function Yo(t,e){return[Wo(t),Jo(t)]}const bn=Lo(null);bn.debugLabel="accountAtom";var Xo={NZ_AWS_REGION:"us-east-1",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1,STAGE:"dev"};const{NZ_AWS_REGION:Zo,NZ_BACKOFFICE_BACK_URL:Qo,NZ_CORE_SERVICES_GRAPHQL_URL:el,NZ_CORE_SERVICES_REST_URL:tl}=Xo,nl={AWS:{region:Zo,cognito:{userPoolId:"us-east-1_knSlGEmJ0",userPoolWebClientId:"3hmbfhf7nl3kq20qr9i5lihf1p"}},apiUrls:{restV1:Qo||"https://pabprg32bj.execute-api.us-east-1.amazonaws.com",restV2:tl||"https://core-services-dev.nizza.com/api",graphql:el||"https://core-services-dev.nizza.com/graphql",corsProxy:"https://1qmd8jteh1.execute-api.us-east-1.amazonaws.com"},publicUrls:{platformSite:"https://platformdev.nizza.com",nizzaCdn:"https://cdn.nizza.com",bundleSite:"https://bundledev.nizza.com",wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};function il(t,e){let n=null;const i=()=>{n||(n=e().log.createLogger(t))},r=(s,o)=>typeof s[o]=="function",a={get(s,o,l){i();const u=d=>(...c)=>{if(!n)return;const f=n[d];if(typeof f=="function")return f.apply(n,c)};return n&&r(n,o)?u(o):n?n[o]:void 0}};return new Proxy({},a)}function D(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];throw new Error(typeof t=="number"?"[MobX] minified error nr: "+t+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+t)}var rl={};function xi(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:rl}var ca=Object.assign,nn=Object.getOwnPropertyDescriptor,fe=Object.defineProperty,_n=Object.prototype,ui=[];Object.freeze(ui);var fa={};Object.freeze(fa);var al=typeof Proxy!="undefined",sl=Object.toString();function ma(){al||D("Proxy not available")}function ha(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var Ke=function(){};function se(t){return typeof t=="function"}function Re(t){var e=typeof t;switch(e){case"string":case"symbol":case"number":return!0}return!1}function Sn(t){return t!==null&&typeof t=="object"}function Ae(t){if(!Sn(t))return!1;var e=Object.getPrototypeOf(t);if(e==null)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n.toString()===sl}function pa(t){var e=t==null?void 0:t.constructor;return e?e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction":!1}function Nn(t,e,n){fe(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function ga(t,e,n){fe(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Le(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Sn(i)&&i[n]===!0}}function et(t){return t instanceof Map}function xt(t){return t instanceof Set}var va=typeof Object.getOwnPropertySymbols!="undefined";function ol(t){var e=Object.keys(t);if(!va)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter(function(i){return _n.propertyIsEnumerable.call(t,i)})):e}var An=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:va?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function ka(t){return t===null?null:typeof t=="object"?""+t:t}function ve(t,e){return _n.hasOwnProperty.call(t,e)}var ll=Object.getOwnPropertyDescriptors||function(e){var n={};return An(e).forEach(function(i){n[i]=nn(e,i)}),n};function ul(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,fl(i.key),i)}}function Ri(t,e,n){return e&&ul(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function we(){return we=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},we.apply(this,arguments)}function ya(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,di(t,e)}function di(t,e){return di=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},di(t,e)}function qn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function dl(t,e){if(t){if(typeof t=="string")return rr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rr(t,e)}}function rr(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function qe(t,e){var n=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=dl(t))||e){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cl(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function fl(t){var e=cl(t,"string");return typeof e=="symbol"?e:String(e)}var le=Symbol("mobx-stored-annotations");function me(t){function e(n,i){if(Rt(i))return t.decorate_20223_(n,i);tt(n,i,t)}return Object.assign(e,t)}function tt(t,e,n){ve(t,le)||Nn(t,le,we({},t[le])),_l(n)||(t[le][e]=n)}function ml(t){return ve(t,le)||Nn(t,le,we({},t[le])),t[le]}function Rt(t){return typeof t=="object"&&typeof t.kind=="string"}var T=Symbol("mobx administration"),Pt=function(){function t(n){n===void 0&&(n="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=I.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=n}var e=t.prototype;return e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(i){return i()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(i){return i()})},e.reportObserved=function(){return Ia(this)},e.reportChanged=function(){Q(),Va(this),ee()},e.toString=function(){return this.name_},t}(),Pi=Le("Atom",Pt);function ba(t,e,n){e===void 0&&(e=Ke),n===void 0&&(n=Ke);var i=new Pt(t);return e!==Ke&&wu(i,e),n!==Ke&&Ha(i,n),i}function hl(t,e){return t===e}function pl(t,e){return Vi(t,e)}function gl(t,e){return Vi(t,e,1)}function vl(t,e){return Object.is?Object.is(t,e):t===e?t!==0||1/t===1/e:t!==t&&e!==e}var rn={identity:hl,structural:pl,default:vl,shallow:gl};function Pe(t,e,n){return Wa(t)?t:Array.isArray(t)?K.array(t,{name:n}):Ae(t)?K.object(t,void 0,{name:n}):et(t)?K.map(t,{name:n}):xt(t)?K.set(t,{name:n}):typeof t=="function"&&!Tn(t)&&!Nt(t)?pa(t)?Ye(t):St(n,t):t}function kl(t,e,n){if(t==null||Rn(t)||xn(t)||Ie(t)||nt(t))return t;if(Array.isArray(t))return K.array(t,{name:n,deep:!1});if(Ae(t))return K.object(t,void 0,{name:n,deep:!1});if(et(t))return K.map(t,{name:n,deep:!1});if(xt(t))return K.set(t,{name:n,deep:!1})}function wn(t){return t}function yl(t,e){return Vi(t,e)?e:t}var bl="override";function _l(t){return t.annotationType_===bl}function $t(t,e){return{annotationType_:t,options_:e,make_:Sl,extend_:Nl,decorate_20223_:Al}}function Sl(t,e,n,i){var r;if((r=this.options_)!=null&&r.bound)return this.extend_(t,e,n,!1)===null?0:1;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if(Tn(n.value))return 1;var a=_a(t,this,e,n,!1);return fe(i,e,a),2}function Nl(t,e,n,i){var r=_a(t,this,e,n);return t.defineProperty_(e,r,i)}function Al(t,e){var n=e.kind,i=e.name,r=e.addInitializer,a=this,s=function(u){var d,c,f,k;return Oe((d=(c=a.options_)==null?void 0:c.name)!=null?d:i.toString(),u,(f=(k=a.options_)==null?void 0:k.autoAction)!=null?f:!1)};if(n=="field"){r(function(){tt(this,i,a)});return}if(n=="method"){var o;return Tn(t)||(t=s(t)),(o=this.options_)!=null&&o.bound&&r(function(){var l=this,u=l[i].bind(l);u.isMobxAction=!0,l[i]=u}),t}D("Cannot apply '"+a.annotationType_+"' to '"+String(i)+"' (kind: "+n+"):"+(`
3
- '`+a.annotationType_+"' can only be used on properties with a function value."))}function wl(t,e,n,i){e.annotationType_,i.value}function _a(t,e,n,i,r){var a,s,o,l,u,d,c;r===void 0&&(r=_.safeDescriptors),wl(t,e,n,i);var f=i.value;if((a=e.options_)!=null&&a.bound){var k;f=f.bind((k=t.proxy_)!=null?k:t.target_)}return{value:Oe((s=(o=e.options_)==null?void 0:o.name)!=null?s:n.toString(),f,(l=(u=e.options_)==null?void 0:u.autoAction)!=null?l:!1,(d=e.options_)!=null&&d.bound?(c=t.proxy_)!=null?c:t.target_:void 0),configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function Sa(t,e){return{annotationType_:t,options_:e,make_:Ol,extend_:El,decorate_20223_:Fl}}function Ol(t,e,n,i){var r;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if((r=this.options_)!=null&&r.bound&&(!ve(t.target_,e)||!Nt(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(Nt(n.value))return 1;var a=Na(t,this,e,n,!1,!1);return fe(i,e,a),2}function El(t,e,n,i){var r,a=Na(t,this,e,n,(r=this.options_)==null?void 0:r.bound);return t.defineProperty_(e,a,i)}function Fl(t,e){var n,i=e.name,r=e.addInitializer;return Nt(t)||(t=Ye(t)),(n=this.options_)!=null&&n.bound&&r(function(){var a=this,s=a[i].bind(a);s.isMobXFlow=!0,a[i]=s}),t}function Cl(t,e,n,i){e.annotationType_,i.value}function Na(t,e,n,i,r,a){a===void 0&&(a=_.safeDescriptors),Cl(t,e,n,i);var s=i.value;if(Nt(s)||(s=Ye(s)),r){var o;s=s.bind((o=t.proxy_)!=null?o:t.target_),s.isMobXFlow=!0}return{value:s,configurable:a?t.isPlainObject_:!0,enumerable:!1,writable:!a}}function $i(t,e){return{annotationType_:t,options_:e,make_:Tl,extend_:xl,decorate_20223_:Rl}}function Tl(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function xl(t,e,n,i){return Pl(t,this,e,n),t.defineComputedProperty_(e,we({},this.options_,{get:n.get,set:n.set}),i)}function Rl(t,e){var n=this,i=e.name,r=e.addInitializer;return r(function(){var a=it(this)[T],s=we({},n.options_,{get:t,context:this});s.name||(s.name="ObservableObject."+i.toString()),a.values_.set(i,new Je(s))}),function(){return this[T].getObservablePropValue_(i)}}function Pl(t,e,n,i){e.annotationType_,i.get}function On(t,e){return{annotationType_:t,options_:e,make_:$l,extend_:Ll,decorate_20223_:Dl}}function $l(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Ll(t,e,n,i){var r,a;return Il(t,this),t.defineObservableProperty_(e,n.value,(r=(a=this.options_)==null?void 0:a.enhancer)!=null?r:Pe,i)}function Dl(t,e){var n=this,i=e.kind,r=e.name,a=new WeakSet;function s(o,l){var u,d,c=it(o)[T],f=new Te(l,(u=(d=n.options_)==null?void 0:d.enhancer)!=null?u:Pe,"ObservableObject."+r.toString(),!1);c.values_.set(r,f),a.add(o)}if(i=="accessor")return{get:function(){return a.has(this)||s(this,t.get.call(this)),this[T].getObservablePropValue_(r)},set:function(l){return a.has(this)||s(this,l),this[T].setObservablePropValue_(r,l)},init:function(l){return a.has(this)||s(this,l),l}}}function Il(t,e,n,i){e.annotationType_}var Vl="true",jl=Aa();function Aa(t){return{annotationType_:Vl,options_:t,make_:Ul,extend_:Ml,decorate_20223_:Bl}}function Ul(t,e,n,i){var r,a;if(n.get)return _e.make_(t,e,n,i);if(n.set){var s=Oe(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:_.safeDescriptors?t.isPlainObject_:!0,set:s})===null?0:2:(fe(i,e,{configurable:!0,set:s}),2)}if(i!==t.target_&&typeof n.value=="function"){var o;if(pa(n.value)){var l,u=(l=this.options_)!=null&&l.autoBind?Ye.bound:Ye;return u.make_(t,e,n,i)}var d=(o=this.options_)!=null&&o.autoBind?St.bound:St;return d.make_(t,e,n,i)}var c=((r=this.options_)==null?void 0:r.deep)===!1?K.ref:K;if(typeof n.value=="function"&&(a=this.options_)!=null&&a.autoBind){var f;n.value=n.value.bind((f=t.proxy_)!=null?f:t.target_)}return c.make_(t,e,n,i)}function Ml(t,e,n,i){var r,a;if(n.get)return _e.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:_.safeDescriptors?t.isPlainObject_:!0,set:Oe(e.toString(),n.set)},i);if(typeof n.value=="function"&&(r=this.options_)!=null&&r.autoBind){var s;n.value=n.value.bind((s=t.proxy_)!=null?s:t.target_)}var o=((a=this.options_)==null?void 0:a.deep)===!1?K.ref:K;return o.extend_(t,e,n,i)}function Bl(t,e){D("'"+this.annotationType_+"' cannot be used as a decorator")}var zl="observable",Hl="observable.ref",Gl="observable.shallow",Kl="observable.struct",wa={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(wa);function zt(t){return t||wa}var ci=On(zl),ql=On(Hl,{enhancer:wn}),Wl=On(Gl,{enhancer:kl}),Jl=On(Kl,{enhancer:yl}),Oa=me(ci);function Ht(t){return t.deep===!0?Pe:t.deep===!1?wn:Xl(t.defaultDecorator)}function Yl(t){var e;return t?(e=t.defaultDecorator)!=null?e:Aa(t):void 0}function Xl(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:Pe}function Ea(t,e,n){if(Rt(e))return ci.decorate_20223_(t,e);if(Re(e)){tt(t,e,ci);return}return Wa(t)?t:Ae(t)?K.object(t,e,n):Array.isArray(t)?K.array(t,e):et(t)?K.map(t,e):xt(t)?K.set(t,e):typeof t=="object"&&t!==null?t:K.box(t,e)}ca(Ea,Oa);var Zl={box:function(e,n){var i=zt(n);return new Te(e,Ht(i),i.name,!0,i.equals)},array:function(e,n){var i=zt(n);return(_.useProxies===!1||i.proxy===!1?Xu:Mu)(e,Ht(i),i.name)},map:function(e,n){var i=zt(n);return new es(e,Ht(i),i.name)},set:function(e,n){var i=zt(n);return new is(e,Ht(i),i.name)},object:function(e,n,i){return Ve(function(){return Cu(_.useProxies===!1||(i==null?void 0:i.proxy)===!1?it({},i):Vu({},i),e,n)})},ref:me(ql),shallow:me(Wl),deep:Oa,struct:me(Jl)},K=ca(Ea,Zl),Fa="computed",Ql="computed.struct",fi=$i(Fa),eu=$i(Ql,{equals:rn.structural}),_e=function(e,n){if(Rt(n))return fi.decorate_20223_(e,n);if(Re(n))return tt(e,n,fi);if(Ae(e))return me($i(Fa,e));var i=Ae(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new Je(i)};Object.assign(_e,fi);_e.struct=me(eu);var ar,sr,an=0,tu=1,nu=(ar=(sr=nn(function(){},"name"))==null?void 0:sr.configurable)!=null?ar:!1,or={value:"action",configurable:!0,writable:!1,enumerable:!1};function Oe(t,e,n,i){n===void 0&&(n=!1);function r(){return iu(t,n,e,i||this,arguments)}return r.isMobxAction=!0,r.toString=function(){return e.toString()},nu&&(or.value=t,fe(r,"name",or)),r}function iu(t,e,n,i,r){var a=ru(t,e);try{return n.apply(i,r)}catch(s){throw a.error_=s,s}finally{au(a)}}function ru(t,e,n,i){var r=!1,a=0,s=_.trackingDerivation,o=!e||!s;Q();var l=_.allowStateChanges;o&&(De(),l=En(!0));var u=Li(!0),d={runAsAction_:o,prevDerivation_:s,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:r,startTime_:a,actionId_:tu++,parentActionId_:an};return an=d.actionId_,d}function au(t){an!==t.actionId_&&D(30),an=t.parentActionId_,t.error_!==void 0&&(_.suppressReactionErrors=!0),Fn(t.prevAllowStateChanges_),ht(t.prevAllowStateReads_),ee(),t.runAsAction_&&ke(t.prevDerivation_),_.suppressReactionErrors=!1}function su(t,e){var n=En(t);try{return e()}finally{Fn(n)}}function En(t){var e=_.allowStateChanges;return _.allowStateChanges=t,e}function Fn(t){_.allowStateChanges=t}var Ca;Ca=Symbol.toPrimitive;var Te=function(t){ya(e,t);function e(i,r,a,s,o){var l;return a===void 0&&(a="ObservableValue"),o===void 0&&(o=rn.default),l=t.call(this,a)||this,l.enhancer=void 0,l.name_=void 0,l.equals=void 0,l.hasUnreportedChange_=!1,l.interceptors_=void 0,l.changeListeners_=void 0,l.value_=void 0,l.dehancer=void 0,l.enhancer=r,l.name_=a,l.equals=o,l.value_=r(i,void 0,a),l}var n=e.prototype;return n.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},n.set=function(r){this.value_,r=this.prepareNewValue_(r),r!==_.UNCHANGED&&this.setNewValue_(r)},n.prepareNewValue_=function(r){if(X(this)){var a=Z(this,{object:this,type:he,newValue:r});if(!a)return _.UNCHANGED;r=a.newValue}return r=this.enhancer(r,this.value_,this.name_),this.equals(this.value_,r)?_.UNCHANGED:r},n.setNewValue_=function(r){var a=this.value_;this.value_=r,this.reportChanged(),re(this)&&ae(this,{type:he,object:this,newValue:r,oldValue:a})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(r){return Lt(this,r)},n.observe_=function(r,a){return a&&r({observableKind:"value",debugObjectName:this.name_,object:this,type:he,newValue:this.value_,oldValue:void 0}),Dt(this,r)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return ka(this.get())},n[Ca]=function(){return this.valueOf()},e}(Pt),Ta;Ta=Symbol.toPrimitive;var Je=function(){function t(n){this.dependenciesState_=I.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=I.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new on(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=sn.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,n.get||D(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=Oe("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?rn.structural:rn.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){cu(this)},e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(i){return i()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(i){return i()})},e.get=function(){if(this.isComputing_&&D(32,this.name_,this.derivation),_.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)mi(this)&&(this.warnAboutUntrackedRead_(),Q(),this.value_=this.computeValue_(!1),ee());else if(Ia(this),mi(this)){var i=_.trackingContext;this.keepAlive_&&!i&&(_.trackingContext=this),this.trackAndCompute()&&du(this),_.trackingContext=i}var r=this.value_;if(Wt(r))throw r.cause;return r},e.set=function(i){if(this.setter_){this.isRunningSetter_&&D(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter_=!1}}else D(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,r=this.dependenciesState_===I.NOT_TRACKING_,a=this.computeValue_(!0),s=r||Wt(i)||Wt(a)||!this.equals_(i,a);return s&&(this.value_=a),s},e.computeValue_=function(i){this.isComputing_=!0;var r=En(!1),a;if(i)a=xa(this,this.derivation,this.scope_);else if(_.disableErrorBoundaries===!0)a=this.derivation.call(this.scope_);else try{a=this.derivation.call(this.scope_)}catch(s){a=new on(s)}return Fn(r),this.isComputing_=!1,a},e.suspend_=function(){this.keepAlive_||(hi(this),this.value_=void 0)},e.observe_=function(i,r){var a=this,s=!0,o=void 0;return za(function(){var l=a.get();if(!s||r){var u=De();i({observableKind:"computed",debugObjectName:a.name_,type:he,object:a,newValue:l,oldValue:o}),ke(u)}s=!1,o=l})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return ka(this.get())},e[Ta]=function(){return this.valueOf()},t}(),Cn=Le("ComputedValue",Je),I;(function(t){t[t.NOT_TRACKING_=-1]="NOT_TRACKING_",t[t.UP_TO_DATE_=0]="UP_TO_DATE_",t[t.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",t[t.STALE_=2]="STALE_"})(I||(I={}));var sn;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(sn||(sn={}));var on=function(e){this.cause=void 0,this.cause=e};function Wt(t){return t instanceof on}function mi(t){switch(t.dependenciesState_){case I.UP_TO_DATE_:return!1;case I.NOT_TRACKING_:case I.STALE_:return!0;case I.POSSIBLY_STALE_:{for(var e=Li(!0),n=De(),i=t.observing_,r=i.length,a=0;a<r;a++){var s=i[a];if(Cn(s)){if(_.disableErrorBoundaries)s.get();else try{s.get()}catch{return ke(n),ht(e),!0}if(t.dependenciesState_===I.STALE_)return ke(n),ht(e),!0}}return Pa(t),ke(n),ht(e),!1}}}function xa(t,e,n){var i=Li(!0);Pa(t),t.newObserving_=new Array(t.runId_===0?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++_.runId;var r=_.trackingDerivation;_.trackingDerivation=t,_.inBatch++;var a;if(_.disableErrorBoundaries===!0)a=e.call(n);else try{a=e.call(n)}catch(s){a=new on(s)}return _.inBatch--,_.trackingDerivation=r,ou(t),ht(i),a}function ou(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=I.UP_TO_DATE_,r=0,a=t.unboundDepsCount_,s=0;s<a;s++){var o=n[s];o.diffValue_===0&&(o.diffValue_=1,r!==s&&(n[r]=o),r++),o.dependenciesState_>i&&(i=o.dependenciesState_)}for(n.length=r,t.newObserving_=null,a=e.length;a--;){var l=e[a];l.diffValue_===0&&La(l,t),l.diffValue_=0}for(;r--;){var u=n[r];u.diffValue_===1&&(u.diffValue_=0,uu(u,t))}i!==I.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function hi(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)La(e[n],t);t.dependenciesState_=I.NOT_TRACKING_}function Ra(t){var e=De();try{return t()}finally{ke(e)}}function De(){var t=_.trackingDerivation;return _.trackingDerivation=null,t}function ke(t){_.trackingDerivation=t}function Li(t){var e=_.allowStateReads;return _.allowStateReads=t,e}function ht(t){_.allowStateReads=t}function Pa(t){if(t.dependenciesState_!==I.UP_TO_DATE_){t.dependenciesState_=I.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=I.UP_TO_DATE_}}var Jt=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},Yt=!0,$a=!1,_=function(){var t=xi();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Yt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new Jt().version&&(Yt=!1),Yt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Jt):(setTimeout(function(){$a||D(35)},1),new Jt)}();function lu(){if((_.pendingReactions.length||_.inBatch||_.isRunningReactions)&&D(36),$a=!0,Yt){var t=xi();--t.__mobxInstanceCount===0&&(t.__mobxGlobals=void 0),_=new Jt}}function uu(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function La(t,e){t.observers_.delete(e),t.observers_.size===0&&Da(t)}function Da(t){t.isPendingUnobservation_===!1&&(t.isPendingUnobservation_=!0,_.pendingUnobservations.push(t))}function Q(){_.inBatch++}function ee(){if(--_.inBatch===0){ja();for(var t=_.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation_=!1,n.observers_.size===0&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof Je&&n.suspend_())}_.pendingUnobservations=[]}}function Ia(t){var e=_.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved_&&_.trackingContext&&(t.isBeingObserved_=!0,t.onBO())),t.isBeingObserved_):(t.observers_.size===0&&_.inBatch>0&&Da(t),!1)}function Va(t){t.lowestObserverState_!==I.STALE_&&(t.lowestObserverState_=I.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===I.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=I.STALE_}))}function du(t){t.lowestObserverState_!==I.STALE_&&(t.lowestObserverState_=I.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===I.POSSIBLY_STALE_?e.dependenciesState_=I.STALE_:e.dependenciesState_===I.UP_TO_DATE_&&(t.lowestObserverState_=I.UP_TO_DATE_)}))}function cu(t){t.lowestObserverState_===I.UP_TO_DATE_&&(t.lowestObserverState_=I.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===I.UP_TO_DATE_&&(e.dependenciesState_=I.POSSIBLY_STALE_,e.onBecomeStale_())}))}var _t=function(){function t(n,i,r,a){n===void 0&&(n="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=I.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=sn.NONE,this.name_=n,this.onInvalidate_=i,this.errorHandler_=r,this.requiresObservable_=a}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,_.pendingReactions.push(this),ja())},e.isScheduled=function(){return this.isScheduled_},e.runReaction_=function(){if(!this.isDisposed_){Q(),this.isScheduled_=!1;var i=_.trackingContext;if(_.trackingContext=this,mi(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(r){this.reportExceptionInDerivation_(r)}}_.trackingContext=i,ee()}},e.track=function(i){if(!this.isDisposed_){Q(),this.isRunning_=!0;var r=_.trackingContext;_.trackingContext=this;var a=xa(this,i,void 0);_.trackingContext=r,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&hi(this),Wt(a)&&this.reportExceptionInDerivation_(a.cause),ee()}},e.reportExceptionInDerivation_=function(i){var r=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(_.disableErrorBoundaries)throw i;var a="[mobx] uncaught error in '"+this+"'";_.suppressReactionErrors||console.error(a,i),_.globalReactionErrorHandlers.forEach(function(s){return s(i,r)})},e.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(Q(),hi(this),ee()))},e.getDisposer_=function(i){var r=this,a=function s(){r.dispose(),i==null||i.removeEventListener==null||i.removeEventListener("abort",s)};return i==null||i.addEventListener==null||i.addEventListener("abort",a),a[T]=this,a},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},t}(),fu=100,pi=function(e){return e()};function ja(){_.inBatch>0||_.isRunningReactions||pi(mu)}function mu(){_.isRunningReactions=!0;for(var t=_.pendingReactions,e=0;t.length>0;){++e===fu&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction_()}_.isRunningReactions=!1}var ln=Le("Reaction",_t);function hu(t){var e=pi;pi=function(i){return t(function(){return e(i)})}}function pt(){return!1}function pu(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var Ua="action",gu="action.bound",Ma="autoAction",vu="autoAction.bound",ku="<unnamed action>",gi=$t(Ua),yu=$t(gu,{bound:!0}),vi=$t(Ma,{autoAction:!0}),bu=$t(vu,{autoAction:!0,bound:!0});function Ba(t){var e=function(i,r){if(se(i))return Oe(i.name||ku,i,t);if(se(r))return Oe(i,r,t);if(Rt(r))return(t?vi:gi).decorate_20223_(i,r);if(Re(r))return tt(i,r,t?vi:gi);if(Re(i))return me($t(t?Ma:Ua,{name:i,autoAction:t}))};return e}var ue=Ba(!1);Object.assign(ue,gi);var St=Ba(!0);Object.assign(St,vi);ue.bound=me(yu);St.bound=me(bu);function Tn(t){return se(t)&&t.isMobxAction===!0}function za(t,e){var n,i,r,a,s;e===void 0&&(e=fa);var o=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",l=!e.scheduler&&!e.delay,u;if(l)u=new _t(o,function(){this.track(f)},e.onError,e.requiresObservable);else{var d=Su(e),c=!1;u=new _t(o,function(){c||(c=!0,d(function(){c=!1,u.isDisposed_||u.track(f)}))},e.onError,e.requiresObservable)}function f(){t(u)}return(r=e)!=null&&(a=r.signal)!=null&&a.aborted||u.schedule_(),u.getDisposer_((s=e)==null?void 0:s.signal)}var _u=function(e){return e()};function Su(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:_u}var Nu="onBO",Au="onBUO";function wu(t,e,n){return Ga(Nu,t,e,n)}function Ha(t,e,n){return Ga(Au,t,e,n)}function Ga(t,e,n,i){var r=cn(e),a=se(i)?i:n,s=t+"L";return r[s]?r[s].add(a):r[s]=new Set([a]),function(){var o=r[s];o&&(o.delete(a),o.size===0&&delete r[s])}}var Ou="never",Gt="always",Eu="observed";function Fu(t){t.isolateGlobalState===!0&&lu();var e=t.useProxies,n=t.enforceActions;if(e!==void 0&&(_.useProxies=e===Gt?!0:e===Ou?!1:typeof Proxy!="undefined"),e==="ifavailable"&&(_.verifyProxies=!0),n!==void 0){var i=n===Gt?Gt:n===Eu;_.enforceActions=i,_.allowStateChanges=!(i===!0||i===Gt)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(r){r in t&&(_[r]=!!t[r])}),_.allowStateReads=!_.observableRequiresReaction,t.reactionScheduler&&hu(t.reactionScheduler)}function Cu(t,e,n,i){var r=ll(e);return Ve(function(){var a=it(t,i)[T];An(r).forEach(function(s){a.extend_(s,r[s],n&&s in n?n[s]:!0)})}),t}function Tu(t,e){return Ka(cn(t,e))}function Ka(t){var e={name:t.name_};return t.observing_&&t.observing_.length>0&&(e.dependencies=xu(t.observing_).map(Ka)),e}function xu(t){return Array.from(new Set(t))}var Ru=0;function qa(){this.message="FLOW_CANCELLED"}qa.prototype=Object.create(Error.prototype);var Wn=Sa("flow"),Pu=Sa("flow.bound",{bound:!0}),Ye=Object.assign(function(e,n){if(Rt(n))return Wn.decorate_20223_(e,n);if(Re(n))return tt(e,n,Wn);var i=e,r=i.name||"<unnamed flow>",a=function(){var o=this,l=arguments,u=++Ru,d=ue(r+" - runid: "+u+" - init",i).apply(o,l),c,f=void 0,k=new Promise(function(p,m){var S=0;c=m;function y(F){f=void 0;var P;try{P=ue(r+" - runid: "+u+" - yield "+S++,d.next).call(d,F)}catch(j){return m(j)}U(P)}function x(F){f=void 0;var P;try{P=ue(r+" - runid: "+u+" - yield "+S++,d.throw).call(d,F)}catch(j){return m(j)}U(P)}function U(F){if(se(F==null?void 0:F.then)){F.then(U,m);return}return F.done?p(F.value):(f=Promise.resolve(F.value),f.then(y,x))}y(void 0)});return k.cancel=ue(r+" - runid: "+u+" - cancel",function(){try{f&&lr(f);var p=d.return(void 0),m=Promise.resolve(p.value);m.then(Ke,Ke),lr(m),c(new qa)}catch(S){c(S)}}),k};return a.isMobXFlow=!0,a},Wn);Ye.bound=me(Pu);function lr(t){se(t.cancel)&&t.cancel()}function Nt(t){return(t==null?void 0:t.isMobXFlow)===!0}function $u(t,e){return t?Rn(t)||!!t[T]||Pi(t)||ln(t)||Cn(t):!1}function Wa(t){return $u(t)}function ge(t,e){e===void 0&&(e=void 0),Q();try{return t.apply(e)}finally{ee()}}function Lu(t,e,n){return arguments.length===1||e&&typeof e=="object"?Du(t,e):Ja(t,e,{})}function Ja(t,e,n){var i;if(typeof n.timeout=="number"){var r=new Error("WHEN_TIMEOUT");i=setTimeout(function(){if(!s[T].isDisposed_)if(s(),n.onError)n.onError(r);else throw r},n.timeout)}n.name="When";var a=Oe("When-effect",e),s=za(function(o){var l=su(!1,t);l&&(o.dispose(),i&&clearTimeout(i),a())},n);return s}function Du(t,e){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var i,r,a=new Promise(function(s,o){var l,u=Ja(t,s,we({},e,{onError:o}));i=function(){u(),o(new Error("WHEN_CANCELLED"))},r=function(){u(),o(new Error("WHEN_ABORTED"))},e==null||(l=e.signal)==null||l.addEventListener==null||l.addEventListener("abort",r)}).finally(function(){var s;return e==null||(s=e.signal)==null||s.removeEventListener==null?void 0:s.removeEventListener("abort",r)});return a.cancel=i,a}function Me(t){return t[T]}var Iu={has:function(e,n){return Me(e).has_(n)},get:function(e,n){return Me(e).get_(n)},set:function(e,n,i){var r;return Re(n)?(r=Me(e).set_(n,i,!0))!=null?r:!0:!1},deleteProperty:function(e,n){var i;return Re(n)?(i=Me(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var r;return(r=Me(e).defineProperty_(n,i))!=null?r:!0},ownKeys:function(e){return Me(e).ownKeys_()},preventExtensions:function(e){D(13)}};function Vu(t,e){var n,i;return ma(),t=it(t,e),(i=(n=t[T]).proxy_)!=null?i:n.proxy_=new Proxy(t,Iu)}function X(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function Lt(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),ha(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function Z(t,e){var n=De();try{for(var i=[].concat(t.interceptors_||[]),r=0,a=i.length;r<a&&(e=i[r](e),e&&!e.type&&D(14),!!e);r++);return e}finally{ke(n)}}function re(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function Dt(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),ha(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function ae(t,e){var n=De(),i=t.changeListeners_;if(i){i=i.slice();for(var r=0,a=i.length;r<a;r++)i[r](e);ke(n)}}function Ya(t,e,n){return Ve(function(){var i,r=it(t,n)[T];(i=e)!=null||(e=ml(t)),An(e).forEach(function(a){return r.make_(a,e[a])})}),t}var ur="splice",he="update",ju=1e4,Uu={get:function(e,n){var i=e[T];return n===T?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):ve(un,n)?un[n]:e[n]},set:function(e,n,i){var r=e[T];return n==="length"&&r.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:r.set_(parseInt(n),i),!0},preventExtensions:function(){D(15)}},Di=function(){function t(n,i,r,a){n===void 0&&(n="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=r,this.legacyMode_=a,this.atom_=new Pt(n),this.enhancer_=function(s,o){return i(s,o,"ObservableArray[..]")}}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.dehanceValues_=function(i){return this.dehancer!==void 0&&i.length>0?i.map(this.dehancer):i},e.intercept_=function(i){return Lt(this,i)},e.observe_=function(i,r){return r===void 0&&(r=!1),r&&i({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Dt(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&D("Out of range: "+i);var r=this.values_.length;if(i!==r)if(i>r){for(var a=new Array(i-r),s=0;s<i-r;s++)a[s]=void 0;this.spliceWithArray_(r,0,a)}else this.spliceWithArray_(i,r-i)},e.updateArrayLength_=function(i,r){i!==this.lastKnownLength_&&D(16),this.lastKnownLength_+=r,this.legacyMode_&&r>0&&os(i+r+1)},e.spliceWithArray_=function(i,r,a){var s=this;this.atom_;var o=this.values_.length;if(i===void 0?i=0:i>o?i=o:i<0&&(i=Math.max(0,o+i)),arguments.length===1?r=o-i:r==null?r=0:r=Math.max(0,Math.min(r,o-i)),a===void 0&&(a=ui),X(this)){var l=Z(this,{object:this.proxy_,type:ur,index:i,removedCount:r,added:a});if(!l)return ui;r=l.removedCount,a=l.added}if(a=a.length===0?a:a.map(function(c){return s.enhancer_(c,void 0)}),this.legacyMode_){var u=a.length-r;this.updateArrayLength_(o,u)}var d=this.spliceItemsIntoValues_(i,r,a);return(r!==0||a.length!==0)&&this.notifyArraySplice_(i,a,d),this.dehanceValues_(d)},e.spliceItemsIntoValues_=function(i,r,a){if(a.length<ju){var s;return(s=this.values_).splice.apply(s,[i,r].concat(a))}else{var o=this.values_.slice(i,i+r),l=this.values_.slice(i+r);this.values_.length+=a.length-r;for(var u=0;u<a.length;u++)this.values_[i+u]=a[u];for(var d=0;d<l.length;d++)this.values_[i+a.length+d]=l[d];return o}},e.notifyArrayChildUpdate_=function(i,r,a){var s=!this.owned_&&pt(),o=re(this),l=o||s?{observableKind:"array",object:this.proxy_,type:he,debugObjectName:this.atom_.name_,index:i,newValue:r,oldValue:a}:null;this.atom_.reportChanged(),o&&ae(this,l)},e.notifyArraySplice_=function(i,r,a){var s=!this.owned_&&pt(),o=re(this),l=o||s?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:ur,index:i,removed:a,added:r,removedCount:a.length,addedCount:r.length}:null;this.atom_.reportChanged(),o&&ae(this,l)},e.get_=function(i){if(this.legacyMode_&&i>=this.values_.length){console.warn("[mobx] Out of bounds read: "+i);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[i])},e.set_=function(i,r){var a=this.values_;if(this.legacyMode_&&i>a.length&&D(17,i,a.length),i<a.length){this.atom_;var s=a[i];if(X(this)){var o=Z(this,{type:he,object:this.proxy_,index:i,newValue:r});if(!o)return;r=o.newValue}r=this.enhancer_(r,s);var l=r!==s;l&&(a[i]=r,this.notifyArrayChildUpdate_(i,r,s))}else{for(var u=new Array(i+1-a.length),d=0;d<u.length-1;d++)u[d]=void 0;u[u.length-1]=r,this.spliceWithArray_(a.length,0,u)}},t}();function Mu(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),ma(),Ve(function(){var r=new Di(n,e,i,!1);ga(r.values_,T,r);var a=new Proxy(r.values_,Uu);return r.proxy_=a,t&&t.length&&r.spliceWithArray_(0,0,t),a})}var un={clear:function(){return this.splice(0)},replace:function(e){var n=this[T];return n.spliceWithArray_(0,n.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),a=2;a<i;a++)r[a-2]=arguments[a];var s=this[T];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(e);case 2:return s.spliceWithArray_(e,n)}return s.spliceWithArray_(e,n,r)},spliceWithArray:function(e,n,i){return this[T].spliceWithArray_(e,n,i)},push:function(){for(var e=this[T],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,i),e.values_.length},pop:function(){return this.splice(Math.max(this[T].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[T],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(0,0,i),e.values_.length},reverse:function(){return _.trackingDerivation&&D(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){_.trackingDerivation&&D(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[T],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};B("at",Y);B("concat",Y);B("flat",Y);B("includes",Y);B("indexOf",Y);B("join",Y);B("lastIndexOf",Y);B("slice",Y);B("toString",Y);B("toLocaleString",Y);B("toSorted",Y);B("toSpliced",Y);B("with",Y);B("every",oe);B("filter",oe);B("find",oe);B("findIndex",oe);B("findLast",oe);B("findLastIndex",oe);B("flatMap",oe);B("forEach",oe);B("map",oe);B("some",oe);B("toReversed",oe);B("reduce",Xa);B("reduceRight",Xa);function B(t,e){typeof Array.prototype[t]=="function"&&(un[t]=e(t))}function Y(t){return function(){var e=this[T];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function oe(t){return function(e,n){var i=this,r=this[T];r.atom_.reportObserved();var a=r.dehanceValues_(r.values_);return a[t](function(s,o){return e.call(n,s,o,i)})}}function Xa(t){return function(){var e=this,n=this[T];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),r=arguments[0];return arguments[0]=function(a,s,o){return r(a,s,o,e)},i[t].apply(i,arguments)}}var Bu=Le("ObservableArrayAdministration",Di);function xn(t){return Sn(t)&&Bu(t[T])}var Za,Qa,zu={},Se="add",dn="delete";Za=Symbol.iterator;Qa=Symbol.toStringTag;var es=function(){function t(n,i,r){var a=this;i===void 0&&(i=Pe),r===void 0&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[T]=zu,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=i,this.name_=r,se(Map)||D(18),Ve(function(){a.keysAtom_=ba("ObservableMap.keys()"),a.data_=new Map,a.hasMap_=new Map,n&&a.merge(n)})}var e=t.prototype;return e.has_=function(i){return this.data_.has(i)},e.has=function(i){var r=this;if(!_.trackingDerivation)return this.has_(i);var a=this.hasMap_.get(i);if(!a){var s=a=new Te(this.has_(i),wn,"ObservableMap.key?",!1);this.hasMap_.set(i,s),Ha(s,function(){return r.hasMap_.delete(i)})}return a.get()},e.set=function(i,r){var a=this.has_(i);if(X(this)){var s=Z(this,{type:a?he:Se,object:this,newValue:r,name:i});if(!s)return this;r=s.newValue}return a?this.updateValue_(i,r):this.addValue_(i,r),this},e.delete=function(i){var r=this;if(this.keysAtom_,X(this)){var a=Z(this,{type:dn,object:this,name:i});if(!a)return!1}if(this.has_(i)){var s=pt(),o=re(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:dn,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return ge(function(){var u;r.keysAtom_.reportChanged(),(u=r.hasMap_.get(i))==null||u.setNewValue_(!1);var d=r.data_.get(i);d.setNewValue_(void 0),r.data_.delete(i)}),o&&ae(this,l),!0}return!1},e.updateValue_=function(i,r){var a=this.data_.get(i);if(r=a.prepareNewValue_(r),r!==_.UNCHANGED){var s=pt(),o=re(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:he,object:this,oldValue:a.value_,name:i,newValue:r}:null;a.setNewValue_(r),o&&ae(this,l)}},e.addValue_=function(i,r){var a=this;this.keysAtom_,ge(function(){var u,d=new Te(r,a.enhancer_,"ObservableMap.key",!1);a.data_.set(i,d),r=d.value_,(u=a.hasMap_.get(i))==null||u.setNewValue_(!0),a.keysAtom_.reportChanged()});var s=pt(),o=re(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:Se,object:this,name:i,newValue:r}:null;o&&ae(this,l)},e.get=function(i){return this.has(i)?this.dehanceValue_(this.data_.get(i).get()):this.dehanceValue_(void 0)},e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},e.values=function(){var i=this,r=this.keys();return At({next:function(){var s=r.next(),o=s.done,l=s.value;return{done:o,value:o?void 0:i.get(l)}}})},e.entries=function(){var i=this,r=this.keys();return At({next:function(){var s=r.next(),o=s.done,l=s.value;return{done:o,value:o?void 0:[l,i.get(l)]}}})},e[Za]=function(){return this.entries()},e.forEach=function(i,r){for(var a=qe(this),s;!(s=a()).done;){var o=s.value,l=o[0],u=o[1];i.call(r,u,l,this)}},e.merge=function(i){var r=this;return Ie(i)&&(i=new Map(i)),ge(function(){Ae(i)?ol(i).forEach(function(a){return r.set(a,i[a])}):Array.isArray(i)?i.forEach(function(a){var s=a[0],o=a[1];return r.set(s,o)}):et(i)?(i.constructor!==Map&&D(19,i),i.forEach(function(a,s){return r.set(s,a)})):i!=null&&D(20,i)}),this},e.clear=function(){var i=this;ge(function(){Ra(function(){for(var r=qe(i.keys()),a;!(a=r()).done;){var s=a.value;i.delete(s)}})})},e.replace=function(i){var r=this;return ge(function(){for(var a=Hu(i),s=new Map,o=!1,l=qe(r.data_.keys()),u;!(u=l()).done;){var d=u.value;if(!a.has(d)){var c=r.delete(d);if(c)o=!0;else{var f=r.data_.get(d);s.set(d,f)}}}for(var k=qe(a.entries()),p;!(p=k()).done;){var m=p.value,S=m[0],y=m[1],x=r.data_.has(S);if(r.set(S,y),r.data_.has(S)){var U=r.data_.get(S);s.set(S,U),x||(o=!0)}}if(!o)if(r.data_.size!==s.size)r.keysAtom_.reportChanged();else for(var F=r.data_.keys(),P=s.keys(),j=F.next(),M=P.next();!j.done;){if(j.value!==M.value){r.keysAtom_.reportChanged();break}j=F.next(),M=P.next()}r.data_=s}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,r){return Dt(this,i)},e.intercept_=function(i){return Lt(this,i)},Ri(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Qa,get:function(){return"Map"}}]),t}(),Ie=Le("ObservableMap",es);function Hu(t){if(et(t)||Ie(t))return t;if(Array.isArray(t))return new Map(t);if(Ae(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return D(21,t)}var ts,ns,Gu={};ts=Symbol.iterator;ns=Symbol.toStringTag;var is=function(){function t(n,i,r){var a=this;i===void 0&&(i=Pe),r===void 0&&(r="ObservableSet"),this.name_=void 0,this[T]=Gu,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,se(Set)||D(22),this.enhancer_=function(s,o){return i(s,o,r)},Ve(function(){a.atom_=ba(a.name_),n&&a.replace(n)})}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.clear=function(){var i=this;ge(function(){Ra(function(){for(var r=qe(i.data_.values()),a;!(a=r()).done;){var s=a.value;i.delete(s)}})})},e.forEach=function(i,r){for(var a=qe(this),s;!(s=a()).done;){var o=s.value;i.call(r,o,o,this)}},e.add=function(i){var r=this;if(this.atom_,X(this)){var a=Z(this,{type:Se,object:this,newValue:i});if(!a)return this}if(!this.has(i)){ge(function(){r.data_.add(r.enhancer_(i,void 0)),r.atom_.reportChanged()});var s=!1,o=re(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:Se,object:this,newValue:i}:null;o&&ae(this,l)}return this},e.delete=function(i){var r=this;if(X(this)){var a=Z(this,{type:dn,object:this,oldValue:i});if(!a)return!1}if(this.has(i)){var s=!1,o=re(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:dn,object:this,oldValue:i}:null;return ge(function(){r.atom_.reportChanged(),r.data_.delete(i)}),o&&ae(this,l),!0}return!1},e.has=function(i){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(i))},e.entries=function(){var i=0,r=Array.from(this.keys()),a=Array.from(this.values());return At({next:function(){var o=i;return i+=1,o<a.length?{value:[r[o],a[o]],done:!1}:{done:!0}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var i=this,r=0,a=Array.from(this.data_.values());return At({next:function(){return r<a.length?{value:i.dehanceValue_(a[r++]),done:!1}:{done:!0}}})},e.replace=function(i){var r=this;return nt(i)&&(i=new Set(i)),ge(function(){Array.isArray(i)?(r.clear(),i.forEach(function(a){return r.add(a)})):xt(i)?(r.clear(),i.forEach(function(a){return r.add(a)})):i!=null&&D("Cannot initialize set from "+i)}),this},e.observe_=function(i,r){return Dt(this,i)},e.intercept_=function(i){return Lt(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[ts]=function(){return this.values()},Ri(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:ns,get:function(){return"Set"}}]),t}(),nt=Le("ObservableSet",is),dr=Object.create(null),cr="remove",rs=function(){function t(n,i,r,a){i===void 0&&(i=new Map),a===void 0&&(a=jl),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=n,this.values_=i,this.name_=r,this.defaultAnnotation_=a,this.keysAtom_=new Pt("ObservableObject.keys"),this.isPlainObject_=Ae(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(i){return this.values_.get(i).get()},e.setObservablePropValue_=function(i,r){var a=this.values_.get(i);if(a instanceof Je)return a.set(r),!0;if(X(this)){var s=Z(this,{type:he,object:this.proxy_||this.target_,name:i,newValue:r});if(!s)return null;r=s.newValue}if(r=a.prepareNewValue_(r),r!==_.UNCHANGED){var o=re(this),l=!1,u=o||l?{type:he,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:i,newValue:r}:null;a.setNewValue_(r),o&&ae(this,u)}return!0},e.get_=function(i){return _.trackingDerivation&&!ve(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,r,a){return a===void 0&&(a=!1),ve(this.target_,i)?this.values_.has(i)?this.setObservablePropValue_(i,r):a?Reflect.set(this.target_,i,r):(this.target_[i]=r,!0):this.extend_(i,{value:r,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,a)},e.has_=function(i){if(!_.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var r=this.pendingKeys_.get(i);return r||(r=new Te(i in this.target_,wn,"ObservableObject.key?",!1),this.pendingKeys_.set(i,r)),r.get()},e.make_=function(i,r){if(r===!0&&(r=this.defaultAnnotation_),r!==!1){if(!(i in this.target_)){var a;if((a=this.target_[le])!=null&&a[i])return;D(1,r.annotationType_,this.name_+"."+i.toString())}for(var s=this.target_;s&&s!==_n;){var o=nn(s,i);if(o){var l=r.make_(this,i,o,s);if(l===0)return;if(l===1)break}s=Object.getPrototypeOf(s)}mr(this,r,i)}},e.extend_=function(i,r,a,s){if(s===void 0&&(s=!1),a===!0&&(a=this.defaultAnnotation_),a===!1)return this.defineProperty_(i,r,s);var o=a.extend_(this,i,r,s);return o&&mr(this,a,i),o},e.defineProperty_=function(i,r,a){a===void 0&&(a=!1),this.keysAtom_;try{Q();var s=this.delete_(i);if(!s)return s;if(X(this)){var o=Z(this,{object:this.proxy_||this.target_,name:i,type:Se,newValue:r.value});if(!o)return null;var l=o.newValue;r.value!==l&&(r=we({},r,{value:l}))}if(a){if(!Reflect.defineProperty(this.target_,i,r))return!1}else fe(this.target_,i,r);this.notifyPropertyAddition_(i,r.value)}finally{ee()}return!0},e.defineObservableProperty_=function(i,r,a,s){s===void 0&&(s=!1),this.keysAtom_;try{Q();var o=this.delete_(i);if(!o)return o;if(X(this)){var l=Z(this,{object:this.proxy_||this.target_,name:i,type:Se,newValue:r});if(!l)return null;r=l.newValue}var u=fr(i),d={configurable:_.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:u.get,set:u.set};if(s){if(!Reflect.defineProperty(this.target_,i,d))return!1}else fe(this.target_,i,d);var c=new Te(r,a,"ObservableObject.key",!1);this.values_.set(i,c),this.notifyPropertyAddition_(i,c.value_)}finally{ee()}return!0},e.defineComputedProperty_=function(i,r,a){a===void 0&&(a=!1),this.keysAtom_;try{Q();var s=this.delete_(i);if(!s)return s;if(X(this)){var o=Z(this,{object:this.proxy_||this.target_,name:i,type:Se,newValue:void 0});if(!o)return null}r.name||(r.name="ObservableObject.key"),r.context=this.proxy_||this.target_;var l=fr(i),u={configurable:_.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:l.get,set:l.set};if(a){if(!Reflect.defineProperty(this.target_,i,u))return!1}else fe(this.target_,i,u);this.values_.set(i,new Je(r)),this.notifyPropertyAddition_(i,void 0)}finally{ee()}return!0},e.delete_=function(i,r){if(r===void 0&&(r=!1),this.keysAtom_,!ve(this.target_,i))return!0;if(X(this)){var a=Z(this,{object:this.proxy_||this.target_,name:i,type:cr});if(!a)return null}try{var s,o;Q();var l=re(this),u=!1,d=this.values_.get(i),c=void 0;if(!d&&(l||u)){var f;c=(f=nn(this.target_,i))==null?void 0:f.value}if(r){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(d&&(this.values_.delete(i),d instanceof Te&&(c=d.value_),Va(d)),this.keysAtom_.reportChanged(),(s=this.pendingKeys_)==null||(o=s.get(i))==null||o.set(i in this.target_),l||u){var k={type:cr,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:c,name:i};l&&ae(this,k)}}finally{ee()}return!0},e.observe_=function(i,r){return Dt(this,i)},e.intercept_=function(i){return Lt(this,i)},e.notifyPropertyAddition_=function(i,r){var a,s,o=re(this),l=!1;if(o||l){var u=o||l?{type:Se,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:r}:null;o&&ae(this,u)}(a=this.pendingKeys_)==null||(s=a.get(i))==null||s.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),An(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function it(t,e){var n;if(ve(t,T))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",r=new rs(t,new Map,String(i),Yl(e));return Nn(t,T,r),t}var Ku=Le("ObservableObjectAdministration",rs);function fr(t){return dr[t]||(dr[t]={get:function(){return this[T].getObservablePropValue_(t)},set:function(n){return this[T].setObservablePropValue_(t,n)}})}function Rn(t){return Sn(t)?Ku(t[T]):!1}function mr(t,e,n){var i;(i=t.target_[le])==null||delete i[n]}var qu=ss(0),Wu=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),Jn=0,as=function(){};function Ju(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}Ju(as,Array.prototype);var Ii=function(t,e,n){ya(i,t);function i(a,s,o,l){var u;return o===void 0&&(o="ObservableArray"),l===void 0&&(l=!1),u=t.call(this)||this,Ve(function(){var d=new Di(o,s,l,!0);d.proxy_=qn(u),ga(qn(u),T,d),a&&a.length&&u.spliceWithArray(0,0,a),Wu&&Object.defineProperty(qn(u),"0",qu)}),u}var r=i.prototype;return r.concat=function(){this[T].atom_.reportObserved();for(var s=arguments.length,o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];return Array.prototype.concat.apply(this.slice(),o.map(function(u){return xn(u)?u.slice():u}))},r[n]=function(){var a=this,s=0;return At({next:function(){return s<a.length?{value:a[s++],done:!1}:{done:!0,value:void 0}}})},Ri(i,[{key:"length",get:function(){return this[T].getArrayLength_()},set:function(s){this[T].setArrayLength_(s)}},{key:e,get:function(){return"Array"}}]),i}(as,Symbol.toStringTag,Symbol.iterator);Object.entries(un).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&Nn(Ii.prototype,e,n)});function ss(t){return{enumerable:!1,configurable:!0,get:function(){return this[T].get_(t)},set:function(n){this[T].set_(t,n)}}}function Yu(t){fe(Ii.prototype,""+t,ss(t))}function os(t){if(t>Jn){for(var e=Jn;e<t+100;e++)Yu(e);Jn=t}}os(1e3);function Xu(t,e,n){return new Ii(t,e,n)}function cn(t,e){if(typeof t=="object"&&t!==null){if(xn(t))return e!==void 0&&D(23),t[T].atom_;if(nt(t))return t.atom_;if(Ie(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||D(25,e,ki(t)),n}if(Rn(t)){if(!e)return D(26);var i=t[T].values_.get(e);return i||D(27,e,ki(t)),i}if(Pi(t)||Cn(t)||ln(t))return t}else if(se(t)&&ln(t[T]))return t[T];D(28)}function Zu(t,e){if(t||D(29),Pi(t)||Cn(t)||ln(t)||Ie(t)||nt(t))return t;if(t[T])return t[T];D(24,t)}function ki(t,e){var n;if(e!==void 0)n=cn(t,e);else{if(Tn(t))return t.name;Rn(t)||Ie(t)||nt(t)?n=Zu(t):n=cn(t)}return n.name_}function Ve(t){var e=De(),n=En(!0);Q();try{return t()}finally{ee(),Fn(n),ke(e)}}var hr=_n.toString;function Vi(t,e,n){return n===void 0&&(n=-1),yi(t,e,n)}function yi(t,e,n,i,r){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var a=typeof t;if(a!=="function"&&a!=="object"&&typeof e!="object")return!1;var s=hr.call(t);if(s!==hr.call(e))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":n>=0&&n++;break}t=pr(t),e=pr(e);var o=s==="[object Array]";if(!o){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(se(l)&&l instanceof l&&se(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],r=r||[];for(var d=i.length;d--;)if(i[d]===t)return r[d]===e;if(i.push(t),r.push(e),o){if(d=t.length,d!==e.length)return!1;for(;d--;)if(!yi(t[d],e[d],n-1,i,r))return!1}else{var c=Object.keys(t),f;if(d=c.length,Object.keys(e).length!==d)return!1;for(;d--;)if(f=c[d],!(ve(e,f)&&yi(t[f],e[f],n-1,i,r)))return!1}return i.pop(),r.pop(),!0}function pr(t){return xn(t)?t.slice():et(t)||Ie(t)||xt(t)||nt(t)?Array.from(t.entries()):t}function At(t){return t[Symbol.iterator]=Qu,t}function Qu(){return this}["Symbol","Map","Set"].forEach(function(t){var e=xi();typeof e[t]=="undefined"&&D("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:pu,extras:{getDebugName:ki},$mobx:T});class ls{constructor(e,n){w(this,"logger");w(this,"channel");w(this,"listeners",new Map);w(this,"eventQueue",new Map);this.logger=Ee.withPrefix(n,"EventBus");try{this.logger.debug(`Creating BroadcastChannel with name "${e}"`),this.channel=new BroadcastChannel(e),this.channel.onmessage=i=>this.handleMessage(i),this.channel.onmessageerror=i=>this.logger.error("NizzaBroadcastChannel error:",i)}catch(i){throw this.logger.error("Failed to create NizzaBroadcastChannel:",i),i}}on(e,n){return this.logger.debug(`Subscribing to pattern "${e}"`),this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.logger.debug(`Emitting event "${e}" with data`,n),this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;this.logger.debug(`Received message "${i}" with data`,n);for(const[r,a]of this.listeners.entries())this.matchWildcard(r,i)&&(this.logger.debug(`Matching pattern "${r}" for event "${i}"`),a.forEach(s=>s({...n,wildcard:r})))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const r=new Error("Invalid arguments");throw this.logger.error(r),r}this.listeners.has(e)||(this.logger.debug(`Adding new pattern "${e}"`),this.listeners.set(e,new Set));const i=Array.from(this.eventQueue).filter(([r])=>{const a=this.matchWildcard(e,r);return a&&(this.eventQueue.delete(r),this.logger.debug(`Dequeued pending events for "${r}".`)),a}).flatMap(([,r])=>r);for(const[r,a]of this.listeners.entries())this.matchWildcard(r,e)&&(this.logger.debug(`Adding listener to pattern "${r}"`),a.add(n),i.length&&(this.logger.debug(`Delivering pending events for "${e}".`),i.forEach(s=>{n({...s,wildcard:r})})))}emitEvent(e,n,i){if(typeof e!="string"){const s=new Error("Invalid arguments");throw this.logger.error(s),s}const r={name:e,data:n,attrs:i},a=Array.from(this.getMatchingListeners(e));if(a.length){this.logger.debug(`Delivering event "${e}" to listeners`);for(const[s,o]of a)o({...r,wildcard:s})}else this.logger.debug(`No listeners for event "${e}", enqueuing`),this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(r);this.logger.debug("Posting message to channel",r),this.channel.postMessage(r)}*getMatchingListeners(e){this.logger.debug(`Getting matching listeners for event "${e}"`);for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,e))for(const r of i)yield[n,r]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){this.logger.debug(`Unsubscribing from event "${e}"`);const i=this.listeners.get(e);i.delete(n),i.size===0&&(this.logger.debug(`No more listeners for event "${e}", deleting`),this.listeners.delete(e))}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*"),a=new RegExp(`^${i}$`).test(n);return this.logger.debug(`Wildcard "${e}" matches with pattern "${n}": ${a}`),a}}const ed="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let td=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=ed[n[t]&63];return e};const us=(t=8)=>td(t),nd=t=>{const e=Object.entries(t).reduce((n,[i,r])=>r!==void 0?`${n}${n?"&":""}${i}=${r}`:n,"");return e?`?${e}`:""},ds=t=>{const e=document.getElementById(t);return e?new URL(e.src).searchParams:new URLSearchParams};function id(){const t=new Error().stack.split(`
4
- `);return t.length<3?"":t[2].trim().substring(3)}function rd(t){return new Promise(e=>setTimeout(e,t))}var cs=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function fs(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ms={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(cs,function(){var e=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],a={},s=null;function o(m,S){var y=m[S];if(typeof y.bind=="function")return y.bind(m);try{return Function.prototype.bind.call(y,m)}catch{return function(){return Function.prototype.apply.apply(y,[m,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(m){return m==="debug"&&(m="log"),typeof console===n?!1:m==="trace"&&i?l:console[m]!==void 0?o(console,m):console.log!==void 0?o(console,"log"):e}function d(){for(var m=this.getLevel(),S=0;S<r.length;S++){var y=r[S];this[y]=S<m?e:this.methodFactory(y,m,this.name)}if(this.log=this.debug,typeof console===n&&m<this.levels.SILENT)return"No console available for logging"}function c(m){return function(){typeof console!==n&&(d.call(this),this[m].apply(this,arguments))}}function f(m,S,y){return u(m)||c.apply(this,arguments)}function k(m,S){var y=this,x,U,F,P="loglevel";typeof m=="string"?P+=":"+m:typeof m=="symbol"&&(P=void 0);function j(v){var b=(r[v]||"silent").toUpperCase();if(!(typeof window===n||!P)){try{window.localStorage[P]=b;return}catch{}try{window.document.cookie=encodeURIComponent(P)+"="+b+";"}catch{}}}function M(){var v;if(!(typeof window===n||!P)){try{v=window.localStorage[P]}catch{}if(typeof v===n)try{var b=window.document.cookie,A=encodeURIComponent(P),N=b.indexOf(A+"=");N!==-1&&(v=/^([^;]+)/.exec(b.slice(N+A.length+1))[1])}catch{}return y.levels[v]===void 0&&(v=void 0),v}}function g(){if(!(typeof window===n||!P)){try{window.localStorage.removeItem(P)}catch{}try{window.document.cookie=encodeURIComponent(P)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function O(v){var b=v;if(typeof b=="string"&&y.levels[b.toUpperCase()]!==void 0&&(b=y.levels[b.toUpperCase()]),typeof b=="number"&&b>=0&&b<=y.levels.SILENT)return b;throw new TypeError("log.setLevel() called with invalid level: "+v)}y.name=m,y.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},y.methodFactory=S||f,y.getLevel=function(){return F!=null?F:U!=null?U:x},y.setLevel=function(v,b){return F=O(v),b!==!1&&j(F),d.call(y)},y.setDefaultLevel=function(v){U=O(v),M()||y.setLevel(v,!1)},y.resetLevel=function(){F=null,g(),d.call(y)},y.enableAll=function(v){y.setLevel(y.levels.TRACE,v)},y.disableAll=function(v){y.setLevel(y.levels.SILENT,v)},y.rebuild=function(){if(s!==y&&(x=O(s.getLevel())),d.call(y),s===y)for(var v in a)a[v].rebuild()},x=O(s?s.getLevel():"WARN");var E=M();E!=null&&(F=O(E)),d.call(y)}s=new k,s.getLogger=function(S){if(typeof S!="symbol"&&typeof S!="string"||S==="")throw new TypeError("You must supply a name when creating a logger.");var y=a[S];return y||(y=a[S]=new k(S,s.methodFactory)),y};var p=typeof window!==n?window.log:void 0;return s.noConflict=function(){return typeof window!==n&&window.log===s&&(window.log=p),s},s.getLoggers=function(){return a},s.default=s,s})})(ms);var hs=ms.exports;const Yn=fs(hs);var ps={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.prefix=n(e)})(cs,function(e){var n=function(d){for(var c=1,f=arguments.length,k;c<f;c++)for(k in arguments[c])Object.prototype.hasOwnProperty.call(arguments[c],k)&&(d[k]=arguments[c][k]);return d},i={template:"[%t] %l:",levelFormatter:function(d){return d.toUpperCase()},nameFormatter:function(d){return d||"root"},timestampFormatter:function(d){return d.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},r,a={},s=function(d){if(!d||!d.getLogger)throw new TypeError("Argument is not a root logger");r=d},o=function(d,c){if(!d||!d.setLevel)throw new TypeError("Argument is not a logger");var f=d.methodFactory,k=d.name||"",p=a[k]||a[""]||i;function m(S,y,x){var U=f(S,y,x),F=a[x]||a[""],P=F.template.indexOf("%t")!==-1,j=F.template.indexOf("%l")!==-1,M=F.template.indexOf("%n")!==-1;return function(){for(var g="",O=arguments.length,E=Array(O),v=0;v<O;v++)E[v]=arguments[v];if(k||!a[x]){var b=F.timestampFormatter(new Date),A=F.levelFormatter(S),N=F.nameFormatter(x);F.format?g+=F.format(A,N,b):(g+=F.template,P&&(g=g.replace(/%t/,b)),j&&(g=g.replace(/%l/,A)),M&&(g=g.replace(/%n/,N))),E.length&&typeof E[0]=="string"?E[0]=g+" "+E[0]:E.unshift(g)}U.apply(void 0,E)}}return a[k]||(d.methodFactory=m),c=c||{},c.template&&(c.format=void 0),a[k]=n({},p,c),d.setLevel(d.getLevel()),r||d.warn("It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"),d},l={reg:s,apply:o},u;return e&&(u=e.prefix,l.noConflict=function(){return e.prefix===l&&(e.prefix=u),l}),l})})(ps);var ad=ps.exports;const gr=fs(ad);var We;let Ee=(We=class{constructor(e=""){w(this,"provider",Yn);w(this,"defaultLevel",hs.levels.INFO);this.namePrefix=e,this.namePrefix=e?`${e}-`:"",this.provider.setDefaultLevel(this.defaultLevel),gr.reg(Yn),gr.apply(Yn,{template:"%t %l [%n]",nameFormatter:n=>{var i;return(i=n==null?void 0:n.toLowerCase())!=null?i:""},timestampFormatter:()=>new Date().toTimeString().slice(0,8)})}createLogger(e){const n=`${this.namePrefix}${e.toLowerCase()}`,i=this.provider.getLogger(n),r=localStorage.getItem(`loglevel:${n}`);return i.setLevel(r||this.defaultLevel),i}static withPrefix(e,n){const i=/\(\w+\)/,r={get(a,s){const o=a[s];return typeof o=="function"&&We.LOG_METHODS.includes(s)?(...l)=>(typeof l[0]=="string"&&!i.test(l[0])&&(l[0]=`(${n}) ${l[0]}`),o.apply(a,l)):o}};return new Proxy(e,r)}},w(We,"LOG_METHODS",["trace","debug","info","warn","error","log"]),We);const ie=class ie{constructor(){w(this,"instanceId",us());w(this,"log",new Ee("nz"));w(this,"coreLogger",this.log.createLogger("core"));w(this,"_config",null);w(this,"_account");w(this,"_accountStatus","idle");w(this,"_productDataSource");w(this,"_eventBus",new ls("nizza",this.coreLogger));this.coreLogger=Ee.withPrefix(this.coreLogger,"NizzaStore"),Ya(this,{_config:K,_account:K,_productDataSource:K,config:_e,account:_e,accountName:_e,accountStatus:_e,configure:ue,setProductDataSource:ue,setAddToCartConfig:ue,setProductId:ue},{name:"NizzaStore",autoBind:!0})}static instance(){var n;if(!!((n=window==null?void 0:window.nizza)!=null&&n.store))ie._instance=window.nizza.store;else{const i=new ie;ie._instance=i}return window.nizza||(window.nizza={},window.nz={},ie._instance.coreLogger.debug("Initialized nizza window object")),window.nizza.store=ie._instance,window.nz=window.nizza,ie._instance}async configure(e){var n;try{const i=(n=this._config)==null?void 0:n.account;if(this._config=e,i!==e.account){this.setAccountStatus("loading");const r=await Qs(e.account);this.setAccount(r),this.setAccountStatus("success")}if(e.getProductDataSource){const r=await e.getProductDataSource();this.setProductDataSource(r)}}catch(i){this.setAccountStatus("error"),this.coreLogger.error("Error running configure:",i)}}setAccount(e){this._account=e}setAccountStatus(e){this._accountStatus=e}setProductDataSource(e){this._productDataSource=e}setProductId(e){this._config&&(this._config.productId=e)}setOrderFormId(e){this._config&&(this._config.orderFormId=e)}setAddToCartConfig(e){if(!this._config)throw new Error("you cannot set addToCartConfig before running configure()");this._config.addToCartConfig=e}get version(){return ie.version}get config(){return this._config}get account(){return this._account}get accountStatus(){return this._accountStatus}get accountName(){var e;return(e=this._config)==null?void 0:e.account}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};w(ie,"version","5"),w(ie,"_instance");let fn=ie;const rt=t=>{const e=fn.instance();return Lu(()=>!!e.account,()=>t==null?void 0:t(e)),e};function He(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function Xt(t){return function e(n){return arguments.length===0||He(n)?e:t.apply(this,arguments)}}function ji(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return He(n)?e:Xt(function(r){return t(n,r)});default:return He(n)&&He(i)?e:He(n)?Xt(function(r){return t(r,i)}):He(i)?Xt(function(r){return t(n,r)}):t(n,i)}}}const sd=Number.isInteger||function(e){return e<<0===e};function od(t){return Object.prototype.toString.call(t)==="[object String]"}var ld=ji(function(e,n){var i=e<0?n.length+e:e;return od(n)?n.charAt(i):n[i]}),ud=Xt(function(e){return e==null}),dd=ji(function(e,n){return e.map(function(i){for(var r=n,a=0,s;a<i.length;){if(r==null)return;s=i[a],r=sd(s)?ld(s,r):r[s],a+=1}return r})}),cd=ji(function(e,n){return dd([e],n)[0]});class It extends Error{constructor(e,n,i){super(n),this.value=i,this.name=e}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value}}}}class gs extends It{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class vs extends It{constructor(e){var n;super("APP_UNEXPECTED_ERROR",(n=e.message)!=null?n:"An unexpected error occurred.",e)}}class fd extends It{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class ks extends It{constructor(e){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
1
+ "use strict";var Ql=Object.defineProperty;var Xl=(t,e,n)=>e in t?Ql(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var w=(t,e,n)=>(Xl(t,typeof e!="symbol"?e+"":e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const B=require("react"),fs=require("react-dom"),hs=require("@tanstack/react-query"),Zl=require("react/jsx-runtime");function eu(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(i,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var Z={NZ_AWS_REGION:"us-east-1",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1,STAGE:"dev"};let tu=0;function zn(t,e){const n=`atom${++tu}`,i={toString:()=>n};return typeof t=="function"?i.read=t:(i.init=t,i.read=nu,i.write=iu),i}function nu(t){return t(this)}function iu(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const bi=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,_i=t=>"init"in t,Si=t=>!!t.write,En=new WeakMap,ru=(t,e)=>{En.set(t,e),t.catch(()=>{}).finally(()=>En.delete(t))},Qr=(t,e)=>{const n=En.get(t);n&&(En.delete(t),n(e))},Xr=(t,e)=>{t.status="fulfilled",t.value=e},Zr=(t,e)=>{t.status="rejected",t.reason=e},au=t=>typeof(t==null?void 0:t.then)=="function",_t=(t,e)=>!!t&&"v"in t&&"v"in e&&Object.is(t.v,e.v),ea=(t,e)=>!!t&&"e"in t&&"e"in e&&Object.is(t.e,e.e),Xe=t=>!!t&&"v"in t&&t.v instanceof Promise,su=(t,e)=>"v"in t&&"v"in e&&t.v.orig&&t.v.orig===e.v.orig,sn=t=>{if("e"in t)throw t.e;return t.v},ps=()=>{const t=new WeakMap,e=new WeakMap,n=[],i=new WeakMap;let r,a;(Z?"production":void 0)!=="production"&&(r=new Set,a=new Set);const s=y=>t.get(y),o=(y,C)=>{C.d.forEach((F,S)=>{var E;if(!i.has(S)){const A=s(S);(E=n[n.length-1])==null||E.add(S),i.set(S,[A,new Set]),A&&o(S,A)}i.get(S)[1].add(y)})},l=(y,C)=>{var F;(Z?"production":void 0)!=="production"&&Object.freeze(C);const S=s(y);if(t.set(y,C),i.has(y)||((F=n[n.length-1])==null||F.add(y),i.set(y,[S,new Set]),o(y,C)),Xe(S)){const E="v"in C?C.v instanceof Promise?C.v:Promise.resolve(C.v):Promise.reject(C.e);S.v!==E&&Qr(S.v,E)}},u=(y,C,F,S)=>{const E=new Map(S?C.d:null);let A=!1;F.forEach((h,g)=>{!h&&bi(y,g)&&(h=C),h?(E.set(g,h),C.d.get(g)!==h&&(A=!0)):(Z?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(A||C.d.size!==E.size)&&(C.d=E)},c=(y,C,F,S)=>{const E=s(y),A={d:(E==null?void 0:E.d)||new Map,v:C};if(F&&u(y,A,F,S),_t(E,A)&&E.d===A.d)return E;if(Xe(E)&&Xe(A)&&su(E,A)){if(E.d===A.d)return E;A.v=E.v}return l(y,A),A},d=(y,C,F,S)=>{if(au(C)){let E;const A=()=>{const g=s(y);if(!Xe(g)||g.v!==h)return;const x=c(y,h,F);e.has(y)&&g.d!==x.d&&L(y,x,g.d)},h=new Promise((g,x)=>{let I=!1;C.then(D=>{I||(I=!0,Xr(h,D),g(D),A())},D=>{I||(I=!0,Zr(h,D),x(D),A())}),E=D=>{I||(I=!0,D.then(j=>Xr(h,j),j=>Zr(h,j)),g(D))}});return h.orig=C,h.status="pending",ru(h,g=>{g&&E(g),S==null||S()}),c(y,h,F,!0)}return c(y,C,F)},f=(y,C,F)=>{const S=s(y),E={d:(S==null?void 0:S.d)||new Map,e:C};return F&&u(y,E,F),ea(S,E)&&S.d===E.d?S:(l(y,E),E)},v=(y,C)=>{const F=s(y);if(!C&&F&&(e.has(y)||Array.from(F.d).every(([I,D])=>{if(I===y)return!0;const j=v(I);return j===D||_t(j,D)})))return F;const S=new Map;let E=!0;const A=I=>{if(bi(y,I)){const j=s(I);if(j)return S.set(I,j),sn(j);if(_i(I))return S.set(I,void 0),I.init;throw new Error("no atom init")}const D=v(I);return S.set(I,D),sn(D)};let h,g;const x={get signal(){return h||(h=new AbortController),h.signal},get setSelf(){return(Z?"production":void 0)!=="production"&&!Si(y)&&console.warn("setSelf function cannot be used with read-only atom"),!g&&Si(y)&&(g=(...I)=>{if((Z?"production":void 0)!=="production"&&E&&console.warn("setSelf function cannot be called in sync"),!E)return _(y,...I)}),g}};try{const I=y.read(A,x);return d(y,I,S,()=>h==null?void 0:h.abort())}catch(I){return f(y,I,S)}finally{E=!1}},p=y=>sn(v(y)),m=y=>{const C=h=>{var g,x;const I=new Set((g=e.get(h))==null?void 0:g.t);return(x=i.get(h))==null||x[1].forEach(D=>{I.add(D)}),I},F=new Array,S=new Set,E=h=>{if(!S.has(h)){S.add(h);for(const g of C(h))h!==g&&E(g);F.push(h)}};E(y);const A=new Set([y]);for(let h=F.length-1;h>=0;--h){const g=F[h],x=s(g);if(!x)continue;let I=!1;for(const D of x.d.keys())if(D!==g&&A.has(D)){I=!0;break}if(I){const D=v(g,!0);_t(x,D)||A.add(g)}}},N=(y,...C)=>{const F=A=>sn(v(A)),S=(A,...h)=>{const g=n.length>0;g||n.push(new Set([A]));let x;if(bi(y,A)){if(!_i(A))throw new Error("atom not writable");const I=s(A),D=d(A,h[0]);_t(I,D)||m(A)}else x=N(A,...h);if(!g){const I=M(n.pop());(Z?"production":void 0)!=="production"&&r.forEach(D=>D({type:"async-write",flushed:I}))}return x};return y.write(F,S,...C)},_=(y,...C)=>{n.push(new Set([y]));const F=N(y,...C),S=M(n.pop());return(Z?"production":void 0)!=="production"&&r.forEach(E=>E({type:"write",flushed:S})),F},P=(y,C,F)=>{var S;const E=e.get(y);if(E)return C&&E.t.add(C),E;const A=F||[];(S=s(y))==null||S.d.forEach((g,x)=>{x!==y&&P(x,y,A)}),v(y);const h={t:new Set(C&&[C]),l:new Set};if(e.set(y,h),(Z?"production":void 0)!=="production"&&a.add(y),Si(y)&&y.onMount){const{onMount:g}=y;A.push(()=>{const x=g((...I)=>_(y,...I));x&&(h.u=x)})}return F||A.forEach(g=>g()),h},V=(y,C)=>!C.l.size&&(!C.t.size||C.t.size===1&&C.t.has(y)),T=(y,C)=>{if(!V(y,C))return;const F=C.u;F&&F(),e.delete(y),(Z?"production":void 0)!=="production"&&a.delete(y);const S=s(y);S?(Xe(S)&&Qr(S.v),S.d.forEach((E,A)=>{if(A!==y){const h=e.get(A);h&&(h.t.delete(y),T(A,h))}})):(Z?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",y)},L=(y,C,F)=>{const S=new Set(C.d.keys()),E=new Set;F==null||F.forEach((A,h)=>{if(S.has(h)){S.delete(h);return}E.add(h);const g=e.get(h);g&&g.t.delete(y)}),S.forEach(A=>{P(A,y)}),E.forEach(A=>{const h=e.get(A);h&&T(A,h)})},M=y=>{let C;(Z?"production":void 0)!=="production"&&(C=new Set);const F=[],S=E=>{var A;if(!i.has(E))return;const[h,g]=i.get(E);i.delete(E),F.push([E,h]),g.forEach(S),(A=s(E))==null||A.d.forEach((x,I)=>S(I))};if(y.forEach(S),F.forEach(([E,A])=>{const h=s(E);if(!h){(Z?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush");return}if(h!==A){const g=e.get(E);g&&h.d!==(A==null?void 0:A.d)&&L(E,h,A==null?void 0:A.d),g&&!(!Xe(A)&&(_t(A,h)||ea(A,h)))&&(g.l.forEach(x=>x()),(Z?"production":void 0)!=="production"&&C.add(E))}}),(Z?"production":void 0)!=="production")return C},G=(y,C)=>{const F=P(y),S=M([y]),E=F.l;return E.add(C),(Z?"production":void 0)!=="production"&&r.forEach(A=>A({type:"sub",flushed:S})),()=>{E.delete(C),T(y,F),(Z?"production":void 0)!=="production"&&r.forEach(A=>A({type:"unsub"}))}};return(Z?"production":void 0)!=="production"?{get:p,set:_,sub:G,dev_subscribe_store:y=>(r.add(y),()=>{r.delete(y)}),dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:y=>t.get(y),dev_get_mounted:y=>e.get(y),dev_restore_atoms:y=>{n.push(new Set);for(const[F,S]of y)_i(F)&&(d(F,S),m(F));const C=M(n.pop());r.forEach(F=>F({type:"restore",flushed:C}))}}:{get:p,set:_,sub:G}};let St;const ou=()=>(St||(St=ps(),(Z?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=St),globalThis.__JOTAI_DEFAULT_STORE__!==St&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),St),lu=ps,uu=ou;var cu={NZ_AWS_REGION:"us-east-1",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1,STAGE:"dev"};const du=B.createContext(void 0),ms=t=>B.useContext(du)||uu(),fu=t=>typeof(t==null?void 0:t.then)=="function",hu=B.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)});function zi(t,e){const n=ms(),[[i,r,a],s]=B.useReducer(u=>{const c=n.get(t);return Object.is(u[0],c)&&u[1]===n&&u[2]===t?u:[c,n,t]},void 0,()=>[n.get(t),n,t]);let o=i;return(r!==n||a!==t)&&(s(),o=n.get(t)),B.useEffect(()=>{const u=n.sub(t,()=>{s()});return s(),u},[n,t,void 0]),B.useDebugValue(o),fu(o)?hu(o):o}function vr(t,e){const n=ms();return B.useCallback((...r)=>{if((cu?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...r)},[n,t])}function hn(t,e){return[zi(t),vr(t)]}const Hn=zn(null);Hn.debugLabel="accountAtom";var pu={NZ_AWS_REGION:"us-east-1",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1,STAGE:"dev"};const{NZ_AWS_REGION:mu,NZ_BACKOFFICE_BACK_URL:gu,NZ_CORE_SERVICES_GRAPHQL_URL:vu,NZ_CORE_SERVICES_REST_URL:yu}=pu,yr={AWS:{region:mu,cognito:{userPoolId:"us-east-1_knSlGEmJ0",userPoolWebClientId:"3hmbfhf7nl3kq20qr9i5lihf1p"}},apiUrls:{restV1:gu||"https://pabprg32bj.execute-api.us-east-1.amazonaws.com",restV2:yu||"https://core-services-dev.nizza.com/api",graphql:vu||"https://core-services-dev.nizza.com/graphql",corsProxy:"https://1qmd8jteh1.execute-api.us-east-1.amazonaws.com"},publicUrls:{platformSite:"https://platformdev.nizza.com",nizzaCdn:"https://cdn.nizza.com",bundleSite:"https://bundledev.nizza.com",wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};function gs(t,e){let n=null;const i=()=>{n||(n=e().log.createLogger(t))},r=(s,o)=>typeof s[o]=="function",a={get(s,o,l){i();const u=c=>(...d)=>{if(!n)return;const f=n[c];if(typeof f=="function")return f.apply(n,d)};return n&&r(n,o)?u(o):n?n[o]:void 0}};return new Proxy({},a)}function q(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];throw new Error(typeof t=="number"?"[MobX] minified error nr: "+t+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+t)}var ku={};function kr(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:ku}var vs=Object.assign,An=Object.getOwnPropertyDescriptor,be=Object.defineProperty,qn=Object.prototype,Hi=[];Object.freeze(Hi);var ys={};Object.freeze(ys);var bu=typeof Proxy!="undefined",_u=Object.toString();function ks(){bu||q("Proxy not available")}function bs(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var at=function(){};function he(t){return typeof t=="function"}function Be(t){var e=typeof t;switch(e){case"string":case"symbol":case"number":return!0}return!1}function Gn(t){return t!==null&&typeof t=="object"}function De(t){if(!Gn(t))return!1;var e=Object.getPrototypeOf(t);if(e==null)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return typeof n=="function"&&n.toString()===_u}function _s(t){var e=t==null?void 0:t.constructor;return e?e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction":!1}function Kn(t,e,n){be(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ss(t,e,n){be(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Ge(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Gn(i)&&i[n]===!0}}function pt(t){return t instanceof Map}function Wt(t){return t instanceof Set}var Ns=typeof Object.getOwnPropertySymbols!="undefined";function Su(t){var e=Object.keys(t);if(!Ns)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter(function(i){return qn.propertyIsEnumerable.call(t,i)})):e}var Wn=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Ns?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function Es(t){return t===null?null:typeof t=="object"?""+t:t}function Ae(t,e){return qn.hasOwnProperty.call(t,e)}var Nu=Object.getOwnPropertyDescriptors||function(e){var n={};return Wn(e).forEach(function(i){n[i]=An(e,i)}),n};function Eu(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,wu(i.key),i)}}function br(t,e,n){return e&&Eu(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Pe(){return Pe=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Pe.apply(this,arguments)}function As(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,qi(t,e)}function qi(t,e){return qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},qi(t,e)}function Ni(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Au(t,e){if(t){if(typeof t=="string")return ta(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ta(t,e)}}function ta(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function st(t,e){var n=typeof Symbol!="undefined"&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=Au(t))||e){n&&(t=n);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ou(t,e){if(typeof t!="object"||t===null)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function wu(t){var e=Ou(t,"string");return typeof e=="symbol"?e:String(e)}var ge=Symbol("mobx-stored-annotations");function _e(t){function e(n,i){if(Jt(i))return t.decorate_20223_(n,i);mt(n,i,t)}return Object.assign(e,t)}function mt(t,e,n){Ae(t,ge)||Kn(t,ge,Pe({},t[ge])),Lu(n)||(t[ge][e]=n)}function Tu(t){return Ae(t,ge)||Kn(t,ge,Pe({},t[ge])),t[ge]}function Jt(t){return typeof t=="object"&&typeof t.kind=="string"}var U=Symbol("mobx administration"),Yt=function(){function t(n){n===void 0&&(n="Atom"),this.name_=void 0,this.isPendingUnobservation_=!1,this.isBeingObserved_=!1,this.observers_=new Set,this.diffValue_=0,this.lastAccessedBy_=0,this.lowestObserverState_=K.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=n}var e=t.prototype;return e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(i){return i()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(i){return i()})},e.reportObserved=function(){return zs(this)},e.reportChanged=function(){ae(),Hs(this),se()},e.toString=function(){return this.name_},t}(),_r=Ge("Atom",Yt);function Os(t,e,n){e===void 0&&(e=at),n===void 0&&(n=at);var i=new Yt(t);return e!==at&&jc(i,e),n!==at&&Ys(i,n),i}function Cu(t,e){return t===e}function xu(t,e){return Or(t,e)}function Fu(t,e){return Or(t,e,1)}function Ru(t,e){return Object.is?Object.is(t,e):t===e?t!==0||1/t===1/e:t!==t&&e!==e}var On={identity:Cu,structural:xu,default:Ru,shallow:Fu};function ze(t,e,n){return eo(t)?t:Array.isArray(t)?X.array(t,{name:n}):De(t)?X.object(t,void 0,{name:n}):pt(t)?X.map(t,{name:n}):Wt(t)?X.set(t,{name:n}):typeof t=="function"&&!ei(t)&&!Ut(t)?_s(t)?ct(t):Vt(n,t):t}function Iu(t,e,n){if(t==null||ni(t)||ti(t)||We(t)||gt(t))return t;if(Array.isArray(t))return X.array(t,{name:n,deep:!1});if(De(t))return X.object(t,void 0,{name:n,deep:!1});if(pt(t))return X.map(t,{name:n,deep:!1});if(Wt(t))return X.set(t,{name:n,deep:!1})}function Jn(t){return t}function Du(t,e){return Or(t,e)?e:t}var Pu="override";function Lu(t){return t.annotationType_===Pu}function Qt(t,e){return{annotationType_:t,options_:e,make_:$u,extend_:Vu,decorate_20223_:Uu}}function $u(t,e,n,i){var r;if((r=this.options_)!=null&&r.bound)return this.extend_(t,e,n,!1)===null?0:1;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if(ei(n.value))return 1;var a=ws(t,this,e,n,!1);return be(i,e,a),2}function Vu(t,e,n,i){var r=ws(t,this,e,n);return t.defineProperty_(e,r,i)}function Uu(t,e){var n=e.kind,i=e.name,r=e.addInitializer,a=this,s=function(u){var c,d,f,v;return Le((c=(d=a.options_)==null?void 0:d.name)!=null?c:i.toString(),u,(f=(v=a.options_)==null?void 0:v.autoAction)!=null?f:!1)};if(n=="field"){r(function(){mt(this,i,a)});return}if(n=="method"){var o;return ei(t)||(t=s(t)),(o=this.options_)!=null&&o.bound&&r(function(){var l=this,u=l[i].bind(l);u.isMobxAction=!0,l[i]=u}),t}q("Cannot apply '"+a.annotationType_+"' to '"+String(i)+"' (kind: "+n+"):"+(`
3
+ '`+a.annotationType_+"' can only be used on properties with a function value."))}function ju(t,e,n,i){e.annotationType_,i.value}function ws(t,e,n,i,r){var a,s,o,l,u,c,d;r===void 0&&(r=O.safeDescriptors),ju(t,e,n,i);var f=i.value;if((a=e.options_)!=null&&a.bound){var v;f=f.bind((v=t.proxy_)!=null?v:t.target_)}return{value:Le((s=(o=e.options_)==null?void 0:o.name)!=null?s:n.toString(),f,(l=(u=e.options_)==null?void 0:u.autoAction)!=null?l:!1,(c=e.options_)!=null&&c.bound?(d=t.proxy_)!=null?d:t.target_:void 0),configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function Ts(t,e){return{annotationType_:t,options_:e,make_:Mu,extend_:Bu,decorate_20223_:zu}}function Mu(t,e,n,i){var r;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if((r=this.options_)!=null&&r.bound&&(!Ae(t.target_,e)||!Ut(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(Ut(n.value))return 1;var a=Cs(t,this,e,n,!1,!1);return be(i,e,a),2}function Bu(t,e,n,i){var r,a=Cs(t,this,e,n,(r=this.options_)==null?void 0:r.bound);return t.defineProperty_(e,a,i)}function zu(t,e){var n,i=e.name,r=e.addInitializer;return Ut(t)||(t=ct(t)),(n=this.options_)!=null&&n.bound&&r(function(){var a=this,s=a[i].bind(a);s.isMobXFlow=!0,a[i]=s}),t}function Hu(t,e,n,i){e.annotationType_,i.value}function Cs(t,e,n,i,r,a){a===void 0&&(a=O.safeDescriptors),Hu(t,e,n,i);var s=i.value;if(Ut(s)||(s=ct(s)),r){var o;s=s.bind((o=t.proxy_)!=null?o:t.target_),s.isMobXFlow=!0}return{value:s,configurable:a?t.isPlainObject_:!0,enumerable:!1,writable:!a}}function Sr(t,e){return{annotationType_:t,options_:e,make_:qu,extend_:Gu,decorate_20223_:Ku}}function qu(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Gu(t,e,n,i){return Wu(t,this,e,n),t.defineComputedProperty_(e,Pe({},this.options_,{get:n.get,set:n.set}),i)}function Ku(t,e){var n=this,i=e.name,r=e.addInitializer;return r(function(){var a=vt(this)[U],s=Pe({},n.options_,{get:t,context:this});s.name||(s.name="ObservableObject."+i.toString()),a.values_.set(i,new ut(s))}),function(){return this[U].getObservablePropValue_(i)}}function Wu(t,e,n,i){e.annotationType_,i.get}function Yn(t,e){return{annotationType_:t,options_:e,make_:Ju,extend_:Yu,decorate_20223_:Qu}}function Ju(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Yu(t,e,n,i){var r,a;return Xu(t,this),t.defineObservableProperty_(e,n.value,(r=(a=this.options_)==null?void 0:a.enhancer)!=null?r:ze,i)}function Qu(t,e){var n=this,i=e.kind,r=e.name,a=new WeakSet;function s(o,l){var u,c,d=vt(o)[U],f=new je(l,(u=(c=n.options_)==null?void 0:c.enhancer)!=null?u:ze,"ObservableObject."+r.toString(),!1);d.values_.set(r,f),a.add(o)}if(i=="accessor")return{get:function(){return a.has(this)||s(this,t.get.call(this)),this[U].getObservablePropValue_(r)},set:function(l){return a.has(this)||s(this,l),this[U].setObservablePropValue_(r,l)},init:function(l){return a.has(this)||s(this,l),l}}}function Xu(t,e,n,i){e.annotationType_}var Zu="true",ec=xs();function xs(t){return{annotationType_:Zu,options_:t,make_:tc,extend_:nc,decorate_20223_:ic}}function tc(t,e,n,i){var r,a;if(n.get)return Fe.make_(t,e,n,i);if(n.set){var s=Le(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:O.safeDescriptors?t.isPlainObject_:!0,set:s})===null?0:2:(be(i,e,{configurable:!0,set:s}),2)}if(i!==t.target_&&typeof n.value=="function"){var o;if(_s(n.value)){var l,u=(l=this.options_)!=null&&l.autoBind?ct.bound:ct;return u.make_(t,e,n,i)}var c=(o=this.options_)!=null&&o.autoBind?Vt.bound:Vt;return c.make_(t,e,n,i)}var d=((r=this.options_)==null?void 0:r.deep)===!1?X.ref:X;if(typeof n.value=="function"&&(a=this.options_)!=null&&a.autoBind){var f;n.value=n.value.bind((f=t.proxy_)!=null?f:t.target_)}return d.make_(t,e,n,i)}function nc(t,e,n,i){var r,a;if(n.get)return Fe.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:O.safeDescriptors?t.isPlainObject_:!0,set:Le(e.toString(),n.set)},i);if(typeof n.value=="function"&&(r=this.options_)!=null&&r.autoBind){var s;n.value=n.value.bind((s=t.proxy_)!=null?s:t.target_)}var o=((a=this.options_)==null?void 0:a.deep)===!1?X.ref:X;return o.extend_(t,e,n,i)}function ic(t,e){q("'"+this.annotationType_+"' cannot be used as a decorator")}var rc="observable",ac="observable.ref",sc="observable.shallow",oc="observable.struct",Fs={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Fs);function on(t){return t||Fs}var Gi=Yn(rc),lc=Yn(ac,{enhancer:Jn}),uc=Yn(sc,{enhancer:Iu}),cc=Yn(oc,{enhancer:Du}),Rs=_e(Gi);function ln(t){return t.deep===!0?ze:t.deep===!1?Jn:fc(t.defaultDecorator)}function dc(t){var e;return t?(e=t.defaultDecorator)!=null?e:xs(t):void 0}function fc(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:ze}function Is(t,e,n){if(Jt(e))return Gi.decorate_20223_(t,e);if(Be(e)){mt(t,e,Gi);return}return eo(t)?t:De(t)?X.object(t,e,n):Array.isArray(t)?X.array(t,e):pt(t)?X.map(t,e):Wt(t)?X.set(t,e):typeof t=="object"&&t!==null?t:X.box(t,e)}vs(Is,Rs);var hc={box:function(e,n){var i=on(n);return new je(e,ln(i),i.name,!0,i.equals)},array:function(e,n){var i=on(n);return(O.useProxies===!1||i.proxy===!1?fd:nd)(e,ln(i),i.name)},map:function(e,n){var i=on(n);return new so(e,ln(i),i.name)},set:function(e,n){var i=on(n);return new uo(e,ln(i),i.name)},object:function(e,n,i){return Je(function(){return Hc(O.useProxies===!1||(i==null?void 0:i.proxy)===!1?vt({},i):Zc({},i),e,n)})},ref:_e(lc),shallow:_e(uc),deep:Rs,struct:_e(cc)},X=vs(Is,hc),Ds="computed",pc="computed.struct",Ki=Sr(Ds),mc=Sr(pc,{equals:On.structural}),Fe=function(e,n){if(Jt(n))return Ki.decorate_20223_(e,n);if(Be(n))return mt(e,n,Ki);if(De(e))return _e(Sr(Ds,e));var i=De(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new ut(i)};Object.assign(Fe,Ki);Fe.struct=_e(mc);var na,ia,wn=0,gc=1,vc=(na=(ia=An(function(){},"name"))==null?void 0:ia.configurable)!=null?na:!1,ra={value:"action",configurable:!0,writable:!1,enumerable:!1};function Le(t,e,n,i){n===void 0&&(n=!1);function r(){return yc(t,n,e,i||this,arguments)}return r.isMobxAction=!0,r.toString=function(){return e.toString()},vc&&(ra.value=t,be(r,"name",ra)),r}function yc(t,e,n,i,r){var a=kc(t,e);try{return n.apply(i,r)}catch(s){throw a.error_=s,s}finally{bc(a)}}function kc(t,e,n,i){var r=!1,a=0,s=O.trackingDerivation,o=!e||!s;ae();var l=O.allowStateChanges;o&&(Ke(),l=Qn(!0));var u=Nr(!0),c={runAsAction_:o,prevDerivation_:s,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:r,startTime_:a,actionId_:gc++,parentActionId_:wn};return wn=c.actionId_,c}function bc(t){wn!==t.actionId_&&q(30),wn=t.parentActionId_,t.error_!==void 0&&(O.suppressReactionErrors=!0),Xn(t.prevAllowStateChanges_),Ct(t.prevAllowStateReads_),se(),t.runAsAction_&&Oe(t.prevDerivation_),O.suppressReactionErrors=!1}function _c(t,e){var n=Qn(t);try{return e()}finally{Xn(n)}}function Qn(t){var e=O.allowStateChanges;return O.allowStateChanges=t,e}function Xn(t){O.allowStateChanges=t}var Ps;Ps=Symbol.toPrimitive;var je=function(t){As(e,t);function e(i,r,a,s,o){var l;return a===void 0&&(a="ObservableValue"),o===void 0&&(o=On.default),l=t.call(this,a)||this,l.enhancer=void 0,l.name_=void 0,l.equals=void 0,l.hasUnreportedChange_=!1,l.interceptors_=void 0,l.changeListeners_=void 0,l.value_=void 0,l.dehancer=void 0,l.enhancer=r,l.name_=a,l.equals=o,l.value_=r(i,void 0,a),l}var n=e.prototype;return n.dehanceValue=function(r){return this.dehancer!==void 0?this.dehancer(r):r},n.set=function(r){this.value_,r=this.prepareNewValue_(r),r!==O.UNCHANGED&&this.setNewValue_(r)},n.prepareNewValue_=function(r){if(ie(this)){var a=re(this,{object:this,type:Se,newValue:r});if(!a)return O.UNCHANGED;r=a.newValue}return r=this.enhancer(r,this.value_,this.name_),this.equals(this.value_,r)?O.UNCHANGED:r},n.setNewValue_=function(r){var a=this.value_;this.value_=r,this.reportChanged(),de(this)&&fe(this,{type:Se,object:this,newValue:r,oldValue:a})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(r){return Xt(this,r)},n.observe_=function(r,a){return a&&r({observableKind:"value",debugObjectName:this.name_,object:this,type:Se,newValue:this.value_,oldValue:void 0}),Zt(this,r)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return Es(this.get())},n[Ps]=function(){return this.valueOf()},e}(Yt),Ls;Ls=Symbol.toPrimitive;var ut=function(){function t(n){this.dependenciesState_=K.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.isBeingObserved_=!1,this.isPendingUnobservation_=!1,this.observers_=new Set,this.diffValue_=0,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=K.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Cn(null),this.name_=void 0,this.triggeredBy_=void 0,this.isComputing_=!1,this.isRunningSetter_=!1,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Tn.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,n.get||q(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=Le("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?On.structural:On.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){Oc(this)},e.onBO=function(){this.onBOL&&this.onBOL.forEach(function(i){return i()})},e.onBUO=function(){this.onBUOL&&this.onBUOL.forEach(function(i){return i()})},e.get=function(){if(this.isComputing_&&q(32,this.name_,this.derivation),O.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)Wi(this)&&(this.warnAboutUntrackedRead_(),ae(),this.value_=this.computeValue_(!1),se());else if(zs(this),Wi(this)){var i=O.trackingContext;this.keepAlive_&&!i&&(O.trackingContext=this),this.trackAndCompute()&&Ac(this),O.trackingContext=i}var r=this.value_;if(pn(r))throw r.cause;return r},e.set=function(i){if(this.setter_){this.isRunningSetter_&&q(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter_=!1}}else q(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,r=this.dependenciesState_===K.NOT_TRACKING_,a=this.computeValue_(!0),s=r||pn(i)||pn(a)||!this.equals_(i,a);return s&&(this.value_=a),s},e.computeValue_=function(i){this.isComputing_=!0;var r=Qn(!1),a;if(i)a=$s(this,this.derivation,this.scope_);else if(O.disableErrorBoundaries===!0)a=this.derivation.call(this.scope_);else try{a=this.derivation.call(this.scope_)}catch(s){a=new Cn(s)}return Xn(r),this.isComputing_=!1,a},e.suspend_=function(){this.keepAlive_||(Ji(this),this.value_=void 0)},e.observe_=function(i,r){var a=this,s=!0,o=void 0;return Js(function(){var l=a.get();if(!s||r){var u=Ke();i({observableKind:"computed",debugObjectName:a.name_,type:Se,object:a,newValue:l,oldValue:o}),Oe(u)}s=!1,o=l})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return Es(this.get())},e[Ls]=function(){return this.valueOf()},t}(),Zn=Ge("ComputedValue",ut),K;(function(t){t[t.NOT_TRACKING_=-1]="NOT_TRACKING_",t[t.UP_TO_DATE_=0]="UP_TO_DATE_",t[t.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",t[t.STALE_=2]="STALE_"})(K||(K={}));var Tn;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(Tn||(Tn={}));var Cn=function(e){this.cause=void 0,this.cause=e};function pn(t){return t instanceof Cn}function Wi(t){switch(t.dependenciesState_){case K.UP_TO_DATE_:return!1;case K.NOT_TRACKING_:case K.STALE_:return!0;case K.POSSIBLY_STALE_:{for(var e=Nr(!0),n=Ke(),i=t.observing_,r=i.length,a=0;a<r;a++){var s=i[a];if(Zn(s)){if(O.disableErrorBoundaries)s.get();else try{s.get()}catch{return Oe(n),Ct(e),!0}if(t.dependenciesState_===K.STALE_)return Oe(n),Ct(e),!0}}return Us(t),Oe(n),Ct(e),!1}}}function $s(t,e,n){var i=Nr(!0);Us(t),t.newObserving_=new Array(t.runId_===0?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++O.runId;var r=O.trackingDerivation;O.trackingDerivation=t,O.inBatch++;var a;if(O.disableErrorBoundaries===!0)a=e.call(n);else try{a=e.call(n)}catch(s){a=new Cn(s)}return O.inBatch--,O.trackingDerivation=r,Sc(t),Ct(i),a}function Sc(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=K.UP_TO_DATE_,r=0,a=t.unboundDepsCount_,s=0;s<a;s++){var o=n[s];o.diffValue_===0&&(o.diffValue_=1,r!==s&&(n[r]=o),r++),o.dependenciesState_>i&&(i=o.dependenciesState_)}for(n.length=r,t.newObserving_=null,a=e.length;a--;){var l=e[a];l.diffValue_===0&&Ms(l,t),l.diffValue_=0}for(;r--;){var u=n[r];u.diffValue_===1&&(u.diffValue_=0,Ec(u,t))}i!==K.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function Ji(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)Ms(e[n],t);t.dependenciesState_=K.NOT_TRACKING_}function Vs(t){var e=Ke();try{return t()}finally{Oe(e)}}function Ke(){var t=O.trackingDerivation;return O.trackingDerivation=null,t}function Oe(t){O.trackingDerivation=t}function Nr(t){var e=O.allowStateReads;return O.allowStateReads=t,e}function Ct(t){O.allowStateReads=t}function Us(t){if(t.dependenciesState_!==K.UP_TO_DATE_){t.dependenciesState_=K.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=K.UP_TO_DATE_}}var mn=function(){this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},gn=!0,js=!1,O=function(){var t=kr();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(gn=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new mn().version&&(gn=!1),gn?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new mn):(setTimeout(function(){js||q(35)},1),new mn)}();function Nc(){if((O.pendingReactions.length||O.inBatch||O.isRunningReactions)&&q(36),js=!0,gn){var t=kr();--t.__mobxInstanceCount===0&&(t.__mobxGlobals=void 0),O=new mn}}function Ec(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function Ms(t,e){t.observers_.delete(e),t.observers_.size===0&&Bs(t)}function Bs(t){t.isPendingUnobservation_===!1&&(t.isPendingUnobservation_=!0,O.pendingUnobservations.push(t))}function ae(){O.inBatch++}function se(){if(--O.inBatch===0){qs();for(var t=O.pendingUnobservations,e=0;e<t.length;e++){var n=t[e];n.isPendingUnobservation_=!1,n.observers_.size===0&&(n.isBeingObserved_&&(n.isBeingObserved_=!1,n.onBUO()),n instanceof ut&&n.suspend_())}O.pendingUnobservations=[]}}function zs(t){var e=O.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved_&&O.trackingContext&&(t.isBeingObserved_=!0,t.onBO())),t.isBeingObserved_):(t.observers_.size===0&&O.inBatch>0&&Bs(t),!1)}function Hs(t){t.lowestObserverState_!==K.STALE_&&(t.lowestObserverState_=K.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===K.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=K.STALE_}))}function Ac(t){t.lowestObserverState_!==K.STALE_&&(t.lowestObserverState_=K.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===K.POSSIBLY_STALE_?e.dependenciesState_=K.STALE_:e.dependenciesState_===K.UP_TO_DATE_&&(t.lowestObserverState_=K.UP_TO_DATE_)}))}function Oc(t){t.lowestObserverState_===K.UP_TO_DATE_&&(t.lowestObserverState_=K.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===K.UP_TO_DATE_&&(e.dependenciesState_=K.POSSIBLY_STALE_,e.onBecomeStale_())}))}var $t=function(){function t(n,i,r,a){n===void 0&&(n="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=K.NOT_TRACKING_,this.diffValue_=0,this.runId_=0,this.unboundDepsCount_=0,this.isDisposed_=!1,this.isScheduled_=!1,this.isTrackPending_=!1,this.isRunning_=!1,this.isTracing_=Tn.NONE,this.name_=n,this.onInvalidate_=i,this.errorHandler_=r,this.requiresObservable_=a}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,O.pendingReactions.push(this),qs())},e.isScheduled=function(){return this.isScheduled_},e.runReaction_=function(){if(!this.isDisposed_){ae(),this.isScheduled_=!1;var i=O.trackingContext;if(O.trackingContext=this,Wi(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(r){this.reportExceptionInDerivation_(r)}}O.trackingContext=i,se()}},e.track=function(i){if(!this.isDisposed_){ae(),this.isRunning_=!0;var r=O.trackingContext;O.trackingContext=this;var a=$s(this,i,void 0);O.trackingContext=r,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&Ji(this),pn(a)&&this.reportExceptionInDerivation_(a.cause),se()}},e.reportExceptionInDerivation_=function(i){var r=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(O.disableErrorBoundaries)throw i;var a="[mobx] uncaught error in '"+this+"'";O.suppressReactionErrors||console.error(a,i),O.globalReactionErrorHandlers.forEach(function(s){return s(i,r)})},e.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(ae(),Ji(this),se()))},e.getDisposer_=function(i){var r=this,a=function s(){r.dispose(),i==null||i.removeEventListener==null||i.removeEventListener("abort",s)};return i==null||i.addEventListener==null||i.addEventListener("abort",a),a[U]=this,a},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},t}(),wc=100,Yi=function(e){return e()};function qs(){O.inBatch>0||O.isRunningReactions||Yi(Tc)}function Tc(){O.isRunningReactions=!0;for(var t=O.pendingReactions,e=0;t.length>0;){++e===wc&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),i=0,r=n.length;i<r;i++)n[i].runReaction_()}O.isRunningReactions=!1}var xn=Ge("Reaction",$t);function Cc(t){var e=Yi;Yi=function(i){return t(function(){return e(i)})}}function xt(){return!1}function xc(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var Gs="action",Fc="action.bound",Ks="autoAction",Rc="autoAction.bound",Ic="<unnamed action>",Qi=Qt(Gs),Dc=Qt(Fc,{bound:!0}),Xi=Qt(Ks,{autoAction:!0}),Pc=Qt(Rc,{autoAction:!0,bound:!0});function Ws(t){var e=function(i,r){if(he(i))return Le(i.name||Ic,i,t);if(he(r))return Le(i,r,t);if(Jt(r))return(t?Xi:Qi).decorate_20223_(i,r);if(Be(r))return mt(i,r,t?Xi:Qi);if(Be(i))return _e(Qt(t?Ks:Gs,{name:i,autoAction:t}))};return e}var ve=Ws(!1);Object.assign(ve,Qi);var Vt=Ws(!0);Object.assign(Vt,Xi);ve.bound=_e(Dc);Vt.bound=_e(Pc);function ei(t){return he(t)&&t.isMobxAction===!0}function Js(t,e){var n,i,r,a,s;e===void 0&&(e=ys);var o=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",l=!e.scheduler&&!e.delay,u;if(l)u=new $t(o,function(){this.track(f)},e.onError,e.requiresObservable);else{var c=$c(e),d=!1;u=new $t(o,function(){d||(d=!0,c(function(){d=!1,u.isDisposed_||u.track(f)}))},e.onError,e.requiresObservable)}function f(){t(u)}return(r=e)!=null&&(a=r.signal)!=null&&a.aborted||u.schedule_(),u.getDisposer_((s=e)==null?void 0:s.signal)}var Lc=function(e){return e()};function $c(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:Lc}var Vc="onBO",Uc="onBUO";function jc(t,e,n){return Qs(Vc,t,e,n)}function Ys(t,e,n){return Qs(Uc,t,e,n)}function Qs(t,e,n,i){var r=In(e),a=he(i)?i:n,s=t+"L";return r[s]?r[s].add(a):r[s]=new Set([a]),function(){var o=r[s];o&&(o.delete(a),o.size===0&&delete r[s])}}var Mc="never",un="always",Bc="observed";function zc(t){t.isolateGlobalState===!0&&Nc();var e=t.useProxies,n=t.enforceActions;if(e!==void 0&&(O.useProxies=e===un?!0:e===Mc?!1:typeof Proxy!="undefined"),e==="ifavailable"&&(O.verifyProxies=!0),n!==void 0){var i=n===un?un:n===Bc;O.enforceActions=i,O.allowStateChanges=!(i===!0||i===un)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(r){r in t&&(O[r]=!!t[r])}),O.allowStateReads=!O.observableRequiresReaction,t.reactionScheduler&&Cc(t.reactionScheduler)}function Hc(t,e,n,i){var r=Nu(e);return Je(function(){var a=vt(t,i)[U];Wn(r).forEach(function(s){a.extend_(s,r[s],n&&s in n?n[s]:!0)})}),t}function qc(t,e){return Xs(In(t,e))}function Xs(t){var e={name:t.name_};return t.observing_&&t.observing_.length>0&&(e.dependencies=Gc(t.observing_).map(Xs)),e}function Gc(t){return Array.from(new Set(t))}var Kc=0;function Zs(){this.message="FLOW_CANCELLED"}Zs.prototype=Object.create(Error.prototype);var Ei=Ts("flow"),Wc=Ts("flow.bound",{bound:!0}),ct=Object.assign(function(e,n){if(Jt(n))return Ei.decorate_20223_(e,n);if(Be(n))return mt(e,n,Ei);var i=e,r=i.name||"<unnamed flow>",a=function(){var o=this,l=arguments,u=++Kc,c=ve(r+" - runid: "+u+" - init",i).apply(o,l),d,f=void 0,v=new Promise(function(p,m){var N=0;d=m;function _(T){f=void 0;var L;try{L=ve(r+" - runid: "+u+" - yield "+N++,c.next).call(c,T)}catch(M){return m(M)}V(L)}function P(T){f=void 0;var L;try{L=ve(r+" - runid: "+u+" - yield "+N++,c.throw).call(c,T)}catch(M){return m(M)}V(L)}function V(T){if(he(T==null?void 0:T.then)){T.then(V,m);return}return T.done?p(T.value):(f=Promise.resolve(T.value),f.then(_,P))}_(void 0)});return v.cancel=ve(r+" - runid: "+u+" - cancel",function(){try{f&&aa(f);var p=c.return(void 0),m=Promise.resolve(p.value);m.then(at,at),aa(m),d(new Zs)}catch(N){d(N)}}),v};return a.isMobXFlow=!0,a},Ei);ct.bound=_e(Wc);function aa(t){he(t.cancel)&&t.cancel()}function Ut(t){return(t==null?void 0:t.isMobXFlow)===!0}function Jc(t,e){return t?ni(t)||!!t[U]||_r(t)||xn(t)||Zn(t):!1}function eo(t){return Jc(t)}function Ee(t,e){e===void 0&&(e=void 0),ae();try{return t.apply(e)}finally{se()}}function Yc(t,e,n){return arguments.length===1||e&&typeof e=="object"?Qc(t,e):to(t,e,{})}function to(t,e,n){var i;if(typeof n.timeout=="number"){var r=new Error("WHEN_TIMEOUT");i=setTimeout(function(){if(!s[U].isDisposed_)if(s(),n.onError)n.onError(r);else throw r},n.timeout)}n.name="When";var a=Le("When-effect",e),s=Js(function(o){var l=_c(!1,t);l&&(o.dispose(),i&&clearTimeout(i),a())},n);return s}function Qc(t,e){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var i,r,a=new Promise(function(s,o){var l,u=to(t,s,Pe({},e,{onError:o}));i=function(){u(),o(new Error("WHEN_CANCELLED"))},r=function(){u(),o(new Error("WHEN_ABORTED"))},e==null||(l=e.signal)==null||l.addEventListener==null||l.addEventListener("abort",r)}).finally(function(){var s;return e==null||(s=e.signal)==null||s.removeEventListener==null?void 0:s.removeEventListener("abort",r)});return a.cancel=i,a}function Ze(t){return t[U]}var Xc={has:function(e,n){return Ze(e).has_(n)},get:function(e,n){return Ze(e).get_(n)},set:function(e,n,i){var r;return Be(n)?(r=Ze(e).set_(n,i,!0))!=null?r:!0:!1},deleteProperty:function(e,n){var i;return Be(n)?(i=Ze(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var r;return(r=Ze(e).defineProperty_(n,i))!=null?r:!0},ownKeys:function(e){return Ze(e).ownKeys_()},preventExtensions:function(e){q(13)}};function Zc(t,e){var n,i;return ks(),t=vt(t,e),(i=(n=t[U]).proxy_)!=null?i:n.proxy_=new Proxy(t,Xc)}function ie(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function Xt(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),bs(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function re(t,e){var n=Ke();try{for(var i=[].concat(t.interceptors_||[]),r=0,a=i.length;r<a&&(e=i[r](e),e&&!e.type&&q(14),!!e);r++);return e}finally{Oe(n)}}function de(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function Zt(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),bs(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function fe(t,e){var n=Ke(),i=t.changeListeners_;if(i){i=i.slice();for(var r=0,a=i.length;r<a;r++)i[r](e);Oe(n)}}function no(t,e,n){return Je(function(){var i,r=vt(t,n)[U];(i=e)!=null||(e=Tu(t)),Wn(e).forEach(function(a){return r.make_(a,e[a])})}),t}var sa="splice",Se="update",ed=1e4,td={get:function(e,n){var i=e[U];return n===U?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):Ae(Fn,n)?Fn[n]:e[n]},set:function(e,n,i){var r=e[U];return n==="length"&&r.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:r.set_(parseInt(n),i),!0},preventExtensions:function(){q(15)}},Er=function(){function t(n,i,r,a){n===void 0&&(n="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=r,this.legacyMode_=a,this.atom_=new Yt(n),this.enhancer_=function(s,o){return i(s,o,"ObservableArray[..]")}}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.dehanceValues_=function(i){return this.dehancer!==void 0&&i.length>0?i.map(this.dehancer):i},e.intercept_=function(i){return Xt(this,i)},e.observe_=function(i,r){return r===void 0&&(r=!1),r&&i({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),Zt(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&q("Out of range: "+i);var r=this.values_.length;if(i!==r)if(i>r){for(var a=new Array(i-r),s=0;s<i-r;s++)a[s]=void 0;this.spliceWithArray_(r,0,a)}else this.spliceWithArray_(i,r-i)},e.updateArrayLength_=function(i,r){i!==this.lastKnownLength_&&q(16),this.lastKnownLength_+=r,this.legacyMode_&&r>0&&po(i+r+1)},e.spliceWithArray_=function(i,r,a){var s=this;this.atom_;var o=this.values_.length;if(i===void 0?i=0:i>o?i=o:i<0&&(i=Math.max(0,o+i)),arguments.length===1?r=o-i:r==null?r=0:r=Math.max(0,Math.min(r,o-i)),a===void 0&&(a=Hi),ie(this)){var l=re(this,{object:this.proxy_,type:sa,index:i,removedCount:r,added:a});if(!l)return Hi;r=l.removedCount,a=l.added}if(a=a.length===0?a:a.map(function(d){return s.enhancer_(d,void 0)}),this.legacyMode_){var u=a.length-r;this.updateArrayLength_(o,u)}var c=this.spliceItemsIntoValues_(i,r,a);return(r!==0||a.length!==0)&&this.notifyArraySplice_(i,a,c),this.dehanceValues_(c)},e.spliceItemsIntoValues_=function(i,r,a){if(a.length<ed){var s;return(s=this.values_).splice.apply(s,[i,r].concat(a))}else{var o=this.values_.slice(i,i+r),l=this.values_.slice(i+r);this.values_.length+=a.length-r;for(var u=0;u<a.length;u++)this.values_[i+u]=a[u];for(var c=0;c<l.length;c++)this.values_[i+a.length+c]=l[c];return o}},e.notifyArrayChildUpdate_=function(i,r,a){var s=!this.owned_&&xt(),o=de(this),l=o||s?{observableKind:"array",object:this.proxy_,type:Se,debugObjectName:this.atom_.name_,index:i,newValue:r,oldValue:a}:null;this.atom_.reportChanged(),o&&fe(this,l)},e.notifyArraySplice_=function(i,r,a){var s=!this.owned_&&xt(),o=de(this),l=o||s?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:sa,index:i,removed:a,added:r,removedCount:a.length,addedCount:r.length}:null;this.atom_.reportChanged(),o&&fe(this,l)},e.get_=function(i){if(this.legacyMode_&&i>=this.values_.length){console.warn("[mobx] Out of bounds read: "+i);return}return this.atom_.reportObserved(),this.dehanceValue_(this.values_[i])},e.set_=function(i,r){var a=this.values_;if(this.legacyMode_&&i>a.length&&q(17,i,a.length),i<a.length){this.atom_;var s=a[i];if(ie(this)){var o=re(this,{type:Se,object:this.proxy_,index:i,newValue:r});if(!o)return;r=o.newValue}r=this.enhancer_(r,s);var l=r!==s;l&&(a[i]=r,this.notifyArrayChildUpdate_(i,r,s))}else{for(var u=new Array(i+1-a.length),c=0;c<u.length-1;c++)u[c]=void 0;u[u.length-1]=r,this.spliceWithArray_(a.length,0,u)}},t}();function nd(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),ks(),Je(function(){var r=new Er(n,e,i,!1);Ss(r.values_,U,r);var a=new Proxy(r.values_,td);return r.proxy_=a,t&&t.length&&r.spliceWithArray_(0,0,t),a})}var Fn={clear:function(){return this.splice(0)},replace:function(e){var n=this[U];return n.spliceWithArray_(0,n.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,n){for(var i=arguments.length,r=new Array(i>2?i-2:0),a=2;a<i;a++)r[a-2]=arguments[a];var s=this[U];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(e);case 2:return s.spliceWithArray_(e,n)}return s.spliceWithArray_(e,n,r)},spliceWithArray:function(e,n,i){return this[U].spliceWithArray_(e,n,i)},push:function(){for(var e=this[U],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,i),e.values_.length},pop:function(){return this.splice(Math.max(this[U].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[U],n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return e.spliceWithArray_(0,0,i),e.values_.length},reverse:function(){return O.trackingDerivation&&q(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){O.trackingDerivation&&q(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[U],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};W("at",ne);W("concat",ne);W("flat",ne);W("includes",ne);W("indexOf",ne);W("join",ne);W("lastIndexOf",ne);W("slice",ne);W("toString",ne);W("toLocaleString",ne);W("toSorted",ne);W("toSpliced",ne);W("with",ne);W("every",pe);W("filter",pe);W("find",pe);W("findIndex",pe);W("findLast",pe);W("findLastIndex",pe);W("flatMap",pe);W("forEach",pe);W("map",pe);W("some",pe);W("toReversed",pe);W("reduce",io);W("reduceRight",io);function W(t,e){typeof Array.prototype[t]=="function"&&(Fn[t]=e(t))}function ne(t){return function(){var e=this[U];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function pe(t){return function(e,n){var i=this,r=this[U];r.atom_.reportObserved();var a=r.dehanceValues_(r.values_);return a[t](function(s,o){return e.call(n,s,o,i)})}}function io(t){return function(){var e=this,n=this[U];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),r=arguments[0];return arguments[0]=function(a,s,o){return r(a,s,o,e)},i[t].apply(i,arguments)}}var id=Ge("ObservableArrayAdministration",Er);function ti(t){return Gn(t)&&id(t[U])}var ro,ao,rd={},Re="add",Rn="delete";ro=Symbol.iterator;ao=Symbol.toStringTag;var so=function(){function t(n,i,r){var a=this;i===void 0&&(i=ze),r===void 0&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[U]=rd,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=i,this.name_=r,he(Map)||q(18),Je(function(){a.keysAtom_=Os("ObservableMap.keys()"),a.data_=new Map,a.hasMap_=new Map,n&&a.merge(n)})}var e=t.prototype;return e.has_=function(i){return this.data_.has(i)},e.has=function(i){var r=this;if(!O.trackingDerivation)return this.has_(i);var a=this.hasMap_.get(i);if(!a){var s=a=new je(this.has_(i),Jn,"ObservableMap.key?",!1);this.hasMap_.set(i,s),Ys(s,function(){return r.hasMap_.delete(i)})}return a.get()},e.set=function(i,r){var a=this.has_(i);if(ie(this)){var s=re(this,{type:a?Se:Re,object:this,newValue:r,name:i});if(!s)return this;r=s.newValue}return a?this.updateValue_(i,r):this.addValue_(i,r),this},e.delete=function(i){var r=this;if(this.keysAtom_,ie(this)){var a=re(this,{type:Rn,object:this,name:i});if(!a)return!1}if(this.has_(i)){var s=xt(),o=de(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:Rn,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return Ee(function(){var u;r.keysAtom_.reportChanged(),(u=r.hasMap_.get(i))==null||u.setNewValue_(!1);var c=r.data_.get(i);c.setNewValue_(void 0),r.data_.delete(i)}),o&&fe(this,l),!0}return!1},e.updateValue_=function(i,r){var a=this.data_.get(i);if(r=a.prepareNewValue_(r),r!==O.UNCHANGED){var s=xt(),o=de(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:Se,object:this,oldValue:a.value_,name:i,newValue:r}:null;a.setNewValue_(r),o&&fe(this,l)}},e.addValue_=function(i,r){var a=this;this.keysAtom_,Ee(function(){var u,c=new je(r,a.enhancer_,"ObservableMap.key",!1);a.data_.set(i,c),r=c.value_,(u=a.hasMap_.get(i))==null||u.setNewValue_(!0),a.keysAtom_.reportChanged()});var s=xt(),o=de(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:Re,object:this,name:i,newValue:r}:null;o&&fe(this,l)},e.get=function(i){return this.has(i)?this.dehanceValue_(this.data_.get(i).get()):this.dehanceValue_(void 0)},e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.keys=function(){return this.keysAtom_.reportObserved(),this.data_.keys()},e.values=function(){var i=this,r=this.keys();return jt({next:function(){var s=r.next(),o=s.done,l=s.value;return{done:o,value:o?void 0:i.get(l)}}})},e.entries=function(){var i=this,r=this.keys();return jt({next:function(){var s=r.next(),o=s.done,l=s.value;return{done:o,value:o?void 0:[l,i.get(l)]}}})},e[ro]=function(){return this.entries()},e.forEach=function(i,r){for(var a=st(this),s;!(s=a()).done;){var o=s.value,l=o[0],u=o[1];i.call(r,u,l,this)}},e.merge=function(i){var r=this;return We(i)&&(i=new Map(i)),Ee(function(){De(i)?Su(i).forEach(function(a){return r.set(a,i[a])}):Array.isArray(i)?i.forEach(function(a){var s=a[0],o=a[1];return r.set(s,o)}):pt(i)?(i.constructor!==Map&&q(19,i),i.forEach(function(a,s){return r.set(s,a)})):i!=null&&q(20,i)}),this},e.clear=function(){var i=this;Ee(function(){Vs(function(){for(var r=st(i.keys()),a;!(a=r()).done;){var s=a.value;i.delete(s)}})})},e.replace=function(i){var r=this;return Ee(function(){for(var a=ad(i),s=new Map,o=!1,l=st(r.data_.keys()),u;!(u=l()).done;){var c=u.value;if(!a.has(c)){var d=r.delete(c);if(d)o=!0;else{var f=r.data_.get(c);s.set(c,f)}}}for(var v=st(a.entries()),p;!(p=v()).done;){var m=p.value,N=m[0],_=m[1],P=r.data_.has(N);if(r.set(N,_),r.data_.has(N)){var V=r.data_.get(N);s.set(N,V),P||(o=!0)}}if(!o)if(r.data_.size!==s.size)r.keysAtom_.reportChanged();else for(var T=r.data_.keys(),L=s.keys(),M=T.next(),G=L.next();!M.done;){if(M.value!==G.value){r.keysAtom_.reportChanged();break}M=T.next(),G=L.next()}r.data_=s}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,r){return Zt(this,i)},e.intercept_=function(i){return Xt(this,i)},br(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:ao,get:function(){return"Map"}}]),t}(),We=Ge("ObservableMap",so);function ad(t){if(pt(t)||We(t))return t;if(Array.isArray(t))return new Map(t);if(De(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return q(21,t)}var oo,lo,sd={};oo=Symbol.iterator;lo=Symbol.toStringTag;var uo=function(){function t(n,i,r){var a=this;i===void 0&&(i=ze),r===void 0&&(r="ObservableSet"),this.name_=void 0,this[U]=sd,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,he(Set)||q(22),this.enhancer_=function(s,o){return i(s,o,r)},Je(function(){a.atom_=Os(a.name_),n&&a.replace(n)})}var e=t.prototype;return e.dehanceValue_=function(i){return this.dehancer!==void 0?this.dehancer(i):i},e.clear=function(){var i=this;Ee(function(){Vs(function(){for(var r=st(i.data_.values()),a;!(a=r()).done;){var s=a.value;i.delete(s)}})})},e.forEach=function(i,r){for(var a=st(this),s;!(s=a()).done;){var o=s.value;i.call(r,o,o,this)}},e.add=function(i){var r=this;if(this.atom_,ie(this)){var a=re(this,{type:Re,object:this,newValue:i});if(!a)return this}if(!this.has(i)){Ee(function(){r.data_.add(r.enhancer_(i,void 0)),r.atom_.reportChanged()});var s=!1,o=de(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:Re,object:this,newValue:i}:null;o&&fe(this,l)}return this},e.delete=function(i){var r=this;if(ie(this)){var a=re(this,{type:Rn,object:this,oldValue:i});if(!a)return!1}if(this.has(i)){var s=!1,o=de(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:Rn,object:this,oldValue:i}:null;return Ee(function(){r.atom_.reportChanged(),r.data_.delete(i)}),o&&fe(this,l),!0}return!1},e.has=function(i){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(i))},e.entries=function(){var i=0,r=Array.from(this.keys()),a=Array.from(this.values());return jt({next:function(){var o=i;return i+=1,o<a.length?{value:[r[o],a[o]],done:!1}:{done:!0}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var i=this,r=0,a=Array.from(this.data_.values());return jt({next:function(){return r<a.length?{value:i.dehanceValue_(a[r++]),done:!1}:{done:!0}}})},e.replace=function(i){var r=this;return gt(i)&&(i=new Set(i)),Ee(function(){Array.isArray(i)?(r.clear(),i.forEach(function(a){return r.add(a)})):Wt(i)?(r.clear(),i.forEach(function(a){return r.add(a)})):i!=null&&q("Cannot initialize set from "+i)}),this},e.observe_=function(i,r){return Zt(this,i)},e.intercept_=function(i){return Xt(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[oo]=function(){return this.values()},br(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:lo,get:function(){return"Set"}}]),t}(),gt=Ge("ObservableSet",uo),oa=Object.create(null),la="remove",co=function(){function t(n,i,r,a){i===void 0&&(i=new Map),a===void 0&&(a=ec),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=n,this.values_=i,this.name_=r,this.defaultAnnotation_=a,this.keysAtom_=new Yt("ObservableObject.keys"),this.isPlainObject_=De(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(i){return this.values_.get(i).get()},e.setObservablePropValue_=function(i,r){var a=this.values_.get(i);if(a instanceof ut)return a.set(r),!0;if(ie(this)){var s=re(this,{type:Se,object:this.proxy_||this.target_,name:i,newValue:r});if(!s)return null;r=s.newValue}if(r=a.prepareNewValue_(r),r!==O.UNCHANGED){var o=de(this),l=!1,u=o||l?{type:Se,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:i,newValue:r}:null;a.setNewValue_(r),o&&fe(this,u)}return!0},e.get_=function(i){return O.trackingDerivation&&!Ae(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,r,a){return a===void 0&&(a=!1),Ae(this.target_,i)?this.values_.has(i)?this.setObservablePropValue_(i,r):a?Reflect.set(this.target_,i,r):(this.target_[i]=r,!0):this.extend_(i,{value:r,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,a)},e.has_=function(i){if(!O.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var r=this.pendingKeys_.get(i);return r||(r=new je(i in this.target_,Jn,"ObservableObject.key?",!1),this.pendingKeys_.set(i,r)),r.get()},e.make_=function(i,r){if(r===!0&&(r=this.defaultAnnotation_),r!==!1){if(!(i in this.target_)){var a;if((a=this.target_[ge])!=null&&a[i])return;q(1,r.annotationType_,this.name_+"."+i.toString())}for(var s=this.target_;s&&s!==qn;){var o=An(s,i);if(o){var l=r.make_(this,i,o,s);if(l===0)return;if(l===1)break}s=Object.getPrototypeOf(s)}ca(this,r,i)}},e.extend_=function(i,r,a,s){if(s===void 0&&(s=!1),a===!0&&(a=this.defaultAnnotation_),a===!1)return this.defineProperty_(i,r,s);var o=a.extend_(this,i,r,s);return o&&ca(this,a,i),o},e.defineProperty_=function(i,r,a){a===void 0&&(a=!1),this.keysAtom_;try{ae();var s=this.delete_(i);if(!s)return s;if(ie(this)){var o=re(this,{object:this.proxy_||this.target_,name:i,type:Re,newValue:r.value});if(!o)return null;var l=o.newValue;r.value!==l&&(r=Pe({},r,{value:l}))}if(a){if(!Reflect.defineProperty(this.target_,i,r))return!1}else be(this.target_,i,r);this.notifyPropertyAddition_(i,r.value)}finally{se()}return!0},e.defineObservableProperty_=function(i,r,a,s){s===void 0&&(s=!1),this.keysAtom_;try{ae();var o=this.delete_(i);if(!o)return o;if(ie(this)){var l=re(this,{object:this.proxy_||this.target_,name:i,type:Re,newValue:r});if(!l)return null;r=l.newValue}var u=ua(i),c={configurable:O.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:u.get,set:u.set};if(s){if(!Reflect.defineProperty(this.target_,i,c))return!1}else be(this.target_,i,c);var d=new je(r,a,"ObservableObject.key",!1);this.values_.set(i,d),this.notifyPropertyAddition_(i,d.value_)}finally{se()}return!0},e.defineComputedProperty_=function(i,r,a){a===void 0&&(a=!1),this.keysAtom_;try{ae();var s=this.delete_(i);if(!s)return s;if(ie(this)){var o=re(this,{object:this.proxy_||this.target_,name:i,type:Re,newValue:void 0});if(!o)return null}r.name||(r.name="ObservableObject.key"),r.context=this.proxy_||this.target_;var l=ua(i),u={configurable:O.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:l.get,set:l.set};if(a){if(!Reflect.defineProperty(this.target_,i,u))return!1}else be(this.target_,i,u);this.values_.set(i,new ut(r)),this.notifyPropertyAddition_(i,void 0)}finally{se()}return!0},e.delete_=function(i,r){if(r===void 0&&(r=!1),this.keysAtom_,!Ae(this.target_,i))return!0;if(ie(this)){var a=re(this,{object:this.proxy_||this.target_,name:i,type:la});if(!a)return null}try{var s,o;ae();var l=de(this),u=!1,c=this.values_.get(i),d=void 0;if(!c&&(l||u)){var f;d=(f=An(this.target_,i))==null?void 0:f.value}if(r){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(c&&(this.values_.delete(i),c instanceof je&&(d=c.value_),Hs(c)),this.keysAtom_.reportChanged(),(s=this.pendingKeys_)==null||(o=s.get(i))==null||o.set(i in this.target_),l||u){var v={type:la,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:d,name:i};l&&fe(this,v)}}finally{se()}return!0},e.observe_=function(i,r){return Zt(this,i)},e.intercept_=function(i){return Xt(this,i)},e.notifyPropertyAddition_=function(i,r){var a,s,o=de(this),l=!1;if(o||l){var u=o||l?{type:Re,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:r}:null;o&&fe(this,u)}(a=this.pendingKeys_)==null||(s=a.get(i))==null||s.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),Wn(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function vt(t,e){var n;if(Ae(t,U))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",r=new co(t,new Map,String(i),dc(e));return Kn(t,U,r),t}var od=Ge("ObservableObjectAdministration",co);function ua(t){return oa[t]||(oa[t]={get:function(){return this[U].getObservablePropValue_(t)},set:function(n){return this[U].setObservablePropValue_(t,n)}})}function ni(t){return Gn(t)?od(t[U]):!1}function ca(t,e,n){var i;(i=t.target_[ge])==null||delete i[n]}var ld=ho(0),ud=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),Ai=0,fo=function(){};function cd(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}cd(fo,Array.prototype);var Ar=function(t,e,n){As(i,t);function i(a,s,o,l){var u;return o===void 0&&(o="ObservableArray"),l===void 0&&(l=!1),u=t.call(this)||this,Je(function(){var c=new Er(o,s,l,!0);c.proxy_=Ni(u),Ss(Ni(u),U,c),a&&a.length&&u.spliceWithArray(0,0,a),ud&&Object.defineProperty(Ni(u),"0",ld)}),u}var r=i.prototype;return r.concat=function(){this[U].atom_.reportObserved();for(var s=arguments.length,o=new Array(s),l=0;l<s;l++)o[l]=arguments[l];return Array.prototype.concat.apply(this.slice(),o.map(function(u){return ti(u)?u.slice():u}))},r[n]=function(){var a=this,s=0;return jt({next:function(){return s<a.length?{value:a[s++],done:!1}:{done:!0,value:void 0}}})},br(i,[{key:"length",get:function(){return this[U].getArrayLength_()},set:function(s){this[U].setArrayLength_(s)}},{key:e,get:function(){return"Array"}}]),i}(fo,Symbol.toStringTag,Symbol.iterator);Object.entries(Fn).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&Kn(Ar.prototype,e,n)});function ho(t){return{enumerable:!1,configurable:!0,get:function(){return this[U].get_(t)},set:function(n){this[U].set_(t,n)}}}function dd(t){be(Ar.prototype,""+t,ho(t))}function po(t){if(t>Ai){for(var e=Ai;e<t+100;e++)dd(e);Ai=t}}po(1e3);function fd(t,e,n){return new Ar(t,e,n)}function In(t,e){if(typeof t=="object"&&t!==null){if(ti(t))return e!==void 0&&q(23),t[U].atom_;if(gt(t))return t.atom_;if(We(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||q(25,e,Zi(t)),n}if(ni(t)){if(!e)return q(26);var i=t[U].values_.get(e);return i||q(27,e,Zi(t)),i}if(_r(t)||Zn(t)||xn(t))return t}else if(he(t)&&xn(t[U]))return t[U];q(28)}function hd(t,e){if(t||q(29),_r(t)||Zn(t)||xn(t)||We(t)||gt(t))return t;if(t[U])return t[U];q(24,t)}function Zi(t,e){var n;if(e!==void 0)n=In(t,e);else{if(ei(t))return t.name;ni(t)||We(t)||gt(t)?n=hd(t):n=In(t)}return n.name_}function Je(t){var e=Ke(),n=Qn(!0);ae();try{return t()}finally{se(),Xn(n),Oe(e)}}var da=qn.toString;function Or(t,e,n){return n===void 0&&(n=-1),er(t,e,n)}function er(t,e,n,i,r){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var a=typeof t;if(a!=="function"&&a!=="object"&&typeof e!="object")return!1;var s=da.call(t);if(s!==da.call(e))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+t==""+e;case"[object Number]":return+t!=+t?+e!=+e:+t==0?1/+t===1/e:+t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object Symbol]":return typeof Symbol!="undefined"&&Symbol.valueOf.call(t)===Symbol.valueOf.call(e);case"[object Map]":case"[object Set]":n>=0&&n++;break}t=fa(t),e=fa(e);var o=s==="[object Array]";if(!o){if(typeof t!="object"||typeof e!="object")return!1;var l=t.constructor,u=e.constructor;if(l!==u&&!(he(l)&&l instanceof l&&he(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],r=r||[];for(var c=i.length;c--;)if(i[c]===t)return r[c]===e;if(i.push(t),r.push(e),o){if(c=t.length,c!==e.length)return!1;for(;c--;)if(!er(t[c],e[c],n-1,i,r))return!1}else{var d=Object.keys(t),f;if(c=d.length,Object.keys(e).length!==c)return!1;for(;c--;)if(f=d[c],!(Ae(e,f)&&er(t[f],e[f],n-1,i,r)))return!1}return i.pop(),r.pop(),!0}function fa(t){return ti(t)?t.slice():pt(t)||We(t)||Wt(t)||gt(t)?Array.from(t.entries()):t}function jt(t){return t[Symbol.iterator]=pd,t}function pd(){return this}["Symbol","Map","Set"].forEach(function(t){var e=kr();typeof e[t]=="undefined"&&q("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:xc,extras:{getDebugName:Zi},$mobx:U});class mo{constructor(e,n){w(this,"logger");w(this,"channel");w(this,"listeners",new Map);w(this,"eventQueue",new Map);this.logger=$e.withPrefix(n,"EventBus");try{this.logger.debug(`Creating BroadcastChannel with name "${e}"`),this.channel=new BroadcastChannel(e),this.channel.onmessage=i=>this.handleMessage(i),this.channel.onmessageerror=i=>this.logger.error("NizzaBroadcastChannel error:",i)}catch(i){throw this.logger.error("Failed to create NizzaBroadcastChannel:",i),i}}on(e,n){return this.logger.debug(`Subscribing to pattern "${e}"`),this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.logger.debug(`Emitting event "${e}" with data`,n),this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;this.logger.debug(`Received message "${i}" with data`,n);for(const[r,a]of this.listeners.entries())this.matchWildcard(r,i)&&(this.logger.debug(`Matching pattern "${r}" for event "${i}"`),a.forEach(s=>s({...n,wildcard:r})))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const r=new Error("Invalid arguments");throw this.logger.error(r),r}this.listeners.has(e)||(this.logger.debug(`Adding new pattern "${e}"`),this.listeners.set(e,new Set));const i=Array.from(this.eventQueue).filter(([r])=>{const a=this.matchWildcard(e,r);return a&&(this.eventQueue.delete(r),this.logger.debug(`Dequeued pending events for "${r}".`)),a}).flatMap(([,r])=>r);for(const[r,a]of this.listeners.entries())this.matchWildcard(r,e)&&(this.logger.debug(`Adding listener to pattern "${r}"`),a.add(n),i.length&&(this.logger.debug(`Delivering pending events for "${e}".`),i.forEach(s=>{n({...s,wildcard:r})})))}emitEvent(e,n,i){if(typeof e!="string"){const s=new Error("Invalid arguments");throw this.logger.error(s),s}const r={name:e,data:n,attrs:i},a=Array.from(this.getMatchingListeners(e));if(a.length){this.logger.debug(`Delivering event "${e}" to listeners`);for(const[s,o]of a)o({...r,wildcard:s})}else this.logger.debug(`No listeners for event "${e}", enqueuing`),this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(r);this.logger.debug("Posting message to channel",r),this.channel.postMessage(r)}*getMatchingListeners(e){this.logger.debug(`Getting matching listeners for event "${e}"`);for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,e))for(const r of i)yield[n,r]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){this.logger.debug(`Unsubscribing from event "${e}"`);const i=this.listeners.get(e);i.delete(n),i.size===0&&(this.logger.debug(`No more listeners for event "${e}", deleting`),this.listeners.delete(e))}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*"),a=new RegExp(`^${i}$`).test(n);return this.logger.debug(`Wildcard "${e}" matches with pattern "${n}": ${a}`),a}}const md="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let gd=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=md[n[t]&63];return e};const wr=(t=8)=>gd(t),vd=t=>{const e=Object.entries(t).reduce((n,[i,r])=>r!==void 0?`${n}${n?"&":""}${i}=${r}`:n,"");return e?`?${e}`:""},go=t=>{const e=document.getElementById(t);return e?new URL(e.src).searchParams:new URLSearchParams};function yd(){const t=new Error().stack.split(`
4
+ `);return t.length<3?"":t[2].trim().substring(3)}function kd(t){return new Promise(e=>setTimeout(e,t))}var Tr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Cr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vo={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(Tr,function(){var e=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),r=["trace","debug","info","warn","error"],a={},s=null;function o(m,N){var _=m[N];if(typeof _.bind=="function")return _.bind(m);try{return Function.prototype.bind.call(_,m)}catch{return function(){return Function.prototype.apply.apply(_,[m,arguments])}}}function l(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function u(m){return m==="debug"&&(m="log"),typeof console===n?!1:m==="trace"&&i?l:console[m]!==void 0?o(console,m):console.log!==void 0?o(console,"log"):e}function c(){for(var m=this.getLevel(),N=0;N<r.length;N++){var _=r[N];this[_]=N<m?e:this.methodFactory(_,m,this.name)}if(this.log=this.debug,typeof console===n&&m<this.levels.SILENT)return"No console available for logging"}function d(m){return function(){typeof console!==n&&(c.call(this),this[m].apply(this,arguments))}}function f(m,N,_){return u(m)||d.apply(this,arguments)}function v(m,N){var _=this,P,V,T,L="loglevel";typeof m=="string"?L+=":"+m:typeof m=="symbol"&&(L=void 0);function M(S){var E=(r[S]||"silent").toUpperCase();if(!(typeof window===n||!L)){try{window.localStorage[L]=E;return}catch{}try{window.document.cookie=encodeURIComponent(L)+"="+E+";"}catch{}}}function G(){var S;if(!(typeof window===n||!L)){try{S=window.localStorage[L]}catch{}if(typeof S===n)try{var E=window.document.cookie,A=encodeURIComponent(L),h=E.indexOf(A+"=");h!==-1&&(S=/^([^;]+)/.exec(E.slice(h+A.length+1))[1])}catch{}return _.levels[S]===void 0&&(S=void 0),S}}function y(){if(!(typeof window===n||!L)){try{window.localStorage.removeItem(L)}catch{}try{window.document.cookie=encodeURIComponent(L)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function C(S){var E=S;if(typeof E=="string"&&_.levels[E.toUpperCase()]!==void 0&&(E=_.levels[E.toUpperCase()]),typeof E=="number"&&E>=0&&E<=_.levels.SILENT)return E;throw new TypeError("log.setLevel() called with invalid level: "+S)}_.name=m,_.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},_.methodFactory=N||f,_.getLevel=function(){return T!=null?T:V!=null?V:P},_.setLevel=function(S,E){return T=C(S),E!==!1&&M(T),c.call(_)},_.setDefaultLevel=function(S){V=C(S),G()||_.setLevel(S,!1)},_.resetLevel=function(){T=null,y(),c.call(_)},_.enableAll=function(S){_.setLevel(_.levels.TRACE,S)},_.disableAll=function(S){_.setLevel(_.levels.SILENT,S)},_.rebuild=function(){if(s!==_&&(P=C(s.getLevel())),c.call(_),s===_)for(var S in a)a[S].rebuild()},P=C(s?s.getLevel():"WARN");var F=G();F!=null&&(T=C(F)),c.call(_)}s=new v,s.getLogger=function(N){if(typeof N!="symbol"&&typeof N!="string"||N==="")throw new TypeError("You must supply a name when creating a logger.");var _=a[N];return _||(_=a[N]=new v(N,s.methodFactory)),_};var p=typeof window!==n?window.log:void 0;return s.noConflict=function(){return typeof window!==n&&window.log===s&&(window.log=p),s},s.getLoggers=function(){return a},s.default=s,s})})(vo);var yo=vo.exports;const Oi=Cr(yo);var ko={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.prefix=n(e)})(Tr,function(e){var n=function(c){for(var d=1,f=arguments.length,v;d<f;d++)for(v in arguments[d])Object.prototype.hasOwnProperty.call(arguments[d],v)&&(c[v]=arguments[d][v]);return c},i={template:"[%t] %l:",levelFormatter:function(c){return c.toUpperCase()},nameFormatter:function(c){return c||"root"},timestampFormatter:function(c){return c.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},r,a={},s=function(c){if(!c||!c.getLogger)throw new TypeError("Argument is not a root logger");r=c},o=function(c,d){if(!c||!c.setLevel)throw new TypeError("Argument is not a logger");var f=c.methodFactory,v=c.name||"",p=a[v]||a[""]||i;function m(N,_,P){var V=f(N,_,P),T=a[P]||a[""],L=T.template.indexOf("%t")!==-1,M=T.template.indexOf("%l")!==-1,G=T.template.indexOf("%n")!==-1;return function(){for(var y="",C=arguments.length,F=Array(C),S=0;S<C;S++)F[S]=arguments[S];if(v||!a[P]){var E=T.timestampFormatter(new Date),A=T.levelFormatter(N),h=T.nameFormatter(P);T.format?y+=T.format(A,h,E):(y+=T.template,L&&(y=y.replace(/%t/,E)),M&&(y=y.replace(/%l/,A)),G&&(y=y.replace(/%n/,h))),F.length&&typeof F[0]=="string"?F[0]=y+" "+F[0]:F.unshift(y)}V.apply(void 0,F)}}return a[v]||(c.methodFactory=m),d=d||{},d.template&&(d.format=void 0),a[v]=n({},p,d),c.setLevel(c.getLevel()),r||c.warn("It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"),c},l={reg:s,apply:o},u;return e&&(u=e.prefix,l.noConflict=function(){return e.prefix===l&&(e.prefix=u),l}),l})})(ko);var bd=ko.exports;const ha=Cr(bd);var lt;let $e=(lt=class{constructor(e=""){w(this,"provider",Oi);w(this,"defaultLevel",yo.levels.INFO);this.namePrefix=e,this.namePrefix=e?`${e}-`:"",this.provider.setDefaultLevel(this.defaultLevel),ha.reg(Oi),ha.apply(Oi,{template:"%t %l [%n]",nameFormatter:n=>{var i;return(i=n==null?void 0:n.toLowerCase())!=null?i:""},timestampFormatter:()=>new Date().toTimeString().slice(0,8)})}createLogger(e){const n=`${this.namePrefix}${e.toLowerCase()}`,i=this.provider.getLogger(n),r=localStorage.getItem(`loglevel:${n}`);return i.setLevel(r||this.defaultLevel),i}static withPrefix(e,n){const i=/\(\w+\)/,r={get(a,s){const o=a[s];return typeof o=="function"&&lt.LOG_METHODS.includes(s)?(...l)=>(typeof l[0]=="string"&&!i.test(l[0])&&(l[0]=`(${n}) ${l[0]}`),o.apply(a,l)):o}};return new Proxy(e,r)}},w(lt,"LOG_METHODS",["trace","debug","info","warn","error","log"]),lt);const ce=class ce{constructor(){w(this,"instanceId",wr());w(this,"log",new $e("nz"));w(this,"coreLogger",this.log.createLogger("core"));w(this,"_config",null);w(this,"_account");w(this,"_accountStatus","idle");w(this,"_productDataSource");w(this,"_eventBus",new mo("nizza",this.coreLogger));this.coreLogger=$e.withPrefix(this.coreLogger,"NizzaStore"),no(this,{_config:X,_account:X,_productDataSource:X,config:Fe,account:Fe,accountName:Fe,accountStatus:Fe,configure:ve,setProductDataSource:ve,setAddToCartConfig:ve,setProductId:ve},{name:"NizzaStore",autoBind:!0})}static instance(){var n;if(!!((n=window==null?void 0:window.nizza)!=null&&n.store))ce._instance=window.nizza.store;else{const i=new ce;ce._instance=i}return window.nizza||(window.nizza={},window.nz={},ce._instance.coreLogger.debug("Initialized nizza window object")),window.nizza.store=ce._instance,window.nz=window.nizza,ce._instance}async configure(e){var n;try{const i=(n=this._config)==null?void 0:n.account;if(this._config=e,i!==e.account){this.setAccountStatus("loading");const r=await tl(e.account);this.setAccount(r),this.setAccountStatus("success")}if(e.getProductDataSource){const r=await e.getProductDataSource();this.setProductDataSource(r)}}catch(i){this.setAccountStatus("error"),this.coreLogger.error("Error running configure:",i)}}setAccount(e){this._account=e}setAccountStatus(e){this._accountStatus=e}setProductDataSource(e){this._productDataSource=e}setProductId(e){this._config&&(this._config.productId=e)}setOrderFormId(e){this._config&&(this._config.orderFormId=e)}setAddToCartConfig(e){if(!this._config)throw new Error("you cannot set addToCartConfig before running configure()");this._config.addToCartConfig=e}get version(){return ce.version}get config(){return this._config}get account(){return this._account}get accountStatus(){return this._accountStatus}get accountName(){var e;return(e=this._config)==null?void 0:e.account}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};w(ce,"version","5"),w(ce,"_instance");let Dn=ce;const Ye=t=>{const e=Dn.instance();return Yc(()=>!!e.account,()=>t==null?void 0:t(e)),e};function it(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function vn(t){return function e(n){return arguments.length===0||it(n)?e:t.apply(this,arguments)}}function xr(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return it(n)?e:vn(function(r){return t(n,r)});default:return it(n)&&it(i)?e:it(n)?vn(function(r){return t(r,i)}):it(i)?vn(function(r){return t(n,r)}):t(n,i)}}}const _d=Number.isInteger||function(e){return e<<0===e};function Sd(t){return Object.prototype.toString.call(t)==="[object String]"}var Nd=xr(function(e,n){var i=e<0?n.length+e:e;return Sd(n)?n.charAt(i):n[i]}),Ed=vn(function(e){return e==null}),Ad=xr(function(e,n){return e.map(function(i){for(var r=n,a=0,s;a<i.length;){if(r==null)return;s=i[a],r=_d(s)?Nd(s,r):r[s],a+=1}return r})}),Od=xr(function(e,n){return Ad([e],n)[0]});class yt extends Error{constructor(e,n,i){super(n),this.value=i,this.name=e}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value}}}}class bo extends yt{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class Fr extends yt{constructor(e){var n;super("APP_UNEXPECTED_ERROR",(n=e.message)!=null?n:"An unexpected error occurred.",e)}}class _o extends yt{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class So extends yt{constructor(e){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
5
5
  Configuration property invalid: "${e}".
6
6
 
7
7
  It looks like you are trying to use a configuration property that is required but is "undefined", make sure you have initialized the global object "nizza".
@@ -23,48 +23,96 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
23
23
  account: env.account,
24
24
  ...
25
25
  });
26
- `)}}function md(t,e){e.forEach(n=>{if(ud(cd(n.split("."),t)))throw new ks(n)})}if(!z.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!Ya)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function hd(t){t()}function pd(t){t||(t=hd),Fu({reactionScheduler:t})}function gd(t){return Tu(t)}var vd=1e4,kd=1e4,yd=function(){function t(e){var n=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(i){i===void 0&&(i=vd),clearTimeout(n.sweepTimeout),n.sweepTimeout=void 0;var r=Date.now();n.registrations.forEach(function(a,s){r-a.registeredAt>=i&&(n.finalize(a.value),n.registrations.delete(s))}),n.registrations.size>0&&n.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){n.sweep(0)}})}return Object.defineProperty(t.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,n,i){this.registrations.set(i,{value:n,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(t.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(t.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,kd))}}),t}(),bd=typeof FinalizationRegistry!="undefined"?FinalizationRegistry:yd,bi=new bd(function(t){var e;(e=t.reaction)===null||e===void 0||e.dispose(),t.reaction=null}),vr=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,a=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(o){s={error:o}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return a};function kr(t){return"observer".concat(t)}var _d=function(){function t(){}return t}();function Sd(){return new _d}function Nd(t,e){e===void 0&&(e="observed");var n=vr(z.useState(Sd),1),i=n[0],r=vr(z.useState(),2),a=r[1],s=function(){return a([])},o=z.useRef(null);o.current||(o.current={reaction:null,mounted:!1,changedBeforeMount:!1});var l=o.current;l.reaction||(l.reaction=new _t(kr(e),function(){l.mounted?s():l.changedBeforeMount=!0}),bi.register(i,l,l)),z.useDebugValue(l.reaction,gd),z.useEffect(function(){return bi.unregister(l),l.mounted=!0,l.reaction?l.changedBeforeMount&&(l.changedBeforeMount=!1,s()):(l.reaction=new _t(kr(e),function(){s()}),s()),function(){l.reaction.dispose(),l.reaction=null,l.mounted=!1,l.changedBeforeMount=!1}},[]);var u,d;if(l.reaction.track(function(){try{u=t()}catch(c){d=c}}),d)throw d;return u}var ys=typeof Symbol=="function"&&Symbol.for;ys?Symbol.for("react.forward_ref"):typeof z.forwardRef=="function"&&z.forwardRef(function(t){return null}).$$typeof;ys?Symbol.for("react.memo"):typeof z.memo=="function"&&z.memo(function(t){return null}).$$typeof;var Xn;pd(la.unstable_batchedUpdates);Xn=bi.finalizeAllImmediately;function Ad(t,e){return e===void 0&&(e="observed"),Nd(t,e)}function bs(){return z.useMemo(rt,[])}function _s(t){const e=bs();return Ad(()=>t(e))}const{coreLogger:wd}=rt(),Od=Ee.withPrefix(wd,"CustomFetch");async function Ui(t){const{url:e,method:n="GET",body:i,raw:r=!1,contentTypeJson:a=!0,timeout:s,...o}=t,l=a&&!t.headers?new Headers({"content-type":"application/json"}):t.headers;try{const u=new AbortController,{signal:d}=u;let c;const f=fetch(e,{method:n,headers:l,body:i,signal:d,...o});s&&(c=setTimeout(()=>{u.abort()},s));const k=await f;if(r)return k;const p=await k.json();if(clearTimeout(c),!k.ok){const m=p?JSON.stringify(p):k.statusText;throw new Error(m)}return p}catch(u){throw Od.error(u),u}}const Ed=t=>Ui({...t,contentTypeJson:!1,raw:!1});function Fd(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Ss(i,`${t}.${n}`))}const Ss=(t,e,n)=>{const i=[t],r=new Blob(i,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(r,e);const a=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(r):window.webkitURL.createObjectURL(r),s=document.createElement("a");return s.style.display="none",s.href=a,s.setAttribute("download",e),typeof s.download=="undefined"&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),setTimeout(()=>{document.body.removeChild(s),window.URL.revokeObjectURL(a)},200)},{coreLogger:Cd}=rt(),Td=Ee.withPrefix(Cd,"getClientTimeZone");function xd(){var i,r,a;let t=null,e=null,n=null;try{t=(a=(r=(i=Intl.DateTimeFormat())==null?void 0:i.resolvedOptions())==null?void 0:r.timeZone)!=null?a:null;const s=-new Date().getTimezoneOffset();n=s;const o=s>=0?"+":"-",l=String(Math.floor(Math.abs(s)/60)).padStart(2,"0"),u=String(Math.abs(s)%60).padStart(2,"0");e=`${o}${l}:${u}`}catch{Td.error("Error obtaining time zone or offset")}return{offset:e,offsetValue:n,value:t,country:null,included:null,label:null}}class Ns{constructor(e){w(this,"aggregate");w(this,"_numSetPropsApplied",0);this.aggregate=e}setProps(e){for(const[n,i]of Object.entries(e))n in this.aggregate&&(this.aggregate[n]=i);this._numSetPropsApplied++}get isFirstSetProps(){return this._numSetPropsApplied===1}}function As(t){return new Ns(t)}class Rd{constructor(e){w(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}function ws(t,e){return function(){return t.apply(e,arguments)}}const{toString:Pd}=Object.prototype,{getPrototypeOf:Mi}=Object,Pn=(t=>e=>{const n=Pd.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),pe=t=>(t=t.toLowerCase(),e=>Pn(e)===t),$n=t=>e=>typeof e===t,{isArray:at}=Array,wt=$n("undefined");function $d(t){return t!==null&&!wt(t)&&t.constructor!==null&&!wt(t.constructor)&&te(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Os=pe("ArrayBuffer");function Ld(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Os(t.buffer),e}const Dd=$n("string"),te=$n("function"),Es=$n("number"),Ln=t=>t!==null&&typeof t=="object",Id=t=>t===!0||t===!1,Zt=t=>{if(Pn(t)!=="object")return!1;const e=Mi(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Vd=pe("Date"),jd=pe("File"),Ud=pe("Blob"),Md=pe("FileList"),Bd=t=>Ln(t)&&te(t.pipe),zd=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||te(t.append)&&((e=Pn(t))==="formdata"||e==="object"&&te(t.toString)&&t.toString()==="[object FormData]"))},Hd=pe("URLSearchParams"),Gd=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Vt(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let i,r;if(typeof t!="object"&&(t=[t]),at(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const a=n?Object.getOwnPropertyNames(t):Object.keys(t),s=a.length;let o;for(i=0;i<s;i++)o=a[i],e.call(null,t[o],o,t)}}function Fs(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const Cs=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Ts=t=>!wt(t)&&t!==Cs;function _i(){const{caseless:t}=Ts(this)&&this||{},e={},n=(i,r)=>{const a=t&&Fs(e,r)||r;Zt(e[a])&&Zt(i)?e[a]=_i(e[a],i):Zt(i)?e[a]=_i({},i):at(i)?e[a]=i.slice():e[a]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&Vt(arguments[i],n);return e}const Kd=(t,e,n,{allOwnKeys:i}={})=>(Vt(e,(r,a)=>{n&&te(r)?t[a]=ws(r,n):t[a]=r},{allOwnKeys:i}),t),qd=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Wd=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Jd=(t,e,n,i)=>{let r,a,s;const o={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),a=r.length;a-- >0;)s=r[a],(!i||i(s,t,e))&&!o[s]&&(e[s]=t[s],o[s]=!0);t=n!==!1&&Mi(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Yd=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},Xd=t=>{if(!t)return null;if(at(t))return t;let e=t.length;if(!Es(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Zd=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&Mi(Uint8Array)),Qd=(t,e)=>{const i=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=i.next())&&!r.done;){const a=r.value;e.call(t,a[0],a[1])}},ec=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},tc=pe("HTMLFormElement"),nc=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,r){return i.toUpperCase()+r}),yr=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),ic=pe("RegExp"),xs=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};Vt(n,(r,a)=>{let s;(s=e(r,a,t))!==!1&&(i[a]=s||r)}),Object.defineProperties(t,i)},rc=t=>{xs(t,(e,n)=>{if(te(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(te(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},ac=(t,e)=>{const n={},i=r=>{r.forEach(a=>{n[a]=!0})};return at(t)?i(t):i(String(t).split(e)),n},sc=()=>{},oc=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Zn="abcdefghijklmnopqrstuvwxyz",br="0123456789",Rs={DIGIT:br,ALPHA:Zn,ALPHA_DIGIT:Zn+Zn.toUpperCase()+br},lc=(t=16,e=Rs.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n};function uc(t){return!!(t&&te(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const dc=t=>{const e=new Array(10),n=(i,r)=>{if(Ln(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const a=at(i)?[]:{};return Vt(i,(s,o)=>{const l=n(s,r+1);!wt(l)&&(a[o]=l)}),e[r]=void 0,a}}return i};return n(t,0)},cc=pe("AsyncFunction"),fc=t=>t&&(Ln(t)||te(t))&&te(t.then)&&te(t.catch),h={isArray:at,isArrayBuffer:Os,isBuffer:$d,isFormData:zd,isArrayBufferView:Ld,isString:Dd,isNumber:Es,isBoolean:Id,isObject:Ln,isPlainObject:Zt,isUndefined:wt,isDate:Vd,isFile:jd,isBlob:Ud,isRegExp:ic,isFunction:te,isStream:Bd,isURLSearchParams:Hd,isTypedArray:Zd,isFileList:Md,forEach:Vt,merge:_i,extend:Kd,trim:Gd,stripBOM:qd,inherits:Wd,toFlatObject:Jd,kindOf:Pn,kindOfTest:pe,endsWith:Yd,toArray:Xd,forEachEntry:Qd,matchAll:ec,isHTMLForm:tc,hasOwnProperty:yr,hasOwnProp:yr,reduceDescriptors:xs,freezeMethods:rc,toObjectSet:ac,toCamelCase:nc,noop:sc,toFiniteNumber:oc,findKey:Fs,global:Cs,isContextDefined:Ts,ALPHABET:Rs,generateString:lc,isSpecCompliantForm:uc,toJSONObject:dc,isAsyncFn:cc,isThenable:fc};function L(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}h.inherits(L,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:h.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Ps=L.prototype,$s={};["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(t=>{$s[t]={value:t}});Object.defineProperties(L,$s);Object.defineProperty(Ps,"isAxiosError",{value:!0});L.from=(t,e,n,i,r,a)=>{const s=Object.create(Ps);return h.toFlatObject(t,s,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),L.call(s,t.message,e,n,i,r),s.cause=t,s.name=t.name,a&&Object.assign(s,a),s};const mc=null;function Si(t){return h.isPlainObject(t)||h.isArray(t)}function Ls(t){return h.endsWith(t,"[]")?t.slice(0,-2):t}function _r(t,e,n){return t?t.concat(e).map(function(r,a){return r=Ls(r),!n&&a?"["+r+"]":r}).join(n?".":""):e}function hc(t){return h.isArray(t)&&!t.some(Si)}const pc=h.toFlatObject(h,{},null,function(e){return/^is[A-Z]/.test(e)});function Dn(t,e,n){if(!h.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=h.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,S){return!h.isUndefined(S[m])});const i=n.metaTokens,r=n.visitor||d,a=n.dots,s=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&h.isSpecCompliantForm(e);if(!h.isFunction(r))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(h.isDate(p))return p.toISOString();if(!l&&h.isBlob(p))throw new L("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(p)||h.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function d(p,m,S){let y=p;if(p&&!S&&typeof p=="object"){if(h.endsWith(m,"{}"))m=i?m:m.slice(0,-2),p=JSON.stringify(p);else if(h.isArray(p)&&hc(p)||(h.isFileList(p)||h.endsWith(m,"[]"))&&(y=h.toArray(p)))return m=Ls(m),y.forEach(function(U,F){!(h.isUndefined(U)||U===null)&&e.append(s===!0?_r([m],F,a):s===null?m:m+"[]",u(U))}),!1}return Si(p)?!0:(e.append(_r(S,m,a),u(p)),!1)}const c=[],f=Object.assign(pc,{defaultVisitor:d,convertValue:u,isVisitable:Si});function k(p,m){if(!h.isUndefined(p)){if(c.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));c.push(p),h.forEach(p,function(y,x){(!(h.isUndefined(y)||y===null)&&r.call(e,y,h.isString(x)?x.trim():x,m,f))===!0&&k(y,m?m.concat(x):[x])}),c.pop()}}if(!h.isObject(t))throw new TypeError("data must be an object");return k(t),e}function Sr(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function Bi(t,e){this._pairs=[],t&&Dn(t,this,e)}const Ds=Bi.prototype;Ds.append=function(e,n){this._pairs.push([e,n])};Ds.toString=function(e){const n=e?function(i){return e.call(this,i,Sr)}:Sr;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function gc(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Is(t,e,n){if(!e)return t;const i=n&&n.encode||gc,r=n&&n.serialize;let a;if(r?a=r(e,n):a=h.isURLSearchParams(e)?e.toString():new Bi(e,n).toString(i),a){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class Nr{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){h.forEach(this.handlers,function(i){i!==null&&e(i)})}}const Vs={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},vc=typeof URLSearchParams!="undefined"?URLSearchParams:Bi,kc=typeof FormData!="undefined"?FormData:null,yc=typeof Blob!="undefined"?Blob:null,bc={isBrowser:!0,classes:{URLSearchParams:vc,FormData:kc,Blob:yc},protocols:["http","https","file","blob","url","data"]},js=typeof window!="undefined"&&typeof document!="undefined",_c=(t=>js&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator!="undefined"&&navigator.product),Sc=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Nc=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:js,hasStandardBrowserEnv:_c,hasStandardBrowserWebWorkerEnv:Sc},Symbol.toStringTag,{value:"Module"})),de={...Nc,...bc};function Ac(t,e){return Dn(t,new de.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,a){return de.isNode&&h.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function wc(t){return h.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Oc(t){const e={},n=Object.keys(t);let i;const r=n.length;let a;for(i=0;i<r;i++)a=n[i],e[a]=t[a];return e}function Us(t){function e(n,i,r,a){let s=n[a++];if(s==="__proto__")return!0;const o=Number.isFinite(+s),l=a>=n.length;return s=!s&&h.isArray(r)?r.length:s,l?(h.hasOwnProp(r,s)?r[s]=[r[s],i]:r[s]=i,!o):((!r[s]||!h.isObject(r[s]))&&(r[s]=[]),e(n,i,r[s],a)&&h.isArray(r[s])&&(r[s]=Oc(r[s])),!o)}if(h.isFormData(t)&&h.isFunction(t.entries)){const n={};return h.forEachEntry(t,(i,r)=>{e(wc(i),r,n,0)}),n}return null}function Ec(t,e,n){if(h.isString(t))try{return(e||JSON.parse)(t),h.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const jt={transitional:Vs,adapter:["xhr","http"],transformRequest:[function(e,n){const i=n.getContentType()||"",r=i.indexOf("application/json")>-1,a=h.isObject(e);if(a&&h.isHTMLForm(e)&&(e=new FormData(e)),h.isFormData(e))return r?JSON.stringify(Us(e)):e;if(h.isArrayBuffer(e)||h.isBuffer(e)||h.isStream(e)||h.isFile(e)||h.isBlob(e))return e;if(h.isArrayBufferView(e))return e.buffer;if(h.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Ac(e,this.formSerializer).toString();if((o=h.isFileList(e))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Dn(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return a||r?(n.setContentType("application/json",!1),Ec(e)):e}],transformResponse:[function(e){const n=this.transitional||jt.transitional,i=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&h.isString(e)&&(i&&!this.responseType||r)){const s=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?L.from(o,L.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:de.classes.FormData,Blob:de.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],t=>{jt.headers[t]={}});const Fc=h.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"]),Cc=t=>{const e={};let n,i,r;return t&&t.split(`
27
- `).forEach(function(s){r=s.indexOf(":"),n=s.substring(0,r).trim().toLowerCase(),i=s.substring(r+1).trim(),!(!n||e[n]&&Fc[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},Ar=Symbol("internals");function ut(t){return t&&String(t).trim().toLowerCase()}function Qt(t){return t===!1||t==null?t:h.isArray(t)?t.map(Qt):String(t)}function Tc(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const xc=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Qn(t,e,n,i,r){if(h.isFunction(i))return i.call(this,e,n);if(r&&(e=n),!!h.isString(e)){if(h.isString(i))return e.indexOf(i)!==-1;if(h.isRegExp(i))return i.test(e)}}function Rc(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function Pc(t,e){const n=h.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(r,a,s){return this[i].call(this,e,r,a,s)},configurable:!0})})}class ne{constructor(e){e&&this.set(e)}set(e,n,i){const r=this;function a(o,l,u){const d=ut(l);if(!d)throw new Error("header name must be a non-empty string");const c=h.findKey(r,d);(!c||r[c]===void 0||u===!0||u===void 0&&r[c]!==!1)&&(r[c||l]=Qt(o))}const s=(o,l)=>h.forEach(o,(u,d)=>a(u,d,l));return h.isPlainObject(e)||e instanceof this.constructor?s(e,n):h.isString(e)&&(e=e.trim())&&!xc(e)?s(Cc(e),n):e!=null&&a(n,e,i),this}get(e,n){if(e=ut(e),e){const i=h.findKey(this,e);if(i){const r=this[i];if(!n)return r;if(n===!0)return Tc(r);if(h.isFunction(n))return n.call(this,r,i);if(h.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=ut(e),e){const i=h.findKey(this,e);return!!(i&&this[i]!==void 0&&(!n||Qn(this,this[i],i,n)))}return!1}delete(e,n){const i=this;let r=!1;function a(s){if(s=ut(s),s){const o=h.findKey(i,s);o&&(!n||Qn(i,i[o],o,n))&&(delete i[o],r=!0)}}return h.isArray(e)?e.forEach(a):a(e),r}clear(e){const n=Object.keys(this);let i=n.length,r=!1;for(;i--;){const a=n[i];(!e||Qn(this,this[a],a,e,!0))&&(delete this[a],r=!0)}return r}normalize(e){const n=this,i={};return h.forEach(this,(r,a)=>{const s=h.findKey(i,a);if(s){n[s]=Qt(r),delete n[a];return}const o=e?Rc(a):String(a).trim();o!==a&&delete n[a],n[o]=Qt(r),i[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return h.forEach(this,(i,r)=>{i!=null&&i!==!1&&(n[r]=e&&h.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
28
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[Ar]=this[Ar]={accessors:{}}).accessors,r=this.prototype;function a(s){const o=ut(s);i[o]||(Pc(r,s),i[o]=!0)}return h.isArray(e)?e.forEach(a):a(e),this}}ne.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);h.reduceDescriptors(ne.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}});h.freezeMethods(ne);function ei(t,e){const n=this||jt,i=e||n,r=ne.from(i.headers);let a=i.data;return h.forEach(t,function(o){a=o.call(n,a,r.normalize(),e?e.status:void 0)}),r.normalize(),a}function Ms(t){return!!(t&&t.__CANCEL__)}function Ut(t,e,n){L.call(this,t==null?"canceled":t,L.ERR_CANCELED,e,n),this.name="CanceledError"}h.inherits(Ut,L,{__CANCEL__:!0});function $c(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new L("Request failed with status code "+n.status,[L.ERR_BAD_REQUEST,L.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Lc=de.hasStandardBrowserEnv?{write(t,e,n,i,r,a){const s=[t+"="+encodeURIComponent(e)];h.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),h.isString(i)&&s.push("path="+i),h.isString(r)&&s.push("domain="+r),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Dc(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Ic(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Bs(t,e){return t&&!Dc(e)?Ic(t,e):e}const Vc=de.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let i;function r(a){let s=a;return e&&(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 i=r(window.location.href),function(s){const o=h.isString(s)?r(s):s;return o.protocol===i.protocol&&o.host===i.host}}():function(){return function(){return!0}}();function jc(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Uc(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r=0,a=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),d=i[a];s||(s=u),n[r]=l,i[r]=u;let c=a,f=0;for(;c!==r;)f+=n[c++],c=c%t;if(r=(r+1)%t,r===a&&(a=(a+1)%t),u-s<e)return;const k=d&&u-d;return k?Math.round(f*1e3/k):void 0}}function wr(t,e){let n=0;const i=Uc(50,250);return r=>{const a=r.loaded,s=r.lengthComputable?r.total:void 0,o=a-n,l=i(o),u=a<=s;n=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:o,rate:l||void 0,estimated:l&&s&&u?(s-a)/l:void 0,event:r};d[e?"download":"upload"]=!0,t(d)}}const Mc=typeof XMLHttpRequest!="undefined",Bc=Mc&&function(t){return new Promise(function(n,i){let r=t.data;const a=ne.from(t.headers).normalize();let{responseType:s,withXSRFToken:o}=t,l;function u(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let d;if(h.isFormData(r)){if(de.hasStandardBrowserEnv||de.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((d=a.getContentType())!==!1){const[m,...S]=d?d.split(";").map(y=>y.trim()).filter(Boolean):[];a.setContentType([m||"multipart/form-data",...S].join("; "))}}let c=new XMLHttpRequest;if(t.auth){const m=t.auth.username||"",S=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";a.set("Authorization","Basic "+btoa(m+":"+S))}const f=Bs(t.baseURL,t.url);c.open(t.method.toUpperCase(),Is(f,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function k(){if(!c)return;const m=ne.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),y={data:!s||s==="text"||s==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:m,config:t,request:c};$c(function(U){n(U),u()},function(U){i(U),u()},y),c=null}if("onloadend"in c?c.onloadend=k:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(k)},c.onabort=function(){c&&(i(new L("Request aborted",L.ECONNABORTED,t,c)),c=null)},c.onerror=function(){i(new L("Network Error",L.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let S=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const y=t.transitional||Vs;t.timeoutErrorMessage&&(S=t.timeoutErrorMessage),i(new L(S,y.clarifyTimeoutError?L.ETIMEDOUT:L.ECONNABORTED,t,c)),c=null},de.hasStandardBrowserEnv&&(o&&h.isFunction(o)&&(o=o(t)),o||o!==!1&&Vc(f))){const m=t.xsrfHeaderName&&t.xsrfCookieName&&Lc.read(t.xsrfCookieName);m&&a.set(t.xsrfHeaderName,m)}r===void 0&&a.setContentType(null),"setRequestHeader"in c&&h.forEach(a.toJSON(),function(S,y){c.setRequestHeader(y,S)}),h.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),s&&s!=="json"&&(c.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&c.addEventListener("progress",wr(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",wr(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=m=>{c&&(i(!m||m.type?new Ut(null,t,c):m),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const p=jc(f);if(p&&de.protocols.indexOf(p)===-1){i(new L("Unsupported protocol "+p+":",L.ERR_BAD_REQUEST,t));return}c.send(r||null)})},Ni={http:mc,xhr:Bc};h.forEach(Ni,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Or=t=>`- ${t}`,zc=t=>h.isFunction(t)||t===null||t===!1,zs={getAdapter:t=>{t=h.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let a=0;a<e;a++){n=t[a];let s;if(i=n,!zc(n)&&(i=Ni[(s=String(n)).toLowerCase()],i===void 0))throw new L(`Unknown adapter '${s}'`);if(i)break;r[s||"#"+a]=i}if(!i){const a=Object.entries(r).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?a.length>1?`since :
29
- `+a.map(Or).join(`
30
- `):" "+Or(a[0]):"as no adapter specified";throw new L("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:Ni};function ti(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ut(null,t)}function Er(t){return ti(t),t.headers=ne.from(t.headers),t.data=ei.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),zs.getAdapter(t.adapter||jt.adapter)(t).then(function(i){return ti(t),i.data=ei.call(t,t.transformResponse,i),i.headers=ne.from(i.headers),i},function(i){return Ms(i)||(ti(t),i&&i.response&&(i.response.data=ei.call(t,t.transformResponse,i.response),i.response.headers=ne.from(i.response.headers))),Promise.reject(i)})}const Fr=t=>t instanceof ne?{...t}:t;function Xe(t,e){e=e||{};const n={};function i(u,d,c){return h.isPlainObject(u)&&h.isPlainObject(d)?h.merge.call({caseless:c},u,d):h.isPlainObject(d)?h.merge({},d):h.isArray(d)?d.slice():d}function r(u,d,c){if(h.isUndefined(d)){if(!h.isUndefined(u))return i(void 0,u,c)}else return i(u,d,c)}function a(u,d){if(!h.isUndefined(d))return i(void 0,d)}function s(u,d){if(h.isUndefined(d)){if(!h.isUndefined(u))return i(void 0,u)}else return i(void 0,d)}function o(u,d,c){if(c in e)return i(u,d);if(c in t)return i(void 0,u)}const l={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:o,headers:(u,d)=>r(Fr(u),Fr(d),!0)};return h.forEach(Object.keys(Object.assign({},t,e)),function(d){const c=l[d]||r,f=c(t[d],e[d],d);h.isUndefined(f)&&c!==o||(n[d]=f)}),n}const Hs="1.6.8",zi={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{zi[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const Cr={};zi.transitional=function(e,n,i){function r(a,s){return"[Axios v"+Hs+"] Transitional option '"+a+"'"+s+(i?". "+i:"")}return(a,s,o)=>{if(e===!1)throw new L(r(s," has been removed"+(n?" in "+n:"")),L.ERR_DEPRECATED);return n&&!Cr[s]&&(Cr[s]=!0,console.warn(r(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(a,s,o):!0}};function Hc(t,e,n){if(typeof t!="object")throw new L("options must be an object",L.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const a=i[r],s=e[a];if(s){const o=t[a],l=o===void 0||s(o,a,t);if(l!==!0)throw new L("option "+a+" must be "+l,L.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new L("Unknown option "+a,L.ERR_BAD_OPTION)}}const Ai={assertOptions:Hc,validators:zi},ye=Ai.validators;class xe{constructor(e){this.defaults=e,this.interceptors={request:new Nr,response:new Nr}}async request(e,n){try{return await this._request(e,n)}catch(i){if(i instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const a=r.stack?r.stack.replace(/^.+\n/,""):"";i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
31
- `+a):i.stack=a}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Xe(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:a}=n;i!==void 0&&Ai.assertOptions(i,{silentJSONParsing:ye.transitional(ye.boolean),forcedJSONParsing:ye.transitional(ye.boolean),clarifyTimeoutError:ye.transitional(ye.boolean)},!1),r!=null&&(h.isFunction(r)?n.paramsSerializer={serialize:r}:Ai.assertOptions(r,{encode:ye.function,serialize:ye.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&h.merge(a.common,a[n.method]);a&&h.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),n.headers=ne.concat(s,a);const o=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let d,c=0,f;if(!l){const p=[Er.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,u),f=p.length,d=Promise.resolve(n);c<f;)d=d.then(p[c++],p[c++]);return d}f=o.length;let k=n;for(c=0;c<f;){const p=o[c++],m=o[c++];try{k=p(k)}catch(S){m.call(this,S);break}}try{d=Er.call(this,k)}catch(p){return Promise.reject(p)}for(c=0,f=u.length;c<f;)d=d.then(u[c++],u[c++]);return d}getUri(e){e=Xe(this.defaults,e);const n=Bs(e.baseURL,e.url);return Is(n,e.params,e.paramsSerializer)}}h.forEach(["delete","get","head","options"],function(e){xe.prototype[e]=function(n,i){return this.request(Xe(i||{},{method:e,url:n,data:(i||{}).data}))}});h.forEach(["post","put","patch"],function(e){function n(i){return function(a,s,o){return this.request(Xe(o||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}xe.prototype[e]=n(),xe.prototype[e+"Form"]=n(!0)});class Hi{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const i=this;this.promise.then(r=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](r);i._listeners=null}),this.promise.then=r=>{let a;const s=new Promise(o=>{i.subscribe(o),a=o}).then(r);return s.cancel=function(){i.unsubscribe(a)},s},e(function(a,s,o){i.reason||(i.reason=new Ut(a,s,o),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new Hi(function(r){e=r}),cancel:e}}}function Gc(t){return function(n){return t.apply(null,n)}}function Kc(t){return h.isObject(t)&&t.isAxiosError===!0}const wi={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(wi).forEach(([t,e])=>{wi[e]=t});function Gs(t){const e=new xe(t),n=ws(xe.prototype.request,e);return h.extend(n,xe.prototype,e,{allOwnKeys:!0}),h.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Gs(Xe(t,r))},n}const H=Gs(jt);H.Axios=xe;H.CanceledError=Ut;H.CancelToken=Hi;H.isCancel=Ms;H.VERSION=Hs;H.toFormData=Dn;H.AxiosError=L;H.Cancel=H.CanceledError;H.all=function(e){return Promise.all(e)};H.spread=Gc;H.isAxiosError=Kc;H.mergeConfig=Xe;H.AxiosHeaders=ne;H.formToJSON=t=>Us(h.isHTMLForm(t)?new FormData(t):t);H.getAdapter=zs.getAdapter;H.HttpStatusCode=wi;H.default=H;class qc{constructor(e){w(this,"logger");w(this,"axiosInstance");this.logger=e.logger,this.axiosInstance=H.create({baseURL:e.baseUrl,headers:e.accessToken?{Authorization:`Bearer ${e.accessToken}`}:{}})}async get(e){try{return(await this.axiosInstance.get(e)).data}catch(n){throw this.handleError(n),n}}async post(e,n){var a;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.post(e,i)).data}catch(s){if(this.handleError(s),r&&H.isAxiosError(s))return(a=s.response)==null?void 0:a.data;throw s}}handleError(e){var n,i;H.isAxiosError(e)&&(this.logger.error("Error Code:",(n=e.response)==null?void 0:n.status),this.logger.error("Result Data:",(i=e.response)==null?void 0:i.data))}}var Gi=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(Gi||{}),Ks=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(Ks||{}),Ki=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(Ki||{}),qs=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(qs||{}),Ws=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(Ws||{}),Js=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(Js||{});class In{constructor(e){w(this,"root",As(this));w(this,"id");w(this,"account");w(this,"accountType",Gi.UNKNOWN);w(this,"username");w(this,"currencyConfig");w(this,"contractType");w(this,"nextDateMetricRecord");w(this,"spendedMinutes",0);w(this,"unlimitedService",!1);w(this,"hoursAvailable",0);w(this,"contractStatus",Ki.ACTIVE);w(this,"createdAt");w(this,"installationDateApp");w(this,"cxAccount");w(this,"freeService",!1);w(this,"subscriptionType",null);w(this,"minutesAvailable",0);w(this,"globalPage");w(this,"stripe");w(this,"descriptionPlan");w(this,"planType");w(this,"selectFreeTrial");w(this,"exceededFeatures");w(this,"host",null);w(this,"variationThumbnailName");w(this,"variationsConfig");this.root.setProps(e)}static toDomain(e){const{createdAt:n,username:i,...r}=e,a={...r,username:i!=null?i:r.account,createdAt:new Date(Number(n))};return new In(a)}toPrimitives(){const{root:e,createdAt:n,...i}=this;return{...i,created:n.toISOString()}}}const Wc=`${nl.apiUrls.restV1}/accounts/v2`;class Ys{async get(e){const n=`${Wc}/${e}`,{data:i}=await Ui({url:n});return i?In.toDomain(i):null}}class Xs{constructor(e){this.accountRepository=e}async get(e){try{const n=await this.accountRepository.get(e);if(!n)throw new gs(e);return n}catch(n){throw new vs(n)}}}const Jc=new Ys,qi=new Xs(Jc),Yc=()=>["account"],Xc=()=>{const t=_s(r=>r.accountName),[e,n]=Yo(bn),i=Ro.useQuery(Yc(),()=>qi.get(t),{enabled:!!t&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return z.useEffect(()=>{const r=i.data;!i.isSuccess||!r||n(r)},[i.status]),{findQuery:i,account:e}},Zs=Bo();async function Qs(t){const e=await qi.get(t);return Zs.set(bn,e),e}var eo=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(eo||{});const Zc={ALL:"*",CORE:"core:**",ADD_TO_CART_HOOKS:"core:addToCartHooks:**",LIVE_STREAMING_EVENT:"event:**",EVENT_CHAT:"event:chat:**",EVENT_PRODUCTS:"event:products:**",CUSTOMIZE_LIVE:"customize-live:**",PLAYER:"player:**",SNACK_SIZE_VIDEO:"ssv:**",SNACK_SIZE_VIDEO_ADMIN:"ssv-admin:**",UI:"ui:**",UTILS:"utils:**"},to={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var no=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(no||{}),io=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(io||{}),ro=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t.UNKNOWN="unknown",t))(ro||{}),ao=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(ao||{}),so=(t=>(t.Add="add",t.Remove="remove",t))(so||{}),oo=(t=>(t.Active="active",t.Inactive="inactive",t))(oo||{});const Qc={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},ef={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},tf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},nf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},rf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ManageCollectionProductInInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},af={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},sf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},of={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindMinimalEvent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"thumbnails"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},lf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchMinimalEvents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},uf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BlockUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BlockUserInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"blockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BlockUserSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},df={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ChangeAccountUsername"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeAccountUsername"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},cf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ff={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetAllChatMessageInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatMessageArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"connectionId"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"idEvent"}},{kind:"Field",name:{kind:"Name",value:"sendDate"}},{kind:"Field",name:{kind:"Name",value:"sessionId"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"isAdmin"}},{kind:"Field",name:{kind:"Name",value:"urlGif"}},{kind:"Field",name:{kind:"Name",value:"second"}},{kind:"Field",name:{kind:"Name",value:"ip"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},mf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetChatRoomToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetChatRoomInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getChatRoomToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatRoomTokenData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},hf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PinChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PinChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PinChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},pf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInputAccount"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},gf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"section"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},vf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},kf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTimeLine"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetTimeLineInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTimeLine"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TimeLineArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"time"}},{kind:"Field",name:{kind:"Name",value:"likes"}},{kind:"Field",name:{kind:"Name",value:"comments"}},{kind:"Field",name:{kind:"Name",value:"viewers"}},{kind:"Field",name:{kind:"Name",value:"orders"}},{kind:"Field",name:{kind:"Name",value:"minute"}},{kind:"Field",name:{kind:"Name",value:"hour"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},yf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppendProductsToSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RelateToProductsSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appendProductsSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},bf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},_f={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateSnackVideoBatch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Sf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteRelationshipWithSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteRelationshipSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}}]}}]}}]},Nf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Af={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindManySnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindManySnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findManySnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},wf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Of={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayLists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayLists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"videoAmount"}},{kind:"Field",name:{kind:"Name",value:"productAmount"}},{kind:"Field",name:{kind:"Name",value:"updated"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Ef={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSnackVideoRelationships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRelationshipSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RelationshipSnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceEntity"}},{kind:"Field",name:{kind:"Name",value:"attributeId"}}]}}]}}]}}]}}]},Ff={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Cf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Tf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindByProductSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindByProductSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findByProductSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},xf={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetPlayListQueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}},{kind:"Field",name:{kind:"Name",value:"order"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Rf=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:Qc,AppendProductsToSnackVideoDocument:yf,BlockUserDocument:uf,ChangeAccountUsernameDocument:df,CreatePlayListDocument:bf,CreateSnackVideoBatchDocument:_f,DeleteAllCustomizationDocument:pf,DeleteChatMessageDocument:cf,DeleteCollectionDocument:ef,DeleteRelationshipWithSnackVideoDocument:Sf,DeleteSnackVideoDocument:Nf,EventStatus:ao,FindByProductSnackVideoDocument:Tf,FindCollectionDocument:tf,FindManySnackVideosDocument:Af,FindMinimalEventDocument:of,GetAllChatMessageDocument:ff,GetAllCollectionsDocument:nf,GetAllCustomizationDocument:gf,GetAllSnackVideosDocument:wf,GetChatRoomTokenDocument:mf,GetPlayListDocument:xf,GetPlayListsDocument:Of,GetSnackVideoRelationshipsDocument:Ef,GetTimeLineDocument:kf,ManageCollectionProductDocument:rf,Methods:so,PinChatMessageDocument:hf,SearchCollectionsDocument:af,SearchMinimalEventsDocument:lf,SearchSnackVideosDocument:Ff,Status:oo,UpdateCollectionDocument:sf,UpdateCustomizationDocument:vf,UpdatePlayListDocument:Cf},Symbol.toStringTag,{value:"Module"}));var Vn=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(Vn||{});function Pf(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}var je=(t=>(t.Local="local",t.VtexLegacy="vtexlegacy",t.VtexIO="vtexio",t.External="external",t))(je||{}),Wi=(t=>(t.PROD="prod",t.DEV="dev",t.LOCAL="local",t))(Wi||{});const{coreLogger:$f}=rt(),Oi=Ee.withPrefix($f,"addToCartHooks"),ni="addToCartHooks.notification.error",Ei={errorAddingToCart:ni,errorOpeningVariationSelector:ni,errorOpeningNewTab:ni,successAddingToCart:"addToCartHooks.notification.success"};async function Lf(t){const e={...t,action:{type:Vn.ADD_TO_CART,exec:()=>Oi.error("action no implemented in validate hook")}};try{const n=await Df(e),i=await If(n);await Vf(i)}catch(n){Oi.error("error unhandled",n)}}async function Df(t){var a,s;const{context:e,userAddToCartConfig:n}=t,i=(a=n==null?void 0:n.hooks)==null?void 0:a.transform;let r=t.product;if(i)try{r=await i({product:{...r},data:(s=e.data)!=null?s:{}})}catch(o){mn("transform",o)}return{...t,product:r}}async function If(t){var l,u;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:r}=t,a=lo(t),s=(l=i==null?void 0:i.hooks)==null?void 0:l.validate;let o=n.validate({...t,actionFactory:a});if(s)try{o=await s({product:{...r},defaultAction:{...o},action:a,data:(u=e.data)!=null?u:{}})}catch(d){mn("validate",d)}return{...t,action:o,actionFactory:a}}async function Vf(t){var S;const{eventBus:e}=rt(),{product:n,userAddToCartConfig:i,notifyFactory:r,action:a,actionFactory:s}=t,{isVariationSelectorOpen:o,data:l={}}=t.context,u=(S=i==null?void 0:i.hooks)==null?void 0:S.end,d=a.type===Vn.ADD_TO_CART;let c=null,f=!1;const k=()=>{!d||!o||s.openVariationSelector(!1).exec()},p=()=>{!d||f||(c?r.error(Ei.errorAddingToCart):r.success(Ei.successAddingToCart))},m=()=>{const y={product:n,actionType:a.type,success:!c,error:c};e.emit(to.ATCH_ACTION_EXECUTED,y)};try{if(!a.type||!a.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await a.exec()}catch(y){mn("end",y),c=y}if(u)try{f=!!await u({data:l,error:c,notify:r,actionExecuted:a})}catch(y){mn("end",y)}k(),p(),m()}function lo(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=r=>Object.entries(r!=null?r:{}).reduce((a,[s,o])=>({...a,[s]:l=>({type:s,exec:()=>o(l)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function mn(t,e){Oi.error(`addToCartHooks error running ${t}: `,e)}function uo(t){const e=Object.values(t);return Object.assign({},...e)}function co(t){return Object.entries(t).reduce((e,[n,i])=>{const r=uo(i);return{...e,[n]:r}},{})}function fo(t,e){const n=co(e);Object.entries(n).forEach(([i,r])=>{t.addResourceBundle(i,"translation",r,!0)})}function jf(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ot(t){"@babel/helpers - typeof";return Ot=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ot(t)}function Uf(t,e){if(Ot(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Ot(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Mf(t){var e=Uf(t,"string");return Ot(e)=="symbol"?e:e+""}function Bf(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Mf(i.key),i)}}function zf(t,e,n){return e&&Bf(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var mo=[],Hf=mo.forEach,Gf=mo.slice;function Kf(t){return Hf.call(Gf.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var Tr=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,qf=function(e,n,i){var r=i||{};r.path=r.path||"/";var a=encodeURIComponent(n),s="".concat(e,"=").concat(a);if(r.maxAge>0){var o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(o))}if(r.domain){if(!Tr.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(r.domain)}if(r.path){if(!Tr.test(r.path))throw new TypeError("option path is invalid");s+="; Path=".concat(r.path)}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite){var l=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(l){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},xr={create:function(e,n,i,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+i*60*1e3)),r&&(a.domain=r),document.cookie=qf(e,encodeURIComponent(n),a)},read:function(e){for(var n="".concat(e,"="),i=document.cookie.split(";"),r=0;r<i.length;r++){for(var a=i[r];a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(n)===0)return a.substring(n.length,a.length)}return null},remove:function(e){this.create(e,"",-1)}},Wf={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&typeof document!="undefined"){var i=xr.read(e.lookupCookie);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupCookie&&typeof document!="undefined"&&xr.create(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},Jf={name:"querystring",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=i.substring(1),a=r.split("&"),s=0;s<a.length;s++){var o=a[s].indexOf("=");if(o>0){var l=a[s].substring(0,o);l===e.lookupQuerystring&&(n=a[s].substring(o+1))}}}return n}},dt=null,Rr=function(){if(dt!==null)return dt;try{dt=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{dt=!1}return dt},Yf={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&Rr()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&Rr()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},ct=null,Pr=function(){if(ct!==null)return ct;try{ct=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ct=!1}return ct},Xf={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&Pr()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&Pr()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},Zf={name:"navigator",lookup:function(e){var n=[];if(typeof navigator!="undefined"){if(navigator.languages)for(var i=0;i<navigator.languages.length;i++)n.push(navigator.languages[i]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},Qf={name:"htmlTag",lookup:function(e){var n,i=e.htmlTag||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},em={name:"path",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;n=i[e.lookupFromPathIndex].replace("/","")}else n=i[0].replace("/","")}return n}},tm={name:"subdomain",lookup:function(e){var n=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window!="undefined"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}};function nm(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var ho=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};jf(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return zf(t,[{key:"init",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=Kf(i,this.options||{},nm()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(a){return a.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Wf),this.addDetector(Jf),this.addDetector(Yf),this.addDetector(Xf),this.addDetector(Zf),this.addDetector(Qf),this.addDetector(em),this.addDetector(tm)}},{key:"addDetector",value:function(n){return this.detectors[n.name]=n,this}},{key:"detect",value:function(n){var i=this;n||(n=this.options.order);var r=[];return n.forEach(function(a){if(i.detectors[a]){var s=i.detectors[a].lookup(i.options);s&&typeof s=="string"&&(s=[s]),s&&(r=r.concat(s))}}),r=r.map(function(a){return i.options.convertDetectedLanguage(a)}),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}},{key:"cacheUserLanguage",value:function(n,i){var r=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||i.forEach(function(a){r.detectors[a]&&r.detectors[a].cacheUserLanguage(n,r.options)}))}}]),t}();ho.type="languageDetector";function po(t,e){t.use(e).use(ho).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,r)=>{if(i){const[a,...s]=i.split(",").map(o=>o.trim());if(a==="number")return new Intl.NumberFormat(r).format(n);if(a==="date")return new Intl.DateTimeFormat(r).format(n);if(a==="currency")return new Intl.NumberFormat(r,{style:"currency",currency:s[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const im={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class hn{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||im,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,r){return r&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new hn(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new hn(this.logger,e)}}var ce=new hn;class jn{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(s=>{let[o,l]=s;for(let u=0;u<l;u++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[o,l]=s;for(let u=0;u<l;u++)o.apply(o,[e,...i])})}}function ft(){let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n}function $r(t){return t==null?"":""+t}function rm(t,e,n){t.forEach(i=>{e[i]&&(n[i]=e[i])})}const am=/###/g;function gt(t,e,n){function i(o){return o&&o.indexOf("###")>-1?o.replace(am,"."):o}function r(){return!t||typeof t=="string"}const a=typeof e!="string"?e:e.split(".");let s=0;for(;s<a.length-1;){if(r())return{};const o=i(a[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return r()?{}:{obj:t,k:i(a[s])}}function Lr(t,e,n){const{obj:i,k:r}=gt(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let a=e[e.length-1],s=e.slice(0,e.length-1),o=gt(t,s,Object);for(;o.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),o=gt(t,s,Object),o&&o.obj&&typeof o.obj[`${o.k}.${a}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=n}function sm(t,e,n,i){const{obj:r,k:a}=gt(t,e,Object);r[a]=r[a]||[],r[a].push(n)}function pn(t,e){const{obj:n,k:i}=gt(t,e);if(n)return n[i]}function om(t,e,n){const i=pn(t,n);return i!==void 0?i:pn(e,n)}function go(t,e,n){for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?typeof t[i]=="string"||t[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?n&&(t[i]=e[i]):go(t[i],e[i],n):t[i]=e[i]);return t}function Be(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var lm={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function um(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>lm[e]):t}class dm{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const cm=[" ",",","?","!",";"],fm=new dm(20);function mm(t,e,n){e=e||"",n=n||"";const i=cm.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const r=fm.getRegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!r.test(t);if(!a){const s=t.indexOf(n);s>0&&!r.test(t.substring(0,s))&&(a=!0)}return a}function Fi(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let r=t;for(let a=0;a<i.length;){if(!r||typeof r!="object")return;let s,o="";for(let l=a;l<i.length;++l)if(l!==a&&(o+=n),o+=i[l],s=r[o],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&l<i.length-1)continue;a+=l-a+1;break}r=s}return r}function gn(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class Dr extends jn{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,s=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],i&&(Array.isArray(i)?o.push(...i):typeof i=="string"&&a?o.push(...i.split(a)):o.push(i)));const l=pn(this.data,o);return!l&&!n&&!i&&e.indexOf(".")>-1&&(e=o[0],n=o[1],i=o.slice(2).join(".")),l||!s||typeof i!="string"?l:Fi(this.data&&this.data[e]&&this.data[e][n],i,a)}addResource(e,n,i,r){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 o=[e,n];i&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."),r=n,n=o[1]),this.addNamespaces(n),Lr(this.data,o,r),a.silent||this.emit("added",e,n,i,r)}addResources(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in i)(typeof i[a]=="string"||Object.prototype.toString.apply(i[a])==="[object Array]")&&this.addResource(e,n,a,i[a],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),r=i,i=n,n=o[1]),this.addNamespaces(n);let l=pn(this.data,o)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?go(l,i,a):l={...l,...i},Lr(this.data,o,l),s.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var vo={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,n,i,r))}),e}};const Ir={};class vn extends jn{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),rm(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ce.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,n);return i&&i.res!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!mm(e,i,r);if(s&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:a};const u=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(r)}return typeof a=="string"&&(a=[a]),{key:e,namespaces:a}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:o}=this.extractFromKey(e[e.length-1],n),l=o[o.length-1],u=n.lng||this.language,d=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(d){const F=n.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${F}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${F}${s}`}return r?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const c=this.resolve(e,n);let f=c&&c.res;const k=c&&c.usedKey||s,p=c&&c.exactUsedKey||s,m=Object.prototype.toString.apply(f),S=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject;if(x&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&S.indexOf(m)<0&&!(typeof y=="string"&&m==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const F=this.options.returnedObjectHandler?this.options.returnedObjectHandler(k,f,{...n,ns:o}):`key '${s} (${this.language})' returned an object instead of string.`;return r?(c.res=F,c.usedParams=this.getUsedParamsDetails(n),c):F}if(a){const F=m==="[object Array]",P=F?[]:{},j=F?p:k;for(const M in f)if(Object.prototype.hasOwnProperty.call(f,M)){const g=`${j}${a}${M}`;P[M]=this.translate(g,{...n,joinArrays:!1,ns:o}),P[M]===g&&(P[M]=f[M])}f=P}}else if(x&&typeof y=="string"&&m==="[object Array]")f=f.join(y),f&&(f=this.extendTranslation(f,e,n,i));else{let F=!1,P=!1;const j=n.count!==void 0&&typeof n.count!="string",M=vn.hasDefaultValue(n),g=j?this.pluralResolver.getSuffix(u,n.count,n):"",O=n.ordinal&&j?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",E=j&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),v=E&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${g}`]||n[`defaultValue${O}`]||n.defaultValue;!this.isValidLookup(f)&&M&&(F=!0,f=v),this.isValidLookup(f)||(P=!0,f=s);const A=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&P?void 0:f,N=M&&v!==f&&this.options.updateMissing;if(P||F||N){if(this.logger.log(N?"updateKey":"missingKey",u,l,s,N?v:f),a){const $=this.resolve(s,{...n,keySeparator:!1});$&&$.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 C=[];const V=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&V&&V[0])for(let $=0;$<V.length;$++)C.push(V[$]);else this.options.saveMissingTo==="all"?C=this.languageUtils.toResolveHierarchy(n.lng||this.language):C.push(n.lng||this.language);const R=($,q,st)=>{const Qi=M&&st!==f?st:A;this.options.missingKeyHandler?this.options.missingKeyHandler($,l,q,Qi,N,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing($,l,q,Qi,N,n),this.emit("missingKey",$,l,q,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&j?C.forEach($=>{const q=this.pluralResolver.getSuffixes($,n);E&&n[`defaultValue${this.options.pluralSeparator}zero`]&&q.indexOf(`${this.options.pluralSeparator}zero`)<0&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(st=>{R([$],s+st,n[`defaultValue${st}`]||v)})}):R(C,s,v))}f=this.extendTranslation(f,e,n,c,i),P&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(P||F)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,F?f:void 0):f=this.options.parseMissingKeyHandler(f))}return r?(c.res=f,c.usedParams=this.getUsedParamsDetails(n),c):f}extendTranslation(e,n,i,r,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const f=e.match(this.interpolator.nestingRegexp);d=f&&f.length}let c=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),e=this.interpolator.interpolate(e,c,i.lng||this.language,i),u){const f=e.match(this.interpolator.nestingRegexp),k=f&&f.length;d<k&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(i.lng=r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var f=arguments.length,k=new Array(f),p=0;p<f;p++)k[p]=arguments[p];return a&&a[0]===k[0]&&!i.context?(s.logger.warn(`It seems you are nesting recursively key: ${k[0]} in key: ${n[0]}`),null):s.translate(...k,n)},i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,l=typeof o=="string"?[o]:o;return e!=null&&l&&l.length&&i.applyPostProcessor!==!1&&(e=vo.handle(l,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,a,s,o;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,n),d=u.key;r=d;let c=u.namespaces;this.options.fallbackNS&&(c=c.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",k=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);c.forEach(S=>{this.isValidLookup(i)||(o=S,!Ir[`${m[0]}-${S}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(Ir[`${m[0]}-${S}`]=!0,this.logger.warn(`key "${r}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),m.forEach(y=>{if(this.isValidLookup(i))return;s=y;const x=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(x,d,y,S,n);else{let F;f&&(F=this.pluralResolver.getSuffix(y,n.count,n));const P=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(x.push(d+F),n.ordinal&&F.indexOf(j)===0&&x.push(d+F.replace(j,this.options.pluralSeparator)),k&&x.push(d+P)),p){const M=`${d}${this.options.contextSeparator}${n.context}`;x.push(M),f&&(x.push(M+F),n.ordinal&&F.indexOf(j)===0&&x.push(M+F.replace(j,this.options.pluralSeparator)),k&&x.push(M+P))}}let U;for(;U=x.pop();)this.isValidLookup(i)||(a=U,i=this.getResource(y,S,U,n))}))})}),{res:i,usedKey:r,exactUsedKey:a,usedLng:s,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,r):this.resourceStore.getResource(e,n,i,r)}getUsedParamsDetails(){let e=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"],i=e.replace&&typeof e.replace!="string";let r=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const a of n)delete r[a]}return r}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}function ii(t){return t.charAt(0).toUpperCase()+t.slice(1)}class Vr{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ce.create("languageUtils")}getScriptPartFromCode(e){if(e=gn(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=gn(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(r=>r.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=ii(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=ii(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=ii(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getLanguagePartFromCode(i);if(this.isSupportedCode(r))return n=r;n=this.options.supportedLngs.find(a=>{if(a===r)return a;if(!(a.indexOf("-")<0&&r.indexOf("-")<0)&&(a.indexOf("-")>0&&r.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===r||a.indexOf(r)===0&&r.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),r=[],a=s=>{s&&(this.isSupportedCode(s)?r.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):typeof e=="string"&&a(this.formatLanguageCode(e)),i.forEach(s=>{r.indexOf(s)<0&&a(this.formatLanguageCode(s))}),r}}let hm=[{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}],pm={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const gm=["v1","v2","v3"],vm=["v4"],jr={zero:0,one:1,two:2,few:3,many:4,other:5};function km(){const t={};return hm.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:pm[e.fc]}})}),t}class ym{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=ce.create("pluralResolver"),(!this.options.compatibilityJSON||vm.includes(this.options.compatibilityJSON))&&(typeof Intl=="undefined"||!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=km()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(gn(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(r=>`${n}${r}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((r,a)=>jr[r]-jr[a]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):i.numbers.map(r=>this.getSuffix(e,r,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,i);return r?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:this.getSuffixRetroCompatible(r,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let r=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const a=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!gm.includes(this.options.compatibilityJSON)}}function Ur(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=om(t,e,n);return!a&&r&&typeof n=="string"&&(a=Fi(t,n,i),a===void 0&&(a=Fi(e,n,i))),a}class bm{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ce.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const n=e.interpolation;this.escape=n.escape!==void 0?n.escape:um,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Be(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Be(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?Be(n.nestingPrefix):n.nestingPrefixEscaped||Be("$t("),this.nestingSuffix=n.nestingSuffix?Be(n.nestingSuffix):n.nestingSuffixEscaped||Be(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n&&n.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,i,r){let a,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(p){return p.replace(/\$/g,"$$$$")}const d=p=>{if(p.indexOf(this.formatSeparator)<0){const x=Ur(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,i,{...r,...n,interpolationkey:p}):x}const m=p.split(this.formatSeparator),S=m.shift().trim(),y=m.join(this.formatSeparator).trim();return this.format(Ur(n,l,S,this.options.keySeparator,this.options.ignoreJSONStructure),y,i,{...r,...n,interpolationkey:S})};this.resetRegExp();const c=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>u(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?u(this.escape(p)):u(p)}].forEach(p=>{for(o=0;a=p.regex.exec(e);){const m=a[1].trim();if(s=d(m),s===void 0)if(typeof c=="function"){const y=c(e,a,r);s=typeof y=="string"?y:""}else if(r&&Object.prototype.hasOwnProperty.call(r,m))s="";else if(f){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=$r(s));const S=p.safeValue(s);if(e=e.replace(a[0],S),f?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,a,s;function o(l,u){const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const c=l.split(new RegExp(`${d}[ ]*{`));let f=`{${c[1]}`;l=c[0],f=this.interpolate(f,s);const k=f.match(/'/g),p=f.match(/"/g);(k&&k.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),u&&(s={...u,...s})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${d}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l}for(;r=this.nestingRegexp.exec(e);){let l=[];s={...i},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const d=r[1].split(this.formatSeparator).map(c=>c.trim());r[1]=d.shift(),l=d,u=!0}if(a=n(o.call(this,r[1].trim(),s),s),a&&r[0]===e&&typeof a!="string")return a;typeof a!="string"&&(a=$r(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),u&&(a=l.reduce((d,c)=>this.format(d,c,i.lng,{...i,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}function _m(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(s=>{if(!s)return;const[o,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[o.trim()]||(n[o.trim()]=u),u==="false"&&(n[o.trim()]=!1),u==="true"&&(n[o.trim()]=!0),isNaN(u)||(n[o.trim()]=parseInt(u,10))})}return{formatName:e,formatOptions:n}}function ze(t){const e={};return function(i,r,a){const s=r+JSON.stringify(a);let o=e[s];return o||(o=t(gn(r),a),e[s]=o),o(i)}}class Sm{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ce.create("formatter"),this.options=e,this.formats={number:ze((n,i)=>{const r=new Intl.NumberFormat(n,{...i});return a=>r.format(a)}),currency:ze((n,i)=>{const r=new Intl.NumberFormat(n,{...i,style:"currency"});return a=>r.format(a)}),datetime:ze((n,i)=>{const r=new Intl.DateTimeFormat(n,{...i});return a=>r.format(a)}),relativetime:ze((n,i)=>{const r=new Intl.RelativeTimeFormat(n,{...i});return a=>r.format(a,i.range||"day")}),list:ze((n,i)=>{const r=new Intl.ListFormat(n,{...i});return a=>r.format(a)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=ze(n)}format(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((o,l)=>{const{formatName:u,formatOptions:d}=_m(l);if(this.formats[u]){let c=o;try{const f=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},k=f.locale||f.lng||r.locale||r.lng||i;c=this.formats[u](o,k,{...d,...r,...f})}catch(f){this.logger.warn(f)}return c}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}function Nm(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class Am extends jn{constructor(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=ce.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,r.backend,r)}queueLoad(e,n,i,r){const a={},s={},o={},l={};return e.forEach(u=>{let d=!0;n.forEach(c=>{const f=`${u}|${c}`;!i.reload&&this.store.hasResourceBundle(u,c)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,d=!1,s[f]===void 0&&(s[f]=!0),a[f]===void 0&&(a[f]=!0),l[c]===void 0&&(l[c]=!0)))}),d||(o[u]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const r=e.split("|"),a=r[0],s=r[1];n&&this.emit("failedLoading",a,s,n),i&&this.store.addResourceBundle(a,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2;const o={};this.queue.forEach(l=>{sm(l.loaded,[a],s),Nm(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const d=l.loaded[u];d.length&&d.forEach(c=>{o[u][c]===void 0&&(o[u][c]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,n,i){let r=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(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:a,callback:s});return}this.readingCalls++;const o=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const c=this.waitingReads.shift();this.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}if(u&&d&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,r+1,a*2,s)},a);return}s(u,d)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(d=>o(null,d)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,n,o)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=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."),r&&r();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(e,n,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${r} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${a} for language ${r}`,o),this.loaded(e,s,o)})}saveMissing(e,n,i,r,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=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 "${i}" 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(!(i==null||i==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,n,i,r,l):d=u(e,n,i,r),d&&typeof d.then=="function"?d.then(c=>o(null,c)).catch(o):o(null,d)}catch(d){o(d)}else u(e,n,i,r,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}function Mr(){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(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(r=>{n[r]=i[r]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Br(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function Kt(){}function wm(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class Et extends jn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Br(e),this.services={},this.logger=ce,this.modules={external:[]},wm(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=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 r=Mr();this.options={...r,...this.options,...Br(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.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?ce.init(a(this.modules.logger),this.options):ce.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl!="undefined"&&(d=Sm);const c=new Vr(this.options);this.store=new Dr(this.options.resources,this.options);const f=this.services;f.logger=ce,f.resourceStore=this.store,f.languageUtils=c,f.pluralResolver=new ym(c,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=a(d),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new bm(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Am(a(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(k){for(var p=arguments.length,m=new Array(p>1?p-1:0),S=1;S<p;S++)m[S-1]=arguments[S];e.emit(k,...m)}),this.modules.languageDetector&&(f.languageDetector=a(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=a(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new vn(this.services,this.options),this.translator.on("*",function(k){for(var p=arguments.length,m=new Array(p>1?p-1:0),S=1;S<p;S++)m[S-1]=arguments[S];e.emit(k,...m)}),this.modules.external.forEach(k=>{k.init&&k.init(this)})}if(this.format=this.options.interpolation.format,i||(i=Kt),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 e.store[d](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(d=>{this[d]=function(){return e.store[d](...arguments),e}});const l=ft(),u=()=>{const d=(c,f)=>{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),l.resolve(f),i(c,f)};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?u():setTimeout(u,0),l}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kt;const r=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],s=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};r?s(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(o=>s(o)),this.services.backendConnector.load(a,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,n,i){const r=ft();return e||(e=this.languages),n||(n=this.options.ns),i||(i=Kt),this.services.backendConnector.reload(e,n,a=>{r.resolve(),i(a)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&vo.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const r=ft();this.emit("languageChanging",e);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(a(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve(function(){return i.t(...arguments)}),n&&n(l,function(){return i.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,d=>{s(d,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),r}getFixedT(e,n,i){var r=this;const a=function(s,o){let l;if(typeof o!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),c=2;c<u;c++)d[c-2]=arguments[c];l=r.options.overloadTranslationOptionHandler([s,o].concat(d))}else l={...o};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix=l.keyPrefix||i||a.keyPrefix;const f=r.options.keySeparator||".";let k;return l.keyPrefix&&Array.isArray(s)?k=s.map(p=>`${l.keyPrefix}${f}${p}`):k=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,r.t(k,l)};return typeof e=="string"?a.lng=e:a.lngs=e,a.ns=n,a.keyPrefix=i,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){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 i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!r||s(a,e)))}loadNamespaces(e,n){const i=ft();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=ft();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],a=e.filter(s=>r.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=r.concat(a),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)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"],i=this.services&&this.services.languageUtils||new Vr(Mr());return n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new Et(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kt;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new Et(r);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i&&(a.store=new Dr(this.store.data,r),a.services.resourceStore=a.store),a.translator=new vn(a.services,r),a.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),d=1;d<l;d++)u[d-1]=arguments[d];a.emit(o,...u)}),a.init(r,n),a.translator.options=r,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 J=Et.createInstance();J.createInstance=Et.createInstance;J.createInstance;J.dir;J.init;J.loadResources;J.reloadResources;J.use;J.changeLanguage;J.getFixedT;J.t;J.exists;J.setDefaultNamespace;J.hasLoadedNamespace;J.loadNamespaces;J.loadLanguages;const Om=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Em={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Fm=t=>Em[t],Cm=t=>t.replace(Om,Fm);let zr={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Cm};function Tm(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};zr={...zr,...t}}const xm={type:"3rdParty",init(t){Tm(t.options.react)}};po(J,xm);const Rm=t=>fo(J,t);/**
26
+ `)}}function wd(t,e){e.forEach(n=>{if(Ed(Od(n.split("."),t)))throw new So(n)})}if(!B.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!no)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function Td(t){t()}function Cd(t){t||(t=Td),zc({reactionScheduler:t})}function xd(t){return qc(t)}var Fd=1e4,Rd=1e4,Id=function(){function t(e){var n=this;Object.defineProperty(this,"finalize",{enumerable:!0,configurable:!0,writable:!0,value:e}),Object.defineProperty(this,"registrations",{enumerable:!0,configurable:!0,writable:!0,value:new Map}),Object.defineProperty(this,"sweepTimeout",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"sweep",{enumerable:!0,configurable:!0,writable:!0,value:function(i){i===void 0&&(i=Fd),clearTimeout(n.sweepTimeout),n.sweepTimeout=void 0;var r=Date.now();n.registrations.forEach(function(a,s){r-a.registeredAt>=i&&(n.finalize(a.value),n.registrations.delete(s))}),n.registrations.size>0&&n.scheduleSweep()}}),Object.defineProperty(this,"finalizeAllImmediately",{enumerable:!0,configurable:!0,writable:!0,value:function(){n.sweep(0)}})}return Object.defineProperty(t.prototype,"register",{enumerable:!1,configurable:!0,writable:!0,value:function(e,n,i){this.registrations.set(i,{value:n,registeredAt:Date.now()}),this.scheduleSweep()}}),Object.defineProperty(t.prototype,"unregister",{enumerable:!1,configurable:!0,writable:!0,value:function(e){this.registrations.delete(e)}}),Object.defineProperty(t.prototype,"scheduleSweep",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.sweepTimeout===void 0&&(this.sweepTimeout=setTimeout(this.sweep,Rd))}}),t}(),Dd=typeof FinalizationRegistry!="undefined"?FinalizationRegistry:Id,tr=new Dd(function(t){var e;(e=t.reaction)===null||e===void 0||e.dispose(),t.reaction=null}),pa=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),r,a=[],s;try{for(;(e===void 0||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(o){s={error:o}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return a};function ma(t){return"observer".concat(t)}var Pd=function(){function t(){}return t}();function Ld(){return new Pd}function $d(t,e){e===void 0&&(e="observed");var n=pa(B.useState(Ld),1),i=n[0],r=pa(B.useState(),2),a=r[1],s=function(){return a([])},o=B.useRef(null);o.current||(o.current={reaction:null,mounted:!1,changedBeforeMount:!1});var l=o.current;l.reaction||(l.reaction=new $t(ma(e),function(){l.mounted?s():l.changedBeforeMount=!0}),tr.register(i,l,l)),B.useDebugValue(l.reaction,xd),B.useEffect(function(){return tr.unregister(l),l.mounted=!0,l.reaction?l.changedBeforeMount&&(l.changedBeforeMount=!1,s()):(l.reaction=new $t(ma(e),function(){s()}),s()),function(){l.reaction.dispose(),l.reaction=null,l.mounted=!1,l.changedBeforeMount=!1}},[]);var u,c;if(l.reaction.track(function(){try{u=t()}catch(d){c=d}}),c)throw c;return u}var No=typeof Symbol=="function"&&Symbol.for;No?Symbol.for("react.forward_ref"):typeof B.forwardRef=="function"&&B.forwardRef(function(t){return null}).$$typeof;No?Symbol.for("react.memo"):typeof B.memo=="function"&&B.memo(function(t){return null}).$$typeof;var wi;Cd(fs.unstable_batchedUpdates);wi=tr.finalizeAllImmediately;function Vd(t,e){return e===void 0&&(e="observed"),$d(t,e)}function Eo(){return B.useMemo(Ye,[])}function Rr(t){const e=Eo();return Vd(()=>t(e))}const{coreLogger:Ud}=Ye(),jd=$e.withPrefix(Ud,"CustomFetch");async function Ir(t){const{url:e,method:n="GET",body:i,raw:r=!1,contentTypeJson:a=!0,timeout:s,...o}=t,l=a&&!t.headers?new Headers({"content-type":"application/json"}):t.headers;try{const u=new AbortController,{signal:c}=u;let d;const f=fetch(e,{method:n,headers:l,body:i,signal:c,...o});s&&(d=setTimeout(()=>{u.abort()},s));const v=await f;if(r)return v;const p=await v.json();if(clearTimeout(d),!v.ok){const m=p?JSON.stringify(p):v.statusText;throw new Error(m)}return p}catch(u){throw jd.error(u),u}}const Md=t=>Ir({...t,contentTypeJson:!1,raw:!1});function Bd(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Ao(i,`${t}.${n}`))}const Ao=(t,e,n)=>{const i=[t],r=new Blob(i,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(r,e);const a=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(r):window.webkitURL.createObjectURL(r),s=document.createElement("a");return s.style.display="none",s.href=a,s.setAttribute("download",e),typeof s.download=="undefined"&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),setTimeout(()=>{document.body.removeChild(s),window.URL.revokeObjectURL(a)},200)},{coreLogger:zd}=Ye(),Hd=$e.withPrefix(zd,"getClientTimeZone");function qd(){var i,r,a;let t=null,e=null,n=null;try{t=(a=(r=(i=Intl.DateTimeFormat())==null?void 0:i.resolvedOptions())==null?void 0:r.timeZone)!=null?a:null;const s=-new Date().getTimezoneOffset();n=s;const o=s>=0?"+":"-",l=String(Math.floor(Math.abs(s)/60)).padStart(2,"0"),u=String(Math.abs(s)%60).padStart(2,"0");e=`${o}${l}:${u}`}catch{Hd.error("Error obtaining time zone or offset")}return{offset:e,offsetValue:n,value:t,country:null,included:null,label:null}}class Oo{constructor(e){w(this,"aggregate");w(this,"_numSetPropsApplied",0);this.aggregate=e}setProps(e){for(const[n,i]of Object.entries(e))n in this.aggregate&&(this.aggregate[n]=i);this._numSetPropsApplied++}get isFirstSetProps(){return this._numSetPropsApplied===1}}function Dr(t){return new Oo(t)}class Gd{constructor(e){w(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}function wo(t,e){return function(){return t.apply(e,arguments)}}const{toString:Kd}=Object.prototype,{getPrototypeOf:Pr}=Object,ii=(t=>e=>{const n=Kd.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ne=t=>(t=t.toLowerCase(),e=>ii(e)===t),ri=t=>e=>typeof e===t,{isArray:kt}=Array,Mt=ri("undefined");function Wd(t){return t!==null&&!Mt(t)&&t.constructor!==null&&!Mt(t.constructor)&&oe(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const To=Ne("ArrayBuffer");function Jd(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&To(t.buffer),e}const Yd=ri("string"),oe=ri("function"),Co=ri("number"),ai=t=>t!==null&&typeof t=="object",Qd=t=>t===!0||t===!1,yn=t=>{if(ii(t)!=="object")return!1;const e=Pr(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Xd=Ne("Date"),Zd=Ne("File"),ef=Ne("Blob"),tf=Ne("FileList"),nf=t=>ai(t)&&oe(t.pipe),rf=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||oe(t.append)&&((e=ii(t))==="formdata"||e==="object"&&oe(t.toString)&&t.toString()==="[object FormData]"))},af=Ne("URLSearchParams"),sf=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function en(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let i,r;if(typeof t!="object"&&(t=[t]),kt(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const a=n?Object.getOwnPropertyNames(t):Object.keys(t),s=a.length;let o;for(i=0;i<s;i++)o=a[i],e.call(null,t[o],o,t)}}function xo(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const Fo=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Ro=t=>!Mt(t)&&t!==Fo;function nr(){const{caseless:t}=Ro(this)&&this||{},e={},n=(i,r)=>{const a=t&&xo(e,r)||r;yn(e[a])&&yn(i)?e[a]=nr(e[a],i):yn(i)?e[a]=nr({},i):kt(i)?e[a]=i.slice():e[a]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&en(arguments[i],n);return e}const of=(t,e,n,{allOwnKeys:i}={})=>(en(e,(r,a)=>{n&&oe(r)?t[a]=wo(r,n):t[a]=r},{allOwnKeys:i}),t),lf=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),uf=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},cf=(t,e,n,i)=>{let r,a,s;const o={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),a=r.length;a-- >0;)s=r[a],(!i||i(s,t,e))&&!o[s]&&(e[s]=t[s],o[s]=!0);t=n!==!1&&Pr(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},df=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},ff=t=>{if(!t)return null;if(kt(t))return t;let e=t.length;if(!Co(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},hf=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&Pr(Uint8Array)),pf=(t,e)=>{const i=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=i.next())&&!r.done;){const a=r.value;e.call(t,a[0],a[1])}},mf=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},gf=Ne("HTMLFormElement"),vf=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,r){return i.toUpperCase()+r}),ga=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),yf=Ne("RegExp"),Io=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};en(n,(r,a)=>{let s;(s=e(r,a,t))!==!1&&(i[a]=s||r)}),Object.defineProperties(t,i)},kf=t=>{Io(t,(e,n)=>{if(oe(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(oe(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},bf=(t,e)=>{const n={},i=r=>{r.forEach(a=>{n[a]=!0})};return kt(t)?i(t):i(String(t).split(e)),n},_f=()=>{},Sf=(t,e)=>(t=+t,Number.isFinite(t)?t:e),Ti="abcdefghijklmnopqrstuvwxyz",va="0123456789",Do={DIGIT:va,ALPHA:Ti,ALPHA_DIGIT:Ti+Ti.toUpperCase()+va},Nf=(t=16,e=Do.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n};function Ef(t){return!!(t&&oe(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Af=t=>{const e=new Array(10),n=(i,r)=>{if(ai(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const a=kt(i)?[]:{};return en(i,(s,o)=>{const l=n(s,r+1);!Mt(l)&&(a[o]=l)}),e[r]=void 0,a}}return i};return n(t,0)},Of=Ne("AsyncFunction"),wf=t=>t&&(ai(t)||oe(t))&&oe(t.then)&&oe(t.catch),k={isArray:kt,isArrayBuffer:To,isBuffer:Wd,isFormData:rf,isArrayBufferView:Jd,isString:Yd,isNumber:Co,isBoolean:Qd,isObject:ai,isPlainObject:yn,isUndefined:Mt,isDate:Xd,isFile:Zd,isBlob:ef,isRegExp:yf,isFunction:oe,isStream:nf,isURLSearchParams:af,isTypedArray:hf,isFileList:tf,forEach:en,merge:nr,extend:of,trim:sf,stripBOM:lf,inherits:uf,toFlatObject:cf,kindOf:ii,kindOfTest:Ne,endsWith:df,toArray:ff,forEachEntry:pf,matchAll:mf,isHTMLForm:gf,hasOwnProperty:ga,hasOwnProp:ga,reduceDescriptors:Io,freezeMethods:kf,toObjectSet:bf,toCamelCase:vf,noop:_f,toFiniteNumber:Sf,findKey:xo,global:Fo,isContextDefined:Ro,ALPHABET:Do,generateString:Nf,isSpecCompliantForm:Ef,toJSONObject:Af,isAsyncFn:Of,isThenable:wf};function H(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r)}k.inherits(H,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:k.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Po=H.prototype,Lo={};["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(t=>{Lo[t]={value:t}});Object.defineProperties(H,Lo);Object.defineProperty(Po,"isAxiosError",{value:!0});H.from=(t,e,n,i,r,a)=>{const s=Object.create(Po);return k.toFlatObject(t,s,function(l){return l!==Error.prototype},o=>o!=="isAxiosError"),H.call(s,t.message,e,n,i,r),s.cause=t,s.name=t.name,a&&Object.assign(s,a),s};const Tf=null;function ir(t){return k.isPlainObject(t)||k.isArray(t)}function $o(t){return k.endsWith(t,"[]")?t.slice(0,-2):t}function ya(t,e,n){return t?t.concat(e).map(function(r,a){return r=$o(r),!n&&a?"["+r+"]":r}).join(n?".":""):e}function Cf(t){return k.isArray(t)&&!t.some(ir)}const xf=k.toFlatObject(k,{},null,function(e){return/^is[A-Z]/.test(e)});function si(t,e,n){if(!k.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,N){return!k.isUndefined(N[m])});const i=n.metaTokens,r=n.visitor||c,a=n.dots,s=n.indexes,l=(n.Blob||typeof Blob!="undefined"&&Blob)&&k.isSpecCompliantForm(e);if(!k.isFunction(r))throw new TypeError("visitor must be a function");function u(p){if(p===null)return"";if(k.isDate(p))return p.toISOString();if(!l&&k.isBlob(p))throw new H("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(p)||k.isTypedArray(p)?l&&typeof Blob=="function"?new Blob([p]):Buffer.from(p):p}function c(p,m,N){let _=p;if(p&&!N&&typeof p=="object"){if(k.endsWith(m,"{}"))m=i?m:m.slice(0,-2),p=JSON.stringify(p);else if(k.isArray(p)&&Cf(p)||(k.isFileList(p)||k.endsWith(m,"[]"))&&(_=k.toArray(p)))return m=$o(m),_.forEach(function(V,T){!(k.isUndefined(V)||V===null)&&e.append(s===!0?ya([m],T,a):s===null?m:m+"[]",u(V))}),!1}return ir(p)?!0:(e.append(ya(N,m,a),u(p)),!1)}const d=[],f=Object.assign(xf,{defaultVisitor:c,convertValue:u,isVisitable:ir});function v(p,m){if(!k.isUndefined(p)){if(d.indexOf(p)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(p),k.forEach(p,function(_,P){(!(k.isUndefined(_)||_===null)&&r.call(e,_,k.isString(P)?P.trim():P,m,f))===!0&&v(_,m?m.concat(P):[P])}),d.pop()}}if(!k.isObject(t))throw new TypeError("data must be an object");return v(t),e}function ka(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function Lr(t,e){this._pairs=[],t&&si(t,this,e)}const Vo=Lr.prototype;Vo.append=function(e,n){this._pairs.push([e,n])};Vo.toString=function(e){const n=e?function(i){return e.call(this,i,ka)}:ka;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function Ff(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Uo(t,e,n){if(!e)return t;const i=n&&n.encode||Ff,r=n&&n.serialize;let a;if(r?a=r(e,n):a=k.isURLSearchParams(e)?e.toString():new Lr(e,n).toString(i),a){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class ba{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){k.forEach(this.handlers,function(i){i!==null&&e(i)})}}const jo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Rf=typeof URLSearchParams!="undefined"?URLSearchParams:Lr,If=typeof FormData!="undefined"?FormData:null,Df=typeof Blob!="undefined"?Blob:null,Pf={isBrowser:!0,classes:{URLSearchParams:Rf,FormData:If,Blob:Df},protocols:["http","https","file","blob","url","data"]},Mo=typeof window!="undefined"&&typeof document!="undefined",Lf=(t=>Mo&&["ReactNative","NativeScript","NS"].indexOf(t)<0)(typeof navigator!="undefined"&&navigator.product),$f=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Vf=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Mo,hasStandardBrowserEnv:Lf,hasStandardBrowserWebWorkerEnv:$f},Symbol.toStringTag,{value:"Module"})),ye={...Vf,...Pf};function Uf(t,e){return si(t,new ye.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,a){return ye.isNode&&k.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function jf(t){return k.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Mf(t){const e={},n=Object.keys(t);let i;const r=n.length;let a;for(i=0;i<r;i++)a=n[i],e[a]=t[a];return e}function Bo(t){function e(n,i,r,a){let s=n[a++];if(s==="__proto__")return!0;const o=Number.isFinite(+s),l=a>=n.length;return s=!s&&k.isArray(r)?r.length:s,l?(k.hasOwnProp(r,s)?r[s]=[r[s],i]:r[s]=i,!o):((!r[s]||!k.isObject(r[s]))&&(r[s]=[]),e(n,i,r[s],a)&&k.isArray(r[s])&&(r[s]=Mf(r[s])),!o)}if(k.isFormData(t)&&k.isFunction(t.entries)){const n={};return k.forEachEntry(t,(i,r)=>{e(jf(i),r,n,0)}),n}return null}function Bf(t,e,n){if(k.isString(t))try{return(e||JSON.parse)(t),k.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const tn={transitional:jo,adapter:["xhr","http"],transformRequest:[function(e,n){const i=n.getContentType()||"",r=i.indexOf("application/json")>-1,a=k.isObject(e);if(a&&k.isHTMLForm(e)&&(e=new FormData(e)),k.isFormData(e))return r?JSON.stringify(Bo(e)):e;if(k.isArrayBuffer(e)||k.isBuffer(e)||k.isStream(e)||k.isFile(e)||k.isBlob(e))return e;if(k.isArrayBufferView(e))return e.buffer;if(k.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let o;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return Uf(e,this.formSerializer).toString();if((o=k.isFileList(e))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return si(o?{"files[]":e}:e,l&&new l,this.formSerializer)}}return a||r?(n.setContentType("application/json",!1),Bf(e)):e}],transformResponse:[function(e){const n=this.transitional||tn.transitional,i=n&&n.forcedJSONParsing,r=this.responseType==="json";if(e&&k.isString(e)&&(i&&!this.responseType||r)){const s=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?H.from(o,H.ERR_BAD_RESPONSE,this,null,this.response):o}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ye.classes.FormData,Blob:ye.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};k.forEach(["delete","get","head","post","put","patch"],t=>{tn.headers[t]={}});const zf=k.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"]),Hf=t=>{const e={};let n,i,r;return t&&t.split(`
27
+ `).forEach(function(s){r=s.indexOf(":"),n=s.substring(0,r).trim().toLowerCase(),i=s.substring(r+1).trim(),!(!n||e[n]&&zf[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},_a=Symbol("internals");function Nt(t){return t&&String(t).trim().toLowerCase()}function kn(t){return t===!1||t==null?t:k.isArray(t)?t.map(kn):String(t)}function qf(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const Gf=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Ci(t,e,n,i,r){if(k.isFunction(i))return i.call(this,e,n);if(r&&(e=n),!!k.isString(e)){if(k.isString(i))return e.indexOf(i)!==-1;if(k.isRegExp(i))return i.test(e)}}function Kf(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function Wf(t,e){const n=k.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(r,a,s){return this[i].call(this,e,r,a,s)},configurable:!0})})}class le{constructor(e){e&&this.set(e)}set(e,n,i){const r=this;function a(o,l,u){const c=Nt(l);if(!c)throw new Error("header name must be a non-empty string");const d=k.findKey(r,c);(!d||r[d]===void 0||u===!0||u===void 0&&r[d]!==!1)&&(r[d||l]=kn(o))}const s=(o,l)=>k.forEach(o,(u,c)=>a(u,c,l));return k.isPlainObject(e)||e instanceof this.constructor?s(e,n):k.isString(e)&&(e=e.trim())&&!Gf(e)?s(Hf(e),n):e!=null&&a(n,e,i),this}get(e,n){if(e=Nt(e),e){const i=k.findKey(this,e);if(i){const r=this[i];if(!n)return r;if(n===!0)return qf(r);if(k.isFunction(n))return n.call(this,r,i);if(k.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Nt(e),e){const i=k.findKey(this,e);return!!(i&&this[i]!==void 0&&(!n||Ci(this,this[i],i,n)))}return!1}delete(e,n){const i=this;let r=!1;function a(s){if(s=Nt(s),s){const o=k.findKey(i,s);o&&(!n||Ci(i,i[o],o,n))&&(delete i[o],r=!0)}}return k.isArray(e)?e.forEach(a):a(e),r}clear(e){const n=Object.keys(this);let i=n.length,r=!1;for(;i--;){const a=n[i];(!e||Ci(this,this[a],a,e,!0))&&(delete this[a],r=!0)}return r}normalize(e){const n=this,i={};return k.forEach(this,(r,a)=>{const s=k.findKey(i,a);if(s){n[s]=kn(r),delete n[a];return}const o=e?Kf(a):String(a).trim();o!==a&&delete n[a],n[o]=kn(r),i[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return k.forEach(this,(i,r)=>{i!=null&&i!==!1&&(n[r]=e&&k.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
28
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[_a]=this[_a]={accessors:{}}).accessors,r=this.prototype;function a(s){const o=Nt(s);i[o]||(Wf(r,s),i[o]=!0)}return k.isArray(e)?e.forEach(a):a(e),this}}le.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.reduceDescriptors(le.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}});k.freezeMethods(le);function xi(t,e){const n=this||tn,i=e||n,r=le.from(i.headers);let a=i.data;return k.forEach(t,function(o){a=o.call(n,a,r.normalize(),e?e.status:void 0)}),r.normalize(),a}function zo(t){return!!(t&&t.__CANCEL__)}function nn(t,e,n){H.call(this,t==null?"canceled":t,H.ERR_CANCELED,e,n),this.name="CanceledError"}k.inherits(nn,H,{__CANCEL__:!0});function Jf(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new H("Request failed with status code "+n.status,[H.ERR_BAD_REQUEST,H.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Yf=ye.hasStandardBrowserEnv?{write(t,e,n,i,r,a){const s=[t+"="+encodeURIComponent(e)];k.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),k.isString(i)&&s.push("path="+i),k.isString(r)&&s.push("domain="+r),a===!0&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Qf(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Xf(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Ho(t,e){return t&&!Qf(e)?Xf(t,e):e}const Zf=ye.hasStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let i;function r(a){let s=a;return e&&(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 i=r(window.location.href),function(s){const o=k.isString(s)?r(s):s;return o.protocol===i.protocol&&o.host===i.host}}():function(){return function(){return!0}}();function eh(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function th(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r=0,a=0,s;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=i[a];s||(s=u),n[r]=l,i[r]=u;let d=a,f=0;for(;d!==r;)f+=n[d++],d=d%t;if(r=(r+1)%t,r===a&&(a=(a+1)%t),u-s<e)return;const v=c&&u-c;return v?Math.round(f*1e3/v):void 0}}function Sa(t,e){let n=0;const i=th(50,250);return r=>{const a=r.loaded,s=r.lengthComputable?r.total:void 0,o=a-n,l=i(o),u=a<=s;n=a;const c={loaded:a,total:s,progress:s?a/s:void 0,bytes:o,rate:l||void 0,estimated:l&&s&&u?(s-a)/l:void 0,event:r};c[e?"download":"upload"]=!0,t(c)}}const nh=typeof XMLHttpRequest!="undefined",ih=nh&&function(t){return new Promise(function(n,i){let r=t.data;const a=le.from(t.headers).normalize();let{responseType:s,withXSRFToken:o}=t,l;function u(){t.cancelToken&&t.cancelToken.unsubscribe(l),t.signal&&t.signal.removeEventListener("abort",l)}let c;if(k.isFormData(r)){if(ye.hasStandardBrowserEnv||ye.hasStandardBrowserWebWorkerEnv)a.setContentType(!1);else if((c=a.getContentType())!==!1){const[m,...N]=c?c.split(";").map(_=>_.trim()).filter(Boolean):[];a.setContentType([m||"multipart/form-data",...N].join("; "))}}let d=new XMLHttpRequest;if(t.auth){const m=t.auth.username||"",N=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";a.set("Authorization","Basic "+btoa(m+":"+N))}const f=Ho(t.baseURL,t.url);d.open(t.method.toUpperCase(),Uo(f,t.params,t.paramsSerializer),!0),d.timeout=t.timeout;function v(){if(!d)return;const m=le.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),_={data:!s||s==="text"||s==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:m,config:t,request:d};Jf(function(V){n(V),u()},function(V){i(V),u()},_),d=null}if("onloadend"in d?d.onloadend=v:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(v)},d.onabort=function(){d&&(i(new H("Request aborted",H.ECONNABORTED,t,d)),d=null)},d.onerror=function(){i(new H("Network Error",H.ERR_NETWORK,t,d)),d=null},d.ontimeout=function(){let N=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const _=t.transitional||jo;t.timeoutErrorMessage&&(N=t.timeoutErrorMessage),i(new H(N,_.clarifyTimeoutError?H.ETIMEDOUT:H.ECONNABORTED,t,d)),d=null},ye.hasStandardBrowserEnv&&(o&&k.isFunction(o)&&(o=o(t)),o||o!==!1&&Zf(f))){const m=t.xsrfHeaderName&&t.xsrfCookieName&&Yf.read(t.xsrfCookieName);m&&a.set(t.xsrfHeaderName,m)}r===void 0&&a.setContentType(null),"setRequestHeader"in d&&k.forEach(a.toJSON(),function(N,_){d.setRequestHeader(_,N)}),k.isUndefined(t.withCredentials)||(d.withCredentials=!!t.withCredentials),s&&s!=="json"&&(d.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&d.addEventListener("progress",Sa(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&d.upload&&d.upload.addEventListener("progress",Sa(t.onUploadProgress)),(t.cancelToken||t.signal)&&(l=m=>{d&&(i(!m||m.type?new nn(null,t,d):m),d.abort(),d=null)},t.cancelToken&&t.cancelToken.subscribe(l),t.signal&&(t.signal.aborted?l():t.signal.addEventListener("abort",l)));const p=eh(f);if(p&&ye.protocols.indexOf(p)===-1){i(new H("Unsupported protocol "+p+":",H.ERR_BAD_REQUEST,t));return}d.send(r||null)})},rr={http:Tf,xhr:ih};k.forEach(rr,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Na=t=>`- ${t}`,rh=t=>k.isFunction(t)||t===null||t===!1,qo={getAdapter:t=>{t=k.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let a=0;a<e;a++){n=t[a];let s;if(i=n,!rh(n)&&(i=rr[(s=String(n)).toLowerCase()],i===void 0))throw new H(`Unknown adapter '${s}'`);if(i)break;r[s||"#"+a]=i}if(!i){const a=Object.entries(r).map(([o,l])=>`adapter ${o} `+(l===!1?"is not supported by the environment":"is not available in the build"));let s=e?a.length>1?`since :
29
+ `+a.map(Na).join(`
30
+ `):" "+Na(a[0]):"as no adapter specified";throw new H("There is no suitable adapter to dispatch the request "+s,"ERR_NOT_SUPPORT")}return i},adapters:rr};function Fi(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new nn(null,t)}function Ea(t){return Fi(t),t.headers=le.from(t.headers),t.data=xi.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),qo.getAdapter(t.adapter||tn.adapter)(t).then(function(i){return Fi(t),i.data=xi.call(t,t.transformResponse,i),i.headers=le.from(i.headers),i},function(i){return zo(i)||(Fi(t),i&&i.response&&(i.response.data=xi.call(t,t.transformResponse,i.response),i.response.headers=le.from(i.response.headers))),Promise.reject(i)})}const Aa=t=>t instanceof le?{...t}:t;function dt(t,e){e=e||{};const n={};function i(u,c,d){return k.isPlainObject(u)&&k.isPlainObject(c)?k.merge.call({caseless:d},u,c):k.isPlainObject(c)?k.merge({},c):k.isArray(c)?c.slice():c}function r(u,c,d){if(k.isUndefined(c)){if(!k.isUndefined(u))return i(void 0,u,d)}else return i(u,c,d)}function a(u,c){if(!k.isUndefined(c))return i(void 0,c)}function s(u,c){if(k.isUndefined(c)){if(!k.isUndefined(u))return i(void 0,u)}else return i(void 0,c)}function o(u,c,d){if(d in e)return i(u,c);if(d in t)return i(void 0,u)}const l={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:o,headers:(u,c)=>r(Aa(u),Aa(c),!0)};return k.forEach(Object.keys(Object.assign({},t,e)),function(c){const d=l[c]||r,f=d(t[c],e[c],c);k.isUndefined(f)&&d!==o||(n[c]=f)}),n}const Go="1.6.8",$r={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{$r[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const Oa={};$r.transitional=function(e,n,i){function r(a,s){return"[Axios v"+Go+"] Transitional option '"+a+"'"+s+(i?". "+i:"")}return(a,s,o)=>{if(e===!1)throw new H(r(s," has been removed"+(n?" in "+n:"")),H.ERR_DEPRECATED);return n&&!Oa[s]&&(Oa[s]=!0,console.warn(r(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(a,s,o):!0}};function ah(t,e,n){if(typeof t!="object")throw new H("options must be an object",H.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const a=i[r],s=e[a];if(s){const o=t[a],l=o===void 0||s(o,a,t);if(l!==!0)throw new H("option "+a+" must be "+l,H.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new H("Unknown option "+a,H.ERR_BAD_OPTION)}}const ar={assertOptions:ah,validators:$r},Te=ar.validators;class Me{constructor(e){this.defaults=e,this.interceptors={request:new ba,response:new ba}}async request(e,n){try{return await this._request(e,n)}catch(i){if(i instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const a=r.stack?r.stack.replace(/^.+\n/,""):"";i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
31
+ `+a):i.stack=a}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=dt(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:a}=n;i!==void 0&&ar.assertOptions(i,{silentJSONParsing:Te.transitional(Te.boolean),forcedJSONParsing:Te.transitional(Te.boolean),clarifyTimeoutError:Te.transitional(Te.boolean)},!1),r!=null&&(k.isFunction(r)?n.paramsSerializer={serialize:r}:ar.assertOptions(r,{encode:Te.function,serialize:Te.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=a&&k.merge(a.common,a[n.method]);a&&k.forEach(["delete","get","head","post","put","patch","common"],p=>{delete a[p]}),n.headers=le.concat(s,a);const o=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(l=l&&m.synchronous,o.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!l){const p=[Ea.bind(this),void 0];for(p.unshift.apply(p,o),p.push.apply(p,u),f=p.length,c=Promise.resolve(n);d<f;)c=c.then(p[d++],p[d++]);return c}f=o.length;let v=n;for(d=0;d<f;){const p=o[d++],m=o[d++];try{v=p(v)}catch(N){m.call(this,N);break}}try{c=Ea.call(this,v)}catch(p){return Promise.reject(p)}for(d=0,f=u.length;d<f;)c=c.then(u[d++],u[d++]);return c}getUri(e){e=dt(this.defaults,e);const n=Ho(e.baseURL,e.url);return Uo(n,e.params,e.paramsSerializer)}}k.forEach(["delete","get","head","options"],function(e){Me.prototype[e]=function(n,i){return this.request(dt(i||{},{method:e,url:n,data:(i||{}).data}))}});k.forEach(["post","put","patch"],function(e){function n(i){return function(a,s,o){return this.request(dt(o||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:s}))}}Me.prototype[e]=n(),Me.prototype[e+"Form"]=n(!0)});class Vr{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const i=this;this.promise.then(r=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](r);i._listeners=null}),this.promise.then=r=>{let a;const s=new Promise(o=>{i.subscribe(o),a=o}).then(r);return s.cancel=function(){i.unsubscribe(a)},s},e(function(a,s,o){i.reason||(i.reason=new nn(a,s,o),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new Vr(function(r){e=r}),cancel:e}}}function sh(t){return function(n){return t.apply(null,n)}}function oh(t){return k.isObject(t)&&t.isAxiosError===!0}const sr={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(sr).forEach(([t,e])=>{sr[e]=t});function Ko(t){const e=new Me(t),n=wo(Me.prototype.request,e);return k.extend(n,Me.prototype,e,{allOwnKeys:!0}),k.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Ko(dt(t,r))},n}const J=Ko(tn);J.Axios=Me;J.CanceledError=nn;J.CancelToken=Vr;J.isCancel=zo;J.VERSION=Go;J.toFormData=si;J.AxiosError=H;J.Cancel=J.CanceledError;J.all=function(e){return Promise.all(e)};J.spread=sh;J.isAxiosError=oh;J.mergeConfig=dt;J.AxiosHeaders=le;J.formToJSON=t=>Bo(k.isHTMLForm(t)?new FormData(t):t);J.getAdapter=qo.getAdapter;J.HttpStatusCode=sr;J.default=J;class lh{constructor(e){w(this,"logger");w(this,"axiosInstance");this.logger=e.logger,this.axiosInstance=J.create({baseURL:e.baseUrl,headers:e.accessToken?{Authorization:`Bearer ${e.accessToken}`}:{}})}async get(e){try{return(await this.axiosInstance.get(e)).data}catch(n){throw this.handleError(n),n}}async post(e,n){var a;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.post(e,i)).data}catch(s){if(this.handleError(s),r&&J.isAxiosError(s))return(a=s.response)==null?void 0:a.data;throw s}}handleError(e){var n,i;J.isAxiosError(e)&&(this.logger.error("Error Code:",(n=e.response)==null?void 0:n.status),this.logger.error("Result Data:",(i=e.response)==null?void 0:i.data))}}var Ur=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(Ur||{}),Wo=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(Wo||{}),jr=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(jr||{}),Jo=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(Jo||{}),Yo=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(Yo||{}),Qo=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(Qo||{});class oi{constructor(e){w(this,"root",Dr(this));w(this,"id");w(this,"account");w(this,"accountType",Ur.UNKNOWN);w(this,"username");w(this,"currencyConfig");w(this,"contractType");w(this,"nextDateMetricRecord");w(this,"spendedMinutes",0);w(this,"unlimitedService",!1);w(this,"hoursAvailable",0);w(this,"contractStatus",jr.ACTIVE);w(this,"createdAt");w(this,"installationDateApp");w(this,"cxAccount");w(this,"freeService",!1);w(this,"subscriptionType",null);w(this,"minutesAvailable",0);w(this,"globalPage");w(this,"stripe");w(this,"descriptionPlan");w(this,"planType");w(this,"selectFreeTrial");w(this,"exceededFeatures");w(this,"host",null);w(this,"variationThumbnailName");w(this,"variationsConfig");this.root.setProps(e)}static toDomain(e){const{createdAt:n,username:i,...r}=e,a={...r,username:i!=null?i:r.account,createdAt:new Date(Number(n))};return new oi(a)}toPrimitives(){const{root:e,createdAt:n,...i}=this;return{...i,created:n.toISOString()}}}const uh=`${yr.apiUrls.restV1}/accounts/v2`;class Xo{async get(e){const n=`${uh}/${e}`,{data:i}=await Ir({url:n});return i?oi.toDomain(i):null}}class Zo{constructor(e){this.accountRepository=e}async get(e){try{const n=await this.accountRepository.get(e);if(!n)throw new bo(e);return n}catch(n){throw new Fr(n)}}}const ch=new Xo,Mr=new Zo(ch),dh=()=>["account"],fh=()=>{const t=Rr(r=>r.accountName),[e,n]=hn(Hn),i=hs.useQuery(dh(),()=>Mr.get(t),{enabled:!!t&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return B.useEffect(()=>{const r=i.data;!i.isSuccess||!r||n(r)},[i.status]),{findQuery:i,account:e}},el=lu();async function tl(t){const e=await Mr.get(t);return el.set(Hn,e),e}var nl=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(nl||{});const hh={ALL:"*",CORE:"core:**",ADD_TO_CART_HOOKS:"core:addToCartHooks:**",LIVE_STREAMING_EVENT:"event:**",EVENT_CHAT:"event:chat:**",EVENT_PRODUCTS:"event:products:**",CUSTOMIZE_LIVE:"customize-live:**",PLAYER:"player:**",SNACK_SIZE_VIDEO:"ssv:**",SNACK_SIZE_VIDEO_ADMIN:"ssv-admin:**",UI:"ui:**",UTILS:"utils:**"},il={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var rl=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(rl||{}),al=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(al||{}),sl=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t.UNKNOWN="unknown",t))(sl||{}),ol=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(ol||{}),ll=(t=>(t.Add="add",t.Remove="remove",t))(ll||{}),ul=(t=>(t.Active="active",t.Inactive="inactive",t))(ul||{});const ph={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},mh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},gh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},vh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},yh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ManageCollectionProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ManageCollectionProductInInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"manageCollectionProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},kh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchCollections"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CollectionSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}},{kind:"Field",name:{kind:"Name",value:"products"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"title"}},{kind:"Field",name:{kind:"Name",value:"link"}},{kind:"Field",name:{kind:"Name",value:"pictures"}},{kind:"Field",name:{kind:"Name",value:"price"}},{kind:"Field",name:{kind:"Name",value:"salesprice"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"createdat"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},bh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdateCollection"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateCollectionInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCollection"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},_h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindMinimalEvent"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}},{kind:"Field",name:{kind:"Name",value:"thumbnails"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Sh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchMinimalEvents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchEventInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchEvent"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"EventArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"thumbnailsPath"}},{kind:"Field",name:{kind:"Name",value:"recordVideoPath"}},{kind:"Field",name:{kind:"Name",value:"createdAt"}},{kind:"Field",name:{kind:"Name",value:"status"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Nh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"BlockUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"BlockUserInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"blockUser"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"BlockUserSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Eh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ChangeAccountUsername"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"changeAccountUsername"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChangeUsernameSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Ah={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"DeleteChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Oh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetAllChatMessageInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatMessageArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"connectionId"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"email"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"idEvent"}},{kind:"Field",name:{kind:"Name",value:"sendDate"}},{kind:"Field",name:{kind:"Name",value:"sessionId"}},{kind:"Field",name:{kind:"Name",value:"type"}},{kind:"Field",name:{kind:"Name",value:"username"}},{kind:"Field",name:{kind:"Name",value:"isAdmin"}},{kind:"Field",name:{kind:"Name",value:"urlGif"}},{kind:"Field",name:{kind:"Name",value:"second"}},{kind:"Field",name:{kind:"Name",value:"ip"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},cl={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetChatRoomToken"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetChatRoomInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getChatRoomToken"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ChatRoomTokenData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"token"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},wh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"PinChatMessage"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PinChatInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pinChatMessage"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PinChatMessageSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Th={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"highlightProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"highlightProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Ch={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"deleteAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInputAccount"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},xh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getAllCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerSuccessArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"account"}},{kind:"Field",name:{kind:"Name",value:"data"}},{kind:"Field",name:{kind:"Name",value:"section"}},{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Fh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"updateCustomization"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CustomPlayerInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateCustomPlayer"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Rh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetTimeLine"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetTimeLineInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getTimeLine"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"TimeLineArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"time"}},{kind:"Field",name:{kind:"Name",value:"likes"}},{kind:"Field",name:{kind:"Name",value:"comments"}},{kind:"Field",name:{kind:"Name",value:"viewers"}},{kind:"Field",name:{kind:"Name",value:"orders"}},{kind:"Field",name:{kind:"Name",value:"minute"}},{kind:"Field",name:{kind:"Name",value:"hour"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Ih={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AppendProductsToSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RelateToProductsSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"appendProductsSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Dh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CreatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Ph={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"CreateSnackVideoBatch"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"CreateSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"createSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Lh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteRelationshipWithSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipKeys"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteRelationshipSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Error"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}}]}}]}}]}}]},$h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeleteSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deleteSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ActionSnackVideoSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Vh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindManySnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindManySnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findManySnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Uh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAllSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getAllSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},jh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayLists"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"QueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayLists"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"created"}},{kind:"Field",name:{kind:"Name",value:"videoAmount"}},{kind:"Field",name:{kind:"Name",value:"productAmount"}},{kind:"Field",name:{kind:"Name",value:"updated"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"order"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Mh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetSnackVideoRelationships"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoRelationshipInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getRelationshipSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"RelationshipSnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sourceEntity"}},{kind:"Field",name:{kind:"Name",value:"attributeId"}}]}}]}}]}}]}}]},Bh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"SearchSnackVideos"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"SearchInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"searchSnackVideos"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoCreatedArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"snackVideos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"uploadProgress"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"eventId"}},{kind:"Field",name:{kind:"Name",value:"eventName"}},{kind:"Field",name:{kind:"Name",value:"created"}}]}},{kind:"Field",name:{kind:"Name",value:"cursor"}},{kind:"Field",name:{kind:"Name",value:"totalItems"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},zh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdatePlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"UpdatePlayListSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Hh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"FindByProductSnackVideo"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"FindByProductSnackVideoInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"findByProductSnackVideo"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"SnackVideoArray"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},qh={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPlayList"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"GetPlayListQueryInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"getPlayList"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PlayListData"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"data"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"description"}},{kind:"Field",name:{kind:"Name",value:"videos"},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"productId"}},{kind:"Field",name:{kind:"Name",value:"id"}},{kind:"Field",name:{kind:"Name",value:"name"}},{kind:"Field",name:{kind:"Name",value:"url"}},{kind:"Field",name:{kind:"Name",value:"thumbnailUrl"}},{kind:"Field",name:{kind:"Name",value:"duration"}},{kind:"Field",name:{kind:"Name",value:"transmitionType"}},{kind:"Field",name:{kind:"Name",value:"order"}}]}}]}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}},{kind:"Field",name:{kind:"Name",value:"statusCode"}},{kind:"Field",name:{kind:"Name",value:"timestamp"}}]}}]}}]}}]},Gh=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:ph,AppendProductsToSnackVideoDocument:Ih,BlockUserDocument:Nh,ChangeAccountUsernameDocument:Eh,CreatePlayListDocument:Dh,CreateSnackVideoBatchDocument:Ph,DeleteAllCustomizationDocument:Ch,DeleteChatMessageDocument:Ah,DeleteCollectionDocument:mh,DeleteRelationshipWithSnackVideoDocument:Lh,DeleteSnackVideoDocument:$h,EventStatus:ol,FindByProductSnackVideoDocument:Hh,FindCollectionDocument:gh,FindManySnackVideosDocument:Vh,FindMinimalEventDocument:_h,GetAllChatMessageDocument:Oh,GetAllCollectionsDocument:vh,GetAllCustomizationDocument:xh,GetAllSnackVideosDocument:Uh,GetChatRoomTokenDocument:cl,GetPlayListDocument:qh,GetPlayListsDocument:jh,GetSnackVideoRelationshipsDocument:Mh,GetTimeLineDocument:Rh,HighlightProductDocument:Th,ManageCollectionProductDocument:yh,Methods:ll,PinChatMessageDocument:wh,SearchCollectionsDocument:kh,SearchMinimalEventsDocument:Sh,SearchSnackVideosDocument:Bh,Status:ul,UpdateCollectionDocument:bh,UpdateCustomizationDocument:Fh,UpdatePlayListDocument:zh},Symbol.toStringTag,{value:"Module"}));var li=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(li||{});function Kh(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}var Qe=(t=>(t.Local="local",t.VtexLegacy="vtexlegacy",t.VtexIO="vtexio",t.External="external",t))(Qe||{}),Br=(t=>(t.PROD="prod",t.DEV="dev",t.LOCAL="local",t))(Br||{});const{coreLogger:Wh}=Ye(),or=$e.withPrefix(Wh,"addToCartHooks"),Ri="addToCartHooks.notification.error",lr={errorAddingToCart:Ri,errorOpeningVariationSelector:Ri,errorOpeningNewTab:Ri,successAddingToCart:"addToCartHooks.notification.success"};async function Jh(t){const e={...t,action:{type:li.ADD_TO_CART,exec:()=>or.error("action no implemented in validate hook")}};try{const n=await Yh(e),i=await Qh(n);await Xh(i)}catch(n){or.error("error unhandled",n)}}async function Yh(t){var a,s;const{context:e,userAddToCartConfig:n}=t,i=(a=n==null?void 0:n.hooks)==null?void 0:a.transform;let r=t.product;if(i)try{r=await i({product:{...r},data:(s=e.data)!=null?s:{}})}catch(o){Pn("transform",o)}return{...t,product:r}}async function Qh(t){var l,u;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:r}=t,a=dl(t),s=(l=i==null?void 0:i.hooks)==null?void 0:l.validate;let o=n.validate({...t,actionFactory:a});if(s)try{o=await s({product:{...r},defaultAction:{...o},action:a,data:(u=e.data)!=null?u:{}})}catch(c){Pn("validate",c)}return{...t,action:o,actionFactory:a}}async function Xh(t){var N;const{eventBus:e}=Ye(),{product:n,userAddToCartConfig:i,notifyFactory:r,action:a,actionFactory:s}=t,{isVariationSelectorOpen:o,data:l={}}=t.context,u=(N=i==null?void 0:i.hooks)==null?void 0:N.end,c=a.type===li.ADD_TO_CART;let d=null,f=!1;const v=()=>{!c||!o||s.openVariationSelector(!1).exec()},p=()=>{!c||f||(d?r.error(lr.errorAddingToCart):r.success(lr.successAddingToCart))},m=()=>{const _={product:n,actionType:a.type,success:!d,error:d};e.emit(il.ATCH_ACTION_EXECUTED,_)};try{if(!a.type||!a.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await a.exec()}catch(_){Pn("end",_),d=_}if(u)try{f=!!await u({data:l,error:d,notify:r,actionExecuted:a})}catch(_){Pn("end",_)}v(),p(),m()}function dl(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=r=>Object.entries(r!=null?r:{}).reduce((a,[s,o])=>({...a,[s]:l=>({type:s,exec:()=>o(l)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function Pn(t,e){or.error(`addToCartHooks error running ${t}: `,e)}function fl(t){const e=Object.values(t);return Object.assign({},...e)}function hl(t){return Object.entries(t).reduce((e,[n,i])=>{const r=fl(i);return{...e,[n]:r}},{})}function pl(t,e){const n=hl(e);Object.entries(n).forEach(([i,r])=>{t.addResourceBundle(i,"translation",r,!0)})}function Zh(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Bt(t){"@babel/helpers - typeof";return Bt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Bt(t)}function ep(t,e){if(Bt(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Bt(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function tp(t){var e=ep(t,"string");return Bt(e)=="symbol"?e:e+""}function np(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,tp(i.key),i)}}function ip(t,e,n){return e&&np(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var ml=[],rp=ml.forEach,ap=ml.slice;function sp(t){return rp.call(ap.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var wa=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,op=function(e,n,i){var r=i||{};r.path=r.path||"/";var a=encodeURIComponent(n),s="".concat(e,"=").concat(a);if(r.maxAge>0){var o=r.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(o))}if(r.domain){if(!wa.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(r.domain)}if(r.path){if(!wa.test(r.path))throw new TypeError("option path is invalid");s+="; Path=".concat(r.path)}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite){var l=typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite;switch(l){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return s},Ta={create:function(e,n,i,r){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+i*60*1e3)),r&&(a.domain=r),document.cookie=op(e,encodeURIComponent(n),a)},read:function(e){for(var n="".concat(e,"="),i=document.cookie.split(";"),r=0;r<i.length;r++){for(var a=i[r];a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(n)===0)return a.substring(n.length,a.length)}return null},remove:function(e){this.create(e,"",-1)}},lp={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&typeof document!="undefined"){var i=Ta.read(e.lookupCookie);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupCookie&&typeof document!="undefined"&&Ta.create(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},up={name:"querystring",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=i.substring(1),a=r.split("&"),s=0;s<a.length;s++){var o=a[s].indexOf("=");if(o>0){var l=a[s].substring(0,o);l===e.lookupQuerystring&&(n=a[s].substring(o+1))}}}return n}},Et=null,Ca=function(){if(Et!==null)return Et;try{Et=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Et=!1}return Et},cp={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&Ca()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&Ca()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},At=null,xa=function(){if(At!==null)return At;try{At=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{At=!1}return At},dp={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&xa()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&xa()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},fp={name:"navigator",lookup:function(e){var n=[];if(typeof navigator!="undefined"){if(navigator.languages)for(var i=0;i<navigator.languages.length;i++)n.push(navigator.languages[i]);navigator.userLanguage&&n.push(navigator.userLanguage),navigator.language&&n.push(navigator.language)}return n.length>0?n:void 0}},hp={name:"htmlTag",lookup:function(e){var n,i=e.htmlTag||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},pp={name:"path",lookup:function(e){var n;if(typeof window!="undefined"){var i=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(i instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof i[e.lookupFromPathIndex]!="string")return;n=i[e.lookupFromPathIndex].replace("/","")}else n=i[0].replace("/","")}return n}},mp={name:"subdomain",lookup:function(e){var n=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,i=typeof window!="undefined"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(i)return i[n]}};function gp(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var gl=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Zh(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return ip(t,[{key:"init",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=sp(i,this.options||{},gp()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(a){return a.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(lp),this.addDetector(up),this.addDetector(cp),this.addDetector(dp),this.addDetector(fp),this.addDetector(hp),this.addDetector(pp),this.addDetector(mp)}},{key:"addDetector",value:function(n){return this.detectors[n.name]=n,this}},{key:"detect",value:function(n){var i=this;n||(n=this.options.order);var r=[];return n.forEach(function(a){if(i.detectors[a]){var s=i.detectors[a].lookup(i.options);s&&typeof s=="string"&&(s=[s]),s&&(r=r.concat(s))}}),r=r.map(function(a){return i.options.convertDetectedLanguage(a)}),this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}},{key:"cacheUserLanguage",value:function(n,i){var r=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||i.forEach(function(a){r.detectors[a]&&r.detectors[a].cacheUserLanguage(n,r.options)}))}}]),t}();gl.type="languageDetector";function vl(t,e){t.use(e).use(gl).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,r)=>{if(i){const[a,...s]=i.split(",").map(o=>o.trim());if(a==="number")return new Intl.NumberFormat(r).format(n);if(a==="date")return new Intl.DateTimeFormat(r).format(n);if(a==="currency")return new Intl.NumberFormat(r,{style:"currency",currency:s[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const vp={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){console&&console[t]&&console[t].apply(console,e)}};class Ln{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=n.prefix||"i18next:",this.logger=e||vp,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,r){return r&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Ln(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ln(this.logger,e)}}var ke=new Ln;class ui{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(s=>{let[o,l]=s;for(let u=0;u<l;u++)o(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(s=>{let[o,l]=s;for(let u=0;u<l;u++)o.apply(o,[e,...i])})}}function Ot(){let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n}function Fa(t){return t==null?"":""+t}function yp(t,e,n){t.forEach(i=>{e[i]&&(n[i]=e[i])})}const kp=/###/g;function Ft(t,e,n){function i(o){return o&&o.indexOf("###")>-1?o.replace(kp,"."):o}function r(){return!t||typeof t=="string"}const a=typeof e!="string"?e:e.split(".");let s=0;for(;s<a.length-1;){if(r())return{};const o=i(a[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return r()?{}:{obj:t,k:i(a[s])}}function Ra(t,e,n){const{obj:i,k:r}=Ft(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let a=e[e.length-1],s=e.slice(0,e.length-1),o=Ft(t,s,Object);for(;o.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),o=Ft(t,s,Object),o&&o.obj&&typeof o.obj[`${o.k}.${a}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=n}function bp(t,e,n,i){const{obj:r,k:a}=Ft(t,e,Object);r[a]=r[a]||[],r[a].push(n)}function $n(t,e){const{obj:n,k:i}=Ft(t,e);if(n)return n[i]}function _p(t,e,n){const i=$n(t,n);return i!==void 0?i:$n(e,n)}function yl(t,e,n){for(const i in e)i!=="__proto__"&&i!=="constructor"&&(i in t?typeof t[i]=="string"||t[i]instanceof String||typeof e[i]=="string"||e[i]instanceof String?n&&(t[i]=e[i]):yl(t[i],e[i],n):t[i]=e[i]);return t}function et(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Sp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Np(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>Sp[e]):t}class Ep{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}}const Ap=[" ",",","?","!",";"],Op=new Ep(20);function wp(t,e,n){e=e||"",n=n||"";const i=Ap.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const r=Op.getRegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let a=!r.test(t);if(!a){const s=t.indexOf(n);s>0&&!r.test(t.substring(0,s))&&(a=!0)}return a}function ur(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let r=t;for(let a=0;a<i.length;){if(!r||typeof r!="object")return;let s,o="";for(let l=a;l<i.length;++l)if(l!==a&&(o+=n),o+=i[l],s=r[o],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&l<i.length-1)continue;a+=l-a+1;break}r=s}return r}function Vn(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class Ia extends ui{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,s=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,n],i&&(Array.isArray(i)?o.push(...i):typeof i=="string"&&a?o.push(...i.split(a)):o.push(i)));const l=$n(this.data,o);return!l&&!n&&!i&&e.indexOf(".")>-1&&(e=o[0],n=o[1],i=o.slice(2).join(".")),l||!s||typeof i!="string"?l:ur(this.data&&this.data[e]&&this.data[e][n],i,a)}addResource(e,n,i,r){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 o=[e,n];i&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."),r=n,n=o[1]),this.addNamespaces(n),Ra(this.data,o,r),a.silent||this.emit("added",e,n,i,r)}addResources(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in i)(typeof i[a]=="string"||Object.prototype.toString.apply(i[a])==="[object Array]")&&this.addResource(e,n,a,i[a],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),r=i,i=n,n=o[1]),this.addNamespaces(n);let l=$n(this.data,o)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?yl(l,i,a):l={...l,...i},Ra(this.data,o,l),s.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var kl={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(a=>{this.processors[a]&&(e=this.processors[a].process(e,n,i,r))}),e}};const Da={};class Un extends ui{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),yp(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ke.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,n);return i&&i.res!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let a=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!wp(e,i,r);if(s&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:a};const u=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(u[0])>-1)&&(a=u.shift()),e=u.join(r)}return typeof a=="string"&&(a=[a]),{key:e,namespaces:a}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const r=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:o}=this.extractFromKey(e[e.length-1],n),l=o[o.length-1],u=n.lng||this.language,c=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(c){const T=n.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${T}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${T}${s}`}return r?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const d=this.resolve(e,n);let f=d&&d.res;const v=d&&d.usedKey||s,p=d&&d.exactUsedKey||s,m=Object.prototype.toString.apply(f),N=["[object Number]","[object Function]","[object RegExp]"],_=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,P=!this.i18nFormat||this.i18nFormat.handleAsObject;if(P&&f&&(typeof f!="string"&&typeof f!="boolean"&&typeof f!="number")&&N.indexOf(m)<0&&!(typeof _=="string"&&m==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,f,{...n,ns:o}):`key '${s} (${this.language})' returned an object instead of string.`;return r?(d.res=T,d.usedParams=this.getUsedParamsDetails(n),d):T}if(a){const T=m==="[object Array]",L=T?[]:{},M=T?p:v;for(const G in f)if(Object.prototype.hasOwnProperty.call(f,G)){const y=`${M}${a}${G}`;L[G]=this.translate(y,{...n,joinArrays:!1,ns:o}),L[G]===y&&(L[G]=f[G])}f=L}}else if(P&&typeof _=="string"&&m==="[object Array]")f=f.join(_),f&&(f=this.extendTranslation(f,e,n,i));else{let T=!1,L=!1;const M=n.count!==void 0&&typeof n.count!="string",G=Un.hasDefaultValue(n),y=M?this.pluralResolver.getSuffix(u,n.count,n):"",C=n.ordinal&&M?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",F=M&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),S=F&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${y}`]||n[`defaultValue${C}`]||n.defaultValue;!this.isValidLookup(f)&&G&&(T=!0,f=S),this.isValidLookup(f)||(L=!0,f=s);const A=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&L?void 0:f,h=G&&S!==f&&this.options.updateMissing;if(L||T||h){if(this.logger.log(h?"updateKey":"missingKey",u,l,s,h?S:f),a){const D=this.resolve(s,{...n,keySeparator:!1});D&&D.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 g=[];const x=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&x&&x[0])for(let D=0;D<x.length;D++)g.push(x[D]);else this.options.saveMissingTo==="all"?g=this.languageUtils.toResolveHierarchy(n.lng||this.language):g.push(n.lng||this.language);const I=(D,j,me)=>{const we=G&&me!==f?me:A;this.options.missingKeyHandler?this.options.missingKeyHandler(D,l,j,we,h,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(D,l,j,we,h,n),this.emit("missingKey",D,l,j,f)};this.options.saveMissing&&(this.options.saveMissingPlurals&&M?g.forEach(D=>{const j=this.pluralResolver.getSuffixes(D,n);F&&n[`defaultValue${this.options.pluralSeparator}zero`]&&j.indexOf(`${this.options.pluralSeparator}zero`)<0&&j.push(`${this.options.pluralSeparator}zero`),j.forEach(me=>{I([D],s+me,n[`defaultValue${me}`]||S)})}):I(g,s,S))}f=this.extendTranslation(f,e,n,d,i),L&&f===s&&this.options.appendNamespaceToMissingKey&&(f=`${l}:${s}`),(L||T)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?f=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,T?f:void 0):f=this.options.parseMissingKeyHandler(f))}return r?(d.res=f,d.usedParams=this.getUsedParamsDetails(n),d):f}extendTranslation(e,n,i,r,a){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const u=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let c;if(u){const f=e.match(this.interpolator.nestingRegexp);c=f&&f.length}let d=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,i.lng||this.language,i),u){const f=e.match(this.interpolator.nestingRegexp),v=f&&f.length;c<v&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(i.lng=r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var f=arguments.length,v=new Array(f),p=0;p<f;p++)v[p]=arguments[p];return a&&a[0]===v[0]&&!i.context?(s.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${n[0]}`),null):s.translate(...v,n)},i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,l=typeof o=="string"?[o]:o;return e!=null&&l&&l.length&&i.applyPostProcessor!==!1&&(e=kl.handle(l,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,r,a,s,o;return typeof e=="string"&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(l,n),c=u.key;r=c;let d=u.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&typeof n.count!="string",v=f&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),p=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",m=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(N=>{this.isValidLookup(i)||(o=N,!Da[`${m[0]}-${N}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(Da[`${m[0]}-${N}`]=!0,this.logger.warn(`key "${r}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),m.forEach(_=>{if(this.isValidLookup(i))return;s=_;const P=[c];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(P,c,_,N,n);else{let T;f&&(T=this.pluralResolver.getSuffix(_,n.count,n));const L=`${this.options.pluralSeparator}zero`,M=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(P.push(c+T),n.ordinal&&T.indexOf(M)===0&&P.push(c+T.replace(M,this.options.pluralSeparator)),v&&P.push(c+L)),p){const G=`${c}${this.options.contextSeparator}${n.context}`;P.push(G),f&&(P.push(G+T),n.ordinal&&T.indexOf(M)===0&&P.push(G+T.replace(M,this.options.pluralSeparator)),v&&P.push(G+L))}}let V;for(;V=P.pop();)this.isValidLookup(i)||(a=V,i=this.getResource(_,N,V,n))}))})}),{res:i,usedKey:r,exactUsedKey:a,usedLng:s,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,r):this.resourceStore.getResource(e,n,i,r)}getUsedParamsDetails(){let e=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"],i=e.replace&&typeof e.replace!="string";let r=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const a of n)delete r[a]}return r}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}function Ii(t){return t.charAt(0).toUpperCase()+t.slice(1)}class Pa{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ke.create("languageUtils")}getScriptPartFromCode(e){if(e=Vn(e),!e||e.indexOf("-")<0)return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Vn(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(r=>r.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ii(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=Ii(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Ii(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getLanguagePartFromCode(i);if(this.isSupportedCode(r))return n=r;n=this.options.supportedLngs.find(a=>{if(a===r)return a;if(!(a.indexOf("-")<0&&r.indexOf("-")<0)&&(a.indexOf("-")>0&&r.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===r||a.indexOf(r)===0&&r.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),r=[],a=s=>{s&&(this.isSupportedCode(s)?r.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(e))):typeof e=="string"&&a(this.formatLanguageCode(e)),i.forEach(s=>{r.indexOf(s)<0&&a(this.formatLanguageCode(s))}),r}}let Tp=[{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}],Cp={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const xp=["v1","v2","v3"],Fp=["v4"],La={zero:0,one:1,two:2,few:3,many:4,other:5};function Rp(){const t={};return Tp.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Cp[e.fc]}})}),t}class Ip{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=ke.create("pluralResolver"),(!this.options.compatibilityJSON||Fp.includes(this.options.compatibilityJSON))&&(typeof Intl=="undefined"||!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=Rp()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(Vn(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(r=>`${n}${r}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((r,a)=>La[r]-La[a]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):i.numbers.map(r=>this.getSuffix(e,r,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const r=this.getRule(e,i);return r?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:this.getSuffixRetroCompatible(r,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let r=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(r===2?r="plural":r===1&&(r=""));const a=()=>this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString();return this.options.compatibilityJSON==="v1"?r===1?"":typeof r=="number"?`_plural_${r.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?a():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!xp.includes(this.options.compatibilityJSON)}}function $a(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=_p(t,e,n);return!a&&r&&typeof n=="string"&&(a=ur(t,n,i),a===void 0&&(a=ur(e,n,i))),a}class Dp{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ke.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const n=e.interpolation;this.escape=n.escape!==void 0?n.escape:Np,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?et(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?et(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?et(n.nestingPrefix):n.nestingPrefixEscaped||et("$t("),this.nestingSuffix=n.nestingSuffix?et(n.nestingSuffix):n.nestingSuffixEscaped||et(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,i)=>n&&n.source===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(e,n,i,r){let a,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(p){return p.replace(/\$/g,"$$$$")}const c=p=>{if(p.indexOf(this.formatSeparator)<0){const P=$a(n,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(P,void 0,i,{...r,...n,interpolationkey:p}):P}const m=p.split(this.formatSeparator),N=m.shift().trim(),_=m.join(this.formatSeparator).trim();return this.format($a(n,l,N,this.options.keySeparator,this.options.ignoreJSONStructure),_,i,{...r,...n,interpolationkey:N})};this.resetRegExp();const d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,f=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>u(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?u(this.escape(p)):u(p)}].forEach(p=>{for(o=0;a=p.regex.exec(e);){const m=a[1].trim();if(s=c(m),s===void 0)if(typeof d=="function"){const _=d(e,a,r);s=typeof _=="string"?_:""}else if(r&&Object.prototype.hasOwnProperty.call(r,m))s="";else if(f){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Fa(s));const N=p.safeValue(s);if(e=e.replace(a[0],N),f?(p.regex.lastIndex+=s.length,p.regex.lastIndex-=a[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,a,s;function o(l,u){const c=this.nestingOptionsSeparator;if(l.indexOf(c)<0)return l;const d=l.split(new RegExp(`${c}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,s);const v=f.match(/'/g),p=f.match(/"/g);(v&&v.length%2===0&&!p||p.length%2!==0)&&(f=f.replace(/'/g,'"'));try{s=JSON.parse(f),u&&(s={...u,...s})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${c}${f}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l}for(;r=this.nestingRegexp.exec(e);){let l=[];s={...i},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let u=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const c=r[1].split(this.formatSeparator).map(d=>d.trim());r[1]=c.shift(),l=c,u=!0}if(a=n(o.call(this,r[1].trim(),s),s),a&&r[0]===e&&typeof a!="string")return a;typeof a!="string"&&(a=Fa(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),u&&(a=l.reduce((c,d)=>this.format(c,d,i.lng,{...i,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}function Pp(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const r=i[1].substring(0,i[1].length-1);e==="currency"&&r.indexOf(":")<0?n.currency||(n.currency=r.trim()):e==="relativetime"&&r.indexOf(":")<0?n.range||(n.range=r.trim()):r.split(";").forEach(s=>{if(!s)return;const[o,...l]=s.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,"");n[o.trim()]||(n[o.trim()]=u),u==="false"&&(n[o.trim()]=!1),u==="true"&&(n[o.trim()]=!0),isNaN(u)||(n[o.trim()]=parseInt(u,10))})}return{formatName:e,formatOptions:n}}function tt(t){const e={};return function(i,r,a){const s=r+JSON.stringify(a);let o=e[s];return o||(o=t(Vn(r),a),e[s]=o),o(i)}}class Lp{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ke.create("formatter"),this.options=e,this.formats={number:tt((n,i)=>{const r=new Intl.NumberFormat(n,{...i});return a=>r.format(a)}),currency:tt((n,i)=>{const r=new Intl.NumberFormat(n,{...i,style:"currency"});return a=>r.format(a)}),datetime:tt((n,i)=>{const r=new Intl.DateTimeFormat(n,{...i});return a=>r.format(a)}),relativetime:tt((n,i)=>{const r=new Intl.RelativeTimeFormat(n,{...i});return a=>r.format(a,i.range||"day")}),list:tt((n,i)=>{const r=new Intl.ListFormat(n,{...i});return a=>r.format(a)})},this.init(e)}init(e){const i=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=tt(n)}format(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((o,l)=>{const{formatName:u,formatOptions:c}=Pp(l);if(this.formats[u]){let d=o;try{const f=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},v=f.locale||f.lng||r.locale||r.lng||i;d=this.formats[u](o,v,{...c,...r,...f})}catch(f){this.logger.warn(f)}return d}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}function $p(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class Vp extends ui{constructor(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=ke.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,r.backend,r)}queueLoad(e,n,i,r){const a={},s={},o={},l={};return e.forEach(u=>{let c=!0;n.forEach(d=>{const f=`${u}|${d}`;!i.reload&&this.store.hasResourceBundle(u,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?s[f]===void 0&&(s[f]=!0):(this.state[f]=1,c=!1,s[f]===void 0&&(s[f]=!0),a[f]===void 0&&(a[f]=!0),l[d]===void 0&&(l[d]=!0)))}),c||(o[u]=!0)}),(Object.keys(a).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const r=e.split("|"),a=r[0],s=r[1];n&&this.emit("failedLoading",a,s,n),i&&this.store.addResourceBundle(a,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2;const o={};this.queue.forEach(l=>{bp(l.loaded,[a],s),$p(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const c=l.loaded[u];c.length&&c.forEach(d=>{o[u][d]===void 0&&(o[u][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,n,i){let r=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(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:a,callback:s});return}this.readingCalls++;const o=(u,c)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(u&&c&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,r+1,a*2,s)},a);return}s(u,c)},l=this.backend[i].bind(this.backend);if(l.length===2){try{const u=l(e,n);u&&typeof u.then=="function"?u.then(c=>o(null,c)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,n,o)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=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."),r&&r();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const a=this.queueLoad(e,n,i,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(s=>{this.loadOne(s)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),r=i[0],a=i[1];this.read(r,a,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${a} for language ${r} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${a} for language ${r}`,o),this.loaded(e,s,o)})}saveMissing(e,n,i,r,a){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},o=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 "${i}" 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(!(i==null||i==="")){if(this.backend&&this.backend.create){const l={...s,isUpdate:a},u=this.backend.create.bind(this.backend);if(u.length<6)try{let c;u.length===5?c=u(e,n,i,r,l):c=u(e,n,i,r),c&&typeof c.then=="function"?c.then(d=>o(null,d)).catch(o):o(null,c)}catch(c){o(c)}else u(e,n,i,r,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}function Va(){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(e){let n={};if(typeof e[1]=="object"&&(n=e[1]),typeof e[1]=="string"&&(n.defaultValue=e[1]),typeof e[2]=="string"&&(n.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(r=>{n[r]=i[r]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ua(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function cn(){}function Up(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class zt extends ui{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ua(e),this.services={},this.logger=ke,this.modules={external:[]},Up(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=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 r=Va();this.options={...r,...this.options,...Ua(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...r.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function a(c){return c?typeof c=="function"?new c:c:null}if(!this.options.isClone){this.modules.logger?ke.init(a(this.modules.logger),this.options):ke.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:typeof Intl!="undefined"&&(c=Lp);const d=new Pa(this.options);this.store=new Ia(this.options.resources,this.options);const f=this.services;f.logger=ke,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new Ip(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(f.formatter=a(c),f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new Dp(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new Vp(a(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",function(v){for(var p=arguments.length,m=new Array(p>1?p-1:0),N=1;N<p;N++)m[N-1]=arguments[N];e.emit(v,...m)}),this.modules.languageDetector&&(f.languageDetector=a(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=a(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new Un(this.services,this.options),this.translator.on("*",function(v){for(var p=arguments.length,m=new Array(p>1?p-1:0),N=1;N<p;N++)m[N-1]=arguments[N];e.emit(v,...m)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,i||(i=cn),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[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(c=>{this[c]=function(){return e.store[c](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=function(){return e.store[c](...arguments),e}});const l=Ot(),u=()=>{const c=(d,f)=>{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),l.resolve(f),i(d,f)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cn;const r=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(r&&r.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const a=[],s=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&a.indexOf(u)<0&&a.push(u)})};r?s(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>s(l)),this.options.preload&&this.options.preload.forEach(o=>s(o)),this.services.backendConnector.load(a,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,n,i){const r=Ot();return e||(e=this.languages),n||(n=this.options.ns),i||(i=cn),this.services.backendConnector.reload(e,n,a=>{r.resolve(),i(a)}),r}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&kl.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const r=Ot();this.emit("languageChanging",e);const a=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(a(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,r.resolve(function(){return i.t(...arguments)}),n&&n(l,function(){return i.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=typeof l=="string"?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||a(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,c=>{s(c,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),r}getFixedT(e,n,i){var r=this;const a=function(s,o){let l;if(typeof o!="object"){for(var u=arguments.length,c=new Array(u>2?u-2:0),d=2;d<u;d++)c[d-2]=arguments[d];l=r.options.overloadTranslationOptionHandler([s,o].concat(c))}else l={...o};l.lng=l.lng||a.lng,l.lngs=l.lngs||a.lngs,l.ns=l.ns||a.ns,l.keyPrefix=l.keyPrefix||i||a.keyPrefix;const f=r.options.keySeparator||".";let v;return l.keyPrefix&&Array.isArray(s)?v=s.map(p=>`${l.keyPrefix}${f}${p}`):v=l.keyPrefix?`${l.keyPrefix}${f}${s}`:s,r.t(v,l)};return typeof e=="string"?a.lng=e:a.lngs=e,a.ns=n,a.keyPrefix=i,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){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 i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===2};if(n.precheck){const o=n.precheck(this,s);if(o!==void 0)return o}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!r||s(a,e)))}loadNamespaces(e,n){const i=Ot();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(r=>{this.options.ns.indexOf(r)<0&&this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Ot();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],a=e.filter(s=>r.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return a.length?(this.options.preload=r.concat(a),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)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"],i=this.services&&this.services.languageUtils||new Pa(Va());return n.indexOf(i.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;return new zt(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:cn;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new zt(r);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(o=>{a[o]=this[o]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i&&(a.store=new Ia(this.store.data,r),a.services.resourceStore=a.store),a.translator=new Un(a.services,r),a.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),c=1;c<l;c++)u[c-1]=arguments[c];a.emit(o,...u)}),a.init(r,n),a.translator.options=r,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 te=zt.createInstance();te.createInstance=zt.createInstance;te.createInstance;te.dir;te.init;te.loadResources;te.reloadResources;te.use;te.changeLanguage;te.getFixedT;te.t;te.exists;te.setDefaultNamespace;te.hasLoadedNamespace;te.loadNamespaces;te.loadLanguages;const jp=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Mp={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Bp=t=>Mp[t],zp=t=>t.replace(jp,Bp);let ja={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:zp};function Hp(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ja={...ja,...t}}const qp={type:"3rdParty",init(t){Hp(t.options.react)}};vl(te,qp);const Gp=t=>pl(te,t);/**
32
32
  * @license
33
33
  * Copyright 2019 Google LLC
34
34
  * SPDX-License-Identifier: BSD-3-Clause
35
- */const en=globalThis,Ji=en.ShadowRoot&&(en.ShadyCSS===void 0||en.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Yi=Symbol(),Hr=new WeakMap;let ko=class{constructor(e,n,i){if(this._$cssResult$=!0,i!==Yi)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(Ji&&e===void 0){const i=n!==void 0&&n.length===1;i&&(e=Hr.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Hr.set(n,e))}return e}toString(){return this.cssText}};const Pm=t=>new ko(typeof t=="string"?t:t+"",void 0,Yi),$m=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((i,r,a)=>i+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[a+1],t[0]);return new ko(n,t,Yi)},Lm=(t,e)=>{if(Ji)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const i=document.createElement("style"),r=en.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=n.cssText,t.appendChild(i)}},Gr=Ji?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const i of e.cssRules)n+=i.cssText;return Pm(n)})(t):t;/**
35
+ */const bn=globalThis,zr=bn.ShadowRoot&&(bn.ShadyCSS===void 0||bn.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Hr=Symbol(),Ma=new WeakMap;let bl=class{constructor(e,n,i){if(this._$cssResult$=!0,i!==Hr)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(zr&&e===void 0){const i=n!==void 0&&n.length===1;i&&(e=Ma.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Ma.set(n,e))}return e}toString(){return this.cssText}};const Kp=t=>new bl(typeof t=="string"?t:t+"",void 0,Hr),Wp=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((i,r,a)=>i+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[a+1],t[0]);return new bl(n,t,Hr)},Jp=(t,e)=>{if(zr)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const i=document.createElement("style"),r=bn.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=n.cssText,t.appendChild(i)}},Ba=zr?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const i of e.cssRules)n+=i.cssText;return Kp(n)})(t):t;/**
36
36
  * @license
37
37
  * Copyright 2017 Google LLC
38
38
  * SPDX-License-Identifier: BSD-3-Clause
39
- */const{is:Dm,defineProperty:Im,getOwnPropertyDescriptor:Vm,getOwnPropertyNames:jm,getOwnPropertySymbols:Um,getPrototypeOf:Mm}=Object,Ne=globalThis,Kr=Ne.trustedTypes,Bm=Kr?Kr.emptyScript:"",ri=Ne.reactiveElementPolyfillSupport,vt=(t,e)=>t,Ci={toAttribute(t,e){switch(e){case Boolean:t=t?Bm:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},yo=(t,e)=>!Dm(t,e),qr={attribute:!0,type:String,converter:Ci,reflect:!1,hasChanged:yo};var na,ia;(na=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(ia=Ne.litPropertyMetadata)!=null||(Ne.litPropertyMetadata=new WeakMap);class Ge extends HTMLElement{static addInitializer(e){var n;this._$Ei(),((n=this.l)!=null?n:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=qr){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(e,n),!n.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,n);r!==void 0&&Im(this.prototype,e,r)}}static getPropertyDescriptor(e,n,i){var s;const{get:r,set:a}=(s=Vm(this.prototype,e))!=null?s:{get(){return this[n]},set(o){this[n]=o}};return{get(){return r==null?void 0:r.call(this)},set(o){const l=r==null?void 0:r.call(this);a.call(this,o),this.requestUpdate(e,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var n;return(n=this.elementProperties.get(e))!=null?n:qr}static _$Ei(){if(this.hasOwnProperty(vt("elementProperties")))return;const e=Mm(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(vt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(vt("properties"))){const n=this.properties,i=[...jm(n),...Um(n)];for(const r of i)this.createProperty(r,n[r])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[i,r]of n)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[n,i]of this.elementProperties){const r=this._$Eu(n,i);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)n.unshift(Gr(r))}else e!==void 0&&n.push(Gr(e));return n}static _$Eu(e,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(n=>n(this))}addController(e){var n,i;((n=this._$EO)!=null?n:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)==null||i.call(e))}removeController(e){var n;(n=this._$EO)==null||n.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const i of n.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var n;const e=(n=this.shadowRoot)!=null?n:this.attachShadow(this.constructor.shadowRootOptions);return Lm(e,this.constructor.elementStyles),e}connectedCallback(){var e,n;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostConnected)==null?void 0:r.call(i)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(n=>{var i;return(i=n.hostDisconnected)==null?void 0:i.call(n)})}attributeChangedCallback(e,n,i){this._$AK(e,i)}_$EC(e,n){var a;const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const s=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:Ci).toAttribute(n,i.type);this._$Em=e,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(e,n){var a;const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const s=i.getPropertyOptions(r),o=typeof s.converter=="function"?{fromAttribute:s.converter}:((a=s.converter)==null?void 0:a.fromAttribute)!==void 0?s.converter:Ci;this._$Em=r,this[r]=o.fromAttribute(n,s.type),this._$Em=null}}requestUpdate(e,n,i){var r;if(e!==void 0){if(i!=null||(i=this.constructor.getPropertyOptions(e)),!((r=i.hasChanged)!=null?r:yo)(this[e],n))return;this.P(e,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,n,i){var r;this._$AL.has(e)||this._$AL.set(e,n),i.reflect===!0&&this._$Em!==e&&((r=this._$Ej)!=null?r:this._$Ej=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i,r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((i=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}const a=this.constructor.elementProperties;if(a.size>0)for(const[s,o]of a)o.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],o)}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(a=>{var s;return(s=a.hostUpdate)==null?void 0:s.call(a)}),this.update(n)):this._$EU()}catch(a){throw e=!1,this._$EU(),a}e&&this._$AE(n)}willUpdate(e){}_$AE(e){var n;(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(e){}firstUpdated(e){}}var ra;Ge.elementStyles=[],Ge.shadowRootOptions={mode:"open"},Ge[vt("elementProperties")]=new Map,Ge[vt("finalized")]=new Map,ri==null||ri({ReactiveElement:Ge}),((ra=Ne.reactiveElementVersions)!=null?ra:Ne.reactiveElementVersions=[]).push("2.0.4");/**
39
+ */const{is:Yp,defineProperty:Qp,getOwnPropertyDescriptor:Xp,getOwnPropertyNames:Zp,getOwnPropertySymbols:em,getPrototypeOf:tm}=Object,Ie=globalThis,za=Ie.trustedTypes,nm=za?za.emptyScript:"",Di=Ie.reactiveElementPolyfillSupport,Rt=(t,e)=>t,cr={toAttribute(t,e){switch(e){case Boolean:t=t?nm:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},_l=(t,e)=>!Yp(t,e),Ha={attribute:!0,type:String,converter:cr,reflect:!1,hasChanged:_l};var ss,os;(ss=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(os=Ie.litPropertyMetadata)!=null||(Ie.litPropertyMetadata=new WeakMap);class rt extends HTMLElement{static addInitializer(e){var n;this._$Ei(),((n=this.l)!=null?n:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=Ha){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(e,n),!n.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,n);r!==void 0&&Qp(this.prototype,e,r)}}static getPropertyDescriptor(e,n,i){var s;const{get:r,set:a}=(s=Xp(this.prototype,e))!=null?s:{get(){return this[n]},set(o){this[n]=o}};return{get(){return r==null?void 0:r.call(this)},set(o){const l=r==null?void 0:r.call(this);a.call(this,o),this.requestUpdate(e,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var n;return(n=this.elementProperties.get(e))!=null?n:Ha}static _$Ei(){if(this.hasOwnProperty(Rt("elementProperties")))return;const e=tm(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Rt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Rt("properties"))){const n=this.properties,i=[...Zp(n),...em(n)];for(const r of i)this.createProperty(r,n[r])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[i,r]of n)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[n,i]of this.elementProperties){const r=this._$Eu(n,i);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)n.unshift(Ba(r))}else e!==void 0&&n.push(Ba(e));return n}static _$Eu(e,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(n=>n(this))}addController(e){var n,i;((n=this._$EO)!=null?n:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)==null||i.call(e))}removeController(e){var n;(n=this._$EO)==null||n.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const i of n.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var n;const e=(n=this.shadowRoot)!=null?n:this.attachShadow(this.constructor.shadowRootOptions);return Jp(e,this.constructor.elementStyles),e}connectedCallback(){var e,n;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostConnected)==null?void 0:r.call(i)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(n=>{var i;return(i=n.hostDisconnected)==null?void 0:i.call(n)})}attributeChangedCallback(e,n,i){this._$AK(e,i)}_$EC(e,n){var a;const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const s=(((a=i.converter)==null?void 0:a.toAttribute)!==void 0?i.converter:cr).toAttribute(n,i.type);this._$Em=e,s==null?this.removeAttribute(r):this.setAttribute(r,s),this._$Em=null}}_$AK(e,n){var a;const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const s=i.getPropertyOptions(r),o=typeof s.converter=="function"?{fromAttribute:s.converter}:((a=s.converter)==null?void 0:a.fromAttribute)!==void 0?s.converter:cr;this._$Em=r,this[r]=o.fromAttribute(n,s.type),this._$Em=null}}requestUpdate(e,n,i){var r;if(e!==void 0){if(i!=null||(i=this.constructor.getPropertyOptions(e)),!((r=i.hasChanged)!=null?r:_l)(this[e],n))return;this.P(e,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,n,i){var r;this._$AL.has(e)||this._$AL.set(e,n),i.reflect===!0&&this._$Em!==e&&((r=this._$Ej)!=null?r:this._$Ej=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i,r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((i=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[s,o]of this._$Ep)this[s]=o;this._$Ep=void 0}const a=this.constructor.elementProperties;if(a.size>0)for(const[s,o]of a)o.wrapped!==!0||this._$AL.has(s)||this[s]===void 0||this.P(s,this[s],o)}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(a=>{var s;return(s=a.hostUpdate)==null?void 0:s.call(a)}),this.update(n)):this._$EU()}catch(a){throw e=!1,this._$EU(),a}e&&this._$AE(n)}willUpdate(e){}_$AE(e){var n;(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(e){}firstUpdated(e){}}var ls;rt.elementStyles=[],rt.shadowRootOptions={mode:"open"},rt[Rt("elementProperties")]=new Map,rt[Rt("finalized")]=new Map,Di==null||Di({ReactiveElement:rt}),((ls=Ie.reactiveElementVersions)!=null?ls:Ie.reactiveElementVersions=[]).push("2.0.4");/**
40
40
  * @license
41
41
  * Copyright 2017 Google LLC
42
42
  * SPDX-License-Identifier: BSD-3-Clause
43
- */const kt=globalThis,kn=kt.trustedTypes,Wr=kn?kn.createPolicy("lit-html",{createHTML:t=>t}):void 0,bo="$lit$",be=`lit$${Math.random().toFixed(9).slice(2)}$`,_o="?"+be,zm=`<${_o}>`,$e=document,Ft=()=>$e.createComment(""),Ct=t=>t===null||typeof t!="object"&&typeof t!="function",So=Array.isArray,Hm=t=>So(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",ai=`[
44
- \f\r]`,mt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Jr=/-->/g,Yr=/>/g,Fe=RegExp(`>|${ai}(?:([^\\s"'>=/]+)(${ai}*=${ai}*(?:[^
45
- \f\r"'\`<>=]|("|')|))|$)`,"g"),Xr=/'/g,Zr=/"/g,No=/^(?:script|style|textarea|title)$/i,Gm=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),Km=Gm(1),Ze=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),Qr=new WeakMap,Ce=$e.createTreeWalker($e,129);function Ao(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Wr!==void 0?Wr.createHTML(e):e}const qm=(t,e)=>{const n=t.length-1,i=[];let r,a=e===2?"<svg>":"",s=mt;for(let o=0;o<n;o++){const l=t[o];let u,d,c=-1,f=0;for(;f<l.length&&(s.lastIndex=f,d=s.exec(l),d!==null);)f=s.lastIndex,s===mt?d[1]==="!--"?s=Jr:d[1]!==void 0?s=Yr:d[2]!==void 0?(No.test(d[2])&&(r=RegExp("</"+d[2],"g")),s=Fe):d[3]!==void 0&&(s=Fe):s===Fe?d[0]===">"?(s=r!=null?r:mt,c=-1):d[1]===void 0?c=-2:(c=s.lastIndex-d[2].length,u=d[1],s=d[3]===void 0?Fe:d[3]==='"'?Zr:Xr):s===Zr||s===Xr?s=Fe:s===Jr||s===Yr?s=mt:(s=Fe,r=void 0);const k=s===Fe&&t[o+1].startsWith("/>")?" ":"";a+=s===mt?l+zm:c>=0?(i.push(u),l.slice(0,c)+bo+l.slice(c)+be+k):l+be+(c===-2?o:k)}return[Ao(t,a+(t[n]||"<?>")+(e===2?"</svg>":"")),i]};class Tt{constructor({strings:e,_$litType$:n},i){let r;this.parts=[];let a=0,s=0;const o=e.length-1,l=this.parts,[u,d]=qm(e,n);if(this.el=Tt.createElement(u,i),Ce.currentNode=this.el.content,n===2){const c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(r=Ce.nextNode())!==null&&l.length<o;){if(r.nodeType===1){if(r.hasAttributes())for(const c of r.getAttributeNames())if(c.endsWith(bo)){const f=d[s++],k=r.getAttribute(c).split(be),p=/([.?@])?(.*)/.exec(f);l.push({type:1,index:a,name:p[2],strings:k,ctor:p[1]==="."?Jm:p[1]==="?"?Ym:p[1]==="@"?Xm:Un}),r.removeAttribute(c)}else c.startsWith(be)&&(l.push({type:6,index:a}),r.removeAttribute(c));if(No.test(r.tagName)){const c=r.textContent.split(be),f=c.length-1;if(f>0){r.textContent=kn?kn.emptyScript:"";for(let k=0;k<f;k++)r.append(c[k],Ft()),Ce.nextNode(),l.push({type:2,index:++a});r.append(c[f],Ft())}}}else if(r.nodeType===8)if(r.data===_o)l.push({type:2,index:a});else{let c=-1;for(;(c=r.data.indexOf(be,c+1))!==-1;)l.push({type:7,index:a}),c+=be.length-1}a++}}static createElement(e,n){const i=$e.createElement("template");return i.innerHTML=e,i}}function Qe(t,e,n=t,i){var s,o,l;if(e===Ze)return e;let r=i!==void 0?(s=n._$Co)==null?void 0:s[i]:n._$Cl;const a=Ct(e)?void 0:e._$litDirective$;return(r==null?void 0:r.constructor)!==a&&((o=r==null?void 0:r._$AO)==null||o.call(r,!1),a===void 0?r=void 0:(r=new a(t),r._$AT(t,n,i)),i!==void 0?((l=n._$Co)!=null?l:n._$Co=[])[i]=r:n._$Cl=r),r!==void 0&&(e=Qe(t,r._$AS(t,e.values),r,i)),e}class Wm{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var u;const{el:{content:n},parts:i}=this._$AD,r=((u=e==null?void 0:e.creationScope)!=null?u:$e).importNode(n,!0);Ce.currentNode=r;let a=Ce.nextNode(),s=0,o=0,l=i[0];for(;l!==void 0;){if(s===l.index){let d;l.type===2?d=new Mt(a,a.nextSibling,this,e):l.type===1?d=new l.ctor(a,l.name,l.strings,this,e):l.type===6&&(d=new Zm(a,this,e)),this._$AV.push(d),l=i[++o]}s!==(l==null?void 0:l.index)&&(a=Ce.nextNode(),s++)}return Ce.currentNode=$e,r}p(e){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}}class Mt{get _$AU(){var e,n;return(n=(e=this._$AM)==null?void 0:e._$AU)!=null?n:this._$Cv}constructor(e,n,i,r){var a;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=r,this._$Cv=(a=r==null?void 0:r.isConnected)!=null?a:!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=Qe(this,e,n),Ct(e)?e===G||e==null||e===""?(this._$AH!==G&&this._$AR(),this._$AH=G):e!==this._$AH&&e!==Ze&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Hm(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==G&&Ct(this._$AH)?this._$AA.nextSibling.data=e:this.T($e.createTextNode(e)),this._$AH=e}$(e){var a;const{values:n,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Tt.createElement(Ao(i.h,i.h[0]),this.options)),i);if(((a=this._$AH)==null?void 0:a._$AD)===r)this._$AH.p(n);else{const s=new Wm(r,this),o=s.u(this.options);s.p(n),this.T(o),this._$AH=s}}_$AC(e){let n=Qr.get(e.strings);return n===void 0&&Qr.set(e.strings,n=new Tt(e)),n}k(e){So(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const a of e)r===n.length?n.push(i=new Mt(this.S(Ft()),this.S(Ft()),this,this.options)):i=n[r],i._$AI(a),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,n);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var n;this._$AM===void 0&&(this._$Cv=e,(n=this._$AP)==null||n.call(this,e))}}class Un{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,i,r,a){this.type=1,this._$AH=G,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=a,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}_$AI(e,n=this,i,r){const a=this.strings;let s=!1;if(a===void 0)e=Qe(this,e,n,0),s=!Ct(e)||e!==this._$AH&&e!==Ze,s&&(this._$AH=e);else{const o=e;let l,u;for(e=a[0],l=0;l<a.length-1;l++)u=Qe(this,o[i+l],n,l),u===Ze&&(u=this._$AH[l]),s||(s=!Ct(u)||u!==this._$AH[l]),u===G?e=G:e!==G&&(e+=(u!=null?u:"")+a[l+1]),this._$AH[l]=u}s&&!r&&this.j(e)}j(e){e===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class Jm extends Un{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===G?void 0:e}}class Ym extends Un{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==G)}}class Xm extends Un{constructor(e,n,i,r,a){super(e,n,i,r,a),this.type=5}_$AI(e,n=this){var s;if((e=(s=Qe(this,e,n,0))!=null?s:G)===Ze)return;const i=this._$AH,r=e===G&&i!==G||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,a=e!==G&&(i===G||r);r&&this.element.removeEventListener(this.name,this,i),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,i;typeof this._$AH=="function"?this._$AH.call((i=(n=this.options)==null?void 0:n.host)!=null?i:this.element,e):this._$AH.handleEvent(e)}}class Zm{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){Qe(this,e)}}const si=kt.litHtmlPolyfillSupport;var aa;si==null||si(Tt,Mt),((aa=kt.litHtmlVersions)!=null?aa:kt.litHtmlVersions=[]).push("3.1.3");const Qm=(t,e,n)=>{var a,s;const i=(a=n==null?void 0:n.renderBefore)!=null?a:e;let r=i._$litPart$;if(r===void 0){const o=(s=n==null?void 0:n.renderBefore)!=null?s:null;i._$litPart$=r=new Mt(e.insertBefore(Ft(),o),o,void 0,n!=null?n:{})}return r._$AI(t),r};/**
43
+ */const It=globalThis,jn=It.trustedTypes,qa=jn?jn.createPolicy("lit-html",{createHTML:t=>t}):void 0,Sl="$lit$",xe=`lit$${Math.random().toFixed(9).slice(2)}$`,Nl="?"+xe,im=`<${Nl}>`,He=document,Ht=()=>He.createComment(""),qt=t=>t===null||typeof t!="object"&&typeof t!="function",El=Array.isArray,rm=t=>El(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Pi=`[
44
+ \f\r]`,wt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ga=/-->/g,Ka=/>/g,Ve=RegExp(`>|${Pi}(?:([^\\s"'>=/]+)(${Pi}*=${Pi}*(?:[^
45
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Wa=/'/g,Ja=/"/g,Al=/^(?:script|style|textarea|title)$/i,am=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),sm=am(1),ft=Symbol.for("lit-noChange"),Q=Symbol.for("lit-nothing"),Ya=new WeakMap,Ue=He.createTreeWalker(He,129);function Ol(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return qa!==void 0?qa.createHTML(e):e}const om=(t,e)=>{const n=t.length-1,i=[];let r,a=e===2?"<svg>":"",s=wt;for(let o=0;o<n;o++){const l=t[o];let u,c,d=-1,f=0;for(;f<l.length&&(s.lastIndex=f,c=s.exec(l),c!==null);)f=s.lastIndex,s===wt?c[1]==="!--"?s=Ga:c[1]!==void 0?s=Ka:c[2]!==void 0?(Al.test(c[2])&&(r=RegExp("</"+c[2],"g")),s=Ve):c[3]!==void 0&&(s=Ve):s===Ve?c[0]===">"?(s=r!=null?r:wt,d=-1):c[1]===void 0?d=-2:(d=s.lastIndex-c[2].length,u=c[1],s=c[3]===void 0?Ve:c[3]==='"'?Ja:Wa):s===Ja||s===Wa?s=Ve:s===Ga||s===Ka?s=wt:(s=Ve,r=void 0);const v=s===Ve&&t[o+1].startsWith("/>")?" ":"";a+=s===wt?l+im:d>=0?(i.push(u),l.slice(0,d)+Sl+l.slice(d)+xe+v):l+xe+(d===-2?o:v)}return[Ol(t,a+(t[n]||"<?>")+(e===2?"</svg>":"")),i]};class Gt{constructor({strings:e,_$litType$:n},i){let r;this.parts=[];let a=0,s=0;const o=e.length-1,l=this.parts,[u,c]=om(e,n);if(this.el=Gt.createElement(u,i),Ue.currentNode=this.el.content,n===2){const d=this.el.content.firstChild;d.replaceWith(...d.childNodes)}for(;(r=Ue.nextNode())!==null&&l.length<o;){if(r.nodeType===1){if(r.hasAttributes())for(const d of r.getAttributeNames())if(d.endsWith(Sl)){const f=c[s++],v=r.getAttribute(d).split(xe),p=/([.?@])?(.*)/.exec(f);l.push({type:1,index:a,name:p[2],strings:v,ctor:p[1]==="."?um:p[1]==="?"?cm:p[1]==="@"?dm:ci}),r.removeAttribute(d)}else d.startsWith(xe)&&(l.push({type:6,index:a}),r.removeAttribute(d));if(Al.test(r.tagName)){const d=r.textContent.split(xe),f=d.length-1;if(f>0){r.textContent=jn?jn.emptyScript:"";for(let v=0;v<f;v++)r.append(d[v],Ht()),Ue.nextNode(),l.push({type:2,index:++a});r.append(d[f],Ht())}}}else if(r.nodeType===8)if(r.data===Nl)l.push({type:2,index:a});else{let d=-1;for(;(d=r.data.indexOf(xe,d+1))!==-1;)l.push({type:7,index:a}),d+=xe.length-1}a++}}static createElement(e,n){const i=He.createElement("template");return i.innerHTML=e,i}}function ht(t,e,n=t,i){var s,o,l;if(e===ft)return e;let r=i!==void 0?(s=n._$Co)==null?void 0:s[i]:n._$Cl;const a=qt(e)?void 0:e._$litDirective$;return(r==null?void 0:r.constructor)!==a&&((o=r==null?void 0:r._$AO)==null||o.call(r,!1),a===void 0?r=void 0:(r=new a(t),r._$AT(t,n,i)),i!==void 0?((l=n._$Co)!=null?l:n._$Co=[])[i]=r:n._$Cl=r),r!==void 0&&(e=ht(t,r._$AS(t,e.values),r,i)),e}class lm{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var u;const{el:{content:n},parts:i}=this._$AD,r=((u=e==null?void 0:e.creationScope)!=null?u:He).importNode(n,!0);Ue.currentNode=r;let a=Ue.nextNode(),s=0,o=0,l=i[0];for(;l!==void 0;){if(s===l.index){let c;l.type===2?c=new rn(a,a.nextSibling,this,e):l.type===1?c=new l.ctor(a,l.name,l.strings,this,e):l.type===6&&(c=new fm(a,this,e)),this._$AV.push(c),l=i[++o]}s!==(l==null?void 0:l.index)&&(a=Ue.nextNode(),s++)}return Ue.currentNode=He,r}p(e){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}}class rn{get _$AU(){var e,n;return(n=(e=this._$AM)==null?void 0:e._$AU)!=null?n:this._$Cv}constructor(e,n,i,r){var a;this.type=2,this._$AH=Q,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=r,this._$Cv=(a=r==null?void 0:r.isConnected)!=null?a:!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=ht(this,e,n),qt(e)?e===Q||e==null||e===""?(this._$AH!==Q&&this._$AR(),this._$AH=Q):e!==this._$AH&&e!==ft&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):rm(e)?this.k(e):this._(e)}S(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.S(e))}_(e){this._$AH!==Q&&qt(this._$AH)?this._$AA.nextSibling.data=e:this.T(He.createTextNode(e)),this._$AH=e}$(e){var a;const{values:n,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=Gt.createElement(Ol(i.h,i.h[0]),this.options)),i);if(((a=this._$AH)==null?void 0:a._$AD)===r)this._$AH.p(n);else{const s=new lm(r,this),o=s.u(this.options);s.p(n),this.T(o),this._$AH=s}}_$AC(e){let n=Ya.get(e.strings);return n===void 0&&Ya.set(e.strings,n=new Gt(e)),n}k(e){El(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const a of e)r===n.length?n.push(i=new rn(this.S(Ht()),this.S(Ht()),this,this.options)):i=n[r],i._$AI(a),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,n);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var n;this._$AM===void 0&&(this._$Cv=e,(n=this._$AP)==null||n.call(this,e))}}class ci{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,i,r,a){this.type=1,this._$AH=Q,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=a,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=Q}_$AI(e,n=this,i,r){const a=this.strings;let s=!1;if(a===void 0)e=ht(this,e,n,0),s=!qt(e)||e!==this._$AH&&e!==ft,s&&(this._$AH=e);else{const o=e;let l,u;for(e=a[0],l=0;l<a.length-1;l++)u=ht(this,o[i+l],n,l),u===ft&&(u=this._$AH[l]),s||(s=!qt(u)||u!==this._$AH[l]),u===Q?e=Q:e!==Q&&(e+=(u!=null?u:"")+a[l+1]),this._$AH[l]=u}s&&!r&&this.j(e)}j(e){e===Q?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class um extends ci{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Q?void 0:e}}class cm extends ci{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Q)}}class dm extends ci{constructor(e,n,i,r,a){super(e,n,i,r,a),this.type=5}_$AI(e,n=this){var s;if((e=(s=ht(this,e,n,0))!=null?s:Q)===ft)return;const i=this._$AH,r=e===Q&&i!==Q||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,a=e!==Q&&(i===Q||r);r&&this.element.removeEventListener(this.name,this,i),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,i;typeof this._$AH=="function"?this._$AH.call((i=(n=this.options)==null?void 0:n.host)!=null?i:this.element,e):this._$AH.handleEvent(e)}}class fm{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){ht(this,e)}}const Li=It.litHtmlPolyfillSupport;var us;Li==null||Li(Gt,rn),((us=It.litHtmlVersions)!=null?us:It.litHtmlVersions=[]).push("3.1.3");const hm=(t,e,n)=>{var a,s;const i=(a=n==null?void 0:n.renderBefore)!=null?a:e;let r=i._$litPart$;if(r===void 0){const o=(s=n==null?void 0:n.renderBefore)!=null?s:null;i._$litPart$=r=new rn(e.insertBefore(Ht(),o),o,void 0,n!=null?n:{})}return r._$AI(t),r};/**
46
46
  * @license
47
47
  * Copyright 2017 Google LLC
48
48
  * SPDX-License-Identifier: BSD-3-Clause
49
- */let yt=class extends Ge{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n,i;const e=super.createRenderRoot();return(i=(n=this.renderOptions).renderBefore)!=null||(n.renderBefore=e.firstChild),e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Qm(n,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return Ze}};var sa;yt._$litElement$=!0,yt.finalized=!0,(sa=globalThis.litElementHydrateSupport)==null||sa.call(globalThis,{LitElement:yt});const oi=globalThis.litElementPolyfillSupport;oi==null||oi({LitElement:yt});var oa;((oa=globalThis.litElementVersions)!=null?oa:globalThis.litElementVersions=[]).push("4.0.5");/**
49
+ */let Dt=class extends rt{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var n,i;const e=super.createRenderRoot();return(i=(n=this.renderOptions).renderBefore)!=null||(n.renderBefore=e.firstChild),e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=hm(n,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this._$Do)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this._$Do)==null||e.setConnected(!1)}render(){return ft}};var cs;Dt._$litElement$=!0,Dt.finalized=!0,(cs=globalThis.litElementHydrateSupport)==null||cs.call(globalThis,{LitElement:Dt});const $i=globalThis.litElementPolyfillSupport;$i==null||$i({LitElement:Dt});var ds;((ds=globalThis.litElementVersions)!=null?ds:globalThis.litElementVersions=[]).push("4.0.5");/**
50
50
  * @license
51
51
  * Copyright 2020 Google LLC
52
52
  * SPDX-License-Identifier: BSD-3-Clause
53
- */const eh=t=>t.strings===void 0;/**
53
+ */const pm=t=>t.strings===void 0;/**
54
54
  * @license
55
55
  * Copyright 2017 Google LLC
56
56
  * SPDX-License-Identifier: BSD-3-Clause
57
- */const th={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},nh=t=>(...e)=>({_$litDirective$:t,values:e});class ih{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,i){this._$Ct=e,this._$AM=n,this._$Ci=i}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}}/**
57
+ */const mm={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},gm=t=>(...e)=>({_$litDirective$:t,values:e});class vm{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,i){this._$Ct=e,this._$AM=n,this._$Ci=i}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}}/**
58
58
  * @license
59
59
  * Copyright 2017 Google LLC
60
60
  * SPDX-License-Identifier: BSD-3-Clause
61
- */const bt=(t,e)=>{var i;const n=t._$AN;if(n===void 0)return!1;for(const r of n)(i=r._$AO)==null||i.call(r,e,!1),bt(r,e);return!0},yn=t=>{let e,n;do{if((e=t._$AM)===void 0)break;n=e._$AN,n.delete(t),t=e}while((n==null?void 0:n.size)===0)},wo=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(n===void 0)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),sh(e)}};function rh(t){this._$AN!==void 0?(yn(this),this._$AM=t,wo(this)):this._$AM=t}function ah(t,e=!1,n=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(i))for(let a=n;a<i.length;a++)bt(i[a],!1),yn(i[a]);else i!=null&&(bt(i,!1),yn(i));else bt(this,t)}const sh=t=>{var e,n;t.type==th.CHILD&&((e=t._$AP)!=null||(t._$AP=ah),(n=t._$AQ)!=null||(t._$AQ=rh))};class oh extends ih{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,n,i){super._$AT(e,n,i),wo(this),this.isConnected=e._$AU}_$AO(e,n=!0){var i,r;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(r=this.disconnected)==null||r.call(this)),n&&(bt(this,e),yn(this))}setValue(e){if(eh(this._$Ct))this._$Ct._$AI(e,this);else{const n=[...this._$Ct._$AH];n[this._$Ci]=e,this._$Ct._$AI(n,this,0)}}disconnected(){}reconnected(){}}/**
61
+ */const Pt=(t,e)=>{var i;const n=t._$AN;if(n===void 0)return!1;for(const r of n)(i=r._$AO)==null||i.call(r,e,!1),Pt(r,e);return!0},Mn=t=>{let e,n;do{if((e=t._$AM)===void 0)break;n=e._$AN,n.delete(t),t=e}while((n==null?void 0:n.size)===0)},wl=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(n===void 0)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),bm(e)}};function ym(t){this._$AN!==void 0?(Mn(this),this._$AM=t,wl(this)):this._$AM=t}function km(t,e=!1,n=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(i))for(let a=n;a<i.length;a++)Pt(i[a],!1),Mn(i[a]);else i!=null&&(Pt(i,!1),Mn(i));else Pt(this,t)}const bm=t=>{var e,n;t.type==mm.CHILD&&((e=t._$AP)!=null||(t._$AP=km),(n=t._$AQ)!=null||(t._$AQ=ym))};class _m extends vm{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,n,i){super._$AT(e,n,i),wl(this),this.isConnected=e._$AU}_$AO(e,n=!0){var i,r;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(r=this.disconnected)==null||r.call(this)),n&&(Pt(this,e),Mn(this))}setValue(e){if(pm(this._$Ct))this._$Ct._$AI(e,this);else{const n=[...this._$Ct._$AH];n[this._$Ci]=e,this._$Ct._$AI(n,this,0)}}disconnected(){}reconnected(){}}/**
62
62
  * @license
63
63
  * Copyright 2020 Google LLC
64
64
  * SPDX-License-Identifier: BSD-3-Clause
65
- */const lh=()=>new uh;class uh{}const li=new WeakMap,dh=nh(class extends oh{render(t){return G}update(t,[e]){var i;const n=e!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=(i=t.options)==null?void 0:i.host,this.rt(this.ct=t.element)),G}rt(t){var e;if(typeof this.Y=="function"){const n=(e=this.ht)!=null?e:globalThis;let i=li.get(n);i===void 0&&(i=new WeakMap,li.set(n,i)),i.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),i.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){var t,e,n;return typeof this.Y=="function"?(e=li.get((t=this.ht)!=null?t:globalThis))==null?void 0:e.get(this.Y):(n=this.Y)==null?void 0:n.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Oo,ea=la;Oo=ea.createRoot,ea.hydrateRoot;class Eo extends yt{constructor(){super(...arguments);w(this,"rootRef",lh());w(this,"rootInstance")}render(){return Km`<div ${dh(this.rootRef)}></div>`}updated(){this.updateReactComponent()}updateReactComponent(){if(!this.rootRef.value)return;this.rootInstance||(this.rootInstance=Oo(this.rootRef.value));const n=z.createElement(this.getReactComponent(),this.getReactProps(),z.createElement("slot"));this.rootInstance.render(n)}handleHMR(n){}injectStyles(n){const i=r=>r.replace("./","");for(const[r,a]of Object.entries(n)){const s=i(r),o=document.createElement("style");o.setAttribute("type","text/css"),o.setAttribute("id",s),o.innerHTML=a,setTimeout(()=>{var l;return(l=this.shadowRoot)==null?void 0:l.appendChild(o)})}}setupHMRListener(){}}w(Eo,"baseStyles",$m`
65
+ */const Sm=()=>new Nm;class Nm{}const Vi=new WeakMap,Em=gm(class extends _m{render(t){return Q}update(t,[e]){var i;const n=e!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=(i=t.options)==null?void 0:i.host,this.rt(this.ct=t.element)),Q}rt(t){var e;if(typeof this.Y=="function"){const n=(e=this.ht)!=null?e:globalThis;let i=Vi.get(n);i===void 0&&(i=new WeakMap,Vi.set(n,i)),i.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),i.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){var t,e,n;return typeof this.Y=="function"?(e=Vi.get((t=this.ht)!=null?t:globalThis))==null?void 0:e.get(this.Y):(n=this.Y)==null?void 0:n.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Tl,Qa=fs;Tl=Qa.createRoot,Qa.hydrateRoot;class Cl extends Dt{constructor(){super(...arguments);w(this,"rootRef",Sm());w(this,"rootInstance")}render(){return sm`<div ${Em(this.rootRef)}></div>`}updated(){this.updateReactComponent()}updateReactComponent(){if(!this.rootRef.value)return;this.rootInstance||(this.rootInstance=Tl(this.rootRef.value));const n=B.createElement(this.getReactComponent(),this.getReactProps(),B.createElement("slot"));this.rootInstance.render(n)}handleHMR(n){}injectStyles(n){const i=r=>r.replace("./","");for(const[r,a]of Object.entries(n)){const s=i(r),o=document.createElement("style");o.setAttribute("type","text/css"),o.setAttribute("id",s),o.innerHTML=a,setTimeout(()=>{var l;return(l=this.shadowRoot)==null?void 0:l.appendChild(o)})}}setupHMRListener(){}}w(Cl,"baseStyles",Wp`
66
66
  :host {
67
67
  width: 100%;
68
68
  }
69
- `);let Xi=new Map;const Ti=z.createContext(Xi),ch=({children:t,stores:e})=>{const n=z.useContext(Ti),i=z.useMemo(()=>{const r=new Map;return e.forEach(a=>r.set(a.class,a.value)),Xi=new Map([...n,...r])},[]);return Po.jsx(Ti.Provider,{value:i,children:t})};function fh(t){return z.useContext(Ti).get(t)}function mh(t){return Xi.get(t)}class Fo{constructor(e,n,i){w(this,"renderFn");w(this,"logger");w(this,"rootId");w(this,"element",null);w(this,"unmount");w(this,"updateProps");this.rootId=e,this.renderFn=n,this.logger=i}async render(e={}){var n;if(this.element)this.updateProps(e);else{const i=await this.renderFn(this.rootId,e);this.element=(n=i==null?void 0:i.element)!=null?n:null,this.updateProps=r=>i==null?void 0:i.updateProps(r),this.unmount=()=>{i==null||i.unmount(),this.element=null}}}}class Mn{constructor(e){this.config=e}static isApplicable(e){return Wi.LOCAL===e.bundler.stage}async execute(){var n;const{runtime:e}=this.config;if(!((n=e.env)!=null&&n.account)){e.logger.error("missing account in local environment");return}await e.configureStore(e.env)}}w(Mn,"type",je.Local);const qt=window==null?void 0:window.__RUNTIME__;class Bn{constructor(e){this.config=e;const n={vtexio:qt};this.config.runtime.updateMeta(n)}static isApplicable(){return!!qt}async execute(){const{runtime:e}=this.config;if(!qt.account){e.logger.error("missing the account in window.__RUNTIME__");return}await e.configureStore({account:qt.account})}}w(Bn,"type",je.VtexIO);const ta=window==null?void 0:window.vtexjs;class zn{constructor(e){this.config=e;const n={vtexjs:ta};this.config.runtime.updateMeta(n)}static isApplicable(){return!!ta}async execute(){const{runtime:e}=this.config;let n={};const i=`${e.componentId.value}-script`,r=ds(i);if(n=Object.fromEntries(r.entries()),!n.account){e.logger.error(`missing the account in the search params of the script #${i}`);return}await e.configureStore({account:n.account})}}w(zn,"type",je.VtexLegacy);class Zi{constructor(e){this.config=e}static isApplicable(e){return!Mn.isApplicable(e)&&!zn.isApplicable()&&!Bn.isApplicable()}async execute(){}}w(Zi,"type",je.External);const Co=[Mn,zn,Bn,Zi];class hh{constructor(e){w(this,"globalId");w(this,"metadata");w(this,"customConfigList");w(this,"env");w(this,"bundler");w(this,"logger");w(this,"componentId");w(this,"renderHandler");w(this,"store");this.globalId=e.globalId,this.store=e.getStore(),this.logger=Ee.withPrefix(e.logger,"Runtime"),this.env=e.env,this.bundler=e.bundler,this.customConfigList=new Map,this.metadata={type:je.External},this.initializeGlobals()}config(e,n,i){typeof n=="function"&&(i=n,n={});const{skipBaseBehavior:r=!1}=n;return this.customConfigList.set(e,{callback:i,skipBaseBehavior:r}),this}registerComponent(e,n){const i=this.toCamel(e);if(window[this.globalId][i])return this.logger.debug(`Component "${i}" is already registered.`),this;this.componentId={value:e,formatted:i},this.renderHandler=n;const r={render:this.renderHandler};return window[this.globalId][this.componentId.formatted]=r,this.logger.debug(`Component "${i}" registered.`),this}async execute(e){for(const n of Co)if(n.isApplicable(this)){const i=new n({runtime:this}),r=this.customConfigList.get(n.type);this.updateMeta({type:n.type}),r!=null&&r.skipBaseBehavior||await i.execute(),r&&await r.callback({runtime:this,component:new Fo(this.componentId.value,this.renderHandler,this.logger)});break}await(e==null?void 0:e())}updateMeta(e){this.metadata={...this.metadata,...e}}async configureStore(e){await this.store.configure(e)}get meta(){return this.metadata}initializeGlobals(){var i;if(window[this.globalId]||(window[this.globalId]={},this.logger.debug(`Initialized "${this.globalId}" window object`)),(i=window[this.globalId])!=null&&i.runtime){this.logger.debug(`Runtime for "${this.globalId}" are already initialized.`);return}const e=()=>Object.freeze({...this.metadata}),n=()=>Object.freeze({isProd:this.bundler.isProd,get meta(){return e()}});Object.defineProperty(window[this.globalId],"runtime",{get:()=>n()}),this.logger.debug(`Initialized runtime for "${this.globalId}".`)}toCamel(e){return e.replace(/^[a-z]{2}-/,"").replace(/-./g,n=>n[1].toUpperCase())}}exports.AccountContractStatusTypes=Ki;exports.AccountContractTypes=Ks;exports.AccountInvalidError=fd;exports.AccountPlanDescriptionTypes=Ws;exports.AccountRestRepository=Ys;exports.AccountService=Xs;exports.AccountSubscriptionTypes=qs;exports.AccountTypes=Gi;exports.AddToCartActionTypes=Vn;exports.AggregateRoot=Ns;exports.ApiGraphqlTypes=Rf;exports.BroadcastChannelEventBus=ls;exports.ComponentManager=Fo;exports.DomainError=It;exports.EventBusWildcards=Zc;exports.EventNames=to;exports.ExternalRuntime=Zi;exports.GlobalPageSectionTypes=Js;exports.HttpAxiosClient=qc;exports.InvalidNizzaGlobalObjectError=ks;exports.LanguageTypes=no;exports.LocalRuntime=Mn;exports.Logger=Ee;exports.NizzaAccount=In;exports.NizzaEventStatus=eo;exports.NizzaProductRequestOriginTypes=ro;exports.NizzaStore=fn;exports.NizzaVariationTypes=io;exports.ReactHostElement=Eo;exports.ResourceNotFoundError=gs;exports.Runtime=hh;exports.RuntimeStage=Wi;exports.RuntimeType=je;exports.StoreProvider=ch;exports.UnexpectedError=vs;exports.ValueObject=Rd;exports.VtexIORuntime=Bn;exports.VtexLegacyRuntime=zn;exports.accountAtom=bn;exports.accountService=qi;exports.addToCartMessages=Ei;exports.apiCall=Ed;exports.buildLanguageTranslations=uo;exports.buildTranslations=co;exports.createActionFactory=lo;exports.createAggregateRoot=As;exports.createLazyLogger=il;exports.createStore=Pf;exports.customFetch=Ui;exports.downloadFile=Fd;exports.fileOrigin=id;exports.getAccount=Qs;exports.getClientTimeZone=xd;exports.getNizza=rt;exports.getScriptParams=ds;exports.getStore=mh;exports.globalAtomStore=Zs;exports.i18Init=po;exports.jsDownload=Ss;exports.registerTranslations=Rm;exports.registerTranslationsOf=fo;exports.runAddToCartHooks=Lf;exports.runtimeList=Co;exports.searchParams=nd;exports.shortId=us;exports.sleep=rd;exports.useAccount=Xc;exports.useNZ=bs;exports.useNizza=_s;exports.useStore=fh;exports.validateRequiredProps=md;
69
+ `);let qr=new Map;const dr=B.createContext(qr),Am=({children:t,stores:e})=>{const n=B.useContext(dr),i=B.useMemo(()=>{const r=new Map;return e.forEach(a=>r.set(a.class,a.value)),qr=new Map([...n,...r])},[]);return Zl.jsx(dr.Provider,{value:i,children:t})};function Om(t){return B.useContext(dr).get(t)}function wm(t){return qr.get(t)}class xl{constructor(e,n,i){w(this,"renderFn");w(this,"logger");w(this,"rootId");w(this,"element",null);w(this,"unmount");w(this,"updateProps");this.rootId=e,this.renderFn=n,this.logger=i}async render(e={}){var n;if(this.element)this.updateProps(e);else{const i=await this.renderFn(this.rootId,e);this.element=(n=i==null?void 0:i.element)!=null?n:null,this.updateProps=r=>i==null?void 0:i.updateProps(r),this.unmount=()=>{i==null||i.unmount(),this.element=null}}}}class di{constructor(e){this.config=e}static isApplicable(e){return Br.LOCAL===e.bundler.stage}async execute(){var n;const{runtime:e}=this.config;if(!((n=e.env)!=null&&n.account)){e.logger.error("missing account in local environment");return}await e.configureStore(e.env)}}w(di,"type",Qe.Local);const dn=window==null?void 0:window.__RUNTIME__;class fi{constructor(e){this.config=e;const n={vtexio:dn};this.config.runtime.updateMeta(n)}static isApplicable(){return!!dn}async execute(){const{runtime:e}=this.config;if(!dn.account){e.logger.error("missing the account in window.__RUNTIME__");return}await e.configureStore({account:dn.account})}}w(fi,"type",Qe.VtexIO);const Xa=window==null?void 0:window.vtexjs;class hi{constructor(e){this.config=e;const n={vtexjs:Xa};this.config.runtime.updateMeta(n)}static isApplicable(){return!!Xa}async execute(){const{runtime:e}=this.config;let n={};const i=`${e.componentId.value}-script`,r=go(i);if(n=Object.fromEntries(r.entries()),!n.account){e.logger.error(`missing the account in the search params of the script #${i}`);return}await e.configureStore({account:n.account})}}w(hi,"type",Qe.VtexLegacy);class Gr{constructor(e){this.config=e}static isApplicable(e){return!di.isApplicable(e)&&!hi.isApplicable()&&!fi.isApplicable()}async execute(){}}w(Gr,"type",Qe.External);const Fl=[di,hi,fi,Gr];class Tm{constructor(e){w(this,"globalId");w(this,"metadata");w(this,"customConfigList");w(this,"env");w(this,"bundler");w(this,"logger");w(this,"componentId");w(this,"renderHandler");w(this,"store");this.globalId=e.globalId,this.store=e.getStore(),this.logger=$e.withPrefix(e.logger,"Runtime"),this.env=e.env,this.bundler=e.bundler,this.customConfigList=new Map,this.metadata={type:Qe.External},this.initializeGlobals()}config(e,n,i){typeof n=="function"&&(i=n,n={});const{skipBaseBehavior:r=!1}=n;return this.customConfigList.set(e,{callback:i,skipBaseBehavior:r}),this}registerComponent(e,n){const i=this.toCamel(e);if(window[this.globalId][i])return this.logger.debug(`Component "${i}" is already registered.`),this;this.componentId={value:e,formatted:i},this.renderHandler=n;const r={render:this.renderHandler};return window[this.globalId][this.componentId.formatted]=r,this.logger.debug(`Component "${i}" registered.`),this}async execute(e){for(const n of Fl)if(n.isApplicable(this)){const i=new n({runtime:this}),r=this.customConfigList.get(n.type);this.updateMeta({type:n.type}),r!=null&&r.skipBaseBehavior||await i.execute(),r&&await r.callback({runtime:this,component:new xl(this.componentId.value,this.renderHandler,this.logger)});break}await(e==null?void 0:e())}updateMeta(e){this.metadata={...this.metadata,...e}}async configureStore(e){await this.store.configure(e)}get meta(){return this.metadata}initializeGlobals(){var i;if(window[this.globalId]||(window[this.globalId]={},this.logger.debug(`Initialized "${this.globalId}" window object`)),(i=window[this.globalId])!=null&&i.runtime){this.logger.debug(`Runtime for "${this.globalId}" are already initialized.`);return}const e=()=>Object.freeze({...this.metadata}),n=()=>Object.freeze({isProd:this.bundler.isProd,get meta(){return e()}});Object.defineProperty(window[this.globalId],"runtime",{get:()=>n()}),this.logger.debug(`Initialized runtime for "${this.globalId}".`)}toCamel(e){return e.replace(/^[a-z]{2}-/,"").replace(/-./g,n=>n[1].toUpperCase())}}const Kr=JSON,Cm=t=>t.toUpperCase(),xm=t=>{const e={};return t.forEach((n,i)=>{e[i]=n}),e},Fm=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},Rm=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},Im=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};function _n(t,e){if(!!!t)throw new Error(e)}function Dm(t){return typeof t=="object"&&t!==null}function Pm(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const Lm=/\r\n|[\n\r]/g;function fr(t,e){let n=0,i=1;for(const r of t.body.matchAll(Lm)){if(typeof r.index=="number"||Pm(!1),r.index>=e)break;n=r.index+r[0].length,i+=1}return{line:i,column:e+1-n}}function $m(t){return Rl(t.source,fr(t.source,t.start))}function Rl(t,e){const n=t.locationOffset.column-1,i="".padStart(n)+t.body,r=e.line-1,a=t.locationOffset.line-1,s=e.line+a,o=e.line===1?n:0,l=e.column+o,u=`${t.name}:${s}:${l}
70
+ `,c=i.split(/\r\n|[\n\r]/g),d=c[r];if(d.length>120){const f=Math.floor(l/80),v=l%80,p=[];for(let m=0;m<d.length;m+=80)p.push(d.slice(m,m+80));return u+Za([[`${s} |`,p[0]],...p.slice(1,f+1).map(m=>["|",m]),["|","^".padStart(v)],["|",p[f+1]]])}return u+Za([[`${s-1} |`,c[r-1]],[`${s} |`,d],["|","^".padStart(l)],[`${s+1} |`,c[r+1]]])}function Za(t){const e=t.filter(([i,r])=>r!==void 0),n=Math.max(...e.map(([i])=>i.length));return e.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
71
+ `)}function Vm(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}class Wr extends Error{constructor(e,...n){var i,r,a;const{nodes:s,source:o,positions:l,path:u,originalError:c,extensions:d}=Vm(n);super(e),this.name="GraphQLError",this.path=u!=null?u:void 0,this.originalError=c!=null?c:void 0,this.nodes=es(Array.isArray(s)?s:s?[s]:void 0);const f=es((i=this.nodes)===null||i===void 0?void 0:i.map(p=>p.loc).filter(p=>p!=null));this.source=o!=null?o:f==null||(r=f[0])===null||r===void 0?void 0:r.source,this.positions=l!=null?l:f==null?void 0:f.map(p=>p.start),this.locations=l&&o?l.map(p=>fr(o,p)):f==null?void 0:f.map(p=>fr(p.source,p.start));const v=Dm(c==null?void 0:c.extensions)?c==null?void 0:c.extensions:void 0;this.extensions=(a=d!=null?d:v)!==null&&a!==void 0?a:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),c!=null&&c.stack?Object.defineProperty(this,"stack",{value:c.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Wr):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+=`
72
+
73
+ `+$m(n.loc));else if(this.source&&this.locations)for(const n of this.locations)e+=`
74
+
75
+ `+Rl(this.source,n);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function es(t){return t===void 0||t.length===0?void 0:t}function ee(t,e,n){return new Wr(`Syntax Error: ${n}`,{source:t,positions:[e]})}class Um{constructor(e,n,i){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class Il{constructor(e,n,i,r,a,s){this.kind=e,this.start=n,this.end=i,this.line=r,this.column=a,this.value=s,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const Dl={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},jm=new Set(Object.keys(Dl));function ts(t){const e=t==null?void 0:t.kind;return typeof e=="string"&&jm.has(e)}var ot;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(ot||(ot={}));var hr;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(hr||(hr={}));var $;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})($||($={}));function pr(t){return t===9||t===32}function Kt(t){return t>=48&&t<=57}function Pl(t){return t>=97&&t<=122||t>=65&&t<=90}function Ll(t){return Pl(t)||t===95}function Mm(t){return Pl(t)||Kt(t)||t===95}function Bm(t){var e;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let s=0;s<t.length;++s){var a;const o=t[s],l=zm(o);l!==o.length&&(i=(a=i)!==null&&a!==void 0?a:s,r=s,s!==0&&l<n&&(n=l))}return t.map((s,o)=>o===0?s:s.slice(n)).slice((e=i)!==null&&e!==void 0?e:0,r+1)}function zm(t){let e=0;for(;e<t.length&&pr(t.charCodeAt(e));)++e;return e}function Hm(t,e){const n=t.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),r=i.length===1,a=i.length>1&&i.slice(1).every(v=>v.length===0||pr(v.charCodeAt(0))),s=n.endsWith('\\"""'),o=t.endsWith('"')&&!s,l=t.endsWith("\\"),u=o||l,c=!r||t.length>70||u||a||s;let d="";const f=r&&pr(t.charCodeAt(0));return(c&&!f||a)&&(d+=`
76
+ `),d+=n,(c||u)&&(d+=`
77
+ `),'"""'+d+'"""'}var b;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(b||(b={}));class qm{constructor(e){const n=new Il(b.SOF,0,0,0,0);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==b.EOF)do if(e.next)e=e.next;else{const n=Km(this,e.end);e.next=n,n.prev=e,e=n}while(e.kind===b.COMMENT);return e}}function Gm(t){return t===b.BANG||t===b.DOLLAR||t===b.AMP||t===b.PAREN_L||t===b.PAREN_R||t===b.SPREAD||t===b.COLON||t===b.EQUALS||t===b.AT||t===b.BRACKET_L||t===b.BRACKET_R||t===b.BRACE_L||t===b.PIPE||t===b.BRACE_R}function bt(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function pi(t,e){return $l(t.charCodeAt(e))&&Vl(t.charCodeAt(e+1))}function $l(t){return t>=55296&&t<=56319}function Vl(t){return t>=56320&&t<=57343}function qe(t,e){const n=t.source.body.codePointAt(e);if(n===void 0)return b.EOF;if(n>=32&&n<=126){const i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function Y(t,e,n,i,r){const a=t.line,s=1+n-t.lineStart;return new Il(e,n,i,a,s,r)}function Km(t,e){const n=t.source.body,i=n.length;let r=e;for(;r<i;){const a=n.charCodeAt(r);switch(a){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++t.line,t.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++t.line,t.lineStart=r;continue;case 35:return Wm(t,r);case 33:return Y(t,b.BANG,r,r+1);case 36:return Y(t,b.DOLLAR,r,r+1);case 38:return Y(t,b.AMP,r,r+1);case 40:return Y(t,b.PAREN_L,r,r+1);case 41:return Y(t,b.PAREN_R,r,r+1);case 46:if(n.charCodeAt(r+1)===46&&n.charCodeAt(r+2)===46)return Y(t,b.SPREAD,r,r+3);break;case 58:return Y(t,b.COLON,r,r+1);case 61:return Y(t,b.EQUALS,r,r+1);case 64:return Y(t,b.AT,r,r+1);case 91:return Y(t,b.BRACKET_L,r,r+1);case 93:return Y(t,b.BRACKET_R,r,r+1);case 123:return Y(t,b.BRACE_L,r,r+1);case 124:return Y(t,b.PIPE,r,r+1);case 125:return Y(t,b.BRACE_R,r,r+1);case 34:return n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34?eg(t,r):Ym(t,r)}if(Kt(a)||a===45)return Jm(t,r,a);if(Ll(a))return tg(t,r);throw ee(t.source,r,a===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:bt(a)||pi(n,r)?`Unexpected character: ${qe(t,r)}.`:`Invalid character: ${qe(t,r)}.`)}return Y(t,b.EOF,i,i)}function Wm(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const a=n.charCodeAt(r);if(a===10||a===13)break;if(bt(a))++r;else if(pi(n,r))r+=2;else break}return Y(t,b.COMMENT,e,r,n.slice(e+1,r))}function Jm(t,e,n){const i=t.source.body;let r=e,a=n,s=!1;if(a===45&&(a=i.charCodeAt(++r)),a===48){if(a=i.charCodeAt(++r),Kt(a))throw ee(t.source,r,`Invalid number, unexpected digit after 0: ${qe(t,r)}.`)}else r=Ui(t,r,a),a=i.charCodeAt(r);if(a===46&&(s=!0,a=i.charCodeAt(++r),r=Ui(t,r,a),a=i.charCodeAt(r)),(a===69||a===101)&&(s=!0,a=i.charCodeAt(++r),(a===43||a===45)&&(a=i.charCodeAt(++r)),r=Ui(t,r,a),a=i.charCodeAt(r)),a===46||Ll(a))throw ee(t.source,r,`Invalid number, expected digit but got: ${qe(t,r)}.`);return Y(t,s?b.FLOAT:b.INT,e,r,i.slice(e,r))}function Ui(t,e,n){if(!Kt(n))throw ee(t.source,e,`Invalid number, expected digit but got: ${qe(t,e)}.`);const i=t.source.body;let r=e+1;for(;Kt(i.charCodeAt(r));)++r;return r}function Ym(t,e){const n=t.source.body,i=n.length;let r=e+1,a=r,s="";for(;r<i;){const o=n.charCodeAt(r);if(o===34)return s+=n.slice(a,r),Y(t,b.STRING,e,r+1,s);if(o===92){s+=n.slice(a,r);const l=n.charCodeAt(r+1)===117?n.charCodeAt(r+2)===123?Qm(t,r):Xm(t,r):Zm(t,r);s+=l.value,r+=l.size,a=r;continue}if(o===10||o===13)break;if(bt(o))++r;else if(pi(n,r))r+=2;else throw ee(t.source,r,`Invalid character within String: ${qe(t,r)}.`)}throw ee(t.source,r,"Unterminated string.")}function Qm(t,e){const n=t.source.body;let i=0,r=3;for(;r<12;){const a=n.charCodeAt(e+r++);if(a===125){if(r<5||!bt(i))break;return{value:String.fromCodePoint(i),size:r}}if(i=i<<4|Tt(a),i<0)break}throw ee(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+r)}".`)}function Xm(t,e){const n=t.source.body,i=ns(n,e+2);if(bt(i))return{value:String.fromCodePoint(i),size:6};if($l(i)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){const r=ns(n,e+8);if(Vl(r))return{value:String.fromCodePoint(i,r),size:12}}throw ee(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function ns(t,e){return Tt(t.charCodeAt(e))<<12|Tt(t.charCodeAt(e+1))<<8|Tt(t.charCodeAt(e+2))<<4|Tt(t.charCodeAt(e+3))}function Tt(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function Zm(t,e){const n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
78
+ `,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw ee(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function eg(t,e){const n=t.source.body,i=n.length;let r=t.lineStart,a=e+3,s=a,o="";const l=[];for(;a<i;){const u=n.charCodeAt(a);if(u===34&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34){o+=n.slice(s,a),l.push(o);const c=Y(t,b.BLOCK_STRING,e,a+3,Bm(l).join(`
79
+ `));return t.line+=l.length-1,t.lineStart=r,c}if(u===92&&n.charCodeAt(a+1)===34&&n.charCodeAt(a+2)===34&&n.charCodeAt(a+3)===34){o+=n.slice(s,a),s=a+1,a+=4;continue}if(u===10||u===13){o+=n.slice(s,a),l.push(o),u===13&&n.charCodeAt(a+1)===10?a+=2:++a,o="",s=a,r=a;continue}if(bt(u))++a;else if(pi(n,a))a+=2;else throw ee(t.source,a,`Invalid character within String: ${qe(t,a)}.`)}throw ee(t.source,a,"Unterminated string.")}function tg(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const a=n.charCodeAt(r);if(Mm(a))++r;else break}return Y(t,b.NAME,e,r,n.slice(e,r))}const ng=10,Ul=2;function Jr(t){return mi(t,[])}function mi(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return ig(t,e);default:return String(t)}}function ig(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const n=[...e,t];if(rg(t)){const i=t.toJSON();if(i!==t)return typeof i=="string"?i:mi(i,n)}else if(Array.isArray(t))return sg(t,n);return ag(t,n)}function rg(t){return typeof t.toJSON=="function"}function ag(t,e){const n=Object.entries(t);return n.length===0?"{}":e.length>Ul?"["+og(t)+"]":"{ "+n.map(([r,a])=>r+": "+mi(a,e)).join(", ")+" }"}function sg(t,e){if(t.length===0)return"[]";if(e.length>Ul)return"[Array]";const n=Math.min(ng,t.length),i=t.length-n,r=[];for(let a=0;a<n;++a)r.push(mi(t[a],e));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function og(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){const n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}const lg=globalThis.process&&globalThis.process.env.NODE_ENV==="production"?function(e,n){return e instanceof n}:function(e,n){if(e instanceof n)return!0;if(typeof e=="object"&&e!==null){var i;const r=n.prototype[Symbol.toStringTag],a=Symbol.toStringTag in e?e[Symbol.toStringTag]:(i=e.constructor)===null||i===void 0?void 0:i.name;if(r===a){const s=Jr(e);throw new Error(`Cannot use ${r} "${s}" from another module or realm.
80
+
81
+ Ensure that there is only one instance of "graphql" in the node_modules
82
+ directory. If different versions of "graphql" are the dependencies of other
83
+ relied on modules, use "resolutions" to ensure only one version is installed.
84
+
85
+ https://yarnpkg.com/en/docs/selective-version-resolutions
86
+
87
+ Duplicate "graphql" modules cannot be used at the same time since different
88
+ versions may have different capabilities and behavior. The data from one
89
+ version used in the function from another could produce confusing and
90
+ spurious results.`)}}return!1};class jl{constructor(e,n="GraphQL request",i={line:1,column:1}){typeof e=="string"||_n(!1,`Body must be a string. Received: ${Jr(e)}.`),this.body=e,this.name=n,this.locationOffset=i,this.locationOffset.line>0||_n(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||_n(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function ug(t){return lg(t,jl)}function cg(t,e){return new dg(t,e).parseDocument()}class dg{constructor(e,n={}){const i=ug(e)?e:new jl(e);this._lexer=new qm(i),this._options=n,this._tokenCounter=0}parseName(){const e=this.expectToken(b.NAME);return this.node(e,{kind:$.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:$.DOCUMENT,definitions:this.many(b.SOF,this.parseDefinition,b.EOF)})}parseDefinition(){if(this.peek(b.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===b.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw ee(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(b.BRACE_L))return this.node(e,{kind:$.OPERATION_DEFINITION,operation:ot.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let i;return this.peek(b.NAME)&&(i=this.parseName()),this.node(e,{kind:$.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(b.NAME);switch(e.value){case"query":return ot.QUERY;case"mutation":return ot.MUTATION;case"subscription":return ot.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(b.PAREN_L,this.parseVariableDefinition,b.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:$.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(b.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(b.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(b.DOLLAR),this.node(e,{kind:$.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:$.SELECTION_SET,selections:this.many(b.BRACE_L,this.parseSelection,b.BRACE_R)})}parseSelection(){return this.peek(b.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let i,r;return this.expectOptionalToken(b.COLON)?(i=n,r=this.parseName()):r=n,this.node(e,{kind:$.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(b.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(b.PAREN_L,n,b.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,i=this.parseName();return this.expectToken(b.COLON),this.node(n,{kind:$.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(b.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(b.NAME)?this.node(e,{kind:$.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:$.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:$.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:$.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const n=this._lexer.token;switch(n.kind){case b.BRACKET_L:return this.parseList(e);case b.BRACE_L:return this.parseObject(e);case b.INT:return this.advanceLexer(),this.node(n,{kind:$.INT,value:n.value});case b.FLOAT:return this.advanceLexer(),this.node(n,{kind:$.FLOAT,value:n.value});case b.STRING:case b.BLOCK_STRING:return this.parseStringLiteral();case b.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:$.BOOLEAN,value:!0});case"false":return this.node(n,{kind:$.BOOLEAN,value:!1});case"null":return this.node(n,{kind:$.NULL});default:return this.node(n,{kind:$.ENUM,value:n.value})}case b.DOLLAR:if(e)if(this.expectToken(b.DOLLAR),this._lexer.token.kind===b.NAME){const i=this._lexer.token.value;throw ee(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:$.STRING,value:e.value,block:e.kind===b.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:$.LIST,values:this.any(b.BRACKET_L,n,b.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:$.OBJECT,fields:this.any(b.BRACE_L,n,b.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,i=this.parseName();return this.expectToken(b.COLON),this.node(n,{kind:$.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(b.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(b.AT),this.node(n,{kind:$.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(b.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(b.BRACKET_R),n=this.node(e,{kind:$.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(b.BANG)?this.node(e,{kind:$.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:$.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(b.STRING)||this.peek(b.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),r=this.many(b.BRACE_L,this.parseOperationTypeDefinition,b.BRACE_R);return this.node(e,{kind:$.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(b.COLON);const i=this.parseNamedType();return this.node(e,{kind:$.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:$.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),r=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:$.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:a,fields:s})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(b.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(b.BRACE_L,this.parseFieldDefinition,b.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(b.COLON);const a=this.parseTypeReference(),s=this.parseConstDirectives();return this.node(e,{kind:$.FIELD_DEFINITION,description:n,name:i,arguments:r,type:a,directives:s})}parseArgumentDefs(){return this.optionalMany(b.PAREN_L,this.parseInputValueDef,b.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(b.COLON);const r=this.parseTypeReference();let a;this.expectOptionalToken(b.EQUALS)&&(a=this.parseConstValueLiteral());const s=this.parseConstDirectives();return this.node(e,{kind:$.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:a,directives:s})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),r=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),s=this.parseFieldsDefinition();return this.node(e,{kind:$.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:a,fields:s})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),r=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(e,{kind:$.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(b.EQUALS)?this.delimitedMany(b.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),r=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(e,{kind:$.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:a})}parseEnumValuesDefinition(){return this.optionalMany(b.BRACE_L,this.parseEnumValueDefinition,b.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:$.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ee(this._lexer.source,this._lexer.token.start,`${fn(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const i=this.parseName(),r=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(e,{kind:$.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(b.BRACE_L,this.parseInputValueDef,b.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===b.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.optionalMany(b.BRACE_L,this.parseOperationTypeDefinition,b.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:$.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(e,{kind:$.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&a.length===0)throw this.unexpected();return this.node(e,{kind:$.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:a})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&a.length===0)throw this.unexpected();return this.node(e,{kind:$.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:a})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:$.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:$.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:$.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(b.AT);const i=this.parseName(),r=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const s=this.parseDirectiveLocations();return this.node(e,{kind:$.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:a,locations:s})}parseDirectiveLocations(){return this.delimitedMany(b.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(hr,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new Um(e,this._lexer.lastToken,this._lexer.source)),n}peek(e){return this._lexer.token.kind===e}expectToken(e){const n=this._lexer.token;if(n.kind===e)return this.advanceLexer(),n;throw ee(this._lexer.source,n.start,`Expected ${Ml(e)}, found ${fn(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===b.NAME&&n.value===e)this.advanceLexer();else throw ee(this._lexer.source,n.start,`Expected "${e}", found ${fn(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===b.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e!=null?e:this._lexer.token;return ee(this._lexer.source,n.start,`Unexpected ${fn(n)}.`)}any(e,n,i){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(e,n,i){if(this.expectOptionalToken(e)){const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(e,n,i){this.expectToken(e);const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(e,n){this.expectOptionalToken(e);const i=[];do i.push(n.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(e!==void 0&&n.kind!==b.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw ee(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function fn(t){const e=t.value;return Ml(t.kind)+(e!=null?` "${e}"`:"")}function Ml(t){return Gm(t)?`"${t}"`:t}function fg(t){return`"${t.replace(hg,pg)}"`}const hg=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function pg(t){return mg[t.charCodeAt(0)]}const mg=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],gg=Object.freeze({});function vg(t,e,n=Dl){const i=new Map;for(const _ of Object.values($))i.set(_,yg(e,_));let r,a=Array.isArray(t),s=[t],o=-1,l=[],u=t,c,d;const f=[],v=[];do{o++;const _=o===s.length,P=_&&l.length!==0;if(_){if(c=v.length===0?void 0:f[f.length-1],u=d,d=v.pop(),P)if(a){u=u.slice();let T=0;for(const[L,M]of l){const G=L-T;M===null?(u.splice(G,1),T++):u[G]=M}}else{u=Object.defineProperties({},Object.getOwnPropertyDescriptors(u));for(const[T,L]of l)u[T]=L}o=r.index,s=r.keys,l=r.edits,a=r.inArray,r=r.prev}else if(d){if(c=a?o:s[o],u=d[c],u==null)continue;f.push(c)}let V;if(!Array.isArray(u)){var p,m;ts(u)||_n(!1,`Invalid AST Node: ${Jr(u)}.`);const T=_?(p=i.get(u.kind))===null||p===void 0?void 0:p.leave:(m=i.get(u.kind))===null||m===void 0?void 0:m.enter;if(V=T==null?void 0:T.call(e,u,c,d,f,v),V===gg)break;if(V===!1){if(!_){f.pop();continue}}else if(V!==void 0&&(l.push([c,V]),!_))if(ts(V))u=V;else{f.pop();continue}}if(V===void 0&&P&&l.push([c,u]),_)f.pop();else{var N;r={inArray:a,index:o,keys:s,edits:l,prev:r},a=Array.isArray(u),s=a?u:(N=n[u.kind])!==null&&N!==void 0?N:[],o=-1,l=[],d&&v.push(d),d=u}}while(r!==void 0);return l.length!==0?l[l.length-1][1]:t}function yg(t,e){const n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function kg(t){return vg(t,_g)}const bg=80,_g={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>R(t.definitions,`
91
+
92
+ `)},OperationDefinition:{leave(t){const e=z("(",R(t.variableDefinitions,", "),")"),n=R([t.operation,R([t.name,e]),R(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:i})=>t+": "+e+z(" = ",n)+z(" ",R(i," "))},SelectionSet:{leave:({selections:t})=>ue(t)},Field:{leave({alias:t,name:e,arguments:n,directives:i,selectionSet:r}){const a=z("",t,": ")+e;let s=a+z("(",R(n,", "),")");return s.length>bg&&(s=a+z(`(
93
+ `,Sn(R(n,`
94
+ `)),`
95
+ )`)),R([s,R(i," "),r]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+z(" ",R(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>R(["...",z("on ",t),R(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:i,selectionSet:r})=>`fragment ${t}${z("(",R(n,", "),")")} on ${e} ${z("",R(i," ")," ")}`+r},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?Hm(t):fg(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+R(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+R(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+z("(",R(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>z("",t,`
96
+ `)+R(["schema",R(e," "),ue(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>z("",t,`
97
+ `)+R(["scalar",e,R(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:i,fields:r})=>z("",t,`
98
+ `)+R(["type",e,z("implements ",R(n," & ")),R(i," "),ue(r)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:i,directives:r})=>z("",t,`
99
+ `)+e+(is(n)?z(`(
100
+ `,Sn(R(n,`
101
+ `)),`
102
+ )`):z("(",R(n,", "),")"))+": "+i+z(" ",R(r," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:i,directives:r})=>z("",t,`
103
+ `)+R([e+": "+n,z("= ",i),R(r," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:i,fields:r})=>z("",t,`
104
+ `)+R(["interface",e,z("implements ",R(n," & ")),R(i," "),ue(r)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:i})=>z("",t,`
105
+ `)+R(["union",e,R(n," "),z("= ",R(i," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:i})=>z("",t,`
106
+ `)+R(["enum",e,R(n," "),ue(i)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>z("",t,`
107
+ `)+R([e,R(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:i})=>z("",t,`
108
+ `)+R(["input",e,R(n," "),ue(i)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:i,locations:r})=>z("",t,`
109
+ `)+"directive @"+e+(is(n)?z(`(
110
+ `,Sn(R(n,`
111
+ `)),`
112
+ )`):z("(",R(n,", "),")"))+(i?" repeatable":"")+" on "+R(r," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>R(["extend schema",R(t," "),ue(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>R(["extend scalar",t,R(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:i})=>R(["extend type",t,z("implements ",R(e," & ")),R(n," "),ue(i)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:i})=>R(["extend interface",t,z("implements ",R(e," & ")),R(n," "),ue(i)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>R(["extend union",t,R(e," "),z("= ",R(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>R(["extend enum",t,R(e," "),ue(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>R(["extend input",t,R(e," "),ue(n)]," ")}};function R(t,e=""){var n;return(n=t==null?void 0:t.filter(i=>i).join(e))!==null&&n!==void 0?n:""}function ue(t){return z(`{
113
+ `,Sn(R(t,`
114
+ `)),`
115
+ }`)}function z(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function Sn(t){return z(" ",t.replace(/\n/g,`
116
+ `))}function is(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
117
+ `)))!==null&&e!==void 0?e:!1}const rs=t=>{var i,r;let e;const n=t.definitions.filter(a=>a.kind==="OperationDefinition");return n.length===1&&(e=(r=(i=n[0])==null?void 0:i.name)==null?void 0:r.value),e},ji=t=>{if(typeof t=="string"){let n;try{const i=cg(t);n=rs(i)}catch{}return{query:t,operationName:n}}const e=rs(t);return{query:kg(t),operationName:e}};class Lt extends Error{constructor(e,n){const i=`${Lt.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(i),Object.setPrototypeOf(this,Lt.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Lt)}static extractMessage(e){var n,i,r;return(r=(i=(n=e.errors)==null?void 0:n[0])==null?void 0:i.message)!=null?r:`GraphQL Error (Code: ${e.status})`}}var mr={exports:{}};(function(t,e){var n=typeof self!="undefined"?self:Tr,i=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(s){var o={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function l(h){return h&&DataView.prototype.isPrototypeOf(h)}if(o.arrayBuffer)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(h){return h&&u.indexOf(Object.prototype.toString.call(h))>-1};function d(h){if(typeof h!="string"&&(h=String(h)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(h))throw new TypeError("Invalid character in header field name");return h.toLowerCase()}function f(h){return typeof h!="string"&&(h=String(h)),h}function v(h){var g={next:function(){var x=h.shift();return{done:x===void 0,value:x}}};return o.iterable&&(g[Symbol.iterator]=function(){return g}),g}function p(h){this.map={},h instanceof p?h.forEach(function(g,x){this.append(x,g)},this):Array.isArray(h)?h.forEach(function(g){this.append(g[0],g[1])},this):h&&Object.getOwnPropertyNames(h).forEach(function(g){this.append(g,h[g])},this)}p.prototype.append=function(h,g){h=d(h),g=f(g);var x=this.map[h];this.map[h]=x?x+", "+g:g},p.prototype.delete=function(h){delete this.map[d(h)]},p.prototype.get=function(h){return h=d(h),this.has(h)?this.map[h]:null},p.prototype.has=function(h){return this.map.hasOwnProperty(d(h))},p.prototype.set=function(h,g){this.map[d(h)]=f(g)},p.prototype.forEach=function(h,g){for(var x in this.map)this.map.hasOwnProperty(x)&&h.call(g,this.map[x],x,this)},p.prototype.keys=function(){var h=[];return this.forEach(function(g,x){h.push(x)}),v(h)},p.prototype.values=function(){var h=[];return this.forEach(function(g){h.push(g)}),v(h)},p.prototype.entries=function(){var h=[];return this.forEach(function(g,x){h.push([x,g])}),v(h)},o.iterable&&(p.prototype[Symbol.iterator]=p.prototype.entries);function m(h){if(h.bodyUsed)return Promise.reject(new TypeError("Already read"));h.bodyUsed=!0}function N(h){return new Promise(function(g,x){h.onload=function(){g(h.result)},h.onerror=function(){x(h.error)}})}function _(h){var g=new FileReader,x=N(g);return g.readAsArrayBuffer(h),x}function P(h){var g=new FileReader,x=N(g);return g.readAsText(h),x}function V(h){for(var g=new Uint8Array(h),x=new Array(g.length),I=0;I<g.length;I++)x[I]=String.fromCharCode(g[I]);return x.join("")}function T(h){if(h.slice)return h.slice(0);var g=new Uint8Array(h.byteLength);return g.set(new Uint8Array(h)),g.buffer}function L(){return this.bodyUsed=!1,this._initBody=function(h){this._bodyInit=h,h?typeof h=="string"?this._bodyText=h:o.blob&&Blob.prototype.isPrototypeOf(h)?this._bodyBlob=h:o.formData&&FormData.prototype.isPrototypeOf(h)?this._bodyFormData=h:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)?this._bodyText=h.toString():o.arrayBuffer&&o.blob&&l(h)?(this._bodyArrayBuffer=T(h.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(h)||c(h))?this._bodyArrayBuffer=T(h):this._bodyText=h=Object.prototype.toString.call(h):this._bodyText="",this.headers.get("content-type")||(typeof h=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(h)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var h=m(this);if(h)return h;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(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(_)}),this.text=function(){var h=m(this);if(h)return h;if(this._bodyBlob)return P(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(V(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(C)}),this.json=function(){return this.text().then(JSON.parse)},this}var M=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function G(h){var g=h.toUpperCase();return M.indexOf(g)>-1?g:h}function y(h,g){g=g||{};var x=g.body;if(h instanceof y){if(h.bodyUsed)throw new TypeError("Already read");this.url=h.url,this.credentials=h.credentials,g.headers||(this.headers=new p(h.headers)),this.method=h.method,this.mode=h.mode,this.signal=h.signal,!x&&h._bodyInit!=null&&(x=h._bodyInit,h.bodyUsed=!0)}else this.url=String(h);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new p(g.headers)),this.method=G(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&x)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(x)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})};function C(h){var g=new FormData;return h.trim().split("&").forEach(function(x){if(x){var I=x.split("="),D=I.shift().replace(/\+/g," "),j=I.join("=").replace(/\+/g," ");g.append(decodeURIComponent(D),decodeURIComponent(j))}}),g}function F(h){var g=new p,x=h.replace(/\r?\n[\t ]+/g," ");return x.split(/\r?\n/).forEach(function(I){var D=I.split(":"),j=D.shift().trim();if(j){var me=D.join(":").trim();g.append(j,me)}}),g}L.call(y.prototype);function S(h,g){g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in g?g.statusText:"OK",this.headers=new p(g.headers),this.url=g.url||"",this._initBody(h)}L.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},S.error=function(){var h=new S(null,{status:0,statusText:""});return h.type="error",h};var E=[301,302,303,307,308];S.redirect=function(h,g){if(E.indexOf(g)===-1)throw new RangeError("Invalid status code");return new S(null,{status:g,headers:{location:h}})},s.DOMException=a.DOMException;try{new s.DOMException}catch{s.DOMException=function(g,x){this.message=g,this.name=x;var I=Error(g);this.stack=I.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function A(h,g){return new Promise(function(x,I){var D=new y(h,g);if(D.signal&&D.signal.aborted)return I(new s.DOMException("Aborted","AbortError"));var j=new XMLHttpRequest;function me(){j.abort()}j.onload=function(){var we={status:j.status,statusText:j.statusText,headers:F(j.getAllResponseHeaders()||"")};we.url="responseURL"in j?j.responseURL:we.headers.get("X-Request-URL");var ki="response"in j?j.response:j.responseText;x(new S(ki,we))},j.onerror=function(){I(new TypeError("Network request failed"))},j.ontimeout=function(){I(new TypeError("Network request failed"))},j.onabort=function(){I(new s.DOMException("Aborted","AbortError"))},j.open(D.method,D.url,!0),D.credentials==="include"?j.withCredentials=!0:D.credentials==="omit"&&(j.withCredentials=!1),"responseType"in j&&o.blob&&(j.responseType="blob"),D.headers.forEach(function(we,ki){j.setRequestHeader(ki,we)}),D.signal&&(D.signal.addEventListener("abort",me),j.onreadystatechange=function(){j.readyState===4&&D.signal.removeEventListener("abort",me)}),j.send(typeof D._bodyInit=="undefined"?null:D._bodyInit)})}return A.polyfill=!0,a.fetch||(a.fetch=A,a.Headers=p,a.Request=y,a.Response=S),s.Headers=p,s.Request=y,s.Response=S,s.fetch=A,Object.defineProperty(s,"__esModule",{value:!0}),s})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;e=r.fetch,e.default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e})(mr,mr.exports);var Bn=mr.exports;const Nn=Cr(Bn),Sg=eu({__proto__:null,default:Nn},[Bn]),nt=t=>{let e={};return t&&(typeof Headers!="undefined"&&t instanceof Headers||Sg&&Bn.Headers&&t instanceof Bn.Headers?e=xm(t):Array.isArray(t)?t.forEach(([n,i])=>{n&&i!==void 0&&(e[n]=i)}):e=t),e},as=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),Ng=t=>{if(!Array.isArray(t.query)){const i=t,r=[`query=${encodeURIComponent(as(i.query))}`];return t.variables&&r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&r.push(`operationName=${encodeURIComponent(i.operationName)}`),r.join("&")}if(typeof t.variables!="undefined"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,n=t.query.reduce((i,r,a)=>(i.push({query:as(r),variables:e.variables?e.jsonSerializer.stringify(e.variables[a]):void 0}),i),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},Eg=t=>async e=>{var m;const{url:n,query:i,variables:r,operationName:a,fetch:s,fetchOptions:o,middleware:l}=e,u={...e.headers};let c="",d;t==="POST"?(d=Og(i,r,a,o.jsonSerializer),typeof d=="string"&&(u["Content-Type"]="application/json")):c=Ng({query:i,variables:r,operationName:a,jsonSerializer:(m=o.jsonSerializer)!=null?m:Kr});const f={method:t,headers:u,body:d,...o};let v=n,p=f;if(l){const N=await Promise.resolve(l({...f,url:n,operationName:a,variables:r})),{url:_,...P}=N;v=_,p=P}return c&&(v=`${v}?${c}`),await s(v,p)};class Ag{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=async(...i)=>{const[r,a,s]=i,o=Rm(r,a,s),{headers:l,fetch:u=Nn,method:c="POST",requestMiddleware:d,responseMiddleware:f,...v}=this.requestConfig,{url:p}=this;o.signal!==void 0&&(v.signal=o.signal);const{operationName:m}=ji(o.query);return Mi({url:p,query:o.query,variables:o.variables,headers:{...nt(Bi(l)),...nt(o.requestHeaders)},operationName:m,fetch:u,method:c,fetchOptions:v,middleware:d}).then(N=>(f&&f(N),N)).catch(N=>{throw f&&f(N),N})}}async request(e,...n){const[i,r]=n,a=Fm(e,i,r),{headers:s,fetch:o=Nn,method:l="POST",requestMiddleware:u,responseMiddleware:c,...d}=this.requestConfig,{url:f}=this;a.signal!==void 0&&(d.signal=a.signal);const{query:v,operationName:p}=ji(a.document);return Mi({url:f,query:v,variables:a.variables,headers:{...nt(Bi(s)),...nt(a.requestHeaders)},operationName:p,fetch:o,method:l,fetchOptions:d,middleware:u}).then(m=>(c&&c(m),m.data)).catch(m=>{throw c&&c(m),m})}batchRequests(e,n){var l;const i=Im(e,n),{headers:r,...a}=this.requestConfig;i.signal!==void 0&&(a.signal=i.signal);const s=i.documents.map(({document:u})=>ji(u).query),o=i.documents.map(({variables:u})=>u);return Mi({url:this.url,query:s,variables:o,headers:{...nt(Bi(r)),...nt(i.requestHeaders)},operationName:void 0,fetch:(l=this.requestConfig.fetch)!=null?l:Nn,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware}).then(u=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u.data)).catch(u=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(u),u})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:i}=this.requestConfig;return i?i[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}}const Mi=async t=>{var c,d;const{query:e,variables:n,fetchOptions:i}=t,r=Eg(Cm((c=t.method)!=null?c:"post")),a=Array.isArray(t.query),s=await r(t),o=await wg(s,(d=i.jsonSerializer)!=null?d:Kr),l=Array.isArray(o)?!o.some(({data:f})=>!f):!!o.data,u=Array.isArray(o)||!o.errors||Array.isArray(o.errors)&&!o.errors.length||i.errorPolicy==="all"||i.errorPolicy==="ignore";if(s.ok&&u&&l){const{errors:f,...v}=(Array.isArray(o),o),p=i.errorPolicy==="ignore"?v:o;return{...a?{data:p}:p,headers:s.headers,status:s.status}}else{const f=typeof o=="string"?{error:o}:o;throw new Lt({...f,status:s.status,headers:s.headers},{query:e,variables:n})}},Og=(t,e,n,i)=>{const r=i!=null?i:Kr;if(!Array.isArray(t))return r.stringify({query:t,variables:e,operationName:n});if(typeof e!="undefined"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const a=t.reduce((s,o,l)=>(s.push({query:o,variables:e?e[l]:void 0}),s),[]);return r.stringify(a)},wg=async(t,e)=>{let n;return t.headers.forEach((i,r)=>{r.toLowerCase()==="content-type"&&(n=i)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},Bi=t=>typeof t=="function"?t():t;class Bl extends yt{constructor(){super("EVENT_CHAT_ROOM_TOKEN_ERROR","Error getting chat room connection token")}}class gi{constructor(e){w(this,"root",Dr(this));w(this,"token");this.root.setProps(e)}static toDomain(e){const n={token:e.token};return new gi(n)}toPrimitives(){const{root:e,...n}=this;return{...n}}}const Tg=yr.apiUrls.graphql;class zl{constructor(){w(this,"client");this.client=new Ag(Tg)}async getChatRoom(e){var r;const{getChatRoomToken:n}=await this.client.request(cl,{data:{account:e.account,idEvent:e.eventId,userName:e.userName}});this.propagateGraphqlErrorIfExists(n);const i=(r=n.data)==null?void 0:r.token;if(!i)throw new Bl;return gi.toDomain({token:i})}propagateGraphqlErrorIfExists(e){if(e.__typename==="ErrorGeneral")throw new Error(e.message)}}class Hl{constructor(e){w(this,"account");this.eventChatRoomRepository=e}async get(e){this.validateAccount();try{return await this.eventChatRoomRepository.getChatRoom({...e,account:this.account})}catch(n){throw new Fr(n)}}setAccount(e){this.account=e}validateAccount(){if(!this.account)throw new _o}}const Cg=new zl,gr=new Hl(Cg),Ce=gs("ivs-socket",Ye),vi=zn(void 0);vi.debugLabel="ivsChatSocketAtom";const yi=zn(!1);yi.debugLabel="ivsChatIsConnectedAtom";const an=zn([]);an.debugLabel="ivsChatMessageListAtom";const ql=t=>{const{url:e,token:n,onOpen:i,onClose:r,onMessage:a,onError:s}=t,o=new WebSocket(e,n);return o.onopen=l=>i(l),o.onclose=l=>r(l),o.onerror=l=>s(l),o.onmessage=l=>a(l),o},Gl=()=>{const t="0123456789ABCDEF";let e="#";for(let n=0;n<6;n+=1)e+=t[Math.floor(Math.random()*16)];return e},Kl=t=>{var n;t.data=t.data.replace("replace_gif",(n=t.urlGif)!=null?n:"");const e=t.data.indexOf("::question__")>-1;if(e){const[i,r]=t.data.split("::")||["none","none"],a=r.split("question__")[1],s={response:i.replace("response__",""),question:JSON.parse(a)};return{...t,data:s.response,isResponse:e,responseData:t.data,question:e?s.question:null}}return t},Yr=(t,e)=>{var f,v;const{Content:n,Attributes:i,Sender:{Attributes:r}}=e,{username:a,type:s,email:o}=i,{isAdmin:l}=r,u=(f=i==null?void 0:i.id)!=null?f:wr(8),c=((v=t.find(p=>p.username===a))==null?void 0:v.color)||Gl(),d={id:u,type:s,color:c,username:a,email:o,data:n,sendDate:i.sendDate,isAdmin:l==="true",responseAdmin:!1,question:null,account:i.account,idEvent:i.idEvent,urlGif:i.urlGif,ip:i.ip};return Kl(d)},xg=t=>["eventChatRoom",t!=null?t:null],Wl=t=>{const{eventId:e,userName:n,enabled:i=!0}=t,r=Rr(l=>l.accountName),[a,s]=B.useState(""),o=hs.useQuery({queryKey:xg(e),queryFn:()=>gr.get({eventId:e,userName:n}),enabled:!!r&&!!e&&i,refetchOnWindowFocus:!1,refetchOnMount:!1});return B.useEffect(()=>{r&&gr.setAccount(r)},[r]),B.useEffect(()=>{var u;const l=(u=o.data)==null?void 0:u.token;l&&s(l)},[o.data]),{getQuery:o,token:a}},Fg=yr.publicUrls.wssIVSChat,Jl=t=>{const{onMessage:e,eventId:n,enabled:i=!0,userName:r,onEvent:a}=t,{token:s,getQuery:o}=Wl({eventId:n,userName:r,enabled:i}),[l,u]=hn(vi),[c,d]=hn(yi),[f,v]=hn(an),p=()=>{if((l==null?void 0:l.readyState)===WebSocket.OPEN)return;Ce.debug("connecting to the chat room");const L=ql({token:s,url:Fg,onOpen:_,onClose:T,onError:P,onMessage:V});u(L)},m=()=>{l&&l.close()},N=()=>{o.refetch(),Ce.debug("reconnecting to the chat room")},_=B.useCallback(()=>{d(!0),Ce.debug("connected to the chat room")},[d]),P=B.useCallback(L=>{Ce.error("chat room socket error:",L)},[]),V=B.useCallback(L=>{const M=JSON.parse(L.data);switch(M.Type){case"EVENT":a==null||a(M);break;case"ERROR":Ce.error("chat room error:",M);break;case"MESSAGE":e==null||e(M);break;default:Ce.error("unknown chat room event:",L)}},[a,e]),T=B.useCallback(L=>{Ce.debug("disconnected from the chat room"),d(!1),N()},[]);return B.useEffect(()=>{if(s)return Ce.debug("chat room token:",s),m(),p(),()=>{m()}},[s]),{ivsChatSocket:l,ivsChatIsConnected:c,ivsChatMessageList:f,setIvsChatMessageList:v}},Rg=()=>{const t=zi(vi),e=zi(yi);return{sendIvsMessage:B.useCallback((i,r)=>{if(!t||!e)return;const a={id:r.id,sendDate:new Date,content:i,action:"SEND_MESSAGE",attributes:r},s=JSON.stringify(a);t.send(s)},[e,t])}},Yl=()=>{const t=vr(an);return{handleEvent:i=>{var r;if(i.EventName==="senddeletemessage"){const a=JSON.parse((r=i.Attributes)==null?void 0:r.data);t(s=>s.filter(o=>o.id!==a.id))}},handleMessage:i=>{t(r=>[...r,Yr(r,i)])}}},Ig=t=>{const{eventId:e,userName:n}=t,[i,r]=B.useState(!1),[a,s]=B.useState(),[o,l]=B.useState(),{handleEvent:u}=Yl(),c=vr(an),d=N=>{c(_=>[Yr(_,N),..._]),r(!1)},f=N=>{var _,P;if(u(N),N.EventName==="sendpinmessage"){const V=JSON.parse((_=N.Attributes)==null?void 0:_.data);s({data:V.data,id:V.id,username:V.username})}if(N.EventName==="sendunpinmessage"&&s(void 0),N.EventName==="sendhighlightproduct"){const V=JSON.parse((P=N.Attributes)==null?void 0:P.data);l({products:V.productIds,collection:V.collection,livestreamingId:V.idEvent})}},{ivsChatSocket:v,ivsChatMessageList:p,setIvsChatMessageList:m}=Jl({onMessage:d,onEvent:f,eventId:e,userName:n});return{socket:v,chat:p,showLoader:i,pinnedMessage:a,highlightProduct:o,setChat:m,setShowLoader:r,setPinnedMessage:s}};exports.AccountContractStatusTypes=jr;exports.AccountContractTypes=Wo;exports.AccountInvalidError=_o;exports.AccountPlanDescriptionTypes=Yo;exports.AccountRestRepository=Xo;exports.AccountService=Zo;exports.AccountSubscriptionTypes=Jo;exports.AccountTypes=Ur;exports.AddToCartActionTypes=li;exports.AggregateRoot=Oo;exports.ApiGraphqlTypes=Gh;exports.BroadcastChannelEventBus=mo;exports.ComponentManager=xl;exports.DomainError=yt;exports.EventBusWildcards=hh;exports.EventChatRoom=gi;exports.EventChatRoomService=Hl;exports.EventChatRoomTokenError=Bl;exports.EventNames=il;exports.ExternalRuntime=Gr;exports.GlobalPageSectionTypes=Qo;exports.GraphqlEventChatRoomRepository=zl;exports.HttpAxiosClient=lh;exports.InvalidNizzaGlobalObjectError=So;exports.LanguageTypes=rl;exports.LocalRuntime=di;exports.Logger=$e;exports.NizzaAccount=oi;exports.NizzaEventStatus=nl;exports.NizzaProductRequestOriginTypes=sl;exports.NizzaStore=Dn;exports.NizzaVariationTypes=al;exports.ReactHostElement=Cl;exports.ResourceNotFoundError=bo;exports.Runtime=Tm;exports.RuntimeStage=Br;exports.RuntimeType=Qe;exports.StoreProvider=Am;exports.UnexpectedError=Fr;exports.ValueObject=Gd;exports.VtexIORuntime=fi;exports.VtexLegacyRuntime=hi;exports.accountAtom=Hn;exports.accountService=Mr;exports.addQuestionData=Kl;exports.addToCartMessages=lr;exports.apiCall=Md;exports.buildLanguageTranslations=fl;exports.buildTranslations=hl;exports.connectToSocket=ql;exports.createActionFactory=dl;exports.createAggregateRoot=Dr;exports.createLazyLogger=gs;exports.createStore=Kh;exports.customFetch=Ir;exports.downloadFile=Bd;exports.eventChatRoomService=gr;exports.fileOrigin=yd;exports.getAccount=tl;exports.getClientTimeZone=qd;exports.getNizza=Ye;exports.getRandomColor=Gl;exports.getScriptParams=go;exports.getStore=wm;exports.globalAtomStore=el;exports.i18Init=vl;exports.ivsChatIsConnectedAtom=yi;exports.ivsChatMessageListAtom=an;exports.ivsChatSocketAtom=vi;exports.jsDownload=Ao;exports.normalizeChatMessage=Yr;exports.registerTranslations=Gp;exports.registerTranslationsOf=pl;exports.runAddToCartHooks=Jh;exports.runtimeList=Fl;exports.searchParams=vd;exports.shortId=wr;exports.sleep=kd;exports.useAccount=fh;exports.useConnectIVSChat=Jl;exports.useEventChatRoom=Wl;exports.useIVSChatActions=Rg;exports.useIVSChatClient=Ig;exports.useIVSChatHandlers=Yl;exports.useNZ=Eo;exports.useNizza=Rr;exports.useStore=Om;exports.validateRequiredProps=wd;
70
118
  //# sourceMappingURL=index.cjs.map