@nizza/core 0.5.7 → 0.5.9-alpha.0

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 (177) hide show
  1. package/README.md +87 -1
  2. package/dist/environments/environment.d.ts +1 -0
  3. package/dist/environments/environment.d.ts.map +1 -0
  4. package/dist/environments/environment.local.d.ts +1 -0
  5. package/dist/environments/environment.local.d.ts.map +1 -0
  6. package/dist/environments/environment.prod.d.ts +1 -0
  7. package/dist/environments/environment.prod.d.ts.map +1 -0
  8. package/dist/environments/environment.staging.d.ts +1 -0
  9. package/dist/environments/environment.staging.d.ts.map +1 -0
  10. package/dist/index.cjs +7 -6
  11. package/dist/index.cjs.map +1 -0
  12. package/dist/index.d.ts +1 -0
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.mjs +2172 -2154
  15. package/dist/index.mjs.map +1 -0
  16. package/dist/lib/accounts/atoms/account.d.ts +3 -1
  17. package/dist/lib/accounts/atoms/account.d.ts.map +1 -0
  18. package/dist/lib/accounts/atoms/index.d.ts +1 -0
  19. package/dist/lib/accounts/atoms/index.d.ts.map +1 -0
  20. package/dist/lib/accounts/core/domain/Account.d.ts +6 -3
  21. package/dist/lib/accounts/core/domain/Account.d.ts.map +1 -0
  22. package/dist/lib/accounts/core/domain/AccountRepository.d.ts +2 -0
  23. package/dist/lib/accounts/core/domain/AccountRepository.d.ts.map +1 -0
  24. package/dist/lib/accounts/core/domain/index.d.ts +1 -0
  25. package/dist/lib/accounts/core/domain/index.d.ts.map +1 -0
  26. package/dist/lib/accounts/core/domain/shared/constants.d.ts +1 -0
  27. package/dist/lib/accounts/core/domain/shared/constants.d.ts.map +1 -0
  28. package/dist/lib/accounts/core/domain/shared/errors.d.ts +1 -0
  29. package/dist/lib/accounts/core/domain/shared/errors.d.ts.map +1 -0
  30. package/dist/lib/accounts/core/domain/shared/index.d.ts +1 -0
  31. package/dist/lib/accounts/core/domain/shared/index.d.ts.map +1 -0
  32. package/dist/lib/accounts/core/domain/types.d.ts +3 -0
  33. package/dist/lib/accounts/core/domain/types.d.ts.map +1 -0
  34. package/dist/lib/accounts/core/index.d.ts +2 -0
  35. package/dist/lib/accounts/core/index.d.ts.map +1 -0
  36. package/dist/lib/accounts/core/infrastructure/EventRestRepository.d.ts +2 -0
  37. package/dist/lib/accounts/core/infrastructure/EventRestRepository.d.ts.map +1 -0
  38. package/dist/lib/accounts/core/infrastructure/index.d.ts +1 -0
  39. package/dist/lib/accounts/core/infrastructure/index.d.ts.map +1 -0
  40. package/dist/lib/accounts/core/services/AccountService.d.ts +3 -1
  41. package/dist/lib/accounts/core/services/AccountService.d.ts.map +1 -0
  42. package/dist/lib/accounts/core/services/index.d.ts +1 -0
  43. package/dist/lib/accounts/core/services/index.d.ts.map +1 -0
  44. package/dist/lib/accounts/hooks/index.d.ts +1 -0
  45. package/dist/lib/accounts/hooks/index.d.ts.map +1 -0
  46. package/dist/lib/accounts/hooks/useAccount.d.ts +3 -2
  47. package/dist/lib/accounts/hooks/useAccount.d.ts.map +1 -0
  48. package/dist/lib/accounts/index.d.ts +1 -0
  49. package/dist/lib/accounts/index.d.ts.map +1 -0
  50. package/dist/lib/accounts/utils/getAccount.d.ts +2 -1
  51. package/dist/lib/accounts/utils/getAccount.d.ts.map +1 -0
  52. package/dist/lib/accounts/utils/index.d.ts +1 -0
  53. package/dist/lib/accounts/utils/index.d.ts.map +1 -0
  54. package/dist/lib/add-to-cart/hooks.d.ts +2 -0
  55. package/dist/lib/add-to-cart/hooks.d.ts.map +1 -0
  56. package/dist/lib/add-to-cart/index.d.ts +1 -0
  57. package/dist/lib/add-to-cart/index.d.ts.map +1 -0
  58. package/dist/lib/constants/event.d.ts +1 -0
  59. package/dist/lib/constants/event.d.ts.map +1 -0
  60. package/dist/lib/constants/eventBus.d.ts +1 -0
  61. package/dist/lib/constants/eventBus.d.ts.map +1 -0
  62. package/dist/lib/constants/i18n.d.ts +1 -0
  63. package/dist/lib/constants/i18n.d.ts.map +1 -0
  64. package/dist/lib/constants/index.d.ts +1 -0
  65. package/dist/lib/constants/index.d.ts.map +1 -0
  66. package/dist/lib/constants/products.d.ts +1 -0
  67. package/dist/lib/constants/products.d.ts.map +1 -0
  68. package/dist/lib/domain/AggregateRoot.d.ts +1 -0
  69. package/dist/lib/domain/AggregateRoot.d.ts.map +1 -0
  70. package/dist/lib/domain/BaseMobxStore.d.ts +1 -0
  71. package/dist/lib/domain/BaseMobxStore.d.ts.map +1 -0
  72. package/dist/lib/domain/ValueObject.d.ts +1 -0
  73. package/dist/lib/domain/ValueObject.d.ts.map +1 -0
  74. package/dist/lib/domain/index.d.ts +1 -0
  75. package/dist/lib/domain/index.d.ts.map +1 -0
  76. package/dist/lib/errors/DomainError.d.ts +1 -0
  77. package/dist/lib/errors/DomainError.d.ts.map +1 -0
  78. package/dist/lib/errors/api.d.ts +2 -0
  79. package/dist/lib/errors/api.d.ts.map +1 -0
  80. package/dist/lib/errors/app.d.ts +2 -0
  81. package/dist/lib/errors/app.d.ts.map +1 -0
  82. package/dist/lib/errors/index.d.ts +1 -0
  83. package/dist/lib/errors/index.d.ts.map +1 -0
  84. package/dist/lib/event-buses/BroadcastChannelEventBus.d.ts +3 -1
  85. package/dist/lib/event-buses/BroadcastChannelEventBus.d.ts.map +1 -0
  86. package/dist/lib/event-buses/EventEmitter2EventBus.d.ts +2 -0
  87. package/dist/lib/event-buses/EventEmitter2EventBus.d.ts.map +1 -0
  88. package/dist/lib/event-buses/index.d.ts +1 -0
  89. package/dist/lib/event-buses/index.d.ts.map +1 -0
  90. package/dist/lib/i18n/buildTranslations.d.ts +3 -1
  91. package/dist/lib/i18n/buildTranslations.d.ts.map +1 -0
  92. package/dist/lib/i18n/index.d.ts +1 -0
  93. package/dist/lib/i18n/index.d.ts.map +1 -0
  94. package/dist/lib/i18n/init.d.ts +2 -0
  95. package/dist/lib/i18n/init.d.ts.map +1 -0
  96. package/dist/lib/i18n/nizza.d.ts +2 -0
  97. package/dist/lib/i18n/nizza.d.ts.map +1 -0
  98. package/dist/lib/index.d.ts +1 -0
  99. package/dist/lib/index.d.ts.map +1 -0
  100. package/dist/lib/jotai/globalAtomStore.d.ts +16 -23
  101. package/dist/lib/jotai/globalAtomStore.d.ts.map +1 -0
  102. package/dist/lib/jotai/index.d.ts +1 -0
  103. package/dist/lib/jotai/index.d.ts.map +1 -0
  104. package/dist/lib/mobx/StoreProvider.d.ts +3 -1
  105. package/dist/lib/mobx/StoreProvider.d.ts.map +1 -0
  106. package/dist/lib/mobx/hooks.d.ts +2 -0
  107. package/dist/lib/mobx/hooks.d.ts.map +1 -0
  108. package/dist/lib/mobx/index.d.ts +1 -0
  109. package/dist/lib/mobx/index.d.ts.map +1 -0
  110. package/dist/lib/nizza-store/ConfigManager.d.ts +3 -1
  111. package/dist/lib/nizza-store/ConfigManager.d.ts.map +1 -0
  112. package/dist/lib/nizza-store/NizzaStore.d.ts +6 -4
  113. package/dist/lib/nizza-store/NizzaStore.d.ts.map +1 -0
  114. package/dist/lib/nizza-store/helpers.d.ts +1 -0
  115. package/dist/lib/nizza-store/helpers.d.ts.map +1 -0
  116. package/dist/lib/nizza-store/index.d.ts +1 -0
  117. package/dist/lib/nizza-store/index.d.ts.map +1 -0
  118. package/dist/lib/nizza-store/react-hooks.d.ts +2 -0
  119. package/dist/lib/nizza-store/react-hooks.d.ts.map +1 -0
  120. package/dist/lib/types/add-to-cart-hooks.d.ts +2 -0
  121. package/dist/lib/types/add-to-cart-hooks.d.ts.map +1 -0
  122. package/dist/lib/types/api-graphql-types.d.ts +108 -0
  123. package/dist/lib/types/api-graphql-types.d.ts.map +1 -0
  124. package/dist/lib/types/api.d.ts +1 -0
  125. package/dist/lib/types/api.d.ts.map +1 -0
  126. package/dist/lib/types/appModule.d.ts +3 -1
  127. package/dist/lib/types/appModule.d.ts.map +1 -0
  128. package/dist/lib/types/i18n.d.ts +2 -0
  129. package/dist/lib/types/i18n.d.ts.map +1 -0
  130. package/dist/lib/types/index.d.ts +1 -0
  131. package/dist/lib/types/index.d.ts.map +1 -0
  132. package/dist/lib/types/mobx.d.ts +2 -0
  133. package/dist/lib/types/mobx.d.ts.map +1 -0
  134. package/dist/lib/types/nizza/chat.d.ts +2 -0
  135. package/dist/lib/types/nizza/chat.d.ts.map +1 -0
  136. package/dist/lib/types/nizza/eventBus.d.ts +1 -0
  137. package/dist/lib/types/nizza/eventBus.d.ts.map +1 -0
  138. package/dist/lib/types/nizza/globalStore.d.ts +6 -4
  139. package/dist/lib/types/nizza/globalStore.d.ts.map +1 -0
  140. package/dist/lib/types/nizza/index.d.ts +1 -0
  141. package/dist/lib/types/nizza/index.d.ts.map +1 -0
  142. package/dist/lib/types/nizza/main.d.ts +2 -0
  143. package/dist/lib/types/nizza/main.d.ts.map +1 -0
  144. package/dist/lib/types/nizza/nizzaEvent.d.ts +1 -0
  145. package/dist/lib/types/nizza/nizzaEvent.d.ts.map +1 -0
  146. package/dist/lib/types/nizza/product.d.ts +2 -6
  147. package/dist/lib/types/nizza/product.d.ts.map +1 -0
  148. package/dist/lib/types/nizza/productDataSource.d.ts +3 -1
  149. package/dist/lib/types/nizza/productDataSource.d.ts.map +1 -0
  150. package/dist/lib/types/utils.d.ts +3 -1
  151. package/dist/lib/types/utils.d.ts.map +1 -0
  152. package/dist/lib/types/vtex/checkout.d.ts +1 -0
  153. package/dist/lib/types/vtex/checkout.d.ts.map +1 -0
  154. package/dist/lib/types/vtex/index.d.ts +1 -0
  155. package/dist/lib/types/vtex/index.d.ts.map +1 -0
  156. package/dist/lib/types/vtex/orderForm.d.ts +1 -0
  157. package/dist/lib/types/vtex/orderForm.d.ts.map +1 -0
  158. package/dist/lib/types/vtex/product.d.ts +1 -0
  159. package/dist/lib/types/vtex/product.d.ts.map +1 -0
  160. package/dist/lib/utils/createLazyLogger.d.ts +3 -1
  161. package/dist/lib/utils/createLazyLogger.d.ts.map +1 -0
  162. package/dist/lib/utils/customFetch.d.ts +2 -0
  163. package/dist/lib/utils/customFetch.d.ts.map +1 -0
  164. package/dist/lib/utils/downloadFile.d.ts +1 -0
  165. package/dist/lib/utils/downloadFile.d.ts.map +1 -0
  166. package/dist/lib/utils/getClientTimeZone.d.ts +2 -0
  167. package/dist/lib/utils/getClientTimeZone.d.ts.map +1 -0
  168. package/dist/lib/utils/helpers.d.ts +1 -0
  169. package/dist/lib/utils/helpers.d.ts.map +1 -0
  170. package/dist/lib/utils/index.d.ts +1 -0
  171. package/dist/lib/utils/index.d.ts.map +1 -0
  172. package/dist/lib/utils/logger.d.ts +2 -0
  173. package/dist/lib/utils/logger.d.ts.map +1 -0
  174. package/dist/locales/index.d.ts +1 -0
  175. package/dist/locales/index.d.ts.map +1 -0
  176. package/package.json +4 -1
  177. package/dist/package.json +0 -14
