@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
|
@@ -4,16 +4,17 @@ import { Component as n, Suspense as r, createContext as i, createElement as a,
|
|
|
4
4
|
import { useGetService as p, useService as m } from "@wix/services-manager-react";
|
|
5
5
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
6
6
|
var _ = Object.defineProperty;
|
|
7
|
-
var v = (e6, t2) => {
|
|
7
|
+
var v = (e6, t2) => () => (t2 || (e6((t2 = { exports: {} }).exports, t2, t2.exports), e6 = null), t2.exports);
|
|
8
|
+
var y = (e6, t2) => {
|
|
8
9
|
let n2 = {};
|
|
9
10
|
for (var r2 in e6) _(n2, r2, { get: e6[r2], enumerable: true });
|
|
10
11
|
return t2 || _(n2, Symbol.toStringTag, { value: `Module` }), n2;
|
|
11
12
|
};
|
|
12
|
-
var
|
|
13
|
-
function
|
|
13
|
+
var b = {};
|
|
14
|
+
function x(e6, t2 = false, n2 = (e7) => e7) {
|
|
14
15
|
return () => ({ __type: `event-definition`, type: e6, isDomainEvent: t2, transformations: n2 });
|
|
15
16
|
}
|
|
16
|
-
var
|
|
17
|
+
var S = (e6) => {
|
|
17
18
|
switch (e6) {
|
|
18
19
|
case `get`:
|
|
19
20
|
case `GET`:
|
|
@@ -40,11 +41,11 @@ var x = (e6) => {
|
|
|
40
41
|
throw Error(`Unknown method: ${e6}`);
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
|
-
var
|
|
44
|
+
var C = (e6) => (t2) => async (n2) => {
|
|
44
45
|
let r2, i2 = (t3) => {
|
|
45
46
|
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.`);
|
|
46
47
|
let { method: i3, url: a2, params: o2 } = r2;
|
|
47
|
-
return { ...r2, method:
|
|
48
|
+
return { ...r2, method: S(i3), url: a2, data: r2.data, params: o2 };
|
|
48
49
|
};
|
|
49
50
|
try {
|
|
50
51
|
let e7 = await t2.request(i2);
|
|
@@ -57,10 +58,10 @@ var S = (e6) => (t2) => async (n2) => {
|
|
|
57
58
|
throw typeof e7 == `object` && e7 && `response` in e7 && typeof e7.response == `object` && e7.response !== null && `data` in e7.response ? e7.response.data : e7;
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
61
|
+
var ee = (e6) => e6.__isAmbassador ? true : !!e6().__isAmbassador;
|
|
62
|
+
var w = `__metadata`;
|
|
63
|
+
var T = `edge.wixapis.com`;
|
|
64
|
+
var te = class extends Error {
|
|
64
65
|
message;
|
|
65
66
|
response;
|
|
66
67
|
constructor(e6, t2) {
|
|
@@ -68,108 +69,108 @@ var T = class extends Error {
|
|
|
68
69
|
}
|
|
69
70
|
async details() {
|
|
70
71
|
let e6 = await this.response.json();
|
|
71
|
-
return
|
|
72
|
+
return ne(this.response.status, e6?.message, e6?.details, { requestId: this.response.headers.get(`X-Wix-Request-Id`), details: e6 });
|
|
72
73
|
}
|
|
73
74
|
};
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
78
|
-
function
|
|
75
|
+
var ne = (e6, t2, n2, r2) => ({ details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2, requestId: r2?.requestId });
|
|
76
|
+
var re = (e6) => e6?.method && [`post`, `put`, `patch`].includes(e6.method.toLocaleLowerCase()) && e6.body ? { "Content-Type": `application/json` } : {};
|
|
77
|
+
var ie = (e6) => e6 && typeof e6 == `object` && !Array.isArray(e6);
|
|
78
|
+
var ae = (e6) => e6.__type === `host`;
|
|
79
|
+
function oe(e6, t2) {
|
|
79
80
|
return e6.create(t2);
|
|
80
81
|
}
|
|
81
|
-
var
|
|
82
|
-
function
|
|
83
|
-
return { [
|
|
82
|
+
var se = `x-wix-bi-gateway`;
|
|
83
|
+
function ce(e6, t2, n2) {
|
|
84
|
+
return { [se]: le({ environment: `js-sdk${n2 ? `-${n2}` : ``}`, "package-name": e6.packageName ?? t2?.PACKAGE_NAME, "method-fqn": e6.methodFqn, entity: e6.entityFqdn }) };
|
|
84
85
|
}
|
|
85
|
-
function
|
|
86
|
+
function le(e6) {
|
|
86
87
|
return Object.entries(e6).filter(([e7, t2]) => !!t2).map(([e7, t2]) => `${e7}=${t2}`).join(`,`);
|
|
87
88
|
}
|
|
88
|
-
function
|
|
89
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
90
|
-
globalThis.__wix_context__ = void 0,
|
|
89
|
+
function ue(e6) {
|
|
90
|
+
let t2 = globalThis.__wix_context__, n2 = { client: b.client, elevatedClient: b.elevatedClient }, r2;
|
|
91
|
+
globalThis.__wix_context__ = void 0, b.client = void 0, b.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
91
92
|
try {
|
|
92
93
|
return e6();
|
|
93
94
|
} finally {
|
|
94
|
-
globalThis.__wix_context__ = t2,
|
|
95
|
+
globalThis.__wix_context__ = t2, b.client = n2.client, b.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
|
-
var
|
|
98
|
-
function
|
|
99
|
-
return
|
|
98
|
+
var de = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
99
|
+
function fe(e6) {
|
|
100
|
+
return _e(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
|
|
100
101
|
}
|
|
101
|
-
var
|
|
102
|
-
var
|
|
103
|
-
var
|
|
104
|
-
var
|
|
105
|
-
function
|
|
102
|
+
var pe = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
103
|
+
var me = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
104
|
+
var he = `$1\0$2`;
|
|
105
|
+
var ge = /[^\p{L}\d]+/giu;
|
|
106
|
+
function _e(e6) {
|
|
106
107
|
let t2 = e6.trim();
|
|
107
|
-
t2 = t2.replace(
|
|
108
|
+
t2 = t2.replace(pe, he).replace(me, he), t2 = t2.replace(ge, `\0`);
|
|
108
109
|
let n2 = 0, r2 = t2.length;
|
|
109
110
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
110
111
|
if (n2 === r2) return [];
|
|
111
112
|
for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
|
|
112
113
|
return t2.slice(n2, r2).split(/\0/g);
|
|
113
114
|
}
|
|
114
|
-
var
|
|
115
|
-
var
|
|
116
|
-
var
|
|
117
|
-
function
|
|
115
|
+
var ve = (e6) => `validationError` in (e6.response?.data?.details ?? {});
|
|
116
|
+
var ye = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
|
|
117
|
+
var be = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
|
|
118
|
+
function xe(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
118
119
|
if (typeof e6 != `object` || !e6) throw e6;
|
|
119
|
-
if (
|
|
120
|
-
if (
|
|
121
|
-
if (
|
|
122
|
-
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code:
|
|
123
|
-
return
|
|
120
|
+
if (ve(e6)) return Se(e6, t2, n2);
|
|
121
|
+
if (ye(e6)) return we(e6);
|
|
122
|
+
if (be(e6)) {
|
|
123
|
+
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: fe(n3), data: {} }, requestId: e6.requestId };
|
|
124
|
+
return Ce(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
124
125
|
}
|
|
125
|
-
return
|
|
126
|
+
return Te(e6);
|
|
126
127
|
}
|
|
127
|
-
var
|
|
128
|
-
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 =
|
|
129
|
-
return
|
|
128
|
+
var Se = (e6, t2, n2) => {
|
|
129
|
+
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Ee(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 };
|
|
130
|
+
return Ce(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
|
|
130
131
|
};
|
|
131
|
-
var
|
|
132
|
-
var
|
|
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 ??
|
|
134
|
-
return
|
|
132
|
+
var Ce = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
|
|
133
|
+
var we = (e6) => {
|
|
134
|
+
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 ?? fe(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 };
|
|
135
|
+
return Ce(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
|
|
135
136
|
};
|
|
136
|
-
var
|
|
137
|
-
var
|
|
137
|
+
var Te = (e6) => Ce(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: fe(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
|
|
138
|
+
var Ee = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
138
139
|
let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
|
|
139
140
|
return r2?.filter((e7) => !r2.some((t3) => t3.field.length > e7.field.length && t3.field.startsWith(e7.field) && o2.includes(t3.field))).map((e7) => {
|
|
140
141
|
let r3 = t2[e7.field];
|
|
141
|
-
if (r3) return { ...e7, field:
|
|
142
|
+
if (r3) return { ...e7, field: De(r3, i2) };
|
|
142
143
|
let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
|
|
143
144
|
if (s2) {
|
|
144
145
|
let t3 = a2[s2];
|
|
145
|
-
if (t3) return { ...e7, field: e7.field.replace(s2,
|
|
146
|
+
if (t3) return { ...e7, field: e7.field.replace(s2, De(t3, i2)) };
|
|
146
147
|
}
|
|
147
148
|
return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
|
|
148
149
|
});
|
|
149
150
|
};
|
|
150
|
-
var
|
|
151
|
-
let n2 =
|
|
151
|
+
var De = (e6, t2) => {
|
|
152
|
+
let n2 = Oe(e6);
|
|
152
153
|
return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
|
|
153
154
|
};
|
|
154
|
-
var
|
|
155
|
+
var Oe = (e6) => {
|
|
155
156
|
let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
|
|
156
157
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
157
158
|
};
|
|
158
|
-
function
|
|
159
|
-
return
|
|
159
|
+
function ke(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
160
|
+
return ue(() => e6({ request: async (e7) => {
|
|
160
161
|
let i3 = e7({ host: s2?.HTTPHost || `www.wixapis.com` }), a3 = i3;
|
|
161
162
|
a3.method === `GET` && a3.fallback?.length && (a3.params?.toString().length ?? 0) > 4e3 && (a3 = i3.fallback[0]);
|
|
162
|
-
let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ?
|
|
163
|
+
let o3 = s2?.HTTPHost ?? `www.wixapis.com`, u3 = `https://${l2 ? T : o3}${a3.url}`;
|
|
163
164
|
a3.params && a3.params.toString() && (u3 += `?${a3.params.toString()}`);
|
|
164
165
|
try {
|
|
165
|
-
let e8 =
|
|
166
|
+
let e8 = ce(i3, t2, c2), o4 = { method: a3.method, ...a3.data && { body: JSON.stringify(a3.data) }, headers: { ...e8 } }, s3 = await n2(u3, o4);
|
|
166
167
|
if (s3.status !== 200) {
|
|
167
168
|
let e9 = null;
|
|
168
169
|
try {
|
|
169
170
|
e9 = await s3.json();
|
|
170
171
|
} catch {
|
|
171
172
|
}
|
|
172
|
-
let t3 =
|
|
173
|
+
let t3 = je(s3.status, e9?.message ?? s3.statusText, e9?.details, { requestId: s3.headers.get(`X-Wix-Request-Id`), details: e9 }), n3 = xe(t3);
|
|
173
174
|
throw r2?.handleError(n3, { requestOptions: { url: a3.url, method: a3.method, entityFqdn: i3.entityFqdn, methodFqn: i3.methodFqn } }), t3;
|
|
174
175
|
}
|
|
175
176
|
let l3 = await s3.json();
|
|
@@ -179,18 +180,18 @@ function Oe(e6, t2, n2, r2, i2, a2, o2, s2, c2, l2, u2) {
|
|
|
179
180
|
}
|
|
180
181
|
}, fetchWithAuth: n2, wixAPIFetch: i2, getActiveToken: a2, getAuthHeaders: o2 }, { validateRequestSchema: u2 }));
|
|
181
182
|
}
|
|
182
|
-
var
|
|
183
|
+
var Ae = class extends Error {
|
|
183
184
|
response;
|
|
184
185
|
requestId;
|
|
185
186
|
constructor(e6) {
|
|
186
187
|
super(), this.response = e6.response, this.requestId = e6.requestId;
|
|
187
188
|
}
|
|
188
189
|
};
|
|
189
|
-
var
|
|
190
|
-
var
|
|
191
|
-
function
|
|
190
|
+
var je = (e6, t2, n2, r2) => new Ae({ response: { data: { details: { ...!n2?.validationError && { applicationError: { description: t2, code: e6, data: r2 } }, ...n2 }, message: t2 }, status: e6 }, requestId: r2?.requestId });
|
|
191
|
+
var Me = `.`;
|
|
192
|
+
function Ne(e6, t2, n2) {
|
|
192
193
|
if (e6 == null) throw Error(`Cannot set value on null or undefined`);
|
|
193
|
-
let r2 =
|
|
194
|
+
let r2 = Pe(t2), i2 = e6;
|
|
194
195
|
for (let e7 = 0; e7 < r2.length; e7++) {
|
|
195
196
|
let t3 = r2[e7];
|
|
196
197
|
if (e7 === r2.length - 1) {
|
|
@@ -202,21 +203,21 @@ function Me(e6, t2, n2) {
|
|
|
202
203
|
}
|
|
203
204
|
return e6;
|
|
204
205
|
}
|
|
205
|
-
function Ne(e6) {
|
|
206
|
-
return Array.isArray(e6) ? e6 : e6.split(je).map((e7) => Pe(e7) ? Number(e7) : e7);
|
|
207
|
-
}
|
|
208
206
|
function Pe(e6) {
|
|
209
|
-
return
|
|
207
|
+
return Array.isArray(e6) ? e6 : e6.split(Me).map((e7) => Fe(e7) ? Number(e7) : e7);
|
|
210
208
|
}
|
|
211
209
|
function Fe(e6) {
|
|
210
|
+
return /^\d+$/.test(e6);
|
|
211
|
+
}
|
|
212
|
+
function Ie(e6) {
|
|
212
213
|
let t2 = {};
|
|
213
|
-
for (let [n2, r2] of Object.entries(e6))
|
|
214
|
+
for (let [n2, r2] of Object.entries(e6)) Le(n2) || Ne(t2, Pe(n2), r2);
|
|
214
215
|
return t2;
|
|
215
216
|
}
|
|
216
|
-
function
|
|
217
|
+
function Le(e6) {
|
|
217
218
|
return e6 === `__proto__` || e6 === `constructor` || e6 === `prototype`;
|
|
218
219
|
}
|
|
219
|
-
var
|
|
220
|
+
var Re = class {
|
|
220
221
|
BRACKET_PATTERN = /\[(\d+)\]/g;
|
|
221
222
|
NUMERIC_PATTERN = /^\d+$/;
|
|
222
223
|
ESCAPED_DOT_PATTERN = /\\\./g;
|
|
@@ -239,7 +240,7 @@ var Le = class {
|
|
|
239
240
|
return e6.replace(this.ESCAPED_DOT_PLACEHOLDER, `\\.`).replace(this.ESCAPED_RIGHT_BRACKET_PLACEHOLDER, `\\]`).replace(this.ESCAPED_LEFT_BRACKET_PLACEHOLDER, `\\[`);
|
|
240
241
|
}
|
|
241
242
|
unflatten() {
|
|
242
|
-
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])),
|
|
243
|
+
return this.cleanedModifiedFields = Object.fromEntries(Object.entries(this.modifiedFields).map(([e6, t2]) => [this.replaceEscapedCharacters(this.bracketToDotNotation(e6)), t2])), Ie(this.cleanedModifiedFields);
|
|
243
244
|
}
|
|
244
245
|
flatten(e6) {
|
|
245
246
|
let t2 = {};
|
|
@@ -259,12 +260,12 @@ var Le = class {
|
|
|
259
260
|
if (!Array.isArray(n2)) throw Error(`Expected array at path ${this.buildPathString(r2)}, but got ${typeof n2}`);
|
|
260
261
|
r2.push(`[${e7}]`), n2 = n2[parseInt(e7, 10)];
|
|
261
262
|
}, a2 = (e7, t3) => {
|
|
262
|
-
let i3 = e7 in
|
|
263
|
+
let i3 = e7 in de ? de[e7] : void 0;
|
|
263
264
|
if (i3 && i3 in t3) {
|
|
264
265
|
r2.push(i3), n2 = t3[i3];
|
|
265
266
|
return;
|
|
266
267
|
}
|
|
267
|
-
let a3 =
|
|
268
|
+
let a3 = He(e7);
|
|
268
269
|
if (a3 && a3 in t3) r2.push(a3), n2 = t3[a3];
|
|
269
270
|
else throw Error(`Cannot find key '${e7}' or its transformations at path ${this.buildPathString(r2)}`);
|
|
270
271
|
}, o2 = (e7, t3) => {
|
|
@@ -288,28 +289,28 @@ var Le = class {
|
|
|
288
289
|
return e6.replace(this.BRACKET_PATTERN, (t2, n2, r2) => r2 > 0 && e6[r2 - 1] === `\\` ? t2 : `.` + n2);
|
|
289
290
|
}
|
|
290
291
|
};
|
|
291
|
-
function
|
|
292
|
+
function ze(e6, t2) {
|
|
292
293
|
let n2 = e6?.modifiedFields;
|
|
293
294
|
if (!n2) return null;
|
|
294
|
-
let r2 =
|
|
295
|
+
let r2 = Be(n2);
|
|
295
296
|
if (!r2) return null;
|
|
296
297
|
let { unflattenedModifiedFields: i2, modifiedFieldsManipulator: a2 } = r2;
|
|
297
298
|
e6 = { ...e6, modifiedFields: i2 };
|
|
298
299
|
let o2 = t2(e6), s2 = o2?.modifiedFields;
|
|
299
300
|
if (!s2) return null;
|
|
300
|
-
let c2 =
|
|
301
|
+
let c2 = Ve(s2, a2);
|
|
301
302
|
return c2 === null ? null : (o2.modifiedFields = c2, o2);
|
|
302
303
|
}
|
|
303
|
-
function
|
|
304
|
+
function Be(e6) {
|
|
304
305
|
if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
|
|
305
|
-
let t2 = new
|
|
306
|
+
let t2 = new Re(e6);
|
|
306
307
|
return { unflattenedModifiedFields: t2.unflatten(), modifiedFieldsManipulator: t2 };
|
|
307
308
|
} catch {
|
|
308
309
|
return null;
|
|
309
310
|
}
|
|
310
311
|
return null;
|
|
311
312
|
}
|
|
312
|
-
function
|
|
313
|
+
function Ve(e6, t2) {
|
|
313
314
|
if (typeof e6 == `object` && e6 && !Array.isArray(e6)) try {
|
|
314
315
|
return t2.flatten(e6);
|
|
315
316
|
} catch {
|
|
@@ -317,10 +318,10 @@ function Be(e6, t2) {
|
|
|
317
318
|
}
|
|
318
319
|
return null;
|
|
319
320
|
}
|
|
320
|
-
function
|
|
321
|
+
function He(e6) {
|
|
321
322
|
return e6.replace(/[-_\s]+(.)?/g, (e7, t2) => t2 ? t2.toUpperCase() : ``).replace(/^./, (e7) => e7.toLowerCase());
|
|
322
323
|
}
|
|
323
|
-
function
|
|
324
|
+
function Ue() {
|
|
324
325
|
return { emit(e6, ...t2) {
|
|
325
326
|
for (let n2 = 0, r2 = this.events[e6] || [], i2 = r2.length; n2 < i2; n2++) r2[n2](...t2);
|
|
326
327
|
}, events: {}, on(e6, t2) {
|
|
@@ -329,8 +330,8 @@ function He() {
|
|
|
329
330
|
};
|
|
330
331
|
} };
|
|
331
332
|
}
|
|
332
|
-
var
|
|
333
|
-
function
|
|
333
|
+
var We = (e6) => e6.__type === `event-definition`;
|
|
334
|
+
function Ge(e6, t2, n2, r2) {
|
|
334
335
|
let i2;
|
|
335
336
|
if (e6.isDomainEvent) {
|
|
336
337
|
let { deletedEvent: e7, actionEvent: t3, createdEvent: a3, updatedEvent: o3, ...s3 } = n2, c2 = { ...r2, ...s3 };
|
|
@@ -341,14 +342,14 @@ function We(e6, t2, n2, r2) {
|
|
|
341
342
|
let e7 = s2.modifiedFields;
|
|
342
343
|
if (typeof e7 == `object` && e7 && !Array.isArray(e7)) {
|
|
343
344
|
o2 = structuredClone(i2);
|
|
344
|
-
let e8 =
|
|
345
|
+
let e8 = ze(s2, a2);
|
|
345
346
|
if (e8) return t2(e8);
|
|
346
347
|
}
|
|
347
348
|
}
|
|
348
349
|
return t2(a2(o2));
|
|
349
350
|
}
|
|
350
|
-
function
|
|
351
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
351
|
+
function Ke(e6) {
|
|
352
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = Ue();
|
|
352
353
|
return { initModule(e7) {
|
|
353
354
|
return (r2) => {
|
|
354
355
|
let i2 = t2.get(e7.type) ?? [];
|
|
@@ -358,7 +359,7 @@ function Ge(e6) {
|
|
|
358
359
|
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 }))];
|
|
359
360
|
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(`, `)}`);
|
|
360
361
|
let l2 = t2.get(r2) ?? [];
|
|
361
|
-
return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) =>
|
|
362
|
+
return await Promise.all(l2.map(({ eventDefinition: e8, handler: t3 }) => Ge(e8, t3, o2, { instanceId: a2, identity: i2, accountInfo: s2 }))), { instanceId: a2, eventType: r2, payload: o2, identity: i2, accountInfo: s2 };
|
|
362
363
|
}, async processRequest(e7, t3) {
|
|
363
364
|
let n3 = await e7.text();
|
|
364
365
|
return this.process(n3, t3);
|
|
@@ -377,12 +378,12 @@ function Ge(e6) {
|
|
|
377
378
|
let n3 = Array.from(t2.keys()).map((e8) => ({ type: e8 }));
|
|
378
379
|
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(`, `)}`);
|
|
379
380
|
let r2 = t2.get(e7.eventType) ?? [];
|
|
380
|
-
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) =>
|
|
381
|
-
}, apps: { AppInstalled:
|
|
381
|
+
await Promise.all(r2.map(({ eventDefinition: t3, handler: n4 }) => Ge(t3, n4, e7.payload, { instanceId: e7.instanceId, identity: e7.identity })));
|
|
382
|
+
}, apps: { AppInstalled: x(`AppInstalled`)(), AppRemoved: x(`AppRemoved`)() } } };
|
|
382
383
|
}
|
|
383
|
-
var
|
|
384
|
-
function
|
|
385
|
-
let t2 = /* @__PURE__ */ new Map(), n2 =
|
|
384
|
+
var qe = (e6) => e6.__type === `service-plugin-definition`;
|
|
385
|
+
function Je(e6) {
|
|
386
|
+
let t2 = /* @__PURE__ */ new Map(), n2 = Ue();
|
|
386
387
|
return { initModule(e7) {
|
|
387
388
|
return (r2) => {
|
|
388
389
|
let i2 = t2.get(e7.componentType.toLowerCase()) ?? [];
|
|
@@ -424,42 +425,42 @@ function qe(e6) {
|
|
|
424
425
|
} } };
|
|
425
426
|
}
|
|
426
427
|
var E = `X-Wix-Consistent`;
|
|
427
|
-
function
|
|
428
|
+
function Ye(e6) {
|
|
428
429
|
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) => {
|
|
429
430
|
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?.();
|
|
430
431
|
try {
|
|
431
432
|
if (typeof n3 == `string` || n3 instanceof URL) {
|
|
432
433
|
let e7 = await i3(n3, { ...r3, headers: c3 });
|
|
433
434
|
l3?.handleError(e7, { requestOptions: { url: n3.toString(), method: r3?.method } });
|
|
434
|
-
let a3 =
|
|
435
|
+
let a3 = Xe(e7);
|
|
435
436
|
return a3 && (t2[E] = a3), e7;
|
|
436
437
|
}
|
|
437
438
|
{
|
|
438
439
|
for (let [e8, t3] of Object.entries(c3)) typeof t3 == `string` && n3.headers.set(e8, t3);
|
|
439
440
|
let e7 = await i3(n3, r3);
|
|
440
441
|
l3?.handleError(e7, { requestOptions: { url: n3.url, method: r3?.method } });
|
|
441
|
-
let a3 =
|
|
442
|
+
let a3 = Xe(e7);
|
|
442
443
|
return a3 && (t2[E] = a3), e7;
|
|
443
444
|
}
|
|
444
445
|
} catch (e7) {
|
|
445
446
|
throw l3?.handleError(e7, { requestOptions: { url: typeof n3 == `string` || n3 instanceof URL ? n3.toString() : n3.url, method: r3?.method } }), e7;
|
|
446
447
|
}
|
|
447
|
-
}, { client: c2, initModule: l2 } =
|
|
448
|
-
let i3 = o2(), s3 = await a2(), c3 =
|
|
448
|
+
}, { client: c2, initModule: l2 } = Je(i2), { client: u2, initModule: d2 } = Ke(i2), f2 = async (n3, r3) => {
|
|
449
|
+
let i3 = o2(), s3 = await a2(), c3 = re(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 = Xe(l3);
|
|
449
450
|
return u3 && (t2[E] = u3), l3;
|
|
450
451
|
}, p2 = (t3, n3) => {
|
|
451
|
-
if (
|
|
452
|
-
if (
|
|
453
|
-
if (
|
|
452
|
+
if (We(t3)) return d2(t3);
|
|
453
|
+
if (qe(t3)) return l2(t3);
|
|
454
|
+
if (ae(t3) && e6.host) return oe(t3, e6.host);
|
|
454
455
|
if (typeof t3 == `function`) {
|
|
455
456
|
if (`__type` in t3 && t3.__type === `wix_spi_error`) return t3;
|
|
456
457
|
let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, o3 = e6.useCDN === void 0 ? i2().shouldUseCDN : e6.useCDN;
|
|
457
|
-
return
|
|
458
|
+
return ke(ue(() => ee(t3)) ? C(t3) : t3, n3 ?? {}, f2, e6.host?.getErrorHandler?.(), (e7, t4) => {
|
|
458
459
|
let n4 = new URL(e7, `https://${r3}`);
|
|
459
460
|
return n4.host = r3, n4.protocol = `https`, f2(n4.toString(), t4);
|
|
460
461
|
}, i2().getActiveToken, async () => a2(), { HTTPHost: r3 }, e6.host?.name, o3, e6.validateRequestSchema);
|
|
461
462
|
}
|
|
462
|
-
return
|
|
463
|
+
return ie(t3) ? Object.fromEntries(Object.entries(t3).map(([e7, n4]) => [e7, p2(n4, t3[w])])) : t3;
|
|
463
464
|
}, m2 = (e7) => {
|
|
464
465
|
for (let n3 in e7) t2[n3] = e7[n3];
|
|
465
466
|
};
|
|
@@ -467,33 +468,33 @@ function Je(e6) {
|
|
|
467
468
|
let t3 = i2();
|
|
468
469
|
return t3.getAuthHeaders = t3.getAuthHeaders.bind(void 0, e6.host), t3;
|
|
469
470
|
}, setHeaders: m2, use: p2, enableContext(e7, t3 = { elevated: false }) {
|
|
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 ?
|
|
471
|
+
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 ? b.elevatedClient = this : b.client = this;
|
|
471
472
|
}, fetch: (t3, n3) => {
|
|
472
473
|
let r3 = e6.host?.apiBaseUrl ?? `www.wixapis.com`, i3 = new URL(t3, `https://${r3}`);
|
|
473
474
|
return i3.host = r3, i3.protocol = `https`, f2(i3.toString(), n3);
|
|
474
475
|
}, fetchWithAuth: s2, async graphql(t3, n3, r3 = { apiVersion: `alpha` }) {
|
|
475
476
|
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 }) });
|
|
476
|
-
if (a3.status !== 200) throw new
|
|
477
|
+
if (a3.status !== 200) throw new te(`GraphQL request failed with status ${a3.status}`, a3);
|
|
477
478
|
let { data: o3, errors: s3 } = await a3.json();
|
|
478
479
|
return { data: o3 ?? {}, errors: s3 };
|
|
479
480
|
}, webhooks: u2, servicePlugins: c2 };
|
|
480
481
|
}
|
|
481
|
-
function
|
|
482
|
+
function Xe(e6) {
|
|
482
483
|
return e6.headers?.get(`X-Wix-Consistent`) ?? e6.headers?.get(`x-wix-consistent`);
|
|
483
484
|
}
|
|
484
|
-
var
|
|
485
|
-
var
|
|
486
|
-
var
|
|
487
|
-
var
|
|
488
|
-
var
|
|
489
|
-
function
|
|
485
|
+
var Ze = { _id: `id`, _createdDate: `createdDate`, _updatedDate: `updatedDate` };
|
|
486
|
+
var Qe = { id: `_id`, createdDate: `_createdDate`, updatedDate: `_updatedDate` };
|
|
487
|
+
var $e = `items`;
|
|
488
|
+
var et = `pagingMetadata`;
|
|
489
|
+
var tt = Ze;
|
|
490
|
+
function nt(e6, t2) {
|
|
490
491
|
return e6?.split(`.`).map((e7) => t2?.[e7] ?? e7).join(`.`);
|
|
491
492
|
}
|
|
492
|
-
var
|
|
493
|
-
function rt(e6, t2, n2) {
|
|
494
|
-
return (e6 === nt || e6.endsWith(`.${nt}`)) && typeof t2 == `string` ? tt(t2, n2) : t2;
|
|
495
|
-
}
|
|
493
|
+
var rt = `sort.fieldName`;
|
|
496
494
|
function it(e6, t2, n2) {
|
|
495
|
+
return (e6 === rt || e6.endsWith(`.${rt}`)) && typeof t2 == `string` ? nt(t2, n2) : t2;
|
|
496
|
+
}
|
|
497
|
+
function at(e6, t2, n2) {
|
|
497
498
|
let r2 = (e7) => n2.includes(e7), i2 = (e7, n3) => {
|
|
498
499
|
if (Array.isArray(e7)) e7.forEach((e8) => {
|
|
499
500
|
i2(e8, n3);
|
|
@@ -503,160 +504,160 @@ function it(e6, t2, n2) {
|
|
|
503
504
|
Object.keys(a2).forEach((e8) => {
|
|
504
505
|
let o2 = n3 === `` ? e8 : `${n3}.${e8}`;
|
|
505
506
|
if (r2(o2)) return;
|
|
506
|
-
let s2 =
|
|
507
|
-
s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] =
|
|
507
|
+
let s2 = ot(e8, t2);
|
|
508
|
+
s2 !== e8 && !(s2 in a2) && (a2[s2] = a2[e8], delete a2[e8]), a2[s2] = it(o2, a2[s2], t2), i2(a2[s2], o2);
|
|
508
509
|
});
|
|
509
510
|
}
|
|
510
511
|
};
|
|
511
512
|
return i2(e6, ``), e6;
|
|
512
513
|
}
|
|
513
|
-
function
|
|
514
|
+
function ot(e6, t2) {
|
|
514
515
|
let n2;
|
|
515
516
|
return n2 = e6.includes(`.`) ? e6.split(`.`).map((e7) => t2[e7] ?? e7).join(`.`) : t2[e6] ?? e6, n2;
|
|
516
517
|
}
|
|
517
518
|
function D(e6, t2 = []) {
|
|
518
|
-
return
|
|
519
|
+
return at(e6, Ze, t2);
|
|
519
520
|
}
|
|
520
521
|
function O(e6, t2 = []) {
|
|
521
|
-
return
|
|
522
|
+
return at(e6, Qe, t2);
|
|
522
523
|
}
|
|
523
|
-
function
|
|
524
|
+
function st(e6) {
|
|
524
525
|
return e6?.toISOString();
|
|
525
526
|
}
|
|
526
527
|
function k(e6) {
|
|
527
528
|
return e6 ? new Date(e6) : void 0;
|
|
528
529
|
}
|
|
529
|
-
var
|
|
530
|
-
function
|
|
530
|
+
var ct = /* @__PURE__ */ new WeakMap();
|
|
531
|
+
function lt() {
|
|
531
532
|
return { leaves: void 0, fields: void 0, mapFields: void 0, anyField: void 0 };
|
|
532
533
|
}
|
|
533
|
-
function
|
|
534
|
+
function ut(e6, t2) {
|
|
534
535
|
let n2 = e6.get(t2);
|
|
535
|
-
return n2 || (n2 =
|
|
536
|
+
return n2 || (n2 = lt(), e6.set(t2, n2)), n2;
|
|
536
537
|
}
|
|
537
|
-
function
|
|
538
|
-
return t2 === `*` ? (e6.anyField ??=
|
|
538
|
+
function dt(e6, t2) {
|
|
539
|
+
return t2 === `*` ? (e6.anyField ??= lt(), e6.anyField) : t2.endsWith(`{}`) ? (e6.mapFields ??= /* @__PURE__ */ new Map(), ut(e6.mapFields, t2.slice(0, -2))) : (e6.fields ??= /* @__PURE__ */ new Map(), ut(e6.fields, t2));
|
|
539
540
|
}
|
|
540
|
-
function
|
|
541
|
-
let t2 =
|
|
541
|
+
function ft(e6) {
|
|
542
|
+
let t2 = lt();
|
|
542
543
|
for (let n2 of e6) {
|
|
543
|
-
let e7 = n2.path.split(`.`).reduce(
|
|
544
|
+
let e7 = n2.path.split(`.`).reduce(dt, t2);
|
|
544
545
|
e7.leaves ??= [], e7.leaves.push(n2);
|
|
545
546
|
}
|
|
546
547
|
return t2;
|
|
547
548
|
}
|
|
548
|
-
function ft(e6) {
|
|
549
|
-
let t2 = st.get(e6);
|
|
550
|
-
return t2 || (t2 = dt(e6), st.set(e6, t2)), t2;
|
|
551
|
-
}
|
|
552
549
|
function pt(e6) {
|
|
553
|
-
|
|
550
|
+
let t2 = ct.get(e6);
|
|
551
|
+
return t2 || (t2 = ft(e6), ct.set(e6, t2)), t2;
|
|
554
552
|
}
|
|
555
|
-
function mt(e6
|
|
556
|
-
return
|
|
553
|
+
function mt(e6) {
|
|
554
|
+
return typeof e6 == `object` && !!e6;
|
|
557
555
|
}
|
|
558
|
-
function ht(e6, t2, n2) {
|
|
559
|
-
|
|
556
|
+
function ht(e6, { isRepeated: t2, isMap: n2 }, r2) {
|
|
557
|
+
return t2 ? Array.isArray(e6) ? e6.map(r2) : e6 : n2 ? mt(e6) ? Object.fromEntries(Object.entries(e6).map(([e7, t3]) => [e7, r2(t3)])) : e6 : r2(e6);
|
|
560
558
|
}
|
|
561
559
|
function gt(e6, t2, n2) {
|
|
560
|
+
mt(e6) && yt(e6, t2, n2);
|
|
561
|
+
}
|
|
562
|
+
function _t(e6, t2, n2) {
|
|
562
563
|
for (let [r2, i2] of t2) {
|
|
563
564
|
if (!(r2 in e6)) continue;
|
|
564
|
-
if (i2.leaves) for (let t4 of i2.leaves) e6[r2] =
|
|
565
|
+
if (i2.leaves) for (let t4 of i2.leaves) e6[r2] = ht(e6[r2], t4, n2);
|
|
565
566
|
let t3 = e6[r2];
|
|
566
|
-
Array.isArray(t3) ? t3.forEach((e7) =>
|
|
567
|
+
Array.isArray(t3) ? t3.forEach((e7) => gt(e7, i2, n2)) : gt(t3, i2, n2);
|
|
567
568
|
}
|
|
568
569
|
}
|
|
569
|
-
function
|
|
570
|
+
function vt(e6, t2, n2) {
|
|
570
571
|
for (let [r2, i2] of t2) {
|
|
571
572
|
let t3 = e6[r2];
|
|
572
|
-
|
|
573
|
+
mt(t3) && Object.values(t3).forEach((e7) => gt(e7, i2, n2));
|
|
573
574
|
}
|
|
574
575
|
}
|
|
575
|
-
function
|
|
576
|
-
t2 &&
|
|
576
|
+
function yt(e6, { fields: t2, mapFields: n2, anyField: r2 }, i2) {
|
|
577
|
+
t2 && _t(e6, t2, i2), n2 && vt(e6, n2, i2), r2 && Object.values(e6).forEach((e7) => gt(e7, r2, i2));
|
|
577
578
|
}
|
|
578
579
|
function A(e6, t2) {
|
|
579
|
-
if (!
|
|
580
|
-
for (let { paths: n2, transformFn: r2 } of t2)
|
|
580
|
+
if (!mt(e6)) return e6;
|
|
581
|
+
for (let { paths: n2, transformFn: r2 } of t2) yt(e6, pt(n2), r2);
|
|
581
582
|
return e6;
|
|
582
583
|
}
|
|
583
|
-
function
|
|
584
|
-
return
|
|
584
|
+
function bt(e6) {
|
|
585
|
+
return Tt(e6).map((e7) => e7.toLocaleUpperCase()).join(`_`);
|
|
585
586
|
}
|
|
586
|
-
var
|
|
587
|
-
var
|
|
588
|
-
var
|
|
589
|
-
var
|
|
590
|
-
function
|
|
587
|
+
var xt = /([\p{Ll}\d])(\p{Lu})/gu;
|
|
588
|
+
var St = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
|
|
589
|
+
var Ct = `$1\0$2`;
|
|
590
|
+
var wt = /[^\p{L}\d]+/giu;
|
|
591
|
+
function Tt(e6) {
|
|
591
592
|
let t2 = e6.trim();
|
|
592
|
-
t2 = t2.replace(
|
|
593
|
+
t2 = t2.replace(xt, Ct).replace(St, Ct), t2 = t2.replace(wt, `\0`);
|
|
593
594
|
let n2 = 0, r2 = t2.length;
|
|
594
595
|
for (; t2.charAt(n2) === `\0`; ) n2++;
|
|
595
596
|
if (n2 === r2) return [];
|
|
596
597
|
for (; t2.charAt(r2 - 1) === `\0`; ) r2--;
|
|
597
598
|
return t2.slice(n2, r2).split(/\0/g);
|
|
598
599
|
}
|
|
599
|
-
var
|
|
600
|
-
var
|
|
601
|
-
var
|
|
600
|
+
var Et = (e6) => `validationError` in (e6.response?.data?.details ?? {});
|
|
601
|
+
var Dt = (e6) => `applicationError` in (e6.response?.data?.details ?? {});
|
|
602
|
+
var Ot = (e6) => (e6.response?.status ?? -1) >= 400 && (e6.response?.status ?? -1) < 500;
|
|
602
603
|
function j(e6, t2 = { explicitPathsToArguments: {}, spreadPathsToArguments: {}, singleArgumentUnchanged: false }, n2 = []) {
|
|
603
604
|
if (typeof e6 != `object` || !e6) throw e6;
|
|
604
|
-
if (
|
|
605
|
-
if (
|
|
606
|
-
if (
|
|
607
|
-
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code:
|
|
608
|
-
return
|
|
605
|
+
if (Et(e6)) return kt(e6, t2, n2);
|
|
606
|
+
if (Dt(e6)) return jt(e6);
|
|
607
|
+
if (Ot(e6)) {
|
|
608
|
+
let t3 = e6.response?.status, n3 = e6.response?.statusText ?? `UNKNOWN`, r2 = e6.response?.data?.message ?? n3, i2 = { applicationError: { description: n3, code: bt(n3), data: {} }, requestId: e6.requestId };
|
|
609
|
+
return At(e6, { message: JSON.stringify({ message: r2, details: i2 }, null, 2), extraProperties: { details: i2, status: t3 } });
|
|
609
610
|
}
|
|
610
|
-
return
|
|
611
|
+
return Mt(e6);
|
|
611
612
|
}
|
|
612
|
-
var
|
|
613
|
-
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 =
|
|
614
|
-
return
|
|
613
|
+
var kt = (e6, t2, n2) => {
|
|
614
|
+
let r2 = e6.response?.data, i2 = e6.requestId, { fieldViolations: a2 } = r2.details.validationError, o2 = Nt(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 };
|
|
615
|
+
return At(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: e6.response?.status, requestId: i2 } });
|
|
615
616
|
};
|
|
616
|
-
var
|
|
617
|
-
var
|
|
618
|
-
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 ??
|
|
619
|
-
return
|
|
617
|
+
var At = (e6, { message: t2, extraProperties: n2 }) => Object.assign(e6, { ...n2, message: t2 });
|
|
618
|
+
var jt = (e6) => {
|
|
619
|
+
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 ?? bt(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 };
|
|
620
|
+
return At(e6, { message: JSON.stringify({ message: s2, details: c2 }, null, 2), extraProperties: { details: c2, status: t2, requestId: e6.requestId } });
|
|
620
621
|
};
|
|
621
|
-
var
|
|
622
|
-
var
|
|
622
|
+
var Mt = (e6) => At(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: bt(e6.response?.statusText ?? `UNKNOWN`), ...!e6.response && { runtimeError: e6 } } });
|
|
623
|
+
var Nt = ({ spreadPathsToArguments: e6, explicitPathsToArguments: t2, singleArgumentUnchanged: n2 }, r2, i2) => {
|
|
623
624
|
let a2 = { ...e6, ...t2 }, o2 = Object.keys(a2);
|
|
624
625
|
return r2?.filter((e7) => !r2.some((t3) => t3.field.length > e7.field.length && t3.field.startsWith(e7.field) && o2.includes(t3.field))).map((e7) => {
|
|
625
626
|
let r3 = t2[e7.field];
|
|
626
|
-
if (r3) return { ...e7, field:
|
|
627
|
+
if (r3) return { ...e7, field: Pt(r3, i2) };
|
|
627
628
|
let s2 = o2?.sort((e8, t3) => t3.length - e8.length)?.find((t3) => e7.field.startsWith(t3));
|
|
628
629
|
if (s2) {
|
|
629
630
|
let t3 = a2[s2];
|
|
630
|
-
if (t3) return { ...e7, field: e7.field.replace(s2,
|
|
631
|
+
if (t3) return { ...e7, field: e7.field.replace(s2, Pt(t3, i2)) };
|
|
631
632
|
}
|
|
632
633
|
return n2 ? { ...e7, field: `${i2[0]}.${e7.field}` } : e7;
|
|
633
634
|
});
|
|
634
635
|
};
|
|
635
|
-
var
|
|
636
|
-
let n2 =
|
|
636
|
+
var Pt = (e6, t2) => {
|
|
637
|
+
let n2 = Ft(e6);
|
|
637
638
|
return n2 == null ? e6 : e6.replace(`$[${n2}]`, t2[n2]);
|
|
638
639
|
};
|
|
639
|
-
var
|
|
640
|
+
var Ft = (e6) => {
|
|
640
641
|
let t2 = e6.match(/\$\[(?<argIndex>\d+)\]/);
|
|
641
642
|
return t2 && t2.groups && Number(t2.groups.argIndex);
|
|
642
643
|
};
|
|
643
|
-
function
|
|
644
|
+
function It() {
|
|
644
645
|
let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
645
646
|
if (e6) return { initWixModules(t3, n3) {
|
|
646
|
-
return
|
|
647
|
+
return Lt(() => e6(t3, n3));
|
|
647
648
|
}, fetchWithAuth() {
|
|
648
649
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
649
650
|
}, graphql() {
|
|
650
651
|
throw Error(`graphql is not available in this context`);
|
|
651
652
|
} };
|
|
652
|
-
let t2 = typeof $wixContext < `u` ? $wixContext.client :
|
|
653
|
+
let t2 = typeof $wixContext < `u` ? $wixContext.client : b.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : b.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : b.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : b.elevatedClient;
|
|
653
654
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
654
655
|
if (r2) {
|
|
655
656
|
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`);
|
|
656
|
-
return
|
|
657
|
+
return Lt(() => n2.use(e7));
|
|
657
658
|
}
|
|
658
659
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
659
|
-
return
|
|
660
|
+
return Lt(() => t2.use(e7));
|
|
660
661
|
}, fetchWithAuth: (e7, n3) => {
|
|
661
662
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
662
663
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -668,110 +669,110 @@ function Ft() {
|
|
|
668
669
|
return t2.graphql(e7, n3, r2);
|
|
669
670
|
} };
|
|
670
671
|
}
|
|
671
|
-
function
|
|
672
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
673
|
-
globalThis.__wix_context__ = void 0,
|
|
672
|
+
function Lt(e6) {
|
|
673
|
+
let t2 = globalThis.__wix_context__, n2 = { client: b.client, elevatedClient: b.elevatedClient }, r2;
|
|
674
|
+
globalThis.__wix_context__ = void 0, b.client = void 0, b.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
674
675
|
try {
|
|
675
676
|
return e6();
|
|
676
677
|
} finally {
|
|
677
|
-
globalThis.__wix_context__ = t2,
|
|
678
|
+
globalThis.__wix_context__ = t2, b.client = n2.client, b.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
678
679
|
}
|
|
679
680
|
}
|
|
680
|
-
function
|
|
681
|
+
function Rt(e6, t2) {
|
|
681
682
|
return (...n2) => {
|
|
682
|
-
let r2 =
|
|
683
|
+
let r2 = It();
|
|
683
684
|
return r2 ? r2.initWixModules(e6, t2).apply(void 0, n2) : e6.apply(void 0, n2);
|
|
684
685
|
};
|
|
685
686
|
}
|
|
686
687
|
function M(e6, t2 = false) {
|
|
687
|
-
return
|
|
688
|
+
return Rt(e6, t2);
|
|
688
689
|
}
|
|
689
690
|
function N(e6, t2) {
|
|
690
|
-
let n2 =
|
|
691
|
-
return t2 && r2 ? new URLSearchParams({ ".r":
|
|
691
|
+
let n2 = zt(e6), r2 = Object.entries(n2).some(([e7, t3]) => e7.includes(`.`) || Array.isArray(t3) && t3.some((e8) => typeof e8 == `object`));
|
|
692
|
+
return t2 && r2 ? new URLSearchParams({ ".r": Vt(JSON.stringify(e6)) }) : Object.entries(n2).reduce((e7, [t3, n3]) => ((Array.isArray(n3) ? n3 : [n3]).forEach((r3) => {
|
|
692
693
|
r3 == null || Array.isArray(n3) && typeof r3 == `object` || e7.append(t3, r3);
|
|
693
694
|
}), e7), new URLSearchParams());
|
|
694
695
|
}
|
|
695
696
|
function P(e6) {
|
|
696
|
-
let t2 =
|
|
697
|
-
return
|
|
697
|
+
let t2 = en(Qt(e6.host), e6.domainToMappings);
|
|
698
|
+
return un(sn(e6.protoPath, e6.data || {}), t2);
|
|
698
699
|
}
|
|
699
|
-
function
|
|
700
|
+
function zt(e6, t2 = ``) {
|
|
700
701
|
let n2 = {};
|
|
701
702
|
return Object.entries(e6).forEach(([e7, r2]) => {
|
|
702
|
-
let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 =
|
|
703
|
+
let i2 = typeof r2 == `object` && !!r2 && !Array.isArray(r2), a2 = Bt(t2, e7);
|
|
703
704
|
if (i2) {
|
|
704
|
-
let e8 =
|
|
705
|
+
let e8 = zt(r2, a2);
|
|
705
706
|
Object.assign(n2, e8);
|
|
706
707
|
} else n2[a2] = r2;
|
|
707
708
|
}), n2;
|
|
708
709
|
}
|
|
709
|
-
function
|
|
710
|
+
function Bt(e6, t2) {
|
|
710
711
|
return `${e6}${e6 ? `.` : ``}${t2}`;
|
|
711
712
|
}
|
|
712
|
-
var
|
|
713
|
+
var Vt = (e6) => {
|
|
713
714
|
let t2 = new TextEncoder().encode(e6);
|
|
714
715
|
return (typeof btoa < `u` ? btoa(String.fromCodePoint(...t2)) : Buffer.from(e6, `utf-8`).toString(`base64`)).replace(/=/g, ``).replace(/\+/g, `-`).replace(/\//g, `_`);
|
|
715
716
|
};
|
|
716
|
-
var
|
|
717
|
-
var
|
|
718
|
-
var
|
|
719
|
-
var
|
|
720
|
-
var
|
|
721
|
-
var
|
|
722
|
-
var
|
|
723
|
-
var
|
|
724
|
-
var
|
|
725
|
-
var
|
|
726
|
-
function Zt(e6) {
|
|
727
|
-
return Qt(e6).replace(Wt, `._base_domain_`).replace(Yt, `._api_base_domain_`).replace(Xt, `*.dev.wix-code.com`);
|
|
728
|
-
}
|
|
717
|
+
var Ht = [`wix.com`, `editorx.com`];
|
|
718
|
+
var Ut = `_`;
|
|
719
|
+
var Wt = `*.`;
|
|
720
|
+
var Gt = RegExp(`\\.(${Ht.join(`|`)})$`);
|
|
721
|
+
var Kt = [`42.wixprod.net`, `uw2-edt-1.wixprod.net`, `virginia-edt.wixprod.net`];
|
|
722
|
+
var qt = { "payments.base44.com": `manage.wix.com`, "create.editorx.com": `editor.editorx.com` };
|
|
723
|
+
var Jt = `dev.wix-code.com`;
|
|
724
|
+
var Yt = /{(.*)}/;
|
|
725
|
+
var Xt = RegExp(`\\.(${Kt.join(`|`)})$`);
|
|
726
|
+
var Zt = RegExp(`.*\\.${Jt}$`);
|
|
729
727
|
function Qt(e6) {
|
|
730
|
-
return
|
|
728
|
+
return $t(e6).replace(Gt, `._base_domain_`).replace(Xt, `._api_base_domain_`).replace(Zt, `*.dev.wix-code.com`);
|
|
729
|
+
}
|
|
730
|
+
function $t(e6) {
|
|
731
|
+
return qt[e6] ?? e6;
|
|
731
732
|
}
|
|
732
|
-
function
|
|
733
|
+
function en(e6, t2) {
|
|
733
734
|
let n2 = t2[e6];
|
|
734
735
|
if (n2) return n2;
|
|
735
|
-
let r2 =
|
|
736
|
+
let r2 = tn(e6, t2) ?? nn(e6, t2);
|
|
736
737
|
if (!r2) {
|
|
737
|
-
if (
|
|
738
|
-
let e7 = t2[
|
|
738
|
+
if (an(e6)) {
|
|
739
|
+
let e7 = t2[on];
|
|
739
740
|
if (e7) return e7;
|
|
740
741
|
}
|
|
741
|
-
let n3 = t2[
|
|
742
|
+
let n3 = t2[Ut];
|
|
742
743
|
if (n3) return n3;
|
|
743
744
|
}
|
|
744
745
|
return r2 ?? [];
|
|
745
746
|
}
|
|
746
|
-
function
|
|
747
|
+
function tn(e6, t2) {
|
|
747
748
|
return Object.entries(t2).find(([t3]) => {
|
|
748
749
|
let [, ...n2] = e6.split(`.`);
|
|
749
750
|
return n2.join(`.`) === t3;
|
|
750
751
|
})?.[1];
|
|
751
752
|
}
|
|
752
|
-
function
|
|
753
|
-
let [n2] = Object.entries(t2).filter(([t3]) =>
|
|
753
|
+
function nn(e6, t2) {
|
|
754
|
+
let [n2] = Object.entries(t2).filter(([t3]) => rn(e6, t3)).sort(([e7], [t3]) => t3.length - e7.length);
|
|
754
755
|
if (!n2) return;
|
|
755
756
|
let [, r2] = n2;
|
|
756
757
|
return r2;
|
|
757
758
|
}
|
|
758
|
-
function
|
|
759
|
-
if (!t2.startsWith(
|
|
759
|
+
function rn(e6, t2) {
|
|
760
|
+
if (!t2.startsWith(Wt)) return false;
|
|
760
761
|
let n2 = t2.slice(1);
|
|
761
762
|
return e6.length > n2.length && e6.endsWith(n2);
|
|
762
763
|
}
|
|
763
|
-
function
|
|
764
|
+
function an(e6) {
|
|
764
765
|
return !!e6.match(/\._base_domain_$/);
|
|
765
766
|
}
|
|
766
|
-
var
|
|
767
|
-
function on(e6, t2) {
|
|
768
|
-
return e6.split(`/`).map((e7) => sn(e7, t2)).join(`/`);
|
|
769
|
-
}
|
|
767
|
+
var on = `www._base_domain_`;
|
|
770
768
|
function sn(e6, t2) {
|
|
771
|
-
|
|
772
|
-
|
|
769
|
+
return e6.split(`/`).map((e7) => cn(e7, t2)).join(`/`);
|
|
770
|
+
}
|
|
771
|
+
function cn(e6, t2) {
|
|
772
|
+
let n2 = e6.match(Yt) || [], r2 = n2[1];
|
|
773
|
+
return r2 ? ln(t2, r2, e6, e6.replace(n2[0], ``)) : e6;
|
|
773
774
|
}
|
|
774
|
-
function
|
|
775
|
+
function ln(e6, t2, n2, r2) {
|
|
775
776
|
let i2 = e6;
|
|
776
777
|
for (let e7 of t2.split(`.`)) {
|
|
777
778
|
if (!i2) return n2;
|
|
@@ -779,28 +780,28 @@ function cn(e6, t2, n2, r2) {
|
|
|
779
780
|
}
|
|
780
781
|
return `${i2}${r2}`;
|
|
781
782
|
}
|
|
782
|
-
function
|
|
783
|
+
function un(e6, t2) {
|
|
783
784
|
let n2 = t2?.find((t3) => e6.startsWith(t3.destPath));
|
|
784
785
|
return n2 ? n2.srcPath + e6.slice(n2.destPath.length) : e6;
|
|
785
786
|
}
|
|
786
|
-
function
|
|
787
|
+
function dn(e6) {
|
|
787
788
|
return isFinite(e6) ? e6 : e6.toString();
|
|
788
789
|
}
|
|
789
790
|
function F(e6) {
|
|
790
791
|
return e6 === `NaN` ? NaN : e6 === `Infinity` ? 1 / 0 : e6 === `-Infinity` ? -1 / 0 : e6;
|
|
791
792
|
}
|
|
792
|
-
function
|
|
793
|
+
function fn(e6) {
|
|
793
794
|
return Uint8Array.from(atob(e6), (e7) => e7.charCodeAt(0));
|
|
794
795
|
}
|
|
795
|
-
var
|
|
796
|
-
var
|
|
796
|
+
var pn = `modulepreload`;
|
|
797
|
+
var mn = function(e6, t2) {
|
|
797
798
|
return new URL(e6, t2).href;
|
|
798
799
|
};
|
|
799
|
-
var
|
|
800
|
-
var
|
|
800
|
+
var hn = {};
|
|
801
|
+
var gn = function(e6) {
|
|
801
802
|
return e6.pathname.endsWith(`.css`);
|
|
802
803
|
};
|
|
803
|
-
var
|
|
804
|
+
var _n = function(e6, t2, n2) {
|
|
804
805
|
if (t2 in e6) return e6[t2];
|
|
805
806
|
let r2 = n2();
|
|
806
807
|
if (!r2) {
|
|
@@ -814,7 +815,7 @@ var gn = function(e6, t2, n2) {
|
|
|
814
815
|
});
|
|
815
816
|
return e6[t2] = i2, i2;
|
|
816
817
|
};
|
|
817
|
-
var
|
|
818
|
+
var vn = function(e6, t2, n2) {
|
|
818
819
|
let r2 = Promise.resolve();
|
|
819
820
|
if (t2 && t2.length > 0) {
|
|
820
821
|
let o3 = function(e8) {
|
|
@@ -825,9 +826,9 @@ var _n = function(e6, t2, n2) {
|
|
|
825
826
|
var o2 = o3, s2 = s3;
|
|
826
827
|
let e7, i3 = document.querySelector(`meta[property=csp-nonce]`), a2 = i3?.nonce || i3?.getAttribute(`nonce`);
|
|
827
828
|
r2 = o3(t2.map((t3) => {
|
|
828
|
-
t3 =
|
|
829
|
-
let r3 = s3(t3), i4 =
|
|
830
|
-
return
|
|
829
|
+
t3 = mn(t3, n2);
|
|
830
|
+
let r3 = s3(t3), i4 = gn(r3);
|
|
831
|
+
return _n(hn, r3.href, () => {
|
|
831
832
|
if (e7 === void 0) {
|
|
832
833
|
e7 = { all: /* @__PURE__ */ new Set(), styles: /* @__PURE__ */ new Set() };
|
|
833
834
|
let t5 = document.getElementsByTagName(`link`);
|
|
@@ -838,7 +839,7 @@ var _n = function(e6, t2, n2) {
|
|
|
838
839
|
}
|
|
839
840
|
if ((i4 ? e7.styles : e7.all).has(r3.href)) return;
|
|
840
841
|
let t4 = document.createElement(`link`);
|
|
841
|
-
if (t4.rel = i4 ? `stylesheet` :
|
|
842
|
+
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) => {
|
|
842
843
|
t4.addEventListener(`load`, e8), t4.addEventListener(`error`, () => n3(Error(`Unable to preload CSS for ${r3}`)));
|
|
843
844
|
});
|
|
844
845
|
});
|
|
@@ -853,30 +854,30 @@ var _n = function(e6, t2, n2) {
|
|
|
853
854
|
return e6().catch(i2);
|
|
854
855
|
});
|
|
855
856
|
};
|
|
856
|
-
var
|
|
857
|
-
var
|
|
858
|
-
var
|
|
859
|
-
var
|
|
860
|
-
let e6 =
|
|
861
|
-
if (e6) return { [
|
|
857
|
+
var yn = `x-wix-linguist`;
|
|
858
|
+
var bn = `00000000-0000-0000-0000-000000000000`;
|
|
859
|
+
var xn = `false`;
|
|
860
|
+
var Sn = () => {
|
|
861
|
+
let e6 = Tn(`language`), t2 = Tn(`locale`);
|
|
862
|
+
if (e6) return { [yn]: [e6, t2 || e6, xn, bn].join(`|`) };
|
|
862
863
|
};
|
|
863
|
-
function
|
|
864
|
+
function Cn() {
|
|
864
865
|
let e6 = null, t2 = null;
|
|
865
866
|
return { promise: new Promise((n2, r2) => {
|
|
866
867
|
e6 = n2, t2 = r2;
|
|
867
868
|
}), resolve: e6, reject: t2 };
|
|
868
869
|
}
|
|
869
|
-
var
|
|
870
|
-
var
|
|
871
|
-
var
|
|
872
|
-
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 =
|
|
873
|
-
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language:
|
|
874
|
-
return
|
|
870
|
+
var wn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
|
|
871
|
+
var Tn = (e6) => wn()?.[e6];
|
|
872
|
+
var En = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
|
|
873
|
+
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = On();
|
|
874
|
+
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: Tn(`language`), locale: Tn(`locale`), get passThroughHeaders() {
|
|
875
|
+
return Sn();
|
|
875
876
|
} } };
|
|
876
877
|
}, auth: (e7) => {
|
|
877
878
|
let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
|
|
878
|
-
!e7 &&
|
|
879
|
-
let n2 = false, { resolve: r2, promise: i2 } =
|
|
879
|
+
!e7 && Dn() && (e7 = t2?.getAccessTokenFunction?.());
|
|
880
|
+
let n2 = false, { resolve: r2, promise: i2 } = Cn();
|
|
880
881
|
return { getAuthHeaders: async () => {
|
|
881
882
|
if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
|
|
882
883
|
return { headers: { Authorization: await e7() } };
|
|
@@ -884,50 +885,50 @@ var Tn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host:
|
|
|
884
885
|
r2(e8);
|
|
885
886
|
}) };
|
|
886
887
|
} });
|
|
887
|
-
function
|
|
888
|
+
function Dn() {
|
|
888
889
|
return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
|
|
889
890
|
}
|
|
890
|
-
function
|
|
891
|
+
function On() {
|
|
891
892
|
let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
|
|
892
893
|
if (!e6) return;
|
|
893
894
|
let t2 = new URL(e6);
|
|
894
895
|
return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
|
|
895
896
|
}
|
|
896
|
-
var
|
|
897
|
+
var kn = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
|
|
897
898
|
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`);
|
|
898
899
|
return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
|
|
899
900
|
}, getAccessToken: () => {
|
|
900
901
|
throw Error(`Not implemented`);
|
|
901
902
|
}, observeState: () => ({ disconnect: () => {
|
|
902
903
|
} }) });
|
|
903
|
-
var
|
|
904
|
+
var An = En({ createHost: function(e6) {
|
|
904
905
|
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
|
|
905
906
|
if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
|
|
906
|
-
return { channel:
|
|
907
|
+
return { channel: kn({ clientSdk: t2, applicationId: n2 }), close: () => {
|
|
907
908
|
} };
|
|
908
909
|
} });
|
|
909
|
-
var
|
|
910
|
-
let n2 =
|
|
911
|
-
return
|
|
910
|
+
var jn = (e6, t2) => {
|
|
911
|
+
let n2 = An.host({ applicationId: e6, componentId: t2 }), r2 = An.auth();
|
|
912
|
+
return Ye({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
912
913
|
};
|
|
913
|
-
var
|
|
914
|
-
function
|
|
914
|
+
var Mn = (e6) => jn(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
|
|
915
|
+
function Nn() {
|
|
915
916
|
let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
916
917
|
if (e6) return { initWixModules(t3, n3) {
|
|
917
|
-
return
|
|
918
|
+
return Pn(() => e6(t3, n3));
|
|
918
919
|
}, fetchWithAuth() {
|
|
919
920
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
920
921
|
}, graphql() {
|
|
921
922
|
throw Error(`graphql is not available in this context`);
|
|
922
923
|
} };
|
|
923
|
-
let t2 = typeof $wixContext < `u` ? $wixContext.client :
|
|
924
|
+
let t2 = typeof $wixContext < `u` ? $wixContext.client : b.client === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.client : b.client, n2 = typeof $wixContext < `u` ? $wixContext.elevatedClient : b.elevatedClient === void 0 ? globalThis.__wix_context__ === void 0 ? void 0 : globalThis.__wix_context__.elevatedClient : b.elevatedClient;
|
|
924
925
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
925
926
|
if (r2) {
|
|
926
927
|
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`);
|
|
927
|
-
return
|
|
928
|
+
return Pn(() => n2.use(e7));
|
|
928
929
|
}
|
|
929
930
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
930
|
-
return
|
|
931
|
+
return Pn(() => t2.use(e7));
|
|
931
932
|
}, fetchWithAuth: (e7, n3) => {
|
|
932
933
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
933
934
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -939,26 +940,26 @@ function Mn() {
|
|
|
939
940
|
return t2.graphql(e7, n3, r2);
|
|
940
941
|
} };
|
|
941
942
|
}
|
|
942
|
-
function
|
|
943
|
-
let t2 = globalThis.__wix_context__, n2 = { client:
|
|
944
|
-
globalThis.__wix_context__ = void 0,
|
|
943
|
+
function Pn(e6) {
|
|
944
|
+
let t2 = globalThis.__wix_context__, n2 = { client: b.client, elevatedClient: b.elevatedClient }, r2;
|
|
945
|
+
globalThis.__wix_context__ = void 0, b.client = void 0, b.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
945
946
|
try {
|
|
946
947
|
return e6();
|
|
947
948
|
} finally {
|
|
948
|
-
globalThis.__wix_context__ = t2,
|
|
949
|
+
globalThis.__wix_context__ = t2, b.client = n2.client, b.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
949
950
|
}
|
|
950
951
|
}
|
|
951
|
-
function
|
|
952
|
+
function Fn(e6, t2) {
|
|
952
953
|
return { ...e6, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
|
|
953
|
-
let r2 =
|
|
954
|
+
let r2 = Nn();
|
|
954
955
|
if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
955
956
|
return r2.initWixModules(e6)[t3].apply(void 0, n2);
|
|
956
957
|
}])) };
|
|
957
958
|
}
|
|
958
|
-
function
|
|
959
|
-
return
|
|
959
|
+
function In(e6) {
|
|
960
|
+
return Fn({ __type: `host`, create: (t2) => Object.entries(e6).reduce((e7, [n2, r2]) => ({ ...e7, [n2]: r2(t2) }), {}) }, Object.keys(e6));
|
|
960
961
|
}
|
|
961
|
-
var
|
|
962
|
+
var Ln = class {
|
|
962
963
|
constructor(e6) {
|
|
963
964
|
this.message = e6, this.captureException = () => {
|
|
964
965
|
console.error(this.message);
|
|
@@ -973,13 +974,13 @@ var In = class {
|
|
|
973
974
|
};
|
|
974
975
|
}
|
|
975
976
|
};
|
|
976
|
-
var
|
|
977
|
-
var
|
|
978
|
-
function
|
|
977
|
+
var Rn = (e6) => new Ln(e6);
|
|
978
|
+
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.`) });
|
|
979
|
+
function Bn(e6) {
|
|
979
980
|
let t2 = Promise.resolve(e6);
|
|
980
981
|
return t2.status = `fulfilled`, t2.value = e6, t2;
|
|
981
982
|
}
|
|
982
|
-
function
|
|
983
|
+
function Vn(e6) {
|
|
983
984
|
if (e6.status === `fulfilled`) return e6.value;
|
|
984
985
|
throw e6.status === `rejected` ? e6.reason : (e6.status === `pending` || (e6.status = `pending`, e6.then((t2) => {
|
|
985
986
|
e6.status = `fulfilled`, e6.value = t2;
|
|
@@ -987,17 +988,17 @@ function Bn(e6) {
|
|
|
987
988
|
e6.status = `rejected`, e6.reason = t2;
|
|
988
989
|
})), e6);
|
|
989
990
|
}
|
|
990
|
-
var
|
|
991
|
-
function
|
|
992
|
-
let r2 =
|
|
993
|
-
r2 || (r2 = /* @__PURE__ */ new WeakMap(),
|
|
991
|
+
var Hn = /* @__PURE__ */ new WeakMap();
|
|
992
|
+
function Un(e6, t2, n2) {
|
|
993
|
+
let r2 = Hn.get(e6);
|
|
994
|
+
r2 || (r2 = /* @__PURE__ */ new WeakMap(), Hn.set(e6, r2));
|
|
994
995
|
let i2 = r2.get(t2);
|
|
995
996
|
i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
|
|
996
997
|
let a2 = i2.get(n2);
|
|
997
998
|
if (!a2) {
|
|
998
|
-
if (e6.status === `fulfilled`) a2 =
|
|
999
|
+
if (e6.status === `fulfilled`) a2 = Bn(t2(e6.value));
|
|
999
1000
|
else if (e6.status === `rejected`) try {
|
|
1000
|
-
a2 =
|
|
1001
|
+
a2 = Bn(n2(e6.reason));
|
|
1001
1002
|
} catch {
|
|
1002
1003
|
a2 = e6.then(t2, n2);
|
|
1003
1004
|
}
|
|
@@ -1009,33 +1010,33 @@ function Hn(e6, t2, n2) {
|
|
|
1009
1010
|
function I(e6) {
|
|
1010
1011
|
return e6;
|
|
1011
1012
|
}
|
|
1012
|
-
var
|
|
1013
|
-
var
|
|
1013
|
+
var Wn = I(`@wix/site-service-rendering-context`);
|
|
1014
|
+
var Gn = () => {
|
|
1014
1015
|
try {
|
|
1015
|
-
return m(
|
|
1016
|
+
return m(Wn).SSR;
|
|
1016
1017
|
} catch {
|
|
1017
1018
|
return false;
|
|
1018
1019
|
}
|
|
1019
1020
|
};
|
|
1020
|
-
var
|
|
1021
|
-
function
|
|
1021
|
+
var Kn = (e6, t2) => e6.length === t2.length && e6.every((e7, n2) => Object.is(e7, t2[n2]));
|
|
1022
|
+
function qn(e6, t2) {
|
|
1022
1023
|
let [n2, r2] = f(() => ({ deps: t2, value: e6() }));
|
|
1023
1024
|
return l(() => {
|
|
1024
|
-
if (
|
|
1025
|
+
if (Kn(n2.deps, t2)) return;
|
|
1025
1026
|
let i2 = e6();
|
|
1026
1027
|
o(() => r2({ deps: t2, value: i2 }));
|
|
1027
1028
|
}, t2), n2.value;
|
|
1028
1029
|
}
|
|
1029
|
-
var
|
|
1030
|
-
var
|
|
1030
|
+
var Jn = I(`@wix/viewer-service-site-members`);
|
|
1031
|
+
var Yn = () => {
|
|
1031
1032
|
try {
|
|
1032
|
-
return m(
|
|
1033
|
+
return m(Jn);
|
|
1033
1034
|
} catch {
|
|
1034
1035
|
return;
|
|
1035
1036
|
}
|
|
1036
1037
|
};
|
|
1037
|
-
var
|
|
1038
|
-
let n2 =
|
|
1038
|
+
var Xn = (e6, t2) => {
|
|
1039
|
+
let n2 = Yn(), [r2, i2] = f(), a2 = !!e6.post?.preview;
|
|
1039
1040
|
return l(() => {
|
|
1040
1041
|
if (!a2) return;
|
|
1041
1042
|
let e7 = true, r3 = () => {
|
|
@@ -1053,18 +1054,18 @@ var Yn = (e6, t2) => {
|
|
|
1053
1054
|
};
|
|
1054
1055
|
}, [a2, t2, n2]), u(() => a2 && r2 && r2._id === e6.post?._id ? { ...e6, post: r2, paywall: void 0 } : e6, [a2, r2, e6]);
|
|
1055
1056
|
};
|
|
1056
|
-
var
|
|
1057
|
-
var
|
|
1058
|
-
var
|
|
1059
|
-
var
|
|
1060
|
-
var
|
|
1061
|
-
var
|
|
1062
|
-
var
|
|
1057
|
+
var Zn = I(`@wix/site-service-url`);
|
|
1058
|
+
var Qn = `14bcded7-0066-7c35-14d7-466cb3f09103`;
|
|
1059
|
+
var $n = `post`;
|
|
1060
|
+
var er = `category`;
|
|
1061
|
+
var tr = `builder-post`;
|
|
1062
|
+
var nr = `__blog_unknown_section__`;
|
|
1063
|
+
var rr = (e6) => {
|
|
1063
1064
|
let t2;
|
|
1064
1065
|
try {
|
|
1065
|
-
let n3 = e6.appSectionRelativeUrl(
|
|
1066
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`,
|
|
1067
|
-
t2 = e6.appSectionRelativeUrl(
|
|
1066
|
+
let n3 = e6.appSectionRelativeUrl(Qn, tr);
|
|
1067
|
+
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, nr) && !n3?.endsWith(`/post-page`)) return;
|
|
1068
|
+
t2 = e6.appSectionRelativeUrl(Qn, tr, true);
|
|
1068
1069
|
} catch {
|
|
1069
1070
|
return;
|
|
1070
1071
|
}
|
|
@@ -1072,12 +1073,12 @@ var nr = (e6) => {
|
|
|
1072
1073
|
let n2 = t2.split(`/`).filter(Boolean);
|
|
1073
1074
|
return n2[n2.length - 1] === `post-page` && n2.pop(), n2.length > 0 ? n2.join(`/`) : void 0;
|
|
1074
1075
|
};
|
|
1075
|
-
var
|
|
1076
|
-
var
|
|
1077
|
-
let t2 =
|
|
1078
|
-
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${
|
|
1076
|
+
var ir = (e6) => `${e6}/${$n}`;
|
|
1077
|
+
var ar = (e6) => {
|
|
1078
|
+
let t2 = rr(e6);
|
|
1079
|
+
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${ir(t2)}`;
|
|
1079
1080
|
};
|
|
1080
|
-
var
|
|
1081
|
+
var or = (e6, t2) => {
|
|
1081
1082
|
if (!e6 || !t2) return;
|
|
1082
1083
|
let n2;
|
|
1083
1084
|
try {
|
|
@@ -1091,14 +1092,14 @@ var ar = (e6, t2) => {
|
|
|
1091
1092
|
if (r2.endsWith(t3) && i2.endsWith(`/post`)) return `${n2.origin}${i2}`;
|
|
1092
1093
|
}
|
|
1093
1094
|
};
|
|
1094
|
-
var
|
|
1095
|
+
var sr = (e6) => {
|
|
1095
1096
|
if (!e6) return;
|
|
1096
1097
|
if (typeof e6 == `string`) return e6;
|
|
1097
1098
|
let { base: t2, path: n2 } = e6;
|
|
1098
1099
|
return t2 ? `${t2.replace(/\/+$/, ``)}${n2 ?? ``}` : void 0;
|
|
1099
1100
|
};
|
|
1100
|
-
var
|
|
1101
|
-
let n2 =
|
|
1101
|
+
var cr = (e6, t2) => {
|
|
1102
|
+
let n2 = sr(e6.url), r2 = `/${$n}`;
|
|
1102
1103
|
if (!n2 || !t2?.endsWith(r2)) return;
|
|
1103
1104
|
let i2, a2;
|
|
1104
1105
|
try {
|
|
@@ -1109,41 +1110,41 @@ var sr = (e6, t2) => {
|
|
|
1109
1110
|
let o2 = a2.slice(0, -r2.length);
|
|
1110
1111
|
return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
|
|
1111
1112
|
};
|
|
1112
|
-
var
|
|
1113
|
-
let n2 =
|
|
1113
|
+
var lr = (e6, t2) => {
|
|
1114
|
+
let n2 = cr(e6, t2);
|
|
1114
1115
|
if (n2) return { href: n2, target: `_self` };
|
|
1115
1116
|
if (t2 && e6.slug) return { href: `${t2}/${encodeURIComponent(e6.slug)}`, target: `_self` };
|
|
1116
|
-
let r2 =
|
|
1117
|
+
let r2 = sr(e6.url);
|
|
1117
1118
|
return r2 ? { href: r2, target: `_self` } : void 0;
|
|
1118
1119
|
};
|
|
1119
|
-
var
|
|
1120
|
-
let n2 =
|
|
1120
|
+
var ur = (e6, t2) => {
|
|
1121
|
+
let n2 = rr(e6);
|
|
1121
1122
|
if (n2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${n2}/${t2}`;
|
|
1122
1123
|
};
|
|
1123
|
-
var
|
|
1124
|
+
var dr = (e6) => {
|
|
1124
1125
|
let t2;
|
|
1125
1126
|
try {
|
|
1126
|
-
t2 = m(
|
|
1127
|
+
t2 = m(Zn);
|
|
1127
1128
|
} catch {
|
|
1128
1129
|
return;
|
|
1129
1130
|
}
|
|
1130
|
-
return
|
|
1131
|
+
return ar(t2) ?? or(t2.currentUrl, e6);
|
|
1131
1132
|
};
|
|
1132
|
-
var
|
|
1133
|
-
var
|
|
1134
|
-
var
|
|
1133
|
+
var fr = { 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` };
|
|
1134
|
+
var pr = (e6) => `${e6} rendered`;
|
|
1135
|
+
var mr = (e6, t2, n2) => {
|
|
1135
1136
|
l(() => {
|
|
1136
1137
|
if (t2 !== `loading` && typeof performance < `u` && typeof performance.mark == `function`) try {
|
|
1137
|
-
performance.mark(
|
|
1138
|
+
performance.mark(pr(e6), { detail: { state: t2, compId: n2 } });
|
|
1138
1139
|
} catch {
|
|
1139
1140
|
}
|
|
1140
1141
|
}, [e6, t2, n2]);
|
|
1141
1142
|
};
|
|
1142
|
-
var
|
|
1143
|
-
function
|
|
1144
|
-
let e6 =
|
|
1143
|
+
var hr = I(`@wix/site-service-warmup-data`);
|
|
1144
|
+
function gr() {
|
|
1145
|
+
let e6 = Gn(), t2 = null;
|
|
1145
1146
|
try {
|
|
1146
|
-
t2 = p()(
|
|
1147
|
+
t2 = p()(hr);
|
|
1147
1148
|
} catch {
|
|
1148
1149
|
}
|
|
1149
1150
|
return u(() => ({ isServer: e6, scope: t2 ?? void 0, get: async (n2) => {
|
|
@@ -1160,13 +1161,13 @@ function hr() {
|
|
|
1160
1161
|
}
|
|
1161
1162
|
} }), [e6, t2]);
|
|
1162
1163
|
}
|
|
1163
|
-
var
|
|
1164
|
+
var _r = () => {
|
|
1164
1165
|
let e6 = /* @__PURE__ */ new Map();
|
|
1165
1166
|
return { getOrInsert: (t2, n2) => (e6.has(t2) || e6.set(t2, n2().finally(() => {
|
|
1166
1167
|
e6.delete(t2);
|
|
1167
1168
|
})), e6.get(t2)) };
|
|
1168
1169
|
};
|
|
1169
|
-
var
|
|
1170
|
+
var vr = async (e6) => {
|
|
1170
1171
|
try {
|
|
1171
1172
|
let { default: t2 } = await e6();
|
|
1172
1173
|
return t2;
|
|
@@ -1174,9 +1175,9 @@ var _r = async (e6) => {
|
|
|
1174
1175
|
return;
|
|
1175
1176
|
}
|
|
1176
1177
|
};
|
|
1177
|
-
var
|
|
1178
|
-
let r2 =
|
|
1179
|
-
let [i3, a2] = await Promise.all([
|
|
1178
|
+
var yr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
1179
|
+
let r2 = _r(), i2 = async (r3) => {
|
|
1180
|
+
let [i3, a2] = await Promise.all([vr(() => t2(r3)), !e6 || !n2 ? void 0 : vr(() => n2(r3))]);
|
|
1180
1181
|
if (i3 && a2) return { ...i3, ...a2 };
|
|
1181
1182
|
if (i3) return i3;
|
|
1182
1183
|
if (a2) return a2;
|
|
@@ -1191,25 +1192,25 @@ var R = () => {
|
|
|
1191
1192
|
});
|
|
1192
1193
|
return n2.resolve = e6, n2.reject = t2, n2;
|
|
1193
1194
|
};
|
|
1194
|
-
var
|
|
1195
|
-
var
|
|
1195
|
+
var br = (e6) => e6 == null ? `` : String(e6);
|
|
1196
|
+
var xr = (e6, t2, n2) => {
|
|
1196
1197
|
e6.forEach((e7) => {
|
|
1197
1198
|
t2[e7] && (n2[e7] = t2[e7]);
|
|
1198
1199
|
});
|
|
1199
1200
|
};
|
|
1200
|
-
var
|
|
1201
|
-
var
|
|
1202
|
-
var
|
|
1201
|
+
var Sr = /###/g;
|
|
1202
|
+
var Cr = (e6) => e6 && e6.includes(`###`) ? e6.replace(Sr, `.`) : e6;
|
|
1203
|
+
var wr = (e6) => !e6 || L(e6);
|
|
1203
1204
|
var z = (e6, t2, n2) => {
|
|
1204
1205
|
let r2 = L(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
1205
1206
|
for (; i2 < r2.length - 1; ) {
|
|
1206
|
-
if (
|
|
1207
|
-
let t3 =
|
|
1207
|
+
if (wr(e6)) return {};
|
|
1208
|
+
let t3 = Cr(r2[i2]);
|
|
1208
1209
|
!e6[t3] && n2 && (e6[t3] = new n2()), e6 = Object.prototype.hasOwnProperty.call(e6, t3) ? e6[t3] : {}, ++i2;
|
|
1209
1210
|
}
|
|
1210
|
-
return
|
|
1211
|
+
return wr(e6) ? {} : { obj: e6, k: Cr(r2[i2]) };
|
|
1211
1212
|
};
|
|
1212
|
-
var
|
|
1213
|
+
var Tr = (e6, t2, n2) => {
|
|
1213
1214
|
let { obj: r2, k: i2 } = z(e6, t2, Object);
|
|
1214
1215
|
if (r2 !== void 0 || t2.length === 1) {
|
|
1215
1216
|
r2[i2] = n2;
|
|
@@ -1219,26 +1220,26 @@ var wr = (e6, t2, n2) => {
|
|
|
1219
1220
|
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = z(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
|
|
1220
1221
|
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
1221
1222
|
};
|
|
1222
|
-
var
|
|
1223
|
+
var Er = (e6, t2, n2, r2) => {
|
|
1223
1224
|
let { obj: i2, k: a2 } = z(e6, t2, Object);
|
|
1224
1225
|
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
1225
1226
|
};
|
|
1226
|
-
var
|
|
1227
|
+
var Dr = (e6, t2) => {
|
|
1227
1228
|
let { obj: n2, k: r2 } = z(e6, t2);
|
|
1228
1229
|
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
1229
1230
|
};
|
|
1230
|
-
var Dr = (e6, t2, n2) => {
|
|
1231
|
-
let r2 = Er(e6, n2);
|
|
1232
|
-
return r2 === void 0 ? Er(t2, n2) : r2;
|
|
1233
|
-
};
|
|
1234
1231
|
var Or = (e6, t2, n2) => {
|
|
1235
|
-
|
|
1232
|
+
let r2 = Dr(e6, n2);
|
|
1233
|
+
return r2 === void 0 ? Dr(t2, n2) : r2;
|
|
1234
|
+
};
|
|
1235
|
+
var kr = (e6, t2, n2) => {
|
|
1236
|
+
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? L(e6[r2]) || e6[r2] instanceof String || L(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : kr(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
|
|
1236
1237
|
return e6;
|
|
1237
1238
|
};
|
|
1238
1239
|
var B = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
1239
|
-
var
|
|
1240
|
-
var
|
|
1241
|
-
var
|
|
1240
|
+
var Ar = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
1241
|
+
var jr = (e6) => L(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Ar[e7]) : e6;
|
|
1242
|
+
var Mr = class {
|
|
1242
1243
|
constructor(e6) {
|
|
1243
1244
|
this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
1244
1245
|
}
|
|
@@ -1249,20 +1250,20 @@ var jr = class {
|
|
|
1249
1250
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
|
|
1250
1251
|
}
|
|
1251
1252
|
};
|
|
1252
|
-
var
|
|
1253
|
-
var
|
|
1254
|
-
var
|
|
1253
|
+
var Nr = [` `, `,`, `?`, `!`, `;`];
|
|
1254
|
+
var Pr = new Mr(20);
|
|
1255
|
+
var Fr = (e6, t2, n2) => {
|
|
1255
1256
|
t2 ||= ``, n2 ||= ``;
|
|
1256
|
-
let r2 =
|
|
1257
|
+
let r2 = Nr.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
|
|
1257
1258
|
if (r2.length === 0) return true;
|
|
1258
|
-
let i2 =
|
|
1259
|
+
let i2 = Pr.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
|
|
1259
1260
|
if (!a2) {
|
|
1260
1261
|
let t3 = e6.indexOf(n2);
|
|
1261
1262
|
t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
|
|
1262
1263
|
}
|
|
1263
1264
|
return a2;
|
|
1264
1265
|
};
|
|
1265
|
-
var
|
|
1266
|
+
var Ir = (e6, t2, n2 = `.`) => {
|
|
1266
1267
|
if (!e6) return;
|
|
1267
1268
|
if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
|
|
1268
1269
|
let r2 = t2.split(n2), i2 = e6;
|
|
@@ -1279,7 +1280,7 @@ var Fr = (e6, t2, n2 = `.`) => {
|
|
|
1279
1280
|
return i2;
|
|
1280
1281
|
};
|
|
1281
1282
|
var V = (e6) => e6?.replace(/_/g, `-`);
|
|
1282
|
-
var
|
|
1283
|
+
var Lr = { type: `logger`, log(e6) {
|
|
1283
1284
|
this.output(`log`, e6);
|
|
1284
1285
|
}, warn(e6) {
|
|
1285
1286
|
this.output(`warn`, e6);
|
|
@@ -1293,7 +1294,7 @@ var H = new class e2 {
|
|
|
1293
1294
|
this.init(e6, t2);
|
|
1294
1295
|
}
|
|
1295
1296
|
init(e6, t2 = {}) {
|
|
1296
|
-
this.prefix = t2.prefix || `i18next:`, this.logger = e6 ||
|
|
1297
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e6 || Lr, this.options = t2, this.debug = t2.debug;
|
|
1297
1298
|
}
|
|
1298
1299
|
log(...e6) {
|
|
1299
1300
|
return this.forward(e6, `log`, ``, true);
|
|
@@ -1317,7 +1318,7 @@ var H = new class e2 {
|
|
|
1317
1318
|
return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
|
|
1318
1319
|
}
|
|
1319
1320
|
}();
|
|
1320
|
-
var
|
|
1321
|
+
var Rr = class {
|
|
1321
1322
|
constructor() {
|
|
1322
1323
|
this.observers = {};
|
|
1323
1324
|
}
|
|
@@ -1345,8 +1346,8 @@ var Lr = class {
|
|
|
1345
1346
|
});
|
|
1346
1347
|
}
|
|
1347
1348
|
};
|
|
1348
|
-
var
|
|
1349
|
-
var
|
|
1349
|
+
var zr = /* @__PURE__ */ new WeakSet();
|
|
1350
|
+
var Br = class extends Rr {
|
|
1350
1351
|
constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
1351
1352
|
super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
1352
1353
|
}
|
|
@@ -1360,12 +1361,12 @@ var zr = class extends Lr {
|
|
|
1360
1361
|
getResource(e6, t2, n2, r2 = {}) {
|
|
1361
1362
|
let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
|
|
1362
1363
|
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : L(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
|
|
1363
|
-
let s2 =
|
|
1364
|
-
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !L(n2) ? s2 :
|
|
1364
|
+
let s2 = Dr(this.data, o2);
|
|
1365
|
+
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !L(n2) ? s2 : Ir(this.data?.[e6]?.[t2], n2, i2);
|
|
1365
1366
|
}
|
|
1366
1367
|
addResource(e6, t2, n2, r2, i2 = { silent: false }) {
|
|
1367
1368
|
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
|
|
1368
|
-
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2),
|
|
1369
|
+
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), Tr(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
|
|
1369
1370
|
}
|
|
1370
1371
|
addResources(e6, t2, n2, r2 = { silent: false }) {
|
|
1371
1372
|
for (let r3 in n2) (L(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
|
|
@@ -1374,8 +1375,8 @@ var zr = class extends Lr {
|
|
|
1374
1375
|
addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
|
|
1375
1376
|
let o2 = [e6, t2];
|
|
1376
1377
|
e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
|
|
1377
|
-
let s2 =
|
|
1378
|
-
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ?
|
|
1378
|
+
let s2 = Dr(this.data, o2) || {};
|
|
1379
|
+
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? kr(s2, n2, i2) : s2 = { ...s2, ...n2 }, Tr(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
|
|
1379
1380
|
}
|
|
1380
1381
|
removeResourceBundle(e6, t2) {
|
|
1381
1382
|
this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
|
|
@@ -1393,37 +1394,37 @@ var zr = class extends Lr {
|
|
|
1393
1394
|
let t2 = this.getDataByLanguage(e6);
|
|
1394
1395
|
return !!(t2 && Object.keys(t2) || []).find((e7) => {
|
|
1395
1396
|
let n2 = t2[e7];
|
|
1396
|
-
return
|
|
1397
|
+
return zr.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && zr.add(n2), true);
|
|
1397
1398
|
});
|
|
1398
1399
|
}
|
|
1399
1400
|
toJSON() {
|
|
1400
1401
|
return this.data;
|
|
1401
1402
|
}
|
|
1402
1403
|
};
|
|
1403
|
-
var
|
|
1404
|
+
var Vr = { processors: {}, addPostProcessor(e6) {
|
|
1404
1405
|
this.processors[e6.name] = e6;
|
|
1405
1406
|
}, handle(e6, t2, n2, r2, i2) {
|
|
1406
1407
|
return e6.forEach((e7) => {
|
|
1407
1408
|
t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
|
|
1408
1409
|
}), t2;
|
|
1409
1410
|
} };
|
|
1410
|
-
var
|
|
1411
|
-
function
|
|
1411
|
+
var Hr = Symbol(`i18next/PATH_KEY`);
|
|
1412
|
+
function Ur() {
|
|
1412
1413
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1413
|
-
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 ===
|
|
1414
|
+
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === Hr ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1414
1415
|
}
|
|
1415
1416
|
function U(e6, t2) {
|
|
1416
|
-
let { [
|
|
1417
|
+
let { [Hr]: n2 } = e6(Ur()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
1417
1418
|
if (n2.length > 1 && i2) {
|
|
1418
1419
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
1419
1420
|
if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
1420
1421
|
}
|
|
1421
1422
|
return n2.join(r2);
|
|
1422
1423
|
}
|
|
1423
|
-
var
|
|
1424
|
-
var
|
|
1424
|
+
var Wr = (e6) => !L(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
1425
|
+
var Gr = class e3 extends Rr {
|
|
1425
1426
|
constructor(e6, t2 = {}) {
|
|
1426
|
-
super(),
|
|
1427
|
+
super(), xr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = H.create(`translator`), this.checkedLoadedFor = {};
|
|
1427
1428
|
}
|
|
1428
1429
|
changeLanguage(e6) {
|
|
1429
1430
|
e6 && (this.language = e6);
|
|
@@ -1433,13 +1434,13 @@ var Wr = class e3 extends Lr {
|
|
|
1433
1434
|
if (e6 == null) return false;
|
|
1434
1435
|
let r2 = this.resolve(e6, n2);
|
|
1435
1436
|
if (r2?.res === void 0) return false;
|
|
1436
|
-
let i2 =
|
|
1437
|
+
let i2 = Wr(r2.res);
|
|
1437
1438
|
return !(n2.returnObjects === false && i2);
|
|
1438
1439
|
}
|
|
1439
1440
|
extractFromKey(e6, t2) {
|
|
1440
1441
|
let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
|
|
1441
1442
|
n2 === void 0 && (n2 = `:`);
|
|
1442
|
-
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 && !
|
|
1443
|
+
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 && !Fr(e6, n2, r2);
|
|
1443
1444
|
if (a2 && !o2) {
|
|
1444
1445
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1445
1446
|
if (t3 && t3.length > 0) return { key: e6, namespaces: L(i2) ? [i2] : i2 };
|
|
@@ -1458,7 +1459,7 @@ var Wr = class e3 extends Lr {
|
|
|
1458
1459
|
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;
|
|
1459
1460
|
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 && !L(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;
|
|
1460
1461
|
y2 && !m2 && x2 && (T2 = w2);
|
|
1461
|
-
let te2 =
|
|
1462
|
+
let te2 = Wr(T2), ne2 = Object.prototype.toString.apply(T2);
|
|
1462
1463
|
if (y2 && T2 && te2 && !_2.includes(ne2) && !(L(v2) && Array.isArray(T2))) {
|
|
1463
1464
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
1464
1465
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
@@ -1469,7 +1470,7 @@ var Wr = class e3 extends Lr {
|
|
|
1469
1470
|
let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
|
|
1470
1471
|
for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
|
|
1471
1472
|
let r3 = `${n3}${o2}${e7}`;
|
|
1472
|
-
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue:
|
|
1473
|
+
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Wr(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
|
|
1473
1474
|
}
|
|
1474
1475
|
m2 = t3;
|
|
1475
1476
|
}
|
|
@@ -1518,7 +1519,7 @@ var Wr = class e3 extends Lr {
|
|
|
1518
1519
|
!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();
|
|
1519
1520
|
}
|
|
1520
1521
|
let a2 = n2.postProcess || this.options.postProcess, o2 = L(a2) ? [a2] : a2;
|
|
1521
|
-
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 =
|
|
1522
|
+
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = Vr.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
|
|
1522
1523
|
}
|
|
1523
1524
|
resolve(e6, t2 = {}) {
|
|
1524
1525
|
let n2, r2, i2, a2, o2;
|
|
@@ -1569,7 +1570,7 @@ var Wr = class e3 extends Lr {
|
|
|
1569
1570
|
return false;
|
|
1570
1571
|
}
|
|
1571
1572
|
};
|
|
1572
|
-
var
|
|
1573
|
+
var Kr = class {
|
|
1573
1574
|
constructor(e6) {
|
|
1574
1575
|
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = H.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
1575
1576
|
}
|
|
@@ -1644,9 +1645,9 @@ var Gr = class {
|
|
|
1644
1645
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
1645
1646
|
}
|
|
1646
1647
|
};
|
|
1647
|
-
var
|
|
1648
|
-
var
|
|
1649
|
-
var
|
|
1648
|
+
var qr = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
1649
|
+
var Jr = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1650
|
+
var Yr = class {
|
|
1650
1651
|
constructor(e6, t2 = {}) {
|
|
1651
1652
|
this.languageUtils = e6, this.options = t2, this.logger = H.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1652
1653
|
}
|
|
@@ -1660,8 +1661,8 @@ var Jr = class {
|
|
|
1660
1661
|
try {
|
|
1661
1662
|
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
1662
1663
|
} catch {
|
|
1663
|
-
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`),
|
|
1664
|
-
if (!e6.match(/-|_/)) return
|
|
1664
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), Jr;
|
|
1665
|
+
if (!e6.match(/-|_/)) return Jr;
|
|
1665
1666
|
let n3 = this.languageUtils.getLanguagePartFromCode(e6);
|
|
1666
1667
|
a2 = this.getRule(n3, t2);
|
|
1667
1668
|
}
|
|
@@ -1676,26 +1677,26 @@ var Jr = class {
|
|
|
1676
1677
|
}
|
|
1677
1678
|
getSuffixes(e6, t2 = {}) {
|
|
1678
1679
|
let n2 = this.getRule(e6, t2);
|
|
1679
|
-
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) =>
|
|
1680
|
+
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) => qr[e7] - qr[t3]).map((e7) => `${this.options.prepend}${t2.ordinal ? `ordinal${this.options.prepend}` : ``}${e7}`) : [];
|
|
1680
1681
|
}
|
|
1681
1682
|
getSuffix(e6, t2, n2 = {}) {
|
|
1682
1683
|
let r2 = this.getRule(e6, n2);
|
|
1683
1684
|
return r2 ? `${this.options.prepend}${n2.ordinal ? `ordinal${this.options.prepend}` : ``}${r2.select(t2)}` : (this.logger.warn(`no plural rule found for: ${e6}`), this.getSuffix(`dev`, t2, n2));
|
|
1684
1685
|
}
|
|
1685
1686
|
};
|
|
1686
|
-
var
|
|
1687
|
-
let a2 =
|
|
1688
|
-
return !a2 && i2 && L(n2) && (a2 =
|
|
1687
|
+
var Xr = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
1688
|
+
let a2 = Or(e6, t2, n2);
|
|
1689
|
+
return !a2 && i2 && L(n2) && (a2 = Ir(e6, n2, r2), a2 === void 0 && (a2 = Ir(t2, n2, r2))), a2;
|
|
1689
1690
|
};
|
|
1690
|
-
var
|
|
1691
|
-
var
|
|
1691
|
+
var Zr = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
1692
|
+
var Qr = class {
|
|
1692
1693
|
constructor(e6 = {}) {
|
|
1693
1694
|
this.logger = H.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
1694
1695
|
}
|
|
1695
1696
|
init(e6 = {}) {
|
|
1696
1697
|
e6.interpolation ||= { escapeValue: true };
|
|
1697
1698
|
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;
|
|
1698
|
-
this.escape = t2 === void 0 ?
|
|
1699
|
+
this.escape = t2 === void 0 ? jr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? B(i2) : a2 || `{{`, this.suffix = o2 ? B(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? B(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? B(l2) : ``, this.nestingPrefix = d2 ? B(d2) : f2 || B(`$t(`), this.nestingSuffix = p2 ? B(p2) : m2 || B(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
|
|
1699
1700
|
}
|
|
1700
1701
|
reset() {
|
|
1701
1702
|
this.options && this.init(this.options);
|
|
@@ -1707,11 +1708,11 @@ var Zr = class {
|
|
|
1707
1708
|
interpolate(e6, t2, n2, r2) {
|
|
1708
1709
|
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
|
|
1709
1710
|
if (!e7.includes(this.formatSeparator)) {
|
|
1710
|
-
let i4 =
|
|
1711
|
+
let i4 = Xr(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1711
1712
|
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
|
|
1712
1713
|
}
|
|
1713
1714
|
let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
1714
|
-
return this.format(
|
|
1715
|
+
return this.format(Xr(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
1715
1716
|
};
|
|
1716
1717
|
this.resetRegExp(), !this.escapeValue && typeof e6 == `string` && /\$t\([^)]*\{[^}]*\{\{/.test(e6) && this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false \u2014 if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);
|
|
1717
1718
|
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
@@ -1727,9 +1728,9 @@ var Zr = class {
|
|
|
1727
1728
|
a2 = i2[0];
|
|
1728
1729
|
continue;
|
|
1729
1730
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
1730
|
-
} else !L(a2) && !this.useRawValueToEscape && (a2 =
|
|
1731
|
+
} else !L(a2) && !this.useRawValueToEscape && (a2 = br(a2));
|
|
1731
1732
|
let s3 = t3.safeValue(a2);
|
|
1732
|
-
if (e6 = e6.replace(i2[0],
|
|
1733
|
+
if (e6 = e6.replace(i2[0], Zr(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
1733
1734
|
}
|
|
1734
1735
|
}), e6;
|
|
1735
1736
|
}
|
|
@@ -1753,12 +1754,12 @@ var Zr = class {
|
|
|
1753
1754
|
a2 = { ...n2 }, a2 = a2.replace && !L(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
1754
1755
|
let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
1755
1756
|
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 && !L(i2)) return i2;
|
|
1756
|
-
L(i2) || (i2 =
|
|
1757
|
+
L(i2) || (i2 = br(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) + br(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
|
|
1757
1758
|
}
|
|
1758
1759
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
1759
1760
|
}
|
|
1760
1761
|
};
|
|
1761
|
-
var
|
|
1762
|
+
var $r = (e6) => {
|
|
1762
1763
|
let t2 = e6.toLowerCase().trim(), n2 = {};
|
|
1763
1764
|
if (e6.includes(`(`)) {
|
|
1764
1765
|
let r2 = e6.split(`(`);
|
|
@@ -1773,7 +1774,7 @@ var Qr = (e6) => {
|
|
|
1773
1774
|
}
|
|
1774
1775
|
return { formatName: t2, formatOptions: n2 };
|
|
1775
1776
|
};
|
|
1776
|
-
var
|
|
1777
|
+
var ei = (e6) => {
|
|
1777
1778
|
let t2 = {};
|
|
1778
1779
|
return (n2, r2, i2) => {
|
|
1779
1780
|
let a2 = i2;
|
|
@@ -1782,14 +1783,14 @@ var $r = (e6) => {
|
|
|
1782
1783
|
return s2 || (s2 = e6(V(r2), i2), t2[o2] = s2), s2(n2);
|
|
1783
1784
|
};
|
|
1784
1785
|
};
|
|
1785
|
-
var
|
|
1786
|
-
var
|
|
1786
|
+
var ti = (e6) => (t2, n2, r2) => e6(V(n2), r2)(t2);
|
|
1787
|
+
var ni = class {
|
|
1787
1788
|
constructor(e6 = {}) {
|
|
1788
1789
|
this.logger = H.create(`formatter`), this.options = e6, this.init(e6);
|
|
1789
1790
|
}
|
|
1790
1791
|
init(e6, t2 = { interpolation: {} }) {
|
|
1791
1792
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
1792
|
-
let n2 = t2.cacheInBuiltFormats ?
|
|
1793
|
+
let n2 = t2.cacheInBuiltFormats ? ei : ti;
|
|
1793
1794
|
this.formats = { number: n2((e7, t3) => {
|
|
1794
1795
|
let n3 = new Intl.NumberFormat(e7, { ...t3 });
|
|
1795
1796
|
return (e8) => n3.format(e8);
|
|
@@ -1811,7 +1812,7 @@ var ti = class {
|
|
|
1811
1812
|
this.formats[e6.toLowerCase().trim()] = t2;
|
|
1812
1813
|
}
|
|
1813
1814
|
addCached(e6, t2) {
|
|
1814
|
-
this.formats[e6.toLowerCase().trim()] =
|
|
1815
|
+
this.formats[e6.toLowerCase().trim()] = ei(t2);
|
|
1815
1816
|
}
|
|
1816
1817
|
format(e6, t2, n2, r2 = {}) {
|
|
1817
1818
|
if (!t2 || e6 == null) return e6;
|
|
@@ -1822,7 +1823,7 @@ var ti = class {
|
|
|
1822
1823
|
a2.push(t3);
|
|
1823
1824
|
}
|
|
1824
1825
|
return a2.reduce((e7, t3) => {
|
|
1825
|
-
let { formatName: i3, formatOptions: a3 } =
|
|
1826
|
+
let { formatName: i3, formatOptions: a3 } = $r(t3);
|
|
1826
1827
|
if (this.formats[i3]) {
|
|
1827
1828
|
let t4 = e7;
|
|
1828
1829
|
try {
|
|
@@ -1837,10 +1838,10 @@ var ti = class {
|
|
|
1837
1838
|
}, e6);
|
|
1838
1839
|
}
|
|
1839
1840
|
};
|
|
1840
|
-
var
|
|
1841
|
+
var ri = (e6, t2) => {
|
|
1841
1842
|
e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
|
|
1842
1843
|
};
|
|
1843
|
-
var
|
|
1844
|
+
var ii = class extends Rr {
|
|
1844
1845
|
constructor(e6, t2, n2, r2 = {}) {
|
|
1845
1846
|
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = H.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);
|
|
1846
1847
|
}
|
|
@@ -1859,7 +1860,7 @@ var ri = class extends Lr {
|
|
|
1859
1860
|
t2 && this.emit(`failedLoading`, i2, a2, t2), !t2 && n2 && this.store.addResourceBundle(i2, a2, n2, void 0, void 0, { skipCopy: true }), this.state[e6] = t2 ? -1 : 2, t2 && n2 && (this.state[e6] = 0);
|
|
1860
1861
|
let o2 = {};
|
|
1861
1862
|
this.queue.forEach((n3) => {
|
|
1862
|
-
|
|
1863
|
+
Er(n3.loaded, [i2], a2), ri(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
|
|
1863
1864
|
o2[e7] || (o2[e7] = {});
|
|
1864
1865
|
let t3 = n3.loaded[e7];
|
|
1865
1866
|
t3.length && t3.forEach((t4) => {
|
|
@@ -1931,7 +1932,7 @@ var ri = class extends Lr {
|
|
|
1931
1932
|
}
|
|
1932
1933
|
}
|
|
1933
1934
|
};
|
|
1934
|
-
var
|
|
1935
|
+
var ai = () => ({ 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) => {
|
|
1935
1936
|
let t2 = {};
|
|
1936
1937
|
if (typeof e6[1] == `object` && (t2 = e6[1]), L(e6[1]) && (t2.defaultValue = e6[1]), L(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
|
|
1937
1938
|
let n2 = e6[3] || e6[2];
|
|
@@ -1941,17 +1942,17 @@ var ii = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
1941
1942
|
}
|
|
1942
1943
|
return t2;
|
|
1943
1944
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
1944
|
-
var
|
|
1945
|
-
var
|
|
1945
|
+
var oi = (e6) => (L(e6.ns) && (e6.ns = [e6.ns]), L(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), L(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
|
|
1946
|
+
var si = () => {
|
|
1946
1947
|
};
|
|
1947
|
-
var
|
|
1948
|
+
var ci = (e6) => {
|
|
1948
1949
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
|
|
1949
1950
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
1950
1951
|
});
|
|
1951
1952
|
};
|
|
1952
|
-
var W = class e4 extends
|
|
1953
|
+
var W = class e4 extends Rr {
|
|
1953
1954
|
constructor(e6 = {}, t2) {
|
|
1954
|
-
if (super(), this.options =
|
|
1955
|
+
if (super(), this.options = oi(e6), this.services = {}, this.logger = H, this.modules = { external: [] }, ci(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
1955
1956
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
1956
1957
|
setTimeout(() => {
|
|
1957
1958
|
this.init(e6, t2);
|
|
@@ -1960,25 +1961,25 @@ var W = class e4 extends Lr {
|
|
|
1960
1961
|
}
|
|
1961
1962
|
init(e6 = {}, t2) {
|
|
1962
1963
|
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (L(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
|
|
1963
|
-
let n2 =
|
|
1964
|
-
this.options = { ...n2, ...this.options, ...
|
|
1964
|
+
let n2 = ai();
|
|
1965
|
+
this.options = { ...n2, ...this.options, ...oi(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);
|
|
1965
1966
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
1966
1967
|
if (!this.options.isClone) {
|
|
1967
1968
|
this.modules.logger ? H.init(r2(this.modules.logger), this.options) : H.init(null, this.options);
|
|
1968
1969
|
let e7;
|
|
1969
|
-
e7 = this.modules.formatter ? this.modules.formatter :
|
|
1970
|
-
let t3 = new
|
|
1971
|
-
this.store = new
|
|
1970
|
+
e7 = this.modules.formatter ? this.modules.formatter : ni;
|
|
1971
|
+
let t3 = new Kr(this.options);
|
|
1972
|
+
this.store = new Br(this.options.resources, this.options);
|
|
1972
1973
|
let n3 = this.services;
|
|
1973
|
-
n3.logger = H, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new
|
|
1974
|
+
n3.logger = H, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new Yr(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 Qr(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new ii(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
|
|
1974
1975
|
this.emit(e8, ...t4);
|
|
1975
|
-
}), 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
|
|
1976
|
+
}), 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 Gr(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
|
|
1976
1977
|
this.emit(e8, ...t4);
|
|
1977
1978
|
}), this.modules.external.forEach((e8) => {
|
|
1978
1979
|
e8.init && e8.init(this);
|
|
1979
1980
|
});
|
|
1980
1981
|
}
|
|
1981
|
-
if (this.format = this.options.interpolation.format, t2 ||=
|
|
1982
|
+
if (this.format = this.options.interpolation.format, t2 ||= si, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1982
1983
|
let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1983
1984
|
e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
|
|
1984
1985
|
}
|
|
@@ -1996,7 +1997,7 @@ var W = class e4 extends Lr {
|
|
|
1996
1997
|
};
|
|
1997
1998
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
1998
1999
|
}
|
|
1999
|
-
loadResources(e6, t2 =
|
|
2000
|
+
loadResources(e6, t2 = si) {
|
|
2000
2001
|
let n2 = t2, r2 = L(e6) ? e6 : this.language;
|
|
2001
2002
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2002
2003
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
@@ -2012,14 +2013,14 @@ var W = class e4 extends Lr {
|
|
|
2012
2013
|
}
|
|
2013
2014
|
reloadResources(e6, t2, n2) {
|
|
2014
2015
|
let r2 = R();
|
|
2015
|
-
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 ||=
|
|
2016
|
+
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 ||= si, this.services.backendConnector.reload(e6, t2, (e7) => {
|
|
2016
2017
|
r2.resolve(), n2(e7);
|
|
2017
2018
|
}), r2;
|
|
2018
2019
|
}
|
|
2019
2020
|
use(e6) {
|
|
2020
2021
|
if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
2021
2022
|
if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
2022
|
-
return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` &&
|
|
2023
|
+
return e6.type === `backend` && (this.modules.backend = e6), (e6.type === `logger` || e6.log && e6.warn && e6.error) && (this.modules.logger = e6), e6.type === `languageDetector` && (this.modules.languageDetector = e6), e6.type === `i18nFormat` && (this.modules.i18nFormat = e6), e6.type === `postProcessor` && Vr.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
|
|
2023
2024
|
}
|
|
2024
2025
|
setResolvedLanguage(e6) {
|
|
2025
2026
|
if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
|
|
@@ -2115,24 +2116,24 @@ var W = class e4 extends Lr {
|
|
|
2115
2116
|
}
|
|
2116
2117
|
} catch {
|
|
2117
2118
|
}
|
|
2118
|
-
let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new
|
|
2119
|
+
let t2 = `ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`), n2 = this.services?.languageUtils || new Kr(ai());
|
|
2119
2120
|
return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
2120
2121
|
}
|
|
2121
2122
|
static createInstance(t2 = {}, n2) {
|
|
2122
2123
|
let r2 = new e4(t2, n2);
|
|
2123
2124
|
return r2.createInstance = e4.createInstance, r2;
|
|
2124
2125
|
}
|
|
2125
|
-
cloneInstance(t2 = {}, n2 =
|
|
2126
|
+
cloneInstance(t2 = {}, n2 = si) {
|
|
2126
2127
|
let r2 = t2.forkResourceStore;
|
|
2127
2128
|
r2 && delete t2.forkResourceStore;
|
|
2128
2129
|
let i2 = { ...this.options, preload: false, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2129
2130
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
|
|
2130
2131
|
a2[e6] = this[e6];
|
|
2131
|
-
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new
|
|
2132
|
-
let e6 = { ...
|
|
2133
|
-
a2.services.interpolator = new
|
|
2132
|
+
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Br(Object.keys(this.store.data).reduce((e6, t3) => (e6[t3] = { ...this.store.data[t3] }, e6[t3] = Object.keys(e6[t3]).reduce((n3, r3) => (n3[r3] = { ...e6[t3][r3] }, n3), e6[t3]), e6), {}), i2), a2.services.resourceStore = a2.store), t2.interpolation) {
|
|
2133
|
+
let e6 = { ...ai().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
|
|
2134
|
+
a2.services.interpolator = new Qr(n3);
|
|
2134
2135
|
}
|
|
2135
|
-
return a2.translator = new
|
|
2136
|
+
return a2.translator = new Gr(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
|
|
2136
2137
|
a2.emit(e6, ...t3);
|
|
2137
2138
|
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
2138
2139
|
}
|
|
@@ -2141,7 +2142,7 @@ var W = class e4 extends Lr {
|
|
|
2141
2142
|
}
|
|
2142
2143
|
}.createInstance();
|
|
2143
2144
|
W.createInstance, W.dir, W.init, W.loadResources, W.reloadResources, W.use, W.changeLanguage, W.getFixedT, W.t, W.exists, W.setDefaultNamespace, W.hasLoadedNamespace, W.loadNamespaces, W.loadLanguages;
|
|
2144
|
-
var
|
|
2145
|
+
var li = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2145
2146
|
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = W.createInstance(i2 ? s2 : void 0);
|
|
2146
2147
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2147
2148
|
try {
|
|
@@ -2151,38 +2152,38 @@ var ci = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
|
|
|
2151
2152
|
}
|
|
2152
2153
|
} }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
|
|
2153
2154
|
};
|
|
2154
|
-
function
|
|
2155
|
-
let n2 = t2 && t2.cache ? t2.cache :
|
|
2156
|
-
return (t2 && t2.strategy ? t2.strategy :
|
|
2155
|
+
function ui(e6, t2) {
|
|
2156
|
+
let n2 = t2 && t2.cache ? t2.cache : bi, r2 = t2 && t2.serializer ? t2.serializer : vi;
|
|
2157
|
+
return (t2 && t2.strategy ? t2.strategy : hi)(e6, { cache: n2, serializer: r2 });
|
|
2157
2158
|
}
|
|
2158
|
-
function
|
|
2159
|
+
function di(e6) {
|
|
2159
2160
|
return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
|
|
2160
2161
|
}
|
|
2161
|
-
function
|
|
2162
|
-
let i2 =
|
|
2162
|
+
function fi(e6, t2, n2, r2) {
|
|
2163
|
+
let i2 = di(r2) ? r2 : n2(r2), a2 = t2.get(i2);
|
|
2163
2164
|
return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
|
|
2164
2165
|
}
|
|
2165
|
-
function
|
|
2166
|
+
function pi(e6, t2, n2) {
|
|
2166
2167
|
let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
|
|
2167
2168
|
return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
|
|
2168
2169
|
}
|
|
2169
|
-
function
|
|
2170
|
+
function mi(e6, t2, n2, r2, i2) {
|
|
2170
2171
|
return n2.bind(t2, e6, r2, i2);
|
|
2171
2172
|
}
|
|
2172
|
-
function mi(e6, t2) {
|
|
2173
|
-
let n2 = e6.length === 1 ? di : fi;
|
|
2174
|
-
return pi(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2175
|
-
}
|
|
2176
2173
|
function hi(e6, t2) {
|
|
2177
|
-
|
|
2174
|
+
let n2 = e6.length === 1 ? fi : pi;
|
|
2175
|
+
return mi(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2178
2176
|
}
|
|
2179
2177
|
function gi(e6, t2) {
|
|
2180
|
-
return
|
|
2178
|
+
return mi(e6, this, pi, t2.cache.create(), t2.serializer);
|
|
2181
2179
|
}
|
|
2182
|
-
|
|
2180
|
+
function _i(e6, t2) {
|
|
2181
|
+
return mi(e6, this, fi, t2.cache.create(), t2.serializer);
|
|
2182
|
+
}
|
|
2183
|
+
var vi = function() {
|
|
2183
2184
|
return JSON.stringify(arguments);
|
|
2184
2185
|
};
|
|
2185
|
-
var
|
|
2186
|
+
var yi = class {
|
|
2186
2187
|
constructor() {
|
|
2187
2188
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2188
2189
|
}
|
|
@@ -2193,14 +2194,14 @@ var vi = class {
|
|
|
2193
2194
|
this.cache[e6] = t2;
|
|
2194
2195
|
}
|
|
2195
2196
|
};
|
|
2196
|
-
var
|
|
2197
|
-
return new
|
|
2197
|
+
var bi = { create: function() {
|
|
2198
|
+
return new yi();
|
|
2198
2199
|
} };
|
|
2199
|
-
var
|
|
2200
|
-
var
|
|
2201
|
-
function
|
|
2200
|
+
var xi = { variadic: gi, monadic: _i };
|
|
2201
|
+
var Si = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
|
|
2202
|
+
function Ci(e6) {
|
|
2202
2203
|
let t2 = {};
|
|
2203
|
-
return e6.replace(
|
|
2204
|
+
return e6.replace(Si, (e7) => {
|
|
2204
2205
|
let n2 = e7.length;
|
|
2205
2206
|
switch (e7[0]) {
|
|
2206
2207
|
case `G`:
|
|
@@ -2287,10 +2288,10 @@ function Si(e6) {
|
|
|
2287
2288
|
return ``;
|
|
2288
2289
|
}), t2;
|
|
2289
2290
|
}
|
|
2290
|
-
var
|
|
2291
|
-
function
|
|
2291
|
+
var wi = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
2292
|
+
function Ti(e6) {
|
|
2292
2293
|
if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
2293
|
-
let t2 = e6.split(
|
|
2294
|
+
let t2 = e6.split(wi).filter((e7) => e7.length > 0), n2 = [];
|
|
2294
2295
|
for (let e7 of t2) {
|
|
2295
2296
|
let t3 = e7.split(`/`);
|
|
2296
2297
|
if (t3.length === 0) throw Error(`Invalid number skeleton`);
|
|
@@ -2300,20 +2301,20 @@ function wi(e6) {
|
|
|
2300
2301
|
}
|
|
2301
2302
|
return n2;
|
|
2302
2303
|
}
|
|
2303
|
-
function
|
|
2304
|
+
function Ei(e6) {
|
|
2304
2305
|
return e6.replace(/^(.*?)-/, ``);
|
|
2305
2306
|
}
|
|
2306
|
-
var
|
|
2307
|
-
var
|
|
2308
|
-
var
|
|
2309
|
-
var
|
|
2310
|
-
function
|
|
2307
|
+
var Di = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
2308
|
+
var Oi = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
2309
|
+
var ki = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
2310
|
+
var Ai = /^(0+)$/;
|
|
2311
|
+
function ji(e6) {
|
|
2311
2312
|
let t2 = {};
|
|
2312
|
-
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(
|
|
2313
|
+
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Oi, function(e7, n2, r2) {
|
|
2313
2314
|
return typeof r2 == `string` ? r2 === `+` ? t2.minimumSignificantDigits = n2.length : n2[0] === `#` ? t2.maximumSignificantDigits = n2.length : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length + (typeof r2 == `string` ? r2.length : 0)) : (t2.minimumSignificantDigits = n2.length, t2.maximumSignificantDigits = n2.length), ``;
|
|
2314
2315
|
}), t2;
|
|
2315
2316
|
}
|
|
2316
|
-
function
|
|
2317
|
+
function Mi(e6) {
|
|
2317
2318
|
switch (e6) {
|
|
2318
2319
|
case `sign-auto`:
|
|
2319
2320
|
return { signDisplay: `auto` };
|
|
@@ -2337,19 +2338,19 @@ function ji(e6) {
|
|
|
2337
2338
|
return { signDisplay: `never` };
|
|
2338
2339
|
}
|
|
2339
2340
|
}
|
|
2340
|
-
function
|
|
2341
|
+
function Ni(e6) {
|
|
2341
2342
|
let t2;
|
|
2342
2343
|
if (e6[0] === `E` && e6[1] === `E` ? (t2 = { notation: `engineering` }, e6 = e6.slice(2)) : e6[0] === `E` && (t2 = { notation: `scientific` }, e6 = e6.slice(1)), t2) {
|
|
2343
2344
|
let n2 = e6.slice(0, 2);
|
|
2344
|
-
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !
|
|
2345
|
+
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !Ai.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
|
|
2345
2346
|
t2.minimumIntegerDigits = e6.length;
|
|
2346
2347
|
}
|
|
2347
2348
|
return t2;
|
|
2348
2349
|
}
|
|
2349
|
-
function Ni(e6) {
|
|
2350
|
-
return ji(e6) || {};
|
|
2351
|
-
}
|
|
2352
2350
|
function Pi(e6) {
|
|
2351
|
+
return Mi(e6) || {};
|
|
2352
|
+
}
|
|
2353
|
+
function Fi(e6) {
|
|
2353
2354
|
let t2 = {};
|
|
2354
2355
|
for (let n2 of e6) {
|
|
2355
2356
|
switch (n2.stem) {
|
|
@@ -2373,7 +2374,7 @@ function Pi(e6) {
|
|
|
2373
2374
|
continue;
|
|
2374
2375
|
case `measure-unit`:
|
|
2375
2376
|
case `unit`:
|
|
2376
|
-
t2.style = `unit`, t2.unit =
|
|
2377
|
+
t2.style = `unit`, t2.unit = Ei(n2.options[0]);
|
|
2377
2378
|
continue;
|
|
2378
2379
|
case `compact-short`:
|
|
2379
2380
|
case `K`:
|
|
@@ -2384,10 +2385,10 @@ function Pi(e6) {
|
|
|
2384
2385
|
t2.notation = `compact`, t2.compactDisplay = `long`;
|
|
2385
2386
|
continue;
|
|
2386
2387
|
case `scientific`:
|
|
2387
|
-
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2388
|
+
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Pi(t3) }), {}) };
|
|
2388
2389
|
continue;
|
|
2389
2390
|
case `engineering`:
|
|
2390
|
-
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2391
|
+
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...Pi(t3) }), {}) };
|
|
2391
2392
|
continue;
|
|
2392
2393
|
case `notation-simple`:
|
|
2393
2394
|
t2.notation = `standard`;
|
|
@@ -2430,7 +2431,7 @@ function Pi(e6) {
|
|
|
2430
2431
|
continue;
|
|
2431
2432
|
case `integer-width`:
|
|
2432
2433
|
if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
|
|
2433
|
-
n2.options[0].replace(
|
|
2434
|
+
n2.options[0].replace(ki, function(e8, n3, r3, i2, a2, o2) {
|
|
2434
2435
|
if (n3) t2.minimumIntegerDigits = r3.length;
|
|
2435
2436
|
else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
|
|
2436
2437
|
else if (o2) throw Error(`We currently do not support exact integer digits`);
|
|
@@ -2438,83 +2439,83 @@ function Pi(e6) {
|
|
|
2438
2439
|
});
|
|
2439
2440
|
continue;
|
|
2440
2441
|
}
|
|
2441
|
-
if (
|
|
2442
|
+
if (Ai.test(n2.stem)) {
|
|
2442
2443
|
t2.minimumIntegerDigits = n2.stem.length;
|
|
2443
2444
|
continue;
|
|
2444
2445
|
}
|
|
2445
|
-
if (
|
|
2446
|
+
if (Di.test(n2.stem)) {
|
|
2446
2447
|
if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
|
|
2447
|
-
n2.stem.replace(
|
|
2448
|
+
n2.stem.replace(Di, function(e9, n3, r3, i2, a2, o2) {
|
|
2448
2449
|
return r3 === `*` ? t2.minimumFractionDigits = n3.length : i2 && i2[0] === `#` ? t2.maximumFractionDigits = i2.length : a2 && o2 ? (t2.minimumFractionDigits = a2.length, t2.maximumFractionDigits = a2.length + o2.length) : (t2.minimumFractionDigits = n3.length, t2.maximumFractionDigits = n3.length), ``;
|
|
2449
2450
|
});
|
|
2450
2451
|
let e8 = n2.options[0];
|
|
2451
|
-
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...
|
|
2452
|
+
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...ji(e8) });
|
|
2452
2453
|
continue;
|
|
2453
2454
|
}
|
|
2454
|
-
if (
|
|
2455
|
-
t2 = { ...t2, ...
|
|
2455
|
+
if (Oi.test(n2.stem)) {
|
|
2456
|
+
t2 = { ...t2, ...ji(n2.stem) };
|
|
2456
2457
|
continue;
|
|
2457
2458
|
}
|
|
2458
|
-
let e7 =
|
|
2459
|
+
let e7 = Mi(n2.stem);
|
|
2459
2460
|
e7 && (t2 = { ...t2, ...e7 });
|
|
2460
|
-
let r2 =
|
|
2461
|
+
let r2 = Ni(n2.stem);
|
|
2461
2462
|
r2 && (t2 = { ...t2, ...r2 });
|
|
2462
2463
|
}
|
|
2463
2464
|
return t2;
|
|
2464
2465
|
}
|
|
2465
|
-
var
|
|
2466
|
+
var Ii = function(e6) {
|
|
2466
2467
|
return e6[e6.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = `EXPECT_ARGUMENT_CLOSING_BRACE`, e6[e6.EMPTY_ARGUMENT = 2] = `EMPTY_ARGUMENT`, e6[e6.MALFORMED_ARGUMENT = 3] = `MALFORMED_ARGUMENT`, e6[e6.EXPECT_ARGUMENT_TYPE = 4] = `EXPECT_ARGUMENT_TYPE`, e6[e6.INVALID_ARGUMENT_TYPE = 5] = `INVALID_ARGUMENT_TYPE`, e6[e6.EXPECT_ARGUMENT_STYLE = 6] = `EXPECT_ARGUMENT_STYLE`, e6[e6.INVALID_NUMBER_SKELETON = 7] = `INVALID_NUMBER_SKELETON`, e6[e6.INVALID_DATE_TIME_SKELETON = 8] = `INVALID_DATE_TIME_SKELETON`, e6[e6.EXPECT_NUMBER_SKELETON = 9] = `EXPECT_NUMBER_SKELETON`, e6[e6.EXPECT_DATE_TIME_SKELETON = 10] = `EXPECT_DATE_TIME_SKELETON`, e6[e6.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = `UNCLOSED_QUOTE_IN_ARGUMENT_STYLE`, e6[e6.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = `EXPECT_SELECT_ARGUMENT_OPTIONS`, e6[e6.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = `EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = `INVALID_PLURAL_ARGUMENT_OFFSET_VALUE`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = `EXPECT_SELECT_ARGUMENT_SELECTOR`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = `EXPECT_PLURAL_ARGUMENT_SELECTOR`, e6[e6.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = `EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = `EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT`, e6[e6.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = `INVALID_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = `DUPLICATE_PLURAL_ARGUMENT_SELECTOR`, e6[e6.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = `DUPLICATE_SELECT_ARGUMENT_SELECTOR`, e6[e6.MISSING_OTHER_CLAUSE = 22] = `MISSING_OTHER_CLAUSE`, e6[e6.INVALID_TAG = 23] = `INVALID_TAG`, e6[e6.INVALID_TAG_NAME = 25] = `INVALID_TAG_NAME`, e6[e6.UNMATCHED_CLOSING_TAG = 26] = `UNMATCHED_CLOSING_TAG`, e6[e6.UNCLOSED_TAG = 27] = `UNCLOSED_TAG`, e6;
|
|
2467
2468
|
}({});
|
|
2468
|
-
function
|
|
2469
|
+
function Li(e6) {
|
|
2469
2470
|
return e6.type === 0;
|
|
2470
2471
|
}
|
|
2471
|
-
function
|
|
2472
|
+
function Ri(e6) {
|
|
2472
2473
|
return e6.type === 1;
|
|
2473
2474
|
}
|
|
2474
|
-
function
|
|
2475
|
+
function zi(e6) {
|
|
2475
2476
|
return e6.type === 2;
|
|
2476
2477
|
}
|
|
2477
|
-
function
|
|
2478
|
+
function Bi(e6) {
|
|
2478
2479
|
return e6.type === 3;
|
|
2479
2480
|
}
|
|
2480
|
-
function
|
|
2481
|
+
function Vi(e6) {
|
|
2481
2482
|
return e6.type === 4;
|
|
2482
2483
|
}
|
|
2483
|
-
function
|
|
2484
|
+
function Hi(e6) {
|
|
2484
2485
|
return e6.type === 5;
|
|
2485
2486
|
}
|
|
2486
|
-
function
|
|
2487
|
+
function Ui(e6) {
|
|
2487
2488
|
return e6.type === 6;
|
|
2488
2489
|
}
|
|
2489
|
-
function
|
|
2490
|
+
function Wi(e6) {
|
|
2490
2491
|
return e6.type === 7;
|
|
2491
2492
|
}
|
|
2492
|
-
function
|
|
2493
|
+
function Gi(e6) {
|
|
2493
2494
|
return e6.type === 8;
|
|
2494
2495
|
}
|
|
2495
|
-
function
|
|
2496
|
+
function Ki(e6) {
|
|
2496
2497
|
return !!(e6 && typeof e6 == `object` && e6.type === 0);
|
|
2497
2498
|
}
|
|
2498
|
-
function
|
|
2499
|
+
function qi(e6) {
|
|
2499
2500
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
2500
2501
|
}
|
|
2501
|
-
var
|
|
2502
|
+
var Ji = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
2502
2503
|
var G = { "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`] };
|
|
2503
|
-
function
|
|
2504
|
+
function Yi(e6, t2) {
|
|
2504
2505
|
let n2 = ``;
|
|
2505
2506
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
2506
2507
|
let i2 = e6.charAt(r2);
|
|
2507
2508
|
if (i2 === `j`) {
|
|
2508
2509
|
let a2 = 0;
|
|
2509
2510
|
for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
|
|
2510
|
-
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 =
|
|
2511
|
+
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = Xi(t2);
|
|
2511
2512
|
for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
|
|
2512
2513
|
for (; o2-- > 0; ) n2 = c2 + n2;
|
|
2513
2514
|
} else n2 += i2 === `J` ? `H` : i2;
|
|
2514
2515
|
}
|
|
2515
2516
|
return n2;
|
|
2516
2517
|
}
|
|
2517
|
-
function
|
|
2518
|
+
function Xi(e6) {
|
|
2518
2519
|
let t2 = e6.hourCycle;
|
|
2519
2520
|
if (t2 === void 0) {
|
|
2520
2521
|
let n3 = e6;
|
|
@@ -2535,34 +2536,34 @@ function Yi(e6) {
|
|
|
2535
2536
|
let n2 = e6.language, r2;
|
|
2536
2537
|
return n2 !== `root` && (r2 = e6.maximize().region), (G[`${n2}-${r2}`] || G[r2 || ``] || G[n2 || ``] || G[`${n2}-001`] || G[`001`])[0].charAt(0);
|
|
2537
2538
|
}
|
|
2538
|
-
var
|
|
2539
|
-
var
|
|
2539
|
+
var Zi = RegExp(`^${Ji.source}*`);
|
|
2540
|
+
var Qi = RegExp(`${Ji.source}*$`);
|
|
2540
2541
|
function K(e6, t2) {
|
|
2541
2542
|
return { start: e6, end: t2 };
|
|
2542
2543
|
}
|
|
2543
|
-
var
|
|
2544
|
-
var
|
|
2545
|
-
var
|
|
2546
|
-
var
|
|
2544
|
+
var $i = !!Object.fromEntries;
|
|
2545
|
+
var ea = !!String.prototype.trimStart;
|
|
2546
|
+
var ta = !!String.prototype.trimEnd;
|
|
2547
|
+
var na = $i ? Object.fromEntries : function(e6) {
|
|
2547
2548
|
let t2 = {};
|
|
2548
2549
|
for (let [n2, r2] of e6) t2[n2] = r2;
|
|
2549
2550
|
return t2;
|
|
2550
2551
|
};
|
|
2551
|
-
var
|
|
2552
|
+
var ra = ea ? function(e6) {
|
|
2552
2553
|
return e6.trimStart();
|
|
2553
2554
|
} : function(e6) {
|
|
2554
|
-
return e6.replace(
|
|
2555
|
+
return e6.replace(Zi, ``);
|
|
2555
2556
|
};
|
|
2556
|
-
var
|
|
2557
|
+
var ia = ta ? function(e6) {
|
|
2557
2558
|
return e6.trimEnd();
|
|
2558
2559
|
} : function(e6) {
|
|
2559
|
-
return e6.replace(
|
|
2560
|
+
return e6.replace(Qi, ``);
|
|
2560
2561
|
};
|
|
2561
|
-
var
|
|
2562
|
-
function
|
|
2563
|
-
return
|
|
2562
|
+
var aa = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
|
|
2563
|
+
function oa(e6, t2) {
|
|
2564
|
+
return aa.lastIndex = t2, aa.exec(e6)[1] ?? ``;
|
|
2564
2565
|
}
|
|
2565
|
-
function
|
|
2566
|
+
function sa(e6) {
|
|
2566
2567
|
if (e6.length === 0) return null;
|
|
2567
2568
|
let t2 = 1, n2 = 1;
|
|
2568
2569
|
for (let r2 = 0; r2 < e6.length; ) {
|
|
@@ -2583,7 +2584,7 @@ function oa(e6) {
|
|
|
2583
2584
|
}
|
|
2584
2585
|
return { offset: e6.length, line: t2, column: n2 };
|
|
2585
2586
|
}
|
|
2586
|
-
var
|
|
2587
|
+
var ca = class {
|
|
2587
2588
|
constructor(e6, t2 = {}) {
|
|
2588
2589
|
this.message = e6, this.position = { offset: 0, line: 1, column: 1 }, this.ignoreTag = !!t2.ignoreTag, this.locale = t2.locale, this.requiresOtherClause = !!t2.requiresOtherClause, this.shouldParseSkeletons = !!t2.shouldParseSkeletons;
|
|
2589
2590
|
}
|
|
@@ -2592,7 +2593,7 @@ var sa = class {
|
|
|
2592
2593
|
if (this.message.length > 0) {
|
|
2593
2594
|
let e6 = this.message.charCodeAt(0);
|
|
2594
2595
|
if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
|
|
2595
|
-
let e7 =
|
|
2596
|
+
let e7 = sa(this.message);
|
|
2596
2597
|
if (e7) {
|
|
2597
2598
|
let t2 = this.clonePosition();
|
|
2598
2599
|
return this.position = e7, { val: [{ type: 0, value: this.message, location: K(t2, this.clonePosition()) }], err: null };
|
|
@@ -2616,7 +2617,7 @@ var sa = class {
|
|
|
2616
2617
|
} else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
2617
2618
|
if (n2) break;
|
|
2618
2619
|
return this.error(26, K(this.clonePosition(), this.clonePosition()));
|
|
2619
|
-
} else if (i2 === 60 && !this.ignoreTag &&
|
|
2620
|
+
} else if (i2 === 60 && !this.ignoreTag && la(this.peek() || 0)) {
|
|
2620
2621
|
let n3 = this.parseTag(e6, t2);
|
|
2621
2622
|
if (n3.err) return n3;
|
|
2622
2623
|
r2.push(n3.val);
|
|
@@ -2638,7 +2639,7 @@ var sa = class {
|
|
|
2638
2639
|
if (i2.err) return i2;
|
|
2639
2640
|
let a2 = i2.val, o2 = this.clonePosition();
|
|
2640
2641
|
if (this.bumpIf(`</`)) {
|
|
2641
|
-
if (this.isEOF() || !
|
|
2642
|
+
if (this.isEOF() || !la(this.char())) return this.error(23, K(o2, this.clonePosition()));
|
|
2642
2643
|
let e7 = this.clonePosition();
|
|
2643
2644
|
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: K(n2, this.clonePosition()) }, err: null } : this.error(23, K(o2, this.clonePosition()))) : this.error(26, K(e7, this.clonePosition()));
|
|
2644
2645
|
}
|
|
@@ -2648,7 +2649,7 @@ var sa = class {
|
|
|
2648
2649
|
}
|
|
2649
2650
|
parseTagName() {
|
|
2650
2651
|
let e6 = this.offset();
|
|
2651
|
-
for (this.bump(); !this.isEOF() &&
|
|
2652
|
+
for (this.bump(); !this.isEOF() && da(this.char()); ) this.bump();
|
|
2652
2653
|
return this.message.slice(e6, this.offset());
|
|
2653
2654
|
}
|
|
2654
2655
|
parseLiteral(e6, t2) {
|
|
@@ -2672,7 +2673,7 @@ var sa = class {
|
|
|
2672
2673
|
return { val: { type: 0, value: r2, location: i2 }, err: null };
|
|
2673
2674
|
}
|
|
2674
2675
|
tryParseLeftAngleBracket() {
|
|
2675
|
-
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !
|
|
2676
|
+
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !ua(this.peek() || 0)) ? (this.bump(), `<`) : null;
|
|
2676
2677
|
}
|
|
2677
2678
|
tryParseQuote(e6) {
|
|
2678
2679
|
if (this.isEOF() || this.char() !== 39) return null;
|
|
@@ -2727,7 +2728,7 @@ var sa = class {
|
|
|
2727
2728
|
}
|
|
2728
2729
|
}
|
|
2729
2730
|
parseIdentifierIfPossible() {
|
|
2730
|
-
let e6 = this.clonePosition(), t2 = this.offset(), n2 =
|
|
2731
|
+
let e6 = this.clonePosition(), t2 = this.offset(), n2 = oa(this.message, t2), r2 = t2 + n2.length;
|
|
2731
2732
|
return this.bumpTo(r2), { value: n2, location: K(e6, this.clonePosition()) };
|
|
2732
2733
|
}
|
|
2733
2734
|
parseArgumentOptions(e6, t2, n2, r2) {
|
|
@@ -2744,7 +2745,7 @@ var sa = class {
|
|
|
2744
2745
|
this.bumpSpace();
|
|
2745
2746
|
let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
|
|
2746
2747
|
if (n3.err) return n3;
|
|
2747
|
-
let r3 =
|
|
2748
|
+
let r3 = ia(n3.val);
|
|
2748
2749
|
if (r3.length === 0) return this.error(6, K(this.clonePosition(), this.clonePosition()));
|
|
2749
2750
|
e7 = { style: r3, styleLocation: K(t4, this.clonePosition()) };
|
|
2750
2751
|
}
|
|
@@ -2752,7 +2753,7 @@ var sa = class {
|
|
|
2752
2753
|
if (t3.err) return t3;
|
|
2753
2754
|
let i3 = K(r2, this.clonePosition());
|
|
2754
2755
|
if (e7 && e7.style.startsWith(`::`)) {
|
|
2755
|
-
let t4 =
|
|
2756
|
+
let t4 = ra(e7.style.slice(2));
|
|
2756
2757
|
if (a2 === `number`) {
|
|
2757
2758
|
let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
|
|
2758
2759
|
return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
|
|
@@ -2760,8 +2761,8 @@ var sa = class {
|
|
|
2760
2761
|
{
|
|
2761
2762
|
if (t4.length === 0) return this.error(10, i3);
|
|
2762
2763
|
let r3 = t4;
|
|
2763
|
-
this.locale && (r3 =
|
|
2764
|
-
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ?
|
|
2764
|
+
this.locale && (r3 = Yi(t4, this.locale));
|
|
2765
|
+
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Ci(r3) : {} };
|
|
2765
2766
|
return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
|
|
2766
2767
|
}
|
|
2767
2768
|
}
|
|
@@ -2786,7 +2787,7 @@ var sa = class {
|
|
|
2786
2787
|
let l2 = this.tryParseArgumentClose(r2);
|
|
2787
2788
|
if (l2.err) return l2;
|
|
2788
2789
|
let u2 = K(r2, this.clonePosition());
|
|
2789
|
-
return a2 === `select` ? { val: { type: 5, value: n2, options:
|
|
2790
|
+
return a2 === `select` ? { val: { type: 5, value: n2, options: na(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: na(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
|
|
2790
2791
|
}
|
|
2791
2792
|
default:
|
|
2792
2793
|
return this.error(5, K(i2, o2));
|
|
@@ -2820,11 +2821,11 @@ var sa = class {
|
|
|
2820
2821
|
parseNumberSkeletonFromString(e6, t2) {
|
|
2821
2822
|
let n2 = [];
|
|
2822
2823
|
try {
|
|
2823
|
-
n2 =
|
|
2824
|
+
n2 = Ti(e6);
|
|
2824
2825
|
} catch {
|
|
2825
2826
|
return this.error(7, t2);
|
|
2826
2827
|
}
|
|
2827
|
-
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ?
|
|
2828
|
+
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Fi(n2) : {} }, err: null };
|
|
2828
2829
|
}
|
|
2829
2830
|
tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
|
|
2830
2831
|
let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
|
|
@@ -2906,7 +2907,7 @@ var sa = class {
|
|
|
2906
2907
|
}
|
|
2907
2908
|
}
|
|
2908
2909
|
bumpSpace() {
|
|
2909
|
-
for (; !this.isEOF() &&
|
|
2910
|
+
for (; !this.isEOF() && fa(this.char()); ) this.bump();
|
|
2910
2911
|
}
|
|
2911
2912
|
peek() {
|
|
2912
2913
|
if (this.isEOF()) return null;
|
|
@@ -2914,34 +2915,34 @@ var sa = class {
|
|
|
2914
2915
|
return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
|
|
2915
2916
|
}
|
|
2916
2917
|
};
|
|
2917
|
-
function ca(e6) {
|
|
2918
|
-
return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
|
|
2919
|
-
}
|
|
2920
2918
|
function la(e6) {
|
|
2921
|
-
return
|
|
2919
|
+
return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
|
|
2922
2920
|
}
|
|
2923
2921
|
function ua(e6) {
|
|
2924
|
-
return e6
|
|
2922
|
+
return la(e6) || e6 === 47;
|
|
2925
2923
|
}
|
|
2926
2924
|
function da(e6) {
|
|
2927
|
-
return e6 >=
|
|
2925
|
+
return e6 === 45 || e6 === 46 || e6 >= 48 && e6 <= 57 || e6 === 95 || e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90 || e6 == 183 || e6 >= 192 && e6 <= 214 || e6 >= 216 && e6 <= 246 || e6 >= 248 && e6 <= 893 || e6 >= 895 && e6 <= 8191 || e6 >= 8204 && e6 <= 8205 || e6 >= 8255 && e6 <= 8256 || e6 >= 8304 && e6 <= 8591 || e6 >= 11264 && e6 <= 12271 || e6 >= 12289 && e6 <= 55295 || e6 >= 63744 && e6 <= 64975 || e6 >= 65008 && e6 <= 65533 || e6 >= 65536 && e6 <= 983039;
|
|
2928
2926
|
}
|
|
2929
2927
|
function fa(e6) {
|
|
2928
|
+
return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
|
|
2929
|
+
}
|
|
2930
|
+
function pa(e6) {
|
|
2930
2931
|
e6.forEach((e7) => {
|
|
2931
|
-
if (delete e7.location,
|
|
2932
|
-
else
|
|
2932
|
+
if (delete e7.location, Hi(e7) || Ui(e7)) for (let t2 in e7.options) delete e7.options[t2].location, pa(e7.options[t2].value);
|
|
2933
|
+
else zi(e7) && Ki(e7.style) || (Bi(e7) || Vi(e7)) && qi(e7.style) ? delete e7.style.location : Gi(e7) && pa(e7.children);
|
|
2933
2934
|
});
|
|
2934
2935
|
}
|
|
2935
|
-
function
|
|
2936
|
+
function ma(e6, t2 = {}) {
|
|
2936
2937
|
t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
|
|
2937
|
-
let n2 = new
|
|
2938
|
+
let n2 = new ca(e6, t2).parse();
|
|
2938
2939
|
if (n2.err) {
|
|
2939
|
-
let e7 = SyntaxError(
|
|
2940
|
+
let e7 = SyntaxError(Ii[n2.err.kind]);
|
|
2940
2941
|
throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
|
|
2941
2942
|
}
|
|
2942
|
-
return t2?.captureLocation ||
|
|
2943
|
+
return t2?.captureLocation || pa(n2.val), n2.val;
|
|
2943
2944
|
}
|
|
2944
|
-
var
|
|
2945
|
+
var ha = class extends Error {
|
|
2945
2946
|
constructor(e6, t2, n2) {
|
|
2946
2947
|
super(e6), this.code = t2, this.originalMessage = n2;
|
|
2947
2948
|
}
|
|
@@ -2949,54 +2950,54 @@ var ma = class extends Error {
|
|
|
2949
2950
|
return `[formatjs Error: ${this.code}] ${this.message}`;
|
|
2950
2951
|
}
|
|
2951
2952
|
};
|
|
2952
|
-
var
|
|
2953
|
+
var ga = class extends ha {
|
|
2953
2954
|
constructor(e6, t2, n2, r2) {
|
|
2954
2955
|
super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
|
|
2955
2956
|
}
|
|
2956
2957
|
};
|
|
2957
|
-
var
|
|
2958
|
+
var _a = class extends ha {
|
|
2958
2959
|
constructor(e6, t2, n2) {
|
|
2959
2960
|
super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
|
|
2960
2961
|
}
|
|
2961
2962
|
};
|
|
2962
|
-
var
|
|
2963
|
+
var va = class extends ha {
|
|
2963
2964
|
constructor(e6, t2) {
|
|
2964
2965
|
super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
|
|
2965
2966
|
}
|
|
2966
2967
|
};
|
|
2967
|
-
function
|
|
2968
|
+
function ya(e6) {
|
|
2968
2969
|
return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
|
|
2969
2970
|
let n2 = e7[e7.length - 1];
|
|
2970
2971
|
return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
|
|
2971
2972
|
}, []);
|
|
2972
2973
|
}
|
|
2973
|
-
function
|
|
2974
|
+
function ba(e6) {
|
|
2974
2975
|
return typeof e6 == `function`;
|
|
2975
2976
|
}
|
|
2976
|
-
function
|
|
2977
|
-
if (e6.length === 1 &&
|
|
2977
|
+
function xa(e6, t2, n2, r2, i2, a2, o2) {
|
|
2978
|
+
if (e6.length === 1 && Li(e6[0])) return [{ type: 0, value: e6[0].value }];
|
|
2978
2979
|
let s2 = [];
|
|
2979
2980
|
for (let c2 of e6) {
|
|
2980
|
-
if (
|
|
2981
|
+
if (Li(c2)) {
|
|
2981
2982
|
s2.push({ type: 0, value: c2.value });
|
|
2982
2983
|
continue;
|
|
2983
2984
|
}
|
|
2984
|
-
if (
|
|
2985
|
+
if (Wi(c2)) {
|
|
2985
2986
|
typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
|
|
2986
2987
|
continue;
|
|
2987
2988
|
}
|
|
2988
2989
|
let { value: e7 } = c2;
|
|
2989
|
-
if (!(i2 && e7 in i2)) throw new
|
|
2990
|
+
if (!(i2 && e7 in i2)) throw new va(e7, o2);
|
|
2990
2991
|
let l2 = i2[e7];
|
|
2991
|
-
if (
|
|
2992
|
-
else if (
|
|
2993
|
-
let e8 = typeof c2.style == `string` ? r2.date[c2.style] :
|
|
2992
|
+
if (Ri(c2)) (!l2 || typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint`) && (l2 = typeof l2 == `string` || typeof l2 == `number` || typeof l2 == `bigint` ? String(l2) : ``), s2.push({ type: typeof l2 == `string` ? 0 : 1, value: l2 });
|
|
2993
|
+
else if (Bi(c2)) {
|
|
2994
|
+
let e8 = typeof c2.style == `string` ? r2.date[c2.style] : qi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
2994
2995
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
2995
|
-
} else if (
|
|
2996
|
-
let e8 = typeof c2.style == `string` ? r2.time[c2.style] :
|
|
2996
|
+
} else if (Vi(c2)) {
|
|
2997
|
+
let e8 = typeof c2.style == `string` ? r2.time[c2.style] : qi(c2.style) ? c2.style.parsedOptions : r2.time.medium;
|
|
2997
2998
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
2998
|
-
} else if (
|
|
2999
|
-
let e8 = typeof c2.style == `string` ? r2.number[c2.style] :
|
|
2999
|
+
} else if (zi(c2)) {
|
|
3000
|
+
let e8 = typeof c2.style == `string` ? r2.number[c2.style] : Ki(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3000
3001
|
if (e8 && e8.scale) {
|
|
3001
3002
|
let t3 = e8.scale || 1;
|
|
3002
3003
|
if (typeof l2 == `bigint`) {
|
|
@@ -3006,40 +3007,40 @@ function ba(e6, t2, n2, r2, i2, a2, o2) {
|
|
|
3006
3007
|
}
|
|
3007
3008
|
s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
|
|
3008
3009
|
} else {
|
|
3009
|
-
if (
|
|
3010
|
+
if (Gi(c2)) {
|
|
3010
3011
|
let { children: e8, value: l3 } = c2, u2 = i2[l3];
|
|
3011
|
-
if (!
|
|
3012
|
-
let d2 = u2(
|
|
3012
|
+
if (!ba(u2)) throw new _a(l3, `function`, o2);
|
|
3013
|
+
let d2 = u2(xa(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
|
|
3013
3014
|
Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
|
|
3014
3015
|
}
|
|
3015
|
-
if (
|
|
3016
|
+
if (Hi(c2)) {
|
|
3016
3017
|
let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
|
|
3017
|
-
if (!a3) throw new
|
|
3018
|
-
s2.push(...
|
|
3019
|
-
} else if (
|
|
3018
|
+
if (!a3) throw new ga(c2.value, l2, Object.keys(c2.options), o2);
|
|
3019
|
+
s2.push(...xa(a3.value, t2, n2, r2, i2));
|
|
3020
|
+
} else if (Ui(c2)) {
|
|
3020
3021
|
let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
|
|
3021
3022
|
if (!a3) {
|
|
3022
|
-
if (!Intl.PluralRules) throw new
|
|
3023
|
+
if (!Intl.PluralRules) throw new ha(`Intl.PluralRules is not available in this environment.
|
|
3023
3024
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3024
3025
|
`, `MISSING_INTL_API`, o2);
|
|
3025
3026
|
let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
|
|
3026
3027
|
a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
|
|
3027
3028
|
}
|
|
3028
|
-
if (!a3) throw new
|
|
3029
|
+
if (!a3) throw new ga(c2.value, l2, Object.keys(c2.options), o2);
|
|
3029
3030
|
let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
|
|
3030
|
-
s2.push(...
|
|
3031
|
+
s2.push(...xa(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
|
|
3031
3032
|
}
|
|
3032
3033
|
}
|
|
3033
3034
|
}
|
|
3034
|
-
return
|
|
3035
|
+
return ya(s2);
|
|
3035
3036
|
}
|
|
3036
|
-
function
|
|
3037
|
+
function Sa(e6, t2) {
|
|
3037
3038
|
return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
|
|
3038
3039
|
}
|
|
3039
|
-
function
|
|
3040
|
-
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] =
|
|
3040
|
+
function Ca(e6, t2) {
|
|
3041
|
+
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Sa(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
|
|
3041
3042
|
}
|
|
3042
|
-
function
|
|
3043
|
+
function wa(e6) {
|
|
3043
3044
|
return { create() {
|
|
3044
3045
|
return { get(t2) {
|
|
3045
3046
|
return e6[t2];
|
|
@@ -3048,23 +3049,23 @@ function Ca(e6) {
|
|
|
3048
3049
|
} };
|
|
3049
3050
|
} };
|
|
3050
3051
|
}
|
|
3051
|
-
function
|
|
3052
|
-
return { getNumberFormat:
|
|
3052
|
+
function Ta(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
|
|
3053
|
+
return { getNumberFormat: ui((...e7) => new Intl.NumberFormat(...e7), { cache: wa(e6.number), strategy: xi.variadic }), getDateTimeFormat: ui((...e7) => new Intl.DateTimeFormat(...e7), { cache: wa(e6.dateTime), strategy: xi.variadic }), getPluralRules: ui((...e7) => new Intl.PluralRules(...e7), { cache: wa(e6.pluralRules), strategy: xi.variadic }) };
|
|
3053
3054
|
}
|
|
3054
|
-
var
|
|
3055
|
+
var Ea = class e5 {
|
|
3055
3056
|
constructor(t2, n2 = e5.defaultLocale, r2, i2) {
|
|
3056
3057
|
if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
|
|
3057
3058
|
let t3 = this.formatToParts(e6);
|
|
3058
3059
|
if (t3.length === 1) return t3[0].value;
|
|
3059
3060
|
let n3 = t3.reduce((e7, t4) => (!e7.length || t4.type !== 0 || typeof e7[e7.length - 1] != `string` ? e7.push(t4.value) : e7[e7.length - 1] += t4.value, e7), []);
|
|
3060
3061
|
return n3.length <= 1 ? n3[0] || `` : n3;
|
|
3061
|
-
}, this.formatToParts = (e6) =>
|
|
3062
|
+
}, this.formatToParts = (e6) => xa(this.ast, this.locales, this.formatters, this.formats, e6, void 0, this.message), this.resolvedOptions = () => ({ locale: this.resolvedLocale?.toString() || Intl.NumberFormat.supportedLocalesOf(this.locales)[0] }), this.getAst = () => this.ast, this.locales = n2, this.resolvedLocale = e5.resolveLocale(n2), typeof t2 == `string`) {
|
|
3062
3063
|
if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
3063
3064
|
let { ...n3 } = i2 || {};
|
|
3064
3065
|
this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
|
|
3065
3066
|
} else this.ast = t2;
|
|
3066
3067
|
if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
|
|
3067
|
-
this.formats =
|
|
3068
|
+
this.formats = Ca(e5.formats, r2), this.formatters = i2 && i2.formatters || Ta(this.formatterCache);
|
|
3068
3069
|
}
|
|
3069
3070
|
static {
|
|
3070
3071
|
this.memoizedDefaultLocale = null;
|
|
@@ -3080,14 +3081,14 @@ var Ta = class e5 {
|
|
|
3080
3081
|
};
|
|
3081
3082
|
}
|
|
3082
3083
|
static {
|
|
3083
|
-
this.__parse =
|
|
3084
|
+
this.__parse = ma;
|
|
3084
3085
|
}
|
|
3085
3086
|
static {
|
|
3086
3087
|
this.formats = { number: { integer: { maximumFractionDigits: 0 }, currency: { style: `currency` }, percent: { style: `percent` } }, date: { short: { month: `numeric`, day: `numeric`, year: `2-digit` }, medium: { month: `short`, day: `numeric`, year: `numeric` }, long: { month: `long`, day: `numeric`, year: `numeric` }, full: { weekday: `long`, month: `long`, day: `numeric`, year: `numeric` } }, time: { short: { hour: `numeric`, minute: `numeric` }, medium: { hour: `numeric`, minute: `numeric`, second: `numeric` }, long: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` }, full: { hour: `numeric`, minute: `numeric`, second: `numeric`, timeZoneName: `short` } } };
|
|
3087
3088
|
}
|
|
3088
3089
|
};
|
|
3089
|
-
var
|
|
3090
|
-
function
|
|
3090
|
+
var Da = [`__proto__`, `constructor`, `prototype`];
|
|
3091
|
+
function Oa(e6, t2, n2) {
|
|
3091
3092
|
function r2(e7) {
|
|
3092
3093
|
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
3093
3094
|
}
|
|
@@ -3097,49 +3098,49 @@ function Da(e6, t2, n2) {
|
|
|
3097
3098
|
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
3098
3099
|
if (i2()) return {};
|
|
3099
3100
|
var o2 = r2(a2.shift());
|
|
3100
|
-
if (
|
|
3101
|
+
if (Da.indexOf(o2) > -1) return {};
|
|
3101
3102
|
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
3102
3103
|
}
|
|
3103
3104
|
if (i2()) return {};
|
|
3104
3105
|
var s2 = r2(a2.shift());
|
|
3105
|
-
return
|
|
3106
|
+
return Da.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
3106
3107
|
}
|
|
3107
|
-
function
|
|
3108
|
-
var r2 =
|
|
3108
|
+
function ka(e6, t2, n2) {
|
|
3109
|
+
var r2 = Oa(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
3109
3110
|
i2 !== void 0 && (i2[a2] = n2);
|
|
3110
3111
|
}
|
|
3111
|
-
function
|
|
3112
|
-
var n2 =
|
|
3112
|
+
function Aa(e6, t2) {
|
|
3113
|
+
var n2 = Oa(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
3113
3114
|
if (r2) return r2[i2];
|
|
3114
3115
|
}
|
|
3115
|
-
function
|
|
3116
|
+
function ja(e6) {
|
|
3116
3117
|
return [...arguments].slice(1).forEach(function(t2) {
|
|
3117
3118
|
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
3118
3119
|
var i2 = r2[n2];
|
|
3119
|
-
|
|
3120
|
+
Da.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
3120
3121
|
}
|
|
3121
3122
|
}), e6;
|
|
3122
3123
|
}
|
|
3123
|
-
function
|
|
3124
|
-
return
|
|
3124
|
+
function Ma(e6, t2) {
|
|
3125
|
+
return La(e6) || Ia(e6, t2) || Pa(e6, t2) || Na();
|
|
3125
3126
|
}
|
|
3126
|
-
function
|
|
3127
|
+
function Na() {
|
|
3127
3128
|
throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3128
3129
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3129
3130
|
}
|
|
3130
|
-
function
|
|
3131
|
+
function Pa(e6, t2) {
|
|
3131
3132
|
if (e6) {
|
|
3132
|
-
if (typeof e6 == `string`) return
|
|
3133
|
+
if (typeof e6 == `string`) return Fa(e6, t2);
|
|
3133
3134
|
var n2 = {}.toString.call(e6).slice(8, -1);
|
|
3134
|
-
return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ?
|
|
3135
|
+
return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ? Fa(e6, t2) : void 0;
|
|
3135
3136
|
}
|
|
3136
3137
|
}
|
|
3137
|
-
function
|
|
3138
|
+
function Fa(e6, t2) {
|
|
3138
3139
|
(t2 == null || t2 > e6.length) && (t2 = e6.length);
|
|
3139
3140
|
for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
|
|
3140
3141
|
return r2;
|
|
3141
3142
|
}
|
|
3142
|
-
function
|
|
3143
|
+
function Ia(e6, t2) {
|
|
3143
3144
|
var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
|
|
3144
3145
|
if (n2 != null) {
|
|
3145
3146
|
var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
|
|
@@ -3160,10 +3161,10 @@ function Fa(e6, t2) {
|
|
|
3160
3161
|
return s2;
|
|
3161
3162
|
}
|
|
3162
3163
|
}
|
|
3163
|
-
function
|
|
3164
|
+
function La(e6) {
|
|
3164
3165
|
if (Array.isArray(e6)) return e6;
|
|
3165
3166
|
}
|
|
3166
|
-
function
|
|
3167
|
+
function Ra(e6, t2) {
|
|
3167
3168
|
var n2 = Object.keys(e6);
|
|
3168
3169
|
if (Object.getOwnPropertySymbols) {
|
|
3169
3170
|
var r2 = Object.getOwnPropertySymbols(e6);
|
|
@@ -3173,37 +3174,37 @@ function La(e6, t2) {
|
|
|
3173
3174
|
}
|
|
3174
3175
|
return n2;
|
|
3175
3176
|
}
|
|
3176
|
-
function
|
|
3177
|
+
function za(e6) {
|
|
3177
3178
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
3178
3179
|
var n2 = arguments[t2] == null ? {} : arguments[t2];
|
|
3179
|
-
t2 % 2 ?
|
|
3180
|
-
|
|
3181
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) :
|
|
3180
|
+
t2 % 2 ? Ra(Object(n2), true).forEach(function(t3) {
|
|
3181
|
+
Ba(e6, t3, n2[t3]);
|
|
3182
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : Ra(Object(n2)).forEach(function(t3) {
|
|
3182
3183
|
Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
|
|
3183
3184
|
});
|
|
3184
3185
|
}
|
|
3185
3186
|
return e6;
|
|
3186
3187
|
}
|
|
3187
|
-
function
|
|
3188
|
-
return (t2 =
|
|
3188
|
+
function Ba(e6, t2, n2) {
|
|
3189
|
+
return (t2 = Wa(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
|
|
3189
3190
|
}
|
|
3190
|
-
function
|
|
3191
|
+
function Va(e6, t2) {
|
|
3191
3192
|
if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
|
|
3192
3193
|
}
|
|
3193
|
-
function
|
|
3194
|
+
function Ha(e6, t2) {
|
|
3194
3195
|
for (var n2 = 0; n2 < t2.length; n2++) {
|
|
3195
3196
|
var r2 = t2[n2];
|
|
3196
|
-
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6,
|
|
3197
|
+
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, Wa(r2.key), r2);
|
|
3197
3198
|
}
|
|
3198
3199
|
}
|
|
3199
|
-
function
|
|
3200
|
-
return t2 &&
|
|
3200
|
+
function Ua(e6, t2, n2) {
|
|
3201
|
+
return t2 && Ha(e6.prototype, t2), n2 && Ha(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
|
|
3201
3202
|
}
|
|
3202
|
-
function
|
|
3203
|
-
var t2 =
|
|
3203
|
+
function Wa(e6) {
|
|
3204
|
+
var t2 = Ga(e6, `string`);
|
|
3204
3205
|
return q(t2) == `symbol` ? t2 : t2 + ``;
|
|
3205
3206
|
}
|
|
3206
|
-
function
|
|
3207
|
+
function Ga(e6, t2) {
|
|
3207
3208
|
if (q(e6) != `object` || !e6) return e6;
|
|
3208
3209
|
var n2 = e6[Symbol.toPrimitive];
|
|
3209
3210
|
if (n2 !== void 0) {
|
|
@@ -3221,53 +3222,53 @@ function q(e6) {
|
|
|
3221
3222
|
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3222
3223
|
}, q(e6);
|
|
3223
3224
|
}
|
|
3224
|
-
var
|
|
3225
|
-
var
|
|
3226
|
-
function
|
|
3225
|
+
var Ka = `https://www.i18next.com/how-to/using-icu-or-mf2`;
|
|
3226
|
+
var qa = [`zero`, `one`, `two`, `few`, `many`, `other`];
|
|
3227
|
+
function Ja() {
|
|
3227
3228
|
return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
|
|
3228
3229
|
return n2;
|
|
3229
3230
|
}, parseLngForICU: function(e6) {
|
|
3230
3231
|
return e6;
|
|
3231
3232
|
}, escapeVariables: false };
|
|
3232
3233
|
}
|
|
3233
|
-
function
|
|
3234
|
+
function Ya(e6, t2, n2, r2) {
|
|
3234
3235
|
return n2 && t2 && q(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}`;
|
|
3235
3236
|
}
|
|
3236
|
-
var
|
|
3237
|
+
var Xa = function() {
|
|
3237
3238
|
function e6(t2) {
|
|
3238
|
-
|
|
3239
|
+
Va(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
|
|
3239
3240
|
}
|
|
3240
|
-
return
|
|
3241
|
+
return Ua(e6, [{ key: `init`, value: function(e7, t2) {
|
|
3241
3242
|
var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
|
|
3242
|
-
if (this.options =
|
|
3243
|
+
if (this.options = ja(r2, t2, this.options || {}, Ja()), this.formats = this.options.formats, e7) {
|
|
3243
3244
|
var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
|
|
3244
|
-
e7.IntlMessageFormat =
|
|
3245
|
+
e7.IntlMessageFormat = Ea, e7.ICU = this, this.i18next = e7, this.debug = !!(e7.options && e7.options.debug), this.debug && e7.options.interpolation && e7.options.interpolation.escapeValue !== false && !this.options.escapeVariables && this.warn(`interpolation.escapeValue is not applied, values are inserted without HTML escaping. Set the i18next-icu option escapeVariables: true to escape them, or interpolation.escapeValue: false if your output is escaped elsewhere (e.g. by React).`), s2 && (a2 && e7.on(a2, function() {
|
|
3245
3246
|
return n2.clearCache();
|
|
3246
3247
|
}), o2 && e7.store.on(o2, function() {
|
|
3247
3248
|
return n2.clearCache();
|
|
3248
3249
|
}));
|
|
3249
3250
|
}
|
|
3250
3251
|
} }, { key: `addUserDefinedFormats`, value: function(e7) {
|
|
3251
|
-
this.formats = this.formats ?
|
|
3252
|
+
this.formats = this.formats ? za(za({}, this.formats), e7) : e7, this.clearCache();
|
|
3252
3253
|
} }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
|
|
3253
3254
|
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && [n2, r2, i2], c2;
|
|
3254
3255
|
if (this.options.memoize) {
|
|
3255
|
-
var l2 =
|
|
3256
|
+
var l2 = Aa(this.mem, s2);
|
|
3256
3257
|
l2 && l2.res === e7 && (c2 = l2.fc);
|
|
3257
3258
|
}
|
|
3258
3259
|
try {
|
|
3259
|
-
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
|
|
3260
|
-
var u2 = t2 && t2.replace && q(t2.replace) === `object` ?
|
|
3260
|
+
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 Ea(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && ka(this.mem, s2, { res: e7, fc: c2 }));
|
|
3261
|
+
var u2 = t2 && t2.replace && q(t2.replace) === `object` ? za(za({}, t2), t2.replace) : t2;
|
|
3261
3262
|
return c2.format(this.escapeVariableValues(u2));
|
|
3262
3263
|
} catch (a3) {
|
|
3263
|
-
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(
|
|
3264
|
+
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(Ya(a3, e7, !c2, `key "${i2}" (${n2}/${r2})`)), this.options.parseErrorHandler(a3, i2, e7, t2);
|
|
3264
3265
|
}
|
|
3265
3266
|
} }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
|
|
3266
3267
|
return this.debug && i2 && this.checkSuffixKeys(t2, n2, r2, i2), e7;
|
|
3267
3268
|
} }, { key: `checkSuffixKeys`, value: function(e7, t2, n2, r2) {
|
|
3268
3269
|
var i2 = r2.count, a2 = r2.context, o2 = this.i18next.options, s2 = o2.pluralSeparator, c2 = s2 === void 0 ? `_` : s2, l2 = o2.contextSeparator, u2 = l2 === void 0 ? `_` : l2, d2 = this.i18next.services.resourceStore, f2 = `key "${e7}" (${t2}/${n2})`;
|
|
3269
3270
|
if (i2 !== void 0 && this.firstTime(`plural ${t2} ${n2} ${e7}`)) {
|
|
3270
|
-
var p2 =
|
|
3271
|
+
var p2 = qa.concat(qa.map(function(e8) {
|
|
3271
3272
|
return `ordinal${c2}${e8}`;
|
|
3272
3273
|
})).map(function(t3) {
|
|
3273
3274
|
return `${e7}${c2}${t3}`;
|
|
@@ -3281,33 +3282,33 @@ var Ya = function() {
|
|
|
3281
3282
|
} }, { key: `firstTime`, value: function(e7) {
|
|
3282
3283
|
return !this.warned.has(e7) && (this.warned.add(e7), true);
|
|
3283
3284
|
} }, { key: `warn`, value: function(e7) {
|
|
3284
|
-
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${
|
|
3285
|
+
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${Ka}`);
|
|
3285
3286
|
} }, { key: `clearCache`, value: function() {
|
|
3286
3287
|
this.mem = {};
|
|
3287
3288
|
} }, { key: `escapeVariableValues`, value: function(e7) {
|
|
3288
3289
|
if (!this.options.escapeVariables || !e7 || q(e7) !== `object`) return e7;
|
|
3289
3290
|
for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
|
|
3290
|
-
var i2 =
|
|
3291
|
+
var i2 = Ma(r2[n2], 2), a2 = i2[0], o2 = i2[1];
|
|
3291
3292
|
t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`) : o2;
|
|
3292
3293
|
}
|
|
3293
3294
|
return t2;
|
|
3294
3295
|
} }]), e6;
|
|
3295
3296
|
}();
|
|
3296
|
-
|
|
3297
|
-
function
|
|
3297
|
+
Xa.type = `i18nFormat`;
|
|
3298
|
+
function Za({ icuOptions: e6 = {}, ...t2 }) {
|
|
3298
3299
|
let { parseErrorHandler: n2 = void 0 } = t2;
|
|
3299
|
-
return
|
|
3300
|
+
return li(t2, { icu: new Xa({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
|
|
3300
3301
|
}
|
|
3301
|
-
var
|
|
3302
|
+
var Qa = (e6, t2, n2, r2) => {
|
|
3302
3303
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
3303
3304
|
if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
|
|
3304
3305
|
J(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
|
|
3305
3306
|
};
|
|
3306
|
-
var
|
|
3307
|
-
var
|
|
3308
|
-
J(n2) &&
|
|
3307
|
+
var $a = {};
|
|
3308
|
+
var eo = (e6, t2, n2, r2) => {
|
|
3309
|
+
J(n2) && $a[n2] || (J(n2) && ($a[n2] = /* @__PURE__ */ new Date()), Qa(e6, t2, n2, r2));
|
|
3309
3310
|
};
|
|
3310
|
-
var
|
|
3311
|
+
var to = (e6, t2) => () => {
|
|
3311
3312
|
if (e6.isInitialized) t2();
|
|
3312
3313
|
else {
|
|
3313
3314
|
let n2 = () => {
|
|
@@ -3318,29 +3319,29 @@ var eo = (e6, t2) => () => {
|
|
|
3318
3319
|
e6.on(`initialized`, n2);
|
|
3319
3320
|
}
|
|
3320
3321
|
};
|
|
3321
|
-
var
|
|
3322
|
-
e6.loadNamespaces(t2,
|
|
3322
|
+
var no = (e6, t2, n2) => {
|
|
3323
|
+
e6.loadNamespaces(t2, to(e6, n2));
|
|
3323
3324
|
};
|
|
3324
|
-
var
|
|
3325
|
-
if (J(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return
|
|
3325
|
+
var ro = (e6, t2, n2, r2) => {
|
|
3326
|
+
if (J(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return no(e6, n2, r2);
|
|
3326
3327
|
n2.forEach((t3) => {
|
|
3327
3328
|
e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
|
|
3328
|
-
}), e6.loadLanguages(t2,
|
|
3329
|
+
}), e6.loadLanguages(t2, to(e6, r2));
|
|
3329
3330
|
};
|
|
3330
|
-
var
|
|
3331
|
+
var io = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (eo(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
|
|
3331
3332
|
if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
|
|
3332
3333
|
} });
|
|
3333
3334
|
var J = (e6) => typeof e6 == `string`;
|
|
3334
|
-
var
|
|
3335
|
-
var
|
|
3336
|
-
var
|
|
3337
|
-
var
|
|
3338
|
-
var
|
|
3339
|
-
var
|
|
3340
|
-
var
|
|
3341
|
-
var
|
|
3342
|
-
var
|
|
3343
|
-
var
|
|
3335
|
+
var ao = (e6) => typeof e6 == `object` && !!e6;
|
|
3336
|
+
var oo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
3337
|
+
var so = { "&": `&`, "&": `&`, "<": `<`, "<": `<`, ">": `>`, ">": `>`, "'": `'`, "'": `'`, """: `"`, """: `"`, " ": ` `, " ": ` `, "©": `\xA9`, "©": `\xA9`, "®": `\xAE`, "®": `\xAE`, "…": `\u2026`, "…": `\u2026`, "/": `/`, "/": `/` };
|
|
3338
|
+
var co = (e6) => so[e6];
|
|
3339
|
+
var lo = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(oo, co) };
|
|
3340
|
+
var uo = () => lo;
|
|
3341
|
+
var fo;
|
|
3342
|
+
var po = () => fo;
|
|
3343
|
+
var mo = i();
|
|
3344
|
+
var ho = class {
|
|
3344
3345
|
constructor() {
|
|
3345
3346
|
this.usedNamespaces = {};
|
|
3346
3347
|
}
|
|
@@ -3353,32 +3354,32 @@ var mo = class {
|
|
|
3353
3354
|
return Object.keys(this.usedNamespaces);
|
|
3354
3355
|
}
|
|
3355
3356
|
};
|
|
3356
|
-
var
|
|
3357
|
+
var go = (e6, t2) => {
|
|
3357
3358
|
let n2 = d();
|
|
3358
3359
|
return l(() => {
|
|
3359
3360
|
n2.current = t2 ? n2.current : e6;
|
|
3360
3361
|
}, [e6, t2]), n2.current;
|
|
3361
3362
|
};
|
|
3362
|
-
var
|
|
3363
|
-
var
|
|
3364
|
-
var
|
|
3365
|
-
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = c(
|
|
3366
|
-
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new
|
|
3367
|
-
|
|
3368
|
-
let e7 = (e8, t4) => J(t4) ? t4 :
|
|
3363
|
+
var _o = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
|
|
3364
|
+
var vo = (e6, t2, n2, r2) => s(_o(e6, t2, n2, r2), [e6, t2, n2, r2]);
|
|
3365
|
+
var yo = (e6, t2 = {}) => {
|
|
3366
|
+
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = c(mo) || {}, a2 = n2 || r2 || po();
|
|
3367
|
+
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new ho()), !a2) {
|
|
3368
|
+
eo(a2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
|
|
3369
|
+
let e7 = (e8, t4) => J(t4) ? t4 : ao(t4) && J(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
|
|
3369
3370
|
return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
|
|
3370
3371
|
}
|
|
3371
|
-
a2.options.react?.wait &&
|
|
3372
|
-
let o2 = { ...
|
|
3372
|
+
a2.options.react?.wait && eo(a2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
|
|
3373
|
+
let o2 = { ...uo(), ...a2.options.react, ...t2 }, { useSuspense: s2, keyPrefix: u2 } = o2, p2 = e6 || i2 || a2.options?.defaultNS;
|
|
3373
3374
|
p2 = J(p2) ? [p2] : p2 || [`translation`], a2.reportNamespaces.addUsedNamespaces?.(p2);
|
|
3374
|
-
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) =>
|
|
3375
|
+
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) => io(e7, a2, o2)), h2 = vo(a2, t2.lng || null, o2.nsMode === `fallback` ? p2 : p2[0], u2), g2 = () => h2, _2 = () => _o(a2, t2.lng || null, o2.nsMode === `fallback` ? p2 : p2[0], u2), [v2, y2] = f(g2), b2 = p2.join();
|
|
3375
3376
|
t2.lng && (b2 = `${t2.lng}${b2}`);
|
|
3376
|
-
let x2 =
|
|
3377
|
+
let x2 = go(b2), S2 = d(true);
|
|
3377
3378
|
l(() => {
|
|
3378
3379
|
let { bindI18n: e7, bindI18nStore: n3 } = o2;
|
|
3379
|
-
S2.current = true, !m2 && !s2 && (t2.lng ?
|
|
3380
|
+
S2.current = true, !m2 && !s2 && (t2.lng ? ro(a2, t2.lng, p2, () => {
|
|
3380
3381
|
S2.current && y2(_2);
|
|
3381
|
-
}) :
|
|
3382
|
+
}) : no(a2, p2, () => {
|
|
3382
3383
|
S2.current && y2(_2);
|
|
3383
3384
|
})), m2 && x2 && x2 !== b2 && S2.current && y2(_2);
|
|
3384
3385
|
let r3 = () => {
|
|
@@ -3393,134 +3394,134 @@ var vo = (e6, t2 = {}) => {
|
|
|
3393
3394
|
let C2 = [v2, a2, m2];
|
|
3394
3395
|
if (C2.t = v2, C2.i18n = a2, C2.ready = m2, m2 || !m2 && !s2) return C2;
|
|
3395
3396
|
throw new Promise((e7) => {
|
|
3396
|
-
t2.lng ?
|
|
3397
|
+
t2.lng ? ro(a2, t2.lng, p2, () => e7()) : no(a2, p2, () => e7());
|
|
3397
3398
|
});
|
|
3398
3399
|
};
|
|
3399
|
-
function
|
|
3400
|
+
function bo({ i18n: e6, defaultNS: t2, children: n2 }) {
|
|
3400
3401
|
let r2 = u(() => ({ i18n: e6, defaultNS: t2 }), [e6, t2]);
|
|
3401
|
-
return a(
|
|
3402
|
+
return a(mo.Provider, { value: r2 }, n2);
|
|
3402
3403
|
}
|
|
3403
|
-
var
|
|
3404
|
-
var
|
|
3405
|
-
var
|
|
3404
|
+
var xo = I(`@wix/site-service-locale`);
|
|
3405
|
+
var So = I(`@wix/site-service-renderer-configuration`);
|
|
3406
|
+
var Co = () => {
|
|
3406
3407
|
let e6, t2;
|
|
3407
3408
|
try {
|
|
3408
|
-
e6 = m(
|
|
3409
|
+
e6 = m(So).languageCode;
|
|
3409
3410
|
} catch {
|
|
3410
3411
|
}
|
|
3411
3412
|
try {
|
|
3412
|
-
t2 = m(
|
|
3413
|
+
t2 = m(xo).language;
|
|
3413
3414
|
} catch {
|
|
3414
3415
|
}
|
|
3415
3416
|
return e6 || t2;
|
|
3416
3417
|
};
|
|
3417
|
-
var
|
|
3418
|
-
var
|
|
3419
|
-
function
|
|
3418
|
+
var wo = `wix-warmup-data`;
|
|
3419
|
+
var To = null;
|
|
3420
|
+
function Eo(e6) {
|
|
3420
3421
|
if (typeof document < `u`) try {
|
|
3421
|
-
let t2 = document.getElementById(
|
|
3422
|
-
return t2 ? (
|
|
3422
|
+
let t2 = document.getElementById(wo)?.textContent;
|
|
3423
|
+
return t2 ? (To?.text !== t2 && (To = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), To.data[e6] ?? void 0) : void 0;
|
|
3423
3424
|
} catch {
|
|
3424
3425
|
return;
|
|
3425
3426
|
}
|
|
3426
3427
|
}
|
|
3427
|
-
var
|
|
3428
|
-
var
|
|
3429
|
-
var
|
|
3430
|
-
var
|
|
3431
|
-
var
|
|
3432
|
-
let t2 = e6.scope ??
|
|
3433
|
-
return n2 || (n2 = /* @__PURE__ */ new Map(),
|
|
3428
|
+
var Do = 5e3;
|
|
3429
|
+
var Oo = 100;
|
|
3430
|
+
var ko = {};
|
|
3431
|
+
var Ao = /* @__PURE__ */ new WeakMap();
|
|
3432
|
+
var jo = (e6) => {
|
|
3433
|
+
let t2 = e6.scope ?? ko, n2 = Ao.get(t2);
|
|
3434
|
+
return n2 || (n2 = /* @__PURE__ */ new Map(), Ao.set(t2, n2)), n2;
|
|
3434
3435
|
};
|
|
3435
|
-
function
|
|
3436
|
+
function Mo({ key: e6, warmupData: t2, fetchData: n2 }) {
|
|
3436
3437
|
if (e6 === null) return n2();
|
|
3437
3438
|
if (t2.isServer) return n2().then((n3) => (t2.set(e6, n3), n3));
|
|
3438
|
-
let r2 =
|
|
3439
|
+
let r2 = jo(t2), i2 = Date.now();
|
|
3439
3440
|
for (let [e7, t3] of r2) t3.expiresAt <= i2 && r2.delete(e7);
|
|
3440
3441
|
let a2 = r2.get(e6);
|
|
3441
3442
|
if (a2) return a2.promise;
|
|
3442
|
-
let o2 =
|
|
3443
|
+
let o2 = Eo(e6);
|
|
3443
3444
|
if (o2 !== void 0) {
|
|
3444
|
-
let t3 =
|
|
3445
|
-
return r2.set(e6, { promise: t3, expiresAt: i2 +
|
|
3445
|
+
let t3 = Bn(o2);
|
|
3446
|
+
return r2.set(e6, { promise: t3, expiresAt: i2 + Do }), t3;
|
|
3446
3447
|
}
|
|
3447
3448
|
let s2 = (async () => await t2.get(e6) ?? n2())();
|
|
3448
|
-
r2.size >=
|
|
3449
|
+
r2.size >= Oo && r2.delete(r2.keys().next().value);
|
|
3449
3450
|
let c2 = { promise: s2, expiresAt: 1 / 0 };
|
|
3450
3451
|
return r2.set(e6, c2), s2.then(() => {
|
|
3451
|
-
c2.expiresAt = Date.now() +
|
|
3452
|
+
c2.expiresAt = Date.now() + Do;
|
|
3452
3453
|
}, () => {
|
|
3453
3454
|
r2.get(e6) === c2 && r2.delete(e6);
|
|
3454
3455
|
}), s2;
|
|
3455
3456
|
}
|
|
3456
|
-
var
|
|
3457
|
-
var
|
|
3458
|
-
var
|
|
3459
|
-
var
|
|
3460
|
-
function
|
|
3461
|
-
let n2 =
|
|
3457
|
+
var No = `blog-builder:i18n`;
|
|
3458
|
+
var Po = `translation`;
|
|
3459
|
+
var Fo = () => Eo(No);
|
|
3460
|
+
var Io = /* @__PURE__ */ new Map();
|
|
3461
|
+
function Lo(e6, t2) {
|
|
3462
|
+
let n2 = Io.get(e6);
|
|
3462
3463
|
if (n2) return n2;
|
|
3463
|
-
let r2 =
|
|
3464
|
-
return
|
|
3464
|
+
let r2 = Fo(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = Za({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
|
|
3465
|
+
return Io.set(e6, a2), a2;
|
|
3465
3466
|
}
|
|
3466
|
-
function
|
|
3467
|
-
let t2 = () => e6.loadNamespaces(
|
|
3467
|
+
function Ro(e6) {
|
|
3468
|
+
let t2 = () => e6.loadNamespaces(Po).then(() => void 0, () => void 0);
|
|
3468
3469
|
return e6.isInitialized ? t2() : new Promise((n2) => {
|
|
3469
3470
|
e6.on(`initialized`, () => void t2().then(n2));
|
|
3470
3471
|
});
|
|
3471
3472
|
}
|
|
3472
|
-
function
|
|
3473
|
+
function zo(e6, t2) {
|
|
3473
3474
|
return e6.getResourceBundle(t2, `translation`) ?? e6.getResourceBundle(`en`, `translation`);
|
|
3474
3475
|
}
|
|
3475
|
-
var
|
|
3476
|
+
var Bo = (e6, t2, n2) => {
|
|
3476
3477
|
let r2 = t2.lastIndexOf(`?`), i2 = e6[r2 === -1 || r2 < t2.lastIndexOf(`/`) ? t2 : t2.slice(0, r2)];
|
|
3477
3478
|
return i2 ? typeof i2 == `function` ? i2() : Promise.resolve(i2) : new Promise((e7, r3) => {
|
|
3478
3479
|
(typeof queueMicrotask == `function` ? queueMicrotask : setTimeout)(r3.bind(null, Error(`Unknown variable dynamic import: ` + t2 + (t2.split(`/`).length === n2 ? `` : `. Note that variables only represent file names one level deep.`))));
|
|
3479
3480
|
});
|
|
3480
3481
|
};
|
|
3481
|
-
var
|
|
3482
|
-
|
|
3483
|
-
var
|
|
3484
|
-
function
|
|
3485
|
-
let t2 =
|
|
3486
|
-
return t2 || (t2 =
|
|
3482
|
+
var Vo = (e6) => e6.split(`-`)[0] ?? e6;
|
|
3483
|
+
yr({ 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) });
|
|
3484
|
+
var Ho = /* @__PURE__ */ new WeakMap();
|
|
3485
|
+
function Uo(e6) {
|
|
3486
|
+
let t2 = Ho.get(e6);
|
|
3487
|
+
return t2 || (t2 = Ro(e6).finally(() => Ho.delete(e6)), Ho.set(e6, t2)), t2;
|
|
3487
3488
|
}
|
|
3488
|
-
function
|
|
3489
|
-
let n2 =
|
|
3489
|
+
function Wo({ i18n: e6, locale: t2 }) {
|
|
3490
|
+
let n2 = Gn(), r2 = gr();
|
|
3490
3491
|
if (!n2) return null;
|
|
3491
|
-
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw
|
|
3492
|
-
let i2 =
|
|
3493
|
-
return i2 && r2.set(
|
|
3494
|
-
}
|
|
3495
|
-
function
|
|
3496
|
-
let t2 =
|
|
3497
|
-
return { i18n:
|
|
3498
|
-
}
|
|
3499
|
-
var
|
|
3500
|
-
var
|
|
3501
|
-
var
|
|
3502
|
-
var
|
|
3503
|
-
var
|
|
3504
|
-
var
|
|
3505
|
-
var
|
|
3506
|
-
let n2 =
|
|
3492
|
+
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw Uo(e6);
|
|
3493
|
+
let i2 = zo(e6, t2);
|
|
3494
|
+
return i2 && r2.set(No, { locale: t2, messages: i2 }), null;
|
|
3495
|
+
}
|
|
3496
|
+
function Go(e6) {
|
|
3497
|
+
let t2 = Co(), n2 = Fo()?.locale ?? t2 ?? `en`;
|
|
3498
|
+
return { i18n: Lo(n2, e6), locale: n2 };
|
|
3499
|
+
}
|
|
3500
|
+
var Ko = y({ default: () => qo });
|
|
3501
|
+
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` };
|
|
3502
|
+
var Jo = y({ default: () => Xo, title: () => Yo });
|
|
3503
|
+
var Yo = `My App`;
|
|
3504
|
+
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.` };
|
|
3505
|
+
var Zo = Object.assign({ "../assets/locale/messages_en.dev.json": Ko, "../assets/locale/messages_en.json": Jo });
|
|
3506
|
+
var Qo = (e6, t2) => {
|
|
3507
|
+
let n2 = Zo[`../assets/locale/messages_${Vo(e6)}${t2}.json`];
|
|
3507
3508
|
return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
|
|
3508
3509
|
};
|
|
3509
|
-
var
|
|
3510
|
-
var
|
|
3511
|
-
var
|
|
3512
|
-
function
|
|
3510
|
+
var $o = yr({ isDev: false, loadMessages: (e6) => Qo(e6, ``), loadDevMessages: (e6) => Qo(e6, `.dev`) });
|
|
3511
|
+
var es = [{ path: `richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `richContent.nodes.galleryData.items.image.media.duration` }, { path: `richContent.nodes.galleryData.items.video.media.duration` }, { path: `richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `richContent.nodes.galleryData.options.item.ratio` }, { path: `richContent.nodes.imageData.image.duration` }, { path: `richContent.nodes.imageData.crop.x` }, { path: `richContent.nodes.imageData.crop.y` }, { path: `richContent.nodes.imageData.crop.width` }, { path: `richContent.nodes.imageData.crop.height` }, { path: `richContent.nodes.mapData.mapSettings.lat` }, { path: `richContent.nodes.mapData.mapSettings.lng` }, { path: `richContent.nodes.pollData.poll.image.duration` }, { path: `richContent.nodes.pollData.poll.options.image.duration` }, { path: `richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.nodes.appEmbedData.image.duration` }, { path: `richContent.nodes.videoData.video.duration` }, { path: `richContent.nodes.videoData.thumbnail.duration` }, { path: `richContent.nodes.audioData.audio.duration` }, { path: `richContent.nodes.audioData.coverImage.duration` }, { path: `richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `richContent.nodes.layoutData.background.gradient.centerX` }, { path: `richContent.nodes.layoutData.background.gradient.centerY` }, { path: `richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `richContent.nodes.shapeData.shape.duration` }, { path: `richContent.nodes.cardData.background.gradient.centerX` }, { path: `richContent.nodes.cardData.background.gradient.centerY` }, { path: `richContent.nodes.cardData.background.gradient.stops.position` }, { path: `richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `richContent.nodes.tocData.fontSize` }, { path: `richContent.nodes.tocData.itemSpacing` }, { path: `richContent.nodes.smartBlockCellData.shape.duration` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3512
|
+
var ts = [{ path: `richContent.metadata.createdTimestamp` }, { path: `richContent.metadata.updatedTimestamp` }];
|
|
3513
|
+
function ns(e6) {
|
|
3513
3514
|
return P(Object.assign(e6, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/blog-paywall-service`, destPath: `` }], "editor._base_domain_": [{ srcPath: `/_api/blog-paywall-service`, destPath: `` }], "blocks._base_domain_": [{ srcPath: `/_api/blog-paywall-service`, destPath: `` }], "create.editorx": [{ srcPath: `/_api/blog-paywall-service`, destPath: `` }], _: [{ srcPath: `/_api/blog-paywall-service`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/blog-paywall-service/v1/post-paywalls`, destPath: `/v1/post-paywalls` }] } }));
|
|
3514
3515
|
}
|
|
3515
|
-
var
|
|
3516
|
-
function
|
|
3516
|
+
var rs = `@wix/auto_sdk_blog_post-paywalls`;
|
|
3517
|
+
function is(e6) {
|
|
3517
3518
|
function t2({ host: t3 }) {
|
|
3518
|
-
return { entityFqdn: `wix.blog.blog_paywall_service.v1.post_paywall`, method: `GET`, methodFqn: `wix.blog.blog_paywall_service.v1.PostPaywallService.GetPostPaywall`, packageName:
|
|
3519
|
+
return { entityFqdn: `wix.blog.blog_paywall_service.v1.post_paywall`, method: `GET`, methodFqn: `wix.blog.blog_paywall_service.v1.PostPaywallService.GetPostPaywall`, packageName: rs, migrationOptions: { optInTransformResponse: true }, url: ns({ protoPath: `/v1/post-paywalls/{postFqdn}/{postId}`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: F, paths: es }, { transformFn: k, paths: ts }]) };
|
|
3519
3520
|
}
|
|
3520
3521
|
return t2;
|
|
3521
3522
|
}
|
|
3522
|
-
async function
|
|
3523
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3523
|
+
async function as(e6, t2) {
|
|
3524
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = is(D({ postFqdn: e6?.postFqdn, postId: e6?.postId, language: t2?.language }, []));
|
|
3524
3525
|
r2?.onSiteCall?.();
|
|
3525
3526
|
try {
|
|
3526
3527
|
let e7 = await n2.request(i2);
|
|
@@ -3530,29 +3531,29 @@ async function is(e6, t2) {
|
|
|
3530
3531
|
throw r2?.onError?.(e7), t3;
|
|
3531
3532
|
}
|
|
3532
3533
|
}
|
|
3533
|
-
function
|
|
3534
|
-
return (t2, n2) =>
|
|
3534
|
+
function os(e6) {
|
|
3535
|
+
return (t2, n2) => as(t2, n2, { httpClient: e6 });
|
|
3535
3536
|
}
|
|
3536
|
-
var
|
|
3537
|
-
function
|
|
3537
|
+
var ss = M(os);
|
|
3538
|
+
function cs(e6) {
|
|
3538
3539
|
return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
|
|
3539
3540
|
}
|
|
3540
|
-
function
|
|
3541
|
+
function ls(e6) {
|
|
3541
3542
|
return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
|
|
3542
3543
|
}
|
|
3543
|
-
function
|
|
3544
|
+
function us(e6) {
|
|
3544
3545
|
return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
|
|
3545
3546
|
}
|
|
3546
3547
|
function Y(e6, t2) {
|
|
3547
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...
|
|
3548
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...cs(e6) ? e6.$and : [e6], ...cs(t2) ? t2.$and : [t2]] };
|
|
3548
3549
|
}
|
|
3549
|
-
function
|
|
3550
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...
|
|
3550
|
+
function ds(e6, t2) {
|
|
3551
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...ls(e6) ? e6.$or : [e6], ...ls(t2) ? t2.$or : [t2]] };
|
|
3551
3552
|
}
|
|
3552
|
-
function
|
|
3553
|
-
if (e6 !== void 0 && Object.keys(e6).length !== 0) return
|
|
3553
|
+
function fs(e6) {
|
|
3554
|
+
if (e6 !== void 0 && Object.keys(e6).length !== 0) return us(e6) ? e6.$not : { $not: e6 };
|
|
3554
3555
|
}
|
|
3555
|
-
var
|
|
3556
|
+
var ps = class {
|
|
3556
3557
|
_items;
|
|
3557
3558
|
_fetchNextPage;
|
|
3558
3559
|
_fetchPrevPage;
|
|
@@ -3582,7 +3583,7 @@ var fs = class {
|
|
|
3582
3583
|
return await this._fetchPrevPage();
|
|
3583
3584
|
}
|
|
3584
3585
|
};
|
|
3585
|
-
var
|
|
3586
|
+
var ms = class extends ps {
|
|
3586
3587
|
_nextCursor;
|
|
3587
3588
|
_prevCursor;
|
|
3588
3589
|
cursors;
|
|
@@ -3596,7 +3597,7 @@ var ps = class extends fs {
|
|
|
3596
3597
|
return !!this._prevCursor;
|
|
3597
3598
|
}
|
|
3598
3599
|
};
|
|
3599
|
-
var
|
|
3600
|
+
var hs = class extends ps {
|
|
3600
3601
|
_totalCount;
|
|
3601
3602
|
_offset;
|
|
3602
3603
|
_tooManyToCount;
|
|
@@ -3619,16 +3620,16 @@ var ms = class extends fs {
|
|
|
3619
3620
|
return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
|
|
3620
3621
|
}
|
|
3621
3622
|
};
|
|
3622
|
-
function
|
|
3623
|
+
function gs(e6) {
|
|
3623
3624
|
let t2 = (n2) => ({ query: n2, async find() {
|
|
3624
3625
|
try {
|
|
3625
|
-
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [
|
|
3626
|
+
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [$e]: a2, [et]: o2 } = e6.responseTransformer(i2);
|
|
3626
3627
|
if (e6.pagingMethod === `OFFSET`) {
|
|
3627
3628
|
let e7 = n2;
|
|
3628
|
-
return new
|
|
3629
|
+
return new hs({ 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 });
|
|
3629
3630
|
}
|
|
3630
3631
|
let s2 = n2.cursorPaging;
|
|
3631
|
-
return new
|
|
3632
|
+
return new ms({ items: a2 ?? [], limit: s2.limit, originQuery: this, fetchNextPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.next ?? void 0, limit: s2.limit } }).find(), fetchPrevPage: () => t2({ ...n2, cursorPaging: { cursor: o2?.cursors?.prev ?? void 0, limit: s2.limit } }).find(), prevCursor: o2?.cursors?.prev ?? void 0, nextCursor: o2?.cursors?.next ?? void 0 });
|
|
3632
3633
|
} catch (t3) {
|
|
3633
3634
|
throw e6.errorTransformer(t3);
|
|
3634
3635
|
}
|
|
@@ -3680,11 +3681,11 @@ function hs(e6) {
|
|
|
3680
3681
|
let a2 = { [X(e6.transformationPaths, r2)]: { $exists: i2 } };
|
|
3681
3682
|
return t2({ ...n2, filter: Y(n2.filter, a2) });
|
|
3682
3683
|
}, or(e7) {
|
|
3683
|
-
return t2({ ...n2, filter:
|
|
3684
|
+
return t2({ ...n2, filter: ds(n2.filter, e7.query.filter) });
|
|
3684
3685
|
}, and(e7) {
|
|
3685
3686
|
return t2({ ...n2, filter: Y(n2.filter, e7.query.filter) });
|
|
3686
3687
|
}, not(e7) {
|
|
3687
|
-
return t2({ ...n2, filter:
|
|
3688
|
+
return t2({ ...n2, filter: fs(e7.query.filter) });
|
|
3688
3689
|
}, ascending(...r2) {
|
|
3689
3690
|
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: X(e6.transformationPaths, t3), order: `ASC` }))] });
|
|
3690
3691
|
}, descending(...r2) {
|
|
@@ -3703,69 +3704,69 @@ function hs(e6) {
|
|
|
3703
3704
|
}
|
|
3704
3705
|
function X(e6, t2) {
|
|
3705
3706
|
let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
|
|
3706
|
-
return n2 ? t2.replace(n2, e6[n2]) :
|
|
3707
|
-
}
|
|
3708
|
-
var
|
|
3709
|
-
var
|
|
3710
|
-
var
|
|
3711
|
-
var
|
|
3712
|
-
var
|
|
3713
|
-
var
|
|
3714
|
-
function
|
|
3707
|
+
return n2 ? t2.replace(n2, e6[n2]) : nt(t2, { ...e6, ...tt });
|
|
3708
|
+
}
|
|
3709
|
+
var _s = `filter`;
|
|
3710
|
+
var vs = `sort`;
|
|
3711
|
+
var ys = `cursorPaging`;
|
|
3712
|
+
var bs = `paging`;
|
|
3713
|
+
var xs = [_s, vs, ys];
|
|
3714
|
+
var Ss = [_s, vs, bs];
|
|
3715
|
+
function Cs(e6, t2) {
|
|
3715
3716
|
return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
|
|
3716
3717
|
}
|
|
3717
|
-
function Cs(e6) {
|
|
3718
|
-
return Ss(e6, bs);
|
|
3719
|
-
}
|
|
3720
3718
|
function ws(e6) {
|
|
3721
|
-
return
|
|
3719
|
+
return Cs(e6, xs);
|
|
3722
3720
|
}
|
|
3723
3721
|
function Ts(e6) {
|
|
3722
|
+
return Cs(e6, Ss);
|
|
3723
|
+
}
|
|
3724
|
+
function Es(e6) {
|
|
3724
3725
|
let { hasOptionsParameter: t2 } = e6;
|
|
3725
3726
|
return function(...n2) {
|
|
3726
|
-
return t2 ?
|
|
3727
|
+
return t2 ? Os(n2, e6) : Ds(n2, e6);
|
|
3727
3728
|
};
|
|
3728
3729
|
}
|
|
3729
|
-
function
|
|
3730
|
+
function Ds(e6, t2) {
|
|
3730
3731
|
return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
|
|
3731
3732
|
}
|
|
3732
|
-
function
|
|
3733
|
+
function Os(e6, t2) {
|
|
3733
3734
|
switch (e6.length) {
|
|
3734
3735
|
case 0:
|
|
3735
3736
|
return t2.builderQueryFunction();
|
|
3736
3737
|
case 1:
|
|
3737
|
-
return
|
|
3738
|
+
return ws(e6[0]) || Ts(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
|
|
3738
3739
|
default:
|
|
3739
3740
|
return t2.typedQueryFunction(e6[0], e6[1]);
|
|
3740
3741
|
}
|
|
3741
3742
|
}
|
|
3742
|
-
var
|
|
3743
|
-
var
|
|
3744
|
-
function
|
|
3743
|
+
var ks = [{ path: `like.createdDate` }];
|
|
3744
|
+
var As = [{ path: `likes.createdDate` }];
|
|
3745
|
+
function js(e6) {
|
|
3745
3746
|
return P(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "api._api_base_domain_": [{ srcPath: `/blog-like-service`, destPath: `` }], "social-blog._base_domain_": [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "manage._base_domain_": [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "apps._base_domain_": [{ srcPath: `/_api/blog-like-service`, destPath: `` }], "www.wixapis.com": [{ srcPath: `/blog/v1/likes`, destPath: `/v1/likes` }], "*.dev.wix-code.com": [{ srcPath: `/blog/v1/likes`, destPath: `/v1/likes` }] } }));
|
|
3746
3747
|
}
|
|
3747
|
-
var
|
|
3748
|
-
function
|
|
3748
|
+
var Ms = `@wix/auto_sdk_blog_likes`;
|
|
3749
|
+
function Ns(e6) {
|
|
3749
3750
|
function t2({ host: t3 }) {
|
|
3750
|
-
let n2 = A(e6, [{ transformFn:
|
|
3751
|
-
return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.CreateLike`, packageName:
|
|
3751
|
+
let n2 = A(e6, [{ transformFn: st, paths: ks }]);
|
|
3752
|
+
return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.CreateLike`, packageName: Ms, migrationOptions: { optInTransformResponse: true }, url: js({ protoPath: `/v1/likes`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: ks }]) };
|
|
3752
3753
|
}
|
|
3753
3754
|
return t2;
|
|
3754
3755
|
}
|
|
3755
|
-
function
|
|
3756
|
+
function Ps(e6) {
|
|
3756
3757
|
function t2({ host: t3 }) {
|
|
3757
|
-
return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.QueryLikes`, packageName:
|
|
3758
|
+
return { entityFqdn: `wix.blog.v1.like`, method: `POST`, methodFqn: `wix.blog.v1.LikeService.QueryLikes`, packageName: Ms, migrationOptions: { optInTransformResponse: true }, url: js({ protoPath: `/v1/likes/query`, data: e6, host: t3 }), data: e6, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: As }]) };
|
|
3758
3759
|
}
|
|
3759
3760
|
return t2;
|
|
3760
3761
|
}
|
|
3761
|
-
function
|
|
3762
|
+
function Fs(e6) {
|
|
3762
3763
|
function t2({ host: t3 }) {
|
|
3763
|
-
return { entityFqdn: `wix.blog.v1.like`, method: `DELETE`, methodFqn: `wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId`, packageName:
|
|
3764
|
+
return { entityFqdn: `wix.blog.v1.like`, method: `DELETE`, methodFqn: `wix.blog.v1.LikeService.DeleteLikeByFqdnAndEntityId`, packageName: Ms, migrationOptions: { optInTransformResponse: true }, url: js({ protoPath: `/v1/likes/fqdn/{fqdn}/entity-id/{entityId}`, data: e6, host: t3 }), params: N(e6) };
|
|
3764
3765
|
}
|
|
3765
3766
|
return t2;
|
|
3766
3767
|
}
|
|
3767
|
-
async function
|
|
3768
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3768
|
+
async function Is(e6) {
|
|
3769
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Ns(D({ like: e6?.like }));
|
|
3769
3770
|
n2?.onSiteCall?.();
|
|
3770
3771
|
try {
|
|
3771
3772
|
let e7 = await t2.request(r2);
|
|
@@ -3775,10 +3776,10 @@ async function Fs(e6) {
|
|
|
3775
3776
|
throw n2?.onError?.(e7), t3;
|
|
3776
3777
|
}
|
|
3777
3778
|
}
|
|
3778
|
-
function
|
|
3779
|
+
function Ls() {
|
|
3779
3780
|
let { httpClient: e6, sideEffects: t2 } = arguments[0];
|
|
3780
|
-
return
|
|
3781
|
-
let r2 =
|
|
3781
|
+
return gs({ func: async (n2) => {
|
|
3782
|
+
let r2 = Ps(n2);
|
|
3782
3783
|
t2?.onSiteCall?.();
|
|
3783
3784
|
try {
|
|
3784
3785
|
let n3 = await e6.request(r2);
|
|
@@ -3796,8 +3797,8 @@ function Is() {
|
|
|
3796
3797
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3797
3798
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
3798
3799
|
}
|
|
3799
|
-
async function
|
|
3800
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3800
|
+
async function Rs(e6) {
|
|
3801
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Ps(D({ query: e6 }));
|
|
3801
3802
|
n2?.onSiteCall?.();
|
|
3802
3803
|
try {
|
|
3803
3804
|
let e7 = await t2.request(r2);
|
|
@@ -3807,8 +3808,8 @@ async function Ls(e6) {
|
|
|
3807
3808
|
throw n2?.onError?.(e7), t3;
|
|
3808
3809
|
}
|
|
3809
3810
|
}
|
|
3810
|
-
async function
|
|
3811
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3811
|
+
async function zs(e6) {
|
|
3812
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Fs(D({ fqdn: e6?.fqdn, entityId: e6?.entityId }));
|
|
3812
3813
|
n2?.onSiteCall?.();
|
|
3813
3814
|
try {
|
|
3814
3815
|
let e7 = await t2.request(r2);
|
|
@@ -3818,66 +3819,66 @@ async function Rs(e6) {
|
|
|
3818
3819
|
throw n2?.onError?.(e7), t3;
|
|
3819
3820
|
}
|
|
3820
3821
|
}
|
|
3821
|
-
function zs(e6) {
|
|
3822
|
-
return (t2) => Fs(t2, { httpClient: e6 });
|
|
3823
|
-
}
|
|
3824
3822
|
function Bs(e6) {
|
|
3825
|
-
return () => Is({ httpClient: e6 });
|
|
3823
|
+
return (t2) => Is(t2, { httpClient: e6 });
|
|
3826
3824
|
}
|
|
3827
3825
|
function Vs(e6) {
|
|
3828
|
-
return (
|
|
3826
|
+
return () => Ls({ httpClient: e6 });
|
|
3829
3827
|
}
|
|
3830
3828
|
function Hs(e6) {
|
|
3831
3829
|
return (t2) => Rs(t2, { httpClient: e6 });
|
|
3832
3830
|
}
|
|
3833
3831
|
function Us(e6) {
|
|
3834
|
-
|
|
3832
|
+
return (t2) => zs(t2, { httpClient: e6 });
|
|
3833
|
+
}
|
|
3834
|
+
function Ws(e6) {
|
|
3835
|
+
let t2 = Es({ builderQueryFunction: () => Vs(e6)(), typedQueryFunction: (t3) => Hs(e6)(t3), hasOptionsParameter: false });
|
|
3835
3836
|
function n2(e7) {
|
|
3836
3837
|
return t2(...arguments);
|
|
3837
3838
|
}
|
|
3838
3839
|
return n2;
|
|
3839
3840
|
}
|
|
3840
|
-
var
|
|
3841
|
-
var Gs = M(Hs);
|
|
3841
|
+
var Gs = M(Bs);
|
|
3842
3842
|
var Ks = M(Us);
|
|
3843
|
-
|
|
3843
|
+
var qs = M(Ws);
|
|
3844
|
+
function Js(e6) {
|
|
3844
3845
|
if (!e6) return;
|
|
3845
3846
|
let t2 = ``;
|
|
3846
3847
|
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;
|
|
3847
3848
|
}
|
|
3848
|
-
function
|
|
3849
|
+
function Ys(e6) {
|
|
3849
3850
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
3850
3851
|
}
|
|
3851
|
-
var
|
|
3852
|
-
var
|
|
3853
|
-
function
|
|
3852
|
+
var Xs = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
3853
|
+
var Zs = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
3854
|
+
function Qs(e6) {
|
|
3854
3855
|
return P(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: `` }] } }));
|
|
3855
3856
|
}
|
|
3856
|
-
var
|
|
3857
|
-
function
|
|
3857
|
+
var $s = `@wix/auto_sdk_blog_categories`;
|
|
3858
|
+
function ec(e6) {
|
|
3858
3859
|
function t2({ host: t3 }) {
|
|
3859
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName:
|
|
3860
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: $s, migrationOptions: { optInTransformResponse: true }, url: Qs({ protoPath: `/v3/categories`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Xs }, { transformFn: F, paths: Zs }]) };
|
|
3860
3861
|
}
|
|
3861
3862
|
return t2;
|
|
3862
3863
|
}
|
|
3863
|
-
var
|
|
3864
|
-
var
|
|
3865
|
-
async function
|
|
3866
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3864
|
+
var tc = [{ path: `categories.url` }, { path: `categories.translations.url` }];
|
|
3865
|
+
var nc = [{ path: `categories.coverImage` }];
|
|
3866
|
+
async function rc(e6) {
|
|
3867
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ec(D({ paging: e6?.paging, fieldsets: e6?.fieldsets, language: e6?.language }));
|
|
3867
3868
|
n2?.onSiteCall?.();
|
|
3868
3869
|
try {
|
|
3869
3870
|
let e7 = await t2.request(r2);
|
|
3870
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3871
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Ys, paths: tc }, { transformFn: Js, paths: nc }]));
|
|
3871
3872
|
} catch (e7) {
|
|
3872
3873
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3873
3874
|
throw n2?.onError?.(e7), t3;
|
|
3874
3875
|
}
|
|
3875
3876
|
}
|
|
3876
|
-
function
|
|
3877
|
-
return (t2) =>
|
|
3877
|
+
function ic(e6) {
|
|
3878
|
+
return (t2) => rc(t2, { httpClient: e6 });
|
|
3878
3879
|
}
|
|
3879
|
-
var
|
|
3880
|
-
function
|
|
3880
|
+
var ac = M(ic);
|
|
3881
|
+
function oc(e6) {
|
|
3881
3882
|
if (!e6) return;
|
|
3882
3883
|
let t2 = ``;
|
|
3883
3884
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -3892,43 +3893,43 @@ function ac(e6) {
|
|
|
3892
3893
|
}
|
|
3893
3894
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
3894
3895
|
}
|
|
3895
|
-
var
|
|
3896
|
-
var
|
|
3897
|
-
var cc = [{ 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` }];
|
|
3898
|
-
var
|
|
3899
|
-
function
|
|
3896
|
+
var sc = [{ 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` }];
|
|
3897
|
+
var cc = [{ path: `post.richContentCompressed` }];
|
|
3898
|
+
var lc = [{ 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` }];
|
|
3899
|
+
var uc = [{ path: `metrics.averageRating` }];
|
|
3900
|
+
function dc(e6) {
|
|
3900
3901
|
return P(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` }] } }));
|
|
3901
3902
|
}
|
|
3902
|
-
var
|
|
3903
|
-
function
|
|
3903
|
+
var fc = `@wix/auto_sdk_blog_posts`;
|
|
3904
|
+
function pc(e6) {
|
|
3904
3905
|
function t2({ host: t3 }) {
|
|
3905
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost`, packageName:
|
|
3906
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPost`, packageName: fc, migrationOptions: { optInTransformResponse: true }, url: dc({ protoPath: `/v3/posts/{postId}`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: sc }, { transformFn: fn, paths: cc }, { transformFn: F, paths: lc }]) };
|
|
3906
3907
|
}
|
|
3907
3908
|
return t2;
|
|
3908
3909
|
}
|
|
3909
|
-
function
|
|
3910
|
+
function mc(e6) {
|
|
3910
3911
|
function t2({ host: t3 }) {
|
|
3911
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics`, packageName:
|
|
3912
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostMetrics`, packageName: fc, migrationOptions: { optInTransformResponse: true }, url: dc({ protoPath: `/v3/posts/{postId}/metrics`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: F, paths: uc }]) };
|
|
3912
3913
|
}
|
|
3913
3914
|
return t2;
|
|
3914
3915
|
}
|
|
3915
|
-
var
|
|
3916
|
-
var
|
|
3917
|
-
var
|
|
3916
|
+
var hc = [{ path: `post.url` }, { path: `post.translations.url` }];
|
|
3917
|
+
var gc = [{ path: `post.heroImage` }, { path: `post.media.wixMedia.image` }];
|
|
3918
|
+
var _c = [{ path: `post.media.wixMedia.videoV2` }];
|
|
3918
3919
|
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 || {});
|
|
3919
|
-
async function
|
|
3920
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3920
|
+
async function vc(e6, t2) {
|
|
3921
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = pc(D({ postId: e6, fieldsets: t2?.fieldsets }, []));
|
|
3921
3922
|
r2?.onSiteCall?.();
|
|
3922
3923
|
try {
|
|
3923
3924
|
let e7 = await n2.request(i2);
|
|
3924
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3925
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Ys, paths: hc }, { transformFn: Js, paths: gc }, { transformFn: oc, paths: _c }]), [`post.richContent`, `post.rich_content`]);
|
|
3925
3926
|
} catch (e7) {
|
|
3926
3927
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { postId: `$[0]`, fieldsets: `$[1].fieldsets` }, singleArgumentUnchanged: false }, [`postId`, `options`]);
|
|
3927
3928
|
throw r2?.onError?.(e7), t3;
|
|
3928
3929
|
}
|
|
3929
3930
|
}
|
|
3930
|
-
async function
|
|
3931
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3931
|
+
async function yc(e6) {
|
|
3932
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = mc(D({ postId: e6 }, []));
|
|
3932
3933
|
n2?.onSiteCall?.();
|
|
3933
3934
|
try {
|
|
3934
3935
|
let e7 = await t2.request(r2);
|
|
@@ -3938,32 +3939,32 @@ async function vc(e6) {
|
|
|
3938
3939
|
throw n2?.onError?.(e7), t3;
|
|
3939
3940
|
}
|
|
3940
3941
|
}
|
|
3941
|
-
function yc(e6) {
|
|
3942
|
-
return (t2, n2) => _c(t2, n2, { httpClient: e6 });
|
|
3943
|
-
}
|
|
3944
3942
|
function bc(e6) {
|
|
3945
|
-
return (t2) => vc(t2, { httpClient: e6 });
|
|
3943
|
+
return (t2, n2) => vc(t2, n2, { httpClient: e6 });
|
|
3944
|
+
}
|
|
3945
|
+
function xc(e6) {
|
|
3946
|
+
return (t2) => yc(t2, { httpClient: e6 });
|
|
3946
3947
|
}
|
|
3947
|
-
var xc = M(yc);
|
|
3948
3948
|
var Sc = M(bc);
|
|
3949
|
-
var Cc =
|
|
3950
|
-
var wc = [{ path: `
|
|
3951
|
-
|
|
3949
|
+
var Cc = M(xc);
|
|
3950
|
+
var wc = [{ path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3951
|
+
var Tc = [{ path: `tags.createdDate` }, { path: `tags.updatedDate` }];
|
|
3952
|
+
function Ec(e6) {
|
|
3952
3953
|
return P(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "www.wixapis.com": [{ srcPath: `/v3/tags`, destPath: `/v3/tags` }, { srcPath: `/blog/v3/tags`, destPath: `/v3/tags` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v2/tags`, destPath: `/v2/tags` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/tag`, destPath: `/v3/bulk/tag` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/tags`, destPath: `/v3/bulk/tags` }, { srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "bo._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "wixbo.ai": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "wix-bo.com": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }], "social-blog._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/tags`, destPath: `/v3/tags` }] } }));
|
|
3953
3954
|
}
|
|
3954
|
-
var
|
|
3955
|
-
function
|
|
3955
|
+
var Dc = `@wix/auto_sdk_blog_tags`;
|
|
3956
|
+
function Oc(e6) {
|
|
3956
3957
|
function t2({ host: t3 }) {
|
|
3957
|
-
let n2 = A(e6, [{ transformFn:
|
|
3958
|
-
return { entityFqdn: `wix.blog.v3.tag`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.TagService.QueryTags`, packageName:
|
|
3958
|
+
let n2 = A(e6, [{ transformFn: dn, paths: wc }]);
|
|
3959
|
+
return { entityFqdn: `wix.blog.v3.tag`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.TagService.QueryTags`, packageName: Dc, migrationOptions: { optInTransformResponse: true }, url: Ec({ protoPath: `/v3/tags/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Tc }]) };
|
|
3959
3960
|
}
|
|
3960
3961
|
return t2;
|
|
3961
3962
|
}
|
|
3962
|
-
var
|
|
3963
|
-
function
|
|
3963
|
+
var kc = [{ path: `tags.url` }];
|
|
3964
|
+
function Ac(e6) {
|
|
3964
3965
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3965
|
-
return
|
|
3966
|
-
let i2 =
|
|
3966
|
+
return gs({ func: async (r2) => {
|
|
3967
|
+
let i2 = Oc({ ...r2, ...e6 ?? {} });
|
|
3967
3968
|
n2?.onSiteCall?.();
|
|
3968
3969
|
try {
|
|
3969
3970
|
let e7 = await t2.request(i2);
|
|
@@ -3975,57 +3976,57 @@ function kc(e6) {
|
|
|
3975
3976
|
let n3 = [t3, e6];
|
|
3976
3977
|
return D({ ...n3?.[1], query: n3?.[0] });
|
|
3977
3978
|
}, responseTransformer: ({ data: e7 }) => {
|
|
3978
|
-
let t3 = O(A(e7, [{ transformFn:
|
|
3979
|
+
let t3 = O(A(e7, [{ transformFn: Ys, paths: kc }]));
|
|
3979
3980
|
return { items: t3?.tags, pagingMetadata: t3?.pagingMetadata };
|
|
3980
3981
|
}, errorTransformer: (e7) => {
|
|
3981
3982
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3982
3983
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
3983
3984
|
}
|
|
3984
|
-
async function
|
|
3985
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3985
|
+
async function jc(e6, t2) {
|
|
3986
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Oc(D({ query: e6, ...t2 }));
|
|
3986
3987
|
r2?.onSiteCall?.();
|
|
3987
3988
|
try {
|
|
3988
3989
|
let e7 = await n2.request(i2);
|
|
3989
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3990
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Ys, paths: kc }]));
|
|
3990
3991
|
} catch (e7) {
|
|
3991
3992
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
3992
3993
|
throw r2?.onError?.(e7), t3;
|
|
3993
3994
|
}
|
|
3994
3995
|
}
|
|
3995
|
-
function jc(e6) {
|
|
3996
|
-
return (t2) => kc(t2, { httpClient: e6 });
|
|
3997
|
-
}
|
|
3998
3996
|
function Mc(e6) {
|
|
3999
|
-
return (t2
|
|
3997
|
+
return (t2) => Ac(t2, { httpClient: e6 });
|
|
4000
3998
|
}
|
|
4001
3999
|
function Nc(e6) {
|
|
4002
|
-
|
|
4000
|
+
return (t2, n2) => jc(t2, n2, { httpClient: e6 });
|
|
4001
|
+
}
|
|
4002
|
+
function Pc(e6) {
|
|
4003
|
+
let t2 = Es({ builderQueryFunction: (t3) => Mc(e6)(t3), typedQueryFunction: (t3, n3) => Nc(e6)(t3, n3), hasOptionsParameter: true });
|
|
4003
4004
|
function n2(e7, n3) {
|
|
4004
4005
|
return t2(...arguments);
|
|
4005
4006
|
}
|
|
4006
4007
|
return n2;
|
|
4007
4008
|
}
|
|
4008
|
-
var
|
|
4009
|
-
var
|
|
4010
|
-
var
|
|
4009
|
+
var Fc = M(Pc);
|
|
4010
|
+
var Ic = (e6) => O(A(e6, [{ transformFn: Ys, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: Js, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: oc, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
|
|
4011
|
+
var Lc = `https://blog.wixsite.com/blog-demo-posts`;
|
|
4011
4012
|
M((e6) => async (t2) => {
|
|
4012
4013
|
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${N(t2)}`);
|
|
4013
4014
|
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
4014
|
-
return
|
|
4015
|
+
return Ic(await n2.json()).filter((e7) => !e7.url?.startsWith(Lc));
|
|
4015
4016
|
});
|
|
4016
|
-
var
|
|
4017
|
-
function
|
|
4017
|
+
var Rc = [{ path: `member.createdDate` }, { path: `member.updatedDate` }, { path: `member.lastLoginDate` }];
|
|
4018
|
+
function zc(e6) {
|
|
4018
4019
|
return P(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` }] } }));
|
|
4019
4020
|
}
|
|
4020
|
-
var
|
|
4021
|
-
function
|
|
4021
|
+
var Bc = `@wix/auto_sdk_members_members`;
|
|
4022
|
+
function Vc(e6) {
|
|
4022
4023
|
function t2({ host: t3 }) {
|
|
4023
|
-
return { entityFqdn: `wix.members.v1.member`, method: `GET`, methodFqn: `com.wixpress.members.api.Members.GetMember`, packageName:
|
|
4024
|
+
return { entityFqdn: `wix.members.v1.member`, method: `GET`, methodFqn: `com.wixpress.members.api.Members.GetMember`, packageName: Bc, migrationOptions: { optInTransformResponse: true }, url: zc({ protoPath: `/v1/members/{id}`, data: e6, host: t3 }), params: N(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Rc }]) };
|
|
4024
4025
|
}
|
|
4025
4026
|
return t2;
|
|
4026
4027
|
}
|
|
4027
|
-
async function
|
|
4028
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
4028
|
+
async function Hc(e6, t2) {
|
|
4029
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Vc(D({ id: e6, fieldsets: t2?.fieldsets }));
|
|
4029
4030
|
r2?.onSiteCall?.();
|
|
4030
4031
|
try {
|
|
4031
4032
|
let e7 = await n2.request(i2);
|
|
@@ -4035,70 +4036,70 @@ async function Vc(e6, t2) {
|
|
|
4035
4036
|
throw r2?.onError?.(e7), t3;
|
|
4036
4037
|
}
|
|
4037
4038
|
}
|
|
4038
|
-
function
|
|
4039
|
-
return (t2, n2) =>
|
|
4039
|
+
function Uc(e6) {
|
|
4040
|
+
return (t2, n2) => Hc(t2, n2, { httpClient: e6 });
|
|
4040
4041
|
}
|
|
4041
|
-
var
|
|
4042
|
-
var
|
|
4042
|
+
var Wc = M(Uc);
|
|
4043
|
+
var Gc = async (e6) => {
|
|
4043
4044
|
try {
|
|
4044
|
-
return await
|
|
4045
|
+
return await Wc(e6, { fieldsets: [`PUBLIC`] });
|
|
4045
4046
|
} catch {
|
|
4046
4047
|
return;
|
|
4047
4048
|
}
|
|
4048
4049
|
};
|
|
4049
|
-
var
|
|
4050
|
-
var
|
|
4051
|
-
let n2 = await
|
|
4050
|
+
var Kc = `wix.blog.v4.post`;
|
|
4051
|
+
var qc = async (e6, t2) => {
|
|
4052
|
+
let n2 = await ss({ postFqdn: Kc, postId: e6 }, t2 ? { language: t2 } : void 0);
|
|
4052
4053
|
if (typeof n2 != `object` || !n2) throw Error(`No Wix SDK context for the post paywall read`);
|
|
4053
4054
|
let { richContent: r2 } = n2;
|
|
4054
4055
|
return D(r2);
|
|
4055
4056
|
};
|
|
4056
|
-
var
|
|
4057
|
-
var
|
|
4058
|
-
var
|
|
4057
|
+
var Jc = `1522827f-c56c-a5c9-2ac9-00f9e6ae12d3`;
|
|
4058
|
+
var Yc = `membership_plan_picker_tpa`;
|
|
4059
|
+
var Xc = (e6) => {
|
|
4059
4060
|
let t2;
|
|
4060
4061
|
try {
|
|
4061
|
-
t2 = e6.appSectionRelativeUrl(
|
|
4062
|
+
t2 = e6.appSectionRelativeUrl(Jc, Yc);
|
|
4062
4063
|
} catch {
|
|
4063
4064
|
return;
|
|
4064
4065
|
}
|
|
4065
4066
|
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${t2.replace(/^\/+/, ``)}`;
|
|
4066
4067
|
};
|
|
4067
|
-
var
|
|
4068
|
-
let n2 = e7.nodes ? { ...e7, nodes:
|
|
4068
|
+
var Zc = (e6, t2) => e6.flatMap((e7) => {
|
|
4069
|
+
let n2 = e7.nodes ? { ...e7, nodes: Zc(e7.nodes, t2) } : e7;
|
|
4069
4070
|
return e7.type !== `BUTTON` || e7.buttonData?.type !== `ACTION` ? [n2] : t2 ? [{ ...n2, buttonData: { ...e7.buttonData, type: `LINK`, link: { url: t2, target: `SELF`, rel: { nofollow: true } } } }] : [];
|
|
4070
4071
|
});
|
|
4071
|
-
var
|
|
4072
|
+
var Qc = (e6, t2, n2) => {
|
|
4072
4073
|
if (!t2?.nodes?.length) return e6;
|
|
4073
|
-
let r2 =
|
|
4074
|
+
let r2 = Zc(t2.nodes.map((e7) => e7.layoutData ? { ...e7, layoutData: { ...e7.layoutData, banner: void 0 } } : e7), n2);
|
|
4074
4075
|
return { ...e6, nodes: [...e6.nodes ?? [], ...r2] };
|
|
4075
4076
|
};
|
|
4076
|
-
var
|
|
4077
|
-
var
|
|
4078
|
-
var el = [{ 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` }];
|
|
4079
|
-
var
|
|
4080
|
-
function
|
|
4077
|
+
var $c = [{ 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` }];
|
|
4078
|
+
var el = [{ path: `posts.richContentCompressed` }];
|
|
4079
|
+
var tl = [{ 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` }];
|
|
4080
|
+
var nl = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
4081
|
+
function rl(e6) {
|
|
4081
4082
|
return P(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` }] } }));
|
|
4082
4083
|
}
|
|
4083
|
-
var
|
|
4084
|
-
function
|
|
4084
|
+
var il = `@wix/auto_sdk_blog_posts`;
|
|
4085
|
+
function al(e6) {
|
|
4085
4086
|
function t2({ host: t3 }) {
|
|
4086
|
-
let n2 = A(e6, [{ transformFn:
|
|
4087
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
4087
|
+
let n2 = A(e6, [{ transformFn: dn, paths: nl }]);
|
|
4088
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: il, migrationOptions: { optInTransformResponse: true }, url: rl({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: $c }, { transformFn: fn, paths: el }, { transformFn: F, paths: tl }]) };
|
|
4088
4089
|
}
|
|
4089
4090
|
return t2;
|
|
4090
4091
|
}
|
|
4091
|
-
function
|
|
4092
|
-
let e6 =
|
|
4092
|
+
function ol() {
|
|
4093
|
+
let e6 = al({});
|
|
4093
4094
|
return { getUrl: (t2) => {
|
|
4094
4095
|
let { url: n2 } = e6(t2);
|
|
4095
4096
|
return n2;
|
|
4096
4097
|
}, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
|
|
4097
4098
|
}
|
|
4098
|
-
var
|
|
4099
|
-
var
|
|
4100
|
-
var
|
|
4101
|
-
let { data: n2 } = await e6.request(
|
|
4099
|
+
var sl = ol();
|
|
4100
|
+
var cl = (e6) => (t2) => ({ method: `POST`, url: sl.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4101
|
+
var ll = M((e6) => async (t2) => {
|
|
4102
|
+
let { data: n2 } = await e6.request(cl(t2)), r2 = {};
|
|
4102
4103
|
for (let e7 of n2.posts ?? []) {
|
|
4103
4104
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
4104
4105
|
if (!t3 || !n3?.length) continue;
|
|
@@ -4107,125 +4108,152 @@ var cl = M((e6) => async (t2) => {
|
|
|
4107
4108
|
}
|
|
4108
4109
|
return r2;
|
|
4109
4110
|
});
|
|
4110
|
-
var
|
|
4111
|
+
var ul = async (e6) => {
|
|
4111
4112
|
if (e6.length === 0) return {};
|
|
4112
4113
|
try {
|
|
4113
|
-
return await
|
|
4114
|
+
return await ll(e6);
|
|
4114
4115
|
} catch {
|
|
4115
4116
|
return {};
|
|
4116
4117
|
}
|
|
4117
4118
|
};
|
|
4118
|
-
var
|
|
4119
|
+
var dl = class extends Error {
|
|
4119
4120
|
constructor(e6, t2) {
|
|
4120
4121
|
super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
|
|
4121
4122
|
}
|
|
4122
4123
|
};
|
|
4123
|
-
var
|
|
4124
|
+
var fl = (e6, t2, n2) => {
|
|
4124
4125
|
let r2, i2 = new Promise((e7, i3) => {
|
|
4125
|
-
r2 = setTimeout(() => i3(new
|
|
4126
|
+
r2 = setTimeout(() => i3(new dl(n2, t2)), t2);
|
|
4126
4127
|
});
|
|
4127
4128
|
return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
|
|
4128
4129
|
};
|
|
4129
4130
|
Z.RICH_CONTENT, Z.SEO, Z.URL, Z.CONTENT_TEXT;
|
|
4130
|
-
var
|
|
4131
|
+
var pl = [Z.RICH_CONTENT, Z.URL];
|
|
4131
4132
|
Z.URL, Z.METRICS;
|
|
4132
|
-
var
|
|
4133
|
+
var ml = (e6) => {
|
|
4133
4134
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4134
4135
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
4135
4136
|
};
|
|
4136
|
-
var
|
|
4137
|
-
if (t2 && !
|
|
4137
|
+
var hl = (e6, t2) => {
|
|
4138
|
+
if (t2 && !ml(e6)) throw e6;
|
|
4138
4139
|
};
|
|
4139
|
-
var
|
|
4140
|
-
var
|
|
4140
|
+
var gl = (e6) => ul(e6.filter((e7) => e7.media?.wixMedia?.videoV2).map(({ _id: e7 }) => e7).filter((e7) => !!e7));
|
|
4141
|
+
var _l = async (e6) => {
|
|
4141
4142
|
try {
|
|
4142
|
-
let { metrics: t2 } = await
|
|
4143
|
+
let { metrics: t2 } = await Cc(e6);
|
|
4143
4144
|
return t2;
|
|
4144
4145
|
} catch {
|
|
4145
4146
|
return;
|
|
4146
4147
|
}
|
|
4147
4148
|
};
|
|
4148
|
-
var
|
|
4149
|
-
var
|
|
4149
|
+
var vl = 100;
|
|
4150
|
+
var yl = async () => {
|
|
4150
4151
|
try {
|
|
4151
|
-
let { categories: e6 } = await
|
|
4152
|
+
let { categories: e6 } = await ac({ paging: { limit: vl } });
|
|
4152
4153
|
return e6 ?? [];
|
|
4153
4154
|
} catch {
|
|
4154
4155
|
return [];
|
|
4155
4156
|
}
|
|
4156
4157
|
};
|
|
4157
|
-
var
|
|
4158
|
+
var bl = (e6, t2) => {
|
|
4158
4159
|
let { categoryIds: n2 } = e6 ?? {};
|
|
4159
4160
|
if (!n2?.length) return [];
|
|
4160
4161
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4161
4162
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4162
4163
|
};
|
|
4163
|
-
var
|
|
4164
|
-
var
|
|
4164
|
+
var xl = 30;
|
|
4165
|
+
var Sl = async (e6) => {
|
|
4165
4166
|
if (!e6?.length) return [];
|
|
4166
4167
|
try {
|
|
4167
|
-
let { items: t2 } = await
|
|
4168
|
+
let { items: t2 } = await Fc().in(`_id`, e6).limit(xl).find();
|
|
4168
4169
|
return t2 ?? [];
|
|
4169
4170
|
} catch {
|
|
4170
4171
|
return [];
|
|
4171
4172
|
}
|
|
4172
4173
|
};
|
|
4173
|
-
var
|
|
4174
|
+
var Cl = (e6, t2) => {
|
|
4174
4175
|
let { tagIds: n2 } = e6 ?? {};
|
|
4175
4176
|
if (!n2?.length) return [];
|
|
4176
4177
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4177
4178
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4178
4179
|
};
|
|
4179
|
-
var Cl = 1e3;
|
|
4180
4180
|
var wl = 1e3;
|
|
4181
|
-
var Tl =
|
|
4181
|
+
var Tl = 1e3;
|
|
4182
|
+
var El = async (e6, t2 = false) => {
|
|
4182
4183
|
try {
|
|
4183
|
-
return (await
|
|
4184
|
+
return (await Sc(e6, { fieldsets: pl })).post;
|
|
4184
4185
|
} catch (e7) {
|
|
4185
|
-
|
|
4186
|
+
hl(e7, t2);
|
|
4186
4187
|
return;
|
|
4187
4188
|
}
|
|
4188
4189
|
};
|
|
4189
|
-
var
|
|
4190
|
-
let n2 =
|
|
4191
|
-
return
|
|
4190
|
+
var Dl = async (e6, t2 = false) => {
|
|
4191
|
+
let n2 = yl();
|
|
4192
|
+
return Ol(await El(e6, t2), n2);
|
|
4192
4193
|
};
|
|
4193
|
-
var
|
|
4194
|
-
let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2, d2] = await Promise.all([r2 ?
|
|
4195
|
-
return { post: e6, author: o2, metrics: s2, categories:
|
|
4194
|
+
var Ol = async (e6, t2) => {
|
|
4195
|
+
let { _id: n2, memberId: r2, tagIds: i2, preview: a2 } = e6 ?? {}, [o2, s2, c2, l2, u2, d2] = await Promise.all([r2 ? Gc(r2) : void 0, n2 ? _l(n2) : void 0, t2, Sl(i2), a2 && n2 ? fl(qc(n2, e6?.language ?? void 0), wl, `post-paywall`).catch(() => void 0) : void 0, fl(gl(e6 ? [e6] : []), Tl, `post-video`).catch(() => ({}))]), f2 = n2 ? d2[n2] : void 0;
|
|
4196
|
+
return { post: e6, author: o2, metrics: s2, categories: bl(e6, c2), tags: Cl(e6, l2), ...u2 && { paywall: u2 }, ...f2 && { videoSources: f2 } };
|
|
4196
4197
|
};
|
|
4197
|
-
var
|
|
4198
|
+
var kl = (e6) => {
|
|
4198
4199
|
let { _id: t2, categoryIds: n2, relatedPostIds: r2 } = e6 ?? {};
|
|
4199
4200
|
return { currentPostId: t2 ?? void 0, categoryIds: n2, relatedPostIds: r2 };
|
|
4200
4201
|
};
|
|
4201
|
-
|
|
4202
|
-
|
|
4202
|
+
v((e6, t2) => {
|
|
4203
|
+
(function() {
|
|
4204
|
+
var e7 = {}.hasOwnProperty;
|
|
4205
|
+
function n2() {
|
|
4206
|
+
for (var e8 = ``, t3 = 0; t3 < arguments.length; t3++) {
|
|
4207
|
+
var n3 = arguments[t3];
|
|
4208
|
+
n3 && (e8 = i2(e8, r2(n3)));
|
|
4209
|
+
}
|
|
4210
|
+
return e8;
|
|
4211
|
+
}
|
|
4212
|
+
function r2(t3) {
|
|
4213
|
+
if (typeof t3 == `string` || typeof t3 == `number`) return t3;
|
|
4214
|
+
if (typeof t3 != `object`) return ``;
|
|
4215
|
+
if (Array.isArray(t3)) return n2.apply(null, t3);
|
|
4216
|
+
if (t3.toString !== Object.prototype.toString && !t3.toString.toString().includes(`[native code]`)) return t3.toString();
|
|
4217
|
+
var r3 = ``;
|
|
4218
|
+
for (var a2 in t3) e7.call(t3, a2) && t3[a2] && (r3 = i2(r3, a2));
|
|
4219
|
+
return r3;
|
|
4220
|
+
}
|
|
4221
|
+
function i2(e8, t3) {
|
|
4222
|
+
return t3 ? e8 ? e8 + ` ` + t3 : e8 + t3 : e8;
|
|
4223
|
+
}
|
|
4224
|
+
t2 !== void 0 && t2.exports ? (n2.default = n2, t2.exports = n2) : typeof define == `function` && typeof define.amd == `object` && define.amd ? define(`classnames`, [], function() {
|
|
4225
|
+
return n2;
|
|
4226
|
+
}) : window.classNames = n2;
|
|
4227
|
+
})();
|
|
4228
|
+
})();
|
|
4229
|
+
var Al = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
4230
|
+
var jl = (e6) => {
|
|
4203
4231
|
try {
|
|
4204
4232
|
return e6.getMonitoringClient?.() ?? null;
|
|
4205
4233
|
} catch {
|
|
4206
4234
|
return null;
|
|
4207
4235
|
}
|
|
4208
4236
|
};
|
|
4209
|
-
var
|
|
4210
|
-
function
|
|
4211
|
-
let
|
|
4212
|
-
if (!
|
|
4213
|
-
let
|
|
4214
|
-
|
|
4237
|
+
var Ml = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
4238
|
+
function Nl(e6, t2, { feature: n2, action: r2, level: i2 = `error`, tags: a2, contexts: o2 }) {
|
|
4239
|
+
let s2 = Ml(e6, `captureException`);
|
|
4240
|
+
if (!s2) return;
|
|
4241
|
+
let c2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
4242
|
+
s2.captureException(c2, { level: i2, tags: { feature: n2, action: r2, ...a2 }, ...o2 ? { contexts: o2 } : {} });
|
|
4215
4243
|
}
|
|
4216
|
-
function
|
|
4217
|
-
let a2 =
|
|
4244
|
+
function Pl(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
4245
|
+
let a2 = Ml(e6, `startSpanManual`);
|
|
4218
4246
|
if (!a2) return i2;
|
|
4219
4247
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
4220
4248
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
4221
4249
|
}
|
|
4222
|
-
var
|
|
4250
|
+
var Fl = class extends n {
|
|
4223
4251
|
state = { error: void 0 };
|
|
4224
4252
|
static getDerivedStateFromError(e6) {
|
|
4225
4253
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4226
4254
|
}
|
|
4227
4255
|
componentDidCatch(e6, t2) {
|
|
4228
|
-
|
|
4256
|
+
Nl(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 } } });
|
|
4229
4257
|
}
|
|
4230
4258
|
render() {
|
|
4231
4259
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4233,64 +4261,64 @@ var Pl = class extends n {
|
|
|
4233
4261
|
return this.props.fallback;
|
|
4234
4262
|
}
|
|
4235
4263
|
};
|
|
4236
|
-
var
|
|
4237
|
-
var
|
|
4264
|
+
var Il = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
|
|
4265
|
+
var Ll = (e6) => {
|
|
4238
4266
|
if (e6 && typeof e6 == `object`) return (typeof e6.$eq == `string` ? e6.$eq : Array.isArray(e6.$in) ? e6.$in.find((e7) => typeof e7 == `string` && e7.trim() !== ``) : void 0)?.trim() || void 0;
|
|
4239
4267
|
};
|
|
4240
|
-
var
|
|
4241
|
-
var
|
|
4242
|
-
var
|
|
4268
|
+
var Rl = `postId`;
|
|
4269
|
+
var zl = (e6) => Ll(e6?.[Rl]);
|
|
4270
|
+
var Bl = (e6) => {
|
|
4243
4271
|
let t2;
|
|
4244
4272
|
try {
|
|
4245
|
-
t2 = m(
|
|
4273
|
+
t2 = m(Zn);
|
|
4246
4274
|
} catch {
|
|
4247
4275
|
return;
|
|
4248
4276
|
}
|
|
4249
|
-
return
|
|
4277
|
+
return ur(t2, e6);
|
|
4250
4278
|
};
|
|
4251
|
-
var
|
|
4252
|
-
function
|
|
4279
|
+
var Vl = 1e4;
|
|
4280
|
+
function Hl(e6) {
|
|
4253
4281
|
let [t2, n2] = f(void 0);
|
|
4254
4282
|
return l(() => {
|
|
4255
4283
|
let t3 = Date.now();
|
|
4256
|
-
t3 - e6 >
|
|
4284
|
+
t3 - e6 > Vl && o(() => n2(t3));
|
|
4257
4285
|
}, []), t2 ?? e6;
|
|
4258
4286
|
}
|
|
4259
|
-
var
|
|
4260
|
-
var Ul = async (e6) => {
|
|
4261
|
-
await Ws({ like: { entityId: e6, fqdn: Hl } });
|
|
4262
|
-
};
|
|
4287
|
+
var Ul = `wix.blog.v3.post`;
|
|
4263
4288
|
var Wl = async (e6) => {
|
|
4264
|
-
await Gs({
|
|
4289
|
+
await Gs({ like: { entityId: e6, fqdn: Ul } });
|
|
4290
|
+
};
|
|
4291
|
+
var Gl = async (e6) => {
|
|
4292
|
+
await Ks({ fqdn: Ul, entityId: e6 });
|
|
4265
4293
|
};
|
|
4266
|
-
var
|
|
4267
|
-
var
|
|
4268
|
-
let [t2, n2] = await Promise.allSettled([
|
|
4269
|
-
return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount:
|
|
4294
|
+
var Kl = (e6) => typeof e6 == `number` ? e6 : void 0;
|
|
4295
|
+
var ql = async (e6) => {
|
|
4296
|
+
let [t2, n2] = await Promise.allSettled([qs().eq(`fqdn`, Ul).eq(`entityId`, e6).limit(1).find(), Cc(e6)]), r2 = n2.status === `fulfilled` ? n2.value.metrics : void 0;
|
|
4297
|
+
return { liked: t2.status === `fulfilled` && t2.value.items.length > 0, likeCount: Kl(r2?.likes), viewCount: Kl(r2?.views), commentCount: Kl(r2?.comments) };
|
|
4270
4298
|
};
|
|
4271
|
-
var
|
|
4272
|
-
var
|
|
4299
|
+
var Jl = I(`@wix/site-service-editor-context`);
|
|
4300
|
+
var Yl = () => {
|
|
4273
4301
|
try {
|
|
4274
|
-
return !!m(
|
|
4302
|
+
return !!m(Jl).previewMode;
|
|
4275
4303
|
} catch {
|
|
4276
4304
|
return false;
|
|
4277
4305
|
}
|
|
4278
4306
|
};
|
|
4279
|
-
var
|
|
4280
|
-
var
|
|
4281
|
-
var
|
|
4307
|
+
var Xl = { liked: false, baselineLiked: false, freshLikeCount: void 0, viewCount: void 0, commentCount: void 0, isLikeCountLoaded: false };
|
|
4308
|
+
var Zl = `wix-blog:post-like-toggled`;
|
|
4309
|
+
var Ql = () => {
|
|
4282
4310
|
let e6 = window;
|
|
4283
|
-
return e6[
|
|
4311
|
+
return e6[Zl] ??= /* @__PURE__ */ new Map();
|
|
4284
4312
|
};
|
|
4285
|
-
var
|
|
4286
|
-
|
|
4313
|
+
var $l = (e6) => {
|
|
4314
|
+
Ql().set(e6.postId, e6.liked), window.dispatchEvent(new CustomEvent(Zl, { detail: e6 }));
|
|
4287
4315
|
};
|
|
4288
|
-
var
|
|
4289
|
-
var
|
|
4290
|
-
let i2 =
|
|
4316
|
+
var eu = (e6, t2) => ({ isLiked: e6.liked, likeCount: Math.max(0, (e6.freshLikeCount ?? t2) + Number(e6.liked) - Number(e6.baselineLiked)), isLikeCountLoaded: e6.isLikeCountLoaded, viewCount: e6.viewCount, commentCount: e6.commentCount });
|
|
4317
|
+
var tu = (e6, t2, n2 = false, r2) => {
|
|
4318
|
+
let i2 = Yl() || n2, [a2, c2] = f(Xl), p2 = d(Xl), m2 = d(t2), h2 = d(/* @__PURE__ */ new Set()), g2 = d(false), _2 = d(false), v2 = d(void 0), y2 = Yn(), [b2, x2] = f(0);
|
|
4291
4319
|
l(() => {
|
|
4292
4320
|
let e7 = y2?.addMemberLoginListener?.(() => {
|
|
4293
|
-
|
|
4321
|
+
Ql().clear(), x2((e8) => e8 + 1);
|
|
4294
4322
|
});
|
|
4295
4323
|
return () => {
|
|
4296
4324
|
e7 !== void 0 && y2?.removeMemberLoginListener?.(e7);
|
|
@@ -4299,21 +4327,21 @@ var eu = (e6, t2, n2 = false, r2) => {
|
|
|
4299
4327
|
let S2 = s((e7) => {
|
|
4300
4328
|
let t3 = p2.current, n3 = { ...t3, ...e7 };
|
|
4301
4329
|
Object.keys(n3).every((e8) => n3[e8] === t3[e8]) || (p2.current = n3, h2.current.forEach((e8) => e8()), o(() => c2(n3)));
|
|
4302
|
-
}, []), C2 = u(() => ({ get: () =>
|
|
4330
|
+
}, []), C2 = u(() => ({ get: () => eu(p2.current, m2.current), subscribe: (e7) => (h2.current.add(e7), () => {
|
|
4303
4331
|
h2.current.delete(e7);
|
|
4304
4332
|
}) }), []);
|
|
4305
4333
|
l(() => {
|
|
4306
4334
|
m2.current !== t2 && (m2.current = t2, h2.current.forEach((e7) => e7()));
|
|
4307
4335
|
}, [t2]), l(() => {
|
|
4308
|
-
if (v2.current !== e6 && (v2.current = e6, S2(
|
|
4336
|
+
if (v2.current !== e6 && (v2.current = e6, S2(Xl)), _2.current = false, !e6 || i2) {
|
|
4309
4337
|
S2({ isLikeCountLoaded: true });
|
|
4310
4338
|
return;
|
|
4311
4339
|
}
|
|
4312
4340
|
let t3 = false;
|
|
4313
|
-
return
|
|
4341
|
+
return ql(e6).then(({ liked: e7, likeCount: n3, viewCount: r3, commentCount: i3 }) => {
|
|
4314
4342
|
t3 || S2({ isLikeCountLoaded: true, viewCount: r3, commentCount: i3, baselineLiked: e7, freshLikeCount: n3, ...!_2.current && { liked: e7 } });
|
|
4315
4343
|
}).catch((n3) => {
|
|
4316
|
-
t3 || S2({ isLikeCountLoaded: true }),
|
|
4344
|
+
t3 || S2({ isLikeCountLoaded: true }), Nl(r2, n3, { feature: Al.likes, action: `read-like-state`, level: `warning`, contexts: { likes: { postId: e6 } } });
|
|
4317
4345
|
}), () => {
|
|
4318
4346
|
t3 = true;
|
|
4319
4347
|
};
|
|
@@ -4321,244 +4349,244 @@ var eu = (e6, t2, n2 = false, r2) => {
|
|
|
4321
4349
|
if (!e6) return;
|
|
4322
4350
|
let t3 = (e7) => {
|
|
4323
4351
|
_2.current = true, S2({ liked: e7 });
|
|
4324
|
-
}, n3 =
|
|
4352
|
+
}, n3 = Ql().get(e6);
|
|
4325
4353
|
n3 !== void 0 && t3(n3);
|
|
4326
4354
|
let r3 = (n4) => {
|
|
4327
4355
|
let { detail: r4 } = n4;
|
|
4328
4356
|
r4.postId === e6 && t3(r4.liked);
|
|
4329
4357
|
};
|
|
4330
|
-
return window.addEventListener(
|
|
4358
|
+
return window.addEventListener(Zl, r3), () => window.removeEventListener(Zl, r3);
|
|
4331
4359
|
}, [e6, S2]);
|
|
4332
4360
|
let ee2 = s(async (t3) => {
|
|
4333
4361
|
if (!e6 || g2.current) return;
|
|
4334
4362
|
_2.current = true;
|
|
4335
4363
|
let n3 = !p2.current.liked;
|
|
4336
|
-
if (S2({ liked: n3 }),
|
|
4364
|
+
if (S2({ liked: n3 }), $l({ postId: e6, liked: n3 }), !i2) {
|
|
4337
4365
|
g2.current = true;
|
|
4338
4366
|
try {
|
|
4339
|
-
await (n3 ?
|
|
4367
|
+
await (n3 ? Wl(e6) : Gl(e6));
|
|
4340
4368
|
} catch (t4) {
|
|
4341
|
-
S2({ liked: !n3 }),
|
|
4369
|
+
S2({ liked: !n3 }), $l({ postId: e6, liked: !n3 }), Nl(r2, t4, { feature: Al.likes, action: n3 ? `like-post` : `unlike-post`, contexts: { likes: { postId: e6 } } });
|
|
4342
4370
|
} finally {
|
|
4343
4371
|
g2.current = false;
|
|
4344
4372
|
}
|
|
4345
4373
|
}
|
|
4346
4374
|
}, [e6, i2, r2, S2]);
|
|
4347
|
-
return {
|
|
4375
|
+
return { ...eu(a2, t2), toggleLike: ee2, liveLikes: C2 };
|
|
4348
4376
|
};
|
|
4349
|
-
var
|
|
4377
|
+
var nu = () => {
|
|
4350
4378
|
try {
|
|
4351
|
-
let { locale: e6, language: t2 } = m(
|
|
4379
|
+
let { locale: e6, language: t2 } = m(xo);
|
|
4352
4380
|
return e6 || t2;
|
|
4353
4381
|
} catch {
|
|
4354
4382
|
return;
|
|
4355
4383
|
}
|
|
4356
4384
|
};
|
|
4357
|
-
var
|
|
4385
|
+
var ru = () => {
|
|
4358
4386
|
try {
|
|
4359
|
-
return
|
|
4387
|
+
return Xc(m(Zn));
|
|
4360
4388
|
} catch {
|
|
4361
4389
|
return;
|
|
4362
4390
|
}
|
|
4363
4391
|
};
|
|
4364
|
-
var
|
|
4392
|
+
var iu = (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);
|
|
4365
4393
|
var Q = { 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` };
|
|
4366
|
-
var
|
|
4367
|
-
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted:
|
|
4394
|
+
var au = (e6, t2) => {
|
|
4395
|
+
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: iu(r2, `full`, t2) });
|
|
4368
4396
|
return { timeToRead: (t3) => e6(Q.timeToRead, { count: t3 }), viewCount: n2(Q.viewCount), commentCount: n2(Q.commentCount), likeCount: n2(Q.likeCount), noPostsEmptyState: () => ({ title: e6(Q.noPostsTitle), description: e6(Q.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(Q.noRelatedPostsTitle), description: e6(Q.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(Q.canvasPostTitle), authorName: () => e6(Q.canvasAuthorName), excerpt: () => e6(Q.canvasExcerpt), content: () => e6(Q.canvasContent), category: () => e6(Q.canvasCategory), categoryNumbered: (t3) => e6(Q.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(Q.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(Q.canvasCoverAlt), authorPhotoAlt: () => e6(Q.canvasAuthorPhotoAlt) } };
|
|
4369
4397
|
};
|
|
4370
|
-
var
|
|
4371
|
-
var
|
|
4372
|
-
var
|
|
4373
|
-
var
|
|
4398
|
+
var ou = i({ isEditor: false, isPreview: false });
|
|
4399
|
+
var su = () => c(ou);
|
|
4400
|
+
var cu = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
4401
|
+
var lu = () => {
|
|
4374
4402
|
try {
|
|
4375
|
-
let { SSR: e6, SEO: t2 } = m(
|
|
4403
|
+
let { SSR: e6, SEO: t2 } = m(Wn);
|
|
4376
4404
|
return e6 || t2;
|
|
4377
4405
|
} catch {
|
|
4378
4406
|
return false;
|
|
4379
4407
|
}
|
|
4380
4408
|
};
|
|
4381
|
-
var
|
|
4382
|
-
let e6 =
|
|
4383
|
-
return su(
|
|
4409
|
+
var uu = () => {
|
|
4410
|
+
let e6 = lu();
|
|
4411
|
+
return cu(su()) && !e6;
|
|
4384
4412
|
};
|
|
4385
|
-
var
|
|
4386
|
-
var
|
|
4413
|
+
var du = (e6) => ({ href: e6 ?? `#`, target: `_self` });
|
|
4414
|
+
var fu = (e6) => {
|
|
4387
4415
|
if (!e6) return;
|
|
4388
4416
|
let t2 = e6 instanceof Date ? e6 : new Date(e6);
|
|
4389
4417
|
return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
|
|
4390
4418
|
};
|
|
4391
|
-
var
|
|
4392
|
-
var
|
|
4393
|
-
var $ = (e6) => ({ text: e6, html: `<p>${
|
|
4394
|
-
var
|
|
4395
|
-
var
|
|
4396
|
-
var
|
|
4397
|
-
var
|
|
4398
|
-
var
|
|
4399
|
-
var
|
|
4419
|
+
var pu = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4420
|
+
var mu = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4421
|
+
var $ = (e6) => ({ text: e6, html: `<p>${mu(e6)}</p>`, linkList: [] });
|
|
4422
|
+
var hu = 6e4;
|
|
4423
|
+
var gu = hu * 60;
|
|
4424
|
+
var _u = gu * 24;
|
|
4425
|
+
var vu = _u * 7;
|
|
4426
|
+
var yu = (e6) => e6 < hu ? [`second`, e6 / 1e3] : e6 < gu ? [`minute`, e6 / hu] : e6 < _u ? [`hour`, e6 / gu] : [`day`, e6 / _u];
|
|
4427
|
+
var bu = (e6, t2, n2 = Date.now()) => {
|
|
4400
4428
|
let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
|
|
4401
|
-
if (i2 >= 0 && i2 <
|
|
4402
|
-
let [e7, n3] =
|
|
4429
|
+
if (i2 >= 0 && i2 < vu) {
|
|
4430
|
+
let [e7, n3] = yu(i2);
|
|
4403
4431
|
return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
|
|
4404
4432
|
}
|
|
4405
4433
|
let a2 = r2.getFullYear() === new Date(n2).getFullYear();
|
|
4406
4434
|
return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
|
|
4407
4435
|
};
|
|
4408
|
-
var
|
|
4409
|
-
var
|
|
4410
|
-
var
|
|
4436
|
+
var xu = `https://static.wixstatic.com/media/`;
|
|
4437
|
+
var Su = 100;
|
|
4438
|
+
var Cu = (e6, t2 = ``) => {
|
|
4411
4439
|
let n2 = e6?.profile?.photo;
|
|
4412
4440
|
if (!n2?.url) return;
|
|
4413
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
4414
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
4415
|
-
};
|
|
4416
|
-
var
|
|
4417
|
-
var
|
|
4418
|
-
var
|
|
4419
|
-
var
|
|
4420
|
-
var
|
|
4441
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(xu) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
4442
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || Su, height: n2.height || Su, alt: r2 ?? t2 };
|
|
4443
|
+
};
|
|
4444
|
+
var wu = `https://static.wixstatic.com/media/`;
|
|
4445
|
+
var Tu = `wix:image://`;
|
|
4446
|
+
var Eu = 1200;
|
|
4447
|
+
var Du = 800;
|
|
4448
|
+
var Ou = (e6) => {
|
|
4421
4449
|
if (!e6) return;
|
|
4422
4450
|
let t2 = Number.parseInt(e6, 10);
|
|
4423
4451
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4424
4452
|
};
|
|
4425
|
-
var
|
|
4426
|
-
if (!e6.startsWith(
|
|
4453
|
+
var ku = (e6) => {
|
|
4454
|
+
if (!e6.startsWith(Tu)) {
|
|
4427
4455
|
let t3 = e6.split(/[?#]/)[0];
|
|
4428
4456
|
return t3 ? { uri: t3 } : void 0;
|
|
4429
4457
|
}
|
|
4430
4458
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
4431
4459
|
if (!r2) return;
|
|
4432
4460
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
4433
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
4461
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: Ou(a2.get(`originWidth`)), height: Ou(a2.get(`originHeight`)) };
|
|
4434
4462
|
};
|
|
4435
|
-
var
|
|
4463
|
+
var Au = (e6, t2) => {
|
|
4436
4464
|
if (!e6) return;
|
|
4437
|
-
let n2 =
|
|
4465
|
+
let n2 = ku(e6);
|
|
4438
4466
|
if (!n2) return;
|
|
4439
4467
|
let r2 = n2.name ?? n2.uri;
|
|
4440
|
-
return { uri: n2.uri, url: `${
|
|
4468
|
+
return { uri: n2.uri, url: `${wu}${n2.uri}`, name: r2, width: n2.width ?? Eu, height: n2.height ?? Du, alt: t2 ?? r2 };
|
|
4441
4469
|
};
|
|
4442
|
-
var
|
|
4470
|
+
var ju = (e6) => {
|
|
4443
4471
|
let t2 = e6?.media?.wixMedia?.image;
|
|
4444
4472
|
if (!t2) return;
|
|
4445
|
-
let n2 =
|
|
4473
|
+
let n2 = ku(t2);
|
|
4446
4474
|
if (!n2) return;
|
|
4447
4475
|
let r2 = n2.name ?? n2.uri;
|
|
4448
|
-
return { uri: n2.uri, url: `${
|
|
4476
|
+
return { uri: n2.uri, url: `${wu}${n2.uri}`, name: r2, width: n2.width ?? Eu, height: n2.height ?? Du, alt: e6?.media?.altText ?? e6?.title ?? r2 };
|
|
4449
4477
|
};
|
|
4450
|
-
var
|
|
4451
|
-
var
|
|
4452
|
-
var
|
|
4478
|
+
var Mu = `https://static.wixstatic.com/media/`;
|
|
4479
|
+
var Nu = `wix:video://`;
|
|
4480
|
+
var Pu = (e6) => {
|
|
4453
4481
|
if (!e6) return;
|
|
4454
4482
|
let t2 = Number.parseInt(e6, 10);
|
|
4455
4483
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4456
4484
|
};
|
|
4457
|
-
var
|
|
4458
|
-
if (!e6.startsWith(
|
|
4485
|
+
var Fu = (e6) => {
|
|
4486
|
+
if (!e6.startsWith(Nu)) return;
|
|
4459
4487
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
|
|
4460
4488
|
if (!r2) return;
|
|
4461
4489
|
let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
|
|
4462
|
-
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${
|
|
4490
|
+
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${Mu}${a2}` : void 0, posterWidth: Pu(i2.get(`posterWidth`)), posterHeight: Pu(i2.get(`posterHeight`)) };
|
|
4463
4491
|
};
|
|
4464
|
-
var
|
|
4465
|
-
var
|
|
4466
|
-
var
|
|
4492
|
+
var Iu = [/https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:[^#]*&)?v=([\w-]+)/i, /https?:\/\/(?:www\.)?youtube\.com\/embed\/([\w-]+)/i, /https?:\/\/youtu\.be\/([\w-]+)/i];
|
|
4493
|
+
var Lu = [/https?:\/\/player\.vimeo\.com\/video\/(\d+)/i, /https?:\/\/vimeo\.com\/(\d+)/i];
|
|
4494
|
+
var Ru = (e6, t2) => {
|
|
4467
4495
|
for (let n2 of e6) {
|
|
4468
4496
|
let e7 = n2.exec(t2);
|
|
4469
4497
|
if (e7) return e7[1];
|
|
4470
4498
|
}
|
|
4471
4499
|
};
|
|
4472
|
-
var
|
|
4473
|
-
let t2 =
|
|
4500
|
+
var zu = (e6) => {
|
|
4501
|
+
let t2 = Ru(Iu, e6);
|
|
4474
4502
|
if (t2) return { provider: `youtube`, embedUrl: `https://www.youtube.com/embed/${t2}?autoplay=1` };
|
|
4475
|
-
let n2 = Lu
|
|
4503
|
+
let n2 = Ru(Lu, e6);
|
|
4476
4504
|
return n2 ? { provider: `vimeo`, embedUrl: `https://player.vimeo.com/video/${n2}?autoplay=1` } : { provider: `unknown` };
|
|
4477
4505
|
};
|
|
4478
|
-
var
|
|
4506
|
+
var Bu = (e6, t2 = []) => {
|
|
4479
4507
|
let n2 = e6?.media;
|
|
4480
4508
|
if (!n2 || n2.displayed === false) return;
|
|
4481
|
-
let r2 =
|
|
4509
|
+
let r2 = ju(e6);
|
|
4482
4510
|
if (r2) return { kind: `image`, image: r2 };
|
|
4483
|
-
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ?
|
|
4511
|
+
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? Fu(n2.wixMedia.videoV2) : void 0;
|
|
4484
4512
|
if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
|
|
4485
4513
|
let o2 = n2.embedMedia?.video?.url;
|
|
4486
4514
|
if (o2) {
|
|
4487
4515
|
let { thumbnail: e7 } = n2.embedMedia ?? {};
|
|
4488
|
-
return { kind: `embed`, videoUrl: o2, ...
|
|
4516
|
+
return { kind: `embed`, videoUrl: o2, ...zu(o2), thumbnailUrl: e7?.url, thumbnailWidth: e7?.width, thumbnailHeight: e7?.height, altText: i2 };
|
|
4489
4517
|
}
|
|
4490
4518
|
};
|
|
4491
|
-
var
|
|
4492
|
-
let t2 =
|
|
4519
|
+
var Vu = (e6) => {
|
|
4520
|
+
let t2 = ju(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4493
4521
|
if (t2 || !n2) return t2;
|
|
4494
|
-
let r2 =
|
|
4522
|
+
let r2 = Fu(n2), i2 = Au(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4495
4523
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4496
4524
|
};
|
|
4497
|
-
var
|
|
4498
|
-
var
|
|
4499
|
-
let n2 =
|
|
4525
|
+
var Hu = (e6, t2) => e6 && t2 ? `${e6}/${encodeURIComponent(t2)}` : void 0;
|
|
4526
|
+
var Uu = (e6, t2) => {
|
|
4527
|
+
let n2 = Hu(e6, t2);
|
|
4500
4528
|
return n2 ? { href: n2, target: `_self` } : void 0;
|
|
4501
4529
|
};
|
|
4502
|
-
var
|
|
4503
|
-
var
|
|
4530
|
+
var Wu = { href: `#`, target: `_self` };
|
|
4531
|
+
var Gu = (e6, t2) => {
|
|
4504
4532
|
let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
|
|
4505
|
-
return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel: $(a2), itemCategoryLink:
|
|
4533
|
+
return { _id: n2 ?? i2 ?? ``, label: a2, itemCategoryLabel: $(a2), itemCategoryLink: Uu(t2, i2 ?? ``), categoryItem: { label: a2, slug: i2 ?? `` } };
|
|
4506
4534
|
};
|
|
4507
|
-
var
|
|
4508
|
-
var
|
|
4535
|
+
var Ku = 2;
|
|
4536
|
+
var qu = (e6) => Array.from({ length: Ku }, (t2, n2) => {
|
|
4509
4537
|
let r2 = e6.canvas.categoryNumbered(n2 + 1);
|
|
4510
|
-
return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel: $(r2), itemCategoryLink:
|
|
4538
|
+
return { _id: `placeholder-category-${n2}`, label: r2, itemCategoryLabel: $(r2), itemCategoryLink: Wu, categoryItem: { label: r2, slug: `` } };
|
|
4511
4539
|
});
|
|
4512
|
-
var
|
|
4540
|
+
var Ju = (e6, t2) => {
|
|
4513
4541
|
let { _id: n2, label: r2, slug: i2 } = e6, a2 = r2 ?? ``;
|
|
4514
|
-
return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel: $(a2), itemTagLink:
|
|
4542
|
+
return { _id: n2 ?? i2 ?? ``, label: a2, itemTagLabel: $(a2), itemTagLink: Uu(t2, i2 ?? ``), tagItem: { label: a2, slug: i2 ?? `` } };
|
|
4515
4543
|
};
|
|
4516
|
-
var
|
|
4517
|
-
var
|
|
4544
|
+
var Yu = 3;
|
|
4545
|
+
var Xu = (e6) => Array.from({ length: Yu }, (t2, n2) => {
|
|
4518
4546
|
let r2 = e6.canvas.tagNumbered(n2 + 1);
|
|
4519
|
-
return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel: $(r2), itemTagLink:
|
|
4547
|
+
return { _id: `placeholder-tag-${n2}`, label: r2, itemTagLabel: $(r2), itemTagLink: Wu, tagItem: { label: r2, slug: `` } };
|
|
4520
4548
|
});
|
|
4521
|
-
var
|
|
4522
|
-
var
|
|
4523
|
-
var
|
|
4524
|
-
var
|
|
4525
|
-
var
|
|
4526
|
-
var
|
|
4527
|
-
var
|
|
4528
|
-
var
|
|
4529
|
-
var
|
|
4530
|
-
let { t: a2 } =
|
|
4549
|
+
var Zu = 1;
|
|
4550
|
+
var Qu = { views: 120, comments: 4, likes: 12 };
|
|
4551
|
+
var $u = (e6) => ({ nodes: [{ type: `PARAGRAPH`, nodes: [{ type: `TEXT`, nodes: [], textData: { text: e6, decorations: [] } }] }] });
|
|
4552
|
+
var ed = (e6, t2, n2, r2) => $(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4553
|
+
var td = (e6, t2, n2) => e6 ?? (n2 ? t2 : void 0);
|
|
4554
|
+
var nd = { nodes: [] };
|
|
4555
|
+
var rd = () => ({ title: $(``), excerpt: $(``), coverImage: void 0, coverMedia: void 0, richContent: nd, authorName: $(``), authorImage: void 0, timeToRead: $(``), publishedDate: $(``), viewCount: $(``), commentCount: $(``), likeCount: $(``), postCategories: [], itemCategoryLabel: $(``), postTags: [], hasCoverImage: false, hasExcerpt: false, hasTags: false, publishedDateValue: void 0, minutesToReadValue: void 0, viewCountValue: void 0, commentCountValue: void 0 });
|
|
4556
|
+
var id = ({ post: e6, author: t2, metrics: n2, categories: r2, tags: i2, videoSources: a2 }, o2, s2, c2 = false, l2 = Date.now(), u2 = {}) => !e6 && !c2 ? rd() : { title: $(e6?.title ?? o2.canvas.postTitle()), excerpt: $(e6?.excerpt ?? o2.canvas.excerpt()), coverImage: Vu(e6), coverMedia: Bu(e6, a2), richContent: e6?.richContent ?? $u(o2.canvas.content()), authorName: $(t2?.profile?.nickname ?? o2.canvas.authorName()), authorImage: Cu(t2, o2.canvas.authorPhotoAlt()), timeToRead: $(typeof e6?.minutesToRead == `number` && e6.minutesToRead > 0 ? o2.timeToRead(e6.minutesToRead) : c2 ? o2.timeToRead(Zu) : ``), publishedDate: $(bu(e6?.firstPublishedDate ?? new Date(l2), s2, l2)), viewCount: ed(n2?.views, Qu.views, c2, o2.viewCount), commentCount: ed(n2?.comments, Qu.comments, c2, o2.commentCount), likeCount: ed(n2?.likes, Qu.likes, c2, o2.likeCount), postCategories: r2.length === 0 && c2 ? qu(o2) : r2.map((e7) => Gu(e7, u2.category)), itemCategoryLabel: $(r2[0]?.label ?? (c2 ? o2.canvas.category() : ``)), postTags: i2.length === 0 && c2 ? Xu(o2) : i2.map((e7) => Ju(e7, u2.tag)), hasCoverImage: !e6 || e6.media?.displayed !== false && Vu(e6) !== void 0, hasExcerpt: !e6 || !!e6.excerpt?.trim(), hasTags: !e6 || i2.length > 0, publishedDateValue: fu(e6?.firstPublishedDate) ?? (c2 ? `2026-05-12T12:00:00.000Z` : void 0), minutesToReadValue: pu(e6?.minutesToRead) ?? (c2 ? Zu : void 0), viewCountValue: td(n2?.views, Qu.views, c2), commentCountValue: td(n2?.comments, Qu.comments, c2) };
|
|
4557
|
+
var ad = ({ postWithAuthor: e6, hasError: t2, monitoringClient: n2, isPostInPreview: r2, postPageBase: i2 }) => {
|
|
4558
|
+
let { t: a2 } = yo(), o2 = nu(), s2 = u(() => au(a2, o2), [a2, o2]), c2 = Hl(e6.fetchedAt), l2 = uu(), { isLiked: d2, likeCount: f2, isLikeCountLoaded: p2, viewCount: m2, commentCount: h2, toggleLike: g2, liveLikes: _2 } = tu(e6.post?._id ?? void 0, e6.metrics?.likes ?? 0, r2, n2), v2 = Bl(er), y2 = Bl(`tag`), b2 = u(() => kl(e6.post), [e6]), x2 = ru(), S2 = u(() => e6.post?.richContent && e6.paywall ? Qc(e6.post.richContent, e6.paywall, x2) : void 0, [e6, x2]);
|
|
4531
4559
|
return u(() => {
|
|
4532
|
-
let n3 =
|
|
4560
|
+
let n3 = id(!e6.post && l2 && e6.demoPost ? { ...e6, post: e6.demoPost } : e6, s2, o2, l2, c2, { category: v2, tag: y2 }), a3 = r2 || !e6.post ? void 0 : lr(e6.post, i2), u2 = a3 ?? (l2 ? du(i2) : void 0);
|
|
4533
4561
|
return { ...n3, ...S2 && { richContent: S2 }, relatedPostsSource: b2, commentingEnabled: e6.post?.commentingEnabled ?? void 0, viewCountValue: m2 ?? n3.viewCountValue, commentCountValue: h2 ?? n3.commentCountValue, itemLink: u2, postUrl: a3?.href, ...e6.post && (e6.metrics?.likes !== void 0 || p2) ? { likeCount: $(s2.likeCount(f2)) } : {}, isLiked: d2, likeCountValue: f2, isLikeCountLoaded: p2, toggleLike: g2, liveLikes: _2, clockValue: c2, isLoadingPost: false, hasError: t2, isEmpty: !e6.post && !l2 };
|
|
4534
4562
|
}, [e6, t2, b2, S2, s2, o2, c2, f2, d2, p2, m2, h2, g2, _2, l2, r2, i2, v2, y2]);
|
|
4535
4563
|
};
|
|
4536
|
-
var
|
|
4537
|
-
var
|
|
4538
|
-
var
|
|
4564
|
+
var od = (e6) => ({ post: e6, hasError: false });
|
|
4565
|
+
var sd = () => ({ post: { post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: Date.now() }, hasError: true });
|
|
4566
|
+
var cd = (e6) => {
|
|
4539
4567
|
throw e6;
|
|
4540
4568
|
};
|
|
4541
|
-
var
|
|
4569
|
+
var ld = { ...rd(), isLiked: false, likeCountValue: 0, isLikeCountLoaded: false, toggleLike: async () => {
|
|
4542
4570
|
}, liveLikes: void 0, postUrl: void 0, itemLink: void 0, clockValue: 0, relatedPostsSource: { currentPostId: void 0, categoryIds: void 0, relatedPostIds: void 0 }, commentingEnabled: void 0, isLoadingPost: true, hasError: false, isEmpty: false };
|
|
4543
|
-
var
|
|
4544
|
-
var
|
|
4545
|
-
var
|
|
4546
|
-
var
|
|
4547
|
-
let { post: a2, hasError: o2 } =
|
|
4548
|
-
return
|
|
4549
|
-
};
|
|
4550
|
-
function
|
|
4551
|
-
let i2 =
|
|
4552
|
-
let e6 =
|
|
4553
|
-
return
|
|
4554
|
-
} }),
|
|
4555
|
-
return h(
|
|
4556
|
-
}
|
|
4557
|
-
var
|
|
4571
|
+
var ud = { ...ld, isLoadingPost: false, hasError: true, isEmpty: true };
|
|
4572
|
+
var dd = 2500;
|
|
4573
|
+
var fd = Promise.resolve(od({ post: void 0, author: void 0, metrics: void 0, categories: [], tags: [], fetchedAt: 0 }));
|
|
4574
|
+
var pd = ({ children: t2, postId: n2, postLoadPromise: r2, monitoringClient: i2 }) => {
|
|
4575
|
+
let { post: a2, hasError: o2 } = Vn(r2), c2 = Xn(a2, s(() => n2 ? El(n2) : Promise.resolve(void 0), [n2])), l2 = ad({ postWithAuthor: c2, hasError: o2, monitoringClient: i2, isPostInPreview: false, postPageBase: dr() });
|
|
4576
|
+
return mr(fr.postByIdProvider, o2 ? `error` : c2.post ? `data` : `empty`), h(e, { value: l2, children: t2 });
|
|
4577
|
+
};
|
|
4578
|
+
function md({ children: t2, postPicker: n2 }) {
|
|
4579
|
+
let i2 = zl(n2), a2 = Gn(), o2 = gr(), s2 = u(() => jl(zn), []), { i18n: c2, locale: l2 } = Go($o), d2 = qn(() => i2 ? Un(Mo({ key: `blog-builder:post-by-id:${i2}`, warmupData: o2, fetchData: () => {
|
|
4580
|
+
let e6 = Dl(i2, a2);
|
|
4581
|
+
return Il(Pl(s2, `post-by-id-read`, { feature: Al.post }, a2 ? fl(e6, dd, `post-by-id`) : e6));
|
|
4582
|
+
} }), od, a2 ? cd : sd) : fd, [i2, a2, o2, s2]);
|
|
4583
|
+
return h(bo, { i18n: c2, children: g(r, { fallback: h(e, { value: ld, children: t2 }), children: [h(Wo, { i18n: c2, locale: l2 }), h(Fl, { fallback: h(e, { value: ud, children: t2 }), feature: Al.post, monitoringClient: s2, rethrow: a2, children: h(pd, { postId: i2, postLoadPromise: d2, monitoringClient: s2, children: t2 }, i2 ?? ``) })] }) });
|
|
4584
|
+
}
|
|
4585
|
+
var hd = Mn(`474ee948-702b-4c0f-970e-b5319eff6d8b`);
|
|
4558
4586
|
export {
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4587
|
+
md as PostByIdProvider,
|
|
4588
|
+
md as default,
|
|
4589
|
+
hd as injectAccessTokenGetter,
|
|
4562
4590
|
t as usePostByIdContext
|
|
4563
4591
|
};
|
|
4564
4592
|
//# sourceMappingURL=context-post-by-id.mjs.map
|