@everymatrix/player-account-vault 0.19.6 → 0.19.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4781 +0,0 @@
1
- var en = Object.defineProperty, tn = Object.defineProperties;
2
- var rn = Object.getOwnPropertyDescriptors;
3
- var Zt = Object.getOwnPropertySymbols;
4
- var nn = Object.prototype.hasOwnProperty, an = Object.prototype.propertyIsEnumerable;
5
- var wt = (e, t, r) => t in e ? en(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, qt = (e, t) => {
6
- for (var r in t || (t = {}))
7
- nn.call(t, r) && wt(e, r, t[r]);
8
- if (Zt)
9
- for (var r of Zt(t))
10
- an.call(t, r) && wt(e, r, t[r]);
11
- return e;
12
- }, Jt = (e, t) => tn(e, rn(t));
13
- var ee = (e, t, r) => (wt(e, typeof t != "symbol" ? t + "" : t, r), r);
14
- var Tt = (e, t, r) => new Promise((n, i) => {
15
- var a = (c) => {
16
- try {
17
- s(r.next(c));
18
- } catch (l) {
19
- i(l);
20
- }
21
- }, o = (c) => {
22
- try {
23
- s(r.throw(c));
24
- } catch (l) {
25
- i(l);
26
- }
27
- }, s = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(a, o);
28
- s((r = r.apply(e, t)).next());
29
- });
30
- function oe() {
31
- }
32
- function Hr(e) {
33
- return e();
34
- }
35
- function Qt() {
36
- return /* @__PURE__ */ Object.create(null);
37
- }
38
- function Te(e) {
39
- e.forEach(Hr);
40
- }
41
- function $t(e) {
42
- return typeof e == "function";
43
- }
44
- function Ar(e, t) {
45
- return e != e ? t == t : e !== t || e && typeof e == "object" || typeof e == "function";
46
- }
47
- function on(e) {
48
- return Object.keys(e).length === 0;
49
- }
50
- function Br(e, ...t) {
51
- if (e == null) {
52
- for (const n of t)
53
- n(void 0);
54
- return oe;
55
- }
56
- const r = e.subscribe(...t);
57
- return r.unsubscribe ? () => r.unsubscribe() : r;
58
- }
59
- function sn(e, t, r) {
60
- e.$$.on_destroy.push(Br(t, r));
61
- }
62
- function m(e, t) {
63
- e.appendChild(t);
64
- }
65
- function un(e, t, r) {
66
- const n = ln(e);
67
- if (!n.getElementById(t)) {
68
- const i = E("style");
69
- i.id = t, i.textContent = r, cn(n, i);
70
- }
71
- }
72
- function ln(e) {
73
- if (!e)
74
- return document;
75
- const t = e.getRootNode ? e.getRootNode() : e.ownerDocument;
76
- return t && /** @type {ShadowRoot} */
77
- t.host ? (
78
- /** @type {ShadowRoot} */
79
- t
80
- ) : e.ownerDocument;
81
- }
82
- function cn(e, t) {
83
- return m(
84
- /** @type {Document} */
85
- e.head || e,
86
- t
87
- ), t.sheet;
88
- }
89
- function Q(e, t, r) {
90
- e.insertBefore(t, r || null);
91
- }
92
- function Z(e) {
93
- e.parentNode && e.parentNode.removeChild(e);
94
- }
95
- function Ht(e, t) {
96
- for (let r = 0; r < e.length; r += 1)
97
- e[r] && e[r].d(t);
98
- }
99
- function E(e) {
100
- return document.createElement(e);
101
- }
102
- function Yt(e) {
103
- return document.createElementNS("http://www.w3.org/2000/svg", e);
104
- }
105
- function $(e) {
106
- return document.createTextNode(e);
107
- }
108
- function R() {
109
- return $(" ");
110
- }
111
- function Sr() {
112
- return $("");
113
- }
114
- function te(e, t, r, n) {
115
- return e.addEventListener(t, r, n), () => e.removeEventListener(t, r, n);
116
- }
117
- function H(e, t, r) {
118
- r == null ? e.removeAttribute(t) : e.getAttribute(t) !== r && e.setAttribute(t, r);
119
- }
120
- function pt(e) {
121
- return e === "" ? null : +e;
122
- }
123
- function hn(e) {
124
- return Array.from(e.childNodes);
125
- }
126
- function W(e, t) {
127
- t = "" + t, e.data !== t && (e.data = /** @type {string} */
128
- t);
129
- }
130
- function Ee(e, t) {
131
- e.value = t == null ? "" : t;
132
- }
133
- function Kt(e, t, r, n) {
134
- r == null ? e.style.removeProperty(t) : e.style.setProperty(t, r, "");
135
- }
136
- function ut(e, t, r) {
137
- for (let n = 0; n < e.options.length; n += 1) {
138
- const i = e.options[n];
139
- if (i.__value === t) {
140
- i.selected = !0;
141
- return;
142
- }
143
- }
144
- (!r || t !== void 0) && (e.selectedIndex = -1);
145
- }
146
- function er(e) {
147
- const t = e.querySelector(":checked");
148
- return t && t.__value;
149
- }
150
- function j(e, t, r) {
151
- e.classList.toggle(t, !!r);
152
- }
153
- function fn(e) {
154
- const t = {};
155
- return e.childNodes.forEach(
156
- /** @param {Element} node */
157
- (r) => {
158
- t[r.slot || "default"] = !0;
159
- }
160
- ), t;
161
- }
162
- let Vt;
163
- function et(e) {
164
- Vt = e;
165
- }
166
- const Ue = [], mt = [];
167
- let Fe = [];
168
- const tr = [], pn = /* @__PURE__ */ Promise.resolve();
169
- let Ot = !1;
170
- function mn() {
171
- Ot || (Ot = !0, pn.then(ce));
172
- }
173
- function tt(e) {
174
- Fe.push(e);
175
- }
176
- const At = /* @__PURE__ */ new Set();
177
- let Me = 0;
178
- function ce() {
179
- if (Me !== 0)
180
- return;
181
- const e = Vt;
182
- do {
183
- try {
184
- for (; Me < Ue.length; ) {
185
- const t = Ue[Me];
186
- Me++, et(t), dn(t.$$);
187
- }
188
- } catch (t) {
189
- throw Ue.length = 0, Me = 0, t;
190
- }
191
- for (et(null), Ue.length = 0, Me = 0; mt.length; )
192
- mt.pop()();
193
- for (let t = 0; t < Fe.length; t += 1) {
194
- const r = Fe[t];
195
- At.has(r) || (At.add(r), r());
196
- }
197
- Fe.length = 0;
198
- } while (Ue.length);
199
- for (; tr.length; )
200
- tr.pop()();
201
- Ot = !1, At.clear(), et(e);
202
- }
203
- function dn(e) {
204
- if (e.fragment !== null) {
205
- e.update(), Te(e.before_update);
206
- const t = e.dirty;
207
- e.dirty = [-1], e.fragment && e.fragment.p(e.ctx, t), e.after_update.forEach(tt);
208
- }
209
- }
210
- function gn(e) {
211
- const t = [], r = [];
212
- Fe.forEach((n) => e.indexOf(n) === -1 ? t.push(n) : r.push(n)), r.forEach((n) => n()), Fe = t;
213
- }
214
- const bn = /* @__PURE__ */ new Set();
215
- function yn(e, t) {
216
- e && e.i && (bn.delete(e), e.i(t));
217
- }
218
- function Re(e) {
219
- return (e == null ? void 0 : e.length) !== void 0 ? e : Array.from(e);
220
- }
221
- function vn(e, t, r) {
222
- const { fragment: n, after_update: i } = e.$$;
223
- n && n.m(t, r), tt(() => {
224
- const a = e.$$.on_mount.map(Hr).filter($t);
225
- e.$$.on_destroy ? e.$$.on_destroy.push(...a) : Te(a), e.$$.on_mount = [];
226
- }), i.forEach(tt);
227
- }
228
- function xn(e, t) {
229
- const r = e.$$;
230
- r.fragment !== null && (gn(r.after_update), Te(r.on_destroy), r.fragment && r.fragment.d(t), r.on_destroy = r.fragment = null, r.ctx = []);
231
- }
232
- function En(e, t) {
233
- e.$$.dirty[0] === -1 && (Ue.push(e), mn(), e.$$.dirty.fill(0)), e.$$.dirty[t / 31 | 0] |= 1 << t % 31;
234
- }
235
- function _n(e, t, r, n, i, a, o = null, s = [-1]) {
236
- const c = Vt;
237
- et(e);
238
- const l = e.$$ = {
239
- fragment: null,
240
- ctx: [],
241
- // state
242
- props: a,
243
- update: oe,
244
- not_equal: i,
245
- bound: Qt(),
246
- // lifecycle
247
- on_mount: [],
248
- on_destroy: [],
249
- on_disconnect: [],
250
- before_update: [],
251
- after_update: [],
252
- context: new Map(t.context || (c ? c.$$.context : [])),
253
- // everything else
254
- callbacks: Qt(),
255
- dirty: s,
256
- skip_bound: !1,
257
- root: t.target || c.$$.root
258
- };
259
- o && o(l.root);
260
- let u = !1;
261
- if (l.ctx = r ? r(e, t.props || {}, (h, d, ...b) => {
262
- const v = b.length ? b[0] : d;
263
- return l.ctx && i(l.ctx[h], l.ctx[h] = v) && (!l.skip_bound && l.bound[h] && l.bound[h](v), u && En(e, h)), d;
264
- }) : [], l.update(), u = !0, Te(l.before_update), l.fragment = n ? n(l.ctx) : !1, t.target) {
265
- if (t.hydrate) {
266
- const h = hn(t.target);
267
- l.fragment && l.fragment.l(h), h.forEach(Z);
268
- } else
269
- l.fragment && l.fragment.c();
270
- t.intro && yn(e.$$.fragment), vn(e, t.target, t.anchor), ce();
271
- }
272
- et(c);
273
- }
274
- let Cr;
275
- typeof HTMLElement == "function" && (Cr = class extends HTMLElement {
276
- constructor(t, r, n) {
277
- super();
278
- /** The Svelte component constructor */
279
- ee(this, "$$ctor");
280
- /** Slots */
281
- ee(this, "$$s");
282
- /** The Svelte component instance */
283
- ee(this, "$$c");
284
- /** Whether or not the custom element is connected */
285
- ee(this, "$$cn", !1);
286
- /** Component props data */
287
- ee(this, "$$d", {});
288
- /** `true` if currently in the process of reflecting component props back to attributes */
289
- ee(this, "$$r", !1);
290
- /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
291
- ee(this, "$$p_d", {});
292
- /** @type {Record<string, Function[]>} Event listeners */
293
- ee(this, "$$l", {});
294
- /** @type {Map<Function, Function>} Event listener unsubscribe functions */
295
- ee(this, "$$l_u", /* @__PURE__ */ new Map());
296
- this.$$ctor = t, this.$$s = r, n && this.attachShadow({ mode: "open" });
297
- }
298
- addEventListener(t, r, n) {
299
- if (this.$$l[t] = this.$$l[t] || [], this.$$l[t].push(r), this.$$c) {
300
- const i = this.$$c.$on(t, r);
301
- this.$$l_u.set(r, i);
302
- }
303
- super.addEventListener(t, r, n);
304
- }
305
- removeEventListener(t, r, n) {
306
- if (super.removeEventListener(t, r, n), this.$$c) {
307
- const i = this.$$l_u.get(r);
308
- i && (i(), this.$$l_u.delete(r));
309
- }
310
- }
311
- connectedCallback() {
312
- return Tt(this, null, function* () {
313
- if (this.$$cn = !0, !this.$$c) {
314
- let t = function(a) {
315
- return () => {
316
- let o;
317
- return {
318
- c: function() {
319
- o = E("slot"), a !== "default" && H(o, "name", a);
320
- },
321
- /**
322
- * @param {HTMLElement} target
323
- * @param {HTMLElement} [anchor]
324
- */
325
- m: function(l, u) {
326
- Q(l, o, u);
327
- },
328
- d: function(l) {
329
- l && Z(o);
330
- }
331
- };
332
- };
333
- };
334
- if (yield Promise.resolve(), !this.$$cn || this.$$c)
335
- return;
336
- const r = {}, n = fn(this);
337
- for (const a of this.$$s)
338
- a in n && (r[a] = [t(a)]);
339
- for (const a of this.attributes) {
340
- const o = this.$$g_p(a.name);
341
- o in this.$$d || (this.$$d[o] = ct(o, a.value, this.$$p_d, "toProp"));
342
- }
343
- for (const a in this.$$p_d)
344
- !(a in this.$$d) && this[a] !== void 0 && (this.$$d[a] = this[a], delete this[a]);
345
- this.$$c = new this.$$ctor({
346
- target: this.shadowRoot || this,
347
- props: Jt(qt({}, this.$$d), {
348
- $$slots: r,
349
- $$scope: {
350
- ctx: []
351
- }
352
- })
353
- });
354
- const i = () => {
355
- this.$$r = !0;
356
- for (const a in this.$$p_d)
357
- if (this.$$d[a] = this.$$c.$$.ctx[this.$$c.$$.props[a]], this.$$p_d[a].reflect) {
358
- const o = ct(
359
- a,
360
- this.$$d[a],
361
- this.$$p_d,
362
- "toAttribute"
363
- );
364
- o == null ? this.removeAttribute(this.$$p_d[a].attribute || a) : this.setAttribute(this.$$p_d[a].attribute || a, o);
365
- }
366
- this.$$r = !1;
367
- };
368
- this.$$c.$$.after_update.push(i), i();
369
- for (const a in this.$$l)
370
- for (const o of this.$$l[a]) {
371
- const s = this.$$c.$on(a, o);
372
- this.$$l_u.set(o, s);
373
- }
374
- this.$$l = {};
375
- }
376
- });
377
- }
378
- // We don't need this when working within Svelte code, but for compatibility of people using this outside of Svelte
379
- // and setting attributes through setAttribute etc, this is helpful
380
- attributeChangedCallback(t, r, n) {
381
- var i;
382
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = ct(t, n, this.$$p_d, "toProp"), (i = this.$$c) == null || i.$set({ [t]: this.$$d[t] }));
383
- }
384
- disconnectedCallback() {
385
- this.$$cn = !1, Promise.resolve().then(() => {
386
- !this.$$cn && this.$$c && (this.$$c.$destroy(), this.$$c = void 0);
387
- });
388
- }
389
- $$g_p(t) {
390
- return Object.keys(this.$$p_d).find(
391
- (r) => this.$$p_d[r].attribute === t || !this.$$p_d[r].attribute && r.toLowerCase() === t
392
- ) || t;
393
- }
394
- });
395
- function ct(e, t, r, n) {
396
- var a;
397
- const i = (a = r[e]) == null ? void 0 : a.type;
398
- if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !n || !r[e])
399
- return t;
400
- if (n === "toAttribute")
401
- switch (i) {
402
- case "Object":
403
- case "Array":
404
- return t == null ? null : JSON.stringify(t);
405
- case "Boolean":
406
- return t ? "" : null;
407
- case "Number":
408
- return t == null ? null : t;
409
- default:
410
- return t;
411
- }
412
- else
413
- switch (i) {
414
- case "Object":
415
- case "Array":
416
- return t && JSON.parse(t);
417
- case "Boolean":
418
- return t;
419
- case "Number":
420
- return t != null ? +t : t;
421
- default:
422
- return t;
423
- }
424
- }
425
- function wn(e, t, r, n, i, a) {
426
- let o = class extends Cr {
427
- constructor() {
428
- super(e, r, i), this.$$p_d = t;
429
- }
430
- static get observedAttributes() {
431
- return Object.keys(t).map(
432
- (s) => (t[s].attribute || s).toLowerCase()
433
- );
434
- }
435
- };
436
- return Object.keys(t).forEach((s) => {
437
- Object.defineProperty(o.prototype, s, {
438
- get() {
439
- return this.$$c && s in this.$$c ? this.$$c[s] : this.$$d[s];
440
- },
441
- set(c) {
442
- var l;
443
- c = ct(s, c, t), this.$$d[s] = c, (l = this.$$c) == null || l.$set({ [s]: c });
444
- }
445
- });
446
- }), n.forEach((s) => {
447
- Object.defineProperty(o.prototype, s, {
448
- get() {
449
- var c;
450
- return (c = this.$$c) == null ? void 0 : c[s];
451
- }
452
- });
453
- }), e.element = /** @type {any} */
454
- o, o;
455
- }
456
- class Tn {
457
- constructor() {
458
- /**
459
- * ### PRIVATE API
460
- *
461
- * Do not use, may change at any time
462
- *
463
- * @type {any}
464
- */
465
- ee(this, "$$");
466
- /**
467
- * ### PRIVATE API
468
- *
469
- * Do not use, may change at any time
470
- *
471
- * @type {any}
472
- */
473
- ee(this, "$$set");
474
- }
475
- /** @returns {void} */
476
- $destroy() {
477
- xn(this, 1), this.$destroy = oe;
478
- }
479
- /**
480
- * @template {Extract<keyof Events, string>} K
481
- * @param {K} type
482
- * @param {((e: Events[K]) => void) | null | undefined} callback
483
- * @returns {() => void}
484
- */
485
- $on(t, r) {
486
- if (!$t(r))
487
- return oe;
488
- const n = this.$$.callbacks[t] || (this.$$.callbacks[t] = []);
489
- return n.push(r), () => {
490
- const i = n.indexOf(r);
491
- i !== -1 && n.splice(i, 1);
492
- };
493
- }
494
- /**
495
- * @param {Partial<Props>} props
496
- * @returns {void}
497
- */
498
- $set(t) {
499
- this.$$set && !on(t) && (this.$$.skip_bound = !0, this.$$set(t), this.$$.skip_bound = !1);
500
- }
501
- }
502
- const Hn = "4";
503
- typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(Hn);
504
- const De = [];
505
- function An(e, t) {
506
- return {
507
- subscribe: yt(e, t).subscribe
508
- };
509
- }
510
- function yt(e, t = oe) {
511
- let r;
512
- const n = /* @__PURE__ */ new Set();
513
- function i(s) {
514
- if (Ar(e, s) && (e = s, r)) {
515
- const c = !De.length;
516
- for (const l of n)
517
- l[1](), De.push(l, e);
518
- if (c) {
519
- for (let l = 0; l < De.length; l += 2)
520
- De[l][0](De[l + 1]);
521
- De.length = 0;
522
- }
523
- }
524
- }
525
- function a(s) {
526
- i(s(e));
527
- }
528
- function o(s, c = oe) {
529
- const l = [s, c];
530
- return n.add(l), n.size === 1 && (r = t(i, a) || oe), s(e), () => {
531
- n.delete(l), n.size === 0 && r && (r(), r = null);
532
- };
533
- }
534
- return { set: i, update: a, subscribe: o };
535
- }
536
- function Ve(e, t, r) {
537
- const n = !Array.isArray(e), i = n ? [e] : e;
538
- if (!i.every(Boolean))
539
- throw new Error("derived() expects stores as input, got a falsy value");
540
- const a = t.length < 2;
541
- return An(r, (o, s) => {
542
- let c = !1;
543
- const l = [];
544
- let u = 0, h = oe;
545
- const d = () => {
546
- if (u)
547
- return;
548
- h();
549
- const v = t(n ? l[0] : l, o, s);
550
- a ? o(v) : h = $t(v) ? v : oe;
551
- }, b = i.map(
552
- (v, P) => Br(
553
- v,
554
- (F) => {
555
- l[P] = F, u &= ~(1 << P), c && d();
556
- },
557
- () => {
558
- u |= 1 << P;
559
- }
560
- )
561
- );
562
- return c = !0, d(), function() {
563
- Te(b), h(), c = !1;
564
- };
565
- });
566
- }
567
- function Bn(e) {
568
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
569
- }
570
- var Sn = function(t) {
571
- return Cn(t) && !Pn(t);
572
- };
573
- function Cn(e) {
574
- return !!e && typeof e == "object";
575
- }
576
- function Pn(e) {
577
- var t = Object.prototype.toString.call(e);
578
- return t === "[object RegExp]" || t === "[object Date]" || On(e);
579
- }
580
- var In = typeof Symbol == "function" && Symbol.for, Nn = In ? Symbol.for("react.element") : 60103;
581
- function On(e) {
582
- return e.$$typeof === Nn;
583
- }
584
- function Ln(e) {
585
- return Array.isArray(e) ? [] : {};
586
- }
587
- function rt(e, t) {
588
- return t.clone !== !1 && t.isMergeableObject(e) ? Ge(Ln(e), e, t) : e;
589
- }
590
- function Mn(e, t, r) {
591
- return e.concat(t).map(function(n) {
592
- return rt(n, r);
593
- });
594
- }
595
- function Rn(e, t) {
596
- if (!t.customMerge)
597
- return Ge;
598
- var r = t.customMerge(e);
599
- return typeof r == "function" ? r : Ge;
600
- }
601
- function Dn(e) {
602
- return Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(e).filter(function(t) {
603
- return Object.propertyIsEnumerable.call(e, t);
604
- }) : [];
605
- }
606
- function rr(e) {
607
- return Object.keys(e).concat(Dn(e));
608
- }
609
- function Pr(e, t) {
610
- try {
611
- return t in e;
612
- } catch (r) {
613
- return !1;
614
- }
615
- }
616
- function Un(e, t) {
617
- return Pr(e, t) && !(Object.hasOwnProperty.call(e, t) && Object.propertyIsEnumerable.call(e, t));
618
- }
619
- function Fn(e, t, r) {
620
- var n = {};
621
- return r.isMergeableObject(e) && rr(e).forEach(function(i) {
622
- n[i] = rt(e[i], r);
623
- }), rr(t).forEach(function(i) {
624
- Un(e, i) || (Pr(e, i) && r.isMergeableObject(t[i]) ? n[i] = Rn(i, r)(e[i], t[i], r) : n[i] = rt(t[i], r));
625
- }), n;
626
- }
627
- function Ge(e, t, r) {
628
- r = r || {}, r.arrayMerge = r.arrayMerge || Mn, r.isMergeableObject = r.isMergeableObject || Sn, r.cloneUnlessOtherwiseSpecified = rt;
629
- var n = Array.isArray(t), i = Array.isArray(e), a = n === i;
630
- return a ? n ? r.arrayMerge(e, t, r) : Fn(e, t, r) : rt(t, r);
631
- }
632
- Ge.all = function(t, r) {
633
- if (!Array.isArray(t))
634
- throw new Error("first argument should be an array");
635
- return t.reduce(function(n, i) {
636
- return Ge(n, i, r);
637
- }, {});
638
- };
639
- var Gn = Ge, kn = Gn;
640
- const jn = /* @__PURE__ */ Bn(kn);
641
- var Lt = function(e, t) {
642
- return Lt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(r, n) {
643
- r.__proto__ = n;
644
- } || function(r, n) {
645
- for (var i in n)
646
- Object.prototype.hasOwnProperty.call(n, i) && (r[i] = n[i]);
647
- }, Lt(e, t);
648
- };
649
- function vt(e, t) {
650
- if (typeof t != "function" && t !== null)
651
- throw new TypeError("Class extends value " + String(t) + " is not a constructor or null");
652
- Lt(e, t);
653
- function r() {
654
- this.constructor = e;
655
- }
656
- e.prototype = t === null ? Object.create(t) : (r.prototype = t.prototype, new r());
657
- }
658
- var he = function() {
659
- return he = Object.assign || function(t) {
660
- for (var r, n = 1, i = arguments.length; n < i; n++) {
661
- r = arguments[n];
662
- for (var a in r)
663
- Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
664
- }
665
- return t;
666
- }, he.apply(this, arguments);
667
- };
668
- function $n(e, t) {
669
- var r = {};
670
- for (var n in e)
671
- Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
672
- if (e != null && typeof Object.getOwnPropertySymbols == "function")
673
- for (var i = 0, n = Object.getOwnPropertySymbols(e); i < n.length; i++)
674
- t.indexOf(n[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[i]) && (r[n[i]] = e[n[i]]);
675
- return r;
676
- }
677
- function Bt(e, t, r) {
678
- if (r || arguments.length === 2)
679
- for (var n = 0, i = t.length, a; n < i; n++)
680
- (a || !(n in t)) && (a || (a = Array.prototype.slice.call(t, 0, n)), a[n] = t[n]);
681
- return e.concat(a || Array.prototype.slice.call(t));
682
- }
683
- function St(e, t) {
684
- var r = t && t.cache ? t.cache : Jn, n = t && t.serializer ? t.serializer : Zn, i = t && t.strategy ? t.strategy : Xn;
685
- return i(e, {
686
- cache: r,
687
- serializer: n
688
- });
689
- }
690
- function Vn(e) {
691
- return e == null || typeof e == "number" || typeof e == "boolean";
692
- }
693
- function zn(e, t, r, n) {
694
- var i = Vn(n) ? n : r(n), a = t.get(i);
695
- return typeof a == "undefined" && (a = e.call(this, n), t.set(i, a)), a;
696
- }
697
- function Ir(e, t, r) {
698
- var n = Array.prototype.slice.call(arguments, 3), i = r(n), a = t.get(i);
699
- return typeof a == "undefined" && (a = e.apply(this, n), t.set(i, a)), a;
700
- }
701
- function Nr(e, t, r, n, i) {
702
- return r.bind(t, e, n, i);
703
- }
704
- function Xn(e, t) {
705
- var r = e.length === 1 ? zn : Ir;
706
- return Nr(e, this, r, t.cache.create(), t.serializer);
707
- }
708
- function Wn(e, t) {
709
- return Nr(e, this, Ir, t.cache.create(), t.serializer);
710
- }
711
- var Zn = function() {
712
- return JSON.stringify(arguments);
713
- }, qn = (
714
- /** @class */
715
- function() {
716
- function e() {
717
- this.cache = /* @__PURE__ */ Object.create(null);
718
- }
719
- return e.prototype.get = function(t) {
720
- return this.cache[t];
721
- }, e.prototype.set = function(t, r) {
722
- this.cache[t] = r;
723
- }, e;
724
- }()
725
- ), Jn = {
726
- create: function() {
727
- return new qn();
728
- }
729
- }, Ct = {
730
- variadic: Wn
731
- }, dt = function() {
732
- return dt = Object.assign || function(t) {
733
- for (var r, n = 1, i = arguments.length; n < i; n++) {
734
- r = arguments[n];
735
- for (var a in r)
736
- Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
737
- }
738
- return t;
739
- }, dt.apply(this, arguments);
740
- };
741
- var _;
742
- (function(e) {
743
- e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", e[e.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", e[e.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", e[e.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", e[e.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", e[e.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", e[e.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", e[e.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", e[e.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", e[e.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", e[e.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", e[e.INVALID_TAG = 23] = "INVALID_TAG", e[e.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", e[e.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", e[e.UNCLOSED_TAG = 27] = "UNCLOSED_TAG";
744
- })(_ || (_ = {}));
745
- var S;
746
- (function(e) {
747
- e[e.literal = 0] = "literal", e[e.argument = 1] = "argument", e[e.number = 2] = "number", e[e.date = 3] = "date", e[e.time = 4] = "time", e[e.select = 5] = "select", e[e.plural = 6] = "plural", e[e.pound = 7] = "pound", e[e.tag = 8] = "tag";
748
- })(S || (S = {}));
749
- var ke;
750
- (function(e) {
751
- e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
752
- })(ke || (ke = {}));
753
- function nr(e) {
754
- return e.type === S.literal;
755
- }
756
- function Qn(e) {
757
- return e.type === S.argument;
758
- }
759
- function Or(e) {
760
- return e.type === S.number;
761
- }
762
- function Lr(e) {
763
- return e.type === S.date;
764
- }
765
- function Mr(e) {
766
- return e.type === S.time;
767
- }
768
- function Rr(e) {
769
- return e.type === S.select;
770
- }
771
- function Dr(e) {
772
- return e.type === S.plural;
773
- }
774
- function Yn(e) {
775
- return e.type === S.pound;
776
- }
777
- function Ur(e) {
778
- return e.type === S.tag;
779
- }
780
- function Fr(e) {
781
- return !!(e && typeof e == "object" && e.type === ke.number);
782
- }
783
- function Mt(e) {
784
- return !!(e && typeof e == "object" && e.type === ke.dateTime);
785
- }
786
- var Gr = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/, Kn = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
787
- function ei(e) {
788
- var t = {};
789
- return e.replace(Kn, function(r) {
790
- var n = r.length;
791
- switch (r[0]) {
792
- case "G":
793
- t.era = n === 4 ? "long" : n === 5 ? "narrow" : "short";
794
- break;
795
- case "y":
796
- t.year = n === 2 ? "2-digit" : "numeric";
797
- break;
798
- case "Y":
799
- case "u":
800
- case "U":
801
- case "r":
802
- throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");
803
- case "q":
804
- case "Q":
805
- throw new RangeError("`q/Q` (quarter) patterns are not supported");
806
- case "M":
807
- case "L":
808
- t.month = ["numeric", "2-digit", "short", "long", "narrow"][n - 1];
809
- break;
810
- case "w":
811
- case "W":
812
- throw new RangeError("`w/W` (week) patterns are not supported");
813
- case "d":
814
- t.day = ["numeric", "2-digit"][n - 1];
815
- break;
816
- case "D":
817
- case "F":
818
- case "g":
819
- throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");
820
- case "E":
821
- t.weekday = n === 4 ? "long" : n === 5 ? "narrow" : "short";
822
- break;
823
- case "e":
824
- if (n < 4)
825
- throw new RangeError("`e..eee` (weekday) patterns are not supported");
826
- t.weekday = ["short", "long", "narrow", "short"][n - 4];
827
- break;
828
- case "c":
829
- if (n < 4)
830
- throw new RangeError("`c..ccc` (weekday) patterns are not supported");
831
- t.weekday = ["short", "long", "narrow", "short"][n - 4];
832
- break;
833
- case "a":
834
- t.hour12 = !0;
835
- break;
836
- case "b":
837
- case "B":
838
- throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");
839
- case "h":
840
- t.hourCycle = "h12", t.hour = ["numeric", "2-digit"][n - 1];
841
- break;
842
- case "H":
843
- t.hourCycle = "h23", t.hour = ["numeric", "2-digit"][n - 1];
844
- break;
845
- case "K":
846
- t.hourCycle = "h11", t.hour = ["numeric", "2-digit"][n - 1];
847
- break;
848
- case "k":
849
- t.hourCycle = "h24", t.hour = ["numeric", "2-digit"][n - 1];
850
- break;
851
- case "j":
852
- case "J":
853
- case "C":
854
- throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");
855
- case "m":
856
- t.minute = ["numeric", "2-digit"][n - 1];
857
- break;
858
- case "s":
859
- t.second = ["numeric", "2-digit"][n - 1];
860
- break;
861
- case "S":
862
- case "A":
863
- throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");
864
- case "z":
865
- t.timeZoneName = n < 4 ? "short" : "long";
866
- break;
867
- case "Z":
868
- case "O":
869
- case "v":
870
- case "V":
871
- case "X":
872
- case "x":
873
- throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead");
874
- }
875
- return "";
876
- }), t;
877
- }
878
- var N = function() {
879
- return N = Object.assign || function(t) {
880
- for (var r, n = 1, i = arguments.length; n < i; n++) {
881
- r = arguments[n];
882
- for (var a in r)
883
- Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
884
- }
885
- return t;
886
- }, N.apply(this, arguments);
887
- };
888
- var ti = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
889
- function ri(e) {
890
- if (e.length === 0)
891
- throw new Error("Number skeleton cannot be empty");
892
- for (var t = e.split(ti).filter(function(d) {
893
- return d.length > 0;
894
- }), r = [], n = 0, i = t; n < i.length; n++) {
895
- var a = i[n], o = a.split("/");
896
- if (o.length === 0)
897
- throw new Error("Invalid number skeleton");
898
- for (var s = o[0], c = o.slice(1), l = 0, u = c; l < u.length; l++) {
899
- var h = u[l];
900
- if (h.length === 0)
901
- throw new Error("Invalid number skeleton");
902
- }
903
- r.push({ stem: s, options: c });
904
- }
905
- return r;
906
- }
907
- function ni(e) {
908
- return e.replace(/^(.*?)-/, "");
909
- }
910
- var ir = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g, kr = /^(@+)?(\+|#+)?[rs]?$/g, ii = /(\*)(0+)|(#+)(0+)|(0+)/g, jr = /^(0+)$/;
911
- function ar(e) {
912
- var t = {};
913
- return e[e.length - 1] === "r" ? t.roundingPriority = "morePrecision" : e[e.length - 1] === "s" && (t.roundingPriority = "lessPrecision"), e.replace(kr, function(r, n, i) {
914
- return typeof i != "string" ? (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length) : i === "+" ? t.minimumSignificantDigits = n.length : n[0] === "#" ? t.maximumSignificantDigits = n.length : (t.minimumSignificantDigits = n.length, t.maximumSignificantDigits = n.length + (typeof i == "string" ? i.length : 0)), "";
915
- }), t;
916
- }
917
- function $r(e) {
918
- switch (e) {
919
- case "sign-auto":
920
- return {
921
- signDisplay: "auto"
922
- };
923
- case "sign-accounting":
924
- case "()":
925
- return {
926
- currencySign: "accounting"
927
- };
928
- case "sign-always":
929
- case "+!":
930
- return {
931
- signDisplay: "always"
932
- };
933
- case "sign-accounting-always":
934
- case "()!":
935
- return {
936
- signDisplay: "always",
937
- currencySign: "accounting"
938
- };
939
- case "sign-except-zero":
940
- case "+?":
941
- return {
942
- signDisplay: "exceptZero"
943
- };
944
- case "sign-accounting-except-zero":
945
- case "()?":
946
- return {
947
- signDisplay: "exceptZero",
948
- currencySign: "accounting"
949
- };
950
- case "sign-never":
951
- case "+_":
952
- return {
953
- signDisplay: "never"
954
- };
955
- }
956
- }
957
- function ai(e) {
958
- var t;
959
- if (e[0] === "E" && e[1] === "E" ? (t = {
960
- notation: "engineering"
961
- }, e = e.slice(2)) : e[0] === "E" && (t = {
962
- notation: "scientific"
963
- }, e = e.slice(1)), t) {
964
- var r = e.slice(0, 2);
965
- if (r === "+!" ? (t.signDisplay = "always", e = e.slice(2)) : r === "+?" && (t.signDisplay = "exceptZero", e = e.slice(2)), !jr.test(e))
966
- throw new Error("Malformed concise eng/scientific notation");
967
- t.minimumIntegerDigits = e.length;
968
- }
969
- return t;
970
- }
971
- function or(e) {
972
- var t = {}, r = $r(e);
973
- return r || t;
974
- }
975
- function oi(e) {
976
- for (var t = {}, r = 0, n = e; r < n.length; r++) {
977
- var i = n[r];
978
- switch (i.stem) {
979
- case "percent":
980
- case "%":
981
- t.style = "percent";
982
- continue;
983
- case "%x100":
984
- t.style = "percent", t.scale = 100;
985
- continue;
986
- case "currency":
987
- t.style = "currency", t.currency = i.options[0];
988
- continue;
989
- case "group-off":
990
- case ",_":
991
- t.useGrouping = !1;
992
- continue;
993
- case "precision-integer":
994
- case ".":
995
- t.maximumFractionDigits = 0;
996
- continue;
997
- case "measure-unit":
998
- case "unit":
999
- t.style = "unit", t.unit = ni(i.options[0]);
1000
- continue;
1001
- case "compact-short":
1002
- case "K":
1003
- t.notation = "compact", t.compactDisplay = "short";
1004
- continue;
1005
- case "compact-long":
1006
- case "KK":
1007
- t.notation = "compact", t.compactDisplay = "long";
1008
- continue;
1009
- case "scientific":
1010
- t = N(N(N({}, t), { notation: "scientific" }), i.options.reduce(function(c, l) {
1011
- return N(N({}, c), or(l));
1012
- }, {}));
1013
- continue;
1014
- case "engineering":
1015
- t = N(N(N({}, t), { notation: "engineering" }), i.options.reduce(function(c, l) {
1016
- return N(N({}, c), or(l));
1017
- }, {}));
1018
- continue;
1019
- case "notation-simple":
1020
- t.notation = "standard";
1021
- continue;
1022
- case "unit-width-narrow":
1023
- t.currencyDisplay = "narrowSymbol", t.unitDisplay = "narrow";
1024
- continue;
1025
- case "unit-width-short":
1026
- t.currencyDisplay = "code", t.unitDisplay = "short";
1027
- continue;
1028
- case "unit-width-full-name":
1029
- t.currencyDisplay = "name", t.unitDisplay = "long";
1030
- continue;
1031
- case "unit-width-iso-code":
1032
- t.currencyDisplay = "symbol";
1033
- continue;
1034
- case "scale":
1035
- t.scale = parseFloat(i.options[0]);
1036
- continue;
1037
- case "rounding-mode-floor":
1038
- t.roundingMode = "floor";
1039
- continue;
1040
- case "rounding-mode-ceiling":
1041
- t.roundingMode = "ceil";
1042
- continue;
1043
- case "rounding-mode-down":
1044
- t.roundingMode = "trunc";
1045
- continue;
1046
- case "rounding-mode-up":
1047
- t.roundingMode = "expand";
1048
- continue;
1049
- case "rounding-mode-half-even":
1050
- t.roundingMode = "halfEven";
1051
- continue;
1052
- case "rounding-mode-half-down":
1053
- t.roundingMode = "halfTrunc";
1054
- continue;
1055
- case "rounding-mode-half-up":
1056
- t.roundingMode = "halfExpand";
1057
- continue;
1058
- case "integer-width":
1059
- if (i.options.length > 1)
1060
- throw new RangeError("integer-width stems only accept a single optional option");
1061
- i.options[0].replace(ii, function(c, l, u, h, d, b) {
1062
- if (l)
1063
- t.minimumIntegerDigits = u.length;
1064
- else {
1065
- if (h && d)
1066
- throw new Error("We currently do not support maximum integer digits");
1067
- if (b)
1068
- throw new Error("We currently do not support exact integer digits");
1069
- }
1070
- return "";
1071
- });
1072
- continue;
1073
- }
1074
- if (jr.test(i.stem)) {
1075
- t.minimumIntegerDigits = i.stem.length;
1076
- continue;
1077
- }
1078
- if (ir.test(i.stem)) {
1079
- if (i.options.length > 1)
1080
- throw new RangeError("Fraction-precision stems only accept a single optional option");
1081
- i.stem.replace(ir, function(c, l, u, h, d, b) {
1082
- return u === "*" ? t.minimumFractionDigits = l.length : h && h[0] === "#" ? t.maximumFractionDigits = h.length : d && b ? (t.minimumFractionDigits = d.length, t.maximumFractionDigits = d.length + b.length) : (t.minimumFractionDigits = l.length, t.maximumFractionDigits = l.length), "";
1083
- });
1084
- var a = i.options[0];
1085
- a === "w" ? t = N(N({}, t), { trailingZeroDisplay: "stripIfInteger" }) : a && (t = N(N({}, t), ar(a)));
1086
- continue;
1087
- }
1088
- if (kr.test(i.stem)) {
1089
- t = N(N({}, t), ar(i.stem));
1090
- continue;
1091
- }
1092
- var o = $r(i.stem);
1093
- o && (t = N(N({}, t), o));
1094
- var s = ai(i.stem);
1095
- s && (t = N(N({}, t), s));
1096
- }
1097
- return t;
1098
- }
1099
- var lt = {
1100
- "001": [
1101
- "H",
1102
- "h"
1103
- ],
1104
- 419: [
1105
- "h",
1106
- "H",
1107
- "hB",
1108
- "hb"
1109
- ],
1110
- AC: [
1111
- "H",
1112
- "h",
1113
- "hb",
1114
- "hB"
1115
- ],
1116
- AD: [
1117
- "H",
1118
- "hB"
1119
- ],
1120
- AE: [
1121
- "h",
1122
- "hB",
1123
- "hb",
1124
- "H"
1125
- ],
1126
- AF: [
1127
- "H",
1128
- "hb",
1129
- "hB",
1130
- "h"
1131
- ],
1132
- AG: [
1133
- "h",
1134
- "hb",
1135
- "H",
1136
- "hB"
1137
- ],
1138
- AI: [
1139
- "H",
1140
- "h",
1141
- "hb",
1142
- "hB"
1143
- ],
1144
- AL: [
1145
- "h",
1146
- "H",
1147
- "hB"
1148
- ],
1149
- AM: [
1150
- "H",
1151
- "hB"
1152
- ],
1153
- AO: [
1154
- "H",
1155
- "hB"
1156
- ],
1157
- AR: [
1158
- "h",
1159
- "H",
1160
- "hB",
1161
- "hb"
1162
- ],
1163
- AS: [
1164
- "h",
1165
- "H"
1166
- ],
1167
- AT: [
1168
- "H",
1169
- "hB"
1170
- ],
1171
- AU: [
1172
- "h",
1173
- "hb",
1174
- "H",
1175
- "hB"
1176
- ],
1177
- AW: [
1178
- "H",
1179
- "hB"
1180
- ],
1181
- AX: [
1182
- "H"
1183
- ],
1184
- AZ: [
1185
- "H",
1186
- "hB",
1187
- "h"
1188
- ],
1189
- BA: [
1190
- "H",
1191
- "hB",
1192
- "h"
1193
- ],
1194
- BB: [
1195
- "h",
1196
- "hb",
1197
- "H",
1198
- "hB"
1199
- ],
1200
- BD: [
1201
- "h",
1202
- "hB",
1203
- "H"
1204
- ],
1205
- BE: [
1206
- "H",
1207
- "hB"
1208
- ],
1209
- BF: [
1210
- "H",
1211
- "hB"
1212
- ],
1213
- BG: [
1214
- "H",
1215
- "hB",
1216
- "h"
1217
- ],
1218
- BH: [
1219
- "h",
1220
- "hB",
1221
- "hb",
1222
- "H"
1223
- ],
1224
- BI: [
1225
- "H",
1226
- "h"
1227
- ],
1228
- BJ: [
1229
- "H",
1230
- "hB"
1231
- ],
1232
- BL: [
1233
- "H",
1234
- "hB"
1235
- ],
1236
- BM: [
1237
- "h",
1238
- "hb",
1239
- "H",
1240
- "hB"
1241
- ],
1242
- BN: [
1243
- "hb",
1244
- "hB",
1245
- "h",
1246
- "H"
1247
- ],
1248
- BO: [
1249
- "h",
1250
- "H",
1251
- "hB",
1252
- "hb"
1253
- ],
1254
- BQ: [
1255
- "H"
1256
- ],
1257
- BR: [
1258
- "H",
1259
- "hB"
1260
- ],
1261
- BS: [
1262
- "h",
1263
- "hb",
1264
- "H",
1265
- "hB"
1266
- ],
1267
- BT: [
1268
- "h",
1269
- "H"
1270
- ],
1271
- BW: [
1272
- "H",
1273
- "h",
1274
- "hb",
1275
- "hB"
1276
- ],
1277
- BY: [
1278
- "H",
1279
- "h"
1280
- ],
1281
- BZ: [
1282
- "H",
1283
- "h",
1284
- "hb",
1285
- "hB"
1286
- ],
1287
- CA: [
1288
- "h",
1289
- "hb",
1290
- "H",
1291
- "hB"
1292
- ],
1293
- CC: [
1294
- "H",
1295
- "h",
1296
- "hb",
1297
- "hB"
1298
- ],
1299
- CD: [
1300
- "hB",
1301
- "H"
1302
- ],
1303
- CF: [
1304
- "H",
1305
- "h",
1306
- "hB"
1307
- ],
1308
- CG: [
1309
- "H",
1310
- "hB"
1311
- ],
1312
- CH: [
1313
- "H",
1314
- "hB",
1315
- "h"
1316
- ],
1317
- CI: [
1318
- "H",
1319
- "hB"
1320
- ],
1321
- CK: [
1322
- "H",
1323
- "h",
1324
- "hb",
1325
- "hB"
1326
- ],
1327
- CL: [
1328
- "h",
1329
- "H",
1330
- "hB",
1331
- "hb"
1332
- ],
1333
- CM: [
1334
- "H",
1335
- "h",
1336
- "hB"
1337
- ],
1338
- CN: [
1339
- "H",
1340
- "hB",
1341
- "hb",
1342
- "h"
1343
- ],
1344
- CO: [
1345
- "h",
1346
- "H",
1347
- "hB",
1348
- "hb"
1349
- ],
1350
- CP: [
1351
- "H"
1352
- ],
1353
- CR: [
1354
- "h",
1355
- "H",
1356
- "hB",
1357
- "hb"
1358
- ],
1359
- CU: [
1360
- "h",
1361
- "H",
1362
- "hB",
1363
- "hb"
1364
- ],
1365
- CV: [
1366
- "H",
1367
- "hB"
1368
- ],
1369
- CW: [
1370
- "H",
1371
- "hB"
1372
- ],
1373
- CX: [
1374
- "H",
1375
- "h",
1376
- "hb",
1377
- "hB"
1378
- ],
1379
- CY: [
1380
- "h",
1381
- "H",
1382
- "hb",
1383
- "hB"
1384
- ],
1385
- CZ: [
1386
- "H"
1387
- ],
1388
- DE: [
1389
- "H",
1390
- "hB"
1391
- ],
1392
- DG: [
1393
- "H",
1394
- "h",
1395
- "hb",
1396
- "hB"
1397
- ],
1398
- DJ: [
1399
- "h",
1400
- "H"
1401
- ],
1402
- DK: [
1403
- "H"
1404
- ],
1405
- DM: [
1406
- "h",
1407
- "hb",
1408
- "H",
1409
- "hB"
1410
- ],
1411
- DO: [
1412
- "h",
1413
- "H",
1414
- "hB",
1415
- "hb"
1416
- ],
1417
- DZ: [
1418
- "h",
1419
- "hB",
1420
- "hb",
1421
- "H"
1422
- ],
1423
- EA: [
1424
- "H",
1425
- "h",
1426
- "hB",
1427
- "hb"
1428
- ],
1429
- EC: [
1430
- "h",
1431
- "H",
1432
- "hB",
1433
- "hb"
1434
- ],
1435
- EE: [
1436
- "H",
1437
- "hB"
1438
- ],
1439
- EG: [
1440
- "h",
1441
- "hB",
1442
- "hb",
1443
- "H"
1444
- ],
1445
- EH: [
1446
- "h",
1447
- "hB",
1448
- "hb",
1449
- "H"
1450
- ],
1451
- ER: [
1452
- "h",
1453
- "H"
1454
- ],
1455
- ES: [
1456
- "H",
1457
- "hB",
1458
- "h",
1459
- "hb"
1460
- ],
1461
- ET: [
1462
- "hB",
1463
- "hb",
1464
- "h",
1465
- "H"
1466
- ],
1467
- FI: [
1468
- "H"
1469
- ],
1470
- FJ: [
1471
- "h",
1472
- "hb",
1473
- "H",
1474
- "hB"
1475
- ],
1476
- FK: [
1477
- "H",
1478
- "h",
1479
- "hb",
1480
- "hB"
1481
- ],
1482
- FM: [
1483
- "h",
1484
- "hb",
1485
- "H",
1486
- "hB"
1487
- ],
1488
- FO: [
1489
- "H",
1490
- "h"
1491
- ],
1492
- FR: [
1493
- "H",
1494
- "hB"
1495
- ],
1496
- GA: [
1497
- "H",
1498
- "hB"
1499
- ],
1500
- GB: [
1501
- "H",
1502
- "h",
1503
- "hb",
1504
- "hB"
1505
- ],
1506
- GD: [
1507
- "h",
1508
- "hb",
1509
- "H",
1510
- "hB"
1511
- ],
1512
- GE: [
1513
- "H",
1514
- "hB",
1515
- "h"
1516
- ],
1517
- GF: [
1518
- "H",
1519
- "hB"
1520
- ],
1521
- GG: [
1522
- "H",
1523
- "h",
1524
- "hb",
1525
- "hB"
1526
- ],
1527
- GH: [
1528
- "h",
1529
- "H"
1530
- ],
1531
- GI: [
1532
- "H",
1533
- "h",
1534
- "hb",
1535
- "hB"
1536
- ],
1537
- GL: [
1538
- "H",
1539
- "h"
1540
- ],
1541
- GM: [
1542
- "h",
1543
- "hb",
1544
- "H",
1545
- "hB"
1546
- ],
1547
- GN: [
1548
- "H",
1549
- "hB"
1550
- ],
1551
- GP: [
1552
- "H",
1553
- "hB"
1554
- ],
1555
- GQ: [
1556
- "H",
1557
- "hB",
1558
- "h",
1559
- "hb"
1560
- ],
1561
- GR: [
1562
- "h",
1563
- "H",
1564
- "hb",
1565
- "hB"
1566
- ],
1567
- GT: [
1568
- "h",
1569
- "H",
1570
- "hB",
1571
- "hb"
1572
- ],
1573
- GU: [
1574
- "h",
1575
- "hb",
1576
- "H",
1577
- "hB"
1578
- ],
1579
- GW: [
1580
- "H",
1581
- "hB"
1582
- ],
1583
- GY: [
1584
- "h",
1585
- "hb",
1586
- "H",
1587
- "hB"
1588
- ],
1589
- HK: [
1590
- "h",
1591
- "hB",
1592
- "hb",
1593
- "H"
1594
- ],
1595
- HN: [
1596
- "h",
1597
- "H",
1598
- "hB",
1599
- "hb"
1600
- ],
1601
- HR: [
1602
- "H",
1603
- "hB"
1604
- ],
1605
- HU: [
1606
- "H",
1607
- "h"
1608
- ],
1609
- IC: [
1610
- "H",
1611
- "h",
1612
- "hB",
1613
- "hb"
1614
- ],
1615
- ID: [
1616
- "H"
1617
- ],
1618
- IE: [
1619
- "H",
1620
- "h",
1621
- "hb",
1622
- "hB"
1623
- ],
1624
- IL: [
1625
- "H",
1626
- "hB"
1627
- ],
1628
- IM: [
1629
- "H",
1630
- "h",
1631
- "hb",
1632
- "hB"
1633
- ],
1634
- IN: [
1635
- "h",
1636
- "H"
1637
- ],
1638
- IO: [
1639
- "H",
1640
- "h",
1641
- "hb",
1642
- "hB"
1643
- ],
1644
- IQ: [
1645
- "h",
1646
- "hB",
1647
- "hb",
1648
- "H"
1649
- ],
1650
- IR: [
1651
- "hB",
1652
- "H"
1653
- ],
1654
- IS: [
1655
- "H"
1656
- ],
1657
- IT: [
1658
- "H",
1659
- "hB"
1660
- ],
1661
- JE: [
1662
- "H",
1663
- "h",
1664
- "hb",
1665
- "hB"
1666
- ],
1667
- JM: [
1668
- "h",
1669
- "hb",
1670
- "H",
1671
- "hB"
1672
- ],
1673
- JO: [
1674
- "h",
1675
- "hB",
1676
- "hb",
1677
- "H"
1678
- ],
1679
- JP: [
1680
- "H",
1681
- "K",
1682
- "h"
1683
- ],
1684
- KE: [
1685
- "hB",
1686
- "hb",
1687
- "H",
1688
- "h"
1689
- ],
1690
- KG: [
1691
- "H",
1692
- "h",
1693
- "hB",
1694
- "hb"
1695
- ],
1696
- KH: [
1697
- "hB",
1698
- "h",
1699
- "H",
1700
- "hb"
1701
- ],
1702
- KI: [
1703
- "h",
1704
- "hb",
1705
- "H",
1706
- "hB"
1707
- ],
1708
- KM: [
1709
- "H",
1710
- "h",
1711
- "hB",
1712
- "hb"
1713
- ],
1714
- KN: [
1715
- "h",
1716
- "hb",
1717
- "H",
1718
- "hB"
1719
- ],
1720
- KP: [
1721
- "h",
1722
- "H",
1723
- "hB",
1724
- "hb"
1725
- ],
1726
- KR: [
1727
- "h",
1728
- "H",
1729
- "hB",
1730
- "hb"
1731
- ],
1732
- KW: [
1733
- "h",
1734
- "hB",
1735
- "hb",
1736
- "H"
1737
- ],
1738
- KY: [
1739
- "h",
1740
- "hb",
1741
- "H",
1742
- "hB"
1743
- ],
1744
- KZ: [
1745
- "H",
1746
- "hB"
1747
- ],
1748
- LA: [
1749
- "H",
1750
- "hb",
1751
- "hB",
1752
- "h"
1753
- ],
1754
- LB: [
1755
- "h",
1756
- "hB",
1757
- "hb",
1758
- "H"
1759
- ],
1760
- LC: [
1761
- "h",
1762
- "hb",
1763
- "H",
1764
- "hB"
1765
- ],
1766
- LI: [
1767
- "H",
1768
- "hB",
1769
- "h"
1770
- ],
1771
- LK: [
1772
- "H",
1773
- "h",
1774
- "hB",
1775
- "hb"
1776
- ],
1777
- LR: [
1778
- "h",
1779
- "hb",
1780
- "H",
1781
- "hB"
1782
- ],
1783
- LS: [
1784
- "h",
1785
- "H"
1786
- ],
1787
- LT: [
1788
- "H",
1789
- "h",
1790
- "hb",
1791
- "hB"
1792
- ],
1793
- LU: [
1794
- "H",
1795
- "h",
1796
- "hB"
1797
- ],
1798
- LV: [
1799
- "H",
1800
- "hB",
1801
- "hb",
1802
- "h"
1803
- ],
1804
- LY: [
1805
- "h",
1806
- "hB",
1807
- "hb",
1808
- "H"
1809
- ],
1810
- MA: [
1811
- "H",
1812
- "h",
1813
- "hB",
1814
- "hb"
1815
- ],
1816
- MC: [
1817
- "H",
1818
- "hB"
1819
- ],
1820
- MD: [
1821
- "H",
1822
- "hB"
1823
- ],
1824
- ME: [
1825
- "H",
1826
- "hB",
1827
- "h"
1828
- ],
1829
- MF: [
1830
- "H",
1831
- "hB"
1832
- ],
1833
- MG: [
1834
- "H",
1835
- "h"
1836
- ],
1837
- MH: [
1838
- "h",
1839
- "hb",
1840
- "H",
1841
- "hB"
1842
- ],
1843
- MK: [
1844
- "H",
1845
- "h",
1846
- "hb",
1847
- "hB"
1848
- ],
1849
- ML: [
1850
- "H"
1851
- ],
1852
- MM: [
1853
- "hB",
1854
- "hb",
1855
- "H",
1856
- "h"
1857
- ],
1858
- MN: [
1859
- "H",
1860
- "h",
1861
- "hb",
1862
- "hB"
1863
- ],
1864
- MO: [
1865
- "h",
1866
- "hB",
1867
- "hb",
1868
- "H"
1869
- ],
1870
- MP: [
1871
- "h",
1872
- "hb",
1873
- "H",
1874
- "hB"
1875
- ],
1876
- MQ: [
1877
- "H",
1878
- "hB"
1879
- ],
1880
- MR: [
1881
- "h",
1882
- "hB",
1883
- "hb",
1884
- "H"
1885
- ],
1886
- MS: [
1887
- "H",
1888
- "h",
1889
- "hb",
1890
- "hB"
1891
- ],
1892
- MT: [
1893
- "H",
1894
- "h"
1895
- ],
1896
- MU: [
1897
- "H",
1898
- "h"
1899
- ],
1900
- MV: [
1901
- "H",
1902
- "h"
1903
- ],
1904
- MW: [
1905
- "h",
1906
- "hb",
1907
- "H",
1908
- "hB"
1909
- ],
1910
- MX: [
1911
- "h",
1912
- "H",
1913
- "hB",
1914
- "hb"
1915
- ],
1916
- MY: [
1917
- "hb",
1918
- "hB",
1919
- "h",
1920
- "H"
1921
- ],
1922
- MZ: [
1923
- "H",
1924
- "hB"
1925
- ],
1926
- NA: [
1927
- "h",
1928
- "H",
1929
- "hB",
1930
- "hb"
1931
- ],
1932
- NC: [
1933
- "H",
1934
- "hB"
1935
- ],
1936
- NE: [
1937
- "H"
1938
- ],
1939
- NF: [
1940
- "H",
1941
- "h",
1942
- "hb",
1943
- "hB"
1944
- ],
1945
- NG: [
1946
- "H",
1947
- "h",
1948
- "hb",
1949
- "hB"
1950
- ],
1951
- NI: [
1952
- "h",
1953
- "H",
1954
- "hB",
1955
- "hb"
1956
- ],
1957
- NL: [
1958
- "H",
1959
- "hB"
1960
- ],
1961
- NO: [
1962
- "H",
1963
- "h"
1964
- ],
1965
- NP: [
1966
- "H",
1967
- "h",
1968
- "hB"
1969
- ],
1970
- NR: [
1971
- "H",
1972
- "h",
1973
- "hb",
1974
- "hB"
1975
- ],
1976
- NU: [
1977
- "H",
1978
- "h",
1979
- "hb",
1980
- "hB"
1981
- ],
1982
- NZ: [
1983
- "h",
1984
- "hb",
1985
- "H",
1986
- "hB"
1987
- ],
1988
- OM: [
1989
- "h",
1990
- "hB",
1991
- "hb",
1992
- "H"
1993
- ],
1994
- PA: [
1995
- "h",
1996
- "H",
1997
- "hB",
1998
- "hb"
1999
- ],
2000
- PE: [
2001
- "h",
2002
- "H",
2003
- "hB",
2004
- "hb"
2005
- ],
2006
- PF: [
2007
- "H",
2008
- "h",
2009
- "hB"
2010
- ],
2011
- PG: [
2012
- "h",
2013
- "H"
2014
- ],
2015
- PH: [
2016
- "h",
2017
- "hB",
2018
- "hb",
2019
- "H"
2020
- ],
2021
- PK: [
2022
- "h",
2023
- "hB",
2024
- "H"
2025
- ],
2026
- PL: [
2027
- "H",
2028
- "h"
2029
- ],
2030
- PM: [
2031
- "H",
2032
- "hB"
2033
- ],
2034
- PN: [
2035
- "H",
2036
- "h",
2037
- "hb",
2038
- "hB"
2039
- ],
2040
- PR: [
2041
- "h",
2042
- "H",
2043
- "hB",
2044
- "hb"
2045
- ],
2046
- PS: [
2047
- "h",
2048
- "hB",
2049
- "hb",
2050
- "H"
2051
- ],
2052
- PT: [
2053
- "H",
2054
- "hB"
2055
- ],
2056
- PW: [
2057
- "h",
2058
- "H"
2059
- ],
2060
- PY: [
2061
- "h",
2062
- "H",
2063
- "hB",
2064
- "hb"
2065
- ],
2066
- QA: [
2067
- "h",
2068
- "hB",
2069
- "hb",
2070
- "H"
2071
- ],
2072
- RE: [
2073
- "H",
2074
- "hB"
2075
- ],
2076
- RO: [
2077
- "H",
2078
- "hB"
2079
- ],
2080
- RS: [
2081
- "H",
2082
- "hB",
2083
- "h"
2084
- ],
2085
- RU: [
2086
- "H"
2087
- ],
2088
- RW: [
2089
- "H",
2090
- "h"
2091
- ],
2092
- SA: [
2093
- "h",
2094
- "hB",
2095
- "hb",
2096
- "H"
2097
- ],
2098
- SB: [
2099
- "h",
2100
- "hb",
2101
- "H",
2102
- "hB"
2103
- ],
2104
- SC: [
2105
- "H",
2106
- "h",
2107
- "hB"
2108
- ],
2109
- SD: [
2110
- "h",
2111
- "hB",
2112
- "hb",
2113
- "H"
2114
- ],
2115
- SE: [
2116
- "H"
2117
- ],
2118
- SG: [
2119
- "h",
2120
- "hb",
2121
- "H",
2122
- "hB"
2123
- ],
2124
- SH: [
2125
- "H",
2126
- "h",
2127
- "hb",
2128
- "hB"
2129
- ],
2130
- SI: [
2131
- "H",
2132
- "hB"
2133
- ],
2134
- SJ: [
2135
- "H"
2136
- ],
2137
- SK: [
2138
- "H"
2139
- ],
2140
- SL: [
2141
- "h",
2142
- "hb",
2143
- "H",
2144
- "hB"
2145
- ],
2146
- SM: [
2147
- "H",
2148
- "h",
2149
- "hB"
2150
- ],
2151
- SN: [
2152
- "H",
2153
- "h",
2154
- "hB"
2155
- ],
2156
- SO: [
2157
- "h",
2158
- "H"
2159
- ],
2160
- SR: [
2161
- "H",
2162
- "hB"
2163
- ],
2164
- SS: [
2165
- "h",
2166
- "hb",
2167
- "H",
2168
- "hB"
2169
- ],
2170
- ST: [
2171
- "H",
2172
- "hB"
2173
- ],
2174
- SV: [
2175
- "h",
2176
- "H",
2177
- "hB",
2178
- "hb"
2179
- ],
2180
- SX: [
2181
- "H",
2182
- "h",
2183
- "hb",
2184
- "hB"
2185
- ],
2186
- SY: [
2187
- "h",
2188
- "hB",
2189
- "hb",
2190
- "H"
2191
- ],
2192
- SZ: [
2193
- "h",
2194
- "hb",
2195
- "H",
2196
- "hB"
2197
- ],
2198
- TA: [
2199
- "H",
2200
- "h",
2201
- "hb",
2202
- "hB"
2203
- ],
2204
- TC: [
2205
- "h",
2206
- "hb",
2207
- "H",
2208
- "hB"
2209
- ],
2210
- TD: [
2211
- "h",
2212
- "H",
2213
- "hB"
2214
- ],
2215
- TF: [
2216
- "H",
2217
- "h",
2218
- "hB"
2219
- ],
2220
- TG: [
2221
- "H",
2222
- "hB"
2223
- ],
2224
- TH: [
2225
- "H",
2226
- "h"
2227
- ],
2228
- TJ: [
2229
- "H",
2230
- "h"
2231
- ],
2232
- TL: [
2233
- "H",
2234
- "hB",
2235
- "hb",
2236
- "h"
2237
- ],
2238
- TM: [
2239
- "H",
2240
- "h"
2241
- ],
2242
- TN: [
2243
- "h",
2244
- "hB",
2245
- "hb",
2246
- "H"
2247
- ],
2248
- TO: [
2249
- "h",
2250
- "H"
2251
- ],
2252
- TR: [
2253
- "H",
2254
- "hB"
2255
- ],
2256
- TT: [
2257
- "h",
2258
- "hb",
2259
- "H",
2260
- "hB"
2261
- ],
2262
- TW: [
2263
- "hB",
2264
- "hb",
2265
- "h",
2266
- "H"
2267
- ],
2268
- TZ: [
2269
- "hB",
2270
- "hb",
2271
- "H",
2272
- "h"
2273
- ],
2274
- UA: [
2275
- "H",
2276
- "hB",
2277
- "h"
2278
- ],
2279
- UG: [
2280
- "hB",
2281
- "hb",
2282
- "H",
2283
- "h"
2284
- ],
2285
- UM: [
2286
- "h",
2287
- "hb",
2288
- "H",
2289
- "hB"
2290
- ],
2291
- US: [
2292
- "h",
2293
- "hb",
2294
- "H",
2295
- "hB"
2296
- ],
2297
- UY: [
2298
- "h",
2299
- "H",
2300
- "hB",
2301
- "hb"
2302
- ],
2303
- UZ: [
2304
- "H",
2305
- "hB",
2306
- "h"
2307
- ],
2308
- VA: [
2309
- "H",
2310
- "h",
2311
- "hB"
2312
- ],
2313
- VC: [
2314
- "h",
2315
- "hb",
2316
- "H",
2317
- "hB"
2318
- ],
2319
- VE: [
2320
- "h",
2321
- "H",
2322
- "hB",
2323
- "hb"
2324
- ],
2325
- VG: [
2326
- "h",
2327
- "hb",
2328
- "H",
2329
- "hB"
2330
- ],
2331
- VI: [
2332
- "h",
2333
- "hb",
2334
- "H",
2335
- "hB"
2336
- ],
2337
- VN: [
2338
- "H",
2339
- "h"
2340
- ],
2341
- VU: [
2342
- "h",
2343
- "H"
2344
- ],
2345
- WF: [
2346
- "H",
2347
- "hB"
2348
- ],
2349
- WS: [
2350
- "h",
2351
- "H"
2352
- ],
2353
- XK: [
2354
- "H",
2355
- "hB",
2356
- "h"
2357
- ],
2358
- YE: [
2359
- "h",
2360
- "hB",
2361
- "hb",
2362
- "H"
2363
- ],
2364
- YT: [
2365
- "H",
2366
- "hB"
2367
- ],
2368
- ZA: [
2369
- "H",
2370
- "h",
2371
- "hb",
2372
- "hB"
2373
- ],
2374
- ZM: [
2375
- "h",
2376
- "hb",
2377
- "H",
2378
- "hB"
2379
- ],
2380
- ZW: [
2381
- "H",
2382
- "h"
2383
- ],
2384
- "af-ZA": [
2385
- "H",
2386
- "h",
2387
- "hB",
2388
- "hb"
2389
- ],
2390
- "ar-001": [
2391
- "h",
2392
- "hB",
2393
- "hb",
2394
- "H"
2395
- ],
2396
- "ca-ES": [
2397
- "H",
2398
- "h",
2399
- "hB"
2400
- ],
2401
- "en-001": [
2402
- "h",
2403
- "hb",
2404
- "H",
2405
- "hB"
2406
- ],
2407
- "en-HK": [
2408
- "h",
2409
- "hb",
2410
- "H",
2411
- "hB"
2412
- ],
2413
- "en-IL": [
2414
- "H",
2415
- "h",
2416
- "hb",
2417
- "hB"
2418
- ],
2419
- "en-MY": [
2420
- "h",
2421
- "hb",
2422
- "H",
2423
- "hB"
2424
- ],
2425
- "es-BR": [
2426
- "H",
2427
- "h",
2428
- "hB",
2429
- "hb"
2430
- ],
2431
- "es-ES": [
2432
- "H",
2433
- "h",
2434
- "hB",
2435
- "hb"
2436
- ],
2437
- "es-GQ": [
2438
- "H",
2439
- "h",
2440
- "hB",
2441
- "hb"
2442
- ],
2443
- "fr-CA": [
2444
- "H",
2445
- "h",
2446
- "hB"
2447
- ],
2448
- "gl-ES": [
2449
- "H",
2450
- "h",
2451
- "hB"
2452
- ],
2453
- "gu-IN": [
2454
- "hB",
2455
- "hb",
2456
- "h",
2457
- "H"
2458
- ],
2459
- "hi-IN": [
2460
- "hB",
2461
- "h",
2462
- "H"
2463
- ],
2464
- "it-CH": [
2465
- "H",
2466
- "h",
2467
- "hB"
2468
- ],
2469
- "it-IT": [
2470
- "H",
2471
- "h",
2472
- "hB"
2473
- ],
2474
- "kn-IN": [
2475
- "hB",
2476
- "h",
2477
- "H"
2478
- ],
2479
- "ml-IN": [
2480
- "hB",
2481
- "h",
2482
- "H"
2483
- ],
2484
- "mr-IN": [
2485
- "hB",
2486
- "hb",
2487
- "h",
2488
- "H"
2489
- ],
2490
- "pa-IN": [
2491
- "hB",
2492
- "hb",
2493
- "h",
2494
- "H"
2495
- ],
2496
- "ta-IN": [
2497
- "hB",
2498
- "h",
2499
- "hb",
2500
- "H"
2501
- ],
2502
- "te-IN": [
2503
- "hB",
2504
- "h",
2505
- "H"
2506
- ],
2507
- "zu-ZA": [
2508
- "H",
2509
- "hB",
2510
- "hb",
2511
- "h"
2512
- ]
2513
- };
2514
- function si(e, t) {
2515
- for (var r = "", n = 0; n < e.length; n++) {
2516
- var i = e.charAt(n);
2517
- if (i === "j") {
2518
- for (var a = 0; n + 1 < e.length && e.charAt(n + 1) === i; )
2519
- a++, n++;
2520
- var o = 1 + (a & 1), s = a < 2 ? 1 : 3 + (a >> 1), c = "a", l = ui(t);
2521
- for ((l == "H" || l == "k") && (s = 0); s-- > 0; )
2522
- r += c;
2523
- for (; o-- > 0; )
2524
- r = l + r;
2525
- } else
2526
- i === "J" ? r += "H" : r += i;
2527
- }
2528
- return r;
2529
- }
2530
- function ui(e) {
2531
- var t = e.hourCycle;
2532
- if (t === void 0 && // @ts-ignore hourCycle(s) is not identified yet
2533
- e.hourCycles && // @ts-ignore
2534
- e.hourCycles.length && (t = e.hourCycles[0]), t)
2535
- switch (t) {
2536
- case "h24":
2537
- return "k";
2538
- case "h23":
2539
- return "H";
2540
- case "h12":
2541
- return "h";
2542
- case "h11":
2543
- return "K";
2544
- default:
2545
- throw new Error("Invalid hourCycle");
2546
- }
2547
- var r = e.language, n;
2548
- r !== "root" && (n = e.maximize().region);
2549
- var i = lt[n || ""] || lt[r || ""] || lt["".concat(r, "-001")] || lt["001"];
2550
- return i[0];
2551
- }
2552
- var Pt, li = new RegExp("^".concat(Gr.source, "*")), ci = new RegExp("".concat(Gr.source, "*$"));
2553
- function T(e, t) {
2554
- return { start: e, end: t };
2555
- }
2556
- var hi = !!String.prototype.startsWith && "_a".startsWith("a", 1), fi = !!String.fromCodePoint, pi = !!Object.fromEntries, mi = !!String.prototype.codePointAt, di = !!String.prototype.trimStart, gi = !!String.prototype.trimEnd, bi = !!Number.isSafeInteger, yi = bi ? Number.isSafeInteger : function(e) {
2557
- return typeof e == "number" && isFinite(e) && Math.floor(e) === e && Math.abs(e) <= 9007199254740991;
2558
- }, Rt = !0;
2559
- try {
2560
- var vi = zr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
2561
- Rt = ((Pt = vi.exec("a")) === null || Pt === void 0 ? void 0 : Pt[0]) === "a";
2562
- } catch (e) {
2563
- Rt = !1;
2564
- }
2565
- var sr = hi ? (
2566
- // Native
2567
- function(t, r, n) {
2568
- return t.startsWith(r, n);
2569
- }
2570
- ) : (
2571
- // For IE11
2572
- function(t, r, n) {
2573
- return t.slice(n, n + r.length) === r;
2574
- }
2575
- ), Dt = fi ? String.fromCodePoint : (
2576
- // IE11
2577
- function() {
2578
- for (var t = [], r = 0; r < arguments.length; r++)
2579
- t[r] = arguments[r];
2580
- for (var n = "", i = t.length, a = 0, o; i > a; ) {
2581
- if (o = t[a++], o > 1114111)
2582
- throw RangeError(o + " is not a valid code point");
2583
- n += o < 65536 ? String.fromCharCode(o) : String.fromCharCode(((o -= 65536) >> 10) + 55296, o % 1024 + 56320);
2584
- }
2585
- return n;
2586
- }
2587
- ), ur = (
2588
- // native
2589
- pi ? Object.fromEntries : (
2590
- // Ponyfill
2591
- function(t) {
2592
- for (var r = {}, n = 0, i = t; n < i.length; n++) {
2593
- var a = i[n], o = a[0], s = a[1];
2594
- r[o] = s;
2595
- }
2596
- return r;
2597
- }
2598
- )
2599
- ), Vr = mi ? (
2600
- // Native
2601
- function(t, r) {
2602
- return t.codePointAt(r);
2603
- }
2604
- ) : (
2605
- // IE 11
2606
- function(t, r) {
2607
- var n = t.length;
2608
- if (!(r < 0 || r >= n)) {
2609
- var i = t.charCodeAt(r), a;
2610
- return i < 55296 || i > 56319 || r + 1 === n || (a = t.charCodeAt(r + 1)) < 56320 || a > 57343 ? i : (i - 55296 << 10) + (a - 56320) + 65536;
2611
- }
2612
- }
2613
- ), xi = di ? (
2614
- // Native
2615
- function(t) {
2616
- return t.trimStart();
2617
- }
2618
- ) : (
2619
- // Ponyfill
2620
- function(t) {
2621
- return t.replace(li, "");
2622
- }
2623
- ), Ei = gi ? (
2624
- // Native
2625
- function(t) {
2626
- return t.trimEnd();
2627
- }
2628
- ) : (
2629
- // Ponyfill
2630
- function(t) {
2631
- return t.replace(ci, "");
2632
- }
2633
- );
2634
- function zr(e, t) {
2635
- return new RegExp(e, t);
2636
- }
2637
- var Ut;
2638
- if (Rt) {
2639
- var lr = zr("([^\\p{White_Space}\\p{Pattern_Syntax}]*)", "yu");
2640
- Ut = function(t, r) {
2641
- var n;
2642
- lr.lastIndex = r;
2643
- var i = lr.exec(t);
2644
- return (n = i[1]) !== null && n !== void 0 ? n : "";
2645
- };
2646
- } else
2647
- Ut = function(t, r) {
2648
- for (var n = []; ; ) {
2649
- var i = Vr(t, r);
2650
- if (i === void 0 || Xr(i) || Hi(i))
2651
- break;
2652
- n.push(i), r += i >= 65536 ? 2 : 1;
2653
- }
2654
- return Dt.apply(void 0, n);
2655
- };
2656
- var _i = (
2657
- /** @class */
2658
- function() {
2659
- function e(t, r) {
2660
- r === void 0 && (r = {}), this.message = t, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!r.ignoreTag, this.locale = r.locale, this.requiresOtherClause = !!r.requiresOtherClause, this.shouldParseSkeletons = !!r.shouldParseSkeletons;
2661
- }
2662
- return e.prototype.parse = function() {
2663
- if (this.offset() !== 0)
2664
- throw Error("parser can only be used once");
2665
- return this.parseMessage(0, "", !1);
2666
- }, e.prototype.parseMessage = function(t, r, n) {
2667
- for (var i = []; !this.isEOF(); ) {
2668
- var a = this.char();
2669
- if (a === 123) {
2670
- var o = this.parseArgument(t, n);
2671
- if (o.err)
2672
- return o;
2673
- i.push(o.val);
2674
- } else {
2675
- if (a === 125 && t > 0)
2676
- break;
2677
- if (a === 35 && (r === "plural" || r === "selectordinal")) {
2678
- var s = this.clonePosition();
2679
- this.bump(), i.push({
2680
- type: S.pound,
2681
- location: T(s, this.clonePosition())
2682
- });
2683
- } else if (a === 60 && !this.ignoreTag && this.peek() === 47) {
2684
- if (n)
2685
- break;
2686
- return this.error(_.UNMATCHED_CLOSING_TAG, T(this.clonePosition(), this.clonePosition()));
2687
- } else if (a === 60 && !this.ignoreTag && Ft(this.peek() || 0)) {
2688
- var o = this.parseTag(t, r);
2689
- if (o.err)
2690
- return o;
2691
- i.push(o.val);
2692
- } else {
2693
- var o = this.parseLiteral(t, r);
2694
- if (o.err)
2695
- return o;
2696
- i.push(o.val);
2697
- }
2698
- }
2699
- }
2700
- return { val: i, err: null };
2701
- }, e.prototype.parseTag = function(t, r) {
2702
- var n = this.clonePosition();
2703
- this.bump();
2704
- var i = this.parseTagName();
2705
- if (this.bumpSpace(), this.bumpIf("/>"))
2706
- return {
2707
- val: {
2708
- type: S.literal,
2709
- value: "<".concat(i, "/>"),
2710
- location: T(n, this.clonePosition())
2711
- },
2712
- err: null
2713
- };
2714
- if (this.bumpIf(">")) {
2715
- var a = this.parseMessage(t + 1, r, !0);
2716
- if (a.err)
2717
- return a;
2718
- var o = a.val, s = this.clonePosition();
2719
- if (this.bumpIf("</")) {
2720
- if (this.isEOF() || !Ft(this.char()))
2721
- return this.error(_.INVALID_TAG, T(s, this.clonePosition()));
2722
- var c = this.clonePosition(), l = this.parseTagName();
2723
- return i !== l ? this.error(_.UNMATCHED_CLOSING_TAG, T(c, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
2724
- val: {
2725
- type: S.tag,
2726
- value: i,
2727
- children: o,
2728
- location: T(n, this.clonePosition())
2729
- },
2730
- err: null
2731
- } : this.error(_.INVALID_TAG, T(s, this.clonePosition())));
2732
- } else
2733
- return this.error(_.UNCLOSED_TAG, T(n, this.clonePosition()));
2734
- } else
2735
- return this.error(_.INVALID_TAG, T(n, this.clonePosition()));
2736
- }, e.prototype.parseTagName = function() {
2737
- var t = this.offset();
2738
- for (this.bump(); !this.isEOF() && Ti(this.char()); )
2739
- this.bump();
2740
- return this.message.slice(t, this.offset());
2741
- }, e.prototype.parseLiteral = function(t, r) {
2742
- for (var n = this.clonePosition(), i = ""; ; ) {
2743
- var a = this.tryParseQuote(r);
2744
- if (a) {
2745
- i += a;
2746
- continue;
2747
- }
2748
- var o = this.tryParseUnquoted(t, r);
2749
- if (o) {
2750
- i += o;
2751
- continue;
2752
- }
2753
- var s = this.tryParseLeftAngleBracket();
2754
- if (s) {
2755
- i += s;
2756
- continue;
2757
- }
2758
- break;
2759
- }
2760
- var c = T(n, this.clonePosition());
2761
- return {
2762
- val: { type: S.literal, value: i, location: c },
2763
- err: null
2764
- };
2765
- }, e.prototype.tryParseLeftAngleBracket = function() {
2766
- return !this.isEOF() && this.char() === 60 && (this.ignoreTag || // If at the opening tag or closing tag position, bail.
2767
- !wi(this.peek() || 0)) ? (this.bump(), "<") : null;
2768
- }, e.prototype.tryParseQuote = function(t) {
2769
- if (this.isEOF() || this.char() !== 39)
2770
- return null;
2771
- switch (this.peek()) {
2772
- case 39:
2773
- return this.bump(), this.bump(), "'";
2774
- case 123:
2775
- case 60:
2776
- case 62:
2777
- case 125:
2778
- break;
2779
- case 35:
2780
- if (t === "plural" || t === "selectordinal")
2781
- break;
2782
- return null;
2783
- default:
2784
- return null;
2785
- }
2786
- this.bump();
2787
- var r = [this.char()];
2788
- for (this.bump(); !this.isEOF(); ) {
2789
- var n = this.char();
2790
- if (n === 39)
2791
- if (this.peek() === 39)
2792
- r.push(39), this.bump();
2793
- else {
2794
- this.bump();
2795
- break;
2796
- }
2797
- else
2798
- r.push(n);
2799
- this.bump();
2800
- }
2801
- return Dt.apply(void 0, r);
2802
- }, e.prototype.tryParseUnquoted = function(t, r) {
2803
- if (this.isEOF())
2804
- return null;
2805
- var n = this.char();
2806
- return n === 60 || n === 123 || n === 35 && (r === "plural" || r === "selectordinal") || n === 125 && t > 0 ? null : (this.bump(), Dt(n));
2807
- }, e.prototype.parseArgument = function(t, r) {
2808
- var n = this.clonePosition();
2809
- if (this.bump(), this.bumpSpace(), this.isEOF())
2810
- return this.error(_.EXPECT_ARGUMENT_CLOSING_BRACE, T(n, this.clonePosition()));
2811
- if (this.char() === 125)
2812
- return this.bump(), this.error(_.EMPTY_ARGUMENT, T(n, this.clonePosition()));
2813
- var i = this.parseIdentifierIfPossible().value;
2814
- if (!i)
2815
- return this.error(_.MALFORMED_ARGUMENT, T(n, this.clonePosition()));
2816
- if (this.bumpSpace(), this.isEOF())
2817
- return this.error(_.EXPECT_ARGUMENT_CLOSING_BRACE, T(n, this.clonePosition()));
2818
- switch (this.char()) {
2819
- case 125:
2820
- return this.bump(), {
2821
- val: {
2822
- type: S.argument,
2823
- // value does not include the opening and closing braces.
2824
- value: i,
2825
- location: T(n, this.clonePosition())
2826
- },
2827
- err: null
2828
- };
2829
- case 44:
2830
- return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(_.EXPECT_ARGUMENT_CLOSING_BRACE, T(n, this.clonePosition())) : this.parseArgumentOptions(t, r, i, n);
2831
- default:
2832
- return this.error(_.MALFORMED_ARGUMENT, T(n, this.clonePosition()));
2833
- }
2834
- }, e.prototype.parseIdentifierIfPossible = function() {
2835
- var t = this.clonePosition(), r = this.offset(), n = Ut(this.message, r), i = r + n.length;
2836
- this.bumpTo(i);
2837
- var a = this.clonePosition(), o = T(t, a);
2838
- return { value: n, location: o };
2839
- }, e.prototype.parseArgumentOptions = function(t, r, n, i) {
2840
- var a, o = this.clonePosition(), s = this.parseIdentifierIfPossible().value, c = this.clonePosition();
2841
- switch (s) {
2842
- case "":
2843
- return this.error(_.EXPECT_ARGUMENT_TYPE, T(o, c));
2844
- case "number":
2845
- case "date":
2846
- case "time": {
2847
- this.bumpSpace();
2848
- var l = null;
2849
- if (this.bumpIf(",")) {
2850
- this.bumpSpace();
2851
- var u = this.clonePosition(), h = this.parseSimpleArgStyleIfPossible();
2852
- if (h.err)
2853
- return h;
2854
- var d = Ei(h.val);
2855
- if (d.length === 0)
2856
- return this.error(_.EXPECT_ARGUMENT_STYLE, T(this.clonePosition(), this.clonePosition()));
2857
- var b = T(u, this.clonePosition());
2858
- l = { style: d, styleLocation: b };
2859
- }
2860
- var v = this.tryParseArgumentClose(i);
2861
- if (v.err)
2862
- return v;
2863
- var P = T(i, this.clonePosition());
2864
- if (l && sr(l == null ? void 0 : l.style, "::", 0)) {
2865
- var F = xi(l.style.slice(2));
2866
- if (s === "number") {
2867
- var h = this.parseNumberSkeletonFromString(F, l.styleLocation);
2868
- return h.err ? h : {
2869
- val: { type: S.number, value: n, location: P, style: h.val },
2870
- err: null
2871
- };
2872
- } else {
2873
- if (F.length === 0)
2874
- return this.error(_.EXPECT_DATE_TIME_SKELETON, P);
2875
- var I = F;
2876
- this.locale && (I = si(F, this.locale));
2877
- var d = {
2878
- type: ke.dateTime,
2879
- pattern: I,
2880
- location: l.styleLocation,
2881
- parsedOptions: this.shouldParseSkeletons ? ei(I) : {}
2882
- }, D = s === "date" ? S.date : S.time;
2883
- return {
2884
- val: { type: D, value: n, location: P, style: d },
2885
- err: null
2886
- };
2887
- }
2888
- }
2889
- return {
2890
- val: {
2891
- type: s === "number" ? S.number : s === "date" ? S.date : S.time,
2892
- value: n,
2893
- location: P,
2894
- style: (a = l == null ? void 0 : l.style) !== null && a !== void 0 ? a : null
2895
- },
2896
- err: null
2897
- };
2898
- }
2899
- case "plural":
2900
- case "selectordinal":
2901
- case "select": {
2902
- var U = this.clonePosition();
2903
- if (this.bumpSpace(), !this.bumpIf(","))
2904
- return this.error(_.EXPECT_SELECT_ARGUMENT_OPTIONS, T(U, dt({}, U)));
2905
- this.bumpSpace();
2906
- var C = this.parseIdentifierIfPossible(), O = 0;
2907
- if (s !== "select" && C.value === "offset") {
2908
- if (!this.bumpIf(":"))
2909
- return this.error(_.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, T(this.clonePosition(), this.clonePosition()));
2910
- this.bumpSpace();
2911
- var h = this.tryParseDecimalInteger(_.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, _.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
2912
- if (h.err)
2913
- return h;
2914
- this.bumpSpace(), C = this.parseIdentifierIfPossible(), O = h.val;
2915
- }
2916
- var q = this.tryParsePluralOrSelectOptions(t, s, r, C);
2917
- if (q.err)
2918
- return q;
2919
- var v = this.tryParseArgumentClose(i);
2920
- if (v.err)
2921
- return v;
2922
- var re = T(i, this.clonePosition());
2923
- return s === "select" ? {
2924
- val: {
2925
- type: S.select,
2926
- value: n,
2927
- options: ur(q.val),
2928
- location: re
2929
- },
2930
- err: null
2931
- } : {
2932
- val: {
2933
- type: S.plural,
2934
- value: n,
2935
- options: ur(q.val),
2936
- offset: O,
2937
- pluralType: s === "plural" ? "cardinal" : "ordinal",
2938
- location: re
2939
- },
2940
- err: null
2941
- };
2942
- }
2943
- default:
2944
- return this.error(_.INVALID_ARGUMENT_TYPE, T(o, c));
2945
- }
2946
- }, e.prototype.tryParseArgumentClose = function(t) {
2947
- return this.isEOF() || this.char() !== 125 ? this.error(_.EXPECT_ARGUMENT_CLOSING_BRACE, T(t, this.clonePosition())) : (this.bump(), { val: !0, err: null });
2948
- }, e.prototype.parseSimpleArgStyleIfPossible = function() {
2949
- for (var t = 0, r = this.clonePosition(); !this.isEOF(); ) {
2950
- var n = this.char();
2951
- switch (n) {
2952
- case 39: {
2953
- this.bump();
2954
- var i = this.clonePosition();
2955
- if (!this.bumpUntil("'"))
2956
- return this.error(_.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, T(i, this.clonePosition()));
2957
- this.bump();
2958
- break;
2959
- }
2960
- case 123: {
2961
- t += 1, this.bump();
2962
- break;
2963
- }
2964
- case 125: {
2965
- if (t > 0)
2966
- t -= 1;
2967
- else
2968
- return {
2969
- val: this.message.slice(r.offset, this.offset()),
2970
- err: null
2971
- };
2972
- break;
2973
- }
2974
- default:
2975
- this.bump();
2976
- break;
2977
- }
2978
- }
2979
- return {
2980
- val: this.message.slice(r.offset, this.offset()),
2981
- err: null
2982
- };
2983
- }, e.prototype.parseNumberSkeletonFromString = function(t, r) {
2984
- var n = [];
2985
- try {
2986
- n = ri(t);
2987
- } catch (i) {
2988
- return this.error(_.INVALID_NUMBER_SKELETON, r);
2989
- }
2990
- return {
2991
- val: {
2992
- type: ke.number,
2993
- tokens: n,
2994
- location: r,
2995
- parsedOptions: this.shouldParseSkeletons ? oi(n) : {}
2996
- },
2997
- err: null
2998
- };
2999
- }, e.prototype.tryParsePluralOrSelectOptions = function(t, r, n, i) {
3000
- for (var a, o = !1, s = [], c = /* @__PURE__ */ new Set(), l = i.value, u = i.location; ; ) {
3001
- if (l.length === 0) {
3002
- var h = this.clonePosition();
3003
- if (r !== "select" && this.bumpIf("=")) {
3004
- var d = this.tryParseDecimalInteger(_.EXPECT_PLURAL_ARGUMENT_SELECTOR, _.INVALID_PLURAL_ARGUMENT_SELECTOR);
3005
- if (d.err)
3006
- return d;
3007
- u = T(h, this.clonePosition()), l = this.message.slice(h.offset, this.offset());
3008
- } else
3009
- break;
3010
- }
3011
- if (c.has(l))
3012
- return this.error(r === "select" ? _.DUPLICATE_SELECT_ARGUMENT_SELECTOR : _.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, u);
3013
- l === "other" && (o = !0), this.bumpSpace();
3014
- var b = this.clonePosition();
3015
- if (!this.bumpIf("{"))
3016
- return this.error(r === "select" ? _.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : _.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, T(this.clonePosition(), this.clonePosition()));
3017
- var v = this.parseMessage(t + 1, r, n);
3018
- if (v.err)
3019
- return v;
3020
- var P = this.tryParseArgumentClose(b);
3021
- if (P.err)
3022
- return P;
3023
- s.push([
3024
- l,
3025
- {
3026
- value: v.val,
3027
- location: T(b, this.clonePosition())
3028
- }
3029
- ]), c.add(l), this.bumpSpace(), a = this.parseIdentifierIfPossible(), l = a.value, u = a.location;
3030
- }
3031
- return s.length === 0 ? this.error(r === "select" ? _.EXPECT_SELECT_ARGUMENT_SELECTOR : _.EXPECT_PLURAL_ARGUMENT_SELECTOR, T(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !o ? this.error(_.MISSING_OTHER_CLAUSE, T(this.clonePosition(), this.clonePosition())) : { val: s, err: null };
3032
- }, e.prototype.tryParseDecimalInteger = function(t, r) {
3033
- var n = 1, i = this.clonePosition();
3034
- this.bumpIf("+") || this.bumpIf("-") && (n = -1);
3035
- for (var a = !1, o = 0; !this.isEOF(); ) {
3036
- var s = this.char();
3037
- if (s >= 48 && s <= 57)
3038
- a = !0, o = o * 10 + (s - 48), this.bump();
3039
- else
3040
- break;
3041
- }
3042
- var c = T(i, this.clonePosition());
3043
- return a ? (o *= n, yi(o) ? { val: o, err: null } : this.error(r, c)) : this.error(t, c);
3044
- }, e.prototype.offset = function() {
3045
- return this.position.offset;
3046
- }, e.prototype.isEOF = function() {
3047
- return this.offset() === this.message.length;
3048
- }, e.prototype.clonePosition = function() {
3049
- return {
3050
- offset: this.position.offset,
3051
- line: this.position.line,
3052
- column: this.position.column
3053
- };
3054
- }, e.prototype.char = function() {
3055
- var t = this.position.offset;
3056
- if (t >= this.message.length)
3057
- throw Error("out of bound");
3058
- var r = Vr(this.message, t);
3059
- if (r === void 0)
3060
- throw Error("Offset ".concat(t, " is at invalid UTF-16 code unit boundary"));
3061
- return r;
3062
- }, e.prototype.error = function(t, r) {
3063
- return {
3064
- val: null,
3065
- err: {
3066
- kind: t,
3067
- message: this.message,
3068
- location: r
3069
- }
3070
- };
3071
- }, e.prototype.bump = function() {
3072
- if (!this.isEOF()) {
3073
- var t = this.char();
3074
- t === 10 ? (this.position.line += 1, this.position.column = 1, this.position.offset += 1) : (this.position.column += 1, this.position.offset += t < 65536 ? 1 : 2);
3075
- }
3076
- }, e.prototype.bumpIf = function(t) {
3077
- if (sr(this.message, t, this.offset())) {
3078
- for (var r = 0; r < t.length; r++)
3079
- this.bump();
3080
- return !0;
3081
- }
3082
- return !1;
3083
- }, e.prototype.bumpUntil = function(t) {
3084
- var r = this.offset(), n = this.message.indexOf(t, r);
3085
- return n >= 0 ? (this.bumpTo(n), !0) : (this.bumpTo(this.message.length), !1);
3086
- }, e.prototype.bumpTo = function(t) {
3087
- if (this.offset() > t)
3088
- throw Error("targetOffset ".concat(t, " must be greater than or equal to the current offset ").concat(this.offset()));
3089
- for (t = Math.min(t, this.message.length); ; ) {
3090
- var r = this.offset();
3091
- if (r === t)
3092
- break;
3093
- if (r > t)
3094
- throw Error("targetOffset ".concat(t, " is at invalid UTF-16 code unit boundary"));
3095
- if (this.bump(), this.isEOF())
3096
- break;
3097
- }
3098
- }, e.prototype.bumpSpace = function() {
3099
- for (; !this.isEOF() && Xr(this.char()); )
3100
- this.bump();
3101
- }, e.prototype.peek = function() {
3102
- if (this.isEOF())
3103
- return null;
3104
- var t = this.char(), r = this.offset(), n = this.message.charCodeAt(r + (t >= 65536 ? 2 : 1));
3105
- return n != null ? n : null;
3106
- }, e;
3107
- }()
3108
- );
3109
- function Ft(e) {
3110
- return e >= 97 && e <= 122 || e >= 65 && e <= 90;
3111
- }
3112
- function wi(e) {
3113
- return Ft(e) || e === 47;
3114
- }
3115
- function Ti(e) {
3116
- return e === 45 || e === 46 || e >= 48 && e <= 57 || e === 95 || e >= 97 && e <= 122 || e >= 65 && e <= 90 || e == 183 || e >= 192 && e <= 214 || e >= 216 && e <= 246 || e >= 248 && e <= 893 || e >= 895 && e <= 8191 || e >= 8204 && e <= 8205 || e >= 8255 && e <= 8256 || e >= 8304 && e <= 8591 || e >= 11264 && e <= 12271 || e >= 12289 && e <= 55295 || e >= 63744 && e <= 64975 || e >= 65008 && e <= 65533 || e >= 65536 && e <= 983039;
3117
- }
3118
- function Xr(e) {
3119
- return e >= 9 && e <= 13 || e === 32 || e === 133 || e >= 8206 && e <= 8207 || e === 8232 || e === 8233;
3120
- }
3121
- function Hi(e) {
3122
- return e >= 33 && e <= 35 || e === 36 || e >= 37 && e <= 39 || e === 40 || e === 41 || e === 42 || e === 43 || e === 44 || e === 45 || e >= 46 && e <= 47 || e >= 58 && e <= 59 || e >= 60 && e <= 62 || e >= 63 && e <= 64 || e === 91 || e === 92 || e === 93 || e === 94 || e === 96 || e === 123 || e === 124 || e === 125 || e === 126 || e === 161 || e >= 162 && e <= 165 || e === 166 || e === 167 || e === 169 || e === 171 || e === 172 || e === 174 || e === 176 || e === 177 || e === 182 || e === 187 || e === 191 || e === 215 || e === 247 || e >= 8208 && e <= 8213 || e >= 8214 && e <= 8215 || e === 8216 || e === 8217 || e === 8218 || e >= 8219 && e <= 8220 || e === 8221 || e === 8222 || e === 8223 || e >= 8224 && e <= 8231 || e >= 8240 && e <= 8248 || e === 8249 || e === 8250 || e >= 8251 && e <= 8254 || e >= 8257 && e <= 8259 || e === 8260 || e === 8261 || e === 8262 || e >= 8263 && e <= 8273 || e === 8274 || e === 8275 || e >= 8277 && e <= 8286 || e >= 8592 && e <= 8596 || e >= 8597 && e <= 8601 || e >= 8602 && e <= 8603 || e >= 8604 && e <= 8607 || e === 8608 || e >= 8609 && e <= 8610 || e === 8611 || e >= 8612 && e <= 8613 || e === 8614 || e >= 8615 && e <= 8621 || e === 8622 || e >= 8623 && e <= 8653 || e >= 8654 && e <= 8655 || e >= 8656 && e <= 8657 || e === 8658 || e === 8659 || e === 8660 || e >= 8661 && e <= 8691 || e >= 8692 && e <= 8959 || e >= 8960 && e <= 8967 || e === 8968 || e === 8969 || e === 8970 || e === 8971 || e >= 8972 && e <= 8991 || e >= 8992 && e <= 8993 || e >= 8994 && e <= 9e3 || e === 9001 || e === 9002 || e >= 9003 && e <= 9083 || e === 9084 || e >= 9085 && e <= 9114 || e >= 9115 && e <= 9139 || e >= 9140 && e <= 9179 || e >= 9180 && e <= 9185 || e >= 9186 && e <= 9254 || e >= 9255 && e <= 9279 || e >= 9280 && e <= 9290 || e >= 9291 && e <= 9311 || e >= 9472 && e <= 9654 || e === 9655 || e >= 9656 && e <= 9664 || e === 9665 || e >= 9666 && e <= 9719 || e >= 9720 && e <= 9727 || e >= 9728 && e <= 9838 || e === 9839 || e >= 9840 && e <= 10087 || e === 10088 || e === 10089 || e === 10090 || e === 10091 || e === 10092 || e === 10093 || e === 10094 || e === 10095 || e === 10096 || e === 10097 || e === 10098 || e === 10099 || e === 10100 || e === 10101 || e >= 10132 && e <= 10175 || e >= 10176 && e <= 10180 || e === 10181 || e === 10182 || e >= 10183 && e <= 10213 || e === 10214 || e === 10215 || e === 10216 || e === 10217 || e === 10218 || e === 10219 || e === 10220 || e === 10221 || e === 10222 || e === 10223 || e >= 10224 && e <= 10239 || e >= 10240 && e <= 10495 || e >= 10496 && e <= 10626 || e === 10627 || e === 10628 || e === 10629 || e === 10630 || e === 10631 || e === 10632 || e === 10633 || e === 10634 || e === 10635 || e === 10636 || e === 10637 || e === 10638 || e === 10639 || e === 10640 || e === 10641 || e === 10642 || e === 10643 || e === 10644 || e === 10645 || e === 10646 || e === 10647 || e === 10648 || e >= 10649 && e <= 10711 || e === 10712 || e === 10713 || e === 10714 || e === 10715 || e >= 10716 && e <= 10747 || e === 10748 || e === 10749 || e >= 10750 && e <= 11007 || e >= 11008 && e <= 11055 || e >= 11056 && e <= 11076 || e >= 11077 && e <= 11078 || e >= 11079 && e <= 11084 || e >= 11085 && e <= 11123 || e >= 11124 && e <= 11125 || e >= 11126 && e <= 11157 || e === 11158 || e >= 11159 && e <= 11263 || e >= 11776 && e <= 11777 || e === 11778 || e === 11779 || e === 11780 || e === 11781 || e >= 11782 && e <= 11784 || e === 11785 || e === 11786 || e === 11787 || e === 11788 || e === 11789 || e >= 11790 && e <= 11798 || e === 11799 || e >= 11800 && e <= 11801 || e === 11802 || e === 11803 || e === 11804 || e === 11805 || e >= 11806 && e <= 11807 || e === 11808 || e === 11809 || e === 11810 || e === 11811 || e === 11812 || e === 11813 || e === 11814 || e === 11815 || e === 11816 || e === 11817 || e >= 11818 && e <= 11822 || e === 11823 || e >= 11824 && e <= 11833 || e >= 11834 && e <= 11835 || e >= 11836 && e <= 11839 || e === 11840 || e === 11841 || e === 11842 || e >= 11843 && e <= 11855 || e >= 11856 && e <= 11857 || e === 11858 || e >= 11859 && e <= 11903 || e >= 12289 && e <= 12291 || e === 12296 || e === 12297 || e === 12298 || e === 12299 || e === 12300 || e === 12301 || e === 12302 || e === 12303 || e === 12304 || e === 12305 || e >= 12306 && e <= 12307 || e === 12308 || e === 12309 || e === 12310 || e === 12311 || e === 12312 || e === 12313 || e === 12314 || e === 12315 || e === 12316 || e === 12317 || e >= 12318 && e <= 12319 || e === 12320 || e === 12336 || e === 64830 || e === 64831 || e >= 65093 && e <= 65094;
3123
- }
3124
- function Gt(e) {
3125
- e.forEach(function(t) {
3126
- if (delete t.location, Rr(t) || Dr(t))
3127
- for (var r in t.options)
3128
- delete t.options[r].location, Gt(t.options[r].value);
3129
- else
3130
- Or(t) && Fr(t.style) || (Lr(t) || Mr(t)) && Mt(t.style) ? delete t.style.location : Ur(t) && Gt(t.children);
3131
- });
3132
- }
3133
- function Ai(e, t) {
3134
- t === void 0 && (t = {}), t = dt({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
3135
- var r = new _i(e, t).parse();
3136
- if (r.err) {
3137
- var n = SyntaxError(_[r.err.kind]);
3138
- throw n.location = r.err.location, n.originalMessage = r.err.message, n;
3139
- }
3140
- return t != null && t.captureLocation || Gt(r.val), r.val;
3141
- }
3142
- var je;
3143
- (function(e) {
3144
- e.MISSING_VALUE = "MISSING_VALUE", e.INVALID_VALUE = "INVALID_VALUE", e.MISSING_INTL_API = "MISSING_INTL_API";
3145
- })(je || (je = {}));
3146
- var xt = (
3147
- /** @class */
3148
- function(e) {
3149
- vt(t, e);
3150
- function t(r, n, i) {
3151
- var a = e.call(this, r) || this;
3152
- return a.code = n, a.originalMessage = i, a;
3153
- }
3154
- return t.prototype.toString = function() {
3155
- return "[formatjs Error: ".concat(this.code, "] ").concat(this.message);
3156
- }, t;
3157
- }(Error)
3158
- ), cr = (
3159
- /** @class */
3160
- function(e) {
3161
- vt(t, e);
3162
- function t(r, n, i, a) {
3163
- return e.call(this, 'Invalid values for "'.concat(r, '": "').concat(n, '". Options are "').concat(Object.keys(i).join('", "'), '"'), je.INVALID_VALUE, a) || this;
3164
- }
3165
- return t;
3166
- }(xt)
3167
- ), Bi = (
3168
- /** @class */
3169
- function(e) {
3170
- vt(t, e);
3171
- function t(r, n, i) {
3172
- return e.call(this, 'Value for "'.concat(r, '" must be of type ').concat(n), je.INVALID_VALUE, i) || this;
3173
- }
3174
- return t;
3175
- }(xt)
3176
- ), Si = (
3177
- /** @class */
3178
- function(e) {
3179
- vt(t, e);
3180
- function t(r, n) {
3181
- return e.call(this, 'The intl string context variable "'.concat(r, '" was not provided to the string "').concat(n, '"'), je.MISSING_VALUE, n) || this;
3182
- }
3183
- return t;
3184
- }(xt)
3185
- ), X;
3186
- (function(e) {
3187
- e[e.literal = 0] = "literal", e[e.object = 1] = "object";
3188
- })(X || (X = {}));
3189
- function Ci(e) {
3190
- return e.length < 2 ? e : e.reduce(function(t, r) {
3191
- var n = t[t.length - 1];
3192
- return !n || n.type !== X.literal || r.type !== X.literal ? t.push(r) : n.value += r.value, t;
3193
- }, []);
3194
- }
3195
- function Pi(e) {
3196
- return typeof e == "function";
3197
- }
3198
- function ht(e, t, r, n, i, a, o) {
3199
- if (e.length === 1 && nr(e[0]))
3200
- return [
3201
- {
3202
- type: X.literal,
3203
- value: e[0].value
3204
- }
3205
- ];
3206
- for (var s = [], c = 0, l = e; c < l.length; c++) {
3207
- var u = l[c];
3208
- if (nr(u)) {
3209
- s.push({
3210
- type: X.literal,
3211
- value: u.value
3212
- });
3213
- continue;
3214
- }
3215
- if (Yn(u)) {
3216
- typeof a == "number" && s.push({
3217
- type: X.literal,
3218
- value: r.getNumberFormat(t).format(a)
3219
- });
3220
- continue;
3221
- }
3222
- var h = u.value;
3223
- if (!(i && h in i))
3224
- throw new Si(h, o);
3225
- var d = i[h];
3226
- if (Qn(u)) {
3227
- (!d || typeof d == "string" || typeof d == "number") && (d = typeof d == "string" || typeof d == "number" ? String(d) : ""), s.push({
3228
- type: typeof d == "string" ? X.literal : X.object,
3229
- value: d
3230
- });
3231
- continue;
3232
- }
3233
- if (Lr(u)) {
3234
- var b = typeof u.style == "string" ? n.date[u.style] : Mt(u.style) ? u.style.parsedOptions : void 0;
3235
- s.push({
3236
- type: X.literal,
3237
- value: r.getDateTimeFormat(t, b).format(d)
3238
- });
3239
- continue;
3240
- }
3241
- if (Mr(u)) {
3242
- var b = typeof u.style == "string" ? n.time[u.style] : Mt(u.style) ? u.style.parsedOptions : n.time.medium;
3243
- s.push({
3244
- type: X.literal,
3245
- value: r.getDateTimeFormat(t, b).format(d)
3246
- });
3247
- continue;
3248
- }
3249
- if (Or(u)) {
3250
- var b = typeof u.style == "string" ? n.number[u.style] : Fr(u.style) ? u.style.parsedOptions : void 0;
3251
- b && b.scale && (d = d * (b.scale || 1)), s.push({
3252
- type: X.literal,
3253
- value: r.getNumberFormat(t, b).format(d)
3254
- });
3255
- continue;
3256
- }
3257
- if (Ur(u)) {
3258
- var v = u.children, P = u.value, F = i[P];
3259
- if (!Pi(F))
3260
- throw new Bi(P, "function", o);
3261
- var I = ht(v, t, r, n, i, a), D = F(I.map(function(O) {
3262
- return O.value;
3263
- }));
3264
- Array.isArray(D) || (D = [D]), s.push.apply(s, D.map(function(O) {
3265
- return {
3266
- type: typeof O == "string" ? X.literal : X.object,
3267
- value: O
3268
- };
3269
- }));
3270
- }
3271
- if (Rr(u)) {
3272
- var U = u.options[d] || u.options.other;
3273
- if (!U)
3274
- throw new cr(u.value, d, Object.keys(u.options), o);
3275
- s.push.apply(s, ht(U.value, t, r, n, i));
3276
- continue;
3277
- }
3278
- if (Dr(u)) {
3279
- var U = u.options["=".concat(d)];
3280
- if (!U) {
3281
- if (!Intl.PluralRules)
3282
- throw new xt(`Intl.PluralRules is not available in this environment.
3283
- Try polyfilling it using "@formatjs/intl-pluralrules"
3284
- `, je.MISSING_INTL_API, o);
3285
- var C = r.getPluralRules(t, { type: u.pluralType }).select(d - (u.offset || 0));
3286
- U = u.options[C] || u.options.other;
3287
- }
3288
- if (!U)
3289
- throw new cr(u.value, d, Object.keys(u.options), o);
3290
- s.push.apply(s, ht(U.value, t, r, n, i, d - (u.offset || 0)));
3291
- continue;
3292
- }
3293
- }
3294
- return Ci(s);
3295
- }
3296
- function Ii(e, t) {
3297
- return t ? he(he(he({}, e || {}), t || {}), Object.keys(e).reduce(function(r, n) {
3298
- return r[n] = he(he({}, e[n]), t[n] || {}), r;
3299
- }, {})) : e;
3300
- }
3301
- function Ni(e, t) {
3302
- return t ? Object.keys(e).reduce(function(r, n) {
3303
- return r[n] = Ii(e[n], t[n]), r;
3304
- }, he({}, e)) : e;
3305
- }
3306
- function It(e) {
3307
- return {
3308
- create: function() {
3309
- return {
3310
- get: function(t) {
3311
- return e[t];
3312
- },
3313
- set: function(t, r) {
3314
- e[t] = r;
3315
- }
3316
- };
3317
- }
3318
- };
3319
- }
3320
- function Oi(e) {
3321
- return e === void 0 && (e = {
3322
- number: {},
3323
- dateTime: {},
3324
- pluralRules: {}
3325
- }), {
3326
- getNumberFormat: St(function() {
3327
- for (var t, r = [], n = 0; n < arguments.length; n++)
3328
- r[n] = arguments[n];
3329
- return new ((t = Intl.NumberFormat).bind.apply(t, Bt([void 0], r, !1)))();
3330
- }, {
3331
- cache: It(e.number),
3332
- strategy: Ct.variadic
3333
- }),
3334
- getDateTimeFormat: St(function() {
3335
- for (var t, r = [], n = 0; n < arguments.length; n++)
3336
- r[n] = arguments[n];
3337
- return new ((t = Intl.DateTimeFormat).bind.apply(t, Bt([void 0], r, !1)))();
3338
- }, {
3339
- cache: It(e.dateTime),
3340
- strategy: Ct.variadic
3341
- }),
3342
- getPluralRules: St(function() {
3343
- for (var t, r = [], n = 0; n < arguments.length; n++)
3344
- r[n] = arguments[n];
3345
- return new ((t = Intl.PluralRules).bind.apply(t, Bt([void 0], r, !1)))();
3346
- }, {
3347
- cache: It(e.pluralRules),
3348
- strategy: Ct.variadic
3349
- })
3350
- };
3351
- }
3352
- var Li = (
3353
- /** @class */
3354
- function() {
3355
- function e(t, r, n, i) {
3356
- r === void 0 && (r = e.defaultLocale);
3357
- var a = this;
3358
- if (this.formatterCache = {
3359
- number: {},
3360
- dateTime: {},
3361
- pluralRules: {}
3362
- }, this.format = function(c) {
3363
- var l = a.formatToParts(c);
3364
- if (l.length === 1)
3365
- return l[0].value;
3366
- var u = l.reduce(function(h, d) {
3367
- return !h.length || d.type !== X.literal || typeof h[h.length - 1] != "string" ? h.push(d.value) : h[h.length - 1] += d.value, h;
3368
- }, []);
3369
- return u.length <= 1 ? u[0] || "" : u;
3370
- }, this.formatToParts = function(c) {
3371
- return ht(a.ast, a.locales, a.formatters, a.formats, c, void 0, a.message);
3372
- }, this.resolvedOptions = function() {
3373
- var c;
3374
- return {
3375
- locale: ((c = a.resolvedLocale) === null || c === void 0 ? void 0 : c.toString()) || Intl.NumberFormat.supportedLocalesOf(a.locales)[0]
3376
- };
3377
- }, this.getAst = function() {
3378
- return a.ast;
3379
- }, this.locales = r, this.resolvedLocale = e.resolveLocale(r), typeof t == "string") {
3380
- if (this.message = t, !e.__parse)
3381
- throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
3382
- var o = i || {};
3383
- o.formatters;
3384
- var s = $n(o, ["formatters"]);
3385
- this.ast = e.__parse(t, he(he({}, s), { locale: this.resolvedLocale }));
3386
- } else
3387
- this.ast = t;
3388
- if (!Array.isArray(this.ast))
3389
- throw new TypeError("A message must be provided as a String or AST.");
3390
- this.formats = Ni(e.formats, n), this.formatters = i && i.formatters || Oi(this.formatterCache);
3391
- }
3392
- return Object.defineProperty(e, "defaultLocale", {
3393
- get: function() {
3394
- return e.memoizedDefaultLocale || (e.memoizedDefaultLocale = new Intl.NumberFormat().resolvedOptions().locale), e.memoizedDefaultLocale;
3395
- },
3396
- enumerable: !1,
3397
- configurable: !0
3398
- }), e.memoizedDefaultLocale = null, e.resolveLocale = function(t) {
3399
- if (typeof Intl.Locale != "undefined") {
3400
- var r = Intl.NumberFormat.supportedLocalesOf(t);
3401
- return r.length > 0 ? new Intl.Locale(r[0]) : new Intl.Locale(typeof t == "string" ? t : t[0]);
3402
- }
3403
- }, e.__parse = Ai, e.formats = {
3404
- number: {
3405
- integer: {
3406
- maximumFractionDigits: 0
3407
- },
3408
- currency: {
3409
- style: "currency"
3410
- },
3411
- percent: {
3412
- style: "percent"
3413
- }
3414
- },
3415
- date: {
3416
- short: {
3417
- month: "numeric",
3418
- day: "numeric",
3419
- year: "2-digit"
3420
- },
3421
- medium: {
3422
- month: "short",
3423
- day: "numeric",
3424
- year: "numeric"
3425
- },
3426
- long: {
3427
- month: "long",
3428
- day: "numeric",
3429
- year: "numeric"
3430
- },
3431
- full: {
3432
- weekday: "long",
3433
- month: "long",
3434
- day: "numeric",
3435
- year: "numeric"
3436
- }
3437
- },
3438
- time: {
3439
- short: {
3440
- hour: "numeric",
3441
- minute: "numeric"
3442
- },
3443
- medium: {
3444
- hour: "numeric",
3445
- minute: "numeric",
3446
- second: "numeric"
3447
- },
3448
- long: {
3449
- hour: "numeric",
3450
- minute: "numeric",
3451
- second: "numeric",
3452
- timeZoneName: "short"
3453
- },
3454
- full: {
3455
- hour: "numeric",
3456
- minute: "numeric",
3457
- second: "numeric",
3458
- timeZoneName: "short"
3459
- }
3460
- }
3461
- }, e;
3462
- }()
3463
- );
3464
- function Mi(e, t) {
3465
- if (t == null)
3466
- return;
3467
- if (t in e)
3468
- return e[t];
3469
- const r = t.split(".");
3470
- let n = e;
3471
- for (let i = 0; i < r.length; i++)
3472
- if (typeof n == "object") {
3473
- if (i > 0) {
3474
- const a = r.slice(i, r.length).join(".");
3475
- if (a in n) {
3476
- n = n[a];
3477
- break;
3478
- }
3479
- }
3480
- n = n[r[i]];
3481
- } else
3482
- n = void 0;
3483
- return n;
3484
- }
3485
- const _e = {}, Ri = (e, t, r) => r && (t in _e || (_e[t] = {}), e in _e[t] || (_e[t][e] = r), r), Wr = (e, t) => {
3486
- if (t == null)
3487
- return;
3488
- if (t in _e && e in _e[t])
3489
- return _e[t][e];
3490
- const r = Et(t);
3491
- for (let n = 0; n < r.length; n++) {
3492
- const i = r[n], a = Ui(i, e);
3493
- if (a)
3494
- return Ri(e, t, a);
3495
- }
3496
- };
3497
- let zt;
3498
- const ze = yt({});
3499
- function Di(e) {
3500
- return zt[e] || null;
3501
- }
3502
- function Zr(e) {
3503
- return e in zt;
3504
- }
3505
- function Ui(e, t) {
3506
- if (!Zr(e))
3507
- return null;
3508
- const r = Di(e);
3509
- return Mi(r, t);
3510
- }
3511
- function Fi(e) {
3512
- if (e == null)
3513
- return;
3514
- const t = Et(e);
3515
- for (let r = 0; r < t.length; r++) {
3516
- const n = t[r];
3517
- if (Zr(n))
3518
- return n;
3519
- }
3520
- }
3521
- function qr(e, ...t) {
3522
- delete _e[e], ze.update((r) => (r[e] = jn.all([r[e] || {}, ...t]), r));
3523
- }
3524
- Ve(
3525
- [ze],
3526
- ([e]) => Object.keys(e)
3527
- );
3528
- ze.subscribe((e) => zt = e);
3529
- const ft = {};
3530
- function Gi(e, t) {
3531
- ft[e].delete(t), ft[e].size === 0 && delete ft[e];
3532
- }
3533
- function Jr(e) {
3534
- return ft[e];
3535
- }
3536
- function ki(e) {
3537
- return Et(e).map((t) => {
3538
- const r = Jr(t);
3539
- return [t, r ? [...r] : []];
3540
- }).filter(([, t]) => t.length > 0);
3541
- }
3542
- function kt(e) {
3543
- return e == null ? !1 : Et(e).some(
3544
- (t) => {
3545
- var r;
3546
- return (r = Jr(t)) == null ? void 0 : r.size;
3547
- }
3548
- );
3549
- }
3550
- function ji(e, t) {
3551
- return Promise.all(
3552
- t.map((n) => (Gi(e, n), n().then((i) => i.default || i)))
3553
- ).then((n) => qr(e, ...n));
3554
- }
3555
- const Ke = {};
3556
- function Qr(e) {
3557
- if (!kt(e))
3558
- return e in Ke ? Ke[e] : Promise.resolve();
3559
- const t = ki(e);
3560
- return Ke[e] = Promise.all(
3561
- t.map(
3562
- ([r, n]) => ji(r, n)
3563
- )
3564
- ).then(() => {
3565
- if (kt(e))
3566
- return Qr(e);
3567
- delete Ke[e];
3568
- }), Ke[e];
3569
- }
3570
- const $i = {
3571
- number: {
3572
- scientific: { notation: "scientific" },
3573
- engineering: { notation: "engineering" },
3574
- compactLong: { notation: "compact", compactDisplay: "long" },
3575
- compactShort: { notation: "compact", compactDisplay: "short" }
3576
- },
3577
- date: {
3578
- short: { month: "numeric", day: "numeric", year: "2-digit" },
3579
- medium: { month: "short", day: "numeric", year: "numeric" },
3580
- long: { month: "long", day: "numeric", year: "numeric" },
3581
- full: { weekday: "long", month: "long", day: "numeric", year: "numeric" }
3582
- },
3583
- time: {
3584
- short: { hour: "numeric", minute: "numeric" },
3585
- medium: { hour: "numeric", minute: "numeric", second: "numeric" },
3586
- long: {
3587
- hour: "numeric",
3588
- minute: "numeric",
3589
- second: "numeric",
3590
- timeZoneName: "short"
3591
- },
3592
- full: {
3593
- hour: "numeric",
3594
- minute: "numeric",
3595
- second: "numeric",
3596
- timeZoneName: "short"
3597
- }
3598
- }
3599
- }, Vi = {
3600
- fallbackLocale: null,
3601
- loadingDelay: 200,
3602
- formats: $i,
3603
- warnOnMissingMessages: !0,
3604
- handleMissingMessage: void 0,
3605
- ignoreTag: !0
3606
- }, zi = Vi;
3607
- function $e() {
3608
- return zi;
3609
- }
3610
- const Nt = yt(!1);
3611
- var Xi = Object.defineProperty, Wi = Object.defineProperties, Zi = Object.getOwnPropertyDescriptors, hr = Object.getOwnPropertySymbols, qi = Object.prototype.hasOwnProperty, Ji = Object.prototype.propertyIsEnumerable, fr = (e, t, r) => t in e ? Xi(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Qi = (e, t) => {
3612
- for (var r in t || (t = {}))
3613
- qi.call(t, r) && fr(e, r, t[r]);
3614
- if (hr)
3615
- for (var r of hr(t))
3616
- Ji.call(t, r) && fr(e, r, t[r]);
3617
- return e;
3618
- }, Yi = (e, t) => Wi(e, Zi(t));
3619
- let jt;
3620
- const gt = yt(null);
3621
- function pr(e) {
3622
- return e.split("-").map((t, r, n) => n.slice(0, r + 1).join("-")).reverse();
3623
- }
3624
- function Et(e, t = $e().fallbackLocale) {
3625
- const r = pr(e);
3626
- return t ? [.../* @__PURE__ */ new Set([...r, ...pr(t)])] : r;
3627
- }
3628
- function Be() {
3629
- return jt != null ? jt : void 0;
3630
- }
3631
- gt.subscribe((e) => {
3632
- jt = e != null ? e : void 0, typeof window != "undefined" && e != null && document.documentElement.setAttribute("lang", e);
3633
- });
3634
- const Ki = (e) => {
3635
- if (e && Fi(e) && kt(e)) {
3636
- const { loadingDelay: t } = $e();
3637
- let r;
3638
- return typeof window != "undefined" && Be() != null && t ? r = window.setTimeout(
3639
- () => Nt.set(!0),
3640
- t
3641
- ) : Nt.set(!0), Qr(e).then(() => {
3642
- gt.set(e);
3643
- }).finally(() => {
3644
- clearTimeout(r), Nt.set(!1);
3645
- });
3646
- }
3647
- return gt.set(e);
3648
- }, we = Yi(Qi({}, gt), {
3649
- set: Ki
3650
- }), _t = (e) => {
3651
- const t = /* @__PURE__ */ Object.create(null);
3652
- return (n) => {
3653
- const i = JSON.stringify(n);
3654
- return i in t ? t[i] : t[i] = e(n);
3655
- };
3656
- };
3657
- var ea = Object.defineProperty, bt = Object.getOwnPropertySymbols, Yr = Object.prototype.hasOwnProperty, Kr = Object.prototype.propertyIsEnumerable, mr = (e, t, r) => t in e ? ea(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Xt = (e, t) => {
3658
- for (var r in t || (t = {}))
3659
- Yr.call(t, r) && mr(e, r, t[r]);
3660
- if (bt)
3661
- for (var r of bt(t))
3662
- Kr.call(t, r) && mr(e, r, t[r]);
3663
- return e;
3664
- }, Xe = (e, t) => {
3665
- var r = {};
3666
- for (var n in e)
3667
- Yr.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
3668
- if (e != null && bt)
3669
- for (var n of bt(e))
3670
- t.indexOf(n) < 0 && Kr.call(e, n) && (r[n] = e[n]);
3671
- return r;
3672
- };
3673
- const nt = (e, t) => {
3674
- const { formats: r } = $e();
3675
- if (e in r && t in r[e])
3676
- return r[e][t];
3677
- throw new Error(`[svelte-i18n] Unknown "${t}" ${e} format.`);
3678
- }, ta = _t(
3679
- (e) => {
3680
- var t = e, { locale: r, format: n } = t, i = Xe(t, ["locale", "format"]);
3681
- if (r == null)
3682
- throw new Error('[svelte-i18n] A "locale" must be set to format numbers');
3683
- return n && (i = nt("number", n)), new Intl.NumberFormat(r, i);
3684
- }
3685
- ), ra = _t(
3686
- (e) => {
3687
- var t = e, { locale: r, format: n } = t, i = Xe(t, ["locale", "format"]);
3688
- if (r == null)
3689
- throw new Error('[svelte-i18n] A "locale" must be set to format dates');
3690
- return n ? i = nt("date", n) : Object.keys(i).length === 0 && (i = nt("date", "short")), new Intl.DateTimeFormat(r, i);
3691
- }
3692
- ), na = _t(
3693
- (e) => {
3694
- var t = e, { locale: r, format: n } = t, i = Xe(t, ["locale", "format"]);
3695
- if (r == null)
3696
- throw new Error(
3697
- '[svelte-i18n] A "locale" must be set to format time values'
3698
- );
3699
- return n ? i = nt("time", n) : Object.keys(i).length === 0 && (i = nt("time", "short")), new Intl.DateTimeFormat(r, i);
3700
- }
3701
- ), ia = (e = {}) => {
3702
- var t = e, {
3703
- locale: r = Be()
3704
- } = t, n = Xe(t, [
3705
- "locale"
3706
- ]);
3707
- return ta(Xt({ locale: r }, n));
3708
- }, aa = (e = {}) => {
3709
- var t = e, {
3710
- locale: r = Be()
3711
- } = t, n = Xe(t, [
3712
- "locale"
3713
- ]);
3714
- return ra(Xt({ locale: r }, n));
3715
- }, oa = (e = {}) => {
3716
- var t = e, {
3717
- locale: r = Be()
3718
- } = t, n = Xe(t, [
3719
- "locale"
3720
- ]);
3721
- return na(Xt({ locale: r }, n));
3722
- }, sa = _t(
3723
- // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
3724
- (e, t = Be()) => new Li(e, t, $e().formats, {
3725
- ignoreTag: $e().ignoreTag
3726
- })
3727
- ), ua = (e, t = {}) => {
3728
- var r, n, i, a;
3729
- let o = t;
3730
- typeof e == "object" && (o = e, e = o.id);
3731
- const {
3732
- values: s,
3733
- locale: c = Be(),
3734
- default: l
3735
- } = o;
3736
- if (c == null)
3737
- throw new Error(
3738
- "[svelte-i18n] Cannot format a message without first setting the initial locale."
3739
- );
3740
- let u = Wr(e, c);
3741
- if (!u)
3742
- u = (a = (i = (n = (r = $e()).handleMissingMessage) == null ? void 0 : n.call(r, { locale: c, id: e, defaultValue: l })) != null ? i : l) != null ? a : e;
3743
- else if (typeof u != "string")
3744
- return console.warn(
3745
- `[svelte-i18n] Message with id "${e}" must be of type "string", found: "${typeof u}". Gettin its value through the "$format" method is deprecated; use the "json" method instead.`
3746
- ), u;
3747
- if (!s)
3748
- return u;
3749
- let h = u;
3750
- try {
3751
- h = sa(u, c).format(s);
3752
- } catch (d) {
3753
- d instanceof Error && console.warn(
3754
- `[svelte-i18n] Message "${e}" has syntax error:`,
3755
- d.message
3756
- );
3757
- }
3758
- return h;
3759
- }, la = (e, t) => oa(t).format(e), ca = (e, t) => aa(t).format(e), ha = (e, t) => ia(t).format(e), fa = (e, t = Be()) => Wr(e, t), pa = Ve([we, ze], () => ua);
3760
- Ve([we], () => la);
3761
- Ve([we], () => ca);
3762
- Ve([we], () => ha);
3763
- Ve([we, ze], () => fa);
3764
- function ma({ withLocale: e, translations: t }) {
3765
- we.subscribe((r) => {
3766
- r == null && (ze.set(t), we.set(e));
3767
- });
3768
- }
3769
- function dr(e, t) {
3770
- qr(e, t);
3771
- }
3772
- function da(e) {
3773
- we.set(e);
3774
- }
3775
- const gr = {
3776
- en: {
3777
- vaultExchange: "Vault Exchange",
3778
- debitPlaceHolder: "Debit amount",
3779
- creditPlaceHolder: "Credit amount",
3780
- currentBalance: "Current Balance",
3781
- exchangeFrom: "Exchange From",
3782
- exchangeTo: "Exchange To",
3783
- creditAmount: "Credit Amount",
3784
- debitAmount: "Debit Amount",
3785
- Exchange: "Exchange",
3786
- Accept: "Accept",
3787
- Decline: "Decline",
3788
- Reset: "Reset",
3789
- exchangeSuccess: "The wallet exchange was made successfully",
3790
- feeAcceptNotification: "Do you accept a Fee of {amount} {currency} for this transaction?",
3791
- feeExchangeNotification: "You need to click the exchange button to finalize this transaction.<br/><br/>{exchageAmount} {exchageCurrency} will be exchanged to {exchangedAmount} {exchangedCurrency} <br/> Fee amount is {feeAmount} {feeCurrency}",
3792
- errorOnExchange: "There was an error with the wallet exchange",
3793
- generalError: "There was an error with the wallet exchange or player's balances",
3794
- userHasNoBalances: "You don't have any balances on the current account.",
3795
- walletExchangeError: "There was an error while doing the wallet exchage. Please check the amount.",
3796
- "gm.payments.internal_server_error": "There was an error with the wallet exchange",
3797
- InvalidSession: "User session is expired"
3798
- },
3799
- tr: {
3800
- vaultExchange: "Kasa Değişimi",
3801
- debitPlaceHolder: "Borç miktarı",
3802
- creditPlaceHolder: "Alacak miktarı",
3803
- currentBalance: "Güncel Bakiye",
3804
- exchangeFrom: "Şuradan Değiştir",
3805
- exchangeTo: "Şuraya Değiştir",
3806
- creditAmount: "Kredi Tutarı",
3807
- debitAmount: "Borç Tutarı",
3808
- Exchange: "Değiştir",
3809
- Accept: "Kabul etmek",
3810
- Decline: "Reddetmek",
3811
- Reset: "Sıfırla",
3812
- feeAcceptNotification: "Bu işlem için {amount} {currency} tutarında bir Ücret kabul ediyor musunuz?",
3813
- feeExchangeNotification: "Bu işlemi tamamlamak için değişim butonuna tıklamanız gerekmektedir..<br/><br/>{exchageAmount} {exchageCurrency} değiştirilecek {exchangedAmount} {exchangedCurrency} <br/> Ücret tutarı {feeAmount} {feeCurrency}",
3814
- inputLessThan0: "Girdi tutarı 0'dan büyük olmalıdır",
3815
- exchangeSuccess: "Cüzdan değişimi başarıyla yapıldı",
3816
- userHasNoBalances: "Cari hesabınızda bakiyeniz bulunmamaktadır.",
3817
- walletExchangeError: "Cüzdan değişimi yapılırken bir hata oluştu. Lütfen miktarı kontrol edin.",
3818
- InvalidSession: "Kullanıcı oturumu sona erdi",
3819
- errorOnExchange: "Cüzdan değişiminde bir hata oluştu",
3820
- generalError: "Cüzdan değişiminde veya oyuncu bakiyelerinde bir hata oluştu",
3821
- "gm.payments.internal_server_error": "Cüzdan değişiminde bir hata oluştu"
3822
- }
3823
- };
3824
- function ga(e) {
3825
- un(e, "svelte-y4tbuy", "*{margin:0;padding:0}.player-account-vault{max-width:400px;display:flex;flex-direction:column;justify-content:center;align-items:center;margin:auto;font-family:inherit;overflow:hidden;border:1px solid var(--emfe-w-color-primary, #22B04E);border-radius:var(--emw--border-radius-medium, 6px);box-shadow:var(--emfe-w-color-primary, #22B04E) 0px 0px 10px;gap:var(--emw--spacing-medium, 15px)}.player-account-vault .playerVaultContainer{width:100%;display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:var(--emw--spacing-small, 10px);color:var(--emfe-w-pam-color-primary, var(--emw--color-primary, #22B04E));border-radius:var(--emw--border-radius-small, 5px);padding:var(--emw--spacing-medium, 10px);box-sizing:border-box}.player-account-vault .playerVaultContainer .balanceContainer{display:flex;flex-direction:column;justify-content:center;align-items:flex-end;font-size:var(--emw--font-size-medium, 20px);font-weight:var(--emw--font-weight-normal, 400);gap:var(--emw--spacing-small, 10px);font-family:inherit}.player-account-vault .playerVaultContainer .balanceContainer .playerBalance{font-size:var(--emw--font-size-large, 25px)}.player-account-vault .playerVaultContainer .headerContainer{margin-right:auto;margin-bottom:auto}.player-account-vault .playerVaultContainer .headerContainer h1{width:100%;text-align:center;font-family:inherit;font-size:var(--emw--font-size-medium, 20px);font-weight:var(--emw--font-weight-normal, 400)}.player-account-vault .containerExchanges{width:100%;height:100%;display:flex;flex-direction:row;justify-content:space-between;align-items:center;box-sizing:border-box;position:relative;gap:var(--emw--spacing-small, 10px);background:var(--emfe-w-color-primary, #22B04E);padding:var(--emw--spacing-medium, 20px) var(--emw--spacing-medium, 10px) var(--emw--spacing-large, 25px) var(--emw--spacing-medium, 10px)}.player-account-vault .containerExchanges .containerExchangeFrom,.player-account-vault .containerExchanges .containerExchangeTo{width:inherit;height:inherit;display:flex;flex-direction:column;justify-content:center;align-self:center;gap:var(--emw--spacing-small, 10px)}.player-account-vault .containerExchanges .containerExchangeFrom .exchangeHeader,.player-account-vault .containerExchanges .containerExchangeTo .exchangeHeader{font-size:inherit;font-family:inherit;color:var(--emfe-w-color-white, #fff);font-family:inherit}.player-account-vault .containerExchanges .containerExchangeFrom .flexingContainerRow,.player-account-vault .containerExchanges .containerExchangeTo .flexingContainerRow{display:flex;flex-direction:row;justify-content:center;align-items:center;gap:var(--emw--spacing-small, 10px)}.player-account-vault .containerExchanges .containerExchangeFrom .containerInputSelect,.player-account-vault .containerExchanges .containerExchangeTo .containerInputSelect{display:flex;flex-direction:column;justify-content:space-evenly;align-items:center;gap:var(--emw--spacing-small, 10px);max-width:200px}.player-account-vault .containerExchanges .containerExchangeFrom .containerInputSelect input,.player-account-vault .containerExchanges .containerExchangeFrom .containerInputSelect select,.player-account-vault .containerExchanges .containerExchangeTo .containerInputSelect input,.player-account-vault .containerExchanges .containerExchangeTo .containerInputSelect select{text-align:center;padding:5px 0px;margin:0;border:2px solid var(--emw--button-border-color, #22B04E);color:var(--emfe-w-color-black, #000000)}.player-account-vault .containerExchanges .containerExchangeFrom .containerInputSelect input,.player-account-vault .containerExchanges .containerExchangeTo .containerInputSelect input{width:100%}.player-account-vault .containerExchanges .containerExchangeFrom .containerInputSelect select,.player-account-vault .containerExchanges .containerExchangeTo .containerInputSelect select{width:100%}.player-account-vault .containerExchanges .exchangeDetailsWrapper{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:var(--emw--spacing-medium, 20px) var(--emw--spacing-medium, 10px) var(--emw--spacing-large, 25px) var(--emw--spacing-medium, 10px)}.player-account-vault .containerExchanges .containerIconExchange{margin:auto;padding-top:20px}.player-account-vault .containerExchanges .containerIconExchange .iconExchange{width:20px;height:20px;transform:rotateZ(-90deg)}.player-account-vault .containerExchanges .containerIconExchange .iconExchange path{fill:var(--emfe-w-color-white, #fff)}.player-account-vault .containerExchanges .containerIconVault{width:15px;height:15px;position:absolute;top:85%;right:5%;padding:var(--emw--spacing-medium, 10px);background:var(--emfe-w-color-primary, #22B04E);border:3px solid var(--emfe-w-color-white, #fff);border-radius:var(--emw--border-radius-medium, 10px);cursor:pointer}.player-account-vault .containerExchanges .containerIconVault .iconToggleVault{transform:rotateZ(0deg);transition:all 0.3s ease-in-out}.player-account-vault .containerExchanges .containerIconVault .iconToggleVault path{fill:var(--emfe-w-color-white, #fff)}.player-account-vault .containerExchanges .containerIconVault.active .iconToggleVault{transform:rotateZ(180deg)}.player-account-vault .vaultDropDown{width:100%;height:0px;margin:0px;display:flex;flex-direction:column;box-sizing:border-box;overflow:auto;scrollbar-width:none;transition:all 0.5s ease-in-out;opacity:0;gap:var(--emw--spacing-small, 10px);font-size:var(--emw--font-size-medium, 15px);color:var(--emw--color-white, #fff);font-family:inherit}.player-account-vault .vaultDropDown div{display:inherit;flex-direction:row;justify-content:space-between;padding:var(--emw--spacing-medium, 15px) var(--emw--spacing-large, 30px);background:var(--emfe-w-color-primary, #22B04E);border-radius:var(--emw--border-radius-medium, 6px);box-shadow:var(--emfe-w-color-primary, #52474d) 0px 0px 6px}.player-account-vault .vaultDropDown.active{padding:var(--emw--spacing-large, 20px) var(--emw--spacing-medium, 10px);opacity:1}.player-account-vault .notificationsContainer{width:100%;max-height:0px;padding:0px;box-sizing:border-box;transition:all 0.5s ease-in-out}.player-account-vault .notificationsContainer div{text-align:center;padding:var(--emw--spacing-medium, 15px);border-radius:var(--emw--border-radius-medium, 6px);box-shadow:var(--emfe-w-color-primary, #52474d) 0px 0px 6px;color:var(--emfe-w-color-white, #fff);opacity:0;transform:scale(0);transition:inherit;box-sizing:inherit;font-family:inherit}.player-account-vault .notificationsContainer .error{transform:scale(1);opacity:1;background-color:var(--emfe-w-color-error, var(--emfe-w-color-red, #ed0909))}.player-account-vault .notificationsContainer .success{transform:scale(1);opacity:1;background-color:var(--emfe-w-color-success, var(--emfe-w-color-primary, #22B04E))}.player-account-vault .notificationsContainer .action{transform:scale(1);opacity:1;background-color:var(--emfe-w-color-success, var(--emfe-w-color-primary, #abb022))}.player-account-vault .notificationsContainer.error,.player-account-vault .notificationsContainer.success,.player-account-vault .notificationsContainer.action{max-height:200px;padding:var(--emw--spacing-medium, 10px)}.player-account-vault .actionsContainer{width:100%;height:100%;display:flex;flex-direction:row;justify-content:space-between;align-items:center;box-sizing:border-box;padding:var(--emw--spacing-medium, 10px)}.player-account-vault .actionsContainer button{width:100px;height:30px;border:none;cursor:pointer;font-family:inherit;font-size:var(--emw--font-size-medium, 15px);border-radius:var(--emw--button-border-radius, 5px);background:var(--emfe-w-color-primary, #22B04E);color:var(--emfe-w-button-typography, var(--emw--button-text-color, #FFFFFF))}.player-account-vault .actionsContainer .disabled{cursor:default;background:var(--emfe-w-color-gray-150, #828282)}@media only screen and (max-width: 300px){.player-account-vault .playerVaultContainer .headerContainer h1{text-align:left;font-size:var(--emw--font-size-medium, 15px)}.player-account-vault .playerVaultContainer .balanceContainer p{text-align:right;font-size:var(--emw--font-size-medium, 15px)}.player-account-vault .playerVaultContainer .balanceContainer .playerBalance{font-size:var(--emw--font-size-medium, 20px)}}");
3826
- }
3827
- function br(e, t, r) {
3828
- const n = e.slice();
3829
- return n[64] = t[r], n[65] = t, n[66] = r, n;
3830
- }
3831
- function yr(e, t, r) {
3832
- const n = e.slice();
3833
- return n[67] = t[r], n;
3834
- }
3835
- function vr(e, t, r) {
3836
- const n = e.slice();
3837
- return n[67] = t[r], n;
3838
- }
3839
- function xr(e) {
3840
- let t, r = (
3841
- /*balance*/
3842
- e[67].currency + ""
3843
- ), n, i, a;
3844
- return {
3845
- c() {
3846
- t = E("option"), n = $(r), i = R(), t.__value = a = /*balance*/
3847
- e[67].currency, Ee(t, t.__value);
3848
- },
3849
- m(o, s) {
3850
- Q(o, t, s), m(t, n), m(t, i);
3851
- },
3852
- p(o, s) {
3853
- s[0] & /*playerFilteredBalances*/
3854
- 8192 && r !== (r = /*balance*/
3855
- o[67].currency + "") && W(n, r), s[0] & /*playerFilteredBalances*/
3856
- 8192 && a !== (a = /*balance*/
3857
- o[67].currency) && (t.__value = a, Ee(t, t.__value));
3858
- },
3859
- d(o) {
3860
- o && Z(t);
3861
- }
3862
- };
3863
- }
3864
- function Er(e) {
3865
- let t, r = (
3866
- /*balance*/
3867
- e[67].amount > 0 && xr(e)
3868
- );
3869
- return {
3870
- c() {
3871
- r && r.c(), t = Sr();
3872
- },
3873
- m(n, i) {
3874
- r && r.m(n, i), Q(n, t, i);
3875
- },
3876
- p(n, i) {
3877
- /*balance*/
3878
- n[67].amount > 0 ? r ? r.p(n, i) : (r = xr(n), r.c(), r.m(t.parentNode, t)) : r && (r.d(1), r = null);
3879
- },
3880
- d(n) {
3881
- n && Z(t), r && r.d(n);
3882
- }
3883
- };
3884
- }
3885
- function _r(e) {
3886
- let t, r = (
3887
- /*balance*/
3888
- e[67].currency + ""
3889
- ), n, i, a;
3890
- return {
3891
- c() {
3892
- t = E("option"), n = $(r), i = R(), t.__value = a = /*balance*/
3893
- e[67].currency, Ee(t, t.__value);
3894
- },
3895
- m(o, s) {
3896
- Q(o, t, s), m(t, n), m(t, i);
3897
- },
3898
- p(o, s) {
3899
- s[0] & /*playerFilteredBalances*/
3900
- 8192 && r !== (r = /*balance*/
3901
- o[67].currency + "") && W(n, r), s[0] & /*playerFilteredBalances*/
3902
- 8192 && a !== (a = /*balance*/
3903
- o[67].currency) && (t.__value = a, Ee(t, t.__value));
3904
- },
3905
- d(o) {
3906
- o && Z(t);
3907
- }
3908
- };
3909
- }
3910
- function wr(e) {
3911
- let t, r = (
3912
- /*selectedCurrencyFrom*/
3913
- e[1] !== /*balance*/
3914
- e[67].currency && _r(e)
3915
- );
3916
- return {
3917
- c() {
3918
- r && r.c(), t = Sr();
3919
- },
3920
- m(n, i) {
3921
- r && r.m(n, i), Q(n, t, i);
3922
- },
3923
- p(n, i) {
3924
- /*selectedCurrencyFrom*/
3925
- n[1] !== /*balance*/
3926
- n[67].currency ? r ? r.p(n, i) : (r = _r(n), r.c(), r.m(t.parentNode, t)) : r && (r.d(1), r = null);
3927
- },
3928
- d(n) {
3929
- n && Z(t), r && r.d(n);
3930
- }
3931
- };
3932
- }
3933
- function Tr(e) {
3934
- let t, r, n = (
3935
- /*vault*/
3936
- e[64].currency + ""
3937
- ), i, a, o, s = (
3938
- /*vault*/
3939
- e[64].amount + ""
3940
- ), c, l, u = (
3941
- /*index*/
3942
- e[66]
3943
- );
3944
- const h = () => (
3945
- /*div_binding*/
3946
- e[37](t, u)
3947
- ), d = () => (
3948
- /*div_binding*/
3949
- e[37](null, u)
3950
- );
3951
- return {
3952
- c() {
3953
- t = E("div"), r = E("p"), i = $(n), a = R(), o = E("p"), c = $(s), l = R(), H(t, "class", "vaultItem");
3954
- },
3955
- m(b, v) {
3956
- Q(b, t, v), m(t, r), m(r, i), m(t, a), m(t, o), m(o, c), m(t, l), h();
3957
- },
3958
- p(b, v) {
3959
- e = b, v[0] & /*dropDownVaults*/
3960
- 16384 && n !== (n = /*vault*/
3961
- e[64].currency + "") && W(i, n), v[0] & /*dropDownVaults*/
3962
- 16384 && s !== (s = /*vault*/
3963
- e[64].amount + "") && W(c, s), u !== /*index*/
3964
- e[66] && (d(), u = /*index*/
3965
- e[66], h());
3966
- },
3967
- d(b) {
3968
- b && Z(t), d();
3969
- }
3970
- };
3971
- }
3972
- function ba(e) {
3973
- let t, r = (
3974
- /*$_*/
3975
- e[18]("Exchange") + ""
3976
- ), n, i, a, o = (
3977
- /*$_*/
3978
- e[18]("Reset") + ""
3979
- ), s, c, l;
3980
- return {
3981
- c() {
3982
- t = E("button"), n = $(r), i = R(), a = E("button"), s = $(o), t.disabled = /*exchangeDisabled*/
3983
- e[6], j(
3984
- t,
3985
- "disabled",
3986
- /*exchangeDisabled*/
3987
- e[6]
3988
- ), a.disabled = /*exchangeDisabled*/
3989
- e[6], j(
3990
- a,
3991
- "disabled",
3992
- /*exchangeDisabled*/
3993
- e[6]
3994
- );
3995
- },
3996
- m(u, h) {
3997
- Q(u, t, h), m(t, n), Q(u, i, h), Q(u, a, h), m(a, s), c || (l = [
3998
- te(
3999
- t,
4000
- "click",
4001
- /*walletExchange*/
4002
- e[21]
4003
- ),
4004
- te(
4005
- a,
4006
- "click",
4007
- /*resetUiToDefault*/
4008
- e[23]
4009
- )
4010
- ], c = !0);
4011
- },
4012
- p(u, h) {
4013
- h[0] & /*$_*/
4014
- 262144 && r !== (r = /*$_*/
4015
- u[18]("Exchange") + "") && W(n, r), h[0] & /*exchangeDisabled*/
4016
- 64 && (t.disabled = /*exchangeDisabled*/
4017
- u[6]), h[0] & /*exchangeDisabled*/
4018
- 64 && j(
4019
- t,
4020
- "disabled",
4021
- /*exchangeDisabled*/
4022
- u[6]
4023
- ), h[0] & /*$_*/
4024
- 262144 && o !== (o = /*$_*/
4025
- u[18]("Reset") + "") && W(s, o), h[0] & /*exchangeDisabled*/
4026
- 64 && (a.disabled = /*exchangeDisabled*/
4027
- u[6]), h[0] & /*exchangeDisabled*/
4028
- 64 && j(
4029
- a,
4030
- "disabled",
4031
- /*exchangeDisabled*/
4032
- u[6]
4033
- );
4034
- },
4035
- d(u) {
4036
- u && (Z(t), Z(i), Z(a)), c = !1, Te(l);
4037
- }
4038
- };
4039
- }
4040
- function ya(e) {
4041
- let t, r = (
4042
- /*$_*/
4043
- e[18]("Accept") + ""
4044
- ), n, i, a, o = (
4045
- /*$_*/
4046
- e[18]("Decline") + ""
4047
- ), s, c, l;
4048
- return {
4049
- c() {
4050
- t = E("button"), n = $(r), i = R(), a = E("button"), s = $(o);
4051
- },
4052
- m(u, h) {
4053
- Q(u, t, h), m(t, n), Q(u, i, h), Q(u, a, h), m(a, s), c || (l = [
4054
- te(
4055
- t,
4056
- "click",
4057
- /*feeAcceptStep*/
4058
- e[22]
4059
- ),
4060
- te(
4061
- a,
4062
- "click",
4063
- /*resetUiToDefault*/
4064
- e[23]
4065
- )
4066
- ], c = !0);
4067
- },
4068
- p(u, h) {
4069
- h[0] & /*$_*/
4070
- 262144 && r !== (r = /*$_*/
4071
- u[18]("Accept") + "") && W(n, r), h[0] & /*$_*/
4072
- 262144 && o !== (o = /*$_*/
4073
- u[18]("Decline") + "") && W(s, o);
4074
- },
4075
- d(u) {
4076
- u && (Z(t), Z(i), Z(a)), c = !1, Te(l);
4077
- }
4078
- };
4079
- }
4080
- function va(e) {
4081
- let t, r, n, i, a = (
4082
- /*$_*/
4083
- e[18]("vaultExchange") + ""
4084
- ), o, s, c, l, u = (
4085
- /*$_*/
4086
- e[18]("currentBalance") + ""
4087
- ), h, d, b, v = (
4088
- /*playerBalance*/
4089
- e[15].amount + ""
4090
- ), P, F, I = (
4091
- /*playerBalance*/
4092
- e[15].currency + ""
4093
- ), D, U, C, O, q, re = (
4094
- /*$_*/
4095
- e[18]("exchangeFrom") + ""
4096
- ), se, He, fe, pe, V, J, me, G, Se, Y, We, ne, de, Ce = (
4097
- /*$_*/
4098
- e[18]("exchangeTo") + ""
4099
- ), Ze, qe, ge, k, Pe, Ie, it, ie, Je, ye, ve, Qe, Ne, Ye, M, be, at, K, ae, Oe, Le = (
4100
- /*$_*/
4101
- e[18](
4102
- /*errorCode*/
4103
- e[3]
4104
- ) + ""
4105
- ), ot, Ae, p, y, B = Re(
4106
- /*playerFilteredBalances*/
4107
- e[13]
4108
- ), x = [];
4109
- for (let f = 0; f < B.length; f += 1)
4110
- x[f] = Er(vr(e, B, f));
4111
- let w = Re(
4112
- /*playerFilteredBalances*/
4113
- e[13]
4114
- ), L = [];
4115
- for (let f = 0; f < w.length; f += 1)
4116
- L[f] = wr(yr(e, w, f));
4117
- let ue = Re(
4118
- /*dropDownVaults*/
4119
- e[14]
4120
- ), z = [];
4121
- for (let f = 0; f < ue.length; f += 1)
4122
- z[f] = Tr(br(e, ue, f));
4123
- function Wt(f, A) {
4124
- return (
4125
- /*hasTransactionFee*/
4126
- f[12] && !/*isFeeAccepted*/
4127
- f[11] ? ya : ba
4128
- );
4129
- }
4130
- let st = Wt(e), le = st(e);
4131
- return {
4132
- c() {
4133
- t = E("div"), r = E("div"), n = E("div"), i = E("h1"), o = $(a), s = R(), c = E("div"), l = E("p"), h = $(u), d = R(), b = E("p"), P = $(v), F = R(), D = $(I), U = R(), C = E("div"), O = E("div"), q = E("p"), se = $(re), He = R(), fe = E("div"), pe = E("div"), V = E("input"), me = R(), G = E("select");
4134
- for (let f = 0; f < x.length; f += 1)
4135
- x[f].c();
4136
- Se = R(), Y = E("div"), Y.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="6 5 20 20" class="iconExchange"><path d="M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z"></path></svg>', We = R(), ne = E("div"), de = E("p"), Ze = $(Ce), qe = R(), ge = E("div"), k = E("input"), it = R(), ie = E("select");
4137
- for (let f = 0; f < L.length; f += 1)
4138
- L[f].c();
4139
- Je = R(), ye = E("div"), ve = Yt("svg"), Qe = Yt("path"), Ye = R(), M = E("div");
4140
- for (let f = 0; f < z.length; f += 1)
4141
- z[f].c();
4142
- at = R(), K = E("div"), ae = E("div"), Oe = E("p"), ot = R(), Ae = E("div"), le.c(), H(n, "class", "headerContainer"), H(b, "class", "playerBalance"), H(c, "class", "balanceContainer"), H(r, "class", "playerVaultContainer"), H(q, "class", "exchangeHeader"), H(V, "placeholder", J = /*$_*/
4143
- e[18]("debitPlaceHolder")), H(V, "type", "number"), H(V, "min", "0"), /*selectedCurrencyFrom*/
4144
- e[1] === void 0 && tt(() => (
4145
- /*select0_change_handler*/
4146
- e[33].call(G)
4147
- )), H(pe, "class", "containerInputSelect"), H(fe, "class", "flexingContainerRow"), H(O, "class", "containerExchangeFrom"), H(Y, "class", "containerIconExchange"), H(de, "class", "exchangeHeader"), k.disabled = Pe = /*inputExchangeFrom*/
4148
- e[4] === 0, H(k, "placeholder", Ie = /*$_*/
4149
- e[18]("creditPlaceHolder")), H(k, "type", "number"), H(k, "min", "0"), k.readOnly = !0, /*selectedCurrencyTo*/
4150
- e[2] === void 0 && tt(() => (
4151
- /*select1_change_handler*/
4152
- e[35].call(ie)
4153
- )), H(ge, "class", "containerInputSelect"), H(ne, "class", "containerExchangeTo"), H(Qe, "d", "M16.191,19.235l7.562-7.568a1.423,1.423,0,0,1,2.019,0,1.441,1.441,0,0,1,0,2.025L17.2,22.265a1.427,1.427,0,0,1-1.971.042L6.6,13.7a1.429,1.429,0,0,1,2.019-2.025Z"), H(ve, "xmlns", "http://www.w3.org/2000/svg"), H(ve, "viewBox", "6 5 20 20"), H(ve, "class", "iconToggleVault"), H(ye, "class", Ne = "containerIconVault " + /*isVaultDropDownToggled*/
4154
- (e[7] && /*dropDownVaults*/
4155
- e[14].length > 0 ? "active" : "")), H(C, "class", "containerExchanges"), H(M, "class", be = "vaultDropDown " + /*isVaultDropDownToggled*/
4156
- (e[7] && /*dropDownVaults*/
4157
- e[14].length > 0 ? "active" : "")), Kt(
4158
- M,
4159
- "height",
4160
- /*calculateHeight*/
4161
- e[0]
4162
- ), j(
4163
- ae,
4164
- "error",
4165
- /*isError*/
4166
- e[8]
4167
- ), j(
4168
- ae,
4169
- "success",
4170
- /*isSuccess*/
4171
- e[9]
4172
- ), j(
4173
- ae,
4174
- "action",
4175
- /*isAction*/
4176
- e[10]
4177
- ), H(K, "class", "notificationsContainer"), j(
4178
- K,
4179
- "error",
4180
- /*isError*/
4181
- e[8]
4182
- ), j(
4183
- K,
4184
- "success",
4185
- /*isSuccess*/
4186
- e[9]
4187
- ), j(
4188
- K,
4189
- "action",
4190
- /*isAction*/
4191
- e[10]
4192
- ), H(Ae, "class", "actionsContainer"), H(t, "class", "player-account-vault");
4193
- },
4194
- m(f, A) {
4195
- Q(f, t, A), m(t, r), m(r, n), m(n, i), m(i, o), m(r, s), m(r, c), m(c, l), m(l, h), m(c, d), m(c, b), m(b, P), m(b, F), m(b, D), m(t, U), m(t, C), m(C, O), m(O, q), m(q, se), m(O, He), m(O, fe), m(fe, pe), m(pe, V), Ee(
4196
- V,
4197
- /*inputExchangeFrom*/
4198
- e[4]
4199
- ), m(pe, me), m(pe, G);
4200
- for (let g = 0; g < x.length; g += 1)
4201
- x[g] && x[g].m(G, null);
4202
- ut(
4203
- G,
4204
- /*selectedCurrencyFrom*/
4205
- e[1],
4206
- !0
4207
- ), m(C, Se), m(C, Y), m(C, We), m(C, ne), m(ne, de), m(de, Ze), m(ne, qe), m(ne, ge), m(ge, k), Ee(
4208
- k,
4209
- /*inputExchangeTo*/
4210
- e[5]
4211
- ), m(ge, it), m(ge, ie);
4212
- for (let g = 0; g < L.length; g += 1)
4213
- L[g] && L[g].m(ie, null);
4214
- ut(
4215
- ie,
4216
- /*selectedCurrencyTo*/
4217
- e[2],
4218
- !0
4219
- ), m(C, Je), m(C, ye), m(ye, ve), m(ve, Qe), m(t, Ye), m(t, M);
4220
- for (let g = 0; g < z.length; g += 1)
4221
- z[g] && z[g].m(M, null);
4222
- e[38](M), m(t, at), m(t, K), m(K, ae), m(ae, Oe), Oe.innerHTML = Le, m(t, ot), m(t, Ae), le.m(Ae, null), p || (y = [
4223
- te(
4224
- V,
4225
- "input",
4226
- /*input0_input_handler*/
4227
- e[32]
4228
- ),
4229
- te(
4230
- V,
4231
- "input",
4232
- /*debouncedExchangeInterogation*/
4233
- e[20]
4234
- ),
4235
- te(
4236
- G,
4237
- "change",
4238
- /*select0_change_handler*/
4239
- e[33]
4240
- ),
4241
- te(
4242
- G,
4243
- "change",
4244
- /*debouncedExchangeInterogation*/
4245
- e[20]
4246
- ),
4247
- te(
4248
- k,
4249
- "input",
4250
- /*input1_input_handler*/
4251
- e[34]
4252
- ),
4253
- te(
4254
- ie,
4255
- "change",
4256
- /*select1_change_handler*/
4257
- e[35]
4258
- ),
4259
- te(
4260
- ie,
4261
- "change",
4262
- /*debouncedExchangeInterogation*/
4263
- e[20]
4264
- ),
4265
- te(
4266
- ye,
4267
- "click",
4268
- /*click_handler*/
4269
- e[36]
4270
- )
4271
- ], p = !0);
4272
- },
4273
- p(f, A) {
4274
- if (A[0] & /*$_*/
4275
- 262144 && a !== (a = /*$_*/
4276
- f[18]("vaultExchange") + "") && W(o, a), A[0] & /*$_*/
4277
- 262144 && u !== (u = /*$_*/
4278
- f[18]("currentBalance") + "") && W(h, u), A[0] & /*playerBalance*/
4279
- 32768 && v !== (v = /*playerBalance*/
4280
- f[15].amount + "") && W(P, v), A[0] & /*playerBalance*/
4281
- 32768 && I !== (I = /*playerBalance*/
4282
- f[15].currency + "") && W(D, I), A[0] & /*$_*/
4283
- 262144 && re !== (re = /*$_*/
4284
- f[18]("exchangeFrom") + "") && W(se, re), A[0] & /*$_*/
4285
- 262144 && J !== (J = /*$_*/
4286
- f[18]("debitPlaceHolder")) && H(V, "placeholder", J), A[0] & /*inputExchangeFrom*/
4287
- 16 && pt(V.value) !== /*inputExchangeFrom*/
4288
- f[4] && Ee(
4289
- V,
4290
- /*inputExchangeFrom*/
4291
- f[4]
4292
- ), A[0] & /*playerFilteredBalances*/
4293
- 8192) {
4294
- B = Re(
4295
- /*playerFilteredBalances*/
4296
- f[13]
4297
- );
4298
- let g;
4299
- for (g = 0; g < B.length; g += 1) {
4300
- const xe = vr(f, B, g);
4301
- x[g] ? x[g].p(xe, A) : (x[g] = Er(xe), x[g].c(), x[g].m(G, null));
4302
- }
4303
- for (; g < x.length; g += 1)
4304
- x[g].d(1);
4305
- x.length = B.length;
4306
- }
4307
- if (A[0] & /*selectedCurrencyFrom, playerFilteredBalances*/
4308
- 8194 && ut(
4309
- G,
4310
- /*selectedCurrencyFrom*/
4311
- f[1]
4312
- ), A[0] & /*$_*/
4313
- 262144 && Ce !== (Ce = /*$_*/
4314
- f[18]("exchangeTo") + "") && W(Ze, Ce), A[0] & /*inputExchangeFrom*/
4315
- 16 && Pe !== (Pe = /*inputExchangeFrom*/
4316
- f[4] === 0) && (k.disabled = Pe), A[0] & /*$_*/
4317
- 262144 && Ie !== (Ie = /*$_*/
4318
- f[18]("creditPlaceHolder")) && H(k, "placeholder", Ie), A[0] & /*inputExchangeTo*/
4319
- 32 && pt(k.value) !== /*inputExchangeTo*/
4320
- f[5] && Ee(
4321
- k,
4322
- /*inputExchangeTo*/
4323
- f[5]
4324
- ), A[0] & /*playerFilteredBalances, selectedCurrencyFrom*/
4325
- 8194) {
4326
- w = Re(
4327
- /*playerFilteredBalances*/
4328
- f[13]
4329
- );
4330
- let g;
4331
- for (g = 0; g < w.length; g += 1) {
4332
- const xe = yr(f, w, g);
4333
- L[g] ? L[g].p(xe, A) : (L[g] = wr(xe), L[g].c(), L[g].m(ie, null));
4334
- }
4335
- for (; g < L.length; g += 1)
4336
- L[g].d(1);
4337
- L.length = w.length;
4338
- }
4339
- if (A[0] & /*selectedCurrencyTo, playerFilteredBalances*/
4340
- 8196 && ut(
4341
- ie,
4342
- /*selectedCurrencyTo*/
4343
- f[2]
4344
- ), A[0] & /*isVaultDropDownToggled, dropDownVaults*/
4345
- 16512 && Ne !== (Ne = "containerIconVault " + /*isVaultDropDownToggled*/
4346
- (f[7] && /*dropDownVaults*/
4347
- f[14].length > 0 ? "active" : "")) && H(ye, "class", Ne), A[0] & /*elements, dropDownVaults*/
4348
- 147456) {
4349
- ue = Re(
4350
- /*dropDownVaults*/
4351
- f[14]
4352
- );
4353
- let g;
4354
- for (g = 0; g < ue.length; g += 1) {
4355
- const xe = br(f, ue, g);
4356
- z[g] ? z[g].p(xe, A) : (z[g] = Tr(xe), z[g].c(), z[g].m(M, null));
4357
- }
4358
- for (; g < z.length; g += 1)
4359
- z[g].d(1);
4360
- z.length = ue.length;
4361
- }
4362
- A[0] & /*isVaultDropDownToggled, dropDownVaults*/
4363
- 16512 && be !== (be = "vaultDropDown " + /*isVaultDropDownToggled*/
4364
- (f[7] && /*dropDownVaults*/
4365
- f[14].length > 0 ? "active" : "")) && H(M, "class", be), A[0] & /*calculateHeight*/
4366
- 1 && Kt(
4367
- M,
4368
- "height",
4369
- /*calculateHeight*/
4370
- f[0]
4371
- ), A[0] & /*$_, errorCode*/
4372
- 262152 && Le !== (Le = /*$_*/
4373
- f[18](
4374
- /*errorCode*/
4375
- f[3]
4376
- ) + "") && (Oe.innerHTML = Le), A[0] & /*isError*/
4377
- 256 && j(
4378
- ae,
4379
- "error",
4380
- /*isError*/
4381
- f[8]
4382
- ), A[0] & /*isSuccess*/
4383
- 512 && j(
4384
- ae,
4385
- "success",
4386
- /*isSuccess*/
4387
- f[9]
4388
- ), A[0] & /*isAction*/
4389
- 1024 && j(
4390
- ae,
4391
- "action",
4392
- /*isAction*/
4393
- f[10]
4394
- ), A[0] & /*isError*/
4395
- 256 && j(
4396
- K,
4397
- "error",
4398
- /*isError*/
4399
- f[8]
4400
- ), A[0] & /*isSuccess*/
4401
- 512 && j(
4402
- K,
4403
- "success",
4404
- /*isSuccess*/
4405
- f[9]
4406
- ), A[0] & /*isAction*/
4407
- 1024 && j(
4408
- K,
4409
- "action",
4410
- /*isAction*/
4411
- f[10]
4412
- ), st === (st = Wt(f)) && le ? le.p(f, A) : (le.d(1), le = st(f), le && (le.c(), le.m(Ae, null)));
4413
- },
4414
- i: oe,
4415
- o: oe,
4416
- d(f) {
4417
- f && Z(t), Ht(x, f), Ht(L, f), Ht(z, f), e[38](null), le.d(), p = !1, Te(y);
4418
- }
4419
- };
4420
- }
4421
- function xa(e, t) {
4422
- let r;
4423
- return function(...n) {
4424
- r && clearTimeout(r), r = setTimeout(
4425
- () => {
4426
- e.apply(n);
4427
- },
4428
- t
4429
- );
4430
- };
4431
- }
4432
- function Ea(e, t, r) {
4433
- let n;
4434
- sn(e, pa, (p) => r(18, n = p));
4435
- let { session: i = "" } = t, { userid: a = "" } = t, { endpoint: o = "" } = t, { lang: s = "en" } = t, { clientstyling: c = "" } = t, { clientstylingurl: l = "" } = t, { translationurl: u = "" } = t, { playercurrency: h = "" } = t, d = "", b = "", v = "", P = "", F = "", I = 0, D = 0, U = 0, C = !0, O = !1, q = !1, re = !1, se = !1, He = !0, fe = !1, pe = [], V = [], J = [], me = [], G = [], Se = [], Y = {}, We = {}, ne = null, de = [];
4436
- const Ce = () => {
4437
- da(s);
4438
- };
4439
- ma({ withLocale: "en", translations: {} });
4440
- const Ze = () => {
4441
- fetch(u).then((y) => y.json()).then((y) => {
4442
- Object.keys(y).forEach((B) => {
4443
- dr(B, y[B]);
4444
- });
4445
- }).catch((y) => {
4446
- console.error("There was a problem with the translations request.", y);
4447
- });
4448
- };
4449
- Object.keys(gr).forEach((p) => {
4450
- dr(p, gr[p]);
4451
- });
4452
- const qe = (p) => {
4453
- O && G.length === 0 || (p.preventDefault(), r(7, O = !O), r(0, d = O ? ge() : "0px"));
4454
- }, ge = () => {
4455
- var w;
4456
- if (G.length === 0)
4457
- return r(0, d = "0px");
4458
- const p = (w = de[0]) == null ? void 0 : w.clientHeight, y = G.length, B = 30, x = parseFloat(getComputedStyle(ne).getPropertyValue("gap"));
4459
- return r(0, d = `${y * p + y * x + B}px`);
4460
- }, k = () => new Promise((p, y) => {
4461
- let B = new URL(`${o}/v2/player/${a}/balance`);
4462
- fetch(B, {
4463
- method: "GET",
4464
- headers: {
4465
- "X-SessionID": i,
4466
- "Content-Type": "application/json",
4467
- Accept: "application/json"
4468
- }
4469
- }).then((w) => be(w)).then((w) => {
4470
- w && (r(13, J = []), V = [], me = [], r(14, G = []), pe = w.items, Ie().then((L) => {
4471
- L.forEach((ue) => {
4472
- Se.push(ue.code);
4473
- }), Pe(w), p();
4474
- }));
4475
- }).catch((w) => {
4476
- y(), M("error", n("generalError")), console.error("There was an error with the player balance request.", w);
4477
- });
4478
- }), Pe = (p) => {
4479
- if (pe.forEach((y) => {
4480
- if (y.type === "Real" && !(!Se.includes(y.currency) && Se.length > 0))
4481
- switch (r(13, J = J.concat(y)), y.walletAccountType) {
4482
- case "Ordinary":
4483
- V = V.concat(y);
4484
- break;
4485
- case "Vault":
4486
- if (me = me.concat(y), y.amount === 0)
4487
- return;
4488
- r(14, G = G.concat(y));
4489
- break;
4490
- }
4491
- }), r(15, Y = Object.entries(p.totalCashAmount).map(([y, B]) => ({ currency: y, amount: B }))[0]), Y.amount === 0 && !me.find((y) => y.amount > 0))
4492
- return M("error", n("userHasNoBalances"));
4493
- r(1, b = Y.amount === 0 ? me.find((y) => y.amount > 0).currency : Y.currency), r(2, v = Y.amount === 0 ? Y.currency : me.find((y) => y.type === "Real").currency);
4494
- }, Ie = () => new Promise((p, y) => {
4495
- let B = new URL(`${o}/v1/player/${a}/wallet-exchange/currencies`);
4496
- fetch(B, {
4497
- method: "GET",
4498
- headers: {
4499
- "X-SessionId": i,
4500
- "Content-Type": "application/json",
4501
- Accept: "application/json"
4502
- }
4503
- }).then((w) => be(w)).then((w) => {
4504
- w.length !== 0 && p(w.currencies);
4505
- }).catch((w) => {
4506
- y(), M("error", n("generalError")), console.error("There was an error on the allowed currencies request.", w);
4507
- });
4508
- }), it = () => new Promise((p, y) => {
4509
- var x;
4510
- b === v && r(2, v = (x = J.find((w) => w.currency !== b)) == null ? void 0 : x.currency), I <= 0 && (Ye(), y());
4511
- const B = J.find((w) => w.currency === b);
4512
- I > B.amount && r(4, I = B.amount), p();
4513
- }), ie = () => {
4514
- it().then(() => {
4515
- let p = new URL(`${o}/v2/player/${a}/check/wallet-exchange`), B = {
4516
- method: "POST",
4517
- headers: {
4518
- "X-SessionID": i,
4519
- "Content-Type": "application/json",
4520
- Accept: "application/json"
4521
- },
4522
- body: JSON.stringify({
4523
- userId: a,
4524
- amount: I,
4525
- currency: b,
4526
- fromCurrency: b,
4527
- toCurrency: v,
4528
- payload: { PlayerCurrency: h }
4529
- })
4530
- };
4531
- fetch(p, B).then((x) => be(x)).then((x) => {
4532
- if (!x)
4533
- return;
4534
- if (r(12, fe = !1), r(11, He = !1), r(10, se = !1), x.feeDetails && x.feeDetails.fees.length > 0) {
4535
- r(12, fe = !0);
4536
- let L = x.feeDetails.fees.find((ue) => ue.id);
4537
- Qe(L);
4538
- } else
4539
- r(6, C = !1);
4540
- const w = x.walletActions.find((L) => L.directionName === "Credit").amount;
4541
- r(5, D = Je(w));
4542
- }).catch((x) => {
4543
- M("error", n("generalError")), console.error("There was a problem with the wallet exchange request.", x);
4544
- });
4545
- }).catch((p) => {
4546
- M("error", n("walletExchangeError"));
4547
- });
4548
- }, Je = (p) => Math.abs(p) < 1e-6 || Math.abs(p) >= 1e6 ? p.toFixed(12).replace(/\.?0+$/, "") : p.toString(), ye = xa(ie, 500), ve = () => {
4549
- let p = new URL(`${o}/v2/player/${a}/wallet-exchange`), B = {
4550
- method: "PUT",
4551
- headers: {
4552
- "X-SessionID": i,
4553
- "Content-Type": "application/json",
4554
- Accept: "application/json"
4555
- },
4556
- body: JSON.stringify({
4557
- userId: a,
4558
- amount: I,
4559
- currency: b,
4560
- fromCurrency: b,
4561
- toCurrency: v,
4562
- payload: { PlayerCurrency: h }
4563
- })
4564
- };
4565
- fetch(p, B).then((x) => be(x)).then((x) => {
4566
- x && (r(10, se = !1), r(4, I = 0), r(5, D = 0), M("success", "exchangeSuccess"), k().then((w) => {
4567
- !w || !O || ge();
4568
- }).catch((w) => {
4569
- console.error("There was an error with fetching the players balance.", w);
4570
- }));
4571
- }).catch((x) => {
4572
- M("error", n("generalError")), console.error("There was an error with the wallet exchange request.", x);
4573
- });
4574
- }, Qe = (p) => {
4575
- U = p.amount, P = p.currency, r(11, He = !1), M("action", n("feeAcceptNotification", {
4576
- values: { amount: U, currency: P }
4577
- }));
4578
- }, Ne = () => {
4579
- r(10, se = !1), r(6, C = !1), r(11, He = !0);
4580
- let y = {
4581
- exchageAmount: Je(I - U),
4582
- exchageCurrency: b,
4583
- exchangedAmount: D,
4584
- exchangedCurrency: v,
4585
- feeAmount: U,
4586
- feeCurrency: P
4587
- };
4588
- M("action", n("feeExchangeNotification", { values: y }));
4589
- }, Ye = () => {
4590
- r(10, se = !1), r(12, fe = !1), r(6, C = !0), r(5, D = 0), r(4, I = 0);
4591
- }, M = (p, y) => {
4592
- switch (p) {
4593
- case "error":
4594
- r(8, q = !0), r(6, C = !0), window.postMessage(
4595
- {
4596
- type: "WidgetNotification",
4597
- data: { type: "error", message: y }
4598
- },
4599
- window.location.href
4600
- ), setTimeout(
4601
- () => {
4602
- r(8, q = !1);
4603
- },
4604
- 2e3
4605
- );
4606
- break;
4607
- case "success":
4608
- r(9, re = !0), r(6, C = !0), window.postMessage(
4609
- {
4610
- type: "WidgetNotification",
4611
- data: { type: "success", message: y }
4612
- },
4613
- window.location.href
4614
- ), setTimeout(
4615
- () => {
4616
- r(9, re = !1);
4617
- },
4618
- 2e3
4619
- );
4620
- break;
4621
- case "action":
4622
- r(10, se = !0);
4623
- break;
4624
- }
4625
- r(3, F = y);
4626
- }, be = (p) => Tt(this, null, function* () {
4627
- return p.status >= 300 ? (We = yield p.json(), r(3, F = We.thirdPartyResponse.errorCode), M("error", F || "generalError")) : p.json();
4628
- });
4629
- function at() {
4630
- I = pt(this.value), r(4, I);
4631
- }
4632
- function K() {
4633
- b = er(this), r(1, b), r(13, J);
4634
- }
4635
- function ae() {
4636
- D = pt(this.value), r(5, D);
4637
- }
4638
- function Oe() {
4639
- v = er(this), r(2, v), r(13, J);
4640
- }
4641
- const Le = (p) => {
4642
- qe(p);
4643
- };
4644
- function ot(p, y) {
4645
- mt[p ? "unshift" : "push"](() => {
4646
- de[y] = p, r(17, de);
4647
- });
4648
- }
4649
- function Ae(p) {
4650
- mt[p ? "unshift" : "push"](() => {
4651
- ne = p, r(16, ne);
4652
- });
4653
- }
4654
- return e.$$set = (p) => {
4655
- "session" in p && r(24, i = p.session), "userid" in p && r(25, a = p.userid), "endpoint" in p && r(26, o = p.endpoint), "lang" in p && r(27, s = p.lang), "clientstyling" in p && r(28, c = p.clientstyling), "clientstylingurl" in p && r(29, l = p.clientstylingurl), "translationurl" in p && r(30, u = p.translationurl), "playercurrency" in p && r(31, h = p.playercurrency);
4656
- }, e.$$.update = () => {
4657
- e.$$.dirty[0] & /*session*/
4658
- 16777216, e.$$.dirty[0] & /*lang*/
4659
- 134217728 && s && Ce(), e.$$.dirty[0] & /*session, userid, endpoint*/
4660
- 117440512 | e.$$.dirty[1] & /*playercurrency*/
4661
- 1 && i && a && o && h && k(), e.$$.dirty[0] & /*clientstyling*/
4662
- 268435456, e.$$.dirty[0] & /*clientstylingurl*/
4663
- 536870912, e.$$.dirty[0] & /*translationurl*/
4664
- 1073741824 && u && Ze();
4665
- }, [
4666
- d,
4667
- b,
4668
- v,
4669
- F,
4670
- I,
4671
- D,
4672
- C,
4673
- O,
4674
- q,
4675
- re,
4676
- se,
4677
- He,
4678
- fe,
4679
- J,
4680
- G,
4681
- Y,
4682
- ne,
4683
- de,
4684
- n,
4685
- qe,
4686
- ye,
4687
- ve,
4688
- Ne,
4689
- Ye,
4690
- i,
4691
- a,
4692
- o,
4693
- s,
4694
- c,
4695
- l,
4696
- u,
4697
- h,
4698
- at,
4699
- K,
4700
- ae,
4701
- Oe,
4702
- Le,
4703
- ot,
4704
- Ae
4705
- ];
4706
- }
4707
- class _a extends Tn {
4708
- constructor(t) {
4709
- super(), _n(
4710
- this,
4711
- t,
4712
- Ea,
4713
- va,
4714
- Ar,
4715
- {
4716
- session: 24,
4717
- userid: 25,
4718
- endpoint: 26,
4719
- lang: 27,
4720
- clientstyling: 28,
4721
- clientstylingurl: 29,
4722
- translationurl: 30,
4723
- playercurrency: 31
4724
- },
4725
- ga,
4726
- [-1, -1, -1]
4727
- );
4728
- }
4729
- get session() {
4730
- return this.$$.ctx[24];
4731
- }
4732
- set session(t) {
4733
- this.$$set({ session: t }), ce();
4734
- }
4735
- get userid() {
4736
- return this.$$.ctx[25];
4737
- }
4738
- set userid(t) {
4739
- this.$$set({ userid: t }), ce();
4740
- }
4741
- get endpoint() {
4742
- return this.$$.ctx[26];
4743
- }
4744
- set endpoint(t) {
4745
- this.$$set({ endpoint: t }), ce();
4746
- }
4747
- get lang() {
4748
- return this.$$.ctx[27];
4749
- }
4750
- set lang(t) {
4751
- this.$$set({ lang: t }), ce();
4752
- }
4753
- get clientstyling() {
4754
- return this.$$.ctx[28];
4755
- }
4756
- set clientstyling(t) {
4757
- this.$$set({ clientstyling: t }), ce();
4758
- }
4759
- get clientstylingurl() {
4760
- return this.$$.ctx[29];
4761
- }
4762
- set clientstylingurl(t) {
4763
- this.$$set({ clientstylingurl: t }), ce();
4764
- }
4765
- get translationurl() {
4766
- return this.$$.ctx[30];
4767
- }
4768
- set translationurl(t) {
4769
- this.$$set({ translationurl: t }), ce();
4770
- }
4771
- get playercurrency() {
4772
- return this.$$.ctx[31];
4773
- }
4774
- set playercurrency(t) {
4775
- this.$$set({ playercurrency: t }), ce();
4776
- }
4777
- }
4778
- wn(_a, { session: {}, userid: {}, endpoint: {}, lang: {}, clientstyling: {}, clientstylingurl: {}, translationurl: {}, playercurrency: {} }, [], [], !0);
4779
- export {
4780
- _a as default
4781
- };