package/dist/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
- "use strict";var Na=Object.defineProperty;var Oa=(t,e,n)=>e in t?Na(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var C=(t,e,n)=>(Oa(t,typeof e!="symbol"?e+"":e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),wa=require("react-dom"),Aa=require("react/jsx-runtime");function Fa(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Z=Fa($);var K={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let Ea=0;function Ca(t,e){const n=`atom${++Ea}`,i={toString:()=>n};return typeof t=="function"?i.read=t:(i.init=t,i.read=xa,i.write=Ta),e&&(i.write=e),i}function xa(t){return t(this)}function Ta(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const Ht=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,qt=t=>"init"in t,Wt=t=>!!t.write,kt=new WeakMap,Ra=(t,e)=>{kt.set(t,e),t.catch(()=>{}).finally(()=>kt.delete(t))},Bn=(t,e)=>{const n=kt.get(t);n&&(kt.delete(t),n(e))},zn=(t,e)=>{t.status="fulfilled",t.value=e},Kn=(t,e)=>{t.status="rejected",t.reason=e},Da=t=>typeof(t==null?void 0:t.then)=="function",$e=(t,e)=>!!t&&"v"in t&&"v"in e&&Object.is(t.v,e.v),Gn=(t,e)=>!!t&&"e"in t&&"e"in e&&Object.is(t.e,e.e),Oe=t=>!!t&&"v"in t&&t.v instanceof Promise,La=(t,e)=>"v"in t&&"v"in e&&t.v.orig&&t.v.orig===e.v.orig,ut=t=>{if("e"in t)throw t.e;return t.v},Di=()=>{const t=new WeakMap,e=new WeakMap,n=new Map;let i,r;(K?"production":void 0)!=="production"&&(i=new Set,r=new Set);const a=m=>t.get(m),s=(m,k)=>{(K?"production":void 0)!=="production"&&Object.freeze(k);const _=a(m);if(t.set(m,k),n.has(m)||n.set(m,_),Oe(_)){const h="v"in k?k.v instanceof Promise?k.v:Promise.resolve(k.v):Promise.reject(k.e);_.v!==h&&Bn(_.v,h)}},o=(m,k,_,h)=>{const b=new Map(h?k.d:null);let A=!1;_.forEach((p,F)=>{!p&&Ht(m,F)&&(p=k),p?(b.set(F,p),k.d.get(F)!==p&&(A=!0)):(K?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(A||k.d.size!==b.size)&&(k.d=b)},l=(m,k,_,h)=>{const b=a(m),A={d:(b==null?void 0:b.d)||new Map,v:k};if(_&&o(m,A,_,h),$e(b,A)&&b.d===A.d)return b;if(Oe(b)&&Oe(A)&&La(b,A)){if(b.d===A.d)return b;A.v=b.v}return s(m,A),A},u=(m,k,_,h)=>{if(Da(k)){let b;const A=()=>{const F=a(m);if(!Oe(F)||F.v!==p)return;const U=l(m,p,_);e.has(m)&&F.d!==U.d&&x(m,U,F.d)},p=new Promise((F,U)=>{let D=!1;k.then(T=>{D||(D=!0,zn(p,T),F(T),A())},T=>{D||(D=!0,Kn(p,T),U(T),A())}),b=T=>{D||(D=!0,T.then(B=>zn(p,B),B=>Kn(p,B)),F(T))}});return p.orig=k,p.status="pending",Ra(p,F=>{F&&b(F),h==null||h()}),l(m,p,_,!0)}return l(m,k,_)},d=(m,k,_)=>{const h=a(m),b={d:(h==null?void 0:h.d)||new Map,e:k};return _&&o(m,b,_),Gn(h,b)&&h.d===b.d?h:(s(m,b),b)},f=(m,k)=>{const _=a(m);if(!k&&_&&(e.has(m)||Array.from(_.d).every(([D,T])=>{if(D===m)return!0;const B=f(D);return B===T||$e(B,T)})))return _;const h=new Map;let b=!0;const A=D=>{if(Ht(m,D)){const B=a(D);if(B)return h.set(D,B),ut(B);if(qt(D))return h.set(D,void 0),D.init;throw new Error("no atom init")}const T=f(D);return h.set(D,T),ut(T)};let p,F;const U={get signal(){return p||(p=new AbortController),p.signal},get setSelf(){return(K?"production":void 0)!=="production"&&!Wt(m)&&console.warn("setSelf function cannot be used with read-only atom"),!F&&Wt(m)&&(F=(...D)=>{if((K?"production":void 0)!=="production"&&b&&console.warn("setSelf function cannot be called in sync"),!b)return R(m,...D)}),F}};try{const D=m.read(A,U);return u(m,D,h,()=>p==null?void 0:p.abort())}catch(D){return d(m,D,h)}finally{b=!1}},c=m=>ut(f(m)),N=m=>{let k=e.get(m);return k||(k=P(m)),k},O=(m,k)=>!k.l.size&&(!k.t.size||k.t.size===1&&k.t.has(m)),g=m=>{const k=e.get(m);k&&O(m,k)&&w(m)},S=m=>{const k=p=>{var F;const U=new Set((F=e.get(p))==null?void 0:F.t);return n.forEach((D,T)=>{var B;(B=a(T))!=null&&B.d.has(p)&&U.add(T)}),U},_=new Array,h=new Set,b=p=>{if(!h.has(p)){h.add(p);for(const F of k(p))p!==F&&b(F);_.push(p)}};b(m);const A=new Set([m]);for(let p=_.length-1;p>=0;--p){const F=_[p],U=a(F);if(!U)continue;let D=!1;for(const T of U.d.keys())if(T!==F&&A.has(T)){D=!0;break}if(D){const T=f(F,!0);$e(U,T)||A.add(F)}}},y=(m,...k)=>{let _=!0;const h=p=>ut(f(p)),b=(p,...F)=>{let U;if(Ht(m,p)){if(!qt(p))throw new Error("atom not writable");const D=a(p),T=u(p,F[0]);$e(D,T)||S(p)}else U=y(p,...F);if(!_){const D=I();(K?"production":void 0)!=="production"&&i.forEach(T=>T({type:"async-write",flushed:D}))}return U},A=m.write(h,b,...k);return _=!1,A},R=(m,...k)=>{const _=y(m,...k),h=I();return(K?"production":void 0)!=="production"&&i.forEach(b=>b({type:"write",flushed:h})),_},P=(m,k,_)=>{var h;const b=_||[];(h=a(m))==null||h.d.forEach((p,F)=>{const U=e.get(F);U?U.t.add(m):F!==m&&P(F,m,b)}),f(m);const A={t:new Set(k&&[k]),l:new Set};if(e.set(m,A),(K?"production":void 0)!=="production"&&r.add(m),Wt(m)&&m.onMount){const{onMount:p}=m;b.push(()=>{const F=p((...U)=>R(m,...U));F&&(A.u=F)})}return _||b.forEach(p=>p()),A},w=m=>{var k;const _=(k=e.get(m))==null?void 0:k.u;_&&_(),e.delete(m),(K?"production":void 0)!=="production"&&r.delete(m);const h=a(m);h?(Oe(h)&&Bn(h.v),h.d.forEach((b,A)=>{if(A!==m){const p=e.get(A);p&&(p.t.delete(m),O(A,p)&&w(A))}})):(K?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},x=(m,k,_)=>{const h=new Set(k.d.keys()),b=new Set;_==null||_.forEach((A,p)=>{if(h.has(p)){h.delete(p);return}b.add(p);const F=e.get(p);F&&F.t.delete(m)}),h.forEach(A=>{const p=e.get(A);p?p.t.add(m):e.has(m)&&P(A,m)}),b.forEach(A=>{const p=e.get(A);p&&O(A,p)&&w(A)})},I=()=>{let m;for((K?"production":void 0)!=="production"&&(m=new Set);n.size;){const k=Array.from(n);n.clear(),k.forEach(([_,h])=>{const b=a(_);if(b){const A=e.get(_);A&&b.d!==(h==null?void 0:h.d)&&x(_,b,h==null?void 0:h.d),A&&!(!Oe(h)&&($e(h,b)||Gn(h,b)))&&(A.l.forEach(p=>p()),(K?"production":void 0)!=="production"&&m.add(_))}else(K?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((K?"production":void 0)!=="production")return m},j=(m,k)=>{const _=N(m),h=I(),b=_.l;return b.add(k),(K?"production":void 0)!=="production"&&i.forEach(A=>A({type:"sub",flushed:h})),()=>{b.delete(k),g(m),(K?"production":void 0)!=="production"&&i.forEach(A=>A({type:"unsub"}))}};return(K?"production":void 0)!=="production"?{get:c,set:R,sub:j,dev_subscribe_store:(m,k)=>{if(k!==2)throw new Error("The current StoreListener revision is 2.");return i.add(m),()=>{i.delete(m)}},dev_get_mounted_atoms:()=>r.values(),dev_get_atom_state:m=>t.get(m),dev_get_mounted:m=>e.get(m),dev_restore_atoms:m=>{for(const[_,h]of m)qt(_)&&(u(_,h),S(_));const k=I();i.forEach(_=>_({type:"restore",flushed:k}))}}:{get:c,set:R,sub:j}};let Jt;(K?"production":void 0)!=="production"&&(typeof globalThis.__NUMBER_OF_JOTAI_INSTANCES__=="number"?++globalThis.__NUMBER_OF_JOTAI_INSTANCES__:globalThis.__NUMBER_OF_JOTAI_INSTANCES__=1);const Pa=()=>(Jt||((K?"production":void 0)!=="production"&&globalThis.__NUMBER_OF_JOTAI_INSTANCES__!==1&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"),Jt=Di()),Jt);var Ia={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Va=$.createContext(void 0),Li=t=>{const e=$.useContext(Va);return(t==null?void 0:t.store)||e||Pa()},ja=t=>typeof(t==null?void 0:t.then)=="function",Ua=$.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 Ma(t,e){const n=Li(e),[[i,r,a],s]=$.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;(r!==n||a!==t)&&(s(),o=n.get(t));const l=e==null?void 0:e.delay;return $.useEffect(()=>{const u=n.sub(t,()=>{if(typeof l=="number"){setTimeout(s,l);return}s()});return s(),u},[n,t,l]),$.useDebugValue(o),ja(o)?Ua(o):o}function $a(t,e){const n=Li(e);return $.useCallback((...r)=>{if((Ia?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...r)},[n,t])}function Ba(t,e){return[Ma(t,e),$a(t,e)]}const Lt=Ca(null);Lt.debugLabel="accountAtom";var za={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{NZ_AWS_REGION:Ka,NZ_BACKOFFICE_BACK_URL:Ga,NZ_CORE_SERVICES_GRAPHQL_URL:Qa,NZ_CORE_SERVICES_REST_URL:Ha}=za,qa={AWS:{region:Ka,cognito:{userPoolId:"us-east-1_EZ7wuZ4ig",userPoolWebClientId:"2jok7cst8ebf6ppscrhji57gvr"}},apiUrls:{restV1:Ga||"https://b133h34s56.execute-api.us-east-1.amazonaws.com",restV2:Ha||"https://core-services-prod.nizza.com/api",graphql:Qa||"https://core-services-prod.nizza.com/graphql",corsProxy:"https://3hvqfl2xcg.execute-api.us-east-1.amazonaws.com"},publicUrls:{platformSite:"https://platform.nizza.com",nizzaCdn:"https://cdn.nizza.com",bundleSite:"https://bundle.nizza.com",wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};function Wa(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=>(...f)=>{if(!n)return;const c=n[d];if(typeof c=="function")return c.apply(n,f)};return n&&r(n,o)?u(o):n?n[o]:void 0}};return new Proxy({},a)}async function Nn(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 f;const c=fetch(e,{method:n,headers:l,body:i,signal:d,...o});s&&(f=setTimeout(()=>{u.abort()},s));const N=await c;if(r)return N;const O=await N.json();if(clearTimeout(f),!N.ok){const g=O?JSON.stringify(O):N.statusText;throw new Error(g)}return O}catch(u){throw console.error("[CustomFetch] ",u),u}}const Ja=t=>Nn({...t,contentTypeJson:!1,raw:!1});function Za(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Pi(i,`${t}.${n}`))}const Pi=(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)};function L(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 Xa={};function On(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:Xa}var Ii=Object.assign,yt=Object.getOwnPropertyDescriptor,ae=Object.defineProperty,Pt=Object.prototype,sn=[];Object.freeze(sn);var Vi={};Object.freeze(Vi);var Ya=typeof Proxy!="undefined",es=Object.toString();function ji(){Ya||L("Proxy not available")}function Ui(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var Ce=function(){};function te(t){return typeof t=="function"}function ve(t){var e=typeof t;switch(e){case"string":case"symbol":case"number":return!0}return!1}function It(t){return t!==null&&typeof t=="object"}function me(t){if(!It(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()===es}function Mi(t){var e=t==null?void 0:t.constructor;return e?e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction":!1}function Vt(t,e,n){ae(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function $i(t,e,n){ae(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function be(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return It(i)&&i[n]===!0}}function Pe(t){return t instanceof Map}function nt(t){return t instanceof Set}var Bi=typeof Object.getOwnPropertySymbols!="undefined";function ts(t){var e=Object.keys(t);if(!Bi)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter(function(i){return Pt.propertyIsEnumerable.call(t,i)})):e}var jt=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Bi?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function zi(t){return t===null?null:typeof t=="object"?""+t:t}function ue(t,e){return Pt.hasOwnProperty.call(t,e)}var ns=Object.getOwnPropertyDescriptors||function(e){var n={};return jt(e).forEach(function(i){n[i]=yt(e,i)}),n};function Qn(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,as(i.key),i)}}function wn(t,e,n){return e&&Qn(t.prototype,e),n&&Qn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function ge(){return ge=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},ge.apply(this,arguments)}function Ki(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,on(t,e)}function on(t,e){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,r){return i.__proto__=r,i},on(t,e)}function Zt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function is(t,e){if(t){if(typeof t=="string")return Hn(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 Hn(t,e)}}function Hn(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 xe(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=is(t))||e&&t&&typeof t.length=="number"){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 rs(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||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function as(t){var e=rs(t,"string");return typeof e=="symbol"?e:String(e)}var ie=Symbol("mobx-stored-annotations");function se(t){function e(n,i){if(it(i))return t.decorate_20223_(n,i);Ie(n,i,t)}return Object.assign(e,t)}function Ie(t,e,n){ue(t,ie)||Vt(t,ie,ge({},t[ie])),hs(n)||(t[ie][e]=n)}function ss(t){return ue(t,ie)||Vt(t,ie,ge({},t[ie])),t[ie]}function it(t){return typeof t=="object"&&typeof t.kind=="string"}var E=Symbol("mobx administration"),rt=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_=V.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 lr(this)},e.reportChanged=function(){W(),ur(this),J()},e.toString=function(){return this.name_},t}(),An=be("Atom",rt);function Gi(t,e,n){e===void 0&&(e=Ce),n===void 0&&(n=Ce);var i=new rt(t);return e!==Ce&&yo(i,e),n!==Ce&&hr(i,n),i}function os(t,e){return t===e}function ls(t,e){return Dn(t,e)}function us(t,e){return Dn(t,e,1)}function ds(t,e){return Object.is?Object.is(t,e):t===e?t!==0||1/t===1/e:t!==t&&e!==e}var bt={identity:os,structural:ls,default:ds,shallow:us};function ke(t,e,n){return kr(t)?t:Array.isArray(t)?z.array(t,{name:n}):me(t)?z.object(t,void 0,{name:n}):Pe(t)?z.map(t,{name:n}):nt(t)?z.set(t,{name:n}):typeof t=="function"&&!Bt(t)&&!Ze(t)?Mi(t)?Re(t):Je(n,t):t}function cs(t,e,n){if(t==null||Xe(t)||zt(t)||_e(t)||Ve(t))return t;if(Array.isArray(t))return z.array(t,{name:n,deep:!1});if(me(t))return z.object(t,void 0,{name:n,deep:!1});if(Pe(t))return z.map(t,{name:n,deep:!1});if(nt(t))return z.set(t,{name:n,deep:!1})}function Ut(t){return t}function fs(t,e){return Dn(t,e)?e:t}var ms="override";function hs(t){return t.annotationType_===ms}function at(t,e){return{annotationType_:t,options_:e,make_:ps,extend_:vs,decorate_20223_:gs}}function ps(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(Bt(n.value))return 1;var a=Qi(t,this,e,n,!1);return ae(i,e,a),2}function vs(t,e,n,i){var r=Qi(t,this,e,n);return t.defineProperty_(e,r,i)}function gs(t,e){var n=e.kind,i=e.name,r=e.addInitializer,a=this,s=function(u){var d,f,c,N;return ye((d=(f=a.options_)==null?void 0:f.name)!=null?d:i.toString(),u,(c=(N=a.options_)==null?void 0:N.autoAction)!=null?c:!1)};if(n=="field"){r(function(){Ie(this,i,a)});return}if(n=="method"){var o;return Bt(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}L("Cannot apply '"+a.annotationType_+"' to '"+String(i)+"' (kind: "+n+"):"+(`
3
- '`+a.annotationType_+"' can only be used on properties with a function value."))}function ks(t,e,n,i){e.annotationType_,i.value}function Qi(t,e,n,i,r){var a,s,o,l,u,d,f;r===void 0&&(r=v.safeDescriptors),ks(t,e,n,i);var c=i.value;if((a=e.options_)!=null&&a.bound){var N;c=c.bind((N=t.proxy_)!=null?N:t.target_)}return{value:ye((s=(o=e.options_)==null?void 0:o.name)!=null?s:n.toString(),c,(l=(u=e.options_)==null?void 0:u.autoAction)!=null?l:!1,(d=e.options_)!=null&&d.bound?(f=t.proxy_)!=null?f:t.target_:void 0),configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function Hi(t,e){return{annotationType_:t,options_:e,make_:ys,extend_:bs,decorate_20223_:Ss}}function ys(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&&(!ue(t.target_,e)||!Ze(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(Ze(n.value))return 1;var a=qi(t,this,e,n,!1,!1);return ae(i,e,a),2}function bs(t,e,n,i){var r,a=qi(t,this,e,n,(r=this.options_)==null?void 0:r.bound);return t.defineProperty_(e,a,i)}function Ss(t,e){var n,i=e.name,r=e.addInitializer;return Ze(t)||(t=Re(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 _s(t,e,n,i){e.annotationType_,i.value}function qi(t,e,n,i,r,a){a===void 0&&(a=v.safeDescriptors),_s(t,e,n,i);var s=i.value;if(Ze(s)||(s=Re(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 Fn(t,e){return{annotationType_:t,options_:e,make_:Ns,extend_:Os,decorate_20223_:ws}}function Ns(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Os(t,e,n,i){return As(t,this,e,n),t.defineComputedProperty_(e,ge({},this.options_,{get:n.get,set:n.set}),i)}function ws(t,e){var n=this,i=e.name,r=e.addInitializer;return r(function(){var a=je(this)[E],s=ge({},n.options_,{get:t,context:this});s.name||(s.name="ObservableObject."+i.toString()),a.values_.set(i,new Te(s))}),function(){return this[E].getObservablePropValue_(i)}}function As(t,e,n,i){e.annotationType_,i.get}function Mt(t,e){return{annotationType_:t,options_:e,make_:Fs,extend_:Es,decorate_20223_:Cs}}function Fs(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Es(t,e,n,i){var r,a;return xs(t,this),t.defineObservableProperty_(e,n.value,(r=(a=this.options_)==null?void 0:a.enhancer)!=null?r:ke,i)}function Cs(t,e){var n=this,i=e.kind,r=e.name,a=new WeakSet;function s(o,l){var u,d,f=je(o)[E],c=new pe(l,(u=(d=n.options_)==null?void 0:d.enhancer)!=null?u:ke,"ObservableObject."+r.toString(),!1);f.values_.set(r,c),a.add(o)}if(i=="accessor")return{get:function(){return a.has(this)||s(this,t.get.call(this)),this[E].getObservablePropValue_(r)},set:function(l){return a.has(this)||s(this,l),this[E].setObservablePropValue_(r,l)},init:function(l){return a.has(this)||s(this,l),l}}}function xs(t,e,n,i){e.annotationType_}var Ts="true",Rs=Wi();function Wi(t){return{annotationType_:Ts,options_:t,make_:Ds,extend_:Ls,decorate_20223_:Ps}}function Ds(t,e,n,i){var r,a;if(n.get)return he.make_(t,e,n,i);if(n.set){var s=ye(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:v.safeDescriptors?t.isPlainObject_:!0,set:s})===null?0:2:(ae(i,e,{configurable:!0,set:s}),2)}if(i!==t.target_&&typeof n.value=="function"){var o;if(Mi(n.value)){var l,u=(l=this.options_)!=null&&l.autoBind?Re.bound:Re;return u.make_(t,e,n,i)}var d=(o=this.options_)!=null&&o.autoBind?Je.bound:Je;return d.make_(t,e,n,i)}var f=((r=this.options_)==null?void 0:r.deep)===!1?z.ref:z;if(typeof n.value=="function"&&(a=this.options_)!=null&&a.autoBind){var c;n.value=n.value.bind((c=t.proxy_)!=null?c:t.target_)}return f.make_(t,e,n,i)}function Ls(t,e,n,i){var r,a;if(n.get)return he.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:v.safeDescriptors?t.isPlainObject_:!0,set:ye(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?z.ref:z;return o.extend_(t,e,n,i)}function Ps(t,e){L("'"+this.annotationType_+"' cannot be used as a decorator")}var Is="observable",Vs="observable.ref",js="observable.shallow",Us="observable.struct",Ji={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(Ji);function dt(t){return t||Ji}var ln=Mt(Is),Ms=Mt(Vs,{enhancer:Ut}),$s=Mt(js,{enhancer:cs}),Bs=Mt(Us,{enhancer:fs}),Zi=se(ln);function ct(t){return t.deep===!0?ke:t.deep===!1?Ut:Ks(t.defaultDecorator)}function zs(t){var e;return t?(e=t.defaultDecorator)!=null?e:Wi(t):void 0}function Ks(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:ke}function Xi(t,e,n){if(it(e))return ln.decorate_20223_(t,e);if(ve(e)){Ie(t,e,ln);return}return kr(t)?t:me(t)?z.object(t,e,n):Array.isArray(t)?z.array(t,e):Pe(t)?z.map(t,e):nt(t)?z.set(t,e):typeof t=="object"&&t!==null?t:z.box(t,e)}Ii(Xi,Zi);var Gs={box:function(e,n){var i=dt(n);return new pe(e,ct(i),i.name,!0,i.equals)},array:function(e,n){var i=dt(n);return(v.useProxies===!1||i.proxy===!1?zo:Do)(e,ct(i),i.name)},map:function(e,n){var i=dt(n);return new Nr(e,ct(i),i.name)},set:function(e,n){var i=dt(n);return new Ar(e,ct(i),i.name)},object:function(e,n,i){return Ne(function(){return No(v.useProxies===!1||(i==null?void 0:i.proxy)===!1?je({},i):xo({},i),e,n)})},ref:se(Ms),shallow:se($s),deep:Zi,struct:se(Bs)},z=Ii(Xi,Gs),Yi="computed",Qs="computed.struct",un=Fn(Yi),Hs=Fn(Qs,{equals:bt.structural}),he=function(e,n){if(it(n))return un.decorate_20223_(e,n);if(ve(n))return Ie(e,n,un);if(me(e))return se(Fn(Yi,e));var i=me(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new Te(i)};Object.assign(he,un);he.struct=se(Hs);var qn,Wn,St=0,qs=1,Ws=(qn=(Wn=yt(function(){},"name"))==null?void 0:Wn.configurable)!=null?qn:!1,Jn={value:"action",configurable:!0,writable:!1,enumerable:!1};function ye(t,e,n,i){n===void 0&&(n=!1);function r(){return Js(t,n,e,i||this,arguments)}return r.isMobxAction=!0,r.toString=function(){return e.toString()},Ws&&(Jn.value=t,ae(r,"name",Jn)),r}function Js(t,e,n,i,r){var a=Zs(t,e);try{return n.apply(i,r)}catch(s){throw a.error_=s,s}finally{Xs(a)}}function Zs(t,e,n,i){var r=!1,a=0,s=v.trackingDerivation,o=!e||!s;W();var l=v.allowStateChanges;o&&(Se(),l=En(!0));var u=xn(!0),d={runAsAction_:o,prevDerivation_:s,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:r,startTime_:a,actionId_:qs++,parentActionId_:St};return St=d.actionId_,d}function Xs(t){St!==t.actionId_&&L(30),St=t.parentActionId_,t.error_!==void 0&&(v.suppressReactionErrors=!0),Cn(t.prevAllowStateChanges_),Qe(t.prevAllowStateReads_),J(),t.runAsAction_&&de(t.prevDerivation_),v.suppressReactionErrors=!1}function En(t){var e=v.allowStateChanges;return v.allowStateChanges=t,e}function Cn(t){v.allowStateChanges=t}var er;er=Symbol.toPrimitive;var pe=function(t){Ki(e,t);function e(i,r,a,s,o){var l;return a===void 0&&(a="ObservableValue"),o===void 0&&(o=bt.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!==v.UNCHANGED&&this.setNewValue_(r)},n.prepareNewValue_=function(r){if(H(this)){var a=q(this,{object:this,type:oe,newValue:r});if(!a)return v.UNCHANGED;r=a.newValue}return r=this.enhancer(r,this.value_,this.name_),this.equals(this.value_,r)?v.UNCHANGED:r},n.setNewValue_=function(r){var a=this.value_;this.value_=r,this.reportChanged(),Y(this)&&ee(this,{type:oe,object:this,newValue:r,oldValue:a})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(r){return st(this,r)},n.observe_=function(r,a){return a&&r({observableKind:"value",debugObjectName:this.name_,object:this,type:oe,newValue:this.value_,oldValue:void 0}),ot(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 zi(this.get())},n[er]=function(){return this.valueOf()},e}(rt),tr;tr=Symbol.toPrimitive;var Te=function(){function t(n){this.dependenciesState_=V.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_=V.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Nt(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_=_t.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||L(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=ye("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?bt.structural:bt.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){io(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_&&L(32,this.name_,this.derivation),v.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)dn(this)&&(this.warnAboutUntrackedRead_(),W(),this.value_=this.computeValue_(!1),J());else if(lr(this),dn(this)){var i=v.trackingContext;this.keepAlive_&&!i&&(v.trackingContext=this),this.trackAndCompute()&&no(this),v.trackingContext=i}var r=this.value_;if(ht(r))throw r.cause;return r},e.set=function(i){if(this.setter_){this.isRunningSetter_&&L(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter_=!1}}else L(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,r=this.dependenciesState_===V.NOT_TRACKING_,a=this.computeValue_(!0),s=r||ht(i)||ht(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=nr(this,this.derivation,this.scope_);else if(v.disableErrorBoundaries===!0)a=this.derivation.call(this.scope_);else try{a=this.derivation.call(this.scope_)}catch(s){a=new Nt(s)}return Cn(r),this.isComputing_=!1,a},e.suspend_=function(){this.keepAlive_||(cn(this),this.value_=void 0)},e.observe_=function(i,r){var a=this,s=!0,o=void 0;return ho(function(){var l=a.get();if(!s||r){var u=Se();i({observableKind:"computed",debugObjectName:a.name_,type:oe,object:a,newValue:l,oldValue:o}),de(u)}s=!1,o=l})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return zi(this.get())},e[tr]=function(){return this.valueOf()},t}(),$t=be("ComputedValue",Te),V;(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_"})(V||(V={}));var _t;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(_t||(_t={}));var Nt=function(e){this.cause=void 0,this.cause=e};function ht(t){return t instanceof Nt}function dn(t){switch(t.dependenciesState_){case V.UP_TO_DATE_:return!1;case V.NOT_TRACKING_:case V.STALE_:return!0;case V.POSSIBLY_STALE_:{for(var e=xn(!0),n=Se(),i=t.observing_,r=i.length,a=0;a<r;a++){var s=i[a];if($t(s)){if(v.disableErrorBoundaries)s.get();else try{s.get()}catch{return de(n),Qe(e),!0}if(t.dependenciesState_===V.STALE_)return de(n),Qe(e),!0}}return rr(t),de(n),Qe(e),!1}}}function nr(t,e,n){var i=xn(!0);rr(t),t.newObserving_=new Array(t.observing_.length+100),t.unboundDepsCount_=0,t.runId_=++v.runId;var r=v.trackingDerivation;v.trackingDerivation=t,v.inBatch++;var a;if(v.disableErrorBoundaries===!0)a=e.call(n);else try{a=e.call(n)}catch(s){a=new Nt(s)}return v.inBatch--,v.trackingDerivation=r,Ys(t),Qe(i),a}function Ys(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=V.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&&sr(l,t),l.diffValue_=0}for(;r--;){var u=n[r];u.diffValue_===1&&(u.diffValue_=0,to(u,t))}i!==V.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function cn(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)sr(e[n],t);t.dependenciesState_=V.NOT_TRACKING_}function ir(t){var e=Se();try{return t()}finally{de(e)}}function Se(){var t=v.trackingDerivation;return v.trackingDerivation=null,t}function de(t){v.trackingDerivation=t}function xn(t){var e=v.allowStateReads;return v.allowStateReads=t,e}function Qe(t){v.allowStateReads=t}function rr(t){if(t.dependenciesState_!==V.UP_TO_DATE_){t.dependenciesState_=V.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=V.UP_TO_DATE_}}var pt=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},vt=!0,ar=!1,v=function(){var t=On();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(vt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new pt().version&&(vt=!1),vt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new pt):(setTimeout(function(){ar||L(35)},1),new pt)}();function eo(){if((v.pendingReactions.length||v.inBatch||v.isRunningReactions)&&L(36),ar=!0,vt){var t=On();--t.__mobxInstanceCount===0&&(t.__mobxGlobals=void 0),v=new pt}}function to(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function sr(t,e){t.observers_.delete(e),t.observers_.size===0&&or(t)}function or(t){t.isPendingUnobservation_===!1&&(t.isPendingUnobservation_=!0,v.pendingUnobservations.push(t))}function W(){v.inBatch++}function J(){if(--v.inBatch===0){dr();for(var t=v.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 Te&&n.suspend_())}v.pendingUnobservations=[]}}function lr(t){var e=v.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved_&&v.trackingContext&&(t.isBeingObserved_=!0,t.onBO())),t.isBeingObserved_):(t.observers_.size===0&&v.inBatch>0&&or(t),!1)}function ur(t){t.lowestObserverState_!==V.STALE_&&(t.lowestObserverState_=V.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===V.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=V.STALE_}))}function no(t){t.lowestObserverState_!==V.STALE_&&(t.lowestObserverState_=V.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===V.POSSIBLY_STALE_?e.dependenciesState_=V.STALE_:e.dependenciesState_===V.UP_TO_DATE_&&(t.lowestObserverState_=V.UP_TO_DATE_)}))}function io(t){t.lowestObserverState_===V.UP_TO_DATE_&&(t.lowestObserverState_=V.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===V.UP_TO_DATE_&&(e.dependenciesState_=V.POSSIBLY_STALE_,e.onBecomeStale_())}))}var We=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_=V.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_=_t.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,v.pendingReactions.push(this),dr())},e.isScheduled=function(){return this.isScheduled_},e.runReaction_=function(){if(!this.isDisposed_){W(),this.isScheduled_=!1;var i=v.trackingContext;if(v.trackingContext=this,dn(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(r){this.reportExceptionInDerivation_(r)}}v.trackingContext=i,J()}},e.track=function(i){if(!this.isDisposed_){W(),this.isRunning_=!0;var r=v.trackingContext;v.trackingContext=this;var a=nr(this,i,void 0);v.trackingContext=r,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&cn(this),ht(a)&&this.reportExceptionInDerivation_(a.cause),J()}},e.reportExceptionInDerivation_=function(i){var r=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(v.disableErrorBoundaries)throw i;var a="[mobx] uncaught error in '"+this+"'";v.suppressReactionErrors||console.error(a,i),v.globalReactionErrorHandlers.forEach(function(s){return s(i,r)})},e.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(W(),cn(this),J()))},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[E]=this,a},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},t}(),ro=100,fn=function(e){return e()};function dr(){v.inBatch>0||v.isRunningReactions||fn(ao)}function ao(){v.isRunningReactions=!0;for(var t=v.pendingReactions,e=0;t.length>0;){++e===ro&&(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_()}v.isRunningReactions=!1}var Ot=be("Reaction",We);function so(t){var e=fn;fn=function(i){return t(function(){return e(i)})}}function He(){return!1}function oo(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var cr="action",lo="action.bound",fr="autoAction",uo="autoAction.bound",co="<unnamed action>",mn=at(cr),fo=at(lo,{bound:!0}),hn=at(fr,{autoAction:!0}),mo=at(uo,{autoAction:!0,bound:!0});function mr(t){var e=function(i,r){if(te(i))return ye(i.name||co,i,t);if(te(r))return ye(i,r,t);if(it(r))return(t?hn:mn).decorate_20223_(i,r);if(ve(r))return Ie(i,r,t?hn:mn);if(ve(i))return se(at(t?fr:cr,{name:i,autoAction:t}))};return e}var ce=mr(!1);Object.assign(ce,mn);var Je=mr(!0);Object.assign(Je,hn);ce.bound=se(fo);Je.bound=se(mo);function Bt(t){return te(t)&&t.isMobxAction===!0}function ho(t,e){var n,i,r,a,s;e===void 0&&(e=Vi);var o=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",l=!e.scheduler&&!e.delay,u;if(l)u=new We(o,function(){this.track(c)},e.onError,e.requiresObservable);else{var d=vo(e),f=!1;u=new We(o,function(){f||(f=!0,d(function(){f=!1,u.isDisposed_||u.track(c)}))},e.onError,e.requiresObservable)}function c(){t(u)}return(r=e)!=null&&(a=r.signal)!=null&&a.aborted||u.schedule_(),u.getDisposer_((s=e)==null?void 0:s.signal)}var po=function(e){return e()};function vo(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:po}var go="onBO",ko="onBUO";function yo(t,e,n){return pr(go,t,e,n)}function hr(t,e,n){return pr(ko,t,e,n)}function pr(t,e,n,i){var r=typeof i=="function"?De(e,n):De(e),a=te(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 bo="never",ft="always",So="observed";function _o(t){t.isolateGlobalState===!0&&eo();var e=t.useProxies,n=t.enforceActions;if(e!==void 0&&(v.useProxies=e===ft?!0:e===bo?!1:typeof Proxy!="undefined"),e==="ifavailable"&&(v.verifyProxies=!0),n!==void 0){var i=n===ft?ft:n===So;v.enforceActions=i,v.allowStateChanges=!(i===!0||i===ft)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(r){r in t&&(v[r]=!!t[r])}),v.allowStateReads=!v.observableRequiresReaction,t.reactionScheduler&&so(t.reactionScheduler)}function No(t,e,n,i){var r=ns(e);return Ne(function(){var a=je(t,i)[E];jt(r).forEach(function(s){a.extend_(s,r[s],n&&s in n?n[s]:!0)})}),t}function Oo(t,e){return vr(De(t,e))}function vr(t){var e={name:t.name_};return t.observing_&&t.observing_.length>0&&(e.dependencies=wo(t.observing_).map(vr)),e}function wo(t){return Array.from(new Set(t))}var Ao=0;function gr(){this.message="FLOW_CANCELLED"}gr.prototype=Object.create(Error.prototype);var Xt=Hi("flow"),Fo=Hi("flow.bound",{bound:!0}),Re=Object.assign(function(e,n){if(it(n))return Xt.decorate_20223_(e,n);if(ve(n))return Ie(e,n,Xt);var i=e,r=i.name||"<unnamed flow>",a=function(){var o=this,l=arguments,u=++Ao,d=ce(r+" - runid: "+u+" - init",i).apply(o,l),f,c=void 0,N=new Promise(function(O,g){var S=0;f=g;function y(w){c=void 0;var x;try{x=ce(r+" - runid: "+u+" - yield "+S++,d.next).call(d,w)}catch(I){return g(I)}P(x)}function R(w){c=void 0;var x;try{x=ce(r+" - runid: "+u+" - yield "+S++,d.throw).call(d,w)}catch(I){return g(I)}P(x)}function P(w){if(te(w==null?void 0:w.then)){w.then(P,g);return}return w.done?O(w.value):(c=Promise.resolve(w.value),c.then(y,R))}y(void 0)});return N.cancel=ce(r+" - runid: "+u+" - cancel",function(){try{c&&Zn(c);var O=d.return(void 0),g=Promise.resolve(O.value);g.then(Ce,Ce),Zn(g),f(new gr)}catch(S){f(S)}}),N};return a.isMobXFlow=!0,a},Xt);Re.bound=se(Fo);function Zn(t){te(t.cancel)&&t.cancel()}function Ze(t){return(t==null?void 0:t.isMobXFlow)===!0}function Eo(t,e){return t?e!==void 0?Xe(t)?t[E].values_.has(e):!1:Xe(t)||!!t[E]||An(t)||Ot(t)||$t(t):!1}function kr(t){return Eo(t)}function le(t,e){e===void 0&&(e=void 0),W();try{return t.apply(e)}finally{J()}}function we(t){return t[E]}var Co={has:function(e,n){return we(e).has_(n)},get:function(e,n){return we(e).get_(n)},set:function(e,n,i){var r;return ve(n)?(r=we(e).set_(n,i,!0))!=null?r:!0:!1},deleteProperty:function(e,n){var i;return ve(n)?(i=we(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var r;return(r=we(e).defineProperty_(n,i))!=null?r:!0},ownKeys:function(e){return we(e).ownKeys_()},preventExtensions:function(e){L(13)}};function xo(t,e){var n,i;return ji(),t=je(t,e),(i=(n=t[E]).proxy_)!=null?i:n.proxy_=new Proxy(t,Co)}function H(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function st(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),Ui(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function q(t,e){var n=Se();try{for(var i=[].concat(t.interceptors_||[]),r=0,a=i.length;r<a&&(e=i[r](e),e&&!e.type&&L(14),!!e);r++);return e}finally{de(n)}}function Y(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function ot(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),Ui(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function ee(t,e){var n=Se(),i=t.changeListeners_;if(i){i=i.slice();for(var r=0,a=i.length;r<a;r++)i[r](e);de(n)}}function yr(t,e,n){return Ne(function(){var i,r=je(t,n)[E];(i=e)!=null||(e=ss(t)),jt(e).forEach(function(a){return r.make_(a,e[a])})}),t}var Xn="splice",oe="update",To=1e4,Ro={get:function(e,n){var i=e[E];return n===E?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):ue(wt,n)?wt[n]:e[n]},set:function(e,n,i){var r=e[E];return n==="length"&&r.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:r.set_(parseInt(n),i),!0},preventExtensions:function(){L(15)}},Tn=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 rt(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 st(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}),ot(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&L("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_&&L(16),this.lastKnownLength_+=r,this.legacyMode_&&r>0&&xr(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=sn),H(this)){var l=q(this,{object:this.proxy_,type:Xn,index:i,removedCount:r,added:a});if(!l)return sn;r=l.removedCount,a=l.added}if(a=a.length===0?a:a.map(function(f){return s.enhancer_(f,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<To){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_&&He(),o=Y(this),l=o||s?{observableKind:"array",object:this.proxy_,type:oe,debugObjectName:this.atom_.name_,index:i,newValue:r,oldValue:a}:null;this.atom_.reportChanged(),o&&ee(this,l)},e.notifyArraySplice_=function(i,r,a){var s=!this.owned_&&He(),o=Y(this),l=o||s?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Xn,index:i,removed:a,added:r,removedCount:a.length,addedCount:r.length}:null;this.atom_.reportChanged(),o&&ee(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&&L(17,i,a.length),i<a.length){this.atom_;var s=a[i];if(H(this)){var o=q(this,{type:oe,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 Do(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),ji(),Ne(function(){var r=new Tn(n,e,i,!1);$i(r.values_,E,r);var a=new Proxy(r.values_,Ro);return r.proxy_=a,t&&t.length&&r.spliceWithArray_(0,0,t),a})}var wt={clear:function(){return this.splice(0)},replace:function(e){var n=this[E];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[E];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[E].spliceWithArray_(e,n,i)},push:function(){for(var e=this[E],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[E].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[E],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 v.trackingDerivation&&L(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){v.trackingDerivation&&L(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[E],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};M("at",Q);M("concat",Q);M("flat",Q);M("includes",Q);M("indexOf",Q);M("join",Q);M("lastIndexOf",Q);M("slice",Q);M("toString",Q);M("toLocaleString",Q);M("toSorted",Q);M("toSpliced",Q);M("with",Q);M("every",ne);M("filter",ne);M("find",ne);M("findIndex",ne);M("findLast",ne);M("findLastIndex",ne);M("flatMap",ne);M("forEach",ne);M("map",ne);M("some",ne);M("toReversed",ne);M("reduce",br);M("reduceRight",br);function M(t,e){typeof Array.prototype[t]=="function"&&(wt[t]=e(t))}function Q(t){return function(){var e=this[E];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function ne(t){return function(e,n){var i=this,r=this[E];r.atom_.reportObserved();var a=r.dehanceValues_(r.values_);return a[t](function(s,o){return e.call(n,s,o,i)})}}function br(t){return function(){var e=this,n=this[E];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 Lo=be("ObservableArrayAdministration",Tn);function zt(t){return It(t)&&Lo(t[E])}var Sr,_r,Po={},fe="add",At="delete";Sr=Symbol.iterator;_r=Symbol.toStringTag;var Nr=function(){function t(n,i,r){var a=this;i===void 0&&(i=ke),r===void 0&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[E]=Po,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,te(Map)||L(18),Ne(function(){a.keysAtom_=Gi("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(!v.trackingDerivation)return this.has_(i);var a=this.hasMap_.get(i);if(!a){var s=a=new pe(this.has_(i),Ut,"ObservableMap.key?",!1);this.hasMap_.set(i,s),hr(s,function(){return r.hasMap_.delete(i)})}return a.get()},e.set=function(i,r){var a=this.has_(i);if(H(this)){var s=q(this,{type:a?oe:fe,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_,H(this)){var a=q(this,{type:At,object:this,name:i});if(!a)return!1}if(this.has_(i)){var s=He(),o=Y(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:At,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return le(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&&ee(this,l),!0}return!1},e.updateValue_=function(i,r){var a=this.data_.get(i);if(r=a.prepareNewValue_(r),r!==v.UNCHANGED){var s=He(),o=Y(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:oe,object:this,oldValue:a.value_,name:i,newValue:r}:null;a.setNewValue_(r),o&&ee(this,l)}},e.addValue_=function(i,r){var a=this;this.keysAtom_,le(function(){var u,d=new pe(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=He(),o=Y(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:fe,object:this,name:i,newValue:r}:null;o&&ee(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 Ye({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 Ye({next:function(){var s=r.next(),o=s.done,l=s.value;return{done:o,value:o?void 0:[l,i.get(l)]}}})},e[Sr]=function(){return this.entries()},e.forEach=function(i,r){for(var a=xe(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 _e(i)&&(i=new Map(i)),le(function(){me(i)?ts(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)}):Pe(i)?(i.constructor!==Map&&L(19,i),i.forEach(function(a,s){return r.set(s,a)})):i!=null&&L(20,i)}),this},e.clear=function(){var i=this;le(function(){ir(function(){for(var r=xe(i.keys()),a;!(a=r()).done;){var s=a.value;i.delete(s)}})})},e.replace=function(i){var r=this;return le(function(){for(var a=Io(i),s=new Map,o=!1,l=xe(r.data_.keys()),u;!(u=l()).done;){var d=u.value;if(!a.has(d)){var f=r.delete(d);if(f)o=!0;else{var c=r.data_.get(d);s.set(d,c)}}}for(var N=xe(a.entries()),O;!(O=N()).done;){var g=O.value,S=g[0],y=g[1],R=r.data_.has(S);if(r.set(S,y),r.data_.has(S)){var P=r.data_.get(S);s.set(S,P),R||(o=!0)}}if(!o)if(r.data_.size!==s.size)r.keysAtom_.reportChanged();else for(var w=r.data_.keys(),x=s.keys(),I=w.next(),j=x.next();!I.done;){if(I.value!==j.value){r.keysAtom_.reportChanged();break}I=w.next(),j=x.next()}r.data_=s}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,r){return ot(this,i)},e.intercept_=function(i){return st(this,i)},wn(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:_r,get:function(){return"Map"}}]),t}(),_e=be("ObservableMap",Nr);function Io(t){if(Pe(t)||_e(t))return t;if(Array.isArray(t))return new Map(t);if(me(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return L(21,t)}var Or,wr,Vo={};Or=Symbol.iterator;wr=Symbol.toStringTag;var Ar=function(){function t(n,i,r){var a=this;i===void 0&&(i=ke),r===void 0&&(r="ObservableSet"),this.name_=void 0,this[E]=Vo,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,te(Set)||L(22),this.enhancer_=function(s,o){return i(s,o,r)},Ne(function(){a.atom_=Gi(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;le(function(){ir(function(){for(var r=xe(i.data_.values()),a;!(a=r()).done;){var s=a.value;i.delete(s)}})})},e.forEach=function(i,r){for(var a=xe(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_,H(this)){var a=q(this,{type:fe,object:this,newValue:i});if(!a)return this}if(!this.has(i)){le(function(){r.data_.add(r.enhancer_(i,void 0)),r.atom_.reportChanged()});var s=!1,o=Y(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:fe,object:this,newValue:i}:null;o&&ee(this,l)}return this},e.delete=function(i){var r=this;if(H(this)){var a=q(this,{type:At,object:this,oldValue:i});if(!a)return!1}if(this.has(i)){var s=!1,o=Y(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:At,object:this,oldValue:i}:null;return le(function(){r.atom_.reportChanged(),r.data_.delete(i)}),o&&ee(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 Ye({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 Ye({next:function(){return r<a.length?{value:i.dehanceValue_(a[r++]),done:!1}:{done:!0}}})},e.replace=function(i){var r=this;return Ve(i)&&(i=new Set(i)),le(function(){Array.isArray(i)?(r.clear(),i.forEach(function(a){return r.add(a)})):nt(i)?(r.clear(),i.forEach(function(a){return r.add(a)})):i!=null&&L("Cannot initialize set from "+i)}),this},e.observe_=function(i,r){return ot(this,i)},e.intercept_=function(i){return st(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Or]=function(){return this.values()},wn(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:wr,get:function(){return"Set"}}]),t}(),Ve=be("ObservableSet",Ar),Yn=Object.create(null),ei="remove",Fr=function(){function t(n,i,r,a){i===void 0&&(i=new Map),a===void 0&&(a=Rs),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 rt("ObservableObject.keys"),this.isPlainObject_=me(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 Te)return a.set(r),!0;if(H(this)){var s=q(this,{type:oe,object:this.proxy_||this.target_,name:i,newValue:r});if(!s)return null;r=s.newValue}if(r=a.prepareNewValue_(r),r!==v.UNCHANGED){var o=Y(this),l=!1,u=o||l?{type:oe,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:i,newValue:r}:null;a.setNewValue_(r),o&&ee(this,u)}return!0},e.get_=function(i){return v.trackingDerivation&&!ue(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,r,a){return a===void 0&&(a=!1),ue(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(!v.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var r=this.pendingKeys_.get(i);return r||(r=new pe(i in this.target_,Ut,"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_[ie])!=null&&a[i])return;L(1,r.annotationType_,this.name_+"."+i.toString())}for(var s=this.target_;s&&s!==Pt;){var o=yt(s,i);if(o){var l=r.make_(this,i,o,s);if(l===0)return;if(l===1)break}s=Object.getPrototypeOf(s)}ni(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&&ni(this,a,i),o},e.defineProperty_=function(i,r,a){a===void 0&&(a=!1),this.keysAtom_;try{W();var s=this.delete_(i);if(!s)return s;if(H(this)){var o=q(this,{object:this.proxy_||this.target_,name:i,type:fe,newValue:r.value});if(!o)return null;var l=o.newValue;r.value!==l&&(r=ge({},r,{value:l}))}if(a){if(!Reflect.defineProperty(this.target_,i,r))return!1}else ae(this.target_,i,r);this.notifyPropertyAddition_(i,r.value)}finally{J()}return!0},e.defineObservableProperty_=function(i,r,a,s){s===void 0&&(s=!1),this.keysAtom_;try{W();var o=this.delete_(i);if(!o)return o;if(H(this)){var l=q(this,{object:this.proxy_||this.target_,name:i,type:fe,newValue:r});if(!l)return null;r=l.newValue}var u=ti(i),d={configurable:v.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:u.get,set:u.set};if(s){if(!Reflect.defineProperty(this.target_,i,d))return!1}else ae(this.target_,i,d);var f=new pe(r,a,"ObservableObject.key",!1);this.values_.set(i,f),this.notifyPropertyAddition_(i,f.value_)}finally{J()}return!0},e.defineComputedProperty_=function(i,r,a){a===void 0&&(a=!1),this.keysAtom_;try{W();var s=this.delete_(i);if(!s)return s;if(H(this)){var o=q(this,{object:this.proxy_||this.target_,name:i,type:fe,newValue:void 0});if(!o)return null}r.name||(r.name="ObservableObject.key"),r.context=this.proxy_||this.target_;var l=ti(i),u={configurable:v.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:l.get,set:l.set};if(a){if(!Reflect.defineProperty(this.target_,i,u))return!1}else ae(this.target_,i,u);this.values_.set(i,new Te(r)),this.notifyPropertyAddition_(i,void 0)}finally{J()}return!0},e.delete_=function(i,r){if(r===void 0&&(r=!1),this.keysAtom_,!ue(this.target_,i))return!0;if(H(this)){var a=q(this,{object:this.proxy_||this.target_,name:i,type:ei});if(!a)return null}try{var s,o;W();var l=Y(this),u=!1,d=this.values_.get(i),f=void 0;if(!d&&(l||u)){var c;f=(c=yt(this.target_,i))==null?void 0:c.value}if(r){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(d&&(this.values_.delete(i),d instanceof pe&&(f=d.value_),ur(d)),this.keysAtom_.reportChanged(),(s=this.pendingKeys_)==null||(o=s.get(i))==null||o.set(i in this.target_),l||u){var N={type:ei,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:f,name:i};l&&ee(this,N)}}finally{J()}return!0},e.observe_=function(i,r){return ot(this,i)},e.intercept_=function(i){return st(this,i)},e.notifyPropertyAddition_=function(i,r){var a,s,o=Y(this),l=!1;if(o||l){var u=o||l?{type:fe,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:r}:null;o&&ee(this,u)}(a=this.pendingKeys_)==null||(s=a.get(i))==null||s.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),jt(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function je(t,e){var n;if(ue(t,E))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",r=new Fr(t,new Map,String(i),zs(e));return Vt(t,E,r),t}var jo=be("ObservableObjectAdministration",Fr);function ti(t){return Yn[t]||(Yn[t]={get:function(){return this[E].getObservablePropValue_(t)},set:function(n){return this[E].setObservablePropValue_(t,n)}})}function Xe(t){return It(t)?jo(t[E]):!1}function ni(t,e,n){var i;(i=t.target_[ie])==null||delete i[n]}var Uo=Cr(0),Mo=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),Yt=0,Er=function(){};function $o(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}$o(Er,Array.prototype);var Rn=function(t,e,n){Ki(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,Ne(function(){var d=new Tn(o,s,l,!0);d.proxy_=Zt(u),$i(Zt(u),E,d),a&&a.length&&u.spliceWithArray(0,0,a),Mo&&Object.defineProperty(Zt(u),"0",Uo)}),u}var r=i.prototype;return r.concat=function(){this[E].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 zt(u)?u.slice():u}))},r[n]=function(){var a=this,s=0;return Ye({next:function(){return s<a.length?{value:a[s++],done:!1}:{done:!0,value:void 0}}})},wn(i,[{key:"length",get:function(){return this[E].getArrayLength_()},set:function(s){this[E].setArrayLength_(s)}},{key:e,get:function(){return"Array"}}]),i}(Er,Symbol.toStringTag,Symbol.iterator);Object.entries(wt).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&Vt(Rn.prototype,e,n)});function Cr(t){return{enumerable:!1,configurable:!0,get:function(){return this[E].get_(t)},set:function(n){this[E].set_(t,n)}}}function Bo(t){ae(Rn.prototype,""+t,Cr(t))}function xr(t){if(t>Yt){for(var e=Yt;e<t+100;e++)Bo(e);Yt=t}}xr(1e3);function zo(t,e,n){return new Rn(t,e,n)}function De(t,e){if(typeof t=="object"&&t!==null){if(zt(t))return e!==void 0&&L(23),t[E].atom_;if(Ve(t))return t.atom_;if(_e(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||L(25,e,pn(t)),n}if(Xe(t)){if(!e)return L(26);var i=t[E].values_.get(e);return i||L(27,e,pn(t)),i}if(An(t)||$t(t)||Ot(t))return t}else if(te(t)&&Ot(t[E]))return t[E];L(28)}function Tr(t,e){if(t||L(29),e!==void 0)return Tr(De(t,e));if(An(t)||$t(t)||Ot(t)||_e(t)||Ve(t))return t;if(t[E])return t[E];L(24,t)}function pn(t,e){var n;if(e!==void 0)n=De(t,e);else{if(Bt(t))return t.name;Xe(t)||_e(t)||Ve(t)?n=Tr(t):n=De(t)}return n.name_}function Ne(t){var e=Se(),n=En(!0);W();try{return t()}finally{J(),Cn(n),de(e)}}var ii=Pt.toString;function Dn(t,e,n){return n===void 0&&(n=-1),vn(t,e,n)}function vn(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=ii.call(t);if(s!==ii.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=ri(t),e=ri(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&&!(te(l)&&l instanceof l&&te(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(!vn(t[d],e[d],n-1,i,r))return!1}else{var f=Object.keys(t),c;if(d=f.length,Object.keys(e).length!==d)return!1;for(;d--;)if(c=f[d],!(ue(e,c)&&vn(t[c],e[c],n-1,i,r)))return!1}return i.pop(),r.pop(),!0}function ri(t){return zt(t)?t.slice():Pe(t)||_e(t)||nt(t)||Ve(t)?Array.from(t.entries()):t}function Ye(t){return t[Symbol.iterator]=Ko,t}function Ko(){return this}["Symbol","Map","Set"].forEach(function(t){var e=On();typeof e[t]=="undefined"&&L("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:oo,extras:{getDebugName:pn},$mobx:E});class Rr{constructor(e,n){C(this,"channel");C(this,"listeners",new Map);C(this,"eventQueue",new Map);this.logger=n;try{this.channel=new BroadcastChannel(e),this.channel.onmessage=i=>this.handleMessage(i),this.channel.onmessageerror=i=>this.logger.error("NizzaBroadcastChannel:",i)}catch(i){throw this.logger.error("Failed to create NizzaBroadcastChannel:",i),i}}on(e,n){return this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;for(const[r,a]of this.listeners.entries())this.matchWildcard(r,i)&&a.forEach(s=>s({...n,wildcard:r}))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const i=new Error("Invalid arguments");throw this.logger.error(i),i}for(const[i,r]of this.listeners.entries())if(this.matchWildcard(i,e)){r.add(n);const a=this.eventQueue.get(i);a&&(a.forEach(s=>{n({...s,wildcard:i})}),this.eventQueue.delete(i));return}this.listeners.set(e,new Set([n]))}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)for(const[s,o]of a)o({...r,wildcard:s});else this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(r);this.channel.postMessage(r)}*getMatchingListeners(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)){const i=this.listeners.get(e);i.delete(n),i.size===0&&this.listeners.delete(e)}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*");return new RegExp(`^${i}$`).test(n)}}let Go=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");const Dr=(t=8)=>Go(t),Qo=t=>{const e=Object.entries(t).reduce((n,[i,r])=>r!==void 0?`${n}${n?"&":""}${i}=${r}`:n,"");return e?`?${e}`:""};function Ho(){const t=new Error().stack.split(`
4
- `);return t.length<3?"":t[2].trim().substring(3)}var Lr=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Pr(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ir={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(Lr,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(g,S){var y=g[S];if(typeof y.bind=="function")return y.bind(g);try{return Function.prototype.bind.call(y,g)}catch{return function(){return Function.prototype.apply.apply(y,[g,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(g){return g==="debug"&&(g="log"),typeof console===n?!1:g==="trace"&&i?l:console[g]!==void 0?o(console,g):console.log!==void 0?o(console,"log"):e}function d(){for(var g=this.getLevel(),S=0;S<r.length;S++){var y=r[S];this[y]=S<g?e:this.methodFactory(y,g,this.name)}if(this.log=this.debug,typeof console===n&&g<this.levels.SILENT)return"No console available for logging"}function f(g){return function(){typeof console!==n&&(d.call(this),this[g].apply(this,arguments))}}function c(g,S,y){return u(g)||f.apply(this,arguments)}function N(g,S){var y=this,R,P,w,x="loglevel";typeof g=="string"?x+=":"+g:typeof g=="symbol"&&(x=void 0);function I(h){var b=(r[h]||"silent").toUpperCase();if(!(typeof window===n||!x)){try{window.localStorage[x]=b;return}catch{}try{window.document.cookie=encodeURIComponent(x)+"="+b+";"}catch{}}}function j(){var h;if(!(typeof window===n||!x)){try{h=window.localStorage[x]}catch{}if(typeof h===n)try{var b=window.document.cookie,A=encodeURIComponent(x),p=b.indexOf(A+"=");p!==-1&&(h=/^([^;]+)/.exec(b.slice(p+A.length+1))[1])}catch{}return y.levels[h]===void 0&&(h=void 0),h}}function m(){if(!(typeof window===n||!x)){try{window.localStorage.removeItem(x)}catch{}try{window.document.cookie=encodeURIComponent(x)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function k(h){var b=h;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: "+h)}y.name=g,y.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},y.methodFactory=S||c,y.getLevel=function(){return w!=null?w:P!=null?P:R},y.setLevel=function(h,b){return w=k(h),b!==!1&&I(w),d.call(y)},y.setDefaultLevel=function(h){P=k(h),j()||y.setLevel(h,!1)},y.resetLevel=function(){w=null,m(),d.call(y)},y.enableAll=function(h){y.setLevel(y.levels.TRACE,h)},y.disableAll=function(h){y.setLevel(y.levels.SILENT,h)},y.rebuild=function(){if(s!==y&&(R=k(s.getLevel())),d.call(y),s===y)for(var h in a)a[h].rebuild()},R=k(s?s.getLevel():"WARN");var _=j();_!=null&&(w=k(_)),d.call(y)}s=new N,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 N(S,s.methodFactory)),y};var O=typeof window!==n?window.log:void 0;return s.noConflict=function(){return typeof window!==n&&window.log===s&&(window.log=O),s},s.getLoggers=function(){return a},s.default=s,s})})(Ir);var Vr=Ir.exports;const en=Pr(Vr);var jr={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.prefix=n(e)})(Lr,function(e){var n=function(d){for(var f=1,c=arguments.length,N;f<c;f++)for(N in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],N)&&(d[N]=arguments[f][N]);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,f){if(!d||!d.setLevel)throw new TypeError("Argument is not a logger");var c=d.methodFactory,N=d.name||"",O=a[N]||a[""]||i;function g(S,y,R){var P=c(S,y,R),w=a[R]||a[""],x=w.template.indexOf("%t")!==-1,I=w.template.indexOf("%l")!==-1,j=w.template.indexOf("%n")!==-1;return function(){for(var m="",k=arguments.length,_=Array(k),h=0;h<k;h++)_[h]=arguments[h];if(N||!a[R]){var b=w.timestampFormatter(new Date),A=w.levelFormatter(S),p=w.nameFormatter(R);w.format?m+=w.format(A,p,b):(m+=w.template,x&&(m=m.replace(/%t/,b)),I&&(m=m.replace(/%l/,A)),j&&(m=m.replace(/%n/,p))),_.length&&typeof _[0]=="string"?_[0]=m+" "+_[0]:_.unshift(m)}P.apply(void 0,_)}}return a[N]||(d.methodFactory=g),f=f||{},f.template&&(f.format=void 0),a[N]=n({},O,f),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})})(jr);var qo=jr.exports;const ai=Pr(qo);let Ur=class{constructor(e){C(this,"defaultLevel",Vr.levels.INFO);C(this,"namePrefix");C(this,"provider",en);this.namePrefix=e?`${e}-`:"",this.provider.setDefaultLevel(this.defaultLevel),ai.reg(en),ai.apply(en,{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 r?i.setLevel(r):i.setLevel(this.defaultLevel),i}};const X=class X{constructor(){C(this,"instanceId",Dr());C(this,"log",new Ur("nz"));C(this,"coreLogger",this.log.createLogger("core"));C(this,"_config",null);C(this,"_account");C(this,"_productDataSource");C(this,"_eventBus",new Rr("nizza",this.coreLogger));yr(this,{_config:z,_account:z,_productDataSource:z,config:he,account:he,accountName:he,configure:ce,setProductDataSource:ce},{name:"NizzaStore",autoBind:!0})}static instance(){if(!!window.nizza)X._instance=window.nizza;else{const n=new X;X._instance=n}return window.nizza=X._instance,window.nz=X._instance,X._instance}async configure(e){var n;try{const i=(n=this._config)==null?void 0:n.account;if(this._config=e,i!==e.account){const r=await aa(e.account);this.setAccount(r)}if(e.getProductDataSource){const r=await e.getProductDataSource();this.setProductDataSource(r)}}catch(i){this.coreLogger.error("Error configuring NizzaStore:",i)}}setAccount(e){this._account=e}setProductDataSource(e){this._productDataSource=e}get version(){return X.version}get config(){return this._config}get account(){return this._account}get accountName(){var e;return(e=this._config)==null?void 0:e.account}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};C(X,"version","4"),C(X,"_instance");let Ft=X;const Ue=()=>Ft.instance();function Ee(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function gt(t){return function e(n){return arguments.length===0||Ee(n)?e:t.apply(this,arguments)}}function Ln(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return Ee(n)?e:gt(function(r){return t(n,r)});default:return Ee(n)&&Ee(i)?e:Ee(n)?gt(function(r){return t(r,i)}):Ee(i)?gt(function(r){return t(n,r)}):t(n,i)}}}const Wo=Number.isInteger||function(e){return e<<0===e};function Jo(t){return Object.prototype.toString.call(t)==="[object String]"}var Zo=Ln(function(e,n){var i=e<0?n.length+e:e;return Jo(n)?n.charAt(i):n[i]}),Xo=gt(function(e){return e==null}),Yo=Ln(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=Wo(s)?Zo(s,r):r[s],a+=1}return r})}),el=Ln(function(e,n){return Yo([e],n)[0]});class lt 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 Mr extends lt{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class $r extends lt{constructor(e){var n;super("APP_UNEXPECTED_ERROR",(n=e.message)!=null?n:"An unexpected error occurred.",e)}}class tl extends lt{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class Br extends lt{constructor(e){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
1
+ "use strict";var br=Object.defineProperty;var Sr=(t,e,n)=>e in t?br(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var C=(t,e,n)=>(Sr(t,typeof e!="symbol"?e+"":e,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("react"),_r=require("react-dom"),Nr=require("react/jsx-runtime");function Or(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const Z=Or($);var G={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let wr=0;function Fr(t,e){const n=`atom${++wr}`,i={toString:()=>n};return i.init=t,i.read=Ar,i.write=Er,i}function Ar(t){return t(this)}function Er(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const qt=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,Wt=t=>"init"in t,Jt=t=>!!t.write,gt=new WeakMap,Cr=(t,e)=>{gt.set(t,e),t.catch(()=>{}).finally(()=>gt.delete(t))},Bn=(t,e)=>{const n=gt.get(t);n&&(gt.delete(t),n(e))},zn=(t,e)=>{t.status="fulfilled",t.value=e},Gn=(t,e)=>{t.status="rejected",t.reason=e},Tr=t=>typeof(t==null?void 0:t.then)=="function",Me=(t,e)=>!!t&&"v"in t&&"v"in e&&Object.is(t.v,e.v),Kn=(t,e)=>!!t&&"e"in t&&"e"in e&&Object.is(t.e,e.e),Oe=t=>!!t&&"v"in t&&t.v instanceof Promise,xr=(t,e)=>"v"in t&&"v"in e&&t.v.orig&&t.v.orig===e.v.orig,lt=t=>{if("e"in t)throw t.e;return t.v},xi=()=>{const t=new WeakMap,e=new WeakMap,n=[],i=new WeakMap;let a,r;(G?"production":void 0)!=="production"&&(a=new Set,r=new Set);const s=m=>t.get(m),o=(m,_)=>{_.d.forEach((O,h)=>{var p;if(!i.has(h)){const b=s(h);(p=n[n.length-1])==null||p.add(h),i.set(h,[b,new Set]),b&&o(h,b)}i.get(h)[1].add(m)})},l=(m,_)=>{var O;(G?"production":void 0)!=="production"&&Object.freeze(_);const h=s(m);if(t.set(m,_),i.has(m)||((O=n[n.length-1])==null||O.add(m),i.set(m,[h,new Set]),o(m,_)),Oe(h)){const p="v"in _?_.v instanceof Promise?_.v:Promise.resolve(_.v):Promise.reject(_.e);h.v!==p&&Bn(h.v,p)}},u=(m,_,O,h)=>{const p=new Map(h?_.d:null);let b=!1;O.forEach((y,A)=>{!y&&qt(m,A)&&(y=_),y?(p.set(A,y),_.d.get(A)!==y&&(b=!0)):(G?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(b||_.d.size!==p.size)&&(_.d=p)},d=(m,_,O,h)=>{const p=s(m),b={d:(p==null?void 0:p.d)||new Map,v:_};if(O&&u(m,b,O,h),Me(p,b)&&p.d===b.d)return p;if(Oe(p)&&Oe(b)&&xr(p,b)){if(p.d===b.d)return p;b.v=p.v}return l(m,b),b},f=(m,_,O,h)=>{if(Tr(_)){let p;const b=()=>{const A=s(m);if(!Oe(A)||A.v!==y)return;const j=d(m,y,O);e.has(m)&&A.d!==j.d&&T(m,j,A.d)},y=new Promise((A,j)=>{let x=!1;_.then(R=>{x||(x=!0,zn(y,R),A(R),b())},R=>{x||(x=!0,Gn(y,R),j(R),b())}),p=R=>{x||(x=!0,R.then(z=>zn(y,z),z=>Gn(y,z)),A(R))}});return y.orig=_,y.status="pending",Cr(y,A=>{A&&p(A),h==null||h()}),d(m,y,O,!0)}return d(m,_,O)},c=(m,_,O)=>{const h=s(m),p={d:(h==null?void 0:h.d)||new Map,e:_};return O&&u(m,p,O),Kn(h,p)&&h.d===p.d?h:(l(m,p),p)},S=(m,_)=>{const O=s(m);if(!_&&O&&(e.has(m)||Array.from(O.d).every(([x,R])=>{if(x===m)return!0;const z=S(x);return z===R||Me(z,R)})))return O;const h=new Map;let p=!0;const b=x=>{if(qt(m,x)){const z=s(x);if(z)return h.set(x,z),lt(z);if(Wt(x))return h.set(x,void 0),x.init;throw new Error("no atom init")}const R=S(x);return h.set(x,R),lt(R)};let y,A;const j={get signal(){return y||(y=new AbortController),y.signal},get setSelf(){return(G?"production":void 0)!=="production"&&!Jt(m)&&console.warn("setSelf function cannot be used with read-only atom"),!A&&Jt(m)&&(A=(...x)=>{if((G?"production":void 0)!=="production"&&p&&console.warn("setSelf function cannot be called in sync"),!p)return k(m,...x)}),A}};try{const x=m.read(b,j);return f(m,x,h,()=>y==null?void 0:y.abort())}catch(x){return c(m,x,h)}finally{p=!1}},w=m=>lt(S(m)),g=m=>{const _=y=>{var A,j;const x=new Set((A=e.get(y))==null?void 0:A.t);return(j=i.get(y))==null||j[1].forEach(R=>{x.add(R)}),x},O=new Array,h=new Set,p=y=>{if(!h.has(y)){h.add(y);for(const A of _(y))y!==A&&p(A);O.push(y)}};p(m);const b=new Set([m]);for(let y=O.length-1;y>=0;--y){const A=O[y],j=s(A);if(!j)continue;let x=!1;for(const R of j.d.keys())if(R!==A&&b.has(R)){x=!0;break}if(x){const R=S(A,!0);Me(j,R)||b.add(A)}}},N=(m,..._)=>{const O=b=>lt(S(b)),h=(b,...y)=>{const A=n.length>0;A||n.push(new Set([b]));let j;if(qt(m,b)){if(!Wt(b))throw new Error("atom not writable");const x=s(b),R=f(b,y[0]);Me(x,R)||g(b)}else j=N(b,...y);if(!A){const x=P(n.pop());(G?"production":void 0)!=="production"&&a.forEach(R=>R({type:"async-write",flushed:x}))}return j};return m.write(O,h,..._)},k=(m,..._)=>{n.push(new Set([m]));const O=N(m,..._),h=P(n.pop());return(G?"production":void 0)!=="production"&&a.forEach(p=>p({type:"write",flushed:h})),O},D=(m,_,O)=>{var h;const p=e.get(m);if(p)return _&&p.t.add(_),p;const b=O||[];(h=s(m))==null||h.d.forEach((A,j)=>{j!==m&&D(j,m,b)}),S(m);const y={t:new Set(_&&[_]),l:new Set};if(e.set(m,y),(G?"production":void 0)!=="production"&&r.add(m),Jt(m)&&m.onMount){const{onMount:A}=m;b.push(()=>{const j=A((...x)=>k(m,...x));j&&(y.u=j)})}return O||b.forEach(A=>A()),y},V=(m,_)=>!_.l.size&&(!_.t.size||_.t.size===1&&_.t.has(m)),F=(m,_)=>{if(!V(m,_))return;const O=_.u;O&&O(),e.delete(m),(G?"production":void 0)!=="production"&&r.delete(m);const h=s(m);h?(Oe(h)&&Bn(h.v),h.d.forEach((p,b)=>{if(b!==m){const y=e.get(b);y&&(y.t.delete(m),F(b,y))}})):(G?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",m)},T=(m,_,O)=>{const h=new Set(_.d.keys()),p=new Set;O==null||O.forEach((b,y)=>{if(h.has(y)){h.delete(y);return}p.add(y);const A=e.get(y);A&&A.t.delete(m)}),h.forEach(b=>{D(b,m)}),p.forEach(b=>{const y=e.get(b);y&&F(b,y)})},P=m=>{let _;(G?"production":void 0)!=="production"&&(_=new Set);const O=[],h=p=>{var b;if(!i.has(p))return;const[y,A]=i.get(p);i.delete(p),O.push([p,y]),A.forEach(h),(b=s(p))==null||b.d.forEach((j,x)=>h(x))};if(m.forEach(h),O.forEach(([p,b])=>{const y=s(p);if(!y){(G?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush");return}if(y!==b){const A=e.get(p);A&&y.d!==(b==null?void 0:b.d)&&T(p,y,b==null?void 0:b.d),A&&!(!Oe(b)&&(Me(b,y)||Kn(b,y)))&&(A.l.forEach(j=>j()),(G?"production":void 0)!=="production"&&_.add(p))}}),(G?"production":void 0)!=="production")return _},U=(m,_)=>{const O=D(m),h=P([m]),p=O.l;return p.add(_),(G?"production":void 0)!=="production"&&a.forEach(b=>b({type:"sub",flushed:h})),()=>{p.delete(_),F(m,O),(G?"production":void 0)!=="production"&&a.forEach(b=>b({type:"unsub"}))}};return(G?"production":void 0)!=="production"?{get:w,set:k,sub:U,dev_subscribe_store:m=>(a.add(m),()=>{a.delete(m)}),dev_get_mounted_atoms:()=>r.values(),dev_get_atom_state:m=>t.get(m),dev_get_mounted:m=>e.get(m),dev_restore_atoms:m=>{n.push(new Set);for(const[O,h]of m)Wt(O)&&(f(O,h),g(O));const _=P(n.pop());a.forEach(O=>O({type:"restore",flushed:_}))}}:{get:w,set:k,sub:U}};let $e;const Rr=()=>($e||($e=xi(),(G?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=$e),globalThis.__JOTAI_DEFAULT_STORE__!==$e&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),$e),Dr=xi,Lr=Rr;var Pr={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ir=$.createContext(void 0),Ri=t=>$.useContext(Ir)||Lr(),Vr=t=>typeof(t==null?void 0:t.then)=="function",jr=$.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 Ur(t,e){const n=Ri(),[[i,a,r],s]=$.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(a!==n||r!==t)&&(s(),o=n.get(t)),$.useEffect(()=>{const u=n.sub(t,()=>{s()});return s(),u},[n,t,void 0]),$.useDebugValue(o),Vr(o)?jr(o):o}function Mr(t,e){const n=Ri();return $.useCallback((...a)=>{if((Pr?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...a)},[n,t])}function $r(t,e){return[Ur(t),Mr(t)]}const Lt=Fr(null);Lt.debugLabel="accountAtom";var Br={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{NZ_AWS_REGION:zr,NZ_BACKOFFICE_BACK_URL:Gr,NZ_CORE_SERVICES_GRAPHQL_URL:Kr,NZ_CORE_SERVICES_REST_URL:Qr}=Br,Hr={AWS:{region:zr,cognito:{userPoolId:"us-east-1_EZ7wuZ4ig",userPoolWebClientId:"2jok7cst8ebf6ppscrhji57gvr"}},apiUrls:{restV1:Gr||"https://b133h34s56.execute-api.us-east-1.amazonaws.com",restV2:Qr||"https://core-services-prod.nizza.com/api",graphql:Kr||"https://core-services-prod.nizza.com/graphql",corsProxy:"https://3hvqfl2xcg.execute-api.us-east-1.amazonaws.com"},publicUrls:{platformSite:"https://platform.nizza.com",nizzaCdn:"https://cdn.nizza.com",bundleSite:"https://bundle.nizza.com",wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};function qr(t,e){let n=null;const i=()=>{n||(n=e().log.createLogger(t))},a=(s,o)=>typeof s[o]=="function",r={get(s,o,l){i();const u=d=>(...f)=>{if(!n)return;const c=n[d];if(typeof c=="function")return c.apply(n,f)};return n&&a(n,o)?u(o):n?n[o]:void 0}};return new Proxy({},r)}async function Nn(t){const{url:e,method:n="GET",body:i,raw:a=!1,contentTypeJson:r=!0,timeout:s,...o}=t,l=r&&!t.headers?new Headers({"content-type":"application/json"}):t.headers;try{const u=new AbortController,{signal:d}=u;let f;const c=fetch(e,{method:n,headers:l,body:i,signal:d,...o});s&&(f=setTimeout(()=>{u.abort()},s));const S=await c;if(a)return S;const w=await S.json();if(clearTimeout(f),!S.ok){const g=w?JSON.stringify(w):S.statusText;throw new Error(g)}return w}catch(u){throw console.error("[CustomFetch] ",u),u}}const Wr=t=>Nn({...t,contentTypeJson:!1,raw:!1});function Jr(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Di(i,`${t}.${n}`))}const Di=(t,e,n)=>{const i=[t],a=new Blob(i,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob!="undefined")return window.navigator.msSaveBlob(a,e);const r=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),s=document.createElement("a");return s.style.display="none",s.href=r,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(r)},200)};function L(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 Zr={};function On(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:Zr}var Li=Object.assign,kt=Object.getOwnPropertyDescriptor,re=Object.defineProperty,Pt=Object.prototype,sn=[];Object.freeze(sn);var Pi={};Object.freeze(Pi);var Xr=typeof Proxy!="undefined",Yr=Object.toString();function Ii(){Xr||L("Proxy not available")}function Vi(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var Ce=function(){};function te(t){return typeof t=="function"}function ve(t){var e=typeof t;switch(e){case"string":case"symbol":case"number":return!0}return!1}function It(t){return t!==null&&typeof t=="object"}function me(t){if(!It(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()===Yr}function ji(t){var e=t==null?void 0:t.constructor;return e?e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction":!1}function Vt(t,e,n){re(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function Ui(t,e,n){re(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function be(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return It(i)&&i[n]===!0}}function Le(t){return t instanceof Map}function tt(t){return t instanceof Set}var Mi=typeof Object.getOwnPropertySymbols!="undefined";function es(t){var e=Object.keys(t);if(!Mi)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter(function(i){return Pt.propertyIsEnumerable.call(t,i)})):e}var jt=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:Mi?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function $i(t){return t===null?null:typeof t=="object"?""+t:t}function ue(t,e){return Pt.hasOwnProperty.call(t,e)}var ts=Object.getOwnPropertyDescriptors||function(e){var n={};return jt(e).forEach(function(i){n[i]=kt(e,i)}),n};function ns(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,rs(i.key),i)}}function wn(t,e,n){return e&&ns(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function ge(){return ge=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},ge.apply(this,arguments)}function Bi(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,on(t,e)}function on(t,e){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,a){return i.__proto__=a,i},on(t,e)}function Zt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function is(t,e){if(t){if(typeof t=="string")return Qn(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 Qn(t,e)}}function Qn(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 Te(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=is(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 as(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 rs(t){var e=as(t,"string");return typeof e=="symbol"?e:String(e)}var ie=Symbol("mobx-stored-annotations");function se(t){function e(n,i){if(nt(i))return t.decorate_20223_(n,i);Pe(n,i,t)}return Object.assign(e,t)}function Pe(t,e,n){ue(t,ie)||Vt(t,ie,ge({},t[ie])),hs(n)||(t[ie][e]=n)}function ss(t){return ue(t,ie)||Vt(t,ie,ge({},t[ie])),t[ie]}function nt(t){return typeof t=="object"&&typeof t.kind=="string"}var E=Symbol("mobx administration"),it=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 sa(this)},e.reportChanged=function(){W(),oa(this),J()},e.toString=function(){return this.name_},t}(),Fn=be("Atom",it);function zi(t,e,n){e===void 0&&(e=Ce),n===void 0&&(n=Ce);var i=new it(t);return e!==Ce&&yo(i,e),n!==Ce&&fa(i,n),i}function os(t,e){return t===e}function ls(t,e){return Dn(t,e)}function us(t,e){return Dn(t,e,1)}function ds(t,e){return Object.is?Object.is(t,e):t===e?t!==0||1/t===1/e:t!==t&&e!==e}var yt={identity:os,structural:ls,default:ds,shallow:us};function ke(t,e,n){return va(t)?t:Array.isArray(t)?B.array(t,{name:n}):me(t)?B.object(t,void 0,{name:n}):Le(t)?B.map(t,{name:n}):tt(t)?B.set(t,{name:n}):typeof t=="function"&&!Bt(t)&&!Ze(t)?ji(t)?Re(t):Je(n,t):t}function cs(t,e,n){if(t==null||Gt(t)||zt(t)||_e(t)||Ie(t))return t;if(Array.isArray(t))return B.array(t,{name:n,deep:!1});if(me(t))return B.object(t,void 0,{name:n,deep:!1});if(Le(t))return B.map(t,{name:n,deep:!1});if(tt(t))return B.set(t,{name:n,deep:!1})}function Ut(t){return t}function fs(t,e){return Dn(t,e)?e:t}var ms="override";function hs(t){return t.annotationType_===ms}function at(t,e){return{annotationType_:t,options_:e,make_:ps,extend_:vs,decorate_20223_:gs}}function ps(t,e,n,i){var a;if((a=this.options_)!=null&&a.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(Bt(n.value))return 1;var r=Gi(t,this,e,n,!1);return re(i,e,r),2}function vs(t,e,n,i){var a=Gi(t,this,e,n);return t.defineProperty_(e,a,i)}function gs(t,e){var n=e.kind,i=e.name,a=e.addInitializer,r=this,s=function(u){var d,f,c,S;return ye((d=(f=r.options_)==null?void 0:f.name)!=null?d:i.toString(),u,(c=(S=r.options_)==null?void 0:S.autoAction)!=null?c:!1)};if(n=="field"){a(function(){Pe(this,i,r)});return}if(n=="method"){var o;return Bt(t)||(t=s(t)),(o=this.options_)!=null&&o.bound&&a(function(){var l=this,u=l[i].bind(l);u.isMobxAction=!0,l[i]=u}),t}L("Cannot apply '"+r.annotationType_+"' to '"+String(i)+"' (kind: "+n+"):"+(`
3
+ '`+r.annotationType_+"' can only be used on properties with a function value."))}function ks(t,e,n,i){e.annotationType_,i.value}function Gi(t,e,n,i,a){var r,s,o,l,u,d,f;a===void 0&&(a=v.safeDescriptors),ks(t,e,n,i);var c=i.value;if((r=e.options_)!=null&&r.bound){var S;c=c.bind((S=t.proxy_)!=null?S:t.target_)}return{value:ye((s=(o=e.options_)==null?void 0:o.name)!=null?s:n.toString(),c,(l=(u=e.options_)==null?void 0:u.autoAction)!=null?l:!1,(d=e.options_)!=null&&d.bound?(f=t.proxy_)!=null?f:t.target_:void 0),configurable:a?t.isPlainObject_:!0,enumerable:!1,writable:!a}}function Ki(t,e){return{annotationType_:t,options_:e,make_:ys,extend_:bs,decorate_20223_:Ss}}function ys(t,e,n,i){var a;if(i===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if((a=this.options_)!=null&&a.bound&&(!ue(t.target_,e)||!Ze(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(Ze(n.value))return 1;var r=Qi(t,this,e,n,!1,!1);return re(i,e,r),2}function bs(t,e,n,i){var a,r=Qi(t,this,e,n,(a=this.options_)==null?void 0:a.bound);return t.defineProperty_(e,r,i)}function Ss(t,e){var n,i=e.name,a=e.addInitializer;return Ze(t)||(t=Re(t)),(n=this.options_)!=null&&n.bound&&a(function(){var r=this,s=r[i].bind(r);s.isMobXFlow=!0,r[i]=s}),t}function _s(t,e,n,i){e.annotationType_,i.value}function Qi(t,e,n,i,a,r){r===void 0&&(r=v.safeDescriptors),_s(t,e,n,i);var s=i.value;if(Ze(s)||(s=Re(s)),a){var o;s=s.bind((o=t.proxy_)!=null?o:t.target_),s.isMobXFlow=!0}return{value:s,configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function An(t,e){return{annotationType_:t,options_:e,make_:Ns,extend_:Os,decorate_20223_:ws}}function Ns(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Os(t,e,n,i){return Fs(t,this,e,n),t.defineComputedProperty_(e,ge({},this.options_,{get:n.get,set:n.set}),i)}function ws(t,e){var n=this,i=e.name,a=e.addInitializer;return a(function(){var r=Ve(this)[E],s=ge({},n.options_,{get:t,context:this});s.name||(s.name="ObservableObject."+i.toString()),r.values_.set(i,new xe(s))}),function(){return this[E].getObservablePropValue_(i)}}function Fs(t,e,n,i){e.annotationType_,i.get}function Mt(t,e){return{annotationType_:t,options_:e,make_:As,extend_:Es,decorate_20223_:Cs}}function As(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Es(t,e,n,i){var a,r;return Ts(t,this),t.defineObservableProperty_(e,n.value,(a=(r=this.options_)==null?void 0:r.enhancer)!=null?a:ke,i)}function Cs(t,e){var n=this,i=e.kind,a=e.name,r=new WeakSet;function s(o,l){var u,d,f=Ve(o)[E],c=new pe(l,(u=(d=n.options_)==null?void 0:d.enhancer)!=null?u:ke,"ObservableObject."+a.toString(),!1);f.values_.set(a,c),r.add(o)}if(i=="accessor")return{get:function(){return r.has(this)||s(this,t.get.call(this)),this[E].getObservablePropValue_(a)},set:function(l){return r.has(this)||s(this,l),this[E].setObservablePropValue_(a,l)},init:function(l){return r.has(this)||s(this,l),l}}}function Ts(t,e,n,i){e.annotationType_}var xs="true",Rs=Hi();function Hi(t){return{annotationType_:xs,options_:t,make_:Ds,extend_:Ls,decorate_20223_:Ps}}function Ds(t,e,n,i){var a,r;if(n.get)return he.make_(t,e,n,i);if(n.set){var s=ye(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:v.safeDescriptors?t.isPlainObject_:!0,set:s})===null?0:2:(re(i,e,{configurable:!0,set:s}),2)}if(i!==t.target_&&typeof n.value=="function"){var o;if(ji(n.value)){var l,u=(l=this.options_)!=null&&l.autoBind?Re.bound:Re;return u.make_(t,e,n,i)}var d=(o=this.options_)!=null&&o.autoBind?Je.bound:Je;return d.make_(t,e,n,i)}var f=((a=this.options_)==null?void 0:a.deep)===!1?B.ref:B;if(typeof n.value=="function"&&(r=this.options_)!=null&&r.autoBind){var c;n.value=n.value.bind((c=t.proxy_)!=null?c:t.target_)}return f.make_(t,e,n,i)}function Ls(t,e,n,i){var a,r;if(n.get)return he.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:v.safeDescriptors?t.isPlainObject_:!0,set:ye(e.toString(),n.set)},i);if(typeof n.value=="function"&&(a=this.options_)!=null&&a.autoBind){var s;n.value=n.value.bind((s=t.proxy_)!=null?s:t.target_)}var o=((r=this.options_)==null?void 0:r.deep)===!1?B.ref:B;return o.extend_(t,e,n,i)}function Ps(t,e){L("'"+this.annotationType_+"' cannot be used as a decorator")}var Is="observable",Vs="observable.ref",js="observable.shallow",Us="observable.struct",qi={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(qi);function ut(t){return t||qi}var ln=Mt(Is),Ms=Mt(Vs,{enhancer:Ut}),$s=Mt(js,{enhancer:cs}),Bs=Mt(Us,{enhancer:fs}),Wi=se(ln);function dt(t){return t.deep===!0?ke:t.deep===!1?Ut:Gs(t.defaultDecorator)}function zs(t){var e;return t?(e=t.defaultDecorator)!=null?e:Hi(t):void 0}function Gs(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:ke}function Ji(t,e,n){if(nt(e))return ln.decorate_20223_(t,e);if(ve(e)){Pe(t,e,ln);return}return va(t)?t:me(t)?B.object(t,e,n):Array.isArray(t)?B.array(t,e):Le(t)?B.map(t,e):tt(t)?B.set(t,e):typeof t=="object"&&t!==null?t:B.box(t,e)}Li(Ji,Wi);var Ks={box:function(e,n){var i=ut(n);return new pe(e,dt(i),i.name,!0,i.equals)},array:function(e,n){var i=ut(n);return(v.useProxies===!1||i.proxy===!1?zo:Do)(e,dt(i),i.name)},map:function(e,n){var i=ut(n);return new Sa(e,dt(i),i.name)},set:function(e,n){var i=ut(n);return new Oa(e,dt(i),i.name)},object:function(e,n,i){return Ne(function(){return No(v.useProxies===!1||(i==null?void 0:i.proxy)===!1?Ve({},i):To({},i),e,n)})},ref:se(Ms),shallow:se($s),deep:Wi,struct:se(Bs)},B=Li(Ji,Ks),Zi="computed",Qs="computed.struct",un=An(Zi),Hs=An(Qs,{equals:yt.structural}),he=function(e,n){if(nt(n))return un.decorate_20223_(e,n);if(ve(n))return Pe(e,n,un);if(me(e))return se(An(Zi,e));var i=me(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new xe(i)};Object.assign(he,un);he.struct=se(Hs);var Hn,qn,bt=0,qs=1,Ws=(Hn=(qn=kt(function(){},"name"))==null?void 0:qn.configurable)!=null?Hn:!1,Wn={value:"action",configurable:!0,writable:!1,enumerable:!1};function ye(t,e,n,i){n===void 0&&(n=!1);function a(){return Js(t,n,e,i||this,arguments)}return a.isMobxAction=!0,a.toString=function(){return e.toString()},Ws&&(Wn.value=t,re(a,"name",Wn)),a}function Js(t,e,n,i,a){var r=Zs(t,e);try{return n.apply(i,a)}catch(s){throw r.error_=s,s}finally{Xs(r)}}function Zs(t,e,n,i){var a=!1,r=0,s=v.trackingDerivation,o=!e||!s;W();var l=v.allowStateChanges;o&&(Se(),l=En(!0));var u=Tn(!0),d={runAsAction_:o,prevDerivation_:s,prevAllowStateChanges_:l,prevAllowStateReads_:u,notifySpy_:a,startTime_:r,actionId_:qs++,parentActionId_:bt};return bt=d.actionId_,d}function Xs(t){bt!==t.actionId_&&L(30),bt=t.parentActionId_,t.error_!==void 0&&(v.suppressReactionErrors=!0),Cn(t.prevAllowStateChanges_),Qe(t.prevAllowStateReads_),J(),t.runAsAction_&&de(t.prevDerivation_),v.suppressReactionErrors=!1}function En(t){var e=v.allowStateChanges;return v.allowStateChanges=t,e}function Cn(t){v.allowStateChanges=t}var Xi;Xi=Symbol.toPrimitive;var pe=function(t){Bi(e,t);function e(i,a,r,s,o){var l;return r===void 0&&(r="ObservableValue"),o===void 0&&(o=yt.default),l=t.call(this,r)||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=a,l.name_=r,l.equals=o,l.value_=a(i,void 0,r),l}var n=e.prototype;return n.dehanceValue=function(a){return this.dehancer!==void 0?this.dehancer(a):a},n.set=function(a){this.value_,a=this.prepareNewValue_(a),a!==v.UNCHANGED&&this.setNewValue_(a)},n.prepareNewValue_=function(a){if(H(this)){var r=q(this,{object:this,type:oe,newValue:a});if(!r)return v.UNCHANGED;a=r.newValue}return a=this.enhancer(a,this.value_,this.name_),this.equals(this.value_,a)?v.UNCHANGED:a},n.setNewValue_=function(a){var r=this.value_;this.value_=a,this.reportChanged(),Y(this)&&ee(this,{type:oe,object:this,newValue:a,oldValue:r})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(a){return rt(this,a)},n.observe_=function(a,r){return r&&a({observableKind:"value",debugObjectName:this.name_,object:this,type:oe,newValue:this.value_,oldValue:void 0}),st(this,a)},n.raw=function(){return this.value_},n.toJSON=function(){return this.get()},n.toString=function(){return this.name_+"["+this.value_+"]"},n.valueOf=function(){return $i(this.get())},n[Xi]=function(){return this.valueOf()},e}(it),Yi;Yi=Symbol.toPrimitive;var xe=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 _t(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_=St.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||L(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=ye("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?yt.structural:yt.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){io(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_&&L(32,this.name_,this.derivation),v.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)dn(this)&&(this.warnAboutUntrackedRead_(),W(),this.value_=this.computeValue_(!1),J());else if(sa(this),dn(this)){var i=v.trackingContext;this.keepAlive_&&!i&&(v.trackingContext=this),this.trackAndCompute()&&no(this),v.trackingContext=i}var a=this.value_;if(mt(a))throw a.cause;return a},e.set=function(i){if(this.setter_){this.isRunningSetter_&&L(33,this.name_),this.isRunningSetter_=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter_=!1}}else L(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,a=this.dependenciesState_===I.NOT_TRACKING_,r=this.computeValue_(!0),s=a||mt(i)||mt(r)||!this.equals_(i,r);return s&&(this.value_=r),s},e.computeValue_=function(i){this.isComputing_=!0;var a=En(!1),r;if(i)r=ea(this,this.derivation,this.scope_);else if(v.disableErrorBoundaries===!0)r=this.derivation.call(this.scope_);else try{r=this.derivation.call(this.scope_)}catch(s){r=new _t(s)}return Cn(a),this.isComputing_=!1,r},e.suspend_=function(){this.keepAlive_||(cn(this),this.value_=void 0)},e.observe_=function(i,a){var r=this,s=!0,o=void 0;return ho(function(){var l=r.get();if(!s||a){var u=Se();i({observableKind:"computed",debugObjectName:r.name_,type:oe,object:r,newValue:l,oldValue:o}),de(u)}s=!1,o=l})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return $i(this.get())},e[Yi]=function(){return this.valueOf()},t}(),$t=be("ComputedValue",xe),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 St;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(St||(St={}));var _t=function(e){this.cause=void 0,this.cause=e};function mt(t){return t instanceof _t}function dn(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=Tn(!0),n=Se(),i=t.observing_,a=i.length,r=0;r<a;r++){var s=i[r];if($t(s)){if(v.disableErrorBoundaries)s.get();else try{s.get()}catch{return de(n),Qe(e),!0}if(t.dependenciesState_===I.STALE_)return de(n),Qe(e),!0}}return na(t),de(n),Qe(e),!1}}}function ea(t,e,n){var i=Tn(!0);na(t),t.newObserving_=new Array(t.runId_===0?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++v.runId;var a=v.trackingDerivation;v.trackingDerivation=t,v.inBatch++;var r;if(v.disableErrorBoundaries===!0)r=e.call(n);else try{r=e.call(n)}catch(s){r=new _t(s)}return v.inBatch--,v.trackingDerivation=a,Ys(t),Qe(i),r}function Ys(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=I.UP_TO_DATE_,a=0,r=t.unboundDepsCount_,s=0;s<r;s++){var o=n[s];o.diffValue_===0&&(o.diffValue_=1,a!==s&&(n[a]=o),a++),o.dependenciesState_>i&&(i=o.dependenciesState_)}for(n.length=a,t.newObserving_=null,r=e.length;r--;){var l=e[r];l.diffValue_===0&&aa(l,t),l.diffValue_=0}for(;a--;){var u=n[a];u.diffValue_===1&&(u.diffValue_=0,to(u,t))}i!==I.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function cn(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)aa(e[n],t);t.dependenciesState_=I.NOT_TRACKING_}function ta(t){var e=Se();try{return t()}finally{de(e)}}function Se(){var t=v.trackingDerivation;return v.trackingDerivation=null,t}function de(t){v.trackingDerivation=t}function Tn(t){var e=v.allowStateReads;return v.allowStateReads=t,e}function Qe(t){v.allowStateReads=t}function na(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 ht=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},pt=!0,ia=!1,v=function(){var t=On();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(pt=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new ht().version&&(pt=!1),pt?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new ht):(setTimeout(function(){ia||L(35)},1),new ht)}();function eo(){if((v.pendingReactions.length||v.inBatch||v.isRunningReactions)&&L(36),ia=!0,pt){var t=On();--t.__mobxInstanceCount===0&&(t.__mobxGlobals=void 0),v=new ht}}function to(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function aa(t,e){t.observers_.delete(e),t.observers_.size===0&&ra(t)}function ra(t){t.isPendingUnobservation_===!1&&(t.isPendingUnobservation_=!0,v.pendingUnobservations.push(t))}function W(){v.inBatch++}function J(){if(--v.inBatch===0){la();for(var t=v.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 xe&&n.suspend_())}v.pendingUnobservations=[]}}function sa(t){var e=v.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved_&&v.trackingContext&&(t.isBeingObserved_=!0,t.onBO())),t.isBeingObserved_):(t.observers_.size===0&&v.inBatch>0&&ra(t),!1)}function oa(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 no(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 io(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 We=function(){function t(n,i,a,r){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_=St.NONE,this.name_=n,this.onInvalidate_=i,this.errorHandler_=a,this.requiresObservable_=r}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled_||(this.isScheduled_=!0,v.pendingReactions.push(this),la())},e.isScheduled=function(){return this.isScheduled_},e.runReaction_=function(){if(!this.isDisposed_){W(),this.isScheduled_=!1;var i=v.trackingContext;if(v.trackingContext=this,dn(this)){this.isTrackPending_=!0;try{this.onInvalidate_()}catch(a){this.reportExceptionInDerivation_(a)}}v.trackingContext=i,J()}},e.track=function(i){if(!this.isDisposed_){W(),this.isRunning_=!0;var a=v.trackingContext;v.trackingContext=this;var r=ea(this,i,void 0);v.trackingContext=a,this.isRunning_=!1,this.isTrackPending_=!1,this.isDisposed_&&cn(this),mt(r)&&this.reportExceptionInDerivation_(r.cause),J()}},e.reportExceptionInDerivation_=function(i){var a=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(v.disableErrorBoundaries)throw i;var r="[mobx] uncaught error in '"+this+"'";v.suppressReactionErrors||console.error(r,i),v.globalReactionErrorHandlers.forEach(function(s){return s(i,a)})},e.dispose=function(){this.isDisposed_||(this.isDisposed_=!0,this.isRunning_||(W(),cn(this),J()))},e.getDisposer_=function(i){var a=this,r=function s(){a.dispose(),i==null||i.removeEventListener==null||i.removeEventListener("abort",s)};return i==null||i.addEventListener==null||i.addEventListener("abort",r),r[E]=this,r},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},t}(),ao=100,fn=function(e){return e()};function la(){v.inBatch>0||v.isRunningReactions||fn(ro)}function ro(){v.isRunningReactions=!0;for(var t=v.pendingReactions,e=0;t.length>0;){++e===ao&&(console.error("[mobx] cycle in reaction: "+t[0]),t.splice(0));for(var n=t.splice(0),i=0,a=n.length;i<a;i++)n[i].runReaction_()}v.isRunningReactions=!1}var Nt=be("Reaction",We);function so(t){var e=fn;fn=function(i){return t(function(){return e(i)})}}function He(){return!1}function oo(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var ua="action",lo="action.bound",da="autoAction",uo="autoAction.bound",co="<unnamed action>",mn=at(ua),fo=at(lo,{bound:!0}),hn=at(da,{autoAction:!0}),mo=at(uo,{autoAction:!0,bound:!0});function ca(t){var e=function(i,a){if(te(i))return ye(i.name||co,i,t);if(te(a))return ye(i,a,t);if(nt(a))return(t?hn:mn).decorate_20223_(i,a);if(ve(a))return Pe(i,a,t?hn:mn);if(ve(i))return se(at(t?da:ua,{name:i,autoAction:t}))};return e}var ce=ca(!1);Object.assign(ce,mn);var Je=ca(!0);Object.assign(Je,hn);ce.bound=se(fo);Je.bound=se(mo);function Bt(t){return te(t)&&t.isMobxAction===!0}function ho(t,e){var n,i,a,r,s;e===void 0&&(e=Pi);var o=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",l=!e.scheduler&&!e.delay,u;if(l)u=new We(o,function(){this.track(c)},e.onError,e.requiresObservable);else{var d=vo(e),f=!1;u=new We(o,function(){f||(f=!0,d(function(){f=!1,u.isDisposed_||u.track(c)}))},e.onError,e.requiresObservable)}function c(){t(u)}return(a=e)!=null&&(r=a.signal)!=null&&r.aborted||u.schedule_(),u.getDisposer_((s=e)==null?void 0:s.signal)}var po=function(e){return e()};function vo(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:po}var go="onBO",ko="onBUO";function yo(t,e,n){return ma(go,t,e,n)}function fa(t,e,n){return ma(ko,t,e,n)}function ma(t,e,n,i){var a=Ft(e),r=te(i)?i:n,s=t+"L";return a[s]?a[s].add(r):a[s]=new Set([r]),function(){var o=a[s];o&&(o.delete(r),o.size===0&&delete a[s])}}var bo="never",ct="always",So="observed";function _o(t){t.isolateGlobalState===!0&&eo();var e=t.useProxies,n=t.enforceActions;if(e!==void 0&&(v.useProxies=e===ct?!0:e===bo?!1:typeof Proxy!="undefined"),e==="ifavailable"&&(v.verifyProxies=!0),n!==void 0){var i=n===ct?ct:n===So;v.enforceActions=i,v.allowStateChanges=!(i===!0||i===ct)}["computedRequiresReaction","reactionRequiresObservable","observableRequiresReaction","disableErrorBoundaries","safeDescriptors"].forEach(function(a){a in t&&(v[a]=!!t[a])}),v.allowStateReads=!v.observableRequiresReaction,t.reactionScheduler&&so(t.reactionScheduler)}function No(t,e,n,i){var a=ts(e);return Ne(function(){var r=Ve(t,i)[E];jt(a).forEach(function(s){r.extend_(s,a[s],n&&s in n?n[s]:!0)})}),t}function Oo(t,e){return ha(Ft(t,e))}function ha(t){var e={name:t.name_};return t.observing_&&t.observing_.length>0&&(e.dependencies=wo(t.observing_).map(ha)),e}function wo(t){return Array.from(new Set(t))}var Fo=0;function pa(){this.message="FLOW_CANCELLED"}pa.prototype=Object.create(Error.prototype);var Xt=Ki("flow"),Ao=Ki("flow.bound",{bound:!0}),Re=Object.assign(function(e,n){if(nt(n))return Xt.decorate_20223_(e,n);if(ve(n))return Pe(e,n,Xt);var i=e,a=i.name||"<unnamed flow>",r=function(){var o=this,l=arguments,u=++Fo,d=ce(a+" - runid: "+u+" - init",i).apply(o,l),f,c=void 0,S=new Promise(function(w,g){var N=0;f=g;function k(F){c=void 0;var T;try{T=ce(a+" - runid: "+u+" - yield "+N++,d.next).call(d,F)}catch(P){return g(P)}V(T)}function D(F){c=void 0;var T;try{T=ce(a+" - runid: "+u+" - yield "+N++,d.throw).call(d,F)}catch(P){return g(P)}V(T)}function V(F){if(te(F==null?void 0:F.then)){F.then(V,g);return}return F.done?w(F.value):(c=Promise.resolve(F.value),c.then(k,D))}k(void 0)});return S.cancel=ce(a+" - runid: "+u+" - cancel",function(){try{c&&Jn(c);var w=d.return(void 0),g=Promise.resolve(w.value);g.then(Ce,Ce),Jn(g),f(new pa)}catch(N){f(N)}}),S};return r.isMobXFlow=!0,r},Xt);Re.bound=se(Ao);function Jn(t){te(t.cancel)&&t.cancel()}function Ze(t){return(t==null?void 0:t.isMobXFlow)===!0}function Eo(t,e){return t?Gt(t)||!!t[E]||Fn(t)||Nt(t)||$t(t):!1}function va(t){return Eo(t)}function le(t,e){e===void 0&&(e=void 0),W();try{return t.apply(e)}finally{J()}}function we(t){return t[E]}var Co={has:function(e,n){return we(e).has_(n)},get:function(e,n){return we(e).get_(n)},set:function(e,n,i){var a;return ve(n)?(a=we(e).set_(n,i,!0))!=null?a:!0:!1},deleteProperty:function(e,n){var i;return ve(n)?(i=we(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var a;return(a=we(e).defineProperty_(n,i))!=null?a:!0},ownKeys:function(e){return we(e).ownKeys_()},preventExtensions:function(e){L(13)}};function To(t,e){var n,i;return Ii(),t=Ve(t,e),(i=(n=t[E]).proxy_)!=null?i:n.proxy_=new Proxy(t,Co)}function H(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function rt(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),Vi(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function q(t,e){var n=Se();try{for(var i=[].concat(t.interceptors_||[]),a=0,r=i.length;a<r&&(e=i[a](e),e&&!e.type&&L(14),!!e);a++);return e}finally{de(n)}}function Y(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function st(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),Vi(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function ee(t,e){var n=Se(),i=t.changeListeners_;if(i){i=i.slice();for(var a=0,r=i.length;a<r;a++)i[a](e);de(n)}}function ga(t,e,n){return Ne(function(){var i,a=Ve(t,n)[E];(i=e)!=null||(e=ss(t)),jt(e).forEach(function(r){return a.make_(r,e[r])})}),t}var Zn="splice",oe="update",xo=1e4,Ro={get:function(e,n){var i=e[E];return n===E?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):ue(Ot,n)?Ot[n]:e[n]},set:function(e,n,i){var a=e[E];return n==="length"&&a.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:a.set_(parseInt(n),i),!0},preventExtensions:function(){L(15)}},xn=function(){function t(n,i,a,r){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_=a,this.legacyMode_=r,this.atom_=new it(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 rt(this,i)},e.observe_=function(i,a){return a===void 0&&(a=!1),a&&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}),st(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&L("Out of range: "+i);var a=this.values_.length;if(i!==a)if(i>a){for(var r=new Array(i-a),s=0;s<i-a;s++)r[s]=void 0;this.spliceWithArray_(a,0,r)}else this.spliceWithArray_(i,a-i)},e.updateArrayLength_=function(i,a){i!==this.lastKnownLength_&&L(16),this.lastKnownLength_+=a,this.legacyMode_&&a>0&&Ea(i+a+1)},e.spliceWithArray_=function(i,a,r){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?a=o-i:a==null?a=0:a=Math.max(0,Math.min(a,o-i)),r===void 0&&(r=sn),H(this)){var l=q(this,{object:this.proxy_,type:Zn,index:i,removedCount:a,added:r});if(!l)return sn;a=l.removedCount,r=l.added}if(r=r.length===0?r:r.map(function(f){return s.enhancer_(f,void 0)}),this.legacyMode_){var u=r.length-a;this.updateArrayLength_(o,u)}var d=this.spliceItemsIntoValues_(i,a,r);return(a!==0||r.length!==0)&&this.notifyArraySplice_(i,r,d),this.dehanceValues_(d)},e.spliceItemsIntoValues_=function(i,a,r){if(r.length<xo){var s;return(s=this.values_).splice.apply(s,[i,a].concat(r))}else{var o=this.values_.slice(i,i+a),l=this.values_.slice(i+a);this.values_.length+=r.length-a;for(var u=0;u<r.length;u++)this.values_[i+u]=r[u];for(var d=0;d<l.length;d++)this.values_[i+r.length+d]=l[d];return o}},e.notifyArrayChildUpdate_=function(i,a,r){var s=!this.owned_&&He(),o=Y(this),l=o||s?{observableKind:"array",object:this.proxy_,type:oe,debugObjectName:this.atom_.name_,index:i,newValue:a,oldValue:r}:null;this.atom_.reportChanged(),o&&ee(this,l)},e.notifyArraySplice_=function(i,a,r){var s=!this.owned_&&He(),o=Y(this),l=o||s?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:Zn,index:i,removed:r,added:a,removedCount:r.length,addedCount:a.length}:null;this.atom_.reportChanged(),o&&ee(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,a){var r=this.values_;if(this.legacyMode_&&i>r.length&&L(17,i,r.length),i<r.length){this.atom_;var s=r[i];if(H(this)){var o=q(this,{type:oe,object:this.proxy_,index:i,newValue:a});if(!o)return;a=o.newValue}a=this.enhancer_(a,s);var l=a!==s;l&&(r[i]=a,this.notifyArrayChildUpdate_(i,a,s))}else{for(var u=new Array(i+1-r.length),d=0;d<u.length-1;d++)u[d]=void 0;u[u.length-1]=a,this.spliceWithArray_(r.length,0,u)}},t}();function Do(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),Ii(),Ne(function(){var a=new xn(n,e,i,!1);Ui(a.values_,E,a);var r=new Proxy(a.values_,Ro);return a.proxy_=r,t&&t.length&&a.spliceWithArray_(0,0,t),r})}var Ot={clear:function(){return this.splice(0)},replace:function(e){var n=this[E];return n.spliceWithArray_(0,n.values_.length,e)},toJSON:function(){return this.slice()},splice:function(e,n){for(var i=arguments.length,a=new Array(i>2?i-2:0),r=2;r<i;r++)a[r-2]=arguments[r];var s=this[E];switch(arguments.length){case 0:return[];case 1:return s.spliceWithArray_(e);case 2:return s.spliceWithArray_(e,n)}return s.spliceWithArray_(e,n,a)},spliceWithArray:function(e,n,i){return this[E].spliceWithArray_(e,n,i)},push:function(){for(var e=this[E],n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e.spliceWithArray_(e.values_.length,0,i),e.values_.length},pop:function(){return this.splice(Math.max(this[E].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[E],n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e.spliceWithArray_(0,0,i),e.values_.length},reverse:function(){return v.trackingDerivation&&L(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){v.trackingDerivation&&L(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[E],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};M("at",Q);M("concat",Q);M("flat",Q);M("includes",Q);M("indexOf",Q);M("join",Q);M("lastIndexOf",Q);M("slice",Q);M("toString",Q);M("toLocaleString",Q);M("toSorted",Q);M("toSpliced",Q);M("with",Q);M("every",ne);M("filter",ne);M("find",ne);M("findIndex",ne);M("findLast",ne);M("findLastIndex",ne);M("flatMap",ne);M("forEach",ne);M("map",ne);M("some",ne);M("toReversed",ne);M("reduce",ka);M("reduceRight",ka);function M(t,e){typeof Array.prototype[t]=="function"&&(Ot[t]=e(t))}function Q(t){return function(){var e=this[E];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function ne(t){return function(e,n){var i=this,a=this[E];a.atom_.reportObserved();var r=a.dehanceValues_(a.values_);return r[t](function(s,o){return e.call(n,s,o,i)})}}function ka(t){return function(){var e=this,n=this[E];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),a=arguments[0];return arguments[0]=function(r,s,o){return a(r,s,o,e)},i[t].apply(i,arguments)}}var Lo=be("ObservableArrayAdministration",xn);function zt(t){return It(t)&&Lo(t[E])}var ya,ba,Po={},fe="add",wt="delete";ya=Symbol.iterator;ba=Symbol.toStringTag;var Sa=function(){function t(n,i,a){var r=this;i===void 0&&(i=ke),a===void 0&&(a="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[E]=Po,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_=a,te(Map)||L(18),Ne(function(){r.keysAtom_=zi("ObservableMap.keys()"),r.data_=new Map,r.hasMap_=new Map,n&&r.merge(n)})}var e=t.prototype;return e.has_=function(i){return this.data_.has(i)},e.has=function(i){var a=this;if(!v.trackingDerivation)return this.has_(i);var r=this.hasMap_.get(i);if(!r){var s=r=new pe(this.has_(i),Ut,"ObservableMap.key?",!1);this.hasMap_.set(i,s),fa(s,function(){return a.hasMap_.delete(i)})}return r.get()},e.set=function(i,a){var r=this.has_(i);if(H(this)){var s=q(this,{type:r?oe:fe,object:this,newValue:a,name:i});if(!s)return this;a=s.newValue}return r?this.updateValue_(i,a):this.addValue_(i,a),this},e.delete=function(i){var a=this;if(this.keysAtom_,H(this)){var r=q(this,{type:wt,object:this,name:i});if(!r)return!1}if(this.has_(i)){var s=He(),o=Y(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:wt,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return le(function(){var u;a.keysAtom_.reportChanged(),(u=a.hasMap_.get(i))==null||u.setNewValue_(!1);var d=a.data_.get(i);d.setNewValue_(void 0),a.data_.delete(i)}),o&&ee(this,l),!0}return!1},e.updateValue_=function(i,a){var r=this.data_.get(i);if(a=r.prepareNewValue_(a),a!==v.UNCHANGED){var s=He(),o=Y(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:oe,object:this,oldValue:r.value_,name:i,newValue:a}:null;r.setNewValue_(a),o&&ee(this,l)}},e.addValue_=function(i,a){var r=this;this.keysAtom_,le(function(){var u,d=new pe(a,r.enhancer_,"ObservableMap.key",!1);r.data_.set(i,d),a=d.value_,(u=r.hasMap_.get(i))==null||u.setNewValue_(!0),r.keysAtom_.reportChanged()});var s=He(),o=Y(this),l=o||s?{observableKind:"map",debugObjectName:this.name_,type:fe,object:this,name:i,newValue:a}:null;o&&ee(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,a=this.keys();return Xe({next:function(){var s=a.next(),o=s.done,l=s.value;return{done:o,value:o?void 0:i.get(l)}}})},e.entries=function(){var i=this,a=this.keys();return Xe({next:function(){var s=a.next(),o=s.done,l=s.value;return{done:o,value:o?void 0:[l,i.get(l)]}}})},e[ya]=function(){return this.entries()},e.forEach=function(i,a){for(var r=Te(this),s;!(s=r()).done;){var o=s.value,l=o[0],u=o[1];i.call(a,u,l,this)}},e.merge=function(i){var a=this;return _e(i)&&(i=new Map(i)),le(function(){me(i)?es(i).forEach(function(r){return a.set(r,i[r])}):Array.isArray(i)?i.forEach(function(r){var s=r[0],o=r[1];return a.set(s,o)}):Le(i)?(i.constructor!==Map&&L(19,i),i.forEach(function(r,s){return a.set(s,r)})):i!=null&&L(20,i)}),this},e.clear=function(){var i=this;le(function(){ta(function(){for(var a=Te(i.keys()),r;!(r=a()).done;){var s=r.value;i.delete(s)}})})},e.replace=function(i){var a=this;return le(function(){for(var r=Io(i),s=new Map,o=!1,l=Te(a.data_.keys()),u;!(u=l()).done;){var d=u.value;if(!r.has(d)){var f=a.delete(d);if(f)o=!0;else{var c=a.data_.get(d);s.set(d,c)}}}for(var S=Te(r.entries()),w;!(w=S()).done;){var g=w.value,N=g[0],k=g[1],D=a.data_.has(N);if(a.set(N,k),a.data_.has(N)){var V=a.data_.get(N);s.set(N,V),D||(o=!0)}}if(!o)if(a.data_.size!==s.size)a.keysAtom_.reportChanged();else for(var F=a.data_.keys(),T=s.keys(),P=F.next(),U=T.next();!P.done;){if(P.value!==U.value){a.keysAtom_.reportChanged();break}P=F.next(),U=T.next()}a.data_=s}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,a){return st(this,i)},e.intercept_=function(i){return rt(this,i)},wn(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:ba,get:function(){return"Map"}}]),t}(),_e=be("ObservableMap",Sa);function Io(t){if(Le(t)||_e(t))return t;if(Array.isArray(t))return new Map(t);if(me(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return L(21,t)}var _a,Na,Vo={};_a=Symbol.iterator;Na=Symbol.toStringTag;var Oa=function(){function t(n,i,a){var r=this;i===void 0&&(i=ke),a===void 0&&(a="ObservableSet"),this.name_=void 0,this[E]=Vo,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_=a,te(Set)||L(22),this.enhancer_=function(s,o){return i(s,o,a)},Ne(function(){r.atom_=zi(r.name_),n&&r.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;le(function(){ta(function(){for(var a=Te(i.data_.values()),r;!(r=a()).done;){var s=r.value;i.delete(s)}})})},e.forEach=function(i,a){for(var r=Te(this),s;!(s=r()).done;){var o=s.value;i.call(a,o,o,this)}},e.add=function(i){var a=this;if(this.atom_,H(this)){var r=q(this,{type:fe,object:this,newValue:i});if(!r)return this}if(!this.has(i)){le(function(){a.data_.add(a.enhancer_(i,void 0)),a.atom_.reportChanged()});var s=!1,o=Y(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:fe,object:this,newValue:i}:null;o&&ee(this,l)}return this},e.delete=function(i){var a=this;if(H(this)){var r=q(this,{type:wt,object:this,oldValue:i});if(!r)return!1}if(this.has(i)){var s=!1,o=Y(this),l=o||s?{observableKind:"set",debugObjectName:this.name_,type:wt,object:this,oldValue:i}:null;return le(function(){a.atom_.reportChanged(),a.data_.delete(i)}),o&&ee(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,a=Array.from(this.keys()),r=Array.from(this.values());return Xe({next:function(){var o=i;return i+=1,o<r.length?{value:[a[o],r[o]],done:!1}:{done:!0}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var i=this,a=0,r=Array.from(this.data_.values());return Xe({next:function(){return a<r.length?{value:i.dehanceValue_(r[a++]),done:!1}:{done:!0}}})},e.replace=function(i){var a=this;return Ie(i)&&(i=new Set(i)),le(function(){Array.isArray(i)?(a.clear(),i.forEach(function(r){return a.add(r)})):tt(i)?(a.clear(),i.forEach(function(r){return a.add(r)})):i!=null&&L("Cannot initialize set from "+i)}),this},e.observe_=function(i,a){return st(this,i)},e.intercept_=function(i){return rt(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[_a]=function(){return this.values()},wn(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Na,get:function(){return"Set"}}]),t}(),Ie=be("ObservableSet",Oa),Xn=Object.create(null),Yn="remove",wa=function(){function t(n,i,a,r){i===void 0&&(i=new Map),r===void 0&&(r=Rs),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_=a,this.defaultAnnotation_=r,this.keysAtom_=new it("ObservableObject.keys"),this.isPlainObject_=me(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(i){return this.values_.get(i).get()},e.setObservablePropValue_=function(i,a){var r=this.values_.get(i);if(r instanceof xe)return r.set(a),!0;if(H(this)){var s=q(this,{type:oe,object:this.proxy_||this.target_,name:i,newValue:a});if(!s)return null;a=s.newValue}if(a=r.prepareNewValue_(a),a!==v.UNCHANGED){var o=Y(this),l=!1,u=o||l?{type:oe,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:r.value_,name:i,newValue:a}:null;r.setNewValue_(a),o&&ee(this,u)}return!0},e.get_=function(i){return v.trackingDerivation&&!ue(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,a,r){return r===void 0&&(r=!1),ue(this.target_,i)?this.values_.has(i)?this.setObservablePropValue_(i,a):r?Reflect.set(this.target_,i,a):(this.target_[i]=a,!0):this.extend_(i,{value:a,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,r)},e.has_=function(i){if(!v.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var a=this.pendingKeys_.get(i);return a||(a=new pe(i in this.target_,Ut,"ObservableObject.key?",!1),this.pendingKeys_.set(i,a)),a.get()},e.make_=function(i,a){if(a===!0&&(a=this.defaultAnnotation_),a!==!1){if(!(i in this.target_)){var r;if((r=this.target_[ie])!=null&&r[i])return;L(1,a.annotationType_,this.name_+"."+i.toString())}for(var s=this.target_;s&&s!==Pt;){var o=kt(s,i);if(o){var l=a.make_(this,i,o,s);if(l===0)return;if(l===1)break}s=Object.getPrototypeOf(s)}ti(this,a,i)}},e.extend_=function(i,a,r,s){if(s===void 0&&(s=!1),r===!0&&(r=this.defaultAnnotation_),r===!1)return this.defineProperty_(i,a,s);var o=r.extend_(this,i,a,s);return o&&ti(this,r,i),o},e.defineProperty_=function(i,a,r){r===void 0&&(r=!1),this.keysAtom_;try{W();var s=this.delete_(i);if(!s)return s;if(H(this)){var o=q(this,{object:this.proxy_||this.target_,name:i,type:fe,newValue:a.value});if(!o)return null;var l=o.newValue;a.value!==l&&(a=ge({},a,{value:l}))}if(r){if(!Reflect.defineProperty(this.target_,i,a))return!1}else re(this.target_,i,a);this.notifyPropertyAddition_(i,a.value)}finally{J()}return!0},e.defineObservableProperty_=function(i,a,r,s){s===void 0&&(s=!1),this.keysAtom_;try{W();var o=this.delete_(i);if(!o)return o;if(H(this)){var l=q(this,{object:this.proxy_||this.target_,name:i,type:fe,newValue:a});if(!l)return null;a=l.newValue}var u=ei(i),d={configurable:v.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:u.get,set:u.set};if(s){if(!Reflect.defineProperty(this.target_,i,d))return!1}else re(this.target_,i,d);var f=new pe(a,r,"ObservableObject.key",!1);this.values_.set(i,f),this.notifyPropertyAddition_(i,f.value_)}finally{J()}return!0},e.defineComputedProperty_=function(i,a,r){r===void 0&&(r=!1),this.keysAtom_;try{W();var s=this.delete_(i);if(!s)return s;if(H(this)){var o=q(this,{object:this.proxy_||this.target_,name:i,type:fe,newValue:void 0});if(!o)return null}a.name||(a.name="ObservableObject.key"),a.context=this.proxy_||this.target_;var l=ei(i),u={configurable:v.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:l.get,set:l.set};if(r){if(!Reflect.defineProperty(this.target_,i,u))return!1}else re(this.target_,i,u);this.values_.set(i,new xe(a)),this.notifyPropertyAddition_(i,void 0)}finally{J()}return!0},e.delete_=function(i,a){if(a===void 0&&(a=!1),this.keysAtom_,!ue(this.target_,i))return!0;if(H(this)){var r=q(this,{object:this.proxy_||this.target_,name:i,type:Yn});if(!r)return null}try{var s,o;W();var l=Y(this),u=!1,d=this.values_.get(i),f=void 0;if(!d&&(l||u)){var c;f=(c=kt(this.target_,i))==null?void 0:c.value}if(a){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(d&&(this.values_.delete(i),d instanceof pe&&(f=d.value_),oa(d)),this.keysAtom_.reportChanged(),(s=this.pendingKeys_)==null||(o=s.get(i))==null||o.set(i in this.target_),l||u){var S={type:Yn,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:f,name:i};l&&ee(this,S)}}finally{J()}return!0},e.observe_=function(i,a){return st(this,i)},e.intercept_=function(i){return rt(this,i)},e.notifyPropertyAddition_=function(i,a){var r,s,o=Y(this),l=!1;if(o||l){var u=o||l?{type:fe,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:a}:null;o&&ee(this,u)}(r=this.pendingKeys_)==null||(s=r.get(i))==null||s.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),jt(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function Ve(t,e){var n;if(ue(t,E))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",a=new wa(t,new Map,String(i),zs(e));return Vt(t,E,a),t}var jo=be("ObservableObjectAdministration",wa);function ei(t){return Xn[t]||(Xn[t]={get:function(){return this[E].getObservablePropValue_(t)},set:function(n){return this[E].setObservablePropValue_(t,n)}})}function Gt(t){return It(t)?jo(t[E]):!1}function ti(t,e,n){var i;(i=t.target_[ie])==null||delete i[n]}var Uo=Aa(0),Mo=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),Yt=0,Fa=function(){};function $o(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}$o(Fa,Array.prototype);var Rn=function(t,e,n){Bi(i,t);function i(r,s,o,l){var u;return o===void 0&&(o="ObservableArray"),l===void 0&&(l=!1),u=t.call(this)||this,Ne(function(){var d=new xn(o,s,l,!0);d.proxy_=Zt(u),Ui(Zt(u),E,d),r&&r.length&&u.spliceWithArray(0,0,r),Mo&&Object.defineProperty(Zt(u),"0",Uo)}),u}var a=i.prototype;return a.concat=function(){this[E].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 zt(u)?u.slice():u}))},a[n]=function(){var r=this,s=0;return Xe({next:function(){return s<r.length?{value:r[s++],done:!1}:{done:!0,value:void 0}}})},wn(i,[{key:"length",get:function(){return this[E].getArrayLength_()},set:function(s){this[E].setArrayLength_(s)}},{key:e,get:function(){return"Array"}}]),i}(Fa,Symbol.toStringTag,Symbol.iterator);Object.entries(Ot).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&Vt(Rn.prototype,e,n)});function Aa(t){return{enumerable:!1,configurable:!0,get:function(){return this[E].get_(t)},set:function(n){this[E].set_(t,n)}}}function Bo(t){re(Rn.prototype,""+t,Aa(t))}function Ea(t){if(t>Yt){for(var e=Yt;e<t+100;e++)Bo(e);Yt=t}}Ea(1e3);function zo(t,e,n){return new Rn(t,e,n)}function Ft(t,e){if(typeof t=="object"&&t!==null){if(zt(t))return e!==void 0&&L(23),t[E].atom_;if(Ie(t))return t.atom_;if(_e(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||L(25,e,pn(t)),n}if(Gt(t)){if(!e)return L(26);var i=t[E].values_.get(e);return i||L(27,e,pn(t)),i}if(Fn(t)||$t(t)||Nt(t))return t}else if(te(t)&&Nt(t[E]))return t[E];L(28)}function Go(t,e){if(t||L(29),Fn(t)||$t(t)||Nt(t)||_e(t)||Ie(t))return t;if(t[E])return t[E];L(24,t)}function pn(t,e){var n;if(e!==void 0)n=Ft(t,e);else{if(Bt(t))return t.name;Gt(t)||_e(t)||Ie(t)?n=Go(t):n=Ft(t)}return n.name_}function Ne(t){var e=Se(),n=En(!0);W();try{return t()}finally{J(),Cn(n),de(e)}}var ni=Pt.toString;function Dn(t,e,n){return n===void 0&&(n=-1),vn(t,e,n)}function vn(t,e,n,i,a){if(t===e)return t!==0||1/t===1/e;if(t==null||e==null)return!1;if(t!==t)return e!==e;var r=typeof t;if(r!=="function"&&r!=="object"&&typeof e!="object")return!1;var s=ni.call(t);if(s!==ni.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=ii(t),e=ii(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&&!(te(l)&&l instanceof l&&te(u)&&u instanceof u)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],a=a||[];for(var d=i.length;d--;)if(i[d]===t)return a[d]===e;if(i.push(t),a.push(e),o){if(d=t.length,d!==e.length)return!1;for(;d--;)if(!vn(t[d],e[d],n-1,i,a))return!1}else{var f=Object.keys(t),c;if(d=f.length,Object.keys(e).length!==d)return!1;for(;d--;)if(c=f[d],!(ue(e,c)&&vn(t[c],e[c],n-1,i,a)))return!1}return i.pop(),a.pop(),!0}function ii(t){return zt(t)?t.slice():Le(t)||_e(t)||tt(t)||Ie(t)?Array.from(t.entries()):t}function Xe(t){return t[Symbol.iterator]=Ko,t}function Ko(){return this}["Symbol","Map","Set"].forEach(function(t){var e=On();typeof e[t]=="undefined"&&L("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:oo,extras:{getDebugName:pn},$mobx:E});class Ca{constructor(e,n){C(this,"channel");C(this,"listeners",new Map);C(this,"eventQueue",new Map);this.logger=n;try{this.channel=new BroadcastChannel(e),this.channel.onmessage=i=>this.handleMessage(i),this.channel.onmessageerror=i=>this.logger.error("NizzaBroadcastChannel:",i)}catch(i){throw this.logger.error("Failed to create NizzaBroadcastChannel:",i),i}}on(e,n){return this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;for(const[a,r]of this.listeners.entries())this.matchWildcard(a,i)&&r.forEach(s=>s({...n,wildcard:a}))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const i=new Error("Invalid arguments");throw this.logger.error(i),i}for(const[i,a]of this.listeners.entries())if(this.matchWildcard(i,e)){a.add(n);const r=this.eventQueue.get(i);r&&(r.forEach(s=>{n({...s,wildcard:i})}),this.eventQueue.delete(i));return}this.listeners.set(e,new Set([n]))}emitEvent(e,n,i){if(typeof e!="string"){const s=new Error("Invalid arguments");throw this.logger.error(s),s}const a={name:e,data:n,attrs:i},r=Array.from(this.getMatchingListeners(e));if(r.length)for(const[s,o]of r)o({...a,wildcard:s});else this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(a);this.channel.postMessage(a)}*getMatchingListeners(e){for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,e))for(const a of i)yield[n,a]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){const i=this.listeners.get(e);i.delete(n),i.size===0&&this.listeners.delete(e)}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*");return new RegExp(`^${i}$`).test(n)}}const Qo="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Ho=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=Qo[n[t]&63];return e};const Ta=(t=8)=>Ho(t),qo=t=>{const e=Object.entries(t).reduce((n,[i,a])=>a!==void 0?`${n}${n?"&":""}${i}=${a}`:n,"");return e?`?${e}`:""};function Wo(){const t=new Error().stack.split(`
4
+ `);return t.length<3?"":t[2].trim().substring(3)}var xa=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ra(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Da={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(xa,function(){var e=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"],r={},s=null;function o(g,N){var k=g[N];if(typeof k.bind=="function")return k.bind(g);try{return Function.prototype.bind.call(k,g)}catch{return function(){return Function.prototype.apply.apply(k,[g,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(g){return g==="debug"&&(g="log"),typeof console===n?!1:g==="trace"&&i?l:console[g]!==void 0?o(console,g):console.log!==void 0?o(console,"log"):e}function d(){for(var g=this.getLevel(),N=0;N<a.length;N++){var k=a[N];this[k]=N<g?e:this.methodFactory(k,g,this.name)}if(this.log=this.debug,typeof console===n&&g<this.levels.SILENT)return"No console available for logging"}function f(g){return function(){typeof console!==n&&(d.call(this),this[g].apply(this,arguments))}}function c(g,N,k){return u(g)||f.apply(this,arguments)}function S(g,N){var k=this,D,V,F,T="loglevel";typeof g=="string"?T+=":"+g:typeof g=="symbol"&&(T=void 0);function P(h){var p=(a[h]||"silent").toUpperCase();if(!(typeof window===n||!T)){try{window.localStorage[T]=p;return}catch{}try{window.document.cookie=encodeURIComponent(T)+"="+p+";"}catch{}}}function U(){var h;if(!(typeof window===n||!T)){try{h=window.localStorage[T]}catch{}if(typeof h===n)try{var p=window.document.cookie,b=encodeURIComponent(T),y=p.indexOf(b+"=");y!==-1&&(h=/^([^;]+)/.exec(p.slice(y+b.length+1))[1])}catch{}return k.levels[h]===void 0&&(h=void 0),h}}function m(){if(!(typeof window===n||!T)){try{window.localStorage.removeItem(T)}catch{}try{window.document.cookie=encodeURIComponent(T)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function _(h){var p=h;if(typeof p=="string"&&k.levels[p.toUpperCase()]!==void 0&&(p=k.levels[p.toUpperCase()]),typeof p=="number"&&p>=0&&p<=k.levels.SILENT)return p;throw new TypeError("log.setLevel() called with invalid level: "+h)}k.name=g,k.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},k.methodFactory=N||c,k.getLevel=function(){return F!=null?F:V!=null?V:D},k.setLevel=function(h,p){return F=_(h),p!==!1&&P(F),d.call(k)},k.setDefaultLevel=function(h){V=_(h),U()||k.setLevel(h,!1)},k.resetLevel=function(){F=null,m(),d.call(k)},k.enableAll=function(h){k.setLevel(k.levels.TRACE,h)},k.disableAll=function(h){k.setLevel(k.levels.SILENT,h)},k.rebuild=function(){if(s!==k&&(D=_(s.getLevel())),d.call(k),s===k)for(var h in r)r[h].rebuild()},D=_(s?s.getLevel():"WARN");var O=U();O!=null&&(F=_(O)),d.call(k)}s=new S,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 k=r[N];return k||(k=r[N]=new S(N,s.methodFactory)),k};var w=typeof window!==n?window.log:void 0;return s.noConflict=function(){return typeof window!==n&&window.log===s&&(window.log=w),s},s.getLoggers=function(){return r},s.default=s,s})})(Da);var La=Da.exports;const en=Ra(La);var Pa={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.prefix=n(e)})(xa,function(e){var n=function(d){for(var f=1,c=arguments.length,S;f<c;f++)for(S in arguments[f])Object.prototype.hasOwnProperty.call(arguments[f],S)&&(d[S]=arguments[f][S]);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},a,r={},s=function(d){if(!d||!d.getLogger)throw new TypeError("Argument is not a root logger");a=d},o=function(d,f){if(!d||!d.setLevel)throw new TypeError("Argument is not a logger");var c=d.methodFactory,S=d.name||"",w=r[S]||r[""]||i;function g(N,k,D){var V=c(N,k,D),F=r[D]||r[""],T=F.template.indexOf("%t")!==-1,P=F.template.indexOf("%l")!==-1,U=F.template.indexOf("%n")!==-1;return function(){for(var m="",_=arguments.length,O=Array(_),h=0;h<_;h++)O[h]=arguments[h];if(S||!r[D]){var p=F.timestampFormatter(new Date),b=F.levelFormatter(N),y=F.nameFormatter(D);F.format?m+=F.format(b,y,p):(m+=F.template,T&&(m=m.replace(/%t/,p)),P&&(m=m.replace(/%l/,b)),U&&(m=m.replace(/%n/,y))),O.length&&typeof O[0]=="string"?O[0]=m+" "+O[0]:O.unshift(m)}V.apply(void 0,O)}}return r[S]||(d.methodFactory=g),f=f||{},f.template&&(f.format=void 0),r[S]=n({},w,f),d.setLevel(d.getLevel()),a||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})})(Pa);var Jo=Pa.exports;const ai=Ra(Jo);let Ia=class{constructor(e){C(this,"defaultLevel",La.levels.INFO);C(this,"namePrefix");C(this,"provider",en);this.namePrefix=e?`${e}-`:"",this.provider.setDefaultLevel(this.defaultLevel),ai.reg(en),ai.apply(en,{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),a=localStorage.getItem(`loglevel:${n}`);return a?i.setLevel(a):i.setLevel(this.defaultLevel),i}};const X=class X{constructor(){C(this,"instanceId",Ta());C(this,"log",new Ia("nz"));C(this,"coreLogger",this.log.createLogger("core"));C(this,"_config",null);C(this,"_account");C(this,"_productDataSource");C(this,"_eventBus",new Ca("nizza",this.coreLogger));ga(this,{_config:B,_account:B,_productDataSource:B,config:he,account:he,accountName:he,configure:ce,setProductDataSource:ce},{name:"NizzaStore",autoBind:!0})}static instance(){if(!!window.nizza)X._instance=window.nizza;else{const n=new X;X._instance=n}return window.nizza=X._instance,window.nz=X._instance,X._instance}async configure(e){var n;try{const i=(n=this._config)==null?void 0:n.account;if(this._config=e,i!==e.account){const a=await nr(e.account);this.setAccount(a)}if(e.getProductDataSource){const a=await e.getProductDataSource();this.setProductDataSource(a)}}catch(i){this.coreLogger.error("Error configuring NizzaStore:",i)}}setAccount(e){this._account=e}setProductDataSource(e){this._productDataSource=e}get version(){return X.version}get config(){return this._config}get account(){return this._account}get accountName(){var e;return(e=this._config)==null?void 0:e.account}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};C(X,"version","4"),C(X,"_instance");let At=X;const je=()=>At.instance();function Ee(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function vt(t){return function e(n){return arguments.length===0||Ee(n)?e:t.apply(this,arguments)}}function Ln(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return Ee(n)?e:vt(function(a){return t(n,a)});default:return Ee(n)&&Ee(i)?e:Ee(n)?vt(function(a){return t(a,i)}):Ee(i)?vt(function(a){return t(n,a)}):t(n,i)}}}const Zo=Number.isInteger||function(e){return e<<0===e};function Xo(t){return Object.prototype.toString.call(t)==="[object String]"}var Yo=Ln(function(e,n){var i=e<0?n.length+e:e;return Xo(n)?n.charAt(i):n[i]}),el=vt(function(e){return e==null}),tl=Ln(function(e,n){return e.map(function(i){for(var a=n,r=0,s;r<i.length;){if(a==null)return;s=i[r],a=Zo(s)?Yo(s,a):a[s],r+=1}return a})}),nl=Ln(function(e,n){return tl([e],n)[0]});class ot 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 Va extends ot{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class ja extends ot{constructor(e){var n;super("APP_UNEXPECTED_ERROR",(n=e.message)!=null?n:"An unexpected error occurred.",e)}}class il extends ot{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class Ua extends ot{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,7 +23,7 @@ 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 nl(t,e){e.forEach(n=>{if(Xo(el(n.split("."),t)))throw new Br(n)})}if(!$.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!yr)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function il(t){t()}function rl(t){t||(t=il),_o({reactionScheduler:t})}function al(t){return Oo(t)}var sl=1e4,ol=1e4,ll=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=sl),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,ol))}}),t}(),ul=typeof FinalizationRegistry!="undefined"?FinalizationRegistry:ll,gn=new ul(function(t){var e;(e=t.reaction)===null||e===void 0||e.dispose(),t.reaction=null}),si=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 oi(t){return"observer".concat(t)}var dl=function(){function t(){}return t}();function cl(){return new dl}function fl(t,e){e===void 0&&(e="observed");var n=si($.useState(cl),1),i=n[0],r=si($.useState(),2),a=r[1],s=function(){return a([])},o=$.useRef(null);o.current||(o.current={reaction:null,mounted:!1,changedBeforeMount:!1});var l=o.current;l.reaction||(l.reaction=new We(oi(e),function(){l.mounted?s():l.changedBeforeMount=!0}),gn.register(i,l,l)),$.useDebugValue(l.reaction,al),$.useEffect(function(){return gn.unregister(l),l.mounted=!0,l.reaction?l.changedBeforeMount&&(l.changedBeforeMount=!1,s()):(l.reaction=new We(oi(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(f){d=f}}),d)throw d;return u}var zr=typeof Symbol=="function"&&Symbol.for;zr?Symbol.for("react.forward_ref"):typeof $.forwardRef=="function"&&$.forwardRef(function(t){return null}).$$typeof;zr?Symbol.for("react.memo"):typeof $.memo=="function"&&$.memo(function(t){return null}).$$typeof;var tn;rl(wa.unstable_batchedUpdates);tn=gn.finalizeAllImmediately;function ml(t,e){return e===void 0&&(e="observed"),fl(t,e)}function Kr(){return $.useMemo(Ue,[])}function Gr(t){const e=Kr();return ml(()=>t(e))}function hl(){var r,a,s;const{coreLogger:t}=Ue();let e=null,n=null,i=null;try{e=(s=(a=(r=Intl.DateTimeFormat())==null?void 0:r.resolvedOptions())==null?void 0:a.timeZone)!=null?s:null;const o=-new Date().getTimezoneOffset();i=o;const l=o>=0?"+":"-",u=String(Math.floor(Math.abs(o)/60)).padStart(2,"0"),d=String(Math.abs(o)%60).padStart(2,"0");n=`${l}${u}:${d}`}catch{t.error("Error obtaining time zone or offset")}return{offset:n,offsetValue:i,value:e,country:null,included:null,label:null}}class Qr{constructor(e){C(this,"aggregate");C(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 Hr(t){return new Qr(t)}class pl{}class vl{constructor(e){C(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var Pn=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(Pn||{}),qr=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(qr||{}),In=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(In||{}),Wr=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(Wr||{}),Jr=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(Jr||{}),Zr=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(Zr||{});class Kt{constructor(e){C(this,"root",Hr(this));C(this,"id");C(this,"account");C(this,"accountType",Pn.UNKNOWN);C(this,"username");C(this,"currencyConfig");C(this,"contractType");C(this,"nextDateMetricRecord");C(this,"spendedMinutes",0);C(this,"unlimitedService",!1);C(this,"hoursAvailable",0);C(this,"contractStatus",In.ACTIVE);C(this,"createdAt");C(this,"installationDateApp");C(this,"cxAccount");C(this,"freeService",!1);C(this,"subscriptionType",null);C(this,"minutesAvailable",0);C(this,"globalPage");C(this,"stripe");C(this,"descriptionPlan");C(this,"planType");C(this,"selectFreeTrial");C(this,"exceededFeatures");C(this,"host",null);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 Kt(a)}toPrimitives(){const{root:e,createdAt:n,...i}=this;return{...i,created:n.toISOString()}}}const gl=`${qa.apiUrls.restV1}/accounts/v2`;class Xr{async get(e){const n=`${gl}/${e}`,{data:i}=await Nn({url:n});return i?Kt.toDomain(i):null}}class Yr{constructor(e){this.accountRepository=e}async get(e){try{const n=await this.accountRepository.get(e);if(!n)throw new Mr(e);return n}catch(n){throw new $r(n)}}}const kl=new Xr,Vn=new Yr(kl);class jn{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const n={listener:e};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Et=typeof window=="undefined"||"Deno"in window;function yl(){}function li(t){return typeof t=="number"&&t>=0&&t!==1/0}function bl(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Sl(t,e,n){return _l(t)?typeof e=="function"?{...n,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function ea(t,e){if(t===e)return t;const n=ui(t)&&ui(e);if(n||di(t)&&di(e)){const i=n?t.length:Object.keys(t).length,r=n?e:Object.keys(e),a=r.length,s=n?[]:{};let o=0;for(let l=0;l<a;l++){const u=n?l:r[l];s[u]=ea(t[u],e[u]),s[u]===t[u]&&o++}return i===a&&o===i?t:s}return e}function kn(t,e){if(t&&!e||e&&!t)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function ui(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function di(t){if(!ci(t))return!1;const e=t.constructor;if(typeof e=="undefined")return!0;const n=e.prototype;return!(!ci(n)||!n.hasOwnProperty("isPrototypeOf"))}function ci(t){return Object.prototype.toString.call(t)==="[object Object]"}function _l(t){return Array.isArray(t)}function Nl(t){return new Promise(e=>{setTimeout(e,t)})}function fi(t){Nl(0).then(t)}function mi(t,e,n){return n.isDataEqual!=null&&n.isDataEqual(t,e)?t:typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?ea(t,e):e}class Ol extends jn{constructor(){super(),this.setup=e=>{if(!Et&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const wl=new Ol,hi=["online","offline"];class Al extends jn{constructor(){super(),this.setup=e=>{if(!Et&&window.addEventListener){const n=()=>e();return hi.forEach(i=>{window.addEventListener(i,n,!1)}),()=>{hi.forEach(i=>{window.removeEventListener(i,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine}}const Fl=new Al;function El(t){return(t!=null?t:"online")==="online"?Fl.isOnline():!0}class Cl{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function xl(t){return t instanceof Cl}function Tl(){let t=[],e=0,n=d=>{d()},i=d=>{d()};const r=d=>{let f;e++;try{f=d()}finally{e--,e||o()}return f},a=d=>{e?t.push(d):fi(()=>{n(d)})},s=d=>(...f)=>{a(()=>{d(...f)})},o=()=>{const d=t;t=[],d.length&&fi(()=>{i(()=>{d.forEach(f=>{n(f)})})})};return{batch:r,batchCalls:s,schedule:a,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{i=d}}}const Ge=Tl();class Rl extends jn{constructor(e,n){super(),this.client=e,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),pi(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,n){const i=this.options,r=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),kn(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const a=this.hasListeners();a&&vi(this.currentQuery,r,this.options,i)&&this.executeFetch(),this.updateResult(n),a&&(this.currentQuery!==r||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();a&&(this.currentQuery!==r||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(e){const n=this.client.getQueryCache().build(this.client,e),i=this.createResult(n,e);return Ll(this,i,e)&&(this.currentResult=i,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),i}getCurrentResult(){return this.currentResult}trackResult(e){const n={};return Object.keys(e).forEach(i=>{Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),e[i])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...n}={}){return this.fetch({...n,meta:{refetchPage:e}})}fetchOptimistic(e){const n=this.client.defaultQueryOptions(e),i=this.client.getQueryCache().build(this.client,n);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,n))}fetch(e){var n;return this.executeFetch({...e,cancelRefetch:(n=e.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let n=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(yl)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Et||this.currentResult.isStale||!li(this.options.staleTime))return;const n=bl(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(Et||this.options.enabled===!1||!li(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||wl.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,n){const i=this.currentQuery,r=this.options,a=this.currentResult,s=this.currentResultState,o=this.currentResultOptions,l=e!==i,u=l?e.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:c,error:N,errorUpdatedAt:O,fetchStatus:g,status:S}=f,y=!1,R=!1,P;if(n._optimisticResults){const m=this.hasListeners(),k=!m&&pi(e,n),_=m&&vi(e,i,n,r);(k||_)&&(g=El(e.options.networkMode)?"fetching":"paused",c||(S="loading")),n._optimisticResults==="isRestoring"&&(g="idle")}if(n.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&S!=="error")P=d.data,c=d.dataUpdatedAt,S=d.status,y=!0;else if(n.select&&typeof f.data!="undefined")if(a&&f.data===(s==null?void 0:s.data)&&n.select===this.selectFn)P=this.selectResult;else try{this.selectFn=n.select,P=n.select(f.data),P=mi(a==null?void 0:a.data,P,n),this.selectResult=P,this.selectError=null}catch(m){this.selectError=m}else P=f.data;if(typeof n.placeholderData!="undefined"&&typeof P=="undefined"&&S==="loading"){let m;if(a!=null&&a.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData))m=a.data;else if(m=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof m!="undefined")try{m=n.select(m),this.selectError=null}catch(k){this.selectError=k}typeof m!="undefined"&&(S="success",P=mi(a==null?void 0:a.data,m,n),R=!0)}this.selectError&&(N=this.selectError,P=this.selectResult,O=Date.now(),S="error");const w=g==="fetching",x=S==="loading",I=S==="error";return{status:S,fetchStatus:g,isLoading:x,isSuccess:S==="success",isError:I,isInitialLoading:x&&w,data:P,dataUpdatedAt:c,error:N,errorUpdatedAt:O,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:w,isRefetching:w&&!x,isLoadingError:I&&f.dataUpdatedAt===0,isPaused:g==="paused",isPlaceholderData:R,isPreviousData:y,isRefetchError:I&&f.dataUpdatedAt!==0,isStale:Un(e,n),refetch:this.refetch,remove:this.remove}}updateResult(e){const n=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,kn(i,n))return;this.currentResult=i;const r={cache:!0},a=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!this.trackedProps.size)return!0;const l=new Set(o!=null?o:this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const d=u;return this.currentResult[d]!==n[d]&&l.has(d)})};(e==null?void 0:e.listeners)!==!1&&a()&&(r.listeners=!0),this.notify({...r,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const n={};e.type==="success"?n.onSuccess=!e.manual:e.type==="error"&&!xl(e.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(e){Ge.batch(()=>{if(e.onSuccess){var n,i,r,a;(n=(i=this.options).onSuccess)==null||n.call(i,this.currentResult.data),(r=(a=this.options).onSettled)==null||r.call(a,this.currentResult.data,null)}else if(e.onError){var s,o,l,u;(s=(o=this.options).onError)==null||s.call(o,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Dl(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function pi(t,e){return Dl(t,e)||t.state.dataUpdatedAt>0&&yn(t,e,e.refetchOnMount)}function yn(t,e,n){if(e.enabled!==!1){const i=typeof n=="function"?n(t):n;return i==="always"||i!==!1&&Un(t,e)}return!1}function vi(t,e,n,i){return n.enabled!==!1&&(t!==e||i.enabled===!1)&&(!n.suspense||t.state.status!=="error")&&Un(t,n)}function Un(t,e){return t.isStaleByTime(e.staleTime)}function Ll(t,e,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?e.isPlaceholderData:!kn(t.getCurrentResult(),e)}var ta={exports:{}},na={};/**
26
+ `)}}function al(t,e){e.forEach(n=>{if(el(nl(n.split("."),t)))throw new Ua(n)})}if(!$.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!ga)throw new Error("mobx-react-lite@3 requires mobx at least version 6 to be available");function rl(t){t()}function sl(t){t||(t=rl),_o({reactionScheduler:t})}function ol(t){return Oo(t)}var ll=1e4,ul=1e4,dl=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=ll),clearTimeout(n.sweepTimeout),n.sweepTimeout=void 0;var a=Date.now();n.registrations.forEach(function(r,s){a-r.registeredAt>=i&&(n.finalize(r.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,ul))}}),t}(),cl=typeof FinalizationRegistry!="undefined"?FinalizationRegistry:dl,gn=new cl(function(t){var e;(e=t.reaction)===null||e===void 0||e.dispose(),t.reaction=null}),ri=function(t,e){var n=typeof Symbol=="function"&&t[Symbol.iterator];if(!n)return t;var i=n.call(t),a,r=[],s;try{for(;(e===void 0||e-- >0)&&!(a=i.next()).done;)r.push(a.value)}catch(o){s={error:o}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(s)throw s.error}}return r};function si(t){return"observer".concat(t)}var fl=function(){function t(){}return t}();function ml(){return new fl}function hl(t,e){e===void 0&&(e="observed");var n=ri($.useState(ml),1),i=n[0],a=ri($.useState(),2),r=a[1],s=function(){return r([])},o=$.useRef(null);o.current||(o.current={reaction:null,mounted:!1,changedBeforeMount:!1});var l=o.current;l.reaction||(l.reaction=new We(si(e),function(){l.mounted?s():l.changedBeforeMount=!0}),gn.register(i,l,l)),$.useDebugValue(l.reaction,ol),$.useEffect(function(){return gn.unregister(l),l.mounted=!0,l.reaction?l.changedBeforeMount&&(l.changedBeforeMount=!1,s()):(l.reaction=new We(si(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(f){d=f}}),d)throw d;return u}var Ma=typeof Symbol=="function"&&Symbol.for;Ma?Symbol.for("react.forward_ref"):typeof $.forwardRef=="function"&&$.forwardRef(function(t){return null}).$$typeof;Ma?Symbol.for("react.memo"):typeof $.memo=="function"&&$.memo(function(t){return null}).$$typeof;var tn;sl(_r.unstable_batchedUpdates);tn=gn.finalizeAllImmediately;function pl(t,e){return e===void 0&&(e="observed"),hl(t,e)}function $a(){return $.useMemo(je,[])}function Ba(t){const e=$a();return pl(()=>t(e))}function vl(){var a,r,s;const{coreLogger:t}=je();let e=null,n=null,i=null;try{e=(s=(r=(a=Intl.DateTimeFormat())==null?void 0:a.resolvedOptions())==null?void 0:r.timeZone)!=null?s:null;const o=-new Date().getTimezoneOffset();i=o;const l=o>=0?"+":"-",u=String(Math.floor(Math.abs(o)/60)).padStart(2,"0"),d=String(Math.abs(o)%60).padStart(2,"0");n=`${l}${u}:${d}`}catch{t.error("Error obtaining time zone or offset")}return{offset:n,offsetValue:i,value:e,country:null,included:null,label:null}}class za{constructor(e){C(this,"aggregate");C(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 Ga(t){return new za(t)}class gl{}class kl{constructor(e){C(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var Pn=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(Pn||{}),Ka=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(Ka||{}),In=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(In||{}),Qa=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(Qa||{}),Ha=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(Ha||{}),qa=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(qa||{});class Kt{constructor(e){C(this,"root",Ga(this));C(this,"id");C(this,"account");C(this,"accountType",Pn.UNKNOWN);C(this,"username");C(this,"currencyConfig");C(this,"contractType");C(this,"nextDateMetricRecord");C(this,"spendedMinutes",0);C(this,"unlimitedService",!1);C(this,"hoursAvailable",0);C(this,"contractStatus",In.ACTIVE);C(this,"createdAt");C(this,"installationDateApp");C(this,"cxAccount");C(this,"freeService",!1);C(this,"subscriptionType",null);C(this,"minutesAvailable",0);C(this,"globalPage");C(this,"stripe");C(this,"descriptionPlan");C(this,"planType");C(this,"selectFreeTrial");C(this,"exceededFeatures");C(this,"host",null);C(this,"variationThumbnailName");this.root.setProps(e)}static toDomain(e){const{createdAt:n,username:i,...a}=e,r={...a,username:i!=null?i:a.account,createdAt:new Date(Number(n))};return new Kt(r)}toPrimitives(){const{root:e,createdAt:n,...i}=this;return{...i,created:n.toISOString()}}}const yl=`${Hr.apiUrls.restV1}/accounts/v2`;class Wa{async get(e){const n=`${yl}/${e}`,{data:i}=await Nn({url:n});return i?Kt.toDomain(i):null}}class Ja{constructor(e){this.accountRepository=e}async get(e){try{const n=await this.accountRepository.get(e);if(!n)throw new Va(e);return n}catch(n){throw new ja(n)}}}const bl=new Wa,Vn=new Ja(bl);class jn{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const n={listener:e};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Et=typeof window=="undefined"||"Deno"in window;function Sl(){}function oi(t){return typeof t=="number"&&t>=0&&t!==1/0}function _l(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Nl(t,e,n){return Ol(t)?typeof e=="function"?{...n,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function Za(t,e){if(t===e)return t;const n=li(t)&&li(e);if(n||ui(t)&&ui(e)){const i=n?t.length:Object.keys(t).length,a=n?e:Object.keys(e),r=a.length,s=n?[]:{};let o=0;for(let l=0;l<r;l++){const u=n?l:a[l];s[u]=Za(t[u],e[u]),s[u]===t[u]&&o++}return i===r&&o===i?t:s}return e}function kn(t,e){if(t&&!e||e&&!t)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function li(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function ui(t){if(!di(t))return!1;const e=t.constructor;if(typeof e=="undefined")return!0;const n=e.prototype;return!(!di(n)||!n.hasOwnProperty("isPrototypeOf"))}function di(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ol(t){return Array.isArray(t)}function wl(t){return new Promise(e=>{setTimeout(e,t)})}function ci(t){wl(0).then(t)}function fi(t,e,n){return n.isDataEqual!=null&&n.isDataEqual(t,e)?t:typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?Za(t,e):e}class Fl extends jn{constructor(){super(),this.setup=e=>{if(!Et&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document=="undefined"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Al=new Fl,mi=["online","offline"];class El extends jn{constructor(){super(),this.setup=e=>{if(!Et&&window.addEventListener){const n=()=>e();return mi.forEach(i=>{window.addEventListener(i,n,!1)}),()=>{mi.forEach(i=>{window.removeEventListener(i,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator=="undefined"||typeof navigator.onLine=="undefined"?!0:navigator.onLine}}const Cl=new El;function Tl(t){return(t!=null?t:"online")==="online"?Cl.isOnline():!0}class xl{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Rl(t){return t instanceof xl}function Dl(){let t=[],e=0,n=d=>{d()},i=d=>{d()};const a=d=>{let f;e++;try{f=d()}finally{e--,e||o()}return f},r=d=>{e?t.push(d):ci(()=>{n(d)})},s=d=>(...f)=>{r(()=>{d(...f)})},o=()=>{const d=t;t=[],d.length&&ci(()=>{i(()=>{d.forEach(f=>{n(f)})})})};return{batch:a,batchCalls:s,schedule:r,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{i=d}}}const Ke=Dl();class Ll extends jn{constructor(e,n){super(),this.client=e,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),hi(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return yn(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return yn(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,n){const i=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),kn(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled!="undefined"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const r=this.hasListeners();r&&pi(this.currentQuery,a,this.options,i)&&this.executeFetch(),this.updateResult(n),r&&(this.currentQuery!==a||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();r&&(this.currentQuery!==a||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(e){const n=this.client.getQueryCache().build(this.client,e),i=this.createResult(n,e);return Il(this,i,e)&&(this.currentResult=i,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),i}getCurrentResult(){return this.currentResult}trackResult(e){const n={};return Object.keys(e).forEach(i=>{Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),e[i])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...n}={}){return this.fetch({...n,meta:{refetchPage:e}})}fetchOptimistic(e){const n=this.client.defaultQueryOptions(e),i=this.client.getQueryCache().build(this.client,n);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,n))}fetch(e){var n;return this.executeFetch({...e,cancelRefetch:(n=e.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let n=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Sl)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Et||this.currentResult.isStale||!oi(this.options.staleTime))return;const n=_l(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(Et||this.options.enabled===!1||!oi(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Al.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,n){const i=this.currentQuery,a=this.options,r=this.currentResult,s=this.currentResultState,o=this.currentResultOptions,l=e!==i,u=l?e.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=e;let{dataUpdatedAt:c,error:S,errorUpdatedAt:w,fetchStatus:g,status:N}=f,k=!1,D=!1,V;if(n._optimisticResults){const m=this.hasListeners(),_=!m&&hi(e,n),O=m&&pi(e,i,n,a);(_||O)&&(g=Tl(e.options.networkMode)?"fetching":"paused",c||(N="loading")),n._optimisticResults==="isRestoring"&&(g="idle")}if(n.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&N!=="error")V=d.data,c=d.dataUpdatedAt,N=d.status,k=!0;else if(n.select&&typeof f.data!="undefined")if(r&&f.data===(s==null?void 0:s.data)&&n.select===this.selectFn)V=this.selectResult;else try{this.selectFn=n.select,V=n.select(f.data),V=fi(r==null?void 0:r.data,V,n),this.selectResult=V,this.selectError=null}catch(m){this.selectError=m}else V=f.data;if(typeof n.placeholderData!="undefined"&&typeof V=="undefined"&&N==="loading"){let m;if(r!=null&&r.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData))m=r.data;else if(m=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof m!="undefined")try{m=n.select(m),this.selectError=null}catch(_){this.selectError=_}typeof m!="undefined"&&(N="success",V=fi(r==null?void 0:r.data,m,n),D=!0)}this.selectError&&(S=this.selectError,V=this.selectResult,w=Date.now(),N="error");const F=g==="fetching",T=N==="loading",P=N==="error";return{status:N,fetchStatus:g,isLoading:T,isSuccess:N==="success",isError:P,isInitialLoading:T&&F,data:V,dataUpdatedAt:c,error:S,errorUpdatedAt:w,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:F,isRefetching:F&&!T,isLoadingError:P&&f.dataUpdatedAt===0,isPaused:g==="paused",isPlaceholderData:D,isPreviousData:k,isRefetchError:P&&f.dataUpdatedAt!==0,isStale:Un(e,n),refetch:this.refetch,remove:this.remove}}updateResult(e){const n=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,kn(i,n))return;this.currentResult=i;const a={cache:!0},r=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!this.trackedProps.size)return!0;const l=new Set(o!=null?o:this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(u=>{const d=u;return this.currentResult[d]!==n[d]&&l.has(d)})};(e==null?void 0:e.listeners)!==!1&&r()&&(a.listeners=!0),this.notify({...a,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const n={};e.type==="success"?n.onSuccess=!e.manual:e.type==="error"&&!Rl(e.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(e){Ke.batch(()=>{if(e.onSuccess){var n,i,a,r;(n=(i=this.options).onSuccess)==null||n.call(i,this.currentResult.data),(a=(r=this.options).onSettled)==null||a.call(r,this.currentResult.data,null)}else if(e.onError){var s,o,l,u;(s=(o=this.options).onError)==null||s.call(o,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Pl(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function hi(t,e){return Pl(t,e)||t.state.dataUpdatedAt>0&&yn(t,e,e.refetchOnMount)}function yn(t,e,n){if(e.enabled!==!1){const i=typeof n=="function"?n(t):n;return i==="always"||i!==!1&&Un(t,e)}return!1}function pi(t,e,n,i){return n.enabled!==!1&&(t!==e||i.enabled===!1)&&(!n.suspense||t.state.status!=="error")&&Un(t,n)}function Un(t,e){return t.isStaleByTime(e.staleTime)}function Il(t,e,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?e.isPlaceholderData:!kn(t.getCurrentResult(),e)}var Xa={exports:{}},Ya={};/**
27
27
  * @license React
28
28
  * use-sync-external-store-shim.production.min.js
29
29
  *
@@ -31,4 +31,5 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
31
31
  *
32
32
  * This source code is licensed under the MIT license found in the
33
33
  * LICENSE file in the root directory of this source tree.
34
- */var Le=$;function Pl(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Il=typeof Object.is=="function"?Object.is:Pl,Vl=Le.useState,jl=Le.useEffect,Ul=Le.useLayoutEffect,Ml=Le.useDebugValue;function $l(t,e){var n=e(),i=Vl({inst:{value:n,getSnapshot:e}}),r=i[0].inst,a=i[1];return Ul(function(){r.value=n,r.getSnapshot=e,nn(r)&&a({inst:r})},[t,n,e]),jl(function(){return nn(r)&&a({inst:r}),t(function(){nn(r)&&a({inst:r})})},[t]),Ml(n),n}function nn(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Il(t,n)}catch{return!0}}function Bl(t,e){return e()}var zl=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?Bl:$l;na.useSyncExternalStore=Le.useSyncExternalStore!==void 0?Le.useSyncExternalStore:zl;ta.exports=na;var Kl=ta.exports;const Gl=Kl.useSyncExternalStore,gi=Z.createContext(void 0),Ql=Z.createContext(!1);function Hl(t,e){return t||(e&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=gi),window.ReactQueryClientContext):gi)}const ql=({context:t}={})=>{const e=Z.useContext(Hl(t,Z.useContext(Ql)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},ia=Z.createContext(!1),Wl=()=>Z.useContext(ia);ia.Provider;function Jl(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const Zl=Z.createContext(Jl()),Xl=()=>Z.useContext(Zl);function Yl(t,e){return typeof t=="function"?t(...e):!!t}const eu=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},tu=t=>{Z.useEffect(()=>{t.clearReset()},[t])},nu=({result:t,errorResetBoundary:e,useErrorBoundary:n,query:i})=>t.isError&&!e.isReset()&&!t.isFetching&&Yl(n,[t.error,i]),iu=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},ru=(t,e)=>t.isLoading&&t.isFetching&&!e,au=(t,e,n)=>(t==null?void 0:t.suspense)&&ru(e,n),su=(t,e,n)=>e.fetchOptimistic(t).then(({data:i})=>{t.onSuccess==null||t.onSuccess(i),t.onSettled==null||t.onSettled(i,null)}).catch(i=>{n.clearReset(),t.onError==null||t.onError(i),t.onSettled==null||t.onSettled(void 0,i)});function ou(t,e){const n=ql({context:t.context}),i=Wl(),r=Xl(),a=n.defaultQueryOptions(t);a._optimisticResults=i?"isRestoring":"optimistic",a.onError&&(a.onError=Ge.batchCalls(a.onError)),a.onSuccess&&(a.onSuccess=Ge.batchCalls(a.onSuccess)),a.onSettled&&(a.onSettled=Ge.batchCalls(a.onSettled)),iu(a),eu(a,r),tu(r);const[s]=Z.useState(()=>new e(n,a)),o=s.getOptimisticResult(a);if(Gl(Z.useCallback(l=>{const u=i?()=>{}:s.subscribe(Ge.batchCalls(l));return s.updateResult(),u},[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),Z.useEffect(()=>{s.setOptions(a,{listeners:!1})},[a,s]),au(a,o,i))throw su(a,s,r);if(nu({result:o,errorResetBoundary:r,useErrorBoundary:a.useErrorBoundary,query:s.getCurrentQuery()}))throw o.error;return a.notifyOnChangeProps?o:s.trackResult(o)}function lu(t,e,n){const i=Sl(t,e,n);return ou(i,Rl)}const uu=()=>["account"],du=()=>{const t=Gr(r=>r.accountName),[e,n]=Ba(Lt),i=lu(uu(),()=>Vn.get(t),{enabled:!!t&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return $.useEffect(()=>{const r=i.data;!i.isSuccess||!r||n(r)},[i.status]),{findQuery:i,account:e}},ra=Di();async function aa(t){const e=await Vn.get(t);return ra.set(Lt,e),e}var sa=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(sa||{});const cu={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:**"},oa={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var la=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(la||{}),ua=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(ua||{}),da=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.DEV_LOCAL="dev:local",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t))(da||{}),ca=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(ca||{}),fa=(t=>(t.Add="add",t.Remove="remove",t))(fa||{}),ma=(t=>(t.Active="active",t.Inactive="inactive",t))(ma||{});const fu={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"}}]}}]}}]}}]},mu={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"}}]}}]}}]}}]},hu={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"}}]}}]}}]}}]},pu={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"}}]}}]}}]}}]},vu={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"}}]}}]}}]}}]},gu={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"}}]}}]}}]}}]},ku={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"}}]}}]}}]}}]},yu={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"}}]}}]}}]}}]},bu={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"}}]}}]}}]}}]},Su={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"}}]}}]}}]}}]},_u={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"}}]}}]}}]}}]},Nu={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"}}]}}]}}]}}]},Ou={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"}}]}}]}}]}}]},wu={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"}}]}}]}}]}}]},Au={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"}}]}}]}}]}}]},Fu={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"}}]}}]}}]}}]},Eu={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"}}]}}]}}]}}]},Cu={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"}}]}}]}}]}}]},xu={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"}}]}}]}}]}}]},Tu={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"}}]}}]}}]}}]},Ru={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"}}]}}]}}]}}]},Du={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"}}]}}]}}]}}]},Lu={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"}}]}}]}}]}}]},Pu={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"}}]}}]}}]}}]},Iu={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"}}]}}]}}]}}]},Vu={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"}}]}}]}}]}}]}}]},ju={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"}}]}}]}}]}}]},Uu={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"}}]}}]}}]}}]},Mu=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:fu,AppendProductsToSnackVideoDocument:Tu,BlockUserDocument:Su,ChangeAccountUsernameDocument:_u,CreateSnackVideoBatchDocument:Ru,DeleteAllCustomizationDocument:Fu,DeleteChatMessageDocument:Nu,DeleteCollectionDocument:mu,DeleteRelationshipWithSnackVideoDocument:Du,DeleteSnackVideoDocument:Lu,EventStatus:ca,FindByProductSnackVideoDocument:Uu,FindCollectionDocument:hu,FindManySnackVideosDocument:Pu,FindMinimalEventDocument:yu,GetAllChatMessageDocument:Ou,GetAllCollectionsDocument:pu,GetAllCustomizationDocument:Eu,GetAllSnackVideosDocument:Iu,GetChatRoomTokenDocument:wu,GetSnackVideoRelationshipsDocument:Vu,GetTimeLineDocument:xu,ManageCollectionProductDocument:vu,Methods:fa,PinChatMessageDocument:Au,SearchCollectionsDocument:gu,SearchMinimalEventsDocument:bu,SearchSnackVideosDocument:ju,Status:ma,UpdateCollectionDocument:ku,UpdateCustomizationDocument:Cu},Symbol.toStringTag,{value:"Module"}));var Gt=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(Gt||{});function $u(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}const rn="addToCartHooks.notification.error",bn={errorAddingToCart:rn,errorOpeningVariationSelector:rn,errorOpeningNewTab:rn,successAddingToCart:"addToCartHooks.notification.success"};async function Bu(t){const{coreLogger:e}=Ue(),n={...t,action:{type:Gt.ADD_TO_CART,exec:()=>e.error("addToCartHooks: action no implemented in validate hook")}};try{const i=await zu(n),r=await Ku(i);await Gu(r)}catch(i){e.error("addToCartHooks: error unhandled",i)}}async function zu(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){Ct("transform",o)}return{...t,product:r}}async function Ku(t){var l,u;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:r}=t,a=ha(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){Ct("validate",d)}return{...t,action:o,actionFactory:a}}async function Gu(t){var S;const{eventBus:e}=Ue(),{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===Gt.ADD_TO_CART;let f=null,c=!1;const N=()=>{!d||!o||s.openVariationSelector(!1).exec()},O=()=>{!d||c||(f?r.error(bn.errorAddingToCart):r.success(bn.successAddingToCart))},g=()=>{const y={product:n,actionType:a.type,success:!f,error:f};e.emit(oa.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){Ct("end",y),f=y}if(u)try{c=!!await u({data:l,error:f,notify:r,actionExecuted:a})}catch(y){Ct("end",y)}N(),O(),g()}function ha(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 Ct(t,e){const{coreLogger:n}=Ue();n.error(`addToCartHooks error running ${t}: `,e)}function pa(t){const e=Object.values(t);return Object.assign({},...e)}function va(t){return Object.entries(t).reduce((e,[n,i])=>{const r=pa(i);return{...e,[n]:r}},{})}function ga(t,e){const n=va(e);Object.entries(n).forEach(([i,r])=>{t.addResourceBundle(i,"translation",r,!0)})}function Qu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function et(t){"@babel/helpers - typeof";return et=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},et(t)}function Hu(t,e){if(et(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(et(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function qu(t){var e=Hu(t,"string");return et(e)=="symbol"?e:String(e)}function ki(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,qu(i.key),i)}}function Wu(t,e,n){return e&&ki(t.prototype,e),n&&ki(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var ka=[],Ju=ka.forEach,Zu=ka.slice;function Xu(t){return Ju.call(Zu.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var yi=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Yu=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(!yi.test(r.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(r.domain)}if(r.path){if(!yi.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},bi={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=Yu(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)}},ed={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&typeof document!="undefined"){var i=bi.read(e.lookupCookie);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupCookie&&typeof document!="undefined"&&bi.create(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},td={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}},Be=null,Si=function(){if(Be!==null)return Be;try{Be=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Be=!1}return Be},nd={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&Si()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&Si()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},ze=null,_i=function(){if(ze!==null)return ze;try{ze=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ze=!1}return ze},id={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&_i()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&_i()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},rd={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}},ad={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}},sd={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}},od={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 ld(){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 ya=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Qu(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return Wu(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=Xu(i,this.options||{},ld()),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(ed),this.addDetector(td),this.addDetector(nd),this.addDetector(id),this.addDetector(rd),this.addDetector(ad),this.addDetector(sd),this.addDetector(od)}},{key:"addDetector",value:function(n){this.detectors[n.name]=n}},{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}();ya.type="languageDetector";function ba(t,e){t.use(e).use(ya).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 ud={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 xt{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||ud,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 xt(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new xt(this.logger,e)}}var re=new xt;class Qt{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 Ke(){let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n}function Ni(t){return t==null?"":""+t}function dd(t,e,n){t.forEach(i=>{e[i]&&(n[i]=e[i])})}const cd=/###/g;function qe(t,e,n){function i(o){return o&&o.indexOf("###")>-1?o.replace(cd,"."):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 Oi(t,e,n){const{obj:i,k:r}=qe(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=qe(t,s,Object);for(;o.obj===void 0&&s.length;)a=`${s[s.length-1]}.${a}`,s=s.slice(0,s.length-1),o=qe(t,s,Object),o&&o.obj&&typeof o.obj[`${o.k}.${a}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${a}`]=n}function fd(t,e,n,i){const{obj:r,k:a}=qe(t,e,Object);r[a]=r[a]||[],i&&(r[a]=r[a].concat(n)),i||r[a].push(n)}function Tt(t,e){const{obj:n,k:i}=qe(t,e);if(n)return n[i]}function md(t,e,n){const i=Tt(t,n);return i!==void 0?i:Tt(e,n)}function Sa(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]):Sa(t[i],e[i],n):t[i]=e[i]);return t}function Ae(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var hd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function pd(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>hd[e]):t}class vd{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 gd=[" ",",","?","!",";"],kd=new vd(20);function yd(t,e,n){e=e||"",n=n||"";const i=gd.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const r=kd.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 Sn(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 Rt(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class wi extends Qt{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=Tt(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:Sn(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),Oi(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},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),r=i,i=n,n=o[1]),this.addNamespaces(n);let l=Tt(this.data,o)||{};r?Sa(l,i,a):l={...l,...i},Oi(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 _a={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 Ai={};class Dt extends Qt{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),dd(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=re.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&&!yd(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 w=n.nsSeparator||this.options.nsSeparator;return r?{res:`${l}${w}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${w}${s}`}return r?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const f=this.resolve(e,n);let c=f&&f.res;const N=f&&f.usedKey||s,O=f&&f.exactUsedKey||s,g=Object.prototype.toString.apply(c),S=["[object Number]","[object Function]","[object RegExp]"],y=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject;if(R&&c&&(typeof c!="string"&&typeof c!="boolean"&&typeof c!="number")&&S.indexOf(g)<0&&!(typeof y=="string"&&g==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(N,c,{...n,ns:o}):`key '${s} (${this.language})' returned an object instead of string.`;return r?(f.res=w,f.usedParams=this.getUsedParamsDetails(n),f):w}if(a){const w=g==="[object Array]",x=w?[]:{},I=w?O:N;for(const j in c)if(Object.prototype.hasOwnProperty.call(c,j)){const m=`${I}${a}${j}`;x[j]=this.translate(m,{...n,joinArrays:!1,ns:o}),x[j]===m&&(x[j]=c[j])}c=x}}else if(R&&typeof y=="string"&&g==="[object Array]")c=c.join(y),c&&(c=this.extendTranslation(c,e,n,i));else{let w=!1,x=!1;const I=n.count!==void 0&&typeof n.count!="string",j=Dt.hasDefaultValue(n),m=I?this.pluralResolver.getSuffix(u,n.count,n):"",k=n.ordinal&&I?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",_=I&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=_&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${m}`]||n[`defaultValue${k}`]||n.defaultValue;!this.isValidLookup(c)&&j&&(w=!0,c=h),this.isValidLookup(c)||(x=!0,c=s);const A=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&x?void 0:c,p=j&&h!==c&&this.options.updateMissing;if(x||w||p){if(this.logger.log(p?"updateKey":"missingKey",u,l,s,p?h:c),a){const T=this.resolve(s,{...n,keySeparator:!1});T&&T.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let F=[];const U=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&U&&U[0])for(let T=0;T<U.length;T++)F.push(U[T]);else this.options.saveMissingTo==="all"?F=this.languageUtils.toResolveHierarchy(n.lng||this.language):F.push(n.lng||this.language);const D=(T,B,Me)=>{const $n=j&&Me!==c?Me:A;this.options.missingKeyHandler?this.options.missingKeyHandler(T,l,B,$n,p,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(T,l,B,$n,p,n),this.emit("missingKey",T,l,B,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?F.forEach(T=>{const B=this.pluralResolver.getSuffixes(T,n);_&&n[`defaultValue${this.options.pluralSeparator}zero`]&&B.indexOf(`${this.options.pluralSeparator}zero`)<0&&B.push(`${this.options.pluralSeparator}zero`),B.forEach(Me=>{D([T],s+Me,n[`defaultValue${Me}`]||h)})}):D(F,s,h))}c=this.extendTranslation(c,e,n,f,i),x&&c===s&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${s}`),(x||w)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,w?c:void 0):c=this.options.parseMissingKeyHandler(c))}return r?(f.res=c,f.usedParams=this.getUsedParamsDetails(n),f):c}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 c=e.match(this.interpolator.nestingRegexp);d=c&&c.length}let f=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,i.lng||this.language,i),u){const c=e.match(this.interpolator.nestingRegexp),N=c&&c.length;d<N&&(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 c=arguments.length,N=new Array(c),O=0;O<c;O++)N[O]=arguments[O];return a&&a[0]===N[0]&&!i.context?(s.logger.warn(`It seems you are nesting recursively key: ${N[0]} in key: ${n[0]}`),null):s.translate(...N,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=_a.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 f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const c=n.count!==void 0&&typeof n.count!="string",N=c&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),O=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(S=>{this.isValidLookup(i)||(o=S,!Ai[`${g[0]}-${S}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(Ai[`${g[0]}-${S}`]=!0,this.logger.warn(`key "${r}" for languages "${g.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!!!")),g.forEach(y=>{if(this.isValidLookup(i))return;s=y;const R=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(R,d,y,S,n);else{let w;c&&(w=this.pluralResolver.getSuffix(y,n.count,n));const x=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(R.push(d+w),n.ordinal&&w.indexOf(I)===0&&R.push(d+w.replace(I,this.options.pluralSeparator)),N&&R.push(d+x)),O){const j=`${d}${this.options.contextSeparator}${n.context}`;R.push(j),c&&(R.push(j+w),n.ordinal&&w.indexOf(I)===0&&R.push(j+w.replace(I,this.options.pluralSeparator)),N&&R.push(j+x))}}let P;for(;P=R.pop();)this.isValidLookup(i)||(a=P,i=this.getResource(y,S,P,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 an(t){return t.charAt(0).toUpperCase()+t.slice(1)}class Fi{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=re.create("languageUtils")}getScriptPartFromCode(e){if(e=Rt(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=Rt(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]=an(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]=an(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=an(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(r)===0)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 bd=[{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}],Sd={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 _d=["v1","v2","v3"],Nd=["v4"],Ei={zero:0,one:1,two:2,few:3,many:4,other:5};function Od(){const t={};return bd.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Sd[e.fc]}})}),t}class wd{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=re.create("pluralResolver"),(!this.options.compatibilityJSON||Nd.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=Od()}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(Rt(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)=>Ei[r]-Ei[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!_d.includes(this.options.compatibilityJSON)}}function Ci(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=md(t,e,n);return!a&&r&&typeof n=="string"&&(a=Sn(t,n,i),a===void 0&&(a=Sn(e,n,i))),a}class Ad{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=re.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:pd,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Ae(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Ae(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?Ae(n.nestingPrefix):n.nestingPrefixEscaped||Ae("$t("),this.nestingSuffix=n.nestingSuffix?Ae(n.nestingSuffix):n.nestingSuffixEscaped||Ae(")"),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(O){return O.replace(/\$/g,"$$$$")}const d=O=>{if(O.indexOf(this.formatSeparator)<0){const R=Ci(n,l,O,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,i,{...r,...n,interpolationkey:O}):R}const g=O.split(this.formatSeparator),S=g.shift().trim(),y=g.join(this.formatSeparator).trim();return this.format(Ci(n,l,S,this.options.keySeparator,this.options.ignoreJSONStructure),y,i,{...r,...n,interpolationkey:S})};this.resetRegExp();const f=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:O=>u(O)},{regex:this.regexp,safeValue:O=>this.escapeValue?u(this.escape(O)):u(O)}].forEach(O=>{for(o=0;a=O.regex.exec(e);){const g=a[1].trim();if(s=d(g),s===void 0)if(typeof f=="function"){const y=f(e,a,r);s=typeof y=="string"?y:""}else if(r&&Object.prototype.hasOwnProperty.call(r,g))s="";else if(c){s=a[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Ni(s));const S=O.safeValue(s);if(e=e.replace(a[0],S),c?(O.regex.lastIndex+=s.length,O.regex.lastIndex-=a[0].length):O.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 f=l.split(new RegExp(`${d}[ ]*{`));let c=`{${f[1]}`;l=f[0],c=this.interpolate(c,s);const N=c.match(/'/g),O=c.match(/"/g);(N&&N.length%2===0&&!O||O.length%2!==0)&&(c=c.replace(/'/g,'"'));try{s=JSON.parse(c),u&&(s={...u,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${d}${c}`}return 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(f=>f.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=Ni(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),u&&(a=l.reduce((d,f)=>this.format(d,f,i.lng,{...i,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}function Fd(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 Fe(t){const e={};return function(i,r,a){const s=r+JSON.stringify(a);let o=e[s];return o||(o=t(Rt(r),a),e[s]=o),o(i)}}class Ed{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=re.create("formatter"),this.options=e,this.formats={number:Fe((n,i)=>{const r=new Intl.NumberFormat(n,{...i});return a=>r.format(a)}),currency:Fe((n,i)=>{const r=new Intl.NumberFormat(n,{...i,style:"currency"});return a=>r.format(a)}),datetime:Fe((n,i)=>{const r=new Intl.DateTimeFormat(n,{...i});return a=>r.format(a)}),relativetime:Fe((n,i)=>{const r=new Intl.RelativeTimeFormat(n,{...i});return a=>r.format(a,i.range||"day")}),list:Fe((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()]=Fe(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}=Fd(l);if(this.formats[u]){let f=o;try{const c=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},N=c.locale||c.lng||r.locale||r.lng||i;f=this.formats[u](o,N,{...d,...r,...c})}catch(c){this.logger.warn(c)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}function Cd(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class xd extends Qt{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=re.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(f=>{const c=`${u}|${f}`;!i.reload&&this.store.hasResourceBundle(u,f)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?s[c]===void 0&&(s[c]=!0):(this.state[c]=1,d=!1,s[c]===void 0&&(s[c]=!0),a[c]===void 0&&(a[c]=!0),l[f]===void 0&&(l[f]=!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),this.state[e]=n?-1:2;const o={};this.queue.forEach(l=>{fd(l.loaded,[a],s),Cd(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(f=>{o[u][f]===void 0&&(o[u][f]=!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 f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.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(f=>o(null,f)).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 xi(){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 Ti(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 mt(){}function Td(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class tt extends Qt{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ti(e),this.services={},this.logger=re,this.modules={external:[]},Td(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;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=xi();this.options={...r,...this.options,...Ti(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?re.init(a(this.modules.logger),this.options):re.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl!="undefined"&&(d=Ed);const f=new Fi(this.options);this.store=new wi(this.options.resources,this.options);const c=this.services;c.logger=re,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new wd(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(c.formatter=a(d),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Ad(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new xd(a(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(N){for(var O=arguments.length,g=new Array(O>1?O-1:0),S=1;S<O;S++)g[S-1]=arguments[S];e.emit(N,...g)}),this.modules.languageDetector&&(c.languageDetector=a(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=a(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new Dt(this.services,this.options),this.translator.on("*",function(N){for(var O=arguments.length,g=new Array(O>1?O-1:0),S=1;S<O;S++)g[S-1]=arguments[S];e.emit(N,...g)}),this.modules.external.forEach(N=>{N.init&&N.init(this)})}if(this.format=this.options.interpolation.format,i||(i=mt),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=Ke(),u=()=>{const d=(f,c)=>{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(c),i(f,c)};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]:mt;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=Ke();return e||(e=this.languages),n||(n=this.options.ns),i||(i=mt),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"&&_a.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=Ke();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),f=2;f<u;f++)d[f-2]=arguments[f];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 c=r.options.keySeparator||".";let N;return l.keyPrefix&&Array.isArray(s)?N=s.map(O=>`${l.keyPrefix}${c}${O}`):N=l.keyPrefix?`${l.keyPrefix}${c}${s}`:s,r.t(N,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=Ke();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=Ke();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],a=e.filter(s=>r.indexOf(s)<0);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 Fi(xi());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 tt(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mt;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new tt(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 wi(this.store.data,r),a.services.resourceStore=a.store),a.translator=new Dt(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 G=tt.createInstance();G.createInstance=tt.createInstance;G.createInstance;G.dir;G.init;G.loadResources;G.reloadResources;G.use;G.changeLanguage;G.getFixedT;G.t;G.exists;G.setDefaultNamespace;G.hasLoadedNamespace;G.loadNamespaces;G.loadLanguages;const Rd=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Dd={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},Ld=t=>Dd[t],Pd=t=>t.replace(Rd,Ld);let Ri={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Pd};function Id(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ri={...Ri,...t}}const Vd={type:"3rdParty",init(t){Id(t.options.react)}};ba(G,Vd);const jd=t=>ga(G,t);let Mn=new Map;const _n=$.createContext(Mn),Ud=({children:t,stores:e})=>{const n=$.useContext(_n),i=$.useMemo(()=>{const r=new Map;return e.forEach(a=>r.set(a.class,a.value)),Mn=new Map([...n,...r])},[]);return Aa.jsx(_n.Provider,{value:i,children:t})};function Md(t){return $.useContext(_n).get(t)}function $d(t){return Mn.get(t)}exports.AccountContractStatusTypes=In;exports.AccountContractTypes=qr;exports.AccountInvalidError=tl;exports.AccountPlanDescriptionTypes=Jr;exports.AccountRestRepository=Xr;exports.AccountService=Yr;exports.AccountSubscriptionTypes=Wr;exports.AccountTypes=Pn;exports.AddToCartActionTypes=Gt;exports.AggregateRoot=Qr;exports.ApiGraphqlTypes=Mu;exports.BaseMobxStore=pl;exports.BroadcastChannelEventBus=Rr;exports.DomainError=lt;exports.EventBusWildcards=cu;exports.EventNames=oa;exports.GlobalPageSectionTypes=Zr;exports.InvalidNizzaGlobalObjectError=Br;exports.LanguageTypes=la;exports.Logger=Ur;exports.NizzaAccount=Kt;exports.NizzaEventStatus=sa;exports.NizzaProductRequestOriginTypes=da;exports.NizzaStore=Ft;exports.NizzaVariationTypes=ua;exports.ResourceNotFoundError=Mr;exports.StoreProvider=Ud;exports.UnexpectedError=$r;exports.ValueObject=vl;exports.accountAtom=Lt;exports.accountService=Vn;exports.addToCartMessages=bn;exports.apiCall=Ja;exports.buildLanguageTranslations=pa;exports.buildTranslations=va;exports.createActionFactory=ha;exports.createAggregateRoot=Hr;exports.createLazyLogger=Wa;exports.createStore=$u;exports.customFetch=Nn;exports.downloadFile=Za;exports.fileOrigin=Ho;exports.getAccount=aa;exports.getClientTimeZone=hl;exports.getNizza=Ue;exports.getStore=$d;exports.globalAtomStore=ra;exports.i18Init=ba;exports.jsDownload=Pi;exports.registerTranslations=jd;exports.registerTranslationsOf=ga;exports.runAddToCartHooks=Bu;exports.searchParams=Qo;exports.shortId=Dr;exports.useAccount=du;exports.useNZ=Kr;exports.useNizza=Gr;exports.useStore=Md;exports.validateRequiredProps=nl;
34
+ */var De=$;function Vl(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var jl=typeof Object.is=="function"?Object.is:Vl,Ul=De.useState,Ml=De.useEffect,$l=De.useLayoutEffect,Bl=De.useDebugValue;function zl(t,e){var n=e(),i=Ul({inst:{value:n,getSnapshot:e}}),a=i[0].inst,r=i[1];return $l(function(){a.value=n,a.getSnapshot=e,nn(a)&&r({inst:a})},[t,n,e]),Ml(function(){return nn(a)&&r({inst:a}),t(function(){nn(a)&&r({inst:a})})},[t]),Bl(n),n}function nn(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!jl(t,n)}catch{return!0}}function Gl(t,e){return e()}var Kl=typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"?Gl:zl;Ya.useSyncExternalStore=De.useSyncExternalStore!==void 0?De.useSyncExternalStore:Kl;Xa.exports=Ya;var Ql=Xa.exports;const Hl=Ql.useSyncExternalStore,vi=Z.createContext(void 0),ql=Z.createContext(!1);function Wl(t,e){return t||(e&&typeof window!="undefined"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=vi),window.ReactQueryClientContext):vi)}const Jl=({context:t}={})=>{const e=Z.useContext(Wl(t,Z.useContext(ql)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},er=Z.createContext(!1),Zl=()=>Z.useContext(er);er.Provider;function Xl(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const Yl=Z.createContext(Xl()),eu=()=>Z.useContext(Yl);function tu(t,e){return typeof t=="function"?t(...e):!!t}const nu=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},iu=t=>{Z.useEffect(()=>{t.clearReset()},[t])},au=({result:t,errorResetBoundary:e,useErrorBoundary:n,query:i})=>t.isError&&!e.isReset()&&!t.isFetching&&tu(n,[t.error,i]),ru=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},su=(t,e)=>t.isLoading&&t.isFetching&&!e,ou=(t,e,n)=>(t==null?void 0:t.suspense)&&su(e,n),lu=(t,e,n)=>e.fetchOptimistic(t).then(({data:i})=>{t.onSuccess==null||t.onSuccess(i),t.onSettled==null||t.onSettled(i,null)}).catch(i=>{n.clearReset(),t.onError==null||t.onError(i),t.onSettled==null||t.onSettled(void 0,i)});function uu(t,e){const n=Jl({context:t.context}),i=Zl(),a=eu(),r=n.defaultQueryOptions(t);r._optimisticResults=i?"isRestoring":"optimistic",r.onError&&(r.onError=Ke.batchCalls(r.onError)),r.onSuccess&&(r.onSuccess=Ke.batchCalls(r.onSuccess)),r.onSettled&&(r.onSettled=Ke.batchCalls(r.onSettled)),ru(r),nu(r,a),iu(a);const[s]=Z.useState(()=>new e(n,r)),o=s.getOptimisticResult(r);if(Hl(Z.useCallback(l=>{const u=i?()=>{}:s.subscribe(Ke.batchCalls(l));return s.updateResult(),u},[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),Z.useEffect(()=>{s.setOptions(r,{listeners:!1})},[r,s]),ou(r,o,i))throw lu(r,s,a);if(au({result:o,errorResetBoundary:a,useErrorBoundary:r.useErrorBoundary,query:s.getCurrentQuery()}))throw o.error;return r.notifyOnChangeProps?o:s.trackResult(o)}function du(t,e,n){const i=Nl(t,e,n);return uu(i,Ll)}const cu=()=>["account"],fu=()=>{const t=Ba(a=>a.accountName),[e,n]=$r(Lt),i=du(cu(),()=>Vn.get(t),{enabled:!!t&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return $.useEffect(()=>{const a=i.data;!i.isSuccess||!a||n(a)},[i.status]),{findQuery:i,account:e}},tr=Dr();async function nr(t){const e=await Vn.get(t);return tr.set(Lt,e),e}var ir=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(ir||{});const mu={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:**"},ar={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var rr=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(rr||{}),sr=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(sr||{}),or=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.DEV_LOCAL="dev:local",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t))(or||{}),lr=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(lr||{}),ur=(t=>(t.Add="add",t.Remove="remove",t))(ur||{}),dr=(t=>(t.Active="active",t.Inactive="inactive",t))(dr||{});const hu={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"}}]}}]}}]}}]},pu={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"}}]}}]}}]}}]},vu={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"}}]}}]}}]}}]},gu={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"}}]}}]}}]}}]},ku={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"}}]}}]}}]}}]},yu={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"}}]}}]}}]}}]},bu={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"}}]}}]}}]}}]},Su={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"}}]}}]}}]}}]},_u={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"}}]}}]}}]}}]},Nu={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"}}]}}]}}]}}]},Ou={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"}}]}}]}}]}}]},wu={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"}}]}}]}}]}}]},Fu={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"}}]}}]}}]}}]},Au={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"}}]}}]}}]}}]},Eu={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"}}]}}]}}]}}]},Cu={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"}}]}}]}}]}}]},Tu={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"}}]}}]}}]}}]},xu={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"}}]}}]}}]}}]},Ru={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"}}]}}]}}]}}]},Du={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"}}]}}]}}]}}]},Lu={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"}}]}}]}}]}}]},Pu={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"}}]}}]}}]}}]},Iu={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"}}]}}]}}]}}]},Vu={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"}}]}}]}}]}}]},ju={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"}}]}}]}}]}}]},Uu={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"}}]}}]}}]}}]},Mu={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"}}]}}]}}]}}]},$u={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"}}]}}]}}]}}]}}]},Bu={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"}}]}}]}}]}}]},zu={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"}}]}}]}}]}}]},Gu={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"}}]}}]}}]}}]},Ku={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"}}]}}]}}]}}]},Qu=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:hu,AppendProductsToSnackVideoDocument:Du,BlockUserDocument:Nu,ChangeAccountUsernameDocument:Ou,CreatePlayListDocument:Lu,CreateSnackVideoBatchDocument:Pu,DeleteAllCustomizationDocument:Cu,DeleteChatMessageDocument:wu,DeleteCollectionDocument:pu,DeleteRelationshipWithSnackVideoDocument:Iu,DeleteSnackVideoDocument:Vu,EventStatus:lr,FindByProductSnackVideoDocument:Gu,FindCollectionDocument:vu,FindManySnackVideosDocument:ju,FindMinimalEventDocument:Su,GetAllChatMessageDocument:Fu,GetAllCollectionsDocument:gu,GetAllCustomizationDocument:Tu,GetAllSnackVideosDocument:Uu,GetChatRoomTokenDocument:Au,GetPlayListDocument:Ku,GetPlayListsDocument:Mu,GetSnackVideoRelationshipsDocument:$u,GetTimeLineDocument:Ru,ManageCollectionProductDocument:ku,Methods:ur,PinChatMessageDocument:Eu,SearchCollectionsDocument:yu,SearchMinimalEventsDocument:_u,SearchSnackVideosDocument:Bu,Status:dr,UpdateCollectionDocument:bu,UpdateCustomizationDocument:xu,UpdatePlayListDocument:zu},Symbol.toStringTag,{value:"Module"}));var Qt=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(Qt||{});function Hu(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}const an="addToCartHooks.notification.error",bn={errorAddingToCart:an,errorOpeningVariationSelector:an,errorOpeningNewTab:an,successAddingToCart:"addToCartHooks.notification.success"};async function qu(t){const{coreLogger:e}=je(),n={...t,action:{type:Qt.ADD_TO_CART,exec:()=>e.error("addToCartHooks: action no implemented in validate hook")}};try{const i=await Wu(n),a=await Ju(i);await Zu(a)}catch(i){e.error("addToCartHooks: error unhandled",i)}}async function Wu(t){var r,s;const{context:e,userAddToCartConfig:n}=t,i=(r=n==null?void 0:n.hooks)==null?void 0:r.transform;let a=t.product;if(i)try{a=await i({product:{...a},data:(s=e.data)!=null?s:{}})}catch(o){Ct("transform",o)}return{...t,product:a}}async function Ju(t){var l,u;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:a}=t,r=cr(t),s=(l=i==null?void 0:i.hooks)==null?void 0:l.validate;let o=n.validate({...t,actionFactory:r});if(s)try{o=await s({product:{...a},defaultAction:{...o},action:r,data:(u=e.data)!=null?u:{}})}catch(d){Ct("validate",d)}return{...t,action:o,actionFactory:r}}async function Zu(t){var N;const{eventBus:e}=je(),{product:n,userAddToCartConfig:i,notifyFactory:a,action:r,actionFactory:s}=t,{isVariationSelectorOpen:o,data:l={}}=t.context,u=(N=i==null?void 0:i.hooks)==null?void 0:N.end,d=r.type===Qt.ADD_TO_CART;let f=null,c=!1;const S=()=>{!d||!o||s.openVariationSelector(!1).exec()},w=()=>{!d||c||(f?a.error(bn.errorAddingToCart):a.success(bn.successAddingToCart))},g=()=>{const k={product:n,actionType:r.type,success:!f,error:f};e.emit(ar.ATCH_ACTION_EXECUTED,k)};try{if(!r.type||!r.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await r.exec()}catch(k){Ct("end",k),f=k}if(u)try{c=!!await u({data:l,error:f,notify:a,actionExecuted:r})}catch(k){Ct("end",k)}S(),w(),g()}function cr(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=a=>Object.entries(a!=null?a:{}).reduce((r,[s,o])=>({...r,[s]:l=>({type:s,exec:()=>o(l)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function Ct(t,e){const{coreLogger:n}=je();n.error(`addToCartHooks error running ${t}: `,e)}function fr(t){const e=Object.values(t);return Object.assign({},...e)}function mr(t){return Object.entries(t).reduce((e,[n,i])=>{const a=fr(i);return{...e,[n]:a}},{})}function hr(t,e){const n=mr(e);Object.entries(n).forEach(([i,a])=>{t.addResourceBundle(i,"translation",a,!0)})}function Xu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ye(t){"@babel/helpers - typeof";return Ye=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},Ye(t)}function Yu(t,e){if(Ye(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e);if(Ye(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function ed(t){var e=Yu(t,"string");return Ye(e)=="symbol"?e:e+""}function td(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,ed(i.key),i)}}function nd(t,e,n){return e&&td(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}var pr=[],id=pr.forEach,ad=pr.slice;function rd(t){return id.call(ad.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var gi=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,sd=function(e,n,i){var a=i||{};a.path=a.path||"/";var r=encodeURIComponent(n),s="".concat(e,"=").concat(r);if(a.maxAge>0){var o=a.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+="; Max-Age=".concat(Math.floor(o))}if(a.domain){if(!gi.test(a.domain))throw new TypeError("option domain is invalid");s+="; Domain=".concat(a.domain)}if(a.path){if(!gi.test(a.path))throw new TypeError("option path is invalid");s+="; Path=".concat(a.path)}if(a.expires){if(typeof a.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+="; Expires=".concat(a.expires.toUTCString())}if(a.httpOnly&&(s+="; HttpOnly"),a.secure&&(s+="; Secure"),a.sameSite){var l=typeof a.sameSite=="string"?a.sameSite.toLowerCase():a.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},ki={create:function(e,n,i,a){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};i&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+i*60*1e3)),a&&(r.domain=a),document.cookie=sd(e,encodeURIComponent(n),r)},read:function(e){for(var n="".concat(e,"="),i=document.cookie.split(";"),a=0;a<i.length;a++){for(var r=i[a];r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(n)===0)return r.substring(n.length,r.length)}return null},remove:function(e){this.create(e,"",-1)}},od={name:"cookie",lookup:function(e){var n;if(e.lookupCookie&&typeof document!="undefined"){var i=ki.read(e.lookupCookie);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupCookie&&typeof document!="undefined"&&ki.create(n.lookupCookie,e,n.cookieMinutes,n.cookieDomain,n.cookieOptions)}},ld={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 a=i.substring(1),r=a.split("&"),s=0;s<r.length;s++){var o=r[s].indexOf("=");if(o>0){var l=r[s].substring(0,o);l===e.lookupQuerystring&&(n=r[s].substring(o+1))}}}return n}},Be=null,yi=function(){if(Be!==null)return Be;try{Be=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{Be=!1}return Be},ud={name:"localStorage",lookup:function(e){var n;if(e.lookupLocalStorage&&yi()){var i=window.localStorage.getItem(e.lookupLocalStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupLocalStorage&&yi()&&window.localStorage.setItem(n.lookupLocalStorage,e)}},ze=null,bi=function(){if(ze!==null)return ze;try{ze=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{ze=!1}return ze},dd={name:"sessionStorage",lookup:function(e){var n;if(e.lookupSessionStorage&&bi()){var i=window.sessionStorage.getItem(e.lookupSessionStorage);i&&(n=i)}return n},cacheUserLanguage:function(e,n){n.lookupSessionStorage&&bi()&&window.sessionStorage.setItem(n.lookupSessionStorage,e)}},cd={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}},fd={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}},md={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}},hd={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 pd(){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 vr=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Xu(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return nd(t,[{key:"init",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=n||{languageUtils:{}},this.options=rd(i,this.options||{},pd()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(r){return r.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=a,this.addDetector(od),this.addDetector(ld),this.addDetector(ud),this.addDetector(dd),this.addDetector(cd),this.addDetector(fd),this.addDetector(md),this.addDetector(hd)}},{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 a=[];return n.forEach(function(r){if(i.detectors[r]){var s=i.detectors[r].lookup(i.options);s&&typeof s=="string"&&(s=[s]),s&&(a=a.concat(s))}}),a=a.map(function(r){return i.options.convertDetectedLanguage(r)}),this.services.languageUtils.getBestMatchFromCodes?a:a.length>0?a[0]:null}},{key:"cacheUserLanguage",value:function(n,i){var a=this;i||(i=this.options.caches),i&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(n)>-1||i.forEach(function(r){a.detectors[r]&&a.detectors[r].cacheUserLanguage(n,a.options)}))}}]),t}();vr.type="languageDetector";function gr(t,e){t.use(e).use(vr).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,a)=>{if(i){const[r,...s]=i.split(",").map(o=>o.trim());if(r==="number")return new Intl.NumberFormat(a).format(n);if(r==="date")return new Intl.DateTimeFormat(a).format(n);if(r==="currency")return new Intl.NumberFormat(a,{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 vd={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 Tt{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||vd,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,a){return a&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new Tt(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Tt(this.logger,e)}}var ae=new Tt;class Ht{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const a=this.observers[i].get(n)||0;this.observers[i].set(n,a+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),a=1;a<n;a++)i[a-1]=arguments[a];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 Ge(){let t,e;const n=new Promise((i,a)=>{t=i,e=a});return n.resolve=t,n.reject=e,n}function Si(t){return t==null?"":""+t}function gd(t,e,n){t.forEach(i=>{e[i]&&(n[i]=e[i])})}const kd=/###/g;function qe(t,e,n){function i(o){return o&&o.indexOf("###")>-1?o.replace(kd,"."):o}function a(){return!t||typeof t=="string"}const r=typeof e!="string"?e:e.split(".");let s=0;for(;s<r.length-1;){if(a())return{};const o=i(r[s]);!t[o]&&n&&(t[o]=new n),Object.prototype.hasOwnProperty.call(t,o)?t=t[o]:t={},++s}return a()?{}:{obj:t,k:i(r[s])}}function _i(t,e,n){const{obj:i,k:a}=qe(t,e,Object);if(i!==void 0||e.length===1){i[a]=n;return}let r=e[e.length-1],s=e.slice(0,e.length-1),o=qe(t,s,Object);for(;o.obj===void 0&&s.length;)r=`${s[s.length-1]}.${r}`,s=s.slice(0,s.length-1),o=qe(t,s,Object),o&&o.obj&&typeof o.obj[`${o.k}.${r}`]!="undefined"&&(o.obj=void 0);o.obj[`${o.k}.${r}`]=n}function yd(t,e,n,i){const{obj:a,k:r}=qe(t,e,Object);a[r]=a[r]||[],a[r].push(n)}function xt(t,e){const{obj:n,k:i}=qe(t,e);if(n)return n[i]}function bd(t,e,n){const i=xt(t,n);return i!==void 0?i:xt(e,n)}function kr(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]):kr(t[i],e[i],n):t[i]=e[i]);return t}function Fe(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Sd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function _d(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>Sd[e]):t}class Nd{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 Od=[" ",",","?","!",";"],wd=new Nd(20);function Fd(t,e,n){e=e||"",n=n||"";const i=Od.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const a=wd.getRegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let r=!a.test(t);if(!r){const s=t.indexOf(n);s>0&&!a.test(t.substring(0,s))&&(r=!0)}return r}function Sn(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 a=t;for(let r=0;r<i.length;){if(!a||typeof a!="object")return;let s,o="";for(let l=r;l<i.length;++l)if(l!==r&&(o+=n),o+=i[l],s=a[o],s!==void 0){if(["string","number","boolean"].indexOf(typeof s)>-1&&l<i.length-1)continue;r+=l-r+1;break}a=s}return a}function Rt(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class Ni extends Ht{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 a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.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"&&r?o.push(...i.split(r)):o.push(i)));const l=xt(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:Sn(this.data&&this.data[e]&&this.data[e][n],i,r)}addResource(e,n,i,a){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,n];i&&(o=o.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(o=e.split("."),a=n,n=o[1]),this.addNamespaces(n),_i(this.data,o,a),r.silent||this.emit("added",e,n,i,a)}addResources(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in i)(typeof i[r]=="string"||Object.prototype.toString.apply(i[r])==="[object Array]")&&this.addResource(e,n,r,i[r],{silent:!0});a.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,a,r){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,n];e.indexOf(".")>-1&&(o=e.split("."),a=i,i=n,n=o[1]),this.addNamespaces(n);let l=xt(this.data,o)||{};s.skipCopy||(i=JSON.parse(JSON.stringify(i))),a?kr(l,i,r):l={...l,...i},_i(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(a=>n[a]&&Object.keys(n[a]).length>0)}toJSON(){return this.data}}var yr={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,a){return t.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,n,i,a))}),e}};const Oi={};class Dt extends Ht{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),gd(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ae.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 a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let r=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Fd(e,i,a);if(s&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:r};const u=e.split(i);(i!==a||i===a&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(a)}return typeof r=="string"&&(r=[r]),{key:e,namespaces:r}}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 a=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,r=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 a?{res:`${l}${F}${s}`,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:`${l}${F}${s}`}return a?{res:s,usedKey:s,exactUsedKey:s,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(n)}:s}const f=this.resolve(e,n);let c=f&&f.res;const S=f&&f.usedKey||s,w=f&&f.exactUsedKey||s,g=Object.prototype.toString.apply(c),N=["[object Number]","[object Function]","[object RegExp]"],k=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,D=!this.i18nFormat||this.i18nFormat.handleAsObject;if(D&&c&&(typeof c!="string"&&typeof c!="boolean"&&typeof c!="number")&&N.indexOf(g)<0&&!(typeof k=="string"&&g==="[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(S,c,{...n,ns:o}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(f.res=F,f.usedParams=this.getUsedParamsDetails(n),f):F}if(r){const F=g==="[object Array]",T=F?[]:{},P=F?w:S;for(const U in c)if(Object.prototype.hasOwnProperty.call(c,U)){const m=`${P}${r}${U}`;T[U]=this.translate(m,{...n,joinArrays:!1,ns:o}),T[U]===m&&(T[U]=c[U])}c=T}}else if(D&&typeof k=="string"&&g==="[object Array]")c=c.join(k),c&&(c=this.extendTranslation(c,e,n,i));else{let F=!1,T=!1;const P=n.count!==void 0&&typeof n.count!="string",U=Dt.hasDefaultValue(n),m=P?this.pluralResolver.getSuffix(u,n.count,n):"",_=n.ordinal&&P?this.pluralResolver.getSuffix(u,n.count,{ordinal:!1}):"",O=P&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),h=O&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${m}`]||n[`defaultValue${_}`]||n.defaultValue;!this.isValidLookup(c)&&U&&(F=!0,c=h),this.isValidLookup(c)||(T=!0,c=s);const b=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&T?void 0:c,y=U&&h!==c&&this.options.updateMissing;if(T||F||y){if(this.logger.log(y?"updateKey":"missingKey",u,l,s,y?h:c),r){const R=this.resolve(s,{...n,keySeparator:!1});R&&R.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 A=[];const j=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&j&&j[0])for(let R=0;R<j.length;R++)A.push(j[R]);else this.options.saveMissingTo==="all"?A=this.languageUtils.toResolveHierarchy(n.lng||this.language):A.push(n.lng||this.language);const x=(R,z,Ue)=>{const $n=U&&Ue!==c?Ue:b;this.options.missingKeyHandler?this.options.missingKeyHandler(R,l,z,$n,y,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(R,l,z,$n,y,n),this.emit("missingKey",R,l,z,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&P?A.forEach(R=>{const z=this.pluralResolver.getSuffixes(R,n);O&&n[`defaultValue${this.options.pluralSeparator}zero`]&&z.indexOf(`${this.options.pluralSeparator}zero`)<0&&z.push(`${this.options.pluralSeparator}zero`),z.forEach(Ue=>{x([R],s+Ue,n[`defaultValue${Ue}`]||h)})}):x(A,s,h))}c=this.extendTranslation(c,e,n,f,i),T&&c===s&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${s}`),(T||F)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${s}`:s,F?c:void 0):c=this.options.parseMissingKeyHandler(c))}return a?(f.res=c,f.usedParams=this.getUsedParamsDetails(n),f):c}extendTranslation(e,n,i,a,r){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});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 c=e.match(this.interpolator.nestingRegexp);d=c&&c.length}let f=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,i.lng||this.language,i),u){const c=e.match(this.interpolator.nestingRegexp),S=c&&c.length;d<S&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&a&&a.res&&(i.lng=a.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var c=arguments.length,S=new Array(c),w=0;w<c;w++)S[w]=arguments[w];return r&&r[0]===S[0]&&!i.context?(s.logger.warn(`It seems you are nesting recursively key: ${S[0]} in key: ${n[0]}`),null):s.translate(...S,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=yr.handle(l,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,a,r,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;a=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const c=n.count!==void 0&&typeof n.count!="string",S=c&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),w=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",g=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(N=>{this.isValidLookup(i)||(o=N,!Oi[`${g[0]}-${N}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(Oi[`${g[0]}-${N}`]=!0,this.logger.warn(`key "${a}" for languages "${g.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!!!")),g.forEach(k=>{if(this.isValidLookup(i))return;s=k;const D=[d];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(D,d,k,N,n);else{let F;c&&(F=this.pluralResolver.getSuffix(k,n.count,n));const T=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(D.push(d+F),n.ordinal&&F.indexOf(P)===0&&D.push(d+F.replace(P,this.options.pluralSeparator)),S&&D.push(d+T)),w){const U=`${d}${this.options.contextSeparator}${n.context}`;D.push(U),c&&(D.push(U+F),n.ordinal&&F.indexOf(P)===0&&D.push(U+F.replace(P,this.options.pluralSeparator)),S&&D.push(U+T))}}let V;for(;V=D.pop();)this.isValidLookup(i)||(r=V,i=this.getResource(k,N,V,n))}))})}),{res:i,usedKey:a,exactUsedKey:r,usedLng:s,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,a):this.resourceStore.getResource(e,n,i,a)}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 a=i?e.replace:e;if(i&&typeof e.count!="undefined"&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!i){a={...a};for(const r of n)delete a[r]}return a}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 rn(t){return t.charAt(0).toUpperCase()+t.slice(1)}class wi{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ae.create("languageUtils")}getScriptPartFromCode(e){if(e=Rt(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=Rt(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(a=>a.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=rn(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]=rn(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=rn(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 a=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(r=>{if(r===a)return r;if(!(r.indexOf("-")<0&&a.indexOf("-")<0)&&(r.indexOf("-")>0&&a.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===a||r.indexOf(a)===0&&a.length>1))return r})}),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),a=[],r=s=>{s&&(this.isSupportedCode(s)?a.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"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):typeof e=="string"&&r(this.formatLanguageCode(e)),i.forEach(s=>{a.indexOf(s)<0&&r(this.formatLanguageCode(s))}),a}}let Ad=[{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}],Ed={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 Cd=["v1","v2","v3"],Td=["v4"],Fi={zero:0,one:1,two:2,few:3,many:4,other:5};function xd(){const t={};return Ad.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Ed[e.fc]}})}),t}class Rd{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=ae.create("pluralResolver"),(!this.options.compatibilityJSON||Td.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=xd()}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(Rt(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(a=>`${n}${a}`)}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((a,r)=>Fi[a]-Fi[r]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):i.numbers.map(a=>this.getSuffix(e,a,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(e,i);return a?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:this.getSuffixRetroCompatible(a,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 a=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));const r=()=>this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString();return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?`_plural_${a.toString()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Cd.includes(this.options.compatibilityJSON)}}function Ai(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=bd(t,e,n);return!r&&a&&typeof n=="string"&&(r=Sn(t,n,i),r===void 0&&(r=Sn(e,n,i))),r}class Dd{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ae.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:_d,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?Fe(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?Fe(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?Fe(n.nestingPrefix):n.nestingPrefixEscaped||Fe("$t("),this.nestingSuffix=n.nestingSuffix?Fe(n.nestingSuffix):n.nestingSuffixEscaped||Fe(")"),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,a){let r,s,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(w){return w.replace(/\$/g,"$$$$")}const d=w=>{if(w.indexOf(this.formatSeparator)<0){const D=Ai(n,l,w,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(D,void 0,i,{...a,...n,interpolationkey:w}):D}const g=w.split(this.formatSeparator),N=g.shift().trim(),k=g.join(this.formatSeparator).trim();return this.format(Ai(n,l,N,this.options.keySeparator,this.options.ignoreJSONStructure),k,i,{...a,...n,interpolationkey:N})};this.resetRegExp();const f=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,c=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:w=>u(w)},{regex:this.regexp,safeValue:w=>this.escapeValue?u(this.escape(w)):u(w)}].forEach(w=>{for(o=0;r=w.regex.exec(e);){const g=r[1].trim();if(s=d(g),s===void 0)if(typeof f=="function"){const k=f(e,r,a);s=typeof k=="string"?k:""}else if(a&&Object.prototype.hasOwnProperty.call(a,g))s="";else if(c){s=r[0];continue}else this.logger.warn(`missed to pass in variable ${g} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=Si(s));const N=w.safeValue(s);if(e=e.replace(r[0],N),c?(w.regex.lastIndex+=s.length,w.regex.lastIndex-=r[0].length):w.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,r,s;function o(l,u){const d=this.nestingOptionsSeparator;if(l.indexOf(d)<0)return l;const f=l.split(new RegExp(`${d}[ ]*{`));let c=`{${f[1]}`;l=f[0],c=this.interpolate(c,s);const S=c.match(/'/g),w=c.match(/"/g);(S&&S.length%2===0&&!w||w.length%2!==0)&&(c=c.replace(/'/g,'"'));try{s=JSON.parse(c),u&&(s={...u,...s})}catch(g){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,g),`${l}${d}${c}`}return s.defaultValue&&s.defaultValue.indexOf(this.prefix)>-1&&delete s.defaultValue,l}for(;a=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(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const d=a[1].split(this.formatSeparator).map(f=>f.trim());a[1]=d.shift(),l=d,u=!0}if(r=n(o.call(this,a[1].trim(),s),s),r&&a[0]===e&&typeof r!="string")return r;typeof r!="string"&&(r=Si(r)),r||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((d,f)=>this.format(d,f,i.lng,{...i,interpolationkey:a[1].trim()}),r.trim())),e=e.replace(a[0],r),this.regexp.lastIndex=0}return e}}function Ld(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const a=i[1].substring(0,i[1].length-1);e==="currency"&&a.indexOf(":")<0?n.currency||(n.currency=a.trim()):e==="relativetime"&&a.indexOf(":")<0?n.range||(n.range=a.trim()):a.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 Ae(t){const e={};return function(i,a,r){const s=a+JSON.stringify(r);let o=e[s];return o||(o=t(Rt(a),r),e[s]=o),o(i)}}class Pd{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=ae.create("formatter"),this.options=e,this.formats={number:Ae((n,i)=>{const a=new Intl.NumberFormat(n,{...i});return r=>a.format(r)}),currency:Ae((n,i)=>{const a=new Intl.NumberFormat(n,{...i,style:"currency"});return r=>a.format(r)}),datetime:Ae((n,i)=>{const a=new Intl.DateTimeFormat(n,{...i});return r=>a.format(r)}),relativetime:Ae((n,i)=>{const a=new Intl.RelativeTimeFormat(n,{...i});return r=>a.format(r,i.range||"day")}),list:Ae((n,i)=>{const a=new Intl.ListFormat(n,{...i});return r=>a.format(r)})},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()]=Ae(n)}format(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((o,l)=>{const{formatName:u,formatOptions:d}=Ld(l);if(this.formats[u]){let f=o;try{const c=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},S=c.locale||c.lng||a.locale||a.lng||i;f=this.formats[u](o,S,{...d,...a,...c})}catch(c){this.logger.warn(c)}return f}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}function Id(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class Vd extends Ht{constructor(e,n,i){let a=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=a,this.logger=ae.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,a.backend,a)}queueLoad(e,n,i,a){const r={},s={},o={},l={};return e.forEach(u=>{let d=!0;n.forEach(f=>{const c=`${u}|${f}`;!i.reload&&this.store.hasResourceBundle(u,f)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?s[c]===void 0&&(s[c]=!0):(this.state[c]=1,d=!1,s[c]===void 0&&(s[c]=!0),r[c]===void 0&&(r[c]=!0),l[f]===void 0&&(l[f]=!0)))}),d||(o[u]=!0)}),(Object.keys(r).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(r),pending:Object.keys(s),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,i){const a=e.split("|"),r=a[0],s=a[1];n&&this.emit("failedLoading",r,s,n),i&&this.store.addResourceBundle(r,s,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2;const o={};this.queue.forEach(l=>{yd(l.loaded,[r],s),Id(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(f=>{o[u][f]===void 0&&(o[u][f]=!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 a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=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:a,wait:r,callback:s});return}this.readingCalls++;const o=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,a+1,r*2,s)},r);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]:{},a=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."),a&&a();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const r=this.queueLoad(e,n,i,a);if(!r.toLoad.length)return r.pending.length||a(),null;r.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("|"),a=i[0],r=i[1];this.read(a,r,"read",void 0,void 0,(s,o)=>{s&&this.logger.warn(`${n}loading namespace ${r} for language ${a} failed`,s),!s&&o&&this.logger.log(`${n}loaded namespace ${r} for language ${a}`,o),this.loaded(e,s,o)})}saveMissing(e,n,i,a,r){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:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let d;u.length===5?d=u(e,n,i,a,l):d=u(e,n,i,a),d&&typeof d.then=="function"?d.then(f=>o(null,f)).catch(o):o(null,d)}catch(d){o(d)}else u(e,n,i,a,o,l)}!e||!e[0]||this.store.addResource(e[0],n,i,a)}}}function Ei(){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(a=>{n[a]=i[a]})}return n},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ci(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 ft(){}function jd(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}class et extends Ht{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ci(e),this.services={},this.logger=ae,this.modules={external:[]},jd(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 a=Ei();this.options={...a,...this.options,...Ci(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...a.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function r(d){return d?typeof d=="function"?new d:d:null}if(!this.options.isClone){this.modules.logger?ae.init(r(this.modules.logger),this.options):ae.init(null,this.options);let d;this.modules.formatter?d=this.modules.formatter:typeof Intl!="undefined"&&(d=Pd);const f=new wi(this.options);this.store=new Ni(this.options.resources,this.options);const c=this.services;c.logger=ae,c.resourceStore=this.store,c.languageUtils=f,c.pluralResolver=new Rd(f,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),d&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(c.formatter=r(d),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Dd(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new Vd(r(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(S){for(var w=arguments.length,g=new Array(w>1?w-1:0),N=1;N<w;N++)g[N-1]=arguments[N];e.emit(S,...g)}),this.modules.languageDetector&&(c.languageDetector=r(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=r(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new Dt(this.services,this.options),this.translator.on("*",function(S){for(var w=arguments.length,g=new Array(w>1?w-1:0),N=1;N<w;N++)g[N-1]=arguments[N];e.emit(S,...g)}),this.modules.external.forEach(S=>{S.init&&S.init(this)})}if(this.format=this.options.interpolation.format,i||(i=ft),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=Ge(),u=()=>{const d=(f,c)=>{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(c),i(f,c)};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]:ft;const a=typeof e=="string"?e:this.language;if(typeof e=="function"&&(i=e),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const r=[],s=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&r.indexOf(u)<0&&r.push(u)})};a?s(a):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(r,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(o)})}else i(null)}reloadResources(e,n,i){const a=Ge();return e||(e=this.languages),n||(n=this.options.ns),i||(i=ft),this.services.backendConnector.reload(e,n,r=>{a.resolve(),i(r)}),a}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"&&yr.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 a=Ge();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,u)=>{u?(r(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,a.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||r(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),a}getFixedT(e,n,i){var a=this;const r=function(s,o){let l;if(typeof o!="object"){for(var u=arguments.length,d=new Array(u>2?u-2:0),f=2;f<u;f++)d[f-2]=arguments[f];l=a.options.overloadTranslationOptionHandler([s,o].concat(d))}else l={...o};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix=l.keyPrefix||i||r.keyPrefix;const c=a.options.keySeparator||".";let S;return l.keyPrefix&&Array.isArray(s)?S=s.map(w=>`${l.keyPrefix}${c}${w}`):S=l.keyPrefix?`${l.keyPrefix}${c}${s}`:s,a.t(S,l)};return typeof e=="string"?r.lng=e:r.lngs=e,r.ns=n,r.keyPrefix=i,r}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],a=this.options?this.options.fallbackLng:!1,r=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)&&(!a||s(r,e)))}loadNamespaces(e,n){const i=Ge();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{i.resolve(),n&&n(a)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=Ge();typeof e=="string"&&(e=[e]);const a=this.options.preload||[],r=e.filter(s=>a.indexOf(s)<0&&this.services.languageUtils.isSupportedCode(s));return r.length?(this.options.preload=a.concat(r),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 wi(Ei());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]:ft;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},r=new et(a);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},i&&(r.store=new Ni(this.store.data,a),r.services.resourceStore=r.store),r.translator=new Dt(r.services,a),r.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];r.emit(o,...u)}),r.init(a,n),r.translator.options=a,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const K=et.createInstance();K.createInstance=et.createInstance;K.createInstance;K.dir;K.init;K.loadResources;K.reloadResources;K.use;K.changeLanguage;K.getFixedT;K.t;K.exists;K.setDefaultNamespace;K.hasLoadedNamespace;K.loadNamespaces;K.loadLanguages;const Ud=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Md={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},$d=t=>Md[t],Bd=t=>t.replace(Ud,$d);let Ti={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Bd};function zd(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ti={...Ti,...t}}const Gd={type:"3rdParty",init(t){zd(t.options.react)}};gr(K,Gd);const Kd=t=>hr(K,t);let Mn=new Map;const _n=$.createContext(Mn),Qd=({children:t,stores:e})=>{const n=$.useContext(_n),i=$.useMemo(()=>{const a=new Map;return e.forEach(r=>a.set(r.class,r.value)),Mn=new Map([...n,...a])},[]);return Nr.jsx(_n.Provider,{value:i,children:t})};function Hd(t){return $.useContext(_n).get(t)}function qd(t){return Mn.get(t)}exports.AccountContractStatusTypes=In;exports.AccountContractTypes=Ka;exports.AccountInvalidError=il;exports.AccountPlanDescriptionTypes=Ha;exports.AccountRestRepository=Wa;exports.AccountService=Ja;exports.AccountSubscriptionTypes=Qa;exports.AccountTypes=Pn;exports.AddToCartActionTypes=Qt;exports.AggregateRoot=za;exports.ApiGraphqlTypes=Qu;exports.BaseMobxStore=gl;exports.BroadcastChannelEventBus=Ca;exports.DomainError=ot;exports.EventBusWildcards=mu;exports.EventNames=ar;exports.GlobalPageSectionTypes=qa;exports.InvalidNizzaGlobalObjectError=Ua;exports.LanguageTypes=rr;exports.Logger=Ia;exports.NizzaAccount=Kt;exports.NizzaEventStatus=ir;exports.NizzaProductRequestOriginTypes=or;exports.NizzaStore=At;exports.NizzaVariationTypes=sr;exports.ResourceNotFoundError=Va;exports.StoreProvider=Qd;exports.UnexpectedError=ja;exports.ValueObject=kl;exports.accountAtom=Lt;exports.accountService=Vn;exports.addToCartMessages=bn;exports.apiCall=Wr;exports.buildLanguageTranslations=fr;exports.buildTranslations=mr;exports.createActionFactory=cr;exports.createAggregateRoot=Ga;exports.createLazyLogger=qr;exports.createStore=Hu;exports.customFetch=Nn;exports.downloadFile=Jr;exports.fileOrigin=Wo;exports.getAccount=nr;exports.getClientTimeZone=vl;exports.getNizza=je;exports.getStore=qd;exports.globalAtomStore=tr;exports.i18Init=gr;exports.jsDownload=Di;exports.registerTranslations=Kd;exports.registerTranslationsOf=hr;exports.runAddToCartHooks=qu;exports.searchParams=qo;exports.shortId=Ta;exports.useAccount=fu;exports.useNZ=$a;exports.useNizza=Ba;exports.useStore=Hd;exports.validateRequiredProps=al;
35
+ //# sourceMappingURL=index.cjs.map