@wix/blog 1.0.714 → 1.0.716

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 (41) hide show
  1. package/_sdk-exports/context-blog-feed/runtime.d.ts +7 -0
  2. package/_sdk-exports/context-blog-feed/runtime.js +3 -3
  3. package/_sdk-exports/context-post-by-id/runtime.js +4 -4
  4. package/_sdk-exports/context-post-by-slug/runtime.js +3 -3
  5. package/_sdk-exports/context-post-list-item/runtime.d.ts +8 -3
  6. package/_sdk-exports/context-post-list-item/runtime.js +4 -4
  7. package/_sdk-exports/context-related-posts/runtime.d.ts +7 -0
  8. package/_sdk-exports/context-related-posts/runtime.js +3 -3
  9. package/build/cjs/context-blog-feed.d.ts +7 -0
  10. package/build/cjs/context-blog-feed.js +5 -6
  11. package/build/cjs/context-blog-feed.js.map +1 -1
  12. package/build/cjs/context-post-by-id.js +916 -894
  13. package/build/cjs/context-post-by-id.js.map +1 -1
  14. package/build/cjs/context-post-by-slug.js +146 -124
  15. package/build/cjs/context-post-by-slug.js.map +1 -1
  16. package/build/cjs/context-post-list-item.d.ts +8 -3
  17. package/build/cjs/context-post-list-item.js +896 -873
  18. package/build/cjs/context-post-list-item.js.map +1 -1
  19. package/build/cjs/context-related-posts.d.ts +7 -0
  20. package/build/cjs/context-related-posts.js +5 -6
  21. package/build/cjs/context-related-posts.js.map +1 -1
  22. package/build/es/context-blog-feed.d.mts +7 -0
  23. package/build/es/context-blog-feed.mjs +5 -6
  24. package/build/es/context-blog-feed.mjs.map +1 -1
  25. package/build/es/context-post-by-id.mjs +916 -894
  26. package/build/es/context-post-by-id.mjs.map +1 -1
  27. package/build/es/context-post-by-slug.mjs +146 -124
  28. package/build/es/context-post-by-slug.mjs.map +1 -1
  29. package/build/es/context-post-list-item.d.mts +8 -3
  30. package/build/es/context-post-list-item.mjs +896 -873
  31. package/build/es/context-post-list-item.mjs.map +1 -1
  32. package/build/es/context-related-posts.d.mts +7 -0
  33. package/build/es/context-related-posts.mjs +5 -6
  34. package/build/es/context-related-posts.mjs.map +1 -1
  35. package/build/internal/cjs/context-blog-feed.d.ts +7 -0
  36. package/build/internal/cjs/context-post-list-item.d.ts +8 -3
  37. package/build/internal/cjs/context-related-posts.d.ts +7 -0
  38. package/build/internal/es/context-blog-feed.d.mts +7 -0
  39. package/build/internal/es/context-post-list-item.d.mts +8 -3
  40. package/build/internal/es/context-related-posts.d.mts +7 -0
  41. package/package.json +2 -2
@@ -72,20 +72,20 @@ var S = class extends Error {
72
72
  }
73
73
  };
