@feedmepos/mf-connect 0.1.98-beta.15 → 0.1.98-beta.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/dist/App-DNXDhULP.js +4782 -0
  2. package/dist/AuditLogs-BNS27IJT.js +2013 -0
  3. package/dist/Bin-Dkjyrbz-.js +166 -0
  4. package/dist/Broadcast-B-fpjVzY.js +266 -0
  5. package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-qBcG-vPM.js +120 -0
  6. package/dist/Card-BvVHO8kN.js +910 -0
  7. package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
  8. package/dist/Collections-BLxPSOJl.js +540 -0
  9. package/dist/Credit-DU-stilH.js +260 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bqnb00zk.js +3377 -0
  13. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-CTSfEq5N.js +351 -0
  14. package/dist/Experience-C3tB8hTp.js +259 -0
  15. package/dist/FileSaver.min-EIworvUf.js +74 -0
  16. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  17. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  18. package/dist/Game-Dq1ms2fA.js +330 -0
  19. package/dist/Grab-DnSO2oLx.js +300 -0
  20. package/dist/ImageInput.vue_vue_type_script_setup_true_lang-n1r2bgOE.js +145 -0
  21. package/dist/Index-BFIHgW9W.js +259 -0
  22. package/dist/JsonViewer-v8_C7l5N.js +87 -0
  23. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-Do7CJZuh.js +48 -0
  24. package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-vpJmHgKM.js +18737 -0
  25. package/dist/LoyaltyDashboard-CcBogXzl.js +1082 -0
  26. package/dist/MainLayout-CPNiL_et.js +41 -0
  27. package/dist/Marketing-Bzb1VaVA.js +235 -0
  28. package/dist/MarketingMaterialEdit-8UQNx3mV.js +1035 -0
  29. package/dist/Member-Drb_NVrb.js +280 -0
  30. package/dist/MemberList-wa3JxCVr.js +1601 -0
  31. package/dist/MemberOverview-wL_ailso.js +58 -0
  32. package/dist/MemberTransactions-8qlm-T67.js +45 -0
  33. package/dist/MessageInput.vue_vue_type_script_setup_true_lang-BHicaUXs.js +60802 -0
  34. package/dist/Mission-DmWbQmOv.js +334 -0
  35. package/dist/Overview-COEFtf12.js +1079 -0
  36. package/dist/Overview-D7ki-aBA.js +969 -0
  37. package/dist/Point-B0W-BcPA.js +262 -0
  38. package/dist/Promotion-CY16SjmK.js +397 -0
  39. package/dist/Queue-hMur40Xc.js +260 -0
  40. package/dist/Record-Bj7GQP1r.js +342 -0
  41. package/dist/Review-Z1XD6bJK.js +45 -0
  42. package/dist/ReviewFacebookCallback-DirGtKLX.js +248 -0
  43. package/dist/ReviewGoogleCallback-CVC6741e.js +213 -0
  44. package/dist/Reward-DDB5Usau.js +442 -0
  45. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-B-OnKAbx.js +149 -0
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DDHM8NLi.js +1911 -0
  47. package/dist/Segment-Bl0k9fvJ.js +1014 -0
  48. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-C33DPiN6.js +181 -0
  49. package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-YMpQ-IiW.js +188 -0
  50. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang--Rtf3gRa.js +226 -0
  51. package/dist/Setting-CpD98E2N.js +2047 -0
  52. package/dist/SettingAdvertisements-BZFQu_HI.js +264 -0
  53. package/dist/Settings-CRqlKNsc.js +228 -0
  54. package/dist/Store-CDG2_iqc.js +1996 -0
  55. package/dist/StoreRewards-DIU5hPXv.js +540 -0
  56. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-B82RH_ZC.js +1133 -0
  57. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DKGCmk5y.js +7007 -0
  58. package/dist/Tier-BXgIdYDa.js +969 -0
  59. package/dist/Title-DgHxyV8p.js +566 -0
  60. package/dist/Transaction-iDacnm6Y.js +39 -0
  61. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-RUbR6pdK.js +130 -0
  62. package/dist/Voucher-C-I8JK4F.js +421 -0
  63. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BUpYZxij.js +421 -0
  64. package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-LhG5jJq3.js +56 -0
  65. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  66. package/dist/app-CyNzTZOx.js +59950 -0
  67. package/dist/app-wDQR6dpb.js +39 -0
  68. package/dist/app.js +7 -0
  69. package/dist/business-o_sAO_33.js +82 -0
  70. package/dist/campaign--IUcyI8h.js +219 -0
  71. package/dist/campaign-CpzFl8Vr.js +4 -0
  72. package/dist/campaign-zLKyql03.js +277 -0
  73. package/dist/campaign.enum-CEbNgaGZ.js +26 -0
  74. package/dist/campaign.fn-BVT0m6Uy.js +776 -0
  75. package/dist/collectible.enum-2y8KIQLL.js +19 -0
  76. package/dist/duplicateCampaign-DIzdQf0e.js +51 -0
  77. package/dist/effect-B6gKaH4T.js +89 -0
  78. package/dist/email-addresses-CO9GNnUN.js +705 -0
  79. package/dist/export-DdDpRFVg.js +97 -0
  80. package/dist/feedme.ico +0 -0
  81. package/dist/google-BQK68wbe.js +5 -0
  82. package/dist/helper-DqypCsTm.js +86 -0
  83. package/dist/index-BK0OmX3R.js +85 -0
  84. package/dist/index-Bc7JXl59.js +54 -0
  85. package/dist/index-BgiIGrLb.js +32 -0
  86. package/dist/index-C-TiT9bf.js +1157 -0
  87. package/dist/index-COXmoOd1.js +3678 -0
  88. package/dist/index-CT6uJJ9y.js +151 -0
  89. package/dist/index-Ci2gFCfD.js +61 -0
  90. package/dist/index-CtJ0MQQ1.js +3 -0
  91. package/dist/index-CuvNtC_M.js +61 -0
  92. package/dist/index-D41Xq5qY.js +8910 -0
  93. package/dist/index-DBD_e_yR.js +31 -0
  94. package/dist/index-DDpz9LmI.js +67 -0
  95. package/dist/index-Dh2apeby.js +2819 -0
  96. package/dist/index-DiDmMG_M.js +28900 -0
  97. package/dist/index-pjXQwa0j.js +30289 -0
  98. package/dist/index-vh86FiIQ.js +10 -0
  99. package/dist/index.esm2017-Cd4FhecE.js +3069 -0
  100. package/dist/loading-D-RglDMV.js +72 -0
  101. package/dist/lodash-cggYhL9V.js +3678 -0
  102. package/dist/membership-DTfMyKwP.js +255 -0
  103. package/dist/moment-D7p2TMB-.js +2583 -0
  104. package/dist/money-fGZfbdgV.js +15 -0
  105. package/dist/number-BOalh3ZH.js +12 -0
  106. package/dist/object-BYyQ0PZp.js +18 -0
  107. package/dist/objectId-dwaoBfJX.js +7 -0
  108. package/dist/objectid-zPJFVngY.js +145 -0
  109. package/dist/plugins-CbpvMMOJ.js +1788 -0
  110. package/dist/reward-DkVAHEq2.js +36 -0
  111. package/dist/rule-EzWg2u8d.js +1969 -0
  112. package/dist/string-Gcy5IM_H.js +32 -0
  113. package/dist/style.css +4 -0
  114. package/dist/template-BfVFq4on.js +188 -0
  115. package/dist/tier-BJDhpH6X.js +4 -0
  116. package/dist/tiers/tier=1.png +0 -0
  117. package/dist/tiers/tier=2.png +0 -0
  118. package/dist/tiers/tier=3.png +0 -0
  119. package/dist/tiers/tier=4.png +0 -0
  120. package/dist/titles/type=diamond.png +0 -0
  121. package/dist/titles/type=drinks.png +0 -0
  122. package/dist/titles/type=food.png +0 -0
  123. package/dist/titles/type=heart.png +0 -0
  124. package/dist/titles/type=medal.png +0 -0
  125. package/dist/titles/type=spend.png +0 -0
  126. package/dist/titles/type=thank-you.png +0 -0
  127. package/dist/titles/type=thumbs-up.png +0 -0
  128. package/dist/titles/type=years.png +0 -0
  129. package/dist/trigger-es-_uiSg.js +213 -0
  130. package/dist/tslib.es6-BCqqvLQ_.js +44 -0
  131. package/dist/type_drinks-D6jnpvwV.js +4 -0
  132. package/dist/useMarketingMaterialActions-CpiIKMmG.js +107 -0
  133. package/dist/usePagination-SYsXgU6x.js +220 -0
  134. package/dist/user-DUe40u3g.js +55 -0
  135. package/dist/vue-i18n-Dn9zxRuv.js +2365 -0
  136. package/dist/xlsx-DugGi7dB.js +15491 -0
  137. package/dist/zod-Dw8_B6RC.js +91 -0
  138. package/package.json +1 -1
