@hortiview/default-components 0.0.11924 → 0.0.11935

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 (30) hide show
  1. package/README.md +92 -1
  2. package/dist/{HealthCheckFailed-D-HxxKaW.js → HealthCheckFailed-j1XFU5px.js} +3 -3
  3. package/dist/{InternationalizationWrapper-f8wtvSQv.js → InternationalizationWrapper-BtWuzVFG.js} +1 -1
  4. package/dist/{LoadingSpinner-cKWdZk2k.js → LoadingSpinner-BxqY1o89.js} +2 -2
  5. package/dist/{component-DsB0poTj-DaqoXt8b.js → component-DsB0poTj-B4NF-JCy.js} +1 -1
  6. package/dist/components/DefaultFormNumber/DefaultFormNumber.js +157 -160
  7. package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.d.ts +1 -2
  8. package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +9 -8
  9. package/dist/components/HealthChecks/DataBaseHealthCheck.d.ts +1 -2
  10. package/dist/components/HealthChecks/DataBaseHealthCheck.js +9 -8
  11. package/dist/components/HealthChecks/DefaultHealthCheck.d.ts +1 -2
  12. package/dist/components/HealthChecks/DefaultHealthCheck.js +9 -8
  13. package/dist/components/HealthChecks/IotServiceHealthCheck.d.ts +1 -2
  14. package/dist/components/HealthChecks/IotServiceHealthCheck.js +9 -8
  15. package/dist/components/HealthChecks/PlatformHealthCheck.d.ts +1 -2
  16. package/dist/components/HealthChecks/PlatformHealthCheck.js +9 -8
  17. package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.d.ts +1 -2
  18. package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +8 -7
  19. package/dist/components/InternationalizationWrapper/InternationalizationWrapper.js +2 -2
  20. package/dist/{i18n-BfBMXJfT.js → i18n-DIprVS_u.js} +70 -60
  21. package/dist/i18n.js +1 -1
  22. package/dist/{index.es-D-CKRzIB-DytY6U2C.js → index.es-D-CKRzIB-Cv9zF1oG.js} +1 -1
  23. package/dist/locales/es-MX.js +3 -2
  24. package/dist/locales/es-MX.json.d.ts +2 -0
  25. package/dist/locales/tr-TR.js +2 -1
  26. package/dist/locales/tr-TR.json.d.ts +2 -0
  27. package/dist/main.js +1 -1
  28. package/dist/{useTranslation-DCJK5-ax.js → useTranslation-Bh0VR1ML.js} +3 -3
  29. package/package.json +9 -2
  30. /package/dist/assets/{useTranslation.css → i18n.css} +0 -0
@@ -1,5 +1,4 @@
1
1
  import { LoadingSpinnerProps } from '@hortiview/shared-components';
2
2
 
3
- type DefaultLoadingSpinnerProps = Omit<LoadingSpinnerProps, 'text'>;
3
+ export type DefaultLoadingSpinnerProps = Omit<LoadingSpinnerProps, 'text'>;
4
4
  export declare const DefaultLoadingSpinner: ({ ...props }: DefaultLoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,11 +1,12 @@
1
- import { jsx as e } from "react/jsx-runtime";
2
- import { u as t } from "../../useTranslation-DCJK5-ax.js";
3
- import { p as a } from "../../LoadingSpinner-cKWdZk2k.js";
4
- import { I as o } from "../../InternationalizationWrapper-f8wtvSQv.js";
5
- const l = ({ ...n }) => {
6
- const { t: r } = t();
7
- return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(a, { ...n, text: r("loadingSpinner.baseMessage"), impatienceMessage: null }) });
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import "../../i18n-DIprVS_u.js";
3
+ import { p as t } from "../../LoadingSpinner-BxqY1o89.js";
4
+ import { I as o } from "../../InternationalizationWrapper-BtWuzVFG.js";
5
+ import { u as a } from "../../useTranslation-Bh0VR1ML.js";
6
+ const f = ({ ...e }) => {
7
+ const { t: n } = a();
8
+ return /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(t, { ...e, text: n("loadingSpinner.baseMessage"), impatienceMessage: null }) });
8
9
  };
9
10
  export {
10
- l as DefaultLoadingSpinner
11
+ f as DefaultLoadingSpinner
11
12
  };
@@ -1,5 +1,4 @@
1
1
  import { HealthCheckFailedProps } from '@hortiview/shared-components';
2
2
 
3
- type DataBaseHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
3
+ export type DataBaseHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
4
4
  export declare const DataBaseHealthCheck: ({ ...props }: DataBaseHealthCheckProps) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,11 +1,12 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { u as r } from "../../useTranslation-DCJK5-ax.js";
