@nizza/core 0.7.0-beta.3 → 0.7.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +56 -56
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +8472 -6516
- package/dist/index.mjs.map +1 -1
- package/dist/lib/dependency-injector/helpers.d.ts +32 -0
- package/dist/lib/dependency-injector/helpers.d.ts.map +1 -0
- package/dist/lib/dependency-injector/index.d.ts +6 -0
- package/dist/lib/dependency-injector/index.d.ts.map +1 -0
- package/dist/lib/dependency-injector/injector.d.ts +134 -0
- package/dist/lib/dependency-injector/injector.d.ts.map +1 -0
- package/dist/lib/dependency-injector/typeguards.d.ts +22 -0
- package/dist/lib/dependency-injector/typeguards.d.ts.map +1 -0
- package/dist/lib/dependency-injector/types.d.ts +48 -0
- package/dist/lib/dependency-injector/types.d.ts.map +1 -0
- package/dist/lib/dependency-injector/utils.d.ts +50 -0
- package/dist/lib/dependency-injector/utils.d.ts.map +1 -0
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/types/api-graphql-types.d.ts +3 -3
- package/dist/lib/types/api-graphql-types.d.ts.map +1 -1
- package/dist/lib/utils/getClientMetadata.d.ts +5 -2
- package/dist/lib/utils/getClientMetadata.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var lp=Object.defineProperty;var cp=(t,e,n)=>e in t?lp(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var de=(t,e,n)=>cp(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Pe=require("react"),dp=require("react/jsx-runtime"),fp=require("react-dom");function hp(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const a=Object.getOwnPropertyDescriptor(i,r);a&&Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const Ut={};let pp=0;function Fa(t,e){const n=`atom${++pp}`,i={toString(){return(Ut?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof t=="function"?i.read=t:(i.init=t,i.read=mp,i.write=gp),i}function mp(t){return t(this)}function gp(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const ll=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,zs=t=>"init"in t,Gs=t=>!!t.write,da=new WeakMap,Ao=t=>{var e;return Oo(t)&&!((e=da.get(t))!=null&&e[1])},vp=(t,e)=>{const n=da.get(t);if(n)n[1]=!0,n[0].forEach(i=>i(e));else if((Ut?"production":void 0)!=="production")throw new Error("[Bug] cancelable promise not found")},yp=t=>{if(da.has(t))return;const e=[new Set,!1];da.set(t,e);const n=()=>{e[1]=!0};t.then(n,n),t.onCancel=i=>{e[0].add(i)}},Oo=t=>typeof(t==null?void 0:t.then)=="function",cl=t=>"v"in t||"e"in t,Gr=t=>{if("e"in t)throw t.e;if((Ut?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v},Hc=(t,e,n)=>{n.p.has(t)||(n.p.add(t),e.then(()=>{n.p.delete(t)},()=>{n.p.delete(t)}))},dl=(t,e,n,i,r)=>{var a;if((Ut?"production":void 0)!=="production"&&i===e)throw new Error("[Bug] atom cannot depend on itself");n.d.set(i,r.n),Ao(n.v)&&Hc(e,n.v,r),(a=r.m)==null||a.t.add(e),t&&bp(t,i,e)},oi=()=>[new Map,new Map,new Set],Ws=(t,e,n)=>{t[0].has(e)||t[0].set(e,new Set),t[1].set(e,n)},bp=(t,e,n)=>{const i=t[0].get(e);i&&i.add(n)},kp=(t,e)=>t[0].get(e),fl=(t,e)=>{t[2].add(e)},$n=t=>{for(;t[1].size||t[2].size;){t[0].clear();const e=new Set(t[1].values());t[1].clear();const n=new Set(t[2]);t[2].clear(),e.forEach(i=>{var r;return(r=i.m)==null?void 0:r.l.forEach(a=>a())}),n.forEach(i=>i())}},Kc=t=>{let e;(Ut?"production":void 0)!=="production"&&(e=new Set);const n=(N,E,F)=>{const V="v"in E,J=E.v,K=Ao(E.v)?E.v:null;if(Oo(F)){yp(F);for(const Y of E.d.keys())Hc(N,F,t(Y,E));E.v=F,delete E.e}else E.v=F,delete E.e;(!V||!Object.is(J,E.v))&&(++E.n,K&&vp(K,F))},i=(N,E,F,V)=>{var J;if(!(V!=null&&V(E))&&cl(F)&&(F.m||Array.from(F.d).every(([fe,je])=>i(N,fe,t(fe,F),V).n===je)))return F;F.d.clear();let K=!0;const Y=fe=>{if(ll(E,fe)){const ke=t(fe,F);if(!cl(ke))if(zs(fe))n(fe,ke,fe.init);else throw new Error("no atom init");return Gr(ke)}const je=i(N,fe,t(fe,F),V);if(K)dl(N,E,F,fe,je);else{const ke=oi();dl(ke,E,F,fe,je),h(ke,E,F),$n(ke)}return Gr(je)};let X,ne;const ye={get signal(){return X||(X=new AbortController),X.signal},get setSelf(){return(Ut?"production":void 0)!=="production"&&!Gs(E)&&console.warn("setSelf function cannot be used with read-only atom"),!ne&&Gs(E)&&(ne=(...fe)=>{if((Ut?"production":void 0)!=="production"&&K&&console.warn("setSelf function cannot be called in sync"),!K)return d(E,...fe)}),ne}};try{const fe=E.read(Y,ye);if(n(E,F,fe),Oo(fe)){(J=fe.onCancel)==null||J.call(fe,()=>X==null?void 0:X.abort());const je=()=>{if(F.m){const ke=oi();h(ke,E,F),$n(ke)}};fe.then(je,je)}return F}catch(fe){return delete F.v,F.e=fe,++F.n,F}finally{K=!1}},r=N=>Gr(i(void 0,N,t(N))),a=(N,E,F)=>{var V,J;const K=new Map;for(const Y of((V=F.m)==null?void 0:V.t)||[])K.set(Y,t(Y,F));for(const Y of F.p)K.set(Y,t(Y,F));return(J=kp(N,E))==null||J.forEach(Y=>{K.set(Y,t(Y,F))}),K},o=(N,E,F)=>{const V=[],J=new Set,K=(ne,ye)=>{if(!J.has(ne)){J.add(ne);for(const[fe,je]of a(N,ne,ye))ne!==fe&&K(fe,je);V.push([ne,ye,ye.n])}};K(E,F);const Y=new Set([E]),X=ne=>J.has(ne);for(let ne=V.length-1;ne>=0;--ne){const[ye,fe,je]=V[ne];let ke=!1;for(const Ae of fe.d.keys())if(Ae!==ye&&Y.has(Ae)){ke=!0;break}ke&&(i(N,ye,fe,X),h(N,ye,fe),je!==fe.n&&(Ws(N,ye,fe),Y.add(ye))),J.delete(ye)}},l=(N,E,F,...V)=>{const J=X=>Gr(i(N,X,t(X,F))),K=(X,...ne)=>{const ye=t(X,F);let fe;if(ll(E,X)){if(!zs(X))throw new Error("atom not writable");const je="v"in ye,ke=ye.v,Ae=ne[0];n(X,ye,Ae),h(N,X,ye),(!je||!Object.is(ke,ye.v))&&(Ws(N,X,ye),o(N,X,ye))}else fe=l(N,X,ye,...ne);return $n(N),fe};return E.write(J,K,...V)},d=(N,...E)=>{const F=oi(),V=l(F,N,t(N),...E);return $n(F),V},h=(N,E,F)=>{if(F.m&&!Ao(F.v)){for(const V of F.d.keys())F.m.d.has(V)||(m(N,V,t(V,F)).t.add(E),F.m.d.add(V));for(const V of F.m.d||[])if(!F.d.has(V)){F.m.d.delete(V);const J=y(N,V,t(V,F));J==null||J.t.delete(E)}}},m=(N,E,F)=>{if(!F.m){i(N,E,F);for(const V of F.d.keys())m(N,V,t(V,F)).t.add(E);if(F.m={l:new Set,d:new Set(F.d.keys()),t:new Set},(Ut?"production":void 0)!=="production"&&e.add(E),Gs(E)&&E.onMount){const V=F.m,{onMount:J}=E;fl(N,()=>{const K=J((...Y)=>l(N,E,F,...Y));K&&(V.u=K)})}}return F.m},y=(N,E,F)=>{if(F.m&&!F.m.l.size&&!Array.from(F.m.t).some(V=>{var J;return(J=t(V,F).m)==null?void 0:J.d.has(E)})){const V=F.m.u;V&&fl(N,V),delete F.m,(Ut?"production":void 0)!=="production"&&e.delete(E);for(const J of F.d.keys()){const K=y(N,J,t(J,F));K==null||K.t.delete(E)}return}return F.m},_={get:r,set:d,sub:(N,E)=>{const F=oi(),V=t(N),J=m(F,N,V);$n(F);const K=J.l;return K.add(E),()=>{K.delete(E);const Y=oi();y(Y,N,V),$n(Y)}},unstable_derive:N=>Kc(...N(t))};return(Ut?"production":void 0)!=="production"&&Object.assign(_,{dev4_get_internal_weak_map:()=>({get:E=>{const F=t(E);if(F.n!==0)return F}}),dev4_get_mounted_atoms:()=>e,dev4_restore_atoms:E=>{const F=oi();for(const[V,J]of E)if(zs(V)){const K=t(V),Y="v"in K,X=K.v;n(V,K,J),h(F,V,K),(!Y||!Object.is(X,K.v))&&(Ws(F,V,K),o(F,V,K))}$n(F)}}),_},_p=()=>{const t=new WeakMap;return Kc(n=>{let i=t.get(n);return i||(i={d:new Map,p:new Set,n:0},t.set(n,i)),i})};let Ui;const Sp=()=>(Ui||(Ui=_p(),(Ut?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Ui),globalThis.__JOTAI_DEFAULT_STORE__!==Ui&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Ui),zc={},Np=Pe.createContext(void 0),Gc=t=>Pe.useContext(Np)||Sp(),Wc=t=>typeof(t==null?void 0:t.then)=="function",Ep=t=>{t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e})},wp=Pe.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(Ep(t),t)}),Js=new WeakMap,Ap=t=>{let e=Js.get(t);return e||(e=new Promise((n,i)=>{let r=t;const a=d=>h=>{r===d&&n(h)},o=d=>h=>{r===d&&i(h)},l=d=>{"onCancel"in d&&typeof d.onCancel=="function"&&d.onCancel(h=>{if((zc?"production":void 0)!=="production"&&h===d)throw new Error("[Bug] p is not updated even after cancelation");Wc(h)?(Js.set(h,e),r=h,h.then(a(h),o(h)),l(h)):n(h)})};t.then(a(t),o(t)),l(t)}),Js.set(t,e)),e};function xo(t,e){const n=Gc(),[[i,r,a],o]=Pe.useReducer(h=>{const m=n.get(t);return Object.is(h[0],m)&&h[1]===n&&h[2]===t?h:[m,n,t]},void 0,()=>[n.get(t),n,t]);let l=i;if((r!==n||a!==t)&&(o(),l=n.get(t)),Pe.useEffect(()=>{const h=n.sub(t,()=>{o()});return o(),h},[n,t,void 0]),Pe.useDebugValue(l),Wc(l)){const h=Ap(l);return wp(h)}return l}function au(t,e){const n=Gc();return Pe.useCallback((...r)=>{if((zc?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...r)},[n,t])}function Ys(t,e){return[xo(t),au(t)]}const Jc=Fa(null);Jc.debugLabel="accountAtom";const Op={},{NZ_BACKOFFICE_BACK_URL:xp,NZ_CORE_SERVICES_GRAPHQL_URL:Tp,NZ_CORE_SERVICES_REST_URL:Cp}=Op,_i={apiUrls:{restV1:xp||"https://pabprg32bj.execute-api.us-east-1.amazonaws.com",restV2:Cp||"https://core-services-dev.nizza.com/api",graphql:Tp||"https://core-services-dev.nizza.com/graphql"},publicUrls:{wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};async function qn(t){const{url:e,method:n="GET",body:i,raw:r=!1,contentTypeJson:a=!0,timeout:o,...l}=t,d=new Headers({...a?{"content-type":"application/json"}:{},...t.headers}),h=new AbortController,{signal:m}=h;let y;const v=fetch(e,{method:n,headers:d,body:i,signal:m,...l});o&&(y=setTimeout(()=>{h.abort()},o));const x=await v;if(r)return x;const _=await x.json();if(clearTimeout(y),!x.ok){const N=_?JSON.stringify(_):x.statusText;throw new Error(N)}return _}const Rp=t=>qn({...t,contentTypeJson:!1,raw:!1});function Fp(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Yc(i,`${t}.${n}`))}const Yc=(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),o=document.createElement("a");return o.style.display="none",o.href=a,o.setAttribute("download",e),typeof o.download=="undefined"&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o),window.URL.revokeObjectURL(a)},200)};function fi(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function na(t){return function e(n){return arguments.length===0||fi(n)?e:t.apply(this,arguments)}}function Dp(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return fi(n)?e:na(function(r){return t(n,r)});default:return fi(n)&&fi(i)?e:fi(n)?na(function(r){return t(r,i)}):fi(i)?na(function(r){return t(n,r)}):t(n,i)}}}const Ip=Number.isInteger||function(e){return e<<0===e};function Pp(t){return Object.prototype.toString.call(t)==="[object String]"}function Lp(t,e){var n=t<0?e.length+t:t;return Pp(e)?e.charAt(n):e[n]}var $p=na(function(e){return e==null});function Mp(t,e){for(var n=e,i=0;i<t.length;i+=1){if(n==null)return;var r=t[i];Ip(r)?n=Lp(r,n):n=n[r]}return n}var jp=Dp(Mp);class cn extends Error{constructor(e,n,i){super(n),this.value=i,this.name=e,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value},...this.stack&&{stack:this.formatStack()}}}formatStack(){return this.stack?this.stack.split(`
|
|
2
|
-
`).map(e=>e.trim()).join(" | "):""}}class
|
|
1
|
+
"use strict";var hg=Object.defineProperty;var pg=(t,e,n)=>e in t?hg(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var me=(t,e,n)=>pg(t,typeof e!="symbol"?e+"":e,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const je=require("react"),mg=require("react/jsx-runtime"),gg=require("react-dom");function vg(t,e){for(var n=0;n<e.length;n++){const i=e[n];if(typeof i!="string"&&!Array.isArray(i)){for(const r in i)if(r!=="default"&&!(r in t)){const s=Object.getOwnPropertyDescriptor(i,r);s&&Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>i[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const Zt={};let yg=0;function Da(t,e){const n=`atom${++yg}`,i={toString(){return(Zt?"production":void 0)!=="production"&&this.debugLabel?n+":"+this.debugLabel:n}};return typeof t=="function"?i.read=t:(i.init=t,i.read=bg,i.write=kg),i}function bg(t){return t(this)}function kg(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const Mc=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,Qo=t=>"init"in t,Zo=t=>!!t.write,da=new WeakMap,Hu=t=>{var e;return qu(t)&&!((e=da.get(t))!=null&&e[1])},_g=(t,e)=>{const n=da.get(t);if(n)n[1]=!0,n[0].forEach(i=>i(e));else if((Zt?"production":void 0)!=="production")throw new Error("[Bug] cancelable promise not found")},wg=t=>{if(da.has(t))return;const e=[new Set,!1];da.set(t,e);const n=()=>{e[1]=!0};t.then(n,n),t.onCancel=i=>{e[0].add(i)}},qu=t=>typeof(t==null?void 0:t.then)=="function",Bc=t=>"v"in t||"e"in t,Hs=t=>{if("e"in t)throw t.e;if((Zt?"production":void 0)!=="production"&&!("v"in t))throw new Error("[Bug] atom state is not initialized");return t.v},$f=(t,e,n)=>{n.p.has(t)||(n.p.add(t),e.then(()=>{n.p.delete(t)},()=>{n.p.delete(t)}))},Uc=(t,e,n,i,r)=>{var s;if((Zt?"production":void 0)!=="production"&&i===e)throw new Error("[Bug] atom cannot depend on itself");n.d.set(i,r.n),Hu(n.v)&&$f(e,n.v,r),(s=r.m)==null||s.t.add(e),t&&Sg(t,i,e)},Li=()=>[new Map,new Map,new Set],eu=(t,e,n)=>{t[0].has(e)||t[0].set(e,new Set),t[1].set(e,n)},Sg=(t,e,n)=>{const i=t[0].get(e);i&&i.add(n)},Eg=(t,e)=>t[0].get(e),jc=(t,e)=>{t[2].add(e)},ui=t=>{for(;t[1].size||t[2].size;){t[0].clear();const e=new Set(t[1].values());t[1].clear();const n=new Set(t[2]);t[2].clear(),e.forEach(i=>{var r;return(r=i.m)==null?void 0:r.l.forEach(s=>s())}),n.forEach(i=>i())}},Mf=t=>{let e;(Zt?"production":void 0)!=="production"&&(e=new Set);const n=(S,E,R)=>{const j="v"in E,J=E.v,z=Hu(E.v)?E.v:null;if(qu(R)){wg(R);for(const X of E.d.keys())$f(S,R,t(X,E));E.v=R,delete E.e}else E.v=R,delete E.e;(!j||!Object.is(J,E.v))&&(++E.n,z&&_g(z,R))},i=(S,E,R,j)=>{var J;if(!(j!=null&&j(E))&&Bc(R)&&(R.m||Array.from(R.d).every(([ve,ze])=>i(S,ve,t(ve,R),j).n===ze)))return R;R.d.clear();let z=!0;const X=ve=>{if(Mc(E,ve)){const Ne=t(ve,R);if(!Bc(Ne))if(Qo(ve))n(ve,Ne,ve.init);else throw new Error("no atom init");return Hs(Ne)}const ze=i(S,ve,t(ve,R),j);if(z)Uc(S,E,R,ve,ze);else{const Ne=Li();Uc(Ne,E,R,ve,ze),h(Ne,E,R),ui(Ne)}return Hs(ze)};let ne,oe;const Se={get signal(){return ne||(ne=new AbortController),ne.signal},get setSelf(){return(Zt?"production":void 0)!=="production"&&!Zo(E)&&console.warn("setSelf function cannot be used with read-only atom"),!oe&&Zo(E)&&(oe=(...ve)=>{if((Zt?"production":void 0)!=="production"&&z&&console.warn("setSelf function cannot be called in sync"),!z)return d(E,...ve)}),oe}};try{const ve=E.read(X,Se);if(n(E,R,ve),qu(ve)){(J=ve.onCancel)==null||J.call(ve,()=>ne==null?void 0:ne.abort());const ze=()=>{if(R.m){const Ne=Li();h(Ne,E,R),ui(Ne)}};ve.then(ze,ze)}return R}catch(ve){return delete R.v,R.e=ve,++R.n,R}finally{z=!1}},r=S=>Hs(i(void 0,S,t(S))),s=(S,E,R)=>{var j,J;const z=new Map;for(const X of((j=R.m)==null?void 0:j.t)||[])z.set(X,t(X,R));for(const X of R.p)z.set(X,t(X,R));return(J=Eg(S,E))==null||J.forEach(X=>{z.set(X,t(X,R))}),z},o=(S,E,R)=>{const j=[],J=new Set,z=(oe,Se)=>{if(!J.has(oe)){J.add(oe);for(const[ve,ze]of s(S,oe,Se))oe!==ve&&z(ve,ze);j.push([oe,Se,Se.n])}};z(E,R);const X=new Set([E]),ne=oe=>J.has(oe);for(let oe=j.length-1;oe>=0;--oe){const[Se,ve,ze]=j[oe];let Ne=!1;for(const Re of ve.d.keys())if(Re!==Se&&X.has(Re)){Ne=!0;break}Ne&&(i(S,Se,ve,ne),h(S,Se,ve),ze!==ve.n&&(eu(S,Se,ve),X.add(Se))),J.delete(Se)}},l=(S,E,R,...j)=>{const J=ne=>Hs(i(S,ne,t(ne,R))),z=(ne,...oe)=>{const Se=t(ne,R);let ve;if(Mc(E,ne)){if(!Qo(ne))throw new Error("atom not writable");const ze="v"in Se,Ne=Se.v,Re=oe[0];n(ne,Se,Re),h(S,ne,Se),(!ze||!Object.is(Ne,Se.v))&&(eu(S,ne,Se),o(S,ne,Se))}else ve=l(S,ne,Se,...oe);return ui(S),ve};return E.write(J,z,...j)},d=(S,...E)=>{const R=Li(),j=l(R,S,t(S),...E);return ui(R),j},h=(S,E,R)=>{if(R.m&&!Hu(R.v)){for(const j of R.d.keys())R.m.d.has(j)||(m(S,j,t(j,R)).t.add(E),R.m.d.add(j));for(const j of R.m.d||[])if(!R.d.has(j)){R.m.d.delete(j);const J=y(S,j,t(j,R));J==null||J.t.delete(E)}}},m=(S,E,R)=>{if(!R.m){i(S,E,R);for(const j of R.d.keys())m(S,j,t(j,R)).t.add(E);if(R.m={l:new Set,d:new Set(R.d.keys()),t:new Set},(Zt?"production":void 0)!=="production"&&e.add(E),Zo(E)&&E.onMount){const j=R.m,{onMount:J}=E;jc(S,()=>{const z=J((...X)=>l(S,E,R,...X));z&&(j.u=z)})}}return R.m},y=(S,E,R)=>{if(R.m&&!R.m.l.size&&!Array.from(R.m.t).some(j=>{var J;return(J=t(j,R).m)==null?void 0:J.d.has(E)})){const j=R.m.u;j&&jc(S,j),delete R.m,(Zt?"production":void 0)!=="production"&&e.delete(E);for(const J of R.d.keys()){const z=y(S,J,t(J,R));z==null||z.t.delete(E)}return}return R.m},_={get:r,set:d,sub:(S,E)=>{const R=Li(),j=t(S),J=m(R,S,j);ui(R);const z=J.l;return z.add(E),()=>{z.delete(E);const X=Li();y(X,S,j),ui(X)}},unstable_derive:S=>Mf(...S(t))};return(Zt?"production":void 0)!=="production"&&Object.assign(_,{dev4_get_internal_weak_map:()=>({get:E=>{const R=t(E);if(R.n!==0)return R}}),dev4_get_mounted_atoms:()=>e,dev4_restore_atoms:E=>{const R=Li();for(const[j,J]of E)if(Qo(j)){const z=t(j),X="v"in z,ne=z.v;n(j,z,J),h(R,j,z),(!X||!Object.is(ne,z.v))&&(eu(R,j,z),o(R,j,z))}ui(R)}}),_},Ng=()=>{const t=new WeakMap;return Mf(n=>{let i=t.get(n);return i||(i={d:new Map,p:new Set,n:0},t.set(n,i)),i})};let Nr;const Ag=()=>(Nr||(Nr=Ng(),(Zt?"production":void 0)!=="production"&&(globalThis.__JOTAI_DEFAULT_STORE__||(globalThis.__JOTAI_DEFAULT_STORE__=Nr),globalThis.__JOTAI_DEFAULT_STORE__!==Nr&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"))),Nr),Bf={},Og=je.createContext(void 0),Uf=t=>je.useContext(Og)||Ag(),jf=t=>typeof(t==null?void 0:t.then)=="function",xg=t=>{t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e})},Tg=je.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(xg(t),t)}),tu=new WeakMap,Cg=t=>{let e=tu.get(t);return e||(e=new Promise((n,i)=>{let r=t;const s=d=>h=>{r===d&&n(h)},o=d=>h=>{r===d&&i(h)},l=d=>{"onCancel"in d&&typeof d.onCancel=="function"&&d.onCancel(h=>{if((Bf?"production":void 0)!=="production"&&h===d)throw new Error("[Bug] p is not updated even after cancelation");jf(h)?(tu.set(h,e),r=h,h.then(s(h),o(h)),l(h)):n(h)})};t.then(s(t),o(t)),l(t)}),tu.set(t,e)),e};function zu(t,e){const n=Uf(),[[i,r,s],o]=je.useReducer(h=>{const m=n.get(t);return Object.is(h[0],m)&&h[1]===n&&h[2]===t?h:[m,n,t]},void 0,()=>[n.get(t),n,t]);let l=i;if((r!==n||s!==t)&&(o(),l=n.get(t)),je.useEffect(()=>{const h=n.sub(t,()=>{o()});return o(),h},[n,t,void 0]),je.useDebugValue(l),jf(l)){const h=Cg(l);return Tg(h)}return l}function xl(t,e){const n=Uf();return je.useCallback((...r)=>{if((Bf?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...r)},[n,t])}function nu(t,e){return[zu(t),xl(t)]}const Vf=Da(null);Vf.debugLabel="accountAtom";const Rg={},{NZ_BACKOFFICE_BACK_URL:Fg,NZ_CORE_SERVICES_GRAPHQL_URL:Ig,NZ_CORE_SERVICES_REST_URL:Dg}=Rg,rr={apiUrls:{restV1:Fg||"https://pabprg32bj.execute-api.us-east-1.amazonaws.com",restV2:Dg||"https://core-services-dev.nizza.com/api",graphql:Ig||"https://core-services-dev.nizza.com/graphql"},publicUrls:{wssIVSChat:"wss://edge.ivschat.us-east-1.amazonaws.com"}};async function vi(t){const{url:e,method:n="GET",body:i,raw:r=!1,contentTypeJson:s=!0,timeout:o,...l}=t,d=new Headers({...s?{"content-type":"application/json"}:{},...t.headers}),h=new AbortController,{signal:m}=h;let y;const g=fetch(e,{method:n,headers:d,body:i,signal:m,...l});o&&(y=setTimeout(()=>{h.abort()},o));const O=await g;if(r)return O;const _=await O.json();if(clearTimeout(y),!O.ok){const S=_?JSON.stringify(_):O.statusText;throw new Error(S)}return _}const Pg=t=>vi({...t,contentTypeJson:!1,raw:!1});function Lg(t,e,n){fetch(e).then(i=>i.blob()).then(i=>Hf(i,`${t}.${n}`))}const Hf=(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 s=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(r):window.webkitURL.createObjectURL(r),o=document.createElement("a");return o.style.display="none",o.href=s,o.setAttribute("download",e),typeof o.download=="undefined"&&o.setAttribute("target","_blank"),document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o),window.URL.revokeObjectURL(s)},200)};var $g="2.0.3",Ku=500,Vc="user-agent",Xi="",Hc="?",fa="function",qn="undefined",Qi="object",Gu="string",Ft="browser",kn="cpu",dn="device",en="engine",Gt="os",Ji="result",ee="name",W="type",Z="vendor",te="version",It="architecture",Qr="major",Q="model",Br="console",Pe="mobile",Qe="tablet",gt="smarttv",cn="wearable",iu="xr",Ur="embedded",Ar="inapp",Tl="brands",di="formFactors",Cl="fullVersionList",Yi="platform",Rl="platformVersion",Pa="bitness",Xn="sec-ch-ua",Mg=Xn+"-full-version-list",Bg=Xn+"-arch",Ug=Xn+"-"+Pa,jg=Xn+"-form-factors",Vg=Xn+"-"+Pe,Hg=Xn+"-"+Q,qf=Xn+"-"+Yi,qg=qf+"-version",zf=[Tl,Cl,Pe,Q,Yi,Rl,It,di,Pa],qs="Amazon",$i="Apple",qc="ASUS",zc="BlackBerry",li="Google",Kc="Huawei",Gc="Lenovo",Wc="Honor",zs="LG",ru="Microsoft",su="Motorola",au="Nvidia",Jc="OnePlus",ou="OPPO",Or="Samsung",Yc="Sharp",xr="Sony",uu="Xiaomi",lu="Zebra",Xc="Chrome",Qc="Chromium",Bn="Chromecast",zg="Edge",Tr="Firefox",Cr="Opera",cu="Facebook",Zc="Sogou",Mi="Mobile ",Rr=" Browser",Wu="Windows",Kg=typeof window!==qn,Dt=Kg&&window.navigator?window.navigator:void 0,jn=Dt&&Dt.userAgentData?Dt.userAgentData:void 0,Gg=function(t,e){var n={},i=e;if(!ha(e)){i={};for(var r in e)for(var s in e[r])i[s]=e[r][s].concat(i[s]?i[s]:[])}for(var o in t)n[o]=i[o]&&i[o].length%2===0?i[o].concat(t[o]):t[o];return n},La=function(t){for(var e={},n=0;n<t.length;n++)e[t[n].toUpperCase()]=t[n];return e},Ju=function(t,e){if(typeof t===Qi&&t.length>0){for(var n in t)if(Sn(t[n])==Sn(e))return!0;return!1}return sr(t)?Sn(e).indexOf(Sn(t))!==-1:!1},ha=function(t,e){for(var n in t)return/^(browser|cpu|device|engine|os)$/.test(n)||(e?ha(t[n]):!1)},sr=function(t){return typeof t===Gu},du=function(t){if(t){for(var e=[],n=Zi(/\\?\"/g,t).split(","),i=0;i<n.length;i++)if(n[i].indexOf(";")>-1){var r=Zr(n[i]).split(";v=");e[i]={brand:r[0],version:r[1]}}else e[i]=Zr(n[i]);return e}},Sn=function(t){return sr(t)?t.toLowerCase():t},fu=function(t){return sr(t)?Zi(/[^\d\.]/g,t).split(".")[0]:void 0},En=function(t){for(var e in t){var n=t[e];typeof n==Qi&&n.length==2?this[n[0]]=n[1]:this[n]=void 0}return this},Zi=function(t,e){return sr(e)?e.replace(t,Xi):e},Fr=function(t){return Zi(/\\?\"/g,t)},Zr=function(t,e){if(sr(t))return t=Zi(/^\s\s*/,t),typeof e===qn?t:t.substring(0,Ku)},hu=function(t,e){if(!(!t||!e))for(var n=0,i,r,s,o,l,d;n<e.length&&!l;){var h=e[n],m=e[n+1];for(i=r=0;i<h.length&&!l&&h[i];)if(l=h[i++].exec(t),l)for(s=0;s<m.length;s++)d=l[++r],o=m[s],typeof o===Qi&&o.length>0?o.length===2?typeof o[1]==fa?this[o[0]]=o[1].call(this,d):this[o[0]]=o[1]:o.length===3?typeof o[1]===fa&&!(o[1].exec&&o[1].test)?this[o[0]]=d?o[1].call(this,d,o[2]):void 0:this[o[0]]=d?d.replace(o[1],o[2]):void 0:o.length===4&&(this[o[0]]=d?o[3].call(this,d.replace(o[1],o[2])):void 0):this[o]=d||void 0;n+=2}},Vn=function(t,e){for(var n in e)if(typeof e[n]===Qi&&e[n].length>0){for(var i=0;i<e[n].length;i++)if(Ju(e[n][i],t))return n===Hc?void 0:n}else if(Ju(e[n],t))return n===Hc?void 0:n;return e.hasOwnProperty("*")?e["*"]:t},ed={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},td={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},nd={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[te,[ee,Mi+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[te,[ee,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[ee,te],[/opios[\/ ]+([\w\.]+)/i],[te,[ee,Cr+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[te,[ee,Cr+" GX"]],[/\bopr\/([\w\.]+)/i],[te,[ee,Cr]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[te,[ee,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[te,[ee,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[ee,te],[/quark(?:pc)?\/([-\w\.]+)/i],[te,[ee,"Quark"]],[/\bddg\/([\w\.]+)/i],[te,[ee,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[te,[ee,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[te,[ee,"WeChat"]],[/konqueror\/([\w\.]+)/i],[te,[ee,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[te,[ee,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[te,[ee,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[te,[ee,"Smart "+Gc+Rr]],[/(avast|avg)\/([\w\.]+)/i],[[ee,/(.+)/,"$1 Secure"+Rr],te],[/\bfocus\/([\w\.]+)/i],[te,[ee,Tr+" Focus"]],[/\bopt\/([\w\.]+)/i],[te,[ee,Cr+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[te,[ee,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[te,[ee,"Dolphin"]],[/coast\/([\w\.]+)/i],[te,[ee,Cr+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[te,[ee,"MIUI"+Rr]],[/fxios\/([\w\.-]+)/i],[te,[ee,Mi+Tr]],[/\bqihoobrowser\/?([\w\.]*)/i],[te,[ee,"360"]],[/\b(qq)\/([\w\.]+)/i],[[ee,/(.+)/,"$1Browser"],te],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[ee,/(.+)/,"$1"+Rr],te],[/samsungbrowser\/([\w\.]+)/i],[te,[ee,Or+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[te,[ee,Zc+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[ee,Zc+" Mobile"],te],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[ee,te],[/(lbbrowser|rekonq)/i],[ee],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[te,ee],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[ee,cu],te,[W,Ar]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[ee,te,[W,Ar]],[/\bgsa\/([\w\.]+) .*safari\//i],[te,[ee,"GSA"],[W,Ar]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[te,[ee,"TikTok"],[W,Ar]],[/\[(linkedin)app\]/i],[ee,[W,Ar]],[/(chromium)[\/ ]([-\w\.]+)/i],[ee,te],[/headlesschrome(?:\/([\w\.]+)| )/i],[te,[ee,Xc+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[ee,Xc+" WebView"],te],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[te,[ee,"Android"+Rr]],[/chrome\/([\w\.]+) mobile/i],[te,[ee,Mi+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[ee,te],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[te,[ee,Mi+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[ee,Mi+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[te,ee],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[ee,[te,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[ee,te],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[ee,Mi+Tr],te],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[ee,"Netscape"],te],[/(wolvic|librewolf)\/([\w\.]+)/i],[ee,te],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[te,[ee,Tr+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[ee,[te,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[ee,[te,/[^\d\.]+./,Xi]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[It,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[It,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[It,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[It,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[It,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[It,/ower/,Xi,Sn]],[/ sun4\w[;\)]/i],[[It,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[It,Sn]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[Q,[Z,Or],[W,Qe]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[Q,[Z,Or],[W,Pe]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[Q,[Z,$i],[W,Pe]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[Q,[Z,$i],[W,Qe]],[/(macintosh);/i],[Q,[Z,$i]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[Q,[Z,Yc],[W,Pe]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[Q,[Z,Wc],[W,Qe]],[/honor([-\w ]+)[;\)]/i],[Q,[Z,Wc],[W,Pe]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[Q,[Z,Kc],[W,Qe]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[Q,[Z,Kc],[W,Pe]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[Q,/_/g," "],[Z,uu],[W,Qe]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[Q,/_/g," "],[Z,uu],[W,Pe]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[Q,[Z,ou],[W,Pe]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[Q,[Z,Vn,{OnePlus:["304","403","203"],"*":ou}],[W,Qe]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[Q,[Z,"BLU"],[W,Pe]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[Q,[Z,"Vivo"],[W,Pe]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[Q,[Z,"Realme"],[W,Pe]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[Q,[Z,su],[W,Pe]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[Q,[Z,su],[W,Qe]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[Q,[Z,zs],[W,Qe]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[Q,[Z,zs],[W,Pe]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[Q,[Z,Gc],[W,Qe]],[/(nokia) (t[12][01])/i],[Z,Q,[W,Qe]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[Q,/_/g," "],[W,Pe],[Z,"Nokia"]],[/(pixel (c|tablet))\b/i],[Q,[Z,li],[W,Qe]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[Q,[Z,li],[W,Pe]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[Q,[Z,xr],[W,Pe]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[Q,"Xperia Tablet"],[Z,xr],[W,Qe]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[Q,[Z,Jc],[W,Pe]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[Q,[Z,qs],[W,Qe]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[Q,/(.+)/g,"Fire Phone $1"],[Z,qs],[W,Pe]],[/(playbook);[-\w\),; ]+(rim)/i],[Q,Z,[W,Qe]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[Q,[Z,zc],[W,Pe]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[Q,[Z,qc],[W,Qe]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[Q,[Z,qc],[W,Pe]],[/(nexus 9)/i],[Q,[Z,"HTC"],[W,Qe]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[Z,[Q,/_/g," "],[W,Pe]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[Q,[Z,"TCL"],[W,Qe]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[Q,[Z,"TCL"],[W,Pe]],[/(itel) ((\w+))/i],[[Z,Sn],Q,[W,Vn,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[Q,[Z,"Acer"],[W,Qe]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[Q,[Z,"Meizu"],[W,Pe]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[Q,[Z,"Ulefone"],[W,Pe]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[Q,[Z,"Energizer"],[W,Pe]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[Q,[Z,"Cat"],[W,Pe]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[Q,[Z,"Smartfren"],[W,Pe]],[/droid.+; (a(?:015|06[35]|142p?))/i],[Q,[Z,"Nothing"],[W,Pe]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[Q,[Z,"Archos"],[W,Qe]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[Q,[Z,"Archos"],[W,Pe]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[Z,Q,[W,Qe]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[Z,Q,[W,Pe]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[Z,Q,[W,Qe]],[/(surface duo)/i],[Q,[Z,ru],[W,Qe]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[Q,[Z,"Fairphone"],[W,Pe]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[Q,[Z,au],[W,Qe]],[/(sprint) (\w+)/i],[Z,Q,[W,Pe]],[/(kin\.[onetw]{3})/i],[[Q,/\./g," "],[Z,ru],[W,Pe]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[Q,[Z,lu],[W,Qe]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[Q,[Z,lu],[W,Pe]],[/smart-tv.+(samsung)/i],[Z,[W,gt]],[/hbbtv.+maple;(\d+)/i],[[Q,/^/,"SmartTV"],[Z,Or],[W,gt]],[/tcast.+(lg)e?. ([-\w]+)/i],[Z,Q,[W,gt]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[Z,zs],[W,gt]],[/(apple) ?tv/i],[Z,[Q,$i+" TV"],[W,gt]],[/crkey.*devicetype\/chromecast/i],[[Q,Bn+" Third Generation"],[Z,li],[W,gt]],[/crkey.*devicetype\/([^/]*)/i],[[Q,/^/,"Chromecast "],[Z,li],[W,gt]],[/fuchsia.*crkey/i],[[Q,Bn+" Nest Hub"],[Z,li],[W,gt]],[/crkey/i],[[Q,Bn],[Z,li],[W,gt]],[/(portaltv)/i],[Q,[Z,cu],[W,gt]],[/droid.+aft(\w+)( bui|\))/i],[Q,[Z,qs],[W,gt]],[/(shield \w+ tv)/i],[Q,[Z,au],[W,gt]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[Q,[Z,Yc],[W,gt]],[/(bravia[\w ]+)( bui|\))/i],[Q,[Z,xr],[W,gt]],[/(mi(tv|box)-?\w+) bui/i],[Q,[Z,uu],[W,gt]],[/Hbbtv.*(technisat) (.*);/i],[Z,Q,[W,gt]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[Z,Zr],[Q,Zr],[W,gt]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[Q,[W,gt]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[W,gt]],[/(ouya)/i,/(nintendo) (\w+)/i],[Z,Q,[W,Br]],[/droid.+; (shield)( bui|\))/i],[Q,[Z,au],[W,Br]],[/(playstation \w+)/i],[Q,[Z,xr],[W,Br]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[Q,[Z,ru],[W,Br]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[Q,[Z,Or],[W,cn]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[Z,Q,[W,cn]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[Q,[Z,ou],[W,cn]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[Q,[Z,$i],[W,cn]],[/(opwwe\d{3})/i],[Q,[Z,Jc],[W,cn]],[/(moto 360)/i],[Q,[Z,su],[W,cn]],[/(smartwatch 3)/i],[Q,[Z,xr],[W,cn]],[/(g watch r)/i],[Q,[Z,zs],[W,cn]],[/droid.+; (wt63?0{2,3})\)/i],[Q,[Z,lu],[W,cn]],[/droid.+; (glass) \d/i],[Q,[Z,li],[W,iu]],[/(pico) (4|neo3(?: link|pro)?)/i],[Z,Q,[W,iu]],[/(quest( \d| pro)?s?).+vr/i],[Q,[Z,cu],[W,iu]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[Z,[W,Ur]],[/(aeobc)\b/i],[Q,[Z,qs],[W,Ur]],[/(homepod).+mac os/i],[Q,[Z,$i],[W,Ur]],[/windows iot/i],[[W,Ur]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[Q,[W,Vn,{mobile:"Mobile",xr:"VR","*":Qe}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[W,Qe]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[W,Pe]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[Q,[Z,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[te,[ee,zg+"HTML"]],[/(arkweb)\/([\w\.]+)/i],[ee,te],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[te,[ee,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[ee,te],[/ladybird\//i],[[ee,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[te,ee]],os:[[/microsoft (windows) (vista|xp)/i],[ee,te],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[ee,[te,Vn,ed]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[te,Vn,ed],[ee,Wu]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[te,/_/g,"."],[ee,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[ee,"macOS"],[te,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[te,[ee,Bn+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[te,[ee,Bn+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[te,[ee,Bn+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[te,[ee,Bn+" Linux"]],[/crkey\/([\d\.]+)/i],[te,[ee,Bn]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[te,ee],[/(ubuntu) ([\w\.]+) like android/i],[[ee,/(.+)/,"$1 Touch"],te],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[ee,te],[/\(bb(10);/i],[te,[ee,zc]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[te,[ee,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[te,[ee,Tr+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[te,[ee,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[te,[ee,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[ee,"Chrome OS"],te],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[ee,te],[/(sunos) ?([\w\.\d]*)/i],[[ee,"Solaris"],te],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[ee,te]]},Ks=function(){var t={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}};return En.call(t.init,[[Ft,[ee,te,Qr,W]],[kn,[It]],[dn,[W,Q,Z]],[en,[ee,te]],[Gt,[ee,te]]]),En.call(t.isIgnore,[[Ft,[te,Qr]],[en,[te]],[Gt,[te]]]),En.call(t.isIgnoreRgx,[[Ft,/ ?browser$/i],[Gt,/ ?os$/i]]),En.call(t.toString,[[Ft,[ee,te]],[kn,[It]],[dn,[Z,Q]],[en,[ee,te]],[Gt,[ee,te]]]),t}(),Wg=function(t,e){var n=Ks.init[e],i=Ks.isIgnore[e]||0,r=Ks.isIgnoreRgx[e]||0,s=Ks.toString[e]||0;function o(){En.call(this,n)}return o.prototype.getItem=function(){return t},o.prototype.withClientHints=function(){return jn?jn.getHighEntropyValues(zf).then(function(l){return t.setCH(new Kf(l,!1)).parseCH().get()}):t.parseCH().get()},o.prototype.withFeatureCheck=function(){return t.detectFeature().get()},e!=Ji&&(o.prototype.is=function(l){var d=!1;for(var h in this)if(this.hasOwnProperty(h)&&!Ju(i,h)&&Sn(r?Zi(r,this[h]):this[h])==Sn(r?Zi(r,l):l)){if(d=!0,l!=qn)break}else if(l==qn&&d){d=!d;break}return d},o.prototype.toString=function(){var l=Xi;for(var d in s)typeof this[s[d]]!==qn&&(l+=(l?" ":Xi)+this[s[d]]);return l||qn}),jn||(o.prototype.then=function(l){var d=this,h=function(){for(var y in d)d.hasOwnProperty(y)&&(this[y]=d[y])};h.prototype={is:o.prototype.is,toString:o.prototype.toString};var m=new h;return l(m),m}),new o};function Kf(t,e){if(t=t||{},En.call(this,zf),e)En.call(this,[[Tl,du(t[Xn])],[Cl,du(t[Mg])],[Pe,/\?1/.test(t[Vg])],[Q,Fr(t[Hg])],[Yi,Fr(t[qf])],[Rl,Fr(t[qg])],[It,Fr(t[Bg])],[di,du(t[jg])],[Pa,Fr(t[Ug])]]);else for(var n in t)this.hasOwnProperty(n)&&typeof t[n]!==qn&&(this[n]=t[n])}function id(t,e,n,i){return this.get=function(r){return r?this.data.hasOwnProperty(r)?this.data[r]:void 0:this.data},this.set=function(r,s){return this.data[r]=s,this},this.setCH=function(r){return this.uaCH=r,this},this.detectFeature=function(){if(Dt&&Dt.userAgent==this.ua)switch(this.itemType){case Ft:Dt.brave&&typeof Dt.brave.isBrave==fa&&this.set(ee,"Brave");break;case dn:!this.get(W)&&jn&&jn[Pe]&&this.set(W,Pe),this.get(Q)=="Macintosh"&&Dt&&typeof Dt.standalone!==qn&&Dt.maxTouchPoints&&Dt.maxTouchPoints>2&&this.set(Q,"iPad").set(W,Qe);break;case Gt:!this.get(ee)&&jn&&jn[Yi]&&this.set(ee,jn[Yi]);break;case Ji:var r=this.data,s=function(o){return r[o].getItem().detectFeature().get()};this.set(Ft,s(Ft)).set(kn,s(kn)).set(dn,s(dn)).set(en,s(en)).set(Gt,s(Gt))}return this},this.parseUA=function(){return this.itemType!=Ji&&hu.call(this.data,this.ua,this.rgxMap),this.itemType==Ft&&this.set(Qr,fu(this.get(te))),this},this.parseCH=function(){var r=this.uaCH,s=this.rgxMap;switch(this.itemType){case Ft:case en:var o=r[Cl]||r[Tl],l;if(o)for(var d in o){var h=o[d].brand||o[d],m=o[d].version;this.itemType==Ft&&!/not.a.brand/i.test(h)&&(!l||/chrom/i.test(l)&&h!=Qc)&&(h=Vn(h,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(ee,h).set(te,m).set(Qr,fu(m)),l=h),this.itemType==en&&h==Qc&&this.set(te,m)}break;case kn:var y=r[It];y&&(y&&r[Pa]=="64"&&(y+="64"),hu.call(this.data,y+";",s));break;case dn:if(r[Pe]&&this.set(W,Pe),r[Q]&&(this.set(Q,r[Q]),!this.get(W)||!this.get(Z))){var g={};hu.call(g,"droid 9; "+r[Q]+")",s),!this.get(W)&&g.type&&this.set(W,g.type),!this.get(Z)&&g.vendor&&this.set(Z,g.vendor)}if(r[di]){var O;if(typeof r[di]!="string")for(var _=0;!O&&_<r[di].length;)O=Vn(r[di][_++],td);else O=Vn(r[di],td);this.set(W,O)}break;case Gt:var S=r[Yi];if(S){var E=r[Rl];S==Wu&&(E=parseInt(fu(E),10)>=13?"11":"10"),this.set(ee,S).set(te,E)}this.get(ee)==Wu&&r[Q]=="Xbox"&&this.set(ee,"Xbox").set(te,void 0);break;case Ji:var R=this.data,j=function(J){return R[J].getItem().setCH(r).parseCH().get()};this.set(Ft,j(Ft)).set(kn,j(kn)).set(dn,j(dn)).set(en,j(en)).set(Gt,j(Gt))}return this},En.call(this,[["itemType",t],["ua",e],["uaCH",i],["rgxMap",n],["data",Wg(this,t)]]),this}function On(t,e,n){if(typeof t===Qi?(ha(t,!0)?(typeof e===Qi&&(n=e),e=t):(n=t,e=void 0),t=void 0):typeof t===Gu&&!ha(e,!0)&&(n=e,e=void 0),n&&typeof n.append===fa){var i={};n.forEach(function(d,h){i[h]=d}),n=i}if(!(this instanceof On))return new On(t,e,n).getResult();var r=typeof t===Gu?t:n&&n[Vc]?n[Vc]:Dt&&Dt.userAgent?Dt.userAgent:Xi,s=new Kf(n,!0),o=e?Gg(nd,e):nd,l=function(d){return d==Ji?function(){return new id(d,r,o,s).set("ua",r).set(Ft,this.getBrowser()).set(kn,this.getCPU()).set(dn,this.getDevice()).set(en,this.getEngine()).set(Gt,this.getOS()).get()}:function(){return new id(d,r,o[d],s).parseUA().get()}};return En.call(this,[["getBrowser",l(Ft)],["getCPU",l(kn)],["getDevice",l(dn)],["getEngine",l(en)],["getOS",l(Gt)],["getResult",l(Ji)],["getUA",function(){return r}],["setUA",function(d){return sr(d)&&(r=d.length>Ku?Zr(d,Ku):d),this}]]).setUA(r),this}On.VERSION=$g;On.BROWSER=La([ee,te,Qr,W]);On.CPU=La([It]);On.DEVICE=La([Q,Z,W,Br,Pe,gt,Qe,cn,Ur]);On.ENGINE=On.OS=La([ee,te]);function Hi(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function ta(t){return function e(n){return arguments.length===0||Hi(n)?e:t.apply(this,arguments)}}function Jg(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return Hi(n)?e:ta(function(r){return t(n,r)});default:return Hi(n)&&Hi(i)?e:Hi(n)?ta(function(r){return t(r,i)}):Hi(i)?ta(function(r){return t(n,r)}):t(n,i)}}}const Yg=Number.isInteger||function(e){return e<<0===e};function Xg(t){return Object.prototype.toString.call(t)==="[object String]"}function Qg(t,e){var n=t<0?e.length+t:t;return Xg(e)?e.charAt(n):e[n]}var Zg=ta(function(e){return e==null});function ev(t,e){for(var n=e,i=0;i<t.length;i+=1){if(n==null)return;var r=t[i];Yg(r)?n=Qg(r,n):n=n[r]}return n}var tv=Jg(ev);class Cn extends Error{constructor(e,n,i){super(n),this.value=i,this.name=e,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value},...this.stack&&{stack:this.formatStack()}}}formatStack(){return this.stack?this.stack.split(`
|
|
2
|
+
`).map(e=>e.trim()).join(" | "):""}}class nv extends Cn{constructor(e){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${e}' not found.`,e)}}class Fl extends Cn{constructor(e){var n;super("APP_UNEXPECTED_ERROR",(n=e.message)!=null?n:"An unexpected error occurred.",e)}}class Gf extends Cn{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}}class Wf extends Cn{constructor(e){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
|
|
3
3
|
Configuration property invalid: "${e}".
|
|
4
4
|
|
|
5
5
|
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".
|
|
@@ -21,29 +21,29 @@
|
|
|
21
21
|
account: env.account,
|
|
22
22
|
...
|
|
23
23
|
});
|
|
24
|
-
`)}}function
|
|
25
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
26
|
-
'`+a.annotationType_+"' can only be used on properties with a function value."))}function um(t,e,n,i){e.annotationType_,i.value}function ld(t,e,n,i,r){var a,o,l,d,h,m,y;r===void 0&&(r=me.safeDescriptors),um(t,e,n,i);var v=i.value;if((a=e.options_)!=null&&a.bound){var x;v=v.bind((x=t.proxy_)!=null?x:t.target_)}return{value:An((o=(l=e.options_)==null?void 0:l.name)!=null?o:n.toString(),v,(d=(h=e.options_)==null?void 0:h.autoAction)!=null?d:!1,(m=e.options_)!=null&&m.bound?(y=t.proxy_)!=null?y:t.target_:void 0),configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function cd(t,e){return{annotationType_:t,options_:e,make_:lm,extend_:cm,decorate_20223_:dm}}function lm(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&&(!on(t.target_,e)||!ar(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(ar(n.value))return 1;var a=dd(t,this,e,n,!1,!1);return Qt(i,e,a),2}function cm(t,e,n,i){var r,a=dd(t,this,e,n,(r=this.options_)==null?void 0:r.bound);return t.defineProperty_(e,a,i)}function dm(t,e){var n,i=e.name,r=e.addInitializer;return ar(t)||(t=yi(t)),(n=this.options_)!=null&&n.bound&&r(function(){var a=this,o=a[i].bind(a);o.isMobXFlow=!0,a[i]=o}),t}function fm(t,e,n,i){e.annotationType_,i.value}function dd(t,e,n,i,r,a){a===void 0&&(a=me.safeDescriptors),fm(t,e,n,i);var o=i.value;if(ar(o)||(o=yi(o)),r){var l;o=o.bind((l=t.proxy_)!=null?l:t.target_),o.isMobXFlow=!0}return{value:o,configurable:a?t.isPlainObject_:!0,enumerable:!1,writable:!a}}function lu(t,e){return{annotationType_:t,options_:e,make_:hm,extend_:pm,decorate_20223_:mm}}function hm(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function pm(t,e,n,i){return gm(t,this,e,n),t.defineComputedProperty_(e,wn({},this.options_,{get:n.get,set:n.set}),i)}function mm(t,e){var n=this,i=e.name,r=e.addInitializer;return r(function(){var a=Ai(this)[we],o=wn({},n.options_,{get:t,context:this});o.name||(o.name="ObservableObject."+i.toString()),a.values_.set(i,new Kt(o))}),function(){return this[we].getObservablePropValue_(i)}}function gm(t,e,n,i){e.annotationType_,i.get}function Ma(t,e){return{annotationType_:t,options_:e,make_:vm,extend_:ym,decorate_20223_:bm}}function vm(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function ym(t,e,n,i){var r,a;return km(t,this),t.defineObservableProperty_(e,n.value,(r=(a=this.options_)==null?void 0:a.enhancer)!=null?r:Kn,i)}function bm(t,e){var n=this,i=e.kind,r=e.name,a=new WeakSet;function o(l,d){var h,m,y=Ai(l)[we],v=new Un(d,(h=(m=n.options_)==null?void 0:m.enhancer)!=null?h:Kn,"ObservableObject."+r.toString(),!1);y.values_.set(r,v),a.add(l)}if(i=="accessor")return{get:function(){return a.has(this)||o(this,t.get.call(this)),this[we].getObservablePropValue_(r)},set:function(d){return a.has(this)||o(this,d),this[we].setObservablePropValue_(r,d)},init:function(d){return a.has(this)||o(this,d),d}}}function km(t,e,n,i){e.annotationType_}var _m="true",Sm=fd();function fd(t){return{annotationType_:_m,options_:t,make_:Nm,extend_:Em,decorate_20223_:wm}}function Nm(t,e,n,i){var r,a;if(n.get)return _n.make_(t,e,n,i);if(n.set){var o=An(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:me.safeDescriptors?t.isPlainObject_:!0,set:o})===null?0:2:(Qt(i,e,{configurable:!0,set:o}),2)}if(i!==t.target_&&typeof n.value=="function"){var l;if(id(n.value)){var d,h=(d=this.options_)!=null&&d.autoBind?yi.bound:yi;return h.make_(t,e,n,i)}var m=(l=this.options_)!=null&&l.autoBind?rr.bound:rr;return m.make_(t,e,n,i)}var y=((r=this.options_)==null?void 0:r.deep)===!1?st.ref:st;if(typeof n.value=="function"&&(a=this.options_)!=null&&a.autoBind){var v;n.value=n.value.bind((v=t.proxy_)!=null?v:t.target_)}return y.make_(t,e,n,i)}function Em(t,e,n,i){var r,a;if(n.get)return _n.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:me.safeDescriptors?t.isPlainObject_:!0,set:An(e.toString(),n.set)},i);if(typeof n.value=="function"&&(r=this.options_)!=null&&r.autoBind){var o;n.value=n.value.bind((o=t.proxy_)!=null?o:t.target_)}var l=((a=this.options_)==null?void 0:a.deep)===!1?st.ref:st;return l.extend_(t,e,n,i)}function wm(t,e){Ve("'"+this.annotationType_+"' cannot be used as a decorator")}var Am="observable",Om="observable.ref",xm="observable.shallow",Tm="observable.struct",hd={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(hd);function Wr(t){return t||hd}var Ro=Ma(Am),Cm=Ma(Om,{enhancer:$a}),Rm=Ma(xm,{enhancer:tm}),Fm=Ma(Tm,{enhancer:nm}),pd=Zt(Ro);function Jr(t){return t.deep===!0?Kn:t.deep===!1?$a:Im(t.defaultDecorator)}function Dm(t){var e;return t?(e=t.defaultDecorator)!=null?e:fd(t):void 0}function Im(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:Kn}function md(t,e,n){if(hr(e))return Ro.decorate_20223_(t,e);if(Hn(e)){Ei(t,e,Ro);return}return Dd(t)?t:En(t)?st.object(t,e,n):Array.isArray(t)?st.array(t,e):Si(t)?st.map(t,e):an(t)?st.set(t,e):typeof t=="object"&&t!==null?t:st.box(t,e)}ed(md,pd);var Pm={box:function(e,n){var i=Wr(n);return new Un(e,Jr(i),i.name,!0,i.equals)},array:function(e,n){var i=Wr(n);return(me.useProxies===!1||i.proxy===!1?Tg:bg)(e,Jr(i),i.name)},map:function(e,n){var i=Wr(n);return new Ld(e,Jr(i),i.name)},set:function(e,n){var i=Wr(n);return new $d(e,Jr(i),i.name)},object:function(e,n,i){return Qn(function(){return ug(me.useProxies===!1||(i==null?void 0:i.proxy)===!1?Ai({},i):mg({},i),e,n)})},ref:Zt(Cm),shallow:Zt(Rm),deep:pd,struct:Zt(Fm)},st=ed(md,Pm),gd="computed",Lm="computed.struct",Fo=lu(gd),$m=lu(Lm,{equals:vi.structural}),_n=function(e,n){if(hr(n))return Fo.decorate_20223_(e,n);if(Hn(n))return Ei(e,n,Fo);if(En(e))return Zt(lu(gd,e));var i=En(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new Kt(i)};Object.assign(_n,Fo);_n.struct=Zt($m);var pl,ml,ha=0,Mm=1,jm=(pl=(ml=fa(function(){},"name"))==null?void 0:ml.configurable)!=null?pl:!1,gl={value:"action",configurable:!0,writable:!1,enumerable:!1};function An(t,e,n,i){n===void 0&&(n=!1);function r(){return Bm(t,n,e,i||this,arguments)}return r.isMobxAction=!0,r.toString=function(){return e.toString()},jm&&(gl.value=t,Qt(r,"name",gl)),r}function Bm(t,e,n,i,r){var a=Um(t,e);try{return n.apply(i,r)}catch(o){throw a.error_=o,o}finally{Vm(a)}}function Um(t,e,n,i){var r=!1,a=0,o=me.trackingDerivation,l=!e||!o;Mt();var d=me.allowStateChanges;l&&(Yn(),d=ja(!0));var h=cu(!0),m={runAsAction_:l,prevDerivation_:o,prevAllowStateChanges_:d,prevAllowStateReads_:h,notifySpy_:r,startTime_:a,actionId_:Mm++,parentActionId_:ha};return ha=m.actionId_,m}function Vm(t){ha!==t.actionId_&&Ve(30),ha=t.parentActionId_,t.error_!==void 0&&(me.suppressReactionErrors=!0),Ba(t.prevAllowStateChanges_),Yi(t.prevAllowStateReads_),jt(),t.runAsAction_&&un(t.prevDerivation_),me.suppressReactionErrors=!1}function vd(t,e){var n=ja(t);try{return e()}finally{Ba(n)}}function ja(t){var e=me.allowStateChanges;return me.allowStateChanges=t,e}function Ba(t){me.allowStateChanges=t}var Un=function(t){function e(i,r,a,o,l){var d;return a===void 0&&(a="ObservableValue"),l===void 0&&(l=vi.default),d=t.call(this,a)||this,d.enhancer=void 0,d.name_=void 0,d.equals=void 0,d.hasUnreportedChange_=!1,d.interceptors_=void 0,d.changeListeners_=void 0,d.value_=void 0,d.dehancer=void 0,d.enhancer=r,d.name_=a,d.equals=l,d.value_=r(i,void 0,a),d}od(e,t);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!==me.UNCHANGED&&this.setNewValue_(r)},n.prepareNewValue_=function(r){if(Lt(this)){var a=$t(this,{object:this,type:en,newValue:r});if(!a)return me.UNCHANGED;r=a.newValue}return r=this.enhancer(r,this.value_,this.name_),this.equals(this.value_,r)?me.UNCHANGED:r},n.setNewValue_=function(r){var a=this.value_;this.value_=r,this.reportChanged(),Vt(this)&&qt(this,{type:en,object:this,newValue:r,oldValue:a})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(r){return mr(this,r)},n.observe_=function(r,a){return a&&r({observableKind:"value",debugObjectName:this.name_,object:this,type:en,newValue:this.value_,oldValue:void 0}),gr(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 sd(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},e}(On),Kt=function(){function t(n){this.dependenciesState_=Ue.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Ue.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new ma(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=pa.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||Ve(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=An("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?vi.structural:vi.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){zm(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&&Ve(32,this.name_,this.derivation),me.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)Do(this)&&(this.warnAboutUntrackedRead_(),Mt(),this.value_=this.computeValue_(!1),jt());else if(Nd(this),Do(this)){var i=me.trackingContext;this.keepAlive_&&!i&&(me.trackingContext=this),this.trackAndCompute()&&Km(this),me.trackingContext=i}var r=this.value_;if(ia(r))throw r.cause;return r},e.set=function(i){if(this.setter_){this.isRunningSetter&&Ve(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter=!1}}else Ve(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,r=this.dependenciesState_===Ue.NOT_TRACKING_,a=this.computeValue_(!0),o=r||ia(i)||ia(a)||!this.equals_(i,a);return o&&(this.value_=a),o},e.computeValue_=function(i){this.isComputing=!0;var r=ja(!1),a;if(i)a=yd(this,this.derivation,this.scope_);else if(me.disableErrorBoundaries===!0)a=this.derivation.call(this.scope_);else try{a=this.derivation.call(this.scope_)}catch(o){a=new ma(o)}return Ba(r),this.isComputing=!1,a},e.suspend_=function(){this.keepAlive_||(Io(this),this.value_=void 0)},e.observe_=function(i,r){var a=this,o=!0,l=void 0;return qa(function(){var d=a.get();if(!o||r){var h=Yn();i({observableKind:"computed",debugObjectName:a.name_,type:en,object:a,newValue:d,oldValue:l}),un(h)}o=!1,l=d})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return sd(this.get())},e[Symbol.toPrimitive]=function(){return this.valueOf()},Ni(t,[{key:"isComputing",get:function(){return Tt(this.flags_,t.isComputingMask_)},set:function(i){this.flags_=Ct(this.flags_,t.isComputingMask_,i)}},{key:"isRunningSetter",get:function(){return Tt(this.flags_,t.isRunningSetterMask_)},set:function(i){this.flags_=Ct(this.flags_,t.isRunningSetterMask_,i)}},{key:"isBeingObserved",get:function(){return Tt(this.flags_,t.isBeingObservedMask_)},set:function(i){this.flags_=Ct(this.flags_,t.isBeingObservedMask_,i)}},{key:"isPendingUnobservation",get:function(){return Tt(this.flags_,t.isPendingUnobservationMask_)},set:function(i){this.flags_=Ct(this.flags_,t.isPendingUnobservationMask_,i)}},{key:"diffValue",get:function(){return Tt(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=Ct(this.flags_,t.diffValueMask_,i===1)}}])}();Kt.isComputingMask_=1;Kt.isRunningSetterMask_=2;Kt.isBeingObservedMask_=4;Kt.isPendingUnobservationMask_=8;Kt.diffValueMask_=16;var Ua=Jn("ComputedValue",Kt),Ue;(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_"})(Ue||(Ue={}));var pa;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(pa||(pa={}));var ma=function(e){this.cause=void 0,this.cause=e};function ia(t){return t instanceof ma}function Do(t){switch(t.dependenciesState_){case Ue.UP_TO_DATE_:return!1;case Ue.NOT_TRACKING_:case Ue.STALE_:return!0;case Ue.POSSIBLY_STALE_:{for(var e=cu(!0),n=Yn(),i=t.observing_,r=i.length,a=0;a<r;a++){var o=i[a];if(Ua(o)){if(me.disableErrorBoundaries)o.get();else try{o.get()}catch{return un(n),Yi(e),!0}if(t.dependenciesState_===Ue.STALE_)return un(n),Yi(e),!0}}return kd(t),un(n),Yi(e),!1}}}function yd(t,e,n){var i=cu(!0);kd(t),t.newObserving_=new Array(t.runId_===0?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++me.runId;var r=me.trackingDerivation;me.trackingDerivation=t,me.inBatch++;var a;if(me.disableErrorBoundaries===!0)a=e.call(n);else try{a=e.call(n)}catch(o){a=new ma(o)}return me.inBatch--,me.trackingDerivation=r,qm(t),Yi(i),a}function qm(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=Ue.UP_TO_DATE_,r=0,a=t.unboundDepsCount_,o=0;o<a;o++){var l=n[o];l.diffValue===0&&(l.diffValue=1,r!==o&&(n[r]=l),r++),l.dependenciesState_>i&&(i=l.dependenciesState_)}for(n.length=r,t.newObserving_=null,a=e.length;a--;){var d=e[a];d.diffValue===0&&_d(d,t),d.diffValue=0}for(;r--;){var h=n[r];h.diffValue===1&&(h.diffValue=0,Hm(h,t))}i!==Ue.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function Io(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)_d(e[n],t);t.dependenciesState_=Ue.NOT_TRACKING_}function bd(t){var e=Yn();try{return t()}finally{un(e)}}function Yn(){var t=me.trackingDerivation;return me.trackingDerivation=null,t}function un(t){me.trackingDerivation=t}function cu(t){var e=me.allowStateReads;return me.allowStateReads=t,e}function Yi(t){me.allowStateReads=t}function kd(t){if(t.dependenciesState_!==Ue.UP_TO_DATE_){t.dependenciesState_=Ue.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=Ue.UP_TO_DATE_}}var Xs=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},Qs=!0,me=function(){var t=Zc();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(Qs=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new Xs().version&&(Qs=!1),Qs?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new Xs):(setTimeout(function(){Ve(35)},1),new Xs)}();function Hm(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function _d(t,e){t.observers_.delete(e),t.observers_.size===0&&Sd(t)}function Sd(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,me.pendingUnobservations.push(t))}function Mt(){me.inBatch++}function jt(){if(--me.inBatch===0){wd();for(var t=me.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 Kt&&n.suspend_())}me.pendingUnobservations=[]}}function Nd(t){var e=me.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved&&me.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):(t.observers_.size===0&&me.inBatch>0&&Sd(t),!1)}function Ed(t){t.lowestObserverState_!==Ue.STALE_&&(t.lowestObserverState_=Ue.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ue.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Ue.STALE_}))}function Km(t){t.lowestObserverState_!==Ue.STALE_&&(t.lowestObserverState_=Ue.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ue.POSSIBLY_STALE_?e.dependenciesState_=Ue.STALE_:e.dependenciesState_===Ue.UP_TO_DATE_&&(t.lowestObserverState_=Ue.UP_TO_DATE_)}))}function zm(t){t.lowestObserverState_===Ue.UP_TO_DATE_&&(t.lowestObserverState_=Ue.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ue.UP_TO_DATE_&&(e.dependenciesState_=Ue.POSSIBLY_STALE_,e.onBecomeStale_())}))}var ln=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_=Ue.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=pa.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,me.pendingReactions.push(this),wd())},e.runReaction_=function(){if(!this.isDisposed){Mt(),this.isScheduled=!1;var i=me.trackingContext;if(me.trackingContext=this,Do(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(r){this.reportExceptionInDerivation_(r)}}me.trackingContext=i,jt()}},e.track=function(i){if(!this.isDisposed){Mt(),this.isRunning=!0;var r=me.trackingContext;me.trackingContext=this;var a=yd(this,i,void 0);me.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&Io(this),ia(a)&&this.reportExceptionInDerivation_(a.cause),jt()}},e.reportExceptionInDerivation_=function(i){var r=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(me.disableErrorBoundaries)throw i;var a="[mobx] uncaught error in '"+this+"'";me.suppressReactionErrors||console.error(a,i),me.globalReactionErrorHandlers.forEach(function(o){return o(i,r)})},e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(Mt(),Io(this),jt()))},e.getDisposer_=function(i){var r=this,a=function o(){r.dispose(),i==null||i.removeEventListener==null||i.removeEventListener("abort",o)};return i==null||i.addEventListener==null||i.addEventListener("abort",a),a[we]=this,a},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},Ni(t,[{key:"isDisposed",get:function(){return Tt(this.flags_,t.isDisposedMask_)},set:function(i){this.flags_=Ct(this.flags_,t.isDisposedMask_,i)}},{key:"isScheduled",get:function(){return Tt(this.flags_,t.isScheduledMask_)},set:function(i){this.flags_=Ct(this.flags_,t.isScheduledMask_,i)}},{key:"isTrackPending",get:function(){return Tt(this.flags_,t.isTrackPendingMask_)},set:function(i){this.flags_=Ct(this.flags_,t.isTrackPendingMask_,i)}},{key:"isRunning",get:function(){return Tt(this.flags_,t.isRunningMask_)},set:function(i){this.flags_=Ct(this.flags_,t.isRunningMask_,i)}},{key:"diffValue",get:function(){return Tt(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=Ct(this.flags_,t.diffValueMask_,i===1)}}])}();ln.isDisposedMask_=1;ln.isScheduledMask_=2;ln.isTrackPendingMask_=4;ln.isRunningMask_=8;ln.diffValueMask_=16;var Gm=100,Wm=function(e){return e()};function wd(){me.inBatch>0||me.isRunningReactions||Wm(Jm)}function Jm(){me.isRunningReactions=!0;for(var t=me.pendingReactions,e=0;t.length>0;){++e===Gm&&(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_()}me.isRunningReactions=!1}var ga=Jn("Reaction",ln);function Xi(){return!1}function Ym(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var Ad="action",Xm="action.bound",Od="autoAction",Qm="autoAction.bound",Zm="<unnamed action>",Po=pr(Ad),eg=pr(Xm,{bound:!0}),Lo=pr(Od,{autoAction:!0}),tg=pr(Qm,{autoAction:!0,bound:!0});function xd(t){var e=function(i,r){if(Ht(i))return An(i.name||Zm,i,t);if(Ht(r))return An(i,r,t);if(hr(r))return(t?Lo:Po).decorate_20223_(i,r);if(Hn(r))return Ei(i,r,t?Lo:Po);if(Hn(i))return Zt(pr(t?Od:Ad,{name:i,autoAction:t}))};return e}var xt=xd(!1);Object.assign(xt,Po);var rr=xd(!0);Object.assign(rr,Lo);xt.bound=Zt(eg);rr.bound=Zt(tg);function Va(t){return Ht(t)&&t.isMobxAction===!0}function qa(t,e){var n,i,r,a;e===void 0&&(e=ou);var o=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",l=!e.scheduler&&!e.delay,d;if(l)d=new ln(o,function(){this.track(y)},e.onError,e.requiresObservable);else{var h=Td(e),m=!1;d=new ln(o,function(){m||(m=!0,h(function(){m=!1,d.isDisposed||d.track(y)}))},e.onError,e.requiresObservable)}function y(){t(d)}return(r=e)!=null&&(r=r.signal)!=null&&r.aborted||d.schedule_(),d.getDisposer_((a=e)==null?void 0:a.signal)}var ng=function(e){return e()};function Td(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:ng}function ig(t,e,n){var i,r,a;n===void 0&&(n=ou);var o=(i=n.name)!=null?i:"Reaction",l=xt(o,n.onError?rg(n.onError,e):e),d=!n.scheduler&&!n.delay,h=Td(n),m=!0,y=!1,v,x=n.compareStructural?vi.structural:n.equals||vi.default,_=new ln(o,function(){m||d?N():y||(y=!0,h(N))},n.onError,n.requiresObservable);function N(){if(y=!1,!_.isDisposed){var E=!1,F=v;_.track(function(){var V=vd(!1,function(){return t(_)});E=m||!x(v,V),v=V}),(m&&n.fireImmediately||!m&&E)&&l(v,F,_),m=!1}}return(r=n)!=null&&(r=r.signal)!=null&&r.aborted||_.schedule_(),_.getDisposer_((a=n)==null?void 0:a.signal)}function rg(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}var ag="onBO",sg="onBUO";function og(t,e,n){return Rd(ag,t,e,n)}function Cd(t,e,n){return Rd(sg,t,e,n)}function Rd(t,e,n,i){var r=$o(e),a=Ht(i)?i:n,o=t+"L";return r[o]?r[o].add(a):r[o]=new Set([a]),function(){var l=r[o];l&&(l.delete(a),l.size===0&&delete r[o])}}function ug(t,e,n,i){var r=Gp(e);return Qn(function(){var a=Ai(t,i)[we];La(r).forEach(function(o){a.extend_(o,r[o],n&&o in n?n[o]:!0)})}),t}var lg=0;function Fd(){this.message="FLOW_CANCELLED"}Fd.prototype=Object.create(Error.prototype);var Zs=cd("flow"),cg=cd("flow.bound",{bound:!0}),yi=Object.assign(function(e,n){if(hr(n))return Zs.decorate_20223_(e,n);if(Hn(n))return Ei(e,n,Zs);var i=e,r=i.name||"<unnamed flow>",a=function(){var l=this,d=arguments,h=++lg,m=xt(r+" - runid: "+h+" - init",i).apply(l,d),y,v=void 0,x=new Promise(function(_,N){var E=0;y=N;function F(K){v=void 0;var Y;try{Y=xt(r+" - runid: "+h+" - yield "+E++,m.next).call(m,K)}catch(X){return N(X)}J(Y)}function V(K){v=void 0;var Y;try{Y=xt(r+" - runid: "+h+" - yield "+E++,m.throw).call(m,K)}catch(X){return N(X)}J(Y)}function J(K){if(Ht(K==null?void 0:K.then)){K.then(J,N);return}return K.done?_(K.value):(v=Promise.resolve(K.value),v.then(F,V))}F(void 0)});return x.cancel=xt(r+" - runid: "+h+" - cancel",function(){try{v&&vl(v);var _=m.return(void 0),N=Promise.resolve(_.value);N.then(pi,pi),vl(N),y(new Fd)}catch(E){y(E)}}),x};return a.isMobXFlow=!0,a},Zs);yi.bound=Zt(cg);function vl(t){Ht(t.cancel)&&t.cancel()}function ar(t){return(t==null?void 0:t.isMobXFlow)===!0}function dg(t,e){return t?Ka(t)||!!t[we]||uu(t)||ga(t)||Ua(t):!1}function Dd(t){return dg(t)}function sn(t,e){e===void 0&&(e=void 0),Mt();try{return t.apply(e)}finally{jt()}}function fg(t,e,n){return arguments.length===1||e&&typeof e=="object"?hg(t,e):Id(t,e,{})}function Id(t,e,n){var i;if(typeof n.timeout=="number"){var r=new Error("WHEN_TIMEOUT");i=setTimeout(function(){if(!o[we].isDisposed)if(o(),n.onError)n.onError(r);else throw r},n.timeout)}n.name="When";var a=An("When-effect",e),o=qa(function(l){var d=vd(!1,t);d&&(l.dispose(),i&&clearTimeout(i),a())},n);return o}function hg(t,e){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var i,r,a=new Promise(function(o,l){var d,h=Id(t,o,wn({},e,{onError:l}));i=function(){h(),l(new Error("WHEN_CANCELLED"))},r=function(){h(),l(new Error("WHEN_ABORTED"))},e==null||(d=e.signal)==null||d.addEventListener==null||d.addEventListener("abort",r)}).finally(function(){var o;return e==null||(o=e.signal)==null||o.removeEventListener==null?void 0:o.removeEventListener("abort",r)});return a.cancel=i,a}function ui(t){return t[we]}var pg={has:function(e,n){return ui(e).has_(n)},get:function(e,n){return ui(e).get_(n)},set:function(e,n,i){var r;return Hn(n)?(r=ui(e).set_(n,i,!0))!=null?r:!0:!1},deleteProperty:function(e,n){var i;return Hn(n)?(i=ui(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var r;return(r=ui(e).defineProperty_(n,i))!=null?r:!0},ownKeys:function(e){return ui(e).ownKeys_()},preventExtensions:function(e){Ve(13)}};function mg(t,e){var n,i;return td(),t=Ai(t,e),(i=(n=t[we]).proxy_)!=null?i:n.proxy_=new Proxy(t,pg)}function Lt(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function mr(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),nd(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function $t(t,e){var n=Yn();try{for(var i=[].concat(t.interceptors_||[]),r=0,a=i.length;r<a&&(e=i[r](e),e&&!e.type&&Ve(14),!!e);r++);return e}finally{un(n)}}function Vt(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function gr(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),nd(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function qt(t,e){var n=Yn(),i=t.changeListeners_;if(i){i=i.slice();for(var r=0,a=i.length;r<a;r++)i[r](e);un(n)}}function gg(t,e,n){return Qn(function(){var i,r=Ai(t,n)[we];(i=e)!=null||(e=Qp(t)),La(e).forEach(function(a){return r.make_(a,e[a])})}),t}var yl="splice",en="update",vg=1e4,yg={get:function(e,n){var i=e[we];return n===we?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):on(va,n)?va[n]:e[n]},set:function(e,n,i){var r=e[we];return n==="length"&&r.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:r.set_(parseInt(n),i),!0},preventExtensions:function(){Ve(15)}},du=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 On(n),this.enhancer_=function(o,l){return i(o,l,"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 mr(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}),gr(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&Ve("Out of range: "+i);var r=this.values_.length;if(i!==r)if(i>r){for(var a=new Array(i-r),o=0;o<i-r;o++)a[o]=void 0;this.spliceWithArray_(r,0,a)}else this.spliceWithArray_(i,r-i)},e.updateArrayLength_=function(i,r){i!==this.lastKnownLength_&&Ve(16),this.lastKnownLength_+=r,this.legacyMode_&&r>0&&Ud(i+r+1)},e.spliceWithArray_=function(i,r,a){var o=this;this.atom_;var l=this.values_.length;if(i===void 0?i=0:i>l?i=l:i<0&&(i=Math.max(0,l+i)),arguments.length===1?r=l-i:r==null?r=0:r=Math.max(0,Math.min(r,l-i)),a===void 0&&(a=To),Lt(this)){var d=$t(this,{object:this.proxy_,type:yl,index:i,removedCount:r,added:a});if(!d)return To;r=d.removedCount,a=d.added}if(a=a.length===0?a:a.map(function(y){return o.enhancer_(y,void 0)}),this.legacyMode_){var h=a.length-r;this.updateArrayLength_(l,h)}var m=this.spliceItemsIntoValues_(i,r,a);return(r!==0||a.length!==0)&&this.notifyArraySplice_(i,a,m),this.dehanceValues_(m)},e.spliceItemsIntoValues_=function(i,r,a){if(a.length<vg){var o;return(o=this.values_).splice.apply(o,[i,r].concat(a))}else{var l=this.values_.slice(i,i+r),d=this.values_.slice(i+r);this.values_.length+=a.length-r;for(var h=0;h<a.length;h++)this.values_[i+h]=a[h];for(var m=0;m<d.length;m++)this.values_[i+a.length+m]=d[m];return l}},e.notifyArrayChildUpdate_=function(i,r,a){var o=!this.owned_&&Xi(),l=Vt(this),d=l||o?{observableKind:"array",object:this.proxy_,type:en,debugObjectName:this.atom_.name_,index:i,newValue:r,oldValue:a}:null;this.atom_.reportChanged(),l&&qt(this,d)},e.notifyArraySplice_=function(i,r,a){var o=!this.owned_&&Xi(),l=Vt(this),d=l||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:yl,index:i,removed:a,added:r,removedCount:a.length,addedCount:r.length}:null;this.atom_.reportChanged(),l&&qt(this,d)},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&&Ve(17,i,a.length),i<a.length){this.atom_;var o=a[i];if(Lt(this)){var l=$t(this,{type:en,object:this.proxy_,index:i,newValue:r});if(!l)return;r=l.newValue}r=this.enhancer_(r,o);var d=r!==o;d&&(a[i]=r,this.notifyArrayChildUpdate_(i,r,o))}else{for(var h=new Array(i+1-a.length),m=0;m<h.length-1;m++)h[m]=void 0;h[h.length-1]=r,this.spliceWithArray_(a.length,0,h)}},t}();function bg(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),td(),Qn(function(){var r=new du(n,e,i,!1);rd(r.values_,we,r);var a=new Proxy(r.values_,yg);return r.proxy_=a,t&&t.length&&r.spliceWithArray_(0,0,t),a})}var va={clear:function(){return this.splice(0)},replace:function(e){var n=this[we];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 o=this[we];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,n)}return o.spliceWithArray_(e,n,r)},spliceWithArray:function(e,n,i){return this[we].spliceWithArray_(e,n,i)},push:function(){for(var e=this[we],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[we].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[we],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 me.trackingDerivation&&Ve(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){me.trackingDerivation&&Ve(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[we],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};Je("at",Ft);Je("concat",Ft);Je("flat",Ft);Je("includes",Ft);Je("indexOf",Ft);Je("join",Ft);Je("lastIndexOf",Ft);Je("slice",Ft);Je("toString",Ft);Je("toLocaleString",Ft);Je("toSorted",Ft);Je("toSpliced",Ft);Je("with",Ft);Je("every",zt);Je("filter",zt);Je("find",zt);Je("findIndex",zt);Je("findLast",zt);Je("findLastIndex",zt);Je("flatMap",zt);Je("forEach",zt);Je("map",zt);Je("some",zt);Je("toReversed",zt);Je("reduce",Pd);Je("reduceRight",Pd);function Je(t,e){typeof Array.prototype[t]=="function"&&(va[t]=e(t))}function Ft(t){return function(){var e=this[we];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function zt(t){return function(e,n){var i=this,r=this[we];r.atom_.reportObserved();var a=r.dehanceValues_(r.values_);return a[t](function(o,l){return e.call(n,o,l,i)})}}function Pd(t){return function(){var e=this,n=this[we];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),r=arguments[0];return arguments[0]=function(a,o,l){return r(a,o,l,e)},i[t].apply(i,arguments)}}var kg=Jn("ObservableArrayAdministration",du);function Ha(t){return Ia(t)&&kg(t[we])}var _g={},Sn="add",ya="delete",Ld=function(){function t(n,i,r){var a=this;i===void 0&&(i=Kn),r===void 0&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[we]=_g,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,Ht(Map)||Ve(18),Qn(function(){a.keysAtom_=ud("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(!me.trackingDerivation)return this.has_(i);var a=this.hasMap_.get(i);if(!a){var o=a=new Un(this.has_(i),$a,"ObservableMap.key?",!1);this.hasMap_.set(i,o),Cd(o,function(){return r.hasMap_.delete(i)})}return a.get()},e.set=function(i,r){var a=this.has_(i);if(Lt(this)){var o=$t(this,{type:a?en:Sn,object:this,newValue:r,name:i});if(!o)return this;r=o.newValue}return a?this.updateValue_(i,r):this.addValue_(i,r),this},e.delete=function(i){var r=this;if(this.keysAtom_,Lt(this)){var a=$t(this,{type:ya,object:this,name:i});if(!a)return!1}if(this.has_(i)){var o=Xi(),l=Vt(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:ya,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return sn(function(){var h;r.keysAtom_.reportChanged(),(h=r.hasMap_.get(i))==null||h.setNewValue_(!1);var m=r.data_.get(i);m.setNewValue_(void 0),r.data_.delete(i)}),l&&qt(this,d),!0}return!1},e.updateValue_=function(i,r){var a=this.data_.get(i);if(r=a.prepareNewValue_(r),r!==me.UNCHANGED){var o=Xi(),l=Vt(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:en,object:this,oldValue:a.value_,name:i,newValue:r}:null;a.setNewValue_(r),l&&qt(this,d)}},e.addValue_=function(i,r){var a=this;this.keysAtom_,sn(function(){var h,m=new Un(r,a.enhancer_,"ObservableMap.key",!1);a.data_.set(i,m),r=m.value_,(h=a.hasMap_.get(i))==null||h.setNewValue_(!0),a.keysAtom_.reportChanged()});var o=Xi(),l=Vt(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:Sn,object:this,name:i,newValue:r}:null;l&&qt(this,d)},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 sr({next:function(){var o=r.next(),l=o.done,d=o.value;return{done:l,value:l?void 0:i.get(d)}}})},e.entries=function(){var i=this,r=this.keys();return sr({next:function(){var o=r.next(),l=o.done,d=o.value;return{done:l,value:l?void 0:[d,i.get(d)]}}})},e[Symbol.iterator]=function(){return this.entries()},e.forEach=function(i,r){for(var a=mi(this),o;!(o=a()).done;){var l=o.value,d=l[0],h=l[1];i.call(r,h,d,this)}},e.merge=function(i){var r=this;return Xn(i)&&(i=new Map(i)),sn(function(){En(i)?zp(i).forEach(function(a){return r.set(a,i[a])}):Array.isArray(i)?i.forEach(function(a){var o=a[0],l=a[1];return r.set(o,l)}):Si(i)?(Kp(i)||Ve(19,i),i.forEach(function(a,o){return r.set(o,a)})):i!=null&&Ve(20,i)}),this},e.clear=function(){var i=this;sn(function(){bd(function(){for(var r=mi(i.keys()),a;!(a=r()).done;){var o=a.value;i.delete(o)}})})},e.replace=function(i){var r=this;return sn(function(){for(var a=Sg(i),o=new Map,l=!1,d=mi(r.data_.keys()),h;!(h=d()).done;){var m=h.value;if(!a.has(m)){var y=r.delete(m);if(y)l=!0;else{var v=r.data_.get(m);o.set(m,v)}}}for(var x=mi(a.entries()),_;!(_=x()).done;){var N=_.value,E=N[0],F=N[1],V=r.data_.has(E);if(r.set(E,F),r.data_.has(E)){var J=r.data_.get(E);o.set(E,J),V||(l=!0)}}if(!l)if(r.data_.size!==o.size)r.keysAtom_.reportChanged();else for(var K=r.data_.keys(),Y=o.keys(),X=K.next(),ne=Y.next();!X.done;){if(X.value!==ne.value){r.keysAtom_.reportChanged();break}X=K.next(),ne=Y.next()}r.data_=o}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,r){return gr(this,i)},e.intercept_=function(i){return mr(this,i)},Ni(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Xn=Jn("ObservableMap",Ld);function Sg(t){if(Si(t)||Xn(t))return t;if(Array.isArray(t))return new Map(t);if(En(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return Ve(21,t)}var Ng={},$d=function(){function t(n,i,r){var a=this;i===void 0&&(i=Kn),r===void 0&&(r="ObservableSet"),this.name_=void 0,this[we]=Ng,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,Ht(Set)||Ve(22),this.enhancer_=function(o,l){return i(o,l,r)},Qn(function(){a.atom_=ud(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;sn(function(){bd(function(){for(var r=mi(i.data_.values()),a;!(a=r()).done;){var o=a.value;i.delete(o)}})})},e.forEach=function(i,r){for(var a=mi(this),o;!(o=a()).done;){var l=o.value;i.call(r,l,l,this)}},e.add=function(i){var r=this;if(this.atom_,Lt(this)){var a=$t(this,{type:Sn,object:this,newValue:i});if(!a)return this}if(!this.has(i)){sn(function(){r.data_.add(r.enhancer_(i,void 0)),r.atom_.reportChanged()});var o=!1,l=Vt(this),d=l||o?{observableKind:"set",debugObjectName:this.name_,type:Sn,object:this,newValue:i}:null;l&&qt(this,d)}return this},e.delete=function(i){var r=this;if(Lt(this)){var a=$t(this,{type:ya,object:this,oldValue:i});if(!a)return!1}if(this.has(i)){var o=!1,l=Vt(this),d=l||o?{observableKind:"set",debugObjectName:this.name_,type:ya,object:this,oldValue:i}:null;return sn(function(){r.atom_.reportChanged(),r.data_.delete(i)}),l&&qt(this,d),!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 sr({next:function(){var l=i;return i+=1,l<a.length?{value:[r[l],a[l]],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 sr({next:function(){return r<a.length?{value:i.dehanceValue_(a[r++]),done:!1}:{done:!0}}})},e.intersection=function(i){if(an(i))return i.intersection(this);var r=new Set(this);return r.intersection(i)},e.union=function(i){if(an(i))return i.union(this);var r=new Set(this);return r.union(i)},e.difference=function(i){return new Set(this).difference(i)},e.symmetricDifference=function(i){if(an(i))return i.symmetricDifference(this);var r=new Set(this);return r.symmetricDifference(i)},e.isSubsetOf=function(i){return new Set(this).isSubsetOf(i)},e.isSupersetOf=function(i){return new Set(this).isSupersetOf(i)},e.isDisjointFrom=function(i){if(an(i))return i.isDisjointFrom(this);var r=new Set(this);return r.isDisjointFrom(i)},e.replace=function(i){var r=this;return wi(i)&&(i=new Set(i)),sn(function(){Array.isArray(i)?(r.clear(),i.forEach(function(a){return r.add(a)})):an(i)?(r.clear(),i.forEach(function(a){return r.add(a)})):i!=null&&Ve("Cannot initialize set from "+i)}),this},e.observe_=function(i,r){return gr(this,i)},e.intercept_=function(i){return mr(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Symbol.iterator]=function(){return this.values()},Ni(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),wi=Jn("ObservableSet",$d),bl=Object.create(null),kl="remove",Md=function(){function t(n,i,r,a){i===void 0&&(i=new Map),a===void 0&&(a=Sm),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 On("ObservableObject.keys"),this.isPlainObject_=En(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 Kt)return a.set(r),!0;if(Lt(this)){var o=$t(this,{type:en,object:this.proxy_||this.target_,name:i,newValue:r});if(!o)return null;r=o.newValue}if(r=a.prepareNewValue_(r),r!==me.UNCHANGED){var l=Vt(this),d=!1,h=l||d?{type:en,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:i,newValue:r}:null;a.setNewValue_(r),l&&qt(this,h)}return!0},e.get_=function(i){return me.trackingDerivation&&!on(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,r,a){return a===void 0&&(a=!1),on(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(!me.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var r=this.pendingKeys_.get(i);return r||(r=new Un(i in this.target_,$a,"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_[Yt])!=null&&a[i])return;Ve(1,r.annotationType_,this.name_+"."+i.toString())}for(var o=this.target_;o&&o!==Da;){var l=fa(o,i);if(l){var d=r.make_(this,i,l,o);if(d===0)return;if(d===1)break}o=Object.getPrototypeOf(o)}Sl(this,r,i)}},e.extend_=function(i,r,a,o){if(o===void 0&&(o=!1),a===!0&&(a=this.defaultAnnotation_),a===!1)return this.defineProperty_(i,r,o);var l=a.extend_(this,i,r,o);return l&&Sl(this,a,i),l},e.defineProperty_=function(i,r,a){a===void 0&&(a=!1),this.keysAtom_;try{Mt();var o=this.delete_(i);if(!o)return o;if(Lt(this)){var l=$t(this,{object:this.proxy_||this.target_,name:i,type:Sn,newValue:r.value});if(!l)return null;var d=l.newValue;r.value!==d&&(r=wn({},r,{value:d}))}if(a){if(!Reflect.defineProperty(this.target_,i,r))return!1}else Qt(this.target_,i,r);this.notifyPropertyAddition_(i,r.value)}finally{jt()}return!0},e.defineObservableProperty_=function(i,r,a,o){o===void 0&&(o=!1),this.keysAtom_;try{Mt();var l=this.delete_(i);if(!l)return l;if(Lt(this)){var d=$t(this,{object:this.proxy_||this.target_,name:i,type:Sn,newValue:r});if(!d)return null;r=d.newValue}var h=_l(i),m={configurable:me.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:h.get,set:h.set};if(o){if(!Reflect.defineProperty(this.target_,i,m))return!1}else Qt(this.target_,i,m);var y=new Un(r,a,"ObservableObject.key",!1);this.values_.set(i,y),this.notifyPropertyAddition_(i,y.value_)}finally{jt()}return!0},e.defineComputedProperty_=function(i,r,a){a===void 0&&(a=!1),this.keysAtom_;try{Mt();var o=this.delete_(i);if(!o)return o;if(Lt(this)){var l=$t(this,{object:this.proxy_||this.target_,name:i,type:Sn,newValue:void 0});if(!l)return null}r.name||(r.name="ObservableObject.key"),r.context=this.proxy_||this.target_;var d=_l(i),h={configurable:me.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:d.get,set:d.set};if(a){if(!Reflect.defineProperty(this.target_,i,h))return!1}else Qt(this.target_,i,h);this.values_.set(i,new Kt(r)),this.notifyPropertyAddition_(i,void 0)}finally{jt()}return!0},e.delete_=function(i,r){if(r===void 0&&(r=!1),this.keysAtom_,!on(this.target_,i))return!0;if(Lt(this)){var a=$t(this,{object:this.proxy_||this.target_,name:i,type:kl});if(!a)return null}try{var o;Mt();var l=Vt(this),d=!1,h=this.values_.get(i),m=void 0;if(!h&&(l||d)){var y;m=(y=fa(this.target_,i))==null?void 0:y.value}if(r){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(h&&(this.values_.delete(i),h instanceof Un&&(m=h.value_),Ed(h)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(o=o.get(i))==null||o.set(i in this.target_),l||d){var v={type:kl,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:m,name:i};l&&qt(this,v)}}finally{jt()}return!0},e.observe_=function(i,r){return gr(this,i)},e.intercept_=function(i){return mr(this,i)},e.notifyPropertyAddition_=function(i,r){var a,o=Vt(this),l=!1;if(o||l){var d=o||l?{type:Sn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:r}:null;o&&qt(this,d)}(a=this.pendingKeys_)==null||(a=a.get(i))==null||a.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),La(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function Ai(t,e){var n;if(on(t,we))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",r=new Md(t,new Map,String(i),Dm(e));return Pa(t,we,r),t}var Eg=Jn("ObservableObjectAdministration",Md);function _l(t){return bl[t]||(bl[t]={get:function(){return this[we].getObservablePropValue_(t)},set:function(n){return this[we].setObservablePropValue_(t,n)}})}function Ka(t){return Ia(t)?Eg(t[we]):!1}function Sl(t,e,n){var i;(i=t.target_[Yt])==null||delete i[n]}var wg=Bd(0),Ag=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),eo=0,jd=function(){};function Og(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}Og(jd,Array.prototype);var fu=function(t){function e(i,r,a,o){var l;return a===void 0&&(a="ObservableArray"),o===void 0&&(o=!1),l=t.call(this)||this,Qn(function(){var d=new du(a,r,o,!0);d.proxy_=l,rd(l,we,d),i&&i.length&&l.spliceWithArray(0,0,i),Ag&&Object.defineProperty(l,"0",wg)}),l}od(e,t);var n=e.prototype;return n.concat=function(){this[we].atom_.reportObserved();for(var r=arguments.length,a=new Array(r),o=0;o<r;o++)a[o]=arguments[o];return Array.prototype.concat.apply(this.slice(),a.map(function(l){return Ha(l)?l.slice():l}))},n[Symbol.iterator]=function(){var i=this,r=0;return sr({next:function(){return r<i.length?{value:i[r++],done:!1}:{done:!0,value:void 0}}})},Ni(e,[{key:"length",get:function(){return this[we].getArrayLength_()},set:function(r){this[we].setArrayLength_(r)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(jd);Object.entries(va).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&Pa(fu.prototype,e,n)});function Bd(t){return{enumerable:!1,configurable:!0,get:function(){return this[we].get_(t)},set:function(n){this[we].set_(t,n)}}}function xg(t){Qt(fu.prototype,""+t,Bd(t))}function Ud(t){if(t>eo){for(var e=eo;e<t+100;e++)xg(e);eo=t}}Ud(1e3);function Tg(t,e,n){return new fu(t,e,n)}function $o(t,e){if(typeof t=="object"&&t!==null){if(Ha(t))return e!==void 0&&Ve(23),t[we].atom_;if(wi(t))return t.atom_;if(Xn(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||Ve(25,e,Mo(t)),n}if(Ka(t)){if(!e)return Ve(26);var i=t[we].values_.get(e);return i||Ve(27,e,Mo(t)),i}if(uu(t)||Ua(t)||ga(t))return t}else if(Ht(t)&&ga(t[we]))return t[we];Ve(28)}function Cg(t,e){if(t||Ve(29),uu(t)||Ua(t)||ga(t)||Xn(t)||wi(t))return t;if(t[we])return t[we];Ve(24,t)}function Mo(t,e){var n;if(e!==void 0)n=$o(t,e);else{if(Va(t))return t.name;Ka(t)||Xn(t)||wi(t)?n=Cg(t):n=$o(t)}return n.name_}function Qn(t){var e=Yn(),n=ja(!0);Mt();try{return t()}finally{jt(),Ba(n),un(e)}}var Nl=Da.toString;function Vd(t,e,n){return n===void 0&&(n=-1),jo(t,e,n)}function jo(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 o=Nl.call(t);if(o!==Nl.call(e))return!1;switch(o){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=El(t),e=El(e);var l=o==="[object Array]";if(!l){if(typeof t!="object"||typeof e!="object")return!1;var d=t.constructor,h=e.constructor;if(d!==h&&!(Ht(d)&&d instanceof d&&Ht(h)&&h instanceof h)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],r=r||[];for(var m=i.length;m--;)if(i[m]===t)return r[m]===e;if(i.push(t),r.push(e),l){if(m=t.length,m!==e.length)return!1;for(;m--;)if(!jo(t[m],e[m],n-1,i,r))return!1}else{var y=Object.keys(t),v;if(m=y.length,Object.keys(e).length!==m)return!1;for(;m--;)if(v=y[m],!(on(e,v)&&jo(t[v],e[v],n-1,i,r)))return!1}return i.pop(),r.pop(),!0}function El(t){return Ha(t)?t.slice():Si(t)||Xn(t)||an(t)||wi(t)?Array.from(t.entries()):t}function sr(t){return t[Symbol.iterator]=Rg,t}function Rg(){return this}["Symbol","Map","Set"].forEach(function(t){var e=Zc();typeof e[t]=="undefined"&&Ve("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:Ym,extras:{getDebugName:Mo},$mobx:we});function Fg(t,e=[]){Pe.useEffect(()=>{const n=qa(t);return()=>n()},e)}function qd(t,e={}){const{defaultValue:n,deps:i=[]}=e,r=Pe.useMemo(()=>t,i),[a,o]=Pe.useState(()=>r()||n);return Pe.useEffect(()=>{const l=qa(()=>o(r()));return()=>l()},[r,...i]),a}function Dg(t,e,n=[]){const i=Pe.useMemo(()=>t,n),r=Pe.useMemo(()=>e,n);Pe.useEffect(()=>{const a=ig(i,r);return()=>a()},[i,r])}let hu=new Map;const Bo=Pe.createContext(hu),Ig=({children:t,stores:e})=>{const n=Pe.useContext(Bo),i=Pe.useMemo(()=>{const r=new Map;return e.forEach(a=>r.set(a.class,a.value)),hu=new Map([...n,...r])},[]);return dp.jsx(Bo.Provider,{value:i,children:t})};function Pg(t){return Pe.useContext(Bo).get(t)}function Lg(t){return hu.get(t)}var $g=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function za(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ra={exports:{}},Mg=ra.exports,wl;function jg(){return wl||(wl=1,function(t,e){(function(n,i){t.exports=i()})(Mg,function(){var n=function(s,u){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(c[p]=f[p])})(s,u)},i=function(){return(i=Object.assign||function(s){for(var u,c=1,f=arguments.length;c<f;c++)for(var p in u=arguments[c])Object.prototype.hasOwnProperty.call(u,p)&&(s[p]=u[p]);return s}).apply(this,arguments)};function r(s,u,c){for(var f,p=0,g=u.length;p<g;p++)!f&&p in u||((f=f||Array.prototype.slice.call(u,0,p))[p]=u[p]);return s.concat(f||Array.prototype.slice.call(u))}var a=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:$g,o=Object.keys,l=Array.isArray;function d(s,u){return typeof u!="object"||o(u).forEach(function(c){s[c]=u[c]}),s}typeof Promise=="undefined"||a.Promise||(a.Promise=Promise);var h=Object.getPrototypeOf,m={}.hasOwnProperty;function y(s,u){return m.call(s,u)}function v(s,u){typeof u=="function"&&(u=u(h(s))),(typeof Reflect=="undefined"?o:Reflect.ownKeys)(u).forEach(function(c){_(s,c,u[c])})}var x=Object.defineProperty;function _(s,u,c,f){x(s,u,d(c&&y(c,"get")&&typeof c.get=="function"?{get:c.get,set:c.set,configurable:!0}:{value:c,configurable:!0,writable:!0},f))}function N(s){return{from:function(u){return s.prototype=Object.create(u.prototype),_(s.prototype,"constructor",s),{extend:v.bind(null,s.prototype)}}}}var E=Object.getOwnPropertyDescriptor,F=[].slice;function V(s,u,c){return F.call(s,u,c)}function J(s,u){return u(s)}function K(s){if(!s)throw new Error("Assertion Failed")}function Y(s){a.setImmediate?setImmediate(s):setTimeout(s,0)}function X(s,u){if(typeof u=="string"&&y(s,u))return s[u];if(!u)return s;if(typeof u!="string"){for(var c=[],f=0,p=u.length;f<p;++f){var g=X(s,u[f]);c.push(g)}return c}var b=u.indexOf(".");if(b!==-1){var k=s[u.substr(0,b)];return k==null?void 0:X(k,u.substr(b+1))}}function ne(s,u,c){if(s&&u!==void 0&&!("isFrozen"in Object&&Object.isFrozen(s)))if(typeof u!="string"&&"length"in u){K(typeof c!="string"&&"length"in c);for(var f=0,p=u.length;f<p;++f)ne(s,u[f],c[f])}else{var g,b,k=u.indexOf(".");k!==-1?(g=u.substr(0,k),(b=u.substr(k+1))===""?c===void 0?l(s)&&!isNaN(parseInt(g))?s.splice(g,1):delete s[g]:s[g]=c:ne(k=!(k=s[g])||!y(s,g)?s[g]={}:k,b,c)):c===void 0?l(s)&&!isNaN(parseInt(u))?s.splice(u,1):delete s[u]:s[u]=c}}function ye(s){var u,c={};for(u in s)y(s,u)&&(c[u]=s[u]);return c}var fe=[].concat;function je(s){return fe.apply([],s)}var Dt="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(je([8,16,32,64].map(function(s){return["Int","Uint","Float"].map(function(u){return u+s+"Array"})}))).filter(function(s){return a[s]}),ke=new Set(Dt.map(function(s){return a[s]})),Ae=null;function Le(s){return Ae=new WeakMap,s=function u(c){if(!c||typeof c!="object")return c;var f=Ae.get(c);if(f)return f;if(l(c)){f=[],Ae.set(c,f);for(var p=0,g=c.length;p<g;++p)f.push(u(c[p]))}else if(ke.has(c.constructor))f=c;else{var b,k=h(c);for(b in f=k===Object.prototype?{}:Object.create(k),Ae.set(c,f),c)y(c,b)&&(f[b]=u(c[b]))}return f}(s),Ae=null,s}var M={}.toString;function w(s){return M.call(s).slice(8,-1)}var z=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator",Q=typeof z=="symbol"?function(s){var u;return s!=null&&(u=s[z])&&u.apply(s)}:function(){return null};function ae(s,u){return u=s.indexOf(u),0<=u&&s.splice(u,1),0<=u}var te={};function j(s){var u,c,f,p;if(arguments.length===1){if(l(s))return s.slice();if(this===te&&typeof s=="string")return[s];if(p=Q(s)){for(c=[];!(f=p.next()).done;)c.push(f.value);return c}if(s==null)return[s];if(typeof(u=s.length)!="number")return[s];for(c=new Array(u);u--;)c[u]=s[u];return c}for(u=arguments.length,c=new Array(u);u--;)c[u]=arguments[u];return c}var Oe=typeof Symbol!="undefined"?function(s){return s[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},tn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],It=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(tn),Re={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Ke(s,u){this.name=s,this.message=u}function I(s,u){return s+". Errors: "+Object.keys(u).map(function(c){return u[c].toString()}).filter(function(c,f,p){return p.indexOf(c)===f}).join(`
|
|
27
|
-
`)}function
|
|
28
|
-
`+g:""),this.inner=g||null):typeof p=="object"&&(this.message="".concat(p.name," ").concat(p.message),this.inner=p):(this.message=Re[u]||c,this.inner=null)}return N(f).from(Fe),s[u]=f,s},{});he.Syntax=SyntaxError,he.Type=TypeError,he.Range=RangeError;var Ge=tn.reduce(function(s,u){return s[u+"Error"]=he[u],s},{}),qe=It.reduce(function(s,u){return["Syntax","Type","Range"].indexOf(u)===-1&&(s[u+"Error"]=he[u]),s},{});function Se(){}function pt(s){return s}function nt(s,u){return s==null||s===pt?u:function(c){return u(s(c))}}function _e(s,u){return function(){s.apply(this,arguments),u.apply(this,arguments)}}function ut(s,u){return s===Se?u:function(){var c=s.apply(this,arguments);c!==void 0&&(arguments[0]=c);var f=this.onsuccess,p=this.onerror;this.onsuccess=null,this.onerror=null;var g=u.apply(this,arguments);return f&&(this.onsuccess=this.onsuccess?_e(f,this.onsuccess):f),p&&(this.onerror=this.onerror?_e(p,this.onerror):p),g!==void 0?g:c}}function Xe(s,u){return s===Se?u:function(){s.apply(this,arguments);var c=this.onsuccess,f=this.onerror;this.onsuccess=this.onerror=null,u.apply(this,arguments),c&&(this.onsuccess=this.onsuccess?_e(c,this.onsuccess):c),f&&(this.onerror=this.onerror?_e(f,this.onerror):f)}}function ue(s,u){return s===Se?u:function(c){var f=s.apply(this,arguments);d(c,f);var p=this.onsuccess,g=this.onerror;return this.onsuccess=null,this.onerror=null,c=u.apply(this,arguments),p&&(this.onsuccess=this.onsuccess?_e(p,this.onsuccess):p),g&&(this.onerror=this.onerror?_e(g,this.onerror):g),f===void 0?c===void 0?void 0:c:d(f,c)}}function He(s,u){return s===Se?u:function(){return u.apply(this,arguments)!==!1&&s.apply(this,arguments)}}function ie(s,u){return s===Se?u:function(){var c=s.apply(this,arguments);if(c&&typeof c.then=="function"){for(var f=this,p=arguments.length,g=new Array(p);p--;)g[p]=arguments[p];return c.then(function(){return u.apply(f,g)})}return u.apply(this,arguments)}}qe.ModifyError=q,qe.DexieError=Ke,qe.BulkError=ot;var Ee=typeof location!="undefined"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function We(s){Ee=s}var it={},tt=100,Dt=typeof Promise=="undefined"?[]:function(){var s=Promise.resolve();if(typeof crypto=="undefined"||!crypto.subtle)return[s,h(s),s];var u=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[u,h(u),s]}(),tn=Dt[0],It=Dt[1],Dt=Dt[2],It=It&&It.then,xn=tn&&tn.constructor,ds=!!Dt,Ci=function(s,u){Ri.push([s,u]),_r&&(queueMicrotask(jh),_r=!1)},fs=!0,_r=!0,Tn=[],Sr=[],hs=pt,fn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Se,pgp:!1,env:{},finalize:Se},be=fn,Ri=[],Cn=0,Nr=[];function ce(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var u=this._PSD=be;if(typeof s!="function"){if(s!==it)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&ms(this,this._value))}this._state=null,this._value=null,++u.ref,function c(f,p){try{p(function(g){if(f._state===null){if(g===f)throw new TypeError("A promise cannot be resolved with itself.");var b=f._lib&&ei();g&&typeof g.then=="function"?c(f,function(k,A){g instanceof ce?g._then(k,A):g.then(k,A)}):(f._state=!0,f._value=g,Du(f)),b&&ti()}},ms.bind(null,f))}catch(g){ms(f,g)}}(this,s)}var ps={get:function(){var s=be,u=Or;function c(f,p){var g=this,b=!s.global&&(s!==be||u!==Or),k=b&&!pn(),A=new ce(function(T,D){gs(g,new Fu(Pu(f,s,b,k),Pu(p,s,b,k),T,D,s))});return this._consoleTask&&(A._consoleTask=this._consoleTask),A}return c.prototype=it,c},set:function(s){_(this,"then",s&&s.prototype===it?ps:{get:function(){return s},set:ps.set})}};function Fu(s,u,c,f,p){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof u=="function"?u:null,this.resolve=c,this.reject=f,this.psd=p}function ms(s,u){var c,f;Sr.push(u),s._state===null&&(c=s._lib&&ei(),u=hs(u),s._state=!1,s._value=u,f=s,Tn.some(function(p){return p._value===f._value})||Tn.push(f),Du(s),c&&ti())}function Du(s){var u=s._listeners;s._listeners=[];for(var c=0,f=u.length;c<f;++c)gs(s,u[c]);var p=s._PSD;--p.ref||p.finalize(),Cn===0&&(++Cn,Ci(function(){--Cn==0&&vs()},[]))}function gs(s,u){if(s._state!==null){var c=s._state?u.onFulfilled:u.onRejected;if(c===null)return(s._state?u.resolve:u.reject)(s._value);++u.psd.ref,++Cn,Ci(Mh,[c,s,u])}else s._listeners.push(u)}function Mh(s,u,c){try{var f,p=u._value;!u._state&&Sr.length&&(Sr=[]),f=Ee&&u._consoleTask?u._consoleTask.run(function(){return s(p)}):s(p),u._state||Sr.indexOf(p)!==-1||function(g){for(var b=Tn.length;b;)if(Tn[--b]._value===g._value)return Tn.splice(b,1)}(u),c.resolve(f)}catch(g){c.reject(g)}finally{--Cn==0&&vs(),--c.psd.ref||c.psd.finalize()}}function jh(){Rn(fn,function(){ei()&&ti()})}function ei(){var s=fs;return _r=fs=!1,s}function ti(){var s,u,c;do for(;0<Ri.length;)for(s=Ri,Ri=[],c=s.length,u=0;u<c;++u){var f=s[u];f[0].apply(null,f[1])}while(0<Ri.length);_r=fs=!0}function vs(){var s=Tn;Tn=[],s.forEach(function(f){f._PSD.onunhandled.call(null,f._value,f)});for(var u=Nr.slice(0),c=u.length;c;)u[--c]()}function Er(s){return new ce(it,!1,s)}function Qe(s,u){var c=be;return function(){var f=ei(),p=be;try{return mn(c,!0),s.apply(this,arguments)}catch(g){u&&u(g)}finally{mn(p,!1),f&&ti()}}}v(ce.prototype,{then:ps,_then:function(s,u){gs(this,new Fu(null,null,s,u,be))},catch:function(s){if(arguments.length===1)return this.then(null,s);var u=s,c=arguments[1];return typeof u=="function"?this.then(null,function(f){return(f instanceof u?c:Er)(f)}):this.then(null,function(f){return(f&&f.name===u?c:Er)(f)})},finally:function(s){return this.then(function(u){return ce.resolve(s()).then(function(){return u})},function(u){return ce.resolve(s()).then(function(){return Er(u)})})},timeout:function(s,u){var c=this;return s<1/0?new ce(function(f,p){var g=setTimeout(function(){return p(new he.Timeout(u))},s);c.then(f,p).finally(clearTimeout.bind(null,g))}):this}}),typeof Symbol!="undefined"&&Symbol.toStringTag&&_(ce.prototype,Symbol.toStringTag,"Dexie.Promise"),fn.env=Iu(),v(ce,{all:function(){var s=j.apply(null,arguments).map(xr);return new ce(function(u,c){s.length===0&&u([]);var f=s.length;s.forEach(function(p,g){return ce.resolve(p).then(function(b){s[g]=b,--f||u(s)},c)})})},resolve:function(s){return s instanceof ce?s:s&&typeof s.then=="function"?new ce(function(u,c){s.then(u,c)}):new ce(it,!0,s)},reject:Er,race:function(){var s=j.apply(null,arguments).map(xr);return new ce(function(u,c){s.map(function(f){return ce.resolve(f).then(u,c)})})},PSD:{get:function(){return be},set:function(s){return be=s}},totalEchoes:{get:function(){return Or}},newPSD:hn,usePSD:Rn,scheduler:{get:function(){return Ci},set:function(s){Ci=s}},rejectionMapper:{get:function(){return hs},set:function(s){hs=s}},follow:function(s,u){return new ce(function(c,f){return hn(function(p,g){var b=be;b.unhandleds=[],b.onunhandled=g,b.finalize=_e(function(){var k,A=this;k=function(){A.unhandleds.length===0?p():g(A.unhandleds[0])},Nr.push(function T(){k(),Nr.splice(Nr.indexOf(T),1)}),++Cn,Ci(function(){--Cn==0&&vs()},[])},b.finalize),s()},u,c,f)})}}),xn&&(xn.allSettled&&_(ce,"allSettled",function(){var s=j.apply(null,arguments).map(xr);return new ce(function(u){s.length===0&&u([]);var c=s.length,f=new Array(c);s.forEach(function(p,g){return ce.resolve(p).then(function(b){return f[g]={status:"fulfilled",value:b}},function(b){return f[g]={status:"rejected",reason:b}}).then(function(){return--c||u(f)})})})}),xn.any&&typeof AggregateError!="undefined"&&_(ce,"any",function(){var s=j.apply(null,arguments).map(xr);return new ce(function(u,c){s.length===0&&c(new AggregateError([]));var f=s.length,p=new Array(f);s.forEach(function(g,b){return ce.resolve(g).then(function(k){return u(k)},function(k){p[b]=k,--f||c(new AggregateError(p))})})})}),xn.withResolvers&&(ce.withResolvers=xn.withResolvers));var dt={awaits:0,echoes:0,id:0},Bh=0,wr=[],Ar=0,Or=0,Uh=0;function hn(s,u,c,f){var p=be,g=Object.create(p);return g.parent=p,g.ref=0,g.global=!1,g.id=++Uh,fn.env,g.env=ds?{Promise:ce,PromiseProp:{value:ce,configurable:!0,writable:!0},all:ce.all,race:ce.race,allSettled:ce.allSettled,any:ce.any,resolve:ce.resolve,reject:ce.reject}:{},u&&d(g,u),++p.ref,g.finalize=function(){--this.parent.ref||this.parent.finalize()},f=Rn(g,s,c,f),g.ref===0&&g.finalize(),f}function ni(){return dt.id||(dt.id=++Bh),++dt.awaits,dt.echoes+=tt,dt.id}function pn(){return!!dt.awaits&&(--dt.awaits==0&&(dt.id=0),dt.echoes=dt.awaits*tt,!0)}function xr(s){return dt.echoes&&s&&s.constructor===xn?(ni(),s.then(function(u){return pn(),u},function(u){return pn(),rt(u)})):s}function Vh(){var s=wr[wr.length-1];wr.pop(),mn(s,!1)}function mn(s,u){var c,f=be;(u?!dt.echoes||Ar++&&s===be:!Ar||--Ar&&s===be)||queueMicrotask(u?function(p){++Or,dt.echoes&&--dt.echoes!=0||(dt.echoes=dt.awaits=dt.id=0),wr.push(be),mn(p,!0)}.bind(null,s):Vh),s!==be&&(be=s,f===fn&&(fn.env=Iu()),ds&&(c=fn.env.Promise,u=s.env,(f.global||s.global)&&(Object.defineProperty(a,"Promise",u.PromiseProp),c.all=u.all,c.race=u.race,c.resolve=u.resolve,c.reject=u.reject,u.allSettled&&(c.allSettled=u.allSettled),u.any&&(c.any=u.any))))}function Iu(){var s=a.Promise;return ds?{Promise:s,PromiseProp:Object.getOwnPropertyDescriptor(a,"Promise"),all:s.all,race:s.race,allSettled:s.allSettled,any:s.any,resolve:s.resolve,reject:s.reject}:{}}function Rn(s,u,c,f,p){var g=be;try{return mn(s,!0),u(c,f,p)}finally{mn(g,!1)}}function Pu(s,u,c,f){return typeof s!="function"?s:function(){var p=be;c&&ni(),mn(u,!0);try{return s.apply(this,arguments)}finally{mn(p,!1),f&&queueMicrotask(pn)}}}function ys(s){Promise===xn&&dt.echoes===0?Ar===0?s():enqueueNativeMicroTask(s):setTimeout(s,0)}(""+It).indexOf("[native code]")===-1&&(ni=pn=Se);var rt=ce.reject,Fn="",nn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Lu="String expected.",ii=[],Tr="__dbnames",bs="readonly",ks="readwrite";function Dn(s,u){return s?u?function(){return s.apply(this,arguments)&&u.apply(this,arguments)}:s:u}var $u={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Cr(s){return typeof s!="string"||/\./.test(s)?function(u){return u}:function(u){return u[s]===void 0&&s in u&&delete(u=Le(u))[s],u}}function Mu(){throw he.Type()}function Me(s,u){try{var c=ju(s),f=ju(u);if(c!==f)return c==="Array"?1:f==="Array"?-1:c==="binary"?1:f==="binary"?-1:c==="string"?1:f==="string"?-1:c==="Date"?1:f!=="Date"?NaN:-1;switch(c){case"number":case"Date":case"string":return u<s?1:s<u?-1:0;case"binary":return function(p,g){for(var b=p.length,k=g.length,A=b<k?b:k,T=0;T<A;++T)if(p[T]!==g[T])return p[T]<g[T]?-1:1;return b===k?0:b<k?-1:1}(Bu(s),Bu(u));case"Array":return function(p,g){for(var b=p.length,k=g.length,A=b<k?b:k,T=0;T<A;++T){var D=Me(p[T],g[T]);if(D!==0)return D}return b===k?0:b<k?-1:1}(s,u)}}catch{}return NaN}function ju(s){var u=typeof s;return u!="object"?u:ArrayBuffer.isView(s)?"binary":(s=w(s),s==="ArrayBuffer"?"binary":s)}function Bu(s){return s instanceof Uint8Array?s:ArrayBuffer.isView(s)?new Uint8Array(s.buffer,s.byteOffset,s.byteLength):new Uint8Array(s)}var Uu=(Ye.prototype._trans=function(s,u,c){var f=this._tx||be.trans,p=this.name,g=Ee&&typeof console!="undefined"&&console.createTask&&console.createTask("Dexie: ".concat(s==="readonly"?"read":"write"," ").concat(this.name));function b(T,D,S){if(!S.schema[p])throw new he.NotFound("Table "+p+" not part of transaction");return u(S.idbtrans,S)}var k=ei();try{var A=f&&f.db._novip===this.db._novip?f===be.trans?f._promise(s,b,c):hn(function(){return f._promise(s,b,c)},{trans:f,transless:be.transless||be}):function T(D,S,L,O){if(D.idbdb&&(D._state.openComplete||be.letThrough||D._vip)){var R=D._createTransaction(S,L,D._dbSchema);try{R.create(),D._state.PR1398_maxLoop=3}catch(P){return P.name===ge.InvalidState&&D.isOpen()&&0<--D._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),D.close({disableAutoOpen:!1}),D.open().then(function(){return T(D,S,L,O)})):rt(P)}return R._promise(S,function(P,C){return hn(function(){return be.trans=R,O(P,C,R)})}).then(function(P){if(S==="readwrite")try{R.idbtrans.commit()}catch{}return S==="readonly"?P:R._completion.then(function(){return P})})}if(D._state.openComplete)return rt(new he.DatabaseClosed(D._state.dbOpenError));if(!D._state.isBeingOpened){if(!D._state.autoOpen)return rt(new he.DatabaseClosed);D.open().catch(Se)}return D._state.dbReadyPromise.then(function(){return T(D,S,L,O)})}(this.db,s,[this.name],b);return g&&(A._consoleTask=g,A=A.catch(function(T){return console.trace(T),rt(T)})),A}finally{k&&ti()}},Ye.prototype.get=function(s,u){var c=this;return s&&s.constructor===Object?this.where(s).first(u):s==null?rt(new he.Type("Invalid argument to Table.get()")):this._trans("readonly",function(f){return c.core.get({trans:f,key:s}).then(function(p){return c.hook.reading.fire(p)})}).then(u)},Ye.prototype.where=function(s){if(typeof s=="string")return new this.db.WhereClause(this,s);if(l(s))return new this.db.WhereClause(this,"[".concat(s.join("+"),"]"));var u=o(s);if(u.length===1)return this.where(u[0]).equals(s[u[0]]);var c=this.schema.indexes.concat(this.schema.primKey).filter(function(k){if(k.compound&&u.every(function(T){return 0<=k.keyPath.indexOf(T)})){for(var A=0;A<u.length;++A)if(u.indexOf(k.keyPath[A])===-1)return!1;return!0}return!1}).sort(function(k,A){return k.keyPath.length-A.keyPath.length})[0];if(c&&this.db._maxKey!==Fn){var g=c.keyPath.slice(0,u.length);return this.where(g).equals(g.map(function(A){return s[A]}))}!c&&Ee&&console.warn("The query ".concat(JSON.stringify(s)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(u.join("+"),"]"));var f=this.schema.idxByName;function p(k,A){return Me(k,A)===0}var b=u.reduce(function(S,A){var T=S[0],D=S[1],S=f[A],L=s[A];return[T||S,T||!S?Dn(D,S&&S.multi?function(O){return O=X(O,A),l(O)&&O.some(function(R){return p(L,R)})}:function(O){return p(L,X(O,A))}):D]},[null,null]),g=b[0],b=b[1];return g?this.where(g.name).equals(s[g.keyPath]).filter(b):c?this.filter(b):this.where(u).equals("")},Ye.prototype.filter=function(s){return this.toCollection().and(s)},Ye.prototype.count=function(s){return this.toCollection().count(s)},Ye.prototype.offset=function(s){return this.toCollection().offset(s)},Ye.prototype.limit=function(s){return this.toCollection().limit(s)},Ye.prototype.each=function(s){return this.toCollection().each(s)},Ye.prototype.toArray=function(s){return this.toCollection().toArray(s)},Ye.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},Ye.prototype.orderBy=function(s){return new this.db.Collection(new this.db.WhereClause(this,l(s)?"[".concat(s.join("+"),"]"):s))},Ye.prototype.reverse=function(){return this.toCollection().reverse()},Ye.prototype.mapToClass=function(s){var u,c=this.db,f=this.name;function p(){return u!==null&&u.apply(this,arguments)||this}(this.schema.mappedClass=s).prototype instanceof Mu&&(function(A,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function D(){this.constructor=A}n(A,T),A.prototype=T===null?Object.create(T):(D.prototype=T.prototype,new D)}(p,u=s),Object.defineProperty(p.prototype,"db",{get:function(){return c},enumerable:!1,configurable:!0}),p.prototype.table=function(){return f},s=p);for(var g=new Set,b=s.prototype;b;b=h(b))Object.getOwnPropertyNames(b).forEach(function(A){return g.add(A)});function k(A){if(!A)return A;var T,D=Object.create(s.prototype);for(T in A)if(!g.has(T))try{D[T]=A[T]}catch{}return D}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=k,this.hook("reading",k),s},Ye.prototype.defineClass=function(){return this.mapToClass(function(s){d(this,s)})},Ye.prototype.add=function(s,u){var c=this,f=this.schema.primKey,p=f.auto,g=f.keyPath,b=s;return g&&p&&(b=Cr(g)(s)),this._trans("readwrite",function(k){return c.core.mutate({trans:k,type:"add",keys:u!=null?[u]:null,values:[b]})}).then(function(k){return k.numFailures?ce.reject(k.failures[0]):k.lastResult}).then(function(k){if(g)try{ne(s,g,k)}catch{}return k})},Ye.prototype.update=function(s,u){return typeof s!="object"||l(s)?this.where(":id").equals(s).modify(u):(s=X(s,this.schema.primKey.keyPath),s===void 0?rt(new he.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(s).modify(u))},Ye.prototype.put=function(s,u){var c=this,f=this.schema.primKey,p=f.auto,g=f.keyPath,b=s;return g&&p&&(b=Cr(g)(s)),this._trans("readwrite",function(k){return c.core.mutate({trans:k,type:"put",values:[b],keys:u!=null?[u]:null})}).then(function(k){return k.numFailures?ce.reject(k.failures[0]):k.lastResult}).then(function(k){if(g)try{ne(s,g,k)}catch{}return k})},Ye.prototype.delete=function(s){var u=this;return this._trans("readwrite",function(c){return u.core.mutate({trans:c,type:"delete",keys:[s]})}).then(function(c){return c.numFailures?ce.reject(c.failures[0]):void 0})},Ye.prototype.clear=function(){var s=this;return this._trans("readwrite",function(u){return s.core.mutate({trans:u,type:"deleteRange",range:$u})}).then(function(u){return u.numFailures?ce.reject(u.failures[0]):void 0})},Ye.prototype.bulkGet=function(s){var u=this;return this._trans("readonly",function(c){return u.core.getMany({keys:s,trans:c}).then(function(f){return f.map(function(p){return u.hook.reading.fire(p)})})})},Ye.prototype.bulkAdd=function(s,u,c){var f=this,p=Array.isArray(u)?u:void 0,g=(c=c||(p?void 0:u))?c.allKeys:void 0;return this._trans("readwrite",function(b){var T=f.schema.primKey,k=T.auto,T=T.keyPath;if(T&&p)throw new he.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new he.InvalidArgument("Arguments objects and keys must have the same length");var A=s.length,T=T&&k?s.map(Cr(T)):s;return f.core.mutate({trans:b,type:"add",keys:p,values:T,wantResults:g}).then(function(R){var S=R.numFailures,L=R.results,O=R.lastResult,R=R.failures;if(S===0)return g?L:O;throw new ot("".concat(f.name,".bulkAdd(): ").concat(S," of ").concat(A," operations failed"),R)})})},Ye.prototype.bulkPut=function(s,u,c){var f=this,p=Array.isArray(u)?u:void 0,g=(c=c||(p?void 0:u))?c.allKeys:void 0;return this._trans("readwrite",function(b){var T=f.schema.primKey,k=T.auto,T=T.keyPath;if(T&&p)throw new he.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==s.length)throw new he.InvalidArgument("Arguments objects and keys must have the same length");var A=s.length,T=T&&k?s.map(Cr(T)):s;return f.core.mutate({trans:b,type:"put",keys:p,values:T,wantResults:g}).then(function(R){var S=R.numFailures,L=R.results,O=R.lastResult,R=R.failures;if(S===0)return g?L:O;throw new ot("".concat(f.name,".bulkPut(): ").concat(S," of ").concat(A," operations failed"),R)})})},Ye.prototype.bulkUpdate=function(s){var u=this,c=this.core,f=s.map(function(b){return b.key}),p=s.map(function(b){return b.changes}),g=[];return this._trans("readwrite",function(b){return c.getMany({trans:b,keys:f,cache:"clone"}).then(function(k){var A=[],T=[];s.forEach(function(S,L){var O=S.key,R=S.changes,P=k[L];if(P){for(var C=0,$=Object.keys(R);C<$.length;C++){var B=$[C],U=R[B];if(B===u.schema.primKey.keyPath){if(Me(U,O)!==0)throw new he.Constraint("Cannot update primary key in bulkUpdate()")}else ne(P,B,U)}g.push(L),A.push(O),T.push(P)}});var D=A.length;return c.mutate({trans:b,type:"put",keys:A,values:T,updates:{keys:f,changeSpecs:p}}).then(function(S){var L=S.numFailures,O=S.failures;if(L===0)return D;for(var R=0,P=Object.keys(O);R<P.length;R++){var C,$=P[R],B=g[Number($)];B!=null&&(C=O[$],delete O[$],O[B]=C)}throw new ot("".concat(u.name,".bulkUpdate(): ").concat(L," of ").concat(D," operations failed"),O)})})})},Ye.prototype.bulkDelete=function(s){var u=this,c=s.length;return this._trans("readwrite",function(f){return u.core.mutate({trans:f,type:"delete",keys:s})}).then(function(b){var p=b.numFailures,g=b.lastResult,b=b.failures;if(p===0)return g;throw new ot("".concat(u.name,".bulkDelete(): ").concat(p," of ").concat(c," operations failed"),b)})},Ye);function Ye(){}function Fi(s){function u(b,k){if(k){for(var A=arguments.length,T=new Array(A-1);--A;)T[A-1]=arguments[A];return c[b].subscribe.apply(null,T),s}if(typeof b=="string")return c[b]}var c={};u.addEventType=g;for(var f=1,p=arguments.length;f<p;++f)g(arguments[f]);return u;function g(b,k,A){if(typeof b!="object"){var T;k=k||He;var D={subscribers:[],fire:A=A||Se,subscribe:function(S){D.subscribers.indexOf(S)===-1&&(D.subscribers.push(S),D.fire=k(D.fire,S))},unsubscribe:function(S){D.subscribers=D.subscribers.filter(function(L){return L!==S}),D.fire=D.subscribers.reduce(k,A)}};return c[b]=u[b]=D}o(T=b).forEach(function(S){var L=T[S];if(l(L))g(S,T[S][0],T[S][1]);else{if(L!=="asap")throw new he.InvalidArgument("Invalid event config");var O=g(S,pt,function(){for(var R=arguments.length,P=new Array(R);R--;)P[R]=arguments[R];O.subscribers.forEach(function(C){Y(function(){C.apply(null,P)})})})}})}}function Di(s,u){return N(u).from({prototype:s}),u}function ri(s,u){return!(s.filter||s.algorithm||s.or)&&(u?s.justLimit:!s.replayFilter)}function _s(s,u){s.filter=Dn(s.filter,u)}function Ss(s,u,c){var f=s.replayFilter;s.replayFilter=f?function(){return Dn(f(),u())}:u,s.justLimit=c&&!f}function Rr(s,u){if(s.isPrimKey)return u.primaryKey;var c=u.getIndexByKeyPath(s.index);if(!c)throw new he.Schema("KeyPath "+s.index+" on object store "+u.name+" is not indexed");return c}function Vu(s,u,c){var f=Rr(s,u.schema);return u.openCursor({trans:c,values:!s.keysOnly,reverse:s.dir==="prev",unique:!!s.unique,query:{index:f,range:s.range}})}function Fr(s,u,c,f){var p=s.replayFilter?Dn(s.filter,s.replayFilter()):s.filter;if(s.or){var g={},b=function(k,A,T){var D,S;p&&!p(A,T,function(L){return A.stop(L)},function(L){return A.fail(L)})||((S=""+(D=A.primaryKey))=="[object ArrayBuffer]"&&(S=""+new Uint8Array(D)),y(g,S)||(g[S]=!0,u(k,A,T)))};return Promise.all([s.or._iterate(b,c),qu(Vu(s,f,c),s.algorithm,b,!s.keysOnly&&s.valueMapper)])}return qu(Vu(s,f,c),Dn(s.algorithm,p),u,!s.keysOnly&&s.valueMapper)}function qu(s,u,c,f){var p=Qe(f?function(g,b,k){return c(f(g),b,k)}:c);return s.then(function(g){if(g)return g.start(function(){var b=function(){return g.continue()};u&&!u(g,function(k){return b=k},function(k){g.stop(k),b=Se},function(k){g.fail(k),b=Se})||p(g.value,g,function(k){return b=k}),b()})})}var Ii=(Hu.prototype.execute=function(s){var u=this["@@propmod"];if(u.add!==void 0){var c=u.add;if(l(c))return r(r([],l(s)?s:[],!0),c).sort();if(typeof c=="number")return(Number(s)||0)+c;if(typeof c=="bigint")try{return BigInt(s)+c}catch{return BigInt(0)+c}throw new TypeError("Invalid term ".concat(c))}if(u.remove!==void 0){var f=u.remove;if(l(f))return l(s)?s.filter(function(p){return!f.includes(p)}).sort():[];if(typeof f=="number")return Number(s)-f;if(typeof f=="bigint")try{return BigInt(s)-f}catch{return BigInt(0)-f}throw new TypeError("Invalid subtrahend ".concat(f))}return c=(c=u.replacePrefix)===null||c===void 0?void 0:c[0],c&&typeof s=="string"&&s.startsWith(c)?u.replacePrefix[1]+s.substring(c.length):s},Hu);function Hu(s){this["@@propmod"]=s}var qh=(Be.prototype._read=function(s,u){var c=this._ctx;return c.error?c.table._trans(null,rt.bind(null,c.error)):c.table._trans("readonly",s).then(u)},Be.prototype._write=function(s){var u=this._ctx;return u.error?u.table._trans(null,rt.bind(null,u.error)):u.table._trans("readwrite",s,"locked")},Be.prototype._addAlgorithm=function(s){var u=this._ctx;u.algorithm=Dn(u.algorithm,s)},Be.prototype._iterate=function(s,u){return Fr(this._ctx,s,u,this._ctx.table.core)},Be.prototype.clone=function(s){var u=Object.create(this.constructor.prototype),c=Object.create(this._ctx);return s&&d(c,s),u._ctx=c,u},Be.prototype.raw=function(){return this._ctx.valueMapper=null,this},Be.prototype.each=function(s){var u=this._ctx;return this._read(function(c){return Fr(u,s,c,u.table.core)})},Be.prototype.count=function(s){var u=this;return this._read(function(c){var f=u._ctx,p=f.table.core;if(ri(f,!0))return p.count({trans:c,query:{index:Rr(f,p.schema),range:f.range}}).then(function(b){return Math.min(b,f.limit)});var g=0;return Fr(f,function(){return++g,!1},c,p).then(function(){return g})}).then(s)},Be.prototype.sortBy=function(s,u){var c=s.split(".").reverse(),f=c[0],p=c.length-1;function g(A,T){return T?g(A[c[T]],T-1):A[f]}var b=this._ctx.dir==="next"?1:-1;function k(A,T){return Me(g(A,p),g(T,p))*b}return this.toArray(function(A){return A.sort(k)}).then(u)},Be.prototype.toArray=function(s){var u=this;return this._read(function(c){var f=u._ctx;if(f.dir==="next"&&ri(f,!0)&&0<f.limit){var p=f.valueMapper,g=Rr(f,f.table.core.schema);return f.table.core.query({trans:c,limit:f.limit,values:!0,query:{index:g,range:f.range}}).then(function(k){return k=k.result,p?k.map(p):k})}var b=[];return Fr(f,function(k){return b.push(k)},c,f.table.core).then(function(){return b})},s)},Be.prototype.offset=function(s){var u=this._ctx;return s<=0||(u.offset+=s,ri(u)?Ss(u,function(){var c=s;return function(f,p){return c===0||(c===1?--c:p(function(){f.advance(c),c=0}),!1)}}):Ss(u,function(){var c=s;return function(){return--c<0}})),this},Be.prototype.limit=function(s){return this._ctx.limit=Math.min(this._ctx.limit,s),Ss(this._ctx,function(){var u=s;return function(c,f,p){return--u<=0&&f(p),0<=u}},!0),this},Be.prototype.until=function(s,u){return _s(this._ctx,function(c,f,p){return!s(c.value)||(f(p),u)}),this},Be.prototype.first=function(s){return this.limit(1).toArray(function(u){return u[0]}).then(s)},Be.prototype.last=function(s){return this.reverse().first(s)},Be.prototype.filter=function(s){var u;return _s(this._ctx,function(c){return s(c.value)}),(u=this._ctx).isMatch=Dn(u.isMatch,s),this},Be.prototype.and=function(s){return this.filter(s)},Be.prototype.or=function(s){return new this.db.WhereClause(this._ctx.table,s,this)},Be.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Be.prototype.desc=function(){return this.reverse()},Be.prototype.eachKey=function(s){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(c,f){s(f.key,f)})},Be.prototype.eachUniqueKey=function(s){return this._ctx.unique="unique",this.eachKey(s)},Be.prototype.eachPrimaryKey=function(s){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(c,f){s(f.primaryKey,f)})},Be.prototype.keys=function(s){var u=this._ctx;u.keysOnly=!u.isMatch;var c=[];return this.each(function(f,p){c.push(p.key)}).then(function(){return c}).then(s)},Be.prototype.primaryKeys=function(s){var u=this._ctx;if(u.dir==="next"&&ri(u,!0)&&0<u.limit)return this._read(function(f){var p=Rr(u,u.table.core.schema);return u.table.core.query({trans:f,values:!1,limit:u.limit,query:{index:p,range:u.range}})}).then(function(f){return f.result}).then(s);u.keysOnly=!u.isMatch;var c=[];return this.each(function(f,p){c.push(p.primaryKey)}).then(function(){return c}).then(s)},Be.prototype.uniqueKeys=function(s){return this._ctx.unique="unique",this.keys(s)},Be.prototype.firstKey=function(s){return this.limit(1).keys(function(u){return u[0]}).then(s)},Be.prototype.lastKey=function(s){return this.reverse().firstKey(s)},Be.prototype.distinct=function(){var s=this._ctx,s=s.index&&s.table.schema.idxByName[s.index];if(!s||!s.multi)return this;var u={};return _s(this._ctx,function(p){var f=p.primaryKey.toString(),p=y(u,f);return u[f]=!0,!p}),this},Be.prototype.modify=function(s){var u=this,c=this._ctx;return this._write(function(f){var p,g,b;b=typeof s=="function"?s:(p=o(s),g=p.length,function(C){for(var $=!1,B=0;B<g;++B){var U=p[B],G=s[U],Z=X(C,U);G instanceof Ii?(ne(C,U,G.execute(Z)),$=!0):Z!==G&&(ne(C,U,G),$=!0)}return $});var k=c.table.core,S=k.schema.primaryKey,A=S.outbound,T=S.extractKey,D=200,S=u.db._options.modifyChunkSize;S&&(D=typeof S=="object"?S[k.name]||S["*"]||200:S);function L(C,U){var B=U.failures,U=U.numFailures;R+=C-U;for(var G=0,Z=o(B);G<Z.length;G++){var oe=Z[G];O.push(B[oe])}}var O=[],R=0,P=[];return u.clone().primaryKeys().then(function(C){function $(U){var G=Math.min(D,C.length-U);return k.getMany({trans:f,keys:C.slice(U,U+G),cache:"immutable"}).then(function(Z){for(var oe=[],ee=[],re=A?[]:null,le=[],se=0;se<G;++se){var pe=Z[se],Te={value:Le(pe),primKey:C[U+se]};b.call(Te,Te.value,Te)!==!1&&(Te.value==null?le.push(C[U+se]):A||Me(T(pe),T(Te.value))===0?(ee.push(Te.value),A&&re.push(C[U+se])):(le.push(C[U+se]),oe.push(Te.value)))}return Promise.resolve(0<oe.length&&k.mutate({trans:f,type:"add",values:oe}).then(function(De){for(var Ie in De.failures)le.splice(parseInt(Ie),1);L(oe.length,De)})).then(function(){return(0<ee.length||B&&typeof s=="object")&&k.mutate({trans:f,type:"put",keys:re,values:ee,criteria:B,changeSpec:typeof s!="function"&&s,isAdditionalChunk:0<U}).then(function(De){return L(ee.length,De)})}).then(function(){return(0<le.length||B&&s===Ns)&&k.mutate({trans:f,type:"delete",keys:le,criteria:B,isAdditionalChunk:0<U}).then(function(De){return L(le.length,De)})}).then(function(){return C.length>U+G&&$(U+D)})})}var B=ri(c)&&c.limit===1/0&&(typeof s!="function"||s===Ns)&&{index:c.index,range:c.range};return $(0).then(function(){if(0<O.length)throw new q("Error modifying one or more objects",O,R,P);return C.length})})})},Be.prototype.delete=function(){var s=this._ctx,u=s.range;return ri(s)&&(s.isPrimKey||u.type===3)?this._write(function(c){var f=s.table.core.schema.primaryKey,p=u;return s.table.core.count({trans:c,query:{index:f,range:p}}).then(function(g){return s.table.core.mutate({trans:c,type:"deleteRange",range:p}).then(function(b){var k=b.failures;if(b.lastResult,b.results,b=b.numFailures,b)throw new q("Could not delete some values",Object.keys(k).map(function(A){return k[A]}),g-b);return g-b})})}):this.modify(Ns)},Be);function Be(){}var Ns=function(s,u){return u.value=null};function Hh(s,u){return s<u?-1:s===u?0:1}function Kh(s,u){return u<s?-1:s===u?0:1}function At(s,u,c){return s=s instanceof zu?new s.Collection(s):s,s._ctx.error=new(c||TypeError)(u),s}function ai(s){return new s.Collection(s,function(){return Ku("")}).limit(0)}function Dr(s,u,c,f){var p,g,b,k,A,T,D,S=c.length;if(!c.every(function(R){return typeof R=="string"}))return At(s,Lu);function L(R){p=R==="next"?function(C){return C.toUpperCase()}:function(C){return C.toLowerCase()},g=R==="next"?function(C){return C.toLowerCase()}:function(C){return C.toUpperCase()},b=R==="next"?Hh:Kh;var P=c.map(function(C){return{lower:g(C),upper:p(C)}}).sort(function(C,$){return b(C.lower,$.lower)});k=P.map(function(C){return C.upper}),A=P.map(function(C){return C.lower}),D=(T=R)==="next"?"":f}L("next"),s=new s.Collection(s,function(){return gn(k[0],A[S-1]+f)}),s._ondirectionchange=function(R){L(R)};var O=0;return s._addAlgorithm(function(R,P,C){var $=R.key;if(typeof $!="string")return!1;var B=g($);if(u(B,A,O))return!0;for(var U=null,G=O;G<S;++G){var Z=function(oe,ee,re,le,se,pe){for(var Te=Math.min(oe.length,le.length),De=-1,Ie=0;Ie<Te;++Ie){var Ot=ee[Ie];if(Ot!==le[Ie])return se(oe[Ie],re[Ie])<0?oe.substr(0,Ie)+re[Ie]+re.substr(Ie+1):se(oe[Ie],le[Ie])<0?oe.substr(0,Ie)+le[Ie]+re.substr(Ie+1):0<=De?oe.substr(0,De)+ee[De]+re.substr(De+1):null;se(oe[Ie],Ot)<0&&(De=Ie)}return Te<le.length&&pe==="next"?oe+re.substr(oe.length):Te<oe.length&&pe==="prev"?oe.substr(0,re.length):De<0?null:oe.substr(0,De)+le[De]+re.substr(De+1)}($,B,k[G],A[G],b,T);Z===null&&U===null?O=G+1:(U===null||0<b(U,Z))&&(U=Z)}return P(U!==null?function(){R.continue(U+D)}:C),!1}),s}function gn(s,u,c,f){return{type:2,lower:s,upper:u,lowerOpen:c,upperOpen:f}}function Ku(s){return{type:1,lower:s,upper:s}}var zu=(Object.defineProperty(ft.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),ft.prototype.between=function(s,u,c,f){c=c!==!1,f=f===!0;try{return 0<this._cmp(s,u)||this._cmp(s,u)===0&&(c||f)&&(!c||!f)?ai(this):new this.Collection(this,function(){return gn(s,u,!c,!f)})}catch{return At(this,nn)}},ft.prototype.equals=function(s){return s==null?At(this,nn):new this.Collection(this,function(){return Ku(s)})},ft.prototype.above=function(s){return s==null?At(this,nn):new this.Collection(this,function(){return gn(s,void 0,!0)})},ft.prototype.aboveOrEqual=function(s){return s==null?At(this,nn):new this.Collection(this,function(){return gn(s,void 0,!1)})},ft.prototype.below=function(s){return s==null?At(this,nn):new this.Collection(this,function(){return gn(void 0,s,!1,!0)})},ft.prototype.belowOrEqual=function(s){return s==null?At(this,nn):new this.Collection(this,function(){return gn(void 0,s)})},ft.prototype.startsWith=function(s){return typeof s!="string"?At(this,Lu):this.between(s,s+Fn,!0,!0)},ft.prototype.startsWithIgnoreCase=function(s){return s===""?this.startsWith(s):Dr(this,function(u,c){return u.indexOf(c[0])===0},[s],Fn)},ft.prototype.equalsIgnoreCase=function(s){return Dr(this,function(u,c){return u===c[0]},[s],"")},ft.prototype.anyOfIgnoreCase=function(){var s=j.apply(te,arguments);return s.length===0?ai(this):Dr(this,function(u,c){return c.indexOf(u)!==-1},s,"")},ft.prototype.startsWithAnyOfIgnoreCase=function(){var s=j.apply(te,arguments);return s.length===0?ai(this):Dr(this,function(u,c){return c.some(function(f){return u.indexOf(f)===0})},s,Fn)},ft.prototype.anyOf=function(){var s=this,u=j.apply(te,arguments),c=this._cmp;try{u.sort(c)}catch{return At(this,nn)}if(u.length===0)return ai(this);var f=new this.Collection(this,function(){return gn(u[0],u[u.length-1])});f._ondirectionchange=function(g){c=g==="next"?s._ascending:s._descending,u.sort(c)};var p=0;return f._addAlgorithm(function(g,b,k){for(var A=g.key;0<c(A,u[p]);)if(++p===u.length)return b(k),!1;return c(A,u[p])===0||(b(function(){g.continue(u[p])}),!1)}),f},ft.prototype.notEqual=function(s){return this.inAnyRange([[-1/0,s],[s,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},ft.prototype.noneOf=function(){var s=j.apply(te,arguments);if(s.length===0)return new this.Collection(this);try{s.sort(this._ascending)}catch{return At(this,nn)}var u=s.reduce(function(c,f){return c?c.concat([[c[c.length-1][1],f]]):[[-1/0,f]]},null);return u.push([s[s.length-1],this.db._maxKey]),this.inAnyRange(u,{includeLowers:!1,includeUppers:!1})},ft.prototype.inAnyRange=function($,u){var c=this,f=this._cmp,p=this._ascending,g=this._descending,b=this._min,k=this._max;if($.length===0)return ai(this);if(!$.every(function(B){return B[0]!==void 0&&B[1]!==void 0&&p(B[0],B[1])<=0}))return At(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",he.InvalidArgument);var A=!u||u.includeLowers!==!1,T=u&&u.includeUppers===!0,D,S=p;function L(B,U){return S(B[0],U[0])}try{(D=$.reduce(function(B,U){for(var G=0,Z=B.length;G<Z;++G){var oe=B[G];if(f(U[0],oe[1])<0&&0<f(U[1],oe[0])){oe[0]=b(oe[0],U[0]),oe[1]=k(oe[1],U[1]);break}}return G===Z&&B.push(U),B},[])).sort(L)}catch{return At(this,nn)}var O=0,R=T?function(B){return 0<p(B,D[O][1])}:function(B){return 0<=p(B,D[O][1])},P=A?function(B){return 0<g(B,D[O][0])}:function(B){return 0<=g(B,D[O][0])},C=R,$=new this.Collection(this,function(){return gn(D[0][0],D[D.length-1][1],!A,!T)});return $._ondirectionchange=function(B){S=B==="next"?(C=R,p):(C=P,g),D.sort(L)},$._addAlgorithm(function(B,U,G){for(var Z,oe=B.key;C(oe);)if(++O===D.length)return U(G),!1;return!R(Z=oe)&&!P(Z)||(c._cmp(oe,D[O][1])===0||c._cmp(oe,D[O][0])===0||U(function(){S===p?B.continue(D[O][0]):B.continue(D[O][1])}),!1)}),$},ft.prototype.startsWithAnyOf=function(){var s=j.apply(te,arguments);return s.every(function(u){return typeof u=="string"})?s.length===0?ai(this):this.inAnyRange(s.map(function(u){return[u,u+Fn]})):At(this,"startsWithAnyOf() only works with strings")},ft);function ft(){}function Wt(s){return Qe(function(u){return Pi(u),s(u.target.error),!1})}function Pi(s){s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault()}var Li="storagemutated",Es="x-storagemutated-1",vn=Fi(null,Li),zh=(Jt.prototype._lock=function(){return K(!be.global),++this._reculock,this._reculock!==1||be.global||(be.lockOwnerFor=this),this},Jt.prototype._unlock=function(){if(K(!be.global),--this._reculock==0)for(be.global||(be.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var s=this._blockedFuncs.shift();try{Rn(s[1],s[0])}catch{}}return this},Jt.prototype._locked=function(){return this._reculock&&be.lockOwnerFor!==this},Jt.prototype.create=function(s){var u=this;if(!this.mode)return this;var c=this.db.idbdb,f=this.db._state.dbOpenError;if(K(!this.idbtrans),!s&&!c)switch(f&&f.name){case"DatabaseClosedError":throw new he.DatabaseClosed(f);case"MissingAPIError":throw new he.MissingAPI(f.message,f);default:throw new he.OpenFailed(f)}if(!this.active)throw new he.TransactionInactive;return K(this._completion._state===null),(s=this.idbtrans=s||(this.db.core||c).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=Qe(function(p){Pi(p),u._reject(s.error)}),s.onabort=Qe(function(p){Pi(p),u.active&&u._reject(new he.Abort(s.error)),u.active=!1,u.on("abort").fire(p)}),s.oncomplete=Qe(function(){u.active=!1,u._resolve(),"mutatedParts"in s&&vn.storagemutated.fire(s.mutatedParts)}),this},Jt.prototype._promise=function(s,u,c){var f=this;if(s==="readwrite"&&this.mode!=="readwrite")return rt(new he.ReadOnly("Transaction is readonly"));if(!this.active)return rt(new he.TransactionInactive);if(this._locked())return new ce(function(g,b){f._blockedFuncs.push([function(){f._promise(s,u,c).then(g,b)},be])});if(c)return hn(function(){var g=new ce(function(b,k){f._lock();var A=u(b,k,f);A&&A.then&&A.then(b,k)});return g.finally(function(){return f._unlock()}),g._lib=!0,g});var p=new ce(function(g,b){var k=u(g,b,f);k&&k.then&&k.then(g,b)});return p._lib=!0,p},Jt.prototype._root=function(){return this.parent?this.parent._root():this},Jt.prototype.waitFor=function(s){var u,c=this._root(),f=ce.resolve(s);c._waitingFor?c._waitingFor=c._waitingFor.then(function(){return f}):(c._waitingFor=f,c._waitingQueue=[],u=c.idbtrans.objectStore(c.storeNames[0]),function g(){for(++c._spinCount;c._waitingQueue.length;)c._waitingQueue.shift()();c._waitingFor&&(u.get(-1/0).onsuccess=g)}());var p=c._waitingFor;return new ce(function(g,b){f.then(function(k){return c._waitingQueue.push(Qe(g.bind(null,k)))},function(k){return c._waitingQueue.push(Qe(b.bind(null,k)))}).finally(function(){c._waitingFor===p&&(c._waitingFor=null)})})},Jt.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new he.Abort))},Jt.prototype.table=function(s){var u=this._memoizedTables||(this._memoizedTables={});if(y(u,s))return u[s];var c=this.schema[s];if(!c)throw new he.NotFound("Table "+s+" not part of transaction");return c=new this.db.Table(s,c,this),c.core=this.db.core.table(s),u[s]=c},Jt);function Jt(){}function ws(s,u,c,f,p,g,b){return{name:s,keyPath:u,unique:c,multi:f,auto:p,compound:g,src:(c&&!b?"&":"")+(f?"*":"")+(p?"++":"")+Gu(u)}}function Gu(s){return typeof s=="string"?s:s?"["+[].join.call(s,"+")+"]":""}function As(s,u,c){return{name:s,primKey:u,indexes:c,mappedClass:null,idxByName:(f=function(p){return[p.name,p]},c.reduce(function(p,g,b){return b=f(g,b),b&&(p[b[0]]=b[1]),p},{}))};var f}var $i=function(s){try{return s.only([[]]),$i=function(){return[[]]},[[]]}catch{return $i=function(){return Fn},Fn}};function Os(s){return s==null?function(){}:typeof s=="string"?(u=s).split(".").length===1?function(c){return c[u]}:function(c){return X(c,u)}:function(c){return X(c,s)};var u}function Wu(s){return[].slice.call(s)}var Gh=0;function Mi(s){return s==null?":id":typeof s=="string"?s:"[".concat(s.join("+"),"]")}function Wh(s,u,A){function f(C){if(C.type===3)return null;if(C.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var O=C.lower,R=C.upper,P=C.lowerOpen,C=C.upperOpen;return O===void 0?R===void 0?null:u.upperBound(R,!!C):R===void 0?u.lowerBound(O,!!P):u.bound(O,R,!!P,!!C)}function p(L){var O,R=L.name;return{name:R,schema:L,mutate:function(P){var C=P.trans,$=P.type,B=P.keys,U=P.values,G=P.range;return new Promise(function(Z,oe){Z=Qe(Z);var ee=C.objectStore(R),re=ee.keyPath==null,le=$==="put"||$==="add";if(!le&&$!=="delete"&&$!=="deleteRange")throw new Error("Invalid operation type: "+$);var se,pe=(B||U||{length:1}).length;if(B&&U&&B.length!==U.length)throw new Error("Given keys array must have same length as given values array.");if(pe===0)return Z({numFailures:0,failures:{},results:[],lastResult:void 0});function Te(St){++Ot,Pi(St)}var De=[],Ie=[],Ot=0;if($==="deleteRange"){if(G.type===4)return Z({numFailures:Ot,failures:Ie,results:[],lastResult:void 0});G.type===3?De.push(se=ee.clear()):De.push(se=ee.delete(f(G)))}else{var re=le?re?[U,B]:[U,null]:[B,null],xe=re[0],yt=re[1];if(le)for(var bt=0;bt<pe;++bt)De.push(se=yt&&yt[bt]!==void 0?ee[$](xe[bt],yt[bt]):ee[$](xe[bt])),se.onerror=Te;else for(bt=0;bt<pe;++bt)De.push(se=ee[$](xe[bt])),se.onerror=Te}function zr(St){St=St.target.result,De.forEach(function(Ln,Ks){return Ln.error!=null&&(Ie[Ks]=Ln.error)}),Z({numFailures:Ot,failures:Ie,results:$==="delete"?B:De.map(function(Ln){return Ln.result}),lastResult:St})}se.onerror=function(St){Te(St),zr(St)},se.onsuccess=zr})},getMany:function(P){var C=P.trans,$=P.keys;return new Promise(function(B,U){B=Qe(B);for(var G,Z=C.objectStore(R),oe=$.length,ee=new Array(oe),re=0,le=0,se=function(De){De=De.target,ee[De._pos]=De.result,++le===re&&B(ee)},pe=Wt(U),Te=0;Te<oe;++Te)$[Te]!=null&&((G=Z.get($[Te]))._pos=Te,G.onsuccess=se,G.onerror=pe,++re);re===0&&B(ee)})},get:function(P){var C=P.trans,$=P.key;return new Promise(function(B,U){B=Qe(B);var G=C.objectStore(R).get($);G.onsuccess=function(Z){return B(Z.target.result)},G.onerror=Wt(U)})},query:(O=T,function(P){return new Promise(function(C,$){C=Qe(C);var B,U,G,re=P.trans,Z=P.values,oe=P.limit,se=P.query,ee=oe===1/0?void 0:oe,le=se.index,se=se.range,re=re.objectStore(R),le=le.isPrimaryKey?re:re.index(le.name),se=f(se);if(oe===0)return C({result:[]});O?((ee=Z?le.getAll(se,ee):le.getAllKeys(se,ee)).onsuccess=function(pe){return C({result:pe.target.result})},ee.onerror=Wt($)):(B=0,U=!Z&&"openKeyCursor"in le?le.openKeyCursor(se):le.openCursor(se),G=[],U.onsuccess=function(pe){var Te=U.result;return Te?(G.push(Z?Te.value:Te.primaryKey),++B===oe?C({result:G}):void Te.continue()):C({result:G})},U.onerror=Wt($))})}),openCursor:function(P){var C=P.trans,$=P.values,B=P.query,U=P.reverse,G=P.unique;return new Promise(function(Z,oe){Z=Qe(Z);var le=B.index,ee=B.range,re=C.objectStore(R),re=le.isPrimaryKey?re:re.index(le.name),le=U?G?"prevunique":"prev":G?"nextunique":"next",se=!$&&"openKeyCursor"in re?re.openKeyCursor(f(ee),le):re.openCursor(f(ee),le);se.onerror=Wt(oe),se.onsuccess=Qe(function(pe){var Te,De,Ie,Ot,xe=se.result;xe?(xe.___id=++Gh,xe.done=!1,Te=xe.continue.bind(xe),De=(De=xe.continuePrimaryKey)&&De.bind(xe),Ie=xe.advance.bind(xe),Ot=function(){throw new Error("Cursor not stopped")},xe.trans=C,xe.stop=xe.continue=xe.continuePrimaryKey=xe.advance=function(){throw new Error("Cursor not started")},xe.fail=Qe(oe),xe.next=function(){var yt=this,bt=1;return this.start(function(){return bt--?yt.continue():yt.stop()}).then(function(){return yt})},xe.start=function(yt){function bt(){if(se.result)try{yt()}catch(St){xe.fail(St)}else xe.done=!0,xe.start=function(){throw new Error("Cursor behind last entry")},xe.stop()}var zr=new Promise(function(St,Ln){St=Qe(St),se.onerror=Wt(Ln),xe.fail=Ln,xe.stop=function(Ks){xe.stop=xe.continue=xe.continuePrimaryKey=xe.advance=Ot,St(Ks)}});return se.onsuccess=Qe(function(St){se.onsuccess=bt,bt()}),xe.continue=Te,xe.continuePrimaryKey=De,xe.advance=Ie,bt(),zr},Z(xe)):Z(null)},oe)})},count:function(P){var C=P.query,$=P.trans,B=C.index,U=C.range;return new Promise(function(G,Z){var oe=$.objectStore(R),ee=B.isPrimaryKey?oe:oe.index(B.name),oe=f(U),ee=oe?ee.count(oe):ee.count();ee.onsuccess=Qe(function(re){return G(re.target.result)}),ee.onerror=Wt(Z)})}}}var g,b,k,D=(b=A,k=Wu((g=s).objectStoreNames),{schema:{name:g.name,tables:k.map(function(L){return b.objectStore(L)}).map(function(L){var O=L.keyPath,C=L.autoIncrement,R=l(O),P={},C={name:L.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:O==null,compound:R,keyPath:O,autoIncrement:C,unique:!0,extractKey:Os(O)},indexes:Wu(L.indexNames).map(function($){return L.index($)}).map(function(G){var B=G.name,U=G.unique,Z=G.multiEntry,G=G.keyPath,Z={name:B,compound:l(G),keyPath:G,unique:U,multiEntry:Z,extractKey:Os(G)};return P[Mi(G)]=Z}),getIndexByKeyPath:function($){return P[Mi($)]}};return P[":id"]=C.primaryKey,O!=null&&(P[Mi(O)]=C.primaryKey),C})},hasGetAll:0<k.length&&"getAll"in b.objectStore(k[0])&&!(typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),A=D.schema,T=D.hasGetAll,D=A.tables.map(p),S={};return D.forEach(function(L){return S[L.name]=L}),{stack:"dbcore",transaction:s.transaction.bind(s),table:function(L){if(!S[L])throw new Error("Table '".concat(L,"' not found"));return S[L]},MIN_KEY:-1/0,MAX_KEY:$i(u),schema:A}}function Jh(s,u,c,f){var p=c.IDBKeyRange;return c.indexedDB,{dbcore:(f=Wh(u,p,f),s.dbcore.reduce(function(g,b){return b=b.create,i(i({},g),b(g))},f))}}function Ir(s,f){var c=f.db,f=Jh(s._middlewares,c,s._deps,f);s.core=f.dbcore,s.tables.forEach(function(p){var g=p.name;s.core.schema.tables.some(function(b){return b.name===g})&&(p.core=s.core.table(g),s[g]instanceof s.Table&&(s[g].core=p.core))})}function Pr(s,u,c,f){c.forEach(function(p){var g=f[p];u.forEach(function(b){var k=function A(T,D){return E(T,D)||(T=h(T))&&A(T,D)}(b,p);(!k||"value"in k&&k.value===void 0)&&(b===s.Transaction.prototype||b instanceof s.Transaction?_(b,p,{get:function(){return this.table(p)},set:function(A){x(this,p,{value:A,writable:!0,configurable:!0,enumerable:!0})}}):b[p]=new s.Table(p,g))})})}function xs(s,u){u.forEach(function(c){for(var f in c)c[f]instanceof s.Table&&delete c[f]})}function Yh(s,u){return s._cfg.version-u._cfg.version}function Xh(s,u,c,f){var p=s._dbSchema;c.objectStoreNames.contains("$meta")&&!p.$meta&&(p.$meta=As("$meta",Yu("")[0],[]),s._storeNames.push("$meta"));var g=s._createTransaction("readwrite",s._storeNames,p);g.create(c),g._completion.catch(f);var b=g._reject.bind(g),k=be.transless||be;hn(function(){return be.trans=g,be.transless=k,u!==0?(Ir(s,c),T=u,((A=g).storeNames.includes("$meta")?A.table("$meta").get("version").then(function(D){return D!=null?D:T}):ce.resolve(T)).then(function(D){return L=D,O=g,R=c,P=[],D=(S=s)._versions,C=S._dbSchema=$r(0,S.idbdb,R),(D=D.filter(function($){return $._cfg.version>=L})).length!==0?(D.forEach(function($){P.push(function(){var B=C,U=$._cfg.dbschema;Mr(S,B,R),Mr(S,U,R),C=S._dbSchema=U;var G=Ts(B,U);G.add.forEach(function(le){Cs(R,le[0],le[1].primKey,le[1].indexes)}),G.change.forEach(function(le){if(le.recreate)throw new he.Upgrade("Not yet support for changing primary key");var se=R.objectStore(le.name);le.add.forEach(function(pe){return Lr(se,pe)}),le.change.forEach(function(pe){se.deleteIndex(pe.name),Lr(se,pe)}),le.del.forEach(function(pe){return se.deleteIndex(pe)})});var Z=$._cfg.contentUpgrade;if(Z&&$._cfg.version>L){Ir(S,R),O._memoizedTables={};var oe=ye(U);G.del.forEach(function(le){oe[le]=B[le]}),xs(S,[S.Transaction.prototype]),Pr(S,[S.Transaction.prototype],o(oe),oe),O.schema=oe;var ee,re=Oe(Z);return re&&ni(),G=ce.follow(function(){var le;(ee=Z(O))&&re&&(le=pn.bind(null,null),ee.then(le,le))}),ee&&typeof ee.then=="function"?ce.resolve(ee):G.then(function(){return ee})}}),P.push(function(B){var U,G,Z=$._cfg.dbschema;U=Z,G=B,[].slice.call(G.db.objectStoreNames).forEach(function(oe){return U[oe]==null&&G.db.deleteObjectStore(oe)}),xs(S,[S.Transaction.prototype]),Pr(S,[S.Transaction.prototype],S._storeNames,S._dbSchema),O.schema=S._dbSchema}),P.push(function(B){S.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(S.idbdb.version/10)===$._cfg.version?(S.idbdb.deleteObjectStore("$meta"),delete S._dbSchema.$meta,S._storeNames=S._storeNames.filter(function(U){return U!=="$meta"})):B.objectStore("$meta").put($._cfg.version,"version"))})}),function $(){return P.length?ce.resolve(P.shift()(O.idbtrans)).then($):ce.resolve()}().then(function(){Ju(C,R)})):ce.resolve();var S,L,O,R,P,C}).catch(b)):(o(p).forEach(function(D){Cs(c,D,p[D].primKey,p[D].indexes)}),Ir(s,c),void ce.follow(function(){return s.on.populate.fire(g)}).catch(b));var A,T})}function Qh(s,u){Ju(s._dbSchema,u),u.db.version%10!=0||u.objectStoreNames.contains("$meta")||u.db.createObjectStore("$meta").add(Math.ceil(u.db.version/10-1),"version");var c=$r(0,s.idbdb,u);Mr(s,s._dbSchema,u);for(var f=0,p=Ts(c,s._dbSchema).change;f<p.length;f++){var g=function(b){if(b.change.length||b.recreate)return console.warn("Unable to patch indexes of table ".concat(b.name," because it has changes on the type of index or primary key.")),{value:void 0};var k=u.objectStore(b.name);b.add.forEach(function(A){Ee&&console.debug("Dexie upgrade patch: Creating missing index ".concat(b.name,".").concat(A.src)),Lr(k,A)})}(p[f]);if(typeof g=="object")return g.value}}function Ts(s,u){var c,f={del:[],add:[],change:[]};for(c in s)u[c]||f.del.push(c);for(c in u){var p=s[c],g=u[c];if(p){var b={name:c,def:g,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(g.primKey.keyPath||"")||p.primKey.auto!==g.primKey.auto)b.recreate=!0,f.change.push(b);else{var k=p.idxByName,A=g.idxByName,T=void 0;for(T in k)A[T]||b.del.push(T);for(T in A){var D=k[T],S=A[T];D?D.src!==S.src&&b.change.push(S):b.add.push(S)}(0<b.del.length||0<b.add.length||0<b.change.length)&&f.change.push(b)}}else f.add.push([c,g])}return f}function Cs(s,u,c,f){var p=s.db.createObjectStore(u,c.keyPath?{keyPath:c.keyPath,autoIncrement:c.auto}:{autoIncrement:c.auto});return f.forEach(function(g){return Lr(p,g)}),p}function Ju(s,u){o(s).forEach(function(c){u.db.objectStoreNames.contains(c)||(Ee&&console.debug("Dexie: Creating missing table",c),Cs(u,c,s[c].primKey,s[c].indexes))})}function Lr(s,u){s.createIndex(u.name,u.keyPath,{unique:u.unique,multiEntry:u.multi})}function $r(s,u,c){var f={};return V(u.objectStoreNames,0).forEach(function(p){for(var g=c.objectStore(p),b=ws(Gu(T=g.keyPath),T||"",!0,!1,!!g.autoIncrement,T&&typeof T!="string",!0),k=[],A=0;A<g.indexNames.length;++A){var D=g.index(g.indexNames[A]),T=D.keyPath,D=ws(D.name,T,!!D.unique,!!D.multiEntry,!1,T&&typeof T!="string",!1);k.push(D)}f[p]=As(p,b,k)}),f}function Mr(s,u,c){for(var f=c.db.objectStoreNames,p=0;p<f.length;++p){var g=f[p],b=c.objectStore(g);s._hasGetAll="getAll"in b;for(var k=0;k<b.indexNames.length;++k){var A=b.indexNames[k],T=b.index(A).keyPath,D=typeof T=="string"?T:"["+V(T).join("+")+"]";!u[g]||(T=u[g].idxByName[D])&&(T.name=A,delete u[g].idxByName[D],u[g].idxByName[A]=T)}}typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&a.WorkerGlobalScope&&a instanceof a.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(s._hasGetAll=!1)}function Yu(s){return s.split(",").map(function(u,c){var f=(u=u.trim()).replace(/([&*]|\+\+)/g,""),p=/^\[/.test(f)?f.match(/^\[(.*)\]$/)[1].split("+"):f;return ws(f,p||null,/\&/.test(u),/\*/.test(u),/\+\+/.test(u),l(p),c===0)})}var Zh=(jr.prototype._parseStoresSpec=function(s,u){o(s).forEach(function(c){if(s[c]!==null){var f=Yu(s[c]),p=f.shift();if(p.unique=!0,p.multi)throw new he.Schema("Primary key cannot be multi-valued");f.forEach(function(g){if(g.auto)throw new he.Schema("Only primary key can be marked as autoIncrement (++)");if(!g.keyPath)throw new he.Schema("Index must have a name and cannot be an empty string")}),u[c]=As(c,p,f)}})},jr.prototype.stores=function(c){var u=this.db;this._cfg.storesSource=this._cfg.storesSource?d(this._cfg.storesSource,c):c;var c=u._versions,f={},p={};return c.forEach(function(g){d(f,g._cfg.storesSource),p=g._cfg.dbschema={},g._parseStoresSpec(f,p)}),u._dbSchema=p,xs(u,[u._allTables,u,u.Transaction.prototype]),Pr(u,[u._allTables,u,u.Transaction.prototype,this._cfg.tables],o(p),p),u._storeNames=o(p),this},jr.prototype.upgrade=function(s){return this._cfg.contentUpgrade=ie(this._cfg.contentUpgrade||Se,s),this},jr);function jr(){}function Rs(s,u){var c=s._dbNamesDB;return c||(c=s._dbNamesDB=new rn(Tr,{addons:[],indexedDB:s,IDBKeyRange:u})).version(1).stores({dbnames:"name"}),c.table("dbnames")}function Fs(s){return s&&typeof s.databases=="function"}function Ds(s){return hn(function(){return be.letThrough=!0,s()})}function Is(s){return!("from"in s)}var vt=function(s,u){if(!this){var c=new vt;return s&&"d"in s&&d(c,s),c}d(this,arguments.length?{d:1,from:s,to:1<arguments.length?u:s}:{d:0})};function ji(s,u,c){var f=Me(u,c);if(!isNaN(f)){if(0<f)throw RangeError();if(Is(s))return d(s,{from:u,to:c,d:1});var p=s.l,f=s.r;if(Me(c,s.from)<0)return p?ji(p,u,c):s.l={from:u,to:c,d:1,l:null,r:null},Qu(s);if(0<Me(u,s.to))return f?ji(f,u,c):s.r={from:u,to:c,d:1,l:null,r:null},Qu(s);Me(u,s.from)<0&&(s.from=u,s.l=null,s.d=f?f.d+1:1),0<Me(c,s.to)&&(s.to=c,s.r=null,s.d=s.l?s.l.d+1:1),c=!s.r,p&&!s.l&&Bi(s,p),f&&c&&Bi(s,f)}}function Bi(s,u){Is(u)||function c(f,A){var g=A.from,b=A.to,k=A.l,A=A.r;ji(f,g,b),k&&c(f,k),A&&c(f,A)}(s,u)}function Xu(s,u){var c=Br(u),f=c.next();if(f.done)return!1;for(var p=f.value,g=Br(s),b=g.next(p.from),k=b.value;!f.done&&!b.done;){if(Me(k.from,p.to)<=0&&0<=Me(k.to,p.from))return!0;Me(p.from,k.from)<0?p=(f=c.next(k.from)).value:k=(b=g.next(p.from)).value}return!1}function Br(s){var u=Is(s)?null:{s:0,n:s};return{next:function(c){for(var f=0<arguments.length;u;)switch(u.s){case 0:if(u.s=1,f)for(;u.n.l&&Me(c,u.n.from)<0;)u={up:u,n:u.n.l,s:1};else for(;u.n.l;)u={up:u,n:u.n.l,s:1};case 1:if(u.s=2,!f||Me(c,u.n.to)<=0)return{value:u.n,done:!1};case 2:if(u.n.r){u.s=3,u={up:u,n:u.n.r,s:0};continue}case 3:u=u.up}return{done:!0}}}}function Qu(s){var u,c,f=(((u=s.r)===null||u===void 0?void 0:u.d)||0)-(((c=s.l)===null||c===void 0?void 0:c.d)||0),p=1<f?"r":f<-1?"l":"";p&&(u=p=="r"?"l":"r",c=i({},s),f=s[p],s.from=f.from,s.to=f.to,s[p]=f[p],c[p]=f[u],(s[u]=c).d=Zu(c)),s.d=Zu(s)}function Zu(c){var u=c.r,c=c.l;return(u?c?Math.max(u.d,c.d):u.d:c?c.d:0)+1}function Ur(s,u){return o(u).forEach(function(c){s[c]?Bi(s[c],u[c]):s[c]=function f(p){var g,b,k={};for(g in p)y(p,g)&&(b=p[g],k[g]=!b||typeof b!="object"||ke.has(b.constructor)?b:f(b));return k}(u[c])}),s}function Ps(s,u){return s.all||u.all||Object.keys(s).some(function(c){return u[c]&&Xu(u[c],s[c])})}v(vt.prototype,((It={add:function(s){return Bi(this,s),this},addKey:function(s){return ji(this,s,s),this},addKeys:function(s){var u=this;return s.forEach(function(c){return ji(u,c,c)}),this},hasKey:function(s){var u=Br(this).next(s).value;return u&&Me(u.from,s)<=0&&0<=Me(u.to,s)}})[z]=function(){return Br(this)},It));var In={},Ls={},$s=!1;function Vr(s){Ur(Ls,s),$s||($s=!0,setTimeout(function(){$s=!1,Ms(Ls,!(Ls={}))},0))}function Ms(s,u){u===void 0&&(u=!1);var c=new Set;if(s.all)for(var f=0,p=Object.values(In);f<p.length;f++)el(b=p[f],s,c,u);else for(var g in s){var b,k=/^idb\:\/\/(.*)\/(.*)\//.exec(g);k&&(g=k[1],k=k[2],(b=In["idb://".concat(g,"/").concat(k)])&&el(b,s,c,u))}c.forEach(function(A){return A()})}function el(s,u,c,f){for(var p=[],g=0,b=Object.entries(s.queries.query);g<b.length;g++){for(var k=b[g],A=k[0],T=[],D=0,S=k[1];D<S.length;D++){var L=S[D];Ps(u,L.obsSet)?L.subscribers.forEach(function(C){return c.add(C)}):f&&T.push(L)}f&&p.push([A,T])}if(f)for(var O=0,R=p;O<R.length;O++){var P=R[O],A=P[0],T=P[1];s.queries.query[A]=T}}function ep(s){var u=s._state,c=s._deps.indexedDB;if(u.isBeingOpened||s.idbdb)return u.dbReadyPromise.then(function(){return u.dbOpenError?rt(u.dbOpenError):s});u.isBeingOpened=!0,u.dbOpenError=null,u.openComplete=!1;var f=u.openCanceller,p=Math.round(10*s.verno),g=!1;function b(){if(u.openCanceller!==f)throw new he.DatabaseClosed("db.open() was cancelled")}function k(){return new ce(function(L,O){if(b(),!c)throw new he.MissingAPI;var R=s.name,P=u.autoSchema||!p?c.open(R):c.open(R,p);if(!P)throw new he.MissingAPI;P.onerror=Wt(O),P.onblocked=Qe(s._fireOnBlocked),P.onupgradeneeded=Qe(function(C){var $;D=P.transaction,u.autoSchema&&!s._options.allowEmptyDB?(P.onerror=Pi,D.abort(),P.result.close(),($=c.deleteDatabase(R)).onsuccess=$.onerror=Qe(function(){O(new he.NoSuchDatabase("Database ".concat(R," doesnt exist")))})):(D.onerror=Wt(O),C=C.oldVersion>Math.pow(2,62)?0:C.oldVersion,S=C<1,s.idbdb=P.result,g&&Qh(s,D),Xh(s,C/10,D,O))},O),P.onsuccess=Qe(function(){D=null;var C,$,B,U,G,Z=s.idbdb=P.result,oe=V(Z.objectStoreNames);if(0<oe.length)try{var ee=Z.transaction((U=oe).length===1?U[0]:U,"readonly");if(u.autoSchema)$=Z,B=ee,(C=s).verno=$.version/10,B=C._dbSchema=$r(0,$,B),C._storeNames=V($.objectStoreNames,0),Pr(C,[C._allTables],o(B),B);else if(Mr(s,s._dbSchema,ee),((G=Ts($r(0,(G=s).idbdb,ee),G._dbSchema)).add.length||G.change.some(function(re){return re.add.length||re.change.length}))&&!g)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),Z.close(),p=Z.version+1,g=!0,L(k());Ir(s,ee)}catch{}ii.push(s),Z.onversionchange=Qe(function(re){u.vcFired=!0,s.on("versionchange").fire(re)}),Z.onclose=Qe(function(re){s.on("close").fire(re)}),S&&(G=s._deps,ee=R,Z=G.indexedDB,G=G.IDBKeyRange,Fs(Z)||ee===Tr||Rs(Z,G).put({name:ee}).catch(Se)),L()},O)}).catch(function(L){switch(L==null?void 0:L.name){case"UnknownError":if(0<u.PR1398_maxLoop)return u.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),k();break;case"VersionError":if(0<p)return p=0,k()}return ce.reject(L)})}var A,T=u.dbReadyResolve,D=null,S=!1;return ce.race([f,(typeof navigator=="undefined"?ce.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(L){function O(){return indexedDB.databases().finally(L)}A=setInterval(O,100),O()}).finally(function(){return clearInterval(A)}):Promise.resolve()).then(k)]).then(function(){return b(),u.onReadyBeingFired=[],ce.resolve(Ds(function(){return s.on.ready.fire(s.vip)})).then(function L(){if(0<u.onReadyBeingFired.length){var O=u.onReadyBeingFired.reduce(ie,Se);return u.onReadyBeingFired=[],ce.resolve(Ds(function(){return O(s.vip)})).then(L)}})}).finally(function(){u.openCanceller===f&&(u.onReadyBeingFired=null,u.isBeingOpened=!1)}).catch(function(L){u.dbOpenError=L;try{D&&D.abort()}catch{}return f===u.openCanceller&&s._close(),rt(L)}).finally(function(){u.openComplete=!0,T()}).then(function(){var L;return S&&(L={},s.tables.forEach(function(O){O.schema.indexes.forEach(function(R){R.name&&(L["idb://".concat(s.name,"/").concat(O.name,"/").concat(R.name)]=new vt(-1/0,[[[]]]))}),L["idb://".concat(s.name,"/").concat(O.name,"/")]=L["idb://".concat(s.name,"/").concat(O.name,"/:dels")]=new vt(-1/0,[[[]]])}),vn(Li).fire(L),Ms(L,!0)),s})}function js(s){function u(g){return s.next(g)}var c=p(u),f=p(function(g){return s.throw(g)});function p(g){return function(A){var k=g(A),A=k.value;return k.done?A:A&&typeof A.then=="function"?A.then(c,f):l(A)?Promise.all(A).then(c,f):c(A)}}return p(u)()}function qr(s,u,c){for(var f=l(s)?s.slice():[s],p=0;p<c;++p)f.push(u);return f}var tp={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(s){return i(i({},s),{table:function(u){var c=s.table(u),f=c.schema,p={},g=[];function b(S,L,O){var R=Mi(S),P=p[R]=p[R]||[],C=S==null?0:typeof S=="string"?1:S.length,$=0<L,$=i(i({},O),{name:$?"".concat(R,"(virtual-from:").concat(O.name,")"):O.name,lowLevelIndex:O,isVirtual:$,keyTail:L,keyLength:C,extractKey:Os(S),unique:!$&&O.unique});return P.push($),$.isPrimaryKey||g.push($),1<C&&b(C===2?S[0]:S.slice(0,C-1),L+1,O),P.sort(function(B,U){return B.keyTail-U.keyTail}),$}u=b(f.primaryKey.keyPath,0,f.primaryKey),p[":id"]=[u];for(var k=0,A=f.indexes;k<A.length;k++){var T=A[k];b(T.keyPath,0,T)}function D(S){var L,O=S.query.index;return O.isVirtual?i(i({},S),{query:{index:O.lowLevelIndex,range:(L=S.query.range,O=O.keyTail,{type:L.type===1?2:L.type,lower:qr(L.lower,L.lowerOpen?s.MAX_KEY:s.MIN_KEY,O),lowerOpen:!0,upper:qr(L.upper,L.upperOpen?s.MIN_KEY:s.MAX_KEY,O),upperOpen:!0})}}):S}return i(i({},c),{schema:i(i({},f),{primaryKey:u,indexes:g,getIndexByKeyPath:function(S){return(S=p[Mi(S)])&&S[0]}}),count:function(S){return c.count(D(S))},query:function(S){return c.query(D(S))},openCursor:function(S){var L=S.query.index,O=L.keyTail,R=L.isVirtual,P=L.keyLength;return R?c.openCursor(D(S)).then(function($){return $&&C($)}):c.openCursor(S);function C($){return Object.create($,{continue:{value:function(B){B!=null?$.continue(qr(B,S.reverse?s.MAX_KEY:s.MIN_KEY,O)):S.unique?$.continue($.key.slice(0,P).concat(S.reverse?s.MIN_KEY:s.MAX_KEY,O)):$.continue()}},continuePrimaryKey:{value:function(B,U){$.continuePrimaryKey(qr(B,s.MAX_KEY,O),U)}},primaryKey:{get:function(){return $.primaryKey}},key:{get:function(){var B=$.key;return P===1?B[0]:B.slice(0,P)}},value:{get:function(){return $.value}}})}}})}})}};function Bs(s,u,c,f){return c=c||{},f=f||"",o(s).forEach(function(p){var g,b,k;y(u,p)?(g=s[p],b=u[p],typeof g=="object"&&typeof b=="object"&&g&&b?(k=w(g))!==w(b)?c[f+p]=u[p]:k==="Object"?Bs(g,b,c,f+p+"."):g!==b&&(c[f+p]=u[p]):g!==b&&(c[f+p]=u[p])):c[f+p]=void 0}),o(u).forEach(function(p){y(s,p)||(c[f+p]=u[p])}),c}function Us(s,u){return u.type==="delete"?u.keys:u.keys||u.values.map(s.extractKey)}var np={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(s){return i(i({},s),{table:function(u){var c=s.table(u),f=c.schema.primaryKey;return i(i({},c),{mutate:function(p){var g=be.trans,b=g.table(u).hook,k=b.deleting,A=b.creating,T=b.updating;switch(p.type){case"add":if(A.fire===Se)break;return g._promise("readwrite",function(){return D(p)},!0);case"put":if(A.fire===Se&&T.fire===Se)break;return g._promise("readwrite",function(){return D(p)},!0);case"delete":if(k.fire===Se)break;return g._promise("readwrite",function(){return D(p)},!0);case"deleteRange":if(k.fire===Se)break;return g._promise("readwrite",function(){return function S(L,O,R){return c.query({trans:L,values:!1,query:{index:f,range:O},limit:R}).then(function(P){var C=P.result;return D({type:"delete",keys:C,trans:L}).then(function($){return 0<$.numFailures?Promise.reject($.failures[0]):C.length<R?{failures:[],numFailures:0,lastResult:void 0}:S(L,i(i({},O),{lower:C[C.length-1],lowerOpen:!0}),R)})})}(p.trans,p.range,1e4)},!0)}return c.mutate(p);function D(S){var L,O,R,P=be.trans,C=S.keys||Us(f,S);if(!C)throw new Error("Keys missing");return(S=S.type==="add"||S.type==="put"?i(i({},S),{keys:C}):i({},S)).type!=="delete"&&(S.values=r([],S.values)),S.keys&&(S.keys=r([],S.keys)),L=c,R=C,((O=S).type==="add"?Promise.resolve([]):L.getMany({trans:O.trans,keys:R,cache:"immutable"})).then(function($){var B=C.map(function(U,G){var Z,oe,ee,re=$[G],le={onerror:null,onsuccess:null};return S.type==="delete"?k.fire.call(le,U,re,P):S.type==="add"||re===void 0?(Z=A.fire.call(le,U,S.values[G],P),U==null&&Z!=null&&(S.keys[G]=U=Z,f.outbound||ne(S.values[G],f.keyPath,U))):(Z=Bs(re,S.values[G]),(oe=T.fire.call(le,Z,U,re,P))&&(ee=S.values[G],Object.keys(oe).forEach(function(se){y(ee,se)?ee[se]=oe[se]:ne(ee,se,oe[se])}))),le});return c.mutate(S).then(function(U){for(var G=U.failures,Z=U.results,oe=U.numFailures,U=U.lastResult,ee=0;ee<C.length;++ee){var re=(Z||C)[ee],le=B[ee];re==null?le.onerror&&le.onerror(G[ee]):le.onsuccess&&le.onsuccess(S.type==="put"&&$[ee]?S.values[ee]:re)}return{failures:G,results:Z,numFailures:oe,lastResult:U}}).catch(function(U){return B.forEach(function(G){return G.onerror&&G.onerror(U)}),Promise.reject(U)})})}}})}})}};function tl(s,u,c){try{if(!u||u.keys.length<s.length)return null;for(var f=[],p=0,g=0;p<u.keys.length&&g<s.length;++p)Me(u.keys[p],s[g])===0&&(f.push(c?Le(u.values[p]):u.values[p]),++g);return f.length===s.length?f:null}catch{return null}}var ip={stack:"dbcore",level:-1,create:function(s){return{table:function(u){var c=s.table(u);return i(i({},c),{getMany:function(f){if(!f.cache)return c.getMany(f);var p=tl(f.keys,f.trans._cache,f.cache==="clone");return p?ce.resolve(p):c.getMany(f).then(function(g){return f.trans._cache={keys:f.keys,values:f.cache==="clone"?Le(g):g},g})},mutate:function(f){return f.type!=="add"&&(f.trans._cache=null),c.mutate(f)}})}}}};function nl(s,u){return s.trans.mode==="readonly"&&!!s.subscr&&!s.trans.explicit&&s.trans.db._options.cache!=="disabled"&&!u.schema.primaryKey.outbound}function il(s,u){switch(s){case"query":return u.values&&!u.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var rp={stack:"dbcore",level:0,name:"Observability",create:function(s){var u=s.schema.name,c=new vt(s.MIN_KEY,s.MAX_KEY);return i(i({},s),{transaction:function(f,p,g){if(be.subscr&&p!=="readonly")throw new he.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(be.querier));return s.transaction(f,p,g)},table:function(f){var p=s.table(f),g=p.schema,b=g.primaryKey,S=g.indexes,k=b.extractKey,A=b.outbound,T=b.autoIncrement&&S.filter(function(O){return O.compound&&O.keyPath.includes(b.keyPath)}),D=i(i({},p),{mutate:function(O){function R(se){return se="idb://".concat(u,"/").concat(f,"/").concat(se),U[se]||(U[se]=new vt)}var P,C,$,B=O.trans,U=O.mutatedParts||(O.mutatedParts={}),G=R(""),Z=R(":dels"),oe=O.type,le=O.type==="deleteRange"?[O.range]:O.type==="delete"?[O.keys]:O.values.length<50?[Us(b,O).filter(function(se){return se}),O.values]:[],ee=le[0],re=le[1],le=O.trans._cache;return l(ee)?(G.addKeys(ee),(le=oe==="delete"||ee.length===re.length?tl(ee,le):null)||Z.addKeys(ee),(le||re)&&(P=R,C=le,$=re,g.indexes.forEach(function(se){var pe=P(se.name||"");function Te(Ie){return Ie!=null?se.extractKey(Ie):null}function De(Ie){return se.multiEntry&&l(Ie)?Ie.forEach(function(Ot){return pe.addKey(Ot)}):pe.addKey(Ie)}(C||$).forEach(function(Ie,yt){var xe=C&&Te(C[yt]),yt=$&&Te($[yt]);Me(xe,yt)!==0&&(xe!=null&&De(xe),yt!=null&&De(yt))})}))):ee?(re={from:(re=ee.lower)!==null&&re!==void 0?re:s.MIN_KEY,to:(re=ee.upper)!==null&&re!==void 0?re:s.MAX_KEY},Z.add(re),G.add(re)):(G.add(c),Z.add(c),g.indexes.forEach(function(se){return R(se.name).add(c)})),p.mutate(O).then(function(se){return!ee||O.type!=="add"&&O.type!=="put"||(G.addKeys(se.results),T&&T.forEach(function(pe){for(var Te=O.values.map(function(xe){return pe.extractKey(xe)}),De=pe.keyPath.findIndex(function(xe){return xe===b.keyPath}),Ie=0,Ot=se.results.length;Ie<Ot;++Ie)Te[Ie][De]=se.results[Ie];R(pe.name).addKeys(Te)})),B.mutatedParts=Ur(B.mutatedParts||{},U),se})}}),S=function(R){var P=R.query,R=P.index,P=P.range;return[R,new vt((R=P.lower)!==null&&R!==void 0?R:s.MIN_KEY,(P=P.upper)!==null&&P!==void 0?P:s.MAX_KEY)]},L={get:function(O){return[b,new vt(O.key)]},getMany:function(O){return[b,new vt().addKeys(O.keys)]},count:S,query:S,openCursor:S};return o(L).forEach(function(O){D[O]=function(R){var P=be.subscr,C=!!P,$=nl(be,p)&&il(O,R)?R.obsSet={}:P;if(C){var B=function(re){return re="idb://".concat(u,"/").concat(f,"/").concat(re),$[re]||($[re]=new vt)},U=B(""),G=B(":dels"),P=L[O](R),C=P[0],P=P[1];if((O==="query"&&C.isPrimaryKey&&!R.values?G:B(C.name||"")).add(P),!C.isPrimaryKey){if(O!=="count"){var Z=O==="query"&&A&&R.values&&p.query(i(i({},R),{values:!1}));return p[O].apply(this,arguments).then(function(re){if(O==="query"){if(A&&R.values)return Z.then(function(Te){return Te=Te.result,U.addKeys(Te),re});var le=R.values?re.result.map(k):re.result;(R.values?U:G).addKeys(le)}else if(O==="openCursor"){var se=re,pe=R.values;return se&&Object.create(se,{key:{get:function(){return G.addKey(se.primaryKey),se.key}},primaryKey:{get:function(){var Te=se.primaryKey;return G.addKey(Te),Te}},value:{get:function(){return pe&&U.addKey(se.primaryKey),se.value}}})}return re})}G.add(c)}}return p[O].apply(this,arguments)}}),D}})}};function rl(s,u,c){if(c.numFailures===0)return u;if(u.type==="deleteRange")return null;var f=u.keys?u.keys.length:"values"in u&&u.values?u.values.length:1;return c.numFailures===f?null:(u=i({},u),l(u.keys)&&(u.keys=u.keys.filter(function(p,g){return!(g in c.failures)})),"values"in u&&l(u.values)&&(u.values=u.values.filter(function(p,g){return!(g in c.failures)})),u)}function Vs(s,u){return c=s,((f=u).lower===void 0||(f.lowerOpen?0<Me(c,f.lower):0<=Me(c,f.lower)))&&(s=s,(u=u).upper===void 0||(u.upperOpen?Me(s,u.upper)<0:Me(s,u.upper)<=0));var c,f}function al(s,u,L,f,p,g){if(!L||L.length===0)return s;var b=u.query.index,k=b.multiEntry,A=u.query.range,T=f.schema.primaryKey.extractKey,D=b.extractKey,S=(b.lowLevelIndex||b).extractKey,L=L.reduce(function(O,R){var P=O,C=[];if(R.type==="add"||R.type==="put")for(var $=new vt,B=R.values.length-1;0<=B;--B){var U,G=R.values[B],Z=T(G);$.hasKey(Z)||(U=D(G),(k&&l(U)?U.some(function(se){return Vs(se,A)}):Vs(U,A))&&($.addKey(Z),C.push(G)))}switch(R.type){case"add":var oe=new vt().addKeys(u.values?O.map(function(pe){return T(pe)}):O),P=O.concat(u.values?C.filter(function(pe){return pe=T(pe),!oe.hasKey(pe)&&(oe.addKey(pe),!0)}):C.map(function(pe){return T(pe)}).filter(function(pe){return!oe.hasKey(pe)&&(oe.addKey(pe),!0)}));break;case"put":var ee=new vt().addKeys(R.values.map(function(pe){return T(pe)}));P=O.filter(function(pe){return!ee.hasKey(u.values?T(pe):pe)}).concat(u.values?C:C.map(function(pe){return T(pe)}));break;case"delete":var re=new vt().addKeys(R.keys);P=O.filter(function(pe){return!re.hasKey(u.values?T(pe):pe)});break;case"deleteRange":var le=R.range;P=O.filter(function(pe){return!Vs(T(pe),le)})}return P},s);return L===s?s:(L.sort(function(O,R){return Me(S(O),S(R))||Me(T(O),T(R))}),u.limit&&u.limit<1/0&&(L.length>u.limit?L.length=u.limit:s.length===u.limit&&L.length<u.limit&&(p.dirty=!0)),g?Object.freeze(L):L)}function sl(s,u){return Me(s.lower,u.lower)===0&&Me(s.upper,u.upper)===0&&!!s.lowerOpen==!!u.lowerOpen&&!!s.upperOpen==!!u.upperOpen}function ap(s,u){return function(c,f,p,g){if(c===void 0)return f!==void 0?-1:0;if(f===void 0)return 1;if((f=Me(c,f))===0){if(p&&g)return 0;if(p)return 1;if(g)return-1}return f}(s.lower,u.lower,s.lowerOpen,u.lowerOpen)<=0&&0<=function(c,f,p,g){if(c===void 0)return f!==void 0?1:0;if(f===void 0)return-1;if((f=Me(c,f))===0){if(p&&g)return 0;if(p)return-1;if(g)return 1}return f}(s.upper,u.upper,s.upperOpen,u.upperOpen)}function sp(s,u,c,f){s.subscribers.add(c),f.addEventListener("abort",function(){var p,g;s.subscribers.delete(c),s.subscribers.size===0&&(p=s,g=u,setTimeout(function(){p.subscribers.size===0&&ae(g,p)},3e3))})}var op={stack:"dbcore",level:0,name:"Cache",create:function(s){var u=s.schema.name;return i(i({},s),{transaction:function(c,f,p){var g,b,k=s.transaction(c,f,p);return f==="readwrite"&&(b=(g=new AbortController).signal,p=function(A){return function(){if(g.abort(),f==="readwrite"){for(var T=new Set,D=0,S=c;D<S.length;D++){var L=S[D],O=In["idb://".concat(u,"/").concat(L)];if(O){var R=s.table(L),P=O.optimisticOps.filter(function(pe){return pe.trans===k});if(k._explicit&&A&&k.mutatedParts)for(var C=0,$=Object.values(O.queries.query);C<$.length;C++)for(var B=0,U=(oe=$[C]).slice();B<U.length;B++)Ps((ee=U[B]).obsSet,k.mutatedParts)&&(ae(oe,ee),ee.subscribers.forEach(function(pe){return T.add(pe)}));else if(0<P.length){O.optimisticOps=O.optimisticOps.filter(function(pe){return pe.trans!==k});for(var G=0,Z=Object.values(O.queries.query);G<Z.length;G++)for(var oe,ee,re,le=0,se=(oe=Z[G]).slice();le<se.length;le++)(ee=se[le]).res!=null&&k.mutatedParts&&(A&&!ee.dirty?(re=Object.isFrozen(ee.res),re=al(ee.res,ee.req,P,R,ee,re),ee.dirty?(ae(oe,ee),ee.subscribers.forEach(function(pe){return T.add(pe)})):re!==ee.res&&(ee.res=re,ee.promise=ce.resolve({result:re}))):(ee.dirty&&ae(oe,ee),ee.subscribers.forEach(function(pe){return T.add(pe)})))}}}T.forEach(function(pe){return pe()})}}},k.addEventListener("abort",p(!1),{signal:b}),k.addEventListener("error",p(!1),{signal:b}),k.addEventListener("complete",p(!0),{signal:b})),k},table:function(c){var f=s.table(c),p=f.schema.primaryKey;return i(i({},f),{mutate:function(g){var b=be.trans;if(p.outbound||b.db._options.cache==="disabled"||b.explicit||b.idbtrans.mode!=="readwrite")return f.mutate(g);var k=In["idb://".concat(u,"/").concat(c)];return k?(b=f.mutate(g),g.type!=="add"&&g.type!=="put"||!(50<=g.values.length||Us(p,g).some(function(A){return A==null}))?(k.optimisticOps.push(g),g.mutatedParts&&Vr(g.mutatedParts),b.then(function(A){0<A.numFailures&&(ae(k.optimisticOps,g),(A=rl(0,g,A))&&k.optimisticOps.push(A),g.mutatedParts&&Vr(g.mutatedParts))}),b.catch(function(){ae(k.optimisticOps,g),g.mutatedParts&&Vr(g.mutatedParts)})):b.then(function(A){var T=rl(0,i(i({},g),{values:g.values.map(function(D,S){var L;return A.failures[S]?D:(D=(L=p.keyPath)!==null&&L!==void 0&&L.includes(".")?Le(D):i({},D),ne(D,p.keyPath,A.results[S]),D)})}),A);k.optimisticOps.push(T),queueMicrotask(function(){return g.mutatedParts&&Vr(g.mutatedParts)})}),b):f.mutate(g)},query:function(g){if(!nl(be,f)||!il("query",g))return f.query(g);var b=((T=be.trans)===null||T===void 0?void 0:T.db._options.cache)==="immutable",S=be,k=S.requery,A=S.signal,T=function(R,P,C,$){var B=In["idb://".concat(R,"/").concat(P)];if(!B)return[];if(!(P=B.queries[C]))return[null,!1,B,null];var U=P[($.query?$.query.index.name:null)||""];if(!U)return[null,!1,B,null];switch(C){case"query":var G=U.find(function(Z){return Z.req.limit===$.limit&&Z.req.values===$.values&&sl(Z.req.query.range,$.query.range)});return G?[G,!0,B,U]:[U.find(function(Z){return("limit"in Z.req?Z.req.limit:1/0)>=$.limit&&(!$.values||Z.req.values)&&ap(Z.req.query.range,$.query.range)}),!1,B,U];case"count":return G=U.find(function(Z){return sl(Z.req.query.range,$.query.range)}),[G,!!G,B,U]}}(u,c,"query",g),D=T[0],S=T[1],L=T[2],O=T[3];return D&&S?D.obsSet=g.obsSet:(S=f.query(g).then(function(R){var P=R.result;if(D&&(D.res=P),b){for(var C=0,$=P.length;C<$;++C)Object.freeze(P[C]);Object.freeze(P)}else R.result=Le(P);return R}).catch(function(R){return O&&D&&ae(O,D),Promise.reject(R)}),D={obsSet:g.obsSet,promise:S,subscribers:new Set,type:"query",req:g,dirty:!1},O?O.push(D):(O=[D],(L=L||(In["idb://".concat(u,"/").concat(c)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[g.query.index.name||""]=O)),sp(D,O,k,A),D.promise.then(function(R){return{result:al(R.result,g,L==null?void 0:L.optimisticOps,f,D,b)}})}})}})}};function Hr(s,u){return new Proxy(s,{get:function(c,f,p){return f==="db"?u:Reflect.get(c,f,p)}})}var rn=(at.prototype.version=function(s){if(isNaN(s)||s<.1)throw new he.Type("Given version is not a positive number");if(s=Math.round(10*s)/10,this.idbdb||this._state.isBeingOpened)throw new he.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,s);var u=this._versions,c=u.filter(function(f){return f._cfg.version===s})[0];return c||(c=new this.Version(s),u.push(c),u.sort(Yh),c.stores({}),this._state.autoSchema=!1,c)},at.prototype._whenReady=function(s){var u=this;return this.idbdb&&(this._state.openComplete||be.letThrough||this._vip)?s():new ce(function(c,f){if(u._state.openComplete)return f(new he.DatabaseClosed(u._state.dbOpenError));if(!u._state.isBeingOpened){if(!u._state.autoOpen)return void f(new he.DatabaseClosed);u.open().catch(Se)}u._state.dbReadyPromise.then(c,f)}).then(s)},at.prototype.use=function(s){var u=s.stack,c=s.create,f=s.level,p=s.name;return p&&this.unuse({stack:u,name:p}),s=this._middlewares[u]||(this._middlewares[u]=[]),s.push({stack:u,create:c,level:f==null?10:f,name:p}),s.sort(function(g,b){return g.level-b.level}),this},at.prototype.unuse=function(s){var u=s.stack,c=s.name,f=s.create;return u&&this._middlewares[u]&&(this._middlewares[u]=this._middlewares[u].filter(function(p){return f?p.create!==f:!!c&&p.name!==c})),this},at.prototype.open=function(){var s=this;return Rn(fn,function(){return ep(s)})},at.prototype._close=function(){var s=this._state,u=ii.indexOf(this);if(0<=u&&ii.splice(u,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}s.isBeingOpened||(s.dbReadyPromise=new ce(function(c){s.dbReadyResolve=c}),s.openCanceller=new ce(function(c,f){s.cancelOpen=f}))},at.prototype.close=function(c){var u=(c===void 0?{disableAutoOpen:!0}:c).disableAutoOpen,c=this._state;u?(c.isBeingOpened&&c.cancelOpen(new he.DatabaseClosed),this._close(),c.autoOpen=!1,c.dbOpenError=new he.DatabaseClosed):(this._close(),c.autoOpen=this._options.autoOpen||c.isBeingOpened,c.openComplete=!1,c.dbOpenError=null)},at.prototype.delete=function(s){var u=this;s===void 0&&(s={disableAutoOpen:!0});var c=0<arguments.length&&typeof arguments[0]!="object",f=this._state;return new ce(function(p,g){function b(){u.close(s);var k=u._deps.indexedDB.deleteDatabase(u.name);k.onsuccess=Qe(function(){var A,T,D;A=u._deps,T=u.name,D=A.indexedDB,A=A.IDBKeyRange,Fs(D)||T===Tr||Rs(D,A).delete(T).catch(Se),p()}),k.onerror=Wt(g),k.onblocked=u._fireOnBlocked}if(c)throw new he.InvalidArgument("Invalid closeOptions argument to db.delete()");f.isBeingOpened?f.dbReadyPromise.then(b):b()})},at.prototype.backendDB=function(){return this.idbdb},at.prototype.isOpen=function(){return this.idbdb!==null},at.prototype.hasBeenClosed=function(){var s=this._state.dbOpenError;return s&&s.name==="DatabaseClosed"},at.prototype.hasFailed=function(){return this._state.dbOpenError!==null},at.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(at.prototype,"tables",{get:function(){var s=this;return o(this._allTables).map(function(u){return s._allTables[u]})},enumerable:!1,configurable:!0}),at.prototype.transaction=function(){var s=function(u,c,f){var p=arguments.length;if(p<2)throw new he.InvalidArgument("Too few arguments");for(var g=new Array(p-1);--p;)g[p-1]=arguments[p];return f=g.pop(),[u,je(g),f]}.apply(this,arguments);return this._transaction.apply(this,s)},at.prototype._transaction=function(s,u,c){var f=this,p=be.trans;p&&p.db===this&&s.indexOf("!")===-1||(p=null);var g,b,k=s.indexOf("?")!==-1;s=s.replace("!","").replace("?","");try{if(b=u.map(function(T){if(T=T instanceof f.Table?T.name:T,typeof T!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return T}),s=="r"||s===bs)g=bs;else{if(s!="rw"&&s!=ks)throw new he.InvalidArgument("Invalid transaction mode: "+s);g=ks}if(p){if(p.mode===bs&&g===ks){if(!k)throw new he.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");p=null}p&&b.forEach(function(T){if(p&&p.storeNames.indexOf(T)===-1){if(!k)throw new he.SubTransaction("Table "+T+" not included in parent transaction.");p=null}}),k&&p&&!p.active&&(p=null)}}catch(T){return p?p._promise(null,function(D,S){S(T)}):rt(T)}var A=function T(D,S,L,O,R){return ce.resolve().then(function(){var P=be.transless||be,C=D._createTransaction(S,L,D._dbSchema,O);if(C.explicit=!0,P={trans:C,transless:P},O)C.idbtrans=O.idbtrans;else try{C.create(),C.idbtrans._explicit=!0,D._state.PR1398_maxLoop=3}catch(U){return U.name===ge.InvalidState&&D.isOpen()&&0<--D._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),D.close({disableAutoOpen:!1}),D.open().then(function(){return T(D,S,L,null,R)})):rt(U)}var $,B=Oe(R);return B&&ni(),P=ce.follow(function(){var U;($=R.call(C,C))&&(B?(U=pn.bind(null,null),$.then(U,U)):typeof $.next=="function"&&typeof $.throw=="function"&&($=js($)))},P),($&&typeof $.then=="function"?ce.resolve($).then(function(U){return C.active?U:rt(new he.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):P.then(function(){return $})).then(function(U){return O&&C._resolve(),C._completion.then(function(){return U})}).catch(function(U){return C._reject(U),rt(U)})})}.bind(null,this,g,b,p,c);return p?p._promise(g,A,"lock"):be.trans?Rn(be.transless,function(){return f._whenReady(A)}):this._whenReady(A)},at.prototype.table=function(s){if(!y(this._allTables,s))throw new he.InvalidTable("Table ".concat(s," does not exist"));return this._allTables[s]},at);function at(s,u){var c=this;this._middlewares={},this.verno=0;var f=at.dependencies;this._options=u=i({addons:at.addons,autoOpen:!0,indexedDB:f.indexedDB,IDBKeyRange:f.IDBKeyRange,cache:"cloned"},u),this._deps={indexedDB:u.indexedDB,IDBKeyRange:u.IDBKeyRange},f=u.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var p,g,b,k,A,T={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Se,dbReadyPromise:null,cancelOpen:Se,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:u.autoOpen};T.dbReadyPromise=new ce(function(S){T.dbReadyResolve=S}),T.openCanceller=new ce(function(S,L){T.cancelOpen=L}),this._state=T,this.name=s,this.on=Fi(this,"populate","blocked","versionchange","close",{ready:[ie,Se]}),this.on.ready.subscribe=J(this.on.ready.subscribe,function(S){return function(L,O){at.vip(function(){var R,P=c._state;P.openComplete?(P.dbOpenError||ce.resolve().then(L),O&&S(L)):P.onReadyBeingFired?(P.onReadyBeingFired.push(L),O&&S(L)):(S(L),R=c,O||S(function C(){R.on.ready.unsubscribe(L),R.on.ready.unsubscribe(C)}))})}}),this.Collection=(p=this,Di(qh.prototype,function($,C){this.db=p;var O=$u,R=null;if(C)try{O=C()}catch(B){R=B}var P=$._ctx,C=P.table,$=C.hook.reading.fire;this._ctx={table:C,index:P.index,isPrimKey:!P.index||C.schema.primKey.keyPath&&P.index===C.schema.primKey.name,range:O,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:R,or:P.or,valueMapper:$!==pt?$:null}})),this.Table=(g=this,Di(Uu.prototype,function(S,L,O){this.db=g,this._tx=O,this.name=S,this.schema=L,this.hook=g._allTables[S]?g._allTables[S].hook:Fi(null,{creating:[ut,Se],reading:[nt,pt],updating:[ue,Se],deleting:[Xe,Se]})})),this.Transaction=(b=this,Di(zh.prototype,function(S,L,O,R,P){var C=this;this.db=b,this.mode=S,this.storeNames=L,this.schema=O,this.chromeTransactionDurability=R,this.idbtrans=null,this.on=Fi(this,"complete","error","abort"),this.parent=P||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new ce(function($,B){C._resolve=$,C._reject=B}),this._completion.then(function(){C.active=!1,C.on.complete.fire()},function($){var B=C.active;return C.active=!1,C.on.error.fire($),C.parent?C.parent._reject($):B&&C.idbtrans&&C.idbtrans.abort(),rt($)})})),this.Version=(k=this,Di(Zh.prototype,function(S){this.db=k,this._cfg={version:S,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(A=this,Di(zu.prototype,function(S,L,O){if(this.db=A,this._ctx={table:S,index:L===":id"?null:L,or:O},this._cmp=this._ascending=Me,this._descending=function(R,P){return Me(P,R)},this._max=function(R,P){return 0<Me(R,P)?R:P},this._min=function(R,P){return Me(R,P)<0?R:P},this._IDBKeyRange=A._deps.IDBKeyRange,!this._IDBKeyRange)throw new he.MissingAPI})),this.on("versionchange",function(S){0<S.newVersion?console.warn("Another connection wants to upgrade database '".concat(c.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(c.name,"'. Closing db now to resume the delete request.")),c.close({disableAutoOpen:!1})}),this.on("blocked",function(S){!S.newVersion||S.newVersion<S.oldVersion?console.warn("Dexie.delete('".concat(c.name,"') was blocked")):console.warn("Upgrade '".concat(c.name,"' blocked by other connection holding version ").concat(S.oldVersion/10))}),this._maxKey=$i(u.IDBKeyRange),this._createTransaction=function(S,L,O,R){return new c.Transaction(S,L,O,c._options.chromeTransactionDurability,R)},this._fireOnBlocked=function(S){c.on("blocked").fire(S),ii.filter(function(L){return L.name===c.name&&L!==c&&!L._state.vcFired}).map(function(L){return L.on("versionchange").fire(S)})},this.use(ip),this.use(op),this.use(rp),this.use(tp),this.use(np);var D=new Proxy(this,{get:function(S,L,O){if(L==="_vip")return!0;if(L==="table")return function(P){return Hr(c.table(P),D)};var R=Reflect.get(S,L,O);return R instanceof Uu?Hr(R,D):L==="tables"?R.map(function(P){return Hr(P,D)}):L==="_createTransaction"?function(){return Hr(R.apply(this,arguments),D)}:R}});this.vip=D,f.forEach(function(S){return S(c)})}var Kr,It=typeof Symbol!="undefined"&&"observable"in Symbol?Symbol.observable:"@@observable",up=(qs.prototype.subscribe=function(s,u,c){return this._subscribe(s&&typeof s!="function"?s:{next:s,error:u,complete:c})},qs.prototype[It]=function(){return this},qs);function qs(s){this._subscribe=s}try{Kr={indexedDB:a.indexedDB||a.mozIndexedDB||a.webkitIndexedDB||a.msIndexedDB,IDBKeyRange:a.IDBKeyRange||a.webkitIDBKeyRange}}catch{Kr={indexedDB:null,IDBKeyRange:null}}function ol(s){var u,c=!1,f=new up(function(p){var g=Oe(s),b,k=!1,A={},T={},D={get closed(){return k},unsubscribe:function(){k||(k=!0,b&&b.abort(),S&&vn.storagemutated.unsubscribe(O))}};p.start&&p.start(D);var S=!1,L=function(){return ys(R)},O=function(P){Ur(A,P),Ps(T,A)&&L()},R=function(){var P,C,$;!k&&Kr.indexedDB&&(A={},P={},b&&b.abort(),b=new AbortController,$=function(B){var U=ei();try{g&&ni();var G=hn(s,B);return G=g?G.finally(pn):G}finally{U&&ti()}}(C={subscr:P,signal:b.signal,requery:L,querier:s,trans:null}),Promise.resolve($).then(function(B){c=!0,u=B,k||C.signal.aborted||(A={},function(U){for(var G in U)if(y(U,G))return;return 1}(T=P)||S||(vn(Li,O),S=!0),ys(function(){return!k&&p.next&&p.next(B)}))},function(B){c=!1,["DatabaseClosedError","AbortError"].includes(B==null?void 0:B.name)||k||ys(function(){k||p.error&&p.error(B)})}))};return setTimeout(L,0),D});return f.hasValue=function(){return c},f.getValue=function(){return u},f}var Pn=rn;function Hs(s){var u=yn;try{yn=!0,vn.storagemutated.fire(s),Ms(s,!0)}finally{yn=u}}v(Pn,i(i({},qe),{delete:function(s){return new Pn(s,{addons:[]}).delete()},exists:function(s){return new Pn(s,{addons:[]}).open().then(function(u){return u.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(s){try{return u=Pn.dependencies,c=u.indexedDB,u=u.IDBKeyRange,(Fs(c)?Promise.resolve(c.databases()).then(function(f){return f.map(function(p){return p.name}).filter(function(p){return p!==Tr})}):Rs(c,u).toCollection().primaryKeys()).then(s)}catch{return rt(new he.MissingAPI)}var u,c},defineClass:function(){return function(s){d(this,s)}},ignoreTransaction:function(s){return be.trans?Rn(be.transless,s):s()},vip:Ds,async:function(s){return function(){try{var u=js(s.apply(this,arguments));return u&&typeof u.then=="function"?u:ce.resolve(u)}catch(c){return rt(c)}}},spawn:function(s,u,c){try{var f=js(s.apply(c,u||[]));return f&&typeof f.then=="function"?f:ce.resolve(f)}catch(p){return rt(p)}},currentTransaction:{get:function(){return be.trans||null}},waitFor:function(s,u){return u=ce.resolve(typeof s=="function"?Pn.ignoreTransaction(s):s).timeout(u||6e4),be.trans?be.trans.waitFor(u):u},Promise:ce,debug:{get:function(){return Ee},set:function(s){We(s)}},derive:N,extend:d,props:v,override:J,Events:Fi,on:vn,liveQuery:ol,extendObservabilitySet:Ur,getByKeyPath:X,setByKeyPath:ne,delByKeyPath:function(s,u){typeof u=="string"?ne(s,u,void 0):"length"in u&&[].map.call(u,function(c){ne(s,c,void 0)})},shallowClone:ye,deepClone:Le,getObjectDiff:Bs,cmp:Me,asap:Y,minKey:-1/0,addons:[],connections:ii,errnames:ge,dependencies:Kr,cache:In,semVer:"4.0.11",version:"4.0.11".split(".").map(function(s){return parseInt(s)}).reduce(function(s,u,c){return s+u/Math.pow(10,2*c)})})),Pn.maxKey=$i(Pn.dependencies.IDBKeyRange),typeof dispatchEvent!="undefined"&&typeof addEventListener!="undefined"&&(vn(Li,function(s){yn||(s=new CustomEvent(Es,{detail:s}),yn=!0,dispatchEvent(s),yn=!1)}),addEventListener(Es,function(s){s=s.detail,yn||Hs(s)}));var si,yn=!1,ul=function(){};return typeof BroadcastChannel!="undefined"&&((ul=function(){(si=new BroadcastChannel(Es)).onmessage=function(s){return s.data&&Hs(s.data)}})(),typeof si.unref=="function"&&si.unref(),vn(Li,function(s){yn||si.postMessage(s)})),typeof addEventListener!="undefined"&&(addEventListener("pagehide",function(s){if(!rn.disableBfCache&&s.persisted){Ee&&console.debug("Dexie: handling persisted pagehide"),si!=null&&si.close();for(var u=0,c=ii;u<c.length;u++)c[u].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(s){!rn.disableBfCache&&s.persisted&&(Ee&&console.debug("Dexie: handling persisted pageshow"),ul(),Hs({all:new vt(-1/0,[[]])}))})),ce.rejectionMapper=function(s,u){return!s||s instanceof Ke||s instanceof TypeError||s instanceof SyntaxError||!s.name||!Ge[s.name]?s:(u=new Ge[s.name](u||s.message,s),"stack"in s&&_(u,"stack",{get:function(){return this.inner.stack}}),u)},We(Ee),i(rn,Object.freeze({__proto__:null,Dexie:rn,liveQuery:ol,Entity:Mu,cmp:Me,PropModification:Ii,replacePrefix:function(s,u){return new Ii({replacePrefix:[s,u]})},add:function(s){return new Ii({add:s})},remove:function(s){return new Ii({remove:s})},default:rn,RangeSet:vt,mergeRanges:Bi,rangesOverlap:Xu}),{default:rn}),rn})}(ra)),ra.exports}var Bg=jg();const Uo=za(Bg),Al=Symbol.for("Dexie"),ba=globalThis[Al]||(globalThis[Al]=Uo);if(Uo.semVer!==ba.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${Uo.semVer} and ${ba.semVer}`);const{liveQuery:OS,mergeRanges:xS,rangesOverlap:TS,RangeSet:CS,cmp:RS,Entity:FS,PropModification:DS,replacePrefix:IS,add:PS,remove:LS}=ba;class Hd extends ba{constructor(n,i,r={}){super(n);de(this,"logs");const a={logs:"id, level, time, source, account"};this.version(i).stores({...a,...r})}}class Ug extends Hd{constructor(){super("nizza",1)}}class Kd{constructor(e,n){de(this,"logger");de(this,"channel");de(this,"listeners",new Map);de(this,"eventQueue",new Map);this.logger=n.child("EventBus");try{this.logger.debug(`Creating BroadcastChannel with name "${e}"`),this.channel=new BroadcastChannel(e),this.channel.onmessage=i=>this.handleMessage(i),this.channel.onmessageerror=i=>this.logger.error("NizzaBroadcastChannel error:",i)}catch(i){throw this.logger.error("Failed to create NizzaBroadcastChannel:",i),i}}on(e,n){return this.logger.debug(`Subscribing to pattern "${e}"`),this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.logger.debug(`Emitting event "${e}" with data`,n),this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;this.logger.debug(`Received message "${i}" with data`,n);for(const[r,a]of this.listeners.entries())this.matchWildcard(r,i)&&(this.logger.debug(`Matching pattern "${r}" for event "${i}"`),a.forEach(o=>o({...n,wildcard:r})))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const r=new Error("Invalid arguments");throw this.logger.error(r),r}this.listeners.has(e)||(this.logger.debug(`Adding new pattern "${e}"`),this.listeners.set(e,new Set));const i=Array.from(this.eventQueue).filter(([r])=>{const a=this.matchWildcard(e,r);return a&&(this.eventQueue.delete(r),this.logger.debug(`Dequeued pending events for "${r}".`)),a}).flatMap(([,r])=>r);for(const[r,a]of this.listeners.entries())this.matchWildcard(r,e)&&(this.logger.debug(`Adding listener to pattern "${r}"`),a.add(n),i.length&&(this.logger.debug(`Delivering pending events for "${e}".`),i.forEach(o=>{n({...o,wildcard:r})})))}emitEvent(e,n,i){if(typeof e!="string"){const o=new Error("Invalid arguments");throw this.logger.error(o),o}const r={name:e,data:n,attrs:i},a=Array.from(this.getMatchingListeners(e));if(a.length){this.logger.debug(`Delivering event "${e}" to listeners`);for(const[o,l]of a)l({...r,wildcard:o})}else this.logger.debug(`No listeners for event "${e}", enqueuing`),this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(r);this.logger.debug("Posting message to channel",r),this.channel.postMessage(r)}*getMatchingListeners(e){this.logger.debug(`Getting matching listeners for event "${e}"`);for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,e))for(const r of i)yield[n,r]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){this.logger.debug(`Unsubscribing from event "${e}"`);const i=this.listeners.get(e);i.delete(n),i.size===0&&(this.logger.debug(`No more listeners for event "${e}", deleting`),this.listeners.delete(e))}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*"),a=new RegExp(`^${i}$`).test(n);return this.logger.debug(`Wildcard "${e}" matches with pattern "${n}": ${a}`),a}}var Vi={exports:{}},to,Ol;function Vg(){if(Ol)return to;Ol=1;function t(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}to=e;function e(n,i,r){var a=r&&r.stringify||t,o=1;if(typeof n=="object"&&n!==null){var l=i.length+o;if(l===1)return n;var d=new Array(l);d[0]=a(n);for(var h=1;h<l;h++)d[h]=a(i[h]);return d.join(" ")}if(typeof n!="string")return n;var m=i.length;if(m===0)return n;for(var y="",v=1-o,x=-1,_=n&&n.length||0,N=0;N<_;){if(n.charCodeAt(N)===37&&N+1<_){switch(x=x>-1?x:0,n.charCodeAt(N+1)){case 100:case 102:if(v>=m||i[v]==null)break;x<N&&(y+=n.slice(x,N)),y+=Number(i[v]),x=N+2,N++;break;case 105:if(v>=m||i[v]==null)break;x<N&&(y+=n.slice(x,N)),y+=Math.floor(Number(i[v])),x=N+2,N++;break;case 79:case 111:case 106:if(v>=m||i[v]===void 0)break;x<N&&(y+=n.slice(x,N));var E=typeof i[v];if(E==="string"){y+="'"+i[v]+"'",x=N+2,N++;break}if(E==="function"){y+=i[v].name||"<anonymous>",x=N+2,N++;break}y+=a(i[v]),x=N+2,N++;break;case 115:if(v>=m)break;x<N&&(y+=n.slice(x,N)),y+=String(i[v]),x=N+2,N++;break;case 37:x<N&&(y+=n.slice(x,N)),y+="%",x=N+2,N++,v--;break}++v}++N}return x===-1?n:(x<_&&(y+=n.slice(x)),y)}return to}var xl;function qg(){if(xl)return Vi.exports;xl=1;const t=Vg();Vi.exports=m;const e=M().console||{},n={mapHttpRequest:ne,mapHttpResponse:ne,wrapRequestSerializer:ye,wrapResponseSerializer:ye,wrapErrorSerializer:ye,req:ne,res:ne,err:Y,errWithCause:Y};function i(w,z){return w==="silent"?1/0:z.levels.values[w]}const r=Symbol("pino.logFuncs"),a=Symbol("pino.hierarchy"),o={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function l(w,z){const Q={logger:z,parent:w[a]};z[a]=Q}function d(w,z,Q){const ae={};z.forEach(te=>{ae[te]=Q[te]?Q[te]:e[te]||e[o[te]||"log"]||fe}),w[r]=ae}function h(w,z){return Array.isArray(w)?w.filter(function(ae){return ae!=="!stdSerializers.err"}):w===!0?Object.keys(z):!1}function m(w){w=w||{},w.browser=w.browser||{};const z=w.browser.transmit;if(z&&typeof z.send!="function")throw Error("pino: transmit option must have a send function");const Q=w.browser.write||e;w.browser.write&&(w.browser.asObject=!0);const ae=w.serializers||{},te=h(w.browser.serialize,ae);let j=w.browser.serialize;Array.isArray(w.browser.serialize)&&w.browser.serialize.indexOf("!stdSerializers.err")>-1&&(j=!1);const Oe=Object.keys(w.customLevels||{}),Re=["error","fatal","warn","info","debug","trace"].concat(Oe);typeof Q=="function"&&Re.forEach(function(Ge){Q[Ge]=Q}),(w.enabled===!1||w.browser.disabled)&&(w.level="silent");const Ke=w.level||"info",I=Object.create(Q);I.log||(I.log=fe),d(I,Re,Q),l({},I),Object.defineProperty(I,"levelVal",{get:ot}),Object.defineProperty(I,"level",{get:ge,set:Fe});const q={transmit:z,serialize:te,asObject:w.browser.asObject,formatters:w.browser.formatters,levels:Re,timestamp:X(w),messageKey:w.messageKey||"msg",onChild:w.onChild||fe};I.levels=y(w),I.level=Ke,I.setMaxListeners=I.getMaxListeners=I.emit=I.addListener=I.on=I.prependListener=I.once=I.prependOnceListener=I.removeListener=I.removeAllListeners=I.listeners=I.listenerCount=I.eventNames=I.write=I.flush=fe,I.serializers=ae,I._serialize=te,I._stdErrSerialize=j,I.child=function(...Ge){return he.call(this,q,...Ge)},z&&(I._logEvent=K());function ot(){return i(this.level,this)}function ge(){return this._level}function Fe(Ge){if(Ge!=="silent"&&!this.levels.values[Ge])throw Error("unknown level "+Ge);this._level=Ge,_(this,q,I,"error"),_(this,q,I,"fatal"),_(this,q,I,"warn"),_(this,q,I,"info"),_(this,q,I,"debug"),_(this,q,I,"trace"),Oe.forEach(qe=>{_(this,q,I,qe)})}function he(Ge,qe,Se){if(!qe)throw new Error("missing bindings for child Pino");Se=Se||{},te&&qe.serializers&&(Se.serializers=qe.serializers);const pt=Se.serializers;if(te&&pt){var nt=Object.assign({},ae,pt),_e=w.browser.serialize===!0?Object.keys(nt):te;delete qe.serializers,V([qe],_e,nt,this._stdErrSerialize)}function ut(ue){this._childLevel=(ue._childLevel|0)+1,this.bindings=qe,nt&&(this.serializers=nt,this._serialize=_e),z&&(this._logEvent=K([].concat(ue._logEvent.bindings,qe)))}ut.prototype=this;const Xe=new ut(this);return l(this,Xe),Xe.child=function(...ue){return he.call(this,Ge,...ue)},Xe.level=Se.level||this.level,Ge.onChild(Xe),Xe}return I}function y(w){const z=w.customLevels||{},Q=Object.assign({},m.levels.values,z),ae=Object.assign({},m.levels.labels,v(z));return{values:Q,labels:ae}}function v(w){const z={};return Object.keys(w).forEach(function(Q){z[w[Q]]=Q}),z}m.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},m.stdSerializers=n,m.stdTimeFunctions=Object.assign({},{nullTime:je,epochTime:ke,unixTime:Ae,isoTime:Le});function x(w){const z=[];w.bindings&&z.push(w.bindings);let Q=w[a];for(;Q.parent;)Q=Q.parent,Q.logger.bindings&&z.push(Q.logger.bindings);return z.reverse()}function _(w,z,Q,ae){if(Object.defineProperty(w,ae,{value:i(w.level,Q)>i(ae,Q)?fe:Q[r][ae],writable:!0,enumerable:!0,configurable:!0}),w[ae]===fe){if(!z.transmit)return;const j=z.transmit.level||w.level,Oe=i(j,Q);if(i(ae,Q)<Oe)return}w[ae]=E(w,z,Q,ae);const te=x(w);te.length!==0&&(w[ae]=N(te,w[ae]))}function N(w,z){return function(){return z.apply(this,[...w,...arguments])}}function E(w,z,Q,ae){return function(te){return function(){const Oe=z.timestamp(),Re=new Array(arguments.length),Ke=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var I=0;I<Re.length;I++)Re[I]=arguments[I];var q=!1;if(z.serialize&&(V(Re,this._serialize,this.serializers,this._stdErrSerialize),q=!0),z.asObject||z.formatters?te.call(Ke,F(this,ae,Re,Oe,z)):te.apply(Ke,Re),z.transmit){const ot=z.transmit.level||w._level,ge=i(ot,Q),Fe=i(ae,Q);if(Fe<ge)return;J(this,{ts:Oe,methodLevel:ae,methodValue:Fe,transmitValue:Q.levels.values[z.transmit.level||w._level],send:z.transmit.send,val:i(w._level,Q)},Re,q)}}}(w[r][ae])}function F(w,z,Q,ae,te){const{level:j,log:Oe=ge=>ge}=te.formatters||{},Re=Q.slice();let Ke=Re[0];const I={};if(ae&&(I.time=ae),j){const ge=j(z,w.levels.values[z]);Object.assign(I,ge)}else I.level=w.levels.values[z];let q=(w._childLevel|0)+1;if(q<1&&(q=1),Ke!==null&&typeof Ke=="object"){for(;q--&&typeof Re[0]=="object";)Object.assign(I,Re.shift());Ke=Re.length?t(Re.shift(),Re):void 0}else typeof Ke=="string"&&(Ke=t(Re.shift(),Re));return Ke!==void 0&&(I[te.messageKey]=Ke),Oe(I)}function V(w,z,Q,ae){for(const te in w)if(ae&&w[te]instanceof Error)w[te]=m.stdSerializers.err(w[te]);else if(typeof w[te]=="object"&&!Array.isArray(w[te])&&z)for(const j in w[te])z.indexOf(j)>-1&&j in Q&&(w[te][j]=Q[j](w[te][j]))}function J(w,z,Q,ae=!1){const te=z.send,j=z.ts,Oe=z.methodLevel,Re=z.methodValue,Ke=z.val,I=w._logEvent.bindings;ae||V(Q,w._serialize||Object.keys(w.serializers),w.serializers,w._stdErrSerialize===void 0?!0:w._stdErrSerialize),w._logEvent.ts=j,w._logEvent.messages=Q.filter(function(q){return I.indexOf(q)===-1}),w._logEvent.level.label=Oe,w._logEvent.level.value=Re,te(Oe,w._logEvent,Ke),w._logEvent=K(I)}function K(w){return{ts:0,messages:[],bindings:w||[],level:{label:"",value:0}}}function Y(w){const z={type:w.constructor.name,msg:w.message,stack:w.stack};for(const Q in w)z[Q]===void 0&&(z[Q]=w[Q]);return z}function X(w){return typeof w.timestamp=="function"?w.timestamp:w.timestamp===!1?je:ke}function ne(){return{}}function ye(w){return w}function fe(){}function je(){return!1}function ke(){return Date.now()}function Ae(){return Math.round(Date.now()/1e3)}function Le(){return new Date(Date.now()).toISOString()}function M(){function w(z){return typeof z!="undefined"&&z}try{return typeof globalThis!="undefined"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return w(self)||w(window)||w(this)||{}}}return Vi.exports.default=m,Vi.exports.pino=m,Vi.exports}var Hg=qg();const Kg=za(Hg),mt=[];for(let t=0;t<256;++t)mt.push((t+256).toString(16).slice(1));function zg(t,e=0){return(mt[t[e+0]]+mt[t[e+1]]+mt[t[e+2]]+mt[t[e+3]]+"-"+mt[t[e+4]]+mt[t[e+5]]+"-"+mt[t[e+6]]+mt[t[e+7]]+"-"+mt[t[e+8]]+mt[t[e+9]]+"-"+mt[t[e+10]]+mt[t[e+11]]+mt[t[e+12]]+mt[t[e+13]]+mt[t[e+14]]+mt[t[e+15]]).toLowerCase()}let no;const Gg=new Uint8Array(16);function Wg(){if(!no){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");no=crypto.getRandomValues.bind(crypto)}return no(Gg)}const Jg=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Tl={randomUUID:Jg};function Yg(t,e,n){var r,a,o;if(Tl.randomUUID&&!t)return Tl.randomUUID();t=t||{};const i=(o=(a=t.random)!=null?a:(r=t.rng)==null?void 0:r.call(t))!=null?o:Wg();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,zg(i)}const Xg=4;var zd=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(zd||{});const Qg={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:**"},Gd={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var Wd=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(Wd||{}),et=(t=>(t.TRACE="trace",t.DEBUG="debug",t.INFO="info",t.WARN="warn",t.ERROR="error",t.FATAL="fatal",t))(et||{});const ze={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},Jd={[ze.trace]:"trace",[ze.debug]:"debug",[ze.info]:"info",[ze.warn]:"warn",[ze.error]:"error",[ze.fatal]:"fatal"};var Yd=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(Yd||{}),Xd=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t.UNKNOWN="unknown",t))(Xd||{});function Qd(t){return Object.values(et).includes(String(t).toLowerCase())}class pu extends Error{constructor(e){super(`Invalid log level: ${e}`),this.name="InvalidLogLevelError"}}const _t=class _t{constructor(e){de(this,"instance");de(this,"httpLogger");de(this,"consoleLogger");de(this,"config");var l;this.config=e;const{source:n,levelService:i,metadata:r={},consoleLogger:a,httpLogger:o}=e;(l=_t.root)!=null||(_t.root=_t.createRootLogger(a,o)),_t.mergeGlobalMetadata(r),this.instance=_t.root.child({source:n}),this.consoleLogger=a,this.httpLogger=o,this.setLevel(i.getLevel(n))}static createRootLogger(e,n){return Kg({customLevels:ze,browser:{write:i=>{const{payload:r,options:a,stack:o,...l}=i,d={...l,...r};a.silent||e.print(d,o),d.level>=ze[et.WARN]&&n.save(d)}}})}static mergeGlobalMetadata(e={}){_t.globalMetadata={..._t.globalMetadata,...e}}child(e,n={}){return _t.mergeGlobalMetadata(n),new _t({source:`${this.config.source}:${e}`,levelService:this.config.levelService,consoleLogger:this.consoleLogger,httpLogger:this.httpLogger})}setLevel(e){this.instance.level=e}setMetadata(e){_t.mergeGlobalMetadata(e)}formatLogEntry(e){const{content:n,stack:i,options:r={}}=e,{message:a,args:o=[]}=n,l=Yg(),d={};let h;return a instanceof Error?(d.error={name:a.name,message:a.message,stack:a.stack},h=a.message):h=typeof a=="object"?JSON.stringify(a):String(a),o.forEach((y,v)=>this.formatArg(y,v,d)),{payload:{id:l,msg:h,data:d,..._t.globalMetadata},options:r,stack:i}}formatArg(e,n,i){if(e instanceof Error){const r=i.error?`error${n+1}`:"error";i[r]={message:e.message,stack:e.stack,name:e.name}}else typeof e=="object"&&e!==null?Object.assign(i,e):i[`$${n}`]=String(e)}log(e,n){if(typeof this.instance[e]!="function")throw new pu(e);const i=this.formatLogEntry(n);this.instance[e](i)}trace(e){this.log("trace",e)}debug(e){this.log("debug",e)}info(e){this.log("info",e)}warn(e){this.log("warn",e)}error(e){this.log("error",e)}fatal(e){this.log("fatal",e)}get source(){return this.config.source}};de(_t,"globalMetadata",{}),de(_t,"root",null);let Vo=_t;const Cl={stackExclusionPatterns:/\b(PinoAdapter|ConsoleLogger|LoggerChain|Logger|Proxy|Child|pino\.js)\b/,themes:{dark:{baseStyles:{timestamp:"color: #A9A9A9; font-weight: normal;",source:"color: #B0B0B0; font-weight: normal;",context:"color: #FFFFFF; font-weight: bold;",defaultMessage:"color: #E5E5E5; font-weight: normal;"},levels:{[ze[et.TRACE]]:"color: #778899; font-weight: bold;",[ze[et.DEBUG]]:"color: #008B8B; font-weight: bold;",[ze[et.INFO]]:"color: #00FFFF; font-weight: bold;",[ze[et.WARN]]:"color: #FFD700; font-weight: bold;",[ze[et.ERROR]]:"color: #FF4500; font-weight: bold;",[ze[et.FATAL]]:"color: #FF0000; font-weight: bold; text-shadow: 1px 1px 1px black;"},messages:{[ze[et.WARN]]:"color: #FFD700; font-weight: normal;",[ze[et.ERROR]]:"color: #FF4500; font-weight: normal;",[ze[et.FATAL]]:"color: #FF0000; font-weight: bold;"}},light:{baseStyles:{timestamp:"color: #4D4D4D; font-weight: normal;",source:"color: #666666; font-weight: normal;",context:"color: #000000; font-weight: bold;",defaultMessage:"color: #333333; font-weight: normal;"},levels:{[ze[et.TRACE]]:"color: #6A5ACD; font-weight: bold;",[ze[et.DEBUG]]:"color: #00509E; font-weight: bold;",[ze[et.INFO]]:"color: #1E90FF; font-weight: bold;",[ze[et.WARN]]:"color: #FFA500; font-weight: bold;",[ze[et.ERROR]]:"color: #ff0033; font-weight: bold;",[ze[et.FATAL]]:"color: #D80000; font-weight: bold; text-shadow: 1px 1px 1px #660000;"},messages:{[ze[et.WARN]]:"color: #FFA500; font-weight: normal;",[ze[et.ERROR]]:"color: #ff0033; font-weight: normal;",[ze[et.FATAL]]:"color: #D80000; font-weight: bold;"}}}};class Zg{constructor(){de(this,"theme");this.theme=this.initializeTheme(),this.setupThemeChangeListener()}initializeTheme(){const e=localStorage.getItem("log-theme");return e==="light"||e==="dark"?e:this.detectTheme()}detectTheme(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}setupThemeChangeListener(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{this.theme=e.matches?"dark":"light"})}static setTheme(e){localStorage.setItem("consoleLoggerTheme",e)}formatStack(e){return e.split(`
|
|
29
|
-
`).filter(n=>!
|
|
30
|
-
`)),console.groupEnd()}}const ev={endpoint:`${_i.apiUrls.restV2}/v1/telemetry/logs`,batchSize:500,flushInterval:10,maxRetries:5,retryBackoffFactor:2,maxPayloadSize:500};class mu{constructor(e){de(this,"config");de(this,"isFlushing",!1);de(this,"retryCount",0);de(this,"isFlushScheduled",!1);this.config=e,this.setupUnloadListener()}static create(e){const n={...ev,...e};if(!n.db)throw new Error("Invalid Dixie DB");if(!n.project)throw new Error("Project name is required");return new mu(n)}async save(e){const n=JSON.parse(JSON.stringify(e));await this.config.db.logs.add(n),this.scheduleFlush()}scheduleFlush(e=this.config.flushInterval*1e3){this.isFlushScheduled||this.isFlushing||(this.isFlushScheduled=!0,setTimeout(()=>{this.isFlushScheduled=!1,this.flush()},e))}async flush(){if(this.isFlushing)return;this.isFlushing=!0;let e=!1;try{await this.processLogsBatch(async i=>{await this.sendLogs(i),await this.deleteLogs(i)}),this.retryCount=0,e=!0}catch(i){this.logError("flush",i)}this.isFlushing=!1;const n=await this.hasPendingLogs();!e&&n?this.handleRetry():e&&n&&this.scheduleFlush()}async processLogsBatch(e){const n=await this.getLogsBatch(),i=this.splitLogsByPayloadSize(n);for(const r of i)await e(r)}async getLogsBatch(e=this.config.batchSize){return this.config.db.logs.orderBy("time").limit(e).toArray()}splitLogsByPayloadSize(e){let n=[],i=0;const r=[];return e.forEach(a=>{const o=JSON.stringify(a).length/1024;i+o>this.config.maxPayloadSize&&(r.push(n),n=[],i=0),n.push(a),i+=o}),n.length>0&&r.push(n),r}async sendLogs(e){const n=this.buildPayload(e);await qn({url:this.config.endpoint,method:"POST",body:n})}buildPayload(e){return JSON.stringify({project:this.config.project,logs:e})}async deleteLogs(e){const n=e.map(i=>i.id);await this.config.db.logs.bulkDelete(n)}logError(e,n){console.error(`[${e}]`,n)}handleRetry(){if(this.retryCount>=this.config.maxRetries)return;this.retryCount++;const e=this.config.flushInterval*Math.pow(this.config.retryBackoffFactor,this.retryCount)*1e3;this.scheduleFlush(e)}async hasPendingLogs(){return await this.config.db.logs.count()>0}setupUnloadListener(){window.addEventListener("beforeunload",async()=>{this.isFlushing||!await this.hasPendingLogs()||await this.processLogsBatch(async e=>{const n=this.buildPayload(e);navigator.sendBeacon(this.config.endpoint,n)?await this.deleteLogs(e):console.warn("Failed to send logs via sendBeacon; logs will remain in the database.")})})}}var io={},ro,Rl;function Ga(){if(Rl)return ro;Rl=1;const t="\\\\/",e=`[^${t}]`,n="\\.",i="\\+",r="\\?",a="\\/",o="(?=.)",l="[^/]",d=`(?:${a}|$)`,h=`(?:^|${a})`,m=`${n}{1,2}${d}`,y=`(?!${n})`,v=`(?!${h}${m})`,x=`(?!${n}{0,1}${d})`,_=`(?!${m})`,N=`[^.${a}]`,E=`${l}*?`,V={DOT_LITERAL:n,PLUS_LITERAL:i,QMARK_LITERAL:r,SLASH_LITERAL:a,ONE_CHAR:o,QMARK:l,END_ANCHOR:d,DOTS_SLASH:m,NO_DOT:y,NO_DOTS:v,NO_DOT_SLASH:x,NO_DOTS_SLASH:_,QMARK_NO_DOT:N,STAR:E,START_ANCHOR:h,SEP:"/"},J={...V,SLASH_LITERAL:`[${t}]`,QMARK:e,STAR:`${e}*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`,SEP:"\\"},K={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return ro={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:K,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(Y){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${Y.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(Y){return Y===!0?J:V}},ro}var Fl;function Wa(){return Fl||(Fl=1,function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:r}=Ga();t.isObject=a=>a!==null&&typeof a=="object"&&!Array.isArray(a),t.hasRegexChars=a=>i.test(a),t.isRegexChar=a=>a.length===1&&t.hasRegexChars(a),t.escapeRegex=a=>a.replace(r,"\\$1"),t.toPosixSlashes=a=>a.replace(e,"/"),t.isWindows=()=>{if(typeof navigator!="undefined"&&navigator.platform){const a=navigator.platform.toLowerCase();return a==="win32"||a==="windows"}return typeof process!="undefined"&&process.platform?process.platform==="win32":!1},t.removeBackslashes=a=>a.replace(n,o=>o==="\\"?"":o),t.escapeLast=(a,o,l)=>{const d=a.lastIndexOf(o,l);return d===-1?a:a[d-1]==="\\"?t.escapeLast(a,o,d-1):`${a.slice(0,d)}\\${a.slice(d)}`},t.removePrefix=(a,o={})=>{let l=a;return l.startsWith("./")&&(l=l.slice(2),o.prefix="./"),l},t.wrapOutput=(a,o={},l={})=>{const d=l.contains?"":"^",h=l.contains?"":"$";let m=`${d}(?:${a})${h}`;return o.negated===!0&&(m=`(?:^(?!${m}).*$)`),m},t.basename=(a,{windows:o}={})=>{const l=a.split(o?/[\\/]/:"/"),d=l[l.length-1];return d===""?l[l.length-2]:d}}(io)),io}var ao,Dl;function tv(){if(Dl)return ao;Dl=1;const t=Wa(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:i,CHAR_COMMA:r,CHAR_DOT:a,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:d,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:m,CHAR_PLUS:y,CHAR_QUESTION_MARK:v,CHAR_RIGHT_CURLY_BRACE:x,CHAR_RIGHT_PARENTHESES:_,CHAR_RIGHT_SQUARE_BRACKET:N}=Ga(),E=J=>J===l||J===i,F=J=>{J.isPrefix!==!0&&(J.depth=J.isGlobstar?1/0:1)};return ao=(J,K)=>{const Y=K||{},X=J.length-1,ne=Y.parts===!0||Y.scanToEnd===!0,ye=[],fe=[],je=[];let ke=J,Ae=-1,Le=0,M=0,w=!1,z=!1,Q=!1,ae=!1,te=!1,j=!1,Oe=!1,Re=!1,Ke=!1,I=!1,q=0,ot,ge,Fe={value:"",depth:0,isGlob:!1};const he=()=>Ae>=X,Ge=()=>ke.charCodeAt(Ae+1),qe=()=>(ot=ge,ke.charCodeAt(++Ae));for(;Ae<X;){ge=qe();let ut;if(ge===i){Oe=Fe.backslashes=!0,ge=qe(),ge===d&&(j=!0);continue}if(j===!0||ge===d){for(q++;he()!==!0&&(ge=qe());){if(ge===i){Oe=Fe.backslashes=!0,qe();continue}if(ge===d){q++;continue}if(j!==!0&&ge===a&&(ge=qe())===a){if(w=Fe.isBrace=!0,Q=Fe.isGlob=!0,I=!0,ne===!0)continue;break}if(j!==!0&&ge===r){if(w=Fe.isBrace=!0,Q=Fe.isGlob=!0,I=!0,ne===!0)continue;break}if(ge===x&&(q--,q===0)){j=!1,w=Fe.isBrace=!0,I=!0;break}}if(ne===!0)continue;break}if(ge===l){if(ye.push(Ae),fe.push(Fe),Fe={value:"",depth:0,isGlob:!1},I===!0)continue;if(ot===a&&Ae===Le+1){Le+=2;continue}M=Ae+1;continue}if(Y.noext!==!0&&(ge===y||ge===n||ge===e||ge===v||ge===o)===!0&&Ge()===h){if(Q=Fe.isGlob=!0,ae=Fe.isExtglob=!0,I=!0,ge===o&&Ae===Le&&(Ke=!0),ne===!0){for(;he()!==!0&&(ge=qe());){if(ge===i){Oe=Fe.backslashes=!0,ge=qe();continue}if(ge===_){Q=Fe.isGlob=!0,I=!0;break}}continue}break}if(ge===e){if(ot===e&&(te=Fe.isGlobstar=!0),Q=Fe.isGlob=!0,I=!0,ne===!0)continue;break}if(ge===v){if(Q=Fe.isGlob=!0,I=!0,ne===!0)continue;break}if(ge===m){for(;he()!==!0&&(ut=qe());){if(ut===i){Oe=Fe.backslashes=!0,qe();continue}if(ut===N){z=Fe.isBracket=!0,Q=Fe.isGlob=!0,I=!0;break}}if(ne===!0)continue;break}if(Y.nonegate!==!0&&ge===o&&Ae===Le){Re=Fe.negated=!0,Le++;continue}if(Y.noparen!==!0&&ge===h){if(Q=Fe.isGlob=!0,ne===!0){for(;he()!==!0&&(ge=qe());){if(ge===h){Oe=Fe.backslashes=!0,ge=qe();continue}if(ge===_){I=!0;break}}continue}break}if(Q===!0){if(I=!0,ne===!0)continue;break}}Y.noext===!0&&(ae=!1,Q=!1);let Se=ke,pt="",nt="";Le>0&&(pt=ke.slice(0,Le),ke=ke.slice(Le),M-=Le),Se&&Q===!0&&M>0?(Se=ke.slice(0,M),nt=ke.slice(M)):Q===!0?(Se="",nt=ke):Se=ke,Se&&Se!==""&&Se!=="/"&&Se!==ke&&E(Se.charCodeAt(Se.length-1))&&(Se=Se.slice(0,-1)),Y.unescape===!0&&(nt&&(nt=t.removeBackslashes(nt)),Se&&Oe===!0&&(Se=t.removeBackslashes(Se)));const _e={prefix:pt,input:J,start:Le,base:Se,glob:nt,isBrace:w,isBracket:z,isGlob:Q,isExtglob:ae,isGlobstar:te,negated:Re,negatedExtglob:Ke};if(Y.tokens===!0&&(_e.maxDepth=0,E(ge)||fe.push(Fe),_e.tokens=fe),Y.parts===!0||Y.tokens===!0){let ut;for(let Xe=0;Xe<ye.length;Xe++){const ue=ut?ut+1:Le,He=ye[Xe],ie=J.slice(ue,He);Y.tokens&&(Xe===0&&Le!==0?(fe[Xe].isPrefix=!0,fe[Xe].value=pt):fe[Xe].value=ie,F(fe[Xe]),_e.maxDepth+=fe[Xe].depth),(Xe!==0||ie!=="")&&je.push(ie),ut=He}if(ut&&ut+1<J.length){const Xe=J.slice(ut+1);je.push(Xe),Y.tokens&&(fe[fe.length-1].value=Xe,F(fe[fe.length-1]),_e.maxDepth+=fe[fe.length-1].depth)}_e.slashes=ye,_e.parts=je}return _e},ao}var so,Il;function nv(){if(Il)return so;Il=1;const t=Ga(),e=Wa(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:i,REGEX_NON_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_BACKREF:a,REPLACEMENTS:o}=t,l=(m,y)=>{if(typeof y.expandRange=="function")return y.expandRange(...m,y);m.sort();const v=`[${m.join("-")}]`;try{new RegExp(v)}catch{return m.map(_=>e.escapeRegex(_)).join("..")}return v},d=(m,y)=>`Missing ${m}: "${y}" - use "\\\\${y}" to match literal characters`,h=(m,y)=>{if(typeof m!="string")throw new TypeError("Expected a string");m=o[m]||m;const v={...y},x=typeof v.maxLength=="number"?Math.min(n,v.maxLength):n;let _=m.length;if(_>x)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${x}`);const N={type:"bos",value:"",output:v.prepend||""},E=[N],F=v.capture?"":"?:",V=t.globChars(v.windows),J=t.extglobChars(V),{DOT_LITERAL:K,PLUS_LITERAL:Y,SLASH_LITERAL:X,ONE_CHAR:ne,DOTS_SLASH:ye,NO_DOT:fe,NO_DOT_SLASH:je,NO_DOTS_SLASH:ke,QMARK:Ae,QMARK_NO_DOT:Le,STAR:M,START_ANCHOR:w}=V,z=ue=>`(${F}(?:(?!${w}${ue.dot?ye:K}).)*?)`,Q=v.dot?"":fe,ae=v.dot?Ae:Le;let te=v.bash===!0?z(v):M;v.capture&&(te=`(${te})`),typeof v.noext=="boolean"&&(v.noextglob=v.noext);const j={input:m,index:-1,start:0,dot:v.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:E};m=e.removePrefix(m,j),_=m.length;const Oe=[],Re=[],Ke=[];let I=N,q;const ot=()=>j.index===_-1,ge=j.peek=(ue=1)=>m[j.index+ue],Fe=j.advance=()=>m[++j.index]||"",he=()=>m.slice(j.index+1),Ge=(ue="",He=0)=>{j.consumed+=ue,j.index+=He},qe=ue=>{j.output+=ue.output!=null?ue.output:ue.value,Ge(ue.value)},Se=()=>{let ue=1;for(;ge()==="!"&&(ge(2)!=="("||ge(3)==="?");)Fe(),j.start++,ue++;return ue%2===0?!1:(j.negated=!0,j.start++,!0)},pt=ue=>{j[ue]++,Ke.push(ue)},nt=ue=>{j[ue]--,Ke.pop()},_e=ue=>{if(I.type==="globstar"){const He=j.braces>0&&(ue.type==="comma"||ue.type==="brace"),ie=ue.extglob===!0||Oe.length&&(ue.type==="pipe"||ue.type==="paren");ue.type!=="slash"&&ue.type!=="paren"&&!He&&!ie&&(j.output=j.output.slice(0,-I.output.length),I.type="star",I.value="*",I.output=te,j.output+=I.output)}if(Oe.length&&ue.type!=="paren"&&(Oe[Oe.length-1].inner+=ue.value),(ue.value||ue.output)&&qe(ue),I&&I.type==="text"&&ue.type==="text"){I.output=(I.output||I.value)+ue.value,I.value+=ue.value;return}ue.prev=I,E.push(ue),I=ue},ut=(ue,He)=>{const ie={...J[He],conditions:1,inner:""};ie.prev=I,ie.parens=j.parens,ie.output=j.output;const Ee=(v.capture?"(":"")+ie.open;pt("parens"),_e({type:ue,value:He,output:j.output?"":ne}),_e({type:"paren",extglob:!0,value:Fe(),output:Ee}),Oe.push(ie)},Xe=ue=>{let He=ue.close+(v.capture?")":""),ie;if(ue.type==="negate"){let Ee=te;if(ue.inner&&ue.inner.length>1&&ue.inner.includes("/")&&(Ee=z(v)),(Ee!==te||ot()||/^\)+$/.test(he()))&&(He=ue.close=`)$))${Ee}`),ue.inner.includes("*")&&(ie=he())&&/^\.[^\\/.]+$/.test(ie)){const We=h(ie,{...y,fastpaths:!1}).output;He=ue.close=`)${We})${Ee})`}ue.prev.type==="bos"&&(j.negatedExtglob=!0)}_e({type:"paren",extglob:!0,value:q,output:He}),nt("parens")};if(v.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(m)){let ue=!1,He=m.replace(a,(ie,Ee,We,it,tt,tn)=>it==="\\"?(ue=!0,ie):it==="?"?Ee?Ee+it+(tt?Ae.repeat(tt.length):""):tn===0?ae+(tt?Ae.repeat(tt.length):""):Ae.repeat(We.length):it==="."?K.repeat(We.length):it==="*"?Ee?Ee+it+(tt?te:""):te:Ee?ie:`\\${ie}`);return ue===!0&&(v.unescape===!0?He=He.replace(/\\/g,""):He=He.replace(/\\+/g,ie=>ie.length%2===0?"\\\\":ie?"\\":"")),He===m&&v.contains===!0?(j.output=m,j):(j.output=e.wrapOutput(He,j,y),j)}for(;!ot();){if(q=Fe(),q==="\0")continue;if(q==="\\"){const ie=ge();if(ie==="/"&&v.bash!==!0||ie==="."||ie===";")continue;if(!ie){q+="\\",_e({type:"text",value:q});continue}const Ee=/^\\+/.exec(he());let We=0;if(Ee&&Ee[0].length>2&&(We=Ee[0].length,j.index+=We,We%2!==0&&(q+="\\")),v.unescape===!0?q=Fe():q+=Fe(),j.brackets===0){_e({type:"text",value:q});continue}}if(j.brackets>0&&(q!=="]"||I.value==="["||I.value==="[^")){if(v.posix!==!1&&q===":"){const ie=I.value.slice(1);if(ie.includes("[")&&(I.posix=!0,ie.includes(":"))){const Ee=I.value.lastIndexOf("["),We=I.value.slice(0,Ee),it=I.value.slice(Ee+2),tt=i[it];if(tt){I.value=We+tt,j.backtrack=!0,Fe(),!N.output&&E.indexOf(I)===1&&(N.output=ne);continue}}}(q==="["&&ge()!==":"||q==="-"&&ge()==="]")&&(q=`\\${q}`),q==="]"&&(I.value==="["||I.value==="[^")&&(q=`\\${q}`),v.posix===!0&&q==="!"&&I.value==="["&&(q="^"),I.value+=q,qe({value:q});continue}if(j.quotes===1&&q!=='"'){q=e.escapeRegex(q),I.value+=q,qe({value:q});continue}if(q==='"'){j.quotes=j.quotes===1?0:1,v.keepQuotes===!0&&_e({type:"text",value:q});continue}if(q==="("){pt("parens"),_e({type:"paren",value:q});continue}if(q===")"){if(j.parens===0&&v.strictBrackets===!0)throw new SyntaxError(d("opening","("));const ie=Oe[Oe.length-1];if(ie&&j.parens===ie.parens+1){Xe(Oe.pop());continue}_e({type:"paren",value:q,output:j.parens?")":"\\)"}),nt("parens");continue}if(q==="["){if(v.nobracket===!0||!he().includes("]")){if(v.nobracket!==!0&&v.strictBrackets===!0)throw new SyntaxError(d("closing","]"));q=`\\${q}`}else pt("brackets");_e({type:"bracket",value:q});continue}if(q==="]"){if(v.nobracket===!0||I&&I.type==="bracket"&&I.value.length===1){_e({type:"text",value:q,output:`\\${q}`});continue}if(j.brackets===0){if(v.strictBrackets===!0)throw new SyntaxError(d("opening","["));_e({type:"text",value:q,output:`\\${q}`});continue}nt("brackets");const ie=I.value.slice(1);if(I.posix!==!0&&ie[0]==="^"&&!ie.includes("/")&&(q=`/${q}`),I.value+=q,qe({value:q}),v.literalBrackets===!1||e.hasRegexChars(ie))continue;const Ee=e.escapeRegex(I.value);if(j.output=j.output.slice(0,-I.value.length),v.literalBrackets===!0){j.output+=Ee,I.value=Ee;continue}I.value=`(${F}${Ee}|${I.value})`,j.output+=I.value;continue}if(q==="{"&&v.nobrace!==!0){pt("braces");const ie={type:"brace",value:q,output:"(",outputIndex:j.output.length,tokensIndex:j.tokens.length};Re.push(ie),_e(ie);continue}if(q==="}"){const ie=Re[Re.length-1];if(v.nobrace===!0||!ie){_e({type:"text",value:q,output:q});continue}let Ee=")";if(ie.dots===!0){const We=E.slice(),it=[];for(let tt=We.length-1;tt>=0&&(E.pop(),We[tt].type!=="brace");tt--)We[tt].type!=="dots"&&it.unshift(We[tt].value);Ee=l(it,v),j.backtrack=!0}if(ie.comma!==!0&&ie.dots!==!0){const We=j.output.slice(0,ie.outputIndex),it=j.tokens.slice(ie.tokensIndex);ie.value=ie.output="\\{",q=Ee="\\}",j.output=We;for(const tt of it)j.output+=tt.output||tt.value}_e({type:"brace",value:q,output:Ee}),nt("braces"),Re.pop();continue}if(q==="|"){Oe.length>0&&Oe[Oe.length-1].conditions++,_e({type:"text",value:q});continue}if(q===","){let ie=q;const Ee=Re[Re.length-1];Ee&&Ke[Ke.length-1]==="braces"&&(Ee.comma=!0,ie="|"),_e({type:"comma",value:q,output:ie});continue}if(q==="/"){if(I.type==="dot"&&j.index===j.start+1){j.start=j.index+1,j.consumed="",j.output="",E.pop(),I=N;continue}_e({type:"slash",value:q,output:X});continue}if(q==="."){if(j.braces>0&&I.type==="dot"){I.value==="."&&(I.output=K);const ie=Re[Re.length-1];I.type="dots",I.output+=q,I.value+=q,ie.dots=!0;continue}if(j.braces+j.parens===0&&I.type!=="bos"&&I.type!=="slash"){_e({type:"text",value:q,output:K});continue}_e({type:"dot",value:q,output:K});continue}if(q==="?"){if(!(I&&I.value==="(")&&v.noextglob!==!0&&ge()==="("&&ge(2)!=="?"){ut("qmark",q);continue}if(I&&I.type==="paren"){const Ee=ge();let We=q;(I.value==="("&&!/[!=<:]/.test(Ee)||Ee==="<"&&!/<([!=]|\w+>)/.test(he()))&&(We=`\\${q}`),_e({type:"text",value:q,output:We});continue}if(v.dot!==!0&&(I.type==="slash"||I.type==="bos")){_e({type:"qmark",value:q,output:Le});continue}_e({type:"qmark",value:q,output:Ae});continue}if(q==="!"){if(v.noextglob!==!0&&ge()==="("&&(ge(2)!=="?"||!/[!=<:]/.test(ge(3)))){ut("negate",q);continue}if(v.nonegate!==!0&&j.index===0){Se();continue}}if(q==="+"){if(v.noextglob!==!0&&ge()==="("&&ge(2)!=="?"){ut("plus",q);continue}if(I&&I.value==="("||v.regex===!1){_e({type:"plus",value:q,output:Y});continue}if(I&&(I.type==="bracket"||I.type==="paren"||I.type==="brace")||j.parens>0){_e({type:"plus",value:q});continue}_e({type:"plus",value:Y});continue}if(q==="@"){if(v.noextglob!==!0&&ge()==="("&&ge(2)!=="?"){_e({type:"at",extglob:!0,value:q,output:""});continue}_e({type:"text",value:q});continue}if(q!=="*"){(q==="$"||q==="^")&&(q=`\\${q}`);const ie=r.exec(he());ie&&(q+=ie[0],j.index+=ie[0].length),_e({type:"text",value:q});continue}if(I&&(I.type==="globstar"||I.star===!0)){I.type="star",I.star=!0,I.value+=q,I.output=te,j.backtrack=!0,j.globstar=!0,Ge(q);continue}let ue=he();if(v.noextglob!==!0&&/^\([^?]/.test(ue)){ut("star",q);continue}if(I.type==="star"){if(v.noglobstar===!0){Ge(q);continue}const ie=I.prev,Ee=ie.prev,We=ie.type==="slash"||ie.type==="bos",it=Ee&&(Ee.type==="star"||Ee.type==="globstar");if(v.bash===!0&&(!We||ue[0]&&ue[0]!=="/")){_e({type:"star",value:q,output:""});continue}const tt=j.braces>0&&(ie.type==="comma"||ie.type==="brace"),tn=Oe.length&&(ie.type==="pipe"||ie.type==="paren");if(!We&&ie.type!=="paren"&&!tt&&!tn){_e({type:"star",value:q,output:""});continue}for(;ue.slice(0,3)==="/**";){const Dt=m[j.index+4];if(Dt&&Dt!=="/")break;ue=ue.slice(3),Ge("/**",3)}if(ie.type==="bos"&&ot()){I.type="globstar",I.value+=q,I.output=z(v),j.output=I.output,j.globstar=!0,Ge(q);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&!it&&ot()){j.output=j.output.slice(0,-(ie.output+I.output).length),ie.output=`(?:${ie.output}`,I.type="globstar",I.output=z(v)+(v.strictSlashes?")":"|$)"),I.value+=q,j.globstar=!0,j.output+=ie.output+I.output,Ge(q);continue}if(ie.type==="slash"&&ie.prev.type!=="bos"&&ue[0]==="/"){const Dt=ue[1]!==void 0?"|$":"";j.output=j.output.slice(0,-(ie.output+I.output).length),ie.output=`(?:${ie.output}`,I.type="globstar",I.output=`${z(v)}${X}|${X}${Dt})`,I.value+=q,j.output+=ie.output+I.output,j.globstar=!0,Ge(q+Fe()),_e({type:"slash",value:"/",output:""});continue}if(ie.type==="bos"&&ue[0]==="/"){I.type="globstar",I.value+=q,I.output=`(?:^|${X}|${z(v)}${X})`,j.output=I.output,j.globstar=!0,Ge(q+Fe()),_e({type:"slash",value:"/",output:""});continue}j.output=j.output.slice(0,-I.output.length),I.type="globstar",I.output=z(v),I.value+=q,j.output+=I.output,j.globstar=!0,Ge(q);continue}const He={type:"star",value:q,output:te};if(v.bash===!0){He.output=".*?",(I.type==="bos"||I.type==="slash")&&(He.output=Q+He.output),_e(He);continue}if(I&&(I.type==="bracket"||I.type==="paren")&&v.regex===!0){He.output=q,_e(He);continue}(j.index===j.start||I.type==="slash"||I.type==="dot")&&(I.type==="dot"?(j.output+=je,I.output+=je):v.dot===!0?(j.output+=ke,I.output+=ke):(j.output+=Q,I.output+=Q),ge()!=="*"&&(j.output+=ne,I.output+=ne)),_e(He)}for(;j.brackets>0;){if(v.strictBrackets===!0)throw new SyntaxError(d("closing","]"));j.output=e.escapeLast(j.output,"["),nt("brackets")}for(;j.parens>0;){if(v.strictBrackets===!0)throw new SyntaxError(d("closing",")"));j.output=e.escapeLast(j.output,"("),nt("parens")}for(;j.braces>0;){if(v.strictBrackets===!0)throw new SyntaxError(d("closing","}"));j.output=e.escapeLast(j.output,"{"),nt("braces")}if(v.strictSlashes!==!0&&(I.type==="star"||I.type==="bracket")&&_e({type:"maybe_slash",value:"",output:`${X}?`}),j.backtrack===!0){j.output="";for(const ue of j.tokens)j.output+=ue.output!=null?ue.output:ue.value,ue.suffix&&(j.output+=ue.suffix)}return j};return h.fastpaths=(m,y)=>{const v={...y},x=typeof v.maxLength=="number"?Math.min(n,v.maxLength):n,_=m.length;if(_>x)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${x}`);m=o[m]||m;const{DOT_LITERAL:N,SLASH_LITERAL:E,ONE_CHAR:F,DOTS_SLASH:V,NO_DOT:J,NO_DOTS:K,NO_DOTS_SLASH:Y,STAR:X,START_ANCHOR:ne}=t.globChars(v.windows),ye=v.dot?K:J,fe=v.dot?Y:J,je=v.capture?"":"?:",ke={negated:!1,prefix:""};let Ae=v.bash===!0?".*?":X;v.capture&&(Ae=`(${Ae})`);const Le=Q=>Q.noglobstar===!0?Ae:`(${je}(?:(?!${ne}${Q.dot?V:N}).)*?)`,M=Q=>{switch(Q){case"*":return`${ye}${F}${Ae}`;case".*":return`${N}${F}${Ae}`;case"*.*":return`${ye}${Ae}${N}${F}${Ae}`;case"*/*":return`${ye}${Ae}${E}${F}${fe}${Ae}`;case"**":return ye+Le(v);case"**/*":return`(?:${ye}${Le(v)}${E})?${fe}${F}${Ae}`;case"**/*.*":return`(?:${ye}${Le(v)}${E})?${fe}${Ae}${N}${F}${Ae}`;case"**/.*":return`(?:${ye}${Le(v)}${E})?${N}${F}${Ae}`;default:{const ae=/^(.*?)\.(\w+)$/.exec(Q);if(!ae)return;const te=M(ae[1]);return te?te+N+ae[2]:void 0}}},w=e.removePrefix(m,ke);let z=M(w);return z&&v.strictSlashes!==!0&&(z+=`${E}?`),z},so=h,so}var oo,Pl;function iv(){if(Pl)return oo;Pl=1;const t=tv(),e=nv(),n=Wa(),i=Ga(),r=o=>o&&typeof o=="object"&&!Array.isArray(o),a=(o,l,d=!1)=>{if(Array.isArray(o)){const E=o.map(V=>a(V,l,d));return V=>{for(const J of E){const K=J(V);if(K)return K}return!1}}const h=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!h)throw new TypeError("Expected pattern to be a non-empty string");const m=l||{},y=m.windows,v=h?a.compileRe(o,l):a.makeRe(o,l,!1,!0),x=v.state;delete v.state;let _=()=>!1;if(m.ignore){const E={...l,ignore:null,onMatch:null,onResult:null};_=a(m.ignore,E,d)}const N=(E,F=!1)=>{const{isMatch:V,match:J,output:K}=a.test(E,v,l,{glob:o,posix:y}),Y={glob:o,state:x,regex:v,posix:y,input:E,output:K,match:J,isMatch:V};return typeof m.onResult=="function"&&m.onResult(Y),V===!1?(Y.isMatch=!1,F?Y:!1):_(E)?(typeof m.onIgnore=="function"&&m.onIgnore(Y),Y.isMatch=!1,F?Y:!1):(typeof m.onMatch=="function"&&m.onMatch(Y),F?Y:!0)};return d&&(N.state=x),N};return a.test=(o,l,d,{glob:h,posix:m}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};const y=d||{},v=y.format||(m?n.toPosixSlashes:null);let x=o===h,_=x&&v?v(o):o;return x===!1&&(_=v?v(o):o,x=_===h),(x===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?x=a.matchBase(o,l,d,m):x=l.exec(_)),{isMatch:!!x,match:x,output:_}},a.matchBase=(o,l,d)=>(l instanceof RegExp?l:a.makeRe(l,d)).test(n.basename(o)),a.isMatch=(o,l,d)=>a(l,d)(o),a.parse=(o,l)=>Array.isArray(o)?o.map(d=>a.parse(d,l)):e(o,{...l,fastpaths:!1}),a.scan=(o,l)=>t(o,l),a.compileRe=(o,l,d=!1,h=!1)=>{if(d===!0)return o.output;const m=l||{},y=m.contains?"":"^",v=m.contains?"":"$";let x=`${y}(?:${o.output})${v}`;o&&o.negated===!0&&(x=`^(?!${x}).*$`);const _=a.toRegex(x,l);return h===!0&&(_.state=o),_},a.makeRe=(o,l={},d=!1,h=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let m={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(m.output=e.fastpaths(o,l)),m.output||(m=e(o,l)),a.compileRe(m,l,d,h)},a.toRegex=(o,l)=>{try{const d=l||{};return new RegExp(o,d.flags||(d.nocase?"i":""))}catch(d){if(l&&l.debug===!0)throw d;return/$^/}},a.constants=i,oo=a,oo}var uo,Ll;function rv(){if(Ll)return uo;Ll=1;const t=iv(),e=Wa();function n(i,r,a=!1){return r&&(r.windows===null||r.windows===void 0)&&(r={...r,windows:e.isWindows()}),t(i,r,a)}return Object.assign(n,t),uo=n,uo}var av=rv();const $l=za(av),Ml="loglevel-patterns",Yr="loglevel:",lo="!",sv=et.INFO;class ov{constructor(e){de(this,"projectPrefix");de(this,"patternsCache",null);this.projectPrefix=`${Yr}${e}:`}getLevel(e){const n=this.loadAndUnifyPatterns();return this.resolveLogLevelFromPatterns(e,n)||sv}setLevel(e,n){const{level:i,override:r}=this.parseLogLevel(n),a=`${Yr}${e}`,o=r?`${i}${lo}`:i;localStorage.setItem(a,o),this.patternsCache=null}loadAndUnifyPatterns(){if(this.patternsCache)return this.patternsCache;const e=this.readPatternsFromJSON(),n=this.unifyWithIndividualKeys(e);return this.patternsCache=n,n}resolveLogLevelFromPatterns(e,n){let i;for(const[r,{level:a,override:o}]of Object.entries(n))if($l(r.toLowerCase())(e.toLowerCase())){if(o)return a;(!i||$l(r)(e))&&(i=a)}return i}readPatternsFromJSON(){try{const e=localStorage.getItem(Ml);return e?JSON.parse(e):{}}catch{return console.error("Failed to parse loglevel-patterns from localStorage"),{}}}unifyWithIndividualKeys(e){const n={...e};for(let i=0;i<localStorage.length;i++){const r=localStorage.key(i);if(!r||!r.startsWith(Yr)||r===Ml)continue;const a=r.replace(Yr,"").toLowerCase(),o=localStorage.getItem(r);if(!o)continue;const{level:l,override:d}=this.parseLogLevel(o);n[a]={level:l,override:d}}return n}parseLogLevel(e){const n=e.endsWith(lo),i=n?e.slice(0,-lo.length):e;if(!Qd(i))throw new pu(i);return{level:i,override:n}}}class uv{constructor(e,n){de(this,"committed",!1);de(this,"chainOptions",{});de(this,"method",null);de(this,"stack","");de(this,"args",[]);this.adapter=e,n&&(this.chainOptions={...n}),Promise.resolve().then(()=>this.commit())}options(e){return this.chainOptions={...this.chainOptions,...e},this}trace(...e){return this.log("trace",e)}debug(...e){return this.log("debug",e)}info(...e){return this.log("info",e)}warn(...e){return this.log("warn",e)}error(...e){return this.log("error",e)}fatal(...e){return this.log("fatal",e)}log(e,n){var i;return this.method=e,this.args=n,this.stack=(i=new Error().stack)!=null?i:"",this}commit(){if(!this.committed&&(this.committed=!0,this.method)){const e=this.args[0],n=this.args.slice(1),i={stack:this.stack,content:{message:e,args:n},options:this.chainOptions};this.adapter[this.method](i)}}}let Zd=class qo{constructor(e){de(this,"adapter");this.adapter=e}static create(e){const n=new qo(e);return n.setMetadata({account:null,client:of()}),n}child(e,n={}){return new qo(this.adapter.child(e,n))}lazyChild(e,n={}){let i;return new Proxy({},{get:(r,a,o)=>(i||(i=this.child(e,n)),Reflect.get(i,a,o))})}setMetadata(e){this.adapter.setMetadata(e)}setLevel(e){if(!Qd(e))throw new pu(e);this.adapter.setLevel(e)}createChain(e){return new uv(this.adapter,e)}trace(...e){return this.createChain().trace(...e)}debug(...e){return this.createChain().debug(...e)}info(...e){return this.createChain().info(...e)}warn(...e){return this.createChain().warn(...e)}error(...e){return this.createChain().error(...e)}fatal(...e){return this.createChain().fatal(...e)}options(e){return this.createChain(e)}};function lv(t){return Zn().logger.lazyChild(t)}function ef(t,e){return Zd.create(new Vo({source:t,levelService:new ov(t),consoleLogger:new Zg,httpLogger:mu.create({db:e,project:t})}))}const cv="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let dv=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=cv[n[t]&63];return e};const ka=(t=8)=>dv(t),tf=(t,e=!1)=>{const n=Object.entries(t).reduce((i,[r,a])=>a!==void 0&&(!e||a!==null)?`${i}${i?"&":""}${r}=${a}`:i,"");return n?`?${n}`:""},nf=t=>{const e=document.getElementById(t);return e?new URL(e.src).searchParams:new URLSearchParams};function fv(){const t=new Error().stack.split(`
|
|
31
|
-
`);return t.length<3?"":t[2].trim().substring(3)}function hv(t){return new Promise(e=>setTimeout(e,t))}const Pt=class Pt{constructor(){de(this,"projectName","nizza");de(this,"instanceId",ka());de(this,"nizzaDB",new Ug);de(this,"logger",ef(this.projectName,this.nizzaDB));de(this,"coreLogger",this.logger.child("core"));de(this,"_logger",this.coreLogger.child("NizzaStore"));de(this,"_config",null);de(this,"_account");de(this,"_accountStatus","idle");de(this,"_productDataSource");de(this,"_eventBus",new Kd("nizza",this.coreLogger));de(this,"activeAccountFetchId",null);gg(this,{_config:st,_account:st,_productDataSource:st,_accountStatus:st,config:_n,account:_n,accountName:_n,accountStatus:_n,setAccount:xt,configure:xt,refetchAccount:xt,setProductDataSource:xt,setAddToCartConfig:xt,setProductId:xt},{name:"NizzaStore",autoBind:!0}),this.refetchAccount=this.refetchAccount.bind(this)}static instance(){var n;if(!!((n=window==null?void 0:window.nizza)!=null&&n.store))Pt._instance=window.nizza.store;else{const i=new Pt;Pt._instance=i,Pt._instance._logger.debug("Created new NizzaStore instance")}return window.nizza||(window.nizza={},window.nz={},Pt._instance._logger.debug("Initialized nizza window object")),window.nizza.store=Pt._instance,window.nz=window.nizza,Pt._instance}async configure(e){try{this._logger.debug("Running configure with config:",e),await this.updateConfig(e)}catch(n){this.setAccountStatus("error"),this._logger.error("Error running configure",n)}}async updateConfig(e={}){var r,a;const{account:n,authToken:i}=(r=this._config)!=null?r:{};this._config={...this._config,...e},(a=this._config)!=null&&a.account&&(n!==this._config.account||i!==this._config.authToken)?(this._logger.debug(`Fetching account data for account: ${this._config.account}, authToken provided: ${!!this._config.authToken}`),this.logger.setMetadata({account:this._config.account}),await this.fetchAccount(this._config.account,this._config.authToken)):this._logger.debug("Skipped fetching account data as the account or authToken did not change"),e.getProductDataSource&&this.setProductDataSource(await e.getProductDataSource())}async fetchAccount(e,n){this.setAccountStatus("loading");const i=ka();this.activeAccountFetchId=i;try{const r=await _f(e,n);if(this.activeAccountFetchId!==i){this._logger.debug("Fetch account request was superseded by a newer request");return}this.setAccount(r),this.setAccountStatus("success"),this._logger.debug("Account fetched and set successfully:",r)}catch(r){this.activeAccountFetchId===i&&(this.setAccountStatus("error"),r instanceof gu?this._logger.fatal("Nizza account not found",e).options({silent:!0}):this._logger.fatal("Unexpected error fetching account",r))}}setAccount(e){this._account=e}setAccountStatus(e){this._accountStatus=e}setProductDataSource(e){this._productDataSource=e}setProductId(e){this._config&&(this._config.productId=e)}setOrderFormId(e){this._config&&(this._config.orderFormId=e)}setAddToCartConfig(e){if(!this._config){const n="You cannot set addToCartConfig before running configure()";throw this._logger.error(n),new Error(n)}this._config.addToCartConfig=e}setAuthToken(e){this.updateConfig({authToken:e})}async refetchAccount(){var e;(e=this._config)!=null&&e.account&&await this.fetchAccount(this._config.account,this._config.authToken)}get version(){return Pt.version}get config(){return this._config}get account(){return this._account}get accountStatus(){return this._accountStatus}get accountName(){var e;return(e=this._config)==null?void 0:e.account}isPvtAccount(e){var n;return!!(e&&((n=this._config)!=null&&n.authToken))}isPubAccount(e){var n;return!!(e&&!((n=this._config)!=null&&n.authToken))}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};de(Pt,"version","9"),de(Pt,"_instance");let _a=Pt;const Zn=t=>{const e=_a.instance();return fg(()=>!!e.account,()=>t==null?void 0:t(e)),e};function rf(){return Pe.useMemo(()=>Zn(),[])}function af(t,e){const n=rf();return qd(()=>t(n),e)}const{coreLogger:pv}=Zn(),mv=pv.child("getClientTimeZone");function sf(t=!1){var a,o,l;let e=null,n=null,i=null;try{e=(l=(o=(a=Intl.DateTimeFormat())==null?void 0:a.resolvedOptions())==null?void 0:o.timeZone)!=null?l:null;const d=-new Date().getTimezoneOffset();i=d;const h=d>=0?"+":"-",m=String(Math.floor(Math.abs(d)/60)).padStart(2,"0"),y=String(Math.abs(d)%60).padStart(2,"0");n=`${h}${m}:${y}`}catch(d){mv.error("Error obtaining time zone or offset",d)}const r={offset:n,offsetValue:i,value:e,country:null,included:null,label:null};if(t){const{country:d,included:h,label:m,...y}=r;return y}return r}function of(){const t=typeof navigator!="undefined",e=t?navigator.userAgent:"server",{browser:n,os:i,device:r}=gv(e),a=t?navigator.language:"server",o=t&&navigator.languages?navigator.languages:[],l=typeof window!="undefined"&&window.screen?{width:window.screen.width,height:window.screen.height,colorDepth:window.screen.colorDepth}:null,d=t&&"connection"in navigator?{downlink:navigator.connection.downlink,effectiveType:navigator.connection.effectiveType,rtt:navigator.connection.rtt,saveData:navigator.connection.saveData}:null,h=t?navigator.hardwareConcurrency:null,m=t&&"deviceMemory"in navigator?navigator.deviceMemory:null,y=sf(!0);return{userAgent:e,browser:n,os:i,device:r,language:a,languages:o,screen:l,connection:d,hardwareConcurrency:h,deviceMemory:m,timezone:y}}function gv(t){var i;const e={browser:[{name:"Edge",regex:/Edg\/([\d.]+)/},{name:"Chrome",regex:/Chrome\/([\d.]+)/},{name:"Firefox",regex:/Firefox\/([\d.]+)/},{name:"Safari",regex:/Version\/([\d.]+).*Safari/},{name:"Opera",regex:/OPR\/([\d.]+)/}],os:[{name:"Windows",regex:/Windows NT ([\d.]+)/},{name:"macOS",regex:/Mac OS X ([\d_]+)/},{name:"iOS",regex:/iPhone OS ([\d_]+)/},{name:"Android",regex:/Android ([\d.]+)/},{name:"Linux",regex:/Linux/}],device:[{name:"iPhone",regex:/iPhone/},{name:"iPad",regex:/iPad/},{name:"Android",regex:/Android/}]},n=r=>{var o;const a=e[r].find(l=>l.regex.test(t));return{name:a?a.name:"Unknown",version:a&&((o=t.match(a.regex))==null?void 0:o[1].replace(/_/g,"."))||"Unknown"}};return{browser:n("browser"),os:n("os"),device:{model:n("device").name,type:n("device").name!=="Unknown"?"Mobile":"Desktop",vendor:((i=t.match(/; (\w+) Build/))==null?void 0:i[1])||"Unknown"}}}var uf=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(uf||{}),lf=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(lf||{}),cf=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(cf||{}),df=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(df||{}),ff=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(ff||{}),hf=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(hf||{});class gu extends cn{constructor(e){super("NIZZA_ACCOUNT_NOT_FOUND_ERROR",`Error finding account: ${e}`)}}class pf extends cn{constructor(e){super("NIZZA_PLAN_NOT_FOUND_ERROR",`Error finding plan: ${e}`)}}class mf extends cn{constructor(e){super("NIZZA_CREATE_PLAN_ERROR",`Error creating plan: ${e.plan}`,e)}}const jl=`${_i.apiUrls.restV1}/plans`;class gf{async get(e){const i=`/info${tf({planType:e})}`,r=jl+i,{data:a}=await qn({url:r});return a}async create(e){const n=`${jl}/create`,{success:i}=await qn({url:n,method:"POST",body:JSON.stringify(e)});if(!i)throw new mf(e)}}function vv(t){const{host:e,account:n,username:i,createdAt:r,subscriptionType:a,installationDateApp:o,...l}=t;return{...l,account:n,host:e!=null?e:null,username:i!=null?i:n,createdAt:new Date(r),subscriptionType:a!=null?a:null,installationDateApp:new Date(o)}}function yv(t){const{host:e,...n}=t;return{...n,host:e!=null?e:null,plan:{}}}const bv=`${_i.apiUrls.restV1}/accounts/v2`;class vf{async get(e){const n=`${bv}/${e}`,{data:i}=await qn({url:n});return i?yv(i):null}}const kv=`${_i.apiUrls.restV1}/accounts/v2/pvt`;class _v{async get(e,n){const i=`${kv}/${e}`,{data:r}=await qn({url:i,headers:{authorization:`Bearer ${n}`}});return r?vv(r):null}}class yf{constructor(e,n,i){this.publicAccountRepo=e,this.privateAccountRepo=n,this.accountPlanRepo=i}async get(e,n){try{const i=n?await this.privateAccountRepo.get(e,n):await this.publicAccountRepo.get(e);if(!i)throw new gu(e);const r=await this.accountPlanRepo.get(i.descriptionPlan);if(!r)throw new pf(i.descriptionPlan);return{...i,plan:r}}catch(i){throw new su(i)}}}const Sv=new vf,Nv=new _v,Ev=new gf,bf=new yf(Sv,Nv,Ev),kf=()=>{const{account:t,accountName:e,accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:a}=af(h=>({account:h.account,accountName:h.accountName,accountStatus:h.accountStatus,refetchAccount:h.refetchAccount,isPvtAccount:h.isPvtAccount,isPubAccount:h.isPubAccount})),o=["idle","loading"].includes(n);return{account:t,accountName:e,isLoading:o,isError:n==="error",isSuccess:n==="success",accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:a}};async function _f(t,e){return bf.get(t,e)}var Sf=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(Sf||{}),Nf=(t=>(t.Add="add",t.Remove="remove",t))(Nf||{}),Ef=(t=>(t.Vtex="VTEX",t))(Ef||{}),wf=(t=>(t.Active="active",t.Inactive="inactive",t))(wf||{});const wv={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"}}]}}]}}]}}]},Av={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"}}]}}]}}]}}]},Ov={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"}}]}}]}}]}}]},xv={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"}}]}}]}}]}}]},Tv={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"}}]}}]}}]}}]},Cv={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"}}]}}]}}]}}]},Rv={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"}}]}}]}}]}}]},Fv={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"}}]}}]}}]}}]},Dv={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"}}]}}]}}]}}]},Iv={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"}}]}}]}}]}}]},Pv={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"}}]}}]}}]}}]},Lv={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"}}]}}]}}]}}]},$v={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"}}]}}]}}]}}]},Af={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"}}]}}]}}]}}]},Mv={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"}}]}}]}}]}}]},jv={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"highlightProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"highlightProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},Bv={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"}}]}}]}}]}}]},Uv={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"}}]}}]}}]}}]},Vv={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"}}]}}]}}]}}]},qv={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"sendAddToCart"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddToCartInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendAddToCart"},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:"AddToCartSuccess"}},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"}}]}}]}}]}}]},Hv={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"}}]}}]}}]}}]},Kv={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"}}]}}]}}]}}]},zv={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"}}]}}]}}]}}]},Gv={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"}}]}}]}}]}}]},Wv={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"}}]}}]}}]}}]},Jv={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"}}]}}]}}]}}]},Yv={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"}}]}}]}}]}}]},Xv={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"}}]}}]}}]}}]},Qv={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"}}]}}]}}]}}]},Zv={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"}}]}}]}}]}}]}}]},ey={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"}}]}}]}}]}}]},ty={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"}}]}}]}}]}}]},ny={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"}}]}}]}}]}}]},iy={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:"Field",name:{kind:"Name",value:"productName"}},{kind:"Field",name:{kind:"Name",value:"productImageUrl"}}]}}]}}]}},{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"}}]}}]}}]}}]},ry=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:wv,AppendProductsToSnackVideoDocument:Kv,BlockUserDocument:Iv,ChangeAccountUsernameDocument:Pv,CreatePlayListDocument:zv,CreateSnackVideoBatchDocument:Gv,DeleteAllCustomizationDocument:Bv,DeleteChatMessageDocument:Lv,DeleteCollectionDocument:Av,DeleteRelationshipWithSnackVideoDocument:Wv,DeleteSnackVideoDocument:Jv,EventStatus:Sf,FindByProductSnackVideoDocument:ny,FindCollectionDocument:Ov,FindManySnackVideosDocument:Yv,FindMinimalEventDocument:Fv,GetAllChatMessageDocument:$v,GetAllCollectionsDocument:xv,GetAllCustomizationDocument:Uv,GetAllSnackVideosDocument:Xv,GetChatRoomTokenDocument:Af,GetPlayListDocument:iy,GetPlayListsDocument:Qv,GetSnackVideoRelationshipsDocument:Zv,GetTimeLineDocument:Hv,HighlightProductDocument:jv,ManageCollectionProductDocument:Tv,Methods:Nf,PinChatMessageDocument:Mv,SearchCollectionsDocument:Cv,SearchMinimalEventsDocument:Dv,SearchSnackVideosDocument:ey,SendAddToCartDocument:qv,SignProvider:Ef,Status:wf,UpdateCollectionDocument:Rv,UpdateCustomizationDocument:Vv,UpdatePlayListDocument:ty},Symbol.toStringTag,{value:"Module"}));var Ja=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(Ja||{});function ay(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}var dn=(t=>(t.Local="local",t.VtexLegacy="vtexlegacy",t.VtexIO="vtexio",t.VtexFastStore="faststore",t.Platform="platform",t.External="external",t))(dn||{}),vu=(t=>(t.PROD="prod",t.DEV="dev",t.LOCAL="local",t))(vu||{});const{coreLogger:sy}=Zn(),Ho=sy.child("addToCartHooks"),Ko={errorAddingToCart:"addToCartHooks.notification.error",errorOpeningVariationSelector:"addToCartHooks.notification.error",errorOpeningNewTab:"addToCartHooks.notification.error",successAddingToCart:"addToCartHooks.notification.success"};async function oy(t){const e={...t,action:{type:Ja.ADD_TO_CART,exec:()=>Ho.error("action no implemented in validate hook")}};try{const n=await uy(e),i=await ly(n);await cy(i)}catch(n){Ho.error("error unhandled",n)}}async function uy(t){var a,o;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:(o=e.data)!=null?o:{}})}catch(l){Sa("transform",l)}return{...t,product:r}}async function ly(t){var d,h;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:r}=t,a=Of(t),o=(d=i==null?void 0:i.hooks)==null?void 0:d.validate;let l=n.validate({...t,actionFactory:a});if(o)try{l=await o({product:{...r},defaultAction:{...l},action:a,data:(h=e.data)!=null?h:{}})}catch(m){Sa("validate",m)}return{...t,action:l,actionFactory:a}}async function cy(t){var E;const{eventBus:e}=Zn(),{product:n,userAddToCartConfig:i,notifyFactory:r,action:a,actionFactory:o}=t,{isVariationSelectorOpen:l,data:d={}}=t.context,h=(E=i==null?void 0:i.hooks)==null?void 0:E.end,m=a.type===Ja.ADD_TO_CART;let y=null,v=!1;const x=()=>{!m||!l||o.openVariationSelector(!1).exec()},_=()=>{!m||v||(y?r.error(Ko.errorAddingToCart):r.success(Ko.successAddingToCart))},N=()=>{const F={product:n,actionType:a.type,success:!y,error:y};e.emit(Gd.ATCH_ACTION_EXECUTED,F)};try{if(!a.type||!a.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await a.exec()}catch(F){Sa("end",F),y=F}if(h)try{v=!!await h({data:d,error:y,notify:r,actionExecuted:a})}catch(F){Sa("end",F)}x(),_(),N()}function Of(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=r=>Object.entries(r!=null?r:{}).reduce((a,[o,l])=>({...a,[o]:d=>({type:o,exec:()=>l(d)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function Sa(t,e){Ho.error(`addToCartHooks error running ${t}: `,e)}class xf{constructor(e){de(this,"aggregate");de(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 Tf(t){return new xf(t)}class dy{constructor(e){de(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var kt=(t=>(t.GENERAL_ERROR="GENERAL_ERROR",t.AXIOS_ERROR="AXIOS_ERROR",t.NETWORK_ERROR="NETWORK_ERROR",t.CONFIG_ERROR="CONFIG_ERROR",t.TIMEOUT_ERROR="TIMEOUT_ERROR",t.AUTH_ERROR="AUTH_ERROR",t.NOT_FOUND="NOT_FOUND",t.VALIDATION_ERROR="VALIDATION_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.BAD_REQUEST="BAD_REQUEST",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.CONFLICT="CONFLICT",t.GONE="GONE",t.UNSUPPORTED_MEDIA_TYPE="UNSUPPORTED_MEDIA_TYPE",t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",t.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",t))(kt||{});function Cf(t,e){return function(){return t.apply(e,arguments)}}const{toString:fy}=Object.prototype,{getPrototypeOf:yu}=Object,Ya=(t=>e=>{const n=fy.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gt=t=>(t=t.toLowerCase(),e=>Ya(e)===t),Xa=t=>e=>typeof e===t,{isArray:Oi}=Array,or=Xa("undefined");function hy(t){return t!==null&&!or(t)&&t.constructor!==null&&!or(t.constructor)&&Rt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Rf=Gt("ArrayBuffer");function py(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Rf(t.buffer),e}const my=Xa("string"),Rt=Xa("function"),Ff=Xa("number"),Qa=t=>t!==null&&typeof t=="object",gy=t=>t===!0||t===!1,aa=t=>{if(Ya(t)!=="object")return!1;const e=yu(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},vy=Gt("Date"),yy=Gt("File"),by=Gt("Blob"),ky=Gt("FileList"),_y=t=>Qa(t)&&Rt(t.pipe),Sy=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Rt(t.append)&&((e=Ya(t))==="formdata"||e==="object"&&Rt(t.toString)&&t.toString()==="[object FormData]"))},Ny=Gt("URLSearchParams"),[Ey,wy,Ay,Oy]=["ReadableStream","Request","Response","Headers"].map(Gt),xy=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vr(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let i,r;if(typeof t!="object"&&(t=[t]),Oi(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const a=n?Object.getOwnPropertyNames(t):Object.keys(t),o=a.length;let l;for(i=0;i<o;i++)l=a[i],e.call(null,t[l],l,t)}}function Df(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const jn=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,If=t=>!or(t)&&t!==jn;function zo(){const{caseless:t}=If(this)&&this||{},e={},n=(i,r)=>{const a=t&&Df(e,r)||r;aa(e[a])&&aa(i)?e[a]=zo(e[a],i):aa(i)?e[a]=zo({},i):Oi(i)?e[a]=i.slice():e[a]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&vr(arguments[i],n);return e}const Ty=(t,e,n,{allOwnKeys:i}={})=>(vr(e,(r,a)=>{n&&Rt(r)?t[a]=Cf(r,n):t[a]=r},{allOwnKeys:i}),t),Cy=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Ry=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Fy=(t,e,n,i)=>{let r,a,o;const l={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),a=r.length;a-- >0;)o=r[a],(!i||i(o,t,e))&&!l[o]&&(e[o]=t[o],l[o]=!0);t=n!==!1&&yu(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},Dy=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},Iy=t=>{if(!t)return null;if(Oi(t))return t;let e=t.length;if(!Ff(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},Py=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&yu(Uint8Array)),Ly=(t,e)=>{const i=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=i.next())&&!r.done;){const a=r.value;e.call(t,a[0],a[1])}},$y=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},My=Gt("HTMLFormElement"),jy=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,r){return i.toUpperCase()+r}),Bl=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),By=Gt("RegExp"),Pf=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};vr(n,(r,a)=>{let o;(o=e(r,a,t))!==!1&&(i[a]=o||r)}),Object.defineProperties(t,i)},Uy=t=>{Pf(t,(e,n)=>{if(Rt(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(Rt(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Vy=(t,e)=>{const n={},i=r=>{r.forEach(a=>{n[a]=!0})};return Oi(t)?i(t):i(String(t).split(e)),n},qy=()=>{},Hy=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,co="abcdefghijklmnopqrstuvwxyz",Ul="0123456789",Lf={DIGIT:Ul,ALPHA:co,ALPHA_DIGIT:co+co.toUpperCase()+Ul},Ky=(t=16,e=Lf.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n};function zy(t){return!!(t&&Rt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const Gy=t=>{const e=new Array(10),n=(i,r)=>{if(Qa(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const a=Oi(i)?[]:{};return vr(i,(o,l)=>{const d=n(o,r+1);!or(d)&&(a[l]=d)}),e[r]=void 0,a}}return i};return n(t,0)},Wy=Gt("AsyncFunction"),Jy=t=>t&&(Qa(t)||Rt(t))&&Rt(t.then)&&Rt(t.catch),$f=((t,e)=>t?setImmediate:e?((n,i)=>(jn.addEventListener("message",({source:r,data:a})=>{r===jn&&a===n&&i.length&&i.shift()()},!1),r=>{i.push(r),jn.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Rt(jn.postMessage)),Yy=typeof queueMicrotask!="undefined"?queueMicrotask.bind(jn):typeof process!="undefined"&&process.nextTick||$f,H={isArray:Oi,isArrayBuffer:Rf,isBuffer:hy,isFormData:Sy,isArrayBufferView:py,isString:my,isNumber:Ff,isBoolean:gy,isObject:Qa,isPlainObject:aa,isReadableStream:Ey,isRequest:wy,isResponse:Ay,isHeaders:Oy,isUndefined:or,isDate:vy,isFile:yy,isBlob:by,isRegExp:By,isFunction:Rt,isStream:_y,isURLSearchParams:Ny,isTypedArray:Py,isFileList:ky,forEach:vr,merge:zo,extend:Ty,trim:xy,stripBOM:Cy,inherits:Ry,toFlatObject:Fy,kindOf:Ya,kindOfTest:Gt,endsWith:Dy,toArray:Iy,forEachEntry:Ly,matchAll:$y,isHTMLForm:My,hasOwnProperty:Bl,hasOwnProp:Bl,reduceDescriptors:Pf,freezeMethods:Uy,toObjectSet:Vy,toCamelCase:jy,noop:qy,toFiniteNumber:Hy,findKey:Df,global:jn,isContextDefined:If,ALPHABET:Lf,generateString:Ky,isSpecCompliantForm:zy,toJSONObject:Gy,isAsyncFn:Wy,isThenable:Jy,setImmediate:$f,asap:Yy};function Ce(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}H.inherits(Ce,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const Mf=Ce.prototype,jf={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{jf[t]={value:t}});Object.defineProperties(Ce,jf);Object.defineProperty(Mf,"isAxiosError",{value:!0});Ce.from=(t,e,n,i,r,a)=>{const o=Object.create(Mf);return H.toFlatObject(t,o,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),Ce.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,a&&Object.assign(o,a),o};const Xy=null;function Go(t){return H.isPlainObject(t)||H.isArray(t)}function Bf(t){return H.endsWith(t,"[]")?t.slice(0,-2):t}function Vl(t,e,n){return t?t.concat(e).map(function(r,a){return r=Bf(r),!n&&a?"["+r+"]":r}).join(n?".":""):e}function Qy(t){return H.isArray(t)&&!t.some(Go)}const Zy=H.toFlatObject(H,{},null,function(e){return/^is[A-Z]/.test(e)});function Za(t,e,n){if(!H.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,E){return!H.isUndefined(E[N])});const i=n.metaTokens,r=n.visitor||m,a=n.dots,o=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&H.isSpecCompliantForm(e);if(!H.isFunction(r))throw new TypeError("visitor must be a function");function h(_){if(_===null)return"";if(H.isDate(_))return _.toISOString();if(!d&&H.isBlob(_))throw new Ce("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(_)||H.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,N,E){let F=_;if(_&&!E&&typeof _=="object"){if(H.endsWith(N,"{}"))N=i?N:N.slice(0,-2),_=JSON.stringify(_);else if(H.isArray(_)&&Qy(_)||(H.isFileList(_)||H.endsWith(N,"[]"))&&(F=H.toArray(_)))return N=Bf(N),F.forEach(function(J,K){!(H.isUndefined(J)||J===null)&&e.append(o===!0?Vl([N],K,a):o===null?N:N+"[]",h(J))}),!1}return Go(_)?!0:(e.append(Vl(E,N,a),h(_)),!1)}const y=[],v=Object.assign(Zy,{defaultVisitor:m,convertValue:h,isVisitable:Go});function x(_,N){if(!H.isUndefined(_)){if(y.indexOf(_)!==-1)throw Error("Circular reference detected in "+N.join("."));y.push(_),H.forEach(_,function(F,V){(!(H.isUndefined(F)||F===null)&&r.call(e,F,H.isString(V)?V.trim():V,N,v))===!0&&x(F,N?N.concat(V):[V])}),y.pop()}}if(!H.isObject(t))throw new TypeError("data must be an object");return x(t),e}function ql(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function bu(t,e){this._pairs=[],t&&Za(t,this,e)}const Uf=bu.prototype;Uf.append=function(e,n){this._pairs.push([e,n])};Uf.toString=function(e){const n=e?function(i){return e.call(this,i,ql)}:ql;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function eb(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Vf(t,e,n){if(!e)return t;const i=n&&n.encode||eb,r=n&&n.serialize;let a;if(r?a=r(e,n):a=H.isURLSearchParams(e)?e.toString():new bu(e,n).toString(i),a){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class Hl{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){H.forEach(this.handlers,function(i){i!==null&&e(i)})}}const qf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},tb=typeof URLSearchParams!="undefined"?URLSearchParams:bu,nb=typeof FormData!="undefined"?FormData:null,ib=typeof Blob!="undefined"?Blob:null,rb={isBrowser:!0,classes:{URLSearchParams:tb,FormData:nb,Blob:ib},protocols:["http","https","file","blob","url","data"]},ku=typeof window!="undefined"&&typeof document!="undefined",Wo=typeof navigator=="object"&&navigator||void 0,ab=ku&&(!Wo||["ReactNative","NativeScript","NS"].indexOf(Wo.product)<0),sb=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ob=ku&&window.location.href||"http://localhost",ub=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ku,hasStandardBrowserEnv:ab,hasStandardBrowserWebWorkerEnv:sb,navigator:Wo,origin:ob},Symbol.toStringTag,{value:"Module"})),Et={...ub,...rb};function lb(t,e){return Za(t,new Et.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,a){return Et.isNode&&H.isBuffer(n)?(this.append(i,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},e))}function cb(t){return H.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function db(t){const e={},n=Object.keys(t);let i;const r=n.length;let a;for(i=0;i<r;i++)a=n[i],e[a]=t[a];return e}function Hf(t){function e(n,i,r,a){let o=n[a++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),d=a>=n.length;return o=!o&&H.isArray(r)?r.length:o,d?(H.hasOwnProp(r,o)?r[o]=[r[o],i]:r[o]=i,!l):((!r[o]||!H.isObject(r[o]))&&(r[o]=[]),e(n,i,r[o],a)&&H.isArray(r[o])&&(r[o]=db(r[o])),!l)}if(H.isFormData(t)&&H.isFunction(t.entries)){const n={};return H.forEachEntry(t,(i,r)=>{e(cb(i),r,n,0)}),n}return null}function fb(t,e,n){if(H.isString(t))try{return(e||JSON.parse)(t),H.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const yr={transitional:qf,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const i=n.getContentType()||"",r=i.indexOf("application/json")>-1,a=H.isObject(e);if(a&&H.isHTMLForm(e)&&(e=new FormData(e)),H.isFormData(e))return r?JSON.stringify(Hf(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return lb(e,this.formSerializer).toString();if((l=H.isFileList(e))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Za(l?{"files[]":e}:e,d&&new d,this.formSerializer)}}return a||r?(n.setContentType("application/json",!1),fb(e)):e}],transformResponse:[function(e){const n=this.transitional||yr.transitional,i=n&&n.forcedJSONParsing,r=this.responseType==="json";if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(i&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(l){if(o)throw l.name==="SyntaxError"?Ce.from(l,Ce.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Et.classes.FormData,Blob:Et.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],t=>{yr.headers[t]={}});const hb=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pb=t=>{const e={};let n,i,r;return t&&t.split(`
|
|
32
|
-
`).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),i=o.substring(r+1).trim(),!(!n||e[n]&&
|
|
33
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[Kl]=this[Kl]={accessors:{}}).accessors,r=this.prototype;function a(o){const l=qi(o);i[l]||(yb(r,o),i[l]=!0)}return H.isArray(e)?e.forEach(a):a(e),this}};wt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);H.reduceDescriptors(wt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}});H.freezeMethods(wt);function ho(t,e){const n=this||yr,i=e||n,r=wt.from(i.headers);let a=i.data;return H.forEach(t,function(l){a=l.call(n,a,r.normalize(),e?e.status:void 0)}),r.normalize(),a}function Kf(t){return!!(t&&t.__CANCEL__)}function xi(t,e,n){Ce.call(this,t==null?"canceled":t,Ce.ERR_CANCELED,e,n),this.name="CanceledError"}H.inherits(xi,Ce,{__CANCEL__:!0});function zf(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new Ce("Request failed with status code "+n.status,[Ce.ERR_BAD_REQUEST,Ce.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function bb(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function kb(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r=0,a=0,o;return e=e!==void 0?e:1e3,function(d){const h=Date.now(),m=i[a];o||(o=h),n[r]=d,i[r]=h;let y=a,v=0;for(;y!==r;)v+=n[y++],y=y%t;if(r=(r+1)%t,r===a&&(a=(a+1)%t),h-o<e)return;const x=m&&h-m;return x?Math.round(v*1e3/x):void 0}}function _b(t,e){let n=0,i=1e3/e,r,a;const o=(h,m=Date.now())=>{n=m,r=null,a&&(clearTimeout(a),a=null),t.apply(null,h)};return[(...h)=>{const m=Date.now(),y=m-n;y>=i?o(h,m):(r=h,a||(a=setTimeout(()=>{a=null,o(r)},i-y)))},()=>r&&o(r)]}const Na=(t,e,n=3)=>{let i=0;const r=kb(50,250);return _b(a=>{const o=a.loaded,l=a.lengthComputable?a.total:void 0,d=o-i,h=r(d),m=o<=l;i=o;const y={loaded:o,total:l,progress:l?o/l:void 0,bytes:d,rate:h||void 0,estimated:h&&l&&m?(l-o)/h:void 0,event:a,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(y)},n)},zl=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Gl=t=>(...e)=>H.asap(()=>t(...e)),Sb=Et.hasStandardBrowserEnv?function(){const e=Et.navigator&&/(msie|trident)/i.test(Et.navigator.userAgent),n=document.createElement("a");let i;function r(a){let o=a;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=r(window.location.href),function(o){const l=H.isString(o)?r(o):o;return l.protocol===i.protocol&&l.host===i.host}}():function(){return function(){return!0}}(),Nb=Et.hasStandardBrowserEnv?{write(t,e,n,i,r,a){const o=[t+"="+encodeURIComponent(e)];H.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),H.isString(i)&&o.push("path="+i),H.isString(r)&&o.push("domain="+r),a===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Eb(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function wb(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Gf(t,e){return t&&!Eb(e)?wb(t,e):e}const Wl=t=>t instanceof wt?{...t}:t;function zn(t,e){e=e||{};const n={};function i(h,m,y){return H.isPlainObject(h)&&H.isPlainObject(m)?H.merge.call({caseless:y},h,m):H.isPlainObject(m)?H.merge({},m):H.isArray(m)?m.slice():m}function r(h,m,y){if(H.isUndefined(m)){if(!H.isUndefined(h))return i(void 0,h,y)}else return i(h,m,y)}function a(h,m){if(!H.isUndefined(m))return i(void 0,m)}function o(h,m){if(H.isUndefined(m)){if(!H.isUndefined(h))return i(void 0,h)}else return i(void 0,m)}function l(h,m,y){if(y in e)return i(h,m);if(y in t)return i(void 0,h)}const d={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(h,m)=>r(Wl(h),Wl(m),!0)};return H.forEach(Object.keys(Object.assign({},t,e)),function(m){const y=d[m]||r,v=y(t[m],e[m],m);H.isUndefined(v)&&y!==l||(n[m]=v)}),n}const Wf=t=>{const e=zn({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:a,headers:o,auth:l}=e;e.headers=o=wt.from(o),e.url=Vf(Gf(e.baseURL,e.url),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(H.isFormData(n)){if(Et.hasStandardBrowserEnv||Et.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){const[h,...m]=d?d.split(";").map(y=>y.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...m].join("; "))}}if(Et.hasStandardBrowserEnv&&(i&&H.isFunction(i)&&(i=i(e)),i||i!==!1&&Sb(e.url))){const h=r&&a&&Nb.read(a);h&&o.set(r,h)}return e},Ab=typeof XMLHttpRequest!="undefined",Ob=Ab&&function(t){return new Promise(function(n,i){const r=Wf(t);let a=r.data;const o=wt.from(r.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:h}=r,m,y,v,x,_;function N(){x&&x(),_&&_(),r.cancelToken&&r.cancelToken.unsubscribe(m),r.signal&&r.signal.removeEventListener("abort",m)}let E=new XMLHttpRequest;E.open(r.method.toUpperCase(),r.url,!0),E.timeout=r.timeout;function F(){if(!E)return;const J=wt.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),Y={data:!l||l==="text"||l==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:J,config:t,request:E};zf(function(ne){n(ne),N()},function(ne){i(ne),N()},Y),E=null}"onloadend"in E?E.onloadend=F:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(F)},E.onabort=function(){E&&(i(new Ce("Request aborted",Ce.ECONNABORTED,t,E)),E=null)},E.onerror=function(){i(new Ce("Network Error",Ce.ERR_NETWORK,t,E)),E=null},E.ontimeout=function(){let K=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const Y=r.transitional||qf;r.timeoutErrorMessage&&(K=r.timeoutErrorMessage),i(new Ce(K,Y.clarifyTimeoutError?Ce.ETIMEDOUT:Ce.ECONNABORTED,t,E)),E=null},a===void 0&&o.setContentType(null),"setRequestHeader"in E&&H.forEach(o.toJSON(),function(K,Y){E.setRequestHeader(Y,K)}),H.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),l&&l!=="json"&&(E.responseType=r.responseType),h&&([v,_]=Na(h,!0),E.addEventListener("progress",v)),d&&E.upload&&([y,x]=Na(d),E.upload.addEventListener("progress",y),E.upload.addEventListener("loadend",x)),(r.cancelToken||r.signal)&&(m=J=>{E&&(i(!J||J.type?new xi(null,t,E):J),E.abort(),E=null)},r.cancelToken&&r.cancelToken.subscribe(m),r.signal&&(r.signal.aborted?m():r.signal.addEventListener("abort",m)));const V=bb(r.url);if(V&&Et.protocols.indexOf(V)===-1){i(new Ce("Unsupported protocol "+V+":",Ce.ERR_BAD_REQUEST,t));return}E.send(a||null)})},xb=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,r;const a=function(h){if(!r){r=!0,l();const m=h instanceof Error?h:this.reason;i.abort(m instanceof Ce?m:new xi(m instanceof Error?m.message:m))}};let o=e&&setTimeout(()=>{o=null,a(new Ce(`timeout ${e} of ms exceeded`,Ce.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(h=>{h.unsubscribe?h.unsubscribe(a):h.removeEventListener("abort",a)}),t=null)};t.forEach(h=>h.addEventListener("abort",a));const{signal:d}=i;return d.unsubscribe=()=>H.asap(l),d}},Tb=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let i=0,r;for(;i<n;)r=i+e,yield t.slice(i,r),i=r},Cb=async function*(t,e){for await(const n of Rb(t))yield*Tb(n,e)},Rb=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},Jl=(t,e,n,i)=>{const r=Cb(t,e);let a=0,o,l=d=>{o||(o=!0,i&&i(d))};return new ReadableStream({async pull(d){try{const{done:h,value:m}=await r.next();if(h){l(),d.close();return}let y=m.byteLength;if(n){let v=a+=y;n(v)}d.enqueue(new Uint8Array(m))}catch(h){throw l(h),h}},cancel(d){return l(d),r.return()}},{highWaterMark:2})},es=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",Jf=es&&typeof ReadableStream=="function",Fb=es&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),Yf=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Db=Jf&&Yf(()=>{let t=!1;const e=new Request(Et.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Yl=64*1024,Jo=Jf&&Yf(()=>H.isReadableStream(new Response("").body)),Ea={stream:Jo&&(t=>t.body)};es&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Ea[e]&&(Ea[e]=H.isFunction(t[e])?n=>n[e]():(n,i)=>{throw new Ce(`Response type '${e}' is not supported`,Ce.ERR_NOT_SUPPORT,i)})})})(new Response);const Ib=async t=>{if(t==null)return 0;if(H.isBlob(t))return t.size;if(H.isSpecCompliantForm(t))return(await new Request(Et.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(H.isArrayBufferView(t)||H.isArrayBuffer(t))return t.byteLength;if(H.isURLSearchParams(t)&&(t=t+""),H.isString(t))return(await Fb(t)).byteLength},Pb=async(t,e)=>{const n=H.toFiniteNumber(t.getContentLength());return n==null?Ib(e):n},Lb=es&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:a,timeout:o,onDownloadProgress:l,onUploadProgress:d,responseType:h,headers:m,withCredentials:y="same-origin",fetchOptions:v}=Wf(t);h=h?(h+"").toLowerCase():"text";let x=xb([r,a&&a.toAbortSignal()],o),_;const N=x&&x.unsubscribe&&(()=>{x.unsubscribe()});let E;try{if(d&&Db&&n!=="get"&&n!=="head"&&(E=await Pb(m,i))!==0){let Y=new Request(e,{method:"POST",body:i,duplex:"half"}),X;if(H.isFormData(i)&&(X=Y.headers.get("content-type"))&&m.setContentType(X),Y.body){const[ne,ye]=zl(E,Na(Gl(d)));i=Jl(Y.body,Yl,ne,ye)}}H.isString(y)||(y=y?"include":"omit");const F="credentials"in Request.prototype;_=new Request(e,{...v,signal:x,method:n.toUpperCase(),headers:m.normalize().toJSON(),body:i,duplex:"half",credentials:F?y:void 0});let V=await fetch(_);const J=Jo&&(h==="stream"||h==="response");if(Jo&&(l||J&&N)){const Y={};["status","statusText","headers"].forEach(fe=>{Y[fe]=V[fe]});const X=H.toFiniteNumber(V.headers.get("content-length")),[ne,ye]=l&&zl(X,Na(Gl(l),!0))||[];V=new Response(Jl(V.body,Yl,ne,()=>{ye&&ye(),N&&N()}),Y)}h=h||"text";let K=await Ea[H.findKey(Ea,h)||"text"](V,t);return!J&&N&&N(),await new Promise((Y,X)=>{zf(Y,X,{data:K,headers:wt.from(V.headers),status:V.status,statusText:V.statusText,config:t,request:_})})}catch(F){throw N&&N(),F&&F.name==="TypeError"&&/fetch/i.test(F.message)?Object.assign(new Ce("Network Error",Ce.ERR_NETWORK,t,_),{cause:F.cause||F}):Ce.from(F,F&&F.code,t,_)}}),Yo={http:Xy,xhr:Ob,fetch:Lb};H.forEach(Yo,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Xl=t=>`- ${t}`,$b=t=>H.isFunction(t)||t===null||t===!1,Xf={getAdapter:t=>{t=H.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let a=0;a<e;a++){n=t[a];let o;if(i=n,!$b(n)&&(i=Yo[(o=String(n)).toLowerCase()],i===void 0))throw new Ce(`Unknown adapter '${o}'`);if(i)break;r[o||"#"+a]=i}if(!i){const a=Object.entries(r).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=e?a.length>1?`since :
|
|
34
|
-
`+
|
|
35
|
-
`):" "+
|
|
36
|
-
`+a):i.stack=a}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=zn(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:a}=n;i!==void 0&&Xo.assertOptions(i,{silentJSONParsing:bn.transitional(bn.boolean),forcedJSONParsing:bn.transitional(bn.boolean),clarifyTimeoutError:bn.transitional(bn.boolean)},!1),r!=null&&(H.isFunction(r)?n.paramsSerializer={serialize:r}:Xo.assertOptions(r,{encode:bn.function,serialize:bn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=a&&H.merge(a.common,a[n.method]);a&&H.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=wt.concat(o,a);const l=[];let d=!0;this.interceptors.request.forEach(function(N){typeof N.runWhen=="function"&&N.runWhen(n)===!1||(d=d&&N.synchronous,l.unshift(N.fulfilled,N.rejected))});const h=[];this.interceptors.response.forEach(function(N){h.push(N.fulfilled,N.rejected)});let m,y=0,v;if(!d){const _=[Ql.bind(this),void 0];for(_.unshift.apply(_,l),_.push.apply(_,h),v=_.length,m=Promise.resolve(n);y<v;)m=m.then(_[y++],_[y++]);return m}v=l.length;let x=n;for(y=0;y<v;){const _=l[y++],N=l[y++];try{x=_(x)}catch(E){N.call(this,E);break}}try{m=Ql.call(this,x)}catch(_){return Promise.reject(_)}for(y=0,v=h.length;y<v;)m=m.then(h[y++],h[y++]);return m}getUri(e){e=zn(this.defaults,e);const n=Gf(e.baseURL,e.url);return Vf(n,e.params,e.paramsSerializer)}};H.forEach(["delete","get","head","options"],function(e){Vn.prototype[e]=function(n,i){return this.request(zn(i||{},{method:e,url:n,data:(i||{}).data}))}});H.forEach(["post","put","patch"],function(e){function n(i){return function(a,o,l){return this.request(zn(l||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:o}))}}Vn.prototype[e]=n(),Vn.prototype[e+"Form"]=n(!0)});let jb=class Zf{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const i=this;this.promise.then(r=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](r);i._listeners=null}),this.promise.then=r=>{let a;const o=new Promise(l=>{i.subscribe(l),a=l}).then(r);return o.cancel=function(){i.unsubscribe(a)},o},e(function(a,o,l){i.reason||(i.reason=new xi(a,o,l),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Zf(function(r){e=r}),cancel:e}}};function Bb(t){return function(n){return t.apply(null,n)}}function Ub(t){return H.isObject(t)&&t.isAxiosError===!0}const Qo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Qo).forEach(([t,e])=>{Qo[e]=t});function eh(t){const e=new Vn(t),n=Cf(Vn.prototype.request,e);return H.extend(n,Vn.prototype,e,{allOwnKeys:!0}),H.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return eh(zn(t,r))},n}const Ze=eh(yr);Ze.Axios=Vn;Ze.CanceledError=xi;Ze.CancelToken=jb;Ze.isCancel=Kf;Ze.VERSION=Qf;Ze.toFormData=Za;Ze.AxiosError=Ce;Ze.Cancel=Ze.CanceledError;Ze.all=function(e){return Promise.all(e)};Ze.spread=Bb;Ze.isAxiosError=Ub;Ze.mergeConfig=zn;Ze.AxiosHeaders=wt;Ze.formToJSON=t=>Hf(H.isHTMLForm(t)?new FormData(t):t);Ze.getAdapter=Xf.getAdapter;Ze.HttpStatusCode=Qo;Ze.default=Ze;const{Axios:jS,AxiosError:BS,CanceledError:US,isCancel:VS,CancelToken:qS,VERSION:HS,all:KS,Cancel:zS,isAxiosError:GS,spread:WS,toFormData:JS,AxiosHeaders:YS,HttpStatusCode:XS,formToJSON:QS,getAdapter:ZS,mergeConfig:eN}=Ze,Vb={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 wa{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||Vb,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 wa(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new wa(this.logger,e)}}var Xt=new wa;class ts{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(o=>{let[l,d]=o;for(let h=0;h<d;h++)l(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[l,d]=o;for(let h=0;h<d;h++)l.apply(l,[e,...i])})}}const Hi=()=>{let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n},ec=t=>t==null?"":""+t,qb=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},Hb=/###/g,tc=t=>t&&t.indexOf("###")>-1?t.replace(Hb,"."):t,nc=t=>!t||typeof t=="string",Qi=(t,e,n)=>{const i=typeof e!="string"?e:e.split(".");let r=0;for(;r<i.length-1;){if(nc(t))return{};const a=tc(i[r]);!t[a]&&n&&(t[a]=new n),Object.prototype.hasOwnProperty.call(t,a)?t=t[a]:t={},++r}return nc(t)?{}:{obj:t,k:tc(i[r])}},ic=(t,e,n)=>{const{obj:i,k:r}=Qi(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let a=e[e.length-1],o=e.slice(0,e.length-1),l=Qi(t,o,Object);for(;l.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),l=Qi(t,o,Object),l&&l.obj&&typeof l.obj[`${l.k}.${a}`]!="undefined"&&(l.obj=void 0);l.obj[`${l.k}.${a}`]=n},Kb=(t,e,n,i)=>{const{obj:r,k:a}=Qi(t,e,Object);r[a]=r[a]||[],r[a].push(n)},Aa=(t,e)=>{const{obj:n,k:i}=Qi(t,e);if(n)return n[i]},zb=(t,e,n)=>{const i=Aa(t,n);return i!==void 0?i:Aa(e,n)},th=(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]):th(t[i],e[i],n):t[i]=e[i]);return t},li=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var Gb={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const Wb=t=>typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>Gb[e]):t;class Jb{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 Yb=[" ",",","?","!",";"],Xb=new Jb(20),Qb=(t,e,n)=>{e=e||"",n=n||"";const i=Yb.filter(o=>e.indexOf(o)<0&&n.indexOf(o)<0);if(i.length===0)return!0;const r=Xb.getRegExp(`(${i.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!r.test(t);if(!a){const o=t.indexOf(n);o>0&&!r.test(t.substring(0,o))&&(a=!0)}return a},Zo=function(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 o,l="";for(let d=a;d<i.length;++d)if(d!==a&&(l+=n),l+=i[d],o=r[l],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&d<i.length-1)continue;a+=d-a+1;break}r=o}return r},Oa=t=>t&&t.indexOf("_")>0?t.replace("_","-"):t;class rc extends ts{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,o=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,n],i&&(Array.isArray(i)?l.push(...i):typeof i=="string"&&a?l.push(...i.split(a)):l.push(i)));const d=Aa(this.data,l);return!d&&!n&&!i&&e.indexOf(".")>-1&&(e=l[0],n=l[1],i=l.slice(2).join(".")),d||!o||typeof i!="string"?d:Zo(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 o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let l=[e,n];i&&(l=l.concat(o?i.split(o):i)),e.indexOf(".")>-1&&(l=e.split("."),r=n,n=l[1]),this.addNamespaces(n),ic(this.data,l,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"||Array.isArray(i[a]))&&this.addResource(e,n,a,i[a],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,n];e.indexOf(".")>-1&&(l=e.split("."),r=i,i=n,n=l[1]),this.addNamespaces(n);let d=Aa(this.data,l)||{};o.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?th(d,i,a):d={...d,...i},ic(this.data,l,d),o.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 nh={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 ac={};class xa extends ts{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),qb(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Xt.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 o=i&&e.indexOf(i)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Qb(e,i,r);if(o&&!l){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:a};const h=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(h[0])>-1)&&(a=h.shift()),e=h.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:o,namespaces:l}=this.extractFromKey(e[e.length-1],n),d=l[l.length-1],h=n.lng||this.language,m=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(m){const K=n.nsSeparator||this.options.nsSeparator;return r?{res:`${d}${K}${o}`,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:`${d}${K}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:o}const y=this.resolve(e,n);let v=y&&y.res;const x=y&&y.usedKey||o,_=y&&y.exactUsedKey||o,N=Object.prototype.toString.apply(v),E=["[object Number]","[object Function]","[object RegExp]"],F=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,V=!this.i18nFormat||this.i18nFormat.handleAsObject;if(V&&v&&(typeof v!="string"&&typeof v!="boolean"&&typeof v!="number")&&E.indexOf(N)<0&&!(typeof F=="string"&&Array.isArray(v))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const K=this.options.returnedObjectHandler?this.options.returnedObjectHandler(x,v,{...n,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(y.res=K,y.usedParams=this.getUsedParamsDetails(n),y):K}if(a){const K=Array.isArray(v),Y=K?[]:{},X=K?_:x;for(const ne in v)if(Object.prototype.hasOwnProperty.call(v,ne)){const ye=`${X}${a}${ne}`;Y[ne]=this.translate(ye,{...n,joinArrays:!1,ns:l}),Y[ne]===ye&&(Y[ne]=v[ne])}v=Y}}else if(V&&typeof F=="string"&&Array.isArray(v))v=v.join(F),v&&(v=this.extendTranslation(v,e,n,i));else{let K=!1,Y=!1;const X=n.count!==void 0&&typeof n.count!="string",ne=xa.hasDefaultValue(n),ye=X?this.pluralResolver.getSuffix(h,n.count,n):"",fe=n.ordinal&&X?this.pluralResolver.getSuffix(h,n.count,{ordinal:!1}):"",je=X&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),ke=je&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${ye}`]||n[`defaultValue${fe}`]||n.defaultValue;!this.isValidLookup(v)&&ne&&(K=!0,v=ke),this.isValidLookup(v)||(Y=!0,v=o);const Le=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&Y?void 0:v,M=ne&&ke!==v&&this.options.updateMissing;if(Y||K||M){if(this.logger.log(M?"updateKey":"missingKey",h,d,o,M?ke:v),a){const ae=this.resolve(o,{...n,keySeparator:!1});ae&&ae.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 w=[];const z=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&z&&z[0])for(let ae=0;ae<z.length;ae++)w.push(z[ae]);else this.options.saveMissingTo==="all"?w=this.languageUtils.toResolveHierarchy(n.lng||this.language):w.push(n.lng||this.language);const Q=(ae,te,j)=>{const Oe=ne&&j!==v?j:Le;this.options.missingKeyHandler?this.options.missingKeyHandler(ae,d,te,Oe,M,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(ae,d,te,Oe,M,n),this.emit("missingKey",ae,d,te,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&X?w.forEach(ae=>{const te=this.pluralResolver.getSuffixes(ae,n);je&&n[`defaultValue${this.options.pluralSeparator}zero`]&&te.indexOf(`${this.options.pluralSeparator}zero`)<0&&te.push(`${this.options.pluralSeparator}zero`),te.forEach(j=>{Q([ae],o+j,n[`defaultValue${j}`]||ke)})}):Q(w,o,ke))}v=this.extendTranslation(v,e,n,y,i),Y&&v===o&&this.options.appendNamespaceToMissingKey&&(v=`${d}:${o}`),(Y||K)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?v=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}:${o}`:o,K?v:void 0):v=this.options.parseMissingKeyHandler(v))}return r?(y.res=v,y.usedParams=this.getUsedParamsDetails(n),y):v}extendTranslation(e,n,i,r,a){var o=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 h=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(h){const v=e.match(this.interpolator.nestingRegexp);m=v&&v.length}let y=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),e=this.interpolator.interpolate(e,y,i.lng||this.language||r.usedLng,i),h){const v=e.match(this.interpolator.nestingRegexp),x=v&&v.length;m<x&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(i.lng=this.language||r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var v=arguments.length,x=new Array(v),_=0;_<v;_++)x[_]=arguments[_];return a&&a[0]===x[0]&&!i.context?(o.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${n[0]}`),null):o.translate(...x,n)},i)),i.interpolation&&this.interpolator.reset()}const l=i.postProcess||this.options.postProcess,d=typeof l=="string"?[l]:l;return e!=null&&d&&d.length&&i.applyPostProcessor!==!1&&(e=nh.handle(d,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,o,l;return typeof e=="string"&&(e=[e]),e.forEach(d=>{if(this.isValidLookup(i))return;const h=this.extractFromKey(d,n),m=h.key;r=m;let y=h.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const v=n.count!==void 0&&typeof n.count!="string",x=v&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),_=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",N=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);y.forEach(E=>{this.isValidLookup(i)||(l=E,!ac[`${N[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(ac[`${N[0]}-${E}`]=!0,this.logger.warn(`key "${r}" for languages "${N.join(", ")}" won't get resolved as namespace "${l}" 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!!!")),N.forEach(F=>{if(this.isValidLookup(i))return;o=F;const V=[m];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(V,m,F,E,n);else{let K;v&&(K=this.pluralResolver.getSuffix(F,n.count,n));const Y=`${this.options.pluralSeparator}zero`,X=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(v&&(V.push(m+K),n.ordinal&&K.indexOf(X)===0&&V.push(m+K.replace(X,this.options.pluralSeparator)),x&&V.push(m+Y)),_){const ne=`${m}${this.options.contextSeparator}${n.context}`;V.push(ne),v&&(V.push(ne+K),n.ordinal&&K.indexOf(X)===0&&V.push(ne+K.replace(X,this.options.pluralSeparator)),x&&V.push(ne+Y))}}let J;for(;J=V.pop();)this.isValidLookup(i)||(a=J,i=this.getResource(F,E,J,n))}))})}),{res:i,usedKey:r,exactUsedKey:a,usedLng:o,usedNS:l}}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}}const mo=t=>t.charAt(0).toUpperCase()+t.slice(1);class sc{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xt.create("languageUtils")}getScriptPartFromCode(e){if(e=Oa(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=Oa(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]=mo(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]=mo(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=mo(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const r=this.getLanguagePartFromCode(i);if(this.isSupportedCode(r))return n=r;n=this.options.supportedLngs.find(a=>{if(a===r)return a;if(!(a.indexOf("-")<0&&r.indexOf("-")<0)&&(a.indexOf("-")>0&&r.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===r||a.indexOf(r)===0&&r.length>1))return a})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Array.isArray(e))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=o=>{o&&(this.isSupportedCode(o)?r.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};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(o=>{r.indexOf(o)<0&&a(this.formatLanguageCode(o))}),r}}let Zb=[{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}],ek={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const tk=["v1","v2","v3"],nk=["v4"],oc={zero:0,one:1,two:2,few:3,many:4,other:5},ik=()=>{const t={};return Zb.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:ek[e.fc]}})}),t};class rk{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=Xt.create("pluralResolver"),(!this.options.compatibilityJSON||nk.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=ik(),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const i=Oa(e==="dev"?"en":e),r=n.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:i,type:r});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];const o=new Intl.PluralRules(i,{type:r});return this.pluralRulesCache[a]=o,o}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)=>oc[r]-oc[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!tk.includes(this.options.compatibilityJSON)}}const uc=function(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=zb(t,e,n);return!a&&r&&typeof n=="string"&&(a=Zo(t,n,i),a===void 0&&(a=Zo(e,n,i))),a},go=t=>t.replace(/\$/g,"$$$$");class ak{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xt.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{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:a,prefixEscaped:o,suffix:l,suffixEscaped:d,formatSeparator:h,unescapeSuffix:m,unescapePrefix:y,nestingPrefix:v,nestingPrefixEscaped:x,nestingSuffix:_,nestingSuffixEscaped:N,nestingOptionsSeparator:E,maxReplaces:F,alwaysFormat:V}=e.interpolation;this.escape=n!==void 0?n:Wb,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=a?li(a):o||"{{",this.suffix=l?li(l):d||"}}",this.formatSeparator=h||",",this.unescapePrefix=m?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=v?li(v):x||li("$t("),this.nestingSuffix=_?li(_):N||li(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=F||1e3,this.alwaysFormat=V!==void 0?V:!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,o,l;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=x=>{if(x.indexOf(this.formatSeparator)<0){const F=uc(n,d,x,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(F,void 0,i,{...r,...n,interpolationkey:x}):F}const _=x.split(this.formatSeparator),N=_.shift().trim(),E=_.join(this.formatSeparator).trim();return this.format(uc(n,d,N,this.options.keySeparator,this.options.ignoreJSONStructure),E,i,{...r,...n,interpolationkey:N})};this.resetRegExp();const m=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,y=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:x=>go(x)},{regex:this.regexp,safeValue:x=>this.escapeValue?go(this.escape(x)):go(x)}].forEach(x=>{for(l=0;a=x.regex.exec(e);){const _=a[1].trim();if(o=h(_),o===void 0)if(typeof m=="function"){const E=m(e,a,r);o=typeof E=="string"?E:""}else if(r&&Object.prototype.hasOwnProperty.call(r,_))o="";else if(y){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${_} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=ec(o));const N=x.safeValue(o);if(e=e.replace(a[0],N),y?(x.regex.lastIndex+=o.length,x.regex.lastIndex-=a[0].length):x.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,a,o;const l=(d,h)=>{const m=this.nestingOptionsSeparator;if(d.indexOf(m)<0)return d;const y=d.split(new RegExp(`${m}[ ]*{`));let v=`{${y[1]}`;d=y[0],v=this.interpolate(v,o);const x=v.match(/'/g),_=v.match(/"/g);(x&&x.length%2===0&&!_||_.length%2!==0)&&(v=v.replace(/'/g,'"'));try{o=JSON.parse(v),h&&(o={...h,...o})}catch(N){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,N),`${d}${m}${v}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,d};for(;r=this.nestingRegexp.exec(e);){let d=[];o={...i},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let h=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const m=r[1].split(this.formatSeparator).map(y=>y.trim());r[1]=m.shift(),d=m,h=!0}if(a=n(l.call(this,r[1].trim(),o),o),a&&r[0]===e&&typeof a!="string")return a;typeof a!="string"&&(a=ec(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),h&&(a=d.reduce((m,y)=>this.format(m,y,i.lng,{...i,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}const sk=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(o=>{if(o){const[l,...d]=o.split(":"),h=d.join(":").trim().replace(/^'+|'+$/g,""),m=l.trim();n[m]||(n[m]=h),h==="false"&&(n[m]=!1),h==="true"&&(n[m]=!0),isNaN(h)||(n[m]=parseInt(h,10))}})}return{formatName:e,formatOptions:n}},ci=t=>{const e={};return(n,i,r)=>{let a=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(a={...a,[r.interpolationkey]:void 0});const o=i+JSON.stringify(a);let l=e[o];return l||(l=t(Oa(i),r),e[o]=l),l(n)}};class ok{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=Xt.create("formatter"),this.options=e,this.formats={number:ci((n,i)=>{const r=new Intl.NumberFormat(n,{...i});return a=>r.format(a)}),currency:ci((n,i)=>{const r=new Intl.NumberFormat(n,{...i,style:"currency"});return a=>r.format(a)}),datetime:ci((n,i)=>{const r=new Intl.DateTimeFormat(n,{...i});return a=>r.format(a)}),relativetime:ci((n,i)=>{const r=new Intl.RelativeTimeFormat(n,{...i});return a=>r.format(a,i.range||"day")}),list:ci((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()]=ci(n)}format(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=n.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&a[0].indexOf(")")<0&&a.find(l=>l.indexOf(")")>-1)){const l=a.findIndex(d=>d.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,l)].join(this.formatSeparator)}return a.reduce((l,d)=>{const{formatName:h,formatOptions:m}=sk(d);if(this.formats[h]){let y=l;try{const v=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},x=v.locale||v.lng||r.locale||r.lng||i;y=this.formats[h](l,x,{...m,...r,...v})}catch(v){this.logger.warn(v)}return y}else this.logger.warn(`there was no format function for ${h}`);return l},e)}}const uk=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class lk extends ts{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=Xt.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={},o={},l={},d={};return e.forEach(h=>{let m=!0;n.forEach(y=>{const v=`${h}|${y}`;!i.reload&&this.store.hasResourceBundle(h,y)?this.state[v]=2:this.state[v]<0||(this.state[v]===1?o[v]===void 0&&(o[v]=!0):(this.state[v]=1,m=!1,o[v]===void 0&&(o[v]=!0),a[v]===void 0&&(a[v]=!0),d[y]===void 0&&(d[y]=!0)))}),m||(l[h]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,n,i){const r=e.split("|"),a=r[0],o=r[1];n&&this.emit("failedLoading",a,o,n),!n&&i&&this.store.addResourceBundle(a,o,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const l={};this.queue.forEach(d=>{Kb(d.loaded,[a],o),uk(d,e),n&&d.errors.push(n),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(h=>{l[h]||(l[h]={});const m=d.loaded[h];m.length&&m.forEach(y=>{l[h][y]===void 0&&(l[h][y]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(d=>!d.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,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:a,callback:o});return}this.readingCalls++;const l=(h,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(h&&m&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,r+1,a*2,o)},a);return}o(h,m)},d=this.backend[i].bind(this.backend);if(d.length===2){try{const h=d(e,n);h&&typeof h.then=="function"?h.then(m=>l(null,m)).catch(l):l(null,h)}catch(h){l(h)}return}return d(e,n,l)}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(o=>{this.loadOne(o)})}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,(o,l)=>{o&&this.logger.warn(`${n}loading namespace ${a} for language ${r} failed`,o),!o&&l&&this.logger.log(`${n}loaded namespace ${a} for language ${r}`,l),this.loaded(e,o,l)})}saveMissing(e,n,i,r,a){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=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 d={...o,isUpdate:a},h=this.backend.create.bind(this.backend);if(h.length<6)try{let m;h.length===5?m=h(e,n,i,r,d):m=h(e,n,i,r),m&&typeof m.then=="function"?m.then(y=>l(null,y)).catch(l):l(null,m)}catch(m){l(m)}else h(e,n,i,r,l,d)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}const lc=()=>({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:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),cc=t=>(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),Xr=()=>{},ck=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class ur extends ts{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=cc(e),this.services={},this.logger=Xt,this.modules={external:[]},ck(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const r=lc();this.options={...r,...this.options,...cc(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);const a=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?Xt.init(a(this.modules.logger),this.options):Xt.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:typeof Intl!="undefined"&&(m=ok);const y=new sc(this.options);this.store=new rc(this.options.resources,this.options);const v=this.services;v.logger=Xt,v.resourceStore=this.store,v.languageUtils=y,v.pluralResolver=new rk(y,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(v.formatter=a(m),v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new ak(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new lk(a(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",function(x){for(var _=arguments.length,N=new Array(_>1?_-1:0),E=1;E<_;E++)N[E-1]=arguments[E];e.emit(x,...N)}),this.modules.languageDetector&&(v.languageDetector=a(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=a(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new xa(this.services,this.options),this.translator.on("*",function(x){for(var _=arguments.length,N=new Array(_>1?_-1:0),E=1;E<_;E++)N[E-1]=arguments[E];e.emit(x,...N)}),this.modules.external.forEach(x=>{x.init&&x.init(this)})}if(this.format=this.options.interpolation.format,i||(i=Xr),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[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(m=>{this[m]=function(){return e.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return e.store[m](...arguments),e}});const d=Hi(),h=()=>{const m=(y,v)=>{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),d.resolve(v),i(y,v)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xr;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=[],o=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(h=>{h!=="cimode"&&a.indexOf(h)<0&&a.push(h)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>o(d)),this.options.preload&&this.options.preload.forEach(l=>o(l)),this.services.backendConnector.load(a,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,n,i){const r=Hi();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=Xr),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"&&nh.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=Hi();this.emit("languageChanging",e);const a=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},o=(d,h)=>{h?(a(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,r.resolve(function(){return i.t(...arguments)}),n&&n(d,function(){return i.t(...arguments)})},l=d=>{!e&&!d&&this.services.languageDetector&&(d=[]);const h=typeof d=="string"?d:this.services.languageUtils.getBestMatchFromCodes(d);h&&(this.language||a(h),this.translator.language||this.translator.changeLanguage(h),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(h)),this.loadResources(h,m=>{o(m,h)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),r}getFixedT(e,n,i){var r=this;const a=function(o,l){let d;if(typeof l!="object"){for(var h=arguments.length,m=new Array(h>2?h-2:0),y=2;y<h;y++)m[y-2]=arguments[y];d=r.options.overloadTranslationOptionHandler([o,l].concat(m))}else d={...l};d.lng=d.lng||a.lng,d.lngs=d.lngs||a.lngs,d.ns=d.ns||a.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||i||a.keyPrefix);const v=r.options.keySeparator||".";let x;return d.keyPrefix&&Array.isArray(o)?x=o.map(_=>`${d.keyPrefix}${v}${_}`):x=d.keyPrefix?`${d.keyPrefix}${v}${o}`:o,r.t(x,d)};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 o=(l,d)=>{const h=this.services.backendConnector.state[`${l}|${d}`];return h===-1||h===0||h===2};if(n.precheck){const l=n.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(i,e)&&(!r||o(a,e)))}loadNamespaces(e,n){const i=Hi();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=Hi();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],a=e.filter(o=>r.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=r.concat(a),this.loadResources(o=>{i.resolve(),n&&n(o)}),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 sc(lc());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 ur(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Xr;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},a=new ur(r);return(e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(l=>{a[l]=this[l]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},i&&(a.store=new rc(this.store.data,r),a.services.resourceStore=a.store),a.translator=new xa(a.services,r),a.translator.on("*",function(l){for(var d=arguments.length,h=new Array(d>1?d-1:0),m=1;m<d;m++)h[m-1]=arguments[m];a.emit(l,...h)}),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 gt=ur.createInstance();gt.createInstance=ur.createInstance;gt.createInstance;gt.dir;gt.init;gt.loadResources;gt.reloadResources;gt.use;gt.changeLanguage;gt.getFixedT;const dc=gt.t;gt.exists;gt.setDefaultNamespace;gt.hasLoadedNamespace;gt.loadNamespaces;gt.loadLanguages;const ih=t=>dc(t?`errorCodes.${t}`:"errorCodes.DEFAULT");class dk{constructor(e){de(this,"logger");de(this,"axiosInstance");this.logger=e.logger,this.axiosInstance=Ze.create({baseURL:e.baseUrl,headers:e.accessToken?{Authorization:`Bearer ${e.accessToken}`}:{}})}async get(e){try{return(await this.axiosInstance.get(e)).data}catch(n){throw this.handleError(n)}}async post(e,n){var a;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.post(e,i)).data}catch(o){if(r&&Ze.isAxiosError(o))return(a=o.response)==null?void 0:a.data;throw this.handleError(o)}}async put(e,n){var a;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.put(e,i)).data}catch(o){if(r&&Ze.isAxiosError(o))return(a=o.response)==null?void 0:a.data;throw this.handleError(o)}}async delete(e){try{return(await this.axiosInstance.delete(e)).data}catch(n){throw this.handleError(n)}}handleError(e){var r;let n=kt.GENERAL_ERROR;if(Ze.isAxiosError(e))if(e.response)switch(e.response.status){case 400:n=kt.BAD_REQUEST;break;case 401:n=kt.UNAUTHORIZED;break;case 403:n=kt.FORBIDDEN;break;case 404:n=kt.NOT_FOUND;break;case 409:n=kt.CONFLICT;break;case 410:n=kt.GONE;break;case 415:n=kt.UNSUPPORTED_MEDIA_TYPE;break;case 429:n=kt.TOO_MANY_REQUESTS;break;case 500:n=kt.INTERNAL_SERVER_ERROR;break;case 503:n=kt.SERVICE_UNAVAILABLE;break;default:n=kt.SERVER_ERROR}else e.request?n=kt.NETWORK_ERROR:n=kt.CONFIG_ERROR;const i=ih(n);return this.logger.error("Error Code:",n,"Message:",i),this.logger.error("Result Data:",(r=e.response)==null?void 0:r.data),new Error(i)}}function rh(t){const e=Object.values(t);return Object.assign({},...e)}function ah(t){return Object.entries(t).reduce((e,[n,i])=>{const r=rh(i);return{...e,[n]:r}},{})}function sh(t,e){const n=ah(e);Object.entries(n).forEach(([i,r])=>{t.addResourceBundle(i,"translation",r,!0)})}const{slice:fk,forEach:hk}=[];function pk(t){return hk.call(fk.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}const fc=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,mk=(t,e,n)=>{const i=n||{};i.path=i.path||"/";const r=encodeURIComponent(e);let a=`${t}=${r}`;if(i.maxAge>0){const o=i.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(o)}`}if(i.domain){if(!fc.test(i.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${i.domain}`}if(i.path){if(!fc.test(i.path))throw new TypeError("option path is invalid");a+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},hc={create(t,e,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),i&&(r.domain=i),document.cookie=mk(t,encodeURIComponent(e),r)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){let r=n[i];for(;r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return r.substring(e.length,r.length)}return null},remove(t){this.create(t,"",-1)}};var gk={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document!="undefined")return hc.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:i,cookieDomain:r,cookieOptions:a}=e;n&&typeof document!="undefined"&&hc.create(n,t,i,r,a)}},vk={name:"querystring",lookup(t){var i;let{lookupQuerystring:e}=t,n;if(typeof window!="undefined"){let{search:r}=window.location;!window.location.search&&((i=window.location.hash)==null?void 0:i.indexOf("?"))>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let l=0;l<o.length;l++){const d=o[l].indexOf("=");d>0&&o[l].substring(0,d)===e&&(n=o[l].substring(d+1))}}return n}};let Ki=null;const pc=()=>{if(Ki!==null)return Ki;try{Ki=window!=="undefined"&&window.localStorage!==null;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Ki=!1}return Ki};var yk={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&pc())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&pc()&&window.localStorage.setItem(n,t)}};let zi=null;const mc=()=>{if(zi!==null)return zi;try{zi=window!=="undefined"&&window.sessionStorage!==null;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{zi=!1}return zi};var bk={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&mc())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&mc()&&window.sessionStorage.setItem(n,t)}},kk={name:"navigator",lookup(t){const e=[];if(typeof navigator!="undefined"){const{languages:n,userLanguage:i,language:r}=navigator;if(n)for(let a=0;a<n.length;a++)e.push(n[a]);i&&e.push(i),r&&e.push(r)}return e.length>0?e:void 0}},_k={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const i=e||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},Sk={name:"path",lookup(t){var r;let{lookupFromPathIndex:e}=t;if(typeof window=="undefined")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(r=n[typeof e=="number"?e:0])==null?void 0:r.replace("/",""):void 0}},Nk={name:"subdomain",lookup(t){var r,a;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,i=typeof window!="undefined"&&((a=(r=window.location)==null?void 0:r.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(i)return i[n]}};function Ek(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}}class oh{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=pk(n,this.options||{},Ek()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(gk),this.addDetector(vk),this.addDetector(yk),this.addDetector(bk),this.addDetector(kk),this.addDetector(_k),this.addDetector(Sk),this.addDetector(Nk)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let n=[];return e.forEach(i=>{if(this.detectors[i]){let r=this.detectors[i].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(n=n.concat(r))}}),n=n.map(i=>this.options.convertDetectedLanguage(i)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(e,this.options)}))}}oh.type="languageDetector";function uh(t,e){t.use(e).use(oh).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,r)=>{if(i){const[a,...o]=i.split(",").map(l=>l.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:o[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const wk=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ak={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Ok=t=>Ak[t],xk=t=>t.replace(wk,Ok);let gc={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:xk};function Tk(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gc={...gc,...t}}const Ck={type:"3rdParty",init(t){Tk(t.options.react)}};uh(gt,Ck);const Rk=t=>sh(gt,t),vc={startTime:"UNKNOWN",viewerCount:0,status:"UNKNOWN"},Fk=()=>{const[t,e]=Pe.useState([]),[n,i]=Pe.useState(vc);return{realTimeStreamInfo:n,productsInCart:t,onTextMetadataCue:o=>{const{action:l,data:d,startTime:h,viewerCount:m,status:y}=JSON.parse(o==null?void 0:o.text);switch(l){case"sendivsdatarealtime":{i({startTime:h,viewerCount:m,status:y});break}case"sendaddtocart":{const{id:v,sessionId:x,productId:_,productImageUrl:N,productName:E}=d;e(F=>[...F,{id:v,sessionId:x,productId:_,productImageUrl:N,productName:E}])}break}},resetRealTimeStreamInfo:()=>{i(vc)},setProductsInCart:e}},Su=JSON,Dk=t=>t.toUpperCase(),Ik=t=>{const e={};return t.forEach((n,i)=>{e[i]=n}),e},Pk=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},Lk=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},$k=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};function oa(t,e){if(!!!t)throw new Error(e)}function Mk(t){return typeof t=="object"&&t!==null}function jk(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const Bk=/\r\n|[\n\r]/g;function eu(t,e){let n=0,i=1;for(const r of t.body.matchAll(Bk)){if(typeof r.index=="number"||jk(!1),r.index>=e)break;n=r.index+r[0].length,i+=1}return{line:i,column:e+1-n}}function Uk(t){return lh(t.source,eu(t.source,t.start))}function lh(t,e){const n=t.locationOffset.column-1,i="".padStart(n)+t.body,r=e.line-1,a=t.locationOffset.line-1,o=e.line+a,l=e.line===1?n:0,d=e.column+l,h=`${t.name}:${o}:${d}
|
|
37
|
-
`,m=i.split(/\r\n|[\n\r]/g),y=m[r];if(y.length>120){const
|
|
38
|
-
`)}function
|
|
24
|
+
`)}}function iv(t,e){e.forEach(n=>{if(Zg(tv(n.split("."),t)))throw new Wf(n)})}function We(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 rv={};function Jf(){return typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:rv}var Yf=Object.assign,pa=Object.getOwnPropertyDescriptor,pn=Object.defineProperty,$a=Object.prototype,Yu=[];Object.freeze(Yu);var Il={};Object.freeze(Il);var sv=typeof Proxy!="undefined",av=Object.toString();function Xf(){sv||We("Proxy not available")}function Qf(t){var e=!1;return function(){if(!e)return e=!0,t.apply(this,arguments)}}var Ki=function(){};function rn(t){return typeof t=="function"}function yi(t){var e=typeof t;switch(e){case"string":case"symbol":case"number":return!0}return!1}function Ma(t){return t!==null&&typeof t=="object"}function Wn(t){if(!Ma(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()===av}function Zf(t){var e=t==null?void 0:t.constructor;return e?e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction":!1}function Ba(t,e,n){pn(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function eh(t,e,n){pn(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function Ei(t,e){var n="isMobX"+t;return e.prototype[n]=!0,function(i){return Ma(i)&&i[n]===!0}}function ar(t){return t!=null&&Object.prototype.toString.call(t)==="[object Map]"}function ov(t){var e=Object.getPrototypeOf(t),n=Object.getPrototypeOf(e),i=Object.getPrototypeOf(n);return i===null}function _n(t){return t!=null&&Object.prototype.toString.call(t)==="[object Set]"}var th=typeof Object.getOwnPropertySymbols!="undefined";function uv(t){var e=Object.keys(t);if(!th)return e;var n=Object.getOwnPropertySymbols(t);return n.length?[].concat(e,n.filter(function(i){return $a.propertyIsEnumerable.call(t,i)})):e}var Ua=typeof Reflect!="undefined"&&Reflect.ownKeys?Reflect.ownKeys:th?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames;function nh(t){return t===null?null:typeof t=="object"?""+t:t}function Nn(t,e){return $a.hasOwnProperty.call(t,e)}var lv=Object.getOwnPropertyDescriptors||function(e){var n={};return Ua(e).forEach(function(i){n[i]=pa(e,i)}),n};function Ut(t,e){return!!(t&e)}function jt(t,e,n){return n?t|=e:t&=~e,t}function rd(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function cv(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,fv(i.key),i)}}function or(t,e,n){return e&&cv(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gi(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=hv(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.
|
|
25
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Jn(){return Jn=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},Jn.apply(null,arguments)}function ih(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,Xu(t,e)}function Xu(t,e){return Xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,i){return n.__proto__=i,n},Xu(t,e)}function dv(t,e){if(typeof t!="object"||!t)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 fv(t){var e=dv(t,"string");return typeof e=="symbol"?e:e+""}function hv(t,e){if(t){if(typeof t=="string")return rd(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?rd(t,e):void 0}}var fn=Symbol("mobx-stored-annotations");function mn(t){function e(n,i){if(ls(i))return t.decorate_20223_(n,i);ur(n,i,t)}return Object.assign(e,t)}function ur(t,e,n){Nn(t,fn)||Ba(t,fn,Jn({},t[fn])),kv(n)||(t[fn][e]=n)}function pv(t){return Nn(t,fn)||Ba(t,fn,Jn({},t[fn])),t[fn]}function ls(t){return typeof t=="object"&&typeof t.kind=="string"}var Ce=Symbol("mobx administration"),Qn=function(){function t(n){n===void 0&&(n="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Ge.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 bh(this)},e.reportChanged=function(){Yt(),kh(this),Xt()},e.toString=function(){return this.name_},or(t,[{key:"isBeingObserved",get:function(){return Ut(this.flags_,t.isBeingObservedMask_)},set:function(i){this.flags_=jt(this.flags_,t.isBeingObservedMask_,i)}},{key:"isPendingUnobservation",get:function(){return Ut(this.flags_,t.isPendingUnobservationMask_)},set:function(i){this.flags_=jt(this.flags_,t.isPendingUnobservationMask_,i)}},{key:"diffValue",get:function(){return Ut(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=jt(this.flags_,t.diffValueMask_,i===1)}}])}();Qn.isBeingObservedMask_=1;Qn.isPendingUnobservationMask_=2;Qn.diffValueMask_=4;var Dl=Ei("Atom",Qn);function rh(t,e,n){e===void 0&&(e=Ki),n===void 0&&(n=Ki);var i=new Qn(t);return e!==Ki&&Sy(i,e),n!==Ki&&Ah(i,n),i}function mv(t,e){return Mh(t,e)}function gv(t,e){return Object.is?Object.is(t,e):t===e?t!==0||1/t===1/e:t!==t&&e!==e}var er={structural:mv,default:gv};function bi(t,e,n){return Th(t)?t:Array.isArray(t)?ht.array(t,{name:n}):Wn(t)?ht.object(t,void 0,{name:n}):ar(t)?ht.map(t,{name:n}):_n(t)?ht.set(t,{name:n}):typeof t=="function"&&!Ka(t)&&!ts(t)?Zf(t)?tr(t):es(n,t):t}function vv(t,e,n){if(t==null||Ja(t)||Wa(t)||Ai(t)||lr(t))return t;if(Array.isArray(t))return ht.array(t,{name:n,deep:!1});if(Wn(t))return ht.object(t,void 0,{name:n,deep:!1});if(ar(t))return ht.map(t,{name:n,deep:!1});if(_n(t))return ht.set(t,{name:n,deep:!1})}function ja(t){return t}function yv(t,e){return Mh(t,e)?e:t}var bv="override";function kv(t){return t.annotationType_===bv}function cs(t,e){return{annotationType_:t,options_:e,make_:_v,extend_:wv,decorate_20223_:Sv}}function _v(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(Ka(n.value))return 1;var s=sh(t,this,e,n,!1);return pn(i,e,s),2}function wv(t,e,n,i){var r=sh(t,this,e,n);return t.defineProperty_(e,r,i)}function Sv(t,e){var n=e.kind,i=e.name,r=e.addInitializer,s=this,o=function(h){var m,y,g,O;return Yn((m=(y=s.options_)==null?void 0:y.name)!=null?m:i.toString(),h,(g=(O=s.options_)==null?void 0:O.autoAction)!=null?g:!1)};if(n=="field"){r(function(){ur(this,i,s)});return}if(n=="method"){var l;return Ka(t)||(t=o(t)),(l=this.options_)!=null&&l.bound&&r(function(){var d=this,h=d[i].bind(d);h.isMobxAction=!0,d[i]=h}),t}We("Cannot apply '"+s.annotationType_+"' to '"+String(i)+"' (kind: "+n+"):"+(`
|
|
26
|
+
'`+s.annotationType_+"' can only be used on properties with a function value."))}function Ev(t,e,n,i){e.annotationType_,i.value}function sh(t,e,n,i,r){var s,o,l,d,h,m,y;r===void 0&&(r=ke.safeDescriptors),Ev(t,e,n,i);var g=i.value;if((s=e.options_)!=null&&s.bound){var O;g=g.bind((O=t.proxy_)!=null?O:t.target_)}return{value:Yn((o=(l=e.options_)==null?void 0:l.name)!=null?o:n.toString(),g,(d=(h=e.options_)==null?void 0:h.autoAction)!=null?d:!1,(m=e.options_)!=null&&m.bound?(y=t.proxy_)!=null?y:t.target_:void 0),configurable:r?t.isPlainObject_:!0,enumerable:!1,writable:!r}}function ah(t,e){return{annotationType_:t,options_:e,make_:Nv,extend_:Av,decorate_20223_:Ov}}function Nv(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&&(!Nn(t.target_,e)||!ts(t.target_[e]))&&this.extend_(t,e,n,!1)===null)return 0;if(ts(n.value))return 1;var s=oh(t,this,e,n,!1,!1);return pn(i,e,s),2}function Av(t,e,n,i){var r,s=oh(t,this,e,n,(r=this.options_)==null?void 0:r.bound);return t.defineProperty_(e,s,i)}function Ov(t,e){var n,i=e.name,r=e.addInitializer;return ts(t)||(t=tr(t)),(n=this.options_)!=null&&n.bound&&r(function(){var s=this,o=s[i].bind(s);o.isMobXFlow=!0,s[i]=o}),t}function xv(t,e,n,i){e.annotationType_,i.value}function oh(t,e,n,i,r,s){s===void 0&&(s=ke.safeDescriptors),xv(t,e,n,i);var o=i.value;if(ts(o)||(o=tr(o)),r){var l;o=o.bind((l=t.proxy_)!=null?l:t.target_),o.isMobXFlow=!0}return{value:o,configurable:s?t.isPlainObject_:!0,enumerable:!1,writable:!s}}function Pl(t,e){return{annotationType_:t,options_:e,make_:Tv,extend_:Cv,decorate_20223_:Rv}}function Tv(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Cv(t,e,n,i){return Fv(t,this,e,n),t.defineComputedProperty_(e,Jn({},this.options_,{get:n.get,set:n.set}),i)}function Rv(t,e){var n=this,i=e.name,r=e.addInitializer;return r(function(){var s=cr(this)[Ce],o=Jn({},n.options_,{get:t,context:this});o.name||(o.name="ObservableObject."+i.toString()),s.values_.set(i,new sn(o))}),function(){return this[Ce].getObservablePropValue_(i)}}function Fv(t,e,n,i){e.annotationType_,i.get}function Va(t,e){return{annotationType_:t,options_:e,make_:Iv,extend_:Dv,decorate_20223_:Pv}}function Iv(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function Dv(t,e,n,i){var r,s;return Lv(t,this),t.defineObservableProperty_(e,n.value,(r=(s=this.options_)==null?void 0:s.enhancer)!=null?r:bi,i)}function Pv(t,e){var n=this,i=e.kind,r=e.name,s=new WeakSet;function o(l,d){var h,m,y=cr(l)[Ce],g=new mi(d,(h=(m=n.options_)==null?void 0:m.enhancer)!=null?h:bi,"ObservableObject."+r.toString(),!1);y.values_.set(r,g),s.add(l)}if(i=="accessor")return{get:function(){return s.has(this)||o(this,t.get.call(this)),this[Ce].getObservablePropValue_(r)},set:function(d){return s.has(this)||o(this,d),this[Ce].setObservablePropValue_(r,d)},init:function(d){return s.has(this)||o(this,d),d}}}function Lv(t,e,n,i){e.annotationType_}var $v="true",Mv=uh();function uh(t){return{annotationType_:$v,options_:t,make_:Bv,extend_:Uv,decorate_20223_:jv}}function Bv(t,e,n,i){var r,s;if(n.get)return zn.make_(t,e,n,i);if(n.set){var o=Yn(e.toString(),n.set);return i===t.target_?t.defineProperty_(e,{configurable:ke.safeDescriptors?t.isPlainObject_:!0,set:o})===null?0:2:(pn(i,e,{configurable:!0,set:o}),2)}if(i!==t.target_&&typeof n.value=="function"){var l;if(Zf(n.value)){var d,h=(d=this.options_)!=null&&d.autoBind?tr.bound:tr;return h.make_(t,e,n,i)}var m=(l=this.options_)!=null&&l.autoBind?es.bound:es;return m.make_(t,e,n,i)}var y=((r=this.options_)==null?void 0:r.deep)===!1?ht.ref:ht;if(typeof n.value=="function"&&(s=this.options_)!=null&&s.autoBind){var g;n.value=n.value.bind((g=t.proxy_)!=null?g:t.target_)}return y.make_(t,e,n,i)}function Uv(t,e,n,i){var r,s;if(n.get)return zn.extend_(t,e,n,i);if(n.set)return t.defineProperty_(e,{configurable:ke.safeDescriptors?t.isPlainObject_:!0,set:Yn(e.toString(),n.set)},i);if(typeof n.value=="function"&&(r=this.options_)!=null&&r.autoBind){var o;n.value=n.value.bind((o=t.proxy_)!=null?o:t.target_)}var l=((s=this.options_)==null?void 0:s.deep)===!1?ht.ref:ht;return l.extend_(t,e,n,i)}function jv(t,e){We("'"+this.annotationType_+"' cannot be used as a decorator")}var Vv="observable",Hv="observable.ref",qv="observable.shallow",zv="observable.struct",lh={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};Object.freeze(lh);function Gs(t){return t||lh}var Qu=Va(Vv),Kv=Va(Hv,{enhancer:ja}),Gv=Va(qv,{enhancer:vv}),Wv=Va(zv,{enhancer:yv}),ch=mn(Qu);function Ws(t){return t.deep===!0?bi:t.deep===!1?ja:Yv(t.defaultDecorator)}function Jv(t){var e;return t?(e=t.defaultDecorator)!=null?e:uh(t):void 0}function Yv(t){var e,n;return t&&(e=(n=t.options_)==null?void 0:n.enhancer)!=null?e:bi}function dh(t,e,n){if(ls(e))return Qu.decorate_20223_(t,e);if(yi(e)){ur(t,e,Qu);return}return Th(t)?t:Wn(t)?ht.object(t,e,n):Array.isArray(t)?ht.array(t,e):ar(t)?ht.map(t,e):_n(t)?ht.set(t,e):typeof t=="object"&&t!==null?t:ht.box(t,e)}Yf(dh,ch);var Xv={box:function(e,n){var i=Gs(n);return new mi(e,Ws(i),i.name,!0,i.equals)},array:function(e,n){var i=Gs(n);return(ke.useProxies===!1||i.proxy===!1?zy:Py)(e,Ws(i),i.name)},map:function(e,n){var i=Gs(n);return new Fh(e,Ws(i),i.name)},set:function(e,n){var i=Gs(n);return new Ih(e,Ws(i),i.name)},object:function(e,n,i){return Oi(function(){return Ey(ke.useProxies===!1||(i==null?void 0:i.proxy)===!1?cr({},i):Ry({},i),e,n)})},ref:mn(Kv),shallow:mn(Gv),deep:ch,struct:mn(Wv)},ht=Yf(dh,Xv),fh="computed",Qv="computed.struct",Zu=Pl(fh),Zv=Pl(Qv,{equals:er.structural}),zn=function(e,n){if(ls(n))return Zu.decorate_20223_(e,n);if(yi(n))return ur(e,n,Zu);if(Wn(e))return mn(Pl(fh,e));var i=Wn(n)?n:{};return i.get=e,i.name||(i.name=e.name||""),new sn(i)};Object.assign(zn,Zu);zn.struct=mn(Zv);var sd,ad,ma=0,ey=1,ty=(sd=(ad=pa(function(){},"name"))==null?void 0:ad.configurable)!=null?sd:!1,od={value:"action",configurable:!0,writable:!1,enumerable:!1};function Yn(t,e,n,i){n===void 0&&(n=!1);function r(){return ny(t,n,e,i||this,arguments)}return r.isMobxAction=!0,r.toString=function(){return e.toString()},ty&&(od.value=t,pn(r,"name",od)),r}function ny(t,e,n,i,r){var s=iy(t,e);try{return n.apply(i,r)}catch(o){throw s.error_=o,o}finally{ry(s)}}function iy(t,e,n,i){var r=!1,s=0,o=ke.trackingDerivation,l=!e||!o;Yt();var d=ke.allowStateChanges;l&&(Ni(),d=Ha(!0));var h=Ll(!0),m={runAsAction_:l,prevDerivation_:o,prevAllowStateChanges_:d,prevAllowStateReads_:h,notifySpy_:r,startTime_:s,actionId_:ey++,parentActionId_:ma};return ma=m.actionId_,m}function ry(t){ma!==t.actionId_&&We(30),ma=t.parentActionId_,t.error_!==void 0&&(ke.suppressReactionErrors=!0),qa(t.prevAllowStateChanges_),qr(t.prevAllowStateReads_),Xt(),t.runAsAction_&&An(t.prevDerivation_),ke.suppressReactionErrors=!1}function hh(t,e){var n=Ha(t);try{return e()}finally{qa(n)}}function Ha(t){var e=ke.allowStateChanges;return ke.allowStateChanges=t,e}function qa(t){ke.allowStateChanges=t}var mi=function(t){function e(i,r,s,o,l){var d;return s===void 0&&(s="ObservableValue"),l===void 0&&(l=er.default),d=t.call(this,s)||this,d.enhancer=void 0,d.name_=void 0,d.equals=void 0,d.hasUnreportedChange_=!1,d.interceptors_=void 0,d.changeListeners_=void 0,d.value_=void 0,d.dehancer=void 0,d.enhancer=r,d.name_=s,d.equals=l,d.value_=r(i,void 0,s),d}ih(e,t);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!==ke.UNCHANGED&&this.setNewValue_(r)},n.prepareNewValue_=function(r){if(Wt(this)){var s=Jt(this,{object:this,type:gn,newValue:r});if(!s)return ke.UNCHANGED;r=s.newValue}return r=this.enhancer(r,this.value_,this.name_),this.equals(this.value_,r)?ke.UNCHANGED:r},n.setNewValue_=function(r){var s=this.value_;this.value_=r,this.reportChanged(),tn(this)&&nn(this,{type:gn,object:this,newValue:r,oldValue:s})},n.get=function(){return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(r){return ds(this,r)},n.observe_=function(r,s){return s&&r({observableKind:"value",debugObjectName:this.name_,object:this,type:gn,newValue:this.value_,oldValue:void 0}),fs(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 nh(this.get())},n[Symbol.toPrimitive]=function(){return this.valueOf()},e}(Qn),sn=function(){function t(n){this.dependenciesState_=Ge.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Ge.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new va(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=ga.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||We(31),this.derivation=n.get,this.name_=n.name||"ComputedValue",n.set&&(this.setter_=Yn("ComputedValue-setter",n.set)),this.equals_=n.equals||(n.compareStructural||n.struct?er.structural:er.default),this.scope_=n.context,this.requiresReaction_=n.requiresReaction,this.keepAlive_=!!n.keepAlive}var e=t.prototype;return e.onBecomeStale_=function(){uy(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&&We(32,this.name_,this.derivation),ke.inBatch===0&&this.observers_.size===0&&!this.keepAlive_)el(this)&&(this.warnAboutUntrackedRead_(),Yt(),this.value_=this.computeValue_(!1),Xt());else if(bh(this),el(this)){var i=ke.trackingContext;this.keepAlive_&&!i&&(ke.trackingContext=this),this.trackAndCompute()&&oy(this),ke.trackingContext=i}var r=this.value_;if(na(r))throw r.cause;return r},e.set=function(i){if(this.setter_){this.isRunningSetter&&We(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,i)}finally{this.isRunningSetter=!1}}else We(34,this.name_)},e.trackAndCompute=function(){var i=this.value_,r=this.dependenciesState_===Ge.NOT_TRACKING_,s=this.computeValue_(!0),o=r||na(i)||na(s)||!this.equals_(i,s);return o&&(this.value_=s),o},e.computeValue_=function(i){this.isComputing=!0;var r=Ha(!1),s;if(i)s=ph(this,this.derivation,this.scope_);else if(ke.disableErrorBoundaries===!0)s=this.derivation.call(this.scope_);else try{s=this.derivation.call(this.scope_)}catch(o){s=new va(o)}return qa(r),this.isComputing=!1,s},e.suspend_=function(){this.keepAlive_||(tl(this),this.value_=void 0)},e.observe_=function(i,r){var s=this,o=!0,l=void 0;return Ga(function(){var d=s.get();if(!o||r){var h=Ni();i({observableKind:"computed",debugObjectName:s.name_,type:gn,object:s,newValue:d,oldValue:l}),An(h)}o=!1,l=d})},e.warnAboutUntrackedRead_=function(){},e.toString=function(){return this.name_+"["+this.derivation.toString()+"]"},e.valueOf=function(){return nh(this.get())},e[Symbol.toPrimitive]=function(){return this.valueOf()},or(t,[{key:"isComputing",get:function(){return Ut(this.flags_,t.isComputingMask_)},set:function(i){this.flags_=jt(this.flags_,t.isComputingMask_,i)}},{key:"isRunningSetter",get:function(){return Ut(this.flags_,t.isRunningSetterMask_)},set:function(i){this.flags_=jt(this.flags_,t.isRunningSetterMask_,i)}},{key:"isBeingObserved",get:function(){return Ut(this.flags_,t.isBeingObservedMask_)},set:function(i){this.flags_=jt(this.flags_,t.isBeingObservedMask_,i)}},{key:"isPendingUnobservation",get:function(){return Ut(this.flags_,t.isPendingUnobservationMask_)},set:function(i){this.flags_=jt(this.flags_,t.isPendingUnobservationMask_,i)}},{key:"diffValue",get:function(){return Ut(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=jt(this.flags_,t.diffValueMask_,i===1)}}])}();sn.isComputingMask_=1;sn.isRunningSetterMask_=2;sn.isBeingObservedMask_=4;sn.isPendingUnobservationMask_=8;sn.diffValueMask_=16;var za=Ei("ComputedValue",sn),Ge;(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_"})(Ge||(Ge={}));var ga;(function(t){t[t.NONE=0]="NONE",t[t.LOG=1]="LOG",t[t.BREAK=2]="BREAK"})(ga||(ga={}));var va=function(e){this.cause=void 0,this.cause=e};function na(t){return t instanceof va}function el(t){switch(t.dependenciesState_){case Ge.UP_TO_DATE_:return!1;case Ge.NOT_TRACKING_:case Ge.STALE_:return!0;case Ge.POSSIBLY_STALE_:{for(var e=Ll(!0),n=Ni(),i=t.observing_,r=i.length,s=0;s<r;s++){var o=i[s];if(za(o)){if(ke.disableErrorBoundaries)o.get();else try{o.get()}catch{return An(n),qr(e),!0}if(t.dependenciesState_===Ge.STALE_)return An(n),qr(e),!0}}return gh(t),An(n),qr(e),!1}}}function ph(t,e,n){var i=Ll(!0);gh(t),t.newObserving_=new Array(t.runId_===0?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++ke.runId;var r=ke.trackingDerivation;ke.trackingDerivation=t,ke.inBatch++;var s;if(ke.disableErrorBoundaries===!0)s=e.call(n);else try{s=e.call(n)}catch(o){s=new va(o)}return ke.inBatch--,ke.trackingDerivation=r,sy(t),qr(i),s}function sy(t){for(var e=t.observing_,n=t.observing_=t.newObserving_,i=Ge.UP_TO_DATE_,r=0,s=t.unboundDepsCount_,o=0;o<s;o++){var l=n[o];l.diffValue===0&&(l.diffValue=1,r!==o&&(n[r]=l),r++),l.dependenciesState_>i&&(i=l.dependenciesState_)}for(n.length=r,t.newObserving_=null,s=e.length;s--;){var d=e[s];d.diffValue===0&&vh(d,t),d.diffValue=0}for(;r--;){var h=n[r];h.diffValue===1&&(h.diffValue=0,ay(h,t))}i!==Ge.UP_TO_DATE_&&(t.dependenciesState_=i,t.onBecomeStale_())}function tl(t){var e=t.observing_;t.observing_=[];for(var n=e.length;n--;)vh(e[n],t);t.dependenciesState_=Ge.NOT_TRACKING_}function mh(t){var e=Ni();try{return t()}finally{An(e)}}function Ni(){var t=ke.trackingDerivation;return ke.trackingDerivation=null,t}function An(t){ke.trackingDerivation=t}function Ll(t){var e=ke.allowStateReads;return ke.allowStateReads=t,e}function qr(t){ke.allowStateReads=t}function gh(t){if(t.dependenciesState_!==Ge.UP_TO_DATE_){t.dependenciesState_=Ge.UP_TO_DATE_;for(var e=t.observing_,n=e.length;n--;)e[n].lowestObserverState_=Ge.UP_TO_DATE_}}var pu=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},mu=!0,ke=function(){var t=Jf();return t.__mobxInstanceCount>0&&!t.__mobxGlobals&&(mu=!1),t.__mobxGlobals&&t.__mobxGlobals.version!==new pu().version&&(mu=!1),mu?t.__mobxGlobals?(t.__mobxInstanceCount+=1,t.__mobxGlobals.UNCHANGED||(t.__mobxGlobals.UNCHANGED={}),t.__mobxGlobals):(t.__mobxInstanceCount=1,t.__mobxGlobals=new pu):(setTimeout(function(){We(35)},1),new pu)}();function ay(t,e){t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_&&(t.lowestObserverState_=e.dependenciesState_)}function vh(t,e){t.observers_.delete(e),t.observers_.size===0&&yh(t)}function yh(t){t.isPendingUnobservation===!1&&(t.isPendingUnobservation=!0,ke.pendingUnobservations.push(t))}function Yt(){ke.inBatch++}function Xt(){if(--ke.inBatch===0){_h();for(var t=ke.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 sn&&n.suspend_())}ke.pendingUnobservations=[]}}function bh(t){var e=ke.trackingDerivation;return e!==null?(e.runId_!==t.lastAccessedBy_&&(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved&&ke.trackingContext&&(t.isBeingObserved=!0,t.onBO())),t.isBeingObserved):(t.observers_.size===0&&ke.inBatch>0&&yh(t),!1)}function kh(t){t.lowestObserverState_!==Ge.STALE_&&(t.lowestObserverState_=Ge.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ge.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Ge.STALE_}))}function oy(t){t.lowestObserverState_!==Ge.STALE_&&(t.lowestObserverState_=Ge.STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ge.POSSIBLY_STALE_?e.dependenciesState_=Ge.STALE_:e.dependenciesState_===Ge.UP_TO_DATE_&&(t.lowestObserverState_=Ge.UP_TO_DATE_)}))}function uy(t){t.lowestObserverState_===Ge.UP_TO_DATE_&&(t.lowestObserverState_=Ge.POSSIBLY_STALE_,t.observers_.forEach(function(e){e.dependenciesState_===Ge.UP_TO_DATE_&&(e.dependenciesState_=Ge.POSSIBLY_STALE_,e.onBecomeStale_())}))}var xn=function(){function t(n,i,r,s){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_=Ge.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=ga.NONE,this.name_=n,this.onInvalidate_=i,this.errorHandler_=r,this.requiresObservable_=s}var e=t.prototype;return e.onBecomeStale_=function(){this.schedule_()},e.schedule_=function(){this.isScheduled||(this.isScheduled=!0,ke.pendingReactions.push(this),_h())},e.runReaction_=function(){if(!this.isDisposed){Yt(),this.isScheduled=!1;var i=ke.trackingContext;if(ke.trackingContext=this,el(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(r){this.reportExceptionInDerivation_(r)}}ke.trackingContext=i,Xt()}},e.track=function(i){if(!this.isDisposed){Yt(),this.isRunning=!0;var r=ke.trackingContext;ke.trackingContext=this;var s=ph(this,i,void 0);ke.trackingContext=r,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&tl(this),na(s)&&this.reportExceptionInDerivation_(s.cause),Xt()}},e.reportExceptionInDerivation_=function(i){var r=this;if(this.errorHandler_){this.errorHandler_(i,this);return}if(ke.disableErrorBoundaries)throw i;var s="[mobx] uncaught error in '"+this+"'";ke.suppressReactionErrors||console.error(s,i),ke.globalReactionErrorHandlers.forEach(function(o){return o(i,r)})},e.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.isRunning||(Yt(),tl(this),Xt()))},e.getDisposer_=function(i){var r=this,s=function o(){r.dispose(),i==null||i.removeEventListener==null||i.removeEventListener("abort",o)};return i==null||i.addEventListener==null||i.addEventListener("abort",s),s[Ce]=this,s},e.toString=function(){return"Reaction["+this.name_+"]"},e.trace=function(i){},or(t,[{key:"isDisposed",get:function(){return Ut(this.flags_,t.isDisposedMask_)},set:function(i){this.flags_=jt(this.flags_,t.isDisposedMask_,i)}},{key:"isScheduled",get:function(){return Ut(this.flags_,t.isScheduledMask_)},set:function(i){this.flags_=jt(this.flags_,t.isScheduledMask_,i)}},{key:"isTrackPending",get:function(){return Ut(this.flags_,t.isTrackPendingMask_)},set:function(i){this.flags_=jt(this.flags_,t.isTrackPendingMask_,i)}},{key:"isRunning",get:function(){return Ut(this.flags_,t.isRunningMask_)},set:function(i){this.flags_=jt(this.flags_,t.isRunningMask_,i)}},{key:"diffValue",get:function(){return Ut(this.flags_,t.diffValueMask_)?1:0},set:function(i){this.flags_=jt(this.flags_,t.diffValueMask_,i===1)}}])}();xn.isDisposedMask_=1;xn.isScheduledMask_=2;xn.isTrackPendingMask_=4;xn.isRunningMask_=8;xn.diffValueMask_=16;var ly=100,cy=function(e){return e()};function _h(){ke.inBatch>0||ke.isRunningReactions||cy(dy)}function dy(){ke.isRunningReactions=!0;for(var t=ke.pendingReactions,e=0;t.length>0;){++e===ly&&(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_()}ke.isRunningReactions=!1}var ya=Ei("Reaction",xn);function zr(){return!1}function fy(t){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}}var wh="action",hy="action.bound",Sh="autoAction",py="autoAction.bound",my="<unnamed action>",nl=cs(wh),gy=cs(hy,{bound:!0}),il=cs(Sh,{autoAction:!0}),vy=cs(py,{autoAction:!0,bound:!0});function Eh(t){var e=function(i,r){if(rn(i))return Yn(i.name||my,i,t);if(rn(r))return Yn(i,r,t);if(ls(r))return(t?il:nl).decorate_20223_(i,r);if(yi(r))return ur(i,r,t?il:nl);if(yi(i))return mn(cs(t?Sh:wh,{name:i,autoAction:t}))};return e}var Bt=Eh(!1);Object.assign(Bt,nl);var es=Eh(!0);Object.assign(es,il);Bt.bound=mn(gy);es.bound=mn(vy);function Ka(t){return rn(t)&&t.isMobxAction===!0}function Ga(t,e){var n,i,r,s;e===void 0&&(e=Il);var o=(n=(i=e)==null?void 0:i.name)!=null?n:"Autorun",l=!e.scheduler&&!e.delay,d;if(l)d=new xn(o,function(){this.track(y)},e.onError,e.requiresObservable);else{var h=Nh(e),m=!1;d=new xn(o,function(){m||(m=!0,h(function(){m=!1,d.isDisposed||d.track(y)}))},e.onError,e.requiresObservable)}function y(){t(d)}return(r=e)!=null&&(r=r.signal)!=null&&r.aborted||d.schedule_(),d.getDisposer_((s=e)==null?void 0:s.signal)}var yy=function(e){return e()};function Nh(t){return t.scheduler?t.scheduler:t.delay?function(e){return setTimeout(e,t.delay)}:yy}function by(t,e,n){var i,r,s;n===void 0&&(n=Il);var o=(i=n.name)!=null?i:"Reaction",l=Bt(o,n.onError?ky(n.onError,e):e),d=!n.scheduler&&!n.delay,h=Nh(n),m=!0,y=!1,g,O=n.compareStructural?er.structural:n.equals||er.default,_=new xn(o,function(){m||d?S():y||(y=!0,h(S))},n.onError,n.requiresObservable);function S(){if(y=!1,!_.isDisposed){var E=!1,R=g;_.track(function(){var j=hh(!1,function(){return t(_)});E=m||!O(g,j),g=j}),(m&&n.fireImmediately||!m&&E)&&l(g,R,_),m=!1}}return(r=n)!=null&&(r=r.signal)!=null&&r.aborted||_.schedule_(),_.getDisposer_((s=n)==null?void 0:s.signal)}function ky(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}var _y="onBO",wy="onBUO";function Sy(t,e,n){return Oh(_y,t,e,n)}function Ah(t,e,n){return Oh(wy,t,e,n)}function Oh(t,e,n,i){var r=rl(e),s=rn(i)?i:n,o=t+"L";return r[o]?r[o].add(s):r[o]=new Set([s]),function(){var l=r[o];l&&(l.delete(s),l.size===0&&delete r[o])}}function Ey(t,e,n,i){var r=lv(e);return Oi(function(){var s=cr(t,i)[Ce];Ua(r).forEach(function(o){s.extend_(o,r[o],n&&o in n?n[o]:!0)})}),t}var Ny=0;function xh(){this.message="FLOW_CANCELLED"}xh.prototype=Object.create(Error.prototype);var gu=ah("flow"),Ay=ah("flow.bound",{bound:!0}),tr=Object.assign(function(e,n){if(ls(n))return gu.decorate_20223_(e,n);if(yi(n))return ur(e,n,gu);var i=e,r=i.name||"<unnamed flow>",s=function(){var l=this,d=arguments,h=++Ny,m=Bt(r+" - runid: "+h+" - init",i).apply(l,d),y,g=void 0,O=new Promise(function(_,S){var E=0;y=S;function R(z){g=void 0;var X;try{X=Bt(r+" - runid: "+h+" - yield "+E++,m.next).call(m,z)}catch(ne){return S(ne)}J(X)}function j(z){g=void 0;var X;try{X=Bt(r+" - runid: "+h+" - yield "+E++,m.throw).call(m,z)}catch(ne){return S(ne)}J(X)}function J(z){if(rn(z==null?void 0:z.then)){z.then(J,S);return}return z.done?_(z.value):(g=Promise.resolve(z.value),g.then(R,j))}R(void 0)});return O.cancel=Bt(r+" - runid: "+h+" - cancel",function(){try{g&&ud(g);var _=m.return(void 0),S=Promise.resolve(_.value);S.then(Ki,Ki),ud(S),y(new xh)}catch(E){y(E)}}),O};return s.isMobXFlow=!0,s},gu);tr.bound=mn(Ay);function ud(t){rn(t.cancel)&&t.cancel()}function ts(t){return(t==null?void 0:t.isMobXFlow)===!0}function Oy(t,e){return t?Ja(t)||!!t[Ce]||Dl(t)||ya(t)||za(t):!1}function Th(t){return Oy(t)}function wn(t,e){e===void 0&&(e=void 0),Yt();try{return t.apply(e)}finally{Xt()}}function xy(t,e,n){return arguments.length===1||e&&typeof e=="object"?Ty(t,e):Ch(t,e,{})}function Ch(t,e,n){var i;if(typeof n.timeout=="number"){var r=new Error("WHEN_TIMEOUT");i=setTimeout(function(){if(!o[Ce].isDisposed)if(o(),n.onError)n.onError(r);else throw r},n.timeout)}n.name="When";var s=Yn("When-effect",e),o=Ga(function(l){var d=hh(!1,t);d&&(l.dispose(),i&&clearTimeout(i),s())},n);return o}function Ty(t,e){var n;if(e!=null&&(n=e.signal)!=null&&n.aborted)return Object.assign(Promise.reject(new Error("WHEN_ABORTED")),{cancel:function(){return null}});var i,r,s=new Promise(function(o,l){var d,h=Ch(t,o,Jn({},e,{onError:l}));i=function(){h(),l(new Error("WHEN_CANCELLED"))},r=function(){h(),l(new Error("WHEN_ABORTED"))},e==null||(d=e.signal)==null||d.addEventListener==null||d.addEventListener("abort",r)}).finally(function(){var o;return e==null||(o=e.signal)==null||o.removeEventListener==null?void 0:o.removeEventListener("abort",r)});return s.cancel=i,s}function Bi(t){return t[Ce]}var Cy={has:function(e,n){return Bi(e).has_(n)},get:function(e,n){return Bi(e).get_(n)},set:function(e,n,i){var r;return yi(n)?(r=Bi(e).set_(n,i,!0))!=null?r:!0:!1},deleteProperty:function(e,n){var i;return yi(n)?(i=Bi(e).delete_(n,!0))!=null?i:!0:!1},defineProperty:function(e,n,i){var r;return(r=Bi(e).defineProperty_(n,i))!=null?r:!0},ownKeys:function(e){return Bi(e).ownKeys_()},preventExtensions:function(e){We(13)}};function Ry(t,e){var n,i;return Xf(),t=cr(t,e),(i=(n=t[Ce]).proxy_)!=null?i:n.proxy_=new Proxy(t,Cy)}function Wt(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function ds(t,e){var n=t.interceptors_||(t.interceptors_=[]);return n.push(e),Qf(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function Jt(t,e){var n=Ni();try{for(var i=[].concat(t.interceptors_||[]),r=0,s=i.length;r<s&&(e=i[r](e),e&&!e.type&&We(14),!!e);r++);return e}finally{An(n)}}function tn(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function fs(t,e){var n=t.changeListeners_||(t.changeListeners_=[]);return n.push(e),Qf(function(){var i=n.indexOf(e);i!==-1&&n.splice(i,1)})}function nn(t,e){var n=Ni(),i=t.changeListeners_;if(i){i=i.slice();for(var r=0,s=i.length;r<s;r++)i[r](e);An(n)}}function Fy(t,e,n){return Oi(function(){var i,r=cr(t,n)[Ce];(i=e)!=null||(e=pv(t)),Ua(e).forEach(function(s){return r.make_(s,e[s])})}),t}var ld="splice",gn="update",Iy=1e4,Dy={get:function(e,n){var i=e[Ce];return n===Ce?i:n==="length"?i.getArrayLength_():typeof n=="string"&&!isNaN(n)?i.get_(parseInt(n)):Nn(ba,n)?ba[n]:e[n]},set:function(e,n,i){var r=e[Ce];return n==="length"&&r.setArrayLength_(i),typeof n=="symbol"||isNaN(n)?e[n]=i:r.set_(parseInt(n),i),!0},preventExtensions:function(){We(15)}},$l=function(){function t(n,i,r,s){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_=s,this.atom_=new Qn(n),this.enhancer_=function(o,l){return i(o,l,"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 ds(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}),fs(this,i)},e.getArrayLength_=function(){return this.atom_.reportObserved(),this.values_.length},e.setArrayLength_=function(i){(typeof i!="number"||isNaN(i)||i<0)&&We("Out of range: "+i);var r=this.values_.length;if(i!==r)if(i>r){for(var s=new Array(i-r),o=0;o<i-r;o++)s[o]=void 0;this.spliceWithArray_(r,0,s)}else this.spliceWithArray_(i,r-i)},e.updateArrayLength_=function(i,r){i!==this.lastKnownLength_&&We(16),this.lastKnownLength_+=r,this.legacyMode_&&r>0&&$h(i+r+1)},e.spliceWithArray_=function(i,r,s){var o=this;this.atom_;var l=this.values_.length;if(i===void 0?i=0:i>l?i=l:i<0&&(i=Math.max(0,l+i)),arguments.length===1?r=l-i:r==null?r=0:r=Math.max(0,Math.min(r,l-i)),s===void 0&&(s=Yu),Wt(this)){var d=Jt(this,{object:this.proxy_,type:ld,index:i,removedCount:r,added:s});if(!d)return Yu;r=d.removedCount,s=d.added}if(s=s.length===0?s:s.map(function(y){return o.enhancer_(y,void 0)}),this.legacyMode_){var h=s.length-r;this.updateArrayLength_(l,h)}var m=this.spliceItemsIntoValues_(i,r,s);return(r!==0||s.length!==0)&&this.notifyArraySplice_(i,s,m),this.dehanceValues_(m)},e.spliceItemsIntoValues_=function(i,r,s){if(s.length<Iy){var o;return(o=this.values_).splice.apply(o,[i,r].concat(s))}else{var l=this.values_.slice(i,i+r),d=this.values_.slice(i+r);this.values_.length+=s.length-r;for(var h=0;h<s.length;h++)this.values_[i+h]=s[h];for(var m=0;m<d.length;m++)this.values_[i+s.length+m]=d[m];return l}},e.notifyArrayChildUpdate_=function(i,r,s){var o=!this.owned_&&zr(),l=tn(this),d=l||o?{observableKind:"array",object:this.proxy_,type:gn,debugObjectName:this.atom_.name_,index:i,newValue:r,oldValue:s}:null;this.atom_.reportChanged(),l&&nn(this,d)},e.notifyArraySplice_=function(i,r,s){var o=!this.owned_&&zr(),l=tn(this),d=l||o?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:ld,index:i,removed:s,added:r,removedCount:s.length,addedCount:r.length}:null;this.atom_.reportChanged(),l&&nn(this,d)},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 s=this.values_;if(this.legacyMode_&&i>s.length&&We(17,i,s.length),i<s.length){this.atom_;var o=s[i];if(Wt(this)){var l=Jt(this,{type:gn,object:this.proxy_,index:i,newValue:r});if(!l)return;r=l.newValue}r=this.enhancer_(r,o);var d=r!==o;d&&(s[i]=r,this.notifyArrayChildUpdate_(i,r,o))}else{for(var h=new Array(i+1-s.length),m=0;m<h.length-1;m++)h[m]=void 0;h[h.length-1]=r,this.spliceWithArray_(s.length,0,h)}},t}();function Py(t,e,n,i){return n===void 0&&(n="ObservableArray"),i===void 0&&(i=!1),Xf(),Oi(function(){var r=new $l(n,e,i,!1);eh(r.values_,Ce,r);var s=new Proxy(r.values_,Dy);return r.proxy_=s,t&&t.length&&r.spliceWithArray_(0,0,t),s})}var ba={clear:function(){return this.splice(0)},replace:function(e){var n=this[Ce];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),s=2;s<i;s++)r[s-2]=arguments[s];var o=this[Ce];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,n)}return o.spliceWithArray_(e,n,r)},spliceWithArray:function(e,n,i){return this[Ce].spliceWithArray_(e,n,i)},push:function(){for(var e=this[Ce],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[Ce].values_.length-1,0),1)[0]},shift:function(){return this.splice(0,1)[0]},unshift:function(){for(var e=this[Ce],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 ke.trackingDerivation&&We(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){ke.trackingDerivation&&We(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){var n=this[Ce],i=n.dehanceValues_(n.values_).indexOf(e);return i>-1?(this.splice(i,1),!0):!1}};nt("at",Ht);nt("concat",Ht);nt("flat",Ht);nt("includes",Ht);nt("indexOf",Ht);nt("join",Ht);nt("lastIndexOf",Ht);nt("slice",Ht);nt("toString",Ht);nt("toLocaleString",Ht);nt("toSorted",Ht);nt("toSpliced",Ht);nt("with",Ht);nt("every",an);nt("filter",an);nt("find",an);nt("findIndex",an);nt("findLast",an);nt("findLastIndex",an);nt("flatMap",an);nt("forEach",an);nt("map",an);nt("some",an);nt("toReversed",an);nt("reduce",Rh);nt("reduceRight",Rh);function nt(t,e){typeof Array.prototype[t]=="function"&&(ba[t]=e(t))}function Ht(t){return function(){var e=this[Ce];e.atom_.reportObserved();var n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function an(t){return function(e,n){var i=this,r=this[Ce];r.atom_.reportObserved();var s=r.dehanceValues_(r.values_);return s[t](function(o,l){return e.call(n,o,l,i)})}}function Rh(t){return function(){var e=this,n=this[Ce];n.atom_.reportObserved();var i=n.dehanceValues_(n.values_),r=arguments[0];return arguments[0]=function(s,o,l){return r(s,o,l,e)},i[t].apply(i,arguments)}}var Ly=Ei("ObservableArrayAdministration",$l);function Wa(t){return Ma(t)&&Ly(t[Ce])}var $y={},Kn="add",ka="delete",Fh=function(){function t(n,i,r){var s=this;i===void 0&&(i=bi),r===void 0&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[Ce]=$y,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,rn(Map)||We(18),Oi(function(){s.keysAtom_=rh("ObservableMap.keys()"),s.data_=new Map,s.hasMap_=new Map,n&&s.merge(n)})}var e=t.prototype;return e.has_=function(i){return this.data_.has(i)},e.has=function(i){var r=this;if(!ke.trackingDerivation)return this.has_(i);var s=this.hasMap_.get(i);if(!s){var o=s=new mi(this.has_(i),ja,"ObservableMap.key?",!1);this.hasMap_.set(i,o),Ah(o,function(){return r.hasMap_.delete(i)})}return s.get()},e.set=function(i,r){var s=this.has_(i);if(Wt(this)){var o=Jt(this,{type:s?gn:Kn,object:this,newValue:r,name:i});if(!o)return this;r=o.newValue}return s?this.updateValue_(i,r):this.addValue_(i,r),this},e.delete=function(i){var r=this;if(this.keysAtom_,Wt(this)){var s=Jt(this,{type:ka,object:this,name:i});if(!s)return!1}if(this.has_(i)){var o=zr(),l=tn(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:ka,object:this,oldValue:this.data_.get(i).value_,name:i}:null;return wn(function(){var h;r.keysAtom_.reportChanged(),(h=r.hasMap_.get(i))==null||h.setNewValue_(!1);var m=r.data_.get(i);m.setNewValue_(void 0),r.data_.delete(i)}),l&&nn(this,d),!0}return!1},e.updateValue_=function(i,r){var s=this.data_.get(i);if(r=s.prepareNewValue_(r),r!==ke.UNCHANGED){var o=zr(),l=tn(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:gn,object:this,oldValue:s.value_,name:i,newValue:r}:null;s.setNewValue_(r),l&&nn(this,d)}},e.addValue_=function(i,r){var s=this;this.keysAtom_,wn(function(){var h,m=new mi(r,s.enhancer_,"ObservableMap.key",!1);s.data_.set(i,m),r=m.value_,(h=s.hasMap_.get(i))==null||h.setNewValue_(!0),s.keysAtom_.reportChanged()});var o=zr(),l=tn(this),d=l||o?{observableKind:"map",debugObjectName:this.name_,type:Kn,object:this,name:i,newValue:r}:null;l&&nn(this,d)},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 ns({next:function(){var o=r.next(),l=o.done,d=o.value;return{done:l,value:l?void 0:i.get(d)}}})},e.entries=function(){var i=this,r=this.keys();return ns({next:function(){var o=r.next(),l=o.done,d=o.value;return{done:l,value:l?void 0:[d,i.get(d)]}}})},e[Symbol.iterator]=function(){return this.entries()},e.forEach=function(i,r){for(var s=Gi(this),o;!(o=s()).done;){var l=o.value,d=l[0],h=l[1];i.call(r,h,d,this)}},e.merge=function(i){var r=this;return Ai(i)&&(i=new Map(i)),wn(function(){Wn(i)?uv(i).forEach(function(s){return r.set(s,i[s])}):Array.isArray(i)?i.forEach(function(s){var o=s[0],l=s[1];return r.set(o,l)}):ar(i)?(ov(i)||We(19,i),i.forEach(function(s,o){return r.set(o,s)})):i!=null&&We(20,i)}),this},e.clear=function(){var i=this;wn(function(){mh(function(){for(var r=Gi(i.keys()),s;!(s=r()).done;){var o=s.value;i.delete(o)}})})},e.replace=function(i){var r=this;return wn(function(){for(var s=My(i),o=new Map,l=!1,d=Gi(r.data_.keys()),h;!(h=d()).done;){var m=h.value;if(!s.has(m)){var y=r.delete(m);if(y)l=!0;else{var g=r.data_.get(m);o.set(m,g)}}}for(var O=Gi(s.entries()),_;!(_=O()).done;){var S=_.value,E=S[0],R=S[1],j=r.data_.has(E);if(r.set(E,R),r.data_.has(E)){var J=r.data_.get(E);o.set(E,J),j||(l=!0)}}if(!l)if(r.data_.size!==o.size)r.keysAtom_.reportChanged();else for(var z=r.data_.keys(),X=o.keys(),ne=z.next(),oe=X.next();!ne.done;){if(ne.value!==oe.value){r.keysAtom_.reportChanged();break}ne=z.next(),oe=X.next()}r.data_=o}),this},e.toString=function(){return"[object ObservableMap]"},e.toJSON=function(){return Array.from(this)},e.observe_=function(i,r){return fs(this,i)},e.intercept_=function(i){return ds(this,i)},or(t,[{key:"size",get:function(){return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Map"}}])}(),Ai=Ei("ObservableMap",Fh);function My(t){if(ar(t)||Ai(t))return t;if(Array.isArray(t))return new Map(t);if(Wn(t)){var e=new Map;for(var n in t)e.set(n,t[n]);return e}else return We(21,t)}var By={},Ih=function(){function t(n,i,r){var s=this;i===void 0&&(i=bi),r===void 0&&(r="ObservableSet"),this.name_=void 0,this[Ce]=By,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,rn(Set)||We(22),this.enhancer_=function(o,l){return i(o,l,r)},Oi(function(){s.atom_=rh(s.name_),n&&s.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;wn(function(){mh(function(){for(var r=Gi(i.data_.values()),s;!(s=r()).done;){var o=s.value;i.delete(o)}})})},e.forEach=function(i,r){for(var s=Gi(this),o;!(o=s()).done;){var l=o.value;i.call(r,l,l,this)}},e.add=function(i){var r=this;if(this.atom_,Wt(this)){var s=Jt(this,{type:Kn,object:this,newValue:i});if(!s)return this}if(!this.has(i)){wn(function(){r.data_.add(r.enhancer_(i,void 0)),r.atom_.reportChanged()});var o=!1,l=tn(this),d=l||o?{observableKind:"set",debugObjectName:this.name_,type:Kn,object:this,newValue:i}:null;l&&nn(this,d)}return this},e.delete=function(i){var r=this;if(Wt(this)){var s=Jt(this,{type:ka,object:this,oldValue:i});if(!s)return!1}if(this.has(i)){var o=!1,l=tn(this),d=l||o?{observableKind:"set",debugObjectName:this.name_,type:ka,object:this,oldValue:i}:null;return wn(function(){r.atom_.reportChanged(),r.data_.delete(i)}),l&&nn(this,d),!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()),s=Array.from(this.values());return ns({next:function(){var l=i;return i+=1,l<s.length?{value:[r[l],s[l]],done:!1}:{done:!0}}})},e.keys=function(){return this.values()},e.values=function(){this.atom_.reportObserved();var i=this,r=0,s=Array.from(this.data_.values());return ns({next:function(){return r<s.length?{value:i.dehanceValue_(s[r++]),done:!1}:{done:!0}}})},e.intersection=function(i){if(_n(i))return i.intersection(this);var r=new Set(this);return r.intersection(i)},e.union=function(i){if(_n(i))return i.union(this);var r=new Set(this);return r.union(i)},e.difference=function(i){return new Set(this).difference(i)},e.symmetricDifference=function(i){if(_n(i))return i.symmetricDifference(this);var r=new Set(this);return r.symmetricDifference(i)},e.isSubsetOf=function(i){return new Set(this).isSubsetOf(i)},e.isSupersetOf=function(i){return new Set(this).isSupersetOf(i)},e.isDisjointFrom=function(i){if(_n(i))return i.isDisjointFrom(this);var r=new Set(this);return r.isDisjointFrom(i)},e.replace=function(i){var r=this;return lr(i)&&(i=new Set(i)),wn(function(){Array.isArray(i)?(r.clear(),i.forEach(function(s){return r.add(s)})):_n(i)?(r.clear(),i.forEach(function(s){return r.add(s)})):i!=null&&We("Cannot initialize set from "+i)}),this},e.observe_=function(i,r){return fs(this,i)},e.intercept_=function(i){return ds(this,i)},e.toJSON=function(){return Array.from(this)},e.toString=function(){return"[object ObservableSet]"},e[Symbol.iterator]=function(){return this.values()},or(t,[{key:"size",get:function(){return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){return"Set"}}])}(),lr=Ei("ObservableSet",Ih),cd=Object.create(null),dd="remove",Dh=function(){function t(n,i,r,s){i===void 0&&(i=new Map),s===void 0&&(s=Mv),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_=s,this.keysAtom_=new Qn("ObservableObject.keys"),this.isPlainObject_=Wn(this.target_)}var e=t.prototype;return e.getObservablePropValue_=function(i){return this.values_.get(i).get()},e.setObservablePropValue_=function(i,r){var s=this.values_.get(i);if(s instanceof sn)return s.set(r),!0;if(Wt(this)){var o=Jt(this,{type:gn,object:this.proxy_||this.target_,name:i,newValue:r});if(!o)return null;r=o.newValue}if(r=s.prepareNewValue_(r),r!==ke.UNCHANGED){var l=tn(this),d=!1,h=l||d?{type:gn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:s.value_,name:i,newValue:r}:null;s.setNewValue_(r),l&&nn(this,h)}return!0},e.get_=function(i){return ke.trackingDerivation&&!Nn(this.target_,i)&&this.has_(i),this.target_[i]},e.set_=function(i,r,s){return s===void 0&&(s=!1),Nn(this.target_,i)?this.values_.has(i)?this.setObservablePropValue_(i,r):s?Reflect.set(this.target_,i,r):(this.target_[i]=r,!0):this.extend_(i,{value:r,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,s)},e.has_=function(i){if(!ke.trackingDerivation)return i in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var r=this.pendingKeys_.get(i);return r||(r=new mi(i in this.target_,ja,"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 s;if((s=this.target_[fn])!=null&&s[i])return;We(1,r.annotationType_,this.name_+"."+i.toString())}for(var o=this.target_;o&&o!==$a;){var l=pa(o,i);if(l){var d=r.make_(this,i,l,o);if(d===0)return;if(d===1)break}o=Object.getPrototypeOf(o)}hd(this,r,i)}},e.extend_=function(i,r,s,o){if(o===void 0&&(o=!1),s===!0&&(s=this.defaultAnnotation_),s===!1)return this.defineProperty_(i,r,o);var l=s.extend_(this,i,r,o);return l&&hd(this,s,i),l},e.defineProperty_=function(i,r,s){s===void 0&&(s=!1),this.keysAtom_;try{Yt();var o=this.delete_(i);if(!o)return o;if(Wt(this)){var l=Jt(this,{object:this.proxy_||this.target_,name:i,type:Kn,newValue:r.value});if(!l)return null;var d=l.newValue;r.value!==d&&(r=Jn({},r,{value:d}))}if(s){if(!Reflect.defineProperty(this.target_,i,r))return!1}else pn(this.target_,i,r);this.notifyPropertyAddition_(i,r.value)}finally{Xt()}return!0},e.defineObservableProperty_=function(i,r,s,o){o===void 0&&(o=!1),this.keysAtom_;try{Yt();var l=this.delete_(i);if(!l)return l;if(Wt(this)){var d=Jt(this,{object:this.proxy_||this.target_,name:i,type:Kn,newValue:r});if(!d)return null;r=d.newValue}var h=fd(i),m={configurable:ke.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:h.get,set:h.set};if(o){if(!Reflect.defineProperty(this.target_,i,m))return!1}else pn(this.target_,i,m);var y=new mi(r,s,"ObservableObject.key",!1);this.values_.set(i,y),this.notifyPropertyAddition_(i,y.value_)}finally{Xt()}return!0},e.defineComputedProperty_=function(i,r,s){s===void 0&&(s=!1),this.keysAtom_;try{Yt();var o=this.delete_(i);if(!o)return o;if(Wt(this)){var l=Jt(this,{object:this.proxy_||this.target_,name:i,type:Kn,newValue:void 0});if(!l)return null}r.name||(r.name="ObservableObject.key"),r.context=this.proxy_||this.target_;var d=fd(i),h={configurable:ke.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:d.get,set:d.set};if(s){if(!Reflect.defineProperty(this.target_,i,h))return!1}else pn(this.target_,i,h);this.values_.set(i,new sn(r)),this.notifyPropertyAddition_(i,void 0)}finally{Xt()}return!0},e.delete_=function(i,r){if(r===void 0&&(r=!1),this.keysAtom_,!Nn(this.target_,i))return!0;if(Wt(this)){var s=Jt(this,{object:this.proxy_||this.target_,name:i,type:dd});if(!s)return null}try{var o;Yt();var l=tn(this),d=!1,h=this.values_.get(i),m=void 0;if(!h&&(l||d)){var y;m=(y=pa(this.target_,i))==null?void 0:y.value}if(r){if(!Reflect.deleteProperty(this.target_,i))return!1}else delete this.target_[i];if(h&&(this.values_.delete(i),h instanceof mi&&(m=h.value_),kh(h)),this.keysAtom_.reportChanged(),(o=this.pendingKeys_)==null||(o=o.get(i))==null||o.set(i in this.target_),l||d){var g={type:dd,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:m,name:i};l&&nn(this,g)}}finally{Xt()}return!0},e.observe_=function(i,r){return fs(this,i)},e.intercept_=function(i){return ds(this,i)},e.notifyPropertyAddition_=function(i,r){var s,o=tn(this),l=!1;if(o||l){var d=o||l?{type:Kn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:i,newValue:r}:null;o&&nn(this,d)}(s=this.pendingKeys_)==null||(s=s.get(i))==null||s.set(!0),this.keysAtom_.reportChanged()},e.ownKeys_=function(){return this.keysAtom_.reportObserved(),Ua(this.target_)},e.keys_=function(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)},t}();function cr(t,e){var n;if(Nn(t,Ce))return t;var i=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",r=new Dh(t,new Map,String(i),Jv(e));return Ba(t,Ce,r),t}var Uy=Ei("ObservableObjectAdministration",Dh);function fd(t){return cd[t]||(cd[t]={get:function(){return this[Ce].getObservablePropValue_(t)},set:function(n){return this[Ce].setObservablePropValue_(t,n)}})}function Ja(t){return Ma(t)?Uy(t[Ce]):!1}function hd(t,e,n){var i;(i=t.target_[fn])==null||delete i[n]}var jy=Lh(0),Vy=function(){var t=!1,e={};return Object.defineProperty(e,"0",{set:function(){t=!0}}),Object.create(e)[0]=1,t===!1}(),vu=0,Ph=function(){};function Hy(t,e){Object.setPrototypeOf?Object.setPrototypeOf(t.prototype,e):t.prototype.__proto__!==void 0?t.prototype.__proto__=e:t.prototype=e}Hy(Ph,Array.prototype);var Ml=function(t){function e(i,r,s,o){var l;return s===void 0&&(s="ObservableArray"),o===void 0&&(o=!1),l=t.call(this)||this,Oi(function(){var d=new $l(s,r,o,!0);d.proxy_=l,eh(l,Ce,d),i&&i.length&&l.spliceWithArray(0,0,i),Vy&&Object.defineProperty(l,"0",jy)}),l}ih(e,t);var n=e.prototype;return n.concat=function(){this[Ce].atom_.reportObserved();for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return Array.prototype.concat.apply(this.slice(),s.map(function(l){return Wa(l)?l.slice():l}))},n[Symbol.iterator]=function(){var i=this,r=0;return ns({next:function(){return r<i.length?{value:i[r++],done:!1}:{done:!0,value:void 0}}})},or(e,[{key:"length",get:function(){return this[Ce].getArrayLength_()},set:function(r){this[Ce].setArrayLength_(r)}},{key:Symbol.toStringTag,get:function(){return"Array"}}])}(Ph);Object.entries(ba).forEach(function(t){var e=t[0],n=t[1];e!=="concat"&&Ba(Ml.prototype,e,n)});function Lh(t){return{enumerable:!1,configurable:!0,get:function(){return this[Ce].get_(t)},set:function(n){this[Ce].set_(t,n)}}}function qy(t){pn(Ml.prototype,""+t,Lh(t))}function $h(t){if(t>vu){for(var e=vu;e<t+100;e++)qy(e);vu=t}}$h(1e3);function zy(t,e,n){return new Ml(t,e,n)}function rl(t,e){if(typeof t=="object"&&t!==null){if(Wa(t))return e!==void 0&&We(23),t[Ce].atom_;if(lr(t))return t.atom_;if(Ai(t)){if(e===void 0)return t.keysAtom_;var n=t.data_.get(e)||t.hasMap_.get(e);return n||We(25,e,sl(t)),n}if(Ja(t)){if(!e)return We(26);var i=t[Ce].values_.get(e);return i||We(27,e,sl(t)),i}if(Dl(t)||za(t)||ya(t))return t}else if(rn(t)&&ya(t[Ce]))return t[Ce];We(28)}function Ky(t,e){if(t||We(29),Dl(t)||za(t)||ya(t)||Ai(t)||lr(t))return t;if(t[Ce])return t[Ce];We(24,t)}function sl(t,e){var n;if(e!==void 0)n=rl(t,e);else{if(Ka(t))return t.name;Ja(t)||Ai(t)||lr(t)?n=Ky(t):n=rl(t)}return n.name_}function Oi(t){var e=Ni(),n=Ha(!0);Yt();try{return t()}finally{Xt(),qa(n),An(e)}}var pd=$a.toString;function Mh(t,e,n){return n===void 0&&(n=-1),al(t,e,n)}function al(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 s=typeof t;if(s!=="function"&&s!=="object"&&typeof e!="object")return!1;var o=pd.call(t);if(o!==pd.call(e))return!1;switch(o){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=md(t),e=md(e);var l=o==="[object Array]";if(!l){if(typeof t!="object"||typeof e!="object")return!1;var d=t.constructor,h=e.constructor;if(d!==h&&!(rn(d)&&d instanceof d&&rn(h)&&h instanceof h)&&"constructor"in t&&"constructor"in e)return!1}if(n===0)return!1;n<0&&(n=-1),i=i||[],r=r||[];for(var m=i.length;m--;)if(i[m]===t)return r[m]===e;if(i.push(t),r.push(e),l){if(m=t.length,m!==e.length)return!1;for(;m--;)if(!al(t[m],e[m],n-1,i,r))return!1}else{var y=Object.keys(t),g;if(m=y.length,Object.keys(e).length!==m)return!1;for(;m--;)if(g=y[m],!(Nn(e,g)&&al(t[g],e[g],n-1,i,r)))return!1}return i.pop(),r.pop(),!0}function md(t){return Wa(t)?t.slice():ar(t)||Ai(t)||_n(t)||lr(t)?Array.from(t.entries()):t}function ns(t){return t[Symbol.iterator]=Gy,t}function Gy(){return this}["Symbol","Map","Set"].forEach(function(t){var e=Jf();typeof e[t]=="undefined"&&We("MobX requires global '"+t+"' to be available or polyfilled")});typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__=="object"&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:fy,extras:{getDebugName:sl},$mobx:Ce});function Wy(t,e=[]){je.useEffect(()=>{const n=Ga(t);return()=>n()},e)}function Bh(t,e={}){const{defaultValue:n,deps:i=[]}=e,r=je.useMemo(()=>t,i),[s,o]=je.useState(()=>r()||n);return je.useEffect(()=>{const l=Ga(()=>o(r()));return()=>l()},[r,...i]),s}function Jy(t,e,n=[]){const i=je.useMemo(()=>t,n),r=je.useMemo(()=>e,n);je.useEffect(()=>{const s=by(i,r);return()=>s()},[i,r])}let Bl=new Map;const ol=je.createContext(Bl),Yy=({children:t,stores:e})=>{const n=je.useContext(ol),i=je.useMemo(()=>{const r=new Map;return e.forEach(s=>r.set(s.class,s.value)),Bl=new Map([...n,...r])},[]);return mg.jsx(ol.Provider,{value:i,children:t})};function Xy(t){return je.useContext(ol).get(t)}function Qy(t){return Bl.get(t)}var Zy=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ya(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ia={exports:{}},eb=ia.exports,gd;function tb(){return gd||(gd=1,function(t,e){(function(n,i){t.exports=i()})(eb,function(){var n=function(a,u){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(c,f){c.__proto__=f}||function(c,f){for(var p in f)Object.prototype.hasOwnProperty.call(f,p)&&(c[p]=f[p])})(a,u)},i=function(){return(i=Object.assign||function(a){for(var u,c=1,f=arguments.length;c<f;c++)for(var p in u=arguments[c])Object.prototype.hasOwnProperty.call(u,p)&&(a[p]=u[p]);return a}).apply(this,arguments)};function r(a,u,c){for(var f,p=0,v=u.length;p<v;p++)!f&&p in u||((f=f||Array.prototype.slice.call(u,0,p))[p]=u[p]);return a.concat(f||Array.prototype.slice.call(u))}var s=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:Zy,o=Object.keys,l=Array.isArray;function d(a,u){return typeof u!="object"||o(u).forEach(function(c){a[c]=u[c]}),a}typeof Promise=="undefined"||s.Promise||(s.Promise=Promise);var h=Object.getPrototypeOf,m={}.hasOwnProperty;function y(a,u){return m.call(a,u)}function g(a,u){typeof u=="function"&&(u=u(h(a))),(typeof Reflect=="undefined"?o:Reflect.ownKeys)(u).forEach(function(c){_(a,c,u[c])})}var O=Object.defineProperty;function _(a,u,c,f){O(a,u,d(c&&y(c,"get")&&typeof c.get=="function"?{get:c.get,set:c.set,configurable:!0}:{value:c,configurable:!0,writable:!0},f))}function S(a){return{from:function(u){return a.prototype=Object.create(u.prototype),_(a.prototype,"constructor",a),{extend:g.bind(null,a.prototype)}}}}var E=Object.getOwnPropertyDescriptor,R=[].slice;function j(a,u,c){return R.call(a,u,c)}function J(a,u){return u(a)}function z(a){if(!a)throw new Error("Assertion Failed")}function X(a){s.setImmediate?setImmediate(a):setTimeout(a,0)}function ne(a,u){if(typeof u=="string"&&y(a,u))return a[u];if(!u)return a;if(typeof u!="string"){for(var c=[],f=0,p=u.length;f<p;++f){var v=ne(a,u[f]);c.push(v)}return c}var b=u.indexOf(".");if(b!==-1){var k=a[u.substr(0,b)];return k==null?void 0:ne(k,u.substr(b+1))}}function oe(a,u,c){if(a&&u!==void 0&&!("isFrozen"in Object&&Object.isFrozen(a)))if(typeof u!="string"&&"length"in u){z(typeof c!="string"&&"length"in c);for(var f=0,p=u.length;f<p;++f)oe(a,u[f],c[f])}else{var v,b,k=u.indexOf(".");k!==-1?(v=u.substr(0,k),(b=u.substr(k+1))===""?c===void 0?l(a)&&!isNaN(parseInt(v))?a.splice(v,1):delete a[v]:a[v]=c:oe(k=!(k=a[v])||!y(a,v)?a[v]={}:k,b,c)):c===void 0?l(a)&&!isNaN(parseInt(u))?a.splice(u,1):delete a[u]:a[u]=c}}function Se(a){var u,c={};for(u in a)y(a,u)&&(c[u]=a[u]);return c}var ve=[].concat;function ze(a){return ve.apply([],a)}var qt="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(ze([8,16,32,64].map(function(a){return["Int","Uint","Float"].map(function(u){return u+a+"Array"})}))).filter(function(a){return s[a]}),Ne=new Set(qt.map(function(a){return s[a]})),Re=null;function Ve(a){return Re=new WeakMap,a=function u(c){if(!c||typeof c!="object")return c;var f=Re.get(c);if(f)return f;if(l(c)){f=[],Re.set(c,f);for(var p=0,v=c.length;p<v;++p)f.push(u(c[p]))}else if(Ne.has(c.constructor))f=c;else{var b,k=h(c);for(b in f=k===Object.prototype?{}:Object.create(k),Re.set(c,f),c)y(c,b)&&(f[b]=u(c[b]))}return f}(a),Re=null,a}var M={}.toString;function N(a){return M.call(a).slice(8,-1)}var K=typeof Symbol!="undefined"?Symbol.iterator:"@@iterator",ie=typeof K=="symbol"?function(a){var u;return a!=null&&(u=a[K])&&u.apply(a)}:function(){return null};function ce(a,u){return u=a.indexOf(u),0<=u&&a.splice(u,1),0<=u}var ae={};function B(a){var u,c,f,p;if(arguments.length===1){if(l(a))return a.slice();if(this===ae&&typeof a=="string")return[a];if(p=ie(a)){for(c=[];!(f=p.next()).done;)c.push(f.value);return c}if(a==null)return[a];if(typeof(u=a.length)!="number")return[a];for(c=new Array(u);u--;)c[u]=a[u];return c}for(u=arguments.length,c=new Array(u);u--;)c[u]=arguments[u];return c}var Fe=typeof Symbol!="undefined"?function(a){return a[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},vn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],zt=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(vn),$e={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function Xe(a,u){this.name=a,this.message=u}function D(a,u){return a+". Errors: "+Object.keys(u).map(function(c){return u[c].toString()}).filter(function(c,f,p){return p.indexOf(c)===f}).join(`
|
|
27
|
+
`)}function H(a,u,c,f){this.failures=u,this.failedKeys=f,this.successCount=c,this.message=D(a,u)}function pt(a,u){this.name="BulkError",this.failures=Object.keys(u).map(function(c){return u[c]}),this.failuresByPos=u,this.message=D(a,this.failures)}S(Xe).from(Error).extend({toString:function(){return this.name+": "+this.message}}),S(H).from(Xe),S(pt).from(Xe);var _e=zt.reduce(function(a,u){return a[u]=u+"Error",a},{}),Me=Xe,ye=zt.reduce(function(a,u){var c=u+"Error";function f(p,v){this.name=c,p?typeof p=="string"?(this.message="".concat(p).concat(v?`
|
|
28
|
+
`+v:""),this.inner=v||null):typeof p=="object"&&(this.message="".concat(p.name," ").concat(p.message),this.inner=p):(this.message=$e[u]||c,this.inner=null)}return S(f).from(Me),a[u]=f,a},{});ye.Syntax=SyntaxError,ye.Type=TypeError,ye.Range=RangeError;var et=vn.reduce(function(a,u){return a[u+"Error"]=ye[u],a},{}),Je=zt.reduce(function(a,u){return["Syntax","Type","Range"].indexOf(u)===-1&&(a[u+"Error"]=ye[u]),a},{});function Oe(){}function wt(a){return a}function lt(a,u){return a==null||a===wt?u:function(c){return u(a(c))}}function Ae(a,u){return function(){a.apply(this,arguments),u.apply(this,arguments)}}function mt(a,u){return a===Oe?u:function(){var c=a.apply(this,arguments);c!==void 0&&(arguments[0]=c);var f=this.onsuccess,p=this.onerror;this.onsuccess=null,this.onerror=null;var v=u.apply(this,arguments);return f&&(this.onsuccess=this.onsuccess?Ae(f,this.onsuccess):f),p&&(this.onerror=this.onerror?Ae(p,this.onerror):p),v!==void 0?v:c}}function rt(a,u){return a===Oe?u:function(){a.apply(this,arguments);var c=this.onsuccess,f=this.onerror;this.onsuccess=this.onerror=null,u.apply(this,arguments),c&&(this.onsuccess=this.onsuccess?Ae(c,this.onsuccess):c),f&&(this.onerror=this.onerror?Ae(f,this.onerror):f)}}function he(a,u){return a===Oe?u:function(c){var f=a.apply(this,arguments);d(c,f);var p=this.onsuccess,v=this.onerror;return this.onsuccess=null,this.onerror=null,c=u.apply(this,arguments),p&&(this.onsuccess=this.onsuccess?Ae(p,this.onsuccess):p),v&&(this.onerror=this.onerror?Ae(v,this.onerror):v),f===void 0?c===void 0?void 0:c:d(f,c)}}function Ye(a,u){return a===Oe?u:function(){return u.apply(this,arguments)!==!1&&a.apply(this,arguments)}}function ue(a,u){return a===Oe?u:function(){var c=a.apply(this,arguments);if(c&&typeof c.then=="function"){for(var f=this,p=arguments.length,v=new Array(p);p--;)v[p]=arguments[p];return c.then(function(){return u.apply(f,v)})}return u.apply(this,arguments)}}Je.ModifyError=H,Je.DexieError=Xe,Je.BulkError=pt;var Te=typeof location!="undefined"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function tt(a){Te=a}var ct={},ut=100,qt=typeof Promise=="undefined"?[]:function(){var a=Promise.resolve();if(typeof crypto=="undefined"||!crypto.subtle)return[a,h(a),a];var u=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[u,h(u),a]}(),vn=qt[0],zt=qt[1],qt=qt[2],zt=zt&&zt.then,Zn=vn&&vn.constructor,vo=!!qt,pr=function(a,u){mr.push([a,u]),vs&&(queueMicrotask(Hm),vs=!1)},yo=!0,vs=!0,ei=[],ys=[],bo=wt,Fn={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:Oe,pgp:!1,env:{},finalize:Oe},Ee=Fn,mr=[],ti=0,bs=[];function ge(a){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var u=this._PSD=Ee;if(typeof a!="function"){if(a!==ct)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&_o(this,this._value))}this._state=null,this._value=null,++u.ref,function c(f,p){try{p(function(v){if(f._state===null){if(v===f)throw new TypeError("A promise cannot be resolved with itself.");var b=f._lib&&Ti();v&&typeof v.then=="function"?c(f,function(k,A){v instanceof ge?v._then(k,A):v.then(k,A)}):(f._state=!0,f._value=v,uc(f)),b&&Ci()}},_o.bind(null,f))}catch(v){_o(f,v)}}(this,a)}var ko={get:function(){var a=Ee,u=Ss;function c(f,p){var v=this,b=!a.global&&(a!==Ee||u!==Ss),k=b&&!Dn(),A=new ge(function(T,I){wo(v,new oc(cc(f,a,b,k),cc(p,a,b,k),T,I,a))});return this._consoleTask&&(A._consoleTask=this._consoleTask),A}return c.prototype=ct,c},set:function(a){_(this,"then",a&&a.prototype===ct?ko:{get:function(){return a},set:ko.set})}};function oc(a,u,c,f,p){this.onFulfilled=typeof a=="function"?a:null,this.onRejected=typeof u=="function"?u:null,this.resolve=c,this.reject=f,this.psd=p}function _o(a,u){var c,f;ys.push(u),a._state===null&&(c=a._lib&&Ti(),u=bo(u),a._state=!1,a._value=u,f=a,ei.some(function(p){return p._value===f._value})||ei.push(f),uc(a),c&&Ci())}function uc(a){var u=a._listeners;a._listeners=[];for(var c=0,f=u.length;c<f;++c)wo(a,u[c]);var p=a._PSD;--p.ref||p.finalize(),ti===0&&(++ti,pr(function(){--ti==0&&So()},[]))}function wo(a,u){if(a._state!==null){var c=a._state?u.onFulfilled:u.onRejected;if(c===null)return(a._state?u.resolve:u.reject)(a._value);++u.psd.ref,++ti,pr(Vm,[c,a,u])}else a._listeners.push(u)}function Vm(a,u,c){try{var f,p=u._value;!u._state&&ys.length&&(ys=[]),f=Te&&u._consoleTask?u._consoleTask.run(function(){return a(p)}):a(p),u._state||ys.indexOf(p)!==-1||function(v){for(var b=ei.length;b;)if(ei[--b]._value===v._value)return ei.splice(b,1)}(u),c.resolve(f)}catch(v){c.reject(v)}finally{--ti==0&&So(),--c.psd.ref||c.psd.finalize()}}function Hm(){ni(Fn,function(){Ti()&&Ci()})}function Ti(){var a=yo;return vs=yo=!1,a}function Ci(){var a,u,c;do for(;0<mr.length;)for(a=mr,mr=[],c=a.length,u=0;u<c;++u){var f=a[u];f[0].apply(null,f[1])}while(0<mr.length);vs=yo=!0}function So(){var a=ei;ei=[],a.forEach(function(f){f._PSD.onunhandled.call(null,f._value,f)});for(var u=bs.slice(0),c=u.length;c;)u[--c]()}function ks(a){return new ge(ct,!1,a)}function st(a,u){var c=Ee;return function(){var f=Ti(),p=Ee;try{return Pn(c,!0),a.apply(this,arguments)}catch(v){u&&u(v)}finally{Pn(p,!1),f&&Ci()}}}g(ge.prototype,{then:ko,_then:function(a,u){wo(this,new oc(null,null,a,u,Ee))},catch:function(a){if(arguments.length===1)return this.then(null,a);var u=a,c=arguments[1];return typeof u=="function"?this.then(null,function(f){return(f instanceof u?c:ks)(f)}):this.then(null,function(f){return(f&&f.name===u?c:ks)(f)})},finally:function(a){return this.then(function(u){return ge.resolve(a()).then(function(){return u})},function(u){return ge.resolve(a()).then(function(){return ks(u)})})},timeout:function(a,u){var c=this;return a<1/0?new ge(function(f,p){var v=setTimeout(function(){return p(new ye.Timeout(u))},a);c.then(f,p).finally(clearTimeout.bind(null,v))}):this}}),typeof Symbol!="undefined"&&Symbol.toStringTag&&_(ge.prototype,Symbol.toStringTag,"Dexie.Promise"),Fn.env=lc(),g(ge,{all:function(){var a=B.apply(null,arguments).map(Es);return new ge(function(u,c){a.length===0&&u([]);var f=a.length;a.forEach(function(p,v){return ge.resolve(p).then(function(b){a[v]=b,--f||u(a)},c)})})},resolve:function(a){return a instanceof ge?a:a&&typeof a.then=="function"?new ge(function(u,c){a.then(u,c)}):new ge(ct,!0,a)},reject:ks,race:function(){var a=B.apply(null,arguments).map(Es);return new ge(function(u,c){a.map(function(f){return ge.resolve(f).then(u,c)})})},PSD:{get:function(){return Ee},set:function(a){return Ee=a}},totalEchoes:{get:function(){return Ss}},newPSD:In,usePSD:ni,scheduler:{get:function(){return pr},set:function(a){pr=a}},rejectionMapper:{get:function(){return bo},set:function(a){bo=a}},follow:function(a,u){return new ge(function(c,f){return In(function(p,v){var b=Ee;b.unhandleds=[],b.onunhandled=v,b.finalize=Ae(function(){var k,A=this;k=function(){A.unhandleds.length===0?p():v(A.unhandleds[0])},bs.push(function T(){k(),bs.splice(bs.indexOf(T),1)}),++ti,pr(function(){--ti==0&&So()},[])},b.finalize),a()},u,c,f)})}}),Zn&&(Zn.allSettled&&_(ge,"allSettled",function(){var a=B.apply(null,arguments).map(Es);return new ge(function(u){a.length===0&&u([]);var c=a.length,f=new Array(c);a.forEach(function(p,v){return ge.resolve(p).then(function(b){return f[v]={status:"fulfilled",value:b}},function(b){return f[v]={status:"rejected",reason:b}}).then(function(){return--c||u(f)})})})}),Zn.any&&typeof AggregateError!="undefined"&&_(ge,"any",function(){var a=B.apply(null,arguments).map(Es);return new ge(function(u,c){a.length===0&&c(new AggregateError([]));var f=a.length,p=new Array(f);a.forEach(function(v,b){return ge.resolve(v).then(function(k){return u(k)},function(k){p[b]=k,--f||c(new AggregateError(p))})})})}),Zn.withResolvers&&(ge.withResolvers=Zn.withResolvers));var bt={awaits:0,echoes:0,id:0},qm=0,_s=[],ws=0,Ss=0,zm=0;function In(a,u,c,f){var p=Ee,v=Object.create(p);return v.parent=p,v.ref=0,v.global=!1,v.id=++zm,Fn.env,v.env=vo?{Promise:ge,PromiseProp:{value:ge,configurable:!0,writable:!0},all:ge.all,race:ge.race,allSettled:ge.allSettled,any:ge.any,resolve:ge.resolve,reject:ge.reject}:{},u&&d(v,u),++p.ref,v.finalize=function(){--this.parent.ref||this.parent.finalize()},f=ni(v,a,c,f),v.ref===0&&v.finalize(),f}function Ri(){return bt.id||(bt.id=++qm),++bt.awaits,bt.echoes+=ut,bt.id}function Dn(){return!!bt.awaits&&(--bt.awaits==0&&(bt.id=0),bt.echoes=bt.awaits*ut,!0)}function Es(a){return bt.echoes&&a&&a.constructor===Zn?(Ri(),a.then(function(u){return Dn(),u},function(u){return Dn(),dt(u)})):a}function Km(){var a=_s[_s.length-1];_s.pop(),Pn(a,!1)}function Pn(a,u){var c,f=Ee;(u?!bt.echoes||ws++&&a===Ee:!ws||--ws&&a===Ee)||queueMicrotask(u?function(p){++Ss,bt.echoes&&--bt.echoes!=0||(bt.echoes=bt.awaits=bt.id=0),_s.push(Ee),Pn(p,!0)}.bind(null,a):Km),a!==Ee&&(Ee=a,f===Fn&&(Fn.env=lc()),vo&&(c=Fn.env.Promise,u=a.env,(f.global||a.global)&&(Object.defineProperty(s,"Promise",u.PromiseProp),c.all=u.all,c.race=u.race,c.resolve=u.resolve,c.reject=u.reject,u.allSettled&&(c.allSettled=u.allSettled),u.any&&(c.any=u.any))))}function lc(){var a=s.Promise;return vo?{Promise:a,PromiseProp:Object.getOwnPropertyDescriptor(s,"Promise"),all:a.all,race:a.race,allSettled:a.allSettled,any:a.any,resolve:a.resolve,reject:a.reject}:{}}function ni(a,u,c,f,p){var v=Ee;try{return Pn(a,!0),u(c,f,p)}finally{Pn(v,!1)}}function cc(a,u,c,f){return typeof a!="function"?a:function(){var p=Ee;c&&Ri(),Pn(u,!0);try{return a.apply(this,arguments)}finally{Pn(p,!1),f&&queueMicrotask(Dn)}}}function Eo(a){Promise===Zn&&bt.echoes===0?ws===0?a():enqueueNativeMicroTask(a):setTimeout(a,0)}(""+zt).indexOf("[native code]")===-1&&(Ri=Dn=Oe);var dt=ge.reject,ii="",yn="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",dc="String expected.",Fi=[],Ns="__dbnames",No="readonly",Ao="readwrite";function ri(a,u){return a?u?function(){return a.apply(this,arguments)&&u.apply(this,arguments)}:a:u}var fc={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function As(a){return typeof a!="string"||/\./.test(a)?function(u){return u}:function(u){return u[a]===void 0&&a in u&&delete(u=Ve(u))[a],u}}function hc(){throw ye.Type()}function qe(a,u){try{var c=pc(a),f=pc(u);if(c!==f)return c==="Array"?1:f==="Array"?-1:c==="binary"?1:f==="binary"?-1:c==="string"?1:f==="string"?-1:c==="Date"?1:f!=="Date"?NaN:-1;switch(c){case"number":case"Date":case"string":return u<a?1:a<u?-1:0;case"binary":return function(p,v){for(var b=p.length,k=v.length,A=b<k?b:k,T=0;T<A;++T)if(p[T]!==v[T])return p[T]<v[T]?-1:1;return b===k?0:b<k?-1:1}(mc(a),mc(u));case"Array":return function(p,v){for(var b=p.length,k=v.length,A=b<k?b:k,T=0;T<A;++T){var I=qe(p[T],v[T]);if(I!==0)return I}return b===k?0:b<k?-1:1}(a,u)}}catch{}return NaN}function pc(a){var u=typeof a;return u!="object"?u:ArrayBuffer.isView(a)?"binary":(a=N(a),a==="ArrayBuffer"?"binary":a)}function mc(a){return a instanceof Uint8Array?a:ArrayBuffer.isView(a)?new Uint8Array(a.buffer,a.byteOffset,a.byteLength):new Uint8Array(a)}var gc=(it.prototype._trans=function(a,u,c){var f=this._tx||Ee.trans,p=this.name,v=Te&&typeof console!="undefined"&&console.createTask&&console.createTask("Dexie: ".concat(a==="readonly"?"read":"write"," ").concat(this.name));function b(T,I,w){if(!w.schema[p])throw new ye.NotFound("Table "+p+" not part of transaction");return u(w.idbtrans,w)}var k=Ti();try{var A=f&&f.db._novip===this.db._novip?f===Ee.trans?f._promise(a,b,c):In(function(){return f._promise(a,b,c)},{trans:f,transless:Ee.transless||Ee}):function T(I,w,L,x){if(I.idbdb&&(I._state.openComplete||Ee.letThrough||I._vip)){var F=I._createTransaction(w,L,I._dbSchema);try{F.create(),I._state.PR1398_maxLoop=3}catch(P){return P.name===_e.InvalidState&&I.isOpen()&&0<--I._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),I.close({disableAutoOpen:!1}),I.open().then(function(){return T(I,w,L,x)})):dt(P)}return F._promise(w,function(P,C){return In(function(){return Ee.trans=F,x(P,C,F)})}).then(function(P){if(w==="readwrite")try{F.idbtrans.commit()}catch{}return w==="readonly"?P:F._completion.then(function(){return P})})}if(I._state.openComplete)return dt(new ye.DatabaseClosed(I._state.dbOpenError));if(!I._state.isBeingOpened){if(!I._state.autoOpen)return dt(new ye.DatabaseClosed);I.open().catch(Oe)}return I._state.dbReadyPromise.then(function(){return T(I,w,L,x)})}(this.db,a,[this.name],b);return v&&(A._consoleTask=v,A=A.catch(function(T){return console.trace(T),dt(T)})),A}finally{k&&Ci()}},it.prototype.get=function(a,u){var c=this;return a&&a.constructor===Object?this.where(a).first(u):a==null?dt(new ye.Type("Invalid argument to Table.get()")):this._trans("readonly",function(f){return c.core.get({trans:f,key:a}).then(function(p){return c.hook.reading.fire(p)})}).then(u)},it.prototype.where=function(a){if(typeof a=="string")return new this.db.WhereClause(this,a);if(l(a))return new this.db.WhereClause(this,"[".concat(a.join("+"),"]"));var u=o(a);if(u.length===1)return this.where(u[0]).equals(a[u[0]]);var c=this.schema.indexes.concat(this.schema.primKey).filter(function(k){if(k.compound&&u.every(function(T){return 0<=k.keyPath.indexOf(T)})){for(var A=0;A<u.length;++A)if(u.indexOf(k.keyPath[A])===-1)return!1;return!0}return!1}).sort(function(k,A){return k.keyPath.length-A.keyPath.length})[0];if(c&&this.db._maxKey!==ii){var v=c.keyPath.slice(0,u.length);return this.where(v).equals(v.map(function(A){return a[A]}))}!c&&Te&&console.warn("The query ".concat(JSON.stringify(a)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(u.join("+"),"]"));var f=this.schema.idxByName;function p(k,A){return qe(k,A)===0}var b=u.reduce(function(w,A){var T=w[0],I=w[1],w=f[A],L=a[A];return[T||w,T||!w?ri(I,w&&w.multi?function(x){return x=ne(x,A),l(x)&&x.some(function(F){return p(L,F)})}:function(x){return p(L,ne(x,A))}):I]},[null,null]),v=b[0],b=b[1];return v?this.where(v.name).equals(a[v.keyPath]).filter(b):c?this.filter(b):this.where(u).equals("")},it.prototype.filter=function(a){return this.toCollection().and(a)},it.prototype.count=function(a){return this.toCollection().count(a)},it.prototype.offset=function(a){return this.toCollection().offset(a)},it.prototype.limit=function(a){return this.toCollection().limit(a)},it.prototype.each=function(a){return this.toCollection().each(a)},it.prototype.toArray=function(a){return this.toCollection().toArray(a)},it.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},it.prototype.orderBy=function(a){return new this.db.Collection(new this.db.WhereClause(this,l(a)?"[".concat(a.join("+"),"]"):a))},it.prototype.reverse=function(){return this.toCollection().reverse()},it.prototype.mapToClass=function(a){var u,c=this.db,f=this.name;function p(){return u!==null&&u.apply(this,arguments)||this}(this.schema.mappedClass=a).prototype instanceof hc&&(function(A,T){if(typeof T!="function"&&T!==null)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function I(){this.constructor=A}n(A,T),A.prototype=T===null?Object.create(T):(I.prototype=T.prototype,new I)}(p,u=a),Object.defineProperty(p.prototype,"db",{get:function(){return c},enumerable:!1,configurable:!0}),p.prototype.table=function(){return f},a=p);for(var v=new Set,b=a.prototype;b;b=h(b))Object.getOwnPropertyNames(b).forEach(function(A){return v.add(A)});function k(A){if(!A)return A;var T,I=Object.create(a.prototype);for(T in A)if(!v.has(T))try{I[T]=A[T]}catch{}return I}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=k,this.hook("reading",k),a},it.prototype.defineClass=function(){return this.mapToClass(function(a){d(this,a)})},it.prototype.add=function(a,u){var c=this,f=this.schema.primKey,p=f.auto,v=f.keyPath,b=a;return v&&p&&(b=As(v)(a)),this._trans("readwrite",function(k){return c.core.mutate({trans:k,type:"add",keys:u!=null?[u]:null,values:[b]})}).then(function(k){return k.numFailures?ge.reject(k.failures[0]):k.lastResult}).then(function(k){if(v)try{oe(a,v,k)}catch{}return k})},it.prototype.update=function(a,u){return typeof a!="object"||l(a)?this.where(":id").equals(a).modify(u):(a=ne(a,this.schema.primKey.keyPath),a===void 0?dt(new ye.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(a).modify(u))},it.prototype.put=function(a,u){var c=this,f=this.schema.primKey,p=f.auto,v=f.keyPath,b=a;return v&&p&&(b=As(v)(a)),this._trans("readwrite",function(k){return c.core.mutate({trans:k,type:"put",values:[b],keys:u!=null?[u]:null})}).then(function(k){return k.numFailures?ge.reject(k.failures[0]):k.lastResult}).then(function(k){if(v)try{oe(a,v,k)}catch{}return k})},it.prototype.delete=function(a){var u=this;return this._trans("readwrite",function(c){return u.core.mutate({trans:c,type:"delete",keys:[a]})}).then(function(c){return c.numFailures?ge.reject(c.failures[0]):void 0})},it.prototype.clear=function(){var a=this;return this._trans("readwrite",function(u){return a.core.mutate({trans:u,type:"deleteRange",range:fc})}).then(function(u){return u.numFailures?ge.reject(u.failures[0]):void 0})},it.prototype.bulkGet=function(a){var u=this;return this._trans("readonly",function(c){return u.core.getMany({keys:a,trans:c}).then(function(f){return f.map(function(p){return u.hook.reading.fire(p)})})})},it.prototype.bulkAdd=function(a,u,c){var f=this,p=Array.isArray(u)?u:void 0,v=(c=c||(p?void 0:u))?c.allKeys:void 0;return this._trans("readwrite",function(b){var T=f.schema.primKey,k=T.auto,T=T.keyPath;if(T&&p)throw new ye.InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(p&&p.length!==a.length)throw new ye.InvalidArgument("Arguments objects and keys must have the same length");var A=a.length,T=T&&k?a.map(As(T)):a;return f.core.mutate({trans:b,type:"add",keys:p,values:T,wantResults:v}).then(function(F){var w=F.numFailures,L=F.results,x=F.lastResult,F=F.failures;if(w===0)return v?L:x;throw new pt("".concat(f.name,".bulkAdd(): ").concat(w," of ").concat(A," operations failed"),F)})})},it.prototype.bulkPut=function(a,u,c){var f=this,p=Array.isArray(u)?u:void 0,v=(c=c||(p?void 0:u))?c.allKeys:void 0;return this._trans("readwrite",function(b){var T=f.schema.primKey,k=T.auto,T=T.keyPath;if(T&&p)throw new ye.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(p&&p.length!==a.length)throw new ye.InvalidArgument("Arguments objects and keys must have the same length");var A=a.length,T=T&&k?a.map(As(T)):a;return f.core.mutate({trans:b,type:"put",keys:p,values:T,wantResults:v}).then(function(F){var w=F.numFailures,L=F.results,x=F.lastResult,F=F.failures;if(w===0)return v?L:x;throw new pt("".concat(f.name,".bulkPut(): ").concat(w," of ").concat(A," operations failed"),F)})})},it.prototype.bulkUpdate=function(a){var u=this,c=this.core,f=a.map(function(b){return b.key}),p=a.map(function(b){return b.changes}),v=[];return this._trans("readwrite",function(b){return c.getMany({trans:b,keys:f,cache:"clone"}).then(function(k){var A=[],T=[];a.forEach(function(w,L){var x=w.key,F=w.changes,P=k[L];if(P){for(var C=0,$=Object.keys(F);C<$.length;C++){var U=$[C],V=F[U];if(U===u.schema.primKey.keyPath){if(qe(V,x)!==0)throw new ye.Constraint("Cannot update primary key in bulkUpdate()")}else oe(P,U,V)}v.push(L),A.push(x),T.push(P)}});var I=A.length;return c.mutate({trans:b,type:"put",keys:A,values:T,updates:{keys:f,changeSpecs:p}}).then(function(w){var L=w.numFailures,x=w.failures;if(L===0)return I;for(var F=0,P=Object.keys(x);F<P.length;F++){var C,$=P[F],U=v[Number($)];U!=null&&(C=x[$],delete x[$],x[U]=C)}throw new pt("".concat(u.name,".bulkUpdate(): ").concat(L," of ").concat(I," operations failed"),x)})})})},it.prototype.bulkDelete=function(a){var u=this,c=a.length;return this._trans("readwrite",function(f){return u.core.mutate({trans:f,type:"delete",keys:a})}).then(function(b){var p=b.numFailures,v=b.lastResult,b=b.failures;if(p===0)return v;throw new pt("".concat(u.name,".bulkDelete(): ").concat(p," of ").concat(c," operations failed"),b)})},it);function it(){}function gr(a){function u(b,k){if(k){for(var A=arguments.length,T=new Array(A-1);--A;)T[A-1]=arguments[A];return c[b].subscribe.apply(null,T),a}if(typeof b=="string")return c[b]}var c={};u.addEventType=v;for(var f=1,p=arguments.length;f<p;++f)v(arguments[f]);return u;function v(b,k,A){if(typeof b!="object"){var T;k=k||Ye;var I={subscribers:[],fire:A=A||Oe,subscribe:function(w){I.subscribers.indexOf(w)===-1&&(I.subscribers.push(w),I.fire=k(I.fire,w))},unsubscribe:function(w){I.subscribers=I.subscribers.filter(function(L){return L!==w}),I.fire=I.subscribers.reduce(k,A)}};return c[b]=u[b]=I}o(T=b).forEach(function(w){var L=T[w];if(l(L))v(w,T[w][0],T[w][1]);else{if(L!=="asap")throw new ye.InvalidArgument("Invalid event config");var x=v(w,wt,function(){for(var F=arguments.length,P=new Array(F);F--;)P[F]=arguments[F];x.subscribers.forEach(function(C){X(function(){C.apply(null,P)})})})}})}}function vr(a,u){return S(u).from({prototype:a}),u}function Ii(a,u){return!(a.filter||a.algorithm||a.or)&&(u?a.justLimit:!a.replayFilter)}function Oo(a,u){a.filter=ri(a.filter,u)}function xo(a,u,c){var f=a.replayFilter;a.replayFilter=f?function(){return ri(f(),u())}:u,a.justLimit=c&&!f}function Os(a,u){if(a.isPrimKey)return u.primaryKey;var c=u.getIndexByKeyPath(a.index);if(!c)throw new ye.Schema("KeyPath "+a.index+" on object store "+u.name+" is not indexed");return c}function vc(a,u,c){var f=Os(a,u.schema);return u.openCursor({trans:c,values:!a.keysOnly,reverse:a.dir==="prev",unique:!!a.unique,query:{index:f,range:a.range}})}function xs(a,u,c,f){var p=a.replayFilter?ri(a.filter,a.replayFilter()):a.filter;if(a.or){var v={},b=function(k,A,T){var I,w;p&&!p(A,T,function(L){return A.stop(L)},function(L){return A.fail(L)})||((w=""+(I=A.primaryKey))=="[object ArrayBuffer]"&&(w=""+new Uint8Array(I)),y(v,w)||(v[w]=!0,u(k,A,T)))};return Promise.all([a.or._iterate(b,c),yc(vc(a,f,c),a.algorithm,b,!a.keysOnly&&a.valueMapper)])}return yc(vc(a,f,c),ri(a.algorithm,p),u,!a.keysOnly&&a.valueMapper)}function yc(a,u,c,f){var p=st(f?function(v,b,k){return c(f(v),b,k)}:c);return a.then(function(v){if(v)return v.start(function(){var b=function(){return v.continue()};u&&!u(v,function(k){return b=k},function(k){v.stop(k),b=Oe},function(k){v.fail(k),b=Oe})||p(v.value,v,function(k){return b=k}),b()})})}var yr=(bc.prototype.execute=function(a){var u=this["@@propmod"];if(u.add!==void 0){var c=u.add;if(l(c))return r(r([],l(a)?a:[],!0),c).sort();if(typeof c=="number")return(Number(a)||0)+c;if(typeof c=="bigint")try{return BigInt(a)+c}catch{return BigInt(0)+c}throw new TypeError("Invalid term ".concat(c))}if(u.remove!==void 0){var f=u.remove;if(l(f))return l(a)?a.filter(function(p){return!f.includes(p)}).sort():[];if(typeof f=="number")return Number(a)-f;if(typeof f=="bigint")try{return BigInt(a)-f}catch{return BigInt(0)-f}throw new TypeError("Invalid subtrahend ".concat(f))}return c=(c=u.replacePrefix)===null||c===void 0?void 0:c[0],c&&typeof a=="string"&&a.startsWith(c)?u.replacePrefix[1]+a.substring(c.length):a},bc);function bc(a){this["@@propmod"]=a}var Gm=(Ke.prototype._read=function(a,u){var c=this._ctx;return c.error?c.table._trans(null,dt.bind(null,c.error)):c.table._trans("readonly",a).then(u)},Ke.prototype._write=function(a){var u=this._ctx;return u.error?u.table._trans(null,dt.bind(null,u.error)):u.table._trans("readwrite",a,"locked")},Ke.prototype._addAlgorithm=function(a){var u=this._ctx;u.algorithm=ri(u.algorithm,a)},Ke.prototype._iterate=function(a,u){return xs(this._ctx,a,u,this._ctx.table.core)},Ke.prototype.clone=function(a){var u=Object.create(this.constructor.prototype),c=Object.create(this._ctx);return a&&d(c,a),u._ctx=c,u},Ke.prototype.raw=function(){return this._ctx.valueMapper=null,this},Ke.prototype.each=function(a){var u=this._ctx;return this._read(function(c){return xs(u,a,c,u.table.core)})},Ke.prototype.count=function(a){var u=this;return this._read(function(c){var f=u._ctx,p=f.table.core;if(Ii(f,!0))return p.count({trans:c,query:{index:Os(f,p.schema),range:f.range}}).then(function(b){return Math.min(b,f.limit)});var v=0;return xs(f,function(){return++v,!1},c,p).then(function(){return v})}).then(a)},Ke.prototype.sortBy=function(a,u){var c=a.split(".").reverse(),f=c[0],p=c.length-1;function v(A,T){return T?v(A[c[T]],T-1):A[f]}var b=this._ctx.dir==="next"?1:-1;function k(A,T){return qe(v(A,p),v(T,p))*b}return this.toArray(function(A){return A.sort(k)}).then(u)},Ke.prototype.toArray=function(a){var u=this;return this._read(function(c){var f=u._ctx;if(f.dir==="next"&&Ii(f,!0)&&0<f.limit){var p=f.valueMapper,v=Os(f,f.table.core.schema);return f.table.core.query({trans:c,limit:f.limit,values:!0,query:{index:v,range:f.range}}).then(function(k){return k=k.result,p?k.map(p):k})}var b=[];return xs(f,function(k){return b.push(k)},c,f.table.core).then(function(){return b})},a)},Ke.prototype.offset=function(a){var u=this._ctx;return a<=0||(u.offset+=a,Ii(u)?xo(u,function(){var c=a;return function(f,p){return c===0||(c===1?--c:p(function(){f.advance(c),c=0}),!1)}}):xo(u,function(){var c=a;return function(){return--c<0}})),this},Ke.prototype.limit=function(a){return this._ctx.limit=Math.min(this._ctx.limit,a),xo(this._ctx,function(){var u=a;return function(c,f,p){return--u<=0&&f(p),0<=u}},!0),this},Ke.prototype.until=function(a,u){return Oo(this._ctx,function(c,f,p){return!a(c.value)||(f(p),u)}),this},Ke.prototype.first=function(a){return this.limit(1).toArray(function(u){return u[0]}).then(a)},Ke.prototype.last=function(a){return this.reverse().first(a)},Ke.prototype.filter=function(a){var u;return Oo(this._ctx,function(c){return a(c.value)}),(u=this._ctx).isMatch=ri(u.isMatch,a),this},Ke.prototype.and=function(a){return this.filter(a)},Ke.prototype.or=function(a){return new this.db.WhereClause(this._ctx.table,a,this)},Ke.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Ke.prototype.desc=function(){return this.reverse()},Ke.prototype.eachKey=function(a){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(c,f){a(f.key,f)})},Ke.prototype.eachUniqueKey=function(a){return this._ctx.unique="unique",this.eachKey(a)},Ke.prototype.eachPrimaryKey=function(a){var u=this._ctx;return u.keysOnly=!u.isMatch,this.each(function(c,f){a(f.primaryKey,f)})},Ke.prototype.keys=function(a){var u=this._ctx;u.keysOnly=!u.isMatch;var c=[];return this.each(function(f,p){c.push(p.key)}).then(function(){return c}).then(a)},Ke.prototype.primaryKeys=function(a){var u=this._ctx;if(u.dir==="next"&&Ii(u,!0)&&0<u.limit)return this._read(function(f){var p=Os(u,u.table.core.schema);return u.table.core.query({trans:f,values:!1,limit:u.limit,query:{index:p,range:u.range}})}).then(function(f){return f.result}).then(a);u.keysOnly=!u.isMatch;var c=[];return this.each(function(f,p){c.push(p.primaryKey)}).then(function(){return c}).then(a)},Ke.prototype.uniqueKeys=function(a){return this._ctx.unique="unique",this.keys(a)},Ke.prototype.firstKey=function(a){return this.limit(1).keys(function(u){return u[0]}).then(a)},Ke.prototype.lastKey=function(a){return this.reverse().firstKey(a)},Ke.prototype.distinct=function(){var a=this._ctx,a=a.index&&a.table.schema.idxByName[a.index];if(!a||!a.multi)return this;var u={};return Oo(this._ctx,function(p){var f=p.primaryKey.toString(),p=y(u,f);return u[f]=!0,!p}),this},Ke.prototype.modify=function(a){var u=this,c=this._ctx;return this._write(function(f){var p,v,b;b=typeof a=="function"?a:(p=o(a),v=p.length,function(C){for(var $=!1,U=0;U<v;++U){var V=p[U],G=a[V],re=ne(C,V);G instanceof yr?(oe(C,V,G.execute(re)),$=!0):re!==G&&(oe(C,V,G),$=!0)}return $});var k=c.table.core,w=k.schema.primaryKey,A=w.outbound,T=w.extractKey,I=200,w=u.db._options.modifyChunkSize;w&&(I=typeof w=="object"?w[k.name]||w["*"]||200:w);function L(C,V){var U=V.failures,V=V.numFailures;F+=C-V;for(var G=0,re=o(U);G<re.length;G++){var fe=re[G];x.push(U[fe])}}var x=[],F=0,P=[];return u.clone().primaryKeys().then(function(C){function $(V){var G=Math.min(I,C.length-V);return k.getMany({trans:f,keys:C.slice(V,V+G),cache:"immutable"}).then(function(re){for(var fe=[],se=[],le=A?[]:null,pe=[],de=0;de<G;++de){var be=re[de],De={value:Ve(be),primKey:C[V+de]};b.call(De,De.value,De)!==!1&&(De.value==null?pe.push(C[V+de]):A||qe(T(be),T(De.value))===0?(se.push(De.value),A&&le.push(C[V+de])):(pe.push(C[V+de]),fe.push(De.value)))}return Promise.resolve(0<fe.length&&k.mutate({trans:f,type:"add",values:fe}).then(function(Be){for(var Ue in Be.failures)pe.splice(parseInt(Ue),1);L(fe.length,Be)})).then(function(){return(0<se.length||U&&typeof a=="object")&&k.mutate({trans:f,type:"put",keys:le,values:se,criteria:U,changeSpec:typeof a!="function"&&a,isAdditionalChunk:0<V}).then(function(Be){return L(se.length,Be)})}).then(function(){return(0<pe.length||U&&a===To)&&k.mutate({trans:f,type:"delete",keys:pe,criteria:U,isAdditionalChunk:0<V}).then(function(Be){return L(pe.length,Be)})}).then(function(){return C.length>V+G&&$(V+I)})})}var U=Ii(c)&&c.limit===1/0&&(typeof a!="function"||a===To)&&{index:c.index,range:c.range};return $(0).then(function(){if(0<x.length)throw new H("Error modifying one or more objects",x,F,P);return C.length})})})},Ke.prototype.delete=function(){var a=this._ctx,u=a.range;return Ii(a)&&(a.isPrimKey||u.type===3)?this._write(function(c){var f=a.table.core.schema.primaryKey,p=u;return a.table.core.count({trans:c,query:{index:f,range:p}}).then(function(v){return a.table.core.mutate({trans:c,type:"deleteRange",range:p}).then(function(b){var k=b.failures;if(b.lastResult,b.results,b=b.numFailures,b)throw new H("Could not delete some values",Object.keys(k).map(function(A){return k[A]}),v-b);return v-b})})}):this.modify(To)},Ke);function Ke(){}var To=function(a,u){return u.value=null};function Wm(a,u){return a<u?-1:a===u?0:1}function Jm(a,u){return u<a?-1:a===u?0:1}function $t(a,u,c){return a=a instanceof _c?new a.Collection(a):a,a._ctx.error=new(c||TypeError)(u),a}function Di(a){return new a.Collection(a,function(){return kc("")}).limit(0)}function Ts(a,u,c,f){var p,v,b,k,A,T,I,w=c.length;if(!c.every(function(F){return typeof F=="string"}))return $t(a,dc);function L(F){p=F==="next"?function(C){return C.toUpperCase()}:function(C){return C.toLowerCase()},v=F==="next"?function(C){return C.toLowerCase()}:function(C){return C.toUpperCase()},b=F==="next"?Wm:Jm;var P=c.map(function(C){return{lower:v(C),upper:p(C)}}).sort(function(C,$){return b(C.lower,$.lower)});k=P.map(function(C){return C.upper}),A=P.map(function(C){return C.lower}),I=(T=F)==="next"?"":f}L("next"),a=new a.Collection(a,function(){return Ln(k[0],A[w-1]+f)}),a._ondirectionchange=function(F){L(F)};var x=0;return a._addAlgorithm(function(F,P,C){var $=F.key;if(typeof $!="string")return!1;var U=v($);if(u(U,A,x))return!0;for(var V=null,G=x;G<w;++G){var re=function(fe,se,le,pe,de,be){for(var De=Math.min(fe.length,pe.length),Be=-1,Ue=0;Ue<De;++Ue){var Mt=se[Ue];if(Mt!==pe[Ue])return de(fe[Ue],le[Ue])<0?fe.substr(0,Ue)+le[Ue]+le.substr(Ue+1):de(fe[Ue],pe[Ue])<0?fe.substr(0,Ue)+pe[Ue]+le.substr(Ue+1):0<=Be?fe.substr(0,Be)+se[Be]+le.substr(Be+1):null;de(fe[Ue],Mt)<0&&(Be=Ue)}return De<pe.length&&be==="next"?fe+le.substr(fe.length):De<fe.length&&be==="prev"?fe.substr(0,le.length):Be<0?null:fe.substr(0,Be)+pe[Be]+le.substr(Be+1)}($,U,k[G],A[G],b,T);re===null&&V===null?x=G+1:(V===null||0<b(V,re))&&(V=re)}return P(V!==null?function(){F.continue(V+I)}:C),!1}),a}function Ln(a,u,c,f){return{type:2,lower:a,upper:u,lowerOpen:c,upperOpen:f}}function kc(a){return{type:1,lower:a,upper:a}}var _c=(Object.defineProperty(kt.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),kt.prototype.between=function(a,u,c,f){c=c!==!1,f=f===!0;try{return 0<this._cmp(a,u)||this._cmp(a,u)===0&&(c||f)&&(!c||!f)?Di(this):new this.Collection(this,function(){return Ln(a,u,!c,!f)})}catch{return $t(this,yn)}},kt.prototype.equals=function(a){return a==null?$t(this,yn):new this.Collection(this,function(){return kc(a)})},kt.prototype.above=function(a){return a==null?$t(this,yn):new this.Collection(this,function(){return Ln(a,void 0,!0)})},kt.prototype.aboveOrEqual=function(a){return a==null?$t(this,yn):new this.Collection(this,function(){return Ln(a,void 0,!1)})},kt.prototype.below=function(a){return a==null?$t(this,yn):new this.Collection(this,function(){return Ln(void 0,a,!1,!0)})},kt.prototype.belowOrEqual=function(a){return a==null?$t(this,yn):new this.Collection(this,function(){return Ln(void 0,a)})},kt.prototype.startsWith=function(a){return typeof a!="string"?$t(this,dc):this.between(a,a+ii,!0,!0)},kt.prototype.startsWithIgnoreCase=function(a){return a===""?this.startsWith(a):Ts(this,function(u,c){return u.indexOf(c[0])===0},[a],ii)},kt.prototype.equalsIgnoreCase=function(a){return Ts(this,function(u,c){return u===c[0]},[a],"")},kt.prototype.anyOfIgnoreCase=function(){var a=B.apply(ae,arguments);return a.length===0?Di(this):Ts(this,function(u,c){return c.indexOf(u)!==-1},a,"")},kt.prototype.startsWithAnyOfIgnoreCase=function(){var a=B.apply(ae,arguments);return a.length===0?Di(this):Ts(this,function(u,c){return c.some(function(f){return u.indexOf(f)===0})},a,ii)},kt.prototype.anyOf=function(){var a=this,u=B.apply(ae,arguments),c=this._cmp;try{u.sort(c)}catch{return $t(this,yn)}if(u.length===0)return Di(this);var f=new this.Collection(this,function(){return Ln(u[0],u[u.length-1])});f._ondirectionchange=function(v){c=v==="next"?a._ascending:a._descending,u.sort(c)};var p=0;return f._addAlgorithm(function(v,b,k){for(var A=v.key;0<c(A,u[p]);)if(++p===u.length)return b(k),!1;return c(A,u[p])===0||(b(function(){v.continue(u[p])}),!1)}),f},kt.prototype.notEqual=function(a){return this.inAnyRange([[-1/0,a],[a,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},kt.prototype.noneOf=function(){var a=B.apply(ae,arguments);if(a.length===0)return new this.Collection(this);try{a.sort(this._ascending)}catch{return $t(this,yn)}var u=a.reduce(function(c,f){return c?c.concat([[c[c.length-1][1],f]]):[[-1/0,f]]},null);return u.push([a[a.length-1],this.db._maxKey]),this.inAnyRange(u,{includeLowers:!1,includeUppers:!1})},kt.prototype.inAnyRange=function($,u){var c=this,f=this._cmp,p=this._ascending,v=this._descending,b=this._min,k=this._max;if($.length===0)return Di(this);if(!$.every(function(U){return U[0]!==void 0&&U[1]!==void 0&&p(U[0],U[1])<=0}))return $t(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",ye.InvalidArgument);var A=!u||u.includeLowers!==!1,T=u&&u.includeUppers===!0,I,w=p;function L(U,V){return w(U[0],V[0])}try{(I=$.reduce(function(U,V){for(var G=0,re=U.length;G<re;++G){var fe=U[G];if(f(V[0],fe[1])<0&&0<f(V[1],fe[0])){fe[0]=b(fe[0],V[0]),fe[1]=k(fe[1],V[1]);break}}return G===re&&U.push(V),U},[])).sort(L)}catch{return $t(this,yn)}var x=0,F=T?function(U){return 0<p(U,I[x][1])}:function(U){return 0<=p(U,I[x][1])},P=A?function(U){return 0<v(U,I[x][0])}:function(U){return 0<=v(U,I[x][0])},C=F,$=new this.Collection(this,function(){return Ln(I[0][0],I[I.length-1][1],!A,!T)});return $._ondirectionchange=function(U){w=U==="next"?(C=F,p):(C=P,v),I.sort(L)},$._addAlgorithm(function(U,V,G){for(var re,fe=U.key;C(fe);)if(++x===I.length)return V(G),!1;return!F(re=fe)&&!P(re)||(c._cmp(fe,I[x][1])===0||c._cmp(fe,I[x][0])===0||V(function(){w===p?U.continue(I[x][0]):U.continue(I[x][1])}),!1)}),$},kt.prototype.startsWithAnyOf=function(){var a=B.apply(ae,arguments);return a.every(function(u){return typeof u=="string"})?a.length===0?Di(this):this.inAnyRange(a.map(function(u){return[u,u+ii]})):$t(this,"startsWithAnyOf() only works with strings")},kt);function kt(){}function un(a){return st(function(u){return br(u),a(u.target.error),!1})}function br(a){a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault()}var kr="storagemutated",Co="x-storagemutated-1",$n=gr(null,kr),Ym=(ln.prototype._lock=function(){return z(!Ee.global),++this._reculock,this._reculock!==1||Ee.global||(Ee.lockOwnerFor=this),this},ln.prototype._unlock=function(){if(z(!Ee.global),--this._reculock==0)for(Ee.global||(Ee.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var a=this._blockedFuncs.shift();try{ni(a[1],a[0])}catch{}}return this},ln.prototype._locked=function(){return this._reculock&&Ee.lockOwnerFor!==this},ln.prototype.create=function(a){var u=this;if(!this.mode)return this;var c=this.db.idbdb,f=this.db._state.dbOpenError;if(z(!this.idbtrans),!a&&!c)switch(f&&f.name){case"DatabaseClosedError":throw new ye.DatabaseClosed(f);case"MissingAPIError":throw new ye.MissingAPI(f.message,f);default:throw new ye.OpenFailed(f)}if(!this.active)throw new ye.TransactionInactive;return z(this._completion._state===null),(a=this.idbtrans=a||(this.db.core||c).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=st(function(p){br(p),u._reject(a.error)}),a.onabort=st(function(p){br(p),u.active&&u._reject(new ye.Abort(a.error)),u.active=!1,u.on("abort").fire(p)}),a.oncomplete=st(function(){u.active=!1,u._resolve(),"mutatedParts"in a&&$n.storagemutated.fire(a.mutatedParts)}),this},ln.prototype._promise=function(a,u,c){var f=this;if(a==="readwrite"&&this.mode!=="readwrite")return dt(new ye.ReadOnly("Transaction is readonly"));if(!this.active)return dt(new ye.TransactionInactive);if(this._locked())return new ge(function(v,b){f._blockedFuncs.push([function(){f._promise(a,u,c).then(v,b)},Ee])});if(c)return In(function(){var v=new ge(function(b,k){f._lock();var A=u(b,k,f);A&&A.then&&A.then(b,k)});return v.finally(function(){return f._unlock()}),v._lib=!0,v});var p=new ge(function(v,b){var k=u(v,b,f);k&&k.then&&k.then(v,b)});return p._lib=!0,p},ln.prototype._root=function(){return this.parent?this.parent._root():this},ln.prototype.waitFor=function(a){var u,c=this._root(),f=ge.resolve(a);c._waitingFor?c._waitingFor=c._waitingFor.then(function(){return f}):(c._waitingFor=f,c._waitingQueue=[],u=c.idbtrans.objectStore(c.storeNames[0]),function v(){for(++c._spinCount;c._waitingQueue.length;)c._waitingQueue.shift()();c._waitingFor&&(u.get(-1/0).onsuccess=v)}());var p=c._waitingFor;return new ge(function(v,b){f.then(function(k){return c._waitingQueue.push(st(v.bind(null,k)))},function(k){return c._waitingQueue.push(st(b.bind(null,k)))}).finally(function(){c._waitingFor===p&&(c._waitingFor=null)})})},ln.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new ye.Abort))},ln.prototype.table=function(a){var u=this._memoizedTables||(this._memoizedTables={});if(y(u,a))return u[a];var c=this.schema[a];if(!c)throw new ye.NotFound("Table "+a+" not part of transaction");return c=new this.db.Table(a,c,this),c.core=this.db.core.table(a),u[a]=c},ln);function ln(){}function Ro(a,u,c,f,p,v,b){return{name:a,keyPath:u,unique:c,multi:f,auto:p,compound:v,src:(c&&!b?"&":"")+(f?"*":"")+(p?"++":"")+wc(u)}}function wc(a){return typeof a=="string"?a:a?"["+[].join.call(a,"+")+"]":""}function Fo(a,u,c){return{name:a,primKey:u,indexes:c,mappedClass:null,idxByName:(f=function(p){return[p.name,p]},c.reduce(function(p,v,b){return b=f(v,b),b&&(p[b[0]]=b[1]),p},{}))};var f}var _r=function(a){try{return a.only([[]]),_r=function(){return[[]]},[[]]}catch{return _r=function(){return ii},ii}};function Io(a){return a==null?function(){}:typeof a=="string"?(u=a).split(".").length===1?function(c){return c[u]}:function(c){return ne(c,u)}:function(c){return ne(c,a)};var u}function Sc(a){return[].slice.call(a)}var Xm=0;function wr(a){return a==null?":id":typeof a=="string"?a:"[".concat(a.join("+"),"]")}function Qm(a,u,A){function f(C){if(C.type===3)return null;if(C.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var x=C.lower,F=C.upper,P=C.lowerOpen,C=C.upperOpen;return x===void 0?F===void 0?null:u.upperBound(F,!!C):F===void 0?u.lowerBound(x,!!P):u.bound(x,F,!!P,!!C)}function p(L){var x,F=L.name;return{name:F,schema:L,mutate:function(P){var C=P.trans,$=P.type,U=P.keys,V=P.values,G=P.range;return new Promise(function(re,fe){re=st(re);var se=C.objectStore(F),le=se.keyPath==null,pe=$==="put"||$==="add";if(!pe&&$!=="delete"&&$!=="deleteRange")throw new Error("Invalid operation type: "+$);var de,be=(U||V||{length:1}).length;if(U&&V&&U.length!==V.length)throw new Error("Given keys array must have same length as given values array.");if(be===0)return re({numFailures:0,failures:{},results:[],lastResult:void 0});function De(Ct){++Mt,br(Ct)}var Be=[],Ue=[],Mt=0;if($==="deleteRange"){if(G.type===4)return re({numFailures:Mt,failures:Ue,results:[],lastResult:void 0});G.type===3?Be.push(de=se.clear()):Be.push(de=se.delete(f(G)))}else{var le=pe?le?[V,U]:[V,null]:[U,null],Ie=le[0],At=le[1];if(pe)for(var Ot=0;Ot<be;++Ot)Be.push(de=At&&At[Ot]!==void 0?se[$](Ie[Ot],At[Ot]):se[$](Ie[Ot])),de.onerror=De;else for(Ot=0;Ot<be;++Ot)Be.push(de=se[$](Ie[Ot])),de.onerror=De}function Vs(Ct){Ct=Ct.target.result,Be.forEach(function(oi,Xo){return oi.error!=null&&(Ue[Xo]=oi.error)}),re({numFailures:Mt,failures:Ue,results:$==="delete"?U:Be.map(function(oi){return oi.result}),lastResult:Ct})}de.onerror=function(Ct){De(Ct),Vs(Ct)},de.onsuccess=Vs})},getMany:function(P){var C=P.trans,$=P.keys;return new Promise(function(U,V){U=st(U);for(var G,re=C.objectStore(F),fe=$.length,se=new Array(fe),le=0,pe=0,de=function(Be){Be=Be.target,se[Be._pos]=Be.result,++pe===le&&U(se)},be=un(V),De=0;De<fe;++De)$[De]!=null&&((G=re.get($[De]))._pos=De,G.onsuccess=de,G.onerror=be,++le);le===0&&U(se)})},get:function(P){var C=P.trans,$=P.key;return new Promise(function(U,V){U=st(U);var G=C.objectStore(F).get($);G.onsuccess=function(re){return U(re.target.result)},G.onerror=un(V)})},query:(x=T,function(P){return new Promise(function(C,$){C=st(C);var U,V,G,le=P.trans,re=P.values,fe=P.limit,de=P.query,se=fe===1/0?void 0:fe,pe=de.index,de=de.range,le=le.objectStore(F),pe=pe.isPrimaryKey?le:le.index(pe.name),de=f(de);if(fe===0)return C({result:[]});x?((se=re?pe.getAll(de,se):pe.getAllKeys(de,se)).onsuccess=function(be){return C({result:be.target.result})},se.onerror=un($)):(U=0,V=!re&&"openKeyCursor"in pe?pe.openKeyCursor(de):pe.openCursor(de),G=[],V.onsuccess=function(be){var De=V.result;return De?(G.push(re?De.value:De.primaryKey),++U===fe?C({result:G}):void De.continue()):C({result:G})},V.onerror=un($))})}),openCursor:function(P){var C=P.trans,$=P.values,U=P.query,V=P.reverse,G=P.unique;return new Promise(function(re,fe){re=st(re);var pe=U.index,se=U.range,le=C.objectStore(F),le=pe.isPrimaryKey?le:le.index(pe.name),pe=V?G?"prevunique":"prev":G?"nextunique":"next",de=!$&&"openKeyCursor"in le?le.openKeyCursor(f(se),pe):le.openCursor(f(se),pe);de.onerror=un(fe),de.onsuccess=st(function(be){var De,Be,Ue,Mt,Ie=de.result;Ie?(Ie.___id=++Xm,Ie.done=!1,De=Ie.continue.bind(Ie),Be=(Be=Ie.continuePrimaryKey)&&Be.bind(Ie),Ue=Ie.advance.bind(Ie),Mt=function(){throw new Error("Cursor not stopped")},Ie.trans=C,Ie.stop=Ie.continue=Ie.continuePrimaryKey=Ie.advance=function(){throw new Error("Cursor not started")},Ie.fail=st(fe),Ie.next=function(){var At=this,Ot=1;return this.start(function(){return Ot--?At.continue():At.stop()}).then(function(){return At})},Ie.start=function(At){function Ot(){if(de.result)try{At()}catch(Ct){Ie.fail(Ct)}else Ie.done=!0,Ie.start=function(){throw new Error("Cursor behind last entry")},Ie.stop()}var Vs=new Promise(function(Ct,oi){Ct=st(Ct),de.onerror=un(oi),Ie.fail=oi,Ie.stop=function(Xo){Ie.stop=Ie.continue=Ie.continuePrimaryKey=Ie.advance=Mt,Ct(Xo)}});return de.onsuccess=st(function(Ct){de.onsuccess=Ot,Ot()}),Ie.continue=De,Ie.continuePrimaryKey=Be,Ie.advance=Ue,Ot(),Vs},re(Ie)):re(null)},fe)})},count:function(P){var C=P.query,$=P.trans,U=C.index,V=C.range;return new Promise(function(G,re){var fe=$.objectStore(F),se=U.isPrimaryKey?fe:fe.index(U.name),fe=f(V),se=fe?se.count(fe):se.count();se.onsuccess=st(function(le){return G(le.target.result)}),se.onerror=un(re)})}}}var v,b,k,I=(b=A,k=Sc((v=a).objectStoreNames),{schema:{name:v.name,tables:k.map(function(L){return b.objectStore(L)}).map(function(L){var x=L.keyPath,C=L.autoIncrement,F=l(x),P={},C={name:L.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:x==null,compound:F,keyPath:x,autoIncrement:C,unique:!0,extractKey:Io(x)},indexes:Sc(L.indexNames).map(function($){return L.index($)}).map(function(G){var U=G.name,V=G.unique,re=G.multiEntry,G=G.keyPath,re={name:U,compound:l(G),keyPath:G,unique:V,multiEntry:re,extractKey:Io(G)};return P[wr(G)]=re}),getIndexByKeyPath:function($){return P[wr($)]}};return P[":id"]=C.primaryKey,x!=null&&(P[wr(x)]=C.primaryKey),C})},hasGetAll:0<k.length&&"getAll"in b.objectStore(k[0])&&!(typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),A=I.schema,T=I.hasGetAll,I=A.tables.map(p),w={};return I.forEach(function(L){return w[L.name]=L}),{stack:"dbcore",transaction:a.transaction.bind(a),table:function(L){if(!w[L])throw new Error("Table '".concat(L,"' not found"));return w[L]},MIN_KEY:-1/0,MAX_KEY:_r(u),schema:A}}function Zm(a,u,c,f){var p=c.IDBKeyRange;return c.indexedDB,{dbcore:(f=Qm(u,p,f),a.dbcore.reduce(function(v,b){return b=b.create,i(i({},v),b(v))},f))}}function Cs(a,f){var c=f.db,f=Zm(a._middlewares,c,a._deps,f);a.core=f.dbcore,a.tables.forEach(function(p){var v=p.name;a.core.schema.tables.some(function(b){return b.name===v})&&(p.core=a.core.table(v),a[v]instanceof a.Table&&(a[v].core=p.core))})}function Rs(a,u,c,f){c.forEach(function(p){var v=f[p];u.forEach(function(b){var k=function A(T,I){return E(T,I)||(T=h(T))&&A(T,I)}(b,p);(!k||"value"in k&&k.value===void 0)&&(b===a.Transaction.prototype||b instanceof a.Transaction?_(b,p,{get:function(){return this.table(p)},set:function(A){O(this,p,{value:A,writable:!0,configurable:!0,enumerable:!0})}}):b[p]=new a.Table(p,v))})})}function Do(a,u){u.forEach(function(c){for(var f in c)c[f]instanceof a.Table&&delete c[f]})}function eg(a,u){return a._cfg.version-u._cfg.version}function tg(a,u,c,f){var p=a._dbSchema;c.objectStoreNames.contains("$meta")&&!p.$meta&&(p.$meta=Fo("$meta",Nc("")[0],[]),a._storeNames.push("$meta"));var v=a._createTransaction("readwrite",a._storeNames,p);v.create(c),v._completion.catch(f);var b=v._reject.bind(v),k=Ee.transless||Ee;In(function(){return Ee.trans=v,Ee.transless=k,u!==0?(Cs(a,c),T=u,((A=v).storeNames.includes("$meta")?A.table("$meta").get("version").then(function(I){return I!=null?I:T}):ge.resolve(T)).then(function(I){return L=I,x=v,F=c,P=[],I=(w=a)._versions,C=w._dbSchema=Is(0,w.idbdb,F),(I=I.filter(function($){return $._cfg.version>=L})).length!==0?(I.forEach(function($){P.push(function(){var U=C,V=$._cfg.dbschema;Ds(w,U,F),Ds(w,V,F),C=w._dbSchema=V;var G=Po(U,V);G.add.forEach(function(pe){Lo(F,pe[0],pe[1].primKey,pe[1].indexes)}),G.change.forEach(function(pe){if(pe.recreate)throw new ye.Upgrade("Not yet support for changing primary key");var de=F.objectStore(pe.name);pe.add.forEach(function(be){return Fs(de,be)}),pe.change.forEach(function(be){de.deleteIndex(be.name),Fs(de,be)}),pe.del.forEach(function(be){return de.deleteIndex(be)})});var re=$._cfg.contentUpgrade;if(re&&$._cfg.version>L){Cs(w,F),x._memoizedTables={};var fe=Se(V);G.del.forEach(function(pe){fe[pe]=U[pe]}),Do(w,[w.Transaction.prototype]),Rs(w,[w.Transaction.prototype],o(fe),fe),x.schema=fe;var se,le=Fe(re);return le&&Ri(),G=ge.follow(function(){var pe;(se=re(x))&&le&&(pe=Dn.bind(null,null),se.then(pe,pe))}),se&&typeof se.then=="function"?ge.resolve(se):G.then(function(){return se})}}),P.push(function(U){var V,G,re=$._cfg.dbschema;V=re,G=U,[].slice.call(G.db.objectStoreNames).forEach(function(fe){return V[fe]==null&&G.db.deleteObjectStore(fe)}),Do(w,[w.Transaction.prototype]),Rs(w,[w.Transaction.prototype],w._storeNames,w._dbSchema),x.schema=w._dbSchema}),P.push(function(U){w.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(w.idbdb.version/10)===$._cfg.version?(w.idbdb.deleteObjectStore("$meta"),delete w._dbSchema.$meta,w._storeNames=w._storeNames.filter(function(V){return V!=="$meta"})):U.objectStore("$meta").put($._cfg.version,"version"))})}),function $(){return P.length?ge.resolve(P.shift()(x.idbtrans)).then($):ge.resolve()}().then(function(){Ec(C,F)})):ge.resolve();var w,L,x,F,P,C}).catch(b)):(o(p).forEach(function(I){Lo(c,I,p[I].primKey,p[I].indexes)}),Cs(a,c),void ge.follow(function(){return a.on.populate.fire(v)}).catch(b));var A,T})}function ng(a,u){Ec(a._dbSchema,u),u.db.version%10!=0||u.objectStoreNames.contains("$meta")||u.db.createObjectStore("$meta").add(Math.ceil(u.db.version/10-1),"version");var c=Is(0,a.idbdb,u);Ds(a,a._dbSchema,u);for(var f=0,p=Po(c,a._dbSchema).change;f<p.length;f++){var v=function(b){if(b.change.length||b.recreate)return console.warn("Unable to patch indexes of table ".concat(b.name," because it has changes on the type of index or primary key.")),{value:void 0};var k=u.objectStore(b.name);b.add.forEach(function(A){Te&&console.debug("Dexie upgrade patch: Creating missing index ".concat(b.name,".").concat(A.src)),Fs(k,A)})}(p[f]);if(typeof v=="object")return v.value}}function Po(a,u){var c,f={del:[],add:[],change:[]};for(c in a)u[c]||f.del.push(c);for(c in u){var p=a[c],v=u[c];if(p){var b={name:c,def:v,recreate:!1,del:[],add:[],change:[]};if(""+(p.primKey.keyPath||"")!=""+(v.primKey.keyPath||"")||p.primKey.auto!==v.primKey.auto)b.recreate=!0,f.change.push(b);else{var k=p.idxByName,A=v.idxByName,T=void 0;for(T in k)A[T]||b.del.push(T);for(T in A){var I=k[T],w=A[T];I?I.src!==w.src&&b.change.push(w):b.add.push(w)}(0<b.del.length||0<b.add.length||0<b.change.length)&&f.change.push(b)}}else f.add.push([c,v])}return f}function Lo(a,u,c,f){var p=a.db.createObjectStore(u,c.keyPath?{keyPath:c.keyPath,autoIncrement:c.auto}:{autoIncrement:c.auto});return f.forEach(function(v){return Fs(p,v)}),p}function Ec(a,u){o(a).forEach(function(c){u.db.objectStoreNames.contains(c)||(Te&&console.debug("Dexie: Creating missing table",c),Lo(u,c,a[c].primKey,a[c].indexes))})}function Fs(a,u){a.createIndex(u.name,u.keyPath,{unique:u.unique,multiEntry:u.multi})}function Is(a,u,c){var f={};return j(u.objectStoreNames,0).forEach(function(p){for(var v=c.objectStore(p),b=Ro(wc(T=v.keyPath),T||"",!0,!1,!!v.autoIncrement,T&&typeof T!="string",!0),k=[],A=0;A<v.indexNames.length;++A){var I=v.index(v.indexNames[A]),T=I.keyPath,I=Ro(I.name,T,!!I.unique,!!I.multiEntry,!1,T&&typeof T!="string",!1);k.push(I)}f[p]=Fo(p,b,k)}),f}function Ds(a,u,c){for(var f=c.db.objectStoreNames,p=0;p<f.length;++p){var v=f[p],b=c.objectStore(v);a._hasGetAll="getAll"in b;for(var k=0;k<b.indexNames.length;++k){var A=b.indexNames[k],T=b.index(A).keyPath,I=typeof T=="string"?T:"["+j(T).join("+")+"]";!u[v]||(T=u[v].idxByName[I])&&(T.name=A,delete u[v].idxByName[I],u[v].idxByName[A]=T)}}typeof navigator!="undefined"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&s.WorkerGlobalScope&&s instanceof s.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(a._hasGetAll=!1)}function Nc(a){return a.split(",").map(function(u,c){var f=(u=u.trim()).replace(/([&*]|\+\+)/g,""),p=/^\[/.test(f)?f.match(/^\[(.*)\]$/)[1].split("+"):f;return Ro(f,p||null,/\&/.test(u),/\*/.test(u),/\+\+/.test(u),l(p),c===0)})}var ig=(Ps.prototype._parseStoresSpec=function(a,u){o(a).forEach(function(c){if(a[c]!==null){var f=Nc(a[c]),p=f.shift();if(p.unique=!0,p.multi)throw new ye.Schema("Primary key cannot be multi-valued");f.forEach(function(v){if(v.auto)throw new ye.Schema("Only primary key can be marked as autoIncrement (++)");if(!v.keyPath)throw new ye.Schema("Index must have a name and cannot be an empty string")}),u[c]=Fo(c,p,f)}})},Ps.prototype.stores=function(c){var u=this.db;this._cfg.storesSource=this._cfg.storesSource?d(this._cfg.storesSource,c):c;var c=u._versions,f={},p={};return c.forEach(function(v){d(f,v._cfg.storesSource),p=v._cfg.dbschema={},v._parseStoresSpec(f,p)}),u._dbSchema=p,Do(u,[u._allTables,u,u.Transaction.prototype]),Rs(u,[u._allTables,u,u.Transaction.prototype,this._cfg.tables],o(p),p),u._storeNames=o(p),this},Ps.prototype.upgrade=function(a){return this._cfg.contentUpgrade=ue(this._cfg.contentUpgrade||Oe,a),this},Ps);function Ps(){}function $o(a,u){var c=a._dbNamesDB;return c||(c=a._dbNamesDB=new bn(Ns,{addons:[],indexedDB:a,IDBKeyRange:u})).version(1).stores({dbnames:"name"}),c.table("dbnames")}function Mo(a){return a&&typeof a.databases=="function"}function Bo(a){return In(function(){return Ee.letThrough=!0,a()})}function Uo(a){return!("from"in a)}var Nt=function(a,u){if(!this){var c=new Nt;return a&&"d"in a&&d(c,a),c}d(this,arguments.length?{d:1,from:a,to:1<arguments.length?u:a}:{d:0})};function Sr(a,u,c){var f=qe(u,c);if(!isNaN(f)){if(0<f)throw RangeError();if(Uo(a))return d(a,{from:u,to:c,d:1});var p=a.l,f=a.r;if(qe(c,a.from)<0)return p?Sr(p,u,c):a.l={from:u,to:c,d:1,l:null,r:null},Oc(a);if(0<qe(u,a.to))return f?Sr(f,u,c):a.r={from:u,to:c,d:1,l:null,r:null},Oc(a);qe(u,a.from)<0&&(a.from=u,a.l=null,a.d=f?f.d+1:1),0<qe(c,a.to)&&(a.to=c,a.r=null,a.d=a.l?a.l.d+1:1),c=!a.r,p&&!a.l&&Er(a,p),f&&c&&Er(a,f)}}function Er(a,u){Uo(u)||function c(f,A){var v=A.from,b=A.to,k=A.l,A=A.r;Sr(f,v,b),k&&c(f,k),A&&c(f,A)}(a,u)}function Ac(a,u){var c=Ls(u),f=c.next();if(f.done)return!1;for(var p=f.value,v=Ls(a),b=v.next(p.from),k=b.value;!f.done&&!b.done;){if(qe(k.from,p.to)<=0&&0<=qe(k.to,p.from))return!0;qe(p.from,k.from)<0?p=(f=c.next(k.from)).value:k=(b=v.next(p.from)).value}return!1}function Ls(a){var u=Uo(a)?null:{s:0,n:a};return{next:function(c){for(var f=0<arguments.length;u;)switch(u.s){case 0:if(u.s=1,f)for(;u.n.l&&qe(c,u.n.from)<0;)u={up:u,n:u.n.l,s:1};else for(;u.n.l;)u={up:u,n:u.n.l,s:1};case 1:if(u.s=2,!f||qe(c,u.n.to)<=0)return{value:u.n,done:!1};case 2:if(u.n.r){u.s=3,u={up:u,n:u.n.r,s:0};continue}case 3:u=u.up}return{done:!0}}}}function Oc(a){var u,c,f=(((u=a.r)===null||u===void 0?void 0:u.d)||0)-(((c=a.l)===null||c===void 0?void 0:c.d)||0),p=1<f?"r":f<-1?"l":"";p&&(u=p=="r"?"l":"r",c=i({},a),f=a[p],a.from=f.from,a.to=f.to,a[p]=f[p],c[p]=f[u],(a[u]=c).d=xc(c)),a.d=xc(a)}function xc(c){var u=c.r,c=c.l;return(u?c?Math.max(u.d,c.d):u.d:c?c.d:0)+1}function $s(a,u){return o(u).forEach(function(c){a[c]?Er(a[c],u[c]):a[c]=function f(p){var v,b,k={};for(v in p)y(p,v)&&(b=p[v],k[v]=!b||typeof b!="object"||Ne.has(b.constructor)?b:f(b));return k}(u[c])}),a}function jo(a,u){return a.all||u.all||Object.keys(a).some(function(c){return u[c]&&Ac(u[c],a[c])})}g(Nt.prototype,((zt={add:function(a){return Er(this,a),this},addKey:function(a){return Sr(this,a,a),this},addKeys:function(a){var u=this;return a.forEach(function(c){return Sr(u,c,c)}),this},hasKey:function(a){var u=Ls(this).next(a).value;return u&&qe(u.from,a)<=0&&0<=qe(u.to,a)}})[K]=function(){return Ls(this)},zt));var si={},Vo={},Ho=!1;function Ms(a){$s(Vo,a),Ho||(Ho=!0,setTimeout(function(){Ho=!1,qo(Vo,!(Vo={}))},0))}function qo(a,u){u===void 0&&(u=!1);var c=new Set;if(a.all)for(var f=0,p=Object.values(si);f<p.length;f++)Tc(b=p[f],a,c,u);else for(var v in a){var b,k=/^idb\:\/\/(.*)\/(.*)\//.exec(v);k&&(v=k[1],k=k[2],(b=si["idb://".concat(v,"/").concat(k)])&&Tc(b,a,c,u))}c.forEach(function(A){return A()})}function Tc(a,u,c,f){for(var p=[],v=0,b=Object.entries(a.queries.query);v<b.length;v++){for(var k=b[v],A=k[0],T=[],I=0,w=k[1];I<w.length;I++){var L=w[I];jo(u,L.obsSet)?L.subscribers.forEach(function(C){return c.add(C)}):f&&T.push(L)}f&&p.push([A,T])}if(f)for(var x=0,F=p;x<F.length;x++){var P=F[x],A=P[0],T=P[1];a.queries.query[A]=T}}function rg(a){var u=a._state,c=a._deps.indexedDB;if(u.isBeingOpened||a.idbdb)return u.dbReadyPromise.then(function(){return u.dbOpenError?dt(u.dbOpenError):a});u.isBeingOpened=!0,u.dbOpenError=null,u.openComplete=!1;var f=u.openCanceller,p=Math.round(10*a.verno),v=!1;function b(){if(u.openCanceller!==f)throw new ye.DatabaseClosed("db.open() was cancelled")}function k(){return new ge(function(L,x){if(b(),!c)throw new ye.MissingAPI;var F=a.name,P=u.autoSchema||!p?c.open(F):c.open(F,p);if(!P)throw new ye.MissingAPI;P.onerror=un(x),P.onblocked=st(a._fireOnBlocked),P.onupgradeneeded=st(function(C){var $;I=P.transaction,u.autoSchema&&!a._options.allowEmptyDB?(P.onerror=br,I.abort(),P.result.close(),($=c.deleteDatabase(F)).onsuccess=$.onerror=st(function(){x(new ye.NoSuchDatabase("Database ".concat(F," doesnt exist")))})):(I.onerror=un(x),C=C.oldVersion>Math.pow(2,62)?0:C.oldVersion,w=C<1,a.idbdb=P.result,v&&ng(a,I),tg(a,C/10,I,x))},x),P.onsuccess=st(function(){I=null;var C,$,U,V,G,re=a.idbdb=P.result,fe=j(re.objectStoreNames);if(0<fe.length)try{var se=re.transaction((V=fe).length===1?V[0]:V,"readonly");if(u.autoSchema)$=re,U=se,(C=a).verno=$.version/10,U=C._dbSchema=Is(0,$,U),C._storeNames=j($.objectStoreNames,0),Rs(C,[C._allTables],o(U),U);else if(Ds(a,a._dbSchema,se),((G=Po(Is(0,(G=a).idbdb,se),G._dbSchema)).add.length||G.change.some(function(le){return le.add.length||le.change.length}))&&!v)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),re.close(),p=re.version+1,v=!0,L(k());Cs(a,se)}catch{}Fi.push(a),re.onversionchange=st(function(le){u.vcFired=!0,a.on("versionchange").fire(le)}),re.onclose=st(function(le){a.on("close").fire(le)}),w&&(G=a._deps,se=F,re=G.indexedDB,G=G.IDBKeyRange,Mo(re)||se===Ns||$o(re,G).put({name:se}).catch(Oe)),L()},x)}).catch(function(L){switch(L==null?void 0:L.name){case"UnknownError":if(0<u.PR1398_maxLoop)return u.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),k();break;case"VersionError":if(0<p)return p=0,k()}return ge.reject(L)})}var A,T=u.dbReadyResolve,I=null,w=!1;return ge.race([f,(typeof navigator=="undefined"?ge.resolve():!navigator.userAgentData&&/Safari\//.test(navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(L){function x(){return indexedDB.databases().finally(L)}A=setInterval(x,100),x()}).finally(function(){return clearInterval(A)}):Promise.resolve()).then(k)]).then(function(){return b(),u.onReadyBeingFired=[],ge.resolve(Bo(function(){return a.on.ready.fire(a.vip)})).then(function L(){if(0<u.onReadyBeingFired.length){var x=u.onReadyBeingFired.reduce(ue,Oe);return u.onReadyBeingFired=[],ge.resolve(Bo(function(){return x(a.vip)})).then(L)}})}).finally(function(){u.openCanceller===f&&(u.onReadyBeingFired=null,u.isBeingOpened=!1)}).catch(function(L){u.dbOpenError=L;try{I&&I.abort()}catch{}return f===u.openCanceller&&a._close(),dt(L)}).finally(function(){u.openComplete=!0,T()}).then(function(){var L;return w&&(L={},a.tables.forEach(function(x){x.schema.indexes.forEach(function(F){F.name&&(L["idb://".concat(a.name,"/").concat(x.name,"/").concat(F.name)]=new Nt(-1/0,[[[]]]))}),L["idb://".concat(a.name,"/").concat(x.name,"/")]=L["idb://".concat(a.name,"/").concat(x.name,"/:dels")]=new Nt(-1/0,[[[]]])}),$n(kr).fire(L),qo(L,!0)),a})}function zo(a){function u(v){return a.next(v)}var c=p(u),f=p(function(v){return a.throw(v)});function p(v){return function(A){var k=v(A),A=k.value;return k.done?A:A&&typeof A.then=="function"?A.then(c,f):l(A)?Promise.all(A).then(c,f):c(A)}}return p(u)()}function Bs(a,u,c){for(var f=l(a)?a.slice():[a],p=0;p<c;++p)f.push(u);return f}var sg={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(a){return i(i({},a),{table:function(u){var c=a.table(u),f=c.schema,p={},v=[];function b(w,L,x){var F=wr(w),P=p[F]=p[F]||[],C=w==null?0:typeof w=="string"?1:w.length,$=0<L,$=i(i({},x),{name:$?"".concat(F,"(virtual-from:").concat(x.name,")"):x.name,lowLevelIndex:x,isVirtual:$,keyTail:L,keyLength:C,extractKey:Io(w),unique:!$&&x.unique});return P.push($),$.isPrimaryKey||v.push($),1<C&&b(C===2?w[0]:w.slice(0,C-1),L+1,x),P.sort(function(U,V){return U.keyTail-V.keyTail}),$}u=b(f.primaryKey.keyPath,0,f.primaryKey),p[":id"]=[u];for(var k=0,A=f.indexes;k<A.length;k++){var T=A[k];b(T.keyPath,0,T)}function I(w){var L,x=w.query.index;return x.isVirtual?i(i({},w),{query:{index:x.lowLevelIndex,range:(L=w.query.range,x=x.keyTail,{type:L.type===1?2:L.type,lower:Bs(L.lower,L.lowerOpen?a.MAX_KEY:a.MIN_KEY,x),lowerOpen:!0,upper:Bs(L.upper,L.upperOpen?a.MIN_KEY:a.MAX_KEY,x),upperOpen:!0})}}):w}return i(i({},c),{schema:i(i({},f),{primaryKey:u,indexes:v,getIndexByKeyPath:function(w){return(w=p[wr(w)])&&w[0]}}),count:function(w){return c.count(I(w))},query:function(w){return c.query(I(w))},openCursor:function(w){var L=w.query.index,x=L.keyTail,F=L.isVirtual,P=L.keyLength;return F?c.openCursor(I(w)).then(function($){return $&&C($)}):c.openCursor(w);function C($){return Object.create($,{continue:{value:function(U){U!=null?$.continue(Bs(U,w.reverse?a.MAX_KEY:a.MIN_KEY,x)):w.unique?$.continue($.key.slice(0,P).concat(w.reverse?a.MIN_KEY:a.MAX_KEY,x)):$.continue()}},continuePrimaryKey:{value:function(U,V){$.continuePrimaryKey(Bs(U,a.MAX_KEY,x),V)}},primaryKey:{get:function(){return $.primaryKey}},key:{get:function(){var U=$.key;return P===1?U[0]:U.slice(0,P)}},value:{get:function(){return $.value}}})}}})}})}};function Ko(a,u,c,f){return c=c||{},f=f||"",o(a).forEach(function(p){var v,b,k;y(u,p)?(v=a[p],b=u[p],typeof v=="object"&&typeof b=="object"&&v&&b?(k=N(v))!==N(b)?c[f+p]=u[p]:k==="Object"?Ko(v,b,c,f+p+"."):v!==b&&(c[f+p]=u[p]):v!==b&&(c[f+p]=u[p])):c[f+p]=void 0}),o(u).forEach(function(p){y(a,p)||(c[f+p]=u[p])}),c}function Go(a,u){return u.type==="delete"?u.keys:u.keys||u.values.map(a.extractKey)}var ag={stack:"dbcore",name:"HooksMiddleware",level:2,create:function(a){return i(i({},a),{table:function(u){var c=a.table(u),f=c.schema.primaryKey;return i(i({},c),{mutate:function(p){var v=Ee.trans,b=v.table(u).hook,k=b.deleting,A=b.creating,T=b.updating;switch(p.type){case"add":if(A.fire===Oe)break;return v._promise("readwrite",function(){return I(p)},!0);case"put":if(A.fire===Oe&&T.fire===Oe)break;return v._promise("readwrite",function(){return I(p)},!0);case"delete":if(k.fire===Oe)break;return v._promise("readwrite",function(){return I(p)},!0);case"deleteRange":if(k.fire===Oe)break;return v._promise("readwrite",function(){return function w(L,x,F){return c.query({trans:L,values:!1,query:{index:f,range:x},limit:F}).then(function(P){var C=P.result;return I({type:"delete",keys:C,trans:L}).then(function($){return 0<$.numFailures?Promise.reject($.failures[0]):C.length<F?{failures:[],numFailures:0,lastResult:void 0}:w(L,i(i({},x),{lower:C[C.length-1],lowerOpen:!0}),F)})})}(p.trans,p.range,1e4)},!0)}return c.mutate(p);function I(w){var L,x,F,P=Ee.trans,C=w.keys||Go(f,w);if(!C)throw new Error("Keys missing");return(w=w.type==="add"||w.type==="put"?i(i({},w),{keys:C}):i({},w)).type!=="delete"&&(w.values=r([],w.values)),w.keys&&(w.keys=r([],w.keys)),L=c,F=C,((x=w).type==="add"?Promise.resolve([]):L.getMany({trans:x.trans,keys:F,cache:"immutable"})).then(function($){var U=C.map(function(V,G){var re,fe,se,le=$[G],pe={onerror:null,onsuccess:null};return w.type==="delete"?k.fire.call(pe,V,le,P):w.type==="add"||le===void 0?(re=A.fire.call(pe,V,w.values[G],P),V==null&&re!=null&&(w.keys[G]=V=re,f.outbound||oe(w.values[G],f.keyPath,V))):(re=Ko(le,w.values[G]),(fe=T.fire.call(pe,re,V,le,P))&&(se=w.values[G],Object.keys(fe).forEach(function(de){y(se,de)?se[de]=fe[de]:oe(se,de,fe[de])}))),pe});return c.mutate(w).then(function(V){for(var G=V.failures,re=V.results,fe=V.numFailures,V=V.lastResult,se=0;se<C.length;++se){var le=(re||C)[se],pe=U[se];le==null?pe.onerror&&pe.onerror(G[se]):pe.onsuccess&&pe.onsuccess(w.type==="put"&&$[se]?w.values[se]:le)}return{failures:G,results:re,numFailures:fe,lastResult:V}}).catch(function(V){return U.forEach(function(G){return G.onerror&&G.onerror(V)}),Promise.reject(V)})})}}})}})}};function Cc(a,u,c){try{if(!u||u.keys.length<a.length)return null;for(var f=[],p=0,v=0;p<u.keys.length&&v<a.length;++p)qe(u.keys[p],a[v])===0&&(f.push(c?Ve(u.values[p]):u.values[p]),++v);return f.length===a.length?f:null}catch{return null}}var og={stack:"dbcore",level:-1,create:function(a){return{table:function(u){var c=a.table(u);return i(i({},c),{getMany:function(f){if(!f.cache)return c.getMany(f);var p=Cc(f.keys,f.trans._cache,f.cache==="clone");return p?ge.resolve(p):c.getMany(f).then(function(v){return f.trans._cache={keys:f.keys,values:f.cache==="clone"?Ve(v):v},v})},mutate:function(f){return f.type!=="add"&&(f.trans._cache=null),c.mutate(f)}})}}}};function Rc(a,u){return a.trans.mode==="readonly"&&!!a.subscr&&!a.trans.explicit&&a.trans.db._options.cache!=="disabled"&&!u.schema.primaryKey.outbound}function Fc(a,u){switch(a){case"query":return u.values&&!u.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var ug={stack:"dbcore",level:0,name:"Observability",create:function(a){var u=a.schema.name,c=new Nt(a.MIN_KEY,a.MAX_KEY);return i(i({},a),{transaction:function(f,p,v){if(Ee.subscr&&p!=="readonly")throw new ye.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(Ee.querier));return a.transaction(f,p,v)},table:function(f){var p=a.table(f),v=p.schema,b=v.primaryKey,w=v.indexes,k=b.extractKey,A=b.outbound,T=b.autoIncrement&&w.filter(function(x){return x.compound&&x.keyPath.includes(b.keyPath)}),I=i(i({},p),{mutate:function(x){function F(de){return de="idb://".concat(u,"/").concat(f,"/").concat(de),V[de]||(V[de]=new Nt)}var P,C,$,U=x.trans,V=x.mutatedParts||(x.mutatedParts={}),G=F(""),re=F(":dels"),fe=x.type,pe=x.type==="deleteRange"?[x.range]:x.type==="delete"?[x.keys]:x.values.length<50?[Go(b,x).filter(function(de){return de}),x.values]:[],se=pe[0],le=pe[1],pe=x.trans._cache;return l(se)?(G.addKeys(se),(pe=fe==="delete"||se.length===le.length?Cc(se,pe):null)||re.addKeys(se),(pe||le)&&(P=F,C=pe,$=le,v.indexes.forEach(function(de){var be=P(de.name||"");function De(Ue){return Ue!=null?de.extractKey(Ue):null}function Be(Ue){return de.multiEntry&&l(Ue)?Ue.forEach(function(Mt){return be.addKey(Mt)}):be.addKey(Ue)}(C||$).forEach(function(Ue,At){var Ie=C&&De(C[At]),At=$&&De($[At]);qe(Ie,At)!==0&&(Ie!=null&&Be(Ie),At!=null&&Be(At))})}))):se?(le={from:(le=se.lower)!==null&&le!==void 0?le:a.MIN_KEY,to:(le=se.upper)!==null&&le!==void 0?le:a.MAX_KEY},re.add(le),G.add(le)):(G.add(c),re.add(c),v.indexes.forEach(function(de){return F(de.name).add(c)})),p.mutate(x).then(function(de){return!se||x.type!=="add"&&x.type!=="put"||(G.addKeys(de.results),T&&T.forEach(function(be){for(var De=x.values.map(function(Ie){return be.extractKey(Ie)}),Be=be.keyPath.findIndex(function(Ie){return Ie===b.keyPath}),Ue=0,Mt=de.results.length;Ue<Mt;++Ue)De[Ue][Be]=de.results[Ue];F(be.name).addKeys(De)})),U.mutatedParts=$s(U.mutatedParts||{},V),de})}}),w=function(F){var P=F.query,F=P.index,P=P.range;return[F,new Nt((F=P.lower)!==null&&F!==void 0?F:a.MIN_KEY,(P=P.upper)!==null&&P!==void 0?P:a.MAX_KEY)]},L={get:function(x){return[b,new Nt(x.key)]},getMany:function(x){return[b,new Nt().addKeys(x.keys)]},count:w,query:w,openCursor:w};return o(L).forEach(function(x){I[x]=function(F){var P=Ee.subscr,C=!!P,$=Rc(Ee,p)&&Fc(x,F)?F.obsSet={}:P;if(C){var U=function(le){return le="idb://".concat(u,"/").concat(f,"/").concat(le),$[le]||($[le]=new Nt)},V=U(""),G=U(":dels"),P=L[x](F),C=P[0],P=P[1];if((x==="query"&&C.isPrimaryKey&&!F.values?G:U(C.name||"")).add(P),!C.isPrimaryKey){if(x!=="count"){var re=x==="query"&&A&&F.values&&p.query(i(i({},F),{values:!1}));return p[x].apply(this,arguments).then(function(le){if(x==="query"){if(A&&F.values)return re.then(function(De){return De=De.result,V.addKeys(De),le});var pe=F.values?le.result.map(k):le.result;(F.values?V:G).addKeys(pe)}else if(x==="openCursor"){var de=le,be=F.values;return de&&Object.create(de,{key:{get:function(){return G.addKey(de.primaryKey),de.key}},primaryKey:{get:function(){var De=de.primaryKey;return G.addKey(De),De}},value:{get:function(){return be&&V.addKey(de.primaryKey),de.value}}})}return le})}G.add(c)}}return p[x].apply(this,arguments)}}),I}})}};function Ic(a,u,c){if(c.numFailures===0)return u;if(u.type==="deleteRange")return null;var f=u.keys?u.keys.length:"values"in u&&u.values?u.values.length:1;return c.numFailures===f?null:(u=i({},u),l(u.keys)&&(u.keys=u.keys.filter(function(p,v){return!(v in c.failures)})),"values"in u&&l(u.values)&&(u.values=u.values.filter(function(p,v){return!(v in c.failures)})),u)}function Wo(a,u){return c=a,((f=u).lower===void 0||(f.lowerOpen?0<qe(c,f.lower):0<=qe(c,f.lower)))&&(a=a,(u=u).upper===void 0||(u.upperOpen?qe(a,u.upper)<0:qe(a,u.upper)<=0));var c,f}function Dc(a,u,L,f,p,v){if(!L||L.length===0)return a;var b=u.query.index,k=b.multiEntry,A=u.query.range,T=f.schema.primaryKey.extractKey,I=b.extractKey,w=(b.lowLevelIndex||b).extractKey,L=L.reduce(function(x,F){var P=x,C=[];if(F.type==="add"||F.type==="put")for(var $=new Nt,U=F.values.length-1;0<=U;--U){var V,G=F.values[U],re=T(G);$.hasKey(re)||(V=I(G),(k&&l(V)?V.some(function(de){return Wo(de,A)}):Wo(V,A))&&($.addKey(re),C.push(G)))}switch(F.type){case"add":var fe=new Nt().addKeys(u.values?x.map(function(be){return T(be)}):x),P=x.concat(u.values?C.filter(function(be){return be=T(be),!fe.hasKey(be)&&(fe.addKey(be),!0)}):C.map(function(be){return T(be)}).filter(function(be){return!fe.hasKey(be)&&(fe.addKey(be),!0)}));break;case"put":var se=new Nt().addKeys(F.values.map(function(be){return T(be)}));P=x.filter(function(be){return!se.hasKey(u.values?T(be):be)}).concat(u.values?C:C.map(function(be){return T(be)}));break;case"delete":var le=new Nt().addKeys(F.keys);P=x.filter(function(be){return!le.hasKey(u.values?T(be):be)});break;case"deleteRange":var pe=F.range;P=x.filter(function(be){return!Wo(T(be),pe)})}return P},a);return L===a?a:(L.sort(function(x,F){return qe(w(x),w(F))||qe(T(x),T(F))}),u.limit&&u.limit<1/0&&(L.length>u.limit?L.length=u.limit:a.length===u.limit&&L.length<u.limit&&(p.dirty=!0)),v?Object.freeze(L):L)}function Pc(a,u){return qe(a.lower,u.lower)===0&&qe(a.upper,u.upper)===0&&!!a.lowerOpen==!!u.lowerOpen&&!!a.upperOpen==!!u.upperOpen}function lg(a,u){return function(c,f,p,v){if(c===void 0)return f!==void 0?-1:0;if(f===void 0)return 1;if((f=qe(c,f))===0){if(p&&v)return 0;if(p)return 1;if(v)return-1}return f}(a.lower,u.lower,a.lowerOpen,u.lowerOpen)<=0&&0<=function(c,f,p,v){if(c===void 0)return f!==void 0?1:0;if(f===void 0)return-1;if((f=qe(c,f))===0){if(p&&v)return 0;if(p)return-1;if(v)return 1}return f}(a.upper,u.upper,a.upperOpen,u.upperOpen)}function cg(a,u,c,f){a.subscribers.add(c),f.addEventListener("abort",function(){var p,v;a.subscribers.delete(c),a.subscribers.size===0&&(p=a,v=u,setTimeout(function(){p.subscribers.size===0&&ce(v,p)},3e3))})}var dg={stack:"dbcore",level:0,name:"Cache",create:function(a){var u=a.schema.name;return i(i({},a),{transaction:function(c,f,p){var v,b,k=a.transaction(c,f,p);return f==="readwrite"&&(b=(v=new AbortController).signal,p=function(A){return function(){if(v.abort(),f==="readwrite"){for(var T=new Set,I=0,w=c;I<w.length;I++){var L=w[I],x=si["idb://".concat(u,"/").concat(L)];if(x){var F=a.table(L),P=x.optimisticOps.filter(function(be){return be.trans===k});if(k._explicit&&A&&k.mutatedParts)for(var C=0,$=Object.values(x.queries.query);C<$.length;C++)for(var U=0,V=(fe=$[C]).slice();U<V.length;U++)jo((se=V[U]).obsSet,k.mutatedParts)&&(ce(fe,se),se.subscribers.forEach(function(be){return T.add(be)}));else if(0<P.length){x.optimisticOps=x.optimisticOps.filter(function(be){return be.trans!==k});for(var G=0,re=Object.values(x.queries.query);G<re.length;G++)for(var fe,se,le,pe=0,de=(fe=re[G]).slice();pe<de.length;pe++)(se=de[pe]).res!=null&&k.mutatedParts&&(A&&!se.dirty?(le=Object.isFrozen(se.res),le=Dc(se.res,se.req,P,F,se,le),se.dirty?(ce(fe,se),se.subscribers.forEach(function(be){return T.add(be)})):le!==se.res&&(se.res=le,se.promise=ge.resolve({result:le}))):(se.dirty&&ce(fe,se),se.subscribers.forEach(function(be){return T.add(be)})))}}}T.forEach(function(be){return be()})}}},k.addEventListener("abort",p(!1),{signal:b}),k.addEventListener("error",p(!1),{signal:b}),k.addEventListener("complete",p(!0),{signal:b})),k},table:function(c){var f=a.table(c),p=f.schema.primaryKey;return i(i({},f),{mutate:function(v){var b=Ee.trans;if(p.outbound||b.db._options.cache==="disabled"||b.explicit||b.idbtrans.mode!=="readwrite")return f.mutate(v);var k=si["idb://".concat(u,"/").concat(c)];return k?(b=f.mutate(v),v.type!=="add"&&v.type!=="put"||!(50<=v.values.length||Go(p,v).some(function(A){return A==null}))?(k.optimisticOps.push(v),v.mutatedParts&&Ms(v.mutatedParts),b.then(function(A){0<A.numFailures&&(ce(k.optimisticOps,v),(A=Ic(0,v,A))&&k.optimisticOps.push(A),v.mutatedParts&&Ms(v.mutatedParts))}),b.catch(function(){ce(k.optimisticOps,v),v.mutatedParts&&Ms(v.mutatedParts)})):b.then(function(A){var T=Ic(0,i(i({},v),{values:v.values.map(function(I,w){var L;return A.failures[w]?I:(I=(L=p.keyPath)!==null&&L!==void 0&&L.includes(".")?Ve(I):i({},I),oe(I,p.keyPath,A.results[w]),I)})}),A);k.optimisticOps.push(T),queueMicrotask(function(){return v.mutatedParts&&Ms(v.mutatedParts)})}),b):f.mutate(v)},query:function(v){if(!Rc(Ee,f)||!Fc("query",v))return f.query(v);var b=((T=Ee.trans)===null||T===void 0?void 0:T.db._options.cache)==="immutable",w=Ee,k=w.requery,A=w.signal,T=function(F,P,C,$){var U=si["idb://".concat(F,"/").concat(P)];if(!U)return[];if(!(P=U.queries[C]))return[null,!1,U,null];var V=P[($.query?$.query.index.name:null)||""];if(!V)return[null,!1,U,null];switch(C){case"query":var G=V.find(function(re){return re.req.limit===$.limit&&re.req.values===$.values&&Pc(re.req.query.range,$.query.range)});return G?[G,!0,U,V]:[V.find(function(re){return("limit"in re.req?re.req.limit:1/0)>=$.limit&&(!$.values||re.req.values)&&lg(re.req.query.range,$.query.range)}),!1,U,V];case"count":return G=V.find(function(re){return Pc(re.req.query.range,$.query.range)}),[G,!!G,U,V]}}(u,c,"query",v),I=T[0],w=T[1],L=T[2],x=T[3];return I&&w?I.obsSet=v.obsSet:(w=f.query(v).then(function(F){var P=F.result;if(I&&(I.res=P),b){for(var C=0,$=P.length;C<$;++C)Object.freeze(P[C]);Object.freeze(P)}else F.result=Ve(P);return F}).catch(function(F){return x&&I&&ce(x,I),Promise.reject(F)}),I={obsSet:v.obsSet,promise:w,subscribers:new Set,type:"query",req:v,dirty:!1},x?x.push(I):(x=[I],(L=L||(si["idb://".concat(u,"/").concat(c)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[v.query.index.name||""]=x)),cg(I,x,k,A),I.promise.then(function(F){return{result:Dc(F.result,v,L==null?void 0:L.optimisticOps,f,I,b)}})}})}})}};function Us(a,u){return new Proxy(a,{get:function(c,f,p){return f==="db"?u:Reflect.get(c,f,p)}})}var bn=(ft.prototype.version=function(a){if(isNaN(a)||a<.1)throw new ye.Type("Given version is not a positive number");if(a=Math.round(10*a)/10,this.idbdb||this._state.isBeingOpened)throw new ye.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,a);var u=this._versions,c=u.filter(function(f){return f._cfg.version===a})[0];return c||(c=new this.Version(a),u.push(c),u.sort(eg),c.stores({}),this._state.autoSchema=!1,c)},ft.prototype._whenReady=function(a){var u=this;return this.idbdb&&(this._state.openComplete||Ee.letThrough||this._vip)?a():new ge(function(c,f){if(u._state.openComplete)return f(new ye.DatabaseClosed(u._state.dbOpenError));if(!u._state.isBeingOpened){if(!u._state.autoOpen)return void f(new ye.DatabaseClosed);u.open().catch(Oe)}u._state.dbReadyPromise.then(c,f)}).then(a)},ft.prototype.use=function(a){var u=a.stack,c=a.create,f=a.level,p=a.name;return p&&this.unuse({stack:u,name:p}),a=this._middlewares[u]||(this._middlewares[u]=[]),a.push({stack:u,create:c,level:f==null?10:f,name:p}),a.sort(function(v,b){return v.level-b.level}),this},ft.prototype.unuse=function(a){var u=a.stack,c=a.name,f=a.create;return u&&this._middlewares[u]&&(this._middlewares[u]=this._middlewares[u].filter(function(p){return f?p.create!==f:!!c&&p.name!==c})),this},ft.prototype.open=function(){var a=this;return ni(Fn,function(){return rg(a)})},ft.prototype._close=function(){var a=this._state,u=Fi.indexOf(this);if(0<=u&&Fi.splice(u,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}a.isBeingOpened||(a.dbReadyPromise=new ge(function(c){a.dbReadyResolve=c}),a.openCanceller=new ge(function(c,f){a.cancelOpen=f}))},ft.prototype.close=function(c){var u=(c===void 0?{disableAutoOpen:!0}:c).disableAutoOpen,c=this._state;u?(c.isBeingOpened&&c.cancelOpen(new ye.DatabaseClosed),this._close(),c.autoOpen=!1,c.dbOpenError=new ye.DatabaseClosed):(this._close(),c.autoOpen=this._options.autoOpen||c.isBeingOpened,c.openComplete=!1,c.dbOpenError=null)},ft.prototype.delete=function(a){var u=this;a===void 0&&(a={disableAutoOpen:!0});var c=0<arguments.length&&typeof arguments[0]!="object",f=this._state;return new ge(function(p,v){function b(){u.close(a);var k=u._deps.indexedDB.deleteDatabase(u.name);k.onsuccess=st(function(){var A,T,I;A=u._deps,T=u.name,I=A.indexedDB,A=A.IDBKeyRange,Mo(I)||T===Ns||$o(I,A).delete(T).catch(Oe),p()}),k.onerror=un(v),k.onblocked=u._fireOnBlocked}if(c)throw new ye.InvalidArgument("Invalid closeOptions argument to db.delete()");f.isBeingOpened?f.dbReadyPromise.then(b):b()})},ft.prototype.backendDB=function(){return this.idbdb},ft.prototype.isOpen=function(){return this.idbdb!==null},ft.prototype.hasBeenClosed=function(){var a=this._state.dbOpenError;return a&&a.name==="DatabaseClosed"},ft.prototype.hasFailed=function(){return this._state.dbOpenError!==null},ft.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(ft.prototype,"tables",{get:function(){var a=this;return o(this._allTables).map(function(u){return a._allTables[u]})},enumerable:!1,configurable:!0}),ft.prototype.transaction=function(){var a=function(u,c,f){var p=arguments.length;if(p<2)throw new ye.InvalidArgument("Too few arguments");for(var v=new Array(p-1);--p;)v[p-1]=arguments[p];return f=v.pop(),[u,ze(v),f]}.apply(this,arguments);return this._transaction.apply(this,a)},ft.prototype._transaction=function(a,u,c){var f=this,p=Ee.trans;p&&p.db===this&&a.indexOf("!")===-1||(p=null);var v,b,k=a.indexOf("?")!==-1;a=a.replace("!","").replace("?","");try{if(b=u.map(function(T){if(T=T instanceof f.Table?T.name:T,typeof T!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return T}),a=="r"||a===No)v=No;else{if(a!="rw"&&a!=Ao)throw new ye.InvalidArgument("Invalid transaction mode: "+a);v=Ao}if(p){if(p.mode===No&&v===Ao){if(!k)throw new ye.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");p=null}p&&b.forEach(function(T){if(p&&p.storeNames.indexOf(T)===-1){if(!k)throw new ye.SubTransaction("Table "+T+" not included in parent transaction.");p=null}}),k&&p&&!p.active&&(p=null)}}catch(T){return p?p._promise(null,function(I,w){w(T)}):dt(T)}var A=function T(I,w,L,x,F){return ge.resolve().then(function(){var P=Ee.transless||Ee,C=I._createTransaction(w,L,I._dbSchema,x);if(C.explicit=!0,P={trans:C,transless:P},x)C.idbtrans=x.idbtrans;else try{C.create(),C.idbtrans._explicit=!0,I._state.PR1398_maxLoop=3}catch(V){return V.name===_e.InvalidState&&I.isOpen()&&0<--I._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),I.close({disableAutoOpen:!1}),I.open().then(function(){return T(I,w,L,null,F)})):dt(V)}var $,U=Fe(F);return U&&Ri(),P=ge.follow(function(){var V;($=F.call(C,C))&&(U?(V=Dn.bind(null,null),$.then(V,V)):typeof $.next=="function"&&typeof $.throw=="function"&&($=zo($)))},P),($&&typeof $.then=="function"?ge.resolve($).then(function(V){return C.active?V:dt(new ye.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):P.then(function(){return $})).then(function(V){return x&&C._resolve(),C._completion.then(function(){return V})}).catch(function(V){return C._reject(V),dt(V)})})}.bind(null,this,v,b,p,c);return p?p._promise(v,A,"lock"):Ee.trans?ni(Ee.transless,function(){return f._whenReady(A)}):this._whenReady(A)},ft.prototype.table=function(a){if(!y(this._allTables,a))throw new ye.InvalidTable("Table ".concat(a," does not exist"));return this._allTables[a]},ft);function ft(a,u){var c=this;this._middlewares={},this.verno=0;var f=ft.dependencies;this._options=u=i({addons:ft.addons,autoOpen:!0,indexedDB:f.indexedDB,IDBKeyRange:f.IDBKeyRange,cache:"cloned"},u),this._deps={indexedDB:u.indexedDB,IDBKeyRange:u.IDBKeyRange},f=u.addons,this._dbSchema={},this._versions=[],this._storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var p,v,b,k,A,T={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:Oe,dbReadyPromise:null,cancelOpen:Oe,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:u.autoOpen};T.dbReadyPromise=new ge(function(w){T.dbReadyResolve=w}),T.openCanceller=new ge(function(w,L){T.cancelOpen=L}),this._state=T,this.name=a,this.on=gr(this,"populate","blocked","versionchange","close",{ready:[ue,Oe]}),this.on.ready.subscribe=J(this.on.ready.subscribe,function(w){return function(L,x){ft.vip(function(){var F,P=c._state;P.openComplete?(P.dbOpenError||ge.resolve().then(L),x&&w(L)):P.onReadyBeingFired?(P.onReadyBeingFired.push(L),x&&w(L)):(w(L),F=c,x||w(function C(){F.on.ready.unsubscribe(L),F.on.ready.unsubscribe(C)}))})}}),this.Collection=(p=this,vr(Gm.prototype,function($,C){this.db=p;var x=fc,F=null;if(C)try{x=C()}catch(U){F=U}var P=$._ctx,C=P.table,$=C.hook.reading.fire;this._ctx={table:C,index:P.index,isPrimKey:!P.index||C.schema.primKey.keyPath&&P.index===C.schema.primKey.name,range:x,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:F,or:P.or,valueMapper:$!==wt?$:null}})),this.Table=(v=this,vr(gc.prototype,function(w,L,x){this.db=v,this._tx=x,this.name=w,this.schema=L,this.hook=v._allTables[w]?v._allTables[w].hook:gr(null,{creating:[mt,Oe],reading:[lt,wt],updating:[he,Oe],deleting:[rt,Oe]})})),this.Transaction=(b=this,vr(Ym.prototype,function(w,L,x,F,P){var C=this;this.db=b,this.mode=w,this.storeNames=L,this.schema=x,this.chromeTransactionDurability=F,this.idbtrans=null,this.on=gr(this,"complete","error","abort"),this.parent=P||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new ge(function($,U){C._resolve=$,C._reject=U}),this._completion.then(function(){C.active=!1,C.on.complete.fire()},function($){var U=C.active;return C.active=!1,C.on.error.fire($),C.parent?C.parent._reject($):U&&C.idbtrans&&C.idbtrans.abort(),dt($)})})),this.Version=(k=this,vr(ig.prototype,function(w){this.db=k,this._cfg={version:w,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(A=this,vr(_c.prototype,function(w,L,x){if(this.db=A,this._ctx={table:w,index:L===":id"?null:L,or:x},this._cmp=this._ascending=qe,this._descending=function(F,P){return qe(P,F)},this._max=function(F,P){return 0<qe(F,P)?F:P},this._min=function(F,P){return qe(F,P)<0?F:P},this._IDBKeyRange=A._deps.IDBKeyRange,!this._IDBKeyRange)throw new ye.MissingAPI})),this.on("versionchange",function(w){0<w.newVersion?console.warn("Another connection wants to upgrade database '".concat(c.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(c.name,"'. Closing db now to resume the delete request.")),c.close({disableAutoOpen:!1})}),this.on("blocked",function(w){!w.newVersion||w.newVersion<w.oldVersion?console.warn("Dexie.delete('".concat(c.name,"') was blocked")):console.warn("Upgrade '".concat(c.name,"' blocked by other connection holding version ").concat(w.oldVersion/10))}),this._maxKey=_r(u.IDBKeyRange),this._createTransaction=function(w,L,x,F){return new c.Transaction(w,L,x,c._options.chromeTransactionDurability,F)},this._fireOnBlocked=function(w){c.on("blocked").fire(w),Fi.filter(function(L){return L.name===c.name&&L!==c&&!L._state.vcFired}).map(function(L){return L.on("versionchange").fire(w)})},this.use(og),this.use(dg),this.use(ug),this.use(sg),this.use(ag);var I=new Proxy(this,{get:function(w,L,x){if(L==="_vip")return!0;if(L==="table")return function(P){return Us(c.table(P),I)};var F=Reflect.get(w,L,x);return F instanceof gc?Us(F,I):L==="tables"?F.map(function(P){return Us(P,I)}):L==="_createTransaction"?function(){return Us(F.apply(this,arguments),I)}:F}});this.vip=I,f.forEach(function(w){return w(c)})}var js,zt=typeof Symbol!="undefined"&&"observable"in Symbol?Symbol.observable:"@@observable",fg=(Jo.prototype.subscribe=function(a,u,c){return this._subscribe(a&&typeof a!="function"?a:{next:a,error:u,complete:c})},Jo.prototype[zt]=function(){return this},Jo);function Jo(a){this._subscribe=a}try{js={indexedDB:s.indexedDB||s.mozIndexedDB||s.webkitIndexedDB||s.msIndexedDB,IDBKeyRange:s.IDBKeyRange||s.webkitIDBKeyRange}}catch{js={indexedDB:null,IDBKeyRange:null}}function Lc(a){var u,c=!1,f=new fg(function(p){var v=Fe(a),b,k=!1,A={},T={},I={get closed(){return k},unsubscribe:function(){k||(k=!0,b&&b.abort(),w&&$n.storagemutated.unsubscribe(x))}};p.start&&p.start(I);var w=!1,L=function(){return Eo(F)},x=function(P){$s(A,P),jo(T,A)&&L()},F=function(){var P,C,$;!k&&js.indexedDB&&(A={},P={},b&&b.abort(),b=new AbortController,$=function(U){var V=Ti();try{v&&Ri();var G=In(a,U);return G=v?G.finally(Dn):G}finally{V&&Ci()}}(C={subscr:P,signal:b.signal,requery:L,querier:a,trans:null}),Promise.resolve($).then(function(U){c=!0,u=U,k||C.signal.aborted||(A={},function(V){for(var G in V)if(y(V,G))return;return 1}(T=P)||w||($n(kr,x),w=!0),Eo(function(){return!k&&p.next&&p.next(U)}))},function(U){c=!1,["DatabaseClosedError","AbortError"].includes(U==null?void 0:U.name)||k||Eo(function(){k||p.error&&p.error(U)})}))};return setTimeout(L,0),I});return f.hasValue=function(){return c},f.getValue=function(){return u},f}var ai=bn;function Yo(a){var u=Mn;try{Mn=!0,$n.storagemutated.fire(a),qo(a,!0)}finally{Mn=u}}g(ai,i(i({},Je),{delete:function(a){return new ai(a,{addons:[]}).delete()},exists:function(a){return new ai(a,{addons:[]}).open().then(function(u){return u.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(a){try{return u=ai.dependencies,c=u.indexedDB,u=u.IDBKeyRange,(Mo(c)?Promise.resolve(c.databases()).then(function(f){return f.map(function(p){return p.name}).filter(function(p){return p!==Ns})}):$o(c,u).toCollection().primaryKeys()).then(a)}catch{return dt(new ye.MissingAPI)}var u,c},defineClass:function(){return function(a){d(this,a)}},ignoreTransaction:function(a){return Ee.trans?ni(Ee.transless,a):a()},vip:Bo,async:function(a){return function(){try{var u=zo(a.apply(this,arguments));return u&&typeof u.then=="function"?u:ge.resolve(u)}catch(c){return dt(c)}}},spawn:function(a,u,c){try{var f=zo(a.apply(c,u||[]));return f&&typeof f.then=="function"?f:ge.resolve(f)}catch(p){return dt(p)}},currentTransaction:{get:function(){return Ee.trans||null}},waitFor:function(a,u){return u=ge.resolve(typeof a=="function"?ai.ignoreTransaction(a):a).timeout(u||6e4),Ee.trans?Ee.trans.waitFor(u):u},Promise:ge,debug:{get:function(){return Te},set:function(a){tt(a)}},derive:S,extend:d,props:g,override:J,Events:gr,on:$n,liveQuery:Lc,extendObservabilitySet:$s,getByKeyPath:ne,setByKeyPath:oe,delByKeyPath:function(a,u){typeof u=="string"?oe(a,u,void 0):"length"in u&&[].map.call(u,function(c){oe(a,c,void 0)})},shallowClone:Se,deepClone:Ve,getObjectDiff:Ko,cmp:qe,asap:X,minKey:-1/0,addons:[],connections:Fi,errnames:_e,dependencies:js,cache:si,semVer:"4.0.11",version:"4.0.11".split(".").map(function(a){return parseInt(a)}).reduce(function(a,u,c){return a+u/Math.pow(10,2*c)})})),ai.maxKey=_r(ai.dependencies.IDBKeyRange),typeof dispatchEvent!="undefined"&&typeof addEventListener!="undefined"&&($n(kr,function(a){Mn||(a=new CustomEvent(Co,{detail:a}),Mn=!0,dispatchEvent(a),Mn=!1)}),addEventListener(Co,function(a){a=a.detail,Mn||Yo(a)}));var Pi,Mn=!1,$c=function(){};return typeof BroadcastChannel!="undefined"&&(($c=function(){(Pi=new BroadcastChannel(Co)).onmessage=function(a){return a.data&&Yo(a.data)}})(),typeof Pi.unref=="function"&&Pi.unref(),$n(kr,function(a){Mn||Pi.postMessage(a)})),typeof addEventListener!="undefined"&&(addEventListener("pagehide",function(a){if(!bn.disableBfCache&&a.persisted){Te&&console.debug("Dexie: handling persisted pagehide"),Pi!=null&&Pi.close();for(var u=0,c=Fi;u<c.length;u++)c[u].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(a){!bn.disableBfCache&&a.persisted&&(Te&&console.debug("Dexie: handling persisted pageshow"),$c(),Yo({all:new Nt(-1/0,[[]])}))})),ge.rejectionMapper=function(a,u){return!a||a instanceof Xe||a instanceof TypeError||a instanceof SyntaxError||!a.name||!et[a.name]?a:(u=new et[a.name](u||a.message,a),"stack"in a&&_(u,"stack",{get:function(){return this.inner.stack}}),u)},tt(Te),i(bn,Object.freeze({__proto__:null,Dexie:bn,liveQuery:Lc,Entity:hc,cmp:qe,PropModification:yr,replacePrefix:function(a,u){return new yr({replacePrefix:[a,u]})},add:function(a){return new yr({add:a})},remove:function(a){return new yr({remove:a})},default:bn,RangeSet:Nt,mergeRanges:Er,rangesOverlap:Ac}),{default:bn}),bn})}(ia)),ia.exports}var nb=tb();const ul=Ya(nb),vd=Symbol.for("Dexie"),_a=globalThis[vd]||(globalThis[vd]=ul);if(ul.semVer!==_a.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${ul.semVer} and ${_a.semVer}`);const{liveQuery:gN,mergeRanges:vN,rangesOverlap:yN,RangeSet:bN,cmp:kN,Entity:_N,PropModification:wN,replacePrefix:SN,add:EN,remove:NN}=_a;class Uh extends _a{constructor(n,i,r={}){super(n);me(this,"logs");const s={logs:"id, level, time, source, account"};this.version(i).stores({...s,...r})}}class ib extends Uh{constructor(){super("nizza",1)}}class jh{constructor(e,n){me(this,"logger");me(this,"channel");me(this,"listeners",new Map);me(this,"eventQueue",new Map);this.logger=n.child("EventBus");try{this.logger.debug(`Creating BroadcastChannel with name "${e}"`),this.channel=new BroadcastChannel(e),this.channel.onmessage=i=>this.handleMessage(i),this.channel.onmessageerror=i=>this.logger.error("NizzaBroadcastChannel error:",i)}catch(i){throw this.logger.error("Failed to create NizzaBroadcastChannel:",i),i}}on(e,n){return this.logger.debug(`Subscribing to pattern "${e}"`),this.subscribeToEvent(e,n),{off:()=>this.unsubscribeFromEvent(e,n)}}emit(e,n,i={}){this.logger.debug(`Emitting event "${e}" with data`,n),this.emitEvent(e,n,i)}handleMessage(e){const n=e.data,{name:i}=n;this.logger.debug(`Received message "${i}" with data`,n);for(const[r,s]of this.listeners.entries())this.matchWildcard(r,i)&&(this.logger.debug(`Matching pattern "${r}" for event "${i}"`),s.forEach(o=>o({...n,wildcard:r})))}subscribeToEvent(e,n){if(typeof e!="string"||typeof n!="function"){const r=new Error("Invalid arguments");throw this.logger.error(r),r}this.listeners.has(e)||(this.logger.debug(`Adding new pattern "${e}"`),this.listeners.set(e,new Set));const i=Array.from(this.eventQueue).filter(([r])=>{const s=this.matchWildcard(e,r);return s&&(this.eventQueue.delete(r),this.logger.debug(`Dequeued pending events for "${r}".`)),s}).flatMap(([,r])=>r);for(const[r,s]of this.listeners.entries())this.matchWildcard(r,e)&&(this.logger.debug(`Adding listener to pattern "${r}"`),s.add(n),i.length&&(this.logger.debug(`Delivering pending events for "${e}".`),i.forEach(o=>{n({...o,wildcard:r})})))}emitEvent(e,n,i){if(typeof e!="string"){const o=new Error("Invalid arguments");throw this.logger.error(o),o}const r={name:e,data:n,attrs:i},s=Array.from(this.getMatchingListeners(e));if(s.length){this.logger.debug(`Delivering event "${e}" to listeners`);for(const[o,l]of s)l({...r,wildcard:o})}else this.logger.debug(`No listeners for event "${e}", enqueuing`),this.eventQueue.has(e)||this.eventQueue.set(e,[]),this.eventQueue.get(e).push(r);this.logger.debug("Posting message to channel",r),this.channel.postMessage(r)}*getMatchingListeners(e){this.logger.debug(`Getting matching listeners for event "${e}"`);for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,e))for(const r of i)yield[n,r]}unsubscribeFromEvent(e,n){if(this.listeners.has(e)){this.logger.debug(`Unsubscribing from event "${e}"`);const i=this.listeners.get(e);i.delete(n),i.size===0&&(this.logger.debug(`No more listeners for event "${e}", deleting`),this.listeners.delete(e))}}matchWildcard(e,n){const i=e.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*"),s=new RegExp(`^${i}$`).test(n);return this.logger.debug(`Wildcard "${e}" matches with pattern "${n}": ${s}`),s}}var Ir={exports:{}},yu,yd;function rb(){if(yd)return yu;yd=1;function t(n){try{return JSON.stringify(n)}catch{return'"[Circular]"'}}yu=e;function e(n,i,r){var s=r&&r.stringify||t,o=1;if(typeof n=="object"&&n!==null){var l=i.length+o;if(l===1)return n;var d=new Array(l);d[0]=s(n);for(var h=1;h<l;h++)d[h]=s(i[h]);return d.join(" ")}if(typeof n!="string")return n;var m=i.length;if(m===0)return n;for(var y="",g=1-o,O=-1,_=n&&n.length||0,S=0;S<_;){if(n.charCodeAt(S)===37&&S+1<_){switch(O=O>-1?O:0,n.charCodeAt(S+1)){case 100:case 102:if(g>=m||i[g]==null)break;O<S&&(y+=n.slice(O,S)),y+=Number(i[g]),O=S+2,S++;break;case 105:if(g>=m||i[g]==null)break;O<S&&(y+=n.slice(O,S)),y+=Math.floor(Number(i[g])),O=S+2,S++;break;case 79:case 111:case 106:if(g>=m||i[g]===void 0)break;O<S&&(y+=n.slice(O,S));var E=typeof i[g];if(E==="string"){y+="'"+i[g]+"'",O=S+2,S++;break}if(E==="function"){y+=i[g].name||"<anonymous>",O=S+2,S++;break}y+=s(i[g]),O=S+2,S++;break;case 115:if(g>=m)break;O<S&&(y+=n.slice(O,S)),y+=String(i[g]),O=S+2,S++;break;case 37:O<S&&(y+=n.slice(O,S)),y+="%",O=S+2,S++,g--;break}++g}++S}return O===-1?n:(O<_&&(y+=n.slice(O)),y)}return yu}var bd;function sb(){if(bd)return Ir.exports;bd=1;const t=rb();Ir.exports=m;const e=M().console||{},n={mapHttpRequest:oe,mapHttpResponse:oe,wrapRequestSerializer:Se,wrapResponseSerializer:Se,wrapErrorSerializer:Se,req:oe,res:oe,err:X,errWithCause:X};function i(N,K){return N==="silent"?1/0:K.levels.values[N]}const r=Symbol("pino.logFuncs"),s=Symbol("pino.hierarchy"),o={error:"log",fatal:"error",warn:"error",info:"log",debug:"log",trace:"log"};function l(N,K){const ie={logger:K,parent:N[s]};K[s]=ie}function d(N,K,ie){const ce={};K.forEach(ae=>{ce[ae]=ie[ae]?ie[ae]:e[ae]||e[o[ae]||"log"]||ve}),N[r]=ce}function h(N,K){return Array.isArray(N)?N.filter(function(ce){return ce!=="!stdSerializers.err"}):N===!0?Object.keys(K):!1}function m(N){N=N||{},N.browser=N.browser||{};const K=N.browser.transmit;if(K&&typeof K.send!="function")throw Error("pino: transmit option must have a send function");const ie=N.browser.write||e;N.browser.write&&(N.browser.asObject=!0);const ce=N.serializers||{},ae=h(N.browser.serialize,ce);let B=N.browser.serialize;Array.isArray(N.browser.serialize)&&N.browser.serialize.indexOf("!stdSerializers.err")>-1&&(B=!1);const Fe=Object.keys(N.customLevels||{}),$e=["error","fatal","warn","info","debug","trace"].concat(Fe);typeof ie=="function"&&$e.forEach(function(et){ie[et]=ie}),(N.enabled===!1||N.browser.disabled)&&(N.level="silent");const Xe=N.level||"info",D=Object.create(ie);D.log||(D.log=ve),d(D,$e,ie),l({},D),Object.defineProperty(D,"levelVal",{get:pt}),Object.defineProperty(D,"level",{get:_e,set:Me});const H={transmit:K,serialize:ae,asObject:N.browser.asObject,formatters:N.browser.formatters,levels:$e,timestamp:ne(N),messageKey:N.messageKey||"msg",onChild:N.onChild||ve};D.levels=y(N),D.level=Xe,D.setMaxListeners=D.getMaxListeners=D.emit=D.addListener=D.on=D.prependListener=D.once=D.prependOnceListener=D.removeListener=D.removeAllListeners=D.listeners=D.listenerCount=D.eventNames=D.write=D.flush=ve,D.serializers=ce,D._serialize=ae,D._stdErrSerialize=B,D.child=function(...et){return ye.call(this,H,...et)},K&&(D._logEvent=z());function pt(){return i(this.level,this)}function _e(){return this._level}function Me(et){if(et!=="silent"&&!this.levels.values[et])throw Error("unknown level "+et);this._level=et,_(this,H,D,"error"),_(this,H,D,"fatal"),_(this,H,D,"warn"),_(this,H,D,"info"),_(this,H,D,"debug"),_(this,H,D,"trace"),Fe.forEach(Je=>{_(this,H,D,Je)})}function ye(et,Je,Oe){if(!Je)throw new Error("missing bindings for child Pino");Oe=Oe||{},ae&&Je.serializers&&(Oe.serializers=Je.serializers);const wt=Oe.serializers;if(ae&&wt){var lt=Object.assign({},ce,wt),Ae=N.browser.serialize===!0?Object.keys(lt):ae;delete Je.serializers,j([Je],Ae,lt,this._stdErrSerialize)}function mt(he){this._childLevel=(he._childLevel|0)+1,this.bindings=Je,lt&&(this.serializers=lt,this._serialize=Ae),K&&(this._logEvent=z([].concat(he._logEvent.bindings,Je)))}mt.prototype=this;const rt=new mt(this);return l(this,rt),rt.child=function(...he){return ye.call(this,et,...he)},rt.level=Oe.level||this.level,et.onChild(rt),rt}return D}function y(N){const K=N.customLevels||{},ie=Object.assign({},m.levels.values,K),ce=Object.assign({},m.levels.labels,g(K));return{values:ie,labels:ce}}function g(N){const K={};return Object.keys(N).forEach(function(ie){K[N[ie]]=ie}),K}m.levels={values:{fatal:60,error:50,warn:40,info:30,debug:20,trace:10},labels:{10:"trace",20:"debug",30:"info",40:"warn",50:"error",60:"fatal"}},m.stdSerializers=n,m.stdTimeFunctions=Object.assign({},{nullTime:ze,epochTime:Ne,unixTime:Re,isoTime:Ve});function O(N){const K=[];N.bindings&&K.push(N.bindings);let ie=N[s];for(;ie.parent;)ie=ie.parent,ie.logger.bindings&&K.push(ie.logger.bindings);return K.reverse()}function _(N,K,ie,ce){if(Object.defineProperty(N,ce,{value:i(N.level,ie)>i(ce,ie)?ve:ie[r][ce],writable:!0,enumerable:!0,configurable:!0}),N[ce]===ve){if(!K.transmit)return;const B=K.transmit.level||N.level,Fe=i(B,ie);if(i(ce,ie)<Fe)return}N[ce]=E(N,K,ie,ce);const ae=O(N);ae.length!==0&&(N[ce]=S(ae,N[ce]))}function S(N,K){return function(){return K.apply(this,[...N,...arguments])}}function E(N,K,ie,ce){return function(ae){return function(){const Fe=K.timestamp(),$e=new Array(arguments.length),Xe=Object.getPrototypeOf&&Object.getPrototypeOf(this)===e?e:this;for(var D=0;D<$e.length;D++)$e[D]=arguments[D];var H=!1;if(K.serialize&&(j($e,this._serialize,this.serializers,this._stdErrSerialize),H=!0),K.asObject||K.formatters?ae.call(Xe,R(this,ce,$e,Fe,K)):ae.apply(Xe,$e),K.transmit){const pt=K.transmit.level||N._level,_e=i(pt,ie),Me=i(ce,ie);if(Me<_e)return;J(this,{ts:Fe,methodLevel:ce,methodValue:Me,transmitValue:ie.levels.values[K.transmit.level||N._level],send:K.transmit.send,val:i(N._level,ie)},$e,H)}}}(N[r][ce])}function R(N,K,ie,ce,ae){const{level:B,log:Fe=_e=>_e}=ae.formatters||{},$e=ie.slice();let Xe=$e[0];const D={};if(ce&&(D.time=ce),B){const _e=B(K,N.levels.values[K]);Object.assign(D,_e)}else D.level=N.levels.values[K];let H=(N._childLevel|0)+1;if(H<1&&(H=1),Xe!==null&&typeof Xe=="object"){for(;H--&&typeof $e[0]=="object";)Object.assign(D,$e.shift());Xe=$e.length?t($e.shift(),$e):void 0}else typeof Xe=="string"&&(Xe=t($e.shift(),$e));return Xe!==void 0&&(D[ae.messageKey]=Xe),Fe(D)}function j(N,K,ie,ce){for(const ae in N)if(ce&&N[ae]instanceof Error)N[ae]=m.stdSerializers.err(N[ae]);else if(typeof N[ae]=="object"&&!Array.isArray(N[ae])&&K)for(const B in N[ae])K.indexOf(B)>-1&&B in ie&&(N[ae][B]=ie[B](N[ae][B]))}function J(N,K,ie,ce=!1){const ae=K.send,B=K.ts,Fe=K.methodLevel,$e=K.methodValue,Xe=K.val,D=N._logEvent.bindings;ce||j(ie,N._serialize||Object.keys(N.serializers),N.serializers,N._stdErrSerialize===void 0?!0:N._stdErrSerialize),N._logEvent.ts=B,N._logEvent.messages=ie.filter(function(H){return D.indexOf(H)===-1}),N._logEvent.level.label=Fe,N._logEvent.level.value=$e,ae(Fe,N._logEvent,Xe),N._logEvent=z(D)}function z(N){return{ts:0,messages:[],bindings:N||[],level:{label:"",value:0}}}function X(N){const K={type:N.constructor.name,msg:N.message,stack:N.stack};for(const ie in N)K[ie]===void 0&&(K[ie]=N[ie]);return K}function ne(N){return typeof N.timestamp=="function"?N.timestamp:N.timestamp===!1?ze:Ne}function oe(){return{}}function Se(N){return N}function ve(){}function ze(){return!1}function Ne(){return Date.now()}function Re(){return Math.round(Date.now()/1e3)}function Ve(){return new Date(Date.now()).toISOString()}function M(){function N(K){return typeof K!="undefined"&&K}try{return typeof globalThis!="undefined"||Object.defineProperty(Object.prototype,"globalThis",{get:function(){return delete Object.prototype.globalThis,this.globalThis=this},configurable:!0}),globalThis}catch{return N(self)||N(window)||N(this)||{}}}return Ir.exports.default=m,Ir.exports.pino=m,Ir.exports}var ab=sb();const ob=Ya(ab),St=[];for(let t=0;t<256;++t)St.push((t+256).toString(16).slice(1));function ub(t,e=0){return(St[t[e+0]]+St[t[e+1]]+St[t[e+2]]+St[t[e+3]]+"-"+St[t[e+4]]+St[t[e+5]]+"-"+St[t[e+6]]+St[t[e+7]]+"-"+St[t[e+8]]+St[t[e+9]]+"-"+St[t[e+10]]+St[t[e+11]]+St[t[e+12]]+St[t[e+13]]+St[t[e+14]]+St[t[e+15]]).toLowerCase()}let bu;const lb=new Uint8Array(16);function cb(){if(!bu){if(typeof crypto=="undefined"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");bu=crypto.getRandomValues.bind(crypto)}return bu(lb)}const db=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),kd={randomUUID:db};function fb(t,e,n){var r,s,o;if(kd.randomUUID&&!t)return kd.randomUUID();t=t||{};const i=(o=(s=t.random)!=null?s:(r=t.rng)==null?void 0:r.call(t))!=null?o:cb();if(i.length<16)throw new Error("Random bytes length must be >= 16");return i[6]=i[6]&15|64,i[8]=i[8]&63|128,ub(i)}const hb=4;var Vh=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(Vh||{});const pb={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:**"},Hh={EVENT_STATUS_CHANGED:"event:statusChanged",ATCH_ACTION_EXECUTED:"core:addToCartHooks:actionExecuted"};var qh=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(qh||{}),ot=(t=>(t.TRACE="trace",t.DEBUG="debug",t.INFO="info",t.WARN="warn",t.ERROR="error",t.FATAL="fatal",t))(ot||{});const Ze={trace:10,debug:20,info:30,warn:40,error:50,fatal:60},zh={[Ze.trace]:"trace",[Ze.debug]:"debug",[Ze.info]:"info",[Ze.warn]:"warn",[Ze.error]:"error",[Ze.fatal]:"fatal"};var Kh=(t=>(t.COMBO="Combo",t.BADGE="Badged",t))(Kh||{}),Gh=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t.UNKNOWN="unknown",t))(Gh||{});function Wh(t){return Object.values(ot).includes(String(t).toLowerCase())}class Ul extends Error{constructor(e){super(`Invalid log level: ${e}`),this.name="InvalidLogLevelError"}}const Tt=class Tt{constructor(e){me(this,"instance");me(this,"httpLogger");me(this,"consoleLogger");me(this,"config");var l;this.config=e;const{source:n,levelService:i,metadata:r={},consoleLogger:s,httpLogger:o}=e;(l=Tt.root)!=null||(Tt.root=Tt.createRootLogger(s,o)),Tt.mergeGlobalMetadata(r),this.instance=Tt.root.child({source:n}),this.consoleLogger=s,this.httpLogger=o,this.setLevel(i.getLevel(n))}static createRootLogger(e,n){return ob({customLevels:Ze,browser:{write:i=>{const{payload:r,options:s,stack:o,...l}=i,d={...l,...r};s.silent||e.print(d,o),d.level>=Ze[ot.WARN]&&n.save(d)}}})}static mergeGlobalMetadata(e={}){Tt.globalMetadata={...Tt.globalMetadata,...e}}child(e,n={}){return Tt.mergeGlobalMetadata(n),new Tt({source:`${this.config.source}:${e}`,levelService:this.config.levelService,consoleLogger:this.consoleLogger,httpLogger:this.httpLogger})}setLevel(e){this.instance.level=e}setMetadata(e){Tt.mergeGlobalMetadata(e)}formatLogEntry(e){const{content:n,stack:i,options:r={}}=e,{message:s,args:o=[]}=n,l=fb(),d={};let h;return s instanceof Error?(d.error={name:s.name,message:s.message,stack:s.stack},h=s.message):h=typeof s=="object"?JSON.stringify(s):String(s),o.forEach((y,g)=>this.formatArg(y,g,d)),{payload:{id:l,msg:h,data:d,...Tt.globalMetadata},options:r,stack:i}}formatArg(e,n,i){if(e instanceof Error){const r=i.error?`error${n+1}`:"error";i[r]={message:e.message,stack:e.stack,name:e.name}}else typeof e=="object"&&e!==null?Object.assign(i,e):i[`$${n}`]=String(e)}log(e,n){if(typeof this.instance[e]!="function")throw new Ul(e);const i=this.formatLogEntry(n);this.instance[e](i)}trace(e){this.log("trace",e)}debug(e){this.log("debug",e)}info(e){this.log("info",e)}warn(e){this.log("warn",e)}error(e){this.log("error",e)}fatal(e){this.log("fatal",e)}get source(){return this.config.source}};me(Tt,"globalMetadata",{}),me(Tt,"root",null);let ll=Tt;const _d={stackExclusionPatterns:/\b(PinoAdapter|ConsoleLogger|LoggerChain|Logger|Proxy|Child|pino\.js)\b/,themes:{dark:{baseStyles:{timestamp:"color: #A9A9A9; font-weight: normal;",source:"color: #B0B0B0; font-weight: normal;",context:"color: #FFFFFF; font-weight: bold;",defaultMessage:"color: #E5E5E5; font-weight: normal;"},levels:{[Ze[ot.TRACE]]:"color: #778899; font-weight: bold;",[Ze[ot.DEBUG]]:"color: #008B8B; font-weight: bold;",[Ze[ot.INFO]]:"color: #00FFFF; font-weight: bold;",[Ze[ot.WARN]]:"color: #FFD700; font-weight: bold;",[Ze[ot.ERROR]]:"color: #FF4500; font-weight: bold;",[Ze[ot.FATAL]]:"color: #FF0000; font-weight: bold; text-shadow: 1px 1px 1px black;"},messages:{[Ze[ot.WARN]]:"color: #FFD700; font-weight: normal;",[Ze[ot.ERROR]]:"color: #FF4500; font-weight: normal;",[Ze[ot.FATAL]]:"color: #FF0000; font-weight: bold;"}},light:{baseStyles:{timestamp:"color: #4D4D4D; font-weight: normal;",source:"color: #666666; font-weight: normal;",context:"color: #000000; font-weight: bold;",defaultMessage:"color: #333333; font-weight: normal;"},levels:{[Ze[ot.TRACE]]:"color: #6A5ACD; font-weight: bold;",[Ze[ot.DEBUG]]:"color: #00509E; font-weight: bold;",[Ze[ot.INFO]]:"color: #1E90FF; font-weight: bold;",[Ze[ot.WARN]]:"color: #FFA500; font-weight: bold;",[Ze[ot.ERROR]]:"color: #ff0033; font-weight: bold;",[Ze[ot.FATAL]]:"color: #D80000; font-weight: bold; text-shadow: 1px 1px 1px #660000;"},messages:{[Ze[ot.WARN]]:"color: #FFA500; font-weight: normal;",[Ze[ot.ERROR]]:"color: #ff0033; font-weight: normal;",[Ze[ot.FATAL]]:"color: #D80000; font-weight: bold;"}}}};class mb{constructor(){me(this,"theme");this.theme=this.initializeTheme(),this.setupThemeChangeListener()}initializeTheme(){const e=localStorage.getItem("log-theme");return e==="light"||e==="dark"?e:this.detectTheme()}detectTheme(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}setupThemeChangeListener(){window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",e=>{this.theme=e.matches?"dark":"light"})}static setTheme(e){localStorage.setItem("consoleLoggerTheme",e)}formatStack(e){return e.split(`
|
|
29
|
+
`).filter(n=>!_d.stackExclusionPatterns.test(n)).map(n=>n.replace(/^Error\s*/,"").trim())}getStyles(e){const n=_d.themes[this.theme];return{...n.baseStyles,level:n.levels[e]||n.baseStyles.defaultMessage,message:n.messages[e]||n.baseStyles.defaultMessage}}getTime(){return new Date().toLocaleTimeString("en-US",{hour12:!1})+`.${new Date().getMilliseconds().toString().padStart(3,"0")}`}print({level:e,source:n,msg:i,data:r},s){const[o,l,d]=n.split(":"),h=(zh[e]||"UNKNOWN").toUpperCase(),m=d?`${d}: `:"",y=l?`:${l}`:"",g=this.getStyles(e);console.groupCollapsed(`%c${this.getTime()} %c${h} %c[${o}${y}] %c${m}%c${i}`,g.timestamp,g.level,g.source,g.context,g.message),r&&Object.keys(r).length&&console.log("Data:",r);const O=this.formatStack(s||new Error().stack);O.length&&console.log("Stack:",O.join(`
|
|
30
|
+
`)),console.groupEnd()}}const gb={endpoint:`${rr.apiUrls.restV2}/v1/telemetry/logs`,batchSize:500,flushInterval:10,maxRetries:5,retryBackoffFactor:2,maxPayloadSize:500};class jl{constructor(e){me(this,"config");me(this,"isFlushing",!1);me(this,"retryCount",0);me(this,"isFlushScheduled",!1);this.config=e,this.setupUnloadListener()}static create(e){const n={...gb,...e};if(!n.db)throw new Error("Invalid Dixie DB");if(!n.project)throw new Error("Project name is required");return new jl(n)}async save(e){const n=JSON.parse(JSON.stringify(e));await this.config.db.logs.add(n),this.scheduleFlush()}scheduleFlush(e=this.config.flushInterval*1e3){this.isFlushScheduled||this.isFlushing||(this.isFlushScheduled=!0,setTimeout(()=>{this.isFlushScheduled=!1,this.flush()},e))}async flush(){if(this.isFlushing)return;this.isFlushing=!0;let e=!1;try{await this.processLogsBatch(async i=>{await this.sendLogs(i),await this.deleteLogs(i)}),this.retryCount=0,e=!0}catch(i){this.logError("flush",i)}this.isFlushing=!1;const n=await this.hasPendingLogs();!e&&n?this.handleRetry():e&&n&&this.scheduleFlush()}async processLogsBatch(e){const n=await this.getLogsBatch(),i=this.splitLogsByPayloadSize(n);for(const r of i)await e(r)}async getLogsBatch(e=this.config.batchSize){return this.config.db.logs.orderBy("time").limit(e).toArray()}splitLogsByPayloadSize(e){let n=[],i=0;const r=[];return e.forEach(s=>{const o=JSON.stringify(s).length/1024;i+o>this.config.maxPayloadSize&&(r.push(n),n=[],i=0),n.push(s),i+=o}),n.length>0&&r.push(n),r}async sendLogs(e){const n=this.buildPayload(e);await vi({url:this.config.endpoint,method:"POST",body:n})}buildPayload(e){return JSON.stringify({project:this.config.project,logs:e})}async deleteLogs(e){const n=e.map(i=>i.id);await this.config.db.logs.bulkDelete(n)}logError(e,n){console.error(`[${e}]`,n)}handleRetry(){if(this.retryCount>=this.config.maxRetries)return;this.retryCount++;const e=this.config.flushInterval*Math.pow(this.config.retryBackoffFactor,this.retryCount)*1e3;this.scheduleFlush(e)}async hasPendingLogs(){return await this.config.db.logs.count()>0}setupUnloadListener(){window.addEventListener("beforeunload",async()=>{this.isFlushing||!await this.hasPendingLogs()||await this.processLogsBatch(async e=>{const n=this.buildPayload(e);navigator.sendBeacon(this.config.endpoint,n)?await this.deleteLogs(e):console.warn("Failed to send logs via sendBeacon; logs will remain in the database.")})})}}var ku={},_u,wd;function Xa(){if(wd)return _u;wd=1;const t="\\\\/",e=`[^${t}]`,n="\\.",i="\\+",r="\\?",s="\\/",o="(?=.)",l="[^/]",d=`(?:${s}|$)`,h=`(?:^|${s})`,m=`${n}{1,2}${d}`,y=`(?!${n})`,g=`(?!${h}${m})`,O=`(?!${n}{0,1}${d})`,_=`(?!${m})`,S=`[^.${s}]`,E=`${l}*?`,j={DOT_LITERAL:n,PLUS_LITERAL:i,QMARK_LITERAL:r,SLASH_LITERAL:s,ONE_CHAR:o,QMARK:l,END_ANCHOR:d,DOTS_SLASH:m,NO_DOT:y,NO_DOTS:g,NO_DOT_SLASH:O,NO_DOTS_SLASH:_,QMARK_NO_DOT:S,STAR:E,START_ANCHOR:h,SEP:"/"},J={...j,SLASH_LITERAL:`[${t}]`,QMARK:e,STAR:`${e}*?`,DOTS_SLASH:`${n}{1,2}(?:[${t}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${t}])${n}{1,2}(?:[${t}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${t}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${t}]|$))`,QMARK_NO_DOT:`[^.${t}]`,START_ANCHOR:`(?:^|[${t}])`,END_ANCHOR:`(?:[${t}]|$)`,SEP:"\\"},z={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};return _u={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:z,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,extglobChars(X){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${X.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(X){return X===!0?J:j}},_u}var Sd;function Qa(){return Sd||(Sd=1,function(t){const{REGEX_BACKSLASH:e,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_GLOBAL:r}=Xa();t.isObject=s=>s!==null&&typeof s=="object"&&!Array.isArray(s),t.hasRegexChars=s=>i.test(s),t.isRegexChar=s=>s.length===1&&t.hasRegexChars(s),t.escapeRegex=s=>s.replace(r,"\\$1"),t.toPosixSlashes=s=>s.replace(e,"/"),t.isWindows=()=>{if(typeof navigator!="undefined"&&navigator.platform){const s=navigator.platform.toLowerCase();return s==="win32"||s==="windows"}return typeof process!="undefined"&&process.platform?process.platform==="win32":!1},t.removeBackslashes=s=>s.replace(n,o=>o==="\\"?"":o),t.escapeLast=(s,o,l)=>{const d=s.lastIndexOf(o,l);return d===-1?s:s[d-1]==="\\"?t.escapeLast(s,o,d-1):`${s.slice(0,d)}\\${s.slice(d)}`},t.removePrefix=(s,o={})=>{let l=s;return l.startsWith("./")&&(l=l.slice(2),o.prefix="./"),l},t.wrapOutput=(s,o={},l={})=>{const d=l.contains?"":"^",h=l.contains?"":"$";let m=`${d}(?:${s})${h}`;return o.negated===!0&&(m=`(?:^(?!${m}).*$)`),m},t.basename=(s,{windows:o}={})=>{const l=s.split(o?/[\\/]/:"/"),d=l[l.length-1];return d===""?l[l.length-2]:d}}(ku)),ku}var wu,Ed;function vb(){if(Ed)return wu;Ed=1;const t=Qa(),{CHAR_ASTERISK:e,CHAR_AT:n,CHAR_BACKWARD_SLASH:i,CHAR_COMMA:r,CHAR_DOT:s,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:l,CHAR_LEFT_CURLY_BRACE:d,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:m,CHAR_PLUS:y,CHAR_QUESTION_MARK:g,CHAR_RIGHT_CURLY_BRACE:O,CHAR_RIGHT_PARENTHESES:_,CHAR_RIGHT_SQUARE_BRACKET:S}=Xa(),E=J=>J===l||J===i,R=J=>{J.isPrefix!==!0&&(J.depth=J.isGlobstar?1/0:1)};return wu=(J,z)=>{const X=z||{},ne=J.length-1,oe=X.parts===!0||X.scanToEnd===!0,Se=[],ve=[],ze=[];let Ne=J,Re=-1,Ve=0,M=0,N=!1,K=!1,ie=!1,ce=!1,ae=!1,B=!1,Fe=!1,$e=!1,Xe=!1,D=!1,H=0,pt,_e,Me={value:"",depth:0,isGlob:!1};const ye=()=>Re>=ne,et=()=>Ne.charCodeAt(Re+1),Je=()=>(pt=_e,Ne.charCodeAt(++Re));for(;Re<ne;){_e=Je();let mt;if(_e===i){Fe=Me.backslashes=!0,_e=Je(),_e===d&&(B=!0);continue}if(B===!0||_e===d){for(H++;ye()!==!0&&(_e=Je());){if(_e===i){Fe=Me.backslashes=!0,Je();continue}if(_e===d){H++;continue}if(B!==!0&&_e===s&&(_e=Je())===s){if(N=Me.isBrace=!0,ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(B!==!0&&_e===r){if(N=Me.isBrace=!0,ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(_e===O&&(H--,H===0)){B=!1,N=Me.isBrace=!0,D=!0;break}}if(oe===!0)continue;break}if(_e===l){if(Se.push(Re),ve.push(Me),Me={value:"",depth:0,isGlob:!1},D===!0)continue;if(pt===s&&Re===Ve+1){Ve+=2;continue}M=Re+1;continue}if(X.noext!==!0&&(_e===y||_e===n||_e===e||_e===g||_e===o)===!0&&et()===h){if(ie=Me.isGlob=!0,ce=Me.isExtglob=!0,D=!0,_e===o&&Re===Ve&&(Xe=!0),oe===!0){for(;ye()!==!0&&(_e=Je());){if(_e===i){Fe=Me.backslashes=!0,_e=Je();continue}if(_e===_){ie=Me.isGlob=!0,D=!0;break}}continue}break}if(_e===e){if(pt===e&&(ae=Me.isGlobstar=!0),ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(_e===g){if(ie=Me.isGlob=!0,D=!0,oe===!0)continue;break}if(_e===m){for(;ye()!==!0&&(mt=Je());){if(mt===i){Fe=Me.backslashes=!0,Je();continue}if(mt===S){K=Me.isBracket=!0,ie=Me.isGlob=!0,D=!0;break}}if(oe===!0)continue;break}if(X.nonegate!==!0&&_e===o&&Re===Ve){$e=Me.negated=!0,Ve++;continue}if(X.noparen!==!0&&_e===h){if(ie=Me.isGlob=!0,oe===!0){for(;ye()!==!0&&(_e=Je());){if(_e===h){Fe=Me.backslashes=!0,_e=Je();continue}if(_e===_){D=!0;break}}continue}break}if(ie===!0){if(D=!0,oe===!0)continue;break}}X.noext===!0&&(ce=!1,ie=!1);let Oe=Ne,wt="",lt="";Ve>0&&(wt=Ne.slice(0,Ve),Ne=Ne.slice(Ve),M-=Ve),Oe&&ie===!0&&M>0?(Oe=Ne.slice(0,M),lt=Ne.slice(M)):ie===!0?(Oe="",lt=Ne):Oe=Ne,Oe&&Oe!==""&&Oe!=="/"&&Oe!==Ne&&E(Oe.charCodeAt(Oe.length-1))&&(Oe=Oe.slice(0,-1)),X.unescape===!0&&(lt&&(lt=t.removeBackslashes(lt)),Oe&&Fe===!0&&(Oe=t.removeBackslashes(Oe)));const Ae={prefix:wt,input:J,start:Ve,base:Oe,glob:lt,isBrace:N,isBracket:K,isGlob:ie,isExtglob:ce,isGlobstar:ae,negated:$e,negatedExtglob:Xe};if(X.tokens===!0&&(Ae.maxDepth=0,E(_e)||ve.push(Me),Ae.tokens=ve),X.parts===!0||X.tokens===!0){let mt;for(let rt=0;rt<Se.length;rt++){const he=mt?mt+1:Ve,Ye=Se[rt],ue=J.slice(he,Ye);X.tokens&&(rt===0&&Ve!==0?(ve[rt].isPrefix=!0,ve[rt].value=wt):ve[rt].value=ue,R(ve[rt]),Ae.maxDepth+=ve[rt].depth),(rt!==0||ue!=="")&&ze.push(ue),mt=Ye}if(mt&&mt+1<J.length){const rt=J.slice(mt+1);ze.push(rt),X.tokens&&(ve[ve.length-1].value=rt,R(ve[ve.length-1]),Ae.maxDepth+=ve[ve.length-1].depth)}Ae.slashes=Se,Ae.parts=ze}return Ae},wu}var Su,Nd;function yb(){if(Nd)return Su;Nd=1;const t=Xa(),e=Qa(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:i,REGEX_NON_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_BACKREF:s,REPLACEMENTS:o}=t,l=(m,y)=>{if(typeof y.expandRange=="function")return y.expandRange(...m,y);m.sort();const g=`[${m.join("-")}]`;try{new RegExp(g)}catch{return m.map(_=>e.escapeRegex(_)).join("..")}return g},d=(m,y)=>`Missing ${m}: "${y}" - use "\\\\${y}" to match literal characters`,h=(m,y)=>{if(typeof m!="string")throw new TypeError("Expected a string");m=o[m]||m;const g={...y},O=typeof g.maxLength=="number"?Math.min(n,g.maxLength):n;let _=m.length;if(_>O)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${O}`);const S={type:"bos",value:"",output:g.prepend||""},E=[S],R=g.capture?"":"?:",j=t.globChars(g.windows),J=t.extglobChars(j),{DOT_LITERAL:z,PLUS_LITERAL:X,SLASH_LITERAL:ne,ONE_CHAR:oe,DOTS_SLASH:Se,NO_DOT:ve,NO_DOT_SLASH:ze,NO_DOTS_SLASH:Ne,QMARK:Re,QMARK_NO_DOT:Ve,STAR:M,START_ANCHOR:N}=j,K=he=>`(${R}(?:(?!${N}${he.dot?Se:z}).)*?)`,ie=g.dot?"":ve,ce=g.dot?Re:Ve;let ae=g.bash===!0?K(g):M;g.capture&&(ae=`(${ae})`),typeof g.noext=="boolean"&&(g.noextglob=g.noext);const B={input:m,index:-1,start:0,dot:g.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:E};m=e.removePrefix(m,B),_=m.length;const Fe=[],$e=[],Xe=[];let D=S,H;const pt=()=>B.index===_-1,_e=B.peek=(he=1)=>m[B.index+he],Me=B.advance=()=>m[++B.index]||"",ye=()=>m.slice(B.index+1),et=(he="",Ye=0)=>{B.consumed+=he,B.index+=Ye},Je=he=>{B.output+=he.output!=null?he.output:he.value,et(he.value)},Oe=()=>{let he=1;for(;_e()==="!"&&(_e(2)!=="("||_e(3)==="?");)Me(),B.start++,he++;return he%2===0?!1:(B.negated=!0,B.start++,!0)},wt=he=>{B[he]++,Xe.push(he)},lt=he=>{B[he]--,Xe.pop()},Ae=he=>{if(D.type==="globstar"){const Ye=B.braces>0&&(he.type==="comma"||he.type==="brace"),ue=he.extglob===!0||Fe.length&&(he.type==="pipe"||he.type==="paren");he.type!=="slash"&&he.type!=="paren"&&!Ye&&!ue&&(B.output=B.output.slice(0,-D.output.length),D.type="star",D.value="*",D.output=ae,B.output+=D.output)}if(Fe.length&&he.type!=="paren"&&(Fe[Fe.length-1].inner+=he.value),(he.value||he.output)&&Je(he),D&&D.type==="text"&&he.type==="text"){D.output=(D.output||D.value)+he.value,D.value+=he.value;return}he.prev=D,E.push(he),D=he},mt=(he,Ye)=>{const ue={...J[Ye],conditions:1,inner:""};ue.prev=D,ue.parens=B.parens,ue.output=B.output;const Te=(g.capture?"(":"")+ue.open;wt("parens"),Ae({type:he,value:Ye,output:B.output?"":oe}),Ae({type:"paren",extglob:!0,value:Me(),output:Te}),Fe.push(ue)},rt=he=>{let Ye=he.close+(g.capture?")":""),ue;if(he.type==="negate"){let Te=ae;if(he.inner&&he.inner.length>1&&he.inner.includes("/")&&(Te=K(g)),(Te!==ae||pt()||/^\)+$/.test(ye()))&&(Ye=he.close=`)$))${Te}`),he.inner.includes("*")&&(ue=ye())&&/^\.[^\\/.]+$/.test(ue)){const tt=h(ue,{...y,fastpaths:!1}).output;Ye=he.close=`)${tt})${Te})`}he.prev.type==="bos"&&(B.negatedExtglob=!0)}Ae({type:"paren",extglob:!0,value:H,output:Ye}),lt("parens")};if(g.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(m)){let he=!1,Ye=m.replace(s,(ue,Te,tt,ct,ut,vn)=>ct==="\\"?(he=!0,ue):ct==="?"?Te?Te+ct+(ut?Re.repeat(ut.length):""):vn===0?ce+(ut?Re.repeat(ut.length):""):Re.repeat(tt.length):ct==="."?z.repeat(tt.length):ct==="*"?Te?Te+ct+(ut?ae:""):ae:Te?ue:`\\${ue}`);return he===!0&&(g.unescape===!0?Ye=Ye.replace(/\\/g,""):Ye=Ye.replace(/\\+/g,ue=>ue.length%2===0?"\\\\":ue?"\\":"")),Ye===m&&g.contains===!0?(B.output=m,B):(B.output=e.wrapOutput(Ye,B,y),B)}for(;!pt();){if(H=Me(),H==="\0")continue;if(H==="\\"){const ue=_e();if(ue==="/"&&g.bash!==!0||ue==="."||ue===";")continue;if(!ue){H+="\\",Ae({type:"text",value:H});continue}const Te=/^\\+/.exec(ye());let tt=0;if(Te&&Te[0].length>2&&(tt=Te[0].length,B.index+=tt,tt%2!==0&&(H+="\\")),g.unescape===!0?H=Me():H+=Me(),B.brackets===0){Ae({type:"text",value:H});continue}}if(B.brackets>0&&(H!=="]"||D.value==="["||D.value==="[^")){if(g.posix!==!1&&H===":"){const ue=D.value.slice(1);if(ue.includes("[")&&(D.posix=!0,ue.includes(":"))){const Te=D.value.lastIndexOf("["),tt=D.value.slice(0,Te),ct=D.value.slice(Te+2),ut=i[ct];if(ut){D.value=tt+ut,B.backtrack=!0,Me(),!S.output&&E.indexOf(D)===1&&(S.output=oe);continue}}}(H==="["&&_e()!==":"||H==="-"&&_e()==="]")&&(H=`\\${H}`),H==="]"&&(D.value==="["||D.value==="[^")&&(H=`\\${H}`),g.posix===!0&&H==="!"&&D.value==="["&&(H="^"),D.value+=H,Je({value:H});continue}if(B.quotes===1&&H!=='"'){H=e.escapeRegex(H),D.value+=H,Je({value:H});continue}if(H==='"'){B.quotes=B.quotes===1?0:1,g.keepQuotes===!0&&Ae({type:"text",value:H});continue}if(H==="("){wt("parens"),Ae({type:"paren",value:H});continue}if(H===")"){if(B.parens===0&&g.strictBrackets===!0)throw new SyntaxError(d("opening","("));const ue=Fe[Fe.length-1];if(ue&&B.parens===ue.parens+1){rt(Fe.pop());continue}Ae({type:"paren",value:H,output:B.parens?")":"\\)"}),lt("parens");continue}if(H==="["){if(g.nobracket===!0||!ye().includes("]")){if(g.nobracket!==!0&&g.strictBrackets===!0)throw new SyntaxError(d("closing","]"));H=`\\${H}`}else wt("brackets");Ae({type:"bracket",value:H});continue}if(H==="]"){if(g.nobracket===!0||D&&D.type==="bracket"&&D.value.length===1){Ae({type:"text",value:H,output:`\\${H}`});continue}if(B.brackets===0){if(g.strictBrackets===!0)throw new SyntaxError(d("opening","["));Ae({type:"text",value:H,output:`\\${H}`});continue}lt("brackets");const ue=D.value.slice(1);if(D.posix!==!0&&ue[0]==="^"&&!ue.includes("/")&&(H=`/${H}`),D.value+=H,Je({value:H}),g.literalBrackets===!1||e.hasRegexChars(ue))continue;const Te=e.escapeRegex(D.value);if(B.output=B.output.slice(0,-D.value.length),g.literalBrackets===!0){B.output+=Te,D.value=Te;continue}D.value=`(${R}${Te}|${D.value})`,B.output+=D.value;continue}if(H==="{"&&g.nobrace!==!0){wt("braces");const ue={type:"brace",value:H,output:"(",outputIndex:B.output.length,tokensIndex:B.tokens.length};$e.push(ue),Ae(ue);continue}if(H==="}"){const ue=$e[$e.length-1];if(g.nobrace===!0||!ue){Ae({type:"text",value:H,output:H});continue}let Te=")";if(ue.dots===!0){const tt=E.slice(),ct=[];for(let ut=tt.length-1;ut>=0&&(E.pop(),tt[ut].type!=="brace");ut--)tt[ut].type!=="dots"&&ct.unshift(tt[ut].value);Te=l(ct,g),B.backtrack=!0}if(ue.comma!==!0&&ue.dots!==!0){const tt=B.output.slice(0,ue.outputIndex),ct=B.tokens.slice(ue.tokensIndex);ue.value=ue.output="\\{",H=Te="\\}",B.output=tt;for(const ut of ct)B.output+=ut.output||ut.value}Ae({type:"brace",value:H,output:Te}),lt("braces"),$e.pop();continue}if(H==="|"){Fe.length>0&&Fe[Fe.length-1].conditions++,Ae({type:"text",value:H});continue}if(H===","){let ue=H;const Te=$e[$e.length-1];Te&&Xe[Xe.length-1]==="braces"&&(Te.comma=!0,ue="|"),Ae({type:"comma",value:H,output:ue});continue}if(H==="/"){if(D.type==="dot"&&B.index===B.start+1){B.start=B.index+1,B.consumed="",B.output="",E.pop(),D=S;continue}Ae({type:"slash",value:H,output:ne});continue}if(H==="."){if(B.braces>0&&D.type==="dot"){D.value==="."&&(D.output=z);const ue=$e[$e.length-1];D.type="dots",D.output+=H,D.value+=H,ue.dots=!0;continue}if(B.braces+B.parens===0&&D.type!=="bos"&&D.type!=="slash"){Ae({type:"text",value:H,output:z});continue}Ae({type:"dot",value:H,output:z});continue}if(H==="?"){if(!(D&&D.value==="(")&&g.noextglob!==!0&&_e()==="("&&_e(2)!=="?"){mt("qmark",H);continue}if(D&&D.type==="paren"){const Te=_e();let tt=H;(D.value==="("&&!/[!=<:]/.test(Te)||Te==="<"&&!/<([!=]|\w+>)/.test(ye()))&&(tt=`\\${H}`),Ae({type:"text",value:H,output:tt});continue}if(g.dot!==!0&&(D.type==="slash"||D.type==="bos")){Ae({type:"qmark",value:H,output:Ve});continue}Ae({type:"qmark",value:H,output:Re});continue}if(H==="!"){if(g.noextglob!==!0&&_e()==="("&&(_e(2)!=="?"||!/[!=<:]/.test(_e(3)))){mt("negate",H);continue}if(g.nonegate!==!0&&B.index===0){Oe();continue}}if(H==="+"){if(g.noextglob!==!0&&_e()==="("&&_e(2)!=="?"){mt("plus",H);continue}if(D&&D.value==="("||g.regex===!1){Ae({type:"plus",value:H,output:X});continue}if(D&&(D.type==="bracket"||D.type==="paren"||D.type==="brace")||B.parens>0){Ae({type:"plus",value:H});continue}Ae({type:"plus",value:X});continue}if(H==="@"){if(g.noextglob!==!0&&_e()==="("&&_e(2)!=="?"){Ae({type:"at",extglob:!0,value:H,output:""});continue}Ae({type:"text",value:H});continue}if(H!=="*"){(H==="$"||H==="^")&&(H=`\\${H}`);const ue=r.exec(ye());ue&&(H+=ue[0],B.index+=ue[0].length),Ae({type:"text",value:H});continue}if(D&&(D.type==="globstar"||D.star===!0)){D.type="star",D.star=!0,D.value+=H,D.output=ae,B.backtrack=!0,B.globstar=!0,et(H);continue}let he=ye();if(g.noextglob!==!0&&/^\([^?]/.test(he)){mt("star",H);continue}if(D.type==="star"){if(g.noglobstar===!0){et(H);continue}const ue=D.prev,Te=ue.prev,tt=ue.type==="slash"||ue.type==="bos",ct=Te&&(Te.type==="star"||Te.type==="globstar");if(g.bash===!0&&(!tt||he[0]&&he[0]!=="/")){Ae({type:"star",value:H,output:""});continue}const ut=B.braces>0&&(ue.type==="comma"||ue.type==="brace"),vn=Fe.length&&(ue.type==="pipe"||ue.type==="paren");if(!tt&&ue.type!=="paren"&&!ut&&!vn){Ae({type:"star",value:H,output:""});continue}for(;he.slice(0,3)==="/**";){const qt=m[B.index+4];if(qt&&qt!=="/")break;he=he.slice(3),et("/**",3)}if(ue.type==="bos"&&pt()){D.type="globstar",D.value+=H,D.output=K(g),B.output=D.output,B.globstar=!0,et(H);continue}if(ue.type==="slash"&&ue.prev.type!=="bos"&&!ct&&pt()){B.output=B.output.slice(0,-(ue.output+D.output).length),ue.output=`(?:${ue.output}`,D.type="globstar",D.output=K(g)+(g.strictSlashes?")":"|$)"),D.value+=H,B.globstar=!0,B.output+=ue.output+D.output,et(H);continue}if(ue.type==="slash"&&ue.prev.type!=="bos"&&he[0]==="/"){const qt=he[1]!==void 0?"|$":"";B.output=B.output.slice(0,-(ue.output+D.output).length),ue.output=`(?:${ue.output}`,D.type="globstar",D.output=`${K(g)}${ne}|${ne}${qt})`,D.value+=H,B.output+=ue.output+D.output,B.globstar=!0,et(H+Me()),Ae({type:"slash",value:"/",output:""});continue}if(ue.type==="bos"&&he[0]==="/"){D.type="globstar",D.value+=H,D.output=`(?:^|${ne}|${K(g)}${ne})`,B.output=D.output,B.globstar=!0,et(H+Me()),Ae({type:"slash",value:"/",output:""});continue}B.output=B.output.slice(0,-D.output.length),D.type="globstar",D.output=K(g),D.value+=H,B.output+=D.output,B.globstar=!0,et(H);continue}const Ye={type:"star",value:H,output:ae};if(g.bash===!0){Ye.output=".*?",(D.type==="bos"||D.type==="slash")&&(Ye.output=ie+Ye.output),Ae(Ye);continue}if(D&&(D.type==="bracket"||D.type==="paren")&&g.regex===!0){Ye.output=H,Ae(Ye);continue}(B.index===B.start||D.type==="slash"||D.type==="dot")&&(D.type==="dot"?(B.output+=ze,D.output+=ze):g.dot===!0?(B.output+=Ne,D.output+=Ne):(B.output+=ie,D.output+=ie),_e()!=="*"&&(B.output+=oe,D.output+=oe)),Ae(Ye)}for(;B.brackets>0;){if(g.strictBrackets===!0)throw new SyntaxError(d("closing","]"));B.output=e.escapeLast(B.output,"["),lt("brackets")}for(;B.parens>0;){if(g.strictBrackets===!0)throw new SyntaxError(d("closing",")"));B.output=e.escapeLast(B.output,"("),lt("parens")}for(;B.braces>0;){if(g.strictBrackets===!0)throw new SyntaxError(d("closing","}"));B.output=e.escapeLast(B.output,"{"),lt("braces")}if(g.strictSlashes!==!0&&(D.type==="star"||D.type==="bracket")&&Ae({type:"maybe_slash",value:"",output:`${ne}?`}),B.backtrack===!0){B.output="";for(const he of B.tokens)B.output+=he.output!=null?he.output:he.value,he.suffix&&(B.output+=he.suffix)}return B};return h.fastpaths=(m,y)=>{const g={...y},O=typeof g.maxLength=="number"?Math.min(n,g.maxLength):n,_=m.length;if(_>O)throw new SyntaxError(`Input length: ${_}, exceeds maximum allowed length: ${O}`);m=o[m]||m;const{DOT_LITERAL:S,SLASH_LITERAL:E,ONE_CHAR:R,DOTS_SLASH:j,NO_DOT:J,NO_DOTS:z,NO_DOTS_SLASH:X,STAR:ne,START_ANCHOR:oe}=t.globChars(g.windows),Se=g.dot?z:J,ve=g.dot?X:J,ze=g.capture?"":"?:",Ne={negated:!1,prefix:""};let Re=g.bash===!0?".*?":ne;g.capture&&(Re=`(${Re})`);const Ve=ie=>ie.noglobstar===!0?Re:`(${ze}(?:(?!${oe}${ie.dot?j:S}).)*?)`,M=ie=>{switch(ie){case"*":return`${Se}${R}${Re}`;case".*":return`${S}${R}${Re}`;case"*.*":return`${Se}${Re}${S}${R}${Re}`;case"*/*":return`${Se}${Re}${E}${R}${ve}${Re}`;case"**":return Se+Ve(g);case"**/*":return`(?:${Se}${Ve(g)}${E})?${ve}${R}${Re}`;case"**/*.*":return`(?:${Se}${Ve(g)}${E})?${ve}${Re}${S}${R}${Re}`;case"**/.*":return`(?:${Se}${Ve(g)}${E})?${S}${R}${Re}`;default:{const ce=/^(.*?)\.(\w+)$/.exec(ie);if(!ce)return;const ae=M(ce[1]);return ae?ae+S+ce[2]:void 0}}},N=e.removePrefix(m,Ne);let K=M(N);return K&&g.strictSlashes!==!0&&(K+=`${E}?`),K},Su=h,Su}var Eu,Ad;function bb(){if(Ad)return Eu;Ad=1;const t=vb(),e=yb(),n=Qa(),i=Xa(),r=o=>o&&typeof o=="object"&&!Array.isArray(o),s=(o,l,d=!1)=>{if(Array.isArray(o)){const E=o.map(j=>s(j,l,d));return j=>{for(const J of E){const z=J(j);if(z)return z}return!1}}const h=r(o)&&o.tokens&&o.input;if(o===""||typeof o!="string"&&!h)throw new TypeError("Expected pattern to be a non-empty string");const m=l||{},y=m.windows,g=h?s.compileRe(o,l):s.makeRe(o,l,!1,!0),O=g.state;delete g.state;let _=()=>!1;if(m.ignore){const E={...l,ignore:null,onMatch:null,onResult:null};_=s(m.ignore,E,d)}const S=(E,R=!1)=>{const{isMatch:j,match:J,output:z}=s.test(E,g,l,{glob:o,posix:y}),X={glob:o,state:O,regex:g,posix:y,input:E,output:z,match:J,isMatch:j};return typeof m.onResult=="function"&&m.onResult(X),j===!1?(X.isMatch=!1,R?X:!1):_(E)?(typeof m.onIgnore=="function"&&m.onIgnore(X),X.isMatch=!1,R?X:!1):(typeof m.onMatch=="function"&&m.onMatch(X),R?X:!0)};return d&&(S.state=O),S};return s.test=(o,l,d,{glob:h,posix:m}={})=>{if(typeof o!="string")throw new TypeError("Expected input to be a string");if(o==="")return{isMatch:!1,output:""};const y=d||{},g=y.format||(m?n.toPosixSlashes:null);let O=o===h,_=O&&g?g(o):o;return O===!1&&(_=g?g(o):o,O=_===h),(O===!1||y.capture===!0)&&(y.matchBase===!0||y.basename===!0?O=s.matchBase(o,l,d,m):O=l.exec(_)),{isMatch:!!O,match:O,output:_}},s.matchBase=(o,l,d)=>(l instanceof RegExp?l:s.makeRe(l,d)).test(n.basename(o)),s.isMatch=(o,l,d)=>s(l,d)(o),s.parse=(o,l)=>Array.isArray(o)?o.map(d=>s.parse(d,l)):e(o,{...l,fastpaths:!1}),s.scan=(o,l)=>t(o,l),s.compileRe=(o,l,d=!1,h=!1)=>{if(d===!0)return o.output;const m=l||{},y=m.contains?"":"^",g=m.contains?"":"$";let O=`${y}(?:${o.output})${g}`;o&&o.negated===!0&&(O=`^(?!${O}).*$`);const _=s.toRegex(O,l);return h===!0&&(_.state=o),_},s.makeRe=(o,l={},d=!1,h=!1)=>{if(!o||typeof o!="string")throw new TypeError("Expected a non-empty string");let m={negated:!1,fastpaths:!0};return l.fastpaths!==!1&&(o[0]==="."||o[0]==="*")&&(m.output=e.fastpaths(o,l)),m.output||(m=e(o,l)),s.compileRe(m,l,d,h)},s.toRegex=(o,l)=>{try{const d=l||{};return new RegExp(o,d.flags||(d.nocase?"i":""))}catch(d){if(l&&l.debug===!0)throw d;return/$^/}},s.constants=i,Eu=s,Eu}var Nu,Od;function kb(){if(Od)return Nu;Od=1;const t=bb(),e=Qa();function n(i,r,s=!1){return r&&(r.windows===null||r.windows===void 0)&&(r={...r,windows:e.isWindows()}),t(i,r,s)}return Object.assign(n,t),Nu=n,Nu}var _b=kb();const xd=Ya(_b),Td="loglevel-patterns",Js="loglevel:",Au="!",wb=ot.INFO;class Sb{constructor(e){me(this,"projectPrefix");me(this,"patternsCache",null);this.projectPrefix=`${Js}${e}:`}getLevel(e){const n=this.loadAndUnifyPatterns();return this.resolveLogLevelFromPatterns(e,n)||wb}setLevel(e,n){const{level:i,override:r}=this.parseLogLevel(n),s=`${Js}${e}`,o=r?`${i}${Au}`:i;localStorage.setItem(s,o),this.patternsCache=null}loadAndUnifyPatterns(){if(this.patternsCache)return this.patternsCache;const e=this.readPatternsFromJSON(),n=this.unifyWithIndividualKeys(e);return this.patternsCache=n,n}resolveLogLevelFromPatterns(e,n){let i;for(const[r,{level:s,override:o}]of Object.entries(n))if(xd(r.toLowerCase())(e.toLowerCase())){if(o)return s;(!i||xd(r)(e))&&(i=s)}return i}readPatternsFromJSON(){try{const e=localStorage.getItem(Td);return e?JSON.parse(e):{}}catch{return console.error("Failed to parse loglevel-patterns from localStorage"),{}}}unifyWithIndividualKeys(e){const n={...e};for(let i=0;i<localStorage.length;i++){const r=localStorage.key(i);if(!r||!r.startsWith(Js)||r===Td)continue;const s=r.replace(Js,"").toLowerCase(),o=localStorage.getItem(r);if(!o)continue;const{level:l,override:d}=this.parseLogLevel(o);n[s]={level:l,override:d}}return n}parseLogLevel(e){const n=e.endsWith(Au),i=n?e.slice(0,-Au.length):e;if(!Wh(i))throw new Ul(i);return{level:i,override:n}}}class Eb{constructor(e,n){me(this,"committed",!1);me(this,"chainOptions",{});me(this,"method",null);me(this,"stack","");me(this,"args",[]);this.adapter=e,n&&(this.chainOptions={...n}),Promise.resolve().then(()=>this.commit())}options(e){return this.chainOptions={...this.chainOptions,...e},this}trace(...e){return this.log("trace",e)}debug(...e){return this.log("debug",e)}info(...e){return this.log("info",e)}warn(...e){return this.log("warn",e)}error(...e){return this.log("error",e)}fatal(...e){return this.log("fatal",e)}log(e,n){var i;return this.method=e,this.args=n,this.stack=(i=new Error().stack)!=null?i:"",this}commit(){if(!this.committed&&(this.committed=!0,this.method)){const e=this.args[0],n=this.args.slice(1),i={stack:this.stack,content:{message:e,args:n},options:this.chainOptions};this.adapter[this.method](i)}}}let Jh=class cl{constructor(e){me(this,"adapter");this.adapter=e}static create(e){const n=new cl(e);return n.setMetadata({account:null,client:np()}),n}child(e,n={}){return new cl(this.adapter.child(e,n))}lazyChild(e,n={}){let i;return new Proxy({},{get:(r,s,o)=>(i||(i=this.child(e,n)),Reflect.get(i,s,o))})}setMetadata(e){this.adapter.setMetadata(e)}setLevel(e){if(!Wh(e))throw new Ul(e);this.adapter.setLevel(e)}createChain(e){return new Eb(this.adapter,e)}trace(...e){return this.createChain().trace(...e)}debug(...e){return this.createChain().debug(...e)}info(...e){return this.createChain().info(...e)}warn(...e){return this.createChain().warn(...e)}error(...e){return this.createChain().error(...e)}fatal(...e){return this.createChain().fatal(...e)}options(e){return this.createChain(e)}};function Nb(t){return xi().logger.lazyChild(t)}function Yh(t,e){return Jh.create(new ll({source:t,levelService:new Sb(t),consoleLogger:new mb,httpLogger:jl.create({db:e,project:t})}))}const Ab="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Ob=(t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;)e+=Ab[n[t]&63];return e};const wa=(t=8)=>Ob(t),Xh=(t,e=!1)=>{const n=Object.entries(t).reduce((i,[r,s])=>s!==void 0&&(!e||s!==null)?`${i}${i?"&":""}${r}=${s}`:i,"");return n?`?${n}`:""},Qh=t=>{const e=document.getElementById(t);return e?new URL(e.src).searchParams:new URLSearchParams};function xb(){const t=new Error().stack.split(`
|
|
31
|
+
`);return t.length<3?"":t[2].trim().substring(3)}function Tb(t){return new Promise(e=>setTimeout(e,t))}const Kt=class Kt{constructor(){me(this,"projectName","nizza");me(this,"instanceId",wa());me(this,"nizzaDB",new ib);me(this,"logger",Yh(this.projectName,this.nizzaDB));me(this,"coreLogger",this.logger.child("core"));me(this,"_logger",this.coreLogger.child("NizzaStore"));me(this,"_config",null);me(this,"_account");me(this,"_accountStatus","idle");me(this,"_productDataSource");me(this,"_eventBus",new jh("nizza",this.coreLogger));me(this,"activeAccountFetchId",null);Fy(this,{_config:ht,_account:ht,_productDataSource:ht,_accountStatus:ht,config:zn,account:zn,accountName:zn,accountStatus:zn,setAccount:Bt,configure:Bt,refetchAccount:Bt,setProductDataSource:Bt,setAddToCartConfig:Bt,setProductId:Bt},{name:"NizzaStore",autoBind:!0}),this.refetchAccount=this.refetchAccount.bind(this)}static instance(){var n;if(!!((n=window==null?void 0:window.nizza)!=null&&n.store))Kt._instance=window.nizza.store;else{const i=new Kt;Kt._instance=i,Kt._instance._logger.debug("Created new NizzaStore instance")}return window.nizza||(window.nizza={},window.nz={},Kt._instance._logger.debug("Initialized nizza window object")),window.nizza.store=Kt._instance,window.nz=window.nizza,Kt._instance}async configure(e){try{this._logger.debug("Running configure with config:",e),await this.updateConfig(e)}catch(n){this.setAccountStatus("error"),this._logger.error("Error running configure",n)}}async updateConfig(e={}){var r,s;const{account:n,authToken:i}=(r=this._config)!=null?r:{};this._config={...this._config,...e},(s=this._config)!=null&&s.account&&(n!==this._config.account||i!==this._config.authToken)?(this._logger.debug(`Fetching account data for account: ${this._config.account}, authToken provided: ${!!this._config.authToken}`),this.logger.setMetadata({account:this._config.account}),await this.fetchAccount(this._config.account,this._config.authToken)):this._logger.debug("Skipped fetching account data as the account or authToken did not change"),e.getProductDataSource&&this.setProductDataSource(await e.getProductDataSource())}async fetchAccount(e,n){this.setAccountStatus("loading");const i=wa();this.activeAccountFetchId=i;try{const r=await gp(e,n);if(this.activeAccountFetchId!==i){this._logger.debug("Fetch account request was superseded by a newer request");return}this.setAccount(r),this.setAccountStatus("success"),this._logger.debug("Account fetched and set successfully:",r)}catch(r){this.activeAccountFetchId===i&&(this.setAccountStatus("error"),r instanceof Vl?this._logger.fatal("Nizza account not found",e).options({silent:!0}):this._logger.fatal("Unexpected error fetching account",r))}}setAccount(e){this._account=e}setAccountStatus(e){this._accountStatus=e}setProductDataSource(e){this._productDataSource=e}setProductId(e){this._config&&(this._config.productId=e)}setOrderFormId(e){this._config&&(this._config.orderFormId=e)}setAddToCartConfig(e){if(!this._config){const n="You cannot set addToCartConfig before running configure()";throw this._logger.error(n),new Error(n)}this._config.addToCartConfig=e}setAuthToken(e){this.updateConfig({authToken:e})}async refetchAccount(){var e;(e=this._config)!=null&&e.account&&await this.fetchAccount(this._config.account,this._config.authToken)}get version(){return Kt.version}get config(){return this._config}get account(){return this._account}get accountStatus(){return this._accountStatus}get accountName(){var e;return(e=this._config)==null?void 0:e.account}isPvtAccount(e){var n;return!!(e&&((n=this._config)!=null&&n.authToken))}isPubAccount(e){var n;return!!(e&&!((n=this._config)!=null&&n.authToken))}get productDataSource(){return this._productDataSource}get eventBus(){return this._eventBus}};me(Kt,"version","9"),me(Kt,"_instance");let Sa=Kt;const xi=t=>{const e=Sa.instance();return xy(()=>!!e.account,()=>t==null?void 0:t(e)),e};function Zh(){return je.useMemo(()=>xi(),[])}function ep(t,e){const n=Zh();return Bh(()=>t(n),e)}const{coreLogger:Cb}=xi(),Rb=Cb.child("getClientTimeZone");function tp(t=!1){var s,o,l;let e=null,n=null,i=null;try{e=(l=(o=(s=Intl.DateTimeFormat())==null?void 0:s.resolvedOptions())==null?void 0:o.timeZone)!=null?l:null;const d=-new Date().getTimezoneOffset();i=d;const h=d>=0?"+":"-",m=String(Math.floor(Math.abs(d)/60)).padStart(2,"0"),y=String(Math.abs(d)%60).padStart(2,"0");n=`${h}${m}:${y}`}catch(d){Rb.error("Error obtaining time zone or offset",d)}const r={offset:n,offsetValue:i,value:e,country:null,included:null,label:null};if(t){const{country:d,included:h,label:m,...y}=r;return y}return r}function np(){const e=typeof navigator!="undefined"?navigator.userAgent:"server",n=Fb(e),{language:i,languages:r}=Ib(),s=Db(),o=Pb(),{hardwareConcurrency:l,deviceMemory:d}=Lb(),h=$b();return{userAgent:e,browser:n.browser,os:n.os,device:n.device,language:i,languages:r,screen:s,connection:o,hardwareConcurrency:l,deviceMemory:d,timezone:h}}function Fb(t){try{const n=new On(t).getResult();return{browser:{name:n.browser.name||"Unknown",version:n.browser.version||"Unknown"},os:{name:n.os.name||"Unknown",version:n.os.version||"Unknown"},device:{model:n.device.model||"Unknown",type:n.device.type||"Desktop",vendor:n.device.vendor||"Unknown"}}}catch(e){return console.error("Error parsing user agent:",e),{browser:{name:"Unknown",version:"Unknown"},os:{name:"Unknown",version:"Unknown"},device:{model:"Unknown",type:"Desktop",vendor:"Unknown"}}}}function Ib(){return typeof navigator!="undefined"?{language:navigator.language||"Unknown",languages:navigator.languages?[...navigator.languages]:[]}:{language:"Unknown",languages:[]}}function Db(){return typeof window!="undefined"&&window.screen?{width:window.screen.width,height:window.screen.height,colorDepth:window.screen.colorDepth}:null}function Pb(){var t,e,n,i;if(typeof navigator!="undefined"&&"connection"in navigator){const r=navigator.connection;return{downlink:(t=r==null?void 0:r.downlink)!=null?t:0,effectiveType:(e=r==null?void 0:r.effectiveType)!=null?e:"Unknown",rtt:(n=r==null?void 0:r.rtt)!=null?n:0,saveData:(i=r==null?void 0:r.saveData)!=null?i:!1}}return null}function Lb(){return typeof navigator!="undefined"?{hardwareConcurrency:navigator.hardwareConcurrency||null,deviceMemory:navigator.deviceMemory||null}:{hardwareConcurrency:null,deviceMemory:null}}function $b(){try{return tp(!0)}catch(t){return console.error("Error retrieving client timezone:",t),{offset:null,offsetValue:null,value:"Unknown",country:null,included:null,label:null}}}var ip=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(ip||{}),rp=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(rp||{}),sp=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(sp||{}),ap=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(ap||{}),op=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(op||{}),up=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(up||{});class Vl extends Cn{constructor(e){super("NIZZA_ACCOUNT_NOT_FOUND_ERROR",`Error finding account: ${e}`)}}class lp extends Cn{constructor(e){super("NIZZA_PLAN_NOT_FOUND_ERROR",`Error finding plan: ${e}`)}}class cp extends Cn{constructor(e){super("NIZZA_CREATE_PLAN_ERROR",`Error creating plan: ${e.plan}`,e)}}const Cd=`${rr.apiUrls.restV1}/plans`;class dp{async get(e){const i=`/info${Xh({planType:e})}`,r=Cd+i,{data:s}=await vi({url:r});return s}async create(e){const n=`${Cd}/create`,{success:i}=await vi({url:n,method:"POST",body:JSON.stringify(e)});if(!i)throw new cp(e)}}function Mb(t){const{host:e,account:n,username:i,createdAt:r,subscriptionType:s,installationDateApp:o,...l}=t;return{...l,account:n,host:e!=null?e:null,username:i!=null?i:n,createdAt:new Date(r),subscriptionType:s!=null?s:null,installationDateApp:new Date(o)}}function Bb(t){const{host:e,...n}=t;return{...n,host:e!=null?e:null,plan:{}}}const Ub=`${rr.apiUrls.restV1}/accounts/v2`;class fp{async get(e){const n=`${Ub}/${e}`,{data:i}=await vi({url:n});return i?Bb(i):null}}const jb=`${rr.apiUrls.restV1}/accounts/v2/pvt`;class Vb{async get(e,n){const i=`${jb}/${e}`,{data:r}=await vi({url:i,headers:{authorization:`Bearer ${n}`}});return r?Mb(r):null}}class hp{constructor(e,n,i){this.publicAccountRepo=e,this.privateAccountRepo=n,this.accountPlanRepo=i}async get(e,n){try{const i=n?await this.privateAccountRepo.get(e,n):await this.publicAccountRepo.get(e);if(!i)throw new Vl(e);const r=await this.accountPlanRepo.get(i.descriptionPlan);if(!r)throw new lp(i.descriptionPlan);return{...i,plan:r}}catch(i){throw new Fl(i)}}}const Hb=new fp,qb=new Vb,zb=new dp,pp=new hp(Hb,qb,zb),mp=()=>{const{account:t,accountName:e,accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:s}=ep(h=>({account:h.account,accountName:h.accountName,accountStatus:h.accountStatus,refetchAccount:h.refetchAccount,isPvtAccount:h.isPvtAccount,isPubAccount:h.isPubAccount})),o=["idle","loading"].includes(n);return{account:t,accountName:e,isLoading:o,isError:n==="error",isSuccess:n==="success",accountStatus:n,refetchAccount:i,isPvtAccount:r,isPubAccount:s}};async function gp(t,e){return pp.get(t,e)}var vp=(t=>(t.Created="CREATED",t.CreateComplete="CREATE_COMPLETE",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(vp||{}),yp=(t=>(t.Add="add",t.Remove="remove",t))(yp||{}),bp=(t=>(t.Vtex="VTEX",t))(bp||{}),kp=(t=>(t.Active="active",t.Inactive="inactive",t))(kp||{});const Kb={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"}}]}}]}}]}}]},Gb={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"}}]}}]}}]}}]},Wb={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"}}]}}]}}]}}]},Jb={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"}}]}}]}}]}}]},Yb={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"}}]}}]}}]}}]},Xb={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"}}]}}]}}]}}]},Qb={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"}}]}}]}}]}}]},Zb={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"}}]}}]}}]}}]},ek={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"}}]}}]}}]}}]},tk={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"}}]}}]}}]}}]},nk={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"}}]}}]}}]}}]},ik={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"}}]}}]}}]}}]},rk={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"}}]}}]}}]}}]},_p={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"}}]}}]}}]}}]},sk={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"}}]}}]}}]}}]},ak={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"highlightProduct"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"highlightProduct"},arguments:[{kind:"Argument",name:{kind:"Name",value:"data"},value:{kind:"Variable",name:{kind:"Name",value:"data"}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"HighlightProductSuccess"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"ErrorGeneral"}},selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"message"}}]}}]}}]}}]},ok={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"}}]}}]}}]}}]},uk={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"}}]}}]}}]}}]},lk={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"}}]}}]}}]}}]},ck={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"sendAddToCart"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"data"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddToCartInput"}}}}],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"sendAddToCart"},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:"AddToCartSuccess"}},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"}}]}}]}}]}}]},dk={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"}}]}}]}}]}}]},fk={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"}}]}}]}}]}}]},hk={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"}}]}}]}}]}}]},pk={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"}}]}}]}}]}}]},mk={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"}}]}}]}}]}}]},gk={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"}}]}}]}}]}}]},vk={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"}}]}}]}}]}}]},yk={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"}}]}}]}}]}}]},bk={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"}}]}}]}}]}}]},kk={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"}}]}}]}}]}}]}}]},_k={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"}}]}}]}}]}}]},wk={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"}}]}}]}}]}}]},Sk={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"}}]}}]}}]}}]},Ek={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:"Field",name:{kind:"Name",value:"productName"}},{kind:"Field",name:{kind:"Name",value:"productImageUrl"}}]}}]}}]}},{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"}}]}}]}}]}}]},Nk=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:Kb,AppendProductsToSnackVideoDocument:fk,BlockUserDocument:tk,ChangeAccountUsernameDocument:nk,CreatePlayListDocument:hk,CreateSnackVideoBatchDocument:pk,DeleteAllCustomizationDocument:ok,DeleteChatMessageDocument:ik,DeleteCollectionDocument:Gb,DeleteRelationshipWithSnackVideoDocument:mk,DeleteSnackVideoDocument:gk,EventStatus:vp,FindByProductSnackVideoDocument:Sk,FindCollectionDocument:Wb,FindManySnackVideosDocument:vk,FindMinimalEventDocument:Zb,GetAllChatMessageDocument:rk,GetAllCollectionsDocument:Jb,GetAllCustomizationDocument:uk,GetAllSnackVideosDocument:yk,GetChatRoomTokenDocument:_p,GetPlayListDocument:Ek,GetPlayListsDocument:bk,GetSnackVideoRelationshipsDocument:kk,GetTimeLineDocument:dk,HighlightProductDocument:ak,ManageCollectionProductDocument:Yb,Methods:yp,PinChatMessageDocument:sk,SearchCollectionsDocument:Xb,SearchMinimalEventsDocument:ek,SearchSnackVideosDocument:_k,SendAddToCartDocument:ck,SignProvider:bp,Status:kp,UpdateCollectionDocument:Qb,UpdateCustomizationDocument:lk,UpdatePlayListDocument:wk},Symbol.toStringTag,{value:"Module"}));var Za=(t=>(t.OPEN_TAB="openTab",t.OPEN_VARIATION_SELECTOR="openVariationSelector",t.ADD_TO_CART="addToCart",t))(Za||{});function Ak(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}var Rn=(t=>(t.Local="local",t.VtexLegacy="vtexlegacy",t.VtexIO="vtexio",t.VtexFastStore="faststore",t.Platform="platform",t.External="external",t))(Rn||{}),Hl=(t=>(t.PROD="prod",t.DEV="dev",t.LOCAL="local",t))(Hl||{});const{coreLogger:Ok}=xi(),dl=Ok.child("addToCartHooks"),fl={errorAddingToCart:"addToCartHooks.notification.error",errorOpeningVariationSelector:"addToCartHooks.notification.error",errorOpeningNewTab:"addToCartHooks.notification.error",successAddingToCart:"addToCartHooks.notification.success"};async function xk(t){const e={...t,action:{type:Za.ADD_TO_CART,exec:()=>dl.error("action no implemented in validate hook")}};try{const n=await Tk(e),i=await Ck(n);await Rk(i)}catch(n){dl.error("error unhandled",n)}}async function Tk(t){var s,o;const{context:e,userAddToCartConfig:n}=t,i=(s=n==null?void 0:n.hooks)==null?void 0:s.transform;let r=t.product;if(i)try{r=await i({product:{...r},data:(o=e.data)!=null?o:{}})}catch(l){Ea("transform",l)}return{...t,product:r}}async function Ck(t){var d,h;const{context:e,hookStrategy:n,userAddToCartConfig:i,product:r}=t,s=wp(t),o=(d=i==null?void 0:i.hooks)==null?void 0:d.validate;let l=n.validate({...t,actionFactory:s});if(o)try{l=await o({product:{...r},defaultAction:{...l},action:s,data:(h=e.data)!=null?h:{}})}catch(m){Ea("validate",m)}return{...t,action:l,actionFactory:s}}async function Rk(t){var E;const{eventBus:e}=xi(),{product:n,userAddToCartConfig:i,notifyFactory:r,action:s,actionFactory:o}=t,{isVariationSelectorOpen:l,data:d={}}=t.context,h=(E=i==null?void 0:i.hooks)==null?void 0:E.end,m=s.type===Za.ADD_TO_CART;let y=null,g=!1;const O=()=>{!m||!l||o.openVariationSelector(!1).exec()},_=()=>{!m||g||(y?r.error(fl.errorAddingToCart):r.success(fl.successAddingToCart))},S=()=>{const R={product:n,actionType:s.type,success:!y,error:y};e.emit(Hh.ATCH_ACTION_EXECUTED,R)};try{if(!s.type||!s.exec)throw new Error("Invalid action object, missing keys 'type' or 'exec'");await s.exec()}catch(R){Ea("end",R),y=R}if(h)try{g=!!await h({data:d,error:y,notify:r,actionExecuted:s})}catch(R){Ea("end",R)}O(),_(),S()}function wp(t){const{actionFactory:e,userAddToCartConfig:n}=t,i=r=>Object.entries(r!=null?r:{}).reduce((s,[o,l])=>({...s,[o]:d=>({type:o,exec:()=>l(d)})}),{});return{...i(e),...i(n==null?void 0:n.actionFactory)}}function Ea(t,e){dl.error(`addToCartHooks error running ${t}: `,e)}class Sp{constructor(e){me(this,"aggregate");me(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 Ep(t){return new Sp(t)}class Fk{constructor(e){me(this,"_value");e!==void 0&&(this._value=e)}get value(){return this._value}}var xt=(t=>(t.GENERAL_ERROR="GENERAL_ERROR",t.AXIOS_ERROR="AXIOS_ERROR",t.NETWORK_ERROR="NETWORK_ERROR",t.CONFIG_ERROR="CONFIG_ERROR",t.TIMEOUT_ERROR="TIMEOUT_ERROR",t.AUTH_ERROR="AUTH_ERROR",t.NOT_FOUND="NOT_FOUND",t.VALIDATION_ERROR="VALIDATION_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.BAD_REQUEST="BAD_REQUEST",t.UNAUTHORIZED="UNAUTHORIZED",t.FORBIDDEN="FORBIDDEN",t.CONFLICT="CONFLICT",t.GONE="GONE",t.UNSUPPORTED_MEDIA_TYPE="UNSUPPORTED_MEDIA_TYPE",t.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",t.INTERNAL_SERVER_ERROR="INTERNAL_SERVER_ERROR",t.SERVICE_UNAVAILABLE="SERVICE_UNAVAILABLE",t))(xt||{});function Np(t,e){return function(){return t.apply(e,arguments)}}const{toString:Ik}=Object.prototype,{getPrototypeOf:ql}=Object,eo=(t=>e=>{const n=Ik.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),on=t=>(t=t.toLowerCase(),e=>eo(e)===t),to=t=>e=>typeof e===t,{isArray:dr}=Array,is=to("undefined");function Dk(t){return t!==null&&!is(t)&&t.constructor!==null&&!is(t.constructor)&&Vt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Ap=on("ArrayBuffer");function Pk(t){let e;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Ap(t.buffer),e}const Lk=to("string"),Vt=to("function"),Op=to("number"),no=t=>t!==null&&typeof t=="object",$k=t=>t===!0||t===!1,ra=t=>{if(eo(t)!=="object")return!1;const e=ql(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Mk=on("Date"),Bk=on("File"),Uk=on("Blob"),jk=on("FileList"),Vk=t=>no(t)&&Vt(t.pipe),Hk=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Vt(t.append)&&((e=eo(t))==="formdata"||e==="object"&&Vt(t.toString)&&t.toString()==="[object FormData]"))},qk=on("URLSearchParams"),[zk,Kk,Gk,Wk]=["ReadableStream","Request","Response","Headers"].map(on),Jk=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function hs(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t=="undefined")return;let i,r;if(typeof t!="object"&&(t=[t]),dr(t))for(i=0,r=t.length;i<r;i++)e.call(null,t[i],i,t);else{const s=n?Object.getOwnPropertyNames(t):Object.keys(t),o=s.length;let l;for(i=0;i<o;i++)l=s[i],e.call(null,t[l],l,t)}}function xp(t,e){e=e.toLowerCase();const n=Object.keys(t);let i=n.length,r;for(;i-- >0;)if(r=n[i],e===r.toLowerCase())return r;return null}const fi=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Tp=t=>!is(t)&&t!==fi;function hl(){const{caseless:t}=Tp(this)&&this||{},e={},n=(i,r)=>{const s=t&&xp(e,r)||r;ra(e[s])&&ra(i)?e[s]=hl(e[s],i):ra(i)?e[s]=hl({},i):dr(i)?e[s]=i.slice():e[s]=i};for(let i=0,r=arguments.length;i<r;i++)arguments[i]&&hs(arguments[i],n);return e}const Yk=(t,e,n,{allOwnKeys:i}={})=>(hs(e,(r,s)=>{n&&Vt(r)?t[s]=Np(r,n):t[s]=r},{allOwnKeys:i}),t),Xk=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),Qk=(t,e,n,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},Zk=(t,e,n,i)=>{let r,s,o;const l={};if(e=e||{},t==null)return e;do{for(r=Object.getOwnPropertyNames(t),s=r.length;s-- >0;)o=r[s],(!i||i(o,t,e))&&!l[o]&&(e[o]=t[o],l[o]=!0);t=n!==!1&&ql(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},e_=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const i=t.indexOf(e,n);return i!==-1&&i===n},t_=t=>{if(!t)return null;if(dr(t))return t;let e=t.length;if(!Op(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},n_=(t=>e=>t&&e instanceof t)(typeof Uint8Array!="undefined"&&ql(Uint8Array)),i_=(t,e)=>{const i=(t&&t[Symbol.iterator]).call(t);let r;for(;(r=i.next())&&!r.done;){const s=r.value;e.call(t,s[0],s[1])}},r_=(t,e)=>{let n;const i=[];for(;(n=t.exec(e))!==null;)i.push(n);return i},s_=on("HTMLFormElement"),a_=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,r){return i.toUpperCase()+r}),Rd=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),o_=on("RegExp"),Cp=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),i={};hs(n,(r,s)=>{let o;(o=e(r,s,t))!==!1&&(i[s]=o||r)}),Object.defineProperties(t,i)},u_=t=>{Cp(t,(e,n)=>{if(Vt(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=t[n];if(Vt(i)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},l_=(t,e)=>{const n={},i=r=>{r.forEach(s=>{n[s]=!0})};return dr(t)?i(t):i(String(t).split(e)),n},c_=()=>{},d_=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e,Ou="abcdefghijklmnopqrstuvwxyz",Fd="0123456789",Rp={DIGIT:Fd,ALPHA:Ou,ALPHA_DIGIT:Ou+Ou.toUpperCase()+Fd},f_=(t=16,e=Rp.ALPHA_DIGIT)=>{let n="";const{length:i}=e;for(;t--;)n+=e[Math.random()*i|0];return n};function h_(t){return!!(t&&Vt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const p_=t=>{const e=new Array(10),n=(i,r)=>{if(no(i)){if(e.indexOf(i)>=0)return;if(!("toJSON"in i)){e[r]=i;const s=dr(i)?[]:{};return hs(i,(o,l)=>{const d=n(o,r+1);!is(d)&&(s[l]=d)}),e[r]=void 0,s}}return i};return n(t,0)},m_=on("AsyncFunction"),g_=t=>t&&(no(t)||Vt(t))&&Vt(t.then)&&Vt(t.catch),Fp=((t,e)=>t?setImmediate:e?((n,i)=>(fi.addEventListener("message",({source:r,data:s})=>{r===fi&&s===n&&i.length&&i.shift()()},!1),r=>{i.push(r),fi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Vt(fi.postMessage)),v_=typeof queueMicrotask!="undefined"?queueMicrotask.bind(fi):typeof process!="undefined"&&process.nextTick||Fp,q={isArray:dr,isArrayBuffer:Ap,isBuffer:Dk,isFormData:Hk,isArrayBufferView:Pk,isString:Lk,isNumber:Op,isBoolean:$k,isObject:no,isPlainObject:ra,isReadableStream:zk,isRequest:Kk,isResponse:Gk,isHeaders:Wk,isUndefined:is,isDate:Mk,isFile:Bk,isBlob:Uk,isRegExp:o_,isFunction:Vt,isStream:Vk,isURLSearchParams:qk,isTypedArray:n_,isFileList:jk,forEach:hs,merge:hl,extend:Yk,trim:Jk,stripBOM:Xk,inherits:Qk,toFlatObject:Zk,kindOf:eo,kindOfTest:on,endsWith:e_,toArray:t_,forEachEntry:i_,matchAll:r_,isHTMLForm:s_,hasOwnProperty:Rd,hasOwnProp:Rd,reduceDescriptors:Cp,freezeMethods:u_,toObjectSet:l_,toCamelCase:a_,noop:c_,toFiniteNumber:d_,findKey:xp,global:fi,isContextDefined:Tp,ALPHABET:Rp,generateString:f_,isSpecCompliantForm:h_,toJSONObject:p_,isAsyncFn:m_,isThenable:g_,setImmediate:Fp,asap:v_};function Le(t,e,n,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),i&&(this.request=i),r&&(this.response=r,this.status=r.status?r.status:null)}q.inherits(Le,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:q.toJSONObject(this.config),code:this.code,status:this.status}}});const Ip=Le.prototype,Dp={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Dp[t]={value:t}});Object.defineProperties(Le,Dp);Object.defineProperty(Ip,"isAxiosError",{value:!0});Le.from=(t,e,n,i,r,s)=>{const o=Object.create(Ip);return q.toFlatObject(t,o,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),Le.call(o,t.message,e,n,i,r),o.cause=t,o.name=t.name,s&&Object.assign(o,s),o};const y_=null;function pl(t){return q.isPlainObject(t)||q.isArray(t)}function Pp(t){return q.endsWith(t,"[]")?t.slice(0,-2):t}function Id(t,e,n){return t?t.concat(e).map(function(r,s){return r=Pp(r),!n&&s?"["+r+"]":r}).join(n?".":""):e}function b_(t){return q.isArray(t)&&!t.some(pl)}const k_=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function io(t,e,n){if(!q.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,E){return!q.isUndefined(E[S])});const i=n.metaTokens,r=n.visitor||m,s=n.dots,o=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(r))throw new TypeError("visitor must be a function");function h(_){if(_===null)return"";if(q.isDate(_))return _.toISOString();if(!d&&q.isBlob(_))throw new Le("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(_)||q.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,S,E){let R=_;if(_&&!E&&typeof _=="object"){if(q.endsWith(S,"{}"))S=i?S:S.slice(0,-2),_=JSON.stringify(_);else if(q.isArray(_)&&b_(_)||(q.isFileList(_)||q.endsWith(S,"[]"))&&(R=q.toArray(_)))return S=Pp(S),R.forEach(function(J,z){!(q.isUndefined(J)||J===null)&&e.append(o===!0?Id([S],z,s):o===null?S:S+"[]",h(J))}),!1}return pl(_)?!0:(e.append(Id(E,S,s),h(_)),!1)}const y=[],g=Object.assign(k_,{defaultVisitor:m,convertValue:h,isVisitable:pl});function O(_,S){if(!q.isUndefined(_)){if(y.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));y.push(_),q.forEach(_,function(R,j){(!(q.isUndefined(R)||R===null)&&r.call(e,R,q.isString(j)?j.trim():j,S,g))===!0&&O(R,S?S.concat(j):[j])}),y.pop()}}if(!q.isObject(t))throw new TypeError("data must be an object");return O(t),e}function Dd(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(i){return e[i]})}function zl(t,e){this._pairs=[],t&&io(t,this,e)}const Lp=zl.prototype;Lp.append=function(e,n){this._pairs.push([e,n])};Lp.toString=function(e){const n=e?function(i){return e.call(this,i,Dd)}:Dd;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function __(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $p(t,e,n){if(!e)return t;const i=n&&n.encode||__,r=n&&n.serialize;let s;if(r?s=r(e,n):s=q.isURLSearchParams(e)?e.toString():new zl(e,n).toString(i),s){const o=t.indexOf("#");o!==-1&&(t=t.slice(0,o)),t+=(t.indexOf("?")===-1?"?":"&")+s}return t}class Pd{constructor(){this.handlers=[]}use(e,n,i){return this.handlers.push({fulfilled:e,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,function(i){i!==null&&e(i)})}}const Mp={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},w_=typeof URLSearchParams!="undefined"?URLSearchParams:zl,S_=typeof FormData!="undefined"?FormData:null,E_=typeof Blob!="undefined"?Blob:null,N_={isBrowser:!0,classes:{URLSearchParams:w_,FormData:S_,Blob:E_},protocols:["http","https","file","blob","url","data"]},Kl=typeof window!="undefined"&&typeof document!="undefined",ml=typeof navigator=="object"&&navigator||void 0,A_=Kl&&(!ml||["ReactNative","NativeScript","NS"].indexOf(ml.product)<0),O_=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",x_=Kl&&window.location.href||"http://localhost",T_=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Kl,hasStandardBrowserEnv:A_,hasStandardBrowserWebWorkerEnv:O_,navigator:ml,origin:x_},Symbol.toStringTag,{value:"Module"})),Pt={...T_,...N_};function C_(t,e){return io(t,new Pt.classes.URLSearchParams,Object.assign({visitor:function(n,i,r,s){return Pt.isNode&&q.isBuffer(n)?(this.append(i,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},e))}function R_(t){return q.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function F_(t){const e={},n=Object.keys(t);let i;const r=n.length;let s;for(i=0;i<r;i++)s=n[i],e[s]=t[s];return e}function Bp(t){function e(n,i,r,s){let o=n[s++];if(o==="__proto__")return!0;const l=Number.isFinite(+o),d=s>=n.length;return o=!o&&q.isArray(r)?r.length:o,d?(q.hasOwnProp(r,o)?r[o]=[r[o],i]:r[o]=i,!l):((!r[o]||!q.isObject(r[o]))&&(r[o]=[]),e(n,i,r[o],s)&&q.isArray(r[o])&&(r[o]=F_(r[o])),!l)}if(q.isFormData(t)&&q.isFunction(t.entries)){const n={};return q.forEachEntry(t,(i,r)=>{e(R_(i),r,n,0)}),n}return null}function I_(t,e,n){if(q.isString(t))try{return(e||JSON.parse)(t),q.trim(t)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(t)}const ps={transitional:Mp,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const i=n.getContentType()||"",r=i.indexOf("application/json")>-1,s=q.isObject(e);if(s&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return r?JSON.stringify(Bp(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e)||q.isReadableStream(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let l;if(s){if(i.indexOf("application/x-www-form-urlencoded")>-1)return C_(e,this.formSerializer).toString();if((l=q.isFileList(e))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return io(l?{"files[]":e}:e,d&&new d,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),I_(e)):e}],transformResponse:[function(e){const n=this.transitional||ps.transitional,i=n&&n.forcedJSONParsing,r=this.responseType==="json";if(q.isResponse(e)||q.isReadableStream(e))return e;if(e&&q.isString(e)&&(i&&!this.responseType||r)){const o=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(l){if(o)throw l.name==="SyntaxError"?Le.from(l,Le.ERR_BAD_RESPONSE,this,null,this.response):l}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pt.classes.FormData,Blob:Pt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};q.forEach(["delete","get","head","post","put","patch"],t=>{ps.headers[t]={}});const D_=q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),P_=t=>{const e={};let n,i,r;return t&&t.split(`
|
|
32
|
+
`).forEach(function(o){r=o.indexOf(":"),n=o.substring(0,r).trim().toLowerCase(),i=o.substring(r+1).trim(),!(!n||e[n]&&D_[n])&&(n==="set-cookie"?e[n]?e[n].push(i):e[n]=[i]:e[n]=e[n]?e[n]+", "+i:i)}),e},Ld=Symbol("internals");function Dr(t){return t&&String(t).trim().toLowerCase()}function sa(t){return t===!1||t==null?t:q.isArray(t)?t.map(sa):String(t)}function L_(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(t);)e[i[1]]=i[2];return e}const $_=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function xu(t,e,n,i,r){if(q.isFunction(i))return i.call(this,e,n);if(r&&(e=n),!!q.isString(e)){if(q.isString(i))return e.indexOf(i)!==-1;if(q.isRegExp(i))return i.test(e)}}function M_(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,i)=>n.toUpperCase()+i)}function B_(t,e){const n=q.toCamelCase(" "+e);["get","set","has"].forEach(i=>{Object.defineProperty(t,i+n,{value:function(r,s,o){return this[i].call(this,e,r,s,o)},configurable:!0})})}let Lt=class{constructor(e){e&&this.set(e)}set(e,n,i){const r=this;function s(l,d,h){const m=Dr(d);if(!m)throw new Error("header name must be a non-empty string");const y=q.findKey(r,m);(!y||r[y]===void 0||h===!0||h===void 0&&r[y]!==!1)&&(r[y||d]=sa(l))}const o=(l,d)=>q.forEach(l,(h,m)=>s(h,m,d));if(q.isPlainObject(e)||e instanceof this.constructor)o(e,n);else if(q.isString(e)&&(e=e.trim())&&!$_(e))o(P_(e),n);else if(q.isHeaders(e))for(const[l,d]of e.entries())s(d,l,i);else e!=null&&s(n,e,i);return this}get(e,n){if(e=Dr(e),e){const i=q.findKey(this,e);if(i){const r=this[i];if(!n)return r;if(n===!0)return L_(r);if(q.isFunction(n))return n.call(this,r,i);if(q.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Dr(e),e){const i=q.findKey(this,e);return!!(i&&this[i]!==void 0&&(!n||xu(this,this[i],i,n)))}return!1}delete(e,n){const i=this;let r=!1;function s(o){if(o=Dr(o),o){const l=q.findKey(i,o);l&&(!n||xu(i,i[l],l,n))&&(delete i[l],r=!0)}}return q.isArray(e)?e.forEach(s):s(e),r}clear(e){const n=Object.keys(this);let i=n.length,r=!1;for(;i--;){const s=n[i];(!e||xu(this,this[s],s,e,!0))&&(delete this[s],r=!0)}return r}normalize(e){const n=this,i={};return q.forEach(this,(r,s)=>{const o=q.findKey(i,s);if(o){n[o]=sa(r),delete n[s];return}const l=e?M_(s):String(s).trim();l!==s&&delete n[s],n[l]=sa(r),i[l]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return q.forEach(this,(i,r)=>{i!=null&&i!==!1&&(n[r]=e&&q.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
|
|
33
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const i=new this(e);return n.forEach(r=>i.set(r)),i}static accessor(e){const i=(this[Ld]=this[Ld]={accessors:{}}).accessors,r=this.prototype;function s(o){const l=Dr(o);i[l]||(B_(r,o),i[l]=!0)}return q.isArray(e)?e.forEach(s):s(e),this}};Lt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.reduceDescriptors(Lt.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(i){this[n]=i}}});q.freezeMethods(Lt);function Tu(t,e){const n=this||ps,i=e||n,r=Lt.from(i.headers);let s=i.data;return q.forEach(t,function(l){s=l.call(n,s,r.normalize(),e?e.status:void 0)}),r.normalize(),s}function Up(t){return!!(t&&t.__CANCEL__)}function fr(t,e,n){Le.call(this,t==null?"canceled":t,Le.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(fr,Le,{__CANCEL__:!0});function jp(t,e,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?t(n):e(new Le("Request failed with status code "+n.status,[Le.ERR_BAD_REQUEST,Le.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function U_(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function j_(t,e){t=t||10;const n=new Array(t),i=new Array(t);let r=0,s=0,o;return e=e!==void 0?e:1e3,function(d){const h=Date.now(),m=i[s];o||(o=h),n[r]=d,i[r]=h;let y=s,g=0;for(;y!==r;)g+=n[y++],y=y%t;if(r=(r+1)%t,r===s&&(s=(s+1)%t),h-o<e)return;const O=m&&h-m;return O?Math.round(g*1e3/O):void 0}}function V_(t,e){let n=0,i=1e3/e,r,s;const o=(h,m=Date.now())=>{n=m,r=null,s&&(clearTimeout(s),s=null),t.apply(null,h)};return[(...h)=>{const m=Date.now(),y=m-n;y>=i?o(h,m):(r=h,s||(s=setTimeout(()=>{s=null,o(r)},i-y)))},()=>r&&o(r)]}const Na=(t,e,n=3)=>{let i=0;const r=j_(50,250);return V_(s=>{const o=s.loaded,l=s.lengthComputable?s.total:void 0,d=o-i,h=r(d),m=o<=l;i=o;const y={loaded:o,total:l,progress:l?o/l:void 0,bytes:d,rate:h||void 0,estimated:h&&l&&m?(l-o)/h:void 0,event:s,lengthComputable:l!=null,[e?"download":"upload"]:!0};t(y)},n)},$d=(t,e)=>{const n=t!=null;return[i=>e[0]({lengthComputable:n,total:t,loaded:i}),e[1]]},Md=t=>(...e)=>q.asap(()=>t(...e)),H_=Pt.hasStandardBrowserEnv?function(){const e=Pt.navigator&&/(msie|trident)/i.test(Pt.navigator.userAgent),n=document.createElement("a");let i;function r(s){let o=s;return e&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return i=r(window.location.href),function(o){const l=q.isString(o)?r(o):o;return l.protocol===i.protocol&&l.host===i.host}}():function(){return function(){return!0}}(),q_=Pt.hasStandardBrowserEnv?{write(t,e,n,i,r,s){const o=[t+"="+encodeURIComponent(e)];q.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),q.isString(i)&&o.push("path="+i),q.isString(r)&&o.push("domain="+r),s===!0&&o.push("secure"),document.cookie=o.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function z_(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function K_(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Vp(t,e){return t&&!z_(e)?K_(t,e):e}const Bd=t=>t instanceof Lt?{...t}:t;function ki(t,e){e=e||{};const n={};function i(h,m,y){return q.isPlainObject(h)&&q.isPlainObject(m)?q.merge.call({caseless:y},h,m):q.isPlainObject(m)?q.merge({},m):q.isArray(m)?m.slice():m}function r(h,m,y){if(q.isUndefined(m)){if(!q.isUndefined(h))return i(void 0,h,y)}else return i(h,m,y)}function s(h,m){if(!q.isUndefined(m))return i(void 0,m)}function o(h,m){if(q.isUndefined(m)){if(!q.isUndefined(h))return i(void 0,h)}else return i(void 0,m)}function l(h,m,y){if(y in e)return i(h,m);if(y in t)return i(void 0,h)}const d={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:l,headers:(h,m)=>r(Bd(h),Bd(m),!0)};return q.forEach(Object.keys(Object.assign({},t,e)),function(m){const y=d[m]||r,g=y(t[m],e[m],m);q.isUndefined(g)&&y!==l||(n[m]=g)}),n}const Hp=t=>{const e=ki({},t);let{data:n,withXSRFToken:i,xsrfHeaderName:r,xsrfCookieName:s,headers:o,auth:l}=e;e.headers=o=Lt.from(o),e.url=$p(Vp(e.baseURL,e.url),t.params,t.paramsSerializer),l&&o.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(q.isFormData(n)){if(Pt.hasStandardBrowserEnv||Pt.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((d=o.getContentType())!==!1){const[h,...m]=d?d.split(";").map(y=>y.trim()).filter(Boolean):[];o.setContentType([h||"multipart/form-data",...m].join("; "))}}if(Pt.hasStandardBrowserEnv&&(i&&q.isFunction(i)&&(i=i(e)),i||i!==!1&&H_(e.url))){const h=r&&s&&q_.read(s);h&&o.set(r,h)}return e},G_=typeof XMLHttpRequest!="undefined",W_=G_&&function(t){return new Promise(function(n,i){const r=Hp(t);let s=r.data;const o=Lt.from(r.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:h}=r,m,y,g,O,_;function S(){O&&O(),_&&_(),r.cancelToken&&r.cancelToken.unsubscribe(m),r.signal&&r.signal.removeEventListener("abort",m)}let E=new XMLHttpRequest;E.open(r.method.toUpperCase(),r.url,!0),E.timeout=r.timeout;function R(){if(!E)return;const J=Lt.from("getAllResponseHeaders"in E&&E.getAllResponseHeaders()),X={data:!l||l==="text"||l==="json"?E.responseText:E.response,status:E.status,statusText:E.statusText,headers:J,config:t,request:E};jp(function(oe){n(oe),S()},function(oe){i(oe),S()},X),E=null}"onloadend"in E?E.onloadend=R:E.onreadystatechange=function(){!E||E.readyState!==4||E.status===0&&!(E.responseURL&&E.responseURL.indexOf("file:")===0)||setTimeout(R)},E.onabort=function(){E&&(i(new Le("Request aborted",Le.ECONNABORTED,t,E)),E=null)},E.onerror=function(){i(new Le("Network Error",Le.ERR_NETWORK,t,E)),E=null},E.ontimeout=function(){let z=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const X=r.transitional||Mp;r.timeoutErrorMessage&&(z=r.timeoutErrorMessage),i(new Le(z,X.clarifyTimeoutError?Le.ETIMEDOUT:Le.ECONNABORTED,t,E)),E=null},s===void 0&&o.setContentType(null),"setRequestHeader"in E&&q.forEach(o.toJSON(),function(z,X){E.setRequestHeader(X,z)}),q.isUndefined(r.withCredentials)||(E.withCredentials=!!r.withCredentials),l&&l!=="json"&&(E.responseType=r.responseType),h&&([g,_]=Na(h,!0),E.addEventListener("progress",g)),d&&E.upload&&([y,O]=Na(d),E.upload.addEventListener("progress",y),E.upload.addEventListener("loadend",O)),(r.cancelToken||r.signal)&&(m=J=>{E&&(i(!J||J.type?new fr(null,t,E):J),E.abort(),E=null)},r.cancelToken&&r.cancelToken.subscribe(m),r.signal&&(r.signal.aborted?m():r.signal.addEventListener("abort",m)));const j=U_(r.url);if(j&&Pt.protocols.indexOf(j)===-1){i(new Le("Unsupported protocol "+j+":",Le.ERR_BAD_REQUEST,t));return}E.send(s||null)})},J_=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let i=new AbortController,r;const s=function(h){if(!r){r=!0,l();const m=h instanceof Error?h:this.reason;i.abort(m instanceof Le?m:new fr(m instanceof Error?m.message:m))}};let o=e&&setTimeout(()=>{o=null,s(new Le(`timeout ${e} of ms exceeded`,Le.ETIMEDOUT))},e);const l=()=>{t&&(o&&clearTimeout(o),o=null,t.forEach(h=>{h.unsubscribe?h.unsubscribe(s):h.removeEventListener("abort",s)}),t=null)};t.forEach(h=>h.addEventListener("abort",s));const{signal:d}=i;return d.unsubscribe=()=>q.asap(l),d}},Y_=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let i=0,r;for(;i<n;)r=i+e,yield t.slice(i,r),i=r},X_=async function*(t,e){for await(const n of Q_(t))yield*Y_(n,e)},Q_=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:i}=await e.read();if(n)break;yield i}}finally{await e.cancel()}},Ud=(t,e,n,i)=>{const r=X_(t,e);let s=0,o,l=d=>{o||(o=!0,i&&i(d))};return new ReadableStream({async pull(d){try{const{done:h,value:m}=await r.next();if(h){l(),d.close();return}let y=m.byteLength;if(n){let g=s+=y;n(g)}d.enqueue(new Uint8Array(m))}catch(h){throw l(h),h}},cancel(d){return l(d),r.return()}},{highWaterMark:2})},ro=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",qp=ro&&typeof ReadableStream=="function",Z_=ro&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),zp=(t,...e)=>{try{return!!t(...e)}catch{return!1}},ew=qp&&zp(()=>{let t=!1;const e=new Request(Pt.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),jd=64*1024,gl=qp&&zp(()=>q.isReadableStream(new Response("").body)),Aa={stream:gl&&(t=>t.body)};ro&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Aa[e]&&(Aa[e]=q.isFunction(t[e])?n=>n[e]():(n,i)=>{throw new Le(`Response type '${e}' is not supported`,Le.ERR_NOT_SUPPORT,i)})})})(new Response);const tw=async t=>{if(t==null)return 0;if(q.isBlob(t))return t.size;if(q.isSpecCompliantForm(t))return(await new Request(Pt.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(q.isArrayBufferView(t)||q.isArrayBuffer(t))return t.byteLength;if(q.isURLSearchParams(t)&&(t=t+""),q.isString(t))return(await Z_(t)).byteLength},nw=async(t,e)=>{const n=q.toFiniteNumber(t.getContentLength());return n==null?tw(e):n},iw=ro&&(async t=>{let{url:e,method:n,data:i,signal:r,cancelToken:s,timeout:o,onDownloadProgress:l,onUploadProgress:d,responseType:h,headers:m,withCredentials:y="same-origin",fetchOptions:g}=Hp(t);h=h?(h+"").toLowerCase():"text";let O=J_([r,s&&s.toAbortSignal()],o),_;const S=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let E;try{if(d&&ew&&n!=="get"&&n!=="head"&&(E=await nw(m,i))!==0){let X=new Request(e,{method:"POST",body:i,duplex:"half"}),ne;if(q.isFormData(i)&&(ne=X.headers.get("content-type"))&&m.setContentType(ne),X.body){const[oe,Se]=$d(E,Na(Md(d)));i=Ud(X.body,jd,oe,Se)}}q.isString(y)||(y=y?"include":"omit");const R="credentials"in Request.prototype;_=new Request(e,{...g,signal:O,method:n.toUpperCase(),headers:m.normalize().toJSON(),body:i,duplex:"half",credentials:R?y:void 0});let j=await fetch(_);const J=gl&&(h==="stream"||h==="response");if(gl&&(l||J&&S)){const X={};["status","statusText","headers"].forEach(ve=>{X[ve]=j[ve]});const ne=q.toFiniteNumber(j.headers.get("content-length")),[oe,Se]=l&&$d(ne,Na(Md(l),!0))||[];j=new Response(Ud(j.body,jd,oe,()=>{Se&&Se(),S&&S()}),X)}h=h||"text";let z=await Aa[q.findKey(Aa,h)||"text"](j,t);return!J&&S&&S(),await new Promise((X,ne)=>{jp(X,ne,{data:z,headers:Lt.from(j.headers),status:j.status,statusText:j.statusText,config:t,request:_})})}catch(R){throw S&&S(),R&&R.name==="TypeError"&&/fetch/i.test(R.message)?Object.assign(new Le("Network Error",Le.ERR_NETWORK,t,_),{cause:R.cause||R}):Le.from(R,R&&R.code,t,_)}}),vl={http:y_,xhr:W_,fetch:iw};q.forEach(vl,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Vd=t=>`- ${t}`,rw=t=>q.isFunction(t)||t===null||t===!1,Kp={getAdapter:t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let n,i;const r={};for(let s=0;s<e;s++){n=t[s];let o;if(i=n,!rw(n)&&(i=vl[(o=String(n)).toLowerCase()],i===void 0))throw new Le(`Unknown adapter '${o}'`);if(i)break;r[o||"#"+s]=i}if(!i){const s=Object.entries(r).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let o=e?s.length>1?`since :
|
|
34
|
+
`+s.map(Vd).join(`
|
|
35
|
+
`):" "+Vd(s[0]):"as no adapter specified";throw new Le("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i},adapters:vl};function Cu(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new fr(null,t)}function Hd(t){return Cu(t),t.headers=Lt.from(t.headers),t.data=Tu.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Kp.getAdapter(t.adapter||ps.adapter)(t).then(function(i){return Cu(t),i.data=Tu.call(t,t.transformResponse,i),i.headers=Lt.from(i.headers),i},function(i){return Up(i)||(Cu(t),i&&i.response&&(i.response.data=Tu.call(t,t.transformResponse,i.response),i.response.headers=Lt.from(i.response.headers))),Promise.reject(i)})}const Gp="1.7.7",Gl={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Gl[t]=function(i){return typeof i===t||"a"+(e<1?"n ":" ")+t}});const qd={};Gl.transitional=function(e,n,i){function r(s,o){return"[Axios v"+Gp+"] Transitional option '"+s+"'"+o+(i?". "+i:"")}return(s,o,l)=>{if(e===!1)throw new Le(r(o," has been removed"+(n?" in "+n:"")),Le.ERR_DEPRECATED);return n&&!qd[o]&&(qd[o]=!0,console.warn(r(o," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(s,o,l):!0}};function sw(t,e,n){if(typeof t!="object")throw new Le("options must be an object",Le.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let r=i.length;for(;r-- >0;){const s=i[r],o=e[s];if(o){const l=t[s],d=l===void 0||o(l,s,t);if(d!==!0)throw new Le("option "+s+" must be "+d,Le.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Le("Unknown option "+s,Le.ERR_BAD_OPTION)}}const yl={assertOptions:sw,validators:Gl},Un=yl.validators;let gi=class{constructor(e){this.defaults=e,this.interceptors={request:new Pd,response:new Pd}}async request(e,n){try{return await this._request(e,n)}catch(i){if(i instanceof Error){let r;Error.captureStackTrace?Error.captureStackTrace(r={}):r=new Error;const s=r.stack?r.stack.replace(/^.+\n/,""):"";try{i.stack?s&&!String(i.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(i.stack+=`
|
|
36
|
+
`+s):i.stack=s}catch{}}throw i}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=ki(this.defaults,n);const{transitional:i,paramsSerializer:r,headers:s}=n;i!==void 0&&yl.assertOptions(i,{silentJSONParsing:Un.transitional(Un.boolean),forcedJSONParsing:Un.transitional(Un.boolean),clarifyTimeoutError:Un.transitional(Un.boolean)},!1),r!=null&&(q.isFunction(r)?n.paramsSerializer={serialize:r}:yl.assertOptions(r,{encode:Un.function,serialize:Un.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=s&&q.merge(s.common,s[n.method]);s&&q.forEach(["delete","get","head","post","put","patch","common"],_=>{delete s[_]}),n.headers=Lt.concat(o,s);const l=[];let d=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(n)===!1||(d=d&&S.synchronous,l.unshift(S.fulfilled,S.rejected))});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let m,y=0,g;if(!d){const _=[Hd.bind(this),void 0];for(_.unshift.apply(_,l),_.push.apply(_,h),g=_.length,m=Promise.resolve(n);y<g;)m=m.then(_[y++],_[y++]);return m}g=l.length;let O=n;for(y=0;y<g;){const _=l[y++],S=l[y++];try{O=_(O)}catch(E){S.call(this,E);break}}try{m=Hd.call(this,O)}catch(_){return Promise.reject(_)}for(y=0,g=h.length;y<g;)m=m.then(h[y++],h[y++]);return m}getUri(e){e=ki(this.defaults,e);const n=Vp(e.baseURL,e.url);return $p(n,e.params,e.paramsSerializer)}};q.forEach(["delete","get","head","options"],function(e){gi.prototype[e]=function(n,i){return this.request(ki(i||{},{method:e,url:n,data:(i||{}).data}))}});q.forEach(["post","put","patch"],function(e){function n(i){return function(s,o,l){return this.request(ki(l||{},{method:e,headers:i?{"Content-Type":"multipart/form-data"}:{},url:s,data:o}))}}gi.prototype[e]=n(),gi.prototype[e+"Form"]=n(!0)});let aw=class Wp{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const i=this;this.promise.then(r=>{if(!i._listeners)return;let s=i._listeners.length;for(;s-- >0;)i._listeners[s](r);i._listeners=null}),this.promise.then=r=>{let s;const o=new Promise(l=>{i.subscribe(l),s=l}).then(r);return o.cancel=function(){i.unsubscribe(s)},o},e(function(s,o,l){i.reason||(i.reason=new fr(s,o,l),n(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=i=>{e.abort(i)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new Wp(function(r){e=r}),cancel:e}}};function ow(t){return function(n){return t.apply(null,n)}}function uw(t){return q.isObject(t)&&t.isAxiosError===!0}const bl={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(bl).forEach(([t,e])=>{bl[e]=t});function Jp(t){const e=new gi(t),n=Np(gi.prototype.request,e);return q.extend(n,gi.prototype,e,{allOwnKeys:!0}),q.extend(n,e,null,{allOwnKeys:!0}),n.create=function(r){return Jp(ki(t,r))},n}const at=Jp(ps);at.Axios=gi;at.CanceledError=fr;at.CancelToken=aw;at.isCancel=Up;at.VERSION=Gp;at.toFormData=io;at.AxiosError=Le;at.Cancel=at.CanceledError;at.all=function(e){return Promise.all(e)};at.spread=ow;at.isAxiosError=uw;at.mergeConfig=ki;at.AxiosHeaders=Lt;at.formToJSON=t=>Bp(q.isHTMLForm(t)?new FormData(t):t);at.getAdapter=Kp.getAdapter;at.HttpStatusCode=bl;at.default=at;const{Axios:xN,AxiosError:TN,CanceledError:CN,isCancel:RN,CancelToken:FN,VERSION:IN,all:DN,Cancel:PN,isAxiosError:LN,spread:$N,toFormData:MN,AxiosHeaders:BN,HttpStatusCode:UN,formToJSON:jN,getAdapter:VN,mergeConfig:HN}=at,lw={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 Oa{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||lw,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 Oa(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Oa(this.logger,e)}}var hn=new Oa;class so{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(o=>{let[l,d]=o;for(let h=0;h<d;h++)l(...i)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[l,d]=o;for(let h=0;h<d;h++)l.apply(l,[e,...i])})}}const Pr=()=>{let t,e;const n=new Promise((i,r)=>{t=i,e=r});return n.resolve=t,n.reject=e,n},zd=t=>t==null?"":""+t,cw=(t,e,n)=>{t.forEach(i=>{e[i]&&(n[i]=e[i])})},dw=/###/g,Kd=t=>t&&t.indexOf("###")>-1?t.replace(dw,"."):t,Gd=t=>!t||typeof t=="string",Kr=(t,e,n)=>{const i=typeof e!="string"?e:e.split(".");let r=0;for(;r<i.length-1;){if(Gd(t))return{};const s=Kd(i[r]);!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={},++r}return Gd(t)?{}:{obj:t,k:Kd(i[r])}},Wd=(t,e,n)=>{const{obj:i,k:r}=Kr(t,e,Object);if(i!==void 0||e.length===1){i[r]=n;return}let s=e[e.length-1],o=e.slice(0,e.length-1),l=Kr(t,o,Object);for(;l.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),l=Kr(t,o,Object),l&&l.obj&&typeof l.obj[`${l.k}.${s}`]!="undefined"&&(l.obj=void 0);l.obj[`${l.k}.${s}`]=n},fw=(t,e,n,i)=>{const{obj:r,k:s}=Kr(t,e,Object);r[s]=r[s]||[],r[s].push(n)},xa=(t,e)=>{const{obj:n,k:i}=Kr(t,e);if(n)return n[i]},hw=(t,e,n)=>{const i=xa(t,n);return i!==void 0?i:xa(e,n)},Yp=(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]):Yp(t[i],e[i],n):t[i]=e[i]);return t},Ui=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var pw={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const mw=t=>typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>pw[e]):t;class gw{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 vw=[" ",",","?","!",";"],yw=new gw(20),bw=(t,e,n)=>{e=e||"",n=n||"";const i=vw.filter(o=>e.indexOf(o)<0&&n.indexOf(o)<0);if(i.length===0)return!0;const r=yw.getRegExp(`(${i.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!r.test(t);if(!s){const o=t.indexOf(n);o>0&&!r.test(t.substring(0,o))&&(s=!0)}return s},kl=function(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 s=0;s<i.length;){if(!r||typeof r!="object")return;let o,l="";for(let d=s;d<i.length;++d)if(d!==s&&(l+=n),l+=i[d],o=r[l],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&d<i.length-1)continue;s+=d-s+1;break}r=o}return r},Ta=t=>t&&t.indexOf("_")>0?t.replace("_","-"):t;class Jd extends so{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 s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,o=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;e.indexOf(".")>-1?l=e.split("."):(l=[e,n],i&&(Array.isArray(i)?l.push(...i):typeof i=="string"&&s?l.push(...i.split(s)):l.push(i)));const d=xa(this.data,l);return!d&&!n&&!i&&e.indexOf(".")>-1&&(e=l[0],n=l[1],i=l.slice(2).join(".")),d||!o||typeof i!="string"?d:kl(this.data&&this.data[e]&&this.data[e][n],i,s)}addResource(e,n,i,r){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=[e,n];i&&(l=l.concat(o?i.split(o):i)),e.indexOf(".")>-1&&(l=e.split("."),r=n,n=l[1]),this.addNamespaces(n),Wd(this.data,l,r),s.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 s in i)(typeof i[s]=="string"||Array.isArray(i[s]))&&this.addResource(e,n,s,i[s],{silent:!0});r.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,r,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},l=[e,n];e.indexOf(".")>-1&&(l=e.split("."),r=i,i=n,n=l[1]),this.addNamespaces(n);let d=xa(this.data,l)||{};o.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?Yp(d,i,s):d={...d,...i},Wd(this.data,l,d),o.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 Xp={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,r){return t.forEach(s=>{this.processors[s]&&(e=this.processors[s].process(e,n,i,r))}),e}};const Yd={};class Ca extends so{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),cw(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=hn.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 s=n.ns||this.options.defaultNS||[];const o=i&&e.indexOf(i)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!bw(e,i,r);if(o&&!l){const d=e.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:e,namespaces:s};const h=e.split(i);(i!==r||i===r&&this.options.ns.indexOf(h[0])>-1)&&(s=h.shift()),e=h.join(r)}return typeof s=="string"&&(s=[s]),{key:e,namespaces:s}}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,s=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],n),d=l[l.length-1],h=n.lng||this.language,m=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(m){const z=n.nsSeparator||this.options.nsSeparator;return r?{res:`${d}${z}${o}`,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:`${d}${z}${o}`}return r?{res:o,usedKey:o,exactUsedKey:o,usedLng:h,usedNS:d,usedParams:this.getUsedParamsDetails(n)}:o}const y=this.resolve(e,n);let g=y&&y.res;const O=y&&y.usedKey||o,_=y&&y.exactUsedKey||o,S=Object.prototype.toString.apply(g),E=["[object Number]","[object Function]","[object RegExp]"],R=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,j=!this.i18nFormat||this.i18nFormat.handleAsObject;if(j&&g&&(typeof g!="string"&&typeof g!="boolean"&&typeof g!="number")&&E.indexOf(S)<0&&!(typeof R=="string"&&Array.isArray(g))){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(O,g,{...n,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return r?(y.res=z,y.usedParams=this.getUsedParamsDetails(n),y):z}if(s){const z=Array.isArray(g),X=z?[]:{},ne=z?_:O;for(const oe in g)if(Object.prototype.hasOwnProperty.call(g,oe)){const Se=`${ne}${s}${oe}`;X[oe]=this.translate(Se,{...n,joinArrays:!1,ns:l}),X[oe]===Se&&(X[oe]=g[oe])}g=X}}else if(j&&typeof R=="string"&&Array.isArray(g))g=g.join(R),g&&(g=this.extendTranslation(g,e,n,i));else{let z=!1,X=!1;const ne=n.count!==void 0&&typeof n.count!="string",oe=Ca.hasDefaultValue(n),Se=ne?this.pluralResolver.getSuffix(h,n.count,n):"",ve=n.ordinal&&ne?this.pluralResolver.getSuffix(h,n.count,{ordinal:!1}):"",ze=ne&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),Ne=ze&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${Se}`]||n[`defaultValue${ve}`]||n.defaultValue;!this.isValidLookup(g)&&oe&&(z=!0,g=Ne),this.isValidLookup(g)||(X=!0,g=o);const Ve=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&X?void 0:g,M=oe&&Ne!==g&&this.options.updateMissing;if(X||z||M){if(this.logger.log(M?"updateKey":"missingKey",h,d,o,M?Ne:g),s){const ce=this.resolve(o,{...n,keySeparator:!1});ce&&ce.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 N=[];const K=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&K&&K[0])for(let ce=0;ce<K.length;ce++)N.push(K[ce]);else this.options.saveMissingTo==="all"?N=this.languageUtils.toResolveHierarchy(n.lng||this.language):N.push(n.lng||this.language);const ie=(ce,ae,B)=>{const Fe=oe&&B!==g?B:Ve;this.options.missingKeyHandler?this.options.missingKeyHandler(ce,d,ae,Fe,M,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(ce,d,ae,Fe,M,n),this.emit("missingKey",ce,d,ae,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ne?N.forEach(ce=>{const ae=this.pluralResolver.getSuffixes(ce,n);ze&&n[`defaultValue${this.options.pluralSeparator}zero`]&&ae.indexOf(`${this.options.pluralSeparator}zero`)<0&&ae.push(`${this.options.pluralSeparator}zero`),ae.forEach(B=>{ie([ce],o+B,n[`defaultValue${B}`]||Ne)})}):ie(N,o,Ne))}g=this.extendTranslation(g,e,n,y,i),X&&g===o&&this.options.appendNamespaceToMissingKey&&(g=`${d}:${o}`),(X||z)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${d}:${o}`:o,z?g:void 0):g=this.options.parseMissingKeyHandler(g))}return r?(y.res=g,y.usedParams=this.getUsedParamsDetails(n),y):g}extendTranslation(e,n,i,r,s){var o=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 h=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let m;if(h){const g=e.match(this.interpolator.nestingRegexp);m=g&&g.length}let y=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(y={...this.options.interpolation.defaultVariables,...y}),e=this.interpolator.interpolate(e,y,i.lng||this.language||r.usedLng,i),h){const g=e.match(this.interpolator.nestingRegexp),O=g&&g.length;m<O&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&r&&r.res&&(i.lng=this.language||r.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var g=arguments.length,O=new Array(g),_=0;_<g;_++)O[_]=arguments[_];return s&&s[0]===O[0]&&!i.context?(o.logger.warn(`It seems you are nesting recursively key: ${O[0]} in key: ${n[0]}`),null):o.translate(...O,n)},i)),i.interpolation&&this.interpolator.reset()}const l=i.postProcess||this.options.postProcess,d=typeof l=="string"?[l]:l;return e!=null&&d&&d.length&&i.applyPostProcessor!==!1&&(e=Xp.handle(d,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,s,o,l;return typeof e=="string"&&(e=[e]),e.forEach(d=>{if(this.isValidLookup(i))return;const h=this.extractFromKey(d,n),m=h.key;r=m;let y=h.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const g=n.count!==void 0&&typeof n.count!="string",O=g&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),_=n.context!==void 0&&(typeof n.context=="string"||typeof n.context=="number")&&n.context!=="",S=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);y.forEach(E=>{this.isValidLookup(i)||(l=E,!Yd[`${S[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(Yd[`${S[0]}-${E}`]=!0,this.logger.warn(`key "${r}" for languages "${S.join(", ")}" won't get resolved as namespace "${l}" 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!!!")),S.forEach(R=>{if(this.isValidLookup(i))return;o=R;const j=[m];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(j,m,R,E,n);else{let z;g&&(z=this.pluralResolver.getSuffix(R,n.count,n));const X=`${this.options.pluralSeparator}zero`,ne=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(g&&(j.push(m+z),n.ordinal&&z.indexOf(ne)===0&&j.push(m+z.replace(ne,this.options.pluralSeparator)),O&&j.push(m+X)),_){const oe=`${m}${this.options.contextSeparator}${n.context}`;j.push(oe),g&&(j.push(oe+z),n.ordinal&&z.indexOf(ne)===0&&j.push(oe+z.replace(ne,this.options.pluralSeparator)),O&&j.push(oe+X))}}let J;for(;J=j.pop();)this.isValidLookup(i)||(s=J,i=this.getResource(R,E,J,n))}))})}),{res:i,usedKey:r,exactUsedKey:s,usedLng:o,usedNS:l}}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 s of n)delete r[s]}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}}const Ru=t=>t.charAt(0).toUpperCase()+t.slice(1);class Xd{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=hn.create("languageUtils")}getScriptPartFromCode(e){if(e=Ta(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=Ta(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]=Ru(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]=Ru(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=Ru(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(s=>{if(s===r)return s;if(!(s.indexOf("-")<0&&r.indexOf("-")<0)&&(s.indexOf("-")>0&&r.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===r||s.indexOf(r)===0&&r.length>1))return s})}),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]),Array.isArray(e))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=[],s=o=>{o&&(this.isSupportedCode(o)?r.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):typeof e=="string"&&s(this.formatLanguageCode(e)),i.forEach(o=>{r.indexOf(o)<0&&s(this.formatLanguageCode(o))}),r}}let kw=[{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}],_w={1:t=>+(t>1),2:t=>+(t!=1),3:t=>0,4:t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,5:t=>t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5,6:t=>t==1?0:t>=2&&t<=4?1:2,7:t=>t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2,8:t=>t==1?0:t==2?1:t!=8&&t!=11?2:3,9:t=>+(t>=2),10:t=>t==1?0:t==2?1:t<7?2:t<11?3:4,11:t=>t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3,12:t=>+(t%10!=1||t%100==11),13:t=>+(t!==0),14:t=>t==1?0:t==2?1:t==3?2:3,15:t=>t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2,16:t=>t%10==1&&t%100!=11?0:t!==0?1:2,17:t=>t==1||t%10==1&&t%100!=11?0:1,18:t=>t==0?0:t==1?1:2,19:t=>t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3,20:t=>t==1?0:t==0||t%100>0&&t%100<20?1:2,21:t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0,22:t=>t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3};const ww=["v1","v2","v3"],Sw=["v4"],Qd={zero:0,one:1,two:2,few:3,many:4,other:5},Ew=()=>{const t={};return kw.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:_w[e.fc]}})}),t};class Nw{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=hn.create("pluralResolver"),(!this.options.compatibilityJSON||Sw.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=Ew(),this.pluralRulesCache={}}addRule(e,n){this.rules[e]=n}clearCache(){this.pluralRulesCache={}}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{const i=Ta(e==="dev"?"en":e),r=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:r});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];const o=new Intl.PluralRules(i,{type:r});return this.pluralRulesCache[s]=o,o}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,s)=>Qd[r]-Qd[s]).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 s=()=>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()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?s():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!ww.includes(this.options.compatibilityJSON)}}const Zd=function(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,s=hw(t,e,n);return!s&&r&&typeof n=="string"&&(s=kl(t,n,i),s===void 0&&(s=kl(e,n,i))),s},Fu=t=>t.replace(/\$/g,"$$$$");class Aw{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hn.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{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:s,prefixEscaped:o,suffix:l,suffixEscaped:d,formatSeparator:h,unescapeSuffix:m,unescapePrefix:y,nestingPrefix:g,nestingPrefixEscaped:O,nestingSuffix:_,nestingSuffixEscaped:S,nestingOptionsSeparator:E,maxReplaces:R,alwaysFormat:j}=e.interpolation;this.escape=n!==void 0?n:mw,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=s?Ui(s):o||"{{",this.suffix=l?Ui(l):d||"}}",this.formatSeparator=h||",",this.unescapePrefix=m?"":y||"-",this.unescapeSuffix=this.unescapePrefix?"":m||"",this.nestingPrefix=g?Ui(g):O||Ui("$t("),this.nestingSuffix=_?Ui(_):S||Ui(")"),this.nestingOptionsSeparator=E||",",this.maxReplaces=R||1e3,this.alwaysFormat=j!==void 0?j:!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 s,o,l;const d=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=O=>{if(O.indexOf(this.formatSeparator)<0){const R=Zd(n,d,O,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(R,void 0,i,{...r,...n,interpolationkey:O}):R}const _=O.split(this.formatSeparator),S=_.shift().trim(),E=_.join(this.formatSeparator).trim();return this.format(Zd(n,d,S,this.options.keySeparator,this.options.ignoreJSONStructure),E,i,{...r,...n,interpolationkey:S})};this.resetRegExp();const m=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,y=r&&r.interpolation&&r.interpolation.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:O=>Fu(O)},{regex:this.regexp,safeValue:O=>this.escapeValue?Fu(this.escape(O)):Fu(O)}].forEach(O=>{for(l=0;s=O.regex.exec(e);){const _=s[1].trim();if(o=h(_),o===void 0)if(typeof m=="function"){const E=m(e,s,r);o=typeof E=="string"?E:""}else if(r&&Object.prototype.hasOwnProperty.call(r,_))o="";else if(y){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${_} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=zd(o));const S=O.safeValue(o);if(e=e.replace(s[0],S),y?(O.regex.lastIndex+=o.length,O.regex.lastIndex-=s[0].length):O.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r,s,o;const l=(d,h)=>{const m=this.nestingOptionsSeparator;if(d.indexOf(m)<0)return d;const y=d.split(new RegExp(`${m}[ ]*{`));let g=`{${y[1]}`;d=y[0],g=this.interpolate(g,o);const O=g.match(/'/g),_=g.match(/"/g);(O&&O.length%2===0&&!_||_.length%2!==0)&&(g=g.replace(/'/g,'"'));try{o=JSON.parse(g),h&&(o={...h,...o})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${d}`,S),`${d}${m}${g}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,d};for(;r=this.nestingRegexp.exec(e);){let d=[];o={...i},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let h=!1;if(r[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(r[1])){const m=r[1].split(this.formatSeparator).map(y=>y.trim());r[1]=m.shift(),d=m,h=!0}if(s=n(l.call(this,r[1].trim(),o),o),s&&r[0]===e&&typeof s!="string")return s;typeof s!="string"&&(s=zd(s)),s||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),s=""),h&&(s=d.reduce((m,y)=>this.format(m,y,i.lng,{...i,interpolationkey:r[1].trim()}),s.trim())),e=e.replace(r[0],s),this.regexp.lastIndex=0}return e}}const Ow=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(o=>{if(o){const[l,...d]=o.split(":"),h=d.join(":").trim().replace(/^'+|'+$/g,""),m=l.trim();n[m]||(n[m]=h),h==="false"&&(n[m]=!1),h==="true"&&(n[m]=!0),isNaN(h)||(n[m]=parseInt(h,10))}})}return{formatName:e,formatOptions:n}},ji=t=>{const e={};return(n,i,r)=>{let s=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(s={...s,[r.interpolationkey]:void 0});const o=i+JSON.stringify(s);let l=e[o];return l||(l=t(Ta(i),r),e[o]=l),l(n)}};class xw{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=hn.create("formatter"),this.options=e,this.formats={number:ji((n,i)=>{const r=new Intl.NumberFormat(n,{...i});return s=>r.format(s)}),currency:ji((n,i)=>{const r=new Intl.NumberFormat(n,{...i,style:"currency"});return s=>r.format(s)}),datetime:ji((n,i)=>{const r=new Intl.DateTimeFormat(n,{...i});return s=>r.format(s)}),relativetime:ji((n,i)=>{const r=new Intl.RelativeTimeFormat(n,{...i});return s=>r.format(s,i.range||"day")}),list:ji((n,i)=>{const r=new Intl.ListFormat(n,{...i});return s=>r.format(s)})},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()]=ji(n)}format(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=n.split(this.formatSeparator);if(s.length>1&&s[0].indexOf("(")>1&&s[0].indexOf(")")<0&&s.find(l=>l.indexOf(")")>-1)){const l=s.findIndex(d=>d.indexOf(")")>-1);s[0]=[s[0],...s.splice(1,l)].join(this.formatSeparator)}return s.reduce((l,d)=>{const{formatName:h,formatOptions:m}=Ow(d);if(this.formats[h]){let y=l;try{const g=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},O=g.locale||g.lng||r.locale||r.lng||i;y=this.formats[h](l,O,{...m,...r,...g})}catch(g){this.logger.warn(g)}return y}else this.logger.warn(`there was no format function for ${h}`);return l},e)}}const Tw=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class Cw extends so{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=hn.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 s={},o={},l={},d={};return e.forEach(h=>{let m=!0;n.forEach(y=>{const g=`${h}|${y}`;!i.reload&&this.store.hasResourceBundle(h,y)?this.state[g]=2:this.state[g]<0||(this.state[g]===1?o[g]===void 0&&(o[g]=!0):(this.state[g]=1,m=!1,o[g]===void 0&&(o[g]=!0),s[g]===void 0&&(s[g]=!0),d[y]===void 0&&(d[y]=!0)))}),m||(l[h]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(d)}}loaded(e,n,i){const r=e.split("|"),s=r[0],o=r[1];n&&this.emit("failedLoading",s,o,n),!n&&i&&this.store.addResourceBundle(s,o,i,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&i&&(this.state[e]=0);const l={};this.queue.forEach(d=>{fw(d.loaded,[s],o),Tw(d,e),n&&d.errors.push(n),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(h=>{l[h]||(l[h]={});const m=d.loaded[h];m.length&&m.forEach(y=>{l[h][y]===void 0&&(l[h][y]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(d=>!d.done)}read(e,n,i){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:r,wait:s,callback:o});return}this.readingCalls++;const l=(h,m)=>{if(this.readingCalls--,this.waitingReads.length>0){const y=this.waitingReads.shift();this.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(h&&m&&r<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,r+1,s*2,o)},s);return}o(h,m)},d=this.backend[i].bind(this.backend);if(d.length===2){try{const h=d(e,n);h&&typeof h.then=="function"?h.then(m=>l(null,m)).catch(l):l(null,h)}catch(h){l(h)}return}return d(e,n,l)}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 s=this.queueLoad(e,n,i,r);if(!s.toLoad.length)return s.pending.length||r(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}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],s=i[1];this.read(r,s,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${n}loading namespace ${s} for language ${r} failed`,o),!o&&l&&this.logger.log(`${n}loaded namespace ${s} for language ${r}`,l),this.loaded(e,o,l)})}saveMissing(e,n,i,r,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},l=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 d={...o,isUpdate:s},h=this.backend.create.bind(this.backend);if(h.length<6)try{let m;h.length===5?m=h(e,n,i,r,d):m=h(e,n,i,r),m&&typeof m.then=="function"?m.then(y=>l(null,y)).catch(l):l(null,m)}catch(m){l(m)}else h(e,n,i,r,l,d)}!e||!e[0]||this.store.addResource(e[0],n,i,r)}}}const ef=()=>({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:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),typeof t[1]=="string"&&(e.defaultValue=t[1]),typeof t[2]=="string"&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(i=>{e[i]=n[i]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),tf=t=>(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),Ys=()=>{},Rw=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class rs extends so{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=tf(e),this.services={},this.logger=hn,this.modules={external:[]},Rw(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const r=ef();this.options={...r,...this.options,...tf(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);const s=m=>m?typeof m=="function"?new m:m:null;if(!this.options.isClone){this.modules.logger?hn.init(s(this.modules.logger),this.options):hn.init(null,this.options);let m;this.modules.formatter?m=this.modules.formatter:typeof Intl!="undefined"&&(m=xw);const y=new Xd(this.options);this.store=new Jd(this.options.resources,this.options);const g=this.services;g.logger=hn,g.resourceStore=this.store,g.languageUtils=y,g.pluralResolver=new Nw(y,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),m&&(!this.options.interpolation.format||this.options.interpolation.format===r.interpolation.format)&&(g.formatter=s(m),g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new Aw(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new Cw(s(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",function(O){for(var _=arguments.length,S=new Array(_>1?_-1:0),E=1;E<_;E++)S[E-1]=arguments[E];e.emit(O,...S)}),this.modules.languageDetector&&(g.languageDetector=s(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=s(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new Ca(this.services,this.options),this.translator.on("*",function(O){for(var _=arguments.length,S=new Array(_>1?_-1:0),E=1;E<_;E++)S[E-1]=arguments[E];e.emit(O,...S)}),this.modules.external.forEach(O=>{O.init&&O.init(this)})}if(this.format=this.options.interpolation.format,i||(i=Ys),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const m=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);m.length>0&&m[0]!=="dev"&&(this.options.lng=m[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(m=>{this[m]=function(){return e.store[m](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(m=>{this[m]=function(){return e.store[m](...arguments),e}});const d=Pr(),h=()=>{const m=(y,g)=>{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),d.resolve(g),i(y,g)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return m(null,this.t.bind(this));this.changeLanguage(this.options.lng,m)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}loadResources(e){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ys;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 s=[],o=l=>{if(!l||l==="cimode")return;this.services.languageUtils.toResolveHierarchy(l).forEach(h=>{h!=="cimode"&&s.indexOf(h)<0&&s.push(h)})};r?o(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>o(d)),this.options.preload&&this.options.preload.forEach(l=>o(l)),this.services.backendConnector.load(s,this.options.ns,l=>{!l&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(l)})}else i(null)}reloadResources(e,n,i){const r=Pr();return typeof e=="function"&&(i=e,e=void 0),typeof n=="function"&&(i=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),i||(i=Ys),this.services.backendConnector.reload(e,n,s=>{r.resolve(),i(s)}),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"&&Xp.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=Pr();this.emit("languageChanging",e);const s=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},o=(d,h)=>{h?(s(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,r.resolve(function(){return i.t(...arguments)}),n&&n(d,function(){return i.t(...arguments)})},l=d=>{!e&&!d&&this.services.languageDetector&&(d=[]);const h=typeof d=="string"?d:this.services.languageUtils.getBestMatchFromCodes(d);h&&(this.language||s(h),this.translator.language||this.translator.changeLanguage(h),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(h)),this.loadResources(h,m=>{o(m,h)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?l(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(l):this.services.languageDetector.detect(l):l(e),r}getFixedT(e,n,i){var r=this;const s=function(o,l){let d;if(typeof l!="object"){for(var h=arguments.length,m=new Array(h>2?h-2:0),y=2;y<h;y++)m[y-2]=arguments[y];d=r.options.overloadTranslationOptionHandler([o,l].concat(m))}else d={...l};d.lng=d.lng||s.lng,d.lngs=d.lngs||s.lngs,d.ns=d.ns||s.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||i||s.keyPrefix);const g=r.options.keySeparator||".";let O;return d.keyPrefix&&Array.isArray(o)?O=o.map(_=>`${d.keyPrefix}${g}${_}`):O=d.keyPrefix?`${d.keyPrefix}${g}${o}`:o,r.t(O,d)};return typeof e=="string"?s.lng=e:s.lngs=e,s.ns=n,s.keyPrefix=i,s}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,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const o=(l,d)=>{const h=this.services.backendConnector.state[`${l}|${d}`];return h===-1||h===0||h===2};if(n.precheck){const l=n.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(i,e)&&(!r||o(s,e)))}loadNamespaces(e,n){const i=Pr();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=Pr();typeof e=="string"&&(e=[e]);const r=this.options.preload||[],s=e.filter(o=>r.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=r.concat(s),this.loadResources(o=>{i.resolve(),n&&n(o)}),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 Xd(ef());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 rs(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ys;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const r={...this.options,...e,isClone:!0},s=new rs(r);return(e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(l=>{s[l]=this[l]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i&&(s.store=new Jd(this.store.data,r),s.services.resourceStore=s.store),s.translator=new Ca(s.services,r),s.translator.on("*",function(l){for(var d=arguments.length,h=new Array(d>1?d-1:0),m=1;m<d;m++)h[m-1]=arguments[m];s.emit(l,...h)}),s.init(r,n),s.translator.options=r,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Et=rs.createInstance();Et.createInstance=rs.createInstance;Et.createInstance;Et.dir;Et.init;Et.loadResources;Et.reloadResources;Et.use;Et.changeLanguage;Et.getFixedT;const nf=Et.t;Et.exists;Et.setDefaultNamespace;Et.hasLoadedNamespace;Et.loadNamespaces;Et.loadLanguages;const Qp=t=>nf(t?`errorCodes.${t}`:"errorCodes.DEFAULT");class Fw{constructor(e){me(this,"logger");me(this,"axiosInstance");this.logger=e.logger,this.axiosInstance=at.create({baseURL:e.baseUrl,headers:e.accessToken?{Authorization:`Bearer ${e.accessToken}`}:{}})}async get(e){try{return(await this.axiosInstance.get(e)).data}catch(n){throw this.handleError(n)}}async post(e,n){var s;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.post(e,i)).data}catch(o){if(r&&at.isAxiosError(o))return(s=o.response)==null?void 0:s.data;throw this.handleError(o)}}async put(e,n){var s;const{data:i={},ignoreError:r=!1}=n;try{return(await this.axiosInstance.put(e,i)).data}catch(o){if(r&&at.isAxiosError(o))return(s=o.response)==null?void 0:s.data;throw this.handleError(o)}}async delete(e){try{return(await this.axiosInstance.delete(e)).data}catch(n){throw this.handleError(n)}}handleError(e){var r;let n=xt.GENERAL_ERROR;if(at.isAxiosError(e))if(e.response)switch(e.response.status){case 400:n=xt.BAD_REQUEST;break;case 401:n=xt.UNAUTHORIZED;break;case 403:n=xt.FORBIDDEN;break;case 404:n=xt.NOT_FOUND;break;case 409:n=xt.CONFLICT;break;case 410:n=xt.GONE;break;case 415:n=xt.UNSUPPORTED_MEDIA_TYPE;break;case 429:n=xt.TOO_MANY_REQUESTS;break;case 500:n=xt.INTERNAL_SERVER_ERROR;break;case 503:n=xt.SERVICE_UNAVAILABLE;break;default:n=xt.SERVER_ERROR}else e.request?n=xt.NETWORK_ERROR:n=xt.CONFIG_ERROR;const i=Qp(n);return this.logger.error("Error Code:",n,"Message:",i),this.logger.error("Result Data:",(r=e.response)==null?void 0:r.data),new Error(i)}}function Iw(t){return Symbol(t)}function Dw(t){return Symbol(t)}function Pw(t){return{key:t,isOptional:!0}}function Lw(t,e){return Object.entries(e).reduce((n,[i,r])=>(n[i]=t.token(r),n),{})}var Iu=new WeakMap,Zp=new Map,$w=new Map,_i;(function(t){t[t.Constant=0]="Constant",t[t.Instance=1]="Instance",t[t.Factory=2]="Factory"})(_i||(_i={}));var Tn;(function(t){t[t.Container=0]="Container",t[t.Resolution=1]="Resolution",t[t.Singleton=2]="Singleton",t[t.Transient=3]="Transient"})(Tn||(Tn={}));var Mw=class{constructor(t){this.impl=t,this.type=_i.Constant}},Bw=class{constructor(t){this.impl=t,this.type=_i.Factory}},Uw=t=>t.type===_i.Factory,ao=class{constructor(t){this.impl=t,this.type=_i.Instance}},jw=class extends ao{constructor(){super(...arguments),this.scope=Tn.Container,this.cache=new WeakMap}},Vw=class extends ao{constructor(){super(...arguments),this.scope=Tn.Resolution}},Hw=class extends ao{constructor(t){super(t),this.impl=t,this.scope=Tn.Singleton}},qw=class extends ao{constructor(){super(...arguments),this.scope=Tn.Transient}},zw=t=>t.type===_i.Instance,Kw=t=>t.scope===Tn.Container,Gw=t=>t.scope===Tn.Resolution,Ww=t=>t.scope===Tn.Singleton,em=t=>Symbol(t),Jw=t=>{const e=Symbol(t);return{__t:null,__d:t,__s:e,__o:!1,optional:{__t:null,__d:t,__s:e,__o:!0}}},jr=class{constructor(){this.parent=null,this.map=new Map}set(t,e,n=jr.notag){const i=this.map.get(e.__s);i?i.set(n,t):this.map.set(e.__s,new Map().set(n,t))}find(t,e,n){const i=this.map.get(t.__s);if(i!==void 0){if(n){const r=i.get(n);if(r)return r}if(e)for(let r=0,s=e.length;r<s;r+=1){const o=i.get(e[r]);if(o)return o}return i.get(jr.notag)}}resolve(t,e,n,i){const r=this.find(t,n,i);return r===void 0?this.parent?this.parent.resolve(t,e,n,i):null:r instanceof jr?(e.vaults.push(r),r.resolve(t,e,n,i)):r}get(t,e,n,i){const r=this.resolve(t,e,n,i);if(r)return r;for(let s=0,o=e.vaults,l=o.length;s<l;s+=1){const d=o[s].resolve(t,e,n,i);if(d)return d}return null}from(t){const e=new jr;return e.parent=this.parent,this.map.forEach((n,i)=>{e.map.set(i,t(n))}),e}clone(){return this.from(t=>new Map(t))}},tm=jr;tm.notag=em("NO_TAG");var Yw=class{constructor(t,e,n,i){this.vault=t,this.tokens=e,this.getVault=n,this.condition=i}from(t){const{tokens:e}=this;for(let n=0,i=e.length;n<i;n+=1)this.vault.set(this.getVault(t),e[n],this.condition)}},Xw=class{constructor(t,e,n,i){this.vault=t,this.impl=e,this.token=n,this.condition=i}inContainerScope(){this.set(jw)}inResolutionScope(){this.set(Vw)}inSingletonScope(){this.set(Hw)}inTransientScope(){this.set(qw)}set(t){this.vault.set(new t(this.impl),this.token,this.condition)}},Qw=class{constructor(t,e,n){this.vault=t,this.token=e,this.condition=n}toConstant(t){this.vault.set(new Mw(t),this.token,this.condition)}toFactory(t,e){this.vault.set(new Bw({creator:t,initializer:e}),this.token,this.condition)}toInstance(t){return new Xw(this.vault,t,this.token,this.condition)}},_l=class{constructor(t,e){this.vault=t,this.condition=e}static vault(t){return t.vault}bind(t){return new Qw(this.vault,t,this.condition)}use(...t){return new Yw(this.vault,t,_l.vault,this.condition)}},Zw=class extends _l{when(t){return new _l(this.vault,t)}},eS=class extends Zw{constructor(){super(new tm)}},nm=class{constructor(t=new Map,e=[]){this.instances=t,this.vaults=e}split(){return new nm(this.instances,this.vaults.slice())}},aa=class extends eS{constructor(){super(),this.snapshot=null}extend(t){return this.vault.parent=t===null?null:t.vault,this}clone(){const t=new aa;return t.vault=this.vault.clone(),t}get(t,e){return this.resolveToken(t,e)}resolveTokens(t,e,n,i){return t.map(r=>this.resolveToken(r,n,i,e.split()))}resolveToken(t,e,n,i=new nm){const r=this.vault.get(t,i,e,n);if(r)return this.resolveBinding(r,i);if(!t.__o)throw new Error(`No matching bindings found for '${t.__d}' token.`)}resolveBinding(t,e){return zw(t)?Ww(t)?this.resolveCache(t,e,()=>t.cache,n=>{t.cache=n}):Kw(t)?this.resolveCache(t,e,()=>t.cache.get(this.vault),n=>{t.cache.set(this.vault,n)}):Gw(t)?this.resolveCache(t,e,()=>e.instances.get(t),n=>{e.instances.set(t,n)}):this.createInstance(t.impl,e):Uw(t)?(...n)=>{const i=this.createInstance(t.impl.creator,e);return i instanceof Promise?i.then(r=>aa.resolveInitialization(r,n,t.impl.initializer)):aa.resolveInitialization(i,n,t.impl.initializer)}:t.impl}resolveCache(t,e,n,i){const r=n();if(r!==void 0)return r;const s=this.createInstance(t.impl,e);return i(s),s}createInstance(t,e){const n=this.getParameters(t,e),i=Iu.get(t);if(i!==void 0)return i?t(...n):new t(...n);try{const r=t(...n);return Iu.set(t,!0),r}catch{const s=new t(...n);return Iu.set(t,!1),s}}getParameters(t,e){const n=Zp.get(t);if(n)return this.resolveTokens(n,e,$w.get(t),t);if(t.length===0)return[];throw new Error(`Missing required 'injected' registration of '${t.name}'`)}static resolveInitialization(t,e,n){const i=n==null?void 0:n(t,...e);return i instanceof Promise?i.then(()=>t):t}},rf=(t,...e)=>(Zp.set(t,e),t);function Wl(t){return typeof t=="object"&&t!==null&&t.isOptional===!0}function im(t){return"useClass"in t}function rm(t){return"useValue"in t}function sm(t){return"useFactory"in t}var hi=(t=>(t.Singleton="singleton",t.Transient="transient",t.Container="container",t.Resolution="resolution",t))(hi||{});function qi(t,e){var n;return t.has(e)||t.set(e,Jw((n=e.description)!=null?n:"unknown_key")),t.get(e)}function Jl(t,e){var n;return t.has(e)||t.set(e,em((n=e.description)!=null?n:"unknown_tag")),t.get(e)}function am(t,e){return typeof e=="symbol"?Jl(t,e):e}function wl(t,e,n){return e.map(i=>{const r=Wl(i),s=r?i.key:i,o=t.get(s);if(!o)throw new Error(`DI Error: Dependency key "${String(s.description)}" required by "${String(n.description)}" not found.`);return r?o.optional:o})}function om(t,e){switch(e){case hi.Singleton:t.inSingletonScope();break;case hi.Container:t.inContainerScope();break;case hi.Resolution:t.inResolutionScope();break;case hi.Transient:default:t.inTransientScope();break}}class Yl{constructor(){me(this,"container");me(this,"keyToTokenMap",new Map);me(this,"tagToBrandiTagMap",new Map);this.container=new aa}static create(e){const n=new Yl;return n.initializeTokensAndTags(e),n.bindProviders(e),n}token(e){const n=this.keyToTokenMap.get(e);if(!n)throw new Error(`DI Error: Token for key "${String(e.description)}" not found.`);return n}initializeTokensAndTags(e){e.forEach(n=>{qi(this.keyToTokenMap,n.key),n.when&&typeof n.when=="symbol"&&Jl(this.tagToBrandiTagMap,n.when),"deps"in n&&n.deps&&n.deps.forEach(i=>{const r=Wl(i)?i.key:i;qi(this.keyToTokenMap,r)})})}bindProviders(e){e.forEach(n=>{const i=n.when?am(this.tagToBrandiTagMap,n.when):void 0,r=i?this.container.when(i):this.container;im(n)?this.bindClassProvider(r,n):rm(n)?this.bindValueProvider(r,n):sm(n)&&this.bindFactoryProvider(r,n)})}bindClassProvider(e,n){const{key:i,useClass:r,deps:s=[],scope:o=hi.Transient}=n,l=qi(this.keyToTokenMap,i),d=wl(this.keyToTokenMap,s,i);d.length>0&&rf(r,...d);const h=e.bind(l).toInstance(r);om(h,o)}bindValueProvider(e,n){const i=qi(this.keyToTokenMap,n.key);e.bind(i).toConstant(n.useValue)}bindFactoryProvider(e,n){var d;const{key:i,useFactory:r,deps:s=[],initializer:o}=n,l=qi(this.keyToTokenMap,i);if(typeof r=="function"&&((d=r.prototype)==null?void 0:d.constructor)===r&&s.length>0){const h=wl(this.keyToTokenMap,s,i);h.length>0&&rf(r,...h)}e.bind(l).toFactory(r,o)}}function um(t){const e=Object.values(t);return Object.assign({},...e)}function lm(t){return Object.entries(t).reduce((e,[n,i])=>{const r=um(i);return{...e,[n]:r}},{})}function cm(t,e){const n=lm(e);Object.entries(n).forEach(([i,r])=>{t.addResourceBundle(i,"translation",r,!0)})}const{slice:tS,forEach:nS}=[];function iS(t){return nS.call(tS.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}const sf=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,rS=(t,e,n)=>{const i=n||{};i.path=i.path||"/";const r=encodeURIComponent(e);let s=`${t}=${r}`;if(i.maxAge>0){const o=i.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(i.domain){if(!sf.test(i.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${i.domain}`}if(i.path){if(!sf.test(i.path))throw new TypeError("option path is invalid");s+=`; Path=${i.path}`}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${i.expires.toUTCString()}`}if(i.httpOnly&&(s+="; HttpOnly"),i.secure&&(s+="; Secure"),i.sameSite)switch(typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite){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},af={create(t,e,n,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+n*60*1e3)),i&&(r.domain=i),document.cookie=rS(t,encodeURIComponent(e),r)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let i=0;i<n.length;i++){let r=n[i];for(;r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(e)===0)return r.substring(e.length,r.length)}return null},remove(t){this.create(t,"",-1)}};var sS={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document!="undefined")return af.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:i,cookieDomain:r,cookieOptions:s}=e;n&&typeof document!="undefined"&&af.create(n,t,i,r,s)}},aS={name:"querystring",lookup(t){var i;let{lookupQuerystring:e}=t,n;if(typeof window!="undefined"){let{search:r}=window.location;!window.location.search&&((i=window.location.hash)==null?void 0:i.indexOf("?"))>-1&&(r=window.location.hash.substring(window.location.hash.indexOf("?")));const o=r.substring(1).split("&");for(let l=0;l<o.length;l++){const d=o[l].indexOf("=");d>0&&o[l].substring(0,d)===e&&(n=o[l].substring(d+1))}}return n}};let Lr=null;const of=()=>{if(Lr!==null)return Lr;try{Lr=window!=="undefined"&&window.localStorage!==null;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Lr=!1}return Lr};var oS={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&of())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&of()&&window.localStorage.setItem(n,t)}};let $r=null;const uf=()=>{if($r!==null)return $r;try{$r=window!=="undefined"&&window.sessionStorage!==null;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{$r=!1}return $r};var uS={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&uf())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&uf()&&window.sessionStorage.setItem(n,t)}},lS={name:"navigator",lookup(t){const e=[];if(typeof navigator!="undefined"){const{languages:n,userLanguage:i,language:r}=navigator;if(n)for(let s=0;s<n.length;s++)e.push(n[s]);i&&e.push(i),r&&e.push(r)}return e.length>0?e:void 0}},cS={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const i=e||(typeof document!="undefined"?document.documentElement:null);return i&&typeof i.getAttribute=="function"&&(n=i.getAttribute("lang")),n}},dS={name:"path",lookup(t){var r;let{lookupFromPathIndex:e}=t;if(typeof window=="undefined")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(r=n[typeof e=="number"?e:0])==null?void 0:r.replace("/",""):void 0}},fS={name:"subdomain",lookup(t){var r,s;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,i=typeof window!="undefined"&&((s=(r=window.location)==null?void 0:r.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(i)return i[n]}};function hS(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t}}class dm{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=iS(n,this.options||{},hS()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=r=>r.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(sS),this.addDetector(aS),this.addDetector(oS),this.addDetector(uS),this.addDetector(lS),this.addDetector(cS),this.addDetector(dS),this.addDetector(fS)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let n=[];return e.forEach(i=>{if(this.detectors[i]){let r=this.detectors[i].lookup(this.options);r&&typeof r=="string"&&(r=[r]),r&&(n=n.concat(r))}}),n=n.map(i=>this.options.convertDetectedLanguage(i)),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}cacheUserLanguage(e,n){n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(i=>{this.detectors[i]&&this.detectors[i].cacheUserLanguage(e,this.options)}))}}dm.type="languageDetector";function fm(t,e){t.use(e).use(dm).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,r)=>{if(i){const[s,...o]=i.split(",").map(l=>l.trim());if(s==="number")return new Intl.NumberFormat(r).format(n);if(s==="date")return new Intl.DateTimeFormat(r).format(n);if(s==="currency")return new Intl.NumberFormat(r,{style:"currency",currency:o[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})}const pS=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,mS={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},gS=t=>mS[t],vS=t=>t.replace(pS,gS);let lf={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:vS};function yS(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};lf={...lf,...t}}const bS={type:"3rdParty",init(t){yS(t.options.react)}};fm(Et,bS);const kS=t=>cm(Et,t),cf={startTime:"UNKNOWN",viewerCount:0,status:"UNKNOWN"},_S=()=>{const[t,e]=je.useState([]),[n,i]=je.useState(cf);return{realTimeStreamInfo:n,productsInCart:t,onTextMetadataCue:o=>{const{action:l,data:d,startTime:h,viewerCount:m,status:y}=JSON.parse(o==null?void 0:o.text);switch(l){case"sendivsdatarealtime":{i({startTime:h,viewerCount:m,status:y});break}case"sendaddtocart":{const{id:g,sessionId:O,productId:_,productImageUrl:S,productName:E}=d;e(R=>[...R,{id:g,sessionId:O,productId:_,productImageUrl:S,productName:E}])}break}},resetRealTimeStreamInfo:()=>{i(cf)},setProductsInCart:e}},Xl=JSON,wS=t=>t.toUpperCase(),SS=t=>{const e={};return t.forEach((n,i)=>{e[i]=n}),e},ES=(t,e,n)=>t.document?t:{document:t,variables:e,requestHeaders:n,signal:void 0},NS=(t,e,n)=>t.query?t:{query:t,variables:e,requestHeaders:n,signal:void 0},AS=(t,e)=>t.documents?t:{documents:t,requestHeaders:e,signal:void 0};function oa(t,e){if(!!!t)throw new Error(e)}function OS(t){return typeof t=="object"&&t!==null}function xS(t,e){if(!!!t)throw new Error("Unexpected invariant triggered.")}const TS=/\r\n|[\n\r]/g;function Sl(t,e){let n=0,i=1;for(const r of t.body.matchAll(TS)){if(typeof r.index=="number"||xS(!1),r.index>=e)break;n=r.index+r[0].length,i+=1}return{line:i,column:e+1-n}}function CS(t){return hm(t.source,Sl(t.source,t.start))}function hm(t,e){const n=t.locationOffset.column-1,i="".padStart(n)+t.body,r=e.line-1,s=t.locationOffset.line-1,o=e.line+s,l=e.line===1?n:0,d=e.column+l,h=`${t.name}:${o}:${d}
|
|
37
|
+
`,m=i.split(/\r\n|[\n\r]/g),y=m[r];if(y.length>120){const g=Math.floor(d/80),O=d%80,_=[];for(let S=0;S<y.length;S+=80)_.push(y.slice(S,S+80));return h+df([[`${o} |`,_[0]],..._.slice(1,g+1).map(S=>["|",S]),["|","^".padStart(O)],["|",_[g+1]]])}return h+df([[`${o-1} |`,m[r-1]],[`${o} |`,y],["|","^".padStart(d)],[`${o+1} |`,m[r+1]]])}function df(t){const e=t.filter(([i,r])=>r!==void 0),n=Math.max(...e.map(([i])=>i.length));return e.map(([i,r])=>i.padStart(n)+(r?" "+r:"")).join(`
|
|
38
|
+
`)}function RS(t){const e=t[0];return e==null||"kind"in e||"length"in e?{nodes:e,source:t[1],positions:t[2],path:t[3],originalError:t[4],extensions:t[5]}:e}class Ql extends Error{constructor(e,...n){var i,r,s;const{nodes:o,source:l,positions:d,path:h,originalError:m,extensions:y}=RS(n);super(e),this.name="GraphQLError",this.path=h!=null?h:void 0,this.originalError=m!=null?m:void 0,this.nodes=ff(Array.isArray(o)?o:o?[o]:void 0);const g=ff((i=this.nodes)===null||i===void 0?void 0:i.map(_=>_.loc).filter(_=>_!=null));this.source=l!=null?l:g==null||(r=g[0])===null||r===void 0?void 0:r.source,this.positions=d!=null?d:g==null?void 0:g.map(_=>_.start),this.locations=d&&l?d.map(_=>Sl(l,_)):g==null?void 0:g.map(_=>Sl(_.source,_.start));const O=OS(m==null?void 0:m.extensions)?m==null?void 0:m.extensions:void 0;this.extensions=(s=y!=null?y:O)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),m!=null&&m.stack?Object.defineProperty(this,"stack",{value:m.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,Ql):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let e=this.message;if(this.nodes)for(const n of this.nodes)n.loc&&(e+=`
|
|
39
39
|
|
|
40
|
-
`+
|
|
40
|
+
`+CS(n.loc));else if(this.source&&this.locations)for(const n of this.locations)e+=`
|
|
41
41
|
|
|
42
|
-
`+
|
|
42
|
+
`+hm(this.source,n);return e}toJSON(){const e={message:this.message};return this.locations!=null&&(e.locations=this.locations),this.path!=null&&(e.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(e.extensions=this.extensions),e}}function ff(t){return t===void 0||t.length===0?void 0:t}function _t(t,e,n){return new Ql(`Syntax Error: ${n}`,{source:t,positions:[e]})}class FS{constructor(e,n,i){this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=i}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class pm{constructor(e,n,i,r,s,o){this.kind=e,this.start=n,this.end=i,this.line=r,this.column=s,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const mm={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},IS=new Set(Object.keys(mm));function hf(t){const e=t==null?void 0:t.kind;return typeof e=="string"&&IS.has(e)}var Wi;(function(t){t.QUERY="query",t.MUTATION="mutation",t.SUBSCRIPTION="subscription"})(Wi||(Wi={}));var El;(function(t){t.QUERY="QUERY",t.MUTATION="MUTATION",t.SUBSCRIPTION="SUBSCRIPTION",t.FIELD="FIELD",t.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",t.FRAGMENT_SPREAD="FRAGMENT_SPREAD",t.INLINE_FRAGMENT="INLINE_FRAGMENT",t.VARIABLE_DEFINITION="VARIABLE_DEFINITION",t.SCHEMA="SCHEMA",t.SCALAR="SCALAR",t.OBJECT="OBJECT",t.FIELD_DEFINITION="FIELD_DEFINITION",t.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",t.INTERFACE="INTERFACE",t.UNION="UNION",t.ENUM="ENUM",t.ENUM_VALUE="ENUM_VALUE",t.INPUT_OBJECT="INPUT_OBJECT",t.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(El||(El={}));var xe;(function(t){t.NAME="Name",t.DOCUMENT="Document",t.OPERATION_DEFINITION="OperationDefinition",t.VARIABLE_DEFINITION="VariableDefinition",t.SELECTION_SET="SelectionSet",t.FIELD="Field",t.ARGUMENT="Argument",t.FRAGMENT_SPREAD="FragmentSpread",t.INLINE_FRAGMENT="InlineFragment",t.FRAGMENT_DEFINITION="FragmentDefinition",t.VARIABLE="Variable",t.INT="IntValue",t.FLOAT="FloatValue",t.STRING="StringValue",t.BOOLEAN="BooleanValue",t.NULL="NullValue",t.ENUM="EnumValue",t.LIST="ListValue",t.OBJECT="ObjectValue",t.OBJECT_FIELD="ObjectField",t.DIRECTIVE="Directive",t.NAMED_TYPE="NamedType",t.LIST_TYPE="ListType",t.NON_NULL_TYPE="NonNullType",t.SCHEMA_DEFINITION="SchemaDefinition",t.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",t.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",t.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",t.FIELD_DEFINITION="FieldDefinition",t.INPUT_VALUE_DEFINITION="InputValueDefinition",t.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",t.UNION_TYPE_DEFINITION="UnionTypeDefinition",t.ENUM_TYPE_DEFINITION="EnumTypeDefinition",t.ENUM_VALUE_DEFINITION="EnumValueDefinition",t.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",t.DIRECTIVE_DEFINITION="DirectiveDefinition",t.SCHEMA_EXTENSION="SchemaExtension",t.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",t.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",t.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",t.UNION_TYPE_EXTENSION="UnionTypeExtension",t.ENUM_TYPE_EXTENSION="EnumTypeExtension",t.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(xe||(xe={}));function Nl(t){return t===9||t===32}function ss(t){return t>=48&&t<=57}function gm(t){return t>=97&&t<=122||t>=65&&t<=90}function vm(t){return gm(t)||t===95}function DS(t){return gm(t)||ss(t)||t===95}function PS(t){var e;let n=Number.MAX_SAFE_INTEGER,i=null,r=-1;for(let o=0;o<t.length;++o){var s;const l=t[o],d=LS(l);d!==l.length&&(i=(s=i)!==null&&s!==void 0?s:o,r=o,o!==0&&d<n&&(n=d))}return t.map((o,l)=>l===0?o:o.slice(n)).slice((e=i)!==null&&e!==void 0?e:0,r+1)}function LS(t){let e=0;for(;e<t.length&&Nl(t.charCodeAt(e));)++e;return e}function $S(t,e){const n=t.replace(/"""/g,'\\"""'),i=n.split(/\r\n|[\n\r]/g),r=i.length===1,s=i.length>1&&i.slice(1).every(O=>O.length===0||Nl(O.charCodeAt(0))),o=n.endsWith('\\"""'),l=t.endsWith('"')&&!o,d=t.endsWith("\\"),h=l||d,m=!r||t.length>70||h||s||o;let y="";const g=r&&Nl(t.charCodeAt(0));return(m&&!g||s)&&(y+=`
|
|
43
43
|
`),y+=n,(m||h)&&(y+=`
|
|
44
|
-
`),'"""'+y+'"""'}var
|
|
45
|
-
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw
|
|
46
|
-
`));return t.line+=d.length-1,t.lineStart=r,m}if(h===92&&n.charCodeAt(
|
|
44
|
+
`),'"""'+y+'"""'}var Y;(function(t){t.SOF="<SOF>",t.EOF="<EOF>",t.BANG="!",t.DOLLAR="$",t.AMP="&",t.PAREN_L="(",t.PAREN_R=")",t.SPREAD="...",t.COLON=":",t.EQUALS="=",t.AT="@",t.BRACKET_L="[",t.BRACKET_R="]",t.BRACE_L="{",t.PIPE="|",t.BRACE_R="}",t.NAME="Name",t.INT="Int",t.FLOAT="Float",t.STRING="String",t.BLOCK_STRING="BlockString",t.COMMENT="Comment"})(Y||(Y={}));class MS{constructor(e){const n=new pm(Y.SOF,0,0,0,0);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let e=this.token;if(e.kind!==Y.EOF)do if(e.next)e=e.next;else{const n=US(this,e.end);e.next=n,n.prev=e,e=n}while(e.kind===Y.COMMENT);return e}}function BS(t){return t===Y.BANG||t===Y.DOLLAR||t===Y.AMP||t===Y.PAREN_L||t===Y.PAREN_R||t===Y.SPREAD||t===Y.COLON||t===Y.EQUALS||t===Y.AT||t===Y.BRACKET_L||t===Y.BRACKET_R||t===Y.BRACE_L||t===Y.PIPE||t===Y.BRACE_R}function hr(t){return t>=0&&t<=55295||t>=57344&&t<=1114111}function oo(t,e){return ym(t.charCodeAt(e))&&bm(t.charCodeAt(e+1))}function ym(t){return t>=55296&&t<=56319}function bm(t){return t>=56320&&t<=57343}function wi(t,e){const n=t.source.body.codePointAt(e);if(n===void 0)return Y.EOF;if(n>=32&&n<=126){const i=String.fromCodePoint(n);return i==='"'?`'"'`:`"${i}"`}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function vt(t,e,n,i,r){const s=t.line,o=1+n-t.lineStart;return new pm(e,n,i,s,o,r)}function US(t,e){const n=t.source.body,i=n.length;let r=e;for(;r<i;){const s=n.charCodeAt(r);switch(s){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++t.line,t.lineStart=r;continue;case 13:n.charCodeAt(r+1)===10?r+=2:++r,++t.line,t.lineStart=r;continue;case 35:return jS(t,r);case 33:return vt(t,Y.BANG,r,r+1);case 36:return vt(t,Y.DOLLAR,r,r+1);case 38:return vt(t,Y.AMP,r,r+1);case 40:return vt(t,Y.PAREN_L,r,r+1);case 41:return vt(t,Y.PAREN_R,r,r+1);case 46:if(n.charCodeAt(r+1)===46&&n.charCodeAt(r+2)===46)return vt(t,Y.SPREAD,r,r+3);break;case 58:return vt(t,Y.COLON,r,r+1);case 61:return vt(t,Y.EQUALS,r,r+1);case 64:return vt(t,Y.AT,r,r+1);case 91:return vt(t,Y.BRACKET_L,r,r+1);case 93:return vt(t,Y.BRACKET_R,r,r+1);case 123:return vt(t,Y.BRACE_L,r,r+1);case 124:return vt(t,Y.PIPE,r,r+1);case 125:return vt(t,Y.BRACE_R,r,r+1);case 34:return n.charCodeAt(r+1)===34&&n.charCodeAt(r+2)===34?GS(t,r):HS(t,r)}if(ss(s)||s===45)return VS(t,r,s);if(vm(s))return WS(t,r);throw _t(t.source,r,s===39?`Unexpected single quote character ('), did you mean to use a double quote (")?`:hr(s)||oo(n,r)?`Unexpected character: ${wi(t,r)}.`:`Invalid character: ${wi(t,r)}.`)}return vt(t,Y.EOF,i,i)}function jS(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const s=n.charCodeAt(r);if(s===10||s===13)break;if(hr(s))++r;else if(oo(n,r))r+=2;else break}return vt(t,Y.COMMENT,e,r,n.slice(e+1,r))}function VS(t,e,n){const i=t.source.body;let r=e,s=n,o=!1;if(s===45&&(s=i.charCodeAt(++r)),s===48){if(s=i.charCodeAt(++r),ss(s))throw _t(t.source,r,`Invalid number, unexpected digit after 0: ${wi(t,r)}.`)}else r=Du(t,r,s),s=i.charCodeAt(r);if(s===46&&(o=!0,s=i.charCodeAt(++r),r=Du(t,r,s),s=i.charCodeAt(r)),(s===69||s===101)&&(o=!0,s=i.charCodeAt(++r),(s===43||s===45)&&(s=i.charCodeAt(++r)),r=Du(t,r,s),s=i.charCodeAt(r)),s===46||vm(s))throw _t(t.source,r,`Invalid number, expected digit but got: ${wi(t,r)}.`);return vt(t,o?Y.FLOAT:Y.INT,e,r,i.slice(e,r))}function Du(t,e,n){if(!ss(n))throw _t(t.source,e,`Invalid number, expected digit but got: ${wi(t,e)}.`);const i=t.source.body;let r=e+1;for(;ss(i.charCodeAt(r));)++r;return r}function HS(t,e){const n=t.source.body,i=n.length;let r=e+1,s=r,o="";for(;r<i;){const l=n.charCodeAt(r);if(l===34)return o+=n.slice(s,r),vt(t,Y.STRING,e,r+1,o);if(l===92){o+=n.slice(s,r);const d=n.charCodeAt(r+1)===117?n.charCodeAt(r+2)===123?qS(t,r):zS(t,r):KS(t,r);o+=d.value,r+=d.size,s=r;continue}if(l===10||l===13)break;if(hr(l))++r;else if(oo(n,r))r+=2;else throw _t(t.source,r,`Invalid character within String: ${wi(t,r)}.`)}throw _t(t.source,r,"Unterminated string.")}function qS(t,e){const n=t.source.body;let i=0,r=3;for(;r<12;){const s=n.charCodeAt(e+r++);if(s===125){if(r<5||!hr(i))break;return{value:String.fromCodePoint(i),size:r}}if(i=i<<4|Vr(s),i<0)break}throw _t(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+r)}".`)}function zS(t,e){const n=t.source.body,i=pf(n,e+2);if(hr(i))return{value:String.fromCodePoint(i),size:6};if(ym(i)&&n.charCodeAt(e+6)===92&&n.charCodeAt(e+7)===117){const r=pf(n,e+8);if(bm(r))return{value:String.fromCodePoint(i,r),size:12}}throw _t(t.source,e,`Invalid Unicode escape sequence: "${n.slice(e,e+6)}".`)}function pf(t,e){return Vr(t.charCodeAt(e))<<12|Vr(t.charCodeAt(e+1))<<8|Vr(t.charCodeAt(e+2))<<4|Vr(t.charCodeAt(e+3))}function Vr(t){return t>=48&&t<=57?t-48:t>=65&&t<=70?t-55:t>=97&&t<=102?t-87:-1}function KS(t,e){const n=t.source.body;switch(n.charCodeAt(e+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:`
|
|
45
|
+
`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw _t(t.source,e,`Invalid character escape sequence: "${n.slice(e,e+2)}".`)}function GS(t,e){const n=t.source.body,i=n.length;let r=t.lineStart,s=e+3,o=s,l="";const d=[];for(;s<i;){const h=n.charCodeAt(s);if(h===34&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34){l+=n.slice(o,s),d.push(l);const m=vt(t,Y.BLOCK_STRING,e,s+3,PS(d).join(`
|
|
46
|
+
`));return t.line+=d.length-1,t.lineStart=r,m}if(h===92&&n.charCodeAt(s+1)===34&&n.charCodeAt(s+2)===34&&n.charCodeAt(s+3)===34){l+=n.slice(o,s),o=s+1,s+=4;continue}if(h===10||h===13){l+=n.slice(o,s),d.push(l),h===13&&n.charCodeAt(s+1)===10?s+=2:++s,l="",o=s,r=s;continue}if(hr(h))++s;else if(oo(n,s))s+=2;else throw _t(t.source,s,`Invalid character within String: ${wi(t,s)}.`)}throw _t(t.source,s,"Unterminated string.")}function WS(t,e){const n=t.source.body,i=n.length;let r=e+1;for(;r<i;){const s=n.charCodeAt(r);if(DS(s))++r;else break}return vt(t,Y.NAME,e,r,n.slice(e,r))}const JS=10,km=2;function Zl(t){return uo(t,[])}function uo(t,e){switch(typeof t){case"string":return JSON.stringify(t);case"function":return t.name?`[function ${t.name}]`:"[function]";case"object":return YS(t,e);default:return String(t)}}function YS(t,e){if(t===null)return"null";if(e.includes(t))return"[Circular]";const n=[...e,t];if(XS(t)){const i=t.toJSON();if(i!==t)return typeof i=="string"?i:uo(i,n)}else if(Array.isArray(t))return ZS(t,n);return QS(t,n)}function XS(t){return typeof t.toJSON=="function"}function QS(t,e){const n=Object.entries(t);return n.length===0?"{}":e.length>km?"["+eE(t)+"]":"{ "+n.map(([r,s])=>r+": "+uo(s,e)).join(", ")+" }"}function ZS(t,e){if(t.length===0)return"[]";if(e.length>km)return"[Array]";const n=Math.min(JS,t.length),i=t.length-n,r=[];for(let s=0;s<n;++s)r.push(uo(t[s],e));return i===1?r.push("... 1 more item"):i>1&&r.push(`... ${i} more items`),"["+r.join(", ")+"]"}function eE(t){const e=Object.prototype.toString.call(t).replace(/^\[object /,"").replace(/]$/,"");if(e==="Object"&&typeof t.constructor=="function"){const n=t.constructor.name;if(typeof n=="string"&&n!=="")return n}return e}const tE=globalThis.process&&!0,nE=tE?function(e,n){return e instanceof n}:function(e,n){if(e instanceof n)return!0;if(typeof e=="object"&&e!==null){var i;const r=n.prototype[Symbol.toStringTag],s=Symbol.toStringTag in e?e[Symbol.toStringTag]:(i=e.constructor)===null||i===void 0?void 0:i.name;if(r===s){const o=Zl(e);throw new Error(`Cannot use ${r} "${o}" from another module or realm.
|
|
47
47
|
|
|
48
48
|
Ensure that there is only one instance of "graphql" in the node_modules
|
|
49
49
|
directory. If different versions of "graphql" are the dependencies of other
|
|
@@ -54,70 +54,70 @@ https://yarnpkg.com/en/docs/selective-version-resolutions
|
|
|
54
54
|
Duplicate "graphql" modules cannot be used at the same time since different
|
|
55
55
|
versions may have different capabilities and behavior. The data from one
|
|
56
56
|
version used in the function from another could produce confusing and
|
|
57
|
-
spurious results.`)}}return!1};class vh{constructor(e,n="GraphQL request",i={line:1,column:1}){typeof e=="string"||oa(!1,`Body must be a string. Received: ${Eu(e)}.`),this.body=e,this.name=n,this.locationOffset=i,this.locationOffset.line>0||oa(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||oa(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function p_(t){return h_(t,vh)}function m_(t,e){return new g_(t,e).parseDocument()}class g_{constructor(e,n={}){const i=p_(e)?e:new vh(e);this._lexer=new Jk(i),this._options=n,this._tokenCounter=0}parseName(){const e=this.expectToken(W.NAME);return this.node(e,{kind:Ne.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:Ne.DOCUMENT,definitions:this.many(W.SOF,this.parseDefinition,W.EOF)})}parseDefinition(){if(this.peek(W.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===W.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw ht(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(W.BRACE_L))return this.node(e,{kind:Ne.OPERATION_DEFINITION,operation:gi.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let i;return this.peek(W.NAME)&&(i=this.parseName()),this.node(e,{kind:Ne.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(W.NAME);switch(e.value){case"query":return gi.QUERY;case"mutation":return gi.MUTATION;case"subscription":return gi.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(W.PAREN_L,this.parseVariableDefinition,W.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:Ne.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(W.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(W.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(W.DOLLAR),this.node(e,{kind:Ne.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:Ne.SELECTION_SET,selections:this.many(W.BRACE_L,this.parseSelection,W.BRACE_R)})}parseSelection(){return this.peek(W.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let i,r;return this.expectOptionalToken(W.COLON)?(i=n,r=this.parseName()):r=n,this.node(e,{kind:Ne.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(W.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(W.PAREN_L,n,W.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,i=this.parseName();return this.expectToken(W.COLON),this.node(n,{kind:Ne.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(W.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(W.NAME)?this.node(e,{kind:Ne.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:Ne.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:Ne.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:Ne.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const n=this._lexer.token;switch(n.kind){case W.BRACKET_L:return this.parseList(e);case W.BRACE_L:return this.parseObject(e);case W.INT:return this.advanceLexer(),this.node(n,{kind:Ne.INT,value:n.value});case W.FLOAT:return this.advanceLexer(),this.node(n,{kind:Ne.FLOAT,value:n.value});case W.STRING:case W.BLOCK_STRING:return this.parseStringLiteral();case W.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:Ne.BOOLEAN,value:!0});case"false":return this.node(n,{kind:Ne.BOOLEAN,value:!1});case"null":return this.node(n,{kind:Ne.NULL});default:return this.node(n,{kind:Ne.ENUM,value:n.value})}case W.DOLLAR:if(e)if(this.expectToken(W.DOLLAR),this._lexer.token.kind===W.NAME){const i=this._lexer.token.value;throw ht(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:Ne.STRING,value:e.value,block:e.kind===W.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:Ne.LIST,values:this.any(W.BRACKET_L,n,W.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:Ne.OBJECT,fields:this.any(W.BRACE_L,n,W.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,i=this.parseName();return this.expectToken(W.COLON),this.node(n,{kind:Ne.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(W.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(W.AT),this.node(n,{kind:Ne.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(W.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(W.BRACKET_R),n=this.node(e,{kind:Ne.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(W.BANG)?this.node(e,{kind:Ne.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:Ne.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(W.STRING)||this.peek(W.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),r=this.many(W.BRACE_L,this.parseOperationTypeDefinition,W.BRACE_R);return this.node(e,{kind:Ne.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(W.COLON);const i=this.parseNamedType();return this.node(e,{kind:Ne.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:Ne.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),r=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Ne.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:a,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(W.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(W.BRACE_L,this.parseFieldDefinition,W.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(W.COLON);const a=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:Ne.FIELD_DEFINITION,description:n,name:i,arguments:r,type:a,directives:o})}parseArgumentDefs(){return this.optionalMany(W.PAREN_L,this.parseInputValueDef,W.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(W.COLON);const r=this.parseTypeReference();let a;this.expectOptionalToken(W.EQUALS)&&(a=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:Ne.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:a,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),r=this.parseImplementsInterfaces(),a=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:Ne.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:a,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),r=this.parseConstDirectives(),a=this.parseUnionMemberTypes();return this.node(e,{kind:Ne.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:a})}parseUnionMemberTypes(){return this.expectOptionalToken(W.EQUALS)?this.delimitedMany(W.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),r=this.parseConstDirectives(),a=this.parseEnumValuesDefinition();return this.node(e,{kind:Ne.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:a})}parseEnumValuesDefinition(){return this.optionalMany(W.BRACE_L,this.parseEnumValueDefinition,W.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:Ne.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw ht(this._lexer.source,this._lexer.token.start,`${Qr(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const i=this.parseName(),r=this.parseConstDirectives(),a=this.parseInputFieldsDefinition();return this.node(e,{kind:Ne.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:a})}parseInputFieldsDefinition(){return this.optionalMany(W.BRACE_L,this.parseInputValueDef,W.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===W.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.optionalMany(W.BRACE_L,this.parseOperationTypeDefinition,W.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:Ne.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(e,{kind:Ne.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&a.length===0)throw this.unexpected();return this.node(e,{kind:Ne.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:a})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),a=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&a.length===0)throw this.unexpected();return this.node(e,{kind:Ne.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:a})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:Ne.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:Ne.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:Ne.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(W.AT);const i=this.parseName(),r=this.parseArgumentDefs(),a=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:Ne.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:a,locations:o})}parseDirectiveLocations(){return this.delimitedMany(W.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(tu,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new qk(e,this._lexer.lastToken,this._lexer.source)),n}peek(e){return this._lexer.token.kind===e}expectToken(e){const n=this._lexer.token;if(n.kind===e)return this.advanceLexer(),n;throw ht(this._lexer.source,n.start,`Expected ${yh(e)}, found ${Qr(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===W.NAME&&n.value===e)this.advanceLexer();else throw ht(this._lexer.source,n.start,`Expected "${e}", found ${Qr(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===W.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e!=null?e:this._lexer.token;return ht(this._lexer.source,n.start,`Unexpected ${Qr(n)}.`)}any(e,n,i){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(e,n,i){if(this.expectOptionalToken(e)){const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(e,n,i){this.expectToken(e);const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(e,n){this.expectOptionalToken(e);const i=[];do i.push(n.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(e!==void 0&&n.kind!==W.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw ht(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function Qr(t){const e=t.value;return yh(t.kind)+(e!=null?` "${e}"`:"")}function yh(t){return Yk(t)?`"${t}"`:t}function v_(t){return`"${t.replace(y_,b_)}"`}const y_=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function b_(t){return k_[t.charCodeAt(0)]}const k_=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],__=Object.freeze({});function S_(t,e,n=dh){const i=new Map;for(const F of Object.values(Ne))i.set(F,N_(e,F));let r,a=Array.isArray(t),o=[t],l=-1,d=[],h=t,m,y;const v=[],x=[];do{l++;const F=l===o.length,V=F&&d.length!==0;if(F){if(m=x.length===0?void 0:v[v.length-1],h=y,y=x.pop(),V)if(a){h=h.slice();let K=0;for(const[Y,X]of d){const ne=Y-K;X===null?(h.splice(ne,1),K++):h[ne]=X}}else{h=Object.defineProperties({},Object.getOwnPropertyDescriptors(h));for(const[K,Y]of d)h[K]=Y}l=r.index,o=r.keys,d=r.edits,a=r.inArray,r=r.prev}else if(y){if(m=a?l:o[l],h=y[m],h==null)continue;v.push(m)}let J;if(!Array.isArray(h)){var _,N;kc(h)||oa(!1,`Invalid AST Node: ${Eu(h)}.`);const K=F?(_=i.get(h.kind))===null||_===void 0?void 0:_.leave:(N=i.get(h.kind))===null||N===void 0?void 0:N.enter;if(J=K==null?void 0:K.call(e,h,m,y,v,x),J===__)break;if(J===!1){if(!F){v.pop();continue}}else if(J!==void 0&&(d.push([m,J]),!F))if(kc(J))h=J;else{v.pop();continue}}if(J===void 0&&V&&d.push([m,h]),F)v.pop();else{var E;r={inArray:a,index:l,keys:o,edits:d,prev:r},a=Array.isArray(h),o=a?h:(E=n[h.kind])!==null&&E!==void 0?E:[],l=-1,d=[],y&&x.push(y),y=h}}while(r!==void 0);return d.length!==0?d[d.length-1][1]:t}function N_(t,e){const n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function E_(t){return S_(t,A_)}const w_=80,A_={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>ve(t.definitions,`
|
|
57
|
+
spurious results.`)}}return!1};class _m{constructor(e,n="GraphQL request",i={line:1,column:1}){typeof e=="string"||oa(!1,`Body must be a string. Received: ${Zl(e)}.`),this.body=e,this.name=n,this.locationOffset=i,this.locationOffset.line>0||oa(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||oa(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function iE(t){return nE(t,_m)}function rE(t,e){return new sE(t,e).parseDocument()}class sE{constructor(e,n={}){const i=iE(e)?e:new _m(e);this._lexer=new MS(i),this._options=n,this._tokenCounter=0}parseName(){const e=this.expectToken(Y.NAME);return this.node(e,{kind:xe.NAME,value:e.value})}parseDocument(){return this.node(this._lexer.token,{kind:xe.DOCUMENT,definitions:this.many(Y.SOF,this.parseDefinition,Y.EOF)})}parseDefinition(){if(this.peek(Y.BRACE_L))return this.parseOperationDefinition();const e=this.peekDescription(),n=e?this._lexer.lookahead():this._lexer.token;if(n.kind===Y.NAME){switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw _t(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(n.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(n)}parseOperationDefinition(){const e=this._lexer.token;if(this.peek(Y.BRACE_L))return this.node(e,{kind:xe.OPERATION_DEFINITION,operation:Wi.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const n=this.parseOperationType();let i;return this.peek(Y.NAME)&&(i=this.parseName()),this.node(e,{kind:xe.OPERATION_DEFINITION,operation:n,name:i,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const e=this.expectToken(Y.NAME);switch(e.value){case"query":return Wi.QUERY;case"mutation":return Wi.MUTATION;case"subscription":return Wi.SUBSCRIPTION}throw this.unexpected(e)}parseVariableDefinitions(){return this.optionalMany(Y.PAREN_L,this.parseVariableDefinition,Y.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:xe.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Y.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Y.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const e=this._lexer.token;return this.expectToken(Y.DOLLAR),this.node(e,{kind:xe.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:xe.SELECTION_SET,selections:this.many(Y.BRACE_L,this.parseSelection,Y.BRACE_R)})}parseSelection(){return this.peek(Y.SPREAD)?this.parseFragment():this.parseField()}parseField(){const e=this._lexer.token,n=this.parseName();let i,r;return this.expectOptionalToken(Y.COLON)?(i=n,r=this.parseName()):r=n,this.node(e,{kind:xe.FIELD,alias:i,name:r,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Y.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(e){const n=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(Y.PAREN_L,n,Y.PAREN_R)}parseArgument(e=!1){const n=this._lexer.token,i=this.parseName();return this.expectToken(Y.COLON),this.node(n,{kind:xe.ARGUMENT,name:i,value:this.parseValueLiteral(e)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const e=this._lexer.token;this.expectToken(Y.SPREAD);const n=this.expectOptionalKeyword("on");return!n&&this.peek(Y.NAME)?this.node(e,{kind:xe.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:xe.INLINE_FRAGMENT,typeCondition:n?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const e=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(e,{kind:xe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:xe.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(e){const n=this._lexer.token;switch(n.kind){case Y.BRACKET_L:return this.parseList(e);case Y.BRACE_L:return this.parseObject(e);case Y.INT:return this.advanceLexer(),this.node(n,{kind:xe.INT,value:n.value});case Y.FLOAT:return this.advanceLexer(),this.node(n,{kind:xe.FLOAT,value:n.value});case Y.STRING:case Y.BLOCK_STRING:return this.parseStringLiteral();case Y.NAME:switch(this.advanceLexer(),n.value){case"true":return this.node(n,{kind:xe.BOOLEAN,value:!0});case"false":return this.node(n,{kind:xe.BOOLEAN,value:!1});case"null":return this.node(n,{kind:xe.NULL});default:return this.node(n,{kind:xe.ENUM,value:n.value})}case Y.DOLLAR:if(e)if(this.expectToken(Y.DOLLAR),this._lexer.token.kind===Y.NAME){const i=this._lexer.token.value;throw _t(this._lexer.source,n.start,`Unexpected variable "$${i}" in constant value.`)}else throw this.unexpected(n);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:xe.STRING,value:e.value,block:e.kind===Y.BLOCK_STRING})}parseList(e){const n=()=>this.parseValueLiteral(e);return this.node(this._lexer.token,{kind:xe.LIST,values:this.any(Y.BRACKET_L,n,Y.BRACKET_R)})}parseObject(e){const n=()=>this.parseObjectField(e);return this.node(this._lexer.token,{kind:xe.OBJECT,fields:this.any(Y.BRACE_L,n,Y.BRACE_R)})}parseObjectField(e){const n=this._lexer.token,i=this.parseName();return this.expectToken(Y.COLON),this.node(n,{kind:xe.OBJECT_FIELD,name:i,value:this.parseValueLiteral(e)})}parseDirectives(e){const n=[];for(;this.peek(Y.AT);)n.push(this.parseDirective(e));return n}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(e){const n=this._lexer.token;return this.expectToken(Y.AT),this.node(n,{kind:xe.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}parseTypeReference(){const e=this._lexer.token;let n;if(this.expectOptionalToken(Y.BRACKET_L)){const i=this.parseTypeReference();this.expectToken(Y.BRACKET_R),n=this.node(e,{kind:xe.LIST_TYPE,type:i})}else n=this.parseNamedType();return this.expectOptionalToken(Y.BANG)?this.node(e,{kind:xe.NON_NULL_TYPE,type:n}):n}parseNamedType(){return this.node(this._lexer.token,{kind:xe.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Y.STRING)||this.peek(Y.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("schema");const i=this.parseConstDirectives(),r=this.many(Y.BRACE_L,this.parseOperationTypeDefinition,Y.BRACE_R);return this.node(e,{kind:xe.SCHEMA_DEFINITION,description:n,directives:i,operationTypes:r})}parseOperationTypeDefinition(){const e=this._lexer.token,n=this.parseOperationType();this.expectToken(Y.COLON);const i=this.parseNamedType();return this.node(e,{kind:xe.OPERATION_TYPE_DEFINITION,operation:n,type:i})}parseScalarTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("scalar");const i=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:xe.SCALAR_TYPE_DEFINITION,description:n,name:i,directives:r})}parseObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("type");const i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:xe.OBJECT_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Y.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Y.BRACE_L,this.parseFieldDefinition,Y.BRACE_R)}parseFieldDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName(),r=this.parseArgumentDefs();this.expectToken(Y.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(e,{kind:xe.FIELD_DEFINITION,description:n,name:i,arguments:r,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(Y.PAREN_L,this.parseInputValueDef,Y.PAREN_R)}parseInputValueDef(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseName();this.expectToken(Y.COLON);const r=this.parseTypeReference();let s;this.expectOptionalToken(Y.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(e,{kind:xe.INPUT_VALUE_DEFINITION,description:n,name:i,type:r,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("interface");const i=this.parseName(),r=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(e,{kind:xe.INTERFACE_TYPE_DEFINITION,description:n,name:i,interfaces:r,directives:s,fields:o})}parseUnionTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("union");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(e,{kind:xe.UNION_TYPE_DEFINITION,description:n,name:i,directives:r,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(Y.EQUALS)?this.delimitedMany(Y.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("enum");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(e,{kind:xe.ENUM_TYPE_DEFINITION,description:n,name:i,directives:r,values:s})}parseEnumValuesDefinition(){return this.optionalMany(Y.BRACE_L,this.parseEnumValueDefinition,Y.BRACE_R)}parseEnumValueDefinition(){const e=this._lexer.token,n=this.parseDescription(),i=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:xe.ENUM_VALUE_DEFINITION,description:n,name:i,directives:r})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw _t(this._lexer.source,this._lexer.token.start,`${Xs(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("input");const i=this.parseName(),r=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(e,{kind:xe.INPUT_OBJECT_TYPE_DEFINITION,description:n,name:i,directives:r,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(Y.BRACE_L,this.parseInputValueDef,Y.BRACE_R)}parseTypeSystemExtension(){const e=this._lexer.lookahead();if(e.kind===Y.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}parseSchemaExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const n=this.parseConstDirectives(),i=this.optionalMany(Y.BRACE_L,this.parseOperationTypeDefinition,Y.BRACE_R);if(n.length===0&&i.length===0)throw this.unexpected();return this.node(e,{kind:xe.SCHEMA_EXTENSION,directives:n,operationTypes:i})}parseScalarTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const n=this.parseName(),i=this.parseConstDirectives();if(i.length===0)throw this.unexpected();return this.node(e,{kind:xe.SCALAR_TYPE_EXTENSION,name:n,directives:i})}parseObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:xe.OBJECT_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseInterfaceTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const n=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(i.length===0&&r.length===0&&s.length===0)throw this.unexpected();return this.node(e,{kind:xe.INTERFACE_TYPE_EXTENSION,name:n,interfaces:i,directives:r,fields:s})}parseUnionTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:xe.UNION_TYPE_EXTENSION,name:n,directives:i,types:r})}parseEnumTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:xe.ENUM_TYPE_EXTENSION,name:n,directives:i,values:r})}parseInputObjectTypeExtension(){const e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const n=this.parseName(),i=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(i.length===0&&r.length===0)throw this.unexpected();return this.node(e,{kind:xe.INPUT_OBJECT_TYPE_EXTENSION,name:n,directives:i,fields:r})}parseDirectiveDefinition(){const e=this._lexer.token,n=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Y.AT);const i=this.parseName(),r=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(e,{kind:xe.DIRECTIVE_DEFINITION,description:n,name:i,arguments:r,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Y.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const e=this._lexer.token,n=this.parseName();if(Object.prototype.hasOwnProperty.call(El,n.value))return n;throw this.unexpected(e)}node(e,n){return this._options.noLocation!==!0&&(n.loc=new FS(e,this._lexer.lastToken,this._lexer.source)),n}peek(e){return this._lexer.token.kind===e}expectToken(e){const n=this._lexer.token;if(n.kind===e)return this.advanceLexer(),n;throw _t(this._lexer.source,n.start,`Expected ${wm(e)}, found ${Xs(n)}.`)}expectOptionalToken(e){return this._lexer.token.kind===e?(this.advanceLexer(),!0):!1}expectKeyword(e){const n=this._lexer.token;if(n.kind===Y.NAME&&n.value===e)this.advanceLexer();else throw _t(this._lexer.source,n.start,`Expected "${e}", found ${Xs(n)}.`)}expectOptionalKeyword(e){const n=this._lexer.token;return n.kind===Y.NAME&&n.value===e?(this.advanceLexer(),!0):!1}unexpected(e){const n=e!=null?e:this._lexer.token;return _t(this._lexer.source,n.start,`Unexpected ${Xs(n)}.`)}any(e,n,i){this.expectToken(e);const r=[];for(;!this.expectOptionalToken(i);)r.push(n.call(this));return r}optionalMany(e,n,i){if(this.expectOptionalToken(e)){const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}return[]}many(e,n,i){this.expectToken(e);const r=[];do r.push(n.call(this));while(!this.expectOptionalToken(i));return r}delimitedMany(e,n){this.expectOptionalToken(e);const i=[];do i.push(n.call(this));while(this.expectOptionalToken(e));return i}advanceLexer(){const{maxTokens:e}=this._options,n=this._lexer.advance();if(e!==void 0&&n.kind!==Y.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw _t(this._lexer.source,n.start,`Document contains more that ${e} tokens. Parsing aborted.`)}}function Xs(t){const e=t.value;return wm(t.kind)+(e!=null?` "${e}"`:"")}function wm(t){return BS(t)?`"${t}"`:t}function aE(t){return`"${t.replace(oE,uE)}"`}const oE=/[\x00-\x1f\x22\x5c\x7f-\x9f]/g;function uE(t){return lE[t.charCodeAt(0)]}const lE=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000B","\\f","\\r","\\u000E","\\u000F","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001A","\\u001B","\\u001C","\\u001D","\\u001E","\\u001F","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\u007F","\\u0080","\\u0081","\\u0082","\\u0083","\\u0084","\\u0085","\\u0086","\\u0087","\\u0088","\\u0089","\\u008A","\\u008B","\\u008C","\\u008D","\\u008E","\\u008F","\\u0090","\\u0091","\\u0092","\\u0093","\\u0094","\\u0095","\\u0096","\\u0097","\\u0098","\\u0099","\\u009A","\\u009B","\\u009C","\\u009D","\\u009E","\\u009F"],cE=Object.freeze({});function dE(t,e,n=mm){const i=new Map;for(const R of Object.values(xe))i.set(R,fE(e,R));let r,s=Array.isArray(t),o=[t],l=-1,d=[],h=t,m,y;const g=[],O=[];do{l++;const R=l===o.length,j=R&&d.length!==0;if(R){if(m=O.length===0?void 0:g[g.length-1],h=y,y=O.pop(),j)if(s){h=h.slice();let z=0;for(const[X,ne]of d){const oe=X-z;ne===null?(h.splice(oe,1),z++):h[oe]=ne}}else{h=Object.defineProperties({},Object.getOwnPropertyDescriptors(h));for(const[z,X]of d)h[z]=X}l=r.index,o=r.keys,d=r.edits,s=r.inArray,r=r.prev}else if(y){if(m=s?l:o[l],h=y[m],h==null)continue;g.push(m)}let J;if(!Array.isArray(h)){var _,S;hf(h)||oa(!1,`Invalid AST Node: ${Zl(h)}.`);const z=R?(_=i.get(h.kind))===null||_===void 0?void 0:_.leave:(S=i.get(h.kind))===null||S===void 0?void 0:S.enter;if(J=z==null?void 0:z.call(e,h,m,y,g,O),J===cE)break;if(J===!1){if(!R){g.pop();continue}}else if(J!==void 0&&(d.push([m,J]),!R))if(hf(J))h=J;else{g.pop();continue}}if(J===void 0&&j&&d.push([m,h]),R)g.pop();else{var E;r={inArray:s,index:l,keys:o,edits:d,prev:r},s=Array.isArray(h),o=s?h:(E=n[h.kind])!==null&&E!==void 0?E:[],l=-1,d=[],y&&O.push(y),y=h}}while(r!==void 0);return d.length!==0?d[d.length-1][1]:t}function fE(t,e){const n=t[e];return typeof n=="object"?n:typeof n=="function"?{enter:n,leave:void 0}:{enter:t.enter,leave:t.leave}}function hE(t){return dE(t,mE)}const pE=80,mE={Name:{leave:t=>t.value},Variable:{leave:t=>"$"+t.name},Document:{leave:t=>we(t.definitions,`
|
|
58
58
|
|
|
59
|
-
`)},OperationDefinition:{leave(t){const e
|
|
60
|
-
`,ua(
|
|
59
|
+
`)},OperationDefinition:{leave(t){const e=He("(",we(t.variableDefinitions,", "),")"),n=we([t.operation,we([t.name,e]),we(t.directives," ")]," ");return(n==="query"?"":n+" ")+t.selectionSet}},VariableDefinition:{leave:({variable:t,type:e,defaultValue:n,directives:i})=>t+": "+e+He(" = ",n)+He(" ",we(i," "))},SelectionSet:{leave:({selections:t})=>Qt(t)},Field:{leave({alias:t,name:e,arguments:n,directives:i,selectionSet:r}){const s=He("",t,": ")+e;let o=s+He("(",we(n,", "),")");return o.length>pE&&(o=s+He(`(
|
|
60
|
+
`,ua(we(n,`
|
|
61
61
|
`)),`
|
|
62
|
-
)`)),
|
|
63
|
-
`)+
|
|
64
|
-
`)+
|
|
65
|
-
`)+
|
|
66
|
-
`)+e+(
|
|
67
|
-
`,ua(
|
|
62
|
+
)`)),we([o,we(i," "),r]," ")}},Argument:{leave:({name:t,value:e})=>t+": "+e},FragmentSpread:{leave:({name:t,directives:e})=>"..."+t+He(" ",we(e," "))},InlineFragment:{leave:({typeCondition:t,directives:e,selectionSet:n})=>we(["...",He("on ",t),we(e," "),n]," ")},FragmentDefinition:{leave:({name:t,typeCondition:e,variableDefinitions:n,directives:i,selectionSet:r})=>`fragment ${t}${He("(",we(n,", "),")")} on ${e} ${He("",we(i," ")," ")}`+r},IntValue:{leave:({value:t})=>t},FloatValue:{leave:({value:t})=>t},StringValue:{leave:({value:t,block:e})=>e?$S(t):aE(t)},BooleanValue:{leave:({value:t})=>t?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:t})=>t},ListValue:{leave:({values:t})=>"["+we(t,", ")+"]"},ObjectValue:{leave:({fields:t})=>"{"+we(t,", ")+"}"},ObjectField:{leave:({name:t,value:e})=>t+": "+e},Directive:{leave:({name:t,arguments:e})=>"@"+t+He("(",we(e,", "),")")},NamedType:{leave:({name:t})=>t},ListType:{leave:({type:t})=>"["+t+"]"},NonNullType:{leave:({type:t})=>t+"!"},SchemaDefinition:{leave:({description:t,directives:e,operationTypes:n})=>He("",t,`
|
|
63
|
+
`)+we(["schema",we(e," "),Qt(n)]," ")},OperationTypeDefinition:{leave:({operation:t,type:e})=>t+": "+e},ScalarTypeDefinition:{leave:({description:t,name:e,directives:n})=>He("",t,`
|
|
64
|
+
`)+we(["scalar",e,we(n," ")]," ")},ObjectTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:i,fields:r})=>He("",t,`
|
|
65
|
+
`)+we(["type",e,He("implements ",we(n," & ")),we(i," "),Qt(r)]," ")},FieldDefinition:{leave:({description:t,name:e,arguments:n,type:i,directives:r})=>He("",t,`
|
|
66
|
+
`)+e+(mf(n)?He(`(
|
|
67
|
+
`,ua(we(n,`
|
|
68
68
|
`)),`
|
|
69
|
-
)`)
|
|
70
|
-
`)+
|
|
71
|
-
`)+
|
|
72
|
-
`)+
|
|
73
|
-
`)+
|
|
74
|
-
`)+
|
|
75
|
-
`)+
|
|
76
|
-
`)+"directive @"+e+(
|
|
77
|
-
`,ua(
|
|
69
|
+
)`):He("(",we(n,", "),")"))+": "+i+He(" ",we(r," "))},InputValueDefinition:{leave:({description:t,name:e,type:n,defaultValue:i,directives:r})=>He("",t,`
|
|
70
|
+
`)+we([e+": "+n,He("= ",i),we(r," ")]," ")},InterfaceTypeDefinition:{leave:({description:t,name:e,interfaces:n,directives:i,fields:r})=>He("",t,`
|
|
71
|
+
`)+we(["interface",e,He("implements ",we(n," & ")),we(i," "),Qt(r)]," ")},UnionTypeDefinition:{leave:({description:t,name:e,directives:n,types:i})=>He("",t,`
|
|
72
|
+
`)+we(["union",e,we(n," "),He("= ",we(i," | "))]," ")},EnumTypeDefinition:{leave:({description:t,name:e,directives:n,values:i})=>He("",t,`
|
|
73
|
+
`)+we(["enum",e,we(n," "),Qt(i)]," ")},EnumValueDefinition:{leave:({description:t,name:e,directives:n})=>He("",t,`
|
|
74
|
+
`)+we([e,we(n," ")]," ")},InputObjectTypeDefinition:{leave:({description:t,name:e,directives:n,fields:i})=>He("",t,`
|
|
75
|
+
`)+we(["input",e,we(n," "),Qt(i)]," ")},DirectiveDefinition:{leave:({description:t,name:e,arguments:n,repeatable:i,locations:r})=>He("",t,`
|
|
76
|
+
`)+"directive @"+e+(mf(n)?He(`(
|
|
77
|
+
`,ua(we(n,`
|
|
78
78
|
`)),`
|
|
79
|
-
)`)
|
|
80
|
-
`,ua(
|
|
79
|
+
)`):He("(",we(n,", "),")"))+(i?" repeatable":"")+" on "+we(r," | ")},SchemaExtension:{leave:({directives:t,operationTypes:e})=>we(["extend schema",we(t," "),Qt(e)]," ")},ScalarTypeExtension:{leave:({name:t,directives:e})=>we(["extend scalar",t,we(e," ")]," ")},ObjectTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:i})=>we(["extend type",t,He("implements ",we(e," & ")),we(n," "),Qt(i)]," ")},InterfaceTypeExtension:{leave:({name:t,interfaces:e,directives:n,fields:i})=>we(["extend interface",t,He("implements ",we(e," & ")),we(n," "),Qt(i)]," ")},UnionTypeExtension:{leave:({name:t,directives:e,types:n})=>we(["extend union",t,we(e," "),He("= ",we(n," | "))]," ")},EnumTypeExtension:{leave:({name:t,directives:e,values:n})=>we(["extend enum",t,we(e," "),Qt(n)]," ")},InputObjectTypeExtension:{leave:({name:t,directives:e,fields:n})=>we(["extend input",t,we(e," "),Qt(n)]," ")}};function we(t,e=""){var n;return(n=t==null?void 0:t.filter(i=>i).join(e))!==null&&n!==void 0?n:""}function Qt(t){return He(`{
|
|
80
|
+
`,ua(we(t,`
|
|
81
81
|
`)),`
|
|
82
|
-
}`)}function
|
|
83
|
-
`))}function
|
|
84
|
-
`)))!==null&&e!==void 0?e:!1}const Nc=t=>{var i,r;let e;const n=t.definitions.filter(a=>a.kind==="OperationDefinition");return n.length===1&&(e=(r=(i=n[0])==null?void 0:i.name)==null?void 0:r.value),e},yo=t=>{if(typeof t=="string"){let n;try{const i=m_(t);n=Nc(i)}catch{}return{query:t,operationName:n}}const e=Nc(t);return{query:E_(t),operationName:e}};class Zi extends Error{constructor(e,n){const i=`${Zi.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(i),Object.setPrototypeOf(this,Zi.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Zi)}static extractMessage(e){var n,i,r;return(r=(i=(n=e.errors)==null?void 0:n[0])==null?void 0:i.message)!=null?r:`GraphQL Error (Code: ${e.status})`}}var Ji={exports:{}},O_=Ji.exports,Ec;function x_(){return Ec||(Ec=1,function(t,e){var n=typeof self!="undefined"?self:O_,i=function(){function a(){this.fetch=!1,this.DOMException=n.DOMException}return a.prototype=n,new a}();(function(a){(function(o){var l={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function d(M){return M&&DataView.prototype.isPrototypeOf(M)}if(l.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=ArrayBuffer.isView||function(M){return M&&h.indexOf(Object.prototype.toString.call(M))>-1};function y(M){if(typeof M!="string"&&(M=String(M)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(M))throw new TypeError("Invalid character in header field name");return M.toLowerCase()}function v(M){return typeof M!="string"&&(M=String(M)),M}function x(M){var w={next:function(){var z=M.shift();return{done:z===void 0,value:z}}};return l.iterable&&(w[Symbol.iterator]=function(){return w}),w}function _(M){this.map={},M instanceof _?M.forEach(function(w,z){this.append(z,w)},this):Array.isArray(M)?M.forEach(function(w){this.append(w[0],w[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(w){this.append(w,M[w])},this)}_.prototype.append=function(M,w){M=y(M),w=v(w);var z=this.map[M];this.map[M]=z?z+", "+w:w},_.prototype.delete=function(M){delete this.map[y(M)]},_.prototype.get=function(M){return M=y(M),this.has(M)?this.map[M]:null},_.prototype.has=function(M){return this.map.hasOwnProperty(y(M))},_.prototype.set=function(M,w){this.map[y(M)]=v(w)},_.prototype.forEach=function(M,w){for(var z in this.map)this.map.hasOwnProperty(z)&&M.call(w,this.map[z],z,this)},_.prototype.keys=function(){var M=[];return this.forEach(function(w,z){M.push(z)}),x(M)},_.prototype.values=function(){var M=[];return this.forEach(function(w){M.push(w)}),x(M)},_.prototype.entries=function(){var M=[];return this.forEach(function(w,z){M.push([z,w])}),x(M)},l.iterable&&(_.prototype[Symbol.iterator]=_.prototype.entries);function N(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function E(M){return new Promise(function(w,z){M.onload=function(){w(M.result)},M.onerror=function(){z(M.error)}})}function F(M){var w=new FileReader,z=E(w);return w.readAsArrayBuffer(M),z}function V(M){var w=new FileReader,z=E(w);return w.readAsText(M),z}function J(M){for(var w=new Uint8Array(M),z=new Array(w.length),Q=0;Q<w.length;Q++)z[Q]=String.fromCharCode(w[Q]);return z.join("")}function K(M){if(M.slice)return M.slice(0);var w=new Uint8Array(M.byteLength);return w.set(new Uint8Array(M)),w.buffer}function Y(){return this.bodyUsed=!1,this._initBody=function(M){this._bodyInit=M,M?typeof M=="string"?this._bodyText=M:l.blob&&Blob.prototype.isPrototypeOf(M)?this._bodyBlob=M:l.formData&&FormData.prototype.isPrototypeOf(M)?this._bodyFormData=M:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)?this._bodyText=M.toString():l.arrayBuffer&&l.blob&&d(M)?(this._bodyArrayBuffer=K(M.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(M)||m(M))?this._bodyArrayBuffer=K(M):this._bodyText=M=Object.prototype.toString.call(M):this._bodyText="",this.headers.get("content-type")||(typeof M=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var M=N(this);if(M)return M;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?N(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(F)}),this.text=function(){var M=N(this);if(M)return M;if(this._bodyBlob)return V(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(J(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(fe)}),this.json=function(){return this.text().then(JSON.parse)},this}var X=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function ne(M){var w=M.toUpperCase();return X.indexOf(w)>-1?w:M}function ye(M,w){w=w||{};var z=w.body;if(M instanceof ye){if(M.bodyUsed)throw new TypeError("Already read");this.url=M.url,this.credentials=M.credentials,w.headers||(this.headers=new _(M.headers)),this.method=M.method,this.mode=M.mode,this.signal=M.signal,!z&&M._bodyInit!=null&&(z=M._bodyInit,M.bodyUsed=!0)}else this.url=String(M);if(this.credentials=w.credentials||this.credentials||"same-origin",(w.headers||!this.headers)&&(this.headers=new _(w.headers)),this.method=ne(w.method||this.method||"GET"),this.mode=w.mode||this.mode||null,this.signal=w.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&z)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(z)}ye.prototype.clone=function(){return new ye(this,{body:this._bodyInit})};function fe(M){var w=new FormData;return M.trim().split("&").forEach(function(z){if(z){var Q=z.split("="),ae=Q.shift().replace(/\+/g," "),te=Q.join("=").replace(/\+/g," ");w.append(decodeURIComponent(ae),decodeURIComponent(te))}}),w}function je(M){var w=new _,z=M.replace(/\r?\n[\t ]+/g," ");return z.split(/\r?\n/).forEach(function(Q){var ae=Q.split(":"),te=ae.shift().trim();if(te){var j=ae.join(":").trim();w.append(te,j)}}),w}Y.call(ye.prototype);function ke(M,w){w||(w={}),this.type="default",this.status=w.status===void 0?200:w.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in w?w.statusText:"OK",this.headers=new _(w.headers),this.url=w.url||"",this._initBody(M)}Y.call(ke.prototype),ke.prototype.clone=function(){return new ke(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _(this.headers),url:this.url})},ke.error=function(){var M=new ke(null,{status:0,statusText:""});return M.type="error",M};var Ae=[301,302,303,307,308];ke.redirect=function(M,w){if(Ae.indexOf(w)===-1)throw new RangeError("Invalid status code");return new ke(null,{status:w,headers:{location:M}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(w,z){this.message=w,this.name=z;var Q=Error(w);this.stack=Q.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function Le(M,w){return new Promise(function(z,Q){var ae=new ye(M,w);if(ae.signal&&ae.signal.aborted)return Q(new o.DOMException("Aborted","AbortError"));var te=new XMLHttpRequest;function j(){te.abort()}te.onload=function(){var Oe={status:te.status,statusText:te.statusText,headers:je(te.getAllResponseHeaders()||"")};Oe.url="responseURL"in te?te.responseURL:Oe.headers.get("X-Request-URL");var Re="response"in te?te.response:te.responseText;z(new ke(Re,Oe))},te.onerror=function(){Q(new TypeError("Network request failed"))},te.ontimeout=function(){Q(new TypeError("Network request failed"))},te.onabort=function(){Q(new o.DOMException("Aborted","AbortError"))},te.open(ae.method,ae.url,!0),ae.credentials==="include"?te.withCredentials=!0:ae.credentials==="omit"&&(te.withCredentials=!1),"responseType"in te&&l.blob&&(te.responseType="blob"),ae.headers.forEach(function(Oe,Re){te.setRequestHeader(Re,Oe)}),ae.signal&&(ae.signal.addEventListener("abort",j),te.onreadystatechange=function(){te.readyState===4&&ae.signal.removeEventListener("abort",j)}),te.send(typeof ae._bodyInit=="undefined"?null:ae._bodyInit)})}return Le.polyfill=!0,a.fetch||(a.fetch=Le,a.Headers=_,a.Request=ye,a.Response=ke),o.Headers=_,o.Request=ye,o.Response=ke,o.fetch=Le,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;e=r.fetch,e.default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e}(Ji,Ji.exports)),Ji.exports}var Ta=x_();const la=za(Ta),T_=hp({__proto__:null,default:la},[Ta]),di=t=>{let e={};return t&&(typeof Headers!="undefined"&&t instanceof Headers||T_&&Ta.Headers&&t instanceof Ta.Headers?e=Ik(t):Array.isArray(t)?t.forEach(([n,i])=>{n&&i!==void 0&&(e[n]=i)}):e=t),e},wc=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),C_=t=>{if(!Array.isArray(t.query)){const i=t,r=[`query=${encodeURIComponent(wc(i.query))}`];return t.variables&&r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&r.push(`operationName=${encodeURIComponent(i.operationName)}`),r.join("&")}if(typeof t.variables!="undefined"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,n=t.query.reduce((i,r,a)=>(i.push({query:wc(r),variables:e.variables?e.jsonSerializer.stringify(e.variables[a]):void 0}),i),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},R_=t=>async e=>{var N;const{url:n,query:i,variables:r,operationName:a,fetch:o,fetchOptions:l,middleware:d}=e,h={...e.headers};let m="",y;t==="POST"?(y=D_(i,r,a,l.jsonSerializer),typeof y=="string"&&(h["Content-Type"]="application/json")):m=C_({query:i,variables:r,operationName:a,jsonSerializer:(N=l.jsonSerializer)!=null?N:Su});const v={method:t,headers:h,body:y,...l};let x=n,_=v;if(d){const E=await Promise.resolve(d({...v,url:n,operationName:a,variables:r})),{url:F,...V}=E;x=F,_=V}return m&&(x=`${x}?${m}`),await o(x,_)};class F_{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=async(...i)=>{const[r,a,o]=i,l=Lk(r,a,o),{headers:d,fetch:h=la,method:m="POST",requestMiddleware:y,responseMiddleware:v,...x}=this.requestConfig,{url:_}=this;l.signal!==void 0&&(x.signal=l.signal);const{operationName:N}=yo(l.query);return bo({url:_,query:l.query,variables:l.variables,headers:{...di(ko(d)),...di(l.requestHeaders)},operationName:N,fetch:h,method:m,fetchOptions:x,middleware:y}).then(E=>(v&&v(E),E)).catch(E=>{throw v&&v(E),E})}}async request(e,...n){const[i,r]=n,a=Pk(e,i,r),{headers:o,fetch:l=la,method:d="POST",requestMiddleware:h,responseMiddleware:m,...y}=this.requestConfig,{url:v}=this;a.signal!==void 0&&(y.signal=a.signal);const{query:x,operationName:_}=yo(a.document);return bo({url:v,query:x,variables:a.variables,headers:{...di(ko(o)),...di(a.requestHeaders)},operationName:_,fetch:l,method:d,fetchOptions:y,middleware:h}).then(N=>(m&&m(N),N.data)).catch(N=>{throw m&&m(N),N})}batchRequests(e,n){var d;const i=$k(e,n),{headers:r,...a}=this.requestConfig;i.signal!==void 0&&(a.signal=i.signal);const o=i.documents.map(({document:h})=>yo(h).query),l=i.documents.map(({variables:h})=>h);return bo({url:this.url,query:o,variables:l,headers:{...di(ko(r)),...di(i.requestHeaders)},operationName:void 0,fetch:(d=this.requestConfig.fetch)!=null?d:la,method:this.requestConfig.method||"POST",fetchOptions:a,middleware:this.requestConfig.requestMiddleware}).then(h=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h.data)).catch(h=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:i}=this.requestConfig;return i?i[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}}const bo=async t=>{var m,y;const{query:e,variables:n,fetchOptions:i}=t,r=R_(Dk((m=t.method)!=null?m:"post")),a=Array.isArray(t.query),o=await r(t),l=await I_(o,(y=i.jsonSerializer)!=null?y:Su),d=Array.isArray(l)?!l.some(({data:v})=>!v):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||i.errorPolicy==="all"||i.errorPolicy==="ignore";if(o.ok&&h&&d){const{errors:v,...x}=(Array.isArray(l),l),_=i.errorPolicy==="ignore"?x:l;return{...a?{data:_}:_,headers:o.headers,status:o.status}}else{const v=typeof l=="string"?{error:l}:l;throw new Zi({...v,status:o.status,headers:o.headers},{query:e,variables:n})}},D_=(t,e,n,i)=>{const r=i!=null?i:Su;if(!Array.isArray(t))return r.stringify({query:t,variables:e,operationName:n});if(typeof e!="undefined"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const a=t.reduce((o,l,d)=>(o.push({query:l,variables:e?e[d]:void 0}),o),[]);return r.stringify(a)},I_=async(t,e)=>{let n;return t.headers.forEach((i,r)=>{r.toLowerCase()==="content-type"&&(n=i)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},ko=t=>typeof t=="function"?t():t;class bh extends cn{constructor(){super("EVENT_CHAT_ROOM_TOKEN_ERROR","Error getting chat room connection token")}}class rs{constructor(e){de(this,"root",Tf(this));de(this,"token");this.root.setProps(e)}static toDomain(e){const n={token:e.token};return new rs(n)}toPrimitives(){const{root:e,...n}=this;return{...n}}}const P_=_i.apiUrls.graphql;class kh{constructor(){de(this,"client");this.client=new F_(P_)}async getChatRoom(e){var r;const{getChatRoomToken:n}=await this.client.request(Af,{data:{account:e.account,idEvent:e.eventId,userName:e.userName}});this.propagateGraphqlErrorIfExists(n);const i=(r=n.data)==null?void 0:r.token;if(!i)throw new bh;return rs.toDomain({token:i})}propagateGraphqlErrorIfExists(e){if(e.__typename==="ErrorGeneral")throw new Error(e.message)}}class _h{constructor(e){de(this,"account");this.eventChatRoomRepository=e}async get(e){this.validateAccount();try{return await this.eventChatRoomRepository.getChatRoom({...e,account:this.account})}catch(n){throw new su(n)}}setAccount(e){this.account=e}validateAccount(){if(!this.account)throw new Xc}}const L_=new kh,iu=new _h(L_),as=Fa(void 0);as.debugLabel="chatSocketAtom";const ss=Fa(!1);ss.debugLabel="chatIsConnectedAtom";const br=Fa([]);br.debugLabel="chatMessageListAtom";const Sh=t=>{var n;t.data=t.data.replace("replace_gif",(n=t.urlGif)!=null?n:"");const e=t.data.indexOf("::question__")>-1;if(e){const[i,r]=t.data.split("::")||["none","none"],a=r.split("question__")[1],o={response:i.replace("response__",""),question:JSON.parse(a)};return{...t,data:o.response,isResponse:e,responseData:t.data,question:e?o.question:null}}return t},Nh=t=>{const{url:e,token:n,onOpen:i,onClose:r,onMessage:a,onError:o}=t,l=new WebSocket(e,n);return l.onopen=d=>i(d),l.onclose=d=>r(d),l.onerror=d=>o(d),l.onmessage=d=>a(d),l},Eh=()=>{const t="0123456789ABCDEF";let e="#";for(let n=0;n<6;n+=1)e+=t[Math.floor(Math.random()*16)];return e},wu=(t,e)=>{var v,x;const{Content:n,Attributes:i,Sender:{Attributes:r}}=e,{username:a,type:o,email:l}=i,{isAdmin:d}=r,h=(v=i==null?void 0:i.id)!=null?v:ka(8),m=((x=t.find(_=>_.username===a))==null?void 0:x.color)||Eh(),y={id:h,type:o,color:m,username:a,email:l,data:n,sendDate:i.sendDate,isAdmin:d==="true",responseAdmin:!1,question:null,account:i.account,idEvent:i.idEvent,urlGif:i.urlGif,ip:i.ip};return Sh(y)},wh=t=>{const{eventId:e,userName:n,enabled:i=!0}=t,{accountName:r}=kf(),[a,o]=Pe.useState(""),l=()=>{i&&r&&(iu.setAccount(r),iu.get({eventId:e,userName:n}).then(d=>{o(d.token)}))};return Pe.useEffect(()=>{l()},[r,i]),{getQuery:{refetch:l},token:a}},{coreLogger:$_}=Zn(),Nt=$_.child("useConnectChatSocket"),M_=_i.publicUrls.wssIVSChat,j_=10,B_=t=>Math.min(1e4,1e3*Math.pow(2,t)),U_=(t,e,n)=>{const i=JSON.parse(t.data);switch(i.Type){case"EVENT":e==null||e(i);break;case"MESSAGE":n==null||n(i);break;case"ERROR":Nt.error("Chat room error:",i);break;default:Nt.error("Unknown chat room event:",t)}},Ah=t=>{const{onMessage:e,eventId:n,enabled:i=!0,userName:r,onEvent:a}=t,{token:o,getQuery:l}=wh({eventId:n,userName:r,enabled:i}),[d,h]=Ys(as),[m,y]=Ys(ss),[v,x]=Ys(br),_=Pe.useRef(0),N=Pe.useCallback(K=>Nt.error("Chat room socket error:",K),[]),E=Pe.useCallback(()=>{y(!0),_.current=0,Nt.debug("Successfully connected to the chat room")},[y]),F=Pe.useCallback(()=>{if(_.current>=j_){Nt.error("Max reconnection attempts reached. No further attempts will be made.");return}y(!1),_.current+=1;const K=B_(_.current);Nt.debug(`Disconnected from chat room. Reconnecting in ${K/1e3} seconds... (Attempt ${_.current})`),setTimeout(()=>l.refetch(),K)},[l,y]),V=Pe.useCallback(()=>{if(!o){Nt.debug("No token available. Connection aborted.");return}if((d==null?void 0:d.readyState)===WebSocket.OPEN){Nt.debug("WebSocket is already open. No need to reconnect.");return}Nt.debug("Connecting to the chat room...");const K=Nh({token:o,url:M_,onOpen:E,onClose:F,onError:N,onMessage:Y=>U_(Y,a,e)});h(K)},[o,d,a,e,E,F,N,h]),J=Pe.useCallback(()=>{if(!d||d.readyState!==WebSocket.OPEN){Nt.debug("No open socket to close.");return}Nt.debug("Closing chat room socket..."),d.close()},[d]);return Pe.useEffect(()=>{if(!i){Nt.debug("Chat is disabled, skipping connection.");return}if(!o){Nt.debug("Token not available, skipping connection.");return}return Nt.debug("Initializing connection with token:",o),J(),V(),J},[o,i]),{socket:d,chatIsConnected:m,chatMessageList:v,setChatMessageList:x}},V_=()=>{const t=xo(as),e=xo(ss);return{sendMessage:Pe.useCallback((i,r)=>{if(!t||!e)return;const a={id:r.id,sendDate:new Date,content:i,action:"SEND_MESSAGE",attributes:r},o=JSON.stringify(a);t.send(o)},[e,t])}},Oh=()=>{const t=au(br);return{handleEvent:i=>{var r;if(i.EventName==="senddeletemessage"){const a=JSON.parse((r=i.Attributes)==null?void 0:r.data);t(o=>o.filter(l=>l.id!==a.id))}},handleMessage:i=>{t(r=>[...r,wu(r,i)])}}},q_=t=>{const{eventId:e,userName:n}=t,[i,r]=Pe.useState(!1),[a,o]=Pe.useState(),[l,d]=Pe.useState(),[h,m]=Pe.useState([]),{handleEvent:y}=Oh(),v=au(br),x=V=>{v(J=>[wu(J,V),...J]),r(!1)},_=V=>{var J,K,Y;if(y(V),V.EventName==="sendpinmessage"){const X=JSON.parse((J=V.Attributes)==null?void 0:J.data);o({data:X.data,id:X.id,username:X.username})}if(V.EventName==="sendunpinmessage"&&o(void 0),V.EventName==="sendhighlightproduct"){const X=JSON.parse((K=V.Attributes)==null?void 0:K.data);d({products:X.productIds,collection:X.collection,livestreamingId:X.idEvent})}if(V.EventName==="sendaddtocart"){const X=JSON.parse((Y=V.Attributes)==null?void 0:Y.data);m(ne=>[...ne,{id:X.id,sessionId:X.sessionId,productId:X.productId,productImageUrl:X.productImageUrl,productName:X.productName}])}},{socket:N,chatMessageList:E,setChatMessageList:F}=Ah({onMessage:x,onEvent:_,eventId:e,userName:n});return{socket:N,chat:E,showLoader:i,pinnedMessage:a,highlightProduct:l,productsInCart:h,setChat:F,setShowLoader:r,setPinnedMessage:o,setProductsInCart:m}};/**
|
|
82
|
+
}`)}function He(t,e,n=""){return e!=null&&e!==""?t+e+n:""}function ua(t){return He(" ",t.replace(/\n/g,`
|
|
83
|
+
`))}function mf(t){var e;return(e=t==null?void 0:t.some(n=>n.includes(`
|
|
84
|
+
`)))!==null&&e!==void 0?e:!1}const gf=t=>{var i,r;let e;const n=t.definitions.filter(s=>s.kind==="OperationDefinition");return n.length===1&&(e=(r=(i=n[0])==null?void 0:i.name)==null?void 0:r.value),e},Pu=t=>{if(typeof t=="string"){let n;try{const i=rE(t);n=gf(i)}catch{}return{query:t,operationName:n}}const e=gf(t);return{query:hE(t),operationName:e}};class Gr extends Error{constructor(e,n){const i=`${Gr.extractMessage(e)}: ${JSON.stringify({response:e,request:n})}`;super(i),Object.setPrototypeOf(this,Gr.prototype),this.response=e,this.request=n,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Gr)}static extractMessage(e){var n,i,r;return(r=(i=(n=e.errors)==null?void 0:n[0])==null?void 0:i.message)!=null?r:`GraphQL Error (Code: ${e.status})`}}var Hr={exports:{}},gE=Hr.exports,vf;function vE(){return vf||(vf=1,function(t,e){var n=typeof self!="undefined"?self:gE,i=function(){function s(){this.fetch=!1,this.DOMException=n.DOMException}return s.prototype=n,new s}();(function(s){(function(o){var l={searchParams:"URLSearchParams"in s,iterable:"Symbol"in s&&"iterator"in Symbol,blob:"FileReader"in s&&"Blob"in s&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in s,arrayBuffer:"ArrayBuffer"in s};function d(M){return M&&DataView.prototype.isPrototypeOf(M)}if(l.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],m=ArrayBuffer.isView||function(M){return M&&h.indexOf(Object.prototype.toString.call(M))>-1};function y(M){if(typeof M!="string"&&(M=String(M)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(M))throw new TypeError("Invalid character in header field name");return M.toLowerCase()}function g(M){return typeof M!="string"&&(M=String(M)),M}function O(M){var N={next:function(){var K=M.shift();return{done:K===void 0,value:K}}};return l.iterable&&(N[Symbol.iterator]=function(){return N}),N}function _(M){this.map={},M instanceof _?M.forEach(function(N,K){this.append(K,N)},this):Array.isArray(M)?M.forEach(function(N){this.append(N[0],N[1])},this):M&&Object.getOwnPropertyNames(M).forEach(function(N){this.append(N,M[N])},this)}_.prototype.append=function(M,N){M=y(M),N=g(N);var K=this.map[M];this.map[M]=K?K+", "+N:N},_.prototype.delete=function(M){delete this.map[y(M)]},_.prototype.get=function(M){return M=y(M),this.has(M)?this.map[M]:null},_.prototype.has=function(M){return this.map.hasOwnProperty(y(M))},_.prototype.set=function(M,N){this.map[y(M)]=g(N)},_.prototype.forEach=function(M,N){for(var K in this.map)this.map.hasOwnProperty(K)&&M.call(N,this.map[K],K,this)},_.prototype.keys=function(){var M=[];return this.forEach(function(N,K){M.push(K)}),O(M)},_.prototype.values=function(){var M=[];return this.forEach(function(N){M.push(N)}),O(M)},_.prototype.entries=function(){var M=[];return this.forEach(function(N,K){M.push([K,N])}),O(M)},l.iterable&&(_.prototype[Symbol.iterator]=_.prototype.entries);function S(M){if(M.bodyUsed)return Promise.reject(new TypeError("Already read"));M.bodyUsed=!0}function E(M){return new Promise(function(N,K){M.onload=function(){N(M.result)},M.onerror=function(){K(M.error)}})}function R(M){var N=new FileReader,K=E(N);return N.readAsArrayBuffer(M),K}function j(M){var N=new FileReader,K=E(N);return N.readAsText(M),K}function J(M){for(var N=new Uint8Array(M),K=new Array(N.length),ie=0;ie<N.length;ie++)K[ie]=String.fromCharCode(N[ie]);return K.join("")}function z(M){if(M.slice)return M.slice(0);var N=new Uint8Array(M.byteLength);return N.set(new Uint8Array(M)),N.buffer}function X(){return this.bodyUsed=!1,this._initBody=function(M){this._bodyInit=M,M?typeof M=="string"?this._bodyText=M:l.blob&&Blob.prototype.isPrototypeOf(M)?this._bodyBlob=M:l.formData&&FormData.prototype.isPrototypeOf(M)?this._bodyFormData=M:l.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)?this._bodyText=M.toString():l.arrayBuffer&&l.blob&&d(M)?(this._bodyArrayBuffer=z(M.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(M)||m(M))?this._bodyArrayBuffer=z(M):this._bodyText=M=Object.prototype.toString.call(M):this._bodyText="",this.headers.get("content-type")||(typeof M=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):l.searchParams&&URLSearchParams.prototype.isPrototypeOf(M)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},l.blob&&(this.blob=function(){var M=S(this);if(M)return M;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?S(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(R)}),this.text=function(){var M=S(this);if(M)return M;if(this._bodyBlob)return j(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(J(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},l.formData&&(this.formData=function(){return this.text().then(ve)}),this.json=function(){return this.text().then(JSON.parse)},this}var ne=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function oe(M){var N=M.toUpperCase();return ne.indexOf(N)>-1?N:M}function Se(M,N){N=N||{};var K=N.body;if(M instanceof Se){if(M.bodyUsed)throw new TypeError("Already read");this.url=M.url,this.credentials=M.credentials,N.headers||(this.headers=new _(M.headers)),this.method=M.method,this.mode=M.mode,this.signal=M.signal,!K&&M._bodyInit!=null&&(K=M._bodyInit,M.bodyUsed=!0)}else this.url=String(M);if(this.credentials=N.credentials||this.credentials||"same-origin",(N.headers||!this.headers)&&(this.headers=new _(N.headers)),this.method=oe(N.method||this.method||"GET"),this.mode=N.mode||this.mode||null,this.signal=N.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&K)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(K)}Se.prototype.clone=function(){return new Se(this,{body:this._bodyInit})};function ve(M){var N=new FormData;return M.trim().split("&").forEach(function(K){if(K){var ie=K.split("="),ce=ie.shift().replace(/\+/g," "),ae=ie.join("=").replace(/\+/g," ");N.append(decodeURIComponent(ce),decodeURIComponent(ae))}}),N}function ze(M){var N=new _,K=M.replace(/\r?\n[\t ]+/g," ");return K.split(/\r?\n/).forEach(function(ie){var ce=ie.split(":"),ae=ce.shift().trim();if(ae){var B=ce.join(":").trim();N.append(ae,B)}}),N}X.call(Se.prototype);function Ne(M,N){N||(N={}),this.type="default",this.status=N.status===void 0?200:N.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in N?N.statusText:"OK",this.headers=new _(N.headers),this.url=N.url||"",this._initBody(M)}X.call(Ne.prototype),Ne.prototype.clone=function(){return new Ne(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _(this.headers),url:this.url})},Ne.error=function(){var M=new Ne(null,{status:0,statusText:""});return M.type="error",M};var Re=[301,302,303,307,308];Ne.redirect=function(M,N){if(Re.indexOf(N)===-1)throw new RangeError("Invalid status code");return new Ne(null,{status:N,headers:{location:M}})},o.DOMException=s.DOMException;try{new o.DOMException}catch{o.DOMException=function(N,K){this.message=N,this.name=K;var ie=Error(N);this.stack=ie.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function Ve(M,N){return new Promise(function(K,ie){var ce=new Se(M,N);if(ce.signal&&ce.signal.aborted)return ie(new o.DOMException("Aborted","AbortError"));var ae=new XMLHttpRequest;function B(){ae.abort()}ae.onload=function(){var Fe={status:ae.status,statusText:ae.statusText,headers:ze(ae.getAllResponseHeaders()||"")};Fe.url="responseURL"in ae?ae.responseURL:Fe.headers.get("X-Request-URL");var $e="response"in ae?ae.response:ae.responseText;K(new Ne($e,Fe))},ae.onerror=function(){ie(new TypeError("Network request failed"))},ae.ontimeout=function(){ie(new TypeError("Network request failed"))},ae.onabort=function(){ie(new o.DOMException("Aborted","AbortError"))},ae.open(ce.method,ce.url,!0),ce.credentials==="include"?ae.withCredentials=!0:ce.credentials==="omit"&&(ae.withCredentials=!1),"responseType"in ae&&l.blob&&(ae.responseType="blob"),ce.headers.forEach(function(Fe,$e){ae.setRequestHeader($e,Fe)}),ce.signal&&(ce.signal.addEventListener("abort",B),ae.onreadystatechange=function(){ae.readyState===4&&ce.signal.removeEventListener("abort",B)}),ae.send(typeof ce._bodyInit=="undefined"?null:ce._bodyInit)})}return Ve.polyfill=!0,s.fetch||(s.fetch=Ve,s.Headers=_,s.Request=Se,s.Response=Ne),o.Headers=_,o.Request=Se,o.Response=Ne,o.fetch=Ve,Object.defineProperty(o,"__esModule",{value:!0}),o})({})})(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var r=i;e=r.fetch,e.default=r.fetch,e.fetch=r.fetch,e.Headers=r.Headers,e.Request=r.Request,e.Response=r.Response,t.exports=e}(Hr,Hr.exports)),Hr.exports}var Ra=vE();const la=Ya(Ra),yE=vg({__proto__:null,default:la},[Ra]),Vi=t=>{let e={};return t&&(typeof Headers!="undefined"&&t instanceof Headers||yE&&Ra.Headers&&t instanceof Ra.Headers?e=SS(t):Array.isArray(t)?t.forEach(([n,i])=>{n&&i!==void 0&&(e[n]=i)}):e=t),e},yf=t=>t.replace(/([\s,]|#[^\n\r]+)+/g," ").trim(),bE=t=>{if(!Array.isArray(t.query)){const i=t,r=[`query=${encodeURIComponent(yf(i.query))}`];return t.variables&&r.push(`variables=${encodeURIComponent(i.jsonSerializer.stringify(i.variables))}`),i.operationName&&r.push(`operationName=${encodeURIComponent(i.operationName)}`),r.join("&")}if(typeof t.variables!="undefined"&&!Array.isArray(t.variables))throw new Error("Cannot create query with given variable type, array expected");const e=t,n=t.query.reduce((i,r,s)=>(i.push({query:yf(r),variables:e.variables?e.jsonSerializer.stringify(e.variables[s]):void 0}),i),[]);return`query=${encodeURIComponent(e.jsonSerializer.stringify(n))}`},kE=t=>async e=>{var S;const{url:n,query:i,variables:r,operationName:s,fetch:o,fetchOptions:l,middleware:d}=e,h={...e.headers};let m="",y;t==="POST"?(y=wE(i,r,s,l.jsonSerializer),typeof y=="string"&&(h["Content-Type"]="application/json")):m=bE({query:i,variables:r,operationName:s,jsonSerializer:(S=l.jsonSerializer)!=null?S:Xl});const g={method:t,headers:h,body:y,...l};let O=n,_=g;if(d){const E=await Promise.resolve(d({...g,url:n,operationName:s,variables:r})),{url:R,...j}=E;O=R,_=j}return m&&(O=`${O}?${m}`),await o(O,_)};class _E{constructor(e,n={}){this.url=e,this.requestConfig=n,this.rawRequest=async(...i)=>{const[r,s,o]=i,l=NS(r,s,o),{headers:d,fetch:h=la,method:m="POST",requestMiddleware:y,responseMiddleware:g,...O}=this.requestConfig,{url:_}=this;l.signal!==void 0&&(O.signal=l.signal);const{operationName:S}=Pu(l.query);return Lu({url:_,query:l.query,variables:l.variables,headers:{...Vi($u(d)),...Vi(l.requestHeaders)},operationName:S,fetch:h,method:m,fetchOptions:O,middleware:y}).then(E=>(g&&g(E),E)).catch(E=>{throw g&&g(E),E})}}async request(e,...n){const[i,r]=n,s=ES(e,i,r),{headers:o,fetch:l=la,method:d="POST",requestMiddleware:h,responseMiddleware:m,...y}=this.requestConfig,{url:g}=this;s.signal!==void 0&&(y.signal=s.signal);const{query:O,operationName:_}=Pu(s.document);return Lu({url:g,query:O,variables:s.variables,headers:{...Vi($u(o)),...Vi(s.requestHeaders)},operationName:_,fetch:l,method:d,fetchOptions:y,middleware:h}).then(S=>(m&&m(S),S.data)).catch(S=>{throw m&&m(S),S})}batchRequests(e,n){var d;const i=AS(e,n),{headers:r,...s}=this.requestConfig;i.signal!==void 0&&(s.signal=i.signal);const o=i.documents.map(({document:h})=>Pu(h).query),l=i.documents.map(({variables:h})=>h);return Lu({url:this.url,query:o,variables:l,headers:{...Vi($u(r)),...Vi(i.requestHeaders)},operationName:void 0,fetch:(d=this.requestConfig.fetch)!=null?d:la,method:this.requestConfig.method||"POST",fetchOptions:s,middleware:this.requestConfig.requestMiddleware}).then(h=>(this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h.data)).catch(h=>{throw this.requestConfig.responseMiddleware&&this.requestConfig.responseMiddleware(h),h})}setHeaders(e){return this.requestConfig.headers=e,this}setHeader(e,n){const{headers:i}=this.requestConfig;return i?i[e]=n:this.requestConfig.headers={[e]:n},this}setEndpoint(e){return this.url=e,this}}const Lu=async t=>{var m,y;const{query:e,variables:n,fetchOptions:i}=t,r=kE(wS((m=t.method)!=null?m:"post")),s=Array.isArray(t.query),o=await r(t),l=await SE(o,(y=i.jsonSerializer)!=null?y:Xl),d=Array.isArray(l)?!l.some(({data:g})=>!g):!!l.data,h=Array.isArray(l)||!l.errors||Array.isArray(l.errors)&&!l.errors.length||i.errorPolicy==="all"||i.errorPolicy==="ignore";if(o.ok&&h&&d){const{errors:g,...O}=(Array.isArray(l),l),_=i.errorPolicy==="ignore"?O:l;return{...s?{data:_}:_,headers:o.headers,status:o.status}}else{const g=typeof l=="string"?{error:l}:l;throw new Gr({...g,status:o.status,headers:o.headers},{query:e,variables:n})}},wE=(t,e,n,i)=>{const r=i!=null?i:Xl;if(!Array.isArray(t))return r.stringify({query:t,variables:e,operationName:n});if(typeof e!="undefined"&&!Array.isArray(e))throw new Error("Cannot create request body with given variable type, array expected");const s=t.reduce((o,l,d)=>(o.push({query:l,variables:e?e[d]:void 0}),o),[]);return r.stringify(s)},SE=async(t,e)=>{let n;return t.headers.forEach((i,r)=>{r.toLowerCase()==="content-type"&&(n=i)}),n&&(n.toLowerCase().startsWith("application/json")||n.toLowerCase().startsWith("application/graphql+json")||n.toLowerCase().startsWith("application/graphql-response+json"))?e.parse(await t.text()):t.text()},$u=t=>typeof t=="function"?t():t;class Sm extends Cn{constructor(){super("EVENT_CHAT_ROOM_TOKEN_ERROR","Error getting chat room connection token")}}class lo{constructor(e){me(this,"root",Ep(this));me(this,"token");this.root.setProps(e)}static toDomain(e){const n={token:e.token};return new lo(n)}toPrimitives(){const{root:e,...n}=this;return{...n}}}const EE=rr.apiUrls.graphql;class Em{constructor(){me(this,"client");this.client=new _E(EE)}async getChatRoom(e){var r;const{getChatRoomToken:n}=await this.client.request(_p,{data:{account:e.account,idEvent:e.eventId,userName:e.userName}});this.propagateGraphqlErrorIfExists(n);const i=(r=n.data)==null?void 0:r.token;if(!i)throw new Sm;return lo.toDomain({token:i})}propagateGraphqlErrorIfExists(e){if(e.__typename==="ErrorGeneral")throw new Error(e.message)}}class Nm{constructor(e){me(this,"account");this.eventChatRoomRepository=e}async get(e){this.validateAccount();try{return await this.eventChatRoomRepository.getChatRoom({...e,account:this.account})}catch(n){throw new Fl(n)}}setAccount(e){this.account=e}validateAccount(){if(!this.account)throw new Gf}}const NE=new Em,Al=new Nm(NE),co=Da(void 0);co.debugLabel="chatSocketAtom";const fo=Da(!1);fo.debugLabel="chatIsConnectedAtom";const ms=Da([]);ms.debugLabel="chatMessageListAtom";const Am=t=>{var n;t.data=t.data.replace("replace_gif",(n=t.urlGif)!=null?n:"");const e=t.data.indexOf("::question__")>-1;if(e){const[i,r]=t.data.split("::")||["none","none"],s=r.split("question__")[1],o={response:i.replace("response__",""),question:JSON.parse(s)};return{...t,data:o.response,isResponse:e,responseData:t.data,question:e?o.question:null}}return t},Om=t=>{const{url:e,token:n,onOpen:i,onClose:r,onMessage:s,onError:o}=t,l=new WebSocket(e,n);return l.onopen=d=>i(d),l.onclose=d=>r(d),l.onerror=d=>o(d),l.onmessage=d=>s(d),l},xm=()=>{const t="0123456789ABCDEF";let e="#";for(let n=0;n<6;n+=1)e+=t[Math.floor(Math.random()*16)];return e},ec=(t,e)=>{var g,O;const{Content:n,Attributes:i,Sender:{Attributes:r}}=e,{username:s,type:o,email:l}=i,{isAdmin:d}=r,h=(g=i==null?void 0:i.id)!=null?g:wa(8),m=((O=t.find(_=>_.username===s))==null?void 0:O.color)||xm(),y={id:h,type:o,color:m,username:s,email:l,data:n,sendDate:i.sendDate,isAdmin:d==="true",responseAdmin:!1,question:null,account:i.account,idEvent:i.idEvent,urlGif:i.urlGif,ip:i.ip};return Am(y)},Tm=t=>{const{eventId:e,userName:n,enabled:i=!0}=t,{accountName:r}=mp(),[s,o]=je.useState(""),l=()=>{i&&r&&(Al.setAccount(r),Al.get({eventId:e,userName:n}).then(d=>{o(d.token)}))};return je.useEffect(()=>{l()},[r,i]),{getQuery:{refetch:l},token:s}},{coreLogger:AE}=xi(),Rt=AE.child("useConnectChatSocket"),OE=rr.publicUrls.wssIVSChat,xE=10,TE=t=>Math.min(1e4,1e3*Math.pow(2,t)),CE=(t,e,n)=>{const i=JSON.parse(t.data);switch(i.Type){case"EVENT":e==null||e(i);break;case"MESSAGE":n==null||n(i);break;case"ERROR":Rt.error("Chat room error:",i);break;default:Rt.error("Unknown chat room event:",t)}},Cm=t=>{const{onMessage:e,eventId:n,enabled:i=!0,userName:r,onEvent:s}=t,{token:o,getQuery:l}=Tm({eventId:n,userName:r,enabled:i}),[d,h]=nu(co),[m,y]=nu(fo),[g,O]=nu(ms),_=je.useRef(0),S=je.useCallback(z=>Rt.error("Chat room socket error:",z),[]),E=je.useCallback(()=>{y(!0),_.current=0,Rt.debug("Successfully connected to the chat room")},[y]),R=je.useCallback(()=>{if(_.current>=xE){Rt.error("Max reconnection attempts reached. No further attempts will be made.");return}y(!1),_.current+=1;const z=TE(_.current);Rt.debug(`Disconnected from chat room. Reconnecting in ${z/1e3} seconds... (Attempt ${_.current})`),setTimeout(()=>l.refetch(),z)},[l,y]),j=je.useCallback(()=>{if(!o){Rt.debug("No token available. Connection aborted.");return}if((d==null?void 0:d.readyState)===WebSocket.OPEN){Rt.debug("WebSocket is already open. No need to reconnect.");return}Rt.debug("Connecting to the chat room...");const z=Om({token:o,url:OE,onOpen:E,onClose:R,onError:S,onMessage:X=>CE(X,s,e)});h(z)},[o,d,s,e,E,R,S,h]),J=je.useCallback(()=>{if(!d||d.readyState!==WebSocket.OPEN){Rt.debug("No open socket to close.");return}Rt.debug("Closing chat room socket..."),d.close()},[d]);return je.useEffect(()=>{if(!i){Rt.debug("Chat is disabled, skipping connection.");return}if(!o){Rt.debug("Token not available, skipping connection.");return}return Rt.debug("Initializing connection with token:",o),J(),j(),J},[o,i]),{socket:d,chatIsConnected:m,chatMessageList:g,setChatMessageList:O}},RE=()=>{const t=zu(co),e=zu(fo);return{sendMessage:je.useCallback((i,r)=>{if(!t||!e)return;const s={id:r.id,sendDate:new Date,content:i,action:"SEND_MESSAGE",attributes:r},o=JSON.stringify(s);t.send(o)},[e,t])}},Rm=()=>{const t=xl(ms);return{handleEvent:i=>{var r;if(i.EventName==="senddeletemessage"){const s=JSON.parse((r=i.Attributes)==null?void 0:r.data);t(o=>o.filter(l=>l.id!==s.id))}},handleMessage:i=>{t(r=>[...r,ec(r,i)])}}},FE=t=>{const{eventId:e,userName:n}=t,[i,r]=je.useState(!1),[s,o]=je.useState(),[l,d]=je.useState(),[h,m]=je.useState([]),{handleEvent:y}=Rm(),g=xl(ms),O=j=>{g(J=>[ec(J,j),...J]),r(!1)},_=j=>{var J,z,X;if(y(j),j.EventName==="sendpinmessage"){const ne=JSON.parse((J=j.Attributes)==null?void 0:J.data);o({data:ne.data,id:ne.id,username:ne.username})}if(j.EventName==="sendunpinmessage"&&o(void 0),j.EventName==="sendhighlightproduct"){const ne=JSON.parse((z=j.Attributes)==null?void 0:z.data);d({products:ne.productIds,collection:ne.collection,livestreamingId:ne.idEvent})}if(j.EventName==="sendaddtocart"){const ne=JSON.parse((X=j.Attributes)==null?void 0:X.data);m(oe=>[...oe,{id:ne.id,sessionId:ne.sessionId,productId:ne.productId,productImageUrl:ne.productImageUrl,productName:ne.productName}])}},{socket:S,chatMessageList:E,setChatMessageList:R}=Cm({onMessage:O,onEvent:_,eventId:e,userName:n});return{socket:S,chat:E,showLoader:i,pinnedMessage:s,highlightProduct:l,productsInCart:h,setChat:R,setShowLoader:r,setPinnedMessage:o,setProductsInCart:m}};/**
|
|
85
85
|
* @license
|
|
86
86
|
* Copyright 2019 Google LLC
|
|
87
87
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
88
|
-
*/const ca=globalThis,
|
|
88
|
+
*/const ca=globalThis,tc=ca.ShadowRoot&&(ca.ShadyCSS===void 0||ca.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,nc=Symbol(),bf=new WeakMap;let Fm=class{constructor(e,n,i){if(this._$cssResult$=!0,i!==nc)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=n}get styleSheet(){let e=this.o;const n=this.t;if(tc&&e===void 0){const i=n!==void 0&&n.length===1;i&&(e=bf.get(n)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&bf.set(n,e))}return e}toString(){return this.cssText}};const IE=t=>new Fm(typeof t=="string"?t:t+"",void 0,nc),DE=(t,...e)=>{const n=t.length===1?t[0]:e.reduce((i,r,s)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[s+1],t[0]);return new Fm(n,t,nc)},PE=(t,e)=>{if(tc)t.adoptedStyleSheets=e.map(n=>n instanceof CSSStyleSheet?n:n.styleSheet);else for(const n of e){const i=document.createElement("style"),r=ca.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=n.cssText,t.appendChild(i)}},kf=tc?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let n="";for(const i of e.cssRules)n+=i.cssText;return IE(n)})(t):t;/**
|
|
89
89
|
* @license
|
|
90
90
|
* Copyright 2017 Google LLC
|
|
91
91
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
92
|
-
*/const{is:
|
|
92
|
+
*/const{is:LE,defineProperty:$E,getOwnPropertyDescriptor:ME,getOwnPropertyNames:BE,getOwnPropertySymbols:UE,getPrototypeOf:jE}=Object,Gn=globalThis,_f=Gn.trustedTypes,VE=_f?_f.emptyScript:"",Mu=Gn.reactiveElementPolyfillSupport,Wr=(t,e)=>t,Ol={toAttribute(t,e){switch(e){case Boolean:t=t?VE:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=t!==null;break;case Number:n=t===null?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch{n=null}}return n}},Im=(t,e)=>!LE(t,e),wf={attribute:!0,type:String,converter:Ol,reflect:!1,hasChanged:Im};var Rf,Ff;(Rf=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(Ff=Gn.litPropertyMetadata)!=null||(Gn.litPropertyMetadata=new WeakMap);class zi extends HTMLElement{static addInitializer(e){var n;this._$Ei(),((n=this.l)!=null?n:this.l=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,n=wf){if(n.state&&(n.attribute=!1),this._$Ei(),this.elementProperties.set(e,n),!n.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,n);r!==void 0&&$E(this.prototype,e,r)}}static getPropertyDescriptor(e,n,i){var o;const{get:r,set:s}=(o=ME(this.prototype,e))!=null?o:{get(){return this[n]},set(l){this[n]=l}};return{get(){return r==null?void 0:r.call(this)},set(l){const d=r==null?void 0:r.call(this);s.call(this,l),this.requestUpdate(e,d,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){var n;return(n=this.elementProperties.get(e))!=null?n:wf}static _$Ei(){if(this.hasOwnProperty(Wr("elementProperties")))return;const e=jE(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Wr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Wr("properties"))){const n=this.properties,i=[...BE(n),...UE(n)];for(const r of i)this.createProperty(r,n[r])}const e=this[Symbol.metadata];if(e!==null){const n=litPropertyMetadata.get(e);if(n!==void 0)for(const[i,r]of n)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[n,i]of this.elementProperties){const r=this._$Eu(n,i);r!==void 0&&this._$Eh.set(r,n)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const n=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)n.unshift(kf(r))}else e!==void 0&&n.push(kf(e));return n}static _$Eu(e,n){const i=n.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var e;this._$ES=new Promise(n=>this.enableUpdating=n),this._$AL=new Map,this._$E_(),this.requestUpdate(),(e=this.constructor.l)==null||e.forEach(n=>n(this))}addController(e){var n,i;((n=this._$EO)!=null?n:this._$EO=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&((i=e.hostConnected)==null||i.call(e))}removeController(e){var n;(n=this._$EO)==null||n.delete(e)}_$E_(){const e=new Map,n=this.constructor.elementProperties;for(const i of n.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){var n;const e=(n=this.shadowRoot)!=null?n:this.attachShadow(this.constructor.shadowRootOptions);return PE(e,this.constructor.elementStyles),e}connectedCallback(){var e,n;(e=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostConnected)==null?void 0:r.call(i)})}enableUpdating(e){}disconnectedCallback(){var e;(e=this._$EO)==null||e.forEach(n=>{var i;return(i=n.hostDisconnected)==null?void 0:i.call(n)})}attributeChangedCallback(e,n,i){this._$AK(e,i)}_$EC(e,n){var s;const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const o=(((s=i.converter)==null?void 0:s.toAttribute)!==void 0?i.converter:Ol).toAttribute(n,i.type);this._$Em=e,o==null?this.removeAttribute(r):this.setAttribute(r,o),this._$Em=null}}_$AK(e,n){var s;const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const o=i.getPropertyOptions(r),l=typeof o.converter=="function"?{fromAttribute:o.converter}:((s=o.converter)==null?void 0:s.fromAttribute)!==void 0?o.converter:Ol;this._$Em=r,this[r]=l.fromAttribute(n,o.type),this._$Em=null}}requestUpdate(e,n,i){var r;if(e!==void 0){if(i!=null||(i=this.constructor.getPropertyOptions(e)),!((r=i.hasChanged)!=null?r:Im)(this[e],n))return;this.P(e,n,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(e,n,i){var r;this._$AL.has(e)||this._$AL.set(e,n),i.reflect===!0&&this._$Em!==e&&((r=this._$Ej)!=null?r:this._$Ej=new Set).add(e)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(n){Promise.reject(n)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i,r;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((i=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(const[o,l]of this._$Ep)this[o]=l;this._$Ep=void 0}const s=this.constructor.elementProperties;if(s.size>0)for(const[o,l]of s)l.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],l)}let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),(r=this._$EO)==null||r.forEach(s=>{var o;return(o=s.hostUpdate)==null?void 0:o.call(s)}),this.update(n)):this._$EU()}catch(s){throw e=!1,this._$EU(),s}e&&this._$AE(n)}willUpdate(e){}_$AE(e){var n;(n=this._$EO)==null||n.forEach(i=>{var r;return(r=i.hostUpdated)==null?void 0:r.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Ej&&(this._$Ej=this._$Ej.forEach(n=>this._$EC(n,this[n]))),this._$EU()}updated(e){}firstUpdated(e){}}var If;zi.elementStyles=[],zi.shadowRootOptions={mode:"open"},zi[Wr("elementProperties")]=new Map,zi[Wr("finalized")]=new Map,Mu==null||Mu({ReactiveElement:zi}),((If=Gn.reactiveElementVersions)!=null?If:Gn.reactiveElementVersions=[]).push("2.0.4");/**
|
|
93
93
|
* @license
|
|
94
94
|
* Copyright 2017 Google LLC
|
|
95
95
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
96
|
-
*/const
|
|
97
|
-
\f\r]`,
|
|
98
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
96
|
+
*/const Jr=globalThis,Fa=Jr.trustedTypes,Sf=Fa?Fa.createPolicy("lit-html",{createHTML:t=>t}):void 0,Dm="$lit$",Hn=`lit$${Math.random().toFixed(9).slice(2)}$`,Pm="?"+Hn,HE=`<${Pm}>`,Si=document,as=()=>Si.createComment(""),os=t=>t===null||typeof t!="object"&&typeof t!="function",ic=Array.isArray,qE=t=>ic(t)||typeof(t==null?void 0:t[Symbol.iterator])=="function",Bu=`[
|
|
97
|
+
\f\r]`,Mr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ef=/-->/g,Nf=/>/g,ci=RegExp(`>|${Bu}(?:([^\\s"'>=/]+)(${Bu}*=${Bu}*(?:[^
|
|
98
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Af=/'/g,Of=/"/g,Lm=/^(?:script|style|textarea|title)$/i,zE=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),KE=zE(1),nr=Symbol.for("lit-noChange"),yt=Symbol.for("lit-nothing"),xf=new WeakMap,pi=Si.createTreeWalker(Si,129);function $m(t,e){if(!ic(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Sf!==void 0?Sf.createHTML(e):e}const GE=(t,e)=>{const n=t.length-1,i=[];let r,s=e===2?"<svg>":e===3?"<math>":"",o=Mr;for(let l=0;l<n;l++){const d=t[l];let h,m,y=-1,g=0;for(;g<d.length&&(o.lastIndex=g,m=o.exec(d),m!==null);)g=o.lastIndex,o===Mr?m[1]==="!--"?o=Ef:m[1]!==void 0?o=Nf:m[2]!==void 0?(Lm.test(m[2])&&(r=RegExp("</"+m[2],"g")),o=ci):m[3]!==void 0&&(o=ci):o===ci?m[0]===">"?(o=r!=null?r:Mr,y=-1):m[1]===void 0?y=-2:(y=o.lastIndex-m[2].length,h=m[1],o=m[3]===void 0?ci:m[3]==='"'?Of:Af):o===Of||o===Af?o=ci:o===Ef||o===Nf?o=Mr:(o=ci,r=void 0);const O=o===ci&&t[l+1].startsWith("/>")?" ":"";s+=o===Mr?d+HE:y>=0?(i.push(h),d.slice(0,y)+Dm+d.slice(y)+Hn+O):d+Hn+(y===-2?l:O)}return[$m(t,s+(t[n]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};class us{constructor({strings:e,_$litType$:n},i){let r;this.parts=[];let s=0,o=0;const l=e.length-1,d=this.parts,[h,m]=GE(e,n);if(this.el=us.createElement(h,i),pi.currentNode=this.el.content,n===2||n===3){const y=this.el.content.firstChild;y.replaceWith(...y.childNodes)}for(;(r=pi.nextNode())!==null&&d.length<l;){if(r.nodeType===1){if(r.hasAttributes())for(const y of r.getAttributeNames())if(y.endsWith(Dm)){const g=m[o++],O=r.getAttribute(y).split(Hn),_=/([.?@])?(.*)/.exec(g);d.push({type:1,index:s,name:_[2],strings:O,ctor:_[1]==="."?JE:_[1]==="?"?YE:_[1]==="@"?XE:ho}),r.removeAttribute(y)}else y.startsWith(Hn)&&(d.push({type:6,index:s}),r.removeAttribute(y));if(Lm.test(r.tagName)){const y=r.textContent.split(Hn),g=y.length-1;if(g>0){r.textContent=Fa?Fa.emptyScript:"";for(let O=0;O<g;O++)r.append(y[O],as()),pi.nextNode(),d.push({type:2,index:++s});r.append(y[g],as())}}}else if(r.nodeType===8)if(r.data===Pm)d.push({type:2,index:s});else{let y=-1;for(;(y=r.data.indexOf(Hn,y+1))!==-1;)d.push({type:7,index:s}),y+=Hn.length-1}s++}}static createElement(e,n){const i=Si.createElement("template");return i.innerHTML=e,i}}function ir(t,e,n=t,i){var o,l,d;if(e===nr)return e;let r=i!==void 0?(o=n.o)==null?void 0:o[i]:n.l;const s=os(e)?void 0:e._$litDirective$;return(r==null?void 0:r.constructor)!==s&&((l=r==null?void 0:r._$AO)==null||l.call(r,!1),s===void 0?r=void 0:(r=new s(t),r._$AT(t,n,i)),i!==void 0?((d=n.o)!=null?d:n.o=[])[i]=r:n.l=r),r!==void 0&&(e=ir(t,r._$AS(t,e.values),r,i)),e}class WE{constructor(e,n){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=n}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){var h;const{el:{content:n},parts:i}=this._$AD,r=((h=e==null?void 0:e.creationScope)!=null?h:Si).importNode(n,!0);pi.currentNode=r;let s=pi.nextNode(),o=0,l=0,d=i[0];for(;d!==void 0;){if(o===d.index){let m;d.type===2?m=new gs(s,s.nextSibling,this,e):d.type===1?m=new d.ctor(s,d.name,d.strings,this,e):d.type===6&&(m=new QE(s,this,e)),this._$AV.push(m),d=i[++l]}o!==(d==null?void 0:d.index)&&(s=pi.nextNode(),o++)}return pi.currentNode=Si,r}p(e){let n=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,n),n+=i.strings.length-2):i._$AI(e[n])),n++}}class gs{get _$AU(){var e,n;return(n=(e=this._$AM)==null?void 0:e._$AU)!=null?n:this.v}constructor(e,n,i,r){var s;this.type=2,this._$AH=yt,this._$AN=void 0,this._$AA=e,this._$AB=n,this._$AM=i,this.options=r,this.v=(s=r==null?void 0:r.isConnected)!=null?s:!0}get parentNode(){let e=this._$AA.parentNode;const n=this._$AM;return n!==void 0&&(e==null?void 0:e.nodeType)===11&&(e=n.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,n=this){e=ir(this,e,n),os(e)?e===yt||e==null||e===""?(this._$AH!==yt&&this._$AR(),this._$AH=yt):e!==this._$AH&&e!==nr&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):qE(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==yt&&os(this._$AH)?this._$AA.nextSibling.data=e:this.T(Si.createTextNode(e)),this._$AH=e}$(e){var s;const{values:n,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=us.createElement($m(i.h,i.h[0]),this.options)),i);if(((s=this._$AH)==null?void 0:s._$AD)===r)this._$AH.p(n);else{const o=new WE(r,this),l=o.u(this.options);o.p(n),this.T(l),this._$AH=o}}_$AC(e){let n=xf.get(e.strings);return n===void 0&&xf.set(e.strings,n=new us(e)),n}k(e){ic(this._$AH)||(this._$AH=[],this._$AR());const n=this._$AH;let i,r=0;for(const s of e)r===n.length?n.push(i=new gs(this.O(as()),this.O(as()),this,this.options)):i=n[r],i._$AI(s),r++;r<n.length&&(this._$AR(i&&i._$AB.nextSibling,r),n.length=r)}_$AR(e=this._$AA.nextSibling,n){var i;for((i=this._$AP)==null?void 0:i.call(this,!1,!0,n);e&&e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){var n;this._$AM===void 0&&(this.v=e,(n=this._$AP)==null||n.call(this,e))}}class ho{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,n,i,r,s){this.type=1,this._$AH=yt,this._$AN=void 0,this.element=e,this.name=n,this._$AM=r,this.options=s,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=yt}_$AI(e,n=this,i,r){const s=this.strings;let o=!1;if(s===void 0)e=ir(this,e,n,0),o=!os(e)||e!==this._$AH&&e!==nr,o&&(this._$AH=e);else{const l=e;let d,h;for(e=s[0],d=0;d<s.length-1;d++)h=ir(this,l[i+d],n,d),h===nr&&(h=this._$AH[d]),o||(o=!os(h)||h!==this._$AH[d]),h===yt?e=yt:e!==yt&&(e+=(h!=null?h:"")+s[d+1]),this._$AH[d]=h}o&&!r&&this.j(e)}j(e){e===yt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e!=null?e:"")}}class JE extends ho{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===yt?void 0:e}}class YE extends ho{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==yt)}}class XE extends ho{constructor(e,n,i,r,s){super(e,n,i,r,s),this.type=5}_$AI(e,n=this){var o;if((e=(o=ir(this,e,n,0))!=null?o:yt)===nr)return;const i=this._$AH,r=e===yt&&i!==yt||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,s=e!==yt&&(i===yt||r);r&&this.element.removeEventListener(this.name,this,i),s&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var n,i;typeof this._$AH=="function"?this._$AH.call((i=(n=this.options)==null?void 0:n.host)!=null?i:this.element,e):this._$AH.handleEvent(e)}}class QE{constructor(e,n,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=n,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){ir(this,e)}}const Uu=Jr.litHtmlPolyfillSupport;var Df;Uu==null||Uu(us,gs),((Df=Jr.litHtmlVersions)!=null?Df:Jr.litHtmlVersions=[]).push("3.2.0");const ZE=(t,e,n)=>{var s,o;const i=(s=n==null?void 0:n.renderBefore)!=null?s:e;let r=i._$litPart$;if(r===void 0){const l=(o=n==null?void 0:n.renderBefore)!=null?o:null;i._$litPart$=r=new gs(e.insertBefore(as(),l),l,void 0,n!=null?n:{})}return r._$AI(t),r};/**
|
|
99
99
|
* @license
|
|
100
100
|
* Copyright 2017 Google LLC
|
|
101
101
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
102
|
-
*/class
|
|
102
|
+
*/class Yr extends zi{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){var n,i;const e=super.createRenderRoot();return(i=(n=this.renderOptions).renderBefore)!=null||(n.renderBefore=e.firstChild),e}update(e){const n=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.o=ZE(n,this.renderRoot,this.renderOptions)}connectedCallback(){var e;super.connectedCallback(),(e=this.o)==null||e.setConnected(!0)}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.o)==null||e.setConnected(!1)}render(){return nr}}var Pf;Yr._$litElement$=!0,Yr.finalized=!0,(Pf=globalThis.litElementHydrateSupport)==null||Pf.call(globalThis,{LitElement:Yr});const ju=globalThis.litElementPolyfillSupport;ju==null||ju({LitElement:Yr});var Lf;((Lf=globalThis.litElementVersions)!=null?Lf:globalThis.litElementVersions=[]).push("4.1.0");/**
|
|
103
103
|
* @license
|
|
104
104
|
* Copyright 2020 Google LLC
|
|
105
105
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
106
|
-
*/const
|
|
106
|
+
*/const eN=t=>t.strings===void 0;/**
|
|
107
107
|
* @license
|
|
108
108
|
* Copyright 2017 Google LLC
|
|
109
109
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
110
|
-
*/const
|
|
110
|
+
*/const tN={CHILD:2},nN=t=>(...e)=>({_$litDirective$:t,values:e});class iN{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,n,i){this.t=e,this._$AM=n,this.i=i}_$AS(e,n){return this.update(e,n)}update(e,n){return this.render(...n)}}/**
|
|
111
111
|
* @license
|
|
112
112
|
* Copyright 2017 Google LLC
|
|
113
113
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
114
|
-
*/const
|
|
114
|
+
*/const Xr=(t,e)=>{var i;const n=t._$AN;if(n===void 0)return!1;for(const r of n)(i=r._$AO)==null||i.call(r,e,!1),Xr(r,e);return!0},Ia=t=>{let e,n;do{if((e=t._$AM)===void 0)break;n=e._$AN,n.delete(t),t=e}while((n==null?void 0:n.size)===0)},Mm=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(n===void 0)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),aN(e)}};function rN(t){this._$AN!==void 0?(Ia(this),this._$AM=t,Mm(this)):this._$AM=t}function sN(t,e=!1,n=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(i))for(let s=n;s<i.length;s++)Xr(i[s],!1),Ia(i[s]);else i!=null&&(Xr(i,!1),Ia(i));else Xr(this,t)}const aN=t=>{var e,n;t.type==tN.CHILD&&((e=t._$AP)!=null||(t._$AP=sN),(n=t._$AQ)!=null||(t._$AQ=rN))};class oN extends iN{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,n,i){super._$AT(e,n,i),Mm(this),this.isConnected=e._$AU}_$AO(e,n=!0){var i,r;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(r=this.disconnected)==null||r.call(this)),n&&(Xr(this,e),Ia(this))}setValue(e){if(eN(this.t))this.t._$AI(e,this);else{const n=[...this.t._$AH];n[this.i]=e,this.t._$AI(n,this,0)}}disconnected(){}reconnected(){}}/**
|
|
115
115
|
* @license
|
|
116
116
|
* Copyright 2020 Google LLC
|
|
117
117
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
118
|
-
*/const
|
|
118
|
+
*/const uN=()=>new lN;class lN{}const Vu=new WeakMap,cN=nN(class extends oN{render(t){return yt}update(t,[e]){var i;const n=e!==this.Y;return n&&this.Y!==void 0&&this.rt(void 0),(n||this.lt!==this.ct)&&(this.Y=e,this.ht=(i=t.options)==null?void 0:i.host,this.rt(this.ct=t.element)),yt}rt(t){var e;if(this.isConnected||(t=void 0),typeof this.Y=="function"){const n=(e=this.ht)!=null?e:globalThis;let i=Vu.get(n);i===void 0&&(i=new WeakMap,Vu.set(n,i)),i.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),i.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){var t,e,n;return typeof this.Y=="function"?(e=Vu.get((t=this.ht)!=null?t:globalThis))==null?void 0:e.get(this.Y):(n=this.Y)==null?void 0:n.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var Qs={},Tf;function dN(){if(Tf)return Qs;Tf=1;var t=gg;return Qs.createRoot=t.createRoot,Qs.hydrateRoot=t.hydrateRoot,Qs}var fN=dN();class Bm extends Yr{constructor(){super(...arguments);me(this,"rootRef",uN());me(this,"rootInstance")}render(){return KE`<div ${cN(this.rootRef)}></div>`}updated(){this.updateReactComponent()}updateReactComponent(){if(!this.rootRef.value)return;this.rootInstance||(this.rootInstance=fN.createRoot(this.rootRef.value));const n=je.createElement(this.getReactComponent(),this.getReactProps(),je.createElement("slot"));this.rootInstance.render(n)}handleHMR(n){}injectStyles(n){const i=r=>r.replace("./","");for(const[r,s]of Object.entries(n)){const o=i(r),l=document.createElement("style");l.setAttribute("type","text/css"),l.setAttribute("id",o),l.innerHTML=s,setTimeout(()=>{var d;return(d=this.shadowRoot)==null?void 0:d.appendChild(l)})}}setupHMRListener(){}}me(Bm,"baseStyles",DE`
|
|
119
119
|
:host {
|
|
120
120
|
width: 100%;
|
|
121
121
|
}
|
|
122
|
-
`);class
|
|
122
|
+
`);class Um{constructor(e,n,i){me(this,"renderFn");me(this,"logger");me(this,"rootId");me(this,"element",null);me(this,"unmount");me(this,"updateProps");this.rootId=e,this.renderFn=n,this.logger=i}async render(e={}){var n;if(this.element)this.updateProps(e);else{const i=await this.renderFn(this.rootId,e);this.element=(n=i==null?void 0:i.element)!=null?n:null,this.updateProps=r=>i==null?void 0:i.updateProps(r),this.unmount=()=>{i==null||i.unmount(),this.element=null}}}}class po{constructor(e){this.config=e}static isApplicable(e){return Hl.LOCAL===e.bundler.stage}async execute(){var n;const{runtime:e}=this.config;(n=e.env)!=null&&n.account?await e.configureStore(e.env):e.logger.warn("missing account in local environment")}}me(po,"type",Rn.Local);const hN=window==null?void 0:window.__NZ_APP__;class rc{constructor(e){this.config=e}static isApplicable(){return hN==="platform"}async execute(){}}me(rc,"type",Rn.Platform);const Zs=window==null?void 0:window.faststore_sdk_stores;class sc{constructor(e){this.config=e;const n={vtexfaststore:Zs};this.config.runtime.updateMeta(n)}static isApplicable(){return!!Zs}async execute(){const{runtime:e}=this.config;if(!Zs.account){e.logger.error("missing the account in window.faststore_sdk_stores");return}await e.configureStore({account:Zs.account})}}me(sc,"type",Rn.VtexFastStore);const ea=window==null?void 0:window.__RUNTIME__;class mo{constructor(e){this.config=e;const n={vtexio:ea};this.config.runtime.updateMeta(n)}static isApplicable(){return!!ea}async execute(){const{runtime:e}=this.config;if(!ea.account){e.logger.error("missing the account in window.__RUNTIME__");return}await e.configureStore({account:ea.account})}}me(mo,"type",Rn.VtexIO);const Cf=window==null?void 0:window.vtexjs;class go{constructor(e){this.config=e;const n={vtexjs:Cf};this.config.runtime.updateMeta(n)}static isApplicable(){return!!Cf}async execute(){const{runtime:e}=this.config;let n={};const i=`${e.componentId.value}-script`,r=Qh(i);if(n=Object.fromEntries(r.entries()),!n.account){e.logger.error(`missing the account in the search params of the script #${i}`);return}await e.configureStore({account:n.account})}}me(go,"type",Rn.VtexLegacy);class ac{constructor(e){this.config=e}static isApplicable(e){return!po.isApplicable(e)&&!mo.isApplicable()&&!go.isApplicable()&&!sc.isApplicable()&&!rc.isApplicable()}async execute(){}}me(ac,"type",Rn.External);const jm=[po,mo,go,ac,sc,rc];class pN{constructor(e){me(this,"globalId");me(this,"metadata");me(this,"customConfigList");me(this,"env");me(this,"bundler");me(this,"logger");me(this,"componentId");me(this,"renderHandler");me(this,"store");this.globalId=e.globalId,this.store=e.getStore(),this.logger=e.logger.child("Runtime"),this.env=e.env,this.bundler=e.bundler,this.customConfigList=new Map,this.metadata={type:Rn.External},this.initializeGlobals()}config(e,n,i){typeof n=="function"&&(i=n,n={});const{skipBaseBehavior:r=!1}=n;return this.customConfigList.set(e,{callback:i,skipBaseBehavior:r}),this}registerComponent(e,n){const i=this.toCamel(e);if(window[this.globalId][i])return this.logger.debug(`Component "${i}" is already registered.`),this;this.componentId={value:e,formatted:i},this.renderHandler=n;const r={render:this.renderHandler};return window[this.globalId][this.componentId.formatted]=r,this.logger.debug(`Component "${i}" registered.`),this}async execute(e){for(const n of jm)if(n.isApplicable(this)){const i=new n({runtime:this}),r=this.customConfigList.get(n.type);this.updateMeta({type:n.type}),r!=null&&r.skipBaseBehavior||await i.execute(),r&&await r.callback({runtime:this,component:new Um(this.componentId.value,this.renderHandler,this.logger)});break}await(e==null?void 0:e())}updateMeta(e){this.metadata={...this.metadata,...e}}async configureStore(e){await this.store.configure(e)}get meta(){return this.metadata}initializeGlobals(){var i;if(window[this.globalId]||(window[this.globalId]={},this.logger.debug(`Initialized "${this.globalId}" window object`)),(i=window[this.globalId])!=null&&i.runtime){this.logger.debug(`Runtime for "${this.globalId}" are already initialized.`);return}const e=()=>Object.freeze({...this.metadata}),n=()=>Object.freeze({isProd:this.bundler.isProd,get meta(){return e()}});Object.defineProperty(window[this.globalId],"runtime",{get:()=>n()}),this.logger.debug(`Initialized runtime for "${this.globalId}".`)}toCamel(e){return e.replace(/^[a-z]{2}-/,"").replace(/-./g,n=>n[1].toUpperCase())}}exports.AccountContractStatusTypes=sp;exports.AccountContractTypes=rp;exports.AccountInvalidError=Gf;exports.AccountNotFoundError=Vl;exports.AccountPlanDescriptionTypes=op;exports.AccountService=hp;exports.AccountSubscriptionTypes=ap;exports.AccountTypes=ip;exports.AddToCartActionTypes=Za;exports.AggregateRoot=Sp;exports.ApiGraphqlTypes=Nk;exports.BaseDB=Uh;exports.BroadcastChannelEventBus=jh;exports.ComponentManager=Um;exports.CreatePlanError=cp;exports.DependencyInjector=Yl;exports.DomainError=Cn;exports.ErrorCodes=xt;exports.EventBusWildcards=pb;exports.EventChatRoom=lo;exports.EventChatRoomService=Nm;exports.EventChatRoomTokenError=Sm;exports.EventNames=Hh;exports.ExternalRuntime=ac;exports.GlobalPageSectionTypes=up;exports.GraphqlEventChatRoomRepository=Em;exports.HttpAxiosClient=Fw;exports.InvalidNizzaGlobalObjectError=Wf;exports.LanguageTypes=qh;exports.LocalRuntime=po;exports.LogLevel=ot;exports.LogLevelPriority=Ze;exports.Logger=Jh;exports.MAX_PRODUCTS_IN_CART=hb;exports.NizzaEventStatus=Vh;exports.NizzaProductRequestOriginTypes=Gh;exports.NizzaStore=Sa;exports.NizzaVariationTypes=Kh;exports.PlanNotFoundError=lp;exports.PriorityToLogLevelMap=zh;exports.ReactHostElement=Bm;exports.ResourceNotFoundError=nv;exports.RestAccountPlanRepository=dp;exports.RestPublicAccountRepository=fp;exports.Runtime=pN;exports.RuntimeStage=Hl;exports.RuntimeType=Rn;exports.Scope=hi;exports.StoreProvider=Yy;exports.UnexpectedError=Fl;exports.ValueObject=Fk;exports.VtexIORuntime=mo;exports.VtexLegacyRuntime=go;exports.accountAtom=Vf;exports.accountService=pp;exports.addQuestionData=Am;exports.addToCartMessages=fl;exports.apiCall=Pg;exports.applyScopeInternal=om;exports.buildLanguageTranslations=um;exports.buildTranslations=lm;exports.chatIsConnectedAtom=fo;exports.chatMessageListAtom=ms;exports.chatSocketAtom=co;exports.connectToSocket=Om;exports.createActionFactory=wp;exports.createAggregateRoot=Ep;exports.createNizzaLogger=Nb;exports.createPinoLogger=Yh;exports.createStore=Ak;exports.customFetch=vi;exports.downloadFile=Lg;exports.eventChatRoomService=Al;exports.fileOrigin=xb;exports.getAccount=gp;exports.getBrandiTagInternal=Jl;exports.getClientMetadata=np;exports.getClientTimeZone=tp;exports.getNizza=xi;exports.getRandomColor=xm;exports.getScriptParams=Qh;exports.getStore=Qy;exports.getTokenInternal=qi;exports.getUserFriendlyMessage=Qp;exports.i18Init=fm;exports.isClassProvider=im;exports.isFactoryProvider=sm;exports.isOptionalDependencyDef=Wl;exports.isValueProvider=rm;exports.jsDownload=Hf;exports.key=Iw;exports.normalizeChatMessage=ec;exports.optional=Pw;exports.registerTranslations=kS;exports.registerTranslationsOf=cm;exports.resolveConditionInternal=am;exports.resolveDependenciesInternal=wl;exports.runAddToCartHooks=xk;exports.runtimeList=jm;exports.searchParams=Xh;exports.shortId=wa;exports.sleep=Tb;exports.tag=Dw;exports.tokens=Lw;exports.useAccount=mp;exports.useAutorun=Wy;exports.useChatSocketActions=RE;exports.useChatSocketClient=FE;exports.useChatSocketHandlers=Rm;exports.useConnectChatSocket=Cm;exports.useEventChatRoom=Tm;exports.useMetaDataClient=_S;exports.useNZ=Zh;exports.useNizza=ep;exports.useReaction=Jy;exports.useSelect=Bh;exports.useStore=Xy;exports.validateRequiredProps=iv;
|
|
123
123
|
//# sourceMappingURL=index.cjs.map
|