@prosopo/procaptcha-bundle 2.1.14 → 2.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"renderLogic.d.ts","sourceRoot":"","sources":["../../../src/util/renderLogic.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACX,4BAA4B,EAE5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,kBAAkB,CAAC;AAQzD,eAAO,MAAM,WAAW,aACb,OAAO,EAAE,UACX,4BAA4B,gCAmCpC,CAAC"}
1
+ {"version":3,"file":"renderLogic.d.ts","sourceRoot":"","sources":["../../../src/util/renderLogic.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EACX,4BAA4B,EAE5B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,kBAAkB,CAAC;AA4BzD,eAAO,MAAM,WAAW,aACb,OAAO,EAAE,UACX,4BAA4B,gCAqDpC,CAAC"}
@@ -1,4 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import createCache from "@emotion/cache";
3
+ import { CacheProvider } from "@emotion/react";
2
4
  import { ProcaptchaFrictionless } from "@prosopo/procaptcha-frictionless";
3
5
  import { ProcaptchaPow } from "@prosopo/procaptcha-pow";
4
6
  import { Procaptcha } from "@prosopo/procaptcha-react";
@@ -8,30 +10,47 @@ import { setLanguage } from "./language.js";
8
10
  import { setTheme } from "./theme.js";
9
11
  import { setValidChallengeLength } from "./timeout.js";
10
12
  const identifierPrefix = "procaptcha-";
13
+ function makeShadowRoot(element, renderOptions) {
14
+ const customCss = "";
15
+ const wrapperElement = document.createElement("prosopo-procaptcha");
16
+ const wrapperShadow = wrapperElement.attachShadow({ mode: "open" });
17
+ wrapperShadow.innerHTML +=
18
+ '<style>:host{all:initial!important;}:host *{font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";}</style>';
19
+ wrapperShadow.innerHTML +=
20
+ "" !== customCss ? `<style>${customCss}</style>` : "";
21
+ element.appendChild(wrapperElement);
22
+ return wrapperShadow;
23
+ }
11
24
  export const renderLogic = (elements, config, renderOptions) => {
12
25
  const roots = [];
13
26
  for (const element of elements) {
14
27
  const callbacks = getDefaultCallbacks(element);
28
+ const shadowRoot = makeShadowRoot(element, renderOptions);
15
29
  setUserCallbacks(renderOptions, callbacks, element);
16
30
  setTheme(renderOptions, element, config);
17
31
  setValidChallengeLength(renderOptions, element, config);
18
32
  setLanguage(renderOptions, element, config);
33
+ const emotionCache = createCache({
34
+ key: "procaptcha",
35
+ prepend: true,
36
+ container: shadowRoot,
37
+ });
19
38
  let root = null;
20
39
  switch (renderOptions?.captchaType) {
21
40
  case "pow":
22
41
  console.log("rendering pow");
23
- root = createRoot(element, { identifierPrefix });
24
- root.render(_jsx(ProcaptchaPow, { config: config, callbacks: callbacks }));
42
+ root = createRoot(shadowRoot, { identifierPrefix });
43
+ root.render(_jsx(CacheProvider, { value: emotionCache, children: _jsx(ProcaptchaPow, { config: config, callbacks: callbacks }) }));
25
44
  break;
26
45
  case "image":
27
46
  console.log("rendering image");
28
- root = createRoot(element, { identifierPrefix });
29
- root.render(_jsx(Procaptcha, { config: config, callbacks: callbacks }));
47
+ root = createRoot(shadowRoot, { identifierPrefix });
48
+ root.render(_jsx(CacheProvider, { value: emotionCache, children: _jsx(Procaptcha, { config: config, callbacks: callbacks }) }));
30
49
  break;
31
50
  default:
32
51
  console.log("rendering frictionless");
33
- root = createRoot(element, { identifierPrefix });
34
- root.render(_jsx(ProcaptchaFrictionless, { config: config, callbacks: callbacks }));
52
+ root = createRoot(shadowRoot, { identifierPrefix });
53
+ root.render(_jsx(CacheProvider, { value: emotionCache, children: _jsx(ProcaptchaFrictionless, { config: config, callbacks: callbacks }) }));
35
54
  break;
36
55
  }
37
56
  roots.push(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"}
@@ -1,9 +1,14 @@
1
- import { H as ue, I as ce, J as le, K as fe, e as j, _ as Y, M as _, r as d, N as V, O as de, Q as ge, S as pe, q as X, T as he, U as me, V as ve, X as fn, Y as dn, Z as gn, $ as pn, a0 as hn, a1 as mn, a2 as vn, a3 as bn, l as be, d as we, a as ye, j as L } from "./index-2JU-iJPL.js";
1
+ import { H as ue, I as ce, J as le, K as fn, r as d, T as dn, M as gn, N as pn, O as hn, Q as mn, S as vn, U as bn, V as fe, X as de, e as j, _ as Y, Y as _, Z as V, $ as ge, a0 as pe, a1 as he, q as X, a2 as me, a3 as ve, l as be, d as we, a as ye, j as L } from "./index-CgI2y2A6.js";
2
2
  const wn = (t) => new Promise((e) => setTimeout(e, t));
3
3
  function yn(t) {
4
4
  return ue(ce(t));
5
5
  }
6
- function ke(t) {
6
+ function ke() {
7
+ for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
8
+ e[n] = arguments[n];
9
+ return le(e);
10
+ }
11
+ function Se(t) {
7
12
  return new Promise((e) => {
8
13
  document.readyState === "complete" ? e(t()) : window.addEventListener("load", () => e(t()));
9
14
  });
@@ -15,29 +20,29 @@ let M = null;
15
20
  function Z() {
16
21
  return Object.values(P.injectedWeb3).filter(({ connect: t, enable: e }) => !!(t || e)).length !== 0;
17
22
  }
18
- function Se(t) {
19
- return Promise.all(Object.entries(P.injectedWeb3).map(([e, { connect: n, enable: r, version: a }]) => Promise.resolve().then(() => n ? n(t) : r ? r(t).then((o) => le({ name: e, version: a || "unknown" }, o)) : Promise.reject(new Error("No connect(..) or enable(...) hook found"))).catch(({ message: o }) => {
23
+ function xe(t) {
24
+ return Promise.all(Object.entries(P.injectedWeb3).map(([e, { connect: n, enable: r, version: a }]) => Promise.resolve().then(() => n ? n(t) : r ? r(t).then((o) => fe({ name: e, version: a || "unknown" }, o)) : Promise.reject(new Error("No connect(..) or enable(...) hook found"))).catch(({ message: o }) => {
20
25
  console.error(`Error initializing ${e}: ${o}`);
21
26
  }))).then((e) => e.filter((n) => !!n));
22
27
  }
23
- function xe(t, e = []) {
28
+ function Oe(t, e = []) {
24
29
  if (!t)
25
30
  throw new Error("You must pass a name for your app to the web3Enable function");
26
31
  const n = e.length ? Promise.all(e.map((r) => r().catch(() => !1))) : Promise.resolve([!0]);
27
- return M = ke(() => n.then(() => Se(t).then((r) => r.map((a) => (a.accounts.subscribe || (a.accounts.subscribe = (o) => (a.accounts.get().then(o).catch(console.error), () => {
32
+ return M = Se(() => n.then(() => xe(t).then((r) => r.map((a) => (a.accounts.subscribe || (a.accounts.subscribe = (o) => (a.accounts.get().then(o).catch(console.error), () => {
28
33
  })), a))).catch(() => []).then((r) => {
29
34
  const a = r.map(({ name: o, version: i }) => `${o}/${i}`);
30
35
  return Z(), `${r.length}`, r.length, `${a.join(", ")}`, r;
31
36
  }))), M;
32
37
  }
33
- class kn extends fe {
38
+ class kn extends de {
34
39
  async getAccount(e) {
35
40
  const { dappName: n, userAccountAddress: r } = e;
36
41
  if (!r)
37
42
  throw new j("WIDGET.NO_ACCOUNTS_FOUND", {
38
43
  context: { error: "No account address provided" }
39
44
  });
40
- const a = await xe(n);
45
+ const a = await Oe(n);
41
46
  if (a.length === 0)
42
47
  throw new j("WIDGET.NO_EXTENSION_FOUND");
43
48
  for (const o of a) {
@@ -50,10 +55,10 @@ class kn extends fe {
50
55
  });
51
56
  }
52
57
  }
53
- const Oe = (t) => {
58
+ const Ee = (t) => {
54
59
  alert(t.message);
55
60
  }, Sn = (t, e, n) => Object.assign({
56
- onError: Oe,
61
+ onError: Ee,
57
62
  onHuman: (r) => {
58
63
  t({ sendData: !e.sendData });
59
64
  },
@@ -107,15 +112,15 @@ const Oe = (t) => {
107
112
  }
108
113
  ];
109
114
  };
110
- var ee = [], Ee = ee.forEach, Ce = ee.slice;
111
- function Ie(t) {
112
- return Ee.call(Ce.call(arguments, 1), function(e) {
115
+ var ee = [], Ce = ee.forEach, Ie = ee.slice;
116
+ function De(t) {
117
+ return Ce.call(Ie.call(arguments, 1), function(e) {
113
118
  if (e)
114
119
  for (var n in e)
115
120
  t[n] === void 0 && (t[n] = e[n]);
116
121
  }), t;
117
122
  }
118
- var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
123
+ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, Te = function(e, n, r) {
119
124
  var a = r || {};
120
125
  a.path = a.path || "/";
121
126
  var o = encodeURIComponent(n), i = "".concat(e, "=").concat(o);
@@ -165,7 +170,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
165
170
  path: "/",
166
171
  sameSite: "strict"
167
172
  };
168
- r && (o.expires = /* @__PURE__ */ new Date(), o.expires.setTime(o.expires.getTime() + r * 60 * 1e3)), a && (o.domain = a), document.cookie = De(e, encodeURIComponent(n), o);
173
+ r && (o.expires = /* @__PURE__ */ new Date(), o.expires.setTime(o.expires.getTime() + r * 60 * 1e3)), a && (o.domain = a), document.cookie = Te(e, encodeURIComponent(n), o);
169
174
  },
170
175
  read: function(e) {
171
176
  for (var n = "".concat(e, "="), r = document.cookie.split(";"), a = 0; a < r.length; a++) {
@@ -177,7 +182,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
177
182
  remove: function(e) {
178
183
  this.create(e, "", -1);
179
184
  }
180
- }, Te = {
185
+ }, Le = {
181
186
  name: "cookie",
182
187
  lookup: function(e) {
183
188
  var n;
@@ -190,7 +195,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
190
195
  cacheUserLanguage: function(e, n) {
191
196
  n.lookupCookie && typeof document < "u" && H.create(n.lookupCookie, e, n.cookieMinutes, n.cookieDomain, n.cookieOptions);
192
197
  }
193
- }, Le = {
198
+ }, Ne = {
194
199
  name: "querystring",
195
200
  lookup: function(e) {
196
201
  var n;
@@ -217,7 +222,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
217
222
  O = !1;
218
223
  }
219
224
  return O;
220
- }, Ne = {
225
+ }, Pe = {
221
226
  name: "localStorage",
222
227
  lookup: function(e) {
223
228
  var n;
@@ -240,7 +245,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
240
245
  E = !1;
241
246
  }
242
247
  return E;
243
- }, Pe = {
248
+ }, Ae = {
244
249
  name: "sessionStorage",
245
250
  lookup: function(e) {
246
251
  var n;
@@ -253,7 +258,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
253
258
  cacheUserLanguage: function(e, n) {
254
259
  n.lookupSessionStorage && W() && window.sessionStorage.setItem(n.lookupSessionStorage, e);
255
260
  }
256
- }, Ae = {
261
+ }, je = {
257
262
  name: "navigator",
258
263
  lookup: function(e) {
259
264
  var n = [];
@@ -265,13 +270,13 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
265
270
  }
266
271
  return n.length > 0 ? n : void 0;
267
272
  }
268
- }, je = {
273
+ }, Ue = {
269
274
  name: "htmlTag",
270
275
  lookup: function(e) {
271
276
  var n, r = e.htmlTag || (typeof document < "u" ? document.documentElement : null);
272
277
  return r && typeof r.getAttribute == "function" && (n = r.getAttribute("lang")), n;
273
278
  }
274
- }, Ue = {
279
+ }, Fe = {
275
280
  name: "path",
276
281
  lookup: function(e) {
277
282
  var n;
@@ -287,7 +292,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
287
292
  }
288
293
  return n;
289
294
  }
290
- }, Fe = {
295
+ }, ze = {
291
296
  name: "subdomain",
292
297
  lookup: function(e) {
293
298
  var n = typeof e.lookupFromSubdomainIndex == "number" ? e.lookupFromSubdomainIndex + 1 : 1, r = typeof window < "u" && window.location && window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);
@@ -295,7 +300,7 @@ var R = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, De = function(e, n, r) {
295
300
  return r[n];
296
301
  }
297
302
  };
298
- function ze() {
303
+ function Me() {
299
304
  return {
300
305
  order: ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"],
301
306
  lookupQuerystring: "lng",
@@ -323,9 +328,9 @@ var ne = /* @__PURE__ */ function() {
323
328
  var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, a = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
324
329
  this.services = n || {
325
330
  languageUtils: {}
326
- }, this.options = Ie(r, this.options || {}, ze()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = function(o) {
331
+ }, this.options = De(r, this.options || {}, Me()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = function(o) {
327
332
  return o.replace("-", "_");
328
- }), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = a, this.addDetector(Te), this.addDetector(Le), this.addDetector(Ne), this.addDetector(Pe), this.addDetector(Ae), this.addDetector(je), this.addDetector(Ue), this.addDetector(Fe);
333
+ }), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = a, this.addDetector(Le), this.addDetector(Ne), this.addDetector(Pe), this.addDetector(Ae), this.addDetector(je), this.addDetector(Ue), this.addDetector(Fe), this.addDetector(ze);
329
334
  }
330
335
  }, {
331
336
  key: "addDetector",
@@ -358,7 +363,7 @@ var ne = /* @__PURE__ */ function() {
358
363
  }]), t;
359
364
  }();
360
365
  ne.type = "languageDetector";
361
- var Me = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Re = {
366
+ var Re = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, He = {
362
367
  "&amp;": "&",
363
368
  "&#38;": "&",
364
369
  "&lt;": "<",
@@ -379,10 +384,10 @@ var Me = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#1
379
384
  "&#8230;": "…",
380
385
  "&#x2F;": "/",
381
386
  "&#47;": "/"
382
- }, He = function(e) {
383
- return Re[e];
384
387
  }, $e = function(e) {
385
- return e.replace(Me, He);
388
+ return He[e];
389
+ }, We = function(e) {
390
+ return e.replace(Re, $e);
386
391
  };
387
392
  function B(t, e) {
388
393
  var n = Object.keys(t);
@@ -413,16 +418,16 @@ var F = {
413
418
  transWrapTextNodes: "",
414
419
  transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
415
420
  useSuspense: !0,
416
- unescape: $e
417
- }, te, We = d.createContext();
418
- function Be() {
421
+ unescape: We
422
+ }, te, Be = d.createContext();
423
+ function qe() {
419
424
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
420
425
  F = q(q({}, F), t);
421
426
  }
422
- function qe() {
427
+ function Qe() {
423
428
  return F;
424
429
  }
425
- var Qe = function() {
430
+ var Ge = function() {
426
431
  function t() {
427
432
  _(this, t), this.usedNamespaces = {};
428
433
  }
@@ -441,19 +446,19 @@ var Qe = function() {
441
446
  }
442
447
  }]), t;
443
448
  }();
444
- function Ge(t) {
449
+ function Je(t) {
445
450
  te = t;
446
451
  }
447
- function Je() {
452
+ function Ke() {
448
453
  return te;
449
454
  }
450
- var Ke = {
455
+ var Ye = {
451
456
  type: "3rdParty",
452
457
  init: function(e) {
453
- Be(e.options.react), Ge(e);
458
+ qe(e.options.react), Je(e);
454
459
  }
455
460
  };
456
- function Ye() {
461
+ function _e() {
457
462
  if (console && console.warn) {
458
463
  for (var t, e = arguments.length, n = new Array(e), r = 0; r < e; r++)
459
464
  n[r] = arguments[r];
@@ -464,7 +469,7 @@ var Q = {};
464
469
  function z() {
465
470
  for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
466
471
  e[n] = arguments[n];
467
- typeof e[0] == "string" && Q[e[0]] || (typeof e[0] == "string" && (Q[e[0]] = /* @__PURE__ */ new Date()), Ye.apply(void 0, e));
472
+ typeof e[0] == "string" && Q[e[0]] || (typeof e[0] == "string" && (Q[e[0]] = /* @__PURE__ */ new Date()), _e.apply(void 0, e));
468
473
  }
469
474
  function G(t, e, n) {
470
475
  t.loadNamespaces(e, function() {
@@ -480,7 +485,7 @@ function G(t, e, n) {
480
485
  }
481
486
  });
482
487
  }
483
- function _e(t, e) {
488
+ function Ve(t, e) {
484
489
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = e.languages[0], a = e.options ? e.options.fallbackLng : !1, o = e.languages[e.languages.length - 1];
485
490
  if (r.toLowerCase() === "cimode") return !0;
486
491
  var i = function(c, g) {
@@ -489,7 +494,7 @@ function _e(t, e) {
489
494
  };
490
495
  return n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !i(e.isLanguageChangingTo, t) ? !1 : !!(e.hasResourceBundle(r, t) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || i(r, t) && (!a || i(o, t)));
491
496
  }
492
- function Ve(t, e) {
497
+ function Xe(t, e) {
493
498
  var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
494
499
  if (!e.languages || !e.languages.length)
495
500
  return z("i18n.languages were undefined or empty", e.languages), !0;
@@ -498,9 +503,9 @@ function Ve(t, e) {
498
503
  precheck: function(o, i) {
499
504
  if (n.bindI18n && n.bindI18n.indexOf("languageChanging") > -1 && o.services.backendConnector.backend && o.isLanguageChangingTo && !i(o.isLanguageChangingTo, t)) return !1;
500
505
  }
501
- }) : _e(t, e, n);
506
+ }) : Ve(t, e, n);
502
507
  }
503
- function Xe(t, e) {
508
+ function Ze(t, e) {
504
509
  var n = t == null ? null : typeof Symbol < "u" && t[Symbol.iterator] || t["@@iterator"];
505
510
  if (n != null) {
506
511
  var r, a, o, i, u = [], c = !0, g = !1;
@@ -518,8 +523,8 @@ function Xe(t, e) {
518
523
  return u;
519
524
  }
520
525
  }
521
- function Ze(t, e) {
522
- return de(t) || Xe(t, e) || ge(t, e) || pe();
526
+ function en(t, e) {
527
+ return ge(t) || Ze(t, e) || pe(t, e) || he();
523
528
  }
524
529
  function J(t, e) {
525
530
  var n = Object.keys(t);
@@ -542,15 +547,15 @@ function U(t) {
542
547
  }
543
548
  return t;
544
549
  }
545
- var en = function(e, n) {
550
+ var nn = function(e, n) {
546
551
  var r = d.useRef();
547
552
  return d.useEffect(function() {
548
553
  r.current = e;
549
554
  }, [e, n]), r.current;
550
555
  };
551
- function nn(t) {
552
- var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.i18n, r = d.useContext(We) || {}, a = r.i18n, o = n || a || Je();
553
- if (o && !o.reportNamespaces && (o.reportNamespaces = new Qe()), !o) {
556
+ function tn(t) {
557
+ var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = e.i18n, r = d.useContext(Be) || {}, a = r.i18n, o = n || a || Ke();
558
+ if (o && !o.reportNamespaces && (o.reportNamespaces = new Ge()), !o) {
554
559
  z("You will need to pass in an i18next instance by using initReactI18next");
555
560
  var i = function(h) {
556
561
  return Array.isArray(h) ? h[h.length - 1] : h;
@@ -558,15 +563,15 @@ function nn(t) {
558
563
  return u.t = i, u.i18n = {}, u.ready = !1, u;
559
564
  }
560
565
  o.options.react && o.options.react.wait !== void 0 && z("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
561
- var c = U(U(U({}, qe()), o.options.react), e), g = c.useSuspense, l = c.keyPrefix, f = t;
566
+ var c = U(U(U({}, Qe()), o.options.react), e), g = c.useSuspense, l = c.keyPrefix, f = t;
562
567
  f = typeof f == "string" ? [f] : f || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(f);
563
568
  var m = (o.isInitialized || o.initializedStoreOnce) && f.every(function(p) {
564
- return Ve(p, o, c);
569
+ return Xe(p, o, c);
565
570
  });
566
571
  function b() {
567
572
  return o.getFixedT(null, c.nsMode === "fallback" ? f : f[0], l);
568
573
  }
569
- var A = d.useState(b), C = Ze(A, 2), I = C[0], y = C[1], S = f.join(), D = en(S), v = d.useRef(!0);
574
+ var A = d.useState(b), C = en(A, 2), I = C[0], y = C[1], S = f.join(), D = nn(S), v = d.useRef(!0);
570
575
  d.useEffect(function() {
571
576
  var p = c.bindI18n, h = c.bindI18nStore;
572
577
  v.current = !0, !m && !g && G(o, f, function() {
@@ -595,11 +600,11 @@ function nn(t) {
595
600
  });
596
601
  });
597
602
  }
598
- const tn = {
603
+ const rn = {
599
604
  debug: !1,
600
- fallbackLng: he.enum.en,
601
- resources: me
602
- }, rn = {
605
+ fallbackLng: me.enum.en,
606
+ resources: ve
607
+ }, on = {
603
608
  react: {
604
609
  useSuspense: !0
605
610
  },
@@ -608,16 +613,11 @@ const tn = {
608
613
  caches: ["localStorage", "cookie"]
609
614
  }
610
615
  };
611
- X.use(ne).use(Ke).init({ ...tn, ...rn });
616
+ X.use(ne).use(Ye).init({ ...rn, ...on });
612
617
  function En(t) {
613
- return nn("translation", { i18n: X, ...t });
614
- }
615
- function on() {
616
- for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
617
- e[n] = arguments[n];
618
- return ve(e);
618
+ return tn("translation", { i18n: X, ...t });
619
619
  }
620
- const an = on`{
620
+ const an = ke`{
621
621
  &:before {
622
622
  content: '""';
623
623
  position: absolute;
@@ -1,5 +1,5 @@
1
- import { G as L, p as O, f as m, i as k, n as U, A as r, m as M, o as j, E as F, r as f, q as B, j as n, W as X, C as K, s as Y, a as G, t as q, v as V, w as $, x as z, y as J, L as Q, B as Z, D as ee, F as ne, l as te, d as ae } from "./index-2JU-iJPL.js";
2
- import { g as H, b as P, a as oe, s as se, E as re, u as ce, c as ie, C as le } from "./Checkbox-CBVVEy1p.js";
1
+ import { G as L, p as O, f as m, i as k, n as U, A as r, m as M, o as j, E as F, r as f, q as B, j as n, W as X, C as K, s as Y, a as G, t as q, v as V, w as $, x as z, y as J, L as Q, B as Z, D as ee, F as ne, l as te, d as ae } from "./index-CgI2y2A6.js";
2
+ import { g as H, b as P, a as oe, s as se, E as re, u as ce, c as ie, C as le } from "./Checkbox-Dg1RwCua.js";
3
3
  const ue = (c, e) => {
4
4
  let t = 0;
5
5
  const l = "0".repeat(e);
@@ -1,5 +1,5 @@
1
- import { u as ce, h as le, z as M, r as m, l as k, d as _, j as r, a as w, P as H, b as f, c as $, e as T, A as g, f as I, p as K, g as de, i as pe, k as ue, m as he, n as ge, o as q, E as fe, R as me, q as xe, W as Ce, C as be, s as ye, t as we, v as Ae, w as Te, x as Ee, y as Ie, L as Se, B as ve, D as Ne, F as Re } from "./index-2JU-iJPL.js";
2
- import { u as Y, s as J, g as De, b as He, a as ke, E as _e, c as Le, C as Pe } from "./Checkbox-CBVVEy1p.js";
1
+ import { u as ce, h as le, z as M, r as m, l as k, d as _, j as r, a as w, P as H, b as f, c as $, e as T, A as g, f as I, p as K, g as de, i as pe, k as ue, m as he, n as ge, o as q, E as fe, R as me, q as xe, W as Ce, C as be, s as ye, t as we, v as Ae, w as Te, x as Ee, y as Ie, L as Se, B as ve, D as Ne, F as Re } from "./index-CgI2y2A6.js";
2
+ import { u as Y, s as J, g as De, b as He, a as ke, E as _e, c as Le, C as Pe } from "./Checkbox-Dg1RwCua.js";
3
3
  const Me = (t) => Array.isArray(t) && t !== null, O = new Array(256), Z = new Array(256 * 256);
4
4
  for (let t = 0; t < 256; t++)
5
5
  O[t] = t.toString(16).padStart(2, "0");