@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
|
@@ -111,50 +111,50 @@ function de(e6) {
|
|
|
111
111
|
return t2.slice(n2, r2).split(/\0/g);
|
|
112
112
|
}
|
|
113
113
|
var fe = (e6) => `validationError` in (e6.response?.data?.details ?? {});
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
function
|
|
114
|
+
var pe = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
|
|
115
|
+
var me = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
|
|
116
|
+
function he(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
117
117
|
if (typeof e6 != `object` || !e6) throw e6;
|
|
118
|
-
if (fe(e6)) return
|
|
119
|
-
if (
|
|
120
|
-
if (
|
|
118
|
+
if (fe(e6)) return ge(e6, t2, n2);
|
|
119
|
+
if (pe(e6)) return ve(e6);
|
|
120
|
+
if (me(e6)) {
|
|
121
121
|
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 };
|
|
122
|
-
return
|
|
122
|
+
return _e(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
123
123
|
}
|
|
124
|
-
return
|
|
124
|
+
return ye(e6);
|
|
125
125
|
}
|
|
126
|
-
var
|
|
127
|
-
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 =
|
|
128
|
-
return
|
|
126
|
+
var ge = (e6, t2, n2) => {
|
|
127
|
+
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 };
|
|
128
|
+
return _e(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
|
|
129
129
|
};
|
|
130
|
-
var
|
|
131
|
-
var
|
|
130
|
+
var _e = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
|
|
131
|
+
var ve = (e6) => {
|
|
132
132
|
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 };
|
|
133
|
-
return
|
|
133
|
+
return _e(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
|
|
134
134
|
};
|
|
135
|
-
var
|
|
136
|
-
var
|
|
135
|
+
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 } } });
|
|
136
|
+
var be = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
137
137
|
let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
|
|
138
138
|
return r2?.filter((e7) => !r2.some((t3) => t3.field.length > e7.field.length && t3.field.startsWith(e7.field) && o2.includes(t3.field))).map((e7) => {
|
|
139
139
|
let r3 = t2[e7.field];
|
|
140
|
-
if (r3) return { ...e7, field:
|
|
140
|
+
if (r3) return { ...e7, field: xe(r3, i2) };
|
|
141
141
|
let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
|
|
142
142
|
if (s2) {
|
|
143
143
|
let t3 = a2[s2];
|
|
144
|
-
if (t3) return { ...e7, field: e7.field.replace(s2,
|
|
144
|
+
if (t3) return { ...e7, field: e7.field.replace(s2, xe(t3, i2)) };
|
|
145
145
|
}
|
|
146
146
|
return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
|
|
147
147
|
});
|
|
148
148
|
};
|
|
149
|
-
var
|
|
150
|
-
let n2 =
|
|
149
|
+
var xe = (e6, t2) => {
|
|
150
|
+
let n2 = Se(e6);
|
|
151
151
|
return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
|
|
152
152
|
};
|
|
153
|
-
var
|
|
153
|
+
var Se = (e6) => {
|
|
154
154
|
let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
|
|
155
155
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
156
156
|
};
|
|
157
|
-
function
|
|
157
|
+
function Ce(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
158
158
|
return ae(() => e6({ request: async (e7) => {
|
|
159
159
|
let i3 = e7({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
|
|
160
160
|
a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
|
|
@@ -168,7 +168,7 @@ function Se(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
|
168
168
|
e9 = await s3.json();
|
|
169
169
|
} catch {
|
|
170
170
|
}
|
|
171
|
-
let t3 =
|
|
171
|
+
let t3 = Te(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = he(t3);
|
|
172
172
|
throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
|
|
173
173
|
}
|
|
174
174
|
let l3 = await s3.json();
|
|
@@ -178,18 +178,18 @@ function Se(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
|
178
178
|
}
|
|
179
179
|
}, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
|
|
180
180
|
}
|
|
181
|
-
var
|
|
181
|
+
var we = class extends Error {
|
|
182
182
|
response;
|
|
183
183
|
requestId;
|
|
184
184
|
constructor(e6) {
|
|
185
185
|
super(), this.response = e6.response, this.requestId = e6.requestId;
|
|
186
186
|
}
|
|
187
187
|
};
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
function
|
|
188
|
+
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 });
|
|
189
|
+
var Ee = `.`;
|
|
190
|
+
function De(e6, t2, n2) {
|
|
191
191
|
if (e6 == null) throw Error(`Cannot set value on null or undefined`);
|
|
192
|
-
let r2 =
|
|
192
|
+
let r2 = Oe(t2), i2 = e6;
|
|
193
193
|
for (let e7 = 0; e7 < r2.length; e7++) {
|
|
194
194
|
let t3 = r2[e7];
|
|
195
195
|
if (e7 === r2.length - 1) {
|
|
@@ -201,21 +201,21 @@ function Ee(e6, t2, n2) {
|
|
|
201
201
|
}
|
|
202
202
|
return e6;
|
|
203
203
|
}
|
|
204
|
-
function De(e6) {
|
|
205
|
-
return Array.isArray(e6) ? e6 : e6.split(Te).map((e7) => Oe(e7) ? Number(e7) : e7);
|
|
206
|
-
}
|
|
207
204
|
function Oe(e6) {
|
|
208
|
-
return
|
|
205
|
+
return Array.isArray(e6) ? e6 : e6.split(Ee).map((e7) => ke(e7) ? Number(e7) : e7);
|
|
209
206
|
}
|
|
210
207
|
function ke(e6) {
|
|
208
|
+
return /^\d+$/.test(e6);
|
|
209
|
+
}
|
|
210
|
+
function Ae(e6) {
|
|
211
211
|
let t2 = {};
|
|
212
|
-
for (let [n2, r2] of Object.entries(e6))
|
|
212
|
+
for (let [n2, r2] of Object.entries(e6)) je(n2) || De(t2, Oe(n2), r2);
|
|
213
213
|
return t2;
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function je(e6) {
|
|
216
216
|
return e6 === `__proto__` || e6 === `constructor` || e6 === `prototype`;
|
|
217
217
|
}
|
|
218
|
-
var
|
|
218
|
+
var Me = class {
|
|
219
219
|
BRACKET_PATTERN = /\[(\d+)\]/g;
|
|
220
220
|
NUMERIC_PATTERN = /^\d+$/;
|
|
221
221
|
ESCAPED_DOT_PATTERN = /\\\./g;
|
|
@@ -238,7 +238,7 @@ var je = class {
|
|
|
238
238
|
return e6.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
|
|
239
239
|
}
|
|
240
240
|
unflatten() {
|
|
241
|
-
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])),
|
|
241
|
+
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])), Ae(this.cleanedModifiedFields);
|
|
242
242
|
}
|
|
243
243
|
flatten(e6) {
|
|
244
244
|
let t2 = {};
|
|
@@ -263,7 +263,7 @@ var je = class {
|
|
|
263
263
|
r2.push(i3), n2 = t3[i3];
|
|
264
264
|
return;
|
|
265
265
|
}
|
|
266
|
-
let a3 =
|
|
266
|
+
let a3 = Ie(e7);
|
|
267
267
|
if (a3 && a3 in t3) r2.push(a3), n2 = t3[a3];
|
|
268
268
|
else throw Error(`Cannot find key '${e7}' or its transformations at path ${this.buildPathString(r2)}`);
|
|
269
269
|
}, o2 = (e7, t3) => {
|
|
@@ -287,28 +287,28 @@ var je = class {
|
|
|
287
287
|
return e6.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e6[r2 - 1] === `\\` ? t2 : `.` + n2);
|
|
288
288
|
}
|
|
289
289
|
};
|
|
290
|
-
function
|
|
290
|
+
function Ne(e6, t2) {
|
|
291
291
|
let n2 = e6?.modifiedFields;
|
|
292
292
|
if (!n2) return null;
|
|
293
|
-
let r2 =
|
|
293
|
+
let r2 = Pe(n2);
|
|
294
294
|
if (!r2) return null;
|
|
295
295
|
let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
|
|
296
296
|
e6 = { ...e6, modifiedFields: i2 };
|
|
297
297
|
let o2 = t2(e6), s2 = o2?.modifiedFields;
|
|
298
298
|
if (!s2) return null;
|
|
299
|
-
let c2 =
|
|
299
|
+
let c2 = Fe(s2, a2);
|
|
300
300
|
return c2 === null ? null : (o2.modifiedFields = c2, o2);
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function Pe(e6) {
|
|
303
303
|
if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
|
|
304
|
-
let t2 = new
|
|
304
|
+
let t2 = new Me(e6);
|
|
305
305
|
return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
|
|
306
306
|
} catch {
|
|
307
307
|
return null;
|
|
308
308
|
}
|
|
309
309
|
return null;
|
|
310
310
|
}
|
|
311
|
-
function
|
|
311
|
+
function Fe(e6, t2) {
|
|
312
312
|
if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
|
|
313
313
|
return t2.flatten(e6);
|
|
314
314
|
} catch {
|
|
@@ -316,10 +316,10 @@ function Pe(e6, t2) {
|
|
|
316
316
|
}
|
|
317
317
|
return null;
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function Ie(e6) {
|
|
320
320
|
return e6.replace(/[-_\s]+(.)?/g, (e7, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e7) => e7.toLowerCase());
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function Le() {
|
|
323
323
|
return { emit(e6, ...t2) {
|
|
324
324
|
for (let n2 = 0, r2 = this.events[e6] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
|
|
325
325
|
}, events: {}, on(e6, t2) {
|
|
@@ -328,8 +328,8 @@ function Ie() {
|
|
|
328
328
|
};
|
|
329
329
|
} };
|
|
330
330
|
}
|
|
331
|
-
var
|
|
332
|
-
function
|
|
331
|
+
var Re = (e6) => e6.__type === `event-definition`;
|
|
332
|
+
function ze(e6, t2, n2, r2) {
|
|
333
333
|
let i2;
|
|
334
334
|
if (e6.isDomainEvent) {
|
|
335
335
|
let { deletedEvent: e7, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
|
|
@@ -340,14 +340,14 @@ function Re(e6, t2, n2, r2) {
|
|
|
340
340
|
let e7 = s2.modifiedFields;
|
|
341
341
|
if (typeof e7 == `object` && e7 && !Array.isArray(e7)) {
|
|
342
342
|
o2 = structuredClone(i2);
|
|
343
|
-
let e8 =
|
|
343
|
+
let e8 = Ne(s2, a2);
|
|
344
344
|
if (e8) return t2(e8);
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
347
|
return t2(a2(o2));
|
|
348
348
|
}
|
|
349
|
-
function
|
|
350
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
349
|
+
function Be(e6) {
|
|
350
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = Le();
|
|
351
351
|
return { initModule(e7) {
|
|
352
352
|
return (r2) => {
|
|
353
353
|
let i2 = t2.get(e7.type) ?? [];
|
|
@@ -357,7 +357,7 @@ function ze(e6) {
|
|
|
357
357
|
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 }))];
|
|
358
358
|
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(`, `)}`);
|
|
359
359
|
let l2 = t2.get(r2) ?? [];
|
|
360
|
-
return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) =>
|
|
360
|
+
return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) => ze(e8, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
|
|
361
361
|
}, async processRequest(e7, t3) {
|
|
362
362
|
let n3 = await e7.text();
|
|
363
363
|
return this.process(n3, t3);
|
|
@@ -376,12 +376,12 @@ function ze(e6) {
|
|
|
376
376
|
let n3 = Array.from(t2.keys()).map((e8) => ({ type: e8 }));
|
|
377
377
|
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(`, `)}`);
|
|
378
378
|
let r2 = t2.get(e7.eventType) ?? [];
|
|
379
|
-
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) =>
|
|
379
|
+
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => ze(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
|
|
380
380
|
}, apps: { AppInstalled: v(`AppInstalled`)(), AppRemoved: v(`AppRemoved`)() } } };
|
|
381
381
|
}
|
|
382
|
-
var
|
|
383
|
-
function
|
|
384
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
382
|
+
var Ve = (e6) => e6.__type === `service-plugin-definition`;
|
|
383
|
+
function He(e6) {
|
|
384
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = Le();
|
|
385
385
|
return { initModule(e7) {
|
|
386
386
|
return (r2) => {
|
|
387
387
|
let i2 = t2.get(e7.componentType.toLowerCase()) ?? [];
|
|
@@ -422,38 +422,38 @@ function Ve(e6) {
|
|
|
422
422
|
return s2.transformations.toREST(await c2(s2.transformations.fromREST(e7)));
|
|
423
423
|
} } };
|
|
424
424
|
}
|
|
425
|
-
var
|
|
426
|
-
function
|
|
425
|
+
var k = `X-Wix-Consistent`;
|
|
426
|
+
function Ue(e6) {
|
|
427
427
|
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) => {
|
|
428
|
-
let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [
|
|
428
|
+
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?.();
|
|
429
429
|
try {
|
|
430
430
|
if (typeof n3 == `string` || n3 instanceof URL) {
|
|
431
431
|
let e7 = await i3(n3, { ...r3, headers: c3 });
|
|
432
432
|
l3?.handleError(e7, { requestOptions: { url: n3.toString(), method: r3?.method } });
|
|
433
|
-
let a3 =
|
|
434
|
-
return a3 && (t2[
|
|
433
|
+
let a3 = We(e7);
|
|
434
|
+
return a3 && (t2[k] = a3), e7;
|
|
435
435
|
}
|
|
436
436
|
{
|
|
437
437
|
for (let [e8, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e8, t3);
|
|
438
438
|
let e7 = await i3(n3, r3);
|
|
439
439
|
l3?.handleError(e7, { requestOptions: { url: n3.url, method: r3?.method } });
|
|
440
|
-
let a3 =
|
|
441
|
-
return a3 && (t2[
|
|
440
|
+
let a3 = We(e7);
|
|
441
|
+
return a3 && (t2[k] = a3), e7;
|
|
442
442
|
}
|
|
443
443
|
} catch (e7) {
|
|
444
444
|
throw l3?.handleError(e7, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e7;
|
|
445
445
|
}
|
|
446
|
-
}, { client: c2, initModule: l2 } =
|
|
447
|
-
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`] ? { [
|
|
448
|
-
return u3 && (t2[
|
|
446
|
+
}, { client: c2, initModule: l2 } = He(i2), { client: u2, initModule: d2 } = Be(i2), f2 = async (n3, r3) => {
|
|
447
|
+
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);
|
|
448
|
+
return u3 && (t2[k] = u3), l3;
|
|
449
449
|
}, p2 = (t3, n3) => {
|
|
450
|
-
if (
|
|
451
|
-
if (
|
|
450
|
+
if (Re(t3)) return d2(t3);
|
|
451
|
+
if (Ve(t3)) return l2(t3);
|
|
452
452
|
if (D(t3) && e6.host) return te(t3, e6.host);
|
|
453
453
|
if (typeof t3 == `function`) {
|
|
454
454
|
if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
|
|
455
455
|
let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e6.useCDN === void 0 ? i2().shouldUseCDN : e6.useCDN;
|
|
456
|
-
return
|
|
456
|
+
return Ce(ae(() => x(t3)) ? b(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
|
|
457
457
|
let n4 = new URL(e7, `https://${r3}`);
|
|
458
458
|
return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
|
|
459
459
|
}, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e6.host?.name, o3, e6.validateRequestSchema);
|
|
@@ -477,22 +477,22 @@ function He(e6) {
|
|
|
477
477
|
return { data: o3 ?? {}, errors: s3 };
|
|
478
478
|
}, webhooks: u2, servicePlugins: c2 };
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function We(e6) {
|
|
481
481
|
return e6.headers?.get(`X-Wix-Consistent`) ?? e6.headers?.get(`x-wix-consistent`);
|
|
482
482
|
}
|
|
483
|
-
var
|
|
484
|
-
var
|
|
485
|
-
var
|
|
486
|
-
var
|
|
487
|
-
var
|
|
488
|
-
function
|
|
483
|
+
var Ge = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
|
|
484
|
+
var Ke = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
485
|
+
var qe = `items`;
|
|
486
|
+
var Je = `pagingMetadata`;
|
|
487
|
+
var Ye = Ge;
|
|
488
|
+
function Xe(e6, t2) {
|
|
489
489
|
return e6?.split(`.`).map((e7) => t2?.[e7] ?? e7).join(`.`);
|
|
490
490
|
}
|
|
491
|
-
var
|
|
492
|
-
function Ze(e6, t2, n2) {
|
|
493
|
-
return (e6 === Xe || e6.endsWith(`.${Xe}`)) && typeof t2 == `string` ? Ye(t2, n2) : t2;
|
|
494
|
-
}
|
|
491
|
+
var Ze = `sort.fieldName`;
|
|
495
492
|
function Qe(e6, t2, n2) {
|
|
493
|
+
return (e6 === Ze || e6.endsWith(`.${Ze}`)) && typeof t2 == `string` ? Xe(t2, n2) : t2;
|
|
494
|
+
}
|
|
495
|
+
function $e(e6, t2, n2) {
|
|
496
496
|
let r2 = (e7) => n2.includes(e7), i2 = (e7, n3) => {
|
|
497
497
|
if (Array.isArray(e7)) e7.forEach((e8) => {
|
|
498
498
|
i2(e8, n3);
|
|
@@ -502,144 +502,144 @@ function Qe(e6, t2, n2) {
|
|
|
502
502
|
Object.keys(a2).forEach((e8) => {
|
|
503
503
|
let o2 = n3 === `` ? e8 : `${n3}.${e8}`;
|
|
504
504
|
if (r2(o2)) return;
|
|
505
|
-
let s2 =
|
|
506
|
-
s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] =
|
|
505
|
+
let s2 = et(e8, t2);
|
|
506
|
+
s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] = Qe(o2, a2[s2], t2), i2(a2[s2], o2);
|
|
507
507
|
});
|
|
508
508
|
}
|
|
509
509
|
};
|
|
510
510
|
return i2(e6, ``), e6;
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function et(e6, t2) {
|
|
513
513
|
let n2;
|
|
514
514
|
return n2 = e6.includes(`.`) ? e6.split(`.`).map((e7) => t2[e7] ?? e7).join(`.`) : t2[e6] ?? e6, n2;
|
|
515
515
|
}
|
|
516
|
-
function
|
|
517
|
-
return
|
|
516
|
+
function A(e6, t2 = []) {
|
|
517
|
+
return $e(e6, Ge, t2);
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
return
|
|
519
|
+
function j(e6, t2 = []) {
|
|
520
|
+
return $e(e6, Ke, t2);
|
|
521
521
|
}
|
|
522
|
-
function
|
|
522
|
+
function M(e6) {
|
|
523
523
|
return e6 ? new Date(e6) : void 0;
|
|
524
524
|
}
|
|
525
|
-
var
|
|
526
|
-
function
|
|
525
|
+
var tt = /* @__PURE__ */ new WeakMap();
|
|
526
|
+
function nt() {
|
|
527
527
|
return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function rt(e6, t2) {
|
|
530
530
|
let n2 = e6.get(t2);
|
|
531
|
-
return n2 || (n2 =
|
|
531
|
+
return n2 || (n2 = nt(), e6.set(t2, n2)), n2;
|
|
532
532
|
}
|
|
533
|
-
function
|
|
534
|
-
return t2 === `*` ? (e6.anyField ??=
|
|
533
|
+
function it(e6, t2) {
|
|
534
|
+
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));
|
|
535
535
|
}
|
|
536
|
-
function
|
|
537
|
-
let t2 =
|
|
536
|
+
function at(e6) {
|
|
537
|
+
let t2 = nt();
|
|
538
538
|
for (let n2 of e6) {
|
|
539
|
-
let e7 = n2.path.split(`.`).reduce(
|
|
539
|
+
let e7 = n2.path.split(`.`).reduce(it, t2);
|
|
540
540
|
e7.leaves ??= [], e7.leaves.push(n2);
|
|
541
541
|
}
|
|
542
542
|
return t2;
|
|
543
543
|
}
|
|
544
|
-
function at(e6) {
|
|
545
|
-
let t2 = et.get(e6);
|
|
546
|
-
return t2 || (t2 = it(e6), et.set(e6, t2)), t2;
|
|
547
|
-
}
|
|
548
544
|
function ot(e6) {
|
|
549
|
-
|
|
545
|
+
let t2 = tt.get(e6);
|
|
546
|
+
return t2 || (t2 = at(e6), tt.set(e6, t2)), t2;
|
|
550
547
|
}
|
|
551
|
-
function st(e6
|
|
552
|
-
return
|
|
548
|
+
function st(e6) {
|
|
549
|
+
return typeof e6 == `object` && !!e6;
|
|
553
550
|
}
|
|
554
|
-
function ct(e6, t2, n2) {
|
|
555
|
-
|
|
551
|
+
function ct(e6, { isRepeated: t2, isMap: n2 }, r2) {
|
|
552
|
+
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);
|
|
556
553
|
}
|
|
557
554
|
function lt(e6, t2, n2) {
|
|
555
|
+
st(e6) && ft(e6, t2, n2);
|
|
556
|
+
}
|
|
557
|
+
function ut(e6, t2, n2) {
|
|
558
558
|
for (let [r2, i2] of t2) {
|
|
559
559
|
if (!(r2 in e6)) continue;
|
|
560
|
-
if (i2.leaves) for (let t4 of i2.leaves) e6[r2] =
|
|
560
|
+
if (i2.leaves) for (let t4 of i2.leaves) e6[r2] = ct(e6[r2], t4, n2);
|
|
561
561
|
let t3 = e6[r2];
|
|
562
|
-
Array.isArray(t3) ? t3.forEach((e7) =>
|
|
562
|
+
Array.isArray(t3) ? t3.forEach((e7) => lt(e7, i2, n2)) : lt(t3, i2, n2);
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
function
|
|
565
|
+
function dt(e6, t2, n2) {
|
|
566
566
|
for (let [r2, i2] of t2) {
|
|
567
567
|
let t3 = e6[r2];
|
|
568
|
-
|
|
568
|
+
st(t3) && Object.values(t3).forEach((e7) => lt(e7, i2, n2));
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
function
|
|
572
|
-
t2 &&
|
|
571
|
+
function ft(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
|
|
572
|
+
t2 && ut(e6, t2, i2), n2 && dt(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => lt(e7, r2, i2));
|
|
573
573
|
}
|
|
574
|
-
function
|
|
575
|
-
if (!
|
|
576
|
-
for (let { paths: n2, transformFn: r2 } of t2)
|
|
574
|
+
function N(e6, t2) {
|
|
575
|
+
if (!st(e6)) return e6;
|
|
576
|
+
for (let { paths: n2, transformFn: r2 } of t2) ft(e6, ot(n2), r2);
|
|
577
577
|
return e6;
|
|
578
578
|
}
|
|
579
|
-
function
|
|
580
|
-
return
|
|
579
|
+
function pt(e6) {
|
|
580
|
+
return vt(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
|
|
581
581
|
}
|
|
582
|
-
var
|
|
583
|
-
var
|
|
584
|
-
var
|
|
585
|
-
var
|
|
586
|
-
function
|
|
582
|
+
var mt = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
583
|
+
var ht = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
584
|
+
var gt = `$1\0$2`;
|
|
585
|
+
var _t = /[^\p{L}\d]+/giu;
|
|
586
|
+
function vt(e6) {
|
|
587
587
|
let t2 = e6.trim();
|
|
588
|
-
t2 = t2.replace(
|
|
588
|
+
t2 = t2.replace(mt, gt).replace(ht, gt), t2 = t2.replace(_t, `\0`);
|
|
589
589
|
let n2 = 0, r2 = t2.length;
|
|
590
590
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
591
591
|
if (n2 === r2) return [];
|
|
592
592
|
for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
|
|
593
593
|
return t2.slice(n2, r2).split(/\0/g);
|
|
594
594
|
}
|
|
595
|
-
var
|
|
596
|
-
var
|
|
597
|
-
var
|
|
598
|
-
function
|
|
595
|
+
var yt = (e6) => `validationError` in (e6.response?.data?.details ?? {});
|
|
596
|
+
var bt = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
|
|
597
|
+
var xt = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
|
|
598
|
+
function P(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
599
599
|
if (typeof e6 != `object` || !e6) throw e6;
|
|
600
|
-
if (
|
|
601
|
-
if (
|
|
602
|
-
if (
|
|
603
|
-
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code:
|
|
604
|
-
return
|
|
600
|
+
if (yt(e6)) return St(e6, t2, n2);
|
|
601
|
+
if (bt(e6)) return wt(e6);
|
|
602
|
+
if (xt(e6)) {
|
|
603
|
+
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 };
|
|
604
|
+
return Ct(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
605
605
|
}
|
|
606
|
-
return
|
|
606
|
+
return Tt(e6);
|
|
607
607
|
}
|
|
608
|
-
var
|
|
609
|
-
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 =
|
|
610
|
-
return
|
|
608
|
+
var St = (e6, t2, n2) => {
|
|
609
|
+
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 };
|
|
610
|
+
return Ct(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
|
|
611
611
|
};
|
|
612
|
-
var
|
|
613
|
-
var
|
|
614
|
-
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 ??
|
|
615
|
-
return
|
|
612
|
+
var Ct = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
|
|
613
|
+
var wt = (e6) => {
|
|
614
|
+
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 };
|
|
615
|
+
return Ct(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
|
|
616
616
|
};
|
|
617
|
-
var
|
|
618
|
-
var
|
|
617
|
+
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 } } });
|
|
618
|
+
var Et = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
619
619
|
let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
|
|
620
620
|
return r2?.filter((e7) => !r2.some((t3) => t3.field.length > e7.field.length && t3.field.startsWith(e7.field) && o2.includes(t3.field))).map((e7) => {
|
|
621
621
|
let r3 = t2[e7.field];
|
|
622
|
-
if (r3) return { ...e7, field:
|
|
622
|
+
if (r3) return { ...e7, field: Dt(r3, i2) };
|
|
623
623
|
let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
|
|
624
624
|
if (s2) {
|
|
625
625
|
let t3 = a2[s2];
|
|
626
|
-
if (t3) return { ...e7, field: e7.field.replace(s2,
|
|
626
|
+
if (t3) return { ...e7, field: e7.field.replace(s2, Dt(t3, i2)) };
|
|
627
627
|
}
|
|
628
628
|
return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
|
|
629
629
|
});
|
|
630
630
|
};
|
|
631
|
-
var
|
|
632
|
-
let n2 =
|
|
631
|
+
var Dt = (e6, t2) => {
|
|
632
|
+
let n2 = Ot(e6);
|
|
633
633
|
return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
|
|
634
634
|
};
|
|
635
|
-
var
|
|
635
|
+
var Ot = (e6) => {
|
|
636
636
|
let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
|
|
637
637
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
638
638
|
};
|
|
639
|
-
function
|
|
639
|
+
function kt() {
|
|
640
640
|
let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
641
641
|
if (e6) return { initWixModules(t3, n3) {
|
|
642
|
-
return
|
|
642
|
+
return At(() => e6(t3, n3));
|
|
643
643
|
}, fetchWithAuth() {
|
|
644
644
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
645
645
|
}, graphql() {
|
|
@@ -649,10 +649,10 @@ function Ot() {
|
|
|
649
649
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
650
650
|
if (r2) {
|
|
651
651
|
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`);
|
|
652
|
-
return
|
|
652
|
+
return At(() => n2.use(e7));
|
|
653
653
|
}
|
|
654
654
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
655
|
-
return
|
|
655
|
+
return At(() => t2.use(e7));
|
|
656
656
|
}, fetchWithAuth: (e7, n3) => {
|
|
657
657
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
658
658
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -664,7 +664,7 @@ function Ot() {
|
|
|
664
664
|
return t2.graphql(e7, n3, r2);
|
|
665
665
|
} };
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function At(e6) {
|
|
668
668
|
let t2 = globalThis.__wix_context__, n2 = { client: _.client, elevatedClient: _.elevatedClient }, r2;
|
|
669
669
|
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);
|
|
670
670
|
try {
|
|
@@ -673,16 +673,16 @@ function kt(e6) {
|
|
|
673
673
|
globalThis.__wix_context__ = t2, _.client = n2.client, _.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function jt(e6, t2) {
|
|
677
677
|
return (...n2) => {
|
|
678
|
-
let r2 =
|
|
678
|
+
let r2 = kt();
|
|
679
679
|
return r2 ? r2.initWixModules(e6, t2).apply(void 0, n2) : e6.apply(void 0, n2);
|
|
680
680
|
};
|
|
681
681
|
}
|
|
682
|
-
function
|
|
683
|
-
return
|
|
682
|
+
function F(e6, t2 = false) {
|
|
683
|
+
return jt(e6, t2);
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function I(e6, t2) {
|
|
686
686
|
let n2 = Nt(e6), r2 = Object.entries(n2).some(([e7, t3]) => e7.includes(`.`) || Array.isArray(t3) && t3.some((e8) => typeof e8 == `object`));
|
|
687
687
|
return t2 && r2 ? new URLSearchParams({ ".r": Ft(JSON.stringify(e6)) }) : Object.entries(n2).reduce((e7, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
|
|
688
688
|
r3 == null || Array.isArray(n3) && typeof r3 == `object` || e7.append(t3, r3);
|
|
@@ -904,7 +904,7 @@ var wn = bn({ createHost: function(e6) {
|
|
|
904
904
|
} });
|
|
905
905
|
var Tn = (e6, t2) => {
|
|
906
906
|
let n2 = wn.host({ applicationId: e6, componentId: t2 }), r2 = wn.auth();
|
|
907
|
-
return
|
|
907
|
+
return Ue({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
908
908
|
};
|
|
909
909
|
var En = (e6) => Tn(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
|
|
910
910
|
function Dn() {
|
|
@@ -1007,84 +1007,84 @@ function R(e6) {
|
|
|
1007
1007
|
}
|
|
1008
1008
|
var Rn = R(`@wix/site-service-url`);
|
|
1009
1009
|
var zn = `post`;
|
|
1010
|
-
var
|
|
1011
|
-
var
|
|
1010
|
+
var Bn = { kind: `all` };
|
|
1011
|
+
var Vn = (e6) => {
|
|
1012
1012
|
let t2 = e6.split(`/`).filter(Boolean);
|
|
1013
|
-
if (t2.length < 2) return
|
|
1013
|
+
if (t2.length < 2) return Bn;
|
|
1014
1014
|
let [n2, r2] = t2.slice(-2), i2;
|
|
1015
1015
|
try {
|
|
1016
1016
|
i2 = decodeURIComponent(r2);
|
|
1017
1017
|
} catch {
|
|
1018
1018
|
i2 = r2;
|
|
1019
1019
|
}
|
|
1020
|
-
return i2 ? n2 === `category` ? { kind: `category`, slug: i2 } : n2 === `tag` ? { kind: `tag`, slug: i2 } :
|
|
1020
|
+
return i2 ? n2 === `category` ? { kind: `category`, slug: i2 } : n2 === `tag` ? { kind: `tag`, slug: i2 } : Bn : Bn;
|
|
1021
1021
|
};
|
|
1022
|
-
var
|
|
1023
|
-
var
|
|
1024
|
-
if (!e6) return
|
|
1022
|
+
var Hn = (e6, t2) => e6 ? { kind: `category`, slug: e6 } : t2 ? { kind: `tag`, slug: t2 } : Bn;
|
|
1023
|
+
var Un = (e6) => {
|
|
1024
|
+
if (!e6) return Bn;
|
|
1025
1025
|
try {
|
|
1026
|
-
return
|
|
1026
|
+
return Vn(new URL(e6).pathname);
|
|
1027
1027
|
} catch {
|
|
1028
|
-
return
|
|
1028
|
+
return Bn;
|
|
1029
1029
|
}
|
|
1030
1030
|
};
|
|
1031
|
-
var
|
|
1032
|
-
var
|
|
1031
|
+
var Wn = { kind: `all` };
|
|
1032
|
+
var Gn = () => {
|
|
1033
1033
|
let e6, t2 = false;
|
|
1034
1034
|
try {
|
|
1035
1035
|
e6 = f(Rn).currentUrl;
|
|
1036
1036
|
} catch {
|
|
1037
1037
|
t2 = true;
|
|
1038
1038
|
}
|
|
1039
|
-
let n2 = c(() =>
|
|
1040
|
-
return t2 ?
|
|
1041
|
-
};
|
|
1042
|
-
var
|
|
1043
|
-
var
|
|
1044
|
-
var
|
|
1045
|
-
var
|
|
1046
|
-
var
|
|
1047
|
-
var
|
|
1048
|
-
var
|
|
1049
|
-
var
|
|
1039
|
+
let n2 = c(() => Un(e6), [e6]);
|
|
1040
|
+
return t2 ? Wn : n2;
|
|
1041
|
+
};
|
|
1042
|
+
var Kn = R(`seo/seo-service`);
|
|
1043
|
+
var qn = R(`@wix/site-service-rendering-context`);
|
|
1044
|
+
var Jn = R(`@wix/viewer-service-multilingual`);
|
|
1045
|
+
var Yn = `https://static.wixstatic.com/media/`;
|
|
1046
|
+
var Xn = `wix:image://`;
|
|
1047
|
+
var Zn = 1200;
|
|
1048
|
+
var Qn = 800;
|
|
1049
|
+
var $n = (e6) => {
|
|
1050
1050
|
if (!e6) return;
|
|
1051
1051
|
let t2 = Number.parseInt(e6, 10);
|
|
1052
1052
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
1053
1053
|
};
|
|
1054
|
-
var
|
|
1055
|
-
if (!e6.startsWith(
|
|
1054
|
+
var er = (e6) => {
|
|
1055
|
+
if (!e6.startsWith(Xn)) {
|
|
1056
1056
|
let t3 = e6.split(/[?#]/)[0];
|
|
1057
1057
|
return t3 ? { uri: t3 } : void 0;
|
|
1058
1058
|
}
|
|
1059
1059
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
1060
1060
|
if (!r2) return;
|
|
1061
1061
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
1062
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
1062
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: $n(a2.get(`originWidth`)), height: $n(a2.get(`originHeight`)) };
|
|
1063
1063
|
};
|
|
1064
|
-
var
|
|
1064
|
+
var tr = (e6, t2) => {
|
|
1065
1065
|
if (!e6) return;
|
|
1066
|
-
let n2 =
|
|
1066
|
+
let n2 = er(e6);
|
|
1067
1067
|
if (!n2) return;
|
|
1068
1068
|
let r2 = n2.name ?? n2.uri;
|
|
1069
|
-
return { uri: n2.uri, url: `${
|
|
1069
|
+
return { uri: n2.uri, url: `${Yn}${n2.uri}`, name: r2, width: n2.width ?? Zn, height: n2.height ?? Qn, alt: t2 ?? r2 };
|
|
1070
1070
|
};
|
|
1071
|
-
var
|
|
1071
|
+
var nr = (e6) => {
|
|
1072
1072
|
let t2 = e6?.media?.wixMedia?.image;
|
|
1073
1073
|
if (!t2) return;
|
|
1074
|
-
let n2 =
|
|
1074
|
+
let n2 = er(t2);
|
|
1075
1075
|
if (!n2) return;
|
|
1076
1076
|
let r2 = n2.name ?? n2.uri;
|
|
1077
|
-
return { uri: n2.uri, url: `${
|
|
1077
|
+
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 };
|
|
1078
1078
|
};
|
|
1079
|
-
var
|
|
1080
|
-
var
|
|
1081
|
-
var
|
|
1082
|
-
var
|
|
1079
|
+
var rr = `14bcded7-0066-7c35-14d7-466cb3f09103`;
|
|
1080
|
+
var ir = `builder-post`;
|
|
1081
|
+
var ar = `__blog_unknown_section__`;
|
|
1082
|
+
var or = (e6) => {
|
|
1083
1083
|
let t2;
|
|
1084
1084
|
try {
|
|
1085
|
-
let n3 = e6.appSectionRelativeUrl(
|
|
1086
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`,
|
|
1087
|
-
t2 = e6.appSectionRelativeUrl(
|
|
1085
|
+
let n3 = e6.appSectionRelativeUrl(rr, ir);
|
|
1086
|
+
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, ar) && !n3?.endsWith(`/post-page`)) return;
|
|
1087
|
+
t2 = e6.appSectionRelativeUrl(rr, ir, true);
|
|
1088
1088
|
} catch {
|
|
1089
1089
|
return;
|
|
1090
1090
|
}
|
|
@@ -1092,12 +1092,12 @@ var ar = (e6) => {
|
|
|
1092
1092
|
let n2 = t2.split(`/`).filter(Boolean);
|
|
1093
1093
|
return n2[n2.length - 1] === `post-page` && n2.pop(), n2.length > 0 ? n2.join(`/`) : void 0;
|
|
1094
1094
|
};
|
|
1095
|
-
var
|
|
1096
|
-
var
|
|
1097
|
-
let t2 =
|
|
1098
|
-
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${
|
|
1095
|
+
var sr = (e6) => `${e6}/${zn}`;
|
|
1096
|
+
var cr = (e6) => {
|
|
1097
|
+
let t2 = or(e6);
|
|
1098
|
+
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${sr(t2)}`;
|
|
1099
1099
|
};
|
|
1100
|
-
var
|
|
1100
|
+
var lr = (e6, t2) => {
|
|
1101
1101
|
if (!e6 || !t2) return;
|
|
1102
1102
|
let n2;
|
|
1103
1103
|
try {
|
|
@@ -1111,14 +1111,14 @@ var cr = (e6, t2) => {
|
|
|
1111
1111
|
if (r2.endsWith(t3) && i2.endsWith(`/post`)) return `${n2.origin}${i2}`;
|
|
1112
1112
|
}
|
|
1113
1113
|
};
|
|
1114
|
-
var
|
|
1114
|
+
var ur = (e6) => {
|
|
1115
1115
|
if (!e6) return;
|
|
1116
1116
|
if (typeof e6 == `string`) return e6;
|
|
1117
1117
|
let { base: t2, path: n2 } = e6;
|
|
1118
1118
|
return t2 ? `${t2.replace(/\/+$/, ``)}${n2 ?? ``}` : void 0;
|
|
1119
1119
|
};
|
|
1120
|
-
var
|
|
1121
|
-
let n2 =
|
|
1120
|
+
var dr = (e6, t2) => {
|
|
1121
|
+
let n2 = ur(e6.url), r2 = `/${zn}`;
|
|
1122
1122
|
if (!n2 || !t2?.endsWith(r2)) return;
|
|
1123
1123
|
let i2, a2;
|
|
1124
1124
|
try {
|
|
@@ -1129,23 +1129,23 @@ var ur = (e6, t2) => {
|
|
|
1129
1129
|
let o2 = a2.slice(0, -r2.length);
|
|
1130
1130
|
return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
|
|
1131
1131
|
};
|
|
1132
|
-
var
|
|
1133
|
-
let n2 =
|
|
1132
|
+
var fr = (e6, t2) => {
|
|
1133
|
+
let n2 = dr(e6, t2);
|
|
1134
1134
|
if (n2) return { href: n2, target: `_self` };
|
|
1135
1135
|
if (t2 && e6.slug) return { href: `${t2}/${encodeURIComponent(e6.slug)}`, target: `_self` };
|
|
1136
|
-
let r2 =
|
|
1136
|
+
let r2 = ur(e6.url);
|
|
1137
1137
|
return r2 ? { href: r2, target: `_self` } : void 0;
|
|
1138
1138
|
};
|
|
1139
|
-
var
|
|
1140
|
-
var
|
|
1141
|
-
var
|
|
1139
|
+
var pr = `https://static.wixstatic.com/media/`;
|
|
1140
|
+
var mr = 100;
|
|
1141
|
+
var hr = (e6, t2 = ``) => {
|
|
1142
1142
|
let n2 = e6?.profile?.photo;
|
|
1143
1143
|
if (!n2?.url) return;
|
|
1144
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
1145
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
1144
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(pr) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
1145
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || mr, height: n2.height || mr, alt: r2 ?? t2 };
|
|
1146
1146
|
};
|
|
1147
|
-
var
|
|
1148
|
-
var
|
|
1147
|
+
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 }]);
|
|
1148
|
+
var _r = (e6, t2) => {
|
|
1149
1149
|
try {
|
|
1150
1150
|
let n2 = new URL(t2 ?? ``).searchParams.get(`lang`);
|
|
1151
1151
|
if (!n2) return e6;
|
|
@@ -1155,180 +1155,180 @@ var gr = (e6, t2) => {
|
|
|
1155
1155
|
return e6;
|
|
1156
1156
|
}
|
|
1157
1157
|
};
|
|
1158
|
-
var
|
|
1159
|
-
var
|
|
1158
|
+
var vr = { totalPages: 1, currentPage: 1 };
|
|
1159
|
+
var yr = (e6) => {
|
|
1160
1160
|
if (e6) try {
|
|
1161
1161
|
let t2 = new URL(e6);
|
|
1162
|
-
return
|
|
1162
|
+
return _r(`${t2.origin}${t2.pathname.replace(/\/+$/, ``)}`, e6);
|
|
1163
1163
|
} catch {
|
|
1164
1164
|
return;
|
|
1165
1165
|
}
|
|
1166
1166
|
};
|
|
1167
|
-
var
|
|
1168
|
-
let i2 = e6.label ?? ``, a2 =
|
|
1169
|
-
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:
|
|
1167
|
+
var br = (e6, t2, n2, r2) => {
|
|
1168
|
+
let i2 = e6.label ?? ``, a2 = tr(e6.coverImage, i2);
|
|
1169
|
+
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) } };
|
|
1170
1170
|
};
|
|
1171
|
-
var
|
|
1171
|
+
var xr = (e6) => {
|
|
1172
1172
|
if (!e6) return;
|
|
1173
1173
|
let t2 = new Date(e6);
|
|
1174
1174
|
return Number.isNaN(t2.getTime()) ? void 0 : t2.toISOString();
|
|
1175
1175
|
};
|
|
1176
|
-
var
|
|
1176
|
+
var Sr = (e6, t2, n2, r2) => {
|
|
1177
1177
|
let i2 = e6.label ?? ``;
|
|
1178
1178
|
return { tag: { name: i2, title: i2, fullUrl: t2, listItems: n2.flatMap((e7) => {
|
|
1179
|
-
let t3 =
|
|
1179
|
+
let t3 = fr(e7, r2)?.href;
|
|
1180
1180
|
return t3 ? [`${t3.replace(/\/+$/, ``)}/`] : [];
|
|
1181
|
-
}), items: { numberOfItems: n2.length }, created:
|
|
1181
|
+
}), 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 } };
|
|
1182
1182
|
};
|
|
1183
|
-
var
|
|
1184
|
-
var
|
|
1183
|
+
var Cr = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
1184
|
+
var wr = (e6) => {
|
|
1185
1185
|
try {
|
|
1186
1186
|
return e6.getMonitoringClient?.() ?? null;
|
|
1187
1187
|
} catch {
|
|
1188
1188
|
return null;
|
|
1189
1189
|
}
|
|
1190
1190
|
};
|
|
1191
|
-
var
|
|
1192
|
-
function
|
|
1193
|
-
let o2 =
|
|
1191
|
+
var Tr = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
1192
|
+
function Er(e6, t2, { feature: n2, action: r2, level: i2 = `error`, contexts: a2 }) {
|
|
1193
|
+
let o2 = Tr(e6, `captureException`);
|
|
1194
1194
|
if (!o2) return;
|
|
1195
1195
|
let s2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
1196
1196
|
o2.captureException(s2, { level: i2, tags: { feature: n2, action: r2 }, ...a2 ? { contexts: a2 } : {} });
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1199
|
-
let a2 =
|
|
1198
|
+
function Dr(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
1199
|
+
let a2 = Tr(e6, `startSpanManual`);
|
|
1200
1200
|
if (!a2) return i2;
|
|
1201
1201
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
1202
1202
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
1203
1203
|
}
|
|
1204
|
-
var
|
|
1205
|
-
var
|
|
1204
|
+
var Or = /* @__PURE__ */ new WeakSet();
|
|
1205
|
+
var kr = (e6, t2, n2, r2) => {
|
|
1206
1206
|
let i2;
|
|
1207
1207
|
try {
|
|
1208
|
-
i2 = { seo: f(
|
|
1208
|
+
i2 = { seo: f(Kn), url: f(Rn), renderingContext: f(qn) };
|
|
1209
1209
|
} catch {
|
|
1210
1210
|
return;
|
|
1211
1211
|
}
|
|
1212
1212
|
let a2;
|
|
1213
1213
|
try {
|
|
1214
|
-
a2 = f(
|
|
1214
|
+
a2 = f(Jn).locales;
|
|
1215
1215
|
} catch {
|
|
1216
1216
|
}
|
|
1217
|
-
if (
|
|
1218
|
-
let o2 =
|
|
1219
|
-
o2 && (e6.kind === `category` && t2.filterCategory ? (
|
|
1220
|
-
|
|
1221
|
-
})) : e6.kind === `tag` && t2.filterTag && (
|
|
1222
|
-
|
|
1217
|
+
if (Or.has(t2) || e6.kind === `all` || !i2.renderingContext.SSR) return;
|
|
1218
|
+
let o2 = yr(i2.url.currentUrl);
|
|
1219
|
+
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) => {
|
|
1220
|
+
Er(r2, t3, { feature: Cr.seo, action: `set-category-seo-entity`, contexts: { seo: { slug: e6.kind === `category` ? e6.slug : void 0 } } });
|
|
1221
|
+
})) : 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) => {
|
|
1222
|
+
Er(r2, t3, { feature: Cr.seo, action: `set-tag-seo-entity`, contexts: { seo: { slug: e6.kind === `tag` ? e6.slug : void 0 } } });
|
|
1223
1223
|
})));
|
|
1224
1224
|
};
|
|
1225
|
-
var
|
|
1226
|
-
function
|
|
1225
|
+
var Ar = 1e4;
|
|
1226
|
+
function jr(e6) {
|
|
1227
1227
|
let [t2, n2] = u(void 0);
|
|
1228
1228
|
return s(() => {
|
|
1229
1229
|
let t3 = Date.now();
|
|
1230
|
-
t3 - e6 >
|
|
1230
|
+
t3 - e6 > Ar && i(() => n2(t3));
|
|
1231
1231
|
}, []), t2 ?? e6;
|
|
1232
1232
|
}
|
|
1233
|
-
var
|
|
1233
|
+
var Mr = () => {
|
|
1234
1234
|
try {
|
|
1235
|
-
return f(
|
|
1235
|
+
return f(qn).SSR;
|
|
1236
1236
|
} catch {
|
|
1237
1237
|
return false;
|
|
1238
1238
|
}
|
|
1239
1239
|
};
|
|
1240
|
-
var
|
|
1241
|
-
function
|
|
1240
|
+
var Nr = (e6, t2) => e6.length === t2.length && e6.every((e7, n2) => Object.is(e7, t2[n2]));
|
|
1241
|
+
function Pr(e6, t2) {
|
|
1242
1242
|
let [n2, r2] = u(() => ({ deps: t2, value: e6() }));
|
|
1243
1243
|
return s(() => {
|
|
1244
|
-
if (
|
|
1244
|
+
if (Nr(n2.deps, t2)) return;
|
|
1245
1245
|
let a2 = e6();
|
|
1246
1246
|
i(() => r2({ deps: t2, value: a2 }));
|
|
1247
1247
|
}, t2), n2.value;
|
|
1248
1248
|
}
|
|
1249
|
-
var
|
|
1249
|
+
var Fr = (e6) => {
|
|
1250
1250
|
let t2;
|
|
1251
1251
|
try {
|
|
1252
1252
|
t2 = f(Rn);
|
|
1253
1253
|
} catch {
|
|
1254
1254
|
return;
|
|
1255
1255
|
}
|
|
1256
|
-
return
|
|
1256
|
+
return cr(t2) ?? lr(t2.currentUrl, e6);
|
|
1257
1257
|
};
|
|
1258
|
-
var
|
|
1259
|
-
var
|
|
1260
|
-
var
|
|
1258
|
+
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` };
|
|
1259
|
+
var Lr = (e6) => `${e6} rendered`;
|
|
1260
|
+
var Rr = (e6, t2, n2) => {
|
|
1261
1261
|
s(() => {
|
|
1262
1262
|
if (t2 !== `loading` && typeof performance < `u` && typeof performance.mark == `function`) try {
|
|
1263
|
-
performance.mark(
|
|
1263
|
+
performance.mark(Lr(e6), { detail: { state: t2, compId: n2 } });
|
|
1264
1264
|
} catch {
|
|
1265
1265
|
}
|
|
1266
1266
|
}, [e6, t2, n2]);
|
|
1267
1267
|
};
|
|
1268
|
-
var
|
|
1269
|
-
var
|
|
1270
|
-
var
|
|
1268
|
+
var zr = R(`@wix/site-service-locale`);
|
|
1269
|
+
var Br = R(`@wix/site-service-renderer-configuration`);
|
|
1270
|
+
var Vr = () => {
|
|
1271
1271
|
let e6, t2;
|
|
1272
1272
|
try {
|
|
1273
|
-
e6 = f(
|
|
1273
|
+
e6 = f(Br).languageCode;
|
|
1274
1274
|
} catch {
|
|
1275
1275
|
}
|
|
1276
1276
|
try {
|
|
1277
|
-
t2 = f(
|
|
1277
|
+
t2 = f(zr).language;
|
|
1278
1278
|
} catch {
|
|
1279
1279
|
}
|
|
1280
1280
|
return e6 || t2;
|
|
1281
1281
|
};
|
|
1282
|
-
var
|
|
1282
|
+
var Hr = () => {
|
|
1283
1283
|
try {
|
|
1284
|
-
let { locale: e6, language: t2 } = f(
|
|
1284
|
+
let { locale: e6, language: t2 } = f(zr);
|
|
1285
1285
|
return e6 || t2;
|
|
1286
1286
|
} catch {
|
|
1287
1287
|
return;
|
|
1288
1288
|
}
|
|
1289
1289
|
};
|
|
1290
|
-
var
|
|
1291
|
-
var
|
|
1290
|
+
var Ur = R(`@wix/site-service-editor-context`);
|
|
1291
|
+
var Wr = () => {
|
|
1292
1292
|
try {
|
|
1293
|
-
return !!f(
|
|
1293
|
+
return !!f(Ur).previewMode;
|
|
1294
1294
|
} catch {
|
|
1295
1295
|
return false;
|
|
1296
1296
|
}
|
|
1297
1297
|
};
|
|
1298
|
-
var
|
|
1299
|
-
var
|
|
1300
|
-
var
|
|
1301
|
-
var
|
|
1298
|
+
var Gr = n({ isEditor: false, isPreview: false });
|
|
1299
|
+
var Kr = () => o(Gr);
|
|
1300
|
+
var qr = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
1301
|
+
var Jr = () => {
|
|
1302
1302
|
try {
|
|
1303
|
-
let { SSR: e6, SEO: t2 } = f(
|
|
1303
|
+
let { SSR: e6, SEO: t2 } = f(qn);
|
|
1304
1304
|
return e6 || t2;
|
|
1305
1305
|
} catch {
|
|
1306
1306
|
return false;
|
|
1307
1307
|
}
|
|
1308
1308
|
};
|
|
1309
|
-
var
|
|
1310
|
-
let e6 =
|
|
1311
|
-
return Kr(
|
|
1309
|
+
var Yr = () => {
|
|
1310
|
+
let e6 = Jr();
|
|
1311
|
+
return qr(Kr()) && !e6;
|
|
1312
1312
|
};
|
|
1313
|
-
function
|
|
1313
|
+
function Xr(e6) {
|
|
1314
1314
|
return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function Zr(e6) {
|
|
1317
1317
|
return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function Qr(e6) {
|
|
1320
1320
|
return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1323
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...
|
|
1322
|
+
function z(e6, t2) {
|
|
1323
|
+
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]] };
|
|
1324
1324
|
}
|
|
1325
|
-
function
|
|
1326
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...
|
|
1325
|
+
function $r(e6, t2) {
|
|
1326
|
+
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]] };
|
|
1327
1327
|
}
|
|
1328
|
-
function
|
|
1329
|
-
if (e6 !== void 0 && Object.keys(e6).length !== 0) return
|
|
1328
|
+
function ei(e6) {
|
|
1329
|
+
if (e6 !== void 0 && Object.keys(e6).length !== 0) return Qr(e6) ? e6.$not : { $not: e6 };
|
|
1330
1330
|
}
|
|
1331
|
-
var
|
|
1331
|
+
var ti = class {
|
|
1332
1332
|
_items;
|
|
1333
1333
|
_fetchNextPage;
|
|
1334
1334
|
_fetchPrevPage;
|
|
@@ -1358,7 +1358,7 @@ var ei = class {
|
|
|
1358
1358
|
return await this._fetchPrevPage();
|
|
1359
1359
|
}
|
|
1360
1360
|
};
|
|
1361
|
-
var
|
|
1361
|
+
var ni = class extends ti {
|
|
1362
1362
|
_nextCursor;
|
|
1363
1363
|
_prevCursor;
|
|
1364
1364
|
cursors;
|
|
@@ -1372,7 +1372,7 @@ var ti = class extends ei {
|
|
|
1372
1372
|
return !!this._prevCursor;
|
|
1373
1373
|
}
|
|
1374
1374
|
};
|
|
1375
|
-
var
|
|
1375
|
+
var ri = class extends ti {
|
|
1376
1376
|
_totalCount;
|
|
1377
1377
|
_offset;
|
|
1378
1378
|
_tooManyToCount;
|
|
@@ -1395,76 +1395,76 @@ var ni = class extends ei {
|
|
|
1395
1395
|
return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
|
|
1396
1396
|
}
|
|
1397
1397
|
};
|
|
1398
|
-
function
|
|
1398
|
+
function ii(e6) {
|
|
1399
1399
|
let t2 = (n2) => ({ query: n2, async find() {
|
|
1400
1400
|
try {
|
|
1401
|
-
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [
|
|
1401
|
+
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);
|
|
1402
1402
|
if (e6.pagingMethod === `OFFSET`) {
|
|
1403
1403
|
let e7 = n2;
|
|
1404
|
-
return new
|
|
1404
|
+
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 });
|
|
1405
1405
|
}
|
|
1406
1406
|
let s2 = n2.cursorPaging;
|
|
1407
|
-
return new
|
|
1407
|
+
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 });
|
|
1408
1408
|
} catch (t3) {
|
|
1409
1409
|
throw e6.errorTransformer(t3);
|
|
1410
1410
|
}
|
|
1411
1411
|
}, skipTo(e7) {
|
|
1412
1412
|
return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
|
|
1413
1413
|
}, eq(r2, i2) {
|
|
1414
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
1415
|
-
return t2({ ...n2, filter:
|
|
1414
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [B(e6.transformationPaths, r2)]: a2 };
|
|
1415
|
+
return t2({ ...n2, filter: z(n2.filter, o2) });
|
|
1416
1416
|
}, ne(r2, i2) {
|
|
1417
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
1418
|
-
return t2({ ...n2, filter:
|
|
1417
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [B(e6.transformationPaths, r2)]: { $ne: a2 } };
|
|
1418
|
+
return t2({ ...n2, filter: z(n2.filter, o2) });
|
|
1419
1419
|
}, ge(r2, i2) {
|
|
1420
|
-
let a2 = { [
|
|
1421
|
-
return t2({ ...n2, filter:
|
|
1420
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $gte: i2 } };
|
|
1421
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1422
1422
|
}, gt(r2, i2) {
|
|
1423
|
-
let a2 = { [
|
|
1424
|
-
return t2({ ...n2, filter:
|
|
1423
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $gt: i2 } };
|
|
1424
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1425
1425
|
}, le(r2, i2) {
|
|
1426
|
-
let a2 = { [
|
|
1427
|
-
return t2({ ...n2, filter:
|
|
1426
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $lte: i2 } };
|
|
1427
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1428
1428
|
}, lt(r2, i2) {
|
|
1429
|
-
let a2 = { [
|
|
1430
|
-
return t2({ ...n2, filter:
|
|
1429
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $lt: i2 } };
|
|
1430
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1431
1431
|
}, isNotEmpty(e7) {
|
|
1432
1432
|
return this.ne(e7, null);
|
|
1433
1433
|
}, isEmpty(e7) {
|
|
1434
1434
|
return this.eq(e7, null);
|
|
1435
1435
|
}, startsWith(r2, i2) {
|
|
1436
|
-
let a2 = { [
|
|
1437
|
-
return t2({ ...n2, filter:
|
|
1436
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $startsWith: i2 } };
|
|
1437
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1438
1438
|
}, endsWith(r2, i2) {
|
|
1439
|
-
let a2 = { [
|
|
1440
|
-
return t2({ ...n2, filter:
|
|
1439
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $endsWith: i2 } };
|
|
1440
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1441
1441
|
}, contains(r2, i2) {
|
|
1442
|
-
let a2 = { [
|
|
1443
|
-
return t2({ ...n2, filter:
|
|
1442
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $contains: i2 } };
|
|
1443
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1444
1444
|
}, hasSome(r2, ...i2) {
|
|
1445
|
-
let a2 = { [
|
|
1446
|
-
return t2({ ...n2, filter:
|
|
1445
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
1446
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1447
1447
|
}, hasAll(r2, ...i2) {
|
|
1448
|
-
let a2 = { [
|
|
1449
|
-
return t2({ ...n2, filter:
|
|
1448
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
1449
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1450
1450
|
}, between(e7, t3, n3) {
|
|
1451
1451
|
return this.ge(e7, t3).lt(e7, n3);
|
|
1452
1452
|
}, in(r2, i2) {
|
|
1453
|
-
let a2 = { [
|
|
1454
|
-
return t2({ ...n2, filter:
|
|
1453
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $in: i2 } };
|
|
1454
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1455
1455
|
}, exists(r2, i2 = true) {
|
|
1456
|
-
let a2 = { [
|
|
1457
|
-
return t2({ ...n2, filter:
|
|
1456
|
+
let a2 = { [B(e6.transformationPaths, r2)]: { $exists: i2 } };
|
|
1457
|
+
return t2({ ...n2, filter: z(n2.filter, a2) });
|
|
1458
1458
|
}, or(e7) {
|
|
1459
|
-
return t2({ ...n2, filter:
|
|
1459
|
+
return t2({ ...n2, filter: $r(n2.filter, e7.query.filter) });
|
|
1460
1460
|
}, and(e7) {
|
|
1461
|
-
return t2({ ...n2, filter:
|
|
1461
|
+
return t2({ ...n2, filter: z(n2.filter, e7.query.filter) });
|
|
1462
1462
|
}, not(e7) {
|
|
1463
|
-
return t2({ ...n2, filter:
|
|
1463
|
+
return t2({ ...n2, filter: ei(e7.query.filter) });
|
|
1464
1464
|
}, ascending(...r2) {
|
|
1465
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
1465
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: B(e6.transformationPaths, t3), order: `ASC` }))] });
|
|
1466
1466
|
}, descending(...r2) {
|
|
1467
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
1467
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: B(e6.transformationPaths, t3), order: `DESC` }))] });
|
|
1468
1468
|
}, skip(e7) {
|
|
1469
1469
|
return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
|
|
1470
1470
|
}, limit(r2) {
|
|
@@ -1477,127 +1477,127 @@ function ri(e6) {
|
|
|
1477
1477
|
} });
|
|
1478
1478
|
return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1480
|
+
function B(e6, t2) {
|
|
1481
1481
|
let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
|
|
1482
|
-
return n2 ? t2.replace(n2, e6[n2]) :
|
|
1483
|
-
}
|
|
1484
|
-
var
|
|
1485
|
-
var
|
|
1486
|
-
var
|
|
1487
|
-
var
|
|
1488
|
-
var
|
|
1489
|
-
var
|
|
1490
|
-
function
|
|
1482
|
+
return n2 ? t2.replace(n2, e6[n2]) : Xe(t2, { ...e6, ...Ye });
|
|
1483
|
+
}
|
|
1484
|
+
var ai = `filter`;
|
|
1485
|
+
var oi = `sort`;
|
|
1486
|
+
var si = `cursorPaging`;
|
|
1487
|
+
var ci = `paging`;
|
|
1488
|
+
var li = [ai, oi, si];
|
|
1489
|
+
var ui = [ai, oi, ci];
|
|
1490
|
+
function di(e6, t2) {
|
|
1491
1491
|
return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
|
|
1492
1492
|
}
|
|
1493
|
-
function di(e6) {
|
|
1494
|
-
return ui(e6, ci);
|
|
1495
|
-
}
|
|
1496
1493
|
function fi(e6) {
|
|
1497
|
-
return
|
|
1494
|
+
return di(e6, li);
|
|
1498
1495
|
}
|
|
1499
1496
|
function pi(e6) {
|
|
1497
|
+
return di(e6, ui);
|
|
1498
|
+
}
|
|
1499
|
+
function mi(e6) {
|
|
1500
1500
|
let { hasOptionsParameter: t2 } = e6;
|
|
1501
1501
|
return function(...n2) {
|
|
1502
|
-
return t2 ?
|
|
1502
|
+
return t2 ? gi(n2, e6) : hi(n2, e6);
|
|
1503
1503
|
};
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1505
|
+
function hi(e6, t2) {
|
|
1506
1506
|
return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1508
|
+
function gi(e6, t2) {
|
|
1509
1509
|
switch (e6.length) {
|
|
1510
1510
|
case 0:
|
|
1511
1511
|
return t2.builderQueryFunction();
|
|
1512
1512
|
case 1:
|
|
1513
|
-
return
|
|
1513
|
+
return fi(e6[0]) || pi(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
|
|
1514
1514
|
default:
|
|
1515
1515
|
return t2.typedQueryFunction(e6[0], e6[1]);
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
1518
|
-
function
|
|
1518
|
+
function V(e6) {
|
|
1519
1519
|
if (!e6) return;
|
|
1520
1520
|
let t2 = ``;
|
|
1521
1521
|
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;
|
|
1522
1522
|
}
|
|
1523
|
-
function
|
|
1523
|
+
function H(e6) {
|
|
1524
1524
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
1525
1525
|
}
|
|
1526
|
-
var
|
|
1527
|
-
var
|
|
1528
|
-
var
|
|
1529
|
-
var
|
|
1530
|
-
var
|
|
1531
|
-
function
|
|
1526
|
+
var _i = [{ path: `category.updatedDate` }, { path: `category.coverImage.urlExpirationDate` }];
|
|
1527
|
+
var vi = [{ path: `category.coverImage.focalPoint.x` }, { path: `category.coverImage.focalPoint.y` }];
|
|
1528
|
+
var yi = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
1529
|
+
var bi = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
1530
|
+
var xi = [{ path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
1531
|
+
function Si(e6) {
|
|
1532
1532
|
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: `` }] } }));
|
|
1533
1533
|
}
|
|
1534
|
-
var
|
|
1535
|
-
function
|
|
1534
|
+
var Ci = `@wix/auto_sdk_blog_categories`;
|
|
1535
|
+
function wi(e6) {
|
|
1536
1536
|
function t2({ host: t3 }) {
|
|
1537
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.GetCategory`, packageName:
|
|
1537
|
+
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 }]) };
|
|
1538
1538
|
}
|
|
1539
1539
|
return t2;
|
|
1540
1540
|
}
|
|
1541
|
-
function
|
|
1541
|
+
function Ti(e6) {
|
|
1542
1542
|
function t2({ host: t3 }) {
|
|
1543
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.GetCategoryBySlug`, packageName:
|
|
1543
|
+
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 }]) };
|
|
1544
1544
|
}
|
|
1545
1545
|
return t2;
|
|
1546
1546
|
}
|
|
1547
|
-
function
|
|
1547
|
+
function Ei(e6) {
|
|
1548
1548
|
function t2({ host: t3 }) {
|
|
1549
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName:
|
|
1549
|
+
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 }]) };
|
|
1550
1550
|
}
|
|
1551
1551
|
return t2;
|
|
1552
1552
|
}
|
|
1553
|
-
function
|
|
1553
|
+
function Di(e6) {
|
|
1554
1554
|
function t2({ host: t3 }) {
|
|
1555
|
-
let n2 =
|
|
1556
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.QueryCategories`, packageName:
|
|
1555
|
+
let n2 = N(e6, [{ transformFn: an, paths: xi }]);
|
|
1556
|
+
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 }]) };
|
|
1557
1557
|
}
|
|
1558
1558
|
return t2;
|
|
1559
1559
|
}
|
|
1560
|
-
var
|
|
1561
|
-
var
|
|
1562
|
-
var
|
|
1563
|
-
var
|
|
1564
|
-
async function
|
|
1565
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
1560
|
+
var Oi = [{ path: `category.url` }, { path: `category.translations.url` }];
|
|
1561
|
+
var ki = [{ path: `category.coverImage` }];
|
|
1562
|
+
var Ai = [{ path: `categories.url` }, { path: `categories.translations.url` }];
|
|
1563
|
+
var ji = [{ path: `categories.coverImage` }];
|
|
1564
|
+
async function Mi(e6, t2) {
|
|
1565
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = wi(A({ categoryId: e6, fieldsets: t2?.fieldsets }));
|
|
1566
1566
|
r2?.onSiteCall?.();
|
|
1567
1567
|
try {
|
|
1568
1568
|
let e7 = await n2.request(i2);
|
|
1569
|
-
return r2?.onSuccess?.(e7),
|
|
1569
|
+
return r2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: Oi }, { transformFn: V, paths: ki }]));
|
|
1570
1570
|
} catch (e7) {
|
|
1571
|
-
let t3 =
|
|
1571
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { categoryId: `$[0]`, fieldsets: `$[1].fieldsets` }, singleArgumentUnchanged: false }, [`categoryId`, `options`]);
|
|
1572
1572
|
throw r2?.onError?.(e7), t3;
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
|
-
async function
|
|
1576
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
1575
|
+
async function Ni(e6, t2) {
|
|
1576
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ti(A({ slug: e6, fieldsets: t2?.fieldsets, language: t2?.language }));
|
|
1577
1577
|
r2?.onSiteCall?.();
|
|
1578
1578
|
try {
|
|
1579
1579
|
let e7 = await n2.request(i2);
|
|
1580
|
-
return r2?.onSuccess?.(e7),
|
|
1580
|
+
return r2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: Oi }, { transformFn: V, paths: ki }]));
|
|
1581
1581
|
} catch (e7) {
|
|
1582
|
-
let t3 =
|
|
1582
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fieldsets: `$[1].fieldsets`, language: `$[1].language` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
|
|
1583
1583
|
throw r2?.onError?.(e7), t3;
|
|
1584
1584
|
}
|
|
1585
1585
|
}
|
|
1586
|
-
async function
|
|
1587
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
1586
|
+
async function Pi(e6) {
|
|
1587
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Ei(A({ paging: e6?.paging, fieldsets: e6?.fieldsets, language: e6?.language }));
|
|
1588
1588
|
n2?.onSiteCall?.();
|
|
1589
1589
|
try {
|
|
1590
1590
|
let e7 = await t2.request(r2);
|
|
1591
|
-
return n2?.onSuccess?.(e7),
|
|
1591
|
+
return n2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: Ai }, { transformFn: V, paths: ji }]));
|
|
1592
1592
|
} catch (e7) {
|
|
1593
|
-
let t3 =
|
|
1593
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
1594
1594
|
throw n2?.onError?.(e7), t3;
|
|
1595
1595
|
}
|
|
1596
1596
|
}
|
|
1597
|
-
function
|
|
1597
|
+
function Fi(e6) {
|
|
1598
1598
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
1599
|
-
return
|
|
1600
|
-
let i2 =
|
|
1599
|
+
return ii({ func: async (r2) => {
|
|
1600
|
+
let i2 = Di({ ...r2, ...e6 ?? {} });
|
|
1601
1601
|
n2?.onSiteCall?.();
|
|
1602
1602
|
try {
|
|
1603
1603
|
let e7 = await t2.request(i2);
|
|
@@ -1607,52 +1607,52 @@ function Pi(e6) {
|
|
|
1607
1607
|
}
|
|
1608
1608
|
}, requestTransformer: (t3) => {
|
|
1609
1609
|
let n3 = [t3, e6];
|
|
1610
|
-
return
|
|
1610
|
+
return A({ ...n3?.[1], query: n3?.[0] });
|
|
1611
1611
|
}, responseTransformer: ({ data: e7 }) => {
|
|
1612
|
-
let t3 =
|
|
1612
|
+
let t3 = j(N(e7, [{ transformFn: H, paths: Ai }, { transformFn: V, paths: ji }]));
|
|
1613
1613
|
return { items: t3?.categories, pagingMetadata: t3?.pagingMetadata };
|
|
1614
1614
|
}, errorTransformer: (e7) => {
|
|
1615
|
-
throw
|
|
1615
|
+
throw P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
1616
1616
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
1617
1617
|
}
|
|
1618
|
-
async function
|
|
1619
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
1618
|
+
async function Ii(e6, t2) {
|
|
1619
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Di(A({ query: e6, ...t2 }));
|
|
1620
1620
|
r2?.onSiteCall?.();
|
|
1621
1621
|
try {
|
|
1622
1622
|
let e7 = await n2.request(i2);
|
|
1623
|
-
return r2?.onSuccess?.(e7),
|
|
1623
|
+
return r2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: Ai }, { transformFn: V, paths: ji }]));
|
|
1624
1624
|
} catch (e7) {
|
|
1625
|
-
let t3 =
|
|
1625
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
1626
1626
|
throw r2?.onError?.(e7), t3;
|
|
1627
1627
|
}
|
|
1628
1628
|
}
|
|
1629
|
-
function Ii(e6) {
|
|
1630
|
-
return (t2, n2) => ji(t2, n2, { httpClient: e6 });
|
|
1631
|
-
}
|
|
1632
1629
|
function Li(e6) {
|
|
1633
1630
|
return (t2, n2) => Mi(t2, n2, { httpClient: e6 });
|
|
1634
1631
|
}
|
|
1635
1632
|
function Ri(e6) {
|
|
1636
|
-
return (t2) => Ni(t2, { httpClient: e6 });
|
|
1633
|
+
return (t2, n2) => Ni(t2, n2, { httpClient: e6 });
|
|
1637
1634
|
}
|
|
1638
1635
|
function zi(e6) {
|
|
1639
1636
|
return (t2) => Pi(t2, { httpClient: e6 });
|
|
1640
1637
|
}
|
|
1641
1638
|
function Bi(e6) {
|
|
1642
|
-
return (t2
|
|
1639
|
+
return (t2) => Fi(t2, { httpClient: e6 });
|
|
1643
1640
|
}
|
|
1644
1641
|
function Vi(e6) {
|
|
1645
|
-
|
|
1642
|
+
return (t2, n2) => Ii(t2, n2, { httpClient: e6 });
|
|
1643
|
+
}
|
|
1644
|
+
function Hi(e6) {
|
|
1645
|
+
let t2 = mi({ builderQueryFunction: (t3) => Bi(e6)(t3), typedQueryFunction: (t3, n3) => Vi(e6)(t3, n3), hasOptionsParameter: true });
|
|
1646
1646
|
function n2(e7, n3) {
|
|
1647
1647
|
return t2(...arguments);
|
|
1648
1648
|
}
|
|
1649
1649
|
return n2;
|
|
1650
1650
|
}
|
|
1651
|
-
var
|
|
1652
|
-
var
|
|
1653
|
-
var
|
|
1654
|
-
var
|
|
1655
|
-
function
|
|
1651
|
+
var Ui = F(Li);
|
|
1652
|
+
var Wi = F(Ri);
|
|
1653
|
+
var Gi = F(zi);
|
|
1654
|
+
var Ki = F(Hi);
|
|
1655
|
+
function qi(e6) {
|
|
1656
1656
|
if (!e6) return;
|
|
1657
1657
|
let t2 = ``;
|
|
1658
1658
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -1667,46 +1667,46 @@ function Ki(e6) {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
1669
1669
|
}
|
|
1670
|
-
var
|
|
1671
|
-
var
|
|
1672
|
-
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` }];
|
|
1673
|
-
var
|
|
1674
|
-
function
|
|
1670
|
+
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` }];
|
|
1671
|
+
var Yi = [{ path: `posts.richContentCompressed` }];
|
|
1672
|
+
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` }];
|
|
1673
|
+
var Zi = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
1674
|
+
function Qi(e6) {
|
|
1675
1675
|
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` }] } }));
|
|
1676
1676
|
}
|
|
1677
|
-
var
|
|
1678
|
-
function
|
|
1677
|
+
var $i = `@wix/auto_sdk_blog_posts`;
|
|
1678
|
+
function ea(e6) {
|
|
1679
1679
|
function t2({ host: t3 }) {
|
|
1680
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName:
|
|
1680
|
+
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 }]) };
|
|
1681
1681
|
}
|
|
1682
1682
|
return t2;
|
|
1683
1683
|
}
|
|
1684
|
-
function
|
|
1684
|
+
function ta(e6) {
|
|
1685
1685
|
function t2({ host: t3 }) {
|
|
1686
|
-
let n2 =
|
|
1687
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
1686
|
+
let n2 = N(e6, [{ transformFn: an, paths: Zi }]);
|
|
1687
|
+
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 }]) };
|
|
1688
1688
|
}
|
|
1689
1689
|
return t2;
|
|
1690
1690
|
}
|
|
1691
|
-
var
|
|
1692
|
-
var
|
|
1693
|
-
var
|
|
1694
|
-
var
|
|
1695
|
-
async function
|
|
1696
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
1691
|
+
var na = [{ path: `posts.url` }, { path: `posts.translations.url` }];
|
|
1692
|
+
var ra = [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }];
|
|
1693
|
+
var ia = [{ path: `posts.media.wixMedia.videoV2` }];
|
|
1694
|
+
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 || {});
|
|
1695
|
+
async function aa(e6) {
|
|
1696
|
+
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 }, []));
|
|
1697
1697
|
n2?.onSiteCall?.();
|
|
1698
1698
|
try {
|
|
1699
1699
|
let e7 = await t2.request(r2);
|
|
1700
|
-
return n2?.onSuccess?.(e7),
|
|
1700
|
+
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`]);
|
|
1701
1701
|
} catch (e7) {
|
|
1702
|
-
let t3 =
|
|
1702
|
+
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`]);
|
|
1703
1703
|
throw n2?.onError?.(e7), t3;
|
|
1704
1704
|
}
|
|
1705
1705
|
}
|
|
1706
|
-
function
|
|
1706
|
+
function oa(e6) {
|
|
1707
1707
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
1708
|
-
return
|
|
1709
|
-
let i2 =
|
|
1708
|
+
return ii({ func: async (r2) => {
|
|
1709
|
+
let i2 = ta({ ...r2, ...e6 ?? {} });
|
|
1710
1710
|
n2?.onSiteCall?.();
|
|
1711
1711
|
try {
|
|
1712
1712
|
let e7 = await t2.request(i2);
|
|
@@ -1716,78 +1716,78 @@ function aa(e6) {
|
|
|
1716
1716
|
}
|
|
1717
1717
|
}, requestTransformer: (t3) => {
|
|
1718
1718
|
let n3 = [t3, e6];
|
|
1719
|
-
return
|
|
1719
|
+
return A({ ...n3?.[1], query: n3?.[0] }, []);
|
|
1720
1720
|
}, responseTransformer: ({ data: e7 }) => {
|
|
1721
|
-
let t3 =
|
|
1721
|
+
let t3 = j(N(e7, [{ transformFn: H, paths: na }, { transformFn: V, paths: ra }, { transformFn: qi, paths: ia }]), [`posts.richContent`, `posts.rich_content`]);
|
|
1722
1722
|
return { items: t3?.posts, pagingMetadata: t3?.pagingMetadata };
|
|
1723
1723
|
}, errorTransformer: (e7) => {
|
|
1724
|
-
throw
|
|
1724
|
+
throw P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
1725
1725
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
1726
1726
|
}
|
|
1727
|
-
async function
|
|
1728
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
1727
|
+
async function sa(e6, t2) {
|
|
1728
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = ta(A({ query: e6, ...t2 }, []));
|
|
1729
1729
|
r2?.onSiteCall?.();
|
|
1730
1730
|
try {
|
|
1731
1731
|
let e7 = await n2.request(i2);
|
|
1732
|
-
return r2?.onSuccess?.(e7),
|
|
1732
|
+
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`]);
|
|
1733
1733
|
} catch (e7) {
|
|
1734
|
-
let t3 =
|
|
1734
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
1735
1735
|
throw r2?.onError?.(e7), t3;
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
1738
|
-
function sa(e6) {
|
|
1739
|
-
return (t2) => ia(t2, { httpClient: e6 });
|
|
1740
|
-
}
|
|
1741
1738
|
function ca(e6) {
|
|
1742
1739
|
return (t2) => aa(t2, { httpClient: e6 });
|
|
1743
1740
|
}
|
|
1744
1741
|
function la(e6) {
|
|
1745
|
-
return (t2
|
|
1742
|
+
return (t2) => oa(t2, { httpClient: e6 });
|
|
1746
1743
|
}
|
|
1747
1744
|
function ua(e6) {
|
|
1748
|
-
|
|
1745
|
+
return (t2, n2) => sa(t2, n2, { httpClient: e6 });
|
|
1746
|
+
}
|
|
1747
|
+
function da(e6) {
|
|
1748
|
+
let t2 = mi({ builderQueryFunction: (t3) => la(e6)(t3), typedQueryFunction: (t3, n3) => ua(e6)(t3, n3), hasOptionsParameter: true });
|
|
1749
1749
|
function n2(e7, n3) {
|
|
1750
1750
|
return t2(...arguments);
|
|
1751
1751
|
}
|
|
1752
1752
|
return n2;
|
|
1753
1753
|
}
|
|
1754
|
-
var
|
|
1755
|
-
var
|
|
1756
|
-
var
|
|
1757
|
-
function
|
|
1754
|
+
var fa = F(ca);
|
|
1755
|
+
var pa = F(da);
|
|
1756
|
+
var ma = [{ path: `tag.createdDate` }, { path: `tag.updatedDate` }];
|
|
1757
|
+
function ha(e6) {
|
|
1758
1758
|
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` }] } }));
|
|
1759
1759
|
}
|
|
1760
|
-
var
|
|
1761
|
-
function
|
|
1760
|
+
var ga = `@wix/auto_sdk_blog_tags`;
|
|
1761
|
+
function _a(e6) {
|
|
1762
1762
|
function t2({ host: t3 }) {
|
|
1763
|
-
return { entityFqdn: `wix.blog.v3.tag`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.TagService.GetTagBySlug`, packageName:
|
|
1763
|
+
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 }]) };
|
|
1764
1764
|
}
|
|
1765
1765
|
return t2;
|
|
1766
1766
|
}
|
|
1767
|
-
var
|
|
1768
|
-
async function
|
|
1769
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
1767
|
+
var va = [{ path: `tag.url` }];
|
|
1768
|
+
async function ya(e6, t2) {
|
|
1769
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = _a(A({ slug: e6, fieldsets: t2?.fieldsets, language: t2?.language }));
|
|
1770
1770
|
r2?.onSiteCall?.();
|
|
1771
1771
|
try {
|
|
1772
1772
|
let e7 = await n2.request(i2);
|
|
1773
|
-
return r2?.onSuccess?.(e7),
|
|
1773
|
+
return r2?.onSuccess?.(e7), j(N(e7.data, [{ transformFn: H, paths: va }]));
|
|
1774
1774
|
} catch (e7) {
|
|
1775
|
-
let t3 =
|
|
1775
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fieldsets: `$[1].fieldsets`, language: `$[1].language` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
|
|
1776
1776
|
throw r2?.onError?.(e7), t3;
|
|
1777
1777
|
}
|
|
1778
1778
|
}
|
|
1779
|
-
function
|
|
1780
|
-
return (t2, n2) =>
|
|
1779
|
+
function ba(e6) {
|
|
1780
|
+
return (t2, n2) => ya(t2, n2, { httpClient: e6 });
|
|
1781
1781
|
}
|
|
1782
|
-
var
|
|
1783
|
-
var
|
|
1782
|
+
var xa = F(ba);
|
|
1783
|
+
var Sa = () => {
|
|
1784
1784
|
try {
|
|
1785
1785
|
return f(Rn).currentUrl;
|
|
1786
1786
|
} catch {
|
|
1787
1787
|
return;
|
|
1788
1788
|
}
|
|
1789
1789
|
};
|
|
1790
|
-
var
|
|
1790
|
+
var Ca = (e6, t2) => {
|
|
1791
1791
|
let n2;
|
|
1792
1792
|
try {
|
|
1793
1793
|
n2 = new URL(e6);
|
|
@@ -1797,24 +1797,24 @@ var Sa = (e6, t2) => {
|
|
|
1797
1797
|
let r2 = n2.pathname.split(`/`).filter(Boolean);
|
|
1798
1798
|
if (r2.length !== 0) return r2[r2.length - 1] = encodeURIComponent(t2), n2.pathname = `/${r2.join(`/`)}`, n2.toString();
|
|
1799
1799
|
};
|
|
1800
|
-
var
|
|
1801
|
-
let r2 =
|
|
1800
|
+
var wa = (e6, t2, n2) => {
|
|
1801
|
+
let r2 = Sa(), i2 = Yr(), a2 = Wr(), { language: o2, translationId: c2 } = e6 ?? {}, l2 = !!(t2 && c2 && o2 && o2 !== t2);
|
|
1802
1802
|
s(() => {
|
|
1803
1803
|
if (!l2 || !t2 || !c2 || !r2 || i2 || a2) return;
|
|
1804
1804
|
let e7 = false;
|
|
1805
1805
|
return n2(c2, t2).then((t3) => {
|
|
1806
|
-
let n3 = t3 &&
|
|
1806
|
+
let n3 = t3 && Ca(r2, t3);
|
|
1807
1807
|
!e7 && n3 && n3 !== r2 && window.location.assign(n3);
|
|
1808
1808
|
}), () => {
|
|
1809
1809
|
e7 = true;
|
|
1810
1810
|
};
|
|
1811
1811
|
}, [l2, t2, c2, r2, i2, a2, n2]);
|
|
1812
1812
|
};
|
|
1813
|
-
var
|
|
1814
|
-
function
|
|
1815
|
-
let e6 =
|
|
1813
|
+
var Ta = R(`@wix/site-service-warmup-data`);
|
|
1814
|
+
function Ea() {
|
|
1815
|
+
let e6 = Mr(), t2 = null;
|
|
1816
1816
|
try {
|
|
1817
|
-
t2 = d()(
|
|
1817
|
+
t2 = d()(Ta);
|
|
1818
1818
|
} catch {
|
|
1819
1819
|
}
|
|
1820
1820
|
return c(() => ({ isServer: e6, scope: t2 ?? void 0, get: async (n2) => {
|
|
@@ -1831,13 +1831,13 @@ function Ta() {
|
|
|
1831
1831
|
}
|
|
1832
1832
|
} }), [e6, t2]);
|
|
1833
1833
|
}
|
|
1834
|
-
var
|
|
1834
|
+
var Da = () => {
|
|
1835
1835
|
let e6 = /* @__PURE__ */ new Map();
|
|
1836
1836
|
return { getOrInsert: (t2, n2) => (e6.has(t2) || e6.set(t2, n2().finally(() => {
|
|
1837
1837
|
e6.delete(t2);
|
|
1838
1838
|
})), e6.get(t2)) };
|
|
1839
1839
|
};
|
|
1840
|
-
var
|
|
1840
|
+
var Oa = async (e6) => {
|
|
1841
1841
|
try {
|
|
1842
1842
|
let { default: t2 } = await e6();
|
|
1843
1843
|
return t2;
|
|
@@ -1845,9 +1845,9 @@ var Da = async (e6) => {
|
|
|
1845
1845
|
return;
|
|
1846
1846
|
}
|
|
1847
1847
|
};
|
|
1848
|
-
var
|
|
1849
|
-
let r2 =
|
|
1850
|
-
let [i3, a2] = await Promise.all([
|
|
1848
|
+
var ka = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
1849
|
+
let r2 = Da(), i2 = async (r3) => {
|
|
1850
|
+
let [i3, a2] = await Promise.all([Oa(() => t2(r3)), !e6 || !n2 ? void 0 : Oa(() => n2(r3))]);
|
|
1851
1851
|
if (i3 && a2) return { ...i3, ...a2 };
|
|
1852
1852
|
if (i3) return i3;
|
|
1853
1853
|
if (a2) return a2;
|
|
@@ -1855,61 +1855,61 @@ var Oa = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
|
1855
1855
|
};
|
|
1856
1856
|
return (e7) => r2.getOrInsert(e7, () => i2(e7));
|
|
1857
1857
|
};
|
|
1858
|
-
var
|
|
1859
|
-
var
|
|
1858
|
+
var W = (e6) => typeof e6 == `string`;
|
|
1859
|
+
var Aa = () => {
|
|
1860
1860
|
let e6, t2, n2 = new Promise((n3, r2) => {
|
|
1861
1861
|
e6 = n3, t2 = r2;
|
|
1862
1862
|
});
|
|
1863
1863
|
return n2.resolve = e6, n2.reject = t2, n2;
|
|
1864
1864
|
};
|
|
1865
|
-
var
|
|
1866
|
-
var
|
|
1865
|
+
var ja = (e6) => e6 == null ? `` : String(e6);
|
|
1866
|
+
var Ma = (e6, t2, n2) => {
|
|
1867
1867
|
e6.forEach((e7) => {
|
|
1868
1868
|
t2[e7] && (n2[e7] = t2[e7]);
|
|
1869
1869
|
});
|
|
1870
1870
|
};
|
|
1871
|
-
var
|
|
1872
|
-
var
|
|
1873
|
-
var
|
|
1874
|
-
var
|
|
1875
|
-
let r2 =
|
|
1871
|
+
var Na = /###/g;
|
|
1872
|
+
var Pa = (e6) => e6 && e6.includes(`###`) ? e6.replace(Na, `.`) : e6;
|
|
1873
|
+
var Fa = (e6) => !e6 || W(e6);
|
|
1874
|
+
var Ia = (e6, t2, n2) => {
|
|
1875
|
+
let r2 = W(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
1876
1876
|
for (; i2 < r2.length - 1; ) {
|
|
1877
|
-
if (
|
|
1878
|
-
let t3 =
|
|
1877
|
+
if (Fa(e6)) return {};
|
|
1878
|
+
let t3 = Pa(r2[i2]);
|
|
1879
1879
|
!e6[t3] && n2 && (e6[t3] = new n2()), e6 = Object.prototype.hasOwnProperty.call(e6, t3) ? e6[t3] : {}, ++i2;
|
|
1880
1880
|
}
|
|
1881
|
-
return
|
|
1881
|
+
return Fa(e6) ? {} : { obj: e6, k: Pa(r2[i2]) };
|
|
1882
1882
|
};
|
|
1883
|
-
var
|
|
1884
|
-
let { obj: r2, k: i2 } =
|
|
1883
|
+
var La = (e6, t2, n2) => {
|
|
1884
|
+
let { obj: r2, k: i2 } = Ia(e6, t2, Object);
|
|
1885
1885
|
if (r2 !== void 0 || t2.length === 1) {
|
|
1886
1886
|
r2[i2] = n2;
|
|
1887
1887
|
return;
|
|
1888
1888
|
}
|
|
1889
|
-
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 =
|
|
1890
|
-
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 =
|
|
1889
|
+
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = Ia(e6, o2, Object);
|
|
1890
|
+
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);
|
|
1891
1891
|
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
1892
1892
|
};
|
|
1893
|
-
var
|
|
1894
|
-
let { obj: i2, k: a2 } =
|
|
1893
|
+
var Ra = (e6, t2, n2, r2) => {
|
|
1894
|
+
let { obj: i2, k: a2 } = Ia(e6, t2, Object);
|
|
1895
1895
|
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
1896
1896
|
};
|
|
1897
|
-
var
|
|
1898
|
-
let { obj: n2, k: r2 } =
|
|
1897
|
+
var za = (e6, t2) => {
|
|
1898
|
+
let { obj: n2, k: r2 } = Ia(e6, t2);
|
|
1899
1899
|
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
1900
1900
|
};
|
|
1901
|
-
var za = (e6, t2, n2) => {
|
|
1902
|
-
let r2 = Ra(e6, n2);
|
|
1903
|
-
return r2 === void 0 ? Ra(t2, n2) : r2;
|
|
1904
|
-
};
|
|
1905
1901
|
var Ba = (e6, t2, n2) => {
|
|
1906
|
-
|
|
1902
|
+
let r2 = za(e6, n2);
|
|
1903
|
+
return r2 === void 0 ? za(t2, n2) : r2;
|
|
1904
|
+
};
|
|
1905
|
+
var Va = (e6, t2, n2) => {
|
|
1906
|
+
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]);
|
|
1907
1907
|
return e6;
|
|
1908
1908
|
};
|
|
1909
|
-
var
|
|
1910
|
-
var
|
|
1911
|
-
var
|
|
1912
|
-
var
|
|
1909
|
+
var G = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
1910
|
+
var Ha = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
1911
|
+
var Ua = (e6) => W(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Ha[e7]) : e6;
|
|
1912
|
+
var Wa = class {
|
|
1913
1913
|
constructor(e6) {
|
|
1914
1914
|
this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
1915
1915
|
}
|
|
@@ -1920,20 +1920,20 @@ var Ua = class {
|
|
|
1920
1920
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
|
|
1921
1921
|
}
|
|
1922
1922
|
};
|
|
1923
|
-
var
|
|
1924
|
-
var
|
|
1925
|
-
var
|
|
1923
|
+
var Ga = [` `, `,`, `?`, `!`, `;`];
|
|
1924
|
+
var Ka = new Wa(20);
|
|
1925
|
+
var qa = (e6, t2, n2) => {
|
|
1926
1926
|
t2 ||= ``, n2 ||= ``;
|
|
1927
|
-
let r2 =
|
|
1927
|
+
let r2 = Ga.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
|
|
1928
1928
|
if (r2.length === 0) return true;
|
|
1929
|
-
let i2 =
|
|
1929
|
+
let i2 = Ka.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
|
|
1930
1930
|
if (!a2) {
|
|
1931
1931
|
let t3 = e6.indexOf(n2);
|
|
1932
1932
|
t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
|
|
1933
1933
|
}
|
|
1934
1934
|
return a2;
|
|
1935
1935
|
};
|
|
1936
|
-
var
|
|
1936
|
+
var Ja = (e6, t2, n2 = `.`) => {
|
|
1937
1937
|
if (!e6) return;
|
|
1938
1938
|
if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
|
|
1939
1939
|
let r2 = t2.split(n2), i2 = e6;
|
|
@@ -1949,8 +1949,8 @@ var qa = (e6, t2, n2 = `.`) => {
|
|
|
1949
1949
|
}
|
|
1950
1950
|
return i2;
|
|
1951
1951
|
};
|
|
1952
|
-
var
|
|
1953
|
-
var
|
|
1952
|
+
var Ya = (e6) => e6?.replace(/_/g, `-`);
|
|
1953
|
+
var Xa = { type: `logger`, log(e6) {
|
|
1954
1954
|
this.output(`log`, e6);
|
|
1955
1955
|
}, warn(e6) {
|
|
1956
1956
|
this.output(`warn`, e6);
|
|
@@ -1959,12 +1959,12 @@ var Ya = { type: `logger`, log(e6) {
|
|
|
1959
1959
|
}, output(e6, t2) {
|
|
1960
1960
|
console?.[e6]?.apply?.(console, t2);
|
|
1961
1961
|
} };
|
|
1962
|
-
var
|
|
1962
|
+
var K = new class e2 {
|
|
1963
1963
|
constructor(e6, t2 = {}) {
|
|
1964
1964
|
this.init(e6, t2);
|
|
1965
1965
|
}
|
|
1966
1966
|
init(e6, t2 = {}) {
|
|
1967
|
-
this.prefix = t2.prefix || `i18next:`, this.logger = e6 ||
|
|
1967
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e6 || Xa, this.options = t2, this.debug = t2.debug;
|
|
1968
1968
|
}
|
|
1969
1969
|
log(...e6) {
|
|
1970
1970
|
return this.forward(e6, `log`, ``, true);
|
|
@@ -1979,7 +1979,7 @@ var q = new class e2 {
|
|
|
1979
1979
|
return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
|
|
1980
1980
|
}
|
|
1981
1981
|
forward(e6, t2, n2, r2) {
|
|
1982
|
-
return r2 && !this.debug ? null : (e6 = e6.map((e7) =>
|
|
1982
|
+
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));
|
|
1983
1983
|
}
|
|
1984
1984
|
create(t2) {
|
|
1985
1985
|
return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
|
|
@@ -1988,7 +1988,7 @@ var q = new class e2 {
|
|
|
1988
1988
|
return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
|
|
1989
1989
|
}
|
|
1990
1990
|
}();
|
|
1991
|
-
var
|
|
1991
|
+
var Za = class {
|
|
1992
1992
|
constructor() {
|
|
1993
1993
|
this.observers = {};
|
|
1994
1994
|
}
|
|
@@ -2016,8 +2016,8 @@ var Xa = class {
|
|
|
2016
2016
|
});
|
|
2017
2017
|
}
|
|
2018
2018
|
};
|
|
2019
|
-
var
|
|
2020
|
-
var
|
|
2019
|
+
var Qa = /* @__PURE__ */ new WeakSet();
|
|
2020
|
+
var $a = class extends Za {
|
|
2021
2021
|
constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
2022
2022
|
super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
2023
2023
|
}
|
|
@@ -2030,23 +2030,23 @@ var Qa = class extends Xa {
|
|
|
2030
2030
|
}
|
|
2031
2031
|
getResource(e6, t2, n2, r2 = {}) {
|
|
2032
2032
|
let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
|
|
2033
|
-
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) :
|
|
2034
|
-
let s2 =
|
|
2035
|
-
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !
|
|
2033
|
+
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)));
|
|
2034
|
+
let s2 = za(this.data, o2);
|
|
2035
|
+
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);
|
|
2036
2036
|
}
|
|
2037
2037
|
addResource(e6, t2, n2, r2, i2 = { silent: false }) {
|
|
2038
2038
|
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
|
|
2039
|
-
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2),
|
|
2039
|
+
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);
|
|
2040
2040
|
}
|
|
2041
2041
|
addResources(e6, t2, n2, r2 = { silent: false }) {
|
|
2042
|
-
for (let r3 in n2) (
|
|
2042
|
+
for (let r3 in n2) (W(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
|
|
2043
2043
|
r2.silent || this.emit(`added`, e6, t2, n2);
|
|
2044
2044
|
}
|
|
2045
2045
|
addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
|
|
2046
2046
|
let o2 = [e6, t2];
|
|
2047
2047
|
e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
|
|
2048
|
-
let s2 =
|
|
2049
|
-
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ?
|
|
2048
|
+
let s2 = za(this.data, o2) || {};
|
|
2049
|
+
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);
|
|
2050
2050
|
}
|
|
2051
2051
|
removeResourceBundle(e6, t2) {
|
|
2052
2052
|
this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
|
|
@@ -2064,37 +2064,37 @@ var Qa = class extends Xa {
|
|
|
2064
2064
|
let t2 = this.getDataByLanguage(e6);
|
|
2065
2065
|
return !!(t2 && Object.keys(t2) || []).find((e7) => {
|
|
2066
2066
|
let n2 = t2[e7];
|
|
2067
|
-
return
|
|
2067
|
+
return Qa.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && Qa.add(n2), true);
|
|
2068
2068
|
});
|
|
2069
2069
|
}
|
|
2070
2070
|
toJSON() {
|
|
2071
2071
|
return this.data;
|
|
2072
2072
|
}
|
|
2073
2073
|
};
|
|
2074
|
-
var
|
|
2074
|
+
var eo = { processors: {}, addPostProcessor(e6) {
|
|
2075
2075
|
this.processors[e6.name] = e6;
|
|
2076
2076
|
}, handle(e6, t2, n2, r2, i2) {
|
|
2077
2077
|
return e6.forEach((e7) => {
|
|
2078
2078
|
t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
|
|
2079
2079
|
}), t2;
|
|
2080
2080
|
} };
|
|
2081
|
-
var
|
|
2082
|
-
function
|
|
2081
|
+
var to = Symbol(`i18next/PATH_KEY`);
|
|
2082
|
+
function no() {
|
|
2083
2083
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
2084
|
-
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 ===
|
|
2084
|
+
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;
|
|
2085
2085
|
}
|
|
2086
|
-
function
|
|
2087
|
-
let { [
|
|
2086
|
+
function ro(e6, t2) {
|
|
2087
|
+
let { [to]: n2 } = e6(no()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
2088
2088
|
if (n2.length > 1 && i2) {
|
|
2089
2089
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
2090
2090
|
if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
2091
2091
|
}
|
|
2092
2092
|
return n2.join(r2);
|
|
2093
2093
|
}
|
|
2094
|
-
var
|
|
2095
|
-
var
|
|
2094
|
+
var io = (e6) => !W(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
2095
|
+
var ao = class e3 extends Za {
|
|
2096
2096
|
constructor(e6, t2 = {}) {
|
|
2097
|
-
super(),
|
|
2097
|
+
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 = {};
|
|
2098
2098
|
}
|
|
2099
2099
|
changeLanguage(e6) {
|
|
2100
2100
|
e6 && (this.language = e6);
|
|
@@ -2104,33 +2104,33 @@ var io = class e3 extends Xa {
|
|
|
2104
2104
|
if (e6 == null) return false;
|
|
2105
2105
|
let r2 = this.resolve(e6, n2);
|
|
2106
2106
|
if (r2?.res === void 0) return false;
|
|
2107
|
-
let i2 =
|
|
2107
|
+
let i2 = io(r2.res);
|
|
2108
2108
|
return !(n2.returnObjects === false && i2);
|
|
2109
2109
|
}
|
|
2110
2110
|
extractFromKey(e6, t2) {
|
|
2111
2111
|
let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
|
|
2112
2112
|
n2 === void 0 && (n2 = `:`);
|
|
2113
|
-
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 && !
|
|
2113
|
+
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);
|
|
2114
2114
|
if (a2 && !o2) {
|
|
2115
2115
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
2116
|
-
if (t3 && t3.length > 0) return { key: e6, namespaces:
|
|
2116
|
+
if (t3 && t3.length > 0) return { key: e6, namespaces: W(i2) ? [i2] : i2 };
|
|
2117
2117
|
let a3 = e6.split(n2);
|
|
2118
2118
|
(n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
|
|
2119
2119
|
}
|
|
2120
|
-
return { key: e6, namespaces:
|
|
2120
|
+
return { key: e6, namespaces: W(i2) ? [i2] : i2 };
|
|
2121
2121
|
}
|
|
2122
2122
|
translate(t2, n2, r2) {
|
|
2123
2123
|
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
2124
2124
|
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
2125
|
-
typeof t2 == `function` && (t2 =
|
|
2125
|
+
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));
|
|
2126
2126
|
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;
|
|
2127
2127
|
u2 === void 0 && (u2 = `:`);
|
|
2128
2128
|
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
2129
2129
|
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;
|
|
2130
|
-
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 && !
|
|
2130
|
+
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;
|
|
2131
2131
|
y2 && !m2 && x2 && (E2 = T2);
|
|
2132
|
-
let ee2 =
|
|
2133
|
-
if (y2 && E2 && ee2 && !_2.includes(D2) && !(
|
|
2132
|
+
let ee2 = io(E2), D2 = Object.prototype.toString.apply(E2);
|
|
2133
|
+
if (y2 && E2 && ee2 && !_2.includes(D2) && !(W(v2) && Array.isArray(E2))) {
|
|
2134
2134
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
2135
2135
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
2136
2136
|
let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, E2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
|
|
@@ -2140,11 +2140,11 @@ var io = class e3 extends Xa {
|
|
|
2140
2140
|
let e6 = Array.isArray(E2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
|
|
2141
2141
|
for (let e7 in E2) if (Object.prototype.hasOwnProperty.call(E2, e7)) {
|
|
2142
2142
|
let r3 = `${n3}${o2}${e7}`;
|
|
2143
|
-
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue:
|
|
2143
|
+
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]);
|
|
2144
2144
|
}
|
|
2145
2145
|
m2 = t3;
|
|
2146
2146
|
}
|
|
2147
|
-
} else if (y2 &&
|
|
2147
|
+
} else if (y2 && W(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
|
|
2148
2148
|
else {
|
|
2149
2149
|
let e6 = false, n3 = false;
|
|
2150
2150
|
!this.isValidLookup(m2) && x2 && (e6 = true, m2 = T2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
|
|
@@ -2176,30 +2176,30 @@ var io = class e3 extends Xa {
|
|
|
2176
2176
|
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 });
|
|
2177
2177
|
else if (!n2.skipInterpolation) {
|
|
2178
2178
|
n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
|
|
2179
|
-
let a3 =
|
|
2179
|
+
let a3 = W(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
|
|
2180
2180
|
if (a3) {
|
|
2181
2181
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
2182
2182
|
o3 = t3 && t3.length;
|
|
2183
2183
|
}
|
|
2184
|
-
let s2 = n2.replace && !
|
|
2184
|
+
let s2 = n2.replace && !W(n2.replace) ? n2.replace : n2;
|
|
2185
2185
|
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) {
|
|
2186
2186
|
let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
|
|
2187
2187
|
o3 < r3 && (n2.nest = false);
|
|
2188
2188
|
}
|
|
2189
2189
|
!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();
|
|
2190
2190
|
}
|
|
2191
|
-
let a2 = n2.postProcess || this.options.postProcess, o2 =
|
|
2192
|
-
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 =
|
|
2191
|
+
let a2 = n2.postProcess || this.options.postProcess, o2 = W(a2) ? [a2] : a2;
|
|
2192
|
+
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;
|
|
2193
2193
|
}
|
|
2194
2194
|
resolve(e6, t2 = {}) {
|
|
2195
2195
|
let n2, r2, i2, a2, o2;
|
|
2196
|
-
return
|
|
2196
|
+
return W(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? ro(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
|
|
2197
2197
|
if (this.isValidLookup(n2)) return;
|
|
2198
2198
|
let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
|
|
2199
2199
|
r2 = c2;
|
|
2200
2200
|
let l2 = s2.namespaces;
|
|
2201
2201
|
this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
|
|
2202
|
-
let u2 = t2.count !== void 0 && !
|
|
2202
|
+
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);
|
|
2203
2203
|
l2.forEach((e8) => {
|
|
2204
2204
|
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) => {
|
|
2205
2205
|
if (this.isValidLookup(n2)) return;
|
|
@@ -2228,7 +2228,7 @@ var io = class e3 extends Xa {
|
|
|
2228
2228
|
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
|
|
2229
2229
|
}
|
|
2230
2230
|
getUsedParamsDetails(e6 = {}) {
|
|
2231
|
-
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !
|
|
2231
|
+
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;
|
|
2232
2232
|
if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
|
|
2233
2233
|
r2 = { ...r2 };
|
|
2234
2234
|
for (let e7 of t2) delete r2[e7];
|
|
@@ -2240,25 +2240,25 @@ var io = class e3 extends Xa {
|
|
|
2240
2240
|
return false;
|
|
2241
2241
|
}
|
|
2242
2242
|
};
|
|
2243
|
-
var
|
|
2243
|
+
var oo = class {
|
|
2244
2244
|
constructor(e6) {
|
|
2245
|
-
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger =
|
|
2245
|
+
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = K.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
2246
2246
|
}
|
|
2247
2247
|
clearCache() {
|
|
2248
2248
|
this.resolveHierarchyCache = {};
|
|
2249
2249
|
}
|
|
2250
2250
|
getScriptPartFromCode(e6) {
|
|
2251
|
-
if (e6 =
|
|
2251
|
+
if (e6 = Ya(e6), !e6 || !e6.includes(`-`)) return null;
|
|
2252
2252
|
let t2 = e6.split(`-`);
|
|
2253
2253
|
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
2254
2254
|
}
|
|
2255
2255
|
getLanguagePartFromCode(e6) {
|
|
2256
|
-
if (e6 =
|
|
2256
|
+
if (e6 = Ya(e6), !e6 || !e6.includes(`-`)) return e6;
|
|
2257
2257
|
let t2 = e6.split(`-`);
|
|
2258
2258
|
return this.formatLanguageCode(t2[0]);
|
|
2259
2259
|
}
|
|
2260
2260
|
formatLanguageCode(e6) {
|
|
2261
|
-
if (
|
|
2261
|
+
if (W(e6) && e6.includes(`-`)) {
|
|
2262
2262
|
let t2;
|
|
2263
2263
|
try {
|
|
2264
2264
|
t2 = Intl.getCanonicalLocales(e6)[0];
|
|
@@ -2289,7 +2289,7 @@ var ao = class {
|
|
|
2289
2289
|
}
|
|
2290
2290
|
getFallbackCodes(e6, t2) {
|
|
2291
2291
|
if (!e6) return [];
|
|
2292
|
-
if (typeof e6 == `function` && (e6 = e6(t2)),
|
|
2292
|
+
if (typeof e6 == `function` && (e6 = e6(t2)), W(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
|
|
2293
2293
|
if (!t2) return e6.default || [];
|
|
2294
2294
|
let n2 = e6[t2];
|
|
2295
2295
|
return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
|
|
@@ -2297,7 +2297,7 @@ var ao = class {
|
|
|
2297
2297
|
toResolveHierarchy(e6, t2) {
|
|
2298
2298
|
let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
|
|
2299
2299
|
r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
|
|
2300
|
-
let i2 = t2 === void 0 || t2 === false ||
|
|
2300
|
+
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;
|
|
2301
2301
|
if (o2) {
|
|
2302
2302
|
let n3;
|
|
2303
2303
|
n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
|
|
@@ -2309,29 +2309,30 @@ var ao = class {
|
|
|
2309
2309
|
let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
|
|
2310
2310
|
e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
|
|
2311
2311
|
};
|
|
2312
|
-
return
|
|
2313
|
-
|
|
2312
|
+
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) => {
|
|
2313
|
+
let t3 = this.formatLanguageCode(e7);
|
|
2314
|
+
l2.includes(t3) || u2(t3);
|
|
2314
2315
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
2315
2316
|
}
|
|
2316
2317
|
};
|
|
2317
|
-
var
|
|
2318
|
-
var
|
|
2319
|
-
var
|
|
2318
|
+
var so = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
2319
|
+
var co = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
2320
|
+
var lo = class {
|
|
2320
2321
|
constructor(e6, t2 = {}) {
|
|
2321
|
-
this.languageUtils = e6, this.options = t2, this.logger =
|
|
2322
|
+
this.languageUtils = e6, this.options = t2, this.logger = K.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
2322
2323
|
}
|
|
2323
2324
|
clearCache() {
|
|
2324
2325
|
this.pluralRulesCache = {};
|
|
2325
2326
|
}
|
|
2326
2327
|
getRule(e6, t2 = {}) {
|
|
2327
|
-
let n2 =
|
|
2328
|
+
let n2 = Ya(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
2328
2329
|
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
2329
2330
|
let a2;
|
|
2330
2331
|
try {
|
|
2331
2332
|
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
2332
2333
|
} catch {
|
|
2333
|
-
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`),
|
|
2334
|
-
if (!e6.match(/-|_/)) return
|
|
2334
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), co;
|
|
2335
|
+
if (!e6.match(/-|_/)) return co;
|
|
2335
2336
|
let n3 = this.languageUtils.getLanguagePartFromCode(e6);
|
|
2336
2337
|
a2 = this.getRule(n3, t2);
|
|
2337
2338
|
}
|
|
@@ -2346,26 +2347,26 @@ var co = class {
|
|
|
2346
2347
|
}
|
|
2347
2348
|
getSuffixes(e6, t2 = {}) {
|
|
2348
2349
|
let n2 = this.getRule(e6, t2);
|
|
2349
|
-
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) =>
|
|
2350
|
+
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}`) : [];
|
|
2350
2351
|
}
|
|
2351
2352
|
getSuffix(e6, t2, n2 = {}) {
|
|
2352
2353
|
let r2 = this.getRule(e6, n2);
|
|
2353
2354
|
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));
|
|
2354
2355
|
}
|
|
2355
2356
|
};
|
|
2356
|
-
var
|
|
2357
|
-
let a2 =
|
|
2358
|
-
return !a2 && i2 &&
|
|
2357
|
+
var uo = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
2358
|
+
let a2 = Ba(e6, t2, n2);
|
|
2359
|
+
return !a2 && i2 && W(n2) && (a2 = Ja(e6, n2, r2), a2 === void 0 && (a2 = Ja(t2, n2, r2))), a2;
|
|
2359
2360
|
};
|
|
2360
|
-
var
|
|
2361
|
-
var
|
|
2361
|
+
var fo = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
2362
|
+
var po = class {
|
|
2362
2363
|
constructor(e6 = {}) {
|
|
2363
|
-
this.logger =
|
|
2364
|
+
this.logger = K.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
2364
2365
|
}
|
|
2365
2366
|
init(e6 = {}) {
|
|
2366
2367
|
e6.interpolation ||= { escapeValue: true };
|
|
2367
2368
|
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;
|
|
2368
|
-
this.escape = t2 === void 0 ?
|
|
2369
|
+
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();
|
|
2369
2370
|
}
|
|
2370
2371
|
reset() {
|
|
2371
2372
|
this.options && this.init(this.options);
|
|
@@ -2377,11 +2378,11 @@ var fo = class {
|
|
|
2377
2378
|
interpolate(e6, t2, n2, r2) {
|
|
2378
2379
|
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
|
|
2379
2380
|
if (!e7.includes(this.formatSeparator)) {
|
|
2380
|
-
let i4 =
|
|
2381
|
+
let i4 = uo(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
2381
2382
|
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
|
|
2382
2383
|
}
|
|
2383
2384
|
let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
2384
|
-
return this.format(
|
|
2385
|
+
return this.format(uo(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
2385
2386
|
};
|
|
2386
2387
|
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.`);
|
|
2387
2388
|
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
@@ -2391,15 +2392,15 @@ var fo = class {
|
|
|
2391
2392
|
if (a2 = c2(n3), a2 === void 0) {
|
|
2392
2393
|
if (typeof l2 == `function`) {
|
|
2393
2394
|
let t4 = l2(e6, i2, r2);
|
|
2394
|
-
a2 =
|
|
2395
|
+
a2 = W(t4) ? t4 : ``;
|
|
2395
2396
|
} else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
|
|
2396
2397
|
else if (u2) {
|
|
2397
2398
|
a2 = i2[0];
|
|
2398
2399
|
continue;
|
|
2399
2400
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
2400
|
-
} else !
|
|
2401
|
+
} else !W(a2) && !this.useRawValueToEscape && (a2 = ja(a2));
|
|
2401
2402
|
let s3 = t3.safeValue(a2);
|
|
2402
|
-
if (e6 = e6.replace(i2[0],
|
|
2403
|
+
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;
|
|
2403
2404
|
}
|
|
2404
2405
|
}), e6;
|
|
2405
2406
|
}
|
|
@@ -2407,7 +2408,7 @@ var fo = class {
|
|
|
2407
2408
|
let r2, i2, a2, o2 = (e7, t3) => {
|
|
2408
2409
|
let n3 = this.nestingOptionsSeparator;
|
|
2409
2410
|
if (!e7.includes(n3)) return e7;
|
|
2410
|
-
let r3 = e7.split(RegExp(`${
|
|
2411
|
+
let r3 = e7.split(RegExp(`${G(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
|
|
2411
2412
|
e7 = r3[0], i3 = this.interpolate(i3, a2);
|
|
2412
2413
|
let o3 = i3.match(/'/g), s3 = i3.match(/"/g);
|
|
2413
2414
|
((o3?.length ?? 0) % 2 == 0 && !s3 || (s3?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
|
|
@@ -2420,15 +2421,15 @@ var fo = class {
|
|
|
2420
2421
|
}, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
|
|
2421
2422
|
for (; r2 = s2.exec(e6); ) {
|
|
2422
2423
|
let u2 = [];
|
|
2423
|
-
a2 = { ...n2 }, a2 = a2.replace && !
|
|
2424
|
+
a2 = { ...n2 }, a2 = a2.replace && !W(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
2424
2425
|
let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
2425
|
-
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 && !
|
|
2426
|
-
|
|
2426
|
+
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;
|
|
2427
|
+
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;
|
|
2427
2428
|
}
|
|
2428
2429
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
2429
2430
|
}
|
|
2430
2431
|
};
|
|
2431
|
-
var
|
|
2432
|
+
var mo = (e6) => {
|
|
2432
2433
|
let t2 = e6.toLowerCase().trim(), n2 = {};
|
|
2433
2434
|
if (e6.includes(`(`)) {
|
|
2434
2435
|
let r2 = e6.split(`(`);
|
|
@@ -2443,23 +2444,23 @@ var po = (e6) => {
|
|
|
2443
2444
|
}
|
|
2444
2445
|
return { formatName: t2, formatOptions: n2 };
|
|
2445
2446
|
};
|
|
2446
|
-
var
|
|
2447
|
+
var ho = (e6) => {
|
|
2447
2448
|
let t2 = {};
|
|
2448
2449
|
return (n2, r2, i2) => {
|
|
2449
2450
|
let a2 = i2;
|
|
2450
2451
|
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
2451
2452
|
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
2452
|
-
return s2 || (s2 = e6(
|
|
2453
|
+
return s2 || (s2 = e6(Ya(r2), i2), t2[o2] = s2), s2(n2);
|
|
2453
2454
|
};
|
|
2454
2455
|
};
|
|
2455
|
-
var
|
|
2456
|
-
var
|
|
2456
|
+
var go = (e6) => (t2, n2, r2) => e6(Ya(n2), r2)(t2);
|
|
2457
|
+
var _o = class {
|
|
2457
2458
|
constructor(e6 = {}) {
|
|
2458
|
-
this.logger =
|
|
2459
|
+
this.logger = K.create(`formatter`), this.options = e6, this.init(e6);
|
|
2459
2460
|
}
|
|
2460
2461
|
init(e6, t2 = { interpolation: {} }) {
|
|
2461
2462
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
2462
|
-
let n2 = t2.cacheInBuiltFormats ?
|
|
2463
|
+
let n2 = t2.cacheInBuiltFormats ? ho : go;
|
|
2463
2464
|
this.formats = { number: n2((e7, t3) => {
|
|
2464
2465
|
let n3 = new Intl.NumberFormat(e7, { ...t3 });
|
|
2465
2466
|
return (e8) => n3.format(e8);
|
|
@@ -2481,7 +2482,7 @@ var go = class {
|
|
|
2481
2482
|
this.formats[e6.toLowerCase().trim()] = t2;
|
|
2482
2483
|
}
|
|
2483
2484
|
addCached(e6, t2) {
|
|
2484
|
-
this.formats[e6.toLowerCase().trim()] =
|
|
2485
|
+
this.formats[e6.toLowerCase().trim()] = ho(t2);
|
|
2485
2486
|
}
|
|
2486
2487
|
format(e6, t2, n2, r2 = {}) {
|
|
2487
2488
|
if (!t2 || e6 == null) return e6;
|
|
@@ -2492,7 +2493,7 @@ var go = class {
|
|
|
2492
2493
|
a2.push(t3);
|
|
2493
2494
|
}
|
|
2494
2495
|
return a2.reduce((e7, t3) => {
|
|
2495
|
-
let { formatName: i3, formatOptions: a3 } =
|
|
2496
|
+
let { formatName: i3, formatOptions: a3 } = mo(t3);
|
|
2496
2497
|
if (this.formats[i3]) {
|
|
2497
2498
|
let t4 = e7;
|
|
2498
2499
|
try {
|
|
@@ -2507,12 +2508,12 @@ var go = class {
|
|
|
2507
2508
|
}, e6);
|
|
2508
2509
|
}
|
|
2509
2510
|
};
|
|
2510
|
-
var
|
|
2511
|
+
var vo = (e6, t2) => {
|
|
2511
2512
|
e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
|
|
2512
2513
|
};
|
|
2513
|
-
var
|
|
2514
|
+
var yo = class extends Za {
|
|
2514
2515
|
constructor(e6, t2, n2, r2 = {}) {
|
|
2515
|
-
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger =
|
|
2516
|
+
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);
|
|
2516
2517
|
}
|
|
2517
2518
|
queueLoad(e6, t2, n2, r2) {
|
|
2518
2519
|
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
@@ -2529,7 +2530,7 @@ var vo = class extends Xa {
|
|
|
2529
2530
|
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);
|
|
2530
2531
|
let o2 = {};
|
|
2531
2532
|
this.queue.forEach((n3) => {
|
|
2532
|
-
|
|
2533
|
+
Ra(n3.loaded, [i2], a2), vo(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
|
|
2533
2534
|
o2[e7] || (o2[e7] = {});
|
|
2534
2535
|
let t3 = n3.loaded[e7];
|
|
2535
2536
|
t3.length && t3.forEach((t4) => {
|
|
@@ -2564,7 +2565,7 @@ var vo = class extends Xa {
|
|
|
2564
2565
|
}
|
|
2565
2566
|
prepareLoading(e6, t2, n2 = {}, r2) {
|
|
2566
2567
|
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
2567
|
-
|
|
2568
|
+
W(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), W(t2) && (t2 = [t2]);
|
|
2568
2569
|
let i2 = this.queueLoad(e6, t2, n2, r2);
|
|
2569
2570
|
if (!i2.toLoad.length) return i2.pending.length || r2(), null;
|
|
2570
2571
|
i2.toLoad.forEach((e7) => {
|
|
@@ -2601,9 +2602,9 @@ var vo = class extends Xa {
|
|
|
2601
2602
|
}
|
|
2602
2603
|
}
|
|
2603
2604
|
};
|
|
2604
|
-
var
|
|
2605
|
+
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) => {
|
|
2605
2606
|
let t2 = {};
|
|
2606
|
-
if (typeof e6[1] == `object` && (t2 = e6[1]),
|
|
2607
|
+
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`) {
|
|
2607
2608
|
let n2 = e6[3] || e6[2];
|
|
2608
2609
|
Object.keys(n2).forEach((e7) => {
|
|
2609
2610
|
t2[e7] = n2[e7];
|
|
@@ -2611,17 +2612,17 @@ var yo = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
2611
2612
|
}
|
|
2612
2613
|
return t2;
|
|
2613
2614
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
2614
|
-
var
|
|
2615
|
-
var
|
|
2615
|
+
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);
|
|
2616
|
+
var So = () => {
|
|
2616
2617
|
};
|
|
2617
|
-
var
|
|
2618
|
+
var Co = (e6) => {
|
|
2618
2619
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
|
|
2619
2620
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
2620
2621
|
});
|
|
2621
2622
|
};
|
|
2622
|
-
var
|
|
2623
|
+
var q = class e4 extends Za {
|
|
2623
2624
|
constructor(e6 = {}, t2) {
|
|
2624
|
-
if (super(), this.options =
|
|
2625
|
+
if (super(), this.options = xo(e6), this.services = {}, this.logger = K, this.modules = { external: [] }, Co(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
2625
2626
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
2626
2627
|
setTimeout(() => {
|
|
2627
2628
|
this.init(e6, t2);
|
|
@@ -2629,26 +2630,26 @@ var J = class e4 extends Xa {
|
|
|
2629
2630
|
}
|
|
2630
2631
|
}
|
|
2631
2632
|
init(e6 = {}, t2) {
|
|
2632
|
-
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (
|
|
2633
|
-
let n2 =
|
|
2634
|
-
this.options = { ...n2, ...this.options, ...
|
|
2633
|
+
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]));
|
|
2634
|
+
let n2 = bo();
|
|
2635
|
+
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);
|
|
2635
2636
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
2636
2637
|
if (!this.options.isClone) {
|
|
2637
|
-
this.modules.logger ?
|
|
2638
|
+
this.modules.logger ? K.init(r2(this.modules.logger), this.options) : K.init(null, this.options);
|
|
2638
2639
|
let e7;
|
|
2639
|
-
e7 = this.modules.formatter ? this.modules.formatter :
|
|
2640
|
-
let t3 = new
|
|
2641
|
-
this.store = new
|
|
2640
|
+
e7 = this.modules.formatter ? this.modules.formatter : _o;
|
|
2641
|
+
let t3 = new oo(this.options);
|
|
2642
|
+
this.store = new $a(this.options.resources, this.options);
|
|
2642
2643
|
let n3 = this.services;
|
|
2643
|
-
n3.logger =
|
|
2644
|
+
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) => {
|
|
2644
2645
|
this.emit(e8, ...t4);
|
|
2645
|
-
}), 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
|
|
2646
|
+
}), 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) => {
|
|
2646
2647
|
this.emit(e8, ...t4);
|
|
2647
2648
|
}), this.modules.external.forEach((e8) => {
|
|
2648
2649
|
e8.init && e8.init(this);
|
|
2649
2650
|
});
|
|
2650
2651
|
}
|
|
2651
|
-
if (this.format = this.options.interpolation.format, t2 ||=
|
|
2652
|
+
if (this.format = this.options.interpolation.format, t2 ||= So, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
2652
2653
|
let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
2653
2654
|
e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
|
|
2654
2655
|
}
|
|
@@ -2657,7 +2658,7 @@ var J = class e4 extends Xa {
|
|
|
2657
2658
|
}), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
|
|
2658
2659
|
this[e7] = (...t3) => (this.store[e7](...t3), this);
|
|
2659
2660
|
});
|
|
2660
|
-
let i2 =
|
|
2661
|
+
let i2 = Aa(), a2 = () => {
|
|
2661
2662
|
let e7 = (e8, n3) => {
|
|
2662
2663
|
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);
|
|
2663
2664
|
};
|
|
@@ -2666,8 +2667,8 @@ var J = class e4 extends Xa {
|
|
|
2666
2667
|
};
|
|
2667
2668
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
2668
2669
|
}
|
|
2669
|
-
loadResources(e6, t2 =
|
|
2670
|
-
let n2 = t2, r2 =
|
|
2670
|
+
loadResources(e6, t2 = So) {
|
|
2671
|
+
let n2 = t2, r2 = W(e6) ? e6 : this.language;
|
|
2671
2672
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2672
2673
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
2673
2674
|
let e7 = [], t3 = (t4) => {
|
|
@@ -2681,15 +2682,15 @@ var J = class e4 extends Xa {
|
|
|
2681
2682
|
} else n2(null);
|
|
2682
2683
|
}
|
|
2683
2684
|
reloadResources(e6, t2, n2) {
|
|
2684
|
-
let r2 =
|
|
2685
|
-
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 ||=
|
|
2685
|
+
let r2 = Aa();
|
|
2686
|
+
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) => {
|
|
2686
2687
|
r2.resolve(), n2(e7);
|
|
2687
2688
|
}), r2;
|
|
2688
2689
|
}
|
|
2689
2690
|
use(e6) {
|
|
2690
2691
|
if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
2691
2692
|
if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
2692
|
-
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` &&
|
|
2693
|
+
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;
|
|
2693
2694
|
}
|
|
2694
2695
|
setResolvedLanguage(e6) {
|
|
2695
2696
|
if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
|
|
@@ -2705,7 +2706,7 @@ var J = class e4 extends Xa {
|
|
|
2705
2706
|
}
|
|
2706
2707
|
changeLanguage(e6, t2) {
|
|
2707
2708
|
this.isLanguageChangingTo = e6;
|
|
2708
|
-
let n2 =
|
|
2709
|
+
let n2 = Aa();
|
|
2709
2710
|
this.emit(`languageChanging`, e6);
|
|
2710
2711
|
let r2 = (e7) => {
|
|
2711
2712
|
this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
|
|
@@ -2713,7 +2714,7 @@ var J = class e4 extends Xa {
|
|
|
2713
2714
|
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));
|
|
2714
2715
|
}, a2 = (t3) => {
|
|
2715
2716
|
!e6 && !t3 && this.services.languageDetector && (t3 = []);
|
|
2716
|
-
let n3 =
|
|
2717
|
+
let n3 = W(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(W(t3) ? [t3] : t3);
|
|
2717
2718
|
a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
|
|
2718
2719
|
i2(e7, a3);
|
|
2719
2720
|
});
|
|
@@ -2727,11 +2728,11 @@ var J = class e4 extends Xa {
|
|
|
2727
2728
|
let s2 = o2.ns !== void 0 && o2.ns !== null;
|
|
2728
2729
|
o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
|
|
2729
2730
|
let c2 = { ...this.options, ...o2 };
|
|
2730
|
-
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix =
|
|
2731
|
+
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = ro(o2.keyPrefix, c2));
|
|
2731
2732
|
let l2 = this.options.keySeparator || `.`, u2;
|
|
2732
|
-
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 =
|
|
2733
|
+
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);
|
|
2733
2734
|
};
|
|
2734
|
-
return
|
|
2735
|
+
return W(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
|
|
2735
2736
|
}
|
|
2736
2737
|
t(...e6) {
|
|
2737
2738
|
return this.translator?.translate(...e6);
|
|
@@ -2755,19 +2756,21 @@ var J = class e4 extends Xa {
|
|
|
2755
2756
|
let e7 = t2.precheck(this, a2);
|
|
2756
2757
|
if (e7 !== void 0) return e7;
|
|
2757
2758
|
}
|
|
2758
|
-
|
|
2759
|
+
if (this.hasResourceBundle(n2, e6) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;
|
|
2760
|
+
let { languageUtils: o2 } = this.services, s2 = t2.lng ? o2.isSupportedCode(n2) && o2.toResolveHierarchy(n2, false)[0] : n2;
|
|
2761
|
+
return !(s2 && !a2(s2, e6) || r2 && !a2(i2, e6));
|
|
2759
2762
|
}
|
|
2760
2763
|
loadNamespaces(e6, t2) {
|
|
2761
|
-
let n2 =
|
|
2762
|
-
return this.options.ns ? (
|
|
2764
|
+
let n2 = Aa();
|
|
2765
|
+
return this.options.ns ? (W(e6) && (e6 = [e6]), e6.forEach((e7) => {
|
|
2763
2766
|
this.options.ns.includes(e7) || this.options.ns.push(e7);
|
|
2764
2767
|
}), this.loadResources((e7) => {
|
|
2765
2768
|
n2.resolve(), t2 && t2(e7);
|
|
2766
2769
|
}), n2) : (t2 && t2(), Promise.resolve());
|
|
2767
2770
|
}
|
|
2768
2771
|
loadLanguages(e6, t2) {
|
|
2769
|
-
let n2 =
|
|
2770
|
-
|
|
2772
|
+
let n2 = Aa();
|
|
2773
|
+
W(e6) && (e6 = [e6]);
|
|
2771
2774
|
let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
|
|
2772
2775
|
return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
|
|
2773
2776
|
n2.resolve(), t2 && t2(e7);
|
|
@@ -2783,24 +2786,24 @@ var J = class e4 extends Xa {
|
|
|
2783
2786
|
}
|
|
2784
2787
|
} catch {
|
|
2785
2788
|
}
|
|
2786
|
-
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
|
|
2789
|
+
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());
|
|
2787
2790
|
return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
2788
2791
|
}
|
|
2789
2792
|
static createInstance(t2 = {}, n2) {
|
|
2790
2793
|
let r2 = new e4(t2, n2);
|
|
2791
2794
|
return r2.createInstance = e4.createInstance, r2;
|
|
2792
2795
|
}
|
|
2793
|
-
cloneInstance(t2 = {}, n2 =
|
|
2796
|
+
cloneInstance(t2 = {}, n2 = So) {
|
|
2794
2797
|
let r2 = t2.forkResourceStore;
|
|
2795
2798
|
r2 && delete t2.forkResourceStore;
|
|
2796
|
-
let i2 = { ...this.options, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2799
|
+
let i2 = { ...this.options, preload: false, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2797
2800
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
|
|
2798
2801
|
a2[e6] = this[e6];
|
|
2799
|
-
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new
|
|
2800
|
-
let e6 = { ...
|
|
2801
|
-
a2.services.interpolator = new
|
|
2802
|
+
}), 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) {
|
|
2803
|
+
let e6 = { ...bo().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
|
|
2804
|
+
a2.services.interpolator = new po(n3);
|
|
2802
2805
|
}
|
|
2803
|
-
return a2.translator = new
|
|
2806
|
+
return a2.translator = new ao(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
|
|
2804
2807
|
a2.emit(e6, ...t3);
|
|
2805
2808
|
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
2806
2809
|
}
|
|
@@ -2808,9 +2811,9 @@ var J = class e4 extends Xa {
|
|
|
2808
2811
|
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
2809
2812
|
}
|
|
2810
2813
|
}.createInstance();
|
|
2811
|
-
|
|
2812
|
-
var
|
|
2813
|
-
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 =
|
|
2814
|
+
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;
|
|
2815
|
+
var wo = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2816
|
+
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = q.createInstance(i2 ? s2 : void 0);
|
|
2814
2817
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2815
2818
|
try {
|
|
2816
2819
|
return r3(null, await t2(e7));
|
|
@@ -2819,75 +2822,38 @@ var Co = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
|
|
|
2819
2822
|
}
|
|
2820
2823
|
} }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
|
|
2821
2824
|
};
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
2826
|
-
}
|
|
2827
|
-
function i2() {
|
|
2828
|
-
return !e6 || typeof e6 == `string`;
|
|
2829
|
-
}
|
|
2830
|
-
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
2831
|
-
if (i2()) return {};
|
|
2832
|
-
var o2 = r2(a2.shift());
|
|
2833
|
-
if (wo.indexOf(o2) > -1) return {};
|
|
2834
|
-
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
2835
|
-
}
|
|
2836
|
-
if (i2()) return {};
|
|
2837
|
-
var s2 = r2(a2.shift());
|
|
2838
|
-
return wo.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
2839
|
-
}
|
|
2840
|
-
function Eo(e6, t2, n2) {
|
|
2841
|
-
var r2 = To(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
2842
|
-
i2 !== void 0 && (i2[a2] = n2);
|
|
2843
|
-
}
|
|
2844
|
-
function Do(e6, t2) {
|
|
2845
|
-
var n2 = To(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
2846
|
-
if (r2) return r2[i2];
|
|
2847
|
-
}
|
|
2848
|
-
var Oo = [];
|
|
2849
|
-
var ko = Oo.forEach;
|
|
2850
|
-
var Ao = Oo.slice;
|
|
2851
|
-
function jo(e6) {
|
|
2852
|
-
return ko.call(Ao.call(arguments, 1), function(t2) {
|
|
2853
|
-
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
2854
|
-
var i2 = r2[n2];
|
|
2855
|
-
wo.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
2856
|
-
}
|
|
2857
|
-
}), e6;
|
|
2825
|
+
function To(e6, t2) {
|
|
2826
|
+
let n2 = t2 && t2.cache ? t2.cache : Fo, r2 = t2 && t2.serializer ? t2.serializer : No;
|
|
2827
|
+
return (t2 && t2.strategy ? t2.strategy : Ao)(e6, { cache: n2, serializer: r2 });
|
|
2858
2828
|
}
|
|
2859
|
-
function
|
|
2860
|
-
let n2 = t2 && t2.cache ? t2.cache : Ho, r2 = t2 && t2.serializer ? t2.serializer : Bo;
|
|
2861
|
-
return (t2 && t2.strategy ? t2.strategy : Lo)(e6, { cache: n2, serializer: r2 });
|
|
2862
|
-
}
|
|
2863
|
-
function No(e6) {
|
|
2829
|
+
function Eo(e6) {
|
|
2864
2830
|
return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
|
|
2865
2831
|
}
|
|
2866
|
-
function
|
|
2867
|
-
let i2 =
|
|
2832
|
+
function Do(e6, t2, n2, r2) {
|
|
2833
|
+
let i2 = Eo(r2) ? r2 : n2(r2), a2 = t2.get(i2);
|
|
2868
2834
|
return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
|
|
2869
2835
|
}
|
|
2870
|
-
function
|
|
2836
|
+
function Oo(e6, t2, n2) {
|
|
2871
2837
|
let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
|
|
2872
2838
|
return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
|
|
2873
2839
|
}
|
|
2874
|
-
function
|
|
2840
|
+
function ko(e6, t2, n2, r2, i2) {
|
|
2875
2841
|
return n2.bind(t2, e6, r2, i2);
|
|
2876
2842
|
}
|
|
2877
|
-
function
|
|
2878
|
-
let n2 = e6.length === 1 ?
|
|
2879
|
-
return
|
|
2843
|
+
function Ao(e6, t2) {
|
|
2844
|
+
let n2 = e6.length === 1 ? Do : Oo;
|
|
2845
|
+
return ko(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2880
2846
|
}
|
|
2881
|
-
function
|
|
2882
|
-
return
|
|
2847
|
+
function jo(e6, t2) {
|
|
2848
|
+
return ko(e6, this, Oo, t2.cache.create(), t2.serializer);
|
|
2883
2849
|
}
|
|
2884
|
-
function
|
|
2885
|
-
return
|
|
2850
|
+
function Mo(e6, t2) {
|
|
2851
|
+
return ko(e6, this, Do, t2.cache.create(), t2.serializer);
|
|
2886
2852
|
}
|
|
2887
|
-
var
|
|
2853
|
+
var No = function() {
|
|
2888
2854
|
return JSON.stringify(arguments);
|
|
2889
2855
|
};
|
|
2890
|
-
var
|
|
2856
|
+
var Po = class {
|
|
2891
2857
|
constructor() {
|
|
2892
2858
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2893
2859
|
}
|
|
@@ -2898,14 +2864,14 @@ var Vo = class {
|
|
|
2898
2864
|
this.cache[e6] = t2;
|
|
2899
2865
|
}
|
|
2900
2866
|
};
|
|
2901
|
-
var
|
|
2902
|
-
return new
|
|
2867
|
+
var Fo = { create: function() {
|
|
2868
|
+
return new Po();
|
|
2903
2869
|
} };
|
|
2904
|
-
var
|
|
2905
|
-
var
|
|
2906
|
-
function
|
|
2870
|
+
var Io = { variadic: jo, monadic: Mo };
|
|
2871
|
+
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;
|
|
2872
|
+
function Ro(e6) {
|
|
2907
2873
|
let t2 = {};
|
|
2908
|
-
return e6.replace(
|
|
2874
|
+
return e6.replace(Lo, (e7) => {
|
|
2909
2875
|
let n2 = e7.length;
|
|
2910
2876
|
switch (e7[0]) {
|
|
2911
2877
|
case `G`:
|
|
@@ -2992,10 +2958,10 @@ function Go(e6) {
|
|
|
2992
2958
|
return ``;
|
|
2993
2959
|
}), t2;
|
|
2994
2960
|
}
|
|
2995
|
-
var
|
|
2996
|
-
function
|
|
2961
|
+
var zo = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
2962
|
+
function Bo(e6) {
|
|
2997
2963
|
if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
2998
|
-
let t2 = e6.split(
|
|
2964
|
+
let t2 = e6.split(zo).filter((e7) => e7.length > 0), n2 = [];
|
|
2999
2965
|
for (let e7 of t2) {
|
|
3000
2966
|
let t3 = e7.split(`/`);
|
|
3001
2967
|
if (t3.length === 0) throw Error(`Invalid number skeleton`);
|
|
@@ -3005,20 +2971,20 @@ function qo(e6) {
|
|
|
3005
2971
|
}
|
|
3006
2972
|
return n2;
|
|
3007
2973
|
}
|
|
3008
|
-
function
|
|
2974
|
+
function Vo(e6) {
|
|
3009
2975
|
return e6.replace(/^(.*?)-/, ``);
|
|
3010
2976
|
}
|
|
3011
|
-
var
|
|
3012
|
-
var
|
|
3013
|
-
var
|
|
3014
|
-
var
|
|
3015
|
-
function
|
|
2977
|
+
var Ho = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
2978
|
+
var Uo = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
2979
|
+
var Wo = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
2980
|
+
var Go = /^(0+)$/;
|
|
2981
|
+
function Ko(e6) {
|
|
3016
2982
|
let t2 = {};
|
|
3017
|
-
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(
|
|
2983
|
+
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Uo, function(e7, n2, r2) {
|
|
3018
2984
|
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), ``;
|
|
3019
2985
|
}), t2;
|
|
3020
2986
|
}
|
|
3021
|
-
function
|
|
2987
|
+
function qo(e6) {
|
|
3022
2988
|
switch (e6) {
|
|
3023
2989
|
case `sign-auto`:
|
|
3024
2990
|
return { signDisplay: `auto` };
|
|
@@ -3042,19 +3008,19 @@ function es(e6) {
|
|
|
3042
3008
|
return { signDisplay: `never` };
|
|
3043
3009
|
}
|
|
3044
3010
|
}
|
|
3045
|
-
function
|
|
3011
|
+
function Jo(e6) {
|
|
3046
3012
|
let t2;
|
|
3047
3013
|
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) {
|
|
3048
3014
|
let n2 = e6.slice(0, 2);
|
|
3049
|
-
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !
|
|
3015
|
+
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`);
|
|
3050
3016
|
t2.minimumIntegerDigits = e6.length;
|
|
3051
3017
|
}
|
|
3052
3018
|
return t2;
|
|
3053
3019
|
}
|
|
3054
|
-
function
|
|
3055
|
-
return
|
|
3020
|
+
function Yo(e6) {
|
|
3021
|
+
return qo(e6) || {};
|
|
3056
3022
|
}
|
|
3057
|
-
function
|
|
3023
|
+
function Xo(e6) {
|
|
3058
3024
|
let t2 = {};
|
|
3059
3025
|
for (let n2 of e6) {
|
|
3060
3026
|
switch (n2.stem) {
|
|
@@ -3078,7 +3044,7 @@ function rs(e6) {
|
|
|
3078
3044
|
continue;
|
|
3079
3045
|
case `measure-unit`:
|
|
3080
3046
|
case `unit`:
|
|
3081
|
-
t2.style = `unit`, t2.unit =
|
|
3047
|
+
t2.style = `unit`, t2.unit = Vo(n2.options[0]);
|
|
3082
3048
|
continue;
|
|
3083
3049
|
case `compact-short`:
|
|
3084
3050
|
case `K`:
|
|
@@ -3089,10 +3055,10 @@ function rs(e6) {
|
|
|
3089
3055
|
t2.notation = `compact`, t2.compactDisplay = `long`;
|
|
3090
3056
|
continue;
|
|
3091
3057
|
case `scientific`:
|
|
3092
|
-
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
3058
|
+
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Yo(t3) }), {}) };
|
|
3093
3059
|
continue;
|
|
3094
3060
|
case `engineering`:
|
|
3095
|
-
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
3061
|
+
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Yo(t3) }), {}) };
|
|
3096
3062
|
continue;
|
|
3097
3063
|
case `notation-simple`:
|
|
3098
3064
|
t2.notation = `standard`;
|
|
@@ -3135,7 +3101,7 @@ function rs(e6) {
|
|
|
3135
3101
|
continue;
|
|
3136
3102
|
case `integer-width`:
|
|
3137
3103
|
if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
|
|
3138
|
-
n2.options[0].replace(
|
|
3104
|
+
n2.options[0].replace(Wo, function(e8, n3, r3, i2, a2, o2) {
|
|
3139
3105
|
if (n3) t2.minimumIntegerDigits = r3.length;
|
|
3140
3106
|
else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
|
|
3141
3107
|
else if (o2) throw Error(`We currently do not support exact integer digits`);
|
|
@@ -3143,83 +3109,83 @@ function rs(e6) {
|
|
|
3143
3109
|
});
|
|
3144
3110
|
continue;
|
|
3145
3111
|
}
|
|
3146
|
-
if (
|
|
3112
|
+
if (Go.test(n2.stem)) {
|
|
3147
3113
|
t2.minimumIntegerDigits = n2.stem.length;
|
|
3148
3114
|
continue;
|
|
3149
3115
|
}
|
|
3150
|
-
if (
|
|
3116
|
+
if (Ho.test(n2.stem)) {
|
|
3151
3117
|
if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
|
|
3152
|
-
n2.stem.replace(
|
|
3118
|
+
n2.stem.replace(Ho, function(e9, n3, r3, i2, a2, o2) {
|
|
3153
3119
|
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), ``;
|
|
3154
3120
|
});
|
|
3155
3121
|
let e8 = n2.options[0];
|
|
3156
|
-
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2,
|
|
3122
|
+
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...Ko(e8) });
|
|
3157
3123
|
continue;
|
|
3158
3124
|
}
|
|
3159
|
-
if (
|
|
3160
|
-
t2 = { ...t2,
|
|
3125
|
+
if (Uo.test(n2.stem)) {
|
|
3126
|
+
t2 = { ...t2, ...Ko(n2.stem) };
|
|
3161
3127
|
continue;
|
|
3162
3128
|
}
|
|
3163
|
-
let e7 =
|
|
3129
|
+
let e7 = qo(n2.stem);
|
|
3164
3130
|
e7 && (t2 = { ...t2, ...e7 });
|
|
3165
|
-
let r2 =
|
|
3131
|
+
let r2 = Jo(n2.stem);
|
|
3166
3132
|
r2 && (t2 = { ...t2, ...r2 });
|
|
3167
3133
|
}
|
|
3168
3134
|
return t2;
|
|
3169
3135
|
}
|
|
3170
|
-
var
|
|
3136
|
+
var Zo = function(e6) {
|
|
3171
3137
|
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;
|
|
3172
3138
|
}({});
|
|
3173
|
-
function
|
|
3139
|
+
function Qo(e6) {
|
|
3174
3140
|
return e6.type === 0;
|
|
3175
3141
|
}
|
|
3176
|
-
function
|
|
3142
|
+
function $o(e6) {
|
|
3177
3143
|
return e6.type === 1;
|
|
3178
3144
|
}
|
|
3179
|
-
function
|
|
3145
|
+
function es(e6) {
|
|
3180
3146
|
return e6.type === 2;
|
|
3181
3147
|
}
|
|
3182
|
-
function
|
|
3148
|
+
function ts(e6) {
|
|
3183
3149
|
return e6.type === 3;
|
|
3184
3150
|
}
|
|
3185
|
-
function
|
|
3151
|
+
function ns(e6) {
|
|
3186
3152
|
return e6.type === 4;
|
|
3187
3153
|
}
|
|
3188
|
-
function
|
|
3154
|
+
function rs(e6) {
|
|
3189
3155
|
return e6.type === 5;
|
|
3190
3156
|
}
|
|
3191
|
-
function
|
|
3157
|
+
function is(e6) {
|
|
3192
3158
|
return e6.type === 6;
|
|
3193
3159
|
}
|
|
3194
|
-
function
|
|
3160
|
+
function as(e6) {
|
|
3195
3161
|
return e6.type === 7;
|
|
3196
3162
|
}
|
|
3197
|
-
function
|
|
3163
|
+
function os(e6) {
|
|
3198
3164
|
return e6.type === 8;
|
|
3199
3165
|
}
|
|
3200
|
-
function
|
|
3166
|
+
function ss(e6) {
|
|
3201
3167
|
return !!(e6 && typeof e6 == `object` && e6.type === 0);
|
|
3202
3168
|
}
|
|
3203
|
-
function
|
|
3169
|
+
function cs(e6) {
|
|
3204
3170
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
3205
3171
|
}
|
|
3206
|
-
var
|
|
3207
|
-
var
|
|
3208
|
-
function
|
|
3172
|
+
var ls = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
3173
|
+
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`] };
|
|
3174
|
+
function ds(e6, t2) {
|
|
3209
3175
|
let n2 = ``;
|
|
3210
3176
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
3211
3177
|
let i2 = e6.charAt(r2);
|
|
3212
3178
|
if (i2 === `j`) {
|
|
3213
3179
|
let a2 = 0;
|
|
3214
3180
|
for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
|
|
3215
|
-
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 =
|
|
3181
|
+
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = fs(t2);
|
|
3216
3182
|
for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
|
|
3217
3183
|
for (; o2-- > 0; ) n2 = c2 + n2;
|
|
3218
3184
|
} else n2 += i2 === `J` ? `H` : i2;
|
|
3219
3185
|
}
|
|
3220
3186
|
return n2;
|
|
3221
3187
|
}
|
|
3222
|
-
function
|
|
3188
|
+
function fs(e6) {
|
|
3223
3189
|
let t2 = e6.hourCycle;
|
|
3224
3190
|
if (t2 === void 0) {
|
|
3225
3191
|
let n3 = e6;
|
|
@@ -3238,36 +3204,36 @@ function ys(e6) {
|
|
|
3238
3204
|
throw Error(`Invalid hourCycle`);
|
|
3239
3205
|
}
|
|
3240
3206
|
let n2 = e6.language, r2;
|
|
3241
|
-
return n2 !== `root` && (r2 = e6.maximize().region), (
|
|
3207
|
+
return n2 !== `root` && (r2 = e6.maximize().region), (us[`${n2}-${r2}`] || us[r2 || ``] || us[n2 || ``] || us[`${n2}-001`] || us[`001`])[0].charAt(0);
|
|
3242
3208
|
}
|
|
3243
|
-
var
|
|
3244
|
-
var
|
|
3245
|
-
function
|
|
3209
|
+
var ps = RegExp(`^${ls.source}*`);
|
|
3210
|
+
var ms = RegExp(`${ls.source}*$`);
|
|
3211
|
+
function J(e6, t2) {
|
|
3246
3212
|
return { start: e6, end: t2 };
|
|
3247
3213
|
}
|
|
3248
|
-
var
|
|
3249
|
-
var
|
|
3250
|
-
var
|
|
3251
|
-
var
|
|
3214
|
+
var hs = !!Object.fromEntries;
|
|
3215
|
+
var gs = !!String.prototype.trimStart;
|
|
3216
|
+
var _s = !!String.prototype.trimEnd;
|
|
3217
|
+
var vs = hs ? Object.fromEntries : function(e6) {
|
|
3252
3218
|
let t2 = {};
|
|
3253
3219
|
for (let [n2, r2] of e6) t2[n2] = r2;
|
|
3254
3220
|
return t2;
|
|
3255
3221
|
};
|
|
3256
|
-
var
|
|
3222
|
+
var ys = gs ? function(e6) {
|
|
3257
3223
|
return e6.trimStart();
|
|
3258
3224
|
} : function(e6) {
|
|
3259
|
-
return e6.replace(
|
|
3225
|
+
return e6.replace(ps, ``);
|
|
3260
3226
|
};
|
|
3261
|
-
var
|
|
3227
|
+
var bs = _s ? function(e6) {
|
|
3262
3228
|
return e6.trimEnd();
|
|
3263
3229
|
} : function(e6) {
|
|
3264
|
-
return e6.replace(
|
|
3230
|
+
return e6.replace(ms, ``);
|
|
3265
3231
|
};
|
|
3266
|
-
var
|
|
3267
|
-
function
|
|
3268
|
-
return
|
|
3232
|
+
var xs = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
|
|
3233
|
+
function Ss(e6, t2) {
|
|
3234
|
+
return xs.lastIndex = t2, xs.exec(e6)[1] ?? ``;
|
|
3269
3235
|
}
|
|
3270
|
-
function
|
|
3236
|
+
function Cs(e6) {
|
|
3271
3237
|
if (e6.length === 0) return null;
|
|
3272
3238
|
let t2 = 1, n2 = 1;
|
|
3273
3239
|
for (let r2 = 0; r2 < e6.length; ) {
|
|
@@ -3288,7 +3254,7 @@ function As(e6) {
|
|
|
3288
3254
|
}
|
|
3289
3255
|
return { offset: e6.length, line: t2, column: n2 };
|
|
3290
3256
|
}
|
|
3291
|
-
var
|
|
3257
|
+
var ws = class {
|
|
3292
3258
|
constructor(e6, t2 = {}) {
|
|
3293
3259
|
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;
|
|
3294
3260
|
}
|
|
@@ -3297,10 +3263,10 @@ var js = class {
|
|
|
3297
3263
|
if (this.message.length > 0) {
|
|
3298
3264
|
let e6 = this.message.charCodeAt(0);
|
|
3299
3265
|
if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
|
|
3300
|
-
let e7 =
|
|
3266
|
+
let e7 = Cs(this.message);
|
|
3301
3267
|
if (e7) {
|
|
3302
3268
|
let t2 = this.clonePosition();
|
|
3303
|
-
return this.position = e7, { val: [{ type: 0, value: this.message, location:
|
|
3269
|
+
return this.position = e7, { val: [{ type: 0, value: this.message, location: J(t2, this.clonePosition()) }], err: null };
|
|
3304
3270
|
}
|
|
3305
3271
|
}
|
|
3306
3272
|
}
|
|
@@ -3317,11 +3283,11 @@ var js = class {
|
|
|
3317
3283
|
} else if (i2 === 125 && e6 > 0) break;
|
|
3318
3284
|
else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
|
|
3319
3285
|
let e7 = this.clonePosition();
|
|
3320
|
-
this.bump(), r2.push({ type: 7, location:
|
|
3286
|
+
this.bump(), r2.push({ type: 7, location: J(e7, this.clonePosition()) });
|
|
3321
3287
|
} else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
3322
3288
|
if (n2) break;
|
|
3323
|
-
return this.error(26,
|
|
3324
|
-
} else if (i2 === 60 && !this.ignoreTag &&
|
|
3289
|
+
return this.error(26, J(this.clonePosition(), this.clonePosition()));
|
|
3290
|
+
} else if (i2 === 60 && !this.ignoreTag && Ts(this.peek() || 0)) {
|
|
3325
3291
|
let n3 = this.parseTag(e6, t2);
|
|
3326
3292
|
if (n3.err) return n3;
|
|
3327
3293
|
r2.push(n3.val);
|
|
@@ -3337,23 +3303,23 @@ var js = class {
|
|
|
3337
3303
|
let n2 = this.clonePosition();
|
|
3338
3304
|
this.bump();
|
|
3339
3305
|
let r2 = this.parseTagName();
|
|
3340
|
-
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location:
|
|
3306
|
+
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: J(n2, this.clonePosition()) }, err: null };
|
|
3341
3307
|
if (this.bumpIf(`>`)) {
|
|
3342
3308
|
let i2 = this.parseMessage(e6 + 1, t2, true);
|
|
3343
3309
|
if (i2.err) return i2;
|
|
3344
3310
|
let a2 = i2.val, o2 = this.clonePosition();
|
|
3345
3311
|
if (this.bumpIf(`</`)) {
|
|
3346
|
-
if (this.isEOF() || !
|
|
3312
|
+
if (this.isEOF() || !Ts(this.char())) return this.error(23, J(o2, this.clonePosition()));
|
|
3347
3313
|
let e7 = this.clonePosition();
|
|
3348
|
-
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location:
|
|
3314
|
+
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()));
|
|
3349
3315
|
}
|
|
3350
|
-
return this.error(27,
|
|
3316
|
+
return this.error(27, J(n2, this.clonePosition()));
|
|
3351
3317
|
}
|
|
3352
|
-
return this.error(23,
|
|
3318
|
+
return this.error(23, J(n2, this.clonePosition()));
|
|
3353
3319
|
}
|
|
3354
3320
|
parseTagName() {
|
|
3355
3321
|
let e6 = this.offset();
|
|
3356
|
-
for (this.bump(); !this.isEOF() &&
|
|
3322
|
+
for (this.bump(); !this.isEOF() && Ds(this.char()); ) this.bump();
|
|
3357
3323
|
return this.message.slice(e6, this.offset());
|
|
3358
3324
|
}
|
|
3359
3325
|
parseLiteral(e6, t2) {
|
|
@@ -3373,11 +3339,11 @@ var js = class {
|
|
|
3373
3339
|
if (a2) r2 += a2;
|
|
3374
3340
|
else break;
|
|
3375
3341
|
}
|
|
3376
|
-
let i2 =
|
|
3342
|
+
let i2 = J(n2, this.clonePosition());
|
|
3377
3343
|
return { val: { type: 0, value: r2, location: i2 }, err: null };
|
|
3378
3344
|
}
|
|
3379
3345
|
tryParseLeftAngleBracket() {
|
|
3380
|
-
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !
|
|
3346
|
+
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !Es(this.peek() || 0)) ? (this.bump(), `<`) : null;
|
|
3381
3347
|
}
|
|
3382
3348
|
tryParseQuote(e6) {
|
|
3383
3349
|
if (this.isEOF() || this.char() !== 39) return null;
|
|
@@ -3417,29 +3383,29 @@ var js = class {
|
|
|
3417
3383
|
}
|
|
3418
3384
|
parseArgument(e6, t2) {
|
|
3419
3385
|
let n2 = this.clonePosition();
|
|
3420
|
-
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
3421
|
-
if (this.char() === 125) return this.bump(), this.error(2,
|
|
3386
|
+
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, J(n2, this.clonePosition()));
|
|
3387
|
+
if (this.char() === 125) return this.bump(), this.error(2, J(n2, this.clonePosition()));
|
|
3422
3388
|
let r2 = this.parseIdentifierIfPossible().value;
|
|
3423
|
-
if (!r2) return this.error(3,
|
|
3424
|
-
if (this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
3389
|
+
if (!r2) return this.error(3, J(n2, this.clonePosition()));
|
|
3390
|
+
if (this.bumpSpace(), this.isEOF()) return this.error(1, J(n2, this.clonePosition()));
|
|
3425
3391
|
switch (this.char()) {
|
|
3426
3392
|
case 125:
|
|
3427
|
-
return this.bump(), { val: { type: 1, value: r2, location:
|
|
3393
|
+
return this.bump(), { val: { type: 1, value: r2, location: J(n2, this.clonePosition()) }, err: null };
|
|
3428
3394
|
case 44:
|
|
3429
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1,
|
|
3395
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, J(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
|
|
3430
3396
|
default:
|
|
3431
|
-
return this.error(3,
|
|
3397
|
+
return this.error(3, J(n2, this.clonePosition()));
|
|
3432
3398
|
}
|
|
3433
3399
|
}
|
|
3434
3400
|
parseIdentifierIfPossible() {
|
|
3435
|
-
let e6 = this.clonePosition(), t2 = this.offset(), n2 =
|
|
3436
|
-
return this.bumpTo(r2), { value: n2, location:
|
|
3401
|
+
let e6 = this.clonePosition(), t2 = this.offset(), n2 = Ss(this.message, t2), r2 = t2 + n2.length;
|
|
3402
|
+
return this.bumpTo(r2), { value: n2, location: J(e6, this.clonePosition()) };
|
|
3437
3403
|
}
|
|
3438
3404
|
parseArgumentOptions(e6, t2, n2, r2) {
|
|
3439
3405
|
let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
|
|
3440
3406
|
switch (a2) {
|
|
3441
3407
|
case ``:
|
|
3442
|
-
return this.error(4,
|
|
3408
|
+
return this.error(4, J(i2, o2));
|
|
3443
3409
|
case `number`:
|
|
3444
3410
|
case `date`:
|
|
3445
3411
|
case `time`: {
|
|
@@ -3449,15 +3415,15 @@ var js = class {
|
|
|
3449
3415
|
this.bumpSpace();
|
|
3450
3416
|
let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
|
|
3451
3417
|
if (n3.err) return n3;
|
|
3452
|
-
let r3 =
|
|
3453
|
-
if (r3.length === 0) return this.error(6,
|
|
3454
|
-
e7 = { style: r3, styleLocation:
|
|
3418
|
+
let r3 = bs(n3.val);
|
|
3419
|
+
if (r3.length === 0) return this.error(6, J(this.clonePosition(), this.clonePosition()));
|
|
3420
|
+
e7 = { style: r3, styleLocation: J(t4, this.clonePosition()) };
|
|
3455
3421
|
}
|
|
3456
3422
|
let t3 = this.tryParseArgumentClose(r2);
|
|
3457
3423
|
if (t3.err) return t3;
|
|
3458
|
-
let i3 =
|
|
3424
|
+
let i3 = J(r2, this.clonePosition());
|
|
3459
3425
|
if (e7 && e7.style.startsWith(`::`)) {
|
|
3460
|
-
let t4 =
|
|
3426
|
+
let t4 = ys(e7.style.slice(2));
|
|
3461
3427
|
if (a2 === `number`) {
|
|
3462
3428
|
let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
|
|
3463
3429
|
return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
|
|
@@ -3465,8 +3431,8 @@ var js = class {
|
|
|
3465
3431
|
{
|
|
3466
3432
|
if (t4.length === 0) return this.error(10, i3);
|
|
3467
3433
|
let r3 = t4;
|
|
3468
|
-
this.locale && (r3 =
|
|
3469
|
-
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ?
|
|
3434
|
+
this.locale && (r3 = ds(t4, this.locale));
|
|
3435
|
+
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Ro(r3) : {} };
|
|
3470
3436
|
return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
|
|
3471
3437
|
}
|
|
3472
3438
|
}
|
|
@@ -3476,11 +3442,11 @@ var js = class {
|
|
|
3476
3442
|
case `selectordinal`:
|
|
3477
3443
|
case `select`: {
|
|
3478
3444
|
let i3 = this.clonePosition();
|
|
3479
|
-
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12,
|
|
3445
|
+
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, J(i3, { ...i3 }));
|
|
3480
3446
|
this.bumpSpace();
|
|
3481
3447
|
let o3 = this.parseIdentifierIfPossible(), s2 = 0;
|
|
3482
3448
|
if (a2 !== `select` && o3.value === `offset`) {
|
|
3483
|
-
if (!this.bumpIf(`:`)) return this.error(13,
|
|
3449
|
+
if (!this.bumpIf(`:`)) return this.error(13, J(this.clonePosition(), this.clonePosition()));
|
|
3484
3450
|
this.bumpSpace();
|
|
3485
3451
|
let e7 = this.tryParseDecimalInteger(13, 14);
|
|
3486
3452
|
if (e7.err) return e7;
|
|
@@ -3490,15 +3456,15 @@ var js = class {
|
|
|
3490
3456
|
if (c2.err) return c2;
|
|
3491
3457
|
let l2 = this.tryParseArgumentClose(r2);
|
|
3492
3458
|
if (l2.err) return l2;
|
|
3493
|
-
let u2 =
|
|
3494
|
-
return a2 === `select` ? { val: { type: 5, value: n2, options:
|
|
3459
|
+
let u2 = J(r2, this.clonePosition());
|
|
3460
|
+
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 };
|
|
3495
3461
|
}
|
|
3496
3462
|
default:
|
|
3497
|
-
return this.error(5,
|
|
3463
|
+
return this.error(5, J(i2, o2));
|
|
3498
3464
|
}
|
|
3499
3465
|
}
|
|
3500
3466
|
tryParseArgumentClose(e6) {
|
|
3501
|
-
return this.isEOF() || this.char() !== 125 ? this.error(1,
|
|
3467
|
+
return this.isEOF() || this.char() !== 125 ? this.error(1, J(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
|
|
3502
3468
|
}
|
|
3503
3469
|
parseSimpleArgStyleIfPossible() {
|
|
3504
3470
|
let e6 = 0, t2 = this.clonePosition();
|
|
@@ -3506,7 +3472,7 @@ var js = class {
|
|
|
3506
3472
|
case 39: {
|
|
3507
3473
|
this.bump();
|
|
3508
3474
|
let e7 = this.clonePosition();
|
|
3509
|
-
if (!this.bumpUntil(`'`)) return this.error(11,
|
|
3475
|
+
if (!this.bumpUntil(`'`)) return this.error(11, J(e7, this.clonePosition()));
|
|
3510
3476
|
this.bump();
|
|
3511
3477
|
break;
|
|
3512
3478
|
}
|
|
@@ -3525,11 +3491,11 @@ var js = class {
|
|
|
3525
3491
|
parseNumberSkeletonFromString(e6, t2) {
|
|
3526
3492
|
let n2 = [];
|
|
3527
3493
|
try {
|
|
3528
|
-
n2 =
|
|
3494
|
+
n2 = Bo(e6);
|
|
3529
3495
|
} catch {
|
|
3530
3496
|
return this.error(7, t2);
|
|
3531
3497
|
}
|
|
3532
|
-
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ?
|
|
3498
|
+
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Xo(n2) : {} }, err: null };
|
|
3533
3499
|
}
|
|
3534
3500
|
tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
|
|
3535
3501
|
let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
|
|
@@ -3539,20 +3505,20 @@ var js = class {
|
|
|
3539
3505
|
if (t2 !== `select` && this.bumpIf(`=`)) {
|
|
3540
3506
|
let t3 = this.tryParseDecimalInteger(16, 19);
|
|
3541
3507
|
if (t3.err) return t3;
|
|
3542
|
-
c2 =
|
|
3508
|
+
c2 = J(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
|
|
3543
3509
|
} else break;
|
|
3544
3510
|
}
|
|
3545
3511
|
if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
|
|
3546
3512
|
s2 === `other` && (i2 = true), this.bumpSpace();
|
|
3547
3513
|
let r3 = this.clonePosition();
|
|
3548
|
-
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18,
|
|
3514
|
+
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, J(this.clonePosition(), this.clonePosition()));
|
|
3549
3515
|
let l2 = this.parseMessage(e6 + 1, t2, n2);
|
|
3550
3516
|
if (l2.err) return l2;
|
|
3551
3517
|
let u2 = this.tryParseArgumentClose(r3);
|
|
3552
3518
|
if (u2.err) return u2;
|
|
3553
|
-
a2.push([s2, { value: l2.val, location:
|
|
3519
|
+
a2.push([s2, { value: l2.val, location: J(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
|
|
3554
3520
|
}
|
|
3555
|
-
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16,
|
|
3521
|
+
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 };
|
|
3556
3522
|
}
|
|
3557
3523
|
tryParseDecimalInteger(e6, t2) {
|
|
3558
3524
|
let n2 = 1, r2 = this.clonePosition();
|
|
@@ -3563,7 +3529,7 @@ var js = class {
|
|
|
3563
3529
|
if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
|
|
3564
3530
|
else break;
|
|
3565
3531
|
}
|
|
3566
|
-
let o2 =
|
|
3532
|
+
let o2 = J(r2, this.clonePosition());
|
|
3567
3533
|
return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
|
|
3568
3534
|
}
|
|
3569
3535
|
offset() {
|
|
@@ -3611,7 +3577,7 @@ var js = class {
|
|
|
3611
3577
|
}
|
|
3612
3578
|
}
|
|
3613
3579
|
bumpSpace() {
|
|
3614
|
-
for (; !this.isEOF() &&
|
|
3580
|
+
for (; !this.isEOF() && Os(this.char()); ) this.bump();
|
|
3615
3581
|
}
|
|
3616
3582
|
peek() {
|
|
3617
3583
|
if (this.isEOF()) return null;
|
|
@@ -3619,34 +3585,34 @@ var js = class {
|
|
|
3619
3585
|
return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
|
|
3620
3586
|
}
|
|
3621
3587
|
};
|
|
3622
|
-
function
|
|
3588
|
+
function Ts(e6) {
|
|
3623
3589
|
return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
|
|
3624
3590
|
}
|
|
3625
|
-
function
|
|
3626
|
-
return
|
|
3591
|
+
function Es(e6) {
|
|
3592
|
+
return Ts(e6) || e6 === 47;
|
|
3627
3593
|
}
|
|
3628
|
-
function
|
|
3594
|
+
function Ds(e6) {
|
|
3629
3595
|
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;
|
|
3630
3596
|
}
|
|
3631
|
-
function
|
|
3597
|
+
function Os(e6) {
|
|
3632
3598
|
return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
|
|
3633
3599
|
}
|
|
3634
|
-
function
|
|
3600
|
+
function ks(e6) {
|
|
3635
3601
|
e6.forEach((e7) => {
|
|
3636
|
-
if (delete e7.location,
|
|
3637
|
-
else
|
|
3602
|
+
if (delete e7.location, rs(e7) || is(e7)) for (let t2 in e7.options) delete e7.options[t2].location, ks(e7.options[t2].value);
|
|
3603
|
+
else es(e7) && ss(e7.style) || (ts(e7) || ns(e7)) && cs(e7.style) ? delete e7.style.location : os(e7) && ks(e7.children);
|
|
3638
3604
|
});
|
|
3639
3605
|
}
|
|
3640
|
-
function
|
|
3606
|
+
function As(e6, t2 = {}) {
|
|
3641
3607
|
t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
|
|
3642
|
-
let n2 = new
|
|
3608
|
+
let n2 = new ws(e6, t2).parse();
|
|
3643
3609
|
if (n2.err) {
|
|
3644
|
-
let e7 = SyntaxError(
|
|
3610
|
+
let e7 = SyntaxError(Zo[n2.err.kind]);
|
|
3645
3611
|
throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
|
|
3646
3612
|
}
|
|
3647
|
-
return t2?.captureLocation ||
|
|
3613
|
+
return t2?.captureLocation || ks(n2.val), n2.val;
|
|
3648
3614
|
}
|
|
3649
|
-
var
|
|
3615
|
+
var js = class extends Error {
|
|
3650
3616
|
constructor(e6, t2, n2) {
|
|
3651
3617
|
super(e6), this.code = t2, this.originalMessage = n2;
|
|
3652
3618
|
}
|
|
@@ -3654,54 +3620,54 @@ var Rs = class extends Error {
|
|
|
3654
3620
|
return `[formatjs Error: ${this.code}] ${this.message}`;
|
|
3655
3621
|
}
|
|
3656
3622
|
};
|
|
3657
|
-
var
|
|
3623
|
+
var Ms = class extends js {
|
|
3658
3624
|
constructor(e6, t2, n2, r2) {
|
|
3659
3625
|
super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
|
|
3660
3626
|
}
|
|
3661
3627
|
};
|
|
3662
|
-
var
|
|
3628
|
+
var Ns = class extends js {
|
|
3663
3629
|
constructor(e6, t2, n2) {
|
|
3664
3630
|
super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
|
|
3665
3631
|
}
|
|
3666
3632
|
};
|
|
3667
|
-
var
|
|
3633
|
+
var Ps = class extends js {
|
|
3668
3634
|
constructor(e6, t2) {
|
|
3669
3635
|
super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
|
|
3670
3636
|
}
|
|
3671
3637
|
};
|
|
3672
|
-
function
|
|
3638
|
+
function Fs(e6) {
|
|
3673
3639
|
return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
|
|
3674
3640
|
let n2 = e7[e7.length - 1];
|
|
3675
3641
|
return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
|
|
3676
3642
|
}, []);
|
|
3677
3643
|
}
|
|
3678
|
-
function
|
|
3644
|
+
function Is(e6) {
|
|
3679
3645
|
return typeof e6 == `function`;
|
|
3680
3646
|
}
|
|
3681
|
-
function
|
|
3682
|
-
if (e6.length === 1 &&
|
|
3647
|
+
function Ls(e6, t2, n2, r2, i2, a2, o2) {
|
|
3648
|
+
if (e6.length === 1 && Qo(e6[0])) return [{ type: 0, value: e6[0].value }];
|
|
3683
3649
|
let s2 = [];
|
|
3684
3650
|
for (let c2 of e6) {
|
|
3685
|
-
if (
|
|
3651
|
+
if (Qo(c2)) {
|
|
3686
3652
|
s2.push({ type: 0, value: c2.value });
|
|
3687
3653
|
continue;
|
|
3688
3654
|
}
|
|
3689
|
-
if (
|
|
3655
|
+
if (as(c2)) {
|
|
3690
3656
|
typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
|
|
3691
3657
|
continue;
|
|
3692
3658
|
}
|
|
3693
3659
|
let { value: e7 } = c2;
|
|
3694
|
-
if (!(i2 && e7 in i2)) throw new
|
|
3660
|
+
if (!(i2 && e7 in i2)) throw new Ps(e7, o2);
|
|
3695
3661
|
let l2 = i2[e7];
|
|
3696
|
-
if (
|
|
3697
|
-
else if (
|
|
3698
|
-
let e8 = typeof c2.style == `string` ? r2.date[c2.style] :
|
|
3662
|
+
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 });
|
|
3663
|
+
else if (ts(c2)) {
|
|
3664
|
+
let e8 = typeof c2.style == `string` ? r2.date[c2.style] : cs(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3699
3665
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3700
|
-
} else if (
|
|
3701
|
-
let e8 = typeof c2.style == `string` ? r2.time[c2.style] :
|
|
3666
|
+
} else if (ns(c2)) {
|
|
3667
|
+
let e8 = typeof c2.style == `string` ? r2.time[c2.style] : cs(c2.style) ? c2.style.parsedOptions : r2.time.medium;
|
|
3702
3668
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3703
|
-
} else if (
|
|
3704
|
-
let e8 = typeof c2.style == `string` ? r2.number[c2.style] :
|
|
3669
|
+
} else if (es(c2)) {
|
|
3670
|
+
let e8 = typeof c2.style == `string` ? r2.number[c2.style] : ss(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3705
3671
|
if (e8 && e8.scale) {
|
|
3706
3672
|
let t3 = e8.scale || 1;
|
|
3707
3673
|
if (typeof l2 == `bigint`) {
|
|
@@ -3711,40 +3677,40 @@ function Ws(e6, t2, n2, r2, i2, a2, o2) {
|
|
|
3711
3677
|
}
|
|
3712
3678
|
s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
|
|
3713
3679
|
} else {
|
|
3714
|
-
if (
|
|
3680
|
+
if (os(c2)) {
|
|
3715
3681
|
let { children: e8, value: l3 } = c2, u2 = i2[l3];
|
|
3716
|
-
if (!
|
|
3717
|
-
let d2 = u2(
|
|
3682
|
+
if (!Is(u2)) throw new Ns(l3, `function`, o2);
|
|
3683
|
+
let d2 = u2(Ls(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
|
|
3718
3684
|
Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
|
|
3719
3685
|
}
|
|
3720
|
-
if (
|
|
3686
|
+
if (rs(c2)) {
|
|
3721
3687
|
let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
|
|
3722
|
-
if (!a3) throw new
|
|
3723
|
-
s2.push(...
|
|
3724
|
-
} else if (
|
|
3688
|
+
if (!a3) throw new Ms(c2.value, l2, Object.keys(c2.options), o2);
|
|
3689
|
+
s2.push(...Ls(a3.value, t2, n2, r2, i2));
|
|
3690
|
+
} else if (is(c2)) {
|
|
3725
3691
|
let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
|
|
3726
3692
|
if (!a3) {
|
|
3727
|
-
if (!Intl.PluralRules) throw new
|
|
3693
|
+
if (!Intl.PluralRules) throw new js(`Intl.PluralRules is not available in this environment.
|
|
3728
3694
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3729
3695
|
`, `MISSING_INTL_API`, o2);
|
|
3730
3696
|
let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
|
|
3731
3697
|
a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
|
|
3732
3698
|
}
|
|
3733
|
-
if (!a3) throw new
|
|
3699
|
+
if (!a3) throw new Ms(c2.value, l2, Object.keys(c2.options), o2);
|
|
3734
3700
|
let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
|
|
3735
|
-
s2.push(...
|
|
3701
|
+
s2.push(...Ls(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
|
|
3736
3702
|
}
|
|
3737
3703
|
}
|
|
3738
3704
|
}
|
|
3739
|
-
return
|
|
3705
|
+
return Fs(s2);
|
|
3740
3706
|
}
|
|
3741
|
-
function
|
|
3707
|
+
function Rs(e6, t2) {
|
|
3742
3708
|
return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
|
|
3743
3709
|
}
|
|
3744
|
-
function
|
|
3745
|
-
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] =
|
|
3710
|
+
function zs(e6, t2) {
|
|
3711
|
+
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Rs(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
|
|
3746
3712
|
}
|
|
3747
|
-
function
|
|
3713
|
+
function Bs(e6) {
|
|
3748
3714
|
return { create() {
|
|
3749
3715
|
return { get(t2) {
|
|
3750
3716
|
return e6[t2];
|
|
@@ -3753,23 +3719,23 @@ function qs(e6) {
|
|
|
3753
3719
|
} };
|
|
3754
3720
|
} };
|
|
3755
3721
|
}
|
|
3756
|
-
function
|
|
3757
|
-
return { getNumberFormat:
|
|
3722
|
+
function Vs(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
|
|
3723
|
+
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 }) };
|
|
3758
3724
|
}
|
|
3759
|
-
var
|
|
3725
|
+
var Hs = class e5 {
|
|
3760
3726
|
constructor(t2, n2 = e5.defaultLocale, r2, i2) {
|
|
3761
3727
|
if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
|
|
3762
3728
|
let t3 = this.formatToParts(e6);
|
|
3763
3729
|
if (t3.length === 1) return t3[0].value;
|
|
3764
3730
|
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), []);
|
|
3765
3731
|
return n3.length <= 1 ? n3[0] || `` : n3;
|
|
3766
|
-
}, this.formatToParts = (e6) =>
|
|
3732
|
+
}, 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`) {
|
|
3767
3733
|
if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
3768
3734
|
let { ...n3 } = i2 || {};
|
|
3769
3735
|
this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
|
|
3770
3736
|
} else this.ast = t2;
|
|
3771
3737
|
if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
|
|
3772
|
-
this.formats =
|
|
3738
|
+
this.formats = zs(e5.formats, r2), this.formatters = i2 && i2.formatters || Vs(this.formatterCache);
|
|
3773
3739
|
}
|
|
3774
3740
|
static {
|
|
3775
3741
|
this.memoizedDefaultLocale = null;
|
|
@@ -3785,32 +3751,66 @@ var Ys = class e5 {
|
|
|
3785
3751
|
};
|
|
3786
3752
|
}
|
|
3787
3753
|
static {
|
|
3788
|
-
this.__parse =
|
|
3754
|
+
this.__parse = As;
|
|
3789
3755
|
}
|
|
3790
3756
|
static {
|
|
3791
3757
|
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` } } };
|
|
3792
3758
|
}
|
|
3793
3759
|
};
|
|
3794
|
-
|
|
3795
|
-
|
|
3760
|
+
var Us = [`__proto__`, `constructor`, `prototype`];
|
|
3761
|
+
function Ws(e6, t2, n2) {
|
|
3762
|
+
function r2(e7) {
|
|
3763
|
+
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
3764
|
+
}
|
|
3765
|
+
function i2() {
|
|
3766
|
+
return !e6 || typeof e6 == `string`;
|
|
3767
|
+
}
|
|
3768
|
+
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
3769
|
+
if (i2()) return {};
|
|
3770
|
+
var o2 = r2(a2.shift());
|
|
3771
|
+
if (Us.indexOf(o2) > -1) return {};
|
|
3772
|
+
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
3773
|
+
}
|
|
3774
|
+
if (i2()) return {};
|
|
3775
|
+
var s2 = r2(a2.shift());
|
|
3776
|
+
return Us.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
3777
|
+
}
|
|
3778
|
+
function Gs(e6, t2, n2) {
|
|
3779
|
+
var r2 = Ws(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
3780
|
+
i2 !== void 0 && (i2[a2] = n2);
|
|
3781
|
+
}
|
|
3782
|
+
function Ks(e6, t2) {
|
|
3783
|
+
var n2 = Ws(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
3784
|
+
if (r2) return r2[i2];
|
|
3785
|
+
}
|
|
3786
|
+
function qs(e6) {
|
|
3787
|
+
return [...arguments].slice(1).forEach(function(t2) {
|
|
3788
|
+
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
3789
|
+
var i2 = r2[n2];
|
|
3790
|
+
Us.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
3791
|
+
}
|
|
3792
|
+
}), e6;
|
|
3793
|
+
}
|
|
3794
|
+
function Js(e6, t2) {
|
|
3795
|
+
return $s(e6) || Qs(e6, t2) || Xs(e6, t2) || Ys();
|
|
3796
3796
|
}
|
|
3797
|
-
function
|
|
3797
|
+
function Ys() {
|
|
3798
3798
|
throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3799
3799
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3800
3800
|
}
|
|
3801
|
-
function
|
|
3801
|
+
function Xs(e6, t2) {
|
|
3802
3802
|
if (e6) {
|
|
3803
|
-
if (typeof e6 == `string`) return
|
|
3803
|
+
if (typeof e6 == `string`) return Zs(e6, t2);
|
|
3804
3804
|
var n2 = {}.toString.call(e6).slice(8, -1);
|
|
3805
|
-
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) ?
|
|
3805
|
+
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;
|
|
3806
3806
|
}
|
|
3807
3807
|
}
|
|
3808
|
-
function
|
|
3808
|
+
function Zs(e6, t2) {
|
|
3809
3809
|
(t2 == null || t2 > e6.length) && (t2 = e6.length);
|
|
3810
3810
|
for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
|
|
3811
3811
|
return r2;
|
|
3812
3812
|
}
|
|
3813
|
-
function
|
|
3813
|
+
function Qs(e6, t2) {
|
|
3814
3814
|
var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
|
|
3815
3815
|
if (n2 != null) {
|
|
3816
3816
|
var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
|
|
@@ -3831,18 +3831,10 @@ function ec(e6, t2) {
|
|
|
3831
3831
|
return s2;
|
|
3832
3832
|
}
|
|
3833
3833
|
}
|
|
3834
|
-
function
|
|
3834
|
+
function $s(e6) {
|
|
3835
3835
|
if (Array.isArray(e6)) return e6;
|
|
3836
3836
|
}
|
|
3837
|
-
function
|
|
3838
|
-
"@babel/helpers - typeof";
|
|
3839
|
-
return nc = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3840
|
-
return typeof e7;
|
|
3841
|
-
} : function(e7) {
|
|
3842
|
-
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3843
|
-
}, nc(e6);
|
|
3844
|
-
}
|
|
3845
|
-
function rc(e6, t2) {
|
|
3837
|
+
function ec(e6, t2) {
|
|
3846
3838
|
var n2 = Object.keys(e6);
|
|
3847
3839
|
if (Object.getOwnPropertySymbols) {
|
|
3848
3840
|
var r2 = Object.getOwnPropertySymbols(e6);
|
|
@@ -3852,85 +3844,121 @@ function rc(e6, t2) {
|
|
|
3852
3844
|
}
|
|
3853
3845
|
return n2;
|
|
3854
3846
|
}
|
|
3855
|
-
function
|
|
3847
|
+
function tc(e6) {
|
|
3856
3848
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
3857
3849
|
var n2 = arguments[t2] == null ? {} : arguments[t2];
|
|
3858
|
-
t2 % 2 ?
|
|
3859
|
-
|
|
3860
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) :
|
|
3850
|
+
t2 % 2 ? ec(Object(n2), true).forEach(function(t3) {
|
|
3851
|
+
nc(e6, t3, n2[t3]);
|
|
3852
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : ec(Object(n2)).forEach(function(t3) {
|
|
3861
3853
|
Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
|
|
3862
3854
|
});
|
|
3863
3855
|
}
|
|
3864
3856
|
return e6;
|
|
3865
3857
|
}
|
|
3866
|
-
function
|
|
3867
|
-
return (t2 =
|
|
3858
|
+
function nc(e6, t2, n2) {
|
|
3859
|
+
return (t2 = oc(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
|
|
3868
3860
|
}
|
|
3869
|
-
function
|
|
3861
|
+
function rc(e6, t2) {
|
|
3870
3862
|
if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
|
|
3871
3863
|
}
|
|
3872
|
-
function
|
|
3864
|
+
function ic(e6, t2) {
|
|
3873
3865
|
for (var n2 = 0; n2 < t2.length; n2++) {
|
|
3874
3866
|
var r2 = t2[n2];
|
|
3875
|
-
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6,
|
|
3867
|
+
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, oc(r2.key), r2);
|
|
3876
3868
|
}
|
|
3877
3869
|
}
|
|
3878
|
-
function
|
|
3879
|
-
return t2 &&
|
|
3870
|
+
function ac(e6, t2, n2) {
|
|
3871
|
+
return t2 && ic(e6.prototype, t2), n2 && ic(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
|
|
3880
3872
|
}
|
|
3881
|
-
function
|
|
3882
|
-
var t2 =
|
|
3883
|
-
return
|
|
3873
|
+
function oc(e6) {
|
|
3874
|
+
var t2 = sc(e6, `string`);
|
|
3875
|
+
return Y(t2) == `symbol` ? t2 : t2 + ``;
|
|
3884
3876
|
}
|
|
3885
|
-
function
|
|
3886
|
-
if (
|
|
3877
|
+
function sc(e6, t2) {
|
|
3878
|
+
if (Y(e6) != `object` || !e6) return e6;
|
|
3887
3879
|
var n2 = e6[Symbol.toPrimitive];
|
|
3888
3880
|
if (n2 !== void 0) {
|
|
3889
3881
|
var r2 = n2.call(e6, t2 || `default`);
|
|
3890
|
-
if (
|
|
3882
|
+
if (Y(r2) != `object`) return r2;
|
|
3891
3883
|
throw TypeError(`@@toPrimitive must return a primitive value.`);
|
|
3892
3884
|
}
|
|
3893
3885
|
return (t2 === `string` ? String : Number)(e6);
|
|
3894
3886
|
}
|
|
3895
|
-
function
|
|
3887
|
+
function Y(e6) {
|
|
3888
|
+
"@babel/helpers - typeof";
|
|
3889
|
+
return Y = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3890
|
+
return typeof e7;
|
|
3891
|
+
} : function(e7) {
|
|
3892
|
+
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3893
|
+
}, Y(e6);
|
|
3894
|
+
}
|
|
3895
|
+
var cc = `https://www.i18next.com/how-to/using-icu-or-mf2`;
|
|
3896
|
+
var lc = [`zero`, `one`, `two`, `few`, `many`, `other`];
|
|
3897
|
+
function uc() {
|
|
3896
3898
|
return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
|
|
3897
3899
|
return n2;
|
|
3898
3900
|
}, parseLngForICU: function(e6) {
|
|
3899
3901
|
return e6;
|
|
3900
3902
|
}, escapeVariables: false };
|
|
3901
3903
|
}
|
|
3904
|
+
function dc(e6, t2, n2, r2) {
|
|
3905
|
+
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}`;
|
|
3906
|
+
}
|
|
3902
3907
|
var fc = function() {
|
|
3903
3908
|
function e6(t2) {
|
|
3904
|
-
|
|
3909
|
+
rc(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
|
|
3905
3910
|
}
|
|
3906
|
-
return
|
|
3911
|
+
return ac(e6, [{ key: `init`, value: function(e7, t2) {
|
|
3907
3912
|
var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
|
|
3908
|
-
if (this.options =
|
|
3913
|
+
if (this.options = qs(r2, t2, this.options || {}, uc()), this.formats = this.options.formats, e7) {
|
|
3909
3914
|
var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
|
|
3910
|
-
e7.IntlMessageFormat =
|
|
3915
|
+
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() {
|
|
3911
3916
|
return n2.clearCache();
|
|
3912
3917
|
}), o2 && e7.store.on(o2, function() {
|
|
3913
3918
|
return n2.clearCache();
|
|
3914
3919
|
}));
|
|
3915
3920
|
}
|
|
3916
3921
|
} }, { key: `addUserDefinedFormats`, value: function(e7) {
|
|
3917
|
-
this.formats = this.formats ?
|
|
3922
|
+
this.formats = this.formats ? tc(tc({}, this.formats), e7) : e7, this.clearCache();
|
|
3918
3923
|
} }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
|
|
3919
|
-
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize &&
|
|
3920
|
-
this.options.memoize
|
|
3924
|
+
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && [n2, r2, i2], c2;
|
|
3925
|
+
if (this.options.memoize) {
|
|
3926
|
+
var l2 = Ks(this.mem, s2);
|
|
3927
|
+
l2 && l2.res === e7 && (c2 = l2.fc);
|
|
3928
|
+
}
|
|
3921
3929
|
try {
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
return this.
|
|
3930
|
+
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 }));
|
|
3931
|
+
var u2 = t2 && t2.replace && Y(t2.replace) === `object` ? tc(tc({}, t2), t2.replace) : t2;
|
|
3932
|
+
return c2.format(this.escapeVariableValues(u2));
|
|
3933
|
+
} catch (a3) {
|
|
3934
|
+
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);
|
|
3925
3935
|
}
|
|
3926
3936
|
} }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
|
|
3927
|
-
return e7;
|
|
3937
|
+
return this.debug && i2 && this.checkSuffixKeys(t2, n2, r2, i2), e7;
|
|
3938
|
+
} }, { key: `checkSuffixKeys`, value: function(e7, t2, n2, r2) {
|
|
3939
|
+
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})`;
|
|
3940
|
+
if (i2 !== void 0 && this.firstTime(`plural ${t2} ${n2} ${e7}`)) {
|
|
3941
|
+
var p2 = lc.concat(lc.map(function(e8) {
|
|
3942
|
+
return `ordinal${c2}${e8}`;
|
|
3943
|
+
})).map(function(t3) {
|
|
3944
|
+
return `${e7}${c2}${t3}`;
|
|
3945
|
+
}).filter(function(e8) {
|
|
3946
|
+
return d2.getResource(t2, n2, e8) !== void 0;
|
|
3947
|
+
});
|
|
3948
|
+
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}}.`);
|
|
3949
|
+
}
|
|
3950
|
+
var m2 = `${e7}${u2}${a2}`;
|
|
3951
|
+
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 {...}}.`);
|
|
3952
|
+
} }, { key: `firstTime`, value: function(e7) {
|
|
3953
|
+
return !this.warned.has(e7) && (this.warned.add(e7), true);
|
|
3954
|
+
} }, { key: `warn`, value: function(e7) {
|
|
3955
|
+
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${cc}`);
|
|
3928
3956
|
} }, { key: `clearCache`, value: function() {
|
|
3929
3957
|
this.mem = {};
|
|
3930
3958
|
} }, { key: `escapeVariableValues`, value: function(e7) {
|
|
3931
|
-
if (!this.options.escapeVariables || !e7 ||
|
|
3959
|
+
if (!this.options.escapeVariables || !e7 || Y(e7) !== `object`) return e7;
|
|
3932
3960
|
for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
|
|
3933
|
-
var i2 =
|
|
3961
|
+
var i2 = Js(r2[n2], 2), a2 = i2[0], o2 = i2[1];
|
|
3934
3962
|
t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`) : o2;
|
|
3935
3963
|
}
|
|
3936
3964
|
return t2;
|
|
@@ -3939,7 +3967,7 @@ var fc = function() {
|
|
|
3939
3967
|
fc.type = `i18nFormat`;
|
|
3940
3968
|
function pc({ icuOptions: e6 = {}, ...t2 }) {
|
|
3941
3969
|
let { parseErrorHandler: n2 = void 0 } = t2;
|
|
3942
|
-
return
|
|
3970
|
+
return wo(t2, { icu: new fc({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
|
|
3943
3971
|
}
|
|
3944
3972
|
var mc = (e6, t2, n2, r2) => {
|
|
3945
3973
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
@@ -4108,21 +4136,21 @@ var Qc = (e6, t2, n2) => {
|
|
|
4108
4136
|
});
|
|
4109
4137
|
};
|
|
4110
4138
|
var $c = (e6) => e6.split(`-`)[0] ?? e6;
|
|
4111
|
-
|
|
4139
|
+
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) });
|
|
4112
4140
|
var el = /* @__PURE__ */ new WeakMap();
|
|
4113
4141
|
function tl(e6) {
|
|
4114
4142
|
let t2 = el.get(e6);
|
|
4115
4143
|
return t2 || (t2 = Xc(e6).finally(() => el.delete(e6)), el.set(e6, t2)), t2;
|
|
4116
4144
|
}
|
|
4117
4145
|
function nl({ i18n: e6, locale: t2 }) {
|
|
4118
|
-
let n2 =
|
|
4146
|
+
let n2 = Mr(), r2 = Ea();
|
|
4119
4147
|
if (!n2) return null;
|
|
4120
4148
|
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw tl(e6);
|
|
4121
4149
|
let i2 = Zc(e6, t2);
|
|
4122
4150
|
return i2 && r2.set(Gc, { locale: t2, messages: i2 }), null;
|
|
4123
4151
|
}
|
|
4124
4152
|
function rl(e6) {
|
|
4125
|
-
let t2 =
|
|
4153
|
+
let t2 = Vr(), n2 = qc()?.locale ?? t2 ?? `en`;
|
|
4126
4154
|
return { i18n: Yc(n2, e6), locale: n2 };
|
|
4127
4155
|
}
|
|
4128
4156
|
var il = g({ default: () => al });
|
|
@@ -4135,17 +4163,17 @@ var ul = (e6, t2) => {
|
|
|
4135
4163
|
let n2 = ll[`../assets/locale/messages_${$c(e6)}${t2}.json`];
|
|
4136
4164
|
return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
|
|
4137
4165
|
};
|
|
4138
|
-
var dl =
|
|
4166
|
+
var dl = ka({ isDev: false, loadMessages: (e6) => ul(e6, ``), loadDevMessages: (e6) => ul(e6, `.dev`) });
|
|
4139
4167
|
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);
|
|
4140
4168
|
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` };
|
|
4141
4169
|
var pl = (e6, t2) => {
|
|
4142
4170
|
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: fl(r2, `full`, t2) });
|
|
4143
4171
|
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) } };
|
|
4144
4172
|
};
|
|
4145
|
-
var ml = (e6) =>
|
|
4173
|
+
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 ?? [];
|
|
4146
4174
|
var hl = `https://blog.wixsite.com/blog-demo-posts`;
|
|
4147
|
-
var gl =
|
|
4148
|
-
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${
|
|
4175
|
+
var gl = F((e6) => async (t2) => {
|
|
4176
|
+
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${I(t2)}`);
|
|
4149
4177
|
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
4150
4178
|
return ml(await n2.json()).filter((e7) => !e7.url?.startsWith(hl));
|
|
4151
4179
|
});
|
|
@@ -4164,14 +4192,14 @@ function bl(e6) {
|
|
|
4164
4192
|
var xl = `@wix/auto_sdk_members_members`;
|
|
4165
4193
|
function Sl(e6) {
|
|
4166
4194
|
function t2({ host: t3 }) {
|
|
4167
|
-
let n2 =
|
|
4168
|
-
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) =>
|
|
4195
|
+
let n2 = N(e6, [{ transformFn: an, paths: yl }]);
|
|
4196
|
+
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 }]) };
|
|
4169
4197
|
}
|
|
4170
4198
|
return t2;
|
|
4171
4199
|
}
|
|
4172
4200
|
function Cl(e6) {
|
|
4173
4201
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
4174
|
-
return
|
|
4202
|
+
return ii({ func: async (r2) => {
|
|
4175
4203
|
let i2 = Sl({ ...r2, ...e6 ?? {} });
|
|
4176
4204
|
n2?.onSiteCall?.();
|
|
4177
4205
|
try {
|
|
@@ -4182,22 +4210,22 @@ function Cl(e6) {
|
|
|
4182
4210
|
}
|
|
4183
4211
|
}, requestTransformer: (t3) => {
|
|
4184
4212
|
let n3 = [t3, e6];
|
|
4185
|
-
return
|
|
4213
|
+
return A({ ...n3?.[1], query: n3?.[0] });
|
|
4186
4214
|
}, responseTransformer: ({ data: e7 }) => {
|
|
4187
|
-
let t3 =
|
|
4215
|
+
let t3 = j(N(e7, []));
|
|
4188
4216
|
return { items: t3?.members, pagingMetadata: t3?.metadata };
|
|
4189
4217
|
}, errorTransformer: (e7) => {
|
|
4190
|
-
throw
|
|
4218
|
+
throw P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
4191
4219
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
4192
4220
|
}
|
|
4193
4221
|
async function wl(e6, t2) {
|
|
4194
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Sl(
|
|
4222
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Sl(A({ query: e6, ...t2 }));
|
|
4195
4223
|
r2?.onSiteCall?.();
|
|
4196
4224
|
try {
|
|
4197
4225
|
let e7 = await n2.request(i2);
|
|
4198
|
-
return r2?.onSuccess?.(e7),
|
|
4226
|
+
return r2?.onSuccess?.(e7), j(e7.data);
|
|
4199
4227
|
} catch (e7) {
|
|
4200
|
-
let t3 =
|
|
4228
|
+
let t3 = P(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
4201
4229
|
throw r2?.onError?.(e7), t3;
|
|
4202
4230
|
}
|
|
4203
4231
|
}
|
|
@@ -4208,13 +4236,13 @@ function El(e6) {
|
|
|
4208
4236
|
return (t2, n2) => wl(t2, n2, { httpClient: e6 });
|
|
4209
4237
|
}
|
|
4210
4238
|
function Dl(e6) {
|
|
4211
|
-
let t2 =
|
|
4239
|
+
let t2 = mi({ builderQueryFunction: (t3) => Tl(e6)(t3), typedQueryFunction: (t3, n3) => El(e6)(t3, n3), hasOptionsParameter: true });
|
|
4212
4240
|
function n2(e7, n3) {
|
|
4213
4241
|
return t2(...arguments);
|
|
4214
4242
|
}
|
|
4215
4243
|
return n2;
|
|
4216
4244
|
}
|
|
4217
|
-
var Ol =
|
|
4245
|
+
var Ol = F(Dl);
|
|
4218
4246
|
var kl = async (e6) => {
|
|
4219
4247
|
let t2 = [...new Set(e6.filter((e7) => !!e7))];
|
|
4220
4248
|
if (t2.length === 0) return {};
|
|
@@ -4228,7 +4256,7 @@ var kl = async (e6) => {
|
|
|
4228
4256
|
return {};
|
|
4229
4257
|
}
|
|
4230
4258
|
};
|
|
4231
|
-
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` }];
|
|
4259
|
+
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` }];
|
|
4232
4260
|
var jl = [{ path: `posts.richContentCompressed` }];
|
|
4233
4261
|
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` }];
|
|
4234
4262
|
var Nl = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
@@ -4238,8 +4266,8 @@ function Pl(e6) {
|
|
|
4238
4266
|
var Fl = `@wix/auto_sdk_blog_posts`;
|
|
4239
4267
|
function Il(e6) {
|
|
4240
4268
|
function t2({ host: t3 }) {
|
|
4241
|
-
let n2 =
|
|
4242
|
-
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) =>
|
|
4269
|
+
let n2 = N(e6, [{ transformFn: an, paths: Nl }]);
|
|
4270
|
+
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 }]) };
|
|
4243
4271
|
}
|
|
4244
4272
|
return t2;
|
|
4245
4273
|
}
|
|
@@ -4252,7 +4280,7 @@ function Ll() {
|
|
|
4252
4280
|
}
|
|
4253
4281
|
var Rl = Ll();
|
|
4254
4282
|
var zl = (e6) => (t2) => ({ method: `POST`, url: Rl.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4255
|
-
var Bl =
|
|
4283
|
+
var Bl = F((e6) => async (t2) => {
|
|
4256
4284
|
let { data: n2 } = await e6.request(zl(t2)), r2 = {};
|
|
4257
4285
|
for (let e7 of n2.posts ?? []) {
|
|
4258
4286
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
@@ -4271,8 +4299,8 @@ var Vl = async (e6) => {
|
|
|
4271
4299
|
}
|
|
4272
4300
|
};
|
|
4273
4301
|
var Hl = `TRANSLATIONS`;
|
|
4274
|
-
|
|
4275
|
-
var Ul = [
|
|
4302
|
+
U.RICH_CONTENT, U.SEO, U.URL, U.CONTENT_TEXT, U.RICH_CONTENT, U.URL;
|
|
4303
|
+
var Ul = [U.URL, U.METRICS];
|
|
4276
4304
|
var Wl = (e6) => {
|
|
4277
4305
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4278
4306
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
@@ -4282,7 +4310,7 @@ var Kl = (e6) => Vl(e6.filter((e7) => e7.media?.wixMedia?.videoV2).map(({ _id: e
|
|
|
4282
4310
|
var ql = 100;
|
|
4283
4311
|
var Jl = async () => {
|
|
4284
4312
|
try {
|
|
4285
|
-
let { categories: e6 } = await
|
|
4313
|
+
let { categories: e6 } = await Gi({ paging: { limit: ql } });
|
|
4286
4314
|
return e6 ?? [];
|
|
4287
4315
|
} catch {
|
|
4288
4316
|
return [];
|
|
@@ -4300,7 +4328,7 @@ var Xl = (e6, t2) => {
|
|
|
4300
4328
|
return n2;
|
|
4301
4329
|
};
|
|
4302
4330
|
var Zl = async ({ ids: e6, currentPostId: t2, limit: n2 }) => {
|
|
4303
|
-
let { items: r2 } = await
|
|
4331
|
+
let { items: r2 } = await pa({ fieldsets: Ul }).in(`_id`, e6).limit(n2).find(), i2 = new Map(r2.map((e7) => {
|
|
4304
4332
|
let { _id: t3 } = e7;
|
|
4305
4333
|
return [t3, e7];
|
|
4306
4334
|
}));
|
|
@@ -4319,26 +4347,26 @@ var tu = (e6, t2, n2) => {
|
|
|
4319
4347
|
return e6.set(t2, i2), i2;
|
|
4320
4348
|
};
|
|
4321
4349
|
var nu = (e6, t2) => tu($l, `${e6}|${t2 ?? ``}`, async () => {
|
|
4322
|
-
let { category: n2 } = await
|
|
4350
|
+
let { category: n2 } = await Wi(e6, { fieldsets: [Hl], ...t2 && { language: t2 } });
|
|
4323
4351
|
return n2;
|
|
4324
4352
|
});
|
|
4325
4353
|
var ru = (e6) => tu($l, `${e6}|*`, async () => {
|
|
4326
|
-
let { items: t2 } = await
|
|
4354
|
+
let { items: t2 } = await Ki().eq(`slug`, e6).limit(1).find();
|
|
4327
4355
|
return t2[0];
|
|
4328
4356
|
});
|
|
4329
4357
|
var iu = (e6, t2) => tu(eu, `${e6}|${t2 ?? ``}`, async () => {
|
|
4330
|
-
let { tag: n2 } = await
|
|
4358
|
+
let { tag: n2 } = await xa(e6, { ...t2 && { language: t2 } });
|
|
4331
4359
|
return n2;
|
|
4332
4360
|
});
|
|
4333
4361
|
var au = /* @__PURE__ */ new Map();
|
|
4334
4362
|
var ou = (e6, t2) => {
|
|
4335
4363
|
let n2 = `${e6}|${t2 ?? ``}`, r2 = au.get(n2);
|
|
4336
4364
|
if (r2) return r2;
|
|
4337
|
-
let i2 =
|
|
4365
|
+
let i2 = Ui(e6).then(async ({ category: e7 }) => {
|
|
4338
4366
|
let { _id: n3, translationId: r3, language: i3 } = e7 ?? {};
|
|
4339
4367
|
if (!n3) return null;
|
|
4340
4368
|
if (!t2 || !r3 || i3 === t2) return n3;
|
|
4341
|
-
let { items: a2 } = await
|
|
4369
|
+
let { items: a2 } = await Ki().eq(`translationId`, r3).eq(`language`, t2).limit(1).find();
|
|
4342
4370
|
return a2[0]?._id ?? null;
|
|
4343
4371
|
}).catch((e7) => {
|
|
4344
4372
|
if (Wl(e7)) return null;
|
|
@@ -4348,7 +4376,7 @@ var ou = (e6, t2) => {
|
|
|
4348
4376
|
};
|
|
4349
4377
|
var su = async (e6, t2) => {
|
|
4350
4378
|
try {
|
|
4351
|
-
let { items: n2 } = await
|
|
4379
|
+
let { items: n2 } = await Ki().eq(`translationId`, e6).eq(`language`, t2).limit(1).find();
|
|
4352
4380
|
return n2[0]?.slug ?? void 0;
|
|
4353
4381
|
} catch {
|
|
4354
4382
|
return;
|
|
@@ -4378,7 +4406,7 @@ var du = async ({ offset: e6, limit: t2, language: n2, categoryId: r2, categoryS
|
|
|
4378
4406
|
if (!e7) return Ql();
|
|
4379
4407
|
l3 = [e7];
|
|
4380
4408
|
}
|
|
4381
|
-
let h2 = s2 ? lu[s2] : void 0, g2 = m2 ?? (await
|
|
4409
|
+
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)]);
|
|
4382
4410
|
return { posts: g2, hasMore: !m2 && g2.length === t2, authorsByMemberId: _2, categoryLabelsById: Xl(g2, v2), videoSourcesByPostId: y2, ...f2 && { filterCategory: f2 }, ...p2 && { filterTag: p2 } };
|
|
4383
4411
|
} catch (e7) {
|
|
4384
4412
|
if (l2) throw e7;
|
|
@@ -4396,7 +4424,7 @@ var hu = class extends e {
|
|
|
4396
4424
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4397
4425
|
}
|
|
4398
4426
|
componentDidCatch(e6, t2) {
|
|
4399
|
-
|
|
4427
|
+
Er(this.props.monitoringClient, e6, { feature: this.props.feature, action: `render`, contexts: { react: { componentStack: t2.componentStack } } });
|
|
4400
4428
|
}
|
|
4401
4429
|
render() {
|
|
4402
4430
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4457,7 +4485,7 @@ var Mu = (e6) => {
|
|
|
4457
4485
|
var Nu = (e6, t2 = []) => {
|
|
4458
4486
|
let n2 = e6?.media;
|
|
4459
4487
|
if (!n2 || n2.displayed === false) return;
|
|
4460
|
-
let r2 =
|
|
4488
|
+
let r2 = nr(e6);
|
|
4461
4489
|
if (r2) return { kind: `image`, image: r2 };
|
|
4462
4490
|
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? Ou(n2.wixMedia.videoV2) : void 0;
|
|
4463
4491
|
if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
|
|
@@ -4468,9 +4496,9 @@ var Nu = (e6, t2 = []) => {
|
|
|
4468
4496
|
}
|
|
4469
4497
|
};
|
|
4470
4498
|
var Pu = (e6) => {
|
|
4471
|
-
let t2 =
|
|
4499
|
+
let t2 = nr(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4472
4500
|
if (t2 || !n2) return t2;
|
|
4473
|
-
let r2 = Ou(n2), i2 =
|
|
4501
|
+
let r2 = Ou(n2), i2 = tr(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4474
4502
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4475
4503
|
};
|
|
4476
4504
|
var Fu = `2026-05-12T12:00:00.000Z`;
|
|
@@ -4496,12 +4524,12 @@ var Uu = (e6, t2, n2, r2) => {
|
|
|
4496
4524
|
};
|
|
4497
4525
|
var Wu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4498
4526
|
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = Vu(e6);
|
|
4499
|
-
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:
|
|
4527
|
+
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 };
|
|
4500
4528
|
};
|
|
4501
4529
|
var Gu = (e6, t2, n2 = []) => {
|
|
4502
4530
|
let r2 = Nu(e6, n2);
|
|
4503
4531
|
if (!r2) return;
|
|
4504
|
-
let i2 =
|
|
4532
|
+
let i2 = fr(e6, t2), a2 = { slug: e6.slug ?? void 0, title: e6.title ?? ``, description: e6.excerpt ?? ``, ...i2 ? { action: { link: i2 } } : {} };
|
|
4505
4533
|
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;
|
|
4506
4534
|
if (r2.kind === `wixVideo`) {
|
|
4507
4535
|
let e7 = r2.sources[0]?.url;
|
|
@@ -4543,7 +4571,7 @@ var ad = { ...id, isLoadingPosts: false, hasError: true };
|
|
|
4543
4571
|
var od = (e6, t2) => {
|
|
4544
4572
|
if (e6.kind === `category` && t2.filterCategory) {
|
|
4545
4573
|
let { label: e7, description: n2, coverImage: r2 } = t2.filterCategory, i2 = e7 ?? ``;
|
|
4546
|
-
return { kind: `category`, title: i2, description: n2 ?? ``, coverImage:
|
|
4574
|
+
return { kind: `category`, title: i2, description: n2 ?? ``, coverImage: tr(r2, i2) };
|
|
4547
4575
|
}
|
|
4548
4576
|
return e6.kind === `tag` && t2.filterTag ? { kind: `tag`, title: t2.filterTag.label ?? `` } : { kind: `all` };
|
|
4549
4577
|
};
|
|
@@ -4554,27 +4582,27 @@ var ld = (e6) => {
|
|
|
4554
4582
|
};
|
|
4555
4583
|
var ud = (e6, t2) => Ln(e6, sd, t2 ? ld : cd);
|
|
4556
4584
|
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 }) => {
|
|
4557
|
-
let { page: v2, hasError: y2 } = Fn(t2), b2 =
|
|
4558
|
-
|
|
4559
|
-
let { t: C2 } = Pc(), w2 =
|
|
4560
|
-
if (
|
|
4561
|
-
if (fe2.current) return le2(true),
|
|
4585
|
+
let { page: v2, hasError: y2 } = Fn(t2), b2 = jr(v2.fetchedAt), x2 = Yr(), S2 = Fr();
|
|
4586
|
+
kr(i2, v2, S2, n2), wa(i2.kind === `category` ? v2.mismatchedCategory : void 0, r2, su);
|
|
4587
|
+
let { t: C2 } = Pc(), w2 = Hr(), T2 = c(() => pl(C2, w2), [C2, w2]), [E2, ee2] = u(v2.posts), [D2, te2] = u(v2.authorsByMemberId), [ne2, re2] = u(v2.categoryLabelsById), [ie2, ae2] = u(v2.videoSourcesByPostId), [oe2, se2] = u(v2.hasMore), [ce2, le2] = u(false), [O2, ue2] = u(y2), de2 = l(h2 + v2.posts.length), fe2 = l(v2.hasMore), pe2 = l(null), me2 = a(async () => {
|
|
4588
|
+
if (pe2.current) return pe2.current;
|
|
4589
|
+
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) => {
|
|
4562
4590
|
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);
|
|
4563
4591
|
}).catch((e7) => {
|
|
4564
|
-
ue2(true),
|
|
4592
|
+
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 } } });
|
|
4565
4593
|
}).finally(() => {
|
|
4566
|
-
|
|
4567
|
-
}),
|
|
4568
|
-
}, [r2, o2, s2, d2, f2, m2, g2, _2, n2]),
|
|
4594
|
+
pe2.current = null, le2(false);
|
|
4595
|
+
}), pe2.current;
|
|
4596
|
+
}, [r2, o2, s2, d2, f2, m2, g2, _2, n2]), he2 = c(() => {
|
|
4569
4597
|
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);
|
|
4570
|
-
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:
|
|
4571
|
-
}, [i2, v2, E2, D2, ne2, ie2, T2, w2, S2, x2, b2, O2, _2, o2, f2, s2, d2, oe2, ce2,
|
|
4572
|
-
return
|
|
4598
|
+
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) };
|
|
4599
|
+
}, [i2, v2, E2, D2, ne2, ie2, T2, w2, S2, x2, b2, O2, _2, o2, f2, s2, d2, oe2, ce2, me2]);
|
|
4600
|
+
return Rr(Ir.feedProvider, O2 ? `error` : E2.length > 0 ? `data` : `empty`), p(Qu.Provider, { value: he2, children: e6 });
|
|
4573
4601
|
};
|
|
4574
4602
|
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}`;
|
|
4575
4603
|
function pd({ children: e6, categoryPicker: n2, postsPicker: r2, pageSize: i2, postOffset: a2, sortOrder: o2, featuredOnly: s2, liveRefreshGeneration: l2 = 0 }) {
|
|
4576
|
-
let u2 =
|
|
4577
|
-
return p(Fc, { i18n: E2, children: m(t, { fallback: p(Qu.Provider, { value: id, children: e6 }), children: [p(nl, { i18n: E2, locale: ee2 }), p(hu, { fallback: p(Qu.Provider, { value: ad, children: e6 }), feature:
|
|
4604
|
+
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 = c(() => 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]);
|
|
4605
|
+
return p(Fc, { i18n: E2, children: m(t, { fallback: p(Qu.Provider, { value: id, children: e6 }), children: [p(nl, { i18n: E2, locale: ee2 }), p(hu, { fallback: p(Qu.Provider, { value: ad, children: e6 }), feature: Cr.feed, monitoringClient: T2, rethrow: d2, children: p(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}`) })] }) });
|
|
4578
4606
|
}
|
|
4579
4607
|
var md = En(`ada94d8c-4889-444e-b773-f1a875693fdb`);
|
|
4580
4608
|
export {
|