3
- import { N as o } from "../../HealthCheckFailed-D-HxxKaW.js";
4
- import { I as i } from "../../InternationalizationWrapper-f8wtvSQv.js";
5
- const m = ({ ...e }) => {
6
- const { t } = r();
7
- return /* @__PURE__ */ a(i, { children: /* @__PURE__ */ a(
8
- o,
2
+ import "../../i18n-DIprVS_u.js";
3
+ import { N as r } from "../../HealthCheckFailed-j1XFU5px.js";
4
+ import { I as o } from "../../InternationalizationWrapper-BtWuzVFG.js";
5
+ import { u as i } from "../../useTranslation-Bh0VR1ML.js";
6
+ const p = ({ ...e }) => {
7
+ const { t } = i();
8
+ return /* @__PURE__ */ a(o, { children: /* @__PURE__ */ a(
9
+ r,
9
10
  {
10
11
  ...e,
11
12
  title: t("healthCheck.dataBase"),
@@ -15,5 +16,5 @@ const m = ({ ...e }) => {
15
16
  ) });
16
17
  };
17
18
  export {
18
- m as DataBaseHealthCheck
19
+ p as DataBaseHealthCheck
19
20
  };
@@ -1,5 +1,4 @@
1
1
  import { HealthCheckFailedProps } from '@hortiview/shared-components';
2
2
 
3
- type DefaultHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
3
+ export type DefaultHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
4
4
  export declare const DefaultHealthCheck: ({ ...props }: DefaultHealthCheckProps) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,11 +1,12 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { u as o } from "../../useTranslation-DCJK5-ax.js";
3
- import { N as a } from "../../HealthCheckFailed-D-HxxKaW.js";
4
- import { I as i } from "../../InternationalizationWrapper-f8wtvSQv.js";
5
- const p = ({ ...r }) => {
6
- const { t } = o();
7
- return /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
8
- a,
2
+ import "../../i18n-DIprVS_u.js";
3
+ import { N as o } from "../../HealthCheckFailed-j1XFU5px.js";
4
+ import { I as a } from "../../InternationalizationWrapper-BtWuzVFG.js";
5
+ import { u as i } from "../../useTranslation-Bh0VR1ML.js";
6
+ const s = ({ ...r }) => {
7
+ const { t } = i();
8
+ return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
9
+ o,
9
10
  {
10
11
  ...r,
11
12
  title: t("healthCheck.default"),
@@ -15,5 +16,5 @@ const p = ({ ...r }) => {
15
16
  ) });
16
17
  };
17
18
  export {
18
- p as DefaultHealthCheck
19
+ s as DefaultHealthCheck
19
20
  };
@@ -1,5 +1,4 @@
1
1
  import { HealthCheckFailedProps } from '@hortiview/shared-components';
2
2
 
3
- type IotServiceHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
3
+ export type IotServiceHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
4
4
  export declare const IotServiceHealthCheck: ({ ...props }: IotServiceHealthCheckProps) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,11 +1,12 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { u as i } from "../../useTranslation-DCJK5-ax.js";
3
- import { N as o } from "../../HealthCheckFailed-D-HxxKaW.js";
4
- import { I as a } from "../../InternationalizationWrapper-f8wtvSQv.js";
5
- const m = ({ ...r }) => {
6
- const { t } = i();
7
- return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ e(
8
- o,
2
+ import "../../i18n-DIprVS_u.js";
3
+ import { N as i } from "../../HealthCheckFailed-j1XFU5px.js";
4
+ import { I as o } from "../../InternationalizationWrapper-BtWuzVFG.js";
5
+ import { u as a } from "../../useTranslation-Bh0VR1ML.js";
6
+ const p = ({ ...r }) => {
7
+ const { t } = a();
8
+ return /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
9
+ i,
9
10
  {
10
11
  ...r,
11
12
  title: t("healthCheck.iotService"),
@@ -15,5 +16,5 @@ const m = ({ ...r }) => {
15
16
  ) });
16
17
  };
17
18
  export {
18
- m as IotServiceHealthCheck
19
+ p as IotServiceHealthCheck
19
20
  };
@@ -1,5 +1,4 @@
1
1
  import { HealthCheckFailedProps } from '@hortiview/shared-components';
2
2
 
3
- type PlatformHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
3
+ export type PlatformHealthCheckProps = Omit<HealthCheckFailedProps, 'title' | 'subtitle' | 'type'>;
4
4
  export declare const PlatformHealthCheck: ({ ...props }: PlatformHealthCheckProps) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,11 +1,12 @@
1
1
  import { jsx as r } from "react/jsx-runtime";
2
- import { u as e } from "../../useTranslation-DCJK5-ax.js";
3
- import { N as a } from "../../HealthCheckFailed-D-HxxKaW.js";
4
- import { I as l } from "../../InternationalizationWrapper-f8wtvSQv.js";
5
- const h = ({ ...o }) => {
6
- const { t } = e();
7
- return /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
8
- a,
2
+ import "../../i18n-DIprVS_u.js";
3
+ import { N as e } from "../../HealthCheckFailed-j1XFU5px.js";
4
+ import { I as a } from "../../InternationalizationWrapper-BtWuzVFG.js";
5
+ import { u as i } from "../../useTranslation-Bh0VR1ML.js";
6
+ const f = ({ ...o }) => {
7
+ const { t } = i();
8
+ return /* @__PURE__ */ r(a, { children: /* @__PURE__ */ r(
9
+ e,
9
10
  {
10
11
  ...o,
11
12
  title: t("healthCheck.platform"),
@@ -15,5 +16,5 @@ const h = ({ ...o }) => {
15
16
  ) });
16
17
  };
17
18
  export {
18
- h as PlatformHealthCheck
19
+ f as PlatformHealthCheck
19
20
  };
@@ -1,5 +1,4 @@
1
1
  import { LoadingSpinnerProps } from '@hortiview/shared-components';
2
2
 
3
- type ImpatienceLoadingSpinnerProps = Omit<LoadingSpinnerProps, 'impatienceMessage' | 'text'>;
3
+ export type ImpatienceLoadingSpinnerProps = Omit<LoadingSpinnerProps, 'impatienceMessage' | 'text'>;
4
4
  export declare const ImpatienceLoadingSpinner: ({ ...props }: ImpatienceLoadingSpinnerProps) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,10 +1,11 @@
1
1
  import { jsx as n } from "react/jsx-runtime";
2
- import { u as a } from "../../useTranslation-DCJK5-ax.js";
3
- import { p as r } from "../../LoadingSpinner-cKWdZk2k.js";
4
- import { I as t } from "../../InternationalizationWrapper-f8wtvSQv.js";
5
- const c = ({ ...i }) => {
6
- const { t: e } = a();
7
- return /* @__PURE__ */ n(t, { children: /* @__PURE__ */ n(
2
+ import "../../i18n-DIprVS_u.js";
3
+ import { p as r } from "../../LoadingSpinner-BxqY1o89.js";
4
+ import { I as a } from "../../InternationalizationWrapper-BtWuzVFG.js";
5
+ import { u as t } from "../../useTranslation-Bh0VR1ML.js";
6
+ const g = ({ ...i }) => {
7
+ const { t: e } = t();
8
+ return /* @__PURE__ */ n(a, { children: /* @__PURE__ */ n(
8
9
  r,
9
10
  {
10
11
  ...i,
@@ -14,5 +15,5 @@ const c = ({ ...i }) => {
14
15
  ) });
15
16
  };
16
17
  export {
17
- c as ImpatienceLoadingSpinner
18
+ g as ImpatienceLoadingSpinner
18
19
  };
@@ -1,7 +1,7 @@
1
1
  import "react/jsx-runtime";
2
2
  import "react";
3
- import "../../i18n-BfBMXJfT.js";
4
- import { I as r, u as p } from "../../InternationalizationWrapper-f8wtvSQv.js";
3
+ import "../../i18n-DIprVS_u.js";
4
+ import { I as r, u as p } from "../../InternationalizationWrapper-BtWuzVFG.js";
5
5
  export {
6
6
  r as InternationalizationWrapper,
7
7
  p as useChangeDefaultComponentsLanguage
@@ -1,7 +1,16 @@
1
1
  import Re from "./locales/en-US.js";
2
2
  import Pe from "./locales/es-MX.js";
3
3
  import Ne from "./locales/tr-TR.js";
4
- const Ee = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, Fe = {
4
+ import './assets/i18n.css';const Ee = [
5
+ "en",
6
+ "es",
7
+ "tr"
8
+ // 'de' currently not supported
9
+ ], bt = {
10
+ en: "en-US",
11
+ es: "es-MX",
12
+ tr: "tr-TR"
13
+ }, Fe = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, De = {
5
14
  "&amp;": "&",
6
15
  "&#38;": "&",
7
16
  "&lt;": "<",
@@ -22,7 +31,7 @@ const Ee = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|
22
31
  "&#8230;": "…",
23
32
  "&#x2F;": "/",
24
33
  "&#47;": "/"
25
- }, De = (r) => Fe[r], Ie = (r) => r.replace(Ee, De);
34
+ }, Ie = (r) => De[r], je = (r) => r.replace(Fe, Ie);
26
35
  let _ = {
27
36
  bindI18n: "languageChanged",
28
37
  bindI18nStore: "",
@@ -31,21 +40,21 @@ let _ = {
31
40
  transWrapTextNodes: "",
32
41
  transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
33
42
  useSuspense: !0,
34
- unescape: Ie
43
+ unescape: je
35
44
  };
36
- const je = (r = {}) => {
45
+ const Ae = (r = {}) => {
37
46
  _ = {
38
47
  ..._,
39
48
  ...r
40
49
  };
41
- }, St = () => _;
50
+ }, wt = () => _;
42
51
  let Oe;
43
- const Ae = (r) => {
52
+ const Te = (r) => {
44
53
  Oe = r;
45
- }, bt = () => Oe, Te = {
54
+ }, Ot = () => Oe, Ve = {
46
55
  type: "3rdParty",
47
56
  init(r) {
48
- je(r.options.react), Ae(r);
57
+ Ae(r.options.react), Te(r);
49
58
  }
50
59
  }, h = (r) => typeof r == "string", H = () => {
51
60
  let r, e;
@@ -53,11 +62,11 @@ const Ae = (r) => {
53
62
  r = n, e = s;
54
63
  });
55
64
  return t.resolve = r, t.reject = e, t;
56
- }, re = (r) => r == null ? "" : "" + r, Ve = (r, e, t) => {
65
+ }, re = (r) => r == null ? "" : "" + r, Ue = (r, e, t) => {
57
66
  r.forEach((n) => {
58
67
  e[n] && (t[n] = e[n]);
59
68
  });
60
- }, Ue = /###/g, ae = (r) => r && r.indexOf("###") > -1 ? r.replace(Ue, ".") : r, oe = (r) => !r || h(r), z = (r, e, t) => {
69
+ }, Ke = /###/g, ae = (r) => r && r.indexOf("###") > -1 ? r.replace(Ke, ".") : r, oe = (r) => !r || h(r), z = (r, e, t) => {
61
70
  const n = h(e) ? e.split(".") : e;
62
71
  let s = 0;
63
72
  for (; s < n.length - 1; ) {
@@ -82,7 +91,7 @@ const Ae = (r) => {
82
91
  for (; l.obj === void 0 && a.length; )
83
92
  i = `${a[a.length - 1]}.${i}`, a = a.slice(0, a.length - 1), l = z(r, a, Object), l != null && l.obj && typeof l.obj[`${l.k}.${i}`] < "u" && (l.obj = void 0);
84
93
  l.obj[`${l.k}.${i}`] = t;
85
- }, Ke = (r, e, t, n) => {
94
+ }, Me = (r, e, t, n) => {
86
95
  const {
87
96
  obj: s,
88
97
  k: i
@@ -95,7 +104,7 @@ const Ae = (r) => {
95
104
  } = z(r, e);
96
105
  if (t && Object.prototype.hasOwnProperty.call(t, n))
97
106
  return t[n];
98
- }, Me = (r, e, t) => {
107
+ }, He = (r, e, t) => {
99
108
  const n = Q(r, t);
100
109
  return n !== void 0 ? n : Q(e, t);
101
110
  }, Le = (r, e, t) => {
@@ -103,7 +112,7 @@ const Ae = (r) => {
103
112
  n !== "__proto__" && n !== "constructor" && (n in r ? h(r[n]) || r[n] instanceof String || h(e[n]) || e[n] instanceof String ? t && (r[n] = e[n]) : Le(r[n], e[n], t) : r[n] = e[n]);
104
113
  return r;
105
114
  }, I = (r) => r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
106
- var He = {
115
+ var ze = {
107
116
  "&": "&amp;",
108
117
  "<": "&lt;",
109
118
  ">": "&gt;",
@@ -111,8 +120,8 @@ var He = {
111
120
  "'": "&#39;",
112
121
  "/": "&#x2F;"
113
122
  };
114
- const ze = (r) => h(r) ? r.replace(/[&<>"'\/]/g, (e) => He[e]) : r;
115
- class Be {
123
+ const Be = (r) => h(r) ? r.replace(/[&<>"'\/]/g, (e) => ze[e]) : r;
124
+ class Je {
116
125
  constructor(e) {
117
126
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
118
127
  }
@@ -124,11 +133,11 @@ class Be {
124
133
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, n), this.regExpQueue.push(e), n;
125
134
  }
126
135
  }
127
- const Je = [" ", ",", "?", "!", ";"], We = new Be(20), Qe = (r, e, t) => {
136
+ const We = [" ", ",", "?", "!", ";"], Qe = new Je(20), qe = (r, e, t) => {
128
137
  e = e || "", t = t || "";
129
- const n = Je.filter((a) => e.indexOf(a) < 0 && t.indexOf(a) < 0);
138
+ const n = We.filter((a) => e.indexOf(a) < 0 && t.indexOf(a) < 0);
130
139
  if (n.length === 0) return !0;
131
- const s = We.getRegExp(`(${n.map((a) => a === "?" ? "\\?" : a).join("|")})`);
140
+ const s = Qe.getRegExp(`(${n.map((a) => a === "?" ? "\\?" : a).join("|")})`);
132
141
  let i = !s.test(r);
133
142
  if (!i) {
134
143
  const a = r.indexOf(t);
@@ -156,7 +165,7 @@ const Je = [" ", ",", "?", "!", ";"], We = new Be(20), Qe = (r, e, t) => {
156
165
  s = a;
157
166
  }
158
167
  return s;
159
- }, q = (r) => r == null ? void 0 : r.replace("_", "-"), qe = {
168
+ }, q = (r) => r == null ? void 0 : r.replace("_", "-"), Ye = {
160
169
  type: "logger",
161
170
  log(r) {
162
171
  this.output("log", r);
@@ -179,7 +188,7 @@ class Y {
179
188
  }
180
189
  init(e) {
181
190
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
182
- this.prefix = t.prefix || "i18next:", this.logger = e || qe, this.options = t, this.debug = t.debug;
191
+ this.prefix = t.prefix || "i18next:", this.logger = e || Ye, this.options = t, this.debug = t.debug;
183
192
  }
184
193
  log() {
185
194
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
@@ -339,7 +348,7 @@ const fe = {}, de = (r) => !h(r) && typeof r != "boolean" && typeof r != "number
339
348
  class G extends Z {
340
349
  constructor(e) {
341
350
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
342
- super(), Ve(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = P.create("translator");
351
+ super(), Ue(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = P.create("translator");
343
352
  }
344
353
  changeLanguage(e) {
345
354
  e && (this.language = e);
@@ -358,7 +367,7 @@ class G extends Z {
358
367
  n === void 0 && (n = ":");
359
368
  const s = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
360
369
  let i = t.ns || this.options.defaultNS || [];
361
- const a = n && e.indexOf(n) > -1, l = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Qe(e, n, s);
370
+ const a = n && e.indexOf(n) > -1, l = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !qe(e, n, s);
362
371
  if (a && !l) {
363
372
  const o = e.match(this.interpolator.nestingRegexp);
364
373
  if (o && o.length > 0)
@@ -669,7 +678,7 @@ const ge = {
669
678
  pluralCategories: ["one", "other"]
670
679
  })
671
680
  };
672
- class Ye {
681
+ class Ge {
673
682
  constructor(e) {
674
683
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
675
684
  this.languageUtils = e, this.options = t, this.logger = P.create("pluralResolver"), this.pluralRulesCache = {};
@@ -721,10 +730,10 @@ class Ye {
721
730
  }
722
731
  }
723
732
  const pe = function(r, e, t) {
724
- let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, i = Me(r, e, t);
733
+ let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, i = He(r, e, t);
725
734
  return !i && s && h(t) && (i = ee(r, t, n), i === void 0 && (i = ee(e, t, n))), i;
726
735
  }, X = (r) => r.replace(/\$/g, "$$$$");
727
- class Ge {
736
+ class Ze {
728
737
  constructor() {
729
738
  var t;
730
739
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
@@ -754,7 +763,7 @@ class Ge {
754
763
  maxReplaces: b,
755
764
  alwaysFormat: w
756
765
  } = e.interpolation;
757
- this.escape = t !== void 0 ? t : ze, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = i ? I(i) : a || "{{", this.suffix = l ? I(l) : o || "}}", this.formatSeparator = u || ",", this.unescapePrefix = d ? "" : c || "-", this.unescapeSuffix = this.unescapePrefix ? "" : d || "", this.nestingPrefix = f ? I(f) : m || I("$t("), this.nestingSuffix = g ? I(g) : p || I(")"), this.nestingOptionsSeparator = x || ",", this.maxReplaces = b || 1e3, this.alwaysFormat = w !== void 0 ? w : !1, this.resetRegExp();
766
+ this.escape = t !== void 0 ? t : Be, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = i ? I(i) : a || "{{", this.suffix = l ? I(l) : o || "}}", this.formatSeparator = u || ",", this.unescapePrefix = d ? "" : c || "-", this.unescapeSuffix = this.unescapePrefix ? "" : d || "", this.nestingPrefix = f ? I(f) : m || I("$t("), this.nestingSuffix = g ? I(g) : p || I(")"), this.nestingOptionsSeparator = x || ",", this.maxReplaces = b || 1e3, this.alwaysFormat = w !== void 0 ? w : !1, this.resetRegExp();
758
767
  }
759
768
  reset() {
760
769
  this.options && this.init(this.options);
@@ -850,7 +859,7 @@ class Ge {
850
859
  return e;
851
860
  }
852
861
  }
853
- const Ze = (r) => {
862
+ const Xe = (r) => {
854
863
  let e = r.toLowerCase().trim();
855
864
  const t = {};
856
865
  if (r.indexOf("(") > -1) {
@@ -881,7 +890,7 @@ const Ze = (r) => {
881
890
  return l || (l = r(q(n), s), e[a] = l), l(t);
882
891
  };
883
892
  };
884
- class Xe {
893
+ class _e {
885
894
  constructor() {
886
895
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
887
896
  this.logger = P.create("formatter"), this.options = e, this.formats = {
@@ -942,7 +951,7 @@ class Xe {
942
951
  const {
943
952
  formatName: u,
944
953
  formatOptions: d
945
- } = Ze(o);
954
+ } = Xe(o);
946
955
  if (this.formats[u]) {
947
956
  let f = l;
948
957
  try {
@@ -962,10 +971,10 @@ class Xe {
962
971
  }, e);
963
972
  }
964
973
  }
965
- const _e = (r, e) => {
974
+ const et = (r, e) => {
966
975
  r.pending[e] !== void 0 && (delete r.pending[e], r.pendingCount--);
967
976
  };
968
- class et extends Z {
977
+ class tt extends Z {
969
978
  constructor(e, t, n) {
970
979
  var i, a;
971
980
  let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
@@ -999,7 +1008,7 @@ class et extends Z {
999
1008
  }), this.state[e] = t ? -1 : 2, t && n && (this.state[e] = 0);
1000
1009
  const l = {};
1001
1010
  this.queue.forEach((o) => {
1002
- Ke(o.loaded, [i], a), _e(o, e), t && o.errors.push(t), o.pendingCount === 0 && !o.done && (Object.keys(o.loaded).forEach((u) => {
1011
+ Me(o.loaded, [i], a), et(o, e), t && o.errors.push(t), o.pendingCount === 0 && !o.done && (Object.keys(o.loaded).forEach((u) => {
1003
1012
  l[u] || (l[u] = {});
1004
1013
  const d = o.loaded[u];
1005
1014
  d.length && d.forEach((c) => {
@@ -1162,7 +1171,7 @@ const me = () => ({
1162
1171
  var e, t;
1163
1172
  return h(r.ns) && (r.ns = [r.ns]), h(r.fallbackLng) && (r.fallbackLng = [r.fallbackLng]), h(r.fallbackNS) && (r.fallbackNS = [r.fallbackNS]), ((t = (e = r.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (r.supportedLngs = r.supportedLngs.concat(["cimode"])), typeof r.initImmediate == "boolean" && (r.initAsync = r.initImmediate), r;
1164
1173
  }, W = () => {
1165
- }, tt = (r) => {
1174
+ }, nt = (r) => {
1166
1175
  Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach((t) => {
1167
1176
  typeof r[t] == "function" && (r[t] = r[t].bind(r));
1168
1177
  });
@@ -1172,7 +1181,7 @@ class B extends Z {
1172
1181
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1173
1182
  if (super(), this.options = xe(e), this.services = {}, this.logger = P, this.modules = {
1174
1183
  external: []
1175
- }, tt(this), t && !this.isInitialized && !e.isClone) {
1184
+ }, nt(this), t && !this.isInitialized && !e.isClone) {
1176
1185
  if (!this.options.initAsync)
1177
1186
  return this.init(e, t), this;
1178
1187
  setTimeout(() => {
@@ -1197,16 +1206,16 @@ class B extends Z {
1197
1206
  if (!this.options.isClone) {
1198
1207
  this.modules.logger ? P.init(i(this.modules.logger), this.options) : P.init(null, this.options);
1199
1208
  let d;
1200
- this.modules.formatter ? d = this.modules.formatter : d = Xe;
1209
+ this.modules.formatter ? d = this.modules.formatter : d = _e;
1201
1210
  const c = new ce(this.options);
1202
1211
  this.store = new ue(this.options.resources, this.options);
1203
1212
  const f = this.services;
1204
- f.logger = P, f.resourceStore = this.store, f.languageUtils = c, f.pluralResolver = new Ye(c, {
1213
+ f.logger = P, f.resourceStore = this.store, f.languageUtils = c, f.pluralResolver = new Ge(c, {
1205
1214
  prepend: this.options.pluralSeparator,
1206
1215
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
1207
- }), d && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (f.formatter = i(d), f.formatter.init(f, this.options), this.options.interpolation.format = f.formatter.format.bind(f.formatter)), f.interpolator = new Ge(this.options), f.utils = {
1216
+ }), d && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (f.formatter = i(d), f.formatter.init(f, this.options), this.options.interpolation.format = f.formatter.format.bind(f.formatter)), f.interpolator = new Ze(this.options), f.utils = {
1208
1217
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1209
- }, f.backendConnector = new et(i(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", function(m) {
1218
+ }, f.backendConnector = new tt(i(this.modules.backend), f.resourceStore, f, this.options), f.backendConnector.on("*", function(m) {
1210
1219
  for (var g = arguments.length, p = new Array(g > 1 ? g - 1 : 0), x = 1; x < g; x++)
1211
1220
  p[x - 1] = arguments[x];
1212
1221
  e.emit(m, ...p);
@@ -1438,17 +1447,17 @@ S.hasLoadedNamespace;
1438
1447
  S.loadNamespaces;
1439
1448
  S.loadLanguages;
1440
1449
  const {
1441
- slice: nt,
1442
- forEach: st
1450
+ slice: st,
1451
+ forEach: it
1443
1452
  } = [];
1444
- function it(r) {
1445
- return st.call(nt.call(arguments, 1), (e) => {
1453
+ function rt(r) {
1454
+ return it.call(st.call(arguments, 1), (e) => {
1446
1455
  if (e)
1447
1456
  for (const t in e)
1448
1457
  r[t] === void 0 && (r[t] = e[t]);
1449
1458
  }), r;
1450
1459
  }
1451
- const ye = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, rt = function(r, e) {
1460
+ const ye = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, at = function(r, e) {
1452
1461
  const n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {
1453
1462
  path: "/"
1454
1463
  }, s = encodeURIComponent(e);
@@ -1497,7 +1506,7 @@ const ye = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, rt = function(r, e) {
1497
1506
  path: "/",
1498
1507
  sameSite: "strict"
1499
1508
  };
1500
- t && (s.expires = /* @__PURE__ */ new Date(), s.expires.setTime(s.expires.getTime() + t * 60 * 1e3)), n && (s.domain = n), document.cookie = rt(r, encodeURIComponent(e), s);
1509
+ t && (s.expires = /* @__PURE__ */ new Date(), s.expires.setTime(s.expires.getTime() + t * 60 * 1e3)), n && (s.domain = n), document.cookie = at(r, encodeURIComponent(e), s);
1501
1510
  },
1502
1511
  read(r) {
1503
1512
  const e = `${r}=`, t = document.cookie.split(";");
@@ -1512,7 +1521,7 @@ const ye = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/, rt = function(r, e) {
1512
1521
  this.create(r, "", -1);
1513
1522
  }
1514
1523
  };
1515
- var at = {
1524
+ var ot = {
1516
1525
  name: "cookie",
1517
1526
  // Deconstruct the options object and extract the lookupCookie property
1518
1527
  lookup(r) {
@@ -1532,7 +1541,7 @@ var at = {
1532
1541
  } = e;
1533
1542
  t && typeof document < "u" && Se.create(t, r, n, s, i);
1534
1543
  }
1535
- }, ot = {
1544
+ }, lt = {
1536
1545
  name: "querystring",
1537
1546
  // Deconstruct the options object and extract the lookupQuerystring property
1538
1547
  lookup(r) {
@@ -1567,7 +1576,7 @@ const be = () => {
1567
1576
  }
1568
1577
  return A;
1569
1578
  };
1570
- var lt = {
1579
+ var ut = {
1571
1580
  name: "localStorage",
1572
1581
  // Deconstruct the options object and extract the lookupLocalStorage property
1573
1582
  lookup(r) {
@@ -1598,7 +1607,7 @@ const we = () => {
1598
1607
  }
1599
1608
  return T;
1600
1609
  };
1601
- var ut = {
1610
+ var ft = {
1602
1611
  name: "sessionStorage",
1603
1612
  lookup(r) {
1604
1613
  let {
@@ -1613,7 +1622,7 @@ var ut = {
1613
1622
  } = e;
1614
1623
  t && we() && window.sessionStorage.setItem(t, r);
1615
1624
  }
1616
- }, ft = {
1625
+ }, dt = {
1617
1626
  name: "navigator",
1618
1627
  lookup(r) {
1619
1628
  const e = [];
@@ -1630,7 +1639,7 @@ var ut = {
1630
1639
  }
1631
1640
  return e.length > 0 ? e : void 0;
1632
1641
  }
1633
- }, dt = {
1642
+ }, ct = {
1634
1643
  name: "htmlTag",
1635
1644
  // Deconstruct the options object and extract the htmlTag property
1636
1645
  lookup(r) {
@@ -1640,7 +1649,7 @@ var ut = {
1640
1649
  const n = e || (typeof document < "u" ? document.documentElement : null);
1641
1650
  return n && typeof n.getAttribute == "function" && (t = n.getAttribute("lang")), t;
1642
1651
  }
1643
- }, ct = {
1652
+ }, gt = {
1644
1653
  name: "path",
1645
1654
  // Deconstruct the options object and extract the lookupFromPathIndex property
1646
1655
  lookup(r) {
@@ -1652,7 +1661,7 @@ var ut = {
1652
1661
  const t = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
1653
1662
  return Array.isArray(t) ? (s = t[typeof e == "number" ? e : 0]) == null ? void 0 : s.replace("/", "") : void 0;
1654
1663
  }
1655
- }, gt = {
1664
+ }, ht = {
1656
1665
  name: "subdomain",
1657
1666
  lookup(r) {
1658
1667
  var s, i;
@@ -1671,7 +1680,7 @@ try {
1671
1680
  }
1672
1681
  const ke = ["querystring", "cookie", "localStorage", "sessionStorage", "navigator", "htmlTag"];
1673
1682
  Ce || ke.splice(1, 1);
1674
- const ht = () => ({
1683
+ const pt = () => ({
1675
1684
  order: ke,
1676
1685
  lookupQuerystring: "lng",
1677
1686
  lookupCookie: "i18next",
@@ -1693,7 +1702,7 @@ class $e {
1693
1702
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
1694
1703
  languageUtils: {}
1695
1704
  }, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
1696
- this.services = e, this.options = it(t, this.options || {}, ht()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (s) => s.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = n, this.addDetector(at), this.addDetector(ot), this.addDetector(lt), this.addDetector(ut), this.addDetector(ft), this.addDetector(dt), this.addDetector(ct), this.addDetector(gt);
1705
+ this.services = e, this.options = rt(t, this.options || {}, pt()), typeof this.options.convertDetectedLanguage == "string" && this.options.convertDetectedLanguage.indexOf("15897") > -1 && (this.options.convertDetectedLanguage = (s) => s.replace("-", "_")), this.options.lookupFromUrlIndex && (this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex), this.i18nOptions = n, this.addDetector(ot), this.addDetector(lt), this.addDetector(ut), this.addDetector(ft), this.addDetector(dt), this.addDetector(ct), this.addDetector(gt), this.addDetector(ht);
1697
1706
  }
1698
1707
  addDetector(e) {
1699
1708
  return this.detectors[e.name] = e, this;
@@ -1715,10 +1724,10 @@ class $e {
1715
1724
  }
1716
1725
  }
1717
1726
  $e.type = "languageDetector";
1718
- const pt = S.createInstance();
1719
- pt.use($e).use(Te).init({
1727
+ const mt = S.createInstance();
1728
+ mt.use($e).use(Ve).init({
1720
1729
  lng: "en",
1721
- fallbackLng: "en",
1730
+ fallbackLng: Ee,
1722
1731
  debug: !0,
1723
1732
  resources: {
1724
1733
  en: { translation: Re },
@@ -1733,7 +1742,8 @@ pt.use($e).use(Te).init({
1733
1742
  }
1734
1743
  });
1735
1744
  export {
1736
- St as a,
1737
- bt as g,
1738
- pt as i
1745
+ wt as a,
1746
+ Ot as g,
1747
+ mt as i,
1748
+ bt as t
1739
1749
  };
package/dist/i18n.js CHANGED
@@ -1,4 +1,4 @@
1
- import { i as p } from "./i18n-BfBMXJfT.js";
1
+ import { i as p } from "./i18n-DIprVS_u.js";
2
2
  import "./locales/en-US.js";
3
3
  import "./locales/es-MX.js";
4
4
  import "./locales/tr-TR.js";