74
74
  var C = (e6, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
75
- var ee = (e6) => e6?.method && [`post`, `put`, `patch`].includes(e6.method.toLocaleLowerCase()) && e6.body ? { "Content-Type": `application/json` } : {};
76
- var w = (e6) => e6 && typeof e6 == `object` && !Array.isArray(e6);
77
- var T = (e6) => e6.__type === `host`;
78
- function te(e6, t2) {
75
+ var w = (e6) => e6?.method && [`post`, `put`, `patch`].includes(e6.method.toLocaleLowerCase()) && e6.body ? { "Content-Type": `application/json` } : {};
76
+ var T = (e6) => e6 && typeof e6 == `object` && !Array.isArray(e6);
77
+ var E = (e6) => e6.__type === `host`;
78
+ function ee(e6, t2) {
79
79
  return e6.create(t2);
80
80
  }
81
- var ne = `x-wix-bi-gateway`;
82
- function re(e6, t2, n2) {
83
- return { [ne]: ie({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e6.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e6.methodFqn, entity: e6.entityFqdn }) };
81
+ var te = `x-wix-bi-gateway`;
82
+ function ne(e6, t2, n2) {
83
+ return { [te]: re({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e6.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e6.methodFqn, entity: e6.entityFqdn }) };
84
84
  }
85
- function ie(e6) {
85
+ function re(e6) {
86
86
  return Object.entries(e6).filter(([e7, t2]) => !!t2).map(([e7, t2]) => `${e7}=${t2}`).join(`,`);
87
87
  }
88
- function ae(e6) {
88
+ function ie(e6) {
89
89
  let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
90
90
  globalThis.__wix_context__ = void 0, h.client = void 0, h.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
91
91
  try {
@@ -94,82 +94,82 @@ function ae(e6) {
94
94
  globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
95
95
  }
96
96
  }
97
- var oe = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
98
- function se(e6) {
99
- return fe(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
97
+ var ae = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
98
+ function oe(e6) {
99
+ return de(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
100
100
  }
101
- var ce = /([\p{Ll}\d])(\p{Lu})/gu;
102
- var le = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
103
- var ue = `$1\0$2`;
104
- var de = /[^\p{L}\d]+/giu;
105
- function fe(e6) {
101
+ var se = /([\p{Ll}\d])(\p{Lu})/gu;
102
+ var ce = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
103
+ var le = `$1\0$2`;
104
+ var ue = /[^\p{L}\d]+/giu;
105
+ function de(e6) {
106
106
  let t2 = e6.trim();
107
- t2 = t2.replace(ce, ue).replace(le, ue), t2 = t2.replace(de, `\0`);
107
+ t2 = t2.replace(se, le).replace(ce, le), t2 = t2.replace(ue, `\0`);
108
108
  let n2 = 0, r2 = t2.length;
109
109
  for (; t2.charAt(n2) === `\0`; ) n2++;
110
110
  if (n2 === r2) return [];
111
111
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
112
112
  return t2.slice(n2, r2).split(/\0/g);
113
113
  }
114
- var pe = (e6) => `validationError` in (e6.response?.data?.details ?? {});
115
- var me = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
116
- var he = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
117
- function ge(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
114
+ var fe = (e6) => `validationError` in (e6.response?.data?.details ?? {});
115
+ var pe = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
116
+ var me = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
117
+ function he(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
118
118
  if (typeof e6 != `object` || !e6) throw e6;
119
- if (pe(e6)) return _e(e6, t2, n2);
120
- if (me(e6)) return ve(e6);
121
- if (he(e6)) {
122
- let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: se(n3), data: {} }, requestId: e6.requestId };
123
- return E(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
119
+ if (fe(e6)) return ge(e6, t2, n2);
120
+ if (pe(e6)) return _e(e6);
121
+ if (me(e6)) {
122
+ let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: oe(n3), data: {} }, requestId: e6.requestId };
123
+ return D(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
124
124
  }
125
- return ye(e6);
125
+ return ve(e6);
126
126
  }
127
- var _e = (e6, t2, n2) => {
128
- let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = be(t2, a2, n2)?.sort((e7, t3) => e7.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e7, description: t3 }) => `"${e7}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
129
- return E(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
127
+ var ge = (e6, t2, n2) => {
128
+ let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = ye(t2, a2, n2)?.sort((e7, t3) => e7.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e7, description: t3 }) => `"${e7}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
129
+ return D(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
130
130
  };
131
- var E = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
132
- var ve = (e6) => {
133
- let t2 = e6.response?.status, n2 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n2, i2 = e6.response?.data?.details?.applicationError?.description ?? n2, a2 = e6.response?.data?.details?.applicationError?.code ?? se(n2), o2 = e6.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e6.requestId };
134
- return E(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
131
+ var D = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
132
+ var _e = (e6) => {
133
+ let t2 = e6.response?.status, n2 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n2, i2 = e6.response?.data?.details?.applicationError?.description ?? n2, a2 = e6.response?.data?.details?.applicationError?.code ?? oe(n2), o2 = e6.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e6.requestId };
134
+ return D(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
135
135
  };
136
- var ye = (e6) => E(e6, { message: e6.requestId ? `System error occurred, request-id: ${e6.requestId}` : `System error occurred: ${JSON.stringify(e6)}`, extraProperties: { requestId: e6.requestId, status: e6.response?.status, code: se(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
137
- var be = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
136
+ var ve = (e6) => D(e6, { message: e6.requestId ? `System error occurred, request-id: ${e6.requestId}` : `System error occurred: ${JSON.stringify(e6)}`, extraProperties: { requestId: e6.requestId, status: e6.response?.status, code: oe(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
137
+ var ye = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
138
138
  let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
139
139
  return r2?.filter((e7) => !r2.some((t3) => t3.field.length > e7.field.length && t3.field.startsWith(e7.field) && o2.includes(t3.field))).map((e7) => {
140
140
  let r3 = t2[e7.field];
141
- if (r3) return { ...e7, field: xe(r3, i2) };
141
+ if (r3) return { ...e7, field: be(r3, i2) };
142
142
  let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
143
143
  if (s2) {
144
144
  let t3 = a2[s2];
145
- if (t3) return { ...e7, field: e7.field.replace(s2, xe(t3, i2)) };
145
+ if (t3) return { ...e7, field: e7.field.replace(s2, be(t3, i2)) };
146
146
  }
147
147
  return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
148
148
  });
149
149
  };
150
- var xe = (e6, t2) => {
151
- let n2 = Se(e6);
150
+ var be = (e6, t2) => {
151
+ let n2 = xe(e6);
152
152
  return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
153
153
  };
154
- var Se = (e6) => {
154
+ var xe = (e6) => {
155
155
  let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
156
156
  return t2 && t2.groups && Number(t2.groups.argIndex);
157
157
  };
158
- function Ce(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
159
- return ae(() => e6({ request: async (e7) => {
158
+ function Se(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
159
+ return ie(() => e6({ request: async (e7) => {
160
160
  let i3 = e7({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
161
161
  a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
162
162
  let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? x : o3}${a3.url}`;
163
163
  a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
164
164
  try {
165
- let e8 = re(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e8 } }, s3 = await n2(u3, o4);
165
+ let e8 = ne(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e8 } }, s3 = await n2(u3, o4);
166
166
  if (s3.status !== 200) {
167
167
  let e9 = null;
168
168
  try {
169
169
  e9 = await s3.json();
170
170
  } catch {
171
171
  }
172
- let t3 = Te(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = ge(t3);
172
+ let t3 = we(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = he(t3);
173
173
  throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
174
174
  }
175
175
  let l3 = await s3.json();
@@ -179,18 +179,18 @@ function Ce(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
179
179
  }
180
180
  }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
181
181
  }
182
- var we = class extends Error {
182
+ var Ce = class extends Error {
183
183
  response;
184
184
  requestId;
185
185
  constructor(e6) {
186
186
  super(), this.response = e6.response, this.requestId = e6.requestId;
187
187
  }
188
188
  };
189
- var Te = (e6, t2, n2, r2) => new we({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2 }, status: e6 }, requestId: r2?.requestId });
190
- var Ee = `.`;
191
- function De(e6, t2, n2) {
189
+ var we = (e6, t2, n2, r2) => new Ce({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2 }, status: e6 }, requestId: r2?.requestId });
190
+ var Te = `.`;
191
+ function Ee(e6, t2, n2) {
192
192
  if (e6 == null) throw Error(`Cannot set value on null or undefined`);
193
- let r2 = Oe(t2), i2 = e6;
193
+ let r2 = De(t2), i2 = e6;
194
194
  for (let e7 = 0; e7 < r2.length; e7++) {
195
195
  let t3 = r2[e7];
196
196
  if (e7 === r2.length - 1) {
@@ -202,21 +202,21 @@ function De(e6, t2, n2) {
202
202
  }
203
203
  return e6;
204
204
  }
205
- function Oe(e6) {
206
- return Array.isArray(e6) ? e6 : e6.split(Ee).map((e7) => ke(e7) ? Number(e7) : e7);
205
+ function De(e6) {
206
+ return Array.isArray(e6) ? e6 : e6.split(Te).map((e7) => Oe(e7) ? Number(e7) : e7);
207
207
  }
208
- function ke(e6) {
208
+ function Oe(e6) {
209
209
  return /^\d+$/.test(e6);
210
210
  }
211
- function Ae(e6) {
211
+ function ke(e6) {
212
212
  let t2 = {};
213
- for (let [n2, r2] of Object.entries(e6)) je(n2) || De(t2, Oe(n2), r2);
213
+ for (let [n2, r2] of Object.entries(e6)) Ae(n2) || Ee(t2, De(n2), r2);
214
214
  return t2;
215
215
  }
216
- function je(e6) {
216
+ function Ae(e6) {
217
217
  return e6 === `__proto__` || e6 === `constructor` || e6 === `prototype`;
218
218
  }
219
- var Me = class {
219
+ var je = class {
220
220
  BRACKET_PATTERN = /\[(\d+)\]/g;
221
221
  NUMERIC_PATTERN = /^\d+$/;
222
222
  ESCAPED_DOT_PATTERN = /\\\./g;
@@ -239,7 +239,7 @@ var Me = class {
239
239
  return e6.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
240
240
  }
241
241
  unflatten() {
242
- return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])), Ae(this.cleanedModifiedFields);
242
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])), ke(this.cleanedModifiedFields);
243
243
  }
244
244
  flatten(e6) {
245
245
  let t2 = {};
@@ -259,12 +259,12 @@ var Me = class {
259
259
  if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
260
260
  r2.push(`[${e7}]`), n2 = n2[parseInt(e7, 10)];
261
261
  }, a2 = (e7, t3) => {
262
- let i3 = e7 in oe ? oe[e7] : void 0;
262
+ let i3 = e7 in ae ? ae[e7] : void 0;
263
263
  if (i3 && i3 in t3) {
264
264
  r2.push(i3), n2 = t3[i3];
265
265
  return;
266
266
  }
267
- let a3 = Ie(e7);
267
+ let a3 = Fe(e7);
268
268
  if (a3 && a3 in t3) r2.push(a3), n2 = t3[a3];
269
269
  else throw Error(`Cannot find key '${e7}' or its transformations at path ${this.buildPathString(r2)}`);
270
270
  }, o2 = (e7, t3) => {
@@ -288,28 +288,28 @@ var Me = class {
288
288
  return e6.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e6[r2 - 1] === `\\` ? t2 : `.` + n2);
289
289
  }
290
290
  };
291
- function Ne(e6, t2) {
291
+ function Me(e6, t2) {
292
292
  let n2 = e6?.modifiedFields;
293
293
  if (!n2) return null;
294
- let r2 = Pe(n2);
294
+ let r2 = Ne(n2);
295
295
  if (!r2) return null;
296
296
  let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
297
297
  e6 = { ...e6, modifiedFields: i2 };
298
298
  let o2 = t2(e6), s2 = o2?.modifiedFields;
299
299
  if (!s2) return null;
300
- let c2 = Fe(s2, a2);
300
+ let c2 = Pe(s2, a2);
301
301
  return c2 === null ? null : (o2.modifiedFields = c2, o2);
302
302
  }
303
- function Pe(e6) {
303
+ function Ne(e6) {
304
304
  if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
305
- let t2 = new Me(e6);
305
+ let t2 = new je(e6);
306
306
  return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
307
307
  } catch {
308
308
  return null;
309
309
  }
310
310
  return null;
311
311
  }
312
- function Fe(e6, t2) {
312
+ function Pe(e6, t2) {
313
313
  if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
314
314
  return t2.flatten(e6);
315
315
  } catch {
@@ -317,10 +317,10 @@ function Fe(e6, t2) {
317
317
  }
318
318
  return null;
319
319
  }
320
- function Ie(e6) {
320
+ function Fe(e6) {
321
321
  return e6.replace(/[-_\s]+(.)?/g, (e7, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e7) => e7.toLowerCase());
322
322
  }
323
- function Le() {
323
+ function Ie() {
324
324
  return { emit(e6, ...t2) {
325
325
  for (let n2 = 0, r2 = this.events[e6] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
326
326
  }, events: {}, on(e6, t2) {
@@ -329,8 +329,8 @@ function Le() {
329
329
  };
330
330
  } };
331
331
  }
332
- var Re = (e6) => e6.__type === `event-definition`;
333
- function ze(e6, t2, n2, r2) {
332
+ var Le = (e6) => e6.__type === `event-definition`;
333
+ function Re(e6, t2, n2, r2) {
334
334
  let i2;
335
335
  if (e6.isDomainEvent) {
336
336
  let { deletedEvent: e7, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
@@ -341,14 +341,14 @@ function ze(e6, t2, n2, r2) {
341
341
  let e7 = s2.modifiedFields;
342
342
  if (typeof e7 == `object` && e7 && !Array.isArray(e7)) {
343
343
  o2 = structuredClone(i2);
344
- let e8 = Ne(s2, a2);
344
+ let e8 = Me(s2, a2);
345
345
  if (e8) return t2(e8);
346
346
  }
347
347
  }
348
348
  return t2(a2(o2));
349
349
  }
350
- function Be(e6) {
351
- let t2 = /* @__PURE__ */ new Map(), n2 = Le();
350
+ function ze(e6) {
351
+ let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
352
352
  return { initModule(e7) {
353
353
  return (r2) => {
354
354
  let i2 = t2.get(e7.type) ?? [];
@@ -358,7 +358,7 @@ function Be(e6) {
358
358
  let { eventType: r2, identity: i2, instanceId: a2, payload: o2, accountInfo: s2 } = await this.parseJWT(e7), c2 = [...n3.expectedEvents, ...Array.from(t2.keys()).map((e8) => ({ type: e8 }))];
359
359
  if (c2.length > 0 && !c2.some(({ type: e8 }) => e8 === r2)) throw Error(`Unexpected event type: ${r2}. Expected one of: ${c2.map((e8) => e8.type).join(`, `)}`);
360
360
  let l2 = t2.get(r2) ?? [];
361
- return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) => ze(e8, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
361
+ return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) => Re(e8, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
362
362
  }, async processRequest(e7, t3) {
363
363
  let n3 = await e7.text();
364
364
  return this.process(n3, t3);
@@ -377,12 +377,12 @@ function Be(e6) {
377
377
  let n3 = Array.from(t2.keys()).map((e8) => ({ type: e8 }));
378
378
  if (n3.length > 0 && !n3.some(({ type: t3 }) => t3 === e7.eventType)) throw Error(`Unexpected event type: ${e7.eventType}. Expected one of: ${n3.map((e8) => e8.type).join(`, `)}`);
379
379
  let r2 = t2.get(e7.eventType) ?? [];
380
- await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => ze(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
380
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Re(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
381
381
  }, apps: { AppInstalled: g(`AppInstalled`)(), AppRemoved: g(`AppRemoved`)() } } };
382
382
  }
383
- var Ve = (e6) => e6.__type === `service-plugin-definition`;
384
- function He(e6) {
385
- let t2 = /* @__PURE__ */ new Map(), n2 = Le();
383
+ var Be = (e6) => e6.__type === `service-plugin-definition`;
384
+ function Ve(e6) {
385
+ let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
386
386
  return { initModule(e7) {
387
387
  return (r2) => {
388
388
  let i2 = t2.get(e7.componentType.toLowerCase()) ?? [];
@@ -423,43 +423,43 @@ function He(e6) {
423
423
  return s2.transformations.toREST(await c2(s2.transformations.fromREST(e7)));
424
424
  } } };
425
425
  }
426
- var D = `X-Wix-Consistent`;
427
- function Ue(e6) {
426
+ var O = `X-Wix-Consistent`;
427
+ function He(e6) {
428
428
  let t2 = e6.headers || { Authorization: `` }, n2 = { getAuthHeaders: (e7) => Promise.resolve({ headers: {} }) }, r2 = e6.auth, i2 = typeof r2 == `function` ? r2 : () => r2 ?? n2, a2 = () => i2().getAuthHeaders(e6.host), o2 = () => e6.fetch ?? fetch, s2 = async (n3, r3) => {
429
- let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [D]: t2[D] } : {} }, l3 = e6.host?.getErrorHandler?.();
429
+ let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [O]: t2[O] } : {} }, l3 = e6.host?.getErrorHandler?.();
430
430
  try {
431
431
  if (typeof n3 == `string` || n3 instanceof URL) {
432
432
  let e7 = await i3(n3, { ...r3, headers: c3 });
433
433
  l3?.handleError(e7, { requestOptions: { url: n3.toString(), method: r3?.method } });
434
- let a3 = We(e7);
435
- return a3 && (t2[D] = a3), e7;
434
+ let a3 = Ue(e7);
435
+ return a3 && (t2[O] = a3), e7;
436
436
  }
437
437
  {
438
438
  for (let [e8, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e8, t3);
439
439
  let e7 = await i3(n3, r3);
440
440
  l3?.handleError(e7, { requestOptions: { url: n3.url, method: r3?.method } });
441
- let a3 = We(e7);
442
- return a3 && (t2[D] = a3), e7;
441
+ let a3 = Ue(e7);
442
+ return a3 && (t2[O] = a3), e7;
443
443
  }
444
444
  } catch (e7) {
445
445
  throw l3?.handleError(e7, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e7;
446
446
  }
447
- }, { client: c2, initModule: l2 } = He(i2), { client: u2, initModule: d2 } = Be(i2), f2 = async (n3, r3) => {
448
- let i3 = o2(), s3 = await a2(), c3 = ee(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [D]: t2[D] } : {} } }), u3 = We(l3);
449
- return u3 && (t2[D] = u3), l3;
447
+ }, { client: c2, initModule: l2 } = Ve(i2), { client: u2, initModule: d2 } = ze(i2), f2 = async (n3, r3) => {
448
+ let i3 = o2(), s3 = await a2(), c3 = w(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [O]: t2[O] } : {} } }), u3 = Ue(l3);
449
+ return u3 && (t2[O] = u3), l3;
450
450
  }, p2 = (t3, n3) => {
451
- if (Re(t3)) return d2(t3);
452
- if (Ve(t3)) return l2(t3);
453
- if (T(t3) && e6.host) return te(t3, e6.host);
451
+ if (Le(t3)) return d2(t3);
452
+ if (Be(t3)) return l2(t3);
453
+ if (E(t3) && e6.host) return ee(t3, e6.host);
454
454
  if (typeof t3 == `function`) {
455
455
  if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
456
456
  let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e6.useCDN === void 0 ? i2().shouldUseCDN : e6.useCDN;
457
- return Ce(ae(() => y(t3)) ? v(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
457
+ return Se(ie(() => y(t3)) ? v(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
458
458
  let n4 = new URL(e7, `https://${r3}`);
459
459
  return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
460
460
  }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e6.host?.name, o3, e6.validateRequestSchema);
461
461
  }
462
- return w(t3) ? Object.fromEntries(Object.entries(t3).map(([e7, n4]) => [e7, p2(n4, t3[b])])) : t3;
462
+ return T(t3) ? Object.fromEntries(Object.entries(t3).map(([e7, n4]) => [e7, p2(n4, t3[b])])) : t3;
463
463
  }, m2 = (e7) => {
464
464
  for (let n3 in e7) t2[n3] = e7[n3];
465
465
  };
@@ -478,22 +478,22 @@ function Ue(e6) {
478
478
  return { data: o3 ?? {}, errors: s3 };
479
479
  }, webhooks: u2, servicePlugins: c2 };
480
480
  }
481
- function We(e6) {
481
+ function Ue(e6) {
482
482
  return e6.headers?.get(`X-Wix-Consistent`) ?? e6.headers?.get(`x-wix-consistent`);
483
483
  }
484
- var Ge = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
485
- var Ke = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
486
- var qe = `items`;
487
- var Je = `pagingMetadata`;
488
- var Ye = Ge;
489
- function Xe(e6, t2) {
484
+ var We = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
485
+ var Ge = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
486
+ var Ke = `items`;
487
+ var qe = `pagingMetadata`;
488
+ var Je = We;
489
+ function Ye(e6, t2) {
490
490
  return e6?.split(`.`).map((e7) => t2?.[e7] ?? e7).join(`.`);
491
491
  }
492
- var Ze = `sort.fieldName`;
493
- function Qe(e6, t2, n2) {
494
- return (e6 === Ze || e6.endsWith(`.${Ze}`)) && typeof t2 == `string` ? Xe(t2, n2) : t2;
492
+ var Xe = `sort.fieldName`;
493
+ function Ze(e6, t2, n2) {
494
+ return (e6 === Xe || e6.endsWith(`.${Xe}`)) && typeof t2 == `string` ? Ye(t2, n2) : t2;
495
495
  }
496
- function $e(e6, t2, n2) {
496
+ function Qe(e6, t2, n2) {
497
497
  let r2 = (e7) => n2.includes(e7), i2 = (e7, n3) => {
498
498
  if (Array.isArray(e7)) e7.forEach((e8) => {
499
499
  i2(e8, n3);
@@ -503,22 +503,22 @@ function $e(e6, t2, n2) {
503
503
  Object.keys(a2).forEach((e8) => {
504
504
  let o2 = n3 === `` ? e8 : `${n3}.${e8}`;
505
505
  if (r2(o2)) return;
506
- let s2 = et(e8, t2);
507
- s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] = Qe(o2, a2[s2], t2), i2(a2[s2], o2);
506
+ let s2 = $e(e8, t2);
507
+ s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] = Ze(o2, a2[s2], t2), i2(a2[s2], o2);
508
508
  });
509
509
  }
510
510
  };
511
511
  return i2(e6, ``), e6;
512
512
  }
513
- function et(e6, t2) {
513
+ function $e(e6, t2) {
514
514
  let n2;
515
515
  return n2 = e6.includes(`.`) ? e6.split(`.`).map((e7) => t2[e7] ?? e7).join(`.`) : t2[e6] ?? e6, n2;
516
516
  }
517
- function O(e6, t2 = []) {
518
- return $e(e6, Ge, t2);
519
- }
520
517
  function k(e6, t2 = []) {
521
- return $e(e6, Ke, t2);
518
+ return Qe(e6, We, t2);
519
+ }
520
+ function et(e6, t2 = []) {
521
+ return Qe(e6, Ge, t2);
522
522
  }
523
523
  function tt(e6) {
524
524
  return e6?.toISOString();
@@ -549,101 +549,101 @@ function ct(e6) {
549
549
  let t2 = rt.get(e6);
550
550
  return t2 || (t2 = st(e6), rt.set(e6, t2)), t2;
551
551
  }
552
- function A(e6) {
552
+ function lt(e6) {
553
553
  return typeof e6 == `object` && !!e6;
554
554
  }
555
- function lt(e6, { isRepeated: t2, isMap: n2 }, r2) {
556
- return t2 ? Array.isArray(e6) ? e6.map(r2) : e6 : n2 ? A(e6) ? Object.fromEntries(Object.entries(e6).map(([e7, t3]) => [e7, r2(t3)])) : e6 : r2(e6);
555
+ function ut(e6, { isRepeated: t2, isMap: n2 }, r2) {
556
+ return t2 ? Array.isArray(e6) ? e6.map(r2) : e6 : n2 ? lt(e6) ? Object.fromEntries(Object.entries(e6).map(([e7, t3]) => [e7, r2(t3)])) : e6 : r2(e6);
557
557
  }
558
- function j(e6, t2, n2) {
559
- A(e6) && ft(e6, t2, n2);
558
+ function dt(e6, t2, n2) {
559
+ lt(e6) && mt(e6, t2, n2);
560
560
  }
561
- function ut(e6, t2, n2) {
561
+ function ft(e6, t2, n2) {
562
562
  for (let [r2, i2] of t2) {
563
563
  if (!(r2 in e6)) continue;
564
- if (i2.leaves) for (let t4 of i2.leaves) e6[r2] = lt(e6[r2], t4, n2);
564
+ if (i2.leaves) for (let t4 of i2.leaves) e6[r2] = ut(e6[r2], t4, n2);
565
565
  let t3 = e6[r2];
566
- Array.isArray(t3) ? t3.forEach((e7) => j(e7, i2, n2)) : j(t3, i2, n2);
566
+ Array.isArray(t3) ? t3.forEach((e7) => dt(e7, i2, n2)) : dt(t3, i2, n2);
567
567
  }
568
568
  }
569
- function dt(e6, t2, n2) {
569
+ function pt(e6, t2, n2) {
570
570
  for (let [r2, i2] of t2) {
571
571
  let t3 = e6[r2];
572
- A(t3) && Object.values(t3).forEach((e7) => j(e7, i2, n2));
572
+ lt(t3) && Object.values(t3).forEach((e7) => dt(e7, i2, n2));
573
573
  }
574
574
  }
575
- function ft(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
576
- t2 && ut(e6, t2, i2), n2 && dt(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => j(e7, r2, i2));
575
+ function mt(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
576
+ t2 && ft(e6, t2, i2), n2 && pt(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => dt(e7, r2, i2));
577
577
  }
578
- function M(e6, t2) {
579
- if (!A(e6)) return e6;
580
- for (let { paths: n2, transformFn: r2 } of t2) ft(e6, ct(n2), r2);
578
+ function A(e6, t2) {
579
+ if (!lt(e6)) return e6;
580
+ for (let { paths: n2, transformFn: r2 } of t2) mt(e6, ct(n2), r2);
581
581
  return e6;
582
582
  }
583
- function pt(e6) {
584
- return vt(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
583
+ function ht(e6) {
584
+ return bt(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
585
585
  }
586
- var mt = /([\p{Ll}\d])(\p{Lu})/gu;
587
- var ht = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
588
- var gt = `$1\0$2`;
589
- var _t = /[^\p{L}\d]+/giu;
590
- function vt(e6) {
586
+ var gt = /([\p{Ll}\d])(\p{Lu})/gu;
587
+ var _t = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
588
+ var vt = `$1\0$2`;
589
+ var yt = /[^\p{L}\d]+/giu;
590
+ function bt(e6) {
591
591
  let t2 = e6.trim();
592
- t2 = t2.replace(mt, gt).replace(ht, gt), t2 = t2.replace(_t, `\0`);
592
+ t2 = t2.replace(gt, vt).replace(_t, vt), t2 = t2.replace(yt, `\0`);
593
593
  let n2 = 0, r2 = t2.length;
594
594
  for (; t2.charAt(n2) === `\0`; ) n2++;
595
595
  if (n2 === r2) return [];
596
596
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
597
597
  return t2.slice(n2, r2).split(/\0/g);
598
598
  }
599
- var yt = (e6) => `validationError` in (e6.response?.data?.details ?? {});
600
- var bt = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
601
- var xt = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
602
- function N(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
599
+ var xt = (e6) => `validationError` in (e6.response?.data?.details ?? {});
600
+ var St = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
601
+ var Ct = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
602
+ function j(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
603
603
  if (typeof e6 != `object` || !e6) throw e6;
604
- if (yt(e6)) return St(e6, t2, n2);
605
- if (bt(e6)) return wt(e6);
606
- if (xt(e6)) {
607
- let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: pt(n3), data: {} }, requestId: e6.requestId };
608
- return Ct(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
604
+ if (xt(e6)) return wt(e6, t2, n2);
605
+ if (St(e6)) return Tt(e6);
606
+ if (Ct(e6)) {
607
+ let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: ht(n3), data: {} }, requestId: e6.requestId };
608
+ return M(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
609
609
  }
610
- return Tt(e6);
610
+ return Et(e6);
611
611
  }
612
- var St = (e6, t2, n2) => {
613
- let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Et(t2, a2, n2)?.sort((e7, t3) => e7.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e7, description: t3 }) => `"${e7}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
614
- return Ct(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
612
+ var wt = (e6, t2, n2) => {
613
+ let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Dt(t2, a2, n2)?.sort((e7, t3) => e7.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e7, description: t3 }) => `"${e7}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
614
+ return M(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
615
615
  };
616
- var Ct = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
617
- var wt = (e6) => {
618
- let t2 = e6.response?.status, n2 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n2, i2 = e6.response?.data?.details?.applicationError?.description ?? n2, a2 = e6.response?.data?.details?.applicationError?.code ?? pt(n2), o2 = e6.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e6.requestId };
619
- return Ct(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
616
+ var M = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
617
+ var Tt = (e6) => {
618
+ let t2 = e6.response?.status, n2 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n2, i2 = e6.response?.data?.details?.applicationError?.description ?? n2, a2 = e6.response?.data?.details?.applicationError?.code ?? ht(n2), o2 = e6.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e6.requestId };
619
+ return M(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
620
620
  };
621
- var Tt = (e6) => Ct(e6, { message: e6.requestId ? `System error occurred, request-id: ${e6.requestId}` : `System error occurred: ${JSON.stringify(e6)}`, extraProperties: { requestId: e6.requestId, status: e6.response?.status, code: pt(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
622
- var Et = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
621
+ var Et = (e6) => M(e6, { message: e6.requestId ? `System error occurred, request-id: ${e6.requestId}` : `System error occurred: ${JSON.stringify(e6)}`, extraProperties: { requestId: e6.requestId, status: e6.response?.status, code: ht(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
622
+ var Dt = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
623
623
  let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
624
624
  return r2?.filter((e7) => !r2.some((t3) => t3.field.length > e7.field.length && t3.field.startsWith(e7.field) && o2.includes(t3.field))).map((e7) => {
625
625
  let r3 = t2[e7.field];
626
- if (r3) return { ...e7, field: Dt(r3, i2) };
626
+ if (r3) return { ...e7, field: Ot(r3, i2) };
627
627
  let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
628
628
  if (s2) {
629
629
  let t3 = a2[s2];
630
- if (t3) return { ...e7, field: e7.field.replace(s2, Dt(t3, i2)) };
630
+ if (t3) return { ...e7, field: e7.field.replace(s2, Ot(t3, i2)) };
631
631
  }
632
632
  return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
633
633
  });
634
634
  };
635
- var Dt = (e6, t2) => {
636
- let n2 = Ot(e6);
635
+ var Ot = (e6, t2) => {
636
+ let n2 = kt(e6);
637
637
  return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
638
638
  };
639
- var Ot = (e6) => {
639
+ var kt = (e6) => {
640
640
  let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
641
641
  return t2 && t2.groups && Number(t2.groups.argIndex);
642
642
  };
643
- function kt() {
643
+ function At() {
644
644
  let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
645
645
  if (e6) return { initWixModules(t3, n3) {
646
- return At(() => e6(t3, n3));
646
+ return jt(() => e6(t3, n3));
647
647
  }, fetchWithAuth() {
648
648
  throw Error(`fetchWithAuth is not available in this context`);
649
649
  }, graphql() {
@@ -653,10 +653,10 @@ function kt() {
653
653
  if (t2 || n2) return { initWixModules(e7, r2) {
654
654
  if (r2) {
655
655
  if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
656
- return At(() => n2.use(e7));
656
+ return jt(() => n2.use(e7));
657
657
  }
658
658
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
659
- return At(() => t2.use(e7));
659
+ return jt(() => t2.use(e7));
660
660
  }, fetchWithAuth: (e7, n3) => {
661
661
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
662
662
  return t2.fetchWithAuth(e7, n3);
@@ -668,7 +668,7 @@ function kt() {
668
668
  return t2.graphql(e7, n3, r2);
669
669
  } };
670
670
  }
671
- function At(e6) {
671
+ function jt(e6) {
672
672
  let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
673
673
  globalThis.__wix_context__ = void 0, h.client = void 0, h.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
674
674
  try {
@@ -677,14 +677,14 @@ function At(e6) {
677
677
  globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
678
678
  }
679
679
  }
680
- function jt(e6, t2) {
680
+ function Mt(e6, t2) {
681
681
  return (...n2) => {
682
- let r2 = kt();
682
+ let r2 = At();
683
683
  return r2 ? r2.initWixModules(e6, t2).apply(void 0, n2) : e6.apply(void 0, n2);
684
684
  };
685
685
  }
686
- function Mt(e6, t2 = false) {
687
- return jt(e6, t2);
686
+ function N(e6, t2 = false) {
687
+ return Mt(e6, t2);
688
688
  }
689
689
  function Nt(e6, t2) {
690
690
  let n2 = Ft(e6), r2 = Object.entries(n2).some(([e7, t3]) => e7.includes(`.`) || Array.isArray(t3) && t3.some((e8) => typeof e8 == `object`));
@@ -851,7 +851,7 @@ var mn = `x-wix-linguist`;
851
851
  var hn = `00000000-0000-0000-0000-000000000000`;
852
852
  var gn = `false`;
853
853
  var _n = () => {
854
- let e6 = bn(`language`), t2 = bn(`locale`);
854
+ let e6 = P(`language`), t2 = P(`locale`);
855
855
  if (e6) return { [mn]: [e6, t2 || e6, gn, hn].join(`|`) };
856
856
  };
857
857
  function vn() {
@@ -861,15 +861,15 @@ function vn() {
861
861
  }), resolve: e6, reject: t2 };
862
862
  }
863
863
  var yn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
864
- var bn = (e6) => yn()?.[e6];
865
- var xn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
866
- let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = Cn();
867
- return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: bn(`language`), locale: bn(`locale`), get passThroughHeaders() {
864
+ var P = (e6) => yn()?.[e6];
865
+ var bn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
866
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = Sn();
867
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: P(`language`), locale: P(`locale`), get passThroughHeaders() {
868
868
  return _n();
869
869
  } } };
870
870
  }, auth: (e7) => {
871
871
  let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
872
- !e7 && Sn() && (e7 = t2?.getAccessTokenFunction?.());
872
+ !e7 && xn() && (e7 = t2?.getAccessTokenFunction?.());
873
873
  let n2 = false, { resolve: r2, promise: i2 } = vn();
874
874
  return { getAuthHeaders: async () => {
875
875
  if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
@@ -878,60 +878,60 @@ var xn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host:
878
878
  r2(e8);
879
879
  }) };
880
880
  } });
881
- function Sn() {
881
+ function xn() {
882
882
  return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
883
883
  }
884
- function Cn() {
884
+ function Sn() {
885
885
  let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
886
886
  if (!e6) return;
887
887
  let t2 = new URL(e6);
888
888
  return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
889
889
  }
890
- var wn = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
890
+ var Cn = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
891
891
  if (!e6) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
892
892
  return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
893
893
  }, getAccessToken: () => {
894
894
  throw Error(`Not implemented`);
895
895
  }, observeState: () => ({ disconnect: () => {
896
896
  } }) });
897
- var Tn = xn({ createHost: function(e6) {
897
+ var wn = bn({ createHost: function(e6) {
898
898
  let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
899
899
  if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
900
- return { channel: wn({ clientSdk: t2, applicationId: n2 }), close: () => {
900
+ return { channel: Cn({ clientSdk: t2, applicationId: n2 }), close: () => {
901
901
  } };
902
902
  } });
903
- var En = (e6, t2) => {
904
- let n2 = Tn.host({ applicationId: e6, componentId: t2 }), r2 = Tn.auth();
905
- return Ue({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
906
- };
907
- var Dn = (e6) => En(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
908
- var On = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
909
- var kn = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
910
- function An(e6, t2, { feature: n2, action: r2, level: i2 = `error`, tags: a2, contexts: o2 }) {
911
- let s2 = kn(e6, `captureException`);
903
+ var Tn = (e6, t2) => {
904
+ let n2 = wn.host({ applicationId: e6, componentId: t2 }), r2 = wn.auth();
905
+ return He({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
906
+ };
907
+ var En = (e6) => Tn(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
908
+ var Dn = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
909
+ var On = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
910
+ function kn(e6, t2, { feature: n2, action: r2, level: i2 = `error`, tags: a2, contexts: o2 }) {
911
+ let s2 = On(e6, `captureException`);
912
912
  if (!s2) return;
913
913
  let c2 = t2 instanceof Error ? t2 : Error(String(t2));
914
914
  s2.captureException(c2, { level: i2, tags: { feature: n2, action: r2, ...a2 }, ...o2 ? { contexts: o2 } : {} });
915
915
  }
916
- function jn(e6) {
916
+ function An(e6) {
917
917
  return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
918
918
  }
919
- function Mn(e6) {
919
+ function jn(e6) {
920
920
  return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
921
921
  }
922
- function Nn(e6) {
922
+ function Mn(e6) {
923
923
  return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
924
924
  }
925
- function P(e6, t2) {
926
- return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...jn(e6) ? e6.$and : [e6], ...jn(t2) ? t2.$and : [t2]] };
925
+ function F(e6, t2) {
926
+ return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...An(e6) ? e6.$and : [e6], ...An(t2) ? t2.$and : [t2]] };
927
927
  }
928
- function Pn(e6, t2) {
929
- return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...Mn(e6) ? e6.$or : [e6], ...Mn(t2) ? t2.$or : [t2]] };
928
+ function Nn(e6, t2) {
929
+ return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...jn(e6) ? e6.$or : [e6], ...jn(t2) ? t2.$or : [t2]] };
930
930
  }
931
- function Fn(e6) {
932
- if (e6 !== void 0 && Object.keys(e6).length !== 0) return Nn(e6) ? e6.$not : { $not: e6 };
931
+ function Pn(e6) {
932
+ if (e6 !== void 0 && Object.keys(e6).length !== 0) return Mn(e6) ? e6.$not : { $not: e6 };
933
933
  }
934
- var In = class {
934
+ var Fn = class {
935
935
  _items;
936
936
  _fetchNextPage;
937
937
  _fetchPrevPage;
@@ -961,7 +961,7 @@ var In = class {
961
961
  return await this._fetchPrevPage();
962
962
  }
963
963
  };
964
- var Ln = class extends In {
964
+ var In = class extends Fn {
965
965
  _nextCursor;
966
966
  _prevCursor;
967
967
  cursors;
@@ -975,7 +975,7 @@ var Ln = class extends In {
975
975
  return !!this._prevCursor;
976
976
  }
977
977
  };
978
- var Rn = class extends In {
978
+ var Ln = class extends Fn {
979
979
  _totalCount;
980
980
  _offset;
981
981
  _tooManyToCount;
@@ -998,76 +998,76 @@ var Rn = class extends In {
998
998
  return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
999
999
  }
1000
1000
  };
1001
- function zn(e6) {
1001
+ function Rn(e6) {
1002
1002
  let t2 = (n2) => ({ query: n2, async find() {
1003
1003
  try {
1004
- let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [qe]: a2, [Je]: o2 } = e6.responseTransformer(i2);
1004
+ let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [Ke]: a2, [qe]: o2 } = e6.responseTransformer(i2);
1005
1005
  if (e6.pagingMethod === `OFFSET`) {
1006
1006
  let e7 = n2;
1007
- return new Rn({ items: a2 ?? [], fetchNextPage: () => t2({ ...e7, paging: { offset: e7.paging.offset + e7.paging.limit, limit: e7.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e7.paging.offset - e7.paging.limit, 0), limit: e7.paging.limit } }).find(), offset: e7.paging.offset, limit: e7.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
1007
+ return new Ln({ items: a2 ?? [], fetchNextPage: () => t2({ ...e7, paging: { offset: e7.paging.offset + e7.paging.limit, limit: e7.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e7.paging.offset - e7.paging.limit, 0), limit: e7.paging.limit } }).find(), offset: e7.paging.offset, limit: e7.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
1008
1008
  }
1009
1009
  let s2 = n2.cursorPaging;
1010
- return new Ln({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
1010
+ return new In({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
1011
1011
  } catch (t3) {
1012
1012
  throw e6.errorTransformer(t3);
1013
1013
  }
1014
1014
  }, skipTo(e7) {
1015
1015
  return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
1016
1016
  }, eq(r2, i2) {
1017
- let a2 = i2 === void 0 ? null : i2, o2 = { [F(e6.transformationPaths, r2)]: a2 };
1018
- return t2({ ...n2, filter: P(n2.filter, o2) });
1017
+ let a2 = i2 === void 0 ? null : i2, o2 = { [I(e6.transformationPaths, r2)]: a2 };
1018
+ return t2({ ...n2, filter: F(n2.filter, o2) });
1019
1019
  }, ne(r2, i2) {
1020
- let a2 = i2 === void 0 ? null : i2, o2 = { [F(e6.transformationPaths, r2)]: { $ne: a2 } };
1021
- return t2({ ...n2, filter: P(n2.filter, o2) });
1020
+ let a2 = i2 === void 0 ? null : i2, o2 = { [I(e6.transformationPaths, r2)]: { $ne: a2 } };
1021
+ return t2({ ...n2, filter: F(n2.filter, o2) });
1022
1022
  }, ge(r2, i2) {
1023
- let a2 = { [F(e6.transformationPaths, r2)]: { $gte: i2 } };
1024
- return t2({ ...n2, filter: P(n2.filter, a2) });
1023
+ let a2 = { [I(e6.transformationPaths, r2)]: { $gte: i2 } };
1024
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1025
1025
  }, gt(r2, i2) {
1026
- let a2 = { [F(e6.transformationPaths, r2)]: { $gt: i2 } };
1027
- return t2({ ...n2, filter: P(n2.filter, a2) });
1026
+ let a2 = { [I(e6.transformationPaths, r2)]: { $gt: i2 } };
1027
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1028
1028
  }, le(r2, i2) {
1029
- let a2 = { [F(e6.transformationPaths, r2)]: { $lte: i2 } };
1030
- return t2({ ...n2, filter: P(n2.filter, a2) });
1029
+ let a2 = { [I(e6.transformationPaths, r2)]: { $lte: i2 } };
1030
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1031
1031
  }, lt(r2, i2) {
1032
- let a2 = { [F(e6.transformationPaths, r2)]: { $lt: i2 } };
1033
- return t2({ ...n2, filter: P(n2.filter, a2) });
1032
+ let a2 = { [I(e6.transformationPaths, r2)]: { $lt: i2 } };
1033
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1034
1034
  }, isNotEmpty(e7) {
1035
1035
  return this.ne(e7, null);
1036
1036
  }, isEmpty(e7) {
1037
1037
  return this.eq(e7, null);
1038
1038
  }, startsWith(r2, i2) {
1039
- let a2 = { [F(e6.transformationPaths, r2)]: { $startsWith: i2 } };
1040
- return t2({ ...n2, filter: P(n2.filter, a2) });
1039
+ let a2 = { [I(e6.transformationPaths, r2)]: { $startsWith: i2 } };
1040
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1041
1041
  }, endsWith(r2, i2) {
1042
- let a2 = { [F(e6.transformationPaths, r2)]: { $endsWith: i2 } };
1043
- return t2({ ...n2, filter: P(n2.filter, a2) });
1042
+ let a2 = { [I(e6.transformationPaths, r2)]: { $endsWith: i2 } };
1043
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1044
1044
  }, contains(r2, i2) {
1045
- let a2 = { [F(e6.transformationPaths, r2)]: { $contains: i2 } };
1046
- return t2({ ...n2, filter: P(n2.filter, a2) });
1045
+ let a2 = { [I(e6.transformationPaths, r2)]: { $contains: i2 } };
1046
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1047
1047
  }, hasSome(r2, ...i2) {
1048
- let a2 = { [F(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
1049
- return t2({ ...n2, filter: P(n2.filter, a2) });
1048
+ let a2 = { [I(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
1049
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1050
1050
  }, hasAll(r2, ...i2) {
1051
- let a2 = { [F(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
1052
- return t2({ ...n2, filter: P(n2.filter, a2) });
1051
+ let a2 = { [I(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
1052
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1053
1053
  }, between(e7, t3, n3) {
1054
1054
  return this.ge(e7, t3).lt(e7, n3);
1055
1055
  }, in(r2, i2) {
1056
- let a2 = { [F(e6.transformationPaths, r2)]: { $in: i2 } };
1057
- return t2({ ...n2, filter: P(n2.filter, a2) });
1056
+ let a2 = { [I(e6.transformationPaths, r2)]: { $in: i2 } };
1057
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1058
1058
  }, exists(r2, i2 = true) {
1059
- let a2 = { [F(e6.transformationPaths, r2)]: { $exists: i2 } };
1060
- return t2({ ...n2, filter: P(n2.filter, a2) });
1059
+ let a2 = { [I(e6.transformationPaths, r2)]: { $exists: i2 } };
1060
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1061
1061
  }, or(e7) {
1062
- return t2({ ...n2, filter: Pn(n2.filter, e7.query.filter) });
1062
+ return t2({ ...n2, filter: Nn(n2.filter, e7.query.filter) });
1063
1063
  }, and(e7) {
1064
- return t2({ ...n2, filter: P(n2.filter, e7.query.filter) });
1064
+ return t2({ ...n2, filter: F(n2.filter, e7.query.filter) });
1065
1065
  }, not(e7) {
1066
- return t2({ ...n2, filter: Fn(e7.query.filter) });
1066
+ return t2({ ...n2, filter: Pn(e7.query.filter) });
1067
1067
  }, ascending(...r2) {
1068
- return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: F(e6.transformationPaths, t3), order: `ASC` }))] });
1068
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: I(e6.transformationPaths, t3), order: `ASC` }))] });
1069
1069
  }, descending(...r2) {
1070
- return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: F(e6.transformationPaths, t3), order: `DESC` }))] });
1070
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: I(e6.transformationPaths, t3), order: `DESC` }))] });
1071
1071
  }, skip(e7) {
1072
1072
  return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
1073
1073
  }, limit(r2) {
@@ -1080,84 +1080,84 @@ function zn(e6) {
1080
1080
  } });
1081
1081
  return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
1082
1082
  }
1083
- function F(e6, t2) {
1083
+ function I(e6, t2) {
1084
1084
  let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
1085
- return n2 ? t2.replace(n2, e6[n2]) : Xe(t2, { ...e6, ...Ye });
1086
- }
1087
- var Bn = `filter`;
1088
- var Vn = `sort`;
1089
- var Hn = `cursorPaging`;
1090
- var Un = `paging`;
1091
- var Wn = [Bn, Vn, Hn];
1092
- var Gn = [Bn, Vn, Un];
1093
- function Kn(e6, t2) {
1085
+ return n2 ? t2.replace(n2, e6[n2]) : Ye(t2, { ...e6, ...Je });
1086
+ }
1087
+ var zn = `filter`;
1088
+ var Bn = `sort`;
1089
+ var Vn = `cursorPaging`;
1090
+ var Hn = `paging`;
1091
+ var Un = [zn, Bn, Vn];
1092
+ var Wn = [zn, Bn, Hn];
1093
+ function Gn(e6, t2) {
1094
1094
  return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
1095
1095
  }
1096
+ function Kn(e6) {
1097
+ return Gn(e6, Un);
1098
+ }
1096
1099
  function qn(e6) {
1097
- return Kn(e6, Wn);
1100
+ return Gn(e6, Wn);
1098
1101
  }
1099
1102
  function Jn(e6) {
1100
- return Kn(e6, Gn);
1101
- }
1102
- function Yn(e6) {
1103
1103
  let { hasOptionsParameter: t2 } = e6;
1104
1104
  return function(...n2) {
1105
- return t2 ? Zn(n2, e6) : Xn(n2, e6);
1105
+ return t2 ? Xn(n2, e6) : Yn(n2, e6);
1106
1106
  };
1107
1107
  }
1108
- function Xn(e6, t2) {
1108
+ function Yn(e6, t2) {
1109
1109
  return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
1110
1110
  }
1111
- function Zn(e6, t2) {
1111
+ function Xn(e6, t2) {
1112
1112
  switch (e6.length) {
1113
1113
  case 0:
1114
1114
  return t2.builderQueryFunction();
1115
1115
  case 1:
1116
- return qn(e6[0]) || Jn(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
1116
+ return Kn(e6[0]) || qn(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
1117
1117
  default:
1118
1118
  return t2.typedQueryFunction(e6[0], e6[1]);
1119
1119
  }
1120
1120
  }
1121
- var Qn = [{ path: `like.createdDate` }];
1122
- var $n = [{ path: `likes.createdDate` }];
1123
- function er(e6) {
1121
+ var Zn = [{ path: `like.createdDate` }];
1122
+ var Qn = [{ path: `likes.createdDate` }];
1123
+ function $n(e6) {
1124
1124
  return Pt(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/blog-like-service`, destPath: `` }], "social-blog._base_domain_": [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/blog/v1/likes`, destPath: `/v1/likes` }], "*.dev.wix-code.com": [{ srcPath: `/blog/v1/likes`, destPath: `/v1/likes` }] } }));
1125
1125
  }
1126
- var tr = `@wix/auto_sdk_blog_likes`;
1127
- function nr(e6) {
1126
+ var er = `@wix/auto_sdk_blog_likes`;
1127
+ function tr(e6) {
1128
1128
  function t2({ host: t3 }) {
1129
- let n2 = M(e6, [{ transformFn: tt, paths: Qn }]);
1130
- return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.CreateLike`, packageName: tr, migrationOptions: { optInTransformResponse: true }, url: er({ protoPath: `/v1/likes`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => M(e7, [{ transformFn: nt, paths: Qn }]) };
1129
+ let n2 = A(e6, [{ transformFn: tt, paths: Zn }]);
1130
+ return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.CreateLike`, packageName: er, migrationOptions: { optInTransformResponse: true }, url: $n({ protoPath: `/v1/likes`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: nt, paths: Zn }]) };
1131
1131
  }
1132
1132
  return t2;
1133
1133
  }
1134
- function rr(e6) {
1134
+ function nr(e6) {
1135
1135
  function t2({ host: t3 }) {
1136
- return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.QueryLikes`, packageName: tr, migrationOptions: { optInTransformResponse: true }, url: er({ protoPath: `/v1/likes/query`, data: e6, host: t3 }), data: e6, transformResponse: (e7) => M(e7, [{ transformFn: nt, paths: $n }]) };
1136
+ return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.QueryLikes`, packageName: er, migrationOptions: { optInTransformResponse: true }, url: $n({ protoPath: `/v1/likes/query`, data: e6, host: t3 }), data: e6, transformResponse: (e7) => A(e7, [{ transformFn: nt, paths: Qn }]) };
1137
1137
  }
1138
1138
  return t2;
1139
1139
  }
1140
- function ir(e6) {
1140
+ function rr(e6) {
1141
1141
  function t2({ host: t3 }) {
1142
- return { entityFqdn: `wix.blog.v1.like`, method: `DELETE`, methodFqn: `wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId`, packageName: tr, migrationOptions: { optInTransformResponse: true }, url: er({ protoPath: `/v1/likes/fqdn/{fqdn}/entity-id/{entityId}`, data: e6, host: t3 }), params: Nt(e6) };
1142
+ return { entityFqdn: `wix.blog.v1.like`, method: `DELETE`, methodFqn: `wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId`, packageName: er, migrationOptions: { optInTransformResponse: true }, url: $n({ protoPath: `/v1/likes/fqdn/{fqdn}/entity-id/{entityId}`, data: e6, host: t3 }), params: Nt(e6) };
1143
1143
  }
1144
1144
  return t2;
1145
1145
  }
1146
- async function ar(e6) {
1147
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = nr(O({ like: e6?.like }));
1146
+ async function ir(e6) {
1147
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = tr(k({ like: e6?.like }));
1148
1148
  n2?.onSiteCall?.();
1149
1149
  try {
1150
1150
  let e7 = await t2.request(r2);
1151
- return n2?.onSuccess?.(e7), k(e7.data)?.like;
1151
+ return n2?.onSuccess?.(e7), et(e7.data)?.like;
1152
1152
  } catch (e7) {
1153
- let t3 = N(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { like: `$[0].like` }, singleArgumentUnchanged: false }, [`options`]);
1153
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { like: `$[0].like` }, singleArgumentUnchanged: false }, [`options`]);
1154
1154
  throw n2?.onError?.(e7), t3;
1155
1155
  }
1156
1156
  }
1157
- function or() {
1157
+ function ar() {
1158
1158
  let { httpClient: e6, sideEffects: t2 } = arguments[0];
1159
- return zn({ func: async (n2) => {
1160
- let r2 = rr(n2);
1159
+ return Rn({ func: async (n2) => {
1160
+ let r2 = nr(n2);
1161
1161
  t2?.onSiteCall?.();
1162
1162
  try {
1163
1163
  let n3 = await e6.request(r2);
@@ -1167,208 +1167,231 @@ function or() {
1167
1167
  }
1168
1168
  }, requestTransformer: (e7) => {
1169
1169
  let t3 = [e7, {}];
1170
- return O({ ...t3?.[1], query: t3?.[0] });
1170
+ return k({ ...t3?.[1], query: t3?.[0] });
1171
1171
  }, responseTransformer: ({ data: e7 }) => {
1172
- let t3 = k(M(e7, []));
1172
+ let t3 = et(A(e7, []));
1173
1173
  return { items: t3?.likes, pagingMetadata: t3?.pagingMetadata };
1174
1174
  }, errorTransformer: (e7) => {
1175
- throw N(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1175
+ throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1176
1176
  }, pagingMethod: `CURSOR`, transformationPaths: {} });
1177
1177
  }
1178
- async function sr(e6) {
1179
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = rr(O({ query: e6 }));
1178
+ async function or(e6) {
1179
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = nr(k({ query: e6 }));
1180
1180
  n2?.onSiteCall?.();
1181
1181
  try {
1182
1182
  let e7 = await t2.request(r2);
1183
- return n2?.onSuccess?.(e7), k(e7.data);
1183
+ return n2?.onSuccess?.(e7), et(e7.data);
1184
1184
  } catch (e7) {
1185
- let t3 = N(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1185
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1186
1186
  throw n2?.onError?.(e7), t3;
1187
1187
  }
1188
1188
  }
1189
- async function cr(e6) {
1190
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ir(O({ fqdn: e6?.fqdn, entityId: e6?.entityId }));
1189
+ async function sr(e6) {
1190
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = rr(k({ fqdn: e6?.fqdn, entityId: e6?.entityId }));
1191
1191
  n2?.onSiteCall?.();
1192
1192
  try {
1193
1193
  let e7 = await t2.request(r2);
1194
1194
  n2?.onSuccess?.(e7);
1195
1195
  } catch (e7) {
1196
- let t3 = N(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { fqdn: `$[0].fqdn`, entityId: `$[0].entityId` }, singleArgumentUnchanged: false }, [`identifiers`]);
1196
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { fqdn: `$[0].fqdn`, entityId: `$[0].entityId` }, singleArgumentUnchanged: false }, [`identifiers`]);
1197
1197
  throw n2?.onError?.(e7), t3;
1198
1198
  }
1199
1199
  }
1200
+ function cr(e6) {
1201
+ return (t2) => ir(t2, { httpClient: e6 });
1202
+ }
1200
1203
  function lr(e6) {
1201
- return (t2) => ar(t2, { httpClient: e6 });
1204
+ return () => ar({ httpClient: e6 });
1202
1205
  }
1203
1206
  function ur(e6) {
1204
- return () => or({ httpClient: e6 });
1207
+ return (t2) => or(t2, { httpClient: e6 });
1205
1208
  }
1206
1209
  function dr(e6) {
1207
1210
  return (t2) => sr(t2, { httpClient: e6 });
1208
1211
  }
1209
1212
  function fr(e6) {
1210
- return (t2) => cr(t2, { httpClient: e6 });
1211
- }
1212
- function pr(e6) {
1213
- let t2 = Yn({ builderQueryFunction: () => ur(e6)(), typedQueryFunction: (t3) => dr(e6)(t3), hasOptionsParameter: false });
1213
+ let t2 = Jn({ builderQueryFunction: () => lr(e6)(), typedQueryFunction: (t3) => ur(e6)(t3), hasOptionsParameter: false });
1214
1214
  function n2(e7) {
1215
1215
  return t2(...arguments);
1216
1216
  }
1217
1217
  return n2;
1218
1218
  }
1219
- var mr = Mt(lr);
1220
- var hr = Mt(fr);
1221
- var gr = Mt(pr);
1222
- var _r = [{ path: `metrics.averageRating` }];
1223
- function vr(e6) {
1219
+ var pr = N(cr);
1220
+ var mr = N(dr);
1221
+ var hr = N(fr);
1222
+ var gr = [{ path: `metrics.averageRating` }];
1223
+ function _r(e6) {
1224
1224
  return Pt(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
1225
1225
  }
1226
- var yr = `@wix/auto_sdk_blog_posts`;
1227
- function br(e6) {
1226
+ var vr = `@wix/auto_sdk_blog_posts`;
1227
+ function yr(e6) {
1228
1228
  function t2({ host: t3 }) {
1229
- return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics`, packageName: yr, migrationOptions: { optInTransformResponse: true }, url: vr({ protoPath: `/v3/posts/{postId}/metrics`, data: e6, host: t3 }), params: Nt(e6), transformResponse: (e7) => M(e7, [{ transformFn: sn, paths: _r }]) };
1229
+ return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics`, packageName: vr, migrationOptions: { optInTransformResponse: true }, url: _r({ protoPath: `/v3/posts/{postId}/metrics`, data: e6, host: t3 }), params: Nt(e6), transformResponse: (e7) => A(e7, [{ transformFn: sn, paths: gr }]) };
1230
1230
  }
1231
1231
  return t2;
1232
1232
  }
1233
- async function xr(e6) {
1234
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = br(O({ postId: e6 }, []));
1233
+ async function br(e6) {
1234
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = yr(k({ postId: e6 }, []));
1235
1235
  n2?.onSiteCall?.();
1236
1236
  try {
1237
1237
  let e7 = await t2.request(r2);
1238
- return n2?.onSuccess?.(e7), k(e7.data, []);
1238
+ return n2?.onSuccess?.(e7), et(e7.data, []);
1239
1239
  } catch (e7) {
1240
- let t3 = N(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { postId: `$[0]` }, singleArgumentUnchanged: false }, [`postId`]);
1240
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { postId: `$[0]` }, singleArgumentUnchanged: false }, [`postId`]);
1241
1241
  throw n2?.onError?.(e7), t3;
1242
1242
  }
1243
1243
  }
1244
- function Sr(e6) {
1245
- return (t2) => xr(t2, { httpClient: e6 });
1244
+ function xr(e6) {
1245
+ return (t2) => br(t2, { httpClient: e6 });
1246
1246
  }
1247
- var Cr = Mt(Sr);
1248
- var wr = `wix.blog.v3.post`;
1249
- var Tr = async (e6) => {
1250
- await mr({ like: { entityId: e6, fqdn: wr } });
1247
+ var Sr = N(xr);
1248
+ var Cr = `wix.blog.v3.post`;
1249
+ var wr = async (e6) => {
1250
+ await pr({ like: { entityId: e6, fqdn: Cr } });
1251
1251
  };
1252
- var Er = async (e6) => {
1253
- await hr({ fqdn: wr, entityId: e6 });
1252
+ var Tr = async (e6) => {
1253
+ await mr({ fqdn: Cr, entityId: e6 });
1254
+ };
1255
+ var Er = 100;
1256
+ var L;
1257
+ var Dr = (e6) => {
1258
+ let t2 = [...e6.keys()];
1259
+ for (let n2 = 0; n2 < t2.length; n2 += Er) {
1260
+ let r2 = t2.slice(n2, n2 + Er);
1261
+ hr().eq(`fqdn`, Cr).in(`entityId`, r2).limit(r2.length).find().then(({ items: t3 }) => {
1262
+ let n3 = new Set(t3.map((e7) => e7.entityId));
1263
+ for (let t4 of r2) e6.get(t4)?.forEach((e7) => e7.resolve(n3.has(t4)));
1264
+ }, (t3) => {
1265
+ for (let n3 of r2) e6.get(n3)?.forEach((e7) => e7.reject(t3));
1266
+ });
1267
+ }
1254
1268
  };
1255
- var Dr = (e6) => typeof e6 == `number` ? e6 : void 0;
1256
- var Or = async (e6) => {
1257
- let [t2, n2] = await Promise.allSettled([gr().eq(`fqdn`, wr).eq(`entityId`, e6).limit(1).find(), Cr(e6)]), r2 = n2.status === `fulfilled` ? n2.value.metrics : void 0;
1258
- return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount: Dr(r2?.likes), viewCount: Dr(r2?.views), commentCount: Dr(r2?.comments) };
1269
+ var Or = (e6) => new Promise((t2, n2) => {
1270
+ if (!L) {
1271
+ let e7 = /* @__PURE__ */ new Map();
1272
+ L = e7, setTimeout(() => {
1273
+ L = void 0, Dr(e7);
1274
+ });
1275
+ }
1276
+ L.set(e6, [...L.get(e6) ?? [], { resolve: t2, reject: n2 }]);
1277
+ });
1278
+ var kr = (e6) => typeof e6 == `number` ? e6 : void 0;
1279
+ var Ar = async (e6, t2 = true) => {
1280
+ let [n2, r2] = await Promise.allSettled([Or(e6), t2 ? Sr(e6) : void 0]), i2 = r2.status === `fulfilled` ? r2.value?.metrics : void 0;
1281
+ return { liked: n2.status === `fulfilled` && n2.value, likeCount: kr(i2?.likes), viewCount: kr(i2?.views), commentCount: kr(i2?.comments) };
1259
1282
  };
1260
- function I(e6) {
1283
+ function R(e6) {
1261
1284
  return e6;
1262
1285
  }
1263
- var kr = I(`@wix/site-service-editor-context`);
1264
- var Ar = () => {
1286
+ var jr = R(`@wix/site-service-editor-context`);
1287
+ var Mr = () => {
1265
1288
  try {
1266
- return !!u(kr).previewMode;
1289
+ return !!u(jr).previewMode;
1267
1290
  } catch {
1268
1291
  return false;
1269
1292
  }
1270
1293
  };
1271
- var jr = I(`@wix/viewer-service-site-members`);
1272
- var Mr = () => {
1294
+ var Nr = R(`@wix/viewer-service-site-members`);
1295
+ var Pr = () => {
1273
1296
  try {
1274
- return u(jr);
1297
+ return u(Nr);
1275
1298
  } catch {
1276
1299
  return;
1277
1300
  }
1278
1301
  };
1279
- var Nr = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
1280
- var L = `wix-blog:post-like-toggled`;
1281
- var Pr = () => {
1302
+ var Fr = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
1303
+ var z = `wix-blog:post-like-toggled`;
1304
+ var Ir = () => {
1282
1305
  let e6 = window;
1283
- return e6[L] ??= /* @__PURE__ */ new Map();
1306
+ return e6[z] ??= /* @__PURE__ */ new Map();
1284
1307
  };
1285
- var Fr = (e6) => {
1286
- Pr().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(L, { detail: e6 }));
1308
+ var Lr = (e6) => {
1309
+ Ir().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(z, { detail: e6 }));
1287
1310
  };
1288
- var Ir = (e6, t2) => ({ isLiked: e6.liked, likeCount: Math.max(0, (e6.freshLikeCount ?? t2) + Number(e6.liked) - Number(e6.baselineLiked)), isLikeCountLoaded: e6.isLikeCountLoaded, viewCount: e6.viewCount, commentCount: e6.commentCount });
1289
- var Lr = (e6, t2, n2 = false, a2) => {
1290
- let u2 = Ar() || n2, [d2, f2] = l(Nr), p2 = c(Nr), m2 = c(t2), h2 = c(/* @__PURE__ */ new Set()), g2 = c(false), _2 = c(false), v2 = c(void 0), y2 = Mr(), [b2, x2] = l(0);
1311
+ var Rr = (e6, t2) => ({ isLiked: e6.liked, likeCount: Math.max(0, (e6.freshLikeCount ?? t2) + Number(e6.liked) - Number(e6.baselineLiked)), isLikeCountLoaded: e6.isLikeCountLoaded, viewCount: e6.viewCount, commentCount: e6.commentCount });
1312
+ var zr = (e6, t2, n2 = false, a2, u2 = true) => {
1313
+ let d2 = Mr() || n2, [f2, p2] = l(Fr), m2 = c(Fr), h2 = c(t2), g2 = c(/* @__PURE__ */ new Set()), _2 = c(false), v2 = c(false), y2 = c(void 0), b2 = Pr(), [x2, S2] = l(0);
1291
1314
  o(() => {
1292
- let e7 = y2?.addMemberLoginListener?.(() => {
1293
- Pr().clear(), x2((e8) => e8 + 1);
1315
+ let e7 = b2?.addMemberLoginListener?.(() => {
1316
+ Ir().clear(), S2((e8) => e8 + 1);
1294
1317
  });
1295
1318
  return () => {
1296
- e7 !== void 0 && y2?.removeMemberLoginListener?.(e7);
1319
+ e7 !== void 0 && b2?.removeMemberLoginListener?.(e7);
1297
1320
  };
1298
- }, [y2]);
1299
- let S2 = i((e7) => {
1300
- let t3 = p2.current, n3 = { ...t3, ...e7 };
1301
- Object.keys(n3).every((e8) => n3[e8] === t3[e8]) || (p2.current = n3, h2.current.forEach((e8) => e8()), r(() => f2(n3)));
1302
- }, []), C2 = s(() => ({ get: () => Ir(p2.current, m2.current), subscribe: (e7) => (h2.current.add(e7), () => {
1303
- h2.current.delete(e7);
1321
+ }, [b2]);
1322
+ let C2 = i((e7) => {
1323
+ let t3 = m2.current, n3 = { ...t3, ...e7 };
1324
+ Object.keys(n3).every((e8) => n3[e8] === t3[e8]) || (m2.current = n3, g2.current.forEach((e8) => e8()), r(() => p2(n3)));
1325
+ }, []), w2 = s(() => ({ get: () => Rr(m2.current, h2.current), subscribe: (e7) => (g2.current.add(e7), () => {
1326
+ g2.current.delete(e7);
1304
1327
  }) }), []);
1305
1328
  o(() => {
1306
- m2.current !== t2 && (m2.current = t2, h2.current.forEach((e7) => e7()));
1329
+ h2.current !== t2 && (h2.current = t2, g2.current.forEach((e7) => e7()));
1307
1330
  }, [t2]), o(() => {
1308
- if (v2.current !== e6 && (v2.current = e6, S2(Nr)), _2.current = false, !e6 || u2) {
1309
- S2({ isLikeCountLoaded: true });
1331
+ if (y2.current !== e6 && (y2.current = e6, C2(Fr)), v2.current = false, !e6 || d2) {
1332
+ C2({ isLikeCountLoaded: true });
1310
1333
  return;
1311
1334
  }
1312
1335
  let t3 = false;
1313
- return Or(e6).then(({ liked: e7, likeCount: n3, viewCount: r2, commentCount: i2 }) => {
1314
- t3 || S2({ isLikeCountLoaded: true, viewCount: r2, commentCount: i2, baselineLiked: e7, freshLikeCount: n3, ...!_2.current && { liked: e7 } });
1336
+ return Ar(e6, u2).then(({ liked: e7, likeCount: n3, viewCount: r2, commentCount: i2 }) => {
1337
+ t3 || C2({ isLikeCountLoaded: true, viewCount: r2, commentCount: i2, baselineLiked: e7, freshLikeCount: n3, ...!v2.current && { liked: e7 } });
1315
1338
  }).catch((n3) => {
1316
- t3 || S2({ isLikeCountLoaded: true }), An(a2, n3, { feature: On.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
1339
+ t3 || C2({ isLikeCountLoaded: true }), kn(a2, n3, { feature: Dn.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
1317
1340
  }), () => {
1318
1341
  t3 = true;
1319
1342
  };
1320
- }, [e6, u2, a2, S2, b2]), o(() => {
1343
+ }, [e6, d2, a2, C2, x2, u2]), o(() => {
1321
1344
  if (!e6) return;
1322
1345
  let t3 = (e7) => {
1323
- _2.current = true, S2({ liked: e7 });
1324
- }, n3 = Pr().get(e6);
1346
+ v2.current = true, C2({ liked: e7 });
1347
+ }, n3 = Ir().get(e6);
1325
1348
  n3 !== void 0 && t3(n3);
1326
1349
  let r2 = (n4) => {
1327
1350
  let { detail: r3 } = n4;
1328
1351
  r3.postId === e6 && t3(r3.liked);
1329
1352
  };
1330
- return window.addEventListener(L, r2), () => window.removeEventListener(L, r2);
1331
- }, [e6, S2]);
1332
- let ee2 = i(async (t3) => {
1333
- if (!e6 || g2.current) return;
1334
- _2.current = true;
1335
- let n3 = !p2.current.liked;
1336
- if (S2({ liked: n3 }), Fr({ postId: e6, liked: n3 }), !u2) {
1337
- g2.current = true;
1353
+ return window.addEventListener(z, r2), () => window.removeEventListener(z, r2);
1354
+ }, [e6, C2]);
1355
+ let T2 = i(async (t3) => {
1356
+ if (!e6 || _2.current) return;
1357
+ v2.current = true;
1358
+ let n3 = !m2.current.liked;
1359
+ if (C2({ liked: n3 }), Lr({ postId: e6, liked: n3 }), !d2) {
1360
+ _2.current = true;
1338
1361
  try {
1339
- await (n3 ? Tr(e6) : Er(e6));
1362
+ await (n3 ? wr(e6) : Tr(e6));
1340
1363
  } catch (t4) {
1341
- S2({ liked: !n3 }), Fr({ postId: e6, liked: !n3 }), An(a2, t4, { feature: On.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
1364
+ C2({ liked: !n3 }), Lr({ postId: e6, liked: !n3 }), kn(a2, t4, { feature: Dn.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
1342
1365
  } finally {
1343
- g2.current = false;
1366
+ _2.current = false;
1344
1367
  }
1345
1368
  }
1346
- }, [e6, u2, a2, S2]);
1347
- return { ...Ir(d2, t2), toggleLike: ee2, liveLikes: C2 };
1369
+ }, [e6, d2, a2, C2]);
1370
+ return { ...Rr(f2, t2), toggleLike: T2, liveLikes: w2 };
1348
1371
  };
1349
- var Rr = I(`@wix/site-service-locale`);
1350
- var zr = I(`@wix/viewer-service-multilingual`);
1351
- var Br = () => {
1372
+ var Br = R(`@wix/site-service-locale`);
1373
+ var Vr = R(`@wix/viewer-service-multilingual`);
1374
+ var Hr = () => {
1352
1375
  let e6;
1353
1376
  try {
1354
- let { multilingualEnabled: t3, currentLocale: n3 } = u(zr);
1377
+ let { multilingualEnabled: t3, currentLocale: n3 } = u(Vr);
1355
1378
  t3 && n3 && !n3.primaryLocale && (e6 = n3.regionalFormat);
1356
1379
  } catch {
1357
1380
  }
1358
1381
  let t2, n2;
1359
1382
  try {
1360
- ({ locale: t2, language: n2 } = u(Rr));
1383
+ ({ locale: t2, language: n2 } = u(Br));
1361
1384
  } catch {
1362
1385
  }
1363
1386
  return e6 || t2 || n2;
1364
1387
  };
1365
- var Vr = () => {
1388
+ var Ur = () => {
1366
1389
  let e6 = /* @__PURE__ */ new Map();
1367
1390
  return { getOrInsert: (t2, n2) => (e6.has(t2) || e6.set(t2, n2().finally(() => {
1368
1391
  e6.delete(t2);
1369
1392
  })), e6.get(t2)) };
1370
1393
  };
1371
- var Hr = async (e6) => {
1394
+ var Wr = async (e6) => {
1372
1395
  try {
1373
1396
  let { default: t2 } = await e6();
1374
1397
  return t2;
@@ -1376,9 +1399,9 @@ var Hr = async (e6) => {
1376
1399
  return;
1377
1400
  }
1378
1401
  };
1379
- var Ur = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
1380
- let r2 = Vr(), i2 = async (r3) => {
1381
- let [i3, a2] = await Promise.all([Hr(() => t2(r3)), !e6 || !n2 ? void 0 : Hr(() => n2(r3))]);
1402
+ var Gr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
1403
+ let r2 = Ur(), i2 = async (r3) => {
1404
+ let [i3, a2] = await Promise.all([Wr(() => t2(r3)), !e6 || !n2 ? void 0 : Wr(() => n2(r3))]);
1382
1405
  if (i3 && a2) return { ...i3, ...a2 };
1383
1406
  if (i3) return i3;
1384
1407
  if (a2) return a2;
@@ -1386,61 +1409,61 @@ var Ur = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
1386
1409
  };
1387
1410
  return (e7) => r2.getOrInsert(e7, () => i2(e7));
1388
1411
  };
1389
- var R = (e6) => typeof e6 == `string`;
1390
- var z = () => {
1412
+ var B = (e6) => typeof e6 == `string`;
1413
+ var V = () => {
1391
1414
  let e6, t2, n2 = new Promise((n3, r2) => {
1392
1415
  e6 = n3, t2 = r2;
1393
1416
  });
1394
1417
  return n2.resolve = e6, n2.reject = t2, n2;
1395
1418
  };
1396
- var Wr = (e6) => e6 == null ? `` : String(e6);
1397
- var Gr = (e6, t2, n2) => {
1419
+ var Kr = (e6) => e6 == null ? `` : String(e6);
1420
+ var qr = (e6, t2, n2) => {
1398
1421
  e6.forEach((e7) => {
1399
1422
  t2[e7] && (n2[e7] = t2[e7]);
1400
1423
  });
1401
1424
  };
1402
- var Kr = /###/g;
1403
- var qr = (e6) => e6 && e6.includes(`###`) ? e6.replace(Kr, `.`) : e6;
1404
- var Jr = (e6) => !e6 || R(e6);
1405
- var B = (e6, t2, n2) => {
1406
- let r2 = R(t2) ? t2.split(`.`) : t2, i2 = 0;
1425
+ var Jr = /###/g;
1426
+ var Yr = (e6) => e6 && e6.includes(`###`) ? e6.replace(Jr, `.`) : e6;
1427
+ var Xr = (e6) => !e6 || B(e6);
1428
+ var H = (e6, t2, n2) => {
1429
+ let r2 = B(t2) ? t2.split(`.`) : t2, i2 = 0;
1407
1430
  for (; i2 < r2.length - 1; ) {
1408
- if (Jr(e6)) return {};
1409
- let t3 = qr(r2[i2]);
1431
+ if (Xr(e6)) return {};
1432
+ let t3 = Yr(r2[i2]);
1410
1433
  !e6[t3] && n2 && (e6[t3] = new n2()), e6 = Object.prototype.hasOwnProperty.call(e6, t3) ? e6[t3] : {}, ++i2;
1411
1434
  }
1412
- return Jr(e6) ? {} : { obj: e6, k: qr(r2[i2]) };
1435
+ return Xr(e6) ? {} : { obj: e6, k: Yr(r2[i2]) };
1413
1436
  };
1414
- var Yr = (e6, t2, n2) => {
1415
- let { obj: r2, k: i2 } = B(e6, t2, Object);
1437
+ var Zr = (e6, t2, n2) => {
1438
+ let { obj: r2, k: i2 } = H(e6, t2, Object);
1416
1439
  if (r2 !== void 0 || t2.length === 1) {
1417
1440
  r2[i2] = n2;
1418
1441
  return;
1419
1442
  }
1420
- let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = B(e6, o2, Object);
1421
- for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = B(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1443
+ let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = H(e6, o2, Object);
1444
+ for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = H(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
1422
1445
  s2.obj[`${s2.k}.${a2}`] = n2;
1423
1446
  };
1424
- var Xr = (e6, t2, n2, r2) => {
1425
- let { obj: i2, k: a2 } = B(e6, t2, Object);
1447
+ var Qr = (e6, t2, n2, r2) => {
1448
+ let { obj: i2, k: a2 } = H(e6, t2, Object);
1426
1449
  i2[a2] = i2[a2] || [], i2[a2].push(n2);
1427
1450
  };
1428
- var V = (e6, t2) => {
1429
- let { obj: n2, k: r2 } = B(e6, t2);
1451
+ var U = (e6, t2) => {
1452
+ let { obj: n2, k: r2 } = H(e6, t2);
1430
1453
  if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1431
1454
  };
1432
- var Zr = (e6, t2, n2) => {
1433
- let r2 = V(e6, n2);
1434
- return r2 === void 0 ? V(t2, n2) : r2;
1455
+ var $r = (e6, t2, n2) => {
1456
+ let r2 = U(e6, n2);
1457
+ return r2 === void 0 ? U(t2, n2) : r2;
1435
1458
  };
1436
- var Qr = (e6, t2, n2) => {
1437
- for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? R(e6[r2]) || e6[r2] instanceof String || R(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : Qr(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
1459
+ var ei = (e6, t2, n2) => {
1460
+ for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? B(e6[r2]) || e6[r2] instanceof String || B(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : ei(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
1438
1461
  return e6;
1439
1462
  };
1440
- var H = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1441
- var $r = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1442
- var ei = (e6) => R(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => $r[e7]) : e6;
1443
- var ti = class {
1463
+ var W = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1464
+ var ti = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1465
+ var ni = (e6) => B(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => ti[e7]) : e6;
1466
+ var ri = class {
1444
1467
  constructor(e6) {
1445
1468
  this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1446
1469
  }
@@ -1451,20 +1474,20 @@ var ti = class {
1451
1474
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
1452
1475
  }
1453
1476
  };
1454
- var ni = [` `, `,`, `?`, `!`, `;`];
1455
- var ri = new ti(20);
1456
- var ii = (e6, t2, n2) => {
1477
+ var ii = [` `, `,`, `?`, `!`, `;`];
1478
+ var ai = new ri(20);
1479
+ var oi = (e6, t2, n2) => {
1457
1480
  t2 ||= ``, n2 ||= ``;
1458
- let r2 = ni.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
1481
+ let r2 = ii.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
1459
1482
  if (r2.length === 0) return true;
1460
- let i2 = ri.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
1483
+ let i2 = ai.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
1461
1484
  if (!a2) {
1462
1485
  let t3 = e6.indexOf(n2);
1463
1486
  t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
1464
1487
  }
1465
1488
  return a2;
1466
1489
  };
1467
- var ai = (e6, t2, n2 = `.`) => {
1490
+ var si = (e6, t2, n2 = `.`) => {
1468
1491
  if (!e6) return;
1469
1492
  if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
1470
1493
  let r2 = t2.split(n2), i2 = e6;
@@ -1480,8 +1503,8 @@ var ai = (e6, t2, n2 = `.`) => {
1480
1503
  }
1481
1504
  return i2;
1482
1505
  };
1483
- var U = (e6) => e6?.replace(/_/g, `-`);
1484
- var oi = { type: `logger`, log(e6) {
1506
+ var G = (e6) => e6?.replace(/_/g, `-`);
1507
+ var ci = { type: `logger`, log(e6) {
1485
1508
  this.output(`log`, e6);
1486
1509
  }, warn(e6) {
1487
1510
  this.output(`warn`, e6);
@@ -1490,12 +1513,12 @@ var oi = { type: `logger`, log(e6) {
1490
1513
  }, output(e6, t2) {
1491
1514
  console?.[e6]?.apply?.(console, t2);
1492
1515
  } };
1493
- var W = new class e2 {
1516
+ var K = new class e2 {
1494
1517
  constructor(e6, t2 = {}) {
1495
1518
  this.init(e6, t2);
1496
1519
  }
1497
1520
  init(e6, t2 = {}) {
1498
- this.prefix = t2.prefix || `i18next:`, this.logger = e6 || oi, this.options = t2, this.debug = t2.debug;
1521
+ this.prefix = t2.prefix || `i18next:`, this.logger = e6 || ci, this.options = t2, this.debug = t2.debug;
1499
1522
  }
1500
1523
  log(...e6) {
1501
1524
  return this.forward(e6, `log`, ``, true);
@@ -1510,7 +1533,7 @@ var W = new class e2 {
1510
1533
  return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
1511
1534
  }
1512
1535
  forward(e6, t2, n2, r2) {
1513
- return r2 && !this.debug ? null : (e6 = e6.map((e7) => R(e7) ? e7.replace(/[\r\n\x00-\x1F\x7F]/g, ` `) : e7), R(e6[0]) && (e6[0] = `${n2}${this.prefix} ${e6[0]}`), this.logger[t2](e6));
1536
+ return r2 && !this.debug ? null : (e6 = e6.map((e7) => B(e7) ? e7.replace(/[\r\n\x00-\x1F\x7F]/g, ` `) : e7), B(e6[0]) && (e6[0] = `${n2}${this.prefix} ${e6[0]}`), this.logger[t2](e6));
1514
1537
  }
1515
1538
  create(t2) {
1516
1539
  return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
@@ -1519,7 +1542,7 @@ var W = new class e2 {
1519
1542
  return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
1520
1543
  }
1521
1544
  }();
1522
- var si = class {
1545
+ var li = class {
1523
1546
  constructor() {
1524
1547
  this.observers = {};
1525
1548
  }
@@ -1547,8 +1570,8 @@ var si = class {
1547
1570
  });
1548
1571
  }
1549
1572
  };
1550
- var ci = /* @__PURE__ */ new WeakSet();
1551
- var li = class extends si {
1573
+ var ui = /* @__PURE__ */ new WeakSet();
1574
+ var di = class extends li {
1552
1575
  constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1553
1576
  super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1554
1577
  }
@@ -1561,23 +1584,23 @@ var li = class extends si {
1561
1584
  }
1562
1585
  getResource(e6, t2, n2, r2 = {}) {
1563
1586
  let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
1564
- e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : R(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
1565
- let s2 = V(this.data, o2);
1566
- return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !R(n2) ? s2 : ai(this.data?.[e6]?.[t2], n2, i2);
1587
+ e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : B(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
1588
+ let s2 = U(this.data, o2);
1589
+ return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !B(n2) ? s2 : si(this.data?.[e6]?.[t2], n2, i2);
1567
1590
  }
1568
1591
  addResource(e6, t2, n2, r2, i2 = { silent: false }) {
1569
1592
  let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
1570
- n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Yr(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
1593
+ n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Zr(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
1571
1594
  }
1572
1595
  addResources(e6, t2, n2, r2 = { silent: false }) {
1573
- for (let r3 in n2) (R(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
1596
+ for (let r3 in n2) (B(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
1574
1597
  r2.silent || this.emit(`added`, e6, t2, n2);
1575
1598
  }
1576
1599
  addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
1577
1600
  let o2 = [e6, t2];
1578
1601
  e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1579
- let s2 = V(this.data, o2) || {};
1580
- a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Qr(s2, n2, i2) : s2 = { ...s2, ...n2 }, Yr(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
1602
+ let s2 = U(this.data, o2) || {};
1603
+ a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? ei(s2, n2, i2) : s2 = { ...s2, ...n2 }, Zr(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
1581
1604
  }
1582
1605
  removeResourceBundle(e6, t2) {
1583
1606
  this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
@@ -1595,37 +1618,37 @@ var li = class extends si {
1595
1618
  let t2 = this.getDataByLanguage(e6);
1596
1619
  return !!(t2 && Object.keys(t2) || []).find((e7) => {
1597
1620
  let n2 = t2[e7];
1598
- return ci.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && ci.add(n2), true);
1621
+ return ui.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && ui.add(n2), true);
1599
1622
  });
1600
1623
  }
1601
1624
  toJSON() {
1602
1625
  return this.data;
1603
1626
  }
1604
1627
  };
1605
- var ui = { processors: {}, addPostProcessor(e6) {
1628
+ var fi = { processors: {}, addPostProcessor(e6) {
1606
1629
  this.processors[e6.name] = e6;
1607
1630
  }, handle(e6, t2, n2, r2, i2) {
1608
1631
  return e6.forEach((e7) => {
1609
1632
  t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
1610
1633
  }), t2;
1611
1634
  } };
1612
- var di = Symbol(`i18next/PATH_KEY`);
1613
- function fi() {
1635
+ var pi = Symbol(`i18next/PATH_KEY`);
1636
+ function mi() {
1614
1637
  let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1615
- return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === di ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1638
+ return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === pi ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1616
1639
  }
1617
- function G(e6, t2) {
1618
- let { [di]: n2 } = e6(fi()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
1640
+ function q(e6, t2) {
1641
+ let { [pi]: n2 } = e6(mi()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
1619
1642
  if (n2.length > 1 && i2) {
1620
1643
  let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
1621
1644
  if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1622
1645
  }
1623
1646
  return n2.join(r2);
1624
1647
  }
1625
- var pi = (e6) => !R(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
1626
- var mi = class e3 extends si {
1648
+ var hi = (e6) => !B(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
1649
+ var gi = class e3 extends li {
1627
1650
  constructor(e6, t2 = {}) {
1628
- super(), Gr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = W.create(`translator`), this.checkedLoadedFor = {};
1651
+ super(), qr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = K.create(`translator`), this.checkedLoadedFor = {};
1629
1652
  }
1630
1653
  changeLanguage(e6) {
1631
1654
  e6 && (this.language = e6);
@@ -1635,53 +1658,53 @@ var mi = class e3 extends si {
1635
1658
  if (e6 == null) return false;
1636
1659
  let r2 = this.resolve(e6, n2);
1637
1660
  if (r2?.res === void 0) return false;
1638
- let i2 = pi(r2.res);
1661
+ let i2 = hi(r2.res);
1639
1662
  return !(n2.returnObjects === false && i2);
1640
1663
  }
1641
1664
  extractFromKey(e6, t2) {
1642
1665
  let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1643
1666
  n2 === void 0 && (n2 = `:`);
1644
- let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e6.includes(n2), o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !ii(e6, n2, r2);
1667
+ let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e6.includes(n2), o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !oi(e6, n2, r2);
1645
1668
  if (a2 && !o2) {
1646
1669
  let t3 = e6.match(this.interpolator.nestingRegexp);
1647
- if (t3 && t3.length > 0) return { key: e6, namespaces: R(i2) ? [i2] : i2 };
1670
+ if (t3 && t3.length > 0) return { key: e6, namespaces: B(i2) ? [i2] : i2 };
1648
1671
  let a3 = e6.split(n2);
1649
1672
  (n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
1650
1673
  }
1651
- return { key: e6, namespaces: R(i2) ? [i2] : i2 };
1674
+ return { key: e6, namespaces: B(i2) ? [i2] : i2 };
1652
1675
  }
1653
1676
  translate(t2, n2, r2) {
1654
1677
  let i2 = typeof n2 == `object` ? { ...n2 } : n2;
1655
1678
  if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
1656
- typeof t2 == `function` && (t2 = G(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? G(e6, { ...this.options, ...i2 }) : String(e6));
1679
+ typeof t2 == `function` && (t2 = q(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? q(e6, { ...this.options, ...i2 }) : String(e6));
1657
1680
  let a2 = i2.returnDetails === void 0 ? this.options.returnDetails : i2.returnDetails, o2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, { key: s2, namespaces: c2 } = this.extractFromKey(t2[t2.length - 1], i2), l2 = c2[c2.length - 1], u2 = i2.nsSeparator === void 0 ? this.options.nsSeparator : i2.nsSeparator;
1658
1681
  u2 === void 0 && (u2 = `:`);
1659
1682
  let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
1660
1683
  if (d2?.toLowerCase() === `cimode`) return f2 ? a2 ? { res: `${l2}${u2}${s2}`, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : `${l2}${u2}${s2}` : a2 ? { res: s2, usedKey: s2, exactUsedKey: s2, usedLng: d2, usedNS: l2, usedParams: this.getUsedParamsDetails(i2) } : s2;
1661
- let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !R(i2.count), x2 = e3.hasDefaultValue(i2), S2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, C2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, ee2 = b2 && !i2.ordinal && i2.count === 0, w2 = ee2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${S2}`] || i2[`defaultValue${C2}`] || i2.defaultValue, T2 = m2;
1662
- y2 && !m2 && x2 && (T2 = w2);
1663
- let te2 = pi(T2), ne2 = Object.prototype.toString.apply(T2);
1664
- if (y2 && T2 && te2 && !_2.includes(ne2) && !(R(v2) && Array.isArray(T2))) {
1684
+ let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !B(i2.count), x2 = e3.hasDefaultValue(i2), S2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, C2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, w2 = b2 && !i2.ordinal && i2.count === 0, T2 = w2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${S2}`] || i2[`defaultValue${C2}`] || i2.defaultValue, E2 = m2;
1685
+ y2 && !m2 && x2 && (E2 = T2);
1686
+ let ee2 = hi(E2), te2 = Object.prototype.toString.apply(E2);
1687
+ if (y2 && E2 && ee2 && !_2.includes(te2) && !(B(v2) && Array.isArray(E2))) {
1665
1688
  if (!i2.returnObjects && !this.options.returnObjects) {
1666
1689
  this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
1667
- let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
1690
+ let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, E2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
1668
1691
  return a2 ? (p2.res = e6, p2.usedParams = this.getUsedParamsDetails(i2), p2) : e6;
1669
1692
  }
1670
1693
  if (o2) {
1671
- let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
1672
- for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
1694
+ let e6 = Array.isArray(E2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
1695
+ for (let e7 in E2) if (Object.prototype.hasOwnProperty.call(E2, e7)) {
1673
1696
  let r3 = `${n3}${o2}${e7}`;
1674
- t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: pi(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
1697
+ t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: hi(T2) ? T2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = E2[e7]);
1675
1698
  }
1676
1699
  m2 = t3;
1677
1700
  }
1678
- } else if (y2 && R(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1701
+ } else if (y2 && B(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1679
1702
  else {
1680
1703
  let e6 = false, n3 = false;
1681
- !this.isValidLookup(m2) && x2 && (e6 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
1682
- let a3 = (i2.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n3 ? void 0 : m2, c3 = x2 && w2 !== m2 && this.options.updateMissing;
1704
+ !this.isValidLookup(m2) && x2 && (e6 = true, m2 = T2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
1705
+ let a3 = (i2.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n3 ? void 0 : m2, c3 = x2 && T2 !== m2 && this.options.updateMissing;
1683
1706
  if (n3 || e6 || c3) {
1684
- if (this.logger.log(c3 ? `updateKey` : `missingKey`, d2, l2, b2 && !c3 ? `${s2}${this.pluralResolver.getSuffix(d2, i2.count, i2)}` : s2, c3 ? w2 : m2), o2) {
1707
+ if (this.logger.log(c3 ? `updateKey` : `missingKey`, d2, l2, b2 && !c3 ? `${s2}${this.pluralResolver.getSuffix(d2, i2.count, i2)}` : s2, c3 ? T2 : m2), o2) {
1685
1708
  let e8 = this.resolve(s2, { ...i2, keySeparator: false });
1686
1709
  e8 && e8.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.`);
1687
1710
  }
@@ -1694,10 +1717,10 @@ var mi = class e3 extends si {
1694
1717
  };
1695
1718
  this.options.saveMissing && (this.options.saveMissingPlurals && b2 ? e7.forEach((e8) => {
1696
1719
  let t4 = this.pluralResolver.getSuffixes(e8, i2);
1697
- ee2 && i2[`defaultValue${this.options.pluralSeparator}zero`] && !t4.includes(`${this.options.pluralSeparator}zero`) && t4.push(`${this.options.pluralSeparator}zero`), t4.forEach((t5) => {
1698
- n4([e8], s2 + t5, i2[`defaultValue${t5}`] || w2);
1720
+ w2 && i2[`defaultValue${this.options.pluralSeparator}zero`] && !t4.includes(`${this.options.pluralSeparator}zero`) && t4.push(`${this.options.pluralSeparator}zero`), t4.forEach((t5) => {
1721
+ n4([e8], s2 + t5, i2[`defaultValue${t5}`] || T2);
1699
1722
  });
1700
- }) : n4(e7, s2, w2));
1723
+ }) : n4(e7, s2, T2));
1701
1724
  }
1702
1725
  m2 = this.extendTranslation(m2, t2, i2, p2, r2), n3 && m2 === s2 && this.options.appendNamespaceToMissingKey && (m2 = `${l2}${u2}${s2}`), (n3 || e6) && this.options.parseMissingKeyHandler && (m2 = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l2}${u2}${s2}` : s2, e6 ? m2 : void 0, i2));
1703
1726
  }
@@ -1707,30 +1730,30 @@ var mi = class e3 extends si {
1707
1730
  if (this.i18nFormat?.parse) e6 = this.i18nFormat.parse(e6, { ...this.options.interpolation.defaultVariables, ...n2 }, n2.lng || this.language || r2.usedLng, r2.usedNS, r2.usedKey, { resolved: r2 });
1708
1731
  else if (!n2.skipInterpolation) {
1709
1732
  n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
1710
- let a3 = R(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1733
+ let a3 = B(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1711
1734
  if (a3) {
1712
1735
  let t3 = e6.match(this.interpolator.nestingRegexp);
1713
1736
  o3 = t3 && t3.length;
1714
1737
  }
1715
- let s2 = n2.replace && !R(n2.replace) ? n2.replace : n2;
1738
+ let s2 = n2.replace && !B(n2.replace) ? n2.replace : n2;
1716
1739
  if (this.options.interpolation.defaultVariables && (s2 = { ...this.options.interpolation.defaultVariables, ...s2 }), e6 = this.interpolator.interpolate(e6, s2, n2.lng || this.language || r2.usedLng, n2), a3) {
1717
1740
  let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
1718
1741
  o3 < r3 && (n2.nest = false);
1719
1742
  }
1720
1743
  !n2.lng && r2 && r2.res && (n2.lng = this.language || r2.usedLng), n2.nest !== false && (e6 = this.interpolator.nest(e6, (...e7) => i2?.[0] === e7[0] && !n2.context ? (this.logger.warn(`It seems you are nesting recursively key: ${e7[0]} in key: ${t2[0]}`), null) : this.translate(...e7, t2), n2)), n2.interpolation && this.interpolator.reset();
1721
1744
  }
1722
- let a2 = n2.postProcess || this.options.postProcess, o2 = R(a2) ? [a2] : a2;
1723
- return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = ui.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
1745
+ let a2 = n2.postProcess || this.options.postProcess, o2 = B(a2) ? [a2] : a2;
1746
+ return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = fi.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
1724
1747
  }
1725
1748
  resolve(e6, t2 = {}) {
1726
1749
  let n2, r2, i2, a2, o2;
1727
- return R(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? G(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
1750
+ return B(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? q(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
1728
1751
  if (this.isValidLookup(n2)) return;
1729
1752
  let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
1730
1753
  r2 = c2;
1731
1754
  let l2 = s2.namespaces;
1732
1755
  this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
1733
- let u2 = t2.count !== void 0 && !R(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (R(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1756
+ let u2 = t2.count !== void 0 && !B(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (B(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
1734
1757
  l2.forEach((e8) => {
1735
1758
  this.isValidLookup(n2) || (o2 = e8, !this.checkedLoadedFor[`${p2[0]}-${e8}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (this.checkedLoadedFor[`${p2[0]}-${e8}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" 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!!!`)), p2.forEach((r3) => {
1736
1759
  if (this.isValidLookup(n2)) return;
@@ -1759,7 +1782,7 @@ var mi = class e3 extends si {
1759
1782
  return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
1760
1783
  }
1761
1784
  getUsedParamsDetails(e6 = {}) {
1762
- let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !R(e6.replace), r2 = n2 ? e6.replace : e6;
1785
+ let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !B(e6.replace), r2 = n2 ? e6.replace : e6;
1763
1786
  if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
1764
1787
  r2 = { ...r2 };
1765
1788
  for (let e7 of t2) delete r2[e7];
@@ -1771,25 +1794,25 @@ var mi = class e3 extends si {
1771
1794
  return false;
1772
1795
  }
1773
1796
  };
1774
- var hi = class {
1797
+ var _i = class {
1775
1798
  constructor(e6) {
1776
- this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = W.create(`languageUtils`), this.resolveHierarchyCache = {};
1799
+ this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = K.create(`languageUtils`), this.resolveHierarchyCache = {};
1777
1800
  }
1778
1801
  clearCache() {
1779
1802
  this.resolveHierarchyCache = {};
1780
1803
  }
1781
1804
  getScriptPartFromCode(e6) {
1782
- if (e6 = U(e6), !e6 || !e6.includes(`-`)) return null;
1805
+ if (e6 = G(e6), !e6 || !e6.includes(`-`)) return null;
1783
1806
  let t2 = e6.split(`-`);
1784
1807
  return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
1785
1808
  }
1786
1809
  getLanguagePartFromCode(e6) {
1787
- if (e6 = U(e6), !e6 || !e6.includes(`-`)) return e6;
1810
+ if (e6 = G(e6), !e6 || !e6.includes(`-`)) return e6;
1788
1811
  let t2 = e6.split(`-`);
1789
1812
  return this.formatLanguageCode(t2[0]);
1790
1813
  }
1791
1814
  formatLanguageCode(e6) {
1792
- if (R(e6) && e6.includes(`-`)) {
1815
+ if (B(e6) && e6.includes(`-`)) {
1793
1816
  let t2;
1794
1817
  try {
1795
1818
  t2 = Intl.getCanonicalLocales(e6)[0];
@@ -1820,7 +1843,7 @@ var hi = class {
1820
1843
  }
1821
1844
  getFallbackCodes(e6, t2) {
1822
1845
  if (!e6) return [];
1823
- if (typeof e6 == `function` && (e6 = e6(t2)), R(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
1846
+ if (typeof e6 == `function` && (e6 = e6(t2)), B(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
1824
1847
  if (!t2) return e6.default || [];
1825
1848
  let n2 = e6[t2];
1826
1849
  return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
@@ -1828,7 +1851,7 @@ var hi = class {
1828
1851
  toResolveHierarchy(e6, t2) {
1829
1852
  let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
1830
1853
  r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
1831
- let i2 = t2 === void 0 || t2 === false || R(t2), a2 = t2 === void 0 && typeof this.options.fallbackLng == `function`, o2 = R(e6) && i2 && !a2, s2 = null;
1854
+ let i2 = t2 === void 0 || t2 === false || B(t2), a2 = t2 === void 0 && typeof this.options.fallbackLng == `function`, o2 = B(e6) && i2 && !a2, s2 = null;
1832
1855
  if (o2) {
1833
1856
  let n3;
1834
1857
  n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
@@ -1840,30 +1863,30 @@ var hi = class {
1840
1863
  let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
1841
1864
  e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
1842
1865
  };
1843
- return R(e6) && (e6.includes(`-`) || e6.includes(`_`)) ? (this.options.load !== `languageOnly` && u2(this.formatLanguageCode(e6)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && u2(this.getScriptPartFromCode(e6)), this.options.load !== `currentOnly` && u2(this.getLanguagePartFromCode(e6))) : R(e6) && u2(this.formatLanguageCode(e6)), c2.forEach((e7) => {
1866
+ return B(e6) && (e6.includes(`-`) || e6.includes(`_`)) ? (this.options.load !== `languageOnly` && u2(this.formatLanguageCode(e6)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && u2(this.getScriptPartFromCode(e6)), this.options.load !== `currentOnly` && u2(this.getLanguagePartFromCode(e6))) : B(e6) && u2(this.formatLanguageCode(e6)), c2.forEach((e7) => {
1844
1867
  let t3 = this.formatLanguageCode(e7);
1845
1868
  l2.includes(t3) || u2(t3);
1846
1869
  }), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
1847
1870
  }
1848
1871
  };
1849
- var gi = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1850
- var _i = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1851
- var vi = class {
1872
+ var vi = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1873
+ var yi = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1874
+ var bi = class {
1852
1875
  constructor(e6, t2 = {}) {
1853
- this.languageUtils = e6, this.options = t2, this.logger = W.create(`pluralResolver`), this.pluralRulesCache = {};
1876
+ this.languageUtils = e6, this.options = t2, this.logger = K.create(`pluralResolver`), this.pluralRulesCache = {};
1854
1877
  }
1855
1878
  clearCache() {
1856
1879
  this.pluralRulesCache = {};
1857
1880
  }
1858
1881
  getRule(e6, t2 = {}) {
1859
- let n2 = U(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
1882
+ let n2 = G(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
1860
1883
  if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
1861
1884
  let a2;
1862
1885
  try {
1863
1886
  a2 = new Intl.PluralRules(n2, { type: r2 });
1864
1887
  } catch {
1865
- if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), _i;
1866
- if (!e6.match(/-|_/)) return _i;
1888
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), yi;
1889
+ if (!e6.match(/-|_/)) return yi;
1867
1890
  let n3 = this.languageUtils.getLanguagePartFromCode(e6);
1868
1891
  a2 = this.getRule(n3, t2);
1869
1892
  }
@@ -1878,26 +1901,26 @@ var vi = class {
1878
1901
  }
1879
1902
  getSuffixes(e6, t2 = {}) {
1880
1903
  let n2 = this.getRule(e6, t2);
1881
- return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => gi[e7] - gi[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
1904
+ return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => vi[e7] - vi[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
1882
1905
  }
1883
1906
  getSuffix(e6, t2, n2 = {}) {
1884
1907
  let r2 = this.getRule(e6, n2);
1885
1908
  return r2 ? `${this.options.prepend}${n2.ordinal ? `ordinal${this.options.prepend}` : ``}${r2.select(t2)}` : (this.logger.warn(`no plural rule found for: ${e6}`), this.getSuffix(`dev`, t2, n2));
1886
1909
  }
1887
1910
  };
1888
- var yi = (e6, t2, n2, r2 = `.`, i2 = true) => {
1889
- let a2 = Zr(e6, t2, n2);
1890
- return !a2 && i2 && R(n2) && (a2 = ai(e6, n2, r2), a2 === void 0 && (a2 = ai(t2, n2, r2))), a2;
1911
+ var xi = (e6, t2, n2, r2 = `.`, i2 = true) => {
1912
+ let a2 = $r(e6, t2, n2);
1913
+ return !a2 && i2 && B(n2) && (a2 = si(e6, n2, r2), a2 === void 0 && (a2 = si(t2, n2, r2))), a2;
1891
1914
  };
1892
- var bi = (e6) => e6.replace(/\$/g, `$$$$`);
1893
- var xi = class {
1915
+ var Si = (e6) => e6.replace(/\$/g, `$$$$`);
1916
+ var Ci = class {
1894
1917
  constructor(e6 = {}) {
1895
- this.logger = W.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
1918
+ this.logger = K.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
1896
1919
  }
1897
1920
  init(e6 = {}) {
1898
1921
  e6.interpolation ||= { escapeValue: true };
1899
1922
  let { escape: t2, escapeValue: n2, useRawValueToEscape: r2, prefix: i2, prefixEscaped: a2, suffix: o2, suffixEscaped: s2, formatSeparator: c2, unescapeSuffix: l2, unescapePrefix: u2, nestingPrefix: d2, nestingPrefixEscaped: f2, nestingSuffix: p2, nestingSuffixEscaped: m2, nestingOptionsSeparator: h2, maxReplaces: g2, alwaysFormat: _2 } = e6.interpolation;
1900
- this.escape = t2 === void 0 ? ei : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? H(i2) : a2 || `{{`, this.suffix = o2 ? H(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? H(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? H(l2) : ``, this.nestingPrefix = d2 ? H(d2) : f2 || H(`$t(`), this.nestingSuffix = p2 ? H(p2) : m2 || H(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1923
+ this.escape = t2 === void 0 ? ni : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? W(i2) : a2 || `{{`, this.suffix = o2 ? W(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? W(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? W(l2) : ``, this.nestingPrefix = d2 ? W(d2) : f2 || W(`$t(`), this.nestingSuffix = p2 ? W(p2) : m2 || W(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
1901
1924
  }
1902
1925
  reset() {
1903
1926
  this.options && this.init(this.options);
@@ -1909,11 +1932,11 @@ var xi = class {
1909
1932
  interpolate(e6, t2, n2, r2) {
1910
1933
  let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
1911
1934
  if (!e7.includes(this.formatSeparator)) {
1912
- let i4 = yi(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
1935
+ let i4 = xi(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
1913
1936
  return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
1914
1937
  }
1915
1938
  let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
1916
- return this.format(yi(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1939
+ return this.format(xi(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1917
1940
  };
1918
1941
  this.resetRegExp(), !this.escapeValue && typeof e6 == `string` && /\$t\([^)]*\{[^}]*\{\{/.test(e6) && this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false \u2014 if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);
1919
1942
  let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
@@ -1923,15 +1946,15 @@ var xi = class {
1923
1946
  if (a2 = c2(n3), a2 === void 0) {
1924
1947
  if (typeof l2 == `function`) {
1925
1948
  let t4 = l2(e6, i2, r2);
1926
- a2 = R(t4) ? t4 : ``;
1949
+ a2 = B(t4) ? t4 : ``;
1927
1950
  } else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
1928
1951
  else if (u2) {
1929
1952
  a2 = i2[0];
1930
1953
  continue;
1931
1954
  } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
1932
- } else !R(a2) && !this.useRawValueToEscape && (a2 = Wr(a2));
1955
+ } else !B(a2) && !this.useRawValueToEscape && (a2 = Kr(a2));
1933
1956
  let s3 = t3.safeValue(a2);
1934
- if (e6 = e6.replace(i2[0], bi(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
1957
+ if (e6 = e6.replace(i2[0], Si(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
1935
1958
  }
1936
1959
  }), e6;
1937
1960
  }
@@ -1939,7 +1962,7 @@ var xi = class {
1939
1962
  let r2, i2, a2, o2 = (e7, t3) => {
1940
1963
  let n3 = this.nestingOptionsSeparator;
1941
1964
  if (!e7.includes(n3)) return e7;
1942
- let r3 = e7.split(RegExp(`${H(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
1965
+ let r3 = e7.split(RegExp(`${W(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
1943
1966
  e7 = r3[0], i3 = this.interpolate(i3, a2);
1944
1967
  let o3 = i3.match(/'/g), s3 = i3.match(/"/g);
1945
1968
  ((o3?.length ?? 0) % 2 == 0 && !s3 || (s3?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
@@ -1952,15 +1975,15 @@ var xi = class {
1952
1975
  }, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
1953
1976
  for (; r2 = s2.exec(e6); ) {
1954
1977
  let u2 = [];
1955
- a2 = { ...n2 }, a2 = a2.replace && !R(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1978
+ a2 = { ...n2 }, a2 = a2.replace && !B(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1956
1979
  let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
1957
- if (d2 !== -1 && (u2 = r2[1].slice(d2).split(this.formatSeparator).map((e7) => e7.trim()).filter(Boolean), r2[1] = r2[1].slice(0, d2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e6 && !R(i2)) return i2;
1958
- R(i2) || (i2 = Wr(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e6}`), ``), u2.length && (i2 = u2.reduce((e7, t3) => this.format(e7, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), c2 += e6.slice(l2, r2.index) + Wr(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
1980
+ if (d2 !== -1 && (u2 = r2[1].slice(d2).split(this.formatSeparator).map((e7) => e7.trim()).filter(Boolean), r2[1] = r2[1].slice(0, d2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e6 && !B(i2)) return i2;
1981
+ B(i2) || (i2 = Kr(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e6}`), ``), u2.length && (i2 = u2.reduce((e7, t3) => this.format(e7, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), c2 += e6.slice(l2, r2.index) + Kr(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
1959
1982
  }
1960
1983
  return l2 ? c2 + e6.slice(l2) : e6;
1961
1984
  }
1962
1985
  };
1963
- var Si = (e6) => {
1986
+ var wi = (e6) => {
1964
1987
  let t2 = e6.toLowerCase().trim(), n2 = {};
1965
1988
  if (e6.includes(`(`)) {
1966
1989
  let r2 = e6.split(`(`);
@@ -1975,23 +1998,23 @@ var Si = (e6) => {
1975
1998
  }
1976
1999
  return { formatName: t2, formatOptions: n2 };
1977
2000
  };
1978
- var Ci = (e6) => {
2001
+ var Ti = (e6) => {
1979
2002
  let t2 = {};
1980
2003
  return (n2, r2, i2) => {
1981
2004
  let a2 = i2;
1982
2005
  i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
1983
2006
  let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
1984
- return s2 || (s2 = e6(U(r2), i2), t2[o2] = s2), s2(n2);
2007
+ return s2 || (s2 = e6(G(r2), i2), t2[o2] = s2), s2(n2);
1985
2008
  };
1986
2009
  };
1987
- var wi = (e6) => (t2, n2, r2) => e6(U(n2), r2)(t2);
1988
- var Ti = class {
2010
+ var Ei = (e6) => (t2, n2, r2) => e6(G(n2), r2)(t2);
2011
+ var Di = class {
1989
2012
  constructor(e6 = {}) {
1990
- this.logger = W.create(`formatter`), this.options = e6, this.init(e6);
2013
+ this.logger = K.create(`formatter`), this.options = e6, this.init(e6);
1991
2014
  }
1992
2015
  init(e6, t2 = { interpolation: {} }) {
1993
2016
  this.formatSeparator = t2.interpolation.formatSeparator || `,`;
1994
- let n2 = t2.cacheInBuiltFormats ? Ci : wi;
2017
+ let n2 = t2.cacheInBuiltFormats ? Ti : Ei;
1995
2018
  this.formats = { number: n2((e7, t3) => {
1996
2019
  let n3 = new Intl.NumberFormat(e7, { ...t3 });
1997
2020
  return (e8) => n3.format(e8);
@@ -2013,7 +2036,7 @@ var Ti = class {
2013
2036
  this.formats[e6.toLowerCase().trim()] = t2;
2014
2037
  }
2015
2038
  addCached(e6, t2) {
2016
- this.formats[e6.toLowerCase().trim()] = Ci(t2);
2039
+ this.formats[e6.toLowerCase().trim()] = Ti(t2);
2017
2040
  }
2018
2041
  format(e6, t2, n2, r2 = {}) {
2019
2042
  if (!t2 || e6 == null) return e6;
@@ -2024,7 +2047,7 @@ var Ti = class {
2024
2047
  a2.push(t3);
2025
2048
  }
2026
2049
  return a2.reduce((e7, t3) => {
2027
- let { formatName: i3, formatOptions: a3 } = Si(t3);
2050
+ let { formatName: i3, formatOptions: a3 } = wi(t3);
2028
2051
  if (this.formats[i3]) {
2029
2052
  let t4 = e7;
2030
2053
  try {
@@ -2039,12 +2062,12 @@ var Ti = class {
2039
2062
  }, e6);
2040
2063
  }
2041
2064
  };
2042
- var Ei = (e6, t2) => {
2065
+ var Oi = (e6, t2) => {
2043
2066
  e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
2044
2067
  };
2045
- var Di = class extends si {
2068
+ var ki = class extends li {
2046
2069
  constructor(e6, t2, n2, r2 = {}) {
2047
- super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = W.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
2070
+ super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = K.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
2048
2071
  }
2049
2072
  queueLoad(e6, t2, n2, r2) {
2050
2073
  let i2 = {}, a2 = {}, o2 = {}, s2 = {};
@@ -2061,7 +2084,7 @@ var Di = class extends si {
2061
2084
  t2 && this.emit(`failedLoading`, i2, a2, t2), !t2 && n2 && this.store.addResourceBundle(i2, a2, n2, void 0, void 0, { skipCopy: true }), this.state[e6] = t2 ? -1 : 2, t2 && n2 && (this.state[e6] = 0);
2062
2085
  let o2 = {};
2063
2086
  this.queue.forEach((n3) => {
2064
- Xr(n3.loaded, [i2], a2), Ei(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
2087
+ Qr(n3.loaded, [i2], a2), Oi(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
2065
2088
  o2[e7] || (o2[e7] = {});
2066
2089
  let t3 = n3.loaded[e7];
2067
2090
  t3.length && t3.forEach((t4) => {
@@ -2096,7 +2119,7 @@ var Di = class extends si {
2096
2119
  }
2097
2120
  prepareLoading(e6, t2, n2 = {}, r2) {
2098
2121
  if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
2099
- R(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), R(t2) && (t2 = [t2]);
2122
+ B(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), B(t2) && (t2 = [t2]);
2100
2123
  let i2 = this.queueLoad(e6, t2, n2, r2);
2101
2124
  if (!i2.toLoad.length) return i2.pending.length || r2(), null;
2102
2125
  i2.toLoad.forEach((e7) => {
@@ -2133,9 +2156,9 @@ var Di = class extends si {
2133
2156
  }
2134
2157
  }
2135
2158
  };
2136
- var Oi = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, enableSelector: false, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e6) => {
2159
+ var Ai = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, enableSelector: false, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e6) => {
2137
2160
  let t2 = {};
2138
- if (typeof e6[1] == `object` && (t2 = e6[1]), R(e6[1]) && (t2.defaultValue = e6[1]), R(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
2161
+ if (typeof e6[1] == `object` && (t2 = e6[1]), B(e6[1]) && (t2.defaultValue = e6[1]), B(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
2139
2162
  let n2 = e6[3] || e6[2];
2140
2163
  Object.keys(n2).forEach((e7) => {
2141
2164
  t2[e7] = n2[e7];
@@ -2143,17 +2166,17 @@ var Oi = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
2143
2166
  }
2144
2167
  return t2;
2145
2168
  }, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
2146
- var ki = (e6) => (R(e6.ns) && (e6.ns = [e6.ns]), R(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), R(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
2147
- var Ai = () => {
2169
+ var ji = (e6) => (B(e6.ns) && (e6.ns = [e6.ns]), B(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), B(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
2170
+ var Mi = () => {
2148
2171
  };
2149
- var ji = (e6) => {
2172
+ var Ni = (e6) => {
2150
2173
  Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
2151
2174
  typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
2152
2175
  });
2153
2176
  };
2154
- var K = class e4 extends si {
2177
+ var J = class e4 extends li {
2155
2178
  constructor(e6 = {}, t2) {
2156
- if (super(), this.options = ki(e6), this.services = {}, this.logger = W, this.modules = { external: [] }, ji(this), t2 && !this.isInitialized && !e6.isClone) {
2179
+ if (super(), this.options = ji(e6), this.services = {}, this.logger = K, this.modules = { external: [] }, Ni(this), t2 && !this.isInitialized && !e6.isClone) {
2157
2180
  if (!this.options.initAsync) return this.init(e6, t2), this;
2158
2181
  setTimeout(() => {
2159
2182
  this.init(e6, t2);
@@ -2161,26 +2184,26 @@ var K = class e4 extends si {
2161
2184
  }
2162
2185
  }
2163
2186
  init(e6 = {}, t2) {
2164
- this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (R(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
2165
- let n2 = Oi();
2166
- this.options = { ...n2, ...this.options, ...ki(e6) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e6.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e6.keySeparator), e6.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e6.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler);
2187
+ this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (B(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
2188
+ let n2 = Ai();
2189
+ this.options = { ...n2, ...this.options, ...ji(e6) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e6.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e6.keySeparator), e6.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e6.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler);
2167
2190
  let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
2168
2191
  if (!this.options.isClone) {
2169
- this.modules.logger ? W.init(r2(this.modules.logger), this.options) : W.init(null, this.options);
2192
+ this.modules.logger ? K.init(r2(this.modules.logger), this.options) : K.init(null, this.options);
2170
2193
  let e7;
2171
- e7 = this.modules.formatter ? this.modules.formatter : Ti;
2172
- let t3 = new hi(this.options);
2173
- this.store = new li(this.options.resources, this.options);
2194
+ e7 = this.modules.formatter ? this.modules.formatter : Di;
2195
+ let t3 = new _i(this.options);
2196
+ this.store = new di(this.options.resources, this.options);
2174
2197
  let n3 = this.services;
2175
- n3.logger = W, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new vi(t3, { prepend: this.options.pluralSeparator }), e7 && (n3.formatter = r2(e7), n3.formatter.init && n3.formatter.init(n3, this.options), this.options.interpolation.format = n3.formatter.format.bind(n3.formatter)), n3.interpolator = new xi(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new Di(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
2198
+ n3.logger = K, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new bi(t3, { prepend: this.options.pluralSeparator }), e7 && (n3.formatter = r2(e7), n3.formatter.init && n3.formatter.init(n3, this.options), this.options.interpolation.format = n3.formatter.format.bind(n3.formatter)), n3.interpolator = new Ci(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new ki(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
2176
2199
  this.emit(e8, ...t4);
2177
- }), this.modules.languageDetector && (n3.languageDetector = r2(this.modules.languageDetector), n3.languageDetector.init && n3.languageDetector.init(n3, this.options.detection, this.options)), this.modules.i18nFormat && (n3.i18nFormat = r2(this.modules.i18nFormat), n3.i18nFormat.init && n3.i18nFormat.init(this)), this.translator = new mi(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
2200
+ }), this.modules.languageDetector && (n3.languageDetector = r2(this.modules.languageDetector), n3.languageDetector.init && n3.languageDetector.init(n3, this.options.detection, this.options)), this.modules.i18nFormat && (n3.i18nFormat = r2(this.modules.i18nFormat), n3.i18nFormat.init && n3.i18nFormat.init(this)), this.translator = new gi(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
2178
2201
  this.emit(e8, ...t4);
2179
2202
  }), this.modules.external.forEach((e8) => {
2180
2203
  e8.init && e8.init(this);
2181
2204
  });
2182
2205
  }
2183
- if (this.format = this.options.interpolation.format, t2 ||= Ai, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2206
+ if (this.format = this.options.interpolation.format, t2 ||= Mi, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2184
2207
  let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2185
2208
  e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
2186
2209
  }
@@ -2189,7 +2212,7 @@ var K = class e4 extends si {
2189
2212
  }), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
2190
2213
  this[e7] = (...t3) => (this.store[e7](...t3), this);
2191
2214
  });
2192
- let i2 = z(), a2 = () => {
2215
+ let i2 = V(), a2 = () => {
2193
2216
  let e7 = (e8, n3) => {
2194
2217
  this.isInitializing = false, this.isInitialized && !this.initializedStoreOnce && this.logger.warn(`init: i18next is already initialized. You should call init just once!`), this.isInitialized = true, this.options.isClone || this.logger.log(`initialized`, this.options), this.emit(`initialized`, this.options), i2.resolve(n3), t2(e8, n3);
2195
2218
  };
@@ -2198,8 +2221,8 @@ var K = class e4 extends si {
2198
2221
  };
2199
2222
  return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
2200
2223
  }
2201
- loadResources(e6, t2 = Ai) {
2202
- let n2 = t2, r2 = R(e6) ? e6 : this.language;
2224
+ loadResources(e6, t2 = Mi) {
2225
+ let n2 = t2, r2 = B(e6) ? e6 : this.language;
2203
2226
  if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
2204
2227
  if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
2205
2228
  let e7 = [], t3 = (t4) => {
@@ -2213,15 +2236,15 @@ var K = class e4 extends si {
2213
2236
  } else n2(null);
2214
2237
  }
2215
2238
  reloadResources(e6, t2, n2) {
2216
- let r2 = z();
2217
- return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||= Ai, this.services.backendConnector.reload(e6, t2, (e7) => {
2239
+ let r2 = V();
2240
+ return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||= Mi, this.services.backendConnector.reload(e6, t2, (e7) => {
2218
2241
  r2.resolve(), n2(e7);
2219
2242
  }), r2;
2220
2243
  }
2221
2244
  use(e6) {
2222
2245
  if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
2223
2246
  if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
2224
- return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` && ui.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
2247
+ return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` && fi.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
2225
2248
  }
2226
2249
  setResolvedLanguage(e6) {
2227
2250
  if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
@@ -2237,7 +2260,7 @@ var K = class e4 extends si {
2237
2260
  }
2238
2261
  changeLanguage(e6, t2) {
2239
2262
  this.isLanguageChangingTo = e6;
2240
- let n2 = z();
2263
+ let n2 = V();
2241
2264
  this.emit(`languageChanging`, e6);
2242
2265
  let r2 = (e7) => {
2243
2266
  this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
@@ -2245,7 +2268,7 @@ var K = class e4 extends si {
2245
2268
  a3 ? this.isLanguageChangingTo === e6 && (r2(a3), this.translator.changeLanguage(a3), this.isLanguageChangingTo = void 0, this.emit(`languageChanged`, a3), this.logger.log(`languageChanged`, a3)) : this.isLanguageChangingTo = void 0, n2.resolve((...e7) => this.t(...e7)), t2 && t2(i3, (...e7) => this.t(...e7));
2246
2269
  }, a2 = (t3) => {
2247
2270
  !e6 && !t3 && this.services.languageDetector && (t3 = []);
2248
- let n3 = R(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(R(t3) ? [t3] : t3);
2271
+ let n3 = B(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(B(t3) ? [t3] : t3);
2249
2272
  a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
2250
2273
  i2(e7, a3);
2251
2274
  });
@@ -2259,11 +2282,11 @@ var K = class e4 extends si {
2259
2282
  let s2 = o2.ns !== void 0 && o2.ns !== null;
2260
2283
  o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
2261
2284
  let c2 = { ...this.options, ...o2 };
2262
- Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = G(o2.keyPrefix, c2));
2285
+ Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = q(o2.keyPrefix, c2));
2263
2286
  let l2 = this.options.keySeparator || `.`, u2;
2264
- return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = G(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = G(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
2287
+ return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = q(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = q(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
2265
2288
  };
2266
- return R(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
2289
+ return B(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
2267
2290
  }
2268
2291
  t(...e6) {
2269
2292
  return this.translator?.translate(...e6);
@@ -2292,16 +2315,16 @@ var K = class e4 extends si {
2292
2315
  return !(s2 && !a2(s2, e6) || r2 && !a2(i2, e6));
2293
2316
  }
2294
2317
  loadNamespaces(e6, t2) {
2295
- let n2 = z();
2296
- return this.options.ns ? (R(e6) && (e6 = [e6]), e6.forEach((e7) => {
2318
+ let n2 = V();
2319
+ return this.options.ns ? (B(e6) && (e6 = [e6]), e6.forEach((e7) => {
2297
2320
  this.options.ns.includes(e7) || this.options.ns.push(e7);
2298
2321
  }), this.loadResources((e7) => {
2299
2322
  n2.resolve(), t2 && t2(e7);
2300
2323
  }), n2) : (t2 && t2(), Promise.resolve());
2301
2324
  }
2302
2325
  loadLanguages(e6, t2) {
2303
- let n2 = z();
2304
- R(e6) && (e6 = [e6]);
2326
+ let n2 = V();
2327
+ B(e6) && (e6 = [e6]);
2305
2328
  let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
2306
2329
  return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
2307
2330
  n2.resolve(), t2 && t2(e7);
@@ -2317,24 +2340,24 @@ var K = class e4 extends si {
2317
2340
  }
2318
2341
  } catch {
2319
2342
  }
2320
- let t2 = `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`.split(`.`), n2 = this.services?.languageUtils || new hi(Oi());
2343
+ let t2 = `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`.split(`.`), n2 = this.services?.languageUtils || new _i(Ai());
2321
2344
  return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
2322
2345
  }
2323
2346
  static createInstance(t2 = {}, n2) {
2324
2347
  let r2 = new e4(t2, n2);
2325
2348
  return r2.createInstance = e4.createInstance, r2;
2326
2349
  }
2327
- cloneInstance(t2 = {}, n2 = Ai) {
2350
+ cloneInstance(t2 = {}, n2 = Mi) {
2328
2351
  let r2 = t2.forkResourceStore;
2329
2352
  r2 && delete t2.forkResourceStore;
2330
2353
  let i2 = { ...this.options, preload: false, ...t2, isClone: true }, a2 = new e4(i2);
2331
2354
  if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
2332
2355
  a2[e6] = this[e6];
2333
- }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new li(Object.keys(this.store.data).reduce((e6, t3) => (e6[t3] = { ...this.store.data[t3] }, e6[t3] = Object.keys(e6[t3]).reduce((n3, r3) => (n3[r3] = { ...e6[t3][r3] }, n3), e6[t3]), e6), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
2334
- let e6 = { ...Oi().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
2335
- a2.services.interpolator = new xi(n3);
2356
+ }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new di(Object.keys(this.store.data).reduce((e6, t3) => (e6[t3] = { ...this.store.data[t3] }, e6[t3] = Object.keys(e6[t3]).reduce((n3, r3) => (n3[r3] = { ...e6[t3][r3] }, n3), e6[t3]), e6), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
2357
+ let e6 = { ...Ai().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
2358
+ a2.services.interpolator = new Ci(n3);
2336
2359
  }
2337
- return a2.translator = new mi(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
2360
+ return a2.translator = new gi(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
2338
2361
  a2.emit(e6, ...t3);
2339
2362
  }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
2340
2363
  }
@@ -2342,9 +2365,9 @@ var K = class e4 extends si {
2342
2365
  return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
2343
2366
  }
2344
2367
  }.createInstance();
2345
- K.createInstance, K.dir, K.init, K.loadResources, K.reloadResources, K.use, K.changeLanguage, K.getFixedT, K.t, K.exists, K.setDefaultNamespace, K.hasLoadedNamespace, K.loadNamespaces, K.loadLanguages;
2346
- var Mi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
2347
- let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = K.createInstance(i2 ? s2 : void 0);
2368
+ J.createInstance, J.dir, J.init, J.loadResources, J.reloadResources, J.use, J.changeLanguage, J.getFixedT, J.t, J.exists, J.setDefaultNamespace, J.hasLoadedNamespace, J.loadNamespaces, J.loadLanguages;
2369
+ var Pi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
2370
+ let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = J.createInstance(i2 ? s2 : void 0);
2348
2371
  return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
2349
2372
  try {
2350
2373
  return r3(null, await t2(e7));
@@ -2353,38 +2376,38 @@ var Mi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
2353
2376
  }
2354
2377
  } }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
2355
2378
  };
2356
- function Ni(e6, t2) {
2357
- let n2 = t2 && t2.cache ? t2.cache : Ui, r2 = t2 && t2.serializer ? t2.serializer : Vi;
2358
- return (t2 && t2.strategy ? t2.strategy : Ri)(e6, { cache: n2, serializer: r2 });
2379
+ function Fi(e6, t2) {
2380
+ let n2 = t2 && t2.cache ? t2.cache : Gi, r2 = t2 && t2.serializer ? t2.serializer : Ui;
2381
+ return (t2 && t2.strategy ? t2.strategy : Bi)(e6, { cache: n2, serializer: r2 });
2359
2382
  }
2360
- function Pi(e6) {
2383
+ function Ii(e6) {
2361
2384
  return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
2362
2385
  }
2363
- function Fi(e6, t2, n2, r2) {
2364
- let i2 = Pi(r2) ? r2 : n2(r2), a2 = t2.get(i2);
2386
+ function Li(e6, t2, n2, r2) {
2387
+ let i2 = Ii(r2) ? r2 : n2(r2), a2 = t2.get(i2);
2365
2388
  return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
2366
2389
  }
2367
- function Ii(e6, t2, n2) {
2390
+ function Ri(e6, t2, n2) {
2368
2391
  let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
2369
2392
  return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
2370
2393
  }
2371
- function Li(e6, t2, n2, r2, i2) {
2394
+ function zi(e6, t2, n2, r2, i2) {
2372
2395
  return n2.bind(t2, e6, r2, i2);
2373
2396
  }
2374
- function Ri(e6, t2) {
2375
- let n2 = e6.length === 1 ? Fi : Ii;
2376
- return Li(e6, this, n2, t2.cache.create(), t2.serializer);
2397
+ function Bi(e6, t2) {
2398
+ let n2 = e6.length === 1 ? Li : Ri;
2399
+ return zi(e6, this, n2, t2.cache.create(), t2.serializer);
2377
2400
  }
2378
- function zi(e6, t2) {
2379
- return Li(e6, this, Ii, t2.cache.create(), t2.serializer);
2401
+ function Vi(e6, t2) {
2402
+ return zi(e6, this, Ri, t2.cache.create(), t2.serializer);
2380
2403
  }
2381
- function Bi(e6, t2) {
2382
- return Li(e6, this, Fi, t2.cache.create(), t2.serializer);
2404
+ function Hi(e6, t2) {
2405
+ return zi(e6, this, Li, t2.cache.create(), t2.serializer);
2383
2406
  }
2384
- var Vi = function() {
2407
+ var Ui = function() {
2385
2408
  return JSON.stringify(arguments);
2386
2409
  };
2387
- var Hi = class {
2410
+ var Wi = class {
2388
2411
  constructor() {
2389
2412
  this.cache = /* @__PURE__ */ Object.create(null);
2390
2413
  }
@@ -2395,14 +2418,14 @@ var Hi = class {
2395
2418
  this.cache[e6] = t2;
2396
2419
  }
2397
2420
  };
2398
- var Ui = { create: function() {
2399
- return new Hi();
2421
+ var Gi = { create: function() {
2422
+ return new Wi();
2400
2423
  } };
2401
- var Wi = { variadic: zi, monadic: Bi };
2402
- var Gi = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
2403
- function Ki(e6) {
2424
+ var Ki = { variadic: Vi, monadic: Hi };
2425
+ var qi = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
2426
+ function Ji(e6) {
2404
2427
  let t2 = {};
2405
- return e6.replace(Gi, (e7) => {
2428
+ return e6.replace(qi, (e7) => {
2406
2429
  let n2 = e7.length;
2407
2430
  switch (e7[0]) {
2408
2431
  case `G`:
@@ -2489,10 +2512,10 @@ function Ki(e6) {
2489
2512
  return ``;
2490
2513
  }), t2;
2491
2514
  }
2492
- var qi = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
2493
- function Ji(e6) {
2515
+ var Yi = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
2516
+ function Xi(e6) {
2494
2517
  if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
2495
- let t2 = e6.split(qi).filter((e7) => e7.length > 0), n2 = [];
2518
+ let t2 = e6.split(Yi).filter((e7) => e7.length > 0), n2 = [];
2496
2519
  for (let e7 of t2) {
2497
2520
  let t3 = e7.split(`/`);
2498
2521
  if (t3.length === 0) throw Error(`Invalid number skeleton`);
@@ -2502,20 +2525,20 @@ function Ji(e6) {
2502
2525
  }
2503
2526
  return n2;
2504
2527
  }
2505
- function Yi(e6) {
2528
+ function Zi(e6) {
2506
2529
  return e6.replace(/^(.*?)-/, ``);
2507
2530
  }
2508
- var Xi = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
2509
- var Zi = /^(@+)?(\+|#+)?[rs]?$/g;
2510
- var Qi = /(\*)(0+)|(#+)(0+)|(0+)/g;
2511
- var $i = /^(0+)$/;
2512
- function ea(e6) {
2531
+ var Qi = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
2532
+ var $i = /^(@+)?(\+|#+)?[rs]?$/g;
2533
+ var ea = /(\*)(0+)|(#+)(0+)|(0+)/g;
2534
+ var ta = /^(0+)$/;
2535
+ function na(e6) {
2513
2536
  let t2 = {};
2514
- return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Zi, function(e7, n2, r2) {
2537
+ return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace($i, function(e7, n2, r2) {
2515
2538
  return typeof r2 == `string` ? r2 === `+` ? t2.minimumSignificantDigits = n2.length : n2[0] === `#` ? t2.maximumSignificantDigits = n2.length : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length + (typeof r2 == `string` ? r2.length : 0)) : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length), ``;
2516
2539
  }), t2;
2517
2540
  }
2518
- function ta(e6) {
2541
+ function ra(e6) {
2519
2542
  switch (e6) {
2520
2543
  case `sign-auto`:
2521
2544
  return { signDisplay: `auto` };
@@ -2539,19 +2562,19 @@ function ta(e6) {
2539
2562
  return { signDisplay: `never` };
2540
2563
  }
2541
2564
  }
2542
- function na(e6) {
2565
+ function ia(e6) {
2543
2566
  let t2;
2544
2567
  if (e6[0] === `E` && e6[1] === `E` ? (t2 = { notation: `engineering` }, e6 = e6.slice(2)) : e6[0] === `E` && (t2 = { notation: `scientific` }, e6 = e6.slice(1)), t2) {
2545
2568
  let n2 = e6.slice(0, 2);
2546
- if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !$i.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
2569
+ if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !ta.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
2547
2570
  t2.minimumIntegerDigits = e6.length;
2548
2571
  }
2549
2572
  return t2;
2550
2573
  }
2551
- function ra(e6) {
2552
- return ta(e6) || {};
2574
+ function aa(e6) {
2575
+ return ra(e6) || {};
2553
2576
  }
2554
- function ia(e6) {
2577
+ function oa(e6) {
2555
2578
  let t2 = {};
2556
2579
  for (let n2 of e6) {
2557
2580
  switch (n2.stem) {
@@ -2575,7 +2598,7 @@ function ia(e6) {
2575
2598
  continue;
2576
2599
  case `measure-unit`:
2577
2600
  case `unit`:
2578
- t2.style = `unit`, t2.unit = Yi(n2.options[0]);
2601
+ t2.style = `unit`, t2.unit = Zi(n2.options[0]);
2579
2602
  continue;
2580
2603
  case `compact-short`:
2581
2604
  case `K`:
@@ -2586,10 +2609,10 @@ function ia(e6) {
2586
2609
  t2.notation = `compact`, t2.compactDisplay = `long`;
2587
2610
  continue;
2588
2611
  case `scientific`:
2589
- t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...ra(t3) }), {}) };
2612
+ t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...aa(t3) }), {}) };
2590
2613
  continue;
2591
2614
  case `engineering`:
2592
- t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...ra(t3) }), {}) };
2615
+ t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...aa(t3) }), {}) };
2593
2616
  continue;
2594
2617
  case `notation-simple`:
2595
2618
  t2.notation = `standard`;
@@ -2632,7 +2655,7 @@ function ia(e6) {
2632
2655
  continue;
2633
2656
  case `integer-width`:
2634
2657
  if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
2635
- n2.options[0].replace(Qi, function(e8, n3, r3, i2, a2, o2) {
2658
+ n2.options[0].replace(ea, function(e8, n3, r3, i2, a2, o2) {
2636
2659
  if (n3) t2.minimumIntegerDigits = r3.length;
2637
2660
  else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
2638
2661
  else if (o2) throw Error(`We currently do not support exact integer digits`);
@@ -2640,83 +2663,83 @@ function ia(e6) {
2640
2663
  });
2641
2664
  continue;
2642
2665
  }
2643
- if ($i.test(n2.stem)) {
2666
+ if (ta.test(n2.stem)) {
2644
2667
  t2.minimumIntegerDigits = n2.stem.length;
2645
2668
  continue;
2646
2669
  }
2647
- if (Xi.test(n2.stem)) {
2670
+ if (Qi.test(n2.stem)) {
2648
2671
  if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
2649
- n2.stem.replace(Xi, function(e9, n3, r3, i2, a2, o2) {
2672
+ n2.stem.replace(Qi, function(e9, n3, r3, i2, a2, o2) {
2650
2673
  return r3 === `*` ? t2.minimumFractionDigits = n3.length : i2 && i2[0] === `#` ? t2.maximumFractionDigits = i2.length : a2 && o2 ? (t2.minimumFractionDigits = a2.length, t2.maximumFractionDigits = a2.length + o2.length) : (t2.minimumFractionDigits = n3.length, t2.maximumFractionDigits = n3.length), ``;
2651
2674
  });
2652
2675
  let e8 = n2.options[0];
2653
- e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...ea(e8) });
2676
+ e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...na(e8) });
2654
2677
  continue;
2655
2678
  }
2656
- if (Zi.test(n2.stem)) {
2657
- t2 = { ...t2, ...ea(n2.stem) };
2679
+ if ($i.test(n2.stem)) {
2680
+ t2 = { ...t2, ...na(n2.stem) };
2658
2681
  continue;
2659
2682
  }
2660
- let e7 = ta(n2.stem);
2683
+ let e7 = ra(n2.stem);
2661
2684
  e7 && (t2 = { ...t2, ...e7 });
2662
- let r2 = na(n2.stem);
2685
+ let r2 = ia(n2.stem);
2663
2686
  r2 && (t2 = { ...t2, ...r2 });
2664
2687
  }
2665
2688
  return t2;
2666
2689
  }
2667
- var aa = function(e6) {
2690
+ var sa = function(e6) {
2668
2691
  return e6[e6.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = `EXPECT_ARGUMENT_CLOSING_BRACE`, e6[e6.EMPTY_ARGUMENT = 2] = `EMPTY_ARGUMENT`, e6[e6.MALFORMED_ARGUMENT = 3] = `MALFORMED_ARGUMENT`, e6[e6.EXPECT_ARGUMENT_TYPE = 4] = `EXPECT_ARGUMENT_TYPE`, e6[e6.INVALID_ARGUMENT_TYPE = 5] = `INVALID_ARGUMENT_TYPE`, e6[e6.EXPECT_ARGUMENT_STYLE = 6] = `EXPECT_ARGUMENT_STYLE`, e6[e6.INVALID_NUMBER_SKELETON = 7] = `INVALID_NUMBER_SKELETON`, e6[e6.INVALID_DATE_TIME_SKELETON = 8] = `INVALID_DATE_TIME_SKELETON`, e6[e6.EXPECT_NUMBER_SKELETON = 9] = `EXPECT_NUMBER_SKELETON`, e6[e6.EXPECT_DATE_TIME_SKELETON = 10] = `EXPECT_DATE_TIME_SKELETON`, e6[e6.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = `UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`, e6[e6.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = `EXPECT_SELECT_ARGUMENT_OPTIONS`, e6[e6.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = `EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = `INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = `EXPECT_SELECT_ARGUMENT_SELECTOR`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = `EXPECT_PLURAL_ARGUMENT_SELECTOR`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = `EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = `EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = `INVALID_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = `DUPLICATE_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = `DUPLICATE_SELECT_ARGUMENT_SELECTOR`, e6[e6.MISSING_OTHER_CLAUSE = 22] = `MISSING_OTHER_CLAUSE`, e6[e6.INVALID_TAG = 23] = `INVALID_TAG`, e6[e6.INVALID_TAG_NAME = 25] = `INVALID_TAG_NAME`, e6[e6.UNMATCHED_CLOSING_TAG = 26] = `UNMATCHED_CLOSING_TAG`, e6[e6.UNCLOSED_TAG = 27] = `UNCLOSED_TAG`, e6;
2669
2692
  }({});
2670
- function oa(e6) {
2693
+ function ca(e6) {
2671
2694
  return e6.type === 0;
2672
2695
  }
2673
- function sa(e6) {
2696
+ function la(e6) {
2674
2697
  return e6.type === 1;
2675
2698
  }
2676
- function ca(e6) {
2699
+ function ua(e6) {
2677
2700
  return e6.type === 2;
2678
2701
  }
2679
- function la(e6) {
2702
+ function da(e6) {
2680
2703
  return e6.type === 3;
2681
2704
  }
2682
- function ua(e6) {
2705
+ function fa(e6) {
2683
2706
  return e6.type === 4;
2684
2707
  }
2685
- function da(e6) {
2708
+ function pa(e6) {
2686
2709
  return e6.type === 5;
2687
2710
  }
2688
- function fa(e6) {
2711
+ function ma(e6) {
2689
2712
  return e6.type === 6;
2690
2713
  }
2691
- function pa(e6) {
2714
+ function ha(e6) {
2692
2715
  return e6.type === 7;
2693
2716
  }
2694
- function ma(e6) {
2717
+ function ga(e6) {
2695
2718
  return e6.type === 8;
2696
2719
  }
2697
- function ha(e6) {
2720
+ function _a(e6) {
2698
2721
  return !!(e6 && typeof e6 == `object` && e6.type === 0);
2699
2722
  }
2700
- function ga(e6) {
2723
+ function va(e6) {
2701
2724
  return !!(e6 && typeof e6 == `object` && e6.type === 1);
2702
2725
  }
2703
- var _a = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
2704
- var q = { "001": [`H`, `h`], 419: [`h`, `H`, `hB`, `hb`], AC: [`H`, `h`, `hb`, `hB`], AD: [`H`, `hB`], AE: [`h`, `hB`, `hb`, `H`], AF: [`H`, `hb`, `hB`, `h`], AG: [`h`, `hb`, `H`, `hB`], AI: [`H`, `h`, `hb`, `hB`], AL: [`h`, `H`, `hB`], AM: [`H`, `hB`], AO: [`H`, `hB`], AR: [`h`, `H`, `hB`, `hb`], AS: [`h`, `H`], AT: [`H`, `hB`], AU: [`h`, `hb`, `H`, `hB`], AW: [`H`, `hB`], AX: [`H`], AZ: [`H`, `hB`, `h`], BA: [`H`, `hB`, `h`], BB: [`h`, `hb`, `H`, `hB`], BD: [`h`, `hB`, `H`], BE: [`H`, `hB`], BF: [`H`, `hB`], BG: [`H`, `hB`, `h`], BH: [`h`, `hB`, `hb`, `H`], BI: [`H`, `h`], BJ: [`H`, `hB`], BL: [`H`, `hB`], BM: [`h`, `hb`, `H`, `hB`], BN: [`hb`, `hB`, `h`, `H`], BO: [`h`, `H`, `hB`, `hb`], BQ: [`H`], BR: [`H`, `hB`], BS: [`h`, `hb`, `H`, `hB`], BT: [`h`, `H`], BW: [`H`, `h`, `hb`, `hB`], BY: [`H`, `h`], BZ: [`H`, `h`, `hb`, `hB`], CA: [`h`, `hb`, `H`, `hB`], CC: [`H`, `h`, `hb`, `hB`], CD: [`hB`, `H`], CF: [`H`, `h`, `hB`], CG: [`H`, `hB`], CH: [`H`, `hB`, `h`], CI: [`H`, `hB`], CK: [`H`, `h`, `hb`, `hB`], CL: [`h`, `H`, `hB`, `hb`], CM: [`H`, `h`, `hB`], CN: [`H`, `hB`, `hb`, `h`], CO: [`h`, `H`, `hB`, `hb`], CP: [`H`], CR: [`h`, `H`, `hB`, `hb`], CU: [`h`, `H`, `hB`, `hb`], CV: [`H`, `hB`], CW: [`H`, `hB`], CX: [`H`, `h`, `hb`, `hB`], CY: [`h`, `H`, `hb`, `hB`], CZ: [`H`], DE: [`H`, `hB`], DG: [`H`, `h`, `hb`, `hB`], DJ: [`h`, `H`], DK: [`H`], DM: [`h`, `hb`, `H`, `hB`], DO: [`h`, `H`, `hB`, `hb`], DZ: [`h`, `hB`, `hb`, `H`], EA: [`H`, `h`, `hB`, `hb`], EC: [`h`, `H`, `hB`, `hb`], EE: [`H`, `hB`], EG: [`h`, `hB`, `hb`, `H`], EH: [`h`, `hB`, `hb`, `H`], ER: [`h`, `H`], ES: [`H`, `hB`, `h`, `hb`], ET: [`hB`, `hb`, `h`, `H`], FI: [`H`], FJ: [`h`, `hb`, `H`, `hB`], FK: [`H`, `h`, `hb`, `hB`], FM: [`h`, `hb`, `H`, `hB`], FO: [`H`, `h`], FR: [`H`, `hB`], GA: [`H`, `hB`], GB: [`H`, `h`, `hb`, `hB`], GD: [`h`, `hb`, `H`, `hB`], GE: [`H`, `hB`, `h`], GF: [`H`, `hB`], GG: [`H`, `h`, `hb`, `hB`], GH: [`h`, `H`], GI: [`H`, `h`, `hb`, `hB`], GL: [`H`, `h`], GM: [`h`, `hb`, `H`, `hB`], GN: [`H`, `hB`], GP: [`H`, `hB`], GQ: [`H`, `hB`, `h`, `hb`], GR: [`h`, `H`, `hb`, `hB`], GS: [`H`, `h`, `hb`, `hB`], GT: [`h`, `H`, `hB`, `hb`], GU: [`h`, `hb`, `H`, `hB`], GW: [`H`, `hB`], GY: [`h`, `hb`, `H`, `hB`], HK: [`h`, `hB`, `hb`, `H`], HN: [`h`, `H`, `hB`, `hb`], HR: [`H`, `hB`], HU: [`H`, `h`], IC: [`H`, `h`, `hB`, `hb`], ID: [`H`], IE: [`H`, `h`, `hb`, `hB`], IL: [`H`, `hB`], IM: [`H`, `h`, `hb`, `hB`], IN: [`h`, `H`], IO: [`H`, `h`, `hb`, `hB`], IQ: [`h`, `hB`, `hb`, `H`], IR: [`hB`, `H`], IS: [`H`], IT: [`H`, `hB`], JE: [`H`, `h`, `hb`, `hB`], JM: [`h`, `hb`, `H`, `hB`], JO: [`h`, `hB`, `hb`, `H`], JP: [`H`, `K`, `h`], KE: [`hB`, `hb`, `H`, `h`], KG: [`H`, `h`, `hB`, `hb`], KH: [`hB`, `h`, `H`, `hb`], KI: [`h`, `hb`, `H`, `hB`], KM: [`H`, `h`, `hB`, `hb`], KN: [`h`, `hb`, `H`, `hB`], KP: [`h`, `H`, `hB`, `hb`], KR: [`h`, `H`, `hB`, `hb`], KW: [`h`, `hB`, `hb`, `H`], KY: [`h`, `hb`, `H`, `hB`], KZ: [`H`, `hB`], LA: [`H`, `hb`, `hB`, `h`], LB: [`h`, `hB`, `hb`, `H`], LC: [`h`, `hb`, `H`, `hB`], LI: [`H`, `hB`, `h`], LK: [`H`, `h`, `hB`, `hb`], LR: [`h`, `hb`, `H`, `hB`], LS: [`h`, `H`], LT: [`H`, `h`, `hb`, `hB`], LU: [`H`, `h`, `hB`], LV: [`H`, `hB`, `hb`, `h`], LY: [`h`, `hB`, `hb`, `H`], MA: [`H`, `h`, `hB`, `hb`], MC: [`H`, `hB`], MD: [`H`, `hB`], ME: [`H`, `hB`, `h`], MF: [`H`, `hB`], MG: [`H`, `h`], MH: [`h`, `hb`, `H`, `hB`], MK: [`H`, `h`, `hb`, `hB`], ML: [`H`], MM: [`hB`, `hb`, `H`, `h`], MN: [`H`, `h`, `hb`, `hB`], MO: [`h`, `hB`, `hb`, `H`], MP: [`h`, `hb`, `H`, `hB`], MQ: [`H`, `hB`], MR: [`h`, `hB`, `hb`, `H`], MS: [`H`, `h`, `hb`, `hB`], MT: [`H`, `h`], MU: [`H`, `h`], MV: [`H`, `h`], MW: [`h`, `hb`, `H`, `hB`], MX: [`h`, `H`, `hB`, `hb`], MY: [`hb`, `hB`, `h`, `H`], MZ: [`H`, `hB`], NA: [`h`, `H`, `hB`, `hb`], NC: [`H`, `hB`], NE: [`H`], NF: [`H`, `h`, `hb`, `hB`], NG: [`H`, `h`, `hb`, `hB`], NI: [`h`, `H`, `hB`, `hb`], NL: [`H`, `hB`], NO: [`H`, `h`], NP: [`H`, `h`, `hB`], NR: [`H`, `h`, `hb`, `hB`], NU: [`H`, `h`, `hb`, `hB`], NZ: [`h`, `hb`, `H`, `hB`], OM: [`h`, `hB`, `hb`, `H`], PA: [`h`, `H`, `hB`, `hb`], PE: [`h`, `H`, `hB`, `hb`], PF: [`H`, `h`, `hB`], PG: [`h`, `H`], PH: [`h`, `hB`, `hb`, `H`], PK: [`h`, `hB`, `H`], PL: [`H`, `h`], PM: [`H`, `hB`], PN: [`H`, `h`, `hb`, `hB`], PR: [`h`, `H`, `hB`, `hb`], PS: [`h`, `hB`, `hb`, `H`], PT: [`H`, `hB`], PW: [`h`, `H`], PY: [`h`, `H`, `hB`, `hb`], QA: [`h`, `hB`, `hb`, `H`], RE: [`H`, `hB`], RO: [`H`, `hB`], RS: [`H`, `hB`, `h`], RU: [`H`], RW: [`H`, `h`], SA: [`h`, `hB`, `hb`, `H`], SB: [`h`, `hb`, `H`, `hB`], SC: [`H`, `h`, `hB`], SD: [`h`, `hB`, `hb`, `H`], SE: [`H`], SG: [`h`, `hb`, `H`, `hB`], SH: [`H`, `h`, `hb`, `hB`], SI: [`H`, `hB`], SJ: [`H`], SK: [`H`], SL: [`h`, `hb`, `H`, `hB`], SM: [`H`, `h`, `hB`], SN: [`H`, `h`, `hB`], SO: [`h`, `H`], SR: [`H`, `hB`], SS: [`h`, `hb`, `H`, `hB`], ST: [`H`, `hB`], SV: [`h`, `H`, `hB`, `hb`], SX: [`H`, `h`, `hb`, `hB`], SY: [`h`, `hB`, `hb`, `H`], SZ: [`h`, `hb`, `H`, `hB`], TA: [`H`, `h`, `hb`, `hB`], TC: [`h`, `hb`, `H`, `hB`], TD: [`h`, `H`, `hB`], TF: [`H`, `h`, `hB`], TG: [`H`, `hB`], TH: [`H`, `h`], TJ: [`H`, `h`], TL: [`H`, `hB`, `hb`, `h`], TM: [`H`, `h`], TN: [`h`, `hB`, `hb`, `H`], TO: [`h`, `H`], TR: [`H`, `hB`], TT: [`h`, `hb`, `H`, `hB`], TW: [`hB`, `hb`, `h`, `H`], TZ: [`hB`, `hb`, `H`, `h`], UA: [`H`, `hB`, `h`], UG: [`hB`, `hb`, `H`, `h`], UM: [`h`, `hb`, `H`, `hB`], US: [`h`, `hb`, `H`, `hB`], UY: [`h`, `H`, `hB`, `hb`], UZ: [`H`, `hB`, `h`], VA: [`H`, `h`, `hB`], VC: [`h`, `hb`, `H`, `hB`], VE: [`h`, `H`, `hB`, `hb`], VG: [`h`, `hb`, `H`, `hB`], VI: [`h`, `hb`, `H`, `hB`], VN: [`H`, `h`], VU: [`h`, `H`], WF: [`H`, `hB`], WS: [`h`, `H`], XK: [`H`, `hB`, `h`], YE: [`h`, `hB`, `hb`, `H`], YT: [`H`, `hB`], ZA: [`H`, `h`, `hb`, `hB`], ZM: [`h`, `hb`, `H`, `hB`], ZW: [`H`, `h`], "af-ZA": [`H`, `h`, `hB`, `hb`], "ar-001": [`h`, `hB`, `hb`, `H`], "ca-ES": [`H`, `h`, `hB`], "en-001": [`h`, `hb`, `H`, `hB`], "en-HK": [`h`, `hb`, `H`, `hB`], "en-IL": [`H`, `h`, `hb`, `hB`], "en-MY": [`h`, `hb`, `H`, `hB`], "es-BR": [`H`, `h`, `hB`, `hb`], "es-ES": [`H`, `h`, `hB`, `hb`], "es-GQ": [`H`, `h`, `hB`, `hb`], "fr-CA": [`H`, `h`, `hB`], "gl-ES": [`H`, `h`, `hB`], "gu-IN": [`hB`, `hb`, `h`, `H`], "hi-IN": [`hB`, `h`, `H`], "it-CH": [`H`, `h`, `hB`], "it-IT": [`H`, `h`, `hB`], "kn-IN": [`hB`, `h`, `H`], "ku-SY": [`H`, `hB`], "ml-IN": [`hB`, `h`, `H`], "mr-IN": [`hB`, `hb`, `h`, `H`], "pa-IN": [`hB`, `hb`, `h`, `H`], "ta-IN": [`hB`, `h`, `hb`, `H`], "te-IN": [`hB`, `h`, `H`], "zu-ZA": [`H`, `hB`, `hb`, `h`] };
2705
- function va(e6, t2) {
2726
+ var ya = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
2727
+ var Y = { "001": [`H`, `h`], 419: [`h`, `H`, `hB`, `hb`], AC: [`H`, `h`, `hb`, `hB`], AD: [`H`, `hB`], AE: [`h`, `hB`, `hb`, `H`], AF: [`H`, `hb`, `hB`, `h`], AG: [`h`, `hb`, `H`, `hB`], AI: [`H`, `h`, `hb`, `hB`], AL: [`h`, `H`, `hB`], AM: [`H`, `hB`], AO: [`H`, `hB`], AR: [`h`, `H`, `hB`, `hb`], AS: [`h`, `H`], AT: [`H`, `hB`], AU: [`h`, `hb`, `H`, `hB`], AW: [`H`, `hB`], AX: [`H`], AZ: [`H`, `hB`, `h`], BA: [`H`, `hB`, `h`], BB: [`h`, `hb`, `H`, `hB`], BD: [`h`, `hB`, `H`], BE: [`H`, `hB`], BF: [`H`, `hB`], BG: [`H`, `hB`, `h`], BH: [`h`, `hB`, `hb`, `H`], BI: [`H`, `h`], BJ: [`H`, `hB`], BL: [`H`, `hB`], BM: [`h`, `hb`, `H`, `hB`], BN: [`hb`, `hB`, `h`, `H`], BO: [`h`, `H`, `hB`, `hb`], BQ: [`H`], BR: [`H`, `hB`], BS: [`h`, `hb`, `H`, `hB`], BT: [`h`, `H`], BW: [`H`, `h`, `hb`, `hB`], BY: [`H`, `h`], BZ: [`H`, `h`, `hb`, `hB`], CA: [`h`, `hb`, `H`, `hB`], CC: [`H`, `h`, `hb`, `hB`], CD: [`hB`, `H`], CF: [`H`, `h`, `hB`], CG: [`H`, `hB`], CH: [`H`, `hB`, `h`], CI: [`H`, `hB`], CK: [`H`, `h`, `hb`, `hB`], CL: [`h`, `H`, `hB`, `hb`], CM: [`H`, `h`, `hB`], CN: [`H`, `hB`, `hb`, `h`], CO: [`h`, `H`, `hB`, `hb`], CP: [`H`], CR: [`h`, `H`, `hB`, `hb`], CU: [`h`, `H`, `hB`, `hb`], CV: [`H`, `hB`], CW: [`H`, `hB`], CX: [`H`, `h`, `hb`, `hB`], CY: [`h`, `H`, `hb`, `hB`], CZ: [`H`], DE: [`H`, `hB`], DG: [`H`, `h`, `hb`, `hB`], DJ: [`h`, `H`], DK: [`H`], DM: [`h`, `hb`, `H`, `hB`], DO: [`h`, `H`, `hB`, `hb`], DZ: [`h`, `hB`, `hb`, `H`], EA: [`H`, `h`, `hB`, `hb`], EC: [`h`, `H`, `hB`, `hb`], EE: [`H`, `hB`], EG: [`h`, `hB`, `hb`, `H`], EH: [`h`, `hB`, `hb`, `H`], ER: [`h`, `H`], ES: [`H`, `hB`, `h`, `hb`], ET: [`hB`, `hb`, `h`, `H`], FI: [`H`], FJ: [`h`, `hb`, `H`, `hB`], FK: [`H`, `h`, `hb`, `hB`], FM: [`h`, `hb`, `H`, `hB`], FO: [`H`, `h`], FR: [`H`, `hB`], GA: [`H`, `hB`], GB: [`H`, `h`, `hb`, `hB`], GD: [`h`, `hb`, `H`, `hB`], GE: [`H`, `hB`, `h`], GF: [`H`, `hB`], GG: [`H`, `h`, `hb`, `hB`], GH: [`h`, `H`], GI: [`H`, `h`, `hb`, `hB`], GL: [`H`, `h`], GM: [`h`, `hb`, `H`, `hB`], GN: [`H`, `hB`], GP: [`H`, `hB`], GQ: [`H`, `hB`, `h`, `hb`], GR: [`h`, `H`, `hb`, `hB`], GS: [`H`, `h`, `hb`, `hB`], GT: [`h`, `H`, `hB`, `hb`], GU: [`h`, `hb`, `H`, `hB`], GW: [`H`, `hB`], GY: [`h`, `hb`, `H`, `hB`], HK: [`h`, `hB`, `hb`, `H`], HN: [`h`, `H`, `hB`, `hb`], HR: [`H`, `hB`], HU: [`H`, `h`], IC: [`H`, `h`, `hB`, `hb`], ID: [`H`], IE: [`H`, `h`, `hb`, `hB`], IL: [`H`, `hB`], IM: [`H`, `h`, `hb`, `hB`], IN: [`h`, `H`], IO: [`H`, `h`, `hb`, `hB`], IQ: [`h`, `hB`, `hb`, `H`], IR: [`hB`, `H`], IS: [`H`], IT: [`H`, `hB`], JE: [`H`, `h`, `hb`, `hB`], JM: [`h`, `hb`, `H`, `hB`], JO: [`h`, `hB`, `hb`, `H`], JP: [`H`, `K`, `h`], KE: [`hB`, `hb`, `H`, `h`], KG: [`H`, `h`, `hB`, `hb`], KH: [`hB`, `h`, `H`, `hb`], KI: [`h`, `hb`, `H`, `hB`], KM: [`H`, `h`, `hB`, `hb`], KN: [`h`, `hb`, `H`, `hB`], KP: [`h`, `H`, `hB`, `hb`], KR: [`h`, `H`, `hB`, `hb`], KW: [`h`, `hB`, `hb`, `H`], KY: [`h`, `hb`, `H`, `hB`], KZ: [`H`, `hB`], LA: [`H`, `hb`, `hB`, `h`], LB: [`h`, `hB`, `hb`, `H`], LC: [`h`, `hb`, `H`, `hB`], LI: [`H`, `hB`, `h`], LK: [`H`, `h`, `hB`, `hb`], LR: [`h`, `hb`, `H`, `hB`], LS: [`h`, `H`], LT: [`H`, `h`, `hb`, `hB`], LU: [`H`, `h`, `hB`], LV: [`H`, `hB`, `hb`, `h`], LY: [`h`, `hB`, `hb`, `H`], MA: [`H`, `h`, `hB`, `hb`], MC: [`H`, `hB`], MD: [`H`, `hB`], ME: [`H`, `hB`, `h`], MF: [`H`, `hB`], MG: [`H`, `h`], MH: [`h`, `hb`, `H`, `hB`], MK: [`H`, `h`, `hb`, `hB`], ML: [`H`], MM: [`hB`, `hb`, `H`, `h`], MN: [`H`, `h`, `hb`, `hB`], MO: [`h`, `hB`, `hb`, `H`], MP: [`h`, `hb`, `H`, `hB`], MQ: [`H`, `hB`], MR: [`h`, `hB`, `hb`, `H`], MS: [`H`, `h`, `hb`, `hB`], MT: [`H`, `h`], MU: [`H`, `h`], MV: [`H`, `h`], MW: [`h`, `hb`, `H`, `hB`], MX: [`h`, `H`, `hB`, `hb`], MY: [`hb`, `hB`, `h`, `H`], MZ: [`H`, `hB`], NA: [`h`, `H`, `hB`, `hb`], NC: [`H`, `hB`], NE: [`H`], NF: [`H`, `h`, `hb`, `hB`], NG: [`H`, `h`, `hb`, `hB`], NI: [`h`, `H`, `hB`, `hb`], NL: [`H`, `hB`], NO: [`H`, `h`], NP: [`H`, `h`, `hB`], NR: [`H`, `h`, `hb`, `hB`], NU: [`H`, `h`, `hb`, `hB`], NZ: [`h`, `hb`, `H`, `hB`], OM: [`h`, `hB`, `hb`, `H`], PA: [`h`, `H`, `hB`, `hb`], PE: [`h`, `H`, `hB`, `hb`], PF: [`H`, `h`, `hB`], PG: [`h`, `H`], PH: [`h`, `hB`, `hb`, `H`], PK: [`h`, `hB`, `H`], PL: [`H`, `h`], PM: [`H`, `hB`], PN: [`H`, `h`, `hb`, `hB`], PR: [`h`, `H`, `hB`, `hb`], PS: [`h`, `hB`, `hb`, `H`], PT: [`H`, `hB`], PW: [`h`, `H`], PY: [`h`, `H`, `hB`, `hb`], QA: [`h`, `hB`, `hb`, `H`], RE: [`H`, `hB`], RO: [`H`, `hB`], RS: [`H`, `hB`, `h`], RU: [`H`], RW: [`H`, `h`], SA: [`h`, `hB`, `hb`, `H`], SB: [`h`, `hb`, `H`, `hB`], SC: [`H`, `h`, `hB`], SD: [`h`, `hB`, `hb`, `H`], SE: [`H`], SG: [`h`, `hb`, `H`, `hB`], SH: [`H`, `h`, `hb`, `hB`], SI: [`H`, `hB`], SJ: [`H`], SK: [`H`], SL: [`h`, `hb`, `H`, `hB`], SM: [`H`, `h`, `hB`], SN: [`H`, `h`, `hB`], SO: [`h`, `H`], SR: [`H`, `hB`], SS: [`h`, `hb`, `H`, `hB`], ST: [`H`, `hB`], SV: [`h`, `H`, `hB`, `hb`], SX: [`H`, `h`, `hb`, `hB`], SY: [`h`, `hB`, `hb`, `H`], SZ: [`h`, `hb`, `H`, `hB`], TA: [`H`, `h`, `hb`, `hB`], TC: [`h`, `hb`, `H`, `hB`], TD: [`h`, `H`, `hB`], TF: [`H`, `h`, `hB`], TG: [`H`, `hB`], TH: [`H`, `h`], TJ: [`H`, `h`], TL: [`H`, `hB`, `hb`, `h`], TM: [`H`, `h`], TN: [`h`, `hB`, `hb`, `H`], TO: [`h`, `H`], TR: [`H`, `hB`], TT: [`h`, `hb`, `H`, `hB`], TW: [`hB`, `hb`, `h`, `H`], TZ: [`hB`, `hb`, `H`, `h`], UA: [`H`, `hB`, `h`], UG: [`hB`, `hb`, `H`, `h`], UM: [`h`, `hb`, `H`, `hB`], US: [`h`, `hb`, `H`, `hB`], UY: [`h`, `H`, `hB`, `hb`], UZ: [`H`, `hB`, `h`], VA: [`H`, `h`, `hB`], VC: [`h`, `hb`, `H`, `hB`], VE: [`h`, `H`, `hB`, `hb`], VG: [`h`, `hb`, `H`, `hB`], VI: [`h`, `hb`, `H`, `hB`], VN: [`H`, `h`], VU: [`h`, `H`], WF: [`H`, `hB`], WS: [`h`, `H`], XK: [`H`, `hB`, `h`], YE: [`h`, `hB`, `hb`, `H`], YT: [`H`, `hB`], ZA: [`H`, `h`, `hb`, `hB`], ZM: [`h`, `hb`, `H`, `hB`], ZW: [`H`, `h`], "af-ZA": [`H`, `h`, `hB`, `hb`], "ar-001": [`h`, `hB`, `hb`, `H`], "ca-ES": [`H`, `h`, `hB`], "en-001": [`h`, `hb`, `H`, `hB`], "en-HK": [`h`, `hb`, `H`, `hB`], "en-IL": [`H`, `h`, `hb`, `hB`], "en-MY": [`h`, `hb`, `H`, `hB`], "es-BR": [`H`, `h`, `hB`, `hb`], "es-ES": [`H`, `h`, `hB`, `hb`], "es-GQ": [`H`, `h`, `hB`, `hb`], "fr-CA": [`H`, `h`, `hB`], "gl-ES": [`H`, `h`, `hB`], "gu-IN": [`hB`, `hb`, `h`, `H`], "hi-IN": [`hB`, `h`, `H`], "it-CH": [`H`, `h`, `hB`], "it-IT": [`H`, `h`, `hB`], "kn-IN": [`hB`, `h`, `H`], "ku-SY": [`H`, `hB`], "ml-IN": [`hB`, `h`, `H`], "mr-IN": [`hB`, `hb`, `h`, `H`], "pa-IN": [`hB`, `hb`, `h`, `H`], "ta-IN": [`hB`, `h`, `hb`, `H`], "te-IN": [`hB`, `h`, `H`], "zu-ZA": [`H`, `hB`, `hb`, `h`] };
2728
+ function ba(e6, t2) {
2706
2729
  let n2 = ``;
2707
2730
  for (let r2 = 0; r2 < e6.length; r2++) {
2708
2731
  let i2 = e6.charAt(r2);
2709
2732
  if (i2 === `j`) {
2710
2733
  let a2 = 0;
2711
2734
  for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
2712
- let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = ya(t2);
2735
+ let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = xa(t2);
2713
2736
  for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
2714
2737
  for (; o2-- > 0; ) n2 = c2 + n2;
2715
2738
  } else n2 += i2 === `J` ? `H` : i2;
2716
2739
  }
2717
2740
  return n2;
2718
2741
  }
2719
- function ya(e6) {
2742
+ function xa(e6) {
2720
2743
  let t2 = e6.hourCycle;
2721
2744
  if (t2 === void 0) {
2722
2745
  let n3 = e6;
@@ -2735,36 +2758,36 @@ function ya(e6) {
2735
2758
  throw Error(`Invalid hourCycle`);
2736
2759
  }
2737
2760
  let n2 = e6.language, r2;
2738
- return n2 !== `root` && (r2 = e6.maximize().region), (q[`${n2}-${r2}`] || q[r2 || ``] || q[n2 || ``] || q[`${n2}-001`] || q[`001`])[0].charAt(0);
2761
+ return n2 !== `root` && (r2 = e6.maximize().region), (Y[`${n2}-${r2}`] || Y[r2 || ``] || Y[n2 || ``] || Y[`${n2}-001`] || Y[`001`])[0].charAt(0);
2739
2762
  }
2740
- var ba = RegExp(`^${_a.source}*`);
2741
- var xa = RegExp(`${_a.source}*$`);
2742
- function J(e6, t2) {
2763
+ var Sa = RegExp(`^${ya.source}*`);
2764
+ var Ca = RegExp(`${ya.source}*$`);
2765
+ function X(e6, t2) {
2743
2766
  return { start: e6, end: t2 };
2744
2767
  }
2745
- var Sa = !!Object.fromEntries;
2746
- var Ca = !!String.prototype.trimStart;
2747
- var wa = !!String.prototype.trimEnd;
2748
- var Ta = Sa ? Object.fromEntries : function(e6) {
2768
+ var wa = !!Object.fromEntries;
2769
+ var Ta = !!String.prototype.trimStart;
2770
+ var Ea = !!String.prototype.trimEnd;
2771
+ var Da = wa ? Object.fromEntries : function(e6) {
2749
2772
  let t2 = {};
2750
2773
  for (let [n2, r2] of e6) t2[n2] = r2;
2751
2774
  return t2;
2752
2775
  };
2753
- var Ea = Ca ? function(e6) {
2776
+ var Oa = Ta ? function(e6) {
2754
2777
  return e6.trimStart();
2755
2778
  } : function(e6) {
2756
- return e6.replace(ba, ``);
2779
+ return e6.replace(Sa, ``);
2757
2780
  };
2758
- var Da = wa ? function(e6) {
2781
+ var ka = Ea ? function(e6) {
2759
2782
  return e6.trimEnd();
2760
2783
  } : function(e6) {
2761
- return e6.replace(xa, ``);
2784
+ return e6.replace(Ca, ``);
2762
2785
  };
2763
- var Oa = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
2764
- function ka(e6, t2) {
2765
- return Oa.lastIndex = t2, Oa.exec(e6)[1] ?? ``;
2786
+ var Aa = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
2787
+ function ja(e6, t2) {
2788
+ return Aa.lastIndex = t2, Aa.exec(e6)[1] ?? ``;
2766
2789
  }
2767
- function Aa(e6) {
2790
+ function Ma(e6) {
2768
2791
  if (e6.length === 0) return null;
2769
2792
  let t2 = 1, n2 = 1;
2770
2793
  for (let r2 = 0; r2 < e6.length; ) {
@@ -2785,7 +2808,7 @@ function Aa(e6) {
2785
2808
  }
2786
2809
  return { offset: e6.length, line: t2, column: n2 };
2787
2810
  }
2788
- var ja = class {
2811
+ var Na = class {
2789
2812
  constructor(e6, t2 = {}) {
2790
2813
  this.message = e6, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!t2.ignoreTag, this.locale = t2.locale, this.requiresOtherClause = !!t2.requiresOtherClause, this.shouldParseSkeletons = !!t2.shouldParseSkeletons;
2791
2814
  }
@@ -2794,10 +2817,10 @@ var ja = class {
2794
2817
  if (this.message.length > 0) {
2795
2818
  let e6 = this.message.charCodeAt(0);
2796
2819
  if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
2797
- let e7 = Aa(this.message);
2820
+ let e7 = Ma(this.message);
2798
2821
  if (e7) {
2799
2822
  let t2 = this.clonePosition();
2800
- return this.position = e7, { val: [{ type: 0, value: this.message, location: J(t2, this.clonePosition()) }], err: null };
2823
+ return this.position = e7, { val: [{ type: 0, value: this.message, location: X(t2, this.clonePosition()) }], err: null };
2801
2824
  }
2802
2825
  }
2803
2826
  }
@@ -2814,11 +2837,11 @@ var ja = class {
2814
2837
  } else if (i2 === 125 && e6 > 0) break;
2815
2838
  else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
2816
2839
  let e7 = this.clonePosition();
2817
- this.bump(), r2.push({ type: 7, location: J(e7, this.clonePosition()) });
2840
+ this.bump(), r2.push({ type: 7, location: X(e7, this.clonePosition()) });
2818
2841
  } else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
2819
2842
  if (n2) break;
2820
- return this.error(26, J(this.clonePosition(), this.clonePosition()));
2821
- } else if (i2 === 60 && !this.ignoreTag && Ma(this.peek() || 0)) {
2843
+ return this.error(26, X(this.clonePosition(), this.clonePosition()));
2844
+ } else if (i2 === 60 && !this.ignoreTag && Pa(this.peek() || 0)) {
2822
2845
  let n3 = this.parseTag(e6, t2);
2823
2846
  if (n3.err) return n3;
2824
2847
  r2.push(n3.val);
@@ -2834,23 +2857,23 @@ var ja = class {
2834
2857
  let n2 = this.clonePosition();
2835
2858
  this.bump();
2836
2859
  let r2 = this.parseTagName();
2837
- if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: J(n2, this.clonePosition()) }, err: null };
2860
+ if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: X(n2, this.clonePosition()) }, err: null };
2838
2861
  if (this.bumpIf(`>`)) {
2839
2862
  let i2 = this.parseMessage(e6 + 1, t2, true);
2840
2863
  if (i2.err) return i2;
2841
2864
  let a2 = i2.val, o2 = this.clonePosition();
2842
2865
  if (this.bumpIf(`</`)) {
2843
- if (this.isEOF() || !Ma(this.char())) return this.error(23, J(o2, this.clonePosition()));
2866
+ if (this.isEOF() || !Pa(this.char())) return this.error(23, X(o2, this.clonePosition()));
2844
2867
  let e7 = this.clonePosition();
2845
- return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: J(n2, this.clonePosition()) }, err: null } : this.error(23, J(o2, this.clonePosition()))) : this.error(26, J(e7, this.clonePosition()));
2868
+ return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: X(n2, this.clonePosition()) }, err: null } : this.error(23, X(o2, this.clonePosition()))) : this.error(26, X(e7, this.clonePosition()));
2846
2869
  }
2847
- return this.error(27, J(n2, this.clonePosition()));
2870
+ return this.error(27, X(n2, this.clonePosition()));
2848
2871
  }
2849
- return this.error(23, J(n2, this.clonePosition()));
2872
+ return this.error(23, X(n2, this.clonePosition()));
2850
2873
  }
2851
2874
  parseTagName() {
2852
2875
  let e6 = this.offset();
2853
- for (this.bump(); !this.isEOF() && Pa(this.char()); ) this.bump();
2876
+ for (this.bump(); !this.isEOF() && Ia(this.char()); ) this.bump();
2854
2877
  return this.message.slice(e6, this.offset());
2855
2878
  }
2856
2879
  parseLiteral(e6, t2) {
@@ -2870,11 +2893,11 @@ var ja = class {
2870
2893
  if (a2) r2 += a2;
2871
2894
  else break;
2872
2895
  }
2873
- let i2 = J(n2, this.clonePosition());
2896
+ let i2 = X(n2, this.clonePosition());
2874
2897
  return { val: { type: 0, value: r2, location: i2 }, err: null };
2875
2898
  }
2876
2899
  tryParseLeftAngleBracket() {
2877
- return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !Na(this.peek() || 0)) ? (this.bump(), `<`) : null;
2900
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !Fa(this.peek() || 0)) ? (this.bump(), `<`) : null;
2878
2901
  }
2879
2902
  tryParseQuote(e6) {
2880
2903
  if (this.isEOF() || this.char() !== 39) return null;
@@ -2914,29 +2937,29 @@ var ja = class {
2914
2937
  }
2915
2938
  parseArgument(e6, t2) {
2916
2939
  let n2 = this.clonePosition();
2917
- if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, J(n2, this.clonePosition()));
2918
- if (this.char() === 125) return this.bump(), this.error(2, J(n2, this.clonePosition()));
2940
+ if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, X(n2, this.clonePosition()));
2941
+ if (this.char() === 125) return this.bump(), this.error(2, X(n2, this.clonePosition()));
2919
2942
  let r2 = this.parseIdentifierIfPossible().value;
2920
- if (!r2) return this.error(3, J(n2, this.clonePosition()));
2921
- if (this.bumpSpace(), this.isEOF()) return this.error(1, J(n2, this.clonePosition()));
2943
+ if (!r2) return this.error(3, X(n2, this.clonePosition()));
2944
+ if (this.bumpSpace(), this.isEOF()) return this.error(1, X(n2, this.clonePosition()));
2922
2945
  switch (this.char()) {
2923
2946
  case 125:
2924
- return this.bump(), { val: { type: 1, value: r2, location: J(n2, this.clonePosition()) }, err: null };
2947
+ return this.bump(), { val: { type: 1, value: r2, location: X(n2, this.clonePosition()) }, err: null };
2925
2948
  case 44:
2926
- return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, J(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
2949
+ return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, X(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
2927
2950
  default:
2928
- return this.error(3, J(n2, this.clonePosition()));
2951
+ return this.error(3, X(n2, this.clonePosition()));
2929
2952
  }
2930
2953
  }
2931
2954
  parseIdentifierIfPossible() {
2932
- let e6 = this.clonePosition(), t2 = this.offset(), n2 = ka(this.message, t2), r2 = t2 + n2.length;
2933
- return this.bumpTo(r2), { value: n2, location: J(e6, this.clonePosition()) };
2955
+ let e6 = this.clonePosition(), t2 = this.offset(), n2 = ja(this.message, t2), r2 = t2 + n2.length;
2956
+ return this.bumpTo(r2), { value: n2, location: X(e6, this.clonePosition()) };
2934
2957
  }
2935
2958
  parseArgumentOptions(e6, t2, n2, r2) {
2936
2959
  let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
2937
2960
  switch (a2) {
2938
2961
  case ``:
2939
- return this.error(4, J(i2, o2));
2962
+ return this.error(4, X(i2, o2));
2940
2963
  case `number`:
2941
2964
  case `date`:
2942
2965
  case `time`: {
@@ -2946,15 +2969,15 @@ var ja = class {
2946
2969
  this.bumpSpace();
2947
2970
  let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
2948
2971
  if (n3.err) return n3;
2949
- let r3 = Da(n3.val);
2950
- if (r3.length === 0) return this.error(6, J(this.clonePosition(), this.clonePosition()));
2951
- e7 = { style: r3, styleLocation: J(t4, this.clonePosition()) };
2972
+ let r3 = ka(n3.val);
2973
+ if (r3.length === 0) return this.error(6, X(this.clonePosition(), this.clonePosition()));
2974
+ e7 = { style: r3, styleLocation: X(t4, this.clonePosition()) };
2952
2975
  }
2953
2976
  let t3 = this.tryParseArgumentClose(r2);
2954
2977
  if (t3.err) return t3;
2955
- let i3 = J(r2, this.clonePosition());
2978
+ let i3 = X(r2, this.clonePosition());
2956
2979
  if (e7 && e7.style.startsWith(`::`)) {
2957
- let t4 = Ea(e7.style.slice(2));
2980
+ let t4 = Oa(e7.style.slice(2));
2958
2981
  if (a2 === `number`) {
2959
2982
  let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
2960
2983
  return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
@@ -2962,8 +2985,8 @@ var ja = class {
2962
2985
  {
2963
2986
  if (t4.length === 0) return this.error(10, i3);
2964
2987
  let r3 = t4;
2965
- this.locale && (r3 = va(t4, this.locale));
2966
- let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Ki(r3) : {} };
2988
+ this.locale && (r3 = ba(t4, this.locale));
2989
+ let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Ji(r3) : {} };
2967
2990
  return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
2968
2991
  }
2969
2992
  }
@@ -2973,11 +2996,11 @@ var ja = class {
2973
2996
  case `selectordinal`:
2974
2997
  case `select`: {
2975
2998
  let i3 = this.clonePosition();
2976
- if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, J(i3, { ...i3 }));
2999
+ if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, X(i3, { ...i3 }));
2977
3000
  this.bumpSpace();
2978
3001
  let o3 = this.parseIdentifierIfPossible(), s2 = 0;
2979
3002
  if (a2 !== `select` && o3.value === `offset`) {
2980
- if (!this.bumpIf(`:`)) return this.error(13, J(this.clonePosition(), this.clonePosition()));
3003
+ if (!this.bumpIf(`:`)) return this.error(13, X(this.clonePosition(), this.clonePosition()));
2981
3004
  this.bumpSpace();
2982
3005
  let e7 = this.tryParseDecimalInteger(13, 14);
2983
3006
  if (e7.err) return e7;
@@ -2987,15 +3010,15 @@ var ja = class {
2987
3010
  if (c2.err) return c2;
2988
3011
  let l2 = this.tryParseArgumentClose(r2);
2989
3012
  if (l2.err) return l2;
2990
- let u2 = J(r2, this.clonePosition());
2991
- return a2 === `select` ? { val: { type: 5, value: n2, options: Ta(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: Ta(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
3013
+ let u2 = X(r2, this.clonePosition());
3014
+ return a2 === `select` ? { val: { type: 5, value: n2, options: Da(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: Da(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
2992
3015
  }
2993
3016
  default:
2994
- return this.error(5, J(i2, o2));
3017
+ return this.error(5, X(i2, o2));
2995
3018
  }
2996
3019
  }
2997
3020
  tryParseArgumentClose(e6) {
2998
- return this.isEOF() || this.char() !== 125 ? this.error(1, J(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
3021
+ return this.isEOF() || this.char() !== 125 ? this.error(1, X(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
2999
3022
  }
3000
3023
  parseSimpleArgStyleIfPossible() {
3001
3024
  let e6 = 0, t2 = this.clonePosition();
@@ -3003,7 +3026,7 @@ var ja = class {
3003
3026
  case 39: {
3004
3027
  this.bump();
3005
3028
  let e7 = this.clonePosition();
3006
- if (!this.bumpUntil(`'`)) return this.error(11, J(e7, this.clonePosition()));
3029
+ if (!this.bumpUntil(`'`)) return this.error(11, X(e7, this.clonePosition()));
3007
3030
  this.bump();
3008
3031
  break;
3009
3032
  }
@@ -3022,11 +3045,11 @@ var ja = class {
3022
3045
  parseNumberSkeletonFromString(e6, t2) {
3023
3046
  let n2 = [];
3024
3047
  try {
3025
- n2 = Ji(e6);
3048
+ n2 = Xi(e6);
3026
3049
  } catch {
3027
3050
  return this.error(7, t2);
3028
3051
  }
3029
- return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? ia(n2) : {} }, err: null };
3052
+ return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? oa(n2) : {} }, err: null };
3030
3053
  }
3031
3054
  tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
3032
3055
  let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
@@ -3036,20 +3059,20 @@ var ja = class {
3036
3059
  if (t2 !== `select` && this.bumpIf(`=`)) {
3037
3060
  let t3 = this.tryParseDecimalInteger(16, 19);
3038
3061
  if (t3.err) return t3;
3039
- c2 = J(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
3062
+ c2 = X(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
3040
3063
  } else break;
3041
3064
  }
3042
3065
  if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
3043
3066
  s2 === `other` && (i2 = true), this.bumpSpace();
3044
3067
  let r3 = this.clonePosition();
3045
- if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, J(this.clonePosition(), this.clonePosition()));
3068
+ if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, X(this.clonePosition(), this.clonePosition()));
3046
3069
  let l2 = this.parseMessage(e6 + 1, t2, n2);
3047
3070
  if (l2.err) return l2;
3048
3071
  let u2 = this.tryParseArgumentClose(r3);
3049
3072
  if (u2.err) return u2;
3050
- a2.push([s2, { value: l2.val, location: J(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
3073
+ a2.push([s2, { value: l2.val, location: X(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
3051
3074
  }
3052
- return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16, J(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i2 ? this.error(22, J(this.clonePosition(), this.clonePosition())) : { val: a2, err: null };
3075
+ return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16, X(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i2 ? this.error(22, X(this.clonePosition(), this.clonePosition())) : { val: a2, err: null };
3053
3076
  }
3054
3077
  tryParseDecimalInteger(e6, t2) {
3055
3078
  let n2 = 1, r2 = this.clonePosition();
@@ -3060,7 +3083,7 @@ var ja = class {
3060
3083
  if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
3061
3084
  else break;
3062
3085
  }
3063
- let o2 = J(r2, this.clonePosition());
3086
+ let o2 = X(r2, this.clonePosition());
3064
3087
  return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
3065
3088
  }
3066
3089
  offset() {
@@ -3108,7 +3131,7 @@ var ja = class {
3108
3131
  }
3109
3132
  }
3110
3133
  bumpSpace() {
3111
- for (; !this.isEOF() && Fa(this.char()); ) this.bump();
3134
+ for (; !this.isEOF() && La(this.char()); ) this.bump();
3112
3135
  }
3113
3136
  peek() {
3114
3137
  if (this.isEOF()) return null;
@@ -3116,34 +3139,34 @@ var ja = class {
3116
3139
  return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
3117
3140
  }
3118
3141
  };
3119
- function Ma(e6) {
3142
+ function Pa(e6) {
3120
3143
  return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
3121
3144
  }
3122
- function Na(e6) {
3123
- return Ma(e6) || e6 === 47;
3145
+ function Fa(e6) {
3146
+ return Pa(e6) || e6 === 47;
3124
3147
  }
3125
- function Pa(e6) {
3148
+ function Ia(e6) {
3126
3149
  return e6 === 45 || e6 === 46 || e6 >= 48 && e6 <= 57 || e6 === 95 || e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90 || e6 == 183 || e6 >= 192 && e6 <= 214 || e6 >= 216 && e6 <= 246 || e6 >= 248 && e6 <= 893 || e6 >= 895 && e6 <= 8191 || e6 >= 8204 && e6 <= 8205 || e6 >= 8255 && e6 <= 8256 || e6 >= 8304 && e6 <= 8591 || e6 >= 11264 && e6 <= 12271 || e6 >= 12289 && e6 <= 55295 || e6 >= 63744 && e6 <= 64975 || e6 >= 65008 && e6 <= 65533 || e6 >= 65536 && e6 <= 983039;
3127
3150
  }
3128
- function Fa(e6) {
3151
+ function La(e6) {
3129
3152
  return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
3130
3153
  }
3131
- function Ia(e6) {
3154
+ function Ra(e6) {
3132
3155
  e6.forEach((e7) => {
3133
- if (delete e7.location, da(e7) || fa(e7)) for (let t2 in e7.options) delete e7.options[t2].location, Ia(e7.options[t2].value);
3134
- else ca(e7) && ha(e7.style) || (la(e7) || ua(e7)) && ga(e7.style) ? delete e7.style.location : ma(e7) && Ia(e7.children);
3156
+ if (delete e7.location, pa(e7) || ma(e7)) for (let t2 in e7.options) delete e7.options[t2].location, Ra(e7.options[t2].value);
3157
+ else ua(e7) && _a(e7.style) || (da(e7) || fa(e7)) && va(e7.style) ? delete e7.style.location : ga(e7) && Ra(e7.children);
3135
3158
  });
3136
3159
  }
3137
- function La(e6, t2 = {}) {
3160
+ function za(e6, t2 = {}) {
3138
3161
  t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
3139
- let n2 = new ja(e6, t2).parse();
3162
+ let n2 = new Na(e6, t2).parse();
3140
3163
  if (n2.err) {
3141
- let e7 = SyntaxError(aa[n2.err.kind]);
3164
+ let e7 = SyntaxError(sa[n2.err.kind]);
3142
3165
  throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
3143
3166
  }
3144
- return t2?.captureLocation || Ia(n2.val), n2.val;
3167
+ return t2?.captureLocation || Ra(n2.val), n2.val;
3145
3168
  }
3146
- var Ra = class extends Error {
3169
+ var Ba = class extends Error {
3147
3170
  constructor(e6, t2, n2) {
3148
3171
  super(e6), this.code = t2, this.originalMessage = n2;
3149
3172
  }
@@ -3151,54 +3174,54 @@ var Ra = class extends Error {
3151
3174
  return `[formatjs Error: ${this.code}] ${this.message}`;
3152
3175
  }
3153
3176
  };
3154
- var za = class extends Ra {
3177
+ var Va = class extends Ba {
3155
3178
  constructor(e6, t2, n2, r2) {
3156
3179
  super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
3157
3180
  }
3158
3181
  };
3159
- var Ba = class extends Ra {
3182
+ var Ha = class extends Ba {
3160
3183
  constructor(e6, t2, n2) {
3161
3184
  super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
3162
3185
  }
3163
3186
  };
3164
- var Va = class extends Ra {
3187
+ var Ua = class extends Ba {
3165
3188
  constructor(e6, t2) {
3166
3189
  super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
3167
3190
  }
3168
3191
  };
3169
- function Ha(e6) {
3192
+ function Wa(e6) {
3170
3193
  return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
3171
3194
  let n2 = e7[e7.length - 1];
3172
3195
  return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
3173
3196
  }, []);
3174
3197
  }
3175
- function Ua(e6) {
3198
+ function Ga(e6) {
3176
3199
  return typeof e6 == `function`;
3177
3200
  }
3178
- function Y(e6, t2, n2, r2, i2, a2, o2) {
3179
- if (e6.length === 1 && oa(e6[0])) return [{ type: 0, value: e6[0].value }];
3201
+ function Ka(e6, t2, n2, r2, i2, a2, o2) {
3202
+ if (e6.length === 1 && ca(e6[0])) return [{ type: 0, value: e6[0].value }];
3180
3203
  let s2 = [];
3181
3204
  for (let c2 of e6) {
3182
- if (oa(c2)) {
3205
+ if (ca(c2)) {
3183
3206
  s2.push({ type: 0, value: c2.value });
3184
3207
  continue;
3185
3208
  }
3186
- if (pa(c2)) {
3209
+ if (ha(c2)) {
3187
3210
  typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
3188
3211
  continue;
3189
3212
  }
3190
3213
  let { value: e7 } = c2;
3191
- if (!(i2 && e7 in i2)) throw new Va(e7, o2);
3214
+ if (!(i2 && e7 in i2)) throw new Ua(e7, o2);
3192
3215
  let l2 = i2[e7];
3193
- if (sa(c2)) (!l2 || typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint`) && (l2 = typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint` ? String(l2) : ``), s2.push({ type: typeof l2 == `string` ? 0 : 1, value: l2 });
3194
- else if (la(c2)) {
3195
- let e8 = typeof c2.style == `string` ? r2.date[c2.style] : ga(c2.style) ? c2.style.parsedOptions : void 0;
3216
+ if (la(c2)) (!l2 || typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint`) && (l2 = typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint` ? String(l2) : ``), s2.push({ type: typeof l2 == `string` ? 0 : 1, value: l2 });
3217
+ else if (da(c2)) {
3218
+ let e8 = typeof c2.style == `string` ? r2.date[c2.style] : va(c2.style) ? c2.style.parsedOptions : void 0;
3196
3219
  s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
3197
- } else if (ua(c2)) {
3198
- let e8 = typeof c2.style == `string` ? r2.time[c2.style] : ga(c2.style) ? c2.style.parsedOptions : r2.time.medium;
3220
+ } else if (fa(c2)) {
3221
+ let e8 = typeof c2.style == `string` ? r2.time[c2.style] : va(c2.style) ? c2.style.parsedOptions : r2.time.medium;
3199
3222
  s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
3200
- } else if (ca(c2)) {
3201
- let e8 = typeof c2.style == `string` ? r2.number[c2.style] : ha(c2.style) ? c2.style.parsedOptions : void 0;
3223
+ } else if (ua(c2)) {
3224
+ let e8 = typeof c2.style == `string` ? r2.number[c2.style] : _a(c2.style) ? c2.style.parsedOptions : void 0;
3202
3225
  if (e8 && e8.scale) {
3203
3226
  let t3 = e8.scale || 1;
3204
3227
  if (typeof l2 == `bigint`) {
@@ -3208,40 +3231,40 @@ function Y(e6, t2, n2, r2, i2, a2, o2) {
3208
3231
  }
3209
3232
  s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
3210
3233
  } else {
3211
- if (ma(c2)) {
3234
+ if (ga(c2)) {
3212
3235
  let { children: e8, value: l3 } = c2, u2 = i2[l3];
3213
- if (!Ua(u2)) throw new Ba(l3, `function`, o2);
3214
- let d2 = u2(Y(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
3236
+ if (!Ga(u2)) throw new Ha(l3, `function`, o2);
3237
+ let d2 = u2(Ka(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
3215
3238
  Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
3216
3239
  }
3217
- if (da(c2)) {
3240
+ if (pa(c2)) {
3218
3241
  let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
3219
- if (!a3) throw new za(c2.value, l2, Object.keys(c2.options), o2);
3220
- s2.push(...Y(a3.value, t2, n2, r2, i2));
3221
- } else if (fa(c2)) {
3242
+ if (!a3) throw new Va(c2.value, l2, Object.keys(c2.options), o2);
3243
+ s2.push(...Ka(a3.value, t2, n2, r2, i2));
3244
+ } else if (ma(c2)) {
3222
3245
  let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
3223
3246
  if (!a3) {
3224
- if (!Intl.PluralRules) throw new Ra(`Intl.PluralRules is not available in this environment.
3247
+ if (!Intl.PluralRules) throw new Ba(`Intl.PluralRules is not available in this environment.
3225
3248
  Try polyfilling it using "@formatjs/intl-pluralrules"
3226
3249
  `, `MISSING_INTL_API`, o2);
3227
3250
  let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
3228
3251
  a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
3229
3252
  }
3230
- if (!a3) throw new za(c2.value, l2, Object.keys(c2.options), o2);
3253
+ if (!a3) throw new Va(c2.value, l2, Object.keys(c2.options), o2);
3231
3254
  let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
3232
- s2.push(...Y(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
3255
+ s2.push(...Ka(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
3233
3256
  }
3234
3257
  }
3235
3258
  }
3236
- return Ha(s2);
3259
+ return Wa(s2);
3237
3260
  }
3238
- function Wa(e6, t2) {
3261
+ function qa(e6, t2) {
3239
3262
  return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
3240
3263
  }
3241
- function Ga(e6, t2) {
3242
- return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Wa(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
3264
+ function Ja(e6, t2) {
3265
+ return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = qa(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
3243
3266
  }
3244
- function Ka(e6) {
3267
+ function Ya(e6) {
3245
3268
  return { create() {
3246
3269
  return { get(t2) {
3247
3270
  return e6[t2];
@@ -3250,23 +3273,23 @@ function Ka(e6) {
3250
3273
  } };
3251
3274
  } };
3252
3275
  }
3253
- function qa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
3254
- return { getNumberFormat: Ni((...e7) => new Intl.NumberFormat(...e7), { cache: Ka(e6.number), strategy: Wi.variadic }), getDateTimeFormat: Ni((...e7) => new Intl.DateTimeFormat(...e7), { cache: Ka(e6.dateTime), strategy: Wi.variadic }), getPluralRules: Ni((...e7) => new Intl.PluralRules(...e7), { cache: Ka(e6.pluralRules), strategy: Wi.variadic }) };
3276
+ function Xa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
3277
+ return { getNumberFormat: Fi((...e7) => new Intl.NumberFormat(...e7), { cache: Ya(e6.number), strategy: Ki.variadic }), getDateTimeFormat: Fi((...e7) => new Intl.DateTimeFormat(...e7), { cache: Ya(e6.dateTime), strategy: Ki.variadic }), getPluralRules: Fi((...e7) => new Intl.PluralRules(...e7), { cache: Ya(e6.pluralRules), strategy: Ki.variadic }) };
3255
3278
  }
3256
- var Ja = class e5 {
3279
+ var Za = class e5 {
3257
3280
  constructor(t2, n2 = e5.defaultLocale, r2, i2) {
3258
3281
  if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
3259
3282
  let t3 = this.formatToParts(e6);
3260
3283
  if (t3.length === 1) return t3[0].value;
3261
3284
  let n3 = t3.reduce((e7, t4) => (!e7.length || t4.type !== 0 || typeof e7[e7.length - 1] != `string` ? e7.push(t4.value) : e7[e7.length - 1] += t4.value, e7), []);
3262
3285
  return n3.length <= 1 ? n3[0] || `` : n3;
3263
- }, this.formatToParts = (e6) => Y(this.ast, this.locales, this.formatters, this.formats, e6, void 0, this.message), this.resolvedOptions = () => ({ locale: this.resolvedLocale?.toString() || Intl.NumberFormat.supportedLocalesOf(this.locales)[0] }), this.getAst = () => this.ast, this.locales = n2, this.resolvedLocale = e5.resolveLocale(n2), typeof t2 == `string`) {
3286
+ }, this.formatToParts = (e6) => Ka(this.ast, this.locales, this.formatters, this.formats, e6, void 0, this.message), this.resolvedOptions = () => ({ locale: this.resolvedLocale?.toString() || Intl.NumberFormat.supportedLocalesOf(this.locales)[0] }), this.getAst = () => this.ast, this.locales = n2, this.resolvedLocale = e5.resolveLocale(n2), typeof t2 == `string`) {
3264
3287
  if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
3265
3288
  let { ...n3 } = i2 || {};
3266
3289
  this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
3267
3290
  } else this.ast = t2;
3268
3291
  if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
3269
- this.formats = Ga(e5.formats, r2), this.formatters = i2 && i2.formatters || qa(this.formatterCache);
3292
+ this.formats = Ja(e5.formats, r2), this.formatters = i2 && i2.formatters || Xa(this.formatterCache);
3270
3293
  }
3271
3294
  static {
3272
3295
  this.memoizedDefaultLocale = null;
@@ -3282,14 +3305,14 @@ var Ja = class e5 {
3282
3305
  };
3283
3306
  }
3284
3307
  static {
3285
- this.__parse = La;
3308
+ this.__parse = za;
3286
3309
  }
3287
3310
  static {
3288
3311
  this.formats = { number: { integer: { maximumFractionDigits: 0 }, currency: { style: `currency` }, percent: { style: `percent` } }, date: { short: { month: `numeric`, day: `numeric`, year: `2-digit` }, medium: { month: `short`, day: `numeric`, year: `numeric` }, long: { month: `long`, day: `numeric`, year: `numeric` }, full: { weekday: `long`, month: `long`, day: `numeric`, year: `numeric` } }, time: { short: { hour: `numeric`, minute: `numeric` }, medium: { hour: `numeric`, minute: `numeric`, second: `numeric` }, long: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` }, full: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` } } };
3289
3312
  }
3290
3313
  };
3291
- var Ya = [`__proto__`, `constructor`, `prototype`];
3292
- function Xa(e6, t2, n2) {
3314
+ var Qa = [`__proto__`, `constructor`, `prototype`];
3315
+ function $a(e6, t2, n2) {
3293
3316
  function r2(e7) {
3294
3317
  return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
3295
3318
  }
@@ -3299,49 +3322,49 @@ function Xa(e6, t2, n2) {
3299
3322
  for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
3300
3323
  if (i2()) return {};
3301
3324
  var o2 = r2(a2.shift());
3302
- if (Ya.indexOf(o2) > -1) return {};
3325
+ if (Qa.indexOf(o2) > -1) return {};
3303
3326
  !e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
3304
3327
  }
3305
3328
  if (i2()) return {};
3306
3329
  var s2 = r2(a2.shift());
3307
- return Ya.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
3330
+ return Qa.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
3308
3331
  }
3309
- function Za(e6, t2, n2) {
3310
- var r2 = Xa(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
3332
+ function eo(e6, t2, n2) {
3333
+ var r2 = $a(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
3311
3334
  i2 !== void 0 && (i2[a2] = n2);
3312
3335
  }
3313
- function Qa(e6, t2) {
3314
- var n2 = Xa(e6, t2), r2 = n2.obj, i2 = n2.k;
3336
+ function to(e6, t2) {
3337
+ var n2 = $a(e6, t2), r2 = n2.obj, i2 = n2.k;
3315
3338
  if (r2) return r2[i2];
3316
3339
  }
3317
- function $a(e6) {
3340
+ function no(e6) {
3318
3341
  return [...arguments].slice(1).forEach(function(t2) {
3319
3342
  if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
3320
3343
  var i2 = r2[n2];
3321
- Ya.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
3344
+ Qa.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
3322
3345
  }
3323
3346
  }), e6;
3324
3347
  }
3325
- function eo(e6, t2) {
3326
- return ao(e6) || io(e6, t2) || no(e6, t2) || to();
3348
+ function ro(e6, t2) {
3349
+ return co(e6) || so(e6, t2) || ao(e6, t2) || io();
3327
3350
  }
3328
- function to() {
3351
+ function io() {
3329
3352
  throw TypeError(`Invalid attempt to destructure non-iterable instance.
3330
3353
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
3331
3354
  }
3332
- function no(e6, t2) {
3355
+ function ao(e6, t2) {
3333
3356
  if (e6) {
3334
- if (typeof e6 == `string`) return ro(e6, t2);
3357
+ if (typeof e6 == `string`) return oo(e6, t2);
3335
3358
  var n2 = {}.toString.call(e6).slice(8, -1);
3336
- return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ? ro(e6, t2) : void 0;
3359
+ return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ? oo(e6, t2) : void 0;
3337
3360
  }
3338
3361
  }
3339
- function ro(e6, t2) {
3362
+ function oo(e6, t2) {
3340
3363
  (t2 == null || t2 > e6.length) && (t2 = e6.length);
3341
3364
  for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
3342
3365
  return r2;
3343
3366
  }
3344
- function io(e6, t2) {
3367
+ function so(e6, t2) {
3345
3368
  var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
3346
3369
  if (n2 != null) {
3347
3370
  var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
@@ -3362,10 +3385,10 @@ function io(e6, t2) {
3362
3385
  return s2;
3363
3386
  }
3364
3387
  }
3365
- function ao(e6) {
3388
+ function co(e6) {
3366
3389
  if (Array.isArray(e6)) return e6;
3367
3390
  }
3368
- function oo(e6, t2) {
3391
+ function lo(e6, t2) {
3369
3392
  var n2 = Object.keys(e6);
3370
3393
  if (Object.getOwnPropertySymbols) {
3371
3394
  var r2 = Object.getOwnPropertySymbols(e6);
@@ -3375,37 +3398,37 @@ function oo(e6, t2) {
3375
3398
  }
3376
3399
  return n2;
3377
3400
  }
3378
- function X(e6) {
3401
+ function uo(e6) {
3379
3402
  for (var t2 = 1; t2 < arguments.length; t2++) {
3380
3403
  var n2 = arguments[t2] == null ? {} : arguments[t2];
3381
- t2 % 2 ? oo(Object(n2), true).forEach(function(t3) {
3382
- so(e6, t3, n2[t3]);
3383
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : oo(Object(n2)).forEach(function(t3) {
3404
+ t2 % 2 ? lo(Object(n2), true).forEach(function(t3) {
3405
+ fo(e6, t3, n2[t3]);
3406
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : lo(Object(n2)).forEach(function(t3) {
3384
3407
  Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
3385
3408
  });
3386
3409
  }
3387
3410
  return e6;
3388
3411
  }
3389
- function so(e6, t2, n2) {
3390
- return (t2 = fo(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
3412
+ function fo(e6, t2, n2) {
3413
+ return (t2 = go(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
3391
3414
  }
3392
- function co(e6, t2) {
3415
+ function po(e6, t2) {
3393
3416
  if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
3394
3417
  }
3395
- function lo(e6, t2) {
3418
+ function mo(e6, t2) {
3396
3419
  for (var n2 = 0; n2 < t2.length; n2++) {
3397
3420
  var r2 = t2[n2];
3398
- r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, fo(r2.key), r2);
3421
+ r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, go(r2.key), r2);
3399
3422
  }
3400
3423
  }
3401
- function uo(e6, t2, n2) {
3402
- return t2 && lo(e6.prototype, t2), n2 && lo(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
3424
+ function ho(e6, t2, n2) {
3425
+ return t2 && mo(e6.prototype, t2), n2 && mo(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
3403
3426
  }
3404
- function fo(e6) {
3405
- var t2 = po(e6, `string`);
3427
+ function go(e6) {
3428
+ var t2 = _o(e6, `string`);
3406
3429
  return Z(t2) == `symbol` ? t2 : t2 + ``;
3407
3430
  }
3408
- function po(e6, t2) {
3431
+ function _o(e6, t2) {
3409
3432
  if (Z(e6) != `object` || !e6) return e6;
3410
3433
  var n2 = e6[Symbol.toPrimitive];
3411
3434
  if (n2 !== void 0) {
@@ -3423,53 +3446,53 @@ function Z(e6) {
3423
3446
  return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
3424
3447
  }, Z(e6);
3425
3448
  }
3426
- var mo = `https://www.i18next.com/how-to/using-icu-or-mf2`;
3427
- var ho = [`zero`, `one`, `two`, `few`, `many`, `other`];
3428
- function go() {
3449
+ var vo = `https://www.i18next.com/how-to/using-icu-or-mf2`;
3450
+ var yo = [`zero`, `one`, `two`, `few`, `many`, `other`];
3451
+ function bo() {
3429
3452
  return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
3430
3453
  return n2;
3431
3454
  }, parseLngForICU: function(e6) {
3432
3455
  return e6;
3433
3456
  }, escapeVariables: false };
3434
3457
  }
3435
- function _o(e6, t2, n2, r2) {
3458
+ function xo(e6, t2, n2, r2) {
3436
3459
  return n2 && t2 && Z(t2) === `object` ? `${r2} resolved to an object or array, but i18next-icu does not support returnObjects or joinArrays and returns the raw value unformatted.` : n2 && typeof t2 == `string` && t2.indexOf(`{{`) > -1 ? `${r2} could not be parsed (${e6.message}). It contains "{{": i18next interpolation like {{name}} does not work with ICU, use {name}.` : `${r2} could not be ${n2 ? `parsed` : `formatted`}: ${e6.message}`;
3437
3460
  }
3438
- var vo = function() {
3461
+ var So = function() {
3439
3462
  function e6(t2) {
3440
- co(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
3463
+ po(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
3441
3464
  }
3442
- return uo(e6, [{ key: `init`, value: function(e7, t2) {
3465
+ return ho(e6, [{ key: `init`, value: function(e7, t2) {
3443
3466
  var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
3444
- if (this.options = $a(r2, t2, this.options || {}, go()), this.formats = this.options.formats, e7) {
3467
+ if (this.options = no(r2, t2, this.options || {}, bo()), this.formats = this.options.formats, e7) {
3445
3468
  var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
3446
- e7.IntlMessageFormat = Ja, e7.ICU = this, this.i18next = e7, this.debug = !!(e7.options && e7.options.debug), this.debug && e7.options.interpolation && e7.options.interpolation.escapeValue !== false && !this.options.escapeVariables && this.warn(`interpolation.escapeValue is not applied, values are inserted without HTML escaping. Set the i18next-icu option escapeVariables: true to escape them, or interpolation.escapeValue: false if your output is escaped elsewhere (e.g. by React).`), s2 && (a2 && e7.on(a2, function() {
3469
+ e7.IntlMessageFormat = Za, e7.ICU = this, this.i18next = e7, this.debug = !!(e7.options && e7.options.debug), this.debug && e7.options.interpolation && e7.options.interpolation.escapeValue !== false && !this.options.escapeVariables && this.warn(`interpolation.escapeValue is not applied, values are inserted without HTML escaping. Set the i18next-icu option escapeVariables: true to escape them, or interpolation.escapeValue: false if your output is escaped elsewhere (e.g. by React).`), s2 && (a2 && e7.on(a2, function() {
3447
3470
  return n2.clearCache();
3448
3471
  }), o2 && e7.store.on(o2, function() {
3449
3472
  return n2.clearCache();
3450
3473
  }));
3451
3474
  }
3452
3475
  } }, { key: `addUserDefinedFormats`, value: function(e7) {
3453
- this.formats = this.formats ? X(X({}, this.formats), e7) : e7, this.clearCache();
3476
+ this.formats = this.formats ? uo(uo({}, this.formats), e7) : e7, this.clearCache();
3454
3477
  } }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
3455
3478
  var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && [n2, r2, i2], c2;
3456
3479
  if (this.options.memoize) {
3457
- var l2 = Qa(this.mem, s2);
3480
+ var l2 = to(this.mem, s2);
3458
3481
  l2 && l2.res === e7 && (c2 = l2.fc);
3459
3482
  }
3460
3483
  try {
3461
- c2 || (this.debug && typeof e7 == `string` && e7.indexOf(`$t(`) > -1 && this.firstTime(`nesting ${n2} ${r2} ${i2}`) && this.warn(`key "${i2}" (${n2}/${r2}) contains "$t(", but i18next-icu does not support nesting, the text is output as is.`), c2 = new Ja(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && Za(this.mem, s2, { res: e7, fc: c2 }));
3462
- var u2 = t2 && t2.replace && Z(t2.replace) === `object` ? X(X({}, t2), t2.replace) : t2;
3484
+ c2 || (this.debug && typeof e7 == `string` && e7.indexOf(`$t(`) > -1 && this.firstTime(`nesting ${n2} ${r2} ${i2}`) && this.warn(`key "${i2}" (${n2}/${r2}) contains "$t(", but i18next-icu does not support nesting, the text is output as is.`), c2 = new Za(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && eo(this.mem, s2, { res: e7, fc: c2 }));
3485
+ var u2 = t2 && t2.replace && Z(t2.replace) === `object` ? uo(uo({}, t2), t2.replace) : t2;
3463
3486
  return c2.format(this.escapeVariableValues(u2));
3464
3487
  } catch (a3) {
3465
- return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(_o(a3, e7, !c2, `key "${i2}" (${n2}/${r2})`)), this.options.parseErrorHandler(a3, i2, e7, t2);
3488
+ return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(xo(a3, e7, !c2, `key "${i2}" (${n2}/${r2})`)), this.options.parseErrorHandler(a3, i2, e7, t2);
3466
3489
  }
3467
3490
  } }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
3468
3491
  return this.debug && i2 && this.checkSuffixKeys(t2, n2, r2, i2), e7;
3469
3492
  } }, { key: `checkSuffixKeys`, value: function(e7, t2, n2, r2) {
3470
3493
  var i2 = r2.count, a2 = r2.context, o2 = this.i18next.options, s2 = o2.pluralSeparator, c2 = s2 === void 0 ? `_` : s2, l2 = o2.contextSeparator, u2 = l2 === void 0 ? `_` : l2, d2 = this.i18next.services.resourceStore, f2 = `key "${e7}" (${t2}/${n2})`;
3471
3494
  if (i2 !== void 0 && this.firstTime(`plural ${t2} ${n2} ${e7}`)) {
3472
- var p2 = ho.concat(ho.map(function(e8) {
3495
+ var p2 = yo.concat(yo.map(function(e8) {
3473
3496
  return `ordinal${c2}${e8}`;
3474
3497
  })).map(function(t3) {
3475
3498
  return `${e7}${c2}${t3}`;
@@ -3483,33 +3506,33 @@ var vo = function() {
3483
3506
  } }, { key: `firstTime`, value: function(e7) {
3484
3507
  return !this.warned.has(e7) && (this.warned.add(e7), true);
3485
3508
  } }, { key: `warn`, value: function(e7) {
3486
- this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${mo}`);
3509
+ this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${vo}`);
3487
3510
  } }, { key: `clearCache`, value: function() {
3488
3511
  this.mem = {};
3489
3512
  } }, { key: `escapeVariableValues`, value: function(e7) {
3490
3513
  if (!this.options.escapeVariables || !e7 || Z(e7) !== `object`) return e7;
3491
3514
  for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
3492
- var i2 = eo(r2[n2], 2), a2 = i2[0], o2 = i2[1];
3515
+ var i2 = ro(r2[n2], 2), a2 = i2[0], o2 = i2[1];
3493
3516
  t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`) : o2;
3494
3517
  }
3495
3518
  return t2;
3496
3519
  } }]), e6;
3497
3520
  }();
3498
- vo.type = `i18nFormat`;
3499
- function yo({ icuOptions: e6 = {}, ...t2 }) {
3521
+ So.type = `i18nFormat`;
3522
+ function Co({ icuOptions: e6 = {}, ...t2 }) {
3500
3523
  let { parseErrorHandler: n2 = void 0 } = t2;
3501
- return Mi(t2, { icu: new vo({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
3524
+ return Pi(t2, { icu: new So({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
3502
3525
  }
3503
- var bo = (e6, t2, n2, r2) => {
3526
+ var wo = (e6, t2, n2, r2) => {
3504
3527
  let i2 = [n2, { code: t2, ...r2 || {} }];
3505
3528
  if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
3506
3529
  Q(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
3507
3530
  };
3508
- var xo = {};
3509
- var So = (e6, t2, n2, r2) => {
3510
- Q(n2) && xo[n2] || (Q(n2) && (xo[n2] = /* @__PURE__ */ new Date()), bo(e6, t2, n2, r2));
3531
+ var To = {};
3532
+ var Eo = (e6, t2, n2, r2) => {
3533
+ Q(n2) && To[n2] || (Q(n2) && (To[n2] = /* @__PURE__ */ new Date()), wo(e6, t2, n2, r2));
3511
3534
  };
3512
- var Co = (e6, t2) => () => {
3535
+ var Do = (e6, t2) => () => {
3513
3536
  if (e6.isInitialized) t2();
3514
3537
  else {
3515
3538
  let n2 = () => {
@@ -3520,29 +3543,29 @@ var Co = (e6, t2) => () => {
3520
3543
  e6.on(`initialized`, n2);
3521
3544
  }
3522
3545
  };
3523
- var wo = (e6, t2, n2) => {
3524
- e6.loadNamespaces(t2, Co(e6, n2));
3546
+ var Oo = (e6, t2, n2) => {
3547
+ e6.loadNamespaces(t2, Do(e6, n2));
3525
3548
  };
3526
- var To = (e6, t2, n2, r2) => {
3527
- if (Q(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return wo(e6, n2, r2);
3549
+ var ko = (e6, t2, n2, r2) => {
3550
+ if (Q(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return Oo(e6, n2, r2);
3528
3551
  n2.forEach((t3) => {
3529
3552
  e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
3530
- }), e6.loadLanguages(t2, Co(e6, r2));
3553
+ }), e6.loadLanguages(t2, Do(e6, r2));
3531
3554
  };
3532
- var Eo = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (So(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
3555
+ var Ao = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (Eo(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
3533
3556
  if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
3534
3557
  } });
3535
3558
  var Q = (e6) => typeof e6 == `string`;
3536
- var Do = (e6) => typeof e6 == `object` && !!e6;
3537
- var Oo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
3538
- var ko = { "&amp;": `&`, "&#38;": `&`, "&lt;": `<`, "&#60;": `<`, "&gt;": `>`, "&#62;": `>`, "&apos;": `'`, "&#39;": `'`, "&quot;": `"`, "&#34;": `"`, "&nbsp;": ` `, "&#160;": ` `, "&copy;": `\xA9`, "&#169;": `\xA9`, "&reg;": `\xAE`, "&#174;": `\xAE`, "&hellip;": `\u2026`, "&#8230;": `\u2026`, "&#x2F;": `/`, "&#47;": `/` };
3539
- var Ao = (e6) => ko[e6];
3540
- var jo = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(Oo, Ao) };
3541
- var Mo = () => jo;
3542
- var No;
3543
- var Po = () => No;
3544
- var Fo = t();
3545
- var Io = class {
3559
+ var jo = (e6) => typeof e6 == `object` && !!e6;
3560
+ var Mo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
3561
+ var No = { "&amp;": `&`, "&#38;": `&`, "&lt;": `<`, "&#60;": `<`, "&gt;": `>`, "&#62;": `>`, "&apos;": `'`, "&#39;": `'`, "&quot;": `"`, "&#34;": `"`, "&nbsp;": ` `, "&#160;": ` `, "&copy;": `\xA9`, "&#169;": `\xA9`, "&reg;": `\xAE`, "&#174;": `\xAE`, "&hellip;": `\u2026`, "&#8230;": `\u2026`, "&#x2F;": `/`, "&#47;": `/` };
3562
+ var Po = (e6) => No[e6];
3563
+ var Fo = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(Mo, Po) };
3564
+ var Io = () => Fo;
3565
+ var Lo;
3566
+ var Ro = () => Lo;
3567
+ var zo = t();
3568
+ var Bo = class {
3546
3569
  constructor() {
3547
3570
  this.usedNamespaces = {};
3548
3571
  }
@@ -3555,32 +3578,32 @@ var Io = class {
3555
3578
  return Object.keys(this.usedNamespaces);
3556
3579
  }
3557
3580
  };
3558
- var Lo = (e6, t2) => {
3581
+ var Vo = (e6, t2) => {
3559
3582
  let n2 = c();
3560
3583
  return o(() => {
3561
3584
  n2.current = t2 ? n2.current : e6;
3562
3585
  }, [e6, t2]), n2.current;
3563
3586
  };
3564
- var Ro = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
3565
- var zo = (e6, t2, n2, r2) => i(Ro(e6, t2, n2, r2), [e6, t2, n2, r2]);
3566
- var Bo = (e6, t2 = {}) => {
3567
- let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = a(Fo) || {}, s2 = n2 || r2 || Po();
3568
- if (s2 && !s2.reportNamespaces && (s2.reportNamespaces = new Io()), !s2) {
3569
- So(s2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
3570
- let e7 = (e8, t4) => Q(t4) ? t4 : Do(t4) && Q(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
3587
+ var Ho = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
3588
+ var Uo = (e6, t2, n2, r2) => i(Ho(e6, t2, n2, r2), [e6, t2, n2, r2]);
3589
+ var Wo = (e6, t2 = {}) => {
3590
+ let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = a(zo) || {}, s2 = n2 || r2 || Ro();
3591
+ if (s2 && !s2.reportNamespaces && (s2.reportNamespaces = new Bo()), !s2) {
3592
+ Eo(s2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
3593
+ let e7 = (e8, t4) => Q(t4) ? t4 : jo(t4) && Q(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
3571
3594
  return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
3572
3595
  }
3573
- s2.options.react?.wait && So(s2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
3574
- let u2 = { ...Mo(), ...s2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = u2, p2 = e6 || i2 || s2.options?.defaultNS;
3596
+ s2.options.react?.wait && Eo(s2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
3597
+ let u2 = { ...Io(), ...s2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = u2, p2 = e6 || i2 || s2.options?.defaultNS;
3575
3598
  p2 = Q(p2) ? [p2] : p2 || [`translation`], s2.reportNamespaces.addUsedNamespaces?.(p2);
3576
- let m2 = (s2.isInitialized || s2.initializedStoreOnce) && p2.every((e7) => Eo(e7, s2, u2)), h2 = zo(s2, t2.lng || null, u2.nsMode === `fallback` ? p2 : p2[0], f2), g2 = () => h2, _2 = () => Ro(s2, t2.lng || null, u2.nsMode === `fallback` ? p2 : p2[0], f2), [v2, y2] = l(g2), b2 = p2.join();
3599
+ let m2 = (s2.isInitialized || s2.initializedStoreOnce) && p2.every((e7) => Ao(e7, s2, u2)), h2 = Uo(s2, t2.lng || null, u2.nsMode === `fallback` ? p2 : p2[0], f2), g2 = () => h2, _2 = () => Ho(s2, t2.lng || null, u2.nsMode === `fallback` ? p2 : p2[0], f2), [v2, y2] = l(g2), b2 = p2.join();
3577
3600
  t2.lng && (b2 = `${t2.lng}${b2}`);
3578
- let x2 = Lo(b2), S2 = c(true);
3601
+ let x2 = Vo(b2), S2 = c(true);
3579
3602
  o(() => {
3580
3603
  let { bindI18n: e7, bindI18nStore: n3 } = u2;
3581
- S2.current = true, !m2 && !d2 && (t2.lng ? To(s2, t2.lng, p2, () => {
3604
+ S2.current = true, !m2 && !d2 && (t2.lng ? ko(s2, t2.lng, p2, () => {
3582
3605
  S2.current && y2(_2);
3583
- }) : wo(s2, p2, () => {
3606
+ }) : Oo(s2, p2, () => {
3584
3607
  S2.current && y2(_2);
3585
3608
  })), m2 && x2 && x2 !== b2 && S2.current && y2(_2);
3586
3609
  let r3 = () => {
@@ -3595,97 +3618,97 @@ var Bo = (e6, t2 = {}) => {
3595
3618
  let C2 = [v2, s2, m2];
3596
3619
  if (C2.t = v2, C2.i18n = s2, C2.ready = m2, m2 || !m2 && !d2) return C2;
3597
3620
  throw new Promise((e7) => {
3598
- t2.lng ? To(s2, t2.lng, p2, () => e7()) : wo(s2, p2, () => e7());
3621
+ t2.lng ? ko(s2, t2.lng, p2, () => e7()) : Oo(s2, p2, () => e7());
3599
3622
  });
3600
3623
  };
3601
- function Vo({ i18n: e6, defaultNS: t2, children: r2 }) {
3624
+ function Go({ i18n: e6, defaultNS: t2, children: r2 }) {
3602
3625
  let i2 = s(() => ({ i18n: e6, defaultNS: t2 }), [e6, t2]);
3603
- return n(Fo.Provider, { value: i2 }, r2);
3626
+ return n(zo.Provider, { value: i2 }, r2);
3604
3627
  }
3605
- var Ho = I(`@wix/site-service-renderer-configuration`);
3606
- var Uo = () => {
3628
+ var Ko = R(`@wix/site-service-renderer-configuration`);
3629
+ var qo = () => {
3607
3630
  let e6, t2;
3608
3631
  try {
3609
- e6 = u(Ho).languageCode;
3632
+ e6 = u(Ko).languageCode;
3610
3633
  } catch {
3611
3634
  }
3612
3635
  try {
3613
- t2 = u(Rr).language;
3636
+ t2 = u(Br).language;
3614
3637
  } catch {
3615
3638
  }
3616
3639
  return e6 || t2;
3617
3640
  };
3618
- var Wo = `wix-warmup-data`;
3619
- var Go = null;
3620
- function Ko(e6) {
3641
+ var Jo = `wix-warmup-data`;
3642
+ var Yo = null;
3643
+ function Xo(e6) {
3621
3644
  if (typeof document < `u`) try {
3622
- let t2 = document.getElementById(Wo)?.textContent;
3623
- return t2 ? (Go?.text !== t2 && (Go = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Go.data[e6] ?? void 0) : void 0;
3645
+ let t2 = document.getElementById(Jo)?.textContent;
3646
+ return t2 ? (Yo?.text !== t2 && (Yo = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Yo.data[e6] ?? void 0) : void 0;
3624
3647
  } catch {
3625
3648
  return;
3626
3649
  }
3627
3650
  }
3628
- var qo = `blog-builder:i18n`;
3629
- var Jo = () => Ko(qo);
3630
- var Yo = /* @__PURE__ */ new Map();
3631
- function Xo(e6, t2) {
3632
- let n2 = Yo.get(e6);
3651
+ var Zo = `blog-builder:i18n`;
3652
+ var Qo = () => Xo(Zo);
3653
+ var $o = /* @__PURE__ */ new Map();
3654
+ function es(e6, t2) {
3655
+ let n2 = $o.get(e6);
3633
3656
  if (n2) return n2;
3634
- let r2 = Jo(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = yo({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
3635
- return Yo.set(e6, a2), a2;
3657
+ let r2 = Qo(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = Co({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
3658
+ return $o.set(e6, a2), a2;
3636
3659
  }
3637
- var Zo = (e6, t2, n2) => {
3660
+ var ts = (e6, t2, n2) => {
3638
3661
  let r2 = t2.lastIndexOf(`?`), i2 = e6[r2 === -1 || r2 < t2.lastIndexOf(`/`) ? t2 : t2.slice(0, r2)];
3639
3662
  return i2 ? typeof i2 == `function` ? i2() : Promise.resolve(i2) : new Promise((e7, r3) => {
3640
3663
  (typeof queueMicrotask == `function` ? queueMicrotask : setTimeout)(r3.bind(null, Error(`Unknown variable dynamic import: ` + t2 + (t2.split(`/`).length === n2 ? `` : `. Note that variables only represent file names one level deep.`))));
3641
3664
  });
3642
3665
  };
3643
- var Qo = (e6) => e6.split(`-`)[0] ?? e6;
3644
- Ur({ isDev: false, loadMessages: (e6) => Zo(Object.assign({ "../assets/locale/messages_en.dev.json": () => pn(() => Promise.resolve().then(() => es), void 0, import.meta.url), "../assets/locale/messages_en.json": () => pn(() => Promise.resolve().then(() => ns), void 0, import.meta.url) }), `../assets/locale/messages_${Qo(e6)}.json`, 4), loadDevMessages: (e6) => Zo(Object.assign({ "../assets/locale/messages_en.dev.json": () => pn(() => Promise.resolve().then(() => es), void 0, import.meta.url) }), `../assets/locale/messages_${Qo(e6)}.dev.json`, 4) });
3645
- function $o(e6) {
3646
- let t2 = Uo(), n2 = Jo()?.locale ?? t2 ?? `en`;
3647
- return { i18n: Xo(n2, e6), locale: n2 };
3648
- }
3649
- var es = m({ default: () => ts });
3650
- var ts = { "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "post-list.empty-state.title": `No posts yet`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "related-posts.empty-state.title": `No related posts yet`, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "post-actions.like": `Like post`, "post-actions.unlike": `Unlike post`, "post-actions.share": `Share post`, "post-actions.share-dialog": `Share post`, "post-actions.link-copied": `Link copied`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.link-label": `Post link`, "post-actions.copy-link": `Copy link`, "post-actions.close": `Close`, "post-counters.loading-likes": `Loading likes`, "cover-media.play": `Play video`, "cover-media.placeholder-alt": `Post cover image`, "post-comments.loading": `Loading comments\u2026`, "post-comments.no-post": `No post resolved for this URL yet.`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, "canvas.post-title": `Post Title`, "canvas.author-name": `Author Name`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "canvas.category": `Category`, "canvas.category-numbered": `Category {number}`, "canvas.tag-numbered": `Tag {number}`, "canvas.author-photo-alt": `Author photo`, "category-header.all-posts": `All Posts` };
3651
- var ns = m({ default: () => is, title: () => rs });
3652
- var rs = `My App`;
3653
- var is = { "canvas.category": `Category`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "canvas.tag-numbered": `Tag {number}`, "cover-media.play": `Play video`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-counters.loading-likes": `Loading likes`, "post-comments.loading": `Loading comments\u2026`, "post-actions.like": `Like post`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "related-posts.empty-state.title": `No related posts yet`, "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post-actions.link-copied": `Link copied`, "category-header.all-posts": `All Posts`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.copy-link": `Copy link`, "cover-media.placeholder-alt": `Post cover image`, "post-actions.link-label": `Post link`, "post-list.empty-state.title": `No posts yet`, "post-actions.share-dialog": `Share post`, "canvas.post-title": `Post Title`, "post-actions.unlike": `Unlike post`, "post-comments.no-post": `No post resolved for this URL yet.`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "canvas.category-numbered": `Category {number}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post-actions.share": `Share post`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post-actions.close": `Close`, "canvas.category-description": `Add a short description of this category so readers know what they will find here. It shows under the category title, above the posts.`, "canvas.author-photo-alt": `Author photo`, "canvas.author-name": `Author Name`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, title: rs, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.` };
3654
- var as = Object.assign({ "../assets/locale/messages_en.dev.json": es, "../assets/locale/messages_en.json": ns });
3655
- var os = (e6, t2) => {
3656
- let n2 = as[`../assets/locale/messages_${Qo(e6)}${t2}.json`];
3666
+ var ns = (e6) => e6.split(`-`)[0] ?? e6;
3667
+ Gr({ isDev: false, loadMessages: (e6) => ts(Object.assign({ "../assets/locale/messages_en.dev.json": () => pn(() => Promise.resolve().then(() => is), void 0, import.meta.url), "../assets/locale/messages_en.json": () => pn(() => Promise.resolve().then(() => os), void 0, import.meta.url) }), `../assets/locale/messages_${ns(e6)}.json`, 4), loadDevMessages: (e6) => ts(Object.assign({ "../assets/locale/messages_en.dev.json": () => pn(() => Promise.resolve().then(() => is), void 0, import.meta.url) }), `../assets/locale/messages_${ns(e6)}.dev.json`, 4) });
3668
+ function rs(e6) {
3669
+ let t2 = qo(), n2 = Qo()?.locale ?? t2 ?? `en`;
3670
+ return { i18n: es(n2, e6), locale: n2 };
3671
+ }
3672
+ var is = m({ default: () => as });
3673
+ var as = { "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "post-list.empty-state.title": `No posts yet`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "related-posts.empty-state.title": `No related posts yet`, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "post-actions.like": `Like post`, "post-actions.unlike": `Unlike post`, "post-actions.share": `Share post`, "post-actions.share-dialog": `Share post`, "post-actions.link-copied": `Link copied`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.link-label": `Post link`, "post-actions.copy-link": `Copy link`, "post-actions.close": `Close`, "post-counters.loading-likes": `Loading likes`, "cover-media.play": `Play video`, "cover-media.placeholder-alt": `Post cover image`, "post-comments.loading": `Loading comments\u2026`, "post-comments.no-post": `No post resolved for this URL yet.`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, "canvas.post-title": `Post Title`, "canvas.author-name": `Author Name`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "canvas.category": `Category`, "canvas.category-numbered": `Category {number}`, "canvas.tag-numbered": `Tag {number}`, "canvas.author-photo-alt": `Author photo`, "category-header.all-posts": `All Posts` };
3674
+ var os = m({ default: () => cs, title: () => ss });
3675
+ var ss = `My App`;
3676
+ var cs = { "canvas.category": `Category`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "canvas.tag-numbered": `Tag {number}`, "cover-media.play": `Play video`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-counters.loading-likes": `Loading likes`, "post-comments.loading": `Loading comments\u2026`, "post-actions.like": `Like post`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "related-posts.empty-state.title": `No related posts yet`, "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post-actions.link-copied": `Link copied`, "category-header.all-posts": `All Posts`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.copy-link": `Copy link`, "cover-media.placeholder-alt": `Post cover image`, "post-actions.link-label": `Post link`, "post-list.empty-state.title": `No posts yet`, "post-actions.share-dialog": `Share post`, "canvas.post-title": `Post Title`, "post-actions.unlike": `Unlike post`, "post-comments.no-post": `No post resolved for this URL yet.`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "canvas.category-numbered": `Category {number}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post-actions.share": `Share post`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post-actions.close": `Close`, "canvas.category-description": `Add a short description of this category so readers know what they will find here. It shows under the category title, above the posts.`, "canvas.author-photo-alt": `Author photo`, "canvas.author-name": `Author Name`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, title: ss, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.` };
3677
+ var ls = Object.assign({ "../assets/locale/messages_en.dev.json": is, "../assets/locale/messages_en.json": os });
3678
+ var us = (e6, t2) => {
3679
+ let n2 = ls[`../assets/locale/messages_${ns(e6)}${t2}.json`];
3657
3680
  return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
3658
3681
  };
3659
- var ss = Ur({ isDev: false, loadMessages: (e6) => os(e6, ``), loadDevMessages: (e6) => os(e6, `.dev`) });
3660
- var cs = (e6, t2, n2) => typeof e6 != `number` || !Number.isFinite(e6) || e6 < 0 ? `` : new Intl.NumberFormat(n2, t2 === `compact` ? { notation: `compact`, maximumFractionDigits: 1 } : void 0).format(e6);
3682
+ var ds = Gr({ isDev: false, loadMessages: (e6) => us(e6, ``), loadDevMessages: (e6) => us(e6, `.dev`) });
3683
+ var fs = (e6, t2, n2) => typeof e6 != `number` || !Number.isFinite(e6) || e6 < 0 ? `` : new Intl.NumberFormat(n2, t2 === `compact` ? { notation: `compact`, maximumFractionDigits: 1 } : void 0).format(e6);
3661
3684
  var $ = { timeToRead: `post.time-to-read`, viewCount: `post.view-count`, commentCount: `post.comment-count`, likeCount: `post.like-count`, noPostsTitle: `post-list.empty-state.title`, noPostsDescription: `post-list.empty-state.description`, noRelatedPostsTitle: `related-posts.empty-state.title`, noRelatedPostsDescription: `related-posts.empty-state.description`, canvasPostTitle: `canvas.post-title`, canvasAuthorName: `canvas.author-name`, canvasExcerpt: `canvas.excerpt`, canvasContent: `canvas.content`, canvasCategory: `canvas.category`, canvasCategoryNumbered: `canvas.category-numbered`, canvasTagNumbered: `canvas.tag-numbered`, canvasCoverAlt: `cover-media.placeholder-alt`, canvasAuthorPhotoAlt: `canvas.author-photo-alt` };
3662
- var ls = (e6, t2) => {
3663
- let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: cs(r2, `full`, t2) });
3685
+ var ps = (e6, t2) => {
3686
+ let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: fs(r2, `full`, t2) });
3664
3687
  return { timeToRead: (t3) => e6($.timeToRead, { count: t3 }), viewCount: n2($.viewCount), commentCount: n2($.commentCount), likeCount: n2($.likeCount), noPostsEmptyState: () => ({ title: e6($.noPostsTitle), description: e6($.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6($.noRelatedPostsTitle), description: e6($.noRelatedPostsDescription) }), canvas: { postTitle: () => e6($.canvasPostTitle), authorName: () => e6($.canvasAuthorName), excerpt: () => e6($.canvasExcerpt), content: () => e6($.canvasContent), category: () => e6($.canvasCategory), categoryNumbered: (t3) => e6($.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6($.canvasTagNumbered, { number: t3 }), coverAlt: () => e6($.canvasCoverAlt), authorPhotoAlt: () => e6($.canvasAuthorPhotoAlt) } };
3665
3688
  };
3666
- var us = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
3667
- var ds = (e6) => ({ text: e6, html: `<p>${us(e6)}</p>`, linkList: [] });
3668
- var fs = t(null);
3669
- fs.displayName = `PostItemContext`;
3670
- function ps() {
3671
- return a(fs);
3672
- }
3673
- function ms({ postData: t2, children: n2 }) {
3674
- let r2 = Br(), { t: i2, ready: a2 } = Bo(void 0, { useSuspense: false }), o2 = s(() => ls(i2, r2), [i2, r2]), { isLiked: c2, likeCount: l2, isLikeCountLoaded: u2, viewCount: d2, commentCount: p2, toggleLike: m2, liveLikes: h2 } = Lr(t2.recentPostItem.slug ? t2._id : void 0, 0), g2 = s(() => ({ ...t2, isLiked: c2, isLikeCountLoaded: u2, toggleLike: m2, liveLikes: h2, likeCountValue: l2, viewCountValue: d2 ?? t2.initialViewCount, commentCountValue: p2 ?? t2.initialCommentCount, likeCount: ds(a2 ? o2.likeCount(l2) : ``), viewCount: d2 === void 0 || !a2 ? t2.viewCount : ds(o2.viewCount(d2)), commentCount: p2 === void 0 || !a2 ? t2.commentCount : ds(o2.commentCount(p2)) }), [t2, c2, l2, u2, d2, p2, m2, h2, o2, a2]), _2 = s(() => ({ currentPostId: t2.recentPostItem.slug ? t2._id : void 0, categoryIds: void 0, relatedPostIds: void 0 }), [t2]), v2 = s(() => {
3675
- let e6 = g2.itemCategoryLabel.text;
3676
- return { title: g2.itemTitle, excerpt: g2.itemExcerpt, coverImage: g2.itemCoverImage, coverMedia: g2.itemCoverMedia, richContent: { nodes: [] }, authorName: g2.authorName, authorImage: g2.authorImage, timeToRead: g2.timeToRead, publishedDate: g2.itemPublishedDate, viewCount: g2.viewCount, commentCount: g2.commentCount, likeCount: g2.likeCount, postCategories: e6 ? [{ _id: e6, label: e6, itemCategoryLabel: g2.itemCategoryLabel, itemCategoryLink: void 0, categoryItem: { label: e6, slug: `` } }] : [], itemCategoryLabel: g2.itemCategoryLabel, postTags: [], hasCoverImage: g2.itemCoverMedia !== void 0 && g2.itemCoverImage !== void 0, hasExcerpt: !!g2.itemExcerpt.text.trim(), hasTags: false, publishedDateValue: g2.publishedDateValue, minutesToReadValue: g2.minutesToReadValue, viewCountValue: g2.viewCountValue, commentCountValue: g2.commentCountValue, isLiked: g2.isLiked, likeCountValue: g2.likeCountValue, isLikeCountLoaded: g2.isLikeCountLoaded, toggleLike: g2.toggleLike, liveLikes: g2.liveLikes, clockValue: g2.clockValue, postUrl: g2.itemLink?.href, itemLink: g2.itemLink, commentingEnabled: g2.commentingEnabled, relatedPostsSource: _2, isLoadingPost: false, hasError: false, isEmpty: false };
3677
- }, [g2, _2]);
3678
- return f(fs.Provider, { value: g2, children: f(e, { value: v2, children: n2 }) });
3679
- }
3680
- function hs({ postData: e6, children: t2 }) {
3681
- let { i18n: n2 } = $o(ss);
3682
- return e6 === void 0 ? f(d, { children: t2 }) : f(Vo, { i18n: n2, children: f(ms, { postData: e6, children: t2 }) });
3683
- }
3684
- var gs = Dn(`e26c0f39-8db2-4b56-8c9b-fd1457f917e0`);
3689
+ var ms = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
3690
+ var hs = (e6) => ({ text: e6, html: `<p>${ms(e6)}</p>`, linkList: [] });
3691
+ var gs = t(null);
3692
+ gs.displayName = `PostItemContext`;
3693
+ function _s() {
3694
+ return a(gs);
3695
+ }
3696
+ function vs({ postData: t2, children: n2 }) {
3697
+ let r2 = Hr(), { t: i2, ready: a2 } = Wo(void 0, { useSuspense: false }), o2 = s(() => ps(i2, r2), [i2, r2]), { isLiked: c2, likeCount: l2, isLikeCountLoaded: u2, toggleLike: d2, liveLikes: p2 } = zr(t2.recentPostItem.slug ? t2._id : void 0, t2.initialLikeCount ?? 0, false, void 0, false), m2 = s(() => ({ ...t2, isLiked: c2, isLikeCountLoaded: u2, toggleLike: d2, liveLikes: p2, likeCountValue: l2, viewCountValue: t2.initialViewCount, commentCountValue: t2.initialCommentCount, likeCount: hs(a2 ? o2.likeCount(l2) : ``) }), [t2, c2, l2, u2, d2, p2, o2, a2]), h2 = s(() => ({ currentPostId: t2.recentPostItem.slug ? t2._id : void 0, categoryIds: void 0, relatedPostIds: void 0 }), [t2]), g2 = s(() => {
3698
+ let e6 = m2.itemCategoryLabel.text;
3699
+ return { title: m2.itemTitle, excerpt: m2.itemExcerpt, coverImage: m2.itemCoverImage, coverMedia: m2.itemCoverMedia, richContent: { nodes: [] }, authorName: m2.authorName, authorImage: m2.authorImage, timeToRead: m2.timeToRead, publishedDate: m2.itemPublishedDate, viewCount: m2.viewCount, commentCount: m2.commentCount, likeCount: m2.likeCount, postCategories: e6 ? [{ _id: e6, label: e6, itemCategoryLabel: m2.itemCategoryLabel, itemCategoryLink: void 0, categoryItem: { label: e6, slug: `` } }] : [], itemCategoryLabel: m2.itemCategoryLabel, postTags: [], hasCoverImage: m2.itemCoverMedia !== void 0 && m2.itemCoverImage !== void 0, hasExcerpt: !!m2.itemExcerpt.text.trim(), hasTags: false, publishedDateValue: m2.publishedDateValue, minutesToReadValue: m2.minutesToReadValue, viewCountValue: m2.viewCountValue, commentCountValue: m2.commentCountValue, isLiked: m2.isLiked, likeCountValue: m2.likeCountValue, isLikeCountLoaded: m2.isLikeCountLoaded, toggleLike: m2.toggleLike, liveLikes: m2.liveLikes, clockValue: m2.clockValue, postUrl: m2.itemLink?.href, itemLink: m2.itemLink, commentingEnabled: m2.commentingEnabled, relatedPostsSource: h2, isLoadingPost: false, hasError: false, isEmpty: false };
3700
+ }, [m2, h2]);
3701
+ return f(gs.Provider, { value: m2, children: f(e, { value: g2, children: n2 }) });
3702
+ }
3703
+ function ys({ postData: e6, children: t2 }) {
3704
+ let { i18n: n2 } = rs(ds);
3705
+ return e6 === void 0 ? f(d, { children: t2 }) : f(Go, { i18n: n2, children: f(vs, { postData: e6, children: t2 }) });
3706
+ }
3707
+ var bs = En(`e26c0f39-8db2-4b56-8c9b-fd1457f917e0`);
3685
3708
  export {
3686
- hs as PostItemContextProvider,
3687
- hs as default,
3688
- gs as injectAccessTokenGetter,
3689
- ps as usePostListItemContext
3709
+ ys as PostItemContextProvider,
3710
+ ys as default,
3711
+ bs as injectAccessTokenGetter,
3712
+ _s as usePostListItemContext
3690
3713
  };
3691
3714
  //# sourceMappingURL=context-post-list-item.mjs.map