@wix/blog 1.0.701 → 1.0.703

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 (48) hide show
  1. package/_sdk-exports/context-blog-feed/runtime.js +2 -2
  2. package/_sdk-exports/context-post/runtime.d.ts +200 -115
  3. package/_sdk-exports/context-post/runtime.js +2 -5
  4. package/_sdk-exports/context-post-by-id/runtime.js +3 -3
  5. package/_sdk-exports/context-post-by-slug/runtime.d.ts +18 -0
  6. package/_sdk-exports/context-post-by-slug/runtime.js +5 -0
  7. package/_sdk-exports/context-post-item/runtime.d.ts +2 -3
  8. package/_sdk-exports/context-post-item/runtime.js +4 -4
  9. package/_sdk-exports/context-related-posts/runtime.js +2 -2
  10. package/build/cjs/context-blog-feed.js +1 -1
  11. package/build/cjs/context-blog-feed.js.map +1 -1
  12. package/build/cjs/context-post-by-id.js +534 -496
  13. package/build/cjs/context-post-by-id.js.map +1 -1
  14. package/build/cjs/context-post-by-slug.d.ts +18 -0
  15. package/build/cjs/context-post-by-slug.js +5455 -0
  16. package/build/cjs/context-post-by-slug.js.map +1 -0
  17. package/build/cjs/context-post-item.d.ts +2 -3
  18. package/build/cjs/context-post-item.js +801 -787
  19. package/build/cjs/context-post-item.js.map +1 -1
  20. package/build/cjs/context-post.d.ts +200 -115
  21. package/build/cjs/context-post.js +342 -5175
  22. package/build/cjs/context-post.js.map +1 -1
  23. package/build/cjs/context-related-posts.js +1 -1
  24. package/build/cjs/context-related-posts.js.map +1 -1
  25. package/build/es/context-blog-feed.mjs +1 -1
  26. package/build/es/context-blog-feed.mjs.map +1 -1
  27. package/build/es/context-post-by-id.mjs +534 -496
  28. package/build/es/context-post-by-id.mjs.map +1 -1
  29. package/build/es/context-post-by-slug.d.mts +18 -0
  30. package/build/es/context-post-by-slug.mjs +5415 -0
  31. package/build/es/context-post-by-slug.mjs.map +1 -0
  32. package/build/es/context-post-item.d.mts +2 -3
  33. package/build/es/context-post-item.mjs +802 -798
  34. package/build/es/context-post-item.mjs.map +1 -1
  35. package/build/es/context-post.d.mts +200 -115
  36. package/build/es/context-post.mjs +341 -5173
  37. package/build/es/context-post.mjs.map +1 -1
  38. package/build/es/context-related-posts.mjs +1 -1
  39. package/build/es/context-related-posts.mjs.map +1 -1
  40. package/build/internal/cjs/context-post-by-slug.d.ts +18 -0
  41. package/build/internal/cjs/context-post-item.d.ts +2 -3
  42. package/build/internal/cjs/context-post.d.ts +200 -115
  43. package/build/internal/es/context-post-by-slug.d.mts +18 -0
  44. package/build/internal/es/context-post-item.d.mts +2 -3
  45. package/build/internal/es/context-post.d.mts +200 -115
  46. package/context/post-by-slug/package.json +3 -0
  47. package/package.json +14 -2
  48. package/post-by-slug-context-provider/package.json +3 -0
@@ -1,7 +1,9 @@
1
1
  "use strict";
2
+ var __create = Object.create;
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
5
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
8
  var __export = (target, all) => {
7
9
  for (var name in all)
@@ -15,34 +17,43 @@ var __copyProps = (to2, from, except, desc) => {
15
17
  }
16
18
  return to2;
17
19
  };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
18
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
29
 
20
30
  // context-post-item.ts
21
31
  var context_post_item_exports = {};
22
32
  __export(context_post_item_exports, {
23
- PostItemContextProvider: () => ps,
24
- default: () => ps,
25
- injectAccessTokenGetter: () => ms,
26
- usePostItemContext: () => ds
33
+ PostItemContextProvider: () => ms,
34
+ default: () => ms,
35
+ injectAccessTokenGetter: () => hs,
36
+ usePostItemContext: () => fs
27
37
  });
28
38
  module.exports = __toCommonJS(context_post_item_exports);
29
39
 
30
40
  // _sdk-exports/context-post-item/runtime.js
41
+ var import_post_context_provider = __toESM(require("@wix/blog/post-context-provider"));
31
42
  var import_react = require("react");
32
43
  var import_services_manager_react = require("@wix/services-manager-react");
33
44
  var import_jsx_runtime = require("react/jsx-runtime");
34
45
  var import_meta = {};
