@prosopo/procaptcha-bundle 2.6.11 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.d.ts.map +1 -1
  2. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.js +3 -2
  3. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/index.js.map +1 -1
  4. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  5. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js +4 -0
  6. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentProvider.js.map +1 -1
  7. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts +1 -1
  8. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -1
  9. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  10. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js +1 -1
  11. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/captcha/captchaRenderer.js.map +1 -1
  12. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts +1 -1
  13. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.d.ts.map +1 -1
  14. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js +2 -2
  15. package/.rollup.cache/home/runner/work/captcha/captcha/packages/procaptcha-bundle/dist/bundle/util/configCreator.js.map +1 -1
  16. package/CHANGELOG.md +142 -0
  17. package/dist/bundle/ProcaptchaWidget-BpzncYOb.js +612 -0
  18. package/dist/bundle/ProcaptchaWidget-D961oZ27.js +148 -0
  19. package/dist/bundle/bnChunk-DRlDxTFg.js +1137 -0
  20. package/dist/bundle/{browser-ponyfill-Bctlk3uB.js → browser-ponyfill-CvzSbL_o.js} +31 -30
  21. package/dist/bundle/builder-CQlqPNRd.js +37 -0
  22. package/dist/bundle/captchaComponentProvider-Dw6ydLe3.js +802 -0
  23. package/dist/bundle/{captchaRenderer-BAMErqQN.js → captchaRenderer-CY8KuZK-.js} +22 -22
  24. package/dist/bundle/commonChunk-24zMb_mF.js +189 -0
  25. package/dist/bundle/emotion-element-5486c51c.browser.esm-PRDDgd_k.js +918 -0
  26. package/dist/bundle/{fp.esm-DYWeNGcH.js → fp.esm-BADUiinQ.js} +548 -648
  27. package/dist/bundle/index-BRg_gWPo.js +1328 -0
  28. package/dist/bundle/{index-ByKGlSkE.js → index-BzOMq-ud.js} +2 -2
  29. package/dist/bundle/{index-1qH2dz7u.js → index-DqwVRCwA.js} +166 -199
  30. package/dist/bundle/index.d.ts.map +1 -1
  31. package/dist/bundle/locales/ar/translation.json +4 -3
  32. package/dist/bundle/locales/az/translation.json +4 -3
  33. package/dist/bundle/locales/cs/translation.json +4 -3
  34. package/dist/bundle/locales/de/translation.json +4 -3
  35. package/dist/bundle/locales/el/translation.json +4 -3
  36. package/dist/bundle/locales/en/translation.json +4 -3
  37. package/dist/bundle/locales/es/translation.json +4 -3
  38. package/dist/bundle/locales/fi/translation.json +4 -3
  39. package/dist/bundle/locales/fr/translation.json +4 -3
  40. package/dist/bundle/locales/hi/translation.json +4 -3
  41. package/dist/bundle/locales/hu/translation.json +4 -3
  42. package/dist/bundle/locales/id/translation.json +4 -3
  43. package/dist/bundle/locales/it/translation.json +4 -3
  44. package/dist/bundle/locales/ja/translation.json +4 -3
  45. package/dist/bundle/locales/jv/translation.json +4 -3
  46. package/dist/bundle/locales/ko/translation.json +4 -3
  47. package/dist/bundle/locales/ml/translation.json +4 -3
  48. package/dist/bundle/locales/ms/translation.json +4 -3
  49. package/dist/bundle/locales/nl/translation.json +4 -3
  50. package/dist/bundle/locales/no/translation.json +4 -3
  51. package/dist/bundle/locales/pl/translation.json +4 -3
  52. package/dist/bundle/locales/pt/translation.json +4 -3
  53. package/dist/bundle/locales/{pt-br → pt-BR}/translation.json +4 -3
  54. package/dist/bundle/locales/ro/translation.json +4 -3
  55. package/dist/bundle/locales/ru/translation.json +4 -3
  56. package/dist/bundle/locales/sr/translation.json +4 -3
  57. package/dist/bundle/locales/sv/translation.json +4 -3
  58. package/dist/bundle/locales/th/translation.json +4 -3
  59. package/dist/bundle/locales/tr/translation.json +4 -3
  60. package/dist/bundle/locales/uk/translation.json +4 -3
  61. package/dist/bundle/locales/vi/translation.json +4 -3
  62. package/dist/bundle/locales/{zh-cn → zh-CN}/translation.json +4 -3
  63. package/dist/bundle/nobleChunk-Xl5XLrx3.js +3635 -0
  64. package/dist/bundle/procaptcha.bundle.js +6 -5
  65. package/dist/bundle/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  66. package/dist/bundle/util/captcha/captchaComponentsList.d.ts +1 -1
  67. package/dist/bundle/util/captcha/captchaComponentsList.d.ts.map +1 -1
  68. package/dist/bundle/util/captcha/captchaRenderer.d.ts.map +1 -1
  69. package/dist/bundle/util/configCreator.d.ts +1 -1
  70. package/dist/bundle/util/configCreator.d.ts.map +1 -1
  71. package/dist/bundle/utilChunk-sqstc6C5.js +317 -0
  72. package/dist/bundle/utilCryptoChunk-CIPUtfoO.js +1256 -0
  73. package/dist/bundle/web2Chunk-7Vd8yt2r.js +3711 -0
  74. package/dist/bundle/{hash-CrwduMDb.js → web3Chunk-DrUvbVNW.js} +257 -695
  75. package/dist/bundle/{translations-DEL070wJ.js → zodChunk-wTu9ZHzV.js} +46 -82
  76. package/dist/cjs/index.cjs +8 -2
  77. package/dist/cjs/util/captcha/captchaComponentProvider.cjs +4 -0
  78. package/dist/cjs/util/captcha/captchaRenderer.cjs +2 -1
  79. package/dist/cjs/util/configCreator.cjs +2 -2
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.js +3 -2
  82. package/dist/index.js.map +1 -1
  83. package/dist/util/captcha/captchaComponentProvider.d.ts +1 -1
  84. package/dist/util/captcha/captchaComponentProvider.d.ts.map +1 -1
  85. package/dist/util/captcha/captchaComponentProvider.js +4 -0
  86. package/dist/util/captcha/captchaComponentProvider.js.map +1 -1
  87. package/dist/util/captcha/captchaComponentsList.d.ts +1 -1
  88. package/dist/util/captcha/captchaComponentsList.d.ts.map +1 -1
  89. package/dist/util/captcha/captchaRenderer.d.ts.map +1 -1
  90. package/dist/util/captcha/captchaRenderer.js +1 -1
  91. package/dist/util/captcha/captchaRenderer.js.map +1 -1
  92. package/dist/util/configCreator.d.ts +1 -1
  93. package/dist/util/configCreator.d.ts.map +1 -1
  94. package/dist/util/configCreator.js +2 -2
  95. package/dist/util/configCreator.js.map +1 -1
  96. package/package.json +21 -14
  97. package/stats.html +1 -1
  98. package/vite.config.ts +47 -4
  99. package/vite.serve.config.ts +2 -0
  100. package/vite.test.config.ts +1 -1
  101. package/webpack.config.cjs +5 -0
  102. package/dist/bundle/ProcaptchaWidget-DPyDGPiI.js +0 -156
  103. package/dist/bundle/ProcaptchaWidget-DoqUlwHS.js +0 -636
  104. package/dist/bundle/_commonjsHelpers-DaMA6jEr.js +0 -8
  105. package/dist/bundle/asU8a-BixKX-w0.js +0 -9
  106. package/dist/bundle/bip39-D7YSihxf.js +0 -260
  107. package/dist/bundle/captchaComponentProvider-BL18T1UE.js +0 -1242
  108. package/dist/bundle/emotion-element-5486c51c.browser.esm-Bjt1gs1F.js +0 -1807
  109. package/dist/bundle/i18nFrontend-DCv3P9jv.js +0 -2273
  110. package/dist/bundle/index-BeN3et18.js +0 -4844
  111. package/dist/bundle/index-BjRdPnnE.js +0 -1198
  112. package/dist/bundle/index-CBquknc2.js +0 -81
  113. package/dist/bundle/index-QVME9Prx.js +0 -32
  114. package/dist/bundle/sha256-CGE_4eEY.js +0 -171
  115. package/dist/bundle/spread-DEmVz7RJ.js +0 -15
  116. package/dist/bundle/toU8a-CPMbkkSw.js +0 -109
  117. package/dist/bundle/useTranslation-BJsfZyOx.js +0 -158
