@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
@@ -30,10 +30,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // context-post-list-item.ts
31
31
  var context_post_list_item_exports = {};
32
32
  __export(context_post_list_item_exports, {
33
- PostItemContextProvider: () => hs,
34
- default: () => hs,
35
- injectAccessTokenGetter: () => gs,
36
- usePostListItemContext: () => ps
33
+ PostItemContextProvider: () => ys,
34
+ default: () => ys,
35
+ injectAccessTokenGetter: () => bs,
36
+ usePostListItemContext: () => _s
37
37
  });
38
38
  module.exports = __toCommonJS(context_post_list_item_exports);
39
39
 
@@ -112,20 +112,20 @@ var S = class extends Error {
112
112
  }
113
113
  };
114
114
  var C = (e6, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
115
- var ee = (e6) => e6?.method && [`post`, `put`, `patch`].includes(e6.method.toLocaleLowerCase()) && e6.body ? { "Content-Type": `application/json` } : {};
116
- var w = (e6) => e6 && typeof e6 == `object` && !Array.isArray(e6);
117
- var T = (e6) => e6.__type === `host`;
118
- function te(e6, t2) {
115
+ var w = (e6) => e6?.method && [`post`, `put`, `patch`].includes(e6.method.toLocaleLowerCase()) && e6.body ? { "Content-Type": `application/json` } : {};
116
+ var T = (e6) => e6 && typeof e6 == `object` && !Array.isArray(e6);
117
+ var E = (e6) => e6.__type === `host`;
118
+ function ee(e6, t2) {
119
119
  return e6.create(t2);
120
120
  }
121
- var ne = `x-wix-bi-gateway`;
122
- function re(e6, t2, n2) {
123
- return { [ne]: ie({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e6.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e6.methodFqn, entity: e6.entityFqdn }) };
121
+ var te = `x-wix-bi-gateway`;
122
+ function ne(e6, t2, n2) {
123
+ return { [te]: re({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e6.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e6.methodFqn, entity: e6.entityFqdn }) };
124
124
  }
125
- function ie(e6) {
125
+ function re(e6) {
126
126
  return Object.entries(e6).filter(([e7, t2]) => !!t2).map(([e7, t2]) => `${e7}=${t2}`).join(`,`);
127
127
  }
128
- function ae(e6) {
128
+ function ie(e6) {
129
129
  let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
130
130
  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);
131
131
  try {
@@ -134,82 +134,82 @@ function ae(e6) {
134
134
  globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
135
135
  }
136
136
  }
137
- var oe = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
138
- function se(e6) {
139
- return fe(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
137
+ var ae = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
138
+ function oe(e6) {
139
+ return de(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
140
140
  }
141
- var ce = /([\p{Ll}\d])(\p{Lu})/gu;
142
- var le = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
143
- var ue = `$1\0$2`;
144
- var de = /[^\p{L}\d]+/giu;
145
- function fe(e6) {
141
+ var se = /([\p{Ll}\d])(\p{Lu})/gu;
142
+ var ce = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
143
+ var le = `$1\0$2`;
144
+ var ue = /[^\p{L}\d]+/giu;
145
+ function de(e6) {
146
146
  let t2 = e6.trim();
147
- t2 = t2.replace(ce, ue).replace(le, ue), t2 = t2.replace(de, `\0`);
147
+ t2 = t2.replace(se, le).replace(ce, le), t2 = t2.replace(ue, `\0`);
148
148
  let n2 = 0, r2 = t2.length;
149
149
  for (; t2.charAt(n2) === `\0`; ) n2++;
150
150
  if (n2 === r2) return [];
151
151
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
152
152
  return t2.slice(n2, r2).split(/\0/g);
153
153
  }
154
- var pe = (e6) => `validationError` in (e6.response?.data?.details ?? {});
155
- var me = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
156
- var he = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
157
- function ge(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
154
+ var fe = (e6) => `validationError` in (e6.response?.data?.details ?? {});
155
+ var pe = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
156
+ var me = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
157
+ function he(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
158
158
  if (typeof e6 != `object` || !e6) throw e6;
159
- if (pe(e6)) return _e(e6, t2, n2);
160
- if (me(e6)) return ve(e6);
161
- if (he(e6)) {
162
- 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 };
163
- return E(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
159
+ if (fe(e6)) return ge(e6, t2, n2);
160
+ if (pe(e6)) return _e(e6);
161
+ if (me(e6)) {
162
+ 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 };
163
+ return D(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
164
164
  }
165
- return ye(e6);
165
+ return ve(e6);
166
166
  }
167
- var _e = (e6, t2, n2) => {
168
- 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 };
169
- return E(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
167
+ var ge = (e6, t2, n2) => {
168
+ 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 };
169
+ return D(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
170
170
  };
171
- var E = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
172
- var ve = (e6) => {
173
- 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 };
174
- return E(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
171
+ var D = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
172
+ var _e = (e6) => {
173
+ 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 };
174
+ return D(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
175
175
  };
176
- 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 } } });
177
- var be = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
176
+ 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 } } });
177
+ var ye = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
178
178
  let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
179
179
  return r2?.filter((e7) => !r2.some((t3) => t3.field.length > e7.field.length && t3.field.startsWith(e7.field) && o2.includes(t3.field))).map((e7) => {
180
180
  let r3 = t2[e7.field];
181
- if (r3) return { ...e7, field: xe(r3, i2) };
181
+ if (r3) return { ...e7, field: be(r3, i2) };
182
182
  let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
183
183
  if (s2) {
184
184
  let t3 = a2[s2];
185
- if (t3) return { ...e7, field: e7.field.replace(s2, xe(t3, i2)) };
185
+ if (t3) return { ...e7, field: e7.field.replace(s2, be(t3, i2)) };
186
186
  }
187
187
  return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
188
188
  });
189
189
  };
190
- var xe = (e6, t2) => {
191
- let n2 = Se(e6);
190
+ var be = (e6, t2) => {
191
+ let n2 = xe(e6);
192
192
  return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
193
193
  };
194
- var Se = (e6) => {
194
+ var xe = (e6) => {
195
195
  let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
196
196
  return t2 && t2.groups && Number(t2.groups.argIndex);
197
197
  };
198
- function Ce(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
199
- return ae(() => e6({ request: async (e7) => {
198
+ function Se(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
199
+ return ie(() => e6({ request: async (e7) => {
200
200
  let i3 = e7({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
201
201
  a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
202
202
  let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? x : o3}${a3.url}`;
203
203
  a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
204
204
  try {
205
- let e8 = re(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e8 } }, s3 = await n2(u3, o4);
205
+ let e8 = ne(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e8 } }, s3 = await n2(u3, o4);
206
206
  if (s3.status !== 200) {
207
207
  let e9 = null;
208
208
  try {
209
209
  e9 = await s3.json();
210
210
  } catch {
211
211
  }
212
- let t3 = Te(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = ge(t3);
212
+ let t3 = we(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = he(t3);
213
213
  throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
214
214
  }
215
215
  let l3 = await s3.json();
@@ -219,18 +219,18 @@ function Ce(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
219
219
  }
220
220
  }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
221
221
  }
222
- var we = class extends Error {
222
+ var Ce = class extends Error {
223
223
  response;
224
224
  requestId;
225
225
  constructor(e6) {
226
226
  super(), this.response = e6.response, this.requestId = e6.requestId;
227
227
  }
228
228
  };
229
- 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 });
230
- var Ee = `.`;
231
- function De(e6, t2, n2) {
229
+ 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 });
230
+ var Te = `.`;
231
+ function Ee(e6, t2, n2) {
232
232
  if (e6 == null) throw Error(`Cannot set value on null or undefined`);
233
- let r2 = Oe(t2), i2 = e6;
233
+ let r2 = De(t2), i2 = e6;
234
234
  for (let e7 = 0; e7 < r2.length; e7++) {
235
235
  let t3 = r2[e7];
236
236
  if (e7 === r2.length - 1) {
@@ -242,21 +242,21 @@ function De(e6, t2, n2) {
242
242
  }
243
243
  return e6;
244
244
  }
245
- function Oe(e6) {
246
- return Array.isArray(e6) ? e6 : e6.split(Ee).map((e7) => ke(e7) ? Number(e7) : e7);
245
+ function De(e6) {
246
+ return Array.isArray(e6) ? e6 : e6.split(Te).map((e7) => Oe(e7) ? Number(e7) : e7);
247
247
  }
248
- function ke(e6) {
248
+ function Oe(e6) {
249
249
  return /^\d+$/.test(e6);
250
250
  }
251
- function Ae(e6) {
251
+ function ke(e6) {
252
252
  let t2 = {};
253
- for (let [n2, r2] of Object.entries(e6)) je(n2) || De(t2, Oe(n2), r2);
253
+ for (let [n2, r2] of Object.entries(e6)) Ae(n2) || Ee(t2, De(n2), r2);
254
254
  return t2;
255
255
  }
256
- function je(e6) {
256
+ function Ae(e6) {
257
257
  return e6 === `__proto__` || e6 === `constructor` || e6 === `prototype`;
258
258
  }
259
- var Me = class {
259
+ var je = class {
260
260
  BRACKET_PATTERN = /\[(\d+)\]/g;
261
261
  NUMERIC_PATTERN = /^\d+$/;
262
262
  ESCAPED_DOT_PATTERN = /\\\./g;
@@ -279,7 +279,7 @@ var Me = class {
279
279
  return e6.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
280
280
  }
281
281
  unflatten() {
282
- return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])), Ae(this.cleanedModifiedFields);
282
+ return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])), ke(this.cleanedModifiedFields);
283
283
  }
284
284
  flatten(e6) {
285
285
  let t2 = {};
@@ -299,12 +299,12 @@ var Me = class {
299
299
  if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
300
300
  r2.push(`[${e7}]`), n2 = n2[parseInt(e7, 10)];
301
301
  }, a2 = (e7, t3) => {
302
- let i3 = e7 in oe ? oe[e7] : void 0;
302
+ let i3 = e7 in ae ? ae[e7] : void 0;
303
303
  if (i3 && i3 in t3) {
304
304
  r2.push(i3), n2 = t3[i3];
305
305
  return;
306
306
  }
307
- let a3 = Ie(e7);
307
+ let a3 = Fe(e7);
308
308
  if (a3 && a3 in t3) r2.push(a3), n2 = t3[a3];
309
309
  else throw Error(`Cannot find key '${e7}' or its transformations at path ${this.buildPathString(r2)}`);
310
310
  }, o2 = (e7, t3) => {
@@ -328,28 +328,28 @@ var Me = class {
328
328
  return e6.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e6[r2 - 1] === `\\` ? t2 : `.` + n2);
329
329
  }
330
330
  };
331
- function Ne(e6, t2) {
331
+ function Me(e6, t2) {
332
332
  let n2 = e6?.modifiedFields;
333
333
  if (!n2) return null;
334
- let r2 = Pe(n2);
334
+ let r2 = Ne(n2);
335
335
  if (!r2) return null;
336
336
  let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
337
337
  e6 = { ...e6, modifiedFields: i2 };
338
338
  let o2 = t2(e6), s2 = o2?.modifiedFields;
339
339
  if (!s2) return null;
340
- let c2 = Fe(s2, a2);
340
+ let c2 = Pe(s2, a2);
341
341
  return c2 === null ? null : (o2.modifiedFields = c2, o2);
342
342
  }
343
- function Pe(e6) {
343
+ function Ne(e6) {
344
344
  if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
345
- let t2 = new Me(e6);
345
+ let t2 = new je(e6);
346
346
  return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
347
347
  } catch {
348
348
  return null;
349
349
  }
350
350
  return null;
351
351
  }
352
- function Fe(e6, t2) {
352
+ function Pe(e6, t2) {
353
353
  if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
354
354
  return t2.flatten(e6);
355
355
  } catch {
@@ -357,10 +357,10 @@ function Fe(e6, t2) {
357
357
  }
358
358
  return null;
359
359
  }
360
- function Ie(e6) {
360
+ function Fe(e6) {
361
361
  return e6.replace(/[-_\s]+(.)?/g, (e7, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e7) => e7.toLowerCase());
362
362
  }
363
- function Le() {
363
+ function Ie() {
364
364
  return { emit(e6, ...t2) {
365
365
  for (let n2 = 0, r2 = this.events[e6] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
366
366
  }, events: {}, on(e6, t2) {
@@ -369,8 +369,8 @@ function Le() {
369
369
  };
370
370
  } };
371
371
  }
372
- var Re = (e6) => e6.__type === `event-definition`;
373
- function ze(e6, t2, n2, r2) {
372
+ var Le = (e6) => e6.__type === `event-definition`;
373
+ function Re(e6, t2, n2, r2) {
374
374
  let i2;
375
375
  if (e6.isDomainEvent) {
376
376
  let { deletedEvent: e7, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
@@ -381,14 +381,14 @@ function ze(e6, t2, n2, r2) {
381
381
  let e7 = s2.modifiedFields;
382
382
  if (typeof e7 == `object` && e7 && !Array.isArray(e7)) {
383
383
  o2 = structuredClone(i2);
384
- let e8 = Ne(s2, a2);
384
+ let e8 = Me(s2, a2);
385
385
  if (e8) return t2(e8);
386
386
  }
387
387
  }
388
388
  return t2(a2(o2));
389
389
  }
390
- function Be(e6) {
391
- let t2 = /* @__PURE__ */ new Map(), n2 = Le();
390
+ function ze(e6) {
391
+ let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
392
392
  return { initModule(e7) {
393
393
  return (r2) => {
394
394
  let i2 = t2.get(e7.type) ?? [];
@@ -398,7 +398,7 @@ function Be(e6) {
398
398
  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 }))];
399
399
  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(`, `)}`);
400
400
  let l2 = t2.get(r2) ?? [];
401
- 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 };
401
+ 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 };
402
402
  }, async processRequest(e7, t3) {
403
403
  let n3 = await e7.text();
404
404
  return this.process(n3, t3);
@@ -417,12 +417,12 @@ function Be(e6) {
417
417
  let n3 = Array.from(t2.keys()).map((e8) => ({ type: e8 }));
418
418
  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(`, `)}`);
419
419
  let r2 = t2.get(e7.eventType) ?? [];
420
- await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => ze(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
420
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Re(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
421
421
  }, apps: { AppInstalled: g(`AppInstalled`)(), AppRemoved: g(`AppRemoved`)() } } };
422
422
  }
423
- var Ve = (e6) => e6.__type === `service-plugin-definition`;
424
- function He(e6) {
425
- let t2 = /* @__PURE__ */ new Map(), n2 = Le();
423
+ var Be = (e6) => e6.__type === `service-plugin-definition`;
424
+ function Ve(e6) {
425
+ let t2 = /* @__PURE__ */ new Map(), n2 = Ie();
426
426
  return { initModule(e7) {
427
427
  return (r2) => {
428
428
  let i2 = t2.get(e7.componentType.toLowerCase()) ?? [];
@@ -463,43 +463,43 @@ function He(e6) {
463
463
  return s2.transformations.toREST(await c2(s2.transformations.fromREST(e7)));
464
464
  } } };
465
465
  }
466
- var D = `X-Wix-Consistent`;
467
- function Ue(e6) {
466
+ var O = `X-Wix-Consistent`;
467
+ function He(e6) {
468
468
  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) => {
469
- 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?.();
469
+ 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?.();
470
470
  try {
471
471
  if (typeof n3 == `string` || n3 instanceof URL) {
472
472
  let e7 = await i3(n3, { ...r3, headers: c3 });
473
473
  l3?.handleError(e7, { requestOptions: { url: n3.toString(), method: r3?.method } });
474
- let a3 = We(e7);
475
- return a3 && (t2[D] = a3), e7;
474
+ let a3 = Ue(e7);
475
+ return a3 && (t2[O] = a3), e7;
476
476
  }
477
477
  {
478
478
  for (let [e8, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e8, t3);
479
479
  let e7 = await i3(n3, r3);
480
480
  l3?.handleError(e7, { requestOptions: { url: n3.url, method: r3?.method } });
481
- let a3 = We(e7);
482
- return a3 && (t2[D] = a3), e7;
481
+ let a3 = Ue(e7);
482
+ return a3 && (t2[O] = a3), e7;
483
483
  }
484
484
  } catch (e7) {
485
485
  throw l3?.handleError(e7, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e7;
486
486
  }
487
- }, { client: c2, initModule: l2 } = He(i2), { client: u2, initModule: d2 } = Be(i2), f2 = async (n3, r3) => {
488
- 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);
489
- return u3 && (t2[D] = u3), l3;
487
+ }, { client: c2, initModule: l2 } = Ve(i2), { client: u2, initModule: d2 } = ze(i2), f2 = async (n3, r3) => {
488
+ 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);
489
+ return u3 && (t2[O] = u3), l3;
490
490
  }, p2 = (t3, n3) => {
491
- if (Re(t3)) return d2(t3);
492
- if (Ve(t3)) return l2(t3);
493
- if (T(t3) && e6.host) return te(t3, e6.host);
491
+ if (Le(t3)) return d2(t3);
492
+ if (Be(t3)) return l2(t3);
493
+ if (E(t3) && e6.host) return ee(t3, e6.host);
494
494
  if (typeof t3 == `function`) {
495
495
  if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
496
496
  let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e6.useCDN === void 0 ? i2().shouldUseCDN : e6.useCDN;
497
- return Ce(ae(() => y(t3)) ? v(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
497
+ return Se(ie(() => y(t3)) ? v(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
498
498
  let n4 = new URL(e7, `https://${r3}`);
499
499
  return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
500
500
  }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e6.host?.name, o3, e6.validateRequestSchema);
501
501
  }
502
- return w(t3) ? Object.fromEntries(Object.entries(t3).map(([e7, n4]) => [e7, p2(n4, t3[b])])) : t3;
502
+ return T(t3) ? Object.fromEntries(Object.entries(t3).map(([e7, n4]) => [e7, p2(n4, t3[b])])) : t3;
503
503
  }, m2 = (e7) => {
504
504
  for (let n3 in e7) t2[n3] = e7[n3];
505
505
  };
@@ -518,22 +518,22 @@ function Ue(e6) {
518
518
  return { data: o3 ?? {}, errors: s3 };
519
519
  }, webhooks: u2, servicePlugins: c2 };
520
520
  }
521
- function We(e6) {
521
+ function Ue(e6) {
522
522
  return e6.headers?.get(`X-Wix-Consistent`) ?? e6.headers?.get(`x-wix-consistent`);
523
523
  }
524
- var Ge = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
525
- var Ke = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
526
- var qe = `items`;
527
- var Je = `pagingMetadata`;
528
- var Ye = Ge;
529
- function Xe(e6, t2) {
524
+ var We = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
525
+ var Ge = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
526
+ var Ke = `items`;
527
+ var qe = `pagingMetadata`;
528
+ var Je = We;
529
+ function Ye(e6, t2) {
530
530
  return e6?.split(`.`).map((e7) => t2?.[e7] ?? e7).join(`.`);
531
531
  }
532
- var Ze = `sort.fieldName`;
533
- function Qe(e6, t2, n2) {
534
- return (e6 === Ze || e6.endsWith(`.${Ze}`)) && typeof t2 == `string` ? Xe(t2, n2) : t2;
532
+ var Xe = `sort.fieldName`;
533
+ function Ze(e6, t2, n2) {
534
+ return (e6 === Xe || e6.endsWith(`.${Xe}`)) && typeof t2 == `string` ? Ye(t2, n2) : t2;
535
535
  }
536
- function $e(e6, t2, n2) {
536
+ function Qe(e6, t2, n2) {
537
537
  let r2 = (e7) => n2.includes(e7), i2 = (e7, n3) => {
538
538
  if (Array.isArray(e7)) e7.forEach((e8) => {
539
539
  i2(e8, n3);
@@ -543,22 +543,22 @@ function $e(e6, t2, n2) {
543
543
  Object.keys(a2).forEach((e8) => {
544
544
  let o2 = n3 === `` ? e8 : `${n3}.${e8}`;
545
545
  if (r2(o2)) return;
546
- let s2 = et(e8, t2);
547
- s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] = Qe(o2, a2[s2], t2), i2(a2[s2], o2);
546
+ let s2 = $e(e8, t2);
547
+ s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] = Ze(o2, a2[s2], t2), i2(a2[s2], o2);
548
548
  });
549
549
  }
550
550
  };
551
551
  return i2(e6, ``), e6;
552
552
  }
553
- function et(e6, t2) {
553
+ function $e(e6, t2) {
554
554
  let n2;
555
555
  return n2 = e6.includes(`.`) ? e6.split(`.`).map((e7) => t2[e7] ?? e7).join(`.`) : t2[e6] ?? e6, n2;
556
556
  }
557
- function O(e6, t2 = []) {
558
- return $e(e6, Ge, t2);
559
- }
560
557
  function k(e6, t2 = []) {
561
- return $e(e6, Ke, t2);
558
+ return Qe(e6, We, t2);
559
+ }
560
+ function et(e6, t2 = []) {
561
+ return Qe(e6, Ge, t2);
562
562
  }
563
563
  function tt(e6) {
564
564
  return e6?.toISOString();
@@ -589,101 +589,101 @@ function ct(e6) {
589
589
  let t2 = rt.get(e6);
590
590
  return t2 || (t2 = st(e6), rt.set(e6, t2)), t2;
591
591
  }
592
- function A(e6) {
592
+ function lt(e6) {
593
593
  return typeof e6 == `object` && !!e6;
594
594
  }
595
- function lt(e6, { isRepeated: t2, isMap: n2 }, r2) {
596
- 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);
595
+ function ut(e6, { isRepeated: t2, isMap: n2 }, r2) {
596
+ 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);
597
597
  }
598
- function j(e6, t2, n2) {
599
- A(e6) && ft(e6, t2, n2);
598
+ function dt(e6, t2, n2) {
599
+ lt(e6) && mt(e6, t2, n2);
600
600
  }
601
- function ut(e6, t2, n2) {
601
+ function ft(e6, t2, n2) {
602
602
  for (let [r2, i2] of t2) {
603
603
  if (!(r2 in e6)) continue;
604
- if (i2.leaves) for (let t4 of i2.leaves) e6[r2] = lt(e6[r2], t4, n2);
604
+ if (i2.leaves) for (let t4 of i2.leaves) e6[r2] = ut(e6[r2], t4, n2);
605
605
  let t3 = e6[r2];
606
- Array.isArray(t3) ? t3.forEach((e7) => j(e7, i2, n2)) : j(t3, i2, n2);
606
+ Array.isArray(t3) ? t3.forEach((e7) => dt(e7, i2, n2)) : dt(t3, i2, n2);
607
607
  }
608
608
  }
609
- function dt(e6, t2, n2) {
609
+ function pt(e6, t2, n2) {
610
610
  for (let [r2, i2] of t2) {
611
611
  let t3 = e6[r2];
612
- A(t3) && Object.values(t3).forEach((e7) => j(e7, i2, n2));
612
+ lt(t3) && Object.values(t3).forEach((e7) => dt(e7, i2, n2));
613
613
  }
614
614
  }
615
- function ft(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
616
- t2 && ut(e6, t2, i2), n2 && dt(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => j(e7, r2, i2));
615
+ function mt(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
616
+ t2 && ft(e6, t2, i2), n2 && pt(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => dt(e7, r2, i2));
617
617
  }
618
- function M(e6, t2) {
619
- if (!A(e6)) return e6;
620
- for (let { paths: n2, transformFn: r2 } of t2) ft(e6, ct(n2), r2);
618
+ function A(e6, t2) {
619
+ if (!lt(e6)) return e6;
620
+ for (let { paths: n2, transformFn: r2 } of t2) mt(e6, ct(n2), r2);
621
621
  return e6;
622
622
  }
623
- function pt(e6) {
624
- return vt(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
623
+ function ht(e6) {
624
+ return bt(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
625
625
  }
626
- var mt = /([\p{Ll}\d])(\p{Lu})/gu;
627
- var ht = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
628
- var gt = `$1\0$2`;
629
- var _t = /[^\p{L}\d]+/giu;
630
- function vt(e6) {
626
+ var gt = /([\p{Ll}\d])(\p{Lu})/gu;
627
+ var _t = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
628
+ var vt = `$1\0$2`;
629
+ var yt = /[^\p{L}\d]+/giu;
630
+ function bt(e6) {
631
631
  let t2 = e6.trim();
632
- t2 = t2.replace(mt, gt).replace(ht, gt), t2 = t2.replace(_t, `\0`);
632
+ t2 = t2.replace(gt, vt).replace(_t, vt), t2 = t2.replace(yt, `\0`);
633
633
  let n2 = 0, r2 = t2.length;
634
634
  for (; t2.charAt(n2) === `\0`; ) n2++;
635
635
  if (n2 === r2) return [];
636
636
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
637
637
  return t2.slice(n2, r2).split(/\0/g);
638
638
  }
639
- var yt = (e6) => `validationError` in (e6.response?.data?.details ?? {});
640
- var bt = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
641
- var xt = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
642
- function N(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
639
+ var xt = (e6) => `validationError` in (e6.response?.data?.details ?? {});
640
+ var St = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
641
+ var Ct = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
642
+ function j(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
643
643
  if (typeof e6 != `object` || !e6) throw e6;
644
- if (yt(e6)) return St(e6, t2, n2);
645
- if (bt(e6)) return wt(e6);
646
- if (xt(e6)) {
647
- 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 };
648
- return Ct(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
644
+ if (xt(e6)) return wt(e6, t2, n2);
645
+ if (St(e6)) return Tt(e6);
646
+ if (Ct(e6)) {
647
+ 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 };
648
+ return M(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
649
649
  }
650
- return Tt(e6);
650
+ return Et(e6);
651
651
  }
652
- var St = (e6, t2, n2) => {
653
- 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 };
654
- return Ct(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
652
+ var wt = (e6, t2, n2) => {
653
+ 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 };
654
+ return M(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
655
655
  };
656
- var Ct = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
657
- var wt = (e6) => {
658
- 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 };
659
- return Ct(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
656
+ var M = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
657
+ var Tt = (e6) => {
658
+ 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 };
659
+ return M(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
660
660
  };
661
- 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 } } });
662
- var Et = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
661
+ 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 } } });
662
+ var Dt = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
663
663
  let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
664
664
  return r2?.filter((e7) => !r2.some((t3) => t3.field.length > e7.field.length && t3.field.startsWith(e7.field) && o2.includes(t3.field))).map((e7) => {
665
665
  let r3 = t2[e7.field];
666
- if (r3) return { ...e7, field: Dt(r3, i2) };
666
+ if (r3) return { ...e7, field: Ot(r3, i2) };
667
667
  let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
668
668
  if (s2) {
669
669
  let t3 = a2[s2];
670
- if (t3) return { ...e7, field: e7.field.replace(s2, Dt(t3, i2)) };
670
+ if (t3) return { ...e7, field: e7.field.replace(s2, Ot(t3, i2)) };
671
671
  }
672
672
  return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
673
673
  });
674
674
  };
675
- var Dt = (e6, t2) => {
676
- let n2 = Ot(e6);
675
+ var Ot = (e6, t2) => {
676
+ let n2 = kt(e6);
677
677
  return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
678
678
  };
679
- var Ot = (e6) => {
679
+ var kt = (e6) => {
680
680
  let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
681
681
  return t2 && t2.groups && Number(t2.groups.argIndex);
682
682
  };
683
- function kt() {
683
+ function At() {
684
684
  let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
685
685
  if (e6) return { initWixModules(t3, n3) {
686
- return At(() => e6(t3, n3));
686
+ return jt(() => e6(t3, n3));
687
687
  }, fetchWithAuth() {
688
688
  throw Error(`fetchWithAuth is not available in this context`);
689
689
  }, graphql() {
@@ -693,10 +693,10 @@ function kt() {
693
693
  if (t2 || n2) return { initWixModules(e7, r2) {
694
694
  if (r2) {
695
695
  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`);
696
- return At(() => n2.use(e7));
696
+ return jt(() => n2.use(e7));
697
697
  }
698
698
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
699
- return At(() => t2.use(e7));
699
+ return jt(() => t2.use(e7));
700
700
  }, fetchWithAuth: (e7, n3) => {
701
701
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
702
702
  return t2.fetchWithAuth(e7, n3);
@@ -708,7 +708,7 @@ function kt() {
708
708
  return t2.graphql(e7, n3, r2);
709
709
  } };
710
710
  }
711
- function At(e6) {
711
+ function jt(e6) {
712
712
  let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
713
713
  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);
714
714
  try {
@@ -717,14 +717,14 @@ function At(e6) {
717
717
  globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
718
718
  }
719
719
  }
720
- function jt(e6, t2) {
720
+ function Mt(e6, t2) {
721
721
  return (...n2) => {
722
- let r2 = kt();
722
+ let r2 = At();
723
723
  return r2 ? r2.initWixModules(e6, t2).apply(void 0, n2) : e6.apply(void 0, n2);
724
724
  };
725
725
  }
726
- function Mt(e6, t2 = false) {
727
- return jt(e6, t2);
726
+ function N(e6, t2 = false) {
727
+ return Mt(e6, t2);
728
728
  }
729
729
  function Nt(e6, t2) {
730
730
  let n2 = Ft(e6), r2 = Object.entries(n2).some(([e7, t3]) => e7.includes(`.`) || Array.isArray(t3) && t3.some((e8) => typeof e8 == `object`));
@@ -891,7 +891,7 @@ var mn = `x-wix-linguist`;
891
891
  var hn = `00000000-0000-0000-0000-000000000000`;
892
892
  var gn = `false`;
893
893
  var _n = () => {
894
- let e6 = bn(`language`), t2 = bn(`locale`);
894
+ let e6 = P(`language`), t2 = P(`locale`);
895
895
  if (e6) return { [mn]: [e6, t2 || e6, gn, hn].join(`|`) };
896
896
  };
897
897
  function vn() {
@@ -901,15 +901,15 @@ function vn() {
901
901
  }), resolve: e6, reject: t2 };
902
902
  }
903
903
  var yn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
904
- var bn = (e6) => yn()?.[e6];
905
- var xn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
906
- let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = Cn();
907
- return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: bn(`language`), locale: bn(`locale`), get passThroughHeaders() {
904
+ var P = (e6) => yn()?.[e6];
905
+ var bn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
906
+ let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = Sn();
907
+ return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: P(`language`), locale: P(`locale`), get passThroughHeaders() {
908
908
  return _n();
909
909
  } } };
910
910
  }, auth: (e7) => {
911
911
  let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
912
- !e7 && Sn() && (e7 = t2?.getAccessTokenFunction?.());
912
+ !e7 && xn() && (e7 = t2?.getAccessTokenFunction?.());
913
913
  let n2 = false, { resolve: r2, promise: i2 } = vn();
914
914
  return { getAuthHeaders: async () => {
915
915
  if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
@@ -918,60 +918,60 @@ var xn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host:
918
918
  r2(e8);
919
919
  }) };
920
920
  } });
921
- function Sn() {
921
+ function xn() {
922
922
  return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
923
923
  }
924
- function Cn() {
924
+ function Sn() {
925
925
  let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
926
926
  if (!e6) return;
927
927
  let t2 = new URL(e6);
928
928
  return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
929
929
  }
930
- var wn = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
930
+ var Cn = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
931
931
  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`);
932
932
  return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
933
933
  }, getAccessToken: () => {
934
934
  throw Error(`Not implemented`);
935
935
  }, observeState: () => ({ disconnect: () => {
936
936
  } }) });
937
- var Tn = xn({ createHost: function(e6) {
937
+ var wn = bn({ createHost: function(e6) {
938
938
  let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
939
939
  if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
940
- return { channel: wn({ clientSdk: t2, applicationId: n2 }), close: () => {
940
+ return { channel: Cn({ clientSdk: t2, applicationId: n2 }), close: () => {
941
941
  } };
942
942
  } });
943
- var En = (e6, t2) => {
944
- let n2 = Tn.host({ applicationId: e6, componentId: t2 }), r2 = Tn.auth();
945
- return Ue({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
946
- };
947
- var Dn = (e6) => En(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
948
- var On = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
949
- var kn = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
950
- function An(e6, t2, { feature: n2, action: r2, level: i2 = `error`, tags: a2, contexts: o2 }) {
951
- let s2 = kn(e6, `captureException`);
943
+ var Tn = (e6, t2) => {
944
+ let n2 = wn.host({ applicationId: e6, componentId: t2 }), r2 = wn.auth();
945
+ return He({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
946
+ };
947
+ var En = (e6) => Tn(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
948
+ var Dn = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
949
+ var On = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
950
+ function kn(e6, t2, { feature: n2, action: r2, level: i2 = `error`, tags: a2, contexts: o2 }) {
951
+ let s2 = On(e6, `captureException`);
952
952
  if (!s2) return;
953
953
  let c2 = t2 instanceof Error ? t2 : Error(String(t2));
954
954
  s2.captureException(c2, { level: i2, tags: { feature: n2, action: r2, ...a2 }, ...o2 ? { contexts: o2 } : {} });
955
955
  }
956
- function jn(e6) {
956
+ function An(e6) {
957
957
  return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
958
958
  }
959
- function Mn(e6) {
959
+ function jn(e6) {
960
960
  return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
961
961
  }
962
- function Nn(e6) {
962
+ function Mn(e6) {
963
963
  return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
964
964
  }
965
- function P(e6, t2) {
966
- 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]] };
965
+ function F(e6, t2) {
966
+ 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]] };
967
967
  }
968
- function Pn(e6, t2) {
969
- 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]] };
968
+ function Nn(e6, t2) {
969
+ 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]] };
970
970
  }
971
- function Fn(e6) {
972
- if (e6 !== void 0 && Object.keys(e6).length !== 0) return Nn(e6) ? e6.$not : { $not: e6 };
971
+ function Pn(e6) {
972
+ if (e6 !== void 0 && Object.keys(e6).length !== 0) return Mn(e6) ? e6.$not : { $not: e6 };
973
973
  }
974
- var In = class {
974
+ var Fn = class {
975
975
  _items;
976
976
  _fetchNextPage;
977
977
  _fetchPrevPage;
@@ -1001,7 +1001,7 @@ var In = class {
1001
1001
  return await this._fetchPrevPage();
1002
1002
  }
1003
1003
  };
1004
- var Ln = class extends In {
1004
+ var In = class extends Fn {
1005
1005
  _nextCursor;
1006
1006
  _prevCursor;
1007
1007
  cursors;
@@ -1015,7 +1015,7 @@ var Ln = class extends In {
1015
1015
  return !!this._prevCursor;
1016
1016
  }
1017
1017
  };
1018
- var Rn = class extends In {
1018
+ var Ln = class extends Fn {
1019
1019
  _totalCount;
1020
1020
  _offset;
1021
1021
  _tooManyToCount;
@@ -1038,76 +1038,76 @@ var Rn = class extends In {
1038
1038
  return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
1039
1039
  }
1040
1040
  };
1041
- function zn(e6) {
1041
+ function Rn(e6) {
1042
1042
  let t2 = (n2) => ({ query: n2, async find() {
1043
1043
  try {
1044
- 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);
1044
+ 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);
1045
1045
  if (e6.pagingMethod === `OFFSET`) {
1046
1046
  let e7 = n2;
1047
- 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 });
1047
+ 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 });
1048
1048
  }
1049
1049
  let s2 = n2.cursorPaging;
1050
- 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 });
1050
+ 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 });
1051
1051
  } catch (t3) {
1052
1052
  throw e6.errorTransformer(t3);
1053
1053
  }
1054
1054
  }, skipTo(e7) {
1055
1055
  return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
1056
1056
  }, eq(r2, i2) {
1057
- let a2 = i2 === void 0 ? null : i2, o2 = { [F(e6.transformationPaths, r2)]: a2 };
1058
- return t2({ ...n2, filter: P(n2.filter, o2) });
1057
+ let a2 = i2 === void 0 ? null : i2, o2 = { [I(e6.transformationPaths, r2)]: a2 };
1058
+ return t2({ ...n2, filter: F(n2.filter, o2) });
1059
1059
  }, ne(r2, i2) {
1060
- let a2 = i2 === void 0 ? null : i2, o2 = { [F(e6.transformationPaths, r2)]: { $ne: a2 } };
1061
- return t2({ ...n2, filter: P(n2.filter, o2) });
1060
+ let a2 = i2 === void 0 ? null : i2, o2 = { [I(e6.transformationPaths, r2)]: { $ne: a2 } };
1061
+ return t2({ ...n2, filter: F(n2.filter, o2) });
1062
1062
  }, ge(r2, i2) {
1063
- let a2 = { [F(e6.transformationPaths, r2)]: { $gte: i2 } };
1064
- return t2({ ...n2, filter: P(n2.filter, a2) });
1063
+ let a2 = { [I(e6.transformationPaths, r2)]: { $gte: i2 } };
1064
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1065
1065
  }, gt(r2, i2) {
1066
- let a2 = { [F(e6.transformationPaths, r2)]: { $gt: i2 } };
1067
- return t2({ ...n2, filter: P(n2.filter, a2) });
1066
+ let a2 = { [I(e6.transformationPaths, r2)]: { $gt: i2 } };
1067
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1068
1068
  }, le(r2, i2) {
1069
- let a2 = { [F(e6.transformationPaths, r2)]: { $lte: i2 } };
1070
- return t2({ ...n2, filter: P(n2.filter, a2) });
1069
+ let a2 = { [I(e6.transformationPaths, r2)]: { $lte: i2 } };
1070
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1071
1071
  }, lt(r2, i2) {
1072
- let a2 = { [F(e6.transformationPaths, r2)]: { $lt: i2 } };
1073
- return t2({ ...n2, filter: P(n2.filter, a2) });
1072
+ let a2 = { [I(e6.transformationPaths, r2)]: { $lt: i2 } };
1073
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1074
1074
  }, isNotEmpty(e7) {
1075
1075
  return this.ne(e7, null);
1076
1076
  }, isEmpty(e7) {
1077
1077
  return this.eq(e7, null);
1078
1078
  }, startsWith(r2, i2) {
1079
- let a2 = { [F(e6.transformationPaths, r2)]: { $startsWith: i2 } };
1080
- return t2({ ...n2, filter: P(n2.filter, a2) });
1079
+ let a2 = { [I(e6.transformationPaths, r2)]: { $startsWith: i2 } };
1080
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1081
1081
  }, endsWith(r2, i2) {
1082
- let a2 = { [F(e6.transformationPaths, r2)]: { $endsWith: i2 } };
1083
- return t2({ ...n2, filter: P(n2.filter, a2) });
1082
+ let a2 = { [I(e6.transformationPaths, r2)]: { $endsWith: i2 } };
1083
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1084
1084
  }, contains(r2, i2) {
1085
- let a2 = { [F(e6.transformationPaths, r2)]: { $contains: i2 } };
1086
- return t2({ ...n2, filter: P(n2.filter, a2) });
1085
+ let a2 = { [I(e6.transformationPaths, r2)]: { $contains: i2 } };
1086
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1087
1087
  }, hasSome(r2, ...i2) {
1088
- let a2 = { [F(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
1089
- return t2({ ...n2, filter: P(n2.filter, a2) });
1088
+ let a2 = { [I(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
1089
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1090
1090
  }, hasAll(r2, ...i2) {
1091
- let a2 = { [F(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
1092
- return t2({ ...n2, filter: P(n2.filter, a2) });
1091
+ let a2 = { [I(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
1092
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1093
1093
  }, between(e7, t3, n3) {
1094
1094
  return this.ge(e7, t3).lt(e7, n3);
1095
1095
  }, in(r2, i2) {
1096
- let a2 = { [F(e6.transformationPaths, r2)]: { $in: i2 } };
1097
- return t2({ ...n2, filter: P(n2.filter, a2) });
1096
+ let a2 = { [I(e6.transformationPaths, r2)]: { $in: i2 } };
1097
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1098
1098
  }, exists(r2, i2 = true) {
1099
- let a2 = { [F(e6.transformationPaths, r2)]: { $exists: i2 } };
1100
- return t2({ ...n2, filter: P(n2.filter, a2) });
1099
+ let a2 = { [I(e6.transformationPaths, r2)]: { $exists: i2 } };
1100
+ return t2({ ...n2, filter: F(n2.filter, a2) });
1101
1101
  }, or(e7) {
1102
- return t2({ ...n2, filter: Pn(n2.filter, e7.query.filter) });
1102
+ return t2({ ...n2, filter: Nn(n2.filter, e7.query.filter) });
1103
1103
  }, and(e7) {
1104
- return t2({ ...n2, filter: P(n2.filter, e7.query.filter) });
1104
+ return t2({ ...n2, filter: F(n2.filter, e7.query.filter) });
1105
1105
  }, not(e7) {
1106
- return t2({ ...n2, filter: Fn(e7.query.filter) });
1106
+ return t2({ ...n2, filter: Pn(e7.query.filter) });
1107
1107
  }, ascending(...r2) {
1108
- return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: F(e6.transformationPaths, t3), order: `ASC` }))] });
1108
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: I(e6.transformationPaths, t3), order: `ASC` }))] });
1109
1109
  }, descending(...r2) {
1110
- return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: F(e6.transformationPaths, t3), order: `DESC` }))] });
1110
+ return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: I(e6.transformationPaths, t3), order: `DESC` }))] });
1111
1111
  }, skip(e7) {
1112
1112
  return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
1113
1113
  }, limit(r2) {
@@ -1120,84 +1120,84 @@ function zn(e6) {
1120
1120
  } });
1121
1121
  return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
1122
1122
  }
1123
- function F(e6, t2) {
1123
+ function I(e6, t2) {
1124
1124
  let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
1125
- return n2 ? t2.replace(n2, e6[n2]) : Xe(t2, { ...e6, ...Ye });
1126
- }
1127
- var Bn = `filter`;
1128
- var Vn = `sort`;
1129
- var Hn = `cursorPaging`;
1130
- var Un = `paging`;
1131
- var Wn = [Bn, Vn, Hn];
1132
- var Gn = [Bn, Vn, Un];
1133
- function Kn(e6, t2) {
1125
+ return n2 ? t2.replace(n2, e6[n2]) : Ye(t2, { ...e6, ...Je });
1126
+ }
1127
+ var zn = `filter`;
1128
+ var Bn = `sort`;
1129
+ var Vn = `cursorPaging`;
1130
+ var Hn = `paging`;
1131
+ var Un = [zn, Bn, Vn];
1132
+ var Wn = [zn, Bn, Hn];
1133
+ function Gn(e6, t2) {
1134
1134
  return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
1135
1135
  }
1136
+ function Kn(e6) {
1137
+ return Gn(e6, Un);
1138
+ }
1136
1139
  function qn(e6) {
1137
- return Kn(e6, Wn);
1140
+ return Gn(e6, Wn);
1138
1141
  }
1139
1142
  function Jn(e6) {
1140
- return Kn(e6, Gn);
1141
- }
1142
- function Yn(e6) {
1143
1143
  let { hasOptionsParameter: t2 } = e6;
1144
1144
  return function(...n2) {
1145
- return t2 ? Zn(n2, e6) : Xn(n2, e6);
1145
+ return t2 ? Xn(n2, e6) : Yn(n2, e6);
1146
1146
  };
1147
1147
  }
1148
- function Xn(e6, t2) {
1148
+ function Yn(e6, t2) {
1149
1149
  return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
1150
1150
  }
1151
- function Zn(e6, t2) {
1151
+ function Xn(e6, t2) {
1152
1152
  switch (e6.length) {
1153
1153
  case 0:
1154
1154
  return t2.builderQueryFunction();
1155
1155
  case 1:
1156
- return qn(e6[0]) || Jn(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
1156
+ return Kn(e6[0]) || qn(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
1157
1157
  default:
1158
1158
  return t2.typedQueryFunction(e6[0], e6[1]);
1159
1159
  }
1160
1160
  }
1161
- var Qn = [{ path: `like.createdDate` }];
1162
- var $n = [{ path: `likes.createdDate` }];
1163
- function er(e6) {
1161
+ var Zn = [{ path: `like.createdDate` }];
1162
+ var Qn = [{ path: `likes.createdDate` }];
1163
+ function $n(e6) {
1164
1164
  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` }] } }));
1165
1165
  }
1166
- var tr = `@wix/auto_sdk_blog_likes`;
1167
- function nr(e6) {
1166
+ var er = `@wix/auto_sdk_blog_likes`;
1167
+ function tr(e6) {
1168
1168
  function t2({ host: t3 }) {
1169
- let n2 = M(e6, [{ transformFn: tt, paths: Qn }]);
1170
- 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 }]) };
1169
+ let n2 = A(e6, [{ transformFn: tt, paths: Zn }]);
1170
+ 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 }]) };
1171
1171
  }
1172
1172
  return t2;
1173
1173
  }
1174
- function rr(e6) {
1174
+ function nr(e6) {
1175
1175
  function t2({ host: t3 }) {
1176
- 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 }]) };
1176
+ 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 }]) };
1177
1177
  }
1178
1178
  return t2;
1179
1179
  }
1180
- function ir(e6) {
1180
+ function rr(e6) {
1181
1181
  function t2({ host: t3 }) {
1182
- 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) };
1182
+ 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) };
1183
1183
  }
1184
1184
  return t2;
1185
1185
  }
1186
- async function ar(e6) {
1187
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = nr(O({ like: e6?.like }));
1186
+ async function ir(e6) {
1187
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = tr(k({ like: e6?.like }));
1188
1188
  n2?.onSiteCall?.();
1189
1189
  try {
1190
1190
  let e7 = await t2.request(r2);
1191
- return n2?.onSuccess?.(e7), k(e7.data)?.like;
1191
+ return n2?.onSuccess?.(e7), et(e7.data)?.like;
1192
1192
  } catch (e7) {
1193
- let t3 = N(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { like: `$[0].like` }, singleArgumentUnchanged: false }, [`options`]);
1193
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { like: `$[0].like` }, singleArgumentUnchanged: false }, [`options`]);
1194
1194
  throw n2?.onError?.(e7), t3;
1195
1195
  }
1196
1196
  }
1197
- function or() {
1197
+ function ar() {
1198
1198
  let { httpClient: e6, sideEffects: t2 } = arguments[0];
1199
- return zn({ func: async (n2) => {
1200
- let r2 = rr(n2);
1199
+ return Rn({ func: async (n2) => {
1200
+ let r2 = nr(n2);
1201
1201
  t2?.onSiteCall?.();
1202
1202
  try {
1203
1203
  let n3 = await e6.request(r2);
@@ -1207,208 +1207,231 @@ function or() {
1207
1207
  }
1208
1208
  }, requestTransformer: (e7) => {
1209
1209
  let t3 = [e7, {}];
1210
- return O({ ...t3?.[1], query: t3?.[0] });
1210
+ return k({ ...t3?.[1], query: t3?.[0] });
1211
1211
  }, responseTransformer: ({ data: e7 }) => {
1212
- let t3 = k(M(e7, []));
1212
+ let t3 = et(A(e7, []));
1213
1213
  return { items: t3?.likes, pagingMetadata: t3?.pagingMetadata };
1214
1214
  }, errorTransformer: (e7) => {
1215
- throw N(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1215
+ throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1216
1216
  }, pagingMethod: `CURSOR`, transformationPaths: {} });
1217
1217
  }
1218
- async function sr(e6) {
1219
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = rr(O({ query: e6 }));
1218
+ async function or(e6) {
1219
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = nr(k({ query: e6 }));
1220
1220
  n2?.onSiteCall?.();
1221
1221
  try {
1222
1222
  let e7 = await t2.request(r2);
1223
- return n2?.onSuccess?.(e7), k(e7.data);
1223
+ return n2?.onSuccess?.(e7), et(e7.data);
1224
1224
  } catch (e7) {
1225
- let t3 = N(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1225
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`]);
1226
1226
  throw n2?.onError?.(e7), t3;
1227
1227
  }
1228
1228
  }
1229
- async function cr(e6) {
1230
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ir(O({ fqdn: e6?.fqdn, entityId: e6?.entityId }));
1229
+ async function sr(e6) {
1230
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = rr(k({ fqdn: e6?.fqdn, entityId: e6?.entityId }));
1231
1231
  n2?.onSiteCall?.();
1232
1232
  try {
1233
1233
  let e7 = await t2.request(r2);
1234
1234
  n2?.onSuccess?.(e7);
1235
1235
  } catch (e7) {
1236
- let t3 = N(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { fqdn: `$[0].fqdn`, entityId: `$[0].entityId` }, singleArgumentUnchanged: false }, [`identifiers`]);
1236
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { fqdn: `$[0].fqdn`, entityId: `$[0].entityId` }, singleArgumentUnchanged: false }, [`identifiers`]);
1237
1237
  throw n2?.onError?.(e7), t3;
1238
1238
  }
1239
1239
  }
1240
+ function cr(e6) {
1241
+ return (t2) => ir(t2, { httpClient: e6 });
1242
+ }
1240
1243
  function lr(e6) {
1241
- return (t2) => ar(t2, { httpClient: e6 });
1244
+ return () => ar({ httpClient: e6 });
1242
1245
  }
1243
1246
  function ur(e6) {
1244
- return () => or({ httpClient: e6 });
1247
+ return (t2) => or(t2, { httpClient: e6 });
1245
1248
  }
1246
1249
  function dr(e6) {
1247
1250
  return (t2) => sr(t2, { httpClient: e6 });
1248
1251
  }
1249
1252
  function fr(e6) {
1250
- return (t2) => cr(t2, { httpClient: e6 });
1251
- }
1252
- function pr(e6) {
1253
- let t2 = Yn({ builderQueryFunction: () => ur(e6)(), typedQueryFunction: (t3) => dr(e6)(t3), hasOptionsParameter: false });
1253
+ let t2 = Jn({ builderQueryFunction: () => lr(e6)(), typedQueryFunction: (t3) => ur(e6)(t3), hasOptionsParameter: false });
1254
1254
  function n2(e7) {
1255
1255
  return t2(...arguments);
1256
1256
  }
1257
1257
  return n2;
1258
1258
  }
1259
- var mr = Mt(lr);
1260
- var hr = Mt(fr);
1261
- var gr = Mt(pr);
1262
- var _r = [{ path: `metrics.averageRating` }];
1263
- function vr(e6) {
1259
+ var pr = N(cr);
1260
+ var mr = N(dr);
1261
+ var hr = N(fr);
1262
+ var gr = [{ path: `metrics.averageRating` }];
1263
+ function _r(e6) {
1264
1264
  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` }] } }));
1265
1265
  }
1266
- var yr = `@wix/auto_sdk_blog_posts`;
1267
- function br(e6) {
1266
+ var vr = `@wix/auto_sdk_blog_posts`;
1267
+ function yr(e6) {
1268
1268
  function t2({ host: t3 }) {
1269
- 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 }]) };
1269
+ 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 }]) };
1270
1270
  }
1271
1271
  return t2;
1272
1272
  }
1273
- async function xr(e6) {
1274
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = br(O({ postId: e6 }, []));
1273
+ async function br(e6) {
1274
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = yr(k({ postId: e6 }, []));
1275
1275
  n2?.onSiteCall?.();
1276
1276
  try {
1277
1277
  let e7 = await t2.request(r2);
1278
- return n2?.onSuccess?.(e7), k(e7.data, []);
1278
+ return n2?.onSuccess?.(e7), et(e7.data, []);
1279
1279
  } catch (e7) {
1280
- let t3 = N(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { postId: `$[0]` }, singleArgumentUnchanged: false }, [`postId`]);
1280
+ let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { postId: `$[0]` }, singleArgumentUnchanged: false }, [`postId`]);
1281
1281
  throw n2?.onError?.(e7), t3;
1282
1282
  }
1283
1283
  }
1284
- function Sr(e6) {
1285
- return (t2) => xr(t2, { httpClient: e6 });
1284
+ function xr(e6) {
1285
+ return (t2) => br(t2, { httpClient: e6 });
1286
1286
  }
1287
- var Cr = Mt(Sr);
1288
- var wr = `wix.blog.v3.post`;
1289
- var Tr = async (e6) => {
1290
- await mr({ like: { entityId: e6, fqdn: wr } });
1287
+ var Sr = N(xr);
1288
+ var Cr = `wix.blog.v3.post`;
1289
+ var wr = async (e6) => {
1290
+ await pr({ like: { entityId: e6, fqdn: Cr } });
1291
1291
  };
1292
- var Er = async (e6) => {
1293
- await hr({ fqdn: wr, entityId: e6 });
1292
+ var Tr = async (e6) => {
1293
+ await mr({ fqdn: Cr, entityId: e6 });
1294
+ };
1295
+ var Er = 100;
1296
+ var L;
1297
+ var Dr = (e6) => {
1298
+ let t2 = [...e6.keys()];
1299
+ for (let n2 = 0; n2 < t2.length; n2 += Er) {
1300
+ let r2 = t2.slice(n2, n2 + Er);
1301
+ hr().eq(`fqdn`, Cr).in(`entityId`, r2).limit(r2.length).find().then(({ items: t3 }) => {
1302
+ let n3 = new Set(t3.map((e7) => e7.entityId));
1303
+ for (let t4 of r2) e6.get(t4)?.forEach((e7) => e7.resolve(n3.has(t4)));
1304
+ }, (t3) => {
1305
+ for (let n3 of r2) e6.get(n3)?.forEach((e7) => e7.reject(t3));
1306
+ });
1307
+ }
1294
1308
  };
1295
- var Dr = (e6) => typeof e6 == `number` ? e6 : void 0;
1296
- var Or = async (e6) => {
1297
- 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;
1298
- return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount: Dr(r2?.likes), viewCount: Dr(r2?.views), commentCount: Dr(r2?.comments) };
1309
+ var Or = (e6) => new Promise((t2, n2) => {
1310
+ if (!L) {
1311
+ let e7 = /* @__PURE__ */ new Map();
1312
+ L = e7, setTimeout(() => {
1313
+ L = void 0, Dr(e7);
1314
+ });
1315
+ }
1316
+ L.set(e6, [...L.get(e6) ?? [], { resolve: t2, reject: n2 }]);
1317
+ });
1318
+ var kr = (e6) => typeof e6 == `number` ? e6 : void 0;
1319
+ var Ar = async (e6, t2 = true) => {
1320
+ let [n2, r2] = await Promise.allSettled([Or(e6), t2 ? Sr(e6) : void 0]), i2 = r2.status === `fulfilled` ? r2.value?.metrics : void 0;
1321
+ return { liked: n2.status === `fulfilled` && n2.value, likeCount: kr(i2?.likes), viewCount: kr(i2?.views), commentCount: kr(i2?.comments) };
1299
1322
  };
1300
- function I(e6) {
1323
+ function R(e6) {
1301
1324
  return e6;
1302
1325
  }
1303
- var kr = I(`@wix/site-service-editor-context`);
1304
- var Ar = () => {
1326
+ var jr = R(`@wix/site-service-editor-context`);
1327
+ var Mr = () => {
1305
1328
  try {
1306
- return !!(0, import_services_manager_react.useService)(kr).previewMode;
1329
+ return !!(0, import_services_manager_react.useService)(jr).previewMode;
1307
1330
  } catch {
1308
1331
  return false;
1309
1332
  }
1310
1333
  };
1311
- var jr = I(`@wix/viewer-service-site-members`);
1312
- var Mr = () => {
1334
+ var Nr = R(`@wix/viewer-service-site-members`);
1335
+ var Pr = () => {
1313
1336
  try {
1314
- return (0, import_services_manager_react.useService)(jr);
1337
+ return (0, import_services_manager_react.useService)(Nr);
1315
1338
  } catch {
1316
1339
  return;
1317
1340
  }
1318
1341
  };
1319
- var Nr = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
1320
- var L = `wix-blog:post-like-toggled`;
1321
- var Pr = () => {
1342
+ var Fr = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
1343
+ var z = `wix-blog:post-like-toggled`;
1344
+ var Ir = () => {
1322
1345
  let e6 = window;
1323
- return e6[L] ??= /* @__PURE__ */ new Map();
1346
+ return e6[z] ??= /* @__PURE__ */ new Map();
1324
1347
  };
1325
- var Fr = (e6) => {
1326
- Pr().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(L, { detail: e6 }));
1348
+ var Lr = (e6) => {
1349
+ Ir().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(z, { detail: e6 }));
1327
1350
  };
1328
- 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 });
1329
- var Lr = (e6, t2, n2 = false, a2) => {
1330
- let u2 = Ar() || n2, [d2, f2] = (0, import_react.useState)(Nr), p2 = (0, import_react.useRef)(Nr), m2 = (0, import_react.useRef)(t2), h2 = (0, import_react.useRef)(/* @__PURE__ */ new Set()), g2 = (0, import_react.useRef)(false), _2 = (0, import_react.useRef)(false), v2 = (0, import_react.useRef)(void 0), y2 = Mr(), [b2, x2] = (0, import_react.useState)(0);
1351
+ 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 });
1352
+ var zr = (e6, t2, n2 = false, a2, u2 = true) => {
1353
+ let d2 = Mr() || n2, [f2, p2] = (0, import_react.useState)(Fr), m2 = (0, import_react.useRef)(Fr), h2 = (0, import_react.useRef)(t2), g2 = (0, import_react.useRef)(/* @__PURE__ */ new Set()), _2 = (0, import_react.useRef)(false), v2 = (0, import_react.useRef)(false), y2 = (0, import_react.useRef)(void 0), b2 = Pr(), [x2, S2] = (0, import_react.useState)(0);
1331
1354
  (0, import_react.useEffect)(() => {
1332
- let e7 = y2?.addMemberLoginListener?.(() => {
1333
- Pr().clear(), x2((e8) => e8 + 1);
1355
+ let e7 = b2?.addMemberLoginListener?.(() => {
1356
+ Ir().clear(), S2((e8) => e8 + 1);
1334
1357
  });
1335
1358
  return () => {
1336
- e7 !== void 0 && y2?.removeMemberLoginListener?.(e7);
1359
+ e7 !== void 0 && b2?.removeMemberLoginListener?.(e7);
1337
1360
  };
1338
- }, [y2]);
1339
- let S2 = (0, import_react.useCallback)((e7) => {
1340
- let t3 = p2.current, n3 = { ...t3, ...e7 };
1341
- Object.keys(n3).every((e8) => n3[e8] === t3[e8]) || (p2.current = n3, h2.current.forEach((e8) => e8()), (0, import_react.startTransition)(() => f2(n3)));
1342
- }, []), C2 = (0, import_react.useMemo)(() => ({ get: () => Ir(p2.current, m2.current), subscribe: (e7) => (h2.current.add(e7), () => {
1343
- h2.current.delete(e7);
1361
+ }, [b2]);
1362
+ let C2 = (0, import_react.useCallback)((e7) => {
1363
+ let t3 = m2.current, n3 = { ...t3, ...e7 };
1364
+ Object.keys(n3).every((e8) => n3[e8] === t3[e8]) || (m2.current = n3, g2.current.forEach((e8) => e8()), (0, import_react.startTransition)(() => p2(n3)));
1365
+ }, []), w2 = (0, import_react.useMemo)(() => ({ get: () => Rr(m2.current, h2.current), subscribe: (e7) => (g2.current.add(e7), () => {
1366
+ g2.current.delete(e7);
1344
1367
  }) }), []);
1345
1368
  (0, import_react.useEffect)(() => {
1346
- m2.current !== t2 && (m2.current = t2, h2.current.forEach((e7) => e7()));
1369
+ h2.current !== t2 && (h2.current = t2, g2.current.forEach((e7) => e7()));
1347
1370
  }, [t2]), (0, import_react.useEffect)(() => {
1348
- if (v2.current !== e6 && (v2.current = e6, S2(Nr)), _2.current = false, !e6 || u2) {
1349
- S2({ isLikeCountLoaded: true });
1371
+ if (y2.current !== e6 && (y2.current = e6, C2(Fr)), v2.current = false, !e6 || d2) {
1372
+ C2({ isLikeCountLoaded: true });
1350
1373
  return;
1351
1374
  }
1352
1375
  let t3 = false;
1353
- return Or(e6).then(({ liked: e7, likeCount: n3, viewCount: r2, commentCount: i2 }) => {
1354
- t3 || S2({ isLikeCountLoaded: true, viewCount: r2, commentCount: i2, baselineLiked: e7, freshLikeCount: n3, ...!_2.current && { liked: e7 } });
1376
+ return Ar(e6, u2).then(({ liked: e7, likeCount: n3, viewCount: r2, commentCount: i2 }) => {
1377
+ t3 || C2({ isLikeCountLoaded: true, viewCount: r2, commentCount: i2, baselineLiked: e7, freshLikeCount: n3, ...!v2.current && { liked: e7 } });
1355
1378
  }).catch((n3) => {
1356
- t3 || S2({ isLikeCountLoaded: true }), An(a2, n3, { feature: On.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
1379
+ t3 || C2({ isLikeCountLoaded: true }), kn(a2, n3, { feature: Dn.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
1357
1380
  }), () => {
1358
1381
  t3 = true;
1359
1382
  };
1360
- }, [e6, u2, a2, S2, b2]), (0, import_react.useEffect)(() => {
1383
+ }, [e6, d2, a2, C2, x2, u2]), (0, import_react.useEffect)(() => {
1361
1384
  if (!e6) return;
1362
1385
  let t3 = (e7) => {
1363
- _2.current = true, S2({ liked: e7 });
1364
- }, n3 = Pr().get(e6);
1386
+ v2.current = true, C2({ liked: e7 });
1387
+ }, n3 = Ir().get(e6);
1365
1388
  n3 !== void 0 && t3(n3);
1366
1389
  let r2 = (n4) => {
1367
1390
  let { detail: r3 } = n4;
1368
1391
  r3.postId === e6 && t3(r3.liked);
1369
1392
  };
1370
- return window.addEventListener(L, r2), () => window.removeEventListener(L, r2);
1371
- }, [e6, S2]);
1372
- let ee2 = (0, import_react.useCallback)(async (t3) => {
1373
- if (!e6 || g2.current) return;
1374
- _2.current = true;
1375
- let n3 = !p2.current.liked;
1376
- if (S2({ liked: n3 }), Fr({ postId: e6, liked: n3 }), !u2) {
1377
- g2.current = true;
1393
+ return window.addEventListener(z, r2), () => window.removeEventListener(z, r2);
1394
+ }, [e6, C2]);
1395
+ let T2 = (0, import_react.useCallback)(async (t3) => {
1396
+ if (!e6 || _2.current) return;
1397
+ v2.current = true;
1398
+ let n3 = !m2.current.liked;
1399
+ if (C2({ liked: n3 }), Lr({ postId: e6, liked: n3 }), !d2) {
1400
+ _2.current = true;
1378
1401
  try {
1379
- await (n3 ? Tr(e6) : Er(e6));
1402
+ await (n3 ? wr(e6) : Tr(e6));
1380
1403
  } catch (t4) {
1381
- S2({ liked: !n3 }), Fr({ postId: e6, liked: !n3 }), An(a2, t4, { feature: On.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
1404
+ C2({ liked: !n3 }), Lr({ postId: e6, liked: !n3 }), kn(a2, t4, { feature: Dn.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
1382
1405
  } finally {
1383
- g2.current = false;
1406
+ _2.current = false;
1384
1407
  }
1385
1408
  }
1386
- }, [e6, u2, a2, S2]);
1387
- return { ...Ir(d2, t2), toggleLike: ee2, liveLikes: C2 };
1409
+ }, [e6, d2, a2, C2]);
1410
+ return { ...Rr(f2, t2), toggleLike: T2, liveLikes: w2 };
1388
1411
  };
1389
- var Rr = I(`@wix/site-service-locale`);
1390
- var zr = I(`@wix/viewer-service-multilingual`);
1391
- var Br = () => {
1412
+ var Br = R(`@wix/site-service-locale`);
1413
+ var Vr = R(`@wix/viewer-service-multilingual`);
1414
+ var Hr = () => {
1392
1415
  let e6;
1393
1416
  try {
1394
- let { multilingualEnabled: t3, currentLocale: n3 } = (0, import_services_manager_react.useService)(zr);
1417
+ let { multilingualEnabled: t3, currentLocale: n3 } = (0, import_services_manager_react.useService)(Vr);
1395
1418
  t3 && n3 && !n3.primaryLocale && (e6 = n3.regionalFormat);
1396
1419
  } catch {
1397
1420
  }
1398
1421
  let t2, n2;
1399
1422
  try {
1400
- ({ locale: t2, language: n2 } = (0, import_services_manager_react.useService)(Rr));
1423
+ ({ locale: t2, language: n2 } = (0, import_services_manager_react.useService)(Br));
1401
1424
  } catch {
1402
1425
  }
1403
1426
  return e6 || t2 || n2;
1404
1427
  };
1405
- var Vr = () => {
1428
+ var Ur = () => {
1406
1429
  let e6 = /* @__PURE__ */ new Map();
1407
1430
  return { getOrInsert: (t2, n2) => (e6.has(t2) || e6.set(t2, n2().finally(() => {
1408
1431
  e6.delete(t2);
1409
1432
  })), e6.get(t2)) };
1410
1433
  };
1411
- var Hr = async (e6) => {
1434
+ var Wr = async (e6) => {
1412
1435
  try {
1413
1436
  let { default: t2 } = await e6();
1414
1437
  return t2;
@@ -1416,9 +1439,9 @@ var Hr = async (e6) => {
1416
1439
  return;
1417
1440
  }
1418
1441
  };
1419
- var Ur = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
1420
- let r2 = Vr(), i2 = async (r3) => {
1421
- let [i3, a2] = await Promise.all([Hr(() => t2(r3)), !e6 || !n2 ? void 0 : Hr(() => n2(r3))]);
1442
+ var Gr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
1443
+ let r2 = Ur(), i2 = async (r3) => {
1444
+ let [i3, a2] = await Promise.all([Wr(() => t2(r3)), !e6 || !n2 ? void 0 : Wr(() => n2(r3))]);
1422
1445
  if (i3 && a2) return { ...i3, ...a2 };
1423
1446
  if (i3) return i3;
1424
1447
  if (a2) return a2;
@@ -1426,61 +1449,61 @@ var Ur = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
1426
1449
  };
1427
1450
  return (e7) => r2.getOrInsert(e7, () => i2(e7));
1428
1451
  };
1429
- var R = (e6) => typeof e6 == `string`;
1430
- var z = () => {
1452
+ var B = (e6) => typeof e6 == `string`;
1453
+ var V = () => {
1431
1454
  let e6, t2, n2 = new Promise((n3, r2) => {
1432
1455
  e6 = n3, t2 = r2;
1433
1456
  });
1434
1457
  return n2.resolve = e6, n2.reject = t2, n2;
1435
1458
  };
1436
- var Wr = (e6) => e6 == null ? `` : String(e6);
1437
- var Gr = (e6, t2, n2) => {
1459
+ var Kr = (e6) => e6 == null ? `` : String(e6);
1460
+ var qr = (e6, t2, n2) => {
1438
1461
  e6.forEach((e7) => {
1439
1462
  t2[e7] && (n2[e7] = t2[e7]);
1440
1463
  });
1441
1464
  };
1442
- var Kr = /###/g;
1443
- var qr = (e6) => e6 && e6.includes(`###`) ? e6.replace(Kr, `.`) : e6;
1444
- var Jr = (e6) => !e6 || R(e6);
1445
- var B = (e6, t2, n2) => {
1446
- let r2 = R(t2) ? t2.split(`.`) : t2, i2 = 0;
1465
+ var Jr = /###/g;
1466
+ var Yr = (e6) => e6 && e6.includes(`###`) ? e6.replace(Jr, `.`) : e6;
1467
+ var Xr = (e6) => !e6 || B(e6);
1468
+ var H = (e6, t2, n2) => {
1469
+ let r2 = B(t2) ? t2.split(`.`) : t2, i2 = 0;
1447
1470
  for (; i2 < r2.length - 1; ) {
1448
- if (Jr(e6)) return {};
1449
- let t3 = qr(r2[i2]);
1471
+ if (Xr(e6)) return {};
1472
+ let t3 = Yr(r2[i2]);
1450
1473
  !e6[t3] && n2 && (e6[t3] = new n2()), e6 = Object.prototype.hasOwnProperty.call(e6, t3) ? e6[t3] : {}, ++i2;
1451
1474
  }
1452
- return Jr(e6) ? {} : { obj: e6, k: qr(r2[i2]) };
1475
+ return Xr(e6) ? {} : { obj: e6, k: Yr(r2[i2]) };
1453
1476
  };
1454
- var Yr = (e6, t2, n2) => {
1455
- let { obj: r2, k: i2 } = B(e6, t2, Object);
1477
+ var Zr = (e6, t2, n2) => {
1478
+ let { obj: r2, k: i2 } = H(e6, t2, Object);
1456
1479
  if (r2 !== void 0 || t2.length === 1) {
1457
1480
  r2[i2] = n2;
1458
1481
  return;
1459
1482
  }
1460
- let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = B(e6, o2, Object);
1461
- 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);
1483
+ let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = H(e6, o2, Object);
1484
+ 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);
1462
1485
  s2.obj[`${s2.k}.${a2}`] = n2;
1463
1486
  };
1464
- var Xr = (e6, t2, n2, r2) => {
1465
- let { obj: i2, k: a2 } = B(e6, t2, Object);
1487
+ var Qr = (e6, t2, n2, r2) => {
1488
+ let { obj: i2, k: a2 } = H(e6, t2, Object);
1466
1489
  i2[a2] = i2[a2] || [], i2[a2].push(n2);
1467
1490
  };
1468
- var V = (e6, t2) => {
1469
- let { obj: n2, k: r2 } = B(e6, t2);
1491
+ var U = (e6, t2) => {
1492
+ let { obj: n2, k: r2 } = H(e6, t2);
1470
1493
  if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1471
1494
  };
1472
- var Zr = (e6, t2, n2) => {
1473
- let r2 = V(e6, n2);
1474
- return r2 === void 0 ? V(t2, n2) : r2;
1495
+ var $r = (e6, t2, n2) => {
1496
+ let r2 = U(e6, n2);
1497
+ return r2 === void 0 ? U(t2, n2) : r2;
1475
1498
  };
1476
- var Qr = (e6, t2, n2) => {
1477
- 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]);
1499
+ var ei = (e6, t2, n2) => {
1500
+ 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]);
1478
1501
  return e6;
1479
1502
  };
1480
- var H = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1481
- var $r = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1482
- var ei = (e6) => R(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => $r[e7]) : e6;
1483
- var ti = class {
1503
+ var W = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1504
+ var ti = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1505
+ var ni = (e6) => B(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => ti[e7]) : e6;
1506
+ var ri = class {
1484
1507
  constructor(e6) {
1485
1508
  this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1486
1509
  }
@@ -1491,20 +1514,20 @@ var ti = class {
1491
1514
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
1492
1515
  }
1493
1516
  };
1494
- var ni = [` `, `,`, `?`, `!`, `;`];
1495
- var ri = new ti(20);
1496
- var ii = (e6, t2, n2) => {
1517
+ var ii = [` `, `,`, `?`, `!`, `;`];
1518
+ var ai = new ri(20);
1519
+ var oi = (e6, t2, n2) => {
1497
1520
  t2 ||= ``, n2 ||= ``;
1498
- let r2 = ni.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
1521
+ let r2 = ii.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
1499
1522
  if (r2.length === 0) return true;
1500
- let i2 = ri.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
1523
+ let i2 = ai.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
1501
1524
  if (!a2) {
1502
1525
  let t3 = e6.indexOf(n2);
1503
1526
  t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
1504
1527
  }
1505
1528
  return a2;
1506
1529
  };
1507
- var ai = (e6, t2, n2 = `.`) => {
1530
+ var si = (e6, t2, n2 = `.`) => {
1508
1531
  if (!e6) return;
1509
1532
  if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
1510
1533
  let r2 = t2.split(n2), i2 = e6;
@@ -1520,8 +1543,8 @@ var ai = (e6, t2, n2 = `.`) => {
1520
1543
  }
1521
1544
  return i2;
1522
1545
  };
1523
- var U = (e6) => e6?.replace(/_/g, `-`);
1524
- var oi = { type: `logger`, log(e6) {
1546
+ var G = (e6) => e6?.replace(/_/g, `-`);
1547
+ var ci = { type: `logger`, log(e6) {
1525
1548
  this.output(`log`, e6);
1526
1549
  }, warn(e6) {
1527
1550
  this.output(`warn`, e6);
@@ -1530,12 +1553,12 @@ var oi = { type: `logger`, log(e6) {
1530
1553
  }, output(e6, t2) {
1531
1554
  console?.[e6]?.apply?.(console, t2);
1532
1555
  } };
1533
- var W = new class e2 {
1556
+ var K = new class e2 {
1534
1557
  constructor(e6, t2 = {}) {
1535
1558
  this.init(e6, t2);
1536
1559
  }
1537
1560
  init(e6, t2 = {}) {
1538
- this.prefix = t2.prefix || `i18next:`, this.logger = e6 || oi, this.options = t2, this.debug = t2.debug;
1561
+ this.prefix = t2.prefix || `i18next:`, this.logger = e6 || ci, this.options = t2, this.debug = t2.debug;
1539
1562
  }
1540
1563
  log(...e6) {
1541
1564
  return this.forward(e6, `log`, ``, true);
@@ -1550,7 +1573,7 @@ var W = new class e2 {
1550
1573
  return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
1551
1574
  }
1552
1575
  forward(e6, t2, n2, r2) {
1553
- 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));
1576
+ 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));
1554
1577
  }
1555
1578
  create(t2) {
1556
1579
  return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
@@ -1559,7 +1582,7 @@ var W = new class e2 {
1559
1582
  return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
1560
1583
  }
1561
1584
  }();
1562
- var si = class {
1585
+ var li = class {
1563
1586
  constructor() {
1564
1587
  this.observers = {};
1565
1588
  }
@@ -1587,8 +1610,8 @@ var si = class {
1587
1610
  });
1588
1611
  }
1589
1612
  };
1590
- var ci = /* @__PURE__ */ new WeakSet();
1591
- var li = class extends si {
1613
+ var ui = /* @__PURE__ */ new WeakSet();
1614
+ var di = class extends li {
1592
1615
  constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1593
1616
  super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1594
1617
  }
@@ -1601,23 +1624,23 @@ var li = class extends si {
1601
1624
  }
1602
1625
  getResource(e6, t2, n2, r2 = {}) {
1603
1626
  let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
1604
- 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)));
1605
- let s2 = V(this.data, o2);
1606
- 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);
1627
+ 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)));
1628
+ let s2 = U(this.data, o2);
1629
+ 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);
1607
1630
  }
1608
1631
  addResource(e6, t2, n2, r2, i2 = { silent: false }) {
1609
1632
  let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
1610
- 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);
1633
+ 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);
1611
1634
  }
1612
1635
  addResources(e6, t2, n2, r2 = { silent: false }) {
1613
- for (let r3 in n2) (R(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
1636
+ for (let r3 in n2) (B(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
1614
1637
  r2.silent || this.emit(`added`, e6, t2, n2);
1615
1638
  }
1616
1639
  addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
1617
1640
  let o2 = [e6, t2];
1618
1641
  e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1619
- let s2 = V(this.data, o2) || {};
1620
- 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);
1642
+ let s2 = U(this.data, o2) || {};
1643
+ 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);
1621
1644
  }
1622
1645
  removeResourceBundle(e6, t2) {
1623
1646
  this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
@@ -1635,37 +1658,37 @@ var li = class extends si {
1635
1658
  let t2 = this.getDataByLanguage(e6);
1636
1659
  return !!(t2 && Object.keys(t2) || []).find((e7) => {
1637
1660
  let n2 = t2[e7];
1638
- return ci.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && ci.add(n2), true);
1661
+ return ui.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && ui.add(n2), true);
1639
1662
  });
1640
1663
  }
1641
1664
  toJSON() {
1642
1665
  return this.data;
1643
1666
  }
1644
1667
  };
1645
- var ui = { processors: {}, addPostProcessor(e6) {
1668
+ var fi = { processors: {}, addPostProcessor(e6) {
1646
1669
  this.processors[e6.name] = e6;
1647
1670
  }, handle(e6, t2, n2, r2, i2) {
1648
1671
  return e6.forEach((e7) => {
1649
1672
  t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
1650
1673
  }), t2;
1651
1674
  } };
1652
- var di = Symbol(`i18next/PATH_KEY`);
1653
- function fi() {
1675
+ var pi = Symbol(`i18next/PATH_KEY`);
1676
+ function mi() {
1654
1677
  let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1655
- 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;
1678
+ 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;
1656
1679
  }
1657
- function G(e6, t2) {
1658
- let { [di]: n2 } = e6(fi()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
1680
+ function q(e6, t2) {
1681
+ let { [pi]: n2 } = e6(mi()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
1659
1682
  if (n2.length > 1 && i2) {
1660
1683
  let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
1661
1684
  if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1662
1685
  }
1663
1686
  return n2.join(r2);
1664
1687
  }
1665
- var pi = (e6) => !R(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
1666
- var mi = class e3 extends si {
1688
+ var hi = (e6) => !B(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
1689
+ var gi = class e3 extends li {
1667
1690
  constructor(e6, t2 = {}) {
1668
- 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 = {};
1691
+ 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 = {};
1669
1692
  }
1670
1693
  changeLanguage(e6) {
1671
1694
  e6 && (this.language = e6);
@@ -1675,53 +1698,53 @@ var mi = class e3 extends si {
1675
1698
  if (e6 == null) return false;
1676
1699
  let r2 = this.resolve(e6, n2);
1677
1700
  if (r2?.res === void 0) return false;
1678
- let i2 = pi(r2.res);
1701
+ let i2 = hi(r2.res);
1679
1702
  return !(n2.returnObjects === false && i2);
1680
1703
  }
1681
1704
  extractFromKey(e6, t2) {
1682
1705
  let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1683
1706
  n2 === void 0 && (n2 = `:`);
1684
- 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);
1707
+ 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);
1685
1708
  if (a2 && !o2) {
1686
1709
  let t3 = e6.match(this.interpolator.nestingRegexp);
1687
- if (t3 && t3.length > 0) return { key: e6, namespaces: R(i2) ? [i2] : i2 };
1710
+ if (t3 && t3.length > 0) return { key: e6, namespaces: B(i2) ? [i2] : i2 };
1688
1711
  let a3 = e6.split(n2);
1689
1712
  (n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
1690
1713
  }
1691
- return { key: e6, namespaces: R(i2) ? [i2] : i2 };
1714
+ return { key: e6, namespaces: B(i2) ? [i2] : i2 };
1692
1715
  }
1693
1716
  translate(t2, n2, r2) {
1694
1717
  let i2 = typeof n2 == `object` ? { ...n2 } : n2;
1695
1718
  if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
1696
- 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));
1719
+ 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));
1697
1720
  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;
1698
1721
  u2 === void 0 && (u2 = `:`);
1699
1722
  let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
1700
1723
  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;
1701
- 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;
1702
- y2 && !m2 && x2 && (T2 = w2);
1703
- let te2 = pi(T2), ne2 = Object.prototype.toString.apply(T2);
1704
- if (y2 && T2 && te2 && !_2.includes(ne2) && !(R(v2) && Array.isArray(T2))) {
1724
+ 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;
1725
+ y2 && !m2 && x2 && (E2 = T2);
1726
+ let ee2 = hi(E2), te2 = Object.prototype.toString.apply(E2);
1727
+ if (y2 && E2 && ee2 && !_2.includes(te2) && !(B(v2) && Array.isArray(E2))) {
1705
1728
  if (!i2.returnObjects && !this.options.returnObjects) {
1706
1729
  this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
1707
- let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
1730
+ let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, E2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
1708
1731
  return a2 ? (p2.res = e6, p2.usedParams = this.getUsedParamsDetails(i2), p2) : e6;
1709
1732
  }
1710
1733
  if (o2) {
1711
- let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
1712
- for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
1734
+ let e6 = Array.isArray(E2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
1735
+ for (let e7 in E2) if (Object.prototype.hasOwnProperty.call(E2, e7)) {
1713
1736
  let r3 = `${n3}${o2}${e7}`;
1714
- 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]);
1737
+ 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]);
1715
1738
  }
1716
1739
  m2 = t3;
1717
1740
  }
1718
- } else if (y2 && R(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1741
+ } else if (y2 && B(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
1719
1742
  else {
1720
1743
  let e6 = false, n3 = false;
1721
- !this.isValidLookup(m2) && x2 && (e6 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
1722
- let a3 = (i2.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n3 ? void 0 : m2, c3 = x2 && w2 !== m2 && this.options.updateMissing;
1744
+ !this.isValidLookup(m2) && x2 && (e6 = true, m2 = T2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
1745
+ let a3 = (i2.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && n3 ? void 0 : m2, c3 = x2 && T2 !== m2 && this.options.updateMissing;
1723
1746
  if (n3 || e6 || c3) {
1724
- if (this.logger.log(c3 ? `updateKey` : `missingKey`, d2, l2, b2 && !c3 ? `${s2}${this.pluralResolver.getSuffix(d2, i2.count, i2)}` : s2, c3 ? w2 : m2), o2) {
1747
+ if (this.logger.log(c3 ? `updateKey` : `missingKey`, d2, l2, b2 && !c3 ? `${s2}${this.pluralResolver.getSuffix(d2, i2.count, i2)}` : s2, c3 ? T2 : m2), o2) {
1725
1748
  let e8 = this.resolve(s2, { ...i2, keySeparator: false });
1726
1749
  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.`);
1727
1750
  }
@@ -1734,10 +1757,10 @@ var mi = class e3 extends si {
1734
1757
  };
1735
1758
  this.options.saveMissing && (this.options.saveMissingPlurals && b2 ? e7.forEach((e8) => {
1736
1759
  let t4 = this.pluralResolver.getSuffixes(e8, i2);
1737
- ee2 && i2[`defaultValue${this.options.pluralSeparator}zero`] && !t4.includes(`${this.options.pluralSeparator}zero`) && t4.push(`${this.options.pluralSeparator}zero`), t4.forEach((t5) => {
1738
- n4([e8], s2 + t5, i2[`defaultValue${t5}`] || w2);
1760
+ w2 && i2[`defaultValue${this.options.pluralSeparator}zero`] && !t4.includes(`${this.options.pluralSeparator}zero`) && t4.push(`${this.options.pluralSeparator}zero`), t4.forEach((t5) => {
1761
+ n4([e8], s2 + t5, i2[`defaultValue${t5}`] || T2);
1739
1762
  });
1740
- }) : n4(e7, s2, w2));
1763
+ }) : n4(e7, s2, T2));
1741
1764
  }
1742
1765
  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));
1743
1766
  }
@@ -1747,30 +1770,30 @@ var mi = class e3 extends si {
1747
1770
  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 });
1748
1771
  else if (!n2.skipInterpolation) {
1749
1772
  n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
1750
- let a3 = R(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1773
+ let a3 = B(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
1751
1774
  if (a3) {
1752
1775
  let t3 = e6.match(this.interpolator.nestingRegexp);
1753
1776
  o3 = t3 && t3.length;
1754
1777
  }
1755
- let s2 = n2.replace && !R(n2.replace) ? n2.replace : n2;
1778
+ let s2 = n2.replace && !B(n2.replace) ? n2.replace : n2;
1756
1779
  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) {
1757
1780
  let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
1758
1781
  o3 < r3 && (n2.nest = false);
1759
1782
  }
1760
1783
  !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();
1761
1784
  }
1762
- let a2 = n2.postProcess || this.options.postProcess, o2 = R(a2) ? [a2] : a2;
1763
- 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;
1785
+ let a2 = n2.postProcess || this.options.postProcess, o2 = B(a2) ? [a2] : a2;
1786
+ 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;
1764
1787
  }
1765
1788
  resolve(e6, t2 = {}) {
1766
1789
  let n2, r2, i2, a2, o2;
1767
- return R(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? G(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
1790
+ return B(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? q(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
1768
1791
  if (this.isValidLookup(n2)) return;
1769
1792
  let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
1770
1793
  r2 = c2;
1771
1794
  let l2 = s2.namespaces;
1772
1795
  this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
1773
- 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);
1796
+ 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);
1774
1797
  l2.forEach((e8) => {
1775
1798
  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) => {
1776
1799
  if (this.isValidLookup(n2)) return;
@@ -1799,7 +1822,7 @@ var mi = class e3 extends si {
1799
1822
  return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
1800
1823
  }
1801
1824
  getUsedParamsDetails(e6 = {}) {
1802
- 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;
1825
+ 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;
1803
1826
  if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
1804
1827
  r2 = { ...r2 };
1805
1828
  for (let e7 of t2) delete r2[e7];
@@ -1811,25 +1834,25 @@ var mi = class e3 extends si {
1811
1834
  return false;
1812
1835
  }
1813
1836
  };
1814
- var hi = class {
1837
+ var _i = class {
1815
1838
  constructor(e6) {
1816
- this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = W.create(`languageUtils`), this.resolveHierarchyCache = {};
1839
+ this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = K.create(`languageUtils`), this.resolveHierarchyCache = {};
1817
1840
  }
1818
1841
  clearCache() {
1819
1842
  this.resolveHierarchyCache = {};
1820
1843
  }
1821
1844
  getScriptPartFromCode(e6) {
1822
- if (e6 = U(e6), !e6 || !e6.includes(`-`)) return null;
1845
+ if (e6 = G(e6), !e6 || !e6.includes(`-`)) return null;
1823
1846
  let t2 = e6.split(`-`);
1824
1847
  return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
1825
1848
  }
1826
1849
  getLanguagePartFromCode(e6) {
1827
- if (e6 = U(e6), !e6 || !e6.includes(`-`)) return e6;
1850
+ if (e6 = G(e6), !e6 || !e6.includes(`-`)) return e6;
1828
1851
  let t2 = e6.split(`-`);
1829
1852
  return this.formatLanguageCode(t2[0]);
1830
1853
  }
1831
1854
  formatLanguageCode(e6) {
1832
- if (R(e6) && e6.includes(`-`)) {
1855
+ if (B(e6) && e6.includes(`-`)) {
1833
1856
  let t2;
1834
1857
  try {
1835
1858
  t2 = Intl.getCanonicalLocales(e6)[0];
@@ -1860,7 +1883,7 @@ var hi = class {
1860
1883
  }
1861
1884
  getFallbackCodes(e6, t2) {
1862
1885
  if (!e6) return [];
1863
- if (typeof e6 == `function` && (e6 = e6(t2)), R(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
1886
+ if (typeof e6 == `function` && (e6 = e6(t2)), B(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
1864
1887
  if (!t2) return e6.default || [];
1865
1888
  let n2 = e6[t2];
1866
1889
  return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
@@ -1868,7 +1891,7 @@ var hi = class {
1868
1891
  toResolveHierarchy(e6, t2) {
1869
1892
  let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
1870
1893
  r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
1871
- 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;
1894
+ 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;
1872
1895
  if (o2) {
1873
1896
  let n3;
1874
1897
  n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
@@ -1880,30 +1903,30 @@ var hi = class {
1880
1903
  let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
1881
1904
  e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
1882
1905
  };
1883
- 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) => {
1906
+ 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) => {
1884
1907
  let t3 = this.formatLanguageCode(e7);
1885
1908
  l2.includes(t3) || u2(t3);
1886
1909
  }), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
1887
1910
  }
1888
1911
  };
1889
- var gi = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1890
- var _i = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1891
- var vi = class {
1912
+ var vi = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1913
+ var yi = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1914
+ var bi = class {
1892
1915
  constructor(e6, t2 = {}) {
1893
- this.languageUtils = e6, this.options = t2, this.logger = W.create(`pluralResolver`), this.pluralRulesCache = {};
1916
+ this.languageUtils = e6, this.options = t2, this.logger = K.create(`pluralResolver`), this.pluralRulesCache = {};
1894
1917
  }
1895
1918
  clearCache() {
1896
1919
  this.pluralRulesCache = {};
1897
1920
  }
1898
1921
  getRule(e6, t2 = {}) {
1899
- let n2 = U(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
1922
+ let n2 = G(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
1900
1923
  if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
1901
1924
  let a2;
1902
1925
  try {
1903
1926
  a2 = new Intl.PluralRules(n2, { type: r2 });
1904
1927
  } catch {
1905
- if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), _i;
1906
- if (!e6.match(/-|_/)) return _i;
1928
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), yi;
1929
+ if (!e6.match(/-|_/)) return yi;
1907
1930
  let n3 = this.languageUtils.getLanguagePartFromCode(e6);
1908
1931
  a2 = this.getRule(n3, t2);
1909
1932
  }
@@ -1918,26 +1941,26 @@ var vi = class {
1918
1941
  }
1919
1942
  getSuffixes(e6, t2 = {}) {
1920
1943
  let n2 = this.getRule(e6, t2);
1921
- 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}`) : [];
1944
+ 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}`) : [];
1922
1945
  }
1923
1946
  getSuffix(e6, t2, n2 = {}) {
1924
1947
  let r2 = this.getRule(e6, n2);
1925
1948
  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));
1926
1949
  }
1927
1950
  };
1928
- var yi = (e6, t2, n2, r2 = `.`, i2 = true) => {
1929
- let a2 = Zr(e6, t2, n2);
1930
- return !a2 && i2 && R(n2) && (a2 = ai(e6, n2, r2), a2 === void 0 && (a2 = ai(t2, n2, r2))), a2;
1951
+ var xi = (e6, t2, n2, r2 = `.`, i2 = true) => {
1952
+ let a2 = $r(e6, t2, n2);
1953
+ return !a2 && i2 && B(n2) && (a2 = si(e6, n2, r2), a2 === void 0 && (a2 = si(t2, n2, r2))), a2;
1931
1954
  };
1932
- var bi = (e6) => e6.replace(/\$/g, `$$$$`);
1933
- var xi = class {
1955
+ var Si = (e6) => e6.replace(/\$/g, `$$$$`);
1956
+ var Ci = class {
1934
1957
  constructor(e6 = {}) {
1935
- this.logger = W.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
1958
+ this.logger = K.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
1936
1959
  }
1937
1960
  init(e6 = {}) {
1938
1961
  e6.interpolation ||= { escapeValue: true };
1939
1962
  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;
1940
- 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();
1963
+ 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();
1941
1964
  }
1942
1965
  reset() {
1943
1966
  this.options && this.init(this.options);
@@ -1949,11 +1972,11 @@ var xi = class {
1949
1972
  interpolate(e6, t2, n2, r2) {
1950
1973
  let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
1951
1974
  if (!e7.includes(this.formatSeparator)) {
1952
- let i4 = yi(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
1975
+ let i4 = xi(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
1953
1976
  return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
1954
1977
  }
1955
1978
  let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
1956
- return this.format(yi(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1979
+ return this.format(xi(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1957
1980
  };
1958
1981
  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.`);
1959
1982
  let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
@@ -1963,15 +1986,15 @@ var xi = class {
1963
1986
  if (a2 = c2(n3), a2 === void 0) {
1964
1987
  if (typeof l2 == `function`) {
1965
1988
  let t4 = l2(e6, i2, r2);
1966
- a2 = R(t4) ? t4 : ``;
1989
+ a2 = B(t4) ? t4 : ``;
1967
1990
  } else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
1968
1991
  else if (u2) {
1969
1992
  a2 = i2[0];
1970
1993
  continue;
1971
1994
  } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
1972
- } else !R(a2) && !this.useRawValueToEscape && (a2 = Wr(a2));
1995
+ } else !B(a2) && !this.useRawValueToEscape && (a2 = Kr(a2));
1973
1996
  let s3 = t3.safeValue(a2);
1974
- 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;
1997
+ 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;
1975
1998
  }
1976
1999
  }), e6;
1977
2000
  }
@@ -1979,7 +2002,7 @@ var xi = class {
1979
2002
  let r2, i2, a2, o2 = (e7, t3) => {
1980
2003
  let n3 = this.nestingOptionsSeparator;
1981
2004
  if (!e7.includes(n3)) return e7;
1982
- let r3 = e7.split(RegExp(`${H(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
2005
+ let r3 = e7.split(RegExp(`${W(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
1983
2006
  e7 = r3[0], i3 = this.interpolate(i3, a2);
1984
2007
  let o3 = i3.match(/'/g), s3 = i3.match(/"/g);
1985
2008
  ((o3?.length ?? 0) % 2 == 0 && !s3 || (s3?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
@@ -1992,15 +2015,15 @@ var xi = class {
1992
2015
  }, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
1993
2016
  for (; r2 = s2.exec(e6); ) {
1994
2017
  let u2 = [];
1995
- a2 = { ...n2 }, a2 = a2.replace && !R(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
2018
+ a2 = { ...n2 }, a2 = a2.replace && !B(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1996
2019
  let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
1997
- 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;
1998
- 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;
2020
+ 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;
2021
+ 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;
1999
2022
  }
2000
2023
  return l2 ? c2 + e6.slice(l2) : e6;
2001
2024
  }
2002
2025
  };
2003
- var Si = (e6) => {
2026
+ var wi = (e6) => {
2004
2027
  let t2 = e6.toLowerCase().trim(), n2 = {};
2005
2028
  if (e6.includes(`(`)) {
2006
2029
  let r2 = e6.split(`(`);
@@ -2015,23 +2038,23 @@ var Si = (e6) => {
2015
2038
  }
2016
2039
  return { formatName: t2, formatOptions: n2 };
2017
2040
  };
2018
- var Ci = (e6) => {
2041
+ var Ti = (e6) => {
2019
2042
  let t2 = {};
2020
2043
  return (n2, r2, i2) => {
2021
2044
  let a2 = i2;
2022
2045
  i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
2023
2046
  let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
2024
- return s2 || (s2 = e6(U(r2), i2), t2[o2] = s2), s2(n2);
2047
+ return s2 || (s2 = e6(G(r2), i2), t2[o2] = s2), s2(n2);
2025
2048
  };
2026
2049
  };
2027
- var wi = (e6) => (t2, n2, r2) => e6(U(n2), r2)(t2);
2028
- var Ti = class {
2050
+ var Ei = (e6) => (t2, n2, r2) => e6(G(n2), r2)(t2);
2051
+ var Di = class {
2029
2052
  constructor(e6 = {}) {
2030
- this.logger = W.create(`formatter`), this.options = e6, this.init(e6);
2053
+ this.logger = K.create(`formatter`), this.options = e6, this.init(e6);
2031
2054
  }
2032
2055
  init(e6, t2 = { interpolation: {} }) {
2033
2056
  this.formatSeparator = t2.interpolation.formatSeparator || `,`;
2034
- let n2 = t2.cacheInBuiltFormats ? Ci : wi;
2057
+ let n2 = t2.cacheInBuiltFormats ? Ti : Ei;
2035
2058
  this.formats = { number: n2((e7, t3) => {
2036
2059
  let n3 = new Intl.NumberFormat(e7, { ...t3 });
2037
2060
  return (e8) => n3.format(e8);
@@ -2053,7 +2076,7 @@ var Ti = class {
2053
2076
  this.formats[e6.toLowerCase().trim()] = t2;
2054
2077
  }
2055
2078
  addCached(e6, t2) {
2056
- this.formats[e6.toLowerCase().trim()] = Ci(t2);
2079
+ this.formats[e6.toLowerCase().trim()] = Ti(t2);
2057
2080
  }
2058
2081
  format(e6, t2, n2, r2 = {}) {
2059
2082
  if (!t2 || e6 == null) return e6;
@@ -2064,7 +2087,7 @@ var Ti = class {
2064
2087
  a2.push(t3);
2065
2088
  }
2066
2089
  return a2.reduce((e7, t3) => {
2067
- let { formatName: i3, formatOptions: a3 } = Si(t3);
2090
+ let { formatName: i3, formatOptions: a3 } = wi(t3);
2068
2091
  if (this.formats[i3]) {
2069
2092
  let t4 = e7;
2070
2093
  try {
@@ -2079,12 +2102,12 @@ var Ti = class {
2079
2102
  }, e6);
2080
2103
  }
2081
2104
  };
2082
- var Ei = (e6, t2) => {
2105
+ var Oi = (e6, t2) => {
2083
2106
  e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
2084
2107
  };
2085
- var Di = class extends si {
2108
+ var ki = class extends li {
2086
2109
  constructor(e6, t2, n2, r2 = {}) {
2087
- 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);
2110
+ 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);
2088
2111
  }
2089
2112
  queueLoad(e6, t2, n2, r2) {
2090
2113
  let i2 = {}, a2 = {}, o2 = {}, s2 = {};
@@ -2101,7 +2124,7 @@ var Di = class extends si {
2101
2124
  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);
2102
2125
  let o2 = {};
2103
2126
  this.queue.forEach((n3) => {
2104
- Xr(n3.loaded, [i2], a2), Ei(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
2127
+ Qr(n3.loaded, [i2], a2), Oi(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
2105
2128
  o2[e7] || (o2[e7] = {});
2106
2129
  let t3 = n3.loaded[e7];
2107
2130
  t3.length && t3.forEach((t4) => {
@@ -2136,7 +2159,7 @@ var Di = class extends si {
2136
2159
  }
2137
2160
  prepareLoading(e6, t2, n2 = {}, r2) {
2138
2161
  if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
2139
- R(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), R(t2) && (t2 = [t2]);
2162
+ B(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), B(t2) && (t2 = [t2]);
2140
2163
  let i2 = this.queueLoad(e6, t2, n2, r2);
2141
2164
  if (!i2.toLoad.length) return i2.pending.length || r2(), null;
2142
2165
  i2.toLoad.forEach((e7) => {
@@ -2173,9 +2196,9 @@ var Di = class extends si {
2173
2196
  }
2174
2197
  }
2175
2198
  };
2176
- 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) => {
2199
+ 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) => {
2177
2200
  let t2 = {};
2178
- 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`) {
2201
+ 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`) {
2179
2202
  let n2 = e6[3] || e6[2];
2180
2203
  Object.keys(n2).forEach((e7) => {
2181
2204
  t2[e7] = n2[e7];
@@ -2183,17 +2206,17 @@ var Oi = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
2183
2206
  }
2184
2207
  return t2;
2185
2208
  }, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
2186
- 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);
2187
- var Ai = () => {
2209
+ 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);
2210
+ var Mi = () => {
2188
2211
  };
2189
- var ji = (e6) => {
2212
+ var Ni = (e6) => {
2190
2213
  Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
2191
2214
  typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
2192
2215
  });
2193
2216
  };
2194
- var K = class e4 extends si {
2217
+ var J = class e4 extends li {
2195
2218
  constructor(e6 = {}, t2) {
2196
- if (super(), this.options = ki(e6), this.services = {}, this.logger = W, this.modules = { external: [] }, ji(this), t2 && !this.isInitialized && !e6.isClone) {
2219
+ if (super(), this.options = ji(e6), this.services = {}, this.logger = K, this.modules = { external: [] }, Ni(this), t2 && !this.isInitialized && !e6.isClone) {
2197
2220
  if (!this.options.initAsync) return this.init(e6, t2), this;
2198
2221
  setTimeout(() => {
2199
2222
  this.init(e6, t2);
@@ -2201,26 +2224,26 @@ var K = class e4 extends si {
2201
2224
  }
2202
2225
  }
2203
2226
  init(e6 = {}, t2) {
2204
- 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]));
2205
- let n2 = Oi();
2206
- 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);
2227
+ 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]));
2228
+ let n2 = Ai();
2229
+ 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);
2207
2230
  let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
2208
2231
  if (!this.options.isClone) {
2209
- this.modules.logger ? W.init(r2(this.modules.logger), this.options) : W.init(null, this.options);
2232
+ this.modules.logger ? K.init(r2(this.modules.logger), this.options) : K.init(null, this.options);
2210
2233
  let e7;
2211
- e7 = this.modules.formatter ? this.modules.formatter : Ti;
2212
- let t3 = new hi(this.options);
2213
- this.store = new li(this.options.resources, this.options);
2234
+ e7 = this.modules.formatter ? this.modules.formatter : Di;
2235
+ let t3 = new _i(this.options);
2236
+ this.store = new di(this.options.resources, this.options);
2214
2237
  let n3 = this.services;
2215
- 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) => {
2238
+ 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) => {
2216
2239
  this.emit(e8, ...t4);
2217
- }), 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) => {
2240
+ }), 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) => {
2218
2241
  this.emit(e8, ...t4);
2219
2242
  }), this.modules.external.forEach((e8) => {
2220
2243
  e8.init && e8.init(this);
2221
2244
  });
2222
2245
  }
2223
- if (this.format = this.options.interpolation.format, t2 ||= Ai, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2246
+ if (this.format = this.options.interpolation.format, t2 ||= Mi, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
2224
2247
  let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
2225
2248
  e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
2226
2249
  }
@@ -2229,7 +2252,7 @@ var K = class e4 extends si {
2229
2252
  }), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
2230
2253
  this[e7] = (...t3) => (this.store[e7](...t3), this);
2231
2254
  });
2232
- let i2 = z(), a2 = () => {
2255
+ let i2 = V(), a2 = () => {
2233
2256
  let e7 = (e8, n3) => {
2234
2257
  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);
2235
2258
  };
@@ -2238,8 +2261,8 @@ var K = class e4 extends si {
2238
2261
  };
2239
2262
  return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
2240
2263
  }
2241
- loadResources(e6, t2 = Ai) {
2242
- let n2 = t2, r2 = R(e6) ? e6 : this.language;
2264
+ loadResources(e6, t2 = Mi) {
2265
+ let n2 = t2, r2 = B(e6) ? e6 : this.language;
2243
2266
  if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
2244
2267
  if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
2245
2268
  let e7 = [], t3 = (t4) => {
@@ -2253,15 +2276,15 @@ var K = class e4 extends si {
2253
2276
  } else n2(null);
2254
2277
  }
2255
2278
  reloadResources(e6, t2, n2) {
2256
- let r2 = z();
2257
- 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) => {
2279
+ let r2 = V();
2280
+ 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) => {
2258
2281
  r2.resolve(), n2(e7);
2259
2282
  }), r2;
2260
2283
  }
2261
2284
  use(e6) {
2262
2285
  if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
2263
2286
  if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
2264
- 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;
2287
+ 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;
2265
2288
  }
2266
2289
  setResolvedLanguage(e6) {
2267
2290
  if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
@@ -2277,7 +2300,7 @@ var K = class e4 extends si {
2277
2300
  }
2278
2301
  changeLanguage(e6, t2) {
2279
2302
  this.isLanguageChangingTo = e6;
2280
- let n2 = z();
2303
+ let n2 = V();
2281
2304
  this.emit(`languageChanging`, e6);
2282
2305
  let r2 = (e7) => {
2283
2306
  this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
@@ -2285,7 +2308,7 @@ var K = class e4 extends si {
2285
2308
  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));
2286
2309
  }, a2 = (t3) => {
2287
2310
  !e6 && !t3 && this.services.languageDetector && (t3 = []);
2288
- let n3 = R(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(R(t3) ? [t3] : t3);
2311
+ let n3 = B(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(B(t3) ? [t3] : t3);
2289
2312
  a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
2290
2313
  i2(e7, a3);
2291
2314
  });
@@ -2299,11 +2322,11 @@ var K = class e4 extends si {
2299
2322
  let s2 = o2.ns !== void 0 && o2.ns !== null;
2300
2323
  o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
2301
2324
  let c2 = { ...this.options, ...o2 };
2302
- Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = G(o2.keyPrefix, c2));
2325
+ Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = q(o2.keyPrefix, c2));
2303
2326
  let l2 = this.options.keySeparator || `.`, u2;
2304
- 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);
2327
+ 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);
2305
2328
  };
2306
- return R(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
2329
+ return B(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
2307
2330
  }
2308
2331
  t(...e6) {
2309
2332
  return this.translator?.translate(...e6);
@@ -2332,16 +2355,16 @@ var K = class e4 extends si {
2332
2355
  return !(s2 && !a2(s2, e6) || r2 && !a2(i2, e6));
2333
2356
  }
2334
2357
  loadNamespaces(e6, t2) {
2335
- let n2 = z();
2336
- return this.options.ns ? (R(e6) && (e6 = [e6]), e6.forEach((e7) => {
2358
+ let n2 = V();
2359
+ return this.options.ns ? (B(e6) && (e6 = [e6]), e6.forEach((e7) => {
2337
2360
  this.options.ns.includes(e7) || this.options.ns.push(e7);
2338
2361
  }), this.loadResources((e7) => {
2339
2362
  n2.resolve(), t2 && t2(e7);
2340
2363
  }), n2) : (t2 && t2(), Promise.resolve());
2341
2364
  }
2342
2365
  loadLanguages(e6, t2) {
2343
- let n2 = z();
2344
- R(e6) && (e6 = [e6]);
2366
+ let n2 = V();
2367
+ B(e6) && (e6 = [e6]);
2345
2368
  let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
2346
2369
  return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
2347
2370
  n2.resolve(), t2 && t2(e7);
@@ -2357,24 +2380,24 @@ var K = class e4 extends si {
2357
2380
  }
2358
2381
  } catch {
2359
2382
  }
2360
- 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());
2383
+ 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());
2361
2384
  return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
2362
2385
  }
2363
2386
  static createInstance(t2 = {}, n2) {
2364
2387
  let r2 = new e4(t2, n2);
2365
2388
  return r2.createInstance = e4.createInstance, r2;
2366
2389
  }
2367
- cloneInstance(t2 = {}, n2 = Ai) {
2390
+ cloneInstance(t2 = {}, n2 = Mi) {
2368
2391
  let r2 = t2.forkResourceStore;
2369
2392
  r2 && delete t2.forkResourceStore;
2370
2393
  let i2 = { ...this.options, preload: false, ...t2, isClone: true }, a2 = new e4(i2);
2371
2394
  if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
2372
2395
  a2[e6] = this[e6];
2373
- }), 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) {
2374
- let e6 = { ...Oi().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
2375
- a2.services.interpolator = new xi(n3);
2396
+ }), 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) {
2397
+ let e6 = { ...Ai().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
2398
+ a2.services.interpolator = new Ci(n3);
2376
2399
  }
2377
- return a2.translator = new mi(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
2400
+ return a2.translator = new gi(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
2378
2401
  a2.emit(e6, ...t3);
2379
2402
  }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
2380
2403
  }
@@ -2382,9 +2405,9 @@ var K = class e4 extends si {
2382
2405
  return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
2383
2406
  }
2384
2407
  }.createInstance();
2385
- 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;
2386
- var Mi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
2387
- let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = K.createInstance(i2 ? s2 : void 0);
2408
+ 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;
2409
+ var Pi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
2410
+ let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = J.createInstance(i2 ? s2 : void 0);
2388
2411
  return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
2389
2412
  try {
2390
2413
  return r3(null, await t2(e7));
@@ -2393,38 +2416,38 @@ var Mi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
2393
2416
  }
2394
2417
  } }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
2395
2418
  };
2396
- function Ni(e6, t2) {
2397
- let n2 = t2 && t2.cache ? t2.cache : Ui, r2 = t2 && t2.serializer ? t2.serializer : Vi;
2398
- return (t2 && t2.strategy ? t2.strategy : Ri)(e6, { cache: n2, serializer: r2 });
2419
+ function Fi(e6, t2) {
2420
+ let n2 = t2 && t2.cache ? t2.cache : Gi, r2 = t2 && t2.serializer ? t2.serializer : Ui;
2421
+ return (t2 && t2.strategy ? t2.strategy : Bi)(e6, { cache: n2, serializer: r2 });
2399
2422
  }
2400
- function Pi(e6) {
2423
+ function Ii(e6) {
2401
2424
  return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
2402
2425
  }
2403
- function Fi(e6, t2, n2, r2) {
2404
- let i2 = Pi(r2) ? r2 : n2(r2), a2 = t2.get(i2);
2426
+ function Li(e6, t2, n2, r2) {
2427
+ let i2 = Ii(r2) ? r2 : n2(r2), a2 = t2.get(i2);
2405
2428
  return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
2406
2429
  }
2407
- function Ii(e6, t2, n2) {
2430
+ function Ri(e6, t2, n2) {
2408
2431
  let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
2409
2432
  return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
2410
2433
  }
2411
- function Li(e6, t2, n2, r2, i2) {
2434
+ function zi(e6, t2, n2, r2, i2) {
2412
2435
  return n2.bind(t2, e6, r2, i2);
2413
2436
  }
2414
- function Ri(e6, t2) {
2415
- let n2 = e6.length === 1 ? Fi : Ii;
2416
- return Li(e6, this, n2, t2.cache.create(), t2.serializer);
2437
+ function Bi(e6, t2) {
2438
+ let n2 = e6.length === 1 ? Li : Ri;
2439
+ return zi(e6, this, n2, t2.cache.create(), t2.serializer);
2417
2440
  }
2418
- function zi(e6, t2) {
2419
- return Li(e6, this, Ii, t2.cache.create(), t2.serializer);
2441
+ function Vi(e6, t2) {
2442
+ return zi(e6, this, Ri, t2.cache.create(), t2.serializer);
2420
2443
  }
2421
- function Bi(e6, t2) {
2422
- return Li(e6, this, Fi, t2.cache.create(), t2.serializer);
2444
+ function Hi(e6, t2) {
2445
+ return zi(e6, this, Li, t2.cache.create(), t2.serializer);
2423
2446
  }
2424
- var Vi = function() {
2447
+ var Ui = function() {
2425
2448
  return JSON.stringify(arguments);
2426
2449
  };
2427
- var Hi = class {
2450
+ var Wi = class {
2428
2451
  constructor() {
2429
2452
  this.cache = /* @__PURE__ */ Object.create(null);
2430
2453
  }
@@ -2435,14 +2458,14 @@ var Hi = class {
2435
2458
  this.cache[e6] = t2;
2436
2459
  }
2437
2460
  };
2438
- var Ui = { create: function() {
2439
- return new Hi();
2461
+ var Gi = { create: function() {
2462
+ return new Wi();
2440
2463
  } };
2441
- var Wi = { variadic: zi, monadic: Bi };
2442
- 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;
2443
- function Ki(e6) {
2464
+ var Ki = { variadic: Vi, monadic: Hi };
2465
+ 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;
2466
+ function Ji(e6) {
2444
2467
  let t2 = {};
2445
- return e6.replace(Gi, (e7) => {
2468
+ return e6.replace(qi, (e7) => {
2446
2469
  let n2 = e7.length;
2447
2470
  switch (e7[0]) {
2448
2471
  case `G`:
@@ -2529,10 +2552,10 @@ function Ki(e6) {
2529
2552
  return ``;
2530
2553
  }), t2;
2531
2554
  }
2532
- var qi = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
2533
- function Ji(e6) {
2555
+ var Yi = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
2556
+ function Xi(e6) {
2534
2557
  if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
2535
- let t2 = e6.split(qi).filter((e7) => e7.length > 0), n2 = [];
2558
+ let t2 = e6.split(Yi).filter((e7) => e7.length > 0), n2 = [];
2536
2559
  for (let e7 of t2) {
2537
2560
  let t3 = e7.split(`/`);
2538
2561
  if (t3.length === 0) throw Error(`Invalid number skeleton`);
@@ -2542,20 +2565,20 @@ function Ji(e6) {
2542
2565
  }
2543
2566
  return n2;
2544
2567
  }
2545
- function Yi(e6) {
2568
+ function Zi(e6) {
2546
2569
  return e6.replace(/^(.*?)-/, ``);
2547
2570
  }
2548
- var Xi = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
2549
- var Zi = /^(@+)?(\+|#+)?[rs]?$/g;
2550
- var Qi = /(\*)(0+)|(#+)(0+)|(0+)/g;
2551
- var $i = /^(0+)$/;
2552
- function ea(e6) {
2571
+ var Qi = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
2572
+ var $i = /^(@+)?(\+|#+)?[rs]?$/g;
2573
+ var ea = /(\*)(0+)|(#+)(0+)|(0+)/g;
2574
+ var ta = /^(0+)$/;
2575
+ function na(e6) {
2553
2576
  let t2 = {};
2554
- return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Zi, function(e7, n2, r2) {
2577
+ return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace($i, function(e7, n2, r2) {
2555
2578
  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), ``;
2556
2579
  }), t2;
2557
2580
  }
2558
- function ta(e6) {
2581
+ function ra(e6) {
2559
2582
  switch (e6) {
2560
2583
  case `sign-auto`:
2561
2584
  return { signDisplay: `auto` };
@@ -2579,19 +2602,19 @@ function ta(e6) {
2579
2602
  return { signDisplay: `never` };
2580
2603
  }
2581
2604
  }
2582
- function na(e6) {
2605
+ function ia(e6) {
2583
2606
  let t2;
2584
2607
  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) {
2585
2608
  let n2 = e6.slice(0, 2);
2586
- 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`);
2609
+ 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`);
2587
2610
  t2.minimumIntegerDigits = e6.length;
2588
2611
  }
2589
2612
  return t2;
2590
2613
  }
2591
- function ra(e6) {
2592
- return ta(e6) || {};
2614
+ function aa(e6) {
2615
+ return ra(e6) || {};
2593
2616
  }
2594
- function ia(e6) {
2617
+ function oa(e6) {
2595
2618
  let t2 = {};
2596
2619
  for (let n2 of e6) {
2597
2620
  switch (n2.stem) {
@@ -2615,7 +2638,7 @@ function ia(e6) {
2615
2638
  continue;
2616
2639
  case `measure-unit`:
2617
2640
  case `unit`:
2618
- t2.style = `unit`, t2.unit = Yi(n2.options[0]);
2641
+ t2.style = `unit`, t2.unit = Zi(n2.options[0]);
2619
2642
  continue;
2620
2643
  case `compact-short`:
2621
2644
  case `K`:
@@ -2626,10 +2649,10 @@ function ia(e6) {
2626
2649
  t2.notation = `compact`, t2.compactDisplay = `long`;
2627
2650
  continue;
2628
2651
  case `scientific`:
2629
- t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...ra(t3) }), {}) };
2652
+ t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...aa(t3) }), {}) };
2630
2653
  continue;
2631
2654
  case `engineering`:
2632
- t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...ra(t3) }), {}) };
2655
+ t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...aa(t3) }), {}) };
2633
2656
  continue;
2634
2657
  case `notation-simple`:
2635
2658
  t2.notation = `standard`;
@@ -2672,7 +2695,7 @@ function ia(e6) {
2672
2695
  continue;
2673
2696
  case `integer-width`:
2674
2697
  if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
2675
- n2.options[0].replace(Qi, function(e8, n3, r3, i2, a2, o2) {
2698
+ n2.options[0].replace(ea, function(e8, n3, r3, i2, a2, o2) {
2676
2699
  if (n3) t2.minimumIntegerDigits = r3.length;
2677
2700
  else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
2678
2701
  else if (o2) throw Error(`We currently do not support exact integer digits`);
@@ -2680,83 +2703,83 @@ function ia(e6) {
2680
2703
  });
2681
2704
  continue;
2682
2705
  }
2683
- if ($i.test(n2.stem)) {
2706
+ if (ta.test(n2.stem)) {
2684
2707
  t2.minimumIntegerDigits = n2.stem.length;
2685
2708
  continue;
2686
2709
  }
2687
- if (Xi.test(n2.stem)) {
2710
+ if (Qi.test(n2.stem)) {
2688
2711
  if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
2689
- n2.stem.replace(Xi, function(e9, n3, r3, i2, a2, o2) {
2712
+ n2.stem.replace(Qi, function(e9, n3, r3, i2, a2, o2) {
2690
2713
  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), ``;
2691
2714
  });
2692
2715
  let e8 = n2.options[0];
2693
- e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...ea(e8) });
2716
+ e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...na(e8) });
2694
2717
  continue;
2695
2718
  }
2696
- if (Zi.test(n2.stem)) {
2697
- t2 = { ...t2, ...ea(n2.stem) };
2719
+ if ($i.test(n2.stem)) {
2720
+ t2 = { ...t2, ...na(n2.stem) };
2698
2721
  continue;
2699
2722
  }
2700
- let e7 = ta(n2.stem);
2723
+ let e7 = ra(n2.stem);
2701
2724
  e7 && (t2 = { ...t2, ...e7 });
2702
- let r2 = na(n2.stem);
2725
+ let r2 = ia(n2.stem);
2703
2726
  r2 && (t2 = { ...t2, ...r2 });
2704
2727
  }
2705
2728
  return t2;
2706
2729
  }
2707
- var aa = function(e6) {
2730
+ var sa = function(e6) {
2708
2731
  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;
2709
2732
  }({});
2710
- function oa(e6) {
2733
+ function ca(e6) {
2711
2734
  return e6.type === 0;
2712
2735
  }
2713
- function sa(e6) {
2736
+ function la(e6) {
2714
2737
  return e6.type === 1;
2715
2738
  }
2716
- function ca(e6) {
2739
+ function ua(e6) {
2717
2740
  return e6.type === 2;
2718
2741
  }
2719
- function la(e6) {
2742
+ function da(e6) {
2720
2743
  return e6.type === 3;
2721
2744
  }
2722
- function ua(e6) {
2745
+ function fa(e6) {
2723
2746
  return e6.type === 4;
2724
2747
  }
2725
- function da(e6) {
2748
+ function pa(e6) {
2726
2749
  return e6.type === 5;
2727
2750
  }
2728
- function fa(e6) {
2751
+ function ma(e6) {
2729
2752
  return e6.type === 6;
2730
2753
  }
2731
- function pa(e6) {
2754
+ function ha(e6) {
2732
2755
  return e6.type === 7;
2733
2756
  }
2734
- function ma(e6) {
2757
+ function ga(e6) {
2735
2758
  return e6.type === 8;
2736
2759
  }
2737
- function ha(e6) {
2760
+ function _a(e6) {
2738
2761
  return !!(e6 && typeof e6 == `object` && e6.type === 0);
2739
2762
  }
2740
- function ga(e6) {
2763
+ function va(e6) {
2741
2764
  return !!(e6 && typeof e6 == `object` && e6.type === 1);
2742
2765
  }
2743
- var _a = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
2744
- 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`] };
2745
- function va(e6, t2) {
2766
+ var ya = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
2767
+ 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`] };
2768
+ function ba(e6, t2) {
2746
2769
  let n2 = ``;
2747
2770
  for (let r2 = 0; r2 < e6.length; r2++) {
2748
2771
  let i2 = e6.charAt(r2);
2749
2772
  if (i2 === `j`) {
2750
2773
  let a2 = 0;
2751
2774
  for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
2752
- let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = ya(t2);
2775
+ let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = xa(t2);
2753
2776
  for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
2754
2777
  for (; o2-- > 0; ) n2 = c2 + n2;
2755
2778
  } else n2 += i2 === `J` ? `H` : i2;
2756
2779
  }
2757
2780
  return n2;
2758
2781
  }
2759
- function ya(e6) {
2782
+ function xa(e6) {
2760
2783
  let t2 = e6.hourCycle;
2761
2784
  if (t2 === void 0) {
2762
2785
  let n3 = e6;
@@ -2775,36 +2798,36 @@ function ya(e6) {
2775
2798
  throw Error(`Invalid hourCycle`);
2776
2799
  }
2777
2800
  let n2 = e6.language, r2;
2778
- return n2 !== `root` && (r2 = e6.maximize().region), (q[`${n2}-${r2}`] || q[r2 || ``] || q[n2 || ``] || q[`${n2}-001`] || q[`001`])[0].charAt(0);
2801
+ return n2 !== `root` && (r2 = e6.maximize().region), (Y[`${n2}-${r2}`] || Y[r2 || ``] || Y[n2 || ``] || Y[`${n2}-001`] || Y[`001`])[0].charAt(0);
2779
2802
  }
2780
- var ba = RegExp(`^${_a.source}*`);
2781
- var xa = RegExp(`${_a.source}*$`);
2782
- function J(e6, t2) {
2803
+ var Sa = RegExp(`^${ya.source}*`);
2804
+ var Ca = RegExp(`${ya.source}*$`);
2805
+ function X(e6, t2) {
2783
2806
  return { start: e6, end: t2 };
2784
2807
  }
2785
- var Sa = !!Object.fromEntries;
2786
- var Ca = !!String.prototype.trimStart;
2787
- var wa = !!String.prototype.trimEnd;
2788
- var Ta = Sa ? Object.fromEntries : function(e6) {
2808
+ var wa = !!Object.fromEntries;
2809
+ var Ta = !!String.prototype.trimStart;
2810
+ var Ea = !!String.prototype.trimEnd;
2811
+ var Da = wa ? Object.fromEntries : function(e6) {
2789
2812
  let t2 = {};
2790
2813
  for (let [n2, r2] of e6) t2[n2] = r2;
2791
2814
  return t2;
2792
2815
  };
2793
- var Ea = Ca ? function(e6) {
2816
+ var Oa = Ta ? function(e6) {
2794
2817
  return e6.trimStart();
2795
2818
  } : function(e6) {
2796
- return e6.replace(ba, ``);
2819
+ return e6.replace(Sa, ``);
2797
2820
  };
2798
- var Da = wa ? function(e6) {
2821
+ var ka = Ea ? function(e6) {
2799
2822
  return e6.trimEnd();
2800
2823
  } : function(e6) {
2801
- return e6.replace(xa, ``);
2824
+ return e6.replace(Ca, ``);
2802
2825
  };
2803
- var Oa = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
2804
- function ka(e6, t2) {
2805
- return Oa.lastIndex = t2, Oa.exec(e6)[1] ?? ``;
2826
+ var Aa = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
2827
+ function ja(e6, t2) {
2828
+ return Aa.lastIndex = t2, Aa.exec(e6)[1] ?? ``;
2806
2829
  }
2807
- function Aa(e6) {
2830
+ function Ma(e6) {
2808
2831
  if (e6.length === 0) return null;
2809
2832
  let t2 = 1, n2 = 1;
2810
2833
  for (let r2 = 0; r2 < e6.length; ) {
@@ -2825,7 +2848,7 @@ function Aa(e6) {
2825
2848
  }
2826
2849
  return { offset: e6.length, line: t2, column: n2 };
2827
2850
  }
2828
- var ja = class {
2851
+ var Na = class {
2829
2852
  constructor(e6, t2 = {}) {
2830
2853
  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;
2831
2854
  }
@@ -2834,10 +2857,10 @@ var ja = class {
2834
2857
  if (this.message.length > 0) {
2835
2858
  let e6 = this.message.charCodeAt(0);
2836
2859
  if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
2837
- let e7 = Aa(this.message);
2860
+ let e7 = Ma(this.message);
2838
2861
  if (e7) {
2839
2862
  let t2 = this.clonePosition();
2840
- return this.position = e7, { val: [{ type: 0, value: this.message, location: J(t2, this.clonePosition()) }], err: null };
2863
+ return this.position = e7, { val: [{ type: 0, value: this.message, location: X(t2, this.clonePosition()) }], err: null };
2841
2864
  }
2842
2865
  }
2843
2866
  }
@@ -2854,11 +2877,11 @@ var ja = class {
2854
2877
  } else if (i2 === 125 && e6 > 0) break;
2855
2878
  else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
2856
2879
  let e7 = this.clonePosition();
2857
- this.bump(), r2.push({ type: 7, location: J(e7, this.clonePosition()) });
2880
+ this.bump(), r2.push({ type: 7, location: X(e7, this.clonePosition()) });
2858
2881
  } else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
2859
2882
  if (n2) break;
2860
- return this.error(26, J(this.clonePosition(), this.clonePosition()));
2861
- } else if (i2 === 60 && !this.ignoreTag && Ma(this.peek() || 0)) {
2883
+ return this.error(26, X(this.clonePosition(), this.clonePosition()));
2884
+ } else if (i2 === 60 && !this.ignoreTag && Pa(this.peek() || 0)) {
2862
2885
  let n3 = this.parseTag(e6, t2);
2863
2886
  if (n3.err) return n3;
2864
2887
  r2.push(n3.val);
@@ -2874,23 +2897,23 @@ var ja = class {
2874
2897
  let n2 = this.clonePosition();
2875
2898
  this.bump();
2876
2899
  let r2 = this.parseTagName();
2877
- if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: J(n2, this.clonePosition()) }, err: null };
2900
+ if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: X(n2, this.clonePosition()) }, err: null };
2878
2901
  if (this.bumpIf(`>`)) {
2879
2902
  let i2 = this.parseMessage(e6 + 1, t2, true);
2880
2903
  if (i2.err) return i2;
2881
2904
  let a2 = i2.val, o2 = this.clonePosition();
2882
2905
  if (this.bumpIf(`</`)) {
2883
- if (this.isEOF() || !Ma(this.char())) return this.error(23, J(o2, this.clonePosition()));
2906
+ if (this.isEOF() || !Pa(this.char())) return this.error(23, X(o2, this.clonePosition()));
2884
2907
  let e7 = this.clonePosition();
2885
- 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()));
2908
+ 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()));
2886
2909
  }
2887
- return this.error(27, J(n2, this.clonePosition()));
2910
+ return this.error(27, X(n2, this.clonePosition()));
2888
2911
  }
2889
- return this.error(23, J(n2, this.clonePosition()));
2912
+ return this.error(23, X(n2, this.clonePosition()));
2890
2913
  }
2891
2914
  parseTagName() {
2892
2915
  let e6 = this.offset();
2893
- for (this.bump(); !this.isEOF() && Pa(this.char()); ) this.bump();
2916
+ for (this.bump(); !this.isEOF() && Ia(this.char()); ) this.bump();
2894
2917
  return this.message.slice(e6, this.offset());
2895
2918
  }
2896
2919
  parseLiteral(e6, t2) {
@@ -2910,11 +2933,11 @@ var ja = class {
2910
2933
  if (a2) r2 += a2;
2911
2934
  else break;
2912
2935
  }
2913
- let i2 = J(n2, this.clonePosition());
2936
+ let i2 = X(n2, this.clonePosition());
2914
2937
  return { val: { type: 0, value: r2, location: i2 }, err: null };
2915
2938
  }
2916
2939
  tryParseLeftAngleBracket() {
2917
- return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !Na(this.peek() || 0)) ? (this.bump(), `<`) : null;
2940
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !Fa(this.peek() || 0)) ? (this.bump(), `<`) : null;
2918
2941
  }
2919
2942
  tryParseQuote(e6) {
2920
2943
  if (this.isEOF() || this.char() !== 39) return null;
@@ -2954,29 +2977,29 @@ var ja = class {
2954
2977
  }
2955
2978
  parseArgument(e6, t2) {
2956
2979
  let n2 = this.clonePosition();
2957
- if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, J(n2, this.clonePosition()));
2958
- if (this.char() === 125) return this.bump(), this.error(2, J(n2, this.clonePosition()));
2980
+ if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, X(n2, this.clonePosition()));
2981
+ if (this.char() === 125) return this.bump(), this.error(2, X(n2, this.clonePosition()));
2959
2982
  let r2 = this.parseIdentifierIfPossible().value;
2960
- if (!r2) return this.error(3, J(n2, this.clonePosition()));
2961
- if (this.bumpSpace(), this.isEOF()) return this.error(1, J(n2, this.clonePosition()));
2983
+ if (!r2) return this.error(3, X(n2, this.clonePosition()));
2984
+ if (this.bumpSpace(), this.isEOF()) return this.error(1, X(n2, this.clonePosition()));
2962
2985
  switch (this.char()) {
2963
2986
  case 125:
2964
- return this.bump(), { val: { type: 1, value: r2, location: J(n2, this.clonePosition()) }, err: null };
2987
+ return this.bump(), { val: { type: 1, value: r2, location: X(n2, this.clonePosition()) }, err: null };
2965
2988
  case 44:
2966
- return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, J(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
2989
+ return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, X(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
2967
2990
  default:
2968
- return this.error(3, J(n2, this.clonePosition()));
2991
+ return this.error(3, X(n2, this.clonePosition()));
2969
2992
  }
2970
2993
  }
2971
2994
  parseIdentifierIfPossible() {
2972
- let e6 = this.clonePosition(), t2 = this.offset(), n2 = ka(this.message, t2), r2 = t2 + n2.length;
2973
- return this.bumpTo(r2), { value: n2, location: J(e6, this.clonePosition()) };
2995
+ let e6 = this.clonePosition(), t2 = this.offset(), n2 = ja(this.message, t2), r2 = t2 + n2.length;
2996
+ return this.bumpTo(r2), { value: n2, location: X(e6, this.clonePosition()) };
2974
2997
  }
2975
2998
  parseArgumentOptions(e6, t2, n2, r2) {
2976
2999
  let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
2977
3000
  switch (a2) {
2978
3001
  case ``:
2979
- return this.error(4, J(i2, o2));
3002
+ return this.error(4, X(i2, o2));
2980
3003
  case `number`:
2981
3004
  case `date`:
2982
3005
  case `time`: {
@@ -2986,15 +3009,15 @@ var ja = class {
2986
3009
  this.bumpSpace();
2987
3010
  let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
2988
3011
  if (n3.err) return n3;
2989
- let r3 = Da(n3.val);
2990
- if (r3.length === 0) return this.error(6, J(this.clonePosition(), this.clonePosition()));
2991
- e7 = { style: r3, styleLocation: J(t4, this.clonePosition()) };
3012
+ let r3 = ka(n3.val);
3013
+ if (r3.length === 0) return this.error(6, X(this.clonePosition(), this.clonePosition()));
3014
+ e7 = { style: r3, styleLocation: X(t4, this.clonePosition()) };
2992
3015
  }
2993
3016
  let t3 = this.tryParseArgumentClose(r2);
2994
3017
  if (t3.err) return t3;
2995
- let i3 = J(r2, this.clonePosition());
3018
+ let i3 = X(r2, this.clonePosition());
2996
3019
  if (e7 && e7.style.startsWith(`::`)) {
2997
- let t4 = Ea(e7.style.slice(2));
3020
+ let t4 = Oa(e7.style.slice(2));
2998
3021
  if (a2 === `number`) {
2999
3022
  let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
3000
3023
  return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
@@ -3002,8 +3025,8 @@ var ja = class {
3002
3025
  {
3003
3026
  if (t4.length === 0) return this.error(10, i3);
3004
3027
  let r3 = t4;
3005
- this.locale && (r3 = va(t4, this.locale));
3006
- let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Ki(r3) : {} };
3028
+ this.locale && (r3 = ba(t4, this.locale));
3029
+ let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Ji(r3) : {} };
3007
3030
  return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
3008
3031
  }
3009
3032
  }
@@ -3013,11 +3036,11 @@ var ja = class {
3013
3036
  case `selectordinal`:
3014
3037
  case `select`: {
3015
3038
  let i3 = this.clonePosition();
3016
- if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, J(i3, { ...i3 }));
3039
+ if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, X(i3, { ...i3 }));
3017
3040
  this.bumpSpace();
3018
3041
  let o3 = this.parseIdentifierIfPossible(), s2 = 0;
3019
3042
  if (a2 !== `select` && o3.value === `offset`) {
3020
- if (!this.bumpIf(`:`)) return this.error(13, J(this.clonePosition(), this.clonePosition()));
3043
+ if (!this.bumpIf(`:`)) return this.error(13, X(this.clonePosition(), this.clonePosition()));
3021
3044
  this.bumpSpace();
3022
3045
  let e7 = this.tryParseDecimalInteger(13, 14);
3023
3046
  if (e7.err) return e7;
@@ -3027,15 +3050,15 @@ var ja = class {
3027
3050
  if (c2.err) return c2;
3028
3051
  let l2 = this.tryParseArgumentClose(r2);
3029
3052
  if (l2.err) return l2;
3030
- let u2 = J(r2, this.clonePosition());
3031
- 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 };
3053
+ let u2 = X(r2, this.clonePosition());
3054
+ 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 };
3032
3055
  }
3033
3056
  default:
3034
- return this.error(5, J(i2, o2));
3057
+ return this.error(5, X(i2, o2));
3035
3058
  }
3036
3059
  }
3037
3060
  tryParseArgumentClose(e6) {
3038
- return this.isEOF() || this.char() !== 125 ? this.error(1, J(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
3061
+ return this.isEOF() || this.char() !== 125 ? this.error(1, X(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
3039
3062
  }
3040
3063
  parseSimpleArgStyleIfPossible() {
3041
3064
  let e6 = 0, t2 = this.clonePosition();
@@ -3043,7 +3066,7 @@ var ja = class {
3043
3066
  case 39: {
3044
3067
  this.bump();
3045
3068
  let e7 = this.clonePosition();
3046
- if (!this.bumpUntil(`'`)) return this.error(11, J(e7, this.clonePosition()));
3069
+ if (!this.bumpUntil(`'`)) return this.error(11, X(e7, this.clonePosition()));
3047
3070
  this.bump();
3048
3071
  break;
3049
3072
  }
@@ -3062,11 +3085,11 @@ var ja = class {
3062
3085
  parseNumberSkeletonFromString(e6, t2) {
3063
3086
  let n2 = [];
3064
3087
  try {
3065
- n2 = Ji(e6);
3088
+ n2 = Xi(e6);
3066
3089
  } catch {
3067
3090
  return this.error(7, t2);
3068
3091
  }
3069
- return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? ia(n2) : {} }, err: null };
3092
+ return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? oa(n2) : {} }, err: null };
3070
3093
  }
3071
3094
  tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
3072
3095
  let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
@@ -3076,20 +3099,20 @@ var ja = class {
3076
3099
  if (t2 !== `select` && this.bumpIf(`=`)) {
3077
3100
  let t3 = this.tryParseDecimalInteger(16, 19);
3078
3101
  if (t3.err) return t3;
3079
- c2 = J(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
3102
+ c2 = X(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
3080
3103
  } else break;
3081
3104
  }
3082
3105
  if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
3083
3106
  s2 === `other` && (i2 = true), this.bumpSpace();
3084
3107
  let r3 = this.clonePosition();
3085
- if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, J(this.clonePosition(), this.clonePosition()));
3108
+ if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, X(this.clonePosition(), this.clonePosition()));
3086
3109
  let l2 = this.parseMessage(e6 + 1, t2, n2);
3087
3110
  if (l2.err) return l2;
3088
3111
  let u2 = this.tryParseArgumentClose(r3);
3089
3112
  if (u2.err) return u2;
3090
- a2.push([s2, { value: l2.val, location: J(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
3113
+ a2.push([s2, { value: l2.val, location: X(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
3091
3114
  }
3092
- 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 };
3115
+ 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 };
3093
3116
  }
3094
3117
  tryParseDecimalInteger(e6, t2) {
3095
3118
  let n2 = 1, r2 = this.clonePosition();
@@ -3100,7 +3123,7 @@ var ja = class {
3100
3123
  if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
3101
3124
  else break;
3102
3125
  }
3103
- let o2 = J(r2, this.clonePosition());
3126
+ let o2 = X(r2, this.clonePosition());
3104
3127
  return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
3105
3128
  }
3106
3129
  offset() {
@@ -3148,7 +3171,7 @@ var ja = class {
3148
3171
  }
3149
3172
  }
3150
3173
  bumpSpace() {
3151
- for (; !this.isEOF() && Fa(this.char()); ) this.bump();
3174
+ for (; !this.isEOF() && La(this.char()); ) this.bump();
3152
3175
  }
3153
3176
  peek() {
3154
3177
  if (this.isEOF()) return null;
@@ -3156,34 +3179,34 @@ var ja = class {
3156
3179
  return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
3157
3180
  }
3158
3181
  };
3159
- function Ma(e6) {
3182
+ function Pa(e6) {
3160
3183
  return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
3161
3184
  }
3162
- function Na(e6) {
3163
- return Ma(e6) || e6 === 47;
3185
+ function Fa(e6) {
3186
+ return Pa(e6) || e6 === 47;
3164
3187
  }
3165
- function Pa(e6) {
3188
+ function Ia(e6) {
3166
3189
  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;
3167
3190
  }
3168
- function Fa(e6) {
3191
+ function La(e6) {
3169
3192
  return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
3170
3193
  }
3171
- function Ia(e6) {
3194
+ function Ra(e6) {
3172
3195
  e6.forEach((e7) => {
3173
- if (delete e7.location, da(e7) || fa(e7)) for (let t2 in e7.options) delete e7.options[t2].location, Ia(e7.options[t2].value);
3174
- else ca(e7) && ha(e7.style) || (la(e7) || ua(e7)) && ga(e7.style) ? delete e7.style.location : ma(e7) && Ia(e7.children);
3196
+ if (delete e7.location, pa(e7) || ma(e7)) for (let t2 in e7.options) delete e7.options[t2].location, Ra(e7.options[t2].value);
3197
+ else ua(e7) && _a(e7.style) || (da(e7) || fa(e7)) && va(e7.style) ? delete e7.style.location : ga(e7) && Ra(e7.children);
3175
3198
  });
3176
3199
  }
3177
- function La(e6, t2 = {}) {
3200
+ function za(e6, t2 = {}) {
3178
3201
  t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
3179
- let n2 = new ja(e6, t2).parse();
3202
+ let n2 = new Na(e6, t2).parse();
3180
3203
  if (n2.err) {
3181
- let e7 = SyntaxError(aa[n2.err.kind]);
3204
+ let e7 = SyntaxError(sa[n2.err.kind]);
3182
3205
  throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
3183
3206
  }
3184
- return t2?.captureLocation || Ia(n2.val), n2.val;
3207
+ return t2?.captureLocation || Ra(n2.val), n2.val;
3185
3208
  }
3186
- var Ra = class extends Error {
3209
+ var Ba = class extends Error {
3187
3210
  constructor(e6, t2, n2) {
3188
3211
  super(e6), this.code = t2, this.originalMessage = n2;
3189
3212
  }
@@ -3191,54 +3214,54 @@ var Ra = class extends Error {
3191
3214
  return `[formatjs Error: ${this.code}] ${this.message}`;
3192
3215
  }
3193
3216
  };
3194
- var za = class extends Ra {
3217
+ var Va = class extends Ba {
3195
3218
  constructor(e6, t2, n2, r2) {
3196
3219
  super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
3197
3220
  }
3198
3221
  };
3199
- var Ba = class extends Ra {
3222
+ var Ha = class extends Ba {
3200
3223
  constructor(e6, t2, n2) {
3201
3224
  super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
3202
3225
  }
3203
3226
  };
3204
- var Va = class extends Ra {
3227
+ var Ua = class extends Ba {
3205
3228
  constructor(e6, t2) {
3206
3229
  super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
3207
3230
  }
3208
3231
  };
3209
- function Ha(e6) {
3232
+ function Wa(e6) {
3210
3233
  return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
3211
3234
  let n2 = e7[e7.length - 1];
3212
3235
  return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
3213
3236
  }, []);
3214
3237
  }
3215
- function Ua(e6) {
3238
+ function Ga(e6) {
3216
3239
  return typeof e6 == `function`;
3217
3240
  }
3218
- function Y(e6, t2, n2, r2, i2, a2, o2) {
3219
- if (e6.length === 1 && oa(e6[0])) return [{ type: 0, value: e6[0].value }];
3241
+ function Ka(e6, t2, n2, r2, i2, a2, o2) {
3242
+ if (e6.length === 1 && ca(e6[0])) return [{ type: 0, value: e6[0].value }];
3220
3243
  let s2 = [];
3221
3244
  for (let c2 of e6) {
3222
- if (oa(c2)) {
3245
+ if (ca(c2)) {
3223
3246
  s2.push({ type: 0, value: c2.value });
3224
3247
  continue;
3225
3248
  }
3226
- if (pa(c2)) {
3249
+ if (ha(c2)) {
3227
3250
  typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
3228
3251
  continue;
3229
3252
  }
3230
3253
  let { value: e7 } = c2;
3231
- if (!(i2 && e7 in i2)) throw new Va(e7, o2);
3254
+ if (!(i2 && e7 in i2)) throw new Ua(e7, o2);
3232
3255
  let l2 = i2[e7];
3233
- 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 });
3234
- else if (la(c2)) {
3235
- let e8 = typeof c2.style == `string` ? r2.date[c2.style] : ga(c2.style) ? c2.style.parsedOptions : void 0;
3256
+ 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 });
3257
+ else if (da(c2)) {
3258
+ let e8 = typeof c2.style == `string` ? r2.date[c2.style] : va(c2.style) ? c2.style.parsedOptions : void 0;
3236
3259
  s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
3237
- } else if (ua(c2)) {
3238
- let e8 = typeof c2.style == `string` ? r2.time[c2.style] : ga(c2.style) ? c2.style.parsedOptions : r2.time.medium;
3260
+ } else if (fa(c2)) {
3261
+ let e8 = typeof c2.style == `string` ? r2.time[c2.style] : va(c2.style) ? c2.style.parsedOptions : r2.time.medium;
3239
3262
  s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
3240
- } else if (ca(c2)) {
3241
- let e8 = typeof c2.style == `string` ? r2.number[c2.style] : ha(c2.style) ? c2.style.parsedOptions : void 0;
3263
+ } else if (ua(c2)) {
3264
+ let e8 = typeof c2.style == `string` ? r2.number[c2.style] : _a(c2.style) ? c2.style.parsedOptions : void 0;
3242
3265
  if (e8 && e8.scale) {
3243
3266
  let t3 = e8.scale || 1;
3244
3267
  if (typeof l2 == `bigint`) {
@@ -3248,40 +3271,40 @@ function Y(e6, t2, n2, r2, i2, a2, o2) {
3248
3271
  }
3249
3272
  s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
3250
3273
  } else {
3251
- if (ma(c2)) {
3274
+ if (ga(c2)) {
3252
3275
  let { children: e8, value: l3 } = c2, u2 = i2[l3];
3253
- if (!Ua(u2)) throw new Ba(l3, `function`, o2);
3254
- let d2 = u2(Y(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
3276
+ if (!Ga(u2)) throw new Ha(l3, `function`, o2);
3277
+ let d2 = u2(Ka(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
3255
3278
  Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
3256
3279
  }
3257
- if (da(c2)) {
3280
+ if (pa(c2)) {
3258
3281
  let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
3259
- if (!a3) throw new za(c2.value, l2, Object.keys(c2.options), o2);
3260
- s2.push(...Y(a3.value, t2, n2, r2, i2));
3261
- } else if (fa(c2)) {
3282
+ if (!a3) throw new Va(c2.value, l2, Object.keys(c2.options), o2);
3283
+ s2.push(...Ka(a3.value, t2, n2, r2, i2));
3284
+ } else if (ma(c2)) {
3262
3285
  let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
3263
3286
  if (!a3) {
3264
- if (!Intl.PluralRules) throw new Ra(`Intl.PluralRules is not available in this environment.
3287
+ if (!Intl.PluralRules) throw new Ba(`Intl.PluralRules is not available in this environment.
3265
3288
  Try polyfilling it using "@formatjs/intl-pluralrules"
3266
3289
  `, `MISSING_INTL_API`, o2);
3267
3290
  let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
3268
3291
  a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
3269
3292
  }
3270
- if (!a3) throw new za(c2.value, l2, Object.keys(c2.options), o2);
3293
+ if (!a3) throw new Va(c2.value, l2, Object.keys(c2.options), o2);
3271
3294
  let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
3272
- s2.push(...Y(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
3295
+ s2.push(...Ka(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
3273
3296
  }
3274
3297
  }
3275
3298
  }
3276
- return Ha(s2);
3299
+ return Wa(s2);
3277
3300
  }
3278
- function Wa(e6, t2) {
3301
+ function qa(e6, t2) {
3279
3302
  return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
3280
3303
  }
3281
- function Ga(e6, t2) {
3282
- return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Wa(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
3304
+ function Ja(e6, t2) {
3305
+ return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = qa(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
3283
3306
  }
3284
- function Ka(e6) {
3307
+ function Ya(e6) {
3285
3308
  return { create() {
3286
3309
  return { get(t2) {
3287
3310
  return e6[t2];
@@ -3290,23 +3313,23 @@ function Ka(e6) {
3290
3313
  } };
3291
3314
  } };
3292
3315
  }
3293
- function qa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
3294
- 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 }) };
3316
+ function Xa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
3317
+ 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 }) };
3295
3318
  }
3296
- var Ja = class e5 {
3319
+ var Za = class e5 {
3297
3320
  constructor(t2, n2 = e5.defaultLocale, r2, i2) {
3298
3321
  if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
3299
3322
  let t3 = this.formatToParts(e6);
3300
3323
  if (t3.length === 1) return t3[0].value;
3301
3324
  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), []);
3302
3325
  return n3.length <= 1 ? n3[0] || `` : n3;
3303
- }, 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`) {
3326
+ }, 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`) {
3304
3327
  if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
3305
3328
  let { ...n3 } = i2 || {};
3306
3329
  this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
3307
3330
  } else this.ast = t2;
3308
3331
  if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
3309
- this.formats = Ga(e5.formats, r2), this.formatters = i2 && i2.formatters || qa(this.formatterCache);
3332
+ this.formats = Ja(e5.formats, r2), this.formatters = i2 && i2.formatters || Xa(this.formatterCache);
3310
3333
  }
3311
3334
  static {
3312
3335
  this.memoizedDefaultLocale = null;
@@ -3322,14 +3345,14 @@ var Ja = class e5 {
3322
3345
  };
3323
3346
  }
3324
3347
  static {
3325
- this.__parse = La;
3348
+ this.__parse = za;
3326
3349
  }
3327
3350
  static {
3328
3351
  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` } } };
3329
3352
  }
3330
3353
  };
3331
- var Ya = [`__proto__`, `constructor`, `prototype`];
3332
- function Xa(e6, t2, n2) {
3354
+ var Qa = [`__proto__`, `constructor`, `prototype`];
3355
+ function $a(e6, t2, n2) {
3333
3356
  function r2(e7) {
3334
3357
  return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
3335
3358
  }
@@ -3339,49 +3362,49 @@ function Xa(e6, t2, n2) {
3339
3362
  for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
3340
3363
  if (i2()) return {};
3341
3364
  var o2 = r2(a2.shift());
3342
- if (Ya.indexOf(o2) > -1) return {};
3365
+ if (Qa.indexOf(o2) > -1) return {};
3343
3366
  !e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
3344
3367
  }
3345
3368
  if (i2()) return {};
3346
3369
  var s2 = r2(a2.shift());
3347
- return Ya.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
3370
+ return Qa.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
3348
3371
  }
3349
- function Za(e6, t2, n2) {
3350
- var r2 = Xa(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
3372
+ function eo(e6, t2, n2) {
3373
+ var r2 = $a(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
3351
3374
  i2 !== void 0 && (i2[a2] = n2);
3352
3375
  }
3353
- function Qa(e6, t2) {
3354
- var n2 = Xa(e6, t2), r2 = n2.obj, i2 = n2.k;
3376
+ function to(e6, t2) {
3377
+ var n2 = $a(e6, t2), r2 = n2.obj, i2 = n2.k;
3355
3378
  if (r2) return r2[i2];
3356
3379
  }
3357
- function $a(e6) {
3380
+ function no(e6) {
3358
3381
  return [...arguments].slice(1).forEach(function(t2) {
3359
3382
  if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
3360
3383
  var i2 = r2[n2];
3361
- Ya.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
3384
+ Qa.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
3362
3385
  }
3363
3386
  }), e6;
3364
3387
  }
3365
- function eo(e6, t2) {
3366
- return ao(e6) || io(e6, t2) || no(e6, t2) || to();
3388
+ function ro(e6, t2) {
3389
+ return co(e6) || so(e6, t2) || ao(e6, t2) || io();
3367
3390
  }
3368
- function to() {
3391
+ function io() {
3369
3392
  throw TypeError(`Invalid attempt to destructure non-iterable instance.
3370
3393
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
3371
3394
  }
3372
- function no(e6, t2) {
3395
+ function ao(e6, t2) {
3373
3396
  if (e6) {
3374
- if (typeof e6 == `string`) return ro(e6, t2);
3397
+ if (typeof e6 == `string`) return oo(e6, t2);
3375
3398
  var n2 = {}.toString.call(e6).slice(8, -1);
3376
- 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;
3399
+ 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;
3377
3400
  }
3378
3401
  }
3379
- function ro(e6, t2) {
3402
+ function oo(e6, t2) {
3380
3403
  (t2 == null || t2 > e6.length) && (t2 = e6.length);
3381
3404
  for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
3382
3405
  return r2;
3383
3406
  }
3384
- function io(e6, t2) {
3407
+ function so(e6, t2) {
3385
3408
  var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
3386
3409
  if (n2 != null) {
3387
3410
  var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
@@ -3402,10 +3425,10 @@ function io(e6, t2) {
3402
3425
  return s2;
3403
3426
  }
3404
3427
  }
3405
- function ao(e6) {
3428
+ function co(e6) {
3406
3429
  if (Array.isArray(e6)) return e6;
3407
3430
  }
3408
- function oo(e6, t2) {
3431
+ function lo(e6, t2) {
3409
3432
  var n2 = Object.keys(e6);
3410
3433
  if (Object.getOwnPropertySymbols) {
3411
3434
  var r2 = Object.getOwnPropertySymbols(e6);
@@ -3415,37 +3438,37 @@ function oo(e6, t2) {
3415
3438
  }
3416
3439
  return n2;
3417
3440
  }
3418
- function X(e6) {
3441
+ function uo(e6) {
3419
3442
  for (var t2 = 1; t2 < arguments.length; t2++) {
3420
3443
  var n2 = arguments[t2] == null ? {} : arguments[t2];
3421
- t2 % 2 ? oo(Object(n2), true).forEach(function(t3) {
3422
- so(e6, t3, n2[t3]);
3423
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : oo(Object(n2)).forEach(function(t3) {
3444
+ t2 % 2 ? lo(Object(n2), true).forEach(function(t3) {
3445
+ fo(e6, t3, n2[t3]);
3446
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : lo(Object(n2)).forEach(function(t3) {
3424
3447
  Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
3425
3448
  });
3426
3449
  }
3427
3450
  return e6;
3428
3451
  }
3429
- function so(e6, t2, n2) {
3430
- return (t2 = fo(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
3452
+ function fo(e6, t2, n2) {
3453
+ return (t2 = go(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
3431
3454
  }
3432
- function co(e6, t2) {
3455
+ function po(e6, t2) {
3433
3456
  if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
3434
3457
  }
3435
- function lo(e6, t2) {
3458
+ function mo(e6, t2) {
3436
3459
  for (var n2 = 0; n2 < t2.length; n2++) {
3437
3460
  var r2 = t2[n2];
3438
- r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, fo(r2.key), r2);
3461
+ r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, go(r2.key), r2);
3439
3462
  }
3440
3463
  }
3441
- function uo(e6, t2, n2) {
3442
- return t2 && lo(e6.prototype, t2), n2 && lo(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
3464
+ function ho(e6, t2, n2) {
3465
+ return t2 && mo(e6.prototype, t2), n2 && mo(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
3443
3466
  }
3444
- function fo(e6) {
3445
- var t2 = po(e6, `string`);
3467
+ function go(e6) {
3468
+ var t2 = _o(e6, `string`);
3446
3469
  return Z(t2) == `symbol` ? t2 : t2 + ``;
3447
3470
  }
3448
- function po(e6, t2) {
3471
+ function _o(e6, t2) {
3449
3472
  if (Z(e6) != `object` || !e6) return e6;
3450
3473
  var n2 = e6[Symbol.toPrimitive];
3451
3474
  if (n2 !== void 0) {
@@ -3463,53 +3486,53 @@ function Z(e6) {
3463
3486
  return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
3464
3487
  }, Z(e6);
3465
3488
  }
3466
- var mo = `https://www.i18next.com/how-to/using-icu-or-mf2`;
3467
- var ho = [`zero`, `one`, `two`, `few`, `many`, `other`];
3468
- function go() {
3489
+ var vo = `https://www.i18next.com/how-to/using-icu-or-mf2`;
3490
+ var yo = [`zero`, `one`, `two`, `few`, `many`, `other`];
3491
+ function bo() {
3469
3492
  return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
3470
3493
  return n2;
3471
3494
  }, parseLngForICU: function(e6) {
3472
3495
  return e6;
3473
3496
  }, escapeVariables: false };
3474
3497
  }
3475
- function _o(e6, t2, n2, r2) {
3498
+ function xo(e6, t2, n2, r2) {
3476
3499
  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}`;
3477
3500
  }
3478
- var vo = function() {
3501
+ var So = function() {
3479
3502
  function e6(t2) {
3480
- co(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
3503
+ po(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
3481
3504
  }
3482
- return uo(e6, [{ key: `init`, value: function(e7, t2) {
3505
+ return ho(e6, [{ key: `init`, value: function(e7, t2) {
3483
3506
  var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
3484
- if (this.options = $a(r2, t2, this.options || {}, go()), this.formats = this.options.formats, e7) {
3507
+ if (this.options = no(r2, t2, this.options || {}, bo()), this.formats = this.options.formats, e7) {
3485
3508
  var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
3486
- 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() {
3509
+ 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() {
3487
3510
  return n2.clearCache();
3488
3511
  }), o2 && e7.store.on(o2, function() {
3489
3512
  return n2.clearCache();
3490
3513
  }));
3491
3514
  }
3492
3515
  } }, { key: `addUserDefinedFormats`, value: function(e7) {
3493
- this.formats = this.formats ? X(X({}, this.formats), e7) : e7, this.clearCache();
3516
+ this.formats = this.formats ? uo(uo({}, this.formats), e7) : e7, this.clearCache();
3494
3517
  } }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
3495
3518
  var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && [n2, r2, i2], c2;
3496
3519
  if (this.options.memoize) {
3497
- var l2 = Qa(this.mem, s2);
3520
+ var l2 = to(this.mem, s2);
3498
3521
  l2 && l2.res === e7 && (c2 = l2.fc);
3499
3522
  }
3500
3523
  try {
3501
- 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 }));
3502
- var u2 = t2 && t2.replace && Z(t2.replace) === `object` ? X(X({}, t2), t2.replace) : t2;
3524
+ 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 }));
3525
+ var u2 = t2 && t2.replace && Z(t2.replace) === `object` ? uo(uo({}, t2), t2.replace) : t2;
3503
3526
  return c2.format(this.escapeVariableValues(u2));
3504
3527
  } catch (a3) {
3505
- 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);
3528
+ 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);
3506
3529
  }
3507
3530
  } }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
3508
3531
  return this.debug && i2 && this.checkSuffixKeys(t2, n2, r2, i2), e7;
3509
3532
  } }, { key: `checkSuffixKeys`, value: function(e7, t2, n2, r2) {
3510
3533
  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})`;
3511
3534
  if (i2 !== void 0 && this.firstTime(`plural ${t2} ${n2} ${e7}`)) {
3512
- var p2 = ho.concat(ho.map(function(e8) {
3535
+ var p2 = yo.concat(yo.map(function(e8) {
3513
3536
  return `ordinal${c2}${e8}`;
3514
3537
  })).map(function(t3) {
3515
3538
  return `${e7}${c2}${t3}`;
@@ -3523,33 +3546,33 @@ var vo = function() {
3523
3546
  } }, { key: `firstTime`, value: function(e7) {
3524
3547
  return !this.warned.has(e7) && (this.warned.add(e7), true);
3525
3548
  } }, { key: `warn`, value: function(e7) {
3526
- this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${mo}`);
3549
+ this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${vo}`);
3527
3550
  } }, { key: `clearCache`, value: function() {
3528
3551
  this.mem = {};
3529
3552
  } }, { key: `escapeVariableValues`, value: function(e7) {
3530
3553
  if (!this.options.escapeVariables || !e7 || Z(e7) !== `object`) return e7;
3531
3554
  for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
3532
- var i2 = eo(r2[n2], 2), a2 = i2[0], o2 = i2[1];
3555
+ var i2 = ro(r2[n2], 2), a2 = i2[0], o2 = i2[1];
3533
3556
  t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`) : o2;
3534
3557
  }
3535
3558
  return t2;
3536
3559
  } }]), e6;
3537
3560
  }();
3538
- vo.type = `i18nFormat`;
3539
- function yo({ icuOptions: e6 = {}, ...t2 }) {
3561
+ So.type = `i18nFormat`;
3562
+ function Co({ icuOptions: e6 = {}, ...t2 }) {
3540
3563
  let { parseErrorHandler: n2 = void 0 } = t2;
3541
- return Mi(t2, { icu: new vo({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
3564
+ return Pi(t2, { icu: new So({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
3542
3565
  }
3543
- var bo = (e6, t2, n2, r2) => {
3566
+ var wo = (e6, t2, n2, r2) => {
3544
3567
  let i2 = [n2, { code: t2, ...r2 || {} }];
3545
3568
  if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
3546
3569
  Q(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
3547
3570
  };
3548
- var xo = {};
3549
- var So = (e6, t2, n2, r2) => {
3550
- Q(n2) && xo[n2] || (Q(n2) && (xo[n2] = /* @__PURE__ */ new Date()), bo(e6, t2, n2, r2));
3571
+ var To = {};
3572
+ var Eo = (e6, t2, n2, r2) => {
3573
+ Q(n2) && To[n2] || (Q(n2) && (To[n2] = /* @__PURE__ */ new Date()), wo(e6, t2, n2, r2));
3551
3574
  };
3552
- var Co = (e6, t2) => () => {
3575
+ var Do = (e6, t2) => () => {
3553
3576
  if (e6.isInitialized) t2();
3554
3577
  else {
3555
3578
  let n2 = () => {
@@ -3560,29 +3583,29 @@ var Co = (e6, t2) => () => {
3560
3583
  e6.on(`initialized`, n2);
3561
3584
  }
3562
3585
  };
3563
- var wo = (e6, t2, n2) => {
3564
- e6.loadNamespaces(t2, Co(e6, n2));
3586
+ var Oo = (e6, t2, n2) => {
3587
+ e6.loadNamespaces(t2, Do(e6, n2));
3565
3588
  };
3566
- var To = (e6, t2, n2, r2) => {
3567
- if (Q(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return wo(e6, n2, r2);
3589
+ var ko = (e6, t2, n2, r2) => {
3590
+ if (Q(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return Oo(e6, n2, r2);
3568
3591
  n2.forEach((t3) => {
3569
3592
  e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
3570
- }), e6.loadLanguages(t2, Co(e6, r2));
3593
+ }), e6.loadLanguages(t2, Do(e6, r2));
3571
3594
  };
3572
- 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) => {
3595
+ 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) => {
3573
3596
  if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
3574
3597
  } });
3575
3598
  var Q = (e6) => typeof e6 == `string`;
3576
- var Do = (e6) => typeof e6 == `object` && !!e6;
3577
- var Oo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
3578
- 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;": `/` };
3579
- var Ao = (e6) => ko[e6];
3580
- var jo = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(Oo, Ao) };
3581
- var Mo = () => jo;
3582
- var No;
3583
- var Po = () => No;
3584
- var Fo = (0, import_react.createContext)();
3585
- var Io = class {
3599
+ var jo = (e6) => typeof e6 == `object` && !!e6;
3600
+ var Mo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
3601
+ 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;": `/` };
3602
+ var Po = (e6) => No[e6];
3603
+ var Fo = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(Mo, Po) };
3604
+ var Io = () => Fo;
3605
+ var Lo;
3606
+ var Ro = () => Lo;
3607
+ var zo = (0, import_react.createContext)();
3608
+ var Bo = class {
3586
3609
  constructor() {
3587
3610
  this.usedNamespaces = {};
3588
3611
  }
@@ -3595,32 +3618,32 @@ var Io = class {
3595
3618
  return Object.keys(this.usedNamespaces);
3596
3619
  }
3597
3620
  };
3598
- var Lo = (e6, t2) => {
3621
+ var Vo = (e6, t2) => {
3599
3622
  let n2 = (0, import_react.useRef)();
3600
3623
  return (0, import_react.useEffect)(() => {
3601
3624
  n2.current = t2 ? n2.current : e6;
3602
3625
  }, [e6, t2]), n2.current;
3603
3626
  };
3604
- var Ro = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
3605
- var zo = (e6, t2, n2, r2) => (0, import_react.useCallback)(Ro(e6, t2, n2, r2), [e6, t2, n2, r2]);
3606
- var Bo = (e6, t2 = {}) => {
3607
- let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = (0, import_react.useContext)(Fo) || {}, s2 = n2 || r2 || Po();
3608
- if (s2 && !s2.reportNamespaces && (s2.reportNamespaces = new Io()), !s2) {
3609
- So(s2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
3610
- 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];
3627
+ var Ho = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
3628
+ var Uo = (e6, t2, n2, r2) => (0, import_react.useCallback)(Ho(e6, t2, n2, r2), [e6, t2, n2, r2]);
3629
+ var Wo = (e6, t2 = {}) => {
3630
+ let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = (0, import_react.useContext)(zo) || {}, s2 = n2 || r2 || Ro();
3631
+ if (s2 && !s2.reportNamespaces && (s2.reportNamespaces = new Bo()), !s2) {
3632
+ Eo(s2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
3633
+ 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];
3611
3634
  return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
3612
3635
  }
3613
- 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.`);
3614
- let u2 = { ...Mo(), ...s2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = u2, p2 = e6 || i2 || s2.options?.defaultNS;
3636
+ 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.`);
3637
+ let u2 = { ...Io(), ...s2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = u2, p2 = e6 || i2 || s2.options?.defaultNS;
3615
3638
  p2 = Q(p2) ? [p2] : p2 || [`translation`], s2.reportNamespaces.addUsedNamespaces?.(p2);
3616
- 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] = (0, import_react.useState)(g2), b2 = p2.join();
3639
+ 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] = (0, import_react.useState)(g2), b2 = p2.join();
3617
3640
  t2.lng && (b2 = `${t2.lng}${b2}`);
3618
- let x2 = Lo(b2), S2 = (0, import_react.useRef)(true);
3641
+ let x2 = Vo(b2), S2 = (0, import_react.useRef)(true);
3619
3642
  (0, import_react.useEffect)(() => {
3620
3643
  let { bindI18n: e7, bindI18nStore: n3 } = u2;
3621
- S2.current = true, !m2 && !d2 && (t2.lng ? To(s2, t2.lng, p2, () => {
3644
+ S2.current = true, !m2 && !d2 && (t2.lng ? ko(s2, t2.lng, p2, () => {
3622
3645
  S2.current && y2(_2);
3623
- }) : wo(s2, p2, () => {
3646
+ }) : Oo(s2, p2, () => {
3624
3647
  S2.current && y2(_2);
3625
3648
  })), m2 && x2 && x2 !== b2 && S2.current && y2(_2);
3626
3649
  let r3 = () => {
@@ -3635,93 +3658,93 @@ var Bo = (e6, t2 = {}) => {
3635
3658
  let C2 = [v2, s2, m2];
3636
3659
  if (C2.t = v2, C2.i18n = s2, C2.ready = m2, m2 || !m2 && !d2) return C2;
3637
3660
  throw new Promise((e7) => {
3638
- t2.lng ? To(s2, t2.lng, p2, () => e7()) : wo(s2, p2, () => e7());
3661
+ t2.lng ? ko(s2, t2.lng, p2, () => e7()) : Oo(s2, p2, () => e7());
3639
3662
  });
3640
3663
  };
3641
- function Vo({ i18n: e6, defaultNS: t2, children: r2 }) {
3664
+ function Go({ i18n: e6, defaultNS: t2, children: r2 }) {
3642
3665
  let i2 = (0, import_react.useMemo)(() => ({ i18n: e6, defaultNS: t2 }), [e6, t2]);
3643
- return (0, import_react.createElement)(Fo.Provider, { value: i2 }, r2);
3666
+ return (0, import_react.createElement)(zo.Provider, { value: i2 }, r2);
3644
3667
  }
3645
- var Ho = I(`@wix/site-service-renderer-configuration`);
3646
- var Uo = () => {
3668
+ var Ko = R(`@wix/site-service-renderer-configuration`);
3669
+ var qo = () => {
3647
3670
  let e6, t2;
3648
3671
  try {
3649
- e6 = (0, import_services_manager_react.useService)(Ho).languageCode;
3672
+ e6 = (0, import_services_manager_react.useService)(Ko).languageCode;
3650
3673
  } catch {
3651
3674
  }
3652
3675
  try {
3653
- t2 = (0, import_services_manager_react.useService)(Rr).language;
3676
+ t2 = (0, import_services_manager_react.useService)(Br).language;
3654
3677
  } catch {
3655
3678
  }
3656
3679
  return e6 || t2;
3657
3680
  };
3658
- var Wo = `wix-warmup-data`;
3659
- var Go = null;
3660
- function Ko(e6) {
3681
+ var Jo = `wix-warmup-data`;
3682
+ var Yo = null;
3683
+ function Xo(e6) {
3661
3684
  if (typeof document < `u`) try {
3662
- let t2 = document.getElementById(Wo)?.textContent;
3663
- return t2 ? (Go?.text !== t2 && (Go = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Go.data[e6] ?? void 0) : void 0;
3685
+ let t2 = document.getElementById(Jo)?.textContent;
3686
+ return t2 ? (Yo?.text !== t2 && (Yo = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Yo.data[e6] ?? void 0) : void 0;
3664
3687
  } catch {
3665
3688
  return;
3666
3689
  }
3667
3690
  }
3668
- var qo = `blog-builder:i18n`;
3669
- var Jo = () => Ko(qo);
3670
- var Yo = /* @__PURE__ */ new Map();
3671
- function Xo(e6, t2) {
3672
- let n2 = Yo.get(e6);
3691
+ var Zo = `blog-builder:i18n`;
3692
+ var Qo = () => Xo(Zo);
3693
+ var $o = /* @__PURE__ */ new Map();
3694
+ function es(e6, t2) {
3695
+ let n2 = $o.get(e6);
3673
3696
  if (n2) return n2;
3674
- let r2 = Jo(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = yo({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
3675
- return Yo.set(e6, a2), a2;
3697
+ let r2 = Qo(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = Co({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
3698
+ return $o.set(e6, a2), a2;
3676
3699
  }
3677
- var Zo = (e6, t2, n2) => {
3700
+ var ts = (e6, t2, n2) => {
3678
3701
  let r2 = t2.lastIndexOf(`?`), i2 = e6[r2 === -1 || r2 < t2.lastIndexOf(`/`) ? t2 : t2.slice(0, r2)];
3679
3702
  return i2 ? typeof i2 == `function` ? i2() : Promise.resolve(i2) : new Promise((e7, r3) => {
3680
3703
  (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.`))));
3681
3704
  });
3682
3705
  };
3683
- var Qo = (e6) => e6.split(`-`)[0] ?? e6;
3684
- 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) });
3685
- function $o(e6) {
3686
- let t2 = Uo(), n2 = Jo()?.locale ?? t2 ?? `en`;
3687
- return { i18n: Xo(n2, e6), locale: n2 };
3688
- }
3689
- var es = m({ default: () => ts });
3690
- 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` };
3691
- var ns = m({ default: () => is, title: () => rs });
3692
- var rs = `My App`;
3693
- 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.` };
3694
- var as = Object.assign({ "../assets/locale/messages_en.dev.json": es, "../assets/locale/messages_en.json": ns });
3695
- var os = (e6, t2) => {
3696
- let n2 = as[`../assets/locale/messages_${Qo(e6)}${t2}.json`];
3706
+ var ns = (e6) => e6.split(`-`)[0] ?? e6;
3707
+ 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) });
3708
+ function rs(e6) {
3709
+ let t2 = qo(), n2 = Qo()?.locale ?? t2 ?? `en`;
3710
+ return { i18n: es(n2, e6), locale: n2 };
3711
+ }
3712
+ var is = m({ default: () => as });
3713
+ 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` };
3714
+ var os = m({ default: () => cs, title: () => ss });
3715
+ var ss = `My App`;
3716
+ 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.` };
3717
+ var ls = Object.assign({ "../assets/locale/messages_en.dev.json": is, "../assets/locale/messages_en.json": os });
3718
+ var us = (e6, t2) => {
3719
+ let n2 = ls[`../assets/locale/messages_${ns(e6)}${t2}.json`];
3697
3720
  return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
3698
3721
  };
3699
- var ss = Ur({ isDev: false, loadMessages: (e6) => os(e6, ``), loadDevMessages: (e6) => os(e6, `.dev`) });
3700
- 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);
3722
+ var ds = Gr({ isDev: false, loadMessages: (e6) => us(e6, ``), loadDevMessages: (e6) => us(e6, `.dev`) });
3723
+ 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);
3701
3724
  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` };
3702
- var ls = (e6, t2) => {
3703
- let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: cs(r2, `full`, t2) });
3725
+ var ps = (e6, t2) => {
3726
+ let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: fs(r2, `full`, t2) });
3704
3727
  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) } };
3705
3728
  };
3706
- var us = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
3707
- var ds = (e6) => ({ text: e6, html: `<p>${us(e6)}</p>`, linkList: [] });
3708
- var fs = (0, import_react.createContext)(null);
3709
- fs.displayName = `PostItemContext`;
3710
- function ps() {
3711
- return (0, import_react.useContext)(fs);
3712
- }
3713
- function ms({ postData: t2, children: n2 }) {
3714
- let r2 = Br(), { t: i2, ready: a2 } = Bo(void 0, { useSuspense: false }), o2 = (0, import_react.useMemo)(() => 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 = (0, import_react.useMemo)(() => ({ ...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 = (0, import_react.useMemo)(() => ({ currentPostId: t2.recentPostItem.slug ? t2._id : void 0, categoryIds: void 0, relatedPostIds: void 0 }), [t2]), v2 = (0, import_react.useMemo)(() => {
3715
- let e6 = g2.itemCategoryLabel.text;
3716
- 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 };
3717
- }, [g2, _2]);
3718
- return (0, import_jsx_runtime.jsx)(fs.Provider, { value: g2, children: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: v2, children: n2 }) });
3719
- }
3720
- function hs({ postData: e6, children: t2 }) {
3721
- let { i18n: n2 } = $o(ss);
3722
- return e6 === void 0 ? (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: t2 }) : (0, import_jsx_runtime.jsx)(Vo, { i18n: n2, children: (0, import_jsx_runtime.jsx)(ms, { postData: e6, children: t2 }) });
3723
- }
3724
- var gs = Dn(`e26c0f39-8db2-4b56-8c9b-fd1457f917e0`);
3729
+ var ms = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
3730
+ var hs = (e6) => ({ text: e6, html: `<p>${ms(e6)}</p>`, linkList: [] });
3731
+ var gs = (0, import_react.createContext)(null);
3732
+ gs.displayName = `PostItemContext`;
3733
+ function _s() {
3734
+ return (0, import_react.useContext)(gs);
3735
+ }
3736
+ function vs({ postData: t2, children: n2 }) {
3737
+ let r2 = Hr(), { t: i2, ready: a2 } = Wo(void 0, { useSuspense: false }), o2 = (0, import_react.useMemo)(() => 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 = (0, import_react.useMemo)(() => ({ ...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 = (0, import_react.useMemo)(() => ({ currentPostId: t2.recentPostItem.slug ? t2._id : void 0, categoryIds: void 0, relatedPostIds: void 0 }), [t2]), g2 = (0, import_react.useMemo)(() => {
3738
+ let e6 = m2.itemCategoryLabel.text;
3739
+ 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 };
3740
+ }, [m2, h2]);
3741
+ return (0, import_jsx_runtime.jsx)(gs.Provider, { value: m2, children: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: g2, children: n2 }) });
3742
+ }
3743
+ function ys({ postData: e6, children: t2 }) {
3744
+ let { i18n: n2 } = rs(ds);
3745
+ return e6 === void 0 ? (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: t2 }) : (0, import_jsx_runtime.jsx)(Go, { i18n: n2, children: (0, import_jsx_runtime.jsx)(vs, { postData: e6, children: t2 }) });
3746
+ }
3747
+ var bs = En(`e26c0f39-8db2-4b56-8c9b-fd1457f917e0`);
3725
3748
  // Annotate the CommonJS export names for ESM import in node:
3726
3749
  0 && (module.exports = {
3727
3750
  PostItemContextProvider,