@wix/blog 1.0.708 → 1.0.710
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.
- package/_sdk-exports/context-blog-feed/runtime.js +4 -4
- package/_sdk-exports/context-post/runtime.d.ts +36 -1
- package/_sdk-exports/context-post-by-id/runtime.js +4 -4
- package/_sdk-exports/context-post-by-slug/runtime.js +4 -4
- package/_sdk-exports/context-post-list-item/runtime.js +4 -4
- package/_sdk-exports/context-related-posts/runtime.js +4 -4
- package/build/cjs/context-blog-feed.js +1422 -1366
- package/build/cjs/context-blog-feed.js.map +1 -1
- package/build/cjs/context-post-by-id.js +750 -694
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.js +1345 -1289
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/cjs/context-post-list-item.js +265 -237
- package/build/cjs/context-post-list-item.js.map +1 -1
- package/build/cjs/context-post.d.ts +36 -1
- package/build/cjs/context-related-posts.js +1075 -1019
- package/build/cjs/context-related-posts.js.map +1 -1
- package/build/es/context-blog-feed.mjs +1422 -1366
- package/build/es/context-blog-feed.mjs.map +1 -1
- package/build/es/context-post-by-id.mjs +750 -694
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.mjs +1345 -1289
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/context-post-list-item.mjs +265 -237
- package/build/es/context-post-list-item.mjs.map +1 -1
- package/build/es/context-post.d.mts +36 -1
- package/build/es/context-related-posts.mjs +1075 -1019
- package/build/es/context-related-posts.mjs.map +1 -1
- package/build/internal/cjs/context-post.d.ts +36 -1
- package/build/internal/es/context-post.d.mts +36 -1
- package/package.json +2 -2
|
@@ -20,10 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// context-related-posts.ts
|
|
21
21
|
var context_related_posts_exports = {};
|
|
22
22
|
__export(context_related_posts_exports, {
|
|
23
|
-
RelatedPostsProvider: () =>
|
|
24
|
-
default: () =>
|
|
25
|
-
injectAccessTokenGetter: () =>
|
|
26
|
-
useRelatedPostsContext: () =>
|
|
23
|
+
RelatedPostsProvider: () => bu,
|
|
24
|
+
default: () => bu,
|
|
25
|
+
injectAccessTokenGetter: () => xu,
|
|
26
|
+
useRelatedPostsContext: () => cu
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(context_related_posts_exports);
|
|
29
29
|
|
|
@@ -33,16 +33,17 @@ var import_services_manager_react = require("@wix/services-manager-react");
|
|
|
33
33
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
34
34
|
var import_meta = {};
|
|
35
35
|
var h = Object.defineProperty;
|
|
36
|
-
var g = (e6, t2) => {
|
|
36
|
+
var g = (e6, t2) => () => (t2 || (e6((t2 = { exports: {} }).exports, t2, t2.exports), e6 = null), t2.exports);
|
|
37
|
+
var _ = (e6, t2) => {
|
|
37
38
|
let n2 = {};
|
|
38
39
|
for (var r2 in e6) h(n2, r2, { get: e6[r2], enumerable: true });
|
|
39
40
|
return t2 || h(n2, Symbol.toStringTag, { value: `Module` }), n2;
|
|
40
41
|
};
|
|
41
|
-
var
|
|
42
|
-
function
|
|
42
|
+
var v = {};
|
|
43
|
+
function y(e6, t2 = false, n2 = (e7) => e7) {
|
|
43
44
|
return () => ({ __type: `event-definition`, type: e6, isDomainEvent: t2, transformations: n2 });
|
|
44
45
|
}
|
|
45
|
-
var
|
|
46
|
+
var b = (e6) => {
|
|
46
47
|
switch (e6) {
|
|
47
48
|
case `get`:
|
|
48
49
|
case `GET`:
|
|
@@ -69,11 +70,11 @@ var y = (e6) => {
|
|
|
69
70
|
throw Error(`Unknown method: ${e6}`);
|
|
70
71
|
}
|
|
71
72
|
};
|
|
72
|
-
var
|
|
73
|
+
var x = (e6) => (t2) => async (n2) => {
|
|
73
74
|
let r2, i2 = (t3) => {
|
|
74
75
|
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
76
|
let { method: i3, url: a2, params: o2 } = r2;
|
|
76
|
-
return { ...r2, method:
|
|
77
|
+
return { ...r2, method: b(i3), url: a2, data: r2.data, params: o2 };
|
|
77
78
|
};
|
|
78
79
|
try {
|
|
79
80
|
let e7 = await t2.request(i2);
|
|
@@ -86,10 +87,10 @@ var b = (e6) => (t2) => async (n2) => {
|
|
|
86
87
|
throw typeof e7 == `object` && e7 && `response` in e7 && typeof e7.response == `object` && e7.response !== null && `data` in e7.response ? e7.response.data : e7;
|
|
87
88
|
}
|
|
88
89
|
};
|
|
89
|
-
var
|
|
90
|
-
var
|
|
91
|
-
var
|
|
92
|
-
var
|
|
90
|
+
var S = (e6) => e6.__isAmbassador ? true : !!e6().__isAmbassador;
|
|
91
|
+
var C = `__metadata`;
|
|
92
|
+
var ee = `edge.wixapis.com`;
|
|
93
|
+
var w = class extends Error {
|
|
93
94
|
message;
|
|
94
95
|
response;
|
|
95
96
|
constructor(e6, t2) {
|
|
@@ -97,108 +98,108 @@ var ee = class extends Error {
|
|
|
97
98
|
}
|
|
98
99
|
async details() {
|
|
99
100
|
let e6 = await this.response.json();
|
|
100
|
-
return
|
|
101
|
+
return T(this.response.status, e6?.message, e6?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e6 });
|
|
101
102
|
}
|
|
102
103
|
};
|
|
103
|
-
var
|
|
104
|
-
var
|
|
105
|
-
var
|
|
106
|
-
var
|
|
107
|
-
function
|
|
104
|
+
var T = (e6, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
|
|
105
|
+
var te = (e6) => e6?.method && [`post`, `put`, `patch`].includes(e6.method.toLocaleLowerCase()) && e6.body ? { "Content-Type": `application/json` } : {};
|
|
106
|
+
var ne = (e6) => e6 && typeof e6 == `object` && !Array.isArray(e6);
|
|
107
|
+
var re = (e6) => e6.__type === `host`;
|
|
108
|
+
function ie(e6, t2) {
|
|
108
109
|
return e6.create(t2);
|
|
109
110
|
}
|
|
110
|
-
var
|
|
111
|
-
function
|
|
112
|
-
return { [
|
|
111
|
+
var ae = `x-wix-bi-gateway`;
|
|
112
|
+
function oe(e6, t2, n2) {
|
|
113
|
+
return { [ae]: se({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e6.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e6.methodFqn, entity: e6.entityFqdn }) };
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
+
function se(e6) {
|
|
115
116
|
return Object.entries(e6).filter(([e7, t2]) => !!t2).map(([e7, t2]) => `${e7}=${t2}`).join(`,`);
|
|
116
117
|
}
|
|
117
|
-
function
|
|
118
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
119
|
-
globalThis.__wix_context__ = void 0,
|
|
118
|
+
function ce(e6) {
|
|
119
|
+
let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
|
|
120
|
+
globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
120
121
|
try {
|
|
121
122
|
return e6();
|
|
122
123
|
} finally {
|
|
123
|
-
globalThis.__wix_context__ = t2,
|
|
124
|
+
globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
124
125
|
}
|
|
125
126
|
}
|
|
126
|
-
var
|
|
127
|
-
function
|
|
128
|
-
return
|
|
127
|
+
var le = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
128
|
+
function ue(e6) {
|
|
129
|
+
return he(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
|
|
129
130
|
}
|
|
130
|
-
var
|
|
131
|
-
var
|
|
132
|
-
var
|
|
133
|
-
var
|
|
134
|
-
function
|
|
131
|
+
var de = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
132
|
+
var fe = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
133
|
+
var pe = `$1\0$2`;
|
|
134
|
+
var me = /[^\p{L}\d]+/giu;
|
|
135
|
+
function he(e6) {
|
|
135
136
|
let t2 = e6.trim();
|
|
136
|
-
t2 = t2.replace(
|
|
137
|
+
t2 = t2.replace(de, pe).replace(fe, pe), t2 = t2.replace(me, `\0`);
|
|
137
138
|
let n2 = 0, r2 = t2.length;
|
|
138
139
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
139
140
|
if (n2 === r2) return [];
|
|
140
141
|
for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
|
|
141
142
|
return t2.slice(n2, r2).split(/\0/g);
|
|
142
143
|
}
|
|
143
|
-
var
|
|
144
|
-
var
|
|
145
|
-
var
|
|
146
|
-
function
|
|
144
|
+
var ge = (e6) => `validationError` in (e6.response?.data?.details ?? {});
|
|
145
|
+
var _e = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
|
|
146
|
+
var ve = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
|
|
147
|
+
function ye(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
147
148
|
if (typeof e6 != `object` || !e6) throw e6;
|
|
148
|
-
if (
|
|
149
|
-
if (
|
|
150
|
-
if (
|
|
151
|
-
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code:
|
|
152
|
-
return
|
|
149
|
+
if (ge(e6)) return be(e6, t2, n2);
|
|
150
|
+
if (_e(e6)) return Se(e6);
|
|
151
|
+
if (ve(e6)) {
|
|
152
|
+
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: ue(n3), data: {} }, requestId: e6.requestId };
|
|
153
|
+
return xe(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
153
154
|
}
|
|
154
|
-
return
|
|
155
|
+
return Ce(e6);
|
|
155
156
|
}
|
|
156
|
-
var
|
|
157
|
-
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 =
|
|
158
|
-
return
|
|
157
|
+
var be = (e6, t2, n2) => {
|
|
158
|
+
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = we(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 };
|
|
159
|
+
return xe(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
|
|
159
160
|
};
|
|
160
|
-
var
|
|
161
|
-
var
|
|
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 ??
|
|
163
|
-
return
|
|
161
|
+
var xe = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
|
|
162
|
+
var Se = (e6) => {
|
|
163
|
+
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 ?? ue(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 };
|
|
164
|
+
return xe(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
|
|
164
165
|
};
|
|
165
|
-
var
|
|
166
|
-
var
|
|
166
|
+
var Ce = (e6) => xe(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: ue(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
|
|
167
|
+
var we = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
167
168
|
let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
|
|
168
169
|
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
170
|
let r3 = t2[e7.field];
|
|
170
|
-
if (r3) return { ...e7, field:
|
|
171
|
+
if (r3) return { ...e7, field: Te(r3, i2) };
|
|
171
172
|
let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
|
|
172
173
|
if (s2) {
|
|
173
174
|
let t3 = a2[s2];
|
|
174
|
-
if (t3) return { ...e7, field: e7.field.replace(s2,
|
|
175
|
+
if (t3) return { ...e7, field: e7.field.replace(s2, Te(t3, i2)) };
|
|
175
176
|
}
|
|
176
177
|
return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
|
|
177
178
|
});
|
|
178
179
|
};
|
|
179
|
-
var
|
|
180
|
-
let n2 =
|
|
180
|
+
var Te = (e6, t2) => {
|
|
181
|
+
let n2 = Ee(e6);
|
|
181
182
|
return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
|
|
182
183
|
};
|
|
183
|
-
var
|
|
184
|
+
var Ee = (e6) => {
|
|
184
185
|
let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
|
|
185
186
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
186
187
|
};
|
|
187
|
-
function
|
|
188
|
-
return
|
|
188
|
+
function De(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
189
|
+
return ce(() => e6({ request: async (e7) => {
|
|
189
190
|
let i3 = e7({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
|
|
190
191
|
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 ?
|
|
192
|
+
let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? ee : o3}${a3.url}`;
|
|
192
193
|
a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
|
|
193
194
|
try {
|
|
194
|
-
let e8 =
|
|
195
|
+
let e8 = oe(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e8 } }, s3 = await n2(u3, o4);
|
|
195
196
|
if (s3.status !== 200) {
|
|
196
197
|
let e9 = null;
|
|
197
198
|
try {
|
|
198
199
|
e9 = await s3.json();
|
|
199
200
|
} catch {
|
|
200
201
|
}
|
|
201
|
-
let t3 =
|
|
202
|
+
let t3 = ke(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = ye(t3);
|
|
202
203
|
throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
|
|
203
204
|
}
|
|
204
205
|
let l3 = await s3.json();
|
|
@@ -208,18 +209,18 @@ function Ee(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
|
208
209
|
}
|
|
209
210
|
}, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
|
|
210
211
|
}
|
|
211
|
-
var
|
|
212
|
+
var Oe = class extends Error {
|
|
212
213
|
response;
|
|
213
214
|
requestId;
|
|
214
215
|
constructor(e6) {
|
|
215
216
|
super(), this.response = e6.response, this.requestId = e6.requestId;
|
|
216
217
|
}
|
|
217
218
|
};
|
|
218
|
-
var
|
|
219
|
-
var
|
|
220
|
-
function
|
|
219
|
+
var ke = (e6, t2, n2, r2) => new Oe({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2 }, status: e6 }, requestId: r2?.requestId });
|
|
220
|
+
var Ae = `.`;
|
|
221
|
+
function je(e6, t2, n2) {
|
|
221
222
|
if (e6 == null) throw Error(`Cannot set value on null or undefined`);
|
|
222
|
-
let r2 =
|
|
223
|
+
let r2 = Me(t2), i2 = e6;
|
|
223
224
|
for (let e7 = 0; e7 < r2.length; e7++) {
|
|
224
225
|
let t3 = r2[e7];
|
|
225
226
|
if (e7 === r2.length - 1) {
|
|
@@ -231,21 +232,21 @@ function Ae(e6, t2, n2) {
|
|
|
231
232
|
}
|
|
232
233
|
return e6;
|
|
233
234
|
}
|
|
234
|
-
function je(e6) {
|
|
235
|
-
return Array.isArray(e6) ? e6 : e6.split(ke).map((e7) => Me(e7) ? Number(e7) : e7);
|
|
236
|
-
}
|
|
237
235
|
function Me(e6) {
|
|
238
|
-
return
|
|
236
|
+
return Array.isArray(e6) ? e6 : e6.split(Ae).map((e7) => Ne(e7) ? Number(e7) : e7);
|
|
239
237
|
}
|
|
240
238
|
function Ne(e6) {
|
|
239
|
+
return /^\d+$/.test(e6);
|
|
240
|
+
}
|
|
241
|
+
function Pe(e6) {
|
|
241
242
|
let t2 = {};
|
|
242
|
-
for (let [n2, r2] of Object.entries(e6))
|
|
243
|
+
for (let [n2, r2] of Object.entries(e6)) Fe(n2) || je(t2, Me(n2), r2);
|
|
243
244
|
return t2;
|
|
244
245
|
}
|
|
245
|
-
function
|
|
246
|
+
function Fe(e6) {
|
|
246
247
|
return e6 === `__proto__` || e6 === `constructor` || e6 === `prototype`;
|
|
247
248
|
}
|
|
248
|
-
var
|
|
249
|
+
var Ie = class {
|
|
249
250
|
BRACKET_PATTERN = /\[(\d+)\]/g;
|
|
250
251
|
NUMERIC_PATTERN = /^\d+$/;
|
|
251
252
|
ESCAPED_DOT_PATTERN = /\\\./g;
|
|
@@ -268,7 +269,7 @@ var Fe = class {
|
|
|
268
269
|
return e6.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
|
|
269
270
|
}
|
|
270
271
|
unflatten() {
|
|
271
|
-
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])),
|
|
272
|
+
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])), Pe(this.cleanedModifiedFields);
|
|
272
273
|
}
|
|
273
274
|
flatten(e6) {
|
|
274
275
|
let t2 = {};
|
|
@@ -288,12 +289,12 @@ var Fe = class {
|
|
|
288
289
|
if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
|
|
289
290
|
r2.push(`[${e7}]`), n2 = n2[parseInt(e7, 10)];
|
|
290
291
|
}, a2 = (e7, t3) => {
|
|
291
|
-
let i3 = e7 in
|
|
292
|
+
let i3 = e7 in le ? le[e7] : void 0;
|
|
292
293
|
if (i3 && i3 in t3) {
|
|
293
294
|
r2.push(i3), n2 = t3[i3];
|
|
294
295
|
return;
|
|
295
296
|
}
|
|
296
|
-
let a3 =
|
|
297
|
+
let a3 = Be(e7);
|
|
297
298
|
if (a3 && a3 in t3) r2.push(a3), n2 = t3[a3];
|
|
298
299
|
else throw Error(`Cannot find key '${e7}' or its transformations at path ${this.buildPathString(r2)}`);
|
|
299
300
|
}, o2 = (e7, t3) => {
|
|
@@ -317,28 +318,28 @@ var Fe = class {
|
|
|
317
318
|
return e6.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e6[r2 - 1] === `\\` ? t2 : `.` + n2);
|
|
318
319
|
}
|
|
319
320
|
};
|
|
320
|
-
function
|
|
321
|
+
function Le(e6, t2) {
|
|
321
322
|
let n2 = e6?.modifiedFields;
|
|
322
323
|
if (!n2) return null;
|
|
323
|
-
let r2 =
|
|
324
|
+
let r2 = Re(n2);
|
|
324
325
|
if (!r2) return null;
|
|
325
326
|
let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
|
|
326
327
|
e6 = { ...e6, modifiedFields: i2 };
|
|
327
328
|
let o2 = t2(e6), s2 = o2?.modifiedFields;
|
|
328
329
|
if (!s2) return null;
|
|
329
|
-
let c2 =
|
|
330
|
+
let c2 = ze(s2, a2);
|
|
330
331
|
return c2 === null ? null : (o2.modifiedFields = c2, o2);
|
|
331
332
|
}
|
|
332
|
-
function
|
|
333
|
+
function Re(e6) {
|
|
333
334
|
if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
|
|
334
|
-
let t2 = new
|
|
335
|
+
let t2 = new Ie(e6);
|
|
335
336
|
return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
|
|
336
337
|
} catch {
|
|
337
338
|
return null;
|
|
338
339
|
}
|
|
339
340
|
return null;
|
|
340
341
|
}
|
|
341
|
-
function
|
|
342
|
+
function ze(e6, t2) {
|
|
342
343
|
if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
|
|
343
344
|
return t2.flatten(e6);
|
|
344
345
|
} catch {
|
|
@@ -346,10 +347,10 @@ function Re(e6, t2) {
|
|
|
346
347
|
}
|
|
347
348
|
return null;
|
|
348
349
|
}
|
|
349
|
-
function
|
|
350
|
+
function Be(e6) {
|
|
350
351
|
return e6.replace(/[-_\s]+(.)?/g, (e7, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e7) => e7.toLowerCase());
|
|
351
352
|
}
|
|
352
|
-
function
|
|
353
|
+
function Ve() {
|
|
353
354
|
return { emit(e6, ...t2) {
|
|
354
355
|
for (let n2 = 0, r2 = this.events[e6] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
|
|
355
356
|
}, events: {}, on(e6, t2) {
|
|
@@ -358,8 +359,8 @@ function Be() {
|
|
|
358
359
|
};
|
|
359
360
|
} };
|
|
360
361
|
}
|
|
361
|
-
var
|
|
362
|
-
function
|
|
362
|
+
var He = (e6) => e6.__type === `event-definition`;
|
|
363
|
+
function Ue(e6, t2, n2, r2) {
|
|
363
364
|
let i2;
|
|
364
365
|
if (e6.isDomainEvent) {
|
|
365
366
|
let { deletedEvent: e7, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
|
|
@@ -370,14 +371,14 @@ function He(e6, t2, n2, r2) {
|
|
|
370
371
|
let e7 = s2.modifiedFields;
|
|
371
372
|
if (typeof e7 == `object` && e7 && !Array.isArray(e7)) {
|
|
372
373
|
o2 = structuredClone(i2);
|
|
373
|
-
let e8 =
|
|
374
|
+
let e8 = Le(s2, a2);
|
|
374
375
|
if (e8) return t2(e8);
|
|
375
376
|
}
|
|
376
377
|
}
|
|
377
378
|
return t2(a2(o2));
|
|
378
379
|
}
|
|
379
|
-
function
|
|
380
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
380
|
+
function We(e6) {
|
|
381
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = Ve();
|
|
381
382
|
return { initModule(e7) {
|
|
382
383
|
return (r2) => {
|
|
383
384
|
let i2 = t2.get(e7.type) ?? [];
|
|
@@ -387,7 +388,7 @@ function Ue(e6) {
|
|
|
387
388
|
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
389
|
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
390
|
let l2 = t2.get(r2) ?? [];
|
|
390
|
-
return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) =>
|
|
391
|
+
return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) => Ue(e8, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
|
|
391
392
|
}, async processRequest(e7, t3) {
|
|
392
393
|
let n3 = await e7.text();
|
|
393
394
|
return this.process(n3, t3);
|
|
@@ -406,12 +407,12 @@ function Ue(e6) {
|
|
|
406
407
|
let n3 = Array.from(t2.keys()).map((e8) => ({ type: e8 }));
|
|
407
408
|
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
409
|
let r2 = t2.get(e7.eventType) ?? [];
|
|
409
|
-
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) =>
|
|
410
|
-
}, apps: { AppInstalled:
|
|
410
|
+
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Ue(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
|
|
411
|
+
}, apps: { AppInstalled: y(`AppInstalled`)(), AppRemoved: y(`AppRemoved`)() } } };
|
|
411
412
|
}
|
|
412
|
-
var
|
|
413
|
-
function
|
|
414
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
413
|
+
var Ge = (e6) => e6.__type === `service-plugin-definition`;
|
|
414
|
+
function Ke(e6) {
|
|
415
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = Ve();
|
|
415
416
|
return { initModule(e7) {
|
|
416
417
|
return (r2) => {
|
|
417
418
|
let i2 = t2.get(e7.componentType.toLowerCase()) ?? [];
|
|
@@ -453,42 +454,42 @@ function Ge(e6) {
|
|
|
453
454
|
} } };
|
|
454
455
|
}
|
|
455
456
|
var E = `X-Wix-Consistent`;
|
|
456
|
-
function
|
|
457
|
+
function qe(e6) {
|
|
457
458
|
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
459
|
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
460
|
try {
|
|
460
461
|
if (typeof n3 == `string` || n3 instanceof URL) {
|
|
461
462
|
let e7 = await i3(n3, { ...r3, headers: c3 });
|
|
462
463
|
l3?.handleError(e7, { requestOptions: { url: n3.toString(), method: r3?.method } });
|
|
463
|
-
let a3 =
|
|
464
|
+
let a3 = Je(e7);
|
|
464
465
|
return a3 && (t2[E] = a3), e7;
|
|
465
466
|
}
|
|
466
467
|
{
|
|
467
468
|
for (let [e8, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e8, t3);
|
|
468
469
|
let e7 = await i3(n3, r3);
|
|
469
470
|
l3?.handleError(e7, { requestOptions: { url: n3.url, method: r3?.method } });
|
|
470
|
-
let a3 =
|
|
471
|
+
let a3 = Je(e7);
|
|
471
472
|
return a3 && (t2[E] = a3), e7;
|
|
472
473
|
}
|
|
473
474
|
} catch (e7) {
|
|
474
475
|
throw l3?.handleError(e7, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e7;
|
|
475
476
|
}
|
|
476
|
-
}, { client: c2, initModule: l2 } =
|
|
477
|
-
let i3 = o2(), s3 = await a2(), c3 =
|
|
477
|
+
}, { client: c2, initModule: l2 } = Ke(i2), { client: u2, initModule: d2 } = We(i2), f2 = async (n3, r3) => {
|
|
478
|
+
let i3 = o2(), s3 = await a2(), c3 = te(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 = Je(l3);
|
|
478
479
|
return u3 && (t2[E] = u3), l3;
|
|
479
480
|
}, p2 = (t3, n3) => {
|
|
480
|
-
if (
|
|
481
|
-
if (
|
|
482
|
-
if (
|
|
481
|
+
if (He(t3)) return d2(t3);
|
|
482
|
+
if (Ge(t3)) return l2(t3);
|
|
483
|
+
if (re(t3) && e6.host) return ie(t3, e6.host);
|
|
483
484
|
if (typeof t3 == `function`) {
|
|
484
485
|
if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
|
|
485
486
|
let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e6.useCDN === void 0 ? i2().shouldUseCDN : e6.useCDN;
|
|
486
|
-
return
|
|
487
|
+
return De(ce(() => S(t3)) ? x(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
|
|
487
488
|
let n4 = new URL(e7, `https://${r3}`);
|
|
488
489
|
return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
|
|
489
490
|
}, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e6.host?.name, o3, e6.validateRequestSchema);
|
|
490
491
|
}
|
|
491
|
-
return
|
|
492
|
+
return ne(t3) ? Object.fromEntries(Object.entries(t3).map(([e7, n4]) => [e7, p2(n4, t3[C])])) : t3;
|
|
492
493
|
}, m2 = (e7) => {
|
|
493
494
|
for (let n3 in e7) t2[n3] = e7[n3];
|
|
494
495
|
};
|
|
@@ -496,33 +497,33 @@ function Ke(e6) {
|
|
|
496
497
|
let t3 = i2();
|
|
497
498
|
return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e6.host), t3;
|
|
498
499
|
}, setHeaders: m2, 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 ?
|
|
500
|
+
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 ? v.elevatedClient = this : v.client = this;
|
|
500
501
|
}, fetch: (t3, n3) => {
|
|
501
502
|
let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
|
|
502
503
|
return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
|
|
503
504
|
}, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
|
|
504
505
|
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
|
|
506
|
+
if (a3.status !== 200) throw new w(`GraphQL request failed with status ${a3.status}`, a3);
|
|
506
507
|
let { data: o3, errors: s3 } = await a3.json();
|
|
507
508
|
return { data: o3 ?? {}, errors: s3 };
|
|
508
509
|
}, webhooks: u2, servicePlugins: c2 };
|
|
509
510
|
}
|
|
510
|
-
function
|
|
511
|
+
function Je(e6) {
|
|
511
512
|
return e6.headers?.get(`X-Wix-Consistent`) ?? e6.headers?.get(`x-wix-consistent`);
|
|
512
513
|
}
|
|
513
|
-
var
|
|
514
|
-
var
|
|
515
|
-
var
|
|
516
|
-
var
|
|
517
|
-
var
|
|
518
|
-
function
|
|
514
|
+
var Ye = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
|
|
515
|
+
var Xe = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
516
|
+
var Ze = `items`;
|
|
517
|
+
var Qe = `pagingMetadata`;
|
|
518
|
+
var $e = Ye;
|
|
519
|
+
function et(e6, t2) {
|
|
519
520
|
return e6?.split(`.`).map((e7) => t2?.[e7] ?? e7).join(`.`);
|
|
520
521
|
}
|
|
521
|
-
var
|
|
522
|
-
function tt(e6, t2, n2) {
|
|
523
|
-
return (e6 === et || e6.endsWith(`.${et}`)) && typeof t2 == `string` ? $e(t2, n2) : t2;
|
|
524
|
-
}
|
|
522
|
+
var tt = `sort.fieldName`;
|
|
525
523
|
function nt(e6, t2, n2) {
|
|
524
|
+
return (e6 === tt || e6.endsWith(`.${tt}`)) && typeof t2 == `string` ? et(t2, n2) : t2;
|
|
525
|
+
}
|
|
526
|
+
function rt(e6, t2, n2) {
|
|
526
527
|
let r2 = (e7) => n2.includes(e7), i2 = (e7, n3) => {
|
|
527
528
|
if (Array.isArray(e7)) e7.forEach((e8) => {
|
|
528
529
|
i2(e8, n3);
|
|
@@ -532,157 +533,157 @@ function nt(e6, t2, n2) {
|
|
|
532
533
|
Object.keys(a2).forEach((e8) => {
|
|
533
534
|
let o2 = n3 === `` ? e8 : `${n3}.${e8}`;
|
|
534
535
|
if (r2(o2)) return;
|
|
535
|
-
let s2 =
|
|
536
|
-
s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] =
|
|
536
|
+
let s2 = it(e8, t2);
|
|
537
|
+
s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] = nt(o2, a2[s2], t2), i2(a2[s2], o2);
|
|
537
538
|
});
|
|
538
539
|
}
|
|
539
540
|
};
|
|
540
541
|
return i2(e6, ``), e6;
|
|
541
542
|
}
|
|
542
|
-
function
|
|
543
|
+
function it(e6, t2) {
|
|
543
544
|
let n2;
|
|
544
545
|
return n2 = e6.includes(`.`) ? e6.split(`.`).map((e7) => t2[e7] ?? e7).join(`.`) : t2[e6] ?? e6, n2;
|
|
545
546
|
}
|
|
546
547
|
function D(e6, t2 = []) {
|
|
547
|
-
return
|
|
548
|
+
return rt(e6, Ye, t2);
|
|
548
549
|
}
|
|
549
550
|
function O(e6, t2 = []) {
|
|
550
|
-
return
|
|
551
|
+
return rt(e6, Xe, t2);
|
|
551
552
|
}
|
|
552
553
|
function k(e6) {
|
|
553
554
|
return e6 ? new Date(e6) : void 0;
|
|
554
555
|
}
|
|
555
|
-
var
|
|
556
|
-
function
|
|
556
|
+
var at = /* @__PURE__ */ new WeakMap();
|
|
557
|
+
function ot() {
|
|
557
558
|
return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
|
|
558
559
|
}
|
|
559
|
-
function
|
|
560
|
+
function st(e6, t2) {
|
|
560
561
|
let n2 = e6.get(t2);
|
|
561
|
-
return n2 || (n2 =
|
|
562
|
+
return n2 || (n2 = ot(), e6.set(t2, n2)), n2;
|
|
562
563
|
}
|
|
563
|
-
function
|
|
564
|
-
return t2 === `*` ? (e6.anyField ??=
|
|
564
|
+
function ct(e6, t2) {
|
|
565
|
+
return t2 === `*` ? (e6.anyField ??= ot(), e6.anyField) : t2.endsWith(`{}`) ? (e6.mapFields ??= /* @__PURE__ */ new Map(), st(e6.mapFields, t2.slice(0, -2))) : (e6.fields ??= /* @__PURE__ */ new Map(), st(e6.fields, t2));
|
|
565
566
|
}
|
|
566
|
-
function
|
|
567
|
-
let t2 =
|
|
567
|
+
function lt(e6) {
|
|
568
|
+
let t2 = ot();
|
|
568
569
|
for (let n2 of e6) {
|
|
569
|
-
let e7 = n2.path.split(`.`).reduce(
|
|
570
|
+
let e7 = n2.path.split(`.`).reduce(ct, t2);
|
|
570
571
|
e7.leaves ??= [], e7.leaves.push(n2);
|
|
571
572
|
}
|
|
572
573
|
return t2;
|
|
573
574
|
}
|
|
574
|
-
function lt(e6) {
|
|
575
|
-
let t2 = it.get(e6);
|
|
576
|
-
return t2 || (t2 = ct(e6), it.set(e6, t2)), t2;
|
|
577
|
-
}
|
|
578
575
|
function ut(e6) {
|
|
579
|
-
|
|
576
|
+
let t2 = at.get(e6);
|
|
577
|
+
return t2 || (t2 = lt(e6), at.set(e6, t2)), t2;
|
|
580
578
|
}
|
|
581
|
-
function dt(e6
|
|
582
|
-
return
|
|
579
|
+
function dt(e6) {
|
|
580
|
+
return typeof e6 == `object` && !!e6;
|
|
583
581
|
}
|
|
584
|
-
function ft(e6, t2, n2) {
|
|
585
|
-
|
|
582
|
+
function ft(e6, { isRepeated: t2, isMap: n2 }, r2) {
|
|
583
|
+
return t2 ? Array.isArray(e6) ? e6.map(r2) : e6 : n2 ? dt(e6) ? Object.fromEntries(Object.entries(e6).map(([e7, t3]) => [e7, r2(t3)])) : e6 : r2(e6);
|
|
586
584
|
}
|
|
587
585
|
function pt(e6, t2, n2) {
|
|
586
|
+
dt(e6) && gt(e6, t2, n2);
|
|
587
|
+
}
|
|
588
|
+
function mt(e6, t2, n2) {
|
|
588
589
|
for (let [r2, i2] of t2) {
|
|
589
590
|
if (!(r2 in e6)) continue;
|
|
590
|
-
if (i2.leaves) for (let t4 of i2.leaves) e6[r2] =
|
|
591
|
+
if (i2.leaves) for (let t4 of i2.leaves) e6[r2] = ft(e6[r2], t4, n2);
|
|
591
592
|
let t3 = e6[r2];
|
|
592
|
-
Array.isArray(t3) ? t3.forEach((e7) =>
|
|
593
|
+
Array.isArray(t3) ? t3.forEach((e7) => pt(e7, i2, n2)) : pt(t3, i2, n2);
|
|
593
594
|
}
|
|
594
595
|
}
|
|
595
|
-
function
|
|
596
|
+
function ht(e6, t2, n2) {
|
|
596
597
|
for (let [r2, i2] of t2) {
|
|
597
598
|
let t3 = e6[r2];
|
|
598
|
-
|
|
599
|
+
dt(t3) && Object.values(t3).forEach((e7) => pt(e7, i2, n2));
|
|
599
600
|
}
|
|
600
601
|
}
|
|
601
|
-
function
|
|
602
|
-
t2 &&
|
|
602
|
+
function gt(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
|
|
603
|
+
t2 && mt(e6, t2, i2), n2 && ht(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => pt(e7, r2, i2));
|
|
603
604
|
}
|
|
604
605
|
function A(e6, t2) {
|
|
605
|
-
if (!
|
|
606
|
-
for (let { paths: n2, transformFn: r2 } of t2)
|
|
606
|
+
if (!dt(e6)) return e6;
|
|
607
|
+
for (let { paths: n2, transformFn: r2 } of t2) gt(e6, ut(n2), r2);
|
|
607
608
|
return e6;
|
|
608
609
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
610
|
+
function _t(e6) {
|
|
611
|
+
return St(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
|
|
611
612
|
}
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var
|
|
615
|
-
var
|
|
616
|
-
function
|
|
613
|
+
var vt = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
614
|
+
var yt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
615
|
+
var bt = `$1\0$2`;
|
|
616
|
+
var xt = /[^\p{L}\d]+/giu;
|
|
617
|
+
function St(e6) {
|
|
617
618
|
let t2 = e6.trim();
|
|
618
|
-
t2 = t2.replace(
|
|
619
|
+
t2 = t2.replace(vt, bt).replace(yt, bt), t2 = t2.replace(xt, `\0`);
|
|
619
620
|
let n2 = 0, r2 = t2.length;
|
|
620
621
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
621
622
|
if (n2 === r2) return [];
|
|
622
623
|
for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
|
|
623
624
|
return t2.slice(n2, r2).split(/\0/g);
|
|
624
625
|
}
|
|
625
|
-
var
|
|
626
|
-
var
|
|
627
|
-
var
|
|
626
|
+
var Ct = (e6) => `validationError` in (e6.response?.data?.details ?? {});
|
|
627
|
+
var wt = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
|
|
628
|
+
var Tt = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
|
|
628
629
|
function j(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
629
630
|
if (typeof e6 != `object` || !e6) throw e6;
|
|
630
|
-
if (
|
|
631
|
-
if (
|
|
632
|
-
if (
|
|
633
|
-
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code:
|
|
634
|
-
return
|
|
631
|
+
if (Ct(e6)) return Et(e6, t2, n2);
|
|
632
|
+
if (wt(e6)) return Ot(e6);
|
|
633
|
+
if (Tt(e6)) {
|
|
634
|
+
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: _t(n3), data: {} }, requestId: e6.requestId };
|
|
635
|
+
return Dt(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
635
636
|
}
|
|
636
|
-
return
|
|
637
|
+
return kt(e6);
|
|
637
638
|
}
|
|
638
|
-
var
|
|
639
|
-
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 =
|
|
640
|
-
return
|
|
639
|
+
var Et = (e6, t2, n2) => {
|
|
640
|
+
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = At(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 };
|
|
641
|
+
return Dt(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
|
|
641
642
|
};
|
|
642
|
-
var
|
|
643
|
-
var
|
|
644
|
-
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 ??
|
|
645
|
-
return
|
|
643
|
+
var Dt = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
|
|
644
|
+
var Ot = (e6) => {
|
|
645
|
+
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 ?? _t(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 };
|
|
646
|
+
return Dt(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
|
|
646
647
|
};
|
|
647
|
-
var
|
|
648
|
-
var
|
|
648
|
+
var kt = (e6) => Dt(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: _t(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
|
|
649
|
+
var At = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
649
650
|
let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
|
|
650
651
|
return r2?.filter((e7) => !r2.some((t3) => t3.field.length > e7.field.length && t3.field.startsWith(e7.field) && o2.includes(t3.field))).map((e7) => {
|
|
651
652
|
let r3 = t2[e7.field];
|
|
652
|
-
if (r3) return { ...e7, field:
|
|
653
|
+
if (r3) return { ...e7, field: jt(r3, i2) };
|
|
653
654
|
let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
|
|
654
655
|
if (s2) {
|
|
655
656
|
let t3 = a2[s2];
|
|
656
|
-
if (t3) return { ...e7, field: e7.field.replace(s2,
|
|
657
|
+
if (t3) return { ...e7, field: e7.field.replace(s2, jt(t3, i2)) };
|
|
657
658
|
}
|
|
658
659
|
return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
|
|
659
660
|
});
|
|
660
661
|
};
|
|
661
|
-
var
|
|
662
|
-
let n2 =
|
|
662
|
+
var jt = (e6, t2) => {
|
|
663
|
+
let n2 = Mt(e6);
|
|
663
664
|
return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
|
|
664
665
|
};
|
|
665
|
-
var
|
|
666
|
+
var Mt = (e6) => {
|
|
666
667
|
let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
|
|
667
668
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
668
669
|
};
|
|
669
|
-
function
|
|
670
|
+
function Nt() {
|
|
670
671
|
let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
671
672
|
if (e6) return { initWixModules(t3, n3) {
|
|
672
|
-
return
|
|
673
|
+
return Pt(() => e6(t3, n3));
|
|
673
674
|
}, fetchWithAuth() {
|
|
674
675
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
675
676
|
}, graphql() {
|
|
676
677
|
throw Error(`graphql is not available in this context`);
|
|
677
678
|
} };
|
|
678
|
-
let t2 = typeof $wixContext < `u` ? $wixContext.client :
|
|
679
|
+
let t2 = typeof $wixContext < `u` ? $wixContext.client : v.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : v.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : v.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : v.elevatedClient;
|
|
679
680
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
680
681
|
if (r2) {
|
|
681
682
|
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`);
|
|
682
|
-
return
|
|
683
|
+
return Pt(() => n2.use(e7));
|
|
683
684
|
}
|
|
684
685
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
685
|
-
return
|
|
686
|
+
return Pt(() => t2.use(e7));
|
|
686
687
|
}, fetchWithAuth: (e7, n3) => {
|
|
687
688
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
688
689
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -694,110 +695,110 @@ function Mt() {
|
|
|
694
695
|
return t2.graphql(e7, n3, r2);
|
|
695
696
|
} };
|
|
696
697
|
}
|
|
697
|
-
function
|
|
698
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
699
|
-
globalThis.__wix_context__ = void 0,
|
|
698
|
+
function Pt(e6) {
|
|
699
|
+
let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
|
|
700
|
+
globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
700
701
|
try {
|
|
701
702
|
return e6();
|
|
702
703
|
} finally {
|
|
703
|
-
globalThis.__wix_context__ = t2,
|
|
704
|
+
globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
704
705
|
}
|
|
705
706
|
}
|
|
706
|
-
function
|
|
707
|
+
function Ft(e6, t2) {
|
|
707
708
|
return (...n2) => {
|
|
708
|
-
let r2 =
|
|
709
|
+
let r2 = Nt();
|
|
709
710
|
return r2 ? r2.initWixModules(e6, t2).apply(void 0, n2) : e6.apply(void 0, n2);
|
|
710
711
|
};
|
|
711
712
|
}
|
|
712
713
|
function M(e6, t2 = false) {
|
|
713
|
-
return
|
|
714
|
+
return Ft(e6, t2);
|
|
714
715
|
}
|
|
715
|
-
function
|
|
716
|
-
let n2 =
|
|
717
|
-
return t2 && r2 ? new URLSearchParams({ ".r":
|
|
716
|
+
function It(e6, t2) {
|
|
717
|
+
let n2 = Rt(e6), r2 = Object.entries(n2).some(([e7, t3]) => e7.includes(`.`) || Array.isArray(t3) && t3.some((e8) => typeof e8 == `object`));
|
|
718
|
+
return t2 && r2 ? new URLSearchParams({ ".r": Bt(JSON.stringify(e6)) }) : Object.entries(n2).reduce((e7, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
|
|
718
719
|
r3 == null || Array.isArray(n3) && typeof r3 == `object` || e7.append(t3, r3);
|
|
719
720
|
}), e7), new URLSearchParams());
|
|
720
721
|
}
|
|
721
|
-
function
|
|
722
|
-
let t2 =
|
|
723
|
-
return
|
|
722
|
+
function Lt(e6) {
|
|
723
|
+
let t2 = $t(Zt(e6.host), e6.domainToMappings);
|
|
724
|
+
return ln(on(e6.protoPath, e6.data || {}), t2);
|
|
724
725
|
}
|
|
725
|
-
function
|
|
726
|
+
function Rt(e6, t2 = ``) {
|
|
726
727
|
let n2 = {};
|
|
727
728
|
return Object.entries(e6).forEach(([e7, r2]) => {
|
|
728
|
-
let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 =
|
|
729
|
+
let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = zt(t2, e7);
|
|
729
730
|
if (i2) {
|
|
730
|
-
let e8 =
|
|
731
|
+
let e8 = Rt(r2, a2);
|
|
731
732
|
Object.assign(n2, e8);
|
|
732
733
|
} else n2[a2] = r2;
|
|
733
734
|
}), n2;
|
|
734
735
|
}
|
|
735
|
-
function
|
|
736
|
+
function zt(e6, t2) {
|
|
736
737
|
return `${e6}${e6 ? `.` : ``}${t2}`;
|
|
737
738
|
}
|
|
738
|
-
var
|
|
739
|
+
var Bt = (e6) => {
|
|
739
740
|
let t2 = new TextEncoder().encode(e6);
|
|
740
741
|
return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e6, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
|
|
741
742
|
};
|
|
742
|
-
var
|
|
743
|
-
var
|
|
744
|
-
var
|
|
745
|
-
var
|
|
746
|
-
var
|
|
747
|
-
var
|
|
748
|
-
var
|
|
749
|
-
var
|
|
750
|
-
var
|
|
751
|
-
var
|
|
752
|
-
function Xt(e6) {
|
|
753
|
-
return Zt(e6).replace(Ut, `._base_domain_`).replace(Jt, `._api_base_domain_`).replace(Yt, `*.dev.wix-code.com`);
|
|
754
|
-
}
|
|
743
|
+
var Vt = [`wix.com`, `editorx.com`];
|
|
744
|
+
var Ht = `_`;
|
|
745
|
+
var Ut = `*.`;
|
|
746
|
+
var Wt = RegExp(`\\.(${Vt.join(`|`)})$`);
|
|
747
|
+
var Gt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
|
|
748
|
+
var Kt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
|
|
749
|
+
var qt = `dev.wix-code.com`;
|
|
750
|
+
var Jt = /{(.*)}/;
|
|
751
|
+
var Yt = RegExp(`\\.(${Gt.join(`|`)})$`);
|
|
752
|
+
var Xt = RegExp(`.*\\.${qt}$`);
|
|
755
753
|
function Zt(e6) {
|
|
756
|
-
return
|
|
754
|
+
return Qt(e6).replace(Wt, `._base_domain_`).replace(Yt, `._api_base_domain_`).replace(Xt, `*.dev.wix-code.com`);
|
|
755
|
+
}
|
|
756
|
+
function Qt(e6) {
|
|
757
|
+
return Kt[e6] ?? e6;
|
|
757
758
|
}
|
|
758
|
-
function
|
|
759
|
+
function $t(e6, t2) {
|
|
759
760
|
let n2 = t2[e6];
|
|
760
761
|
if (n2) return n2;
|
|
761
|
-
let r2 =
|
|
762
|
+
let r2 = en(e6, t2) ?? tn(e6, t2);
|
|
762
763
|
if (!r2) {
|
|
763
|
-
if (
|
|
764
|
-
let e7 = t2[
|
|
764
|
+
if (rn(e6)) {
|
|
765
|
+
let e7 = t2[an];
|
|
765
766
|
if (e7) return e7;
|
|
766
767
|
}
|
|
767
|
-
let n3 = t2[
|
|
768
|
+
let n3 = t2[Ht];
|
|
768
769
|
if (n3) return n3;
|
|
769
770
|
}
|
|
770
771
|
return r2 ?? [];
|
|
771
772
|
}
|
|
772
|
-
function
|
|
773
|
+
function en(e6, t2) {
|
|
773
774
|
return Object.entries(t2).find(([t3]) => {
|
|
774
775
|
let [, ...n2] = e6.split(`.`);
|
|
775
776
|
return n2.join(`.`) === t3;
|
|
776
777
|
})?.[1];
|
|
777
778
|
}
|
|
778
|
-
function
|
|
779
|
-
let [n2] = Object.entries(t2).filter(([t3]) =>
|
|
779
|
+
function tn(e6, t2) {
|
|
780
|
+
let [n2] = Object.entries(t2).filter(([t3]) => nn(e6, t3)).sort(([e7], [t3]) => t3.length - e7.length);
|
|
780
781
|
if (!n2) return;
|
|
781
782
|
let [, r2] = n2;
|
|
782
783
|
return r2;
|
|
783
784
|
}
|
|
784
|
-
function
|
|
785
|
-
if (!t2.startsWith(
|
|
785
|
+
function nn(e6, t2) {
|
|
786
|
+
if (!t2.startsWith(Ut)) return false;
|
|
786
787
|
let n2 = t2.slice(1);
|
|
787
788
|
return e6.length > n2.length && e6.endsWith(n2);
|
|
788
789
|
}
|
|
789
|
-
function
|
|
790
|
+
function rn(e6) {
|
|
790
791
|
return !!e6.match(/\._base_domain_$/);
|
|
791
792
|
}
|
|
792
|
-
var
|
|
793
|
-
function an(e6, t2) {
|
|
794
|
-
return e6.split(`/`).map((e7) => on(e7, t2)).join(`/`);
|
|
795
|
-
}
|
|
793
|
+
var an = `www._base_domain_`;
|
|
796
794
|
function on(e6, t2) {
|
|
797
|
-
|
|
798
|
-
return r2 ? sn(t2, r2, e6, e6.replace(n2[0], ``)) : e6;
|
|
795
|
+
return e6.split(`/`).map((e7) => sn(e7, t2)).join(`/`);
|
|
799
796
|
}
|
|
800
|
-
function sn(e6, t2
|
|
797
|
+
function sn(e6, t2) {
|
|
798
|
+
let n2 = e6.match(Jt) || [], r2 = n2[1];
|
|
799
|
+
return r2 ? cn(t2, r2, e6, e6.replace(n2[0], ``)) : e6;
|
|
800
|
+
}
|
|
801
|
+
function cn(e6, t2, n2, r2) {
|
|
801
802
|
let i2 = e6;
|
|
802
803
|
for (let e7 of t2.split(`.`)) {
|
|
803
804
|
if (!i2) return n2;
|
|
@@ -805,28 +806,28 @@ function sn(e6, t2, n2, r2) {
|
|
|
805
806
|
}
|
|
806
807
|
return `${i2}${r2}`;
|
|
807
808
|
}
|
|
808
|
-
function
|
|
809
|
+
function ln(e6, t2) {
|
|
809
810
|
let n2 = t2?.find((t3) => e6.startsWith(t3.destPath));
|
|
810
811
|
return n2 ? n2.srcPath + e6.slice(n2.destPath.length) : e6;
|
|
811
812
|
}
|
|
812
|
-
function
|
|
813
|
+
function un(e6) {
|
|
813
814
|
return isFinite(e6) ? e6 : e6.toString();
|
|
814
815
|
}
|
|
815
|
-
function
|
|
816
|
+
function dn(e6) {
|
|
816
817
|
return e6 === `NaN` ? NaN : e6 === `Infinity` ? 1 / 0 : e6 === `-Infinity` ? -1 / 0 : e6;
|
|
817
818
|
}
|
|
818
|
-
function
|
|
819
|
+
function fn(e6) {
|
|
819
820
|
return Uint8Array.from(atob(e6), (e7) => e7.charCodeAt(0));
|
|
820
821
|
}
|
|
821
|
-
var
|
|
822
|
-
var
|
|
822
|
+
var pn = `modulepreload`;
|
|
823
|
+
var mn = function(e6, t2) {
|
|
823
824
|
return new URL(e6, t2).href;
|
|
824
825
|
};
|
|
825
|
-
var
|
|
826
|
-
var
|
|
826
|
+
var hn = {};
|
|
827
|
+
var gn = function(e6) {
|
|
827
828
|
return e6.pathname.endsWith(`.css`);
|
|
828
829
|
};
|
|
829
|
-
var
|
|
830
|
+
var _n = function(e6, t2, n2) {
|
|
830
831
|
if (t2 in e6) return e6[t2];
|
|
831
832
|
let r2 = n2();
|
|
832
833
|
if (!r2) {
|
|
@@ -840,7 +841,7 @@ var hn = function(e6, t2, n2) {
|
|
|
840
841
|
});
|
|
841
842
|
return e6[t2] = i2, i2;
|
|
842
843
|
};
|
|
843
|
-
var
|
|
844
|
+
var vn = function(e6, t2, n2) {
|
|
844
845
|
let r2 = Promise.resolve();
|
|
845
846
|
if (t2 && t2.length > 0) {
|
|
846
847
|
let o3 = function(e8) {
|
|
@@ -851,9 +852,9 @@ var gn = function(e6, t2, n2) {
|
|
|
851
852
|
var o2 = o3, s2 = s3;
|
|
852
853
|
let e7, i3 = document.querySelector(`meta[property=csp-nonce]`), a2 = i3?.nonce || i3?.getAttribute(`nonce`);
|
|
853
854
|
r2 = o3(t2.map((t3) => {
|
|
854
|
-
t3 =
|
|
855
|
-
let r3 = s3(t3), i4 =
|
|
856
|
-
return hn
|
|
855
|
+
t3 = mn(t3, n2);
|
|
856
|
+
let r3 = s3(t3), i4 = gn(r3);
|
|
857
|
+
return _n(hn, r3.href, () => {
|
|
857
858
|
if (e7 === void 0) {
|
|
858
859
|
e7 = { all: /* @__PURE__ */ new Set(), styles: /* @__PURE__ */ new Set() };
|
|
859
860
|
let t5 = document.getElementsByTagName(`link`);
|
|
@@ -864,7 +865,7 @@ var gn = function(e6, t2, n2) {
|
|
|
864
865
|
}
|
|
865
866
|
if ((i4 ? e7.styles : e7.all).has(r3.href)) return;
|
|
866
867
|
let t4 = document.createElement(`link`);
|
|
867
|
-
if (t4.rel = i4 ? `stylesheet` :
|
|
868
|
+
if (t4.rel = i4 ? `stylesheet` : pn, 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) => {
|
|
868
869
|
t4.addEventListener(`load`, e8), t4.addEventListener(`error`, () => n3(Error(`Unable to preload CSS for ${r3}`)));
|
|
869
870
|
});
|
|
870
871
|
});
|
|
@@ -879,30 +880,30 @@ var gn = function(e6, t2, n2) {
|
|
|
879
880
|
return e6().catch(i2);
|
|
880
881
|
});
|
|
881
882
|
};
|
|
882
|
-
var
|
|
883
|
-
var
|
|
884
|
-
var
|
|
885
|
-
var
|
|
886
|
-
let e6 =
|
|
887
|
-
if (e6) return { [
|
|
883
|
+
var yn = `x-wix-linguist`;
|
|
884
|
+
var bn = `00000000-0000-0000-0000-000000000000`;
|
|
885
|
+
var xn = `false`;
|
|
886
|
+
var Sn = () => {
|
|
887
|
+
let e6 = Tn(`language`), t2 = Tn(`locale`);
|
|
888
|
+
if (e6) return { [yn]: [e6, t2 || e6, xn, bn].join(`|`) };
|
|
888
889
|
};
|
|
889
|
-
function
|
|
890
|
+
function Cn() {
|
|
890
891
|
let e6 = null, t2 = null;
|
|
891
892
|
return { promise: new Promise((n2, r2) => {
|
|
892
893
|
e6 = n2, t2 = r2;
|
|
893
894
|
}), resolve: e6, reject: t2 };
|
|
894
895
|
}
|
|
895
|
-
var
|
|
896
|
-
var
|
|
897
|
-
var
|
|
898
|
-
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 =
|
|
899
|
-
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language:
|
|
900
|
-
return
|
|
896
|
+
var wn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
|
|
897
|
+
var Tn = (e6) => wn()?.[e6];
|
|
898
|
+
var En = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
|
|
899
|
+
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = On();
|
|
900
|
+
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: Tn(`language`), locale: Tn(`locale`), get passThroughHeaders() {
|
|
901
|
+
return Sn();
|
|
901
902
|
} } };
|
|
902
903
|
}, auth: (e7) => {
|
|
903
904
|
let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
|
|
904
|
-
!e7 &&
|
|
905
|
-
let n2 = false, { resolve: r2, promise: i2 } =
|
|
905
|
+
!e7 && Dn() && (e7 = t2?.getAccessTokenFunction?.());
|
|
906
|
+
let n2 = false, { resolve: r2, promise: i2 } = Cn();
|
|
906
907
|
return { getAuthHeaders: async () => {
|
|
907
908
|
if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
|
|
908
909
|
return { headers: { Authorization: await e7() } };
|
|
@@ -910,50 +911,50 @@ var wn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host:
|
|
|
910
911
|
r2(e8);
|
|
911
912
|
}) };
|
|
912
913
|
} });
|
|
913
|
-
function
|
|
914
|
+
function Dn() {
|
|
914
915
|
return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
|
|
915
916
|
}
|
|
916
|
-
function
|
|
917
|
+
function On() {
|
|
917
918
|
let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
|
|
918
919
|
if (!e6) return;
|
|
919
920
|
let t2 = new URL(e6);
|
|
920
921
|
return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
|
|
921
922
|
}
|
|
922
|
-
var
|
|
923
|
+
var kn = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
|
|
923
924
|
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`);
|
|
924
925
|
return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
|
|
925
926
|
}, getAccessToken: () => {
|
|
926
927
|
throw Error(`Not implemented`);
|
|
927
928
|
}, observeState: () => ({ disconnect: () => {
|
|
928
929
|
} }) });
|
|
929
|
-
var
|
|
930
|
+
var An = En({ createHost: function(e6) {
|
|
930
931
|
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
|
|
931
932
|
if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
|
|
932
|
-
return { channel:
|
|
933
|
+
return { channel: kn({ clientSdk: t2, applicationId: n2 }), close: () => {
|
|
933
934
|
} };
|
|
934
935
|
} });
|
|
935
|
-
var
|
|
936
|
-
let n2 =
|
|
937
|
-
return
|
|
936
|
+
var jn = (e6, t2) => {
|
|
937
|
+
let n2 = An.host({ applicationId: e6, componentId: t2 }), r2 = An.auth();
|
|
938
|
+
return qe({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
938
939
|
};
|
|
939
|
-
var
|
|
940
|
-
function
|
|
940
|
+
var Mn = (e6) => jn(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
|
|
941
|
+
function Nn() {
|
|
941
942
|
let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
942
943
|
if (e6) return { initWixModules(t3, n3) {
|
|
943
|
-
return
|
|
944
|
+
return Pn(() => e6(t3, n3));
|
|
944
945
|
}, fetchWithAuth() {
|
|
945
946
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
946
947
|
}, graphql() {
|
|
947
948
|
throw Error(`graphql is not available in this context`);
|
|
948
949
|
} };
|
|
949
|
-
let t2 = typeof $wixContext < `u` ? $wixContext.client :
|
|
950
|
+
let t2 = typeof $wixContext < `u` ? $wixContext.client : v.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : v.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : v.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : v.elevatedClient;
|
|
950
951
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
951
952
|
if (r2) {
|
|
952
953
|
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`);
|
|
953
|
-
return
|
|
954
|
+
return Pn(() => n2.use(e7));
|
|
954
955
|
}
|
|
955
956
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
956
|
-
return
|
|
957
|
+
return Pn(() => t2.use(e7));
|
|
957
958
|
}, fetchWithAuth: (e7, n3) => {
|
|
958
959
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
959
960
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -965,26 +966,26 @@ function jn() {
|
|
|
965
966
|
return t2.graphql(e7, n3, r2);
|
|
966
967
|
} };
|
|
967
968
|
}
|
|
968
|
-
function
|
|
969
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
970
|
-
globalThis.__wix_context__ = void 0,
|
|
969
|
+
function Pn(e6) {
|
|
970
|
+
let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
|
|
971
|
+
globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
971
972
|
try {
|
|
972
973
|
return e6();
|
|
973
974
|
} finally {
|
|
974
|
-
globalThis.__wix_context__ = t2,
|
|
975
|
+
globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
975
976
|
}
|
|
976
977
|
}
|
|
977
|
-
function
|
|
978
|
+
function Fn(e6, t2) {
|
|
978
979
|
return { ...e6, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
|
|
979
|
-
let r2 =
|
|
980
|
+
let r2 = Nn();
|
|
980
981
|
if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
981
982
|
return r2.initWixModules(e6)[t3].apply(void 0, n2);
|
|
982
983
|
}])) };
|
|
983
984
|
}
|
|
984
|
-
function
|
|
985
|
-
return
|
|
985
|
+
function In(e6) {
|
|
986
|
+
return Fn({ __type: `host`, create: (t2) => Object.entries(e6).reduce((e7, [n2, r2]) => ({ ...e7, [n2]: r2(t2) }), {}) }, Object.keys(e6));
|
|
986
987
|
}
|
|
987
|
-
var
|
|
988
|
+
var Ln = class {
|
|
988
989
|
constructor(e6) {
|
|
989
990
|
this.message = e6, this.captureException = () => {
|
|
990
991
|
console.error(this.message);
|
|
@@ -999,13 +1000,13 @@ var Fn = class {
|
|
|
999
1000
|
};
|
|
1000
1001
|
}
|
|
1001
1002
|
};
|
|
1002
|
-
var
|
|
1003
|
-
var
|
|
1004
|
-
function
|
|
1003
|
+
var Rn = (e6) => new Ln(e6);
|
|
1004
|
+
var zn = In({ getMonitoringClient: (e6) => () => e6.getMonitoringClient ? e6.getMonitoringClient() : Rn(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
|
|
1005
|
+
function Bn(e6) {
|
|
1005
1006
|
let t2 = Promise.resolve(e6);
|
|
1006
1007
|
return t2.status = `fulfilled`, t2.value = e6, t2;
|
|
1007
1008
|
}
|
|
1008
|
-
function
|
|
1009
|
+
function Vn(e6) {
|
|
1009
1010
|
if (e6.status === `fulfilled`) return e6.value;
|
|
1010
1011
|
throw e6.status === `rejected` ? e6.reason : (e6.status === `pending` || (e6.status = `pending`, e6.then((t2) => {
|
|
1011
1012
|
e6.status = `fulfilled`, e6.value = t2;
|
|
@@ -1013,17 +1014,17 @@ function zn(e6) {
|
|
|
1013
1014
|
e6.status = `rejected`, e6.reason = t2;
|
|
1014
1015
|
})), e6);
|
|
1015
1016
|
}
|
|
1016
|
-
var
|
|
1017
|
-
function
|
|
1018
|
-
let r2 =
|
|
1019
|
-
r2 || (r2 = /* @__PURE__ */ new WeakMap(),
|
|
1017
|
+
var Hn = /* @__PURE__ */ new WeakMap();
|
|
1018
|
+
function Un(e6, t2, n2) {
|
|
1019
|
+
let r2 = Hn.get(e6);
|
|
1020
|
+
r2 || (r2 = /* @__PURE__ */ new WeakMap(), Hn.set(e6, r2));
|
|
1020
1021
|
let i2 = r2.get(t2);
|
|
1021
1022
|
i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
|
|
1022
1023
|
let a2 = i2.get(n2);
|
|
1023
1024
|
if (!a2) {
|
|
1024
|
-
if (e6.status === `fulfilled`) a2 =
|
|
1025
|
+
if (e6.status === `fulfilled`) a2 = Bn(t2(e6.value));
|
|
1025
1026
|
else if (e6.status === `rejected`) try {
|
|
1026
|
-
a2 =
|
|
1027
|
+
a2 = Bn(n2(e6.reason));
|
|
1027
1028
|
} catch {
|
|
1028
1029
|
a2 = e6.then(t2, n2);
|
|
1029
1030
|
}
|
|
@@ -1032,45 +1033,45 @@ function Vn(e6, t2, n2) {
|
|
|
1032
1033
|
}
|
|
1033
1034
|
return a2;
|
|
1034
1035
|
}
|
|
1035
|
-
var
|
|
1036
|
-
function
|
|
1036
|
+
var Wn = 1e4;
|
|
1037
|
+
function Gn(e6) {
|
|
1037
1038
|
let [t2, n2] = (0, import_react.useState)(void 0);
|
|
1038
1039
|
return (0, import_react.useEffect)(() => {
|
|
1039
1040
|
let t3 = Date.now();
|
|
1040
|
-
t3 - e6 >
|
|
1041
|
+
t3 - e6 > Wn && (0, import_react.startTransition)(() => n2(t3));
|
|
1041
1042
|
}, []), t2 ?? e6;
|
|
1042
1043
|
}
|
|
1043
|
-
function
|
|
1044
|
+
function N(e6) {
|
|
1044
1045
|
return e6;
|
|
1045
1046
|
}
|
|
1046
|
-
var
|
|
1047
|
-
var
|
|
1047
|
+
var Kn = N(`@wix/site-service-rendering-context`);
|
|
1048
|
+
var qn = () => {
|
|
1048
1049
|
try {
|
|
1049
|
-
return (0, import_services_manager_react.useService)(
|
|
1050
|
+
return (0, import_services_manager_react.useService)(Kn).SSR;
|
|
1050
1051
|
} catch {
|
|
1051
1052
|
return false;
|
|
1052
1053
|
}
|
|
1053
1054
|
};
|
|
1054
|
-
var
|
|
1055
|
-
function
|
|
1055
|
+
var Jn = (e6, t2) => e6.length === t2.length && e6.every((e7, n2) => Object.is(e7, t2[n2]));
|
|
1056
|
+
function Yn(e6, t2) {
|
|
1056
1057
|
let [n2, r2] = (0, import_react.useState)(() => ({ deps: t2, value: e6() }));
|
|
1057
1058
|
return (0, import_react.useEffect)(() => {
|
|
1058
|
-
if (
|
|
1059
|
+
if (Jn(n2.deps, t2)) return;
|
|
1059
1060
|
let a2 = e6();
|
|
1060
1061
|
(0, import_react.startTransition)(() => r2({ deps: t2, value: a2 }));
|
|
1061
1062
|
}, t2), n2.value;
|
|
1062
1063
|
}
|
|
1063
|
-
var
|
|
1064
|
-
var
|
|
1065
|
-
var
|
|
1066
|
-
var
|
|
1067
|
-
var
|
|
1068
|
-
var
|
|
1064
|
+
var Xn = N(`@wix/site-service-url`);
|
|
1065
|
+
var Zn = `14bcded7-0066-7c35-14d7-466cb3f09103`;
|
|
1066
|
+
var Qn = `post`;
|
|
1067
|
+
var $n = `builder-post`;
|
|
1068
|
+
var er = `__blog_unknown_section__`;
|
|
1069
|
+
var tr = (e6) => {
|
|
1069
1070
|
let t2;
|
|
1070
1071
|
try {
|
|
1071
|
-
let n3 = e6.appSectionRelativeUrl(
|
|
1072
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`,
|
|
1073
|
-
t2 = e6.appSectionRelativeUrl(
|
|
1072
|
+
let n3 = e6.appSectionRelativeUrl(Zn, $n);
|
|
1073
|
+
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, er) && !n3?.endsWith(`/post-page`)) return;
|
|
1074
|
+
t2 = e6.appSectionRelativeUrl(Zn, $n, true);
|
|
1074
1075
|
} catch {
|
|
1075
1076
|
return;
|
|
1076
1077
|
}
|
|
@@ -1078,12 +1079,12 @@ var $n = (e6) => {
|
|
|
1078
1079
|
let n2 = t2.split(`/`).filter(Boolean);
|
|
1079
1080
|
return n2[n2.length - 1] === `post-page` && n2.pop(), n2.length > 0 ? n2.join(`/`) : void 0;
|
|
1080
1081
|
};
|
|
1081
|
-
var
|
|
1082
|
-
var
|
|
1083
|
-
let t2 =
|
|
1084
|
-
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${
|
|
1082
|
+
var nr = (e6) => `${e6}/${Qn}`;
|
|
1083
|
+
var rr = (e6) => {
|
|
1084
|
+
let t2 = tr(e6);
|
|
1085
|
+
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${nr(t2)}`;
|
|
1085
1086
|
};
|
|
1086
|
-
var
|
|
1087
|
+
var ir = (e6, t2) => {
|
|
1087
1088
|
if (!e6 || !t2) return;
|
|
1088
1089
|
let n2;
|
|
1089
1090
|
try {
|
|
@@ -1097,14 +1098,14 @@ var nr = (e6, t2) => {
|
|
|
1097
1098
|
if (r2.endsWith(t3) && i2.endsWith(`/post`)) return `${n2.origin}${i2}`;
|
|
1098
1099
|
}
|
|
1099
1100
|
};
|
|
1100
|
-
var
|
|
1101
|
+
var ar = (e6) => {
|
|
1101
1102
|
if (!e6) return;
|
|
1102
1103
|
if (typeof e6 == `string`) return e6;
|
|
1103
1104
|
let { base: t2, path: n2 } = e6;
|
|
1104
1105
|
return t2 ? `${t2.replace(/\/+$/, ``)}${n2 ?? ``}` : void 0;
|
|
1105
1106
|
};
|
|
1106
|
-
var
|
|
1107
|
-
let n2 =
|
|
1107
|
+
var or = (e6, t2) => {
|
|
1108
|
+
let n2 = ar(e6.url), r2 = `/${Qn}`;
|
|
1108
1109
|
if (!n2 || !t2?.endsWith(r2)) return;
|
|
1109
1110
|
let i2, a2;
|
|
1110
1111
|
try {
|
|
@@ -1115,23 +1116,23 @@ var ir = (e6, t2) => {
|
|
|
1115
1116
|
let o2 = a2.slice(0, -r2.length);
|
|
1116
1117
|
return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
|
|
1117
1118
|
};
|
|
1118
|
-
var
|
|
1119
|
-
let n2 =
|
|
1119
|
+
var sr = (e6, t2) => {
|
|
1120
|
+
let n2 = or(e6, t2);
|
|
1120
1121
|
if (n2) return { href: n2, target: `_self` };
|
|
1121
1122
|
if (t2 && e6.slug) return { href: `${t2}/${encodeURIComponent(e6.slug)}`, target: `_self` };
|
|
1122
|
-
let r2 =
|
|
1123
|
+
let r2 = ar(e6.url);
|
|
1123
1124
|
return r2 ? { href: r2, target: `_self` } : void 0;
|
|
1124
1125
|
};
|
|
1125
|
-
var
|
|
1126
|
+
var cr = (e6) => {
|
|
1126
1127
|
let t2;
|
|
1127
1128
|
try {
|
|
1128
|
-
t2 = (0, import_services_manager_react.useService)(
|
|
1129
|
+
t2 = (0, import_services_manager_react.useService)(Xn);
|
|
1129
1130
|
} catch {
|
|
1130
1131
|
return;
|
|
1131
1132
|
}
|
|
1132
|
-
return
|
|
1133
|
+
return rr(t2) ?? ir(t2.currentUrl, e6);
|
|
1133
1134
|
};
|
|
1134
|
-
var
|
|
1135
|
+
var lr = (e6, t2) => {
|
|
1135
1136
|
let n2;
|
|
1136
1137
|
try {
|
|
1137
1138
|
n2 = new URL(e6).pathname.split(`/`).filter(Boolean);
|
|
@@ -1151,54 +1152,54 @@ var sr = (e6, t2) => {
|
|
|
1151
1152
|
return i2;
|
|
1152
1153
|
}
|
|
1153
1154
|
};
|
|
1154
|
-
var
|
|
1155
|
+
var ur = () => {
|
|
1155
1156
|
let e6;
|
|
1156
1157
|
try {
|
|
1157
|
-
e6 = (0, import_services_manager_react.useService)(
|
|
1158
|
+
e6 = (0, import_services_manager_react.useService)(Xn);
|
|
1158
1159
|
} catch {
|
|
1159
1160
|
return;
|
|
1160
1161
|
}
|
|
1161
1162
|
if (!e6.currentUrl) return;
|
|
1162
|
-
let t2 =
|
|
1163
|
-
return
|
|
1163
|
+
let t2 = tr(e6);
|
|
1164
|
+
return lr(e6.currentUrl, t2 && nr(t2));
|
|
1164
1165
|
};
|
|
1165
|
-
var
|
|
1166
|
-
var
|
|
1167
|
-
var
|
|
1166
|
+
var dr = { categoryHeader: `WixBlog.CategoryHeader`, coverMedia: `WixBlog.PostCoverMedia`, postActions: `WixBlog.PostActionBar`, postCategories: `WixBlog.PostCategoryList`, postCounters: `WixBlog.PostCounterBar`, postMetadata: `WixBlog.PostMetadataBar`, postTags: `WixBlog.PostTagList`, feedProvider: `WixBlog.BlogFeedContextProvider`, postBySlugProvider: `WixBlog.PostBySlugContextProvider`, postByIdProvider: `WixBlog.PostByIdContextProvider`, relatedPostsProvider: `WixBlog.RelatedPostsContextProvider` };
|
|
1167
|
+
var fr = (e6) => `${e6} rendered`;
|
|
1168
|
+
var pr = (e6, t2, n2) => {
|
|
1168
1169
|
(0, import_react.useEffect)(() => {
|
|
1169
1170
|
if (t2 !== `loading` && typeof performance < `u` && typeof performance.mark == `function`) try {
|
|
1170
|
-
performance.mark(
|
|
1171
|
+
performance.mark(fr(e6), { detail: { state: t2, compId: n2 } });
|
|
1171
1172
|
} catch {
|
|
1172
1173
|
}
|
|
1173
1174
|
}, [e6, t2, n2]);
|
|
1174
1175
|
};
|
|
1175
|
-
var
|
|
1176
|
-
var
|
|
1177
|
-
var
|
|
1176
|
+
var mr = N(`@wix/site-service-locale`);
|
|
1177
|
+
var hr = N(`@wix/site-service-renderer-configuration`);
|
|
1178
|
+
var gr = () => {
|
|
1178
1179
|
let e6, t2;
|
|
1179
1180
|
try {
|
|
1180
|
-
e6 = (0, import_services_manager_react.useService)(
|
|
1181
|
+
e6 = (0, import_services_manager_react.useService)(hr).languageCode;
|
|
1181
1182
|
} catch {
|
|
1182
1183
|
}
|
|
1183
1184
|
try {
|
|
1184
|
-
t2 = (0, import_services_manager_react.useService)(
|
|
1185
|
+
t2 = (0, import_services_manager_react.useService)(mr).language;
|
|
1185
1186
|
} catch {
|
|
1186
1187
|
}
|
|
1187
1188
|
return e6 || t2;
|
|
1188
1189
|
};
|
|
1189
|
-
var
|
|
1190
|
+
var _r = () => {
|
|
1190
1191
|
try {
|
|
1191
|
-
let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(
|
|
1192
|
+
let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(mr);
|
|
1192
1193
|
return e6 || t2;
|
|
1193
1194
|
} catch {
|
|
1194
1195
|
return;
|
|
1195
1196
|
}
|
|
1196
1197
|
};
|
|
1197
|
-
var
|
|
1198
|
-
function
|
|
1199
|
-
let e6 =
|
|
1198
|
+
var vr = N(`@wix/site-service-warmup-data`);
|
|
1199
|
+
function yr() {
|
|
1200
|
+
let e6 = qn(), t2 = null;
|
|
1200
1201
|
try {
|
|
1201
|
-
t2 = (0, import_services_manager_react.useGetService)()(
|
|
1202
|
+
t2 = (0, import_services_manager_react.useGetService)()(vr);
|
|
1202
1203
|
} catch {
|
|
1203
1204
|
}
|
|
1204
1205
|
return (0, import_react.useMemo)(() => ({ isServer: e6, scope: t2 ?? void 0, get: async (n2) => {
|
|
@@ -1215,13 +1216,13 @@ function _r() {
|
|
|
1215
1216
|
}
|
|
1216
1217
|
} }), [e6, t2]);
|
|
1217
1218
|
}
|
|
1218
|
-
var
|
|
1219
|
+
var br = () => {
|
|
1219
1220
|
let e6 = /* @__PURE__ */ new Map();
|
|
1220
1221
|
return { getOrInsert: (t2, n2) => (e6.has(t2) || e6.set(t2, n2().finally(() => {
|
|
1221
1222
|
e6.delete(t2);
|
|
1222
1223
|
})), e6.get(t2)) };
|
|
1223
1224
|
};
|
|
1224
|
-
var
|
|
1225
|
+
var xr = async (e6) => {
|
|
1225
1226
|
try {
|
|
1226
1227
|
let { default: t2 } = await e6();
|
|
1227
1228
|
return t2;
|
|
@@ -1229,9 +1230,9 @@ var yr = async (e6) => {
|
|
|
1229
1230
|
return;
|
|
1230
1231
|
}
|
|
1231
1232
|
};
|
|
1232
|
-
var
|
|
1233
|
-
let r2 =
|
|
1234
|
-
let [i3, a2] = await Promise.all([
|
|
1233
|
+
var Sr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
1234
|
+
let r2 = br(), i2 = async (r3) => {
|
|
1235
|
+
let [i3, a2] = await Promise.all([xr(() => t2(r3)), !e6 || !n2 ? void 0 : xr(() => n2(r3))]);
|
|
1235
1236
|
if (i3 && a2) return { ...i3, ...a2 };
|
|
1236
1237
|
if (i3) return i3;
|
|
1237
1238
|
if (a2) return a2;
|
|
@@ -1239,47 +1240,47 @@ var br = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
|
1239
1240
|
};
|
|
1240
1241
|
return (e7) => r2.getOrInsert(e7, () => i2(e7));
|
|
1241
1242
|
};
|
|
1242
|
-
var
|
|
1243
|
-
var
|
|
1243
|
+
var P = (e6) => typeof e6 == `string`;
|
|
1244
|
+
var F = () => {
|
|
1244
1245
|
let e6, t2, n2 = new Promise((n3, r2) => {
|
|
1245
1246
|
e6 = n3, t2 = r2;
|
|
1246
1247
|
});
|
|
1247
1248
|
return n2.resolve = e6, n2.reject = t2, n2;
|
|
1248
1249
|
};
|
|
1249
|
-
var
|
|
1250
|
-
var
|
|
1250
|
+
var Cr = (e6) => e6 == null ? `` : String(e6);
|
|
1251
|
+
var wr = (e6, t2, n2) => {
|
|
1251
1252
|
e6.forEach((e7) => {
|
|
1252
1253
|
t2[e7] && (n2[e7] = t2[e7]);
|
|
1253
1254
|
});
|
|
1254
1255
|
};
|
|
1255
|
-
var
|
|
1256
|
-
var
|
|
1257
|
-
var
|
|
1258
|
-
var
|
|
1259
|
-
let r2 =
|
|
1256
|
+
var Tr = /###/g;
|
|
1257
|
+
var Er = (e6) => e6 && e6.includes(`###`) ? e6.replace(Tr, `.`) : e6;
|
|
1258
|
+
var Dr = (e6) => !e6 || P(e6);
|
|
1259
|
+
var I = (e6, t2, n2) => {
|
|
1260
|
+
let r2 = P(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
1260
1261
|
for (; i2 < r2.length - 1; ) {
|
|
1261
|
-
if (
|
|
1262
|
-
let t3 =
|
|
1262
|
+
if (Dr(e6)) return {};
|
|
1263
|
+
let t3 = Er(r2[i2]);
|
|
1263
1264
|
!e6[t3] && n2 && (e6[t3] = new n2()), e6 = Object.prototype.hasOwnProperty.call(e6, t3) ? e6[t3] : {}, ++i2;
|
|
1264
1265
|
}
|
|
1265
|
-
return
|
|
1266
|
+
return Dr(e6) ? {} : { obj: e6, k: Er(r2[i2]) };
|
|
1266
1267
|
};
|
|
1267
1268
|
var Or = (e6, t2, n2) => {
|
|
1268
|
-
let { obj: r2, k: i2 } =
|
|
1269
|
+
let { obj: r2, k: i2 } = I(e6, t2, Object);
|
|
1269
1270
|
if (r2 !== void 0 || t2.length === 1) {
|
|
1270
1271
|
r2[i2] = n2;
|
|
1271
1272
|
return;
|
|
1272
1273
|
}
|
|
1273
|
-
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 =
|
|
1274
|
-
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 =
|
|
1274
|
+
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = I(e6, o2, Object);
|
|
1275
|
+
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = I(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
|
|
1275
1276
|
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
1276
1277
|
};
|
|
1277
1278
|
var kr = (e6, t2, n2, r2) => {
|
|
1278
|
-
let { obj: i2, k: a2 } =
|
|
1279
|
+
let { obj: i2, k: a2 } = I(e6, t2, Object);
|
|
1279
1280
|
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
1280
1281
|
};
|
|
1281
1282
|
var Ar = (e6, t2) => {
|
|
1282
|
-
let { obj: n2, k: r2 } =
|
|
1283
|
+
let { obj: n2, k: r2 } = I(e6, t2);
|
|
1283
1284
|
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
1284
1285
|
};
|
|
1285
1286
|
var jr = (e6, t2, n2) => {
|
|
@@ -1287,12 +1288,12 @@ var jr = (e6, t2, n2) => {
|
|
|
1287
1288
|
return r2 === void 0 ? Ar(t2, n2) : r2;
|
|
1288
1289
|
};
|
|
1289
1290
|
var Mr = (e6, t2, n2) => {
|
|
1290
|
-
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ?
|
|
1291
|
+
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? P(e6[r2]) || e6[r2] instanceof String || P(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : Mr(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
|
|
1291
1292
|
return e6;
|
|
1292
1293
|
};
|
|
1293
|
-
var
|
|
1294
|
+
var L = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
1294
1295
|
var Nr = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
1295
|
-
var Pr = (e6) =>
|
|
1296
|
+
var Pr = (e6) => P(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Nr[e7]) : e6;
|
|
1296
1297
|
var Fr = class {
|
|
1297
1298
|
constructor(e6) {
|
|
1298
1299
|
this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -1333,7 +1334,7 @@ var zr = (e6, t2, n2 = `.`) => {
|
|
|
1333
1334
|
}
|
|
1334
1335
|
return i2;
|
|
1335
1336
|
};
|
|
1336
|
-
var
|
|
1337
|
+
var R = (e6) => e6?.replace(/_/g, `-`);
|
|
1337
1338
|
var Br = { type: `logger`, log(e6) {
|
|
1338
1339
|
this.output(`log`, e6);
|
|
1339
1340
|
}, warn(e6) {
|
|
@@ -1343,7 +1344,7 @@ var Br = { type: `logger`, log(e6) {
|
|
|
1343
1344
|
}, output(e6, t2) {
|
|
1344
1345
|
console?.[e6]?.apply?.(console, t2);
|
|
1345
1346
|
} };
|
|
1346
|
-
var
|
|
1347
|
+
var z = new class e2 {
|
|
1347
1348
|
constructor(e6, t2 = {}) {
|
|
1348
1349
|
this.init(e6, t2);
|
|
1349
1350
|
}
|
|
@@ -1363,7 +1364,7 @@ var R = new class e2 {
|
|
|
1363
1364
|
return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
|
|
1364
1365
|
}
|
|
1365
1366
|
forward(e6, t2, n2, r2) {
|
|
1366
|
-
return r2 && !this.debug ? null : (e6 = e6.map((e7) =>
|
|
1367
|
+
return r2 && !this.debug ? null : (e6 = e6.map((e7) => P(e7) ? e7.replace(/[\r\n\x00-\x1F\x7F]/g, ` `) : e7), P(e6[0]) && (e6[0] = `${n2}${this.prefix} ${e6[0]}`), this.logger[t2](e6));
|
|
1367
1368
|
}
|
|
1368
1369
|
create(t2) {
|
|
1369
1370
|
return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
|
|
@@ -1414,16 +1415,16 @@ var Ur = class extends Vr {
|
|
|
1414
1415
|
}
|
|
1415
1416
|
getResource(e6, t2, n2, r2 = {}) {
|
|
1416
1417
|
let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
|
|
1417
|
-
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) :
|
|
1418
|
+
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : P(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
|
|
1418
1419
|
let s2 = Ar(this.data, o2);
|
|
1419
|
-
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !
|
|
1420
|
+
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !P(n2) ? s2 : zr(this.data?.[e6]?.[t2], n2, i2);
|
|
1420
1421
|
}
|
|
1421
1422
|
addResource(e6, t2, n2, r2, i2 = { silent: false }) {
|
|
1422
1423
|
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
|
|
1423
1424
|
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Or(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
|
|
1424
1425
|
}
|
|
1425
1426
|
addResources(e6, t2, n2, r2 = { silent: false }) {
|
|
1426
|
-
for (let r3 in n2) (
|
|
1427
|
+
for (let r3 in n2) (P(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
|
|
1427
1428
|
r2.silent || this.emit(`added`, e6, t2, n2);
|
|
1428
1429
|
}
|
|
1429
1430
|
addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
|
|
@@ -1467,7 +1468,7 @@ function Kr() {
|
|
|
1467
1468
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1468
1469
|
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Gr ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1469
1470
|
}
|
|
1470
|
-
function
|
|
1471
|
+
function B(e6, t2) {
|
|
1471
1472
|
let { [Gr]: n2 } = e6(Kr()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
1472
1473
|
if (n2.length > 1 && i2) {
|
|
1473
1474
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
@@ -1475,10 +1476,10 @@ function z(e6, t2) {
|
|
|
1475
1476
|
}
|
|
1476
1477
|
return n2.join(r2);
|
|
1477
1478
|
}
|
|
1478
|
-
var qr = (e6) => !
|
|
1479
|
+
var qr = (e6) => !P(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
1479
1480
|
var Jr = class e3 extends Vr {
|
|
1480
1481
|
constructor(e6, t2 = {}) {
|
|
1481
|
-
super(),
|
|
1482
|
+
super(), wr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = z.create(`translator`), this.checkedLoadedFor = {};
|
|
1482
1483
|
}
|
|
1483
1484
|
changeLanguage(e6) {
|
|
1484
1485
|
e6 && (this.language = e6);
|
|
@@ -1497,24 +1498,24 @@ var Jr = class e3 extends Vr {
|
|
|
1497
1498
|
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 && !Rr(e6, n2, r2);
|
|
1498
1499
|
if (a2 && !o2) {
|
|
1499
1500
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1500
|
-
if (t3 && t3.length > 0) return { key: e6, namespaces:
|
|
1501
|
+
if (t3 && t3.length > 0) return { key: e6, namespaces: P(i2) ? [i2] : i2 };
|
|
1501
1502
|
let a3 = e6.split(n2);
|
|
1502
1503
|
(n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
|
|
1503
1504
|
}
|
|
1504
|
-
return { key: e6, namespaces:
|
|
1505
|
+
return { key: e6, namespaces: P(i2) ? [i2] : i2 };
|
|
1505
1506
|
}
|
|
1506
1507
|
translate(t2, n2, r2) {
|
|
1507
1508
|
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
1508
1509
|
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
1509
|
-
typeof t2 == `function` && (t2 =
|
|
1510
|
+
typeof t2 == `function` && (t2 = B(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? B(e6, { ...this.options, ...i2 }) : String(e6));
|
|
1510
1511
|
let a2 = i2.returnDetails === void 0 ? this.options.returnDetails : i2.returnDetails, o2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, { key: s2, namespaces: c2 } = this.extractFromKey(t2[t2.length - 1], i2), l2 = c2[c2.length - 1], u2 = i2.nsSeparator === void 0 ? this.options.nsSeparator : i2.nsSeparator;
|
|
1511
1512
|
u2 === void 0 && (u2 = `:`);
|
|
1512
1513
|
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1513
1514
|
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;
|
|
1514
|
-
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 && !
|
|
1515
|
+
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 && !P(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;
|
|
1515
1516
|
y2 && !m2 && x2 && (T2 = w2);
|
|
1516
1517
|
let te2 = qr(T2), ne2 = Object.prototype.toString.apply(T2);
|
|
1517
|
-
if (y2 && T2 && te2 && !_2.includes(ne2) && !(
|
|
1518
|
+
if (y2 && T2 && te2 && !_2.includes(ne2) && !(P(v2) && Array.isArray(T2))) {
|
|
1518
1519
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
1519
1520
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
1520
1521
|
let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
|
|
@@ -1528,7 +1529,7 @@ var Jr = class e3 extends Vr {
|
|
|
1528
1529
|
}
|
|
1529
1530
|
m2 = t3;
|
|
1530
1531
|
}
|
|
1531
|
-
} else if (y2 &&
|
|
1532
|
+
} else if (y2 && P(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
|
|
1532
1533
|
else {
|
|
1533
1534
|
let e6 = false, n3 = false;
|
|
1534
1535
|
!this.isValidLookup(m2) && x2 && (e6 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
|
|
@@ -1560,30 +1561,30 @@ var Jr = class e3 extends Vr {
|
|
|
1560
1561
|
if (this.i18nFormat?.parse) e6 = this.i18nFormat.parse(e6, { ...this.options.interpolation.defaultVariables, ...n2 }, n2.lng || this.language || r2.usedLng, r2.usedNS, r2.usedKey, { resolved: r2 });
|
|
1561
1562
|
else if (!n2.skipInterpolation) {
|
|
1562
1563
|
n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
|
|
1563
|
-
let a3 =
|
|
1564
|
+
let a3 = P(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
|
|
1564
1565
|
if (a3) {
|
|
1565
1566
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1566
1567
|
o3 = t3 && t3.length;
|
|
1567
1568
|
}
|
|
1568
|
-
let s2 = n2.replace && !
|
|
1569
|
+
let s2 = n2.replace && !P(n2.replace) ? n2.replace : n2;
|
|
1569
1570
|
if (this.options.interpolation.defaultVariables && (s2 = { ...this.options.interpolation.defaultVariables, ...s2 }), e6 = this.interpolator.interpolate(e6, s2, n2.lng || this.language || r2.usedLng, n2), a3) {
|
|
1570
1571
|
let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
|
|
1571
1572
|
o3 < r3 && (n2.nest = false);
|
|
1572
1573
|
}
|
|
1573
1574
|
!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();
|
|
1574
1575
|
}
|
|
1575
|
-
let a2 = n2.postProcess || this.options.postProcess, o2 =
|
|
1576
|
+
let a2 = n2.postProcess || this.options.postProcess, o2 = P(a2) ? [a2] : a2;
|
|
1576
1577
|
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = Wr.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
|
|
1577
1578
|
}
|
|
1578
1579
|
resolve(e6, t2 = {}) {
|
|
1579
1580
|
let n2, r2, i2, a2, o2;
|
|
1580
|
-
return
|
|
1581
|
+
return P(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? B(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
|
|
1581
1582
|
if (this.isValidLookup(n2)) return;
|
|
1582
1583
|
let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
|
|
1583
1584
|
r2 = c2;
|
|
1584
1585
|
let l2 = s2.namespaces;
|
|
1585
1586
|
this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
|
|
1586
|
-
let u2 = t2.count !== void 0 && !
|
|
1587
|
+
let u2 = t2.count !== void 0 && !P(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (P(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
|
|
1587
1588
|
l2.forEach((e8) => {
|
|
1588
1589
|
this.isValidLookup(n2) || (o2 = e8, !this.checkedLoadedFor[`${p2[0]}-${e8}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (this.checkedLoadedFor[`${p2[0]}-${e8}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)), p2.forEach((r3) => {
|
|
1589
1590
|
if (this.isValidLookup(n2)) return;
|
|
@@ -1612,7 +1613,7 @@ var Jr = class e3 extends Vr {
|
|
|
1612
1613
|
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
|
|
1613
1614
|
}
|
|
1614
1615
|
getUsedParamsDetails(e6 = {}) {
|
|
1615
|
-
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !
|
|
1616
|
+
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !P(e6.replace), r2 = n2 ? e6.replace : e6;
|
|
1616
1617
|
if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
|
|
1617
1618
|
r2 = { ...r2 };
|
|
1618
1619
|
for (let e7 of t2) delete r2[e7];
|
|
@@ -1626,23 +1627,23 @@ var Jr = class e3 extends Vr {
|
|
|
1626
1627
|
};
|
|
1627
1628
|
var Yr = class {
|
|
1628
1629
|
constructor(e6) {
|
|
1629
|
-
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger =
|
|
1630
|
+
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = z.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
1630
1631
|
}
|
|
1631
1632
|
clearCache() {
|
|
1632
1633
|
this.resolveHierarchyCache = {};
|
|
1633
1634
|
}
|
|
1634
1635
|
getScriptPartFromCode(e6) {
|
|
1635
|
-
if (e6 =
|
|
1636
|
+
if (e6 = R(e6), !e6 || !e6.includes(`-`)) return null;
|
|
1636
1637
|
let t2 = e6.split(`-`);
|
|
1637
1638
|
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
1638
1639
|
}
|
|
1639
1640
|
getLanguagePartFromCode(e6) {
|
|
1640
|
-
if (e6 =
|
|
1641
|
+
if (e6 = R(e6), !e6 || !e6.includes(`-`)) return e6;
|
|
1641
1642
|
let t2 = e6.split(`-`);
|
|
1642
1643
|
return this.formatLanguageCode(t2[0]);
|
|
1643
1644
|
}
|
|
1644
1645
|
formatLanguageCode(e6) {
|
|
1645
|
-
if (
|
|
1646
|
+
if (P(e6) && e6.includes(`-`)) {
|
|
1646
1647
|
let t2;
|
|
1647
1648
|
try {
|
|
1648
1649
|
t2 = Intl.getCanonicalLocales(e6)[0];
|
|
@@ -1673,7 +1674,7 @@ var Yr = class {
|
|
|
1673
1674
|
}
|
|
1674
1675
|
getFallbackCodes(e6, t2) {
|
|
1675
1676
|
if (!e6) return [];
|
|
1676
|
-
if (typeof e6 == `function` && (e6 = e6(t2)),
|
|
1677
|
+
if (typeof e6 == `function` && (e6 = e6(t2)), P(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
|
|
1677
1678
|
if (!t2) return e6.default || [];
|
|
1678
1679
|
let n2 = e6[t2];
|
|
1679
1680
|
return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
|
|
@@ -1681,7 +1682,7 @@ var Yr = class {
|
|
|
1681
1682
|
toResolveHierarchy(e6, t2) {
|
|
1682
1683
|
let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
|
|
1683
1684
|
r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
|
|
1684
|
-
let i2 = t2 === void 0 || t2 === false ||
|
|
1685
|
+
let i2 = t2 === void 0 || t2 === false || P(t2), a2 = t2 === void 0 && typeof this.options.fallbackLng == `function`, o2 = P(e6) && i2 && !a2, s2 = null;
|
|
1685
1686
|
if (o2) {
|
|
1686
1687
|
let n3;
|
|
1687
1688
|
n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
|
|
@@ -1693,8 +1694,9 @@ var Yr = class {
|
|
|
1693
1694
|
let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
|
|
1694
1695
|
e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
|
|
1695
1696
|
};
|
|
1696
|
-
return
|
|
1697
|
-
|
|
1697
|
+
return P(e6) && (e6.includes(`-`) || e6.includes(`_`)) ? (this.options.load !== `languageOnly` && u2(this.formatLanguageCode(e6)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && u2(this.getScriptPartFromCode(e6)), this.options.load !== `currentOnly` && u2(this.getLanguagePartFromCode(e6))) : P(e6) && u2(this.formatLanguageCode(e6)), c2.forEach((e7) => {
|
|
1698
|
+
let t3 = this.formatLanguageCode(e7);
|
|
1699
|
+
l2.includes(t3) || u2(t3);
|
|
1698
1700
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
1699
1701
|
}
|
|
1700
1702
|
};
|
|
@@ -1702,13 +1704,13 @@ var Xr = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
|
1702
1704
|
var Zr = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1703
1705
|
var Qr = class {
|
|
1704
1706
|
constructor(e6, t2 = {}) {
|
|
1705
|
-
this.languageUtils = e6, this.options = t2, this.logger =
|
|
1707
|
+
this.languageUtils = e6, this.options = t2, this.logger = z.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1706
1708
|
}
|
|
1707
1709
|
clearCache() {
|
|
1708
1710
|
this.pluralRulesCache = {};
|
|
1709
1711
|
}
|
|
1710
1712
|
getRule(e6, t2 = {}) {
|
|
1711
|
-
let n2 =
|
|
1713
|
+
let n2 = R(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
1712
1714
|
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
1713
1715
|
let a2;
|
|
1714
1716
|
try {
|
|
@@ -1739,17 +1741,17 @@ var Qr = class {
|
|
|
1739
1741
|
};
|
|
1740
1742
|
var $r = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
1741
1743
|
let a2 = jr(e6, t2, n2);
|
|
1742
|
-
return !a2 && i2 &&
|
|
1744
|
+
return !a2 && i2 && P(n2) && (a2 = zr(e6, n2, r2), a2 === void 0 && (a2 = zr(t2, n2, r2))), a2;
|
|
1743
1745
|
};
|
|
1744
1746
|
var ei = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
1745
1747
|
var ti = class {
|
|
1746
1748
|
constructor(e6 = {}) {
|
|
1747
|
-
this.logger =
|
|
1749
|
+
this.logger = z.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
1748
1750
|
}
|
|
1749
1751
|
init(e6 = {}) {
|
|
1750
1752
|
e6.interpolation ||= { escapeValue: true };
|
|
1751
1753
|
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;
|
|
1752
|
-
this.escape = t2 === void 0 ? Pr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ?
|
|
1754
|
+
this.escape = t2 === void 0 ? Pr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? L(i2) : a2 || `{{`, this.suffix = o2 ? L(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? L(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? L(l2) : ``, this.nestingPrefix = d2 ? L(d2) : f2 || L(`$t(`), this.nestingSuffix = p2 ? L(p2) : m2 || L(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
|
|
1753
1755
|
}
|
|
1754
1756
|
reset() {
|
|
1755
1757
|
this.options && this.init(this.options);
|
|
@@ -1775,13 +1777,13 @@ var ti = class {
|
|
|
1775
1777
|
if (a2 = c2(n3), a2 === void 0) {
|
|
1776
1778
|
if (typeof l2 == `function`) {
|
|
1777
1779
|
let t4 = l2(e6, i2, r2);
|
|
1778
|
-
a2 =
|
|
1780
|
+
a2 = P(t4) ? t4 : ``;
|
|
1779
1781
|
} else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
|
|
1780
1782
|
else if (u2) {
|
|
1781
1783
|
a2 = i2[0];
|
|
1782
1784
|
continue;
|
|
1783
1785
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
1784
|
-
} else !
|
|
1786
|
+
} else !P(a2) && !this.useRawValueToEscape && (a2 = Cr(a2));
|
|
1785
1787
|
let s3 = t3.safeValue(a2);
|
|
1786
1788
|
if (e6 = e6.replace(i2[0], ei(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
1787
1789
|
}
|
|
@@ -1791,7 +1793,7 @@ var ti = class {
|
|
|
1791
1793
|
let r2, i2, a2, o2 = (e7, t3) => {
|
|
1792
1794
|
let n3 = this.nestingOptionsSeparator;
|
|
1793
1795
|
if (!e7.includes(n3)) return e7;
|
|
1794
|
-
let r3 = e7.split(RegExp(`${
|
|
1796
|
+
let r3 = e7.split(RegExp(`${L(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
|
|
1795
1797
|
e7 = r3[0], i3 = this.interpolate(i3, a2);
|
|
1796
1798
|
let o3 = i3.match(/'/g), s3 = i3.match(/"/g);
|
|
1797
1799
|
((o3?.length ?? 0) % 2 == 0 && !s3 || (s3?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
|
|
@@ -1804,10 +1806,10 @@ var ti = class {
|
|
|
1804
1806
|
}, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
|
|
1805
1807
|
for (; r2 = s2.exec(e6); ) {
|
|
1806
1808
|
let u2 = [];
|
|
1807
|
-
a2 = { ...n2 }, a2 = a2.replace && !
|
|
1809
|
+
a2 = { ...n2 }, a2 = a2.replace && !P(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
1808
1810
|
let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
1809
|
-
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 && !
|
|
1810
|
-
|
|
1811
|
+
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 && !P(i2)) return i2;
|
|
1812
|
+
P(i2) || (i2 = Cr(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) + Cr(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
|
|
1811
1813
|
}
|
|
1812
1814
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
1813
1815
|
}
|
|
@@ -1833,13 +1835,13 @@ var ri = (e6) => {
|
|
|
1833
1835
|
let a2 = i2;
|
|
1834
1836
|
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
1835
1837
|
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
1836
|
-
return s2 || (s2 = e6(
|
|
1838
|
+
return s2 || (s2 = e6(R(r2), i2), t2[o2] = s2), s2(n2);
|
|
1837
1839
|
};
|
|
1838
1840
|
};
|
|
1839
|
-
var ii = (e6) => (t2, n2, r2) => e6(
|
|
1841
|
+
var ii = (e6) => (t2, n2, r2) => e6(R(n2), r2)(t2);
|
|
1840
1842
|
var ai = class {
|
|
1841
1843
|
constructor(e6 = {}) {
|
|
1842
|
-
this.logger =
|
|
1844
|
+
this.logger = z.create(`formatter`), this.options = e6, this.init(e6);
|
|
1843
1845
|
}
|
|
1844
1846
|
init(e6, t2 = { interpolation: {} }) {
|
|
1845
1847
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
@@ -1896,7 +1898,7 @@ var oi = (e6, t2) => {
|
|
|
1896
1898
|
};
|
|
1897
1899
|
var si = class extends Vr {
|
|
1898
1900
|
constructor(e6, t2, n2, r2 = {}) {
|
|
1899
|
-
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger =
|
|
1901
|
+
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = z.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);
|
|
1900
1902
|
}
|
|
1901
1903
|
queueLoad(e6, t2, n2, r2) {
|
|
1902
1904
|
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
@@ -1948,7 +1950,7 @@ var si = class extends Vr {
|
|
|
1948
1950
|
}
|
|
1949
1951
|
prepareLoading(e6, t2, n2 = {}, r2) {
|
|
1950
1952
|
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
1951
|
-
|
|
1953
|
+
P(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), P(t2) && (t2 = [t2]);
|
|
1952
1954
|
let i2 = this.queueLoad(e6, t2, n2, r2);
|
|
1953
1955
|
if (!i2.toLoad.length) return i2.pending.length || r2(), null;
|
|
1954
1956
|
i2.toLoad.forEach((e7) => {
|
|
@@ -1987,7 +1989,7 @@ var si = class extends Vr {
|
|
|
1987
1989
|
};
|
|
1988
1990
|
var ci = () => ({ 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) => {
|
|
1989
1991
|
let t2 = {};
|
|
1990
|
-
if (typeof e6[1] == `object` && (t2 = e6[1]),
|
|
1992
|
+
if (typeof e6[1] == `object` && (t2 = e6[1]), P(e6[1]) && (t2.defaultValue = e6[1]), P(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
|
|
1991
1993
|
let n2 = e6[3] || e6[2];
|
|
1992
1994
|
Object.keys(n2).forEach((e7) => {
|
|
1993
1995
|
t2[e7] = n2[e7];
|
|
@@ -1995,7 +1997,7 @@ var ci = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
1995
1997
|
}
|
|
1996
1998
|
return t2;
|
|
1997
1999
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
1998
|
-
var li = (e6) => (
|
|
2000
|
+
var li = (e6) => (P(e6.ns) && (e6.ns = [e6.ns]), P(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), P(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
|
|
1999
2001
|
var ui = () => {
|
|
2000
2002
|
};
|
|
2001
2003
|
var di = (e6) => {
|
|
@@ -2003,9 +2005,9 @@ var di = (e6) => {
|
|
|
2003
2005
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
2004
2006
|
});
|
|
2005
2007
|
};
|
|
2006
|
-
var
|
|
2008
|
+
var V = class e4 extends Vr {
|
|
2007
2009
|
constructor(e6 = {}, t2) {
|
|
2008
|
-
if (super(), this.options = li(e6), this.services = {}, this.logger =
|
|
2010
|
+
if (super(), this.options = li(e6), this.services = {}, this.logger = z, this.modules = { external: [] }, di(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
2009
2011
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
2010
2012
|
setTimeout(() => {
|
|
2011
2013
|
this.init(e6, t2);
|
|
@@ -2013,18 +2015,18 @@ var B = class e4 extends Vr {
|
|
|
2013
2015
|
}
|
|
2014
2016
|
}
|
|
2015
2017
|
init(e6 = {}, t2) {
|
|
2016
|
-
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (
|
|
2018
|
+
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (P(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
|
|
2017
2019
|
let n2 = ci();
|
|
2018
2020
|
this.options = { ...n2, ...this.options, ...li(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);
|
|
2019
2021
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
2020
2022
|
if (!this.options.isClone) {
|
|
2021
|
-
this.modules.logger ?
|
|
2023
|
+
this.modules.logger ? z.init(r2(this.modules.logger), this.options) : z.init(null, this.options);
|
|
2022
2024
|
let e7;
|
|
2023
2025
|
e7 = this.modules.formatter ? this.modules.formatter : ai;
|
|
2024
2026
|
let t3 = new Yr(this.options);
|
|
2025
2027
|
this.store = new Ur(this.options.resources, this.options);
|
|
2026
2028
|
let n3 = this.services;
|
|
2027
|
-
n3.logger =
|
|
2029
|
+
n3.logger = z, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new Qr(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 ti(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new si(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
|
|
2028
2030
|
this.emit(e8, ...t4);
|
|
2029
2031
|
}), 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 Jr(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
|
|
2030
2032
|
this.emit(e8, ...t4);
|
|
@@ -2041,7 +2043,7 @@ var B = class e4 extends Vr {
|
|
|
2041
2043
|
}), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
|
|
2042
2044
|
this[e7] = (...t3) => (this.store[e7](...t3), this);
|
|
2043
2045
|
});
|
|
2044
|
-
let i2 =
|
|
2046
|
+
let i2 = F(), a2 = () => {
|
|
2045
2047
|
let e7 = (e8, n3) => {
|
|
2046
2048
|
this.isInitializing = false, this.isInitialized && !this.initializedStoreOnce && this.logger.warn(`init: i18next is already initialized. You should call init just once!`), this.isInitialized = true, this.options.isClone || this.logger.log(`initialized`, this.options), this.emit(`initialized`, this.options), i2.resolve(n3), t2(e8, n3);
|
|
2047
2049
|
};
|
|
@@ -2051,7 +2053,7 @@ var B = class e4 extends Vr {
|
|
|
2051
2053
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
2052
2054
|
}
|
|
2053
2055
|
loadResources(e6, t2 = ui) {
|
|
2054
|
-
let n2 = t2, r2 =
|
|
2056
|
+
let n2 = t2, r2 = P(e6) ? e6 : this.language;
|
|
2055
2057
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2056
2058
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
2057
2059
|
let e7 = [], t3 = (t4) => {
|
|
@@ -2065,7 +2067,7 @@ var B = class e4 extends Vr {
|
|
|
2065
2067
|
} else n2(null);
|
|
2066
2068
|
}
|
|
2067
2069
|
reloadResources(e6, t2, n2) {
|
|
2068
|
-
let r2 =
|
|
2070
|
+
let r2 = F();
|
|
2069
2071
|
return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||= ui, this.services.backendConnector.reload(e6, t2, (e7) => {
|
|
2070
2072
|
r2.resolve(), n2(e7);
|
|
2071
2073
|
}), r2;
|
|
@@ -2089,7 +2091,7 @@ var B = class e4 extends Vr {
|
|
|
2089
2091
|
}
|
|
2090
2092
|
changeLanguage(e6, t2) {
|
|
2091
2093
|
this.isLanguageChangingTo = e6;
|
|
2092
|
-
let n2 =
|
|
2094
|
+
let n2 = F();
|
|
2093
2095
|
this.emit(`languageChanging`, e6);
|
|
2094
2096
|
let r2 = (e7) => {
|
|
2095
2097
|
this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
|
|
@@ -2097,7 +2099,7 @@ var B = class e4 extends Vr {
|
|
|
2097
2099
|
a3 ? this.isLanguageChangingTo === e6 && (r2(a3), this.translator.changeLanguage(a3), this.isLanguageChangingTo = void 0, this.emit(`languageChanged`, a3), this.logger.log(`languageChanged`, a3)) : this.isLanguageChangingTo = void 0, n2.resolve((...e7) => this.t(...e7)), t2 && t2(i3, (...e7) => this.t(...e7));
|
|
2098
2100
|
}, a2 = (t3) => {
|
|
2099
2101
|
!e6 && !t3 && this.services.languageDetector && (t3 = []);
|
|
2100
|
-
let n3 =
|
|
2102
|
+
let n3 = P(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(P(t3) ? [t3] : t3);
|
|
2101
2103
|
a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
|
|
2102
2104
|
i2(e7, a3);
|
|
2103
2105
|
});
|
|
@@ -2111,11 +2113,11 @@ var B = class e4 extends Vr {
|
|
|
2111
2113
|
let s2 = o2.ns !== void 0 && o2.ns !== null;
|
|
2112
2114
|
o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
|
|
2113
2115
|
let c2 = { ...this.options, ...o2 };
|
|
2114
|
-
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix =
|
|
2116
|
+
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = B(o2.keyPrefix, c2));
|
|
2115
2117
|
let l2 = this.options.keySeparator || `.`, u2;
|
|
2116
|
-
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 =
|
|
2118
|
+
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = B(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = B(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
|
|
2117
2119
|
};
|
|
2118
|
-
return
|
|
2120
|
+
return P(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
|
|
2119
2121
|
}
|
|
2120
2122
|
t(...e6) {
|
|
2121
2123
|
return this.translator?.translate(...e6);
|
|
@@ -2139,19 +2141,21 @@ var B = class e4 extends Vr {
|
|
|
2139
2141
|
let e7 = t2.precheck(this, a2);
|
|
2140
2142
|
if (e7 !== void 0) return e7;
|
|
2141
2143
|
}
|
|
2142
|
-
|
|
2144
|
+
if (this.hasResourceBundle(n2, e6) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;
|
|
2145
|
+
let { languageUtils: o2 } = this.services, s2 = t2.lng ? o2.isSupportedCode(n2) && o2.toResolveHierarchy(n2, false)[0] : n2;
|
|
2146
|
+
return !(s2 && !a2(s2, e6) || r2 && !a2(i2, e6));
|
|
2143
2147
|
}
|
|
2144
2148
|
loadNamespaces(e6, t2) {
|
|
2145
|
-
let n2 =
|
|
2146
|
-
return this.options.ns ? (
|
|
2149
|
+
let n2 = F();
|
|
2150
|
+
return this.options.ns ? (P(e6) && (e6 = [e6]), e6.forEach((e7) => {
|
|
2147
2151
|
this.options.ns.includes(e7) || this.options.ns.push(e7);
|
|
2148
2152
|
}), this.loadResources((e7) => {
|
|
2149
2153
|
n2.resolve(), t2 && t2(e7);
|
|
2150
2154
|
}), n2) : (t2 && t2(), Promise.resolve());
|
|
2151
2155
|
}
|
|
2152
2156
|
loadLanguages(e6, t2) {
|
|
2153
|
-
let n2 =
|
|
2154
|
-
|
|
2157
|
+
let n2 = F();
|
|
2158
|
+
P(e6) && (e6 = [e6]);
|
|
2155
2159
|
let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
|
|
2156
2160
|
return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
|
|
2157
2161
|
n2.resolve(), t2 && t2(e7);
|
|
@@ -2177,7 +2181,7 @@ var B = class e4 extends Vr {
|
|
|
2177
2181
|
cloneInstance(t2 = {}, n2 = ui) {
|
|
2178
2182
|
let r2 = t2.forkResourceStore;
|
|
2179
2183
|
r2 && delete t2.forkResourceStore;
|
|
2180
|
-
let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2184
|
+
let i2 = { ...this.options, preload: false, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2181
2185
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
|
|
2182
2186
|
a2[e6] = this[e6];
|
|
2183
2187
|
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Ur(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) {
|
|
@@ -2192,9 +2196,9 @@ var B = class e4 extends Vr {
|
|
|
2192
2196
|
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
2193
2197
|
}
|
|
2194
2198
|
}.createInstance();
|
|
2195
|
-
|
|
2199
|
+
V.createInstance, V.dir, V.init, V.loadResources, V.reloadResources, V.use, V.changeLanguage, V.getFixedT, V.t, V.exists, V.setDefaultNamespace, V.hasLoadedNamespace, V.loadNamespaces, V.loadLanguages;
|
|
2196
2200
|
var fi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2197
|
-
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 =
|
|
2201
|
+
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = V.createInstance(i2 ? s2 : void 0);
|
|
2198
2202
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2199
2203
|
try {
|
|
2200
2204
|
return r3(null, await t2(e7));
|
|
@@ -2203,75 +2207,38 @@ var fi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
|
|
|
2203
2207
|
}
|
|
2204
2208
|
} }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
|
|
2205
2209
|
};
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
2210
|
-
}
|
|
2211
|
-
function i2() {
|
|
2212
|
-
return !e6 || typeof e6 == `string`;
|
|
2213
|
-
}
|
|
2214
|
-
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
2215
|
-
if (i2()) return {};
|
|
2216
|
-
var o2 = r2(a2.shift());
|
|
2217
|
-
if (pi.indexOf(o2) > -1) return {};
|
|
2218
|
-
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
2219
|
-
}
|
|
2220
|
-
if (i2()) return {};
|
|
2221
|
-
var s2 = r2(a2.shift());
|
|
2222
|
-
return pi.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
2210
|
+
function pi(e6, t2) {
|
|
2211
|
+
let n2 = t2 && t2.cache ? t2.cache : Ci, r2 = t2 && t2.serializer ? t2.serializer : xi;
|
|
2212
|
+
return (t2 && t2.strategy ? t2.strategy : vi)(e6, { cache: n2, serializer: r2 });
|
|
2223
2213
|
}
|
|
2224
|
-
function
|
|
2225
|
-
var r2 = mi(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
2226
|
-
i2 !== void 0 && (i2[a2] = n2);
|
|
2227
|
-
}
|
|
2228
|
-
function gi(e6, t2) {
|
|
2229
|
-
var n2 = mi(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
2230
|
-
if (r2) return r2[i2];
|
|
2231
|
-
}
|
|
2232
|
-
var _i = [];
|
|
2233
|
-
var vi = _i.forEach;
|
|
2234
|
-
var yi = _i.slice;
|
|
2235
|
-
function bi(e6) {
|
|
2236
|
-
return vi.call(yi.call(arguments, 1), function(t2) {
|
|
2237
|
-
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
2238
|
-
var i2 = r2[n2];
|
|
2239
|
-
pi.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
2240
|
-
}
|
|
2241
|
-
}), e6;
|
|
2242
|
-
}
|
|
2243
|
-
function xi(e6, t2) {
|
|
2244
|
-
let n2 = t2 && t2.cache ? t2.cache : ji, r2 = t2 && t2.serializer ? t2.serializer : ki;
|
|
2245
|
-
return (t2 && t2.strategy ? t2.strategy : Ei)(e6, { cache: n2, serializer: r2 });
|
|
2246
|
-
}
|
|
2247
|
-
function Si(e6) {
|
|
2214
|
+
function mi(e6) {
|
|
2248
2215
|
return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
|
|
2249
2216
|
}
|
|
2250
|
-
function
|
|
2251
|
-
let i2 =
|
|
2217
|
+
function hi(e6, t2, n2, r2) {
|
|
2218
|
+
let i2 = mi(r2) ? r2 : n2(r2), a2 = t2.get(i2);
|
|
2252
2219
|
return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
|
|
2253
2220
|
}
|
|
2254
|
-
function
|
|
2221
|
+
function gi(e6, t2, n2) {
|
|
2255
2222
|
let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
|
|
2256
2223
|
return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
|
|
2257
2224
|
}
|
|
2258
|
-
function
|
|
2225
|
+
function _i(e6, t2, n2, r2, i2) {
|
|
2259
2226
|
return n2.bind(t2, e6, r2, i2);
|
|
2260
2227
|
}
|
|
2261
|
-
function
|
|
2262
|
-
let n2 = e6.length === 1 ?
|
|
2263
|
-
return
|
|
2228
|
+
function vi(e6, t2) {
|
|
2229
|
+
let n2 = e6.length === 1 ? hi : gi;
|
|
2230
|
+
return _i(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2264
2231
|
}
|
|
2265
|
-
function
|
|
2266
|
-
return
|
|
2232
|
+
function yi(e6, t2) {
|
|
2233
|
+
return _i(e6, this, gi, t2.cache.create(), t2.serializer);
|
|
2267
2234
|
}
|
|
2268
|
-
function
|
|
2269
|
-
return
|
|
2235
|
+
function bi(e6, t2) {
|
|
2236
|
+
return _i(e6, this, hi, t2.cache.create(), t2.serializer);
|
|
2270
2237
|
}
|
|
2271
|
-
var
|
|
2238
|
+
var xi = function() {
|
|
2272
2239
|
return JSON.stringify(arguments);
|
|
2273
2240
|
};
|
|
2274
|
-
var
|
|
2241
|
+
var Si = class {
|
|
2275
2242
|
constructor() {
|
|
2276
2243
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2277
2244
|
}
|
|
@@ -2282,14 +2249,14 @@ var Ai = class {
|
|
|
2282
2249
|
this.cache[e6] = t2;
|
|
2283
2250
|
}
|
|
2284
2251
|
};
|
|
2285
|
-
var
|
|
2286
|
-
return new
|
|
2252
|
+
var Ci = { create: function() {
|
|
2253
|
+
return new Si();
|
|
2287
2254
|
} };
|
|
2288
|
-
var
|
|
2289
|
-
var
|
|
2290
|
-
function
|
|
2255
|
+
var wi = { variadic: yi, monadic: bi };
|
|
2256
|
+
var Ti = /(?:[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;
|
|
2257
|
+
function Ei(e6) {
|
|
2291
2258
|
let t2 = {};
|
|
2292
|
-
return e6.replace(
|
|
2259
|
+
return e6.replace(Ti, (e7) => {
|
|
2293
2260
|
let n2 = e7.length;
|
|
2294
2261
|
switch (e7[0]) {
|
|
2295
2262
|
case `G`:
|
|
@@ -2376,10 +2343,10 @@ function Pi(e6) {
|
|
|
2376
2343
|
return ``;
|
|
2377
2344
|
}), t2;
|
|
2378
2345
|
}
|
|
2379
|
-
var
|
|
2380
|
-
function
|
|
2346
|
+
var Di = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
2347
|
+
function Oi(e6) {
|
|
2381
2348
|
if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
2382
|
-
let t2 = e6.split(
|
|
2349
|
+
let t2 = e6.split(Di).filter((e7) => e7.length > 0), n2 = [];
|
|
2383
2350
|
for (let e7 of t2) {
|
|
2384
2351
|
let t3 = e7.split(`/`);
|
|
2385
2352
|
if (t3.length === 0) throw Error(`Invalid number skeleton`);
|
|
@@ -2389,20 +2356,20 @@ function Ii(e6) {
|
|
|
2389
2356
|
}
|
|
2390
2357
|
return n2;
|
|
2391
2358
|
}
|
|
2392
|
-
function
|
|
2359
|
+
function ki(e6) {
|
|
2393
2360
|
return e6.replace(/^(.*?)-/, ``);
|
|
2394
2361
|
}
|
|
2395
|
-
var
|
|
2396
|
-
var
|
|
2397
|
-
var
|
|
2398
|
-
var
|
|
2399
|
-
function
|
|
2362
|
+
var Ai = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
2363
|
+
var ji = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
2364
|
+
var Mi = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
2365
|
+
var Ni = /^(0+)$/;
|
|
2366
|
+
function Pi(e6) {
|
|
2400
2367
|
let t2 = {};
|
|
2401
|
-
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(
|
|
2368
|
+
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(ji, function(e7, n2, r2) {
|
|
2402
2369
|
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), ``;
|
|
2403
2370
|
}), t2;
|
|
2404
2371
|
}
|
|
2405
|
-
function
|
|
2372
|
+
function Fi(e6) {
|
|
2406
2373
|
switch (e6) {
|
|
2407
2374
|
case `sign-auto`:
|
|
2408
2375
|
return { signDisplay: `auto` };
|
|
@@ -2426,19 +2393,19 @@ function Ui(e6) {
|
|
|
2426
2393
|
return { signDisplay: `never` };
|
|
2427
2394
|
}
|
|
2428
2395
|
}
|
|
2429
|
-
function
|
|
2396
|
+
function Ii(e6) {
|
|
2430
2397
|
let t2;
|
|
2431
2398
|
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) {
|
|
2432
2399
|
let n2 = e6.slice(0, 2);
|
|
2433
|
-
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !
|
|
2400
|
+
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !Ni.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
|
|
2434
2401
|
t2.minimumIntegerDigits = e6.length;
|
|
2435
2402
|
}
|
|
2436
2403
|
return t2;
|
|
2437
2404
|
}
|
|
2438
|
-
function
|
|
2439
|
-
return
|
|
2405
|
+
function Li(e6) {
|
|
2406
|
+
return Fi(e6) || {};
|
|
2440
2407
|
}
|
|
2441
|
-
function
|
|
2408
|
+
function Ri(e6) {
|
|
2442
2409
|
let t2 = {};
|
|
2443
2410
|
for (let n2 of e6) {
|
|
2444
2411
|
switch (n2.stem) {
|
|
@@ -2462,7 +2429,7 @@ function Ki(e6) {
|
|
|
2462
2429
|
continue;
|
|
2463
2430
|
case `measure-unit`:
|
|
2464
2431
|
case `unit`:
|
|
2465
|
-
t2.style = `unit`, t2.unit =
|
|
2432
|
+
t2.style = `unit`, t2.unit = ki(n2.options[0]);
|
|
2466
2433
|
continue;
|
|
2467
2434
|
case `compact-short`:
|
|
2468
2435
|
case `K`:
|
|
@@ -2473,10 +2440,10 @@ function Ki(e6) {
|
|
|
2473
2440
|
t2.notation = `compact`, t2.compactDisplay = `long`;
|
|
2474
2441
|
continue;
|
|
2475
2442
|
case `scientific`:
|
|
2476
|
-
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2443
|
+
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Li(t3) }), {}) };
|
|
2477
2444
|
continue;
|
|
2478
2445
|
case `engineering`:
|
|
2479
|
-
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2446
|
+
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Li(t3) }), {}) };
|
|
2480
2447
|
continue;
|
|
2481
2448
|
case `notation-simple`:
|
|
2482
2449
|
t2.notation = `standard`;
|
|
@@ -2519,7 +2486,7 @@ function Ki(e6) {
|
|
|
2519
2486
|
continue;
|
|
2520
2487
|
case `integer-width`:
|
|
2521
2488
|
if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
|
|
2522
|
-
n2.options[0].replace(
|
|
2489
|
+
n2.options[0].replace(Mi, function(e8, n3, r3, i2, a2, o2) {
|
|
2523
2490
|
if (n3) t2.minimumIntegerDigits = r3.length;
|
|
2524
2491
|
else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
|
|
2525
2492
|
else if (o2) throw Error(`We currently do not support exact integer digits`);
|
|
@@ -2527,83 +2494,83 @@ function Ki(e6) {
|
|
|
2527
2494
|
});
|
|
2528
2495
|
continue;
|
|
2529
2496
|
}
|
|
2530
|
-
if (
|
|
2497
|
+
if (Ni.test(n2.stem)) {
|
|
2531
2498
|
t2.minimumIntegerDigits = n2.stem.length;
|
|
2532
2499
|
continue;
|
|
2533
2500
|
}
|
|
2534
|
-
if (
|
|
2501
|
+
if (Ai.test(n2.stem)) {
|
|
2535
2502
|
if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
|
|
2536
|
-
n2.stem.replace(
|
|
2503
|
+
n2.stem.replace(Ai, function(e9, n3, r3, i2, a2, o2) {
|
|
2537
2504
|
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), ``;
|
|
2538
2505
|
});
|
|
2539
2506
|
let e8 = n2.options[0];
|
|
2540
|
-
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...
|
|
2507
|
+
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...Pi(e8) });
|
|
2541
2508
|
continue;
|
|
2542
2509
|
}
|
|
2543
|
-
if (
|
|
2544
|
-
t2 = { ...t2, ...
|
|
2510
|
+
if (ji.test(n2.stem)) {
|
|
2511
|
+
t2 = { ...t2, ...Pi(n2.stem) };
|
|
2545
2512
|
continue;
|
|
2546
2513
|
}
|
|
2547
|
-
let e7 =
|
|
2514
|
+
let e7 = Fi(n2.stem);
|
|
2548
2515
|
e7 && (t2 = { ...t2, ...e7 });
|
|
2549
|
-
let r2 =
|
|
2516
|
+
let r2 = Ii(n2.stem);
|
|
2550
2517
|
r2 && (t2 = { ...t2, ...r2 });
|
|
2551
2518
|
}
|
|
2552
2519
|
return t2;
|
|
2553
2520
|
}
|
|
2554
|
-
var
|
|
2521
|
+
var zi = function(e6) {
|
|
2555
2522
|
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;
|
|
2556
2523
|
}({});
|
|
2557
|
-
function
|
|
2524
|
+
function Bi(e6) {
|
|
2558
2525
|
return e6.type === 0;
|
|
2559
2526
|
}
|
|
2560
|
-
function
|
|
2527
|
+
function Vi(e6) {
|
|
2561
2528
|
return e6.type === 1;
|
|
2562
2529
|
}
|
|
2563
|
-
function
|
|
2530
|
+
function Hi(e6) {
|
|
2564
2531
|
return e6.type === 2;
|
|
2565
2532
|
}
|
|
2566
|
-
function
|
|
2533
|
+
function Ui(e6) {
|
|
2567
2534
|
return e6.type === 3;
|
|
2568
2535
|
}
|
|
2569
|
-
function
|
|
2536
|
+
function Wi(e6) {
|
|
2570
2537
|
return e6.type === 4;
|
|
2571
2538
|
}
|
|
2572
|
-
function
|
|
2539
|
+
function Gi(e6) {
|
|
2573
2540
|
return e6.type === 5;
|
|
2574
2541
|
}
|
|
2575
|
-
function
|
|
2542
|
+
function Ki(e6) {
|
|
2576
2543
|
return e6.type === 6;
|
|
2577
2544
|
}
|
|
2578
|
-
function
|
|
2545
|
+
function qi(e6) {
|
|
2579
2546
|
return e6.type === 7;
|
|
2580
2547
|
}
|
|
2581
|
-
function
|
|
2548
|
+
function Ji(e6) {
|
|
2582
2549
|
return e6.type === 8;
|
|
2583
2550
|
}
|
|
2584
|
-
function
|
|
2551
|
+
function Yi(e6) {
|
|
2585
2552
|
return !!(e6 && typeof e6 == `object` && e6.type === 0);
|
|
2586
2553
|
}
|
|
2587
|
-
function
|
|
2554
|
+
function Xi(e6) {
|
|
2588
2555
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
2589
2556
|
}
|
|
2590
|
-
var
|
|
2591
|
-
var
|
|
2592
|
-
function
|
|
2557
|
+
var Zi = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
2558
|
+
var H = { "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`] };
|
|
2559
|
+
function Qi(e6, t2) {
|
|
2593
2560
|
let n2 = ``;
|
|
2594
2561
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
2595
2562
|
let i2 = e6.charAt(r2);
|
|
2596
2563
|
if (i2 === `j`) {
|
|
2597
2564
|
let a2 = 0;
|
|
2598
2565
|
for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
|
|
2599
|
-
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 =
|
|
2566
|
+
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = $i(t2);
|
|
2600
2567
|
for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
|
|
2601
2568
|
for (; o2-- > 0; ) n2 = c2 + n2;
|
|
2602
2569
|
} else n2 += i2 === `J` ? `H` : i2;
|
|
2603
2570
|
}
|
|
2604
2571
|
return n2;
|
|
2605
2572
|
}
|
|
2606
|
-
function
|
|
2573
|
+
function $i(e6) {
|
|
2607
2574
|
let t2 = e6.hourCycle;
|
|
2608
2575
|
if (t2 === void 0) {
|
|
2609
2576
|
let n3 = e6;
|
|
@@ -2622,36 +2589,36 @@ function sa(e6) {
|
|
|
2622
2589
|
throw Error(`Invalid hourCycle`);
|
|
2623
2590
|
}
|
|
2624
2591
|
let n2 = e6.language, r2;
|
|
2625
|
-
return n2 !== `root` && (r2 = e6.maximize().region), (
|
|
2592
|
+
return n2 !== `root` && (r2 = e6.maximize().region), (H[`${n2}-${r2}`] || H[r2 || ``] || H[n2 || ``] || H[`${n2}-001`] || H[`001`])[0].charAt(0);
|
|
2626
2593
|
}
|
|
2627
|
-
var
|
|
2628
|
-
var
|
|
2629
|
-
function
|
|
2594
|
+
var ea = RegExp(`^${Zi.source}*`);
|
|
2595
|
+
var ta = RegExp(`${Zi.source}*$`);
|
|
2596
|
+
function U(e6, t2) {
|
|
2630
2597
|
return { start: e6, end: t2 };
|
|
2631
2598
|
}
|
|
2632
|
-
var
|
|
2633
|
-
var
|
|
2634
|
-
var
|
|
2635
|
-
var
|
|
2599
|
+
var na = !!Object.fromEntries;
|
|
2600
|
+
var ra = !!String.prototype.trimStart;
|
|
2601
|
+
var ia = !!String.prototype.trimEnd;
|
|
2602
|
+
var aa = na ? Object.fromEntries : function(e6) {
|
|
2636
2603
|
let t2 = {};
|
|
2637
2604
|
for (let [n2, r2] of e6) t2[n2] = r2;
|
|
2638
2605
|
return t2;
|
|
2639
2606
|
};
|
|
2640
|
-
var
|
|
2607
|
+
var oa = ra ? function(e6) {
|
|
2641
2608
|
return e6.trimStart();
|
|
2642
2609
|
} : function(e6) {
|
|
2643
|
-
return e6.replace(
|
|
2610
|
+
return e6.replace(ea, ``);
|
|
2644
2611
|
};
|
|
2645
|
-
var
|
|
2612
|
+
var sa = ia ? function(e6) {
|
|
2646
2613
|
return e6.trimEnd();
|
|
2647
2614
|
} : function(e6) {
|
|
2648
|
-
return e6.replace(
|
|
2615
|
+
return e6.replace(ta, ``);
|
|
2649
2616
|
};
|
|
2650
|
-
var
|
|
2651
|
-
function
|
|
2652
|
-
return
|
|
2617
|
+
var ca = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
|
|
2618
|
+
function la(e6, t2) {
|
|
2619
|
+
return ca.lastIndex = t2, ca.exec(e6)[1] ?? ``;
|
|
2653
2620
|
}
|
|
2654
|
-
function
|
|
2621
|
+
function ua(e6) {
|
|
2655
2622
|
if (e6.length === 0) return null;
|
|
2656
2623
|
let t2 = 1, n2 = 1;
|
|
2657
2624
|
for (let r2 = 0; r2 < e6.length; ) {
|
|
@@ -2672,7 +2639,7 @@ function va(e6) {
|
|
|
2672
2639
|
}
|
|
2673
2640
|
return { offset: e6.length, line: t2, column: n2 };
|
|
2674
2641
|
}
|
|
2675
|
-
var
|
|
2642
|
+
var da = class {
|
|
2676
2643
|
constructor(e6, t2 = {}) {
|
|
2677
2644
|
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;
|
|
2678
2645
|
}
|
|
@@ -2681,10 +2648,10 @@ var ya = class {
|
|
|
2681
2648
|
if (this.message.length > 0) {
|
|
2682
2649
|
let e6 = this.message.charCodeAt(0);
|
|
2683
2650
|
if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
|
|
2684
|
-
let e7 =
|
|
2651
|
+
let e7 = ua(this.message);
|
|
2685
2652
|
if (e7) {
|
|
2686
2653
|
let t2 = this.clonePosition();
|
|
2687
|
-
return this.position = e7, { val: [{ type: 0, value: this.message, location:
|
|
2654
|
+
return this.position = e7, { val: [{ type: 0, value: this.message, location: U(t2, this.clonePosition()) }], err: null };
|
|
2688
2655
|
}
|
|
2689
2656
|
}
|
|
2690
2657
|
}
|
|
@@ -2701,11 +2668,11 @@ var ya = class {
|
|
|
2701
2668
|
} else if (i2 === 125 && e6 > 0) break;
|
|
2702
2669
|
else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
|
|
2703
2670
|
let e7 = this.clonePosition();
|
|
2704
|
-
this.bump(), r2.push({ type: 7, location:
|
|
2671
|
+
this.bump(), r2.push({ type: 7, location: U(e7, this.clonePosition()) });
|
|
2705
2672
|
} else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
2706
2673
|
if (n2) break;
|
|
2707
|
-
return this.error(26,
|
|
2708
|
-
} else if (i2 === 60 && !this.ignoreTag &&
|
|
2674
|
+
return this.error(26, U(this.clonePosition(), this.clonePosition()));
|
|
2675
|
+
} else if (i2 === 60 && !this.ignoreTag && fa(this.peek() || 0)) {
|
|
2709
2676
|
let n3 = this.parseTag(e6, t2);
|
|
2710
2677
|
if (n3.err) return n3;
|
|
2711
2678
|
r2.push(n3.val);
|
|
@@ -2721,23 +2688,23 @@ var ya = class {
|
|
|
2721
2688
|
let n2 = this.clonePosition();
|
|
2722
2689
|
this.bump();
|
|
2723
2690
|
let r2 = this.parseTagName();
|
|
2724
|
-
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location:
|
|
2691
|
+
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: U(n2, this.clonePosition()) }, err: null };
|
|
2725
2692
|
if (this.bumpIf(`>`)) {
|
|
2726
2693
|
let i2 = this.parseMessage(e6 + 1, t2, true);
|
|
2727
2694
|
if (i2.err) return i2;
|
|
2728
2695
|
let a2 = i2.val, o2 = this.clonePosition();
|
|
2729
2696
|
if (this.bumpIf(`</`)) {
|
|
2730
|
-
if (this.isEOF() || !
|
|
2697
|
+
if (this.isEOF() || !fa(this.char())) return this.error(23, U(o2, this.clonePosition()));
|
|
2731
2698
|
let e7 = this.clonePosition();
|
|
2732
|
-
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location:
|
|
2699
|
+
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: U(n2, this.clonePosition()) }, err: null } : this.error(23, U(o2, this.clonePosition()))) : this.error(26, U(e7, this.clonePosition()));
|
|
2733
2700
|
}
|
|
2734
|
-
return this.error(27,
|
|
2701
|
+
return this.error(27, U(n2, this.clonePosition()));
|
|
2735
2702
|
}
|
|
2736
|
-
return this.error(23,
|
|
2703
|
+
return this.error(23, U(n2, this.clonePosition()));
|
|
2737
2704
|
}
|
|
2738
2705
|
parseTagName() {
|
|
2739
2706
|
let e6 = this.offset();
|
|
2740
|
-
for (this.bump(); !this.isEOF() &&
|
|
2707
|
+
for (this.bump(); !this.isEOF() && ma(this.char()); ) this.bump();
|
|
2741
2708
|
return this.message.slice(e6, this.offset());
|
|
2742
2709
|
}
|
|
2743
2710
|
parseLiteral(e6, t2) {
|
|
@@ -2757,11 +2724,11 @@ var ya = class {
|
|
|
2757
2724
|
if (a2) r2 += a2;
|
|
2758
2725
|
else break;
|
|
2759
2726
|
}
|
|
2760
|
-
let i2 =
|
|
2727
|
+
let i2 = U(n2, this.clonePosition());
|
|
2761
2728
|
return { val: { type: 0, value: r2, location: i2 }, err: null };
|
|
2762
2729
|
}
|
|
2763
2730
|
tryParseLeftAngleBracket() {
|
|
2764
|
-
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !
|
|
2731
|
+
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !pa(this.peek() || 0)) ? (this.bump(), `<`) : null;
|
|
2765
2732
|
}
|
|
2766
2733
|
tryParseQuote(e6) {
|
|
2767
2734
|
if (this.isEOF() || this.char() !== 39) return null;
|
|
@@ -2801,29 +2768,29 @@ var ya = class {
|
|
|
2801
2768
|
}
|
|
2802
2769
|
parseArgument(e6, t2) {
|
|
2803
2770
|
let n2 = this.clonePosition();
|
|
2804
|
-
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2805
|
-
if (this.char() === 125) return this.bump(), this.error(2,
|
|
2771
|
+
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, U(n2, this.clonePosition()));
|
|
2772
|
+
if (this.char() === 125) return this.bump(), this.error(2, U(n2, this.clonePosition()));
|
|
2806
2773
|
let r2 = this.parseIdentifierIfPossible().value;
|
|
2807
|
-
if (!r2) return this.error(3,
|
|
2808
|
-
if (this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2774
|
+
if (!r2) return this.error(3, U(n2, this.clonePosition()));
|
|
2775
|
+
if (this.bumpSpace(), this.isEOF()) return this.error(1, U(n2, this.clonePosition()));
|
|
2809
2776
|
switch (this.char()) {
|
|
2810
2777
|
case 125:
|
|
2811
|
-
return this.bump(), { val: { type: 1, value: r2, location:
|
|
2778
|
+
return this.bump(), { val: { type: 1, value: r2, location: U(n2, this.clonePosition()) }, err: null };
|
|
2812
2779
|
case 44:
|
|
2813
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1,
|
|
2780
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, U(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
|
|
2814
2781
|
default:
|
|
2815
|
-
return this.error(3,
|
|
2782
|
+
return this.error(3, U(n2, this.clonePosition()));
|
|
2816
2783
|
}
|
|
2817
2784
|
}
|
|
2818
2785
|
parseIdentifierIfPossible() {
|
|
2819
|
-
let e6 = this.clonePosition(), t2 = this.offset(), n2 =
|
|
2820
|
-
return this.bumpTo(r2), { value: n2, location:
|
|
2786
|
+
let e6 = this.clonePosition(), t2 = this.offset(), n2 = la(this.message, t2), r2 = t2 + n2.length;
|
|
2787
|
+
return this.bumpTo(r2), { value: n2, location: U(e6, this.clonePosition()) };
|
|
2821
2788
|
}
|
|
2822
2789
|
parseArgumentOptions(e6, t2, n2, r2) {
|
|
2823
2790
|
let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
|
|
2824
2791
|
switch (a2) {
|
|
2825
2792
|
case ``:
|
|
2826
|
-
return this.error(4,
|
|
2793
|
+
return this.error(4, U(i2, o2));
|
|
2827
2794
|
case `number`:
|
|
2828
2795
|
case `date`:
|
|
2829
2796
|
case `time`: {
|
|
@@ -2833,15 +2800,15 @@ var ya = class {
|
|
|
2833
2800
|
this.bumpSpace();
|
|
2834
2801
|
let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
|
|
2835
2802
|
if (n3.err) return n3;
|
|
2836
|
-
let r3 =
|
|
2837
|
-
if (r3.length === 0) return this.error(6,
|
|
2838
|
-
e7 = { style: r3, styleLocation:
|
|
2803
|
+
let r3 = sa(n3.val);
|
|
2804
|
+
if (r3.length === 0) return this.error(6, U(this.clonePosition(), this.clonePosition()));
|
|
2805
|
+
e7 = { style: r3, styleLocation: U(t4, this.clonePosition()) };
|
|
2839
2806
|
}
|
|
2840
2807
|
let t3 = this.tryParseArgumentClose(r2);
|
|
2841
2808
|
if (t3.err) return t3;
|
|
2842
|
-
let i3 =
|
|
2809
|
+
let i3 = U(r2, this.clonePosition());
|
|
2843
2810
|
if (e7 && e7.style.startsWith(`::`)) {
|
|
2844
|
-
let t4 =
|
|
2811
|
+
let t4 = oa(e7.style.slice(2));
|
|
2845
2812
|
if (a2 === `number`) {
|
|
2846
2813
|
let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
|
|
2847
2814
|
return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
|
|
@@ -2849,8 +2816,8 @@ var ya = class {
|
|
|
2849
2816
|
{
|
|
2850
2817
|
if (t4.length === 0) return this.error(10, i3);
|
|
2851
2818
|
let r3 = t4;
|
|
2852
|
-
this.locale && (r3 =
|
|
2853
|
-
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ?
|
|
2819
|
+
this.locale && (r3 = Qi(t4, this.locale));
|
|
2820
|
+
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Ei(r3) : {} };
|
|
2854
2821
|
return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
|
|
2855
2822
|
}
|
|
2856
2823
|
}
|
|
@@ -2860,11 +2827,11 @@ var ya = class {
|
|
|
2860
2827
|
case `selectordinal`:
|
|
2861
2828
|
case `select`: {
|
|
2862
2829
|
let i3 = this.clonePosition();
|
|
2863
|
-
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12,
|
|
2830
|
+
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, U(i3, { ...i3 }));
|
|
2864
2831
|
this.bumpSpace();
|
|
2865
2832
|
let o3 = this.parseIdentifierIfPossible(), s2 = 0;
|
|
2866
2833
|
if (a2 !== `select` && o3.value === `offset`) {
|
|
2867
|
-
if (!this.bumpIf(`:`)) return this.error(13,
|
|
2834
|
+
if (!this.bumpIf(`:`)) return this.error(13, U(this.clonePosition(), this.clonePosition()));
|
|
2868
2835
|
this.bumpSpace();
|
|
2869
2836
|
let e7 = this.tryParseDecimalInteger(13, 14);
|
|
2870
2837
|
if (e7.err) return e7;
|
|
@@ -2874,15 +2841,15 @@ var ya = class {
|
|
|
2874
2841
|
if (c2.err) return c2;
|
|
2875
2842
|
let l2 = this.tryParseArgumentClose(r2);
|
|
2876
2843
|
if (l2.err) return l2;
|
|
2877
|
-
let u2 =
|
|
2878
|
-
return a2 === `select` ? { val: { type: 5, value: n2, options:
|
|
2844
|
+
let u2 = U(r2, this.clonePosition());
|
|
2845
|
+
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 };
|
|
2879
2846
|
}
|
|
2880
2847
|
default:
|
|
2881
|
-
return this.error(5,
|
|
2848
|
+
return this.error(5, U(i2, o2));
|
|
2882
2849
|
}
|
|
2883
2850
|
}
|
|
2884
2851
|
tryParseArgumentClose(e6) {
|
|
2885
|
-
return this.isEOF() || this.char() !== 125 ? this.error(1,
|
|
2852
|
+
return this.isEOF() || this.char() !== 125 ? this.error(1, U(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
|
|
2886
2853
|
}
|
|
2887
2854
|
parseSimpleArgStyleIfPossible() {
|
|
2888
2855
|
let e6 = 0, t2 = this.clonePosition();
|
|
@@ -2890,7 +2857,7 @@ var ya = class {
|
|
|
2890
2857
|
case 39: {
|
|
2891
2858
|
this.bump();
|
|
2892
2859
|
let e7 = this.clonePosition();
|
|
2893
|
-
if (!this.bumpUntil(`'`)) return this.error(11,
|
|
2860
|
+
if (!this.bumpUntil(`'`)) return this.error(11, U(e7, this.clonePosition()));
|
|
2894
2861
|
this.bump();
|
|
2895
2862
|
break;
|
|
2896
2863
|
}
|
|
@@ -2909,11 +2876,11 @@ var ya = class {
|
|
|
2909
2876
|
parseNumberSkeletonFromString(e6, t2) {
|
|
2910
2877
|
let n2 = [];
|
|
2911
2878
|
try {
|
|
2912
|
-
n2 =
|
|
2879
|
+
n2 = Oi(e6);
|
|
2913
2880
|
} catch {
|
|
2914
2881
|
return this.error(7, t2);
|
|
2915
2882
|
}
|
|
2916
|
-
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ?
|
|
2883
|
+
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Ri(n2) : {} }, err: null };
|
|
2917
2884
|
}
|
|
2918
2885
|
tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
|
|
2919
2886
|
let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
|
|
@@ -2923,20 +2890,20 @@ var ya = class {
|
|
|
2923
2890
|
if (t2 !== `select` && this.bumpIf(`=`)) {
|
|
2924
2891
|
let t3 = this.tryParseDecimalInteger(16, 19);
|
|
2925
2892
|
if (t3.err) return t3;
|
|
2926
|
-
c2 =
|
|
2893
|
+
c2 = U(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
|
|
2927
2894
|
} else break;
|
|
2928
2895
|
}
|
|
2929
2896
|
if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
|
|
2930
2897
|
s2 === `other` && (i2 = true), this.bumpSpace();
|
|
2931
2898
|
let r3 = this.clonePosition();
|
|
2932
|
-
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18,
|
|
2899
|
+
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, U(this.clonePosition(), this.clonePosition()));
|
|
2933
2900
|
let l2 = this.parseMessage(e6 + 1, t2, n2);
|
|
2934
2901
|
if (l2.err) return l2;
|
|
2935
2902
|
let u2 = this.tryParseArgumentClose(r3);
|
|
2936
2903
|
if (u2.err) return u2;
|
|
2937
|
-
a2.push([s2, { value: l2.val, location:
|
|
2904
|
+
a2.push([s2, { value: l2.val, location: U(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
|
|
2938
2905
|
}
|
|
2939
|
-
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16,
|
|
2906
|
+
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16, U(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i2 ? this.error(22, U(this.clonePosition(), this.clonePosition())) : { val: a2, err: null };
|
|
2940
2907
|
}
|
|
2941
2908
|
tryParseDecimalInteger(e6, t2) {
|
|
2942
2909
|
let n2 = 1, r2 = this.clonePosition();
|
|
@@ -2947,7 +2914,7 @@ var ya = class {
|
|
|
2947
2914
|
if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
|
|
2948
2915
|
else break;
|
|
2949
2916
|
}
|
|
2950
|
-
let o2 =
|
|
2917
|
+
let o2 = U(r2, this.clonePosition());
|
|
2951
2918
|
return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
|
|
2952
2919
|
}
|
|
2953
2920
|
offset() {
|
|
@@ -2995,7 +2962,7 @@ var ya = class {
|
|
|
2995
2962
|
}
|
|
2996
2963
|
}
|
|
2997
2964
|
bumpSpace() {
|
|
2998
|
-
for (; !this.isEOF() &&
|
|
2965
|
+
for (; !this.isEOF() && ha(this.char()); ) this.bump();
|
|
2999
2966
|
}
|
|
3000
2967
|
peek() {
|
|
3001
2968
|
if (this.isEOF()) return null;
|
|
@@ -3003,34 +2970,34 @@ var ya = class {
|
|
|
3003
2970
|
return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
|
|
3004
2971
|
}
|
|
3005
2972
|
};
|
|
3006
|
-
function
|
|
2973
|
+
function fa(e6) {
|
|
3007
2974
|
return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
|
|
3008
2975
|
}
|
|
3009
|
-
function
|
|
3010
|
-
return
|
|
2976
|
+
function pa(e6) {
|
|
2977
|
+
return fa(e6) || e6 === 47;
|
|
3011
2978
|
}
|
|
3012
|
-
function
|
|
2979
|
+
function ma(e6) {
|
|
3013
2980
|
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;
|
|
3014
2981
|
}
|
|
3015
|
-
function
|
|
2982
|
+
function ha(e6) {
|
|
3016
2983
|
return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
|
|
3017
2984
|
}
|
|
3018
|
-
function
|
|
2985
|
+
function ga(e6) {
|
|
3019
2986
|
e6.forEach((e7) => {
|
|
3020
|
-
if (delete e7.location,
|
|
3021
|
-
else
|
|
2987
|
+
if (delete e7.location, Gi(e7) || Ki(e7)) for (let t2 in e7.options) delete e7.options[t2].location, ga(e7.options[t2].value);
|
|
2988
|
+
else Hi(e7) && Yi(e7.style) || (Ui(e7) || Wi(e7)) && Xi(e7.style) ? delete e7.style.location : Ji(e7) && ga(e7.children);
|
|
3022
2989
|
});
|
|
3023
2990
|
}
|
|
3024
|
-
function
|
|
2991
|
+
function _a(e6, t2 = {}) {
|
|
3025
2992
|
t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
|
|
3026
|
-
let n2 = new
|
|
2993
|
+
let n2 = new da(e6, t2).parse();
|
|
3027
2994
|
if (n2.err) {
|
|
3028
|
-
let e7 = SyntaxError(
|
|
2995
|
+
let e7 = SyntaxError(zi[n2.err.kind]);
|
|
3029
2996
|
throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
|
|
3030
2997
|
}
|
|
3031
|
-
return t2?.captureLocation ||
|
|
2998
|
+
return t2?.captureLocation || ga(n2.val), n2.val;
|
|
3032
2999
|
}
|
|
3033
|
-
var
|
|
3000
|
+
var va = class extends Error {
|
|
3034
3001
|
constructor(e6, t2, n2) {
|
|
3035
3002
|
super(e6), this.code = t2, this.originalMessage = n2;
|
|
3036
3003
|
}
|
|
@@ -3038,54 +3005,54 @@ var Ea = class extends Error {
|
|
|
3038
3005
|
return `[formatjs Error: ${this.code}] ${this.message}`;
|
|
3039
3006
|
}
|
|
3040
3007
|
};
|
|
3041
|
-
var
|
|
3008
|
+
var ya = class extends va {
|
|
3042
3009
|
constructor(e6, t2, n2, r2) {
|
|
3043
3010
|
super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
|
|
3044
3011
|
}
|
|
3045
3012
|
};
|
|
3046
|
-
var
|
|
3013
|
+
var ba = class extends va {
|
|
3047
3014
|
constructor(e6, t2, n2) {
|
|
3048
3015
|
super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
|
|
3049
3016
|
}
|
|
3050
3017
|
};
|
|
3051
|
-
var
|
|
3018
|
+
var xa = class extends va {
|
|
3052
3019
|
constructor(e6, t2) {
|
|
3053
3020
|
super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
|
|
3054
3021
|
}
|
|
3055
3022
|
};
|
|
3056
|
-
function
|
|
3023
|
+
function Sa(e6) {
|
|
3057
3024
|
return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
|
|
3058
3025
|
let n2 = e7[e7.length - 1];
|
|
3059
3026
|
return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
|
|
3060
3027
|
}, []);
|
|
3061
3028
|
}
|
|
3062
|
-
function
|
|
3029
|
+
function Ca(e6) {
|
|
3063
3030
|
return typeof e6 == `function`;
|
|
3064
3031
|
}
|
|
3065
|
-
function
|
|
3066
|
-
if (e6.length === 1 &&
|
|
3032
|
+
function wa(e6, t2, n2, r2, i2, a2, o2) {
|
|
3033
|
+
if (e6.length === 1 && Bi(e6[0])) return [{ type: 0, value: e6[0].value }];
|
|
3067
3034
|
let s2 = [];
|
|
3068
3035
|
for (let c2 of e6) {
|
|
3069
|
-
if (
|
|
3036
|
+
if (Bi(c2)) {
|
|
3070
3037
|
s2.push({ type: 0, value: c2.value });
|
|
3071
3038
|
continue;
|
|
3072
3039
|
}
|
|
3073
|
-
if (
|
|
3040
|
+
if (qi(c2)) {
|
|
3074
3041
|
typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
|
|
3075
3042
|
continue;
|
|
3076
3043
|
}
|
|
3077
3044
|
let { value: e7 } = c2;
|
|
3078
|
-
if (!(i2 && e7 in i2)) throw new
|
|
3045
|
+
if (!(i2 && e7 in i2)) throw new xa(e7, o2);
|
|
3079
3046
|
let l2 = i2[e7];
|
|
3080
|
-
if (
|
|
3081
|
-
else if (
|
|
3082
|
-
let e8 = typeof c2.style == `string` ? r2.date[c2.style] :
|
|
3047
|
+
if (Vi(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 });
|
|
3048
|
+
else if (Ui(c2)) {
|
|
3049
|
+
let e8 = typeof c2.style == `string` ? r2.date[c2.style] : Xi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3083
3050
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3084
|
-
} else if (
|
|
3085
|
-
let e8 = typeof c2.style == `string` ? r2.time[c2.style] :
|
|
3051
|
+
} else if (Wi(c2)) {
|
|
3052
|
+
let e8 = typeof c2.style == `string` ? r2.time[c2.style] : Xi(c2.style) ? c2.style.parsedOptions : r2.time.medium;
|
|
3086
3053
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3087
|
-
} else if (
|
|
3088
|
-
let e8 = typeof c2.style == `string` ? r2.number[c2.style] :
|
|
3054
|
+
} else if (Hi(c2)) {
|
|
3055
|
+
let e8 = typeof c2.style == `string` ? r2.number[c2.style] : Yi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3089
3056
|
if (e8 && e8.scale) {
|
|
3090
3057
|
let t3 = e8.scale || 1;
|
|
3091
3058
|
if (typeof l2 == `bigint`) {
|
|
@@ -3095,40 +3062,40 @@ function Ma(e6, t2, n2, r2, i2, a2, o2) {
|
|
|
3095
3062
|
}
|
|
3096
3063
|
s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
|
|
3097
3064
|
} else {
|
|
3098
|
-
if (
|
|
3065
|
+
if (Ji(c2)) {
|
|
3099
3066
|
let { children: e8, value: l3 } = c2, u2 = i2[l3];
|
|
3100
|
-
if (!
|
|
3101
|
-
let d2 = u2(
|
|
3067
|
+
if (!Ca(u2)) throw new ba(l3, `function`, o2);
|
|
3068
|
+
let d2 = u2(wa(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
|
|
3102
3069
|
Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
|
|
3103
3070
|
}
|
|
3104
|
-
if (
|
|
3071
|
+
if (Gi(c2)) {
|
|
3105
3072
|
let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
|
|
3106
|
-
if (!a3) throw new
|
|
3107
|
-
s2.push(...
|
|
3108
|
-
} else if (
|
|
3073
|
+
if (!a3) throw new ya(c2.value, l2, Object.keys(c2.options), o2);
|
|
3074
|
+
s2.push(...wa(a3.value, t2, n2, r2, i2));
|
|
3075
|
+
} else if (Ki(c2)) {
|
|
3109
3076
|
let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
|
|
3110
3077
|
if (!a3) {
|
|
3111
|
-
if (!Intl.PluralRules) throw new
|
|
3078
|
+
if (!Intl.PluralRules) throw new va(`Intl.PluralRules is not available in this environment.
|
|
3112
3079
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3113
3080
|
`, `MISSING_INTL_API`, o2);
|
|
3114
3081
|
let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
|
|
3115
3082
|
a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
|
|
3116
3083
|
}
|
|
3117
|
-
if (!a3) throw new
|
|
3084
|
+
if (!a3) throw new ya(c2.value, l2, Object.keys(c2.options), o2);
|
|
3118
3085
|
let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
|
|
3119
|
-
s2.push(...
|
|
3086
|
+
s2.push(...wa(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
|
|
3120
3087
|
}
|
|
3121
3088
|
}
|
|
3122
3089
|
}
|
|
3123
|
-
return
|
|
3090
|
+
return Sa(s2);
|
|
3124
3091
|
}
|
|
3125
|
-
function
|
|
3092
|
+
function Ta(e6, t2) {
|
|
3126
3093
|
return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
|
|
3127
3094
|
}
|
|
3128
|
-
function
|
|
3129
|
-
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] =
|
|
3095
|
+
function Ea(e6, t2) {
|
|
3096
|
+
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Ta(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
|
|
3130
3097
|
}
|
|
3131
|
-
function
|
|
3098
|
+
function Da(e6) {
|
|
3132
3099
|
return { create() {
|
|
3133
3100
|
return { get(t2) {
|
|
3134
3101
|
return e6[t2];
|
|
@@ -3137,23 +3104,23 @@ function Fa(e6) {
|
|
|
3137
3104
|
} };
|
|
3138
3105
|
} };
|
|
3139
3106
|
}
|
|
3140
|
-
function
|
|
3141
|
-
return { getNumberFormat:
|
|
3107
|
+
function Oa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
|
|
3108
|
+
return { getNumberFormat: pi((...e7) => new Intl.NumberFormat(...e7), { cache: Da(e6.number), strategy: wi.variadic }), getDateTimeFormat: pi((...e7) => new Intl.DateTimeFormat(...e7), { cache: Da(e6.dateTime), strategy: wi.variadic }), getPluralRules: pi((...e7) => new Intl.PluralRules(...e7), { cache: Da(e6.pluralRules), strategy: wi.variadic }) };
|
|
3142
3109
|
}
|
|
3143
|
-
var
|
|
3110
|
+
var ka = class e5 {
|
|
3144
3111
|
constructor(t2, n2 = e5.defaultLocale, r2, i2) {
|
|
3145
3112
|
if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
|
|
3146
3113
|
let t3 = this.formatToParts(e6);
|
|
3147
3114
|
if (t3.length === 1) return t3[0].value;
|
|
3148
3115
|
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), []);
|
|
3149
3116
|
return n3.length <= 1 ? n3[0] || `` : n3;
|
|
3150
|
-
}, this.formatToParts = (e6) =>
|
|
3117
|
+
}, this.formatToParts = (e6) => wa(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`) {
|
|
3151
3118
|
if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
3152
3119
|
let { ...n3 } = i2 || {};
|
|
3153
3120
|
this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
|
|
3154
3121
|
} else this.ast = t2;
|
|
3155
3122
|
if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
|
|
3156
|
-
this.formats =
|
|
3123
|
+
this.formats = Ea(e5.formats, r2), this.formatters = i2 && i2.formatters || Oa(this.formatterCache);
|
|
3157
3124
|
}
|
|
3158
3125
|
static {
|
|
3159
3126
|
this.memoizedDefaultLocale = null;
|
|
@@ -3169,32 +3136,66 @@ var La = class e5 {
|
|
|
3169
3136
|
};
|
|
3170
3137
|
}
|
|
3171
3138
|
static {
|
|
3172
|
-
this.__parse =
|
|
3139
|
+
this.__parse = _a;
|
|
3173
3140
|
}
|
|
3174
3141
|
static {
|
|
3175
3142
|
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` } } };
|
|
3176
3143
|
}
|
|
3177
3144
|
};
|
|
3178
|
-
|
|
3179
|
-
|
|
3145
|
+
var Aa = [`__proto__`, `constructor`, `prototype`];
|
|
3146
|
+
function ja(e6, t2, n2) {
|
|
3147
|
+
function r2(e7) {
|
|
3148
|
+
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
3149
|
+
}
|
|
3150
|
+
function i2() {
|
|
3151
|
+
return !e6 || typeof e6 == `string`;
|
|
3152
|
+
}
|
|
3153
|
+
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
3154
|
+
if (i2()) return {};
|
|
3155
|
+
var o2 = r2(a2.shift());
|
|
3156
|
+
if (Aa.indexOf(o2) > -1) return {};
|
|
3157
|
+
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
3158
|
+
}
|
|
3159
|
+
if (i2()) return {};
|
|
3160
|
+
var s2 = r2(a2.shift());
|
|
3161
|
+
return Aa.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
3162
|
+
}
|
|
3163
|
+
function Ma(e6, t2, n2) {
|
|
3164
|
+
var r2 = ja(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
3165
|
+
i2 !== void 0 && (i2[a2] = n2);
|
|
3166
|
+
}
|
|
3167
|
+
function Na(e6, t2) {
|
|
3168
|
+
var n2 = ja(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
3169
|
+
if (r2) return r2[i2];
|
|
3170
|
+
}
|
|
3171
|
+
function Pa(e6) {
|
|
3172
|
+
return [...arguments].slice(1).forEach(function(t2) {
|
|
3173
|
+
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
3174
|
+
var i2 = r2[n2];
|
|
3175
|
+
Aa.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
3176
|
+
}
|
|
3177
|
+
}), e6;
|
|
3178
|
+
}
|
|
3179
|
+
function Fa(e6, t2) {
|
|
3180
|
+
return Ba(e6) || za(e6, t2) || La(e6, t2) || Ia();
|
|
3180
3181
|
}
|
|
3181
|
-
function
|
|
3182
|
+
function Ia() {
|
|
3182
3183
|
throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3183
3184
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3184
3185
|
}
|
|
3185
|
-
function
|
|
3186
|
+
function La(e6, t2) {
|
|
3186
3187
|
if (e6) {
|
|
3187
|
-
if (typeof e6 == `string`) return
|
|
3188
|
+
if (typeof e6 == `string`) return Ra(e6, t2);
|
|
3188
3189
|
var n2 = {}.toString.call(e6).slice(8, -1);
|
|
3189
|
-
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) ?
|
|
3190
|
+
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) ? Ra(e6, t2) : void 0;
|
|
3190
3191
|
}
|
|
3191
3192
|
}
|
|
3192
|
-
function
|
|
3193
|
+
function Ra(e6, t2) {
|
|
3193
3194
|
(t2 == null || t2 > e6.length) && (t2 = e6.length);
|
|
3194
3195
|
for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
|
|
3195
3196
|
return r2;
|
|
3196
3197
|
}
|
|
3197
|
-
function
|
|
3198
|
+
function za(e6, t2) {
|
|
3198
3199
|
var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
|
|
3199
3200
|
if (n2 != null) {
|
|
3200
3201
|
var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
|
|
@@ -3215,18 +3216,10 @@ function Ha(e6, t2) {
|
|
|
3215
3216
|
return s2;
|
|
3216
3217
|
}
|
|
3217
3218
|
}
|
|
3218
|
-
function
|
|
3219
|
+
function Ba(e6) {
|
|
3219
3220
|
if (Array.isArray(e6)) return e6;
|
|
3220
3221
|
}
|
|
3221
|
-
function
|
|
3222
|
-
"@babel/helpers - typeof";
|
|
3223
|
-
return U = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3224
|
-
return typeof e7;
|
|
3225
|
-
} : function(e7) {
|
|
3226
|
-
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3227
|
-
}, U(e6);
|
|
3228
|
-
}
|
|
3229
|
-
function Wa(e6, t2) {
|
|
3222
|
+
function Va(e6, t2) {
|
|
3230
3223
|
var n2 = Object.keys(e6);
|
|
3231
3224
|
if (Object.getOwnPropertySymbols) {
|
|
3232
3225
|
var r2 = Object.getOwnPropertySymbols(e6);
|
|
@@ -3236,85 +3229,121 @@ function Wa(e6, t2) {
|
|
|
3236
3229
|
}
|
|
3237
3230
|
return n2;
|
|
3238
3231
|
}
|
|
3239
|
-
function
|
|
3232
|
+
function Ha(e6) {
|
|
3240
3233
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
3241
3234
|
var n2 = arguments[t2] == null ? {} : arguments[t2];
|
|
3242
|
-
t2 % 2 ?
|
|
3243
|
-
|
|
3244
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) :
|
|
3235
|
+
t2 % 2 ? Va(Object(n2), true).forEach(function(t3) {
|
|
3236
|
+
Ua(e6, t3, n2[t3]);
|
|
3237
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : Va(Object(n2)).forEach(function(t3) {
|
|
3245
3238
|
Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
|
|
3246
3239
|
});
|
|
3247
3240
|
}
|
|
3248
3241
|
return e6;
|
|
3249
3242
|
}
|
|
3250
|
-
function
|
|
3251
|
-
return (t2 =
|
|
3243
|
+
function Ua(e6, t2, n2) {
|
|
3244
|
+
return (t2 = qa(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
|
|
3252
3245
|
}
|
|
3253
|
-
function
|
|
3246
|
+
function Wa(e6, t2) {
|
|
3254
3247
|
if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
|
|
3255
3248
|
}
|
|
3256
|
-
function
|
|
3249
|
+
function Ga(e6, t2) {
|
|
3257
3250
|
for (var n2 = 0; n2 < t2.length; n2++) {
|
|
3258
3251
|
var r2 = t2[n2];
|
|
3259
|
-
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6,
|
|
3252
|
+
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, qa(r2.key), r2);
|
|
3260
3253
|
}
|
|
3261
3254
|
}
|
|
3262
|
-
function
|
|
3263
|
-
return t2 &&
|
|
3255
|
+
function Ka(e6, t2, n2) {
|
|
3256
|
+
return t2 && Ga(e6.prototype, t2), n2 && Ga(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
|
|
3264
3257
|
}
|
|
3265
|
-
function
|
|
3266
|
-
var t2 =
|
|
3267
|
-
return
|
|
3258
|
+
function qa(e6) {
|
|
3259
|
+
var t2 = Ja(e6, `string`);
|
|
3260
|
+
return W(t2) == `symbol` ? t2 : t2 + ``;
|
|
3268
3261
|
}
|
|
3269
|
-
function
|
|
3270
|
-
if (
|
|
3262
|
+
function Ja(e6, t2) {
|
|
3263
|
+
if (W(e6) != `object` || !e6) return e6;
|
|
3271
3264
|
var n2 = e6[Symbol.toPrimitive];
|
|
3272
3265
|
if (n2 !== void 0) {
|
|
3273
3266
|
var r2 = n2.call(e6, t2 || `default`);
|
|
3274
|
-
if (
|
|
3267
|
+
if (W(r2) != `object`) return r2;
|
|
3275
3268
|
throw TypeError(`@@toPrimitive must return a primitive value.`);
|
|
3276
3269
|
}
|
|
3277
3270
|
return (t2 === `string` ? String : Number)(e6);
|
|
3278
3271
|
}
|
|
3279
|
-
function
|
|
3272
|
+
function W(e6) {
|
|
3273
|
+
"@babel/helpers - typeof";
|
|
3274
|
+
return W = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3275
|
+
return typeof e7;
|
|
3276
|
+
} : function(e7) {
|
|
3277
|
+
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3278
|
+
}, W(e6);
|
|
3279
|
+
}
|
|
3280
|
+
var Ya = `https://www.i18next.com/how-to/using-icu-or-mf2`;
|
|
3281
|
+
var Xa = [`zero`, `one`, `two`, `few`, `many`, `other`];
|
|
3282
|
+
function Za() {
|
|
3280
3283
|
return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
|
|
3281
3284
|
return n2;
|
|
3282
3285
|
}, parseLngForICU: function(e6) {
|
|
3283
3286
|
return e6;
|
|
3284
3287
|
}, escapeVariables: false };
|
|
3285
3288
|
}
|
|
3289
|
+
function Qa(e6, t2, n2, r2) {
|
|
3290
|
+
return n2 && t2 && W(t2) === `object` ? `${r2} resolved to an object or array, but i18next-icu does not support returnObjects or joinArrays and returns the raw value unformatted.` : n2 && typeof t2 == `string` && t2.indexOf(`{{`) > -1 ? `${r2} could not be parsed (${e6.message}). It contains "{{": i18next interpolation like {{name}} does not work with ICU, use {name}.` : `${r2} could not be ${n2 ? `parsed` : `formatted`}: ${e6.message}`;
|
|
3291
|
+
}
|
|
3286
3292
|
var $a = function() {
|
|
3287
3293
|
function e6(t2) {
|
|
3288
|
-
|
|
3294
|
+
Wa(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
|
|
3289
3295
|
}
|
|
3290
|
-
return
|
|
3296
|
+
return Ka(e6, [{ key: `init`, value: function(e7, t2) {
|
|
3291
3297
|
var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
|
|
3292
|
-
if (this.options =
|
|
3298
|
+
if (this.options = Pa(r2, t2, this.options || {}, Za()), this.formats = this.options.formats, e7) {
|
|
3293
3299
|
var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
|
|
3294
|
-
e7.IntlMessageFormat =
|
|
3300
|
+
e7.IntlMessageFormat = ka, e7.ICU = this, this.i18next = e7, this.debug = !!(e7.options && e7.options.debug), this.debug && e7.options.interpolation && e7.options.interpolation.escapeValue !== false && !this.options.escapeVariables && this.warn(`interpolation.escapeValue is not applied, values are inserted without HTML escaping. Set the i18next-icu option escapeVariables: true to escape them, or interpolation.escapeValue: false if your output is escaped elsewhere (e.g. by React).`), s2 && (a2 && e7.on(a2, function() {
|
|
3295
3301
|
return n2.clearCache();
|
|
3296
3302
|
}), o2 && e7.store.on(o2, function() {
|
|
3297
3303
|
return n2.clearCache();
|
|
3298
3304
|
}));
|
|
3299
3305
|
}
|
|
3300
3306
|
} }, { key: `addUserDefinedFormats`, value: function(e7) {
|
|
3301
|
-
this.formats = this.formats ?
|
|
3307
|
+
this.formats = this.formats ? Ha(Ha({}, this.formats), e7) : e7, this.clearCache();
|
|
3302
3308
|
} }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
|
|
3303
|
-
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize &&
|
|
3304
|
-
this.options.memoize
|
|
3309
|
+
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && [n2, r2, i2], c2;
|
|
3310
|
+
if (this.options.memoize) {
|
|
3311
|
+
var l2 = Na(this.mem, s2);
|
|
3312
|
+
l2 && l2.res === e7 && (c2 = l2.fc);
|
|
3313
|
+
}
|
|
3305
3314
|
try {
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
return this.
|
|
3315
|
+
c2 || (this.debug && typeof e7 == `string` && e7.indexOf(`$t(`) > -1 && this.firstTime(`nesting ${n2} ${r2} ${i2}`) && this.warn(`key "${i2}" (${n2}/${r2}) contains "$t(", but i18next-icu does not support nesting, the text is output as is.`), c2 = new ka(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && Ma(this.mem, s2, { res: e7, fc: c2 }));
|
|
3316
|
+
var u2 = t2 && t2.replace && W(t2.replace) === `object` ? Ha(Ha({}, t2), t2.replace) : t2;
|
|
3317
|
+
return c2.format(this.escapeVariableValues(u2));
|
|
3318
|
+
} catch (a3) {
|
|
3319
|
+
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(Qa(a3, e7, !c2, `key "${i2}" (${n2}/${r2})`)), this.options.parseErrorHandler(a3, i2, e7, t2);
|
|
3309
3320
|
}
|
|
3310
3321
|
} }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
|
|
3311
|
-
return e7;
|
|
3322
|
+
return this.debug && i2 && this.checkSuffixKeys(t2, n2, r2, i2), e7;
|
|
3323
|
+
} }, { key: `checkSuffixKeys`, value: function(e7, t2, n2, r2) {
|
|
3324
|
+
var i2 = r2.count, a2 = r2.context, o2 = this.i18next.options, s2 = o2.pluralSeparator, c2 = s2 === void 0 ? `_` : s2, l2 = o2.contextSeparator, u2 = l2 === void 0 ? `_` : l2, d2 = this.i18next.services.resourceStore, f2 = `key "${e7}" (${t2}/${n2})`;
|
|
3325
|
+
if (i2 !== void 0 && this.firstTime(`plural ${t2} ${n2} ${e7}`)) {
|
|
3326
|
+
var p2 = Xa.concat(Xa.map(function(e8) {
|
|
3327
|
+
return `ordinal${c2}${e8}`;
|
|
3328
|
+
})).map(function(t3) {
|
|
3329
|
+
return `${e7}${c2}${t3}`;
|
|
3330
|
+
}).filter(function(e8) {
|
|
3331
|
+
return d2.getResource(t2, n2, e8) !== void 0;
|
|
3332
|
+
});
|
|
3333
|
+
p2.length && this.warn(`${f2} was called with count, but i18next-icu does not look up plural suffix keys (${p2.join(`, `)}). Put the plural into the message: {count, plural, one {# item} other {# items}}.`);
|
|
3334
|
+
}
|
|
3335
|
+
var m2 = `${e7}${u2}${a2}`;
|
|
3336
|
+
a2 !== void 0 && a2 !== `` && this.firstTime(`context ${t2} ${n2} ${m2}`) && d2.getResource(t2, n2, m2) !== void 0 && this.warn(`${f2} was called with context "${a2}", but i18next-icu does not look up context keys (${m2}). Use a select in the message: {context, select, ${a2} {...} other {...}}.`);
|
|
3337
|
+
} }, { key: `firstTime`, value: function(e7) {
|
|
3338
|
+
return !this.warned.has(e7) && (this.warned.add(e7), true);
|
|
3339
|
+
} }, { key: `warn`, value: function(e7) {
|
|
3340
|
+
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${Ya}`);
|
|
3312
3341
|
} }, { key: `clearCache`, value: function() {
|
|
3313
3342
|
this.mem = {};
|
|
3314
3343
|
} }, { key: `escapeVariableValues`, value: function(e7) {
|
|
3315
|
-
if (!this.options.escapeVariables || !e7 ||
|
|
3344
|
+
if (!this.options.escapeVariables || !e7 || W(e7) !== `object`) return e7;
|
|
3316
3345
|
for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
|
|
3317
|
-
var i2 =
|
|
3346
|
+
var i2 = Fa(r2[n2], 2), a2 = i2[0], o2 = i2[1];
|
|
3318
3347
|
t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`) : o2;
|
|
3319
3348
|
}
|
|
3320
3349
|
return t2;
|
|
@@ -3328,11 +3357,11 @@ function eo({ icuOptions: e6 = {}, ...t2 }) {
|
|
|
3328
3357
|
var to = (e6, t2, n2, r2) => {
|
|
3329
3358
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
3330
3359
|
if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
|
|
3331
|
-
|
|
3360
|
+
G(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
|
|
3332
3361
|
};
|
|
3333
3362
|
var no = {};
|
|
3334
3363
|
var ro = (e6, t2, n2, r2) => {
|
|
3335
|
-
|
|
3364
|
+
G(n2) && no[n2] || (G(n2) && (no[n2] = /* @__PURE__ */ new Date()), to(e6, t2, n2, r2));
|
|
3336
3365
|
};
|
|
3337
3366
|
var io = (e6, t2) => () => {
|
|
3338
3367
|
if (e6.isInitialized) t2();
|
|
@@ -3349,7 +3378,7 @@ var ao = (e6, t2, n2) => {
|
|
|
3349
3378
|
e6.loadNamespaces(t2, io(e6, n2));
|
|
3350
3379
|
};
|
|
3351
3380
|
var oo = (e6, t2, n2, r2) => {
|
|
3352
|
-
if (
|
|
3381
|
+
if (G(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return ao(e6, n2, r2);
|
|
3353
3382
|
n2.forEach((t3) => {
|
|
3354
3383
|
e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
|
|
3355
3384
|
}), e6.loadLanguages(t2, io(e6, r2));
|
|
@@ -3357,7 +3386,7 @@ var oo = (e6, t2, n2, r2) => {
|
|
|
3357
3386
|
var so = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (ro(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
|
|
3358
3387
|
if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
|
|
3359
3388
|
} });
|
|
3360
|
-
var
|
|
3389
|
+
var G = (e6) => typeof e6 == `string`;
|
|
3361
3390
|
var co = (e6) => typeof e6 == `object` && !!e6;
|
|
3362
3391
|
var lo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
3363
3392
|
var uo = { "&": `&`, "&": `&`, "<": `<`, "<": `<`, ">": `>`, ">": `>`, "'": `'`, "'": `'`, """: `"`, """: `"`, " ": ` `, " ": ` `, "©": `\xA9`, "©": `\xA9`, "®": `\xAE`, "®": `\xAE`, "…": `\u2026`, "…": `\u2026`, "/": `/`, "/": `/` };
|
|
@@ -3392,12 +3421,12 @@ var So = (e6, t2 = {}) => {
|
|
|
3392
3421
|
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = (0, import_react.useContext)(_o) || {}, a2 = n2 || r2 || go();
|
|
3393
3422
|
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new vo()), !a2) {
|
|
3394
3423
|
ro(a2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
|
|
3395
|
-
let e7 = (e8, t4) =>
|
|
3424
|
+
let e7 = (e8, t4) => G(t4) ? t4 : co(t4) && G(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
|
|
3396
3425
|
return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
|
|
3397
3426
|
}
|
|
3398
3427
|
a2.options.react?.wait && ro(a2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
|
|
3399
3428
|
let c2 = { ...mo(), ...a2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = c2, p2 = e6 || i2 || a2.options?.defaultNS;
|
|
3400
|
-
p2 =
|
|
3429
|
+
p2 = G(p2) ? [p2] : p2 || [`translation`], a2.reportNamespaces.addUsedNamespaces?.(p2);
|
|
3401
3430
|
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) => so(e7, a2, c2)), h2 = xo(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), g2 = () => h2, _2 = () => bo(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), [v2, y2] = (0, import_react.useState)(g2), b2 = p2.join();
|
|
3402
3431
|
t2.lng && (b2 = `${t2.lng}${b2}`);
|
|
3403
3432
|
let x2 = yo(b2), S2 = (0, import_react.useRef)(true);
|
|
@@ -3454,7 +3483,7 @@ function Mo({ key: e6, warmupData: t2, fetchData: n2 }) {
|
|
|
3454
3483
|
if (a2) return a2.promise;
|
|
3455
3484
|
let o2 = Eo(e6);
|
|
3456
3485
|
if (o2 !== void 0) {
|
|
3457
|
-
let t3 =
|
|
3486
|
+
let t3 = Bn(o2);
|
|
3458
3487
|
return r2.set(e6, { promise: t3, expiresAt: i2 + Do }), t3;
|
|
3459
3488
|
}
|
|
3460
3489
|
let s2 = (async () => await t2.get(e6) ?? n2())();
|
|
@@ -3492,26 +3521,26 @@ var Bo = (e6, t2, n2) => {
|
|
|
3492
3521
|
});
|
|
3493
3522
|
};
|
|
3494
3523
|
var Vo = (e6) => e6.split(`-`)[0] ?? e6;
|
|
3495
|
-
|
|
3524
|
+
Sr({ isDev: false, loadMessages: (e6) => Bo(Object.assign({ "../assets/locale/messages_en.dev.json": () => vn(() => Promise.resolve().then(() => Ko), void 0, import_meta.url), "../assets/locale/messages_en.json": () => vn(() => Promise.resolve().then(() => Jo), void 0, import_meta.url) }), `../assets/locale/messages_${Vo(e6)}.json`, 4), loadDevMessages: (e6) => Bo(Object.assign({ "../assets/locale/messages_en.dev.json": () => vn(() => Promise.resolve().then(() => Ko), void 0, import_meta.url) }), `../assets/locale/messages_${Vo(e6)}.dev.json`, 4) });
|
|
3496
3525
|
var Ho = /* @__PURE__ */ new WeakMap();
|
|
3497
3526
|
function Uo(e6) {
|
|
3498
3527
|
let t2 = Ho.get(e6);
|
|
3499
3528
|
return t2 || (t2 = Ro(e6).finally(() => Ho.delete(e6)), Ho.set(e6, t2)), t2;
|
|
3500
3529
|
}
|
|
3501
3530
|
function Wo({ i18n: e6, locale: t2 }) {
|
|
3502
|
-
let n2 =
|
|
3531
|
+
let n2 = qn(), r2 = yr();
|
|
3503
3532
|
if (!n2) return null;
|
|
3504
3533
|
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw Uo(e6);
|
|
3505
3534
|
let i2 = zo(e6, t2);
|
|
3506
3535
|
return i2 && r2.set(No, { locale: t2, messages: i2 }), null;
|
|
3507
3536
|
}
|
|
3508
3537
|
function Go(e6) {
|
|
3509
|
-
let t2 =
|
|
3538
|
+
let t2 = gr(), n2 = Fo()?.locale ?? t2 ?? `en`;
|
|
3510
3539
|
return { i18n: Lo(n2, e6), locale: n2 };
|
|
3511
3540
|
}
|
|
3512
|
-
var Ko =
|
|
3541
|
+
var Ko = _({ default: () => qo });
|
|
3513
3542
|
var qo = { "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` };
|
|
3514
|
-
var Jo =
|
|
3543
|
+
var Jo = _({ default: () => Xo, title: () => Yo });
|
|
3515
3544
|
var Yo = `My App`;
|
|
3516
3545
|
var Xo = { "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: Yo, "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.` };
|
|
3517
3546
|
var Zo = Object.assign({ "../assets/locale/messages_en.dev.json": Ko, "../assets/locale/messages_en.json": Jo });
|
|
@@ -3519,12 +3548,12 @@ var Qo = (e6, t2) => {
|
|
|
3519
3548
|
let n2 = Zo[`../assets/locale/messages_${Vo(e6)}${t2}.json`];
|
|
3520
3549
|
return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
|
|
3521
3550
|
};
|
|
3522
|
-
var $o =
|
|
3551
|
+
var $o = Sr({ isDev: false, loadMessages: (e6) => Qo(e6, ``), loadDevMessages: (e6) => Qo(e6, `.dev`) });
|
|
3523
3552
|
var es = (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);
|
|
3524
|
-
var
|
|
3553
|
+
var K = { 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` };
|
|
3525
3554
|
var ts = (e6, t2) => {
|
|
3526
3555
|
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: es(r2, `full`, t2) });
|
|
3527
|
-
return { timeToRead: (t3) => e6(
|
|
3556
|
+
return { timeToRead: (t3) => e6(K.timeToRead, { count: t3 }), viewCount: n2(K.viewCount), commentCount: n2(K.commentCount), likeCount: n2(K.likeCount), noPostsEmptyState: () => ({ title: e6(K.noPostsTitle), description: e6(K.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(K.noRelatedPostsTitle), description: e6(K.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(K.canvasPostTitle), authorName: () => e6(K.canvasAuthorName), excerpt: () => e6(K.canvasExcerpt), content: () => e6(K.canvasContent), category: () => e6(K.canvasCategory), categoryNumbered: (t3) => e6(K.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(K.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(K.canvasCoverAlt), authorPhotoAlt: () => e6(K.canvasAuthorPhotoAlt) } };
|
|
3528
3557
|
};
|
|
3529
3558
|
function ns(e6) {
|
|
3530
3559
|
return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
|
|
@@ -3535,7 +3564,7 @@ function rs(e6) {
|
|
|
3535
3564
|
function is(e6) {
|
|
3536
3565
|
return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
|
|
3537
3566
|
}
|
|
3538
|
-
function
|
|
3567
|
+
function q(e6, t2) {
|
|
3539
3568
|
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...ns(e6) ? e6.$and : [e6], ...ns(t2) ? t2.$and : [t2]] };
|
|
3540
3569
|
}
|
|
3541
3570
|
function as(e6, t2) {
|
|
@@ -3614,7 +3643,7 @@ var ls = class extends ss {
|
|
|
3614
3643
|
function us(e6) {
|
|
3615
3644
|
let t2 = (n2) => ({ query: n2, async find() {
|
|
3616
3645
|
try {
|
|
3617
|
-
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [
|
|
3646
|
+
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [Ze]: a2, [Qe]: o2 } = e6.responseTransformer(i2);
|
|
3618
3647
|
if (e6.pagingMethod === `OFFSET`) {
|
|
3619
3648
|
let e7 = n2;
|
|
3620
3649
|
return new ls({ 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 });
|
|
@@ -3627,60 +3656,60 @@ function us(e6) {
|
|
|
3627
3656
|
}, skipTo(e7) {
|
|
3628
3657
|
return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
|
|
3629
3658
|
}, eq(r2, i2) {
|
|
3630
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3631
|
-
return t2({ ...n2, filter:
|
|
3659
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [J(e6.transformationPaths, r2)]: a2 };
|
|
3660
|
+
return t2({ ...n2, filter: q(n2.filter, o2) });
|
|
3632
3661
|
}, ne(r2, i2) {
|
|
3633
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3634
|
-
return t2({ ...n2, filter:
|
|
3662
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [J(e6.transformationPaths, r2)]: { $ne: a2 } };
|
|
3663
|
+
return t2({ ...n2, filter: q(n2.filter, o2) });
|
|
3635
3664
|
}, ge(r2, i2) {
|
|
3636
|
-
let a2 = { [
|
|
3637
|
-
return t2({ ...n2, filter:
|
|
3665
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $gte: i2 } };
|
|
3666
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3638
3667
|
}, gt(r2, i2) {
|
|
3639
|
-
let a2 = { [
|
|
3640
|
-
return t2({ ...n2, filter:
|
|
3668
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $gt: i2 } };
|
|
3669
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3641
3670
|
}, le(r2, i2) {
|
|
3642
|
-
let a2 = { [
|
|
3643
|
-
return t2({ ...n2, filter:
|
|
3671
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $lte: i2 } };
|
|
3672
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3644
3673
|
}, lt(r2, i2) {
|
|
3645
|
-
let a2 = { [
|
|
3646
|
-
return t2({ ...n2, filter:
|
|
3674
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $lt: i2 } };
|
|
3675
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3647
3676
|
}, isNotEmpty(e7) {
|
|
3648
3677
|
return this.ne(e7, null);
|
|
3649
3678
|
}, isEmpty(e7) {
|
|
3650
3679
|
return this.eq(e7, null);
|
|
3651
3680
|
}, startsWith(r2, i2) {
|
|
3652
|
-
let a2 = { [
|
|
3653
|
-
return t2({ ...n2, filter:
|
|
3681
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $startsWith: i2 } };
|
|
3682
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3654
3683
|
}, endsWith(r2, i2) {
|
|
3655
|
-
let a2 = { [
|
|
3656
|
-
return t2({ ...n2, filter:
|
|
3684
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $endsWith: i2 } };
|
|
3685
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3657
3686
|
}, contains(r2, i2) {
|
|
3658
|
-
let a2 = { [
|
|
3659
|
-
return t2({ ...n2, filter:
|
|
3687
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $contains: i2 } };
|
|
3688
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3660
3689
|
}, hasSome(r2, ...i2) {
|
|
3661
|
-
let a2 = { [
|
|
3662
|
-
return t2({ ...n2, filter:
|
|
3690
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3691
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3663
3692
|
}, hasAll(r2, ...i2) {
|
|
3664
|
-
let a2 = { [
|
|
3665
|
-
return t2({ ...n2, filter:
|
|
3693
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3694
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3666
3695
|
}, between(e7, t3, n3) {
|
|
3667
3696
|
return this.ge(e7, t3).lt(e7, n3);
|
|
3668
3697
|
}, in(r2, i2) {
|
|
3669
|
-
let a2 = { [
|
|
3670
|
-
return t2({ ...n2, filter:
|
|
3698
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $in: i2 } };
|
|
3699
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3671
3700
|
}, exists(r2, i2 = true) {
|
|
3672
|
-
let a2 = { [
|
|
3673
|
-
return t2({ ...n2, filter:
|
|
3701
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $exists: i2 } };
|
|
3702
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3674
3703
|
}, or(e7) {
|
|
3675
3704
|
return t2({ ...n2, filter: as(n2.filter, e7.query.filter) });
|
|
3676
3705
|
}, and(e7) {
|
|
3677
|
-
return t2({ ...n2, filter:
|
|
3706
|
+
return t2({ ...n2, filter: q(n2.filter, e7.query.filter) });
|
|
3678
3707
|
}, not(e7) {
|
|
3679
3708
|
return t2({ ...n2, filter: os(e7.query.filter) });
|
|
3680
3709
|
}, ascending(...r2) {
|
|
3681
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3710
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: J(e6.transformationPaths, t3), order: `ASC` }))] });
|
|
3682
3711
|
}, descending(...r2) {
|
|
3683
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3712
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: J(e6.transformationPaths, t3), order: `DESC` }))] });
|
|
3684
3713
|
}, skip(e7) {
|
|
3685
3714
|
return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
|
|
3686
3715
|
}, limit(r2) {
|
|
@@ -3693,9 +3722,9 @@ function us(e6) {
|
|
|
3693
3722
|
} });
|
|
3694
3723
|
return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
|
|
3695
3724
|
}
|
|
3696
|
-
function
|
|
3725
|
+
function J(e6, t2) {
|
|
3697
3726
|
let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
|
|
3698
|
-
return n2 ? t2.replace(n2, e6[n2]) :
|
|
3727
|
+
return n2 ? t2.replace(n2, e6[n2]) : et(t2, { ...e6, ...$e });
|
|
3699
3728
|
}
|
|
3700
3729
|
var ds = `filter`;
|
|
3701
3730
|
var fs = `sort`;
|
|
@@ -3731,23 +3760,23 @@ function Ss(e6, t2) {
|
|
|
3731
3760
|
return t2.typedQueryFunction(e6[0], e6[1]);
|
|
3732
3761
|
}
|
|
3733
3762
|
}
|
|
3734
|
-
function
|
|
3763
|
+
function Y(e6) {
|
|
3735
3764
|
if (!e6) return;
|
|
3736
3765
|
let t2 = ``;
|
|
3737
3766
|
return (e6.filename || e6.altText) && (t2 = `/${encodeURIComponent(e6.filename || e6.altText)}`), e6.id ? `wix:image://v1/${e6.id}${t2}#originWidth=${e6.width}&originHeight=${e6.height}` : e6.url;
|
|
3738
3767
|
}
|
|
3739
|
-
function
|
|
3768
|
+
function X(e6) {
|
|
3740
3769
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
3741
3770
|
}
|
|
3742
3771
|
var Cs = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
3743
3772
|
var ws = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
3744
3773
|
function Ts(e6) {
|
|
3745
|
-
return
|
|
3774
|
+
return Lt(Object.assign(e6, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/category`, destPath: `/v3/bulk/category` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/categories`, destPath: `/v3/bulk/categories` }], "*.pub.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "bo._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wixbo.ai": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wix-bo.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "social-blog._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], _: [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www.wixapis.com": [{ srcPath: `/blog/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/v3/categories`, destPath: `/v3/categories` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "api._api_base_domain_": [{ srcPath: `/category-service-api-proxy`, destPath: `` }] } }));
|
|
3746
3775
|
}
|
|
3747
3776
|
var Es = `@wix/auto_sdk_blog_categories`;
|
|
3748
3777
|
function Ds(e6) {
|
|
3749
3778
|
function t2({ host: t3 }) {
|
|
3750
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Es, migrationOptions: { optInTransformResponse: true }, url: Ts({ protoPath: `/v3/categories`, data: e6, host: t3 }), params:
|
|
3779
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Es, migrationOptions: { optInTransformResponse: true }, url: Ts({ protoPath: `/v3/categories`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Cs }, { transformFn: dn, paths: ws }]) };
|
|
3751
3780
|
}
|
|
3752
3781
|
return t2;
|
|
3753
3782
|
}
|
|
@@ -3758,7 +3787,7 @@ async function As(e6) {
|
|
|
3758
3787
|
n2?.onSiteCall?.();
|
|
3759
3788
|
try {
|
|
3760
3789
|
let e7 = await t2.request(r2);
|
|
3761
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3790
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Os }, { transformFn: Y, paths: ks }]));
|
|
3762
3791
|
} catch (e7) {
|
|
3763
3792
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3764
3793
|
throw n2?.onError?.(e7), t3;
|
|
@@ -3768,7 +3797,7 @@ function js(e6) {
|
|
|
3768
3797
|
return (t2) => As(t2, { httpClient: e6 });
|
|
3769
3798
|
}
|
|
3770
3799
|
var Ms = M(js);
|
|
3771
|
-
function
|
|
3800
|
+
function Ns(e6) {
|
|
3772
3801
|
if (!e6) return;
|
|
3773
3802
|
let t2 = ``;
|
|
3774
3803
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -3783,69 +3812,69 @@ function X(e6) {
|
|
|
3783
3812
|
}
|
|
3784
3813
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
3785
3814
|
}
|
|
3786
|
-
var
|
|
3787
|
-
var
|
|
3788
|
-
var Fs = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3789
|
-
var
|
|
3790
|
-
var
|
|
3791
|
-
var Rs = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3792
|
-
var
|
|
3793
|
-
function
|
|
3794
|
-
return
|
|
3795
|
-
}
|
|
3796
|
-
var
|
|
3797
|
-
function
|
|
3815
|
+
var Ps = [{ path: `post.firstPublishedDate` }, { path: `post.lastPublishedDate` }, { path: `post.expirationDate` }, { path: `post.heroImage.urlExpirationDate` }, { path: `post.richContent.metadata.createdTimestamp` }, { path: `post.richContent.metadata.updatedTimestamp` }, { path: `post.moderationDetails.submittedDate` }, { path: `post.moderationDetails.moderationDate` }, { path: `post.media.wixMedia.image.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
3816
|
+
var Fs = [{ path: `post.richContentCompressed` }];
|
|
3817
|
+
var Is = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3818
|
+
var Ls = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.expirationDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
3819
|
+
var Rs = [{ path: `posts.richContentCompressed` }];
|
|
3820
|
+
var zs = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3821
|
+
var Bs = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3822
|
+
function Vs(e6) {
|
|
3823
|
+
return Lt(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` }] } }));
|
|
3824
|
+
}
|
|
3825
|
+
var Hs = `@wix/auto_sdk_blog_posts`;
|
|
3826
|
+
function Us(e6) {
|
|
3798
3827
|
function t2({ host: t3 }) {
|
|
3799
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName:
|
|
3828
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName: Hs, migrationOptions: { optInTransformResponse: true }, url: Vs({ protoPath: `/v3/posts/slugs/{slug}`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ps }, { transformFn: fn, paths: Fs }, { transformFn: dn, paths: Is }]) };
|
|
3800
3829
|
}
|
|
3801
3830
|
return t2;
|
|
3802
3831
|
}
|
|
3803
|
-
function
|
|
3832
|
+
function Ws(e6) {
|
|
3804
3833
|
function t2({ host: t3 }) {
|
|
3805
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName:
|
|
3834
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName: Hs, migrationOptions: { optInTransformResponse: true }, url: Vs({ protoPath: `/v3/posts`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ls }, { transformFn: fn, paths: Rs }, { transformFn: dn, paths: zs }]) };
|
|
3806
3835
|
}
|
|
3807
3836
|
return t2;
|
|
3808
3837
|
}
|
|
3809
|
-
function
|
|
3838
|
+
function Gs(e6) {
|
|
3810
3839
|
function t2({ host: t3 }) {
|
|
3811
|
-
let n2 = A(e6, [{ transformFn:
|
|
3812
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
3840
|
+
let n2 = A(e6, [{ transformFn: un, paths: Bs }]);
|
|
3841
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Hs, migrationOptions: { optInTransformResponse: true }, url: Vs({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ls }, { transformFn: fn, paths: Rs }, { transformFn: dn, paths: zs }]) };
|
|
3813
3842
|
}
|
|
3814
3843
|
return t2;
|
|
3815
3844
|
}
|
|
3816
|
-
var
|
|
3817
|
-
var
|
|
3818
|
-
var
|
|
3819
|
-
var
|
|
3820
|
-
var
|
|
3821
|
-
var
|
|
3845
|
+
var Ks = [{ path: `post.url` }, { path: `post.translations.url` }];
|
|
3846
|
+
var qs = [{ path: `post.heroImage` }, { path: `post.media.wixMedia.image` }];
|
|
3847
|
+
var Js = [{ path: `post.media.wixMedia.videoV2` }];
|
|
3848
|
+
var Ys = [{ path: `posts.url` }, { path: `posts.translations.url` }];
|
|
3849
|
+
var Xs = [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }];
|
|
3850
|
+
var Zs = [{ path: `posts.media.wixMedia.videoV2` }];
|
|
3822
3851
|
var Z = ((e6) => (e6.UNKNOWN = `UNKNOWN`, e6.COUNTERS = `COUNTERS`, e6.URL = `URL`, e6.CONTENT_TEXT = `CONTENT_TEXT`, e6.METRICS = `METRICS`, e6.SEO = `SEO`, e6.CONTENT = `CONTENT`, e6.INTERNAL_ID = `INTERNAL_ID`, e6.CONTACT_ID = `CONTACT_ID`, e6.RICH_CONTENT = `RICH_CONTENT`, e6.RICH_CONTENT_STRING = `RICH_CONTENT_STRING`, e6.RICH_CONTENT_COMPRESSED = `RICH_CONTENT_COMPRESSED`, e6.TRANSLATIONS = `TRANSLATIONS`, e6.REFERENCE_ID = `REFERENCE_ID`, e6.EXCLUDE_PAID_CONTENT = `EXCLUDE_PAID_CONTENT`, e6.SEO_DATA = `SEO_DATA`, e6.OWNER = `OWNER`, e6.HAS_UNPUBLISHED_CHANGES = `HAS_UNPUBLISHED_CHANGES`, e6.HEADING = `HEADING`, e6.IMAGE = `IMAGE`, e6))(Z || {});
|
|
3823
|
-
async function
|
|
3824
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3852
|
+
async function Qs(e6, t2) {
|
|
3853
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Us(D({ slug: e6, fieldsets: t2?.fieldsets, language: t2?.language }, []));
|
|
3825
3854
|
r2?.onSiteCall?.();
|
|
3826
3855
|
try {
|
|
3827
3856
|
let e7 = await n2.request(i2);
|
|
3828
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3857
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Ks }, { transformFn: Y, paths: qs }, { transformFn: Ns, paths: Js }]), [`post.richContent`, `post.rich_content`]);
|
|
3829
3858
|
} catch (e7) {
|
|
3830
3859
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fieldsets: `$[1].fieldsets`, language: `$[1].language` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
|
|
3831
3860
|
throw r2?.onError?.(e7), t3;
|
|
3832
3861
|
}
|
|
3833
3862
|
}
|
|
3834
|
-
async function
|
|
3835
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3863
|
+
async function $s(e6) {
|
|
3864
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Ws(D({ featured: e6?.featured, hashtags: e6?.hashtags, categoryIds: e6?.categoryIds, tagIds: e6?.tagIds, sort: e6?.sort, paging: e6?.paging, language: e6?.language, memberId: e6?.memberId, fieldsets: e6?.fieldsets }, []));
|
|
3836
3865
|
n2?.onSiteCall?.();
|
|
3837
3866
|
try {
|
|
3838
3867
|
let e7 = await t2.request(r2);
|
|
3839
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3868
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Ys }, { transformFn: Y, paths: Xs }, { transformFn: Ns, paths: Zs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3840
3869
|
} catch (e7) {
|
|
3841
3870
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { featured: `$[0].featured`, hashtags: `$[0].hashtags`, categoryIds: `$[0].categoryIds`, tagIds: `$[0].tagIds`, sort: `$[0].sort`, paging: `$[0].paging`, language: `$[0].language`, memberId: `$[0].memberId`, fieldsets: `$[0].fieldsets` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3842
3871
|
throw n2?.onError?.(e7), t3;
|
|
3843
3872
|
}
|
|
3844
3873
|
}
|
|
3845
|
-
function
|
|
3874
|
+
function ec(e6) {
|
|
3846
3875
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3847
3876
|
return us({ func: async (r2) => {
|
|
3848
|
-
let i2 =
|
|
3877
|
+
let i2 = Gs({ ...r2, ...e6 ?? {} });
|
|
3849
3878
|
n2?.onSiteCall?.();
|
|
3850
3879
|
try {
|
|
3851
3880
|
let e7 = await t2.request(i2);
|
|
@@ -3857,76 +3886,76 @@ function $s(e6) {
|
|
|
3857
3886
|
let n3 = [t3, e6];
|
|
3858
3887
|
return D({ ...n3?.[1], query: n3?.[0] }, []);
|
|
3859
3888
|
}, responseTransformer: ({ data: e7 }) => {
|
|
3860
|
-
let t3 = O(A(e7, [{ transformFn:
|
|
3889
|
+
let t3 = O(A(e7, [{ transformFn: X, paths: Ys }, { transformFn: Y, paths: Xs }, { transformFn: Ns, paths: Zs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3861
3890
|
return { items: t3?.posts, pagingMetadata: t3?.pagingMetadata };
|
|
3862
3891
|
}, errorTransformer: (e7) => {
|
|
3863
3892
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3864
3893
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
3865
3894
|
}
|
|
3866
|
-
async function
|
|
3867
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3895
|
+
async function tc(e6, t2) {
|
|
3896
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Gs(D({ query: e6, ...t2 }, []));
|
|
3868
3897
|
r2?.onSiteCall?.();
|
|
3869
3898
|
try {
|
|
3870
3899
|
let e7 = await n2.request(i2);
|
|
3871
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3900
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Ys }, { transformFn: Y, paths: Xs }, { transformFn: Ns, paths: Zs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3872
3901
|
} catch (e7) {
|
|
3873
3902
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
3874
3903
|
throw r2?.onError?.(e7), t3;
|
|
3875
3904
|
}
|
|
3876
3905
|
}
|
|
3877
|
-
function tc(e6) {
|
|
3878
|
-
return (t2, n2) => Zs(t2, n2, { httpClient: e6 });
|
|
3879
|
-
}
|
|
3880
3906
|
function nc(e6) {
|
|
3881
|
-
return (t2) => Qs(t2, { httpClient: e6 });
|
|
3907
|
+
return (t2, n2) => Qs(t2, n2, { httpClient: e6 });
|
|
3882
3908
|
}
|
|
3883
3909
|
function rc(e6) {
|
|
3884
3910
|
return (t2) => $s(t2, { httpClient: e6 });
|
|
3885
3911
|
}
|
|
3886
3912
|
function ic(e6) {
|
|
3887
|
-
return (t2
|
|
3913
|
+
return (t2) => ec(t2, { httpClient: e6 });
|
|
3888
3914
|
}
|
|
3889
3915
|
function ac(e6) {
|
|
3890
|
-
|
|
3916
|
+
return (t2, n2) => tc(t2, n2, { httpClient: e6 });
|
|
3917
|
+
}
|
|
3918
|
+
function oc(e6) {
|
|
3919
|
+
let t2 = bs({ builderQueryFunction: (t3) => ic(e6)(t3), typedQueryFunction: (t3, n3) => ac(e6)(t3, n3), hasOptionsParameter: true });
|
|
3891
3920
|
function n2(e7, n3) {
|
|
3892
3921
|
return t2(...arguments);
|
|
3893
3922
|
}
|
|
3894
3923
|
return n2;
|
|
3895
3924
|
}
|
|
3896
|
-
var oc = M(tc);
|
|
3897
3925
|
var sc = M(nc);
|
|
3898
|
-
var cc = M(
|
|
3899
|
-
var lc = (
|
|
3900
|
-
var uc = `
|
|
3901
|
-
var dc =
|
|
3902
|
-
|
|
3926
|
+
var cc = M(rc);
|
|
3927
|
+
var lc = M(oc);
|
|
3928
|
+
var uc = (e6) => O(A(e6, [{ transformFn: X, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: Y, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: Ns, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
|
|
3929
|
+
var dc = `https://blog.wixsite.com/blog-demo-posts`;
|
|
3930
|
+
var fc = M((e6) => async (t2) => {
|
|
3931
|
+
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${It(t2)}`);
|
|
3903
3932
|
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
3904
|
-
return
|
|
3933
|
+
return uc(await n2.json()).filter((e7) => !e7.url?.startsWith(dc));
|
|
3905
3934
|
});
|
|
3906
|
-
var
|
|
3935
|
+
var pc = async (e6) => {
|
|
3907
3936
|
try {
|
|
3908
|
-
return await
|
|
3937
|
+
return await fc(e6);
|
|
3909
3938
|
} catch (e7) {
|
|
3910
3939
|
return console.info(`[blog demo posts]`, `read failed`, e7), [];
|
|
3911
3940
|
}
|
|
3912
3941
|
};
|
|
3913
|
-
var
|
|
3914
|
-
var
|
|
3915
|
-
function
|
|
3916
|
-
return
|
|
3942
|
+
var mc = [{ path: `members.createdDate` }, { path: `members.updatedDate` }, { path: `members.lastLoginDate` }];
|
|
3943
|
+
var hc = [{ path: `query.sorting.origin.latitude` }, { path: `query.sorting.origin.longitude` }];
|
|
3944
|
+
function gc(e6) {
|
|
3945
|
+
return Lt(Object.assign(e6, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/members/v1/members`, destPath: `/v1/members` }], "api._api_base_domain_": [{ srcPath: `/members-ng-api`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "manage._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "blocks._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "create.editorx": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "*.dev.wix-code.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "bo._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wixbo.ai": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wix-bo.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], _: [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "members.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }] } }));
|
|
3917
3946
|
}
|
|
3918
|
-
var
|
|
3919
|
-
function
|
|
3947
|
+
var _c = `@wix/auto_sdk_members_members`;
|
|
3948
|
+
function vc(e6) {
|
|
3920
3949
|
function t2({ host: t3 }) {
|
|
3921
|
-
let n2 = A(e6, [{ transformFn:
|
|
3922
|
-
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName:
|
|
3950
|
+
let n2 = A(e6, [{ transformFn: un, paths: hc }]);
|
|
3951
|
+
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName: _c, migrationOptions: { optInTransformResponse: true }, url: gc({ protoPath: `/v1/members/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: mc }]) };
|
|
3923
3952
|
}
|
|
3924
3953
|
return t2;
|
|
3925
3954
|
}
|
|
3926
|
-
function
|
|
3955
|
+
function yc(e6) {
|
|
3927
3956
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3928
3957
|
return us({ func: async (r2) => {
|
|
3929
|
-
let i2 =
|
|
3958
|
+
let i2 = vc({ ...r2, ...e6 ?? {} });
|
|
3930
3959
|
n2?.onSiteCall?.();
|
|
3931
3960
|
try {
|
|
3932
3961
|
let e7 = await t2.request(i2);
|
|
@@ -3944,8 +3973,8 @@ function vc(e6) {
|
|
|
3944
3973
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3945
3974
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
3946
3975
|
}
|
|
3947
|
-
async function
|
|
3948
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3976
|
+
async function bc(e6, t2) {
|
|
3977
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = vc(D({ query: e6, ...t2 }));
|
|
3949
3978
|
r2?.onSiteCall?.();
|
|
3950
3979
|
try {
|
|
3951
3980
|
let e7 = await n2.request(i2);
|
|
@@ -3955,25 +3984,25 @@ async function yc(e6, t2) {
|
|
|
3955
3984
|
throw r2?.onError?.(e7), t3;
|
|
3956
3985
|
}
|
|
3957
3986
|
}
|
|
3958
|
-
function bc(e6) {
|
|
3959
|
-
return (t2) => vc(t2, { httpClient: e6 });
|
|
3960
|
-
}
|
|
3961
3987
|
function xc(e6) {
|
|
3962
|
-
return (t2
|
|
3988
|
+
return (t2) => yc(t2, { httpClient: e6 });
|
|
3963
3989
|
}
|
|
3964
3990
|
function Sc(e6) {
|
|
3965
|
-
|
|
3991
|
+
return (t2, n2) => bc(t2, n2, { httpClient: e6 });
|
|
3992
|
+
}
|
|
3993
|
+
function Cc(e6) {
|
|
3994
|
+
let t2 = bs({ builderQueryFunction: (t3) => xc(e6)(t3), typedQueryFunction: (t3, n3) => Sc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3966
3995
|
function n2(e7, n3) {
|
|
3967
3996
|
return t2(...arguments);
|
|
3968
3997
|
}
|
|
3969
3998
|
return n2;
|
|
3970
3999
|
}
|
|
3971
|
-
var
|
|
3972
|
-
var
|
|
4000
|
+
var wc = M(Cc);
|
|
4001
|
+
var Tc = async (e6) => {
|
|
3973
4002
|
let t2 = [...new Set(e6.filter((e7) => !!e7))];
|
|
3974
4003
|
if (t2.length === 0) return {};
|
|
3975
4004
|
try {
|
|
3976
|
-
let { items: e7 } = await
|
|
4005
|
+
let { items: e7 } = await wc({ fieldsets: [`PUBLIC`] }).in(`_id`, t2).limit(t2.length).find();
|
|
3977
4006
|
return Object.fromEntries(e7.flatMap((e8) => {
|
|
3978
4007
|
let { _id: t3 } = e8;
|
|
3979
4008
|
return t3 ? [[t3, e8]] : [];
|
|
@@ -3982,32 +4011,32 @@ var wc = async (e6) => {
|
|
|
3982
4011
|
return {};
|
|
3983
4012
|
}
|
|
3984
4013
|
};
|
|
3985
|
-
var
|
|
3986
|
-
var
|
|
3987
|
-
var Dc = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3988
|
-
var
|
|
3989
|
-
function
|
|
3990
|
-
return
|
|
4014
|
+
var Ec = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.expirationDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
4015
|
+
var Dc = [{ path: `posts.richContentCompressed` }];
|
|
4016
|
+
var Oc = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
4017
|
+
var kc = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
4018
|
+
function Ac(e6) {
|
|
4019
|
+
return Lt(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` }] } }));
|
|
3991
4020
|
}
|
|
3992
|
-
var
|
|
3993
|
-
function
|
|
4021
|
+
var jc = `@wix/auto_sdk_blog_posts`;
|
|
4022
|
+
function Mc(e6) {
|
|
3994
4023
|
function t2({ host: t3 }) {
|
|
3995
|
-
let n2 = A(e6, [{ transformFn:
|
|
3996
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
4024
|
+
let n2 = A(e6, [{ transformFn: un, paths: kc }]);
|
|
4025
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: jc, migrationOptions: { optInTransformResponse: true }, url: Ac({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ec }, { transformFn: fn, paths: Dc }, { transformFn: dn, paths: Oc }]) };
|
|
3997
4026
|
}
|
|
3998
4027
|
return t2;
|
|
3999
4028
|
}
|
|
4000
|
-
function
|
|
4001
|
-
let e6 =
|
|
4029
|
+
function Nc() {
|
|
4030
|
+
let e6 = Mc({});
|
|
4002
4031
|
return { getUrl: (t2) => {
|
|
4003
4032
|
let { url: n2 } = e6(t2);
|
|
4004
4033
|
return n2;
|
|
4005
4034
|
}, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
|
|
4006
4035
|
}
|
|
4007
|
-
var
|
|
4008
|
-
var
|
|
4009
|
-
var
|
|
4010
|
-
let { data: n2 } = await e6.request(
|
|
4036
|
+
var Pc = Nc();
|
|
4037
|
+
var Fc = (e6) => (t2) => ({ method: `POST`, url: Pc.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4038
|
+
var Ic = M((e6) => async (t2) => {
|
|
4039
|
+
let { data: n2 } = await e6.request(Fc(t2)), r2 = {};
|
|
4011
4040
|
for (let e7 of n2.posts ?? []) {
|
|
4012
4041
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
4013
4042
|
if (!t3 || !n3?.length) continue;
|
|
@@ -4016,157 +4045,184 @@ var Fc = M((e6) => async (t2) => {
|
|
|
4016
4045
|
}
|
|
4017
4046
|
return r2;
|
|
4018
4047
|
});
|
|
4019
|
-
var
|
|
4048
|
+
var Lc = async (e6) => {
|
|
4020
4049
|
if (e6.length === 0) return {};
|
|
4021
4050
|
try {
|
|
4022
|
-
return await
|
|
4051
|
+
return await Ic(e6);
|
|
4023
4052
|
} catch {
|
|
4024
4053
|
return {};
|
|
4025
4054
|
}
|
|
4026
4055
|
};
|
|
4027
|
-
var
|
|
4056
|
+
var Rc = class extends Error {
|
|
4028
4057
|
constructor(e6, t2) {
|
|
4029
4058
|
super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
|
|
4030
4059
|
}
|
|
4031
4060
|
};
|
|
4032
|
-
var
|
|
4061
|
+
var zc = (e6, t2, n2) => {
|
|
4033
4062
|
let r2, i2 = new Promise((e7, i3) => {
|
|
4034
|
-
r2 = setTimeout(() => i3(new
|
|
4063
|
+
r2 = setTimeout(() => i3(new Rc(n2, t2)), t2);
|
|
4035
4064
|
});
|
|
4036
4065
|
return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
|
|
4037
4066
|
};
|
|
4038
4067
|
Z.RICH_CONTENT, Z.SEO, Z.URL, Z.CONTENT_TEXT, Z.RICH_CONTENT, Z.URL;
|
|
4039
|
-
var
|
|
4040
|
-
var
|
|
4068
|
+
var Bc = [Z.URL, Z.METRICS];
|
|
4069
|
+
var Vc = (e6) => {
|
|
4041
4070
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4042
4071
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
4043
4072
|
};
|
|
4044
|
-
var
|
|
4045
|
-
if (t2 && !
|
|
4073
|
+
var Hc = (e6, t2) => {
|
|
4074
|
+
if (t2 && !Vc(e6)) throw e6;
|
|
4046
4075
|
};
|
|
4047
|
-
var
|
|
4048
|
-
var
|
|
4049
|
-
var
|
|
4076
|
+
var Uc = (e6) => Tc(e6.map(({ memberId: e7 }) => e7));
|
|
4077
|
+
var Wc = (e6) => Lc(e6.filter((e7) => e7.media?.wixMedia?.videoV2).map(({ _id: e7 }) => e7).filter((e7) => !!e7));
|
|
4078
|
+
var Gc = async (e6, t2, n2 = false, r2) => {
|
|
4050
4079
|
try {
|
|
4051
|
-
let { post: n3 } = await
|
|
4080
|
+
let { post: n3 } = await sc(e6, { ...t2 && { fieldsets: t2 }, ...r2 && { language: r2 } });
|
|
4052
4081
|
if (n3) return n3;
|
|
4053
4082
|
} catch (e7) {
|
|
4054
|
-
|
|
4083
|
+
Hc(e7, n2);
|
|
4055
4084
|
}
|
|
4056
4085
|
try {
|
|
4057
|
-
let { items: n3 } = await
|
|
4086
|
+
let { items: n3 } = await lc(t2 ? { fieldsets: t2 } : void 0).eq(`slug`, e6).limit(1).find();
|
|
4058
4087
|
return n3[0];
|
|
4059
4088
|
} catch (e7) {
|
|
4060
|
-
|
|
4089
|
+
Hc(e7, n2);
|
|
4061
4090
|
return;
|
|
4062
4091
|
}
|
|
4063
4092
|
};
|
|
4064
|
-
var
|
|
4093
|
+
var Kc = async (e6, t2 = false, n2) => {
|
|
4065
4094
|
try {
|
|
4066
4095
|
let t3 = async (t4) => {
|
|
4067
|
-
let { posts: r2 } = await
|
|
4096
|
+
let { posts: r2 } = await cc({ paging: { limit: 1 }, ...e6 && { fieldsets: e6 }, ...t4 && n2 && { language: n2 } });
|
|
4068
4097
|
return r2?.[0];
|
|
4069
4098
|
};
|
|
4070
4099
|
return await t3(true) ?? (n2 ? await t3(false) : void 0);
|
|
4071
4100
|
} catch (e7) {
|
|
4072
|
-
|
|
4101
|
+
Hc(e7, t2);
|
|
4073
4102
|
return;
|
|
4074
4103
|
}
|
|
4075
4104
|
};
|
|
4076
|
-
var
|
|
4077
|
-
var
|
|
4105
|
+
var qc = 100;
|
|
4106
|
+
var Jc = async () => {
|
|
4078
4107
|
try {
|
|
4079
|
-
let { categories: e6 } = await Ms({ paging: { limit:
|
|
4108
|
+
let { categories: e6 } = await Ms({ paging: { limit: qc } });
|
|
4080
4109
|
return e6 ?? [];
|
|
4081
4110
|
} catch {
|
|
4082
4111
|
return [];
|
|
4083
4112
|
}
|
|
4084
4113
|
};
|
|
4085
|
-
var
|
|
4114
|
+
var Yc = (e6, t2) => {
|
|
4086
4115
|
let { categoryIds: n2 } = e6 ?? {};
|
|
4087
4116
|
if (!n2?.length) return [];
|
|
4088
4117
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4089
4118
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4090
4119
|
};
|
|
4091
|
-
var
|
|
4120
|
+
var Xc = (e6, t2) => {
|
|
4092
4121
|
let n2 = {};
|
|
4093
|
-
for (let r2 of e6) for (let { _id: e7, label: i2 } of
|
|
4122
|
+
for (let r2 of e6) for (let { _id: e7, label: i2 } of Yc(r2, t2)) e7 && (n2[e7] = i2 ?? ``);
|
|
4094
4123
|
return n2;
|
|
4095
4124
|
};
|
|
4096
|
-
var
|
|
4097
|
-
let n2 = e6 ? await
|
|
4125
|
+
var Zc = async (e6, t2) => {
|
|
4126
|
+
let n2 = e6 ? await Gc(e6, void 0, false, t2) : void 0, { _id: r2, categoryIds: i2, relatedPostIds: a2 } = n2 ?? await Kc(void 0, false, t2) ?? {};
|
|
4098
4127
|
return { currentPostId: r2 ?? void 0, categoryIds: i2, relatedPostIds: n2 ? a2 : void 0 };
|
|
4099
4128
|
};
|
|
4100
|
-
var
|
|
4101
|
-
let { items: r2 } = await
|
|
4129
|
+
var Qc = async ({ ids: e6, currentPostId: t2, limit: n2 }) => {
|
|
4130
|
+
let { items: r2 } = await lc({ fieldsets: Bc }).in(`_id`, e6).limit(n2).find(), i2 = new Map(r2.map((e7) => {
|
|
4102
4131
|
let { _id: t3 } = e7;
|
|
4103
4132
|
return [t3, e7];
|
|
4104
4133
|
}));
|
|
4105
4134
|
return e6.filter((e7) => e7 !== t2).map((e7) => i2.get(e7)).filter((e7) => e7 !== void 0).slice(0, n2);
|
|
4106
4135
|
};
|
|
4107
|
-
var
|
|
4108
|
-
let i2 =
|
|
4136
|
+
var $c = async ({ currentPostId: e6, categoryIds: t2, language: n2, limit: r2 }) => {
|
|
4137
|
+
let i2 = lc({ fieldsets: Bc }).ne(`_id`, e6).descending(`firstPublishedDate`).limit(r2);
|
|
4109
4138
|
t2?.length && (i2 = i2.hasSome(`categoryIds`, t2)), n2 && (i2 = i2.eq(`language`, n2));
|
|
4110
4139
|
let { items: a2 } = await i2.find();
|
|
4111
4140
|
return a2;
|
|
4112
4141
|
};
|
|
4113
|
-
var
|
|
4114
|
-
let o2 =
|
|
4142
|
+
var el = async ({ slug: e6, language: t2, limit: n2 = 3, propagateErrors: r2 = false, source: i2, sourcePromise: a2 }) => {
|
|
4143
|
+
let o2 = Jc();
|
|
4115
4144
|
try {
|
|
4116
|
-
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await
|
|
4145
|
+
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await Zc(e6, t2));
|
|
4117
4146
|
if (!r3) return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4118
|
-
let l2 = c2?.length ? await
|
|
4119
|
-
return { posts: u2, authorsByMemberId: d2, categoryLabelsById:
|
|
4147
|
+
let l2 = c2?.length ? await Qc({ ids: c2, currentPostId: r3, limit: n2 }) : [], u2 = l2.length > 0 ? l2 : await $c({ currentPostId: r3, categoryIds: s2, language: t2, limit: n2 }), [d2, f2, p2] = await Promise.all([Uc(u2), o2, Wc(u2)]);
|
|
4148
|
+
return { posts: u2, authorsByMemberId: d2, categoryLabelsById: Xc(u2, f2), videoSourcesByPostId: p2 };
|
|
4120
4149
|
} catch (e7) {
|
|
4121
4150
|
if (r2) throw e7;
|
|
4122
4151
|
return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4123
4152
|
}
|
|
4124
4153
|
};
|
|
4125
|
-
var
|
|
4126
|
-
var
|
|
4127
|
-
var
|
|
4128
|
-
var
|
|
4129
|
-
var
|
|
4130
|
-
var
|
|
4154
|
+
var tl = { newest: `FEED`, oldest: `PUBLISHED_DATE_ASC`, titleAsc: `TITLE_ASC`, titleDesc: `TITLE_DESC`, mostViewed: `VIEW_COUNT`, mostLiked: `LIKE_COUNT` };
|
|
4155
|
+
var nl = async (e6, { limit: t2, offset: n2 = 0, language: r2, sortOrder: i2 }) => e6.posts.length > 0 ? e6 : { ...e6, demoPosts: await pc({ paging: { limit: t2, offset: n2 }, fieldsets: Bc, ...r2 && { language: r2 }, ...i2 && { sort: tl[i2] } }) };
|
|
4156
|
+
var rl = (0, import_react.createContext)({ isEditor: false, isPreview: false });
|
|
4157
|
+
var il = () => (0, import_react.useContext)(rl);
|
|
4158
|
+
var al = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
4159
|
+
var ol = () => {
|
|
4131
4160
|
try {
|
|
4132
|
-
let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(
|
|
4161
|
+
let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(Kn);
|
|
4133
4162
|
return e6 || t2;
|
|
4134
4163
|
} catch {
|
|
4135
4164
|
return false;
|
|
4136
4165
|
}
|
|
4137
4166
|
};
|
|
4138
|
-
var
|
|
4139
|
-
let e6 =
|
|
4140
|
-
return il(
|
|
4167
|
+
var sl = () => {
|
|
4168
|
+
let e6 = ol();
|
|
4169
|
+
return al(il()) && !e6;
|
|
4141
4170
|
};
|
|
4142
|
-
|
|
4143
|
-
|
|
4171
|
+
g((e6, t2) => {
|
|
4172
|
+
(function() {
|
|
4173
|
+
var e7 = {}.hasOwnProperty;
|
|
4174
|
+
function n2() {
|
|
4175
|
+
for (var e8 = ``, t3 = 0; t3 < arguments.length; t3++) {
|
|
4176
|
+
var n3 = arguments[t3];
|
|
4177
|
+
n3 && (e8 = i2(e8, r2(n3)));
|
|
4178
|
+
}
|
|
4179
|
+
return e8;
|
|
4180
|
+
}
|
|
4181
|
+
function r2(t3) {
|
|
4182
|
+
if (typeof t3 == `string` || typeof t3 == `number`) return t3;
|
|
4183
|
+
if (typeof t3 != `object`) return ``;
|
|
4184
|
+
if (Array.isArray(t3)) return n2.apply(null, t3);
|
|
4185
|
+
if (t3.toString !== Object.prototype.toString && !t3.toString.toString().includes(`[native code]`)) return t3.toString();
|
|
4186
|
+
var r3 = ``;
|
|
4187
|
+
for (var a2 in t3) e7.call(t3, a2) && t3[a2] && (r3 = i2(r3, a2));
|
|
4188
|
+
return r3;
|
|
4189
|
+
}
|
|
4190
|
+
function i2(e8, t3) {
|
|
4191
|
+
return t3 ? e8 ? e8 + ` ` + t3 : e8 + t3 : e8;
|
|
4192
|
+
}
|
|
4193
|
+
t2 !== void 0 && t2.exports ? (n2.default = n2, t2.exports = n2) : typeof define == `function` && typeof define.amd == `object` && define.amd ? define(`classnames`, [], function() {
|
|
4194
|
+
return n2;
|
|
4195
|
+
}) : window.classNames = n2;
|
|
4196
|
+
})();
|
|
4197
|
+
})();
|
|
4198
|
+
var cl = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
4199
|
+
var ll = (e6) => {
|
|
4144
4200
|
try {
|
|
4145
4201
|
return e6.getMonitoringClient?.() ?? null;
|
|
4146
4202
|
} catch {
|
|
4147
4203
|
return null;
|
|
4148
4204
|
}
|
|
4149
4205
|
};
|
|
4150
|
-
var
|
|
4151
|
-
function
|
|
4152
|
-
let
|
|
4153
|
-
if (!
|
|
4154
|
-
let
|
|
4155
|
-
|
|
4206
|
+
var ul = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
4207
|
+
function dl(e6, t2, { feature: n2, action: r2, level: i2 = `error`, tags: a2, contexts: o2 }) {
|
|
4208
|
+
let s2 = ul(e6, `captureException`);
|
|
4209
|
+
if (!s2) return;
|
|
4210
|
+
let c2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
4211
|
+
s2.captureException(c2, { level: i2, tags: { feature: n2, action: r2, ...a2 }, ...o2 ? { contexts: o2 } : {} });
|
|
4156
4212
|
}
|
|
4157
|
-
function
|
|
4158
|
-
let a2 =
|
|
4213
|
+
function fl(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
4214
|
+
let a2 = ul(e6, `startSpanManual`);
|
|
4159
4215
|
if (!a2) return i2;
|
|
4160
4216
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
4161
4217
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
4162
4218
|
}
|
|
4163
|
-
var
|
|
4219
|
+
var pl = class extends import_react.Component {
|
|
4164
4220
|
state = { error: void 0 };
|
|
4165
4221
|
static getDerivedStateFromError(e6) {
|
|
4166
4222
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4167
4223
|
}
|
|
4168
4224
|
componentDidCatch(e6, t2) {
|
|
4169
|
-
|
|
4225
|
+
dl(this.props.monitoringClient, e6, { feature: this.props.feature, action: `render`, tags: this.props.component ? { component: this.props.component } : void 0, contexts: { react: { componentStack: t2.componentStack } } });
|
|
4170
4226
|
}
|
|
4171
4227
|
render() {
|
|
4172
4228
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4174,201 +4230,201 @@ var fl = class extends import_react.Component {
|
|
|
4174
4230
|
return this.props.fallback;
|
|
4175
4231
|
}
|
|
4176
4232
|
};
|
|
4177
|
-
var
|
|
4178
|
-
var
|
|
4179
|
-
function
|
|
4180
|
-
return (0, import_react.useContext)(
|
|
4233
|
+
var ml = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
|
|
4234
|
+
var hl = (0, import_react.createContext)(void 0);
|
|
4235
|
+
function gl() {
|
|
4236
|
+
return (0, import_react.useContext)(hl);
|
|
4181
4237
|
}
|
|
4182
|
-
var
|
|
4183
|
-
function
|
|
4184
|
-
return (0, import_react.useContext)(
|
|
4238
|
+
var _l = (0, import_react.createContext)(void 0);
|
|
4239
|
+
function vl() {
|
|
4240
|
+
return (0, import_react.useContext)(_l);
|
|
4185
4241
|
}
|
|
4186
|
-
var
|
|
4187
|
-
var
|
|
4188
|
-
var
|
|
4189
|
-
var
|
|
4190
|
-
var
|
|
4191
|
-
var
|
|
4242
|
+
var yl = 6e4;
|
|
4243
|
+
var bl = yl * 60;
|
|
4244
|
+
var xl = bl * 24;
|
|
4245
|
+
var Sl = xl * 7;
|
|
4246
|
+
var Cl = (e6) => e6 < yl ? [`second`, e6 / 1e3] : e6 < bl ? [`minute`, e6 / yl] : e6 < xl ? [`hour`, e6 / bl] : [`day`, e6 / xl];
|
|
4247
|
+
var wl = (e6, t2, n2 = Date.now()) => {
|
|
4192
4248
|
let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
|
|
4193
|
-
if (i2 >= 0 && i2 <
|
|
4194
|
-
let [e7, n3] =
|
|
4249
|
+
if (i2 >= 0 && i2 < Sl) {
|
|
4250
|
+
let [e7, n3] = Cl(i2);
|
|
4195
4251
|
return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
|
|
4196
4252
|
}
|
|
4197
4253
|
let a2 = r2.getFullYear() === new Date(n2).getFullYear();
|
|
4198
4254
|
return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
|
|
4199
4255
|
};
|
|
4200
|
-
var
|
|
4201
|
-
var
|
|
4202
|
-
var
|
|
4256
|
+
var Tl = `https://static.wixstatic.com/media/`;
|
|
4257
|
+
var El = 100;
|
|
4258
|
+
var Dl = (e6, t2 = ``) => {
|
|
4203
4259
|
let n2 = e6?.profile?.photo;
|
|
4204
4260
|
if (!n2?.url) return;
|
|
4205
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
4206
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
4207
|
-
};
|
|
4208
|
-
var
|
|
4209
|
-
var
|
|
4210
|
-
var
|
|
4211
|
-
var
|
|
4212
|
-
var
|
|
4261
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(Tl) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
4262
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || El, height: n2.height || El, alt: r2 ?? t2 };
|
|
4263
|
+
};
|
|
4264
|
+
var Ol = `https://static.wixstatic.com/media/`;
|
|
4265
|
+
var kl = `wix:image://`;
|
|
4266
|
+
var Al = 1200;
|
|
4267
|
+
var jl = 800;
|
|
4268
|
+
var Ml = (e6) => {
|
|
4213
4269
|
if (!e6) return;
|
|
4214
4270
|
let t2 = Number.parseInt(e6, 10);
|
|
4215
4271
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4216
4272
|
};
|
|
4217
|
-
var
|
|
4218
|
-
if (!e6.startsWith(
|
|
4273
|
+
var Nl = (e6) => {
|
|
4274
|
+
if (!e6.startsWith(kl)) {
|
|
4219
4275
|
let t3 = e6.split(/[?#]/)[0];
|
|
4220
4276
|
return t3 ? { uri: t3 } : void 0;
|
|
4221
4277
|
}
|
|
4222
4278
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
4223
4279
|
if (!r2) return;
|
|
4224
4280
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
4225
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
4281
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: Ml(a2.get(`originWidth`)), height: Ml(a2.get(`originHeight`)) };
|
|
4226
4282
|
};
|
|
4227
|
-
var
|
|
4283
|
+
var Pl = (e6, t2) => {
|
|
4228
4284
|
if (!e6) return;
|
|
4229
|
-
let n2 =
|
|
4285
|
+
let n2 = Nl(e6);
|
|
4230
4286
|
if (!n2) return;
|
|
4231
4287
|
let r2 = n2.name ?? n2.uri;
|
|
4232
|
-
return { uri: n2.uri, url: `${
|
|
4288
|
+
return { uri: n2.uri, url: `${Ol}${n2.uri}`, name: r2, width: n2.width ?? Al, height: n2.height ?? jl, alt: t2 ?? r2 };
|
|
4233
4289
|
};
|
|
4234
|
-
var
|
|
4290
|
+
var Fl = (e6) => {
|
|
4235
4291
|
let t2 = e6?.media?.wixMedia?.image;
|
|
4236
4292
|
if (!t2) return;
|
|
4237
|
-
let n2 =
|
|
4293
|
+
let n2 = Nl(t2);
|
|
4238
4294
|
if (!n2) return;
|
|
4239
4295
|
let r2 = n2.name ?? n2.uri;
|
|
4240
|
-
return { uri: n2.uri, url: `${
|
|
4296
|
+
return { uri: n2.uri, url: `${Ol}${n2.uri}`, name: r2, width: n2.width ?? Al, height: n2.height ?? jl, alt: e6?.media?.altText ?? e6?.title ?? r2 };
|
|
4241
4297
|
};
|
|
4242
|
-
var
|
|
4243
|
-
var
|
|
4244
|
-
var
|
|
4298
|
+
var Il = `https://static.wixstatic.com/media/`;
|
|
4299
|
+
var Ll = `wix:video://`;
|
|
4300
|
+
var Rl = (e6) => {
|
|
4245
4301
|
if (!e6) return;
|
|
4246
4302
|
let t2 = Number.parseInt(e6, 10);
|
|
4247
4303
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4248
4304
|
};
|
|
4249
|
-
var
|
|
4250
|
-
if (!e6.startsWith(
|
|
4305
|
+
var zl = (e6) => {
|
|
4306
|
+
if (!e6.startsWith(Ll)) return;
|
|
4251
4307
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
|
|
4252
4308
|
if (!r2) return;
|
|
4253
4309
|
let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
|
|
4254
|
-
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${
|
|
4310
|
+
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${Il}${a2}` : void 0, posterWidth: Rl(i2.get(`posterWidth`)), posterHeight: Rl(i2.get(`posterHeight`)) };
|
|
4255
4311
|
};
|
|
4256
|
-
var
|
|
4257
|
-
var
|
|
4258
|
-
var
|
|
4312
|
+
var Bl = [/https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:[^#]*&)?v=([\w-]+)/i, /https?:\/\/(?:www\.)?youtube\.com\/embed\/([\w-]+)/i, /https?:\/\/youtu\.be\/([\w-]+)/i];
|
|
4313
|
+
var Vl = [/https?:\/\/player\.vimeo\.com\/video\/(\d+)/i, /https?:\/\/vimeo\.com\/(\d+)/i];
|
|
4314
|
+
var Hl = (e6, t2) => {
|
|
4259
4315
|
for (let n2 of e6) {
|
|
4260
4316
|
let e7 = n2.exec(t2);
|
|
4261
4317
|
if (e7) return e7[1];
|
|
4262
4318
|
}
|
|
4263
4319
|
};
|
|
4264
|
-
var
|
|
4265
|
-
let t2 =
|
|
4320
|
+
var Ul = (e6) => {
|
|
4321
|
+
let t2 = Hl(Bl, e6);
|
|
4266
4322
|
if (t2) return { provider: `youtube`, embedUrl: `https://www.youtube.com/embed/${t2}?autoplay=1` };
|
|
4267
|
-
let n2 = Vl
|
|
4323
|
+
let n2 = Hl(Vl, e6);
|
|
4268
4324
|
return n2 ? { provider: `vimeo`, embedUrl: `https://player.vimeo.com/video/${n2}?autoplay=1` } : { provider: `unknown` };
|
|
4269
4325
|
};
|
|
4270
|
-
var
|
|
4326
|
+
var Wl = (e6, t2 = []) => {
|
|
4271
4327
|
let n2 = e6?.media;
|
|
4272
4328
|
if (!n2 || n2.displayed === false) return;
|
|
4273
|
-
let r2 =
|
|
4329
|
+
let r2 = Fl(e6);
|
|
4274
4330
|
if (r2) return { kind: `image`, image: r2 };
|
|
4275
|
-
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ?
|
|
4331
|
+
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? zl(n2.wixMedia.videoV2) : void 0;
|
|
4276
4332
|
if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
|
|
4277
4333
|
let o2 = n2.embedMedia?.video?.url;
|
|
4278
4334
|
if (o2) {
|
|
4279
4335
|
let { thumbnail: e7 } = n2.embedMedia ?? {};
|
|
4280
|
-
return { kind: `embed`, videoUrl: o2, ...
|
|
4336
|
+
return { kind: `embed`, videoUrl: o2, ...Ul(o2), thumbnailUrl: e7?.url, thumbnailWidth: e7?.width, thumbnailHeight: e7?.height, altText: i2 };
|
|
4281
4337
|
}
|
|
4282
4338
|
};
|
|
4283
|
-
var
|
|
4284
|
-
let t2 =
|
|
4339
|
+
var Gl = (e6) => {
|
|
4340
|
+
let t2 = Fl(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4285
4341
|
if (t2 || !n2) return t2;
|
|
4286
|
-
let r2 =
|
|
4342
|
+
let r2 = zl(n2), i2 = Pl(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4287
4343
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4288
4344
|
};
|
|
4289
|
-
var
|
|
4290
|
-
var
|
|
4291
|
-
var
|
|
4292
|
-
var
|
|
4345
|
+
var Kl = `2026-05-12T12:00:00.000Z`;
|
|
4346
|
+
var ql = (e6) => ({ href: e6 ?? `#`, target: `_self` });
|
|
4347
|
+
var Jl = (e6) => `https://static.wixstatic.com/media/${e6}/v1/fit/w_1200,h_1200,al_c,q_85/cover.jpg`;
|
|
4348
|
+
var Yl = (e6) => {
|
|
4293
4349
|
if (!e6) return;
|
|
4294
4350
|
let t2 = e6 instanceof Date ? e6 : new Date(e6);
|
|
4295
4351
|
return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
|
|
4296
4352
|
};
|
|
4297
|
-
var
|
|
4298
|
-
var
|
|
4299
|
-
var Q = (e6) => ({ text: e6, html: `<p>${
|
|
4353
|
+
var Xl = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4354
|
+
var Zl = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4355
|
+
var Q = (e6) => ({ text: e6, html: `<p>${Zl(e6)}</p>`, linkList: [] });
|
|
4300
4356
|
var $ = { minutesToRead: 5, views: 120, comments: 4 };
|
|
4301
|
-
var
|
|
4357
|
+
var Ql = (e6) => {
|
|
4302
4358
|
let { metrics: t2 } = e6;
|
|
4303
4359
|
return { views: typeof t2?.views == `number` ? t2.views : void 0, comments: typeof t2?.comments == `number` ? t2.comments : void 0 };
|
|
4304
4360
|
};
|
|
4305
|
-
var
|
|
4306
|
-
var
|
|
4361
|
+
var $l = (e6, t2, n2, r2) => Q(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4362
|
+
var eu = (e6, t2, n2, r2) => {
|
|
4307
4363
|
let i2 = e6.categoryIds?.map((e7) => t2[e7]).find(Boolean);
|
|
4308
4364
|
return Q(i2 ?? (n2 ? r2.canvas.category() : ``));
|
|
4309
4365
|
};
|
|
4310
|
-
var
|
|
4311
|
-
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 =
|
|
4312
|
-
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage:
|
|
4313
|
-
};
|
|
4314
|
-
var tu = 3;
|
|
4315
|
-
var nu = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4316
|
-
var ru = (e6, t2) => {
|
|
4317
|
-
let { uri: n2, width: r2, height: i2 } = nu[e6 % nu.length];
|
|
4318
|
-
return { uri: n2, url: ql(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4366
|
+
var tu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4367
|
+
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = Ql(e6);
|
|
4368
|
+
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Gl(e6), itemCoverMedia: Wl(e6, s2[l2 ?? ``] ?? []), itemLink: sr(e6, r2), itemPublishedDate: Q(wl(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: Yl(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: Xl(e6.minutesToRead), initialViewCount: f2.views ?? (o2 ? $.views : void 0), initialCommentCount: f2.comments ?? (o2 ? $.comments : void 0), authorName: Q(d2?.profile?.nickname ?? ``), authorImage: Dl(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: $l(f2.views, $.views, o2, t2.viewCount), commentCount: $l(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: eu(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
|
|
4319
4369
|
};
|
|
4370
|
+
var nu = 3;
|
|
4371
|
+
var ru = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4320
4372
|
var iu = (e6, t2) => {
|
|
4321
|
-
let { uri: n2 } =
|
|
4322
|
-
return { uri: n2, url:
|
|
4373
|
+
let { uri: n2, width: r2, height: i2 } = ru[e6 % ru.length];
|
|
4374
|
+
return { uri: n2, url: Jl(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4375
|
+
};
|
|
4376
|
+
var au = (e6, t2) => {
|
|
4377
|
+
let { uri: n2 } = ru[(e6 + 1) % ru.length];
|
|
4378
|
+
return { uri: n2, url: Jl(n2), name: n2, width: 100, height: 100, alt: t2 };
|
|
4323
4379
|
};
|
|
4324
|
-
var
|
|
4325
|
-
let o2 = e6.canvas.postTitle(), s2 =
|
|
4326
|
-
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink:
|
|
4380
|
+
var ou = (e6, t2, n2, r2 = Date.now()) => Array.from({ length: nu }, (i2, a2) => {
|
|
4381
|
+
let o2 = e6.canvas.postTitle(), s2 = iu(a2, e6.canvas.coverAlt());
|
|
4382
|
+
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink: ql(n2), itemPublishedDate: Q(wl(new Date(r2), t2, r2)), publishedDateValue: Kl, clockValue: r2, minutesToReadValue: $.minutesToRead, initialViewCount: $.views, initialCommentCount: $.comments, authorName: Q(e6.canvas.authorName()), authorImage: au(a2, e6.canvas.authorPhotoAlt()), timeToRead: Q(e6.timeToRead($.minutesToRead)), viewCount: Q(e6.viewCount($.views)), commentCount: Q(e6.commentCount($.comments)), itemCategoryLabel: Q(e6.canvas.category()), recentPostItem: { title: o2, slug: `` }, commentingEnabled: void 0 };
|
|
4327
4383
|
});
|
|
4328
|
-
var
|
|
4329
|
-
function
|
|
4330
|
-
let e6 = (0, import_react.useContext)(
|
|
4384
|
+
var su = (0, import_react.createContext)(void 0);
|
|
4385
|
+
function cu() {
|
|
4386
|
+
let e6 = (0, import_react.useContext)(su);
|
|
4331
4387
|
if (!e6) throw Error(`useRelatedPostsContext must be used within a RelatedPostsProvider`);
|
|
4332
4388
|
return e6;
|
|
4333
4389
|
}
|
|
4334
|
-
var
|
|
4335
|
-
var
|
|
4336
|
-
var
|
|
4337
|
-
var
|
|
4338
|
-
var
|
|
4390
|
+
var lu = 3;
|
|
4391
|
+
var uu = (e6) => typeof e6 == `number` && Number.isFinite(e6) && e6 >= 1 ? Math.min(Math.floor(e6), 12) : lu;
|
|
4392
|
+
var du = 2e3;
|
|
4393
|
+
var fu = /* @__PURE__ */ new WeakMap();
|
|
4394
|
+
var pu = (e6, t2, n2) => {
|
|
4339
4395
|
if (!e6) return n2();
|
|
4340
|
-
let r2 =
|
|
4341
|
-
r2 || (r2 = /* @__PURE__ */ new Map(),
|
|
4396
|
+
let r2 = fu.get(e6);
|
|
4397
|
+
r2 || (r2 = /* @__PURE__ */ new Map(), fu.set(e6, r2));
|
|
4342
4398
|
let i2 = r2.get(t2);
|
|
4343
4399
|
if (i2) return i2;
|
|
4344
4400
|
let a2 = n2();
|
|
4345
4401
|
return r2.set(t2, a2), a2;
|
|
4346
4402
|
};
|
|
4347
|
-
var
|
|
4348
|
-
var
|
|
4349
|
-
var
|
|
4350
|
-
var
|
|
4351
|
-
var
|
|
4403
|
+
var mu = { relatedPosts: [], emptyState: null, isLoadingRelatedPosts: true, hasError: false, hasRelatedPosts: false };
|
|
4404
|
+
var hu = { ...mu, isLoadingRelatedPosts: false, hasError: true };
|
|
4405
|
+
var gu = (e6) => ({ strip: e6, hasError: false });
|
|
4406
|
+
var _u = () => ({ strip: { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {}, fetchedAt: Date.now() }, hasError: true });
|
|
4407
|
+
var vu = (e6) => {
|
|
4352
4408
|
throw e6;
|
|
4353
4409
|
};
|
|
4354
|
-
var
|
|
4355
|
-
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } =
|
|
4356
|
-
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) =>
|
|
4410
|
+
var yu = ({ children: e6, stripLoadPromise: t2, slug: n2, language: r2 }) => {
|
|
4411
|
+
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } = Vn(t2), f2 = Gn(l2), m2 = sl(), h2 = cr(n2), { t: g2 } = So(), _2 = _r(), v2 = (0, import_react.useMemo)(() => ts(g2, _2), [g2, _2]), y2 = (0, import_react.useMemo)(() => {
|
|
4412
|
+
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) => tu(e8, v2, _2, h2, a2, o2, m2, s2, f2)), t3 = e7.length === 0 && m2 ? ou(v2, _2, h2, f2) : e7;
|
|
4357
4413
|
return { relatedPosts: t3, emptyState: i2.length === 0 && !d2 ? v2.noRelatedPostsEmptyState() : null, isLoadingRelatedPosts: false, hasError: d2, hasRelatedPosts: t3.length > 0 };
|
|
4358
4414
|
}, [i2, u2, a2, o2, s2, v2, _2, r2, h2, m2, f2, d2]);
|
|
4359
|
-
return dr
|
|
4415
|
+
return pr(dr.relatedPostsProvider, d2 ? `error` : i2.length > 0 ? `data` : `empty`), (0, import_jsx_runtime.jsx)(su.Provider, { value: y2, children: e6 });
|
|
4360
4416
|
};
|
|
4361
|
-
function
|
|
4362
|
-
let r2 =
|
|
4417
|
+
function bu({ children: e6, postsCount: n2 }) {
|
|
4418
|
+
let r2 = ur(), i2 = gr(), a2 = qn(), o2 = uu(n2), s2 = sl(), l2 = gl(), u2 = vl(), d2 = yr(), f2 = (0, import_react.useMemo)(() => ll(zn), []), { i18n: h2, locale: g2 } = Go($o), _2 = Yn(() => {
|
|
4363
4419
|
let e7 = `blog-builder:related:${JSON.stringify({ slug: r2 ?? ``, language: i2 ?? ``, limit: o2, ...u2 && { postId: u2 } })}`;
|
|
4364
|
-
return { slug: r2, language: i2, stripLoadPromise:
|
|
4365
|
-
let e8 =
|
|
4366
|
-
return
|
|
4367
|
-
} })),
|
|
4420
|
+
return { slug: r2, language: i2, stripLoadPromise: Un(pu(l2, e7, () => Mo({ key: e7, warmupData: d2, fetchData: () => {
|
|
4421
|
+
let e8 = el({ slug: r2, language: i2, limit: o2, propagateErrors: true, sourcePromise: l2 }).then((e9) => s2 ? nl(e9, { limit: o2, language: i2 }) : e9);
|
|
4422
|
+
return ml(fl(f2, `related-posts-read`, { feature: cl.relatedPosts, tags: { limit: o2 } }, a2 ? zc(e8, du, `related-posts`) : e8));
|
|
4423
|
+
} })), gu, a2 ? vu : _u) };
|
|
4368
4424
|
}, [r2, i2, a2, s2, l2, d2, o2, f2, u2]);
|
|
4369
|
-
return (0, import_jsx_runtime.jsx)(Co, { i18n: h2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(
|
|
4425
|
+
return (0, import_jsx_runtime.jsx)(Co, { i18n: h2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(su.Provider, { value: mu, children: e6 }), children: [(0, import_jsx_runtime.jsx)(Wo, { i18n: h2, locale: g2 }), (0, import_jsx_runtime.jsx)(pl, { fallback: (0, import_jsx_runtime.jsx)(su.Provider, { value: hu, children: e6 }), feature: cl.relatedPosts, monitoringClient: f2, rethrow: a2, children: (0, import_jsx_runtime.jsx)(yu, { stripLoadPromise: _2.stripLoadPromise, slug: _2.slug, language: _2.language, children: e6 }, `${_2.language ?? ``}|${_2.slug ?? ``}`) })] }) });
|
|
4370
4426
|
}
|
|
4371
|
-
var
|
|
4427
|
+
var xu = Mn(`7d10ae29-fb0a-4361-8bc0-c3b8a3b96e34`);
|
|
4372
4428
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4373
4429
|
0 && (module.exports = {
|
|
4374
4430
|
RelatedPostsProvider,
|