@wix/blog 1.0.713 → 1.0.714
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 +2 -2
- package/_sdk-exports/context-post-by-id/runtime.js +2 -2
- package/_sdk-exports/context-post-by-slug/runtime.js +2 -2
- package/_sdk-exports/context-post-list-item/runtime.js +4 -4
- package/_sdk-exports/context-related-posts/runtime.js +4 -4
- package/build/cjs/context-blog-feed.js +9 -3
- package/build/cjs/context-blog-feed.js.map +1 -1
- package/build/cjs/context-post-by-id.js +118 -111
- package/build/cjs/context-post-by-id.js.map +1 -1
- package/build/cjs/context-post-by-slug.js +9 -3
- package/build/cjs/context-post-by-slug.js.map +1 -1
- package/build/cjs/context-post-list-item.js +596 -589
- package/build/cjs/context-post-list-item.js.map +1 -1
- package/build/cjs/context-related-posts.js +941 -934
- package/build/cjs/context-related-posts.js.map +1 -1
- package/build/es/context-blog-feed.mjs +9 -3
- package/build/es/context-blog-feed.mjs.map +1 -1
- package/build/es/context-post-by-id.mjs +118 -111
- package/build/es/context-post-by-id.mjs.map +1 -1
- package/build/es/context-post-by-slug.mjs +9 -3
- package/build/es/context-post-by-slug.mjs.map +1 -1
- package/build/es/context-post-list-item.mjs +596 -589
- package/build/es/context-post-list-item.mjs.map +1 -1
- package/build/es/context-related-posts.mjs +941 -934
- package/build/es/context-related-posts.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -20,10 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// context-related-posts.ts
|
|
21
21
|
var context_related_posts_exports = {};
|
|
22
22
|
__export(context_related_posts_exports, {
|
|
23
|
-
RelatedPostsProvider: () =>
|
|
24
|
-
default: () =>
|
|
25
|
-
injectAccessTokenGetter: () =>
|
|
26
|
-
useRelatedPostsContext: () =>
|
|
23
|
+
RelatedPostsProvider: () => xu,
|
|
24
|
+
default: () => xu,
|
|
25
|
+
injectAccessTokenGetter: () => Su,
|
|
26
|
+
useRelatedPostsContext: () => lu
|
|
27
27
|
});
|
|
28
28
|
module.exports = __toCommonJS(context_related_posts_exports);
|
|
29
29
|
|
|
@@ -813,21 +813,21 @@ function ln(e6, t2) {
|
|
|
813
813
|
function un(e6) {
|
|
814
814
|
return isFinite(e6) ? e6 : e6.toString();
|
|
815
815
|
}
|
|
816
|
-
function
|
|
816
|
+
function N(e6) {
|
|
817
817
|
return e6 === `NaN` ? NaN : e6 === `Infinity` ? 1 / 0 : e6 === `-Infinity` ? -1 / 0 : e6;
|
|
818
818
|
}
|
|
819
|
-
function
|
|
819
|
+
function dn(e6) {
|
|
820
820
|
return Uint8Array.from(atob(e6), (e7) => e7.charCodeAt(0));
|
|
821
821
|
}
|
|
822
|
-
var
|
|
823
|
-
var
|
|
822
|
+
var fn = `modulepreload`;
|
|
823
|
+
var pn = function(e6, t2) {
|
|
824
824
|
return new URL(e6, t2).href;
|
|
825
825
|
};
|
|
826
|
-
var
|
|
827
|
-
var
|
|
826
|
+
var mn = {};
|
|
827
|
+
var hn = function(e6) {
|
|
828
828
|
return e6.pathname.endsWith(`.css`);
|
|
829
829
|
};
|
|
830
|
-
var
|
|
830
|
+
var gn = function(e6, t2, n2) {
|
|
831
831
|
if (t2 in e6) return e6[t2];
|
|
832
832
|
let r2 = n2();
|
|
833
833
|
if (!r2) {
|
|
@@ -841,7 +841,7 @@ var _n = function(e6, t2, n2) {
|
|
|
841
841
|
});
|
|
842
842
|
return e6[t2] = i2, i2;
|
|
843
843
|
};
|
|
844
|
-
var
|
|
844
|
+
var _n = function(e6, t2, n2) {
|
|
845
845
|
let r2 = Promise.resolve();
|
|
846
846
|
if (t2 && t2.length > 0) {
|
|
847
847
|
let o3 = function(e8) {
|
|
@@ -852,9 +852,9 @@ var vn = function(e6, t2, n2) {
|
|
|
852
852
|
var o2 = o3, s2 = s3;
|
|
853
853
|
let e7, i3 = document.querySelector(`meta[property=csp-nonce]`), a2 = i3?.nonce || i3?.getAttribute(`nonce`);
|
|
854
854
|
r2 = o3(t2.map((t3) => {
|
|
855
|
-
t3 =
|
|
856
|
-
let r3 = s3(t3), i4 =
|
|
857
|
-
return
|
|
855
|
+
t3 = pn(t3, n2);
|
|
856
|
+
let r3 = s3(t3), i4 = hn(r3);
|
|
857
|
+
return gn(mn, r3.href, () => {
|
|
858
858
|
if (e7 === void 0) {
|
|
859
859
|
e7 = { all: /* @__PURE__ */ new Set(), styles: /* @__PURE__ */ new Set() };
|
|
860
860
|
let t5 = document.getElementsByTagName(`link`);
|
|
@@ -865,7 +865,7 @@ var vn = function(e6, t2, n2) {
|
|
|
865
865
|
}
|
|
866
866
|
if ((i4 ? e7.styles : e7.all).has(r3.href)) return;
|
|
867
867
|
let t4 = document.createElement(`link`);
|
|
868
|
-
if (t4.rel = i4 ? `stylesheet` :
|
|
868
|
+
if (t4.rel = i4 ? `stylesheet` : fn, 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) => {
|
|
869
869
|
t4.addEventListener(`load`, e8), t4.addEventListener(`error`, () => n3(Error(`Unable to preload CSS for ${r3}`)));
|
|
870
870
|
});
|
|
871
871
|
});
|
|
@@ -880,30 +880,30 @@ var vn = function(e6, t2, n2) {
|
|
|
880
880
|
return e6().catch(i2);
|
|
881
881
|
});
|
|
882
882
|
};
|
|
883
|
-
var
|
|
884
|
-
var
|
|
885
|
-
var
|
|
886
|
-
var
|
|
887
|
-
let e6 =
|
|
888
|
-
if (e6) return { [
|
|
883
|
+
var vn = `x-wix-linguist`;
|
|
884
|
+
var yn = `00000000-0000-0000-0000-000000000000`;
|
|
885
|
+
var bn = `false`;
|
|
886
|
+
var xn = () => {
|
|
887
|
+
let e6 = wn(`language`), t2 = wn(`locale`);
|
|
888
|
+
if (e6) return { [vn]: [e6, t2 || e6, bn, yn].join(`|`) };
|
|
889
889
|
};
|
|
890
|
-
function
|
|
890
|
+
function Sn() {
|
|
891
891
|
let e6 = null, t2 = null;
|
|
892
892
|
return { promise: new Promise((n2, r2) => {
|
|
893
893
|
e6 = n2, t2 = r2;
|
|
894
894
|
}), resolve: e6, reject: t2 };
|
|
895
895
|
}
|
|
896
|
-
var
|
|
897
|
-
var
|
|
898
|
-
var
|
|
899
|
-
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 =
|
|
900
|
-
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language:
|
|
901
|
-
return
|
|
896
|
+
var Cn = () => (typeof window < `u` ? window.commonConfig : void 0) ?? globalThis.commonConfig;
|
|
897
|
+
var wn = (e6) => Cn()?.[e6];
|
|
898
|
+
var Tn = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host: (t2) => {
|
|
899
|
+
let { applicationId: n2, componentId: r2 } = t2 ?? {}, i2 = typeof window < `u` ? window.wixEmbedsAPI : void 0, a2 = e6(t2), o2 = Dn();
|
|
900
|
+
return { ...a2, apiBaseUrl: o2, getMonitoringClient: i2?.getMonitoringClientFunction?.(n2, r2), essentials: { language: wn(`language`), locale: wn(`locale`), get passThroughHeaders() {
|
|
901
|
+
return xn();
|
|
902
902
|
} } };
|
|
903
903
|
}, auth: (e7) => {
|
|
904
904
|
let t2 = typeof window < `u` ? window.wixEmbedsAPI : void 0;
|
|
905
|
-
!e7 &&
|
|
906
|
-
let n2 = false, { resolve: r2, promise: i2 } =
|
|
905
|
+
!e7 && En() && (e7 = t2?.getAccessTokenFunction?.());
|
|
906
|
+
let n2 = false, { resolve: r2, promise: i2 } = Sn();
|
|
907
907
|
return { getAuthHeaders: async () => {
|
|
908
908
|
if (!e7 && n2 && (e7 = await i2), !e7) throw Error(`Failed to resolve auth token`);
|
|
909
909
|
return { headers: { Authorization: await e7() } };
|
|
@@ -911,37 +911,37 @@ var En = ({ createHost: e6 }) => ({ __type: `host`, create: (e7) => ({}), host:
|
|
|
911
911
|
r2(e8);
|
|
912
912
|
}) };
|
|
913
913
|
} });
|
|
914
|
-
function
|
|
914
|
+
function En() {
|
|
915
915
|
return typeof document < `u` && document.currentScript?.tagName === `SCRIPT`;
|
|
916
916
|
}
|
|
917
|
-
function
|
|
917
|
+
function Dn() {
|
|
918
918
|
let e6 = (typeof window < `u` ? window.wixEmbedsAPI : void 0)?.getExternalBaseUrl?.();
|
|
919
919
|
if (!e6) return;
|
|
920
920
|
let t2 = new URL(e6);
|
|
921
921
|
return t2?.pathname && t2.pathname !== `/` ? `${t2.hostname}${t2.pathname}` : t2.hostname;
|
|
922
922
|
}
|
|
923
|
-
var
|
|
923
|
+
var On = ({ clientSdk: e6, applicationId: t2 }) => ({ invoke: async ({ namespace: n2, method: r2, args: i2 }) => {
|
|
924
924
|
if (!e6) throw Error(`Wix Site SDK only works in a Wix site environment. Learn more: https://dev.wix.com/docs/sdk/host-modules/site/introduction`);
|
|
925
925
|
return e6.invoke({ namespace: n2, method: r2, args: i2, applicationId: t2, accessToken: `accessToken` });
|
|
926
926
|
}, getAccessToken: () => {
|
|
927
927
|
throw Error(`Not implemented`);
|
|
928
928
|
}, observeState: () => ({ disconnect: () => {
|
|
929
929
|
} }) });
|
|
930
|
-
var
|
|
930
|
+
var kn = Tn({ createHost: function(e6) {
|
|
931
931
|
let t2 = (typeof $wixContext < `u` ? $wixContext.clientSdk : void 0) ?? e6?.clientSdk ?? (typeof window < `u` ? window?.clientSdk : void 0), { applicationId: n2 } = e6 || {};
|
|
932
932
|
if (!n2) throw Error(`"createHost" was called without a required field "applicationId"`);
|
|
933
|
-
return { channel:
|
|
933
|
+
return { channel: On({ clientSdk: t2, applicationId: n2 }), close: () => {
|
|
934
934
|
} };
|
|
935
935
|
} });
|
|
936
|
-
var
|
|
937
|
-
let n2 =
|
|
936
|
+
var An = (e6, t2) => {
|
|
937
|
+
let n2 = kn.host({ applicationId: e6, componentId: t2 }), r2 = kn.auth();
|
|
938
938
|
return qe({ auth: r2, host: n2 }).enableContext(`module`), r2.getAccessTokenInjector();
|
|
939
939
|
};
|
|
940
|
-
var
|
|
941
|
-
function
|
|
940
|
+
var jn = (e6) => An(`14bcded7-0066-7c35-14d7-466cb3f09103`, e6);
|
|
941
|
+
function Mn() {
|
|
942
942
|
let e6 = typeof $wixContext < `u` && $wixContext.initWixModules ? $wixContext.initWixModules : globalThis.__wix_context__ !== void 0 && globalThis.__wix_context__.initWixModules ? globalThis.__wix_context__.initWixModules : void 0;
|
|
943
943
|
if (e6) return { initWixModules(t3, n3) {
|
|
944
|
-
return
|
|
944
|
+
return Nn(() => e6(t3, n3));
|
|
945
945
|
}, fetchWithAuth() {
|
|
946
946
|
throw Error(`fetchWithAuth is not available in this context`);
|
|
947
947
|
}, graphql() {
|
|
@@ -951,10 +951,10 @@ function Nn() {
|
|
|
951
951
|
if (t2 || n2) return { initWixModules(e7, r2) {
|
|
952
952
|
if (r2) {
|
|
953
953
|
if (!n2) throw Error(`An elevated client is required to use elevated modules. Make sure to initialize the Wix context with an elevated client before using elevated SDK modules`);
|
|
954
|
-
return
|
|
954
|
+
return Nn(() => n2.use(e7));
|
|
955
955
|
}
|
|
956
956
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
957
|
-
return
|
|
957
|
+
return Nn(() => t2.use(e7));
|
|
958
958
|
}, fetchWithAuth: (e7, n3) => {
|
|
959
959
|
if (!t2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
960
960
|
return t2.fetchWithAuth(e7, n3);
|
|
@@ -966,7 +966,7 @@ function Nn() {
|
|
|
966
966
|
return t2.graphql(e7, n3, r2);
|
|
967
967
|
} };
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function Nn(e6) {
|
|
970
970
|
let t2 = globalThis.__wix_context__, n2 = { client: v.client, elevatedClient: v.elevatedClient }, r2;
|
|
971
971
|
globalThis.__wix_context__ = void 0, v.client = void 0, v.elevatedClient = void 0, typeof $wixContext < `u` && (r2 = { client: $wixContext?.client, elevatedClient: $wixContext?.elevatedClient }, delete $wixContext.client, delete $wixContext.elevatedClient);
|
|
972
972
|
try {
|
|
@@ -975,17 +975,17 @@ function Pn(e6) {
|
|
|
975
975
|
globalThis.__wix_context__ = t2, v.client = n2.client, v.elevatedClient = n2.elevatedClient, typeof $wixContext < `u` && ($wixContext.client = r2.client, $wixContext.elevatedClient = r2.elevatedClient);
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function Pn(e6, t2) {
|
|
979
979
|
return { ...e6, ...Object.fromEntries(t2.map((t3) => [t3, (...n2) => {
|
|
980
|
-
let r2 =
|
|
980
|
+
let r2 = Mn();
|
|
981
981
|
if (!r2) throw Error(`Wix context is not available. Make sure to initialize the Wix context before using SDK modules`);
|
|
982
982
|
return r2.initWixModules(e6)[t3].apply(void 0, n2);
|
|
983
983
|
}])) };
|
|
984
984
|
}
|
|
985
|
-
function
|
|
986
|
-
return
|
|
985
|
+
function Fn(e6) {
|
|
986
|
+
return Pn({ __type: `host`, create: (t2) => Object.entries(e6).reduce((e7, [n2, r2]) => ({ ...e7, [n2]: r2(t2) }), {}) }, Object.keys(e6));
|
|
987
987
|
}
|
|
988
|
-
var
|
|
988
|
+
var In = class {
|
|
989
989
|
constructor(e6) {
|
|
990
990
|
this.message = e6, this.captureException = () => {
|
|
991
991
|
console.error(this.message);
|
|
@@ -1000,13 +1000,13 @@ var Ln = class {
|
|
|
1000
1000
|
};
|
|
1001
1001
|
}
|
|
1002
1002
|
};
|
|
1003
|
-
var
|
|
1004
|
-
var
|
|
1005
|
-
function
|
|
1003
|
+
var Ln = (e6) => new In(e6);
|
|
1004
|
+
var Rn = Fn({ getMonitoringClient: (e6) => () => e6.getMonitoringClient ? e6.getMonitoringClient() : Ln(`Host monitoring client is not available on the current host. Make sure to use an updated version of the host initialization package.`) });
|
|
1005
|
+
function zn(e6) {
|
|
1006
1006
|
let t2 = Promise.resolve(e6);
|
|
1007
1007
|
return t2.status = `fulfilled`, t2.value = e6, t2;
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1009
|
+
function Bn(e6) {
|
|
1010
1010
|
if (e6.status === `fulfilled`) return e6.value;
|
|
1011
1011
|
throw e6.status === `rejected` ? e6.reason : (e6.status === `pending` || (e6.status = `pending`, e6.then((t2) => {
|
|
1012
1012
|
e6.status = `fulfilled`, e6.value = t2;
|
|
@@ -1014,17 +1014,17 @@ function Vn(e6) {
|
|
|
1014
1014
|
e6.status = `rejected`, e6.reason = t2;
|
|
1015
1015
|
})), e6);
|
|
1016
1016
|
}
|
|
1017
|
-
var
|
|
1018
|
-
function
|
|
1019
|
-
let r2 =
|
|
1020
|
-
r2 || (r2 = /* @__PURE__ */ new WeakMap(),
|
|
1017
|
+
var Vn = /* @__PURE__ */ new WeakMap();
|
|
1018
|
+
function Hn(e6, t2, n2) {
|
|
1019
|
+
let r2 = Vn.get(e6);
|
|
1020
|
+
r2 || (r2 = /* @__PURE__ */ new WeakMap(), Vn.set(e6, r2));
|
|
1021
1021
|
let i2 = r2.get(t2);
|
|
1022
1022
|
i2 || (i2 = /* @__PURE__ */ new WeakMap(), r2.set(t2, i2));
|
|
1023
1023
|
let a2 = i2.get(n2);
|
|
1024
1024
|
if (!a2) {
|
|
1025
|
-
if (e6.status === `fulfilled`) a2 =
|
|
1025
|
+
if (e6.status === `fulfilled`) a2 = zn(t2(e6.value));
|
|
1026
1026
|
else if (e6.status === `rejected`) try {
|
|
1027
|
-
a2 =
|
|
1027
|
+
a2 = zn(n2(e6.reason));
|
|
1028
1028
|
} catch {
|
|
1029
1029
|
a2 = e6.then(t2, n2);
|
|
1030
1030
|
}
|
|
@@ -1033,45 +1033,45 @@ function Un(e6, t2, n2) {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
return a2;
|
|
1035
1035
|
}
|
|
1036
|
-
var
|
|
1037
|
-
function
|
|
1036
|
+
var Un = 1e4;
|
|
1037
|
+
function Wn(e6) {
|
|
1038
1038
|
let [t2, n2] = (0, import_react.useState)(void 0);
|
|
1039
1039
|
return (0, import_react.useEffect)(() => {
|
|
1040
1040
|
let t3 = Date.now();
|
|
1041
|
-
t3 - e6 >
|
|
1041
|
+
t3 - e6 > Un && (0, import_react.startTransition)(() => n2(t3));
|
|
1042
1042
|
}, []), t2 ?? e6;
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function P(e6) {
|
|
1045
1045
|
return e6;
|
|
1046
1046
|
}
|
|
1047
|
-
var
|
|
1048
|
-
var
|
|
1047
|
+
var Gn = P(`@wix/site-service-rendering-context`);
|
|
1048
|
+
var Kn = () => {
|
|
1049
1049
|
try {
|
|
1050
|
-
return (0, import_services_manager_react.useService)(
|
|
1050
|
+
return (0, import_services_manager_react.useService)(Gn).SSR;
|
|
1051
1051
|
} catch {
|
|
1052
1052
|
return false;
|
|
1053
1053
|
}
|
|
1054
1054
|
};
|
|
1055
|
-
var
|
|
1056
|
-
function
|
|
1055
|
+
var qn = (e6, t2) => e6.length === t2.length && e6.every((e7, n2) => Object.is(e7, t2[n2]));
|
|
1056
|
+
function Jn(e6, t2) {
|
|
1057
1057
|
let [n2, r2] = (0, import_react.useState)(() => ({ deps: t2, value: e6() }));
|
|
1058
1058
|
return (0, import_react.useEffect)(() => {
|
|
1059
|
-
if (
|
|
1059
|
+
if (qn(n2.deps, t2)) return;
|
|
1060
1060
|
let a2 = e6();
|
|
1061
1061
|
(0, import_react.startTransition)(() => r2({ deps: t2, value: a2 }));
|
|
1062
1062
|
}, t2), n2.value;
|
|
1063
1063
|
}
|
|
1064
|
-
var
|
|
1065
|
-
var
|
|
1066
|
-
var
|
|
1067
|
-
var
|
|
1068
|
-
var
|
|
1069
|
-
var
|
|
1064
|
+
var Yn = P(`@wix/site-service-url`);
|
|
1065
|
+
var Xn = `14bcded7-0066-7c35-14d7-466cb3f09103`;
|
|
1066
|
+
var Zn = `post`;
|
|
1067
|
+
var Qn = `builder-post`;
|
|
1068
|
+
var $n = `__blog_unknown_section__`;
|
|
1069
|
+
var er = (e6) => {
|
|
1070
1070
|
let t2;
|
|
1071
1071
|
try {
|
|
1072
|
-
let n3 = e6.appSectionRelativeUrl(
|
|
1073
|
-
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`,
|
|
1074
|
-
t2 = e6.appSectionRelativeUrl(
|
|
1072
|
+
let n3 = e6.appSectionRelativeUrl(Xn, Qn);
|
|
1073
|
+
if (n3 === e6.appSectionRelativeUrl(`14bcded7-0066-7c35-14d7-466cb3f09103`, $n) && !n3?.endsWith(`/post-page`)) return;
|
|
1074
|
+
t2 = e6.appSectionRelativeUrl(Xn, Qn, true);
|
|
1075
1075
|
} catch {
|
|
1076
1076
|
return;
|
|
1077
1077
|
}
|
|
@@ -1079,12 +1079,12 @@ var tr = (e6) => {
|
|
|
1079
1079
|
let n2 = t2.split(`/`).filter(Boolean);
|
|
1080
1080
|
return n2[n2.length - 1] === `post-page` && n2.pop(), n2.length > 0 ? n2.join(`/`) : void 0;
|
|
1081
1081
|
};
|
|
1082
|
-
var
|
|
1083
|
-
var
|
|
1084
|
-
let t2 =
|
|
1085
|
-
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${
|
|
1082
|
+
var tr = (e6) => `${e6}/${Zn}`;
|
|
1083
|
+
var nr = (e6) => {
|
|
1084
|
+
let t2 = er(e6);
|
|
1085
|
+
if (t2 && e6.siteUrl) return `${e6.siteUrl.replace(/\/+$/, ``)}/${tr(t2)}`;
|
|
1086
1086
|
};
|
|
1087
|
-
var
|
|
1087
|
+
var rr = (e6, t2) => {
|
|
1088
1088
|
if (!e6 || !t2) return;
|
|
1089
1089
|
let n2;
|
|
1090
1090
|
try {
|
|
@@ -1098,14 +1098,14 @@ var ir = (e6, t2) => {
|
|
|
1098
1098
|
if (r2.endsWith(t3) && i2.endsWith(`/post`)) return `${n2.origin}${i2}`;
|
|
1099
1099
|
}
|
|
1100
1100
|
};
|
|
1101
|
-
var
|
|
1101
|
+
var ir = (e6) => {
|
|
1102
1102
|
if (!e6) return;
|
|
1103
1103
|
if (typeof e6 == `string`) return e6;
|
|
1104
1104
|
let { base: t2, path: n2 } = e6;
|
|
1105
1105
|
return t2 ? `${t2.replace(/\/+$/, ``)}${n2 ?? ``}` : void 0;
|
|
1106
1106
|
};
|
|
1107
|
-
var
|
|
1108
|
-
let n2 =
|
|
1107
|
+
var ar = (e6, t2) => {
|
|
1108
|
+
let n2 = ir(e6.url), r2 = `/${Zn}`;
|
|
1109
1109
|
if (!n2 || !t2?.endsWith(r2)) return;
|
|
1110
1110
|
let i2, a2;
|
|
1111
1111
|
try {
|
|
@@ -1116,23 +1116,23 @@ var or = (e6, t2) => {
|
|
|
1116
1116
|
let o2 = a2.slice(0, -r2.length);
|
|
1117
1117
|
return o2 && i2.startsWith(`${o2}/`) && !i2.startsWith(`${a2}/`) ? n2 : void 0;
|
|
1118
1118
|
};
|
|
1119
|
-
var
|
|
1120
|
-
let n2 =
|
|
1119
|
+
var or = (e6, t2) => {
|
|
1120
|
+
let n2 = ar(e6, t2);
|
|
1121
1121
|
if (n2) return { href: n2, target: `_self` };
|
|
1122
1122
|
if (t2 && e6.slug) return { href: `${t2}/${encodeURIComponent(e6.slug)}`, target: `_self` };
|
|
1123
|
-
let r2 =
|
|
1123
|
+
let r2 = ir(e6.url);
|
|
1124
1124
|
return r2 ? { href: r2, target: `_self` } : void 0;
|
|
1125
1125
|
};
|
|
1126
|
-
var
|
|
1126
|
+
var sr = (e6) => {
|
|
1127
1127
|
let t2;
|
|
1128
1128
|
try {
|
|
1129
|
-
t2 = (0, import_services_manager_react.useService)(
|
|
1129
|
+
t2 = (0, import_services_manager_react.useService)(Yn);
|
|
1130
1130
|
} catch {
|
|
1131
1131
|
return;
|
|
1132
1132
|
}
|
|
1133
|
-
return
|
|
1133
|
+
return nr(t2) ?? rr(t2.currentUrl, e6);
|
|
1134
1134
|
};
|
|
1135
|
-
var
|
|
1135
|
+
var cr = (e6, t2) => {
|
|
1136
1136
|
let n2;
|
|
1137
1137
|
try {
|
|
1138
1138
|
n2 = new URL(e6).pathname.split(`/`).filter(Boolean);
|
|
@@ -1152,52 +1152,59 @@ var lr = (e6, t2) => {
|
|
|
1152
1152
|
return i2;
|
|
1153
1153
|
}
|
|
1154
1154
|
};
|
|
1155
|
-
var
|
|
1155
|
+
var lr = () => {
|
|
1156
1156
|
let e6;
|
|
1157
1157
|
try {
|
|
1158
|
-
e6 = (0, import_services_manager_react.useService)(
|
|
1158
|
+
e6 = (0, import_services_manager_react.useService)(Yn);
|
|
1159
1159
|
} catch {
|
|
1160
1160
|
return;
|
|
1161
1161
|
}
|
|
1162
1162
|
if (!e6.currentUrl) return;
|
|
1163
|
-
let t2 =
|
|
1164
|
-
return
|
|
1163
|
+
let t2 = er(e6);
|
|
1164
|
+
return cr(e6.currentUrl, t2 && tr(t2));
|
|
1165
1165
|
};
|
|
1166
|
-
var
|
|
1167
|
-
var
|
|
1168
|
-
var
|
|
1166
|
+
var ur = { categoryHeader: `WixBlog.CategoryHeader`, coverMedia: `WixBlog.PostCoverMedia`, postActions: `WixBlog.PostActionBar`, postCategories: `WixBlog.PostCategoryList`, postCounters: `WixBlog.PostCounterBar`, postMetadata: `WixBlog.PostMetadataBar`, postTags: `WixBlog.PostTagList`, feedProvider: `WixBlog.BlogFeedContextProvider`, postBySlugProvider: `WixBlog.PostBySlugContextProvider`, postByIdProvider: `WixBlog.PostByIdContextProvider`, relatedPostsProvider: `WixBlog.RelatedPostsContextProvider` };
|
|
1167
|
+
var dr = (e6) => `${e6} rendered`;
|
|
1168
|
+
var fr = (e6, t2, n2) => {
|
|
1169
1169
|
(0, import_react.useEffect)(() => {
|
|
1170
1170
|
if (t2 !== `loading` && typeof performance < `u` && typeof performance.mark == `function`) try {
|
|
1171
|
-
performance.mark(
|
|
1171
|
+
performance.mark(dr(e6), { detail: { state: t2, compId: n2 } });
|
|
1172
1172
|
} catch {
|
|
1173
1173
|
}
|
|
1174
1174
|
}, [e6, t2, n2]);
|
|
1175
1175
|
};
|
|
1176
|
-
var
|
|
1177
|
-
var
|
|
1178
|
-
var
|
|
1176
|
+
var pr = P(`@wix/site-service-locale`);
|
|
1177
|
+
var mr = P(`@wix/site-service-renderer-configuration`);
|
|
1178
|
+
var hr = () => {
|
|
1179
1179
|
let e6, t2;
|
|
1180
1180
|
try {
|
|
1181
|
-
e6 = (0, import_services_manager_react.useService)(
|
|
1181
|
+
e6 = (0, import_services_manager_react.useService)(mr).languageCode;
|
|
1182
1182
|
} catch {
|
|
1183
1183
|
}
|
|
1184
1184
|
try {
|
|
1185
|
-
t2 = (0, import_services_manager_react.useService)(
|
|
1185
|
+
t2 = (0, import_services_manager_react.useService)(pr).language;
|
|
1186
1186
|
} catch {
|
|
1187
1187
|
}
|
|
1188
1188
|
return e6 || t2;
|
|
1189
1189
|
};
|
|
1190
|
+
var gr = P(`@wix/viewer-service-multilingual`);
|
|
1190
1191
|
var _r = () => {
|
|
1192
|
+
let e6;
|
|
1191
1193
|
try {
|
|
1192
|
-
let {
|
|
1193
|
-
|
|
1194
|
+
let { multilingualEnabled: t3, currentLocale: n3 } = (0, import_services_manager_react.useService)(gr);
|
|
1195
|
+
t3 && n3 && !n3.primaryLocale && (e6 = n3.regionalFormat);
|
|
1194
1196
|
} catch {
|
|
1195
|
-
return;
|
|
1196
1197
|
}
|
|
1198
|
+
let t2, n2;
|
|
1199
|
+
try {
|
|
1200
|
+
({ locale: t2, language: n2 } = (0, import_services_manager_react.useService)(pr));
|
|
1201
|
+
} catch {
|
|
1202
|
+
}
|
|
1203
|
+
return e6 || t2 || n2;
|
|
1197
1204
|
};
|
|
1198
|
-
var vr =
|
|
1205
|
+
var vr = P(`@wix/site-service-warmup-data`);
|
|
1199
1206
|
function yr() {
|
|
1200
|
-
let e6 =
|
|
1207
|
+
let e6 = Kn(), t2 = null;
|
|
1201
1208
|
try {
|
|
1202
1209
|
t2 = (0, import_services_manager_react.useGetService)()(vr);
|
|
1203
1210
|
} catch {
|
|
@@ -1240,8 +1247,8 @@ var Sr = ({ isDev: e6, loadMessages: t2, loadDevMessages: n2 }) => {
|
|
|
1240
1247
|
};
|
|
1241
1248
|
return (e7) => r2.getOrInsert(e7, () => i2(e7));
|
|
1242
1249
|
};
|
|
1243
|
-
var
|
|
1244
|
-
var
|
|
1250
|
+
var F = (e6) => typeof e6 == `string`;
|
|
1251
|
+
var I = () => {
|
|
1245
1252
|
let e6, t2, n2 = new Promise((n3, r2) => {
|
|
1246
1253
|
e6 = n3, t2 = r2;
|
|
1247
1254
|
});
|
|
@@ -1255,9 +1262,9 @@ var wr = (e6, t2, n2) => {
|
|
|
1255
1262
|
};
|
|
1256
1263
|
var Tr = /###/g;
|
|
1257
1264
|
var Er = (e6) => e6 && e6.includes(`###`) ? e6.replace(Tr, `.`) : e6;
|
|
1258
|
-
var Dr = (e6) => !e6 ||
|
|
1259
|
-
var
|
|
1260
|
-
let r2 =
|
|
1265
|
+
var Dr = (e6) => !e6 || F(e6);
|
|
1266
|
+
var Or = (e6, t2, n2) => {
|
|
1267
|
+
let r2 = F(t2) ? t2.split(`.`) : t2, i2 = 0;
|
|
1261
1268
|
for (; i2 < r2.length - 1; ) {
|
|
1262
1269
|
if (Dr(e6)) return {};
|
|
1263
1270
|
let t3 = Er(r2[i2]);
|
|
@@ -1265,36 +1272,36 @@ var I = (e6, t2, n2) => {
|
|
|
1265
1272
|
}
|
|
1266
1273
|
return Dr(e6) ? {} : { obj: e6, k: Er(r2[i2]) };
|
|
1267
1274
|
};
|
|
1268
|
-
var
|
|
1269
|
-
let { obj: r2, k: i2 } =
|
|
1275
|
+
var kr = (e6, t2, n2) => {
|
|
1276
|
+
let { obj: r2, k: i2 } = Or(e6, t2, Object);
|
|
1270
1277
|
if (r2 !== void 0 || t2.length === 1) {
|
|
1271
1278
|
r2[i2] = n2;
|
|
1272
1279
|
return;
|
|
1273
1280
|
}
|
|
1274
|
-
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 =
|
|
1275
|
-
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 =
|
|
1281
|
+
let a2 = t2[t2.length - 1], o2 = t2.slice(0, t2.length - 1), s2 = Or(e6, o2, Object);
|
|
1282
|
+
for (; s2.obj === void 0 && o2.length; ) a2 = `${o2[o2.length - 1]}.${a2}`, o2 = o2.slice(0, o2.length - 1), s2 = Or(e6, o2, Object), s2?.obj && s2.obj[`${s2.k}.${a2}`] !== void 0 && (s2.obj = void 0);
|
|
1276
1283
|
s2.obj[`${s2.k}.${a2}`] = n2;
|
|
1277
1284
|
};
|
|
1278
|
-
var
|
|
1279
|
-
let { obj: i2, k: a2 } =
|
|
1285
|
+
var Ar = (e6, t2, n2, r2) => {
|
|
1286
|
+
let { obj: i2, k: a2 } = Or(e6, t2, Object);
|
|
1280
1287
|
i2[a2] = i2[a2] || [], i2[a2].push(n2);
|
|
1281
1288
|
};
|
|
1282
|
-
var
|
|
1283
|
-
let { obj: n2, k: r2 } =
|
|
1289
|
+
var jr = (e6, t2) => {
|
|
1290
|
+
let { obj: n2, k: r2 } = Or(e6, t2);
|
|
1284
1291
|
if (n2 && Object.prototype.hasOwnProperty.call(n2, r2)) return n2[r2];
|
|
1285
1292
|
};
|
|
1286
|
-
var jr = (e6, t2, n2) => {
|
|
1287
|
-
let r2 = Ar(e6, n2);
|
|
1288
|
-
return r2 === void 0 ? Ar(t2, n2) : r2;
|
|
1289
|
-
};
|
|
1290
1293
|
var Mr = (e6, t2, n2) => {
|
|
1291
|
-
|
|
1294
|
+
let r2 = jr(e6, n2);
|
|
1295
|
+
return r2 === void 0 ? jr(t2, n2) : r2;
|
|
1296
|
+
};
|
|
1297
|
+
var Nr = (e6, t2, n2) => {
|
|
1298
|
+
for (let r2 in t2) r2 !== `__proto__` && r2 !== `constructor` && (Object.prototype.hasOwnProperty.call(e6, r2) ? F(e6[r2]) || e6[r2] instanceof String || F(t2[r2]) || t2[r2] instanceof String ? n2 && (e6[r2] = t2[r2]) : Nr(e6[r2], t2[r2], n2) : e6[r2] = t2[r2]);
|
|
1292
1299
|
return e6;
|
|
1293
1300
|
};
|
|
1294
1301
|
var L = (e6) => e6.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, `\\$&`);
|
|
1295
|
-
var
|
|
1296
|
-
var
|
|
1297
|
-
var
|
|
1302
|
+
var Pr = { "&": `&`, "<": `<`, ">": `>`, '"': `"`, "'": `'`, "/": `/` };
|
|
1303
|
+
var Fr = (e6) => F(e6) ? e6.replace(/[&<>"'\/]/g, (e7) => Pr[e7]) : e6;
|
|
1304
|
+
var Ir = class {
|
|
1298
1305
|
constructor(e6) {
|
|
1299
1306
|
this.capacity = e6, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
1300
1307
|
}
|
|
@@ -1305,20 +1312,20 @@ var Fr = class {
|
|
|
1305
1312
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e6, n2), this.regExpQueue.push(e6), n2;
|
|
1306
1313
|
}
|
|
1307
1314
|
};
|
|
1308
|
-
var
|
|
1309
|
-
var
|
|
1310
|
-
var
|
|
1315
|
+
var Lr = [` `, `,`, `?`, `!`, `;`];
|
|
1316
|
+
var Rr = new Ir(20);
|
|
1317
|
+
var zr = (e6, t2, n2) => {
|
|
1311
1318
|
t2 ||= ``, n2 ||= ``;
|
|
1312
|
-
let r2 =
|
|
1319
|
+
let r2 = Lr.filter((e7) => !t2.includes(e7) && !n2.includes(e7));
|
|
1313
1320
|
if (r2.length === 0) return true;
|
|
1314
|
-
let i2 =
|
|
1321
|
+
let i2 = Rr.getRegExp(`(${r2.map((e7) => e7 === `?` ? `\\?` : e7).join(`|`)})`), a2 = !i2.test(e6);
|
|
1315
1322
|
if (!a2) {
|
|
1316
1323
|
let t3 = e6.indexOf(n2);
|
|
1317
1324
|
t3 > 0 && !i2.test(e6.substring(0, t3)) && (a2 = true);
|
|
1318
1325
|
}
|
|
1319
1326
|
return a2;
|
|
1320
1327
|
};
|
|
1321
|
-
var
|
|
1328
|
+
var Br = (e6, t2, n2 = `.`) => {
|
|
1322
1329
|
if (!e6) return;
|
|
1323
1330
|
if (e6[t2]) return Object.prototype.hasOwnProperty.call(e6, t2) ? e6[t2] : void 0;
|
|
1324
1331
|
let r2 = t2.split(n2), i2 = e6;
|
|
@@ -1334,8 +1341,8 @@ var zr = (e6, t2, n2 = `.`) => {
|
|
|
1334
1341
|
}
|
|
1335
1342
|
return i2;
|
|
1336
1343
|
};
|
|
1337
|
-
var
|
|
1338
|
-
var
|
|
1344
|
+
var Vr = (e6) => e6?.replace(/_/g, `-`);
|
|
1345
|
+
var Hr = { type: `logger`, log(e6) {
|
|
1339
1346
|
this.output(`log`, e6);
|
|
1340
1347
|
}, warn(e6) {
|
|
1341
1348
|
this.output(`warn`, e6);
|
|
@@ -1344,12 +1351,12 @@ var Br = { type: `logger`, log(e6) {
|
|
|
1344
1351
|
}, output(e6, t2) {
|
|
1345
1352
|
console?.[e6]?.apply?.(console, t2);
|
|
1346
1353
|
} };
|
|
1347
|
-
var
|
|
1354
|
+
var R = new class e2 {
|
|
1348
1355
|
constructor(e6, t2 = {}) {
|
|
1349
1356
|
this.init(e6, t2);
|
|
1350
1357
|
}
|
|
1351
1358
|
init(e6, t2 = {}) {
|
|
1352
|
-
this.prefix = t2.prefix || `i18next:`, this.logger = e6 ||
|
|
1359
|
+
this.prefix = t2.prefix || `i18next:`, this.logger = e6 || Hr, this.options = t2, this.debug = t2.debug;
|
|
1353
1360
|
}
|
|
1354
1361
|
log(...e6) {
|
|
1355
1362
|
return this.forward(e6, `log`, ``, true);
|
|
@@ -1364,7 +1371,7 @@ var z = new class e2 {
|
|
|
1364
1371
|
return this.forward(e6, `warn`, `WARNING DEPRECATED: `, true);
|
|
1365
1372
|
}
|
|
1366
1373
|
forward(e6, t2, n2, r2) {
|
|
1367
|
-
return r2 && !this.debug ? null : (e6 = e6.map((e7) =>
|
|
1374
|
+
return r2 && !this.debug ? null : (e6 = e6.map((e7) => F(e7) ? e7.replace(/[\r\n\x00-\x1F\x7F]/g, ` `) : e7), F(e6[0]) && (e6[0] = `${n2}${this.prefix} ${e6[0]}`), this.logger[t2](e6));
|
|
1368
1375
|
}
|
|
1369
1376
|
create(t2) {
|
|
1370
1377
|
return new e2(this.logger, { prefix: `${this.prefix}:${t2}:`, ...this.options });
|
|
@@ -1373,7 +1380,7 @@ var z = new class e2 {
|
|
|
1373
1380
|
return t2 ||= this.options, t2.prefix = t2.prefix || this.prefix, new e2(this.logger, t2);
|
|
1374
1381
|
}
|
|
1375
1382
|
}();
|
|
1376
|
-
var
|
|
1383
|
+
var Ur = class {
|
|
1377
1384
|
constructor() {
|
|
1378
1385
|
this.observers = {};
|
|
1379
1386
|
}
|
|
@@ -1401,8 +1408,8 @@ var Vr = class {
|
|
|
1401
1408
|
});
|
|
1402
1409
|
}
|
|
1403
1410
|
};
|
|
1404
|
-
var
|
|
1405
|
-
var
|
|
1411
|
+
var Wr = /* @__PURE__ */ new WeakSet();
|
|
1412
|
+
var Gr = class extends Ur {
|
|
1406
1413
|
constructor(e6, t2 = { ns: [`translation`], defaultNS: `translation` }) {
|
|
1407
1414
|
super(), this.data = e6 || {}, this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = true);
|
|
1408
1415
|
}
|
|
@@ -1415,23 +1422,23 @@ var Ur = class extends Vr {
|
|
|
1415
1422
|
}
|
|
1416
1423
|
getResource(e6, t2, n2, r2 = {}) {
|
|
1417
1424
|
let i2 = r2.keySeparator === void 0 ? this.options.keySeparator : r2.keySeparator, a2 = r2.ignoreJSONStructure === void 0 ? this.options.ignoreJSONStructure : r2.ignoreJSONStructure, o2;
|
|
1418
|
-
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) :
|
|
1419
|
-
let s2 =
|
|
1420
|
-
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !
|
|
1425
|
+
e6.includes(`.`) ? o2 = e6.split(`.`) : (o2 = [e6, t2], n2 && (Array.isArray(n2) ? o2.push(...n2) : F(n2) && i2 ? o2.push(...n2.split(i2)) : o2.push(n2)));
|
|
1426
|
+
let s2 = jr(this.data, o2);
|
|
1427
|
+
return !s2 && !t2 && !n2 && e6.includes(`.`) && (e6 = o2[0], t2 = o2[1], n2 = o2.slice(2).join(`.`)), s2 || !a2 || !F(n2) ? s2 : Br(this.data?.[e6]?.[t2], n2, i2);
|
|
1421
1428
|
}
|
|
1422
1429
|
addResource(e6, t2, n2, r2, i2 = { silent: false }) {
|
|
1423
1430
|
let a2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, o2 = [e6, t2];
|
|
1424
|
-
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2),
|
|
1431
|
+
n2 && (o2 = o2.concat(a2 ? n2.split(a2) : n2)), e6.includes(`.`) && (o2 = e6.split(`.`), r2 = t2, t2 = o2[1]), this.addNamespaces(t2), kr(this.data, o2, r2), i2.silent || this.emit(`added`, e6, t2, n2, r2);
|
|
1425
1432
|
}
|
|
1426
1433
|
addResources(e6, t2, n2, r2 = { silent: false }) {
|
|
1427
|
-
for (let r3 in n2) (
|
|
1434
|
+
for (let r3 in n2) (F(n2[r3]) || Array.isArray(n2[r3])) && this.addResource(e6, t2, r3, n2[r3], { silent: true });
|
|
1428
1435
|
r2.silent || this.emit(`added`, e6, t2, n2);
|
|
1429
1436
|
}
|
|
1430
1437
|
addResourceBundle(e6, t2, n2, r2, i2, a2 = { silent: false, skipCopy: false }) {
|
|
1431
1438
|
let o2 = [e6, t2];
|
|
1432
1439
|
e6.includes(`.`) && (o2 = e6.split(`.`), r2 = n2, n2 = t2, t2 = o2[1]), this.addNamespaces(t2);
|
|
1433
|
-
let s2 =
|
|
1434
|
-
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ?
|
|
1440
|
+
let s2 = jr(this.data, o2) || {};
|
|
1441
|
+
a2.skipCopy || (n2 = JSON.parse(JSON.stringify(n2))), r2 ? Nr(s2, n2, i2) : s2 = { ...s2, ...n2 }, kr(this.data, o2, s2), a2.silent || this.emit(`added`, e6, t2, n2);
|
|
1435
1442
|
}
|
|
1436
1443
|
removeResourceBundle(e6, t2) {
|
|
1437
1444
|
this.hasResourceBundle(e6, t2) && delete this.data[e6][t2], this.removeNamespaces(t2), this.emit(`removed`, e6, t2);
|
|
@@ -1449,37 +1456,37 @@ var Ur = class extends Vr {
|
|
|
1449
1456
|
let t2 = this.getDataByLanguage(e6);
|
|
1450
1457
|
return !!(t2 && Object.keys(t2) || []).find((e7) => {
|
|
1451
1458
|
let n2 = t2[e7];
|
|
1452
|
-
return
|
|
1459
|
+
return Wr.has(n2) ? true : !n2 || Object.keys(n2).length === 0 ? false : (typeof n2 == `object` && Wr.add(n2), true);
|
|
1453
1460
|
});
|
|
1454
1461
|
}
|
|
1455
1462
|
toJSON() {
|
|
1456
1463
|
return this.data;
|
|
1457
1464
|
}
|
|
1458
1465
|
};
|
|
1459
|
-
var
|
|
1466
|
+
var Kr = { processors: {}, addPostProcessor(e6) {
|
|
1460
1467
|
this.processors[e6.name] = e6;
|
|
1461
1468
|
}, handle(e6, t2, n2, r2, i2) {
|
|
1462
1469
|
return e6.forEach((e7) => {
|
|
1463
1470
|
t2 = this.processors[e7]?.process(t2, n2, r2, i2) ?? t2;
|
|
1464
1471
|
}), t2;
|
|
1465
1472
|
} };
|
|
1466
|
-
var
|
|
1467
|
-
function
|
|
1473
|
+
var qr = Symbol(`i18next/PATH_KEY`);
|
|
1474
|
+
function Jr() {
|
|
1468
1475
|
let e6 = [], t2 = /* @__PURE__ */ Object.create(null), n2;
|
|
1469
|
-
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 ===
|
|
1476
|
+
return t2.get = (r2, i2) => (n2?.revoke?.(), i2 === qr ? e6 : (e6.push(i2), n2 = Proxy.revocable(r2, t2), n2.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), t2).proxy;
|
|
1470
1477
|
}
|
|
1471
|
-
function
|
|
1472
|
-
let { [
|
|
1478
|
+
function z(e6, t2) {
|
|
1479
|
+
let { [qr]: n2 } = e6(Jr()), r2 = t2?.keySeparator ?? `.`, i2 = t2?.nsSeparator ?? `:`, a2 = t2?.enableSelector === `strict`;
|
|
1473
1480
|
if (n2.length > 1 && i2) {
|
|
1474
1481
|
let e7 = t2?.ns, o2 = a2 ? Array.isArray(e7) ? e7 : e7 ? [e7] : null : Array.isArray(e7) ? e7 : null;
|
|
1475
1482
|
if (o2 && (a2 ? o2 : o2.length > 1 ? o2.slice(1) : []).includes(n2[0])) return `${n2[0]}${i2}${n2.slice(1).join(r2)}`;
|
|
1476
1483
|
}
|
|
1477
1484
|
return n2.join(r2);
|
|
1478
1485
|
}
|
|
1479
|
-
var
|
|
1480
|
-
var
|
|
1486
|
+
var Yr = (e6) => !F(e6) && typeof e6 != `boolean` && typeof e6 != `number`;
|
|
1487
|
+
var Xr = class e3 extends Ur {
|
|
1481
1488
|
constructor(e6, t2 = {}) {
|
|
1482
|
-
super(), wr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger =
|
|
1489
|
+
super(), wr([`resourceStore`, `languageUtils`, `pluralResolver`, `interpolator`, `backendConnector`, `i18nFormat`, `utils`], e6, this), this.options = t2, this.options.keySeparator === void 0 && (this.options.keySeparator = `.`), this.logger = R.create(`translator`), this.checkedLoadedFor = {};
|
|
1483
1490
|
}
|
|
1484
1491
|
changeLanguage(e6) {
|
|
1485
1492
|
e6 && (this.language = e6);
|
|
@@ -1489,33 +1496,33 @@ var Jr = class e3 extends Vr {
|
|
|
1489
1496
|
if (e6 == null) return false;
|
|
1490
1497
|
let r2 = this.resolve(e6, n2);
|
|
1491
1498
|
if (r2?.res === void 0) return false;
|
|
1492
|
-
let i2 =
|
|
1499
|
+
let i2 = Yr(r2.res);
|
|
1493
1500
|
return !(n2.returnObjects === false && i2);
|
|
1494
1501
|
}
|
|
1495
1502
|
extractFromKey(e6, t2) {
|
|
1496
1503
|
let n2 = t2.nsSeparator === void 0 ? this.options.nsSeparator : t2.nsSeparator;
|
|
1497
1504
|
n2 === void 0 && (n2 = `:`);
|
|
1498
|
-
let r2 = t2.keySeparator === void 0 ? this.options.keySeparator : t2.keySeparator, i2 = t2.ns || this.options.defaultNS || [], a2 = n2 && e6.includes(n2), o2 = !this.options.userDefinedKeySeparator && !t2.keySeparator && !this.options.userDefinedNsSeparator && !t2.nsSeparator && !
|
|
1505
|
+
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 && !zr(e6, n2, r2);
|
|
1499
1506
|
if (a2 && !o2) {
|
|
1500
1507
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1501
|
-
if (t3 && t3.length > 0) return { key: e6, namespaces:
|
|
1508
|
+
if (t3 && t3.length > 0) return { key: e6, namespaces: F(i2) ? [i2] : i2 };
|
|
1502
1509
|
let a3 = e6.split(n2);
|
|
1503
1510
|
(n2 !== r2 || n2 === r2 && this.options.ns.includes(a3[0])) && (i2 = a3.shift()), e6 = a3.join(r2);
|
|
1504
1511
|
}
|
|
1505
|
-
return { key: e6, namespaces:
|
|
1512
|
+
return { key: e6, namespaces: F(i2) ? [i2] : i2 };
|
|
1506
1513
|
}
|
|
1507
1514
|
translate(t2, n2, r2) {
|
|
1508
1515
|
let i2 = typeof n2 == `object` ? { ...n2 } : n2;
|
|
1509
1516
|
if (typeof i2 != `object` && this.options.overloadTranslationOptionHandler && (i2 = this.options.overloadTranslationOptionHandler(arguments)), typeof i2 == `object` && (i2 = { ...i2 }), i2 ||= {}, t2 == null) return ``;
|
|
1510
|
-
typeof t2 == `function` && (t2 =
|
|
1517
|
+
typeof t2 == `function` && (t2 = z(t2, { ...this.options, ...i2 })), Array.isArray(t2) || (t2 = [String(t2)]), t2 = t2.map((e6) => typeof e6 == `function` ? z(e6, { ...this.options, ...i2 }) : String(e6));
|
|
1511
1518
|
let a2 = i2.returnDetails === void 0 ? this.options.returnDetails : i2.returnDetails, o2 = i2.keySeparator === void 0 ? this.options.keySeparator : i2.keySeparator, { key: s2, namespaces: c2 } = this.extractFromKey(t2[t2.length - 1], i2), l2 = c2[c2.length - 1], u2 = i2.nsSeparator === void 0 ? this.options.nsSeparator : i2.nsSeparator;
|
|
1512
1519
|
u2 === void 0 && (u2 = `:`);
|
|
1513
1520
|
let d2 = i2.lng || this.language, f2 = i2.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
1514
1521
|
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;
|
|
1515
|
-
let p2 = this.resolve(t2, i2), m2 = p2?.res, h2 = p2?.usedKey || s2, g2 = p2?.exactUsedKey || s2, _2 = [`[object Number]`, `[object Function]`, `[object RegExp]`], v2 = i2.joinArrays === void 0 ? this.options.joinArrays : i2.joinArrays, y2 = !this.i18nFormat || this.i18nFormat.handleAsObject, b2 = i2.count !== void 0 && !
|
|
1522
|
+
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 && !F(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;
|
|
1516
1523
|
y2 && !m2 && x2 && (T2 = w2);
|
|
1517
|
-
let te2 =
|
|
1518
|
-
if (y2 && T2 && te2 && !_2.includes(ne2) && !(
|
|
1524
|
+
let te2 = Yr(T2), ne2 = Object.prototype.toString.apply(T2);
|
|
1525
|
+
if (y2 && T2 && te2 && !_2.includes(ne2) && !(F(v2) && Array.isArray(T2))) {
|
|
1519
1526
|
if (!i2.returnObjects && !this.options.returnObjects) {
|
|
1520
1527
|
this.options.returnedObjectHandler || this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);
|
|
1521
1528
|
let e6 = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(h2, T2, { ...i2, ns: c2 }) : `key '${s2} (${this.language})' returned an object instead of string.`;
|
|
@@ -1525,11 +1532,11 @@ var Jr = class e3 extends Vr {
|
|
|
1525
1532
|
let e6 = Array.isArray(T2), t3 = e6 ? [] : {}, n3 = e6 ? g2 : h2;
|
|
1526
1533
|
for (let e7 in T2) if (Object.prototype.hasOwnProperty.call(T2, e7)) {
|
|
1527
1534
|
let r3 = `${n3}${o2}${e7}`;
|
|
1528
|
-
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue:
|
|
1535
|
+
t3[e7] = x2 && !m2 ? this.translate(r3, { ...i2, defaultValue: Yr(w2) ? w2[e7] : void 0, joinArrays: false, ns: c2 }) : this.translate(r3, { ...i2, joinArrays: false, ns: c2 }), t3[e7] === r3 && (t3[e7] = T2[e7]);
|
|
1529
1536
|
}
|
|
1530
1537
|
m2 = t3;
|
|
1531
1538
|
}
|
|
1532
|
-
} else if (y2 &&
|
|
1539
|
+
} else if (y2 && F(v2) && Array.isArray(m2)) m2 = m2.join(v2), m2 &&= this.extendTranslation(m2, t2, i2, r2);
|
|
1533
1540
|
else {
|
|
1534
1541
|
let e6 = false, n3 = false;
|
|
1535
1542
|
!this.isValidLookup(m2) && x2 && (e6 = true, m2 = w2), this.isValidLookup(m2) || (n3 = true, m2 = s2);
|
|
@@ -1561,30 +1568,30 @@ var Jr = class e3 extends Vr {
|
|
|
1561
1568
|
if (this.i18nFormat?.parse) e6 = this.i18nFormat.parse(e6, { ...this.options.interpolation.defaultVariables, ...n2 }, n2.lng || this.language || r2.usedLng, r2.usedNS, r2.usedKey, { resolved: r2 });
|
|
1562
1569
|
else if (!n2.skipInterpolation) {
|
|
1563
1570
|
n2.interpolation && this.interpolator.init({ ...n2, interpolation: { ...this.options.interpolation, ...n2.interpolation } });
|
|
1564
|
-
let a3 =
|
|
1571
|
+
let a3 = F(e6) && (n2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : n2.interpolation.skipOnVariables), o3;
|
|
1565
1572
|
if (a3) {
|
|
1566
1573
|
let t3 = e6.match(this.interpolator.nestingRegexp);
|
|
1567
1574
|
o3 = t3 && t3.length;
|
|
1568
1575
|
}
|
|
1569
|
-
let s2 = n2.replace && !
|
|
1576
|
+
let s2 = n2.replace && !F(n2.replace) ? n2.replace : n2;
|
|
1570
1577
|
if (this.options.interpolation.defaultVariables && (s2 = { ...this.options.interpolation.defaultVariables, ...s2 }), e6 = this.interpolator.interpolate(e6, s2, n2.lng || this.language || r2.usedLng, n2), a3) {
|
|
1571
1578
|
let t3 = e6.match(this.interpolator.nestingRegexp), r3 = t3 && t3.length;
|
|
1572
1579
|
o3 < r3 && (n2.nest = false);
|
|
1573
1580
|
}
|
|
1574
1581
|
!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();
|
|
1575
1582
|
}
|
|
1576
|
-
let a2 = n2.postProcess || this.options.postProcess, o2 =
|
|
1577
|
-
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 =
|
|
1583
|
+
let a2 = n2.postProcess || this.options.postProcess, o2 = F(a2) ? [a2] : a2;
|
|
1584
|
+
return e6 != null && o2?.length && n2.applyPostProcessor !== false && (e6 = Kr.handle(o2, e6, t2, this.options && this.options.postProcessPassResolved ? { i18nResolved: { ...r2, usedParams: this.getUsedParamsDetails(n2) }, ...n2 } : n2, this)), e6;
|
|
1578
1585
|
}
|
|
1579
1586
|
resolve(e6, t2 = {}) {
|
|
1580
1587
|
let n2, r2, i2, a2, o2;
|
|
1581
|
-
return
|
|
1588
|
+
return F(e6) && (e6 = [e6]), Array.isArray(e6) && (e6 = e6.map((e7) => typeof e7 == `function` ? z(e7, { ...this.options, ...t2 }) : e7)), e6.forEach((e7) => {
|
|
1582
1589
|
if (this.isValidLookup(n2)) return;
|
|
1583
1590
|
let s2 = this.extractFromKey(e7, t2), c2 = s2.key;
|
|
1584
1591
|
r2 = c2;
|
|
1585
1592
|
let l2 = s2.namespaces;
|
|
1586
1593
|
this.options.fallbackNS && (l2 = l2.concat(this.options.fallbackNS));
|
|
1587
|
-
let u2 = t2.count !== void 0 && !
|
|
1594
|
+
let u2 = t2.count !== void 0 && !F(t2.count), d2 = u2 && !t2.ordinal && t2.count === 0, f2 = t2.context !== void 0 && (F(t2.context) || typeof t2.context == `number`) && t2.context !== ``, p2 = t2.lngs ? t2.lngs : this.languageUtils.toResolveHierarchy(t2.lng || this.language, t2.fallbackLng);
|
|
1588
1595
|
l2.forEach((e8) => {
|
|
1589
1596
|
this.isValidLookup(n2) || (o2 = e8, !this.checkedLoadedFor[`${p2[0]}-${e8}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(o2) && (this.checkedLoadedFor[`${p2[0]}-${e8}`] = true, this.logger.warn(`key "${r2}" for languages "${p2.join(`, `)}" won't get resolved as namespace "${o2}" was not yet loaded`, `This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)), p2.forEach((r3) => {
|
|
1590
1597
|
if (this.isValidLookup(n2)) return;
|
|
@@ -1613,7 +1620,7 @@ var Jr = class e3 extends Vr {
|
|
|
1613
1620
|
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e6, t2, n2, r2) : this.resourceStore.getResource(e6, t2, n2, r2);
|
|
1614
1621
|
}
|
|
1615
1622
|
getUsedParamsDetails(e6 = {}) {
|
|
1616
|
-
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !
|
|
1623
|
+
let t2 = [`defaultValue`, `ordinal`, `context`, `replace`, `lng`, `lngs`, `fallbackLng`, `ns`, `keySeparator`, `nsSeparator`, `returnObjects`, `returnDetails`, `joinArrays`, `postProcess`, `interpolation`], n2 = e6.replace && !F(e6.replace), r2 = n2 ? e6.replace : e6;
|
|
1617
1624
|
if (n2 && e6.count !== void 0 && (r2 = { ...r2, count: e6.count }), this.options.interpolation.defaultVariables && (r2 = { ...this.options.interpolation.defaultVariables, ...r2 }), !n2) {
|
|
1618
1625
|
r2 = { ...r2 };
|
|
1619
1626
|
for (let e7 of t2) delete r2[e7];
|
|
@@ -1625,25 +1632,25 @@ var Jr = class e3 extends Vr {
|
|
|
1625
1632
|
return false;
|
|
1626
1633
|
}
|
|
1627
1634
|
};
|
|
1628
|
-
var
|
|
1635
|
+
var Zr = class {
|
|
1629
1636
|
constructor(e6) {
|
|
1630
|
-
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger =
|
|
1637
|
+
this.options = e6, this.supportedLngs = this.options.supportedLngs || false, this.logger = R.create(`languageUtils`), this.resolveHierarchyCache = {};
|
|
1631
1638
|
}
|
|
1632
1639
|
clearCache() {
|
|
1633
1640
|
this.resolveHierarchyCache = {};
|
|
1634
1641
|
}
|
|
1635
1642
|
getScriptPartFromCode(e6) {
|
|
1636
|
-
if (e6 =
|
|
1643
|
+
if (e6 = Vr(e6), !e6 || !e6.includes(`-`)) return null;
|
|
1637
1644
|
let t2 = e6.split(`-`);
|
|
1638
1645
|
return t2.length === 2 || (t2.pop(), t2[t2.length - 1].toLowerCase() === `x`) ? null : this.formatLanguageCode(t2.join(`-`));
|
|
1639
1646
|
}
|
|
1640
1647
|
getLanguagePartFromCode(e6) {
|
|
1641
|
-
if (e6 =
|
|
1648
|
+
if (e6 = Vr(e6), !e6 || !e6.includes(`-`)) return e6;
|
|
1642
1649
|
let t2 = e6.split(`-`);
|
|
1643
1650
|
return this.formatLanguageCode(t2[0]);
|
|
1644
1651
|
}
|
|
1645
1652
|
formatLanguageCode(e6) {
|
|
1646
|
-
if (
|
|
1653
|
+
if (F(e6) && e6.includes(`-`)) {
|
|
1647
1654
|
let t2;
|
|
1648
1655
|
try {
|
|
1649
1656
|
t2 = Intl.getCanonicalLocales(e6)[0];
|
|
@@ -1674,7 +1681,7 @@ var Yr = class {
|
|
|
1674
1681
|
}
|
|
1675
1682
|
getFallbackCodes(e6, t2) {
|
|
1676
1683
|
if (!e6) return [];
|
|
1677
|
-
if (typeof e6 == `function` && (e6 = e6(t2)),
|
|
1684
|
+
if (typeof e6 == `function` && (e6 = e6(t2)), F(e6) && (e6 = [e6]), Array.isArray(e6)) return e6;
|
|
1678
1685
|
if (!t2) return e6.default || [];
|
|
1679
1686
|
let n2 = e6[t2];
|
|
1680
1687
|
return n2 ||= e6[this.getScriptPartFromCode(t2)], n2 ||= e6[this.formatLanguageCode(t2)], n2 ||= e6[this.getLanguagePartFromCode(t2)], n2 ||= e6.default, n2 || [];
|
|
@@ -1682,7 +1689,7 @@ var Yr = class {
|
|
|
1682
1689
|
toResolveHierarchy(e6, t2) {
|
|
1683
1690
|
let n2 = this.options.fallbackLng, r2 = Array.isArray(n2) ? n2.join(`|`) : n2;
|
|
1684
1691
|
r2 !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = r2);
|
|
1685
|
-
let i2 = t2 === void 0 || t2 === false ||
|
|
1692
|
+
let i2 = t2 === void 0 || t2 === false || F(t2), a2 = t2 === void 0 && typeof this.options.fallbackLng == `function`, o2 = F(e6) && i2 && !a2, s2 = null;
|
|
1686
1693
|
if (o2) {
|
|
1687
1694
|
let n3;
|
|
1688
1695
|
n3 = t2 === void 0 ? `undefined` : t2 === false ? `boolean:false` : `string:${t2}`, s2 = `${e6.length}:${e6}|${n3}`;
|
|
@@ -1694,30 +1701,30 @@ var Yr = class {
|
|
|
1694
1701
|
let c2 = this.getFallbackCodes((t2 === false ? [] : t2) || this.options.fallbackLng || [], e6), l2 = [], u2 = (e7) => {
|
|
1695
1702
|
e7 && (this.isSupportedCode(e7) ? l2.push(e7) : this.logger.warn(`rejecting language code not found in supportedLngs: ${e7}`));
|
|
1696
1703
|
};
|
|
1697
|
-
return
|
|
1704
|
+
return F(e6) && (e6.includes(`-`) || e6.includes(`_`)) ? (this.options.load !== `languageOnly` && u2(this.formatLanguageCode(e6)), this.options.load !== `languageOnly` && this.options.load !== `currentOnly` && u2(this.getScriptPartFromCode(e6)), this.options.load !== `currentOnly` && u2(this.getLanguagePartFromCode(e6))) : F(e6) && u2(this.formatLanguageCode(e6)), c2.forEach((e7) => {
|
|
1698
1705
|
let t3 = this.formatLanguageCode(e7);
|
|
1699
1706
|
l2.includes(t3) || u2(t3);
|
|
1700
1707
|
}), s2 === null ? l2 : (this.resolveHierarchyCache[s2] = l2, l2.slice());
|
|
1701
1708
|
}
|
|
1702
1709
|
};
|
|
1703
|
-
var
|
|
1704
|
-
var
|
|
1705
|
-
var
|
|
1710
|
+
var Qr = { zero: 0, one: 1, two: 2, few: 3, many: 4, other: 5 };
|
|
1711
|
+
var $r = { select: (e6) => e6 === 1 ? `one` : `other`, resolvedOptions: () => ({ pluralCategories: [`one`, `other`] }) };
|
|
1712
|
+
var ei = class {
|
|
1706
1713
|
constructor(e6, t2 = {}) {
|
|
1707
|
-
this.languageUtils = e6, this.options = t2, this.logger =
|
|
1714
|
+
this.languageUtils = e6, this.options = t2, this.logger = R.create(`pluralResolver`), this.pluralRulesCache = {};
|
|
1708
1715
|
}
|
|
1709
1716
|
clearCache() {
|
|
1710
1717
|
this.pluralRulesCache = {};
|
|
1711
1718
|
}
|
|
1712
1719
|
getRule(e6, t2 = {}) {
|
|
1713
|
-
let n2 =
|
|
1720
|
+
let n2 = Vr(e6 === `dev` ? `en` : e6), r2 = t2.ordinal ? `ordinal` : `cardinal`, i2 = JSON.stringify({ cleanedCode: n2, type: r2 });
|
|
1714
1721
|
if (i2 in this.pluralRulesCache) return this.pluralRulesCache[i2];
|
|
1715
1722
|
let a2;
|
|
1716
1723
|
try {
|
|
1717
1724
|
a2 = new Intl.PluralRules(n2, { type: r2 });
|
|
1718
1725
|
} catch {
|
|
1719
|
-
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`),
|
|
1720
|
-
if (!e6.match(/-|_/)) return
|
|
1726
|
+
if (typeof Intl > `u`) return this.logger.error(`No Intl support, please use an Intl polyfill!`), $r;
|
|
1727
|
+
if (!e6.match(/-|_/)) return $r;
|
|
1721
1728
|
let n3 = this.languageUtils.getLanguagePartFromCode(e6);
|
|
1722
1729
|
a2 = this.getRule(n3, t2);
|
|
1723
1730
|
}
|
|
@@ -1732,26 +1739,26 @@ var Qr = class {
|
|
|
1732
1739
|
}
|
|
1733
1740
|
getSuffixes(e6, t2 = {}) {
|
|
1734
1741
|
let n2 = this.getRule(e6, t2);
|
|
1735
|
-
return n2 ||= this.getRule(`dev`, t2), n2 ? n2.resolvedOptions().pluralCategories.sort((e7, t3) =>
|
|
1742
|
+
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}`) : [];
|
|
1736
1743
|
}
|
|
1737
1744
|
getSuffix(e6, t2, n2 = {}) {
|
|
1738
1745
|
let r2 = this.getRule(e6, n2);
|
|
1739
1746
|
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));
|
|
1740
1747
|
}
|
|
1741
1748
|
};
|
|
1742
|
-
var
|
|
1743
|
-
let a2 =
|
|
1744
|
-
return !a2 && i2 &&
|
|
1749
|
+
var ti = (e6, t2, n2, r2 = `.`, i2 = true) => {
|
|
1750
|
+
let a2 = Mr(e6, t2, n2);
|
|
1751
|
+
return !a2 && i2 && F(n2) && (a2 = Br(e6, n2, r2), a2 === void 0 && (a2 = Br(t2, n2, r2))), a2;
|
|
1745
1752
|
};
|
|
1746
|
-
var
|
|
1747
|
-
var
|
|
1753
|
+
var ni = (e6) => e6.replace(/\$/g, `$$$$`);
|
|
1754
|
+
var ri = class {
|
|
1748
1755
|
constructor(e6 = {}) {
|
|
1749
|
-
this.logger =
|
|
1756
|
+
this.logger = R.create(`interpolator`), this.options = e6, this.format = e6?.interpolation?.format || ((e7) => e7), this.init(e6);
|
|
1750
1757
|
}
|
|
1751
1758
|
init(e6 = {}) {
|
|
1752
1759
|
e6.interpolation ||= { escapeValue: true };
|
|
1753
1760
|
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;
|
|
1754
|
-
this.escape = t2 === void 0 ?
|
|
1761
|
+
this.escape = t2 === void 0 ? Fr : t2, this.escapeValue = n2 === void 0 || n2, this.useRawValueToEscape = r2 !== void 0 && r2, this.prefix = i2 ? L(i2) : a2 || `{{`, this.suffix = o2 ? L(o2) : s2 || `}}`, this.formatSeparator = c2 || `,`, this.unescapePrefix = l2 ? `` : u2 ? L(u2) : `-`, this.unescapeSuffix = this.unescapePrefix ? `` : l2 ? L(l2) : ``, this.nestingPrefix = d2 ? L(d2) : f2 || L(`$t(`), this.nestingSuffix = p2 ? L(p2) : m2 || L(`)`), this.nestingOptionsSeparator = h2 || `,`, this.maxReplaces = g2 || 1e3, this.alwaysFormat = _2 !== void 0 && _2, this.resetRegExp();
|
|
1755
1762
|
}
|
|
1756
1763
|
reset() {
|
|
1757
1764
|
this.options && this.init(this.options);
|
|
@@ -1763,11 +1770,11 @@ var ti = class {
|
|
|
1763
1770
|
interpolate(e6, t2, n2, r2) {
|
|
1764
1771
|
let i2, a2, o2, s2 = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, c2 = (e7) => {
|
|
1765
1772
|
if (!e7.includes(this.formatSeparator)) {
|
|
1766
|
-
let i4 =
|
|
1773
|
+
let i4 = ti(t2, s2, e7, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
1767
1774
|
return this.alwaysFormat ? this.format(i4, void 0, n2, { ...r2, ...t2, interpolationkey: e7 }) : i4;
|
|
1768
1775
|
}
|
|
1769
1776
|
let i3 = e7.split(this.formatSeparator), a3 = i3.shift().trim(), o3 = i3.join(this.formatSeparator).trim();
|
|
1770
|
-
return this.format(
|
|
1777
|
+
return this.format(ti(t2, s2, a3, this.options.keySeparator, this.options.ignoreJSONStructure), o3, n2, { ...r2, ...t2, interpolationkey: a3 });
|
|
1771
1778
|
};
|
|
1772
1779
|
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.`);
|
|
1773
1780
|
let l2 = r2?.missingInterpolationHandler || this.options.missingInterpolationHandler, u2 = r2?.interpolation?.skipOnVariables === void 0 ? this.options.interpolation.skipOnVariables : r2.interpolation.skipOnVariables;
|
|
@@ -1777,15 +1784,15 @@ var ti = class {
|
|
|
1777
1784
|
if (a2 = c2(n3), a2 === void 0) {
|
|
1778
1785
|
if (typeof l2 == `function`) {
|
|
1779
1786
|
let t4 = l2(e6, i2, r2);
|
|
1780
|
-
a2 =
|
|
1787
|
+
a2 = F(t4) ? t4 : ``;
|
|
1781
1788
|
} else if (r2 && Object.prototype.hasOwnProperty.call(r2, n3)) a2 = ``;
|
|
1782
1789
|
else if (u2) {
|
|
1783
1790
|
a2 = i2[0];
|
|
1784
1791
|
continue;
|
|
1785
1792
|
} else this.logger.warn(`missed to pass in variable ${n3} for interpolating ${e6}`), a2 = ``;
|
|
1786
|
-
} else !
|
|
1793
|
+
} else !F(a2) && !this.useRawValueToEscape && (a2 = Cr(a2));
|
|
1787
1794
|
let s3 = t3.safeValue(a2);
|
|
1788
|
-
if (e6 = e6.replace(i2[0],
|
|
1795
|
+
if (e6 = e6.replace(i2[0], ni(s3)), u2 ? (t3.regex.lastIndex += s3.length, t3.regex.lastIndex -= i2[0].length) : t3.regex.lastIndex = 0, o2++, o2 >= this.maxReplaces) break;
|
|
1789
1796
|
}
|
|
1790
1797
|
}), e6;
|
|
1791
1798
|
}
|
|
@@ -1806,15 +1813,15 @@ var ti = class {
|
|
|
1806
1813
|
}, s2 = new RegExp(this.nestingRegexp), c2 = ``, l2 = 0;
|
|
1807
1814
|
for (; r2 = s2.exec(e6); ) {
|
|
1808
1815
|
let u2 = [];
|
|
1809
|
-
a2 = { ...n2 }, a2 = a2.replace && !
|
|
1816
|
+
a2 = { ...n2 }, a2 = a2.replace && !F(a2.replace) ? a2.replace : a2, a2.applyPostProcessor = false, delete a2.defaultValue;
|
|
1810
1817
|
let d2 = /{.*}/s.test(r2[1]) ? r2[1].lastIndexOf(`}`) + 1 : r2[1].indexOf(this.formatSeparator);
|
|
1811
|
-
if (d2 !== -1 && (u2 = r2[1].slice(d2).split(this.formatSeparator).map((e7) => e7.trim()).filter(Boolean), r2[1] = r2[1].slice(0, d2)), i2 = t2(o2.call(this, r2[1].trim(), a2), a2), i2 && r2[0] === e6 && !
|
|
1812
|
-
|
|
1818
|
+
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 && !F(i2)) return i2;
|
|
1819
|
+
F(i2) || (i2 = Cr(i2)), i2 ||= (this.logger.warn(`missed to resolve ${r2[1]} for nesting ${e6}`), ``), u2.length && (i2 = u2.reduce((e7, t3) => this.format(e7, t3, n2.lng, { ...n2, interpolationkey: r2[1].trim() }), i2.trim())), c2 += e6.slice(l2, r2.index) + Cr(i2), l2 = s2.lastIndex, this.regexp.lastIndex = 0;
|
|
1813
1820
|
}
|
|
1814
1821
|
return l2 ? c2 + e6.slice(l2) : e6;
|
|
1815
1822
|
}
|
|
1816
1823
|
};
|
|
1817
|
-
var
|
|
1824
|
+
var ii = (e6) => {
|
|
1818
1825
|
let t2 = e6.toLowerCase().trim(), n2 = {};
|
|
1819
1826
|
if (e6.includes(`(`)) {
|
|
1820
1827
|
let r2 = e6.split(`(`);
|
|
@@ -1829,23 +1836,23 @@ var ni = (e6) => {
|
|
|
1829
1836
|
}
|
|
1830
1837
|
return { formatName: t2, formatOptions: n2 };
|
|
1831
1838
|
};
|
|
1832
|
-
var
|
|
1839
|
+
var ai = (e6) => {
|
|
1833
1840
|
let t2 = {};
|
|
1834
1841
|
return (n2, r2, i2) => {
|
|
1835
1842
|
let a2 = i2;
|
|
1836
1843
|
i2 && i2.interpolationkey && i2.formatParams && i2.formatParams[i2.interpolationkey] && i2[i2.interpolationkey] && (a2 = { ...a2, [i2.interpolationkey]: void 0 });
|
|
1837
1844
|
let o2 = r2 + JSON.stringify(a2), s2 = t2[o2];
|
|
1838
|
-
return s2 || (s2 = e6(
|
|
1845
|
+
return s2 || (s2 = e6(Vr(r2), i2), t2[o2] = s2), s2(n2);
|
|
1839
1846
|
};
|
|
1840
1847
|
};
|
|
1841
|
-
var
|
|
1842
|
-
var
|
|
1848
|
+
var oi = (e6) => (t2, n2, r2) => e6(Vr(n2), r2)(t2);
|
|
1849
|
+
var si = class {
|
|
1843
1850
|
constructor(e6 = {}) {
|
|
1844
|
-
this.logger =
|
|
1851
|
+
this.logger = R.create(`formatter`), this.options = e6, this.init(e6);
|
|
1845
1852
|
}
|
|
1846
1853
|
init(e6, t2 = { interpolation: {} }) {
|
|
1847
1854
|
this.formatSeparator = t2.interpolation.formatSeparator || `,`;
|
|
1848
|
-
let n2 = t2.cacheInBuiltFormats ?
|
|
1855
|
+
let n2 = t2.cacheInBuiltFormats ? ai : oi;
|
|
1849
1856
|
this.formats = { number: n2((e7, t3) => {
|
|
1850
1857
|
let n3 = new Intl.NumberFormat(e7, { ...t3 });
|
|
1851
1858
|
return (e8) => n3.format(e8);
|
|
@@ -1867,7 +1874,7 @@ var ai = class {
|
|
|
1867
1874
|
this.formats[e6.toLowerCase().trim()] = t2;
|
|
1868
1875
|
}
|
|
1869
1876
|
addCached(e6, t2) {
|
|
1870
|
-
this.formats[e6.toLowerCase().trim()] =
|
|
1877
|
+
this.formats[e6.toLowerCase().trim()] = ai(t2);
|
|
1871
1878
|
}
|
|
1872
1879
|
format(e6, t2, n2, r2 = {}) {
|
|
1873
1880
|
if (!t2 || e6 == null) return e6;
|
|
@@ -1878,7 +1885,7 @@ var ai = class {
|
|
|
1878
1885
|
a2.push(t3);
|
|
1879
1886
|
}
|
|
1880
1887
|
return a2.reduce((e7, t3) => {
|
|
1881
|
-
let { formatName: i3, formatOptions: a3 } =
|
|
1888
|
+
let { formatName: i3, formatOptions: a3 } = ii(t3);
|
|
1882
1889
|
if (this.formats[i3]) {
|
|
1883
1890
|
let t4 = e7;
|
|
1884
1891
|
try {
|
|
@@ -1893,12 +1900,12 @@ var ai = class {
|
|
|
1893
1900
|
}, e6);
|
|
1894
1901
|
}
|
|
1895
1902
|
};
|
|
1896
|
-
var
|
|
1903
|
+
var ci = (e6, t2) => {
|
|
1897
1904
|
e6.pending[t2] !== void 0 && (delete e6.pending[t2], e6.pendingCount--);
|
|
1898
1905
|
};
|
|
1899
|
-
var
|
|
1906
|
+
var li = class extends Ur {
|
|
1900
1907
|
constructor(e6, t2, n2, r2 = {}) {
|
|
1901
|
-
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger =
|
|
1908
|
+
super(), this.backend = e6, this.store = t2, this.services = n2, this.languageUtils = n2.languageUtils, this.options = r2, this.logger = R.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);
|
|
1902
1909
|
}
|
|
1903
1910
|
queueLoad(e6, t2, n2, r2) {
|
|
1904
1911
|
let i2 = {}, a2 = {}, o2 = {}, s2 = {};
|
|
@@ -1915,7 +1922,7 @@ var si = class extends Vr {
|
|
|
1915
1922
|
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);
|
|
1916
1923
|
let o2 = {};
|
|
1917
1924
|
this.queue.forEach((n3) => {
|
|
1918
|
-
|
|
1925
|
+
Ar(n3.loaded, [i2], a2), ci(n3, e6), t2 && n3.errors.push(t2), n3.pendingCount === 0 && !n3.done && (Object.keys(n3.loaded).forEach((e7) => {
|
|
1919
1926
|
o2[e7] || (o2[e7] = {});
|
|
1920
1927
|
let t3 = n3.loaded[e7];
|
|
1921
1928
|
t3.length && t3.forEach((t4) => {
|
|
@@ -1950,7 +1957,7 @@ var si = class extends Vr {
|
|
|
1950
1957
|
}
|
|
1951
1958
|
prepareLoading(e6, t2, n2 = {}, r2) {
|
|
1952
1959
|
if (!this.backend) return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`), r2 && r2();
|
|
1953
|
-
|
|
1960
|
+
F(e6) && (e6 = this.languageUtils.toResolveHierarchy(e6)), F(t2) && (t2 = [t2]);
|
|
1954
1961
|
let i2 = this.queueLoad(e6, t2, n2, r2);
|
|
1955
1962
|
if (!i2.toLoad.length) return i2.pending.length || r2(), null;
|
|
1956
1963
|
i2.toLoad.forEach((e7) => {
|
|
@@ -1987,9 +1994,9 @@ var si = class extends Vr {
|
|
|
1987
1994
|
}
|
|
1988
1995
|
}
|
|
1989
1996
|
};
|
|
1990
|
-
var
|
|
1997
|
+
var ui = () => ({ 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) => {
|
|
1991
1998
|
let t2 = {};
|
|
1992
|
-
if (typeof e6[1] == `object` && (t2 = e6[1]),
|
|
1999
|
+
if (typeof e6[1] == `object` && (t2 = e6[1]), F(e6[1]) && (t2.defaultValue = e6[1]), F(e6[2]) && (t2.tDescription = e6[2]), typeof e6[2] == `object` || typeof e6[3] == `object`) {
|
|
1993
2000
|
let n2 = e6[3] || e6[2];
|
|
1994
2001
|
Object.keys(n2).forEach((e7) => {
|
|
1995
2002
|
t2[e7] = n2[e7];
|
|
@@ -1997,17 +2004,17 @@ var ci = () => ({ debug: false, initAsync: true, ns: [`translation`], defaultNS:
|
|
|
1997
2004
|
}
|
|
1998
2005
|
return t2;
|
|
1999
2006
|
}, interpolation: { escapeValue: true, prefix: `{{`, suffix: `}}`, formatSeparator: `,`, unescapePrefix: `-`, nestingPrefix: `$t(`, nestingSuffix: `)`, nestingOptionsSeparator: `,`, maxReplaces: 1e3, skipOnVariables: true }, cacheInBuiltFormats: true });
|
|
2000
|
-
var
|
|
2001
|
-
var
|
|
2007
|
+
var di = (e6) => (F(e6.ns) && (e6.ns = [e6.ns]), F(e6.fallbackLng) && (e6.fallbackLng = [e6.fallbackLng]), F(e6.fallbackNS) && (e6.fallbackNS = [e6.fallbackNS]), e6.supportedLngs && !e6.supportedLngs.includes(`cimode`) && (e6.supportedLngs = e6.supportedLngs.concat([`cimode`])), e6);
|
|
2008
|
+
var fi = () => {
|
|
2002
2009
|
};
|
|
2003
|
-
var
|
|
2010
|
+
var pi = (e6) => {
|
|
2004
2011
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e6)).forEach((t2) => {
|
|
2005
2012
|
typeof e6[t2] == `function` && (e6[t2] = e6[t2].bind(e6));
|
|
2006
2013
|
});
|
|
2007
2014
|
};
|
|
2008
|
-
var
|
|
2015
|
+
var B = class e4 extends Ur {
|
|
2009
2016
|
constructor(e6 = {}, t2) {
|
|
2010
|
-
if (super(), this.options =
|
|
2017
|
+
if (super(), this.options = di(e6), this.services = {}, this.logger = R, this.modules = { external: [] }, pi(this), t2 && !this.isInitialized && !e6.isClone) {
|
|
2011
2018
|
if (!this.options.initAsync) return this.init(e6, t2), this;
|
|
2012
2019
|
setTimeout(() => {
|
|
2013
2020
|
this.init(e6, t2);
|
|
@@ -2015,26 +2022,26 @@ var V = class e4 extends Vr {
|
|
|
2015
2022
|
}
|
|
2016
2023
|
}
|
|
2017
2024
|
init(e6 = {}, t2) {
|
|
2018
|
-
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (
|
|
2019
|
-
let n2 =
|
|
2020
|
-
this.options = { ...n2, ...this.options, ...
|
|
2025
|
+
this.isInitializing = true, typeof e6 == `function` && (t2 = e6, e6 = {}), e6.defaultNS == null && e6.ns && (F(e6.ns) ? e6.defaultNS = e6.ns : e6.ns.includes(`translation`) || (e6.defaultNS = e6.ns[0]));
|
|
2026
|
+
let n2 = ui();
|
|
2027
|
+
this.options = { ...n2, ...this.options, ...di(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);
|
|
2021
2028
|
let r2 = (e7) => e7 ? typeof e7 == `function` ? new e7() : e7 : null;
|
|
2022
2029
|
if (!this.options.isClone) {
|
|
2023
|
-
this.modules.logger ?
|
|
2030
|
+
this.modules.logger ? R.init(r2(this.modules.logger), this.options) : R.init(null, this.options);
|
|
2024
2031
|
let e7;
|
|
2025
|
-
e7 = this.modules.formatter ? this.modules.formatter :
|
|
2026
|
-
let t3 = new
|
|
2027
|
-
this.store = new
|
|
2032
|
+
e7 = this.modules.formatter ? this.modules.formatter : si;
|
|
2033
|
+
let t3 = new Zr(this.options);
|
|
2034
|
+
this.store = new Gr(this.options.resources, this.options);
|
|
2028
2035
|
let n3 = this.services;
|
|
2029
|
-
n3.logger =
|
|
2036
|
+
n3.logger = R, n3.resourceStore = this.store, n3.languageUtils = t3, n3.pluralResolver = new ei(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 ri(this.options), n3.utils = { hasLoadedNamespace: this.hasLoadedNamespace.bind(this) }, n3.backendConnector = new li(r2(this.modules.backend), n3.resourceStore, n3, this.options), n3.backendConnector.on(`*`, (e8, ...t4) => {
|
|
2030
2037
|
this.emit(e8, ...t4);
|
|
2031
|
-
}), this.modules.languageDetector && (n3.languageDetector = r2(this.modules.languageDetector), n3.languageDetector.init && n3.languageDetector.init(n3, this.options.detection, this.options)), this.modules.i18nFormat && (n3.i18nFormat = r2(this.modules.i18nFormat), n3.i18nFormat.init && n3.i18nFormat.init(this)), this.translator = new
|
|
2038
|
+
}), 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 Xr(this.services, this.options), this.translator.on(`*`, (e8, ...t4) => {
|
|
2032
2039
|
this.emit(e8, ...t4);
|
|
2033
2040
|
}), this.modules.external.forEach((e8) => {
|
|
2034
2041
|
e8.init && e8.init(this);
|
|
2035
2042
|
});
|
|
2036
2043
|
}
|
|
2037
|
-
if (this.format = this.options.interpolation.format, t2 ||=
|
|
2044
|
+
if (this.format = this.options.interpolation.format, t2 ||= fi, this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
2038
2045
|
let e7 = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
2039
2046
|
e7.length > 0 && e7[0] !== `dev` && (this.options.lng = e7[0]);
|
|
2040
2047
|
}
|
|
@@ -2043,7 +2050,7 @@ var V = class e4 extends Vr {
|
|
|
2043
2050
|
}), [`addResource`, `addResources`, `addResourceBundle`, `removeResourceBundle`].forEach((e7) => {
|
|
2044
2051
|
this[e7] = (...t3) => (this.store[e7](...t3), this);
|
|
2045
2052
|
});
|
|
2046
|
-
let i2 =
|
|
2053
|
+
let i2 = I(), a2 = () => {
|
|
2047
2054
|
let e7 = (e8, n3) => {
|
|
2048
2055
|
this.isInitializing = false, this.isInitialized && !this.initializedStoreOnce && this.logger.warn(`init: i18next is already initialized. You should call init just once!`), this.isInitialized = true, this.options.isClone || this.logger.log(`initialized`, this.options), this.emit(`initialized`, this.options), i2.resolve(n3), t2(e8, n3);
|
|
2049
2056
|
};
|
|
@@ -2052,8 +2059,8 @@ var V = class e4 extends Vr {
|
|
|
2052
2059
|
};
|
|
2053
2060
|
return this.options.resources || !this.options.initAsync ? a2() : setTimeout(a2, 0), i2;
|
|
2054
2061
|
}
|
|
2055
|
-
loadResources(e6, t2 =
|
|
2056
|
-
let n2 = t2, r2 =
|
|
2062
|
+
loadResources(e6, t2 = fi) {
|
|
2063
|
+
let n2 = t2, r2 = F(e6) ? e6 : this.language;
|
|
2057
2064
|
if (typeof e6 == `function` && (n2 = e6), !this.options.resources || this.options.partialBundledLanguages) {
|
|
2058
2065
|
if (r2?.toLowerCase() === `cimode` && (!this.options.preload || this.options.preload.length === 0)) return n2();
|
|
2059
2066
|
let e7 = [], t3 = (t4) => {
|
|
@@ -2067,15 +2074,15 @@ var V = class e4 extends Vr {
|
|
|
2067
2074
|
} else n2(null);
|
|
2068
2075
|
}
|
|
2069
2076
|
reloadResources(e6, t2, n2) {
|
|
2070
|
-
let r2 =
|
|
2071
|
-
return typeof e6 == `function` && (n2 = e6, e6 = void 0), typeof t2 == `function` && (n2 = t2, t2 = void 0), e6 ||= this.languages, t2 ||= this.options.ns, n2 ||=
|
|
2077
|
+
let r2 = I();
|
|
2078
|
+
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 ||= fi, this.services.backendConnector.reload(e6, t2, (e7) => {
|
|
2072
2079
|
r2.resolve(), n2(e7);
|
|
2073
2080
|
}), r2;
|
|
2074
2081
|
}
|
|
2075
2082
|
use(e6) {
|
|
2076
2083
|
if (!e6) throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);
|
|
2077
2084
|
if (!e6.type) throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);
|
|
2078
|
-
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` &&
|
|
2085
|
+
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` && Kr.addPostProcessor(e6), e6.type === `formatter` && (this.modules.formatter = e6), e6.type === `3rdParty` && this.modules.external.push(e6), this;
|
|
2079
2086
|
}
|
|
2080
2087
|
setResolvedLanguage(e6) {
|
|
2081
2088
|
if (e6 && this.languages && ![`cimode`, `dev`].includes(e6)) {
|
|
@@ -2091,7 +2098,7 @@ var V = class e4 extends Vr {
|
|
|
2091
2098
|
}
|
|
2092
2099
|
changeLanguage(e6, t2) {
|
|
2093
2100
|
this.isLanguageChangingTo = e6;
|
|
2094
|
-
let n2 =
|
|
2101
|
+
let n2 = I();
|
|
2095
2102
|
this.emit(`languageChanging`, e6);
|
|
2096
2103
|
let r2 = (e7) => {
|
|
2097
2104
|
this.language = e7, this.languages = this.services.languageUtils.toResolveHierarchy(e7), this.resolvedLanguage = void 0, this.setResolvedLanguage(e7);
|
|
@@ -2099,7 +2106,7 @@ var V = class e4 extends Vr {
|
|
|
2099
2106
|
a3 ? this.isLanguageChangingTo === e6 && (r2(a3), this.translator.changeLanguage(a3), this.isLanguageChangingTo = void 0, this.emit(`languageChanged`, a3), this.logger.log(`languageChanged`, a3)) : this.isLanguageChangingTo = void 0, n2.resolve((...e7) => this.t(...e7)), t2 && t2(i3, (...e7) => this.t(...e7));
|
|
2100
2107
|
}, a2 = (t3) => {
|
|
2101
2108
|
!e6 && !t3 && this.services.languageDetector && (t3 = []);
|
|
2102
|
-
let n3 =
|
|
2109
|
+
let n3 = F(t3) ? t3 : t3 && t3[0], a3 = this.store.hasLanguageSomeTranslations(n3) ? n3 : this.services.languageUtils.getBestMatchFromCodes(F(t3) ? [t3] : t3);
|
|
2103
2110
|
a3 && (this.language || r2(a3), this.translator.language || this.translator.changeLanguage(a3), this.services.languageDetector?.cacheUserLanguage?.(a3)), this.loadResources(a3, (e7) => {
|
|
2104
2111
|
i2(e7, a3);
|
|
2105
2112
|
});
|
|
@@ -2113,11 +2120,11 @@ var V = class e4 extends Vr {
|
|
|
2113
2120
|
let s2 = o2.ns !== void 0 && o2.ns !== null;
|
|
2114
2121
|
o2.ns = o2.ns || a2.ns, o2.keyPrefix !== `` && (o2.keyPrefix = o2.keyPrefix || n2 || a2.keyPrefix);
|
|
2115
2122
|
let c2 = { ...this.options, ...o2 };
|
|
2116
|
-
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix =
|
|
2123
|
+
Array.isArray(i2) && !s2 && (c2.ns = i2), typeof o2.keyPrefix == `function` && (o2.keyPrefix = z(o2.keyPrefix, c2));
|
|
2117
2124
|
let l2 = this.options.keySeparator || `.`, u2;
|
|
2118
|
-
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 =
|
|
2125
|
+
return o2.keyPrefix && Array.isArray(e7) ? u2 = e7.map((e8) => (typeof e8 == `function` && (e8 = z(e8, c2)), `${o2.keyPrefix}${l2}${e8}`)) : (typeof e7 == `function` && (e7 = z(e7, c2)), u2 = o2.keyPrefix ? `${o2.keyPrefix}${l2}${e7}` : e7), this.t(u2, o2);
|
|
2119
2126
|
};
|
|
2120
|
-
return
|
|
2127
|
+
return F(e6) ? a2.lng = e6 : a2.lngs = e6, a2.ns = t2, a2.keyPrefix = n2, a2;
|
|
2121
2128
|
}
|
|
2122
2129
|
t(...e6) {
|
|
2123
2130
|
return this.translator?.translate(...e6);
|
|
@@ -2146,16 +2153,16 @@ var V = class e4 extends Vr {
|
|
|
2146
2153
|
return !(s2 && !a2(s2, e6) || r2 && !a2(i2, e6));
|
|
2147
2154
|
}
|
|
2148
2155
|
loadNamespaces(e6, t2) {
|
|
2149
|
-
let n2 =
|
|
2150
|
-
return this.options.ns ? (
|
|
2156
|
+
let n2 = I();
|
|
2157
|
+
return this.options.ns ? (F(e6) && (e6 = [e6]), e6.forEach((e7) => {
|
|
2151
2158
|
this.options.ns.includes(e7) || this.options.ns.push(e7);
|
|
2152
2159
|
}), this.loadResources((e7) => {
|
|
2153
2160
|
n2.resolve(), t2 && t2(e7);
|
|
2154
2161
|
}), n2) : (t2 && t2(), Promise.resolve());
|
|
2155
2162
|
}
|
|
2156
2163
|
loadLanguages(e6, t2) {
|
|
2157
|
-
let n2 =
|
|
2158
|
-
|
|
2164
|
+
let n2 = I();
|
|
2165
|
+
F(e6) && (e6 = [e6]);
|
|
2159
2166
|
let r2 = this.options.preload || [], i2 = e6.filter((e7) => !r2.includes(e7) && this.services.languageUtils.isSupportedCode(e7));
|
|
2160
2167
|
return i2.length ? (this.options.preload = r2.concat(i2), this.loadResources((e7) => {
|
|
2161
2168
|
n2.resolve(), t2 && t2(e7);
|
|
@@ -2171,24 +2178,24 @@ var V = class e4 extends Vr {
|
|
|
2171
2178
|
}
|
|
2172
2179
|
} catch {
|
|
2173
2180
|
}
|
|
2174
|
-
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
|
|
2181
|
+
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 Zr(ui());
|
|
2175
2182
|
return e6.toLowerCase().indexOf(`-latn`) > 1 ? `ltr` : t2.includes(n2.getLanguagePartFromCode(e6)) || e6.toLowerCase().indexOf(`-arab`) > 1 ? `rtl` : `ltr`;
|
|
2176
2183
|
}
|
|
2177
2184
|
static createInstance(t2 = {}, n2) {
|
|
2178
2185
|
let r2 = new e4(t2, n2);
|
|
2179
2186
|
return r2.createInstance = e4.createInstance, r2;
|
|
2180
2187
|
}
|
|
2181
|
-
cloneInstance(t2 = {}, n2 =
|
|
2188
|
+
cloneInstance(t2 = {}, n2 = fi) {
|
|
2182
2189
|
let r2 = t2.forkResourceStore;
|
|
2183
2190
|
r2 && delete t2.forkResourceStore;
|
|
2184
2191
|
let i2 = { ...this.options, preload: false, ...t2, isClone: true }, a2 = new e4(i2);
|
|
2185
2192
|
if ((t2.debug !== void 0 || t2.prefix !== void 0) && (a2.logger = a2.logger.clone(t2)), [`store`, `services`, `language`].forEach((e6) => {
|
|
2186
2193
|
a2[e6] = this[e6];
|
|
2187
|
-
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new
|
|
2188
|
-
let e6 = { ...
|
|
2189
|
-
a2.services.interpolator = new
|
|
2194
|
+
}), a2.services = { ...this.services }, a2.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, r2 && (a2.store = new Gr(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) {
|
|
2195
|
+
let e6 = { ...ui().interpolation, ...this.options.interpolation, ...t2.interpolation }, n3 = { ...i2, interpolation: e6 };
|
|
2196
|
+
a2.services.interpolator = new ri(n3);
|
|
2190
2197
|
}
|
|
2191
|
-
return a2.translator = new
|
|
2198
|
+
return a2.translator = new Xr(a2.services, i2), a2.translator.on(`*`, (e6, ...t3) => {
|
|
2192
2199
|
a2.emit(e6, ...t3);
|
|
2193
2200
|
}), a2.init(i2, n2), a2.translator.options = i2, a2.translator.backendConnector.services.utils = { hasLoadedNamespace: a2.hasLoadedNamespace.bind(a2) }, a2;
|
|
2194
2201
|
}
|
|
@@ -2196,9 +2203,9 @@ var V = class e4 extends Vr {
|
|
|
2196
2203
|
return { options: this.options, store: this.store, language: this.language, languages: this.languages, resolvedLanguage: this.resolvedLanguage };
|
|
2197
2204
|
}
|
|
2198
2205
|
}.createInstance();
|
|
2199
|
-
|
|
2200
|
-
var
|
|
2201
|
-
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 =
|
|
2206
|
+
B.createInstance, B.dir, B.init, B.loadResources, B.reloadResources, B.use, B.changeLanguage, B.getFixedT, B.t, B.exists, B.setDefaultNamespace, B.hasLoadedNamespace, B.loadNamespaces, B.loadLanguages;
|
|
2207
|
+
var mi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 = false, disableAutoInit: i2 = false, bindI18n: a2 }, { icu: o2 } = {}) => {
|
|
2208
|
+
let s2 = { lng: e6, fallbackLng: `en`, keySeparator: false, react: { useSuspense: r2, bindI18n: a2 }, _polyfill: { isLoading: false } }, c2 = B.createInstance(i2 ? s2 : void 0);
|
|
2202
2209
|
return o2 && c2.use(o2), t2 && c2.use({ type: `backend`, read: async (e7, n3, r3) => {
|
|
2203
2210
|
try {
|
|
2204
2211
|
return r3(null, await t2(e7));
|
|
@@ -2207,38 +2214,38 @@ var fi = ({ locale: e6, asyncMessagesLoader: t2, messages: n2, useSuspense: r2 =
|
|
|
2207
2214
|
}
|
|
2208
2215
|
} }), n2 && (s2.resources = { [e6]: { translation: n2 } }), i2 || c2.init(s2), c2;
|
|
2209
2216
|
};
|
|
2210
|
-
function
|
|
2211
|
-
let n2 = t2 && t2.cache ? t2.cache :
|
|
2212
|
-
return (t2 && t2.strategy ? t2.strategy :
|
|
2217
|
+
function hi(e6, t2) {
|
|
2218
|
+
let n2 = t2 && t2.cache ? t2.cache : Ti, r2 = t2 && t2.serializer ? t2.serializer : Ci;
|
|
2219
|
+
return (t2 && t2.strategy ? t2.strategy : bi)(e6, { cache: n2, serializer: r2 });
|
|
2213
2220
|
}
|
|
2214
|
-
function
|
|
2221
|
+
function gi(e6) {
|
|
2215
2222
|
return e6 == null || typeof e6 == `number` || typeof e6 == `boolean`;
|
|
2216
2223
|
}
|
|
2217
|
-
function
|
|
2218
|
-
let i2 =
|
|
2224
|
+
function _i(e6, t2, n2, r2) {
|
|
2225
|
+
let i2 = gi(r2) ? r2 : n2(r2), a2 = t2.get(i2);
|
|
2219
2226
|
return a2 === void 0 && (a2 = e6.call(this, r2), t2.set(i2, a2)), a2;
|
|
2220
2227
|
}
|
|
2221
|
-
function
|
|
2228
|
+
function vi(e6, t2, n2) {
|
|
2222
2229
|
let r2 = Array.prototype.slice.call(arguments, 3), i2 = n2(r2), a2 = t2.get(i2);
|
|
2223
2230
|
return a2 === void 0 && (a2 = e6.apply(this, r2), t2.set(i2, a2)), a2;
|
|
2224
2231
|
}
|
|
2225
|
-
function
|
|
2232
|
+
function yi(e6, t2, n2, r2, i2) {
|
|
2226
2233
|
return n2.bind(t2, e6, r2, i2);
|
|
2227
2234
|
}
|
|
2228
|
-
function
|
|
2229
|
-
let n2 = e6.length === 1 ?
|
|
2230
|
-
return
|
|
2235
|
+
function bi(e6, t2) {
|
|
2236
|
+
let n2 = e6.length === 1 ? _i : vi;
|
|
2237
|
+
return yi(e6, this, n2, t2.cache.create(), t2.serializer);
|
|
2231
2238
|
}
|
|
2232
|
-
function
|
|
2233
|
-
return
|
|
2239
|
+
function xi(e6, t2) {
|
|
2240
|
+
return yi(e6, this, vi, t2.cache.create(), t2.serializer);
|
|
2234
2241
|
}
|
|
2235
|
-
function
|
|
2236
|
-
return
|
|
2242
|
+
function Si(e6, t2) {
|
|
2243
|
+
return yi(e6, this, _i, t2.cache.create(), t2.serializer);
|
|
2237
2244
|
}
|
|
2238
|
-
var
|
|
2245
|
+
var Ci = function() {
|
|
2239
2246
|
return JSON.stringify(arguments);
|
|
2240
2247
|
};
|
|
2241
|
-
var
|
|
2248
|
+
var wi = class {
|
|
2242
2249
|
constructor() {
|
|
2243
2250
|
this.cache = /* @__PURE__ */ Object.create(null);
|
|
2244
2251
|
}
|
|
@@ -2249,14 +2256,14 @@ var Si = class {
|
|
|
2249
2256
|
this.cache[e6] = t2;
|
|
2250
2257
|
}
|
|
2251
2258
|
};
|
|
2252
|
-
var
|
|
2253
|
-
return new
|
|
2259
|
+
var Ti = { create: function() {
|
|
2260
|
+
return new wi();
|
|
2254
2261
|
} };
|
|
2255
|
-
var
|
|
2256
|
-
var
|
|
2257
|
-
function
|
|
2262
|
+
var Ei = { variadic: xi, monadic: Si };
|
|
2263
|
+
var Di = /(?:[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;
|
|
2264
|
+
function Oi(e6) {
|
|
2258
2265
|
let t2 = {};
|
|
2259
|
-
return e6.replace(
|
|
2266
|
+
return e6.replace(Di, (e7) => {
|
|
2260
2267
|
let n2 = e7.length;
|
|
2261
2268
|
switch (e7[0]) {
|
|
2262
2269
|
case `G`:
|
|
@@ -2343,10 +2350,10 @@ function Ei(e6) {
|
|
|
2343
2350
|
return ``;
|
|
2344
2351
|
}), t2;
|
|
2345
2352
|
}
|
|
2346
|
-
var
|
|
2347
|
-
function
|
|
2353
|
+
var ki = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
2354
|
+
function Ai(e6) {
|
|
2348
2355
|
if (e6.length === 0) throw Error(`Number skeleton cannot be empty`);
|
|
2349
|
-
let t2 = e6.split(
|
|
2356
|
+
let t2 = e6.split(ki).filter((e7) => e7.length > 0), n2 = [];
|
|
2350
2357
|
for (let e7 of t2) {
|
|
2351
2358
|
let t3 = e7.split(`/`);
|
|
2352
2359
|
if (t3.length === 0) throw Error(`Invalid number skeleton`);
|
|
@@ -2356,20 +2363,20 @@ function Oi(e6) {
|
|
|
2356
2363
|
}
|
|
2357
2364
|
return n2;
|
|
2358
2365
|
}
|
|
2359
|
-
function
|
|
2366
|
+
function ji(e6) {
|
|
2360
2367
|
return e6.replace(/^(.*?)-/, ``);
|
|
2361
2368
|
}
|
|
2362
|
-
var
|
|
2363
|
-
var
|
|
2364
|
-
var
|
|
2365
|
-
var
|
|
2366
|
-
function
|
|
2369
|
+
var Mi = /^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g;
|
|
2370
|
+
var Ni = /^(@+)?(\+|#+)?[rs]?$/g;
|
|
2371
|
+
var Pi = /(\*)(0+)|(#+)(0+)|(0+)/g;
|
|
2372
|
+
var Fi = /^(0+)$/;
|
|
2373
|
+
function Ii(e6) {
|
|
2367
2374
|
let t2 = {};
|
|
2368
|
-
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(
|
|
2375
|
+
return e6[e6.length - 1] === `r` ? t2.roundingPriority = `morePrecision` : e6[e6.length - 1] === `s` && (t2.roundingPriority = `lessPrecision`), e6.replace(Ni, function(e7, n2, r2) {
|
|
2369
2376
|
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), ``;
|
|
2370
2377
|
}), t2;
|
|
2371
2378
|
}
|
|
2372
|
-
function
|
|
2379
|
+
function Li(e6) {
|
|
2373
2380
|
switch (e6) {
|
|
2374
2381
|
case `sign-auto`:
|
|
2375
2382
|
return { signDisplay: `auto` };
|
|
@@ -2393,19 +2400,19 @@ function Fi(e6) {
|
|
|
2393
2400
|
return { signDisplay: `never` };
|
|
2394
2401
|
}
|
|
2395
2402
|
}
|
|
2396
|
-
function
|
|
2403
|
+
function Ri(e6) {
|
|
2397
2404
|
let t2;
|
|
2398
2405
|
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) {
|
|
2399
2406
|
let n2 = e6.slice(0, 2);
|
|
2400
|
-
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !
|
|
2407
|
+
if (n2 === `+!` ? (t2.signDisplay = `always`, e6 = e6.slice(2)) : n2 === `+?` && (t2.signDisplay = `exceptZero`, e6 = e6.slice(2)), !Fi.test(e6)) throw Error(`Malformed concise eng/scientific notation`);
|
|
2401
2408
|
t2.minimumIntegerDigits = e6.length;
|
|
2402
2409
|
}
|
|
2403
2410
|
return t2;
|
|
2404
2411
|
}
|
|
2405
|
-
function
|
|
2406
|
-
return
|
|
2412
|
+
function zi(e6) {
|
|
2413
|
+
return Li(e6) || {};
|
|
2407
2414
|
}
|
|
2408
|
-
function
|
|
2415
|
+
function Bi(e6) {
|
|
2409
2416
|
let t2 = {};
|
|
2410
2417
|
for (let n2 of e6) {
|
|
2411
2418
|
switch (n2.stem) {
|
|
@@ -2429,7 +2436,7 @@ function Ri(e6) {
|
|
|
2429
2436
|
continue;
|
|
2430
2437
|
case `measure-unit`:
|
|
2431
2438
|
case `unit`:
|
|
2432
|
-
t2.style = `unit`, t2.unit =
|
|
2439
|
+
t2.style = `unit`, t2.unit = ji(n2.options[0]);
|
|
2433
2440
|
continue;
|
|
2434
2441
|
case `compact-short`:
|
|
2435
2442
|
case `K`:
|
|
@@ -2440,10 +2447,10 @@ function Ri(e6) {
|
|
|
2440
2447
|
t2.notation = `compact`, t2.compactDisplay = `long`;
|
|
2441
2448
|
continue;
|
|
2442
2449
|
case `scientific`:
|
|
2443
|
-
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2450
|
+
t2 = { ...t2, notation: `scientific`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...zi(t3) }), {}) };
|
|
2444
2451
|
continue;
|
|
2445
2452
|
case `engineering`:
|
|
2446
|
-
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...
|
|
2453
|
+
t2 = { ...t2, notation: `engineering`, ...n2.options.reduce((e8, t3) => ({ ...e8, ...zi(t3) }), {}) };
|
|
2447
2454
|
continue;
|
|
2448
2455
|
case `notation-simple`:
|
|
2449
2456
|
t2.notation = `standard`;
|
|
@@ -2486,7 +2493,7 @@ function Ri(e6) {
|
|
|
2486
2493
|
continue;
|
|
2487
2494
|
case `integer-width`:
|
|
2488
2495
|
if (n2.options.length > 1) throw RangeError(`integer-width stems only accept a single optional option`);
|
|
2489
|
-
n2.options[0].replace(
|
|
2496
|
+
n2.options[0].replace(Pi, function(e8, n3, r3, i2, a2, o2) {
|
|
2490
2497
|
if (n3) t2.minimumIntegerDigits = r3.length;
|
|
2491
2498
|
else if (i2 && a2) throw Error(`We currently do not support maximum integer digits`);
|
|
2492
2499
|
else if (o2) throw Error(`We currently do not support exact integer digits`);
|
|
@@ -2494,83 +2501,83 @@ function Ri(e6) {
|
|
|
2494
2501
|
});
|
|
2495
2502
|
continue;
|
|
2496
2503
|
}
|
|
2497
|
-
if (
|
|
2504
|
+
if (Fi.test(n2.stem)) {
|
|
2498
2505
|
t2.minimumIntegerDigits = n2.stem.length;
|
|
2499
2506
|
continue;
|
|
2500
2507
|
}
|
|
2501
|
-
if (
|
|
2508
|
+
if (Mi.test(n2.stem)) {
|
|
2502
2509
|
if (n2.options.length > 1) throw RangeError(`Fraction-precision stems only accept a single optional option`);
|
|
2503
|
-
n2.stem.replace(
|
|
2510
|
+
n2.stem.replace(Mi, function(e9, n3, r3, i2, a2, o2) {
|
|
2504
2511
|
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), ``;
|
|
2505
2512
|
});
|
|
2506
2513
|
let e8 = n2.options[0];
|
|
2507
|
-
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...
|
|
2514
|
+
e8 === `w` ? t2 = { ...t2, trailingZeroDisplay: `stripIfInteger` } : e8 && (t2 = { ...t2, ...Ii(e8) });
|
|
2508
2515
|
continue;
|
|
2509
2516
|
}
|
|
2510
|
-
if (
|
|
2511
|
-
t2 = { ...t2, ...
|
|
2517
|
+
if (Ni.test(n2.stem)) {
|
|
2518
|
+
t2 = { ...t2, ...Ii(n2.stem) };
|
|
2512
2519
|
continue;
|
|
2513
2520
|
}
|
|
2514
|
-
let e7 =
|
|
2521
|
+
let e7 = Li(n2.stem);
|
|
2515
2522
|
e7 && (t2 = { ...t2, ...e7 });
|
|
2516
|
-
let r2 =
|
|
2523
|
+
let r2 = Ri(n2.stem);
|
|
2517
2524
|
r2 && (t2 = { ...t2, ...r2 });
|
|
2518
2525
|
}
|
|
2519
2526
|
return t2;
|
|
2520
2527
|
}
|
|
2521
|
-
var
|
|
2528
|
+
var Vi = function(e6) {
|
|
2522
2529
|
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;
|
|
2523
2530
|
}({});
|
|
2524
|
-
function
|
|
2531
|
+
function Hi(e6) {
|
|
2525
2532
|
return e6.type === 0;
|
|
2526
2533
|
}
|
|
2527
|
-
function
|
|
2534
|
+
function Ui(e6) {
|
|
2528
2535
|
return e6.type === 1;
|
|
2529
2536
|
}
|
|
2530
|
-
function
|
|
2537
|
+
function Wi(e6) {
|
|
2531
2538
|
return e6.type === 2;
|
|
2532
2539
|
}
|
|
2533
|
-
function
|
|
2540
|
+
function Gi(e6) {
|
|
2534
2541
|
return e6.type === 3;
|
|
2535
2542
|
}
|
|
2536
|
-
function
|
|
2543
|
+
function Ki(e6) {
|
|
2537
2544
|
return e6.type === 4;
|
|
2538
2545
|
}
|
|
2539
|
-
function
|
|
2546
|
+
function qi(e6) {
|
|
2540
2547
|
return e6.type === 5;
|
|
2541
2548
|
}
|
|
2542
|
-
function
|
|
2549
|
+
function Ji(e6) {
|
|
2543
2550
|
return e6.type === 6;
|
|
2544
2551
|
}
|
|
2545
|
-
function
|
|
2552
|
+
function Yi(e6) {
|
|
2546
2553
|
return e6.type === 7;
|
|
2547
2554
|
}
|
|
2548
|
-
function
|
|
2555
|
+
function Xi(e6) {
|
|
2549
2556
|
return e6.type === 8;
|
|
2550
2557
|
}
|
|
2551
|
-
function
|
|
2558
|
+
function Zi(e6) {
|
|
2552
2559
|
return !!(e6 && typeof e6 == `object` && e6.type === 0);
|
|
2553
2560
|
}
|
|
2554
|
-
function
|
|
2561
|
+
function Qi(e6) {
|
|
2555
2562
|
return !!(e6 && typeof e6 == `object` && e6.type === 1);
|
|
2556
2563
|
}
|
|
2557
|
-
var
|
|
2558
|
-
var
|
|
2559
|
-
function
|
|
2564
|
+
var $i = /[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/;
|
|
2565
|
+
var V = { "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`] };
|
|
2566
|
+
function ea(e6, t2) {
|
|
2560
2567
|
let n2 = ``;
|
|
2561
2568
|
for (let r2 = 0; r2 < e6.length; r2++) {
|
|
2562
2569
|
let i2 = e6.charAt(r2);
|
|
2563
2570
|
if (i2 === `j`) {
|
|
2564
2571
|
let a2 = 0;
|
|
2565
2572
|
for (; r2 + 1 < e6.length && e6.charAt(r2 + 1) === i2; ) a2++, r2++;
|
|
2566
|
-
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 =
|
|
2573
|
+
let o2 = 1 + (a2 & 1), s2 = a2 < 2 ? 1 : 3 + (a2 >> 1), c2 = ta(t2);
|
|
2567
2574
|
for ((c2 == `H` || c2 == `k`) && (s2 = 0); s2-- > 0; ) n2 += `a`;
|
|
2568
2575
|
for (; o2-- > 0; ) n2 = c2 + n2;
|
|
2569
2576
|
} else n2 += i2 === `J` ? `H` : i2;
|
|
2570
2577
|
}
|
|
2571
2578
|
return n2;
|
|
2572
2579
|
}
|
|
2573
|
-
function
|
|
2580
|
+
function ta(e6) {
|
|
2574
2581
|
let t2 = e6.hourCycle;
|
|
2575
2582
|
if (t2 === void 0) {
|
|
2576
2583
|
let n3 = e6;
|
|
@@ -2589,36 +2596,36 @@ function $i(e6) {
|
|
|
2589
2596
|
throw Error(`Invalid hourCycle`);
|
|
2590
2597
|
}
|
|
2591
2598
|
let n2 = e6.language, r2;
|
|
2592
|
-
return n2 !== `root` && (r2 = e6.maximize().region), (
|
|
2599
|
+
return n2 !== `root` && (r2 = e6.maximize().region), (V[`${n2}-${r2}`] || V[r2 || ``] || V[n2 || ``] || V[`${n2}-001`] || V[`001`])[0].charAt(0);
|
|
2593
2600
|
}
|
|
2594
|
-
var
|
|
2595
|
-
var
|
|
2596
|
-
function
|
|
2601
|
+
var na = RegExp(`^${$i.source}*`);
|
|
2602
|
+
var ra = RegExp(`${$i.source}*$`);
|
|
2603
|
+
function H(e6, t2) {
|
|
2597
2604
|
return { start: e6, end: t2 };
|
|
2598
2605
|
}
|
|
2599
|
-
var
|
|
2600
|
-
var
|
|
2601
|
-
var
|
|
2602
|
-
var
|
|
2606
|
+
var ia = !!Object.fromEntries;
|
|
2607
|
+
var aa = !!String.prototype.trimStart;
|
|
2608
|
+
var oa = !!String.prototype.trimEnd;
|
|
2609
|
+
var sa = ia ? Object.fromEntries : function(e6) {
|
|
2603
2610
|
let t2 = {};
|
|
2604
2611
|
for (let [n2, r2] of e6) t2[n2] = r2;
|
|
2605
2612
|
return t2;
|
|
2606
2613
|
};
|
|
2607
|
-
var
|
|
2614
|
+
var ca = aa ? function(e6) {
|
|
2608
2615
|
return e6.trimStart();
|
|
2609
2616
|
} : function(e6) {
|
|
2610
|
-
return e6.replace(
|
|
2617
|
+
return e6.replace(na, ``);
|
|
2611
2618
|
};
|
|
2612
|
-
var
|
|
2619
|
+
var la = oa ? function(e6) {
|
|
2613
2620
|
return e6.trimEnd();
|
|
2614
2621
|
} : function(e6) {
|
|
2615
|
-
return e6.replace(
|
|
2622
|
+
return e6.replace(ra, ``);
|
|
2616
2623
|
};
|
|
2617
|
-
var
|
|
2618
|
-
function
|
|
2619
|
-
return
|
|
2624
|
+
var ua = RegExp(`([^\\p{White_Space}\\p{Pattern_Syntax}]*)`, `yu`);
|
|
2625
|
+
function da(e6, t2) {
|
|
2626
|
+
return ua.lastIndex = t2, ua.exec(e6)[1] ?? ``;
|
|
2620
2627
|
}
|
|
2621
|
-
function
|
|
2628
|
+
function fa(e6) {
|
|
2622
2629
|
if (e6.length === 0) return null;
|
|
2623
2630
|
let t2 = 1, n2 = 1;
|
|
2624
2631
|
for (let r2 = 0; r2 < e6.length; ) {
|
|
@@ -2639,7 +2646,7 @@ function ua(e6) {
|
|
|
2639
2646
|
}
|
|
2640
2647
|
return { offset: e6.length, line: t2, column: n2 };
|
|
2641
2648
|
}
|
|
2642
|
-
var
|
|
2649
|
+
var pa = class {
|
|
2643
2650
|
constructor(e6, t2 = {}) {
|
|
2644
2651
|
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;
|
|
2645
2652
|
}
|
|
@@ -2648,10 +2655,10 @@ var da = class {
|
|
|
2648
2655
|
if (this.message.length > 0) {
|
|
2649
2656
|
let e6 = this.message.charCodeAt(0);
|
|
2650
2657
|
if (e6 !== 35 && e6 !== 39 && e6 !== 60 && e6 !== 123 && e6 !== 125) {
|
|
2651
|
-
let e7 =
|
|
2658
|
+
let e7 = fa(this.message);
|
|
2652
2659
|
if (e7) {
|
|
2653
2660
|
let t2 = this.clonePosition();
|
|
2654
|
-
return this.position = e7, { val: [{ type: 0, value: this.message, location:
|
|
2661
|
+
return this.position = e7, { val: [{ type: 0, value: this.message, location: H(t2, this.clonePosition()) }], err: null };
|
|
2655
2662
|
}
|
|
2656
2663
|
}
|
|
2657
2664
|
}
|
|
@@ -2668,11 +2675,11 @@ var da = class {
|
|
|
2668
2675
|
} else if (i2 === 125 && e6 > 0) break;
|
|
2669
2676
|
else if (i2 === 35 && (t2 === `plural` || t2 === `selectordinal`)) {
|
|
2670
2677
|
let e7 = this.clonePosition();
|
|
2671
|
-
this.bump(), r2.push({ type: 7, location:
|
|
2678
|
+
this.bump(), r2.push({ type: 7, location: H(e7, this.clonePosition()) });
|
|
2672
2679
|
} else if (i2 === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
2673
2680
|
if (n2) break;
|
|
2674
|
-
return this.error(26,
|
|
2675
|
-
} else if (i2 === 60 && !this.ignoreTag &&
|
|
2681
|
+
return this.error(26, H(this.clonePosition(), this.clonePosition()));
|
|
2682
|
+
} else if (i2 === 60 && !this.ignoreTag && ma(this.peek() || 0)) {
|
|
2676
2683
|
let n3 = this.parseTag(e6, t2);
|
|
2677
2684
|
if (n3.err) return n3;
|
|
2678
2685
|
r2.push(n3.val);
|
|
@@ -2688,23 +2695,23 @@ var da = class {
|
|
|
2688
2695
|
let n2 = this.clonePosition();
|
|
2689
2696
|
this.bump();
|
|
2690
2697
|
let r2 = this.parseTagName();
|
|
2691
|
-
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location:
|
|
2698
|
+
if (this.bumpSpace(), this.bumpIf(`/>`)) return { val: { type: 0, value: `<${r2}/>`, location: H(n2, this.clonePosition()) }, err: null };
|
|
2692
2699
|
if (this.bumpIf(`>`)) {
|
|
2693
2700
|
let i2 = this.parseMessage(e6 + 1, t2, true);
|
|
2694
2701
|
if (i2.err) return i2;
|
|
2695
2702
|
let a2 = i2.val, o2 = this.clonePosition();
|
|
2696
2703
|
if (this.bumpIf(`</`)) {
|
|
2697
|
-
if (this.isEOF() || !
|
|
2704
|
+
if (this.isEOF() || !ma(this.char())) return this.error(23, H(o2, this.clonePosition()));
|
|
2698
2705
|
let e7 = this.clonePosition();
|
|
2699
|
-
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location:
|
|
2706
|
+
return r2 === this.parseTagName() ? (this.bumpSpace(), this.bumpIf(`>`) ? { val: { type: 8, value: r2, children: a2, location: H(n2, this.clonePosition()) }, err: null } : this.error(23, H(o2, this.clonePosition()))) : this.error(26, H(e7, this.clonePosition()));
|
|
2700
2707
|
}
|
|
2701
|
-
return this.error(27,
|
|
2708
|
+
return this.error(27, H(n2, this.clonePosition()));
|
|
2702
2709
|
}
|
|
2703
|
-
return this.error(23,
|
|
2710
|
+
return this.error(23, H(n2, this.clonePosition()));
|
|
2704
2711
|
}
|
|
2705
2712
|
parseTagName() {
|
|
2706
2713
|
let e6 = this.offset();
|
|
2707
|
-
for (this.bump(); !this.isEOF() &&
|
|
2714
|
+
for (this.bump(); !this.isEOF() && ga(this.char()); ) this.bump();
|
|
2708
2715
|
return this.message.slice(e6, this.offset());
|
|
2709
2716
|
}
|
|
2710
2717
|
parseLiteral(e6, t2) {
|
|
@@ -2724,11 +2731,11 @@ var da = class {
|
|
|
2724
2731
|
if (a2) r2 += a2;
|
|
2725
2732
|
else break;
|
|
2726
2733
|
}
|
|
2727
|
-
let i2 =
|
|
2734
|
+
let i2 = H(n2, this.clonePosition());
|
|
2728
2735
|
return { val: { type: 0, value: r2, location: i2 }, err: null };
|
|
2729
2736
|
}
|
|
2730
2737
|
tryParseLeftAngleBracket() {
|
|
2731
|
-
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !
|
|
2738
|
+
return !this.isEOF() && this.char() === 60 && (this.ignoreTag || !ha(this.peek() || 0)) ? (this.bump(), `<`) : null;
|
|
2732
2739
|
}
|
|
2733
2740
|
tryParseQuote(e6) {
|
|
2734
2741
|
if (this.isEOF() || this.char() !== 39) return null;
|
|
@@ -2768,29 +2775,29 @@ var da = class {
|
|
|
2768
2775
|
}
|
|
2769
2776
|
parseArgument(e6, t2) {
|
|
2770
2777
|
let n2 = this.clonePosition();
|
|
2771
|
-
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2772
|
-
if (this.char() === 125) return this.bump(), this.error(2,
|
|
2778
|
+
if (this.bump(), this.bumpSpace(), this.isEOF()) return this.error(1, H(n2, this.clonePosition()));
|
|
2779
|
+
if (this.char() === 125) return this.bump(), this.error(2, H(n2, this.clonePosition()));
|
|
2773
2780
|
let r2 = this.parseIdentifierIfPossible().value;
|
|
2774
|
-
if (!r2) return this.error(3,
|
|
2775
|
-
if (this.bumpSpace(), this.isEOF()) return this.error(1,
|
|
2781
|
+
if (!r2) return this.error(3, H(n2, this.clonePosition()));
|
|
2782
|
+
if (this.bumpSpace(), this.isEOF()) return this.error(1, H(n2, this.clonePosition()));
|
|
2776
2783
|
switch (this.char()) {
|
|
2777
2784
|
case 125:
|
|
2778
|
-
return this.bump(), { val: { type: 1, value: r2, location:
|
|
2785
|
+
return this.bump(), { val: { type: 1, value: r2, location: H(n2, this.clonePosition()) }, err: null };
|
|
2779
2786
|
case 44:
|
|
2780
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1,
|
|
2787
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(1, H(n2, this.clonePosition())) : this.parseArgumentOptions(e6, t2, r2, n2);
|
|
2781
2788
|
default:
|
|
2782
|
-
return this.error(3,
|
|
2789
|
+
return this.error(3, H(n2, this.clonePosition()));
|
|
2783
2790
|
}
|
|
2784
2791
|
}
|
|
2785
2792
|
parseIdentifierIfPossible() {
|
|
2786
|
-
let e6 = this.clonePosition(), t2 = this.offset(), n2 =
|
|
2787
|
-
return this.bumpTo(r2), { value: n2, location:
|
|
2793
|
+
let e6 = this.clonePosition(), t2 = this.offset(), n2 = da(this.message, t2), r2 = t2 + n2.length;
|
|
2794
|
+
return this.bumpTo(r2), { value: n2, location: H(e6, this.clonePosition()) };
|
|
2788
2795
|
}
|
|
2789
2796
|
parseArgumentOptions(e6, t2, n2, r2) {
|
|
2790
2797
|
let i2 = this.clonePosition(), a2 = this.parseIdentifierIfPossible().value, o2 = this.clonePosition();
|
|
2791
2798
|
switch (a2) {
|
|
2792
2799
|
case ``:
|
|
2793
|
-
return this.error(4,
|
|
2800
|
+
return this.error(4, H(i2, o2));
|
|
2794
2801
|
case `number`:
|
|
2795
2802
|
case `date`:
|
|
2796
2803
|
case `time`: {
|
|
@@ -2800,15 +2807,15 @@ var da = class {
|
|
|
2800
2807
|
this.bumpSpace();
|
|
2801
2808
|
let t4 = this.clonePosition(), n3 = this.parseSimpleArgStyleIfPossible();
|
|
2802
2809
|
if (n3.err) return n3;
|
|
2803
|
-
let r3 =
|
|
2804
|
-
if (r3.length === 0) return this.error(6,
|
|
2805
|
-
e7 = { style: r3, styleLocation:
|
|
2810
|
+
let r3 = la(n3.val);
|
|
2811
|
+
if (r3.length === 0) return this.error(6, H(this.clonePosition(), this.clonePosition()));
|
|
2812
|
+
e7 = { style: r3, styleLocation: H(t4, this.clonePosition()) };
|
|
2806
2813
|
}
|
|
2807
2814
|
let t3 = this.tryParseArgumentClose(r2);
|
|
2808
2815
|
if (t3.err) return t3;
|
|
2809
|
-
let i3 =
|
|
2816
|
+
let i3 = H(r2, this.clonePosition());
|
|
2810
2817
|
if (e7 && e7.style.startsWith(`::`)) {
|
|
2811
|
-
let t4 =
|
|
2818
|
+
let t4 = ca(e7.style.slice(2));
|
|
2812
2819
|
if (a2 === `number`) {
|
|
2813
2820
|
let r3 = this.parseNumberSkeletonFromString(t4, e7.styleLocation);
|
|
2814
2821
|
return r3.err ? r3 : { val: { type: 2, value: n2, location: i3, style: r3.val }, err: null };
|
|
@@ -2816,8 +2823,8 @@ var da = class {
|
|
|
2816
2823
|
{
|
|
2817
2824
|
if (t4.length === 0) return this.error(10, i3);
|
|
2818
2825
|
let r3 = t4;
|
|
2819
|
-
this.locale && (r3 =
|
|
2820
|
-
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ?
|
|
2826
|
+
this.locale && (r3 = ea(t4, this.locale));
|
|
2827
|
+
let o3 = { type: 1, pattern: r3, location: e7.styleLocation, parsedOptions: this.shouldParseSkeletons ? Oi(r3) : {} };
|
|
2821
2828
|
return { val: { type: a2 === `date` ? 3 : 4, value: n2, location: i3, style: o3 }, err: null };
|
|
2822
2829
|
}
|
|
2823
2830
|
}
|
|
@@ -2827,11 +2834,11 @@ var da = class {
|
|
|
2827
2834
|
case `selectordinal`:
|
|
2828
2835
|
case `select`: {
|
|
2829
2836
|
let i3 = this.clonePosition();
|
|
2830
|
-
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12,
|
|
2837
|
+
if (this.bumpSpace(), !this.bumpIf(`,`)) return this.error(12, H(i3, { ...i3 }));
|
|
2831
2838
|
this.bumpSpace();
|
|
2832
2839
|
let o3 = this.parseIdentifierIfPossible(), s2 = 0;
|
|
2833
2840
|
if (a2 !== `select` && o3.value === `offset`) {
|
|
2834
|
-
if (!this.bumpIf(`:`)) return this.error(13,
|
|
2841
|
+
if (!this.bumpIf(`:`)) return this.error(13, H(this.clonePosition(), this.clonePosition()));
|
|
2835
2842
|
this.bumpSpace();
|
|
2836
2843
|
let e7 = this.tryParseDecimalInteger(13, 14);
|
|
2837
2844
|
if (e7.err) return e7;
|
|
@@ -2841,15 +2848,15 @@ var da = class {
|
|
|
2841
2848
|
if (c2.err) return c2;
|
|
2842
2849
|
let l2 = this.tryParseArgumentClose(r2);
|
|
2843
2850
|
if (l2.err) return l2;
|
|
2844
|
-
let u2 =
|
|
2845
|
-
return a2 === `select` ? { val: { type: 5, value: n2, options:
|
|
2851
|
+
let u2 = H(r2, this.clonePosition());
|
|
2852
|
+
return a2 === `select` ? { val: { type: 5, value: n2, options: sa(c2.val), location: u2 }, err: null } : { val: { type: 6, value: n2, options: sa(c2.val), offset: s2, pluralType: a2 === `plural` ? `cardinal` : `ordinal`, location: u2 }, err: null };
|
|
2846
2853
|
}
|
|
2847
2854
|
default:
|
|
2848
|
-
return this.error(5,
|
|
2855
|
+
return this.error(5, H(i2, o2));
|
|
2849
2856
|
}
|
|
2850
2857
|
}
|
|
2851
2858
|
tryParseArgumentClose(e6) {
|
|
2852
|
-
return this.isEOF() || this.char() !== 125 ? this.error(1,
|
|
2859
|
+
return this.isEOF() || this.char() !== 125 ? this.error(1, H(e6, this.clonePosition())) : (this.bump(), { val: true, err: null });
|
|
2853
2860
|
}
|
|
2854
2861
|
parseSimpleArgStyleIfPossible() {
|
|
2855
2862
|
let e6 = 0, t2 = this.clonePosition();
|
|
@@ -2857,7 +2864,7 @@ var da = class {
|
|
|
2857
2864
|
case 39: {
|
|
2858
2865
|
this.bump();
|
|
2859
2866
|
let e7 = this.clonePosition();
|
|
2860
|
-
if (!this.bumpUntil(`'`)) return this.error(11,
|
|
2867
|
+
if (!this.bumpUntil(`'`)) return this.error(11, H(e7, this.clonePosition()));
|
|
2861
2868
|
this.bump();
|
|
2862
2869
|
break;
|
|
2863
2870
|
}
|
|
@@ -2876,11 +2883,11 @@ var da = class {
|
|
|
2876
2883
|
parseNumberSkeletonFromString(e6, t2) {
|
|
2877
2884
|
let n2 = [];
|
|
2878
2885
|
try {
|
|
2879
|
-
n2 =
|
|
2886
|
+
n2 = Ai(e6);
|
|
2880
2887
|
} catch {
|
|
2881
2888
|
return this.error(7, t2);
|
|
2882
2889
|
}
|
|
2883
|
-
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ?
|
|
2890
|
+
return { val: { type: 0, tokens: n2, location: t2, parsedOptions: this.shouldParseSkeletons ? Bi(n2) : {} }, err: null };
|
|
2884
2891
|
}
|
|
2885
2892
|
tryParsePluralOrSelectOptions(e6, t2, n2, r2) {
|
|
2886
2893
|
let i2 = false, a2 = [], o2 = /* @__PURE__ */ new Set(), { value: s2, location: c2 } = r2;
|
|
@@ -2890,20 +2897,20 @@ var da = class {
|
|
|
2890
2897
|
if (t2 !== `select` && this.bumpIf(`=`)) {
|
|
2891
2898
|
let t3 = this.tryParseDecimalInteger(16, 19);
|
|
2892
2899
|
if (t3.err) return t3;
|
|
2893
|
-
c2 =
|
|
2900
|
+
c2 = H(e7, this.clonePosition()), s2 = this.message.slice(e7.offset, this.offset());
|
|
2894
2901
|
} else break;
|
|
2895
2902
|
}
|
|
2896
2903
|
if (o2.has(s2)) return this.error(t2 === `select` ? 21 : 20, c2);
|
|
2897
2904
|
s2 === `other` && (i2 = true), this.bumpSpace();
|
|
2898
2905
|
let r3 = this.clonePosition();
|
|
2899
|
-
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18,
|
|
2906
|
+
if (!this.bumpIf(`{`)) return this.error(t2 === `select` ? 17 : 18, H(this.clonePosition(), this.clonePosition()));
|
|
2900
2907
|
let l2 = this.parseMessage(e6 + 1, t2, n2);
|
|
2901
2908
|
if (l2.err) return l2;
|
|
2902
2909
|
let u2 = this.tryParseArgumentClose(r3);
|
|
2903
2910
|
if (u2.err) return u2;
|
|
2904
|
-
a2.push([s2, { value: l2.val, location:
|
|
2911
|
+
a2.push([s2, { value: l2.val, location: H(r3, this.clonePosition()) }]), o2.add(s2), this.bumpSpace(), { value: s2, location: c2 } = this.parseIdentifierIfPossible();
|
|
2905
2912
|
}
|
|
2906
|
-
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16,
|
|
2913
|
+
return a2.length === 0 ? this.error(t2 === `select` ? 15 : 16, H(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !i2 ? this.error(22, H(this.clonePosition(), this.clonePosition())) : { val: a2, err: null };
|
|
2907
2914
|
}
|
|
2908
2915
|
tryParseDecimalInteger(e6, t2) {
|
|
2909
2916
|
let n2 = 1, r2 = this.clonePosition();
|
|
@@ -2914,7 +2921,7 @@ var da = class {
|
|
|
2914
2921
|
if (e7 >= 48 && e7 <= 57) i2 = true, a2 = a2 * 10 + (e7 - 48), this.bump();
|
|
2915
2922
|
else break;
|
|
2916
2923
|
}
|
|
2917
|
-
let o2 =
|
|
2924
|
+
let o2 = H(r2, this.clonePosition());
|
|
2918
2925
|
return i2 ? (a2 *= n2, Number.isSafeInteger(a2) ? { val: a2, err: null } : this.error(t2, o2)) : this.error(e6, o2);
|
|
2919
2926
|
}
|
|
2920
2927
|
offset() {
|
|
@@ -2962,7 +2969,7 @@ var da = class {
|
|
|
2962
2969
|
}
|
|
2963
2970
|
}
|
|
2964
2971
|
bumpSpace() {
|
|
2965
|
-
for (; !this.isEOF() &&
|
|
2972
|
+
for (; !this.isEOF() && _a(this.char()); ) this.bump();
|
|
2966
2973
|
}
|
|
2967
2974
|
peek() {
|
|
2968
2975
|
if (this.isEOF()) return null;
|
|
@@ -2970,34 +2977,34 @@ var da = class {
|
|
|
2970
2977
|
return this.message.charCodeAt(t2 + (e6 >= 65536 ? 2 : 1)) ?? null;
|
|
2971
2978
|
}
|
|
2972
2979
|
};
|
|
2973
|
-
function
|
|
2980
|
+
function ma(e6) {
|
|
2974
2981
|
return e6 >= 97 && e6 <= 122 || e6 >= 65 && e6 <= 90;
|
|
2975
2982
|
}
|
|
2976
|
-
function
|
|
2977
|
-
return
|
|
2983
|
+
function ha(e6) {
|
|
2984
|
+
return ma(e6) || e6 === 47;
|
|
2978
2985
|
}
|
|
2979
|
-
function
|
|
2986
|
+
function ga(e6) {
|
|
2980
2987
|
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;
|
|
2981
2988
|
}
|
|
2982
|
-
function
|
|
2989
|
+
function _a(e6) {
|
|
2983
2990
|
return e6 >= 9 && e6 <= 13 || e6 === 32 || e6 === 133 || e6 >= 8206 && e6 <= 8207 || e6 === 8232 || e6 === 8233;
|
|
2984
2991
|
}
|
|
2985
|
-
function
|
|
2992
|
+
function va(e6) {
|
|
2986
2993
|
e6.forEach((e7) => {
|
|
2987
|
-
if (delete e7.location,
|
|
2988
|
-
else
|
|
2994
|
+
if (delete e7.location, qi(e7) || Ji(e7)) for (let t2 in e7.options) delete e7.options[t2].location, va(e7.options[t2].value);
|
|
2995
|
+
else Wi(e7) && Zi(e7.style) || (Gi(e7) || Ki(e7)) && Qi(e7.style) ? delete e7.style.location : Xi(e7) && va(e7.children);
|
|
2989
2996
|
});
|
|
2990
2997
|
}
|
|
2991
|
-
function
|
|
2998
|
+
function ya(e6, t2 = {}) {
|
|
2992
2999
|
t2 = { shouldParseSkeletons: true, requiresOtherClause: true, ...t2 };
|
|
2993
|
-
let n2 = new
|
|
3000
|
+
let n2 = new pa(e6, t2).parse();
|
|
2994
3001
|
if (n2.err) {
|
|
2995
|
-
let e7 = SyntaxError(
|
|
3002
|
+
let e7 = SyntaxError(Vi[n2.err.kind]);
|
|
2996
3003
|
throw e7.location = n2.err.location, e7.originalMessage = n2.err.message, e7;
|
|
2997
3004
|
}
|
|
2998
|
-
return t2?.captureLocation ||
|
|
3005
|
+
return t2?.captureLocation || va(n2.val), n2.val;
|
|
2999
3006
|
}
|
|
3000
|
-
var
|
|
3007
|
+
var ba = class extends Error {
|
|
3001
3008
|
constructor(e6, t2, n2) {
|
|
3002
3009
|
super(e6), this.code = t2, this.originalMessage = n2;
|
|
3003
3010
|
}
|
|
@@ -3005,54 +3012,54 @@ var va = class extends Error {
|
|
|
3005
3012
|
return `[formatjs Error: ${this.code}] ${this.message}`;
|
|
3006
3013
|
}
|
|
3007
3014
|
};
|
|
3008
|
-
var
|
|
3015
|
+
var xa = class extends ba {
|
|
3009
3016
|
constructor(e6, t2, n2, r2) {
|
|
3010
3017
|
super(`Invalid values for "${e6}": "${t2}". Options are "${Object.keys(n2).join(`", "`)}"`, `INVALID_VALUE`, r2);
|
|
3011
3018
|
}
|
|
3012
3019
|
};
|
|
3013
|
-
var
|
|
3020
|
+
var Sa = class extends ba {
|
|
3014
3021
|
constructor(e6, t2, n2) {
|
|
3015
3022
|
super(`Value for "${e6}" must be of type ${t2}`, `INVALID_VALUE`, n2);
|
|
3016
3023
|
}
|
|
3017
3024
|
};
|
|
3018
|
-
var
|
|
3025
|
+
var Ca = class extends ba {
|
|
3019
3026
|
constructor(e6, t2) {
|
|
3020
3027
|
super(`The intl string context variable "${e6}" was not provided to the string "${t2}"`, `MISSING_VALUE`, t2);
|
|
3021
3028
|
}
|
|
3022
3029
|
};
|
|
3023
|
-
function
|
|
3030
|
+
function wa(e6) {
|
|
3024
3031
|
return e6.length < 2 ? e6 : e6.reduce((e7, t2) => {
|
|
3025
3032
|
let n2 = e7[e7.length - 1];
|
|
3026
3033
|
return !n2 || n2.type !== 0 || t2.type !== 0 ? e7.push(t2) : n2.value += t2.value, e7;
|
|
3027
3034
|
}, []);
|
|
3028
3035
|
}
|
|
3029
|
-
function
|
|
3036
|
+
function Ta(e6) {
|
|
3030
3037
|
return typeof e6 == `function`;
|
|
3031
3038
|
}
|
|
3032
|
-
function
|
|
3033
|
-
if (e6.length === 1 &&
|
|
3039
|
+
function Ea(e6, t2, n2, r2, i2, a2, o2) {
|
|
3040
|
+
if (e6.length === 1 && Hi(e6[0])) return [{ type: 0, value: e6[0].value }];
|
|
3034
3041
|
let s2 = [];
|
|
3035
3042
|
for (let c2 of e6) {
|
|
3036
|
-
if (
|
|
3043
|
+
if (Hi(c2)) {
|
|
3037
3044
|
s2.push({ type: 0, value: c2.value });
|
|
3038
3045
|
continue;
|
|
3039
3046
|
}
|
|
3040
|
-
if (
|
|
3047
|
+
if (Yi(c2)) {
|
|
3041
3048
|
typeof a2 == `number` && s2.push({ type: 0, value: n2.getNumberFormat(t2).format(a2) });
|
|
3042
3049
|
continue;
|
|
3043
3050
|
}
|
|
3044
3051
|
let { value: e7 } = c2;
|
|
3045
|
-
if (!(i2 && e7 in i2)) throw new
|
|
3052
|
+
if (!(i2 && e7 in i2)) throw new Ca(e7, o2);
|
|
3046
3053
|
let l2 = i2[e7];
|
|
3047
|
-
if (
|
|
3048
|
-
else if (
|
|
3049
|
-
let e8 = typeof c2.style == `string` ? r2.date[c2.style] :
|
|
3054
|
+
if (Ui(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 });
|
|
3055
|
+
else if (Gi(c2)) {
|
|
3056
|
+
let e8 = typeof c2.style == `string` ? r2.date[c2.style] : Qi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3050
3057
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3051
|
-
} else if (
|
|
3052
|
-
let e8 = typeof c2.style == `string` ? r2.time[c2.style] :
|
|
3058
|
+
} else if (Ki(c2)) {
|
|
3059
|
+
let e8 = typeof c2.style == `string` ? r2.time[c2.style] : Qi(c2.style) ? c2.style.parsedOptions : r2.time.medium;
|
|
3053
3060
|
s2.push({ type: 0, value: n2.getDateTimeFormat(t2, e8).format(l2) });
|
|
3054
|
-
} else if (
|
|
3055
|
-
let e8 = typeof c2.style == `string` ? r2.number[c2.style] :
|
|
3061
|
+
} else if (Wi(c2)) {
|
|
3062
|
+
let e8 = typeof c2.style == `string` ? r2.number[c2.style] : Zi(c2.style) ? c2.style.parsedOptions : void 0;
|
|
3056
3063
|
if (e8 && e8.scale) {
|
|
3057
3064
|
let t3 = e8.scale || 1;
|
|
3058
3065
|
if (typeof l2 == `bigint`) {
|
|
@@ -3062,40 +3069,40 @@ function wa(e6, t2, n2, r2, i2, a2, o2) {
|
|
|
3062
3069
|
}
|
|
3063
3070
|
s2.push({ type: 0, value: n2.getNumberFormat(t2, e8).format(l2) });
|
|
3064
3071
|
} else {
|
|
3065
|
-
if (
|
|
3072
|
+
if (Xi(c2)) {
|
|
3066
3073
|
let { children: e8, value: l3 } = c2, u2 = i2[l3];
|
|
3067
|
-
if (!
|
|
3068
|
-
let d2 = u2(
|
|
3074
|
+
if (!Ta(u2)) throw new Sa(l3, `function`, o2);
|
|
3075
|
+
let d2 = u2(Ea(e8, t2, n2, r2, i2, a2).map((e9) => e9.value));
|
|
3069
3076
|
Array.isArray(d2) || (d2 = [d2]), s2.push(...d2.map((e9) => ({ type: typeof e9 == `string` ? 0 : 1, value: e9 })));
|
|
3070
3077
|
}
|
|
3071
|
-
if (
|
|
3078
|
+
if (qi(c2)) {
|
|
3072
3079
|
let e8 = l2, a3 = (Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0) || c2.options.other;
|
|
3073
|
-
if (!a3) throw new
|
|
3074
|
-
s2.push(...
|
|
3075
|
-
} else if (
|
|
3080
|
+
if (!a3) throw new xa(c2.value, l2, Object.keys(c2.options), o2);
|
|
3081
|
+
s2.push(...Ea(a3.value, t2, n2, r2, i2));
|
|
3082
|
+
} else if (Ji(c2)) {
|
|
3076
3083
|
let e8 = `=${l2}`, a3 = Object.prototype.hasOwnProperty.call(c2.options, e8) ? c2.options[e8] : void 0;
|
|
3077
3084
|
if (!a3) {
|
|
3078
|
-
if (!Intl.PluralRules) throw new
|
|
3085
|
+
if (!Intl.PluralRules) throw new ba(`Intl.PluralRules is not available in this environment.
|
|
3079
3086
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3080
3087
|
`, `MISSING_INTL_API`, o2);
|
|
3081
3088
|
let e9 = typeof l2 == `bigint` ? Number(l2) : l2, r3 = n2.getPluralRules(t2, { type: c2.pluralType }).select(e9 - (c2.offset || 0));
|
|
3082
3089
|
a3 = (Object.prototype.hasOwnProperty.call(c2.options, r3) ? c2.options[r3] : void 0) || c2.options.other;
|
|
3083
3090
|
}
|
|
3084
|
-
if (!a3) throw new
|
|
3091
|
+
if (!a3) throw new xa(c2.value, l2, Object.keys(c2.options), o2);
|
|
3085
3092
|
let u2 = typeof l2 == `bigint` ? Number(l2) : l2;
|
|
3086
|
-
s2.push(...
|
|
3093
|
+
s2.push(...Ea(a3.value, t2, n2, r2, i2, u2 - (c2.offset || 0)));
|
|
3087
3094
|
}
|
|
3088
3095
|
}
|
|
3089
3096
|
}
|
|
3090
|
-
return
|
|
3097
|
+
return wa(s2);
|
|
3091
3098
|
}
|
|
3092
|
-
function
|
|
3099
|
+
function Da(e6, t2) {
|
|
3093
3100
|
return t2 ? { ...e6, ...t2, ...Object.keys(e6).reduce((n2, r2) => (n2[r2] = { ...e6[r2], ...t2[r2] }, n2), {}) } : e6;
|
|
3094
3101
|
}
|
|
3095
|
-
function
|
|
3096
|
-
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] =
|
|
3102
|
+
function Oa(e6, t2) {
|
|
3103
|
+
return t2 ? Object.keys(e6).reduce((n2, r2) => (n2[r2] = Da(e6[r2], t2[r2]), n2), { ...e6 }) : e6;
|
|
3097
3104
|
}
|
|
3098
|
-
function
|
|
3105
|
+
function ka(e6) {
|
|
3099
3106
|
return { create() {
|
|
3100
3107
|
return { get(t2) {
|
|
3101
3108
|
return e6[t2];
|
|
@@ -3104,23 +3111,23 @@ function Da(e6) {
|
|
|
3104
3111
|
} };
|
|
3105
3112
|
} };
|
|
3106
3113
|
}
|
|
3107
|
-
function
|
|
3108
|
-
return { getNumberFormat:
|
|
3114
|
+
function Aa(e6 = { number: {}, dateTime: {}, pluralRules: {} }) {
|
|
3115
|
+
return { getNumberFormat: hi((...e7) => new Intl.NumberFormat(...e7), { cache: ka(e6.number), strategy: Ei.variadic }), getDateTimeFormat: hi((...e7) => new Intl.DateTimeFormat(...e7), { cache: ka(e6.dateTime), strategy: Ei.variadic }), getPluralRules: hi((...e7) => new Intl.PluralRules(...e7), { cache: ka(e6.pluralRules), strategy: Ei.variadic }) };
|
|
3109
3116
|
}
|
|
3110
|
-
var
|
|
3117
|
+
var ja = class e5 {
|
|
3111
3118
|
constructor(t2, n2 = e5.defaultLocale, r2, i2) {
|
|
3112
3119
|
if (this.formatterCache = { number: {}, dateTime: {}, pluralRules: {} }, this.format = (e6) => {
|
|
3113
3120
|
let t3 = this.formatToParts(e6);
|
|
3114
3121
|
if (t3.length === 1) return t3[0].value;
|
|
3115
3122
|
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), []);
|
|
3116
3123
|
return n3.length <= 1 ? n3[0] || `` : n3;
|
|
3117
|
-
}, this.formatToParts = (e6) =>
|
|
3124
|
+
}, this.formatToParts = (e6) => Ea(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`) {
|
|
3118
3125
|
if (this.message = t2, !e5.__parse) throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");
|
|
3119
3126
|
let { ...n3 } = i2 || {};
|
|
3120
3127
|
this.ast = e5.__parse(t2, { ...n3, locale: this.resolvedLocale });
|
|
3121
3128
|
} else this.ast = t2;
|
|
3122
3129
|
if (!Array.isArray(this.ast)) throw TypeError(`A message must be provided as a String or AST.`);
|
|
3123
|
-
this.formats =
|
|
3130
|
+
this.formats = Oa(e5.formats, r2), this.formatters = i2 && i2.formatters || Aa(this.formatterCache);
|
|
3124
3131
|
}
|
|
3125
3132
|
static {
|
|
3126
3133
|
this.memoizedDefaultLocale = null;
|
|
@@ -3136,14 +3143,14 @@ var ka = class e5 {
|
|
|
3136
3143
|
};
|
|
3137
3144
|
}
|
|
3138
3145
|
static {
|
|
3139
|
-
this.__parse =
|
|
3146
|
+
this.__parse = ya;
|
|
3140
3147
|
}
|
|
3141
3148
|
static {
|
|
3142
3149
|
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` } } };
|
|
3143
3150
|
}
|
|
3144
3151
|
};
|
|
3145
|
-
var
|
|
3146
|
-
function
|
|
3152
|
+
var Ma = [`__proto__`, `constructor`, `prototype`];
|
|
3153
|
+
function Na(e6, t2, n2) {
|
|
3147
3154
|
function r2(e7) {
|
|
3148
3155
|
return e7 && e7.indexOf(`###`) > -1 ? e7.replace(/###/g, `.`) : e7;
|
|
3149
3156
|
}
|
|
@@ -3153,49 +3160,49 @@ function ja(e6, t2, n2) {
|
|
|
3153
3160
|
for (var a2 = typeof t2 == `string` ? t2.split(`.`) : [].concat(t2); a2.length > 1; ) {
|
|
3154
3161
|
if (i2()) return {};
|
|
3155
3162
|
var o2 = r2(a2.shift());
|
|
3156
|
-
if (
|
|
3163
|
+
if (Ma.indexOf(o2) > -1) return {};
|
|
3157
3164
|
!e6[o2] && n2 && (e6[o2] = new n2()), e6 = e6[o2];
|
|
3158
3165
|
}
|
|
3159
3166
|
if (i2()) return {};
|
|
3160
3167
|
var s2 = r2(a2.shift());
|
|
3161
|
-
return
|
|
3168
|
+
return Ma.indexOf(s2) > -1 ? {} : { obj: e6, k: s2 };
|
|
3162
3169
|
}
|
|
3163
|
-
function
|
|
3164
|
-
var r2 =
|
|
3170
|
+
function Pa(e6, t2, n2) {
|
|
3171
|
+
var r2 = Na(e6, t2, Object), i2 = r2.obj, a2 = r2.k;
|
|
3165
3172
|
i2 !== void 0 && (i2[a2] = n2);
|
|
3166
3173
|
}
|
|
3167
|
-
function
|
|
3168
|
-
var n2 =
|
|
3174
|
+
function Fa(e6, t2) {
|
|
3175
|
+
var n2 = Na(e6, t2), r2 = n2.obj, i2 = n2.k;
|
|
3169
3176
|
if (r2) return r2[i2];
|
|
3170
3177
|
}
|
|
3171
|
-
function
|
|
3178
|
+
function Ia(e6) {
|
|
3172
3179
|
return [...arguments].slice(1).forEach(function(t2) {
|
|
3173
3180
|
if (t2) for (var n2 = 0, r2 = Object.keys(t2); n2 < r2.length; n2++) {
|
|
3174
3181
|
var i2 = r2[n2];
|
|
3175
|
-
|
|
3182
|
+
Ma.indexOf(i2) > -1 || e6[i2] === void 0 && (e6[i2] = t2[i2]);
|
|
3176
3183
|
}
|
|
3177
3184
|
}), e6;
|
|
3178
3185
|
}
|
|
3179
|
-
function
|
|
3180
|
-
return
|
|
3186
|
+
function La(e6, t2) {
|
|
3187
|
+
return Ha(e6) || Va(e6, t2) || za(e6, t2) || Ra();
|
|
3181
3188
|
}
|
|
3182
|
-
function
|
|
3189
|
+
function Ra() {
|
|
3183
3190
|
throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3184
3191
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
3185
3192
|
}
|
|
3186
|
-
function
|
|
3193
|
+
function za(e6, t2) {
|
|
3187
3194
|
if (e6) {
|
|
3188
|
-
if (typeof e6 == `string`) return
|
|
3195
|
+
if (typeof e6 == `string`) return Ba(e6, t2);
|
|
3189
3196
|
var n2 = {}.toString.call(e6).slice(8, -1);
|
|
3190
|
-
return n2 === `Object` && e6.constructor && (n2 = e6.constructor.name), n2 === `Map` || n2 === `Set` ? Array.from(e6) : n2 === `Arguments` || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n2) ?
|
|
3197
|
+
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) ? Ba(e6, t2) : void 0;
|
|
3191
3198
|
}
|
|
3192
3199
|
}
|
|
3193
|
-
function
|
|
3200
|
+
function Ba(e6, t2) {
|
|
3194
3201
|
(t2 == null || t2 > e6.length) && (t2 = e6.length);
|
|
3195
3202
|
for (var n2 = 0, r2 = Array(t2); n2 < t2; n2++) r2[n2] = e6[n2];
|
|
3196
3203
|
return r2;
|
|
3197
3204
|
}
|
|
3198
|
-
function
|
|
3205
|
+
function Va(e6, t2) {
|
|
3199
3206
|
var n2 = e6 == null ? null : typeof Symbol < `u` && e6[Symbol.iterator] || e6[`@@iterator`];
|
|
3200
3207
|
if (n2 != null) {
|
|
3201
3208
|
var r2, i2, a2, o2, s2 = [], c2 = true, l2 = false;
|
|
@@ -3216,10 +3223,10 @@ function za(e6, t2) {
|
|
|
3216
3223
|
return s2;
|
|
3217
3224
|
}
|
|
3218
3225
|
}
|
|
3219
|
-
function
|
|
3226
|
+
function Ha(e6) {
|
|
3220
3227
|
if (Array.isArray(e6)) return e6;
|
|
3221
3228
|
}
|
|
3222
|
-
function
|
|
3229
|
+
function Ua(e6, t2) {
|
|
3223
3230
|
var n2 = Object.keys(e6);
|
|
3224
3231
|
if (Object.getOwnPropertySymbols) {
|
|
3225
3232
|
var r2 = Object.getOwnPropertySymbols(e6);
|
|
@@ -3229,101 +3236,101 @@ function Va(e6, t2) {
|
|
|
3229
3236
|
}
|
|
3230
3237
|
return n2;
|
|
3231
3238
|
}
|
|
3232
|
-
function
|
|
3239
|
+
function Wa(e6) {
|
|
3233
3240
|
for (var t2 = 1; t2 < arguments.length; t2++) {
|
|
3234
3241
|
var n2 = arguments[t2] == null ? {} : arguments[t2];
|
|
3235
|
-
t2 % 2 ?
|
|
3236
|
-
|
|
3237
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) :
|
|
3242
|
+
t2 % 2 ? Ua(Object(n2), true).forEach(function(t3) {
|
|
3243
|
+
Ga(e6, t3, n2[t3]);
|
|
3244
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e6, Object.getOwnPropertyDescriptors(n2)) : Ua(Object(n2)).forEach(function(t3) {
|
|
3238
3245
|
Object.defineProperty(e6, t3, Object.getOwnPropertyDescriptor(n2, t3));
|
|
3239
3246
|
});
|
|
3240
3247
|
}
|
|
3241
3248
|
return e6;
|
|
3242
3249
|
}
|
|
3243
|
-
function
|
|
3244
|
-
return (t2 =
|
|
3250
|
+
function Ga(e6, t2, n2) {
|
|
3251
|
+
return (t2 = Ya(t2)) in e6 ? Object.defineProperty(e6, t2, { value: n2, enumerable: true, configurable: true, writable: true }) : e6[t2] = n2, e6;
|
|
3245
3252
|
}
|
|
3246
|
-
function
|
|
3253
|
+
function Ka(e6, t2) {
|
|
3247
3254
|
if (!(e6 instanceof t2)) throw TypeError(`Cannot call a class as a function`);
|
|
3248
3255
|
}
|
|
3249
|
-
function
|
|
3256
|
+
function qa(e6, t2) {
|
|
3250
3257
|
for (var n2 = 0; n2 < t2.length; n2++) {
|
|
3251
3258
|
var r2 = t2[n2];
|
|
3252
|
-
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6,
|
|
3259
|
+
r2.enumerable = r2.enumerable || false, r2.configurable = true, `value` in r2 && (r2.writable = true), Object.defineProperty(e6, Ya(r2.key), r2);
|
|
3253
3260
|
}
|
|
3254
3261
|
}
|
|
3255
|
-
function
|
|
3256
|
-
return t2 &&
|
|
3262
|
+
function Ja(e6, t2, n2) {
|
|
3263
|
+
return t2 && qa(e6.prototype, t2), n2 && qa(e6, n2), Object.defineProperty(e6, "prototype", { writable: false }), e6;
|
|
3257
3264
|
}
|
|
3258
|
-
function
|
|
3259
|
-
var t2 =
|
|
3260
|
-
return
|
|
3265
|
+
function Ya(e6) {
|
|
3266
|
+
var t2 = Xa(e6, `string`);
|
|
3267
|
+
return U(t2) == `symbol` ? t2 : t2 + ``;
|
|
3261
3268
|
}
|
|
3262
|
-
function
|
|
3263
|
-
if (
|
|
3269
|
+
function Xa(e6, t2) {
|
|
3270
|
+
if (U(e6) != `object` || !e6) return e6;
|
|
3264
3271
|
var n2 = e6[Symbol.toPrimitive];
|
|
3265
3272
|
if (n2 !== void 0) {
|
|
3266
3273
|
var r2 = n2.call(e6, t2 || `default`);
|
|
3267
|
-
if (
|
|
3274
|
+
if (U(r2) != `object`) return r2;
|
|
3268
3275
|
throw TypeError(`@@toPrimitive must return a primitive value.`);
|
|
3269
3276
|
}
|
|
3270
3277
|
return (t2 === `string` ? String : Number)(e6);
|
|
3271
3278
|
}
|
|
3272
|
-
function
|
|
3279
|
+
function U(e6) {
|
|
3273
3280
|
"@babel/helpers - typeof";
|
|
3274
|
-
return
|
|
3281
|
+
return U = typeof Symbol == `function` && typeof Symbol.iterator == `symbol` ? function(e7) {
|
|
3275
3282
|
return typeof e7;
|
|
3276
3283
|
} : function(e7) {
|
|
3277
3284
|
return e7 && typeof Symbol == `function` && e7.constructor === Symbol && e7 !== Symbol.prototype ? `symbol` : typeof e7;
|
|
3278
|
-
},
|
|
3285
|
+
}, U(e6);
|
|
3279
3286
|
}
|
|
3280
|
-
var
|
|
3281
|
-
var
|
|
3282
|
-
function
|
|
3287
|
+
var Za = `https://www.i18next.com/how-to/using-icu-or-mf2`;
|
|
3288
|
+
var Qa = [`zero`, `one`, `two`, `few`, `many`, `other`];
|
|
3289
|
+
function $a() {
|
|
3283
3290
|
return { memoize: true, memoizeFallback: false, bindI18n: ``, bindI18nStore: ``, parseErrorHandler: function(e6, t2, n2, r2) {
|
|
3284
3291
|
return n2;
|
|
3285
3292
|
}, parseLngForICU: function(e6) {
|
|
3286
3293
|
return e6;
|
|
3287
3294
|
}, escapeVariables: false };
|
|
3288
3295
|
}
|
|
3289
|
-
function
|
|
3290
|
-
return n2 && t2 &&
|
|
3296
|
+
function eo(e6, t2, n2, r2) {
|
|
3297
|
+
return n2 && t2 && U(t2) === `object` ? `${r2} resolved to an object or array, but i18next-icu does not support returnObjects or joinArrays and returns the raw value unformatted.` : n2 && typeof t2 == `string` && t2.indexOf(`{{`) > -1 ? `${r2} could not be parsed (${e6.message}). It contains "{{": i18next interpolation like {{name}} does not work with ICU, use {name}.` : `${r2} could not be ${n2 ? `parsed` : `formatted`}: ${e6.message}`;
|
|
3291
3298
|
}
|
|
3292
|
-
var
|
|
3299
|
+
var to = function() {
|
|
3293
3300
|
function e6(t2) {
|
|
3294
|
-
|
|
3301
|
+
Ka(this, e6), this.type = `i18nFormat`, this.mem = {}, this.warned = /* @__PURE__ */ new Set(), this.init(null, t2);
|
|
3295
3302
|
}
|
|
3296
|
-
return
|
|
3303
|
+
return Ja(e6, [{ key: `init`, value: function(e7, t2) {
|
|
3297
3304
|
var n2 = this, r2 = e7 && e7.options && e7.options.i18nFormat || {};
|
|
3298
|
-
if (this.options =
|
|
3305
|
+
if (this.options = Ia(r2, t2, this.options || {}, $a()), this.formats = this.options.formats, e7) {
|
|
3299
3306
|
var i2 = this.options, a2 = i2.bindI18n, o2 = i2.bindI18nStore, s2 = i2.memoize;
|
|
3300
|
-
e7.IntlMessageFormat =
|
|
3307
|
+
e7.IntlMessageFormat = ja, 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() {
|
|
3301
3308
|
return n2.clearCache();
|
|
3302
3309
|
}), o2 && e7.store.on(o2, function() {
|
|
3303
3310
|
return n2.clearCache();
|
|
3304
3311
|
}));
|
|
3305
3312
|
}
|
|
3306
3313
|
} }, { key: `addUserDefinedFormats`, value: function(e7) {
|
|
3307
|
-
this.formats = this.formats ?
|
|
3314
|
+
this.formats = this.formats ? Wa(Wa({}, this.formats), e7) : e7, this.clearCache();
|
|
3308
3315
|
} }, { key: `parse`, value: function(e7, t2, n2, r2, i2, a2) {
|
|
3309
3316
|
var o2 = a2 && a2.resolved && a2.resolved.res, s2 = this.options.memoize && [n2, r2, i2], c2;
|
|
3310
3317
|
if (this.options.memoize) {
|
|
3311
|
-
var l2 =
|
|
3318
|
+
var l2 = Fa(this.mem, s2);
|
|
3312
3319
|
l2 && l2.res === e7 && (c2 = l2.fc);
|
|
3313
3320
|
}
|
|
3314
3321
|
try {
|
|
3315
|
-
c2 || (this.debug && typeof e7 == `string` && e7.indexOf(`$t(`) > -1 && this.firstTime(`nesting ${n2} ${r2} ${i2}`) && this.warn(`key "${i2}" (${n2}/${r2}) contains "$t(", but i18next-icu does not support nesting, the text is output as is.`), c2 = new
|
|
3316
|
-
var u2 = t2 && t2.replace &&
|
|
3322
|
+
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 ja(e7, this.options.parseLngForICU(n2), this.formats, { ignoreTag: true }), this.options.memoize && (this.options.memoizeFallback || !a2 || o2) && Pa(this.mem, s2, { res: e7, fc: c2 }));
|
|
3323
|
+
var u2 = t2 && t2.replace && U(t2.replace) === `object` ? Wa(Wa({}, t2), t2.replace) : t2;
|
|
3317
3324
|
return c2.format(this.escapeVariableValues(u2));
|
|
3318
3325
|
} catch (a3) {
|
|
3319
|
-
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(
|
|
3326
|
+
return this.debug && this.firstTime(`error ${n2} ${r2} ${i2}`) && this.warn(eo(a3, e7, !c2, `key "${i2}" (${n2}/${r2})`)), this.options.parseErrorHandler(a3, i2, e7, t2);
|
|
3320
3327
|
}
|
|
3321
3328
|
} }, { key: `addLookupKeys`, value: function(e7, t2, n2, r2, i2) {
|
|
3322
3329
|
return this.debug && i2 && this.checkSuffixKeys(t2, n2, r2, i2), e7;
|
|
3323
3330
|
} }, { key: `checkSuffixKeys`, value: function(e7, t2, n2, r2) {
|
|
3324
3331
|
var i2 = r2.count, a2 = r2.context, o2 = this.i18next.options, s2 = o2.pluralSeparator, c2 = s2 === void 0 ? `_` : s2, l2 = o2.contextSeparator, u2 = l2 === void 0 ? `_` : l2, d2 = this.i18next.services.resourceStore, f2 = `key "${e7}" (${t2}/${n2})`;
|
|
3325
3332
|
if (i2 !== void 0 && this.firstTime(`plural ${t2} ${n2} ${e7}`)) {
|
|
3326
|
-
var p2 =
|
|
3333
|
+
var p2 = Qa.concat(Qa.map(function(e8) {
|
|
3327
3334
|
return `ordinal${c2}${e8}`;
|
|
3328
3335
|
})).map(function(t3) {
|
|
3329
3336
|
return `${e7}${c2}${t3}`;
|
|
@@ -3337,33 +3344,33 @@ var $a = function() {
|
|
|
3337
3344
|
} }, { key: `firstTime`, value: function(e7) {
|
|
3338
3345
|
return !this.warned.has(e7) && (this.warned.add(e7), true);
|
|
3339
3346
|
} }, { key: `warn`, value: function(e7) {
|
|
3340
|
-
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${
|
|
3347
|
+
this.i18next.services.logger.warn(`i18next-icu: ${e7} See ${Za}`);
|
|
3341
3348
|
} }, { key: `clearCache`, value: function() {
|
|
3342
3349
|
this.mem = {};
|
|
3343
3350
|
} }, { key: `escapeVariableValues`, value: function(e7) {
|
|
3344
|
-
if (!this.options.escapeVariables || !e7 ||
|
|
3351
|
+
if (!this.options.escapeVariables || !e7 || U(e7) !== `object`) return e7;
|
|
3345
3352
|
for (var t2 = {}, n2 = 0, r2 = Object.entries(e7); n2 < r2.length; n2++) {
|
|
3346
|
-
var i2 =
|
|
3353
|
+
var i2 = La(r2[n2], 2), a2 = i2[0], o2 = i2[1];
|
|
3347
3354
|
t2[a2] = typeof o2 == `string` ? o2.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`) : o2;
|
|
3348
3355
|
}
|
|
3349
3356
|
return t2;
|
|
3350
3357
|
} }]), e6;
|
|
3351
3358
|
}();
|
|
3352
|
-
|
|
3353
|
-
function
|
|
3359
|
+
to.type = `i18nFormat`;
|
|
3360
|
+
function no({ icuOptions: e6 = {}, ...t2 }) {
|
|
3354
3361
|
let { parseErrorHandler: n2 = void 0 } = t2;
|
|
3355
|
-
return
|
|
3362
|
+
return mi(t2, { icu: new to({ parseErrorHandler: n2, bindI18n: t2.bindI18n, ...e6 }) });
|
|
3356
3363
|
}
|
|
3357
|
-
var
|
|
3364
|
+
var ro = (e6, t2, n2, r2) => {
|
|
3358
3365
|
let i2 = [n2, { code: t2, ...r2 || {} }];
|
|
3359
3366
|
if (e6?.services?.logger?.forward) return e6.services.logger.forward(i2, `warn`, `react-i18next::`, true);
|
|
3360
|
-
|
|
3367
|
+
W(i2[0]) && (i2[0] = `react-i18next:: ${i2[0]}`), e6?.services?.logger?.warn ? e6.services.logger.warn(...i2) : console?.warn && console.warn(...i2);
|
|
3361
3368
|
};
|
|
3362
|
-
var
|
|
3363
|
-
var
|
|
3364
|
-
|
|
3369
|
+
var io = {};
|
|
3370
|
+
var ao = (e6, t2, n2, r2) => {
|
|
3371
|
+
W(n2) && io[n2] || (W(n2) && (io[n2] = /* @__PURE__ */ new Date()), ro(e6, t2, n2, r2));
|
|
3365
3372
|
};
|
|
3366
|
-
var
|
|
3373
|
+
var oo = (e6, t2) => () => {
|
|
3367
3374
|
if (e6.isInitialized) t2();
|
|
3368
3375
|
else {
|
|
3369
3376
|
let n2 = () => {
|
|
@@ -3374,29 +3381,29 @@ var io = (e6, t2) => () => {
|
|
|
3374
3381
|
e6.on(`initialized`, n2);
|
|
3375
3382
|
}
|
|
3376
3383
|
};
|
|
3377
|
-
var
|
|
3378
|
-
e6.loadNamespaces(t2,
|
|
3384
|
+
var so = (e6, t2, n2) => {
|
|
3385
|
+
e6.loadNamespaces(t2, oo(e6, n2));
|
|
3379
3386
|
};
|
|
3380
|
-
var
|
|
3381
|
-
if (
|
|
3387
|
+
var co = (e6, t2, n2, r2) => {
|
|
3388
|
+
if (W(n2) && (n2 = [n2]), e6.options.preload && e6.options.preload.indexOf(t2) > -1) return so(e6, n2, r2);
|
|
3382
3389
|
n2.forEach((t3) => {
|
|
3383
3390
|
e6.options.ns.indexOf(t3) < 0 && e6.options.ns.push(t3);
|
|
3384
|
-
}), e6.loadLanguages(t2,
|
|
3391
|
+
}), e6.loadLanguages(t2, oo(e6, r2));
|
|
3385
3392
|
};
|
|
3386
|
-
var
|
|
3393
|
+
var lo = (e6, t2, n2 = {}) => !t2.languages || !t2.languages.length ? (ao(t2, `NO_LANGUAGES`, `i18n.languages were undefined or empty`, { languages: t2.languages }), true) : t2.hasLoadedNamespace(e6, { lng: n2.lng, precheck: (t3, r2) => {
|
|
3387
3394
|
if (n2.bindI18n && n2.bindI18n.indexOf(`languageChanging`) > -1 && t3.services.backendConnector.backend && t3.isLanguageChangingTo && !r2(t3.isLanguageChangingTo, e6)) return false;
|
|
3388
3395
|
} });
|
|
3389
|
-
var
|
|
3390
|
-
var
|
|
3391
|
-
var
|
|
3392
|
-
var
|
|
3393
|
-
var
|
|
3394
|
-
var
|
|
3395
|
-
var mo = () => po;
|
|
3396
|
-
var ho;
|
|
3396
|
+
var W = (e6) => typeof e6 == `string`;
|
|
3397
|
+
var uo = (e6) => typeof e6 == `object` && !!e6;
|
|
3398
|
+
var fo = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
3399
|
+
var po = { "&": `&`, "&": `&`, "<": `<`, "<": `<`, ">": `>`, ">": `>`, "'": `'`, "'": `'`, """: `"`, """: `"`, " ": ` `, " ": ` `, "©": `\xA9`, "©": `\xA9`, "®": `\xAE`, "®": `\xAE`, "…": `\u2026`, "…": `\u2026`, "/": `/`, "/": `/` };
|
|
3400
|
+
var mo = (e6) => po[e6];
|
|
3401
|
+
var ho = { bindI18n: `languageChanged`, bindI18nStore: ``, transEmptyNodeValue: ``, transSupportBasicHtmlNodes: true, transWrapTextNodes: ``, transKeepBasicHtmlNodesFor: [`br`, `strong`, `i`, `p`], useSuspense: true, unescape: (e6) => e6.replace(fo, mo) };
|
|
3397
3402
|
var go = () => ho;
|
|
3398
|
-
var _o
|
|
3399
|
-
var vo =
|
|
3403
|
+
var _o;
|
|
3404
|
+
var vo = () => _o;
|
|
3405
|
+
var yo = (0, import_react.createContext)();
|
|
3406
|
+
var bo = class {
|
|
3400
3407
|
constructor() {
|
|
3401
3408
|
this.usedNamespaces = {};
|
|
3402
3409
|
}
|
|
@@ -3409,32 +3416,32 @@ var vo = class {
|
|
|
3409
3416
|
return Object.keys(this.usedNamespaces);
|
|
3410
3417
|
}
|
|
3411
3418
|
};
|
|
3412
|
-
var
|
|
3419
|
+
var xo = (e6, t2) => {
|
|
3413
3420
|
let n2 = (0, import_react.useRef)();
|
|
3414
3421
|
return (0, import_react.useEffect)(() => {
|
|
3415
3422
|
n2.current = t2 ? n2.current : e6;
|
|
3416
3423
|
}, [e6, t2]), n2.current;
|
|
3417
3424
|
};
|
|
3418
|
-
var
|
|
3419
|
-
var
|
|
3420
|
-
var
|
|
3421
|
-
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = (0, import_react.useContext)(
|
|
3422
|
-
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new
|
|
3423
|
-
|
|
3424
|
-
let e7 = (e8, t4) =>
|
|
3425
|
+
var So = (e6, t2, n2, r2) => e6.getFixedT(t2, n2, r2);
|
|
3426
|
+
var Co = (e6, t2, n2, r2) => (0, import_react.useCallback)(So(e6, t2, n2, r2), [e6, t2, n2, r2]);
|
|
3427
|
+
var wo = (e6, t2 = {}) => {
|
|
3428
|
+
let { i18n: n2 } = t2, { i18n: r2, defaultNS: i2 } = (0, import_react.useContext)(yo) || {}, a2 = n2 || r2 || vo();
|
|
3429
|
+
if (a2 && !a2.reportNamespaces && (a2.reportNamespaces = new bo()), !a2) {
|
|
3430
|
+
ao(a2, `NO_I18NEXT_INSTANCE`, `useTranslation: You will need to pass in an i18next instance by using initReactI18next`);
|
|
3431
|
+
let e7 = (e8, t4) => W(t4) ? t4 : uo(t4) && W(t4.defaultValue) ? t4.defaultValue : Array.isArray(e8) ? e8[e8.length - 1] : e8, t3 = [e7, {}, false];
|
|
3425
3432
|
return t3.t = e7, t3.i18n = {}, t3.ready = false, t3;
|
|
3426
3433
|
}
|
|
3427
|
-
a2.options.react?.wait &&
|
|
3428
|
-
let c2 = { ...
|
|
3429
|
-
p2 =
|
|
3430
|
-
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) =>
|
|
3434
|
+
a2.options.react?.wait && ao(a2, `DEPRECATED_OPTION`, `useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.`);
|
|
3435
|
+
let c2 = { ...go(), ...a2.options.react, ...t2 }, { useSuspense: d2, keyPrefix: f2 } = c2, p2 = e6 || i2 || a2.options?.defaultNS;
|
|
3436
|
+
p2 = W(p2) ? [p2] : p2 || [`translation`], a2.reportNamespaces.addUsedNamespaces?.(p2);
|
|
3437
|
+
let m2 = (a2.isInitialized || a2.initializedStoreOnce) && p2.every((e7) => lo(e7, a2, c2)), h2 = Co(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), g2 = () => h2, _2 = () => So(a2, t2.lng || null, c2.nsMode === `fallback` ? p2 : p2[0], f2), [v2, y2] = (0, import_react.useState)(g2), b2 = p2.join();
|
|
3431
3438
|
t2.lng && (b2 = `${t2.lng}${b2}`);
|
|
3432
|
-
let x2 =
|
|
3439
|
+
let x2 = xo(b2), S2 = (0, import_react.useRef)(true);
|
|
3433
3440
|
(0, import_react.useEffect)(() => {
|
|
3434
3441
|
let { bindI18n: e7, bindI18nStore: n3 } = c2;
|
|
3435
|
-
S2.current = true, !m2 && !d2 && (t2.lng ?
|
|
3442
|
+
S2.current = true, !m2 && !d2 && (t2.lng ? co(a2, t2.lng, p2, () => {
|
|
3436
3443
|
S2.current && y2(_2);
|
|
3437
|
-
}) :
|
|
3444
|
+
}) : so(a2, p2, () => {
|
|
3438
3445
|
S2.current && y2(_2);
|
|
3439
3446
|
})), m2 && x2 && x2 !== b2 && S2.current && y2(_2);
|
|
3440
3447
|
let r3 = () => {
|
|
@@ -3449,131 +3456,131 @@ var So = (e6, t2 = {}) => {
|
|
|
3449
3456
|
let C2 = [v2, a2, m2];
|
|
3450
3457
|
if (C2.t = v2, C2.i18n = a2, C2.ready = m2, m2 || !m2 && !d2) return C2;
|
|
3451
3458
|
throw new Promise((e7) => {
|
|
3452
|
-
t2.lng ?
|
|
3459
|
+
t2.lng ? co(a2, t2.lng, p2, () => e7()) : so(a2, p2, () => e7());
|
|
3453
3460
|
});
|
|
3454
3461
|
};
|
|
3455
|
-
function
|
|
3462
|
+
function To({ i18n: e6, defaultNS: t2, children: n2 }) {
|
|
3456
3463
|
let i2 = (0, import_react.useMemo)(() => ({ i18n: e6, defaultNS: t2 }), [e6, t2]);
|
|
3457
|
-
return (0, import_react.createElement)(
|
|
3464
|
+
return (0, import_react.createElement)(yo.Provider, { value: i2 }, n2);
|
|
3458
3465
|
}
|
|
3459
|
-
var
|
|
3460
|
-
var
|
|
3461
|
-
function
|
|
3466
|
+
var Eo = `wix-warmup-data`;
|
|
3467
|
+
var Do = null;
|
|
3468
|
+
function Oo(e6) {
|
|
3462
3469
|
if (typeof document < `u`) try {
|
|
3463
|
-
let t2 = document.getElementById(
|
|
3464
|
-
return t2 ? (
|
|
3470
|
+
let t2 = document.getElementById(Eo)?.textContent;
|
|
3471
|
+
return t2 ? (Do?.text !== t2 && (Do = { text: t2, data: JSON.parse(t2).builderComponentsWarmupData ?? {} }), Do.data[e6] ?? void 0) : void 0;
|
|
3465
3472
|
} catch {
|
|
3466
3473
|
return;
|
|
3467
3474
|
}
|
|
3468
3475
|
}
|
|
3469
|
-
var
|
|
3470
|
-
var
|
|
3471
|
-
var
|
|
3472
|
-
var
|
|
3473
|
-
var
|
|
3474
|
-
let t2 = e6.scope ??
|
|
3475
|
-
return n2 || (n2 = /* @__PURE__ */ new Map(),
|
|
3476
|
+
var ko = 5e3;
|
|
3477
|
+
var Ao = 100;
|
|
3478
|
+
var jo = {};
|
|
3479
|
+
var Mo = /* @__PURE__ */ new WeakMap();
|
|
3480
|
+
var No = (e6) => {
|
|
3481
|
+
let t2 = e6.scope ?? jo, n2 = Mo.get(t2);
|
|
3482
|
+
return n2 || (n2 = /* @__PURE__ */ new Map(), Mo.set(t2, n2)), n2;
|
|
3476
3483
|
};
|
|
3477
|
-
function
|
|
3484
|
+
function Po({ key: e6, warmupData: t2, fetchData: n2 }) {
|
|
3478
3485
|
if (e6 === null) return n2();
|
|
3479
3486
|
if (t2.isServer) return n2().then((n3) => (t2.set(e6, n3), n3));
|
|
3480
|
-
let r2 =
|
|
3487
|
+
let r2 = No(t2), i2 = Date.now();
|
|
3481
3488
|
for (let [e7, t3] of r2) t3.expiresAt <= i2 && r2.delete(e7);
|
|
3482
3489
|
let a2 = r2.get(e6);
|
|
3483
3490
|
if (a2) return a2.promise;
|
|
3484
|
-
let o2 =
|
|
3491
|
+
let o2 = Oo(e6);
|
|
3485
3492
|
if (o2 !== void 0) {
|
|
3486
|
-
let t3 =
|
|
3487
|
-
return r2.set(e6, { promise: t3, expiresAt: i2 +
|
|
3493
|
+
let t3 = zn(o2);
|
|
3494
|
+
return r2.set(e6, { promise: t3, expiresAt: i2 + ko }), t3;
|
|
3488
3495
|
}
|
|
3489
3496
|
let s2 = (async () => await t2.get(e6) ?? n2())();
|
|
3490
|
-
r2.size >=
|
|
3497
|
+
r2.size >= Ao && r2.delete(r2.keys().next().value);
|
|
3491
3498
|
let c2 = { promise: s2, expiresAt: 1 / 0 };
|
|
3492
3499
|
return r2.set(e6, c2), s2.then(() => {
|
|
3493
|
-
c2.expiresAt = Date.now() +
|
|
3500
|
+
c2.expiresAt = Date.now() + ko;
|
|
3494
3501
|
}, () => {
|
|
3495
3502
|
r2.get(e6) === c2 && r2.delete(e6);
|
|
3496
3503
|
}), s2;
|
|
3497
3504
|
}
|
|
3498
|
-
var
|
|
3499
|
-
var
|
|
3500
|
-
var
|
|
3501
|
-
var
|
|
3502
|
-
function
|
|
3503
|
-
let n2 =
|
|
3505
|
+
var Fo = `blog-builder:i18n`;
|
|
3506
|
+
var Io = `translation`;
|
|
3507
|
+
var Lo = () => Oo(Fo);
|
|
3508
|
+
var Ro = /* @__PURE__ */ new Map();
|
|
3509
|
+
function zo(e6, t2) {
|
|
3510
|
+
let n2 = Ro.get(e6);
|
|
3504
3511
|
if (n2) return n2;
|
|
3505
|
-
let r2 =
|
|
3506
|
-
return
|
|
3512
|
+
let r2 = Lo(), i2 = r2?.locale === e6 ? r2.messages : void 0, a2 = no({ locale: e6, useSuspense: true, ...i2 ? { messages: i2 } : { asyncMessagesLoader: t2 } });
|
|
3513
|
+
return Ro.set(e6, a2), a2;
|
|
3507
3514
|
}
|
|
3508
|
-
function
|
|
3509
|
-
let t2 = () => e6.loadNamespaces(
|
|
3515
|
+
function Bo(e6) {
|
|
3516
|
+
let t2 = () => e6.loadNamespaces(Io).then(() => void 0, () => void 0);
|
|
3510
3517
|
return e6.isInitialized ? t2() : new Promise((n2) => {
|
|
3511
3518
|
e6.on(`initialized`, () => void t2().then(n2));
|
|
3512
3519
|
});
|
|
3513
3520
|
}
|
|
3514
|
-
function
|
|
3521
|
+
function Vo(e6, t2) {
|
|
3515
3522
|
return e6.getResourceBundle(t2, `translation`) ?? e6.getResourceBundle(`en`, `translation`);
|
|
3516
3523
|
}
|
|
3517
|
-
var
|
|
3524
|
+
var Ho = (e6, t2, n2) => {
|
|
3518
3525
|
let r2 = t2.lastIndexOf(`?`), i2 = e6[r2 === -1 || r2 < t2.lastIndexOf(`/`) ? t2 : t2.slice(0, r2)];
|
|
3519
3526
|
return i2 ? typeof i2 == `function` ? i2() : Promise.resolve(i2) : new Promise((e7, r3) => {
|
|
3520
3527
|
(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.`))));
|
|
3521
3528
|
});
|
|
3522
3529
|
};
|
|
3523
|
-
var
|
|
3524
|
-
Sr({ isDev: false, loadMessages: (e6) =>
|
|
3525
|
-
var
|
|
3526
|
-
function
|
|
3527
|
-
let t2 =
|
|
3528
|
-
return t2 || (t2 =
|
|
3530
|
+
var Uo = (e6) => e6.split(`-`)[0] ?? e6;
|
|
3531
|
+
Sr({ isDev: false, loadMessages: (e6) => Ho(Object.assign({ "../assets/locale/messages_en.dev.json": () => _n(() => Promise.resolve().then(() => Jo), void 0, import_meta.url), "../assets/locale/messages_en.json": () => _n(() => Promise.resolve().then(() => Xo), void 0, import_meta.url) }), `../assets/locale/messages_${Uo(e6)}.json`, 4), loadDevMessages: (e6) => Ho(Object.assign({ "../assets/locale/messages_en.dev.json": () => _n(() => Promise.resolve().then(() => Jo), void 0, import_meta.url) }), `../assets/locale/messages_${Uo(e6)}.dev.json`, 4) });
|
|
3532
|
+
var Wo = /* @__PURE__ */ new WeakMap();
|
|
3533
|
+
function Go(e6) {
|
|
3534
|
+
let t2 = Wo.get(e6);
|
|
3535
|
+
return t2 || (t2 = Bo(e6).finally(() => Wo.delete(e6)), Wo.set(e6, t2)), t2;
|
|
3529
3536
|
}
|
|
3530
|
-
function
|
|
3531
|
-
let n2 =
|
|
3537
|
+
function Ko({ i18n: e6, locale: t2 }) {
|
|
3538
|
+
let n2 = Kn(), r2 = yr();
|
|
3532
3539
|
if (!n2) return null;
|
|
3533
|
-
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw
|
|
3534
|
-
let i2 =
|
|
3535
|
-
return i2 && r2.set(
|
|
3536
|
-
}
|
|
3537
|
-
function
|
|
3538
|
-
let t2 =
|
|
3539
|
-
return { i18n:
|
|
3540
|
-
}
|
|
3541
|
-
var
|
|
3542
|
-
var
|
|
3543
|
-
var
|
|
3544
|
-
var
|
|
3545
|
-
var
|
|
3546
|
-
var
|
|
3547
|
-
var
|
|
3548
|
-
let n2 =
|
|
3540
|
+
if (!e6.isInitialized || !e6.hasLoadedNamespace(`translation`)) throw Go(e6);
|
|
3541
|
+
let i2 = Vo(e6, t2);
|
|
3542
|
+
return i2 && r2.set(Fo, { locale: t2, messages: i2 }), null;
|
|
3543
|
+
}
|
|
3544
|
+
function qo(e6) {
|
|
3545
|
+
let t2 = hr(), n2 = Lo()?.locale ?? t2 ?? `en`;
|
|
3546
|
+
return { i18n: zo(n2, e6), locale: n2 };
|
|
3547
|
+
}
|
|
3548
|
+
var Jo = _({ default: () => Yo });
|
|
3549
|
+
var Yo = { "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` };
|
|
3550
|
+
var Xo = _({ default: () => Qo, title: () => Zo });
|
|
3551
|
+
var Zo = `My App`;
|
|
3552
|
+
var Qo = { "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: Zo, "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.` };
|
|
3553
|
+
var $o = Object.assign({ "../assets/locale/messages_en.dev.json": Jo, "../assets/locale/messages_en.json": Xo });
|
|
3554
|
+
var es = (e6, t2) => {
|
|
3555
|
+
let n2 = $o[`../assets/locale/messages_${Uo(e6)}${t2}.json`];
|
|
3549
3556
|
return n2 ? Promise.resolve(n2) : Promise.reject(Error(`no messages file`));
|
|
3550
3557
|
};
|
|
3551
|
-
var
|
|
3552
|
-
var
|
|
3553
|
-
var
|
|
3554
|
-
var
|
|
3555
|
-
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted:
|
|
3556
|
-
return { timeToRead: (t3) => e6(
|
|
3558
|
+
var ts = Sr({ isDev: false, loadMessages: (e6) => es(e6, ``), loadDevMessages: (e6) => es(e6, `.dev`) });
|
|
3559
|
+
var ns = (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);
|
|
3560
|
+
var G = { 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` };
|
|
3561
|
+
var rs = (e6, t2) => {
|
|
3562
|
+
let n2 = (n3) => (r2) => e6(n3, { count: r2, formatted: ns(r2, `full`, t2) });
|
|
3563
|
+
return { timeToRead: (t3) => e6(G.timeToRead, { count: t3 }), viewCount: n2(G.viewCount), commentCount: n2(G.commentCount), likeCount: n2(G.likeCount), noPostsEmptyState: () => ({ title: e6(G.noPostsTitle), description: e6(G.noPostsDescription) }), noRelatedPostsEmptyState: () => ({ title: e6(G.noRelatedPostsTitle), description: e6(G.noRelatedPostsDescription) }), canvas: { postTitle: () => e6(G.canvasPostTitle), authorName: () => e6(G.canvasAuthorName), excerpt: () => e6(G.canvasExcerpt), content: () => e6(G.canvasContent), category: () => e6(G.canvasCategory), categoryNumbered: (t3) => e6(G.canvasCategoryNumbered, { number: t3 }), tagNumbered: (t3) => e6(G.canvasTagNumbered, { number: t3 }), coverAlt: () => e6(G.canvasCoverAlt), authorPhotoAlt: () => e6(G.canvasAuthorPhotoAlt) } };
|
|
3557
3564
|
};
|
|
3558
|
-
function
|
|
3565
|
+
function is(e6) {
|
|
3559
3566
|
return Object.keys(e6).length === 1 && `$and` in e6 && Array.isArray(e6.$and);
|
|
3560
3567
|
}
|
|
3561
|
-
function
|
|
3568
|
+
function as(e6) {
|
|
3562
3569
|
return Object.keys(e6).length === 1 && `$or` in e6 && Array.isArray(e6.$or);
|
|
3563
3570
|
}
|
|
3564
|
-
function
|
|
3571
|
+
function os(e6) {
|
|
3565
3572
|
return Object.keys(e6).length === 1 && `$not` in e6 && typeof e6.$not == `object`;
|
|
3566
3573
|
}
|
|
3567
|
-
function
|
|
3568
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...
|
|
3574
|
+
function K(e6, t2) {
|
|
3575
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $and: [...is(e6) ? e6.$and : [e6], ...is(t2) ? t2.$and : [t2]] };
|
|
3569
3576
|
}
|
|
3570
|
-
function
|
|
3571
|
-
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...
|
|
3577
|
+
function ss(e6, t2) {
|
|
3578
|
+
return e6 === void 0 || Object.keys(e6).length === 0 ? t2 : t2 === void 0 || Object.keys(t2).length === 0 ? e6 : { $or: [...as(e6) ? e6.$or : [e6], ...as(t2) ? t2.$or : [t2]] };
|
|
3572
3579
|
}
|
|
3573
|
-
function
|
|
3574
|
-
if (e6 !== void 0 && Object.keys(e6).length !== 0) return
|
|
3580
|
+
function cs(e6) {
|
|
3581
|
+
if (e6 !== void 0 && Object.keys(e6).length !== 0) return os(e6) ? e6.$not : { $not: e6 };
|
|
3575
3582
|
}
|
|
3576
|
-
var
|
|
3583
|
+
var ls = class {
|
|
3577
3584
|
_items;
|
|
3578
3585
|
_fetchNextPage;
|
|
3579
3586
|
_fetchPrevPage;
|
|
@@ -3603,7 +3610,7 @@ var ss = class {
|
|
|
3603
3610
|
return await this._fetchPrevPage();
|
|
3604
3611
|
}
|
|
3605
3612
|
};
|
|
3606
|
-
var
|
|
3613
|
+
var us = class extends ls {
|
|
3607
3614
|
_nextCursor;
|
|
3608
3615
|
_prevCursor;
|
|
3609
3616
|
cursors;
|
|
@@ -3617,7 +3624,7 @@ var cs = class extends ss {
|
|
|
3617
3624
|
return !!this._prevCursor;
|
|
3618
3625
|
}
|
|
3619
3626
|
};
|
|
3620
|
-
var
|
|
3627
|
+
var ds = class extends ls {
|
|
3621
3628
|
_totalCount;
|
|
3622
3629
|
_offset;
|
|
3623
3630
|
_tooManyToCount;
|
|
@@ -3640,76 +3647,76 @@ var ls = class extends ss {
|
|
|
3640
3647
|
return !!(this._limit !== 0 && this.currentPage && this.currentPage > 0);
|
|
3641
3648
|
}
|
|
3642
3649
|
};
|
|
3643
|
-
function
|
|
3650
|
+
function fs(e6) {
|
|
3644
3651
|
let t2 = (n2) => ({ query: n2, async find() {
|
|
3645
3652
|
try {
|
|
3646
3653
|
let r2 = e6.requestTransformer(e6.pagingMethod === `CURSOR` && n2.cursorPaging.cursor ? { cursorPaging: n2.cursorPaging } : n2), i2 = await e6.func(r2), { [Ze]: a2, [Qe]: o2 } = e6.responseTransformer(i2);
|
|
3647
3654
|
if (e6.pagingMethod === `OFFSET`) {
|
|
3648
3655
|
let e7 = n2;
|
|
3649
|
-
return new
|
|
3656
|
+
return new ds({ 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 });
|
|
3650
3657
|
}
|
|
3651
3658
|
let s2 = n2.cursorPaging;
|
|
3652
|
-
return new
|
|
3659
|
+
return new us({ 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 });
|
|
3653
3660
|
} catch (t3) {
|
|
3654
3661
|
throw e6.errorTransformer(t3);
|
|
3655
3662
|
}
|
|
3656
3663
|
}, skipTo(e7) {
|
|
3657
3664
|
return t2({ ...n2, cursorPaging: { cursor: e7, limit: n2.cursorPaging.limit } });
|
|
3658
3665
|
}, eq(r2, i2) {
|
|
3659
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3660
|
-
return t2({ ...n2, filter:
|
|
3666
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [q(e6.transformationPaths, r2)]: a2 };
|
|
3667
|
+
return t2({ ...n2, filter: K(n2.filter, o2) });
|
|
3661
3668
|
}, ne(r2, i2) {
|
|
3662
|
-
let a2 = i2 === void 0 ? null : i2, o2 = { [
|
|
3663
|
-
return t2({ ...n2, filter:
|
|
3669
|
+
let a2 = i2 === void 0 ? null : i2, o2 = { [q(e6.transformationPaths, r2)]: { $ne: a2 } };
|
|
3670
|
+
return t2({ ...n2, filter: K(n2.filter, o2) });
|
|
3664
3671
|
}, ge(r2, i2) {
|
|
3665
|
-
let a2 = { [
|
|
3666
|
-
return t2({ ...n2, filter:
|
|
3672
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $gte: i2 } };
|
|
3673
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3667
3674
|
}, gt(r2, i2) {
|
|
3668
|
-
let a2 = { [
|
|
3669
|
-
return t2({ ...n2, filter:
|
|
3675
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $gt: i2 } };
|
|
3676
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3670
3677
|
}, le(r2, i2) {
|
|
3671
|
-
let a2 = { [
|
|
3672
|
-
return t2({ ...n2, filter:
|
|
3678
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $lte: i2 } };
|
|
3679
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3673
3680
|
}, lt(r2, i2) {
|
|
3674
|
-
let a2 = { [
|
|
3675
|
-
return t2({ ...n2, filter:
|
|
3681
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $lt: i2 } };
|
|
3682
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3676
3683
|
}, isNotEmpty(e7) {
|
|
3677
3684
|
return this.ne(e7, null);
|
|
3678
3685
|
}, isEmpty(e7) {
|
|
3679
3686
|
return this.eq(e7, null);
|
|
3680
3687
|
}, startsWith(r2, i2) {
|
|
3681
|
-
let a2 = { [
|
|
3682
|
-
return t2({ ...n2, filter:
|
|
3688
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $startsWith: i2 } };
|
|
3689
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3683
3690
|
}, endsWith(r2, i2) {
|
|
3684
|
-
let a2 = { [
|
|
3685
|
-
return t2({ ...n2, filter:
|
|
3691
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $endsWith: i2 } };
|
|
3692
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3686
3693
|
}, contains(r2, i2) {
|
|
3687
|
-
let a2 = { [
|
|
3688
|
-
return t2({ ...n2, filter:
|
|
3694
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $contains: i2 } };
|
|
3695
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3689
3696
|
}, hasSome(r2, ...i2) {
|
|
3690
|
-
let a2 = { [
|
|
3691
|
-
return t2({ ...n2, filter:
|
|
3697
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $hasSome: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3698
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3692
3699
|
}, hasAll(r2, ...i2) {
|
|
3693
|
-
let a2 = { [
|
|
3694
|
-
return t2({ ...n2, filter:
|
|
3700
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $hasAll: Array.isArray(i2[0]) ? i2[0] : i2 } };
|
|
3701
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3695
3702
|
}, between(e7, t3, n3) {
|
|
3696
3703
|
return this.ge(e7, t3).lt(e7, n3);
|
|
3697
3704
|
}, in(r2, i2) {
|
|
3698
|
-
let a2 = { [
|
|
3699
|
-
return t2({ ...n2, filter:
|
|
3705
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $in: i2 } };
|
|
3706
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3700
3707
|
}, exists(r2, i2 = true) {
|
|
3701
|
-
let a2 = { [
|
|
3702
|
-
return t2({ ...n2, filter:
|
|
3708
|
+
let a2 = { [q(e6.transformationPaths, r2)]: { $exists: i2 } };
|
|
3709
|
+
return t2({ ...n2, filter: K(n2.filter, a2) });
|
|
3703
3710
|
}, or(e7) {
|
|
3704
|
-
return t2({ ...n2, filter:
|
|
3711
|
+
return t2({ ...n2, filter: ss(n2.filter, e7.query.filter) });
|
|
3705
3712
|
}, and(e7) {
|
|
3706
|
-
return t2({ ...n2, filter:
|
|
3713
|
+
return t2({ ...n2, filter: K(n2.filter, e7.query.filter) });
|
|
3707
3714
|
}, not(e7) {
|
|
3708
|
-
return t2({ ...n2, filter:
|
|
3715
|
+
return t2({ ...n2, filter: cs(e7.query.filter) });
|
|
3709
3716
|
}, ascending(...r2) {
|
|
3710
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3717
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: q(e6.transformationPaths, t3), order: `ASC` }))] });
|
|
3711
3718
|
}, descending(...r2) {
|
|
3712
|
-
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName:
|
|
3719
|
+
return t2({ ...n2, sort: [...n2.sort ?? [], ...r2.map((t3) => ({ fieldName: q(e6.transformationPaths, t3), order: `DESC` }))] });
|
|
3713
3720
|
}, skip(e7) {
|
|
3714
3721
|
return t2({ ...n2, paging: { offset: e7, limit: `limit` in n2.paging ? n2.paging.limit : 50 } });
|
|
3715
3722
|
}, limit(r2) {
|
|
@@ -3722,82 +3729,82 @@ function us(e6) {
|
|
|
3722
3729
|
} });
|
|
3723
3730
|
return t2({ filter: {}, ...e6.pagingMethod === `OFFSET` ? { paging: { offset: 0, limit: 50 } } : { cursorPaging: { limit: 50 } } });
|
|
3724
3731
|
}
|
|
3725
|
-
function
|
|
3732
|
+
function q(e6, t2) {
|
|
3726
3733
|
let n2 = Object.entries(e6).find(([e7]) => e7 === t2 || t2.startsWith(`${e7}.`))?.[0];
|
|
3727
3734
|
return n2 ? t2.replace(n2, e6[n2]) : et(t2, { ...e6, ...$e });
|
|
3728
3735
|
}
|
|
3729
|
-
var
|
|
3730
|
-
var
|
|
3731
|
-
var
|
|
3732
|
-
var
|
|
3733
|
-
var
|
|
3734
|
-
var
|
|
3735
|
-
function
|
|
3736
|
+
var ps = `filter`;
|
|
3737
|
+
var ms = `sort`;
|
|
3738
|
+
var hs = `cursorPaging`;
|
|
3739
|
+
var gs = `paging`;
|
|
3740
|
+
var _s = [ps, ms, hs];
|
|
3741
|
+
var vs = [ps, ms, gs];
|
|
3742
|
+
function ys(e6, t2) {
|
|
3736
3743
|
return !e6 || typeof e6 != `object` ? false : t2.some((t3) => e6.hasOwnProperty(t3));
|
|
3737
3744
|
}
|
|
3738
|
-
function
|
|
3739
|
-
return
|
|
3745
|
+
function bs(e6) {
|
|
3746
|
+
return ys(e6, _s);
|
|
3740
3747
|
}
|
|
3741
|
-
function
|
|
3742
|
-
return
|
|
3748
|
+
function xs(e6) {
|
|
3749
|
+
return ys(e6, vs);
|
|
3743
3750
|
}
|
|
3744
|
-
function
|
|
3751
|
+
function Ss(e6) {
|
|
3745
3752
|
let { hasOptionsParameter: t2 } = e6;
|
|
3746
3753
|
return function(...n2) {
|
|
3747
|
-
return t2 ?
|
|
3754
|
+
return t2 ? ws(n2, e6) : Cs(n2, e6);
|
|
3748
3755
|
};
|
|
3749
3756
|
}
|
|
3750
|
-
function
|
|
3757
|
+
function Cs(e6, t2) {
|
|
3751
3758
|
return e6.length === 0 ? t2.builderQueryFunction() : t2.typedQueryFunction(e6[0]);
|
|
3752
3759
|
}
|
|
3753
|
-
function
|
|
3760
|
+
function ws(e6, t2) {
|
|
3754
3761
|
switch (e6.length) {
|
|
3755
3762
|
case 0:
|
|
3756
3763
|
return t2.builderQueryFunction();
|
|
3757
3764
|
case 1:
|
|
3758
|
-
return
|
|
3765
|
+
return bs(e6[0]) || xs(e6[0]) ? t2.typedQueryFunction(e6[0]) : t2.builderQueryFunction(e6[0]);
|
|
3759
3766
|
default:
|
|
3760
3767
|
return t2.typedQueryFunction(e6[0], e6[1]);
|
|
3761
3768
|
}
|
|
3762
3769
|
}
|
|
3763
|
-
function
|
|
3770
|
+
function J(e6) {
|
|
3764
3771
|
if (!e6) return;
|
|
3765
3772
|
let t2 = ``;
|
|
3766
3773
|
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;
|
|
3767
3774
|
}
|
|
3768
|
-
function
|
|
3775
|
+
function Y(e6) {
|
|
3769
3776
|
if (e6) return [`http://`, `https://`].some((t2) => e6.base?.startsWith(t2)) ? `${e6.base}${e6.path}` : `http://${e6.base}${e6.path}`;
|
|
3770
3777
|
}
|
|
3771
|
-
var
|
|
3772
|
-
var
|
|
3773
|
-
function
|
|
3778
|
+
var Ts = [{ path: `categories.updatedDate` }, { path: `categories.coverImage.urlExpirationDate` }];
|
|
3779
|
+
var Es = [{ path: `categories.coverImage.focalPoint.x` }, { path: `categories.coverImage.focalPoint.y` }];
|
|
3780
|
+
function Ds(e6) {
|
|
3774
3781
|
return Lt(Object.assign(e6, { domainToMappings: { "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/category`, destPath: `/v3/bulk/category` }, { srcPath: `/_api/communities-blog-node-api/v3/bulk/categories`, destPath: `/v3/bulk/categories` }], "*.pub.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "bo._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wixbo.ai": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "wix-bo.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "social-blog._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], _: [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "www.wixapis.com": [{ srcPath: `/blog/v3/categories`, destPath: `/v3/categories` }, { srcPath: `/v3/categories`, destPath: `/v3/categories` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/categories`, destPath: `/v3/categories` }], "api._api_base_domain_": [{ srcPath: `/category-service-api-proxy`, destPath: `` }] } }));
|
|
3775
3782
|
}
|
|
3776
|
-
var
|
|
3777
|
-
function
|
|
3783
|
+
var Os = `@wix/auto_sdk_blog_categories`;
|
|
3784
|
+
function ks(e6) {
|
|
3778
3785
|
function t2({ host: t3 }) {
|
|
3779
|
-
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName:
|
|
3786
|
+
return { entityFqdn: `wix.blog.v3.category`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.CategoryService.ListCategories`, packageName: Os, migrationOptions: { optInTransformResponse: true }, url: Ds({ protoPath: `/v3/categories`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Ts }, { transformFn: N, paths: Es }]) };
|
|
3780
3787
|
}
|
|
3781
3788
|
return t2;
|
|
3782
3789
|
}
|
|
3783
|
-
var
|
|
3784
|
-
var
|
|
3785
|
-
async function
|
|
3786
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3790
|
+
var As = [{ path: `categories.url` }, { path: `categories.translations.url` }];
|
|
3791
|
+
var js = [{ path: `categories.coverImage` }];
|
|
3792
|
+
async function Ms(e6) {
|
|
3793
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = ks(D({ paging: e6?.paging, fieldsets: e6?.fieldsets, language: e6?.language }));
|
|
3787
3794
|
n2?.onSiteCall?.();
|
|
3788
3795
|
try {
|
|
3789
3796
|
let e7 = await t2.request(r2);
|
|
3790
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3797
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: As }, { transformFn: J, paths: js }]));
|
|
3791
3798
|
} catch (e7) {
|
|
3792
3799
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { paging: `$[0].paging`, fieldsets: `$[0].fieldsets`, language: `$[0].language` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3793
3800
|
throw n2?.onError?.(e7), t3;
|
|
3794
3801
|
}
|
|
3795
3802
|
}
|
|
3796
|
-
function js(e6) {
|
|
3797
|
-
return (t2) => As(t2, { httpClient: e6 });
|
|
3798
|
-
}
|
|
3799
|
-
var Ms = M(js);
|
|
3800
3803
|
function Ns(e6) {
|
|
3804
|
+
return (t2) => Ms(t2, { httpClient: e6 });
|
|
3805
|
+
}
|
|
3806
|
+
var Ps = M(Ns);
|
|
3807
|
+
function X(e6) {
|
|
3801
3808
|
if (!e6) return;
|
|
3802
3809
|
let t2 = ``;
|
|
3803
3810
|
e6?.filename && (t2 = `/${encodeURIComponent(e6.filename)}`);
|
|
@@ -3812,69 +3819,69 @@ function Ns(e6) {
|
|
|
3812
3819
|
}
|
|
3813
3820
|
return e6.id ? `wix:video://v1/${e6.id}${t2}${n2}` : e6.url;
|
|
3814
3821
|
}
|
|
3815
|
-
var
|
|
3816
|
-
var
|
|
3817
|
-
var Is = [{ path: `post.heroImage.focalPoint.x` }, { path: `post.heroImage.focalPoint.y` }, { path: `post.media.wixMedia.image.focalPoint.x` }, { path: `post.media.wixMedia.image.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `post.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `post.metrics.averageRating` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `post.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `post.richContent.nodes.galleryData.items.image.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.media.duration` }, { path: `post.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `post.richContent.nodes.galleryData.options.item.ratio` }, { path: `post.richContent.nodes.imageData.image.duration` }, { path: `post.richContent.nodes.imageData.crop.x` }, { path: `post.richContent.nodes.imageData.crop.y` }, { path: `post.richContent.nodes.imageData.crop.width` }, { path: `post.richContent.nodes.imageData.crop.height` }, { path: `post.richContent.nodes.mapData.mapSettings.lat` }, { path: `post.richContent.nodes.mapData.mapSettings.lng` }, { path: `post.richContent.nodes.pollData.poll.image.duration` }, { path: `post.richContent.nodes.pollData.poll.options.image.duration` }, { path: `post.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.nodes.appEmbedData.image.duration` }, { path: `post.richContent.nodes.videoData.video.duration` }, { path: `post.richContent.nodes.videoData.thumbnail.duration` }, { path: `post.richContent.nodes.audioData.audio.duration` }, { path: `post.richContent.nodes.audioData.coverImage.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `post.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `post.richContent.nodes.shapeData.shape.duration` }, { path: `post.richContent.nodes.cardData.background.gradient.centerX` }, { path: `post.richContent.nodes.cardData.background.gradient.centerY` }, { path: `post.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `post.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `post.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `post.richContent.nodes.tocData.fontSize` }, { path: `post.richContent.nodes.tocData.itemSpacing` }, { path: `post.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `post.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3818
|
-
var
|
|
3819
|
-
var
|
|
3820
|
-
var zs = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
3821
|
-
var
|
|
3822
|
-
function
|
|
3822
|
+
var Fs = [{ 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` }];
|
|
3823
|
+
var Is = [{ path: `post.richContentCompressed` }];
|
|
3824
|
+
var Ls = [{ 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` }];
|
|
3825
|
+
var Rs = [{ 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` }];
|
|
3826
|
+
var zs = [{ path: `posts.richContentCompressed` }];
|
|
3827
|
+
var Bs = [{ 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` }];
|
|
3828
|
+
var Vs = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
3829
|
+
function Hs(e6) {
|
|
3823
3830
|
return Lt(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
|
|
3824
3831
|
}
|
|
3825
|
-
var
|
|
3826
|
-
function
|
|
3832
|
+
var Us = `@wix/auto_sdk_blog_posts`;
|
|
3833
|
+
function Ws(e6) {
|
|
3827
3834
|
function t2({ host: t3 }) {
|
|
3828
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName:
|
|
3835
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.GetPostBySlug`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts/slugs/{slug}`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Fs }, { transformFn: dn, paths: Is }, { transformFn: N, paths: Ls }]) };
|
|
3829
3836
|
}
|
|
3830
3837
|
return t2;
|
|
3831
3838
|
}
|
|
3832
|
-
function
|
|
3839
|
+
function Gs(e6) {
|
|
3833
3840
|
function t2({ host: t3 }) {
|
|
3834
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName:
|
|
3841
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `GET`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.ListPosts`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts`, data: e6, host: t3 }), params: It(e6), transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Rs }, { transformFn: dn, paths: zs }, { transformFn: N, paths: Bs }]) };
|
|
3835
3842
|
}
|
|
3836
3843
|
return t2;
|
|
3837
3844
|
}
|
|
3838
|
-
function
|
|
3845
|
+
function Ks(e6) {
|
|
3839
3846
|
function t2({ host: t3 }) {
|
|
3840
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3841
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
3847
|
+
let n2 = A(e6, [{ transformFn: un, paths: Vs }]);
|
|
3848
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Us, migrationOptions: { optInTransformResponse: true }, url: Hs({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Rs }, { transformFn: dn, paths: zs }, { transformFn: N, paths: Bs }]) };
|
|
3842
3849
|
}
|
|
3843
3850
|
return t2;
|
|
3844
3851
|
}
|
|
3845
|
-
var
|
|
3846
|
-
var
|
|
3847
|
-
var
|
|
3848
|
-
var
|
|
3849
|
-
var
|
|
3850
|
-
var
|
|
3852
|
+
var qs = [{ path: `post.url` }, { path: `post.translations.url` }];
|
|
3853
|
+
var Js = [{ path: `post.heroImage` }, { path: `post.media.wixMedia.image` }];
|
|
3854
|
+
var Ys = [{ path: `post.media.wixMedia.videoV2` }];
|
|
3855
|
+
var Xs = [{ path: `posts.url` }, { path: `posts.translations.url` }];
|
|
3856
|
+
var Zs = [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }];
|
|
3857
|
+
var Qs = [{ path: `posts.media.wixMedia.videoV2` }];
|
|
3851
3858
|
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 || {});
|
|
3852
|
-
async function
|
|
3853
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3859
|
+
async function $s(e6, t2) {
|
|
3860
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ws(D({ slug: e6, fieldsets: t2?.fieldsets, language: t2?.language }, []));
|
|
3854
3861
|
r2?.onSiteCall?.();
|
|
3855
3862
|
try {
|
|
3856
3863
|
let e7 = await n2.request(i2);
|
|
3857
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3864
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: qs }, { transformFn: J, paths: Js }, { transformFn: X, paths: Ys }]), [`post.richContent`, `post.rich_content`]);
|
|
3858
3865
|
} catch (e7) {
|
|
3859
3866
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { slug: `$[0]`, fieldsets: `$[1].fieldsets`, language: `$[1].language` }, singleArgumentUnchanged: false }, [`slug`, `options`]);
|
|
3860
3867
|
throw r2?.onError?.(e7), t3;
|
|
3861
3868
|
}
|
|
3862
3869
|
}
|
|
3863
|
-
async function
|
|
3864
|
-
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 =
|
|
3870
|
+
async function ec(e6) {
|
|
3871
|
+
let { httpClient: t2, sideEffects: n2 } = arguments[1], r2 = Gs(D({ featured: e6?.featured, hashtags: e6?.hashtags, categoryIds: e6?.categoryIds, tagIds: e6?.tagIds, sort: e6?.sort, paging: e6?.paging, language: e6?.language, memberId: e6?.memberId, fieldsets: e6?.fieldsets }, []));
|
|
3865
3872
|
n2?.onSiteCall?.();
|
|
3866
3873
|
try {
|
|
3867
3874
|
let e7 = await t2.request(r2);
|
|
3868
|
-
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3875
|
+
return n2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3869
3876
|
} catch (e7) {
|
|
3870
3877
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { featured: `$[0].featured`, hashtags: `$[0].hashtags`, categoryIds: `$[0].categoryIds`, tagIds: `$[0].tagIds`, sort: `$[0].sort`, paging: `$[0].paging`, language: `$[0].language`, memberId: `$[0].memberId`, fieldsets: `$[0].fieldsets` }, singleArgumentUnchanged: false }, [`options`]);
|
|
3871
3878
|
throw n2?.onError?.(e7), t3;
|
|
3872
3879
|
}
|
|
3873
3880
|
}
|
|
3874
|
-
function
|
|
3881
|
+
function tc(e6) {
|
|
3875
3882
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3876
|
-
return
|
|
3877
|
-
let i2 =
|
|
3883
|
+
return fs({ func: async (r2) => {
|
|
3884
|
+
let i2 = Ks({ ...r2, ...e6 ?? {} });
|
|
3878
3885
|
n2?.onSiteCall?.();
|
|
3879
3886
|
try {
|
|
3880
3887
|
let e7 = await t2.request(i2);
|
|
@@ -3886,76 +3893,76 @@ function ec(e6) {
|
|
|
3886
3893
|
let n3 = [t3, e6];
|
|
3887
3894
|
return D({ ...n3?.[1], query: n3?.[0] }, []);
|
|
3888
3895
|
}, responseTransformer: ({ data: e7 }) => {
|
|
3889
|
-
let t3 = O(A(e7, [{ transformFn:
|
|
3896
|
+
let t3 = O(A(e7, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3890
3897
|
return { items: t3?.posts, pagingMetadata: t3?.pagingMetadata };
|
|
3891
3898
|
}, errorTransformer: (e7) => {
|
|
3892
3899
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3893
3900
|
}, pagingMethod: `CURSOR`, transformationPaths: {} });
|
|
3894
3901
|
}
|
|
3895
|
-
async function
|
|
3896
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3902
|
+
async function nc(e6, t2) {
|
|
3903
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = Ks(D({ query: e6, ...t2 }, []));
|
|
3897
3904
|
r2?.onSiteCall?.();
|
|
3898
3905
|
try {
|
|
3899
3906
|
let e7 = await n2.request(i2);
|
|
3900
|
-
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn:
|
|
3907
|
+
return r2?.onSuccess?.(e7), O(A(e7.data, [{ transformFn: Y, paths: Xs }, { transformFn: J, paths: Zs }, { transformFn: X, paths: Qs }]), [`posts.richContent`, `posts.rich_content`]);
|
|
3901
3908
|
} catch (e7) {
|
|
3902
3909
|
let t3 = j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false }, [`query`, `options`]);
|
|
3903
3910
|
throw r2?.onError?.(e7), t3;
|
|
3904
3911
|
}
|
|
3905
3912
|
}
|
|
3906
|
-
function nc(e6) {
|
|
3907
|
-
return (t2, n2) => Qs(t2, n2, { httpClient: e6 });
|
|
3908
|
-
}
|
|
3909
3913
|
function rc(e6) {
|
|
3910
|
-
return (t2) => $s(t2, { httpClient: e6 });
|
|
3914
|
+
return (t2, n2) => $s(t2, n2, { httpClient: e6 });
|
|
3911
3915
|
}
|
|
3912
3916
|
function ic(e6) {
|
|
3913
3917
|
return (t2) => ec(t2, { httpClient: e6 });
|
|
3914
3918
|
}
|
|
3915
3919
|
function ac(e6) {
|
|
3916
|
-
return (t2
|
|
3920
|
+
return (t2) => tc(t2, { httpClient: e6 });
|
|
3917
3921
|
}
|
|
3918
3922
|
function oc(e6) {
|
|
3919
|
-
|
|
3923
|
+
return (t2, n2) => nc(t2, n2, { httpClient: e6 });
|
|
3924
|
+
}
|
|
3925
|
+
function sc(e6) {
|
|
3926
|
+
let t2 = Ss({ builderQueryFunction: (t3) => ac(e6)(t3), typedQueryFunction: (t3, n3) => oc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3920
3927
|
function n2(e7, n3) {
|
|
3921
3928
|
return t2(...arguments);
|
|
3922
3929
|
}
|
|
3923
3930
|
return n2;
|
|
3924
3931
|
}
|
|
3925
|
-
var sc = M(nc);
|
|
3926
3932
|
var cc = M(rc);
|
|
3927
|
-
var lc = M(
|
|
3928
|
-
var uc = (
|
|
3929
|
-
var dc = `
|
|
3930
|
-
var fc =
|
|
3933
|
+
var lc = M(ic);
|
|
3934
|
+
var uc = M(sc);
|
|
3935
|
+
var dc = (e6) => O(A(e6, [{ transformFn: Y, paths: [{ path: `posts.url` }, { path: `posts.translations.url` }] }, { transformFn: J, paths: [{ path: `posts.heroImage` }, { path: `posts.media.wixMedia.image` }] }, { transformFn: X, paths: [{ path: `posts.media.wixMedia.videoV2` }] }]), [`posts.richContent`, `posts.rich_content`]).posts ?? [];
|
|
3936
|
+
var fc = `https://blog.wixsite.com/blog-demo-posts`;
|
|
3937
|
+
var pc = M((e6) => async (t2) => {
|
|
3931
3938
|
let n2 = await e6.fetchWithAuth(`${globalThis.location.origin}/_serverless/blog-demo-posts/v3/demo-posts?${It(t2)}`);
|
|
3932
3939
|
if (!n2.ok) throw Error(`ListDemoPosts answered ${n2.status}`);
|
|
3933
|
-
return
|
|
3940
|
+
return dc(await n2.json()).filter((e7) => !e7.url?.startsWith(fc));
|
|
3934
3941
|
});
|
|
3935
|
-
var
|
|
3942
|
+
var mc = async (e6) => {
|
|
3936
3943
|
try {
|
|
3937
|
-
return await
|
|
3944
|
+
return await pc(e6);
|
|
3938
3945
|
} catch (e7) {
|
|
3939
3946
|
return console.info(`[blog demo posts]`, `read failed`, e7), [];
|
|
3940
3947
|
}
|
|
3941
3948
|
};
|
|
3942
|
-
var
|
|
3943
|
-
var
|
|
3944
|
-
function
|
|
3949
|
+
var hc = [{ path: `members.createdDate` }, { path: `members.updatedDate` }, { path: `members.lastLoginDate` }];
|
|
3950
|
+
var gc = [{ path: `query.sorting.origin.latitude` }, { path: `query.sorting.origin.longitude` }];
|
|
3951
|
+
function _c(e6) {
|
|
3945
3952
|
return Lt(Object.assign(e6, { domainToMappings: { "www.wixapis.com": [{ srcPath: `/members/v1/members`, destPath: `/v1/members` }], "api._api_base_domain_": [{ srcPath: `/members-ng-api`, destPath: `` }], "www._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "manage._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "blocks._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "create.editorx": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "editor.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "*.dev.wix-code.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "bo._base_domain_": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wixbo.ai": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "wix-bo.com": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], _: [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }], "members.wixapps.net": [{ srcPath: `/_api/members/v1/members`, destPath: `/v1/members` }] } }));
|
|
3946
3953
|
}
|
|
3947
|
-
var
|
|
3948
|
-
function
|
|
3954
|
+
var vc = `@wix/auto_sdk_members_members`;
|
|
3955
|
+
function yc(e6) {
|
|
3949
3956
|
function t2({ host: t3 }) {
|
|
3950
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
3951
|
-
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName:
|
|
3957
|
+
let n2 = A(e6, [{ transformFn: un, paths: gc }]);
|
|
3958
|
+
return { entityFqdn: `wix.members.v1.member`, method: `POST`, methodFqn: `com.wixpress.members.api.Members.QueryMembers`, packageName: vc, migrationOptions: { optInTransformResponse: true }, url: _c({ protoPath: `/v1/members/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: hc }]) };
|
|
3952
3959
|
}
|
|
3953
3960
|
return t2;
|
|
3954
3961
|
}
|
|
3955
|
-
function
|
|
3962
|
+
function bc(e6) {
|
|
3956
3963
|
let { httpClient: t2, sideEffects: n2 } = arguments[1];
|
|
3957
|
-
return
|
|
3958
|
-
let i2 =
|
|
3964
|
+
return fs({ func: async (r2) => {
|
|
3965
|
+
let i2 = yc({ ...r2, ...e6 ?? {} });
|
|
3959
3966
|
n2?.onSiteCall?.();
|
|
3960
3967
|
try {
|
|
3961
3968
|
let e7 = await t2.request(i2);
|
|
@@ -3973,8 +3980,8 @@ function yc(e6) {
|
|
|
3973
3980
|
throw j(e7, { spreadPathsToArguments: {}, explicitPathsToArguments: { query: `$[0]` }, singleArgumentUnchanged: false });
|
|
3974
3981
|
}, pagingMethod: `OFFSET`, transformationPaths: {} });
|
|
3975
3982
|
}
|
|
3976
|
-
async function
|
|
3977
|
-
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 =
|
|
3983
|
+
async function xc(e6, t2) {
|
|
3984
|
+
let { httpClient: n2, sideEffects: r2 } = arguments[2], i2 = yc(D({ query: e6, ...t2 }));
|
|
3978
3985
|
r2?.onSiteCall?.();
|
|
3979
3986
|
try {
|
|
3980
3987
|
let e7 = await n2.request(i2);
|
|
@@ -3984,25 +3991,25 @@ async function bc(e6, t2) {
|
|
|
3984
3991
|
throw r2?.onError?.(e7), t3;
|
|
3985
3992
|
}
|
|
3986
3993
|
}
|
|
3987
|
-
function xc(e6) {
|
|
3988
|
-
return (t2) => yc(t2, { httpClient: e6 });
|
|
3989
|
-
}
|
|
3990
3994
|
function Sc(e6) {
|
|
3991
|
-
return (t2
|
|
3995
|
+
return (t2) => bc(t2, { httpClient: e6 });
|
|
3992
3996
|
}
|
|
3993
3997
|
function Cc(e6) {
|
|
3994
|
-
|
|
3998
|
+
return (t2, n2) => xc(t2, n2, { httpClient: e6 });
|
|
3999
|
+
}
|
|
4000
|
+
function wc(e6) {
|
|
4001
|
+
let t2 = Ss({ builderQueryFunction: (t3) => Sc(e6)(t3), typedQueryFunction: (t3, n3) => Cc(e6)(t3, n3), hasOptionsParameter: true });
|
|
3995
4002
|
function n2(e7, n3) {
|
|
3996
4003
|
return t2(...arguments);
|
|
3997
4004
|
}
|
|
3998
4005
|
return n2;
|
|
3999
4006
|
}
|
|
4000
|
-
var
|
|
4001
|
-
var
|
|
4007
|
+
var Tc = M(wc);
|
|
4008
|
+
var Ec = async (e6) => {
|
|
4002
4009
|
let t2 = [...new Set(e6.filter((e7) => !!e7))];
|
|
4003
4010
|
if (t2.length === 0) return {};
|
|
4004
4011
|
try {
|
|
4005
|
-
let { items: e7 } = await
|
|
4012
|
+
let { items: e7 } = await Tc({ fieldsets: [`PUBLIC`] }).in(`_id`, t2).limit(t2.length).find();
|
|
4006
4013
|
return Object.fromEntries(e7.flatMap((e8) => {
|
|
4007
4014
|
let { _id: t3 } = e8;
|
|
4008
4015
|
return t3 ? [[t3, e8]] : [];
|
|
@@ -4011,32 +4018,32 @@ var Tc = async (e6) => {
|
|
|
4011
4018
|
return {};
|
|
4012
4019
|
}
|
|
4013
4020
|
};
|
|
4014
|
-
var
|
|
4015
|
-
var
|
|
4016
|
-
var Oc = [{ path: `posts.heroImage.focalPoint.x` }, { path: `posts.heroImage.focalPoint.y` }, { path: `posts.media.wixMedia.image.focalPoint.x` }, { path: `posts.media.wixMedia.image.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.resolutions.poster.focalPoint.y` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.x` }, { path: `posts.media.wixMedia.videoV2.posters.focalPoint.y` }, { path: `posts.metrics.averageRating` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.background.gradient.stops.position` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerX` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.centerY` }, { path: `posts.richContent.nodes.buttonData.styles.backgroundHover.gradient.stops.position` }, { path: `posts.richContent.nodes.galleryData.items.image.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.media.duration` }, { path: `posts.richContent.nodes.galleryData.items.video.thumbnail.duration` }, { path: `posts.richContent.nodes.galleryData.options.item.ratio` }, { path: `posts.richContent.nodes.imageData.image.duration` }, { path: `posts.richContent.nodes.imageData.crop.x` }, { path: `posts.richContent.nodes.imageData.crop.y` }, { path: `posts.richContent.nodes.imageData.crop.width` }, { path: `posts.richContent.nodes.imageData.crop.height` }, { path: `posts.richContent.nodes.mapData.mapSettings.lat` }, { path: `posts.richContent.nodes.mapData.mapSettings.lng` }, { path: `posts.richContent.nodes.pollData.poll.image.duration` }, { path: `posts.richContent.nodes.pollData.poll.options.image.duration` }, { path: `posts.richContent.nodes.pollData.design.poll.background.image.duration` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.nodes.textData.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.nodes.appEmbedData.image.duration` }, { path: `posts.richContent.nodes.videoData.video.duration` }, { path: `posts.richContent.nodes.videoData.thumbnail.duration` }, { path: `posts.richContent.nodes.audioData.audio.duration` }, { path: `posts.richContent.nodes.audioData.coverImage.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdropImage.media.duration` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdropImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.background.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerX` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.centerY` }, { path: `posts.richContent.nodes.layoutData.backdrop.gradient.stops.position` }, { path: `posts.richContent.nodes.shapeData.shape.duration` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.background.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.background.gradient.stops.position` }, { path: `posts.richContent.nodes.cardData.backgroundImage.media.duration` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerX` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.centerY` }, { path: `posts.richContent.nodes.cardData.backgroundImage.overlay.gradient.stops.position` }, { path: `posts.richContent.nodes.tocData.fontSize` }, { path: `posts.richContent.nodes.tocData.itemSpacing` }, { path: `posts.richContent.nodes.smartBlockCellData.shape.duration` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerOne.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerTwo.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerThree.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFour.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerFive.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.headerSix.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.paragraph.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.blockquote.decorations.colorData.backgroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.foregroundStyle.gradient.stops.position` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerX` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.centerY` }, { path: `posts.richContent.documentStyle.codeBlock.decorations.colorData.backgroundStyle.gradient.stops.position` }];
|
|
4017
|
-
var
|
|
4018
|
-
function
|
|
4021
|
+
var Dc = [{ 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` }];
|
|
4022
|
+
var Oc = [{ path: `posts.richContentCompressed` }];
|
|
4023
|
+
var kc = [{ 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` }];
|
|
4024
|
+
var Ac = [{ path: `sort.origin.latitude` }, { path: `sort.origin.longitude` }, { path: `query.sort.origin.latitude` }, { path: `query.sort.origin.longitude` }];
|
|
4025
|
+
function jc(e6) {
|
|
4019
4026
|
return Lt(Object.assign(e6, { domainToMappings: { _: [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "apps._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "www.wixapis.com": [{ srcPath: `/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/blog/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/v3/posts`, destPath: `/v3/posts` }], "manage._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }, { srcPath: `/_api/post-service-api-proxy/v3/bulk/posts`, destPath: `/v3/bulk/posts` }], "*.dev.wix-code.com": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "blocks._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "create.editorx": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "editor.wixapps.net": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }], "dev._base_domain_": [{ srcPath: `/_api/communities-blog-node-api/v3/posts`, destPath: `/v3/posts` }] } }));
|
|
4020
4027
|
}
|
|
4021
|
-
var
|
|
4022
|
-
function
|
|
4028
|
+
var Mc = `@wix/auto_sdk_blog_posts`;
|
|
4029
|
+
function Nc(e6) {
|
|
4023
4030
|
function t2({ host: t3 }) {
|
|
4024
|
-
let n2 = A(e6, [{ transformFn: un, paths:
|
|
4025
|
-
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName:
|
|
4031
|
+
let n2 = A(e6, [{ transformFn: un, paths: Ac }]);
|
|
4032
|
+
return { entityFqdn: `wix.blog.v3.post`, method: `POST`, methodFqn: `com.wixpress.npm.communities.platformized.blog.v3.PostService.QueryPosts`, packageName: Mc, migrationOptions: { optInTransformResponse: true }, url: jc({ protoPath: `/v3/posts/query`, data: n2, host: t3 }), data: n2, transformResponse: (e7) => A(e7, [{ transformFn: k, paths: Dc }, { transformFn: dn, paths: Oc }, { transformFn: N, paths: kc }]) };
|
|
4026
4033
|
}
|
|
4027
4034
|
return t2;
|
|
4028
4035
|
}
|
|
4029
|
-
function
|
|
4030
|
-
let e6 =
|
|
4036
|
+
function Pc() {
|
|
4037
|
+
let e6 = Nc({});
|
|
4031
4038
|
return { getUrl: (t2) => {
|
|
4032
4039
|
let { url: n2 } = e6(t2);
|
|
4033
4040
|
return n2;
|
|
4034
4041
|
}, httpMethod: `POST`, path: `/v3/posts/query`, pathParams: {}, __requestType: null, __originalRequestType: null, __responseType: null, __originalResponseType: null };
|
|
4035
4042
|
}
|
|
4036
|
-
var
|
|
4037
|
-
var
|
|
4038
|
-
var
|
|
4039
|
-
let { data: n2 } = await e6.request(
|
|
4043
|
+
var Fc = Pc();
|
|
4044
|
+
var Ic = (e6) => (t2) => ({ method: `POST`, url: Fc.getUrl(t2), data: { query: { filter: { id: { $in: e6 } }, paging: { limit: e6.length } } } });
|
|
4045
|
+
var Lc = M((e6) => async (t2) => {
|
|
4046
|
+
let { data: n2 } = await e6.request(Ic(t2)), r2 = {};
|
|
4040
4047
|
for (let e7 of n2.posts ?? []) {
|
|
4041
4048
|
let { id: t3 } = e7, n3 = e7.media?.wixMedia?.videoV2?.resolutions;
|
|
4042
4049
|
if (!t3 || !n3?.length) continue;
|
|
@@ -4045,128 +4052,128 @@ var Ic = M((e6) => async (t2) => {
|
|
|
4045
4052
|
}
|
|
4046
4053
|
return r2;
|
|
4047
4054
|
});
|
|
4048
|
-
var
|
|
4055
|
+
var Rc = async (e6) => {
|
|
4049
4056
|
if (e6.length === 0) return {};
|
|
4050
4057
|
try {
|
|
4051
|
-
return await
|
|
4058
|
+
return await Lc(e6);
|
|
4052
4059
|
} catch {
|
|
4053
4060
|
return {};
|
|
4054
4061
|
}
|
|
4055
4062
|
};
|
|
4056
|
-
var
|
|
4063
|
+
var zc = class extends Error {
|
|
4057
4064
|
constructor(e6, t2) {
|
|
4058
4065
|
super(`SSR fetch "${e6}" exceeded its ${t2}ms deadline`), this.name = `SsrDeadlineError`;
|
|
4059
4066
|
}
|
|
4060
4067
|
};
|
|
4061
|
-
var
|
|
4068
|
+
var Bc = (e6, t2, n2) => {
|
|
4062
4069
|
let r2, i2 = new Promise((e7, i3) => {
|
|
4063
|
-
r2 = setTimeout(() => i3(new
|
|
4070
|
+
r2 = setTimeout(() => i3(new zc(n2, t2)), t2);
|
|
4064
4071
|
});
|
|
4065
4072
|
return Promise.race([e6, i2]).finally(() => clearTimeout(r2));
|
|
4066
4073
|
};
|
|
4067
4074
|
Z.RICH_CONTENT, Z.SEO, Z.URL, Z.CONTENT_TEXT, Z.RICH_CONTENT, Z.URL;
|
|
4068
|
-
var
|
|
4069
|
-
var
|
|
4075
|
+
var Vc = [Z.URL, Z.METRICS];
|
|
4076
|
+
var Hc = (e6) => {
|
|
4070
4077
|
let { status: t2, details: n2 } = e6 ?? {};
|
|
4071
4078
|
return t2 === 404 || String(n2?.applicationError?.code ?? ``).includes(`NOT_FOUND`);
|
|
4072
4079
|
};
|
|
4073
|
-
var
|
|
4074
|
-
if (t2 && !
|
|
4080
|
+
var Uc = (e6, t2) => {
|
|
4081
|
+
if (t2 && !Hc(e6)) throw e6;
|
|
4075
4082
|
};
|
|
4076
|
-
var
|
|
4077
|
-
var
|
|
4078
|
-
var
|
|
4083
|
+
var Wc = (e6) => Ec(e6.map(({ memberId: e7 }) => e7));
|
|
4084
|
+
var Gc = (e6) => Rc(e6.filter((e7) => e7.media?.wixMedia?.videoV2).map(({ _id: e7 }) => e7).filter((e7) => !!e7));
|
|
4085
|
+
var Kc = async (e6, t2, n2 = false, r2) => {
|
|
4079
4086
|
try {
|
|
4080
|
-
let { post: n3 } = await
|
|
4087
|
+
let { post: n3 } = await cc(e6, { ...t2 && { fieldsets: t2 }, ...r2 && { language: r2 } });
|
|
4081
4088
|
if (n3) return n3;
|
|
4082
4089
|
} catch (e7) {
|
|
4083
|
-
|
|
4090
|
+
Uc(e7, n2);
|
|
4084
4091
|
}
|
|
4085
4092
|
try {
|
|
4086
|
-
let { items: n3 } = await
|
|
4093
|
+
let { items: n3 } = await uc(t2 ? { fieldsets: t2 } : void 0).eq(`slug`, e6).limit(1).find();
|
|
4087
4094
|
return n3[0];
|
|
4088
4095
|
} catch (e7) {
|
|
4089
|
-
|
|
4096
|
+
Uc(e7, n2);
|
|
4090
4097
|
return;
|
|
4091
4098
|
}
|
|
4092
4099
|
};
|
|
4093
|
-
var
|
|
4100
|
+
var qc = async (e6, t2 = false, n2) => {
|
|
4094
4101
|
try {
|
|
4095
4102
|
let t3 = async (t4) => {
|
|
4096
|
-
let { posts: r2 } = await
|
|
4103
|
+
let { posts: r2 } = await lc({ paging: { limit: 1 }, ...e6 && { fieldsets: e6 }, ...t4 && n2 && { language: n2 } });
|
|
4097
4104
|
return r2?.[0];
|
|
4098
4105
|
};
|
|
4099
4106
|
return await t3(true) ?? (n2 ? await t3(false) : void 0);
|
|
4100
4107
|
} catch (e7) {
|
|
4101
|
-
|
|
4108
|
+
Uc(e7, t2);
|
|
4102
4109
|
return;
|
|
4103
4110
|
}
|
|
4104
4111
|
};
|
|
4105
|
-
var
|
|
4106
|
-
var
|
|
4112
|
+
var Jc = 100;
|
|
4113
|
+
var Yc = async () => {
|
|
4107
4114
|
try {
|
|
4108
|
-
let { categories: e6 } = await
|
|
4115
|
+
let { categories: e6 } = await Ps({ paging: { limit: Jc } });
|
|
4109
4116
|
return e6 ?? [];
|
|
4110
4117
|
} catch {
|
|
4111
4118
|
return [];
|
|
4112
4119
|
}
|
|
4113
4120
|
};
|
|
4114
|
-
var
|
|
4121
|
+
var Xc = (e6, t2) => {
|
|
4115
4122
|
let { categoryIds: n2 } = e6 ?? {};
|
|
4116
4123
|
if (!n2?.length) return [];
|
|
4117
4124
|
let r2 = new Map(t2.map((e7) => [e7._id, e7]));
|
|
4118
4125
|
return n2.map((e7) => r2.get(e7)).filter((e7) => e7 !== void 0);
|
|
4119
4126
|
};
|
|
4120
|
-
var
|
|
4127
|
+
var Zc = (e6, t2) => {
|
|
4121
4128
|
let n2 = {};
|
|
4122
|
-
for (let r2 of e6) for (let { _id: e7, label: i2 } of
|
|
4129
|
+
for (let r2 of e6) for (let { _id: e7, label: i2 } of Xc(r2, t2)) e7 && (n2[e7] = i2 ?? ``);
|
|
4123
4130
|
return n2;
|
|
4124
4131
|
};
|
|
4125
|
-
var
|
|
4126
|
-
let n2 = e6 ? await
|
|
4132
|
+
var Qc = async (e6, t2) => {
|
|
4133
|
+
let n2 = e6 ? await Kc(e6, void 0, false, t2) : void 0, { _id: r2, categoryIds: i2, relatedPostIds: a2 } = n2 ?? await qc(void 0, false, t2) ?? {};
|
|
4127
4134
|
return { currentPostId: r2 ?? void 0, categoryIds: i2, relatedPostIds: n2 ? a2 : void 0 };
|
|
4128
4135
|
};
|
|
4129
|
-
var
|
|
4130
|
-
let { items: r2 } = await
|
|
4136
|
+
var $c = async ({ ids: e6, currentPostId: t2, limit: n2 }) => {
|
|
4137
|
+
let { items: r2 } = await uc({ fieldsets: Vc }).in(`_id`, e6).limit(n2).find(), i2 = new Map(r2.map((e7) => {
|
|
4131
4138
|
let { _id: t3 } = e7;
|
|
4132
4139
|
return [t3, e7];
|
|
4133
4140
|
}));
|
|
4134
4141
|
return e6.filter((e7) => e7 !== t2).map((e7) => i2.get(e7)).filter((e7) => e7 !== void 0).slice(0, n2);
|
|
4135
4142
|
};
|
|
4136
|
-
var
|
|
4137
|
-
let i2 =
|
|
4143
|
+
var el = async ({ currentPostId: e6, categoryIds: t2, language: n2, limit: r2 }) => {
|
|
4144
|
+
let i2 = uc({ fieldsets: Vc }).ne(`_id`, e6).descending(`firstPublishedDate`).limit(r2);
|
|
4138
4145
|
t2?.length && (i2 = i2.hasSome(`categoryIds`, t2)), n2 && (i2 = i2.eq(`language`, n2));
|
|
4139
4146
|
let { items: a2 } = await i2.find();
|
|
4140
4147
|
return a2;
|
|
4141
4148
|
};
|
|
4142
|
-
var
|
|
4143
|
-
let o2 =
|
|
4149
|
+
var tl = async ({ slug: e6, language: t2, limit: n2 = 3, propagateErrors: r2 = false, source: i2, sourcePromise: a2 }) => {
|
|
4150
|
+
let o2 = Yc();
|
|
4144
4151
|
try {
|
|
4145
|
-
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await
|
|
4152
|
+
let { currentPostId: r3, categoryIds: s2, relatedPostIds: c2 } = i2 ?? (a2 ? await a2 : await Qc(e6, t2));
|
|
4146
4153
|
if (!r3) return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4147
|
-
let l2 = c2?.length ? await
|
|
4148
|
-
return { posts: u2, authorsByMemberId: d2, categoryLabelsById:
|
|
4154
|
+
let l2 = c2?.length ? await $c({ ids: c2, currentPostId: r3, limit: n2 }) : [], u2 = l2.length > 0 ? l2 : await el({ currentPostId: r3, categoryIds: s2, language: t2, limit: n2 }), [d2, f2, p2] = await Promise.all([Wc(u2), o2, Gc(u2)]);
|
|
4155
|
+
return { posts: u2, authorsByMemberId: d2, categoryLabelsById: Zc(u2, f2), videoSourcesByPostId: p2 };
|
|
4149
4156
|
} catch (e7) {
|
|
4150
4157
|
if (r2) throw e7;
|
|
4151
4158
|
return { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {} };
|
|
4152
4159
|
}
|
|
4153
4160
|
};
|
|
4154
|
-
var
|
|
4155
|
-
var
|
|
4156
|
-
var
|
|
4157
|
-
var
|
|
4158
|
-
var
|
|
4159
|
-
var
|
|
4161
|
+
var nl = { newest: `FEED`, oldest: `PUBLISHED_DATE_ASC`, titleAsc: `TITLE_ASC`, titleDesc: `TITLE_DESC`, mostViewed: `VIEW_COUNT`, mostLiked: `LIKE_COUNT` };
|
|
4162
|
+
var rl = async (e6, { limit: t2, offset: n2 = 0, language: r2, sortOrder: i2 }) => e6.posts.length > 0 ? e6 : { ...e6, demoPosts: await mc({ paging: { limit: t2, offset: n2 }, fieldsets: Vc, ...r2 && { language: r2 }, ...i2 && { sort: nl[i2] } }) };
|
|
4163
|
+
var il = (0, import_react.createContext)({ isEditor: false, isPreview: false });
|
|
4164
|
+
var al = () => (0, import_react.useContext)(il);
|
|
4165
|
+
var ol = ({ isEditor: e6, isPreview: t2 }) => e6 && !t2;
|
|
4166
|
+
var sl = () => {
|
|
4160
4167
|
try {
|
|
4161
|
-
let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(
|
|
4168
|
+
let { SSR: e6, SEO: t2 } = (0, import_services_manager_react.useService)(Gn);
|
|
4162
4169
|
return e6 || t2;
|
|
4163
4170
|
} catch {
|
|
4164
4171
|
return false;
|
|
4165
4172
|
}
|
|
4166
4173
|
};
|
|
4167
|
-
var
|
|
4168
|
-
let e6 =
|
|
4169
|
-
return al(
|
|
4174
|
+
var cl = () => {
|
|
4175
|
+
let e6 = sl();
|
|
4176
|
+
return ol(al()) && !e6;
|
|
4170
4177
|
};
|
|
4171
4178
|
g((e6, t2) => {
|
|
4172
4179
|
(function() {
|
|
@@ -4195,34 +4202,34 @@ g((e6, t2) => {
|
|
|
4195
4202
|
}) : window.classNames = n2;
|
|
4196
4203
|
})();
|
|
4197
4204
|
})();
|
|
4198
|
-
var
|
|
4199
|
-
var
|
|
4205
|
+
var ll = { post: `post`, feed: `feed`, relatedPosts: `related-posts`, comments: `comments`, seo: `seo`, likes: `likes` };
|
|
4206
|
+
var ul = (e6) => {
|
|
4200
4207
|
try {
|
|
4201
4208
|
return e6.getMonitoringClient?.() ?? null;
|
|
4202
4209
|
} catch {
|
|
4203
4210
|
return null;
|
|
4204
4211
|
}
|
|
4205
4212
|
};
|
|
4206
|
-
var
|
|
4207
|
-
function
|
|
4208
|
-
let s2 =
|
|
4213
|
+
var dl = (e6, t2) => e6 && typeof e6[t2] == `function` ? e6 : null;
|
|
4214
|
+
function fl(e6, t2, { feature: n2, action: r2, level: i2 = `error`, tags: a2, contexts: o2 }) {
|
|
4215
|
+
let s2 = dl(e6, `captureException`);
|
|
4209
4216
|
if (!s2) return;
|
|
4210
4217
|
let c2 = t2 instanceof Error ? t2 : Error(String(t2));
|
|
4211
4218
|
s2.captureException(c2, { level: i2, tags: { feature: n2, action: r2, ...a2 }, ...o2 ? { contexts: o2 } : {} });
|
|
4212
4219
|
}
|
|
4213
|
-
function
|
|
4214
|
-
let a2 =
|
|
4220
|
+
function pl(e6, t2, { feature: n2, tags: r2 }, i2) {
|
|
4221
|
+
let a2 = dl(e6, `startSpanManual`);
|
|
4215
4222
|
if (!a2) return i2;
|
|
4216
4223
|
let o2 = a2.startSpanManual({ name: t2, tags: { feature: n2, ...r2 } });
|
|
4217
4224
|
return i2.then(() => o2.end(), (e7) => o2.fail(e7 instanceof Error ? e7 : Error(String(e7)))), i2;
|
|
4218
4225
|
}
|
|
4219
|
-
var
|
|
4226
|
+
var ml = class extends import_react.Component {
|
|
4220
4227
|
state = { error: void 0 };
|
|
4221
4228
|
static getDerivedStateFromError(e6) {
|
|
4222
4229
|
return { error: e6 ?? Error(`Unknown render error`) };
|
|
4223
4230
|
}
|
|
4224
4231
|
componentDidCatch(e6, t2) {
|
|
4225
|
-
|
|
4232
|
+
fl(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 } } });
|
|
4226
4233
|
}
|
|
4227
4234
|
render() {
|
|
4228
4235
|
if (this.state.error === void 0) return this.props.children;
|
|
@@ -4230,201 +4237,201 @@ var pl = class extends import_react.Component {
|
|
|
4230
4237
|
return this.props.fallback;
|
|
4231
4238
|
}
|
|
4232
4239
|
};
|
|
4233
|
-
var
|
|
4234
|
-
var
|
|
4235
|
-
function
|
|
4236
|
-
return (0, import_react.useContext)(
|
|
4240
|
+
var hl = (e6) => e6.then((e7) => ({ ...e7, fetchedAt: Date.now() }));
|
|
4241
|
+
var gl = (0, import_react.createContext)(void 0);
|
|
4242
|
+
function _l() {
|
|
4243
|
+
return (0, import_react.useContext)(gl);
|
|
4237
4244
|
}
|
|
4238
|
-
var
|
|
4239
|
-
function
|
|
4240
|
-
return (0, import_react.useContext)(
|
|
4245
|
+
var vl = (0, import_react.createContext)(void 0);
|
|
4246
|
+
function yl() {
|
|
4247
|
+
return (0, import_react.useContext)(vl);
|
|
4241
4248
|
}
|
|
4242
|
-
var
|
|
4243
|
-
var
|
|
4244
|
-
var
|
|
4245
|
-
var
|
|
4246
|
-
var
|
|
4247
|
-
var
|
|
4249
|
+
var bl = 6e4;
|
|
4250
|
+
var xl = bl * 60;
|
|
4251
|
+
var Sl = xl * 24;
|
|
4252
|
+
var Cl = Sl * 7;
|
|
4253
|
+
var wl = (e6) => e6 < bl ? [`second`, e6 / 1e3] : e6 < xl ? [`minute`, e6 / bl] : e6 < Sl ? [`hour`, e6 / xl] : [`day`, e6 / Sl];
|
|
4254
|
+
var Tl = (e6, t2, n2 = Date.now()) => {
|
|
4248
4255
|
let r2 = e6 instanceof Date ? e6 : new Date(e6), i2 = n2 - r2.getTime();
|
|
4249
|
-
if (i2 >= 0 && i2 <
|
|
4250
|
-
let [e7, n3] =
|
|
4256
|
+
if (i2 >= 0 && i2 < Cl) {
|
|
4257
|
+
let [e7, n3] = wl(i2);
|
|
4251
4258
|
return new Intl.RelativeTimeFormat(t2).format(-Math.round(n3), e7);
|
|
4252
4259
|
}
|
|
4253
4260
|
let a2 = r2.getFullYear() === new Date(n2).getFullYear();
|
|
4254
4261
|
return new Intl.DateTimeFormat(t2, { ...a2 ? {} : { year: `numeric` }, month: `short`, day: `numeric` }).format(r2);
|
|
4255
4262
|
};
|
|
4256
|
-
var
|
|
4257
|
-
var
|
|
4258
|
-
var
|
|
4263
|
+
var El = `https://static.wixstatic.com/media/`;
|
|
4264
|
+
var Dl = 100;
|
|
4265
|
+
var Ol = (e6, t2 = ``) => {
|
|
4259
4266
|
let n2 = e6?.profile?.photo;
|
|
4260
4267
|
if (!n2?.url) return;
|
|
4261
|
-
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(
|
|
4262
|
-
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width ||
|
|
4263
|
-
};
|
|
4264
|
-
var
|
|
4265
|
-
var
|
|
4266
|
-
var
|
|
4267
|
-
var
|
|
4268
|
-
var
|
|
4268
|
+
let r2 = e6?.profile?.nickname, { _id: i2 } = n2, a2 = i2 || (n2.url.startsWith(El) ? n2.url.slice(35).split(/[?#]/)[0] : void 0);
|
|
4269
|
+
return { ...a2 && { uri: a2 }, url: n2.url, name: r2 ?? a2 ?? `author-photo`, width: n2.width || Dl, height: n2.height || Dl, alt: r2 ?? t2 };
|
|
4270
|
+
};
|
|
4271
|
+
var kl = `https://static.wixstatic.com/media/`;
|
|
4272
|
+
var Al = `wix:image://`;
|
|
4273
|
+
var jl = 1200;
|
|
4274
|
+
var Ml = 800;
|
|
4275
|
+
var Nl = (e6) => {
|
|
4269
4276
|
if (!e6) return;
|
|
4270
4277
|
let t2 = Number.parseInt(e6, 10);
|
|
4271
4278
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4272
4279
|
};
|
|
4273
|
-
var
|
|
4274
|
-
if (!e6.startsWith(
|
|
4280
|
+
var Pl = (e6) => {
|
|
4281
|
+
if (!e6.startsWith(Al)) {
|
|
4275
4282
|
let t3 = e6.split(/[?#]/)[0];
|
|
4276
4283
|
return t3 ? { uri: t3 } : void 0;
|
|
4277
4284
|
}
|
|
4278
4285
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2, i2] = t2.split(`/`).filter(Boolean);
|
|
4279
4286
|
if (!r2) return;
|
|
4280
4287
|
let a2 = new URLSearchParams(n2 ?? ``);
|
|
4281
|
-
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width:
|
|
4288
|
+
return { uri: decodeURIComponent(r2), name: i2 ? decodeURIComponent(i2) : void 0, width: Nl(a2.get(`originWidth`)), height: Nl(a2.get(`originHeight`)) };
|
|
4282
4289
|
};
|
|
4283
|
-
var
|
|
4290
|
+
var Fl = (e6, t2) => {
|
|
4284
4291
|
if (!e6) return;
|
|
4285
|
-
let n2 =
|
|
4292
|
+
let n2 = Pl(e6);
|
|
4286
4293
|
if (!n2) return;
|
|
4287
4294
|
let r2 = n2.name ?? n2.uri;
|
|
4288
|
-
return { uri: n2.uri, url: `${
|
|
4295
|
+
return { uri: n2.uri, url: `${kl}${n2.uri}`, name: r2, width: n2.width ?? jl, height: n2.height ?? Ml, alt: t2 ?? r2 };
|
|
4289
4296
|
};
|
|
4290
|
-
var
|
|
4297
|
+
var Il = (e6) => {
|
|
4291
4298
|
let t2 = e6?.media?.wixMedia?.image;
|
|
4292
4299
|
if (!t2) return;
|
|
4293
|
-
let n2 =
|
|
4300
|
+
let n2 = Pl(t2);
|
|
4294
4301
|
if (!n2) return;
|
|
4295
4302
|
let r2 = n2.name ?? n2.uri;
|
|
4296
|
-
return { uri: n2.uri, url: `${
|
|
4303
|
+
return { uri: n2.uri, url: `${kl}${n2.uri}`, name: r2, width: n2.width ?? jl, height: n2.height ?? Ml, alt: e6?.media?.altText ?? e6?.title ?? r2 };
|
|
4297
4304
|
};
|
|
4298
|
-
var
|
|
4299
|
-
var
|
|
4300
|
-
var
|
|
4305
|
+
var Ll = `https://static.wixstatic.com/media/`;
|
|
4306
|
+
var Rl = `wix:video://`;
|
|
4307
|
+
var zl = (e6) => {
|
|
4301
4308
|
if (!e6) return;
|
|
4302
4309
|
let t2 = Number.parseInt(e6, 10);
|
|
4303
4310
|
return Number.isFinite(t2) && t2 > 0 ? t2 : void 0;
|
|
4304
4311
|
};
|
|
4305
|
-
var
|
|
4306
|
-
if (!e6.startsWith(
|
|
4312
|
+
var Bl = (e6) => {
|
|
4313
|
+
if (!e6.startsWith(Rl)) return;
|
|
4307
4314
|
let [t2, n2] = e6.slice(12).split(`#`), [, r2] = t2.split(`/`).filter(Boolean);
|
|
4308
4315
|
if (!r2) return;
|
|
4309
4316
|
let i2 = new URLSearchParams(n2 ?? ``), a2 = i2.get(`posterUri`);
|
|
4310
|
-
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${
|
|
4317
|
+
return { id: decodeURIComponent(r2), posterUrl: a2 ? `${Ll}${a2}` : void 0, posterWidth: zl(i2.get(`posterWidth`)), posterHeight: zl(i2.get(`posterHeight`)) };
|
|
4311
4318
|
};
|
|
4312
|
-
var
|
|
4313
|
-
var
|
|
4314
|
-
var
|
|
4319
|
+
var Vl = [/https?:\/\/(?:www\.|m\.)?youtube\.com\/watch\?(?:[^#]*&)?v=([\w-]+)/i, /https?:\/\/(?:www\.)?youtube\.com\/embed\/([\w-]+)/i, /https?:\/\/youtu\.be\/([\w-]+)/i];
|
|
4320
|
+
var Hl = [/https?:\/\/player\.vimeo\.com\/video\/(\d+)/i, /https?:\/\/vimeo\.com\/(\d+)/i];
|
|
4321
|
+
var Ul = (e6, t2) => {
|
|
4315
4322
|
for (let n2 of e6) {
|
|
4316
4323
|
let e7 = n2.exec(t2);
|
|
4317
4324
|
if (e7) return e7[1];
|
|
4318
4325
|
}
|
|
4319
4326
|
};
|
|
4320
|
-
var
|
|
4321
|
-
let t2 =
|
|
4327
|
+
var Wl = (e6) => {
|
|
4328
|
+
let t2 = Ul(Vl, e6);
|
|
4322
4329
|
if (t2) return { provider: `youtube`, embedUrl: `https://www.youtube.com/embed/${t2}?autoplay=1` };
|
|
4323
|
-
let n2 = Hl
|
|
4330
|
+
let n2 = Ul(Hl, e6);
|
|
4324
4331
|
return n2 ? { provider: `vimeo`, embedUrl: `https://player.vimeo.com/video/${n2}?autoplay=1` } : { provider: `unknown` };
|
|
4325
4332
|
};
|
|
4326
|
-
var
|
|
4333
|
+
var Gl = (e6, t2 = []) => {
|
|
4327
4334
|
let n2 = e6?.media;
|
|
4328
4335
|
if (!n2 || n2.displayed === false) return;
|
|
4329
|
-
let r2 =
|
|
4336
|
+
let r2 = Il(e6);
|
|
4330
4337
|
if (r2) return { kind: `image`, image: r2 };
|
|
4331
|
-
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ?
|
|
4338
|
+
let i2 = n2.altText ?? e6?.title ?? ``, a2 = n2.wixMedia?.videoV2 ? Bl(n2.wixMedia.videoV2) : void 0;
|
|
4332
4339
|
if (a2) return { kind: `wixVideo`, ...a2, sources: t2, altText: i2 };
|
|
4333
4340
|
let o2 = n2.embedMedia?.video?.url;
|
|
4334
4341
|
if (o2) {
|
|
4335
4342
|
let { thumbnail: e7 } = n2.embedMedia ?? {};
|
|
4336
|
-
return { kind: `embed`, videoUrl: o2, ...
|
|
4343
|
+
return { kind: `embed`, videoUrl: o2, ...Wl(o2), thumbnailUrl: e7?.url, thumbnailWidth: e7?.width, thumbnailHeight: e7?.height, altText: i2 };
|
|
4337
4344
|
}
|
|
4338
4345
|
};
|
|
4339
|
-
var
|
|
4340
|
-
let t2 =
|
|
4346
|
+
var Kl = (e6) => {
|
|
4347
|
+
let t2 = Il(e6), n2 = e6?.media?.wixMedia?.videoV2;
|
|
4341
4348
|
if (t2 || !n2) return t2;
|
|
4342
|
-
let r2 =
|
|
4349
|
+
let r2 = Bl(n2), i2 = Fl(r2?.posterUrl?.slice(35), e6?.media?.altText ?? e6?.title);
|
|
4343
4350
|
return i2 && { ...i2, width: r2?.posterWidth ?? i2.width, height: r2?.posterHeight ?? i2.height };
|
|
4344
4351
|
};
|
|
4345
|
-
var
|
|
4346
|
-
var
|
|
4347
|
-
var
|
|
4348
|
-
var
|
|
4352
|
+
var ql = `2026-05-12T12:00:00.000Z`;
|
|
4353
|
+
var Jl = (e6) => ({ href: e6 ?? `#`, target: `_self` });
|
|
4354
|
+
var Yl = (e6) => `https://static.wixstatic.com/media/${e6}/v1/fit/w_1200,h_1200,al_c,q_85/cover.jpg`;
|
|
4355
|
+
var Xl = (e6) => {
|
|
4349
4356
|
if (!e6) return;
|
|
4350
4357
|
let t2 = e6 instanceof Date ? e6 : new Date(e6);
|
|
4351
4358
|
return Number.isFinite(t2.getTime()) ? t2.toISOString() : void 0;
|
|
4352
4359
|
};
|
|
4353
|
-
var
|
|
4354
|
-
var
|
|
4355
|
-
var Q = (e6) => ({ text: e6, html: `<p>${
|
|
4360
|
+
var Zl = (e6) => typeof e6 == `number` && e6 > 0 ? e6 : void 0;
|
|
4361
|
+
var Ql = (e6) => e6.replace(/&/g, `&`).replace(/</g, `<`).replace(/>/g, `>`).replace(/"/g, `"`).replace(/'/g, `'`);
|
|
4362
|
+
var Q = (e6) => ({ text: e6, html: `<p>${Ql(e6)}</p>`, linkList: [] });
|
|
4356
4363
|
var $ = { minutesToRead: 5, views: 120, comments: 4 };
|
|
4357
|
-
var
|
|
4364
|
+
var $l = (e6) => {
|
|
4358
4365
|
let { metrics: t2 } = e6;
|
|
4359
4366
|
return { views: typeof t2?.views == `number` ? t2.views : void 0, comments: typeof t2?.comments == `number` ? t2.comments : void 0 };
|
|
4360
4367
|
};
|
|
4361
|
-
var
|
|
4362
|
-
var
|
|
4368
|
+
var eu = (e6, t2, n2, r2) => Q(e6 === void 0 ? n2 ? r2(t2) : `` : r2(e6));
|
|
4369
|
+
var tu = (e6, t2, n2, r2) => {
|
|
4363
4370
|
let i2 = e6.categoryIds?.map((e7) => t2[e7]).find(Boolean);
|
|
4364
4371
|
return Q(i2 ?? (n2 ? r2.canvas.category() : ``));
|
|
4365
4372
|
};
|
|
4366
|
-
var
|
|
4367
|
-
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 =
|
|
4368
|
-
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage:
|
|
4369
|
-
};
|
|
4370
|
-
var nu = 3;
|
|
4371
|
-
var ru = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4372
|
-
var iu = (e6, t2) => {
|
|
4373
|
-
let { uri: n2, width: r2, height: i2 } = ru[e6 % ru.length];
|
|
4374
|
-
return { uri: n2, url: Jl(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4373
|
+
var nu = (e6, t2, n2, r2, i2 = {}, a2 = {}, o2 = false, s2 = {}, c2 = Date.now()) => {
|
|
4374
|
+
let { _id: l2, memberId: u2 } = e6, d2 = u2 ? i2[u2] : void 0, f2 = $l(e6);
|
|
4375
|
+
return { _id: l2 ?? e6.slug ?? ``, title: e6.title ?? ``, itemTitle: Q(e6.title ?? ``), itemExcerpt: Q(e6.excerpt ?? ``), itemCoverImage: Kl(e6), itemCoverMedia: Gl(e6, s2[l2 ?? ``] ?? []), itemLink: or(e6, r2), itemPublishedDate: Q(Tl(e6.firstPublishedDate ?? new Date(c2), n2, c2)), publishedDateValue: Xl(e6.firstPublishedDate), clockValue: c2, minutesToReadValue: Zl(e6.minutesToRead), initialViewCount: f2.views ?? (o2 ? $.views : void 0), initialCommentCount: f2.comments ?? (o2 ? $.comments : void 0), authorName: Q(d2?.profile?.nickname ?? ``), authorImage: Ol(d2, t2.canvas.authorPhotoAlt()), timeToRead: Q(typeof e6.minutesToRead == `number` && e6.minutesToRead > 0 ? t2.timeToRead(e6.minutesToRead) : ``), viewCount: eu(f2.views, $.views, o2, t2.viewCount), commentCount: eu(f2.comments, $.comments, o2, t2.commentCount), itemCategoryLabel: tu(e6, a2, o2, t2), recentPostItem: { title: e6.title ?? ``, slug: e6.slug ?? `` }, commentingEnabled: e6.commentingEnabled };
|
|
4375
4376
|
};
|
|
4377
|
+
var ru = 3;
|
|
4378
|
+
var iu = [{ uri: `728f9d_a03266fe4a4d4651b9aa06077eef5d9c~mv2.png`, width: 2304, height: 1728 }, { uri: `728f9d_635778e429524b59856cb2a18ed0d4f8~mv2.jpg`, width: 2624, height: 1472 }, { uri: `728f9d_d6071d5e8a0544098238188bae67e5e4~mv2.png`, width: 2304, height: 1728 }];
|
|
4376
4379
|
var au = (e6, t2) => {
|
|
4377
|
-
let { uri: n2 } =
|
|
4378
|
-
return { uri: n2, url:
|
|
4380
|
+
let { uri: n2, width: r2, height: i2 } = iu[e6 % iu.length];
|
|
4381
|
+
return { uri: n2, url: Yl(n2), name: n2, width: r2, height: i2, alt: t2 };
|
|
4382
|
+
};
|
|
4383
|
+
var ou = (e6, t2) => {
|
|
4384
|
+
let { uri: n2 } = iu[(e6 + 1) % iu.length];
|
|
4385
|
+
return { uri: n2, url: Yl(n2), name: n2, width: 100, height: 100, alt: t2 };
|
|
4379
4386
|
};
|
|
4380
|
-
var
|
|
4381
|
-
let o2 = e6.canvas.postTitle(), s2 =
|
|
4382
|
-
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink:
|
|
4387
|
+
var su = (e6, t2, n2, r2 = Date.now()) => Array.from({ length: ru }, (i2, a2) => {
|
|
4388
|
+
let o2 = e6.canvas.postTitle(), s2 = au(a2, e6.canvas.coverAlt());
|
|
4389
|
+
return { _id: `placeholder-${a2}`, title: o2, itemTitle: Q(o2), itemExcerpt: Q(e6.canvas.excerpt()), itemCoverImage: s2, itemCoverMedia: { kind: `image`, image: s2 }, itemLink: Jl(n2), itemPublishedDate: Q(Tl(new Date(r2), t2, r2)), publishedDateValue: ql, clockValue: r2, minutesToReadValue: $.minutesToRead, initialViewCount: $.views, initialCommentCount: $.comments, authorName: Q(e6.canvas.authorName()), authorImage: ou(a2, e6.canvas.authorPhotoAlt()), timeToRead: Q(e6.timeToRead($.minutesToRead)), viewCount: Q(e6.viewCount($.views)), commentCount: Q(e6.commentCount($.comments)), itemCategoryLabel: Q(e6.canvas.category()), recentPostItem: { title: o2, slug: `` }, commentingEnabled: void 0 };
|
|
4383
4390
|
});
|
|
4384
|
-
var
|
|
4385
|
-
function
|
|
4386
|
-
let e6 = (0, import_react.useContext)(
|
|
4391
|
+
var cu = (0, import_react.createContext)(void 0);
|
|
4392
|
+
function lu() {
|
|
4393
|
+
let e6 = (0, import_react.useContext)(cu);
|
|
4387
4394
|
if (!e6) throw Error(`useRelatedPostsContext must be used within a RelatedPostsProvider`);
|
|
4388
4395
|
return e6;
|
|
4389
4396
|
}
|
|
4390
|
-
var
|
|
4391
|
-
var
|
|
4392
|
-
var
|
|
4393
|
-
var
|
|
4394
|
-
var
|
|
4397
|
+
var uu = 3;
|
|
4398
|
+
var du = (e6) => typeof e6 == `number` && Number.isFinite(e6) && e6 >= 1 ? Math.min(Math.floor(e6), 12) : uu;
|
|
4399
|
+
var fu = 2e3;
|
|
4400
|
+
var pu = /* @__PURE__ */ new WeakMap();
|
|
4401
|
+
var mu = (e6, t2, n2) => {
|
|
4395
4402
|
if (!e6) return n2();
|
|
4396
|
-
let r2 =
|
|
4397
|
-
r2 || (r2 = /* @__PURE__ */ new Map(),
|
|
4403
|
+
let r2 = pu.get(e6);
|
|
4404
|
+
r2 || (r2 = /* @__PURE__ */ new Map(), pu.set(e6, r2));
|
|
4398
4405
|
let i2 = r2.get(t2);
|
|
4399
4406
|
if (i2) return i2;
|
|
4400
4407
|
let a2 = n2();
|
|
4401
4408
|
return r2.set(t2, a2), a2;
|
|
4402
4409
|
};
|
|
4403
|
-
var
|
|
4404
|
-
var
|
|
4405
|
-
var
|
|
4406
|
-
var
|
|
4407
|
-
var
|
|
4410
|
+
var hu = { relatedPosts: [], emptyState: null, isLoadingRelatedPosts: true, hasError: false, hasRelatedPosts: false };
|
|
4411
|
+
var gu = { ...hu, isLoadingRelatedPosts: false, hasError: true };
|
|
4412
|
+
var _u = (e6) => ({ strip: e6, hasError: false });
|
|
4413
|
+
var vu = () => ({ strip: { posts: [], authorsByMemberId: {}, categoryLabelsById: {}, videoSourcesByPostId: {}, fetchedAt: Date.now() }, hasError: true });
|
|
4414
|
+
var yu = (e6) => {
|
|
4408
4415
|
throw e6;
|
|
4409
4416
|
};
|
|
4410
|
-
var
|
|
4411
|
-
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } =
|
|
4412
|
-
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) =>
|
|
4417
|
+
var bu = ({ children: e6, stripLoadPromise: t2, slug: n2, language: r2 }) => {
|
|
4418
|
+
let { strip: { posts: i2, authorsByMemberId: a2, categoryLabelsById: o2, videoSourcesByPostId: s2, fetchedAt: l2, demoPosts: u2 }, hasError: d2 } = Bn(t2), f2 = Wn(l2), m2 = cl(), h2 = sr(n2), { t: g2 } = wo(), _2 = _r(), v2 = (0, import_react.useMemo)(() => rs(g2, _2), [g2, _2]), y2 = (0, import_react.useMemo)(() => {
|
|
4419
|
+
let e7 = (i2.length === 0 && m2 ? u2 ?? [] : i2).map((e8) => nu(e8, v2, _2, h2, a2, o2, m2, s2, f2)), t3 = e7.length === 0 && m2 ? su(v2, _2, h2, f2) : e7;
|
|
4413
4420
|
return { relatedPosts: t3, emptyState: i2.length === 0 && !d2 ? v2.noRelatedPostsEmptyState() : null, isLoadingRelatedPosts: false, hasError: d2, hasRelatedPosts: t3.length > 0 };
|
|
4414
4421
|
}, [i2, u2, a2, o2, s2, v2, _2, r2, h2, m2, f2, d2]);
|
|
4415
|
-
return
|
|
4422
|
+
return fr(ur.relatedPostsProvider, d2 ? `error` : i2.length > 0 ? `data` : `empty`), (0, import_jsx_runtime.jsx)(cu.Provider, { value: y2, children: e6 });
|
|
4416
4423
|
};
|
|
4417
|
-
function
|
|
4418
|
-
let r2 =
|
|
4424
|
+
function xu({ children: e6, postsCount: n2 }) {
|
|
4425
|
+
let r2 = lr(), i2 = hr(), a2 = Kn(), o2 = du(n2), s2 = cl(), l2 = _l(), u2 = yl(), d2 = yr(), f2 = (0, import_react.useMemo)(() => ul(Rn), []), { i18n: h2, locale: g2 } = qo(ts), _2 = Jn(() => {
|
|
4419
4426
|
let e7 = `blog-builder:related:${JSON.stringify({ slug: r2 ?? ``, language: i2 ?? ``, limit: o2, ...u2 && { postId: u2 } })}`;
|
|
4420
|
-
return { slug: r2, language: i2, stripLoadPromise:
|
|
4421
|
-
let e8 =
|
|
4422
|
-
return
|
|
4423
|
-
} })),
|
|
4427
|
+
return { slug: r2, language: i2, stripLoadPromise: Hn(mu(l2, e7, () => Po({ key: e7, warmupData: d2, fetchData: () => {
|
|
4428
|
+
let e8 = tl({ slug: r2, language: i2, limit: o2, propagateErrors: true, sourcePromise: l2 }).then((e9) => s2 ? rl(e9, { limit: o2, language: i2 }) : e9);
|
|
4429
|
+
return hl(pl(f2, `related-posts-read`, { feature: ll.relatedPosts, tags: { limit: o2 } }, a2 ? Bc(e8, fu, `related-posts`) : e8));
|
|
4430
|
+
} })), _u, a2 ? yu : vu) };
|
|
4424
4431
|
}, [r2, i2, a2, s2, l2, d2, o2, f2, u2]);
|
|
4425
|
-
return (0, import_jsx_runtime.jsx)(
|
|
4432
|
+
return (0, import_jsx_runtime.jsx)(To, { i18n: h2, children: (0, import_jsx_runtime.jsxs)(import_react.Suspense, { fallback: (0, import_jsx_runtime.jsx)(cu.Provider, { value: hu, children: e6 }), children: [(0, import_jsx_runtime.jsx)(Ko, { i18n: h2, locale: g2 }), (0, import_jsx_runtime.jsx)(ml, { fallback: (0, import_jsx_runtime.jsx)(cu.Provider, { value: gu, children: e6 }), feature: ll.relatedPosts, monitoringClient: f2, rethrow: a2, children: (0, import_jsx_runtime.jsx)(bu, { stripLoadPromise: _2.stripLoadPromise, slug: _2.slug, language: _2.language, children: e6 }, `${_2.language ?? ``}|${_2.slug ?? ``}`) })] }) });
|
|
4426
4433
|
}
|
|
4427
|
-
var
|
|
4434
|
+
var Su = jn(`7d10ae29-fb0a-4361-8bc0-c3b8a3b96e34`);
|
|
4428
4435
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4429
4436
|
0 && (module.exports = {
|
|
4430
4437
|
RelatedPostsProvider,
|