@snmt-react-ui/country-select 2.6.21 → 2.6.22

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 (2) hide show
  1. package/dist/country-select.js +224 -218
  2. package/package.json +3 -3
@@ -46,7 +46,7 @@ const X1 = (i, e) => () => {
46
46
  return d === -1 || d === 2;
47
47
  };
48
48
  return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !c(e.isLanguageChangingTo, i) ? !1 : !!(e.hasResourceBundle(n, i) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || c(n, i) && (!s || c(a, i)));
49
- }, _e = function(i, e) {
49
+ }, Ee = function(i, e) {
50
50
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
51
51
  return !e.languages || !e.languages.length ? (R1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(i, {
52
52
  lng: t.lng,
@@ -54,7 +54,7 @@ const X1 = (i, e) => () => {
54
54
  if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && n.services.backendConnector.backend && n.isLanguageChangingTo && !s(n.isLanguageChangingTo, i)) return !1;
55
55
  }
56
56
  }) : ye(i, e, t);
57
- }, U = (i) => typeof i == "string", Ee = (i) => typeof i == "object" && i !== null, He = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Ie = {
57
+ }, U = (i) => typeof i == "string", _e = (i) => typeof i == "object" && i !== null, He = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Ie = {
58
58
  "&": "&",
59
59
  "&": "&",
60
60
  "&lt;": "<",
@@ -114,8 +114,8 @@ const je = (i, e) => {
114
114
  } = Q(De) || {}, a = t || n || Ze();
115
115
  if (a && !a.reportNamespaces && (a.reportNamespaces = new Be()), !a) {
116
116
  R1("You will need to pass in an i18next instance by using initReactI18next");
117
- const f = (v, N) => U(N) ? N : Ee(N) && U(N.defaultValue) ? N.defaultValue : Array.isArray(v) ? v[v.length - 1] : v, R = [f, {}, !1];
118
- return R.t = f, R.i18n = {}, R.ready = !1, R;
117
+ const f = (N, x) => U(x) ? x : _e(x) && U(x.defaultValue) ? x.defaultValue : Array.isArray(N) ? N[N.length - 1] : N, M = [f, {}, !1];
118
+ return M.t = f, M.i18n = {}, M.ready = !1, M;
119
119
  }
120
120
  a.options.react && a.options.react.wait !== void 0 && R1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
121
121
  const c = {
@@ -128,28 +128,28 @@ const je = (i, e) => {
128
128
  } = c;
129
129
  let d = i;
130
130
  d = U(d) ? [d] : d || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(d);
131
- const l = (a.isInitialized || a.initializedStoreOnce) && d.every((f) => _e(f, a, c)), h = Ge(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), u = () => h, p = () => ee(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [w, L] = O(u);
131
+ const l = (a.isInitialized || a.initializedStoreOnce) && d.every((f) => Ee(f, a, c)), h = Ge(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), u = () => h, p = () => ee(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [w, v] = O(u);
132
132
  let m = d.join();
133
133
  e.lng && (m = `${e.lng}${m}`);
134
- const _ = je(m), M = J(!0);
134
+ const E = je(m), k = J(!0);
135
135
  S(() => {
136
136
  const {
137
137
  bindI18n: f,
138
- bindI18nStore: R
138
+ bindI18nStore: M
139
139
  } = c;
140
- M.current = !0, !l && !r && (e.lng ? V1(a, e.lng, d, () => {
141
- M.current && L(p);
140
+ k.current = !0, !l && !r && (e.lng ? V1(a, e.lng, d, () => {
141
+ k.current && v(p);
142
142
  }) : S1(a, d, () => {
143
- M.current && L(p);
144
- })), l && _ && _ !== m && M.current && L(p);
145
- const v = () => {
146
- M.current && L(p);
143
+ k.current && v(p);
144
+ })), l && E && E !== m && k.current && v(p);
145
+ const N = () => {
146
+ k.current && v(p);
147
147
  };
148
- return f && a && a.on(f, v), R && a && a.store.on(R, v), () => {
149
- M.current = !1, f && a && f.split(" ").forEach((N) => a.off(N, v)), R && a && R.split(" ").forEach((N) => a.store.off(N, v));
148
+ return f && a && a.on(f, N), M && a && a.store.on(M, N), () => {
149
+ k.current = !1, f && a && f.split(" ").forEach((x) => a.off(x, N)), M && a && M.split(" ").forEach((x) => a.store.off(x, N));
150
150
  };
151
151
  }, [a, m]), S(() => {
152
- M.current && l && L(u);
152
+ k.current && l && v(u);
153
153
  }, [a, g, l]);
154
154
  const H = [w, a, l];
155
155
  if (H.t = w, H.i18n = a, H.ready = l, l || !l && !r) return H;
@@ -193,11 +193,11 @@ const je = (i, e) => {
193
193
  );
194
194
  };
195
195
  var B = /* @__PURE__ */ ((i) => (i.GREY_LIGHT_0 = "var(--grey-light-0)", i.GREY_LIGHT_1 = "var(--grey-light-1)", i.GREY_LIGHT_2 = "var(--grey-light-2)", i.GREY_LIGHT_3 = "var(--grey-light-3)", i.GREY_LIGHT_4 = "var(--grey-light-4)", i.GREY_DARK_1 = "var(--grey-dark-1)", i.GREY_DARK_2 = "var(--grey-dark-2)", i.GREY_DARK_3 = "var(--grey-dark-3)", i.GREY_DARK_4 = "var(--grey-dark-4)", i.GREY_DARK_5 = "var(--grey-dark-5)", i.BLUE_PRIMARY = "var(--blue-primary)", i.BLUE_HOVER = "var(--blue-hover)", i.BLUE_LIGHT_1 = "var(--blue-light-1)", i.BLUE_LIGHT_2 = "var(--blue-light-2)", i.BLUE_LIGHT_3 = "var(--blue-light-3)", i.BLUE_LIGHT_4 = "var(--blue-light-4)", i.BLUE_DARK_1 = "var(--blue-dark-1)", i.BLUE_DARK_3 = "var(--blue-dark-3)", i.PURPLE_LIGHT = "var(--purple-light)", i.PURPLE_DARK = "var(--purple-dark)", i.NOTIFICATION_WARNING_LIGHT = "var(--notification-warning-light)", i.NOTIFICATION_WARNING_DARK = "var(--notification-warning-dark)", i.NOTIFICATION_SUCCESS_LIGHT = "var(--notification-success-light)", i.NOTIFICATION_SUCCESS_DARK = "var(--notification-success-dark)", i.NOTIFICATION_ERROR_LIGHT = "var(--notification-error-light)", i.NOTIFICATION_ERROR_DARK = "var(--notification-error-dark)", i.NOTIFICATION_ERROR_DARK_MODE = "var(--notification-error-dark-mode)", i))(B || {});
196
- const _1 = t1({
196
+ const E1 = t1({
197
197
  locale: "en",
198
198
  theme: "light"
199
199
  });
200
- _1.Provider;
200
+ E1.Provider;
201
201
  const Pe = ({
202
202
  checked: i = !0,
203
203
  indeterminate: e = !1,
@@ -210,7 +210,7 @@ const Pe = ({
210
210
  S(() => {
211
211
  r(i), d(e);
212
212
  }, [i, e]);
213
- const { theme: l } = Q(_1);
213
+ const { theme: l } = Q(E1);
214
214
  return /* @__PURE__ */ o(
215
215
  ke,
216
216
  {
@@ -1538,7 +1538,7 @@ const $e = ({
1538
1538
  }
1539
1539
  )
1540
1540
  }
1541
- ), _2 = ({
1541
+ ), E2 = ({
1542
1542
  className: i,
1543
1543
  color: e = b.GREY_DARK_5,
1544
1544
  height: t = 5,
@@ -1563,7 +1563,7 @@ const $e = ({
1563
1563
  }
1564
1564
  )
1565
1565
  }
1566
- ), E2 = ({
1566
+ ), _2 = ({
1567
1567
  className: i,
1568
1568
  color: e = b.GREY_DARK_5,
1569
1569
  height: t = 24,
@@ -2836,11 +2836,11 @@ const $e = ({
2836
2836
  case "search":
2837
2837
  return R2({ width: e, height: t, color: l, className: r, onClick: h });
2838
2838
  case "arrowUpFilled":
2839
- return _2({ width: e, height: t, color: l, className: r, onClick: h });
2839
+ return E2({ width: e, height: t, color: l, className: r, onClick: h });
2840
2840
  case "arrowDownFilled":
2841
2841
  return y2({ width: e, height: t, color: l, className: r, onClick: h });
2842
2842
  case "link":
2843
- return E2({ width: e, height: t, color: l, className: r, onClick: h });
2843
+ return _2({ width: e, height: t, color: l, className: r, onClick: h });
2844
2844
  case "telegram":
2845
2845
  return I2({ width: e, height: t, color: l, className: r, onClick: h });
2846
2846
  case "mail":
@@ -2934,14 +2934,17 @@ const $e = ({
2934
2934
  q1(g, () => d.current);
2935
2935
  const [l, h] = O(!1);
2936
2936
  S(() => {
2937
+ var m;
2937
2938
  if (!r) return;
2938
- const m = () => {
2939
+ const E = () => {
2939
2940
  d.current && h(d.current.scrollWidth > d.current.clientWidth);
2940
- }, _ = new ResizeObserver(m);
2941
- return d.current && _.observe(d.current), () => {
2942
- _.disconnect();
2943
2941
  };
2944
- }, [r, l]);
2942
+ E();
2943
+ const k = new ResizeObserver(E);
2944
+ return d.current && k.observe(d.current), (m = d.current) != null && m.parentElement && k.observe(d.current.parentElement), () => {
2945
+ k.disconnect();
2946
+ };
2947
+ }, [r]);
2945
2948
  const u = e === "h1" || e === "h2" || e === "h3" || e === "h4";
2946
2949
  let p = `snmt-typography snmt-typography-${e}`;
2947
2950
  i && i !== "inherit" && (p += ` snmt-typography-align-${i}`), a && (p += " collapsed"), r && (p += " collapsed");
@@ -2950,8 +2953,8 @@ const $e = ({
2950
2953
  style: { color: t, whiteSpace: r ? "nowrap" : c, display: r ? "block" : "" },
2951
2954
  onClick: s,
2952
2955
  ref: d
2953
- }, L = u ? /* @__PURE__ */ o(rt, { level: lt[e], ...w, children: n }) : /* @__PURE__ */ o(at, { ...w, children: n });
2954
- return r && l ? /* @__PURE__ */ o(ot, { placement: "top", title: n, children: L }) : L;
2956
+ }, v = u ? /* @__PURE__ */ o(rt, { level: lt[e], ...w, children: n }) : /* @__PURE__ */ o(at, { ...w, children: n });
2957
+ return r && l ? /* @__PURE__ */ o(ot, { placement: "top", title: n, children: v }) : v;
2955
2958
  }
2956
2959
  );
2957
2960
  var y = /* @__PURE__ */ ((i) => (i.GREY_LIGHT_0 = "var(--grey-light-0)", i.GREY_LIGHT_1 = "var(--grey-light-1)", i.GREY_LIGHT_2 = "var(--grey-light-2)", i.GREY_LIGHT_3 = "var(--grey-light-3)", i.GREY_LIGHT_4 = "var(--grey-light-4)", i.GREY_DARK_1 = "var(--grey-dark-1)", i.GREY_DARK_2 = "var(--grey-dark-2)", i.GREY_DARK_3 = "var(--grey-dark-3)", i.GREY_DARK_4 = "var(--grey-dark-4)", i.GREY_DARK_5 = "var(--grey-dark-5)", i.BLUE_PRIMARY = "var(--blue-primary)", i.BLUE_HOVER = "var(--blue-hover)", i.BLUE_LIGHT_1 = "var(--blue-light-1)", i.BLUE_LIGHT_2 = "var(--blue-light-2)", i.BLUE_LIGHT_3 = "var(--blue-light-3)", i.BLUE_LIGHT_4 = "var(--blue-light-4)", i.BLUE_DARK_1 = "var(--blue-dark-1)", i.BLUE_DARK_3 = "var(--blue-dark-3)", i.PURPLE_LIGHT = "var(--purple-light)", i.PURPLE_DARK = "var(--purple-dark)", i.NOTIFICATION_WARNING_LIGHT = "var(--notification-warning-light)", i.NOTIFICATION_WARNING_DARK = "var(--notification-warning-dark)", i.NOTIFICATION_SUCCESS_LIGHT = "var(--notification-success-light)", i.NOTIFICATION_SUCCESS_DARK = "var(--notification-success-dark)", i.NOTIFICATION_ERROR_LIGHT = "var(--notification-error-light)", i.NOTIFICATION_ERROR_DARK = "var(--notification-error-dark)", i.NOTIFICATION_ERROR_DARK_MODE = "var(--notification-error-dark-mode)", i))(y || {});
@@ -3618,7 +3621,7 @@ const ct = ({
3618
3621
  }
3619
3622
  )
3620
3623
  }
3621
- ), _t = ({
3624
+ ), Et = ({
3622
3625
  width: i = 20,
3623
3626
  height: e = 20,
3624
3627
  color: t = "#001E52",
@@ -3651,7 +3654,7 @@ const ct = ({
3651
3654
  )
3652
3655
  ]
3653
3656
  }
3654
- ), Et = ({
3657
+ ), _t = ({
3655
3658
  width: i = 20,
3656
3659
  height: e = 23,
3657
3660
  color: t = "#001E52",
@@ -5497,9 +5500,9 @@ const ct = ({
5497
5500
  case "settings":
5498
5501
  return yt({ width: e, height: t, color: l, className: r, onClick: h });
5499
5502
  case "trash":
5500
- return _t({ width: e, height: t, color: l, className: r, onClick: h });
5501
- case "settings4":
5502
5503
  return Et({ width: e, height: t, color: l, className: r, onClick: h });
5504
+ case "settings4":
5505
+ return _t({ width: e, height: t, color: l, className: r, onClick: h });
5503
5506
  case "success":
5504
5507
  return Ht({ width: e, height: t, color: l, className: r, onClick: h });
5505
5508
  case "checkCircle":
@@ -5687,7 +5690,7 @@ const ne = ({
5687
5690
  placement: s,
5688
5691
  children: i
5689
5692
  }
5690
- ), { Title: y5, Text: _5 } = Q1, E5 = {
5693
+ ), { Title: y5, Text: E5 } = Q1, _5 = {
5691
5694
  h1: 1,
5692
5695
  h2: 2,
5693
5696
  h3: 3,
@@ -5708,14 +5711,17 @@ const ne = ({
5708
5711
  q1(g, () => d.current);
5709
5712
  const [l, h] = O(!1);
5710
5713
  S(() => {
5714
+ var m;
5711
5715
  if (!r) return;
5712
- const m = () => {
5716
+ const E = () => {
5713
5717
  d.current && h(d.current.scrollWidth > d.current.clientWidth);
5714
- }, _ = new ResizeObserver(m);
5715
- return d.current && _.observe(d.current), () => {
5716
- _.disconnect();
5717
5718
  };
5718
- }, [r, l]);
5719
+ E();
5720
+ const k = new ResizeObserver(E);
5721
+ return d.current && k.observe(d.current), (m = d.current) != null && m.parentElement && k.observe(d.current.parentElement), () => {
5722
+ k.disconnect();
5723
+ };
5724
+ }, [r]);
5719
5725
  const u = e === "h1" || e === "h2" || e === "h3" || e === "h4";
5720
5726
  let p = `snmt-typography snmt-typography-${e}`;
5721
5727
  i && i !== "inherit" && (p += ` snmt-typography-align-${i}`), a && (p += " collapsed"), r && (p += " collapsed");
@@ -5724,8 +5730,8 @@ const ne = ({
5724
5730
  style: { color: t, whiteSpace: r ? "nowrap" : c, display: r ? "block" : "" },
5725
5731
  onClick: s,
5726
5732
  ref: d
5727
- }, L = u ? /* @__PURE__ */ o(y5, { level: E5[e], ...w, children: n }) : /* @__PURE__ */ o(_5, { ...w, children: n });
5728
- return r && l ? /* @__PURE__ */ o(b5, { placement: "top", title: n, children: L }) : L;
5733
+ }, v = u ? /* @__PURE__ */ o(y5, { level: _5[e], ...w, children: n }) : /* @__PURE__ */ o(E5, { ...w, children: n });
5734
+ return r && l ? /* @__PURE__ */ o(b5, { placement: "top", title: n, children: v }) : v;
5729
5735
  }
5730
5736
  ), I5 = ({
5731
5737
  children: i,
@@ -5772,7 +5778,7 @@ const S5 = ({
5772
5778
  options: a,
5773
5779
  extraOptions: c
5774
5780
  }) => {
5775
- const { locale: r } = Q(_1), { t: g } = We("common", { lng: r }), [d, l] = O(!1);
5781
+ const { locale: r } = Q(E1), { t: g } = We("common", { lng: r }), [d, l] = O(!1);
5776
5782
  if (S(() => {
5777
5783
  i.length || l(!1);
5778
5784
  }, [i]), !i.length)
@@ -5832,36 +5838,36 @@ const S5 = ({
5832
5838
  onDropdownVisibleChange: u,
5833
5839
  onScrollToEnd: p,
5834
5840
  onPopupScroll: w,
5835
- id: L,
5841
+ id: v,
5836
5842
  extraOptions: m,
5837
- dropdownRender: _,
5838
- optionRender: M,
5843
+ dropdownRender: E,
5844
+ optionRender: k,
5839
5845
  isLoading: H,
5840
5846
  readOnly: f,
5841
- error: R
5842
- }, v) => {
5843
- const [N, Z] = O(!1), [W, i1] = O(!1), [$, h1] = O(!0), [I, K] = O(i), F = J(null);
5847
+ error: M
5848
+ }, N) => {
5849
+ const [x, Z] = O(!1), [W, i1] = O(!1), [$, h1] = O(!0), [I, K] = O(i), F = J(null);
5844
5850
  S(() => {
5845
5851
  K(i);
5846
5852
  }, [i]);
5847
- const q = (x) => {
5848
- Z(x), u && u(x);
5849
- }, c1 = (x, E) => {
5853
+ const q = (R) => {
5854
+ Z(R), u && u(R);
5855
+ }, c1 = (R, _) => {
5850
5856
  var D;
5851
- return !!((D = E == null ? void 0 : E.label) != null && D.toString().toLowerCase().includes(x.toLowerCase()));
5857
+ return !!((D = _ == null ? void 0 : _.label) != null && D.toString().toLowerCase().includes(R.toLowerCase()));
5852
5858
  }, A = () => {
5853
5859
  i1(!0);
5854
5860
  }, P = () => {
5855
5861
  i1(!1);
5856
5862
  }, T = j(
5857
- (x) => {
5858
- if (K(x), n) {
5859
- const D = x;
5863
+ (R) => {
5864
+ if (K(R), n) {
5865
+ const D = R;
5860
5866
  e == null || e(D);
5861
5867
  return;
5862
5868
  }
5863
- const E = x;
5864
- e == null || e(E);
5869
+ const _ = R;
5870
+ e == null || e(_);
5865
5871
  },
5866
5872
  [n, e]
5867
5873
  ), d1 = j(() => {
@@ -5873,40 +5879,40 @@ const S5 = ({
5873
5879
  T("");
5874
5880
  }
5875
5881
  }, [r, T, n, f]), g1 = j(
5876
- (x) => {
5877
- const E = I.filter((D) => D !== x);
5878
- T(E), K(E);
5882
+ (R) => {
5883
+ const _ = I.filter((D) => D !== R);
5884
+ T(_), K(_);
5879
5885
  },
5880
5886
  [T, I]
5881
- ), E1 = j(
5882
- (x) => (I == null ? void 0 : I.indexOf(x)) === 0 ? (
5887
+ ), _1 = j(
5888
+ (R) => (I == null ? void 0 : I.indexOf(R)) === 0 ? (
5883
5889
  // if the search input is empty
5884
5890
  // then display the placeholder, else do not display it
5885
5891
  /* @__PURE__ */ o("span", { className: "custom-placeholder", children: $ ? t : "" })
5886
5892
  ) : /* @__PURE__ */ o(Y, {}),
5887
5893
  [$, I, t]
5888
- ), he = (x) => {
5889
- x.preventDefault(), x.stopPropagation();
5890
- }, ce = async (x) => {
5891
- const { target: E } = x;
5892
- E.scrollTop + E.offsetHeight >= E.scrollHeight - l && (p == null || p(!0)), w && await w(x);
5894
+ ), he = (R) => {
5895
+ R.preventDefault(), R.stopPropagation();
5896
+ }, ce = async (R) => {
5897
+ const { target: _ } = R;
5898
+ _.scrollTop + _.offsetHeight >= _.scrollHeight - l && (p == null || p(!0)), w && await w(R);
5893
5899
  }, L1 = j(
5894
- (x) => {
5895
- var E, D;
5896
- return ((E = a.find((v1) => v1.value === x)) == null ? void 0 : E.label) || ((D = m == null ? void 0 : m.find(
5897
- (v1) => v1.value === x
5898
- )) == null ? void 0 : D.label) || x;
5900
+ (R) => {
5901
+ var _, D;
5902
+ return ((_ = a.find((v1) => v1.value === R)) == null ? void 0 : _.label) || ((D = m == null ? void 0 : m.find(
5903
+ (v1) => v1.value === R
5904
+ )) == null ? void 0 : D.label) || R;
5899
5905
  },
5900
5906
  [m, a]
5901
5907
  ), de = j(
5902
- (x) => {
5903
- var E;
5908
+ (R) => {
5909
+ var _;
5904
5910
  return /* @__PURE__ */ o(
5905
5911
  S5,
5906
5912
  {
5907
- values: x,
5913
+ values: R,
5908
5914
  onTagClose: g1,
5909
- maxWidth: ((E = F.current) == null ? void 0 : E.clientWidth) || 0,
5915
+ maxWidth: ((_ = F.current) == null ? void 0 : _.clientWidth) || 0,
5910
5916
  disabled: r,
5911
5917
  closable: !f,
5912
5918
  options: a,
@@ -5916,8 +5922,8 @@ const S5 = ({
5916
5922
  },
5917
5923
  [r, m, g1, a, f]
5918
5924
  ), ge = j(
5919
- ({ label: x, value: E, mode: D }) => D === "filter" ? E1(E) : /* @__PURE__ */ o("div", { onMouseDown: he, className: "tag-wrapper", children: /* @__PURE__ */ o(ne, { onClose: () => g1(E), disabled: r, children: typeof x == "object" ? x : L1(E) }) }),
5920
- [r, L1, g1, E1]
5925
+ ({ label: R, value: _, mode: D }) => D === "filter" ? _1(_) : /* @__PURE__ */ o("div", { onMouseDown: he, className: "tag-wrapper", children: /* @__PURE__ */ o(ne, { onClose: () => g1(_), disabled: r, children: typeof R == "object" ? R : L1(_) }) }),
5926
+ [r, L1, g1, _1]
5921
5927
  ), H1 = Array.isArray(I) && I.length > 0 || !!I && typeof I == "string" && I.trim() !== "";
5922
5928
  return /* @__PURE__ */ C("div", { className: "snmt-select-container", children: [
5923
5929
  /* @__PURE__ */ C(
@@ -5933,27 +5939,27 @@ const S5 = ({
5933
5939
  {
5934
5940
  className: "snmt-select-blank",
5935
5941
  popupClassName: f ? "dropdown-read-only" : "",
5936
- id: L,
5937
- ref: v,
5942
+ id: v,
5943
+ ref: N,
5938
5944
  showSearch: !!s,
5939
5945
  filterOption: s && c1,
5940
5946
  onDropdownVisibleChange: q,
5941
5947
  disabled: r,
5942
5948
  value: I || void 0,
5943
- labelRender: (x) => {
5944
- const E = L1(x.value);
5945
- return r ? /* @__PURE__ */ o("span", { style: { color: B.GREY_DARK_1 }, children: E }) : E;
5949
+ labelRender: (R) => {
5950
+ const _ = L1(R.value);
5951
+ return r ? /* @__PURE__ */ o("span", { style: { color: B.GREY_DARK_1 }, children: _ }) : _;
5946
5952
  },
5947
5953
  mode: n === "filter" ? "multiple" : n,
5948
5954
  onChange: T,
5949
5955
  onFocus: A,
5950
5956
  onBlur: P,
5951
- onSearch: (x) => {
5952
- h1(!x), h && h(x);
5957
+ onSearch: (R) => {
5958
+ h1(!R), h && h(R);
5953
5959
  },
5954
5960
  onSelect: () => h1(!0),
5955
5961
  onDeselect: () => h1(!0),
5956
- tagRender: (x) => ge({ ...x, mode: n }),
5962
+ tagRender: (R) => ge({ ...R, mode: n }),
5957
5963
  maxTagCount: "responsive",
5958
5964
  maxTagPlaceholder: de,
5959
5965
  onPopupScroll: ce,
@@ -5980,27 +5986,27 @@ const S5 = ({
5980
5986
  {
5981
5987
  name: "selectArrowIcon",
5982
5988
  color: r ? B.GREY_DARK_1 : B.GREY_DARK_5,
5983
- className: N ? "select-arrow-rotated" : "select-arrow",
5984
- onClick: () => Z(!N)
5989
+ className: x ? "select-arrow-rotated" : "select-arrow",
5990
+ onClick: () => Z(!x)
5985
5991
  }
5986
5992
  )
5987
5993
  ] }) }),
5988
5994
  removeIcon: /* @__PURE__ */ o(n1, { name: "errorSmall", color: B.GREY_DARK_1 }),
5989
5995
  options: a,
5990
- optionRender: (x) => M ? M(x.data) : /* @__PURE__ */ C(o1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
5996
+ optionRender: (R) => k ? k(R.data) : /* @__PURE__ */ C(o1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
5991
5997
  /* @__PURE__ */ C(o1, { alignItems: "center", gap: 12, children: [
5992
5998
  n && /* @__PURE__ */ o(
5993
5999
  Pe,
5994
6000
  {
5995
- checked: !!(I != null && I.includes(x.value))
6001
+ checked: !!(I != null && I.includes(R.value))
5996
6002
  }
5997
6003
  ),
5998
6004
  /* @__PURE__ */ C(o1, { alignItems: "center", gap: 8, children: [
5999
- x.data.image && /* @__PURE__ */ o(Ke, { src: x.data.image, size: 20 }),
6000
- /* @__PURE__ */ o("span", { children: x.label })
6005
+ R.data.image && /* @__PURE__ */ o(Ke, { src: R.data.image, size: 20 }),
6006
+ /* @__PURE__ */ o("span", { children: R.label })
6001
6007
  ] })
6002
6008
  ] }),
6003
- !n && I === x.value && /* @__PURE__ */ o(
6009
+ !n && I === R.value && /* @__PURE__ */ o(
6004
6010
  n1,
6005
6011
  {
6006
6012
  name: "ok",
@@ -6010,8 +6016,8 @@ const S5 = ({
6010
6016
  }
6011
6017
  )
6012
6018
  ] }),
6013
- dropdownRender: (x) => /* @__PURE__ */ C("div", { className: "dropdown-container", children: [
6014
- /* @__PURE__ */ o("div", { className: "dropdown-menu", children: _ ? _(x) : x }),
6019
+ dropdownRender: (R) => /* @__PURE__ */ C("div", { className: "dropdown-container", children: [
6020
+ /* @__PURE__ */ o("div", { className: "dropdown-menu", children: E ? E(R) : R }),
6015
6021
  H && /* @__PURE__ */ o("div", { className: "loading-overlay", children: /* @__PURE__ */ o(A1, { size: 28 }) })
6016
6022
  ] })
6017
6023
  }
@@ -6020,14 +6026,14 @@ const S5 = ({
6020
6026
  /* @__PURE__ */ o(
6021
6027
  "label",
6022
6028
  {
6023
- className: `${W || H1 ? "label-floating" : ""} ${r ? "label-disabled" : ""} ${W ? "label-focused" : ""} ${H ? "label-loading" : ""} ${R ? "label-error" : ""}`,
6029
+ className: `${W || H1 ? "label-floating" : ""} ${r ? "label-disabled" : ""} ${W ? "label-focused" : ""} ${H ? "label-loading" : ""} ${M ? "label-error" : ""}`,
6024
6030
  children: g ? `${t}*` : t
6025
6031
  }
6026
6032
  ),
6027
6033
  /* @__PURE__ */ o(
6028
6034
  "fieldset",
6029
6035
  {
6030
- className: `${W ? "fieldset-focused" : ""} ${r ? "fieldset-disabled" : ""} ${H1 ? "fieldset-filled" : ""} ${R ? "fieldset-error" : ""}`,
6036
+ className: `${W ? "fieldset-focused" : ""} ${r ? "fieldset-disabled" : ""} ${H1 ? "fieldset-filled" : ""} ${M ? "fieldset-error" : ""}`,
6031
6037
  children: /* @__PURE__ */ o("legend", { children: /* @__PURE__ */ o("span", { children: g ? `${t}*` : t }) })
6032
6038
  }
6033
6039
  )
@@ -6035,7 +6041,7 @@ const S5 = ({
6035
6041
  ]
6036
6042
  }
6037
6043
  ),
6038
- R && /* @__PURE__ */ C(o1, { justifyContent: "flex-start", gap: 6, children: [
6044
+ M && /* @__PURE__ */ C(o1, { justifyContent: "flex-start", gap: 6, children: [
6039
6045
  /* @__PURE__ */ o(
6040
6046
  n1,
6041
6047
  {
@@ -6045,11 +6051,11 @@ const S5 = ({
6045
6051
  width: 16
6046
6052
  }
6047
6053
  ),
6048
- typeof R == "string" ? /* @__PURE__ */ o(H5, { color: B.NOTIFICATION_ERROR_DARK, variant: "body4", children: R }) : R
6054
+ typeof M == "string" ? /* @__PURE__ */ o(H5, { color: B.NOTIFICATION_ERROR_DARK, variant: "body4", children: M }) : M
6049
6055
  ] })
6050
6056
  ] });
6051
6057
  }
6052
- ), k = (i) => typeof i == "string", s1 = () => {
6058
+ ), L = (i) => typeof i == "string", s1 = () => {
6053
6059
  let i, e;
6054
6060
  const t = new Promise((n, s) => {
6055
6061
  i = n, e = s;
@@ -6059,8 +6065,8 @@ const S5 = ({
6059
6065
  i.forEach((n) => {
6060
6066
  e[n] && (t[n] = e[n]);
6061
6067
  });
6062
- }, T5 = /###/g, Z1 = (i) => i && i.indexOf("###") > -1 ? i.replace(T5, ".") : i, D1 = (i) => !i || k(i), a1 = (i, e, t) => {
6063
- const n = k(e) ? e.split(".") : e;
6068
+ }, T5 = /###/g, Z1 = (i) => i && i.indexOf("###") > -1 ? i.replace(T5, ".") : i, D1 = (i) => !i || L(i), a1 = (i, e, t) => {
6069
+ const n = L(e) ? e.split(".") : e;
6064
6070
  let s = 0;
6065
6071
  for (; s < n.length - 1; ) {
6066
6072
  if (D1(i)) return {};
@@ -6102,7 +6108,7 @@ const S5 = ({
6102
6108
  return n !== void 0 ? n : C1(e, t);
6103
6109
  }, se = (i, e, t) => {
6104
6110
  for (const n in e)
6105
- n !== "__proto__" && n !== "constructor" && (n in i ? k(i[n]) || i[n] instanceof String || k(e[n]) || e[n] instanceof String ? t && (i[n] = e[n]) : se(i[n], e[n], t) : i[n] = e[n]);
6111
+ n !== "__proto__" && n !== "constructor" && (n in i ? L(i[n]) || i[n] instanceof String || L(e[n]) || e[n] instanceof String ? t && (i[n] = e[n]) : se(i[n], e[n], t) : i[n] = e[n]);
6106
6112
  return i;
6107
6113
  }, X = (i) => i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
6108
6114
  var B5 = {
@@ -6113,7 +6119,7 @@ var B5 = {
6113
6119
  "'": "&#39;",
6114
6120
  "/": "&#x2F;"
6115
6121
  };
6116
- const j5 = (i) => k(i) ? i.replace(/[&<>"'\/]/g, (e) => B5[e]) : i;
6122
+ const j5 = (i) => L(i) ? i.replace(/[&<>"'\/]/g, (e) => B5[e]) : i;
6117
6123
  class G5 {
6118
6124
  constructor(e) {
6119
6125
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
@@ -6202,7 +6208,7 @@ class f1 {
6202
6208
  return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
6203
6209
  }
6204
6210
  forward(e, t, n, s) {
6205
- return s && !this.debug ? null : (k(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
6211
+ return s && !this.debug ? null : (L(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
6206
6212
  }
6207
6213
  create(e) {
6208
6214
  return new f1(this.logger, {
@@ -6268,9 +6274,9 @@ class j1 extends k1 {
6268
6274
  let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
6269
6275
  const a = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, c = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
6270
6276
  let r;
6271
- e.indexOf(".") > -1 ? r = e.split(".") : (r = [e, t], n && (Array.isArray(n) ? r.push(...n) : k(n) && a ? r.push(...n.split(a)) : r.push(n)));
6277
+ e.indexOf(".") > -1 ? r = e.split(".") : (r = [e, t], n && (Array.isArray(n) ? r.push(...n) : L(n) && a ? r.push(...n.split(a)) : r.push(n)));
6272
6278
  const g = C1(this.data, r);
6273
- return !g && !t && !n && e.indexOf(".") > -1 && (e = r[0], t = r[1], n = r.slice(2).join(".")), g || !c || !k(n) ? g : M1(this.data && this.data[e] && this.data[e][t], n, a);
6279
+ return !g && !t && !n && e.indexOf(".") > -1 && (e = r[0], t = r[1], n = r.slice(2).join(".")), g || !c || !L(n) ? g : M1(this.data && this.data[e] && this.data[e][t], n, a);
6274
6280
  }
6275
6281
  addResource(e, t, n, s) {
6276
6282
  let a = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
@@ -6285,7 +6291,7 @@ class j1 extends k1 {
6285
6291
  silent: !1
6286
6292
  };
6287
6293
  for (const a in n)
6288
- (k(n[a]) || Array.isArray(n[a])) && this.addResource(e, t, a, n[a], {
6294
+ (L(n[a]) || Array.isArray(n[a])) && this.addResource(e, t, a, n[a], {
6289
6295
  silent: !0
6290
6296
  });
6291
6297
  s.silent || this.emit("added", e, t, n);
@@ -6364,14 +6370,14 @@ class m1 extends k1 {
6364
6370
  if (g && g.length > 0)
6365
6371
  return {
6366
6372
  key: e,
6367
- namespaces: k(a) ? [a] : a
6373
+ namespaces: L(a) ? [a] : a
6368
6374
  };
6369
6375
  const d = e.split(n);
6370
6376
  (n !== s || n === s && this.options.ns.indexOf(d[0]) > -1) && (a = d.shift()), e = d.join(s);
6371
6377
  }
6372
6378
  return {
6373
6379
  key: e,
6374
- namespaces: k(a) ? [a] : a
6380
+ namespaces: L(a) ? [a] : a
6375
6381
  };
6376
6382
  }
6377
6383
  translate(e, t, n) {
@@ -6406,8 +6412,8 @@ class m1 extends k1 {
6406
6412
  }
6407
6413
  const h = this.resolve(e, t);
6408
6414
  let u = h && h.res;
6409
- const p = h && h.usedKey || c, w = h && h.exactUsedKey || c, L = Object.prototype.toString.apply(u), m = ["[object Number]", "[object Function]", "[object RegExp]"], _ = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, M = !this.i18nFormat || this.i18nFormat.handleAsObject, H = !k(u) && typeof u != "boolean" && typeof u != "number";
6410
- if (M && u && H && m.indexOf(L) < 0 && !(k(_) && Array.isArray(u))) {
6415
+ const p = h && h.usedKey || c, w = h && h.exactUsedKey || c, v = Object.prototype.toString.apply(u), m = ["[object Number]", "[object Function]", "[object RegExp]"], E = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, k = !this.i18nFormat || this.i18nFormat.handleAsObject, H = !L(u) && typeof u != "boolean" && typeof u != "number";
6416
+ if (k && u && H && m.indexOf(v) < 0 && !(L(E) && Array.isArray(u))) {
6411
6417
  if (!t.returnObjects && !this.options.returnObjects) {
6412
6418
  this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
6413
6419
  const f = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(p, u, {
@@ -6417,28 +6423,28 @@ class m1 extends k1 {
6417
6423
  return s ? (h.res = f, h.usedParams = this.getUsedParamsDetails(t), h) : f;
6418
6424
  }
6419
6425
  if (a) {
6420
- const f = Array.isArray(u), R = f ? [] : {}, v = f ? w : p;
6421
- for (const N in u)
6422
- if (Object.prototype.hasOwnProperty.call(u, N)) {
6423
- const Z = `${v}${a}${N}`;
6424
- R[N] = this.translate(Z, {
6426
+ const f = Array.isArray(u), M = f ? [] : {}, N = f ? w : p;
6427
+ for (const x in u)
6428
+ if (Object.prototype.hasOwnProperty.call(u, x)) {
6429
+ const Z = `${N}${a}${x}`;
6430
+ M[x] = this.translate(Z, {
6425
6431
  ...t,
6426
6432
  joinArrays: !1,
6427
6433
  ns: r
6428
- }), R[N] === Z && (R[N] = u[N]);
6434
+ }), M[x] === Z && (M[x] = u[x]);
6429
6435
  }
6430
- u = R;
6436
+ u = M;
6431
6437
  }
6432
- } else if (M && k(_) && Array.isArray(u))
6433
- u = u.join(_), u && (u = this.extendTranslation(u, e, t, n));
6438
+ } else if (k && L(E) && Array.isArray(u))
6439
+ u = u.join(E), u && (u = this.extendTranslation(u, e, t, n));
6434
6440
  else {
6435
- let f = !1, R = !1;
6436
- const v = t.count !== void 0 && !k(t.count), N = m1.hasDefaultValue(t), Z = v ? this.pluralResolver.getSuffix(d, t.count, t) : "", W = t.ordinal && v ? this.pluralResolver.getSuffix(d, t.count, {
6441
+ let f = !1, M = !1;
6442
+ const N = t.count !== void 0 && !L(t.count), x = m1.hasDefaultValue(t), Z = N ? this.pluralResolver.getSuffix(d, t.count, t) : "", W = t.ordinal && N ? this.pluralResolver.getSuffix(d, t.count, {
6437
6443
  ordinal: !1
6438
- }) : "", i1 = v && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), $ = i1 && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${Z}`] || t[`defaultValue${W}`] || t.defaultValue;
6439
- !this.isValidLookup(u) && N && (f = !0, u = $), this.isValidLookup(u) || (R = !0, u = c);
6440
- const I = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && R ? void 0 : u, K = N && $ !== u && this.options.updateMissing;
6441
- if (R || f || K) {
6444
+ }) : "", i1 = N && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), $ = i1 && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${Z}`] || t[`defaultValue${W}`] || t.defaultValue;
6445
+ !this.isValidLookup(u) && x && (f = !0, u = $), this.isValidLookup(u) || (M = !0, u = c);
6446
+ const I = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && M ? void 0 : u, K = x && $ !== u && this.options.updateMissing;
6447
+ if (M || f || K) {
6442
6448
  if (this.logger.log(K ? "updateKey" : "missingKey", d, g, c, K ? $ : u), a) {
6443
6449
  const A = this.resolve(c, {
6444
6450
  ...t,
@@ -6453,17 +6459,17 @@ class m1 extends k1 {
6453
6459
  F.push(q[A]);
6454
6460
  else this.options.saveMissingTo === "all" ? F = this.languageUtils.toResolveHierarchy(t.lng || this.language) : F.push(t.lng || this.language);
6455
6461
  const c1 = (A, P, T) => {
6456
- const d1 = N && T !== u ? T : I;
6462
+ const d1 = x && T !== u ? T : I;
6457
6463
  this.options.missingKeyHandler ? this.options.missingKeyHandler(A, g, P, d1, K, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(A, g, P, d1, K, t), this.emit("missingKey", A, g, P, u);
6458
6464
  };
6459
- this.options.saveMissing && (this.options.saveMissingPlurals && v ? F.forEach((A) => {
6465
+ this.options.saveMissing && (this.options.saveMissingPlurals && N ? F.forEach((A) => {
6460
6466
  const P = this.pluralResolver.getSuffixes(A, t);
6461
6467
  i1 && t[`defaultValue${this.options.pluralSeparator}zero`] && P.indexOf(`${this.options.pluralSeparator}zero`) < 0 && P.push(`${this.options.pluralSeparator}zero`), P.forEach((T) => {
6462
6468
  c1([A], c + T, t[`defaultValue${T}`] || $);
6463
6469
  });
6464
6470
  }) : c1(F, c, $));
6465
6471
  }
6466
- u = this.extendTranslation(u, e, t, h, n), R && u === c && this.options.appendNamespaceToMissingKey && (u = `${g}:${c}`), (R || f) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? u = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${g}:${c}` : c, f ? u : void 0) : u = this.options.parseMissingKeyHandler(u));
6472
+ u = this.extendTranslation(u, e, t, h, n), M && u === c && this.options.appendNamespaceToMissingKey && (u = `${g}:${c}`), (M || f) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? u = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${g}:${c}` : c, f ? u : void 0) : u = this.options.parseMissingKeyHandler(u));
6467
6473
  }
6468
6474
  return s ? (h.res = u, h.usedParams = this.getUsedParamsDetails(t), h) : u;
6469
6475
  }
@@ -6484,13 +6490,13 @@ class m1 extends k1 {
6484
6490
  ...n.interpolation
6485
6491
  }
6486
6492
  });
6487
- const d = k(e) && (n && n.interpolation && n.interpolation.skipOnVariables !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
6493
+ const d = L(e) && (n && n.interpolation && n.interpolation.skipOnVariables !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
6488
6494
  let l;
6489
6495
  if (d) {
6490
6496
  const u = e.match(this.interpolator.nestingRegexp);
6491
6497
  l = u && u.length;
6492
6498
  }
6493
- let h = n.replace && !k(n.replace) ? n.replace : n;
6499
+ let h = n.replace && !L(n.replace) ? n.replace : n;
6494
6500
  if (this.options.interpolation.defaultVariables && (h = {
6495
6501
  ...this.options.interpolation.defaultVariables,
6496
6502
  ...h
@@ -6504,7 +6510,7 @@ class m1 extends k1 {
6504
6510
  return a && a[0] === p[0] && !n.context ? (c.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`), null) : c.translate(...p, t);
6505
6511
  }, n)), n.interpolation && this.interpolator.reset();
6506
6512
  }
6507
- const r = n.postProcess || this.options.postProcess, g = k(r) ? [r] : r;
6513
+ const r = n.postProcess || this.options.postProcess, g = L(r) ? [r] : r;
6508
6514
  return e != null && g && g.length && n.applyPostProcessor !== !1 && (e = oe.handle(g, e, t, this.options && this.options.postProcessPassResolved ? {
6509
6515
  i18nResolved: {
6510
6516
  ...s,
@@ -6515,32 +6521,32 @@ class m1 extends k1 {
6515
6521
  }
6516
6522
  resolve(e) {
6517
6523
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n, s, a, c, r;
6518
- return k(e) && (e = [e]), e.forEach((g) => {
6524
+ return L(e) && (e = [e]), e.forEach((g) => {
6519
6525
  if (this.isValidLookup(n)) return;
6520
6526
  const d = this.extractFromKey(g, t), l = d.key;
6521
6527
  s = l;
6522
6528
  let h = d.namespaces;
6523
6529
  this.options.fallbackNS && (h = h.concat(this.options.fallbackNS));
6524
- const u = t.count !== void 0 && !k(t.count), p = u && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), w = t.context !== void 0 && (k(t.context) || typeof t.context == "number") && t.context !== "", L = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
6530
+ const u = t.count !== void 0 && !L(t.count), p = u && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), w = t.context !== void 0 && (L(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
6525
6531
  h.forEach((m) => {
6526
- this.isValidLookup(n) || (r = m, !G1[`${L[0]}-${m}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(r) && (G1[`${L[0]}-${m}`] = !0, this.logger.warn(`key "${s}" for languages "${L.join(", ")}" won't get resolved as namespace "${r}" 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!!!")), L.forEach((_) => {
6532
+ this.isValidLookup(n) || (r = m, !G1[`${v[0]}-${m}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(r) && (G1[`${v[0]}-${m}`] = !0, this.logger.warn(`key "${s}" for languages "${v.join(", ")}" won't get resolved as namespace "${r}" 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((E) => {
6527
6533
  if (this.isValidLookup(n)) return;
6528
- c = _;
6529
- const M = [l];
6534
+ c = E;
6535
+ const k = [l];
6530
6536
  if (this.i18nFormat && this.i18nFormat.addLookupKeys)
6531
- this.i18nFormat.addLookupKeys(M, l, _, m, t);
6537
+ this.i18nFormat.addLookupKeys(k, l, E, m, t);
6532
6538
  else {
6533
6539
  let f;
6534
- u && (f = this.pluralResolver.getSuffix(_, t.count, t));
6535
- const R = `${this.options.pluralSeparator}zero`, v = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
6536
- if (u && (M.push(l + f), t.ordinal && f.indexOf(v) === 0 && M.push(l + f.replace(v, this.options.pluralSeparator)), p && M.push(l + R)), w) {
6537
- const N = `${l}${this.options.contextSeparator}${t.context}`;
6538
- M.push(N), u && (M.push(N + f), t.ordinal && f.indexOf(v) === 0 && M.push(N + f.replace(v, this.options.pluralSeparator)), p && M.push(N + R));
6540
+ u && (f = this.pluralResolver.getSuffix(E, t.count, t));
6541
+ const M = `${this.options.pluralSeparator}zero`, N = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
6542
+ if (u && (k.push(l + f), t.ordinal && f.indexOf(N) === 0 && k.push(l + f.replace(N, this.options.pluralSeparator)), p && k.push(l + M)), w) {
6543
+ const x = `${l}${this.options.contextSeparator}${t.context}`;
6544
+ k.push(x), u && (k.push(x + f), t.ordinal && f.indexOf(N) === 0 && k.push(x + f.replace(N, this.options.pluralSeparator)), p && k.push(x + M));
6539
6545
  }
6540
6546
  }
6541
6547
  let H;
6542
- for (; H = M.pop(); )
6543
- this.isValidLookup(n) || (a = H, n = this.getResource(_, m, H, t));
6548
+ for (; H = k.pop(); )
6549
+ this.isValidLookup(n) || (a = H, n = this.getResource(E, m, H, t));
6544
6550
  }));
6545
6551
  });
6546
6552
  }), {
@@ -6560,7 +6566,7 @@ class m1 extends k1 {
6560
6566
  }
6561
6567
  getUsedParamsDetails() {
6562
6568
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
6563
- const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !k(e.replace);
6569
+ const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !L(e.replace);
6564
6570
  let s = n ? e.replace : e;
6565
6571
  if (n && typeof e.count < "u" && (s.count = e.count), this.options.interpolation.defaultVariables && (s = {
6566
6572
  ...this.options.interpolation.defaultVariables,
@@ -6598,7 +6604,7 @@ class W1 {
6598
6604
  return this.formatLanguageCode(t[0]);
6599
6605
  }
6600
6606
  formatLanguageCode(e) {
6601
- if (k(e) && e.indexOf("-") > -1) {
6607
+ if (L(e) && e.indexOf("-") > -1) {
6602
6608
  if (typeof Intl < "u" && typeof Intl.getCanonicalLocales < "u")
6603
6609
  try {
6604
6610
  let s = Intl.getCanonicalLocales(e)[0];
@@ -6634,7 +6640,7 @@ class W1 {
6634
6640
  }
6635
6641
  getFallbackCodes(e, t) {
6636
6642
  if (!e) return [];
6637
- if (typeof e == "function" && (e = e(t)), k(e) && (e = [e]), Array.isArray(e)) return e;
6643
+ if (typeof e == "function" && (e = e(t)), L(e) && (e = [e]), Array.isArray(e)) return e;
6638
6644
  if (!t) return e.default || [];
6639
6645
  let n = e[t];
6640
6646
  return n || (n = e[this.getScriptPartFromCode(t)]), n || (n = e[this.formatLanguageCode(t)]), n || (n = e[this.getLanguagePartFromCode(t)]), n || (n = e.default), n || [];
@@ -6643,7 +6649,7 @@ class W1 {
6643
6649
  const n = this.getFallbackCodes(t || this.options.fallbackLng || [], e), s = [], a = (c) => {
6644
6650
  c && (this.isSupportedCode(c) ? s.push(c) : this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`));
6645
6651
  };
6646
- return k(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && a(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && a(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && a(this.getLanguagePartFromCode(e))) : k(e) && a(this.formatLanguageCode(e)), n.forEach((c) => {
6652
+ return L(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && a(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && a(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && a(this.getLanguagePartFromCode(e))) : L(e) && a(this.formatLanguageCode(e)), n.forEach((c) => {
6647
6653
  s.indexOf(c) < 0 && a(this.formatLanguageCode(c));
6648
6654
  }), s;
6649
6655
  }
@@ -6848,7 +6854,7 @@ class Q5 {
6848
6854
  }
6849
6855
  const P1 = function(i, e, t) {
6850
6856
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, a = D5(i, e, t);
6851
- return !a && s && k(t) && (a = M1(i, t, n), a === void 0 && (a = M1(e, t, n))), a;
6857
+ return !a && s && L(t) && (a = M1(i, t, n), a === void 0 && (a = M1(e, t, n))), a;
6852
6858
  }, x1 = (i) => i.replace(/\$/g, "$$$$");
6853
6859
  class q5 {
6854
6860
  constructor() {
@@ -6874,12 +6880,12 @@ class q5 {
6874
6880
  nestingPrefix: u,
6875
6881
  nestingPrefixEscaped: p,
6876
6882
  nestingSuffix: w,
6877
- nestingSuffixEscaped: L,
6883
+ nestingSuffixEscaped: v,
6878
6884
  nestingOptionsSeparator: m,
6879
- maxReplaces: _,
6880
- alwaysFormat: M
6885
+ maxReplaces: E,
6886
+ alwaysFormat: k
6881
6887
  } = e.interpolation;
6882
- this.escape = t !== void 0 ? t : j5, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? X(a) : c || "{{", this.suffix = r ? X(r) : g || "}}", this.formatSeparator = d || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = u ? X(u) : p || X("$t("), this.nestingSuffix = w ? X(w) : L || X(")"), this.nestingOptionsSeparator = m || ",", this.maxReplaces = _ || 1e3, this.alwaysFormat = M !== void 0 ? M : !1, this.resetRegExp();
6888
+ this.escape = t !== void 0 ? t : j5, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = a ? X(a) : c || "{{", this.suffix = r ? X(r) : g || "}}", this.formatSeparator = d || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = u ? X(u) : p || X("$t("), this.nestingSuffix = w ? X(w) : v || X(")"), this.nestingOptionsSeparator = m || ",", this.maxReplaces = E || 1e3, this.alwaysFormat = k !== void 0 ? k : !1, this.resetRegExp();
6883
6889
  }
6884
6890
  reset() {
6885
6891
  this.options && this.init(this.options);
@@ -6892,18 +6898,18 @@ class q5 {
6892
6898
  let a, c, r;
6893
6899
  const g = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, d = (p) => {
6894
6900
  if (p.indexOf(this.formatSeparator) < 0) {
6895
- const _ = P1(t, g, p, this.options.keySeparator, this.options.ignoreJSONStructure);
6896
- return this.alwaysFormat ? this.format(_, void 0, n, {
6901
+ const E = P1(t, g, p, this.options.keySeparator, this.options.ignoreJSONStructure);
6902
+ return this.alwaysFormat ? this.format(E, void 0, n, {
6897
6903
  ...s,
6898
6904
  ...t,
6899
6905
  interpolationkey: p
6900
- }) : _;
6906
+ }) : E;
6901
6907
  }
6902
- const w = p.split(this.formatSeparator), L = w.shift().trim(), m = w.join(this.formatSeparator).trim();
6903
- return this.format(P1(t, g, L, this.options.keySeparator, this.options.ignoreJSONStructure), m, n, {
6908
+ const w = p.split(this.formatSeparator), v = w.shift().trim(), m = w.join(this.formatSeparator).trim();
6909
+ return this.format(P1(t, g, v, this.options.keySeparator, this.options.ignoreJSONStructure), m, n, {
6904
6910
  ...s,
6905
6911
  ...t,
6906
- interpolationkey: L
6912
+ interpolationkey: v
6907
6913
  });
6908
6914
  };
6909
6915
  this.resetRegExp();
@@ -6920,7 +6926,7 @@ class q5 {
6920
6926
  if (c = d(w), c === void 0)
6921
6927
  if (typeof l == "function") {
6922
6928
  const m = l(e, a, s);
6923
- c = k(m) ? m : "";
6929
+ c = L(m) ? m : "";
6924
6930
  } else if (s && Object.prototype.hasOwnProperty.call(s, w))
6925
6931
  c = "";
6926
6932
  else if (h) {
@@ -6928,9 +6934,9 @@ class q5 {
6928
6934
  continue;
6929
6935
  } else
6930
6936
  this.logger.warn(`missed to pass in variable ${w} for interpolating ${e}`), c = "";
6931
- else !k(c) && !this.useRawValueToEscape && (c = T1(c));
6932
- const L = p.safeValue(c);
6933
- if (e = e.replace(a[0], L), h ? (p.regex.lastIndex += c.length, p.regex.lastIndex -= a[0].length) : p.regex.lastIndex = 0, r++, r >= this.maxReplaces)
6937
+ else !L(c) && !this.useRawValueToEscape && (c = T1(c));
6938
+ const v = p.safeValue(c);
6939
+ if (e = e.replace(a[0], v), h ? (p.regex.lastIndex += c.length, p.regex.lastIndex -= a[0].length) : p.regex.lastIndex = 0, r++, r >= this.maxReplaces)
6934
6940
  break;
6935
6941
  }
6936
6942
  }), e;
@@ -6950,8 +6956,8 @@ class q5 {
6950
6956
  ...d,
6951
6957
  ...c
6952
6958
  });
6953
- } catch (L) {
6954
- return this.logger.warn(`failed parsing options string in nesting for key ${g}`, L), `${g}${l}${u}`;
6959
+ } catch (v) {
6960
+ return this.logger.warn(`failed parsing options string in nesting for key ${g}`, v), `${g}${l}${u}`;
6955
6961
  }
6956
6962
  return c.defaultValue && c.defaultValue.indexOf(this.prefix) > -1 && delete c.defaultValue, g;
6957
6963
  };
@@ -6959,14 +6965,14 @@ class q5 {
6959
6965
  let g = [];
6960
6966
  c = {
6961
6967
  ...n
6962
- }, c = c.replace && !k(c.replace) ? c.replace : c, c.applyPostProcessor = !1, delete c.defaultValue;
6968
+ }, c = c.replace && !L(c.replace) ? c.replace : c, c.applyPostProcessor = !1, delete c.defaultValue;
6963
6969
  let d = !1;
6964
6970
  if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
6965
6971
  const l = s[1].split(this.formatSeparator).map((h) => h.trim());
6966
6972
  s[1] = l.shift(), g = l, d = !0;
6967
6973
  }
6968
- if (a = t(r.call(this, s[1].trim(), c), c), a && s[0] === e && !k(a)) return a;
6969
- k(a) || (a = T1(a)), a || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), a = ""), d && (a = g.reduce((l, h) => this.format(l, h, n.lng, {
6974
+ if (a = t(r.call(this, s[1].trim(), c), c), a && s[0] === e && !L(a)) return a;
6975
+ L(a) || (a = T1(a)), a || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), a = ""), d && (a = g.reduce((l, h) => this.format(l, h, n.lng, {
6970
6976
  ...n,
6971
6977
  interpolationkey: s[1].trim()
6972
6978
  }), a.trim())), e = e.replace(s[0], a), this.regexp.lastIndex = 0;
@@ -7173,7 +7179,7 @@ class ii extends k1 {
7173
7179
  let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = arguments.length > 3 ? arguments[3] : void 0;
7174
7180
  if (!this.backend)
7175
7181
  return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
7176
- k(e) && (e = this.languageUtils.toResolveHierarchy(e)), k(t) && (t = [t]);
7182
+ L(e) && (e = this.languageUtils.toResolveHierarchy(e)), L(t) && (t = [t]);
7177
7183
  const a = this.queueLoad(e, t, n, s);
7178
7184
  if (!a.toLoad.length)
7179
7185
  return a.pending.length || s(), null;
@@ -7258,7 +7264,7 @@ const $1 = () => ({
7258
7264
  appendNamespaceToCIMode: !1,
7259
7265
  overloadTranslationOptionHandler: (i) => {
7260
7266
  let e = {};
7261
- if (typeof i[1] == "object" && (e = i[1]), k(i[1]) && (e.defaultValue = i[1]), k(i[2]) && (e.tDescription = i[2]), typeof i[2] == "object" || typeof i[3] == "object") {
7267
+ if (typeof i[1] == "object" && (e = i[1]), L(i[1]) && (e.defaultValue = i[1]), L(i[2]) && (e.tDescription = i[2]), typeof i[2] == "object" || typeof i[3] == "object") {
7262
7268
  const t = i[3] || i[2];
7263
7269
  Object.keys(t).forEach((n) => {
7264
7270
  e[n] = t[n];
@@ -7279,7 +7285,7 @@ const $1 = () => ({
7279
7285
  maxReplaces: 1e3,
7280
7286
  skipOnVariables: !0
7281
7287
  }
7282
- }), F1 = (i) => (k(i.ns) && (i.ns = [i.ns]), k(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), k(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), u1 = () => {
7288
+ }), F1 = (i) => (L(i.ns) && (i.ns = [i.ns]), L(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), L(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), u1 = () => {
7283
7289
  }, ni = (i) => {
7284
7290
  Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach((t) => {
7285
7291
  typeof i[t] == "function" && (i[t] = i[t].bind(i));
@@ -7301,7 +7307,7 @@ class l1 extends k1 {
7301
7307
  init() {
7302
7308
  var e = this;
7303
7309
  let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
7304
- this.isInitializing = !0, typeof t == "function" && (n = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (k(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
7310
+ this.isInitializing = !0, typeof t == "function" && (n = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (L(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
7305
7311
  const s = $1();
7306
7312
  this.options = {
7307
7313
  ...s,
@@ -7326,13 +7332,13 @@ class l1 extends k1 {
7326
7332
  }), l && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (u.formatter = a(l), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new q5(this.options), u.utils = {
7327
7333
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
7328
7334
  }, u.backendConnector = new ii(a(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", function(p) {
7329
- for (var w = arguments.length, L = new Array(w > 1 ? w - 1 : 0), m = 1; m < w; m++)
7330
- L[m - 1] = arguments[m];
7331
- e.emit(p, ...L);
7335
+ for (var w = arguments.length, v = new Array(w > 1 ? w - 1 : 0), m = 1; m < w; m++)
7336
+ v[m - 1] = arguments[m];
7337
+ e.emit(p, ...v);
7332
7338
  }), this.modules.languageDetector && (u.languageDetector = a(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = a(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new m1(this.services, this.options), this.translator.on("*", function(p) {
7333
- for (var w = arguments.length, L = new Array(w > 1 ? w - 1 : 0), m = 1; m < w; m++)
7334
- L[m - 1] = arguments[m];
7335
- e.emit(p, ...L);
7339
+ for (var w = arguments.length, v = new Array(w > 1 ? w - 1 : 0), m = 1; m < w; m++)
7340
+ v[m - 1] = arguments[m];
7341
+ e.emit(p, ...v);
7336
7342
  }), this.modules.external.forEach((p) => {
7337
7343
  p.init && p.init(this);
7338
7344
  });
@@ -7361,7 +7367,7 @@ class l1 extends k1 {
7361
7367
  }
7362
7368
  loadResources(e) {
7363
7369
  let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : u1;
7364
- const s = k(e) ? e : this.language;
7370
+ const s = L(e) ? e : this.language;
7365
7371
  if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
7366
7372
  if (s && s.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
7367
7373
  const a = [], c = (r) => {
@@ -7412,7 +7418,7 @@ class l1 extends k1 {
7412
7418
  });
7413
7419
  }, r = (g) => {
7414
7420
  !e && !g && this.services.languageDetector && (g = []);
7415
- const d = k(g) ? g : this.services.languageUtils.getBestMatchFromCodes(g);
7421
+ const d = L(g) ? g : this.services.languageUtils.getBestMatchFromCodes(g);
7416
7422
  d && (this.language || a(d), this.translator.language || this.translator.changeLanguage(d), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(d)), this.loadResources(d, (l) => {
7417
7423
  c(l, d);
7418
7424
  });
@@ -7436,7 +7442,7 @@ class l1 extends k1 {
7436
7442
  let p;
7437
7443
  return g.keyPrefix && Array.isArray(c) ? p = c.map((w) => `${g.keyPrefix}${u}${w}`) : p = g.keyPrefix ? `${g.keyPrefix}${u}${c}` : c, s.t(p, g);
7438
7444
  };
7439
- return k(e) ? a.lng = e : a.lngs = e, a.ns = t, a.keyPrefix = n, a;
7445
+ return L(e) ? a.lng = e : a.lngs = e, a.ns = t, a.keyPrefix = n, a;
7440
7446
  }
7441
7447
  t() {
7442
7448
  return this.translator && this.translator.translate(...arguments);
@@ -7467,7 +7473,7 @@ class l1 extends k1 {
7467
7473
  }
7468
7474
  loadNamespaces(e, t) {
7469
7475
  const n = s1();
7470
- return this.options.ns ? (k(e) && (e = [e]), e.forEach((s) => {
7476
+ return this.options.ns ? (L(e) && (e = [e]), e.forEach((s) => {
7471
7477
  this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
7472
7478
  }), this.loadResources((s) => {
7473
7479
  n.resolve(), t && t(s);
@@ -7475,7 +7481,7 @@ class l1 extends k1 {
7475
7481
  }
7476
7482
  loadLanguages(e, t) {
7477
7483
  const n = s1();
7478
- k(e) && (e = [e]);
7484
+ L(e) && (e = [e]);
7479
7485
  const s = this.options.preload || [], a = e.filter((c) => s.indexOf(c) < 0 && this.services.languageUtils.isSupportedCode(c));
7480
7486
  return a.length ? (this.options.preload = s.concat(a), this.loadResources((c) => {
7481
7487
  n.resolve(), t && t(c);
@@ -7660,8 +7666,8 @@ const ki = (i, e) => {
7660
7666
  } = Q(mi) || {}, a = t || n || pi();
7661
7667
  if (a && !a.reportNamespaces && (a.reportNamespaces = new wi()), !a) {
7662
7668
  b1("You will need to pass in an i18next instance by using initReactI18next");
7663
- const f = (v, N) => z(N) ? N : ai(N) && z(N.defaultValue) ? N.defaultValue : Array.isArray(v) ? v[v.length - 1] : v, R = [f, {}, !1];
7664
- return R.t = f, R.i18n = {}, R.ready = !1, R;
7669
+ const f = (N, x) => z(x) ? x : ai(x) && z(x.defaultValue) ? x.defaultValue : Array.isArray(N) ? N[N.length - 1] : N, M = [f, {}, !1];
7670
+ return M.t = f, M.i18n = {}, M.ready = !1, M;
7665
7671
  }
7666
7672
  a.options.react && a.options.react.wait !== void 0 && b1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
7667
7673
  const c = {
@@ -7674,28 +7680,28 @@ const ki = (i, e) => {
7674
7680
  } = c;
7675
7681
  let d = i;
7676
7682
  d = z(d) ? [d] : d || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(d);
7677
- const l = (a.isInitialized || a.initializedStoreOnce) && d.every((f) => ri(f, a, c)), h = Li(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), u = () => h, p = () => le(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [w, L] = O(u);
7683
+ const l = (a.isInitialized || a.initializedStoreOnce) && d.every((f) => ri(f, a, c)), h = Li(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), u = () => h, p = () => le(a, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [w, v] = O(u);
7678
7684
  let m = d.join();
7679
7685
  e.lng && (m = `${e.lng}${m}`);
7680
- const _ = ki(m), M = J(!0);
7686
+ const E = ki(m), k = J(!0);
7681
7687
  S(() => {
7682
7688
  const {
7683
7689
  bindI18n: f,
7684
- bindI18nStore: R
7690
+ bindI18nStore: M
7685
7691
  } = c;
7686
- M.current = !0, !l && !r && (e.lng ? z1(a, e.lng, d, () => {
7687
- M.current && L(p);
7692
+ k.current = !0, !l && !r && (e.lng ? z1(a, e.lng, d, () => {
7693
+ k.current && v(p);
7688
7694
  }) : U1(a, d, () => {
7689
- M.current && L(p);
7690
- })), l && _ && _ !== m && M.current && L(p);
7691
- const v = () => {
7692
- M.current && L(p);
7695
+ k.current && v(p);
7696
+ })), l && E && E !== m && k.current && v(p);
7697
+ const N = () => {
7698
+ k.current && v(p);
7693
7699
  };
7694
- return f && a && a.on(f, v), R && a && a.store.on(R, v), () => {
7695
- M.current = !1, f && a && f.split(" ").forEach((N) => a.off(N, v)), R && a && R.split(" ").forEach((N) => a.store.off(N, v));
7700
+ return f && a && a.on(f, N), M && a && a.store.on(M, N), () => {
7701
+ k.current = !1, f && a && f.split(" ").forEach((x) => a.off(x, N)), M && a && M.split(" ").forEach((x) => a.store.off(x, N));
7696
7702
  };
7697
7703
  }, [a, m]), S(() => {
7698
- M.current && l && L(u);
7704
+ k.current && l && v(u);
7699
7705
  }, [a, g, l]);
7700
7706
  const H = [w, a, l];
7701
7707
  if (H.t = w, H.i18n = a, H.ready = l, l || !l && !r) return H;
@@ -7732,32 +7738,32 @@ const Si = w1(
7732
7738
  clearable: g,
7733
7739
  error: d
7734
7740
  }, l) => {
7735
- const [h, u] = O([]), [p, w] = O([]), [L, m] = O(!1), { locale: _, axiosPeople: M } = Q(pe);
7736
- if (!M)
7741
+ const [h, u] = O([]), [p, w] = O([]), [v, m] = O(!1), { locale: E, axiosPeople: k } = Q(pe);
7742
+ if (!k)
7737
7743
  throw new Error(
7738
7744
  `CountrySelect requires "axiosPeople" to fetch counties.
7739
7745
  Please provide it via SNMTUiContext.`
7740
7746
  );
7741
- const { t: H } = vi("common", { lng: _ }), f = j(async () => {
7747
+ const { t: H } = vi("common", { lng: E }), f = j(async () => {
7742
7748
  m(!0);
7743
7749
  try {
7744
- const v = await M.post("v1/countries/search");
7745
- w(v == null ? void 0 : v.data.data);
7750
+ const N = await k.post("v1/countries/search");
7751
+ w(N == null ? void 0 : N.data.data);
7746
7752
  } catch {
7747
7753
  u([]);
7748
7754
  } finally {
7749
7755
  m(!1);
7750
7756
  }
7751
- }, [M]);
7757
+ }, [k]);
7752
7758
  S(() => {
7753
7759
  f();
7754
7760
  }, []), S(() => {
7755
7761
  if (e) {
7756
- const v = e.split("-")[1], N = p.filter(
7757
- (Z) => Z.name.includes(v)
7762
+ const N = e.split("-")[1], x = p.filter(
7763
+ (Z) => Z.name.includes(N)
7758
7764
  );
7759
- if (N.length) {
7760
- const Z = N.map((W) => ({
7765
+ if (x.length) {
7766
+ const Z = x.map((W) => ({
7761
7767
  label: W.name,
7762
7768
  value: W.name
7763
7769
  }));
@@ -7765,14 +7771,14 @@ const Si = w1(
7765
7771
  }
7766
7772
  }
7767
7773
  }, [e, p, n]), S(() => {
7768
- const v = p.map((N) => ({
7769
- label: N.name,
7770
- value: N.name
7774
+ const N = p.map((x) => ({
7775
+ label: x.name,
7776
+ value: x.name
7771
7777
  }));
7772
- u(v);
7778
+ u(N);
7773
7779
  }, [p]);
7774
- const R = (v) => {
7775
- v === null ? (n(""), t && t("")) : (n(v), t && t(""));
7780
+ const M = (N) => {
7781
+ N === null ? (n(""), t && t("")) : (n(N), t && t(""));
7776
7782
  };
7777
7783
  return /* @__PURE__ */ o("div", { className: "snmt-country-select", children: /* @__PURE__ */ o(
7778
7784
  V5,
@@ -7782,10 +7788,10 @@ const Si = w1(
7782
7788
  placeholder: H("placeholder"),
7783
7789
  value: s,
7784
7790
  ref: l,
7785
- onChange: R,
7791
+ onChange: M,
7786
7792
  options: h,
7787
7793
  disabled: c,
7788
- isLoading: L,
7794
+ isLoading: v,
7789
7795
  required: r,
7790
7796
  clearable: g,
7791
7797
  error: d
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@snmt-react-ui/country-select",
3
3
  "private": false,
4
- "version": "2.6.21",
4
+ "version": "2.6.22",
5
5
  "type": "module",
6
6
  "main": "dist/country-select.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "build": "tsc && vite build"
19
19
  },
20
20
  "dependencies": {
21
- "@snmt-react-ui/city-select": "^2.6.21",
21
+ "@snmt-react-ui/city-select": "^2.6.22",
22
22
  "@snmt-react-ui/core": "^2.3.0",
23
23
  "@snmt-react-ui/flex": "^1.5.3",
24
24
  "i18next": "^23.11.5",
@@ -27,5 +27,5 @@
27
27
  "peerDependencies": {
28
28
  "antd": "^5.18.3"
29
29
  },
30
- "gitHead": "f5de9c8d5c401e3f6a75c2ad1a4c89bef998e47a"
30
+ "gitHead": "17d865b0e12710b8f2abbe30a08abfa5f245144d"
31
31
  }