@wix/blog 1.0.708 → 1.0.709
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 +972 -944
- package/build/cjs/context-blog-feed.js.map +1 -1
- package/build/cjs/context-post-by-id.js +1060 -1032
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.js +266 -238
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/cjs/context-post-list-item.js +260 -232
- 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 +263 -235
- package/build/cjs/context-related-posts.js.map +1 -1
- package/build/es/context-blog-feed.mjs +972 -944
- package/build/es/context-blog-feed.mjs.map +1 -1
- package/build/es/context-post-by-id.mjs +1060 -1032
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.mjs +266 -238
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/context-post-list-item.mjs +260 -232
- 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 +263 -235
- 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
|
@@ -141,50 +141,50 @@ function de(e6) {
|
|
|
141
141
|
return t2.slice(n2, r2).split(/\0/g);
|
|
142
142
|
}
|
|
143
143
|
var fe = (e6) => `validationError` in (e6.response?.data?.details ?? {});
|
|
144
|
-
var
|
|
145
|
-
var
|
|
146
|
-
function
|
|
144
|
+
var pe = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
|
|
145
|
+
var me = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
|
|
146
|
+
function he(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
147
147
|
if (typeof e6 != `object` || !e6) throw e6;
|
|
148
|
-
if (fe(e6)) return
|
|
149
|
-
if (
|
|
150
|
-
if (
|
|
148
|
+
if (fe(e6)) return ge(e6, t2, n2);
|
|
149
|
+
if (pe(e6)) return ve(e6);
|
|
150
|
+
if (me(e6)) {
|
|
151
151
|
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: se(n3), data: {} }, requestId: e6.requestId };
|
|
152
|
-
return
|
|
152
|
+
return _e(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
153
153
|
}
|
|
154
|
-
return
|
|
154
|
+
return ye(e6);
|
|
155
155
|
}
|
|
156
|
-
var
|
|
157
|
-
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 =
|
|
158
|
-
return
|
|
156
|
+
var ge = (e6, t2, n2) => {
|
|
157
|
+
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = be(t2, a2, n2)?.sort((e7, t3) => e7.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e7, description: t3 }) => `"${e7}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
|
|
158
|
+
return _e(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
|
|
159
159
|
};
|
|
160
|
-
var
|
|
161
|
-
var
|
|
160
|
+
var _e = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
|
|
161
|
+
var ve = (e6) => {
|
|
162
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 ?? se(n2), o2 = e6.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e6.requestId };
|
|
163
|
-
return
|
|
163
|
+
return _e(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
|
|
164
164
|
};
|
|
165
|
-
var
|
|
166
|
-
var
|
|
165
|
+
var ye = (e6) => _e(e6, { message: e6.requestId ? `System error occurred, request-id: ${e6.requestId}` : `System error occurred: ${JSON.stringify(e6)}`, extraProperties: { requestId: e6.requestId, status: e6.response?.status, code: se(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
|
|
166
|
+
var be = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
167
167
|
let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
|
|
168
168
|
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
169
|
let r3 = t2[e7.field];
|
|
170
|
-
if (r3) return { ...e7, field:
|
|
170
|
+
if (r3) return { ...e7, field: xe(r3, i2) };
|
|
171
171
|
let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
|
|
172
172
|
if (s2) {
|
|
173
173
|
let t3 = a2[s2];
|
|
174
|
-
if (t3) return { ...e7, field: e7.field.replace(s2,
|
|
174
|
+
if (t3) return { ...e7, field: e7.field.replace(s2, xe(t3, i2)) };
|
|
175
175
|
}
|
|
176
176
|
return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
|
|
177
177
|
});
|
|
178
178
|
};
|
|
179
|
-
var
|
|
180
|
-
let n2 =
|
|
179
|
+
var xe = (e6, t2) => {
|
|
180
|
+
let n2 = Se(e6);
|
|
181
181
|
return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
|
|
182
182
|
};
|
|
183
|
-
var
|
|
183
|
+
var Se = (e6) => {
|
|
184
184
|
let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
|
|
185
185
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
186
186
|
};
|
|
187
|
-
function
|
|
187
|
+
function Ce(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
188
188
|
return ae(() => e6({ request: async (e7) => {
|
|
189
189
|
let i3 = e7({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
|
|
190
190
|
a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
|
|
@@ -198,7 +198,7 @@ function Se(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
|
198
198
|
e9 = await s3.json();
|
|
199
199
|
} catch {
|
|
200
200
|
}
|
|
201
|
-
let t3 =
|
|
201
|
+
let t3 = Te(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = he(t3);
|
|
202
202
|
throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
|
|
203
203
|
}
|
|
204
204
|
let l3 = await s3.json();
|
|
@@ -208,18 +208,18 @@ function Se(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
|
208
208
|
}
|
|
209
209
|
}, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
|
|
210
210
|
}
|
|
211
|
-
var
|
|
211
|
+
var we = class extends Error {
|
|
212
212
|
response;
|
|
213
213
|
requestId;
|
|
214
214
|
constructor(e6) {
|
|
215
215
|
super(), this.response = e6.response, this.requestId = e6.requestId;
|
|
216
216
|
}
|
|
217
217
|
};
|
|
218
|
-
var
|
|
219
|
-
var
|
|
220
|
-
function
|
|
218
|
+
var Te = (e6, t2, n2, r2) => new we({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2 }, status: e6 }, requestId: r2?.requestId });
|
|
219
|
+
var Ee = `.`;
|
|
220
|
+
function De(e6, t2, n2) {
|
|
221
221
|
if (e6 == null) throw Error(`Cannot set value on null or undefined`);
|
|
222
|
-
let r2 =
|
|
222
|
+
let r2 = Oe(t2), i2 = e6;
|
|
223
223
|
for (let e7 = 0; e7 < r2.length; e7++) {
|
|
224
224
|
let t3 = r2[e7];
|
|
225
225
|
if (e7 === r2.length - 1) {
|
|
@@ -231,21 +231,21 @@ function Ee(e6, t2, n2) {
|
|
|
231
231
|
}
|
|
232
232
|
return e6;
|
|
233
233
|
}
|
|
234
|
-
function De(e6) {
|
|
235
|
-
return Array.isArray(e6) ? e6 : e6.split(Te).map((e7) => Oe(e7) ? Number(e7) : e7);
|
|
236
|
-
}
|
|
237
234
|
function Oe(e6) {
|
|
238
|
-
return
|
|
235
|
+
return Array.isArray(e6) ? e6 : e6.split(Ee).map((e7) => ke(e7) ? Number(e7) : e7);
|
|
239
236
|
}
|
|
240
237
|
function ke(e6) {
|
|
238
|
+
return /^\d+$/.test(e6);
|
|
239
|
+
}
|
|
240
|
+
function Ae(e6) {
|
|
241
241
|
let t2 = {};
|
|
242
|
-
for (let [n2, r2] of Object.entries(e6))
|
|
242
|
+
for (let [n2, r2] of Object.entries(e6)) je(n2) || De(t2, Oe(n2), r2);
|
|
243
243
|
return t2;
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function je(e6) {
|
|
246
246
|
return e6 === `__proto__` || e6 === `constructor` || e6 === `prototype`;
|
|
247
247
|
}
|
|
248
|
-
var
|
|
248
|
+
var Me = class {
|
|
249
249
|
BRACKET_PATTERN = /\[(\d+)\]/g;
|
|
250
250
|
NUMERIC_PATTERN = /^\d+$/;
|
|
251
251
|
ESCAPED_DOT_PATTERN = /\\\./g;
|
|
@@ -268,7 +268,7 @@ var je = class {
|
|
|
268
268
|
return e6.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
|
|
269
269
|
}
|
|
270
270
|
unflatten() {
|
|
271
|
-
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])),
|
|
271
|
+
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])), Ae(this.cleanedModifiedFields);
|
|
272
272
|
}
|
|
273
273
|
flatten(e6) {
|
|
274
274
|
let t2 = {};
|
|
@@ -293,7 +293,7 @@ var je = class {
|
|
|
293
293
|
r2.push(i3), n2 = t3[i3];
|
|
294
294
|
return;
|
|
295
295
|
}
|
|
296
|
-
let a3 =
|
|
296
|
+
let a3 = Ie(e7);
|
|
297
297
|
if (a3 && a3 in t3) r2.push(a3), n2 = t3[a3];
|
|
298
298
|
else throw Error(`Cannot find key '${e7}' or its transformations at path ${this.buildPathString(r2)}`);
|
|
299
299
|
}, o2 = (e7, t3) => {
|
|
@@ -317,28 +317,28 @@ var je = class {
|
|
|
317
317
|
return e6.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e6[r2 - 1] === `\\` ? t2 : `.` + n2);
|
|
318
318
|
}
|
|
319
319
|
};
|
|
320
|
-
function
|
|
320
|
+
function Ne(e6, t2) {
|
|
321
321
|
let n2 = e6?.modifiedFields;
|
|
322
322
|
if (!n2) return null;
|
|
323
|
-
let r2 =
|
|
323
|
+
let r2 = Pe(n2);
|
|
324
324
|
if (!r2) return null;
|
|
325
325
|
let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
|
|
326
326
|
e6 = { ...e6, modifiedFields: i2 };
|
|
327
327
|
let o2 = t2(e6), s2 = o2?.modifiedFields;
|
|
328
328
|
if (!s2) return null;
|
|
329
|
-
let c2 =
|
|
329
|
+
let c2 = Fe(s2, a2);
|
|
330
330
|
return c2 === null ? null : (o2.modifiedFields = c2, o2);
|
|
331
331
|
}
|
|
332
|
-
function
|
|
332
|
+
function Pe(e6) {
|
|
333
333
|
if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
|
|
334
|
-
let t2 = new
|
|
334
|
+
let t2 = new Me(e6);
|
|
335
335
|
return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
|
|
336
336
|
} catch {
|
|
337
337
|
return null;
|
|
338
338
|
}
|
|
339
339
|
return null;
|
|
340
340
|
}
|
|
341
|
-
function
|
|
341
|
+
function Fe(e6, t2) {
|
|
342
342
|
if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
|
|
343
343
|
return t2.flatten(e6);
|
|
344
344
|
} catch {
|
|
@@ -346,10 +346,10 @@ function Pe(e6, t2) {
|
|
|
346
346
|
}
|
|
347
347
|
return null;
|
|
348
348
|
}
|
|
349
|
-
function
|
|
349
|
+
function Ie(e6) {
|
|
350
350
|
return e6.replace(/[-_\s]+(.)?/g, (e7, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e7) => e7.toLowerCase());
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function Le() {
|
|
353
353
|
return { emit(e6, ...t2) {
|
|
354
354
|
for (let n2 = 0, r2 = this.events[e6] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
|
|
355
355
|
}, events: {}, on(e6, t2) {
|
|
@@ -358,8 +358,8 @@ function Ie() {
|
|
|
358
358
|
};
|
|
359
359
|
} };
|
|
360
360
|
}
|
|
361
|
-
var
|
|
362
|
-
function
|
|
361
|
+
var Re = (e6) => e6.__type === `event-definition`;
|
|
362
|
+
function ze(e6, t2, n2, r2) {
|
|
363
363
|
let i2;
|
|
364
364
|
if (e6.isDomainEvent) {
|
|
365
365
|
let { deletedEvent: e7, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
|
|
@@ -370,14 +370,14 @@ function Re(e6, t2, n2, r2) {
|
|
|
370
370
|
let e7 = s2.modifiedFields;
|
|
371
371
|
if (typeof e7 == `object` && e7 && !Array.isArray(e7)) {
|
|
372
372
|
o2 = structuredClone(i2);
|
|
373
|
-
let e8 =
|
|
373
|
+
let e8 = Ne(s2, a2);
|
|
374
374
|
if (e8) return t2(e8);
|
|
375
375
|
}
|
|
376
376
|
}
|
|
377
377
|
return t2(a2(o2));
|
|
378
378
|
}
|
|
379
|
-
function
|
|
380
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
379
|
+
function Be(e6) {
|
|
380
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = Le();
|
|
381
381
|
return { initModule(e7) {
|
|
382
382
|
return (r2) => {
|
|
383
383
|
let i2 = t2.get(e7.type) ?? [];
|
|
@@ -387,7 +387,7 @@ function ze(e6) {
|
|
|
387
387
|
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
388
|
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
389
|
let l2 = t2.get(r2) ?? [];
|
|
390
|
-
return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) =>
|
|
390
|
+
return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) => ze(e8, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
|
|
391
391
|
}, async processRequest(e7, t3) {
|
|
392
392
|
let n3 = await e7.text();
|
|
393
393
|
return this.process(n3, t3);
|
|
@@ -406,12 +406,12 @@ function ze(e6) {
|
|
|
406
406
|
let n3 = Array.from(t2.keys()).map((e8) => ({ type: e8 }));
|
|
407
407
|
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
408
|
let r2 = t2.get(e7.eventType) ?? [];
|
|
409
|
-
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) =>
|
|
409
|
+
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => ze(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
|
|
410
410
|
}, apps: { AppInstalled: v(`AppInstalled`)(), AppRemoved: v(`AppRemoved`)() } } };
|
|
411
411
|
}
|
|
412
|
-
var
|
|
413
|
-
function
|
|
414
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
412
|
+
var Ve = (e6) => e6.__type === `service-plugin-definition`;
|
|
413
|
+
function He(e6) {
|
|
414
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = Le();
|
|
415
415
|
return { initModule(e7) {
|
|
416
416
|
return (r2) => {
|
|
417
417
|
let i2 = t2.get(e7.componentType.toLowerCase()) ?? [];
|
|
@@ -452,38 +452,38 @@ function Ve(e6) {
|
|
|
452
452
|
return s2.transformations.toREST(await c2(s2.transformations.fromREST(e7)));
|
|
453
453
|
} } };
|
|
454
454
|
}
|
|
455
|
-
var
|
|
456
|
-
function
|
|
455
|
+
var k = `X-Wix-Consistent`;
|
|
456
|
+
function Ue(e6) {
|
|
457
457
|
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
|
-
let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [
|
|
458
|
+
let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} }, l3 = e6.host?.getErrorHandler?.();
|
|
459
459
|
try {
|
|
460
460
|
if (typeof n3 == `string` || n3 instanceof URL) {
|
|
461
461
|
let e7 = await i3(n3, { ...r3, headers: c3 });
|
|
462
462
|
l3?.handleError(e7, { requestOptions: { url: n3.toString(), method: r3?.method } });
|
|
463
|
-
let a3 =
|
|
464
|
-
return a3 && (t2[
|
|
463
|
+
let a3 = We(e7);
|
|
464
|
+
return a3 && (t2[k] = a3), e7;
|
|
465
465
|
}
|
|
466
466
|
{
|
|
467
467
|
for (let [e8, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e8, t3);
|
|
468
468
|
let e7 = await i3(n3, r3);
|
|
469
469
|
l3?.handleError(e7, { requestOptions: { url: n3.url, method: r3?.method } });
|
|
470
|
-
let a3 =
|
|
471
|
-
return a3 && (t2[
|
|
470
|
+
let a3 = We(e7);
|
|
471
|
+
return a3 && (t2[k] = a3), e7;
|
|
472
472
|
}
|
|
473
473
|
} catch (e7) {
|
|
474
474
|
throw l3?.handleError(e7, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e7;
|
|
475
475
|
}
|
|
476
|
-
}, { client: c2, initModule: l2 } =
|
|
477
|
-
let i3 = o2(), s3 = await a2(), c3 = E(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [
|
|
478
|
-
return u3 && (t2[
|
|
476
|
+
}, { client: c2, initModule: l2 } = He(i2), { client: u2, initModule: d2 } = Be(i2), f2 = async (n3, r3) => {
|
|
477
|
+
let i3 = o2(), s3 = await a2(), c3 = E(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [k]: t2[k] } : {} } }), u3 = We(l3);
|
|
478
|
+
return u3 && (t2[k] = u3), l3;
|
|
479
479
|
}, p2 = (t3, n3) => {
|
|
480
|
-
if (
|
|
481
|
-
if (
|
|
480
|
+
if (Re(t3)) return d2(t3);
|
|
481
|
+
if (Ve(t3)) return l2(t3);
|
|
482
482
|
if (D(t3) && e6.host) return te(t3, e6.host);
|
|
483
483
|
if (typeof t3 == `function`) {
|
|
484
484
|
if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
|
|
485
485
|
let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e6.useCDN === void 0 ? i2().shouldUseCDN : e6.useCDN;
|
|
486
|
-
return
|
|
486
|
+
return Ce(ae(() => x(t3)) ? b(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
|
|
487
487
|
let n4 = new URL(e7, `https://${r3}`);
|
|
488
488
|
return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
|
|
489
489
|
}, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e6.host?.name, o3, e6.validateRequestSchema);
|
|
@@ -507,22 +507,22 @@ function He(e6) {
|
|
|
507
507
|
return { data: o3 ?? {}, errors: s3 };
|
|
508
508
|
}, webhooks: u2, servicePlugins: c2 };
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function We(e6) {
|
|
511
511
|
return e6.headers?.get(`X-Wix-Consistent`) ?? e6.headers?.get(`x-wix-consistent`);
|
|
512
512
|
}
|
|
513
|
-
var
|
|
514
|
-
var
|
|
515
|
-
var
|
|
516
|
-
var
|
|
517
|
-
var
|
|
518
|
-
function
|
|
513
|
+
var Ge = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
|
|
514
|
+
var Ke = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
515
|
+
var qe = `items`;
|
|
516
|
+
var Je = `pagingMetadata`;
|
|
517
|
+
var Ye = Ge;
|
|
518
|
+
function Xe(e6, t2) {
|
|
519
519
|
return e6?.split(`.`).map((e7) => t2?.[e7] ?? e7).join(`.`);
|
|
520
520
|
}
|
|
521
|
-
var
|
|
522
|
-
function Ze(e6, t2, n2) {
|
|
523
|
-
return (e6 === Xe || e6.endsWith(`.${Xe}`)) && typeof t2 == `string` ? Ye(t2, n2) : t2;
|
|
524
|
-
}
|
|
521
|
+
var Ze = `sort.fieldName`;
|
|
525
522
|
function Qe(e6, t2, n2) {
|
|
523
|
+
return (e6 === Ze || e6.endsWith(`.${Ze}`)) && typeof t2 == `string` ? Xe(t2, n2) : t2;
|
|
524
|
+
}
|
|
525
|
+
function $e(e6, t2, n2) {
|
|
526
526
|
let r2 = (e7) => n2.includes(e7), i2 = (e7, n3) => {
|
|
527
527
|
if (Array.isArray(e7)) e7.forEach((e8) => {
|
|
528
528
|
i2(e8, n3);
|
|
@@ -532,144 +532,144 @@ function Qe(e6, t2, n2) {
|
|
|
532
532
|
Object.keys(a2).forEach((e8) => {
|
|
533
533
|
let o2 = n3 === `` ? e8 : `${n3}.${e8}`;
|
|
534
534
|
if (r2(o2)) return;
|
|
535
|
-
let s2 =
|
|
536
|
-
s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] =
|
|
535
|
+
let s2 = et(e8, t2);
|
|
536
|
+
s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] = Qe(o2, a2[s2], t2), i2(a2[s2], o2);
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
};
|
|
540
540
|
return i2(e6, ``), e6;
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function et(e6, t2) {
|
|
543
543
|
let n2;
|
|
544
544
|
return n2 = e6.includes(`.`) ? e6.split(`.`).map((e7) => t2[e7] ?? e7).join(`.`) : t2[e6] ?? e6, n2;
|
|
545
545
|
}
|
|
546
|
-
function
|
|
547
|
-
return
|
|
546
|
+
function A(e6, t2 = []) {
|
|
547
|
+
return $e(e6, Ge, t2);
|
|
548
548
|
}
|
|
549
|
-
function
|
|
550
|
-
return
|
|
549
|
+
function j(e6, t2 = []) {
|
|
550
|
+
return $e(e6, Ke, t2);
|
|
551
551
|
}
|
|
552
|
-
function
|
|
552
|
+
function M(e6) {
|
|
553
553
|
return e6 ? new Date(e6) : void 0;
|
|
554
554
|
}
|
|
555
|
-
var
|
|
556
|
-
function
|
|
555
|
+
var tt = /* @__PURE__ */ new WeakMap();
|
|
556
|
+
function nt() {
|
|
557
557
|
return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function rt(e6, t2) {
|
|
560
560
|
let n2 = e6.get(t2);
|
|
561
|
-
return n2 || (n2 =
|
|
561
|
+
return n2 || (n2 = nt(), e6.set(t2, n2)), n2;
|
|
562
562
|
}
|
|
563
|
-
function
|
|
564
|
-
return t2 === `*` ? (e6.anyField ??=
|
|
563
|
+
function it(e6, t2) {
|
|
564
|
+
return t2 === `*` ? (e6.anyField ??= nt(), e6.anyField) : t2.endsWith(`{}`) ? (e6.mapFields ??= /* @__PURE__ */ new Map(), rt(e6.mapFields, t2.slice(0, -2))) : (e6.fields ??= /* @__PURE__ */ new Map(), rt(e6.fields, t2));
|
|
565
565
|
}
|
|
566
|
-
function
|
|
567
|
-
let t2 =
|
|
566
|
+
function at(e6) {
|
|
567
|
+
let t2 = nt();
|
|
568
568
|
for (let n2 of e6) {
|
|
569
|
-
let e7 = n2.path.split(`.`).reduce(
|
|
569
|
+
let e7 = n2.path.split(`.`).reduce(it, t2);
|
|
570
570
|
e7.leaves ??= [], e7.leaves.push(n2);
|
|
571
571
|
}
|
|
572
572
|
return t2;
|
|
573
573
|
}
|
|
574
|
-
function at(e6) {
|
|
575
|
-
let t2 = et.get(e6);
|
|
576
|
-
return t2 || (t2 = it(e6), et.set(e6, t2)), t2;
|
|
577
|
-
}
|
|
578
574
|
function ot(e6) {
|
|
579
|
-
|
|
575
|
+
let t2 = tt.get(e6);
|
|
576
|
+
return t2 || (t2 = at(e6), tt.set(e6, t2)), t2;
|
|
580
577
|
}
|
|
581
|
-
function st(e6
|
|
582
|
-
return
|
|
578
|
+
function st(e6) {
|
|
579
|
+
return typeof e6 == `object` && !!e6;
|
|
583
580
|
}
|
|
584
|
-
function ct(e6, t2, n2) {
|
|
585
|
-
|
|
581
|
+
function ct(e6, { isRepeated: t2, isMap: n2 }, r2) {
|
|
582
|
+
return t2 ? Array.isArray(e6) ? e6.map(r2) : e6 : n2 ? st(e6) ? Object.fromEntries(Object.entries(e6).map(([e7, t3]) => [e7, r2(t3)])) : e6 : r2(e6);
|
|
586
583
|
}
|
|
587
584
|
function lt(e6, t2, n2) {
|
|
585
|
+
st(e6) && ft(e6, t2, n2);
|
|
586
|
+
}
|
|
587
|
+
function ut(e6, t2, n2) {
|
|
588
588
|
for (let [r2, i2] of t2) {
|
|
589
589
|
if (!(r2 in e6)) continue;
|
|
590
|
-
if (i2.leaves) for (let t4 of i2.leaves) e6[r2] =
|
|
590
|
+
if (i2.leaves) for (let t4 of i2.leaves) e6[r2] = ct(e6[r2], t4, n2);
|
|
591
591
|
let t3 = e6[r2];
|
|
592
|
-
Array.isArray(t3) ? t3.forEach((e7) =>
|
|
592
|
+
Array.isArray(t3) ? t3.forEach((e7) => lt(e7, i2, n2)) : lt(t3, i2, n2);
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function dt(e6, t2, n2) {
|
|
596
596
|
for (let [r2, i2] of t2) {
|
|
597
597
|
let t3 = e6[r2];
|
|
598
|
-
|
|
598
|
+
st(t3) && Object.values(t3).forEach((e7) => lt(e7, i2, n2));
|
|
599
599
|
}
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
t2 &&
|
|
601
|
+
function ft(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
|
|
602
|
+
t2 && ut(e6, t2, i2), n2 && dt(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => lt(e7, r2, i2));
|
|
603
603
|
}
|
|
604
|
-
function
|
|
605
|
-
if (!
|
|
606
|
-
for (let { paths: n2, transformFn: r2 } of t2)
|
|
604
|
+
function N(e6, t2) {
|
|
605
|
+
if (!st(e6)) return e6;
|
|
606
|
+
for (let { paths: n2, transformFn: r2 } of t2) ft(e6, ot(n2), r2);
|
|
607
607
|
return e6;
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
609
|
+
function pt(e6) {
|
|
610
|
+
return vt(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
|
|
611
611
|
}
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
var
|
|
615
|
-
var
|
|
616
|
-
function
|
|
612
|
+
var mt = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
613
|
+
var ht = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
614
|
+
var gt = `$1\0$2`;
|
|
615
|
+
var _t = /[^\p{L}\d]+/giu;
|
|
616
|
+
function vt(e6) {
|
|
617
617
|
let t2 = e6.trim();
|
|
618
|
-
t2 = t2.replace(
|
|
618
|
+
t2 = t2.replace(mt, gt).replace(ht, gt), t2 = t2.replace(_t, `\0`);
|
|
619
619
|
let n2 = 0, r2 = t2.length;
|
|
620
620
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
621
621
|
if (n2 === r2) return [];
|
|
622
622
|
for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
|
|
623
623
|
return t2.slice(n2, r2).split(/\0/g);
|
|
624
624
|
}
|
|
625
|
-
var
|
|
626
|
-
var
|
|
627
|
-
var
|
|
628
|
-
function
|
|
625
|
+
var yt = (e6) => `validationError` in (e6.response?.data?.details ?? {});
|
|
626
|
+
var bt = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
|
|
627
|
+
var xt = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
|
|
628
|
+
function P(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
629
629
|
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
|
|
630
|
+
if (yt(e6)) return St(e6, t2, n2);
|
|
631
|
+
if (bt(e6)) return wt(e6);
|
|
632
|
+
if (xt(e6)) {
|
|
633
|
+
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: pt(n3), data: {} }, requestId: e6.requestId };
|
|
634
|
+
return Ct(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
635
635
|
}
|
|
636
|
-
return
|
|
636
|
+
return Tt(e6);
|
|
637
637
|
}
|
|
638
|
-
var
|
|
639
|
-
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 =
|
|
640
|
-
return
|
|
638
|
+
var St = (e6, t2, n2) => {
|
|
639
|
+
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Et(t2, a2, n2)?.sort((e7, t3) => e7.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e7, description: t3 }) => `"${e7}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
|
|
640
|
+
return Ct(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
|
|
641
641
|
};
|
|
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
|
|
642
|
+
var Ct = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
|
|
643
|
+
var wt = (e6) => {
|
|
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 ?? pt(n2), o2 = e6.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e6.requestId };
|
|
645
|
+
return Ct(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
|
|
646
646
|
};
|
|
647
|
-
var
|
|
648
|
-
var
|
|
647
|
+
var Tt = (e6) => Ct(e6, { message: e6.requestId ? `System error occurred, request-id: ${e6.requestId}` : `System error occurred: ${JSON.stringify(e6)}`, extraProperties: { requestId: e6.requestId, status: e6.response?.status, code: pt(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
|
|
648
|
+
var Et = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
649
649
|
let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
|
|
650
650
|
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
651
|
let r3 = t2[e7.field];
|
|
652
|
-
if (r3) return { ...e7, field:
|
|
652
|
+
if (r3) return { ...e7, field: Dt(r3, i2) };
|
|
653
653
|
let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
|
|
654
654
|
if (s2) {
|
|
655
655
|
let t3 = a2[s2];
|
|
656
|
-
if (t3) return { ...e7, field: e7.field.replace(s2,
|
|
656
|
+
if (t3) return { ...e7, field: e7.field.replace(s2, Dt(t3, i2)) };
|
|
657
657
|
}
|
|
658
658
|
return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
|
|
659
659
|
});
|
|
660
660
|
};
|
|
661
|
-
var
|
|
662
|
-
let n2 =
|
|
661
|
+
var Dt = (e6, t2) => {
|
|
662
|
+
let n2 = Ot(e6);
|
|
663
663
|
return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
|
|
664
664
|
};
|
|
665
|
-
var
|
|
665
|
+
var Ot = (e6) => {
|
|
666
666
|
let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
|
|
667
667
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
668
668
|
};
|
|
669
|
-
function
|
|
669
|
+
function kt() {
|
|
670
670
|
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
671
|
if (e6) return { initWixModules(t3, n3) {
|
|
672
|
-
return
|
|
672
|
+
return At(() => e6(t3, n3));
|
|
673
673
|
}, fetchWithAuth() {
|
|
674
674
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
675
675
|
}, graphql() {
|
|
@@ -679,10 +679,10 @@ function Ot() {
|
|
|
679
679
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
680
680
|
if (r2) {
|
|
681
681
|
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
|
|
682
|
+
return At(() => n2.use(e7));
|
|
683
683
|
}
|
|
684
684
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
685
|
-
return
|
|
685
|
+
return At(() => t2.use(e7));
|
|
686
686
|
}, fetchWithAuth: (e7, n3) => {
|
|
687
687
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
688
688
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -694,7 +694,7 @@ function Ot() {
|
|
|
694
694
|
return t2.graphql(e7, n3, r2);
|
|
695
695
|
} };
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function At(e6) {
|
|
698
698
|
let t2 = globalThis.__wix_context__, n2 = { client: _.client, elevatedClient: _.elevatedClient }, r2;
|
|
699
699
|
globalThis.__wix_context__ = void 0, _.client = void 0, _.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
700
700
|
try {
|
|
@@ -703,16 +703,16 @@ function kt(e6) {
|
|
|
703
703
|
globalThis.__wix_context__ = t2, _.client = n2.client, _.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
|
-
function
|
|
706
|
+
function jt(e6, t2) {
|
|
707
707
|
return (...n2) => {
|
|
708
|
-
let r2 =
|
|
708
|
+
let r2 = kt();
|
|
709
709
|
return r2 ? r2.initWixModules(e6, t2).apply(void 0, n2) : e6.apply(void 0, n2);
|
|
710
710
|
};
|
|
711
711
|
}
|
|
712
|
-
function
|
|
713
|
-
return
|
|
712
|
+
function F(e6, t2 = false) {
|
|
713
|
+
return jt(e6, t2);
|
|
714
714
|
}
|
|
715
|
-
function
|
|
715
|
+
function I(e6, t2) {
|
|
716
716
|
let n2 = Nt(e6), r2 = Object.entries(n2).some(([e7, t3]) => e7.includes(`.`) || Array.isArray(t3) && t3.some((e8) => typeof e8 == `object`));
|
|
717
717
|
return t2 && r2 ? new URLSearchParams({ ".r": Ft(JSON.stringify(e6)) }) : Object.entries(n2).reduce((e7, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
|
|
718
718
|
r3 == null || Array.isArray(n3) && typeof r3 == `object` || e7.append(t3, r3);
|
|
@@ -934,7 +934,7 @@ var wn = bn({ createHost: function(e6) {
|
|
|
934
934
|
} });
|
|
935
935
|
var Tn = (e6, t2) => {
|
|
936
936
|
let n2 = wn.host({ applicationId: e6, componentId: t2 }), r2 = wn.auth();
|
|
937
|
-
return
|
|
937
|
+
return Ue({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
938
938
|
};
|
|
939
939
|
var En = (e6) => Tn(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
|
|
940
940
|
function Dn() {
|
|
@@ -1037,84 +1037,84 @@ function R(e6) {
|
|
|
1037
1037
|
}
|
|
1038
1038
|
var Rn = R(`@wix/site-service-url`);
|
|
1039
1039
|
var zn = `post`;
|
|
1040
|
-
var
|
|
1041
|
-
var
|
|
1040
|
+
var Bn = { kind: `all` };
|
|
1041
|
+
var Vn = (e6) => {
|
|
1042
1042
|
let t2 = e6.split(`/`).filter(Boolean);
|
|
1043
|
-
if (t2.length < 2) return
|
|
1043
|
+
if (t2.length < 2) return Bn;
|
|
1044
1044
|
let [n2, r2] = t2.slice(-2), i2;
|
|
1045
1045
|
try {
|
|
1046
1046
|
i2 = decodeURIComponent(r2);
|
|
1047
1047
|
} catch {
|
|
1048
1048
|
i2 = r2;
|
|
1049
1049
|
}
|
|
1050
|
-
return i2 ? n2 === `category` ? { kind: `category`, slug: i2 } : n2 === `tag` ? { kind: `tag`, slug: i2 } :
|
|
1050
|
+
return i2 ? n2 === `category` ? { kind: `category`, slug: i2 } : n2 === `tag` ? { kind: `tag`, slug: i2 } : Bn : Bn;
|
|
1051
1051
|
};
|
|
1052
|
-
var
|
|
1053
|
-
var
|
|
1054
|
-
if (!e6) return
|
|
1052
|
+
var Hn = (e6, t2) => e6 ? { kind: `category`, slug: e6 } : t2 ? { kind: `tag`, slug: t2 } : Bn;
|
|
1053
|
+
var Un = (e6) => {
|
|
1054
|
+
if (!e6) return Bn;
|
|
1055
1055
|
try {
|
|
1056
|
-
return
|
|
1056
|
+
return Vn(new URL(e6).pathname);
|
|
1057
1057
|
} catch {
|
|
1058
|
-
return
|
|
1058
|
+
return Bn;
|
|
1059
1059
|
}
|
|
1060
1060
|
};
|
|
1061
|
-
var
|
|
1062
|
-
var
|
|
1061
|
+
var Wn = { kind: `all` };
|
|
1062
|
+
var Gn = () => {
|
|
1063
1063
|
let e6, t2 = false;
|
|
1064
1064
|
try {
|
|
1065
1065
|
e6 = (0, import_services_manager_react.useService)(Rn).currentUrl;
|
|
1066
1066
|
} catch {
|
|
1067
1067
|
t2 = true;
|
|
1068
1068
|
}
|
|
1069
|
-
let n2 = (0, import_react.useMemo)(() =>
|
|
1070
|
-
return t2 ?
|
|
1071
|
-
};
|
|
1072
|
-
var
|
|
1073
|
-
var
|
|
1074
|
-
var
|
|
1075
|
-
var
|
|
1076
|
-
var
|
|
1077
|
-
var
|
|
1078
|
-
var
|
|
1079
|
-
var
|
|
1069
|
+
let n2 = (0, import_react.useMemo)(() => Un(e6), [e6]);
|
|
1070
|
+
return t2 ? Wn : n2;
|
|
1071
|
+
};
|
|
1072
|
+
var Kn = R(`seo/seo-service`);
|
|
1073
|
+
var qn = R(`@wix/site-service-rendering-context`);
|
|
1074
|
+
var Jn = R(`@wix/viewer-service-multilingual`);
|
|
1075
|
+
var Yn = `https://static.wixstatic.com/media/`;
|
|
1076
|
+
var Xn = `wix:image://`;
|
|
1077
|
+
var Zn = 1200;
|
|
1078
|
+
var Qn = 800;
|
|
1079
|
+
var $n = (e6) => {
|
|
1080
1080
|
if (!e6) return;
|
|
1081
1081
|
let t2 = Number.parseInt(e6, 10);
|
|
1082
1082
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
1083
1083
|
};
|
|
1084
|
-
var
|
|
1085
|
-
if (!e6.startsWith(
|
|
1084
|
+
var er = (e6) => {
|
|
1085
|
+
if (!e6.startsWith(Xn)) {
|
|
1086
1086
|
let t3 = e6.split(/[?#]/)[0];
|
|
1087
1087
|
return t3 ? { uri: t3 } : void 0;
|
|
1088
1088
|
}
|
|
1089
1089
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
1090
1090
|
if (!r2) return;
|
|
1091
1091
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
1092
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
1092
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: $n(a2.get(`originWidth`)), height: $n(a2.get(`originHeight`)) };
|
|
1093
1093
|
};
|
|
1094
|
-
var
|
|
1094
|
+
var tr = (e6, t2) => {
|
|
1095
1095
|
if (!e6) return;
|
|
1096
|
-
let n2 =
|
|
1096
|
+
let n2 = er(e6);
|
|
1097
1097
|
if (!n2) return;
|
|
1098
1098
|
let r2 = n2.name ?? n2.uri;
|
|
1099
|
-
return { uri: n2.uri, url: `${
|
|
1099
|
+
return { uri: n2.uri, url: `${Yn}${n2.uri}`, name: r2, width: n2.width ?? Zn, height: n2.height ?? Qn, alt: t2 ?? r2 };
|
|
1100
1100
|
};
|
|
1101
|
-
var
|
|
1101
|
+
var nr = (e6) => {
|
|
1102
1102
|
let t2 = e6?.media?.wixMedia?.image;
|
|
1103
1103
|
if (!t2) return;
|
|
1104
|
-
let n2 =
|
|
1104
|
+
let n2 = er(t2);
|
|
1105
1105
|
if (!n2) return;
|
|
1106
1106
|
let r2 = n2.name ?? n2.uri;
|
|
1107
|
-
return { uri: n2.uri, url: `${
|
|
1107
|
+
return { uri: n2.uri, url: `${Yn}${n2.uri}`, name: r2, width: n2.width ?? Zn, height: n2.height ?? Qn, alt: e6?.media?.altText ?? e6?.title ?? r2 };
|
|
1108
1108
|
};
|
|
1109
|
-
var
|
|
1110
|
-
var
|
|
1111
|
-
var
|
|
1112
|
-
var
|
|
1109
|
+
var rr = `14bcded7-0066-7c35-14d7-466cb3f09103`;
|
|
1110
|
+
var ir = `builder-post`;
|
|
1111
|
+
var ar = `__blog_unknown_section__`;
|
|
1112
|
+
var or = (e6) => {
|
|
1113
1113
|
let t2;
|
|
1114
1114
|
try {
|
|
1115
|
-
let n3 = e6.appSectionRelativeUrl(
|
|
1116
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`,
|
|
1117
|
-
t2 = e6.appSectionRelativeUrl(
|
|
1115
|
+
let n3 = e6.appSectionRelativeUrl(rr, ir);
|
|
1116
|
+
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, ar) && !n3?.endsWith(`/post-page`)) return;
|
|
1117
|
+
t2 = e6.appSectionRelativeUrl(rr, ir, true);
|
|
1118
1118
|
} catch {
|
|
1119
1119
|
return;
|
|
1120
1120
|
}
|
|
@@ -1122,12 +1122,12 @@ var ar = (e6) => {
|
|
|
1122
1122
|
let n2 = t2.split(`/`).filter(Boolean);
|
|
1123
1123
|
return n2[n2.length - 1] === `post-page` && n2.pop(), n2.length > 0 ? n2.join(`/`) : void 0;
|
|
1124
1124
|
};
|
|
1125
|
-
var
|
|
1126
|
-
var
|
|
1127
|
-
let t2 =
|
|
1128
|
-
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${
|
|
1125
|
+
var sr = (e6) => `${e6}/${zn}`;
|
|
1126
|
+
var cr = (e6) => {
|
|
1127
|
+
let t2 = or(e6);
|
|
1128
|
+
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${sr(t2)}`;
|
|
1129
1129
|
};
|
|
1130
|
-
var
|
|
1130
|
+
var lr = (e6, t2) => {
|
|
1131
1131
|
if (!e6 || !t2) return;
|
|
1132
1132
|
let n2;
|
|
1133
1133
|
try {
|
|
@@ -1141,14 +1141,14 @@ var cr = (e6, t2) => {
|
|
|
1141
1141
|
if (r2.endsWith(t3) && i2.endsWith(`/post`)) return `${n2.origin}${i2}`;
|
|
1142
1142
|
}
|
|
1143
1143
|
};
|
|
1144
|
-
var
|
|
1144
|
+
var ur = (e6) => {
|
|
1145
1145
|
if (!e6) return;
|
|
1146
1146
|
if (typeof e6 == `string`) return e6;
|
|
1147
1147
|
let { base: t2, path: n2 } = e6;
|
|
1148
1148
|
return t2 ? `${t2.replace(/\/+$/, ``)}${n2 ?? ``}` : void 0;
|
|
1149
1149
|
};
|
|
1150
|
-
var
|
|
1151
|
-
let n2 =
|
|
1150
|
+
var dr = (e6, t2) => {
|
|
1151
|
+
let n2 = ur(e6.url), r2 = `/${zn}`;
|
|
1152
1152
|
if (!n2 || !t2?.endsWith(r2)) return;
|
|
1153
1153
|
let i2, a2;
|
|
1154
1154
|
try {
|
|
@@ -1159,23 +1159,23 @@ var ur = (e6, t2) => {
|
|
|
1159
1159
|
let o2 = a2.slice(0, -r2.length);
|
|
1160
1160
|
return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
|
|
1161
1161
|
};
|
|
1162
|
-
var
|
|
1163
|
-
let n2 =
|
|
1162
|
+
var fr = (e6, t2) => {
|
|
1163
|
+
let n2 = dr(e6, t2);
|
|
1164
1164
|
if (n2) return { href: n2, target: `_self` };
|
|
1165
1165
|
if (t2 && e6.slug) return { href: `${t2}/${encodeURIComponent(e6.slug)}`, target: `_self` };
|
|
1166
|
-
let r2 =
|
|
1166
|
+
let r2 = ur(e6.url);
|
|
1167
1167
|
return r2 ? { href: r2, target: `_self` } : void 0;
|
|
1168
1168
|
};
|
|
1169
|
-
var
|
|
1170
|
-
var
|
|
1171
|
-
var
|
|
1169
|
+
var pr = `https://static.wixstatic.com/media/`;
|
|
1170
|
+
var mr = 100;
|
|
1171
|
+
var hr = (e6, t2 = ``) => {
|
|
1172
1172
|
let n2 = e6?.profile?.photo;
|
|
1173
1173
|
if (!n2?.url) return;
|
|
1174
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
1175
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
1174
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(pr) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
1175
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || mr, height: n2.height || mr, alt: r2 ?? t2 };
|
|
1176
1176
|
};
|
|
1177
|
-
var
|
|
1178
|
-
var
|
|
1177
|
+
var gr = (e6, t2 = []) => (e6.translations ?? []).flatMap(({ language: e7, url: n2 }) => !e7 || !n2 ? [] : [{ url: n2, langCode: (t2.find(({ id: t3 }) => t3 === e7) ?? t2.find(({ languageCode: t3 }) => t3 === e7))?.regionalFormat || e7 }]);
|
|
1178
|
+
var _r = (e6, t2) => {
|
|
1179
1179
|
try {
|
|
1180
1180
|
let n2 = new URL(t2 ?? ``).searchParams.get(`lang`);
|
|
1181
1181
|
if (!n2) return e6;
|
|
@@ -1185,180 +1185,180 @@ var gr = (e6, t2) => {
|
|
|
1185
1185
|
return e6;
|
|
1186
1186
|
}
|
|
1187
1187
|
};
|
|
1188
|
-
var
|
|
1189
|
-
var
|
|
1188
|
+
var vr = { totalPages: 1, currentPage: 1 };
|
|
1189
|
+
var yr = (e6) => {
|
|
1190
1190
|
if (e6) try {
|
|
1191
1191
|
let t2 = new URL(e6);
|
|
1192
|
-
return
|
|
1192
|
+
return _r(`${t2.origin}${t2.pathname.replace(/\/+$/, ``)}`, e6);
|
|
1193
1193
|
} catch {
|
|
1194
1194
|
return;
|
|
1195
1195
|
}
|
|
1196
1196
|
};
|
|
1197
|
-
var
|
|
1198
|
-
let i2 = e6.label ?? ``, a2 =
|
|
1199
|
-
return { category: { ...e6._id && { id: e6._id }, title: e6.title || i2, label: i2, description: e6.description ?? ``, canonicalUrl: t2, items: { numberOfItems: e6.postCount ?? n2.length }, pagination:
|
|
1197
|
+
var br = (e6, t2, n2, r2) => {
|
|
1198
|
+
let i2 = e6.label ?? ``, a2 = tr(e6.coverImage, i2);
|
|
1199
|
+
return { category: { ...e6._id && { id: e6._id }, title: e6.title || i2, label: i2, description: e6.description ?? ``, canonicalUrl: t2, items: { numberOfItems: e6.postCount ?? n2.length }, pagination: vr, ...a2?.width && a2.height && { mainImage: { url: a2.url, width: a2.width, height: a2.height, hasImage: true } }, ...e6.language && { language: e6.language }, translatedPages: gr(e6, r2) } };
|
|
1200
1200
|
};
|
|
1201
|
-
var
|
|
1201
|
+
var xr = (e6) => {
|
|
1202
1202
|
if (!e6) return;
|
|
1203
1203
|
let t2 = new Date(e6);
|
|
1204
1204
|
return Number.isNaN(t2.getTime()) ? void 0 : t2.toISOString();
|
|
1205
1205
|
};
|
|
1206
|
-
var
|
|
1206
|
+
var Sr = (e6, t2, n2, r2) => {
|
|
1207
1207
|
let i2 = e6.label ?? ``;
|
|
1208
1208
|
return { tag: { name: i2, title: i2, fullUrl: t2, listItems: n2.flatMap((e7) => {
|
|
1209
|
-
let t3 =
|
|
1209
|
+
let t3 = fr(e7, r2)?.href;
|
|
1210
1210
|
return t3 ? [`${t3.replace(/\/+$/, ``)}/`] : [];
|
|
1211
|
-
}), items: { numberOfItems: n2.length }, created:
|
|
1211
|
+
}), items: { numberOfItems: n2.length }, created: xr(e6._createdDate), postCount: e6.publishedPostCount ?? e6.postCount, ...e6.slug && { slug: e6.slug }, ...e6.language && { language: e6.language }, pagination: vr } };
|
|
1212
1212
|
};
|
|
1213
|
-
var
|
|
1214
|
-
var
|
|
1213
|
+
var Cr = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
1214
|
+
var wr = (e6) => {
|
|
1215
1215
|
try {
|
|
1216
1216
|
return e6.getMonitoringClient?.() ?? null;
|
|
1217
1217
|
} catch {
|
|
1218
1218
|
return null;
|
|
1219
1219
|
}
|
|
1220
1220
|
};
|
|
1221
|
-
var
|
|
1222
|
-
function
|
|
1223
|
-
let o2 =
|
|
1221
|
+
var Tr = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
1222
|
+
function Er(e6, t2, { feature: n2, action: r2, level: i2 = `error`, contexts: a2 }) {
|
|
1223
|
+
let o2 = Tr(e6, `captureException`);
|
|
1224
1224
|
if (!o2) return;
|
|
1225
1225
|
let s2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
1226
1226
|
o2.captureException(s2, { level: i2, tags: { feature: n2, action: r2 }, ...a2 ? { contexts: a2 } : {} });
|
|
1227
1227
|
}
|
|
1228
|
-
function
|
|
1229
|
-
let a2 =
|
|
1228
|
+
function Dr(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
1229
|
+
let a2 = Tr(e6, `startSpanManual`);
|
|
1230
1230
|
if (!a2) return i2;
|
|
1231
1231
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
1232
1232
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
1233
1233
|
}
|
|
1234
|
-
var
|
|
1235
|
-
var
|
|
1234
|
+
var Or = /* @__PURE__ */ new WeakSet();
|
|
1235
|
+
var kr = (e6, t2, n2, r2) => {
|
|
1236
1236
|
let i2;
|
|
1237
1237
|
try {
|
|
1238
|
-
i2 = { seo: (0, import_services_manager_react.useService)(
|
|
1238
|
+
i2 = { seo: (0, import_services_manager_react.useService)(Kn), url: (0, import_services_manager_react.useService)(Rn), renderingContext: (0, import_services_manager_react.useService)(qn) };
|
|
1239
1239
|
} catch {
|
|
1240
1240
|
return;
|
|
1241
1241
|
}
|
|
1242
1242
|
let a2;
|
|
1243
1243
|
try {
|
|
1244
|
-
a2 = (0, import_services_manager_react.useService)(
|
|
1244
|
+
a2 = (0, import_services_manager_react.useService)(Jn).locales;
|
|
1245
1245
|
} catch {
|
|
1246
1246
|
}
|
|
1247
|
-
if (
|
|
1248
|
-
let o2 =
|
|
1249
|
-
o2 && (e6.kind === `category` && t2.filterCategory ? (
|
|
1250
|
-
|
|
1251
|
-
})) : e6.kind === `tag` && t2.filterTag && (
|
|
1252
|
-
|
|
1247
|
+
if (Or.has(t2) || e6.kind === `all` || !i2.renderingContext.SSR) return;
|
|
1248
|
+
let o2 = yr(i2.url.currentUrl);
|
|
1249
|
+
o2 && (e6.kind === `category` && t2.filterCategory ? (Or.add(t2), i2.seo.setSeoEntity({ itemType: `BLOG_CATEGORY`, itemData: br(t2.filterCategory, o2, t2.posts, a2), seoData: t2.filterCategory.seoData }).catch((t3) => {
|
|
1250
|
+
Er(r2, t3, { feature: Cr.seo, action: `set-category-seo-entity`, contexts: { seo: { slug: e6.kind === `category` ? e6.slug : void 0 } } });
|
|
1251
|
+
})) : e6.kind === `tag` && t2.filterTag && (Or.add(t2), i2.seo.setSeoEntity({ itemType: `BLOG_TAGS`, itemData: Sr(t2.filterTag, o2, t2.posts, n2), asNewPage: true }).catch((t3) => {
|
|
1252
|
+
Er(r2, t3, { feature: Cr.seo, action: `set-tag-seo-entity`, contexts: { seo: { slug: e6.kind === `tag` ? e6.slug : void 0 } } });
|
|
1253
1253
|
})));
|
|
1254
1254
|
};
|
|
1255
|
-
var
|
|
1256
|
-
function
|
|
1255
|
+
var Ar = 1e4;
|
|
1256
|
+
function jr(e6) {
|
|
1257
1257
|
let [t2, n2] = (0, import_react.useState)(void 0);
|
|
1258
1258
|
return (0, import_react.useEffect)(() => {
|
|
1259
1259
|
let t3 = Date.now();
|
|
1260
|
-
t3 - e6 >
|
|
1260
|
+
t3 - e6 > Ar && (0, import_react.startTransition)(() => n2(t3));
|
|
1261
1261
|
}, []), t2 ?? e6;
|
|
1262
1262
|
}
|
|
1263
|
-
var
|
|
1263
|
+
var Mr = () => {
|
|
1264
1264
|
try {
|
|
1265
|
-
return (0, import_services_manager_react.useService)(
|
|
1265
|
+
return (0, import_services_manager_react.useService)(qn).SSR;
|
|
1266
1266
|
} catch {
|
|
1267
1267
|
return false;
|
|
1268
1268
|
}
|
|
1269
1269
|
};
|
|
1270
|
-
var
|
|
1271
|
-
function
|
|
1270
|
+
var Nr = (e6, t2) => e6.length === t2.length && e6.every((e7, n2) => Object.is(e7, t2[n2]));
|
|
1271
|
+
function Pr(e6, t2) {
|
|
1272
1272
|
let [n2, r2] = (0, import_react.useState)(() => ({ deps: t2, value: e6() }));
|
|
1273
1273
|
return (0, import_react.useEffect)(() => {
|
|
1274
|
-
if (
|
|
1274
|
+
if (Nr(n2.deps, t2)) return;
|
|
1275
1275
|
let a2 = e6();
|
|
1276
1276
|
(0, import_react.startTransition)(() => r2({ deps: t2, value: a2 }));
|
|
1277
1277
|
}, t2), n2.value;
|
|
1278
1278
|
}
|
|
1279
|
-
var
|
|
1279
|
+
var Fr = (e6) => {
|
|
1280
1280
|
let t2;
|
|
1281
1281
|
try {
|
|
1282
1282
|
t2 = (0, import_services_manager_react.useService)(Rn);
|
|
1283
1283
|
} catch {
|
|
1284
1284
|
return;
|
|
1285
1285
|
}
|
|
1286
|
-
return
|
|
1286
|
+
return cr(t2) ?? lr(t2.currentUrl, e6);
|
|
1287
1287
|
};
|
|
1288
|
-
var
|
|
1289
|
-
var
|
|
1290
|
-
var
|
|
1288
|
+
var Ir = { 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` };
|
|
1289
|
+
var Lr = (e6) => `${e6} rendered`;
|
|
1290
|
+
var Rr = (e6, t2, n2) => {
|
|
1291
1291
|
(0, import_react.useEffect)(() => {
|
|
1292
1292
|
if (t2 !== `loading` && typeof performance < `u` && typeof performance.mark == `function`) try {
|
|
1293
|
-
performance.mark(
|
|
1293
|
+
performance.mark(Lr(e6), { detail: { state: t2, compId: n2 } });
|
|
1294
1294
|
} catch {
|
|
1295
1295
|
}
|
|
1296
1296
|
}, [e6, t2, n2]);
|
|
1297
1297
|
};
|
|
1298
|
-
var
|
|
1299
|
-
var
|
|
1300
|
-
var
|
|
1298
|
+
var zr = R(`@wix/site-service-locale`);
|
|
1299
|
+
var Br = R(`@wix/site-service-renderer-configuration`);
|
|
1300
|
+
var Vr = () => {
|
|
1301
1301
|
let e6, t2;
|
|
1302
1302
|
try {
|
|
1303
|
-
e6 = (0, import_services_manager_react.useService)(
|
|
1303
|
+
e6 = (0, import_services_manager_react.useService)(Br).languageCode;
|
|
1304
1304
|
} catch {
|
|
1305
1305
|
}
|
|
1306
1306
|
try {
|
|
1307
|
-
t2 = (0, import_services_manager_react.useService)(
|
|
1307
|
+
t2 = (0, import_services_manager_react.useService)(zr).language;
|
|
1308
1308
|
} catch {
|
|
1309
1309
|
}
|
|
1310
1310
|
return e6 || t2;
|
|
1311
1311
|
};
|
|
1312
|
-
var
|
|
1312
|
+
var Hr = () => {
|
|
1313
1313
|
try {
|
|
1314
|
-
let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(
|
|
1314
|
+
let { locale: e6, language: t2 } = (0, import_services_manager_react.useService)(zr);
|
|
1315
1315
|
return e6 || t2;
|
|
1316
1316
|
} catch {
|
|
1317
1317
|
return;
|
|
1318
1318
|
}
|
|
1319
1319
|
};
|
|
1320
|
-
var
|
|
1321
|
-
var
|
|
1320
|
+
var Ur = R(`@wix/site-service-editor-context`);
|
|
1321
|
+
var Wr = () => {
|
|
1322
1322
|
try {
|
|
1323
|
-
return !!(0, import_services_manager_react.useService)(
|
|
1323
|
+
return !!(0, import_services_manager_react.useService)(Ur).previewMode;
|
|
1324
1324
|
} catch {
|
|
1325
1325
|
return false;
|
|
1326
1326
|
}
|
|
1327
1327
|
};
|
|
1328
|
-
var
|
|
1329
|
-
var
|
|
1330
|
-
var
|
|
1331
|
-
var
|
|
1328
|
+
var Gr = (0, import_react.createContext)({ isEditor: false, isPreview: false });
|
|
1329
|
+
var Kr = () => (0, import_react.useContext)(Gr);
|
|
1330
|
+
var qr = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
1331
|
+
var Jr = () => {
|
|
1332
1332
|
try {
|
|
1333
|
-
let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(
|
|
1333
|
+
let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(qn);
|
|
1334
1334
|
return e6 || t2;
|
|
1335
1335
|
} catch {
|
|
1336
1336
|
return false;
|
|
1337
1337
|
}
|
|
1338
1338
|
};
|
|
1339
|
-
var
|
|
1340
|
-
let e6 =
|
|
1341
|
-
return Kr(
|
|
1339
|
+
var Yr = () => {
|
|
1340
|
+
let e6 = Jr();
|
|
1341
|
+
return qr(Kr()) && !e6;
|
|
1342
1342
|
};
|
|
1343
|
-
function
|
|
1343
|
+
function Xr(e6) {
|
|
1344
1344
|
return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
|
|
1345
1345
|
}
|
|
1346
|
-
function
|
|
1346
|
+
function Zr(e6) {
|
|
1347
1347
|
return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function Qr(e6) {
|
|
1350
1350
|
return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
|
|
1351
1351
|
}
|
|
1352
|
-
function
|
|
1353
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...
|
|
1352
|
+
function z(e6, t2) {
|
|
1353
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...Xr(e6) ? e6.$and : [e6], ...Xr(t2) ? t2.$and : [t2]] };
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...
|
|
1355
|
+
function $r(e6, t2) {
|
|
1356
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...Zr(e6) ? e6.$or : [e6], ...Zr(t2) ? t2.$or : [t2]] };
|
|
1357
1357
|
}
|
|
1358
|
-
function
|
|
1359
|
-
if (e6 !== void 0 && Object.keys(e6).length !== 0) return
|
|
1358
|
+
function ei(e6) {
|
|
1359
|
+
if (e6 !== void 0 && Object.keys(e6).length !== 0) return Qr(e6) ? e6.$not : { $not: e6 };
|
|
1360
1360
|
}
|
|
1361
|
-
var
|
|
1361
|
+
var ti = class {
|
|
1362
1362
|
_items;
|
|
1363
1363
|
_fetchNextPage;
|
|
1364
1364
|
_fetchPrevPage;
|
|
@@ -1388,7 +1388,7 @@ var ei = class {
|
|
|
1388
1388
|
return await this._fetchPrevPage();
|
|
1389
1389
|
}
|
|
1390
1390
|
};
|
|
1391
|
-
var
|
|
1391
|
+
var ni = class extends ti {
|
|
1392
1392
|
_nextCursor;
|
|
1393
1393
|
_prevCursor;
|
|
1394
1394
|
cursors;
|
|
@@ -1402,7 +1402,7 @@ var ti = class extends ei {
|
|
|
1402
1402
|
return !!this._prevCursor;
|
|
1403
1403
|
}
|
|
1404
1404
|
};
|
|
1405
|
-
var
|
|
1405
|
+
var ri = class extends ti {
|
|
1406
1406
|
_totalCount;
|
|
1407
1407
|
_offset;
|
|
1408
1408
|
_tooManyToCount;
|
|
@@ -1425,76 +1425,76 @@ var ni = class extends ei {
|
|
|
1425
1425
|
return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
|
|
1426
1426
|
}
|
|
1427
1427
|
};
|
|
1428
|
-
function
|
|
1428
|
+
function ii(e6) {
|
|
1429
1429
|
let t2 = (n2) => ({ query: n2, async find() {
|
|
1430
1430
|
try {
|
|
1431
|
-
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [
|
|
1431
|
+
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [qe]: a2, [Je]: o2 } = e6.responseTransformer(i2);
|
|
1432
1432
|
if (e6.pagingMethod === `OFFSET`) {
|
|
1433
1433
|
let e7 = n2;
|
|
1434
|
-
return new
|
|
1434
|
+
return new ri({ 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 });
|
|
1435
1435
|
}
|
|
1436
1436
|
let s2 = n2.cursorPaging;
|
|
1437
|
-
return new
|
|
1437
|
+
return new ni({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
|
|
1438
1438
|
} catch (t3) {
|
|
1439
1439
|
throw e6.errorTransformer(t3);
|
|
1440
1440
|
}
|
|
1441
1441
|
}, skipTo(e7) {
|
|
1442
1442
|
return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
|
|
1443
1443
|
}, eq(r2, i2) {
|
|
1444
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
1445
|
-
return t2({ ...n2, filter:
|
|
1444
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [B(e6.transformationPaths, r2)]: a2 };
|
|
1445
|
+
return t2({ ...n2, filter: z(n2.filter, o2) });
|
|
1446
1446
|
}, ne(r2, i2) {
|
|
1447
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
1448
|
-
return t2({ ...n2, filter:
|
|
1447
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [B(e6.transformationPaths, r2)]: { $ne: a2 } };
|
|
1448
|
+
return t2({ ...n2, filter: z(n2.filter, o2) });
|
|
1449
1449
|
}, ge(r2, i2) {
|
|
1450
|
-
let a2 = { [
|
|
1451
|
-
return t2({ ...n2, filter:
|
|
1450
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $gte: i2 } };
|
|
1451
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1452
1452
|
}, gt(r2, i2) {
|
|
1453
|
-
let a2 = { [
|
|
1454
|
-
return t2({ ...n2, filter:
|
|
1453
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $gt: i2 } };
|
|
1454
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1455
1455
|
}, le(r2, i2) {
|
|
1456
|
-
let a2 = { [
|
|
1457
|
-
return t2({ ...n2, filter:
|
|
1456
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $lte: i2 } };
|
|
1457
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1458
1458
|
}, lt(r2, i2) {
|
|
1459
|
-
let a2 = { [
|
|
1460
|
-
return t2({ ...n2, filter:
|
|
1459
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $lt: i2 } };
|
|
1460
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1461
1461
|
}, isNotEmpty(e7) {
|
|
1462
1462
|
return this.ne(e7, null);
|
|
1463
1463
|
}, isEmpty(e7) {
|
|
1464
1464
|
return this.eq(e7, null);
|
|
1465
1465
|
}, startsWith(r2, i2) {
|
|
1466
|
-
let a2 = { [
|
|
1467
|
-
return t2({ ...n2, filter:
|
|
1466
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $startsWith: i2 } };
|
|
1467
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1468
1468
|
}, endsWith(r2, i2) {
|
|
1469
|
-
let a2 = { [
|
|
1470
|
-
return t2({ ...n2, filter:
|
|
1469
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $endsWith: i2 } };
|
|
1470
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1471
1471
|
}, contains(r2, i2) {
|
|
1472
|
-
let a2 = { [
|
|
1473
|
-
return t2({ ...n2, filter:
|
|
1472
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $contains: i2 } };
|
|
1473
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1474
1474
|
}, hasSome(r2, ...i2) {
|
|
1475
|
-
let a2 = { [
|
|
1476
|
-
return t2({ ...n2, filter:
|
|
1475
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
1476
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1477
1477
|
}, hasAll(r2, ...i2) {
|
|
1478
|
-
let a2 = { [
|
|
1479
|
-
return t2({ ...n2, filter:
|
|
1478
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
1479
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1480
1480
|
}, between(e7, t3, n3) {
|
|
1481
1481
|
return this.ge(e7, t3).lt(e7, n3);
|
|
1482
1482
|
}, in(r2, i2) {
|
|
1483
|
-
let a2 = { [
|
|
1484
|
-
return t2({ ...n2, filter:
|
|
1483
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $in: i2 } };
|
|
1484
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1485
1485
|
}, exists(r2, i2 = true) {
|
|
1486
|
-
let a2 = { [
|
|
1487
|
-
return t2({ ...n2, filter:
|
|
1486
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $exists: i2 } };
|
|
1487
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1488
1488
|
}, or(e7) {
|
|
1489
|
-
return t2({ ...n2, filter:
|
|
1489
|
+
return t2({ ...n2, filter: $r(n2.filter, e7.query.filter) });
|
|
1490
1490
|
}, and(e7) {
|
|
1491
|
-
return t2({ ...n2, filter:
|
|
1491
|
+
return t2({ ...n2, filter: z(n2.filter, e7.query.filter) });
|
|
1492
1492
|
}, not(e7) {
|
|
1493
|
-
return t2({ ...n2, filter:
|
|
1493
|
+
return t2({ ...n2, filter: ei(e7.query.filter) });
|
|
1494
1494
|
}, ascending(...r2) {
|
|
1495
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
1495
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: B(e6.transformationPaths, t3), order: `ASC` }))] });
|
|
1496
1496
|
}, descending(...r2) {
|
|
1497
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
1497
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: B(e6.transformationPaths, t3), order: `DESC` }))] });
|
|
1498
1498
|
}, skip(e7) {
|
|
1499
1499
|
return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
|
|
1500
1500
|
}, limit(r2) {
|
|
@@ -1507,127 +1507,127 @@ function ri(e6) {
|
|
|
1507
1507
|
} });
|
|
1508
1508
|
return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
|
|
1509
1509
|
}
|
|
1510
|
-
function
|
|
1510
|
+
function B(e6, t2) {
|
|
1511
1511
|
let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
|
|
1512
|
-
return n2 ? t2.replace(n2, e6[n2]) :
|
|
1513
|
-
}
|
|
1514
|
-
var
|
|
1515
|
-
var
|
|
1516
|
-
var
|
|
1517
|
-
var
|
|
1518
|
-
var
|
|
1519
|
-
var
|
|
1520
|
-
function
|
|
1512
|
+
return n2 ? t2.replace(n2, e6[n2]) : Xe(t2, { ...e6, ...Ye });
|
|
1513
|
+
}
|
|
1514
|
+
var ai = `filter`;
|
|
1515
|
+
var oi = `sort`;
|
|
1516
|
+
var si = `cursorPaging`;
|
|
1517
|
+
var ci = `paging`;
|
|
1518
|
+
var li = [ai, oi, si];
|
|
1519
|
+
var ui = [ai, oi, ci];
|
|
1520
|
+
function di(e6, t2) {
|
|
1521
1521
|
return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
|
|
1522
1522
|
}
|
|
1523
|
-
function di(e6) {
|
|
1524
|
-
return ui(e6, ci);
|
|
1525
|
-
}
|
|
1526
1523
|
function fi(e6) {
|
|
1527
|
-
return
|
|
1524
|
+
return di(e6, li);
|
|
1528
1525
|
}
|
|
1529
1526
|
function pi(e6) {
|
|
1527
|
+
return di(e6, ui);
|
|
1528
|
+
}
|
|
1529
|
+
function mi(e6) {
|
|
1530
1530
|
let { hasOptionsParameter: t2 } = e6;
|
|
1531
1531
|
return function(...n2) {
|
|
1532
|
-
return t2 ?
|
|
1532
|
+
return t2 ? gi(n2, e6) : hi(n2, e6);
|
|
1533
1533
|
};
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function hi(e6, t2) {
|
|
1536
1536
|
return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function gi(e6, t2) {
|
|
1539
1539
|
switch (e6.length) {
|
|
1540
1540
|
case 0:
|
|
1541
1541
|
return t2.builderQueryFunction();
|
|
1542
1542
|
case 1:
|
|
1543
|
-
return
|
|
1543
|
+
return fi(e6[0]) || pi(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
|
|
1544
1544
|
default:
|
|
1545
1545
|
return t2.typedQueryFunction(e6[0], e6[1]);
|
|
1546
1546
|
}
|
|
1547
1547
|
}
|
|
1548
|
-
function
|
|
1548
|
+
function V(e6) {
|
|
1549
1549
|
if (!e6) return;
|
|
1550
1550
|
let t2 = ``;
|
|
1551
1551
|
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;
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1553
|
+
function H(e6) {
|
|
1554
1554
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
1555
1555
|
}
|
|
1556
|
-
var
|
|
1557
|
-
var
|
|
1558
|
-
var
|
|
1559
|
-
var
|
|
1560
|
-
var
|
|
1561
|
-
function
|
|
1556
|
+
var _i = [{ path: `category.updatedDate` }, { path: `category.coverImage.urlExpirationDate` }];
|
|
1557
|
+
var vi = [{ path: `category.coverImage.focalPoint.x` }, { path: `category.coverImage.focalPoint.y` }];
|
|
1558
|
+
var yi = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
1559
|
+
var bi = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
1560
|
+
var xi = [{ path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
1561
|
+
function Si(e6) {
|
|
1562
1562
|
return Mt(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: `` }] } }));
|
|
1563
1563
|
}
|
|
1564
|
-
var
|
|
1565
|
-
function
|
|
1564
|
+
var Ci = `@wix/auto_sdk_blog_categories`;
|
|
1565
|
+
function wi(e6) {
|
|
1566
1566
|
function t2({ host: t3 }) {
|
|
1567
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.GetCategory`, packageName:
|
|
1567
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.GetCategory`, packageName: Ci, migrationOptions: { optInTransformResponse: true }, url: Si({ protoPath: `/v3/categories/{categoryId}`, data: e6, host: t3 }), params: I(e6), transformResponse: (e7) => N(e7, [{ transformFn: M, paths: _i }, { transformFn: L, paths: vi }]) };
|
|
1568
1568
|
}
|
|
1569
1569
|
return t2;
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1571
|
+
function Ti(e6) {
|
|
1572
1572
|
function t2({ host: t3 }) {
|
|
1573
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.GetCategoryBySlug`, packageName:
|
|
1573
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.GetCategoryBySlug`, packageName: Ci, migrationOptions: { optInTransformResponse: true }, url: Si({ protoPath: `/v3/categories/slugs/{slug}`, data: e6, host: t3 }), params: I(e6), transformResponse: (e7) => N(e7, [{ transformFn: M, paths: _i }, { transformFn: L, paths: vi }]) };
|
|
1574
1574
|
}
|
|
1575
1575
|
return t2;
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1577
|
+
function Ei(e6) {
|
|
1578
1578
|
function t2({ host: t3 }) {
|
|
1579
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName:
|
|
1579
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Ci, migrationOptions: { optInTransformResponse: true }, url: Si({ protoPath: `/v3/categories`, data: e6, host: t3 }), params: I(e6), transformResponse: (e7) => N(e7, [{ transformFn: M, paths: yi }, { transformFn: L, paths: bi }]) };
|
|
1580
1580
|
}
|
|
1581
1581
|
return t2;
|
|
1582
1582
|
}
|
|
1583
|
-
function
|
|
1583
|
+
function Di(e6) {
|
|
1584
1584
|
function t2({ host: t3 }) {
|
|
1585
|
-
let n2 =
|
|
1586
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.QueryCategories`, packageName:
|
|
1585
|
+
let n2 = N(e6, [{ transformFn: an, paths: xi }]);
|
|
1586
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.QueryCategories`, packageName: Ci, migrationOptions: { optInTransformResponse: true }, url: Si({ protoPath: `/v3/categories/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => N(e7, [{ transformFn: M, paths: yi }, { transformFn: L, paths: bi }]) };
|
|
1587
1587
|
}
|
|
1588
1588
|
return t2;
|
|
1589
1589
|
}
|
|
1590
|
-
var
|
|
1591
|
-
var
|
|
1592
|
-
var
|
|
1593
|
-
var
|
|
1594
|
-
async function
|
|
1595
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
1590
|
+
var Oi = [{ path: `category.url` }, { path: `category.translations.url` }];
|
|
1591
|
+
var ki = [{ path: `category.coverImage` }];
|
|
1592
|
+
var Ai = [{ path: `categories.url` }, { path: `categories.translations.url` }];
|
|
1593
|
+
var ji = [{ path: `categories.coverImage` }];
|
|
1594
|
+
async function Mi(e6, t2) {
|
|
1595
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = wi(A({ categoryId: e6, fieldsets: t2?.fieldsets }));
|
|
1596
1596
|
r2?.onSiteCall?.();
|
|
1597
1597
|
try {
|
|
1598
1598
|
let e7 = await n2.request(i2);
|
|
1599
|
-
return r2?.onSuccess?.(e7),
|
|
1599
|
+
return r2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: Oi }, { transformFn: V, paths: ki }]));
|
|
1600
1600
|
} catch (e7) {
|
|
1601
|
-
let t3 =
|
|
1601
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { categoryId: `$[0]`, fieldsets: `$[1].fieldsets` }, singleArgumentUnchanged: false }, [`categoryId`, `options`]);
|
|
1602
1602
|
throw r2?.onError?.(e7), t3;
|
|
1603
1603
|
}
|
|
1604
1604
|
}
|
|
1605
|
-
async function
|
|
1606
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
1605
|
+
async function Ni(e6, t2) {
|
|
1606
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ti(A({ slug: e6, fieldsets: t2?.fieldsets, language: t2?.language }));
|
|
1607
1607
|
r2?.onSiteCall?.();
|
|
1608
1608
|
try {
|
|
1609
1609
|
let e7 = await n2.request(i2);
|
|
1610
|
-
return r2?.onSuccess?.(e7),
|
|
1610
|
+
return r2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: Oi }, { transformFn: V, paths: ki }]));
|
|
1611
1611
|
} catch (e7) {
|
|
1612
|
-
let t3 =
|
|
1612
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fieldsets: `$[1].fieldsets`, language: `$[1].language` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
|
|
1613
1613
|
throw r2?.onError?.(e7), t3;
|
|
1614
1614
|
}
|
|
1615
1615
|
}
|
|
1616
|
-
async function
|
|
1617
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
1616
|
+
async function Pi(e6) {
|
|
1617
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Ei(A({ paging: e6?.paging, fieldsets: e6?.fieldsets, language: e6?.language }));
|
|
1618
1618
|
n2?.onSiteCall?.();
|
|
1619
1619
|
try {
|
|
1620
1620
|
let e7 = await t2.request(r2);
|
|
1621
|
-
return n2?.onSuccess?.(e7),
|
|
1621
|
+
return n2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: Ai }, { transformFn: V, paths: ji }]));
|
|
1622
1622
|
} catch (e7) {
|
|
1623
|
-
let t3 =
|
|
1623
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
1624
1624
|
throw n2?.onError?.(e7), t3;
|
|
1625
1625
|
}
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1627
|
+
function Fi(e6) {
|
|
1628
1628
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
1629
|
-
return
|
|
1630
|
-
let i2 =
|
|
1629
|
+
return ii({ func: async (r2) => {
|
|
1630
|
+
let i2 = Di({ ...r2, ...e6 ?? {} });
|
|
1631
1631
|
n2?.onSiteCall?.();
|
|
1632
1632
|
try {
|
|
1633
1633
|
let e7 = await t2.request(i2);
|
|
@@ -1637,52 +1637,52 @@ function Pi(e6) {
|
|
|
1637
1637
|
}
|
|
1638
1638
|
}, requestTransformer: (t3) => {
|
|
1639
1639
|
let n3 = [t3, e6];
|
|
1640
|
-
return
|
|
1640
|
+
return A({ ...n3?.[1], query: n3?.[0] });
|
|
1641
1641
|
}, responseTransformer: ({ data: e7 }) => {
|
|
1642
|
-
let t3 =
|
|
1642
|
+
let t3 = j(N(e7, [{ transformFn: H, paths: Ai }, { transformFn: V, paths: ji }]));
|
|
1643
1643
|
return { items: t3?.categories, pagingMetadata: t3?.pagingMetadata };
|
|
1644
1644
|
}, errorTransformer: (e7) => {
|
|
1645
|
-
throw
|
|
1645
|
+
throw P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
1646
1646
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
1647
1647
|
}
|
|
1648
|
-
async function
|
|
1649
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
1648
|
+
async function Ii(e6, t2) {
|
|
1649
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Di(A({ query: e6, ...t2 }));
|
|
1650
1650
|
r2?.onSiteCall?.();
|
|
1651
1651
|
try {
|
|
1652
1652
|
let e7 = await n2.request(i2);
|
|
1653
|
-
return r2?.onSuccess?.(e7),
|
|
1653
|
+
return r2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: Ai }, { transformFn: V, paths: ji }]));
|
|
1654
1654
|
} catch (e7) {
|
|
1655
|
-
let t3 =
|
|
1655
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
1656
1656
|
throw r2?.onError?.(e7), t3;
|
|
1657
1657
|
}
|
|
1658
1658
|
}
|
|
1659
|
-
function Ii(e6) {
|
|
1660
|
-
return (t2, n2) => ji(t2, n2, { httpClient: e6 });
|
|
1661
|
-
}
|
|
1662
1659
|
function Li(e6) {
|
|
1663
1660
|
return (t2, n2) => Mi(t2, n2, { httpClient: e6 });
|
|
1664
1661
|
}
|
|
1665
1662
|
function Ri(e6) {
|
|
1666
|
-
return (t2) => Ni(t2, { httpClient: e6 });
|
|
1663
|
+
return (t2, n2) => Ni(t2, n2, { httpClient: e6 });
|
|
1667
1664
|
}
|
|
1668
1665
|
function zi(e6) {
|
|
1669
1666
|
return (t2) => Pi(t2, { httpClient: e6 });
|
|
1670
1667
|
}
|
|
1671
1668
|
function Bi(e6) {
|
|
1672
|
-
return (t2
|
|
1669
|
+
return (t2) => Fi(t2, { httpClient: e6 });
|
|
1673
1670
|
}
|
|
1674
1671
|
function Vi(e6) {
|
|
1675
|
-
|
|
1672
|
+
return (t2, n2) => Ii(t2, n2, { httpClient: e6 });
|
|
1673
|
+
}
|
|
1674
|
+
function Hi(e6) {
|
|
1675
|
+
let t2 = mi({ builderQueryFunction: (t3) => Bi(e6)(t3), typedQueryFunction: (t3, n3) => Vi(e6)(t3, n3), hasOptionsParameter: true });
|
|
1676
1676
|
function n2(e7, n3) {
|
|
1677
1677
|
return t2(...arguments);
|
|
1678
1678
|
}
|
|
1679
1679
|
return n2;
|
|
1680
1680
|
}
|
|
1681
|
-
var
|
|
1682
|
-
var
|
|
1683
|
-
var
|
|
1684
|
-
var
|
|
1685
|
-
function
|
|
1681
|
+
var Ui = F(Li);
|
|
1682
|
+
var Wi = F(Ri);
|
|
1683
|
+
var Gi = F(zi);
|
|
1684
|
+
var Ki = F(Hi);
|
|
1685
|
+
function qi(e6) {
|
|
1686
1686
|
if (!e6) return;
|
|
1687
1687
|
let t2 = ``;
|
|
1688
1688
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -1697,46 +1697,46 @@ function Ki(e6) {
|
|
|
1697
1697
|
}
|
|
1698
1698
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
1699
1699
|
}
|
|
1700
|
-
var
|
|
1701
|
-
var
|
|
1702
|
-
var Yi = [{ 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` }];
|
|
1703
|
-
var
|
|
1704
|
-
function
|
|
1700
|
+
var Ji = [{ 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` }];
|
|
1701
|
+
var Yi = [{ path: `posts.richContentCompressed` }];
|
|
1702
|
+
var Xi = [{ 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` }];
|
|
1703
|
+
var Zi = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
1704
|
+
function Qi(e6) {
|
|
1705
1705
|
return Mt(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` }] } }));
|
|
1706
1706
|
}
|
|
1707
|
-
var
|
|
1708
|
-
function
|
|
1707
|
+
var $i = `@wix/auto_sdk_blog_posts`;
|
|
1708
|
+
function ea(e6) {
|
|
1709
1709
|
function t2({ host: t3 }) {
|
|
1710
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName:
|
|
1710
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName: $i, migrationOptions: { optInTransformResponse: true }, url: Qi({ protoPath: `/v3/posts`, data: e6, host: t3 }), params: I(e6), transformResponse: (e7) => N(e7, [{ transformFn: M, paths: Ji }, { transformFn: on, paths: Yi }, { transformFn: L, paths: Xi }]) };
|
|
1711
1711
|
}
|
|
1712
1712
|
return t2;
|
|
1713
1713
|
}
|
|
1714
|
-
function
|
|
1714
|
+
function ta(e6) {
|
|
1715
1715
|
function t2({ host: t3 }) {
|
|
1716
|
-
let n2 =
|
|
1717
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
1716
|
+
let n2 = N(e6, [{ transformFn: an, paths: Zi }]);
|
|
1717
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: $i, migrationOptions: { optInTransformResponse: true }, url: Qi({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => N(e7, [{ transformFn: M, paths: Ji }, { transformFn: on, paths: Yi }, { transformFn: L, paths: Xi }]) };
|
|
1718
1718
|
}
|
|
1719
1719
|
return t2;
|
|
1720
1720
|
}
|
|
1721
|
-
var
|
|
1722
|
-
var
|
|
1723
|
-
var
|
|
1724
|
-
var
|
|
1725
|
-
async function
|
|
1726
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
1721
|
+
var na = [{ path: `posts.url` }, { path: `posts.translations.url` }];
|
|
1722
|
+
var ra = [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }];
|
|
1723
|
+
var ia = [{ path: `posts.media.wixMedia.videoV2` }];
|
|
1724
|
+
var U = ((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))(U || {});
|
|
1725
|
+
async function aa(e6) {
|
|
1726
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ea(A({ 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 }, []));
|
|
1727
1727
|
n2?.onSiteCall?.();
|
|
1728
1728
|
try {
|
|
1729
1729
|
let e7 = await t2.request(r2);
|
|
1730
|
-
return n2?.onSuccess?.(e7),
|
|
1730
|
+
return n2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: na }, { transformFn: V, paths: ra }, { transformFn: qi, paths: ia }]), [`posts.richContent`, `posts.rich_content`]);
|
|
1731
1731
|
} catch (e7) {
|
|
1732
|
-
let t3 =
|
|
1732
|
+
let t3 = P(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`]);
|
|
1733
1733
|
throw n2?.onError?.(e7), t3;
|
|
1734
1734
|
}
|
|
1735
1735
|
}
|
|
1736
|
-
function
|
|
1736
|
+
function oa(e6) {
|
|
1737
1737
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
1738
|
-
return
|
|
1739
|
-
let i2 =
|
|
1738
|
+
return ii({ func: async (r2) => {
|
|
1739
|
+
let i2 = ta({ ...r2, ...e6 ?? {} });
|
|
1740
1740
|
n2?.onSiteCall?.();
|
|
1741
1741
|
try {
|
|
1742
1742
|
let e7 = await t2.request(i2);
|
|
@@ -1746,78 +1746,78 @@ function aa(e6) {
|
|
|
1746
1746
|
}
|
|
1747
1747
|
}, requestTransformer: (t3) => {
|
|
1748
1748
|
let n3 = [t3, e6];
|
|
1749
|
-
return
|
|
1749
|
+
return A({ ...n3?.[1], query: n3?.[0] }, []);
|
|
1750
1750
|
}, responseTransformer: ({ data: e7 }) => {
|
|
1751
|
-
let t3 =
|
|
1751
|
+
let t3 = j(N(e7, [{ transformFn: H, paths: na }, { transformFn: V, paths: ra }, { transformFn: qi, paths: ia }]), [`posts.richContent`, `posts.rich_content`]);
|
|
1752
1752
|
return { items: t3?.posts, pagingMetadata: t3?.pagingMetadata };
|
|
1753
1753
|
}, errorTransformer: (e7) => {
|
|
1754
|
-
throw
|
|
1754
|
+
throw P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
1755
1755
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
1756
1756
|
}
|
|
1757
|
-
async function
|
|
1758
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
1757
|
+
async function sa(e6, t2) {
|
|
1758
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = ta(A({ query: e6, ...t2 }, []));
|
|
1759
1759
|
r2?.onSiteCall?.();
|
|
1760
1760
|
try {
|
|
1761
1761
|
let e7 = await n2.request(i2);
|
|
1762
|
-
return r2?.onSuccess?.(e7),
|
|
1762
|
+
return r2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: na }, { transformFn: V, paths: ra }, { transformFn: qi, paths: ia }]), [`posts.richContent`, `posts.rich_content`]);
|
|
1763
1763
|
} catch (e7) {
|
|
1764
|
-
let t3 =
|
|
1764
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
1765
1765
|
throw r2?.onError?.(e7), t3;
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
|
-
function sa(e6) {
|
|
1769
|
-
return (t2) => ia(t2, { httpClient: e6 });
|
|
1770
|
-
}
|
|
1771
1768
|
function ca(e6) {
|
|
1772
1769
|
return (t2) => aa(t2, { httpClient: e6 });
|
|
1773
1770
|
}
|
|
1774
1771
|
function la(e6) {
|
|
1775
|
-
return (t2
|
|
1772
|
+
return (t2) => oa(t2, { httpClient: e6 });
|
|
1776
1773
|
}
|
|
1777
1774
|
function ua(e6) {
|
|
1778
|
-
|
|
1775
|
+
return (t2, n2) => sa(t2, n2, { httpClient: e6 });
|
|
1776
|
+
}
|
|
1777
|
+
function da(e6) {
|
|
1778
|
+
let t2 = mi({ builderQueryFunction: (t3) => la(e6)(t3), typedQueryFunction: (t3, n3) => ua(e6)(t3, n3), hasOptionsParameter: true });
|
|
1779
1779
|
function n2(e7, n3) {
|
|
1780
1780
|
return t2(...arguments);
|
|
1781
1781
|
}
|
|
1782
1782
|
return n2;
|
|
1783
1783
|
}
|
|
1784
|
-
var
|
|
1785
|
-
var
|
|
1786
|
-
var
|
|
1787
|
-
function
|
|
1784
|
+
var fa = F(ca);
|
|
1785
|
+
var pa = F(da);
|
|
1786
|
+
var ma = [{ path: `tag.createdDate` }, { path: `tag.updatedDate` }];
|
|
1787
|
+
function ha(e6) {
|
|
1788
1788
|
return Mt(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "www.wixapis.com": [{ srcPath: `/v3/tags`, destPath: `/v3/tags` }, { srcPath: `/blog/v3/tags`, destPath: `/v3/tags` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v2/tags`, destPath: `/v2/tags` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/tag`, destPath: `/v3/bulk/tag` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/tags`, destPath: `/v3/bulk/tags` }, { srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "bo._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "wixbo.ai": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "wix-bo.com": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "social-blog._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }] } }));
|
|
1789
1789
|
}
|
|
1790
|
-
var
|
|
1791
|
-
function
|
|
1790
|
+
var ga = `@wix/auto_sdk_blog_tags`;
|
|
1791
|
+
function _a(e6) {
|
|
1792
1792
|
function t2({ host: t3 }) {
|
|
1793
|
-
return { entityFqdn: `wix.blog.v3.tag`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.TagService.GetTagBySlug`, packageName:
|
|
1793
|
+
return { entityFqdn: `wix.blog.v3.tag`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.TagService.GetTagBySlug`, packageName: ga, migrationOptions: { optInTransformResponse: true }, url: ha({ protoPath: `/v3/tags/slugs/{slug}`, data: e6, host: t3 }), params: I(e6), transformResponse: (e7) => N(e7, [{ transformFn: M, paths: ma }]) };
|
|
1794
1794
|
}
|
|
1795
1795
|
return t2;
|
|
1796
1796
|
}
|
|
1797
|
-
var
|
|
1798
|
-
async function
|
|
1799
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
1797
|
+
var va = [{ path: `tag.url` }];
|
|
1798
|
+
async function ya(e6, t2) {
|
|
1799
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = _a(A({ slug: e6, fieldsets: t2?.fieldsets, language: t2?.language }));
|
|
1800
1800
|
r2?.onSiteCall?.();
|
|
1801
1801
|
try {
|
|
1802
1802
|
let e7 = await n2.request(i2);
|
|
1803
|
-
return r2?.onSuccess?.(e7),
|
|
1803
|
+
return r2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: va }]));
|
|
1804
1804
|
} catch (e7) {
|
|
1805
|
-
let t3 =
|
|
1805
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fieldsets: `$[1].fieldsets`, language: `$[1].language` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
|
|
1806
1806
|
throw r2?.onError?.(e7), t3;
|
|
1807
1807
|
}
|
|
1808
1808
|
}
|
|
1809
|
-
function
|
|
1810
|
-
return (t2, n2) =>
|
|
1809
|
+
function ba(e6) {
|
|
1810
|
+
return (t2, n2) => ya(t2, n2, { httpClient: e6 });
|
|
1811
1811
|
}
|
|
1812
|
-
var
|
|
1813
|
-
var
|
|
1812
|
+
var xa = F(ba);
|
|
1813
|
+
var Sa = () => {
|
|
1814
1814
|
try {
|
|
1815
1815
|
return (0, import_services_manager_react.useService)(Rn).currentUrl;
|
|
1816
1816
|
} catch {
|
|
1817
1817
|
return;
|
|
1818
1818
|
}
|
|
1819
1819
|
};
|
|
1820
|
-
var
|
|
1820
|
+
var Ca = (e6, t2) => {
|
|
1821
1821
|
let n2;
|
|
1822
1822
|
try {
|
|
1823
1823
|
n2 = new URL(e6);
|
|
@@ -1827,24 +1827,24 @@ var Sa = (e6, t2) => {
|
|
|
1827
1827
|
let r2 = n2.pathname.split(`/`).filter(Boolean);
|
|
1828
1828
|
if (r2.length !== 0) return r2[r2.length - 1] = encodeURIComponent(t2), n2.pathname = `/${r2.join(`/`)}`, n2.toString();
|
|
1829
1829
|
};
|
|
1830
|
-
var
|
|
1831
|
-
let r2 =
|
|
1830
|
+
var wa = (e6, t2, n2) => {
|
|
1831
|
+
let r2 = Sa(), i2 = Yr(), a2 = Wr(), { language: o2, translationId: c2 } = e6 ?? {}, l2 = !!(t2 && c2 && o2 && o2 !== t2);
|
|
1832
1832
|
(0, import_react.useEffect)(() => {
|
|
1833
1833
|
if (!l2 || !t2 || !c2 || !r2 || i2 || a2) return;
|
|
1834
1834
|
let e7 = false;
|
|
1835
1835
|
return n2(c2, t2).then((t3) => {
|
|
1836
|
-
let n3 = t3 &&
|
|
1836
|
+
let n3 = t3 && Ca(r2, t3);
|
|
1837
1837
|
!e7 && n3 && n3 !== r2 && window.location.assign(n3);
|
|
1838
1838
|
}), () => {
|
|
1839
1839
|
e7 = true;
|
|
1840
1840
|
};
|
|
1841
1841
|
}, [l2, t2, c2, r2, i2, a2, n2]);
|
|
1842
1842
|
};
|
|
1843
|
-
var
|
|
1844
|
-
function
|
|
1845
|
-
let e6 =
|
|
1843
|
+
var Ta = R(`@wix/site-service-warmup-data`);
|
|
1844
|
+
function Ea() {
|
|
1845
|
+
let e6 = Mr(), t2 = null;
|
|
1846
1846
|
try {
|
|
1847
|
-
t2 = (0, import_services_manager_react.useGetService)()(
|
|
1847
|
+
t2 = (0, import_services_manager_react.useGetService)()(Ta);
|
|
1848
1848
|
} catch {
|
|
1849
1849
|
}
|
|
1850
1850
|
return (0, import_react.useMemo)(() => ({ isServer: e6, scope: t2 ?? void 0, get: async (n2) => {
|
|
@@ -1861,13 +1861,13 @@ function Ta() {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
} }), [e6, t2]);
|
|
1863
1863
|
}
|
|
1864
|
-
var
|
|
1864
|
+
var Da = () => {
|
|
1865
1865
|
let e6 = /* @__PURE__ */ new Map();
|
|
1866
1866
|
return { getOrInsert: (t2, n2) => (e6.has(t2) || e6.set(t2, n2().finally(() => {
|
|
1867
1867
|
e6.delete(t2);
|
|
1868
1868
|
})), e6.get(t2)) };
|
|
1869
1869
|
};
|
|
1870
|
-
var
|
|
1870
|
+
var Oa = async (e6) => {
|
|
1871
1871
|
try {
|
|
1872
1872
|
let { default: t2 } = await e6();
|
|
1873
1873
|
return t2;
|
|
@@ -1875,9 +1875,9 @@ var Da = async (e6) => {
|
|
|
1875
1875
|
return;
|
|
1876
1876
|
}
|
|
1877
1877
|
};
|
|
1878
|
-
var
|
|
1879
|
-
let r2 =
|
|
1880
|
-
let [i3, a2] = await Promise.all([
|
|
1878
|
+
var ka = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
1879
|
+
let r2 = Da(), i2 = async (r3) => {
|
|
1880
|
+
let [i3, a2] = await Promise.all([Oa(() => t2(r3)), !e6 || !n2 ? void 0 : Oa(() => n2(r3))]);
|
|
1881
1881
|
if (i3 && a2) return { ...i3, ...a2 };
|
|
1882
1882
|
if (i3) return i3;
|
|
1883
1883
|
if (a2) return a2;
|
|
@@ -1885,61 +1885,61 @@ var Oa = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
|
1885
1885
|
};
|
|
1886
1886
|
return (e7) => r2.getOrInsert(e7, () => i2(e7));
|
|
1887
1887
|
};
|
|
1888
|
-
var
|
|
1889
|
-
var
|
|
1888
|
+
var W = (e6) => typeof e6 == `string`;
|
|
1889
|
+
var Aa = () => {
|
|
1890
1890
|
let e6, t2, n2 = new Promise((n3, r2) => {
|
|
1891
1891
|
e6 = n3, t2 = r2;
|
|
1892
1892
|
});
|
|
1893
1893
|
return n2.resolve = e6, n2.reject = t2, n2;
|
|
1894
1894
|
};
|
|
1895
|
-
var
|
|
1896
|
-
var
|
|
1895
|
+
var ja = (e6) => e6 == null ? `` : String(e6);
|
|
1896
|
+
var Ma = (e6, t2, n2) => {
|
|
1897
1897
|
e6.forEach((e7) => {
|
|
1898
1898
|
t2[e7] && (n2[e7] = t2[e7]);
|
|
1899
1899
|
});
|
|
1900
1900
|
};
|
|
1901
|
-
var
|
|
1902
|
-
var
|
|
1903
|
-
var
|
|
1904
|
-
var
|
|
1905
|
-
let r2 =
|
|
1901
|
+
var Na = /###/g;
|
|
1902
|
+
var Pa = (e6) => e6 && e6.includes(`###`) ? e6.replace(Na, `.`) : e6;
|
|
1903
|
+
var Fa = (e6) => !e6 || W(e6);
|
|
1904
|
+
var Ia = (e6, t2, n2) => {
|
|
1905
|
+
let r2 = W(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
1906
1906
|
for (; i2 < r2.length - 1; ) {
|
|
1907
|
-
if (
|
|
1908
|
-
let t3 =
|
|
1907
|
+
if (Fa(e6)) return {};
|
|
1908
|
+
let t3 = Pa(r2[i2]);
|
|
1909
1909
|
!e6[t3] && n2 && (e6[t3] = new n2()), e6 = Object.prototype.hasOwnProperty.call(e6, t3) ? e6[t3] : {}, ++i2;
|
|
1910
1910
|
}
|
|
1911
|
-
return
|
|
1911
|
+
return Fa(e6) ? {} : { obj: e6, k: Pa(r2[i2]) };
|
|
1912
1912
|
};
|
|
1913
|
-
var
|
|
1914
|
-
let { obj: r2, k: i2 } =
|
|
1913
|
+
var La = (e6, t2, n2) => {
|
|
1914
|
+
let { obj: r2, k: i2 } = Ia(e6, t2, Object);
|
|
1915
1915
|
if (r2 !== void 0 || t2.length === 1) {
|
|
1916
1916
|
r2[i2] = n2;
|
|
1917
1917
|
return;
|
|
1918
1918
|
}
|
|
1919
|
-
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 =
|
|
1920
|
-
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 =
|
|
1919
|
+
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = Ia(e6, o2, Object);
|
|
1920
|
+
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = Ia(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
|
|
1921
1921
|
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
1922
1922
|
};
|
|
1923
|
-
var
|
|
1924
|
-
let { obj: i2, k: a2 } =
|
|
1923
|
+
var Ra = (e6, t2, n2, r2) => {
|
|
1924
|
+
let { obj: i2, k: a2 } = Ia(e6, t2, Object);
|
|
1925
1925
|
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
1926
1926
|
};
|
|
1927
|
-
var
|
|
1928
|
-
let { obj: n2, k: r2 } =
|
|
1927
|
+
var za = (e6, t2) => {
|
|
1928
|
+
let { obj: n2, k: r2 } = Ia(e6, t2);
|
|
1929
1929
|
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
1930
1930
|
};
|
|
1931
|
-
var za = (e6, t2, n2) => {
|
|
1932
|
-
let r2 = Ra(e6, n2);
|
|
1933
|
-
return r2 === void 0 ? Ra(t2, n2) : r2;
|
|
1934
|
-
};
|
|
1935
1931
|
var Ba = (e6, t2, n2) => {
|
|
1936
|
-
|
|
1932
|
+
let r2 = za(e6, n2);
|
|
1933
|
+
return r2 === void 0 ? za(t2, n2) : r2;
|
|
1934
|
+
};
|
|
1935
|
+
var Va = (e6, t2, n2) => {
|
|
1936
|
+
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? W(e6[r2]) || e6[r2] instanceof String || W(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : Va(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
|
|
1937
1937
|
return e6;
|
|
1938
1938
|
};
|
|
1939
|
-
var
|
|
1940
|
-
var
|
|
1941
|
-
var
|
|
1942
|
-
var
|
|
1939
|
+
var G = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
1940
|
+
var Ha = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
1941
|
+
var Ua = (e6) => W(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Ha[e7]) : e6;
|
|
1942
|
+
var Wa = class {
|
|
1943
1943
|
constructor(e6) {
|
|
1944
1944
|
this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
1945
1945
|
}
|
|
@@ -1950,20 +1950,20 @@ var Ua = class {
|
|
|
1950
1950
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
|
|
1951
1951
|
}
|
|
1952
1952
|
};
|
|
1953
|
-
var
|
|
1954
|
-
var
|
|
1955
|
-
var
|
|
1953
|
+
var Ga = [` `, `,`, `?`, `!`, `;`];
|
|
1954
|
+
var Ka = new Wa(20);
|
|
1955
|
+
var qa = (e6, t2, n2) => {
|
|
1956
1956
|
t2 ||= ``, n2 ||= ``;
|
|
1957
|
-
let r2 =
|
|
1957
|
+
let r2 = Ga.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
|
|
1958
1958
|
if (r2.length === 0) return true;
|
|
1959
|
-
let i2 =
|
|
1959
|
+
let i2 = Ka.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
|
|
1960
1960
|
if (!a2) {
|
|
1961
1961
|
let t3 = e6.indexOf(n2);
|
|
1962
1962
|
t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
|
|
1963
1963
|
}
|
|
1964
1964
|
return a2;
|
|
1965
1965
|
};
|
|
1966
|
-
var
|
|
1966
|
+
var Ja = (e6, t2, n2 = `.`) => {
|
|
1967
1967
|
if (!e6) return;
|
|
1968
1968
|
if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
|
|
1969
1969
|
let r2 = t2.split(n2), i2 = e6;
|
|
@@ -1979,8 +1979,8 @@ var qa = (e6, t2, n2 = `.`) => {
|
|
|
1979
1979
|
}
|
|
1980
1980
|
return i2;
|
|
1981
1981
|
};
|
|
1982
|
-
var
|
|
1983
|
-
var
|
|
1982
|
+
var Ya = (e6) => e6?.replace(/_/g, `-`);
|
|
1983
|
+
var Xa = { type: `logger`, log(e6) {
|
|
1984
1984
|
this.output(`log`, e6);
|
|
1985
1985
|
}, warn(e6) {
|
|
1986
1986
|
this.output(`warn`, e6);
|
|
@@ -1989,12 +1989,12 @@ var Ya = { type: `logger`, log(e6) {
|
|
|
1989
1989
|
}, output(e6, t2) {
|
|
1990
1990
|
console?.[e6]?.apply?.(console, t2);
|
|
1991
1991
|
} };
|
|
1992
|
-
var
|
|
1992
|
+
var K = new class e2 {
|
|
1993
1993
|
constructor(e6, t2 = {}) {
|
|
1994
1994
|
this.init(e6, t2);
|
|
1995
1995
|
}
|
|
1996
1996
|
init(e6, t2 = {}) {
|
|
1997
|
-
this.prefix = t2.prefix || `i18next:`, this.logger = e6 ||
|
|
1997
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e6 || Xa, this.options = t2, this.debug = t2.debug;
|
|
1998
1998
|
}
|
|
1999
1999
|
log(...e6) {
|
|
2000
2000
|
return this.forward(e6, `log`, ``, true);
|
|
@@ -2009,7 +2009,7 @@ var q = new class e2 {
|
|
|
2009
2009
|
return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
|
|
2010
2010
|
}
|
|
2011
2011
|
forward(e6, t2, n2, r2) {
|
|
2012
|
-
return r2 && !this.debug ? null : (e6 = e6.map((e7) =>
|
|
2012
|
+
return r2 && !this.debug ? null : (e6 = e6.map((e7) => W(e7) ? e7.replace(/[\r\n\x00-\x1F\x7F]/g, ` `) : e7), W(e6[0]) && (e6[0] = `${n2}${this.prefix} ${e6[0]}`), this.logger[t2](e6));
|
|
2013
2013
|
}
|
|
2014
2014
|
create(t2) {
|
|
2015
2015
|
return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
|
|
@@ -2018,7 +2018,7 @@ var q = new class e2 {
|
|
|
2018
2018
|
return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
|
|
2019
2019
|
}
|
|
2020
2020
|
}();
|
|
2021
|
-
var
|
|
2021
|
+
var Za = class {
|
|
2022
2022
|
constructor() {
|
|
2023
2023
|
this.observers = {};
|
|
2024
2024
|
}
|
|
@@ -2046,8 +2046,8 @@ var Xa = class {
|
|
|
2046
2046
|
});
|
|
2047
2047
|
}
|
|
2048
2048
|
};
|
|
2049
|
-
var
|
|
2050
|
-
var
|
|
2049
|
+
var Qa = /* @__PURE__ */ new WeakSet();
|
|
2050
|
+
var $a = class extends Za {
|
|
2051
2051
|
constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
2052
2052
|
super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
2053
2053
|
}
|
|
@@ -2060,23 +2060,23 @@ var Qa = class extends Xa {
|
|
|
2060
2060
|
}
|
|
2061
2061
|
getResource(e6, t2, n2, r2 = {}) {
|
|
2062
2062
|
let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
|
|
2063
|
-
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) :
|
|
2064
|
-
let s2 =
|
|
2065
|
-
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !
|
|
2063
|
+
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : W(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
|
|
2064
|
+
let s2 = za(this.data, o2);
|
|
2065
|
+
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !W(n2) ? s2 : Ja(this.data?.[e6]?.[t2], n2, i2);
|
|
2066
2066
|
}
|
|
2067
2067
|
addResource(e6, t2, n2, r2, i2 = { silent: false }) {
|
|
2068
2068
|
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
|
|
2069
|
-
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2),
|
|
2069
|
+
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), La(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
|
|
2070
2070
|
}
|
|
2071
2071
|
addResources(e6, t2, n2, r2 = { silent: false }) {
|
|
2072
|
-
for (let r3 in n2) (
|
|
2072
|
+
for (let r3 in n2) (W(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
|
|
2073
2073
|
r2.silent || this.emit(`added`, e6, t2, n2);
|
|
2074
2074
|
}
|
|
2075
2075
|
addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
|
|
2076
2076
|
let o2 = [e6, t2];
|
|
2077
2077
|
e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
|
|
2078
|
-
let s2 =
|
|
2079
|
-
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ?
|
|
2078
|
+
let s2 = za(this.data, o2) || {};
|
|
2079
|
+
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Va(s2, n2, i2) : s2 = { ...s2, ...n2 }, La(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
|
|
2080
2080
|
}
|
|
2081
2081
|
removeResourceBundle(e6, t2) {
|
|
2082
2082
|
this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
|
|
@@ -2094,37 +2094,37 @@ var Qa = class extends Xa {
|
|
|
2094
2094
|
let t2 = this.getDataByLanguage(e6);
|
|
2095
2095
|
return !!(t2 && Object.keys(t2) || []).find((e7) => {
|
|
2096
2096
|
let n2 = t2[e7];
|
|
2097
|
-
return
|
|
2097
|
+
return Qa.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && Qa.add(n2), true);
|
|
2098
2098
|
});
|
|
2099
2099
|
}
|
|
2100
2100
|
toJSON() {
|
|
2101
2101
|
return this.data;
|
|
2102
2102
|
}
|
|
2103
2103
|
};
|
|
2104
|
-
var
|
|
2104
|
+
var eo = { processors: {}, addPostProcessor(e6) {
|
|
2105
2105
|
this.processors[e6.name] = e6;
|
|
2106
2106
|
}, handle(e6, t2, n2, r2, i2) {
|
|
2107
2107
|
return e6.forEach((e7) => {
|
|
2108
2108
|
t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
|
|
2109
2109
|
}), t2;
|
|
2110
2110
|
} };
|
|
2111
|
-
var
|
|
2112
|
-
function
|
|
2111
|
+
var to = Symbol(`i18next/PATH_KEY`);
|
|
2112
|
+
function no() {
|
|
2113
2113
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
2114
|
-
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 ===
|
|
2114
|
+
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === to ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
2115
2115
|
}
|
|
2116
|
-
function
|
|
2117
|
-
let { [
|
|
2116
|
+
function ro(e6, t2) {
|
|
2117
|
+
let { [to]: n2 } = e6(no()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
2118
2118
|
if (n2.length > 1 && i2) {
|
|
2119
2119
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
2120
2120
|
if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
2121
2121
|
}
|
|
2122
2122
|
return n2.join(r2);
|
|
2123
2123
|
}
|
|
2124
|
-
var
|
|
2125
|
-
var
|
|
2124
|
+
var io = (e6) => !W(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
2125
|
+
var ao = class e3 extends Za {
|
|
2126
2126
|
constructor(e6, t2 = {}) {
|
|
2127
|
-
super(),
|
|
2127
|
+
super(), Ma([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = K.create(`translator`), this.checkedLoadedFor = {};
|
|
2128
2128
|
}
|
|
2129
2129
|
changeLanguage(e6) {
|
|
2130
2130
|
e6 && (this.language = e6);
|
|
@@ -2134,33 +2134,33 @@ var io = class e3 extends Xa {
|
|
|
2134
2134
|
if (e6 == null) return false;
|
|
2135
2135
|
let r2 = this.resolve(e6, n2);
|
|
2136
2136
|
if (r2?.res === void 0) return false;
|
|
2137
|
-
let i2 =
|
|
2137
|
+
let i2 = io(r2.res);
|
|
2138
2138
|
return !(n2.returnObjects === false && i2);
|
|
2139
2139
|
}
|
|
2140
2140
|
extractFromKey(e6, t2) {
|
|
2141
2141
|
let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
|
|
2142
2142
|
n2 === void 0 && (n2 = `:`);
|
|
2143
|
-
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 && !
|
|
2143
|
+
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 && !qa(e6, n2, r2);
|
|
2144
2144
|
if (a2 && !o2) {
|
|
2145
2145
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
2146
|
-
if (t3 && t3.length > 0) return { key: e6, namespaces:
|
|
2146
|
+
if (t3 && t3.length > 0) return { key: e6, namespaces: W(i2) ? [i2] : i2 };
|
|
2147
2147
|
let a3 = e6.split(n2);
|
|
2148
2148
|
(n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
|
|
2149
2149
|
}
|
|
2150
|
-
return { key: e6, namespaces:
|
|
2150
|
+
return { key: e6, namespaces: W(i2) ? [i2] : i2 };
|
|
2151
2151
|
}
|
|
2152
2152
|
translate(t2, n2, r2) {
|
|
2153
2153
|
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
2154
2154
|
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
2155
|
-
typeof t2 == `function` && (t2 =
|
|
2155
|
+
typeof t2 == `function` && (t2 = ro(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? ro(e6, { ...this.options, ...i2 }) : String(e6));
|
|
2156
2156
|
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;
|
|
2157
2157
|
u2 === void 0 && (u2 = `:`);
|
|
2158
2158
|
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
2159
2159
|
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;
|
|
2160
|
-
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 && !
|
|
2160
|
+
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 && !W(i2.count), x2 = e3.hasDefaultValue(i2), S2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, C2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, w2 = b2 && !i2.ordinal && i2.count === 0, T2 = w2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${S2}`] || i2[`defaultValue${C2}`] || i2.defaultValue, E2 = m2;
|
|
2161
2161
|
y2 && !m2 && x2 && (E2 = T2);
|
|
2162
|
-
let ee2 =
|
|
2163
|
-
if (y2 && E2 && ee2 && !_2.includes(D2) && !(
|
|
2162
|
+
let ee2 = io(E2), D2 = Object.prototype.toString.apply(E2);
|
|
2163
|
+
if (y2 && E2 && ee2 && !_2.includes(D2) && !(W(v2) && Array.isArray(E2))) {
|
|
2164
2164
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
2165
2165
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
2166
2166
|
let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, E2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
|
|
@@ -2170,11 +2170,11 @@ var io = class e3 extends Xa {
|
|
|
2170
2170
|
let e6 = Array.isArray(E2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
|
|
2171
2171
|
for (let e7 in E2) if (Object.prototype.hasOwnProperty.call(E2, e7)) {
|
|
2172
2172
|
let r3 = `${n3}${o2}${e7}`;
|
|
2173
|
-
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue:
|
|
2173
|
+
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: io(T2) ? T2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = E2[e7]);
|
|
2174
2174
|
}
|
|
2175
2175
|
m2 = t3;
|
|
2176
2176
|
}
|
|
2177
|
-
} else if (y2 &&
|
|
2177
|
+
} else if (y2 && W(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
|
|
2178
2178
|
else {
|
|
2179
2179
|
let e6 = false, n3 = false;
|
|
2180
2180
|
!this.isValidLookup(m2) && x2 && (e6 = true, m2 = T2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
|
|
@@ -2206,30 +2206,30 @@ var io = class e3 extends Xa {
|
|
|
2206
2206
|
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 });
|
|
2207
2207
|
else if (!n2.skipInterpolation) {
|
|
2208
2208
|
n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
|
|
2209
|
-
let a3 =
|
|
2209
|
+
let a3 = W(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
|
|
2210
2210
|
if (a3) {
|
|
2211
2211
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
2212
2212
|
o3 = t3 && t3.length;
|
|
2213
2213
|
}
|
|
2214
|
-
let s2 = n2.replace && !
|
|
2214
|
+
let s2 = n2.replace && !W(n2.replace) ? n2.replace : n2;
|
|
2215
2215
|
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) {
|
|
2216
2216
|
let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
|
|
2217
2217
|
o3 < r3 && (n2.nest = false);
|
|
2218
2218
|
}
|
|
2219
2219
|
!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();
|
|
2220
2220
|
}
|
|
2221
|
-
let a2 = n2.postProcess || this.options.postProcess, o2 =
|
|
2222
|
-
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 =
|
|
2221
|
+
let a2 = n2.postProcess || this.options.postProcess, o2 = W(a2) ? [a2] : a2;
|
|
2222
|
+
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = eo.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
|
|
2223
2223
|
}
|
|
2224
2224
|
resolve(e6, t2 = {}) {
|
|
2225
2225
|
let n2, r2, i2, a2, o2;
|
|
2226
|
-
return
|
|
2226
|
+
return W(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? ro(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
|
|
2227
2227
|
if (this.isValidLookup(n2)) return;
|
|
2228
2228
|
let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
|
|
2229
2229
|
r2 = c2;
|
|
2230
2230
|
let l2 = s2.namespaces;
|
|
2231
2231
|
this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
|
|
2232
|
-
let u2 = t2.count !== void 0 && !
|
|
2232
|
+
let u2 = t2.count !== void 0 && !W(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (W(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
|
|
2233
2233
|
l2.forEach((e8) => {
|
|
2234
2234
|
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) => {
|
|
2235
2235
|
if (this.isValidLookup(n2)) return;
|
|
@@ -2258,7 +2258,7 @@ var io = class e3 extends Xa {
|
|
|
2258
2258
|
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
|
|
2259
2259
|
}
|
|
2260
2260
|
getUsedParamsDetails(e6 = {}) {
|
|
2261
|
-
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !
|
|
2261
|
+
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !W(e6.replace), r2 = n2 ? e6.replace : e6;
|
|
2262
2262
|
if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
|
|
2263
2263
|
r2 = { ...r2 };
|
|
2264
2264
|
for (let e7 of t2) delete r2[e7];
|
|
@@ -2270,25 +2270,25 @@ var io = class e3 extends Xa {
|
|
|
2270
2270
|
return false;
|
|
2271
2271
|
}
|
|
2272
2272
|
};
|
|
2273
|
-
var
|
|
2273
|
+
var oo = class {
|
|
2274
2274
|
constructor(e6) {
|
|
2275
|
-
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger =
|
|
2275
|
+
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = K.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
2276
2276
|
}
|
|
2277
2277
|
clearCache() {
|
|
2278
2278
|
this.resolveHierarchyCache = {};
|
|
2279
2279
|
}
|
|
2280
2280
|
getScriptPartFromCode(e6) {
|
|
2281
|
-
if (e6 =
|
|
2281
|
+
if (e6 = Ya(e6), !e6 || !e6.includes(`-`)) return null;
|
|
2282
2282
|
let t2 = e6.split(`-`);
|
|
2283
2283
|
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
2284
2284
|
}
|
|
2285
2285
|
getLanguagePartFromCode(e6) {
|
|
2286
|
-
if (e6 =
|
|
2286
|
+
if (e6 = Ya(e6), !e6 || !e6.includes(`-`)) return e6;
|
|
2287
2287
|
let t2 = e6.split(`-`);
|
|
2288
2288
|
return this.formatLanguageCode(t2[0]);
|
|
2289
2289
|
}
|
|
2290
2290
|
formatLanguageCode(e6) {
|
|
2291
|
-
if (
|
|
2291
|
+
if (W(e6) && e6.includes(`-`)) {
|
|
2292
2292
|
let t2;
|
|
2293
2293
|
try {
|
|
2294
2294
|
t2 = Intl.getCanonicalLocales(e6)[0];
|
|
@@ -2319,7 +2319,7 @@ var ao = class {
|
|
|
2319
2319
|
}
|
|
2320
2320
|
getFallbackCodes(e6, t2) {
|
|
2321
2321
|
if (!e6) return [];
|
|
2322
|
-
if (typeof e6 == `function` && (e6 = e6(t2)),
|
|
2322
|
+
if (typeof e6 == `function` && (e6 = e6(t2)), W(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
|
|
2323
2323
|
if (!t2) return e6.default || [];
|
|
2324
2324
|
let n2 = e6[t2];
|
|
2325
2325
|
return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
|
|
@@ -2327,7 +2327,7 @@ var ao = class {
|
|
|
2327
2327
|
toResolveHierarchy(e6, t2) {
|
|
2328
2328
|
let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
|
|
2329
2329
|
r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
|
|
2330
|
-
let i2 = t2 === void 0 || t2 === false ||
|
|
2330
|
+
let i2 = t2 === void 0 || t2 === false || W(t2), a2 = t2 === void 0 && typeof this.options.fallbackLng == `function`, o2 = W(e6) && i2 && !a2, s2 = null;
|
|
2331
2331
|
if (o2) {
|
|
2332
2332
|
let n3;
|
|
2333
2333
|
n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
|
|
@@ -2339,29 +2339,30 @@ var ao = class {
|
|
|
2339
2339
|
let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
|
|
2340
2340
|
e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
|
|
2341
2341
|
};
|
|
2342
|
-
return
|
|
2343
|
-
|
|
2342
|
+
return W(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))) : W(e6) && u2(this.formatLanguageCode(e6)), c2.forEach((e7) => {
|
|
2343
|
+
let t3 = this.formatLanguageCode(e7);
|
|
2344
|
+
l2.includes(t3) || u2(t3);
|
|
2344
2345
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
2345
2346
|
}
|
|
2346
2347
|
};
|
|
2347
|
-
var
|
|
2348
|
-
var
|
|
2349
|
-
var
|
|
2348
|
+
var so = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
2349
|
+
var co = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
2350
|
+
var lo = class {
|
|
2350
2351
|
constructor(e6, t2 = {}) {
|
|
2351
|
-
this.languageUtils = e6, this.options = t2, this.logger =
|
|
2352
|
+
this.languageUtils = e6, this.options = t2, this.logger = K.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
2352
2353
|
}
|
|
2353
2354
|
clearCache() {
|
|
2354
2355
|
this.pluralRulesCache = {};
|
|
2355
2356
|
}
|
|
2356
2357
|
getRule(e6, t2 = {}) {
|
|
2357
|
-
let n2 =
|
|
2358
|
+
let n2 = Ya(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
2358
2359
|
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
2359
2360
|
let a2;
|
|
2360
2361
|
try {
|
|
2361
2362
|
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
2362
2363
|
} catch {
|
|
2363
|
-
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`),
|
|
2364
|
-
if (!e6.match(/-|_/)) return
|
|
2364
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), co;
|
|
2365
|
+
if (!e6.match(/-|_/)) return co;
|
|
2365
2366
|
let n3 = this.languageUtils.getLanguagePartFromCode(e6);
|
|
2366
2367
|
a2 = this.getRule(n3, t2);
|
|
2367
2368
|
}
|
|
@@ -2376,26 +2377,26 @@ var co = class {
|
|
|
2376
2377
|
}
|
|
2377
2378
|
getSuffixes(e6, t2 = {}) {
|
|
2378
2379
|
let n2 = this.getRule(e6, t2);
|
|
2379
|
-
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) =>
|
|
2380
|
+
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => so[e7] - so[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
|
|
2380
2381
|
}
|
|
2381
2382
|
getSuffix(e6, t2, n2 = {}) {
|
|
2382
2383
|
let r2 = this.getRule(e6, n2);
|
|
2383
2384
|
return r2 ? `${this.options.prepend}${n2.ordinal ? `ordinal${this.options.prepend}` : ``}${r2.select(t2)}` : (this.logger.warn(`no plural rule found for: ${e6}`), this.getSuffix(`dev`, t2, n2));
|
|
2384
2385
|
}
|
|
2385
2386
|
};
|
|
2386
|
-
var
|
|
2387
|
-
let a2 =
|
|
2388
|
-
return !a2 && i2 &&
|
|
2387
|
+
var uo = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
2388
|
+
let a2 = Ba(e6, t2, n2);
|
|
2389
|
+
return !a2 && i2 && W(n2) && (a2 = Ja(e6, n2, r2), a2 === void 0 && (a2 = Ja(t2, n2, r2))), a2;
|
|
2389
2390
|
};
|
|
2390
|
-
var
|
|
2391
|
-
var
|
|
2391
|
+
var fo = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
2392
|
+
var po = class {
|
|
2392
2393
|
constructor(e6 = {}) {
|
|
2393
|
-
this.logger =
|
|
2394
|
+
this.logger = K.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
2394
2395
|
}
|
|
2395
2396
|
init(e6 = {}) {
|
|
2396
2397
|
e6.interpolation ||= { escapeValue: true };
|
|
2397
2398
|
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;
|
|
2398
|
-
this.escape = t2 === void 0 ?
|
|
2399
|
+
this.escape = t2 === void 0 ? Ua : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? G(i2) : a2 || `{{`, this.suffix = o2 ? G(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? G(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? G(l2) : ``, this.nestingPrefix = d2 ? G(d2) : f2 || G(`$t(`), this.nestingSuffix = p2 ? G(p2) : m2 || G(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
|
|
2399
2400
|
}
|
|
2400
2401
|
reset() {
|
|
2401
2402
|
this.options && this.init(this.options);
|
|
@@ -2407,11 +2408,11 @@ var fo = class {
|
|
|
2407
2408
|
interpolate(e6, t2, n2, r2) {
|
|
2408
2409
|
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
|
|
2409
2410
|
if (!e7.includes(this.formatSeparator)) {
|
|
2410
|
-
let i4 =
|
|
2411
|
+
let i4 = uo(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
2411
2412
|
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
|
|
2412
2413
|
}
|
|
2413
2414
|
let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
2414
|
-
return this.format(
|
|
2415
|
+
return this.format(uo(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
2415
2416
|
};
|
|
2416
2417
|
this.resetRegExp(), !this.escapeValue && typeof e6 == `string` && /\$t\([^)]*\{[^}]*\{\{/.test(e6) && this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false \u2014 if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);
|
|
2417
2418
|
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
@@ -2421,15 +2422,15 @@ var fo = class {
|
|
|
2421
2422
|
if (a2 = c2(n3), a2 === void 0) {
|
|
2422
2423
|
if (typeof l2 == `function`) {
|
|
2423
2424
|
let t4 = l2(e6, i2, r2);
|
|
2424
|
-
a2 =
|
|
2425
|
+
a2 = W(t4) ? t4 : ``;
|
|
2425
2426
|
} else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
|
|
2426
2427
|
else if (u2) {
|
|
2427
2428
|
a2 = i2[0];
|
|
2428
2429
|
continue;
|
|
2429
2430
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
2430
|
-
} else !
|
|
2431
|
+
} else !W(a2) && !this.useRawValueToEscape && (a2 = ja(a2));
|
|
2431
2432
|
let s3 = t3.safeValue(a2);
|
|
2432
|
-
if (e6 = e6.replace(i2[0],
|
|
2433
|
+
if (e6 = e6.replace(i2[0], fo(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
2433
2434
|
}
|
|
2434
2435
|
}), e6;
|
|
2435
2436
|
}
|
|
@@ -2437,7 +2438,7 @@ var fo = class {
|
|
|
2437
2438
|
let r2, i2, a2, o2 = (e7, t3) => {
|
|
2438
2439
|
let n3 = this.nestingOptionsSeparator;
|
|
2439
2440
|
if (!e7.includes(n3)) return e7;
|
|
2440
|
-
let r3 = e7.split(RegExp(`${
|
|
2441
|
+
let r3 = e7.split(RegExp(`${G(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
|
|
2441
2442
|
e7 = r3[0], i3 = this.interpolate(i3, a2);
|
|
2442
2443
|
let o3 = i3.match(/'/g), s3 = i3.match(/"/g);
|
|
2443
2444
|
((o3?.length ?? 0) % 2 == 0 && !s3 || (s3?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
|
|
@@ -2450,15 +2451,15 @@ var fo = class {
|
|
|
2450
2451
|
}, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
|
|
2451
2452
|
for (; r2 = s2.exec(e6); ) {
|
|
2452
2453
|
let u2 = [];
|
|
2453
|
-
a2 = { ...n2 }, a2 = a2.replace && !
|
|
2454
|
+
a2 = { ...n2 }, a2 = a2.replace && !W(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
2454
2455
|
let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
2455
|
-
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 && !
|
|
2456
|
-
|
|
2456
|
+
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 && !W(i2)) return i2;
|
|
2457
|
+
W(i2) || (i2 = ja(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) + ja(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
|
|
2457
2458
|
}
|
|
2458
2459
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
2459
2460
|
}
|
|
2460
2461
|
};
|
|
2461
|
-
var
|
|
2462
|
+
var mo = (e6) => {
|
|
2462
2463
|
let t2 = e6.toLowerCase().trim(), n2 = {};
|
|
2463
2464
|
if (e6.includes(`(`)) {
|
|
2464
2465
|
let r2 = e6.split(`(`);
|
|
@@ -2473,23 +2474,23 @@ var po = (e6) => {
|
|
|
2473
2474
|
}
|
|
2474
2475
|
return { formatName: t2, formatOptions: n2 };
|
|
2475
2476
|
};
|
|
2476
|
-
var
|
|
2477
|
+
var ho = (e6) => {
|
|
2477
2478
|
let t2 = {};
|
|
2478
2479
|
return (n2, r2, i2) => {
|
|
2479
2480
|
let a2 = i2;
|
|
2480
2481
|
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
2481
2482
|
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
2482
|
-
return s2 || (s2 = e6(
|
|
2483
|
+
return s2 || (s2 = e6(Ya(r2), i2), t2[o2] = s2), s2(n2);
|
|
2483
2484
|
};
|
|
2484
2485
|
};
|
|
2485
|
-
var
|
|
2486
|
-
var
|
|
2486
|
+
var go = (e6) => (t2, n2, r2) => e6(Ya(n2), r2)(t2);
|
|
2487
|
+
var _o = class {
|
|
2487
2488
|
constructor(e6 = {}) {
|
|
2488
|
-
this.logger =
|
|
2489
|
+
this.logger = K.create(`formatter`), this.options = e6, this.init(e6);
|
|
2489
2490
|
}
|
|
2490
2491
|
init(e6, t2 = { interpolation: {} }) {
|
|
2491
2492
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
2492
|
-
let n2 = t2.cacheInBuiltFormats ?
|
|
2493
|
+
let n2 = t2.cacheInBuiltFormats ? ho : go;
|
|
2493
2494
|
this.formats = { number: n2((e7, t3) => {
|
|
2494
2495
|
let n3 = new Intl.NumberFormat(e7, { ...t3 });
|
|
2495
2496
|
return (e8) => n3.format(e8);
|
|
@@ -2511,7 +2512,7 @@ var go = class {
|
|
|
2511
2512
|
this.formats[e6.toLowerCase().trim()] = t2;
|
|
2512
2513
|
}
|
|
2513
2514
|
addCached(e6, t2) {
|
|
2514
|
-
this.formats[e6.toLowerCase().trim()] =
|
|
2515
|
+
this.formats[e6.toLowerCase().trim()] = ho(t2);
|
|
2515
2516
|
}
|
|
2516
2517
|
format(e6, t2, n2, r2 = {}) {
|
|
2517
2518
|
if (!t2 || e6 == null) return e6;
|
|
@@ -2522,7 +2523,7 @@ var go = class {
|
|
|
2522
2523
|
a2.push(t3);
|
|
2523
2524
|
}
|
|
2524
2525
|
return a2.reduce((e7, t3) => {
|
|
2525
|
-
let { formatName: i3, formatOptions: a3 } =
|
|
2526
|
+
let { formatName: i3, formatOptions: a3 } = mo(t3);
|
|
2526
2527
|
if (this.formats[i3]) {
|
|
2527
2528
|
let t4 = e7;
|
|
2528
2529
|
try {
|
|
@@ -2537,12 +2538,12 @@ var go = class {
|
|
|
2537
2538
|
}, e6);
|
|
2538
2539
|
}
|
|
2539
2540
|
};
|
|
2540
|
-
var
|
|
2541
|
+
var vo = (e6, t2) => {
|
|
2541
2542
|
e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
|
|
2542
2543
|
};
|
|
2543
|
-
var
|
|
2544
|
+
var yo = class extends Za {
|
|
2544
2545
|
constructor(e6, t2, n2, r2 = {}) {
|
|
2545
|
-
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger =
|
|
2546
|
+
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = K.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
|
|
2546
2547
|
}
|
|
2547
2548
|
queueLoad(e6, t2, n2, r2) {
|
|
2548
2549
|
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
@@ -2559,7 +2560,7 @@ var vo = class extends Xa {
|
|
|
2559
2560
|
t2 && this.emit(`failedLoading`, i2, a2, t2), !t2 && n2 && this.store.addResourceBundle(i2, a2, n2, void 0, void 0, { skipCopy: true }), this.state[e6] = t2 ? -1 : 2, t2 && n2 && (this.state[e6] = 0);
|
|
2560
2561
|
let o2 = {};
|
|
2561
2562
|
this.queue.forEach((n3) => {
|
|
2562
|
-
|
|
2563
|
+
Ra(n3.loaded, [i2], a2), vo(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
|
|
2563
2564
|
o2[e7] || (o2[e7] = {});
|
|
2564
2565
|
let t3 = n3.loaded[e7];
|
|
2565
2566
|
t3.length && t3.forEach((t4) => {
|
|
@@ -2594,7 +2595,7 @@ var vo = class extends Xa {
|
|
|
2594
2595
|
}
|
|
2595
2596
|
prepareLoading(e6, t2, n2 = {}, r2) {
|
|
2596
2597
|
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
2597
|
-
|
|
2598
|
+
W(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), W(t2) && (t2 = [t2]);
|
|
2598
2599
|
let i2 = this.queueLoad(e6, t2, n2, r2);
|
|
2599
2600
|
if (!i2.toLoad.length) return i2.pending.length || r2(), null;
|
|
2600
2601
|
i2.toLoad.forEach((e7) => {
|
|
@@ -2631,9 +2632,9 @@ var vo = class extends Xa {
|
|
|
2631
2632
|
}
|
|
2632
2633
|
}
|
|
2633
2634
|
};
|
|
2634
|
-
var
|
|
2635
|
+
var bo = () => ({ 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) => {
|
|
2635
2636
|
let t2 = {};
|
|
2636
|
-
if (typeof e6[1] == `object` && (t2 = e6[1]),
|
|
2637
|
+
if (typeof e6[1] == `object` && (t2 = e6[1]), W(e6[1]) && (t2.defaultValue = e6[1]), W(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
|
|
2637
2638
|
let n2 = e6[3] || e6[2];
|
|
2638
2639
|
Object.keys(n2).forEach((e7) => {
|
|
2639
2640
|
t2[e7] = n2[e7];
|
|
@@ -2641,17 +2642,17 @@ var yo = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
2641
2642
|
}
|
|
2642
2643
|
return t2;
|
|
2643
2644
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
2644
|
-
var
|
|
2645
|
-
var
|
|
2645
|
+
var xo = (e6) => (W(e6.ns) && (e6.ns = [e6.ns]), W(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), W(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
|
|
2646
|
+
var So = () => {
|
|
2646
2647
|
};
|
|
2647
|
-
var
|
|
2648
|
+
var Co = (e6) => {
|
|
2648
2649
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
|
|
2649
2650
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
2650
2651
|
});
|
|
2651
2652
|
};
|
|
2652
|
-
var
|
|
2653
|
+
var q = class e4 extends Za {
|
|
2653
2654
|
constructor(e6 = {}, t2) {
|
|
2654
|
-
if (super(), this.options =
|
|
2655
|
+
if (super(), this.options = xo(e6), this.services = {}, this.logger = K, this.modules = { external: [] }, Co(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
2655
2656
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
2656
2657
|
setTimeout(() => {
|
|
2657
2658
|
this.init(e6, t2);
|
|
@@ -2659,26 +2660,26 @@ var J = class e4 extends Xa {
|
|
|
2659
2660
|
}
|
|
2660
2661
|
}
|
|
2661
2662
|
init(e6 = {}, t2) {
|
|
2662
|
-
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (
|
|
2663
|
-
let n2 =
|
|
2664
|
-
this.options = { ...n2, ...this.options, ...
|
|
2663
|
+
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (W(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
|
|
2664
|
+
let n2 = bo();
|
|
2665
|
+
this.options = { ...n2, ...this.options, ...xo(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);
|
|
2665
2666
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
2666
2667
|
if (!this.options.isClone) {
|
|
2667
|
-
this.modules.logger ?
|
|
2668
|
+
this.modules.logger ? K.init(r2(this.modules.logger), this.options) : K.init(null, this.options);
|
|
2668
2669
|
let e7;
|
|
2669
|
-
e7 = this.modules.formatter ? this.modules.formatter :
|
|
2670
|
-
let t3 = new
|
|
2671
|
-
this.store = new
|
|
2670
|
+
e7 = this.modules.formatter ? this.modules.formatter : _o;
|
|
2671
|
+
let t3 = new oo(this.options);
|
|
2672
|
+
this.store = new $a(this.options.resources, this.options);
|
|
2672
2673
|
let n3 = this.services;
|
|
2673
|
-
n3.logger =
|
|
2674
|
+
n3.logger = K, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new lo(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 po(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new yo(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
|
|
2674
2675
|
this.emit(e8, ...t4);
|
|
2675
|
-
}), 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
|
|
2676
|
+
}), 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 ao(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
|
|
2676
2677
|
this.emit(e8, ...t4);
|
|
2677
2678
|
}), this.modules.external.forEach((e8) => {
|
|
2678
2679
|
e8.init && e8.init(this);
|
|
2679
2680
|
});
|
|
2680
2681
|
}
|
|
2681
|
-
if (this.format = this.options.interpolation.format, t2 ||=
|
|
2682
|
+
if (this.format = this.options.interpolation.format, t2 ||= So, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
2682
2683
|
let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
2683
2684
|
e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
|
|
2684
2685
|
}
|
|
@@ -2687,7 +2688,7 @@ var J = class e4 extends Xa {
|
|
|
2687
2688
|
}), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
|
|
2688
2689
|
this[e7] = (...t3) => (this.store[e7](...t3), this);
|
|
2689
2690
|
});
|
|
2690
|
-
let i2 =
|
|
2691
|
+
let i2 = Aa(), a2 = () => {
|
|
2691
2692
|
let e7 = (e8, n3) => {
|
|
2692
2693
|
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);
|
|
2693
2694
|
};
|
|
@@ -2696,8 +2697,8 @@ var J = class e4 extends Xa {
|
|
|
2696
2697
|
};
|
|
2697
2698
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
2698
2699
|
}
|
|
2699
|
-
loadResources(e6, t2 =
|
|
2700
|
-
let n2 = t2, r2 =
|
|
2700
|
+
loadResources(e6, t2 = So) {
|
|
2701
|
+
let n2 = t2, r2 = W(e6) ? e6 : this.language;
|
|
2701
2702
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2702
2703
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
2703
2704
|
let e7 = [], t3 = (t4) => {
|
|
@@ -2711,15 +2712,15 @@ var J = class e4 extends Xa {
|
|
|
2711
2712
|
} else n2(null);
|
|
2712
2713
|
}
|
|
2713
2714
|
reloadResources(e6, t2, n2) {
|
|
2714
|
-
let r2 =
|
|
2715
|
-
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 ||=
|
|
2715
|
+
let r2 = Aa();
|
|
2716
|
+
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 ||= So, this.services.backendConnector.reload(e6, t2, (e7) => {
|
|
2716
2717
|
r2.resolve(), n2(e7);
|
|
2717
2718
|
}), r2;
|
|
2718
2719
|
}
|
|
2719
2720
|
use(e6) {
|
|
2720
2721
|
if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
2721
2722
|
if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
2722
|
-
return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` &&
|
|
2723
|
+
return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` && eo.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
|
|
2723
2724
|
}
|
|
2724
2725
|
setResolvedLanguage(e6) {
|
|
2725
2726
|
if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
|
|
@@ -2735,7 +2736,7 @@ var J = class e4 extends Xa {
|
|
|
2735
2736
|
}
|
|
2736
2737
|
changeLanguage(e6, t2) {
|
|
2737
2738
|
this.isLanguageChangingTo = e6;
|
|
2738
|
-
let n2 =
|
|
2739
|
+
let n2 = Aa();
|
|
2739
2740
|
this.emit(`languageChanging`, e6);
|
|
2740
2741
|
let r2 = (e7) => {
|
|
2741
2742
|
this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
|
|
@@ -2743,7 +2744,7 @@ var J = class e4 extends Xa {
|
|
|
2743
2744
|
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));
|
|
2744
2745
|
}, a2 = (t3) => {
|
|
2745
2746
|
!e6 && !t3 && this.services.languageDetector && (t3 = []);
|
|
2746
|
-
let n3 =
|
|
2747
|
+
let n3 = W(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(W(t3) ? [t3] : t3);
|
|
2747
2748
|
a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
|
|
2748
2749
|
i2(e7, a3);
|
|
2749
2750
|
});
|
|
@@ -2757,11 +2758,11 @@ var J = class e4 extends Xa {
|
|
|
2757
2758
|
let s2 = o2.ns !== void 0 && o2.ns !== null;
|
|
2758
2759
|
o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
|
|
2759
2760
|
let c2 = { ...this.options, ...o2 };
|
|
2760
|
-
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix =
|
|
2761
|
+
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = ro(o2.keyPrefix, c2));
|
|
2761
2762
|
let l2 = this.options.keySeparator || `.`, u2;
|
|
2762
|
-
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 =
|
|
2763
|
+
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = ro(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = ro(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
|
|
2763
2764
|
};
|
|
2764
|
-
return
|
|
2765
|
+
return W(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
|
|
2765
2766
|
}
|
|
2766
2767
|
t(...e6) {
|
|
2767
2768
|
return this.translator?.translate(...e6);
|
|
@@ -2785,19 +2786,21 @@ var J = class e4 extends Xa {
|
|
|
2785
2786
|
let e7 = t2.precheck(this, a2);
|
|
2786
2787
|
if (e7 !== void 0) return e7;
|
|
2787
2788
|
}
|
|
2788
|
-
|
|
2789
|
+
if (this.hasResourceBundle(n2, e6) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;
|
|
2790
|
+
let { languageUtils: o2 } = this.services, s2 = t2.lng ? o2.isSupportedCode(n2) && o2.toResolveHierarchy(n2, false)[0] : n2;
|
|
2791
|
+
return !(s2 && !a2(s2, e6) || r2 && !a2(i2, e6));
|
|
2789
2792
|
}
|
|
2790
2793
|
loadNamespaces(e6, t2) {
|
|
2791
|
-
let n2 =
|
|
2792
|
-
return this.options.ns ? (
|
|
2794
|
+
let n2 = Aa();
|
|
2795
|
+
return this.options.ns ? (W(e6) && (e6 = [e6]), e6.forEach((e7) => {
|
|
2793
2796
|
this.options.ns.includes(e7) || this.options.ns.push(e7);
|
|
2794
2797
|
}), this.loadResources((e7) => {
|
|
2795
2798
|
n2.resolve(), t2 && t2(e7);
|
|
2796
2799
|
}), n2) : (t2 && t2(), Promise.resolve());
|
|
2797
2800
|
}
|
|
2798
2801
|
loadLanguages(e6, t2) {
|
|
2799
|
-
let n2 =
|
|
2800
|
-
|
|
2802
|
+
let n2 = Aa();
|
|
2803
|
+
W(e6) && (e6 = [e6]);
|
|
2801
2804
|
let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
|
|
2802
2805
|
return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
|
|
2803
2806
|
n2.resolve(), t2 && t2(e7);
|
|
@@ -2813,24 +2816,24 @@ var J = class e4 extends Xa {
|
|
|
2813
2816
|
}
|
|
2814
2817
|
} catch {
|
|
2815
2818
|
}
|
|
2816
|
-
let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new
|
|
2819
|
+
let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new oo(bo());
|
|
2817
2820
|
return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
2818
2821
|
}
|
|
2819
2822
|
static createInstance(t2 = {}, n2) {
|
|
2820
2823
|
let r2 = new e4(t2, n2);
|
|
2821
2824
|
return r2.createInstance = e4.createInstance, r2;
|
|
2822
2825
|
}
|
|
2823
|
-
cloneInstance(t2 = {}, n2 =
|
|
2826
|
+
cloneInstance(t2 = {}, n2 = So) {
|
|
2824
2827
|
let r2 = t2.forkResourceStore;
|
|
2825
2828
|
r2 && delete t2.forkResourceStore;
|
|
2826
|
-
let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2829
|
+
let i2 = { ...this.options, preload: false, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2827
2830
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
|
|
2828
2831
|
a2[e6] = this[e6];
|
|
2829
|
-
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new
|
|
2830
|
-
let e6 = { ...
|
|
2831
|
-
a2.services.interpolator = new
|
|
2832
|
+
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new $a(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) {
|
|
2833
|
+
let e6 = { ...bo().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
|
|
2834
|
+
a2.services.interpolator = new po(n3);
|
|
2832
2835
|
}
|
|
2833
|
-
return a2.translator = new
|
|
2836
|
+
return a2.translator = new ao(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
|
|
2834
2837
|
a2.emit(e6, ...t3);
|
|
2835
2838
|
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
2836
2839
|
}
|
|
@@ -2838,9 +2841,9 @@ var J = class e4 extends Xa {
|
|
|
2838
2841
|
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
2839
2842
|
}
|
|
2840
2843
|
}.createInstance();
|
|
2841
|
-
|
|
2842
|
-
var
|
|
2843
|
-
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 =
|
|
2844
|
+
q.createInstance, q.dir, q.init, q.loadResources, q.reloadResources, q.use, q.changeLanguage, q.getFixedT, q.t, q.exists, q.setDefaultNamespace, q.hasLoadedNamespace, q.loadNamespaces, q.loadLanguages;
|
|
2845
|
+
var wo = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2846
|
+
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = q.createInstance(i2 ? s2 : void 0);
|
|
2844
2847
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2845
2848
|
try {
|
|
2846
2849
|
return r3(null, await t2(e7));
|
|
@@ -2849,75 +2852,38 @@ var Co = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
|
|
|
2849
2852
|
}
|
|
2850
2853
|
} }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
|
|
2851
2854
|
};
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
2856
|
-
}
|
|
2857
|
-
function i2() {
|
|
2858
|
-
return !e6 || typeof e6 == `string`;
|
|
2859
|
-
}
|
|
2860
|
-
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
2861
|
-
if (i2()) return {};
|
|
2862
|
-
var o2 = r2(a2.shift());
|
|
2863
|
-
if (wo.indexOf(o2) > -1) return {};
|
|
2864
|
-
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
2865
|
-
}
|
|
2866
|
-
if (i2()) return {};
|
|
2867
|
-
var s2 = r2(a2.shift());
|
|
2868
|
-
return wo.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
2869
|
-
}
|
|
2870
|
-
function Eo(e6, t2, n2) {
|
|
2871
|
-
var r2 = To(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
2872
|
-
i2 !== void 0 && (i2[a2] = n2);
|
|
2873
|
-
}
|
|
2874
|
-
function Do(e6, t2) {
|
|
2875
|
-
var n2 = To(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
2876
|
-
if (r2) return r2[i2];
|
|
2877
|
-
}
|
|
2878
|
-
var Oo = [];
|
|
2879
|
-
var ko = Oo.forEach;
|
|
2880
|
-
var Ao = Oo.slice;
|
|
2881
|
-
function jo(e6) {
|
|
2882
|
-
return ko.call(Ao.call(arguments, 1), function(t2) {
|
|
2883
|
-
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
2884
|
-
var i2 = r2[n2];
|
|
2885
|
-
wo.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
2886
|
-
}
|
|
2887
|
-
}), e6;
|
|
2855
|
+
function To(e6, t2) {
|
|
2856
|
+
let n2 = t2 && t2.cache ? t2.cache : Fo, r2 = t2 && t2.serializer ? t2.serializer : No;
|
|
2857
|
+
return (t2 && t2.strategy ? t2.strategy : Ao)(e6, { cache: n2, serializer: r2 });
|
|
2888
2858
|
}
|
|
2889
|
-
function
|
|
2890
|
-
let n2 = t2 && t2.cache ? t2.cache : Ho, r2 = t2 && t2.serializer ? t2.serializer : Bo;
|
|
2891
|
-
return (t2 && t2.strategy ? t2.strategy : Lo)(e6, { cache: n2, serializer: r2 });
|
|
2892
|
-
}
|
|
2893
|
-
function No(e6) {
|
|
2859
|
+
function Eo(e6) {
|
|
2894
2860
|
return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
|
|
2895
2861
|
}
|
|
2896
|
-
function
|
|
2897
|
-
let i2 =
|
|
2862
|
+
function Do(e6, t2, n2, r2) {
|
|
2863
|
+
let i2 = Eo(r2) ? r2 : n2(r2), a2 = t2.get(i2);
|
|
2898
2864
|
return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
|
|
2899
2865
|
}
|
|
2900
|
-
function
|
|
2866
|
+
function Oo(e6, t2, n2) {
|
|
2901
2867
|
let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
|
|
2902
2868
|
return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
|
|
2903
2869
|
}
|
|
2904
|
-
function
|
|
2870
|
+
function ko(e6, t2, n2, r2, i2) {
|
|
2905
2871
|
return n2.bind(t2, e6, r2, i2);
|
|
2906
2872
|
}
|
|
2907
|
-
function
|
|
2908
|
-
let n2 = e6.length === 1 ?
|
|
2909
|
-
return
|
|
2873
|
+
function Ao(e6, t2) {
|
|
2874
|
+
let n2 = e6.length === 1 ? Do : Oo;
|
|
2875
|
+
return ko(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2910
2876
|
}
|
|
2911
|
-
function
|
|
2912
|
-
return
|
|
2877
|
+
function jo(e6, t2) {
|
|
2878
|
+
return ko(e6, this, Oo, t2.cache.create(), t2.serializer);
|
|
2913
2879
|
}
|
|
2914
|
-
function
|
|
2915
|
-
return
|
|
2880
|
+
function Mo(e6, t2) {
|
|
2881
|
+
return ko(e6, this, Do, t2.cache.create(), t2.serializer);
|
|
2916
2882
|
}
|
|
2917
|
-
var
|
|
2883
|
+
var No = function() {
|
|
2918
2884
|
return JSON.stringify(arguments);
|
|
2919
2885
|
};
|
|
2920
|
-
var
|
|
2886
|
+
var Po = class {
|
|
2921
2887
|
constructor() {
|
|
2922
2888
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2923
2889
|
}
|
|
@@ -2928,14 +2894,14 @@ var Vo = class {
|
|
|
2928
2894
|
this.cache[e6] = t2;
|
|
2929
2895
|
}
|
|
2930
2896
|
};
|
|
2931
|
-
var
|
|
2932
|
-
return new
|
|
2897
|
+
var Fo = { create: function() {
|
|
2898
|
+
return new Po();
|
|
2933
2899
|
} };
|
|
2934
|
-
var
|
|
2935
|
-
var
|
|
2936
|
-
function
|
|
2900
|
+
var Io = { variadic: jo, monadic: Mo };
|
|
2901
|
+
var Lo = /(?:[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;
|
|
2902
|
+
function Ro(e6) {
|
|
2937
2903
|
let t2 = {};
|
|
2938
|
-
return e6.replace(
|
|
2904
|
+
return e6.replace(Lo, (e7) => {
|
|
2939
2905
|
let n2 = e7.length;
|
|
2940
2906
|
switch (e7[0]) {
|
|
2941
2907
|
case `G`:
|
|
@@ -3022,10 +2988,10 @@ function Go(e6) {
|
|
|
3022
2988
|
return ``;
|
|
3023
2989
|
}), t2;
|
|
3024
2990
|
}
|
|
3025
|
-
var
|
|
3026
|
-
function
|
|
2991
|
+
var zo = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
2992
|
+
function Bo(e6) {
|
|
3027
2993
|
if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
3028
|
-
let t2 = e6.split(
|
|
2994
|
+
let t2 = e6.split(zo).filter((e7) => e7.length > 0), n2 = [];
|
|
3029
2995
|
for (let e7 of t2) {
|
|
3030
2996
|
let t3 = e7.split(`/`);
|
|
3031
2997
|
if (t3.length === 0) throw Error(`Invalid number skeleton`);
|
|
@@ -3035,20 +3001,20 @@ function qo(e6) {
|
|
|
3035
3001
|
}
|
|
3036
3002
|
return n2;
|
|
3037
3003
|
}
|
|
3038
|
-
function
|
|
3004
|
+
function Vo(e6) {
|
|
3039
3005
|
return e6.replace(/^(.*?)-/, ``);
|
|
3040
3006
|
}
|
|
3041
|
-
var
|
|
3042
|
-
var
|
|
3043
|
-
var
|
|
3044
|
-
var
|
|
3045
|
-
function
|
|
3007
|
+
var Ho = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
3008
|
+
var Uo = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
3009
|
+
var Wo = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
3010
|
+
var Go = /^(0+)$/;
|
|
3011
|
+
function Ko(e6) {
|
|
3046
3012
|
let t2 = {};
|
|
3047
|
-
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(
|
|
3013
|
+
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Uo, function(e7, n2, r2) {
|
|
3048
3014
|
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), ``;
|
|
3049
3015
|
}), t2;
|
|
3050
3016
|
}
|
|
3051
|
-
function
|
|
3017
|
+
function qo(e6) {
|
|
3052
3018
|
switch (e6) {
|
|
3053
3019
|
case `sign-auto`:
|
|
3054
3020
|
return { signDisplay: `auto` };
|
|
@@ -3072,19 +3038,19 @@ function es(e6) {
|
|
|
3072
3038
|
return { signDisplay: `never` };
|
|
3073
3039
|
}
|
|
3074
3040
|
}
|
|
3075
|
-
function
|
|
3041
|
+
function Jo(e6) {
|
|
3076
3042
|
let t2;
|
|
3077
3043
|
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) {
|
|
3078
3044
|
let n2 = e6.slice(0, 2);
|
|
3079
|
-
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !
|
|
3045
|
+
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !Go.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
|
|
3080
3046
|
t2.minimumIntegerDigits = e6.length;
|
|
3081
3047
|
}
|
|
3082
3048
|
return t2;
|
|
3083
3049
|
}
|
|
3084
|
-
function
|
|
3085
|
-
return
|
|
3050
|
+
function Yo(e6) {
|
|
3051
|
+
return qo(e6) || {};
|
|
3086
3052
|
}
|
|
3087
|
-
function
|
|
3053
|
+
function Xo(e6) {
|
|
3088
3054
|
let t2 = {};
|
|
3089
3055
|
for (let n2 of e6) {
|
|
3090
3056
|
switch (n2.stem) {
|
|
@@ -3108,7 +3074,7 @@ function rs(e6) {
|
|
|
3108
3074
|
continue;
|
|
3109
3075
|
case `measure-unit`:
|
|
3110
3076
|
case `unit`:
|
|
3111
|
-
t2.style = `unit`, t2.unit =
|
|
3077
|
+
t2.style = `unit`, t2.unit = Vo(n2.options[0]);
|
|
3112
3078
|
continue;
|
|
3113
3079
|
case `compact-short`:
|
|
3114
3080
|
case `K`:
|
|
@@ -3119,10 +3085,10 @@ function rs(e6) {
|
|
|
3119
3085
|
t2.notation = `compact`, t2.compactDisplay = `long`;
|
|
3120
3086
|
continue;
|
|
3121
3087
|
case `scientific`:
|
|
3122
|
-
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
3088
|
+
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Yo(t3) }), {}) };
|
|
3123
3089
|
continue;
|
|
3124
3090
|
case `engineering`:
|
|
3125
|
-
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
3091
|
+
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Yo(t3) }), {}) };
|
|
3126
3092
|
continue;
|
|
3127
3093
|
case `notation-simple`:
|
|
3128
3094
|
t2.notation = `standard`;
|
|
@@ -3165,7 +3131,7 @@ function rs(e6) {
|
|
|
3165
3131
|
continue;
|
|
3166
3132
|
case `integer-width`:
|
|
3167
3133
|
if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
|
|
3168
|
-
n2.options[0].replace(
|
|
3134
|
+
n2.options[0].replace(Wo, function(e8, n3, r3, i2, a2, o2) {
|
|
3169
3135
|
if (n3) t2.minimumIntegerDigits = r3.length;
|
|
3170
3136
|
else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
|
|
3171
3137
|
else if (o2) throw Error(`We currently do not support exact integer digits`);
|
|
@@ -3173,83 +3139,83 @@ function rs(e6) {
|
|
|
3173
3139
|
});
|
|
3174
3140
|
continue;
|
|
3175
3141
|
}
|
|
3176
|
-
if (
|
|
3142
|
+
if (Go.test(n2.stem)) {
|
|
3177
3143
|
t2.minimumIntegerDigits = n2.stem.length;
|
|
3178
3144
|
continue;
|
|
3179
3145
|
}
|
|
3180
|
-
if (
|
|
3146
|
+
if (Ho.test(n2.stem)) {
|
|
3181
3147
|
if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
|
|
3182
|
-
n2.stem.replace(
|
|
3148
|
+
n2.stem.replace(Ho, function(e9, n3, r3, i2, a2, o2) {
|
|
3183
3149
|
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), ``;
|
|
3184
3150
|
});
|
|
3185
3151
|
let e8 = n2.options[0];
|
|
3186
|
-
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2,
|
|
3152
|
+
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...Ko(e8) });
|
|
3187
3153
|
continue;
|
|
3188
3154
|
}
|
|
3189
|
-
if (
|
|
3190
|
-
t2 = { ...t2,
|
|
3155
|
+
if (Uo.test(n2.stem)) {
|
|
3156
|
+
t2 = { ...t2, ...Ko(n2.stem) };
|
|
3191
3157
|
continue;
|
|
3192
3158
|
}
|
|
3193
|
-
let e7 =
|
|
3159
|
+
let e7 = qo(n2.stem);
|
|
3194
3160
|
e7 && (t2 = { ...t2, ...e7 });
|
|
3195
|
-
let r2 =
|
|
3161
|
+
let r2 = Jo(n2.stem);
|
|
3196
3162
|
r2 && (t2 = { ...t2, ...r2 });
|
|
3197
3163
|
}
|
|
3198
3164
|
return t2;
|
|
3199
3165
|
}
|
|
3200
|
-
var
|
|
3166
|
+
var Zo = function(e6) {
|
|
3201
3167
|
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;
|
|
3202
3168
|
}({});
|
|
3203
|
-
function
|
|
3169
|
+
function Qo(e6) {
|
|
3204
3170
|
return e6.type === 0;
|
|
3205
3171
|
}
|
|
3206
|
-
function
|
|
3172
|
+
function $o(e6) {
|
|
3207
3173
|
return e6.type === 1;
|
|
3208
3174
|
}
|
|
3209
|
-
function
|
|
3175
|
+
function es(e6) {
|
|
3210
3176
|
return e6.type === 2;
|
|
3211
3177
|
}
|
|
3212
|
-
function
|
|
3178
|
+
function ts(e6) {
|
|
3213
3179
|
return e6.type === 3;
|
|
3214
3180
|
}
|
|
3215
|
-
function
|
|
3181
|
+
function ns(e6) {
|
|
3216
3182
|
return e6.type === 4;
|
|
3217
3183
|
}
|
|
3218
|
-
function
|
|
3184
|
+
function rs(e6) {
|
|
3219
3185
|
return e6.type === 5;
|
|
3220
3186
|
}
|
|
3221
|
-
function
|
|
3187
|
+
function is(e6) {
|
|
3222
3188
|
return e6.type === 6;
|
|
3223
3189
|
}
|
|
3224
|
-
function
|
|
3190
|
+
function as(e6) {
|
|
3225
3191
|
return e6.type === 7;
|
|
3226
3192
|
}
|
|
3227
|
-
function
|
|
3193
|
+
function os(e6) {
|
|
3228
3194
|
return e6.type === 8;
|
|
3229
3195
|
}
|
|
3230
|
-
function
|
|
3196
|
+
function ss(e6) {
|
|
3231
3197
|
return !!(e6 && typeof e6 == `object` && e6.type === 0);
|
|
3232
3198
|
}
|
|
3233
|
-
function
|
|
3199
|
+
function cs(e6) {
|
|
3234
3200
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
3235
3201
|
}
|
|
3236
|
-
var
|
|
3237
|
-
var
|
|
3238
|
-
function
|
|
3202
|
+
var ls = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
3203
|
+
var us = { "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`] };
|
|
3204
|
+
function ds(e6, t2) {
|
|
3239
3205
|
let n2 = ``;
|
|
3240
3206
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
3241
3207
|
let i2 = e6.charAt(r2);
|
|
3242
3208
|
if (i2 === `j`) {
|
|
3243
3209
|
let a2 = 0;
|
|
3244
3210
|
for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
|
|
3245
|
-
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 =
|
|
3211
|
+
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = fs(t2);
|
|
3246
3212
|
for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
|
|
3247
3213
|
for (; o2-- > 0; ) n2 = c2 + n2;
|
|
3248
3214
|
} else n2 += i2 === `J` ? `H` : i2;
|
|
3249
3215
|
}
|
|
3250
3216
|
return n2;
|
|
3251
3217
|
}
|
|
3252
|
-
function
|
|
3218
|
+
function fs(e6) {
|
|
3253
3219
|
let t2 = e6.hourCycle;
|
|
3254
3220
|
if (t2 === void 0) {
|
|
3255
3221
|
let n3 = e6;
|
|
@@ -3268,36 +3234,36 @@ function ys(e6) {
|
|
|
3268
3234
|
throw Error(`Invalid hourCycle`);
|
|
3269
3235
|
}
|
|
3270
3236
|
let n2 = e6.language, r2;
|
|
3271
|
-
return n2 !== `root` && (r2 = e6.maximize().region), (
|
|
3237
|
+
return n2 !== `root` && (r2 = e6.maximize().region), (us[`${n2}-${r2}`] || us[r2 || ``] || us[n2 || ``] || us[`${n2}-001`] || us[`001`])[0].charAt(0);
|
|
3272
3238
|
}
|
|
3273
|
-
var
|
|
3274
|
-
var
|
|
3275
|
-
function
|
|
3239
|
+
var ps = RegExp(`^${ls.source}*`);
|
|
3240
|
+
var ms = RegExp(`${ls.source}*$`);
|
|
3241
|
+
function J(e6, t2) {
|
|
3276
3242
|
return { start: e6, end: t2 };
|
|
3277
3243
|
}
|
|
3278
|
-
var
|
|
3279
|
-
var
|
|
3280
|
-
var
|
|
3281
|
-
var
|
|
3244
|
+
var hs = !!Object.fromEntries;
|
|
3245
|
+
var gs = !!String.prototype.trimStart;
|
|
3246
|
+
var _s = !!String.prototype.trimEnd;
|
|
3247
|
+
var vs = hs ? Object.fromEntries : function(e6) {
|
|
3282
3248
|
let t2 = {};
|
|
3283
3249
|
for (let [n2, r2] of e6) t2[n2] = r2;
|
|
3284
3250
|
return t2;
|
|
3285
3251
|
};
|
|
3286
|
-
var
|
|
3252
|
+
var ys = gs ? function(e6) {
|
|
3287
3253
|
return e6.trimStart();
|
|
3288
3254
|
} : function(e6) {
|
|
3289
|
-
return e6.replace(
|
|
3255
|
+
return e6.replace(ps, ``);
|
|
3290
3256
|
};
|
|
3291
|
-
var
|
|
3257
|
+
var bs = _s ? function(e6) {
|
|
3292
3258
|
return e6.trimEnd();
|
|
3293
3259
|
} : function(e6) {
|
|
3294
|
-
return e6.replace(
|
|
3260
|
+
return e6.replace(ms, ``);
|
|
3295
3261
|
};
|
|
3296
|
-
var
|
|
3297
|
-
function
|
|
3298
|
-
return
|
|
3262
|
+
var xs = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
|
|
3263
|
+
function Ss(e6, t2) {
|
|
3264
|
+
return xs.lastIndex = t2, xs.exec(e6)[1] ?? ``;
|
|
3299
3265
|
}
|
|
3300
|
-
function
|
|
3266
|
+
function Cs(e6) {
|
|
3301
3267
|
if (e6.length === 0) return null;
|
|
3302
3268
|
let t2 = 1, n2 = 1;
|
|
3303
3269
|
for (let r2 = 0; r2 < e6.length; ) {
|
|
@@ -3318,7 +3284,7 @@ function As(e6) {
|
|
|
3318
3284
|
}
|
|
3319
3285
|
return { offset: e6.length, line: t2, column: n2 };
|
|
3320
3286
|
}
|
|
3321
|
-
var
|
|
3287
|
+
var ws = class {
|
|
3322
3288
|
constructor(e6, t2 = {}) {
|
|
3323
3289
|
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;
|
|
3324
3290
|
}
|
|
@@ -3327,10 +3293,10 @@ var js = class {
|
|
|
3327
3293
|
if (this.message.length > 0) {
|
|
3328
3294
|
let e6 = this.message.charCodeAt(0);
|
|
3329
3295
|
if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
|
|
3330
|
-
let e7 =
|
|
3296
|
+
let e7 = Cs(this.message);
|
|
3331
3297
|
if (e7) {
|
|
3332
3298
|
let t2 = this.clonePosition();
|
|
3333
|
-
return this.position = e7, { val: [{ type: 0, value: this.message, location:
|
|
3299
|
+
return this.position = e7, { val: [{ type: 0, value: this.message, location: J(t2, this.clonePosition()) }], err: null };
|
|
3334
3300
|
}
|
|
3335
3301
|
}
|
|
3336
3302
|
}
|
|
@@ -3347,11 +3313,11 @@ var js = class {
|
|
|
3347
3313
|
} else if (i2 === 125 && e6 > 0) break;
|
|
3348
3314
|
else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
|
|
3349
3315
|
let e7 = this.clonePosition();
|
|
3350
|
-
this.bump(), r2.push({ type: 7, location:
|
|
3316
|
+
this.bump(), r2.push({ type: 7, location: J(e7, this.clonePosition()) });
|
|
3351
3317
|
} else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
3352
3318
|
if (n2) break;
|
|
3353
|
-
return this.error(26,
|
|
3354
|
-
} else if (i2 === 60 && !this.ignoreTag &&
|
|
3319
|
+
return this.error(26, J(this.clonePosition(), this.clonePosition()));
|
|
3320
|
+
} else if (i2 === 60 && !this.ignoreTag && Ts(this.peek() || 0)) {
|
|
3355
3321
|
let n3 = this.parseTag(e6, t2);
|
|
3356
3322
|
if (n3.err) return n3;
|
|
3357
3323
|
r2.push(n3.val);
|
|
@@ -3367,23 +3333,23 @@ var js = class {
|
|
|
3367
3333
|
let n2 = this.clonePosition();
|
|
3368
3334
|
this.bump();
|
|
3369
3335
|
let r2 = this.parseTagName();
|
|
3370
|
-
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location:
|
|
3336
|
+
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: J(n2, this.clonePosition()) }, err: null };
|
|
3371
3337
|
if (this.bumpIf(`>`)) {
|
|
3372
3338
|
let i2 = this.parseMessage(e6 + 1, t2, true);
|
|
3373
3339
|
if (i2.err) return i2;
|
|
3374
3340
|
let a2 = i2.val, o2 = this.clonePosition();
|
|
3375
3341
|
if (this.bumpIf(`</`)) {
|
|
3376
|
-
if (this.isEOF() || !
|
|
3342
|
+
if (this.isEOF() || !Ts(this.char())) return this.error(23, J(o2, this.clonePosition()));
|
|
3377
3343
|
let e7 = this.clonePosition();
|
|
3378
|
-
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location:
|
|
3344
|
+
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: J(n2, this.clonePosition()) }, err: null } : this.error(23, J(o2, this.clonePosition()))) : this.error(26, J(e7, this.clonePosition()));
|
|
3379
3345
|
}
|
|
3380
|
-
return this.error(27,
|
|
3346
|
+
return this.error(27, J(n2, this.clonePosition()));
|
|
3381
3347
|
}
|
|
3382
|
-
return this.error(23,
|
|
3348
|
+
return this.error(23, J(n2, this.clonePosition()));
|
|
3383
3349
|
}
|
|
3384
3350
|
parseTagName() {
|
|
3385
3351
|
let e6 = this.offset();
|
|
3386
|
-
for (this.bump(); !this.isEOF() &&
|
|
3352
|
+
for (this.bump(); !this.isEOF() && Ds(this.char()); ) this.bump();
|
|
3387
3353
|
return this.message.slice(e6, this.offset());
|
|
3388
3354
|
}
|
|
3389
3355
|
parseLiteral(e6, t2) {
|
|
@@ -3403,11 +3369,11 @@ var js = class {
|
|
|
3403
3369
|
if (a2) r2 += a2;
|
|
3404
3370
|
else break;
|
|
3405
3371
|
}
|
|
3406
|
-
let i2 =
|
|
3372
|
+
let i2 = J(n2, this.clonePosition());
|
|
3407
3373
|
return { val: { type: 0, value: r2, location: i2 }, err: null };
|
|
3408
3374
|
}
|
|
3409
3375
|
tryParseLeftAngleBracket() {
|
|
3410
|
-
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !
|
|
3376
|
+
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !Es(this.peek() || 0)) ? (this.bump(), `<`) : null;
|
|
3411
3377
|
}
|
|
3412
3378
|
tryParseQuote(e6) {
|
|
3413
3379
|
if (this.isEOF() || this.char() !== 39) return null;
|
|
@@ -3447,29 +3413,29 @@ var js = class {
|
|
|
3447
3413
|
}
|
|
3448
3414
|
parseArgument(e6, t2) {
|
|
3449
3415
|
let n2 = this.clonePosition();
|
|
3450
|
-
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
3451
|
-
if (this.char() === 125) return this.bump(), this.error(2,
|
|
3416
|
+
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, J(n2, this.clonePosition()));
|
|
3417
|
+
if (this.char() === 125) return this.bump(), this.error(2, J(n2, this.clonePosition()));
|
|
3452
3418
|
let r2 = this.parseIdentifierIfPossible().value;
|
|
3453
|
-
if (!r2) return this.error(3,
|
|
3454
|
-
if (this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
3419
|
+
if (!r2) return this.error(3, J(n2, this.clonePosition()));
|
|
3420
|
+
if (this.bumpSpace(), this.isEOF()) return this.error(1, J(n2, this.clonePosition()));
|
|
3455
3421
|
switch (this.char()) {
|
|
3456
3422
|
case 125:
|
|
3457
|
-
return this.bump(), { val: { type: 1, value: r2, location:
|
|
3423
|
+
return this.bump(), { val: { type: 1, value: r2, location: J(n2, this.clonePosition()) }, err: null };
|
|
3458
3424
|
case 44:
|
|
3459
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1,
|
|
3425
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, J(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
|
|
3460
3426
|
default:
|
|
3461
|
-
return this.error(3,
|
|
3427
|
+
return this.error(3, J(n2, this.clonePosition()));
|
|
3462
3428
|
}
|
|
3463
3429
|
}
|
|
3464
3430
|
parseIdentifierIfPossible() {
|
|
3465
|
-
let e6 = this.clonePosition(), t2 = this.offset(), n2 =
|
|
3466
|
-
return this.bumpTo(r2), { value: n2, location:
|
|
3431
|
+
let e6 = this.clonePosition(), t2 = this.offset(), n2 = Ss(this.message, t2), r2 = t2 + n2.length;
|
|
3432
|
+
return this.bumpTo(r2), { value: n2, location: J(e6, this.clonePosition()) };
|
|
3467
3433
|
}
|
|
3468
3434
|
parseArgumentOptions(e6, t2, n2, r2) {
|
|
3469
3435
|
let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
|
|
3470
3436
|
switch (a2) {
|
|
3471
3437
|
case ``:
|
|
3472
|
-
return this.error(4,
|
|
3438
|
+
return this.error(4, J(i2, o2));
|
|
3473
3439
|
case `number`:
|
|
3474
3440
|
case `date`:
|
|
3475
3441
|
case `time`: {
|
|
@@ -3479,15 +3445,15 @@ var js = class {
|
|
|
3479
3445
|
this.bumpSpace();
|
|
3480
3446
|
let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
|
|
3481
3447
|
if (n3.err) return n3;
|
|
3482
|
-
let r3 =
|
|
3483
|
-
if (r3.length === 0) return this.error(6,
|
|
3484
|
-
e7 = { style: r3, styleLocation:
|
|
3448
|
+
let r3 = bs(n3.val);
|
|
3449
|
+
if (r3.length === 0) return this.error(6, J(this.clonePosition(), this.clonePosition()));
|
|
3450
|
+
e7 = { style: r3, styleLocation: J(t4, this.clonePosition()) };
|
|
3485
3451
|
}
|
|
3486
3452
|
let t3 = this.tryParseArgumentClose(r2);
|
|
3487
3453
|
if (t3.err) return t3;
|
|
3488
|
-
let i3 =
|
|
3454
|
+
let i3 = J(r2, this.clonePosition());
|
|
3489
3455
|
if (e7 && e7.style.startsWith(`::`)) {
|
|
3490
|
-
let t4 =
|
|
3456
|
+
let t4 = ys(e7.style.slice(2));
|
|
3491
3457
|
if (a2 === `number`) {
|
|
3492
3458
|
let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
|
|
3493
3459
|
return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
|
|
@@ -3495,8 +3461,8 @@ var js = class {
|
|
|
3495
3461
|
{
|
|
3496
3462
|
if (t4.length === 0) return this.error(10, i3);
|
|
3497
3463
|
let r3 = t4;
|
|
3498
|
-
this.locale && (r3 =
|
|
3499
|
-
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ?
|
|
3464
|
+
this.locale && (r3 = ds(t4, this.locale));
|
|
3465
|
+
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Ro(r3) : {} };
|
|
3500
3466
|
return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
|
|
3501
3467
|
}
|
|
3502
3468
|
}
|
|
@@ -3506,11 +3472,11 @@ var js = class {
|
|
|
3506
3472
|
case `selectordinal`:
|
|
3507
3473
|
case `select`: {
|
|
3508
3474
|
let i3 = this.clonePosition();
|
|
3509
|
-
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12,
|
|
3475
|
+
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, J(i3, { ...i3 }));
|
|
3510
3476
|
this.bumpSpace();
|
|
3511
3477
|
let o3 = this.parseIdentifierIfPossible(), s2 = 0;
|
|
3512
3478
|
if (a2 !== `select` && o3.value === `offset`) {
|
|
3513
|
-
if (!this.bumpIf(`:`)) return this.error(13,
|
|
3479
|
+
if (!this.bumpIf(`:`)) return this.error(13, J(this.clonePosition(), this.clonePosition()));
|
|
3514
3480
|
this.bumpSpace();
|
|
3515
3481
|
let e7 = this.tryParseDecimalInteger(13, 14);
|
|
3516
3482
|
if (e7.err) return e7;
|
|
@@ -3520,15 +3486,15 @@ var js = class {
|
|
|
3520
3486
|
if (c2.err) return c2;
|
|
3521
3487
|
let l2 = this.tryParseArgumentClose(r2);
|
|
3522
3488
|
if (l2.err) return l2;
|
|
3523
|
-
let u2 =
|
|
3524
|
-
return a2 === `select` ? { val: { type: 5, value: n2, options:
|
|
3489
|
+
let u2 = J(r2, this.clonePosition());
|
|
3490
|
+
return a2 === `select` ? { val: { type: 5, value: n2, options: vs(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: vs(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
|
|
3525
3491
|
}
|
|
3526
3492
|
default:
|
|
3527
|
-
return this.error(5,
|
|
3493
|
+
return this.error(5, J(i2, o2));
|
|
3528
3494
|
}
|
|
3529
3495
|
}
|
|
3530
3496
|
tryParseArgumentClose(e6) {
|
|
3531
|
-
return this.isEOF() || this.char() !== 125 ? this.error(1,
|
|
3497
|
+
return this.isEOF() || this.char() !== 125 ? this.error(1, J(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
|
|
3532
3498
|
}
|
|
3533
3499
|
parseSimpleArgStyleIfPossible() {
|
|
3534
3500
|
let e6 = 0, t2 = this.clonePosition();
|
|
@@ -3536,7 +3502,7 @@ var js = class {
|
|
|
3536
3502
|
case 39: {
|
|
3537
3503
|
this.bump();
|
|
3538
3504
|
let e7 = this.clonePosition();
|
|
3539
|
-
if (!this.bumpUntil(`'`)) return this.error(11,
|
|
3505
|
+
if (!this.bumpUntil(`'`)) return this.error(11, J(e7, this.clonePosition()));
|
|
3540
3506
|
this.bump();
|
|
3541
3507
|
break;
|
|
3542
3508
|
}
|
|
@@ -3555,11 +3521,11 @@ var js = class {
|
|
|
3555
3521
|
parseNumberSkeletonFromString(e6, t2) {
|
|
3556
3522
|
let n2 = [];
|
|
3557
3523
|
try {
|
|
3558
|
-
n2 =
|
|
3524
|
+
n2 = Bo(e6);
|
|
3559
3525
|
} catch {
|
|
3560
3526
|
return this.error(7, t2);
|
|
3561
3527
|
}
|
|
3562
|
-
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ?
|
|
3528
|
+
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Xo(n2) : {} }, err: null };
|
|
3563
3529
|
}
|
|
3564
3530
|
tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
|
|
3565
3531
|
let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
|
|
@@ -3569,20 +3535,20 @@ var js = class {
|
|
|
3569
3535
|
if (t2 !== `select` && this.bumpIf(`=`)) {
|
|
3570
3536
|
let t3 = this.tryParseDecimalInteger(16, 19);
|
|
3571
3537
|
if (t3.err) return t3;
|
|
3572
|
-
c2 =
|
|
3538
|
+
c2 = J(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
|
|
3573
3539
|
} else break;
|
|
3574
3540
|
}
|
|
3575
3541
|
if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
|
|
3576
3542
|
s2 === `other` && (i2 = true), this.bumpSpace();
|
|
3577
3543
|
let r3 = this.clonePosition();
|
|
3578
|
-
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18,
|
|
3544
|
+
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, J(this.clonePosition(), this.clonePosition()));
|
|
3579
3545
|
let l2 = this.parseMessage(e6 + 1, t2, n2);
|
|
3580
3546
|
if (l2.err) return l2;
|
|
3581
3547
|
let u2 = this.tryParseArgumentClose(r3);
|
|
3582
3548
|
if (u2.err) return u2;
|
|
3583
|
-
a2.push([s2, { value: l2.val, location:
|
|
3549
|
+
a2.push([s2, { value: l2.val, location: J(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
|
|
3584
3550
|
}
|
|
3585
|
-
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16,
|
|
3551
|
+
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16, J(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i2 ? this.error(22, J(this.clonePosition(), this.clonePosition())) : { val: a2, err: null };
|
|
3586
3552
|
}
|
|
3587
3553
|
tryParseDecimalInteger(e6, t2) {
|
|
3588
3554
|
let n2 = 1, r2 = this.clonePosition();
|
|
@@ -3593,7 +3559,7 @@ var js = class {
|
|
|
3593
3559
|
if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
|
|
3594
3560
|
else break;
|
|
3595
3561
|
}
|
|
3596
|
-
let o2 =
|
|
3562
|
+
let o2 = J(r2, this.clonePosition());
|
|
3597
3563
|
return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
|
|
3598
3564
|
}
|
|
3599
3565
|
offset() {
|
|
@@ -3641,7 +3607,7 @@ var js = class {
|
|
|
3641
3607
|
}
|
|
3642
3608
|
}
|
|
3643
3609
|
bumpSpace() {
|
|
3644
|
-
for (; !this.isEOF() &&
|
|
3610
|
+
for (; !this.isEOF() && Os(this.char()); ) this.bump();
|
|
3645
3611
|
}
|
|
3646
3612
|
peek() {
|
|
3647
3613
|
if (this.isEOF()) return null;
|
|
@@ -3649,34 +3615,34 @@ var js = class {
|
|
|
3649
3615
|
return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
|
|
3650
3616
|
}
|
|
3651
3617
|
};
|
|
3652
|
-
function
|
|
3618
|
+
function Ts(e6) {
|
|
3653
3619
|
return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
|
|
3654
3620
|
}
|
|
3655
|
-
function
|
|
3656
|
-
return
|
|
3621
|
+
function Es(e6) {
|
|
3622
|
+
return Ts(e6) || e6 === 47;
|
|
3657
3623
|
}
|
|
3658
|
-
function
|
|
3624
|
+
function Ds(e6) {
|
|
3659
3625
|
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;
|
|
3660
3626
|
}
|
|
3661
|
-
function
|
|
3627
|
+
function Os(e6) {
|
|
3662
3628
|
return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
|
|
3663
3629
|
}
|
|
3664
|
-
function
|
|
3630
|
+
function ks(e6) {
|
|
3665
3631
|
e6.forEach((e7) => {
|
|
3666
|
-
if (delete e7.location,
|
|
3667
|
-
else
|
|
3632
|
+
if (delete e7.location, rs(e7) || is(e7)) for (let t2 in e7.options) delete e7.options[t2].location, ks(e7.options[t2].value);
|
|
3633
|
+
else es(e7) && ss(e7.style) || (ts(e7) || ns(e7)) && cs(e7.style) ? delete e7.style.location : os(e7) && ks(e7.children);
|
|
3668
3634
|
});
|
|
3669
3635
|
}
|
|
3670
|
-
function
|
|
3636
|
+
function As(e6, t2 = {}) {
|
|
3671
3637
|
t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
|
|
3672
|
-
let n2 = new
|
|
3638
|
+
let n2 = new ws(e6, t2).parse();
|
|
3673
3639
|
if (n2.err) {
|
|
3674
|
-
let e7 = SyntaxError(
|
|
3640
|
+
let e7 = SyntaxError(Zo[n2.err.kind]);
|
|
3675
3641
|
throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
|
|
3676
3642
|
}
|
|
3677
|
-
return t2?.captureLocation ||
|
|
3643
|
+
return t2?.captureLocation || ks(n2.val), n2.val;
|
|
3678
3644
|
}
|
|
3679
|
-
var
|
|
3645
|
+
var js = class extends Error {
|
|
3680
3646
|
constructor(e6, t2, n2) {
|
|
3681
3647
|
super(e6), this.code = t2, this.originalMessage = n2;
|
|
3682
3648
|
}
|
|
@@ -3684,54 +3650,54 @@ var Rs = class extends Error {
|
|
|
3684
3650
|
return `[formatjs Error: ${this.code}] ${this.message}`;
|
|
3685
3651
|
}
|
|
3686
3652
|
};
|
|
3687
|
-
var
|
|
3653
|
+
var Ms = class extends js {
|
|
3688
3654
|
constructor(e6, t2, n2, r2) {
|
|
3689
3655
|
super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
|
|
3690
3656
|
}
|
|
3691
3657
|
};
|
|
3692
|
-
var
|
|
3658
|
+
var Ns = class extends js {
|
|
3693
3659
|
constructor(e6, t2, n2) {
|
|
3694
3660
|
super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
|
|
3695
3661
|
}
|
|
3696
3662
|
};
|
|
3697
|
-
var
|
|
3663
|
+
var Ps = class extends js {
|
|
3698
3664
|
constructor(e6, t2) {
|
|
3699
3665
|
super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
|
|
3700
3666
|
}
|
|
3701
3667
|
};
|
|
3702
|
-
function
|
|
3668
|
+
function Fs(e6) {
|
|
3703
3669
|
return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
|
|
3704
3670
|
let n2 = e7[e7.length - 1];
|
|
3705
3671
|
return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
|
|
3706
3672
|
}, []);
|
|
3707
3673
|
}
|
|
3708
|
-
function
|
|
3674
|
+
function Is(e6) {
|
|
3709
3675
|
return typeof e6 == `function`;
|
|
3710
3676
|
}
|
|
3711
|
-
function
|
|
3712
|
-
if (e6.length === 1 &&
|
|
3677
|
+
function Ls(e6, t2, n2, r2, i2, a2, o2) {
|
|
3678
|
+
if (e6.length === 1 && Qo(e6[0])) return [{ type: 0, value: e6[0].value }];
|
|
3713
3679
|
let s2 = [];
|
|
3714
3680
|
for (let c2 of e6) {
|
|
3715
|
-
if (
|
|
3681
|
+
if (Qo(c2)) {
|
|
3716
3682
|
s2.push({ type: 0, value: c2.value });
|
|
3717
3683
|
continue;
|
|
3718
3684
|
}
|
|
3719
|
-
if (
|
|
3685
|
+
if (as(c2)) {
|
|
3720
3686
|
typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
|
|
3721
3687
|
continue;
|
|
3722
3688
|
}
|
|
3723
3689
|
let { value: e7 } = c2;
|
|
3724
|
-
if (!(i2 && e7 in i2)) throw new
|
|
3690
|
+
if (!(i2 && e7 in i2)) throw new Ps(e7, o2);
|
|
3725
3691
|
let l2 = i2[e7];
|
|
3726
|
-
if (
|
|
3727
|
-
else if (
|
|
3728
|
-
let e8 = typeof c2.style == `string` ? r2.date[c2.style] :
|
|
3692
|
+
if ($o(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 });
|
|
3693
|
+
else if (ts(c2)) {
|
|
3694
|
+
let e8 = typeof c2.style == `string` ? r2.date[c2.style] : cs(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3729
3695
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3730
|
-
} else if (
|
|
3731
|
-
let e8 = typeof c2.style == `string` ? r2.time[c2.style] :
|
|
3696
|
+
} else if (ns(c2)) {
|
|
3697
|
+
let e8 = typeof c2.style == `string` ? r2.time[c2.style] : cs(c2.style) ? c2.style.parsedOptions : r2.time.medium;
|
|
3732
3698
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3733
|
-
} else if (
|
|
3734
|
-
let e8 = typeof c2.style == `string` ? r2.number[c2.style] :
|
|
3699
|
+
} else if (es(c2)) {
|
|
3700
|
+
let e8 = typeof c2.style == `string` ? r2.number[c2.style] : ss(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3735
3701
|
if (e8 && e8.scale) {
|
|
3736
3702
|
let t3 = e8.scale || 1;
|
|
3737
3703
|
if (typeof l2 == `bigint`) {
|
|
@@ -3741,40 +3707,40 @@ function Ws(e6, t2, n2, r2, i2, a2, o2) {
|
|
|
3741
3707
|
}
|
|
3742
3708
|
s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
|
|
3743
3709
|
} else {
|
|
3744
|
-
if (
|
|
3710
|
+
if (os(c2)) {
|
|
3745
3711
|
let { children: e8, value: l3 } = c2, u2 = i2[l3];
|
|
3746
|
-
if (!
|
|
3747
|
-
let d2 = u2(
|
|
3712
|
+
if (!Is(u2)) throw new Ns(l3, `function`, o2);
|
|
3713
|
+
let d2 = u2(Ls(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
|
|
3748
3714
|
Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
|
|
3749
3715
|
}
|
|
3750
|
-
if (
|
|
3716
|
+
if (rs(c2)) {
|
|
3751
3717
|
let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
|
|
3752
|
-
if (!a3) throw new
|
|
3753
|
-
s2.push(...
|
|
3754
|
-
} else if (
|
|
3718
|
+
if (!a3) throw new Ms(c2.value, l2, Object.keys(c2.options), o2);
|
|
3719
|
+
s2.push(...Ls(a3.value, t2, n2, r2, i2));
|
|
3720
|
+
} else if (is(c2)) {
|
|
3755
3721
|
let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
|
|
3756
3722
|
if (!a3) {
|
|
3757
|
-
if (!Intl.PluralRules) throw new
|
|
3723
|
+
if (!Intl.PluralRules) throw new js(`Intl.PluralRules is not available in this environment.
|
|
3758
3724
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3759
3725
|
`, `MISSING_INTL_API`, o2);
|
|
3760
3726
|
let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
|
|
3761
3727
|
a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
|
|
3762
3728
|
}
|
|
3763
|
-
if (!a3) throw new
|
|
3729
|
+
if (!a3) throw new Ms(c2.value, l2, Object.keys(c2.options), o2);
|
|
3764
3730
|
let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
|
|
3765
|
-
s2.push(...
|
|
3731
|
+
s2.push(...Ls(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
|
|
3766
3732
|
}
|
|
3767
3733
|
}
|
|
3768
3734
|
}
|
|
3769
|
-
return
|
|
3735
|
+
return Fs(s2);
|
|
3770
3736
|
}
|
|
3771
|
-
function
|
|
3737
|
+
function Rs(e6, t2) {
|
|
3772
3738
|
return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
|
|
3773
3739
|
}
|
|
3774
|
-
function
|
|
3775
|
-
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] =
|
|
3740
|
+
function zs(e6, t2) {
|
|
3741
|
+
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Rs(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
|
|
3776
3742
|
}
|
|
3777
|
-
function
|
|
3743
|
+
function Bs(e6) {
|
|
3778
3744
|
return { create() {
|
|
3779
3745
|
return { get(t2) {
|
|
3780
3746
|
return e6[t2];
|
|
@@ -3783,23 +3749,23 @@ function qs(e6) {
|
|
|
3783
3749
|
} };
|
|
3784
3750
|
} };
|
|
3785
3751
|
}
|
|
3786
|
-
function
|
|
3787
|
-
return { getNumberFormat:
|
|
3752
|
+
function Vs(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
|
|
3753
|
+
return { getNumberFormat: To((...e7) => new Intl.NumberFormat(...e7), { cache: Bs(e6.number), strategy: Io.variadic }), getDateTimeFormat: To((...e7) => new Intl.DateTimeFormat(...e7), { cache: Bs(e6.dateTime), strategy: Io.variadic }), getPluralRules: To((...e7) => new Intl.PluralRules(...e7), { cache: Bs(e6.pluralRules), strategy: Io.variadic }) };
|
|
3788
3754
|
}
|
|
3789
|
-
var
|
|
3755
|
+
var Hs = class e5 {
|
|
3790
3756
|
constructor(t2, n2 = e5.defaultLocale, r2, i2) {
|
|
3791
3757
|
if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
|
|
3792
3758
|
let t3 = this.formatToParts(e6);
|
|
3793
3759
|
if (t3.length === 1) return t3[0].value;
|
|
3794
3760
|
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), []);
|
|
3795
3761
|
return n3.length <= 1 ? n3[0] || `` : n3;
|
|
3796
|
-
}, this.formatToParts = (e6) =>
|
|
3762
|
+
}, this.formatToParts = (e6) => Ls(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`) {
|
|
3797
3763
|
if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
3798
3764
|
let { ...n3 } = i2 || {};
|
|
3799
3765
|
this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
|
|
3800
3766
|
} else this.ast = t2;
|
|
3801
3767
|
if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
|
|
3802
|
-
this.formats =
|
|
3768
|
+
this.formats = zs(e5.formats, r2), this.formatters = i2 && i2.formatters || Vs(this.formatterCache);
|
|
3803
3769
|
}
|
|
3804
3770
|
static {
|
|
3805
3771
|
this.memoizedDefaultLocale = null;
|
|
@@ -3815,32 +3781,66 @@ var Ys = class e5 {
|
|
|
3815
3781
|
};
|
|
3816
3782
|
}
|
|
3817
3783
|
static {
|
|
3818
|
-
this.__parse =
|
|
3784
|
+
this.__parse = As;
|
|
3819
3785
|
}
|
|
3820
3786
|
static {
|
|
3821
3787
|
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` } } };
|
|
3822
3788
|
}
|
|
3823
3789
|
};
|
|
3824
|
-
|
|
3825
|
-
|
|
3790
|
+
var Us = [`__proto__`, `constructor`, `prototype`];
|
|
3791
|
+
function Ws(e6, t2, n2) {
|
|
3792
|
+
function r2(e7) {
|
|
3793
|
+
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
3794
|
+
}
|
|
3795
|
+
function i2() {
|
|
3796
|
+
return !e6 || typeof e6 == `string`;
|
|
3797
|
+
}
|
|
3798
|
+
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
3799
|
+
if (i2()) return {};
|
|
3800
|
+
var o2 = r2(a2.shift());
|
|
3801
|
+
if (Us.indexOf(o2) > -1) return {};
|
|
3802
|
+
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
3803
|
+
}
|
|
3804
|
+
if (i2()) return {};
|
|
3805
|
+
var s2 = r2(a2.shift());
|
|
3806
|
+
return Us.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
3807
|
+
}
|
|
3808
|
+
function Gs(e6, t2, n2) {
|
|
3809
|
+
var r2 = Ws(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
3810
|
+
i2 !== void 0 && (i2[a2] = n2);
|
|
3811
|
+
}
|
|
3812
|
+
function Ks(e6, t2) {
|
|
3813
|
+
var n2 = Ws(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
3814
|
+
if (r2) return r2[i2];
|
|
3815
|
+
}
|
|
3816
|
+
function qs(e6) {
|
|
3817
|
+
return [...arguments].slice(1).forEach(function(t2) {
|
|
3818
|
+
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
3819
|
+
var i2 = r2[n2];
|
|
3820
|
+
Us.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
3821
|
+
}
|
|
3822
|
+
}), e6;
|
|
3823
|
+
}
|
|
3824
|
+
function Js(e6, t2) {
|
|
3825
|
+
return $s(e6) || Qs(e6, t2) || Xs(e6, t2) || Ys();
|
|
3826
3826
|
}
|
|
3827
|
-
function
|
|
3827
|
+
function Ys() {
|
|
3828
3828
|
throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3829
3829
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3830
3830
|
}
|
|
3831
|
-
function
|
|
3831
|
+
function Xs(e6, t2) {
|
|
3832
3832
|
if (e6) {
|
|
3833
|
-
if (typeof e6 == `string`) return
|
|
3833
|
+
if (typeof e6 == `string`) return Zs(e6, t2);
|
|
3834
3834
|
var n2 = {}.toString.call(e6).slice(8, -1);
|
|
3835
|
-
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) ?
|
|
3835
|
+
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) ? Zs(e6, t2) : void 0;
|
|
3836
3836
|
}
|
|
3837
3837
|
}
|
|
3838
|
-
function
|
|
3838
|
+
function Zs(e6, t2) {
|
|
3839
3839
|
(t2 == null || t2 > e6.length) && (t2 = e6.length);
|
|
3840
3840
|
for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
|
|
3841
3841
|
return r2;
|
|
3842
3842
|
}
|
|
3843
|
-
function
|
|
3843
|
+
function Qs(e6, t2) {
|
|
3844
3844
|
var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
|
|
3845
3845
|
if (n2 != null) {
|
|
3846
3846
|
var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
|
|
@@ -3861,18 +3861,10 @@ function ec(e6, t2) {
|
|
|
3861
3861
|
return s2;
|
|
3862
3862
|
}
|
|
3863
3863
|
}
|
|
3864
|
-
function
|
|
3864
|
+
function $s(e6) {
|
|
3865
3865
|
if (Array.isArray(e6)) return e6;
|
|
3866
3866
|
}
|
|
3867
|
-
function
|
|
3868
|
-
"@babel/helpers - typeof";
|
|
3869
|
-
return nc = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3870
|
-
return typeof e7;
|
|
3871
|
-
} : function(e7) {
|
|
3872
|
-
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3873
|
-
}, nc(e6);
|
|
3874
|
-
}
|
|
3875
|
-
function rc(e6, t2) {
|
|
3867
|
+
function ec(e6, t2) {
|
|
3876
3868
|
var n2 = Object.keys(e6);
|
|
3877
3869
|
if (Object.getOwnPropertySymbols) {
|
|
3878
3870
|
var r2 = Object.getOwnPropertySymbols(e6);
|
|
@@ -3882,85 +3874,121 @@ function rc(e6, t2) {
|
|
|
3882
3874
|
}
|
|
3883
3875
|
return n2;
|
|
3884
3876
|
}
|
|
3885
|
-
function
|
|
3877
|
+
function tc(e6) {
|
|
3886
3878
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
3887
3879
|
var n2 = arguments[t2] == null ? {} : arguments[t2];
|
|
3888
|
-
t2 % 2 ?
|
|
3889
|
-
|
|
3890
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) :
|
|
3880
|
+
t2 % 2 ? ec(Object(n2), true).forEach(function(t3) {
|
|
3881
|
+
nc(e6, t3, n2[t3]);
|
|
3882
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : ec(Object(n2)).forEach(function(t3) {
|
|
3891
3883
|
Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
|
|
3892
3884
|
});
|
|
3893
3885
|
}
|
|
3894
3886
|
return e6;
|
|
3895
3887
|
}
|
|
3896
|
-
function
|
|
3897
|
-
return (t2 =
|
|
3888
|
+
function nc(e6, t2, n2) {
|
|
3889
|
+
return (t2 = oc(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
|
|
3898
3890
|
}
|
|
3899
|
-
function
|
|
3891
|
+
function rc(e6, t2) {
|
|
3900
3892
|
if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
|
|
3901
3893
|
}
|
|
3902
|
-
function
|
|
3894
|
+
function ic(e6, t2) {
|
|
3903
3895
|
for (var n2 = 0; n2 < t2.length; n2++) {
|
|
3904
3896
|
var r2 = t2[n2];
|
|
3905
|
-
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6,
|
|
3897
|
+
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, oc(r2.key), r2);
|
|
3906
3898
|
}
|
|
3907
3899
|
}
|
|
3908
|
-
function
|
|
3909
|
-
return t2 &&
|
|
3900
|
+
function ac(e6, t2, n2) {
|
|
3901
|
+
return t2 && ic(e6.prototype, t2), n2 && ic(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
|
|
3910
3902
|
}
|
|
3911
|
-
function
|
|
3912
|
-
var t2 =
|
|
3913
|
-
return
|
|
3903
|
+
function oc(e6) {
|
|
3904
|
+
var t2 = sc(e6, `string`);
|
|
3905
|
+
return Y(t2) == `symbol` ? t2 : t2 + ``;
|
|
3914
3906
|
}
|
|
3915
|
-
function
|
|
3916
|
-
if (
|
|
3907
|
+
function sc(e6, t2) {
|
|
3908
|
+
if (Y(e6) != `object` || !e6) return e6;
|
|
3917
3909
|
var n2 = e6[Symbol.toPrimitive];
|
|
3918
3910
|
if (n2 !== void 0) {
|
|
3919
3911
|
var r2 = n2.call(e6, t2 || `default`);
|
|
3920
|
-
if (
|
|
3912
|
+
if (Y(r2) != `object`) return r2;
|
|
3921
3913
|
throw TypeError(`@@toPrimitive must return a primitive value.`);
|
|
3922
3914
|
}
|
|
3923
3915
|
return (t2 === `string` ? String : Number)(e6);
|
|
3924
3916
|
}
|
|
3925
|
-
function
|
|
3917
|
+
function Y(e6) {
|
|
3918
|
+
"@babel/helpers - typeof";
|
|
3919
|
+
return Y = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3920
|
+
return typeof e7;
|
|
3921
|
+
} : function(e7) {
|
|
3922
|
+
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3923
|
+
}, Y(e6);
|
|
3924
|
+
}
|
|
3925
|
+
var cc = `https://www.i18next.com/how-to/using-icu-or-mf2`;
|
|
3926
|
+
var lc = [`zero`, `one`, `two`, `few`, `many`, `other`];
|
|
3927
|
+
function uc() {
|
|
3926
3928
|
return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
|
|
3927
3929
|
return n2;
|
|
3928
3930
|
}, parseLngForICU: function(e6) {
|
|
3929
3931
|
return e6;
|
|
3930
3932
|
}, escapeVariables: false };
|
|
3931
3933
|
}
|
|
3934
|
+
function dc(e6, t2, n2, r2) {
|
|
3935
|
+
return n2 && t2 && Y(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}`;
|
|
3936
|
+
}
|
|
3932
3937
|
var fc = function() {
|
|
3933
3938
|
function e6(t2) {
|
|
3934
|
-
|
|
3939
|
+
rc(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
|
|
3935
3940
|
}
|
|
3936
|
-
return
|
|
3941
|
+
return ac(e6, [{ key: `init`, value: function(e7, t2) {
|
|
3937
3942
|
var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
|
|
3938
|
-
if (this.options =
|
|
3943
|
+
if (this.options = qs(r2, t2, this.options || {}, uc()), this.formats = this.options.formats, e7) {
|
|
3939
3944
|
var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
|
|
3940
|
-
e7.IntlMessageFormat =
|
|
3945
|
+
e7.IntlMessageFormat = Hs, 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() {
|
|
3941
3946
|
return n2.clearCache();
|
|
3942
3947
|
}), o2 && e7.store.on(o2, function() {
|
|
3943
3948
|
return n2.clearCache();
|
|
3944
3949
|
}));
|
|
3945
3950
|
}
|
|
3946
3951
|
} }, { key: `addUserDefinedFormats`, value: function(e7) {
|
|
3947
|
-
this.formats = this.formats ?
|
|
3952
|
+
this.formats = this.formats ? tc(tc({}, this.formats), e7) : e7, this.clearCache();
|
|
3948
3953
|
} }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
|
|
3949
|
-
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize &&
|
|
3950
|
-
this.options.memoize
|
|
3954
|
+
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && [n2, r2, i2], c2;
|
|
3955
|
+
if (this.options.memoize) {
|
|
3956
|
+
var l2 = Ks(this.mem, s2);
|
|
3957
|
+
l2 && l2.res === e7 && (c2 = l2.fc);
|
|
3958
|
+
}
|
|
3951
3959
|
try {
|
|
3952
|
-
|
|
3953
|
-
|
|
3954
|
-
return this.
|
|
3960
|
+
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 Hs(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && Gs(this.mem, s2, { res: e7, fc: c2 }));
|
|
3961
|
+
var u2 = t2 && t2.replace && Y(t2.replace) === `object` ? tc(tc({}, t2), t2.replace) : t2;
|
|
3962
|
+
return c2.format(this.escapeVariableValues(u2));
|
|
3963
|
+
} catch (a3) {
|
|
3964
|
+
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(dc(a3, e7, !c2, `key "${i2}" (${n2}/${r2})`)), this.options.parseErrorHandler(a3, i2, e7, t2);
|
|
3955
3965
|
}
|
|
3956
3966
|
} }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
|
|
3957
|
-
return e7;
|
|
3967
|
+
return this.debug && i2 && this.checkSuffixKeys(t2, n2, r2, i2), e7;
|
|
3968
|
+
} }, { key: `checkSuffixKeys`, value: function(e7, t2, n2, r2) {
|
|
3969
|
+
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})`;
|
|
3970
|
+
if (i2 !== void 0 && this.firstTime(`plural ${t2} ${n2} ${e7}`)) {
|
|
3971
|
+
var p2 = lc.concat(lc.map(function(e8) {
|
|
3972
|
+
return `ordinal${c2}${e8}`;
|
|
3973
|
+
})).map(function(t3) {
|
|
3974
|
+
return `${e7}${c2}${t3}`;
|
|
3975
|
+
}).filter(function(e8) {
|
|
3976
|
+
return d2.getResource(t2, n2, e8) !== void 0;
|
|
3977
|
+
});
|
|
3978
|
+
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}}.`);
|
|
3979
|
+
}
|
|
3980
|
+
var m2 = `${e7}${u2}${a2}`;
|
|
3981
|
+
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 {...}}.`);
|
|
3982
|
+
} }, { key: `firstTime`, value: function(e7) {
|
|
3983
|
+
return !this.warned.has(e7) && (this.warned.add(e7), true);
|
|
3984
|
+
} }, { key: `warn`, value: function(e7) {
|
|
3985
|
+
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${cc}`);
|
|
3958
3986
|
} }, { key: `clearCache`, value: function() {
|
|
3959
3987
|
this.mem = {};
|
|
3960
3988
|
} }, { key: `escapeVariableValues`, value: function(e7) {
|
|
3961
|
-
if (!this.options.escapeVariables || !e7 ||
|
|
3989
|
+
if (!this.options.escapeVariables || !e7 || Y(e7) !== `object`) return e7;
|
|
3962
3990
|
for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
|
|
3963
|
-
var i2 =
|
|
3991
|
+
var i2 = Js(r2[n2], 2), a2 = i2[0], o2 = i2[1];
|
|
3964
3992
|
t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`) : o2;
|
|
3965
3993
|
}
|
|
3966
3994
|
return t2;
|
|
@@ -3969,7 +3997,7 @@ var fc = function() {
|
|
|
3969
3997
|
fc.type = `i18nFormat`;
|
|
3970
3998
|
function pc({ icuOptions: e6 = {}, ...t2 }) {
|
|
3971
3999
|
let { parseErrorHandler: n2 = void 0 } = t2;
|
|
3972
|
-
return
|
|
4000
|
+
return wo(t2, { icu: new fc({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
|
|
3973
4001
|
}
|
|
3974
4002
|
var mc = (e6, t2, n2, r2) => {
|
|
3975
4003
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
@@ -4138,21 +4166,21 @@ var Qc = (e6, t2, n2) => {
|
|
|
4138
4166
|
});
|
|
4139
4167
|
};
|
|
4140
4168
|
var $c = (e6) => e6.split(`-`)[0] ?? e6;
|
|
4141
|
-
|
|
4169
|
+
ka({ isDev: false, loadMessages: (e6) => Qc(Object.assign({ "../assets/locale/messages_en.dev.json": () => fn(() => Promise.resolve().then(() => il), void 0, import_meta.url), "../assets/locale/messages_en.json": () => fn(() => Promise.resolve().then(() => ol), void 0, import_meta.url) }), `../assets/locale/messages_${$c(e6)}.json`, 4), loadDevMessages: (e6) => Qc(Object.assign({ "../assets/locale/messages_en.dev.json": () => fn(() => Promise.resolve().then(() => il), void 0, import_meta.url) }), `../assets/locale/messages_${$c(e6)}.dev.json`, 4) });
|
|
4142
4170
|
var el = /* @__PURE__ */ new WeakMap();
|
|
4143
4171
|
function tl(e6) {
|
|
4144
4172
|
let t2 = el.get(e6);
|
|
4145
4173
|
return t2 || (t2 = Xc(e6).finally(() => el.delete(e6)), el.set(e6, t2)), t2;
|
|
4146
4174
|
}
|
|
4147
4175
|
function nl({ i18n: e6, locale: t2 }) {
|
|
4148
|
-
let n2 =
|
|
4176
|
+
let n2 = Mr(), r2 = Ea();
|
|
4149
4177
|
if (!n2) return null;
|
|
4150
4178
|
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw tl(e6);
|
|
4151
4179
|
let i2 = Zc(e6, t2);
|
|
4152
4180
|
return i2 && r2.set(Gc, { locale: t2, messages: i2 }), null;
|
|
4153
4181
|
}
|
|
4154
4182
|
function rl(e6) {
|
|
4155
|
-
let t2 =
|
|
4183
|
+
let t2 = Vr(), n2 = qc()?.locale ?? t2 ?? `en`;
|
|
4156
4184
|
return { i18n: Yc(n2, e6), locale: n2 };
|
|
4157
4185
|
}
|
|
4158
4186
|
var il = g({ default: () => al });
|
|
@@ -4165,17 +4193,17 @@ var ul = (e6, t2) => {
|
|
|
4165
4193
|
let n2 = ll[`../assets/locale/messages_${$c(e6)}${t2}.json`];
|
|
4166
4194
|
return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
|
|
4167
4195
|
};
|
|
4168
|
-
var dl =
|
|
4196
|
+
var dl = ka({ isDev: false, loadMessages: (e6) => ul(e6, ``), loadDevMessages: (e6) => ul(e6, `.dev`) });
|
|
4169
4197
|
var fl = (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);
|
|
4170
4198
|
var Z = { 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` };
|
|
4171
4199
|
var pl = (e6, t2) => {
|
|
4172
4200
|
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: fl(r2, `full`, t2) });
|
|
4173
4201
|
return { timeToRead: (t3) => e6(Z.timeToRead, { count: t3 }), viewCount: n2(Z.viewCount), commentCount: n2(Z.commentCount), likeCount: n2(Z.likeCount), noPostsEmptyState: () => ({ title: e6(Z.noPostsTitle), description: e6(Z.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(Z.noRelatedPostsTitle), description: e6(Z.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(Z.canvasPostTitle), authorName: () => e6(Z.canvasAuthorName), excerpt: () => e6(Z.canvasExcerpt), content: () => e6(Z.canvasContent), category: () => e6(Z.canvasCategory), categoryNumbered: (t3) => e6(Z.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(Z.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(Z.canvasCoverAlt), authorPhotoAlt: () => e6(Z.canvasAuthorPhotoAlt) } };
|
|
4174
4202
|
};
|
|
4175
|
-
var ml = (e6) =>
|
|
4203
|
+
var ml = (e6) => j(N(e6, [{ transformFn: H, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: V, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: qi, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
|
|
4176
4204
|
var hl = `https://blog.wixsite.com/blog-demo-posts`;
|
|
4177
|
-
var gl =
|
|
4178
|
-
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${
|
|
4205
|
+
var gl = F((e6) => async (t2) => {
|
|
4206
|
+
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${I(t2)}`);
|
|
4179
4207
|
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
4180
4208
|
return ml(await n2.json()).filter((e7) => !e7.url?.startsWith(hl));
|
|
4181
4209
|
});
|
|
@@ -4194,14 +4222,14 @@ function bl(e6) {
|
|
|
4194
4222
|
var xl = `@wix/auto_sdk_members_members`;
|
|
4195
4223
|
function Sl(e6) {
|
|
4196
4224
|
function t2({ host: t3 }) {
|
|
4197
|
-
let n2 =
|
|
4198
|
-
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName: xl, migrationOptions: { optInTransformResponse: true }, url: bl({ protoPath: `/v1/members/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) =>
|
|
4225
|
+
let n2 = N(e6, [{ transformFn: an, paths: yl }]);
|
|
4226
|
+
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName: xl, migrationOptions: { optInTransformResponse: true }, url: bl({ protoPath: `/v1/members/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => N(e7, [{ transformFn: M, paths: vl }]) };
|
|
4199
4227
|
}
|
|
4200
4228
|
return t2;
|
|
4201
4229
|
}
|
|
4202
4230
|
function Cl(e6) {
|
|
4203
4231
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
4204
|
-
return
|
|
4232
|
+
return ii({ func: async (r2) => {
|
|
4205
4233
|
let i2 = Sl({ ...r2, ...e6 ?? {} });
|
|
4206
4234
|
n2?.onSiteCall?.();
|
|
4207
4235
|
try {
|
|
@@ -4212,22 +4240,22 @@ function Cl(e6) {
|
|
|
4212
4240
|
}
|
|
4213
4241
|
}, requestTransformer: (t3) => {
|
|
4214
4242
|
let n3 = [t3, e6];
|
|
4215
|
-
return
|
|
4243
|
+
return A({ ...n3?.[1], query: n3?.[0] });
|
|
4216
4244
|
}, responseTransformer: ({ data: e7 }) => {
|
|
4217
|
-
let t3 =
|
|
4245
|
+
let t3 = j(N(e7, []));
|
|
4218
4246
|
return { items: t3?.members, pagingMetadata: t3?.metadata };
|
|
4219
4247
|
}, errorTransformer: (e7) => {
|
|
4220
|
-
throw
|
|
4248
|
+
throw P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
4221
4249
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
4222
4250
|
}
|
|
4223
4251
|
async function wl(e6, t2) {
|
|
4224
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Sl(
|
|
4252
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Sl(A({ query: e6, ...t2 }));
|
|
4225
4253
|
r2?.onSiteCall?.();
|
|
4226
4254
|
try {
|
|
4227
4255
|
let e7 = await n2.request(i2);
|
|
4228
|
-
return r2?.onSuccess?.(e7),
|
|
4256
|
+
return r2?.onSuccess?.(e7), j(e7.data);
|
|
4229
4257
|
} catch (e7) {
|
|
4230
|
-
let t3 =
|
|
4258
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
4231
4259
|
throw r2?.onError?.(e7), t3;
|
|
4232
4260
|
}
|
|
4233
4261
|
}
|
|
@@ -4238,13 +4266,13 @@ function El(e6) {
|
|
|
4238
4266
|
return (t2, n2) => wl(t2, n2, { httpClient: e6 });
|
|
4239
4267
|
}
|
|
4240
4268
|
function Dl(e6) {
|
|
4241
|
-
let t2 =
|
|
4269
|
+
let t2 = mi({ builderQueryFunction: (t3) => Tl(e6)(t3), typedQueryFunction: (t3, n3) => El(e6)(t3, n3), hasOptionsParameter: true });
|
|
4242
4270
|
function n2(e7, n3) {
|
|
4243
4271
|
return t2(...arguments);
|
|
4244
4272
|
}
|
|
4245
4273
|
return n2;
|
|
4246
4274
|
}
|
|
4247
|
-
var Ol =
|
|
4275
|
+
var Ol = F(Dl);
|
|
4248
4276
|
var kl = async (e6) => {
|
|
4249
4277
|
let t2 = [...new Set(e6.filter((e7) => !!e7))];
|
|
4250
4278
|
if (t2.length === 0) return {};
|
|
@@ -4258,7 +4286,7 @@ var kl = async (e6) => {
|
|
|
4258
4286
|
return {};
|
|
4259
4287
|
}
|
|
4260
4288
|
};
|
|
4261
|
-
var Al = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { 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` }];
|
|
4289
|
+
var Al = [{ 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` }];
|
|
4262
4290
|
var jl = [{ path: `posts.richContentCompressed` }];
|
|
4263
4291
|
var Ml = [{ 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` }];
|
|
4264
4292
|
var Nl = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
@@ -4268,8 +4296,8 @@ function Pl(e6) {
|
|
|
4268
4296
|
var Fl = `@wix/auto_sdk_blog_posts`;
|
|
4269
4297
|
function Il(e6) {
|
|
4270
4298
|
function t2({ host: t3 }) {
|
|
4271
|
-
let n2 =
|
|
4272
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Fl, migrationOptions: { optInTransformResponse: true }, url: Pl({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) =>
|
|
4299
|
+
let n2 = N(e6, [{ transformFn: an, paths: Nl }]);
|
|
4300
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Fl, migrationOptions: { optInTransformResponse: true }, url: Pl({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => N(e7, [{ transformFn: M, paths: Al }, { transformFn: on, paths: jl }, { transformFn: L, paths: Ml }]) };
|
|
4273
4301
|
}
|
|
4274
4302
|
return t2;
|
|
4275
4303
|
}
|
|
@@ -4282,7 +4310,7 @@ function Ll() {
|
|
|
4282
4310
|
}
|
|
4283
4311
|
var Rl = Ll();
|
|
4284
4312
|
var zl = (e6) => (t2) => ({ method: `POST`, url: Rl.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4285
|
-
var Bl =
|
|
4313
|
+
var Bl = F((e6) => async (t2) => {
|
|
4286
4314
|
let { data: n2 } = await e6.request(zl(t2)), r2 = {};
|
|
4287
4315
|
for (let e7 of n2.posts ?? []) {
|
|
4288
4316
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
@@ -4301,8 +4329,8 @@ var Vl = async (e6) => {
|
|
|
4301
4329
|
}
|
|
4302
4330
|
};
|
|
4303
4331
|
var Hl = `TRANSLATIONS`;
|
|
4304
|
-
|
|
4305
|
-
var Ul = [
|
|
4332
|
+
U.RICH_CONTENT, U.SEO, U.URL, U.CONTENT_TEXT, U.RICH_CONTENT, U.URL;
|
|
4333
|
+
var Ul = [U.URL, U.METRICS];
|
|
4306
4334
|
var Wl = (e6) => {
|
|
4307
4335
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4308
4336
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
@@ -4312,7 +4340,7 @@ var Kl = (e6) => Vl(e6.filter((e7) => e7.media?.wixMedia?.videoV2).map(({ _id: e
|
|
|
4312
4340
|
var ql = 100;
|
|
4313
4341
|
var Jl = async () => {
|
|
4314
4342
|
try {
|
|
4315
|
-
let { categories: e6 } = await
|
|
4343
|
+
let { categories: e6 } = await Gi({ paging: { limit: ql } });
|
|
4316
4344
|
return e6 ?? [];
|
|
4317
4345
|
} catch {
|
|
4318
4346
|
return [];
|
|
@@ -4330,7 +4358,7 @@ var Xl = (e6, t2) => {
|
|
|
4330
4358
|
return n2;
|
|
4331
4359
|
};
|
|
4332
4360
|
var Zl = async ({ ids: e6, currentPostId: t2, limit: n2 }) => {
|
|
4333
|
-
let { items: r2 } = await
|
|
4361
|
+
let { items: r2 } = await pa({ fieldsets: Ul }).in(`_id`, e6).limit(n2).find(), i2 = new Map(r2.map((e7) => {
|
|
4334
4362
|
let { _id: t3 } = e7;
|
|
4335
4363
|
return [t3, e7];
|
|
4336
4364
|
}));
|
|
@@ -4349,26 +4377,26 @@ var tu = (e6, t2, n2) => {
|
|
|
4349
4377
|
return e6.set(t2, i2), i2;
|
|
4350
4378
|
};
|
|
4351
4379
|
var nu = (e6, t2) => tu($l, `${e6}|${t2 ?? ``}`, async () => {
|
|
4352
|
-
let { category: n2 } = await
|
|
4380
|
+
let { category: n2 } = await Wi(e6, { fieldsets: [Hl], ...t2 && { language: t2 } });
|
|
4353
4381
|
return n2;
|
|
4354
4382
|
});
|
|
4355
4383
|
var ru = (e6) => tu($l, `${e6}|*`, async () => {
|
|
4356
|
-
let { items: t2 } = await
|
|
4384
|
+
let { items: t2 } = await Ki().eq(`slug`, e6).limit(1).find();
|
|
4357
4385
|
return t2[0];
|
|
4358
4386
|
});
|
|
4359
4387
|
var iu = (e6, t2) => tu(eu, `${e6}|${t2 ?? ``}`, async () => {
|
|
4360
|
-
let { tag: n2 } = await
|
|
4388
|
+
let { tag: n2 } = await xa(e6, { ...t2 && { language: t2 } });
|
|
4361
4389
|
return n2;
|
|
4362
4390
|
});
|
|
4363
4391
|
var au = /* @__PURE__ */ new Map();
|
|
4364
4392
|
var ou = (e6, t2) => {
|
|
4365
4393
|
let n2 = `${e6}|${t2 ?? ``}`, r2 = au.get(n2);
|
|
4366
4394
|
if (r2) return r2;
|
|
4367
|
-
let i2 =
|
|
4395
|
+
let i2 = Ui(e6).then(async ({ category: e7 }) => {
|
|
4368
4396
|
let { _id: n3, translationId: r3, language: i3 } = e7 ?? {};
|
|
4369
4397
|
if (!n3) return null;
|
|
4370
4398
|
if (!t2 || !r3 || i3 === t2) return n3;
|
|
4371
|
-
let { items: a2 } = await
|
|
4399
|
+
let { items: a2 } = await Ki().eq(`translationId`, r3).eq(`language`, t2).limit(1).find();
|
|
4372
4400
|
return a2[0]?._id ?? null;
|
|
4373
4401
|
}).catch((e7) => {
|
|
4374
4402
|
if (Wl(e7)) return null;
|
|
@@ -4378,7 +4406,7 @@ var ou = (e6, t2) => {
|
|
|
4378
4406
|
};
|
|
4379
4407
|
var su = async (e6, t2) => {
|
|
4380
4408
|
try {
|
|
4381
|
-
let { items: n2 } = await
|
|
4409
|
+
let { items: n2 } = await Ki().eq(`translationId`, e6).eq(`language`, t2).limit(1).find();
|
|
4382
4410
|
return n2[0]?.slug ?? void 0;
|
|
4383
4411
|
} catch {
|
|
4384
4412
|
return;
|
|
@@ -4408,7 +4436,7 @@ var du = async ({ offset: e6, limit: t2, language: n2, categoryId: r2, categoryS
|
|
|
4408
4436
|
if (!e7) return Ql();
|
|
4409
4437
|
l3 = [e7];
|
|
4410
4438
|
}
|
|
4411
|
-
let h2 = s2 ? lu[s2] : void 0, g2 = m2 ?? (await
|
|
4439
|
+
let h2 = s2 ? lu[s2] : void 0, g2 = m2 ?? (await fa({ paging: { limit: t2, offset: e6 }, fieldsets: Ul, ...n2 && { language: n2 }, ...l3 && { categoryIds: l3 }, ...d2 && { tagIds: d2 }, ...h2 && h2 !== `FEED` && { sort: h2 }, ...c2 && { featured: true } })).posts ?? [], [_2, v2, y2] = await Promise.all([Gl(g2), u2, Kl(g2)]);
|
|
4412
4440
|
return { posts: g2, hasMore: !m2 && g2.length === t2, authorsByMemberId: _2, categoryLabelsById: Xl(g2, v2), videoSourcesByPostId: y2, ...f2 && { filterCategory: f2 }, ...p2 && { filterTag: p2 } };
|
|
4413
4441
|
} catch (e7) {
|
|
4414
4442
|
if (l2) throw e7;
|
|
@@ -4426,7 +4454,7 @@ var hu = class extends import_react.Component {
|
|
|
4426
4454
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4427
4455
|
}
|
|
4428
4456
|
componentDidCatch(e6, t2) {
|
|
4429
|
-
|
|
4457
|
+
Er(this.props.monitoringClient, e6, { feature: this.props.feature, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
|
|
4430
4458
|
}
|
|
4431
4459
|
render() {
|
|
4432
4460
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4487,7 +4515,7 @@ var Mu = (e6) => {
|
|
|
4487
4515
|
var Nu = (e6, t2 = []) => {
|
|
4488
4516
|
let n2 = e6?.media;
|
|
4489
4517
|
if (!n2 || n2.displayed === false) return;
|
|
4490
|
-
let r2 =
|
|
4518
|
+
let r2 = nr(e6);
|
|
4491
4519
|
if (r2) return { kind: `image`, image: r2 };
|
|
4492
4520
|
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? Ou(n2.wixMedia.videoV2) : void 0;
|
|
4493
4521
|
if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
|
|
@@ -4498,9 +4526,9 @@ var Nu = (e6, t2 = []) => {
|
|
|
4498
4526
|
}
|
|
4499
4527
|
};
|
|
4500
4528
|
var Pu = (e6) => {
|
|
4501
|
-
let t2 =
|
|
4529
|
+
let t2 = nr(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4502
4530
|
if (t2 || !n2) return t2;
|
|
4503
|
-
let r2 = Ou(n2), i2 =
|
|
4531
|
+
let r2 = Ou(n2), i2 = tr(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4504
4532
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4505
4533
|
};
|
|
4506
4534
|
var Fu = `2026-05-12T12:00:00.000Z`;
|
|
@@ -4526,12 +4554,12 @@ var Uu = (e6, t2, n2, r2) => {
|
|
|
4526
4554
|
};
|
|
4527
4555
|
var Wu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4528
4556
|
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = Vu(e6);
|
|
4529
|
-
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Pu(e6), itemCoverMedia: Nu(e6, s2[l2 ?? ``] ?? []), itemLink:
|
|
4557
|
+
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Pu(e6), itemCoverMedia: Nu(e6, s2[l2 ?? ``] ?? []), itemLink: fr(e6, r2), itemPublishedDate: Q(wu(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: Ru(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: zu(e6.minutesToRead), initialViewCount: f2.views ?? (o2 ? $.views : void 0), initialCommentCount: f2.comments ?? (o2 ? $.comments : void 0), authorName: Q(d2?.profile?.nickname ?? ``), authorImage: hr(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: Hu(f2.views, $.views, o2, t2.viewCount), commentCount: Hu(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: Uu(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
|
|
4530
4558
|
};
|
|
4531
4559
|
var Gu = (e6, t2, n2 = []) => {
|
|
4532
4560
|
let r2 = Nu(e6, n2);
|
|
4533
4561
|
if (!r2) return;
|
|
4534
|
-
let i2 =
|
|
4562
|
+
let i2 = fr(e6, t2), a2 = { slug: e6.slug ?? void 0, title: e6.title ?? ``, description: e6.excerpt ?? ``, ...i2 ? { action: { link: i2 } } : {} };
|
|
4535
4563
|
if (r2.kind === `image`) return r2.image.url ? { ...a2, type: `image`, src: r2.image.url, width: r2.image.width, height: r2.image.height, parameters: { alt: r2.image.alt } } : void 0;
|
|
4536
4564
|
if (r2.kind === `wixVideo`) {
|
|
4537
4565
|
let e7 = r2.sources[0]?.url;
|
|
@@ -4573,7 +4601,7 @@ var ad = { ...id, isLoadingPosts: false, hasError: true };
|
|
|
4573
4601
|
var od = (e6, t2) => {
|
|
4574
4602
|
if (e6.kind === `category` && t2.filterCategory) {
|
|
4575
4603
|
let { label: e7, description: n2, coverImage: r2 } = t2.filterCategory, i2 = e7 ?? ``;
|
|
4576
|
-
return { kind: `category`, title: i2, description: n2 ?? ``, coverImage:
|
|
4604
|
+
return { kind: `category`, title: i2, description: n2 ?? ``, coverImage: tr(r2, i2) };
|
|
4577
4605
|
}
|
|
4578
4606
|
return e6.kind === `tag` && t2.filterTag ? { kind: `tag`, title: t2.filterTag.label ?? `` } : { kind: `all` };
|
|
4579
4607
|
};
|
|
@@ -4584,27 +4612,27 @@ var ld = (e6) => {
|
|
|
4584
4612
|
};
|
|
4585
4613
|
var ud = (e6, t2) => Ln(e6, sd, t2 ? ld : cd);
|
|
4586
4614
|
var dd = ({ children: e6, firstPagePromise: t2, monitoringClient: n2, language: r2, route: i2, categoryId: o2, categorySlug: s2, tagSlug: d2, postIds: f2, pageSize: m2, postOffset: h2, sortOrder: g2, featuredOnly: _2 }) => {
|
|
4587
|
-
let { page: v2, hasError: y2 } = Fn(t2), b2 =
|
|
4588
|
-
|
|
4589
|
-
let { t: C2 } = Pc(), w2 =
|
|
4590
|
-
if (
|
|
4591
|
-
if (fe2.current) return le2(true),
|
|
4615
|
+
let { page: v2, hasError: y2 } = Fn(t2), b2 = jr(v2.fetchedAt), x2 = Yr(), S2 = Fr();
|
|
4616
|
+
kr(i2, v2, S2, n2), wa(i2.kind === `category` ? v2.mismatchedCategory : void 0, r2, su);
|
|
4617
|
+
let { t: C2 } = Pc(), w2 = Hr(), T2 = (0, import_react.useMemo)(() => pl(C2, w2), [C2, w2]), [E2, ee2] = (0, import_react.useState)(v2.posts), [D2, te2] = (0, import_react.useState)(v2.authorsByMemberId), [ne2, re2] = (0, import_react.useState)(v2.categoryLabelsById), [ie2, ae2] = (0, import_react.useState)(v2.videoSourcesByPostId), [oe2, se2] = (0, import_react.useState)(v2.hasMore), [ce2, le2] = (0, import_react.useState)(false), [O2, ue2] = (0, import_react.useState)(y2), de2 = (0, import_react.useRef)(h2 + v2.posts.length), fe2 = (0, import_react.useRef)(v2.hasMore), pe2 = (0, import_react.useRef)(null), me2 = (0, import_react.useCallback)(async () => {
|
|
4618
|
+
if (pe2.current) return pe2.current;
|
|
4619
|
+
if (fe2.current) return le2(true), pe2.current = du({ offset: de2.current, limit: m2, language: r2, categoryId: o2, ...s2 && { categorySlug: s2 }, ...d2 && { tagSlug: d2 }, ...f2 && { postIds: f2.split(`,`) }, sortOrder: g2, featuredOnly: _2, propagateErrors: true }).then((e7) => {
|
|
4592
4620
|
ee2((t3) => [...t3, ...e7.posts]), te2((t3) => ({ ...t3, ...e7.authorsByMemberId })), re2((t3) => ({ ...t3, ...e7.categoryLabelsById })), ae2((t3) => ({ ...t3, ...e7.videoSourcesByPostId })), se2(e7.hasMore), fe2.current = e7.hasMore, de2.current += e7.posts.length, ue2(false);
|
|
4593
4621
|
}).catch((e7) => {
|
|
4594
|
-
ue2(true),
|
|
4622
|
+
ue2(true), Er(n2, e7, { feature: Cr.feed, action: `load-more-posts`, contexts: { feed: { offset: de2.current, pageSize: m2, categoryId: o2, categorySlug: s2, tagSlug: d2 } } });
|
|
4595
4623
|
}).finally(() => {
|
|
4596
|
-
|
|
4597
|
-
}),
|
|
4598
|
-
}, [r2, o2, s2, d2, f2, m2, g2, _2, n2]),
|
|
4624
|
+
pe2.current = null, le2(false);
|
|
4625
|
+
}), pe2.current;
|
|
4626
|
+
}, [r2, o2, s2, d2, f2, m2, g2, _2, n2]), he2 = (0, import_react.useMemo)(() => {
|
|
4599
4627
|
let e7 = x2 && !_2 && !o2 && !f2 && !s2 && !d2, t3 = E2.length === 0 && e7 ? v2.demoPosts ?? [] : E2, n3 = t3.map((e8) => Wu(e8, T2, w2, S2, D2, ne2, x2, ie2, b2)), r3 = t3.map((e8) => Gu(e8, S2, ie2[e8._id ?? ``] ?? [])).filter((e8) => e8 !== void 0);
|
|
4600
|
-
return { postsList: n3.length === 0 && e7 ? Zu(T2, w2, S2, b2) : n3, postGalleryItems: r3.length === 0 && e7 ? Xu(T2) : r3, emptyState: E2.length === 0 && !O2 ? T2.noPostsEmptyState() : null, hasError: O2, hasMorePosts: oe2, isLoadingPosts: ce2, loadMorePosts:
|
|
4601
|
-
}, [i2, v2, E2, D2, ne2, ie2, T2, w2, S2, x2, b2, O2, _2, o2, f2, s2, d2, oe2, ce2,
|
|
4602
|
-
return
|
|
4628
|
+
return { postsList: n3.length === 0 && e7 ? Zu(T2, w2, S2, b2) : n3, postGalleryItems: r3.length === 0 && e7 ? Xu(T2) : r3, emptyState: E2.length === 0 && !O2 ? T2.noPostsEmptyState() : null, hasError: O2, hasMorePosts: oe2, isLoadingPosts: ce2, loadMorePosts: me2, filteredView: od(i2, v2) };
|
|
4629
|
+
}, [i2, v2, E2, D2, ne2, ie2, T2, w2, S2, x2, b2, O2, _2, o2, f2, s2, d2, oe2, ce2, me2]);
|
|
4630
|
+
return Rr(Ir.feedProvider, O2 ? `error` : E2.length > 0 ? `data` : `empty`), (0, import_jsx_runtime.jsx)(Qu.Provider, { value: he2, children: e6 });
|
|
4603
4631
|
};
|
|
4604
4632
|
var fd = (e6, t2, n2, r2, i2, a2, o2, s2, c2) => `blog-builder:feed:${e6 ?? ``}|${t2 ?? ``}|c:${n2 ?? ``}|t:${r2 ?? ``}|p:${i2}|${a2}|${o2}|${s2}|${+!!c2}`;
|
|
4605
4633
|
function pd({ children: e6, categoryPicker: n2, postsPicker: r2, pageSize: i2, postOffset: a2, sortOrder: o2, featuredOnly: s2, liveRefreshGeneration: l2 = 0 }) {
|
|
4606
|
-
let u2 =
|
|
4607
|
-
return (0, import_jsx_runtime.jsx)(Fc, { i18n: E2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Qu.Provider, { value: id, children: e6 }), children: [(0, import_jsx_runtime.jsx)(nl, { i18n: E2, locale: ee2 }), (0, import_jsx_runtime.jsx)(hu, { fallback: (0, import_jsx_runtime.jsx)(Qu.Provider, { value: ad, children: e6 }), feature:
|
|
4634
|
+
let u2 = Vr(), d2 = Mr(), f2 = Gn(), h2 = f2.kind === `category` ? f2.slug : void 0, g2 = f2.kind === `tag` ? f2.slug : void 0, _2 = h2 || g2 ? void 0 : pu(n2), v2 = h2 || g2 ? `` : vu(r2).join(`,`), y2 = td(i2), b2 = nd(a2), x2 = rd(o2), S2 = s2 === true, C2 = Yr() && !S2 && !_2 && !v2 && !h2 && !g2, w2 = Ea(), T2 = (0, import_react.useMemo)(() => wr(Nn), []), { i18n: E2, locale: ee2 } = rl(dl), D2 = Pr(() => ({ language: u2, route: Hn(h2, g2), filterCategoryId: _2, filterPostIds: v2, categorySlug: h2, tagSlug: g2, pageSize: y2, postOffset: b2, sortOrder: x2, featuredOnly: S2, liveRefreshGeneration: l2, firstPagePromise: ud(Wc({ key: l2 > 0 ? null : fd(u2, _2, h2, g2, v2, y2, b2, x2, S2), warmupData: w2, fetchData: () => gu(Dr(T2, `feed-first-page`, { feature: Cr.feed, tags: { sortOrder: x2 } }, du({ offset: b2, limit: y2, language: u2, categoryId: _2, ...h2 && { categorySlug: h2 }, ...g2 && { tagSlug: g2 }, ...v2 && { postIds: v2.split(`,`) }, sortOrder: x2, featuredOnly: S2, propagateErrors: true }).then((e7) => C2 ? uu(e7, { limit: y2, offset: b2, language: u2, sortOrder: x2 }) : e7))) }), d2) }), [u2, d2, C2, _2, v2, h2, g2, y2, b2, x2, S2, l2, w2, T2]);
|
|
4635
|
+
return (0, import_jsx_runtime.jsx)(Fc, { i18n: E2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(Qu.Provider, { value: id, children: e6 }), children: [(0, import_jsx_runtime.jsx)(nl, { i18n: E2, locale: ee2 }), (0, import_jsx_runtime.jsx)(hu, { fallback: (0, import_jsx_runtime.jsx)(Qu.Provider, { value: ad, children: e6 }), feature: Cr.feed, monitoringClient: T2, rethrow: d2, children: (0, import_jsx_runtime.jsx)(dd, { firstPagePromise: D2.firstPagePromise, monitoringClient: T2, language: D2.language, route: D2.route, categoryId: D2.filterCategoryId, categorySlug: D2.categorySlug, tagSlug: D2.tagSlug, postIds: D2.filterPostIds, pageSize: D2.pageSize, postOffset: D2.postOffset, sortOrder: D2.sortOrder, featuredOnly: D2.featuredOnly, children: e6 }, `${fd(D2.language, D2.filterCategoryId, D2.categorySlug, D2.tagSlug, D2.filterPostIds, D2.pageSize, D2.postOffset, D2.sortOrder, D2.featuredOnly)}#${D2.liveRefreshGeneration}`) })] }) });
|
|
4608
4636
|
}
|
|
4609
4637
|
var md = En(`ada94d8c-4889-444e-b773-f1a875693fdb`);
|
|
4610
4638
|
// Annotate the CommonJS export names for ESM import in node:
|