@nizza/core 0.5.0-beta.12 → 0.5.0-beta.13

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.mjs CHANGED
@@ -1,1130 +1,6 @@
1
- var Qt = Object.defineProperty;
2
- var Gt = (n, e, t) => e in n ? Qt(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var R = (n, e, t) => (Gt(n, typeof e != "symbol" ? e + "" : e, t), t);
4
- import * as M from "react";
5
- import pe, { createContext as gt, useReducer as Kt, useEffect as kt, useDebugValue as Wt, useCallback as Jt, useContext as Oe, useMemo as qt } from "react";
6
- import { jsx as Ht } from "react/jsx-runtime";
7
- var _ = { NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
8
- let Zt = 0;
9
- function Xt(n, e) {
10
- const t = `atom${++Zt}`, i = {
11
- toString: () => t
12
- };
13
- return typeof n == "function" ? i.read = n : (i.init = n, i.read = function(a) {
14
- return a(this);
15
- }, i.write = function(a, s, r) {
16
- return s(
17
- this,
18
- typeof r == "function" ? r(a(this)) : r
19
- );
20
- }), e && (i.write = e), i;
21
- }
22
- const Se = (n) => "init" in n, ye = (n) => !!n.write, oe = /* @__PURE__ */ new WeakMap(), Yt = (n, e) => {
23
- oe.set(n, e), n.catch(() => {
24
- }).finally(() => oe.delete(n));
25
- }, _e = (n, e) => {
26
- const t = oe.get(n);
27
- t && (oe.delete(n), t(e));
28
- }, Ue = (n, e) => {
29
- n.status = "fulfilled", n.value = e;
30
- }, Me = (n, e) => {
31
- n.status = "rejected", n.reason = e;
32
- }, en = (n) => typeof (n == null ? void 0 : n.then) == "function", J = (n, e) => !!n && "v" in n && "v" in e && Object.is(n.v, e.v), $e = (n, e) => !!n && "e" in n && "e" in e && Object.is(n.e, e.e), z = (n) => !!n && "v" in n && n.v instanceof Promise, tn = (n, e) => "v" in n && "v" in e && n.v.orig && n.v.orig === e.v.orig, ie = (n) => {
33
- if ("e" in n)
34
- throw n.e;
35
- return n.v;
36
- }, vt = () => {
37
- const n = /* @__PURE__ */ new WeakMap(), e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new Map();
38
- let i, a;
39
- (_ ? "production" : void 0) !== "production" && (i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set());
40
- const s = (m) => n.get(m), r = (m, p) => {
41
- (_ ? "production" : void 0) !== "production" && Object.freeze(p);
42
- const h = n.get(m);
43
- if (n.set(m, p), t.has(m) || t.set(m, h), z(h)) {
44
- const g = "v" in p ? p.v instanceof Promise ? p.v : Promise.resolve(p.v) : Promise.reject(p.e);
45
- h.v !== g && _e(h.v, g);
46
- }
47
- }, o = (m, p, h) => {
48
- const g = /* @__PURE__ */ new Map();
49
- let b = !1;
50
- h.forEach((C, v) => {
51
- !C && v === m && (C = p), C ? (g.set(v, C), p.d.get(v) !== C && (b = !0)) : (_ ? "production" : void 0) !== "production" && console.warn("[Bug] atom state not found");
52
- }), (b || p.d.size !== g.size) && (p.d = g);
53
- }, l = (m, p, h) => {
54
- const g = s(m), b = {
55
- d: (g == null ? void 0 : g.d) || /* @__PURE__ */ new Map(),
56
- v: p
57
- };
58
- if (h && o(m, b, h), J(g, b) && g.d === b.d)
59
- return g;
60
- if (z(g) && z(b) && tn(g, b)) {
61
- if (g.d === b.d)
62
- return g;
63
- b.v = g.v;
64
- }
65
- return r(m, b), b;
66
- }, u = (m, p, h, g) => {
67
- if (en(p)) {
68
- let b;
69
- const C = () => {
70
- const E = s(m);
71
- if (!z(E) || E.v !== v)
72
- return;
73
- const P = l(
74
- m,
75
- v,
76
- h
77
- );
78
- e.has(m) && E.d !== P.d && D(m, P, E.d);
79
- }, v = new Promise((E, P) => {
80
- let x = !1;
81
- p.then(
82
- (T) => {
83
- x || (x = !0, Ue(v, T), E(T), C());
84
- },
85
- (T) => {
86
- x || (x = !0, Me(v, T), P(T), C());
87
- }
88
- ), b = (T) => {
89
- x || (x = !0, T.then(
90
- (V) => Ue(v, V),
91
- (V) => Me(v, V)
92
- ), E(T));
93
- };
94
- });
95
- return v.orig = p, v.status = "pending", Yt(v, (E) => {
96
- E && b(E), g == null || g();
97
- }), l(m, v, h);
98
- }
99
- return l(m, p, h);
100
- }, d = (m, p, h) => {
101
- const g = s(m), b = {
102
- d: (g == null ? void 0 : g.d) || /* @__PURE__ */ new Map(),
103
- e: p
104
- };
105
- return h && o(m, b, h), $e(g, b) && g.d === b.d ? g : (r(m, b), b);
106
- }, f = (m, p) => {
107
- const h = s(m);
108
- if (!p && h && (e.has(m) || Array.from(h.d).every(([x, T]) => {
109
- if (x === m)
110
- return !0;
111
- const V = f(x);
112
- return V === T || J(V, T);
113
- })))
114
- return h;
115
- const g = /* @__PURE__ */ new Map();
116
- let b = !0;
117
- const C = (x) => {
118
- if (x === m) {
119
- const V = s(x);
120
- if (V)
121
- return g.set(x, V), ie(V);
122
- if (Se(x))
123
- return g.set(x, void 0), x.init;
124
- throw new Error("no atom init");
125
- }
126
- const T = f(x);
127
- return g.set(x, T), ie(T);
128
- };
129
- let v, E;
130
- const P = {
131
- get signal() {
132
- return v || (v = new AbortController()), v.signal;
133
- },
134
- get setSelf() {
135
- return (_ ? "production" : void 0) !== "production" && !ye(m) && console.warn("setSelf function cannot be used with read-only atom"), !E && ye(m) && (E = (...x) => {
136
- if ((_ ? "production" : void 0) !== "production" && b && console.warn("setSelf function cannot be called in sync"), !b)
137
- return F(m, ...x);
138
- }), E;
139
- }
140
- };
141
- try {
142
- const x = m.read(C, P);
143
- return u(
144
- m,
145
- x,
146
- g,
147
- () => v == null ? void 0 : v.abort()
148
- );
149
- } catch (x) {
150
- return d(m, x, g);
151
- } finally {
152
- b = !1;
153
- }
154
- }, c = (m) => ie(f(m)), S = (m) => {
155
- let p = e.get(m);
156
- return p || (p = I(m)), p;
157
- }, y = (m, p) => !p.l.size && (!p.t.size || p.t.size === 1 && p.t.has(m)), k = (m) => {
158
- const p = e.get(m);
159
- p && y(m, p) && w(m);
160
- }, N = (m) => {
161
- const p = /* @__PURE__ */ new Map(), h = /* @__PURE__ */ new WeakMap(), g = (v) => {
162
- var E;
163
- const P = new Set((E = e.get(v)) == null ? void 0 : E.t);
164
- return t.forEach((x, T) => {
165
- var V;
166
- (V = s(T)) != null && V.d.has(v) && P.add(T);
167
- }), P;
168
- }, b = (v) => {
169
- g(v).forEach((E) => {
170
- E !== v && (p.set(
171
- E,
172
- (p.get(E) || /* @__PURE__ */ new Set()).add(v)
173
- ), h.set(E, (h.get(E) || 0) + 1), b(E));
174
- });
175
- };
176
- b(m);
177
- const C = (v) => {
178
- g(v).forEach((E) => {
179
- var P;
180
- if (E !== v) {
181
- let x = h.get(E);
182
- if (x && h.set(E, --x), !x) {
183
- let T = !!((P = p.get(E)) != null && P.size);
184
- if (T) {
185
- const V = s(E), ne = f(E, !0);
186
- T = !J(V, ne);
187
- }
188
- T || p.forEach((V) => V.delete(E));
189
- }
190
- C(E);
191
- }
192
- });
193
- };
194
- C(m);
195
- }, O = (m, ...p) => {
196
- let h = !0;
197
- const g = (v) => ie(f(v)), b = (v, ...E) => {
198
- let P;
199
- if (v === m) {
200
- if (!Se(v))
201
- throw new Error("atom not writable");
202
- const x = s(v), T = u(v, E[0]);
203
- J(x, T) || N(v);
204
- } else
205
- P = O(v, ...E);
206
- if (!h) {
207
- const x = L();
208
- (_ ? "production" : void 0) !== "production" && i.forEach(
209
- (T) => T({ type: "async-write", flushed: x })
210
- );
211
- }
212
- return P;
213
- }, C = m.write(g, b, ...p);
214
- return h = !1, C;
215
- }, F = (m, ...p) => {
216
- const h = O(m, ...p), g = L();
217
- return (_ ? "production" : void 0) !== "production" && i.forEach(
218
- (b) => b({ type: "write", flushed: g })
219
- ), h;
220
- }, I = (m, p, h) => {
221
- var g;
222
- const b = h || [];
223
- (g = s(m)) == null || g.d.forEach((v, E) => {
224
- const P = e.get(E);
225
- P ? P.t.add(m) : E !== m && I(E, m, b);
226
- }), f(m);
227
- const C = {
228
- t: new Set(p && [p]),
229
- l: /* @__PURE__ */ new Set()
230
- };
231
- if (e.set(m, C), (_ ? "production" : void 0) !== "production" && a.add(m), ye(m) && m.onMount) {
232
- const { onMount: v } = m;
233
- b.push(() => {
234
- const E = v((...P) => F(m, ...P));
235
- E && (C.u = E);
236
- });
237
- }
238
- return h || b.forEach((v) => v()), C;
239
- }, w = (m) => {
240
- var p;
241
- const h = (p = e.get(m)) == null ? void 0 : p.u;
242
- h && h(), e.delete(m), (_ ? "production" : void 0) !== "production" && a.delete(m);
243
- const g = s(m);
244
- g ? (z(g) && _e(g.v), g.d.forEach((b, C) => {
245
- if (C !== m) {
246
- const v = e.get(C);
247
- v && (v.t.delete(m), y(C, v) && w(C));
248
- }
249
- })) : (_ ? "production" : void 0) !== "production" && console.warn("[Bug] could not find atom state to unmount", m);
250
- }, D = (m, p, h) => {
251
- const g = new Set(p.d.keys());
252
- h == null || h.forEach((b, C) => {
253
- if (g.has(C)) {
254
- g.delete(C);
255
- return;
256
- }
257
- const v = e.get(C);
258
- v && (v.t.delete(m), y(C, v) && w(C));
259
- }), g.forEach((b) => {
260
- const C = e.get(b);
261
- C ? C.t.add(m) : e.has(m) && I(b, m);
262
- });
263
- }, L = () => {
264
- let m;
265
- for ((_ ? "production" : void 0) !== "production" && (m = /* @__PURE__ */ new Set()); t.size; ) {
266
- const p = Array.from(t);
267
- t.clear(), p.forEach(([h, g]) => {
268
- const b = s(h);
269
- if (b) {
270
- const C = e.get(h);
271
- C && b.d !== (g == null ? void 0 : g.d) && D(h, b, g == null ? void 0 : g.d), C && !// TODO This seems pretty hacky. Hope to fix it.
272
- // Maybe we could `mountDependencies` in `setAtomState`?
273
- (!z(g) && (J(g, b) || $e(g, b))) && (C.l.forEach((v) => v()), (_ ? "production" : void 0) !== "production" && m.add(h));
274
- } else
275
- (_ ? "production" : void 0) !== "production" && console.warn("[Bug] no atom state to flush");
276
- });
277
- }
278
- if ((_ ? "production" : void 0) !== "production")
279
- return m;
280
- }, A = (m, p) => {
281
- const h = S(m), g = L(), b = h.l;
282
- return b.add(p), (_ ? "production" : void 0) !== "production" && i.forEach(
283
- (C) => C({ type: "sub", flushed: g })
284
- ), () => {
285
- b.delete(p), k(m), (_ ? "production" : void 0) !== "production" && i.forEach((C) => C({ type: "unsub" }));
286
- };
287
- };
288
- return (_ ? "production" : void 0) !== "production" ? {
289
- get: c,
290
- set: F,
291
- sub: A,
292
- // store dev methods (these are tentative and subject to change without notice)
293
- dev_subscribe_store: (m, p) => {
294
- if (p !== 2)
295
- throw new Error("The current StoreListener revision is 2.");
296
- return i.add(m), () => {
297
- i.delete(m);
298
- };
299
- },
300
- dev_get_mounted_atoms: () => a.values(),
301
- dev_get_atom_state: (m) => n.get(m),
302
- dev_get_mounted: (m) => e.get(m),
303
- dev_restore_atoms: (m) => {
304
- for (const [h, g] of m)
305
- Se(h) && (u(h, g), N(h));
306
- const p = L();
307
- i.forEach(
308
- (h) => h({ type: "restore", flushed: p })
309
- );
310
- }
311
- } : {
312
- get: c,
313
- set: F,
314
- sub: A
315
- };
316
- };
317
- let Ne;
318
- (_ ? "production" : void 0) !== "production" && (typeof globalThis.__NUMBER_OF_JOTAI_INSTANCES__ == "number" ? ++globalThis.__NUMBER_OF_JOTAI_INSTANCES__ : globalThis.__NUMBER_OF_JOTAI_INSTANCES__ = 1);
319
- const nn = () => (Ne || ((_ ? "production" : void 0) !== "production" && globalThis.__NUMBER_OF_JOTAI_INSTANCES__ !== 1 && console.warn(
320
- "Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"
321
- ), Ne = vt()), Ne);
322
- var an = { NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
323
- const sn = gt(void 0), St = (n) => {
324
- const e = Oe(sn);
325
- return (n == null ? void 0 : n.store) || e || nn();
326
- }, rn = (n) => typeof (n == null ? void 0 : n.then) == "function", on = pe.use || ((n) => {
327
- if (n.status === "pending")
328
- throw n;
329
- if (n.status === "fulfilled")
330
- return n.value;
331
- throw n.status === "rejected" ? n.reason : (n.status = "pending", n.then(
332
- (e) => {
333
- n.status = "fulfilled", n.value = e;
334
- },
335
- (e) => {
336
- n.status = "rejected", n.reason = e;
337
- }
338
- ), n);
339
- });
340
- function ln(n, e) {
341
- const t = St(e), [[i, a, s], r] = Kt(
342
- (u) => {
343
- const d = t.get(n);
344
- return Object.is(u[0], d) && u[1] === t && u[2] === n ? u : [d, t, n];
345
- },
346
- void 0,
347
- () => [t.get(n), t, n]
348
- );
349
- let o = i;
350
- (a !== t || s !== n) && (r(), o = t.get(n));
351
- const l = e == null ? void 0 : e.delay;
352
- return kt(() => {
353
- const u = t.sub(n, () => {
354
- if (typeof l == "number") {
355
- setTimeout(r, l);
356
- return;
357
- }
358
- r();
359
- });
360
- return r(), u;
361
- }, [t, n, l]), Wt(o), rn(o) ? on(o) : o;
362
- }
363
- function dn(n, e) {
364
- const t = St(e);
365
- return Jt(
366
- (...a) => {
367
- if ((an ? "production" : void 0) !== "production" && !("write" in n))
368
- throw new Error("not writable atom");
369
- return t.set(n, ...a);
370
- },
371
- [t, n]
372
- );
373
- }
374
- function un(n, e) {
375
- return [
376
- ln(n, e),
377
- // We do wrong type assertion here, which results in throwing an error.
378
- dn(n, e)
379
- ];
380
- }
381
- const Re = Xt(null);
382
- Re.debugLabel = "accountAtom";
383
- var cn = { NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
384
- const {
385
- NZ_AWS_REGION: mn,
386
- NZ_BACKOFFICE_BACK_URL: fn,
387
- NZ_CORE_SERVICES_GRAPHQL_URL: pn,
388
- NZ_CORE_SERVICES_REST_URL: hn
389
- } = cn, gn = {
390
- AWS: {
391
- region: mn,
392
- cognito: {
393
- userPoolId: "us-east-1_knSlGEmJ0",
394
- userPoolWebClientId: "3hmbfhf7nl3kq20qr9i5lihf1p"
395
- }
396
- },
397
- // Back services
398
- apiUrls: {
399
- restV1: fn || "https://pabprg32bj.execute-api.us-east-1.amazonaws.com",
400
- restV2: hn || "https://core-services-dev.nizza.com/api",
401
- graphql: pn || "https://core-services-dev.nizza.com/graphql",
402
- corsProxy: "https://1qmd8jteh1.execute-api.us-east-1.amazonaws.com"
403
- },
404
- publicUrls: {
405
- // Public app url
406
- platformSite: "https://platformdev.nizza.com",
407
- // Nizza CDN
408
- nizzaCdn: "https://cdn.nizza.com",
409
- // Bundle
410
- bundleSite: "https://bundledev.nizza.com",
411
- // WSS IVS CHAT
412
- wssIVSChat: "wss://edge.ivschat.us-east-1.amazonaws.com"
413
- }
414
- };
415
- async function yt(n) {
416
- const {
417
- url: e,
418
- method: t = "GET",
419
- body: i,
420
- raw: a = !1,
421
- contentTypeJson: s = !0,
422
- timeout: r,
423
- ...o
424
- } = n, l = s && !n.headers ? new Headers({
425
- "content-type": "application/json"
426
- }) : n.headers;
427
- try {
428
- const u = new AbortController(), { signal: d } = u;
429
- let f;
430
- const c = fetch(e, {
431
- method: t,
432
- headers: l,
433
- body: i,
434
- signal: d,
435
- ...o
436
- });
437
- r && (f = setTimeout(() => {
438
- u.abort();
439
- }, r));
440
- const S = await c;
441
- if (a)
442
- return S;
443
- const y = await S.json();
444
- if (clearTimeout(f), !S.ok) {
445
- const k = y ? JSON.stringify(y) : S.statusText;
446
- throw new Error(k);
447
- }
448
- return y;
449
- } catch (u) {
450
- throw console.error("[CustomFetch] ", u), u;
451
- }
452
- }
453
- const Is = (n) => yt({ ...n, contentTypeJson: !1, raw: !1 });
454
- function Ds(n, e, t) {
455
- fetch(e).then((i) => i.blob()).then((i) => kn(i, `${n}.${t}`));
456
- }
457
- const kn = (n, e, t) => {
458
- const i = [n], a = new Blob(i, {
459
- type: t != null ? t : "application/octet-stream"
460
- });
461
- if (typeof window.navigator.msSaveBlob != "undefined")
462
- return window.navigator.msSaveBlob(a, e);
463
- const s = window.URL && window.URL.createObjectURL ? window.URL.createObjectURL(a) : window.webkitURL.createObjectURL(a), r = document.createElement("a");
464
- return r.style.display = "none", r.href = s, r.setAttribute("download", e), typeof r.download == "undefined" && r.setAttribute("target", "_blank"), document.body.appendChild(r), r.click(), setTimeout(() => {
465
- document.body.removeChild(r), window.URL.revokeObjectURL(s);
466
- }, 200);
467
- };
468
- var vn = { NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
469
- const je = (n) => {
470
- let e;
471
- const t = /* @__PURE__ */ new Set(), i = (l, u) => {
472
- const d = typeof l == "function" ? l(e) : l;
473
- if (!Object.is(d, e)) {
474
- const f = e;
475
- e = (u != null ? u : typeof d != "object" || d === null) ? d : Object.assign({}, e, d), t.forEach((c) => c(e, f));
476
- }
477
- }, a = () => e, o = { setState: i, getState: a, subscribe: (l) => (t.add(l), () => t.delete(l)), destroy: () => {
478
- (vn ? "production" : void 0) !== "production" && console.warn(
479
- "[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
480
- ), t.clear();
481
- } };
482
- return e = n(i, a, o), o;
483
- }, Sn = (n) => n ? je(n) : je;
484
- var Nt = typeof globalThis != "undefined" ? globalThis : typeof window != "undefined" ? window : typeof global != "undefined" ? global : typeof self != "undefined" ? self : {};
485
- function Te(n) {
486
- return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
487
- }
488
- var bt = { exports: {} }, Ft = {}, wt = { exports: {} }, Ct = {};
489
- /**
490
- * @license React
491
- * use-sync-external-store-shim.production.min.js
492
- *
493
- * Copyright (c) Facebook, Inc. and its affiliates.
494
- *
495
- * This source code is licensed under the MIT license found in the
496
- * LICENSE file in the root directory of this source tree.
497
- */
498
- var W = pe;
499
- function yn(n, e) {
500
- return n === e && (n !== 0 || 1 / n === 1 / e) || n !== n && e !== e;
501
- }
502
- var Nn = typeof Object.is == "function" ? Object.is : yn, bn = W.useState, Fn = W.useEffect, wn = W.useLayoutEffect, Cn = W.useDebugValue;
503
- function En(n, e) {
504
- var t = e(), i = bn({ inst: { value: t, getSnapshot: e } }), a = i[0].inst, s = i[1];
505
- return wn(function() {
506
- a.value = t, a.getSnapshot = e, be(a) && s({ inst: a });
507
- }, [n, t, e]), Fn(function() {
508
- return be(a) && s({ inst: a }), n(function() {
509
- be(a) && s({ inst: a });
510
- });
511
- }, [n]), Cn(t), t;
512
- }
513
- function be(n) {
514
- var e = n.getSnapshot;
515
- n = n.value;
516
- try {
517
- var t = e();
518
- return !Nn(n, t);
519
- } catch {
520
- return !0;
521
- }
522
- }
523
- function xn(n, e) {
524
- return e();
525
- }
526
- var On = typeof window == "undefined" || typeof window.document == "undefined" || typeof window.document.createElement == "undefined" ? xn : En;
527
- Ct.useSyncExternalStore = W.useSyncExternalStore !== void 0 ? W.useSyncExternalStore : On;
528
- wt.exports = Ct;
529
- var Et = wt.exports;
530
- /**
531
- * @license React
532
- * use-sync-external-store-shim/with-selector.production.min.js
533
- *
534
- * Copyright (c) Facebook, Inc. and its affiliates.
535
- *
536
- * This source code is licensed under the MIT license found in the
537
- * LICENSE file in the root directory of this source tree.
538
- */
539
- var he = pe, Rn = Et;
540
- function Tn(n, e) {
541
- return n === e && (n !== 0 || 1 / n === 1 / e) || n !== n && e !== e;
542
- }
543
- var In = typeof Object.is == "function" ? Object.is : Tn, Dn = Rn.useSyncExternalStore, Ln = he.useRef, An = he.useEffect, Pn = he.useMemo, Vn = he.useDebugValue;
544
- Ft.useSyncExternalStoreWithSelector = function(n, e, t, i, a) {
545
- var s = Ln(null);
546
- if (s.current === null) {
547
- var r = { hasValue: !1, value: null };
548
- s.current = r;
549
- } else
550
- r = s.current;
551
- s = Pn(function() {
552
- function l(S) {
553
- if (!u) {
554
- if (u = !0, d = S, S = i(S), a !== void 0 && r.hasValue) {
555
- var y = r.value;
556
- if (a(y, S))
557
- return f = y;
558
- }
559
- return f = S;
560
- }
561
- if (y = f, In(d, S))
562
- return y;
563
- var k = i(S);
564
- return a !== void 0 && a(y, k) ? y : (d = S, f = k);
565
- }
566
- var u = !1, d, f, c = t === void 0 ? null : t;
567
- return [function() {
568
- return l(e());
569
- }, c === null ? void 0 : function() {
570
- return l(c());
571
- }];
572
- }, [e, t, i, a]);
573
- var o = Dn(n, s[0], s[1]);
574
- return An(function() {
575
- r.hasValue = !0, r.value = o;
576
- }, [o]), Vn(o), o;
577
- };
578
- bt.exports = Ft;
579
- var _n = bt.exports;
580
- const Un = /* @__PURE__ */ Te(_n);
581
- var xt = { NZ_AWS_REGION: "us-east-1", NZ_VTEX_PROJECT: "/Users/jbermudez/TODO/PROJECTS/live-shopping", BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
582
- const { useDebugValue: Mn } = pe, { useSyncExternalStoreWithSelector: $n } = Un;
583
- let ze = !1;
584
- function jn(n, e = n.getState, t) {
585
- (xt ? "production" : void 0) !== "production" && t && !ze && (console.warn(
586
- "[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"
587
- ), ze = !0);
588
- const i = $n(
589
- n.subscribe,
590
- n.getState,
591
- n.getServerState || n.getState,
592
- e,
593
- t
594
- );
595
- return Mn(i), i;
596
- }
597
- const Be = (n) => {
598
- (xt ? "production" : void 0) !== "production" && typeof n != "function" && console.warn(
599
- "[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`."
600
- );
601
- const e = typeof n == "function" ? Sn(n) : n, t = (i, a) => jn(e, i, a);
602
- return Object.assign(t, e), t;
603
- }, zn = (n) => n ? Be(n) : Be;
604
- class Bn {
605
- constructor(e) {
606
- R(this, "channel");
607
- R(this, "listeners", /* @__PURE__ */ new Map());
608
- R(this, "eventQueue", /* @__PURE__ */ new Map());
609
- try {
610
- this.channel = new BroadcastChannel(e), this.channel.onmessage = (t) => this.handleMessage(t), this.channel.onmessageerror = (t) => X.error("NizzaBroadcastChannel:", t);
611
- } catch (t) {
612
- throw X.error("Failed to create NizzaBroadcastChannel:", t), t;
613
- }
614
- }
615
- /**
616
- * Subscribe a listener function to a specific event with wildcards.
617
- *
618
- * @param {string} event - The event name to subscribe to. You can use wildcards like 'user:*' or 'chat:**'.
619
- * @param {EventBusListener} listener - The listener function to handle the event.
620
- * @returns {EventBusSubscription} - A subscription object that includes the event name and the `off()` function for unsubscribing.
621
- * @example
622
- * const subscription = eventBus.on('user:*', (event) => {
623
- * console.log('User event:', event.name);
624
- * });
625
- * const chatSubscription = eventBus.on('chat:**', (event) => {
626
- * console.log('Chat event:', event.name);
627
- * });
628
- */
629
- on(e, t) {
630
- return this.subscribeToEvent(e, t), {
631
- off: () => this.unsubscribeFromEvent(e, t)
632
- };
633
- }
634
- /**
635
- * Emit an event through the BroadcastChannel.
636
- *
637
- * @param {string} event - The event name to emit.
638
- * @param {any} data - The data associated with the event.
639
- * @param {Attributes} attrs - Optional attributes associated with the event.
640
- * @example
641
- * // Emit a user login event
642
- * eventBus.emit('user:login', { username: 'user123' });
643
- *
644
- * // Emit a chat message event
645
- * eventBus.emit('chat:message', { text: 'Hello, world!' });
646
- */
647
- emit(e, t, i = {}) {
648
- this.emitEvent(e, t, i);
649
- }
650
- /**
651
- * Handle messages received through the BroadcastChannel and call the corresponding listener functions.
652
- *
653
- * @private
654
- * @param {MessageEvent} event - The received message event.
655
- */
656
- handleMessage(e) {
657
- const t = e.data, { name: i } = t;
658
- for (const [a, s] of this.listeners.entries())
659
- this.matchWildcard(a, i) && s.forEach(
660
- (r) => r({ ...t, wildcard: a })
661
- );
662
- }
663
- /**
664
- * Subscribe a listener function to a specific event.
665
- *
666
- * @private
667
- * @param {string} event - The event name to subscribe to.
668
- * @param {EventBusListener} listener - The listener function to handle the event.
669
- */
670
- subscribeToEvent(e, t) {
671
- if (typeof e != "string" || typeof t != "function") {
672
- const i = new Error("Invalid arguments");
673
- throw X.error(i), i;
674
- }
675
- for (const [i, a] of this.listeners.entries())
676
- if (this.matchWildcard(i, e)) {
677
- a.add(t);
678
- const s = this.eventQueue.get(i);
679
- s && (s.forEach((r) => {
680
- t({ ...r, wildcard: i });
681
- }), this.eventQueue.delete(i));
682
- return;
683
- }
684
- this.listeners.set(e, /* @__PURE__ */ new Set([t]));
685
- }
686
- /**
687
- * Emit an event and deliver it to the corresponding listeners.
688
- *
689
- * @private
690
- * @param {string} event - The event name to emit.
691
- * @param {any} data - The data associated with the event.
692
- * @param {Attributes} attrs - Optional attributes associated with the event.
693
- */
694
- emitEvent(e, t, i) {
695
- if (typeof e != "string") {
696
- const r = new Error("Invalid arguments");
697
- throw X.error(r), r;
698
- }
699
- const a = {
700
- name: e,
701
- data: t,
702
- attrs: i
703
- }, s = Array.from(this.getMatchingListeners(e));
704
- if (s.length)
705
- for (const [r, o] of s)
706
- o({ ...a, wildcard: r });
707
- else
708
- this.eventQueue.has(e) || this.eventQueue.set(e, []), this.eventQueue.get(e).push(a);
709
- this.channel.postMessage(a);
710
- }
711
- /**
712
- * Get listeners that match the event name pattern.
713
- *
714
- * @private
715
- * @param {string} event - The event name to match.
716
- * @returns {Iterable<[string, EventBusListener]>} - Iterable of matching listeners and their patterns.
717
- */
718
- *getMatchingListeners(e) {
719
- for (const [t, i] of this.listeners.entries())
720
- if (this.matchWildcard(t, e))
721
- for (const a of i)
722
- yield [t, a];
723
- }
724
- /**
725
- * Unsubscribe a listener function from a specific event.
726
- *
727
- * @private
728
- * @param {string} event - The event name to unsubscribe from.
729
- * @param {EventBusListener} listener - The listener function to unsubscribe.
730
- */
731
- unsubscribeFromEvent(e, t) {
732
- if (this.listeners.has(e)) {
733
- const i = this.listeners.get(e);
734
- i.delete(t), i.size === 0 && this.listeners.delete(e);
735
- }
736
- }
737
- /**
738
- * Match wildcards in event names.
739
- *
740
- * @private
741
- * @param {string} pattern - The wildcard pattern to match.
742
- * @param {string} eventName - The event name to check.
743
- * @returns {boolean} - `true` if the event name matches the pattern, otherwise `false`.
744
- */
745
- matchWildcard(e, t) {
746
- const i = e.replace(/\*/g, "[^:]*").replace(/\*\*/g, ".*");
747
- return new RegExp(`^${i}$`).test(t);
748
- }
749
- }
750
- let Qn = (n = 21) => crypto.getRandomValues(new Uint8Array(n)).reduce((e, t) => (t &= 63, t < 36 ? e += t.toString(36) : t < 62 ? e += (t - 26).toString(36).toUpperCase() : t > 62 ? e += "-" : e += "_", e), "");
751
- const Gn = (n = 8) => Qn(n), Ls = (n) => {
752
- const e = Object.entries(n).reduce((t, [i, a]) => a !== void 0 ? `${t}${t ? "&" : ""}${i}=${a}` : t, "");
753
- return e ? `?${e}` : "";
754
- };
755
- function As() {
756
- const n = new Error().stack.split(`
757
- `);
758
- return n.length < 3 ? "" : n[2].trim().substring(3);
759
- }
760
- var Ot = { exports: {} };
761
- (function(n) {
762
- (function(e, t) {
763
- n.exports ? n.exports = t() : e.log = t();
764
- })(Nt, function() {
765
- var e = function() {
766
- }, t = "undefined", i = typeof window !== t && typeof window.navigator !== t && /Trident\/|MSIE /.test(window.navigator.userAgent), a = [
767
- "trace",
768
- "debug",
769
- "info",
770
- "warn",
771
- "error"
772
- ];
773
- function s(k, N) {
774
- var O = k[N];
775
- if (typeof O.bind == "function")
776
- return O.bind(k);
777
- try {
778
- return Function.prototype.bind.call(O, k);
779
- } catch {
780
- return function() {
781
- return Function.prototype.apply.apply(O, [k, arguments]);
782
- };
783
- }
784
- }
785
- function r() {
786
- console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
787
- }
788
- function o(k) {
789
- return k === "debug" && (k = "log"), typeof console === t ? !1 : k === "trace" && i ? r : console[k] !== void 0 ? s(console, k) : console.log !== void 0 ? s(console, "log") : e;
790
- }
791
- function l(k, N) {
792
- for (var O = 0; O < a.length; O++) {
793
- var F = a[O];
794
- this[F] = O < k ? e : this.methodFactory(F, k, N);
795
- }
796
- this.log = this.debug;
797
- }
798
- function u(k, N, O) {
799
- return function() {
800
- typeof console !== t && (l.call(this, N, O), this[k].apply(this, arguments));
801
- };
802
- }
803
- function d(k, N, O) {
804
- return o(k) || u.apply(this, arguments);
805
- }
806
- function f(k, N, O) {
807
- var F = this, I;
808
- N = N == null ? "WARN" : N;
809
- var w = "loglevel";
810
- typeof k == "string" ? w += ":" + k : typeof k == "symbol" && (w = void 0);
811
- function D(p) {
812
- var h = (a[p] || "silent").toUpperCase();
813
- if (!(typeof window === t || !w)) {
814
- try {
815
- window.localStorage[w] = h;
816
- return;
817
- } catch {
818
- }
819
- try {
820
- window.document.cookie = encodeURIComponent(w) + "=" + h + ";";
821
- } catch {
822
- }
823
- }
824
- }
825
- function L() {
826
- var p;
827
- if (!(typeof window === t || !w)) {
828
- try {
829
- p = window.localStorage[w];
830
- } catch {
831
- }
832
- if (typeof p === t)
833
- try {
834
- var h = window.document.cookie, g = h.indexOf(
835
- encodeURIComponent(w) + "="
836
- );
837
- g !== -1 && (p = /^([^;]+)/.exec(h.slice(g))[1]);
838
- } catch {
839
- }
840
- return F.levels[p] === void 0 && (p = void 0), p;
841
- }
842
- }
843
- function A() {
844
- if (!(typeof window === t || !w)) {
845
- try {
846
- window.localStorage.removeItem(w);
847
- return;
848
- } catch {
849
- }
850
- try {
851
- window.document.cookie = encodeURIComponent(w) + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC";
852
- } catch {
853
- }
854
- }
855
- }
856
- F.name = k, F.levels = {
857
- TRACE: 0,
858
- DEBUG: 1,
859
- INFO: 2,
860
- WARN: 3,
861
- ERROR: 4,
862
- SILENT: 5
863
- }, F.methodFactory = O || d, F.getLevel = function() {
864
- return I;
865
- }, F.setLevel = function(p, h) {
866
- if (typeof p == "string" && F.levels[p.toUpperCase()] !== void 0 && (p = F.levels[p.toUpperCase()]), typeof p == "number" && p >= 0 && p <= F.levels.SILENT) {
867
- if (I = p, h !== !1 && D(p), l.call(F, p, k), typeof console === t && p < F.levels.SILENT)
868
- return "No console available for logging";
869
- } else
870
- throw "log.setLevel() called with invalid level: " + p;
871
- }, F.setDefaultLevel = function(p) {
872
- N = p, L() || F.setLevel(p, !1);
873
- }, F.resetLevel = function() {
874
- F.setLevel(N, !1), A();
875
- }, F.enableAll = function(p) {
876
- F.setLevel(F.levels.TRACE, p);
877
- }, F.disableAll = function(p) {
878
- F.setLevel(F.levels.SILENT, p);
879
- };
880
- var m = L();
881
- m == null && (m = N), F.setLevel(m, !1);
882
- }
883
- var c = new f(), S = {};
884
- c.getLogger = function(N) {
885
- if (typeof N != "symbol" && typeof N != "string" || N === "")
886
- throw new TypeError("You must supply a name when creating a logger.");
887
- var O = S[N];
888
- return O || (O = S[N] = new f(
889
- N,
890
- c.getLevel(),
891
- c.methodFactory
892
- )), O;
893
- };
894
- var y = typeof window !== t ? window.log : void 0;
895
- return c.noConflict = function() {
896
- return typeof window !== t && window.log === c && (window.log = y), c;
897
- }, c.getLoggers = function() {
898
- return S;
899
- }, c.default = c, c;
900
- });
901
- })(Ot);
902
- var Rt = Ot.exports;
903
- const ae = /* @__PURE__ */ Te(Rt);
904
- var Tt = { exports: {} };
905
- (function(n) {
906
- (function(e, t) {
907
- n.exports ? n.exports = t() : e.prefix = t(e);
908
- })(Nt, function(e) {
909
- var t = function(d) {
910
- for (var f = 1, c = arguments.length, S; f < c; f++)
911
- for (S in arguments[f])
912
- Object.prototype.hasOwnProperty.call(arguments[f], S) && (d[S] = arguments[f][S]);
913
- return d;
914
- }, i = {
915
- template: "[%t] %l:",
916
- levelFormatter: function(d) {
917
- return d.toUpperCase();
918
- },
919
- nameFormatter: function(d) {
920
- return d || "root";
921
- },
922
- timestampFormatter: function(d) {
923
- return d.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1");
924
- },
925
- format: void 0
926
- }, a, s = {}, r = function(d) {
927
- if (!d || !d.getLogger)
928
- throw new TypeError("Argument is not a root logger");
929
- a = d;
930
- }, o = function(d, f) {
931
- if (!d || !d.setLevel)
932
- throw new TypeError("Argument is not a logger");
933
- var c = d.methodFactory, S = d.name || "", y = s[S] || s[""] || i;
934
- function k(N, O, F) {
935
- var I = c(N, O, F), w = s[F] || s[""], D = w.template.indexOf("%t") !== -1, L = w.template.indexOf("%l") !== -1, A = w.template.indexOf("%n") !== -1;
936
- return function() {
937
- for (var m = "", p = arguments.length, h = Array(p), g = 0; g < p; g++)
938
- h[g] = arguments[g];
939
- if (S || !s[F]) {
940
- var b = w.timestampFormatter(/* @__PURE__ */ new Date()), C = w.levelFormatter(N), v = w.nameFormatter(F);
941
- w.format ? m += w.format(C, v, b) : (m += w.template, D && (m = m.replace(/%t/, b)), L && (m = m.replace(/%l/, C)), A && (m = m.replace(/%n/, v))), h.length && typeof h[0] == "string" ? h[0] = m + " " + h[0] : h.unshift(m);
942
- }
943
- I.apply(void 0, h);
944
- };
945
- }
946
- return s[S] || (d.methodFactory = k), f = f || {}, f.template && (f.format = void 0), s[S] = t({}, y, f), d.setLevel(d.getLevel()), a || d.warn(
947
- "It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"
948
- ), d;
949
- }, l = {
950
- reg: r,
951
- apply: o
952
- }, u;
953
- return e && (u = e.prefix, l.noConflict = function() {
954
- return e.prefix === l && (e.prefix = u), l;
955
- }), l;
956
- });
957
- })(Tt);
958
- var Kn = Tt.exports;
959
- const Qe = /* @__PURE__ */ Te(Kn), K = class K {
960
- constructor(e) {
961
- R(this, "defaultLevel", Rt.levels.INFO);
962
- R(this, "namePrefix");
963
- this.namePrefix = e ? `${e}-` : "", ae.setDefaultLevel(this.defaultLevel), Qe.reg(ae), Qe.apply(ae, {
964
- template: "[%t] %l (%n)",
965
- nameFormatter: (t) => {
966
- var i;
967
- return (i = t == null ? void 0 : t.toLowerCase()) != null ? i : "";
968
- },
969
- timestampFormatter: () => (/* @__PURE__ */ new Date()).toTimeString().slice(0, 8)
970
- });
971
- }
972
- static create(e) {
973
- const t = `${e}log`;
974
- return window != null && window[t] || (K.instance = new K(e), window[t] = K.instance), window[t];
975
- }
976
- createLogger(e) {
977
- const t = this.namePrefix + e.toLowerCase(), i = ae.getLogger(t), a = localStorage.getItem(`loglevel:${t}`);
978
- return a ? i.setLevel(a) : i.setLevel(this.defaultLevel), i;
979
- }
980
- };
981
- R(K, "instance");
982
- let we = K;
983
- const ge = we.create("nz"), Ps = ge.createLogger("main"), X = ge.createLogger("core");
984
- let j = { log: ge }, It;
985
- function Vs() {
986
- return j = Wn(), It = j.store, j;
987
- }
988
- function Wn() {
989
- if (!window.nizza) {
990
- const n = Jn();
991
- window.nizza = n, window.nz = n;
992
- }
993
- return window.nizza;
994
- }
995
- function Jn() {
996
- const n = zn(() => ({
997
- config: null
998
- }));
999
- return {
1000
- version: "1.0.4",
1001
- log: ge,
1002
- store: n,
1003
- configure: qn,
1004
- setProductDataSource: Hn,
1005
- instanceId: Gn(),
1006
- eventBus: new Bn("nizza"),
1007
- get state() {
1008
- return n.getState();
1009
- }
1010
- };
1011
- }
1012
- async function qn(n) {
1013
- try {
1014
- const e = j.store.getState().account;
1015
- if (j.store.setState({ config: n }), (e == null ? void 0 : e.account) !== n.account) {
1016
- const t = await na(n.account);
1017
- j.store.setState({ account: t });
1018
- }
1019
- if (n.getProductDataSource) {
1020
- const t = await n.getProductDataSource();
1021
- j.store.setState({ productDataSource: t });
1022
- }
1023
- } catch (e) {
1024
- console.error("Error configuring NizzaStore:", e);
1025
- }
1026
- }
1027
- function Hn(n) {
1028
- j.store.setState({ productDataSource: n });
1029
- }
1030
- function G(n) {
1031
- return n != null && typeof n == "object" && n["@@functional/placeholder"] === !0;
1032
- }
1033
- function re(n) {
1034
- return function e(t) {
1035
- return arguments.length === 0 || G(t) ? e : n.apply(this, arguments);
1036
- };
1037
- }
1038
- function Ie(n) {
1039
- return function e(t, i) {
1040
- switch (arguments.length) {
1041
- case 0:
1042
- return e;
1043
- case 1:
1044
- return G(t) ? e : re(function(a) {
1045
- return n(t, a);
1046
- });
1047
- default:
1048
- return G(t) && G(i) ? e : G(t) ? re(function(a) {
1049
- return n(a, i);
1050
- }) : G(i) ? re(function(a) {
1051
- return n(t, a);
1052
- }) : n(t, i);
1053
- }
1054
- };
1055
- }
1056
- const Zn = Number.isInteger || function(e) {
1057
- return e << 0 === e;
1058
- };
1059
- function Xn(n) {
1060
- return Object.prototype.toString.call(n) === "[object String]";
1061
- }
1062
- var Yn = /* @__PURE__ */ Ie(function(e, t) {
1063
- var i = e < 0 ? t.length + e : e;
1064
- return Xn(t) ? t.charAt(i) : t[i];
1065
- });
1066
- const ei = Yn;
1067
- var ti = /* @__PURE__ */ re(function(e) {
1068
- return e == null;
1069
- });
1070
- const ni = ti;
1071
- var ii = /* @__PURE__ */ Ie(function(e, t) {
1072
- return e.map(function(i) {
1073
- for (var a = t, s = 0, r; s < i.length; ) {
1074
- if (a == null)
1075
- return;
1076
- r = i[s], a = Zn(r) ? ei(r, a) : a[r], s += 1;
1077
- }
1078
- return a;
1079
- });
1080
- });
1081
- const ai = ii;
1082
- var si = /* @__PURE__ */ Ie(function(e, t) {
1083
- return ai([e], t)[0];
1084
- });
1085
- const ri = si;
1086
- class ke extends Error {
1087
- constructor(e, t, i) {
1088
- super(t), this.value = i, this.name = e;
1089
- }
1090
- toDTO() {
1091
- return {
1092
- name: this.name,
1093
- message: this.message,
1094
- ...this.value && { value: this.value }
1095
- };
1096
- }
1097
- }
1098
- class oi extends ke {
1099
- constructor(e) {
1100
- super(
1101
- "RESOURCE_NOT_FOUND_ERROR",
1102
- `Resource with id '${e}' not found.`,
1103
- e
1104
- );
1105
- }
1106
- }
1107
- class li extends ke {
1108
- constructor(e) {
1109
- var t;
1110
- super(
1111
- "APP_UNEXPECTED_ERROR",
1112
- (t = e.message) != null ? t : "An unexpected error occurred.",
1113
- e
1114
- );
1115
- }
1116
- }
1117
- class _s extends ke {
1118
- constructor() {
1119
- super("APP_ACCOUNT_INVALID_ERROR", "Account not defined");
1120
- }
1121
- }
1122
- class di extends ke {
1123
- constructor(e) {
1124
- super(
1125
- "INVALID_NIZZA_GLOBAL_OBJECT_ERROR",
1126
- `
1127
- Configuration property invalid: "${e}".
1
+ var Jo=Object.defineProperty;var Wo=(V,$,B)=>$ in V?Jo(V,$,{enumerable:!0,configurable:!0,writable:!0,value:B}):V[$]=B;var x=(V,$,B)=>(Wo(V,typeof $!="symbol"?$+"":$,B),B);import{environment as Ho}from"./__federation_expose_EnvsEnvironment-yHiDdOw7.js";import{importShared as M,__tla as Zo}from"./__federation_fn_import-_OlAogWs.js";import{r as ei,g as Be,c as ti}from"./__federation_shared_react-OrlvfACW.js";import{jsx as Xo}from"react/jsx-runtime";let Fe,Ge,ni,Qe,qe,Ke,Je,we,We,ii,ai,He,H,oi,si,Ze,Xe,Ye,Ce,et,Z,tt,nt,it,ri,at,li,oe,Ee,di,ot,st,rt,G,lt,ui,Te,ci,mi,dt,pi,ut,gi,ct,mt,pt,hi,z,ki,fi,gt,vi,ht,kt,yi,ft,Si,Ni,Yo=Promise.all([(()=>{try{return Zo}catch{}})()]).then(async()=>{var ze;var V={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};let $=0;function B(t,e){const n=`atom${++$}`,i={toString:()=>n};return typeof t=="function"?i.read=t:(i.init=t,i.read=bi,i.write=Fi),e&&(i.write=e),i}function bi(t){return t(this)}function Fi(t,e,n){return e(this,typeof n=="function"?n(t(this)):n)}const se=(t,e)=>t.unstable_is?t.unstable_is(e):e===t,Oe=t=>"init"in t,xe=t=>!!t.write,re=new WeakMap,wi=(t,e)=>{re.set(t,e),t.catch(()=>{}).finally(()=>re.delete(t))},vt=(t,e)=>{const n=re.get(t);n&&(re.delete(t),n(e))},yt=(t,e)=>{t.status="fulfilled",t.value=e},St=(t,e)=>{t.status="rejected",t.reason=e},Ci=t=>typeof(t==null?void 0:t.then)=="function",X=(t,e)=>!!t&&"v"in t&&"v"in e&&Object.is(t.v,e.v),Nt=(t,e)=>!!t&&"e"in t&&"e"in e&&Object.is(t.e,e.e),Q=t=>!!t&&"v"in t&&t.v instanceof Promise,Ei=(t,e)=>"v"in t&&"v"in e&&t.v.orig&&t.v.orig===e.v.orig,le=t=>{if("e"in t)throw t.e;return t.v},bt=()=>{const t=new WeakMap,e=new WeakMap,n=new Map;let i,a;(V?"production":void 0)!=="production"&&(i=new Set,a=new Set);const o=c=>t.get(c),s=(c,k)=>{(V?"production":void 0)!=="production"&&Object.freeze(k);const y=t.get(c);if(t.set(c,k),n.has(c)||n.set(c,y),Q(y)){const g="v"in k?k.v instanceof Promise?k.v:Promise.resolve(k.v):Promise.reject(k.e);y.v!==g&&vt(y.v,g)}},l=(c,k,y,g)=>{const h=new Map(g?k.d:null);let N=!1;y.forEach((v,F)=>{!v&&se(c,F)&&(v=k),v?(h.set(F,v),k.d.get(F)!==v&&(N=!0)):(V?"production":void 0)!=="production"&&console.warn("[Bug] atom state not found")}),(N||k.d.size!==h.size)&&(k.d=h)},r=(c,k,y,g)=>{const h=o(c),N={d:(h==null?void 0:h.d)||new Map,v:k};if(y&&l(c,N,y,g),X(h,N)&&h.d===N.d)return h;if(Q(h)&&Q(N)&&Ei(h,N)){if(h.d===N.d)return h;N.v=h.v}return s(c,N),N},d=(c,k,y,g)=>{if(Ci(k)){let h;const N=()=>{const F=o(c);if(!Q(F)||F.v!==v)return;const R=r(c,v,y);e.has(c)&&F.d!==R.d&&I(c,R,F.d)},v=new Promise((F,R)=>{let T=!1;k.then(D=>{T||(T=!0,yt(v,D),F(D),N())},D=>{T||(T=!0,St(v,D),R(D),N())}),h=D=>{T||(T=!0,D.then(_=>yt(v,_),_=>St(v,_)),F(D))}});return v.orig=k,v.status="pending",wi(v,F=>{F&&h(F),g==null||g()}),r(c,v,y,!0)}return r(c,k,y)},u=(c,k,y)=>{const g=o(c),h={d:(g==null?void 0:g.d)||new Map,e:k};return y&&l(c,h,y),Nt(g,h)&&g.d===h.d?g:(s(c,h),h)},m=(c,k)=>{const y=o(c);if(!k&&y&&(e.has(c)||Array.from(y.d).every(([T,D])=>{if(se(c,T))return!0;const _=m(T);return _===D||X(_,D)})))return y;const g=new Map;let h=!0;const N=T=>{if(se(c,T)){const _=o(T);if(_)return g.set(T,_),le(_);if(Oe(T))return g.set(T,void 0),T.init;throw new Error("no atom init")}const D=m(T);return g.set(T,D),le(D)};let v,F;const R={get signal(){return v||(v=new AbortController),v.signal},get setSelf(){return(V?"production":void 0)!=="production"&&!xe(c)&&console.warn("setSelf function cannot be used with read-only atom"),!F&&xe(c)&&(F=(...T)=>{if((V?"production":void 0)!=="production"&&h&&console.warn("setSelf function cannot be called in sync"),!h)return A(c,...T)}),F}};try{const T=c.read(N,R);return d(c,T,g,()=>v==null?void 0:v.abort())}catch(T){return u(c,T,g)}finally{h=!1}},p=c=>le(m(c)),f=c=>{let k=e.get(c);return k||(k=O(c)),k},w=(c,k)=>!k.l.size&&(!k.t.size||k.t.size===1&&k.t.has(c)),S=c=>{const k=e.get(c);k&&w(c,k)&&C(c)},E=c=>{const k=new Map,y=new WeakMap,g=v=>{var F;const R=new Set((F=e.get(v))==null?void 0:F.t);return n.forEach((T,D)=>{var _;(_=o(D))!=null&&_.d.has(v)&&R.add(D)}),R},h=v=>{g(v).forEach(F=>{F!==v&&(k.set(F,(k.get(F)||new Set).add(v)),y.set(F,(y.get(F)||0)+1),h(F))})};h(c);const N=v=>{g(v).forEach(F=>{var R;if(F!==v){let T=y.get(F);if(T&&y.set(F,--T),!T){let D=!!((R=k.get(F))!=null&&R.size);if(D){const _=o(F),Ko=m(F,!0);D=!X(_,Ko)}D||k.forEach(_=>_.delete(F))}N(F)}})};N(c)},b=(c,...k)=>{let y=!0;const g=v=>le(m(v)),h=(v,...F)=>{let R;if(se(c,v)){if(!Oe(v))throw new Error("atom not writable");const T=o(v),D=d(v,F[0]);X(T,D)||E(v)}else R=b(v,...F);if(!y){const T=P();(V?"production":void 0)!=="production"&&i.forEach(D=>D({type:"async-write",flushed:T}))}return R},N=c.write(g,h,...k);return y=!1,N},A=(c,...k)=>{const y=b(c,...k),g=P();return(V?"production":void 0)!=="production"&&i.forEach(h=>h({type:"write",flushed:g})),y},O=(c,k,y)=>{var g;const h=y||[];(g=o(c))==null||g.d.forEach((v,F)=>{const R=e.get(F);R?R.t.add(c):F!==c&&O(F,c,h)}),m(c);const N={t:new Set(k&&[k]),l:new Set};if(e.set(c,N),(V?"production":void 0)!=="production"&&a.add(c),xe(c)&&c.onMount){const{onMount:v}=c;h.push(()=>{const F=v((...R)=>A(c,...R));F&&(N.u=F)})}return y||h.forEach(v=>v()),N},C=c=>{var k;const y=(k=e.get(c))==null?void 0:k.u;y&&y(),e.delete(c),(V?"production":void 0)!=="production"&&a.delete(c);const g=o(c);g?(Q(g)&&vt(g.v),g.d.forEach((h,N)=>{if(N!==c){const v=e.get(N);v&&(v.t.delete(c),w(N,v)&&C(N))}})):(V?"production":void 0)!=="production"&&console.warn("[Bug] could not find atom state to unmount",c)},I=(c,k,y)=>{const g=new Set(k.d.keys()),h=new Set;y==null||y.forEach((N,v)=>{if(g.has(v)){g.delete(v);return}h.add(v);const F=e.get(v);F&&F.t.delete(c)}),g.forEach(N=>{const v=e.get(N);v?v.t.add(c):e.has(c)&&O(N,c)}),h.forEach(N=>{const v=e.get(N);v&&w(N,v)&&C(N)})},P=()=>{let c;for((V?"production":void 0)!=="production"&&(c=new Set);n.size;){const k=Array.from(n);n.clear(),k.forEach(([y,g])=>{const h=o(y);if(h){const N=e.get(y);N&&h.d!==(g==null?void 0:g.d)&&I(y,h,g==null?void 0:g.d),N&&!(!Q(g)&&(X(g,h)||Nt(g,h)))&&(N.l.forEach(v=>v()),(V?"production":void 0)!=="production"&&c.add(y))}else(V?"production":void 0)!=="production"&&console.warn("[Bug] no atom state to flush")})}if((V?"production":void 0)!=="production")return c},L=(c,k)=>{const y=f(c),g=P(),h=y.l;return h.add(k),(V?"production":void 0)!=="production"&&i.forEach(N=>N({type:"sub",flushed:g})),()=>{h.delete(k),S(c),(V?"production":void 0)!=="production"&&i.forEach(N=>N({type:"unsub"}))}};return(V?"production":void 0)!=="production"?{get:p,set:A,sub:L,dev_subscribe_store:(c,k)=>{if(k!==2)throw new Error("The current StoreListener revision is 2.");return i.add(c),()=>{i.delete(c)}},dev_get_mounted_atoms:()=>a.values(),dev_get_atom_state:c=>t.get(c),dev_get_mounted:c=>e.get(c),dev_restore_atoms:c=>{for(const[y,g]of c)Oe(y)&&(d(y,g),E(y));const k=P();i.forEach(y=>y({type:"restore",flushed:k}))}}:{get:p,set:A,sub:L}};let Re;(V?"production":void 0)!=="production"&&(typeof globalThis.__NUMBER_OF_JOTAI_INSTANCES__=="number"?++globalThis.__NUMBER_OF_JOTAI_INSTANCES__:globalThis.__NUMBER_OF_JOTAI_INSTANCES__=1);const Ti=()=>(Re||((V?"production":void 0)!=="production"&&globalThis.__NUMBER_OF_JOTAI_INSTANCES__!==1&&console.warn("Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044"),Re=bt()),Re);var Oi={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ft=await M("react"),{createContext:xi,useContext:Ri,useRef:es,createElement:ts,useReducer:Di,useEffect:Ii,useDebugValue:Li,useCallback:Ai}=Ft,Pi=xi(void 0),wt=t=>{const e=Ri(Pi);return(t==null?void 0:t.store)||e||Ti()},Vi=t=>typeof(t==null?void 0:t.then)=="function",_i=Ft.use||(t=>{if(t.status==="pending")throw t;if(t.status==="fulfilled")return t.value;throw t.status==="rejected"?t.reason:(t.status="pending",t.then(e=>{t.status="fulfilled",t.value=e},e=>{t.status="rejected",t.reason=e}),t)});function Ui(t,e){const n=wt(e),[[i,a,o],s]=Di(d=>{const u=n.get(t);return Object.is(d[0],u)&&d[1]===n&&d[2]===t?d:[u,n,t]},void 0,()=>[n.get(t),n,t]);let l=i;(a!==n||o!==t)&&(s(),l=n.get(t));const r=e==null?void 0:e.delay;return Ii(()=>{const d=n.sub(t,()=>{if(typeof r=="number"){setTimeout(s,r);return}s()});return s(),d},[n,t,r]),Li(l),Vi(l)?_i(l):l}function ji(t,e){const n=wt(e);return Ai((...i)=>{if((Oi?"production":void 0)!=="production"&&!("write"in t))throw new Error("not writable atom");return n.set(t,...i)},[n,t])}function $i(t,e){return[Ui(t,e),ji(t,e)]}oe=B(null),oe.debugLabel="accountAtom",Te=async function(t){const{url:e,method:n="GET",body:i,raw:a=!1,contentTypeJson:o=!0,timeout:s,...l}=t,r=o&&!t.headers?new Headers({"content-type":"application/json"}):t.headers;try{const d=new AbortController,{signal:u}=d;let m;const p=fetch(e,{method:n,headers:r,body:i,signal:u,...l});s&&(m=setTimeout(()=>{d.abort()},s));const f=await p;if(a)return f;const w=await f.json();if(clearTimeout(m),!f.ok){const S=w?JSON.stringify(w):f.statusText;throw new Error(S)}return w}catch(d){throw console.error("[CustomFetch] ",d),d}},di=t=>Te({...t,contentTypeJson:!1,raw:!1}),ci=function(t,e,n){fetch(e).then(i=>i.blob()).then(i=>pt(i,`${t}.${n}`))},pt=(t,e,n)=>{const i=[t],a=new Blob(i,{type:n!=null?n:"application/octet-stream"});if(typeof window.navigator.msSaveBlob<"u")return window.navigator.msSaveBlob(a,e);const o=window.URL&&window.URL.createObjectURL?window.URL.createObjectURL(a):window.webkitURL.createObjectURL(a),s=document.createElement("a");return s.style.display="none",s.href=o,s.setAttribute("download",e),typeof s.download>"u"&&s.setAttribute("target","_blank"),document.body.appendChild(s),s.click(),setTimeout(()=>{document.body.removeChild(s),window.URL.revokeObjectURL(o)},200)};var Mi={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const Ct=t=>{let e;const n=new Set,i=(l,r)=>{const d=typeof l=="function"?l(e):l;if(!Object.is(d,e)){const u=e;e=(r!=null?r:typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(m=>m(e,u))}},a=()=>e,o={setState:i,getState:a,getInitialState:()=>s,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{(Mi?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=e=t(i,a,o);return o},zi=t=>t?Ct(t):Ct;var Et={exports:{}},Tt={},Ot={exports:{}},xt={},q=ei;function Bi(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Gi=typeof Object.is=="function"?Object.is:Bi,Qi=q.useState,qi=q.useEffect,Ki=q.useLayoutEffect,Ji=q.useDebugValue;function Wi(t,e){var n=e(),i=Qi({inst:{value:n,getSnapshot:e}}),a=i[0].inst,o=i[1];return Ki(function(){a.value=n,a.getSnapshot=e,De(a)&&o({inst:a})},[t,n,e]),qi(function(){return De(a)&&o({inst:a}),t(function(){De(a)&&o({inst:a})})},[t]),Ji(n),n}function De(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Gi(t,n)}catch{return!0}}function Hi(t,e){return e()}var Zi=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Hi:Wi;xt.useSyncExternalStore=q.useSyncExternalStore!==void 0?q.useSyncExternalStore:Zi,Ot.exports=xt;var Rt=Ot.exports,de=ei,Xi=Rt;function Yi(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var ea=typeof Object.is=="function"?Object.is:Yi,ta=Xi.useSyncExternalStore,na=de.useRef,ia=de.useEffect,aa=de.useMemo,oa=de.useDebugValue;Tt.useSyncExternalStoreWithSelector=function(t,e,n,i,a){var o=na(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=aa(function(){function r(f){if(!d){if(d=!0,u=f,f=i(f),a!==void 0&&s.hasValue){var w=s.value;if(a(w,f))return m=w}return m=f}if(w=m,ea(u,f))return w;var S=i(f);return a!==void 0&&a(w,S)?w:(u=f,m=S)}var d=!1,u,m,p=n===void 0?null:n;return[function(){return r(e())},p===null?void 0:function(){return r(p())}]},[e,n,i,a]);var l=ta(t,o[0],o[1]);return ia(function(){s.hasValue=!0,s.value=l},[l]),oa(l),l},Et.exports=Tt;var sa=Et.exports;const ra=Be(sa);var Dt={NZ_AWS_REGION:"us-east-1",NZ_VTEX_PROJECT:"/Users/jbermudez/TODO/PROJECTS/live-shopping",BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const la=await M("react"),{useDebugValue:da}=la,{useSyncExternalStoreWithSelector:ua}=ra;let It=!1;const ca=t=>t;function ma(t,e=ca,n){(Dt?"production":void 0)!=="production"&&n&&!It&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),It=!0);const i=ua(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return da(i),i}const Lt=t=>{(Dt?"production":void 0)!=="production"&&typeof t!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const e=typeof t=="function"?zi(t):t,n=(i,a)=>ma(e,i,a);return Object.assign(n,e),n},pa=t=>t?Lt(t):Lt;He=class{constructor(t){x(this,"channel");x(this,"listeners",new Map);x(this,"eventQueue",new Map);try{this.channel=new BroadcastChannel(t),this.channel.onmessage=e=>this.handleMessage(e),this.channel.onmessageerror=e=>G.error("NizzaBroadcastChannel:",e)}catch(e){throw G.error("Failed to create NizzaBroadcastChannel:",e),e}}on(t,e){return this.subscribeToEvent(t,e),{off:()=>this.unsubscribeFromEvent(t,e)}}emit(t,e,n={}){this.emitEvent(t,e,n)}handleMessage(t){const e=t.data,{name:n}=e;for(const[i,a]of this.listeners.entries())this.matchWildcard(i,n)&&a.forEach(o=>o({...e,wildcard:i}))}subscribeToEvent(t,e){if(typeof t!="string"||typeof e!="function"){const n=new Error("Invalid arguments");throw G.error(n),n}for(const[n,i]of this.listeners.entries())if(this.matchWildcard(n,t)){i.add(e);const a=this.eventQueue.get(n);a&&(a.forEach(o=>{e({...o,wildcard:n})}),this.eventQueue.delete(n));return}this.listeners.set(t,new Set([e]))}emitEvent(t,e,n){if(typeof t!="string"){const o=new Error("Invalid arguments");throw G.error(o),o}const i={name:t,data:e,attrs:n},a=Array.from(this.getMatchingListeners(t));if(a.length)for(const[o,s]of a)s({...i,wildcard:o});else this.eventQueue.has(t)||this.eventQueue.set(t,[]),this.eventQueue.get(t).push(i);this.channel.postMessage(i)}*getMatchingListeners(t){for(const[e,n]of this.listeners.entries())if(this.matchWildcard(e,t))for(const i of n)yield[e,i]}unsubscribeFromEvent(t,e){if(this.listeners.has(t)){const n=this.listeners.get(t);n.delete(e),n.size===0&&this.listeners.delete(t)}}matchWildcard(t,e){const n=t.replace(/\*/g,"[^:]*").replace(/\*\*/g,".*");return new RegExp(`^${n}$`).test(e)}};let ga=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce((e,n)=>(n&=63,n<36?e+=n.toString(36):n<62?e+=(n-26).toString(36).toUpperCase():n>62?e+="-":e+="_",e),"");kt=(t=8)=>ga(t),vi=t=>{const e=Object.entries(t).reduce((n,[i,a])=>a!==void 0?`${n}${n?"&":""}${i}=${a}`:n,"");return e?`?${e}`:""},mi=function(){const t=new Error().stack.split(`
2
+ `);return t.length<3?"":t[2].trim().substring(3)};var At={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.log=n()})(ti,function(){var e=function(){},n="undefined",i=typeof window!==n&&typeof window.navigator!==n&&/Trident\/|MSIE /.test(window.navigator.userAgent),a=["trace","debug","info","warn","error"],o={},s=null;function l(S,E){var b=S[E];if(typeof b.bind=="function")return b.bind(S);try{return Function.prototype.bind.call(b,S)}catch{return function(){return Function.prototype.apply.apply(b,[S,arguments])}}}function r(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function d(S){return S==="debug"&&(S="log"),typeof console===n?!1:S==="trace"&&i?r:console[S]!==void 0?l(console,S):console.log!==void 0?l(console,"log"):e}function u(){for(var S=this.getLevel(),E=0;E<a.length;E++){var b=a[E];this[b]=E<S?e:this.methodFactory(b,S,this.name)}if(this.log=this.debug,typeof console===n&&S<this.levels.SILENT)return"No console available for logging"}function m(S){return function(){typeof console!==n&&(u.call(this),this[S].apply(this,arguments))}}function p(S,E,b){return d(S)||m.apply(this,arguments)}function f(S,E){var b=this,A,O,C,I="loglevel";typeof S=="string"?I+=":"+S:typeof S=="symbol"&&(I=void 0);function P(g){var h=(a[g]||"silent").toUpperCase();if(!(typeof window===n||!I)){try{window.localStorage[I]=h;return}catch{}try{window.document.cookie=encodeURIComponent(I)+"="+h+";"}catch{}}}function L(){var g;if(!(typeof window===n||!I)){try{g=window.localStorage[I]}catch{}if(typeof g===n)try{var h=window.document.cookie,N=encodeURIComponent(I),v=h.indexOf(N+"=");v!==-1&&(g=/^([^;]+)/.exec(h.slice(v+N.length+1))[1])}catch{}return b.levels[g]===void 0&&(g=void 0),g}}function c(){if(!(typeof window===n||!I)){try{window.localStorage.removeItem(I)}catch{}try{window.document.cookie=encodeURIComponent(I)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function k(g){var h=g;if(typeof h=="string"&&b.levels[h.toUpperCase()]!==void 0&&(h=b.levels[h.toUpperCase()]),typeof h=="number"&&h>=0&&h<=b.levels.SILENT)return h;throw new TypeError("log.setLevel() called with invalid level: "+g)}b.name=S,b.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},b.methodFactory=E||p,b.getLevel=function(){var g;return(g=C!=null?C:O)!=null?g:A},b.setLevel=function(g,h){return C=k(g),h!==!1&&P(C),u.call(b)},b.setDefaultLevel=function(g){O=k(g),L()||b.setLevel(g,!1)},b.resetLevel=function(){C=null,c(),u.call(b)},b.enableAll=function(g){b.setLevel(b.levels.TRACE,g)},b.disableAll=function(g){b.setLevel(b.levels.SILENT,g)},b.rebuild=function(){if(s!==b&&(A=k(s.getLevel())),u.call(b),s===b)for(var g in o)o[g].rebuild()},A=k(s?s.getLevel():"WARN");var y=L();y!=null&&(C=k(y)),u.call(b)}s=new f,s.getLogger=function(S){if(typeof S!="symbol"&&typeof S!="string"||S==="")throw new TypeError("You must supply a name when creating a logger.");var E=o[S];return E||(E=o[S]=new f(S,s.methodFactory)),E};var w=typeof window!==n?window.log:void 0;return s.noConflict=function(){return typeof window!==n&&window.log===s&&(window.log=w),s},s.getLoggers=function(){return o},s.default=s,s})})(At);var Pt=At.exports;const ue=Be(Pt);var Vt={exports:{}};(function(t){(function(e,n){t.exports?t.exports=n():e.prefix=n(e)})(ti,function(e){var n=function(u){for(var m=1,p=arguments.length,f;m<p;m++)for(f in arguments[m])Object.prototype.hasOwnProperty.call(arguments[m],f)&&(u[f]=arguments[m][f]);return u},i={template:"[%t] %l:",levelFormatter:function(u){return u.toUpperCase()},nameFormatter:function(u){return u||"root"},timestampFormatter:function(u){return u.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")},format:void 0},a,o={},s=function(u){if(!u||!u.getLogger)throw new TypeError("Argument is not a root logger");a=u},l=function(u,m){if(!u||!u.setLevel)throw new TypeError("Argument is not a logger");var p=u.methodFactory,f=u.name||"",w=o[f]||o[""]||i;function S(E,b,A){var O=p(E,b,A),C=o[A]||o[""],I=C.template.indexOf("%t")!==-1,P=C.template.indexOf("%l")!==-1,L=C.template.indexOf("%n")!==-1;return function(){for(var c="",k=arguments.length,y=Array(k),g=0;g<k;g++)y[g]=arguments[g];if(f||!o[A]){var h=C.timestampFormatter(new Date),N=C.levelFormatter(E),v=C.nameFormatter(A);C.format?c+=C.format(N,v,h):(c+=C.template,I&&(c=c.replace(/%t/,h)),P&&(c=c.replace(/%l/,N)),L&&(c=c.replace(/%n/,v))),y.length&&typeof y[0]=="string"?y[0]=c+" "+y[0]:y.unshift(c)}O.apply(void 0,y)}}return o[f]||(u.methodFactory=S),m=m||{},m.template&&(m.format=void 0),o[f]=n({},w,m),u.setLevel(u.getLevel()),a||u.warn("It is necessary to call the function reg() of loglevel-plugin-prefix before calling apply. From the next release, it will throw an error. See more: https://github.com/kutuluk/loglevel-plugin-prefix/blob/master/README.md"),u},r={reg:s,apply:l},d;return e&&(d=e.prefix,r.noConflict=function(){return e.prefix===r&&(e.prefix=d),r}),r})})(Vt);var ha=Vt.exports;const _t=Be(ha);Z=(ze=class{constructor(t){x(this,"defaultLevel",Pt.levels.INFO);x(this,"namePrefix");this.namePrefix=t?`${t}-`:"",ue.setDefaultLevel(this.defaultLevel),_t.reg(ue),_t.apply(ue,{template:"[%t] %l (%n)",nameFormatter:e=>{var n;return(n=e==null?void 0:e.toLowerCase())!=null?n:""},timestampFormatter:()=>new Date().toTimeString().slice(0,8)})}static create(t){const e=`${t}log`;return window!=null&&window[e]||(Z.instance=new Z(t),window[e]=Z.instance),window[e]}createLogger(t){const e=this.namePrefix+t.toLowerCase(),n=ue.getLogger(e),i=localStorage.getItem(`loglevel:${e}`);return i?n.setLevel(i):n.setLevel(this.defaultLevel),n}},x(ze,"instance"),ze);let ce;ce=Z.create("nz"),hi=ce.createLogger("main"),G=ce.createLogger("core"),z=ut(),ft=z.store,ki=function(){return z},ut=function(){if(!window.nizza){const t=ka();window.nizza=t,window.nz=t}return window.nizza};function ka(){const t=pa(()=>({config:null}));return{version:"1.0.4",log:ce,store:t,configure:rt,setProductDataSource:ht,instanceId:kt(),eventBus:new He("nizza"),get state(){return t.getState()}}}rt=async function(t){try{const e=z.store.getState().account;if(z.store.setState({config:t}),(e==null?void 0:e.account)!==t.account){const n=await dt(t.account);z.store.setState({account:n})}if(t.getProductDataSource){const n=await t.getProductDataSource();z.store.setState({productDataSource:n})}}catch(e){console.error("Error configuring NizzaStore:",e)}},ht=function(t){z.store.setState({productDataSource:t})};function K(t){return t!=null&&typeof t=="object"&&t["@@functional/placeholder"]===!0}function me(t){return function e(n){return arguments.length===0||K(n)?e:t.apply(this,arguments)}}function Ie(t){return function e(n,i){switch(arguments.length){case 0:return e;case 1:return K(n)?e:me(function(a){return t(n,a)});default:return K(n)&&K(i)?e:K(n)?me(function(a){return t(a,i)}):K(i)?me(function(a){return t(n,a)}):t(n,i)}}}const fa=Number.isInteger||function(t){return t<<0===t};function va(t){return Object.prototype.toString.call(t)==="[object String]"}var ya=Ie(function(t,e){var n=t<0?e.length+t:t;return va(e)?e.charAt(n):e[n]}),Sa=me(function(t){return t==null}),Na=Ie(function(t,e){return t.map(function(n){for(var i=e,a=0,o;a<n.length;){if(i==null)return;o=n[a],i=fa(o)?ya(o,i):i[o],a+=1}return i})}),ba=Ie(function(t,e){return Na([t],e)[0]});H=class extends Error{constructor(t,e,n){super(e),this.value=n,this.name=t}toDTO(){return{name:this.name,message:this.message,...this.value&&{value:this.value}}}},it=class extends H{constructor(t){super("RESOURCE_NOT_FOUND_ERROR",`Resource with id '${t}' not found.`,t)}},at=class extends H{constructor(t){var e;super("APP_UNEXPECTED_ERROR",(e=t.message)!=null?e:"An unexpected error occurred.",t)}},ni=class extends H{constructor(){super("APP_ACCOUNT_INVALID_ERROR","Account not defined")}},Xe=class extends H{constructor(t){super("INVALID_NIZZA_GLOBAL_OBJECT_ERROR",`
3
+ Configuration property invalid: "${t}".
1128
4
 
1129
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".
1130
6
 
@@ -1143,2813 +19,4 @@ class di extends ke {
1143
19
  account: env.account,
1144
20
  ...
1145
21
  });
1146
- `
1147
- );
1148
- }
1149
- }
1150
- function Us(n, e) {
1151
- e.forEach((t) => {
1152
- if (ni(ri(t.split("."), n)))
1153
- throw new di(t);
1154
- });
1155
- }
1156
- function Ms() {
1157
- var i, a, s;
1158
- let n = null, e = null, t = null;
1159
- try {
1160
- n = (s = (a = (i = Intl.DateTimeFormat()) == null ? void 0 : i.resolvedOptions()) == null ? void 0 : a.timeZone) != null ? s : null;
1161
- const r = -(/* @__PURE__ */ new Date()).getTimezoneOffset();
1162
- t = r;
1163
- const o = r >= 0 ? "+" : "-", l = String(
1164
- Math.floor(Math.abs(r) / 60)
1165
- ).padStart(2, "0"), u = String(Math.abs(r) % 60).padStart(
1166
- 2,
1167
- "0"
1168
- );
1169
- e = `${o}${l}:${u}`;
1170
- } catch {
1171
- X.error("Error obtaining time zone or offset");
1172
- }
1173
- return {
1174
- offset: e,
1175
- offsetValue: t,
1176
- value: n,
1177
- country: null,
1178
- included: null,
1179
- label: null
1180
- };
1181
- }
1182
- class ui {
1183
- constructor(e) {
1184
- R(this, "aggregate");
1185
- R(this, "_numSetPropsApplied", 0);
1186
- this.aggregate = e;
1187
- }
1188
- setProps(e) {
1189
- for (const [t, i] of Object.entries(e))
1190
- t in this.aggregate && (this.aggregate[t] = i);
1191
- this._numSetPropsApplied++;
1192
- }
1193
- get isFirstSetProps() {
1194
- return this._numSetPropsApplied === 1;
1195
- }
1196
- }
1197
- function ci(n) {
1198
- return new ui(n);
1199
- }
1200
- class $s {
1201
- }
1202
- class js {
1203
- constructor(e) {
1204
- R(this, "_value");
1205
- e !== void 0 && (this._value = e);
1206
- }
1207
- get value() {
1208
- return this._value;
1209
- }
1210
- }
1211
- var Dt = /* @__PURE__ */ ((n) => (n.VTEX = "VTEX", n.VTEX_IO = "VTEX-IO", n.VTEX_CMS = "PORTAL-VTEX", n.PLATFORM = "PLATFORM", n.UNKNOWN = "UNKNOWN", n))(Dt || {}), mi = /* @__PURE__ */ ((n) => (n.PLATFORM = "platform_module", n.ADENDA = "subscription_module", n.APP_STORE = "app_store", n))(mi || {}), Lt = /* @__PURE__ */ ((n) => (n.ACTIVE = "active_contract", n.INACTIVE = "inactive_contract", n))(Lt || {}), fi = /* @__PURE__ */ ((n) => (n.LITE = "lite", n.STANDARD = "standard", n.PRO = "pro", n))(fi || {}), pi = /* @__PURE__ */ ((n) => (n.LITE = "PLAN_LITE", n.STANDARD = "PLAN_ESTANDAR", n.PRO = "PLAN_PRO", n.NONE = "NO_PLAN", n))(pi || {}), hi = /* @__PURE__ */ ((n) => (n.PAST = "past", n.LIVE = "live", n.FUTURE = "future", n))(hi || {});
1212
- class De {
1213
- constructor(e) {
1214
- R(this, "root", ci(this));
1215
- R(this, "id");
1216
- R(this, "account");
1217
- R(this, "accountType", Dt.UNKNOWN);
1218
- R(this, "username");
1219
- R(this, "currencyConfig");
1220
- R(this, "contractType");
1221
- R(this, "nextDateMetricRecord");
1222
- R(this, "spendedMinutes", 0);
1223
- R(this, "unlimitedService", !1);
1224
- R(this, "hoursAvailable", 0);
1225
- R(this, "contractStatus", Lt.ACTIVE);
1226
- R(this, "createdAt");
1227
- R(this, "installationDateApp");
1228
- R(this, "cxAccount");
1229
- R(this, "freeService", !1);
1230
- R(this, "subscriptionType", null);
1231
- R(this, "minutesAvailable", 0);
1232
- R(this, "globalPage");
1233
- R(this, "stripe");
1234
- R(this, "descriptionPlan");
1235
- R(this, "planType");
1236
- R(this, "selectFreeTrial");
1237
- R(this, "exceededFeatures");
1238
- R(this, "host", null);
1239
- this.root.setProps(e);
1240
- }
1241
- static toDomain(e) {
1242
- const { createdAt: t, username: i, ...a } = e, s = {
1243
- ...a,
1244
- username: i != null ? i : a.account,
1245
- createdAt: new Date(Number(t))
1246
- };
1247
- return new De(s);
1248
- }
1249
- toPrimitives() {
1250
- const { root: e, createdAt: t, ...i } = this;
1251
- return {
1252
- ...i,
1253
- created: t.toISOString()
1254
- };
1255
- }
1256
- }
1257
- const gi = `${gn.apiUrls.restV1}/accounts/v2`;
1258
- class ki {
1259
- async get(e) {
1260
- const t = `${gi}/${e}`, { data: i } = await yt({
1261
- url: t
1262
- });
1263
- return i ? De.toDomain(i) : null;
1264
- }
1265
- }
1266
- class vi {
1267
- constructor(e) {
1268
- this.accountRepository = e;
1269
- }
1270
- async get(e) {
1271
- try {
1272
- const t = await this.accountRepository.get(e);
1273
- if (!t)
1274
- throw new oi(e);
1275
- return t;
1276
- } catch (t) {
1277
- throw new li(t);
1278
- }
1279
- }
1280
- }
1281
- const Si = new ki(), At = new vi(Si);
1282
- class Le {
1283
- constructor() {
1284
- this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
1285
- }
1286
- subscribe(e) {
1287
- const t = {
1288
- listener: e
1289
- };
1290
- return this.listeners.add(t), this.onSubscribe(), () => {
1291
- this.listeners.delete(t), this.onUnsubscribe();
1292
- };
1293
- }
1294
- hasListeners() {
1295
- return this.listeners.size > 0;
1296
- }
1297
- onSubscribe() {
1298
- }
1299
- onUnsubscribe() {
1300
- }
1301
- }
1302
- const le = typeof window == "undefined" || "Deno" in window;
1303
- function yi() {
1304
- }
1305
- function Ge(n) {
1306
- return typeof n == "number" && n >= 0 && n !== 1 / 0;
1307
- }
1308
- function Ni(n, e) {
1309
- return Math.max(n + (e || 0) - Date.now(), 0);
1310
- }
1311
- function bi(n, e, t) {
1312
- return Fi(n) ? typeof e == "function" ? {
1313
- ...t,
1314
- queryKey: n,
1315
- queryFn: e
1316
- } : {
1317
- ...e,
1318
- queryKey: n
1319
- } : n;
1320
- }
1321
- function Pt(n, e) {
1322
- if (n === e)
1323
- return n;
1324
- const t = Ke(n) && Ke(e);
1325
- if (t || We(n) && We(e)) {
1326
- const i = t ? n.length : Object.keys(n).length, a = t ? e : Object.keys(e), s = a.length, r = t ? [] : {};
1327
- let o = 0;
1328
- for (let l = 0; l < s; l++) {
1329
- const u = t ? l : a[l];
1330
- r[u] = Pt(n[u], e[u]), r[u] === n[u] && o++;
1331
- }
1332
- return i === s && o === i ? n : r;
1333
- }
1334
- return e;
1335
- }
1336
- function Ce(n, e) {
1337
- if (n && !e || e && !n)
1338
- return !1;
1339
- for (const t in n)
1340
- if (n[t] !== e[t])
1341
- return !1;
1342
- return !0;
1343
- }
1344
- function Ke(n) {
1345
- return Array.isArray(n) && n.length === Object.keys(n).length;
1346
- }
1347
- function We(n) {
1348
- if (!Je(n))
1349
- return !1;
1350
- const e = n.constructor;
1351
- if (typeof e == "undefined")
1352
- return !0;
1353
- const t = e.prototype;
1354
- return !(!Je(t) || !t.hasOwnProperty("isPrototypeOf"));
1355
- }
1356
- function Je(n) {
1357
- return Object.prototype.toString.call(n) === "[object Object]";
1358
- }
1359
- function Fi(n) {
1360
- return Array.isArray(n);
1361
- }
1362
- function wi(n) {
1363
- return new Promise((e) => {
1364
- setTimeout(e, n);
1365
- });
1366
- }
1367
- function qe(n) {
1368
- wi(0).then(n);
1369
- }
1370
- function He(n, e, t) {
1371
- return t.isDataEqual != null && t.isDataEqual(n, e) ? n : typeof t.structuralSharing == "function" ? t.structuralSharing(n, e) : t.structuralSharing !== !1 ? Pt(n, e) : e;
1372
- }
1373
- class Ci extends Le {
1374
- constructor() {
1375
- super(), this.setup = (e) => {
1376
- if (!le && window.addEventListener) {
1377
- const t = () => e();
1378
- return window.addEventListener("visibilitychange", t, !1), window.addEventListener("focus", t, !1), () => {
1379
- window.removeEventListener("visibilitychange", t), window.removeEventListener("focus", t);
1380
- };
1381
- }
1382
- };
1383
- }
1384
- onSubscribe() {
1385
- this.cleanup || this.setEventListener(this.setup);
1386
- }
1387
- onUnsubscribe() {
1388
- if (!this.hasListeners()) {
1389
- var e;
1390
- (e = this.cleanup) == null || e.call(this), this.cleanup = void 0;
1391
- }
1392
- }
1393
- setEventListener(e) {
1394
- var t;
1395
- this.setup = e, (t = this.cleanup) == null || t.call(this), this.cleanup = e((i) => {
1396
- typeof i == "boolean" ? this.setFocused(i) : this.onFocus();
1397
- });
1398
- }
1399
- setFocused(e) {
1400
- this.focused !== e && (this.focused = e, this.onFocus());
1401
- }
1402
- onFocus() {
1403
- this.listeners.forEach(({
1404
- listener: e
1405
- }) => {
1406
- e();
1407
- });
1408
- }
1409
- isFocused() {
1410
- return typeof this.focused == "boolean" ? this.focused : typeof document == "undefined" ? !0 : [void 0, "visible", "prerender"].includes(document.visibilityState);
1411
- }
1412
- }
1413
- const Ei = new Ci(), Ze = ["online", "offline"];
1414
- class xi extends Le {
1415
- constructor() {
1416
- super(), this.setup = (e) => {
1417
- if (!le && window.addEventListener) {
1418
- const t = () => e();
1419
- return Ze.forEach((i) => {
1420
- window.addEventListener(i, t, !1);
1421
- }), () => {
1422
- Ze.forEach((i) => {
1423
- window.removeEventListener(i, t);
1424
- });
1425
- };
1426
- }
1427
- };
1428
- }
1429
- onSubscribe() {
1430
- this.cleanup || this.setEventListener(this.setup);
1431
- }
1432
- onUnsubscribe() {
1433
- if (!this.hasListeners()) {
1434
- var e;
1435
- (e = this.cleanup) == null || e.call(this), this.cleanup = void 0;
1436
- }
1437
- }
1438
- setEventListener(e) {
1439
- var t;
1440
- this.setup = e, (t = this.cleanup) == null || t.call(this), this.cleanup = e((i) => {
1441
- typeof i == "boolean" ? this.setOnline(i) : this.onOnline();
1442
- });
1443
- }
1444
- setOnline(e) {
1445
- this.online !== e && (this.online = e, this.onOnline());
1446
- }
1447
- onOnline() {
1448
- this.listeners.forEach(({
1449
- listener: e
1450
- }) => {
1451
- e();
1452
- });
1453
- }
1454
- isOnline() {
1455
- return typeof this.online == "boolean" ? this.online : typeof navigator == "undefined" || typeof navigator.onLine == "undefined" ? !0 : navigator.onLine;
1456
- }
1457
- }
1458
- const Oi = new xi();
1459
- function Ri(n) {
1460
- return (n != null ? n : "online") === "online" ? Oi.isOnline() : !0;
1461
- }
1462
- class Ti {
1463
- constructor(e) {
1464
- this.revert = e == null ? void 0 : e.revert, this.silent = e == null ? void 0 : e.silent;
1465
- }
1466
- }
1467
- function Ii(n) {
1468
- return n instanceof Ti;
1469
- }
1470
- function Di() {
1471
- let n = [], e = 0, t = (d) => {
1472
- d();
1473
- }, i = (d) => {
1474
- d();
1475
- };
1476
- const a = (d) => {
1477
- let f;
1478
- e++;
1479
- try {
1480
- f = d();
1481
- } finally {
1482
- e--, e || o();
1483
- }
1484
- return f;
1485
- }, s = (d) => {
1486
- e ? n.push(d) : qe(() => {
1487
- t(d);
1488
- });
1489
- }, r = (d) => (...f) => {
1490
- s(() => {
1491
- d(...f);
1492
- });
1493
- }, o = () => {
1494
- const d = n;
1495
- n = [], d.length && qe(() => {
1496
- i(() => {
1497
- d.forEach((f) => {
1498
- t(f);
1499
- });
1500
- });
1501
- });
1502
- };
1503
- return {
1504
- batch: a,
1505
- batchCalls: r,
1506
- schedule: s,
1507
- setNotifyFunction: (d) => {
1508
- t = d;
1509
- },
1510
- setBatchNotifyFunction: (d) => {
1511
- i = d;
1512
- }
1513
- };
1514
- }
1515
- const Y = Di();
1516
- class Li extends Le {
1517
- constructor(e, t) {
1518
- super(), this.client = e, this.options = t, this.trackedProps = /* @__PURE__ */ new Set(), this.selectError = null, this.bindMethods(), this.setOptions(t);
1519
- }
1520
- bindMethods() {
1521
- this.remove = this.remove.bind(this), this.refetch = this.refetch.bind(this);
1522
- }
1523
- onSubscribe() {
1524
- this.listeners.size === 1 && (this.currentQuery.addObserver(this), Xe(this.currentQuery, this.options) && this.executeFetch(), this.updateTimers());
1525
- }
1526
- onUnsubscribe() {
1527
- this.hasListeners() || this.destroy();
1528
- }
1529
- shouldFetchOnReconnect() {
1530
- return Ee(this.currentQuery, this.options, this.options.refetchOnReconnect);
1531
- }
1532
- shouldFetchOnWindowFocus() {
1533
- return Ee(this.currentQuery, this.options, this.options.refetchOnWindowFocus);
1534
- }
1535
- destroy() {
1536
- this.listeners = /* @__PURE__ */ new Set(), this.clearStaleTimeout(), this.clearRefetchInterval(), this.currentQuery.removeObserver(this);
1537
- }
1538
- setOptions(e, t) {
1539
- const i = this.options, a = this.currentQuery;
1540
- if (this.options = this.client.defaultQueryOptions(e), Ce(i, this.options) || this.client.getQueryCache().notify({
1541
- type: "observerOptionsUpdated",
1542
- query: this.currentQuery,
1543
- observer: this
1544
- }), typeof this.options.enabled != "undefined" && typeof this.options.enabled != "boolean")
1545
- throw new Error("Expected enabled to be a boolean");
1546
- this.options.queryKey || (this.options.queryKey = i.queryKey), this.updateQuery();
1547
- const s = this.hasListeners();
1548
- s && Ye(this.currentQuery, a, this.options, i) && this.executeFetch(), this.updateResult(t), s && (this.currentQuery !== a || this.options.enabled !== i.enabled || this.options.staleTime !== i.staleTime) && this.updateStaleTimeout();
1549
- const r = this.computeRefetchInterval();
1550
- s && (this.currentQuery !== a || this.options.enabled !== i.enabled || r !== this.currentRefetchInterval) && this.updateRefetchInterval(r);
1551
- }
1552
- getOptimisticResult(e) {
1553
- const t = this.client.getQueryCache().build(this.client, e), i = this.createResult(t, e);
1554
- return Pi(this, i, e) && (this.currentResult = i, this.currentResultOptions = this.options, this.currentResultState = this.currentQuery.state), i;
1555
- }
1556
- getCurrentResult() {
1557
- return this.currentResult;
1558
- }
1559
- trackResult(e) {
1560
- const t = {};
1561
- return Object.keys(e).forEach((i) => {
1562
- Object.defineProperty(t, i, {
1563
- configurable: !1,
1564
- enumerable: !0,
1565
- get: () => (this.trackedProps.add(i), e[i])
1566
- });
1567
- }), t;
1568
- }
1569
- getCurrentQuery() {
1570
- return this.currentQuery;
1571
- }
1572
- remove() {
1573
- this.client.getQueryCache().remove(this.currentQuery);
1574
- }
1575
- refetch({
1576
- refetchPage: e,
1577
- ...t
1578
- } = {}) {
1579
- return this.fetch({
1580
- ...t,
1581
- meta: {
1582
- refetchPage: e
1583
- }
1584
- });
1585
- }
1586
- fetchOptimistic(e) {
1587
- const t = this.client.defaultQueryOptions(e), i = this.client.getQueryCache().build(this.client, t);
1588
- return i.isFetchingOptimistic = !0, i.fetch().then(() => this.createResult(i, t));
1589
- }
1590
- fetch(e) {
1591
- var t;
1592
- return this.executeFetch({
1593
- ...e,
1594
- cancelRefetch: (t = e.cancelRefetch) != null ? t : !0
1595
- }).then(() => (this.updateResult(), this.currentResult));
1596
- }
1597
- executeFetch(e) {
1598
- this.updateQuery();
1599
- let t = this.currentQuery.fetch(this.options, e);
1600
- return e != null && e.throwOnError || (t = t.catch(yi)), t;
1601
- }
1602
- updateStaleTimeout() {
1603
- if (this.clearStaleTimeout(), le || this.currentResult.isStale || !Ge(this.options.staleTime))
1604
- return;
1605
- const t = Ni(this.currentResult.dataUpdatedAt, this.options.staleTime) + 1;
1606
- this.staleTimeoutId = setTimeout(() => {
1607
- this.currentResult.isStale || this.updateResult();
1608
- }, t);
1609
- }
1610
- computeRefetchInterval() {
1611
- var e;
1612
- return typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (e = this.options.refetchInterval) != null ? e : !1;
1613
- }
1614
- updateRefetchInterval(e) {
1615
- this.clearRefetchInterval(), this.currentRefetchInterval = e, !(le || this.options.enabled === !1 || !Ge(this.currentRefetchInterval) || this.currentRefetchInterval === 0) && (this.refetchIntervalId = setInterval(() => {
1616
- (this.options.refetchIntervalInBackground || Ei.isFocused()) && this.executeFetch();
1617
- }, this.currentRefetchInterval));
1618
- }
1619
- updateTimers() {
1620
- this.updateStaleTimeout(), this.updateRefetchInterval(this.computeRefetchInterval());
1621
- }
1622
- clearStaleTimeout() {
1623
- this.staleTimeoutId && (clearTimeout(this.staleTimeoutId), this.staleTimeoutId = void 0);
1624
- }
1625
- clearRefetchInterval() {
1626
- this.refetchIntervalId && (clearInterval(this.refetchIntervalId), this.refetchIntervalId = void 0);
1627
- }
1628
- createResult(e, t) {
1629
- const i = this.currentQuery, a = this.options, s = this.currentResult, r = this.currentResultState, o = this.currentResultOptions, l = e !== i, u = l ? e.state : this.currentQueryInitialState, d = l ? this.currentResult : this.previousQueryResult, {
1630
- state: f
1631
- } = e;
1632
- let {
1633
- dataUpdatedAt: c,
1634
- error: S,
1635
- errorUpdatedAt: y,
1636
- fetchStatus: k,
1637
- status: N
1638
- } = f, O = !1, F = !1, I;
1639
- if (t._optimisticResults) {
1640
- const m = this.hasListeners(), p = !m && Xe(e, t), h = m && Ye(e, i, t, a);
1641
- (p || h) && (k = Ri(e.options.networkMode) ? "fetching" : "paused", c || (N = "loading")), t._optimisticResults === "isRestoring" && (k = "idle");
1642
- }
1643
- if (t.keepPreviousData && !f.dataUpdatedAt && d != null && d.isSuccess && N !== "error")
1644
- I = d.data, c = d.dataUpdatedAt, N = d.status, O = !0;
1645
- else if (t.select && typeof f.data != "undefined")
1646
- if (s && f.data === (r == null ? void 0 : r.data) && t.select === this.selectFn)
1647
- I = this.selectResult;
1648
- else
1649
- try {
1650
- this.selectFn = t.select, I = t.select(f.data), I = He(s == null ? void 0 : s.data, I, t), this.selectResult = I, this.selectError = null;
1651
- } catch (m) {
1652
- this.selectError = m;
1653
- }
1654
- else
1655
- I = f.data;
1656
- if (typeof t.placeholderData != "undefined" && typeof I == "undefined" && N === "loading") {
1657
- let m;
1658
- if (s != null && s.isPlaceholderData && t.placeholderData === (o == null ? void 0 : o.placeholderData))
1659
- m = s.data;
1660
- else if (m = typeof t.placeholderData == "function" ? t.placeholderData() : t.placeholderData, t.select && typeof m != "undefined")
1661
- try {
1662
- m = t.select(m), this.selectError = null;
1663
- } catch (p) {
1664
- this.selectError = p;
1665
- }
1666
- typeof m != "undefined" && (N = "success", I = He(s == null ? void 0 : s.data, m, t), F = !0);
1667
- }
1668
- this.selectError && (S = this.selectError, I = this.selectResult, y = Date.now(), N = "error");
1669
- const w = k === "fetching", D = N === "loading", L = N === "error";
1670
- return {
1671
- status: N,
1672
- fetchStatus: k,
1673
- isLoading: D,
1674
- isSuccess: N === "success",
1675
- isError: L,
1676
- isInitialLoading: D && w,
1677
- data: I,
1678
- dataUpdatedAt: c,
1679
- error: S,
1680
- errorUpdatedAt: y,
1681
- failureCount: f.fetchFailureCount,
1682
- failureReason: f.fetchFailureReason,
1683
- errorUpdateCount: f.errorUpdateCount,
1684
- isFetched: f.dataUpdateCount > 0 || f.errorUpdateCount > 0,
1685
- isFetchedAfterMount: f.dataUpdateCount > u.dataUpdateCount || f.errorUpdateCount > u.errorUpdateCount,
1686
- isFetching: w,
1687
- isRefetching: w && !D,
1688
- isLoadingError: L && f.dataUpdatedAt === 0,
1689
- isPaused: k === "paused",
1690
- isPlaceholderData: F,
1691
- isPreviousData: O,
1692
- isRefetchError: L && f.dataUpdatedAt !== 0,
1693
- isStale: Ae(e, t),
1694
- refetch: this.refetch,
1695
- remove: this.remove
1696
- };
1697
- }
1698
- updateResult(e) {
1699
- const t = this.currentResult, i = this.createResult(this.currentQuery, this.options);
1700
- if (this.currentResultState = this.currentQuery.state, this.currentResultOptions = this.options, Ce(i, t))
1701
- return;
1702
- this.currentResult = i;
1703
- const a = {
1704
- cache: !0
1705
- }, s = () => {
1706
- if (!t)
1707
- return !0;
1708
- const {
1709
- notifyOnChangeProps: r
1710
- } = this.options, o = typeof r == "function" ? r() : r;
1711
- if (o === "all" || !o && !this.trackedProps.size)
1712
- return !0;
1713
- const l = new Set(o != null ? o : this.trackedProps);
1714
- return this.options.useErrorBoundary && l.add("error"), Object.keys(this.currentResult).some((u) => {
1715
- const d = u;
1716
- return this.currentResult[d] !== t[d] && l.has(d);
1717
- });
1718
- };
1719
- (e == null ? void 0 : e.listeners) !== !1 && s() && (a.listeners = !0), this.notify({
1720
- ...a,
1721
- ...e
1722
- });
1723
- }
1724
- updateQuery() {
1725
- const e = this.client.getQueryCache().build(this.client, this.options);
1726
- if (e === this.currentQuery)
1727
- return;
1728
- const t = this.currentQuery;
1729
- this.currentQuery = e, this.currentQueryInitialState = e.state, this.previousQueryResult = this.currentResult, this.hasListeners() && (t == null || t.removeObserver(this), e.addObserver(this));
1730
- }
1731
- onQueryUpdate(e) {
1732
- const t = {};
1733
- e.type === "success" ? t.onSuccess = !e.manual : e.type === "error" && !Ii(e.error) && (t.onError = !0), this.updateResult(t), this.hasListeners() && this.updateTimers();
1734
- }
1735
- notify(e) {
1736
- Y.batch(() => {
1737
- if (e.onSuccess) {
1738
- var t, i, a, s;
1739
- (t = (i = this.options).onSuccess) == null || t.call(i, this.currentResult.data), (a = (s = this.options).onSettled) == null || a.call(s, this.currentResult.data, null);
1740
- } else if (e.onError) {
1741
- var r, o, l, u;
1742
- (r = (o = this.options).onError) == null || r.call(o, this.currentResult.error), (l = (u = this.options).onSettled) == null || l.call(u, void 0, this.currentResult.error);
1743
- }
1744
- e.listeners && this.listeners.forEach(({
1745
- listener: d
1746
- }) => {
1747
- d(this.currentResult);
1748
- }), e.cache && this.client.getQueryCache().notify({
1749
- query: this.currentQuery,
1750
- type: "observerResultsUpdated"
1751
- });
1752
- });
1753
- }
1754
- }
1755
- function Ai(n, e) {
1756
- return e.enabled !== !1 && !n.state.dataUpdatedAt && !(n.state.status === "error" && e.retryOnMount === !1);
1757
- }
1758
- function Xe(n, e) {
1759
- return Ai(n, e) || n.state.dataUpdatedAt > 0 && Ee(n, e, e.refetchOnMount);
1760
- }
1761
- function Ee(n, e, t) {
1762
- if (e.enabled !== !1) {
1763
- const i = typeof t == "function" ? t(n) : t;
1764
- return i === "always" || i !== !1 && Ae(n, e);
1765
- }
1766
- return !1;
1767
- }
1768
- function Ye(n, e, t, i) {
1769
- return t.enabled !== !1 && (n !== e || i.enabled === !1) && (!t.suspense || n.state.status !== "error") && Ae(n, t);
1770
- }
1771
- function Ae(n, e) {
1772
- return n.isStaleByTime(e.staleTime);
1773
- }
1774
- function Pi(n, e, t) {
1775
- return t.keepPreviousData ? !1 : t.placeholderData !== void 0 ? e.isPlaceholderData : !Ce(n.getCurrentResult(), e);
1776
- }
1777
- const Vi = Et.useSyncExternalStore, et = /* @__PURE__ */ M.createContext(void 0), _i = /* @__PURE__ */ M.createContext(!1);
1778
- function Ui(n, e) {
1779
- return n || (e && typeof window != "undefined" ? (window.ReactQueryClientContext || (window.ReactQueryClientContext = et), window.ReactQueryClientContext) : et);
1780
- }
1781
- const Mi = ({
1782
- context: n
1783
- } = {}) => {
1784
- const e = M.useContext(Ui(n, M.useContext(_i)));
1785
- if (!e)
1786
- throw new Error("No QueryClient set, use QueryClientProvider to set one");
1787
- return e;
1788
- }, Vt = /* @__PURE__ */ M.createContext(!1), $i = () => M.useContext(Vt);
1789
- Vt.Provider;
1790
- function ji() {
1791
- let n = !1;
1792
- return {
1793
- clearReset: () => {
1794
- n = !1;
1795
- },
1796
- reset: () => {
1797
- n = !0;
1798
- },
1799
- isReset: () => n
1800
- };
1801
- }
1802
- const zi = /* @__PURE__ */ M.createContext(ji()), Bi = () => M.useContext(zi);
1803
- function Qi(n, e) {
1804
- return typeof n == "function" ? n(...e) : !!n;
1805
- }
1806
- const Gi = (n, e) => {
1807
- (n.suspense || n.useErrorBoundary) && (e.isReset() || (n.retryOnMount = !1));
1808
- }, Ki = (n) => {
1809
- M.useEffect(() => {
1810
- n.clearReset();
1811
- }, [n]);
1812
- }, Wi = ({
1813
- result: n,
1814
- errorResetBoundary: e,
1815
- useErrorBoundary: t,
1816
- query: i
1817
- }) => n.isError && !e.isReset() && !n.isFetching && Qi(t, [n.error, i]), Ji = (n) => {
1818
- n.suspense && typeof n.staleTime != "number" && (n.staleTime = 1e3);
1819
- }, qi = (n, e) => n.isLoading && n.isFetching && !e, Hi = (n, e, t) => (n == null ? void 0 : n.suspense) && qi(e, t), Zi = (n, e, t) => e.fetchOptimistic(n).then(({
1820
- data: i
1821
- }) => {
1822
- n.onSuccess == null || n.onSuccess(i), n.onSettled == null || n.onSettled(i, null);
1823
- }).catch((i) => {
1824
- t.clearReset(), n.onError == null || n.onError(i), n.onSettled == null || n.onSettled(void 0, i);
1825
- });
1826
- function Xi(n, e) {
1827
- const t = Mi({
1828
- context: n.context
1829
- }), i = $i(), a = Bi(), s = t.defaultQueryOptions(n);
1830
- s._optimisticResults = i ? "isRestoring" : "optimistic", s.onError && (s.onError = Y.batchCalls(s.onError)), s.onSuccess && (s.onSuccess = Y.batchCalls(s.onSuccess)), s.onSettled && (s.onSettled = Y.batchCalls(s.onSettled)), Ji(s), Gi(s, a), Ki(a);
1831
- const [r] = M.useState(() => new e(t, s)), o = r.getOptimisticResult(s);
1832
- if (Vi(M.useCallback((l) => {
1833
- const u = i ? () => {
1834
- } : r.subscribe(Y.batchCalls(l));
1835
- return r.updateResult(), u;
1836
- }, [r, i]), () => r.getCurrentResult(), () => r.getCurrentResult()), M.useEffect(() => {
1837
- r.setOptions(s, {
1838
- listeners: !1
1839
- });
1840
- }, [s, r]), Hi(s, o, i))
1841
- throw Zi(s, r, a);
1842
- if (Wi({
1843
- result: o,
1844
- errorResetBoundary: a,
1845
- useErrorBoundary: s.useErrorBoundary,
1846
- query: r.getCurrentQuery()
1847
- }))
1848
- throw o.error;
1849
- return s.notifyOnChangeProps ? o : r.trackResult(o);
1850
- }
1851
- function Yi(n, e, t) {
1852
- const i = bi(n, e, t);
1853
- return Xi(i, Li);
1854
- }
1855
- const ea = () => ["account"], zs = () => {
1856
- const n = It((a) => {
1857
- var s;
1858
- return (s = a.config) == null ? void 0 : s.account;
1859
- }), [e, t] = un(Re), i = Yi(ea(), () => At.get(n), {
1860
- enabled: !!n && !e,
1861
- refetchOnWindowFocus: !1,
1862
- refetchOnMount: !1
1863
- });
1864
- return kt(() => {
1865
- const a = i.data;
1866
- !i.isSuccess || !a || t(a);
1867
- }, [i.status]), {
1868
- findQuery: i,
1869
- account: e
1870
- };
1871
- }, ta = vt();
1872
- async function na(n) {
1873
- const e = await At.get(n);
1874
- return ta.set(Re, e), e;
1875
- }
1876
- var ia = /* @__PURE__ */ ((n) => (n.CREATED = "CREATED", n.STARTING = "STARTING", n.LIVE = "LIVE", n.FINALIZED = "FINALIZED", n))(ia || {});
1877
- const Bs = {
1878
- ALL: "*",
1879
- CORE: "core:**",
1880
- LIVE_STREAMING_EVENT: "event:**",
1881
- EVENT_CHAT: "event:chat:**",
1882
- EVENT_PRODUCTS: "event:products:**",
1883
- CUSTOMIZE_LIVE: "customize-live:**",
1884
- PLAYER: "player:**",
1885
- SNACK_SIZE_VIDEO: "ssv:**",
1886
- SNACK_SIZE_VIDEO_ADMIN: "ssv-admin:**",
1887
- UI: "ui:**",
1888
- UTILS: "utils:**"
1889
- }, Qs = {
1890
- EVENT_STATUS_CHANGED: "event:statusChanged"
1891
- };
1892
- var aa = /* @__PURE__ */ ((n) => (n.English = "en", n.Spanish = "es", n.Portuguese = "pt", n))(aa || {}), sa = /* @__PURE__ */ ((n) => (n.COMBO = "Combo", n))(sa || {}), ra = /* @__PURE__ */ ((n) => (n.VTEX = "VTEX", n.PLATFORM = "platform", n.CACE = "CACE", n.GLOBAL_PAGE = "globalPage", n.DEV_LOCAL = "dev:local", n.CUSTOMIZATION = "customization", n.FAST_STORE = "faststore", n))(ra || {});
1893
- function oa(n) {
1894
- const e = Object.values(n);
1895
- return Object.assign({}, ...e);
1896
- }
1897
- function la(n) {
1898
- return Object.entries(n).reduce(
1899
- (e, [t, i]) => {
1900
- const a = oa(i);
1901
- return { ...e, [t]: a };
1902
- },
1903
- {}
1904
- );
1905
- }
1906
- function da(n, e) {
1907
- const t = la(e);
1908
- Object.entries(t).forEach(([i, a]) => {
1909
- n.addResourceBundle(i, "translation", a, !0);
1910
- });
1911
- }
1912
- function ua(n, e) {
1913
- if (!(n instanceof e))
1914
- throw new TypeError("Cannot call a class as a function");
1915
- }
1916
- function ee(n) {
1917
- "@babel/helpers - typeof";
1918
- return ee = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
1919
- return typeof e;
1920
- } : function(e) {
1921
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
1922
- }, ee(n);
1923
- }
1924
- function ca(n, e) {
1925
- if (ee(n) !== "object" || n === null)
1926
- return n;
1927
- var t = n[Symbol.toPrimitive];
1928
- if (t !== void 0) {
1929
- var i = t.call(n, e || "default");
1930
- if (ee(i) !== "object")
1931
- return i;
1932
- throw new TypeError("@@toPrimitive must return a primitive value.");
1933
- }
1934
- return (e === "string" ? String : Number)(n);
1935
- }
1936
- function ma(n) {
1937
- var e = ca(n, "string");
1938
- return ee(e) === "symbol" ? e : String(e);
1939
- }
1940
- function tt(n, e) {
1941
- for (var t = 0; t < e.length; t++) {
1942
- var i = e[t];
1943
- i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(n, ma(i.key), i);
1944
- }
1945
- }
1946
- function fa(n, e, t) {
1947
- return e && tt(n.prototype, e), t && tt(n, t), Object.defineProperty(n, "prototype", {
1948
- writable: !1
1949
- }), n;
1950
- }
1951
- var _t = [], pa = _t.forEach, ha = _t.slice;
1952
- function ga(n) {
1953
- return pa.call(ha.call(arguments, 1), function(e) {
1954
- if (e)
1955
- for (var t in e)
1956
- n[t] === void 0 && (n[t] = e[t]);
1957
- }), n;
1958
- }
1959
- var nt = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, ka = function(e, t, i) {
1960
- var a = i || {};
1961
- a.path = a.path || "/";
1962
- var s = encodeURIComponent(t), r = "".concat(e, "=").concat(s);
1963
- if (a.maxAge > 0) {
1964
- var o = a.maxAge - 0;
1965
- if (Number.isNaN(o))
1966
- throw new Error("maxAge should be a Number");
1967
- r += "; Max-Age=".concat(Math.floor(o));
1968
- }
1969
- if (a.domain) {
1970
- if (!nt.test(a.domain))
1971
- throw new TypeError("option domain is invalid");
1972
- r += "; Domain=".concat(a.domain);
1973
- }
1974
- if (a.path) {
1975
- if (!nt.test(a.path))
1976
- throw new TypeError("option path is invalid");
1977
- r += "; Path=".concat(a.path);
1978
- }
1979
- if (a.expires) {
1980
- if (typeof a.expires.toUTCString != "function")
1981
- throw new TypeError("option expires is invalid");
1982
- r += "; Expires=".concat(a.expires.toUTCString());
1983
- }
1984
- if (a.httpOnly && (r += "; HttpOnly"), a.secure && (r += "; Secure"), a.sameSite) {
1985
- var l = typeof a.sameSite == "string" ? a.sameSite.toLowerCase() : a.sameSite;
1986
- switch (l) {
1987
- case !0:
1988
- r += "; SameSite=Strict";
1989
- break;
1990
- case "lax":
1991
- r += "; SameSite=Lax";
1992
- break;
1993
- case "strict":
1994
- r += "; SameSite=Strict";
1995
- break;
1996
- case "none":
1997
- r += "; SameSite=None";
1998
- break;
1999
- default:
2000
- throw new TypeError("option sameSite is invalid");
2001
- }
2002
- }
2003
- return r;
2004
- }, it = {
2005
- create: function(e, t, i, a) {
2006
- var s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
2007
- path: "/",
2008
- sameSite: "strict"
2009
- };
2010
- i && (s.expires = /* @__PURE__ */ new Date(), s.expires.setTime(s.expires.getTime() + i * 60 * 1e3)), a && (s.domain = a), document.cookie = ka(e, encodeURIComponent(t), s);
2011
- },
2012
- read: function(e) {
2013
- for (var t = "".concat(e, "="), i = document.cookie.split(";"), a = 0; a < i.length; a++) {
2014
- for (var s = i[a]; s.charAt(0) === " "; )
2015
- s = s.substring(1, s.length);
2016
- if (s.indexOf(t) === 0)
2017
- return s.substring(t.length, s.length);
2018
- }
2019
- return null;
2020
- },
2021
- remove: function(e) {
2022
- this.create(e, "", -1);
2023
- }
2024
- }, va = {
2025
- name: "cookie",
2026
- lookup: function(e) {
2027
- var t;
2028
- if (e.lookupCookie && typeof document != "undefined") {
2029
- var i = it.read(e.lookupCookie);
2030
- i && (t = i);
2031
- }
2032
- return t;
2033
- },
2034
- cacheUserLanguage: function(e, t) {
2035
- t.lookupCookie && typeof document != "undefined" && it.create(t.lookupCookie, e, t.cookieMinutes, t.cookieDomain, t.cookieOptions);
2036
- }
2037
- }, Sa = {
2038
- name: "querystring",
2039
- lookup: function(e) {
2040
- var t;
2041
- if (typeof window != "undefined") {
2042
- var i = window.location.search;
2043
- !window.location.search && window.location.hash && window.location.hash.indexOf("?") > -1 && (i = window.location.hash.substring(window.location.hash.indexOf("?")));
2044
- for (var a = i.substring(1), s = a.split("&"), r = 0; r < s.length; r++) {
2045
- var o = s[r].indexOf("=");
2046
- if (o > 0) {
2047
- var l = s[r].substring(0, o);
2048
- l === e.lookupQuerystring && (t = s[r].substring(o + 1));
2049
- }
2050
- }
2051
- }
2052
- return t;
2053
- }
2054
- }, q = null, at = function() {
2055
- if (q !== null)
2056
- return q;
2057
- try {
2058
- q = window !== "undefined" && window.localStorage !== null;
2059
- var e = "i18next.translate.boo";
2060
- window.localStorage.setItem(e, "foo"), window.localStorage.removeItem(e);
2061
- } catch {
2062
- q = !1;
2063
- }
2064
- return q;
2065
- }, ya = {
2066
- name: "localStorage",
2067
- lookup: function(e) {
2068
- var t;
2069
- if (e.lookupLocalStorage && at()) {
2070
- var i = window.localStorage.getItem(e.lookupLocalStorage);
2071
- i && (t = i);
2072
- }
2073
- return t;
2074
- },
2075
- cacheUserLanguage: function(e, t) {
2076
- t.lookupLocalStorage && at() && window.localStorage.setItem(t.lookupLocalStorage, e);
2077
- }
2078
- }, H = null, st = function() {
2079
- if (H !== null)
2080
- return H;
2081
- try {
2082
- H = window !== "undefined" && window.sessionStorage !== null;
2083
- var e = "i18next.translate.boo";
2084
- window.sessionStorage.setItem(e, "foo"), window.sessionStorage.removeItem(e);
2085
- } catch {
2086
- H = !1;
2087
- }
2088
- return H;
2089
- }, Na = {
2090
- name: "sessionStorage",
2091
- lookup: function(e) {
2092
- var t;
2093
- if (e.lookupSessionStorage && st()) {
2094
- var i = window.sessionStorage.getItem(e.lookupSessionStorage);
2095
- i && (t = i);
2096
- }
2097
- return t;
2098
- },
2099
- cacheUserLanguage: function(e, t) {
2100
- t.lookupSessionStorage && st() && window.sessionStorage.setItem(t.lookupSessionStorage, e);
2101
- }
2102
- }, ba = {
2103
- name: "navigator",
2104
- lookup: function(e) {
2105
- var t = [];
2106
- if (typeof navigator != "undefined") {
2107
- if (navigator.languages)
2108
- for (var i = 0; i < navigator.languages.length; i++)
2109
- t.push(navigator.languages[i]);
2110
- navigator.userLanguage && t.push(navigator.userLanguage), navigator.language && t.push(navigator.language);
2111
- }
2112
- return t.length > 0 ? t : void 0;
2113
- }
2114
- }, Fa = {
2115
- name: "htmlTag",
2116
- lookup: function(e) {
2117
- var t, i = e.htmlTag || (typeof document != "undefined" ? document.documentElement : null);
2118
- return i && typeof i.getAttribute == "function" && (t = i.getAttribute("lang")), t;
2119
- }
2120
- }, wa = {
2121
- name: "path",
2122
- lookup: function(e) {
2123
- var t;
2124
- if (typeof window != "undefined") {
2125
- var i = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
2126
- if (i instanceof Array)
2127
- if (typeof e.lookupFromPathIndex == "number") {
2128
- if (typeof i[e.lookupFromPathIndex] != "string")
2129
- return;
2130
- t = i[e.lookupFromPathIndex].replace("/", "");
2131
- } else
2132
- t = i[0].replace("/", "");
2133
- }
2134
- return t;
2135
- }
2136
- }, Ca = {
2137
- name: "subdomain",
2138
- lookup: function(e) {
2139
- var t = typeof e.lookupFromSubdomainIndex == "number" ? e.lookupFromSubdomainIndex + 1 : 1, i = typeof window != "undefined" && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
2140
- if (i)
2141
- return i[t];
2142
- }
2143
- };
2144
- function Ea() {
2145
- return {
2146
- order: ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"],
2147
- lookupQuerystring: "lng",
2148
- lookupCookie: "i18next",
2149
- lookupLocalStorage: "i18nextLng",
2150
- lookupSessionStorage: "i18nextLng",
2151
- // cache user language
2152
- caches: ["localStorage"],
2153
- excludeCacheFor: ["cimode"],
2154
- // cookieMinutes: 10,
2155
- // cookieDomain: 'myDomain'
2156
- convertDetectedLanguage: function(e) {
2157
- return e;
2158
- }
2159
- };
2160
- }
2161
- var Ut = /* @__PURE__ */ function() {
2162
- function n(e) {
2163
- var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2164
- ua(this, n), this.type = "languageDetector", this.detectors = {}, this.init(e, t);
2165
- }
2166
- return fa(n, [{
2167
- key: "init",
2168
- value: function(t) {
2169
- var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2170
- this.services = t || {
2171
- languageUtils: {}
2172
- }, this.options = ga(i, this.options || {}, Ea()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = function(s) {
2173
- return s.replace("-", "_");
2174
- }), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = a, this.addDetector(va), this.addDetector(Sa), this.addDetector(ya), this.addDetector(Na), this.addDetector(ba), this.addDetector(Fa), this.addDetector(wa), this.addDetector(Ca);
2175
- }
2176
- }, {
2177
- key: "addDetector",
2178
- value: function(t) {
2179
- this.detectors[t.name] = t;
2180
- }
2181
- }, {
2182
- key: "detect",
2183
- value: function(t) {
2184
- var i = this;
2185
- t || (t = this.options.order);
2186
- var a = [];
2187
- return t.forEach(function(s) {
2188
- if (i.detectors[s]) {
2189
- var r = i.detectors[s].lookup(i.options);
2190
- r && typeof r == "string" && (r = [r]), r && (a = a.concat(r));
2191
- }
2192
- }), a = a.map(function(s) {
2193
- return i.options.convertDetectedLanguage(s);
2194
- }), this.services.languageUtils.getBestMatchFromCodes ? a : a.length > 0 ? a[0] : null;
2195
- }
2196
- }, {
2197
- key: "cacheUserLanguage",
2198
- value: function(t, i) {
2199
- var a = this;
2200
- i || (i = this.options.caches), i && (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(t) > -1 || i.forEach(function(s) {
2201
- a.detectors[s] && a.detectors[s].cacheUserLanguage(t, a.options);
2202
- }));
2203
- }
2204
- }]), n;
2205
- }();
2206
- Ut.type = "languageDetector";
2207
- function xa(n, e) {
2208
- n.use(e).use(Ut).init({
2209
- resources: {},
2210
- fallbackLng: "en",
2211
- debug: !1,
2212
- interpolation: {
2213
- escapeValue: !1,
2214
- // not needed for react as it escapes by default
2215
- format: (t, i, a) => {
2216
- if (i) {
2217
- const [s, ...r] = i.split(",").map((o) => o.trim());
2218
- if (s === "number")
2219
- return new Intl.NumberFormat(a).format(t);
2220
- if (s === "date")
2221
- return new Intl.DateTimeFormat(a).format(t);
2222
- if (s === "currency")
2223
- return new Intl.NumberFormat(a, {
2224
- style: "currency",
2225
- currency: r[0] || "USD",
2226
- currencyDisplay: "narrowSymbol"
2227
- }).format(t).replace("$", "").trim();
2228
- }
2229
- return t;
2230
- }
2231
- },
2232
- detection: {
2233
- // order and from where user language should be detected
2234
- order: [
2235
- "navigator",
2236
- "cookie",
2237
- "localStorage",
2238
- "sessionStorage",
2239
- "querystring",
2240
- "htmlTag",
2241
- "path",
2242
- "subdomain"
2243
- ]
2244
- }
2245
- });
2246
- }
2247
- const Oa = {
2248
- type: "logger",
2249
- log(n) {
2250
- this.output("log", n);
2251
- },
2252
- warn(n) {
2253
- this.output("warn", n);
2254
- },
2255
- error(n) {
2256
- this.output("error", n);
2257
- },
2258
- output(n, e) {
2259
- console && console[n] && console[n].apply(console, e);
2260
- }
2261
- };
2262
- class de {
2263
- constructor(e) {
2264
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2265
- this.init(e, t);
2266
- }
2267
- init(e) {
2268
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2269
- this.prefix = t.prefix || "i18next:", this.logger = e || Oa, this.options = t, this.debug = t.debug;
2270
- }
2271
- log() {
2272
- for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
2273
- t[i] = arguments[i];
2274
- return this.forward(t, "log", "", !0);
2275
- }
2276
- warn() {
2277
- for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
2278
- t[i] = arguments[i];
2279
- return this.forward(t, "warn", "", !0);
2280
- }
2281
- error() {
2282
- for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
2283
- t[i] = arguments[i];
2284
- return this.forward(t, "error", "");
2285
- }
2286
- deprecate() {
2287
- for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
2288
- t[i] = arguments[i];
2289
- return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
2290
- }
2291
- forward(e, t, i, a) {
2292
- return a && !this.debug ? null : (typeof e[0] == "string" && (e[0] = `${i}${this.prefix} ${e[0]}`), this.logger[t](e));
2293
- }
2294
- create(e) {
2295
- return new de(this.logger, {
2296
- prefix: `${this.prefix}:${e}:`,
2297
- ...this.options
2298
- });
2299
- }
2300
- clone(e) {
2301
- return e = e || this.options, e.prefix = e.prefix || this.prefix, new de(this.logger, e);
2302
- }
2303
- }
2304
- var $ = new de();
2305
- class ve {
2306
- constructor() {
2307
- this.observers = {};
2308
- }
2309
- on(e, t) {
2310
- return e.split(" ").forEach((i) => {
2311
- this.observers[i] = this.observers[i] || [], this.observers[i].push(t);
2312
- }), this;
2313
- }
2314
- off(e, t) {
2315
- if (this.observers[e]) {
2316
- if (!t) {
2317
- delete this.observers[e];
2318
- return;
2319
- }
2320
- this.observers[e] = this.observers[e].filter((i) => i !== t);
2321
- }
2322
- }
2323
- emit(e) {
2324
- for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), a = 1; a < t; a++)
2325
- i[a - 1] = arguments[a];
2326
- this.observers[e] && [].concat(this.observers[e]).forEach((r) => {
2327
- r(...i);
2328
- }), this.observers["*"] && [].concat(this.observers["*"]).forEach((r) => {
2329
- r.apply(r, [e, ...i]);
2330
- });
2331
- }
2332
- }
2333
- function Z() {
2334
- let n, e;
2335
- const t = new Promise((i, a) => {
2336
- n = i, e = a;
2337
- });
2338
- return t.resolve = n, t.reject = e, t;
2339
- }
2340
- function rt(n) {
2341
- return n == null ? "" : "" + n;
2342
- }
2343
- function Ra(n, e, t) {
2344
- n.forEach((i) => {
2345
- e[i] && (t[i] = e[i]);
2346
- });
2347
- }
2348
- function Pe(n, e, t) {
2349
- function i(r) {
2350
- return r && r.indexOf("###") > -1 ? r.replace(/###/g, ".") : r;
2351
- }
2352
- function a() {
2353
- return !n || typeof n == "string";
2354
- }
2355
- const s = typeof e != "string" ? [].concat(e) : e.split(".");
2356
- for (; s.length > 1; ) {
2357
- if (a())
2358
- return {};
2359
- const r = i(s.shift());
2360
- !n[r] && t && (n[r] = new t()), Object.prototype.hasOwnProperty.call(n, r) ? n = n[r] : n = {};
2361
- }
2362
- return a() ? {} : {
2363
- obj: n,
2364
- k: i(s.shift())
2365
- };
2366
- }
2367
- function ot(n, e, t) {
2368
- const {
2369
- obj: i,
2370
- k: a
2371
- } = Pe(n, e, Object);
2372
- i[a] = t;
2373
- }
2374
- function Ta(n, e, t, i) {
2375
- const {
2376
- obj: a,
2377
- k: s
2378
- } = Pe(n, e, Object);
2379
- a[s] = a[s] || [], i && (a[s] = a[s].concat(t)), i || a[s].push(t);
2380
- }
2381
- function ue(n, e) {
2382
- const {
2383
- obj: t,
2384
- k: i
2385
- } = Pe(n, e);
2386
- if (t)
2387
- return t[i];
2388
- }
2389
- function Ia(n, e, t) {
2390
- const i = ue(n, t);
2391
- return i !== void 0 ? i : ue(e, t);
2392
- }
2393
- function Mt(n, e, t) {
2394
- for (const i in e)
2395
- i !== "__proto__" && i !== "constructor" && (i in n ? typeof n[i] == "string" || n[i] instanceof String || typeof e[i] == "string" || e[i] instanceof String ? t && (n[i] = e[i]) : Mt(n[i], e[i], t) : n[i] = e[i]);
2396
- return n;
2397
- }
2398
- function B(n) {
2399
- return n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
2400
- }
2401
- var Da = {
2402
- "&": "&amp;",
2403
- "<": "&lt;",
2404
- ">": "&gt;",
2405
- '"': "&quot;",
2406
- "'": "&#39;",
2407
- "/": "&#x2F;"
2408
- };
2409
- function La(n) {
2410
- return typeof n == "string" ? n.replace(/[&<>"'\/]/g, (e) => Da[e]) : n;
2411
- }
2412
- const Aa = [" ", ",", "?", "!", ";"];
2413
- function Pa(n, e, t) {
2414
- e = e || "", t = t || "";
2415
- const i = Aa.filter((r) => e.indexOf(r) < 0 && t.indexOf(r) < 0);
2416
- if (i.length === 0)
2417
- return !0;
2418
- const a = new RegExp(`(${i.map((r) => r === "?" ? "\\?" : r).join("|")})`);
2419
- let s = !a.test(n);
2420
- if (!s) {
2421
- const r = n.indexOf(t);
2422
- r > 0 && !a.test(n.substring(0, r)) && (s = !0);
2423
- }
2424
- return s;
2425
- }
2426
- function ce(n, e) {
2427
- let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
2428
- if (!n)
2429
- return;
2430
- if (n[e])
2431
- return n[e];
2432
- const i = e.split(t);
2433
- let a = n;
2434
- for (let s = 0; s < i.length; ++s) {
2435
- if (!a || typeof a[i[s]] == "string" && s + 1 < i.length)
2436
- return;
2437
- if (a[i[s]] === void 0) {
2438
- let r = 2, o = i.slice(s, s + r).join(t), l = a[o];
2439
- for (; l === void 0 && i.length > s + r; )
2440
- r++, o = i.slice(s, s + r).join(t), l = a[o];
2441
- if (l === void 0)
2442
- return;
2443
- if (l === null)
2444
- return null;
2445
- if (e.endsWith(o)) {
2446
- if (typeof l == "string")
2447
- return l;
2448
- if (o && typeof l[o] == "string")
2449
- return l[o];
2450
- }
2451
- const u = i.slice(s + r).join(t);
2452
- return u ? ce(l, u, t) : void 0;
2453
- }
2454
- a = a[i[s]];
2455
- }
2456
- return a;
2457
- }
2458
- function me(n) {
2459
- return n && n.indexOf("_") > 0 ? n.replace("_", "-") : n;
2460
- }
2461
- class lt extends ve {
2462
- constructor(e) {
2463
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
2464
- ns: ["translation"],
2465
- defaultNS: "translation"
2466
- };
2467
- super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
2468
- }
2469
- addNamespaces(e) {
2470
- this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
2471
- }
2472
- removeNamespaces(e) {
2473
- const t = this.options.ns.indexOf(e);
2474
- t > -1 && this.options.ns.splice(t, 1);
2475
- }
2476
- getResource(e, t, i) {
2477
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
2478
- const s = a.keySeparator !== void 0 ? a.keySeparator : this.options.keySeparator, r = a.ignoreJSONStructure !== void 0 ? a.ignoreJSONStructure : this.options.ignoreJSONStructure;
2479
- let o = [e, t];
2480
- i && typeof i != "string" && (o = o.concat(i)), i && typeof i == "string" && (o = o.concat(s ? i.split(s) : i)), e.indexOf(".") > -1 && (o = e.split("."));
2481
- const l = ue(this.data, o);
2482
- return l || !r || typeof i != "string" ? l : ce(this.data && this.data[e] && this.data[e][t], i, s);
2483
- }
2484
- addResource(e, t, i, a) {
2485
- let s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
2486
- silent: !1
2487
- };
2488
- const r = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator;
2489
- let o = [e, t];
2490
- i && (o = o.concat(r ? i.split(r) : i)), e.indexOf(".") > -1 && (o = e.split("."), a = t, t = o[1]), this.addNamespaces(t), ot(this.data, o, a), s.silent || this.emit("added", e, t, i, a);
2491
- }
2492
- addResources(e, t, i) {
2493
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
2494
- silent: !1
2495
- };
2496
- for (const s in i)
2497
- (typeof i[s] == "string" || Object.prototype.toString.apply(i[s]) === "[object Array]") && this.addResource(e, t, s, i[s], {
2498
- silent: !0
2499
- });
2500
- a.silent || this.emit("added", e, t, i);
2501
- }
2502
- addResourceBundle(e, t, i, a, s) {
2503
- let r = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
2504
- silent: !1
2505
- }, o = [e, t];
2506
- e.indexOf(".") > -1 && (o = e.split("."), a = i, i = t, t = o[1]), this.addNamespaces(t);
2507
- let l = ue(this.data, o) || {};
2508
- a ? Mt(l, i, s) : l = {
2509
- ...l,
2510
- ...i
2511
- }, ot(this.data, o, l), r.silent || this.emit("added", e, t, i);
2512
- }
2513
- removeResourceBundle(e, t) {
2514
- this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
2515
- }
2516
- hasResourceBundle(e, t) {
2517
- return this.getResource(e, t) !== void 0;
2518
- }
2519
- getResourceBundle(e, t) {
2520
- return t || (t = this.options.defaultNS), this.options.compatibilityAPI === "v1" ? {
2521
- ...this.getResource(e, t)
2522
- } : this.getResource(e, t);
2523
- }
2524
- getDataByLanguage(e) {
2525
- return this.data[e];
2526
- }
2527
- hasLanguageSomeTranslations(e) {
2528
- const t = this.getDataByLanguage(e);
2529
- return !!(t && Object.keys(t) || []).find((a) => t[a] && Object.keys(t[a]).length > 0);
2530
- }
2531
- toJSON() {
2532
- return this.data;
2533
- }
2534
- }
2535
- var $t = {
2536
- processors: {},
2537
- addPostProcessor(n) {
2538
- this.processors[n.name] = n;
2539
- },
2540
- handle(n, e, t, i, a) {
2541
- return n.forEach((s) => {
2542
- this.processors[s] && (e = this.processors[s].process(e, t, i, a));
2543
- }), e;
2544
- }
2545
- };
2546
- const dt = {};
2547
- class fe extends ve {
2548
- constructor(e) {
2549
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2550
- super(), Ra(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = $.create("translator");
2551
- }
2552
- changeLanguage(e) {
2553
- e && (this.language = e);
2554
- }
2555
- exists(e) {
2556
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
2557
- interpolation: {}
2558
- };
2559
- if (e == null)
2560
- return !1;
2561
- const i = this.resolve(e, t);
2562
- return i && i.res !== void 0;
2563
- }
2564
- extractFromKey(e, t) {
2565
- let i = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
2566
- i === void 0 && (i = ":");
2567
- const a = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
2568
- let s = t.ns || this.options.defaultNS || [];
2569
- const r = i && e.indexOf(i) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Pa(e, i, a);
2570
- if (r && !o) {
2571
- const l = e.match(this.interpolator.nestingRegexp);
2572
- if (l && l.length > 0)
2573
- return {
2574
- key: e,
2575
- namespaces: s
2576
- };
2577
- const u = e.split(i);
2578
- (i !== a || i === a && this.options.ns.indexOf(u[0]) > -1) && (s = u.shift()), e = u.join(a);
2579
- }
2580
- return typeof s == "string" && (s = [s]), {
2581
- key: e,
2582
- namespaces: s
2583
- };
2584
- }
2585
- translate(e, t, i) {
2586
- if (typeof t != "object" && this.options.overloadTranslationOptionHandler && (t = this.options.overloadTranslationOptionHandler(arguments)), typeof t == "object" && (t = {
2587
- ...t
2588
- }), t || (t = {}), e == null)
2589
- return "";
2590
- Array.isArray(e) || (e = [String(e)]);
2591
- const a = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
2592
- key: r,
2593
- namespaces: o
2594
- } = this.extractFromKey(e[e.length - 1], t), l = o[o.length - 1], u = t.lng || this.language, d = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
2595
- if (u && u.toLowerCase() === "cimode") {
2596
- if (d) {
2597
- const w = t.nsSeparator || this.options.nsSeparator;
2598
- return a ? {
2599
- res: `${l}${w}${r}`,
2600
- usedKey: r,
2601
- exactUsedKey: r,
2602
- usedLng: u,
2603
- usedNS: l,
2604
- usedParams: this.getUsedParamsDetails(t)
2605
- } : `${l}${w}${r}`;
2606
- }
2607
- return a ? {
2608
- res: r,
2609
- usedKey: r,
2610
- exactUsedKey: r,
2611
- usedLng: u,
2612
- usedNS: l,
2613
- usedParams: this.getUsedParamsDetails(t)
2614
- } : r;
2615
- }
2616
- const f = this.resolve(e, t);
2617
- let c = f && f.res;
2618
- const S = f && f.usedKey || r, y = f && f.exactUsedKey || r, k = Object.prototype.toString.apply(c), N = ["[object Number]", "[object Function]", "[object RegExp]"], O = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, F = !this.i18nFormat || this.i18nFormat.handleAsObject;
2619
- if (F && c && (typeof c != "string" && typeof c != "boolean" && typeof c != "number") && N.indexOf(k) < 0 && !(typeof O == "string" && k === "[object Array]")) {
2620
- if (!t.returnObjects && !this.options.returnObjects) {
2621
- this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
2622
- const w = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(S, c, {
2623
- ...t,
2624
- ns: o
2625
- }) : `key '${r} (${this.language})' returned an object instead of string.`;
2626
- return a ? (f.res = w, f.usedParams = this.getUsedParamsDetails(t), f) : w;
2627
- }
2628
- if (s) {
2629
- const w = k === "[object Array]", D = w ? [] : {}, L = w ? y : S;
2630
- for (const A in c)
2631
- if (Object.prototype.hasOwnProperty.call(c, A)) {
2632
- const m = `${L}${s}${A}`;
2633
- D[A] = this.translate(m, {
2634
- ...t,
2635
- joinArrays: !1,
2636
- ns: o
2637
- }), D[A] === m && (D[A] = c[A]);
2638
- }
2639
- c = D;
2640
- }
2641
- } else if (F && typeof O == "string" && k === "[object Array]")
2642
- c = c.join(O), c && (c = this.extendTranslation(c, e, t, i));
2643
- else {
2644
- let w = !1, D = !1;
2645
- const L = t.count !== void 0 && typeof t.count != "string", A = fe.hasDefaultValue(t), m = L ? this.pluralResolver.getSuffix(u, t.count, t) : "", p = t.ordinal && L ? this.pluralResolver.getSuffix(u, t.count, {
2646
- ordinal: !1
2647
- }) : "", h = t[`defaultValue${m}`] || t[`defaultValue${p}`] || t.defaultValue;
2648
- !this.isValidLookup(c) && A && (w = !0, c = h), this.isValidLookup(c) || (D = !0, c = r);
2649
- const b = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && D ? void 0 : c, C = A && h !== c && this.options.updateMissing;
2650
- if (D || w || C) {
2651
- if (this.logger.log(C ? "updateKey" : "missingKey", u, l, r, C ? h : c), s) {
2652
- const x = this.resolve(r, {
2653
- ...t,
2654
- keySeparator: !1
2655
- });
2656
- x && x.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.");
2657
- }
2658
- let v = [];
2659
- const E = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
2660
- if (this.options.saveMissingTo === "fallback" && E && E[0])
2661
- for (let x = 0; x < E.length; x++)
2662
- v.push(E[x]);
2663
- else
2664
- this.options.saveMissingTo === "all" ? v = this.languageUtils.toResolveHierarchy(t.lng || this.language) : v.push(t.lng || this.language);
2665
- const P = (x, T, V) => {
2666
- const ne = A && V !== c ? V : b;
2667
- this.options.missingKeyHandler ? this.options.missingKeyHandler(x, l, T, ne, C, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(x, l, T, ne, C, t), this.emit("missingKey", x, l, T, c);
2668
- };
2669
- this.options.saveMissing && (this.options.saveMissingPlurals && L ? v.forEach((x) => {
2670
- this.pluralResolver.getSuffixes(x, t).forEach((T) => {
2671
- P([x], r + T, t[`defaultValue${T}`] || h);
2672
- });
2673
- }) : P(v, r, h));
2674
- }
2675
- c = this.extendTranslation(c, e, t, f, i), D && c === r && this.options.appendNamespaceToMissingKey && (c = `${l}:${r}`), (D || w) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? c = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}:${r}` : r, w ? c : void 0) : c = this.options.parseMissingKeyHandler(c));
2676
- }
2677
- return a ? (f.res = c, f.usedParams = this.getUsedParamsDetails(t), f) : c;
2678
- }
2679
- extendTranslation(e, t, i, a, s) {
2680
- var r = this;
2681
- if (this.i18nFormat && this.i18nFormat.parse)
2682
- e = this.i18nFormat.parse(e, {
2683
- ...this.options.interpolation.defaultVariables,
2684
- ...i
2685
- }, i.lng || this.language || a.usedLng, a.usedNS, a.usedKey, {
2686
- resolved: a
2687
- });
2688
- else if (!i.skipInterpolation) {
2689
- i.interpolation && this.interpolator.init({
2690
- ...i,
2691
- interpolation: {
2692
- ...this.options.interpolation,
2693
- ...i.interpolation
2694
- }
2695
- });
2696
- const u = typeof e == "string" && (i && i.interpolation && i.interpolation.skipOnVariables !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
2697
- let d;
2698
- if (u) {
2699
- const c = e.match(this.interpolator.nestingRegexp);
2700
- d = c && c.length;
2701
- }
2702
- let f = i.replace && typeof i.replace != "string" ? i.replace : i;
2703
- if (this.options.interpolation.defaultVariables && (f = {
2704
- ...this.options.interpolation.defaultVariables,
2705
- ...f
2706
- }), e = this.interpolator.interpolate(e, f, i.lng || this.language, i), u) {
2707
- const c = e.match(this.interpolator.nestingRegexp), S = c && c.length;
2708
- d < S && (i.nest = !1);
2709
- }
2710
- !i.lng && this.options.compatibilityAPI !== "v1" && a && a.res && (i.lng = a.usedLng), i.nest !== !1 && (e = this.interpolator.nest(e, function() {
2711
- for (var c = arguments.length, S = new Array(c), y = 0; y < c; y++)
2712
- S[y] = arguments[y];
2713
- return s && s[0] === S[0] && !i.context ? (r.logger.warn(`It seems you are nesting recursively key: ${S[0]} in key: ${t[0]}`), null) : r.translate(...S, t);
2714
- }, i)), i.interpolation && this.interpolator.reset();
2715
- }
2716
- const o = i.postProcess || this.options.postProcess, l = typeof o == "string" ? [o] : o;
2717
- return e != null && l && l.length && i.applyPostProcessor !== !1 && (e = $t.handle(l, e, t, this.options && this.options.postProcessPassResolved ? {
2718
- i18nResolved: {
2719
- ...a,
2720
- usedParams: this.getUsedParamsDetails(i)
2721
- },
2722
- ...i
2723
- } : i, this)), e;
2724
- }
2725
- resolve(e) {
2726
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i, a, s, r, o;
2727
- return typeof e == "string" && (e = [e]), e.forEach((l) => {
2728
- if (this.isValidLookup(i))
2729
- return;
2730
- const u = this.extractFromKey(l, t), d = u.key;
2731
- a = d;
2732
- let f = u.namespaces;
2733
- this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
2734
- const c = t.count !== void 0 && typeof t.count != "string", S = c && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), y = t.context !== void 0 && (typeof t.context == "string" || typeof t.context == "number") && t.context !== "", k = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
2735
- f.forEach((N) => {
2736
- this.isValidLookup(i) || (o = N, !dt[`${k[0]}-${N}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(o) && (dt[`${k[0]}-${N}`] = !0, this.logger.warn(`key "${a}" for languages "${k.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), k.forEach((O) => {
2737
- if (this.isValidLookup(i))
2738
- return;
2739
- r = O;
2740
- const F = [d];
2741
- if (this.i18nFormat && this.i18nFormat.addLookupKeys)
2742
- this.i18nFormat.addLookupKeys(F, d, O, N, t);
2743
- else {
2744
- let w;
2745
- c && (w = this.pluralResolver.getSuffix(O, t.count, t));
2746
- const D = `${this.options.pluralSeparator}zero`, L = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
2747
- if (c && (F.push(d + w), t.ordinal && w.indexOf(L) === 0 && F.push(d + w.replace(L, this.options.pluralSeparator)), S && F.push(d + D)), y) {
2748
- const A = `${d}${this.options.contextSeparator}${t.context}`;
2749
- F.push(A), c && (F.push(A + w), t.ordinal && w.indexOf(L) === 0 && F.push(A + w.replace(L, this.options.pluralSeparator)), S && F.push(A + D));
2750
- }
2751
- }
2752
- let I;
2753
- for (; I = F.pop(); )
2754
- this.isValidLookup(i) || (s = I, i = this.getResource(O, N, I, t));
2755
- }));
2756
- });
2757
- }), {
2758
- res: i,
2759
- usedKey: a,
2760
- exactUsedKey: s,
2761
- usedLng: r,
2762
- usedNS: o
2763
- };
2764
- }
2765
- isValidLookup(e) {
2766
- return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
2767
- }
2768
- getResource(e, t, i) {
2769
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
2770
- return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(e, t, i, a) : this.resourceStore.getResource(e, t, i, a);
2771
- }
2772
- getUsedParamsDetails() {
2773
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2774
- const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], i = e.replace && typeof e.replace != "string";
2775
- let a = i ? e.replace : e;
2776
- if (i && typeof e.count != "undefined" && (a.count = e.count), this.options.interpolation.defaultVariables && (a = {
2777
- ...this.options.interpolation.defaultVariables,
2778
- ...a
2779
- }), !i) {
2780
- a = {
2781
- ...a
2782
- };
2783
- for (const s of t)
2784
- delete a[s];
2785
- }
2786
- return a;
2787
- }
2788
- static hasDefaultValue(e) {
2789
- const t = "defaultValue";
2790
- for (const i in e)
2791
- if (Object.prototype.hasOwnProperty.call(e, i) && t === i.substring(0, t.length) && e[i] !== void 0)
2792
- return !0;
2793
- return !1;
2794
- }
2795
- }
2796
- function Fe(n) {
2797
- return n.charAt(0).toUpperCase() + n.slice(1);
2798
- }
2799
- class ut {
2800
- constructor(e) {
2801
- this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = $.create("languageUtils");
2802
- }
2803
- getScriptPartFromCode(e) {
2804
- if (e = me(e), !e || e.indexOf("-") < 0)
2805
- return null;
2806
- const t = e.split("-");
2807
- return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
2808
- }
2809
- getLanguagePartFromCode(e) {
2810
- if (e = me(e), !e || e.indexOf("-") < 0)
2811
- return e;
2812
- const t = e.split("-");
2813
- return this.formatLanguageCode(t[0]);
2814
- }
2815
- formatLanguageCode(e) {
2816
- if (typeof e == "string" && e.indexOf("-") > -1) {
2817
- const t = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
2818
- let i = e.split("-");
2819
- return this.options.lowerCaseLng ? i = i.map((a) => a.toLowerCase()) : i.length === 2 ? (i[0] = i[0].toLowerCase(), i[1] = i[1].toUpperCase(), t.indexOf(i[1].toLowerCase()) > -1 && (i[1] = Fe(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()), t.indexOf(i[1].toLowerCase()) > -1 && (i[1] = Fe(i[1].toLowerCase())), t.indexOf(i[2].toLowerCase()) > -1 && (i[2] = Fe(i[2].toLowerCase()))), i.join("-");
2820
- }
2821
- return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
2822
- }
2823
- isSupportedCode(e) {
2824
- return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
2825
- }
2826
- getBestMatchFromCodes(e) {
2827
- if (!e)
2828
- return null;
2829
- let t;
2830
- return e.forEach((i) => {
2831
- if (t)
2832
- return;
2833
- const a = this.formatLanguageCode(i);
2834
- (!this.options.supportedLngs || this.isSupportedCode(a)) && (t = a);
2835
- }), !t && this.options.supportedLngs && e.forEach((i) => {
2836
- if (t)
2837
- return;
2838
- const a = this.getLanguagePartFromCode(i);
2839
- if (this.isSupportedCode(a))
2840
- return t = a;
2841
- t = this.options.supportedLngs.find((s) => {
2842
- if (s === a)
2843
- return s;
2844
- if (!(s.indexOf("-") < 0 && a.indexOf("-") < 0) && s.indexOf(a) === 0)
2845
- return s;
2846
- });
2847
- }), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
2848
- }
2849
- getFallbackCodes(e, t) {
2850
- if (!e)
2851
- return [];
2852
- if (typeof e == "function" && (e = e(t)), typeof e == "string" && (e = [e]), Object.prototype.toString.apply(e) === "[object Array]")
2853
- return e;
2854
- if (!t)
2855
- return e.default || [];
2856
- let i = e[t];
2857
- return i || (i = e[this.getScriptPartFromCode(t)]), i || (i = e[this.formatLanguageCode(t)]), i || (i = e[this.getLanguagePartFromCode(t)]), i || (i = e.default), i || [];
2858
- }
2859
- toResolveHierarchy(e, t) {
2860
- const i = this.getFallbackCodes(t || this.options.fallbackLng || [], e), a = [], s = (r) => {
2861
- r && (this.isSupportedCode(r) ? a.push(r) : this.logger.warn(`rejecting language code not found in supportedLngs: ${r}`));
2862
- };
2863
- 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((r) => {
2864
- a.indexOf(r) < 0 && s(this.formatLanguageCode(r));
2865
- }), a;
2866
- }
2867
- }
2868
- let Va = [{
2869
- lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
2870
- nr: [1, 2],
2871
- fc: 1
2872
- }, {
2873
- 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"],
2874
- nr: [1, 2],
2875
- fc: 2
2876
- }, {
2877
- lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"],
2878
- nr: [1],
2879
- fc: 3
2880
- }, {
2881
- lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"],
2882
- nr: [1, 2, 5],
2883
- fc: 4
2884
- }, {
2885
- lngs: ["ar"],
2886
- nr: [0, 1, 2, 3, 11, 100],
2887
- fc: 5
2888
- }, {
2889
- lngs: ["cs", "sk"],
2890
- nr: [1, 2, 5],
2891
- fc: 6
2892
- }, {
2893
- lngs: ["csb", "pl"],
2894
- nr: [1, 2, 5],
2895
- fc: 7
2896
- }, {
2897
- lngs: ["cy"],
2898
- nr: [1, 2, 3, 8],
2899
- fc: 8
2900
- }, {
2901
- lngs: ["fr"],
2902
- nr: [1, 2],
2903
- fc: 9
2904
- }, {
2905
- lngs: ["ga"],
2906
- nr: [1, 2, 3, 7, 11],
2907
- fc: 10
2908
- }, {
2909
- lngs: ["gd"],
2910
- nr: [1, 2, 3, 20],
2911
- fc: 11
2912
- }, {
2913
- lngs: ["is"],
2914
- nr: [1, 2],
2915
- fc: 12
2916
- }, {
2917
- lngs: ["jv"],
2918
- nr: [0, 1],
2919
- fc: 13
2920
- }, {
2921
- lngs: ["kw"],
2922
- nr: [1, 2, 3, 4],
2923
- fc: 14
2924
- }, {
2925
- lngs: ["lt"],
2926
- nr: [1, 2, 10],
2927
- fc: 15
2928
- }, {
2929
- lngs: ["lv"],
2930
- nr: [1, 2, 0],
2931
- fc: 16
2932
- }, {
2933
- lngs: ["mk"],
2934
- nr: [1, 2],
2935
- fc: 17
2936
- }, {
2937
- lngs: ["mnk"],
2938
- nr: [0, 1, 2],
2939
- fc: 18
2940
- }, {
2941
- lngs: ["mt"],
2942
- nr: [1, 2, 11, 20],
2943
- fc: 19
2944
- }, {
2945
- lngs: ["or"],
2946
- nr: [2, 1],
2947
- fc: 2
2948
- }, {
2949
- lngs: ["ro"],
2950
- nr: [1, 2, 20],
2951
- fc: 20
2952
- }, {
2953
- lngs: ["sl"],
2954
- nr: [5, 1, 2, 3],
2955
- fc: 21
2956
- }, {
2957
- lngs: ["he", "iw"],
2958
- nr: [1, 2, 20, 21],
2959
- fc: 22
2960
- }], _a = {
2961
- 1: function(n) {
2962
- return +(n > 1);
2963
- },
2964
- 2: function(n) {
2965
- return +(n != 1);
2966
- },
2967
- 3: function(n) {
2968
- return 0;
2969
- },
2970
- 4: function(n) {
2971
- return n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;
2972
- },
2973
- 5: function(n) {
2974
- return n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5;
2975
- },
2976
- 6: function(n) {
2977
- return n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2;
2978
- },
2979
- 7: function(n) {
2980
- return n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;
2981
- },
2982
- 8: function(n) {
2983
- return n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3;
2984
- },
2985
- 9: function(n) {
2986
- return +(n >= 2);
2987
- },
2988
- 10: function(n) {
2989
- return n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4;
2990
- },
2991
- 11: function(n) {
2992
- return n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3;
2993
- },
2994
- 12: function(n) {
2995
- return +(n % 10 != 1 || n % 100 == 11);
2996
- },
2997
- 13: function(n) {
2998
- return +(n !== 0);
2999
- },
3000
- 14: function(n) {
3001
- return n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3;
3002
- },
3003
- 15: function(n) {
3004
- return n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2;
3005
- },
3006
- 16: function(n) {
3007
- return n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2;
3008
- },
3009
- 17: function(n) {
3010
- return n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1;
3011
- },
3012
- 18: function(n) {
3013
- return n == 0 ? 0 : n == 1 ? 1 : 2;
3014
- },
3015
- 19: function(n) {
3016
- return n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3;
3017
- },
3018
- 20: function(n) {
3019
- return n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2;
3020
- },
3021
- 21: function(n) {
3022
- return n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0;
3023
- },
3024
- 22: function(n) {
3025
- return n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3;
3026
- }
3027
- };
3028
- const Ua = ["v1", "v2", "v3"], Ma = ["v4"], ct = {
3029
- zero: 0,
3030
- one: 1,
3031
- two: 2,
3032
- few: 3,
3033
- many: 4,
3034
- other: 5
3035
- };
3036
- function $a() {
3037
- const n = {};
3038
- return Va.forEach((e) => {
3039
- e.lngs.forEach((t) => {
3040
- n[t] = {
3041
- numbers: e.nr,
3042
- plurals: _a[e.fc]
3043
- };
3044
- });
3045
- }), n;
3046
- }
3047
- class ja {
3048
- constructor(e) {
3049
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3050
- this.languageUtils = e, this.options = t, this.logger = $.create("pluralResolver"), (!this.options.compatibilityJSON || Ma.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 = $a();
3051
- }
3052
- addRule(e, t) {
3053
- this.rules[e] = t;
3054
- }
3055
- getRule(e) {
3056
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3057
- if (this.shouldUseIntlApi())
3058
- try {
3059
- return new Intl.PluralRules(me(e), {
3060
- type: t.ordinal ? "ordinal" : "cardinal"
3061
- });
3062
- } catch {
3063
- return;
3064
- }
3065
- return this.rules[e] || this.rules[this.languageUtils.getLanguagePartFromCode(e)];
3066
- }
3067
- needsPlural(e) {
3068
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3069
- const i = this.getRule(e, t);
3070
- return this.shouldUseIntlApi() ? i && i.resolvedOptions().pluralCategories.length > 1 : i && i.numbers.length > 1;
3071
- }
3072
- getPluralFormsOfKey(e, t) {
3073
- let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3074
- return this.getSuffixes(e, i).map((a) => `${t}${a}`);
3075
- }
3076
- getSuffixes(e) {
3077
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3078
- const i = this.getRule(e, t);
3079
- return i ? this.shouldUseIntlApi() ? i.resolvedOptions().pluralCategories.sort((a, s) => ct[a] - ct[s]).map((a) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${a}`) : i.numbers.map((a) => this.getSuffix(e, a, t)) : [];
3080
- }
3081
- getSuffix(e, t) {
3082
- let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
3083
- const a = this.getRule(e, i);
3084
- return a ? this.shouldUseIntlApi() ? `${this.options.prepend}${i.ordinal ? `ordinal${this.options.prepend}` : ""}${a.select(t)}` : this.getSuffixRetroCompatible(a, t) : (this.logger.warn(`no plural rule found for: ${e}`), "");
3085
- }
3086
- getSuffixRetroCompatible(e, t) {
3087
- const i = e.noAbs ? e.plurals(t) : e.plurals(Math.abs(t));
3088
- let a = e.numbers[i];
3089
- this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 && (a === 2 ? a = "plural" : a === 1 && (a = ""));
3090
- const s = () => this.options.prepend && a.toString() ? this.options.prepend + a.toString() : a.toString();
3091
- return this.options.compatibilityJSON === "v1" ? a === 1 ? "" : typeof a == "number" ? `_plural_${a.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();
3092
- }
3093
- shouldUseIntlApi() {
3094
- return !Ua.includes(this.options.compatibilityJSON);
3095
- }
3096
- }
3097
- function mt(n, e, t) {
3098
- let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, s = Ia(n, e, t);
3099
- return !s && a && typeof t == "string" && (s = ce(n, t, i), s === void 0 && (s = ce(e, t, i))), s;
3100
- }
3101
- class za {
3102
- constructor() {
3103
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3104
- this.logger = $.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
3105
- }
3106
- init() {
3107
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3108
- e.interpolation || (e.interpolation = {
3109
- escapeValue: !0
3110
- });
3111
- const t = e.interpolation;
3112
- this.escape = t.escape !== void 0 ? t.escape : La, this.escapeValue = t.escapeValue !== void 0 ? t.escapeValue : !0, this.useRawValueToEscape = t.useRawValueToEscape !== void 0 ? t.useRawValueToEscape : !1, this.prefix = t.prefix ? B(t.prefix) : t.prefixEscaped || "{{", this.suffix = t.suffix ? B(t.suffix) : t.suffixEscaped || "}}", this.formatSeparator = t.formatSeparator ? t.formatSeparator : t.formatSeparator || ",", this.unescapePrefix = t.unescapeSuffix ? "" : t.unescapePrefix || "-", this.unescapeSuffix = this.unescapePrefix ? "" : t.unescapeSuffix || "", this.nestingPrefix = t.nestingPrefix ? B(t.nestingPrefix) : t.nestingPrefixEscaped || B("$t("), this.nestingSuffix = t.nestingSuffix ? B(t.nestingSuffix) : t.nestingSuffixEscaped || B(")"), this.nestingOptionsSeparator = t.nestingOptionsSeparator ? t.nestingOptionsSeparator : t.nestingOptionsSeparator || ",", this.maxReplaces = t.maxReplaces ? t.maxReplaces : 1e3, this.alwaysFormat = t.alwaysFormat !== void 0 ? t.alwaysFormat : !1, this.resetRegExp();
3113
- }
3114
- reset() {
3115
- this.options && this.init(this.options);
3116
- }
3117
- resetRegExp() {
3118
- const e = `${this.prefix}(.+?)${this.suffix}`;
3119
- this.regexp = new RegExp(e, "g");
3120
- const t = `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;
3121
- this.regexpUnescape = new RegExp(t, "g");
3122
- const i = `${this.nestingPrefix}(.+?)${this.nestingSuffix}`;
3123
- this.nestingRegexp = new RegExp(i, "g");
3124
- }
3125
- interpolate(e, t, i, a) {
3126
- let s, r, o;
3127
- const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};
3128
- function u(y) {
3129
- return y.replace(/\$/g, "$$$$");
3130
- }
3131
- const d = (y) => {
3132
- if (y.indexOf(this.formatSeparator) < 0) {
3133
- const F = mt(t, l, y, this.options.keySeparator, this.options.ignoreJSONStructure);
3134
- return this.alwaysFormat ? this.format(F, void 0, i, {
3135
- ...a,
3136
- ...t,
3137
- interpolationkey: y
3138
- }) : F;
3139
- }
3140
- const k = y.split(this.formatSeparator), N = k.shift().trim(), O = k.join(this.formatSeparator).trim();
3141
- return this.format(mt(t, l, N, this.options.keySeparator, this.options.ignoreJSONStructure), O, i, {
3142
- ...a,
3143
- ...t,
3144
- interpolationkey: N
3145
- });
3146
- };
3147
- this.resetRegExp();
3148
- const f = a && a.missingInterpolationHandler || this.options.missingInterpolationHandler, c = a && a.interpolation && a.interpolation.skipOnVariables !== void 0 ? a.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
3149
- return [{
3150
- regex: this.regexpUnescape,
3151
- safeValue: (y) => u(y)
3152
- }, {
3153
- regex: this.regexp,
3154
- safeValue: (y) => this.escapeValue ? u(this.escape(y)) : u(y)
3155
- }].forEach((y) => {
3156
- for (o = 0; s = y.regex.exec(e); ) {
3157
- const k = s[1].trim();
3158
- if (r = d(k), r === void 0)
3159
- if (typeof f == "function") {
3160
- const O = f(e, s, a);
3161
- r = typeof O == "string" ? O : "";
3162
- } else if (a && Object.prototype.hasOwnProperty.call(a, k))
3163
- r = "";
3164
- else if (c) {
3165
- r = s[0];
3166
- continue;
3167
- } else
3168
- this.logger.warn(`missed to pass in variable ${k} for interpolating ${e}`), r = "";
3169
- else
3170
- typeof r != "string" && !this.useRawValueToEscape && (r = rt(r));
3171
- const N = y.safeValue(r);
3172
- if (e = e.replace(s[0], N), c ? (y.regex.lastIndex += r.length, y.regex.lastIndex -= s[0].length) : y.regex.lastIndex = 0, o++, o >= this.maxReplaces)
3173
- break;
3174
- }
3175
- }), e;
3176
- }
3177
- nest(e, t) {
3178
- let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, a, s, r;
3179
- function o(l, u) {
3180
- const d = this.nestingOptionsSeparator;
3181
- if (l.indexOf(d) < 0)
3182
- return l;
3183
- const f = l.split(new RegExp(`${d}[ ]*{`));
3184
- let c = `{${f[1]}`;
3185
- l = f[0], c = this.interpolate(c, r);
3186
- const S = c.match(/'/g), y = c.match(/"/g);
3187
- (S && S.length % 2 === 0 && !y || y.length % 2 !== 0) && (c = c.replace(/'/g, '"'));
3188
- try {
3189
- r = JSON.parse(c), u && (r = {
3190
- ...u,
3191
- ...r
3192
- });
3193
- } catch (k) {
3194
- return this.logger.warn(`failed parsing options string in nesting for key ${l}`, k), `${l}${d}${c}`;
3195
- }
3196
- return delete r.defaultValue, l;
3197
- }
3198
- for (; a = this.nestingRegexp.exec(e); ) {
3199
- let l = [];
3200
- r = {
3201
- ...i
3202
- }, r = r.replace && typeof r.replace != "string" ? r.replace : r, r.applyPostProcessor = !1, delete r.defaultValue;
3203
- let u = !1;
3204
- if (a[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(a[1])) {
3205
- const d = a[1].split(this.formatSeparator).map((f) => f.trim());
3206
- a[1] = d.shift(), l = d, u = !0;
3207
- }
3208
- if (s = t(o.call(this, a[1].trim(), r), r), s && a[0] === e && typeof s != "string")
3209
- return s;
3210
- typeof s != "string" && (s = rt(s)), s || (this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`), s = ""), u && (s = l.reduce((d, f) => this.format(d, f, i.lng, {
3211
- ...i,
3212
- interpolationkey: a[1].trim()
3213
- }), s.trim())), e = e.replace(a[0], s), this.regexp.lastIndex = 0;
3214
- }
3215
- return e;
3216
- }
3217
- }
3218
- function Ba(n) {
3219
- let e = n.toLowerCase().trim();
3220
- const t = {};
3221
- if (n.indexOf("(") > -1) {
3222
- const i = n.split("(");
3223
- e = i[0].toLowerCase().trim();
3224
- const a = i[1].substring(0, i[1].length - 1);
3225
- e === "currency" && a.indexOf(":") < 0 ? t.currency || (t.currency = a.trim()) : e === "relativetime" && a.indexOf(":") < 0 ? t.range || (t.range = a.trim()) : a.split(";").forEach((r) => {
3226
- if (!r)
3227
- return;
3228
- const [o, ...l] = r.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, "");
3229
- t[o.trim()] || (t[o.trim()] = u), u === "false" && (t[o.trim()] = !1), u === "true" && (t[o.trim()] = !0), isNaN(u) || (t[o.trim()] = parseInt(u, 10));
3230
- });
3231
- }
3232
- return {
3233
- formatName: e,
3234
- formatOptions: t
3235
- };
3236
- }
3237
- function Q(n) {
3238
- const e = {};
3239
- return function(i, a, s) {
3240
- const r = a + JSON.stringify(s);
3241
- let o = e[r];
3242
- return o || (o = n(me(a), s), e[r] = o), o(i);
3243
- };
3244
- }
3245
- class Qa {
3246
- constructor() {
3247
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3248
- this.logger = $.create("formatter"), this.options = e, this.formats = {
3249
- number: Q((t, i) => {
3250
- const a = new Intl.NumberFormat(t, {
3251
- ...i
3252
- });
3253
- return (s) => a.format(s);
3254
- }),
3255
- currency: Q((t, i) => {
3256
- const a = new Intl.NumberFormat(t, {
3257
- ...i,
3258
- style: "currency"
3259
- });
3260
- return (s) => a.format(s);
3261
- }),
3262
- datetime: Q((t, i) => {
3263
- const a = new Intl.DateTimeFormat(t, {
3264
- ...i
3265
- });
3266
- return (s) => a.format(s);
3267
- }),
3268
- relativetime: Q((t, i) => {
3269
- const a = new Intl.RelativeTimeFormat(t, {
3270
- ...i
3271
- });
3272
- return (s) => a.format(s, i.range || "day");
3273
- }),
3274
- list: Q((t, i) => {
3275
- const a = new Intl.ListFormat(t, {
3276
- ...i
3277
- });
3278
- return (s) => a.format(s);
3279
- })
3280
- }, this.init(e);
3281
- }
3282
- init(e) {
3283
- const i = (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
3284
- interpolation: {}
3285
- }).interpolation;
3286
- this.formatSeparator = i.formatSeparator ? i.formatSeparator : i.formatSeparator || ",";
3287
- }
3288
- add(e, t) {
3289
- this.formats[e.toLowerCase().trim()] = t;
3290
- }
3291
- addCached(e, t) {
3292
- this.formats[e.toLowerCase().trim()] = Q(t);
3293
- }
3294
- format(e, t, i) {
3295
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
3296
- return t.split(this.formatSeparator).reduce((o, l) => {
3297
- const {
3298
- formatName: u,
3299
- formatOptions: d
3300
- } = Ba(l);
3301
- if (this.formats[u]) {
3302
- let f = o;
3303
- try {
3304
- const c = a && a.formatParams && a.formatParams[a.interpolationkey] || {}, S = c.locale || c.lng || a.locale || a.lng || i;
3305
- f = this.formats[u](o, S, {
3306
- ...d,
3307
- ...a,
3308
- ...c
3309
- });
3310
- } catch (c) {
3311
- this.logger.warn(c);
3312
- }
3313
- return f;
3314
- } else
3315
- this.logger.warn(`there was no format function for ${u}`);
3316
- return o;
3317
- }, e);
3318
- }
3319
- }
3320
- function Ga(n, e) {
3321
- n.pending[e] !== void 0 && (delete n.pending[e], n.pendingCount--);
3322
- }
3323
- class Ka extends ve {
3324
- constructor(e, t, i) {
3325
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
3326
- super(), this.backend = e, this.store = t, this.services = i, this.languageUtils = i.languageUtils, this.options = a, this.logger = $.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = a.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = a.maxRetries >= 0 ? a.maxRetries : 5, this.retryTimeout = a.retryTimeout >= 1 ? a.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(i, a.backend, a);
3327
- }
3328
- queueLoad(e, t, i, a) {
3329
- const s = {}, r = {}, o = {}, l = {};
3330
- return e.forEach((u) => {
3331
- let d = !0;
3332
- t.forEach((f) => {
3333
- const c = `${u}|${f}`;
3334
- !i.reload && this.store.hasResourceBundle(u, f) ? this.state[c] = 2 : this.state[c] < 0 || (this.state[c] === 1 ? r[c] === void 0 && (r[c] = !0) : (this.state[c] = 1, d = !1, r[c] === void 0 && (r[c] = !0), s[c] === void 0 && (s[c] = !0), l[f] === void 0 && (l[f] = !0)));
3335
- }), d || (o[u] = !0);
3336
- }), (Object.keys(s).length || Object.keys(r).length) && this.queue.push({
3337
- pending: r,
3338
- pendingCount: Object.keys(r).length,
3339
- loaded: {},
3340
- errors: [],
3341
- callback: a
3342
- }), {
3343
- toLoad: Object.keys(s),
3344
- pending: Object.keys(r),
3345
- toLoadLanguages: Object.keys(o),
3346
- toLoadNamespaces: Object.keys(l)
3347
- };
3348
- }
3349
- loaded(e, t, i) {
3350
- const a = e.split("|"), s = a[0], r = a[1];
3351
- t && this.emit("failedLoading", s, r, t), i && this.store.addResourceBundle(s, r, i), this.state[e] = t ? -1 : 2;
3352
- const o = {};
3353
- this.queue.forEach((l) => {
3354
- Ta(l.loaded, [s], r), Ga(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => {
3355
- o[u] || (o[u] = {});
3356
- const d = l.loaded[u];
3357
- d.length && d.forEach((f) => {
3358
- o[u][f] === void 0 && (o[u][f] = !0);
3359
- });
3360
- }), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
3361
- }), this.emit("loaded", o), this.queue = this.queue.filter((l) => !l.done);
3362
- }
3363
- read(e, t, i) {
3364
- let a = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, r = arguments.length > 5 ? arguments[5] : void 0;
3365
- if (!e.length)
3366
- return r(null, {});
3367
- if (this.readingCalls >= this.maxParallelReads) {
3368
- this.waitingReads.push({
3369
- lng: e,
3370
- ns: t,
3371
- fcName: i,
3372
- tried: a,
3373
- wait: s,
3374
- callback: r
3375
- });
3376
- return;
3377
- }
3378
- this.readingCalls++;
3379
- const o = (u, d) => {
3380
- if (this.readingCalls--, this.waitingReads.length > 0) {
3381
- const f = this.waitingReads.shift();
3382
- this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
3383
- }
3384
- if (u && d && a < this.maxRetries) {
3385
- setTimeout(() => {
3386
- this.read.call(this, e, t, i, a + 1, s * 2, r);
3387
- }, s);
3388
- return;
3389
- }
3390
- r(u, d);
3391
- }, l = this.backend[i].bind(this.backend);
3392
- if (l.length === 2) {
3393
- try {
3394
- const u = l(e, t);
3395
- u && typeof u.then == "function" ? u.then((d) => o(null, d)).catch(o) : o(null, u);
3396
- } catch (u) {
3397
- o(u);
3398
- }
3399
- return;
3400
- }
3401
- return l(e, t, o);
3402
- }
3403
- prepareLoading(e, t) {
3404
- let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, a = arguments.length > 3 ? arguments[3] : void 0;
3405
- if (!this.backend)
3406
- return this.logger.warn("No backend was added via i18next.use. Will not load resources."), a && a();
3407
- typeof e == "string" && (e = this.languageUtils.toResolveHierarchy(e)), typeof t == "string" && (t = [t]);
3408
- const s = this.queueLoad(e, t, i, a);
3409
- if (!s.toLoad.length)
3410
- return s.pending.length || a(), null;
3411
- s.toLoad.forEach((r) => {
3412
- this.loadOne(r);
3413
- });
3414
- }
3415
- load(e, t, i) {
3416
- this.prepareLoading(e, t, {}, i);
3417
- }
3418
- reload(e, t, i) {
3419
- this.prepareLoading(e, t, {
3420
- reload: !0
3421
- }, i);
3422
- }
3423
- loadOne(e) {
3424
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
3425
- const i = e.split("|"), a = i[0], s = i[1];
3426
- this.read(a, s, "read", void 0, void 0, (r, o) => {
3427
- r && this.logger.warn(`${t}loading namespace ${s} for language ${a} failed`, r), !r && o && this.logger.log(`${t}loaded namespace ${s} for language ${a}`, o), this.loaded(e, r, o);
3428
- });
3429
- }
3430
- saveMissing(e, t, i, a, s) {
3431
- let r = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
3432
- };
3433
- if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(t)) {
3434
- this.logger.warn(`did not save key "${i}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
3435
- return;
3436
- }
3437
- if (!(i == null || i === "")) {
3438
- if (this.backend && this.backend.create) {
3439
- const l = {
3440
- ...r,
3441
- isUpdate: s
3442
- }, u = this.backend.create.bind(this.backend);
3443
- if (u.length < 6)
3444
- try {
3445
- let d;
3446
- u.length === 5 ? d = u(e, t, i, a, l) : d = u(e, t, i, a), d && typeof d.then == "function" ? d.then((f) => o(null, f)).catch(o) : o(null, d);
3447
- } catch (d) {
3448
- o(d);
3449
- }
3450
- else
3451
- u(e, t, i, a, o, l);
3452
- }
3453
- !e || !e[0] || this.store.addResource(e[0], t, i, a);
3454
- }
3455
- }
3456
- }
3457
- function ft() {
3458
- return {
3459
- debug: !1,
3460
- initImmediate: !0,
3461
- ns: ["translation"],
3462
- defaultNS: ["translation"],
3463
- fallbackLng: ["dev"],
3464
- fallbackNS: !1,
3465
- supportedLngs: !1,
3466
- nonExplicitSupportedLngs: !1,
3467
- load: "all",
3468
- preload: !1,
3469
- simplifyPluralSuffix: !0,
3470
- keySeparator: ".",
3471
- nsSeparator: ":",
3472
- pluralSeparator: "_",
3473
- contextSeparator: "_",
3474
- partialBundledLanguages: !1,
3475
- saveMissing: !1,
3476
- updateMissing: !1,
3477
- saveMissingTo: "fallback",
3478
- saveMissingPlurals: !0,
3479
- missingKeyHandler: !1,
3480
- missingInterpolationHandler: !1,
3481
- postProcess: !1,
3482
- postProcessPassResolved: !1,
3483
- returnNull: !1,
3484
- returnEmptyString: !0,
3485
- returnObjects: !1,
3486
- joinArrays: !1,
3487
- returnedObjectHandler: !1,
3488
- parseMissingKeyHandler: !1,
3489
- appendNamespaceToMissingKey: !1,
3490
- appendNamespaceToCIMode: !1,
3491
- overloadTranslationOptionHandler: function(e) {
3492
- let t = {};
3493
- if (typeof e[1] == "object" && (t = e[1]), typeof e[1] == "string" && (t.defaultValue = e[1]), typeof e[2] == "string" && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
3494
- const i = e[3] || e[2];
3495
- Object.keys(i).forEach((a) => {
3496
- t[a] = i[a];
3497
- });
3498
- }
3499
- return t;
3500
- },
3501
- interpolation: {
3502
- escapeValue: !0,
3503
- format: (n, e, t, i) => n,
3504
- prefix: "{{",
3505
- suffix: "}}",
3506
- formatSeparator: ",",
3507
- unescapePrefix: "-",
3508
- nestingPrefix: "$t(",
3509
- nestingSuffix: ")",
3510
- nestingOptionsSeparator: ",",
3511
- maxReplaces: 1e3,
3512
- skipOnVariables: !0
3513
- }
3514
- };
3515
- }
3516
- function pt(n) {
3517
- return typeof n.ns == "string" && (n.ns = [n.ns]), typeof n.fallbackLng == "string" && (n.fallbackLng = [n.fallbackLng]), typeof n.fallbackNS == "string" && (n.fallbackNS = [n.fallbackNS]), n.supportedLngs && n.supportedLngs.indexOf("cimode") < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), n;
3518
- }
3519
- function se() {
3520
- }
3521
- function Wa(n) {
3522
- Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
3523
- typeof n[t] == "function" && (n[t] = n[t].bind(n));
3524
- });
3525
- }
3526
- class te extends ve {
3527
- constructor() {
3528
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
3529
- if (super(), this.options = pt(e), this.services = {}, this.logger = $, this.modules = {
3530
- external: []
3531
- }, Wa(this), t && !this.isInitialized && !e.isClone) {
3532
- if (!this.options.initImmediate)
3533
- return this.init(e, t), this;
3534
- setTimeout(() => {
3535
- this.init(e, t);
3536
- }, 0);
3537
- }
3538
- }
3539
- init() {
3540
- var e = this;
3541
- let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = arguments.length > 1 ? arguments[1] : void 0;
3542
- typeof t == "function" && (i = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (typeof t.ns == "string" ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
3543
- const a = ft();
3544
- this.options = {
3545
- ...a,
3546
- ...this.options,
3547
- ...pt(t)
3548
- }, this.options.compatibilityAPI !== "v1" && (this.options.interpolation = {
3549
- ...a.interpolation,
3550
- ...this.options.interpolation
3551
- }), t.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = t.keySeparator), t.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = t.nsSeparator);
3552
- function s(d) {
3553
- return d ? typeof d == "function" ? new d() : d : null;
3554
- }
3555
- if (!this.options.isClone) {
3556
- this.modules.logger ? $.init(s(this.modules.logger), this.options) : $.init(null, this.options);
3557
- let d;
3558
- this.modules.formatter ? d = this.modules.formatter : typeof Intl != "undefined" && (d = Qa);
3559
- const f = new ut(this.options);
3560
- this.store = new lt(this.options.resources, this.options);
3561
- const c = this.services;
3562
- c.logger = $, c.resourceStore = this.store, c.languageUtils = f, c.pluralResolver = new ja(f, {
3563
- prepend: this.options.pluralSeparator,
3564
- compatibilityJSON: this.options.compatibilityJSON,
3565
- simplifyPluralSuffix: this.options.simplifyPluralSuffix
3566
- }), d && (!this.options.interpolation.format || this.options.interpolation.format === a.interpolation.format) && (c.formatter = s(d), c.formatter.init(c, this.options), this.options.interpolation.format = c.formatter.format.bind(c.formatter)), c.interpolator = new za(this.options), c.utils = {
3567
- hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
3568
- }, c.backendConnector = new Ka(s(this.modules.backend), c.resourceStore, c, this.options), c.backendConnector.on("*", function(S) {
3569
- for (var y = arguments.length, k = new Array(y > 1 ? y - 1 : 0), N = 1; N < y; N++)
3570
- k[N - 1] = arguments[N];
3571
- e.emit(S, ...k);
3572
- }), this.modules.languageDetector && (c.languageDetector = s(this.modules.languageDetector), c.languageDetector.init && c.languageDetector.init(c, this.options.detection, this.options)), this.modules.i18nFormat && (c.i18nFormat = s(this.modules.i18nFormat), c.i18nFormat.init && c.i18nFormat.init(this)), this.translator = new fe(this.services, this.options), this.translator.on("*", function(S) {
3573
- for (var y = arguments.length, k = new Array(y > 1 ? y - 1 : 0), N = 1; N < y; N++)
3574
- k[N - 1] = arguments[N];
3575
- e.emit(S, ...k);
3576
- }), this.modules.external.forEach((S) => {
3577
- S.init && S.init(this);
3578
- });
3579
- }
3580
- if (this.format = this.options.interpolation.format, i || (i = se), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
3581
- const d = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
3582
- d.length > 0 && d[0] !== "dev" && (this.options.lng = d[0]);
3583
- }
3584
- !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((d) => {
3585
- this[d] = function() {
3586
- return e.store[d](...arguments);
3587
- };
3588
- }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((d) => {
3589
- this[d] = function() {
3590
- return e.store[d](...arguments), e;
3591
- };
3592
- });
3593
- const l = Z(), u = () => {
3594
- const d = (f, c) => {
3595
- this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), l.resolve(c), i(f, c);
3596
- };
3597
- if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized)
3598
- return d(null, this.t.bind(this));
3599
- this.changeLanguage(this.options.lng, d);
3600
- };
3601
- return this.options.resources || !this.options.initImmediate ? u() : setTimeout(u, 0), l;
3602
- }
3603
- loadResources(e) {
3604
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : se;
3605
- const a = typeof e == "string" ? e : this.language;
3606
- if (typeof e == "function" && (i = e), !this.options.resources || this.options.partialBundledLanguages) {
3607
- if (a && a.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0))
3608
- return i();
3609
- const s = [], r = (o) => {
3610
- if (!o || o === "cimode")
3611
- return;
3612
- this.services.languageUtils.toResolveHierarchy(o).forEach((u) => {
3613
- u !== "cimode" && s.indexOf(u) < 0 && s.push(u);
3614
- });
3615
- };
3616
- a ? r(a) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l) => r(l)), this.options.preload && this.options.preload.forEach((o) => r(o)), this.services.backendConnector.load(s, this.options.ns, (o) => {
3617
- !o && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), i(o);
3618
- });
3619
- } else
3620
- i(null);
3621
- }
3622
- reloadResources(e, t, i) {
3623
- const a = Z();
3624
- return e || (e = this.languages), t || (t = this.options.ns), i || (i = se), this.services.backendConnector.reload(e, t, (s) => {
3625
- a.resolve(), i(s);
3626
- }), a;
3627
- }
3628
- use(e) {
3629
- if (!e)
3630
- throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
3631
- if (!e.type)
3632
- throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
3633
- 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" && $t.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
3634
- }
3635
- setResolvedLanguage(e) {
3636
- if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1))
3637
- for (let t = 0; t < this.languages.length; t++) {
3638
- const i = this.languages[t];
3639
- if (!(["cimode", "dev"].indexOf(i) > -1) && this.store.hasLanguageSomeTranslations(i)) {
3640
- this.resolvedLanguage = i;
3641
- break;
3642
- }
3643
- }
3644
- }
3645
- changeLanguage(e, t) {
3646
- var i = this;
3647
- this.isLanguageChangingTo = e;
3648
- const a = Z();
3649
- this.emit("languageChanging", e);
3650
- const s = (l) => {
3651
- this.language = l, this.languages = this.services.languageUtils.toResolveHierarchy(l), this.resolvedLanguage = void 0, this.setResolvedLanguage(l);
3652
- }, r = (l, u) => {
3653
- u ? (s(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, a.resolve(function() {
3654
- return i.t(...arguments);
3655
- }), t && t(l, function() {
3656
- return i.t(...arguments);
3657
- });
3658
- }, o = (l) => {
3659
- !e && !l && this.services.languageDetector && (l = []);
3660
- const u = typeof l == "string" ? l : this.services.languageUtils.getBestMatchFromCodes(l);
3661
- u && (this.language || s(u), this.translator.language || this.translator.changeLanguage(u), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(u)), this.loadResources(u, (d) => {
3662
- r(d, u);
3663
- });
3664
- };
3665
- return !e && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(e), a;
3666
- }
3667
- getFixedT(e, t, i) {
3668
- var a = this;
3669
- const s = function(r, o) {
3670
- let l;
3671
- if (typeof o != "object") {
3672
- for (var u = arguments.length, d = new Array(u > 2 ? u - 2 : 0), f = 2; f < u; f++)
3673
- d[f - 2] = arguments[f];
3674
- l = a.options.overloadTranslationOptionHandler([r, o].concat(d));
3675
- } else
3676
- l = {
3677
- ...o
3678
- };
3679
- l.lng = l.lng || s.lng, l.lngs = l.lngs || s.lngs, l.ns = l.ns || s.ns, l.keyPrefix = l.keyPrefix || i || s.keyPrefix;
3680
- const c = a.options.keySeparator || ".";
3681
- let S;
3682
- return l.keyPrefix && Array.isArray(r) ? S = r.map((y) => `${l.keyPrefix}${c}${y}`) : S = l.keyPrefix ? `${l.keyPrefix}${c}${r}` : r, a.t(S, l);
3683
- };
3684
- return typeof e == "string" ? s.lng = e : s.lngs = e, s.ns = t, s.keyPrefix = i, s;
3685
- }
3686
- t() {
3687
- return this.translator && this.translator.translate(...arguments);
3688
- }
3689
- exists() {
3690
- return this.translator && this.translator.exists(...arguments);
3691
- }
3692
- setDefaultNamespace(e) {
3693
- this.options.defaultNS = e;
3694
- }
3695
- hasLoadedNamespace(e) {
3696
- let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
3697
- if (!this.isInitialized)
3698
- return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
3699
- if (!this.languages || !this.languages.length)
3700
- return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
3701
- const i = t.lng || this.resolvedLanguage || this.languages[0], a = this.options ? this.options.fallbackLng : !1, s = this.languages[this.languages.length - 1];
3702
- if (i.toLowerCase() === "cimode")
3703
- return !0;
3704
- const r = (o, l) => {
3705
- const u = this.services.backendConnector.state[`${o}|${l}`];
3706
- return u === -1 || u === 2;
3707
- };
3708
- if (t.precheck) {
3709
- const o = t.precheck(this, r);
3710
- if (o !== void 0)
3711
- return o;
3712
- }
3713
- return !!(this.hasResourceBundle(i, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || r(i, e) && (!a || r(s, e)));
3714
- }
3715
- loadNamespaces(e, t) {
3716
- const i = Z();
3717
- return this.options.ns ? (typeof e == "string" && (e = [e]), e.forEach((a) => {
3718
- this.options.ns.indexOf(a) < 0 && this.options.ns.push(a);
3719
- }), this.loadResources((a) => {
3720
- i.resolve(), t && t(a);
3721
- }), i) : (t && t(), Promise.resolve());
3722
- }
3723
- loadLanguages(e, t) {
3724
- const i = Z();
3725
- typeof e == "string" && (e = [e]);
3726
- const a = this.options.preload || [], s = e.filter((r) => a.indexOf(r) < 0);
3727
- return s.length ? (this.options.preload = a.concat(s), this.loadResources((r) => {
3728
- i.resolve(), t && t(r);
3729
- }), i) : (t && t(), Promise.resolve());
3730
- }
3731
- dir(e) {
3732
- if (e || (e = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language)), !e)
3733
- return "rtl";
3734
- const t = ["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 ut(ft());
3735
- return t.indexOf(i.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
3736
- }
3737
- static createInstance() {
3738
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
3739
- return new te(e, t);
3740
- }
3741
- cloneInstance() {
3742
- let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : se;
3743
- const i = e.forkResourceStore;
3744
- i && delete e.forkResourceStore;
3745
- const a = {
3746
- ...this.options,
3747
- ...e,
3748
- isClone: !0
3749
- }, s = new te(a);
3750
- return (e.debug !== void 0 || e.prefix !== void 0) && (s.logger = s.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
3751
- s[o] = this[o];
3752
- }), s.services = {
3753
- ...this.services
3754
- }, s.services.utils = {
3755
- hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
3756
- }, i && (s.store = new lt(this.store.data, a), s.services.resourceStore = s.store), s.translator = new fe(s.services, a), s.translator.on("*", function(o) {
3757
- for (var l = arguments.length, u = new Array(l > 1 ? l - 1 : 0), d = 1; d < l; d++)
3758
- u[d - 1] = arguments[d];
3759
- s.emit(o, ...u);
3760
- }), s.init(a, t), s.translator.options = a, s.translator.backendConnector.services.utils = {
3761
- hasLoadedNamespace: s.hasLoadedNamespace.bind(s)
3762
- }, s;
3763
- }
3764
- toJSON() {
3765
- return {
3766
- options: this.options,
3767
- store: this.store,
3768
- language: this.language,
3769
- languages: this.languages,
3770
- resolvedLanguage: this.resolvedLanguage
3771
- };
3772
- }
3773
- }
3774
- const U = te.createInstance();
3775
- U.createInstance = te.createInstance;
3776
- U.createInstance;
3777
- U.dir;
3778
- U.init;
3779
- U.loadResources;
3780
- U.reloadResources;
3781
- U.use;
3782
- U.changeLanguage;
3783
- U.getFixedT;
3784
- U.t;
3785
- U.exists;
3786
- U.setDefaultNamespace;
3787
- U.hasLoadedNamespace;
3788
- U.loadNamespaces;
3789
- U.loadLanguages;
3790
- const Ja = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, qa = {
3791
- "&amp;": "&",
3792
- "&#38;": "&",
3793
- "&lt;": "<",
3794
- "&#60;": "<",
3795
- "&gt;": ">",
3796
- "&#62;": ">",
3797
- "&apos;": "'",
3798
- "&#39;": "'",
3799
- "&quot;": '"',
3800
- "&#34;": '"',
3801
- "&nbsp;": " ",
3802
- "&#160;": " ",
3803
- "&copy;": "©",
3804
- "&#169;": "©",
3805
- "&reg;": "®",
3806
- "&#174;": "®",
3807
- "&hellip;": "…",
3808
- "&#8230;": "…",
3809
- "&#x2F;": "/",
3810
- "&#47;": "/"
3811
- }, Ha = (n) => qa[n], Za = (n) => n.replace(Ja, Ha);
3812
- let ht = {
3813
- bindI18n: "languageChanged",
3814
- bindI18nStore: "",
3815
- transEmptyNodeValue: "",
3816
- transSupportBasicHtmlNodes: !0,
3817
- transWrapTextNodes: "",
3818
- transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
3819
- useSuspense: !0,
3820
- unescape: Za
3821
- };
3822
- function Xa() {
3823
- let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3824
- ht = {
3825
- ...ht,
3826
- ...n
3827
- };
3828
- }
3829
- const Ya = {
3830
- type: "3rdParty",
3831
- init(n) {
3832
- Xa(n.options.react);
3833
- }
3834
- };
3835
- xa(U, Ya);
3836
- const Gs = (n) => da(U, n);
3837
- let Ve = /* @__PURE__ */ new Map();
3838
- const xe = gt(Ve), Ks = ({ children: n, stores: e }) => {
3839
- const t = Oe(xe), i = qt(() => {
3840
- const a = /* @__PURE__ */ new Map();
3841
- return e.forEach((s) => a.set(s.class, s.value)), Ve = new Map([...t, ...a]);
3842
- }, []);
3843
- return /* @__PURE__ */ Ht(xe.Provider, { value: i, children: n });
3844
- };
3845
- function Ws(n) {
3846
- return Oe(xe).get(n);
3847
- }
3848
- function Js(n) {
3849
- return Ve.get(n);
3850
- }
3851
- var jt = /* @__PURE__ */ ((n) => (n.Created = "CREATED", n.Finalized = "FINALIZED", n.Live = "LIVE", n.Starting = "STARTING", n))(jt || {}), zt = /* @__PURE__ */ ((n) => (n.Add = "add", n.Remove = "remove", n))(zt || {}), Bt = /* @__PURE__ */ ((n) => (n.Active = "active", n.Inactive = "inactive", n))(Bt || {});
3852
- const es = { 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" } }] } }] } }] } }] }, ts = { 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" } }] } }] } }] } }] }, ns = { 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" } }] } }] } }] } }] }, is = { 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" } }] } }] } }] } }] }, as = { 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" } }] } }] } }] } }] }, ss = { 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" } }] } }] } }] } }] }, rs = { 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" } }] } }] } }] } }] }, os = { 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" } }] } }] } }] } }] }, ls = { 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" } }] } }] } }] } }] }, ds = { 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" } }] } }] } }] } }] }, us = { 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" } }] } }] } }] } }] }, cs = { 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" } }] } }] } }] } }] }, ms = { 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" } }] } }] } }] } }] }, fs = { 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" } }] } }] } }] } }] }, ps = { 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" } }] } }] } }] } }] }, hs = { 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" } }] } }] } }] } }] }, gs = { 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" } }] } }] } }] } }] }, ks = { 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" } }] } }] } }] } }] }, vs = { 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" } }] } }] } }] } }] }, Ss = { 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" } }] } }] } }] } }] }, ys = { 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" } }] } }] } }] } }] }, Ns = { 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" } }] } }] } }] } }] }, bs = { 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" } }] } }] } }] } }] }, Fs = { 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" } }] } }] } }] } }] }, ws = { 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" } }] } }] } }] } }] }, Cs = { 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" } }] } }] } }] } }] } }] }, Es = { 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" } }] } }] } }] } }] }, xs = { 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" } }] } }] } }] } }] }, qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3853
- __proto__: null,
3854
- AddCollectionDocument: es,
3855
- AppendProductsToSnackVideoDocument: Ss,
3856
- BlockUserDocument: ds,
3857
- ChangeAccountUsernameDocument: us,
3858
- CreateSnackVideoBatchDocument: ys,
3859
- DeleteAllCustomizationDocument: hs,
3860
- DeleteChatMessageDocument: cs,
3861
- DeleteCollectionDocument: ts,
3862
- DeleteRelationshipWithSnackVideoDocument: Ns,
3863
- DeleteSnackVideoDocument: bs,
3864
- EventStatus: jt,
3865
- FindByProductSnackVideoDocument: xs,
3866
- FindCollectionDocument: ns,
3867
- FindManySnackVideosDocument: Fs,
3868
- FindMinimalEventDocument: os,
3869
- GetAllChatMessageDocument: ms,
3870
- GetAllCollectionsDocument: is,
3871
- GetAllCustomizationDocument: gs,
3872
- GetAllSnackVideosDocument: ws,
3873
- GetChatRoomTokenDocument: fs,
3874
- GetSnackVideoRelationshipsDocument: Cs,
3875
- GetTimeLineDocument: vs,
3876
- ManageCollectionProductDocument: as,
3877
- Methods: zt,
3878
- PinChatMessageDocument: ps,
3879
- SearchCollectionsDocument: ss,
3880
- SearchMinimalEventsDocument: ls,
3881
- SearchSnackVideosDocument: Es,
3882
- Status: Bt,
3883
- UpdateCollectionDocument: rs,
3884
- UpdateCustomizationDocument: ks
3885
- }, Symbol.toStringTag, { value: "Module" }));
3886
- function Hs(n) {
3887
- return {
3888
- class: n,
3889
- _value: null,
3890
- get value() {
3891
- return this._value || (this._value = new n(), Object.freeze(this)), this._value;
3892
- }
3893
- };
3894
- }
3895
- export {
3896
- Lt as AccountContractStatusTypes,
3897
- mi as AccountContractTypes,
3898
- _s as AccountInvalidError,
3899
- pi as AccountPlanDescriptionTypes,
3900
- ki as AccountRestRepository,
3901
- vi as AccountService,
3902
- fi as AccountSubscriptionTypes,
3903
- Dt as AccountTypes,
3904
- ui as AggregateRoot,
3905
- qs as ApiGraphqlTypes,
3906
- $s as BaseMobxStore,
3907
- Bn as BroadcastChannelEventBus,
3908
- ke as DomainError,
3909
- Bs as EventBusWildcards,
3910
- Qs as EventNames,
3911
- hi as GlobalPageSectionTypes,
3912
- di as InvalidNizzaGlobalObjectError,
3913
- aa as LanguageTypes,
3914
- De as NizzaAccount,
3915
- ia as NizzaEventStatus,
3916
- we as NizzaLogger,
3917
- ra as NizzaProductRequestOriginTypes,
3918
- sa as NizzaVariationTypes,
3919
- oi as ResourceNotFoundError,
3920
- Ks as StoreProvider,
3921
- li as UnexpectedError,
3922
- js as ValueObject,
3923
- Re as accountAtom,
3924
- At as accountService,
3925
- Is as apiCall,
3926
- oa as buildLanguageTranslations,
3927
- la as buildTranslations,
3928
- qn as configure,
3929
- X as coreLogger,
3930
- ci as createAggregateRoot,
3931
- Hs as createStore,
3932
- yt as customFetch,
3933
- Ds as downloadFile,
3934
- As as fileOrigin,
3935
- na as getAccount,
3936
- Ms as getClientTimeZone,
3937
- Wn as getInstance,
3938
- Js as getStore,
3939
- ta as globalAtomStore,
3940
- xa as i18Init,
3941
- kn as jsDownload,
3942
- Ps as logger,
3943
- j as nizza,
3944
- Vs as nizzaInit,
3945
- Gs as registerTranslations,
3946
- da as registerTranslationsOf,
3947
- Ls as searchParams,
3948
- Hn as setProductDataSource,
3949
- Gn as shortId,
3950
- zs as useAccount,
3951
- It as useNizza,
3952
- Ws as useStore,
3953
- Us as validateRequiredProps
3954
- };
3955
- //# sourceMappingURL=index.mjs.map
22
+ `)}},Ni=function(t,e){e.forEach(n=>{if(Sa(ba(n.split("."),t)))throw new Xe(n)})},pi=function(){var i,a,o;let t=null,e=null,n=null;try{t=(o=(a=(i=Intl.DateTimeFormat())==null?void 0:i.resolvedOptions())==null?void 0:a.timeZone)!=null?o:null;const s=-new Date().getTimezoneOffset();n=s;const l=s>=0?"+":"-",r=String(Math.floor(Math.abs(s)/60)).padStart(2,"0"),d=String(Math.abs(s)%60).padStart(2,"0");e=`${l}${r}:${d}`}catch{G.error("Error obtaining time zone or offset")}return{offset:e,offsetValue:n,value:t,country:null,included:null,label:null}},We=class{constructor(t){x(this,"aggregate");x(this,"_numSetPropsApplied",0);this.aggregate=t}setProps(t){for(const[e,n]of Object.entries(t))e in this.aggregate&&(this.aggregate[e]=n);this._numSetPropsApplied++}get isFirstSetProps(){return this._numSetPropsApplied===1}},lt=function(t){return new We(t)},ai=class{},li=class{constructor(t){x(this,"_value");t!==void 0&&(this._value=t)}get value(){return this._value}},we=(t=>(t.VTEX="VTEX",t.VTEX_IO="VTEX-IO",t.VTEX_CMS="PORTAL-VTEX",t.PLATFORM="PLATFORM",t.UNKNOWN="UNKNOWN",t))(we||{}),Ge=(t=>(t.PLATFORM="platform_module",t.ADENDA="subscription_module",t.APP_STORE="app_store",t))(Ge||{}),Fe=(t=>(t.ACTIVE="active_contract",t.INACTIVE="inactive_contract",t))(Fe||{}),Je=(t=>(t.LITE="lite",t.STANDARD="standard",t.PRO="pro",t))(Je||{}),Qe=(t=>(t.LITE="PLAN_LITE",t.STANDARD="PLAN_ESTANDAR",t.PRO="PLAN_PRO",t.NONE="NO_PLAN",t))(Qe||{}),Ze=(t=>(t.PAST="past",t.LIVE="live",t.FUTURE="future",t))(Ze||{}),Ce=class{constructor(t){x(this,"root",lt(this));x(this,"id");x(this,"account");x(this,"accountType",we.UNKNOWN);x(this,"username");x(this,"currencyConfig");x(this,"contractType");x(this,"nextDateMetricRecord");x(this,"spendedMinutes",0);x(this,"unlimitedService",!1);x(this,"hoursAvailable",0);x(this,"contractStatus",Fe.ACTIVE);x(this,"createdAt");x(this,"installationDateApp");x(this,"cxAccount");x(this,"freeService",!1);x(this,"subscriptionType",null);x(this,"minutesAvailable",0);x(this,"globalPage");x(this,"stripe");x(this,"descriptionPlan");x(this,"planType");x(this,"selectFreeTrial");x(this,"exceededFeatures");x(this,"host",null);this.root.setProps(t)}static toDomain(t){const{createdAt:e,username:n,...i}=t,a={...i,username:n!=null?n:i.account,createdAt:new Date(Number(e))};return new Ce(a)}toPrimitives(){const{root:t,createdAt:e,...n}=this;return{...n,created:e.toISOString()}}};const Fa=`${Ho.apiUrls.restV1}/accounts/v2`;qe=class{async get(t){const e=`${Fa}/${t}`,{data:n}=await Te({url:e});return n?Ce.toDomain(n):null}},Ke=class{constructor(t){this.accountRepository=t}async get(t){try{const e=await this.accountRepository.get(t);if(!e)throw new it(t);return e}catch(e){throw new at(e)}}};let Ut;Ut=new qe,Ee=new Ke(Ut);class Le{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const n={listener:e};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const pe=typeof window>"u"||"Deno"in window;function wa(){}function jt(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ca(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ea(t,e,n){return Ta(t)?typeof e=="function"?{...n,queryKey:t,queryFn:e}:{...e,queryKey:t}:t}function $t(t,e){if(t===e)return t;const n=Mt(t)&&Mt(e);if(n||zt(t)&&zt(e)){const i=n?t.length:Object.keys(t).length,a=n?e:Object.keys(e),o=a.length,s=n?[]:{};let l=0;for(let r=0;r<o;r++){const d=n?r:a[r];s[d]=$t(t[d],e[d]),s[d]===t[d]&&l++}return i===o&&l===i?t:s}return e}function Ae(t,e){if(t&&!e||e&&!t)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function Mt(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function zt(t){if(!Bt(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!Bt(n)||!n.hasOwnProperty("isPrototypeOf"))}function Bt(t){return Object.prototype.toString.call(t)==="[object Object]"}function Ta(t){return Array.isArray(t)}function Oa(t){return new Promise(e=>{setTimeout(e,t)})}function Gt(t){Oa(0).then(t)}function Qt(t,e,n){return n.isDataEqual!=null&&n.isDataEqual(t,e)?t:typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?$t(t,e):e}class xa extends Le{constructor(){super(),this.setup=e=>{if(!pe&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Ra=new xa,qt=["online","offline"];class Da extends Le{constructor(){super(),this.setup=e=>{if(!pe&&window.addEventListener){const n=()=>e();return qt.forEach(i=>{window.addEventListener(i,n,!1)}),()=>{qt.forEach(i=>{window.removeEventListener(i,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var n;this.setup=e,(n=this.cleanup)==null||n.call(this),this.cleanup=e(i=>{typeof i=="boolean"?this.setOnline(i):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Ia=new Da;function La(t){return(t!=null?t:"online")==="online"?Ia.isOnline():!0}class Aa{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}}function Pa(t){return t instanceof Aa}function Va(){let t=[],e=0,n=r=>{r()},i=r=>{r()};const a=r=>{let d;e++;try{d=r()}finally{e--,e||l()}return d},o=r=>{e?t.push(r):Gt(()=>{n(r)})},s=r=>(...d)=>{o(()=>{r(...d)})},l=()=>{const r=t;t=[],r.length&&Gt(()=>{i(()=>{r.forEach(d=>{n(d)})})})};return{batch:a,batchCalls:s,schedule:o,setNotifyFunction:r=>{n=r},setBatchNotifyFunction:r=>{i=r}}}const Y=Va();class _a extends Le{constructor(e,n){super(),this.client=e,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),Kt(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Pe(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Pe(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,n){const i=this.options,a=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),Ae(i,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=i.queryKey),this.updateQuery();const o=this.hasListeners();o&&Jt(this.currentQuery,a,this.options,i)&&this.executeFetch(),this.updateResult(n),o&&(this.currentQuery!==a||this.options.enabled!==i.enabled||this.options.staleTime!==i.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==a||this.options.enabled!==i.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(e){const n=this.client.getQueryCache().build(this.client,e),i=this.createResult(n,e);return ja(this,i,e)&&(this.currentResult=i,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),i}getCurrentResult(){return this.currentResult}trackResult(e){const n={};return Object.keys(e).forEach(i=>{Object.defineProperty(n,i,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(i),e[i])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...n}={}){return this.fetch({...n,meta:{refetchPage:e}})}fetchOptimistic(e){const n=this.client.defaultQueryOptions(e),i=this.client.getQueryCache().build(this.client,n);return i.isFetchingOptimistic=!0,i.fetch().then(()=>this.createResult(i,n))}fetch(e){var n;return this.executeFetch({...e,cancelRefetch:(n=e.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let n=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(wa)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),pe||this.currentResult.isStale||!jt(this.options.staleTime))return;const e=Ca(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},e)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(pe||this.options.enabled===!1||!jt(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Ra.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,n){const i=this.currentQuery,a=this.options,o=this.currentResult,s=this.currentResultState,l=this.currentResultOptions,r=e!==i,d=r?e.state:this.currentQueryInitialState,u=r?this.currentResult:this.previousQueryResult,{state:m}=e;let{dataUpdatedAt:p,error:f,errorUpdatedAt:w,fetchStatus:S,status:E}=m,b=!1,A=!1,O;if(n._optimisticResults){const L=this.hasListeners(),c=!L&&Kt(e,n),k=L&&Jt(e,i,n,a);(c||k)&&(S=La(e.options.networkMode)?"fetching":"paused",p||(E="loading")),n._optimisticResults==="isRestoring"&&(S="idle")}if(n.keepPreviousData&&!m.dataUpdatedAt&&u!=null&&u.isSuccess&&E!=="error")O=u.data,p=u.dataUpdatedAt,E=u.status,b=!0;else if(n.select&&typeof m.data<"u")if(o&&m.data===(s==null?void 0:s.data)&&n.select===this.selectFn)O=this.selectResult;else try{this.selectFn=n.select,O=n.select(m.data),O=Qt(o==null?void 0:o.data,O,n),this.selectResult=O,this.selectError=null}catch(L){this.selectError=L}else O=m.data;if(typeof n.placeholderData<"u"&&typeof O>"u"&&E==="loading"){let L;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData))L=o.data;else if(L=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof L<"u")try{L=n.select(L),this.selectError=null}catch(c){this.selectError=c}typeof L<"u"&&(E="success",O=Qt(o==null?void 0:o.data,L,n),A=!0)}this.selectError&&(f=this.selectError,O=this.selectResult,w=Date.now(),E="error");const C=S==="fetching",I=E==="loading",P=E==="error";return{status:E,fetchStatus:S,isLoading:I,isSuccess:E==="success",isError:P,isInitialLoading:I&&C,data:O,dataUpdatedAt:p,error:f,errorUpdatedAt:w,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:m.dataUpdateCount>0||m.errorUpdateCount>0,isFetchedAfterMount:m.dataUpdateCount>d.dataUpdateCount||m.errorUpdateCount>d.errorUpdateCount,isFetching:C,isRefetching:C&&!I,isLoadingError:P&&m.dataUpdatedAt===0,isPaused:S==="paused",isPlaceholderData:A,isPreviousData:b,isRefetchError:P&&m.dataUpdatedAt!==0,isStale:Ve(e,n),refetch:this.refetch,remove:this.remove}}updateResult(e){const n=this.currentResult,i=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Ae(i,n))return;this.currentResult=i;const a={cache:!0},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options,l=typeof s=="function"?s():s;if(l==="all"||!l&&!this.trackedProps.size)return!0;const r=new Set(l!=null?l:this.trackedProps);return this.options.useErrorBoundary&&r.add("error"),Object.keys(this.currentResult).some(d=>{const u=d;return this.currentResult[u]!==n[u]&&r.has(u)})};(e==null?void 0:e.listeners)!==!1&&o()&&(a.listeners=!0),this.notify({...a,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const n={};e.type==="success"?n.onSuccess=!e.manual:e.type==="error"&&!Pa(e.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(e){Y.batch(()=>{if(e.onSuccess){var n,i,a,o;(n=(i=this.options).onSuccess)==null||n.call(i,this.currentResult.data),(a=(o=this.options).onSettled)==null||a.call(o,this.currentResult.data,null)}else if(e.onError){var s,l,r,d;(s=(l=this.options).onError)==null||s.call(l,this.currentResult.error),(r=(d=this.options).onSettled)==null||r.call(d,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:u})=>{u(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Ua(t,e){return e.enabled!==!1&&!t.state.dataUpdatedAt&&!(t.state.status==="error"&&e.retryOnMount===!1)}function Kt(t,e){return Ua(t,e)||t.state.dataUpdatedAt>0&&Pe(t,e,e.refetchOnMount)}function Pe(t,e,n){if(e.enabled!==!1){const i=typeof n=="function"?n(t):n;return i==="always"||i!==!1&&Ve(t,e)}return!1}function Jt(t,e,n,i){return n.enabled!==!1&&(t!==e||i.enabled===!1)&&(!n.suspense||t.state.status!=="error")&&Ve(t,n)}function Ve(t,e){return t.isStaleByTime(e.staleTime)}function ja(t,e,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?e.isPlaceholderData:!Ae(t.getCurrentResult(),e)}const $a=Rt.useSyncExternalStore,ge=await M("react"),Wt=ge.createContext(void 0),Ma=ge.createContext(!1);function za(t,e){return t||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Wt),window.ReactQueryClientContext):Wt)}const Ba=({context:t}={})=>{const e=ge.useContext(za(t,ge.useContext(Ma)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},Ht=await M("react"),Zt=Ht.createContext(!1),Ga=()=>Ht.useContext(Zt);Zt.Provider;const Xt=await M("react");function Qa(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const qa=Xt.createContext(Qa()),Ka=()=>Xt.useContext(qa);function Ja(t,e){return typeof t=="function"?t(...e):!!t}const Wa=await M("react"),Ha=(t,e)=>{(t.suspense||t.useErrorBoundary)&&(e.isReset()||(t.retryOnMount=!1))},Za=t=>{Wa.useEffect(()=>{t.clearReset()},[t])},Xa=({result:t,errorResetBoundary:e,useErrorBoundary:n,query:i})=>t.isError&&!e.isReset()&&!t.isFetching&&Ja(n,[t.error,i]),Ya=t=>{t.suspense&&typeof t.staleTime!="number"&&(t.staleTime=1e3)},eo=(t,e)=>t.isLoading&&t.isFetching&&!e,to=(t,e,n)=>(t==null?void 0:t.suspense)&&eo(e,n),no=(t,e,n)=>e.fetchOptimistic(t).then(({data:i})=>{t.onSuccess==null||t.onSuccess(i),t.onSettled==null||t.onSettled(i,null)}).catch(i=>{n.clearReset(),t.onError==null||t.onError(i),t.onSettled==null||t.onSettled(void 0,i)}),_e=await M("react");function io(t,e){const n=Ba({context:t.context}),i=Ga(),a=Ka(),o=n.defaultQueryOptions(t);o._optimisticResults=i?"isRestoring":"optimistic",o.onError&&(o.onError=Y.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=Y.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=Y.batchCalls(o.onSettled)),Ya(o),Ha(o,a),Za(a);const[s]=_e.useState(()=>new e(n,o)),l=s.getOptimisticResult(o);if($a(_e.useCallback(r=>{const d=i?()=>{}:s.subscribe(Y.batchCalls(r));return s.updateResult(),d},[s,i]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),_e.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),to(o,l,i))throw no(o,s,a);if(Xa({result:l,errorResetBoundary:a,useErrorBoundary:o.useErrorBoundary,query:s.getCurrentQuery()}))throw l.error;return o.notifyOnChangeProps?l:s.trackResult(l)}function ao(t,e,n){const i=Ea(t,e,n);return io(i,_a)}let Yt,en;({useEffect:Yt}=await M("react")),en=()=>["account"],yi=()=>{const t=ft(a=>{var o;return(o=a.config)==null?void 0:o.account}),[e,n]=$i(oe),i=ao(en(),()=>Ee.get(t),{enabled:!!t&&!e,refetchOnWindowFocus:!1,refetchOnMount:!1});return Yt(()=>{const a=i.data;!i.isSuccess||!a||n(a)},[i.status]),{findQuery:i,account:e}},ct=bt(),dt=async function(t){const e=await Ee.get(t);return ct.set(oe,e),e},et=(t=>(t.CREATED="CREATED",t.STARTING="STARTING",t.LIVE="LIVE",t.FINALIZED="FINALIZED",t))(et||{}),oi={ALL:"*",CORE:"core:**",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:**"},si={EVENT_STATUS_CHANGED:"event:statusChanged"},Ye=(t=>(t.English="en",t.Spanish="es",t.Portuguese="pt",t))(Ye||{}),nt=(t=>(t.COMBO="Combo",t))(nt||{}),tt=(t=>(t.VTEX="VTEX",t.PLATFORM="platform",t.CACE="CACE",t.GLOBAL_PAGE="globalPage",t.DEV_LOCAL="dev:local",t.CUSTOMIZATION="customization",t.FAST_STORE="faststore",t))(tt||{}),ot=function(t){const e=Object.values(t);return Object.assign({},...e)},st=function(t){return Object.entries(t).reduce((e,[n,i])=>{const a=ot(i);return{...e,[n]:a}},{})},gt=function(t,e){const n=st(e);Object.entries(n).forEach(([i,a])=>{t.addResourceBundle(i,"translation",a,!0)})};function oo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ee(t){"@babel/helpers - typeof";return ee=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ee(t)}function so(t,e){if(ee(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var i=n.call(t,e||"default");if(ee(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ro(t){var e=so(t,"string");return ee(e)=="symbol"?e:String(e)}function tn(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,ro(i.key),i)}}function lo(t,e,n){return e&&tn(t.prototype,e),n&&tn(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var nn=[],uo=nn.forEach,co=nn.slice;function mo(t){return uo.call(co.call(arguments,1),function(e){if(e)for(var n in e)t[n]===void 0&&(t[n]=e[n])}),t}var an=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,po=function(t,e,n){var i=n||{};i.path=i.path||"/";var a=encodeURIComponent(e),o="".concat(t,"=").concat(a);if(i.maxAge>0){var s=i.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(s))}if(i.domain){if(!an.test(i.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(i.domain)}if(i.path){if(!an.test(i.path))throw new TypeError("option path is invalid");o+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(o+="; HttpOnly"),i.secure&&(o+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o},on={create:function(t,e,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(a.expires=new Date,a.expires.setTime(a.expires.getTime()+n*60*1e3)),i&&(a.domain=i),document.cookie=po(t,encodeURIComponent(e),a)},read:function(t){for(var e="".concat(t,"="),n=document.cookie.split(";"),i=0;i<n.length;i++){for(var a=n[i];a.charAt(0)===" ";)a=a.substring(1,a.length);if(a.indexOf(e)===0)return a.substring(e.length,a.length)}return null},remove:function(t){this.create(t,"",-1)}},go={name:"cookie",lookup:function(t){var e;if(t.lookupCookie&&typeof document<"u"){var n=on.read(t.lookupCookie);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupCookie&&typeof document<"u"&&on.create(e.lookupCookie,t,e.cookieMinutes,e.cookieDomain,e.cookieOptions)}},ho={name:"querystring",lookup:function(t){var e;if(typeof window<"u"){var n=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=n.substring(1),a=i.split("&"),o=0;o<a.length;o++){var s=a[o].indexOf("=");if(s>0){var l=a[o].substring(0,s);l===t.lookupQuerystring&&(e=a[o].substring(s+1))}}}return e}},te=null,sn=function(){if(te!==null)return te;try{te=window!=="undefined"&&window.localStorage!==null;var t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{te=!1}return te},ko={name:"localStorage",lookup:function(t){var e;if(t.lookupLocalStorage&&sn()){var n=window.localStorage.getItem(t.lookupLocalStorage);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupLocalStorage&&sn()&&window.localStorage.setItem(e.lookupLocalStorage,t)}},ne=null,rn=function(){if(ne!==null)return ne;try{ne=window!=="undefined"&&window.sessionStorage!==null;var t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{ne=!1}return ne},fo={name:"sessionStorage",lookup:function(t){var e;if(t.lookupSessionStorage&&rn()){var n=window.sessionStorage.getItem(t.lookupSessionStorage);n&&(e=n)}return e},cacheUserLanguage:function(t,e){e.lookupSessionStorage&&rn()&&window.sessionStorage.setItem(e.lookupSessionStorage,t)}},vo={name:"navigator",lookup:function(t){var e=[];if(typeof navigator<"u"){if(navigator.languages)for(var n=0;n<navigator.languages.length;n++)e.push(navigator.languages[n]);navigator.userLanguage&&e.push(navigator.userLanguage),navigator.language&&e.push(navigator.language)}return e.length>0?e:void 0}},yo={name:"htmlTag",lookup:function(t){var e,n=t.htmlTag||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(e=n.getAttribute("lang")),e}},So={name:"path",lookup:function(t){var e;if(typeof window<"u"){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if(typeof t.lookupFromPathIndex=="number"){if(typeof n[t.lookupFromPathIndex]!="string")return;e=n[t.lookupFromPathIndex].replace("/","")}else e=n[0].replace("/","")}return e}},No={name:"subdomain",lookup:function(t){var e=typeof t.lookupFromSubdomainIndex=="number"?t.lookupFromSubdomainIndex+1:1,n=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[e]}};function bo(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(t){return t}}}var ln=function(){function t(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};oo(this,t),this.type="languageDetector",this.detectors={},this.init(e,n)}return lo(t,[{key:"init",value:function(e){var 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=mo(n,this.options||{},bo()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(a){return a.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(go),this.addDetector(ho),this.addDetector(ko),this.addDetector(fo),this.addDetector(vo),this.addDetector(yo),this.addDetector(So),this.addDetector(No)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var n=this;e||(e=this.options.order);var i=[];return e.forEach(function(a){if(n.detectors[a]){var o=n.detectors[a].lookup(n.options);o&&typeof o=="string"&&(o=[o]),o&&(i=i.concat(o))}}),i=i.map(function(a){return n.options.convertDetectedLanguage(a)}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(e,n){var i=this;n||(n=this.options.caches),n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(function(a){i.detectors[a]&&i.detectors[a].cacheUserLanguage(e,i.options)}))}}]),t}();ln.type="languageDetector",mt=function(t,e){t.use(e).use(ln).init({resources:{},fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1,format:(n,i,a)=>{if(i){const[o,...s]=i.split(",").map(l=>l.trim());if(o==="number")return new Intl.NumberFormat(a).format(n);if(o==="date")return new Intl.DateTimeFormat(a).format(n);if(o==="currency")return new Intl.NumberFormat(a,{style:"currency",currency:s[0]||"USD",currencyDisplay:"narrowSymbol"}).format(n).replace("$","").trim()}return n}},detection:{order:["navigator","cookie","localStorage","sessionStorage","querystring","htmlTag","path","subdomain"]}})};const Fo={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 he{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||Fo,this.options=n,this.debug=n.debug}log(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"log","",!0)}warn(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","",!0)}error(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"error","")}deprecate(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return this.forward(n,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,i,a){return a&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${i}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new he(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new he(this.logger,e)}}var j=new he;class ke{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(i=>{this.observers[i]=this.observers[i]||[],this.observers[i].push(n)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e]=this.observers[e].filter(i=>i!==n)}}emit(e){for(var n=arguments.length,i=new Array(n>1?n-1:0),a=1;a<n;a++)i[a-1]=arguments[a];this.observers[e]&&[].concat(this.observers[e]).forEach(o=>{o(...i)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(o=>{o.apply(o,[e,...i])})}}function ie(){let t,e;const n=new Promise((i,a)=>{t=i,e=a});return n.resolve=t,n.reject=e,n}function dn(t){return t==null?"":""+t}function wo(t,e,n){t.forEach(i=>{e[i]&&(n[i]=e[i])})}function Ue(t,e,n){function i(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function a(){return!t||typeof t=="string"}const o=typeof e!="string"?[].concat(e):e.split(".");for(;o.length>1;){if(a())return{};const s=i(o.shift());!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={}}return a()?{}:{obj:t,k:i(o.shift())}}function un(t,e,n){const{obj:i,k:a}=Ue(t,e,Object);i[a]=n}function Co(t,e,n,i){const{obj:a,k:o}=Ue(t,e,Object);a[o]=a[o]||[],i&&(a[o]=a[o].concat(n)),i||a[o].push(n)}function fe(t,e){const{obj:n,k:i}=Ue(t,e);if(n)return n[i]}function Eo(t,e,n){const i=fe(t,n);return i!==void 0?i:fe(e,n)}function cn(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]):cn(t[i],e[i],n):t[i]=e[i]);return t}function J(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var To={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function Oo(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,e=>To[e]):t}const xo=[" ",",","?","!",";"];function Ro(t,e,n){e=e||"",n=n||"";const i=xo.filter(s=>e.indexOf(s)<0&&n.indexOf(s)<0);if(i.length===0)return!0;const a=new RegExp(`(${i.map(s=>s==="?"?"\\?":s).join("|")})`);let o=!a.test(t);if(!o){const s=t.indexOf(n);s>0&&!a.test(t.substring(0,s))&&(o=!0)}return o}function ve(t,e){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!t)return;if(t[e])return t[e];const i=e.split(n);let a=t;for(let o=0;o<i.length;++o){if(!a||typeof a[i[o]]=="string"&&o+1<i.length)return;if(a[i[o]]===void 0){let s=2,l=i.slice(o,o+s).join(n),r=a[l];for(;r===void 0&&i.length>o+s;)s++,l=i.slice(o,o+s).join(n),r=a[l];if(r===void 0)return;if(r===null)return null;if(e.endsWith(l)){if(typeof r=="string")return r;if(l&&typeof r[l]=="string")return r[l]}const d=i.slice(o+s).join(n);return d?ve(r,d,n):void 0}a=a[i[o]]}return a}function ye(t){return t&&t.indexOf("_")>0?t.replace("_","-"):t}class mn extends ke{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,s=a.ignoreJSONStructure!==void 0?a.ignoreJSONStructure:this.options.ignoreJSONStructure;let l=[e,n];i&&typeof i!="string"&&(l=l.concat(i)),i&&typeof i=="string"&&(l=l.concat(o?i.split(o):i)),e.indexOf(".")>-1&&(l=e.split("."));const r=fe(this.data,l);return r||!s||typeof i!="string"?r:ve(this.data&&this.data[e]&&this.data[e][n],i,o)}addResource(e,n,i,a){let o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator;let l=[e,n];i&&(l=l.concat(s?i.split(s):i)),e.indexOf(".")>-1&&(l=e.split("."),a=n,n=l[1]),this.addNamespaces(n),un(this.data,l,a),o.silent||this.emit("added",e,n,i,a)}addResources(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const o in i)(typeof i[o]=="string"||Object.prototype.toString.apply(i[o])==="[object Array]")&&this.addResource(e,n,o,i[o],{silent:!0});a.silent||this.emit("added",e,n,i)}addResourceBundle(e,n,i,a,o){let s=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},l=[e,n];e.indexOf(".")>-1&&(l=e.split("."),a=i,i=n,n=l[1]),this.addNamespaces(n);let r=fe(this.data,l)||{};a?cn(r,i,o):r={...r,...i},un(this.data,l,r),s.silent||this.emit("added",e,n,i)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,n)}:this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var pn={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,i,a){return t.forEach(o=>{this.processors[o]&&(e=this.processors[o].process(e,n,i,a))}),e}};const gn={};class Se extends ke{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),wo(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=j.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(e==null)return!1;const i=this.resolve(e,n);return i&&i.res!==void 0}extractFromKey(e,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const a=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let o=n.ns||this.options.defaultNS||[];const s=i&&e.indexOf(i)>-1,l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!Ro(e,i,a);if(s&&!l){const r=e.match(this.interpolator.nestingRegexp);if(r&&r.length>0)return{key:e,namespaces:o};const d=e.split(i);(i!==a||i===a&&this.options.ns.indexOf(d[0])>-1)&&(o=d.shift()),e=d.join(a)}return typeof o=="string"&&(o=[o]),{key:e,namespaces:o}}translate(e,n,i){if(typeof n!="object"&&this.options.overloadTranslationOptionHandler&&(n=this.options.overloadTranslationOptionHandler(arguments)),typeof n=="object"&&(n={...n}),n||(n={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const a=n.returnDetails!==void 0?n.returnDetails:this.options.returnDetails,o=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],n),r=l[l.length-1],d=n.lng||this.language,u=n.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&d.toLowerCase()==="cimode"){if(u){const O=n.nsSeparator||this.options.nsSeparator;return a?{res:`${r}${O}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:r,usedParams:this.getUsedParamsDetails(n)}:`${r}${O}${s}`}return a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:r,usedParams:this.getUsedParamsDetails(n)}:s}const m=this.resolve(e,n);let p=m&&m.res;const f=m&&m.usedKey||s,w=m&&m.exactUsedKey||s,S=Object.prototype.toString.apply(p),E=["[object Number]","[object Function]","[object RegExp]"],b=n.joinArrays!==void 0?n.joinArrays:this.options.joinArrays,A=!this.i18nFormat||this.i18nFormat.handleAsObject;if(A&&p&&typeof p!="string"&&typeof p!="boolean"&&typeof p!="number"&&E.indexOf(S)<0&&!(typeof b=="string"&&S==="[object Array]")){if(!n.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const O=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,p,{...n,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(m.res=O,m.usedParams=this.getUsedParamsDetails(n),m):O}if(o){const O=S==="[object Array]",C=O?[]:{},I=O?w:f;for(const P in p)if(Object.prototype.hasOwnProperty.call(p,P)){const L=`${I}${o}${P}`;C[P]=this.translate(L,{...n,joinArrays:!1,ns:l}),C[P]===L&&(C[P]=p[P])}p=C}}else if(A&&typeof b=="string"&&S==="[object Array]")p=p.join(b),p&&(p=this.extendTranslation(p,e,n,i));else{let O=!1,C=!1;const I=n.count!==void 0&&typeof n.count!="string",P=Se.hasDefaultValue(n),L=I?this.pluralResolver.getSuffix(d,n.count,n):"",c=n.ordinal&&I?this.pluralResolver.getSuffix(d,n.count,{ordinal:!1}):"",k=I&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),y=k&&n[`defaultValue${this.options.pluralSeparator}zero`]||n[`defaultValue${L}`]||n[`defaultValue${c}`]||n.defaultValue;!this.isValidLookup(p)&&P&&(O=!0,p=y),this.isValidLookup(p)||(C=!0,p=s);const g=(n.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&C?void 0:p,h=P&&y!==p&&this.options.updateMissing;if(C||O||h){if(this.logger.log(h?"updateKey":"missingKey",d,r,s,h?y:p),o){const R=this.resolve(s,{...n,keySeparator:!1});R&&R.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let N=[];const v=this.languageUtils.getFallbackCodes(this.options.fallbackLng,n.lng||this.language);if(this.options.saveMissingTo==="fallback"&&v&&v[0])for(let R=0;R<v.length;R++)N.push(v[R]);else this.options.saveMissingTo==="all"?N=this.languageUtils.toResolveHierarchy(n.lng||this.language):N.push(n.lng||this.language);const F=(R,T,D)=>{const _=P&&D!==p?D:g;this.options.missingKeyHandler?this.options.missingKeyHandler(R,r,T,_,h,n):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(R,r,T,_,h,n),this.emit("missingKey",R,r,T,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&I?N.forEach(R=>{const T=this.pluralResolver.getSuffixes(R,n);k&&n[`defaultValue${this.options.pluralSeparator}zero`]&&T.indexOf(`${this.options.pluralSeparator}zero`)<0&&T.push(`${this.options.pluralSeparator}zero`),T.forEach(D=>{F([R],s+D,n[`defaultValue${D}`]||y)})}):F(N,s,y))}p=this.extendTranslation(p,e,n,m,i),C&&p===s&&this.options.appendNamespaceToMissingKey&&(p=`${r}:${s}`),(C||O)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${r}:${s}`:s,O?p:void 0):p=this.options.parseMissingKeyHandler(p))}return a?(m.res=p,m.usedParams=this.getUsedParamsDetails(n),m):p}extendTranslation(e,n,i,a,o){var s=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||a.usedLng,a.usedNS,a.usedKey,{resolved:a});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const d=typeof e=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let u;if(d){const p=e.match(this.interpolator.nestingRegexp);u=p&&p.length}let m=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(m={...this.options.interpolation.defaultVariables,...m}),e=this.interpolator.interpolate(e,m,i.lng||this.language,i),d){const p=e.match(this.interpolator.nestingRegexp),f=p&&p.length;u<f&&(i.nest=!1)}!i.lng&&this.options.compatibilityAPI!=="v1"&&a&&a.res&&(i.lng=a.usedLng),i.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var p=arguments.length,f=new Array(p),w=0;w<p;w++)f[w]=arguments[w];return o&&o[0]===f[0]&&!i.context?(s.logger.warn(`It seems you are nesting recursively key: ${f[0]} in key: ${n[0]}`),null):s.translate(...f,n)},i)),i.interpolation&&this.interpolator.reset()}const l=i.postProcess||this.options.postProcess,r=typeof l=="string"?[l]:l;return e!=null&&r&&r.length&&i.applyPostProcessor!==!1&&(e=pn.handle(r,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...a,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),e}resolve(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i,a,o,s,l;return typeof e=="string"&&(e=[e]),e.forEach(r=>{if(this.isValidLookup(i))return;const d=this.extractFromKey(r,n),u=d.key;a=u;let m=d.namespaces;this.options.fallbackNS&&(m=m.concat(this.options.fallbackNS));const p=n.count!==void 0&&typeof n.count!="string",f=p&&!n.ordinal&&n.count===0&&this.pluralResolver.shouldUseIntlApi(),w=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);m.forEach(E=>{this.isValidLookup(i)||(l=E,!gn[`${S[0]}-${E}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(l)&&(gn[`${S[0]}-${E}`]=!0,this.logger.warn(`key "${a}" 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(b=>{if(this.isValidLookup(i))return;s=b;const A=[u];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(A,u,b,E,n);else{let C;p&&(C=this.pluralResolver.getSuffix(b,n.count,n));const I=`${this.options.pluralSeparator}zero`,P=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(p&&(A.push(u+C),n.ordinal&&C.indexOf(P)===0&&A.push(u+C.replace(P,this.options.pluralSeparator)),f&&A.push(u+I)),w){const L=`${u}${this.options.contextSeparator}${n.context}`;A.push(L),p&&(A.push(L+C),n.ordinal&&C.indexOf(P)===0&&A.push(L+C.replace(P,this.options.pluralSeparator)),f&&A.push(L+I))}}let O;for(;O=A.pop();)this.isValidLookup(i)||(o=O,i=this.getResource(b,E,O,n))}))})}),{res:i,usedKey:a,exactUsedKey:o,usedLng:s,usedNS:l}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,n,i,a):this.resourceStore.getResource(e,n,i,a)}getUsedParamsDetails(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=e.replace&&typeof e.replace!="string";let a=i?e.replace:e;if(i&&typeof e.count<"u"&&(a.count=e.count),this.options.interpolation.defaultVariables&&(a={...this.options.interpolation.defaultVariables,...a}),!i){a={...a};for(const o of n)delete a[o]}return a}static hasDefaultValue(e){const n="defaultValue";for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&n===i.substring(0,n.length)&&e[i]!==void 0)return!0;return!1}}function je(t){return t.charAt(0).toUpperCase()+t.slice(1)}class hn{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=j.create("languageUtils")}getScriptPartFromCode(e){if(e=ye(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=ye(e),!e||e.indexOf("-")<0)return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const n=["hans","hant","latn","cyrl","cans","mong","arab"];let i=e.split("-");return this.options.lowerCaseLng?i=i.map(a=>a.toLowerCase()):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),n.indexOf(i[1].toLowerCase())>-1&&(i[1]=je(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]=je(i[1].toLowerCase())),n.indexOf(i[2].toLowerCase())>-1&&(i[2]=je(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(i=>{if(n)return;const a=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(a))&&(n=a)}),!n&&this.options.supportedLngs&&e.forEach(i=>{if(n)return;const a=this.getLanguagePartFromCode(i);if(this.isSupportedCode(a))return n=a;n=this.options.supportedLngs.find(o=>{if(o===a||!(o.indexOf("-")<0&&a.indexOf("-")<0)&&o.indexOf(a)===0)return o})}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),typeof e=="string"&&(e=[e]),Object.prototype.toString.apply(e)==="[object Array]")return e;if(!n)return e.default||[];let i=e[n];return i||(i=e[this.getScriptPartFromCode(n)]),i||(i=e[this.formatLanguageCode(n)]),i||(i=e[this.getLanguagePartFromCode(n)]),i||(i=e.default),i||[]}toResolveHierarchy(e,n){const i=this.getFallbackCodes(n||this.options.fallbackLng||[],e),a=[],o=s=>{s&&(this.isSupportedCode(s)?a.push(s):this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&o(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&o(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&o(this.getLanguagePartFromCode(e))):typeof e=="string"&&o(this.formatLanguageCode(e)),i.forEach(s=>{a.indexOf(s)<0&&o(this.formatLanguageCode(s))}),a}}let Do=[{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}],Io={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}};const Lo=["v1","v2","v3"],Ao=["v4"],kn={zero:0,one:1,two:2,few:3,many:4,other:5};function Po(){const t={};return Do.forEach(e=>{e.lngs.forEach(n=>{t[n]={numbers:e.nr,plurals:Io[e.fc]}})}),t}class Vo{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=n,this.logger=j.create("pluralResolver"),(!this.options.compatibilityJSON||Ao.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Po()}addRule(e,n){this.rules[e]=n}getRule(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(ye(e==="dev"?"en":e),{type:n.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}getPluralFormsOfKey(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(e,i).map(a=>`${n}${a}`)}getSuffixes(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?i.resolvedOptions().pluralCategories.sort((a,o)=>kn[a]-kn[o]).map(a=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${a}`):i.numbers.map(a=>this.getSuffix(e,a,n)):[]}getSuffix(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const a=this.getRule(e,i);return a?this.shouldUseIntlApi()?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${a.select(n)}`:this.getSuffixRetroCompatible(a,n):(this.logger.warn(`no plural rule found for: ${e}`),"")}getSuffixRetroCompatible(e,n){const i=e.noAbs?e.plurals(n):e.plurals(Math.abs(n));let a=e.numbers[i];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(a===2?a="plural":a===1&&(a=""));const o=()=>this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString();return this.options.compatibilityJSON==="v1"?a===1?"":typeof a=="number"?`_plural_${a.toString()}`:o():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?o():this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString()}shouldUseIntlApi(){return!Lo.includes(this.options.compatibilityJSON)}}function fn(t,e,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=Eo(t,e,n);return!o&&a&&typeof n=="string"&&(o=ve(t,n,i),o===void 0&&(o=ve(e,n,i))),o}class _o{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=j.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||(n=>n),this.init(e)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});const n=e.interpolation;this.escape=n.escape!==void 0?n.escape:Oo,this.escapeValue=n.escapeValue!==void 0?n.escapeValue:!0,this.useRawValueToEscape=n.useRawValueToEscape!==void 0?n.useRawValueToEscape:!1,this.prefix=n.prefix?J(n.prefix):n.prefixEscaped||"{{",this.suffix=n.suffix?J(n.suffix):n.suffixEscaped||"}}",this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||",",this.unescapePrefix=n.unescapeSuffix?"":n.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":n.unescapeSuffix||"",this.nestingPrefix=n.nestingPrefix?J(n.nestingPrefix):n.nestingPrefixEscaped||J("$t("),this.nestingSuffix=n.nestingSuffix?J(n.nestingSuffix):n.nestingSuffixEscaped||J(")"),this.nestingOptionsSeparator=n.nestingOptionsSeparator?n.nestingOptionsSeparator:n.nestingOptionsSeparator||",",this.maxReplaces=n.maxReplaces?n.maxReplaces:1e3,this.alwaysFormat=n.alwaysFormat!==void 0?n.alwaysFormat:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=`${this.prefix}(.+?)${this.suffix}`;this.regexp=new RegExp(e,"g");const n=`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`;this.regexpUnescape=new RegExp(n,"g");const i=`${this.nestingPrefix}(.+?)${this.nestingSuffix}`;this.nestingRegexp=new RegExp(i,"g")}interpolate(e,n,i,a){let o,s,l;const r=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(f){return f.replace(/\$/g,"$$$$")}const u=f=>{if(f.indexOf(this.formatSeparator)<0){const b=fn(n,r,f,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,i,{...a,...n,interpolationkey:f}):b}const w=f.split(this.formatSeparator),S=w.shift().trim(),E=w.join(this.formatSeparator).trim();return this.format(fn(n,r,S,this.options.keySeparator,this.options.ignoreJSONStructure),E,i,{...a,...n,interpolationkey:S})};this.resetRegExp();const m=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,p=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:f=>d(f)},{regex:this.regexp,safeValue:f=>this.escapeValue?d(this.escape(f)):d(f)}].forEach(f=>{for(l=0;o=f.regex.exec(e);){const w=o[1].trim();if(s=u(w),s===void 0)if(typeof m=="function"){const E=m(e,o,a);s=typeof E=="string"?E:""}else if(a&&Object.prototype.hasOwnProperty.call(a,w))s="";else if(p){s=o[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${e}`),s="";else typeof s!="string"&&!this.useRawValueToEscape&&(s=dn(s));const S=f.safeValue(s);if(e=e.replace(o[0],S),p?(f.regex.lastIndex+=s.length,f.regex.lastIndex-=o[0].length):f.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),e}nest(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a,o,s;function l(r,d){const u=this.nestingOptionsSeparator;if(r.indexOf(u)<0)return r;const m=r.split(new RegExp(`${u}[ ]*{`));let p=`{${m[1]}`;r=m[0],p=this.interpolate(p,s);const f=p.match(/'/g),w=p.match(/"/g);(f&&f.length%2===0&&!w||w.length%2!==0)&&(p=p.replace(/'/g,'"'));try{s=JSON.parse(p),d&&(s={...d,...s})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${r}`,S),`${r}${u}${p}`}return delete s.defaultValue,r}for(;a=this.nestingRegexp.exec(e);){let r=[];s={...i},s=s.replace&&typeof s.replace!="string"?s.replace:s,s.applyPostProcessor=!1,delete s.defaultValue;let d=!1;if(a[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(a[1])){const u=a[1].split(this.formatSeparator).map(m=>m.trim());a[1]=u.shift(),r=u,d=!0}if(o=n(l.call(this,a[1].trim(),s),s),o&&a[0]===e&&typeof o!="string")return o;typeof o!="string"&&(o=dn(o)),o||(this.logger.warn(`missed to resolve ${a[1]} for nesting ${e}`),o=""),d&&(o=r.reduce((u,m)=>this.format(u,m,i.lng,{...i,interpolationkey:a[1].trim()}),o.trim())),e=e.replace(a[0],o),this.regexp.lastIndex=0}return e}}function Uo(t){let e=t.toLowerCase().trim();const n={};if(t.indexOf("(")>-1){const i=t.split("(");e=i[0].toLowerCase().trim();const a=i[1].substring(0,i[1].length-1);e==="currency"&&a.indexOf(":")<0?n.currency||(n.currency=a.trim()):e==="relativetime"&&a.indexOf(":")<0?n.range||(n.range=a.trim()):a.split(";").forEach(o=>{if(!o)return;const[s,...l]=o.split(":"),r=l.join(":").trim().replace(/^'+|'+$/g,"");n[s.trim()]||(n[s.trim()]=r),r==="false"&&(n[s.trim()]=!1),r==="true"&&(n[s.trim()]=!0),isNaN(r)||(n[s.trim()]=parseInt(r,10))})}return{formatName:e,formatOptions:n}}function W(t){const e={};return function(n,i,a){const o=i+JSON.stringify(a);let s=e[o];return s||(s=t(ye(i),a),e[o]=s),s(n)}}class jo{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=j.create("formatter"),this.options=e,this.formats={number:W((n,i)=>{const a=new Intl.NumberFormat(n,{...i});return o=>a.format(o)}),currency:W((n,i)=>{const a=new Intl.NumberFormat(n,{...i,style:"currency"});return o=>a.format(o)}),datetime:W((n,i)=>{const a=new Intl.DateTimeFormat(n,{...i});return o=>a.format(o)}),relativetime:W((n,i)=>{const a=new Intl.RelativeTimeFormat(n,{...i});return o=>a.format(o,i.range||"day")}),list:W((n,i)=>{const a=new Intl.ListFormat(n,{...i});return o=>a.format(o)})},this.init(e)}init(e){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=W(n)}format(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return n.split(this.formatSeparator).reduce((o,s)=>{const{formatName:l,formatOptions:r}=Uo(s);if(this.formats[l]){let d=o;try{const u=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},m=u.locale||u.lng||a.locale||a.lng||i;d=this.formats[l](o,m,{...r,...a,...u})}catch(u){this.logger.warn(u)}return d}else this.logger.warn(`there was no format function for ${l}`);return o},e)}}function $o(t,e){t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)}class Mo extends ke{constructor(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=a,this.logger=j.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=a.maxParallelReads||10,this.readingCalls=0,this.maxRetries=a.maxRetries>=0?a.maxRetries:5,this.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(i,a.backend,a)}queueLoad(e,n,i,a){const o={},s={},l={},r={};return e.forEach(d=>{let u=!0;n.forEach(m=>{const p=`${d}|${m}`;!i.reload&&this.store.hasResourceBundle(d,m)?this.state[p]=2:this.state[p]<0||(this.state[p]===1?s[p]===void 0&&(s[p]=!0):(this.state[p]=1,u=!1,s[p]===void 0&&(s[p]=!0),o[p]===void 0&&(o[p]=!0),r[m]===void 0&&(r[m]=!0)))}),u||(l[d]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:a}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(r)}}loaded(e,n,i){const a=e.split("|"),o=a[0],s=a[1];n&&this.emit("failedLoading",o,s,n),i&&this.store.addResourceBundle(o,s,i),this.state[e]=n?-1:2;const l={};this.queue.forEach(r=>{Co(r.loaded,[o],s),$o(r,e),n&&r.errors.push(n),r.pendingCount===0&&!r.done&&(Object.keys(r.loaded).forEach(d=>{l[d]||(l[d]={});const u=r.loaded[d];u.length&&u.forEach(m=>{l[d][m]===void 0&&(l[d][m]=!0)})}),r.done=!0,r.errors.length?r.callback(r.errors):r.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(r=>!r.done)}read(e,n,i){let a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:i,tried:a,wait:o,callback:s});return}this.readingCalls++;const l=(d,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const m=this.waitingReads.shift();this.read(m.lng,m.ns,m.fcName,m.tried,m.wait,m.callback)}if(d&&u&&a<this.maxRetries){setTimeout(()=>{this.read.call(this,e,n,i,a+1,o*2,s)},o);return}s(d,u)},r=this.backend[i].bind(this.backend);if(r.length===2){try{const d=r(e,n);d&&typeof d.then=="function"?d.then(u=>l(null,u)).catch(l):l(null,d)}catch(d){l(d)}return}return r(e,n,l)}prepareLoading(e,n){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),a&&a();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof n=="string"&&(n=[n]);const o=this.queueLoad(e,n,i,a);if(!o.toLoad.length)return o.pending.length||a(),null;o.toLoad.forEach(s=>{this.loadOne(s)})}load(e,n,i){this.prepareLoading(e,n,{},i)}reload(e,n,i){this.prepareLoading(e,n,{reload:!0},i)}loadOne(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const i=e.split("|"),a=i[0],o=i[1];this.read(a,o,"read",void 0,void 0,(s,l)=>{s&&this.logger.warn(`${n}loading namespace ${o} for language ${a} failed`,s),!s&&l&&this.logger.log(`${n}loaded namespace ${o} for language ${a}`,l),this.loaded(e,s,l)})}saveMissing(e,n,i,a,o){let s=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 r={...s,isUpdate:o},d=this.backend.create.bind(this.backend);if(d.length<6)try{let u;d.length===5?u=d(e,n,i,a,r):u=d(e,n,i,a),u&&typeof u.then=="function"?u.then(m=>l(null,m)).catch(l):l(null,u)}catch(u){l(u)}else d(e,n,i,a,l,r)}!e||!e[0]||this.store.addResource(e[0],n,i,a)}}}function vn(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let 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}}}function yn(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function Ne(){}function zo(t){Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(e=>{typeof t[e]=="function"&&(t[e]=t[e].bind(t))})}class ae extends ke{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;if(super(),this.options=yn(e),this.services={},this.logger=j,this.modules={external:[]},zo(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(){var e=this;let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;typeof n=="function"&&(i=n,n={}),!n.defaultNS&&n.defaultNS!==!1&&n.ns&&(typeof n.ns=="string"?n.defaultNS=n.ns:n.ns.indexOf("translation")<0&&(n.defaultNS=n.ns[0]));const a=vn();this.options={...a,...this.options,...yn(n)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...a.interpolation,...this.options.interpolation}),n.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=n.keySeparator),n.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=n.nsSeparator);function o(r){return r?typeof r=="function"?new r:r:null}if(!this.options.isClone){this.modules.logger?j.init(o(this.modules.logger),this.options):j.init(null,this.options);let r;this.modules.formatter?r=this.modules.formatter:typeof Intl<"u"&&(r=jo);const d=new hn(this.options);this.store=new mn(this.options.resources,this.options);const u=this.services;u.logger=j,u.resourceStore=this.store,u.languageUtils=d,u.pluralResolver=new Vo(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),r&&(!this.options.interpolation.format||this.options.interpolation.format===a.interpolation.format)&&(u.formatter=o(r),u.formatter.init(u,this.options),this.options.interpolation.format=u.formatter.format.bind(u.formatter)),u.interpolator=new _o(this.options),u.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},u.backendConnector=new Mo(o(this.modules.backend),u.resourceStore,u,this.options),u.backendConnector.on("*",function(m){for(var p=arguments.length,f=new Array(p>1?p-1:0),w=1;w<p;w++)f[w-1]=arguments[w];e.emit(m,...f)}),this.modules.languageDetector&&(u.languageDetector=o(this.modules.languageDetector),u.languageDetector.init&&u.languageDetector.init(u,this.options.detection,this.options)),this.modules.i18nFormat&&(u.i18nFormat=o(this.modules.i18nFormat),u.i18nFormat.init&&u.i18nFormat.init(this)),this.translator=new Se(this.services,this.options),this.translator.on("*",function(m){for(var p=arguments.length,f=new Array(p>1?p-1:0),w=1;w<p;w++)f[w-1]=arguments[w];e.emit(m,...f)}),this.modules.external.forEach(m=>{m.init&&m.init(this)})}if(this.format=this.options.interpolation.format,i||(i=Ne),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const r=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);r.length>0&&r[0]!=="dev"&&(this.options.lng=r[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(r=>{this[r]=function(){return e.store[r](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(r=>{this[r]=function(){return e.store[r](...arguments),e}});const s=ie(),l=()=>{const r=(d,u)=>{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),s.resolve(u),i(d,u)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return r(null,this.t.bind(this));this.changeLanguage(this.options.lng,r)};return this.options.resources||!this.options.initImmediate?l():setTimeout(l,0),s}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ne;const i=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const a=[],o=s=>{!s||s==="cimode"||this.services.languageUtils.toResolveHierarchy(s).forEach(l=>{l!=="cimode"&&a.indexOf(l)<0&&a.push(l)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(s=>o(s)),this.options.preload&&this.options.preload.forEach(s=>o(s)),this.services.backendConnector.load(a,this.options.ns,s=>{!s&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(s)})}else n(null)}reloadResources(e,n,i){const a=ie();return e||(e=this.languages),n||(n=this.options.ns),i||(i=Ne),this.services.backendConnector.reload(e,n,o=>{a.resolve(),i(o)}),a}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&pn.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1))for(let n=0;n<this.languages.length;n++){const i=this.languages[n];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}changeLanguage(e,n){var i=this;this.isLanguageChangingTo=e;const a=ie();this.emit("languageChanging",e);const o=r=>{this.language=r,this.languages=this.services.languageUtils.toResolveHierarchy(r),this.resolvedLanguage=void 0,this.setResolvedLanguage(r)},s=(r,d)=>{d?(o(d),this.translator.changeLanguage(d),this.isLanguageChangingTo=void 0,this.emit("languageChanged",d),this.logger.log("languageChanged",d)):this.isLanguageChangingTo=void 0,a.resolve(function(){return i.t(...arguments)}),n&&n(r,function(){return i.t(...arguments)})},l=r=>{!e&&!r&&this.services.languageDetector&&(r=[]);const d=typeof r=="string"?r:this.services.languageUtils.getBestMatchFromCodes(r);d&&(this.language||o(d),this.translator.language||this.translator.changeLanguage(d),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(d)),this.loadResources(d,u=>{s(u,d)})};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),a}getFixedT(e,n,i){var a=this;const o=function(s,l){let r;if(typeof l!="object"){for(var d=arguments.length,u=new Array(d>2?d-2:0),m=2;m<d;m++)u[m-2]=arguments[m];r=a.options.overloadTranslationOptionHandler([s,l].concat(u))}else r={...l};r.lng=r.lng||o.lng,r.lngs=r.lngs||o.lngs,r.ns=r.ns||o.ns,r.keyPrefix=r.keyPrefix||i||o.keyPrefix;const p=a.options.keySeparator||".";let f;return r.keyPrefix&&Array.isArray(s)?f=s.map(w=>`${r.keyPrefix}${p}${w}`):f=r.keyPrefix?`${r.keyPrefix}${p}${s}`:s,a.t(f,r)};return typeof e=="string"?o.lng=e:o.lngs=e,o.ns=n,o.keyPrefix=i,o}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,o=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const s=(l,r)=>{const d=this.services.backendConnector.state[`${l}|${r}`];return d===-1||d===2};if(n.precheck){const l=n.precheck(this,s);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(i,e)&&(!a||s(o,e)))}loadNamespaces(e,n){const i=ie();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(a=>{this.options.ns.indexOf(a)<0&&this.options.ns.push(a)}),this.loadResources(a=>{i.resolve(),n&&n(a)}),i):(n&&n(),Promise.resolve())}loadLanguages(e,n){const i=ie();typeof e=="string"&&(e=[e]);const a=this.options.preload||[],o=e.filter(s=>a.indexOf(s)<0);return o.length?(this.options.preload=a.concat(o),this.loadResources(s=>{i.resolve(),n&&n(s)}),i):(n&&n(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new hn(vn());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 ae(e,n)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ne;const i=e.forkResourceStore;i&&delete e.forkResourceStore;const a={...this.options,...e,isClone:!0},o=new ae(a);return(e.debug!==void 0||e.prefix!==void 0)&&(o.logger=o.logger.clone(e)),["store","services","language"].forEach(s=>{o[s]=this[s]}),o.services={...this.services},o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},i&&(o.store=new mn(this.store.data,a),o.services.resourceStore=o.store),o.translator=new Se(o.services,a),o.translator.on("*",function(s){for(var l=arguments.length,r=new Array(l>1?l-1:0),d=1;d<l;d++)r[d-1]=arguments[d];o.emit(s,...r)}),o.init(a,n),o.translator.options=a,o.translator.backendConnector.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const U=ae.createInstance();U.createInstance=ae.createInstance,U.createInstance,U.dir,U.init,U.loadResources,U.reloadResources,U.use,U.changeLanguage,U.getFixedT,U.t,U.exists,U.setDefaultNamespace,U.hasLoadedNamespace,U.loadNamespaces,U.loadLanguages;const Bo=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Go={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"\xA9","&#169;":"\xA9","&reg;":"\xAE","&#174;":"\xAE","&hellip;":"\u2026","&#8230;":"\u2026","&#x2F;":"/","&#47;":"/"},Qo=t=>Go[t];let Sn={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:t=>t.replace(Bo,Qo)};function qo(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Sn={...Sn,...t}}mt(U,{type:"3rdParty",init(t){qo(t.options.react)}});let Nn,$e,bn;fi=t=>gt(U,t),{createContext:Nn,useContext:$e,useMemo:bn}=await M("react");let Me=new Map,be;be=Nn(Me),ri=({children:t,stores:e})=>{const n=$e(be),i=bn(()=>{const a=new Map;return e.forEach(o=>a.set(o.class,o.value)),Me=new Map([...n,...a])},[]);return Xo(be.Provider,{value:i,children:t})},Si=function(t){return $e(be).get(t)},gi=function(t){return Me.get(t)};var Fn=(t=>(t.Created="CREATED",t.Finalized="FINALIZED",t.Live="LIVE",t.Starting="STARTING",t))(Fn||{}),wn=(t=>(t.Add="add",t.Remove="remove",t))(wn||{}),Cn=(t=>(t.Active="active",t.Inactive="inactive",t))(Cn||{});let En,Tn,On,xn,Rn,Dn,In,Ln,An,Pn,Vn,_n,Un,jn,$n,Mn,zn,Bn,Gn,Qn,qn,Kn,Jn,Wn,Hn,Zn,Xn,Yn;En={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"}}]}}]}}]}}]},Tn={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"}}]}}]}}]}}]},On={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"}}]}}]}}]}}]},xn={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"}}]}}]}}]}}]},Rn={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"}}]}}]}}]}}]},Dn={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"}}]}}]}}]}}]},In={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"}}]}}]}}]}}]},Ln={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"}}]}}]}}]}}]},An={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"}}]}}]}}]}}]},Pn={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"}}]}}]}}]}}]},Vn={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"}}]}}]}}]}}]},_n={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"}}]}}]}}]}}]},Un={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"}}]}}]}}]}}]},jn={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"}}]}}]}}]}}]},$n={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"}}]}}]}}]}}]},Mn={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"}}]}}]}}]}}]},zn={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"}}]}}]}}]}}]},Bn={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"}}]}}]}}]}}]},Gn={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"}}]}}]}}]}}]},Qn={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"}}]}}]}}]}}]},qn={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"}}]}}]}}]}}]},Kn={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"}}]}}]}}]}}]},Jn={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"}}]}}]}}]}}]},Wn={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"}}]}}]}}]}}]},Hn={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"}}]}}]}}]}}]},Zn={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"}}]}}]}}]}}]}}]},Xn={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"}}]}}]}}]}}]},Yn={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"}}]}}]}}]}}]},ii=Object.freeze(Object.defineProperty({__proto__:null,AddCollectionDocument:En,AppendProductsToSnackVideoDocument:Qn,BlockUserDocument:Pn,ChangeAccountUsernameDocument:Vn,CreateSnackVideoBatchDocument:qn,DeleteAllCustomizationDocument:Mn,DeleteChatMessageDocument:_n,DeleteCollectionDocument:Tn,DeleteRelationshipWithSnackVideoDocument:Kn,DeleteSnackVideoDocument:Jn,EventStatus:Fn,FindByProductSnackVideoDocument:Yn,FindCollectionDocument:On,FindManySnackVideosDocument:Wn,FindMinimalEventDocument:Ln,GetAllChatMessageDocument:Un,GetAllCollectionsDocument:xn,GetAllCustomizationDocument:zn,GetAllSnackVideosDocument:Hn,GetChatRoomTokenDocument:jn,GetSnackVideoRelationshipsDocument:Zn,GetTimeLineDocument:Gn,ManageCollectionProductDocument:Rn,Methods:wn,PinChatMessageDocument:$n,SearchCollectionsDocument:Dn,SearchMinimalEventsDocument:An,SearchSnackVideosDocument:Xn,Status:Cn,UpdateCollectionDocument:In,UpdateCustomizationDocument:Bn},Symbol.toStringTag,{value:"Module"})),ui=function(t){return{class:t,_value:null,get value(){return this._value||(this._value=new t,Object.freeze(this)),this._value}}}});export{Fe as AccountContractStatusTypes,Ge as AccountContractTypes,ni as AccountInvalidError,Qe as AccountPlanDescriptionTypes,qe as AccountRestRepository,Ke as AccountService,Je as AccountSubscriptionTypes,we as AccountTypes,We as AggregateRoot,ii as ApiGraphqlTypes,ai as BaseMobxStore,He as BroadcastChannelEventBus,H as DomainError,oi as EventBusWildcards,si as EventNames,Ze as GlobalPageSectionTypes,Xe as InvalidNizzaGlobalObjectError,Ye as LanguageTypes,Ce as NizzaAccount,et as NizzaEventStatus,Z as NizzaLogger,tt as NizzaProductRequestOriginTypes,nt as NizzaVariationTypes,it as ResourceNotFoundError,ri as StoreProvider,at as UnexpectedError,li as ValueObject,Yo as __tla,oe as accountAtom,Ee as accountService,di as apiCall,ot as buildLanguageTranslations,st as buildTranslations,rt as configure,G as coreLogger,lt as createAggregateRoot,ui as createStore,Te as customFetch,ci as downloadFile,mi as fileOrigin,dt as getAccount,pi as getClientTimeZone,ut as getInstance,gi as getStore,ct as globalAtomStore,mt as i18Init,pt as jsDownload,hi as logger,z as nizza,ki as nizzaInit,fi as registerTranslations,gt as registerTranslationsOf,vi as searchParams,ht as setProductDataSource,kt as shortId,yi as useAccount,ft as useNizza,Si as useStore,Ni as validateRequiredProps};