@@ -0,0 +1,3711 @@
1
+ import { q as _r } from "./nobleChunk-Xl5XLrx3.js";
2
+ import { g as Mr } from "./bnChunk-DRlDxTFg.js";
3
+ import { z as R, n as Te, o as y, a as S, b as K, s as h, c as Hr, u as _e, d as Dt, e as Me, f as Ft, g as Xe, r as In, l as _t } from "./zodChunk-wTu9ZHzV.js";
4
+ import { h as Vr } from "./commonChunk-24zMb_mF.js";
5
+ import { r as rt, b as dt, o as Rn, u as ht, a as Mt, t as Br, i as Kr, c as je, k as it, s as $n } from "./utilChunk-sqstc6C5.js";
6
+ import { j as qr, s as zr, n as Wr, a as Jr, c as Gr, d as Xr, e as Yr, f as Qr, g as Zr, h as ei, k as ti, i as jn, l as An, _ as N, m as Ae, o as ni, p as Ie, q as ri, r as ii, t as oi } from "./utilCryptoChunk-CIPUtfoO.js";
7
+ function si(n, e) {
8
+ for (var t = 0; t < e.length; t++) {
9
+ const r = e[t];
10
+ if (typeof r != "string" && !Array.isArray(r)) {
11
+ for (const i in r)
12
+ if (i !== "default" && !(i in n)) {
13
+ const o = Object.getOwnPropertyDescriptor(r, i);
14
+ o && Object.defineProperty(n, i, o.get ? o : {
15
+ enumerable: !0,
16
+ get: () => r[i]
17
+ });
18
+ }
19
+ }
20
+ }
21
+ return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
22
+ }
23
+ const ha = (n) => new Promise((e) => setTimeout(e, n)), pa = (n, e) => {
24
+ let t = 0;
25
+ const r = "0".repeat(e);
26
+ for (; ; ) {
27
+ const i = new TextEncoder().encode(t + n);
28
+ if (ai(_r(i)).startsWith(r))
29
+ return t;
30
+ t += 1;
31
+ }
32
+ }, ai = (n) => Array.from(n).map((e) => e.toString(16).padStart(2, "0")).join("");
33
+ function ga(n, e, t) {
34
+ if (n.length === 0)
35
+ throw new Error("Array is empty");
36
+ if (!Number.isFinite(e))
37
+ throw new Error(`Index ${e} is not a finite number`);
38
+ if (e > 0 ? e = e % n.length : e = Math.ceil(Math.abs(e) / n.length) * n.length + e, e >= n.length)
39
+ throw new Error(`Index ${e} larger than array length ${n.length}`);
40
+ if (e < 0)
41
+ throw new Error(`Index ${e} smaller than 0`);
42
+ return n[e];
43
+ }
44
+ const ui = (n) => Array.isArray(n) && n !== null, li = "dev", He = new Array(256), Nn = new Array(256 * 256);
45
+ for (let n = 0; n < 256; n++)
46
+ He[n] = n.toString(16).padStart(2, "0");
47
+ for (let n = 0; n < 256; n++) {
48
+ const e = n << 8;
49
+ for (let t = 0; t < 256; t++)
50
+ Nn[e | t] = He[n] + He[t];
51
+ }
52
+ function ot(n, e) {
53
+ const t = n.length % 2 | 0, r = n.length - t | 0;
54
+ for (let i = 0; i < r; i += 2)
55
+ e += Nn[n[i] << 8 | n[i + 1]];
56
+ return t && (e += He[n[r] | 0]), e;
57
+ }
58
+ function Ye(n, e = -1, t = !0) {
59
+ const r = t ? "0x" : "";
60
+ if (!(n != null && n.length))
61
+ return r;
62
+ if (e > 0) {
63
+ const i = Math.ceil(e / 8);
64
+ if (n.length > i)
65
+ return `${ot(n.subarray(0, i / 2), r)}…${ot(n.subarray(n.length - i / 2), "")}`;
66
+ }
67
+ return ot(n, r);
68
+ }
69
+ const ma = (n) => ui(n) ? Ye(new Uint8Array(n)) : n.toString();
70
+ var p;
71
+ (function(n) {
72
+ n.datasetId = "datasetId", n.user = "user", n.dapp = "dapp", n.provider = "provider", n.blockNumber = "blockNumber", n.requestHash = "requestHash", n.captchas = "captchas", n.commitmentId = "commitmentId", n.proof = "proof", n.dappSignature = "dappSignature", n.dappUserSignature = "dappUserSignature", n.providerUrl = "providerUrl", n.procaptchaResponse = "procaptcha-response", n.verifiedTimeout = "verifiedTimeout", n.maxVerifiedTime = "maxVerifiedTime", n.verified = "verified", n.status = "status", n.challenge = "challenge", n.difficulty = "difficulty", n.nonce = "nonce", n.timeouts = "timeouts", n.token = "token", n.secret = "secret", n.timestamp = "timestamp", n.signature = "signature", n.error = "error", n.siteKey = "siteKey", n.captchaType = "captchaType", n.sessionId = "sessionId", n.settings = "settings", n.domains = "domains", n.frictionlessThreshold = "frictionlessThreshold", n.powDifficulty = "powDifficulty", n.score = "score", n.tier = "tier", n.detectorKey = "detectorKey", n.ip = "ip";
73
+ })(p || (p = {}));
74
+ var Ve;
75
+ (function(n) {
76
+ n.Free = "free", n.Professional = "professional", n.Enterprise = "enterprise";
77
+ })(Ve || (Ve = {}));
78
+ R.nativeEnum(Ve);
79
+ var be;
80
+ (function(n) {
81
+ n.image = "image", n.pow = "pow", n.frictionless = "frictionless", n.invisible = "invisible";
82
+ })(be || (be = {}));
83
+ R.nativeEnum(be);
84
+ const ci = Te(be), fi = be.frictionless, di = [], hi = 0.5, pi = 4, gi = 0.8, mi = y({
85
+ captchaType: ci.optional().default(fi),
86
+ domains: K(h()).optional().default([...di]),
87
+ frictionlessThreshold: S().optional().default(hi),
88
+ powDifficulty: S().optional().default(pi),
89
+ imageThreshold: S().optional().default(gi)
90
+ });
91
+ let st;
92
+ async function ya(n) {
93
+ return new Promise((e, t) => {
94
+ try {
95
+ Promise.resolve().then(() => es).then(({ default: r }) => {
96
+ st || (st = r()), e(st);
97
+ });
98
+ } catch (r) {
99
+ t(r);
100
+ }
101
+ });
102
+ }
103
+ const Un = {
104
+ arabic: "ar",
105
+ azerbaijani: "az",
106
+ czech: "cs",
107
+ german: "de",
108
+ greek: "el",
109
+ english: "en",
110
+ spanish: "es",
111
+ finnish: "fi",
112
+ french: "fr",
113
+ hindi: "hi",
114
+ hungarian: "hu",
115
+ indonesian: "id",
116
+ italian: "it",
117
+ japanese: "ja",
118
+ javanese: "jv",
119
+ korean: "ko",
120
+ malayalam: "ml",
121
+ malay: "ms",
122
+ dutch: "nl",
123
+ norwegian: "no",
124
+ polish: "pl",
125
+ portugeseBrazil: "pt-BR",
126
+ portuguese: "pt",
127
+ romanian: "ro",
128
+ russian: "ru",
129
+ serbian: "sr",
130
+ swedish: "sv",
131
+ thai: "th",
132
+ turkish: "tr",
133
+ ukrainian: "uk",
134
+ vietnamese: "vi",
135
+ chinese: "zh-CN"
136
+ }, Dn = R.enum(Object.values(Un));
137
+ var Fn = { exports: {} }, x = {};
138
+ var ke = Symbol.for("react.element"), yi = Symbol.for("react.portal"), vi = Symbol.for("react.fragment"), wi = Symbol.for("react.strict_mode"), bi = Symbol.for("react.profiler"), Si = Symbol.for("react.provider"), xi = Symbol.for("react.context"), Oi = Symbol.for("react.forward_ref"), Ei = Symbol.for("react.suspense"), Ci = Symbol.for("react.memo"), Ti = Symbol.for("react.lazy"), Ht = Symbol.iterator;
139
+ function ki(n) {
140
+ return n === null || typeof n != "object" ? null : (n = Ht && n[Ht] || n["@@iterator"], typeof n == "function" ? n : null);
141
+ }
142
+ var _n = { isMounted: function() {
143
+ return !1;
144
+ }, enqueueForceUpdate: function() {
145
+ }, enqueueReplaceState: function() {
146
+ }, enqueueSetState: function() {
147
+ } }, Mn = Object.assign, Hn = {};
148
+ function le(n, e, t) {
149
+ this.props = n, this.context = e, this.refs = Hn, this.updater = t || _n;
150
+ }
151
+ le.prototype.isReactComponent = {};
152
+ le.prototype.setState = function(n, e) {
153
+ if (typeof n != "object" && typeof n != "function" && n != null) throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
154
+ this.updater.enqueueSetState(this, n, e, "setState");
155
+ };
156
+ le.prototype.forceUpdate = function(n) {
157
+ this.updater.enqueueForceUpdate(this, n, "forceUpdate");
158
+ };
159
+ function Vn() {
160
+ }
161
+ Vn.prototype = le.prototype;
162
+ function Tt(n, e, t) {
163
+ this.props = n, this.context = e, this.refs = Hn, this.updater = t || _n;
164
+ }
165
+ var kt = Tt.prototype = new Vn();
166
+ kt.constructor = Tt;
167
+ Mn(kt, le.prototype);
168
+ kt.isPureReactComponent = !0;
169
+ var Vt = Array.isArray, Bn = Object.prototype.hasOwnProperty, Pt = { current: null }, Kn = { key: !0, ref: !0, __self: !0, __source: !0 };
170
+ function qn(n, e, t) {
171
+ var r, i = {}, o = null, s = null;
172
+ if (e != null) for (r in e.ref !== void 0 && (s = e.ref), e.key !== void 0 && (o = "" + e.key), e) Bn.call(e, r) && !Kn.hasOwnProperty(r) && (i[r] = e[r]);
173
+ var a = arguments.length - 2;
174
+ if (a === 1) i.children = t;
175
+ else if (1 < a) {
176
+ for (var u = Array(a), c = 0; c < a; c++) u[c] = arguments[c + 2];
177
+ i.children = u;
178
+ }
179
+ if (n && n.defaultProps) for (r in a = n.defaultProps, a) i[r] === void 0 && (i[r] = a[r]);
180
+ return { $$typeof: ke, type: n, key: o, ref: s, props: i, _owner: Pt.current };
181
+ }
182
+ function Pi(n, e) {
183
+ return { $$typeof: ke, type: n.type, key: e, ref: n.ref, props: n.props, _owner: n._owner };
184
+ }
185
+ function Lt(n) {
186
+ return typeof n == "object" && n !== null && n.$$typeof === ke;
187
+ }
188
+ function Li(n) {
189
+ var e = { "=": "=0", ":": "=2" };
190
+ return "$" + n.replace(/[=:]/g, function(t) {
191
+ return e[t];
192
+ });
193
+ }
194
+ var Bt = /\/+/g;
195
+ function at(n, e) {
196
+ return typeof n == "object" && n !== null && n.key != null ? Li("" + n.key) : e.toString(36);
197
+ }
198
+ function Ne(n, e, t, r, i) {
199
+ var o = typeof n;
200
+ (o === "undefined" || o === "boolean") && (n = null);
201
+ var s = !1;
202
+ if (n === null) s = !0;
203
+ else switch (o) {
204
+ case "string":
205
+ case "number":
206
+ s = !0;
207
+ break;
208
+ case "object":
209
+ switch (n.$$typeof) {
210
+ case ke:
211
+ case yi:
212
+ s = !0;
213
+ }
214
+ }
215
+ if (s) return s = n, i = i(s), n = r === "" ? "." + at(s, 0) : r, Vt(i) ? (t = "", n != null && (t = n.replace(Bt, "$&/") + "/"), Ne(i, e, t, "", function(c) {
216
+ return c;
217
+ })) : i != null && (Lt(i) && (i = Pi(i, t + (!i.key || s && s.key === i.key ? "" : ("" + i.key).replace(Bt, "$&/") + "/") + n)), e.push(i)), 1;
218
+ if (s = 0, r = r === "" ? "." : r + ":", Vt(n)) for (var a = 0; a < n.length; a++) {
219
+ o = n[a];
220
+ var u = r + at(o, a);
221
+ s += Ne(o, e, t, u, i);
222
+ }
223
+ else if (u = ki(n), typeof u == "function") for (n = u.call(n), a = 0; !(o = n.next()).done; ) o = o.value, u = r + at(o, a++), s += Ne(o, e, t, u, i);
224
+ else if (o === "object") throw e = String(n), Error("Objects are not valid as a React child (found: " + (e === "[object Object]" ? "object with keys {" + Object.keys(n).join(", ") + "}" : e) + "). If you meant to render a collection of children, use an array instead.");
225
+ return s;
226
+ }
227
+ function Re(n, e, t) {
228
+ if (n == null) return n;
229
+ var r = [], i = 0;
230
+ return Ne(n, r, "", "", function(o) {
231
+ return e.call(t, o, i++);
232
+ }), r;
233
+ }
234
+ function Ii(n) {
235
+ if (n._status === -1) {
236
+ var e = n._result;
237
+ e = e(), e.then(function(t) {
238
+ (n._status === 0 || n._status === -1) && (n._status = 1, n._result = t);
239
+ }, function(t) {
240
+ (n._status === 0 || n._status === -1) && (n._status = 2, n._result = t);
241
+ }), n._status === -1 && (n._status = 0, n._result = e);
242
+ }
243
+ if (n._status === 1) return n._result.default;
244
+ throw n._result;
245
+ }
246
+ var $ = { current: null }, Ue = { transition: null }, Ri = { ReactCurrentDispatcher: $, ReactCurrentBatchConfig: Ue, ReactCurrentOwner: Pt };
247
+ function zn() {
248
+ throw Error("act(...) is not supported in production builds of React.");
249
+ }
250
+ x.Children = { map: Re, forEach: function(n, e, t) {
251
+ Re(n, function() {
252
+ e.apply(this, arguments);
253
+ }, t);
254
+ }, count: function(n) {
255
+ var e = 0;
256
+ return Re(n, function() {
257
+ e++;
258
+ }), e;
259
+ }, toArray: function(n) {
260
+ return Re(n, function(e) {
261
+ return e;
262
+ }) || [];
263
+ }, only: function(n) {
264
+ if (!Lt(n)) throw Error("React.Children.only expected to receive a single React element child.");
265
+ return n;
266
+ } };
267
+ x.Component = le;
268
+ x.Fragment = vi;
269
+ x.Profiler = bi;
270
+ x.PureComponent = Tt;
271
+ x.StrictMode = wi;
272
+ x.Suspense = Ei;
273
+ x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Ri;
274
+ x.act = zn;
275
+ x.cloneElement = function(n, e, t) {
276
+ if (n == null) throw Error("React.cloneElement(...): The argument must be a React element, but you passed " + n + ".");
277
+ var r = Mn({}, n.props), i = n.key, o = n.ref, s = n._owner;
278
+ if (e != null) {
279
+ if (e.ref !== void 0 && (o = e.ref, s = Pt.current), e.key !== void 0 && (i = "" + e.key), n.type && n.type.defaultProps) var a = n.type.defaultProps;
280
+ for (u in e) Bn.call(e, u) && !Kn.hasOwnProperty(u) && (r[u] = e[u] === void 0 && a !== void 0 ? a[u] : e[u]);
281
+ }
282
+ var u = arguments.length - 2;
283
+ if (u === 1) r.children = t;
284
+ else if (1 < u) {
285
+ a = Array(u);
286
+ for (var c = 0; c < u; c++) a[c] = arguments[c + 2];
287
+ r.children = a;
288
+ }
289
+ return { $$typeof: ke, type: n.type, key: i, ref: o, props: r, _owner: s };
290
+ };
291
+ x.createContext = function(n) {
292
+ return n = { $$typeof: xi, _currentValue: n, _currentValue2: n, _threadCount: 0, Provider: null, Consumer: null, _defaultValue: null, _globalName: null }, n.Provider = { $$typeof: Si, _context: n }, n.Consumer = n;
293
+ };
294
+ x.createElement = qn;
295
+ x.createFactory = function(n) {
296
+ var e = qn.bind(null, n);
297
+ return e.type = n, e;
298
+ };
299
+ x.createRef = function() {
300
+ return { current: null };
301
+ };
302
+ x.forwardRef = function(n) {
303
+ return { $$typeof: Oi, render: n };
304
+ };
305
+ x.isValidElement = Lt;
306
+ x.lazy = function(n) {
307
+ return { $$typeof: Ti, _payload: { _status: -1, _result: n }, _init: Ii };
308
+ };
309
+ x.memo = function(n, e) {
310
+ return { $$typeof: Ci, type: n, compare: e === void 0 ? null : e };
311
+ };
312
+ x.startTransition = function(n) {
313
+ var e = Ue.transition;
314
+ Ue.transition = {};
315
+ try {
316
+ n();
317
+ } finally {
318
+ Ue.transition = e;
319
+ }
320
+ };
321
+ x.unstable_act = zn;
322
+ x.useCallback = function(n, e) {
323
+ return $.current.useCallback(n, e);
324
+ };
325
+ x.useContext = function(n) {
326
+ return $.current.useContext(n);
327
+ };
328
+ x.useDebugValue = function() {
329
+ };
330
+ x.useDeferredValue = function(n) {
331
+ return $.current.useDeferredValue(n);
332
+ };
333
+ x.useEffect = function(n, e) {
334
+ return $.current.useEffect(n, e);
335
+ };
336
+ x.useId = function() {
337
+ return $.current.useId();
338
+ };
339
+ x.useImperativeHandle = function(n, e, t) {
340
+ return $.current.useImperativeHandle(n, e, t);
341
+ };
342
+ x.useInsertionEffect = function(n, e) {
343
+ return $.current.useInsertionEffect(n, e);
344
+ };
345
+ x.useLayoutEffect = function(n, e) {
346
+ return $.current.useLayoutEffect(n, e);
347
+ };
348
+ x.useMemo = function(n, e) {
349
+ return $.current.useMemo(n, e);
350
+ };
351
+ x.useReducer = function(n, e, t) {
352
+ return $.current.useReducer(n, e, t);
353
+ };
354
+ x.useRef = function(n) {
355
+ return $.current.useRef(n);
356
+ };
357
+ x.useState = function(n) {
358
+ return $.current.useState(n);
359
+ };
360
+ x.useSyncExternalStore = function(n, e, t) {
361
+ return $.current.useSyncExternalStore(n, e, t);
362
+ };
363
+ x.useTransition = function() {
364
+ return $.current.useTransition();
365
+ };
366
+ x.version = "18.3.1";
367
+ Fn.exports = x;
368
+ var _ = Fn.exports;
369
+ const $i = /* @__PURE__ */ Mr(_), va = /* @__PURE__ */ si({
370
+ __proto__: null,
371
+ default: $i
372
+ }, [_]), ji = (n, e, t, r) => {
373
+ var o, s, a, u;
374
+ const i = [t, {
375
+ code: e,
376
+ ...r || {}
377
+ }];
378
+ if ((s = (o = n == null ? void 0 : n.services) == null ? void 0 : o.logger) != null && s.forward)
379
+ return n.services.logger.forward(i, "warn", "react-i18next::", !0);
380
+ Q(i[0]) && (i[0] = `react-i18next:: ${i[0]}`), (u = (a = n == null ? void 0 : n.services) == null ? void 0 : a.logger) != null && u.warn ? n.services.logger.warn(...i) : console != null && console.warn && [...i];
381
+ }, Kt = {}, pt = (n, e, t, r) => {
382
+ Q(t) && Kt[t] || (Q(t) && (Kt[t] = /* @__PURE__ */ new Date()), ji(n, e, t, r));
383
+ }, Wn = (n, e) => () => {
384
+ if (n.isInitialized)
385
+ e();
386
+ else {
387
+ const t = () => {
388
+ setTimeout(() => {
389
+ n.off("initialized", t);
390
+ }, 0), e();
391
+ };
392
+ n.on("initialized", t);
393
+ }
394
+ }, gt = (n, e, t) => {
395
+ n.loadNamespaces(e, Wn(n, t));
396
+ }, qt = (n, e, t, r) => {
397
+ if (Q(t) && (t = [t]), n.options.preload && n.options.preload.indexOf(e) > -1) return gt(n, t, r);
398
+ t.forEach((i) => {
399
+ n.options.ns.indexOf(i) < 0 && n.options.ns.push(i);
400
+ }), n.loadLanguages(e, Wn(n, r));
401
+ }, Ai = (n, e, t = {}) => !e.languages || !e.languages.length ? (pt(e, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
402
+ languages: e.languages
403
+ }), !0) : e.hasLoadedNamespace(n, {
404
+ lng: t.lng,
405
+ precheck: (r, i) => {
406
+ var o;
407
+ if (((o = t.bindI18n) == null ? void 0 : o.indexOf("languageChanging")) > -1 && r.services.backendConnector.backend && r.isLanguageChangingTo && !i(r.isLanguageChangingTo, n)) return !1;
408
+ }
409
+ }), Q = (n) => typeof n == "string", Ni = (n) => typeof n == "object" && n !== null, Ui = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Di = {
410
+ "&amp;": "&",
411
+ "&#38;": "&",
412
+ "&lt;": "<",
413
+ "&#60;": "<",
414
+ "&gt;": ">",
415
+ "&#62;": ">",
416
+ "&apos;": "'",
417
+ "&#39;": "'",
418
+ "&quot;": '"',
419
+ "&#34;": '"',
420
+ "&nbsp;": " ",
421
+ "&#160;": " ",
422
+ "&copy;": "©",
423
+ "&#169;": "©",
424
+ "&reg;": "®",
425
+ "&#174;": "®",
426
+ "&hellip;": "…",
427
+ "&#8230;": "…",
428
+ "&#x2F;": "/",
429
+ "&#47;": "/"
430
+ }, Fi = (n) => Di[n], _i = (n) => n.replace(Ui, Fi);
431
+ let mt = {
432
+ bindI18n: "languageChanged",
433
+ bindI18nStore: "",
434
+ transEmptyNodeValue: "",
435
+ transSupportBasicHtmlNodes: !0,
436
+ transWrapTextNodes: "",
437
+ transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
438
+ useSuspense: !0,
439
+ unescape: _i
440
+ };
441
+ const Mi = (n = {}) => {
442
+ mt = {
443
+ ...mt,
444
+ ...n
445
+ };
446
+ }, Hi = () => mt;
447
+ let Jn;
448
+ const Vi = (n) => {
449
+ Jn = n;
450
+ }, Bi = () => Jn, Ki = {
451
+ type: "3rdParty",
452
+ init(n) {
453
+ Mi(n.options.react), Vi(n);
454
+ }
455
+ }, qi = _.createContext();
456
+ class zi {
457
+ constructor() {
458
+ this.usedNamespaces = {};
459
+ }
460
+ addUsedNamespaces(e) {
461
+ e.forEach((t) => {
462
+ this.usedNamespaces[t] || (this.usedNamespaces[t] = !0);
463
+ });
464
+ }
465
+ getUsedNamespaces() {
466
+ return Object.keys(this.usedNamespaces);
467
+ }
468
+ }
469
+ const Wi = (n, e) => {
470
+ const t = _.useRef();
471
+ return _.useEffect(() => {
472
+ t.current = n;
473
+ }, [n, e]), t.current;
474
+ }, Gn = (n, e, t, r) => n.getFixedT(e, t, r), Ji = (n, e, t, r) => _.useCallback(Gn(n, e, t, r), [n, e, t, r]), Gi = (n, e = {}) => {
475
+ var j, W, J, P;
476
+ const {
477
+ i18n: t
478
+ } = e, {
479
+ i18n: r,
480
+ defaultNS: i
481
+ } = _.useContext(qi) || {}, o = t || r || Bi();
482
+ if (o && !o.reportNamespaces && (o.reportNamespaces = new zi()), !o) {
483
+ pt(o, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
484
+ const O = (I, C) => Q(C) ? C : Ni(C) && Q(C.defaultValue) ? C.defaultValue : Array.isArray(I) ? I[I.length - 1] : I, L = [O, {}, !1];
485
+ return L.t = O, L.i18n = {}, L.ready = !1, L;
486
+ }
487
+ (j = o.options.react) != null && j.wait && pt(o, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
488
+ const s = {
489
+ ...Hi(),
490
+ ...o.options.react,
491
+ ...e
492
+ }, {
493
+ useSuspense: a,
494
+ keyPrefix: u
495
+ } = s;
496
+ let c = n || i || ((W = o.options) == null ? void 0 : W.defaultNS);
497
+ c = Q(c) ? [c] : c || ["translation"], (P = (J = o.reportNamespaces).addUsedNamespaces) == null || P.call(J, c);
498
+ const l = (o.isInitialized || o.initializedStoreOnce) && c.every((O) => Ai(O, o, s)), f = Ji(o, e.lng || null, s.nsMode === "fallback" ? c : c[0], u), d = () => f, g = () => Gn(o, e.lng || null, s.nsMode === "fallback" ? c : c[0], u), [m, v] = _.useState(d);
499
+ let w = c.join();
500
+ e.lng && (w = `${e.lng}${w}`);
501
+ const k = Wi(w), E = _.useRef(!0);
502
+ _.useEffect(() => {
503
+ const {
504
+ bindI18n: O,
505
+ bindI18nStore: L
506
+ } = s;
507
+ E.current = !0, !l && !a && (e.lng ? qt(o, e.lng, c, () => {
508
+ E.current && v(g);
509
+ }) : gt(o, c, () => {
510
+ E.current && v(g);
511
+ })), l && k && k !== w && E.current && v(g);
512
+ const I = () => {
513
+ E.current && v(g);
514
+ };
515
+ return O && (o == null || o.on(O, I)), L && (o == null || o.store.on(L, I)), () => {
516
+ E.current = !1, o && (O == null || O.split(" ").forEach((C) => o.off(C, I))), L && o && L.split(" ").forEach((C) => o.store.off(C, I));
517
+ };
518
+ }, [o, w]), _.useEffect(() => {
519
+ E.current && l && v(d);
520
+ }, [o, u, l]);
521
+ const T = [m, o, l];
522
+ if (T.t = m, T.i18n = o, T.ready = l, l || !l && !a) return T;
523
+ throw new Promise((O) => {
524
+ e.lng ? qt(o, e.lng, c, () => O()) : gt(o, c, () => O());
525
+ });
526
+ }, b = (n) => typeof n == "string", de = () => {
527
+ let n, e;
528
+ const t = new Promise((r, i) => {
529
+ n = r, e = i;
530
+ });
531
+ return t.resolve = n, t.reject = e, t;
532
+ }, zt = (n) => n == null ? "" : "" + n, Xi = (n, e, t) => {
533
+ n.forEach((r) => {
534
+ e[r] && (t[r] = e[r]);
535
+ });
536
+ }, Yi = /###/g, Wt = (n) => n && n.indexOf("###") > -1 ? n.replace(Yi, ".") : n, Jt = (n) => !n || b(n), ve = (n, e, t) => {
537
+ const r = b(e) ? e.split(".") : e;
538
+ let i = 0;
539
+ for (; i < r.length - 1; ) {
540
+ if (Jt(n)) return {};
541
+ const o = Wt(r[i]);
542
+ !n[o] && t && (n[o] = new t()), Object.prototype.hasOwnProperty.call(n, o) ? n = n[o] : n = {}, ++i;
543
+ }
544
+ return Jt(n) ? {} : {
545
+ obj: n,
546
+ k: Wt(r[i])
547
+ };
548
+ }, Gt = (n, e, t) => {
549
+ const {
550
+ obj: r,
551
+ k: i
552
+ } = ve(n, e, Object);
553
+ if (r !== void 0 || e.length === 1) {
554
+ r[i] = t;
555
+ return;
556
+ }
557
+ let o = e[e.length - 1], s = e.slice(0, e.length - 1), a = ve(n, s, Object);
558
+ for (; a.obj === void 0 && s.length; )
559
+ o = `${s[s.length - 1]}.${o}`, s = s.slice(0, s.length - 1), a = ve(n, s, Object), a != null && a.obj && typeof a.obj[`${a.k}.${o}`] < "u" && (a.obj = void 0);
560
+ a.obj[`${a.k}.${o}`] = t;
561
+ }, Qi = (n, e, t, r) => {
562
+ const {
563
+ obj: i,
564
+ k: o
565
+ } = ve(n, e, Object);
566
+ i[o] = i[o] || [], i[o].push(t);
567
+ }, Be = (n, e) => {
568
+ const {
569
+ obj: t,
570
+ k: r
571
+ } = ve(n, e);
572
+ if (t && Object.prototype.hasOwnProperty.call(t, r))
573
+ return t[r];
574
+ }, Zi = (n, e, t) => {
575
+ const r = Be(n, t);
576
+ return r !== void 0 ? r : Be(e, t);
577
+ }, Xn = (n, e, t) => {
578
+ for (const r in e)
579
+ r !== "__proto__" && r !== "constructor" && (r in n ? b(n[r]) || n[r] instanceof String || b(e[r]) || e[r] instanceof String ? t && (n[r] = e[r]) : Xn(n[r], e[r], t) : n[r] = e[r]);
580
+ return n;
581
+ }, te = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
582
+ var eo = {
583
+ "&": "&amp;",
584
+ "<": "&lt;",
585
+ ">": "&gt;",
586
+ '"': "&quot;",
587
+ "'": "&#39;",
588
+ "/": "&#x2F;"
589
+ };
590
+ const to = (n) => b(n) ? n.replace(/[&<>"'\/]/g, (e) => eo[e]) : n;
591
+ class no {
592
+ constructor(e) {
593
+ this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
594
+ }
595
+ getRegExp(e) {
596
+ const t = this.regExpMap.get(e);
597
+ if (t !== void 0)
598
+ return t;
599
+ const r = new RegExp(e);
600
+ return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, r), this.regExpQueue.push(e), r;
601
+ }
602
+ }
603
+ const ro = [" ", ",", "?", "!", ";"], io = new no(20), oo = (n, e, t) => {
604
+ e = e || "", t = t || "";
605
+ const r = ro.filter((s) => e.indexOf(s) < 0 && t.indexOf(s) < 0);
606
+ if (r.length === 0) return !0;
607
+ const i = io.getRegExp(`(${r.map((s) => s === "?" ? "\\?" : s).join("|")})`);
608
+ let o = !i.test(n);
609
+ if (!o) {
610
+ const s = n.indexOf(t);
611
+ s > 0 && !i.test(n.substring(0, s)) && (o = !0);
612
+ }
613
+ return o;
614
+ }, yt = function(n, e) {
615
+ let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
616
+ if (!n) return;
617
+ if (n[e])
618
+ return Object.prototype.hasOwnProperty.call(n, e) ? n[e] : void 0;
619
+ const r = e.split(t);
620
+ let i = n;
621
+ for (let o = 0; o < r.length; ) {
622
+ if (!i || typeof i != "object")
623
+ return;
624
+ let s, a = "";
625
+ for (let u = o; u < r.length; ++u)
626
+ if (u !== o && (a += t), a += r[u], s = i[a], s !== void 0) {
627
+ if (["string", "number", "boolean"].indexOf(typeof s) > -1 && u < r.length - 1)
628
+ continue;
629
+ o += u - o + 1;
630
+ break;
631
+ }
632
+ i = s;
633
+ }
634
+ return i;
635
+ }, Ke = (n) => n == null ? void 0 : n.replace("_", "-"), so = {
636
+ type: "logger",
637
+ log(n) {
638
+ this.output("log", n);
639
+ },
640
+ warn(n) {
641
+ this.output("warn", n);
642
+ },
643
+ error(n) {
644
+ this.output("error", n);
645
+ },
646
+ output(n, e) {
647
+ var t, r;
648
+ (r = (t = console == null ? void 0 : console[n]) == null ? void 0 : t.apply) == null || r.call(t, console, e);
649
+ }
650
+ };
651
+ class qe {
652
+ constructor(e) {
653
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
654
+ this.init(e, t);
655
+ }
656
+ init(e) {
657
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
658
+ this.prefix = t.prefix || "i18next:", this.logger = e || so, this.options = t, this.debug = t.debug;
659
+ }
660
+ log() {
661
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
662
+ t[r] = arguments[r];
663
+ return this.forward(t, "log", "", !0);
664
+ }
665
+ warn() {
666
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
667
+ t[r] = arguments[r];
668
+ return this.forward(t, "warn", "", !0);
669
+ }
670
+ error() {
671
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
672
+ t[r] = arguments[r];
673
+ return this.forward(t, "error", "");
674
+ }
675
+ deprecate() {
676
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
677
+ t[r] = arguments[r];
678
+ return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
679
+ }
680
+ forward(e, t, r, i) {
681
+ return i && !this.debug ? null : (b(e[0]) && (e[0] = `${r}${this.prefix} ${e[0]}`), this.logger[t](e));
682
+ }
683
+ create(e) {
684
+ return new qe(this.logger, {
685
+ prefix: `${this.prefix}:${e}:`,
686
+ ...this.options
687
+ });
688
+ }
689
+ clone(e) {
690
+ return e = e || this.options, e.prefix = e.prefix || this.prefix, new qe(this.logger, e);
691
+ }
692
+ }
693
+ var B = new qe();
694
+ class Qe {
695
+ constructor() {
696
+ this.observers = {};
697
+ }
698
+ on(e, t) {
699
+ return e.split(" ").forEach((r) => {
700
+ this.observers[r] || (this.observers[r] = /* @__PURE__ */ new Map());
701
+ const i = this.observers[r].get(t) || 0;
702
+ this.observers[r].set(t, i + 1);
703
+ }), this;
704
+ }
705
+ off(e, t) {
706
+ if (this.observers[e]) {
707
+ if (!t) {
708
+ delete this.observers[e];
709
+ return;
710
+ }
711
+ this.observers[e].delete(t);
712
+ }
713
+ }
714
+ emit(e) {
715
+ for (var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
716
+ r[i - 1] = arguments[i];
717
+ this.observers[e] && Array.from(this.observers[e].entries()).forEach((s) => {
718
+ let [a, u] = s;
719
+ for (let c = 0; c < u; c++)
720
+ a(...r);
721
+ }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((s) => {
722
+ let [a, u] = s;
723
+ for (let c = 0; c < u; c++)
724
+ a.apply(a, [e, ...r]);
725
+ });
726
+ }
727
+ }
728
+ class Xt extends Qe {
729
+ constructor(e) {
730
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
731
+ ns: ["translation"],
732
+ defaultNS: "translation"
733
+ };
734
+ super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
735
+ }
736
+ addNamespaces(e) {
737
+ this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
738
+ }
739
+ removeNamespaces(e) {
740
+ const t = this.options.ns.indexOf(e);
741
+ t > -1 && this.options.ns.splice(t, 1);
742
+ }
743
+ getResource(e, t, r) {
744
+ var c, l;
745
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
746
+ const o = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, s = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
747
+ let a;
748
+ e.indexOf(".") > -1 ? a = e.split(".") : (a = [e, t], r && (Array.isArray(r) ? a.push(...r) : b(r) && o ? a.push(...r.split(o)) : a.push(r)));
749
+ const u = Be(this.data, a);
750
+ return !u && !t && !r && e.indexOf(".") > -1 && (e = a[0], t = a[1], r = a.slice(2).join(".")), u || !s || !b(r) ? u : yt((l = (c = this.data) == null ? void 0 : c[e]) == null ? void 0 : l[t], r, o);
751
+ }
752
+ addResource(e, t, r, i) {
753
+ let o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
754
+ silent: !1
755
+ };
756
+ const s = o.keySeparator !== void 0 ? o.keySeparator : this.options.keySeparator;
757
+ let a = [e, t];
758
+ r && (a = a.concat(s ? r.split(s) : r)), e.indexOf(".") > -1 && (a = e.split("."), i = t, t = a[1]), this.addNamespaces(t), Gt(this.data, a, i), o.silent || this.emit("added", e, t, r, i);
759
+ }
760
+ addResources(e, t, r) {
761
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
762
+ silent: !1
763
+ };
764
+ for (const o in r)
765
+ (b(r[o]) || Array.isArray(r[o])) && this.addResource(e, t, o, r[o], {
766
+ silent: !0
767
+ });
768
+ i.silent || this.emit("added", e, t, r);
769
+ }
770
+ addResourceBundle(e, t, r, i, o) {
771
+ let s = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
772
+ silent: !1,
773
+ skipCopy: !1
774
+ }, a = [e, t];
775
+ e.indexOf(".") > -1 && (a = e.split("."), i = r, r = t, t = a[1]), this.addNamespaces(t);
776
+ let u = Be(this.data, a) || {};
777
+ s.skipCopy || (r = JSON.parse(JSON.stringify(r))), i ? Xn(u, r, o) : u = {
778
+ ...u,
779
+ ...r
780
+ }, Gt(this.data, a, u), s.silent || this.emit("added", e, t, r);
781
+ }
782
+ removeResourceBundle(e, t) {
783
+ this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
784
+ }
785
+ hasResourceBundle(e, t) {
786
+ return this.getResource(e, t) !== void 0;
787
+ }
788
+ getResourceBundle(e, t) {
789
+ return t || (t = this.options.defaultNS), this.getResource(e, t);
790
+ }
791
+ getDataByLanguage(e) {
792
+ return this.data[e];
793
+ }
794
+ hasLanguageSomeTranslations(e) {
795
+ const t = this.getDataByLanguage(e);
796
+ return !!(t && Object.keys(t) || []).find((i) => t[i] && Object.keys(t[i]).length > 0);
797
+ }
798
+ toJSON() {
799
+ return this.data;
800
+ }
801
+ }
802
+ var Yn = {
803
+ processors: {},
804
+ addPostProcessor(n) {
805
+ this.processors[n.name] = n;
806
+ },
807
+ handle(n, e, t, r, i) {
808
+ return n.forEach((o) => {
809
+ var s;
810
+ e = ((s = this.processors[o]) == null ? void 0 : s.process(e, t, r, i)) ?? e;
811
+ }), e;
812
+ }
813
+ };
814
+ const Yt = {}, Qt = (n) => !b(n) && typeof n != "boolean" && typeof n != "number";
815
+ class ze extends Qe {
816
+ constructor(e) {
817
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
818
+ super(), Xi(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = B.create("translator");
819
+ }
820
+ changeLanguage(e) {
821
+ e && (this.language = e);
822
+ }
823
+ exists(e) {
824
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
825
+ interpolation: {}
826
+ };
827
+ if (e == null)
828
+ return !1;
829
+ const r = this.resolve(e, t);
830
+ return (r == null ? void 0 : r.res) !== void 0;
831
+ }
832
+ extractFromKey(e, t) {
833
+ let r = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
834
+ r === void 0 && (r = ":");
835
+ const i = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
836
+ let o = t.ns || this.options.defaultNS || [];
837
+ const s = r && e.indexOf(r) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !oo(e, r, i);
838
+ if (s && !a) {
839
+ const u = e.match(this.interpolator.nestingRegexp);
840
+ if (u && u.length > 0)
841
+ return {
842
+ key: e,
843
+ namespaces: b(o) ? [o] : o
844
+ };
845
+ const c = e.split(r);
846
+ (r !== i || r === i && this.options.ns.indexOf(c[0]) > -1) && (o = c.shift()), e = c.join(i);
847
+ }
848
+ return {
849
+ key: e,
850
+ namespaces: b(o) ? [o] : o
851
+ };
852
+ }
853
+ translate(e, t, r) {
854
+ if (typeof t != "object" && this.options.overloadTranslationOptionHandler && (t = this.options.overloadTranslationOptionHandler(arguments)), typeof t == "object" && (t = {
855
+ ...t
856
+ }), t || (t = {}), e == null) return "";
857
+ Array.isArray(e) || (e = [String(e)]);
858
+ const i = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, o = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
859
+ key: s,
860
+ namespaces: a
861
+ } = this.extractFromKey(e[e.length - 1], t), u = a[a.length - 1], c = t.lng || this.language, l = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
862
+ if ((c == null ? void 0 : c.toLowerCase()) === "cimode") {
863
+ if (l) {
864
+ const C = t.nsSeparator || this.options.nsSeparator;
865
+ return i ? {
866
+ res: `${u}${C}${s}`,
867
+ usedKey: s,
868
+ exactUsedKey: s,
869
+ usedLng: c,
870
+ usedNS: u,
871
+ usedParams: this.getUsedParamsDetails(t)
872
+ } : `${u}${C}${s}`;
873
+ }
874
+ return i ? {
875
+ res: s,
876
+ usedKey: s,
877
+ exactUsedKey: s,
878
+ usedLng: c,
879
+ usedNS: u,
880
+ usedParams: this.getUsedParamsDetails(t)
881
+ } : s;
882
+ }
883
+ const f = this.resolve(e, t);
884
+ let d = f == null ? void 0 : f.res;
885
+ const g = (f == null ? void 0 : f.usedKey) || s, m = (f == null ? void 0 : f.exactUsedKey) || s, v = ["[object Number]", "[object Function]", "[object RegExp]"], w = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, k = !this.i18nFormat || this.i18nFormat.handleAsObject, E = t.count !== void 0 && !b(t.count), T = ze.hasDefaultValue(t), j = E ? this.pluralResolver.getSuffix(c, t.count, t) : "", W = t.ordinal && E ? this.pluralResolver.getSuffix(c, t.count, {
886
+ ordinal: !1
887
+ }) : "", J = E && !t.ordinal && t.count === 0, P = J && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${j}`] || t[`defaultValue${W}`] || t.defaultValue;
888
+ let O = d;
889
+ k && !d && T && (O = P);
890
+ const L = Qt(O), I = Object.prototype.toString.apply(O);
891
+ if (k && O && L && v.indexOf(I) < 0 && !(b(w) && Array.isArray(O))) {
892
+ if (!t.returnObjects && !this.options.returnObjects) {
893
+ this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
894
+ const C = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, O, {
895
+ ...t,
896
+ ns: a
897
+ }) : `key '${s} (${this.language})' returned an object instead of string.`;
898
+ return i ? (f.res = C, f.usedParams = this.getUsedParamsDetails(t), f) : C;
899
+ }
900
+ if (o) {
901
+ const C = Array.isArray(O), D = C ? [] : {}, jt = C ? m : g;
902
+ for (const M in O)
903
+ if (Object.prototype.hasOwnProperty.call(O, M)) {
904
+ const q = `${jt}${o}${M}`;
905
+ T && !d ? D[M] = this.translate(q, {
906
+ ...t,
907
+ defaultValue: Qt(P) ? P[M] : void 0,
908
+ joinArrays: !1,
909
+ ns: a
910
+ }) : D[M] = this.translate(q, {
911
+ ...t,
912
+ joinArrays: !1,
913
+ ns: a
914
+ }), D[M] === q && (D[M] = O[M]);
915
+ }
916
+ d = D;
917
+ }
918
+ } else if (k && b(w) && Array.isArray(d))
919
+ d = d.join(w), d && (d = this.extendTranslation(d, e, t, r));
920
+ else {
921
+ let C = !1, D = !1;
922
+ !this.isValidLookup(d) && T && (C = !0, d = P), this.isValidLookup(d) || (D = !0, d = s);
923
+ const M = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && D ? void 0 : d, q = T && P !== d && this.options.updateMissing;
924
+ if (D || C || q) {
925
+ if (this.logger.log(q ? "updateKey" : "missingKey", c, u, s, q ? P : d), o) {
926
+ const A = this.resolve(s, {
927
+ ...t,
928
+ keySeparator: !1
929
+ });
930
+ A && A.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
931
+ }
932
+ let ce = [];
933
+ const Le = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
934
+ if (this.options.saveMissingTo === "fallback" && Le && Le[0])
935
+ for (let A = 0; A < Le.length; A++)
936
+ ce.push(Le[A]);
937
+ else this.options.saveMissingTo === "all" ? ce = this.languageUtils.toResolveHierarchy(t.lng || this.language) : ce.push(t.lng || this.language);
938
+ const At = (A, Y, fe) => {
939
+ var Ut;
940
+ const Nt = T && fe !== d ? fe : M;
941
+ this.options.missingKeyHandler ? this.options.missingKeyHandler(A, u, Y, Nt, q, t) : (Ut = this.backendConnector) != null && Ut.saveMissing && this.backendConnector.saveMissing(A, u, Y, Nt, q, t), this.emit("missingKey", A, u, Y, d);
942
+ };
943
+ this.options.saveMissing && (this.options.saveMissingPlurals && E ? ce.forEach((A) => {
944
+ const Y = this.pluralResolver.getSuffixes(A, t);
945
+ J && t[`defaultValue${this.options.pluralSeparator}zero`] && Y.indexOf(`${this.options.pluralSeparator}zero`) < 0 && Y.push(`${this.options.pluralSeparator}zero`), Y.forEach((fe) => {
946
+ At([A], s + fe, t[`defaultValue${fe}`] || P);
947
+ });
948
+ }) : At(ce, s, P));
949
+ }
950
+ d = this.extendTranslation(d, e, t, f, r), D && d === s && this.options.appendNamespaceToMissingKey && (d = `${u}:${s}`), (D || C) && this.options.parseMissingKeyHandler && (d = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${u}:${s}` : s, C ? d : void 0));
951
+ }
952
+ return i ? (f.res = d, f.usedParams = this.getUsedParamsDetails(t), f) : d;
953
+ }
954
+ extendTranslation(e, t, r, i, o) {
955
+ var c, l;
956
+ var s = this;
957
+ if ((c = this.i18nFormat) != null && c.parse)
958
+ e = this.i18nFormat.parse(e, {
959
+ ...this.options.interpolation.defaultVariables,
960
+ ...r
961
+ }, r.lng || this.language || i.usedLng, i.usedNS, i.usedKey, {
962
+ resolved: i
963
+ });
964
+ else if (!r.skipInterpolation) {
965
+ r.interpolation && this.interpolator.init({
966
+ ...r,
967
+ interpolation: {
968
+ ...this.options.interpolation,
969
+ ...r.interpolation
970
+ }
971
+ });
972
+ const f = b(e) && (((l = r == null ? void 0 : r.interpolation) == null ? void 0 : l.skipOnVariables) !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
973
+ let d;
974
+ if (f) {
975
+ const m = e.match(this.interpolator.nestingRegexp);
976
+ d = m && m.length;
977
+ }
978
+ let g = r.replace && !b(r.replace) ? r.replace : r;
979
+ if (this.options.interpolation.defaultVariables && (g = {
980
+ ...this.options.interpolation.defaultVariables,
981
+ ...g
982
+ }), e = this.interpolator.interpolate(e, g, r.lng || this.language || i.usedLng, r), f) {
983
+ const m = e.match(this.interpolator.nestingRegexp), v = m && m.length;
984
+ d < v && (r.nest = !1);
985
+ }
986
+ !r.lng && i && i.res && (r.lng = this.language || i.usedLng), r.nest !== !1 && (e = this.interpolator.nest(e, function() {
987
+ for (var m = arguments.length, v = new Array(m), w = 0; w < m; w++)
988
+ v[w] = arguments[w];
989
+ return (o == null ? void 0 : o[0]) === v[0] && !r.context ? (s.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${t[0]}`), null) : s.translate(...v, t);
990
+ }, r)), r.interpolation && this.interpolator.reset();
991
+ }
992
+ const a = r.postProcess || this.options.postProcess, u = b(a) ? [a] : a;
993
+ return e != null && (u != null && u.length) && r.applyPostProcessor !== !1 && (e = Yn.handle(u, e, t, this.options && this.options.postProcessPassResolved ? {
994
+ i18nResolved: {
995
+ ...i,
996
+ usedParams: this.getUsedParamsDetails(r)
997
+ },
998
+ ...r
999
+ } : r, this)), e;
1000
+ }
1001
+ resolve(e) {
1002
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r, i, o, s, a;
1003
+ return b(e) && (e = [e]), e.forEach((u) => {
1004
+ if (this.isValidLookup(r)) return;
1005
+ const c = this.extractFromKey(u, t), l = c.key;
1006
+ i = l;
1007
+ let f = c.namespaces;
1008
+ this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
1009
+ const d = t.count !== void 0 && !b(t.count), g = d && !t.ordinal && t.count === 0, m = t.context !== void 0 && (b(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
1010
+ f.forEach((w) => {
1011
+ var k, E;
1012
+ this.isValidLookup(r) || (a = w, !Yt[`${v[0]}-${w}`] && ((k = this.utils) != null && k.hasLoadedNamespace) && !((E = this.utils) != null && E.hasLoadedNamespace(a)) && (Yt[`${v[0]}-${w}`] = !0, this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), v.forEach((T) => {
1013
+ var J;
1014
+ if (this.isValidLookup(r)) return;
1015
+ s = T;
1016
+ const j = [l];
1017
+ if ((J = this.i18nFormat) != null && J.addLookupKeys)
1018
+ this.i18nFormat.addLookupKeys(j, l, T, w, t);
1019
+ else {
1020
+ let P;
1021
+ d && (P = this.pluralResolver.getSuffix(T, t.count, t));
1022
+ const O = `${this.options.pluralSeparator}zero`, L = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
1023
+ if (d && (j.push(l + P), t.ordinal && P.indexOf(L) === 0 && j.push(l + P.replace(L, this.options.pluralSeparator)), g && j.push(l + O)), m) {
1024
+ const I = `${l}${this.options.contextSeparator}${t.context}`;
1025
+ j.push(I), d && (j.push(I + P), t.ordinal && P.indexOf(L) === 0 && j.push(I + P.replace(L, this.options.pluralSeparator)), g && j.push(I + O));
1026
+ }
1027
+ }
1028
+ let W;
1029
+ for (; W = j.pop(); )
1030
+ this.isValidLookup(r) || (o = W, r = this.getResource(T, w, W, t));
1031
+ }));
1032
+ });
1033
+ }), {
1034
+ res: r,
1035
+ usedKey: i,
1036
+ exactUsedKey: o,
1037
+ usedLng: s,
1038
+ usedNS: a
1039
+ };
1040
+ }
1041
+ isValidLookup(e) {
1042
+ return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
1043
+ }
1044
+ getResource(e, t, r) {
1045
+ var o;
1046
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
1047
+ return (o = this.i18nFormat) != null && o.getResource ? this.i18nFormat.getResource(e, t, r, i) : this.resourceStore.getResource(e, t, r, i);
1048
+ }
1049
+ getUsedParamsDetails() {
1050
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1051
+ const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = e.replace && !b(e.replace);
1052
+ let i = r ? e.replace : e;
1053
+ if (r && typeof e.count < "u" && (i.count = e.count), this.options.interpolation.defaultVariables && (i = {
1054
+ ...this.options.interpolation.defaultVariables,
1055
+ ...i
1056
+ }), !r) {
1057
+ i = {
1058
+ ...i
1059
+ };
1060
+ for (const o of t)
1061
+ delete i[o];
1062
+ }
1063
+ return i;
1064
+ }
1065
+ static hasDefaultValue(e) {
1066
+ const t = "defaultValue";
1067
+ for (const r in e)
1068
+ if (Object.prototype.hasOwnProperty.call(e, r) && t === r.substring(0, t.length) && e[r] !== void 0)
1069
+ return !0;
1070
+ return !1;
1071
+ }
1072
+ }
1073
+ class Zt {
1074
+ constructor(e) {
1075
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = B.create("languageUtils");
1076
+ }
1077
+ getScriptPartFromCode(e) {
1078
+ if (e = Ke(e), !e || e.indexOf("-") < 0) return null;
1079
+ const t = e.split("-");
1080
+ return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
1081
+ }
1082
+ getLanguagePartFromCode(e) {
1083
+ if (e = Ke(e), !e || e.indexOf("-") < 0) return e;
1084
+ const t = e.split("-");
1085
+ return this.formatLanguageCode(t[0]);
1086
+ }
1087
+ formatLanguageCode(e) {
1088
+ if (b(e) && e.indexOf("-") > -1) {
1089
+ let t;
1090
+ try {
1091
+ t = Intl.getCanonicalLocales(e)[0];
1092
+ } catch {
1093
+ }
1094
+ return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e);
1095
+ }
1096
+ return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
1097
+ }
1098
+ isSupportedCode(e) {
1099
+ return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
1100
+ }
1101
+ getBestMatchFromCodes(e) {
1102
+ if (!e) return null;
1103
+ let t;
1104
+ return e.forEach((r) => {
1105
+ if (t) return;
1106
+ const i = this.formatLanguageCode(r);
1107
+ (!this.options.supportedLngs || this.isSupportedCode(i)) && (t = i);
1108
+ }), !t && this.options.supportedLngs && e.forEach((r) => {
1109
+ if (t) return;
1110
+ const i = this.getLanguagePartFromCode(r);
1111
+ if (this.isSupportedCode(i)) return t = i;
1112
+ t = this.options.supportedLngs.find((o) => {
1113
+ if (o === i) return o;
1114
+ if (!(o.indexOf("-") < 0 && i.indexOf("-") < 0) && (o.indexOf("-") > 0 && i.indexOf("-") < 0 && o.substring(0, o.indexOf("-")) === i || o.indexOf(i) === 0 && i.length > 1))
1115
+ return o;
1116
+ });
1117
+ }), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
1118
+ }
1119
+ getFallbackCodes(e, t) {
1120
+ if (!e) return [];
1121
+ if (typeof e == "function" && (e = e(t)), b(e) && (e = [e]), Array.isArray(e)) return e;
1122
+ if (!t) return e.default || [];
1123
+ let r = e[t];
1124
+ return r || (r = e[this.getScriptPartFromCode(t)]), r || (r = e[this.formatLanguageCode(t)]), r || (r = e[this.getLanguagePartFromCode(t)]), r || (r = e.default), r || [];
1125
+ }
1126
+ toResolveHierarchy(e, t) {
1127
+ const r = this.getFallbackCodes(t || this.options.fallbackLng || [], e), i = [], o = (s) => {
1128
+ s && (this.isSupportedCode(s) ? i.push(s) : this.logger.warn(`rejecting language code not found in supportedLngs: ${s}`));
1129
+ };
1130
+ return b(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && o(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && o(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && o(this.getLanguagePartFromCode(e))) : b(e) && o(this.formatLanguageCode(e)), r.forEach((s) => {
1131
+ i.indexOf(s) < 0 && o(this.formatLanguageCode(s));
1132
+ }), i;
1133
+ }
1134
+ }
1135
+ const en = {
1136
+ zero: 0,
1137
+ one: 1,
1138
+ two: 2,
1139
+ few: 3,
1140
+ many: 4,
1141
+ other: 5
1142
+ }, tn = {
1143
+ select: (n) => n === 1 ? "one" : "other",
1144
+ resolvedOptions: () => ({
1145
+ pluralCategories: ["one", "other"]
1146
+ })
1147
+ };
1148
+ class ao {
1149
+ constructor(e) {
1150
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1151
+ this.languageUtils = e, this.options = t, this.logger = B.create("pluralResolver"), this.pluralRulesCache = {};
1152
+ }
1153
+ addRule(e, t) {
1154
+ this.rules[e] = t;
1155
+ }
1156
+ clearCache() {
1157
+ this.pluralRulesCache = {};
1158
+ }
1159
+ getRule(e) {
1160
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1161
+ const r = Ke(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", o = JSON.stringify({
1162
+ cleanedCode: r,
1163
+ type: i
1164
+ });
1165
+ if (o in this.pluralRulesCache)
1166
+ return this.pluralRulesCache[o];
1167
+ let s;
1168
+ try {
1169
+ s = new Intl.PluralRules(r, {
1170
+ type: i
1171
+ });
1172
+ } catch {
1173
+ if (!Intl)
1174
+ return this.logger.error("No Intl support, please use an Intl polyfill!"), tn;
1175
+ if (!e.match(/-|_/)) return tn;
1176
+ const u = this.languageUtils.getLanguagePartFromCode(e);
1177
+ s = this.getRule(u, t);
1178
+ }
1179
+ return this.pluralRulesCache[o] = s, s;
1180
+ }
1181
+ needsPlural(e) {
1182
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = this.getRule(e, t);
1183
+ return r || (r = this.getRule("dev", t)), (r == null ? void 0 : r.resolvedOptions().pluralCategories.length) > 1;
1184
+ }
1185
+ getPluralFormsOfKey(e, t) {
1186
+ let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1187
+ return this.getSuffixes(e, r).map((i) => `${t}${i}`);
1188
+ }
1189
+ getSuffixes(e) {
1190
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = this.getRule(e, t);
1191
+ return r || (r = this.getRule("dev", t)), r ? r.resolvedOptions().pluralCategories.sort((i, o) => en[i] - en[o]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
1192
+ }
1193
+ getSuffix(e, t) {
1194
+ let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1195
+ const i = this.getRule(e, r);
1196
+ return i ? `${this.options.prepend}${r.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, r));
1197
+ }
1198
+ }
1199
+ const nn = function(n, e, t) {
1200
+ let r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = Zi(n, e, t);
1201
+ return !o && i && b(t) && (o = yt(n, t, r), o === void 0 && (o = yt(e, t, r))), o;
1202
+ }, ut = (n) => n.replace(/\$/g, "$$$$");
1203
+ class uo {
1204
+ constructor() {
1205
+ var t;
1206
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1207
+ this.logger = B.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((r) => r), this.init(e);
1208
+ }
1209
+ init() {
1210
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1211
+ e.interpolation || (e.interpolation = {
1212
+ escapeValue: !0
1213
+ });
1214
+ const {
1215
+ escape: t,
1216
+ escapeValue: r,
1217
+ useRawValueToEscape: i,
1218
+ prefix: o,
1219
+ prefixEscaped: s,
1220
+ suffix: a,
1221
+ suffixEscaped: u,
1222
+ formatSeparator: c,
1223
+ unescapeSuffix: l,
1224
+ unescapePrefix: f,
1225
+ nestingPrefix: d,
1226
+ nestingPrefixEscaped: g,
1227
+ nestingSuffix: m,
1228
+ nestingSuffixEscaped: v,
1229
+ nestingOptionsSeparator: w,
1230
+ maxReplaces: k,
1231
+ alwaysFormat: E
1232
+ } = e.interpolation;
1233
+ this.escape = t !== void 0 ? t : to, this.escapeValue = r !== void 0 ? r : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = o ? te(o) : s || "{{", this.suffix = a ? te(a) : u || "}}", this.formatSeparator = c || ",", this.unescapePrefix = l ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = d ? te(d) : g || te("$t("), this.nestingSuffix = m ? te(m) : v || te(")"), this.nestingOptionsSeparator = w || ",", this.maxReplaces = k || 1e3, this.alwaysFormat = E !== void 0 ? E : !1, this.resetRegExp();
1234
+ }
1235
+ reset() {
1236
+ this.options && this.init(this.options);
1237
+ }
1238
+ resetRegExp() {
1239
+ const e = (t, r) => (t == null ? void 0 : t.source) === r ? (t.lastIndex = 0, t) : new RegExp(r, "g");
1240
+ this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
1241
+ }
1242
+ interpolate(e, t, r, i) {
1243
+ var g;
1244
+ let o, s, a;
1245
+ const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c = (m) => {
1246
+ if (m.indexOf(this.formatSeparator) < 0) {
1247
+ const E = nn(t, u, m, this.options.keySeparator, this.options.ignoreJSONStructure);
1248
+ return this.alwaysFormat ? this.format(E, void 0, r, {
1249
+ ...i,
1250
+ ...t,
1251
+ interpolationkey: m
1252
+ }) : E;
1253
+ }
1254
+ const v = m.split(this.formatSeparator), w = v.shift().trim(), k = v.join(this.formatSeparator).trim();
1255
+ return this.format(nn(t, u, w, this.options.keySeparator, this.options.ignoreJSONStructure), k, r, {
1256
+ ...i,
1257
+ ...t,
1258
+ interpolationkey: w
1259
+ });
1260
+ };
1261
+ this.resetRegExp();
1262
+ const l = (i == null ? void 0 : i.missingInterpolationHandler) || this.options.missingInterpolationHandler, f = ((g = i == null ? void 0 : i.interpolation) == null ? void 0 : g.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
1263
+ return [{
1264
+ regex: this.regexpUnescape,
1265
+ safeValue: (m) => ut(m)
1266
+ }, {
1267
+ regex: this.regexp,
1268
+ safeValue: (m) => this.escapeValue ? ut(this.escape(m)) : ut(m)
1269
+ }].forEach((m) => {
1270
+ for (a = 0; o = m.regex.exec(e); ) {
1271
+ const v = o[1].trim();
1272
+ if (s = c(v), s === void 0)
1273
+ if (typeof l == "function") {
1274
+ const k = l(e, o, i);
1275
+ s = b(k) ? k : "";
1276
+ } else if (i && Object.prototype.hasOwnProperty.call(i, v))
1277
+ s = "";
1278
+ else if (f) {
1279
+ s = o[0];
1280
+ continue;
1281
+ } else
1282
+ this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`), s = "";
1283
+ else !b(s) && !this.useRawValueToEscape && (s = zt(s));
1284
+ const w = m.safeValue(s);
1285
+ if (e = e.replace(o[0], w), f ? (m.regex.lastIndex += s.length, m.regex.lastIndex -= o[0].length) : m.regex.lastIndex = 0, a++, a >= this.maxReplaces)
1286
+ break;
1287
+ }
1288
+ }), e;
1289
+ }
1290
+ nest(e, t) {
1291
+ let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, o, s;
1292
+ const a = (u, c) => {
1293
+ const l = this.nestingOptionsSeparator;
1294
+ if (u.indexOf(l) < 0) return u;
1295
+ const f = u.split(new RegExp(`${l}[ ]*{`));
1296
+ let d = `{${f[1]}`;
1297
+ u = f[0], d = this.interpolate(d, s);
1298
+ const g = d.match(/'/g), m = d.match(/"/g);
1299
+ (((g == null ? void 0 : g.length) ?? 0) % 2 === 0 && !m || m.length % 2 !== 0) && (d = d.replace(/'/g, '"'));
1300
+ try {
1301
+ s = JSON.parse(d), c && (s = {
1302
+ ...c,
1303
+ ...s
1304
+ });
1305
+ } catch (v) {
1306
+ return this.logger.warn(`failed parsing options string in nesting for key ${u}`, v), `${u}${l}${d}`;
1307
+ }
1308
+ return s.defaultValue && s.defaultValue.indexOf(this.prefix) > -1 && delete s.defaultValue, u;
1309
+ };
1310
+ for (; i = this.nestingRegexp.exec(e); ) {
1311
+ let u = [];
1312
+ s = {
1313
+ ...r
1314
+ }, s = s.replace && !b(s.replace) ? s.replace : s, s.applyPostProcessor = !1, delete s.defaultValue;
1315
+ let c = !1;
1316
+ if (i[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(i[1])) {
1317
+ const l = i[1].split(this.formatSeparator).map((f) => f.trim());
1318
+ i[1] = l.shift(), u = l, c = !0;
1319
+ }
1320
+ if (o = t(a.call(this, i[1].trim(), s), s), o && i[0] === e && !b(o)) return o;
1321
+ b(o) || (o = zt(o)), o || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), o = ""), c && (o = u.reduce((l, f) => this.format(l, f, r.lng, {
1322
+ ...r,
1323
+ interpolationkey: i[1].trim()
1324
+ }), o.trim())), e = e.replace(i[0], o), this.regexp.lastIndex = 0;
1325
+ }
1326
+ return e;
1327
+ }
1328
+ }
1329
+ const lo = (n) => {
1330
+ let e = n.toLowerCase().trim();
1331
+ const t = {};
1332
+ if (n.indexOf("(") > -1) {
1333
+ const r = n.split("(");
1334
+ e = r[0].toLowerCase().trim();
1335
+ const i = r[1].substring(0, r[1].length - 1);
1336
+ e === "currency" && i.indexOf(":") < 0 ? t.currency || (t.currency = i.trim()) : e === "relativetime" && i.indexOf(":") < 0 ? t.range || (t.range = i.trim()) : i.split(";").forEach((s) => {
1337
+ if (s) {
1338
+ const [a, ...u] = s.split(":"), c = u.join(":").trim().replace(/^'+|'+$/g, ""), l = a.trim();
1339
+ t[l] || (t[l] = c), c === "false" && (t[l] = !1), c === "true" && (t[l] = !0), isNaN(c) || (t[l] = parseInt(c, 10));
1340
+ }
1341
+ });
1342
+ }
1343
+ return {
1344
+ formatName: e,
1345
+ formatOptions: t
1346
+ };
1347
+ }, ne = (n) => {
1348
+ const e = {};
1349
+ return (t, r, i) => {
1350
+ let o = i;
1351
+ i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (o = {
1352
+ ...o,
1353
+ [i.interpolationkey]: void 0
1354
+ });
1355
+ const s = r + JSON.stringify(o);
1356
+ let a = e[s];
1357
+ return a || (a = n(Ke(r), i), e[s] = a), a(t);
1358
+ };
1359
+ };
1360
+ class co {
1361
+ constructor() {
1362
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1363
+ this.logger = B.create("formatter"), this.options = e, this.formats = {
1364
+ number: ne((t, r) => {
1365
+ const i = new Intl.NumberFormat(t, {
1366
+ ...r
1367
+ });
1368
+ return (o) => i.format(o);
1369
+ }),
1370
+ currency: ne((t, r) => {
1371
+ const i = new Intl.NumberFormat(t, {
1372
+ ...r,
1373
+ style: "currency"
1374
+ });
1375
+ return (o) => i.format(o);
1376
+ }),
1377
+ datetime: ne((t, r) => {
1378
+ const i = new Intl.DateTimeFormat(t, {
1379
+ ...r
1380
+ });
1381
+ return (o) => i.format(o);
1382
+ }),
1383
+ relativetime: ne((t, r) => {
1384
+ const i = new Intl.RelativeTimeFormat(t, {
1385
+ ...r
1386
+ });
1387
+ return (o) => i.format(o, r.range || "day");
1388
+ }),
1389
+ list: ne((t, r) => {
1390
+ const i = new Intl.ListFormat(t, {
1391
+ ...r
1392
+ });
1393
+ return (o) => i.format(o);
1394
+ })
1395
+ }, this.init(e);
1396
+ }
1397
+ init(e) {
1398
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
1399
+ interpolation: {}
1400
+ };
1401
+ this.formatSeparator = t.interpolation.formatSeparator || ",";
1402
+ }
1403
+ add(e, t) {
1404
+ this.formats[e.toLowerCase().trim()] = t;
1405
+ }
1406
+ addCached(e, t) {
1407
+ this.formats[e.toLowerCase().trim()] = ne(t);
1408
+ }
1409
+ format(e, t, r) {
1410
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
1411
+ const o = t.split(this.formatSeparator);
1412
+ if (o.length > 1 && o[0].indexOf("(") > 1 && o[0].indexOf(")") < 0 && o.find((a) => a.indexOf(")") > -1)) {
1413
+ const a = o.findIndex((u) => u.indexOf(")") > -1);
1414
+ o[0] = [o[0], ...o.splice(1, a)].join(this.formatSeparator);
1415
+ }
1416
+ return o.reduce((a, u) => {
1417
+ var f;
1418
+ const {
1419
+ formatName: c,
1420
+ formatOptions: l
1421
+ } = lo(u);
1422
+ if (this.formats[c]) {
1423
+ let d = a;
1424
+ try {
1425
+ const g = ((f = i == null ? void 0 : i.formatParams) == null ? void 0 : f[i.interpolationkey]) || {}, m = g.locale || g.lng || i.locale || i.lng || r;
1426
+ d = this.formats[c](a, m, {
1427
+ ...l,
1428
+ ...i,
1429
+ ...g
1430
+ });
1431
+ } catch (g) {
1432
+ this.logger.warn(g);
1433
+ }
1434
+ return d;
1435
+ } else
1436
+ this.logger.warn(`there was no format function for ${c}`);
1437
+ return a;
1438
+ }, e);
1439
+ }
1440
+ }
1441
+ const fo = (n, e) => {
1442
+ n.pending[e] !== void 0 && (delete n.pending[e], n.pendingCount--);
1443
+ };
1444
+ class ho extends Qe {
1445
+ constructor(e, t, r) {
1446
+ var o, s;
1447
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
1448
+ super(), this.backend = e, this.store = t, this.services = r, this.languageUtils = r.languageUtils, this.options = i, this.logger = B.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], (s = (o = this.backend) == null ? void 0 : o.init) == null || s.call(o, r, i.backend, i);
1449
+ }
1450
+ queueLoad(e, t, r, i) {
1451
+ const o = {}, s = {}, a = {}, u = {};
1452
+ return e.forEach((c) => {
1453
+ let l = !0;
1454
+ t.forEach((f) => {
1455
+ const d = `${c}|${f}`;
1456
+ !r.reload && this.store.hasResourceBundle(c, f) ? this.state[d] = 2 : this.state[d] < 0 || (this.state[d] === 1 ? s[d] === void 0 && (s[d] = !0) : (this.state[d] = 1, l = !1, s[d] === void 0 && (s[d] = !0), o[d] === void 0 && (o[d] = !0), u[f] === void 0 && (u[f] = !0)));
1457
+ }), l || (a[c] = !0);
1458
+ }), (Object.keys(o).length || Object.keys(s).length) && this.queue.push({
1459
+ pending: s,
1460
+ pendingCount: Object.keys(s).length,
1461
+ loaded: {},
1462
+ errors: [],
1463
+ callback: i
1464
+ }), {
1465
+ toLoad: Object.keys(o),
1466
+ pending: Object.keys(s),
1467
+ toLoadLanguages: Object.keys(a),
1468
+ toLoadNamespaces: Object.keys(u)
1469
+ };
1470
+ }
1471
+ loaded(e, t, r) {
1472
+ const i = e.split("|"), o = i[0], s = i[1];
1473
+ t && this.emit("failedLoading", o, s, t), !t && r && this.store.addResourceBundle(o, s, r, void 0, void 0, {
1474
+ skipCopy: !0
1475
+ }), this.state[e] = t ? -1 : 2, t && r && (this.state[e] = 0);
1476
+ const a = {};
1477
+ this.queue.forEach((u) => {
1478
+ Qi(u.loaded, [o], s), fo(u, e), t && u.errors.push(t), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((c) => {
1479
+ a[c] || (a[c] = {});
1480
+ const l = u.loaded[c];
1481
+ l.length && l.forEach((f) => {
1482
+ a[c][f] === void 0 && (a[c][f] = !0);
1483
+ });
1484
+ }), u.done = !0, u.errors.length ? u.callback(u.errors) : u.callback());
1485
+ }), this.emit("loaded", a), this.queue = this.queue.filter((u) => !u.done);
1486
+ }
1487
+ read(e, t, r) {
1488
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, s = arguments.length > 5 ? arguments[5] : void 0;
1489
+ if (!e.length) return s(null, {});
1490
+ if (this.readingCalls >= this.maxParallelReads) {
1491
+ this.waitingReads.push({
1492
+ lng: e,
1493
+ ns: t,
1494
+ fcName: r,
1495
+ tried: i,
1496
+ wait: o,
1497
+ callback: s
1498
+ });
1499
+ return;
1500
+ }
1501
+ this.readingCalls++;
1502
+ const a = (c, l) => {
1503
+ if (this.readingCalls--, this.waitingReads.length > 0) {
1504
+ const f = this.waitingReads.shift();
1505
+ this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
1506
+ }
1507
+ if (c && l && i < this.maxRetries) {
1508
+ setTimeout(() => {
1509
+ this.read.call(this, e, t, r, i + 1, o * 2, s);
1510
+ }, o);
1511
+ return;
1512
+ }
1513
+ s(c, l);
1514
+ }, u = this.backend[r].bind(this.backend);
1515
+ if (u.length === 2) {
1516
+ try {
1517
+ const c = u(e, t);
1518
+ c && typeof c.then == "function" ? c.then((l) => a(null, l)).catch(a) : a(null, c);
1519
+ } catch (c) {
1520
+ a(c);
1521
+ }
1522
+ return;
1523
+ }
1524
+ return u(e, t, a);
1525
+ }
1526
+ prepareLoading(e, t) {
1527
+ let r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = arguments.length > 3 ? arguments[3] : void 0;
1528
+ if (!this.backend)
1529
+ return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
1530
+ b(e) && (e = this.languageUtils.toResolveHierarchy(e)), b(t) && (t = [t]);
1531
+ const o = this.queueLoad(e, t, r, i);
1532
+ if (!o.toLoad.length)
1533
+ return o.pending.length || i(), null;
1534
+ o.toLoad.forEach((s) => {
1535
+ this.loadOne(s);
1536
+ });
1537
+ }
1538
+ load(e, t, r) {
1539
+ this.prepareLoading(e, t, {}, r);
1540
+ }
1541
+ reload(e, t, r) {
1542
+ this.prepareLoading(e, t, {
1543
+ reload: !0
1544
+ }, r);
1545
+ }
1546
+ loadOne(e) {
1547
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
1548
+ const r = e.split("|"), i = r[0], o = r[1];
1549
+ this.read(i, o, "read", void 0, void 0, (s, a) => {
1550
+ s && this.logger.warn(`${t}loading namespace ${o} for language ${i} failed`, s), !s && a && this.logger.log(`${t}loaded namespace ${o} for language ${i}`, a), this.loaded(e, s, a);
1551
+ });
1552
+ }
1553
+ saveMissing(e, t, r, i, o) {
1554
+ var u, c, l, f, d;
1555
+ let s = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, a = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
1556
+ };
1557
+ if ((c = (u = this.services) == null ? void 0 : u.utils) != null && c.hasLoadedNamespace && !((f = (l = this.services) == null ? void 0 : l.utils) != null && f.hasLoadedNamespace(t))) {
1558
+ this.logger.warn(`did not save key "${r}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
1559
+ return;
1560
+ }
1561
+ if (!(r == null || r === "")) {
1562
+ if ((d = this.backend) != null && d.create) {
1563
+ const g = {
1564
+ ...s,
1565
+ isUpdate: o
1566
+ }, m = this.backend.create.bind(this.backend);
1567
+ if (m.length < 6)
1568
+ try {
1569
+ let v;
1570
+ m.length === 5 ? v = m(e, t, r, i, g) : v = m(e, t, r, i), v && typeof v.then == "function" ? v.then((w) => a(null, w)).catch(a) : a(null, v);
1571
+ } catch (v) {
1572
+ a(v);
1573
+ }
1574
+ else
1575
+ m(e, t, r, i, a, g);
1576
+ }
1577
+ !e || !e[0] || this.store.addResource(e[0], t, r, i);
1578
+ }
1579
+ }
1580
+ }
1581
+ const rn = () => ({
1582
+ debug: !1,
1583
+ initAsync: !0,
1584
+ ns: ["translation"],
1585
+ defaultNS: ["translation"],
1586
+ fallbackLng: ["dev"],
1587
+ fallbackNS: !1,
1588
+ supportedLngs: !1,
1589
+ nonExplicitSupportedLngs: !1,
1590
+ load: "all",
1591
+ preload: !1,
1592
+ simplifyPluralSuffix: !0,
1593
+ keySeparator: ".",
1594
+ nsSeparator: ":",
1595
+ pluralSeparator: "_",
1596
+ contextSeparator: "_",
1597
+ partialBundledLanguages: !1,
1598
+ saveMissing: !1,
1599
+ updateMissing: !1,
1600
+ saveMissingTo: "fallback",
1601
+ saveMissingPlurals: !0,
1602
+ missingKeyHandler: !1,
1603
+ missingInterpolationHandler: !1,
1604
+ postProcess: !1,
1605
+ postProcessPassResolved: !1,
1606
+ returnNull: !1,
1607
+ returnEmptyString: !0,
1608
+ returnObjects: !1,
1609
+ joinArrays: !1,
1610
+ returnedObjectHandler: !1,
1611
+ parseMissingKeyHandler: !1,
1612
+ appendNamespaceToMissingKey: !1,
1613
+ appendNamespaceToCIMode: !1,
1614
+ overloadTranslationOptionHandler: (n) => {
1615
+ let e = {};
1616
+ if (typeof n[1] == "object" && (e = n[1]), b(n[1]) && (e.defaultValue = n[1]), b(n[2]) && (e.tDescription = n[2]), typeof n[2] == "object" || typeof n[3] == "object") {
1617
+ const t = n[3] || n[2];
1618
+ Object.keys(t).forEach((r) => {
1619
+ e[r] = t[r];
1620
+ });
1621
+ }
1622
+ return e;
1623
+ },
1624
+ interpolation: {
1625
+ escapeValue: !0,
1626
+ format: (n) => n,
1627
+ prefix: "{{",
1628
+ suffix: "}}",
1629
+ formatSeparator: ",",
1630
+ unescapePrefix: "-",
1631
+ nestingPrefix: "$t(",
1632
+ nestingSuffix: ")",
1633
+ nestingOptionsSeparator: ",",
1634
+ maxReplaces: 1e3,
1635
+ skipOnVariables: !0
1636
+ }
1637
+ }), on = (n) => {
1638
+ var e, t;
1639
+ return b(n.ns) && (n.ns = [n.ns]), b(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), b(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), ((t = (e = n.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), typeof n.initImmediate == "boolean" && (n.initAsync = n.initImmediate), n;
1640
+ }, $e = () => {
1641
+ }, po = (n) => {
1642
+ Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
1643
+ typeof n[t] == "function" && (n[t] = n[t].bind(n));
1644
+ });
1645
+ };
1646
+ class Se extends Qe {
1647
+ constructor() {
1648
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1649
+ if (super(), this.options = on(e), this.services = {}, this.logger = B, this.modules = {
1650
+ external: []
1651
+ }, po(this), t && !this.isInitialized && !e.isClone) {
1652
+ if (!this.options.initAsync)
1653
+ return this.init(e, t), this;
1654
+ setTimeout(() => {
1655
+ this.init(e, t);
1656
+ }, 0);
1657
+ }
1658
+ }
1659
+ init() {
1660
+ var e = this;
1661
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = arguments.length > 1 ? arguments[1] : void 0;
1662
+ this.isInitializing = !0, typeof t == "function" && (r = t, t = {}), t.defaultNS == null && t.ns && (b(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
1663
+ const i = rn();
1664
+ this.options = {
1665
+ ...i,
1666
+ ...this.options,
1667
+ ...on(t)
1668
+ }, this.options.interpolation = {
1669
+ ...i.interpolation,
1670
+ ...this.options.interpolation
1671
+ }, t.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = t.keySeparator), t.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = t.nsSeparator);
1672
+ const o = (l) => l ? typeof l == "function" ? new l() : l : null;
1673
+ if (!this.options.isClone) {
1674
+ this.modules.logger ? B.init(o(this.modules.logger), this.options) : B.init(null, this.options);
1675
+ let l;
1676
+ this.modules.formatter ? l = this.modules.formatter : l = co;
1677
+ const f = new Zt(this.options);
1678
+ this.store = new Xt(this.options.resources, this.options);
1679
+ const d = this.services;
1680
+ d.logger = B, d.resourceStore = this.store, d.languageUtils = f, d.pluralResolver = new ao(f, {
1681
+ prepend: this.options.pluralSeparator,
1682
+ simplifyPluralSuffix: this.options.simplifyPluralSuffix
1683
+ }), l && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (d.formatter = o(l), d.formatter.init(d, this.options), this.options.interpolation.format = d.formatter.format.bind(d.formatter)), d.interpolator = new uo(this.options), d.utils = {
1684
+ hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1685
+ }, d.backendConnector = new ho(o(this.modules.backend), d.resourceStore, d, this.options), d.backendConnector.on("*", function(g) {
1686
+ for (var m = arguments.length, v = new Array(m > 1 ? m - 1 : 0), w = 1; w < m; w++)
1687
+ v[w - 1] = arguments[w];
1688
+ e.emit(g, ...v);
1689
+ }), this.modules.languageDetector && (d.languageDetector = o(this.modules.languageDetector), d.languageDetector.init && d.languageDetector.init(d, this.options.detection, this.options)), this.modules.i18nFormat && (d.i18nFormat = o(this.modules.i18nFormat), d.i18nFormat.init && d.i18nFormat.init(this)), this.translator = new ze(this.services, this.options), this.translator.on("*", function(g) {
1690
+ for (var m = arguments.length, v = new Array(m > 1 ? m - 1 : 0), w = 1; w < m; w++)
1691
+ v[w - 1] = arguments[w];
1692
+ e.emit(g, ...v);
1693
+ }), this.modules.external.forEach((g) => {
1694
+ g.init && g.init(this);
1695
+ });
1696
+ }
1697
+ if (this.format = this.options.interpolation.format, r || (r = $e), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1698
+ const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1699
+ l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
1700
+ }
1701
+ !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((l) => {
1702
+ this[l] = function() {
1703
+ return e.store[l](...arguments);
1704
+ };
1705
+ }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((l) => {
1706
+ this[l] = function() {
1707
+ return e.store[l](...arguments), e;
1708
+ };
1709
+ });
1710
+ const u = de(), c = () => {
1711
+ const l = (f, d) => {
1712
+ this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), u.resolve(d), r(f, d);
1713
+ };
1714
+ if (this.languages && !this.isInitialized) return l(null, this.t.bind(this));
1715
+ this.changeLanguage(this.options.lng, l);
1716
+ };
1717
+ return this.options.resources || !this.options.initAsync ? c() : setTimeout(c, 0), u;
1718
+ }
1719
+ loadResources(e) {
1720
+ var o, s;
1721
+ let r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : $e;
1722
+ const i = b(e) ? e : this.language;
1723
+ if (typeof e == "function" && (r = e), !this.options.resources || this.options.partialBundledLanguages) {
1724
+ if ((i == null ? void 0 : i.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return r();
1725
+ const a = [], u = (c) => {
1726
+ if (!c || c === "cimode") return;
1727
+ this.services.languageUtils.toResolveHierarchy(c).forEach((f) => {
1728
+ f !== "cimode" && a.indexOf(f) < 0 && a.push(f);
1729
+ });
1730
+ };
1731
+ i ? u(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((l) => u(l)), (s = (o = this.options.preload) == null ? void 0 : o.forEach) == null || s.call(o, (c) => u(c)), this.services.backendConnector.load(a, this.options.ns, (c) => {
1732
+ !c && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), r(c);
1733
+ });
1734
+ } else
1735
+ r(null);
1736
+ }
1737
+ reloadResources(e, t, r) {
1738
+ const i = de();
1739
+ return typeof e == "function" && (r = e, e = void 0), typeof t == "function" && (r = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), r || (r = $e), this.services.backendConnector.reload(e, t, (o) => {
1740
+ i.resolve(), r(o);
1741
+ }), i;
1742
+ }
1743
+ use(e) {
1744
+ if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
1745
+ if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
1746
+ return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Yn.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1747
+ }
1748
+ setResolvedLanguage(e) {
1749
+ if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1))
1750
+ for (let t = 0; t < this.languages.length; t++) {
1751
+ const r = this.languages[t];
1752
+ if (!(["cimode", "dev"].indexOf(r) > -1) && this.store.hasLanguageSomeTranslations(r)) {
1753
+ this.resolvedLanguage = r;
1754
+ break;
1755
+ }
1756
+ }
1757
+ }
1758
+ changeLanguage(e, t) {
1759
+ var r = this;
1760
+ this.isLanguageChangingTo = e;
1761
+ const i = de();
1762
+ this.emit("languageChanging", e);
1763
+ const o = (u) => {
1764
+ this.language = u, this.languages = this.services.languageUtils.toResolveHierarchy(u), this.resolvedLanguage = void 0, this.setResolvedLanguage(u);
1765
+ }, s = (u, c) => {
1766
+ c ? (o(c), this.translator.changeLanguage(c), this.isLanguageChangingTo = void 0, this.emit("languageChanged", c), this.logger.log("languageChanged", c)) : this.isLanguageChangingTo = void 0, i.resolve(function() {
1767
+ return r.t(...arguments);
1768
+ }), t && t(u, function() {
1769
+ return r.t(...arguments);
1770
+ });
1771
+ }, a = (u) => {
1772
+ var l, f;
1773
+ !e && !u && this.services.languageDetector && (u = []);
1774
+ const c = b(u) ? u : this.services.languageUtils.getBestMatchFromCodes(u);
1775
+ c && (this.language || o(c), this.translator.language || this.translator.changeLanguage(c), (f = (l = this.services.languageDetector) == null ? void 0 : l.cacheUserLanguage) == null || f.call(l, c)), this.loadResources(c, (d) => {
1776
+ s(d, c);
1777
+ });
1778
+ };
1779
+ return !e && this.services.languageDetector && !this.services.languageDetector.async ? a(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(a) : this.services.languageDetector.detect(a) : a(e), i;
1780
+ }
1781
+ getFixedT(e, t, r) {
1782
+ var i = this;
1783
+ const o = function(s, a) {
1784
+ let u;
1785
+ if (typeof a != "object") {
1786
+ for (var c = arguments.length, l = new Array(c > 2 ? c - 2 : 0), f = 2; f < c; f++)
1787
+ l[f - 2] = arguments[f];
1788
+ u = i.options.overloadTranslationOptionHandler([s, a].concat(l));
1789
+ } else
1790
+ u = {
1791
+ ...a
1792
+ };
1793
+ u.lng = u.lng || o.lng, u.lngs = u.lngs || o.lngs, u.ns = u.ns || o.ns, u.keyPrefix !== "" && (u.keyPrefix = u.keyPrefix || r || o.keyPrefix);
1794
+ const d = i.options.keySeparator || ".";
1795
+ let g;
1796
+ return u.keyPrefix && Array.isArray(s) ? g = s.map((m) => `${u.keyPrefix}${d}${m}`) : g = u.keyPrefix ? `${u.keyPrefix}${d}${s}` : s, i.t(g, u);
1797
+ };
1798
+ return b(e) ? o.lng = e : o.lngs = e, o.ns = t, o.keyPrefix = r, o;
1799
+ }
1800
+ t() {
1801
+ var i;
1802
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
1803
+ t[r] = arguments[r];
1804
+ return (i = this.translator) == null ? void 0 : i.translate(...t);
1805
+ }
1806
+ exists() {
1807
+ var i;
1808
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
1809
+ t[r] = arguments[r];
1810
+ return (i = this.translator) == null ? void 0 : i.exists(...t);
1811
+ }
1812
+ setDefaultNamespace(e) {
1813
+ this.options.defaultNS = e;
1814
+ }
1815
+ hasLoadedNamespace(e) {
1816
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1817
+ if (!this.isInitialized)
1818
+ return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
1819
+ if (!this.languages || !this.languages.length)
1820
+ return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
1821
+ const r = t.lng || this.resolvedLanguage || this.languages[0], i = this.options ? this.options.fallbackLng : !1, o = this.languages[this.languages.length - 1];
1822
+ if (r.toLowerCase() === "cimode") return !0;
1823
+ const s = (a, u) => {
1824
+ const c = this.services.backendConnector.state[`${a}|${u}`];
1825
+ return c === -1 || c === 0 || c === 2;
1826
+ };
1827
+ if (t.precheck) {
1828
+ const a = t.precheck(this, s);
1829
+ if (a !== void 0) return a;
1830
+ }
1831
+ return !!(this.hasResourceBundle(r, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || s(r, e) && (!i || s(o, e)));
1832
+ }
1833
+ loadNamespaces(e, t) {
1834
+ const r = de();
1835
+ return this.options.ns ? (b(e) && (e = [e]), e.forEach((i) => {
1836
+ this.options.ns.indexOf(i) < 0 && this.options.ns.push(i);
1837
+ }), this.loadResources((i) => {
1838
+ r.resolve(), t && t(i);
1839
+ }), r) : (t && t(), Promise.resolve());
1840
+ }
1841
+ loadLanguages(e, t) {
1842
+ const r = de();
1843
+ b(e) && (e = [e]);
1844
+ const i = this.options.preload || [], o = e.filter((s) => i.indexOf(s) < 0 && this.services.languageUtils.isSupportedCode(s));
1845
+ return o.length ? (this.options.preload = i.concat(o), this.loadResources((s) => {
1846
+ r.resolve(), t && t(s);
1847
+ }), r) : (t && t(), Promise.resolve());
1848
+ }
1849
+ dir(e) {
1850
+ var i, o;
1851
+ if (e || (e = this.resolvedLanguage || (((i = this.languages) == null ? void 0 : i.length) > 0 ? this.languages[0] : this.language)), !e) return "rtl";
1852
+ const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], r = ((o = this.services) == null ? void 0 : o.languageUtils) || new Zt(rn());
1853
+ return t.indexOf(r.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1854
+ }
1855
+ static createInstance() {
1856
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1857
+ return new Se(e, t);
1858
+ }
1859
+ cloneInstance() {
1860
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : $e;
1861
+ const r = e.forkResourceStore;
1862
+ r && delete e.forkResourceStore;
1863
+ const i = {
1864
+ ...this.options,
1865
+ ...e,
1866
+ isClone: !0
1867
+ }, o = new Se(i);
1868
+ if ((e.debug !== void 0 || e.prefix !== void 0) && (o.logger = o.logger.clone(e)), ["store", "services", "language"].forEach((a) => {
1869
+ o[a] = this[a];
1870
+ }), o.services = {
1871
+ ...this.services
1872
+ }, o.services.utils = {
1873
+ hasLoadedNamespace: o.hasLoadedNamespace.bind(o)
1874
+ }, r) {
1875
+ const a = Object.keys(this.store.data).reduce((u, c) => (u[c] = {
1876
+ ...this.store.data[c]
1877
+ }, Object.keys(u[c]).reduce((l, f) => (l[f] = {
1878
+ ...u[c][f]
1879
+ }, l), {})), {});
1880
+ o.store = new Xt(a, i), o.services.resourceStore = o.store;
1881
+ }
1882
+ return o.translator = new ze(o.services, i), o.translator.on("*", function(a) {
1883
+ for (var u = arguments.length, c = new Array(u > 1 ? u - 1 : 0), l = 1; l < u; l++)
1884
+ c[l - 1] = arguments[l];
1885
+ o.emit(a, ...c);
1886
+ }), o.init(i, t), o.translator.options = i, o.translator.backendConnector.services.utils = {
1887
+ hasLoadedNamespace: o.hasLoadedNamespace.bind(o)
1888
+ }, o;
1889
+ }
1890
+ toJSON() {
1891
+ return {
1892
+ options: this.options,
1893
+ store: this.store,
1894
+ language: this.language,
1895
+ languages: this.languages,
1896
+ resolvedLanguage: this.resolvedLanguage
1897
+ };
1898
+ }
1899
+ }
1900
+ const De = Se.createInstance();
1901
+ De.createInstance = Se.createInstance;
1902
+ const {
1903
+ slice: go,
1904
+ forEach: mo
1905
+ } = [];
1906
+ function yo(n) {
1907
+ return mo.call(go.call(arguments, 1), (e) => {
1908
+ if (e)
1909
+ for (const t in e)
1910
+ n[t] === void 0 && (n[t] = e[t]);
1911
+ }), n;
1912
+ }
1913
+ const sn = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, vo = function(n, e) {
1914
+ const r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
1915
+ path: "/"
1916
+ }, i = encodeURIComponent(e);
1917
+ let o = `${n}=${i}`;
1918
+ if (r.maxAge > 0) {
1919
+ const s = r.maxAge - 0;
1920
+ if (Number.isNaN(s)) throw new Error("maxAge should be a Number");
1921
+ o += `; Max-Age=${Math.floor(s)}`;
1922
+ }
1923
+ if (r.domain) {
1924
+ if (!sn.test(r.domain))
1925
+ throw new TypeError("option domain is invalid");
1926
+ o += `; Domain=${r.domain}`;
1927
+ }
1928
+ if (r.path) {
1929
+ if (!sn.test(r.path))
1930
+ throw new TypeError("option path is invalid");
1931
+ o += `; Path=${r.path}`;
1932
+ }
1933
+ if (r.expires) {
1934
+ if (typeof r.expires.toUTCString != "function")
1935
+ throw new TypeError("option expires is invalid");
1936
+ o += `; Expires=${r.expires.toUTCString()}`;
1937
+ }
1938
+ if (r.httpOnly && (o += "; HttpOnly"), r.secure && (o += "; Secure"), r.sameSite)
1939
+ switch (typeof r.sameSite == "string" ? r.sameSite.toLowerCase() : r.sameSite) {
1940
+ case !0:
1941
+ o += "; SameSite=Strict";
1942
+ break;
1943
+ case "lax":
1944
+ o += "; SameSite=Lax";
1945
+ break;
1946
+ case "strict":
1947
+ o += "; SameSite=Strict";
1948
+ break;
1949
+ case "none":
1950
+ o += "; SameSite=None";
1951
+ break;
1952
+ default:
1953
+ throw new TypeError("option sameSite is invalid");
1954
+ }
1955
+ return o;
1956
+ }, an = {
1957
+ create(n, e, t, r) {
1958
+ let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
1959
+ path: "/",
1960
+ sameSite: "strict"
1961
+ };
1962
+ t && (i.expires = /* @__PURE__ */ new Date(), i.expires.setTime(i.expires.getTime() + t * 60 * 1e3)), r && (i.domain = r), document.cookie = vo(n, encodeURIComponent(e), i);
1963
+ },
1964
+ read(n) {
1965
+ const e = `${n}=`, t = document.cookie.split(";");
1966
+ for (let r = 0; r < t.length; r++) {
1967
+ let i = t[r];
1968
+ for (; i.charAt(0) === " "; ) i = i.substring(1, i.length);
1969
+ if (i.indexOf(e) === 0) return i.substring(e.length, i.length);
1970
+ }
1971
+ return null;
1972
+ },
1973
+ remove(n) {
1974
+ this.create(n, "", -1);
1975
+ }
1976
+ };
1977
+ var wo = {
1978
+ name: "cookie",
1979
+ // Deconstruct the options object and extract the lookupCookie property
1980
+ lookup(n) {
1981
+ let {
1982
+ lookupCookie: e
1983
+ } = n;
1984
+ if (e && typeof document < "u")
1985
+ return an.read(e) || void 0;
1986
+ },
1987
+ // Deconstruct the options object and extract the lookupCookie, cookieMinutes, cookieDomain, and cookieOptions properties
1988
+ cacheUserLanguage(n, e) {
1989
+ let {
1990
+ lookupCookie: t,
1991
+ cookieMinutes: r,
1992
+ cookieDomain: i,
1993
+ cookieOptions: o
1994
+ } = e;
1995
+ t && typeof document < "u" && an.create(t, n, r, i, o);
1996
+ }
1997
+ }, bo = {
1998
+ name: "querystring",
1999
+ // Deconstruct the options object and extract the lookupQuerystring property
2000
+ lookup(n) {
2001
+ var r;
2002
+ let {
2003
+ lookupQuerystring: e
2004
+ } = n, t;
2005
+ if (typeof window < "u") {
2006
+ let {
2007
+ search: i
2008
+ } = window.location;
2009
+ !window.location.search && ((r = window.location.hash) == null ? void 0 : r.indexOf("?")) > -1 && (i = window.location.hash.substring(window.location.hash.indexOf("?")));
2010
+ const s = i.substring(1).split("&");
2011
+ for (let a = 0; a < s.length; a++) {
2012
+ const u = s[a].indexOf("=");
2013
+ u > 0 && s[a].substring(0, u) === e && (t = s[a].substring(u + 1));
2014
+ }
2015
+ }
2016
+ return t;
2017
+ }
2018
+ };
2019
+ let he = null;
2020
+ const un = () => {
2021
+ if (he !== null) return he;
2022
+ try {
2023
+ he = window !== "undefined" && window.localStorage !== null;
2024
+ const n = "i18next.translate.boo";
2025
+ window.localStorage.setItem(n, "foo"), window.localStorage.removeItem(n);
2026
+ } catch {
2027
+ he = !1;
2028
+ }
2029
+ return he;
2030
+ };
2031
+ var So = {
2032
+ name: "localStorage",
2033
+ // Deconstruct the options object and extract the lookupLocalStorage property
2034
+ lookup(n) {
2035
+ let {
2036
+ lookupLocalStorage: e
2037
+ } = n;
2038
+ if (e && un())
2039
+ return window.localStorage.getItem(e) || void 0;
2040
+ },
2041
+ // Deconstruct the options object and extract the lookupLocalStorage property
2042
+ cacheUserLanguage(n, e) {
2043
+ let {
2044
+ lookupLocalStorage: t
2045
+ } = e;
2046
+ t && un() && window.localStorage.setItem(t, n);
2047
+ }
2048
+ };
2049
+ let pe = null;
2050
+ const ln = () => {
2051
+ if (pe !== null) return pe;
2052
+ try {
2053
+ pe = window !== "undefined" && window.sessionStorage !== null;
2054
+ const n = "i18next.translate.boo";
2055
+ window.sessionStorage.setItem(n, "foo"), window.sessionStorage.removeItem(n);
2056
+ } catch {
2057
+ pe = !1;
2058
+ }
2059
+ return pe;
2060
+ };
2061
+ var xo = {
2062
+ name: "sessionStorage",
2063
+ lookup(n) {
2064
+ let {
2065
+ lookupSessionStorage: e
2066
+ } = n;
2067
+ if (e && ln())
2068
+ return window.sessionStorage.getItem(e) || void 0;
2069
+ },
2070
+ cacheUserLanguage(n, e) {
2071
+ let {
2072
+ lookupSessionStorage: t
2073
+ } = e;
2074
+ t && ln() && window.sessionStorage.setItem(t, n);
2075
+ }
2076
+ }, Oo = {
2077
+ name: "navigator",
2078
+ lookup(n) {
2079
+ const e = [];
2080
+ if (typeof navigator < "u") {
2081
+ const {
2082
+ languages: t,
2083
+ userLanguage: r,
2084
+ language: i
2085
+ } = navigator;
2086
+ if (t)
2087
+ for (let o = 0; o < t.length; o++)
2088
+ e.push(t[o]);
2089
+ r && e.push(r), i && e.push(i);
2090
+ }
2091
+ return e.length > 0 ? e : void 0;
2092
+ }
2093
+ }, Eo = {
2094
+ name: "htmlTag",
2095
+ // Deconstruct the options object and extract the htmlTag property
2096
+ lookup(n) {
2097
+ let {
2098
+ htmlTag: e
2099
+ } = n, t;
2100
+ const r = e || (typeof document < "u" ? document.documentElement : null);
2101
+ return r && typeof r.getAttribute == "function" && (t = r.getAttribute("lang")), t;
2102
+ }
2103
+ }, Co = {
2104
+ name: "path",
2105
+ // Deconstruct the options object and extract the lookupFromPathIndex property
2106
+ lookup(n) {
2107
+ var i;
2108
+ let {
2109
+ lookupFromPathIndex: e
2110
+ } = n;
2111
+ if (typeof window > "u") return;
2112
+ const t = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
2113
+ return Array.isArray(t) ? (i = t[typeof e == "number" ? e : 0]) == null ? void 0 : i.replace("/", "") : void 0;
2114
+ }
2115
+ }, To = {
2116
+ name: "subdomain",
2117
+ lookup(n) {
2118
+ var i, o;
2119
+ let {
2120
+ lookupFromSubdomainIndex: e
2121
+ } = n;
2122
+ const t = typeof e == "number" ? e + 1 : 1, r = typeof window < "u" && ((o = (i = window.location) == null ? void 0 : i.hostname) == null ? void 0 : o.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));
2123
+ if (r)
2124
+ return r[t];
2125
+ }
2126
+ };
2127
+ let Qn = !1;
2128
+ try {
2129
+ Qn = !0;
2130
+ } catch {
2131
+ }
2132
+ const Zn = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
2133
+ Qn || Zn.splice(1, 1);
2134
+ const ko = () => ({
2135
+ order: Zn,
2136
+ lookupQuerystring: "lng",
2137
+ lookupCookie: "i18next",
2138
+ lookupLocalStorage: "i18nextLng",
2139
+ lookupSessionStorage: "i18nextLng",
2140
+ // cache user language
2141
+ caches: ["localStorage"],
2142
+ excludeCacheFor: ["cimode"],
2143
+ // cookieMinutes: 10,
2144
+ // cookieDomain: 'myDomain'
2145
+ convertDetectedLanguage: (n) => n
2146
+ });
2147
+ class er {
2148
+ constructor(e) {
2149
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2150
+ this.type = "languageDetector", this.detectors = {}, this.init(e, t);
2151
+ }
2152
+ init() {
2153
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
2154
+ languageUtils: {}
2155
+ }, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2156
+ this.services = e, this.options = yo(t, this.options || {}, ko()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (i) => i.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = r, this.addDetector(wo), this.addDetector(bo), this.addDetector(So), this.addDetector(xo), this.addDetector(Oo), this.addDetector(Eo), this.addDetector(Co), this.addDetector(To);
2157
+ }
2158
+ addDetector(e) {
2159
+ return this.detectors[e.name] = e, this;
2160
+ }
2161
+ detect() {
2162
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : this.options.order, t = [];
2163
+ return e.forEach((r) => {
2164
+ if (this.detectors[r]) {
2165
+ let i = this.detectors[r].lookup(this.options);
2166
+ i && typeof i == "string" && (i = [i]), i && (t = t.concat(i));
2167
+ }
2168
+ }), t = t.map((r) => this.options.convertDetectedLanguage(r)), this.services && this.services.languageUtils && this.services.languageUtils.getBestMatchFromCodes ? t : t.length > 0 ? t[0] : null;
2169
+ }
2170
+ cacheUserLanguage(e) {
2171
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.options.caches;
2172
+ t && (this.options.excludeCacheFor && this.options.excludeCacheFor.indexOf(e) > -1 || t.forEach((r) => {
2173
+ this.detectors[r] && this.detectors[r].cacheUserLanguage(e, this.options);
2174
+ }));
2175
+ }
2176
+ }
2177
+ er.type = "languageDetector";
2178
+ function Po(n, e) {
2179
+ if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function");
2180
+ }
2181
+ function xe(n) {
2182
+ "@babel/helpers - typeof";
2183
+ return xe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2184
+ return typeof e;
2185
+ } : function(e) {
2186
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2187
+ }, xe(n);
2188
+ }
2189
+ function Lo(n, e) {
2190
+ if (xe(n) != "object" || !n) return n;
2191
+ var t = n[Symbol.toPrimitive];
2192
+ if (t !== void 0) {
2193
+ var r = t.call(n, e);
2194
+ if (xe(r) != "object") return r;
2195
+ throw new TypeError("@@toPrimitive must return a primitive value.");
2196
+ }
2197
+ return String(n);
2198
+ }
2199
+ function Io(n) {
2200
+ var e = Lo(n, "string");
2201
+ return xe(e) == "symbol" ? e : e + "";
2202
+ }
2203
+ function Ro(n, e) {
2204
+ for (var t = 0; t < e.length; t++) {
2205
+ var r = e[t];
2206
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, Io(r.key), r);
2207
+ }
2208
+ }
2209
+ function $o(n, e, t) {
2210
+ return e && Ro(n.prototype, e), Object.defineProperty(n, "prototype", {
2211
+ writable: !1
2212
+ }), n;
2213
+ }
2214
+ var tr = [], jo = tr.forEach, Ao = tr.slice;
2215
+ function No(n) {
2216
+ return jo.call(Ao.call(arguments, 1), function(e) {
2217
+ if (e)
2218
+ for (var t in e)
2219
+ n[t] === void 0 && (n[t] = e[t]);
2220
+ }), n;
2221
+ }
2222
+ function Uo(n) {
2223
+ return n ? typeof n == "function" ? new n() : n : null;
2224
+ }
2225
+ function Do() {
2226
+ return {
2227
+ handleEmptyResourcesAsFailed: !0,
2228
+ cacheHitMode: "none"
2229
+ // reloadInterval: typeof window !== 'undefined' ? false : 60 * 60 * 1000
2230
+ // refreshExpirationTime: 60 * 60 * 1000
2231
+ };
2232
+ }
2233
+ function cn(n, e, t, r) {
2234
+ var i = n.read.bind(n);
2235
+ if (i.length === 2) {
2236
+ try {
2237
+ var o = i(e, t);
2238
+ o && typeof o.then == "function" ? o.then(function(s) {
2239
+ return r(null, s);
2240
+ }).catch(r) : r(null, o);
2241
+ } catch (s) {
2242
+ r(s);
2243
+ }
2244
+ return;
2245
+ }
2246
+ i(e, t, r);
2247
+ }
2248
+ var nr = /* @__PURE__ */ function() {
2249
+ function n(e) {
2250
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2251
+ Po(this, n), this.backends = [], this.type = "backend", this.allOptions = r, this.init(e, t);
2252
+ }
2253
+ return $o(n, [{
2254
+ key: "init",
2255
+ value: function(t) {
2256
+ var r = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2257
+ this.services = t, this.options = No(i, this.options || {}, Do()), this.allOptions = o, this.options.backends && this.options.backends.forEach(function(s, a) {
2258
+ r.backends[a] = r.backends[a] || Uo(s), r.backends[a].init(t, r.options.backendOptions && r.options.backendOptions[a] || {}, o);
2259
+ }), this.services && this.options.reloadInterval && setInterval(function() {
2260
+ return r.reload();
2261
+ }, this.options.reloadInterval);
2262
+ }
2263
+ }, {
2264
+ key: "read",
2265
+ value: function(t, r, i) {
2266
+ var o = this, s = this.backends.length, a = function c(l) {
2267
+ if (l >= s) return i(new Error("non of the backend loaded data", !0));
2268
+ var f = l === s - 1, d = o.options.handleEmptyResourcesAsFailed && !f ? 0 : -1, g = o.backends[l];
2269
+ g.read ? cn(g, t, r, function(m, v, w) {
2270
+ if (!m && v && Object.keys(v).length > d) {
2271
+ if (i(null, v, l), u(l - 1, v), g.save && o.options.cacheHitMode && ["refresh", "refreshAndUpdateStore"].indexOf(o.options.cacheHitMode) > -1) {
2272
+ if (w && o.options.refreshExpirationTime && w + o.options.refreshExpirationTime > Date.now()) return;
2273
+ var k = o.backends[l + 1];
2274
+ k && k.read && cn(k, t, r, function(E, T) {
2275
+ E || T && (Object.keys(T).length <= d || (u(l, T), o.options.cacheHitMode === "refreshAndUpdateStore" && o.services && o.services.resourceStore && o.services.resourceStore.addResourceBundle(t, r, T)));
2276
+ });
2277
+ }
2278
+ } else
2279
+ c(l + 1);
2280
+ }) : c(l + 1);
2281
+ }, u = function c(l, f) {
2282
+ if (!(l < 0)) {
2283
+ var d = o.backends[l];
2284
+ d.save && d.save(t, r, f), c(l - 1, f);
2285
+ }
2286
+ };
2287
+ a(0);
2288
+ }
2289
+ }, {
2290
+ key: "create",
2291
+ value: function(t, r, i, o) {
2292
+ var s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : function() {
2293
+ }, a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
2294
+ this.backends.forEach(function(u) {
2295
+ if (u.create) {
2296
+ var c = u.create.bind(u);
2297
+ if (c.length < 6) {
2298
+ try {
2299
+ var l;
2300
+ c.length === 5 ? l = c(t, r, i, o, a) : l = c(t, r, i, o), l && typeof l.then == "function" ? l.then(function(f) {
2301
+ return s(null, f);
2302
+ }).catch(s) : s(null, l);
2303
+ } catch (f) {
2304
+ s(f);
2305
+ }
2306
+ return;
2307
+ }
2308
+ c(t, r, i, o, s, a);
2309
+ }
2310
+ });
2311
+ }
2312
+ }, {
2313
+ key: "reload",
2314
+ value: function() {
2315
+ var t = this, r = this.services, i = r.backendConnector, o = r.languageUtils, s = r.logger, a = i.language;
2316
+ if (!(a && a.toLowerCase() === "cimode")) {
2317
+ var u = [], c = function(f) {
2318
+ var d = o.toResolveHierarchy(f);
2319
+ d.forEach(function(g) {
2320
+ u.indexOf(g) < 0 && u.push(g);
2321
+ });
2322
+ };
2323
+ c(a), this.allOptions.preload && this.allOptions.preload.forEach(function(l) {
2324
+ return c(l);
2325
+ }), u.forEach(function(l) {
2326
+ t.allOptions.ns.forEach(function(f) {
2327
+ i.read(l, f, "read", null, null, function(d, g) {
2328
+ d && s.warn("loading namespace ".concat(f, " for language ").concat(l, " failed"), d), !d && g && s.log("loaded namespace ".concat(f, " for language ").concat(l), g), i.loaded("".concat(l, "|").concat(f), d, g);
2329
+ });
2330
+ });
2331
+ });
2332
+ }
2333
+ }
2334
+ }]), n;
2335
+ }();
2336
+ nr.type = "backend";
2337
+ function vt(n) {
2338
+ "@babel/helpers - typeof";
2339
+ return vt = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2340
+ return typeof e;
2341
+ } : function(e) {
2342
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2343
+ }, vt(n);
2344
+ }
2345
+ function rr() {
2346
+ return typeof XMLHttpRequest == "function" || (typeof XMLHttpRequest > "u" ? "undefined" : vt(XMLHttpRequest)) === "object";
2347
+ }
2348
+ function Fo(n) {
2349
+ return !!n && typeof n.then == "function";
2350
+ }
2351
+ function _o(n) {
2352
+ return Fo(n) ? n : Promise.resolve(n);
2353
+ }
2354
+ function fn(n, e) {
2355
+ var t = Object.keys(n);
2356
+ if (Object.getOwnPropertySymbols) {
2357
+ var r = Object.getOwnPropertySymbols(n);
2358
+ e && (r = r.filter(function(i) {
2359
+ return Object.getOwnPropertyDescriptor(n, i).enumerable;
2360
+ })), t.push.apply(t, r);
2361
+ }
2362
+ return t;
2363
+ }
2364
+ function dn(n) {
2365
+ for (var e = 1; e < arguments.length; e++) {
2366
+ var t = arguments[e] != null ? arguments[e] : {};
2367
+ e % 2 ? fn(Object(t), !0).forEach(function(r) {
2368
+ Mo(n, r, t[r]);
2369
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : fn(Object(t)).forEach(function(r) {
2370
+ Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
2371
+ });
2372
+ }
2373
+ return n;
2374
+ }
2375
+ function Mo(n, e, t) {
2376
+ return (e = Ho(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
2377
+ }
2378
+ function Ho(n) {
2379
+ var e = Vo(n, "string");
2380
+ return Z(e) == "symbol" ? e : e + "";
2381
+ }
2382
+ function Vo(n, e) {
2383
+ if (Z(n) != "object" || !n) return n;
2384
+ var t = n[Symbol.toPrimitive];
2385
+ if (t !== void 0) {
2386
+ var r = t.call(n, e);
2387
+ if (Z(r) != "object") return r;
2388
+ throw new TypeError("@@toPrimitive must return a primitive value.");
2389
+ }
2390
+ return (e === "string" ? String : Number)(n);
2391
+ }
2392
+ function Z(n) {
2393
+ "@babel/helpers - typeof";
2394
+ return Z = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2395
+ return typeof e;
2396
+ } : function(e) {
2397
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2398
+ }, Z(n);
2399
+ }
2400
+ var G = typeof fetch == "function" ? fetch : void 0;
2401
+ typeof global < "u" && global.fetch ? G = global.fetch : typeof window < "u" && window.fetch && (G = window.fetch);
2402
+ var Oe;
2403
+ rr() && (typeof global < "u" && global.XMLHttpRequest ? Oe = global.XMLHttpRequest : typeof window < "u" && window.XMLHttpRequest && (Oe = window.XMLHttpRequest));
2404
+ var We;
2405
+ typeof ActiveXObject == "function" && (typeof global < "u" && global.ActiveXObject ? We = global.ActiveXObject : typeof window < "u" && window.ActiveXObject && (We = window.ActiveXObject));
2406
+ typeof G != "function" && (G = void 0);
2407
+ if (!G && !Oe && !We)
2408
+ try {
2409
+ import("./browser-ponyfill-CvzSbL_o.js").then((n) => n.b).then(function(n) {
2410
+ G = n.default;
2411
+ }).catch(function() {
2412
+ });
2413
+ } catch {
2414
+ }
2415
+ var wt = function(e, t) {
2416
+ if (t && Z(t) === "object") {
2417
+ var r = "";
2418
+ for (var i in t)
2419
+ r += "&" + encodeURIComponent(i) + "=" + encodeURIComponent(t[i]);
2420
+ if (!r) return e;
2421
+ e = e + (e.indexOf("?") !== -1 ? "&" : "?") + r.slice(1);
2422
+ }
2423
+ return e;
2424
+ }, hn = function(e, t, r, i) {
2425
+ var o = function(u) {
2426
+ if (!u.ok) return r(u.statusText || "Error", {
2427
+ status: u.status
2428
+ });
2429
+ u.text().then(function(c) {
2430
+ r(null, {
2431
+ status: u.status,
2432
+ data: c
2433
+ });
2434
+ }).catch(r);
2435
+ };
2436
+ if (i) {
2437
+ var s = i(e, t);
2438
+ if (s instanceof Promise) {
2439
+ s.then(o).catch(r);
2440
+ return;
2441
+ }
2442
+ }
2443
+ typeof fetch == "function" ? fetch(e, t).then(o).catch(r) : G(e, t).then(o).catch(r);
2444
+ }, pn = !1, Bo = function(e, t, r, i) {
2445
+ e.queryStringParams && (t = wt(t, e.queryStringParams));
2446
+ var o = dn({}, typeof e.customHeaders == "function" ? e.customHeaders() : e.customHeaders);
2447
+ typeof window > "u" && typeof global < "u" && typeof global.process < "u" && global.process.versions && global.process.versions.node && (o["User-Agent"] = "i18next-http-backend (node/".concat(global.process.version, "; ").concat(global.process.platform, " ").concat(global.process.arch, ")")), r && (o["Content-Type"] = "application/json");
2448
+ var s = typeof e.requestOptions == "function" ? e.requestOptions(r) : e.requestOptions, a = dn({
2449
+ method: r ? "POST" : "GET",
2450
+ body: r ? e.stringify(r) : void 0,
2451
+ headers: o
2452
+ }, pn ? {} : s), u = typeof e.alternateFetch == "function" && e.alternateFetch.length >= 1 ? e.alternateFetch : void 0;
2453
+ try {
2454
+ hn(t, a, i, u);
2455
+ } catch (c) {
2456
+ if (!s || Object.keys(s).length === 0 || !c.message || c.message.indexOf("not implemented") < 0)
2457
+ return i(c);
2458
+ try {
2459
+ Object.keys(s).forEach(function(l) {
2460
+ delete a[l];
2461
+ }), hn(t, a, i, u), pn = !0;
2462
+ } catch (l) {
2463
+ i(l);
2464
+ }
2465
+ }
2466
+ }, Ko = function(e, t, r, i) {
2467
+ r && Z(r) === "object" && (r = wt("", r).slice(1)), e.queryStringParams && (t = wt(t, e.queryStringParams));
2468
+ try {
2469
+ var o = Oe ? new Oe() : new We("MSXML2.XMLHTTP.3.0");
2470
+ o.open(r ? "POST" : "GET", t, 1), e.crossDomain || o.setRequestHeader("X-Requested-With", "XMLHttpRequest"), o.withCredentials = !!e.withCredentials, r && o.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), o.overrideMimeType && o.overrideMimeType("application/json");
2471
+ var s = e.customHeaders;
2472
+ if (s = typeof s == "function" ? s() : s, s)
2473
+ for (var a in s)
2474
+ o.setRequestHeader(a, s[a]);
2475
+ o.onreadystatechange = function() {
2476
+ o.readyState > 3 && i(o.status >= 400 ? o.statusText : null, {
2477
+ status: o.status,
2478
+ data: o.responseText
2479
+ });
2480
+ }, o.send(r);
2481
+ } catch (u) {
2482
+ }
2483
+ }, qo = function(e, t, r, i) {
2484
+ if (typeof r == "function" && (i = r, r = void 0), i = i || function() {
2485
+ }, G && t.indexOf("file:") !== 0)
2486
+ return Bo(e, t, r, i);
2487
+ if (rr() || typeof ActiveXObject == "function")
2488
+ return Ko(e, t, r, i);
2489
+ i(new Error("No fetch and no xhr implementation found!"));
2490
+ };
2491
+ function ae(n) {
2492
+ "@babel/helpers - typeof";
2493
+ return ae = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
2494
+ return typeof e;
2495
+ } : function(e) {
2496
+ return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
2497
+ }, ae(n);
2498
+ }
2499
+ function gn(n, e) {
2500
+ var t = Object.keys(n);
2501
+ if (Object.getOwnPropertySymbols) {
2502
+ var r = Object.getOwnPropertySymbols(n);
2503
+ e && (r = r.filter(function(i) {
2504
+ return Object.getOwnPropertyDescriptor(n, i).enumerable;
2505
+ })), t.push.apply(t, r);
2506
+ }
2507
+ return t;
2508
+ }
2509
+ function lt(n) {
2510
+ for (var e = 1; e < arguments.length; e++) {
2511
+ var t = arguments[e] != null ? arguments[e] : {};
2512
+ e % 2 ? gn(Object(t), !0).forEach(function(r) {
2513
+ ir(n, r, t[r]);
2514
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(t)) : gn(Object(t)).forEach(function(r) {
2515
+ Object.defineProperty(n, r, Object.getOwnPropertyDescriptor(t, r));
2516
+ });
2517
+ }
2518
+ return n;
2519
+ }
2520
+ function zo(n, e) {
2521
+ if (!(n instanceof e)) throw new TypeError("Cannot call a class as a function");
2522
+ }
2523
+ function Wo(n, e) {
2524
+ for (var t = 0; t < e.length; t++) {
2525
+ var r = e[t];
2526
+ r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(n, or(r.key), r);
2527
+ }
2528
+ }
2529
+ function Jo(n, e, t) {
2530
+ return e && Wo(n.prototype, e), Object.defineProperty(n, "prototype", { writable: !1 }), n;
2531
+ }
2532
+ function ir(n, e, t) {
2533
+ return (e = or(e)) in n ? Object.defineProperty(n, e, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : n[e] = t, n;
2534
+ }
2535
+ function or(n) {
2536
+ var e = Go(n, "string");
2537
+ return ae(e) == "symbol" ? e : e + "";
2538
+ }
2539
+ function Go(n, e) {
2540
+ if (ae(n) != "object" || !n) return n;
2541
+ var t = n[Symbol.toPrimitive];
2542
+ if (t !== void 0) {
2543
+ var r = t.call(n, e);
2544
+ if (ae(r) != "object") return r;
2545
+ throw new TypeError("@@toPrimitive must return a primitive value.");
2546
+ }
2547
+ return String(n);
2548
+ }
2549
+ var Xo = function() {
2550
+ return {
2551
+ loadPath: "/locales/{{lng}}/{{ns}}.json",
2552
+ addPath: "/locales/add/{{lng}}/{{ns}}",
2553
+ parse: function(t) {
2554
+ return JSON.parse(t);
2555
+ },
2556
+ stringify: JSON.stringify,
2557
+ parsePayload: function(t, r, i) {
2558
+ return ir({}, r, i || "");
2559
+ },
2560
+ parseLoadPayload: function(t, r) {
2561
+ },
2562
+ request: qo,
2563
+ reloadInterval: typeof window < "u" ? !1 : 60 * 60 * 1e3,
2564
+ customHeaders: {},
2565
+ queryStringParams: {},
2566
+ crossDomain: !1,
2567
+ withCredentials: !1,
2568
+ overrideMimeType: !1,
2569
+ requestOptions: {
2570
+ mode: "cors",
2571
+ credentials: "same-origin",
2572
+ cache: "default"
2573
+ }
2574
+ };
2575
+ }, sr = function() {
2576
+ function n(e) {
2577
+ var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2578
+ zo(this, n), this.services = e, this.options = t, this.allOptions = r, this.type = "backend", this.init(e, t, r);
2579
+ }
2580
+ return Jo(n, [{
2581
+ key: "init",
2582
+ value: function(t) {
2583
+ var r = this, i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
2584
+ if (this.services = t, this.options = lt(lt(lt({}, Xo()), this.options || {}), i), this.allOptions = o, this.services && this.options.reloadInterval) {
2585
+ var s = setInterval(function() {
2586
+ return r.reload();
2587
+ }, this.options.reloadInterval);
2588
+ ae(s) === "object" && typeof s.unref == "function" && s.unref();
2589
+ }
2590
+ }
2591
+ }, {
2592
+ key: "readMulti",
2593
+ value: function(t, r, i) {
2594
+ this._readAny(t, t, r, r, i);
2595
+ }
2596
+ }, {
2597
+ key: "read",
2598
+ value: function(t, r, i) {
2599
+ this._readAny([t], t, [r], r, i);
2600
+ }
2601
+ }, {
2602
+ key: "_readAny",
2603
+ value: function(t, r, i, o, s) {
2604
+ var a = this, u = this.options.loadPath;
2605
+ typeof this.options.loadPath == "function" && (u = this.options.loadPath(t, i)), u = _o(u), u.then(function(c) {
2606
+ if (!c) return s(null, {});
2607
+ var l = a.services.interpolator.interpolate(c, {
2608
+ lng: t.join("+"),
2609
+ ns: i.join("+")
2610
+ });
2611
+ a.loadUrl(l, s, r, o);
2612
+ });
2613
+ }
2614
+ }, {
2615
+ key: "loadUrl",
2616
+ value: function(t, r, i, o) {
2617
+ var s = this, a = typeof i == "string" ? [i] : i, u = typeof o == "string" ? [o] : o, c = this.options.parseLoadPayload(a, u);
2618
+ this.options.request(this.options, t, c, function(l, f) {
2619
+ if (f && (f.status >= 500 && f.status < 600 || !f.status)) return r("failed loading " + t + "; status code: " + f.status, !0);
2620
+ if (f && f.status >= 400 && f.status < 500) return r("failed loading " + t + "; status code: " + f.status, !1);
2621
+ if (!f && l && l.message) {
2622
+ var d = l.message.toLowerCase(), g = ["failed", "fetch", "network", "load"].find(function(w) {
2623
+ return d.indexOf(w) > -1;
2624
+ });
2625
+ if (g)
2626
+ return r("failed loading " + t + ": " + l.message, !0);
2627
+ }
2628
+ if (l) return r(l, !1);
2629
+ var m, v;
2630
+ try {
2631
+ typeof f.data == "string" ? m = s.options.parse(f.data, i, o) : m = f.data;
2632
+ } catch {
2633
+ v = "failed parsing " + t + " to json";
2634
+ }
2635
+ if (v) return r(v, !1);
2636
+ r(null, m);
2637
+ });
2638
+ }
2639
+ }, {
2640
+ key: "create",
2641
+ value: function(t, r, i, o, s) {
2642
+ var a = this;
2643
+ if (this.options.addPath) {
2644
+ typeof t == "string" && (t = [t]);
2645
+ var u = this.options.parsePayload(r, i, o), c = 0, l = [], f = [];
2646
+ t.forEach(function(d) {
2647
+ var g = a.options.addPath;
2648
+ typeof a.options.addPath == "function" && (g = a.options.addPath(d, r));
2649
+ var m = a.services.interpolator.interpolate(g, {
2650
+ lng: d,
2651
+ ns: r
2652
+ });
2653
+ a.options.request(a.options, m, u, function(v, w) {
2654
+ c += 1, l.push(v), f.push(w), c === t.length && typeof s == "function" && s(l, f);
2655
+ });
2656
+ });
2657
+ }
2658
+ }
2659
+ }, {
2660
+ key: "reload",
2661
+ value: function() {
2662
+ var t = this, r = this.services, i = r.backendConnector, o = r.languageUtils, s = r.logger, a = i.language;
2663
+ if (!(a && a.toLowerCase() === "cimode")) {
2664
+ var u = [], c = function(f) {
2665
+ var d = o.toResolveHierarchy(f);
2666
+ d.forEach(function(g) {
2667
+ u.indexOf(g) < 0 && u.push(g);
2668
+ });
2669
+ };
2670
+ c(a), this.allOptions.preload && this.allOptions.preload.forEach(function(l) {
2671
+ return c(l);
2672
+ }), u.forEach(function(l) {
2673
+ t.allOptions.ns.forEach(function(f) {
2674
+ i.read(l, f, "read", null, null, function(d, g) {
2675
+ d && s.warn("loading namespace ".concat(f, " for language ").concat(l, " failed"), d), !d && g && s.log("loaded namespace ".concat(f, " for language ").concat(l), g), i.loaded("".concat(l, "|").concat(f), d, g);
2676
+ });
2677
+ });
2678
+ });
2679
+ }
2680
+ }
2681
+ }]);
2682
+ }();
2683
+ sr.type = "backend";
2684
+ var Yo = function(e) {
2685
+ return {
2686
+ type: "backend",
2687
+ init: function(r, i, o) {
2688
+ },
2689
+ read: function(r, i, o) {
2690
+ if (typeof e == "function") {
2691
+ if (e.length < 3) {
2692
+ try {
2693
+ var s = e(r, i);
2694
+ s && typeof s.then == "function" ? s.then(function(a) {
2695
+ return o(null, a && a.default || a);
2696
+ }).catch(o) : o(null, s);
2697
+ } catch (a) {
2698
+ o(a);
2699
+ }
2700
+ return;
2701
+ }
2702
+ e(r, i, o);
2703
+ return;
2704
+ }
2705
+ o(null, e && e[r] && e[r][i]);
2706
+ }
2707
+ };
2708
+ };
2709
+ const Qo = {
2710
+ debug: !1,
2711
+ fallbackLng: Dn.enum.en,
2712
+ namespace: "translation",
2713
+ supportedLngs: Object.values(Un),
2714
+ nonExplicitSupportedLngs: !1
2715
+ }, Zo = {
2716
+ react: {
2717
+ useSuspense: !0
2718
+ },
2719
+ detection: {
2720
+ order: ["navigator", "htmlTag", "path", "subdomain"],
2721
+ caches: ["localStorage", "cookie"]
2722
+ }
2723
+ }, mn = (n, e) => {
2724
+ const t = import.meta.url.split("/").pop();
2725
+ return `${import.meta.url.replace(`/${t}`, "")}/locales/${n}/${e}.json`;
2726
+ };
2727
+ function bt() {
2728
+ return De.isInitialized || De.use(nr).use(new er(null, {
2729
+ order: ["cookie", "localStorage", "navigator"],
2730
+ lookupQuerystring: "lng",
2731
+ lookupCookie: "i18next",
2732
+ lookupLocalStorage: "i18nextLng",
2733
+ caches: ["localStorage", "cookie"]
2734
+ })).use(Ki).init({
2735
+ ...Qo,
2736
+ backend: {
2737
+ backends: [
2738
+ sr,
2739
+ Yo((n, e) => import(mn(n, e)))
2740
+ ],
2741
+ backendOptions: [
2742
+ {
2743
+ loadPath: mn("{{lng}}", "{{ns}}")
2744
+ }
2745
+ ]
2746
+ },
2747
+ ...Zo
2748
+ }), De;
2749
+ }
2750
+ const es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2751
+ __proto__: null,
2752
+ default: bt,
2753
+ initializeI18n: bt
2754
+ }, Symbol.toStringTag, { value: "Module" }));
2755
+ function wa(n) {
2756
+ const e = bt();
2757
+ return Gi("translation", { i18n: e, ...n });
2758
+ }
2759
+ const It = 60 * 1e3, Pe = It, ar = Pe * 2, ur = Pe * 3, Rt = Pe * 15, Ze = It, et = Ze * 2, lr = Ze * 3, cr = It * 15;
2760
+ var St;
2761
+ (function(n) {
2762
+ n.SelectAll = "SelectAll";
2763
+ })(St || (St = {}));
2764
+ var xt;
2765
+ (function(n) {
2766
+ n.Text = "text", n.Image = "image";
2767
+ })(xt || (xt = {}));
2768
+ var yn;
2769
+ (function(n) {
2770
+ n.Solved = "solved", n.Unsolved = "unsolved";
2771
+ })(yn || (yn = {}));
2772
+ var vn;
2773
+ (function(n) {
2774
+ n.pending = "Pending", n.approved = "Approved", n.disapproved = "Disapproved";
2775
+ })(vn || (vn = {}));
2776
+ var wn;
2777
+ (function(n) {
2778
+ n.notStored = "notStored", n.userSubmitted = "userSubmitted", n.serverChecked = "serverChecked", n.stored = "stored";
2779
+ })(wn || (wn = {}));
2780
+ var bn;
2781
+ (function(n) {
2782
+ n.active = "Active", n.inactive = "Inactive";
2783
+ })(bn || (bn = {}));
2784
+ var Sn;
2785
+ (function(n) {
2786
+ n.provider = "Provider", n.dapp = "Dapp", n.any = "Any";
2787
+ })(Sn || (Sn = {}));
2788
+ S();
2789
+ const ts = "___", ns = Hr((n) => {
2790
+ const e = n.split(ts);
2791
+ try {
2792
+ return e.length === 4;
2793
+ } catch {
2794
+ return !1;
2795
+ }
2796
+ }), rs = y({
2797
+ captchaId: _e([h(), Dt()]),
2798
+ captchaContentId: _e([h(), Dt()]),
2799
+ salt: h().min(34),
2800
+ solution: S().array().optional(),
2801
+ unlabelled: S().array().optional(),
2802
+ timeLimit: S().optional()
2803
+ }), fr = y({
2804
+ hash: h(),
2805
+ data: h(),
2806
+ type: Te(xt)
2807
+ }), dr = fr.extend({
2808
+ hash: h()
2809
+ }), is = dr.extend({
2810
+ label: h()
2811
+ }), os = dr.extend({
2812
+ label: h().optional()
2813
+ }), hr = rs.extend({
2814
+ items: K(fr),
2815
+ target: h()
2816
+ }), ss = hr.extend({
2817
+ solution: h().array().optional(),
2818
+ unlabelled: h().array().optional()
2819
+ }), as = ss.extend({
2820
+ solution: S().array().optional(),
2821
+ unlabelled: S().array().optional()
2822
+ }), us = K(hr);
2823
+ K(as);
2824
+ const pr = y({
2825
+ captchaId: h(),
2826
+ captchaContentId: h(),
2827
+ solution: h().array(),
2828
+ salt: h().min(34)
2829
+ });
2830
+ K(pr);
2831
+ y({
2832
+ items: K(os)
2833
+ });
2834
+ y({
2835
+ items: K(is)
2836
+ });
2837
+ y({
2838
+ captchas: us,
2839
+ format: Te(St)
2840
+ });
2841
+ y({
2842
+ labels: K(h())
2843
+ });
2844
+ var ls = Object.defineProperty, cs = (n, e, t) => e in n ? ls(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t, xn = (n, e, t) => (cs(n, typeof e != "symbol" ? e + "" : e, t), t), ct = {
2845
+ 0: 0,
2846
+ 1: 1,
2847
+ 2: 2,
2848
+ 3: 3,
2849
+ 4: 4,
2850
+ 5: 5,
2851
+ 6: 6,
2852
+ 7: 7,
2853
+ 8: 8,
2854
+ 9: 9,
2855
+ a: 10,
2856
+ b: 11,
2857
+ c: 12,
2858
+ d: 13,
2859
+ e: 14,
2860
+ f: 15,
2861
+ A: 10,
2862
+ B: 11,
2863
+ C: 12,
2864
+ D: 13,
2865
+ E: 14,
2866
+ F: 15
2867
+ };
2868
+ function fs(n) {
2869
+ const e = n.length % 2, t = (n[1] === "x" ? 2 : 0) + e, r = (n.length - t) / 2 + e, i = new Uint8Array(r);
2870
+ e && (i[0] = 0 | ct[n[2]]);
2871
+ for (let o = 0; o < r; ) {
2872
+ const s = t + o * 2, a = ct[n[s]], u = ct[n[s + 1]];
2873
+ i[e + o++] = a << 4 | u;
2874
+ }
2875
+ return i;
2876
+ }
2877
+ var On = class extends Uint8Array {
2878
+ constructor(n) {
2879
+ super(n), xn(this, "i", 0), xn(this, "v"), this.v = new DataView(n);
2880
+ }
2881
+ }, ee = (n) => (e) => n(e instanceof On ? e : new On(e instanceof Uint8Array ? e.buffer : typeof e == "string" ? fs(e).buffer : e)), tt = (n) => {
2882
+ const e = n.length;
2883
+ let t = 0;
2884
+ for (let i = 0; i < e; i++)
2885
+ t += n[i].byteLength;
2886
+ const r = new Uint8Array(t);
2887
+ for (let i = 0, o = 0; i < e; i++) {
2888
+ const s = n[i];
2889
+ r.set(s, o), o += s.byteLength;
2890
+ }
2891
+ return r;
2892
+ };
2893
+ function En(n, e) {
2894
+ const t = Object.keys(n), r = t.length, i = {};
2895
+ for (let o = 0; o < r; o++) {
2896
+ const s = t[o];
2897
+ i[s] = e(n[s], s);
2898
+ }
2899
+ return i;
2900
+ }
2901
+ var U = (n, e) => {
2902
+ const t = [n, e];
2903
+ return t.enc = n, t.dec = e, t;
2904
+ }, gr = (n, e) => (t) => n(e(t)), mr = (n, e) => (t) => e(n(t)), ds = ([n, e], t, r) => U(gr(n, t), mr(e, r));
2905
+ function hs(n, e) {
2906
+ return ee((t) => {
2907
+ const r = t.v[e](t.i, !0);
2908
+ return t.i += n, r;
2909
+ });
2910
+ }
2911
+ function ps(n, e) {
2912
+ return (t) => {
2913
+ const r = new Uint8Array(n);
2914
+ return new DataView(r.buffer)[e](0, t, !0), r;
2915
+ };
2916
+ }
2917
+ function X(n, e, t) {
2918
+ return U(ps(n, t), hs(n, e));
2919
+ }
2920
+ var ue = X(1, "getUint8", "setUint8"), Je = X(2, "getUint16", "setUint16"), Ee = X(4, "getUint32", "setUint32"), yr = X(8, "getBigUint64", "setBigUint64");
2921
+ X(1, "getInt8", "setInt8");
2922
+ X(2, "getInt16", "setInt16");
2923
+ X(4, "getInt32", "setInt32");
2924
+ X(8, "getBigInt64", "setBigInt64");
2925
+ var vr = (n) => {
2926
+ const e = new Uint8Array(16), t = new DataView(e.buffer);
2927
+ return t.setBigInt64(0, n, !0), t.setBigInt64(8, n >> 64n, !0), e;
2928
+ }, wr = (n) => ee((e) => {
2929
+ const { v: t, i: r } = e, i = t.getBigUint64(r, !0), o = t[n](r + 8, !0);
2930
+ return e.i += 16, o << 64n | i;
2931
+ });
2932
+ U(vr, wr("getBigUint64"));
2933
+ U(vr, wr("getBigInt64"));
2934
+ var br = (n) => {
2935
+ const e = new Uint8Array(32), t = new DataView(e.buffer);
2936
+ return t.setBigInt64(0, n, !0), t.setBigInt64(8, n >> 64n, !0), t.setBigInt64(16, n >> 128n, !0), t.setBigInt64(24, n >> 192n, !0), e;
2937
+ }, Sr = (n) => ee((e) => {
2938
+ let t = e.v.getBigUint64(e.i, !0);
2939
+ return e.i += 8, t |= e.v.getBigUint64(e.i, !0) << 64n, e.i += 8, t |= e.v.getBigUint64(e.i, !0) << 128n, e.i += 8, t |= e.v[n](e.i, !0) << 192n, e.i += 8, t;
2940
+ });
2941
+ U(br, Sr("getBigUint64"));
2942
+ U(br, Sr("getBigInt64"));
2943
+ var xr = ds(ue, (n) => n ? 1 : 0, Boolean), gs = [ue[1], Je[1], Ee[1]], ms = ee((n) => {
2944
+ const e = n[n.i], t = e & 3;
2945
+ if (t < 3)
2946
+ return gs[t](n) >>> 2;
2947
+ const r = (e >>> 2) + 4;
2948
+ n.i++;
2949
+ let i = 0n;
2950
+ const o = r / 8 | 0;
2951
+ let s = 0n;
2952
+ for (let u = 0; u < o; u++)
2953
+ i = yr[1](n) << s | i, s += 64n;
2954
+ let a = r % 8;
2955
+ return a > 3 && (i = BigInt(Ee[1](n)) << s | i, s += 32n, a -= 4), a > 1 && (i = BigInt(Je[1](n)) << s | i, s += 16n, a -= 2), a && (i = BigInt(ue[1](n)) << s | i), i;
2956
+ }), ys = 1n << 56n, vs = 1 << 24, ws = 256, bs = 4294967295n, Ss = 64, xs = 16384, Os = 1 << 30, Es = (n) => {
2957
+ if (n < 0)
2958
+ throw new Error(`Wrong compact input (${n})`);
2959
+ const e = Number(n) << 2;
2960
+ if (n < Ss)
2961
+ return ue[0](e);
2962
+ if (n < xs)
2963
+ return Je[0](e | 1);
2964
+ if (n < Os)
2965
+ return Ee[0](e | 2);
2966
+ let t = [new Uint8Array(1)], r = BigInt(n);
2967
+ for (; r >= ys; )
2968
+ t.push(yr[0](r)), r >>= 64n;
2969
+ r >= vs && (t.push(Ee[0](Number(r & bs))), r >>= 32n);
2970
+ let i = Number(r);
2971
+ i >= ws && (t.push(Je[0](i)), i >>= 16), i && t.push(ue[0](i));
2972
+ const o = tt(t);
2973
+ return o[0] = o.length - 5 << 2 | 3, o;
2974
+ }, Or = U(Es, ms), Cs = new TextEncoder(), Ts = (n) => {
2975
+ const e = Cs.encode(n);
2976
+ return tt([Or.enc(e.length), e]);
2977
+ }, ks = new TextDecoder(), Ps = ee((n) => {
2978
+ let e = Or.dec(n);
2979
+ const t = new DataView(n.buffer, n.i, e);
2980
+ return n.i += e, ks.decode(t);
2981
+ }), H = U(Ts, Ps), Ls = () => {
2982
+ }, Is = new Uint8Array(0);
2983
+ U(() => Is, Ls);
2984
+ var Er = (n) => ee((e) => {
2985
+ const t = ue.dec(e);
2986
+ if (t !== 0)
2987
+ return n === xr[1] ? t === 1 : n(e);
2988
+ }), Cr = (n) => (e) => {
2989
+ const t = new Uint8Array(1);
2990
+ return e === void 0 ? (t[0] = 0, t) : (t[0] = 1, n === xr[0] ? (t[0] = e ? 1 : 2, t) : tt([t, n(e)]));
2991
+ }, V = (n) => U(Cr(n[0]), Er(n[1]));
2992
+ V.enc = Cr;
2993
+ V.dec = Er;
2994
+ var Tr = (...n) => ee((e) => n.map((t) => t(e))), kr = (...n) => (e) => tt(n.map((t, r) => t(e[r]))), nt = (...n) => U(kr(...n.map(([e]) => e)), Tr(...n.map(([, e]) => e)));
2995
+ nt.enc = kr;
2996
+ nt.dec = Tr;
2997
+ var Pr = (n) => {
2998
+ const e = Object.keys(n);
2999
+ return gr(nt.enc(...Object.values(n)), (t) => e.map((r) => t[r]));
3000
+ }, Lr = (n) => {
3001
+ const e = Object.keys(n);
3002
+ return mr(nt.dec(...Object.values(n)), (t) => Object.fromEntries(t.map((r, i) => [e[i], r])));
3003
+ }, se = (n) => U(Pr(En(n, (e) => e[0])), Lr(En(n, (e) => e[1])));
3004
+ se.enc = Pr;
3005
+ se.dec = Lr;
3006
+ const Rs = y({
3007
+ [p.requestHash]: h()
3008
+ });
3009
+ y({
3010
+ [p.challenge]: h()
3011
+ });
3012
+ const $s = y({
3013
+ [p.timestamp]: h()
3014
+ }), Cn = y({
3015
+ [p.challenge]: h().optional(),
3016
+ [p.requestHash]: h().optional(),
3017
+ [p.timestamp]: h().optional()
3018
+ });
3019
+ y({
3020
+ [p.commitmentId]: h().optional(),
3021
+ [p.providerUrl]: h().optional(),
3022
+ [p.dapp]: h(),
3023
+ [p.user]: h(),
3024
+ [p.challenge]: h().optional(),
3025
+ [p.nonce]: S().optional(),
3026
+ [p.timestamp]: h(),
3027
+ [p.signature]: y({
3028
+ [p.provider]: Cn,
3029
+ [p.user]: Cn
3030
+ })
3031
+ });
3032
+ const js = se({
3033
+ [p.commitmentId]: V(H),
3034
+ [p.providerUrl]: V(H),
3035
+ [p.dapp]: H,
3036
+ [p.user]: H,
3037
+ [p.challenge]: V(H),
3038
+ [p.nonce]: V(Ee),
3039
+ [p.timestamp]: H,
3040
+ [p.signature]: se({
3041
+ [p.provider]: se({
3042
+ [p.challenge]: V(H),
3043
+ [p.requestHash]: V(H)
3044
+ }),
3045
+ [p.user]: se({
3046
+ [p.timestamp]: V(H),
3047
+ [p.requestHash]: V(H)
3048
+ })
3049
+ })
3050
+ }), Ir = h().startsWith("0x"), ba = (n) => {
3051
+ var e, t, r, i;
3052
+ return Ye(js.enc({
3053
+ [p.commitmentId]: void 0,
3054
+ [p.providerUrl]: void 0,
3055
+ [p.challenge]: void 0,
3056
+ [p.nonce]: void 0,
3057
+ ...n,
3058
+ signature: {
3059
+ provider: {
3060
+ challenge: ((e = n.signature.provider) == null ? void 0 : e.challenge) || void 0,
3061
+ requestHash: ((t = n.signature.provider) == null ? void 0 : t.requestHash) || void 0
3062
+ },
3063
+ user: {
3064
+ timestamp: ((r = n.signature.user) == null ? void 0 : r.timestamp) || void 0,
3065
+ requestHash: ((i = n.signature.user) == null ? void 0 : i.requestHash) || void 0
3066
+ }
3067
+ }
3068
+ }));
3069
+ };
3070
+ var F;
3071
+ (function(n) {
3072
+ n.GetImageCaptchaChallenge = "/v1/prosopo/provider/client/captcha/image", n.GetPowCaptchaChallenge = "/v1/prosopo/provider/client/captcha/pow", n.GetFrictionlessCaptchaChallenge = "/v1/prosopo/provider/client/captcha/frictionless", n.SubmitImageCaptchaSolution = "/v1/prosopo/provider/client/solution", n.SubmitPowCaptchaSolution = "/v1/prosopo/provider/client/pow/solution", n.VerifyPowCaptchaSolution = "/v1/prosopo/provider/client/pow/verify", n.VerifyImageCaptchaSolutionDapp = "/v1/prosopo/provider/client/image/dapp/verify", n.GetProviderStatus = "/v1/prosopo/provider/client/status", n.SubmitUserEvents = "/v1/prosopo/provider/client/events";
3073
+ })(F || (F = {}));
3074
+ var Ot;
3075
+ (function(n) {
3076
+ n.Healthz = "/healthz", n.GetProviderDetails = "/v1/prosopo/provider/public/details";
3077
+ })(Ot || (Ot = {}));
3078
+ var we;
3079
+ (function(n) {
3080
+ n.SiteKeyRegister = "/v1/prosopo/provider/admin/sitekey/register", n.UpdateDetectorKey = "/v1/prosopo/provider/admin/detector/update", n.RemoveDetectorKey = "/v1/prosopo/provider/admin/detector/remove";
3081
+ })(we || (we = {}));
3082
+ const Rr = {
3083
+ [F.GetImageCaptchaChallenge]: { windowMs: 6e4, limit: 30 },
3084
+ [F.GetPowCaptchaChallenge]: { windowMs: 6e4, limit: 60 },
3085
+ [F.SubmitImageCaptchaSolution]: { windowMs: 6e4, limit: 60 },
3086
+ [F.GetFrictionlessCaptchaChallenge]: {
3087
+ windowMs: 6e4,
3088
+ limit: 60
3089
+ },
3090
+ [F.SubmitPowCaptchaSolution]: { windowMs: 6e4, limit: 60 },
3091
+ [F.VerifyPowCaptchaSolution]: { windowMs: 6e4, limit: 60 },
3092
+ [F.VerifyImageCaptchaSolutionDapp]: {
3093
+ windowMs: 6e4,
3094
+ limit: 60
3095
+ },
3096
+ [F.GetProviderStatus]: { windowMs: 6e4, limit: 60 },
3097
+ [Ot.GetProviderDetails]: { windowMs: 6e4, limit: 60 },
3098
+ [F.SubmitUserEvents]: { windowMs: 6e4, limit: 60 },
3099
+ [we.SiteKeyRegister]: { windowMs: 6e4, limit: 5 },
3100
+ [we.UpdateDetectorKey]: { windowMs: 6e4, limit: 5 },
3101
+ [we.RemoveDetectorKey]: { windowMs: 6e4, limit: 5 }
3102
+ }, As = (n) => y(Object.entries(n).reduce((e, [t, r]) => {
3103
+ const i = t;
3104
+ return e[i] = y({
3105
+ windowMs: Ft.number().optional().default(r.windowMs),
3106
+ limit: Ft.number().optional().default(r.limit)
3107
+ }), e;
3108
+ }, {})), Ns = As(Rr);
3109
+ y({
3110
+ [p.user]: h(),
3111
+ [p.dapp]: h(),
3112
+ [p.datasetId]: _e([h(), K(S())]),
3113
+ [p.sessionId]: h().optional()
3114
+ });
3115
+ y({
3116
+ [p.user]: h(),
3117
+ [p.dapp]: h(),
3118
+ [p.captchas]: K(pr),
3119
+ [p.requestHash]: h(),
3120
+ [p.timestamp]: h(),
3121
+ [p.signature]: y({
3122
+ [p.user]: $s,
3123
+ [p.provider]: Rs
3124
+ })
3125
+ });
3126
+ y({
3127
+ [p.token]: Ir,
3128
+ [p.dappSignature]: h(),
3129
+ [p.maxVerifiedTime]: S().optional().default(Rt),
3130
+ [p.ip]: h().optional()
3131
+ });
3132
+ y({
3133
+ [p.token]: Ir,
3134
+ [p.dappSignature]: h(),
3135
+ [p.verifiedTimeout]: S().optional().default(et),
3136
+ [p.ip]: h().optional()
3137
+ });
3138
+ y({
3139
+ [p.user]: h(),
3140
+ [p.dapp]: h(),
3141
+ [p.sessionId]: h().optional()
3142
+ });
3143
+ const Sa = y({
3144
+ [p.challenge]: ns,
3145
+ [p.difficulty]: S(),
3146
+ [p.signature]: y({
3147
+ [p.user]: y({
3148
+ [p.timestamp]: h()
3149
+ }),
3150
+ [p.provider]: y({
3151
+ [p.challenge]: h()
3152
+ })
3153
+ }),
3154
+ [p.user]: h(),
3155
+ [p.dapp]: h(),
3156
+ [p.nonce]: S(),
3157
+ [p.verifiedTimeout]: S().optional().default(et)
3158
+ });
3159
+ y({
3160
+ [p.dapp]: h(),
3161
+ [p.token]: h(),
3162
+ [p.user]: h()
3163
+ });
3164
+ y({
3165
+ [p.siteKey]: h()
3166
+ });
3167
+ y({
3168
+ [p.siteKey]: h(),
3169
+ [p.tier]: Te(Ve),
3170
+ [p.settings]: mi.optional()
3171
+ });
3172
+ const xa = y({
3173
+ [p.detectorKey]: h()
3174
+ }), $r = y({
3175
+ solved: y({
3176
+ count: S().positive()
3177
+ }).optional().default({ count: 1 }),
3178
+ unsolved: y({
3179
+ count: S().nonnegative()
3180
+ }).optional().default({ count: 0 })
3181
+ });
3182
+ var Et;
3183
+ (function(n) {
3184
+ n.ipAddress = "ipAddress", n.userAccount = "userAccount";
3185
+ })(Et || (Et = {}));
3186
+ const Us = Te(Et);
3187
+ y({
3188
+ global: Me(),
3189
+ hardBlock: Me(),
3190
+ type: Us,
3191
+ dappAccount: h().optional(),
3192
+ captchaConfig: $r.optional()
3193
+ });
3194
+ y({
3195
+ [p.dapp]: h()
3196
+ });
3197
+ const Ds = y({
3198
+ PENALTY_OLD_TIMESTAMP: S().positive().optional().default(0.2),
3199
+ PENALTY_ACCESS_RULE: S().positive().optional().default(0.5)
3200
+ }), Tn = Xe([
3201
+ "trace",
3202
+ "debug",
3203
+ "info",
3204
+ "warn",
3205
+ "error",
3206
+ "fatal",
3207
+ "log"
3208
+ ]);
3209
+ Xe([
3210
+ "mongo",
3211
+ "mongoMemory",
3212
+ "provider",
3213
+ "client",
3214
+ "captcha"
3215
+ ]);
3216
+ const Ct = Xe([
3217
+ "development",
3218
+ "staging",
3219
+ "production"
3220
+ ]), Fs = In(Ct, y({
3221
+ type: h(),
3222
+ endpoint: h(),
3223
+ dbname: h().default("prosopo"),
3224
+ authSource: h().default("admin")
3225
+ })), _s = y({
3226
+ logLevel: Tn.optional().default(Tn.enum.info),
3227
+ defaultEnvironment: Ct.default(Ct.Values.production),
3228
+ account: y({
3229
+ address: h().optional(),
3230
+ secret: h().optional(),
3231
+ password: h().optional()
3232
+ })
3233
+ });
3234
+ R.object({
3235
+ encoded: R.string(),
3236
+ encoding: R.object({
3237
+ content: R.array(R.string()),
3238
+ type: R.array(R.string()),
3239
+ version: R.string()
3240
+ }),
3241
+ address: R.string(),
3242
+ meta: R.object({
3243
+ genesisHash: R.string(),
3244
+ name: R.string(),
3245
+ whenCreated: R.number()
3246
+ })
3247
+ });
3248
+ const jr = _s.merge(y({
3249
+ database: Fs.optional(),
3250
+ devOnlyWatchEvents: Me().optional()
3251
+ })), Ms = y({
3252
+ baseURL: h().url(),
3253
+ port: S().optional().default(9229)
3254
+ });
3255
+ y({
3256
+ requiredNumberOfSolutions: S().positive().min(2),
3257
+ solutionWinningPercentage: S().positive().max(100),
3258
+ captchaBlockRecency: S().positive().min(2)
3259
+ });
3260
+ const Ar = jr.merge(y({
3261
+ userAccountAddress: h().optional(),
3262
+ web2: Me().optional().default(!0),
3263
+ solutionThreshold: S().positive().max(100).optional().default(80),
3264
+ dappName: h().optional().default("ProsopoClientDapp"),
3265
+ serverUrl: h().optional()
3266
+ })), Nr = {
3267
+ challengeTimeout: Pe,
3268
+ solutionTimeout: ar,
3269
+ verifiedTimeout: ur,
3270
+ cachedTimeout: Rt
3271
+ }, Ur = {
3272
+ challengeTimeout: et,
3273
+ solutionTimeout: Ze,
3274
+ cachedTimeout: lr
3275
+ }, Dr = {
3276
+ maxVerifiedTime: cr
3277
+ }, $t = {
3278
+ image: Nr,
3279
+ pow: Ur,
3280
+ contract: Dr
3281
+ }, Fr = y({
3282
+ image: y({
3283
+ challengeTimeout: S().positive().optional().default(Pe),
3284
+ solutionTimeout: S().positive().optional().default(ar),
3285
+ verifiedTimeout: S().positive().optional().default(ur),
3286
+ cachedTimeout: S().positive().optional().default(Rt)
3287
+ }).default(Nr),
3288
+ pow: y({
3289
+ verifiedTimeout: S().positive().optional().default(et),
3290
+ solutionTimeout: S().positive().optional().default(Ze),
3291
+ cachedTimeout: S().positive().optional().default(lr)
3292
+ }).default(Ur),
3293
+ contract: y({
3294
+ maxVerifiedTime: S().positive().optional().default(cr)
3295
+ }).default(Dr)
3296
+ }).default($t);
3297
+ Ar.merge(y({
3298
+ serverUrl: h().url().optional(),
3299
+ timeouts: Fr.optional().default($t)
3300
+ }));
3301
+ y({
3302
+ area: y({
3303
+ width: S().positive(),
3304
+ height: S().positive()
3305
+ }),
3306
+ offsetParameter: S().positive(),
3307
+ multiplier: S().positive(),
3308
+ fontSizeFactor: S().positive(),
3309
+ maxShadowBlur: S().positive(),
3310
+ numberOfRounds: S().positive(),
3311
+ seed: S().positive()
3312
+ });
3313
+ const Hs = _e([_t("light"), _t("dark")]);
3314
+ var Ce;
3315
+ (function(n) {
3316
+ n.visible = "visible", n.invisible = "invisible";
3317
+ })(Ce || (Ce = {}));
3318
+ const Vs = Xe([Ce.visible, Ce.invisible]).optional(), Oa = Ar.and(y({
3319
+ theme: Hs.optional().default("light"),
3320
+ captchas: Fr.optional().default($t),
3321
+ language: Dn.optional(),
3322
+ mode: Vs.optional().default(Ce.visible)
3323
+ }));
3324
+ jr.merge(y({
3325
+ captchas: $r.optional().default({
3326
+ solved: { count: 1 },
3327
+ unsolved: { count: 0 }
3328
+ }),
3329
+ penalties: Ds,
3330
+ scheduledTasks: y({
3331
+ captchaScheduler: y({
3332
+ schedule: h().optional()
3333
+ }).optional(),
3334
+ clientListScheduler: y({
3335
+ schedule: h().optional()
3336
+ }).optional()
3337
+ }).optional(),
3338
+ server: Ms,
3339
+ mongoEventsUri: h().optional(),
3340
+ mongoCaptchaUri: h().optional(),
3341
+ mongoClientUri: h().optional(),
3342
+ redisConnection: y({
3343
+ url: h(),
3344
+ password: h()
3345
+ }),
3346
+ rateLimits: Ns.default(Rr),
3347
+ proxyCount: S().optional().default(0),
3348
+ lRules: In(h(), S()).optional(),
3349
+ authAccount: y({
3350
+ address: h().optional(),
3351
+ secret: h().optional(),
3352
+ password: h().optional()
3353
+ })
3354
+ }));
3355
+ const Bs = async () => (await import("./fp.esm-BADUiinQ.js")).default, Ks = async () => (await (await (await Bs()).load()).get()).visitorId, re = new Uint8Array([161, 35, 3, 33, 0]), Ge = new Uint8Array([
3356
+ 48,
3357
+ 83,
3358
+ 2,
3359
+ 1,
3360
+ 1,
3361
+ 48,
3362
+ 5,
3363
+ 6,
3364
+ 3,
3365
+ 43,
3366
+ 101,
3367
+ 112,
3368
+ 4,
3369
+ 34,
3370
+ 4,
3371
+ 32
3372
+ ]), qs = 32, kn = 64, zs = 32, ge = Ge.length;
3373
+ function Ws(n, e, t) {
3374
+ const r = Array.isArray(t) || t === void 0 ? t : [t], i = qr(e, n, r), o = i.subarray(0, Ge.length);
3375
+ if (!rt(o, Ge))
3376
+ throw new Error("Invalid encoding header found in body");
3377
+ let s = i.subarray(ge, ge + kn), a = ge + kn, u = i.subarray(a, a + re.length);
3378
+ if (!rt(u, re) && (a = ge + zs, s = i.subarray(ge, a), u = i.subarray(a, a + re.length), !rt(u, re)))
3379
+ throw new Error("Invalid encoding divider found in body");
3380
+ const c = a + re.length;
3381
+ return {
3382
+ publicKey: i.subarray(c, c + qs),
3383
+ secretKey: s
3384
+ };
3385
+ }
3386
+ function Js({ publicKey: n, secretKey: e }, t) {
3387
+ if (!e)
3388
+ throw new Error("Expected a valid secretKey to be passed to encode");
3389
+ const r = dt(Ge, e, re, n);
3390
+ if (!t)
3391
+ return r;
3392
+ const { params: i, password: o, salt: s } = zr(t), { encrypted: a, nonce: u } = Wr(r, o.subarray(0, 32));
3393
+ return dt(Jr(s, i), u, a);
3394
+ }
3395
+ function Gs(n, { address: e, meta: t }, r, i) {
3396
+ return Rn(Gr(r, ["pkcs8", n], i), {
3397
+ address: e,
3398
+ meta: t
3399
+ });
3400
+ }
3401
+ const Xs = new Uint8Array([]), Ys = {
3402
+ sr25519: An,
3403
+ ed25519: () => {
3404
+ throw new Error("Not Implemented");
3405
+ },
3406
+ ecdsa: () => {
3407
+ throw new Error("Not Implemented");
3408
+ },
3409
+ ethereum: () => {
3410
+ throw new Error("Not Implemented");
3411
+ }
3412
+ }, Qs = {
3413
+ ecdsa: new Uint8Array([2]),
3414
+ ed25519: new Uint8Array([0]),
3415
+ ethereum: new Uint8Array([2]),
3416
+ sr25519: new Uint8Array([1])
3417
+ }, Zs = {
3418
+ sr25519: ei,
3419
+ ed25519: () => {
3420
+ throw new Error("Not Implemented");
3421
+ },
3422
+ ecdsa: () => {
3423
+ throw new Error("Not Implemented");
3424
+ },
3425
+ ethereum: () => {
3426
+ throw new Error("Not Implemented");
3427
+ }
3428
+ }, ft = {
3429
+ sr25519: (n) => n,
3430
+ ed25519: () => {
3431
+ throw new Error("Not Implemented");
3432
+ },
3433
+ ecdsa: () => {
3434
+ throw new Error("Not Implemented");
3435
+ },
3436
+ ethereum: () => {
3437
+ throw new Error("Not Implemented");
3438
+ }
3439
+ };
3440
+ function me(n) {
3441
+ return !n || Br(n);
3442
+ }
3443
+ function ie({ toSS58: n, type: e }, { publicKey: t, secretKey: r }, i = {}, o = null, s) {
3444
+ const a = (l, f) => {
3445
+ const d = Ws(l, f || o, s);
3446
+ if (d.secretKey.length === 64)
3447
+ t = d.publicKey, r = d.secretKey;
3448
+ else {
3449
+ const g = Ys[e](d.secretKey);
3450
+ t = g.publicKey, r = g.secretKey;
3451
+ }
3452
+ }, u = (l) => (me(r) && o && a(l, o), o = Js({ publicKey: t, secretKey: r }, l), s = void 0, o), c = () => {
3453
+ const l = ft[e](t);
3454
+ return n(l);
3455
+ };
3456
+ return {
3457
+ get address() {
3458
+ return c();
3459
+ },
3460
+ get addressRaw() {
3461
+ return ft[e](t);
3462
+ },
3463
+ get isLocked() {
3464
+ return me(r);
3465
+ },
3466
+ get meta() {
3467
+ return i;
3468
+ },
3469
+ get publicKey() {
3470
+ return t;
3471
+ },
3472
+ get type() {
3473
+ return e;
3474
+ },
3475
+ decodePkcs8: a,
3476
+ derive: (l, f) => {
3477
+ if (me(r))
3478
+ throw new Error("Cannot derive on a locked keypair");
3479
+ const { path: d } = ti(l), g = jn({ publicKey: t, secretKey: r }, d, e);
3480
+ return ie({ toSS58: n, type: e }, g, f, null);
3481
+ },
3482
+ encodePkcs8: (l) => u(l),
3483
+ lock: () => {
3484
+ r = new Uint8Array([]);
3485
+ },
3486
+ setMeta: (l) => {
3487
+ i = Rn({}, i, l);
3488
+ },
3489
+ sign: (l, f = {}) => {
3490
+ if (me(r))
3491
+ throw new Error("Cannot sign with a locked key pair");
3492
+ return dt(f.withType ? Qs[e] : Xs, Zs[e](ht(l), { publicKey: t, secretKey: r }));
3493
+ },
3494
+ toJson: (l) => {
3495
+ const f = ["ecdsa", "ethereum"].includes(e) ? t.length === 20 ? Mt(t) : Mt(Zr(t)) : c();
3496
+ return Gs(e, { address: f, meta: i }, u(l), !!l);
3497
+ },
3498
+ unlock: (l) => {
3499
+ a(l);
3500
+ },
3501
+ verify: (l, f, d) => Qr(l, f, ft[e](ht(d))).isValid,
3502
+ vrfSign: (l, f, d) => {
3503
+ if (me(r))
3504
+ throw new Error("Cannot sign with a locked key pair");
3505
+ return Yr(l, { secretKey: r }, f, d);
3506
+ },
3507
+ vrfVerify: (l, f, d, g, m) => Xr(l, f, t, g, m)
3508
+ };
3509
+ }
3510
+ var oe;
3511
+ class ea {
3512
+ constructor() {
3513
+ oe.set(this, {});
3514
+ }
3515
+ add(e) {
3516
+ return N(this, oe, "f")[Ae(e.address).toString()] = e, e;
3517
+ }
3518
+ all() {
3519
+ return Object.values(N(this, oe, "f"));
3520
+ }
3521
+ get(e) {
3522
+ const t = N(this, oe, "f")[Ae(e).toString()];
3523
+ if (!t)
3524
+ throw new Error(`Unable to retrieve keypair '${Kr(e) || je(e) ? Ye(ht(e)) : e}'`);
3525
+ return t;
3526
+ }
3527
+ remove(e) {
3528
+ delete N(this, oe, "f")[Ae(e).toString()];
3529
+ }
3530
+ }
3531
+ oe = /* @__PURE__ */ new WeakMap();
3532
+ var z, Fe, ye;
3533
+ const ta = "bottom drive obey lake curtain smoke basket hold race lonely fit walk", Pn = {
3534
+ sr25519: (n) => An(n),
3535
+ ed25519: () => {
3536
+ throw new Error("Not Implemented");
3537
+ },
3538
+ ecdsa: () => {
3539
+ throw new Error("Not Implemented");
3540
+ },
3541
+ ethereum: () => {
3542
+ throw new Error("Not Implemented");
3543
+ }
3544
+ };
3545
+ function na({ publicKey: n }) {
3546
+ return n;
3547
+ }
3548
+ class ra {
3549
+ constructor(e = {}) {
3550
+ if (z.set(this, void 0), Fe.set(this, void 0), ye.set(this, void 0), this.decodeAddress = Ae, this.encodeAddress = (t, r) => ni(t, r ?? N(this, ye, "f")), e.type = e.type || "sr25519", !["sr25519"].includes(e.type || "undefined"))
3551
+ throw new Error(`Expected a keyring type of either 'sr25519', found '${e.type || "unknown"}`);
3552
+ Ie(this, z, new ea(), "f"), Ie(this, ye, e.ss58Format, "f"), Ie(this, Fe, e.type, "f");
3553
+ }
3554
+ get pairs() {
3555
+ return this.getPairs();
3556
+ }
3557
+ get publicKeys() {
3558
+ return this.getPublicKeys();
3559
+ }
3560
+ get type() {
3561
+ return N(this, Fe, "f");
3562
+ }
3563
+ addPair(e) {
3564
+ return N(this, z, "f").add(e);
3565
+ }
3566
+ addFromAddress(e, t = {}, r = null, i = this.type, o, s) {
3567
+ const a = this.decodeAddress(e, o);
3568
+ return this.addPair(ie({ toSS58: this.encodeAddress, type: i }, { publicKey: a, secretKey: new Uint8Array() }, t, r, s));
3569
+ }
3570
+ addFromJson(e, t) {
3571
+ return this.addPair(this.createFromJson(e, t));
3572
+ }
3573
+ addFromMnemonic(e, t = {}, r = this.type) {
3574
+ return this.addFromUri(e, t, r);
3575
+ }
3576
+ addFromPair(e, t = {}, r = this.type) {
3577
+ return this.addPair(this.createFromPair(e, t, r));
3578
+ }
3579
+ addFromSeed(e, t = {}, r = this.type) {
3580
+ return this.addPair(ie({ toSS58: this.encodeAddress, type: r }, Pn[r](e), t, null));
3581
+ }
3582
+ addFromUri(e, t = {}, r = this.type) {
3583
+ return this.addPair(this.createFromUri(e, t, r));
3584
+ }
3585
+ createFromJson({ address: e, encoded: t, encoding: { content: r, type: i, version: o }, meta: s }, a) {
3586
+ if (o === "3" && r[0] !== "pkcs8")
3587
+ throw new Error(`Unable to decode non-pkcs8 type, [${r.join(",")}] found}`);
3588
+ const u = o === "0" || !Array.isArray(r) ? this.type : r[1];
3589
+ if (!u)
3590
+ throw new Error("cryptoType is undefined");
3591
+ const c = Array.isArray(i) ? i : [i];
3592
+ if (!["sr25519"].includes(u))
3593
+ throw new Error(`Unknown crypto type ${u}`);
3594
+ const l = je(e) ? it(e) : this.decodeAddress(e, a), f = je(t) ? it(t) : ri(t);
3595
+ return ie({ toSS58: this.encodeAddress, type: u }, { publicKey: l, secretKey: new Uint8Array() }, s, f, c);
3596
+ }
3597
+ createFromPair(e, t = {}, r = this.type) {
3598
+ return ie({ toSS58: this.encodeAddress, type: r }, e, t, null);
3599
+ }
3600
+ createFromUri(e, t = {}, r = this.type) {
3601
+ const i = e.startsWith("//") ? `${ta}${e}` : e, { password: o, path: s, phrase: a } = ii(i);
3602
+ let u;
3603
+ if (je(a, 256))
3604
+ u = it(a);
3605
+ else {
3606
+ const f = a.split(" ");
3607
+ if ([12, 15, 18, 21, 24].includes(f.length))
3608
+ u = r === "ethereum" ? (() => {
3609
+ throw new Error("Not implemented - Prosopo Keyring supports sr25519 only");
3610
+ })() : oi(a, o);
3611
+ else {
3612
+ if (a.length > 32)
3613
+ throw new Error("specified phrase is not a valid mnemonic and is invalid as a raw seed at > 32 bytes");
3614
+ u = $n(a.padEnd(32));
3615
+ }
3616
+ }
3617
+ const l = jn(Pn[r](u), s, r);
3618
+ return ie({ toSS58: this.encodeAddress, type: r }, l, t, null);
3619
+ }
3620
+ getPair(e) {
3621
+ return N(this, z, "f").get(e);
3622
+ }
3623
+ getPairs() {
3624
+ return N(this, z, "f").all();
3625
+ }
3626
+ getPublicKeys() {
3627
+ return N(this, z, "f").all().map(na);
3628
+ }
3629
+ removePair(e) {
3630
+ N(this, z, "f").remove(e);
3631
+ }
3632
+ setSS58Format(e) {
3633
+ Ie(this, ye, e, "f");
3634
+ }
3635
+ toJson(e, t) {
3636
+ return N(this, z, "f").get(e).toJson(t);
3637
+ }
3638
+ }
3639
+ z = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap();
3640
+ class ia {
3641
+ }
3642
+ const oa = async () => (await import("./Signer-DP9drQ55.js")).default, sa = async () => (await import("./utilCryptoChunk-CIPUtfoO.js").then((n) => n.A)).entropyToMnemonic;
3643
+ class Ln extends ia {
3644
+ async getAccount(e) {
3645
+ const t = await this.createAccount(e), r = await this.createExtension(t);
3646
+ return {
3647
+ account: t,
3648
+ extension: r
3649
+ };
3650
+ }
3651
+ async createExtension(e) {
3652
+ const t = await oa(), r = new t(async () => {
3653
+ });
3654
+ return r.signRaw = async (i) => {
3655
+ const o = e.keypair.sign(i.data);
3656
+ return {
3657
+ id: 1,
3658
+ signature: Ye(o)
3659
+ };
3660
+ }, {
3661
+ accounts: {
3662
+ get: async () => [e],
3663
+ subscribe: () => () => {
3664
+ }
3665
+ },
3666
+ name: "procaptcha-web2",
3667
+ version: li,
3668
+ signer: r
3669
+ };
3670
+ }
3671
+ async createAccount(e) {
3672
+ const t = await Ks(), r = Vr(t, 128).slice(2), i = $n(r), s = (await sa())(i), a = "sr25519", c = new ra({
3673
+ type: a
3674
+ }).addFromMnemonic(s), l = c.address;
3675
+ return {
3676
+ address: l,
3677
+ name: l,
3678
+ keypair: c
3679
+ };
3680
+ }
3681
+ }
3682
+ const Ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3683
+ __proto__: null,
3684
+ ExtensionWeb2: Ln,
3685
+ default: Ln
3686
+ }, Symbol.toStringTag, { value: "Module" }));
3687
+ export {
3688
+ p as A,
3689
+ be as C,
3690
+ ia as E,
3691
+ Dn as L,
3692
+ Ce as M,
3693
+ Oa as P,
3694
+ va as R,
3695
+ Sa as S,
3696
+ xa as U,
3697
+ ga as a,
3698
+ Ct as b,
3699
+ F as c,
3700
+ Ot as d,
3701
+ we as e,
3702
+ ba as f,
3703
+ $i as g,
3704
+ ma as h,
3705
+ pa as i,
3706
+ Ea as j,
3707
+ ya as l,
3708
+ _ as r,
3709
+ ha as s,
3710
+ wa as u
3711
+ };