@wix/blog 1.0.709 → 1.0.710
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_sdk-exports/context-blog-feed/runtime.js +4 -4
- package/_sdk-exports/context-post-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 +2 -2
- package/_sdk-exports/context-related-posts/runtime.js +3 -3
- package/build/cjs/context-blog-feed.js +1205 -1177
- package/build/cjs/context-blog-feed.js.map +1 -1
- package/build/cjs/context-post-by-id.js +1148 -1120
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.js +1282 -1254
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/cjs/context-post-list-item.js +5 -5
- package/build/cjs/context-post-list-item.js.map +1 -1
- package/build/cjs/context-related-posts.js +821 -793
- package/build/cjs/context-related-posts.js.map +1 -1
- package/build/es/context-blog-feed.mjs +1205 -1177
- package/build/es/context-blog-feed.mjs.map +1 -1
- package/build/es/context-post-by-id.mjs +1148 -1120
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.mjs +1282 -1254
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/context-post-list-item.mjs +5 -5
- package/build/es/context-post-list-item.mjs.map +1 -1
- package/build/es/context-related-posts.mjs +821 -793
- package/build/es/context-related-posts.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -3,16 +3,17 @@ import { Component as e, Suspense as t, createContext as n, createElement as r,
|
|
|
3
3
|
import { useGetService as d, useService as f } from "@wix/services-manager-react";
|
|
4
4
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
5
5
|
var h = Object.defineProperty;
|
|
6
|
-
var g = (e6, t2) => {
|
|
6
|
+
var g = (e6, t2) => () => (t2 || (e6((t2 = { exports: {} }).exports, t2, t2.exports), e6 = null), t2.exports);
|
|
7
|
+
var _ = (e6, t2) => {
|
|
7
8
|
let n2 = {};
|
|
8
9
|
for (var r2 in e6) h(n2, r2, { get: e6[r2], enumerable: true });
|
|
9
10
|
return t2 || h(n2, Symbol.toStringTag, { value: `Module` }), n2;
|
|
10
11
|
};
|
|
11
|
-
var
|
|
12
|
-
function
|
|
12
|
+
var v = {};
|
|
13
|
+
function y(e6, t2 = false, n2 = (e7) => e7) {
|
|
13
14
|
return () => ({ __type: `event-definition`, type: e6, isDomainEvent: t2, transformations: n2 });
|
|
14
15
|
}
|
|
15
|
-
var
|
|
16
|
+
var b = (e6) => {
|
|
16
17
|
switch (e6) {
|
|
17
18
|
case `get`:
|
|
18
19
|
case `GET`:
|
|
@@ -39,11 +40,11 @@ var y = (e6) => {
|
|
|
39
40
|
throw Error(`Unknown method: ${e6}`);
|
|
40
41
|
}
|
|
41
42
|
};
|
|
42
|
-
var
|
|
43
|
+
var x = (e6) => (t2) => async (n2) => {
|
|
43
44
|
let r2, i2 = (t3) => {
|
|
44
45
|
if (r2 = e6(n2)(t3), r2.url === void 0) throw Error(`Url was not successfully created for this request, please reach out to support channels for assistance.`);
|
|
45
46
|
let { method: i3, url: a2, params: o2 } = r2;
|
|
46
|
-
return { ...r2, method:
|
|
47
|
+
return { ...r2, method: b(i3), url: a2, data: r2.data, params: o2 };
|
|
47
48
|
};
|
|
48
49
|
try {
|
|
49
50
|
let e7 = await t2.request(i2);
|
|
@@ -56,10 +57,10 @@ var b = (e6) => (t2) => async (n2) => {
|
|
|
56
57
|
throw typeof e7 == `object` && e7 && `response` in e7 && typeof e7.response == `object` && e7.response !== null && `data` in e7.response ? e7.response.data : e7;
|
|
57
58
|
}
|
|
58
59
|
};
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
60
|
+
var S = (e6) => e6.__isAmbassador ? true : !!e6().__isAmbassador;
|
|
61
|
+
var C = `__metadata`;
|
|
62
|
+
var ee = `edge.wixapis.com`;
|
|
63
|
+
var w = class extends Error {
|
|
63
64
|
message;
|
|
64
65
|
response;
|
|
65
66
|
constructor(e6, t2) {
|
|
@@ -67,108 +68,108 @@ var ee = class extends Error {
|
|
|
67
68
|
}
|
|
68
69
|
async details() {
|
|
69
70
|
let e6 = await this.response.json();
|
|
70
|
-
return
|
|
71
|
+
return T(this.response.status, e6?.message, e6?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e6 });
|
|
71
72
|
}
|
|
72
73
|
};
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
function
|
|
74
|
+
var T = (e6, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
|
|
75
|
+
var te = (e6) => e6?.method && [`post`, `put`, `patch`].includes(e6.method.toLocaleLowerCase()) && e6.body ? { "Content-Type": `application/json` } : {};
|
|
76
|
+
var ne = (e6) => e6 && typeof e6 == `object` && !Array.isArray(e6);
|
|
77
|
+
var re = (e6) => e6.__type === `host`;
|
|
78
|
+
function ie(e6, t2) {
|
|
78
79
|
return e6.create(t2);
|
|
79
80
|
}
|
|
80
|
-
var
|
|
81
|
-
function
|
|
82
|
-
return { [
|
|
81
|
+
var ae = `x-wix-bi-gateway`;
|
|
82
|
+
function oe(e6, t2, n2) {
|
|
83
|
+
return { [ae]: se({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e6.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e6.methodFqn, entity: e6.entityFqdn }) };
|
|
83
84
|
}
|
|
84
|
-
function
|
|
85
|
+
function se(e6) {
|
|
85
86
|
return Object.entries(e6).filter(([e7, t2]) => !!t2).map(([e7, t2]) => `${e7}=${t2}`).join(`,`);
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
89
|
-
globalThis.__wix_context__ = void 0,
|
|
88
|
+
function ce(e6) {
|
|
89
|
+
let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
|
|
90
|
+
globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
90
91
|
try {
|
|
91
92
|
return e6();
|
|
92
93
|
} finally {
|
|
93
|
-
globalThis.__wix_context__ = t2,
|
|
94
|
+
globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
|
-
var
|
|
97
|
-
function
|
|
98
|
-
return
|
|
97
|
+
var le = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
98
|
+
function ue(e6) {
|
|
99
|
+
return he(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
|
|
99
100
|
}
|
|
100
|
-
var
|
|
101
|
-
var
|
|
102
|
-
var
|
|
103
|
-
var
|
|
104
|
-
function
|
|
101
|
+
var de = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
102
|
+
var fe = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
103
|
+
var pe = `$1\0$2`;
|
|
104
|
+
var me = /[^\p{L}\d]+/giu;
|
|
105
|
+
function he(e6) {
|
|
105
106
|
let t2 = e6.trim();
|
|
106
|
-
t2 = t2.replace(
|
|
107
|
+
t2 = t2.replace(de, pe).replace(fe, pe), t2 = t2.replace(me, `\0`);
|
|
107
108
|
let n2 = 0, r2 = t2.length;
|
|
108
109
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
109
110
|
if (n2 === r2) return [];
|
|
110
111
|
for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
|
|
111
112
|
return t2.slice(n2, r2).split(/\0/g);
|
|
112
113
|
}
|
|
113
|
-
var
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
function
|
|
114
|
+
var ge = (e6) => `validationError` in (e6.response?.data?.details ?? {});
|
|
115
|
+
var _e = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
|
|
116
|
+
var ve = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
|
|
117
|
+
function ye(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
117
118
|
if (typeof e6 != `object` || !e6) throw e6;
|
|
118
|
-
if (
|
|
119
|
-
if (
|
|
120
|
-
if (
|
|
121
|
-
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code:
|
|
122
|
-
return
|
|
119
|
+
if (ge(e6)) return be(e6, t2, n2);
|
|
120
|
+
if (_e(e6)) return Se(e6);
|
|
121
|
+
if (ve(e6)) {
|
|
122
|
+
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: ue(n3), data: {} }, requestId: e6.requestId };
|
|
123
|
+
return xe(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
123
124
|
}
|
|
124
|
-
return
|
|
125
|
+
return Ce(e6);
|
|
125
126
|
}
|
|
126
|
-
var
|
|
127
|
-
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 =
|
|
128
|
-
return
|
|
127
|
+
var be = (e6, t2, n2) => {
|
|
128
|
+
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = we(t2, a2, n2)?.sort((e7, t3) => e7.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e7, description: t3 }) => `"${e7}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
|
|
129
|
+
return xe(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
|
|
129
130
|
};
|
|
130
|
-
var
|
|
131
|
-
var
|
|
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 ??
|
|
133
|
-
return
|
|
131
|
+
var xe = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
|
|
132
|
+
var Se = (e6) => {
|
|
133
|
+
let t2 = e6.response?.status, n2 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n2, i2 = e6.response?.data?.details?.applicationError?.description ?? n2, a2 = e6.response?.data?.details?.applicationError?.code ?? ue(n2), o2 = e6.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e6.requestId };
|
|
134
|
+
return xe(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
|
|
134
135
|
};
|
|
135
|
-
var
|
|
136
|
-
var
|
|
136
|
+
var Ce = (e6) => xe(e6, { message: e6.requestId ? `System error occurred, request-id: ${e6.requestId}` : `System error occurred: ${JSON.stringify(e6)}`, extraProperties: { requestId: e6.requestId, status: e6.response?.status, code: ue(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
|
|
137
|
+
var we = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
137
138
|
let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
|
|
138
139
|
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
140
|
let r3 = t2[e7.field];
|
|
140
|
-
if (r3) return { ...e7, field:
|
|
141
|
+
if (r3) return { ...e7, field: Te(r3, i2) };
|
|
141
142
|
let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
|
|
142
143
|
if (s2) {
|
|
143
144
|
let t3 = a2[s2];
|
|
144
|
-
if (t3) return { ...e7, field: e7.field.replace(s2,
|
|
145
|
+
if (t3) return { ...e7, field: e7.field.replace(s2, Te(t3, i2)) };
|
|
145
146
|
}
|
|
146
147
|
return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
|
|
147
148
|
});
|
|
148
149
|
};
|
|
149
|
-
var
|
|
150
|
-
let n2 =
|
|
150
|
+
var Te = (e6, t2) => {
|
|
151
|
+
let n2 = Ee(e6);
|
|
151
152
|
return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
|
|
152
153
|
};
|
|
153
|
-
var
|
|
154
|
+
var Ee = (e6) => {
|
|
154
155
|
let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
|
|
155
156
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
156
157
|
};
|
|
157
|
-
function
|
|
158
|
-
return
|
|
158
|
+
function De(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
159
|
+
return ce(() => e6({ request: async (e7) => {
|
|
159
160
|
let i3 = e7({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
|
|
160
161
|
a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
|
|
161
|
-
let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ?
|
|
162
|
+
let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? ee : o3}${a3.url}`;
|
|
162
163
|
a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
|
|
163
164
|
try {
|
|
164
|
-
let e8 =
|
|
165
|
+
let e8 = oe(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e8 } }, s3 = await n2(u3, o4);
|
|
165
166
|
if (s3.status !== 200) {
|
|
166
167
|
let e9 = null;
|
|
167
168
|
try {
|
|
168
169
|
e9 = await s3.json();
|
|
169
170
|
} catch {
|
|
170
171
|
}
|
|
171
|
-
let t3 =
|
|
172
|
+
let t3 = ke(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = ye(t3);
|
|
172
173
|
throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
|
|
173
174
|
}
|
|
174
175
|
let l3 = await s3.json();
|
|
@@ -178,18 +179,18 @@ function Ee(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
|
178
179
|
}
|
|
179
180
|
}, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
|
|
180
181
|
}
|
|
181
|
-
var
|
|
182
|
+
var Oe = class extends Error {
|
|
182
183
|
response;
|
|
183
184
|
requestId;
|
|
184
185
|
constructor(e6) {
|
|
185
186
|
super(), this.response = e6.response, this.requestId = e6.requestId;
|
|
186
187
|
}
|
|
187
188
|
};
|
|
188
|
-
var
|
|
189
|
-
var
|
|
190
|
-
function
|
|
189
|
+
var ke = (e6, t2, n2, r2) => new Oe({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2 }, status: e6 }, requestId: r2?.requestId });
|
|
190
|
+
var Ae = `.`;
|
|
191
|
+
function je(e6, t2, n2) {
|
|
191
192
|
if (e6 == null) throw Error(`Cannot set value on null or undefined`);
|
|
192
|
-
let r2 =
|
|
193
|
+
let r2 = Me(t2), i2 = e6;
|
|
193
194
|
for (let e7 = 0; e7 < r2.length; e7++) {
|
|
194
195
|
let t3 = r2[e7];
|
|
195
196
|
if (e7 === r2.length - 1) {
|
|
@@ -201,21 +202,21 @@ function Ae(e6, t2, n2) {
|
|
|
201
202
|
}
|
|
202
203
|
return e6;
|
|
203
204
|
}
|
|
204
|
-
function je(e6) {
|
|
205
|
-
return Array.isArray(e6) ? e6 : e6.split(ke).map((e7) => Me(e7) ? Number(e7) : e7);
|
|
206
|
-
}
|
|
207
205
|
function Me(e6) {
|
|
208
|
-
return
|
|
206
|
+
return Array.isArray(e6) ? e6 : e6.split(Ae).map((e7) => Ne(e7) ? Number(e7) : e7);
|
|
209
207
|
}
|
|
210
208
|
function Ne(e6) {
|
|
209
|
+
return /^\d+$/.test(e6);
|
|
210
|
+
}
|
|
211
|
+
function Pe(e6) {
|
|
211
212
|
let t2 = {};
|
|
212
|
-
for (let [n2, r2] of Object.entries(e6))
|
|
213
|
+
for (let [n2, r2] of Object.entries(e6)) Fe(n2) || je(t2, Me(n2), r2);
|
|
213
214
|
return t2;
|
|
214
215
|
}
|
|
215
|
-
function
|
|
216
|
+
function Fe(e6) {
|
|
216
217
|
return e6 === `__proto__` || e6 === `constructor` || e6 === `prototype`;
|
|
217
218
|
}
|
|
218
|
-
var
|
|
219
|
+
var Ie = class {
|
|
219
220
|
BRACKET_PATTERN = /\[(\d+)\]/g;
|
|
220
221
|
NUMERIC_PATTERN = /^\d+$/;
|
|
221
222
|
ESCAPED_DOT_PATTERN = /\\\./g;
|
|
@@ -238,7 +239,7 @@ var Fe = class {
|
|
|
238
239
|
return e6.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
|
|
239
240
|
}
|
|
240
241
|
unflatten() {
|
|
241
|
-
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])),
|
|
242
|
+
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])), Pe(this.cleanedModifiedFields);
|
|
242
243
|
}
|
|
243
244
|
flatten(e6) {
|
|
244
245
|
let t2 = {};
|
|
@@ -258,12 +259,12 @@ var Fe = class {
|
|
|
258
259
|
if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
|
|
259
260
|
r2.push(`[${e7}]`), n2 = n2[parseInt(e7, 10)];
|
|
260
261
|
}, a2 = (e7, t3) => {
|
|
261
|
-
let i3 = e7 in
|
|
262
|
+
let i3 = e7 in le ? le[e7] : void 0;
|
|
262
263
|
if (i3 && i3 in t3) {
|
|
263
264
|
r2.push(i3), n2 = t3[i3];
|
|
264
265
|
return;
|
|
265
266
|
}
|
|
266
|
-
let a3 =
|
|
267
|
+
let a3 = Be(e7);
|
|
267
268
|
if (a3 && a3 in t3) r2.push(a3), n2 = t3[a3];
|
|
268
269
|
else throw Error(`Cannot find key '${e7}' or its transformations at path ${this.buildPathString(r2)}`);
|
|
269
270
|
}, o2 = (e7, t3) => {
|
|
@@ -287,28 +288,28 @@ var Fe = class {
|
|
|
287
288
|
return e6.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e6[r2 - 1] === `\\` ? t2 : `.` + n2);
|
|
288
289
|
}
|
|
289
290
|
};
|
|
290
|
-
function
|
|
291
|
+
function Le(e6, t2) {
|
|
291
292
|
let n2 = e6?.modifiedFields;
|
|
292
293
|
if (!n2) return null;
|
|
293
|
-
let r2 =
|
|
294
|
+
let r2 = Re(n2);
|
|
294
295
|
if (!r2) return null;
|
|
295
296
|
let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
|
|
296
297
|
e6 = { ...e6, modifiedFields: i2 };
|
|
297
298
|
let o2 = t2(e6), s2 = o2?.modifiedFields;
|
|
298
299
|
if (!s2) return null;
|
|
299
|
-
let c2 =
|
|
300
|
+
let c2 = ze(s2, a2);
|
|
300
301
|
return c2 === null ? null : (o2.modifiedFields = c2, o2);
|
|
301
302
|
}
|
|
302
|
-
function
|
|
303
|
+
function Re(e6) {
|
|
303
304
|
if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
|
|
304
|
-
let t2 = new
|
|
305
|
+
let t2 = new Ie(e6);
|
|
305
306
|
return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
|
|
306
307
|
} catch {
|
|
307
308
|
return null;
|
|
308
309
|
}
|
|
309
310
|
return null;
|
|
310
311
|
}
|
|
311
|
-
function
|
|
312
|
+
function ze(e6, t2) {
|
|
312
313
|
if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
|
|
313
314
|
return t2.flatten(e6);
|
|
314
315
|
} catch {
|
|
@@ -316,10 +317,10 @@ function Re(e6, t2) {
|
|
|
316
317
|
}
|
|
317
318
|
return null;
|
|
318
319
|
}
|
|
319
|
-
function
|
|
320
|
+
function Be(e6) {
|
|
320
321
|
return e6.replace(/[-_\s]+(.)?/g, (e7, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e7) => e7.toLowerCase());
|
|
321
322
|
}
|
|
322
|
-
function
|
|
323
|
+
function Ve() {
|
|
323
324
|
return { emit(e6, ...t2) {
|
|
324
325
|
for (let n2 = 0, r2 = this.events[e6] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
|
|
325
326
|
}, events: {}, on(e6, t2) {
|
|
@@ -328,8 +329,8 @@ function Be() {
|
|
|
328
329
|
};
|
|
329
330
|
} };
|
|
330
331
|
}
|
|
331
|
-
var
|
|
332
|
-
function
|
|
332
|
+
var He = (e6) => e6.__type === `event-definition`;
|
|
333
|
+
function Ue(e6, t2, n2, r2) {
|
|
333
334
|
let i2;
|
|
334
335
|
if (e6.isDomainEvent) {
|
|
335
336
|
let { deletedEvent: e7, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
|
|
@@ -340,14 +341,14 @@ function He(e6, t2, n2, r2) {
|
|
|
340
341
|
let e7 = s2.modifiedFields;
|
|
341
342
|
if (typeof e7 == `object` && e7 && !Array.isArray(e7)) {
|
|
342
343
|
o2 = structuredClone(i2);
|
|
343
|
-
let e8 =
|
|
344
|
+
let e8 = Le(s2, a2);
|
|
344
345
|
if (e8) return t2(e8);
|
|
345
346
|
}
|
|
346
347
|
}
|
|
347
348
|
return t2(a2(o2));
|
|
348
349
|
}
|
|
349
|
-
function
|
|
350
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
350
|
+
function We(e6) {
|
|
351
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = Ve();
|
|
351
352
|
return { initModule(e7) {
|
|
352
353
|
return (r2) => {
|
|
353
354
|
let i2 = t2.get(e7.type) ?? [];
|
|
@@ -357,7 +358,7 @@ function Ue(e6) {
|
|
|
357
358
|
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
359
|
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
360
|
let l2 = t2.get(r2) ?? [];
|
|
360
|
-
return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) =>
|
|
361
|
+
return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) => Ue(e8, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
|
|
361
362
|
}, async processRequest(e7, t3) {
|
|
362
363
|
let n3 = await e7.text();
|
|
363
364
|
return this.process(n3, t3);
|
|
@@ -376,12 +377,12 @@ function Ue(e6) {
|
|
|
376
377
|
let n3 = Array.from(t2.keys()).map((e8) => ({ type: e8 }));
|
|
377
378
|
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
379
|
let r2 = t2.get(e7.eventType) ?? [];
|
|
379
|
-
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) =>
|
|
380
|
-
}, apps: { AppInstalled:
|
|
380
|
+
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Ue(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
|
|
381
|
+
}, apps: { AppInstalled: y(`AppInstalled`)(), AppRemoved: y(`AppRemoved`)() } } };
|
|
381
382
|
}
|
|
382
|
-
var
|
|
383
|
-
function
|
|
384
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
383
|
+
var Ge = (e6) => e6.__type === `service-plugin-definition`;
|
|
384
|
+
function Ke(e6) {
|
|
385
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = Ve();
|
|
385
386
|
return { initModule(e7) {
|
|
386
387
|
return (r2) => {
|
|
387
388
|
let i2 = t2.get(e7.componentType.toLowerCase()) ?? [];
|
|
@@ -423,42 +424,42 @@ function Ge(e6) {
|
|
|
423
424
|
} } };
|
|
424
425
|
}
|
|
425
426
|
var E = `X-Wix-Consistent`;
|
|
426
|
-
function
|
|
427
|
+
function qe(e6) {
|
|
427
428
|
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
429
|
let i3 = o2(), s3 = await a2(), c3 = { ...r3?.headers ?? {}, ...s3.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [E]: t2[E] } : {} }, l3 = e6.host?.getErrorHandler?.();
|
|
429
430
|
try {
|
|
430
431
|
if (typeof n3 == `string` || n3 instanceof URL) {
|
|
431
432
|
let e7 = await i3(n3, { ...r3, headers: c3 });
|
|
432
433
|
l3?.handleError(e7, { requestOptions: { url: n3.toString(), method: r3?.method } });
|
|
433
|
-
let a3 =
|
|
434
|
+
let a3 = Je(e7);
|
|
434
435
|
return a3 && (t2[E] = a3), e7;
|
|
435
436
|
}
|
|
436
437
|
{
|
|
437
438
|
for (let [e8, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e8, t3);
|
|
438
439
|
let e7 = await i3(n3, r3);
|
|
439
440
|
l3?.handleError(e7, { requestOptions: { url: n3.url, method: r3?.method } });
|
|
440
|
-
let a3 =
|
|
441
|
+
let a3 = Je(e7);
|
|
441
442
|
return a3 && (t2[E] = a3), e7;
|
|
442
443
|
}
|
|
443
444
|
} catch (e7) {
|
|
444
445
|
throw l3?.handleError(e7, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e7;
|
|
445
446
|
}
|
|
446
|
-
}, { client: c2, initModule: l2 } =
|
|
447
|
-
let i3 = o2(), s3 = await a2(), c3 =
|
|
447
|
+
}, { client: c2, initModule: l2 } = Ke(i2), { client: u2, initModule: d2 } = We(i2), f2 = async (n3, r3) => {
|
|
448
|
+
let i3 = o2(), s3 = await a2(), c3 = te(r3), l3 = await i3(n3, { ...r3, headers: { ...c3, ...t2, ...s3?.headers, ...r3?.headers, ...e6.host?.essentials?.passThroughHeaders, ...t2[`X-Wix-Consistent`] ? { [E]: t2[E] } : {} } }), u3 = Je(l3);
|
|
448
449
|
return u3 && (t2[E] = u3), l3;
|
|
449
450
|
}, p2 = (t3, n3) => {
|
|
450
|
-
if (
|
|
451
|
-
if (
|
|
452
|
-
if (
|
|
451
|
+
if (He(t3)) return d2(t3);
|
|
452
|
+
if (Ge(t3)) return l2(t3);
|
|
453
|
+
if (re(t3) && e6.host) return ie(t3, e6.host);
|
|
453
454
|
if (typeof t3 == `function`) {
|
|
454
455
|
if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
|
|
455
456
|
let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e6.useCDN === void 0 ? i2().shouldUseCDN : e6.useCDN;
|
|
456
|
-
return
|
|
457
|
+
return De(ce(() => S(t3)) ? x(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
|
|
457
458
|
let n4 = new URL(e7, `https://${r3}`);
|
|
458
459
|
return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
|
|
459
460
|
}, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e6.host?.name, o3, e6.validateRequestSchema);
|
|
460
461
|
}
|
|
461
|
-
return
|
|
462
|
+
return ne(t3) ? Object.fromEntries(Object.entries(t3).map(([e7, n4]) => [e7, p2(n4, t3[C])])) : t3;
|
|
462
463
|
}, m2 = (e7) => {
|
|
463
464
|
for (let n3 in e7) t2[n3] = e7[n3];
|
|
464
465
|
};
|
|
@@ -466,33 +467,33 @@ function Ke(e6) {
|
|
|
466
467
|
let t3 = i2();
|
|
467
468
|
return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e6.host), t3;
|
|
468
469
|
}, setHeaders: m2, use: p2, enableContext(e7, t3 = { elevated: false }) {
|
|
469
|
-
e7 === `global` ? globalThis.__wix_context__ == null ? t3.elevated ? globalThis.__wix_context__ = { elevatedClient: this } : globalThis.__wix_context__ = { client: this } : t3.elevated ? globalThis.__wix_context__.elevatedClient = this : globalThis.__wix_context__.client = this : t3.elevated ?
|
|
470
|
+
e7 === `global` ? globalThis.__wix_context__ == null ? t3.elevated ? globalThis.__wix_context__ = { elevatedClient: this } : globalThis.__wix_context__ = { client: this } : t3.elevated ? globalThis.__wix_context__.elevatedClient = this : globalThis.__wix_context__.client = this : t3.elevated ? v.elevatedClient = this : v.client = this;
|
|
470
471
|
}, fetch: (t3, n3) => {
|
|
471
472
|
let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
|
|
472
473
|
return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
|
|
473
474
|
}, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
|
|
474
475
|
let i3 = e6?.host?.apiBaseUrl ?? `www.wixapis.com`, a3 = await f2(`https://${i3}/graphql/${r3.apiVersion}`, { method: `POST`, headers: { "Content-Type": `application/json` }, body: JSON.stringify({ query: t3, variables: n3 }) });
|
|
475
|
-
if (a3.status !== 200) throw new
|
|
476
|
+
if (a3.status !== 200) throw new w(`GraphQL request failed with status ${a3.status}`, a3);
|
|
476
477
|
let { data: o3, errors: s3 } = await a3.json();
|
|
477
478
|
return { data: o3 ?? {}, errors: s3 };
|
|
478
479
|
}, webhooks: u2, servicePlugins: c2 };
|
|
479
480
|
}
|
|
480
|
-
function
|
|
481
|
+
function Je(e6) {
|
|
481
482
|
return e6.headers?.get(`X-Wix-Consistent`) ?? e6.headers?.get(`x-wix-consistent`);
|
|
482
483
|
}
|
|
483
|
-
var
|
|
484
|
-
var
|
|
485
|
-
var
|
|
486
|
-
var
|
|
487
|
-
var
|
|
488
|
-
function
|
|
484
|
+
var Ye = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
|
|
485
|
+
var Xe = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
486
|
+
var Ze = `items`;
|
|
487
|
+
var Qe = `pagingMetadata`;
|
|
488
|
+
var $e = Ye;
|
|
489
|
+
function et(e6, t2) {
|
|
489
490
|
return e6?.split(`.`).map((e7) => t2?.[e7] ?? e7).join(`.`);
|
|
490
491
|
}
|
|
491
|
-
var
|
|
492
|
-
function tt(e6, t2, n2) {
|
|
493
|
-
return (e6 === et || e6.endsWith(`.${et}`)) && typeof t2 == `string` ? $e(t2, n2) : t2;
|
|
494
|
-
}
|
|
492
|
+
var tt = `sort.fieldName`;
|
|
495
493
|
function nt(e6, t2, n2) {
|
|
494
|
+
return (e6 === tt || e6.endsWith(`.${tt}`)) && typeof t2 == `string` ? et(t2, n2) : t2;
|
|
495
|
+
}
|
|
496
|
+
function rt(e6, t2, n2) {
|
|
496
497
|
let r2 = (e7) => n2.includes(e7), i2 = (e7, n3) => {
|
|
497
498
|
if (Array.isArray(e7)) e7.forEach((e8) => {
|
|
498
499
|
i2(e8, n3);
|
|
@@ -502,157 +503,157 @@ function nt(e6, t2, n2) {
|
|
|
502
503
|
Object.keys(a2).forEach((e8) => {
|
|
503
504
|
let o2 = n3 === `` ? e8 : `${n3}.${e8}`;
|
|
504
505
|
if (r2(o2)) return;
|
|
505
|
-
let s2 =
|
|
506
|
-
s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] =
|
|
506
|
+
let s2 = it(e8, t2);
|
|
507
|
+
s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] = nt(o2, a2[s2], t2), i2(a2[s2], o2);
|
|
507
508
|
});
|
|
508
509
|
}
|
|
509
510
|
};
|
|
510
511
|
return i2(e6, ``), e6;
|
|
511
512
|
}
|
|
512
|
-
function
|
|
513
|
+
function it(e6, t2) {
|
|
513
514
|
let n2;
|
|
514
515
|
return n2 = e6.includes(`.`) ? e6.split(`.`).map((e7) => t2[e7] ?? e7).join(`.`) : t2[e6] ?? e6, n2;
|
|
515
516
|
}
|
|
516
517
|
function D(e6, t2 = []) {
|
|
517
|
-
return
|
|
518
|
+
return rt(e6, Ye, t2);
|
|
518
519
|
}
|
|
519
520
|
function O(e6, t2 = []) {
|
|
520
|
-
return
|
|
521
|
+
return rt(e6, Xe, t2);
|
|
521
522
|
}
|
|
522
523
|
function k(e6) {
|
|
523
524
|
return e6 ? new Date(e6) : void 0;
|
|
524
525
|
}
|
|
525
|
-
var
|
|
526
|
-
function
|
|
526
|
+
var at = /* @__PURE__ */ new WeakMap();
|
|
527
|
+
function ot() {
|
|
527
528
|
return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
|
|
528
529
|
}
|
|
529
|
-
function
|
|
530
|
+
function st(e6, t2) {
|
|
530
531
|
let n2 = e6.get(t2);
|
|
531
|
-
return n2 || (n2 =
|
|
532
|
+
return n2 || (n2 = ot(), e6.set(t2, n2)), n2;
|
|
532
533
|
}
|
|
533
|
-
function
|
|
534
|
-
return t2 === `*` ? (e6.anyField ??=
|
|
534
|
+
function ct(e6, t2) {
|
|
535
|
+
return t2 === `*` ? (e6.anyField ??= ot(), e6.anyField) : t2.endsWith(`{}`) ? (e6.mapFields ??= /* @__PURE__ */ new Map(), st(e6.mapFields, t2.slice(0, -2))) : (e6.fields ??= /* @__PURE__ */ new Map(), st(e6.fields, t2));
|
|
535
536
|
}
|
|
536
|
-
function
|
|
537
|
-
let t2 =
|
|
537
|
+
function lt(e6) {
|
|
538
|
+
let t2 = ot();
|
|
538
539
|
for (let n2 of e6) {
|
|
539
|
-
let e7 = n2.path.split(`.`).reduce(
|
|
540
|
+
let e7 = n2.path.split(`.`).reduce(ct, t2);
|
|
540
541
|
e7.leaves ??= [], e7.leaves.push(n2);
|
|
541
542
|
}
|
|
542
543
|
return t2;
|
|
543
544
|
}
|
|
544
|
-
function lt(e6) {
|
|
545
|
-
let t2 = it.get(e6);
|
|
546
|
-
return t2 || (t2 = ct(e6), it.set(e6, t2)), t2;
|
|
547
|
-
}
|
|
548
545
|
function ut(e6) {
|
|
549
|
-
|
|
546
|
+
let t2 = at.get(e6);
|
|
547
|
+
return t2 || (t2 = lt(e6), at.set(e6, t2)), t2;
|
|
550
548
|
}
|
|
551
|
-
function dt(e6
|
|
552
|
-
return
|
|
549
|
+
function dt(e6) {
|
|
550
|
+
return typeof e6 == `object` && !!e6;
|
|
553
551
|
}
|
|
554
|
-
function ft(e6, t2, n2) {
|
|
555
|
-
|
|
552
|
+
function ft(e6, { isRepeated: t2, isMap: n2 }, r2) {
|
|
553
|
+
return t2 ? Array.isArray(e6) ? e6.map(r2) : e6 : n2 ? dt(e6) ? Object.fromEntries(Object.entries(e6).map(([e7, t3]) => [e7, r2(t3)])) : e6 : r2(e6);
|
|
556
554
|
}
|
|
557
555
|
function pt(e6, t2, n2) {
|
|
556
|
+
dt(e6) && gt(e6, t2, n2);
|
|
557
|
+
}
|
|
558
|
+
function mt(e6, t2, n2) {
|
|
558
559
|
for (let [r2, i2] of t2) {
|
|
559
560
|
if (!(r2 in e6)) continue;
|
|
560
|
-
if (i2.leaves) for (let t4 of i2.leaves) e6[r2] =
|
|
561
|
+
if (i2.leaves) for (let t4 of i2.leaves) e6[r2] = ft(e6[r2], t4, n2);
|
|
561
562
|
let t3 = e6[r2];
|
|
562
|
-
Array.isArray(t3) ? t3.forEach((e7) =>
|
|
563
|
+
Array.isArray(t3) ? t3.forEach((e7) => pt(e7, i2, n2)) : pt(t3, i2, n2);
|
|
563
564
|
}
|
|
564
565
|
}
|
|
565
|
-
function
|
|
566
|
+
function ht(e6, t2, n2) {
|
|
566
567
|
for (let [r2, i2] of t2) {
|
|
567
568
|
let t3 = e6[r2];
|
|
568
|
-
|
|
569
|
+
dt(t3) && Object.values(t3).forEach((e7) => pt(e7, i2, n2));
|
|
569
570
|
}
|
|
570
571
|
}
|
|
571
|
-
function
|
|
572
|
-
t2 &&
|
|
572
|
+
function gt(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
|
|
573
|
+
t2 && mt(e6, t2, i2), n2 && ht(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => pt(e7, r2, i2));
|
|
573
574
|
}
|
|
574
575
|
function A(e6, t2) {
|
|
575
|
-
if (!
|
|
576
|
-
for (let { paths: n2, transformFn: r2 } of t2)
|
|
576
|
+
if (!dt(e6)) return e6;
|
|
577
|
+
for (let { paths: n2, transformFn: r2 } of t2) gt(e6, ut(n2), r2);
|
|
577
578
|
return e6;
|
|
578
579
|
}
|
|
579
|
-
function
|
|
580
|
-
return
|
|
580
|
+
function _t(e6) {
|
|
581
|
+
return St(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
|
|
581
582
|
}
|
|
582
|
-
var
|
|
583
|
-
var
|
|
584
|
-
var
|
|
585
|
-
var
|
|
586
|
-
function
|
|
583
|
+
var vt = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
584
|
+
var yt = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
585
|
+
var bt = `$1\0$2`;
|
|
586
|
+
var xt = /[^\p{L}\d]+/giu;
|
|
587
|
+
function St(e6) {
|
|
587
588
|
let t2 = e6.trim();
|
|
588
|
-
t2 = t2.replace(
|
|
589
|
+
t2 = t2.replace(vt, bt).replace(yt, bt), t2 = t2.replace(xt, `\0`);
|
|
589
590
|
let n2 = 0, r2 = t2.length;
|
|
590
591
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
591
592
|
if (n2 === r2) return [];
|
|
592
593
|
for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
|
|
593
594
|
return t2.slice(n2, r2).split(/\0/g);
|
|
594
595
|
}
|
|
595
|
-
var
|
|
596
|
-
var
|
|
597
|
-
var
|
|
596
|
+
var Ct = (e6) => `validationError` in (e6.response?.data?.details ?? {});
|
|
597
|
+
var wt = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
|
|
598
|
+
var Tt = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
|
|
598
599
|
function j(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
599
600
|
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
|
|
601
|
+
if (Ct(e6)) return Et(e6, t2, n2);
|
|
602
|
+
if (wt(e6)) return Ot(e6);
|
|
603
|
+
if (Tt(e6)) {
|
|
604
|
+
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: _t(n3), data: {} }, requestId: e6.requestId };
|
|
605
|
+
return Dt(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
605
606
|
}
|
|
606
|
-
return
|
|
607
|
+
return kt(e6);
|
|
607
608
|
}
|
|
608
|
-
var
|
|
609
|
-
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 =
|
|
610
|
-
return
|
|
609
|
+
var Et = (e6, t2, n2) => {
|
|
610
|
+
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = At(t2, a2, n2)?.sort((e7, t3) => e7.field < t3.field ? -1 : 1), s2 = `INVALID_ARGUMENT: ${o2?.map(({ field: e7, description: t3 }) => `"${e7}" ${t3}`)?.join(`, `)}`, c2 = { validationError: { fieldViolations: o2 }, requestId: i2 };
|
|
611
|
+
return Dt(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
|
|
611
612
|
};
|
|
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
|
|
613
|
+
var Dt = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
|
|
614
|
+
var Ot = (e6) => {
|
|
615
|
+
let t2 = e6.response?.status, n2 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n2, i2 = e6.response?.data?.details?.applicationError?.description ?? n2, a2 = e6.response?.data?.details?.applicationError?.code ?? _t(n2), o2 = e6.response?.data?.details?.applicationError?.data ?? {}, s2 = r2 === i2 ? r2 : `${r2}: ${i2}`, c2 = { applicationError: { description: i2, code: a2, data: o2 }, requestId: e6.requestId };
|
|
616
|
+
return Dt(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
|
|
616
617
|
};
|
|
617
|
-
var
|
|
618
|
-
var
|
|
618
|
+
var kt = (e6) => Dt(e6, { message: e6.requestId ? `System error occurred, request-id: ${e6.requestId}` : `System error occurred: ${JSON.stringify(e6)}`, extraProperties: { requestId: e6.requestId, status: e6.response?.status, code: _t(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
|
|
619
|
+
var At = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
619
620
|
let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
|
|
620
621
|
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
622
|
let r3 = t2[e7.field];
|
|
622
|
-
if (r3) return { ...e7, field:
|
|
623
|
+
if (r3) return { ...e7, field: jt(r3, i2) };
|
|
623
624
|
let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
|
|
624
625
|
if (s2) {
|
|
625
626
|
let t3 = a2[s2];
|
|
626
|
-
if (t3) return { ...e7, field: e7.field.replace(s2,
|
|
627
|
+
if (t3) return { ...e7, field: e7.field.replace(s2, jt(t3, i2)) };
|
|
627
628
|
}
|
|
628
629
|
return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
|
|
629
630
|
});
|
|
630
631
|
};
|
|
631
|
-
var
|
|
632
|
-
let n2 =
|
|
632
|
+
var jt = (e6, t2) => {
|
|
633
|
+
let n2 = Mt(e6);
|
|
633
634
|
return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
|
|
634
635
|
};
|
|
635
|
-
var
|
|
636
|
+
var Mt = (e6) => {
|
|
636
637
|
let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
|
|
637
638
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
638
639
|
};
|
|
639
|
-
function
|
|
640
|
+
function Nt() {
|
|
640
641
|
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
642
|
if (e6) return { initWixModules(t3, n3) {
|
|
642
|
-
return
|
|
643
|
+
return Pt(() => e6(t3, n3));
|
|
643
644
|
}, fetchWithAuth() {
|
|
644
645
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
645
646
|
}, graphql() {
|
|
646
647
|
throw Error(`graphql is not available in this context`);
|
|
647
648
|
} };
|
|
648
|
-
let t2 = typeof $wixContext < `u` ? $wixContext.client :
|
|
649
|
+
let t2 = typeof $wixContext < `u` ? $wixContext.client : v.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : v.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : v.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : v.elevatedClient;
|
|
649
650
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
650
651
|
if (r2) {
|
|
651
652
|
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
|
|
653
|
+
return Pt(() => n2.use(e7));
|
|
653
654
|
}
|
|
654
655
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
655
|
-
return
|
|
656
|
+
return Pt(() => t2.use(e7));
|
|
656
657
|
}, fetchWithAuth: (e7, n3) => {
|
|
657
658
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
658
659
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -664,110 +665,110 @@ function Mt() {
|
|
|
664
665
|
return t2.graphql(e7, n3, r2);
|
|
665
666
|
} };
|
|
666
667
|
}
|
|
667
|
-
function
|
|
668
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
669
|
-
globalThis.__wix_context__ = void 0,
|
|
668
|
+
function Pt(e6) {
|
|
669
|
+
let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
|
|
670
|
+
globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
670
671
|
try {
|
|
671
672
|
return e6();
|
|
672
673
|
} finally {
|
|
673
|
-
globalThis.__wix_context__ = t2,
|
|
674
|
+
globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
674
675
|
}
|
|
675
676
|
}
|
|
676
|
-
function
|
|
677
|
+
function Ft(e6, t2) {
|
|
677
678
|
return (...n2) => {
|
|
678
|
-
let r2 =
|
|
679
|
+
let r2 = Nt();
|
|
679
680
|
return r2 ? r2.initWixModules(e6, t2).apply(void 0, n2) : e6.apply(void 0, n2);
|
|
680
681
|
};
|
|
681
682
|
}
|
|
682
683
|
function M(e6, t2 = false) {
|
|
683
|
-
return
|
|
684
|
+
return Ft(e6, t2);
|
|
684
685
|
}
|
|
685
|
-
function
|
|
686
|
-
let n2 =
|
|
687
|
-
return t2 && r2 ? new URLSearchParams({ ".r":
|
|
686
|
+
function It(e6, t2) {
|
|
687
|
+
let n2 = Rt(e6), r2 = Object.entries(n2).some(([e7, t3]) => e7.includes(`.`) || Array.isArray(t3) && t3.some((e8) => typeof e8 == `object`));
|
|
688
|
+
return t2 && r2 ? new URLSearchParams({ ".r": Bt(JSON.stringify(e6)) }) : Object.entries(n2).reduce((e7, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
|
|
688
689
|
r3 == null || Array.isArray(n3) && typeof r3 == `object` || e7.append(t3, r3);
|
|
689
690
|
}), e7), new URLSearchParams());
|
|
690
691
|
}
|
|
691
|
-
function
|
|
692
|
-
let t2 =
|
|
693
|
-
return
|
|
692
|
+
function Lt(e6) {
|
|
693
|
+
let t2 = $t(Zt(e6.host), e6.domainToMappings);
|
|
694
|
+
return ln(on(e6.protoPath, e6.data || {}), t2);
|
|
694
695
|
}
|
|
695
|
-
function
|
|
696
|
+
function Rt(e6, t2 = ``) {
|
|
696
697
|
let n2 = {};
|
|
697
698
|
return Object.entries(e6).forEach(([e7, r2]) => {
|
|
698
|
-
let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 =
|
|
699
|
+
let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = zt(t2, e7);
|
|
699
700
|
if (i2) {
|
|
700
|
-
let e8 =
|
|
701
|
+
let e8 = Rt(r2, a2);
|
|
701
702
|
Object.assign(n2, e8);
|
|
702
703
|
} else n2[a2] = r2;
|
|
703
704
|
}), n2;
|
|
704
705
|
}
|
|
705
|
-
function
|
|
706
|
+
function zt(e6, t2) {
|
|
706
707
|
return `${e6}${e6 ? `.` : ``}${t2}`;
|
|
707
708
|
}
|
|
708
|
-
var
|
|
709
|
+
var Bt = (e6) => {
|
|
709
710
|
let t2 = new TextEncoder().encode(e6);
|
|
710
711
|
return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e6, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
|
|
711
712
|
};
|
|
712
|
-
var
|
|
713
|
-
var
|
|
714
|
-
var
|
|
715
|
-
var
|
|
716
|
-
var
|
|
717
|
-
var
|
|
718
|
-
var
|
|
719
|
-
var
|
|
720
|
-
var
|
|
721
|
-
var
|
|
722
|
-
function Xt(e6) {
|
|
723
|
-
return Zt(e6).replace(Ut, `._base_domain_`).replace(Jt, `._api_base_domain_`).replace(Yt, `*.dev.wix-code.com`);
|
|
724
|
-
}
|
|
713
|
+
var Vt = [`wix.com`, `editorx.com`];
|
|
714
|
+
var Ht = `_`;
|
|
715
|
+
var Ut = `*.`;
|
|
716
|
+
var Wt = RegExp(`\\.(${Vt.join(`|`)})$`);
|
|
717
|
+
var Gt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
|
|
718
|
+
var Kt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
|
|
719
|
+
var qt = `dev.wix-code.com`;
|
|
720
|
+
var Jt = /{(.*)}/;
|
|
721
|
+
var Yt = RegExp(`\\.(${Gt.join(`|`)})$`);
|
|
722
|
+
var Xt = RegExp(`.*\\.${qt}$`);
|
|
725
723
|
function Zt(e6) {
|
|
726
|
-
return
|
|
724
|
+
return Qt(e6).replace(Wt, `._base_domain_`).replace(Yt, `._api_base_domain_`).replace(Xt, `*.dev.wix-code.com`);
|
|
725
|
+
}
|
|
726
|
+
function Qt(e6) {
|
|
727
|
+
return Kt[e6] ?? e6;
|
|
727
728
|
}
|
|
728
|
-
function
|
|
729
|
+
function $t(e6, t2) {
|
|
729
730
|
let n2 = t2[e6];
|
|
730
731
|
if (n2) return n2;
|
|
731
|
-
let r2 =
|
|
732
|
+
let r2 = en(e6, t2) ?? tn(e6, t2);
|
|
732
733
|
if (!r2) {
|
|
733
|
-
if (
|
|
734
|
-
let e7 = t2[
|
|
734
|
+
if (rn(e6)) {
|
|
735
|
+
let e7 = t2[an];
|
|
735
736
|
if (e7) return e7;
|
|
736
737
|
}
|
|
737
|
-
let n3 = t2[
|
|
738
|
+
let n3 = t2[Ht];
|
|
738
739
|
if (n3) return n3;
|
|
739
740
|
}
|
|
740
741
|
return r2 ?? [];
|
|
741
742
|
}
|
|
742
|
-
function
|
|
743
|
+
function en(e6, t2) {
|
|
743
744
|
return Object.entries(t2).find(([t3]) => {
|
|
744
745
|
let [, ...n2] = e6.split(`.`);
|
|
745
746
|
return n2.join(`.`) === t3;
|
|
746
747
|
})?.[1];
|
|
747
748
|
}
|
|
748
|
-
function
|
|
749
|
-
let [n2] = Object.entries(t2).filter(([t3]) =>
|
|
749
|
+
function tn(e6, t2) {
|
|
750
|
+
let [n2] = Object.entries(t2).filter(([t3]) => nn(e6, t3)).sort(([e7], [t3]) => t3.length - e7.length);
|
|
750
751
|
if (!n2) return;
|
|
751
752
|
let [, r2] = n2;
|
|
752
753
|
return r2;
|
|
753
754
|
}
|
|
754
|
-
function
|
|
755
|
-
if (!t2.startsWith(
|
|
755
|
+
function nn(e6, t2) {
|
|
756
|
+
if (!t2.startsWith(Ut)) return false;
|
|
756
757
|
let n2 = t2.slice(1);
|
|
757
758
|
return e6.length > n2.length && e6.endsWith(n2);
|
|
758
759
|
}
|
|
759
|
-
function
|
|
760
|
+
function rn(e6) {
|
|
760
761
|
return !!e6.match(/\._base_domain_$/);
|
|
761
762
|
}
|
|
762
|
-
var
|
|
763
|
-
function an(e6, t2) {
|
|
764
|
-
return e6.split(`/`).map((e7) => on(e7, t2)).join(`/`);
|
|
765
|
-
}
|
|
763
|
+
var an = `www._base_domain_`;
|
|
766
764
|
function on(e6, t2) {
|
|
767
|
-
|
|
768
|
-
|
|
765
|
+
return e6.split(`/`).map((e7) => sn(e7, t2)).join(`/`);
|
|
766
|
+
}
|
|
767
|
+
function sn(e6, t2) {
|
|
768
|
+
let n2 = e6.match(Jt) || [], r2 = n2[1];
|
|
769
|
+
return r2 ? cn(t2, r2, e6, e6.replace(n2[0], ``)) : e6;
|
|
769
770
|
}
|
|
770
|
-
function
|
|
771
|
+
function cn(e6, t2, n2, r2) {
|
|
771
772
|
let i2 = e6;
|
|
772
773
|
for (let e7 of t2.split(`.`)) {
|
|
773
774
|
if (!i2) return n2;
|
|
@@ -775,28 +776,28 @@ function sn(e6, t2, n2, r2) {
|
|
|
775
776
|
}
|
|
776
777
|
return `${i2}${r2}`;
|
|
777
778
|
}
|
|
778
|
-
function
|
|
779
|
+
function ln(e6, t2) {
|
|
779
780
|
let n2 = t2?.find((t3) => e6.startsWith(t3.destPath));
|
|
780
781
|
return n2 ? n2.srcPath + e6.slice(n2.destPath.length) : e6;
|
|
781
782
|
}
|
|
782
|
-
function
|
|
783
|
+
function un(e6) {
|
|
783
784
|
return isFinite(e6) ? e6 : e6.toString();
|
|
784
785
|
}
|
|
785
|
-
function
|
|
786
|
+
function dn(e6) {
|
|
786
787
|
return e6 === `NaN` ? NaN : e6 === `Infinity` ? 1 / 0 : e6 === `-Infinity` ? -1 / 0 : e6;
|
|
787
788
|
}
|
|
788
|
-
function
|
|
789
|
+
function fn(e6) {
|
|
789
790
|
return Uint8Array.from(atob(e6), (e7) => e7.charCodeAt(0));
|
|
790
791
|
}
|
|
791
|
-
var
|
|
792
|
-
var
|
|
792
|
+
var pn = `modulepreload`;
|
|
793
|
+
var mn = function(e6, t2) {
|
|
793
794
|
return new URL(e6, t2).href;
|
|
794
795
|
};
|
|
795
|
-
var
|
|
796
|
-
var
|
|
796
|
+
var hn = {};
|
|
797
|
+
var gn = function(e6) {
|
|
797
798
|
return e6.pathname.endsWith(`.css`);
|
|
798
799
|
};
|
|
799
|
-
var
|
|
800
|
+
var _n = function(e6, t2, n2) {
|
|
800
801
|
if (t2 in e6) return e6[t2];
|
|
801
802
|
let r2 = n2();
|
|
802
803
|
if (!r2) {
|
|
@@ -810,7 +811,7 @@ var hn = function(e6, t2, n2) {
|
|
|
810
811
|
});
|
|
811
812
|
return e6[t2] = i2, i2;
|
|
812
813
|
};
|
|
813
|
-
var
|
|
814
|
+
var vn = function(e6, t2, n2) {
|
|
814
815
|
let r2 = Promise.resolve();
|
|
815
816
|
if (t2 && t2.length > 0) {
|
|
816
817
|
let o3 = function(e8) {
|
|
@@ -821,9 +822,9 @@ var gn = function(e6, t2, n2) {
|
|
|
821
822
|
var o2 = o3, s2 = s3;
|
|
822
823
|
let e7, i3 = document.querySelector(`meta[property=csp-nonce]`), a2 = i3?.nonce || i3?.getAttribute(`nonce`);
|
|
823
824
|
r2 = o3(t2.map((t3) => {
|
|
824
|
-
t3 =
|
|
825
|
-
let r3 = s3(t3), i4 =
|
|
826
|
-
return hn
|
|
825
|
+
t3 = mn(t3, n2);
|
|
826
|
+
let r3 = s3(t3), i4 = gn(r3);
|
|
827
|
+
return _n(hn, r3.href, () => {
|
|
827
828
|
if (e7 === void 0) {
|
|
828
829
|
e7 = { all: /* @__PURE__ */ new Set(), styles: /* @__PURE__ */ new Set() };
|
|
829
830
|
let t5 = document.getElementsByTagName(`link`);
|
|
@@ -834,7 +835,7 @@ var gn = function(e6, t2, n2) {
|
|
|
834
835
|
}
|
|
835
836
|
if ((i4 ? e7.styles : e7.all).has(r3.href)) return;
|
|
836
837
|
let t4 = document.createElement(`link`);
|
|
837
|
-
if (t4.rel = i4 ? `stylesheet` :
|
|
838
|
+
if (t4.rel = i4 ? `stylesheet` : pn, i4 || (t4.as = `script`), t4.crossOrigin = ``, t4.href = r3.href, a2 && t4.setAttribute(`nonce`, a2), document.head.appendChild(t4), i4) return new Promise((e8, n3) => {
|
|
838
839
|
t4.addEventListener(`load`, e8), t4.addEventListener(`error`, () => n3(Error(`Unable to preload CSS for ${r3}`)));
|
|
839
840
|
});
|
|
840
841
|
});
|
|
@@ -849,30 +850,30 @@ var gn = function(e6, t2, n2) {
|
|
|
849
850
|
return e6().catch(i2);
|
|
850
851
|
});
|
|
851
852
|
};
|
|
852
|
-
var
|
|
853
|
-
var
|
|
854
|
-
var
|
|
855
|
-
var
|
|
856
|
-
let e6 =
|
|
857
|
-
if (e6) return { [
|
|
853
|
+
var yn = `x-wix-linguist`;
|
|
854
|
+
var bn = `00000000-0000-0000-0000-000000000000`;
|
|
855
|
+
var xn = `false`;
|
|
856
|
+
var Sn = () => {
|
|
857
|
+
let e6 = Tn(`language`), t2 = Tn(`locale`);
|
|
858
|
+
if (e6) return { [yn]: [e6, t2 || e6, xn, bn].join(`|`) };
|
|
858
859
|
};
|
|
859
|
-
function
|
|
860
|
+
function Cn() {
|
|
860
861
|
let e6 = null, t2 = null;
|
|
861
862
|
return { promise: new Promise((n2, r2) => {
|
|
862
863
|
e6 = n2, t2 = r2;
|
|
863
864
|
}), resolve: e6, reject: t2 };
|
|
864
865
|
}
|
|
865
|
-
var
|
|
866
|
-
var
|
|
867
|
-
var
|
|
868
|
-
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 =
|
|
869
|
-
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language:
|
|
870
|
-
return
|
|
866
|
+
var wn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
|
|
867
|
+
var Tn = (e6) => wn()?.[e6];
|
|
868
|
+
var En = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
|
|
869
|
+
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = On();
|
|
870
|
+
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: Tn(`language`), locale: Tn(`locale`), get passThroughHeaders() {
|
|
871
|
+
return Sn();
|
|
871
872
|
} } };
|
|
872
873
|
}, auth: (e7) => {
|
|
873
874
|
let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
|
|
874
|
-
!e7 &&
|
|
875
|
-
let n2 = false, { resolve: r2, promise: i2 } =
|
|
875
|
+
!e7 && Dn() && (e7 = t2?.getAccessTokenFunction?.());
|
|
876
|
+
let n2 = false, { resolve: r2, promise: i2 } = Cn();
|
|
876
877
|
return { getAuthHeaders: async () => {
|
|
877
878
|
if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
|
|
878
879
|
return { headers: { Authorization: await e7() } };
|
|
@@ -880,50 +881,50 @@ var wn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host:
|
|
|
880
881
|
r2(e8);
|
|
881
882
|
}) };
|
|
882
883
|
} });
|
|
883
|
-
function
|
|
884
|
+
function Dn() {
|
|
884
885
|
return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
|
|
885
886
|
}
|
|
886
|
-
function
|
|
887
|
+
function On() {
|
|
887
888
|
let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
|
|
888
889
|
if (!e6) return;
|
|
889
890
|
let t2 = new URL(e6);
|
|
890
891
|
return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
|
|
891
892
|
}
|
|
892
|
-
var
|
|
893
|
+
var kn = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
|
|
893
894
|
if (!e6) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
|
|
894
895
|
return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
|
|
895
896
|
}, getAccessToken: () => {
|
|
896
897
|
throw Error(`Not implemented`);
|
|
897
898
|
}, observeState: () => ({ disconnect: () => {
|
|
898
899
|
} }) });
|
|
899
|
-
var
|
|
900
|
+
var An = En({ createHost: function(e6) {
|
|
900
901
|
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
|
|
901
902
|
if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
|
|
902
|
-
return { channel:
|
|
903
|
+
return { channel: kn({ clientSdk: t2, applicationId: n2 }), close: () => {
|
|
903
904
|
} };
|
|
904
905
|
} });
|
|
905
|
-
var
|
|
906
|
-
let n2 =
|
|
907
|
-
return
|
|
906
|
+
var jn = (e6, t2) => {
|
|
907
|
+
let n2 = An.host({ applicationId: e6, componentId: t2 }), r2 = An.auth();
|
|
908
|
+
return qe({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
908
909
|
};
|
|
909
|
-
var
|
|
910
|
-
function
|
|
910
|
+
var Mn = (e6) => jn(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
|
|
911
|
+
function Nn() {
|
|
911
912
|
let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
912
913
|
if (e6) return { initWixModules(t3, n3) {
|
|
913
|
-
return
|
|
914
|
+
return Pn(() => e6(t3, n3));
|
|
914
915
|
}, fetchWithAuth() {
|
|
915
916
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
916
917
|
}, graphql() {
|
|
917
918
|
throw Error(`graphql is not available in this context`);
|
|
918
919
|
} };
|
|
919
|
-
let t2 = typeof $wixContext < `u` ? $wixContext.client :
|
|
920
|
+
let t2 = typeof $wixContext < `u` ? $wixContext.client : v.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : v.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : v.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : v.elevatedClient;
|
|
920
921
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
921
922
|
if (r2) {
|
|
922
923
|
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`);
|
|
923
|
-
return
|
|
924
|
+
return Pn(() => n2.use(e7));
|
|
924
925
|
}
|
|
925
926
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
926
|
-
return
|
|
927
|
+
return Pn(() => t2.use(e7));
|
|
927
928
|
}, fetchWithAuth: (e7, n3) => {
|
|
928
929
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
929
930
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -935,26 +936,26 @@ function jn() {
|
|
|
935
936
|
return t2.graphql(e7, n3, r2);
|
|
936
937
|
} };
|
|
937
938
|
}
|
|
938
|
-
function
|
|
939
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
940
|
-
globalThis.__wix_context__ = void 0,
|
|
939
|
+
function Pn(e6) {
|
|
940
|
+
let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
|
|
941
|
+
globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
941
942
|
try {
|
|
942
943
|
return e6();
|
|
943
944
|
} finally {
|
|
944
|
-
globalThis.__wix_context__ = t2,
|
|
945
|
+
globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
945
946
|
}
|
|
946
947
|
}
|
|
947
|
-
function
|
|
948
|
+
function Fn(e6, t2) {
|
|
948
949
|
return { ...e6, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
|
|
949
|
-
let r2 =
|
|
950
|
+
let r2 = Nn();
|
|
950
951
|
if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
951
952
|
return r2.initWixModules(e6)[t3].apply(void 0, n2);
|
|
952
953
|
}])) };
|
|
953
954
|
}
|
|
954
|
-
function
|
|
955
|
-
return
|
|
955
|
+
function In(e6) {
|
|
956
|
+
return Fn({ __type: `host`, create: (t2) => Object.entries(e6).reduce((e7, [n2, r2]) => ({ ...e7, [n2]: r2(t2) }), {}) }, Object.keys(e6));
|
|
956
957
|
}
|
|
957
|
-
var
|
|
958
|
+
var Ln = class {
|
|
958
959
|
constructor(e6) {
|
|
959
960
|
this.message = e6, this.captureException = () => {
|
|
960
961
|
console.error(this.message);
|
|
@@ -969,13 +970,13 @@ var Fn = class {
|
|
|
969
970
|
};
|
|
970
971
|
}
|
|
971
972
|
};
|
|
972
|
-
var
|
|
973
|
-
var
|
|
974
|
-
function
|
|
973
|
+
var Rn = (e6) => new Ln(e6);
|
|
974
|
+
var zn = In({ getMonitoringClient: (e6) => () => e6.getMonitoringClient ? e6.getMonitoringClient() : Rn(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
|
|
975
|
+
function Bn(e6) {
|
|
975
976
|
let t2 = Promise.resolve(e6);
|
|
976
977
|
return t2.status = `fulfilled`, t2.value = e6, t2;
|
|
977
978
|
}
|
|
978
|
-
function
|
|
979
|
+
function Vn(e6) {
|
|
979
980
|
if (e6.status === `fulfilled`) return e6.value;
|
|
980
981
|
throw e6.status === `rejected` ? e6.reason : (e6.status === `pending` || (e6.status = `pending`, e6.then((t2) => {
|
|
981
982
|
e6.status = `fulfilled`, e6.value = t2;
|
|
@@ -983,17 +984,17 @@ function zn(e6) {
|
|
|
983
984
|
e6.status = `rejected`, e6.reason = t2;
|
|
984
985
|
})), e6);
|
|
985
986
|
}
|
|
986
|
-
var
|
|
987
|
-
function
|
|
988
|
-
let r2 =
|
|
989
|
-
r2 || (r2 = /* @__PURE__ */ new WeakMap(),
|
|
987
|
+
var Hn = /* @__PURE__ */ new WeakMap();
|
|
988
|
+
function Un(e6, t2, n2) {
|
|
989
|
+
let r2 = Hn.get(e6);
|
|
990
|
+
r2 || (r2 = /* @__PURE__ */ new WeakMap(), Hn.set(e6, r2));
|
|
990
991
|
let i2 = r2.get(t2);
|
|
991
992
|
i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
|
|
992
993
|
let a2 = i2.get(n2);
|
|
993
994
|
if (!a2) {
|
|
994
|
-
if (e6.status === `fulfilled`) a2 =
|
|
995
|
+
if (e6.status === `fulfilled`) a2 = Bn(t2(e6.value));
|
|
995
996
|
else if (e6.status === `rejected`) try {
|
|
996
|
-
a2 =
|
|
997
|
+
a2 = Bn(n2(e6.reason));
|
|
997
998
|
} catch {
|
|
998
999
|
a2 = e6.then(t2, n2);
|
|
999
1000
|
}
|
|
@@ -1002,45 +1003,45 @@ function Vn(e6, t2, n2) {
|
|
|
1002
1003
|
}
|
|
1003
1004
|
return a2;
|
|
1004
1005
|
}
|
|
1005
|
-
var
|
|
1006
|
-
function
|
|
1006
|
+
var Wn = 1e4;
|
|
1007
|
+
function Gn(e6) {
|
|
1007
1008
|
let [t2, n2] = u(void 0);
|
|
1008
1009
|
return s(() => {
|
|
1009
1010
|
let t3 = Date.now();
|
|
1010
|
-
t3 - e6 >
|
|
1011
|
+
t3 - e6 > Wn && i(() => n2(t3));
|
|
1011
1012
|
}, []), t2 ?? e6;
|
|
1012
1013
|
}
|
|
1013
|
-
function
|
|
1014
|
+
function N(e6) {
|
|
1014
1015
|
return e6;
|
|
1015
1016
|
}
|
|
1016
|
-
var
|
|
1017
|
-
var
|
|
1017
|
+
var Kn = N(`@wix/site-service-rendering-context`);
|
|
1018
|
+
var qn = () => {
|
|
1018
1019
|
try {
|
|
1019
|
-
return f(
|
|
1020
|
+
return f(Kn).SSR;
|
|
1020
1021
|
} catch {
|
|
1021
1022
|
return false;
|
|
1022
1023
|
}
|
|
1023
1024
|
};
|
|
1024
|
-
var
|
|
1025
|
-
function
|
|
1025
|
+
var Jn = (e6, t2) => e6.length === t2.length && e6.every((e7, n2) => Object.is(e7, t2[n2]));
|
|
1026
|
+
function Yn(e6, t2) {
|
|
1026
1027
|
let [n2, r2] = u(() => ({ deps: t2, value: e6() }));
|
|
1027
1028
|
return s(() => {
|
|
1028
|
-
if (
|
|
1029
|
+
if (Jn(n2.deps, t2)) return;
|
|
1029
1030
|
let a2 = e6();
|
|
1030
1031
|
i(() => r2({ deps: t2, value: a2 }));
|
|
1031
1032
|
}, t2), n2.value;
|
|
1032
1033
|
}
|
|
1033
|
-
var
|
|
1034
|
-
var
|
|
1035
|
-
var
|
|
1036
|
-
var
|
|
1037
|
-
var
|
|
1038
|
-
var
|
|
1034
|
+
var Xn = N(`@wix/site-service-url`);
|
|
1035
|
+
var Zn = `14bcded7-0066-7c35-14d7-466cb3f09103`;
|
|
1036
|
+
var Qn = `post`;
|
|
1037
|
+
var $n = `builder-post`;
|
|
1038
|
+
var er = `__blog_unknown_section__`;
|
|
1039
|
+
var tr = (e6) => {
|
|
1039
1040
|
let t2;
|
|
1040
1041
|
try {
|
|
1041
|
-
let n3 = e6.appSectionRelativeUrl(
|
|
1042
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`,
|
|
1043
|
-
t2 = e6.appSectionRelativeUrl(
|
|
1042
|
+
let n3 = e6.appSectionRelativeUrl(Zn, $n);
|
|
1043
|
+
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, er) && !n3?.endsWith(`/post-page`)) return;
|
|
1044
|
+
t2 = e6.appSectionRelativeUrl(Zn, $n, true);
|
|
1044
1045
|
} catch {
|
|
1045
1046
|
return;
|
|
1046
1047
|
}
|
|
@@ -1048,12 +1049,12 @@ var $n = (e6) => {
|
|
|
1048
1049
|
let n2 = t2.split(`/`).filter(Boolean);
|
|
1049
1050
|
return n2[n2.length - 1] === `post-page` && n2.pop(), n2.length > 0 ? n2.join(`/`) : void 0;
|
|
1050
1051
|
};
|
|
1051
|
-
var
|
|
1052
|
-
var
|
|
1053
|
-
let t2 =
|
|
1054
|
-
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${
|
|
1052
|
+
var nr = (e6) => `${e6}/${Qn}`;
|
|
1053
|
+
var rr = (e6) => {
|
|
1054
|
+
let t2 = tr(e6);
|
|
1055
|
+
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${nr(t2)}`;
|
|
1055
1056
|
};
|
|
1056
|
-
var
|
|
1057
|
+
var ir = (e6, t2) => {
|
|
1057
1058
|
if (!e6 || !t2) return;
|
|
1058
1059
|
let n2;
|
|
1059
1060
|
try {
|
|
@@ -1067,14 +1068,14 @@ var nr = (e6, t2) => {
|
|
|
1067
1068
|
if (r2.endsWith(t3) && i2.endsWith(`/post`)) return `${n2.origin}${i2}`;
|
|
1068
1069
|
}
|
|
1069
1070
|
};
|
|
1070
|
-
var
|
|
1071
|
+
var ar = (e6) => {
|
|
1071
1072
|
if (!e6) return;
|
|
1072
1073
|
if (typeof e6 == `string`) return e6;
|
|
1073
1074
|
let { base: t2, path: n2 } = e6;
|
|
1074
1075
|
return t2 ? `${t2.replace(/\/+$/, ``)}${n2 ?? ``}` : void 0;
|
|
1075
1076
|
};
|
|
1076
|
-
var
|
|
1077
|
-
let n2 =
|
|
1077
|
+
var or = (e6, t2) => {
|
|
1078
|
+
let n2 = ar(e6.url), r2 = `/${Qn}`;
|
|
1078
1079
|
if (!n2 || !t2?.endsWith(r2)) return;
|
|
1079
1080
|
let i2, a2;
|
|
1080
1081
|
try {
|
|
@@ -1085,23 +1086,23 @@ var ir = (e6, t2) => {
|
|
|
1085
1086
|
let o2 = a2.slice(0, -r2.length);
|
|
1086
1087
|
return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
|
|
1087
1088
|
};
|
|
1088
|
-
var
|
|
1089
|
-
let n2 =
|
|
1089
|
+
var sr = (e6, t2) => {
|
|
1090
|
+
let n2 = or(e6, t2);
|
|
1090
1091
|
if (n2) return { href: n2, target: `_self` };
|
|
1091
1092
|
if (t2 && e6.slug) return { href: `${t2}/${encodeURIComponent(e6.slug)}`, target: `_self` };
|
|
1092
|
-
let r2 =
|
|
1093
|
+
let r2 = ar(e6.url);
|
|
1093
1094
|
return r2 ? { href: r2, target: `_self` } : void 0;
|
|
1094
1095
|
};
|
|
1095
|
-
var
|
|
1096
|
+
var cr = (e6) => {
|
|
1096
1097
|
let t2;
|
|
1097
1098
|
try {
|
|
1098
|
-
t2 = f(
|
|
1099
|
+
t2 = f(Xn);
|
|
1099
1100
|
} catch {
|
|
1100
1101
|
return;
|
|
1101
1102
|
}
|
|
1102
|
-
return
|
|
1103
|
+
return rr(t2) ?? ir(t2.currentUrl, e6);
|
|
1103
1104
|
};
|
|
1104
|
-
var
|
|
1105
|
+
var lr = (e6, t2) => {
|
|
1105
1106
|
let n2;
|
|
1106
1107
|
try {
|
|
1107
1108
|
n2 = new URL(e6).pathname.split(`/`).filter(Boolean);
|
|
@@ -1121,54 +1122,54 @@ var sr = (e6, t2) => {
|
|
|
1121
1122
|
return i2;
|
|
1122
1123
|
}
|
|
1123
1124
|
};
|
|
1124
|
-
var
|
|
1125
|
+
var ur = () => {
|
|
1125
1126
|
let e6;
|
|
1126
1127
|
try {
|
|
1127
|
-
e6 = f(
|
|
1128
|
+
e6 = f(Xn);
|
|
1128
1129
|
} catch {
|
|
1129
1130
|
return;
|
|
1130
1131
|
}
|
|
1131
1132
|
if (!e6.currentUrl) return;
|
|
1132
|
-
let t2 =
|
|
1133
|
-
return
|
|
1133
|
+
let t2 = tr(e6);
|
|
1134
|
+
return lr(e6.currentUrl, t2 && nr(t2));
|
|
1134
1135
|
};
|
|
1135
|
-
var
|
|
1136
|
-
var
|
|
1137
|
-
var
|
|
1136
|
+
var dr = { categoryHeader: `WixBlog.CategoryHeader`, coverMedia: `WixBlog.PostCoverMedia`, postActions: `WixBlog.PostActionBar`, postCategories: `WixBlog.PostCategoryList`, postCounters: `WixBlog.PostCounterBar`, postMetadata: `WixBlog.PostMetadataBar`, postTags: `WixBlog.PostTagList`, feedProvider: `WixBlog.BlogFeedContextProvider`, postBySlugProvider: `WixBlog.PostBySlugContextProvider`, postByIdProvider: `WixBlog.PostByIdContextProvider`, relatedPostsProvider: `WixBlog.RelatedPostsContextProvider` };
|
|
1137
|
+
var fr = (e6) => `${e6} rendered`;
|
|
1138
|
+
var pr = (e6, t2, n2) => {
|
|
1138
1139
|
s(() => {
|
|
1139
1140
|
if (t2 !== `loading` && typeof performance < `u` && typeof performance.mark == `function`) try {
|
|
1140
|
-
performance.mark(
|
|
1141
|
+
performance.mark(fr(e6), { detail: { state: t2, compId: n2 } });
|
|
1141
1142
|
} catch {
|
|
1142
1143
|
}
|
|
1143
1144
|
}, [e6, t2, n2]);
|
|
1144
1145
|
};
|
|
1145
|
-
var
|
|
1146
|
-
var
|
|
1147
|
-
var
|
|
1146
|
+
var mr = N(`@wix/site-service-locale`);
|
|
1147
|
+
var hr = N(`@wix/site-service-renderer-configuration`);
|
|
1148
|
+
var gr = () => {
|
|
1148
1149
|
let e6, t2;
|
|
1149
1150
|
try {
|
|
1150
|
-
e6 = f(
|
|
1151
|
+
e6 = f(hr).languageCode;
|
|
1151
1152
|
} catch {
|
|
1152
1153
|
}
|
|
1153
1154
|
try {
|
|
1154
|
-
t2 = f(
|
|
1155
|
+
t2 = f(mr).language;
|
|
1155
1156
|
} catch {
|
|
1156
1157
|
}
|
|
1157
1158
|
return e6 || t2;
|
|
1158
1159
|
};
|
|
1159
|
-
var
|
|
1160
|
+
var _r = () => {
|
|
1160
1161
|
try {
|
|
1161
|
-
let { locale: e6, language: t2 } = f(
|
|
1162
|
+
let { locale: e6, language: t2 } = f(mr);
|
|
1162
1163
|
return e6 || t2;
|
|
1163
1164
|
} catch {
|
|
1164
1165
|
return;
|
|
1165
1166
|
}
|
|
1166
1167
|
};
|
|
1167
|
-
var
|
|
1168
|
-
function
|
|
1169
|
-
let e6 =
|
|
1168
|
+
var vr = N(`@wix/site-service-warmup-data`);
|
|
1169
|
+
function yr() {
|
|
1170
|
+
let e6 = qn(), t2 = null;
|
|
1170
1171
|
try {
|
|
1171
|
-
t2 = d()(
|
|
1172
|
+
t2 = d()(vr);
|
|
1172
1173
|
} catch {
|
|
1173
1174
|
}
|
|
1174
1175
|
return c(() => ({ isServer: e6, scope: t2 ?? void 0, get: async (n2) => {
|
|
@@ -1185,13 +1186,13 @@ function _r() {
|
|
|
1185
1186
|
}
|
|
1186
1187
|
} }), [e6, t2]);
|
|
1187
1188
|
}
|
|
1188
|
-
var
|
|
1189
|
+
var br = () => {
|
|
1189
1190
|
let e6 = /* @__PURE__ */ new Map();
|
|
1190
1191
|
return { getOrInsert: (t2, n2) => (e6.has(t2) || e6.set(t2, n2().finally(() => {
|
|
1191
1192
|
e6.delete(t2);
|
|
1192
1193
|
})), e6.get(t2)) };
|
|
1193
1194
|
};
|
|
1194
|
-
var
|
|
1195
|
+
var xr = async (e6) => {
|
|
1195
1196
|
try {
|
|
1196
1197
|
let { default: t2 } = await e6();
|
|
1197
1198
|
return t2;
|
|
@@ -1199,9 +1200,9 @@ var yr = async (e6) => {
|
|
|
1199
1200
|
return;
|
|
1200
1201
|
}
|
|
1201
1202
|
};
|
|
1202
|
-
var
|
|
1203
|
-
let r2 =
|
|
1204
|
-
let [i3, a2] = await Promise.all([
|
|
1203
|
+
var Sr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
1204
|
+
let r2 = br(), i2 = async (r3) => {
|
|
1205
|
+
let [i3, a2] = await Promise.all([xr(() => t2(r3)), !e6 || !n2 ? void 0 : xr(() => n2(r3))]);
|
|
1205
1206
|
if (i3 && a2) return { ...i3, ...a2 };
|
|
1206
1207
|
if (i3) return i3;
|
|
1207
1208
|
if (a2) return a2;
|
|
@@ -1209,47 +1210,47 @@ var br = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
|
1209
1210
|
};
|
|
1210
1211
|
return (e7) => r2.getOrInsert(e7, () => i2(e7));
|
|
1211
1212
|
};
|
|
1212
|
-
var
|
|
1213
|
-
var
|
|
1213
|
+
var P = (e6) => typeof e6 == `string`;
|
|
1214
|
+
var F = () => {
|
|
1214
1215
|
let e6, t2, n2 = new Promise((n3, r2) => {
|
|
1215
1216
|
e6 = n3, t2 = r2;
|
|
1216
1217
|
});
|
|
1217
1218
|
return n2.resolve = e6, n2.reject = t2, n2;
|
|
1218
1219
|
};
|
|
1219
|
-
var
|
|
1220
|
-
var
|
|
1220
|
+
var Cr = (e6) => e6 == null ? `` : String(e6);
|
|
1221
|
+
var wr = (e6, t2, n2) => {
|
|
1221
1222
|
e6.forEach((e7) => {
|
|
1222
1223
|
t2[e7] && (n2[e7] = t2[e7]);
|
|
1223
1224
|
});
|
|
1224
1225
|
};
|
|
1225
|
-
var
|
|
1226
|
-
var
|
|
1227
|
-
var
|
|
1228
|
-
var
|
|
1229
|
-
let r2 =
|
|
1226
|
+
var Tr = /###/g;
|
|
1227
|
+
var Er = (e6) => e6 && e6.includes(`###`) ? e6.replace(Tr, `.`) : e6;
|
|
1228
|
+
var Dr = (e6) => !e6 || P(e6);
|
|
1229
|
+
var I = (e6, t2, n2) => {
|
|
1230
|
+
let r2 = P(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
1230
1231
|
for (; i2 < r2.length - 1; ) {
|
|
1231
|
-
if (
|
|
1232
|
-
let t3 =
|
|
1232
|
+
if (Dr(e6)) return {};
|
|
1233
|
+
let t3 = Er(r2[i2]);
|
|
1233
1234
|
!e6[t3] && n2 && (e6[t3] = new n2()), e6 = Object.prototype.hasOwnProperty.call(e6, t3) ? e6[t3] : {}, ++i2;
|
|
1234
1235
|
}
|
|
1235
|
-
return
|
|
1236
|
+
return Dr(e6) ? {} : { obj: e6, k: Er(r2[i2]) };
|
|
1236
1237
|
};
|
|
1237
1238
|
var Or = (e6, t2, n2) => {
|
|
1238
|
-
let { obj: r2, k: i2 } =
|
|
1239
|
+
let { obj: r2, k: i2 } = I(e6, t2, Object);
|
|
1239
1240
|
if (r2 !== void 0 || t2.length === 1) {
|
|
1240
1241
|
r2[i2] = n2;
|
|
1241
1242
|
return;
|
|
1242
1243
|
}
|
|
1243
|
-
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 =
|
|
1244
|
-
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 =
|
|
1244
|
+
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = I(e6, o2, Object);
|
|
1245
|
+
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = I(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
|
|
1245
1246
|
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
1246
1247
|
};
|
|
1247
1248
|
var kr = (e6, t2, n2, r2) => {
|
|
1248
|
-
let { obj: i2, k: a2 } =
|
|
1249
|
+
let { obj: i2, k: a2 } = I(e6, t2, Object);
|
|
1249
1250
|
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
1250
1251
|
};
|
|
1251
1252
|
var Ar = (e6, t2) => {
|
|
1252
|
-
let { obj: n2, k: r2 } =
|
|
1253
|
+
let { obj: n2, k: r2 } = I(e6, t2);
|
|
1253
1254
|
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
1254
1255
|
};
|
|
1255
1256
|
var jr = (e6, t2, n2) => {
|
|
@@ -1257,12 +1258,12 @@ var jr = (e6, t2, n2) => {
|
|
|
1257
1258
|
return r2 === void 0 ? Ar(t2, n2) : r2;
|
|
1258
1259
|
};
|
|
1259
1260
|
var Mr = (e6, t2, n2) => {
|
|
1260
|
-
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ?
|
|
1261
|
+
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? P(e6[r2]) || e6[r2] instanceof String || P(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : Mr(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
|
|
1261
1262
|
return e6;
|
|
1262
1263
|
};
|
|
1263
|
-
var
|
|
1264
|
+
var L = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
1264
1265
|
var Nr = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
1265
|
-
var Pr = (e6) =>
|
|
1266
|
+
var Pr = (e6) => P(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Nr[e7]) : e6;
|
|
1266
1267
|
var Fr = class {
|
|
1267
1268
|
constructor(e6) {
|
|
1268
1269
|
this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -1303,7 +1304,7 @@ var zr = (e6, t2, n2 = `.`) => {
|
|
|
1303
1304
|
}
|
|
1304
1305
|
return i2;
|
|
1305
1306
|
};
|
|
1306
|
-
var
|
|
1307
|
+
var R = (e6) => e6?.replace(/_/g, `-`);
|
|
1307
1308
|
var Br = { type: `logger`, log(e6) {
|
|
1308
1309
|
this.output(`log`, e6);
|
|
1309
1310
|
}, warn(e6) {
|
|
@@ -1313,7 +1314,7 @@ var Br = { type: `logger`, log(e6) {
|
|
|
1313
1314
|
}, output(e6, t2) {
|
|
1314
1315
|
console?.[e6]?.apply?.(console, t2);
|
|
1315
1316
|
} };
|
|
1316
|
-
var
|
|
1317
|
+
var z = new class e2 {
|
|
1317
1318
|
constructor(e6, t2 = {}) {
|
|
1318
1319
|
this.init(e6, t2);
|
|
1319
1320
|
}
|
|
@@ -1333,7 +1334,7 @@ var R = new class e2 {
|
|
|
1333
1334
|
return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
|
|
1334
1335
|
}
|
|
1335
1336
|
forward(e6, t2, n2, r2) {
|
|
1336
|
-
return r2 && !this.debug ? null : (e6 = e6.map((e7) =>
|
|
1337
|
+
return r2 && !this.debug ? null : (e6 = e6.map((e7) => P(e7) ? e7.replace(/[\r\n\x00-\x1F\x7F]/g, ` `) : e7), P(e6[0]) && (e6[0] = `${n2}${this.prefix} ${e6[0]}`), this.logger[t2](e6));
|
|
1337
1338
|
}
|
|
1338
1339
|
create(t2) {
|
|
1339
1340
|
return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
|
|
@@ -1384,16 +1385,16 @@ var Ur = class extends Vr {
|
|
|
1384
1385
|
}
|
|
1385
1386
|
getResource(e6, t2, n2, r2 = {}) {
|
|
1386
1387
|
let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
|
|
1387
|
-
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) :
|
|
1388
|
+
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : P(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
|
|
1388
1389
|
let s2 = Ar(this.data, o2);
|
|
1389
|
-
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !
|
|
1390
|
+
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !P(n2) ? s2 : zr(this.data?.[e6]?.[t2], n2, i2);
|
|
1390
1391
|
}
|
|
1391
1392
|
addResource(e6, t2, n2, r2, i2 = { silent: false }) {
|
|
1392
1393
|
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
|
|
1393
1394
|
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Or(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
|
|
1394
1395
|
}
|
|
1395
1396
|
addResources(e6, t2, n2, r2 = { silent: false }) {
|
|
1396
|
-
for (let r3 in n2) (
|
|
1397
|
+
for (let r3 in n2) (P(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
|
|
1397
1398
|
r2.silent || this.emit(`added`, e6, t2, n2);
|
|
1398
1399
|
}
|
|
1399
1400
|
addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
|
|
@@ -1437,7 +1438,7 @@ function Kr() {
|
|
|
1437
1438
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1438
1439
|
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Gr ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1439
1440
|
}
|
|
1440
|
-
function
|
|
1441
|
+
function B(e6, t2) {
|
|
1441
1442
|
let { [Gr]: n2 } = e6(Kr()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
1442
1443
|
if (n2.length > 1 && i2) {
|
|
1443
1444
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
@@ -1445,10 +1446,10 @@ function z(e6, t2) {
|
|
|
1445
1446
|
}
|
|
1446
1447
|
return n2.join(r2);
|
|
1447
1448
|
}
|
|
1448
|
-
var qr = (e6) => !
|
|
1449
|
+
var qr = (e6) => !P(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
1449
1450
|
var Jr = class e3 extends Vr {
|
|
1450
1451
|
constructor(e6, t2 = {}) {
|
|
1451
|
-
super(),
|
|
1452
|
+
super(), wr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = z.create(`translator`), this.checkedLoadedFor = {};
|
|
1452
1453
|
}
|
|
1453
1454
|
changeLanguage(e6) {
|
|
1454
1455
|
e6 && (this.language = e6);
|
|
@@ -1467,24 +1468,24 @@ var Jr = class e3 extends Vr {
|
|
|
1467
1468
|
let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e6.includes(n2), o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !Rr(e6, n2, r2);
|
|
1468
1469
|
if (a2 && !o2) {
|
|
1469
1470
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1470
|
-
if (t3 && t3.length > 0) return { key: e6, namespaces:
|
|
1471
|
+
if (t3 && t3.length > 0) return { key: e6, namespaces: P(i2) ? [i2] : i2 };
|
|
1471
1472
|
let a3 = e6.split(n2);
|
|
1472
1473
|
(n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
|
|
1473
1474
|
}
|
|
1474
|
-
return { key: e6, namespaces:
|
|
1475
|
+
return { key: e6, namespaces: P(i2) ? [i2] : i2 };
|
|
1475
1476
|
}
|
|
1476
1477
|
translate(t2, n2, r2) {
|
|
1477
1478
|
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
1478
1479
|
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
1479
|
-
typeof t2 == `function` && (t2 =
|
|
1480
|
+
typeof t2 == `function` && (t2 = B(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? B(e6, { ...this.options, ...i2 }) : String(e6));
|
|
1480
1481
|
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;
|
|
1481
1482
|
u2 === void 0 && (u2 = `:`);
|
|
1482
1483
|
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1483
1484
|
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;
|
|
1484
|
-
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 && !
|
|
1485
|
+
let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !P(i2.count), x2 = e3.hasDefaultValue(i2), S2 = b2 ? this.pluralResolver.getSuffix(d2, i2.count, i2) : ``, C2 = i2.ordinal && b2 ? this.pluralResolver.getSuffix(d2, i2.count, { ordinal: false }) : ``, ee2 = b2 && !i2.ordinal && i2.count === 0, w2 = ee2 && i2[`defaultValue${this.options.pluralSeparator}zero`] || i2[`defaultValue${S2}`] || i2[`defaultValue${C2}`] || i2.defaultValue, T2 = m2;
|
|
1485
1486
|
y2 && !m2 && x2 && (T2 = w2);
|
|
1486
1487
|
let te2 = qr(T2), ne2 = Object.prototype.toString.apply(T2);
|
|
1487
|
-
if (y2 && T2 && te2 && !_2.includes(ne2) && !(
|
|
1488
|
+
if (y2 && T2 && te2 && !_2.includes(ne2) && !(P(v2) && Array.isArray(T2))) {
|
|
1488
1489
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
1489
1490
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
1490
1491
|
let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
|
|
@@ -1498,7 +1499,7 @@ var Jr = class e3 extends Vr {
|
|
|
1498
1499
|
}
|
|
1499
1500
|
m2 = t3;
|
|
1500
1501
|
}
|
|
1501
|
-
} else if (y2 &&
|
|
1502
|
+
} else if (y2 && P(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
|
|
1502
1503
|
else {
|
|
1503
1504
|
let e6 = false, n3 = false;
|
|
1504
1505
|
!this.isValidLookup(m2) && x2 && (e6 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
|
|
@@ -1530,30 +1531,30 @@ var Jr = class e3 extends Vr {
|
|
|
1530
1531
|
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 });
|
|
1531
1532
|
else if (!n2.skipInterpolation) {
|
|
1532
1533
|
n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
|
|
1533
|
-
let a3 =
|
|
1534
|
+
let a3 = P(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
|
|
1534
1535
|
if (a3) {
|
|
1535
1536
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1536
1537
|
o3 = t3 && t3.length;
|
|
1537
1538
|
}
|
|
1538
|
-
let s2 = n2.replace && !
|
|
1539
|
+
let s2 = n2.replace && !P(n2.replace) ? n2.replace : n2;
|
|
1539
1540
|
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) {
|
|
1540
1541
|
let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
|
|
1541
1542
|
o3 < r3 && (n2.nest = false);
|
|
1542
1543
|
}
|
|
1543
1544
|
!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();
|
|
1544
1545
|
}
|
|
1545
|
-
let a2 = n2.postProcess || this.options.postProcess, o2 =
|
|
1546
|
+
let a2 = n2.postProcess || this.options.postProcess, o2 = P(a2) ? [a2] : a2;
|
|
1546
1547
|
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = Wr.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
|
|
1547
1548
|
}
|
|
1548
1549
|
resolve(e6, t2 = {}) {
|
|
1549
1550
|
let n2, r2, i2, a2, o2;
|
|
1550
|
-
return
|
|
1551
|
+
return P(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? B(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
|
|
1551
1552
|
if (this.isValidLookup(n2)) return;
|
|
1552
1553
|
let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
|
|
1553
1554
|
r2 = c2;
|
|
1554
1555
|
let l2 = s2.namespaces;
|
|
1555
1556
|
this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
|
|
1556
|
-
let u2 = t2.count !== void 0 && !
|
|
1557
|
+
let u2 = t2.count !== void 0 && !P(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (P(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
|
|
1557
1558
|
l2.forEach((e8) => {
|
|
1558
1559
|
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) => {
|
|
1559
1560
|
if (this.isValidLookup(n2)) return;
|
|
@@ -1582,7 +1583,7 @@ var Jr = class e3 extends Vr {
|
|
|
1582
1583
|
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
|
|
1583
1584
|
}
|
|
1584
1585
|
getUsedParamsDetails(e6 = {}) {
|
|
1585
|
-
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !
|
|
1586
|
+
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !P(e6.replace), r2 = n2 ? e6.replace : e6;
|
|
1586
1587
|
if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
|
|
1587
1588
|
r2 = { ...r2 };
|
|
1588
1589
|
for (let e7 of t2) delete r2[e7];
|
|
@@ -1596,23 +1597,23 @@ var Jr = class e3 extends Vr {
|
|
|
1596
1597
|
};
|
|
1597
1598
|
var Yr = class {
|
|
1598
1599
|
constructor(e6) {
|
|
1599
|
-
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger =
|
|
1600
|
+
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = z.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
1600
1601
|
}
|
|
1601
1602
|
clearCache() {
|
|
1602
1603
|
this.resolveHierarchyCache = {};
|
|
1603
1604
|
}
|
|
1604
1605
|
getScriptPartFromCode(e6) {
|
|
1605
|
-
if (e6 =
|
|
1606
|
+
if (e6 = R(e6), !e6 || !e6.includes(`-`)) return null;
|
|
1606
1607
|
let t2 = e6.split(`-`);
|
|
1607
1608
|
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
1608
1609
|
}
|
|
1609
1610
|
getLanguagePartFromCode(e6) {
|
|
1610
|
-
if (e6 =
|
|
1611
|
+
if (e6 = R(e6), !e6 || !e6.includes(`-`)) return e6;
|
|
1611
1612
|
let t2 = e6.split(`-`);
|
|
1612
1613
|
return this.formatLanguageCode(t2[0]);
|
|
1613
1614
|
}
|
|
1614
1615
|
formatLanguageCode(e6) {
|
|
1615
|
-
if (
|
|
1616
|
+
if (P(e6) && e6.includes(`-`)) {
|
|
1616
1617
|
let t2;
|
|
1617
1618
|
try {
|
|
1618
1619
|
t2 = Intl.getCanonicalLocales(e6)[0];
|
|
@@ -1643,7 +1644,7 @@ var Yr = class {
|
|
|
1643
1644
|
}
|
|
1644
1645
|
getFallbackCodes(e6, t2) {
|
|
1645
1646
|
if (!e6) return [];
|
|
1646
|
-
if (typeof e6 == `function` && (e6 = e6(t2)),
|
|
1647
|
+
if (typeof e6 == `function` && (e6 = e6(t2)), P(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
|
|
1647
1648
|
if (!t2) return e6.default || [];
|
|
1648
1649
|
let n2 = e6[t2];
|
|
1649
1650
|
return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
|
|
@@ -1651,7 +1652,7 @@ var Yr = class {
|
|
|
1651
1652
|
toResolveHierarchy(e6, t2) {
|
|
1652
1653
|
let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
|
|
1653
1654
|
r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
|
|
1654
|
-
let i2 = t2 === void 0 || t2 === false ||
|
|
1655
|
+
let i2 = t2 === void 0 || t2 === false || P(t2), a2 = t2 === void 0 && typeof this.options.fallbackLng == `function`, o2 = P(e6) && i2 && !a2, s2 = null;
|
|
1655
1656
|
if (o2) {
|
|
1656
1657
|
let n3;
|
|
1657
1658
|
n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
|
|
@@ -1663,7 +1664,7 @@ var Yr = class {
|
|
|
1663
1664
|
let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
|
|
1664
1665
|
e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
|
|
1665
1666
|
};
|
|
1666
|
-
return
|
|
1667
|
+
return P(e6) && (e6.includes(`-`) || e6.includes(`_`)) ? (this.options.load !== `languageOnly` && u2(this.formatLanguageCode(e6)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && u2(this.getScriptPartFromCode(e6)), this.options.load !== `currentOnly` && u2(this.getLanguagePartFromCode(e6))) : P(e6) && u2(this.formatLanguageCode(e6)), c2.forEach((e7) => {
|
|
1667
1668
|
let t3 = this.formatLanguageCode(e7);
|
|
1668
1669
|
l2.includes(t3) || u2(t3);
|
|
1669
1670
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
@@ -1673,13 +1674,13 @@ var Xr = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
|
1673
1674
|
var Zr = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1674
1675
|
var Qr = class {
|
|
1675
1676
|
constructor(e6, t2 = {}) {
|
|
1676
|
-
this.languageUtils = e6, this.options = t2, this.logger =
|
|
1677
|
+
this.languageUtils = e6, this.options = t2, this.logger = z.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1677
1678
|
}
|
|
1678
1679
|
clearCache() {
|
|
1679
1680
|
this.pluralRulesCache = {};
|
|
1680
1681
|
}
|
|
1681
1682
|
getRule(e6, t2 = {}) {
|
|
1682
|
-
let n2 =
|
|
1683
|
+
let n2 = R(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
1683
1684
|
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
1684
1685
|
let a2;
|
|
1685
1686
|
try {
|
|
@@ -1710,17 +1711,17 @@ var Qr = class {
|
|
|
1710
1711
|
};
|
|
1711
1712
|
var $r = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
1712
1713
|
let a2 = jr(e6, t2, n2);
|
|
1713
|
-
return !a2 && i2 &&
|
|
1714
|
+
return !a2 && i2 && P(n2) && (a2 = zr(e6, n2, r2), a2 === void 0 && (a2 = zr(t2, n2, r2))), a2;
|
|
1714
1715
|
};
|
|
1715
1716
|
var ei = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
1716
1717
|
var ti = class {
|
|
1717
1718
|
constructor(e6 = {}) {
|
|
1718
|
-
this.logger =
|
|
1719
|
+
this.logger = z.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
1719
1720
|
}
|
|
1720
1721
|
init(e6 = {}) {
|
|
1721
1722
|
e6.interpolation ||= { escapeValue: true };
|
|
1722
1723
|
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;
|
|
1723
|
-
this.escape = t2 === void 0 ? Pr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ?
|
|
1724
|
+
this.escape = t2 === void 0 ? Pr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? L(i2) : a2 || `{{`, this.suffix = o2 ? L(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? L(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? L(l2) : ``, this.nestingPrefix = d2 ? L(d2) : f2 || L(`$t(`), this.nestingSuffix = p2 ? L(p2) : m2 || L(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
|
|
1724
1725
|
}
|
|
1725
1726
|
reset() {
|
|
1726
1727
|
this.options && this.init(this.options);
|
|
@@ -1746,13 +1747,13 @@ var ti = class {
|
|
|
1746
1747
|
if (a2 = c2(n3), a2 === void 0) {
|
|
1747
1748
|
if (typeof l2 == `function`) {
|
|
1748
1749
|
let t4 = l2(e6, i2, r2);
|
|
1749
|
-
a2 =
|
|
1750
|
+
a2 = P(t4) ? t4 : ``;
|
|
1750
1751
|
} else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
|
|
1751
1752
|
else if (u2) {
|
|
1752
1753
|
a2 = i2[0];
|
|
1753
1754
|
continue;
|
|
1754
1755
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
1755
|
-
} else !
|
|
1756
|
+
} else !P(a2) && !this.useRawValueToEscape && (a2 = Cr(a2));
|
|
1756
1757
|
let s3 = t3.safeValue(a2);
|
|
1757
1758
|
if (e6 = e6.replace(i2[0], ei(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
1758
1759
|
}
|
|
@@ -1762,7 +1763,7 @@ var ti = class {
|
|
|
1762
1763
|
let r2, i2, a2, o2 = (e7, t3) => {
|
|
1763
1764
|
let n3 = this.nestingOptionsSeparator;
|
|
1764
1765
|
if (!e7.includes(n3)) return e7;
|
|
1765
|
-
let r3 = e7.split(RegExp(`${
|
|
1766
|
+
let r3 = e7.split(RegExp(`${L(n3)}[ ]*{`)), i3 = `{${r3[1]}`;
|
|
1766
1767
|
e7 = r3[0], i3 = this.interpolate(i3, a2);
|
|
1767
1768
|
let o3 = i3.match(/'/g), s3 = i3.match(/"/g);
|
|
1768
1769
|
((o3?.length ?? 0) % 2 == 0 && !s3 || (s3?.length ?? 0) % 2 != 0) && (i3 = i3.replace(/'/g, `"`));
|
|
@@ -1775,10 +1776,10 @@ var ti = class {
|
|
|
1775
1776
|
}, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
|
|
1776
1777
|
for (; r2 = s2.exec(e6); ) {
|
|
1777
1778
|
let u2 = [];
|
|
1778
|
-
a2 = { ...n2 }, a2 = a2.replace && !
|
|
1779
|
+
a2 = { ...n2 }, a2 = a2.replace && !P(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
1779
1780
|
let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
1780
|
-
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 && !
|
|
1781
|
-
|
|
1781
|
+
if (d2 !== -1 && (u2 = r2[1].slice(d2).split(this.formatSeparator).map((e7) => e7.trim()).filter(Boolean), r2[1] = r2[1].slice(0, d2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e6 && !P(i2)) return i2;
|
|
1782
|
+
P(i2) || (i2 = Cr(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e6}`), ``), u2.length && (i2 = u2.reduce((e7, t3) => this.format(e7, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), c2 += e6.slice(l2, r2.index) + Cr(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
|
|
1782
1783
|
}
|
|
1783
1784
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
1784
1785
|
}
|
|
@@ -1804,13 +1805,13 @@ var ri = (e6) => {
|
|
|
1804
1805
|
let a2 = i2;
|
|
1805
1806
|
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
1806
1807
|
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
1807
|
-
return s2 || (s2 = e6(
|
|
1808
|
+
return s2 || (s2 = e6(R(r2), i2), t2[o2] = s2), s2(n2);
|
|
1808
1809
|
};
|
|
1809
1810
|
};
|
|
1810
|
-
var ii = (e6) => (t2, n2, r2) => e6(
|
|
1811
|
+
var ii = (e6) => (t2, n2, r2) => e6(R(n2), r2)(t2);
|
|
1811
1812
|
var ai = class {
|
|
1812
1813
|
constructor(e6 = {}) {
|
|
1813
|
-
this.logger =
|
|
1814
|
+
this.logger = z.create(`formatter`), this.options = e6, this.init(e6);
|
|
1814
1815
|
}
|
|
1815
1816
|
init(e6, t2 = { interpolation: {} }) {
|
|
1816
1817
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
@@ -1867,7 +1868,7 @@ var oi = (e6, t2) => {
|
|
|
1867
1868
|
};
|
|
1868
1869
|
var si = class extends Vr {
|
|
1869
1870
|
constructor(e6, t2, n2, r2 = {}) {
|
|
1870
|
-
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger =
|
|
1871
|
+
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = z.create(`backendConnector`), this.waitingReads = [], this.maxParallelReads = r2.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = r2.maxRetries >= 0 ? r2.maxRetries : 5, this.retryTimeout = r2.retryTimeout >= 1 ? r2.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(n2, r2.backend, r2);
|
|
1871
1872
|
}
|
|
1872
1873
|
queueLoad(e6, t2, n2, r2) {
|
|
1873
1874
|
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
@@ -1919,7 +1920,7 @@ var si = class extends Vr {
|
|
|
1919
1920
|
}
|
|
1920
1921
|
prepareLoading(e6, t2, n2 = {}, r2) {
|
|
1921
1922
|
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
1922
|
-
|
|
1923
|
+
P(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), P(t2) && (t2 = [t2]);
|
|
1923
1924
|
let i2 = this.queueLoad(e6, t2, n2, r2);
|
|
1924
1925
|
if (!i2.toLoad.length) return i2.pending.length || r2(), null;
|
|
1925
1926
|
i2.toLoad.forEach((e7) => {
|
|
@@ -1958,7 +1959,7 @@ var si = class extends Vr {
|
|
|
1958
1959
|
};
|
|
1959
1960
|
var ci = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS: [`translation`], fallbackLng: [`dev`], fallbackNS: false, supportedLngs: false, nonExplicitSupportedLngs: false, load: `all`, preload: false, keySeparator: `.`, nsSeparator: `:`, pluralSeparator: `_`, contextSeparator: `_`, enableSelector: false, partialBundledLanguages: false, saveMissing: false, updateMissing: false, saveMissingTo: `fallback`, saveMissingPlurals: true, missingKeyHandler: false, missingInterpolationHandler: false, postProcess: false, postProcessPassResolved: false, returnNull: false, returnEmptyString: true, returnObjects: false, joinArrays: false, returnedObjectHandler: false, parseMissingKeyHandler: false, appendNamespaceToMissingKey: false, appendNamespaceToCIMode: false, overloadTranslationOptionHandler: (e6) => {
|
|
1960
1961
|
let t2 = {};
|
|
1961
|
-
if (typeof e6[1] == `object` && (t2 = e6[1]),
|
|
1962
|
+
if (typeof e6[1] == `object` && (t2 = e6[1]), P(e6[1]) && (t2.defaultValue = e6[1]), P(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
|
|
1962
1963
|
let n2 = e6[3] || e6[2];
|
|
1963
1964
|
Object.keys(n2).forEach((e7) => {
|
|
1964
1965
|
t2[e7] = n2[e7];
|
|
@@ -1966,7 +1967,7 @@ var ci = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
1966
1967
|
}
|
|
1967
1968
|
return t2;
|
|
1968
1969
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
1969
|
-
var li = (e6) => (
|
|
1970
|
+
var li = (e6) => (P(e6.ns) && (e6.ns = [e6.ns]), P(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), P(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
|
|
1970
1971
|
var ui = () => {
|
|
1971
1972
|
};
|
|
1972
1973
|
var di = (e6) => {
|
|
@@ -1974,9 +1975,9 @@ var di = (e6) => {
|
|
|
1974
1975
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
1975
1976
|
});
|
|
1976
1977
|
};
|
|
1977
|
-
var
|
|
1978
|
+
var V = class e4 extends Vr {
|
|
1978
1979
|
constructor(e6 = {}, t2) {
|
|
1979
|
-
if (super(), this.options = li(e6), this.services = {}, this.logger =
|
|
1980
|
+
if (super(), this.options = li(e6), this.services = {}, this.logger = z, this.modules = { external: [] }, di(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
1980
1981
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
1981
1982
|
setTimeout(() => {
|
|
1982
1983
|
this.init(e6, t2);
|
|
@@ -1984,18 +1985,18 @@ var B = class e4 extends Vr {
|
|
|
1984
1985
|
}
|
|
1985
1986
|
}
|
|
1986
1987
|
init(e6 = {}, t2) {
|
|
1987
|
-
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (
|
|
1988
|
+
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (P(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
|
|
1988
1989
|
let n2 = ci();
|
|
1989
1990
|
this.options = { ...n2, ...this.options, ...li(e6) }, this.options.interpolation = { ...n2.interpolation, ...this.options.interpolation }, e6.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e6.keySeparator), e6.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e6.nsSeparator), typeof this.options.overloadTranslationOptionHandler != `function` && (this.options.overloadTranslationOptionHandler = n2.overloadTranslationOptionHandler);
|
|
1990
1991
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
1991
1992
|
if (!this.options.isClone) {
|
|
1992
|
-
this.modules.logger ?
|
|
1993
|
+
this.modules.logger ? z.init(r2(this.modules.logger), this.options) : z.init(null, this.options);
|
|
1993
1994
|
let e7;
|
|
1994
1995
|
e7 = this.modules.formatter ? this.modules.formatter : ai;
|
|
1995
1996
|
let t3 = new Yr(this.options);
|
|
1996
1997
|
this.store = new Ur(this.options.resources, this.options);
|
|
1997
1998
|
let n3 = this.services;
|
|
1998
|
-
n3.logger =
|
|
1999
|
+
n3.logger = z, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new Qr(t3, { prepend: this.options.pluralSeparator }), e7 && (n3.formatter = r2(e7), n3.formatter.init && n3.formatter.init(n3, this.options), this.options.interpolation.format = n3.formatter.format.bind(n3.formatter)), n3.interpolator = new ti(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new si(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
|
|
1999
2000
|
this.emit(e8, ...t4);
|
|
2000
2001
|
}), this.modules.languageDetector && (n3.languageDetector = r2(this.modules.languageDetector), n3.languageDetector.init && n3.languageDetector.init(n3, this.options.detection, this.options)), this.modules.i18nFormat && (n3.i18nFormat = r2(this.modules.i18nFormat), n3.i18nFormat.init && n3.i18nFormat.init(this)), this.translator = new Jr(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
|
|
2001
2002
|
this.emit(e8, ...t4);
|
|
@@ -2012,7 +2013,7 @@ var B = class e4 extends Vr {
|
|
|
2012
2013
|
}), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
|
|
2013
2014
|
this[e7] = (...t3) => (this.store[e7](...t3), this);
|
|
2014
2015
|
});
|
|
2015
|
-
let i2 =
|
|
2016
|
+
let i2 = F(), a2 = () => {
|
|
2016
2017
|
let e7 = (e8, n3) => {
|
|
2017
2018
|
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);
|
|
2018
2019
|
};
|
|
@@ -2022,7 +2023,7 @@ var B = class e4 extends Vr {
|
|
|
2022
2023
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
2023
2024
|
}
|
|
2024
2025
|
loadResources(e6, t2 = ui) {
|
|
2025
|
-
let n2 = t2, r2 =
|
|
2026
|
+
let n2 = t2, r2 = P(e6) ? e6 : this.language;
|
|
2026
2027
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2027
2028
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
2028
2029
|
let e7 = [], t3 = (t4) => {
|
|
@@ -2036,7 +2037,7 @@ var B = class e4 extends Vr {
|
|
|
2036
2037
|
} else n2(null);
|
|
2037
2038
|
}
|
|
2038
2039
|
reloadResources(e6, t2, n2) {
|
|
2039
|
-
let r2 =
|
|
2040
|
+
let r2 = F();
|
|
2040
2041
|
return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||= ui, this.services.backendConnector.reload(e6, t2, (e7) => {
|
|
2041
2042
|
r2.resolve(), n2(e7);
|
|
2042
2043
|
}), r2;
|
|
@@ -2060,7 +2061,7 @@ var B = class e4 extends Vr {
|
|
|
2060
2061
|
}
|
|
2061
2062
|
changeLanguage(e6, t2) {
|
|
2062
2063
|
this.isLanguageChangingTo = e6;
|
|
2063
|
-
let n2 =
|
|
2064
|
+
let n2 = F();
|
|
2064
2065
|
this.emit(`languageChanging`, e6);
|
|
2065
2066
|
let r2 = (e7) => {
|
|
2066
2067
|
this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
|
|
@@ -2068,7 +2069,7 @@ var B = class e4 extends Vr {
|
|
|
2068
2069
|
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));
|
|
2069
2070
|
}, a2 = (t3) => {
|
|
2070
2071
|
!e6 && !t3 && this.services.languageDetector && (t3 = []);
|
|
2071
|
-
let n3 =
|
|
2072
|
+
let n3 = P(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(P(t3) ? [t3] : t3);
|
|
2072
2073
|
a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
|
|
2073
2074
|
i2(e7, a3);
|
|
2074
2075
|
});
|
|
@@ -2082,11 +2083,11 @@ var B = class e4 extends Vr {
|
|
|
2082
2083
|
let s2 = o2.ns !== void 0 && o2.ns !== null;
|
|
2083
2084
|
o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
|
|
2084
2085
|
let c2 = { ...this.options, ...o2 };
|
|
2085
|
-
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix =
|
|
2086
|
+
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = B(o2.keyPrefix, c2));
|
|
2086
2087
|
let l2 = this.options.keySeparator || `.`, u2;
|
|
2087
|
-
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 =
|
|
2088
|
+
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = B(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = B(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
|
|
2088
2089
|
};
|
|
2089
|
-
return
|
|
2090
|
+
return P(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
|
|
2090
2091
|
}
|
|
2091
2092
|
t(...e6) {
|
|
2092
2093
|
return this.translator?.translate(...e6);
|
|
@@ -2115,16 +2116,16 @@ var B = class e4 extends Vr {
|
|
|
2115
2116
|
return !(s2 && !a2(s2, e6) || r2 && !a2(i2, e6));
|
|
2116
2117
|
}
|
|
2117
2118
|
loadNamespaces(e6, t2) {
|
|
2118
|
-
let n2 =
|
|
2119
|
-
return this.options.ns ? (
|
|
2119
|
+
let n2 = F();
|
|
2120
|
+
return this.options.ns ? (P(e6) && (e6 = [e6]), e6.forEach((e7) => {
|
|
2120
2121
|
this.options.ns.includes(e7) || this.options.ns.push(e7);
|
|
2121
2122
|
}), this.loadResources((e7) => {
|
|
2122
2123
|
n2.resolve(), t2 && t2(e7);
|
|
2123
2124
|
}), n2) : (t2 && t2(), Promise.resolve());
|
|
2124
2125
|
}
|
|
2125
2126
|
loadLanguages(e6, t2) {
|
|
2126
|
-
let n2 =
|
|
2127
|
-
|
|
2127
|
+
let n2 = F();
|
|
2128
|
+
P(e6) && (e6 = [e6]);
|
|
2128
2129
|
let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
|
|
2129
2130
|
return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
|
|
2130
2131
|
n2.resolve(), t2 && t2(e7);
|
|
@@ -2165,9 +2166,9 @@ var B = class e4 extends Vr {
|
|
|
2165
2166
|
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
2166
2167
|
}
|
|
2167
2168
|
}.createInstance();
|
|
2168
|
-
|
|
2169
|
+
V.createInstance, V.dir, V.init, V.loadResources, V.reloadResources, V.use, V.changeLanguage, V.getFixedT, V.t, V.exists, V.setDefaultNamespace, V.hasLoadedNamespace, V.loadNamespaces, V.loadLanguages;
|
|
2169
2170
|
var fi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2170
|
-
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 =
|
|
2171
|
+
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = V.createInstance(i2 ? s2 : void 0);
|
|
2171
2172
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2172
2173
|
try {
|
|
2173
2174
|
return r3(null, await t2(e7));
|
|
@@ -2524,7 +2525,7 @@ function Xi(e6) {
|
|
|
2524
2525
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
2525
2526
|
}
|
|
2526
2527
|
var Zi = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
2527
|
-
var
|
|
2528
|
+
var H = { "001": [`H`, `h`], 419: [`h`, `H`, `hB`, `hb`], AC: [`H`, `h`, `hb`, `hB`], AD: [`H`, `hB`], AE: [`h`, `hB`, `hb`, `H`], AF: [`H`, `hb`, `hB`, `h`], AG: [`h`, `hb`, `H`, `hB`], AI: [`H`, `h`, `hb`, `hB`], AL: [`h`, `H`, `hB`], AM: [`H`, `hB`], AO: [`H`, `hB`], AR: [`h`, `H`, `hB`, `hb`], AS: [`h`, `H`], AT: [`H`, `hB`], AU: [`h`, `hb`, `H`, `hB`], AW: [`H`, `hB`], AX: [`H`], AZ: [`H`, `hB`, `h`], BA: [`H`, `hB`, `h`], BB: [`h`, `hb`, `H`, `hB`], BD: [`h`, `hB`, `H`], BE: [`H`, `hB`], BF: [`H`, `hB`], BG: [`H`, `hB`, `h`], BH: [`h`, `hB`, `hb`, `H`], BI: [`H`, `h`], BJ: [`H`, `hB`], BL: [`H`, `hB`], BM: [`h`, `hb`, `H`, `hB`], BN: [`hb`, `hB`, `h`, `H`], BO: [`h`, `H`, `hB`, `hb`], BQ: [`H`], BR: [`H`, `hB`], BS: [`h`, `hb`, `H`, `hB`], BT: [`h`, `H`], BW: [`H`, `h`, `hb`, `hB`], BY: [`H`, `h`], BZ: [`H`, `h`, `hb`, `hB`], CA: [`h`, `hb`, `H`, `hB`], CC: [`H`, `h`, `hb`, `hB`], CD: [`hB`, `H`], CF: [`H`, `h`, `hB`], CG: [`H`, `hB`], CH: [`H`, `hB`, `h`], CI: [`H`, `hB`], CK: [`H`, `h`, `hb`, `hB`], CL: [`h`, `H`, `hB`, `hb`], CM: [`H`, `h`, `hB`], CN: [`H`, `hB`, `hb`, `h`], CO: [`h`, `H`, `hB`, `hb`], CP: [`H`], CR: [`h`, `H`, `hB`, `hb`], CU: [`h`, `H`, `hB`, `hb`], CV: [`H`, `hB`], CW: [`H`, `hB`], CX: [`H`, `h`, `hb`, `hB`], CY: [`h`, `H`, `hb`, `hB`], CZ: [`H`], DE: [`H`, `hB`], DG: [`H`, `h`, `hb`, `hB`], DJ: [`h`, `H`], DK: [`H`], DM: [`h`, `hb`, `H`, `hB`], DO: [`h`, `H`, `hB`, `hb`], DZ: [`h`, `hB`, `hb`, `H`], EA: [`H`, `h`, `hB`, `hb`], EC: [`h`, `H`, `hB`, `hb`], EE: [`H`, `hB`], EG: [`h`, `hB`, `hb`, `H`], EH: [`h`, `hB`, `hb`, `H`], ER: [`h`, `H`], ES: [`H`, `hB`, `h`, `hb`], ET: [`hB`, `hb`, `h`, `H`], FI: [`H`], FJ: [`h`, `hb`, `H`, `hB`], FK: [`H`, `h`, `hb`, `hB`], FM: [`h`, `hb`, `H`, `hB`], FO: [`H`, `h`], FR: [`H`, `hB`], GA: [`H`, `hB`], GB: [`H`, `h`, `hb`, `hB`], GD: [`h`, `hb`, `H`, `hB`], GE: [`H`, `hB`, `h`], GF: [`H`, `hB`], GG: [`H`, `h`, `hb`, `hB`], GH: [`h`, `H`], GI: [`H`, `h`, `hb`, `hB`], GL: [`H`, `h`], GM: [`h`, `hb`, `H`, `hB`], GN: [`H`, `hB`], GP: [`H`, `hB`], GQ: [`H`, `hB`, `h`, `hb`], GR: [`h`, `H`, `hb`, `hB`], GS: [`H`, `h`, `hb`, `hB`], GT: [`h`, `H`, `hB`, `hb`], GU: [`h`, `hb`, `H`, `hB`], GW: [`H`, `hB`], GY: [`h`, `hb`, `H`, `hB`], HK: [`h`, `hB`, `hb`, `H`], HN: [`h`, `H`, `hB`, `hb`], HR: [`H`, `hB`], HU: [`H`, `h`], IC: [`H`, `h`, `hB`, `hb`], ID: [`H`], IE: [`H`, `h`, `hb`, `hB`], IL: [`H`, `hB`], IM: [`H`, `h`, `hb`, `hB`], IN: [`h`, `H`], IO: [`H`, `h`, `hb`, `hB`], IQ: [`h`, `hB`, `hb`, `H`], IR: [`hB`, `H`], IS: [`H`], IT: [`H`, `hB`], JE: [`H`, `h`, `hb`, `hB`], JM: [`h`, `hb`, `H`, `hB`], JO: [`h`, `hB`, `hb`, `H`], JP: [`H`, `K`, `h`], KE: [`hB`, `hb`, `H`, `h`], KG: [`H`, `h`, `hB`, `hb`], KH: [`hB`, `h`, `H`, `hb`], KI: [`h`, `hb`, `H`, `hB`], KM: [`H`, `h`, `hB`, `hb`], KN: [`h`, `hb`, `H`, `hB`], KP: [`h`, `H`, `hB`, `hb`], KR: [`h`, `H`, `hB`, `hb`], KW: [`h`, `hB`, `hb`, `H`], KY: [`h`, `hb`, `H`, `hB`], KZ: [`H`, `hB`], LA: [`H`, `hb`, `hB`, `h`], LB: [`h`, `hB`, `hb`, `H`], LC: [`h`, `hb`, `H`, `hB`], LI: [`H`, `hB`, `h`], LK: [`H`, `h`, `hB`, `hb`], LR: [`h`, `hb`, `H`, `hB`], LS: [`h`, `H`], LT: [`H`, `h`, `hb`, `hB`], LU: [`H`, `h`, `hB`], LV: [`H`, `hB`, `hb`, `h`], LY: [`h`, `hB`, `hb`, `H`], MA: [`H`, `h`, `hB`, `hb`], MC: [`H`, `hB`], MD: [`H`, `hB`], ME: [`H`, `hB`, `h`], MF: [`H`, `hB`], MG: [`H`, `h`], MH: [`h`, `hb`, `H`, `hB`], MK: [`H`, `h`, `hb`, `hB`], ML: [`H`], MM: [`hB`, `hb`, `H`, `h`], MN: [`H`, `h`, `hb`, `hB`], MO: [`h`, `hB`, `hb`, `H`], MP: [`h`, `hb`, `H`, `hB`], MQ: [`H`, `hB`], MR: [`h`, `hB`, `hb`, `H`], MS: [`H`, `h`, `hb`, `hB`], MT: [`H`, `h`], MU: [`H`, `h`], MV: [`H`, `h`], MW: [`h`, `hb`, `H`, `hB`], MX: [`h`, `H`, `hB`, `hb`], MY: [`hb`, `hB`, `h`, `H`], MZ: [`H`, `hB`], NA: [`h`, `H`, `hB`, `hb`], NC: [`H`, `hB`], NE: [`H`], NF: [`H`, `h`, `hb`, `hB`], NG: [`H`, `h`, `hb`, `hB`], NI: [`h`, `H`, `hB`, `hb`], NL: [`H`, `hB`], NO: [`H`, `h`], NP: [`H`, `h`, `hB`], NR: [`H`, `h`, `hb`, `hB`], NU: [`H`, `h`, `hb`, `hB`], NZ: [`h`, `hb`, `H`, `hB`], OM: [`h`, `hB`, `hb`, `H`], PA: [`h`, `H`, `hB`, `hb`], PE: [`h`, `H`, `hB`, `hb`], PF: [`H`, `h`, `hB`], PG: [`h`, `H`], PH: [`h`, `hB`, `hb`, `H`], PK: [`h`, `hB`, `H`], PL: [`H`, `h`], PM: [`H`, `hB`], PN: [`H`, `h`, `hb`, `hB`], PR: [`h`, `H`, `hB`, `hb`], PS: [`h`, `hB`, `hb`, `H`], PT: [`H`, `hB`], PW: [`h`, `H`], PY: [`h`, `H`, `hB`, `hb`], QA: [`h`, `hB`, `hb`, `H`], RE: [`H`, `hB`], RO: [`H`, `hB`], RS: [`H`, `hB`, `h`], RU: [`H`], RW: [`H`, `h`], SA: [`h`, `hB`, `hb`, `H`], SB: [`h`, `hb`, `H`, `hB`], SC: [`H`, `h`, `hB`], SD: [`h`, `hB`, `hb`, `H`], SE: [`H`], SG: [`h`, `hb`, `H`, `hB`], SH: [`H`, `h`, `hb`, `hB`], SI: [`H`, `hB`], SJ: [`H`], SK: [`H`], SL: [`h`, `hb`, `H`, `hB`], SM: [`H`, `h`, `hB`], SN: [`H`, `h`, `hB`], SO: [`h`, `H`], SR: [`H`, `hB`], SS: [`h`, `hb`, `H`, `hB`], ST: [`H`, `hB`], SV: [`h`, `H`, `hB`, `hb`], SX: [`H`, `h`, `hb`, `hB`], SY: [`h`, `hB`, `hb`, `H`], SZ: [`h`, `hb`, `H`, `hB`], TA: [`H`, `h`, `hb`, `hB`], TC: [`h`, `hb`, `H`, `hB`], TD: [`h`, `H`, `hB`], TF: [`H`, `h`, `hB`], TG: [`H`, `hB`], TH: [`H`, `h`], TJ: [`H`, `h`], TL: [`H`, `hB`, `hb`, `h`], TM: [`H`, `h`], TN: [`h`, `hB`, `hb`, `H`], TO: [`h`, `H`], TR: [`H`, `hB`], TT: [`h`, `hb`, `H`, `hB`], TW: [`hB`, `hb`, `h`, `H`], TZ: [`hB`, `hb`, `H`, `h`], UA: [`H`, `hB`, `h`], UG: [`hB`, `hb`, `H`, `h`], UM: [`h`, `hb`, `H`, `hB`], US: [`h`, `hb`, `H`, `hB`], UY: [`h`, `H`, `hB`, `hb`], UZ: [`H`, `hB`, `h`], VA: [`H`, `h`, `hB`], VC: [`h`, `hb`, `H`, `hB`], VE: [`h`, `H`, `hB`, `hb`], VG: [`h`, `hb`, `H`, `hB`], VI: [`h`, `hb`, `H`, `hB`], VN: [`H`, `h`], VU: [`h`, `H`], WF: [`H`, `hB`], WS: [`h`, `H`], XK: [`H`, `hB`, `h`], YE: [`h`, `hB`, `hb`, `H`], YT: [`H`, `hB`], ZA: [`H`, `h`, `hb`, `hB`], ZM: [`h`, `hb`, `H`, `hB`], ZW: [`H`, `h`], "af-ZA": [`H`, `h`, `hB`, `hb`], "ar-001": [`h`, `hB`, `hb`, `H`], "ca-ES": [`H`, `h`, `hB`], "en-001": [`h`, `hb`, `H`, `hB`], "en-HK": [`h`, `hb`, `H`, `hB`], "en-IL": [`H`, `h`, `hb`, `hB`], "en-MY": [`h`, `hb`, `H`, `hB`], "es-BR": [`H`, `h`, `hB`, `hb`], "es-ES": [`H`, `h`, `hB`, `hb`], "es-GQ": [`H`, `h`, `hB`, `hb`], "fr-CA": [`H`, `h`, `hB`], "gl-ES": [`H`, `h`, `hB`], "gu-IN": [`hB`, `hb`, `h`, `H`], "hi-IN": [`hB`, `h`, `H`], "it-CH": [`H`, `h`, `hB`], "it-IT": [`H`, `h`, `hB`], "kn-IN": [`hB`, `h`, `H`], "ku-SY": [`H`, `hB`], "ml-IN": [`hB`, `h`, `H`], "mr-IN": [`hB`, `hb`, `h`, `H`], "pa-IN": [`hB`, `hb`, `h`, `H`], "ta-IN": [`hB`, `h`, `hb`, `H`], "te-IN": [`hB`, `h`, `H`], "zu-ZA": [`H`, `hB`, `hb`, `h`] };
|
|
2528
2529
|
function Qi(e6, t2) {
|
|
2529
2530
|
let n2 = ``;
|
|
2530
2531
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
@@ -2558,11 +2559,11 @@ function $i(e6) {
|
|
|
2558
2559
|
throw Error(`Invalid hourCycle`);
|
|
2559
2560
|
}
|
|
2560
2561
|
let n2 = e6.language, r2;
|
|
2561
|
-
return n2 !== `root` && (r2 = e6.maximize().region), (
|
|
2562
|
+
return n2 !== `root` && (r2 = e6.maximize().region), (H[`${n2}-${r2}`] || H[r2 || ``] || H[n2 || ``] || H[`${n2}-001`] || H[`001`])[0].charAt(0);
|
|
2562
2563
|
}
|
|
2563
2564
|
var ea = RegExp(`^${Zi.source}*`);
|
|
2564
2565
|
var ta = RegExp(`${Zi.source}*$`);
|
|
2565
|
-
function
|
|
2566
|
+
function U(e6, t2) {
|
|
2566
2567
|
return { start: e6, end: t2 };
|
|
2567
2568
|
}
|
|
2568
2569
|
var na = !!Object.fromEntries;
|
|
@@ -2620,7 +2621,7 @@ var da = class {
|
|
|
2620
2621
|
let e7 = ua(this.message);
|
|
2621
2622
|
if (e7) {
|
|
2622
2623
|
let t2 = this.clonePosition();
|
|
2623
|
-
return this.position = e7, { val: [{ type: 0, value: this.message, location:
|
|
2624
|
+
return this.position = e7, { val: [{ type: 0, value: this.message, location: U(t2, this.clonePosition()) }], err: null };
|
|
2624
2625
|
}
|
|
2625
2626
|
}
|
|
2626
2627
|
}
|
|
@@ -2637,10 +2638,10 @@ var da = class {
|
|
|
2637
2638
|
} else if (i2 === 125 && e6 > 0) break;
|
|
2638
2639
|
else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
|
|
2639
2640
|
let e7 = this.clonePosition();
|
|
2640
|
-
this.bump(), r2.push({ type: 7, location:
|
|
2641
|
+
this.bump(), r2.push({ type: 7, location: U(e7, this.clonePosition()) });
|
|
2641
2642
|
} else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
2642
2643
|
if (n2) break;
|
|
2643
|
-
return this.error(26,
|
|
2644
|
+
return this.error(26, U(this.clonePosition(), this.clonePosition()));
|
|
2644
2645
|
} else if (i2 === 60 && !this.ignoreTag && fa(this.peek() || 0)) {
|
|
2645
2646
|
let n3 = this.parseTag(e6, t2);
|
|
2646
2647
|
if (n3.err) return n3;
|
|
@@ -2657,19 +2658,19 @@ var da = class {
|
|
|
2657
2658
|
let n2 = this.clonePosition();
|
|
2658
2659
|
this.bump();
|
|
2659
2660
|
let r2 = this.parseTagName();
|
|
2660
|
-
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location:
|
|
2661
|
+
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: U(n2, this.clonePosition()) }, err: null };
|
|
2661
2662
|
if (this.bumpIf(`>`)) {
|
|
2662
2663
|
let i2 = this.parseMessage(e6 + 1, t2, true);
|
|
2663
2664
|
if (i2.err) return i2;
|
|
2664
2665
|
let a2 = i2.val, o2 = this.clonePosition();
|
|
2665
2666
|
if (this.bumpIf(`</`)) {
|
|
2666
|
-
if (this.isEOF() || !fa(this.char())) return this.error(23,
|
|
2667
|
+
if (this.isEOF() || !fa(this.char())) return this.error(23, U(o2, this.clonePosition()));
|
|
2667
2668
|
let e7 = this.clonePosition();
|
|
2668
|
-
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location:
|
|
2669
|
+
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: U(n2, this.clonePosition()) }, err: null } : this.error(23, U(o2, this.clonePosition()))) : this.error(26, U(e7, this.clonePosition()));
|
|
2669
2670
|
}
|
|
2670
|
-
return this.error(27,
|
|
2671
|
+
return this.error(27, U(n2, this.clonePosition()));
|
|
2671
2672
|
}
|
|
2672
|
-
return this.error(23,
|
|
2673
|
+
return this.error(23, U(n2, this.clonePosition()));
|
|
2673
2674
|
}
|
|
2674
2675
|
parseTagName() {
|
|
2675
2676
|
let e6 = this.offset();
|
|
@@ -2693,7 +2694,7 @@ var da = class {
|
|
|
2693
2694
|
if (a2) r2 += a2;
|
|
2694
2695
|
else break;
|
|
2695
2696
|
}
|
|
2696
|
-
let i2 =
|
|
2697
|
+
let i2 = U(n2, this.clonePosition());
|
|
2697
2698
|
return { val: { type: 0, value: r2, location: i2 }, err: null };
|
|
2698
2699
|
}
|
|
2699
2700
|
tryParseLeftAngleBracket() {
|
|
@@ -2737,29 +2738,29 @@ var da = class {
|
|
|
2737
2738
|
}
|
|
2738
2739
|
parseArgument(e6, t2) {
|
|
2739
2740
|
let n2 = this.clonePosition();
|
|
2740
|
-
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2741
|
-
if (this.char() === 125) return this.bump(), this.error(2,
|
|
2741
|
+
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, U(n2, this.clonePosition()));
|
|
2742
|
+
if (this.char() === 125) return this.bump(), this.error(2, U(n2, this.clonePosition()));
|
|
2742
2743
|
let r2 = this.parseIdentifierIfPossible().value;
|
|
2743
|
-
if (!r2) return this.error(3,
|
|
2744
|
-
if (this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2744
|
+
if (!r2) return this.error(3, U(n2, this.clonePosition()));
|
|
2745
|
+
if (this.bumpSpace(), this.isEOF()) return this.error(1, U(n2, this.clonePosition()));
|
|
2745
2746
|
switch (this.char()) {
|
|
2746
2747
|
case 125:
|
|
2747
|
-
return this.bump(), { val: { type: 1, value: r2, location:
|
|
2748
|
+
return this.bump(), { val: { type: 1, value: r2, location: U(n2, this.clonePosition()) }, err: null };
|
|
2748
2749
|
case 44:
|
|
2749
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1,
|
|
2750
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, U(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
|
|
2750
2751
|
default:
|
|
2751
|
-
return this.error(3,
|
|
2752
|
+
return this.error(3, U(n2, this.clonePosition()));
|
|
2752
2753
|
}
|
|
2753
2754
|
}
|
|
2754
2755
|
parseIdentifierIfPossible() {
|
|
2755
2756
|
let e6 = this.clonePosition(), t2 = this.offset(), n2 = la(this.message, t2), r2 = t2 + n2.length;
|
|
2756
|
-
return this.bumpTo(r2), { value: n2, location:
|
|
2757
|
+
return this.bumpTo(r2), { value: n2, location: U(e6, this.clonePosition()) };
|
|
2757
2758
|
}
|
|
2758
2759
|
parseArgumentOptions(e6, t2, n2, r2) {
|
|
2759
2760
|
let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
|
|
2760
2761
|
switch (a2) {
|
|
2761
2762
|
case ``:
|
|
2762
|
-
return this.error(4,
|
|
2763
|
+
return this.error(4, U(i2, o2));
|
|
2763
2764
|
case `number`:
|
|
2764
2765
|
case `date`:
|
|
2765
2766
|
case `time`: {
|
|
@@ -2770,12 +2771,12 @@ var da = class {
|
|
|
2770
2771
|
let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
|
|
2771
2772
|
if (n3.err) return n3;
|
|
2772
2773
|
let r3 = sa(n3.val);
|
|
2773
|
-
if (r3.length === 0) return this.error(6,
|
|
2774
|
-
e7 = { style: r3, styleLocation:
|
|
2774
|
+
if (r3.length === 0) return this.error(6, U(this.clonePosition(), this.clonePosition()));
|
|
2775
|
+
e7 = { style: r3, styleLocation: U(t4, this.clonePosition()) };
|
|
2775
2776
|
}
|
|
2776
2777
|
let t3 = this.tryParseArgumentClose(r2);
|
|
2777
2778
|
if (t3.err) return t3;
|
|
2778
|
-
let i3 =
|
|
2779
|
+
let i3 = U(r2, this.clonePosition());
|
|
2779
2780
|
if (e7 && e7.style.startsWith(`::`)) {
|
|
2780
2781
|
let t4 = oa(e7.style.slice(2));
|
|
2781
2782
|
if (a2 === `number`) {
|
|
@@ -2796,11 +2797,11 @@ var da = class {
|
|
|
2796
2797
|
case `selectordinal`:
|
|
2797
2798
|
case `select`: {
|
|
2798
2799
|
let i3 = this.clonePosition();
|
|
2799
|
-
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12,
|
|
2800
|
+
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, U(i3, { ...i3 }));
|
|
2800
2801
|
this.bumpSpace();
|
|
2801
2802
|
let o3 = this.parseIdentifierIfPossible(), s2 = 0;
|
|
2802
2803
|
if (a2 !== `select` && o3.value === `offset`) {
|
|
2803
|
-
if (!this.bumpIf(`:`)) return this.error(13,
|
|
2804
|
+
if (!this.bumpIf(`:`)) return this.error(13, U(this.clonePosition(), this.clonePosition()));
|
|
2804
2805
|
this.bumpSpace();
|
|
2805
2806
|
let e7 = this.tryParseDecimalInteger(13, 14);
|
|
2806
2807
|
if (e7.err) return e7;
|
|
@@ -2810,15 +2811,15 @@ var da = class {
|
|
|
2810
2811
|
if (c2.err) return c2;
|
|
2811
2812
|
let l2 = this.tryParseArgumentClose(r2);
|
|
2812
2813
|
if (l2.err) return l2;
|
|
2813
|
-
let u2 =
|
|
2814
|
+
let u2 = U(r2, this.clonePosition());
|
|
2814
2815
|
return a2 === `select` ? { val: { type: 5, value: n2, options: aa(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: aa(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
|
|
2815
2816
|
}
|
|
2816
2817
|
default:
|
|
2817
|
-
return this.error(5,
|
|
2818
|
+
return this.error(5, U(i2, o2));
|
|
2818
2819
|
}
|
|
2819
2820
|
}
|
|
2820
2821
|
tryParseArgumentClose(e6) {
|
|
2821
|
-
return this.isEOF() || this.char() !== 125 ? this.error(1,
|
|
2822
|
+
return this.isEOF() || this.char() !== 125 ? this.error(1, U(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
|
|
2822
2823
|
}
|
|
2823
2824
|
parseSimpleArgStyleIfPossible() {
|
|
2824
2825
|
let e6 = 0, t2 = this.clonePosition();
|
|
@@ -2826,7 +2827,7 @@ var da = class {
|
|
|
2826
2827
|
case 39: {
|
|
2827
2828
|
this.bump();
|
|
2828
2829
|
let e7 = this.clonePosition();
|
|
2829
|
-
if (!this.bumpUntil(`'`)) return this.error(11,
|
|
2830
|
+
if (!this.bumpUntil(`'`)) return this.error(11, U(e7, this.clonePosition()));
|
|
2830
2831
|
this.bump();
|
|
2831
2832
|
break;
|
|
2832
2833
|
}
|
|
@@ -2859,20 +2860,20 @@ var da = class {
|
|
|
2859
2860
|
if (t2 !== `select` && this.bumpIf(`=`)) {
|
|
2860
2861
|
let t3 = this.tryParseDecimalInteger(16, 19);
|
|
2861
2862
|
if (t3.err) return t3;
|
|
2862
|
-
c2 =
|
|
2863
|
+
c2 = U(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
|
|
2863
2864
|
} else break;
|
|
2864
2865
|
}
|
|
2865
2866
|
if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
|
|
2866
2867
|
s2 === `other` && (i2 = true), this.bumpSpace();
|
|
2867
2868
|
let r3 = this.clonePosition();
|
|
2868
|
-
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18,
|
|
2869
|
+
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, U(this.clonePosition(), this.clonePosition()));
|
|
2869
2870
|
let l2 = this.parseMessage(e6 + 1, t2, n2);
|
|
2870
2871
|
if (l2.err) return l2;
|
|
2871
2872
|
let u2 = this.tryParseArgumentClose(r3);
|
|
2872
2873
|
if (u2.err) return u2;
|
|
2873
|
-
a2.push([s2, { value: l2.val, location:
|
|
2874
|
+
a2.push([s2, { value: l2.val, location: U(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
|
|
2874
2875
|
}
|
|
2875
|
-
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16,
|
|
2876
|
+
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16, U(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i2 ? this.error(22, U(this.clonePosition(), this.clonePosition())) : { val: a2, err: null };
|
|
2876
2877
|
}
|
|
2877
2878
|
tryParseDecimalInteger(e6, t2) {
|
|
2878
2879
|
let n2 = 1, r2 = this.clonePosition();
|
|
@@ -2883,7 +2884,7 @@ var da = class {
|
|
|
2883
2884
|
if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
|
|
2884
2885
|
else break;
|
|
2885
2886
|
}
|
|
2886
|
-
let o2 =
|
|
2887
|
+
let o2 = U(r2, this.clonePosition());
|
|
2887
2888
|
return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
|
|
2888
2889
|
}
|
|
2889
2890
|
offset() {
|
|
@@ -3226,25 +3227,25 @@ function Ka(e6, t2, n2) {
|
|
|
3226
3227
|
}
|
|
3227
3228
|
function qa(e6) {
|
|
3228
3229
|
var t2 = Ja(e6, `string`);
|
|
3229
|
-
return
|
|
3230
|
+
return W(t2) == `symbol` ? t2 : t2 + ``;
|
|
3230
3231
|
}
|
|
3231
3232
|
function Ja(e6, t2) {
|
|
3232
|
-
if (
|
|
3233
|
+
if (W(e6) != `object` || !e6) return e6;
|
|
3233
3234
|
var n2 = e6[Symbol.toPrimitive];
|
|
3234
3235
|
if (n2 !== void 0) {
|
|
3235
3236
|
var r2 = n2.call(e6, t2 || `default`);
|
|
3236
|
-
if (
|
|
3237
|
+
if (W(r2) != `object`) return r2;
|
|
3237
3238
|
throw TypeError(`@@toPrimitive must return a primitive value.`);
|
|
3238
3239
|
}
|
|
3239
3240
|
return (t2 === `string` ? String : Number)(e6);
|
|
3240
3241
|
}
|
|
3241
|
-
function
|
|
3242
|
+
function W(e6) {
|
|
3242
3243
|
"@babel/helpers - typeof";
|
|
3243
|
-
return
|
|
3244
|
+
return W = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3244
3245
|
return typeof e7;
|
|
3245
3246
|
} : function(e7) {
|
|
3246
3247
|
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3247
|
-
},
|
|
3248
|
+
}, W(e6);
|
|
3248
3249
|
}
|
|
3249
3250
|
var Ya = `https://www.i18next.com/how-to/using-icu-or-mf2`;
|
|
3250
3251
|
var Xa = [`zero`, `one`, `two`, `few`, `many`, `other`];
|
|
@@ -3256,7 +3257,7 @@ function Za() {
|
|
|
3256
3257
|
}, escapeVariables: false };
|
|
3257
3258
|
}
|
|
3258
3259
|
function Qa(e6, t2, n2, r2) {
|
|
3259
|
-
return n2 && t2 &&
|
|
3260
|
+
return n2 && t2 && W(t2) === `object` ? `${r2} resolved to an object or array, but i18next-icu does not support returnObjects or joinArrays and returns the raw value unformatted.` : n2 && typeof t2 == `string` && t2.indexOf(`{{`) > -1 ? `${r2} could not be parsed (${e6.message}). It contains "{{": i18next interpolation like {{name}} does not work with ICU, use {name}.` : `${r2} could not be ${n2 ? `parsed` : `formatted`}: ${e6.message}`;
|
|
3260
3261
|
}
|
|
3261
3262
|
var $a = function() {
|
|
3262
3263
|
function e6(t2) {
|
|
@@ -3282,7 +3283,7 @@ var $a = function() {
|
|
|
3282
3283
|
}
|
|
3283
3284
|
try {
|
|
3284
3285
|
c2 || (this.debug && typeof e7 == `string` && e7.indexOf(`$t(`) > -1 && this.firstTime(`nesting ${n2} ${r2} ${i2}`) && this.warn(`key "${i2}" (${n2}/${r2}) contains "$t(", but i18next-icu does not support nesting, the text is output as is.`), c2 = new ka(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && Ma(this.mem, s2, { res: e7, fc: c2 }));
|
|
3285
|
-
var u2 = t2 && t2.replace &&
|
|
3286
|
+
var u2 = t2 && t2.replace && W(t2.replace) === `object` ? Ha(Ha({}, t2), t2.replace) : t2;
|
|
3286
3287
|
return c2.format(this.escapeVariableValues(u2));
|
|
3287
3288
|
} catch (a3) {
|
|
3288
3289
|
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(Qa(a3, e7, !c2, `key "${i2}" (${n2}/${r2})`)), this.options.parseErrorHandler(a3, i2, e7, t2);
|
|
@@ -3310,7 +3311,7 @@ var $a = function() {
|
|
|
3310
3311
|
} }, { key: `clearCache`, value: function() {
|
|
3311
3312
|
this.mem = {};
|
|
3312
3313
|
} }, { key: `escapeVariableValues`, value: function(e7) {
|
|
3313
|
-
if (!this.options.escapeVariables || !e7 ||
|
|
3314
|
+
if (!this.options.escapeVariables || !e7 || W(e7) !== `object`) return e7;
|
|
3314
3315
|
for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
|
|
3315
3316
|
var i2 = Fa(r2[n2], 2), a2 = i2[0], o2 = i2[1];
|
|
3316
3317
|
t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`) : o2;
|
|
@@ -3326,11 +3327,11 @@ function eo({ icuOptions: e6 = {}, ...t2 }) {
|
|
|
3326
3327
|
var to = (e6, t2, n2, r2) => {
|
|
3327
3328
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
3328
3329
|
if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
|
|
3329
|
-
|
|
3330
|
+
G(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
|
|
3330
3331
|
};
|
|
3331
3332
|
var no = {};
|
|
3332
3333
|
var ro = (e6, t2, n2, r2) => {
|
|
3333
|
-
|
|
3334
|
+
G(n2) && no[n2] || (G(n2) && (no[n2] = /* @__PURE__ */ new Date()), to(e6, t2, n2, r2));
|
|
3334
3335
|
};
|
|
3335
3336
|
var io = (e6, t2) => () => {
|
|
3336
3337
|
if (e6.isInitialized) t2();
|
|
@@ -3347,7 +3348,7 @@ var ao = (e6, t2, n2) => {
|
|
|
3347
3348
|
e6.loadNamespaces(t2, io(e6, n2));
|
|
3348
3349
|
};
|
|
3349
3350
|
var oo = (e6, t2, n2, r2) => {
|
|
3350
|
-
if (
|
|
3351
|
+
if (G(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return ao(e6, n2, r2);
|
|
3351
3352
|
n2.forEach((t3) => {
|
|
3352
3353
|
e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
|
|
3353
3354
|
}), e6.loadLanguages(t2, io(e6, r2));
|
|
@@ -3355,7 +3356,7 @@ var oo = (e6, t2, n2, r2) => {
|
|
|
3355
3356
|
var so = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (ro(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
|
|
3356
3357
|
if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
|
|
3357
3358
|
} });
|
|
3358
|
-
var
|
|
3359
|
+
var G = (e6) => typeof e6 == `string`;
|
|
3359
3360
|
var co = (e6) => typeof e6 == `object` && !!e6;
|
|
3360
3361
|
var lo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
3361
3362
|
var uo = { "&": `&`, "&": `&`, "<": `<`, "<": `<`, ">": `>`, ">": `>`, "'": `'`, "'": `'`, """: `"`, """: `"`, " ": ` `, " ": ` `, "©": `\xA9`, "©": `\xA9`, "®": `\xAE`, "®": `\xAE`, "…": `\u2026`, "…": `\u2026`, "/": `/`, "/": `/` };
|
|
@@ -3390,12 +3391,12 @@ var So = (e6, t2 = {}) => {
|
|
|
3390
3391
|
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = o(_o) || {}, a2 = n2 || r2 || go();
|
|
3391
3392
|
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new vo()), !a2) {
|
|
3392
3393
|
ro(a2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
|
|
3393
|
-
let e7 = (e8, t4) =>
|
|
3394
|
+
let e7 = (e8, t4) => G(t4) ? t4 : co(t4) && G(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
|
|
3394
3395
|
return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
|
|
3395
3396
|
}
|
|
3396
3397
|
a2.options.react?.wait && ro(a2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
|
|
3397
3398
|
let c2 = { ...mo(), ...a2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = c2, p2 = e6 || i2 || a2.options?.defaultNS;
|
|
3398
|
-
p2 =
|
|
3399
|
+
p2 = G(p2) ? [p2] : p2 || [`translation`], a2.reportNamespaces.addUsedNamespaces?.(p2);
|
|
3399
3400
|
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) => so(e7, a2, c2)), h2 = xo(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), g2 = () => h2, _2 = () => bo(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), [v2, y2] = u(g2), b2 = p2.join();
|
|
3400
3401
|
t2.lng && (b2 = `${t2.lng}${b2}`);
|
|
3401
3402
|
let x2 = yo(b2), S2 = l(true);
|
|
@@ -3452,7 +3453,7 @@ function Mo({ key: e6, warmupData: t2, fetchData: n2 }) {
|
|
|
3452
3453
|
if (a2) return a2.promise;
|
|
3453
3454
|
let o2 = Eo(e6);
|
|
3454
3455
|
if (o2 !== void 0) {
|
|
3455
|
-
let t3 =
|
|
3456
|
+
let t3 = Bn(o2);
|
|
3456
3457
|
return r2.set(e6, { promise: t3, expiresAt: i2 + Do }), t3;
|
|
3457
3458
|
}
|
|
3458
3459
|
let s2 = (async () => await t2.get(e6) ?? n2())();
|
|
@@ -3490,26 +3491,26 @@ var Bo = (e6, t2, n2) => {
|
|
|
3490
3491
|
});
|
|
3491
3492
|
};
|
|
3492
3493
|
var Vo = (e6) => e6.split(`-`)[0] ?? e6;
|
|
3493
|
-
|
|
3494
|
+
Sr({ isDev: false, loadMessages: (e6) => Bo(Object.assign({ "../assets/locale/messages_en.dev.json": () => vn(() => Promise.resolve().then(() => Ko), void 0, import.meta.url), "../assets/locale/messages_en.json": () => vn(() => Promise.resolve().then(() => Jo), void 0, import.meta.url) }), `../assets/locale/messages_${Vo(e6)}.json`, 4), loadDevMessages: (e6) => Bo(Object.assign({ "../assets/locale/messages_en.dev.json": () => vn(() => Promise.resolve().then(() => Ko), void 0, import.meta.url) }), `../assets/locale/messages_${Vo(e6)}.dev.json`, 4) });
|
|
3494
3495
|
var Ho = /* @__PURE__ */ new WeakMap();
|
|
3495
3496
|
function Uo(e6) {
|
|
3496
3497
|
let t2 = Ho.get(e6);
|
|
3497
3498
|
return t2 || (t2 = Ro(e6).finally(() => Ho.delete(e6)), Ho.set(e6, t2)), t2;
|
|
3498
3499
|
}
|
|
3499
3500
|
function Wo({ i18n: e6, locale: t2 }) {
|
|
3500
|
-
let n2 =
|
|
3501
|
+
let n2 = qn(), r2 = yr();
|
|
3501
3502
|
if (!n2) return null;
|
|
3502
3503
|
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw Uo(e6);
|
|
3503
3504
|
let i2 = zo(e6, t2);
|
|
3504
3505
|
return i2 && r2.set(No, { locale: t2, messages: i2 }), null;
|
|
3505
3506
|
}
|
|
3506
3507
|
function Go(e6) {
|
|
3507
|
-
let t2 =
|
|
3508
|
+
let t2 = gr(), n2 = Fo()?.locale ?? t2 ?? `en`;
|
|
3508
3509
|
return { i18n: Lo(n2, e6), locale: n2 };
|
|
3509
3510
|
}
|
|
3510
|
-
var Ko =
|
|
3511
|
+
var Ko = _({ default: () => qo });
|
|
3511
3512
|
var qo = { "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "post-list.empty-state.title": `No posts yet`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "related-posts.empty-state.title": `No related posts yet`, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "post-actions.like": `Like post`, "post-actions.unlike": `Unlike post`, "post-actions.share": `Share post`, "post-actions.share-dialog": `Share post`, "post-actions.link-copied": `Link copied`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.link-label": `Post link`, "post-actions.copy-link": `Copy link`, "post-actions.close": `Close`, "post-counters.loading-likes": `Loading likes`, "cover-media.play": `Play video`, "cover-media.placeholder-alt": `Post cover image`, "post-comments.loading": `Loading comments\u2026`, "post-comments.no-post": `No post resolved for this URL yet.`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, "canvas.post-title": `Post Title`, "canvas.author-name": `Author Name`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "canvas.category": `Category`, "canvas.category-numbered": `Category {number}`, "canvas.tag-numbered": `Tag {number}`, "canvas.author-photo-alt": `Author photo`, "category-header.all-posts": `All Posts` };
|
|
3512
|
-
var Jo =
|
|
3513
|
+
var Jo = _({ default: () => Xo, title: () => Yo });
|
|
3513
3514
|
var Yo = `My App`;
|
|
3514
3515
|
var Xo = { "canvas.category": `Category`, "post-list.empty-state.description": `Once posts are published, they will appear here.`, "canvas.tag-numbered": `Tag {number}`, "cover-media.play": `Play video`, "post-comments.unavailable": `Comments are unavailable \u2014 no app instance.`, "post-counters.loading-likes": `Loading likes`, "post-comments.loading": `Loading comments\u2026`, "post-actions.like": `Like post`, "canvas.content": `This is where the full post appears. Write your story here, add images, galleries and video from the dashboard, and use headings and quotes to keep it easy to read.`, "related-posts.empty-state.title": `No related posts yet`, "post.time-to-read": `{count, plural, one {# min read} other {# min read}}`, "post-actions.link-copied": `Link copied`, "category-header.all-posts": `All Posts`, "post-actions.copy-manually": `Copy the link below to share this post.`, "post-actions.copy-link": `Copy link`, "cover-media.placeholder-alt": `Post cover image`, "post-actions.link-label": `Post link`, "post-list.empty-state.title": `No posts yet`, "post-actions.share-dialog": `Share post`, "canvas.post-title": `Post Title`, "post-actions.unlike": `Unlike post`, "post-comments.no-post": `No post resolved for this URL yet.`, "post.like-count": `{count, plural, one {{formatted} like} other {{formatted} likes}}`, "canvas.category-numbered": `Category {number}`, "post.comment-count": `{count, plural, one {{formatted} comment} other {{formatted} comments}}`, "post-actions.share": `Share post`, "post.view-count": `{count, plural, one {{formatted} view} other {{formatted} views}}`, "post-actions.close": `Close`, "canvas.category-description": `Add a short description of this category so readers know what they will find here. It shows under the category title, above the posts.`, "canvas.author-photo-alt": `Author photo`, "canvas.author-name": `Author Name`, "post-comments.demo-notice": `Sample comments are shown while editing. Visitors will see real comments.`, title: Yo, "related-posts.empty-state.description": `Once more posts are published, they will appear here.`, "canvas.excerpt": `Share the key idea of your post here. This short summary shows on feed cards and in search results, and tells readers why the post is worth their time.` };
|
|
3515
3516
|
var Zo = Object.assign({ "../assets/locale/messages_en.dev.json": Ko, "../assets/locale/messages_en.json": Jo });
|
|
@@ -3517,12 +3518,12 @@ var Qo = (e6, t2) => {
|
|
|
3517
3518
|
let n2 = Zo[`../assets/locale/messages_${Vo(e6)}${t2}.json`];
|
|
3518
3519
|
return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
|
|
3519
3520
|
};
|
|
3520
|
-
var $o =
|
|
3521
|
+
var $o = Sr({ isDev: false, loadMessages: (e6) => Qo(e6, ``), loadDevMessages: (e6) => Qo(e6, `.dev`) });
|
|
3521
3522
|
var es = (e6, t2, n2) => typeof e6 != `number` || !Number.isFinite(e6) || e6 < 0 ? `` : new Intl.NumberFormat(n2, t2 === `compact` ? { notation: `compact`, maximumFractionDigits: 1 } : void 0).format(e6);
|
|
3522
|
-
var
|
|
3523
|
+
var K = { timeToRead: `post.time-to-read`, viewCount: `post.view-count`, commentCount: `post.comment-count`, likeCount: `post.like-count`, noPostsTitle: `post-list.empty-state.title`, noPostsDescription: `post-list.empty-state.description`, noRelatedPostsTitle: `related-posts.empty-state.title`, noRelatedPostsDescription: `related-posts.empty-state.description`, canvasPostTitle: `canvas.post-title`, canvasAuthorName: `canvas.author-name`, canvasExcerpt: `canvas.excerpt`, canvasContent: `canvas.content`, canvasCategory: `canvas.category`, canvasCategoryNumbered: `canvas.category-numbered`, canvasTagNumbered: `canvas.tag-numbered`, canvasCoverAlt: `cover-media.placeholder-alt`, canvasAuthorPhotoAlt: `canvas.author-photo-alt` };
|
|
3523
3524
|
var ts = (e6, t2) => {
|
|
3524
3525
|
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: es(r2, `full`, t2) });
|
|
3525
|
-
return { timeToRead: (t3) => e6(
|
|
3526
|
+
return { timeToRead: (t3) => e6(K.timeToRead, { count: t3 }), viewCount: n2(K.viewCount), commentCount: n2(K.commentCount), likeCount: n2(K.likeCount), noPostsEmptyState: () => ({ title: e6(K.noPostsTitle), description: e6(K.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(K.noRelatedPostsTitle), description: e6(K.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(K.canvasPostTitle), authorName: () => e6(K.canvasAuthorName), excerpt: () => e6(K.canvasExcerpt), content: () => e6(K.canvasContent), category: () => e6(K.canvasCategory), categoryNumbered: (t3) => e6(K.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(K.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(K.canvasCoverAlt), authorPhotoAlt: () => e6(K.canvasAuthorPhotoAlt) } };
|
|
3526
3527
|
};
|
|
3527
3528
|
function ns(e6) {
|
|
3528
3529
|
return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
|
|
@@ -3533,7 +3534,7 @@ function rs(e6) {
|
|
|
3533
3534
|
function is(e6) {
|
|
3534
3535
|
return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
|
|
3535
3536
|
}
|
|
3536
|
-
function
|
|
3537
|
+
function q(e6, t2) {
|
|
3537
3538
|
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...ns(e6) ? e6.$and : [e6], ...ns(t2) ? t2.$and : [t2]] };
|
|
3538
3539
|
}
|
|
3539
3540
|
function as(e6, t2) {
|
|
@@ -3612,7 +3613,7 @@ var ls = class extends ss {
|
|
|
3612
3613
|
function us(e6) {
|
|
3613
3614
|
let t2 = (n2) => ({ query: n2, async find() {
|
|
3614
3615
|
try {
|
|
3615
|
-
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [
|
|
3616
|
+
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [Ze]: a2, [Qe]: o2 } = e6.responseTransformer(i2);
|
|
3616
3617
|
if (e6.pagingMethod === `OFFSET`) {
|
|
3617
3618
|
let e7 = n2;
|
|
3618
3619
|
return new ls({ items: a2 ?? [], fetchNextPage: () => t2({ ...e7, paging: { offset: e7.paging.offset + e7.paging.limit, limit: e7.paging.limit } }).find(), fetchPrevPage: () => t2({ ...n2, paging: { offset: Math.max(e7.paging.offset - e7.paging.limit, 0), limit: e7.paging.limit } }).find(), offset: e7.paging.offset, limit: e7.paging.limit, totalCount: o2?.total, tooManyToCount: o2?.tooManyToCount, originQuery: this });
|
|
@@ -3625,60 +3626,60 @@ function us(e6) {
|
|
|
3625
3626
|
}, skipTo(e7) {
|
|
3626
3627
|
return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
|
|
3627
3628
|
}, eq(r2, i2) {
|
|
3628
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3629
|
-
return t2({ ...n2, filter:
|
|
3629
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [J(e6.transformationPaths, r2)]: a2 };
|
|
3630
|
+
return t2({ ...n2, filter: q(n2.filter, o2) });
|
|
3630
3631
|
}, ne(r2, i2) {
|
|
3631
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3632
|
-
return t2({ ...n2, filter:
|
|
3632
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [J(e6.transformationPaths, r2)]: { $ne: a2 } };
|
|
3633
|
+
return t2({ ...n2, filter: q(n2.filter, o2) });
|
|
3633
3634
|
}, ge(r2, i2) {
|
|
3634
|
-
let a2 = { [
|
|
3635
|
-
return t2({ ...n2, filter:
|
|
3635
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $gte: i2 } };
|
|
3636
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3636
3637
|
}, gt(r2, i2) {
|
|
3637
|
-
let a2 = { [
|
|
3638
|
-
return t2({ ...n2, filter:
|
|
3638
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $gt: i2 } };
|
|
3639
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3639
3640
|
}, le(r2, i2) {
|
|
3640
|
-
let a2 = { [
|
|
3641
|
-
return t2({ ...n2, filter:
|
|
3641
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $lte: i2 } };
|
|
3642
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3642
3643
|
}, lt(r2, i2) {
|
|
3643
|
-
let a2 = { [
|
|
3644
|
-
return t2({ ...n2, filter:
|
|
3644
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $lt: i2 } };
|
|
3645
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3645
3646
|
}, isNotEmpty(e7) {
|
|
3646
3647
|
return this.ne(e7, null);
|
|
3647
3648
|
}, isEmpty(e7) {
|
|
3648
3649
|
return this.eq(e7, null);
|
|
3649
3650
|
}, startsWith(r2, i2) {
|
|
3650
|
-
let a2 = { [
|
|
3651
|
-
return t2({ ...n2, filter:
|
|
3651
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $startsWith: i2 } };
|
|
3652
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3652
3653
|
}, endsWith(r2, i2) {
|
|
3653
|
-
let a2 = { [
|
|
3654
|
-
return t2({ ...n2, filter:
|
|
3654
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $endsWith: i2 } };
|
|
3655
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3655
3656
|
}, contains(r2, i2) {
|
|
3656
|
-
let a2 = { [
|
|
3657
|
-
return t2({ ...n2, filter:
|
|
3657
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $contains: i2 } };
|
|
3658
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3658
3659
|
}, hasSome(r2, ...i2) {
|
|
3659
|
-
let a2 = { [
|
|
3660
|
-
return t2({ ...n2, filter:
|
|
3660
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3661
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3661
3662
|
}, hasAll(r2, ...i2) {
|
|
3662
|
-
let a2 = { [
|
|
3663
|
-
return t2({ ...n2, filter:
|
|
3663
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3664
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3664
3665
|
}, between(e7, t3, n3) {
|
|
3665
3666
|
return this.ge(e7, t3).lt(e7, n3);
|
|
3666
3667
|
}, in(r2, i2) {
|
|
3667
|
-
let a2 = { [
|
|
3668
|
-
return t2({ ...n2, filter:
|
|
3668
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $in: i2 } };
|
|
3669
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3669
3670
|
}, exists(r2, i2 = true) {
|
|
3670
|
-
let a2 = { [
|
|
3671
|
-
return t2({ ...n2, filter:
|
|
3671
|
+
let a2 = { [J(e6.transformationPaths, r2)]: { $exists: i2 } };
|
|
3672
|
+
return t2({ ...n2, filter: q(n2.filter, a2) });
|
|
3672
3673
|
}, or(e7) {
|
|
3673
3674
|
return t2({ ...n2, filter: as(n2.filter, e7.query.filter) });
|
|
3674
3675
|
}, and(e7) {
|
|
3675
|
-
return t2({ ...n2, filter:
|
|
3676
|
+
return t2({ ...n2, filter: q(n2.filter, e7.query.filter) });
|
|
3676
3677
|
}, not(e7) {
|
|
3677
3678
|
return t2({ ...n2, filter: os(e7.query.filter) });
|
|
3678
3679
|
}, ascending(...r2) {
|
|
3679
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3680
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: J(e6.transformationPaths, t3), order: `ASC` }))] });
|
|
3680
3681
|
}, descending(...r2) {
|
|
3681
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3682
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: J(e6.transformationPaths, t3), order: `DESC` }))] });
|
|
3682
3683
|
}, skip(e7) {
|
|
3683
3684
|
return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
|
|
3684
3685
|
}, limit(r2) {
|
|
@@ -3691,9 +3692,9 @@ function us(e6) {
|
|
|
3691
3692
|
} });
|
|
3692
3693
|
return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
|
|
3693
3694
|
}
|
|
3694
|
-
function
|
|
3695
|
+
function J(e6, t2) {
|
|
3695
3696
|
let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
|
|
3696
|
-
return n2 ? t2.replace(n2, e6[n2]) :
|
|
3697
|
+
return n2 ? t2.replace(n2, e6[n2]) : et(t2, { ...e6, ...$e });
|
|
3697
3698
|
}
|
|
3698
3699
|
var ds = `filter`;
|
|
3699
3700
|
var fs = `sort`;
|
|
@@ -3729,23 +3730,23 @@ function Ss(e6, t2) {
|
|
|
3729
3730
|
return t2.typedQueryFunction(e6[0], e6[1]);
|
|
3730
3731
|
}
|
|
3731
3732
|
}
|
|
3732
|
-
function
|
|
3733
|
+
function Y(e6) {
|
|
3733
3734
|
if (!e6) return;
|
|
3734
3735
|
let t2 = ``;
|
|
3735
3736
|
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;
|
|
3736
3737
|
}
|
|
3737
|
-
function
|
|
3738
|
+
function X(e6) {
|
|
3738
3739
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
3739
3740
|
}
|
|
3740
3741
|
var Cs = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
3741
3742
|
var ws = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
3742
3743
|
function Ts(e6) {
|
|
3743
|
-
return
|
|
3744
|
+
return Lt(Object.assign(e6, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/category`, destPath: `/v3/bulk/category` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/categories`, destPath: `/v3/bulk/categories` }], "*.pub.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "bo._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wixbo.ai": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wix-bo.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "social-blog._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], _: [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www.wixapis.com": [{ srcPath: `/blog/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/v3/categories`, destPath: `/v3/categories` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "api._api_base_domain_": [{ srcPath: `/category-service-api-proxy`, destPath: `` }] } }));
|
|
3744
3745
|
}
|
|
3745
3746
|
var Es = `@wix/auto_sdk_blog_categories`;
|
|
3746
3747
|
function Ds(e6) {
|
|
3747
3748
|
function t2({ host: t3 }) {
|
|
3748
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Es, migrationOptions: { optInTransformResponse: true }, url: Ts({ protoPath: `/v3/categories`, data: e6, host: t3 }), params:
|
|
3749
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Es, migrationOptions: { optInTransformResponse: true }, url: Ts({ protoPath: `/v3/categories`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Cs }, { transformFn: dn, paths: ws }]) };
|
|
3749
3750
|
}
|
|
3750
3751
|
return t2;
|
|
3751
3752
|
}
|
|
@@ -3756,7 +3757,7 @@ async function As(e6) {
|
|
|
3756
3757
|
n2?.onSiteCall?.();
|
|
3757
3758
|
try {
|
|
3758
3759
|
let e7 = await t2.request(r2);
|
|
3759
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3760
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Os }, { transformFn: Y, paths: ks }]));
|
|
3760
3761
|
} catch (e7) {
|
|
3761
3762
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3762
3763
|
throw n2?.onError?.(e7), t3;
|
|
@@ -3766,7 +3767,7 @@ function js(e6) {
|
|
|
3766
3767
|
return (t2) => As(t2, { httpClient: e6 });
|
|
3767
3768
|
}
|
|
3768
3769
|
var Ms = M(js);
|
|
3769
|
-
function
|
|
3770
|
+
function Ns(e6) {
|
|
3770
3771
|
if (!e6) return;
|
|
3771
3772
|
let t2 = ``;
|
|
3772
3773
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -3781,69 +3782,69 @@ function X(e6) {
|
|
|
3781
3782
|
}
|
|
3782
3783
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
3783
3784
|
}
|
|
3784
|
-
var
|
|
3785
|
-
var
|
|
3786
|
-
var Fs = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3787
|
-
var
|
|
3788
|
-
var
|
|
3789
|
-
var Rs = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3790
|
-
var
|
|
3791
|
-
function
|
|
3792
|
-
return
|
|
3793
|
-
}
|
|
3794
|
-
var
|
|
3795
|
-
function
|
|
3785
|
+
var Ps = [{ path: `post.firstPublishedDate` }, { path: `post.lastPublishedDate` }, { path: `post.expirationDate` }, { path: `post.heroImage.urlExpirationDate` }, { path: `post.richContent.metadata.createdTimestamp` }, { path: `post.richContent.metadata.updatedTimestamp` }, { path: `post.moderationDetails.submittedDate` }, { path: `post.moderationDetails.moderationDate` }, { path: `post.media.wixMedia.image.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `post.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
3786
|
+
var Fs = [{ path: `post.richContentCompressed` }];
|
|
3787
|
+
var Is = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3788
|
+
var Ls = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.expirationDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
3789
|
+
var Rs = [{ path: `posts.richContentCompressed` }];
|
|
3790
|
+
var zs = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3791
|
+
var Bs = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3792
|
+
function Vs(e6) {
|
|
3793
|
+
return Lt(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
|
|
3794
|
+
}
|
|
3795
|
+
var Hs = `@wix/auto_sdk_blog_posts`;
|
|
3796
|
+
function Us(e6) {
|
|
3796
3797
|
function t2({ host: t3 }) {
|
|
3797
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName:
|
|
3798
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName: Hs, migrationOptions: { optInTransformResponse: true }, url: Vs({ protoPath: `/v3/posts/slugs/{slug}`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ps }, { transformFn: fn, paths: Fs }, { transformFn: dn, paths: Is }]) };
|
|
3798
3799
|
}
|
|
3799
3800
|
return t2;
|
|
3800
3801
|
}
|
|
3801
|
-
function
|
|
3802
|
+
function Ws(e6) {
|
|
3802
3803
|
function t2({ host: t3 }) {
|
|
3803
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName:
|
|
3804
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName: Hs, migrationOptions: { optInTransformResponse: true }, url: Vs({ protoPath: `/v3/posts`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ls }, { transformFn: fn, paths: Rs }, { transformFn: dn, paths: zs }]) };
|
|
3804
3805
|
}
|
|
3805
3806
|
return t2;
|
|
3806
3807
|
}
|
|
3807
|
-
function
|
|
3808
|
+
function Gs(e6) {
|
|
3808
3809
|
function t2({ host: t3 }) {
|
|
3809
|
-
let n2 = A(e6, [{ transformFn:
|
|
3810
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
3810
|
+
let n2 = A(e6, [{ transformFn: un, paths: Bs }]);
|
|
3811
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Hs, migrationOptions: { optInTransformResponse: true }, url: Vs({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ls }, { transformFn: fn, paths: Rs }, { transformFn: dn, paths: zs }]) };
|
|
3811
3812
|
}
|
|
3812
3813
|
return t2;
|
|
3813
3814
|
}
|
|
3814
|
-
var
|
|
3815
|
-
var
|
|
3816
|
-
var
|
|
3817
|
-
var
|
|
3818
|
-
var
|
|
3819
|
-
var
|
|
3815
|
+
var Ks = [{ path: `post.url` }, { path: `post.translations.url` }];
|
|
3816
|
+
var qs = [{ path: `post.heroImage` }, { path: `post.media.wixMedia.image` }];
|
|
3817
|
+
var Js = [{ path: `post.media.wixMedia.videoV2` }];
|
|
3818
|
+
var Ys = [{ path: `posts.url` }, { path: `posts.translations.url` }];
|
|
3819
|
+
var Xs = [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }];
|
|
3820
|
+
var Zs = [{ path: `posts.media.wixMedia.videoV2` }];
|
|
3820
3821
|
var Z = ((e6) => (e6.UNKNOWN = `UNKNOWN`, e6.COUNTERS = `COUNTERS`, e6.URL = `URL`, e6.CONTENT_TEXT = `CONTENT_TEXT`, e6.METRICS = `METRICS`, e6.SEO = `SEO`, e6.CONTENT = `CONTENT`, e6.INTERNAL_ID = `INTERNAL_ID`, e6.CONTACT_ID = `CONTACT_ID`, e6.RICH_CONTENT = `RICH_CONTENT`, e6.RICH_CONTENT_STRING = `RICH_CONTENT_STRING`, e6.RICH_CONTENT_COMPRESSED = `RICH_CONTENT_COMPRESSED`, e6.TRANSLATIONS = `TRANSLATIONS`, e6.REFERENCE_ID = `REFERENCE_ID`, e6.EXCLUDE_PAID_CONTENT = `EXCLUDE_PAID_CONTENT`, e6.SEO_DATA = `SEO_DATA`, e6.OWNER = `OWNER`, e6.HAS_UNPUBLISHED_CHANGES = `HAS_UNPUBLISHED_CHANGES`, e6.HEADING = `HEADING`, e6.IMAGE = `IMAGE`, e6))(Z || {});
|
|
3821
|
-
async function
|
|
3822
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3822
|
+
async function Qs(e6, t2) {
|
|
3823
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Us(D({ slug: e6, fieldsets: t2?.fieldsets, language: t2?.language }, []));
|
|
3823
3824
|
r2?.onSiteCall?.();
|
|
3824
3825
|
try {
|
|
3825
3826
|
let e7 = await n2.request(i2);
|
|
3826
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3827
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Ks }, { transformFn: Y, paths: qs }, { transformFn: Ns, paths: Js }]), [`post.richContent`, `post.rich_content`]);
|
|
3827
3828
|
} catch (e7) {
|
|
3828
3829
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fieldsets: `$[1].fieldsets`, language: `$[1].language` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
|
|
3829
3830
|
throw r2?.onError?.(e7), t3;
|
|
3830
3831
|
}
|
|
3831
3832
|
}
|
|
3832
|
-
async function
|
|
3833
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3833
|
+
async function $s(e6) {
|
|
3834
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Ws(D({ featured: e6?.featured, hashtags: e6?.hashtags, categoryIds: e6?.categoryIds, tagIds: e6?.tagIds, sort: e6?.sort, paging: e6?.paging, language: e6?.language, memberId: e6?.memberId, fieldsets: e6?.fieldsets }, []));
|
|
3834
3835
|
n2?.onSiteCall?.();
|
|
3835
3836
|
try {
|
|
3836
3837
|
let e7 = await t2.request(r2);
|
|
3837
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3838
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Ys }, { transformFn: Y, paths: Xs }, { transformFn: Ns, paths: Zs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3838
3839
|
} catch (e7) {
|
|
3839
3840
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { featured: `$[0].featured`, hashtags: `$[0].hashtags`, categoryIds: `$[0].categoryIds`, tagIds: `$[0].tagIds`, sort: `$[0].sort`, paging: `$[0].paging`, language: `$[0].language`, memberId: `$[0].memberId`, fieldsets: `$[0].fieldsets` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3840
3841
|
throw n2?.onError?.(e7), t3;
|
|
3841
3842
|
}
|
|
3842
3843
|
}
|
|
3843
|
-
function
|
|
3844
|
+
function ec(e6) {
|
|
3844
3845
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3845
3846
|
return us({ func: async (r2) => {
|
|
3846
|
-
let i2 =
|
|
3847
|
+
let i2 = Gs({ ...r2, ...e6 ?? {} });
|
|
3847
3848
|
n2?.onSiteCall?.();
|
|
3848
3849
|
try {
|
|
3849
3850
|
let e7 = await t2.request(i2);
|
|
@@ -3855,76 +3856,76 @@ function $s(e6) {
|
|
|
3855
3856
|
let n3 = [t3, e6];
|
|
3856
3857
|
return D({ ...n3?.[1], query: n3?.[0] }, []);
|
|
3857
3858
|
}, responseTransformer: ({ data: e7 }) => {
|
|
3858
|
-
let t3 = O(A(e7, [{ transformFn:
|
|
3859
|
+
let t3 = O(A(e7, [{ transformFn: X, paths: Ys }, { transformFn: Y, paths: Xs }, { transformFn: Ns, paths: Zs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3859
3860
|
return { items: t3?.posts, pagingMetadata: t3?.pagingMetadata };
|
|
3860
3861
|
}, errorTransformer: (e7) => {
|
|
3861
3862
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3862
3863
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
3863
3864
|
}
|
|
3864
|
-
async function
|
|
3865
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3865
|
+
async function tc(e6, t2) {
|
|
3866
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Gs(D({ query: e6, ...t2 }, []));
|
|
3866
3867
|
r2?.onSiteCall?.();
|
|
3867
3868
|
try {
|
|
3868
3869
|
let e7 = await n2.request(i2);
|
|
3869
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3870
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: X, paths: Ys }, { transformFn: Y, paths: Xs }, { transformFn: Ns, paths: Zs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3870
3871
|
} catch (e7) {
|
|
3871
3872
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
3872
3873
|
throw r2?.onError?.(e7), t3;
|
|
3873
3874
|
}
|
|
3874
3875
|
}
|
|
3875
|
-
function tc(e6) {
|
|
3876
|
-
return (t2, n2) => Zs(t2, n2, { httpClient: e6 });
|
|
3877
|
-
}
|
|
3878
3876
|
function nc(e6) {
|
|
3879
|
-
return (t2) => Qs(t2, { httpClient: e6 });
|
|
3877
|
+
return (t2, n2) => Qs(t2, n2, { httpClient: e6 });
|
|
3880
3878
|
}
|
|
3881
3879
|
function rc(e6) {
|
|
3882
3880
|
return (t2) => $s(t2, { httpClient: e6 });
|
|
3883
3881
|
}
|
|
3884
3882
|
function ic(e6) {
|
|
3885
|
-
return (t2
|
|
3883
|
+
return (t2) => ec(t2, { httpClient: e6 });
|
|
3886
3884
|
}
|
|
3887
3885
|
function ac(e6) {
|
|
3888
|
-
|
|
3886
|
+
return (t2, n2) => tc(t2, n2, { httpClient: e6 });
|
|
3887
|
+
}
|
|
3888
|
+
function oc(e6) {
|
|
3889
|
+
let t2 = bs({ builderQueryFunction: (t3) => ic(e6)(t3), typedQueryFunction: (t3, n3) => ac(e6)(t3, n3), hasOptionsParameter: true });
|
|
3889
3890
|
function n2(e7, n3) {
|
|
3890
3891
|
return t2(...arguments);
|
|
3891
3892
|
}
|
|
3892
3893
|
return n2;
|
|
3893
3894
|
}
|
|
3894
|
-
var oc = M(tc);
|
|
3895
3895
|
var sc = M(nc);
|
|
3896
|
-
var cc = M(
|
|
3897
|
-
var lc = (
|
|
3898
|
-
var uc = `
|
|
3899
|
-
var dc =
|
|
3900
|
-
|
|
3896
|
+
var cc = M(rc);
|
|
3897
|
+
var lc = M(oc);
|
|
3898
|
+
var uc = (e6) => O(A(e6, [{ transformFn: X, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: Y, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: Ns, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
|
|
3899
|
+
var dc = `https://blog.wixsite.com/blog-demo-posts`;
|
|
3900
|
+
var fc = M((e6) => async (t2) => {
|
|
3901
|
+
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${It(t2)}`);
|
|
3901
3902
|
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
3902
|
-
return
|
|
3903
|
+
return uc(await n2.json()).filter((e7) => !e7.url?.startsWith(dc));
|
|
3903
3904
|
});
|
|
3904
|
-
var
|
|
3905
|
+
var pc = async (e6) => {
|
|
3905
3906
|
try {
|
|
3906
|
-
return await
|
|
3907
|
+
return await fc(e6);
|
|
3907
3908
|
} catch (e7) {
|
|
3908
3909
|
return console.info(`[blog demo posts]`, `read failed`, e7), [];
|
|
3909
3910
|
}
|
|
3910
3911
|
};
|
|
3911
|
-
var
|
|
3912
|
-
var
|
|
3913
|
-
function
|
|
3914
|
-
return
|
|
3912
|
+
var mc = [{ path: `members.createdDate` }, { path: `members.updatedDate` }, { path: `members.lastLoginDate` }];
|
|
3913
|
+
var hc = [{ path: `query.sorting.origin.latitude` }, { path: `query.sorting.origin.longitude` }];
|
|
3914
|
+
function gc(e6) {
|
|
3915
|
+
return Lt(Object.assign(e6, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/members/v1/members`, destPath: `/v1/members` }], "api._api_base_domain_": [{ srcPath: `/members-ng-api`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "manage._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "blocks._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "create.editorx": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "*.dev.wix-code.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "bo._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wixbo.ai": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wix-bo.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], _: [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "members.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }] } }));
|
|
3915
3916
|
}
|
|
3916
|
-
var
|
|
3917
|
-
function
|
|
3917
|
+
var _c = `@wix/auto_sdk_members_members`;
|
|
3918
|
+
function vc(e6) {
|
|
3918
3919
|
function t2({ host: t3 }) {
|
|
3919
|
-
let n2 = A(e6, [{ transformFn:
|
|
3920
|
-
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName:
|
|
3920
|
+
let n2 = A(e6, [{ transformFn: un, paths: hc }]);
|
|
3921
|
+
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName: _c, migrationOptions: { optInTransformResponse: true }, url: gc({ protoPath: `/v1/members/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: mc }]) };
|
|
3921
3922
|
}
|
|
3922
3923
|
return t2;
|
|
3923
3924
|
}
|
|
3924
|
-
function
|
|
3925
|
+
function yc(e6) {
|
|
3925
3926
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3926
3927
|
return us({ func: async (r2) => {
|
|
3927
|
-
let i2 =
|
|
3928
|
+
let i2 = vc({ ...r2, ...e6 ?? {} });
|
|
3928
3929
|
n2?.onSiteCall?.();
|
|
3929
3930
|
try {
|
|
3930
3931
|
let e7 = await t2.request(i2);
|
|
@@ -3942,8 +3943,8 @@ function vc(e6) {
|
|
|
3942
3943
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3943
3944
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
3944
3945
|
}
|
|
3945
|
-
async function
|
|
3946
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3946
|
+
async function bc(e6, t2) {
|
|
3947
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = vc(D({ query: e6, ...t2 }));
|
|
3947
3948
|
r2?.onSiteCall?.();
|
|
3948
3949
|
try {
|
|
3949
3950
|
let e7 = await n2.request(i2);
|
|
@@ -3953,25 +3954,25 @@ async function yc(e6, t2) {
|
|
|
3953
3954
|
throw r2?.onError?.(e7), t3;
|
|
3954
3955
|
}
|
|
3955
3956
|
}
|
|
3956
|
-
function bc(e6) {
|
|
3957
|
-
return (t2) => vc(t2, { httpClient: e6 });
|
|
3958
|
-
}
|
|
3959
3957
|
function xc(e6) {
|
|
3960
|
-
return (t2
|
|
3958
|
+
return (t2) => yc(t2, { httpClient: e6 });
|
|
3961
3959
|
}
|
|
3962
3960
|
function Sc(e6) {
|
|
3963
|
-
|
|
3961
|
+
return (t2, n2) => bc(t2, n2, { httpClient: e6 });
|
|
3962
|
+
}
|
|
3963
|
+
function Cc(e6) {
|
|
3964
|
+
let t2 = bs({ builderQueryFunction: (t3) => xc(e6)(t3), typedQueryFunction: (t3, n3) => Sc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3964
3965
|
function n2(e7, n3) {
|
|
3965
3966
|
return t2(...arguments);
|
|
3966
3967
|
}
|
|
3967
3968
|
return n2;
|
|
3968
3969
|
}
|
|
3969
|
-
var
|
|
3970
|
-
var
|
|
3970
|
+
var wc = M(Cc);
|
|
3971
|
+
var Tc = async (e6) => {
|
|
3971
3972
|
let t2 = [...new Set(e6.filter((e7) => !!e7))];
|
|
3972
3973
|
if (t2.length === 0) return {};
|
|
3973
3974
|
try {
|
|
3974
|
-
let { items: e7 } = await
|
|
3975
|
+
let { items: e7 } = await wc({ fieldsets: [`PUBLIC`] }).in(`_id`, t2).limit(t2.length).find();
|
|
3975
3976
|
return Object.fromEntries(e7.flatMap((e8) => {
|
|
3976
3977
|
let { _id: t3 } = e8;
|
|
3977
3978
|
return t3 ? [[t3, e8]] : [];
|
|
@@ -3980,32 +3981,32 @@ var wc = async (e6) => {
|
|
|
3980
3981
|
return {};
|
|
3981
3982
|
}
|
|
3982
3983
|
};
|
|
3983
|
-
var
|
|
3984
|
-
var
|
|
3985
|
-
var Dc = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3986
|
-
var
|
|
3987
|
-
function
|
|
3988
|
-
return
|
|
3984
|
+
var Ec = [{ path: `posts.firstPublishedDate` }, { path: `posts.lastPublishedDate` }, { path: `posts.expirationDate` }, { path: `posts.heroImage.urlExpirationDate` }, { path: `posts.richContent.metadata.createdTimestamp` }, { path: `posts.richContent.metadata.updatedTimestamp` }, { path: `posts.moderationDetails.submittedDate` }, { path: `posts.moderationDetails.moderationDate` }, { path: `posts.media.wixMedia.image.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.urlExpirationDate` }, { path: `posts.media.wixMedia.videoV2.posters.urlExpirationDate` }];
|
|
3985
|
+
var Dc = [{ path: `posts.richContentCompressed` }];
|
|
3986
|
+
var Oc = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3987
|
+
var kc = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3988
|
+
function Ac(e6) {
|
|
3989
|
+
return Lt(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
|
|
3989
3990
|
}
|
|
3990
|
-
var
|
|
3991
|
-
function
|
|
3991
|
+
var jc = `@wix/auto_sdk_blog_posts`;
|
|
3992
|
+
function Mc(e6) {
|
|
3992
3993
|
function t2({ host: t3 }) {
|
|
3993
|
-
let n2 = A(e6, [{ transformFn:
|
|
3994
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
3994
|
+
let n2 = A(e6, [{ transformFn: un, paths: kc }]);
|
|
3995
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: jc, migrationOptions: { optInTransformResponse: true }, url: Ac({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ec }, { transformFn: fn, paths: Dc }, { transformFn: dn, paths: Oc }]) };
|
|
3995
3996
|
}
|
|
3996
3997
|
return t2;
|
|
3997
3998
|
}
|
|
3998
|
-
function
|
|
3999
|
-
let e6 =
|
|
3999
|
+
function Nc() {
|
|
4000
|
+
let e6 = Mc({});
|
|
4000
4001
|
return { getUrl: (t2) => {
|
|
4001
4002
|
let { url: n2 } = e6(t2);
|
|
4002
4003
|
return n2;
|
|
4003
4004
|
}, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
|
|
4004
4005
|
}
|
|
4005
|
-
var
|
|
4006
|
-
var
|
|
4007
|
-
var
|
|
4008
|
-
let { data: n2 } = await e6.request(
|
|
4006
|
+
var Pc = Nc();
|
|
4007
|
+
var Fc = (e6) => (t2) => ({ method: `POST`, url: Pc.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4008
|
+
var Ic = M((e6) => async (t2) => {
|
|
4009
|
+
let { data: n2 } = await e6.request(Fc(t2)), r2 = {};
|
|
4009
4010
|
for (let e7 of n2.posts ?? []) {
|
|
4010
4011
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
4011
4012
|
if (!t3 || !n3?.length) continue;
|
|
@@ -4014,157 +4015,184 @@ var Fc = M((e6) => async (t2) => {
|
|
|
4014
4015
|
}
|
|
4015
4016
|
return r2;
|
|
4016
4017
|
});
|
|
4017
|
-
var
|
|
4018
|
+
var Lc = async (e6) => {
|
|
4018
4019
|
if (e6.length === 0) return {};
|
|
4019
4020
|
try {
|
|
4020
|
-
return await
|
|
4021
|
+
return await Ic(e6);
|
|
4021
4022
|
} catch {
|
|
4022
4023
|
return {};
|
|
4023
4024
|
}
|
|
4024
4025
|
};
|
|
4025
|
-
var
|
|
4026
|
+
var Rc = class extends Error {
|
|
4026
4027
|
constructor(e6, t2) {
|
|
4027
4028
|
super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
|
|
4028
4029
|
}
|
|
4029
4030
|
};
|
|
4030
|
-
var
|
|
4031
|
+
var zc = (e6, t2, n2) => {
|
|
4031
4032
|
let r2, i2 = new Promise((e7, i3) => {
|
|
4032
|
-
r2 = setTimeout(() => i3(new
|
|
4033
|
+
r2 = setTimeout(() => i3(new Rc(n2, t2)), t2);
|
|
4033
4034
|
});
|
|
4034
4035
|
return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
|
|
4035
4036
|
};
|
|
4036
4037
|
Z.RICH_CONTENT, Z.SEO, Z.URL, Z.CONTENT_TEXT, Z.RICH_CONTENT, Z.URL;
|
|
4037
|
-
var
|
|
4038
|
-
var
|
|
4038
|
+
var Bc = [Z.URL, Z.METRICS];
|
|
4039
|
+
var Vc = (e6) => {
|
|
4039
4040
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4040
4041
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
4041
4042
|
};
|
|
4042
|
-
var
|
|
4043
|
-
if (t2 && !
|
|
4043
|
+
var Hc = (e6, t2) => {
|
|
4044
|
+
if (t2 && !Vc(e6)) throw e6;
|
|
4044
4045
|
};
|
|
4045
|
-
var
|
|
4046
|
-
var
|
|
4047
|
-
var
|
|
4046
|
+
var Uc = (e6) => Tc(e6.map(({ memberId: e7 }) => e7));
|
|
4047
|
+
var Wc = (e6) => Lc(e6.filter((e7) => e7.media?.wixMedia?.videoV2).map(({ _id: e7 }) => e7).filter((e7) => !!e7));
|
|
4048
|
+
var Gc = async (e6, t2, n2 = false, r2) => {
|
|
4048
4049
|
try {
|
|
4049
|
-
let { post: n3 } = await
|
|
4050
|
+
let { post: n3 } = await sc(e6, { ...t2 && { fieldsets: t2 }, ...r2 && { language: r2 } });
|
|
4050
4051
|
if (n3) return n3;
|
|
4051
4052
|
} catch (e7) {
|
|
4052
|
-
|
|
4053
|
+
Hc(e7, n2);
|
|
4053
4054
|
}
|
|
4054
4055
|
try {
|
|
4055
|
-
let { items: n3 } = await
|
|
4056
|
+
let { items: n3 } = await lc(t2 ? { fieldsets: t2 } : void 0).eq(`slug`, e6).limit(1).find();
|
|
4056
4057
|
return n3[0];
|
|
4057
4058
|
} catch (e7) {
|
|
4058
|
-
|
|
4059
|
+
Hc(e7, n2);
|
|
4059
4060
|
return;
|
|
4060
4061
|
}
|
|
4061
4062
|
};
|
|
4062
|
-
var
|
|
4063
|
+
var Kc = async (e6, t2 = false, n2) => {
|
|
4063
4064
|
try {
|
|
4064
4065
|
let t3 = async (t4) => {
|
|
4065
|
-
let { posts: r2 } = await
|
|
4066
|
+
let { posts: r2 } = await cc({ paging: { limit: 1 }, ...e6 && { fieldsets: e6 }, ...t4 && n2 && { language: n2 } });
|
|
4066
4067
|
return r2?.[0];
|
|
4067
4068
|
};
|
|
4068
4069
|
return await t3(true) ?? (n2 ? await t3(false) : void 0);
|
|
4069
4070
|
} catch (e7) {
|
|
4070
|
-
|
|
4071
|
+
Hc(e7, t2);
|
|
4071
4072
|
return;
|
|
4072
4073
|
}
|
|
4073
4074
|
};
|
|
4074
|
-
var
|
|
4075
|
-
var
|
|
4075
|
+
var qc = 100;
|
|
4076
|
+
var Jc = async () => {
|
|
4076
4077
|
try {
|
|
4077
|
-
let { categories: e6 } = await Ms({ paging: { limit:
|
|
4078
|
+
let { categories: e6 } = await Ms({ paging: { limit: qc } });
|
|
4078
4079
|
return e6 ?? [];
|
|
4079
4080
|
} catch {
|
|
4080
4081
|
return [];
|
|
4081
4082
|
}
|
|
4082
4083
|
};
|
|
4083
|
-
var
|
|
4084
|
+
var Yc = (e6, t2) => {
|
|
4084
4085
|
let { categoryIds: n2 } = e6 ?? {};
|
|
4085
4086
|
if (!n2?.length) return [];
|
|
4086
4087
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4087
4088
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4088
4089
|
};
|
|
4089
|
-
var
|
|
4090
|
+
var Xc = (e6, t2) => {
|
|
4090
4091
|
let n2 = {};
|
|
4091
|
-
for (let r2 of e6) for (let { _id: e7, label: i2 } of
|
|
4092
|
+
for (let r2 of e6) for (let { _id: e7, label: i2 } of Yc(r2, t2)) e7 && (n2[e7] = i2 ?? ``);
|
|
4092
4093
|
return n2;
|
|
4093
4094
|
};
|
|
4094
|
-
var
|
|
4095
|
-
let n2 = e6 ? await
|
|
4095
|
+
var Zc = async (e6, t2) => {
|
|
4096
|
+
let n2 = e6 ? await Gc(e6, void 0, false, t2) : void 0, { _id: r2, categoryIds: i2, relatedPostIds: a2 } = n2 ?? await Kc(void 0, false, t2) ?? {};
|
|
4096
4097
|
return { currentPostId: r2 ?? void 0, categoryIds: i2, relatedPostIds: n2 ? a2 : void 0 };
|
|
4097
4098
|
};
|
|
4098
|
-
var
|
|
4099
|
-
let { items: r2 } = await
|
|
4099
|
+
var Qc = async ({ ids: e6, currentPostId: t2, limit: n2 }) => {
|
|
4100
|
+
let { items: r2 } = await lc({ fieldsets: Bc }).in(`_id`, e6).limit(n2).find(), i2 = new Map(r2.map((e7) => {
|
|
4100
4101
|
let { _id: t3 } = e7;
|
|
4101
4102
|
return [t3, e7];
|
|
4102
4103
|
}));
|
|
4103
4104
|
return e6.filter((e7) => e7 !== t2).map((e7) => i2.get(e7)).filter((e7) => e7 !== void 0).slice(0, n2);
|
|
4104
4105
|
};
|
|
4105
|
-
var
|
|
4106
|
-
let i2 =
|
|
4106
|
+
var $c = async ({ currentPostId: e6, categoryIds: t2, language: n2, limit: r2 }) => {
|
|
4107
|
+
let i2 = lc({ fieldsets: Bc }).ne(`_id`, e6).descending(`firstPublishedDate`).limit(r2);
|
|
4107
4108
|
t2?.length && (i2 = i2.hasSome(`categoryIds`, t2)), n2 && (i2 = i2.eq(`language`, n2));
|
|
4108
4109
|
let { items: a2 } = await i2.find();
|
|
4109
4110
|
return a2;
|
|
4110
4111
|
};
|
|
4111
|
-
var
|
|
4112
|
-
let o2 =
|
|
4112
|
+
var el = async ({ slug: e6, language: t2, limit: n2 = 3, propagateErrors: r2 = false, source: i2, sourcePromise: a2 }) => {
|
|
4113
|
+
let o2 = Jc();
|
|
4113
4114
|
try {
|
|
4114
|
-
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await
|
|
4115
|
+
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await Zc(e6, t2));
|
|
4115
4116
|
if (!r3) return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4116
|
-
let l2 = c2?.length ? await
|
|
4117
|
-
return { posts: u2, authorsByMemberId: d2, categoryLabelsById:
|
|
4117
|
+
let l2 = c2?.length ? await Qc({ ids: c2, currentPostId: r3, limit: n2 }) : [], u2 = l2.length > 0 ? l2 : await $c({ currentPostId: r3, categoryIds: s2, language: t2, limit: n2 }), [d2, f2, p2] = await Promise.all([Uc(u2), o2, Wc(u2)]);
|
|
4118
|
+
return { posts: u2, authorsByMemberId: d2, categoryLabelsById: Xc(u2, f2), videoSourcesByPostId: p2 };
|
|
4118
4119
|
} catch (e7) {
|
|
4119
4120
|
if (r2) throw e7;
|
|
4120
4121
|
return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4121
4122
|
}
|
|
4122
4123
|
};
|
|
4123
|
-
var
|
|
4124
|
-
var
|
|
4125
|
-
var
|
|
4126
|
-
var
|
|
4127
|
-
var
|
|
4128
|
-
var
|
|
4124
|
+
var tl = { newest: `FEED`, oldest: `PUBLISHED_DATE_ASC`, titleAsc: `TITLE_ASC`, titleDesc: `TITLE_DESC`, mostViewed: `VIEW_COUNT`, mostLiked: `LIKE_COUNT` };
|
|
4125
|
+
var nl = async (e6, { limit: t2, offset: n2 = 0, language: r2, sortOrder: i2 }) => e6.posts.length > 0 ? e6 : { ...e6, demoPosts: await pc({ paging: { limit: t2, offset: n2 }, fieldsets: Bc, ...r2 && { language: r2 }, ...i2 && { sort: tl[i2] } }) };
|
|
4126
|
+
var rl = n({ isEditor: false, isPreview: false });
|
|
4127
|
+
var il = () => o(rl);
|
|
4128
|
+
var al = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
4129
|
+
var ol = () => {
|
|
4129
4130
|
try {
|
|
4130
|
-
let { SSR: e6, SEO: t2 } = f(
|
|
4131
|
+
let { SSR: e6, SEO: t2 } = f(Kn);
|
|
4131
4132
|
return e6 || t2;
|
|
4132
4133
|
} catch {
|
|
4133
4134
|
return false;
|
|
4134
4135
|
}
|
|
4135
4136
|
};
|
|
4136
|
-
var
|
|
4137
|
-
let e6 =
|
|
4138
|
-
return il(
|
|
4137
|
+
var sl = () => {
|
|
4138
|
+
let e6 = ol();
|
|
4139
|
+
return al(il()) && !e6;
|
|
4139
4140
|
};
|
|
4140
|
-
|
|
4141
|
-
|
|
4141
|
+
g((e6, t2) => {
|
|
4142
|
+
(function() {
|
|
4143
|
+
var e7 = {}.hasOwnProperty;
|
|
4144
|
+
function n2() {
|
|
4145
|
+
for (var e8 = ``, t3 = 0; t3 < arguments.length; t3++) {
|
|
4146
|
+
var n3 = arguments[t3];
|
|
4147
|
+
n3 && (e8 = i2(e8, r2(n3)));
|
|
4148
|
+
}
|
|
4149
|
+
return e8;
|
|
4150
|
+
}
|
|
4151
|
+
function r2(t3) {
|
|
4152
|
+
if (typeof t3 == `string` || typeof t3 == `number`) return t3;
|
|
4153
|
+
if (typeof t3 != `object`) return ``;
|
|
4154
|
+
if (Array.isArray(t3)) return n2.apply(null, t3);
|
|
4155
|
+
if (t3.toString !== Object.prototype.toString && !t3.toString.toString().includes(`[native code]`)) return t3.toString();
|
|
4156
|
+
var r3 = ``;
|
|
4157
|
+
for (var a2 in t3) e7.call(t3, a2) && t3[a2] && (r3 = i2(r3, a2));
|
|
4158
|
+
return r3;
|
|
4159
|
+
}
|
|
4160
|
+
function i2(e8, t3) {
|
|
4161
|
+
return t3 ? e8 ? e8 + ` ` + t3 : e8 + t3 : e8;
|
|
4162
|
+
}
|
|
4163
|
+
t2 !== void 0 && t2.exports ? (n2.default = n2, t2.exports = n2) : typeof define == `function` && typeof define.amd == `object` && define.amd ? define(`classnames`, [], function() {
|
|
4164
|
+
return n2;
|
|
4165
|
+
}) : window.classNames = n2;
|
|
4166
|
+
})();
|
|
4167
|
+
})();
|
|
4168
|
+
var cl = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
4169
|
+
var ll = (e6) => {
|
|
4142
4170
|
try {
|
|
4143
4171
|
return e6.getMonitoringClient?.() ?? null;
|
|
4144
4172
|
} catch {
|
|
4145
4173
|
return null;
|
|
4146
4174
|
}
|
|
4147
4175
|
};
|
|
4148
|
-
var
|
|
4149
|
-
function
|
|
4150
|
-
let
|
|
4151
|
-
if (!
|
|
4152
|
-
let
|
|
4153
|
-
|
|
4176
|
+
var ul = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
4177
|
+
function dl(e6, t2, { feature: n2, action: r2, level: i2 = `error`, tags: a2, contexts: o2 }) {
|
|
4178
|
+
let s2 = ul(e6, `captureException`);
|
|
4179
|
+
if (!s2) return;
|
|
4180
|
+
let c2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
4181
|
+
s2.captureException(c2, { level: i2, tags: { feature: n2, action: r2, ...a2 }, ...o2 ? { contexts: o2 } : {} });
|
|
4154
4182
|
}
|
|
4155
|
-
function
|
|
4156
|
-
let a2 =
|
|
4183
|
+
function fl(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
4184
|
+
let a2 = ul(e6, `startSpanManual`);
|
|
4157
4185
|
if (!a2) return i2;
|
|
4158
4186
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
4159
4187
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
4160
4188
|
}
|
|
4161
|
-
var
|
|
4189
|
+
var pl = class extends e {
|
|
4162
4190
|
state = { error: void 0 };
|
|
4163
4191
|
static getDerivedStateFromError(e6) {
|
|
4164
4192
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4165
4193
|
}
|
|
4166
4194
|
componentDidCatch(e6, t2) {
|
|
4167
|
-
|
|
4195
|
+
dl(this.props.monitoringClient, e6, { feature: this.props.feature, action: `render`, tags: this.props.component ? { component: this.props.component } : void 0, contexts: { react: { componentStack: t2.componentStack } } });
|
|
4168
4196
|
}
|
|
4169
4197
|
render() {
|
|
4170
4198
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4172,205 +4200,205 @@ var fl = class extends e {
|
|
|
4172
4200
|
return this.props.fallback;
|
|
4173
4201
|
}
|
|
4174
4202
|
};
|
|
4175
|
-
var
|
|
4176
|
-
var
|
|
4177
|
-
function
|
|
4178
|
-
return o(
|
|
4203
|
+
var ml = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
|
|
4204
|
+
var hl = n(void 0);
|
|
4205
|
+
function gl() {
|
|
4206
|
+
return o(hl);
|
|
4179
4207
|
}
|
|
4180
|
-
var
|
|
4181
|
-
function
|
|
4182
|
-
return o(
|
|
4208
|
+
var _l = n(void 0);
|
|
4209
|
+
function vl() {
|
|
4210
|
+
return o(_l);
|
|
4183
4211
|
}
|
|
4184
|
-
var
|
|
4185
|
-
var
|
|
4186
|
-
var
|
|
4187
|
-
var
|
|
4188
|
-
var
|
|
4189
|
-
var
|
|
4212
|
+
var yl = 6e4;
|
|
4213
|
+
var bl = yl * 60;
|
|
4214
|
+
var xl = bl * 24;
|
|
4215
|
+
var Sl = xl * 7;
|
|
4216
|
+
var Cl = (e6) => e6 < yl ? [`second`, e6 / 1e3] : e6 < bl ? [`minute`, e6 / yl] : e6 < xl ? [`hour`, e6 / bl] : [`day`, e6 / xl];
|
|
4217
|
+
var wl = (e6, t2, n2 = Date.now()) => {
|
|
4190
4218
|
let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
|
|
4191
|
-
if (i2 >= 0 && i2 <
|
|
4192
|
-
let [e7, n3] =
|
|
4219
|
+
if (i2 >= 0 && i2 < Sl) {
|
|
4220
|
+
let [e7, n3] = Cl(i2);
|
|
4193
4221
|
return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
|
|
4194
4222
|
}
|
|
4195
4223
|
let a2 = r2.getFullYear() === new Date(n2).getFullYear();
|
|
4196
4224
|
return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
|
|
4197
4225
|
};
|
|
4198
|
-
var
|
|
4199
|
-
var
|
|
4200
|
-
var
|
|
4226
|
+
var Tl = `https://static.wixstatic.com/media/`;
|
|
4227
|
+
var El = 100;
|
|
4228
|
+
var Dl = (e6, t2 = ``) => {
|
|
4201
4229
|
let n2 = e6?.profile?.photo;
|
|
4202
4230
|
if (!n2?.url) return;
|
|
4203
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
4204
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
4205
|
-
};
|
|
4206
|
-
var
|
|
4207
|
-
var
|
|
4208
|
-
var
|
|
4209
|
-
var
|
|
4210
|
-
var
|
|
4231
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(Tl) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
4232
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || El, height: n2.height || El, alt: r2 ?? t2 };
|
|
4233
|
+
};
|
|
4234
|
+
var Ol = `https://static.wixstatic.com/media/`;
|
|
4235
|
+
var kl = `wix:image://`;
|
|
4236
|
+
var Al = 1200;
|
|
4237
|
+
var jl = 800;
|
|
4238
|
+
var Ml = (e6) => {
|
|
4211
4239
|
if (!e6) return;
|
|
4212
4240
|
let t2 = Number.parseInt(e6, 10);
|
|
4213
4241
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4214
4242
|
};
|
|
4215
|
-
var
|
|
4216
|
-
if (!e6.startsWith(
|
|
4243
|
+
var Nl = (e6) => {
|
|
4244
|
+
if (!e6.startsWith(kl)) {
|
|
4217
4245
|
let t3 = e6.split(/[?#]/)[0];
|
|
4218
4246
|
return t3 ? { uri: t3 } : void 0;
|
|
4219
4247
|
}
|
|
4220
4248
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
4221
4249
|
if (!r2) return;
|
|
4222
4250
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
4223
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
4251
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: Ml(a2.get(`originWidth`)), height: Ml(a2.get(`originHeight`)) };
|
|
4224
4252
|
};
|
|
4225
|
-
var
|
|
4253
|
+
var Pl = (e6, t2) => {
|
|
4226
4254
|
if (!e6) return;
|
|
4227
|
-
let n2 =
|
|
4255
|
+
let n2 = Nl(e6);
|
|
4228
4256
|
if (!n2) return;
|
|
4229
4257
|
let r2 = n2.name ?? n2.uri;
|
|
4230
|
-
return { uri: n2.uri, url: `${
|
|
4258
|
+
return { uri: n2.uri, url: `${Ol}${n2.uri}`, name: r2, width: n2.width ?? Al, height: n2.height ?? jl, alt: t2 ?? r2 };
|
|
4231
4259
|
};
|
|
4232
|
-
var
|
|
4260
|
+
var Fl = (e6) => {
|
|
4233
4261
|
let t2 = e6?.media?.wixMedia?.image;
|
|
4234
4262
|
if (!t2) return;
|
|
4235
|
-
let n2 =
|
|
4263
|
+
let n2 = Nl(t2);
|
|
4236
4264
|
if (!n2) return;
|
|
4237
4265
|
let r2 = n2.name ?? n2.uri;
|
|
4238
|
-
return { uri: n2.uri, url: `${
|
|
4266
|
+
return { uri: n2.uri, url: `${Ol}${n2.uri}`, name: r2, width: n2.width ?? Al, height: n2.height ?? jl, alt: e6?.media?.altText ?? e6?.title ?? r2 };
|
|
4239
4267
|
};
|
|
4240
|
-
var
|
|
4241
|
-
var
|
|
4242
|
-
var
|
|
4268
|
+
var Il = `https://static.wixstatic.com/media/`;
|
|
4269
|
+
var Ll = `wix:video://`;
|
|
4270
|
+
var Rl = (e6) => {
|
|
4243
4271
|
if (!e6) return;
|
|
4244
4272
|
let t2 = Number.parseInt(e6, 10);
|
|
4245
4273
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4246
4274
|
};
|
|
4247
|
-
var
|
|
4248
|
-
if (!e6.startsWith(
|
|
4275
|
+
var zl = (e6) => {
|
|
4276
|
+
if (!e6.startsWith(Ll)) return;
|
|
4249
4277
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
|
|
4250
4278
|
if (!r2) return;
|
|
4251
4279
|
let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
|
|
4252
|
-
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${
|
|
4280
|
+
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${Il}${a2}` : void 0, posterWidth: Rl(i2.get(`posterWidth`)), posterHeight: Rl(i2.get(`posterHeight`)) };
|
|
4253
4281
|
};
|
|
4254
|
-
var
|
|
4255
|
-
var
|
|
4256
|
-
var
|
|
4282
|
+
var Bl = [/https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:[^#]*&)?v=([\w-]+)/i, /https?:\/\/(?:www\.)?youtube\.com\/embed\/([\w-]+)/i, /https?:\/\/youtu\.be\/([\w-]+)/i];
|
|
4283
|
+
var Vl = [/https?:\/\/player\.vimeo\.com\/video\/(\d+)/i, /https?:\/\/vimeo\.com\/(\d+)/i];
|
|
4284
|
+
var Hl = (e6, t2) => {
|
|
4257
4285
|
for (let n2 of e6) {
|
|
4258
4286
|
let e7 = n2.exec(t2);
|
|
4259
4287
|
if (e7) return e7[1];
|
|
4260
4288
|
}
|
|
4261
4289
|
};
|
|
4262
|
-
var
|
|
4263
|
-
let t2 =
|
|
4290
|
+
var Ul = (e6) => {
|
|
4291
|
+
let t2 = Hl(Bl, e6);
|
|
4264
4292
|
if (t2) return { provider: `youtube`, embedUrl: `https://www.youtube.com/embed/${t2}?autoplay=1` };
|
|
4265
|
-
let n2 = Vl
|
|
4293
|
+
let n2 = Hl(Vl, e6);
|
|
4266
4294
|
return n2 ? { provider: `vimeo`, embedUrl: `https://player.vimeo.com/video/${n2}?autoplay=1` } : { provider: `unknown` };
|
|
4267
4295
|
};
|
|
4268
|
-
var
|
|
4296
|
+
var Wl = (e6, t2 = []) => {
|
|
4269
4297
|
let n2 = e6?.media;
|
|
4270
4298
|
if (!n2 || n2.displayed === false) return;
|
|
4271
|
-
let r2 =
|
|
4299
|
+
let r2 = Fl(e6);
|
|
4272
4300
|
if (r2) return { kind: `image`, image: r2 };
|
|
4273
|
-
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ?
|
|
4301
|
+
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? zl(n2.wixMedia.videoV2) : void 0;
|
|
4274
4302
|
if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
|
|
4275
4303
|
let o2 = n2.embedMedia?.video?.url;
|
|
4276
4304
|
if (o2) {
|
|
4277
4305
|
let { thumbnail: e7 } = n2.embedMedia ?? {};
|
|
4278
|
-
return { kind: `embed`, videoUrl: o2, ...
|
|
4306
|
+
return { kind: `embed`, videoUrl: o2, ...Ul(o2), thumbnailUrl: e7?.url, thumbnailWidth: e7?.width, thumbnailHeight: e7?.height, altText: i2 };
|
|
4279
4307
|
}
|
|
4280
4308
|
};
|
|
4281
|
-
var
|
|
4282
|
-
let t2 =
|
|
4309
|
+
var Gl = (e6) => {
|
|
4310
|
+
let t2 = Fl(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4283
4311
|
if (t2 || !n2) return t2;
|
|
4284
|
-
let r2 =
|
|
4312
|
+
let r2 = zl(n2), i2 = Pl(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4285
4313
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4286
4314
|
};
|
|
4287
|
-
var
|
|
4288
|
-
var
|
|
4289
|
-
var
|
|
4290
|
-
var
|
|
4315
|
+
var Kl = `2026-05-12T12:00:00.000Z`;
|
|
4316
|
+
var ql = (e6) => ({ href: e6 ?? `#`, target: `_self` });
|
|
4317
|
+
var Jl = (e6) => `https://static.wixstatic.com/media/${e6}/v1/fit/w_1200,h_1200,al_c,q_85/cover.jpg`;
|
|
4318
|
+
var Yl = (e6) => {
|
|
4291
4319
|
if (!e6) return;
|
|
4292
4320
|
let t2 = e6 instanceof Date ? e6 : new Date(e6);
|
|
4293
4321
|
return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
|
|
4294
4322
|
};
|
|
4295
|
-
var
|
|
4296
|
-
var
|
|
4297
|
-
var Q = (e6) => ({ text: e6, html: `<p>${
|
|
4323
|
+
var Xl = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4324
|
+
var Zl = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4325
|
+
var Q = (e6) => ({ text: e6, html: `<p>${Zl(e6)}</p>`, linkList: [] });
|
|
4298
4326
|
var $ = { minutesToRead: 5, views: 120, comments: 4 };
|
|
4299
|
-
var
|
|
4327
|
+
var Ql = (e6) => {
|
|
4300
4328
|
let { metrics: t2 } = e6;
|
|
4301
4329
|
return { views: typeof t2?.views == `number` ? t2.views : void 0, comments: typeof t2?.comments == `number` ? t2.comments : void 0 };
|
|
4302
4330
|
};
|
|
4303
|
-
var
|
|
4304
|
-
var
|
|
4331
|
+
var $l = (e6, t2, n2, r2) => Q(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4332
|
+
var eu = (e6, t2, n2, r2) => {
|
|
4305
4333
|
let i2 = e6.categoryIds?.map((e7) => t2[e7]).find(Boolean);
|
|
4306
4334
|
return Q(i2 ?? (n2 ? r2.canvas.category() : ``));
|
|
4307
4335
|
};
|
|
4308
|
-
var
|
|
4309
|
-
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 =
|
|
4310
|
-
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage:
|
|
4311
|
-
};
|
|
4312
|
-
var tu = 3;
|
|
4313
|
-
var nu = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4314
|
-
var ru = (e6, t2) => {
|
|
4315
|
-
let { uri: n2, width: r2, height: i2 } = nu[e6 % nu.length];
|
|
4316
|
-
return { uri: n2, url: ql(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4336
|
+
var tu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4337
|
+
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = Ql(e6);
|
|
4338
|
+
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Gl(e6), itemCoverMedia: Wl(e6, s2[l2 ?? ``] ?? []), itemLink: sr(e6, r2), itemPublishedDate: Q(wl(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: Yl(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: Xl(e6.minutesToRead), initialViewCount: f2.views ?? (o2 ? $.views : void 0), initialCommentCount: f2.comments ?? (o2 ? $.comments : void 0), authorName: Q(d2?.profile?.nickname ?? ``), authorImage: Dl(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: $l(f2.views, $.views, o2, t2.viewCount), commentCount: $l(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: eu(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
|
|
4317
4339
|
};
|
|
4340
|
+
var nu = 3;
|
|
4341
|
+
var ru = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4318
4342
|
var iu = (e6, t2) => {
|
|
4319
|
-
let { uri: n2 } =
|
|
4320
|
-
return { uri: n2, url:
|
|
4343
|
+
let { uri: n2, width: r2, height: i2 } = ru[e6 % ru.length];
|
|
4344
|
+
return { uri: n2, url: Jl(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4345
|
+
};
|
|
4346
|
+
var au = (e6, t2) => {
|
|
4347
|
+
let { uri: n2 } = ru[(e6 + 1) % ru.length];
|
|
4348
|
+
return { uri: n2, url: Jl(n2), name: n2, width: 100, height: 100, alt: t2 };
|
|
4321
4349
|
};
|
|
4322
|
-
var
|
|
4323
|
-
let o2 = e6.canvas.postTitle(), s2 =
|
|
4324
|
-
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink:
|
|
4350
|
+
var ou = (e6, t2, n2, r2 = Date.now()) => Array.from({ length: nu }, (i2, a2) => {
|
|
4351
|
+
let o2 = e6.canvas.postTitle(), s2 = iu(a2, e6.canvas.coverAlt());
|
|
4352
|
+
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink: ql(n2), itemPublishedDate: Q(wl(new Date(r2), t2, r2)), publishedDateValue: Kl, clockValue: r2, minutesToReadValue: $.minutesToRead, initialViewCount: $.views, initialCommentCount: $.comments, authorName: Q(e6.canvas.authorName()), authorImage: au(a2, e6.canvas.authorPhotoAlt()), timeToRead: Q(e6.timeToRead($.minutesToRead)), viewCount: Q(e6.viewCount($.views)), commentCount: Q(e6.commentCount($.comments)), itemCategoryLabel: Q(e6.canvas.category()), recentPostItem: { title: o2, slug: `` }, commentingEnabled: void 0 };
|
|
4325
4353
|
});
|
|
4326
|
-
var
|
|
4327
|
-
function
|
|
4328
|
-
let e6 = o(
|
|
4354
|
+
var su = n(void 0);
|
|
4355
|
+
function cu() {
|
|
4356
|
+
let e6 = o(su);
|
|
4329
4357
|
if (!e6) throw Error(`useRelatedPostsContext must be used within a RelatedPostsProvider`);
|
|
4330
4358
|
return e6;
|
|
4331
4359
|
}
|
|
4332
|
-
var
|
|
4333
|
-
var
|
|
4334
|
-
var
|
|
4335
|
-
var
|
|
4336
|
-
var
|
|
4360
|
+
var lu = 3;
|
|
4361
|
+
var uu = (e6) => typeof e6 == `number` && Number.isFinite(e6) && e6 >= 1 ? Math.min(Math.floor(e6), 12) : lu;
|
|
4362
|
+
var du = 2e3;
|
|
4363
|
+
var fu = /* @__PURE__ */ new WeakMap();
|
|
4364
|
+
var pu = (e6, t2, n2) => {
|
|
4337
4365
|
if (!e6) return n2();
|
|
4338
|
-
let r2 =
|
|
4339
|
-
r2 || (r2 = /* @__PURE__ */ new Map(),
|
|
4366
|
+
let r2 = fu.get(e6);
|
|
4367
|
+
r2 || (r2 = /* @__PURE__ */ new Map(), fu.set(e6, r2));
|
|
4340
4368
|
let i2 = r2.get(t2);
|
|
4341
4369
|
if (i2) return i2;
|
|
4342
4370
|
let a2 = n2();
|
|
4343
4371
|
return r2.set(t2, a2), a2;
|
|
4344
4372
|
};
|
|
4345
|
-
var
|
|
4346
|
-
var
|
|
4347
|
-
var
|
|
4348
|
-
var
|
|
4349
|
-
var
|
|
4373
|
+
var mu = { relatedPosts: [], emptyState: null, isLoadingRelatedPosts: true, hasError: false, hasRelatedPosts: false };
|
|
4374
|
+
var hu = { ...mu, isLoadingRelatedPosts: false, hasError: true };
|
|
4375
|
+
var gu = (e6) => ({ strip: e6, hasError: false });
|
|
4376
|
+
var _u = () => ({ strip: { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {}, fetchedAt: Date.now() }, hasError: true });
|
|
4377
|
+
var vu = (e6) => {
|
|
4350
4378
|
throw e6;
|
|
4351
4379
|
};
|
|
4352
|
-
var
|
|
4353
|
-
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } =
|
|
4354
|
-
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) =>
|
|
4380
|
+
var yu = ({ children: e6, stripLoadPromise: t2, slug: n2, language: r2 }) => {
|
|
4381
|
+
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } = Vn(t2), f2 = Gn(l2), m2 = sl(), h2 = cr(n2), { t: g2 } = So(), _2 = _r(), v2 = c(() => ts(g2, _2), [g2, _2]), y2 = c(() => {
|
|
4382
|
+
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) => tu(e8, v2, _2, h2, a2, o2, m2, s2, f2)), t3 = e7.length === 0 && m2 ? ou(v2, _2, h2, f2) : e7;
|
|
4355
4383
|
return { relatedPosts: t3, emptyState: i2.length === 0 && !d2 ? v2.noRelatedPostsEmptyState() : null, isLoadingRelatedPosts: false, hasError: d2, hasRelatedPosts: t3.length > 0 };
|
|
4356
4384
|
}, [i2, u2, a2, o2, s2, v2, _2, r2, h2, m2, f2, d2]);
|
|
4357
|
-
return dr
|
|
4385
|
+
return pr(dr.relatedPostsProvider, d2 ? `error` : i2.length > 0 ? `data` : `empty`), p(su.Provider, { value: y2, children: e6 });
|
|
4358
4386
|
};
|
|
4359
|
-
function
|
|
4360
|
-
let r2 =
|
|
4387
|
+
function bu({ children: e6, postsCount: n2 }) {
|
|
4388
|
+
let r2 = ur(), i2 = gr(), a2 = qn(), o2 = uu(n2), s2 = sl(), l2 = gl(), u2 = vl(), d2 = yr(), f2 = c(() => ll(zn), []), { i18n: h2, locale: g2 } = Go($o), _2 = Yn(() => {
|
|
4361
4389
|
let e7 = `blog-builder:related:${JSON.stringify({ slug: r2 ?? ``, language: i2 ?? ``, limit: o2, ...u2 && { postId: u2 } })}`;
|
|
4362
|
-
return { slug: r2, language: i2, stripLoadPromise:
|
|
4363
|
-
let e8 =
|
|
4364
|
-
return
|
|
4365
|
-
} })),
|
|
4390
|
+
return { slug: r2, language: i2, stripLoadPromise: Un(pu(l2, e7, () => Mo({ key: e7, warmupData: d2, fetchData: () => {
|
|
4391
|
+
let e8 = el({ slug: r2, language: i2, limit: o2, propagateErrors: true, sourcePromise: l2 }).then((e9) => s2 ? nl(e9, { limit: o2, language: i2 }) : e9);
|
|
4392
|
+
return ml(fl(f2, `related-posts-read`, { feature: cl.relatedPosts, tags: { limit: o2 } }, a2 ? zc(e8, du, `related-posts`) : e8));
|
|
4393
|
+
} })), gu, a2 ? vu : _u) };
|
|
4366
4394
|
}, [r2, i2, a2, s2, l2, d2, o2, f2, u2]);
|
|
4367
|
-
return p(Co, { i18n: h2, children: m(t, { fallback: p(
|
|
4395
|
+
return p(Co, { i18n: h2, children: m(t, { fallback: p(su.Provider, { value: mu, children: e6 }), children: [p(Wo, { i18n: h2, locale: g2 }), p(pl, { fallback: p(su.Provider, { value: hu, children: e6 }), feature: cl.relatedPosts, monitoringClient: f2, rethrow: a2, children: p(yu, { stripLoadPromise: _2.stripLoadPromise, slug: _2.slug, language: _2.language, children: e6 }, `${_2.language ?? ``}|${_2.slug ?? ``}`) })] }) });
|
|
4368
4396
|
}
|
|
4369
|
-
var
|
|
4397
|
+
var xu = Mn(`7d10ae29-fb0a-4361-8bc0-c3b8a3b96e34`);
|
|
4370
4398
|
export {
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4399
|
+
bu as RelatedPostsProvider,
|
|
4400
|
+
bu as default,
|
|
4401
|
+
xu as injectAccessTokenGetter,
|
|
4402
|
+
cu as useRelatedPostsContext
|
|
4375
4403
|
};
|
|
4376
4404
|
//# sourceMappingURL=context-related-posts.mjs.map
|