@@ -0,0 +1,1788 @@
1
+ import { u as fe, v as ge, x as Ee, w as Ie, y as Fe } from "./index.esm2017-Cd4FhecE.js";
2
+ import { u as oe } from "./app-wDQR6dpb.js";
3
+ import { e as Ae, Z as O, d as de, i as ke, z as De } from "./app-CyNzTZOx.js";
4
+ import { detectLocale as Te, createFeedMeI18n as Ke } from "@feedmepos/mf-common";
5
+ import { S as k } from "./index-DiDmMG_M.js";
6
+ var b = [];
7
+ for (var ee = 0; ee < 256; ++ee)
8
+ b.push((ee + 256).toString(16).slice(1));
9
+ function Me(n, e = 0) {
10
+ return (b[n[e + 0]] + b[n[e + 1]] + b[n[e + 2]] + b[n[e + 3]] + "-" + b[n[e + 4]] + b[n[e + 5]] + "-" + b[n[e + 6]] + b[n[e + 7]] + "-" + b[n[e + 8]] + b[n[e + 9]] + "-" + b[n[e + 10]] + b[n[e + 11]] + b[n[e + 12]] + b[n[e + 13]] + b[n[e + 14]] + b[n[e + 15]]).toLowerCase();
11
+ }
12
+ var _, Ue = new Uint8Array(16);
13
+ function He() {
14
+ if (!_ && (_ = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !_))
15
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
16
+ return _(Ue);
17
+ }
18
+ var te, W, se = 0, ie = 0;
19
+ function Be(n, e, t) {
20
+ var s = e && t || 0, i = e || new Array(16);
21
+ n = n || {};
22
+ var r = n.node, a = n.clockseq;
23
+ if (n._v6 || (r || (r = te), a == null && (a = W)), r == null || a == null) {
24
+ var o = n.random || (n.rng || He)();
25
+ r == null && (r = [o[0], o[1], o[2], o[3], o[4], o[5]], !te && !n._v6 && (r[0] |= 1, te = r)), a == null && (a = (o[6] << 8 | o[7]) & 16383, W === void 0 && !n._v6 && (W = a));
26
+ }
27
+ var l = n.msecs !== void 0 ? n.msecs : Date.now(), u = n.nsecs !== void 0 ? n.nsecs : ie + 1, h = l - se + (u - ie) / 1e4;
28
+ if (h < 0 && n.clockseq === void 0 && (a = a + 1 & 16383), (h < 0 || l > se) && n.nsecs === void 0 && (u = 0), u >= 1e4)
29
+ throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
30
+ se = l, ie = u, W = a, l += 122192928e5;
31
+ var f = ((l & 268435455) * 1e4 + u) % 4294967296;
32
+ i[s++] = f >>> 24 & 255, i[s++] = f >>> 16 & 255, i[s++] = f >>> 8 & 255, i[s++] = f & 255;
33
+ var c = l / 4294967296 * 1e4 & 268435455;
34
+ i[s++] = c >>> 8 & 255, i[s++] = c & 255, i[s++] = c >>> 24 & 15 | 16, i[s++] = c >>> 16 & 255, i[s++] = a >>> 8 | 128, i[s++] = a & 255;
35
+ for (var p = 0; p < 6; ++p)
36
+ i[s + p] = r[p];
37
+ return e || Me(i);
38
+ }
39
+ const d = (n) => typeof n == "string", H = () => {
40
+ let n, e;
41
+ const t = new Promise((s, i) => {
42
+ n = s, e = i;
43
+ });
44
+ return t.resolve = n, t.reject = e, t;
45
+ }, pe = (n) => n == null ? "" : "" + n, ze = (n, e, t) => {
46
+ n.forEach((s) => {
47
+ e[s] && (t[s] = e[s]);
48
+ });
49
+ }, Je = /###/g, me = (n) => n && n.indexOf("###") > -1 ? n.replace(Je, ".") : n, ve = (n) => !n || d(n), B = (n, e, t) => {
50
+ const s = d(e) ? e.split(".") : e;
51
+ let i = 0;
52
+ for (; i < s.length - 1; ) {
53
+ if (ve(n)) return {};
54
+ const r = me(s[i]);
55
+ !n[r] && t && (n[r] = new t()), Object.prototype.hasOwnProperty.call(n, r) ? n = n[r] : n = {}, ++i;
56
+ }
57
+ return ve(n) ? {} : {
58
+ obj: n,
59
+ k: me(s[i])
60
+ };
61
+ }, xe = (n, e, t) => {
62
+ const {
63
+ obj: s,
64
+ k: i
65
+ } = B(n, e, Object);
66
+ if (s !== void 0 || e.length === 1) {
67
+ s[i] = t;
68
+ return;
69
+ }
70
+ let r = e[e.length - 1], a = e.slice(0, e.length - 1), o = B(n, a, Object);
71
+ for (; o.obj === void 0 && a.length; )
72
+ r = `${a[a.length - 1]}.${r}`, a = a.slice(0, a.length - 1), o = B(n, a, Object), o != null && o.obj && typeof o.obj[`${o.k}.${r}`] < "u" && (o.obj = void 0);
73
+ o.obj[`${o.k}.${r}`] = t;
74
+ }, _e = (n, e, t, s) => {
75
+ const {
76
+ obj: i,
77
+ k: r
78
+ } = B(n, e, Object);
79
+ i[r] = i[r] || [], i[r].push(t);
80
+ }, Y = (n, e) => {
81
+ const {
82
+ obj: t,
83
+ k: s
84
+ } = B(n, e);
85
+ if (t && Object.prototype.hasOwnProperty.call(t, s))
86
+ return t[s];
87
+ }, We = (n, e, t) => {
88
+ const s = Y(n, t);
89
+ return s !== void 0 ? s : Y(e, t);
90
+ }, Ne = (n, e, t) => {
91
+ for (const s in e)
92
+ s !== "__proto__" && s !== "constructor" && (s in n ? d(n[s]) || n[s] instanceof String || d(e[s]) || e[s] instanceof String ? t && (n[s] = e[s]) : Ne(n[s], e[s], t) : n[s] = e[s]);
93
+ return n;
94
+ }, F = (n) => n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
95
+ var Ze = {
96
+ "&": "&amp;",
97
+ "<": "&lt;",
98
+ ">": "&gt;",
99
+ '"': "&quot;",
100
+ "'": "&#39;",
101
+ "/": "&#x2F;"
102
+ };
103
+ const Ye = (n) => d(n) ? n.replace(/[&<>"'\/]/g, (e) => Ze[e]) : n;
104
+ class Qe {
105
+ constructor(e) {
106
+ this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
107
+ }
108
+ getRegExp(e) {
109
+ const t = this.regExpMap.get(e);
110
+ if (t !== void 0)
111
+ return t;
112
+ const s = new RegExp(e);
113
+ return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, s), this.regExpQueue.push(e), s;
114
+ }
115
+ }
116
+ const Ge = [" ", ",", "?", "!", ";"], qe = new Qe(20), Xe = (n, e, t) => {
117
+ e = e || "", t = t || "";
118
+ const s = Ge.filter((a) => e.indexOf(a) < 0 && t.indexOf(a) < 0);
119
+ if (s.length === 0) return !0;
120
+ const i = qe.getRegExp(`(${s.map((a) => a === "?" ? "\\?" : a).join("|")})`);
121
+ let r = !i.test(n);
122
+ if (!r) {
123
+ const a = n.indexOf(t);
124
+ a > 0 && !i.test(n.substring(0, a)) && (r = !0);
125
+ }
126
+ return r;
127
+ }, ae = function(n, e) {
128
+ let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
129
+ if (!n) return;
130
+ if (n[e])
131
+ return Object.prototype.hasOwnProperty.call(n, e) ? n[e] : void 0;
132
+ const s = e.split(t);
133
+ let i = n;
134
+ for (let r = 0; r < s.length; ) {
135
+ if (!i || typeof i != "object")
136
+ return;
137
+ let a, o = "";
138
+ for (let l = r; l < s.length; ++l)
139
+ if (l !== r && (o += t), o += s[l], a = i[o], a !== void 0) {
140
+ if (["string", "number", "boolean"].indexOf(typeof a) > -1 && l < s.length - 1)
141
+ continue;
142
+ r += l - r + 1;
143
+ break;
144
+ }
145
+ i = a;
146
+ }
147
+ return i;
148
+ }, Q = (n) => n == null ? void 0 : n.replace("_", "-"), et = {
149
+ type: "logger",
150
+ log(n) {
151
+ this.output("log", n);
152
+ },
153
+ warn(n) {
154
+ this.output("warn", n);
155
+ },
156
+ error(n) {
157
+ this.output("error", n);
158
+ },
159
+ output(n, e) {
160
+ var t, s;
161
+ (s = (t = console == null ? void 0 : console[n]) == null ? void 0 : t.apply) == null || s.call(t, console, e);
162
+ }
163
+ };
164
+ class G {
165
+ constructor(e) {
166
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
167
+ this.init(e, t);
168
+ }
169
+ init(e) {
170
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
171
+ this.prefix = t.prefix || "i18next:", this.logger = e || et, this.options = t, this.debug = t.debug;
172
+ }
173
+ log() {
174
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
175
+ t[s] = arguments[s];
176
+ return this.forward(t, "log", "", !0);
177
+ }
178
+ warn() {
179
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
180
+ t[s] = arguments[s];
181
+ return this.forward(t, "warn", "", !0);
182
+ }
183
+ error() {
184
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
185
+ t[s] = arguments[s];
186
+ return this.forward(t, "error", "");
187
+ }
188
+ deprecate() {
189
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
190
+ t[s] = arguments[s];
191
+ return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
192
+ }
193
+ forward(e, t, s, i) {
194
+ return i && !this.debug ? null : (d(e[0]) && (e[0] = `${s}${this.prefix} ${e[0]}`), this.logger[t](e));
195
+ }
196
+ create(e) {
197
+ return new G(this.logger, {
198
+ prefix: `${this.prefix}:${e}:`,
199
+ ...this.options
200
+ });
201
+ }
202
+ clone(e) {
203
+ return e = e || this.options, e.prefix = e.prefix || this.prefix, new G(this.logger, e);
204
+ }
205
+ }
206
+ var P = new G();
207
+ class X {
208
+ constructor() {
209
+ this.observers = {};
210
+ }
211
+ on(e, t) {
212
+ return e.split(" ").forEach((s) => {
213
+ this.observers[s] || (this.observers[s] = /* @__PURE__ */ new Map());
214
+ const i = this.observers[s].get(t) || 0;
215
+ this.observers[s].set(t, i + 1);
216
+ }), this;
217
+ }
218
+ off(e, t) {
219
+ if (this.observers[e]) {
220
+ if (!t) {
221
+ delete this.observers[e];
222
+ return;
223
+ }
224
+ this.observers[e].delete(t);
225
+ }
226
+ }
227
+ emit(e) {
228
+ for (var t = arguments.length, s = new Array(t > 1 ? t - 1 : 0), i = 1; i < t; i++)
229
+ s[i - 1] = arguments[i];
230
+ this.observers[e] && Array.from(this.observers[e].entries()).forEach((a) => {
231
+ let [o, l] = a;
232
+ for (let u = 0; u < l; u++)
233
+ o(...s);
234
+ }), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((a) => {
235
+ let [o, l] = a;
236
+ for (let u = 0; u < l; u++)
237
+ o.apply(o, [e, ...s]);
238
+ });
239
+ }
240
+ }
241
+ class ye extends X {
242
+ constructor(e) {
243
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
244
+ ns: ["translation"],
245
+ defaultNS: "translation"
246
+ };
247
+ super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
248
+ }
249
+ addNamespaces(e) {
250
+ this.options.ns.indexOf(e) < 0 && this.options.ns.push(e);
251
+ }
252
+ removeNamespaces(e) {
253
+ const t = this.options.ns.indexOf(e);
254
+ t > -1 && this.options.ns.splice(t, 1);
255
+ }
256
+ getResource(e, t, s) {
257
+ var u, h;
258
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
259
+ const r = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, a = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
260
+ let o;
261
+ e.indexOf(".") > -1 ? o = e.split(".") : (o = [e, t], s && (Array.isArray(s) ? o.push(...s) : d(s) && r ? o.push(...s.split(r)) : o.push(s)));
262
+ const l = Y(this.data, o);
263
+ return !l && !t && !s && e.indexOf(".") > -1 && (e = o[0], t = o[1], s = o.slice(2).join(".")), l || !a || !d(s) ? l : ae((h = (u = this.data) == null ? void 0 : u[e]) == null ? void 0 : h[t], s, r);
264
+ }
265
+ addResource(e, t, s, i) {
266
+ let r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
267
+ silent: !1
268
+ };
269
+ const a = r.keySeparator !== void 0 ? r.keySeparator : this.options.keySeparator;
270
+ let o = [e, t];
271
+ s && (o = o.concat(a ? s.split(a) : s)), e.indexOf(".") > -1 && (o = e.split("."), i = t, t = o[1]), this.addNamespaces(t), xe(this.data, o, i), r.silent || this.emit("added", e, t, s, i);
272
+ }
273
+ addResources(e, t, s) {
274
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {
275
+ silent: !1
276
+ };
277
+ for (const r in s)
278
+ (d(s[r]) || Array.isArray(s[r])) && this.addResource(e, t, r, s[r], {
279
+ silent: !0
280
+ });
281
+ i.silent || this.emit("added", e, t, s);
282
+ }
283
+ addResourceBundle(e, t, s, i, r) {
284
+ let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {
285
+ silent: !1,
286
+ skipCopy: !1
287
+ }, o = [e, t];
288
+ e.indexOf(".") > -1 && (o = e.split("."), i = s, s = t, t = o[1]), this.addNamespaces(t);
289
+ let l = Y(this.data, o) || {};
290
+ a.skipCopy || (s = JSON.parse(JSON.stringify(s))), i ? Ne(l, s, r) : l = {
291
+ ...l,
292
+ ...s
293
+ }, xe(this.data, o, l), a.silent || this.emit("added", e, t, s);
294
+ }
295
+ removeResourceBundle(e, t) {
296
+ this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
297
+ }
298
+ hasResourceBundle(e, t) {
299
+ return this.getResource(e, t) !== void 0;
300
+ }
301
+ getResourceBundle(e, t) {
302
+ return t || (t = this.options.defaultNS), this.getResource(e, t);
303
+ }
304
+ getDataByLanguage(e) {
305
+ return this.data[e];
306
+ }
307
+ hasLanguageSomeTranslations(e) {
308
+ const t = this.getDataByLanguage(e);
309
+ return !!(t && Object.keys(t) || []).find((i) => t[i] && Object.keys(t[i]).length > 0);
310
+ }
311
+ toJSON() {
312
+ return this.data;
313
+ }
314
+ }
315
+ var Ve = {
316
+ processors: {},
317
+ addPostProcessor(n) {
318
+ this.processors[n.name] = n;
319
+ },
320
+ handle(n, e, t, s, i) {
321
+ return n.forEach((r) => {
322
+ var a;
323
+ e = ((a = this.processors[r]) == null ? void 0 : a.process(e, t, s, i)) ?? e;
324
+ }), e;
325
+ }
326
+ };
327
+ const be = {};
328
+ class q extends X {
329
+ constructor(e) {
330
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
331
+ super(), ze(["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");
332
+ }
333
+ changeLanguage(e) {
334
+ e && (this.language = e);
335
+ }
336
+ exists(e) {
337
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
338
+ interpolation: {}
339
+ };
340
+ if (e == null)
341
+ return !1;
342
+ const s = this.resolve(e, t);
343
+ return (s == null ? void 0 : s.res) !== void 0;
344
+ }
345
+ extractFromKey(e, t) {
346
+ let s = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
347
+ s === void 0 && (s = ":");
348
+ const i = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
349
+ let r = t.ns || this.options.defaultNS || [];
350
+ const a = s && e.indexOf(s) > -1, o = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Xe(e, s, i);
351
+ if (a && !o) {
352
+ const l = e.match(this.interpolator.nestingRegexp);
353
+ if (l && l.length > 0)
354
+ return {
355
+ key: e,
356
+ namespaces: d(r) ? [r] : r
357
+ };
358
+ const u = e.split(s);
359
+ (s !== i || s === i && this.options.ns.indexOf(u[0]) > -1) && (r = u.shift()), e = u.join(i);
360
+ }
361
+ return {
362
+ key: e,
363
+ namespaces: d(r) ? [r] : r
364
+ };
365
+ }
366
+ translate(e, t, s) {
367
+ if (typeof t != "object" && this.options.overloadTranslationOptionHandler && (t = this.options.overloadTranslationOptionHandler(arguments)), typeof t == "object" && (t = {
368
+ ...t
369
+ }), t || (t = {}), e == null) return "";
370
+ Array.isArray(e) || (e = [String(e)]);
371
+ const i = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, r = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
372
+ key: a,
373
+ namespaces: o
374
+ } = this.extractFromKey(e[e.length - 1], t), l = o[o.length - 1], u = t.lng || this.language, h = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
375
+ if ((u == null ? void 0 : u.toLowerCase()) === "cimode") {
376
+ if (h) {
377
+ const x = t.nsSeparator || this.options.nsSeparator;
378
+ return i ? {
379
+ res: `${l}${x}${a}`,
380
+ usedKey: a,
381
+ exactUsedKey: a,
382
+ usedLng: u,
383
+ usedNS: l,
384
+ usedParams: this.getUsedParamsDetails(t)
385
+ } : `${l}${x}${a}`;
386
+ }
387
+ return i ? {
388
+ res: a,
389
+ usedKey: a,
390
+ exactUsedKey: a,
391
+ usedLng: u,
392
+ usedNS: l,
393
+ usedParams: this.getUsedParamsDetails(t)
394
+ } : a;
395
+ }
396
+ const f = this.resolve(e, t);
397
+ let c = f == null ? void 0 : f.res;
398
+ const p = (f == null ? void 0 : f.usedKey) || a, g = (f == null ? void 0 : f.exactUsedKey) || a, m = Object.prototype.toString.apply(c), v = ["[object Number]", "[object Function]", "[object RegExp]"], w = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, C = !this.i18nFormat || this.i18nFormat.handleAsObject, E = !d(c) && typeof c != "boolean" && typeof c != "number";
399
+ if (C && c && E && v.indexOf(m) < 0 && !(d(w) && Array.isArray(c))) {
400
+ if (!t.returnObjects && !this.options.returnObjects) {
401
+ this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
402
+ const x = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(p, c, {
403
+ ...t,
404
+ ns: o
405
+ }) : `key '${a} (${this.language})' returned an object instead of string.`;
406
+ return i ? (f.res = x, f.usedParams = this.getUsedParamsDetails(t), f) : x;
407
+ }
408
+ if (r) {
409
+ const x = Array.isArray(c), L = x ? [] : {}, R = x ? g : p;
410
+ for (const y in c)
411
+ if (Object.prototype.hasOwnProperty.call(c, y)) {
412
+ const N = `${R}${r}${y}`;
413
+ L[y] = this.translate(N, {
414
+ ...t,
415
+ joinArrays: !1,
416
+ ns: o
417
+ }), L[y] === N && (L[y] = c[y]);
418
+ }
419
+ c = L;
420
+ }
421
+ } else if (C && d(w) && Array.isArray(c))
422
+ c = c.join(w), c && (c = this.extendTranslation(c, e, t, s));
423
+ else {
424
+ let x = !1, L = !1;
425
+ const R = t.count !== void 0 && !d(t.count), y = q.hasDefaultValue(t), N = R ? this.pluralResolver.getSuffix(u, t.count, t) : "", I = t.ordinal && R ? this.pluralResolver.getSuffix(u, t.count, {
426
+ ordinal: !1
427
+ }) : "", V = R && !t.ordinal && t.count === 0, T = V && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${N}`] || t[`defaultValue${I}`] || t.defaultValue;
428
+ !this.isValidLookup(c) && y && (x = !0, c = T), this.isValidLookup(c) || (L = !0, c = a);
429
+ const je = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && L ? void 0 : c, K = y && T !== c && this.options.updateMissing;
430
+ if (L || x || K) {
431
+ if (this.logger.log(K ? "updateKey" : "missingKey", u, l, a, K ? T : c), r) {
432
+ const $ = this.resolve(a, {
433
+ ...t,
434
+ keySeparator: !1
435
+ });
436
+ $ && $.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
437
+ }
438
+ let M = [];
439
+ const J = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
440
+ if (this.options.saveMissingTo === "fallback" && J && J[0])
441
+ for (let $ = 0; $ < J.length; $++)
442
+ M.push(J[$]);
443
+ else this.options.saveMissingTo === "all" ? M = this.languageUtils.toResolveHierarchy(t.lng || this.language) : M.push(t.lng || this.language);
444
+ const ue = ($, j, U) => {
445
+ var he;
446
+ const ce = y && U !== c ? U : je;
447
+ this.options.missingKeyHandler ? this.options.missingKeyHandler($, l, j, ce, K, t) : (he = this.backendConnector) != null && he.saveMissing && this.backendConnector.saveMissing($, l, j, ce, K, t), this.emit("missingKey", $, l, j, c);
448
+ };
449
+ this.options.saveMissing && (this.options.saveMissingPlurals && R ? M.forEach(($) => {
450
+ const j = this.pluralResolver.getSuffixes($, t);
451
+ V && t[`defaultValue${this.options.pluralSeparator}zero`] && j.indexOf(`${this.options.pluralSeparator}zero`) < 0 && j.push(`${this.options.pluralSeparator}zero`), j.forEach((U) => {
452
+ ue([$], a + U, t[`defaultValue${U}`] || T);
453
+ });
454
+ }) : ue(M, a, T));
455
+ }
456
+ c = this.extendTranslation(c, e, t, f, s), L && c === a && this.options.appendNamespaceToMissingKey && (c = `${l}:${a}`), (L || x) && this.options.parseMissingKeyHandler && (c = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}:${a}` : a, x ? c : void 0));
457
+ }
458
+ return i ? (f.res = c, f.usedParams = this.getUsedParamsDetails(t), f) : c;
459
+ }
460
+ extendTranslation(e, t, s, i, r) {
461
+ var u, h;
462
+ var a = this;
463
+ if ((u = this.i18nFormat) != null && u.parse)
464
+ e = this.i18nFormat.parse(e, {
465
+ ...this.options.interpolation.defaultVariables,
466
+ ...s
467
+ }, s.lng || this.language || i.usedLng, i.usedNS, i.usedKey, {
468
+ resolved: i
469
+ });
470
+ else if (!s.skipInterpolation) {
471
+ s.interpolation && this.interpolator.init({
472
+ ...s,
473
+ interpolation: {
474
+ ...this.options.interpolation,
475
+ ...s.interpolation
476
+ }
477
+ });
478
+ const f = d(e) && (((h = s == null ? void 0 : s.interpolation) == null ? void 0 : h.skipOnVariables) !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
479
+ let c;
480
+ if (f) {
481
+ const g = e.match(this.interpolator.nestingRegexp);
482
+ c = g && g.length;
483
+ }
484
+ let p = s.replace && !d(s.replace) ? s.replace : s;
485
+ if (this.options.interpolation.defaultVariables && (p = {
486
+ ...this.options.interpolation.defaultVariables,
487
+ ...p
488
+ }), e = this.interpolator.interpolate(e, p, s.lng || this.language || i.usedLng, s), f) {
489
+ const g = e.match(this.interpolator.nestingRegexp), m = g && g.length;
490
+ c < m && (s.nest = !1);
491
+ }
492
+ !s.lng && i && i.res && (s.lng = this.language || i.usedLng), s.nest !== !1 && (e = this.interpolator.nest(e, function() {
493
+ for (var g = arguments.length, m = new Array(g), v = 0; v < g; v++)
494
+ m[v] = arguments[v];
495
+ return (r == null ? void 0 : r[0]) === m[0] && !s.context ? (a.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${t[0]}`), null) : a.translate(...m, t);
496
+ }, s)), s.interpolation && this.interpolator.reset();
497
+ }
498
+ const o = s.postProcess || this.options.postProcess, l = d(o) ? [o] : o;
499
+ return e != null && (l != null && l.length) && s.applyPostProcessor !== !1 && (e = Ve.handle(l, e, t, this.options && this.options.postProcessPassResolved ? {
500
+ i18nResolved: {
501
+ ...i,
502
+ usedParams: this.getUsedParamsDetails(s)
503
+ },
504
+ ...s
505
+ } : s, this)), e;
506
+ }
507
+ resolve(e) {
508
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s, i, r, a, o;
509
+ return d(e) && (e = [e]), e.forEach((l) => {
510
+ if (this.isValidLookup(s)) return;
511
+ const u = this.extractFromKey(l, t), h = u.key;
512
+ i = h;
513
+ let f = u.namespaces;
514
+ this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
515
+ const c = t.count !== void 0 && !d(t.count), p = c && !t.ordinal && t.count === 0, g = t.context !== void 0 && (d(t.context) || typeof t.context == "number") && t.context !== "", m = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
516
+ f.forEach((v) => {
517
+ var w, C;
518
+ this.isValidLookup(s) || (o = v, !be[`${m[0]}-${v}`] && ((w = this.utils) != null && w.hasLoadedNamespace) && !((C = this.utils) != null && C.hasLoadedNamespace(o)) && (be[`${m[0]}-${v}`] = !0, this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${o}" 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!!!")), m.forEach((E) => {
519
+ var R;
520
+ if (this.isValidLookup(s)) return;
521
+ a = E;
522
+ const x = [h];
523
+ if ((R = this.i18nFormat) != null && R.addLookupKeys)
524
+ this.i18nFormat.addLookupKeys(x, h, E, v, t);
525
+ else {
526
+ let y;
527
+ c && (y = this.pluralResolver.getSuffix(E, t.count, t));
528
+ const N = `${this.options.pluralSeparator}zero`, I = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
529
+ if (c && (x.push(h + y), t.ordinal && y.indexOf(I) === 0 && x.push(h + y.replace(I, this.options.pluralSeparator)), p && x.push(h + N)), g) {
530
+ const V = `${h}${this.options.contextSeparator}${t.context}`;
531
+ x.push(V), c && (x.push(V + y), t.ordinal && y.indexOf(I) === 0 && x.push(V + y.replace(I, this.options.pluralSeparator)), p && x.push(V + N));
532
+ }
533
+ }
534
+ let L;
535
+ for (; L = x.pop(); )
536
+ this.isValidLookup(s) || (r = L, s = this.getResource(E, v, L, t));
537
+ }));
538
+ });
539
+ }), {
540
+ res: s,
541
+ usedKey: i,
542
+ exactUsedKey: r,
543
+ usedLng: a,
544
+ usedNS: o
545
+ };
546
+ }
547
+ isValidLookup(e) {
548
+ return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
549
+ }
550
+ getResource(e, t, s) {
551
+ var r;
552
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
553
+ return (r = this.i18nFormat) != null && r.getResource ? this.i18nFormat.getResource(e, t, s, i) : this.resourceStore.getResource(e, t, s, i);
554
+ }
555
+ getUsedParamsDetails() {
556
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
557
+ const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], s = e.replace && !d(e.replace);
558
+ let i = s ? e.replace : e;
559
+ if (s && typeof e.count < "u" && (i.count = e.count), this.options.interpolation.defaultVariables && (i = {
560
+ ...this.options.interpolation.defaultVariables,
561
+ ...i
562
+ }), !s) {
563
+ i = {
564
+ ...i
565
+ };
566
+ for (const r of t)
567
+ delete i[r];
568
+ }
569
+ return i;
570
+ }
571
+ static hasDefaultValue(e) {
572
+ const t = "defaultValue";
573
+ for (const s in e)
574
+ if (Object.prototype.hasOwnProperty.call(e, s) && t === s.substring(0, t.length) && e[s] !== void 0)
575
+ return !0;
576
+ return !1;
577
+ }
578
+ }
579
+ class Se {
580
+ constructor(e) {
581
+ this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = P.create("languageUtils");
582
+ }
583
+ getScriptPartFromCode(e) {
584
+ if (e = Q(e), !e || e.indexOf("-") < 0) return null;
585
+ const t = e.split("-");
586
+ return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
587
+ }
588
+ getLanguagePartFromCode(e) {
589
+ if (e = Q(e), !e || e.indexOf("-") < 0) return e;
590
+ const t = e.split("-");
591
+ return this.formatLanguageCode(t[0]);
592
+ }
593
+ formatLanguageCode(e) {
594
+ if (d(e) && e.indexOf("-") > -1) {
595
+ let t;
596
+ try {
597
+ t = Intl.getCanonicalLocales(e)[0];
598
+ } catch {
599
+ }
600
+ return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e);
601
+ }
602
+ return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
603
+ }
604
+ isSupportedCode(e) {
605
+ return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(e) > -1;
606
+ }
607
+ getBestMatchFromCodes(e) {
608
+ if (!e) return null;
609
+ let t;
610
+ return e.forEach((s) => {
611
+ if (t) return;
612
+ const i = this.formatLanguageCode(s);
613
+ (!this.options.supportedLngs || this.isSupportedCode(i)) && (t = i);
614
+ }), !t && this.options.supportedLngs && e.forEach((s) => {
615
+ if (t) return;
616
+ const i = this.getLanguagePartFromCode(s);
617
+ if (this.isSupportedCode(i)) return t = i;
618
+ t = this.options.supportedLngs.find((r) => {
619
+ if (r === i) return r;
620
+ if (!(r.indexOf("-") < 0 && i.indexOf("-") < 0) && (r.indexOf("-") > 0 && i.indexOf("-") < 0 && r.substring(0, r.indexOf("-")) === i || r.indexOf(i) === 0 && i.length > 1))
621
+ return r;
622
+ });
623
+ }), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
624
+ }
625
+ getFallbackCodes(e, t) {
626
+ if (!e) return [];
627
+ if (typeof e == "function" && (e = e(t)), d(e) && (e = [e]), Array.isArray(e)) return e;
628
+ if (!t) return e.default || [];
629
+ let s = e[t];
630
+ return s || (s = e[this.getScriptPartFromCode(t)]), s || (s = e[this.formatLanguageCode(t)]), s || (s = e[this.getLanguagePartFromCode(t)]), s || (s = e.default), s || [];
631
+ }
632
+ toResolveHierarchy(e, t) {
633
+ const s = this.getFallbackCodes(t || this.options.fallbackLng || [], e), i = [], r = (a) => {
634
+ a && (this.isSupportedCode(a) ? i.push(a) : this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`));
635
+ };
636
+ return d(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && r(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && r(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && r(this.getLanguagePartFromCode(e))) : d(e) && r(this.formatLanguageCode(e)), s.forEach((a) => {
637
+ i.indexOf(a) < 0 && r(this.formatLanguageCode(a));
638
+ }), i;
639
+ }
640
+ }
641
+ const Oe = {
642
+ zero: 0,
643
+ one: 1,
644
+ two: 2,
645
+ few: 3,
646
+ many: 4,
647
+ other: 5
648
+ }, Le = {
649
+ select: (n) => n === 1 ? "one" : "other",
650
+ resolvedOptions: () => ({
651
+ pluralCategories: ["one", "other"]
652
+ })
653
+ };
654
+ class tt {
655
+ constructor(e) {
656
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
657
+ this.languageUtils = e, this.options = t, this.logger = P.create("pluralResolver"), this.pluralRulesCache = {};
658
+ }
659
+ addRule(e, t) {
660
+ this.rules[e] = t;
661
+ }
662
+ clearCache() {
663
+ this.pluralRulesCache = {};
664
+ }
665
+ getRule(e) {
666
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
667
+ const s = Q(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", r = JSON.stringify({
668
+ cleanedCode: s,
669
+ type: i
670
+ });
671
+ if (r in this.pluralRulesCache)
672
+ return this.pluralRulesCache[r];
673
+ let a;
674
+ try {
675
+ a = new Intl.PluralRules(s, {
676
+ type: i
677
+ });
678
+ } catch {
679
+ if (!Intl)
680
+ return this.logger.error("No Intl support, please use an Intl polyfill!"), Le;
681
+ if (!e.match(/-|_/)) return Le;
682
+ const l = this.languageUtils.getLanguagePartFromCode(e);
683
+ a = this.getRule(l, t);
684
+ }
685
+ return this.pluralRulesCache[r] = a, a;
686
+ }
687
+ needsPlural(e) {
688
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = this.getRule(e, t);
689
+ return s || (s = this.getRule("dev", t)), (s == null ? void 0 : s.resolvedOptions().pluralCategories.length) > 1;
690
+ }
691
+ getPluralFormsOfKey(e, t) {
692
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
693
+ return this.getSuffixes(e, s).map((i) => `${t}${i}`);
694
+ }
695
+ getSuffixes(e) {
696
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = this.getRule(e, t);
697
+ return s || (s = this.getRule("dev", t)), s ? s.resolvedOptions().pluralCategories.sort((i, r) => Oe[i] - Oe[r]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
698
+ }
699
+ getSuffix(e, t) {
700
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
701
+ const i = this.getRule(e, s);
702
+ return i ? `${this.options.prepend}${s.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, s));
703
+ }
704
+ }
705
+ const we = function(n, e, t) {
706
+ let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, r = We(n, e, t);
707
+ return !r && i && d(t) && (r = ae(n, t, s), r === void 0 && (r = ae(e, t, s))), r;
708
+ }, re = (n) => n.replace(/\$/g, "$$$$");
709
+ class st {
710
+ constructor() {
711
+ var t;
712
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
713
+ this.logger = P.create("interpolator"), this.options = e, this.format = ((t = e == null ? void 0 : e.interpolation) == null ? void 0 : t.format) || ((s) => s), this.init(e);
714
+ }
715
+ init() {
716
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
717
+ e.interpolation || (e.interpolation = {
718
+ escapeValue: !0
719
+ });
720
+ const {
721
+ escape: t,
722
+ escapeValue: s,
723
+ useRawValueToEscape: i,
724
+ prefix: r,
725
+ prefixEscaped: a,
726
+ suffix: o,
727
+ suffixEscaped: l,
728
+ formatSeparator: u,
729
+ unescapeSuffix: h,
730
+ unescapePrefix: f,
731
+ nestingPrefix: c,
732
+ nestingPrefixEscaped: p,
733
+ nestingSuffix: g,
734
+ nestingSuffixEscaped: m,
735
+ nestingOptionsSeparator: v,
736
+ maxReplaces: w,
737
+ alwaysFormat: C
738
+ } = e.interpolation;
739
+ this.escape = t !== void 0 ? t : Ye, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = r ? F(r) : a || "{{", this.suffix = o ? F(o) : l || "}}", this.formatSeparator = u || ",", this.unescapePrefix = h ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : h || "", this.nestingPrefix = c ? F(c) : p || F("$t("), this.nestingSuffix = g ? F(g) : m || F(")"), this.nestingOptionsSeparator = v || ",", this.maxReplaces = w || 1e3, this.alwaysFormat = C !== void 0 ? C : !1, this.resetRegExp();
740
+ }
741
+ reset() {
742
+ this.options && this.init(this.options);
743
+ }
744
+ resetRegExp() {
745
+ const e = (t, s) => (t == null ? void 0 : t.source) === s ? (t.lastIndex = 0, t) : new RegExp(s, "g");
746
+ this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);
747
+ }
748
+ interpolate(e, t, s, i) {
749
+ var p;
750
+ let r, a, o;
751
+ const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, u = (g) => {
752
+ if (g.indexOf(this.formatSeparator) < 0) {
753
+ const C = we(t, l, g, this.options.keySeparator, this.options.ignoreJSONStructure);
754
+ return this.alwaysFormat ? this.format(C, void 0, s, {
755
+ ...i,
756
+ ...t,
757
+ interpolationkey: g
758
+ }) : C;
759
+ }
760
+ const m = g.split(this.formatSeparator), v = m.shift().trim(), w = m.join(this.formatSeparator).trim();
761
+ return this.format(we(t, l, v, this.options.keySeparator, this.options.ignoreJSONStructure), w, s, {
762
+ ...i,
763
+ ...t,
764
+ interpolationkey: v
765
+ });
766
+ };
767
+ this.resetRegExp();
768
+ const h = (i == null ? void 0 : i.missingInterpolationHandler) || this.options.missingInterpolationHandler, f = ((p = i == null ? void 0 : i.interpolation) == null ? void 0 : p.skipOnVariables) !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
769
+ return [{
770
+ regex: this.regexpUnescape,
771
+ safeValue: (g) => re(g)
772
+ }, {
773
+ regex: this.regexp,
774
+ safeValue: (g) => this.escapeValue ? re(this.escape(g)) : re(g)
775
+ }].forEach((g) => {
776
+ for (o = 0; r = g.regex.exec(e); ) {
777
+ const m = r[1].trim();
778
+ if (a = u(m), a === void 0)
779
+ if (typeof h == "function") {
780
+ const w = h(e, r, i);
781
+ a = d(w) ? w : "";
782
+ } else if (i && Object.prototype.hasOwnProperty.call(i, m))
783
+ a = "";
784
+ else if (f) {
785
+ a = r[0];
786
+ continue;
787
+ } else
788
+ this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`), a = "";
789
+ else !d(a) && !this.useRawValueToEscape && (a = pe(a));
790
+ const v = g.safeValue(a);
791
+ if (e = e.replace(r[0], v), f ? (g.regex.lastIndex += a.length, g.regex.lastIndex -= r[0].length) : g.regex.lastIndex = 0, o++, o >= this.maxReplaces)
792
+ break;
793
+ }
794
+ }), e;
795
+ }
796
+ nest(e, t) {
797
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i, r, a;
798
+ const o = (l, u) => {
799
+ const h = this.nestingOptionsSeparator;
800
+ if (l.indexOf(h) < 0) return l;
801
+ const f = l.split(new RegExp(`${h}[ ]*{`));
802
+ let c = `{${f[1]}`;
803
+ l = f[0], c = this.interpolate(c, a);
804
+ const p = c.match(/'/g), g = c.match(/"/g);
805
+ (((p == null ? void 0 : p.length) ?? 0) % 2 === 0 && !g || g.length % 2 !== 0) && (c = c.replace(/'/g, '"'));
806
+ try {
807
+ a = JSON.parse(c), u && (a = {
808
+ ...u,
809
+ ...a
810
+ });
811
+ } catch (m) {
812
+ return this.logger.warn(`failed parsing options string in nesting for key ${l}`, m), `${l}${h}${c}`;
813
+ }
814
+ return a.defaultValue && a.defaultValue.indexOf(this.prefix) > -1 && delete a.defaultValue, l;
815
+ };
816
+ for (; i = this.nestingRegexp.exec(e); ) {
817
+ let l = [];
818
+ a = {
819
+ ...s
820
+ }, a = a.replace && !d(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
821
+ let u = !1;
822
+ if (i[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(i[1])) {
823
+ const h = i[1].split(this.formatSeparator).map((f) => f.trim());
824
+ i[1] = h.shift(), l = h, u = !0;
825
+ }
826
+ if (r = t(o.call(this, i[1].trim(), a), a), r && i[0] === e && !d(r)) return r;
827
+ d(r) || (r = pe(r)), r || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), r = ""), u && (r = l.reduce((h, f) => this.format(h, f, s.lng, {
828
+ ...s,
829
+ interpolationkey: i[1].trim()
830
+ }), r.trim())), e = e.replace(i[0], r), this.regexp.lastIndex = 0;
831
+ }
832
+ return e;
833
+ }
834
+ }
835
+ const it = (n) => {
836
+ let e = n.toLowerCase().trim();
837
+ const t = {};
838
+ if (n.indexOf("(") > -1) {
839
+ const s = n.split("(");
840
+ e = s[0].toLowerCase().trim();
841
+ const i = s[1].substring(0, s[1].length - 1);
842
+ e === "currency" && i.indexOf(":") < 0 ? t.currency || (t.currency = i.trim()) : e === "relativetime" && i.indexOf(":") < 0 ? t.range || (t.range = i.trim()) : i.split(";").forEach((a) => {
843
+ if (a) {
844
+ const [o, ...l] = a.split(":"), u = l.join(":").trim().replace(/^'+|'+$/g, ""), h = o.trim();
845
+ t[h] || (t[h] = u), u === "false" && (t[h] = !1), u === "true" && (t[h] = !0), isNaN(u) || (t[h] = parseInt(u, 10));
846
+ }
847
+ });
848
+ }
849
+ return {
850
+ formatName: e,
851
+ formatOptions: t
852
+ };
853
+ }, A = (n) => {
854
+ const e = {};
855
+ return (t, s, i) => {
856
+ let r = i;
857
+ i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (r = {
858
+ ...r,
859
+ [i.interpolationkey]: void 0
860
+ });
861
+ const a = s + JSON.stringify(r);
862
+ let o = e[a];
863
+ return o || (o = n(Q(s), i), e[a] = o), o(t);
864
+ };
865
+ };
866
+ class rt {
867
+ constructor() {
868
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
869
+ this.logger = P.create("formatter"), this.options = e, this.formats = {
870
+ number: A((t, s) => {
871
+ const i = new Intl.NumberFormat(t, {
872
+ ...s
873
+ });
874
+ return (r) => i.format(r);
875
+ }),
876
+ currency: A((t, s) => {
877
+ const i = new Intl.NumberFormat(t, {
878
+ ...s,
879
+ style: "currency"
880
+ });
881
+ return (r) => i.format(r);
882
+ }),
883
+ datetime: A((t, s) => {
884
+ const i = new Intl.DateTimeFormat(t, {
885
+ ...s
886
+ });
887
+ return (r) => i.format(r);
888
+ }),
889
+ relativetime: A((t, s) => {
890
+ const i = new Intl.RelativeTimeFormat(t, {
891
+ ...s
892
+ });
893
+ return (r) => i.format(r, s.range || "day");
894
+ }),
895
+ list: A((t, s) => {
896
+ const i = new Intl.ListFormat(t, {
897
+ ...s
898
+ });
899
+ return (r) => i.format(r);
900
+ })
901
+ }, this.init(e);
902
+ }
903
+ init(e) {
904
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
905
+ interpolation: {}
906
+ };
907
+ this.formatSeparator = t.interpolation.formatSeparator || ",";
908
+ }
909
+ add(e, t) {
910
+ this.formats[e.toLowerCase().trim()] = t;
911
+ }
912
+ addCached(e, t) {
913
+ this.formats[e.toLowerCase().trim()] = A(t);
914
+ }
915
+ format(e, t, s) {
916
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
917
+ const r = t.split(this.formatSeparator);
918
+ if (r.length > 1 && r[0].indexOf("(") > 1 && r[0].indexOf(")") < 0 && r.find((o) => o.indexOf(")") > -1)) {
919
+ const o = r.findIndex((l) => l.indexOf(")") > -1);
920
+ r[0] = [r[0], ...r.splice(1, o)].join(this.formatSeparator);
921
+ }
922
+ return r.reduce((o, l) => {
923
+ var f;
924
+ const {
925
+ formatName: u,
926
+ formatOptions: h
927
+ } = it(l);
928
+ if (this.formats[u]) {
929
+ let c = o;
930
+ try {
931
+ const p = ((f = i == null ? void 0 : i.formatParams) == null ? void 0 : f[i.interpolationkey]) || {}, g = p.locale || p.lng || i.locale || i.lng || s;
932
+ c = this.formats[u](o, g, {
933
+ ...h,
934
+ ...i,
935
+ ...p
936
+ });
937
+ } catch (p) {
938
+ this.logger.warn(p);
939
+ }
940
+ return c;
941
+ } else
942
+ this.logger.warn(`there was no format function for ${u}`);
943
+ return o;
944
+ }, e);
945
+ }
946
+ }
947
+ const nt = (n, e) => {
948
+ n.pending[e] !== void 0 && (delete n.pending[e], n.pendingCount--);
949
+ };
950
+ class at extends X {
951
+ constructor(e, t, s) {
952
+ var r, a;
953
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
954
+ super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = i, this.logger = P.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], (a = (r = this.backend) == null ? void 0 : r.init) == null || a.call(r, s, i.backend, i);
955
+ }
956
+ queueLoad(e, t, s, i) {
957
+ const r = {}, a = {}, o = {}, l = {};
958
+ return e.forEach((u) => {
959
+ let h = !0;
960
+ t.forEach((f) => {
961
+ const c = `${u}|${f}`;
962
+ !s.reload && this.store.hasResourceBundle(u, f) ? this.state[c] = 2 : this.state[c] < 0 || (this.state[c] === 1 ? a[c] === void 0 && (a[c] = !0) : (this.state[c] = 1, h = !1, a[c] === void 0 && (a[c] = !0), r[c] === void 0 && (r[c] = !0), l[f] === void 0 && (l[f] = !0)));
963
+ }), h || (o[u] = !0);
964
+ }), (Object.keys(r).length || Object.keys(a).length) && this.queue.push({
965
+ pending: a,
966
+ pendingCount: Object.keys(a).length,
967
+ loaded: {},
968
+ errors: [],
969
+ callback: i
970
+ }), {
971
+ toLoad: Object.keys(r),
972
+ pending: Object.keys(a),
973
+ toLoadLanguages: Object.keys(o),
974
+ toLoadNamespaces: Object.keys(l)
975
+ };
976
+ }
977
+ loaded(e, t, s) {
978
+ const i = e.split("|"), r = i[0], a = i[1];
979
+ t && this.emit("failedLoading", r, a, t), !t && s && this.store.addResourceBundle(r, a, s, void 0, void 0, {
980
+ skipCopy: !0
981
+ }), this.state[e] = t ? -1 : 2, t && s && (this.state[e] = 0);
982
+ const o = {};
983
+ this.queue.forEach((l) => {
984
+ _e(l.loaded, [r], a), nt(l, e), t && l.errors.push(t), l.pendingCount === 0 && !l.done && (Object.keys(l.loaded).forEach((u) => {
985
+ o[u] || (o[u] = {});
986
+ const h = l.loaded[u];
987
+ h.length && h.forEach((f) => {
988
+ o[u][f] === void 0 && (o[u][f] = !0);
989
+ });
990
+ }), l.done = !0, l.errors.length ? l.callback(l.errors) : l.callback());
991
+ }), this.emit("loaded", o), this.queue = this.queue.filter((l) => !l.done);
992
+ }
993
+ read(e, t, s) {
994
+ let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, r = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, a = arguments.length > 5 ? arguments[5] : void 0;
995
+ if (!e.length) return a(null, {});
996
+ if (this.readingCalls >= this.maxParallelReads) {
997
+ this.waitingReads.push({
998
+ lng: e,
999
+ ns: t,
1000
+ fcName: s,
1001
+ tried: i,
1002
+ wait: r,
1003
+ callback: a
1004
+ });
1005
+ return;
1006
+ }
1007
+ this.readingCalls++;
1008
+ const o = (u, h) => {
1009
+ if (this.readingCalls--, this.waitingReads.length > 0) {
1010
+ const f = this.waitingReads.shift();
1011
+ this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
1012
+ }
1013
+ if (u && h && i < this.maxRetries) {
1014
+ setTimeout(() => {
1015
+ this.read.call(this, e, t, s, i + 1, r * 2, a);
1016
+ }, r);
1017
+ return;
1018
+ }
1019
+ a(u, h);
1020
+ }, l = this.backend[s].bind(this.backend);
1021
+ if (l.length === 2) {
1022
+ try {
1023
+ const u = l(e, t);
1024
+ u && typeof u.then == "function" ? u.then((h) => o(null, h)).catch(o) : o(null, u);
1025
+ } catch (u) {
1026
+ o(u);
1027
+ }
1028
+ return;
1029
+ }
1030
+ return l(e, t, o);
1031
+ }
1032
+ prepareLoading(e, t) {
1033
+ let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = arguments.length > 3 ? arguments[3] : void 0;
1034
+ if (!this.backend)
1035
+ return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
1036
+ d(e) && (e = this.languageUtils.toResolveHierarchy(e)), d(t) && (t = [t]);
1037
+ const r = this.queueLoad(e, t, s, i);
1038
+ if (!r.toLoad.length)
1039
+ return r.pending.length || i(), null;
1040
+ r.toLoad.forEach((a) => {
1041
+ this.loadOne(a);
1042
+ });
1043
+ }
1044
+ load(e, t, s) {
1045
+ this.prepareLoading(e, t, {}, s);
1046
+ }
1047
+ reload(e, t, s) {
1048
+ this.prepareLoading(e, t, {
1049
+ reload: !0
1050
+ }, s);
1051
+ }
1052
+ loadOne(e) {
1053
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
1054
+ const s = e.split("|"), i = s[0], r = s[1];
1055
+ this.read(i, r, "read", void 0, void 0, (a, o) => {
1056
+ a && this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`, a), !a && o && this.logger.log(`${t}loaded namespace ${r} for language ${i}`, o), this.loaded(e, a, o);
1057
+ });
1058
+ }
1059
+ saveMissing(e, t, s, i, r) {
1060
+ var l, u, h, f, c;
1061
+ let a = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {}, o = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
1062
+ };
1063
+ if ((u = (l = this.services) == null ? void 0 : l.utils) != null && u.hasLoadedNamespace && !((f = (h = this.services) == null ? void 0 : h.utils) != null && f.hasLoadedNamespace(t))) {
1064
+ this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");
1065
+ return;
1066
+ }
1067
+ if (!(s == null || s === "")) {
1068
+ if ((c = this.backend) != null && c.create) {
1069
+ const p = {
1070
+ ...a,
1071
+ isUpdate: r
1072
+ }, g = this.backend.create.bind(this.backend);
1073
+ if (g.length < 6)
1074
+ try {
1075
+ let m;
1076
+ g.length === 5 ? m = g(e, t, s, i, p) : m = g(e, t, s, i), m && typeof m.then == "function" ? m.then((v) => o(null, v)).catch(o) : o(null, m);
1077
+ } catch (m) {
1078
+ o(m);
1079
+ }
1080
+ else
1081
+ g(e, t, s, i, o, p);
1082
+ }
1083
+ !e || !e[0] || this.store.addResource(e[0], t, s, i);
1084
+ }
1085
+ }
1086
+ }
1087
+ const $e = () => ({
1088
+ debug: !1,
1089
+ initAsync: !0,
1090
+ ns: ["translation"],
1091
+ defaultNS: ["translation"],
1092
+ fallbackLng: ["dev"],
1093
+ fallbackNS: !1,
1094
+ supportedLngs: !1,
1095
+ nonExplicitSupportedLngs: !1,
1096
+ load: "all",
1097
+ preload: !1,
1098
+ simplifyPluralSuffix: !0,
1099
+ keySeparator: ".",
1100
+ nsSeparator: ":",
1101
+ pluralSeparator: "_",
1102
+ contextSeparator: "_",
1103
+ partialBundledLanguages: !1,
1104
+ saveMissing: !1,
1105
+ updateMissing: !1,
1106
+ saveMissingTo: "fallback",
1107
+ saveMissingPlurals: !0,
1108
+ missingKeyHandler: !1,
1109
+ missingInterpolationHandler: !1,
1110
+ postProcess: !1,
1111
+ postProcessPassResolved: !1,
1112
+ returnNull: !1,
1113
+ returnEmptyString: !0,
1114
+ returnObjects: !1,
1115
+ joinArrays: !1,
1116
+ returnedObjectHandler: !1,
1117
+ parseMissingKeyHandler: !1,
1118
+ appendNamespaceToMissingKey: !1,
1119
+ appendNamespaceToCIMode: !1,
1120
+ overloadTranslationOptionHandler: (n) => {
1121
+ let e = {};
1122
+ if (typeof n[1] == "object" && (e = n[1]), d(n[1]) && (e.defaultValue = n[1]), d(n[2]) && (e.tDescription = n[2]), typeof n[2] == "object" || typeof n[3] == "object") {
1123
+ const t = n[3] || n[2];
1124
+ Object.keys(t).forEach((s) => {
1125
+ e[s] = t[s];
1126
+ });
1127
+ }
1128
+ return e;
1129
+ },
1130
+ interpolation: {
1131
+ escapeValue: !0,
1132
+ format: (n) => n,
1133
+ prefix: "{{",
1134
+ suffix: "}}",
1135
+ formatSeparator: ",",
1136
+ unescapePrefix: "-",
1137
+ nestingPrefix: "$t(",
1138
+ nestingSuffix: ")",
1139
+ nestingOptionsSeparator: ",",
1140
+ maxReplaces: 1e3,
1141
+ skipOnVariables: !0
1142
+ }
1143
+ }), Ce = (n) => {
1144
+ var e, t;
1145
+ return d(n.ns) && (n.ns = [n.ns]), d(n.fallbackLng) && (n.fallbackLng = [n.fallbackLng]), d(n.fallbackNS) && (n.fallbackNS = [n.fallbackNS]), ((t = (e = n.supportedLngs) == null ? void 0 : e.indexOf) == null ? void 0 : t.call(e, "cimode")) < 0 && (n.supportedLngs = n.supportedLngs.concat(["cimode"])), typeof n.initImmediate == "boolean" && (n.initAsync = n.initImmediate), n;
1146
+ }, Z = () => {
1147
+ }, ot = (n) => {
1148
+ Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((t) => {
1149
+ typeof n[t] == "function" && (n[t] = n[t].bind(n));
1150
+ });
1151
+ };
1152
+ class z extends X {
1153
+ constructor() {
1154
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1155
+ if (super(), this.options = Ce(e), this.services = {}, this.logger = P, this.modules = {
1156
+ external: []
1157
+ }, ot(this), t && !this.isInitialized && !e.isClone) {
1158
+ if (!this.options.initAsync)
1159
+ return this.init(e, t), this;
1160
+ setTimeout(() => {
1161
+ this.init(e, t);
1162
+ }, 0);
1163
+ }
1164
+ }
1165
+ init() {
1166
+ var e = this;
1167
+ let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = arguments.length > 1 ? arguments[1] : void 0;
1168
+ this.isInitializing = !0, typeof t == "function" && (s = t, t = {}), t.defaultNS == null && t.ns && (d(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
1169
+ const i = $e();
1170
+ this.options = {
1171
+ ...i,
1172
+ ...this.options,
1173
+ ...Ce(t)
1174
+ }, this.options.interpolation = {
1175
+ ...i.interpolation,
1176
+ ...this.options.interpolation
1177
+ }, t.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = t.keySeparator), t.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = t.nsSeparator);
1178
+ const r = (h) => h ? typeof h == "function" ? new h() : h : null;
1179
+ if (!this.options.isClone) {
1180
+ this.modules.logger ? P.init(r(this.modules.logger), this.options) : P.init(null, this.options);
1181
+ let h;
1182
+ this.modules.formatter ? h = this.modules.formatter : h = rt;
1183
+ const f = new Se(this.options);
1184
+ this.store = new ye(this.options.resources, this.options);
1185
+ const c = this.services;
1186
+ c.logger = P, c.resourceStore = this.store, c.languageUtils = f, c.pluralResolver = new tt(f, {
1187
+ prepend: this.options.pluralSeparator,
1188
+ simplifyPluralSuffix: this.options.simplifyPluralSuffix
1189
+ }), h && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (c.formatter = r(h), c.formatter.init(c, this.options), this.options.interpolation.format = c.formatter.format.bind(c.formatter)), c.interpolator = new st(this.options), c.utils = {
1190
+ hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
1191
+ }, c.backendConnector = new at(r(this.modules.backend), c.resourceStore, c, this.options), c.backendConnector.on("*", function(p) {
1192
+ for (var g = arguments.length, m = new Array(g > 1 ? g - 1 : 0), v = 1; v < g; v++)
1193
+ m[v - 1] = arguments[v];
1194
+ e.emit(p, ...m);
1195
+ }), this.modules.languageDetector && (c.languageDetector = r(this.modules.languageDetector), c.languageDetector.init && c.languageDetector.init(c, this.options.detection, this.options)), this.modules.i18nFormat && (c.i18nFormat = r(this.modules.i18nFormat), c.i18nFormat.init && c.i18nFormat.init(this)), this.translator = new q(this.services, this.options), this.translator.on("*", function(p) {
1196
+ for (var g = arguments.length, m = new Array(g > 1 ? g - 1 : 0), v = 1; v < g; v++)
1197
+ m[v - 1] = arguments[v];
1198
+ e.emit(p, ...m);
1199
+ }), this.modules.external.forEach((p) => {
1200
+ p.init && p.init(this);
1201
+ });
1202
+ }
1203
+ if (this.format = this.options.interpolation.format, s || (s = Z), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
1204
+ const h = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
1205
+ h.length > 0 && h[0] !== "dev" && (this.options.lng = h[0]);
1206
+ }
1207
+ !this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((h) => {
1208
+ this[h] = function() {
1209
+ return e.store[h](...arguments);
1210
+ };
1211
+ }), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((h) => {
1212
+ this[h] = function() {
1213
+ return e.store[h](...arguments), e;
1214
+ };
1215
+ });
1216
+ const l = H(), u = () => {
1217
+ const h = (f, c) => {
1218
+ this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), l.resolve(c), s(f, c);
1219
+ };
1220
+ if (this.languages && !this.isInitialized) return h(null, this.t.bind(this));
1221
+ this.changeLanguage(this.options.lng, h);
1222
+ };
1223
+ return this.options.resources || !this.options.initAsync ? u() : setTimeout(u, 0), l;
1224
+ }
1225
+ loadResources(e) {
1226
+ var r, a;
1227
+ let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Z;
1228
+ const i = d(e) ? e : this.language;
1229
+ if (typeof e == "function" && (s = e), !this.options.resources || this.options.partialBundledLanguages) {
1230
+ if ((i == null ? void 0 : i.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return s();
1231
+ const o = [], l = (u) => {
1232
+ if (!u || u === "cimode") return;
1233
+ this.services.languageUtils.toResolveHierarchy(u).forEach((f) => {
1234
+ f !== "cimode" && o.indexOf(f) < 0 && o.push(f);
1235
+ });
1236
+ };
1237
+ i ? l(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((h) => l(h)), (a = (r = this.options.preload) == null ? void 0 : r.forEach) == null || a.call(r, (u) => l(u)), this.services.backendConnector.load(o, this.options.ns, (u) => {
1238
+ !u && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), s(u);
1239
+ });
1240
+ } else
1241
+ s(null);
1242
+ }
1243
+ reloadResources(e, t, s) {
1244
+ const i = H();
1245
+ return typeof e == "function" && (s = e, e = void 0), typeof t == "function" && (s = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), s || (s = Z), this.services.backendConnector.reload(e, t, (r) => {
1246
+ i.resolve(), s(r);
1247
+ }), i;
1248
+ }
1249
+ use(e) {
1250
+ if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
1251
+ if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
1252
+ return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && Ve.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
1253
+ }
1254
+ setResolvedLanguage(e) {
1255
+ if (!(!e || !this.languages) && !(["cimode", "dev"].indexOf(e) > -1))
1256
+ for (let t = 0; t < this.languages.length; t++) {
1257
+ const s = this.languages[t];
1258
+ if (!(["cimode", "dev"].indexOf(s) > -1) && this.store.hasLanguageSomeTranslations(s)) {
1259
+ this.resolvedLanguage = s;
1260
+ break;
1261
+ }
1262
+ }
1263
+ }
1264
+ changeLanguage(e, t) {
1265
+ var s = this;
1266
+ this.isLanguageChangingTo = e;
1267
+ const i = H();
1268
+ this.emit("languageChanging", e);
1269
+ const r = (l) => {
1270
+ this.language = l, this.languages = this.services.languageUtils.toResolveHierarchy(l), this.resolvedLanguage = void 0, this.setResolvedLanguage(l);
1271
+ }, a = (l, u) => {
1272
+ u ? (r(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, i.resolve(function() {
1273
+ return s.t(...arguments);
1274
+ }), t && t(l, function() {
1275
+ return s.t(...arguments);
1276
+ });
1277
+ }, o = (l) => {
1278
+ var h, f;
1279
+ !e && !l && this.services.languageDetector && (l = []);
1280
+ const u = d(l) ? l : this.services.languageUtils.getBestMatchFromCodes(l);
1281
+ u && (this.language || r(u), this.translator.language || this.translator.changeLanguage(u), (f = (h = this.services.languageDetector) == null ? void 0 : h.cacheUserLanguage) == null || f.call(h, u)), this.loadResources(u, (c) => {
1282
+ a(c, u);
1283
+ });
1284
+ };
1285
+ return !e && this.services.languageDetector && !this.services.languageDetector.async ? o(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(o) : this.services.languageDetector.detect(o) : o(e), i;
1286
+ }
1287
+ getFixedT(e, t, s) {
1288
+ var i = this;
1289
+ const r = function(a, o) {
1290
+ let l;
1291
+ if (typeof o != "object") {
1292
+ for (var u = arguments.length, h = new Array(u > 2 ? u - 2 : 0), f = 2; f < u; f++)
1293
+ h[f - 2] = arguments[f];
1294
+ l = i.options.overloadTranslationOptionHandler([a, o].concat(h));
1295
+ } else
1296
+ l = {
1297
+ ...o
1298
+ };
1299
+ l.lng = l.lng || r.lng, l.lngs = l.lngs || r.lngs, l.ns = l.ns || r.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || s || r.keyPrefix);
1300
+ const c = i.options.keySeparator || ".";
1301
+ let p;
1302
+ return l.keyPrefix && Array.isArray(a) ? p = a.map((g) => `${l.keyPrefix}${c}${g}`) : p = l.keyPrefix ? `${l.keyPrefix}${c}${a}` : a, i.t(p, l);
1303
+ };
1304
+ return d(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = s, r;
1305
+ }
1306
+ t() {
1307
+ var i;
1308
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
1309
+ t[s] = arguments[s];
1310
+ return (i = this.translator) == null ? void 0 : i.translate(...t);
1311
+ }
1312
+ exists() {
1313
+ var i;
1314
+ for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
1315
+ t[s] = arguments[s];
1316
+ return (i = this.translator) == null ? void 0 : i.exists(...t);
1317
+ }
1318
+ setDefaultNamespace(e) {
1319
+ this.options.defaultNS = e;
1320
+ }
1321
+ hasLoadedNamespace(e) {
1322
+ let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1323
+ if (!this.isInitialized)
1324
+ return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
1325
+ if (!this.languages || !this.languages.length)
1326
+ return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
1327
+ const s = t.lng || this.resolvedLanguage || this.languages[0], i = this.options ? this.options.fallbackLng : !1, r = this.languages[this.languages.length - 1];
1328
+ if (s.toLowerCase() === "cimode") return !0;
1329
+ const a = (o, l) => {
1330
+ const u = this.services.backendConnector.state[`${o}|${l}`];
1331
+ return u === -1 || u === 0 || u === 2;
1332
+ };
1333
+ if (t.precheck) {
1334
+ const o = t.precheck(this, a);
1335
+ if (o !== void 0) return o;
1336
+ }
1337
+ return !!(this.hasResourceBundle(s, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages || a(s, e) && (!i || a(r, e)));
1338
+ }
1339
+ loadNamespaces(e, t) {
1340
+ const s = H();
1341
+ return this.options.ns ? (d(e) && (e = [e]), e.forEach((i) => {
1342
+ this.options.ns.indexOf(i) < 0 && this.options.ns.push(i);
1343
+ }), this.loadResources((i) => {
1344
+ s.resolve(), t && t(i);
1345
+ }), s) : (t && t(), Promise.resolve());
1346
+ }
1347
+ loadLanguages(e, t) {
1348
+ const s = H();
1349
+ d(e) && (e = [e]);
1350
+ const i = this.options.preload || [], r = e.filter((a) => i.indexOf(a) < 0 && this.services.languageUtils.isSupportedCode(a));
1351
+ return r.length ? (this.options.preload = i.concat(r), this.loadResources((a) => {
1352
+ s.resolve(), t && t(a);
1353
+ }), s) : (t && t(), Promise.resolve());
1354
+ }
1355
+ dir(e) {
1356
+ var i, r;
1357
+ if (e || (e = this.resolvedLanguage || (((i = this.languages) == null ? void 0 : i.length) > 0 ? this.languages[0] : this.language)), !e) return "rtl";
1358
+ const t = ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh", "abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc", "apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga", "he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi", "hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam", "ckb"], s = ((r = this.services) == null ? void 0 : r.languageUtils) || new Se($e());
1359
+ return t.indexOf(s.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
1360
+ }
1361
+ static createInstance() {
1362
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
1363
+ return new z(e, t);
1364
+ }
1365
+ cloneInstance() {
1366
+ let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : Z;
1367
+ const s = e.forkResourceStore;
1368
+ s && delete e.forkResourceStore;
1369
+ const i = {
1370
+ ...this.options,
1371
+ ...e,
1372
+ isClone: !0
1373
+ }, r = new z(i);
1374
+ if ((e.debug !== void 0 || e.prefix !== void 0) && (r.logger = r.logger.clone(e)), ["store", "services", "language"].forEach((o) => {
1375
+ r[o] = this[o];
1376
+ }), r.services = {
1377
+ ...this.services
1378
+ }, r.services.utils = {
1379
+ hasLoadedNamespace: r.hasLoadedNamespace.bind(r)
1380
+ }, s) {
1381
+ const o = Object.keys(this.store.data).reduce((l, u) => (l[u] = {
1382
+ ...this.store.data[u]
1383
+ }, Object.keys(l[u]).reduce((h, f) => (h[f] = {
1384
+ ...l[u][f]
1385
+ }, h), {})), {});
1386
+ r.store = new ye(o, i), r.services.resourceStore = r.store;
1387
+ }
1388
+ return r.translator = new q(r.services, i), r.translator.on("*", function(o) {
1389
+ for (var l = arguments.length, u = new Array(l > 1 ? l - 1 : 0), h = 1; h < l; h++)
1390
+ u[h - 1] = arguments[h];
1391
+ r.emit(o, ...u);
1392
+ }), r.init(i, t), r.translator.options = i, r.translator.backendConnector.services.utils = {
1393
+ hasLoadedNamespace: r.hasLoadedNamespace.bind(r)
1394
+ }, r;
1395
+ }
1396
+ toJSON() {
1397
+ return {
1398
+ options: this.options,
1399
+ store: this.store,
1400
+ language: this.language,
1401
+ languages: this.languages,
1402
+ resolvedLanguage: this.resolvedLanguage
1403
+ };
1404
+ }
1405
+ }
1406
+ const S = z.createInstance();
1407
+ S.createInstance = z.createInstance;
1408
+ S.createInstance;
1409
+ S.dir;
1410
+ S.init;
1411
+ S.loadResources;
1412
+ S.reloadResources;
1413
+ S.use;
1414
+ S.changeLanguage;
1415
+ S.getFixedT;
1416
+ S.t;
1417
+ S.exists;
1418
+ S.setDefaultNamespace;
1419
+ S.hasLoadedNamespace;
1420
+ S.loadNamespaces;
1421
+ S.loadLanguages;
1422
+ var lt = (n, e) => typeof e == "bigint" ? e.toString() : e;
1423
+ function ne(n, e = " | ") {
1424
+ return n.map((t) => typeof t == "string" ? `'${t}'` : t).join(e);
1425
+ }
1426
+ var Pe = (n) => {
1427
+ if (typeof n != "object" || n === null)
1428
+ return !1;
1429
+ for (const e in n)
1430
+ if (!Object.prototype.hasOwnProperty.call(n, e))
1431
+ return !1;
1432
+ return !0;
1433
+ }, ut = (n, e) => {
1434
+ if (typeof n == "string")
1435
+ return { key: n, values: {} };
1436
+ if (Pe(n)) {
1437
+ const t = "key" in n && typeof n.key == "string" ? n.key : e, s = "values" in n && Pe(n.values) ? n.values : {};
1438
+ return { key: t, values: s };
1439
+ }
1440
+ return { key: e, values: {} };
1441
+ }, Re = "zod", ct = (n) => (e, t) => {
1442
+ var l;
1443
+ const { t: s, ns: i, handlePath: r } = {
1444
+ t: S.t,
1445
+ ns: Re,
1446
+ ...n,
1447
+ handlePath: (n == null ? void 0 : n.handlePath) !== !1 ? {
1448
+ context: "with_path",
1449
+ ns: (n == null ? void 0 : n.ns) ?? Re,
1450
+ keyPrefix: void 0,
1451
+ ...n == null ? void 0 : n.handlePath
1452
+ } : null
1453
+ };
1454
+ let a;
1455
+ a = Ae(e, t).message;
1456
+ const o = e.path.length > 0 && r ? {
1457
+ context: r.context,
1458
+ path: s(
1459
+ [r.keyPrefix, e.path.join(".")].filter(Boolean).join("."),
1460
+ {
1461
+ ns: r.ns,
1462
+ defaultValue: e.path.join(".")
1463
+ }
1464
+ )
1465
+ } : {};
1466
+ switch (e.code) {
1467
+ case O.invalid_type:
1468
+ e.received === de.undefined ? a = s("errors.invalid_type_received_undefined", {
1469
+ ns: i,
1470
+ defaultValue: a,
1471
+ ...o
1472
+ }) : e.received === de.null ? a = s("errors.invalid_type_received_null", {
1473
+ ns: i,
1474
+ defaultValue: a,
1475
+ ...o
1476
+ }) : a = s("errors.invalid_type", {
1477
+ expected: s(`types.${e.expected}`, {
1478
+ defaultValue: e.expected,
1479
+ ns: i
1480
+ }),
1481
+ received: s(`types.${e.received}`, {
1482
+ defaultValue: e.received,
1483
+ ns: i
1484
+ }),
1485
+ ns: i,
1486
+ defaultValue: a,
1487
+ ...o
1488
+ });
1489
+ break;
1490
+ case O.invalid_literal:
1491
+ a = s("errors.invalid_literal", {
1492
+ expected: JSON.stringify(e.expected, lt),
1493
+ ns: i,
1494
+ defaultValue: a,
1495
+ ...o
1496
+ });
1497
+ break;
1498
+ case O.unrecognized_keys:
1499
+ a = s("errors.unrecognized_keys", {
1500
+ keys: ne(e.keys, ", "),
1501
+ count: e.keys.length,
1502
+ ns: i,
1503
+ defaultValue: a,
1504
+ ...o
1505
+ });
1506
+ break;
1507
+ case O.invalid_union:
1508
+ a = s("errors.invalid_union", {
1509
+ ns: i,
1510
+ defaultValue: a,
1511
+ ...o
1512
+ });
1513
+ break;
1514
+ case O.invalid_union_discriminator:
1515
+ a = s("errors.invalid_union_discriminator", {
1516
+ options: ne(e.options),
1517
+ ns: i,
1518
+ defaultValue: a,
1519
+ ...o
1520
+ });
1521
+ break;
1522
+ case O.invalid_enum_value:
1523
+ a = s("errors.invalid_enum_value", {
1524
+ options: ne(e.options),
1525
+ received: e.received,
1526
+ ns: i,
1527
+ defaultValue: a,
1528
+ ...o
1529
+ });
1530
+ break;
1531
+ case O.invalid_arguments:
1532
+ a = s("errors.invalid_arguments", {
1533
+ ns: i,
1534
+ defaultValue: a,
1535
+ ...o
1536
+ });
1537
+ break;
1538
+ case O.invalid_return_type:
1539
+ a = s("errors.invalid_return_type", {
1540
+ ns: i,
1541
+ defaultValue: a,
1542
+ ...o
1543
+ });
1544
+ break;
1545
+ case O.invalid_date:
1546
+ a = s("errors.invalid_date", {
1547
+ ns: i,
1548
+ defaultValue: a,
1549
+ ...o
1550
+ });
1551
+ break;
1552
+ case O.invalid_string:
1553
+ typeof e.validation == "object" ? "startsWith" in e.validation ? a = s("errors.invalid_string.startsWith", {
1554
+ startsWith: e.validation.startsWith,
1555
+ ns: i,
1556
+ defaultValue: a,
1557
+ ...o
1558
+ }) : "endsWith" in e.validation && (a = s("errors.invalid_string.endsWith", {
1559
+ endsWith: e.validation.endsWith,
1560
+ ns: i,
1561
+ defaultValue: a,
1562
+ ...o
1563
+ })) : a = s(`errors.invalid_string.${e.validation}`, {
1564
+ validation: s(`validations.${e.validation}`, {
1565
+ defaultValue: e.validation,
1566
+ ns: i
1567
+ }),
1568
+ ns: i,
1569
+ defaultValue: a,
1570
+ ...o
1571
+ });
1572
+ break;
1573
+ case O.too_small:
1574
+ const u = e.type === "date" ? new Date(e.minimum) : e.minimum;
1575
+ a = s(
1576
+ `errors.too_small.${e.type}.${e.exact ? "exact" : e.inclusive ? "inclusive" : "not_inclusive"}`,
1577
+ {
1578
+ minimum: u,
1579
+ count: typeof u == "number" ? u : void 0,
1580
+ ns: i,
1581
+ defaultValue: a,
1582
+ ...o
1583
+ }
1584
+ );
1585
+ break;
1586
+ case O.too_big:
1587
+ const h = e.type === "date" ? new Date(e.maximum) : e.maximum;
1588
+ a = s(
1589
+ `errors.too_big.${e.type}.${e.exact ? "exact" : e.inclusive ? "inclusive" : "not_inclusive"}`,
1590
+ {
1591
+ maximum: h,
1592
+ count: typeof h == "number" ? h : void 0,
1593
+ ns: i,
1594
+ defaultValue: a,
1595
+ ...o
1596
+ }
1597
+ );
1598
+ break;
1599
+ case O.custom:
1600
+ const { key: f, values: c } = ut(
1601
+ (l = e.params) == null ? void 0 : l.i18n,
1602
+ "errors.custom"
1603
+ );
1604
+ a = s(f, {
1605
+ ...c,
1606
+ ns: i,
1607
+ defaultValue: a,
1608
+ ...o
1609
+ });
1610
+ break;
1611
+ case O.invalid_intersection_types:
1612
+ a = s("errors.invalid_intersection_types", {
1613
+ ns: i,
1614
+ defaultValue: a,
1615
+ ...o
1616
+ });
1617
+ break;
1618
+ case O.not_multiple_of:
1619
+ a = s("errors.not_multiple_of", {
1620
+ multipleOf: e.multipleOf,
1621
+ ns: i,
1622
+ defaultValue: a,
1623
+ ...o
1624
+ });
1625
+ break;
1626
+ case O.not_finite:
1627
+ a = s("errors.not_finite", {
1628
+ ns: i,
1629
+ defaultValue: a,
1630
+ ...o
1631
+ });
1632
+ break;
1633
+ }
1634
+ return { message: a };
1635
+ };
1636
+ const le = Te(), D = Ke({
1637
+ locale: le,
1638
+ messages: ke
1639
+ });
1640
+ console.info("Current locale:", le);
1641
+ S.init({
1642
+ lng: le,
1643
+ resources: ke
1644
+ });
1645
+ De.setErrorMap(ct({ ns: ["connectZod", "connectZodCustom"] }));
1646
+ async function vt(n, e) {
1647
+ await new Promise((t) => {
1648
+ const s = document.createElement("input");
1649
+ s.value = n, document.body.appendChild(s), s.select(), document.execCommand("copy"), document.body.removeChild(s), t("");
1650
+ }).then(() => {
1651
+ var t;
1652
+ (t = oe().snackbar) == null || t.open({
1653
+ message: (e == null ? void 0 : e.successMessage) || "Copied to clipboard",
1654
+ type: "success",
1655
+ dismissable: !0
1656
+ });
1657
+ });
1658
+ }
1659
+ const xt = {
1660
+ fileExtension(n) {
1661
+ return (n == null ? void 0 : n.type.replace(/video\/|image\//, "")) || void 0;
1662
+ },
1663
+ generateId(n) {
1664
+ return [Be(), this.fileExtension(n)].filter(Boolean).join(".");
1665
+ },
1666
+ campaignPath(n) {
1667
+ return `business/${k.getBusinessId()}/campaigns/${n || this.generateId()}`;
1668
+ },
1669
+ coverImagePath() {
1670
+ return `business/${k.getBusinessId()}/membership/design/image.png`;
1671
+ },
1672
+ advertisementPath(n, e) {
1673
+ return `business/${k.getBusinessId()}/membership/advertisement/${n}.${this.fileExtension(e)}`;
1674
+ },
1675
+ designPath(n, e) {
1676
+ return `business/${k.getBusinessId()}/membership/design/${n}.${this.fileExtension(e)}`;
1677
+ },
1678
+ bundleImagePath(n, e) {
1679
+ return `business/${k.getBusinessId()}/membership/bundles/${n || this.generateId(e)}`;
1680
+ },
1681
+ collectibleImagePath(n, e) {
1682
+ return `business/${k.getBusinessId()}/membership/collectibles/${n || this.generateId(e)}`;
1683
+ },
1684
+ tierImagePath(n, e) {
1685
+ return `business/${k.getBusinessId()}/membership/tiers/${n || this.generateId(e)}`;
1686
+ },
1687
+ referralTermAndConditionPath() {
1688
+ return `business/${k.getBusinessId()}/membership/referral/term_and_condition.pdf`;
1689
+ },
1690
+ async update(n, e, t) {
1691
+ const s = fe(void 0, t), i = ge(s, n);
1692
+ return await Ee(i, e), Ie(i);
1693
+ },
1694
+ async delete(n, e) {
1695
+ const t = fe(void 0, e), s = ge(t, n);
1696
+ await Fe(s);
1697
+ }
1698
+ }, yt = {
1699
+ get dialog() {
1700
+ return oe().dialog;
1701
+ },
1702
+ confirm(n, e = D.global.t("connect.common.confirm"), t = D.global.t("connect.common.confirm"), s = D.global.t("connect.common.cancel")) {
1703
+ return new Promise((i) => {
1704
+ var r;
1705
+ (r = this.dialog) == null || r.open({
1706
+ title: e,
1707
+ message: n,
1708
+ closeButton: !0,
1709
+ overlay: !0,
1710
+ primaryActions: {
1711
+ close: !0,
1712
+ text: t
1713
+ },
1714
+ secondaryActions: {
1715
+ variant: "tertiary",
1716
+ close: !0,
1717
+ text: s
1718
+ }
1719
+ }).onPrimary(() => {
1720
+ i(!0);
1721
+ }).onSecondary(() => {
1722
+ i(!1);
1723
+ }).onClose(() => {
1724
+ i(!1);
1725
+ });
1726
+ });
1727
+ },
1728
+ remove(n, e = D.global.t("connect.common.remove"), t = D.global.t("connect.common.remove"), s = D.global.t("connect.common.cancel")) {
1729
+ return new Promise((i) => {
1730
+ var r;
1731
+ (r = this.dialog) == null || r.open({
1732
+ title: e,
1733
+ message: n,
1734
+ closeButton: !0,
1735
+ overlay: !0,
1736
+ primaryActions: {
1737
+ close: !0,
1738
+ variant: "destructive",
1739
+ text: t
1740
+ },
1741
+ secondaryActions: {
1742
+ variant: "tertiary",
1743
+ close: !0,
1744
+ text: s
1745
+ }
1746
+ }).onPrimary(() => {
1747
+ i(!0);
1748
+ }).onClose(() => {
1749
+ i(!1);
1750
+ });
1751
+ });
1752
+ }
1753
+ }, bt = {
1754
+ get snackbar() {
1755
+ return oe().snackbar;
1756
+ },
1757
+ success(n, e = 2e3) {
1758
+ var t;
1759
+ return (t = this.snackbar) == null ? void 0 : t.open({ message: n, type: "success" }, e);
1760
+ },
1761
+ error(n, e = 2e3) {
1762
+ var t;
1763
+ return (t = this.snackbar) == null ? void 0 : t.open({ message: n, type: "error" }, e);
1764
+ },
1765
+ info(n, e = 2e3, t = !1) {
1766
+ var s;
1767
+ return (s = this.snackbar) == null ? void 0 : s.open(
1768
+ {
1769
+ message: n,
1770
+ type: "info",
1771
+ dismissable: e !== null,
1772
+ spinner: t
1773
+ },
1774
+ e
1775
+ );
1776
+ },
1777
+ close(n) {
1778
+ var e;
1779
+ return (e = this.snackbar) == null ? void 0 : e.close(n);
1780
+ }
1781
+ };
1782
+ export {
1783
+ vt as c,
1784
+ xt as f,
1785
+ D as i,
1786
+ bt as n,
1787
+ yt as p
1788
+ };