35
- var f = Object.defineProperty;
36
- var p = (e6, t2) => {
46
+ var p = Object.defineProperty;
47
+ var m = (e6, t2) => {
37
48
  let n2 = {};
38
- for (var r2 in e6) f(n2, r2, { get: e6[r2], enumerable: true });
39
- return t2 || f(n2, Symbol.toStringTag, { value: `Module` }), n2;
49
+ for (var r2 in e6) p(n2, r2, { get: e6[r2], enumerable: true });
50
+ return t2 || p(n2, Symbol.toStringTag, { value: `Module` }), n2;
40
51
  };
41
- var m = {};
42
- function h(e6, t2 = false, n2 = (e7) => e7) {
52
+ var h = {};
53
+ function g(e6, t2 = false, n2 = (e7) => e7) {
43
54
  return () => ({ __type: `event-definition`, type: e6, isDomainEvent: t2, transformations: n2 });
44
55
  }
45
- var g = (e6) => {
56
+ var _ = (e6) => {
46
57
  switch (e6) {
47
58
  case `get`:
48
59
  case `GET`:
@@ -69,11 +80,11 @@ var g = (e6) => {
69
80
  throw Error(`Unknown method: ${e6}`);
70
81
  }
71
82
  };
72
- var _ = (e6) => (t2) => async (n2) => {
83
+ var v = (e6) => (t2) => async (n2) => {
73
84
  let r2, i2 = (t3) => {
74
85
  if (r2 = e6(n2)(t3), r2.url === void 0) throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);
75
86
  let { method: i3, url: a2, params: o2 } = r2;
76
- return { ...r2, method: g(i3), url: a2, data: r2.data, params: o2 };
87
+ return { ...r2, method: _(i3), url: a2, data: r2.data, params: o2 };
77
88
  };
78
89
  try {
79
90
  let e7 = await t2.request(i2);
@@ -86,10 +97,10 @@ var _ = (e6) => (t2) => async (n2) => {
86
97
  throw typeof e7 == `object` && e7 && `response` in e7 && typeof e7.response == `object` && e7.response !== null && `data` in e7.response ? e7.response.data : e7;
87
98
  }
88
99
  };
89
- var v = (e6) => e6.__isAmbassador ? true : !!e6().__isAmbassador;
90
- var y = `__metadata`;
91
- var b = `edge.wixapis.com`;
92
- var x = class extends Error {
100
+ var y = (e6) => e6.__isAmbassador ? true : !!e6().__isAmbassador;
101
+ var b = `__metadata`;
102
+ var x = `edge.wixapis.com`;
103
+ var S = class extends Error {
93
104
  message;
94
105
  response;
95
106
  constructor(e6, t2) {
@@ -97,108 +108,108 @@ var x = class extends Error {
97
108
  }
98
109
  async details() {
99
110
  let e6 = await this.response.json();
100
- return S(this.response.status, e6?.message, e6?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e6 });
111
+ return C(this.response.status, e6?.message, e6?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e6 });
101
112
  }
102
113
  };
103
- var S = (e6, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
104
- var C = (e6) => e6?.method && [`post`, `put`, `patch`].includes(e6.method.toLocaleLowerCase()) && e6.body ? { "Content-Type": `application/json` } : {};
105
- var ee = (e6) => e6 && typeof e6 == `object` && !Array.isArray(e6);
106
- var w = (e6) => e6.__type === `host`;
107
- function T(e6, t2) {
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) {
108
119
  return e6.create(t2);
109
120
  }
110
- var te = `x-wix-bi-gateway`;
111
- function ne(e6, t2, n2) {
112
- return { [te]: re({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e6.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e6.methodFqn, entity: e6.entityFqdn }) };
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 }) };
113
124
  }
114
- function re(e6) {
125
+ function ie(e6) {
115
126
  return Object.entries(e6).filter(([e7, t2]) => !!t2).map(([e7, t2]) => `${e7}=${t2}`).join(`,`);
116
127
  }
117
- function ie(e6) {
118
- let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
119
- globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
128
+ function ae(e6) {
129
+ let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
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);
120
131
  try {
121
132
  return e6();
122
133
  } finally {
123
- globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
134
+ globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
124
135
  }
125
136
  }
126
- var ae = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
127
- function oe(e6) {
128
- return de(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
137
+ var oe = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
138
+ function se(e6) {
139
+ return fe(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
129
140
  }
130
- var se = /([\p{Ll}\d])(\p{Lu})/gu;
131
- var ce = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
132
- var le = `$1\0$2`;
133
- var ue = /[^\p{L}\d]+/giu;
134
- function de(e6) {
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) {
135
146
  let t2 = e6.trim();
136
- t2 = t2.replace(se, le).replace(ce, le), t2 = t2.replace(ue, `\0`);
147
+ t2 = t2.replace(ce, ue).replace(le, ue), t2 = t2.replace(de, `\0`);
137
148
  let n2 = 0, r2 = t2.length;
138
149
  for (; t2.charAt(n2) === `\0`; ) n2++;
139
150
  if (n2 === r2) return [];
140
151
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
141
152
  return t2.slice(n2, r2).split(/\0/g);
142
153
  }
143
- var fe = (e6) => `validationError` in (e6.response?.data?.details ?? {});
144
- var pe = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
145
- var me = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
146
- function he(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
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 = []) {
147
158
  if (typeof e6 != `object` || !e6) throw e6;
148
- if (fe(e6)) return ge(e6, t2, n2);
149
- if (pe(e6)) return ve(e6);
150
- if (me(e6)) {
151
- 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 };
152
- return _e(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
159
+ if (pe(e6)) return _e(e6, t2, n2);
160
+ if (me(e6)) return ye(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 ve(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
153
164
  }
154
- return ye(e6);
165
+ return be(e6);
155
166
  }
156
- var ge = (e6, t2, n2) => {
157
- 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 };
158
- return _e(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
167
+ var _e = (e6, t2, n2) => {
168
+ let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = xe(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 ve(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
159
170
  };
160
- var _e = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
161
- var ve = (e6) => {
162
- 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 };
163
- return _e(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
171
+ var ve = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
172
+ var ye = (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 ve(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
164
175
  };
165
- 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: oe(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
166
- var be = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
176
+ var be = (e6) => ve(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 xe = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
167
178
  let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
168
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) => {
169
180
  let r3 = t2[e7.field];
170
- if (r3) return { ...e7, field: xe(r3, i2) };
181
+ if (r3) return { ...e7, field: Se(r3, i2) };
171
182
  let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
172
183
  if (s2) {
173
184
  let t3 = a2[s2];
174
- if (t3) return { ...e7, field: e7.field.replace(s2, xe(t3, i2)) };
185
+ if (t3) return { ...e7, field: e7.field.replace(s2, Se(t3, i2)) };
175
186
  }
176
187
  return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
177
188
  });
178
189
  };
179
- var xe = (e6, t2) => {
180
- let n2 = Se(e6);
190
+ var Se = (e6, t2) => {
191
+ let n2 = Ce(e6);
181
192
  return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
182
193
  };
183
- var Se = (e6) => {
194
+ var Ce = (e6) => {
184
195
  let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
185
196
  return t2 && t2.groups && Number(t2.groups.argIndex);
186
197
  };
187
- function Ce(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
188
- return ie(() => e6({ request: async (e7) => {
198
+ function we(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
199
+ return ae(() => e6({ request: async (e7) => {
189
200
  let i3 = e7({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
190
201
  a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
191
- let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? b : o3}${a3.url}`;
202
+ let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? x : o3}${a3.url}`;
192
203
  a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
193
204
  try {
194
- let e8 = ne(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e8 } }, s3 = await n2(u3, o4);
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);
195
206
  if (s3.status !== 200) {
196
207
  let e9 = null;
197
208
  try {
198
209
  e9 = await s3.json();
199
210
  } catch {
200
211
  }
201
- let t3 = Te(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = he(t3);
212
+ let t3 = Ee(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = ge(t3);
202
213
  throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
203
214
  }
204
215
  let l3 = await s3.json();
@@ -208,18 +219,18 @@ function Ce(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
208
219
  }
209
220
  }, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
210
221
  }
211
- var we = class extends Error {
222
+ var Te = class extends Error {
212
223
  response;
213
224
  requestId;
214
225
  constructor(e6) {
215
226
  super(), this.response = e6.response, this.requestId = e6.requestId;
216
227
  }
217
228
  };
218
- 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 });
219
- var Ee = `.`;
220
- function De(e6, t2, n2) {
229
+ var Ee = (e6, t2, n2, r2) => new Te({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2 }, status: e6 }, requestId: r2?.requestId });
230
+ var De = `.`;
231
+ function Oe(e6, t2, n2) {
221
232
  if (e6 == null) throw Error(`Cannot set value on null or undefined`);
222
- let r2 = Oe(t2), i2 = e6;
233
+ let r2 = ke(t2), i2 = e6;
223
234
  for (let e7 = 0; e7 < r2.length; e7++) {
224
235
  let t3 = r2[e7];
225
236
  if (e7 === r2.length - 1) {
@@ -231,21 +242,21 @@ function De(e6, t2, n2) {
231
242
  }
232
243
  return e6;
233
244
  }
234
- function Oe(e6) {
235
- return Array.isArray(e6) ? e6 : e6.split(Ee).map((e7) => ke(e7) ? Number(e7) : e7);
236
- }
237
245
  function ke(e6) {
238
- return /^\d+$/.test(e6);
246
+ return Array.isArray(e6) ? e6 : e6.split(De).map((e7) => Ae(e7) ? Number(e7) : e7);
239
247
  }
240
248
  function Ae(e6) {
249
+ return /^\d+$/.test(e6);
250
+ }
251
+ function je(e6) {
241
252
  let t2 = {};
242
- for (let [n2, r2] of Object.entries(e6)) je(n2) || De(t2, Oe(n2), r2);
253
+ for (let [n2, r2] of Object.entries(e6)) Me(n2) || Oe(t2, ke(n2), r2);
243
254
  return t2;
244
255
  }
245
- function je(e6) {
256
+ function Me(e6) {
246
257
  return e6 === `__proto__` || e6 === `constructor` || e6 === `prototype`;
247
258
  }
248
- var Me = class {
259
+ var Ne = class {
249
260
  BRACKET_PATTERN = /\[(\d+)\]/g;
250
261
  NUMERIC_PATTERN = /^\d+$/;
251
262
  ESCAPED_DOT_PATTERN = /\\\./g;
@@ -268,7 +279,7 @@ var Me = class {
268
279
  return e6.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
269
280
  }
270
281
  unflatten() {
271
- 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])), je(this.cleanedModifiedFields);
272
283
  }
273
284
  flatten(e6) {
274
285
  let t2 = {};
@@ -288,12 +299,12 @@ var Me = class {
288
299
  if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
289
300
  r2.push(`[${e7}]`), n2 = n2[parseInt(e7, 10)];
290
301
  }, a2 = (e7, t3) => {
291
- let i3 = e7 in ae ? ae[e7] : void 0;
302
+ let i3 = e7 in oe ? oe[e7] : void 0;
292
303
  if (i3 && i3 in t3) {
293
304
  r2.push(i3), n2 = t3[i3];
294
305
  return;
295
306
  }
296
- let a3 = Ie(e7);
307
+ let a3 = Le(e7);
297
308
  if (a3 && a3 in t3) r2.push(a3), n2 = t3[a3];
298
309
  else throw Error(`Cannot find key '${e7}' or its transformations at path ${this.buildPathString(r2)}`);
299
310
  }, o2 = (e7, t3) => {
@@ -317,28 +328,28 @@ var Me = class {
317
328
  return e6.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e6[r2 - 1] === `\\` ? t2 : `.` + n2);
318
329
  }
319
330
  };
320
- function Ne(e6, t2) {
331
+ function Pe(e6, t2) {
321
332
  let n2 = e6?.modifiedFields;
322
333
  if (!n2) return null;
323
- let r2 = Pe(n2);
334
+ let r2 = Fe(n2);
324
335
  if (!r2) return null;
325
336
  let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
326
337
  e6 = { ...e6, modifiedFields: i2 };
327
338
  let o2 = t2(e6), s2 = o2?.modifiedFields;
328
339
  if (!s2) return null;
329
- let c2 = Fe(s2, a2);
340
+ let c2 = Ie(s2, a2);
330
341
  return c2 === null ? null : (o2.modifiedFields = c2, o2);
331
342
  }
332
- function Pe(e6) {
343
+ function Fe(e6) {
333
344
  if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
334
- let t2 = new Me(e6);
345
+ let t2 = new Ne(e6);
335
346
  return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
336
347
  } catch {
337
348
  return null;
338
349
  }
339
350
  return null;
340
351
  }
341
- function Fe(e6, t2) {
352
+ function Ie(e6, t2) {
342
353
  if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
343
354
  return t2.flatten(e6);
344
355
  } catch {
@@ -346,10 +357,10 @@ function Fe(e6, t2) {
346
357
  }
347
358
  return null;
348
359
  }
349
- function Ie(e6) {
360
+ function Le(e6) {
350
361
  return e6.replace(/[-_\s]+(.)?/g, (e7, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e7) => e7.toLowerCase());
351
362
  }
352
- function Le() {
363
+ function Re() {
353
364
  return { emit(e6, ...t2) {
354
365
  for (let n2 = 0, r2 = this.events[e6] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
355
366
  }, events: {}, on(e6, t2) {
@@ -358,8 +369,8 @@ function Le() {
358
369
  };
359
370
  } };
360
371
  }
361
- var Re = (e6) => e6.__type === `event-definition`;
362
- function ze(e6, t2, n2, r2) {
372
+ var ze = (e6) => e6.__type === `event-definition`;
373
+ function Be(e6, t2, n2, r2) {
363
374
  let i2;
364
375
  if (e6.isDomainEvent) {
365
376
  let { deletedEvent: e7, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
@@ -370,14 +381,14 @@ function ze(e6, t2, n2, r2) {
370
381
  let e7 = s2.modifiedFields;
371
382
  if (typeof e7 == `object` && e7 && !Array.isArray(e7)) {
372
383
  o2 = structuredClone(i2);
373
- let e8 = Ne(s2, a2);
384
+ let e8 = Pe(s2, a2);
374
385
  if (e8) return t2(e8);
375
386
  }
376
387
  }
377
388
  return t2(a2(o2));
378
389
  }
379
- function Be(e6) {
380
- let t2 = /* @__PURE__ */ new Map(), n2 = Le();
390
+ function Ve(e6) {
391
+ let t2 = /* @__PURE__ */ new Map(), n2 = Re();
381
392
  return { initModule(e7) {
382
393
  return (r2) => {
383
394
  let i2 = t2.get(e7.type) ?? [];
@@ -387,7 +398,7 @@ function Be(e6) {
387
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 }))];
388
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(`, `)}`);
389
400
  let l2 = t2.get(r2) ?? [];
390
- 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 }) => Be(e8, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
391
402
  }, async processRequest(e7, t3) {
392
403
  let n3 = await e7.text();
393
404
  return this.process(n3, t3);
@@ -406,12 +417,12 @@ function Be(e6) {
406
417
  let n3 = Array.from(t2.keys()).map((e8) => ({ type: e8 }));
407
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(`, `)}`);
408
419
  let r2 = t2.get(e7.eventType) ?? [];
409
- await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => ze(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
410
- }, apps: { AppInstalled: h(`AppInstalled`)(), AppRemoved: h(`AppRemoved`)() } } };
420
+ await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Be(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
421
+ }, apps: { AppInstalled: g(`AppInstalled`)(), AppRemoved: g(`AppRemoved`)() } } };
411
422
  }
412
- var Ve = (e6) => e6.__type === `service-plugin-definition`;
413
- function He(e6) {
414
- let t2 = /* @__PURE__ */ new Map(), n2 = Le();
423
+ var He = (e6) => e6.__type === `service-plugin-definition`;
424
+ function Ue(e6) {
425
+ let t2 = /* @__PURE__ */ new Map(), n2 = Re();
415
426
  return { initModule(e7) {
416
427
  return (r2) => {
417
428
  let i2 = t2.get(e7.componentType.toLowerCase()) ?? [];
@@ -453,76 +464,76 @@ function He(e6) {
453
464
  } } };
454
465
  }
455
466
  var E = `X-Wix-Consistent`;
456
- function Ue(e6) {
467
+ function We(e6) {
457
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) => {
458
469
  let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [E]: t2[E] } : {} }, l3 = e6.host?.getErrorHandler?.();
459
470
  try {
460
471
  if (typeof n3 == `string` || n3 instanceof URL) {
461
472
  let e7 = await i3(n3, { ...r3, headers: c3 });
462
473
  l3?.handleError(e7, { requestOptions: { url: n3.toString(), method: r3?.method } });
463
- let a3 = We(e7);
474
+ let a3 = Ge(e7);
464
475
  return a3 && (t2[E] = a3), e7;
465
476
  }
466
477
  {
467
478
  for (let [e8, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e8, t3);
468
479
  let e7 = await i3(n3, r3);
469
480
  l3?.handleError(e7, { requestOptions: { url: n3.url, method: r3?.method } });
470
- let a3 = We(e7);
481
+ let a3 = Ge(e7);
471
482
  return a3 && (t2[E] = a3), e7;
472
483
  }
473
484
  } catch (e7) {
474
485
  throw l3?.handleError(e7, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e7;
475
486
  }
476
- }, { client: c2, initModule: l2 } = He(i2), { client: u2, initModule: d2 } = Be(i2), f2 = async (n3, r3) => {
477
- let i3 = o2(), s3 = await a2(), c3 = C(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [E]: t2[E] } : {} } }), u3 = We(l3);
487
+ }, { client: c2, initModule: l2 } = Ue(i2), { client: u2, initModule: d2 } = Ve(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`] ? { [E]: t2[E] } : {} } }), u3 = Ge(l3);
478
489
  return u3 && (t2[E] = u3), l3;
479
490
  }, p2 = (t3, n3) => {
480
- if (Re(t3)) return d2(t3);
481
- if (Ve(t3)) return l2(t3);
482
- if (w(t3) && e6.host) return T(t3, e6.host);
491
+ if (ze(t3)) return d2(t3);
492
+ if (He(t3)) return l2(t3);
493
+ if (T(t3) && e6.host) return te(t3, e6.host);
483
494
  if (typeof t3 == `function`) {
484
495
  if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
485
496
  let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e6.useCDN === void 0 ? i2().shouldUseCDN : e6.useCDN;
486
- return Ce(ie(() => v(t3)) ? _(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
497
+ return we(ae(() => y(t3)) ? v(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
487
498
  let n4 = new URL(e7, `https://${r3}`);
488
499
  return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
489
500
  }, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e6.host?.name, o3, e6.validateRequestSchema);
490
501
  }
491
- return ee(t3) ? Object.fromEntries(Object.entries(t3).map(([e7, n4]) => [e7, p2(n4, t3[y])])) : t3;
492
- }, h2 = (e7) => {
502
+ return w(t3) ? Object.fromEntries(Object.entries(t3).map(([e7, n4]) => [e7, p2(n4, t3[b])])) : t3;
503
+ }, m2 = (e7) => {
493
504
  for (let n3 in e7) t2[n3] = e7[n3];
494
505
  };
495
506
  return { ...e6.modules ? p2(e6.modules) : {}, get auth() {
496
507
  let t3 = i2();
497
508
  return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e6.host), t3;
498
- }, setHeaders: h2, use: p2, enableContext(e7, t3 = { elevated: false }) {
499
- e7 === `global` ? globalThis.__wix_context__ == null ? t3.elevated ? globalThis.__wix_context__ = { elevatedClient: this } : globalThis.__wix_context__ = { client: this } : t3.elevated ? globalThis.__wix_context__.elevatedClient = this : globalThis.__wix_context__.client = this : t3.elevated ? m.elevatedClient = this : m.client = this;
509
+ }, setHeaders: m2, use: p2, enableContext(e7, t3 = { elevated: false }) {
510
+ e7 === `global` ? globalThis.__wix_context__ == null ? t3.elevated ? globalThis.__wix_context__ = { elevatedClient: this } : globalThis.__wix_context__ = { client: this } : t3.elevated ? globalThis.__wix_context__.elevatedClient = this : globalThis.__wix_context__.client = this : t3.elevated ? h.elevatedClient = this : h.client = this;
500
511
  }, fetch: (t3, n3) => {
501
512
  let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
502
513
  return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
503
514
  }, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
504
515
  let i3 = e6?.host?.apiBaseUrl ?? `www.wixapis.com`, a3 = await f2(`https://${i3}/graphql/${r3.apiVersion}`, { method: `POST`, headers: { "Content-Type": `application/json` }, body: JSON.stringify({ query: t3, variables: n3 }) });
505
- if (a3.status !== 200) throw new x(`GraphQL request failed with status ${a3.status}`, a3);
516
+ if (a3.status !== 200) throw new S(`GraphQL request failed with status ${a3.status}`, a3);
506
517
  let { data: o3, errors: s3 } = await a3.json();
507
518
  return { data: o3 ?? {}, errors: s3 };
508
519
  }, webhooks: u2, servicePlugins: c2 };
509
520
  }
510
- function We(e6) {
521
+ function Ge(e6) {
511
522
  return e6.headers?.get(`X-Wix-Consistent`) ?? e6.headers?.get(`x-wix-consistent`);
512
523
  }
513
- var Ge = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
514
- var Ke = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
515
- var qe = `items`;
516
- var Je = `pagingMetadata`;
517
- var Ye = Ge;
518
- function Xe(e6, t2) {
524
+ var Ke = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
525
+ var qe = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
526
+ var Je = `items`;
527
+ var Ye = `pagingMetadata`;
528
+ var Xe = Ke;
529
+ function Ze(e6, t2) {
519
530
  return e6?.split(`.`).map((e7) => t2?.[e7] ?? e7).join(`.`);
520
531
  }
521
- var Ze = `sort.fieldName`;
522
- function Qe(e6, t2, n2) {
523
- return (e6 === Ze || e6.endsWith(`.${Ze}`)) && typeof t2 == `string` ? Xe(t2, n2) : t2;
524
- }
532
+ var Qe = `sort.fieldName`;
525
533
  function $e(e6, t2, n2) {
534
+ return (e6 === Qe || e6.endsWith(`.${Qe}`)) && typeof t2 == `string` ? Ze(t2, n2) : t2;
535
+ }
536
+ function et(e6, t2, n2) {
526
537
  let r2 = (e7) => n2.includes(e7), i2 = (e7, n3) => {
527
538
  if (Array.isArray(e7)) e7.forEach((e8) => {
528
539
  i2(e8, n3);
@@ -532,160 +543,160 @@ function $e(e6, t2, n2) {
532
543
  Object.keys(a2).forEach((e8) => {
533
544
  let o2 = n3 === `` ? e8 : `${n3}.${e8}`;
534
545
  if (r2(o2)) return;
535
- let s2 = et(e8, t2);
536
- 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 = tt(e8, t2);
547
+ s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] = $e(o2, a2[s2], t2), i2(a2[s2], o2);
537
548
  });
538
549
  }
539
550
  };
540
551
  return i2(e6, ``), e6;
541
552
  }
542
- function et(e6, t2) {
553
+ function tt(e6, t2) {
543
554
  let n2;
544
555
  return n2 = e6.includes(`.`) ? e6.split(`.`).map((e7) => t2[e7] ?? e7).join(`.`) : t2[e6] ?? e6, n2;
545
556
  }
546
557
  function D(e6, t2 = []) {
547
- return $e(e6, Ge, t2);
558
+ return et(e6, Ke, t2);
548
559
  }
549
560
  function O(e6, t2 = []) {
550
- return $e(e6, Ke, t2);
561
+ return et(e6, qe, t2);
551
562
  }
552
- function tt(e6) {
563
+ function nt(e6) {
553
564
  return e6?.toISOString();
554
565
  }
555
- function nt(e6) {
566
+ function rt(e6) {
556
567
  return e6 ? new Date(e6) : void 0;
557
568
  }
558
- var rt = /* @__PURE__ */ new WeakMap();
559
- function it() {
569
+ var it = /* @__PURE__ */ new WeakMap();
570
+ function at() {
560
571
  return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
561
572
  }
562
- function at(e6, t2) {
573
+ function ot(e6, t2) {
563
574
  let n2 = e6.get(t2);
564
- return n2 || (n2 = it(), e6.set(t2, n2)), n2;
575
+ return n2 || (n2 = at(), e6.set(t2, n2)), n2;
565
576
  }
566
- function ot(e6, t2) {
567
- return t2 === `*` ? (e6.anyField ??= it(), e6.anyField) : t2.endsWith(`{}`) ? (e6.mapFields ??= /* @__PURE__ */ new Map(), at(e6.mapFields, t2.slice(0, -2))) : (e6.fields ??= /* @__PURE__ */ new Map(), at(e6.fields, t2));
577
+ function st(e6, t2) {
578
+ return t2 === `*` ? (e6.anyField ??= at(), e6.anyField) : t2.endsWith(`{}`) ? (e6.mapFields ??= /* @__PURE__ */ new Map(), ot(e6.mapFields, t2.slice(0, -2))) : (e6.fields ??= /* @__PURE__ */ new Map(), ot(e6.fields, t2));
568
579
  }
569
- function st(e6) {
570
- let t2 = it();
580
+ function ct(e6) {
581
+ let t2 = at();
571
582
  for (let n2 of e6) {
572
- let e7 = n2.path.split(`.`).reduce(ot, t2);
583
+ let e7 = n2.path.split(`.`).reduce(st, t2);
573
584
  e7.leaves ??= [], e7.leaves.push(n2);
574
585
  }
575
586
  return t2;
576
587
  }
577
- function ct(e6) {
578
- let t2 = rt.get(e6);
579
- return t2 || (t2 = st(e6), rt.set(e6, t2)), t2;
588
+ function lt(e6) {
589
+ let t2 = it.get(e6);
590
+ return t2 || (t2 = ct(e6), it.set(e6, t2)), t2;
580
591
  }
581
592
  function k(e6) {
582
593
  return typeof e6 == `object` && !!e6;
583
594
  }
584
- function lt(e6, { isRepeated: t2, isMap: n2 }, r2) {
595
+ function ut(e6, { isRepeated: t2, isMap: n2 }, r2) {
585
596
  return t2 ? Array.isArray(e6) ? e6.map(r2) : e6 : n2 ? k(e6) ? Object.fromEntries(Object.entries(e6).map(([e7, t3]) => [e7, r2(t3)])) : e6 : r2(e6);
586
597
  }
587
598
  function A(e6, t2, n2) {
588
- k(e6) && ft(e6, t2, n2);
599
+ k(e6) && pt(e6, t2, n2);
589
600
  }
590
- function ut(e6, t2, n2) {
601
+ function dt(e6, t2, n2) {
591
602
  for (let [r2, i2] of t2) {
592
603
  if (!(r2 in e6)) continue;
593
- 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);
594
605
  let t3 = e6[r2];
595
606
  Array.isArray(t3) ? t3.forEach((e7) => A(e7, i2, n2)) : A(t3, i2, n2);
596
607
  }
597
608
  }
598
- function dt(e6, t2, n2) {
609
+ function ft(e6, t2, n2) {
599
610
  for (let [r2, i2] of t2) {
600
611
  let t3 = e6[r2];
601
612
  k(t3) && Object.values(t3).forEach((e7) => A(e7, i2, n2));
602
613
  }
603
614
  }
604
- function ft(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
605
- t2 && ut(e6, t2, i2), n2 && dt(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => A(e7, r2, i2));
615
+ function pt(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
616
+ t2 && dt(e6, t2, i2), n2 && ft(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => A(e7, r2, i2));
606
617
  }
607
618
  function j(e6, t2) {
608
619
  if (!k(e6)) return e6;
609
- for (let { paths: n2, transformFn: r2 } of t2) ft(e6, ct(n2), r2);
620
+ for (let { paths: n2, transformFn: r2 } of t2) pt(e6, lt(n2), r2);
610
621
  return e6;
611
622
  }
612
- function pt(e6) {
613
- return vt(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
623
+ function mt(e6) {
624
+ return yt(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
614
625
  }
615
- var mt = /([\p{Ll}\d])(\p{Lu})/gu;
616
- var ht = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
617
- var gt = `$1\0$2`;
618
- var _t = /[^\p{L}\d]+/giu;
619
- function vt(e6) {
626
+ var ht = /([\p{Ll}\d])(\p{Lu})/gu;
627
+ var gt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
628
+ var _t = `$1\0$2`;
629
+ var vt = /[^\p{L}\d]+/giu;
630
+ function yt(e6) {
620
631
  let t2 = e6.trim();
621
- t2 = t2.replace(mt, gt).replace(ht, gt), t2 = t2.replace(_t, `\0`);
632
+ t2 = t2.replace(ht, _t).replace(gt, _t), t2 = t2.replace(vt, `\0`);
622
633
  let n2 = 0, r2 = t2.length;
623
634
  for (; t2.charAt(n2) === `\0`; ) n2++;
624
635
  if (n2 === r2) return [];
625
636
  for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
626
637
  return t2.slice(n2, r2).split(/\0/g);
627
638
  }
628
- var yt = (e6) => `validationError` in (e6.response?.data?.details ?? {});
629
- var bt = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
630
- var xt = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
639
+ var bt = (e6) => `validationError` in (e6.response?.data?.details ?? {});
640
+ var xt = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
641
+ var St = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
631
642
  function M(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
632
643
  if (typeof e6 != `object` || !e6) throw e6;
633
- if (yt(e6)) return St(e6, t2, n2);
634
- if (bt(e6)) return Ct(e6);
635
- if (xt(e6)) {
636
- 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 };
644
+ if (bt(e6)) return Ct(e6, t2, n2);
645
+ if (xt(e6)) return wt(e6);
646
+ if (St(e6)) {
647
+ let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: mt(n3), data: {} }, requestId: e6.requestId };
637
648
  return N(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
638
649
  }
639
- return wt(e6);
650
+ return Tt(e6);
640
651
  }
641
- var St = (e6, t2, n2) => {
642
- let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Tt(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 };
652
+ var Ct = (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 };
643
654
  return N(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
644
655
  };
645
656
  var N = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
646
- var Ct = (e6) => {
647
- 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 };
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 ?? mt(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 };
648
659
  return N(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
649
660
  };
650
- var wt = (e6) => N(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 } } });
651
- var Tt = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
661
+ var Tt = (e6) => N(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: mt(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
662
+ var Et = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
652
663
  let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
653
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) => {
654
665
  let r3 = t2[e7.field];
655
- if (r3) return { ...e7, field: Et(r3, i2) };
666
+ if (r3) return { ...e7, field: Dt(r3, i2) };
656
667
  let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
657
668
  if (s2) {
658
669
  let t3 = a2[s2];
659
- if (t3) return { ...e7, field: e7.field.replace(s2, Et(t3, i2)) };
670
+ if (t3) return { ...e7, field: e7.field.replace(s2, Dt(t3, i2)) };
660
671
  }
661
672
  return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
662
673
  });
663
674
  };
664
- var Et = (e6, t2) => {
665
- let n2 = Dt(e6);
675
+ var Dt = (e6, t2) => {
676
+ let n2 = Ot(e6);
666
677
  return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
667
678
  };
668
- var Dt = (e6) => {
679
+ var Ot = (e6) => {
669
680
  let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
670
681
  return t2 && t2.groups && Number(t2.groups.argIndex);
671
682
  };
672
- function Ot() {
683
+ function kt() {
673
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;
674
685
  if (e6) return { initWixModules(t3, n3) {
675
- return kt(() => e6(t3, n3));
686
+ return At(() => e6(t3, n3));
676
687
  }, fetchWithAuth() {
677
688
  throw Error(`fetchWithAuth is not available in this context`);
678
689
  }, graphql() {
679
690
  throw Error(`graphql is not available in this context`);
680
691
  } };
681
- let t2 = typeof $wixContext < `u` ? $wixContext.client : m.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : m.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : m.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : m.elevatedClient;
692
+ let t2 = typeof $wixContext < `u` ? $wixContext.client : h.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : h.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : h.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : h.elevatedClient;
682
693
  if (t2 || n2) return { initWixModules(e7, r2) {
683
694
  if (r2) {
684
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`);
685
- return kt(() => n2.use(e7));
696
+ return At(() => n2.use(e7));
686
697
  }
687
698
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
688
- return kt(() => t2.use(e7));
699
+ return At(() => t2.use(e7));
689
700
  }, fetchWithAuth: (e7, n3) => {
690
701
  if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
691
702
  return t2.fetchWithAuth(e7, n3);
@@ -697,110 +708,110 @@ function Ot() {
697
708
  return t2.graphql(e7, n3, r2);
698
709
  } };
699
710
  }
700
- function kt(e6) {
701
- let t2 = globalThis.__wix_context__, n2 = { client: m.client, elevatedClient: m.elevatedClient }, r2;
702
- globalThis.__wix_context__ = void 0, m.client = void 0, m.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
711
+ function At(e6) {
712
+ let t2 = globalThis.__wix_context__, n2 = { client: h.client, elevatedClient: h.elevatedClient }, r2;
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);
703
714
  try {
704
715
  return e6();
705
716
  } finally {
706
- globalThis.__wix_context__ = t2, m.client = n2.client, m.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
717
+ globalThis.__wix_context__ = t2, h.client = n2.client, h.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
707
718
  }
708
719
  }
709
- function At(e6, t2) {
720
+ function jt(e6, t2) {
710
721
  return (...n2) => {
711
- let r2 = Ot();
722
+ let r2 = kt();
712
723
  return r2 ? r2.initWixModules(e6, t2).apply(void 0, n2) : e6.apply(void 0, n2);
713
724
  };
714
725
  }
715
- function jt(e6, t2 = false) {
716
- return At(e6, t2);
726
+ function Mt(e6, t2 = false) {
727
+ return jt(e6, t2);
717
728
  }
718
- function Mt(e6, t2) {
719
- let n2 = Pt(e6), r2 = Object.entries(n2).some(([e7, t3]) => e7.includes(`.`) || Array.isArray(t3) && t3.some((e8) => typeof e8 == `object`));
720
- return t2 && r2 ? new URLSearchParams({ ".r": It(JSON.stringify(e6)) }) : Object.entries(n2).reduce((e7, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
729
+ function Nt(e6, t2) {
730
+ let n2 = Ft(e6), r2 = Object.entries(n2).some(([e7, t3]) => e7.includes(`.`) || Array.isArray(t3) && t3.some((e8) => typeof e8 == `object`));
731
+ return t2 && r2 ? new URLSearchParams({ ".r": Lt(JSON.stringify(e6)) }) : Object.entries(n2).reduce((e7, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
721
732
  r3 == null || Array.isArray(n3) && typeof r3 == `object` || e7.append(t3, r3);
722
733
  }), e7), new URLSearchParams());
723
734
  }
724
- function Nt(e6) {
725
- let t2 = Yt(qt(e6.host), e6.domainToMappings);
726
- return an(tn(e6.protoPath, e6.data || {}), t2);
735
+ function Pt(e6) {
736
+ let t2 = Xt(Jt(e6.host), e6.domainToMappings);
737
+ return on(nn(e6.protoPath, e6.data || {}), t2);
727
738
  }
728
- function Pt(e6, t2 = ``) {
739
+ function Ft(e6, t2 = ``) {
729
740
  let n2 = {};
730
741
  return Object.entries(e6).forEach(([e7, r2]) => {
731
- let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Ft(t2, e7);
742
+ let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = It(t2, e7);
732
743
  if (i2) {
733
- let e8 = Pt(r2, a2);
744
+ let e8 = Ft(r2, a2);
734
745
  Object.assign(n2, e8);
735
746
  } else n2[a2] = r2;
736
747
  }), n2;
737
748
  }
738
- function Ft(e6, t2) {
749
+ function It(e6, t2) {
739
750
  return `${e6}${e6 ? `.` : ``}${t2}`;
740
751
  }
741
- var It = (e6) => {
752
+ var Lt = (e6) => {
742
753
  let t2 = new TextEncoder().encode(e6);
743
754
  return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e6, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
744
755
  };
745
- var Lt = [`wix.com`, `editorx.com`];
746
- var Rt = `_`;
747
- var zt = `*.`;
748
- var Bt = RegExp(`\\.(${Lt.join(`|`)})$`);
749
- var Vt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
750
- var Ht = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
751
- var Ut = `dev.wix-code.com`;
752
- var Wt = /{(.*)}/;
753
- var Gt = RegExp(`\\.(${Vt.join(`|`)})$`);
754
- var Kt = RegExp(`.*\\.${Ut}$`);
755
- function qt(e6) {
756
- return Jt(e6).replace(Bt, `._base_domain_`).replace(Gt, `._api_base_domain_`).replace(Kt, `*.dev.wix-code.com`);
757
- }
756
+ var Rt = [`wix.com`, `editorx.com`];
757
+ var zt = `_`;
758
+ var Bt = `*.`;
759
+ var Vt = RegExp(`\\.(${Rt.join(`|`)})$`);
760
+ var Ht = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
761
+ var Ut = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
762
+ var Wt = `dev.wix-code.com`;
763
+ var Gt = /{(.*)}/;
764
+ var Kt = RegExp(`\\.(${Ht.join(`|`)})$`);
765
+ var qt = RegExp(`.*\\.${Wt}$`);
758
766
  function Jt(e6) {
759
- return Ht[e6] ?? e6;
767
+ return Yt(e6).replace(Vt, `._base_domain_`).replace(Kt, `._api_base_domain_`).replace(qt, `*.dev.wix-code.com`);
768
+ }
769
+ function Yt(e6) {
770
+ return Ut[e6] ?? e6;
760
771
  }
761
- function Yt(e6, t2) {
772
+ function Xt(e6, t2) {
762
773
  let n2 = t2[e6];
763
774
  if (n2) return n2;
764
- let r2 = Xt(e6, t2) ?? Zt(e6, t2);
775
+ let r2 = Zt(e6, t2) ?? Qt(e6, t2);
765
776
  if (!r2) {
766
- if ($t(e6)) {
767
- let e7 = t2[en];
777
+ if (en(e6)) {
778
+ let e7 = t2[tn];
768
779
  if (e7) return e7;
769
780
  }
770
- let n3 = t2[Rt];
781
+ let n3 = t2[zt];
771
782
  if (n3) return n3;
772
783
  }
773
784
  return r2 ?? [];
774
785
  }
775
- function Xt(e6, t2) {
786
+ function Zt(e6, t2) {
776
787
  return Object.entries(t2).find(([t3]) => {
777
788
  let [, ...n2] = e6.split(`.`);
778
789
  return n2.join(`.`) === t3;
779
790
  })?.[1];
780
791
  }
781
- function Zt(e6, t2) {
782
- let [n2] = Object.entries(t2).filter(([t3]) => Qt(e6, t3)).sort(([e7], [t3]) => t3.length - e7.length);
792
+ function Qt(e6, t2) {
793
+ let [n2] = Object.entries(t2).filter(([t3]) => $t(e6, t3)).sort(([e7], [t3]) => t3.length - e7.length);
783
794
  if (!n2) return;
784
795
  let [, r2] = n2;
785
796
  return r2;
786
797
  }
787
- function Qt(e6, t2) {
788
- if (!t2.startsWith(zt)) return false;
798
+ function $t(e6, t2) {
799
+ if (!t2.startsWith(Bt)) return false;
789
800
  let n2 = t2.slice(1);
790
801
  return e6.length > n2.length && e6.endsWith(n2);
791
802
  }
792
- function $t(e6) {
803
+ function en(e6) {
793
804
  return !!e6.match(/\._base_domain_$/);
794
805
  }
795
- var en = `www._base_domain_`;
796
- function tn(e6, t2) {
797
- return e6.split(`/`).map((e7) => nn(e7, t2)).join(`/`);
798
- }
806
+ var tn = `www._base_domain_`;
799
807
  function nn(e6, t2) {
800
- let n2 = e6.match(Wt) || [], r2 = n2[1];
801
- return r2 ? rn(t2, r2, e6, e6.replace(n2[0], ``)) : e6;
808
+ return e6.split(`/`).map((e7) => rn(e7, t2)).join(`/`);
802
809
  }
803
- function rn(e6, t2, n2, r2) {
810
+ function rn(e6, t2) {
811
+ let n2 = e6.match(Gt) || [], r2 = n2[1];
812
+ return r2 ? an(t2, r2, e6, e6.replace(n2[0], ``)) : e6;
813
+ }
814
+ function an(e6, t2, n2, r2) {
804
815
  let i2 = e6;
805
816
  for (let e7 of t2.split(`.`)) {
806
817
  if (!i2) return n2;
@@ -808,22 +819,22 @@ function rn(e6, t2, n2, r2) {
808
819
  }
809
820
  return `${i2}${r2}`;
810
821
  }
811
- function an(e6, t2) {
822
+ function on(e6, t2) {
812
823
  let n2 = t2?.find((t3) => e6.startsWith(t3.destPath));
813
824
  return n2 ? n2.srcPath + e6.slice(n2.destPath.length) : e6;
814
825
  }
815
- function on(e6) {
826
+ function sn(e6) {
816
827
  return e6 === `NaN` ? NaN : e6 === `Infinity` ? 1 / 0 : e6 === `-Infinity` ? -1 / 0 : e6;
817
828
  }
818
- var sn = `modulepreload`;
819
- var cn = function(e6, t2) {
829
+ var cn = `modulepreload`;
830
+ var ln = function(e6, t2) {
820
831
  return new URL(e6, t2).href;
821
832
  };
822
- var ln = {};
823
- var un = function(e6) {
833
+ var un = {};
834
+ var dn = function(e6) {
824
835
  return e6.pathname.endsWith(`.css`);
825
836
  };
826
- var dn = function(e6, t2, n2) {
837
+ var fn = function(e6, t2, n2) {
827
838
  if (t2 in e6) return e6[t2];
828
839
  let r2 = n2();
829
840
  if (!r2) {
@@ -837,7 +848,7 @@ var dn = function(e6, t2, n2) {
837
848
  });
838
849
  return e6[t2] = i2, i2;
839
850
  };
840
- var fn = function(e6, t2, n2) {
851
+ var pn = function(e6, t2, n2) {
841
852
  let r2 = Promise.resolve();
842
853
  if (t2 && t2.length > 0) {
843
854
  let o3 = function(e8) {
@@ -848,9 +859,9 @@ var fn = function(e6, t2, n2) {
848
859
  var o2 = o3, s2 = s3;
849
860
  let e7, i3 = document.querySelector(`meta[property=csp-nonce]`), a2 = i3?.nonce || i3?.getAttribute(`nonce`);
850
861
  r2 = o3(t2.map((t3) => {
851
- t3 = cn(t3, n2);
852
- let r3 = s3(t3), i4 = un(r3);
853
- return dn(ln, r3.href, () => {
862
+ t3 = ln(t3, n2);
863
+ let r3 = s3(t3), i4 = dn(r3);
864
+ return fn(un, r3.href, () => {
854
865
  if (e7 === void 0) {
855
866
  e7 = { all: /* @__PURE__ */ new Set(), styles: /* @__PURE__ */ new Set() };
856
867
  let t5 = document.getElementsByTagName(`link`);
@@ -861,7 +872,7 @@ var fn = function(e6, t2, n2) {
861
872
  }
862
873
  if ((i4 ? e7.styles : e7.all).has(r3.href)) return;
863
874
  let t4 = document.createElement(`link`);
864
- if (t4.rel = i4 ? `stylesheet` : sn, i4 || (t4.as = `script`), t4.crossOrigin = ``, t4.href = r3.href, a2 && t4.setAttribute(`nonce`, a2), document.head.appendChild(t4), i4) return new Promise((e8, n3) => {
875
+ if (t4.rel = i4 ? `stylesheet` : cn, i4 || (t4.as = `script`), t4.crossOrigin = ``, t4.href = r3.href, a2 && t4.setAttribute(`nonce`, a2), document.head.appendChild(t4), i4) return new Promise((e8, n3) => {
865
876
  t4.addEventListener(`load`, e8), t4.addEventListener(`error`, () => n3(Error(`Unable to preload CSS for ${r3}`)));
866
877
  });
867
878
  });
@@ -876,30 +887,30 @@ var fn = function(e6, t2, n2) {
876
887
  return e6().catch(i2);
877
888
  });
878
889
  };
879
- var pn = `x-wix-linguist`;
880
- var mn = `00000000-0000-0000-0000-000000000000`;
881
- var hn = `false`;
882
- var gn = () => {
883
- let e6 = yn(`language`), t2 = yn(`locale`);
884
- if (e6) return { [pn]: [e6, t2 || e6, hn, mn].join(`|`) };
890
+ var mn = `x-wix-linguist`;
891
+ var hn = `00000000-0000-0000-0000-000000000000`;
892
+ var gn = `false`;
893
+ var _n = () => {
894
+ let e6 = bn(`language`), t2 = bn(`locale`);
895
+ if (e6) return { [mn]: [e6, t2 || e6, gn, hn].join(`|`) };
885
896
  };
886
- function _n() {
897
+ function vn() {
887
898
  let e6 = null, t2 = null;
888
899
  return { promise: new Promise((n2, r2) => {
889
900
  e6 = n2, t2 = r2;
890
901
  }), resolve: e6, reject: t2 };
891
902
  }
892
- var vn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
893
- var yn = (e6) => vn()?.[e6];
894
- var bn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
895
- let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = Sn();
896
- return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: yn(`language`), locale: yn(`locale`), get passThroughHeaders() {
897
- return gn();
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() {
908
+ return _n();
898
909
  } } };
899
910
  }, auth: (e7) => {
900
911
  let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
901
- !e7 && xn() && (e7 = t2?.getAccessTokenFunction?.());
902
- let n2 = false, { resolve: r2, promise: i2 } = _n();
912
+ !e7 && Sn() && (e7 = t2?.getAccessTokenFunction?.());
913
+ let n2 = false, { resolve: r2, promise: i2 } = vn();
903
914
  return { getAuthHeaders: async () => {
904
915
  if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
905
916
  return { headers: { Authorization: await e7() } };
@@ -907,60 +918,60 @@ var bn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host:
907
918
  r2(e8);
908
919
  }) };
909
920
  } });
910
- function xn() {
921
+ function Sn() {
911
922
  return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
912
923
  }
913
- function Sn() {
924
+ function Cn() {
914
925
  let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
915
926
  if (!e6) return;
916
927
  let t2 = new URL(e6);
917
928
  return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
918
929
  }
919
- var Cn = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
930
+ var wn = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
920
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`);
921
932
  return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
922
933
  }, getAccessToken: () => {
923
934
  throw Error(`Not implemented`);
924
935
  }, observeState: () => ({ disconnect: () => {
925
936
  } }) });
926
- var wn = bn({ createHost: function(e6) {
937
+ var Tn = xn({ createHost: function(e6) {
927
938
  let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
928
939
  if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
929
- return { channel: Cn({ clientSdk: t2, applicationId: n2 }), close: () => {
940
+ return { channel: wn({ clientSdk: t2, applicationId: n2 }), close: () => {
930
941
  } };
931
942
  } });
932
- var Tn = (e6, t2) => {
933
- let n2 = wn.host({ applicationId: e6, componentId: t2 }), r2 = wn.auth();
934
- return Ue({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
935
- };
936
- var En = (e6) => Tn(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
937
- var Dn = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
938
- var On = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
939
- function kn(e6, t2, { feature: n2, action: r2, level: i2 = `error`, contexts: a2 }) {
940
- let o2 = On(e6, `captureException`);
943
+ var En = (e6, t2) => {
944
+ let n2 = Tn.host({ applicationId: e6, componentId: t2 }), r2 = Tn.auth();
945
+ return We({ 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`, contexts: a2 }) {
951
+ let o2 = kn(e6, `captureException`);
941
952
  if (!o2) return;
942
953
  let s2 = t2 instanceof Error ? t2 : Error(String(t2));
943
954
  o2.captureException(s2, { level: i2, tags: { feature: n2, action: r2 }, ...a2 ? { contexts: a2 } : {} });
944
955
  }
945
- function An(e6) {
956
+ function jn(e6) {
946
957
  return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
947
958
  }
948
- function jn(e6) {
959
+ function Mn(e6) {
949
960
  return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
950
961
  }
951
- function Mn(e6) {
962
+ function Nn(e6) {
952
963
  return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
953
964
  }
954
965
  function P(e6, t2) {
955
- 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]] };
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]] };
956
967
  }
957
- function Nn(e6, t2) {
958
- 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]] };
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]] };
959
970
  }
960
- function Pn(e6) {
961
- if (e6 !== void 0 && Object.keys(e6).length !== 0) return Mn(e6) ? e6.$not : { $not: e6 };
971
+ function Fn(e6) {
972
+ if (e6 !== void 0 && Object.keys(e6).length !== 0) return Nn(e6) ? e6.$not : { $not: e6 };
962
973
  }
963
- var Fn = class {
974
+ var In = class {
964
975
  _items;
965
976
  _fetchNextPage;
966
977
  _fetchPrevPage;
@@ -990,7 +1001,7 @@ var Fn = class {
990
1001
  return await this._fetchPrevPage();
991
1002
  }
992
1003
  };
993
- var In = class extends Fn {
1004
+ var Ln = class extends In {
994
1005
  _nextCursor;
995
1006
  _prevCursor;
996
1007
  cursors;
@@ -1004,7 +1015,7 @@ var In = class extends Fn {
1004
1015
  return !!this._prevCursor;
1005
1016
  }
1006
1017
  };
1007
- var Ln = class extends Fn {
1018
+ var Rn = class extends In {
1008
1019
  _totalCount;
1009
1020
  _offset;
1010
1021
  _tooManyToCount;
@@ -1027,16 +1038,16 @@ var Ln = class extends Fn {
1027
1038
  return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
1028
1039
  }
1029
1040
  };
1030
- function Rn(e6) {
1041
+ function zn(e6) {
1031
1042
  let t2 = (n2) => ({ query: n2, async find() {
1032
1043
  try {
1033
- 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), { [Je]: a2, [Ye]: o2 } = e6.responseTransformer(i2);
1034
1045
  if (e6.pagingMethod === `OFFSET`) {
1035
1046
  let e7 = n2;
1036
- 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 });
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 });
1037
1048
  }
1038
1049
  let s2 = n2.cursorPaging;
1039
- 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 });
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 });
1040
1051
  } catch (t3) {
1041
1052
  throw e6.errorTransformer(t3);
1042
1053
  }
@@ -1088,11 +1099,11 @@ function Rn(e6) {
1088
1099
  let a2 = { [F(e6.transformationPaths, r2)]: { $exists: i2 } };
1089
1100
  return t2({ ...n2, filter: P(n2.filter, a2) });
1090
1101
  }, or(e7) {
1091
- return t2({ ...n2, filter: Nn(n2.filter, e7.query.filter) });
1102
+ return t2({ ...n2, filter: Pn(n2.filter, e7.query.filter) });
1092
1103
  }, and(e7) {
1093
1104
  return t2({ ...n2, filter: P(n2.filter, e7.query.filter) });
1094
1105
  }, not(e7) {
1095
- return t2({ ...n2, filter: Pn(e7.query.filter) });
1106
+ return t2({ ...n2, filter: Fn(e7.query.filter) });
1096
1107
  }, ascending(...r2) {
1097
1108
  return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: F(e6.transformationPaths, t3), order: `ASC` }))] });
1098
1109
  }, descending(...r2) {
@@ -1111,69 +1122,69 @@ function Rn(e6) {
1111
1122
  }
1112
1123
  function F(e6, t2) {
1113
1124
  let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
1114
- return n2 ? t2.replace(n2, e6[n2]) : Xe(t2, { ...e6, ...Ye });
1115
- }
1116
- var zn = `filter`;
1117
- var Bn = `sort`;
1118
- var Vn = `cursorPaging`;
1119
- var Hn = `paging`;
1120
- var Un = [zn, Bn, Vn];
1121
- var Wn = [zn, Bn, Hn];
1122
- function Gn(e6, t2) {
1125
+ return n2 ? t2.replace(n2, e6[n2]) : Ze(t2, { ...e6, ...Xe });
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) {
1123
1134
  return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
1124
1135
  }
1125
- function Kn(e6) {
1126
- return Gn(e6, Un);
1127
- }
1128
1136
  function qn(e6) {
1129
- return Gn(e6, Wn);
1137
+ return Kn(e6, Wn);
1130
1138
  }
1131
1139
  function Jn(e6) {
1140
+ return Kn(e6, Gn);
1141
+ }
1142
+ function Yn(e6) {
1132
1143
  let { hasOptionsParameter: t2 } = e6;
1133
1144
  return function(...n2) {
1134
- return t2 ? Xn(n2, e6) : Yn(n2, e6);
1145
+ return t2 ? Zn(n2, e6) : Xn(n2, e6);
1135
1146
  };
1136
1147
  }
1137
- function Yn(e6, t2) {
1148
+ function Xn(e6, t2) {
1138
1149
  return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
1139
1150
  }
1140
- function Xn(e6, t2) {
1151
+ function Zn(e6, t2) {
1141
1152
  switch (e6.length) {
1142
1153
  case 0:
1143
1154
  return t2.builderQueryFunction();
1144
1155
  case 1:
1145
- return Kn(e6[0]) || qn(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
1156
+ return qn(e6[0]) || Jn(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
1146
1157
  default:
1147
1158
  return t2.typedQueryFunction(e6[0], e6[1]);
1148
1159
  }
1149
1160
  }
1150
- var Zn = [{ path: `like.createdDate` }];
1151
- var Qn = [{ path: `likes.createdDate` }];
1152
- function $n(e6) {
1153
- return Nt(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` }] } }));
1161
+ var Qn = [{ path: `like.createdDate` }];
1162
+ var $n = [{ path: `likes.createdDate` }];
1163
+ function er(e6) {
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` }] } }));
1154
1165
  }
1155
- var er = `@wix/auto_sdk_blog_likes`;
1156
- function tr(e6) {
1166
+ var tr = `@wix/auto_sdk_blog_likes`;
1167
+ function nr(e6) {
1157
1168
  function t2({ host: t3 }) {
1158
- let n2 = j(e6, [{ transformFn: tt, paths: Zn }]);
1159
- 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) => j(e7, [{ transformFn: nt, paths: Zn }]) };
1169
+ let n2 = j(e6, [{ transformFn: nt, 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) => j(e7, [{ transformFn: rt, paths: Qn }]) };
1160
1171
  }
1161
1172
  return t2;
1162
1173
  }
1163
- function nr(e6) {
1174
+ function rr(e6) {
1164
1175
  function t2({ host: t3 }) {
1165
- 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) => j(e7, [{ transformFn: nt, paths: Qn }]) };
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) => j(e7, [{ transformFn: rt, paths: $n }]) };
1166
1177
  }
1167
1178
  return t2;
1168
1179
  }
1169
- function rr(e6) {
1180
+ function ir(e6) {
1170
1181
  function t2({ host: t3 }) {
1171
- 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: Mt(e6) };
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) };
1172
1183
  }
1173
1184
  return t2;
1174
1185
  }
1175
- async function ir(e6) {
1176
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = tr(D({ like: e6?.like }));
1186
+ async function ar(e6) {
1187
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = nr(D({ like: e6?.like }));
1177
1188
  n2?.onSiteCall?.();
1178
1189
  try {
1179
1190
  let e7 = await t2.request(r2);
@@ -1183,10 +1194,10 @@ async function ir(e6) {
1183
1194
  throw n2?.onError?.(e7), t3;
1184
1195
  }
1185
1196
  }
1186
- function ar() {
1197
+ function or() {
1187
1198
  let { httpClient: e6, sideEffects: t2 } = arguments[0];
1188
- return Rn({ func: async (n2) => {
1189
- let r2 = nr(n2);
1199
+ return zn({ func: async (n2) => {
1200
+ let r2 = rr(n2);
1190
1201
  t2?.onSiteCall?.();
1191
1202
  try {
1192
1203
  let n3 = await e6.request(r2);
@@ -1204,8 +1215,8 @@ function ar() {
1204
1215
  throw M(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
1205
1216
  }, pagingMethod: `CURSOR`, transformationPaths: {} });
1206
1217
  }
1207
- async function or(e6) {
1208
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = nr(D({ query: e6 }));
1218
+ async function sr(e6) {
1219
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = rr(D({ query: e6 }));
1209
1220
  n2?.onSiteCall?.();
1210
1221
  try {
1211
1222
  let e7 = await t2.request(r2);
@@ -1215,8 +1226,8 @@ async function or(e6) {
1215
1226
  throw n2?.onError?.(e7), t3;
1216
1227
  }
1217
1228
  }
1218
- async function sr(e6) {
1219
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = rr(D({ fqdn: e6?.fqdn, entityId: e6?.entityId }));
1229
+ async function cr(e6) {
1230
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ir(D({ fqdn: e6?.fqdn, entityId: e6?.entityId }));
1220
1231
  n2?.onSiteCall?.();
1221
1232
  try {
1222
1233
  let e7 = await t2.request(r2);
@@ -1226,41 +1237,41 @@ async function sr(e6) {
1226
1237
  throw n2?.onError?.(e7), t3;
1227
1238
  }
1228
1239
  }
1229
- function cr(e6) {
1230
- return (t2) => ir(t2, { httpClient: e6 });
1231
- }
1232
1240
  function lr(e6) {
1233
- return () => ar({ httpClient: e6 });
1241
+ return (t2) => ar(t2, { httpClient: e6 });
1234
1242
  }
1235
1243
  function ur(e6) {
1236
- return (t2) => or(t2, { httpClient: e6 });
1244
+ return () => or({ httpClient: e6 });
1237
1245
  }
1238
1246
  function dr(e6) {
1239
1247
  return (t2) => sr(t2, { httpClient: e6 });
1240
1248
  }
1241
1249
  function fr(e6) {
1242
- let t2 = Jn({ builderQueryFunction: () => lr(e6)(), typedQueryFunction: (t3) => ur(e6)(t3), hasOptionsParameter: false });
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 });
1243
1254
  function n2(e7) {
1244
1255
  return t2(...arguments);
1245
1256
  }
1246
1257
  return n2;
1247
1258
  }
1248
- var pr = jt(cr);
1249
- var mr = jt(dr);
1250
- var hr = jt(fr);
1251
- var gr = [{ path: `metrics.averageRating` }];
1252
- function _r(e6) {
1253
- return Nt(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` }] } }));
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) {
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` }] } }));
1254
1265
  }
1255
- var vr = `@wix/auto_sdk_blog_posts`;
1256
- function yr(e6) {
1266
+ var yr = `@wix/auto_sdk_blog_posts`;
1267
+ function br(e6) {
1257
1268
  function t2({ host: t3 }) {
1258
- 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: Mt(e6), transformResponse: (e7) => j(e7, [{ transformFn: on, paths: gr }]) };
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) => j(e7, [{ transformFn: sn, paths: _r }]) };
1259
1270
  }
1260
1271
  return t2;
1261
1272
  }
1262
- async function br(e6) {
1263
- let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = yr(D({ postId: e6 }, []));
1273
+ async function xr(e6) {
1274
+ let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = br(D({ postId: e6 }, []));
1264
1275
  n2?.onSiteCall?.();
1265
1276
  try {
1266
1277
  let e7 = await t2.request(r2);
@@ -1270,90 +1281,90 @@ async function br(e6) {
1270
1281
  throw n2?.onError?.(e7), t3;
1271
1282
  }
1272
1283
  }
1273
- function xr(e6) {
1274
- return (t2) => br(t2, { httpClient: e6 });
1284
+ function Sr(e6) {
1285
+ return (t2) => xr(t2, { httpClient: e6 });
1275
1286
  }
1276
- var Sr = jt(xr);
1277
- var Cr = `wix.blog.v3.post`;
1278
- var wr = async (e6) => {
1279
- await pr({ like: { entityId: e6, fqdn: Cr } });
1280
- };
1287
+ var Cr = Mt(Sr);
1288
+ var wr = `wix.blog.v3.post`;
1281
1289
  var Tr = async (e6) => {
1282
- await mr({ fqdn: Cr, entityId: e6 });
1290
+ await mr({ like: { entityId: e6, fqdn: wr } });
1291
+ };
1292
+ var Er = async (e6) => {
1293
+ await hr({ fqdn: wr, entityId: e6 });
1283
1294
  };
1284
- var Er = (e6) => typeof e6 == `number` ? e6 : void 0;
1285
- var Dr = async (e6) => {
1286
- let [t2, n2] = await Promise.allSettled([hr().eq(`fqdn`, Cr).eq(`entityId`, e6).limit(1).find(), Sr(e6)]), r2 = n2.status === `fulfilled` ? n2.value.metrics : void 0;
1287
- return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount: Er(r2?.likes), viewCount: Er(r2?.views), commentCount: Er(r2?.comments) };
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) };
1288
1299
  };
1289
1300
  function I(e6) {
1290
1301
  return e6;
1291
1302
  }
1292
- var Or = I(`@wix/site-service-editor-context`);
1293
- var kr = () => {
1303
+ var kr = I(`@wix/site-service-editor-context`);
1304
+ var Ar = () => {
1294
1305
  try {
1295
- return !!(0, import_services_manager_react.useService)(Or).previewMode;
1306
+ return !!(0, import_services_manager_react.useService)(kr).previewMode;
1296
1307
  } catch {
1297
1308
  return false;
1298
1309
  }
1299
1310
  };
1300
- var Ar = I(`@wix/viewer-service-site-members`);
1301
- var jr = () => {
1311
+ var jr = I(`@wix/viewer-service-site-members`);
1312
+ var Mr = () => {
1302
1313
  try {
1303
- return (0, import_services_manager_react.useService)(Ar);
1314
+ return (0, import_services_manager_react.useService)(jr);
1304
1315
  } catch {
1305
1316
  return;
1306
1317
  }
1307
1318
  };
1308
- var Mr = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
1319
+ var Nr = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
1309
1320
  var L = `wix-blog:post-like-toggled`;
1310
- var Nr = () => {
1321
+ var Pr = () => {
1311
1322
  let e6 = window;
1312
1323
  return e6[L] ??= /* @__PURE__ */ new Map();
1313
1324
  };
1314
- var Pr = (e6) => {
1315
- Nr().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(L, { detail: e6 }));
1325
+ var Fr = (e6) => {
1326
+ Pr().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(L, { detail: e6 }));
1316
1327
  };
1317
- var Fr = (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 });
1318
- var Ir = (e6, t2, i2 = false, l2) => {
1319
- let u2 = kr() || i2, [d2, f2] = (0, import_react.useState)(Mr), p2 = (0, import_react.useRef)(Mr), 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 = jr(), [b2, x2] = (0, import_react.useState)(0);
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);
1320
1331
  (0, import_react.useEffect)(() => {
1321
1332
  let e7 = y2?.addMemberLoginListener?.(() => {
1322
- Nr().clear(), x2((e8) => e8 + 1);
1333
+ Pr().clear(), x2((e8) => e8 + 1);
1323
1334
  });
1324
1335
  return () => {
1325
1336
  e7 !== void 0 && y2?.removeMemberLoginListener?.(e7);
1326
1337
  };
1327
1338
  }, [y2]);
1328
1339
  let S2 = (0, import_react.useCallback)((e7) => {
1329
- let t3 = p2.current, r2 = { ...t3, ...e7 };
1330
- Object.keys(r2).every((e8) => r2[e8] === t3[e8]) || (p2.current = r2, h2.current.forEach((e8) => e8()), (0, import_react.startTransition)(() => f2(r2)));
1331
- }, []), C2 = (0, import_react.useMemo)(() => ({ get: () => Fr(p2.current, m2.current), subscribe: (e7) => (h2.current.add(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), () => {
1332
1343
  h2.current.delete(e7);
1333
1344
  }) }), []);
1334
1345
  (0, import_react.useEffect)(() => {
1335
1346
  m2.current !== t2 && (m2.current = t2, h2.current.forEach((e7) => e7()));
1336
1347
  }, [t2]), (0, import_react.useEffect)(() => {
1337
- if (v2.current !== e6 && (v2.current = e6, S2(Mr)), _2.current = false, !e6 || u2) {
1348
+ if (v2.current !== e6 && (v2.current = e6, S2(Nr)), _2.current = false, !e6 || u2) {
1338
1349
  S2({ isLikeCountLoaded: true });
1339
1350
  return;
1340
1351
  }
1341
1352
  let t3 = false;
1342
- return Dr(e6).then(({ liked: e7, likeCount: n2, viewCount: r2, commentCount: i3 }) => {
1343
- t3 || S2({ isLikeCountLoaded: true, viewCount: r2, commentCount: i3, baselineLiked: e7, freshLikeCount: n2, ...!_2.current && { liked: e7 } });
1344
- }).catch((n2) => {
1345
- t3 || S2({ isLikeCountLoaded: true }), kn(l2, n2, { feature: Dn.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
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 } });
1355
+ }).catch((n3) => {
1356
+ t3 || S2({ isLikeCountLoaded: true }), An(a2, n3, { feature: On.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
1346
1357
  }), () => {
1347
1358
  t3 = true;
1348
1359
  };
1349
- }, [e6, u2, l2, S2, b2]), (0, import_react.useEffect)(() => {
1360
+ }, [e6, u2, a2, S2, b2]), (0, import_react.useEffect)(() => {
1350
1361
  if (!e6) return;
1351
1362
  let t3 = (e7) => {
1352
1363
  _2.current = true, S2({ liked: e7 });
1353
- }, n2 = Nr().get(e6);
1354
- n2 !== void 0 && t3(n2);
1355
- let r2 = (n3) => {
1356
- let { detail: r3 } = n3;
1364
+ }, n3 = Pr().get(e6);
1365
+ n3 !== void 0 && t3(n3);
1366
+ let r2 = (n4) => {
1367
+ let { detail: r3 } = n4;
1357
1368
  r3.postId === e6 && t3(r3.liked);
1358
1369
  };
1359
1370
  return window.addEventListener(L, r2), () => window.removeEventListener(L, r2);
@@ -1361,36 +1372,36 @@ var Ir = (e6, t2, i2 = false, l2) => {
1361
1372
  let ee2 = (0, import_react.useCallback)(async (t3) => {
1362
1373
  if (!e6 || g2.current) return;
1363
1374
  _2.current = true;
1364
- let n2 = !p2.current.liked;
1365
- if (S2({ liked: n2 }), Pr({ postId: e6, liked: n2 }), !u2) {
1375
+ let n3 = !p2.current.liked;
1376
+ if (S2({ liked: n3 }), Fr({ postId: e6, liked: n3 }), !u2) {
1366
1377
  g2.current = true;
1367
1378
  try {
1368
- await (n2 ? wr(e6) : Tr(e6));
1379
+ await (n3 ? Tr(e6) : Er(e6));
1369
1380
  } catch (t4) {
1370
- S2({ liked: !n2 }), Pr({ postId: e6, liked: !n2 }), kn(l2, t4, { feature: Dn.likes, action: n2 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
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 } } });
1371
1382
  } finally {
1372
1383
  g2.current = false;
1373
1384
  }
1374
1385
  }
1375
- }, [e6, u2, l2, S2]);
1376
- return { ...Fr(d2, t2), toggleLike: ee2, liveLikes: C2 };
1386
+ }, [e6, u2, a2, S2]);
1387
+ return { ...Ir(d2, t2), toggleLike: ee2, liveLikes: C2 };
1377
1388
  };
1378
- var Lr = I(`@wix/site-service-locale`);
1379
- var Rr = () => {
1389
+ var Rr = I(`@wix/site-service-locale`);
1390
+ var zr = () => {
1380
1391
  try {
1381
- let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(Lr);
1392
+ let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(Rr);
1382
1393
  return e6 || t2;
1383
1394
  } catch {
1384
1395
  return;
1385
1396
  }
1386
1397
  };
1387
- var zr = () => {
1398
+ var Br = () => {
1388
1399
  let e6 = /* @__PURE__ */ new Map();
1389
1400
  return { getOrInsert: (t2, n2) => (e6.has(t2) || e6.set(t2, n2().finally(() => {
1390
1401
  e6.delete(t2);
1391
1402
  })), e6.get(t2)) };
1392
1403
  };
1393
- var Br = async (e6) => {
1404
+ var Vr = async (e6) => {
1394
1405
  try {
1395
1406
  let { default: t2 } = await e6();
1396
1407
  return t2;
@@ -1398,9 +1409,9 @@ var Br = async (e6) => {
1398
1409
  return;
1399
1410
  }
1400
1411
  };
1401
- var Vr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
1402
- let r2 = zr(), i2 = async (r3) => {
1403
- let [i3, a2] = await Promise.all([Br(() => t2(r3)), !e6 || !n2 ? void 0 : Br(() => n2(r3))]);
1412
+ var Hr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
1413
+ let r2 = Br(), i2 = async (r3) => {
1414
+ let [i3, a2] = await Promise.all([Vr(() => t2(r3)), !e6 || !n2 ? void 0 : Vr(() => n2(r3))]);
1404
1415
  if (i3 && a2) return { ...i3, ...a2 };
1405
1416
  if (i3) return i3;
1406
1417
  if (a2) return a2;
@@ -1415,25 +1426,25 @@ var z = () => {
1415
1426
  });
1416
1427
  return n2.resolve = e6, n2.reject = t2, n2;
1417
1428
  };
1418
- var Hr = (e6) => e6 == null ? `` : String(e6);
1419
- var Ur = (e6, t2, n2) => {
1429
+ var Ur = (e6) => e6 == null ? `` : String(e6);
1430
+ var Wr = (e6, t2, n2) => {
1420
1431
  e6.forEach((e7) => {
1421
1432
  t2[e7] && (n2[e7] = t2[e7]);
1422
1433
  });
1423
1434
  };
1424
- var Wr = /###/g;
1425
- var Gr = (e6) => e6 && e6.includes(`###`) ? e6.replace(Wr, `.`) : e6;
1426
- var Kr = (e6) => !e6 || R(e6);
1435
+ var Gr = /###/g;
1436
+ var Kr = (e6) => e6 && e6.includes(`###`) ? e6.replace(Gr, `.`) : e6;
1437
+ var qr = (e6) => !e6 || R(e6);
1427
1438
  var B = (e6, t2, n2) => {
1428
1439
  let r2 = R(t2) ? t2.split(`.`) : t2, i2 = 0;
1429
1440
  for (; i2 < r2.length - 1; ) {
1430
- if (Kr(e6)) return {};
1431
- let t3 = Gr(r2[i2]);
1441
+ if (qr(e6)) return {};
1442
+ let t3 = Kr(r2[i2]);
1432
1443
  !e6[t3] && n2 && (e6[t3] = new n2()), e6 = Object.prototype.hasOwnProperty.call(e6, t3) ? e6[t3] : {}, ++i2;
1433
1444
  }
1434
- return Kr(e6) ? {} : { obj: e6, k: Gr(r2[i2]) };
1445
+ return qr(e6) ? {} : { obj: e6, k: Kr(r2[i2]) };
1435
1446
  };
1436
- var qr = (e6, t2, n2) => {
1447
+ var Jr = (e6, t2, n2) => {
1437
1448
  let { obj: r2, k: i2 } = B(e6, t2, Object);
1438
1449
  if (r2 !== void 0 || t2.length === 1) {
1439
1450
  r2[i2] = n2;
@@ -1443,7 +1454,7 @@ var qr = (e6, t2, n2) => {
1443
1454
  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);
1444
1455
  s2.obj[`${s2.k}.${a2}`] = n2;
1445
1456
  };
1446
- var Jr = (e6, t2, n2, r2) => {
1457
+ var Yr = (e6, t2, n2, r2) => {
1447
1458
  let { obj: i2, k: a2 } = B(e6, t2, Object);
1448
1459
  i2[a2] = i2[a2] || [], i2[a2].push(n2);
1449
1460
  };
@@ -1451,18 +1462,18 @@ var V = (e6, t2) => {
1451
1462
  let { obj: n2, k: r2 } = B(e6, t2);
1452
1463
  if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
1453
1464
  };
1454
- var Yr = (e6, t2, n2) => {
1465
+ var Xr = (e6, t2, n2) => {
1455
1466
  let r2 = V(e6, n2);
1456
1467
  return r2 === void 0 ? V(t2, n2) : r2;
1457
1468
  };
1458
- var Xr = (e6, t2, n2) => {
1459
- 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]) : Xr(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
1469
+ var Zr = (e6, t2, n2) => {
1470
+ 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]) : Zr(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
1460
1471
  return e6;
1461
1472
  };
1462
1473
  var H = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
1463
- var Zr = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1464
- var Qr = (e6) => R(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Zr[e7]) : e6;
1465
- var $r = class {
1474
+ var Qr = { "&": `&amp;`, "<": `&lt;`, ">": `&gt;`, '"': `&quot;`, "'": `&#39;`, "/": `&#x2F;` };
1475
+ var $r = (e6) => R(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Qr[e7]) : e6;
1476
+ var ei = class {
1466
1477
  constructor(e6) {
1467
1478
  this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
1468
1479
  }
@@ -1473,20 +1484,20 @@ var $r = class {
1473
1484
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
1474
1485
  }
1475
1486
  };
1476
- var ei = [` `, `,`, `?`, `!`, `;`];
1477
- var ti = new $r(20);
1478
- var ni = (e6, t2, n2) => {
1487
+ var ti = [` `, `,`, `?`, `!`, `;`];
1488
+ var ni = new ei(20);
1489
+ var ri = (e6, t2, n2) => {
1479
1490
  t2 ||= ``, n2 ||= ``;
1480
- let r2 = ei.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
1491
+ let r2 = ti.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
1481
1492
  if (r2.length === 0) return true;
1482
- let i2 = ti.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
1493
+ let i2 = ni.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
1483
1494
  if (!a2) {
1484
1495
  let t3 = e6.indexOf(n2);
1485
1496
  t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
1486
1497
  }
1487
1498
  return a2;
1488
1499
  };
1489
- var ri = (e6, t2, n2 = `.`) => {
1500
+ var ii = (e6, t2, n2 = `.`) => {
1490
1501
  if (!e6) return;
1491
1502
  if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
1492
1503
  let r2 = t2.split(n2), i2 = e6;
@@ -1503,7 +1514,7 @@ var ri = (e6, t2, n2 = `.`) => {
1503
1514
  return i2;
1504
1515
  };
1505
1516
  var U = (e6) => e6?.replace(/_/g, `-`);
1506
- var ii = { type: `logger`, log(e6) {
1517
+ var ai = { type: `logger`, log(e6) {
1507
1518
  this.output(`log`, e6);
1508
1519
  }, warn(e6) {
1509
1520
  this.output(`warn`, e6);
@@ -1517,7 +1528,7 @@ var W = new class e2 {
1517
1528
  this.init(e6, t2);
1518
1529
  }
1519
1530
  init(e6, t2 = {}) {
1520
- this.prefix = t2.prefix || `i18next:`, this.logger = e6 || ii, this.options = t2, this.debug = t2.debug;
1531
+ this.prefix = t2.prefix || `i18next:`, this.logger = e6 || ai, this.options = t2, this.debug = t2.debug;
1521
1532
  }
1522
1533
  log(...e6) {
1523
1534
  return this.forward(e6, `log`, ``, true);
@@ -1569,8 +1580,8 @@ var G = class {
1569
1580
  });
1570
1581
  }
1571
1582
  };
1572
- var ai = /* @__PURE__ */ new WeakSet();
1573
- var oi = class extends G {
1583
+ var oi = /* @__PURE__ */ new WeakSet();
1584
+ var si = class extends G {
1574
1585
  constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
1575
1586
  super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
1576
1587
  }
@@ -1585,11 +1596,11 @@ var oi = class extends G {
1585
1596
  let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
1586
1597
  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)));
1587
1598
  let s2 = V(this.data, o2);
1588
- return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !R(n2) ? s2 : ri(this.data?.[e6]?.[t2], n2, i2);
1599
+ return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !R(n2) ? s2 : ii(this.data?.[e6]?.[t2], n2, i2);
1589
1600
  }
1590
1601
  addResource(e6, t2, n2, r2, i2 = { silent: false }) {
1591
1602
  let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
1592
- n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), qr(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
1603
+ n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Jr(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
1593
1604
  }
1594
1605
  addResources(e6, t2, n2, r2 = { silent: false }) {
1595
1606
  for (let r3 in n2) (R(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
@@ -1599,7 +1610,7 @@ var oi = class extends G {
1599
1610
  let o2 = [e6, t2];
1600
1611
  e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
1601
1612
  let s2 = V(this.data, o2) || {};
1602
- a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Xr(s2, n2, i2) : s2 = { ...s2, ...n2 }, qr(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
1613
+ a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Zr(s2, n2, i2) : s2 = { ...s2, ...n2 }, Jr(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
1603
1614
  }
1604
1615
  removeResourceBundle(e6, t2) {
1605
1616
  this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
@@ -1617,37 +1628,37 @@ var oi = class extends G {
1617
1628
  let t2 = this.getDataByLanguage(e6);
1618
1629
  return !!(t2 && Object.keys(t2) || []).find((e7) => {
1619
1630
  let n2 = t2[e7];
1620
- return ai.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && ai.add(n2), true);
1631
+ return oi.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && oi.add(n2), true);
1621
1632
  });
1622
1633
  }
1623
1634
  toJSON() {
1624
1635
  return this.data;
1625
1636
  }
1626
1637
  };
1627
- var si = { processors: {}, addPostProcessor(e6) {
1638
+ var ci = { processors: {}, addPostProcessor(e6) {
1628
1639
  this.processors[e6.name] = e6;
1629
1640
  }, handle(e6, t2, n2, r2, i2) {
1630
1641
  return e6.forEach((e7) => {
1631
1642
  t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
1632
1643
  }), t2;
1633
1644
  } };
1634
- var ci = Symbol(`i18next/PATH_KEY`);
1635
- function li() {
1645
+ var li = Symbol(`i18next/PATH_KEY`);
1646
+ function ui() {
1636
1647
  let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
1637
- return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === ci ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1648
+ return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === li ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
1638
1649
  }
1639
1650
  function K(e6, t2) {
1640
- let { [ci]: n2 } = e6(li()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
1651
+ let { [li]: n2 } = e6(ui()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
1641
1652
  if (n2.length > 1 && i2) {
1642
1653
  let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
1643
1654
  if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
1644
1655
  }
1645
1656
  return n2.join(r2);
1646
1657
  }
1647
- var ui = (e6) => !R(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
1648
- var di = class e3 extends G {
1658
+ var di = (e6) => !R(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
1659
+ var fi = class e3 extends G {
1649
1660
  constructor(e6, t2 = {}) {
1650
- super(), Ur([`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 = {};
1661
+ super(), Wr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = W.create(`translator`), this.checkedLoadedFor = {};
1651
1662
  }
1652
1663
  changeLanguage(e6) {
1653
1664
  e6 && (this.language = e6);
@@ -1657,13 +1668,13 @@ var di = class e3 extends G {
1657
1668
  if (e6 == null) return false;
1658
1669
  let r2 = this.resolve(e6, n2);
1659
1670
  if (r2?.res === void 0) return false;
1660
- let i2 = ui(r2.res);
1671
+ let i2 = di(r2.res);
1661
1672
  return !(n2.returnObjects === false && i2);
1662
1673
  }
1663
1674
  extractFromKey(e6, t2) {
1664
1675
  let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
1665
1676
  n2 === void 0 && (n2 = `:`);
1666
- 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 && !ni(e6, n2, r2);
1677
+ 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 && !ri(e6, n2, r2);
1667
1678
  if (a2 && !o2) {
1668
1679
  let t3 = e6.match(this.interpolator.nestingRegexp);
1669
1680
  if (t3 && t3.length > 0) return { key: e6, namespaces: R(i2) ? [i2] : i2 };
@@ -1682,7 +1693,7 @@ var di = class e3 extends G {
1682
1693
  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;
1683
1694
  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;
1684
1695
  y2 && !m2 && x2 && (T2 = w2);
1685
- let te2 = ui(T2), ne2 = Object.prototype.toString.apply(T2);
1696
+ let te2 = di(T2), ne2 = Object.prototype.toString.apply(T2);
1686
1697
  if (y2 && T2 && te2 && !_2.includes(ne2) && !(R(v2) && Array.isArray(T2))) {
1687
1698
  if (!i2.returnObjects && !this.options.returnObjects) {
1688
1699
  this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
@@ -1693,7 +1704,7 @@ var di = class e3 extends G {
1693
1704
  let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
1694
1705
  for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
1695
1706
  let r3 = `${n3}${o2}${e7}`;
1696
- t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: ui(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
1707
+ t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: di(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
1697
1708
  }
1698
1709
  m2 = t3;
1699
1710
  }
@@ -1742,7 +1753,7 @@ var di = class e3 extends G {
1742
1753
  !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();
1743
1754
  }
1744
1755
  let a2 = n2.postProcess || this.options.postProcess, o2 = R(a2) ? [a2] : a2;
1745
- return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = si.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
1756
+ return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = ci.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
1746
1757
  }
1747
1758
  resolve(e6, t2 = {}) {
1748
1759
  let n2, r2, i2, a2, o2;
@@ -1793,7 +1804,7 @@ var di = class e3 extends G {
1793
1804
  return false;
1794
1805
  }
1795
1806
  };
1796
- var fi = class {
1807
+ var pi = class {
1797
1808
  constructor(e6) {
1798
1809
  this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = W.create(`languageUtils`), this.resolveHierarchyCache = {};
1799
1810
  }
@@ -1867,9 +1878,9 @@ var fi = class {
1867
1878
  }), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
1868
1879
  }
1869
1880
  };
1870
- var pi = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1871
- var mi = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1872
- var hi = class {
1881
+ var mi = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
1882
+ var hi = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
1883
+ var gi = class {
1873
1884
  constructor(e6, t2 = {}) {
1874
1885
  this.languageUtils = e6, this.options = t2, this.logger = W.create(`pluralResolver`), this.pluralRulesCache = {};
1875
1886
  }
@@ -1883,8 +1894,8 @@ var hi = class {
1883
1894
  try {
1884
1895
  a2 = new Intl.PluralRules(n2, { type: r2 });
1885
1896
  } catch {
1886
- if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), mi;
1887
- if (!e6.match(/-|_/)) return mi;
1897
+ if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), hi;
1898
+ if (!e6.match(/-|_/)) return hi;
1888
1899
  let n3 = this.languageUtils.getLanguagePartFromCode(e6);
1889
1900
  a2 = this.getRule(n3, t2);
1890
1901
  }
@@ -1899,26 +1910,26 @@ var hi = class {
1899
1910
  }
1900
1911
  getSuffixes(e6, t2 = {}) {
1901
1912
  let n2 = this.getRule(e6, t2);
1902
- return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => pi[e7] - pi[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
1913
+ return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => mi[e7] - mi[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
1903
1914
  }
1904
1915
  getSuffix(e6, t2, n2 = {}) {
1905
1916
  let r2 = this.getRule(e6, n2);
1906
1917
  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));
1907
1918
  }
1908
1919
  };
1909
- var gi = (e6, t2, n2, r2 = `.`, i2 = true) => {
1910
- let a2 = Yr(e6, t2, n2);
1911
- return !a2 && i2 && R(n2) && (a2 = ri(e6, n2, r2), a2 === void 0 && (a2 = ri(t2, n2, r2))), a2;
1920
+ var _i = (e6, t2, n2, r2 = `.`, i2 = true) => {
1921
+ let a2 = Xr(e6, t2, n2);
1922
+ return !a2 && i2 && R(n2) && (a2 = ii(e6, n2, r2), a2 === void 0 && (a2 = ii(t2, n2, r2))), a2;
1912
1923
  };
1913
- var _i = (e6) => e6.replace(/\$/g, `$$$$`);
1914
- var vi = class {
1924
+ var vi = (e6) => e6.replace(/\$/g, `$$$$`);
1925
+ var yi = class {
1915
1926
  constructor(e6 = {}) {
1916
1927
  this.logger = W.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
1917
1928
  }
1918
1929
  init(e6 = {}) {
1919
1930
  e6.interpolation ||= { escapeValue: true };
1920
1931
  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;
1921
- this.escape = t2 === void 0 ? Qr : 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();
1932
+ this.escape = t2 === void 0 ? $r : 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();
1922
1933
  }
1923
1934
  reset() {
1924
1935
  this.options && this.init(this.options);
@@ -1930,11 +1941,11 @@ var vi = class {
1930
1941
  interpolate(e6, t2, n2, r2) {
1931
1942
  let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
1932
1943
  if (!e7.includes(this.formatSeparator)) {
1933
- let i4 = gi(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
1944
+ let i4 = _i(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
1934
1945
  return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
1935
1946
  }
1936
1947
  let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
1937
- return this.format(gi(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1948
+ return this.format(_i(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
1938
1949
  };
1939
1950
  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.`);
1940
1951
  let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
@@ -1950,9 +1961,9 @@ var vi = class {
1950
1961
  a2 = i2[0];
1951
1962
  continue;
1952
1963
  } else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
1953
- } else !R(a2) && !this.useRawValueToEscape && (a2 = Hr(a2));
1964
+ } else !R(a2) && !this.useRawValueToEscape && (a2 = Ur(a2));
1954
1965
  let s3 = t3.safeValue(a2);
1955
- if (e6 = e6.replace(i2[0], _i(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
1966
+ if (e6 = e6.replace(i2[0], vi(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
1956
1967
  }
1957
1968
  }), e6;
1958
1969
  }
@@ -1976,12 +1987,12 @@ var vi = class {
1976
1987
  a2 = { ...n2 }, a2 = a2.replace && !R(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
1977
1988
  let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
1978
1989
  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;
1979
- R(i2) || (i2 = Hr(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) + Hr(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
1990
+ R(i2) || (i2 = Ur(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) + Ur(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
1980
1991
  }
1981
1992
  return l2 ? c2 + e6.slice(l2) : e6;
1982
1993
  }
1983
1994
  };
1984
- var yi = (e6) => {
1995
+ var bi = (e6) => {
1985
1996
  let t2 = e6.toLowerCase().trim(), n2 = {};
1986
1997
  if (e6.includes(`(`)) {
1987
1998
  let r2 = e6.split(`(`);
@@ -1996,7 +2007,7 @@ var yi = (e6) => {
1996
2007
  }
1997
2008
  return { formatName: t2, formatOptions: n2 };
1998
2009
  };
1999
- var bi = (e6) => {
2010
+ var xi = (e6) => {
2000
2011
  let t2 = {};
2001
2012
  return (n2, r2, i2) => {
2002
2013
  let a2 = i2;
@@ -2005,14 +2016,14 @@ var bi = (e6) => {
2005
2016
  return s2 || (s2 = e6(U(r2), i2), t2[o2] = s2), s2(n2);
2006
2017
  };
2007
2018
  };
2008
- var xi = (e6) => (t2, n2, r2) => e6(U(n2), r2)(t2);
2009
- var Si = class {
2019
+ var Si = (e6) => (t2, n2, r2) => e6(U(n2), r2)(t2);
2020
+ var Ci = class {
2010
2021
  constructor(e6 = {}) {
2011
2022
  this.logger = W.create(`formatter`), this.options = e6, this.init(e6);
2012
2023
  }
2013
2024
  init(e6, t2 = { interpolation: {} }) {
2014
2025
  this.formatSeparator = t2.interpolation.formatSeparator || `,`;
2015
- let n2 = t2.cacheInBuiltFormats ? bi : xi;
2026
+ let n2 = t2.cacheInBuiltFormats ? xi : Si;
2016
2027
  this.formats = { number: n2((e7, t3) => {
2017
2028
  let n3 = new Intl.NumberFormat(e7, { ...t3 });
2018
2029
  return (e8) => n3.format(e8);
@@ -2034,7 +2045,7 @@ var Si = class {
2034
2045
  this.formats[e6.toLowerCase().trim()] = t2;
2035
2046
  }
2036
2047
  addCached(e6, t2) {
2037
- this.formats[e6.toLowerCase().trim()] = bi(t2);
2048
+ this.formats[e6.toLowerCase().trim()] = xi(t2);
2038
2049
  }
2039
2050
  format(e6, t2, n2, r2 = {}) {
2040
2051
  if (!t2 || e6 == null) return e6;
@@ -2045,7 +2056,7 @@ var Si = class {
2045
2056
  a2.push(t3);
2046
2057
  }
2047
2058
  return a2.reduce((e7, t3) => {
2048
- let { formatName: i3, formatOptions: a3 } = yi(t3);
2059
+ let { formatName: i3, formatOptions: a3 } = bi(t3);
2049
2060
  if (this.formats[i3]) {
2050
2061
  let t4 = e7;
2051
2062
  try {
@@ -2060,10 +2071,10 @@ var Si = class {
2060
2071
  }, e6);
2061
2072
  }
2062
2073
  };
2063
- var Ci = (e6, t2) => {
2074
+ var wi = (e6, t2) => {
2064
2075
  e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
2065
2076
  };
2066
- var wi = class extends G {
2077
+ var Ti = class extends G {
2067
2078
  constructor(e6, t2, n2, r2 = {}) {
2068
2079
  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);
2069
2080
  }
@@ -2082,7 +2093,7 @@ var wi = class extends G {
2082
2093
  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);
2083
2094
  let o2 = {};
2084
2095
  this.queue.forEach((n3) => {
2085
- Jr(n3.loaded, [i2], a2), Ci(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
2096
+ Yr(n3.loaded, [i2], a2), wi(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
2086
2097
  o2[e7] || (o2[e7] = {});
2087
2098
  let t3 = n3.loaded[e7];
2088
2099
  t3.length && t3.forEach((t4) => {
@@ -2154,7 +2165,7 @@ var wi = class extends G {
2154
2165
  }
2155
2166
  }
2156
2167
  };
2157
- var Ti = () => ({ 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) => {
2168
+ var Ei = () => ({ 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) => {
2158
2169
  let t2 = {};
2159
2170
  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`) {
2160
2171
  let n2 = e6[3] || e6[2];
@@ -2164,17 +2175,17 @@ var Ti = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
2164
2175
  }
2165
2176
  return t2;
2166
2177
  }, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
2167
- var Ei = (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);
2178
+ var Di = (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);
2168
2179
  var q = () => {
2169
2180
  };
2170
- var Di = (e6) => {
2181
+ var Oi = (e6) => {
2171
2182
  Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
2172
2183
  typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
2173
2184
  });
2174
2185
  };
2175
2186
  var J = class e4 extends G {
2176
2187
  constructor(e6 = {}, t2) {
2177
- if (super(), this.options = Ei(e6), this.services = {}, this.logger = W, this.modules = { external: [] }, Di(this), t2 && !this.isInitialized && !e6.isClone) {
2188
+ if (super(), this.options = Di(e6), this.services = {}, this.logger = W, this.modules = { external: [] }, Oi(this), t2 && !this.isInitialized && !e6.isClone) {
2178
2189
  if (!this.options.initAsync) return this.init(e6, t2), this;
2179
2190
  setTimeout(() => {
2180
2191
  this.init(e6, t2);
@@ -2183,19 +2194,19 @@ var J = class e4 extends G {
2183
2194
  }
2184
2195
  init(e6 = {}, t2) {
2185
2196
  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]));
2186
- let n2 = Ti();
2187
- this.options = { ...n2, ...this.options, ...Ei(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);
2197
+ let n2 = Ei();
2198
+ this.options = { ...n2, ...this.options, ...Di(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);
2188
2199
  let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
2189
2200
  if (!this.options.isClone) {
2190
2201
  this.modules.logger ? W.init(r2(this.modules.logger), this.options) : W.init(null, this.options);
2191
2202
  let e7;
2192
- e7 = this.modules.formatter ? this.modules.formatter : Si;
2193
- let t3 = new fi(this.options);
2194
- this.store = new oi(this.options.resources, this.options);
2203
+ e7 = this.modules.formatter ? this.modules.formatter : Ci;
2204
+ let t3 = new pi(this.options);
2205
+ this.store = new si(this.options.resources, this.options);
2195
2206
  let n3 = this.services;
2196
- n3.logger = W, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new hi(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 vi(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new wi(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
2207
+ n3.logger = W, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new gi(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 yi(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new Ti(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
2197
2208
  this.emit(e8, ...t4);
2198
- }), 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 di(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
2209
+ }), 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 fi(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
2199
2210
  this.emit(e8, ...t4);
2200
2211
  }), this.modules.external.forEach((e8) => {
2201
2212
  e8.init && e8.init(this);
@@ -2242,7 +2253,7 @@ var J = class e4 extends G {
2242
2253
  use(e6) {
2243
2254
  if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
2244
2255
  if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
2245
- 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` && si.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
2256
+ 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` && ci.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
2246
2257
  }
2247
2258
  setResolvedLanguage(e6) {
2248
2259
  if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
@@ -2336,7 +2347,7 @@ var J = class e4 extends G {
2336
2347
  }
2337
2348
  } catch {
2338
2349
  }
2339
- 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 fi(Ti());
2350
+ 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 pi(Ei());
2340
2351
  return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
2341
2352
  }
2342
2353
  static createInstance(t2 = {}, n2) {
@@ -2349,11 +2360,11 @@ var J = class e4 extends G {
2349
2360
  let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
2350
2361
  if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
2351
2362
  a2[e6] = this[e6];
2352
- }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new oi(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) {
2353
- let e6 = { ...Ti().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
2354
- a2.services.interpolator = new vi(n3);
2363
+ }), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new si(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) {
2364
+ let e6 = { ...Ei().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
2365
+ a2.services.interpolator = new yi(n3);
2355
2366
  }
2356
- return a2.translator = new di(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
2367
+ return a2.translator = new fi(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
2357
2368
  a2.emit(e6, ...t3);
2358
2369
  }), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
2359
2370
  }
@@ -2362,7 +2373,7 @@ var J = class e4 extends G {
2362
2373
  }
2363
2374
  }.createInstance();
2364
2375
  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;
2365
- var Oi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
2376
+ var ki = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
2366
2377
  let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = J.createInstance(i2 ? s2 : void 0);
2367
2378
  return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
2368
2379
  try {
@@ -2372,8 +2383,8 @@ var Oi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
2372
2383
  }
2373
2384
  } }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
2374
2385
  };
2375
- var ki = [`__proto__`, `constructor`, `prototype`];
2376
- function Ai(e6, t2, n2) {
2386
+ var Ai = [`__proto__`, `constructor`, `prototype`];
2387
+ function ji(e6, t2, n2) {
2377
2388
  function r2(e7) {
2378
2389
  return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
2379
2390
  }
@@ -2383,64 +2394,64 @@ function Ai(e6, t2, n2) {
2383
2394
  for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
2384
2395
  if (i2()) return {};
2385
2396
  var o2 = r2(a2.shift());
2386
- if (ki.indexOf(o2) > -1) return {};
2397
+ if (Ai.indexOf(o2) > -1) return {};
2387
2398
  !e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
2388
2399
  }
2389
2400
  if (i2()) return {};
2390
2401
  var s2 = r2(a2.shift());
2391
- return ki.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
2402
+ return Ai.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
2392
2403
  }
2393
- function ji(e6, t2, n2) {
2394
- var r2 = Ai(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
2404
+ function Mi(e6, t2, n2) {
2405
+ var r2 = ji(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
2395
2406
  i2 !== void 0 && (i2[a2] = n2);
2396
2407
  }
2397
- function Mi(e6, t2) {
2398
- var n2 = Ai(e6, t2), r2 = n2.obj, i2 = n2.k;
2408
+ function Ni(e6, t2) {
2409
+ var n2 = ji(e6, t2), r2 = n2.obj, i2 = n2.k;
2399
2410
  if (r2) return r2[i2];
2400
2411
  }
2401
- var Ni = [];
2402
- var Pi = Ni.forEach;
2403
- var Fi = Ni.slice;
2404
- function Ii(e6) {
2405
- return Pi.call(Fi.call(arguments, 1), function(t2) {
2412
+ var Pi = [];
2413
+ var Fi = Pi.forEach;
2414
+ var Ii = Pi.slice;
2415
+ function Li(e6) {
2416
+ return Fi.call(Ii.call(arguments, 1), function(t2) {
2406
2417
  if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
2407
2418
  var i2 = r2[n2];
2408
- ki.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
2419
+ Ai.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
2409
2420
  }
2410
2421
  }), e6;
2411
2422
  }
2412
- function Li(e6, t2) {
2413
- let n2 = t2 && t2.cache ? t2.cache : qi, r2 = t2 && t2.serializer ? t2.serializer : Gi;
2414
- return (t2 && t2.strategy ? t2.strategy : Hi)(e6, { cache: n2, serializer: r2 });
2423
+ function Ri(e6, t2) {
2424
+ let n2 = t2 && t2.cache ? t2.cache : Ji, r2 = t2 && t2.serializer ? t2.serializer : Ki;
2425
+ return (t2 && t2.strategy ? t2.strategy : Ui)(e6, { cache: n2, serializer: r2 });
2415
2426
  }
2416
- function Ri(e6) {
2427
+ function zi(e6) {
2417
2428
  return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
2418
2429
  }
2419
- function zi(e6, t2, n2, r2) {
2420
- let i2 = Ri(r2) ? r2 : n2(r2), a2 = t2.get(i2);
2430
+ function Bi(e6, t2, n2, r2) {
2431
+ let i2 = zi(r2) ? r2 : n2(r2), a2 = t2.get(i2);
2421
2432
  return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
2422
2433
  }
2423
- function Bi(e6, t2, n2) {
2434
+ function Vi(e6, t2, n2) {
2424
2435
  let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
2425
2436
  return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
2426
2437
  }
2427
- function Vi(e6, t2, n2, r2, i2) {
2438
+ function Hi(e6, t2, n2, r2, i2) {
2428
2439
  return n2.bind(t2, e6, r2, i2);
2429
2440
  }
2430
- function Hi(e6, t2) {
2431
- let n2 = e6.length === 1 ? zi : Bi;
2432
- return Vi(e6, this, n2, t2.cache.create(), t2.serializer);
2433
- }
2434
2441
  function Ui(e6, t2) {
2435
- return Vi(e6, this, Bi, t2.cache.create(), t2.serializer);
2442
+ let n2 = e6.length === 1 ? Bi : Vi;
2443
+ return Hi(e6, this, n2, t2.cache.create(), t2.serializer);
2436
2444
  }
2437
2445
  function Wi(e6, t2) {
2438
- return Vi(e6, this, zi, t2.cache.create(), t2.serializer);
2446
+ return Hi(e6, this, Vi, t2.cache.create(), t2.serializer);
2439
2447
  }
2440
- var Gi = function() {
2448
+ function Gi(e6, t2) {
2449
+ return Hi(e6, this, Bi, t2.cache.create(), t2.serializer);
2450
+ }
2451
+ var Ki = function() {
2441
2452
  return JSON.stringify(arguments);
2442
2453
  };
2443
- var Ki = class {
2454
+ var qi = class {
2444
2455
  constructor() {
2445
2456
  this.cache = /* @__PURE__ */ Object.create(null);
2446
2457
  }
@@ -2451,14 +2462,14 @@ var Ki = class {
2451
2462
  this.cache[e6] = t2;
2452
2463
  }
2453
2464
  };
2454
- var qi = { create: function() {
2455
- return new Ki();
2465
+ var Ji = { create: function() {
2466
+ return new qi();
2456
2467
  } };
2457
- var Ji = { variadic: Ui, monadic: Wi };
2458
- var Yi = /(?:[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;
2459
- function Xi(e6) {
2468
+ var Yi = { variadic: Wi, monadic: Gi };
2469
+ var Xi = /(?:[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;
2470
+ function Zi(e6) {
2460
2471
  let t2 = {};
2461
- return e6.replace(Yi, (e7) => {
2472
+ return e6.replace(Xi, (e7) => {
2462
2473
  let n2 = e7.length;
2463
2474
  switch (e7[0]) {
2464
2475
  case `G`:
@@ -2545,10 +2556,10 @@ function Xi(e6) {
2545
2556
  return ``;
2546
2557
  }), t2;
2547
2558
  }
2548
- var Zi = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
2549
- function Qi(e6) {
2559
+ var Qi = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
2560
+ function $i(e6) {
2550
2561
  if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
2551
- let t2 = e6.split(Zi).filter((e7) => e7.length > 0), n2 = [];
2562
+ let t2 = e6.split(Qi).filter((e7) => e7.length > 0), n2 = [];
2552
2563
  for (let e7 of t2) {
2553
2564
  let t3 = e7.split(`/`);
2554
2565
  if (t3.length === 0) throw Error(`Invalid number skeleton`);
@@ -2558,20 +2569,20 @@ function Qi(e6) {
2558
2569
  }
2559
2570
  return n2;
2560
2571
  }
2561
- function $i(e6) {
2572
+ function ea(e6) {
2562
2573
  return e6.replace(/^(.*?)-/, ``);
2563
2574
  }
2564
- var ea = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
2565
- var ta = /^(@+)?(\+|#+)?[rs]?$/g;
2566
- var na = /(\*)(0+)|(#+)(0+)|(0+)/g;
2567
- var ra = /^(0+)$/;
2568
- function ia(e6) {
2575
+ var ta = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
2576
+ var na = /^(@+)?(\+|#+)?[rs]?$/g;
2577
+ var ra = /(\*)(0+)|(#+)(0+)|(0+)/g;
2578
+ var ia = /^(0+)$/;
2579
+ function aa(e6) {
2569
2580
  let t2 = {};
2570
- return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(ta, function(e7, n2, r2) {
2581
+ return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(na, function(e7, n2, r2) {
2571
2582
  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), ``;
2572
2583
  }), t2;
2573
2584
  }
2574
- function aa(e6) {
2585
+ function oa(e6) {
2575
2586
  switch (e6) {
2576
2587
  case `sign-auto`:
2577
2588
  return { signDisplay: `auto` };
@@ -2595,19 +2606,19 @@ function aa(e6) {
2595
2606
  return { signDisplay: `never` };
2596
2607
  }
2597
2608
  }
2598
- function oa(e6) {
2609
+ function sa(e6) {
2599
2610
  let t2;
2600
2611
  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) {
2601
2612
  let n2 = e6.slice(0, 2);
2602
- if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !ra.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
2613
+ if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !ia.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
2603
2614
  t2.minimumIntegerDigits = e6.length;
2604
2615
  }
2605
2616
  return t2;
2606
2617
  }
2607
- function sa(e6) {
2608
- return aa(e6) || {};
2609
- }
2610
2618
  function ca(e6) {
2619
+ return oa(e6) || {};
2620
+ }
2621
+ function la(e6) {
2611
2622
  let t2 = {};
2612
2623
  for (let n2 of e6) {
2613
2624
  switch (n2.stem) {
@@ -2631,7 +2642,7 @@ function ca(e6) {
2631
2642
  continue;
2632
2643
  case `measure-unit`:
2633
2644
  case `unit`:
2634
- t2.style = `unit`, t2.unit = $i(n2.options[0]);
2645
+ t2.style = `unit`, t2.unit = ea(n2.options[0]);
2635
2646
  continue;
2636
2647
  case `compact-short`:
2637
2648
  case `K`:
@@ -2642,10 +2653,10 @@ function ca(e6) {
2642
2653
  t2.notation = `compact`, t2.compactDisplay = `long`;
2643
2654
  continue;
2644
2655
  case `scientific`:
2645
- t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...sa(t3) }), {}) };
2656
+ t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...ca(t3) }), {}) };
2646
2657
  continue;
2647
2658
  case `engineering`:
2648
- t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...sa(t3) }), {}) };
2659
+ t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...ca(t3) }), {}) };
2649
2660
  continue;
2650
2661
  case `notation-simple`:
2651
2662
  t2.notation = `standard`;
@@ -2688,7 +2699,7 @@ function ca(e6) {
2688
2699
  continue;
2689
2700
  case `integer-width`:
2690
2701
  if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
2691
- n2.options[0].replace(na, function(e8, n3, r3, i2, a2, o2) {
2702
+ n2.options[0].replace(ra, function(e8, n3, r3, i2, a2, o2) {
2692
2703
  if (n3) t2.minimumIntegerDigits = r3.length;
2693
2704
  else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
2694
2705
  else if (o2) throw Error(`We currently do not support exact integer digits`);
@@ -2696,83 +2707,83 @@ function ca(e6) {
2696
2707
  });
2697
2708
  continue;
2698
2709
  }
2699
- if (ra.test(n2.stem)) {
2710
+ if (ia.test(n2.stem)) {
2700
2711
  t2.minimumIntegerDigits = n2.stem.length;
2701
2712
  continue;
2702
2713
  }
2703
- if (ea.test(n2.stem)) {
2714
+ if (ta.test(n2.stem)) {
2704
2715
  if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
2705
- n2.stem.replace(ea, function(e9, n3, r3, i2, a2, o2) {
2716
+ n2.stem.replace(ta, function(e9, n3, r3, i2, a2, o2) {
2706
2717
  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), ``;
2707
2718
  });
2708
2719
  let e8 = n2.options[0];
2709
- e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...ia(e8) });
2720
+ e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...aa(e8) });
2710
2721
  continue;
2711
2722
  }
2712
- if (ta.test(n2.stem)) {
2713
- t2 = { ...t2, ...ia(n2.stem) };
2723
+ if (na.test(n2.stem)) {
2724
+ t2 = { ...t2, ...aa(n2.stem) };
2714
2725
  continue;
2715
2726
  }
2716
- let e7 = aa(n2.stem);
2727
+ let e7 = oa(n2.stem);
2717
2728
  e7 && (t2 = { ...t2, ...e7 });
2718
- let r2 = oa(n2.stem);
2729
+ let r2 = sa(n2.stem);
2719
2730
  r2 && (t2 = { ...t2, ...r2 });
2720
2731
  }
2721
2732
  return t2;
2722
2733
  }
2723
- var la = function(e6) {
2734
+ var ua = function(e6) {
2724
2735
  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;
2725
2736
  }({});
2726
- function ua(e6) {
2737
+ function da(e6) {
2727
2738
  return e6.type === 0;
2728
2739
  }
2729
- function da(e6) {
2740
+ function fa(e6) {
2730
2741
  return e6.type === 1;
2731
2742
  }
2732
- function fa(e6) {
2743
+ function pa(e6) {
2733
2744
  return e6.type === 2;
2734
2745
  }
2735
- function pa(e6) {
2746
+ function ma(e6) {
2736
2747
  return e6.type === 3;
2737
2748
  }
2738
- function ma(e6) {
2749
+ function ha(e6) {
2739
2750
  return e6.type === 4;
2740
2751
  }
2741
- function ha(e6) {
2752
+ function ga(e6) {
2742
2753
  return e6.type === 5;
2743
2754
  }
2744
- function ga(e6) {
2755
+ function _a(e6) {
2745
2756
  return e6.type === 6;
2746
2757
  }
2747
- function _a(e6) {
2758
+ function va(e6) {
2748
2759
  return e6.type === 7;
2749
2760
  }
2750
- function va(e6) {
2761
+ function ya(e6) {
2751
2762
  return e6.type === 8;
2752
2763
  }
2753
- function ya(e6) {
2764
+ function ba(e6) {
2754
2765
  return !!(e6 && typeof e6 == `object` && e6.type === 0);
2755
2766
  }
2756
- function ba(e6) {
2767
+ function xa(e6) {
2757
2768
  return !!(e6 && typeof e6 == `object` && e6.type === 1);
2758
2769
  }
2759
- var xa = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
2770
+ var Sa = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
2760
2771
  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`] };
2761
- function Sa(e6, t2) {
2772
+ function Ca(e6, t2) {
2762
2773
  let n2 = ``;
2763
2774
  for (let r2 = 0; r2 < e6.length; r2++) {
2764
2775
  let i2 = e6.charAt(r2);
2765
2776
  if (i2 === `j`) {
2766
2777
  let a2 = 0;
2767
2778
  for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
2768
- let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = Ca(t2);
2779
+ let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = wa(t2);
2769
2780
  for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
2770
2781
  for (; o2-- > 0; ) n2 = c2 + n2;
2771
2782
  } else n2 += i2 === `J` ? `H` : i2;
2772
2783
  }
2773
2784
  return n2;
2774
2785
  }
2775
- function Ca(e6) {
2786
+ function wa(e6) {
2776
2787
  let t2 = e6.hourCycle;
2777
2788
  if (t2 === void 0) {
2778
2789
  let n3 = e6;
@@ -2793,34 +2804,34 @@ function Ca(e6) {
2793
2804
  let n2 = e6.language, r2;
2794
2805
  return n2 !== `root` && (r2 = e6.maximize().region), (Y[`${n2}-${r2}`] || Y[r2 || ``] || Y[n2 || ``] || Y[`${n2}-001`] || Y[`001`])[0].charAt(0);
2795
2806
  }
2796
- var wa = RegExp(`^${xa.source}*`);
2797
- var Ta = RegExp(`${xa.source}*$`);
2807
+ var Ta = RegExp(`^${Sa.source}*`);
2808
+ var Ea = RegExp(`${Sa.source}*$`);
2798
2809
  function X(e6, t2) {
2799
2810
  return { start: e6, end: t2 };
2800
2811
  }
2801
- var Ea = !!Object.fromEntries;
2802
- var Da = !!String.prototype.trimStart;
2803
- var Oa = !!String.prototype.trimEnd;
2804
- var ka = Ea ? Object.fromEntries : function(e6) {
2812
+ var Da = !!Object.fromEntries;
2813
+ var Oa = !!String.prototype.trimStart;
2814
+ var ka = !!String.prototype.trimEnd;
2815
+ var Aa = Da ? Object.fromEntries : function(e6) {
2805
2816
  let t2 = {};
2806
2817
  for (let [n2, r2] of e6) t2[n2] = r2;
2807
2818
  return t2;
2808
2819
  };
2809
- var Aa = Da ? function(e6) {
2820
+ var ja = Oa ? function(e6) {
2810
2821
  return e6.trimStart();
2811
2822
  } : function(e6) {
2812
- return e6.replace(wa, ``);
2823
+ return e6.replace(Ta, ``);
2813
2824
  };
2814
- var ja = Oa ? function(e6) {
2825
+ var Ma = ka ? function(e6) {
2815
2826
  return e6.trimEnd();
2816
2827
  } : function(e6) {
2817
- return e6.replace(Ta, ``);
2828
+ return e6.replace(Ea, ``);
2818
2829
  };
2819
- var Ma = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
2820
- function Na(e6, t2) {
2821
- return Ma.lastIndex = t2, Ma.exec(e6)[1] ?? ``;
2830
+ var Na = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
2831
+ function Pa(e6, t2) {
2832
+ return Na.lastIndex = t2, Na.exec(e6)[1] ?? ``;
2822
2833
  }
2823
- function Pa(e6) {
2834
+ function Fa(e6) {
2824
2835
  if (e6.length === 0) return null;
2825
2836
  let t2 = 1, n2 = 1;
2826
2837
  for (let r2 = 0; r2 < e6.length; ) {
@@ -2841,7 +2852,7 @@ function Pa(e6) {
2841
2852
  }
2842
2853
  return { offset: e6.length, line: t2, column: n2 };
2843
2854
  }
2844
- var Fa = class {
2855
+ var Ia = class {
2845
2856
  constructor(e6, t2 = {}) {
2846
2857
  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;
2847
2858
  }
@@ -2850,7 +2861,7 @@ var Fa = class {
2850
2861
  if (this.message.length > 0) {
2851
2862
  let e6 = this.message.charCodeAt(0);
2852
2863
  if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
2853
- let e7 = Pa(this.message);
2864
+ let e7 = Fa(this.message);
2854
2865
  if (e7) {
2855
2866
  let t2 = this.clonePosition();
2856
2867
  return this.position = e7, { val: [{ type: 0, value: this.message, location: X(t2, this.clonePosition()) }], err: null };
@@ -2874,7 +2885,7 @@ var Fa = class {
2874
2885
  } else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
2875
2886
  if (n2) break;
2876
2887
  return this.error(26, X(this.clonePosition(), this.clonePosition()));
2877
- } else if (i2 === 60 && !this.ignoreTag && Ia(this.peek() || 0)) {
2888
+ } else if (i2 === 60 && !this.ignoreTag && La(this.peek() || 0)) {
2878
2889
  let n3 = this.parseTag(e6, t2);
2879
2890
  if (n3.err) return n3;
2880
2891
  r2.push(n3.val);
@@ -2896,7 +2907,7 @@ var Fa = class {
2896
2907
  if (i2.err) return i2;
2897
2908
  let a2 = i2.val, o2 = this.clonePosition();
2898
2909
  if (this.bumpIf(`</`)) {
2899
- if (this.isEOF() || !Ia(this.char())) return this.error(23, X(o2, this.clonePosition()));
2910
+ if (this.isEOF() || !La(this.char())) return this.error(23, X(o2, this.clonePosition()));
2900
2911
  let e7 = this.clonePosition();
2901
2912
  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()));
2902
2913
  }
@@ -2906,7 +2917,7 @@ var Fa = class {
2906
2917
  }
2907
2918
  parseTagName() {
2908
2919
  let e6 = this.offset();
2909
- for (this.bump(); !this.isEOF() && Ra(this.char()); ) this.bump();
2920
+ for (this.bump(); !this.isEOF() && za(this.char()); ) this.bump();
2910
2921
  return this.message.slice(e6, this.offset());
2911
2922
  }
2912
2923
  parseLiteral(e6, t2) {
@@ -2930,7 +2941,7 @@ var Fa = class {
2930
2941
  return { val: { type: 0, value: r2, location: i2 }, err: null };
2931
2942
  }
2932
2943
  tryParseLeftAngleBracket() {
2933
- return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !La(this.peek() || 0)) ? (this.bump(), `<`) : null;
2944
+ return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !Ra(this.peek() || 0)) ? (this.bump(), `<`) : null;
2934
2945
  }
2935
2946
  tryParseQuote(e6) {
2936
2947
  if (this.isEOF() || this.char() !== 39) return null;
@@ -2985,7 +2996,7 @@ var Fa = class {
2985
2996
  }
2986
2997
  }
2987
2998
  parseIdentifierIfPossible() {
2988
- let e6 = this.clonePosition(), t2 = this.offset(), n2 = Na(this.message, t2), r2 = t2 + n2.length;
2999
+ let e6 = this.clonePosition(), t2 = this.offset(), n2 = Pa(this.message, t2), r2 = t2 + n2.length;
2989
3000
  return this.bumpTo(r2), { value: n2, location: X(e6, this.clonePosition()) };
2990
3001
  }
2991
3002
  parseArgumentOptions(e6, t2, n2, r2) {
@@ -3002,7 +3013,7 @@ var Fa = class {
3002
3013
  this.bumpSpace();
3003
3014
  let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
3004
3015
  if (n3.err) return n3;
3005
- let r3 = ja(n3.val);
3016
+ let r3 = Ma(n3.val);
3006
3017
  if (r3.length === 0) return this.error(6, X(this.clonePosition(), this.clonePosition()));
3007
3018
  e7 = { style: r3, styleLocation: X(t4, this.clonePosition()) };
3008
3019
  }
@@ -3010,7 +3021,7 @@ var Fa = class {
3010
3021
  if (t3.err) return t3;
3011
3022
  let i3 = X(r2, this.clonePosition());
3012
3023
  if (e7 && e7.style.startsWith(`::`)) {
3013
- let t4 = Aa(e7.style.slice(2));
3024
+ let t4 = ja(e7.style.slice(2));
3014
3025
  if (a2 === `number`) {
3015
3026
  let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
3016
3027
  return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
@@ -3018,8 +3029,8 @@ var Fa = class {
3018
3029
  {
3019
3030
  if (t4.length === 0) return this.error(10, i3);
3020
3031
  let r3 = t4;
3021
- this.locale && (r3 = Sa(t4, this.locale));
3022
- let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Xi(r3) : {} };
3032
+ this.locale && (r3 = Ca(t4, this.locale));
3033
+ let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Zi(r3) : {} };
3023
3034
  return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
3024
3035
  }
3025
3036
  }
@@ -3044,7 +3055,7 @@ var Fa = class {
3044
3055
  let l2 = this.tryParseArgumentClose(r2);
3045
3056
  if (l2.err) return l2;
3046
3057
  let u2 = X(r2, this.clonePosition());
3047
- return a2 === `select` ? { val: { type: 5, value: n2, options: ka(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: ka(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
3058
+ return a2 === `select` ? { val: { type: 5, value: n2, options: Aa(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: Aa(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
3048
3059
  }
3049
3060
  default:
3050
3061
  return this.error(5, X(i2, o2));
@@ -3078,11 +3089,11 @@ var Fa = class {
3078
3089
  parseNumberSkeletonFromString(e6, t2) {
3079
3090
  let n2 = [];
3080
3091
  try {
3081
- n2 = Qi(e6);
3092
+ n2 = $i(e6);
3082
3093
  } catch {
3083
3094
  return this.error(7, t2);
3084
3095
  }
3085
- return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? ca(n2) : {} }, err: null };
3096
+ return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? la(n2) : {} }, err: null };
3086
3097
  }
3087
3098
  tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
3088
3099
  let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
@@ -3164,7 +3175,7 @@ var Fa = class {
3164
3175
  }
3165
3176
  }
3166
3177
  bumpSpace() {
3167
- for (; !this.isEOF() && za(this.char()); ) this.bump();
3178
+ for (; !this.isEOF() && Ba(this.char()); ) this.bump();
3168
3179
  }
3169
3180
  peek() {
3170
3181
  if (this.isEOF()) return null;
@@ -3172,34 +3183,34 @@ var Fa = class {
3172
3183
  return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
3173
3184
  }
3174
3185
  };
3175
- function Ia(e6) {
3176
- return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
3177
- }
3178
3186
  function La(e6) {
3179
- return Ia(e6) || e6 === 47;
3187
+ return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
3180
3188
  }
3181
3189
  function Ra(e6) {
3182
- 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;
3190
+ return La(e6) || e6 === 47;
3183
3191
  }
3184
3192
  function za(e6) {
3185
- return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
3193
+ 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;
3186
3194
  }
3187
3195
  function Ba(e6) {
3196
+ return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
3197
+ }
3198
+ function Va(e6) {
3188
3199
  e6.forEach((e7) => {
3189
- if (delete e7.location, ha(e7) || ga(e7)) for (let t2 in e7.options) delete e7.options[t2].location, Ba(e7.options[t2].value);
3190
- else fa(e7) && ya(e7.style) || (pa(e7) || ma(e7)) && ba(e7.style) ? delete e7.style.location : va(e7) && Ba(e7.children);
3200
+ if (delete e7.location, ga(e7) || _a(e7)) for (let t2 in e7.options) delete e7.options[t2].location, Va(e7.options[t2].value);
3201
+ else pa(e7) && ba(e7.style) || (ma(e7) || ha(e7)) && xa(e7.style) ? delete e7.style.location : ya(e7) && Va(e7.children);
3191
3202
  });
3192
3203
  }
3193
- function Va(e6, t2 = {}) {
3204
+ function Ha(e6, t2 = {}) {
3194
3205
  t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
3195
- let n2 = new Fa(e6, t2).parse();
3206
+ let n2 = new Ia(e6, t2).parse();
3196
3207
  if (n2.err) {
3197
- let e7 = SyntaxError(la[n2.err.kind]);
3208
+ let e7 = SyntaxError(ua[n2.err.kind]);
3198
3209
  throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
3199
3210
  }
3200
- return t2?.captureLocation || Ba(n2.val), n2.val;
3211
+ return t2?.captureLocation || Va(n2.val), n2.val;
3201
3212
  }
3202
- var Ha = class extends Error {
3213
+ var Ua = class extends Error {
3203
3214
  constructor(e6, t2, n2) {
3204
3215
  super(e6), this.code = t2, this.originalMessage = n2;
3205
3216
  }
@@ -3207,54 +3218,54 @@ var Ha = class extends Error {
3207
3218
  return `[formatjs Error: ${this.code}] ${this.message}`;
3208
3219
  }
3209
3220
  };
3210
- var Ua = class extends Ha {
3221
+ var Wa = class extends Ua {
3211
3222
  constructor(e6, t2, n2, r2) {
3212
3223
  super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
3213
3224
  }
3214
3225
  };
3215
- var Wa = class extends Ha {
3226
+ var Ga = class extends Ua {
3216
3227
  constructor(e6, t2, n2) {
3217
3228
  super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
3218
3229
  }
3219
3230
  };
3220
- var Ga = class extends Ha {
3231
+ var Ka = class extends Ua {
3221
3232
  constructor(e6, t2) {
3222
3233
  super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
3223
3234
  }
3224
3235
  };
3225
- function Ka(e6) {
3236
+ function qa(e6) {
3226
3237
  return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
3227
3238
  let n2 = e7[e7.length - 1];
3228
3239
  return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
3229
3240
  }, []);
3230
3241
  }
3231
- function qa(e6) {
3242
+ function Ja(e6) {
3232
3243
  return typeof e6 == `function`;
3233
3244
  }
3234
- function Ja(e6, t2, n2, r2, i2, a2, o2) {
3235
- if (e6.length === 1 && ua(e6[0])) return [{ type: 0, value: e6[0].value }];
3245
+ function Ya(e6, t2, n2, r2, i2, a2, o2) {
3246
+ if (e6.length === 1 && da(e6[0])) return [{ type: 0, value: e6[0].value }];
3236
3247
  let s2 = [];
3237
3248
  for (let c2 of e6) {
3238
- if (ua(c2)) {
3249
+ if (da(c2)) {
3239
3250
  s2.push({ type: 0, value: c2.value });
3240
3251
  continue;
3241
3252
  }
3242
- if (_a(c2)) {
3253
+ if (va(c2)) {
3243
3254
  typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
3244
3255
  continue;
3245
3256
  }
3246
3257
  let { value: e7 } = c2;
3247
- if (!(i2 && e7 in i2)) throw new Ga(e7, o2);
3258
+ if (!(i2 && e7 in i2)) throw new Ka(e7, o2);
3248
3259
  let l2 = i2[e7];
3249
- if (da(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 });
3250
- else if (pa(c2)) {
3251
- let e8 = typeof c2.style == `string` ? r2.date[c2.style] : ba(c2.style) ? c2.style.parsedOptions : void 0;
3260
+ if (fa(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 });
3261
+ else if (ma(c2)) {
3262
+ let e8 = typeof c2.style == `string` ? r2.date[c2.style] : xa(c2.style) ? c2.style.parsedOptions : void 0;
3252
3263
  s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
3253
- } else if (ma(c2)) {
3254
- let e8 = typeof c2.style == `string` ? r2.time[c2.style] : ba(c2.style) ? c2.style.parsedOptions : r2.time.medium;
3264
+ } else if (ha(c2)) {
3265
+ let e8 = typeof c2.style == `string` ? r2.time[c2.style] : xa(c2.style) ? c2.style.parsedOptions : r2.time.medium;
3255
3266
  s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
3256
- } else if (fa(c2)) {
3257
- let e8 = typeof c2.style == `string` ? r2.number[c2.style] : ya(c2.style) ? c2.style.parsedOptions : void 0;
3267
+ } else if (pa(c2)) {
3268
+ let e8 = typeof c2.style == `string` ? r2.number[c2.style] : ba(c2.style) ? c2.style.parsedOptions : void 0;
3258
3269
  if (e8 && e8.scale) {
3259
3270
  let t3 = e8.scale || 1;
3260
3271
  if (typeof l2 == `bigint`) {
@@ -3264,40 +3275,40 @@ function Ja(e6, t2, n2, r2, i2, a2, o2) {
3264
3275
  }
3265
3276
  s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
3266
3277
  } else {
3267
- if (va(c2)) {
3278
+ if (ya(c2)) {
3268
3279
  let { children: e8, value: l3 } = c2, u2 = i2[l3];
3269
- if (!qa(u2)) throw new Wa(l3, `function`, o2);
3270
- let d2 = u2(Ja(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
3280
+ if (!Ja(u2)) throw new Ga(l3, `function`, o2);
3281
+ let d2 = u2(Ya(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
3271
3282
  Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
3272
3283
  }
3273
- if (ha(c2)) {
3284
+ if (ga(c2)) {
3274
3285
  let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
3275
- if (!a3) throw new Ua(c2.value, l2, Object.keys(c2.options), o2);
3276
- s2.push(...Ja(a3.value, t2, n2, r2, i2));
3277
- } else if (ga(c2)) {
3286
+ if (!a3) throw new Wa(c2.value, l2, Object.keys(c2.options), o2);
3287
+ s2.push(...Ya(a3.value, t2, n2, r2, i2));
3288
+ } else if (_a(c2)) {
3278
3289
  let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
3279
3290
  if (!a3) {
3280
- if (!Intl.PluralRules) throw new Ha(`Intl.PluralRules is not available in this environment.
3291
+ if (!Intl.PluralRules) throw new Ua(`Intl.PluralRules is not available in this environment.
3281
3292
  Try polyfilling it using "@formatjs/intl-pluralrules"
3282
3293
  `, `MISSING_INTL_API`, o2);
3283
3294
  let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
3284
3295
  a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
3285
3296
  }
3286
- if (!a3) throw new Ua(c2.value, l2, Object.keys(c2.options), o2);
3297
+ if (!a3) throw new Wa(c2.value, l2, Object.keys(c2.options), o2);
3287
3298
  let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
3288
- s2.push(...Ja(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
3299
+ s2.push(...Ya(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
3289
3300
  }
3290
3301
  }
3291
3302
  }
3292
- return Ka(s2);
3303
+ return qa(s2);
3293
3304
  }
3294
- function Ya(e6, t2) {
3305
+ function Xa(e6, t2) {
3295
3306
  return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
3296
3307
  }
3297
- function Xa(e6, t2) {
3298
- return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Ya(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
3308
+ function Za(e6, t2) {
3309
+ return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Xa(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
3299
3310
  }
3300
- function Za(e6) {
3311
+ function Qa(e6) {
3301
3312
  return { create() {
3302
3313
  return { get(t2) {
3303
3314
  return e6[t2];
@@ -3306,23 +3317,23 @@ function Za(e6) {
3306
3317
  } };
3307
3318
  } };
3308
3319
  }
3309
- function Qa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
3310
- return { getNumberFormat: Li((...e7) => new Intl.NumberFormat(...e7), { cache: Za(e6.number), strategy: Ji.variadic }), getDateTimeFormat: Li((...e7) => new Intl.DateTimeFormat(...e7), { cache: Za(e6.dateTime), strategy: Ji.variadic }), getPluralRules: Li((...e7) => new Intl.PluralRules(...e7), { cache: Za(e6.pluralRules), strategy: Ji.variadic }) };
3320
+ function $a(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
3321
+ return { getNumberFormat: Ri((...e7) => new Intl.NumberFormat(...e7), { cache: Qa(e6.number), strategy: Yi.variadic }), getDateTimeFormat: Ri((...e7) => new Intl.DateTimeFormat(...e7), { cache: Qa(e6.dateTime), strategy: Yi.variadic }), getPluralRules: Ri((...e7) => new Intl.PluralRules(...e7), { cache: Qa(e6.pluralRules), strategy: Yi.variadic }) };
3311
3322
  }
3312
- var $a = class e5 {
3323
+ var eo = class e5 {
3313
3324
  constructor(t2, n2 = e5.defaultLocale, r2, i2) {
3314
3325
  if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
3315
3326
  let t3 = this.formatToParts(e6);
3316
3327
  if (t3.length === 1) return t3[0].value;
3317
3328
  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), []);
3318
3329
  return n3.length <= 1 ? n3[0] || `` : n3;
3319
- }, this.formatToParts = (e6) => Ja(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`) {
3330
+ }, this.formatToParts = (e6) => Ya(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`) {
3320
3331
  if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
3321
3332
  let { ...n3 } = i2 || {};
3322
3333
  this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
3323
3334
  } else this.ast = t2;
3324
3335
  if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
3325
- this.formats = Xa(e5.formats, r2), this.formatters = i2 && i2.formatters || Qa(this.formatterCache);
3336
+ this.formats = Za(e5.formats, r2), this.formatters = i2 && i2.formatters || $a(this.formatterCache);
3326
3337
  }
3327
3338
  static {
3328
3339
  this.memoizedDefaultLocale = null;
@@ -3338,32 +3349,32 @@ var $a = class e5 {
3338
3349
  };
3339
3350
  }
3340
3351
  static {
3341
- this.__parse = Va;
3352
+ this.__parse = Ha;
3342
3353
  }
3343
3354
  static {
3344
3355
  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` } } };
3345
3356
  }
3346
3357
  };
3347
- function eo(e6, t2) {
3348
- return ao(e6) || io(e6, t2) || no(e6, t2) || to();
3358
+ function to(e6, t2) {
3359
+ return oo(e6) || ao(e6, t2) || ro(e6, t2) || no();
3349
3360
  }
3350
- function to() {
3361
+ function no() {
3351
3362
  throw TypeError(`Invalid attempt to destructure non-iterable instance.
3352
3363
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
3353
3364
  }
3354
- function no(e6, t2) {
3365
+ function ro(e6, t2) {
3355
3366
  if (e6) {
3356
- if (typeof e6 == `string`) return ro(e6, t2);
3367
+ if (typeof e6 == `string`) return io(e6, t2);
3357
3368
  var n2 = {}.toString.call(e6).slice(8, -1);
3358
- 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;
3369
+ 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) ? io(e6, t2) : void 0;
3359
3370
  }
3360
3371
  }
3361
- function ro(e6, t2) {
3372
+ function io(e6, t2) {
3362
3373
  (t2 == null || t2 > e6.length) && (t2 = e6.length);
3363
3374
  for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
3364
3375
  return r2;
3365
3376
  }
3366
- function io(e6, t2) {
3377
+ function ao(e6, t2) {
3367
3378
  var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
3368
3379
  if (n2 != null) {
3369
3380
  var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
@@ -3384,7 +3395,7 @@ function io(e6, t2) {
3384
3395
  return s2;
3385
3396
  }
3386
3397
  }
3387
- function ao(e6) {
3398
+ function oo(e6) {
3388
3399
  if (Array.isArray(e6)) return e6;
3389
3400
  }
3390
3401
  function Z(e6) {
@@ -3395,7 +3406,7 @@ function Z(e6) {
3395
3406
  return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
3396
3407
  }, Z(e6);
3397
3408
  }
3398
- function oo(e6, t2) {
3409
+ function so(e6, t2) {
3399
3410
  var n2 = Object.keys(e6);
3400
3411
  if (Object.getOwnPropertySymbols) {
3401
3412
  var r2 = Object.getOwnPropertySymbols(e6);
@@ -3405,37 +3416,37 @@ function oo(e6, t2) {
3405
3416
  }
3406
3417
  return n2;
3407
3418
  }
3408
- function so(e6) {
3419
+ function co(e6) {
3409
3420
  for (var t2 = 1; t2 < arguments.length; t2++) {
3410
3421
  var n2 = arguments[t2] == null ? {} : arguments[t2];
3411
- t2 % 2 ? oo(Object(n2), true).forEach(function(t3) {
3412
- co(e6, t3, n2[t3]);
3413
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : oo(Object(n2)).forEach(function(t3) {
3422
+ t2 % 2 ? so(Object(n2), true).forEach(function(t3) {
3423
+ lo(e6, t3, n2[t3]);
3424
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : so(Object(n2)).forEach(function(t3) {
3414
3425
  Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
3415
3426
  });
3416
3427
  }
3417
3428
  return e6;
3418
3429
  }
3419
- function co(e6, t2, n2) {
3420
- return (t2 = po(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
3430
+ function lo(e6, t2, n2) {
3431
+ return (t2 = mo(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
3421
3432
  }
3422
- function lo(e6, t2) {
3433
+ function uo(e6, t2) {
3423
3434
  if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
3424
3435
  }
3425
- function uo(e6, t2) {
3436
+ function fo(e6, t2) {
3426
3437
  for (var n2 = 0; n2 < t2.length; n2++) {
3427
3438
  var r2 = t2[n2];
3428
- r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, po(r2.key), r2);
3439
+ r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, mo(r2.key), r2);
3429
3440
  }
3430
3441
  }
3431
- function fo(e6, t2, n2) {
3432
- return t2 && uo(e6.prototype, t2), n2 && uo(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
3442
+ function po(e6, t2, n2) {
3443
+ return t2 && fo(e6.prototype, t2), n2 && fo(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
3433
3444
  }
3434
- function po(e6) {
3435
- var t2 = mo(e6, `string`);
3445
+ function mo(e6) {
3446
+ var t2 = ho(e6, `string`);
3436
3447
  return Z(t2) == `symbol` ? t2 : t2 + ``;
3437
3448
  }
3438
- function mo(e6, t2) {
3449
+ function ho(e6, t2) {
3439
3450
  if (Z(e6) != `object` || !e6) return e6;
3440
3451
  var n2 = e6[Symbol.toPrimitive];
3441
3452
  if (n2 !== void 0) {
@@ -3445,34 +3456,34 @@ function mo(e6, t2) {
3445
3456
  }
3446
3457
  return (t2 === `string` ? String : Number)(e6);
3447
3458
  }
3448
- function ho() {
3459
+ function go() {
3449
3460
  return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
3450
3461
  return n2;
3451
3462
  }, parseLngForICU: function(e6) {
3452
3463
  return e6;
3453
3464
  }, escapeVariables: false };
3454
3465
  }
3455
- var go = function() {
3466
+ var _o = function() {
3456
3467
  function e6(t2) {
3457
- lo(this, e6), this.type = `i18nFormat`, this.mem = {}, this.init(null, t2);
3468
+ uo(this, e6), this.type = `i18nFormat`, this.mem = {}, this.init(null, t2);
3458
3469
  }
3459
- return fo(e6, [{ key: `init`, value: function(e7, t2) {
3470
+ return po(e6, [{ key: `init`, value: function(e7, t2) {
3460
3471
  var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
3461
- if (this.options = Ii(r2, t2, this.options || {}, ho()), this.formats = this.options.formats, e7) {
3472
+ if (this.options = Li(r2, t2, this.options || {}, go()), this.formats = this.options.formats, e7) {
3462
3473
  var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
3463
- e7.IntlMessageFormat = $a, e7.ICU = this, s2 && (a2 && e7.on(a2, function() {
3474
+ e7.IntlMessageFormat = eo, e7.ICU = this, s2 && (a2 && e7.on(a2, function() {
3464
3475
  return n2.clearCache();
3465
3476
  }), o2 && e7.store.on(o2, function() {
3466
3477
  return n2.clearCache();
3467
3478
  }));
3468
3479
  }
3469
3480
  } }, { key: `addUserDefinedFormats`, value: function(e7) {
3470
- this.formats = this.formats ? so(so({}, this.formats), e7) : e7;
3481
+ this.formats = this.formats ? co(co({}, this.formats), e7) : e7;
3471
3482
  } }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
3472
3483
  var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && `${n2}.${r2}.${i2.replace(/\./g, `###`)}`, c2;
3473
- this.options.memoize && (c2 = Mi(this.mem, s2));
3484
+ this.options.memoize && (c2 = Ni(this.mem, s2));
3474
3485
  try {
3475
- return c2 || (c2 = new $a(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && ji(this.mem, s2, c2)), c2.format(this.escapeVariableValues(t2));
3486
+ return c2 || (c2 = new eo(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && Mi(this.mem, s2, c2)), c2.format(this.escapeVariableValues(t2));
3476
3487
  } catch (n3) {
3477
3488
  return this.options.parseErrorHandler(n3, i2, e7, t2);
3478
3489
  }
@@ -3483,27 +3494,27 @@ var go = function() {
3483
3494
  } }, { key: `escapeVariableValues`, value: function(e7) {
3484
3495
  if (!this.options.escapeVariables || !e7 || Z(e7) !== `object`) return e7;
3485
3496
  for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
3486
- var i2 = eo(r2[n2], 2), a2 = i2[0], o2 = i2[1];
3497
+ var i2 = to(r2[n2], 2), a2 = i2[0], o2 = i2[1];
3487
3498
  t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`) : o2;
3488
3499
  }
3489
3500
  return t2;
3490
3501
  } }]), e6;
3491
3502
  }();
3492
- go.type = `i18nFormat`;
3493
- function _o({ icuOptions: e6 = {}, ...t2 }) {
3503
+ _o.type = `i18nFormat`;
3504
+ function vo({ icuOptions: e6 = {}, ...t2 }) {
3494
3505
  let { parseErrorHandler: n2 = void 0 } = t2;
3495
- return Oi(t2, { icu: new go({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
3506
+ return ki(t2, { icu: new _o({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
3496
3507
  }
3497
- var vo = (e6, t2, n2, r2) => {
3508
+ var yo = (e6, t2, n2, r2) => {
3498
3509
  let i2 = [n2, { code: t2, ...r2 || {} }];
3499
3510
  if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
3500
3511
  Q(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
3501
3512
  };
3502
- var yo = {};
3503
- var bo = (e6, t2, n2, r2) => {
3504
- Q(n2) && yo[n2] || (Q(n2) && (yo[n2] = /* @__PURE__ */ new Date()), vo(e6, t2, n2, r2));
3513
+ var bo = {};
3514
+ var xo = (e6, t2, n2, r2) => {
3515
+ Q(n2) && bo[n2] || (Q(n2) && (bo[n2] = /* @__PURE__ */ new Date()), yo(e6, t2, n2, r2));
3505
3516
  };
3506
- var xo = (e6, t2) => () => {
3517
+ var So = (e6, t2) => () => {
3507
3518
  if (e6.isInitialized) t2();
3508
3519
  else {
3509
3520
  let n2 = () => {
@@ -3514,29 +3525,29 @@ var xo = (e6, t2) => () => {
3514
3525
  e6.on(`initialized`, n2);
3515
3526
  }
3516
3527
  };
3517
- var So = (e6, t2, n2) => {
3518
- e6.loadNamespaces(t2, xo(e6, n2));
3528
+ var Co = (e6, t2, n2) => {
3529
+ e6.loadNamespaces(t2, So(e6, n2));
3519
3530
  };
3520
- var Co = (e6, t2, n2, r2) => {
3521
- if (Q(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return So(e6, n2, r2);
3531
+ var wo = (e6, t2, n2, r2) => {
3532
+ if (Q(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return Co(e6, n2, r2);
3522
3533
  n2.forEach((t3) => {
3523
3534
  e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
3524
- }), e6.loadLanguages(t2, xo(e6, r2));
3535
+ }), e6.loadLanguages(t2, So(e6, r2));
3525
3536
  };
3526
- var wo = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (bo(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
3537
+ var To = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (xo(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
3527
3538
  if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
3528
3539
  } });
3529
3540
  var Q = (e6) => typeof e6 == `string`;
3530
- var To = (e6) => typeof e6 == `object` && !!e6;
3531
- var Eo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
3532
- var Do = { "&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;": `/` };
3533
- var Oo = (e6) => Do[e6];
3534
- var ko = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(Eo, Oo) };
3535
- var Ao = () => ko;
3536
- var jo;
3537
- var Mo = () => jo;
3538
- var No = (0, import_react.createContext)();
3539
- var Po = class {
3541
+ var Eo = (e6) => typeof e6 == `object` && !!e6;
3542
+ var Do = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
3543
+ var Oo = { "&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;": `/` };
3544
+ var ko = (e6) => Oo[e6];
3545
+ var Ao = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(Do, ko) };
3546
+ var jo = () => Ao;
3547
+ var Mo;
3548
+ var No = () => Mo;
3549
+ var Po = (0, import_react.createContext)();
3550
+ var Fo = class {
3540
3551
  constructor() {
3541
3552
  this.usedNamespaces = {};
3542
3553
  }
@@ -3549,130 +3560,133 @@ var Po = class {
3549
3560
  return Object.keys(this.usedNamespaces);
3550
3561
  }
3551
3562
  };
3552
- var Fo = (e6, t2) => {
3563
+ var Io = (e6, t2) => {
3553
3564
  let n2 = (0, import_react.useRef)();
3554
3565
  return (0, import_react.useEffect)(() => {
3555
3566
  n2.current = t2 ? n2.current : e6;
3556
3567
  }, [e6, t2]), n2.current;
3557
3568
  };
3558
- var Io = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
3559
- var Lo = (e6, t2, n2, i2) => (0, import_react.useCallback)(Io(e6, t2, n2, i2), [e6, t2, n2, i2]);
3560
- var Ro = (e6, t2 = {}) => {
3561
- let { i18n: n2 } = t2, { i18n: r2, defaultNS: o2 } = (0, import_react.useContext)(No) || {}, l2 = n2 || r2 || Mo();
3562
- if (l2 && !l2.reportNamespaces && (l2.reportNamespaces = new Po()), !l2) {
3563
- bo(l2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
3564
- let e7 = (e8, t4) => Q(t4) ? t4 : To(t4) && Q(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
3569
+ var Lo = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
3570
+ var Ro = (e6, t2, n2, r2) => (0, import_react.useCallback)(Lo(e6, t2, n2, r2), [e6, t2, n2, r2]);
3571
+ var zo = (e6, t2 = {}) => {
3572
+ let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = (0, import_react.useContext)(Po) || {}, s2 = n2 || r2 || No();
3573
+ if (s2 && !s2.reportNamespaces && (s2.reportNamespaces = new Fo()), !s2) {
3574
+ xo(s2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
3575
+ let e7 = (e8, t4) => Q(t4) ? t4 : Eo(t4) && Q(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
3565
3576
  return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
3566
3577
  }
3567
- l2.options.react?.wait && bo(l2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
3568
- let u2 = { ...Ao(), ...l2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = u2, p2 = e6 || o2 || l2.options?.defaultNS;
3569
- p2 = Q(p2) ? [p2] : p2 || [`translation`], l2.reportNamespaces.addUsedNamespaces?.(p2);
3570
- let m2 = (l2.isInitialized || l2.initializedStoreOnce) && p2.every((e7) => wo(e7, l2, u2)), h2 = Lo(l2, t2.lng || null, u2.nsMode === `fallback` ? p2 : p2[0], f2), g2 = () => h2, _2 = () => Io(l2, t2.lng || null, u2.nsMode === `fallback` ? p2 : p2[0], f2), [v2, y2] = (0, import_react.useState)(g2), b2 = p2.join();
3578
+ s2.options.react?.wait && xo(s2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
3579
+ let u2 = { ...jo(), ...s2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = u2, p2 = e6 || i2 || s2.options?.defaultNS;
3580
+ p2 = Q(p2) ? [p2] : p2 || [`translation`], s2.reportNamespaces.addUsedNamespaces?.(p2);
3581
+ let m2 = (s2.isInitialized || s2.initializedStoreOnce) && p2.every((e7) => To(e7, s2, u2)), h2 = Ro(s2, t2.lng || null, u2.nsMode === `fallback` ? p2 : p2[0], f2), g2 = () => h2, _2 = () => Lo(s2, t2.lng || null, u2.nsMode === `fallback` ? p2 : p2[0], f2), [v2, y2] = (0, import_react.useState)(g2), b2 = p2.join();
3571
3582
  t2.lng && (b2 = `${t2.lng}${b2}`);
3572
- let x2 = Fo(b2), S2 = (0, import_react.useRef)(true);
3583
+ let x2 = Io(b2), S2 = (0, import_react.useRef)(true);
3573
3584
  (0, import_react.useEffect)(() => {
3574
3585
  let { bindI18n: e7, bindI18nStore: n3 } = u2;
3575
- S2.current = true, !m2 && !d2 && (t2.lng ? Co(l2, t2.lng, p2, () => {
3586
+ S2.current = true, !m2 && !d2 && (t2.lng ? wo(s2, t2.lng, p2, () => {
3576
3587
  S2.current && y2(_2);
3577
- }) : So(l2, p2, () => {
3588
+ }) : Co(s2, p2, () => {
3578
3589
  S2.current && y2(_2);
3579
3590
  })), m2 && x2 && x2 !== b2 && S2.current && y2(_2);
3580
3591
  let r3 = () => {
3581
3592
  S2.current && y2(_2);
3582
3593
  };
3583
- return e7 && l2?.on(e7, r3), n3 && l2?.store.on(n3, r3), () => {
3584
- S2.current = false, l2 && e7 && e7?.split(` `).forEach((e8) => l2.off(e8, r3)), n3 && l2 && n3.split(` `).forEach((e8) => l2.store.off(e8, r3));
3594
+ return e7 && s2?.on(e7, r3), n3 && s2?.store.on(n3, r3), () => {
3595
+ S2.current = false, s2 && e7 && e7?.split(` `).forEach((e8) => s2.off(e8, r3)), n3 && s2 && n3.split(` `).forEach((e8) => s2.store.off(e8, r3));
3585
3596
  };
3586
- }, [l2, b2]), (0, import_react.useEffect)(() => {
3597
+ }, [s2, b2]), (0, import_react.useEffect)(() => {
3587
3598
  S2.current && m2 && y2(g2);
3588
- }, [l2, f2, m2]);
3589
- let C2 = [v2, l2, m2];
3590
- if (C2.t = v2, C2.i18n = l2, C2.ready = m2, m2 || !m2 && !d2) return C2;
3599
+ }, [s2, f2, m2]);
3600
+ let C2 = [v2, s2, m2];
3601
+ if (C2.t = v2, C2.i18n = s2, C2.ready = m2, m2 || !m2 && !d2) return C2;
3591
3602
  throw new Promise((e7) => {
3592
- t2.lng ? Co(l2, t2.lng, p2, () => e7()) : So(l2, p2, () => e7());
3603
+ t2.lng ? wo(s2, t2.lng, p2, () => e7()) : Co(s2, p2, () => e7());
3593
3604
  });
3594
3605
  };
3595
- function zo({ i18n: e6, defaultNS: n2, children: r2 }) {
3596
- let i2 = (0, import_react.useMemo)(() => ({ i18n: e6, defaultNS: n2 }), [e6, n2]);
3597
- return (0, import_react.createElement)(No.Provider, { value: i2 }, r2);
3606
+ function Bo({ i18n: e6, defaultNS: t2, children: r2 }) {
3607
+ let i2 = (0, import_react.useMemo)(() => ({ i18n: e6, defaultNS: t2 }), [e6, t2]);
3608
+ return (0, import_react.createElement)(Po.Provider, { value: i2 }, r2);
3598
3609
  }
3599
- var Bo = I(`@wix/site-service-renderer-configuration`);
3600
- var Vo = () => {
3610
+ var Vo = I(`@wix/site-service-renderer-configuration`);
3611
+ var Ho = () => {
3601
3612
  let e6, t2;
3602
3613
  try {
3603
- e6 = (0, import_services_manager_react.useService)(Bo).languageCode;
3614
+ e6 = (0, import_services_manager_react.useService)(Vo).languageCode;
3604
3615
  } catch {
3605
3616
  }
3606
3617
  try {
3607
- t2 = (0, import_services_manager_react.useService)(Lr).language;
3618
+ t2 = (0, import_services_manager_react.useService)(Rr).language;
3608
3619
  } catch {
3609
3620
  }
3610
3621
  return e6 || t2;
3611
3622
  };
3612
- var Ho = `wix-warmup-data`;
3613
- var Uo = null;
3614
- function Wo(e6) {
3623
+ var Uo = `wix-warmup-data`;
3624
+ var Wo = null;
3625
+ function Go(e6) {
3615
3626
  if (typeof document < `u`) try {
3616
- let t2 = document.getElementById(Ho)?.textContent;
3617
- return t2 ? (Uo?.text !== t2 && (Uo = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Uo.data[e6] ?? void 0) : void 0;
3627
+ let t2 = document.getElementById(Uo)?.textContent;
3628
+ return t2 ? (Wo?.text !== t2 && (Wo = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Wo.data[e6] ?? void 0) : void 0;
3618
3629
  } catch {
3619
3630
  return;
3620
3631
  }
3621
3632
  }
3622
- var Go = `blog-builder:i18n`;
3623
- var Ko = () => Wo(Go);
3624
- var qo = /* @__PURE__ */ new Map();
3625
- function Jo(e6, t2) {
3626
- let n2 = qo.get(e6);
3633
+ var Ko = `blog-builder:i18n`;
3634
+ var qo = () => Go(Ko);
3635
+ var Jo = /* @__PURE__ */ new Map();
3636
+ function Yo(e6, t2) {
3637
+ let n2 = Jo.get(e6);
3627
3638
  if (n2) return n2;
3628
- let r2 = Ko(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = _o({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
3629
- return qo.set(e6, a2), a2;
3639
+ let r2 = qo(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = vo({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
3640
+ return Jo.set(e6, a2), a2;
3630
3641
  }
3631
- var Yo = (e6, t2, n2) => {
3642
+ var Xo = (e6, t2, n2) => {
3632
3643
  let r2 = t2.lastIndexOf(`?`), i2 = e6[r2 === -1 || r2 < t2.lastIndexOf(`/`) ? t2 : t2.slice(0, r2)];
3633
3644
  return i2 ? typeof i2 == `function` ? i2() : Promise.resolve(i2) : new Promise((e7, r3) => {
3634
3645
  (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.`))));
3635
3646
  });
3636
3647
  };
3637
- var Xo = (e6) => e6.split(`-`)[0] ?? e6;
3638
- Vr({ isDev: false, loadMessages: (e6) => Yo(Object.assign({ "../assets/locale/messages_en.dev.json": () => fn(() => Promise.resolve().then(() => Qo), void 0, import_meta.url), "../assets/locale/messages_en.json": () => fn(() => Promise.resolve().then(() => es), void 0, import_meta.url) }), `../assets/locale/messages_${Xo(e6)}.json`, 4), loadDevMessages: (e6) => Yo(Object.assign({ "../assets/locale/messages_en.dev.json": () => fn(() => Promise.resolve().then(() => Qo), void 0, import_meta.url) }), `../assets/locale/messages_${Xo(e6)}.dev.json`, 4) });
3639
- function Zo(e6) {
3640
- let t2 = Vo(), n2 = Ko()?.locale ?? t2 ?? `en`;
3641
- return { i18n: Jo(n2, e6), locale: n2 };
3642
- }
3643
- var Qo = p({ default: () => $o });
3644
- var $o = { "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` };
3645
- var es = p({ default: () => ns, title: () => ts });
3646
- var ts = `My App`;
3647
- var ns = { "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: ts, "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.` };
3648
- var rs = Object.assign({ "../assets/locale/messages_en.dev.json": Qo, "../assets/locale/messages_en.json": es });
3649
- var is = (e6, t2) => {
3650
- let n2 = rs[`../assets/locale/messages_${Xo(e6)}${t2}.json`];
3648
+ var Zo = (e6) => e6.split(`-`)[0] ?? e6;
3649
+ Hr({ isDev: false, loadMessages: (e6) => Xo(Object.assign({ "../assets/locale/messages_en.dev.json": () => pn(() => Promise.resolve().then(() => $o), void 0, import_meta.url), "../assets/locale/messages_en.json": () => pn(() => Promise.resolve().then(() => ts), void 0, import_meta.url) }), `../assets/locale/messages_${Zo(e6)}.json`, 4), loadDevMessages: (e6) => Xo(Object.assign({ "../assets/locale/messages_en.dev.json": () => pn(() => Promise.resolve().then(() => $o), void 0, import_meta.url) }), `../assets/locale/messages_${Zo(e6)}.dev.json`, 4) });
3650
+ function Qo(e6) {
3651
+ let t2 = Ho(), n2 = qo()?.locale ?? t2 ?? `en`;
3652
+ return { i18n: Yo(n2, e6), locale: n2 };
3653
+ }
3654
+ var $o = m({ default: () => es });
3655
+ var es = { "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` };
3656
+ var ts = m({ default: () => rs, title: () => ns });
3657
+ var ns = `My App`;
3658
+ var rs = { "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: ns, "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.` };
3659
+ var is = Object.assign({ "../assets/locale/messages_en.dev.json": $o, "../assets/locale/messages_en.json": ts });
3660
+ var as = (e6, t2) => {
3661
+ let n2 = is[`../assets/locale/messages_${Zo(e6)}${t2}.json`];
3651
3662
  return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
3652
3663
  };
3653
- var as = Vr({ isDev: false, loadMessages: (e6) => is(e6, ``), loadDevMessages: (e6) => is(e6, `.dev`) });
3654
- var os = (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);
3664
+ var os = Hr({ isDev: false, loadMessages: (e6) => as(e6, ``), loadDevMessages: (e6) => as(e6, `.dev`) });
3665
+ var ss = (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);
3655
3666
  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` };
3656
- var ss = (e6, t2) => {
3657
- let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: os(r2, `full`, t2) });
3667
+ var cs = (e6, t2) => {
3668
+ let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: ss(r2, `full`, t2) });
3658
3669
  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) } };
3659
3670
  };
3660
- var cs = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
3661
- var ls = (e6) => ({ text: e6, html: `<p>${cs(e6)}</p>`, linkList: [] });
3662
- var us = (0, import_react.createContext)(null);
3663
- us.displayName = `PostItemContext`;
3664
- function ds() {
3665
- return (0, import_react.useContext)(us);
3666
- }
3667
- function fs({ postData: e6, children: t2 }) {
3668
- let n2 = Rr(), { t: r2, ready: i2 } = Ro(void 0, { useSuspense: false }), a2 = (0, import_react.useMemo)(() => ss(r2, n2), [r2, n2]), { isLiked: s2, likeCount: c2, isLikeCountLoaded: l2, viewCount: u2, commentCount: f2, toggleLike: p2, liveLikes: m2 } = Ir(e6.recentPostItem.slug ? e6._id : void 0, 0), h2 = (0, import_react.useMemo)(() => ({ ...e6, isLiked: s2, isLikeCountLoaded: l2, toggleLike: p2, liveLikes: m2, likeCountValue: c2, viewCountValue: u2 ?? e6.initialViewCount, commentCountValue: f2 ?? e6.initialCommentCount, likeCount: ls(i2 ? a2.likeCount(c2) : ``), viewCount: u2 === void 0 || !i2 ? e6.viewCount : ls(a2.viewCount(u2)), commentCount: f2 === void 0 || !i2 ? e6.commentCount : ls(a2.commentCount(f2)) }), [e6, s2, c2, l2, u2, f2, p2, m2, a2, i2]);
3669
- return (0, import_jsx_runtime.jsx)(us.Provider, { value: h2, children: t2 });
3670
- }
3671
- function ps({ postData: e6, children: t2 }) {
3672
- let { i18n: n2 } = Zo(as);
3673
- return e6 === void 0 ? (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: t2 }) : (0, import_jsx_runtime.jsx)(zo, { i18n: n2, children: (0, import_jsx_runtime.jsx)(fs, { postData: e6, children: t2 }) });
3674
- }
3675
- var ms = En(`bd5dc6d6-7a0d-48d5-99da-457340ce6f2d`);
3671
+ var ls = (e6) => e6.replace(/&/g, `&amp;`).replace(/</g, `&lt;`).replace(/>/g, `&gt;`).replace(/"/g, `&quot;`).replace(/'/g, `&#39;`);
3672
+ var us = (e6) => ({ text: e6, html: `<p>${ls(e6)}</p>`, linkList: [] });
3673
+ var ds = (0, import_react.createContext)(null);
3674
+ ds.displayName = `PostItemContext`;
3675
+ function fs() {
3676
+ return (0, import_react.useContext)(ds);
3677
+ }
3678
+ function ps({ postData: t2, children: n2 }) {
3679
+ let r2 = zr(), { t: i2, ready: a2 } = zo(void 0, { useSuspense: false }), o2 = (0, import_react.useMemo)(() => cs(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: us(a2 ? o2.likeCount(l2) : ``), viewCount: d2 === void 0 || !a2 ? t2.viewCount : us(o2.viewCount(d2)), commentCount: p2 === void 0 || !a2 ? t2.commentCount : us(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)(() => {
3680
+ let e6 = g2.itemCategoryLabel.text;
3681
+ 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 };
3682
+ }, [g2, _2]);
3683
+ return (0, import_jsx_runtime.jsx)(ds.Provider, { value: g2, children: (0, import_jsx_runtime.jsx)(import_post_context_provider.default, { value: v2, children: n2 }) });
3684
+ }
3685
+ function ms({ postData: e6, children: t2 }) {
3686
+ let { i18n: n2 } = Qo(os);
3687
+ return e6 === void 0 ? (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: t2 }) : (0, import_jsx_runtime.jsx)(Bo, { i18n: n2, children: (0, import_jsx_runtime.jsx)(ps, { postData: e6, children: t2 }) });
3688
+ }
3689
+ var hs = Dn(`bd5dc6d6-7a0d-48d5-99da-457340ce6f2d`);
3676
3690
  // Annotate the CommonJS export names for ESM import in node:
3677
3691
  0 && (module.exports = {
3678
3692
  PostItemContextProvider,