@wix/cli 1.1.57 → 1.1.59
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/build/DevCommand-D6QHU2YA.js +7561 -0
- package/build/DevCommand-D6QHU2YA.js.map +1 -0
- package/build/{DevCommand-K3JZ4XZC.js → DevCommand-PLIPWJKO.js} +14 -15
- package/build/{DevCommand-K3JZ4XZC.js.map → DevCommand-PLIPWJKO.js.map} +1 -1
- package/build/{LoginCommand-BP3RQHUM.js → LoginCommand-NRZ4VWWM.js} +12 -12
- package/build/{LogoutCommand-VT4QE44U.js → LogoutCommand-INOYIE67.js} +8 -8
- package/build/{WhoamiCommand-KJFFYPZX.js → WhoamiCommand-4V4GTNFW.js} +4 -4
- package/build/{chunk-KTJ6X6GE.js → chunk-3RBFRZE2.js} +8 -8
- package/build/{chunk-KTJ6X6GE.js.map → chunk-3RBFRZE2.js.map} +1 -1
- package/build/{chunk-NX7IBYFX.js → chunk-4HVBZRJL.js} +2 -2
- package/build/{chunk-2AGM62L5.js → chunk-4OBSJ6OG.js} +5043 -659
- package/build/chunk-4OBSJ6OG.js.map +1 -0
- package/build/{chunk-LOJ4G3VD.js → chunk-5XUFGBCU.js} +2 -2
- package/build/{chunk-WYEQRRT2.js → chunk-5ZVEBKUO.js} +2829 -66
- package/build/chunk-5ZVEBKUO.js.map +1 -0
- package/build/{chunk-XTLJ4CAJ.js → chunk-AXVTET6V.js} +2 -2
- package/build/{chunk-53UCEZFU.js → chunk-BNWDAMAL.js} +175 -45
- package/build/chunk-BNWDAMAL.js.map +1 -0
- package/build/{chunk-MPSJ2YGQ.js → chunk-BV3B44QL.js} +3 -3
- package/build/{chunk-QCM5RGPT.js → chunk-CMXHWKEP.js} +3 -3
- package/build/{chunk-BBGPRSAS.js → chunk-CS26555F.js} +7 -7
- package/build/{chunk-U67ULUPY.js → chunk-F3E4MMLD.js} +6 -6
- package/build/{chunk-3R4OZ46Z.js → chunk-G6TDIUNY.js} +2 -2
- package/build/{chunk-U2IUPRKN.js → chunk-GLXEVSFE.js} +7 -7
- package/build/{chunk-IRLLAFTL.js → chunk-HYAIYTKF.js} +88 -44
- package/build/{chunk-IRLLAFTL.js.map → chunk-HYAIYTKF.js.map} +1 -1
- package/build/{chunk-24HYCAK2.js → chunk-JG7FKL4X.js} +3 -3
- package/build/{chunk-F63O2UMD.js → chunk-KCTZ5EX4.js} +401 -116
- package/build/chunk-KCTZ5EX4.js.map +1 -0
- package/build/{chunk-LC4NM6RL.js → chunk-N5IXBRXL.js} +2 -2
- package/build/{chunk-E745NXJR.js → chunk-OOGMXJJV.js} +6 -6
- package/build/{chunk-3KIPOGXI.js → chunk-PNUERA4W.js} +5 -5
- package/build/{chunk-MCPHB25P.js → chunk-QGSHUCNV.js} +8 -8
- package/build/{chunk-KOCJZPLK.js → chunk-SELJR2HV.js} +2 -2
- package/build/{chunk-XU2RG4HE.js → chunk-T4OH34QF.js} +8 -2
- package/build/{chunk-XU2RG4HE.js.map → chunk-T4OH34QF.js.map} +1 -1
- package/build/{chunk-H5EUIUDE.js → chunk-U32RURCT.js} +126 -70
- package/build/chunk-U32RURCT.js.map +1 -0
- package/build/{chunk-BHINMCY7.js → chunk-V4DAKO7L.js} +369 -494
- package/build/chunk-V4DAKO7L.js.map +1 -0
- package/build/{chunk-FYXV3TNQ.js → chunk-VEVISRHN.js} +5 -5
- package/build/{chunk-W32TRG4E.js → chunk-WN3D6AOY.js} +39 -25
- package/build/chunk-WN3D6AOY.js.map +1 -0
- package/build/{chunk-ZOWPPCOU.js → chunk-X7XOMWAQ.js} +5 -5
- package/build/{chunk-QZW5GTQF.js → chunk-YUFAOC35.js} +6 -6
- package/build/{chunk-VIUQV2TZ.js → chunk-Z7P6TDPB.js} +6 -6
- package/build/{dev-P57SGFAA.js → dev-TEWYYBKR.js} +23 -24
- package/build/{dev-P57SGFAA.js.map → dev-TEWYYBKR.js.map} +1 -1
- package/build/index.js +26 -26
- package/build/{install-FKVCCLFF.js → install-MTS6LPPU.js} +17 -17
- package/build/{preview-7P7VNEUO.js → preview-TDMPHSVV.js} +18 -18
- package/build/{publish-FA4OUDWG.js → publish-5VLMBE6J.js} +18 -18
- package/build/{render-command-NM3HNCRF.js → render-command-7OMEGPW4.js} +11 -11
- package/build/{render-command-VA3HCBMQ.js → render-command-FELGYBEY.js} +12 -12
- package/build/{render-command-REKF5DLG.js → render-command-UQPFUBIL.js} +12 -12
- package/build/{run-command-ZLQ3PKCS.js → run-command-3YTQS4ZX.js} +10 -10
- package/build/{src-FSILLQWK.js → src-4W2WPIAM.js} +8 -8
- package/build/{src-YDZK3SDZ.js → src-7NEL65ZK.js} +18 -18
- package/build/{src-Q3X5WF65.js → src-IBLQL7AB.js} +6 -6
- package/build/{src-KDZNNJHV.js → src-LA3GYOE6.js} +7 -7
- package/build/{src-5XWKD5UB.js → src-UWOBS6D7.js} +2 -2
- package/build/{src-SWWZQIWT.js → src-Y334LPF5.js} +7 -7
- package/build/sync-types-W3PVOJTK.js +30 -0
- package/build/{uninstall-HA7CE6JB.js → uninstall-M4DEVSQC.js} +16 -16
- package/package.json +5 -5
- package/build/DevCommand-NPU6T4GA.js +0 -1040
- package/build/DevCommand-NPU6T4GA.js.map +0 -1
- package/build/chunk-2AGM62L5.js.map +0 -1
- package/build/chunk-53UCEZFU.js.map +0 -1
- package/build/chunk-BHINMCY7.js.map +0 -1
- package/build/chunk-F63O2UMD.js.map +0 -1
- package/build/chunk-H5EUIUDE.js.map +0 -1
- package/build/chunk-OUBPZBBH.js +0 -558
- package/build/chunk-OUBPZBBH.js.map +0 -1
- package/build/chunk-W32TRG4E.js.map +0 -1
- package/build/chunk-WYEQRRT2.js.map +0 -1
- package/build/sync-types-GLTTFJMA.js +0 -31
- /package/build/{LoginCommand-BP3RQHUM.js.map → LoginCommand-NRZ4VWWM.js.map} +0 -0
- /package/build/{LogoutCommand-VT4QE44U.js.map → LogoutCommand-INOYIE67.js.map} +0 -0
- /package/build/{WhoamiCommand-KJFFYPZX.js.map → WhoamiCommand-4V4GTNFW.js.map} +0 -0
- /package/build/{chunk-NX7IBYFX.js.map → chunk-4HVBZRJL.js.map} +0 -0
- /package/build/{chunk-LOJ4G3VD.js.map → chunk-5XUFGBCU.js.map} +0 -0
- /package/build/{chunk-XTLJ4CAJ.js.map → chunk-AXVTET6V.js.map} +0 -0
- /package/build/{chunk-MPSJ2YGQ.js.map → chunk-BV3B44QL.js.map} +0 -0
- /package/build/{chunk-QCM5RGPT.js.map → chunk-CMXHWKEP.js.map} +0 -0
- /package/build/{chunk-BBGPRSAS.js.map → chunk-CS26555F.js.map} +0 -0
- /package/build/{chunk-U67ULUPY.js.map → chunk-F3E4MMLD.js.map} +0 -0
- /package/build/{chunk-3R4OZ46Z.js.map → chunk-G6TDIUNY.js.map} +0 -0
- /package/build/{chunk-U2IUPRKN.js.map → chunk-GLXEVSFE.js.map} +0 -0
- /package/build/{chunk-24HYCAK2.js.map → chunk-JG7FKL4X.js.map} +0 -0
- /package/build/{chunk-LC4NM6RL.js.map → chunk-N5IXBRXL.js.map} +0 -0
- /package/build/{chunk-E745NXJR.js.map → chunk-OOGMXJJV.js.map} +0 -0
- /package/build/{chunk-3KIPOGXI.js.map → chunk-PNUERA4W.js.map} +0 -0
- /package/build/{chunk-MCPHB25P.js.map → chunk-QGSHUCNV.js.map} +0 -0
- /package/build/{chunk-KOCJZPLK.js.map → chunk-SELJR2HV.js.map} +0 -0
- /package/build/{chunk-FYXV3TNQ.js.map → chunk-VEVISRHN.js.map} +0 -0
- /package/build/{chunk-ZOWPPCOU.js.map → chunk-X7XOMWAQ.js.map} +0 -0
- /package/build/{chunk-QZW5GTQF.js.map → chunk-YUFAOC35.js.map} +0 -0
- /package/build/{chunk-VIUQV2TZ.js.map → chunk-Z7P6TDPB.js.map} +0 -0
- /package/build/{install-FKVCCLFF.js.map → install-MTS6LPPU.js.map} +0 -0
- /package/build/{preview-7P7VNEUO.js.map → preview-TDMPHSVV.js.map} +0 -0
- /package/build/{publish-FA4OUDWG.js.map → publish-5VLMBE6J.js.map} +0 -0
- /package/build/{render-command-NM3HNCRF.js.map → render-command-7OMEGPW4.js.map} +0 -0
- /package/build/{render-command-VA3HCBMQ.js.map → render-command-FELGYBEY.js.map} +0 -0
- /package/build/{render-command-REKF5DLG.js.map → render-command-UQPFUBIL.js.map} +0 -0
- /package/build/{run-command-ZLQ3PKCS.js.map → run-command-3YTQS4ZX.js.map} +0 -0
- /package/build/{src-5XWKD5UB.js.map → src-4W2WPIAM.js.map} +0 -0
- /package/build/{src-YDZK3SDZ.js.map → src-7NEL65ZK.js.map} +0 -0
- /package/build/{src-FSILLQWK.js.map → src-IBLQL7AB.js.map} +0 -0
- /package/build/{src-KDZNNJHV.js.map → src-LA3GYOE6.js.map} +0 -0
- /package/build/{src-Q3X5WF65.js.map → src-UWOBS6D7.js.map} +0 -0
- /package/build/{src-SWWZQIWT.js.map → src-Y334LPF5.js.map} +0 -0
- /package/build/{sync-types-GLTTFJMA.js.map → sync-types-W3PVOJTK.js.map} +0 -0
- /package/build/{uninstall-HA7CE6JB.js.map → uninstall-M4DEVSQC.js.map} +0 -0
|
@@ -18,12 +18,12 @@ import {
|
|
|
18
18
|
} from "./chunk-6F2RSXHN.js";
|
|
19
19
|
import {
|
|
20
20
|
getTestOverrides
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BNWDAMAL.js";
|
|
22
22
|
import {
|
|
23
23
|
CliError,
|
|
24
24
|
CliErrorCode,
|
|
25
25
|
require_lib
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-T4OH34QF.js";
|
|
27
27
|
import {
|
|
28
28
|
__commonJS,
|
|
29
29
|
__require,
|
|
@@ -11471,20 +11471,18 @@ terminalLink.stderr = (text, url, options = {}) => terminalLink(text, url, { tar
|
|
|
11471
11471
|
terminalLink.stderr.isSupported = import_supports_hyperlinks.default.stderr;
|
|
11472
11472
|
|
|
11473
11473
|
// ../cli-ui-kit/src/components/Link.tsx
|
|
11474
|
-
var Link = ({
|
|
11475
|
-
skin,
|
|
11476
|
-
children,
|
|
11477
|
-
url,
|
|
11478
|
-
transform = (v) => v
|
|
11479
|
-
}) => {
|
|
11474
|
+
var Link = ({ skin, children, url }) => {
|
|
11480
11475
|
if (children) {
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11476
|
+
if (terminalLink.isSupported) {
|
|
11477
|
+
return /* @__PURE__ */ import_react41.default.createElement(
|
|
11478
|
+
Transform,
|
|
11479
|
+
{
|
|
11480
|
+
transform: (childrenAsString) => terminalLink(childrenAsString, url, { fallback: false })
|
|
11481
|
+
},
|
|
11482
|
+
/* @__PURE__ */ import_react41.default.createElement(Text2, { skin }, children)
|
|
11483
|
+
);
|
|
11484
|
+
}
|
|
11485
|
+
return /* @__PURE__ */ import_react41.default.createElement(Text2, null, /* @__PURE__ */ import_react41.default.createElement(Text2, { skin }, children), " (", url, ")");
|
|
11488
11486
|
}
|
|
11489
11487
|
return /* @__PURE__ */ import_react41.default.createElement(Text2, { skin: "info" }, url);
|
|
11490
11488
|
};
|
|
@@ -11533,13 +11531,30 @@ var ErrorDetails = ({
|
|
|
11533
11531
|
hint
|
|
11534
11532
|
}) => /* @__PURE__ */ import_react44.default.createElement(Box_default, { flexDirection: "column" }, /* @__PURE__ */ import_react44.default.createElement(Alert, { type: "error" }, message), explanation && /* @__PURE__ */ import_react44.default.createElement(Alert, { type: "warning" }, explanation), hint && /* @__PURE__ */ import_react44.default.createElement(Box_default, { paddingTop: 1 }, /* @__PURE__ */ import_react44.default.createElement(Alert, { type: "insight" }, hint)));
|
|
11535
11533
|
|
|
11534
|
+
// ../cli-ui-kit/src/components/Notification.tsx
|
|
11535
|
+
init_esm_shims();
|
|
11536
|
+
var import_react45 = __toESM(require_react(), 1);
|
|
11537
|
+
var Notification = ({ children }) => {
|
|
11538
|
+
return /* @__PURE__ */ import_react45.default.createElement(Box_default, null, /* @__PURE__ */ import_react45.default.createElement(
|
|
11539
|
+
Box_default,
|
|
11540
|
+
{
|
|
11541
|
+
padding: 1,
|
|
11542
|
+
alignItems: "center",
|
|
11543
|
+
flexDirection: "column",
|
|
11544
|
+
borderColor: "yellowBright",
|
|
11545
|
+
borderStyle: "round"
|
|
11546
|
+
},
|
|
11547
|
+
children
|
|
11548
|
+
));
|
|
11549
|
+
};
|
|
11550
|
+
|
|
11536
11551
|
// ../cli-ui-kit/src/hooks/use-async.ts
|
|
11537
11552
|
init_esm_shims();
|
|
11538
11553
|
var import_variant6 = __toESM(require_lib(), 1);
|
|
11539
11554
|
|
|
11540
11555
|
// ../../node_modules/react-async-hook/dist/react-async-hook.esm.js
|
|
11541
11556
|
init_esm_shims();
|
|
11542
|
-
var
|
|
11557
|
+
var import_react46 = __toESM(require_react());
|
|
11543
11558
|
function _extends() {
|
|
11544
11559
|
_extends = Object.assign || function(target) {
|
|
11545
11560
|
for (var i2 = 1; i2 < arguments.length; i2++) {
|
|
@@ -11556,13 +11571,13 @@ function _extends() {
|
|
|
11556
11571
|
}
|
|
11557
11572
|
var _iteratorSymbol = typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
11558
11573
|
var _asyncIteratorSymbol = typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
|
|
11559
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined" ?
|
|
11574
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined" ? import_react46.useLayoutEffect : import_react46.useEffect;
|
|
11560
11575
|
var useGetter = function useGetter2(t3) {
|
|
11561
|
-
var ref = (0,
|
|
11576
|
+
var ref = (0, import_react46.useRef)(t3);
|
|
11562
11577
|
useIsomorphicLayoutEffect(function() {
|
|
11563
11578
|
ref.current = t3;
|
|
11564
11579
|
});
|
|
11565
|
-
return (0,
|
|
11580
|
+
return (0, import_react46.useCallback)(function() {
|
|
11566
11581
|
return ref.current;
|
|
11567
11582
|
}, [ref]);
|
|
11568
11583
|
};
|
|
@@ -11615,22 +11630,22 @@ var normalizeOptions = function normalizeOptions2(options) {
|
|
|
11615
11630
|
return _extends({}, DefaultOptions, {}, options);
|
|
11616
11631
|
};
|
|
11617
11632
|
var useAsyncState = function useAsyncState2(options) {
|
|
11618
|
-
var _useState = (0,
|
|
11633
|
+
var _useState = (0, import_react46.useState)(function() {
|
|
11619
11634
|
return options.initialState(options);
|
|
11620
11635
|
}), value2 = _useState[0], setValue = _useState[1];
|
|
11621
|
-
var reset = (0,
|
|
11636
|
+
var reset = (0, import_react46.useCallback)(function() {
|
|
11622
11637
|
return setValue(options.initialState(options));
|
|
11623
11638
|
}, [setValue, options]);
|
|
11624
|
-
var setLoading = (0,
|
|
11639
|
+
var setLoading = (0, import_react46.useCallback)(function() {
|
|
11625
11640
|
return setValue(options.setLoading(value2));
|
|
11626
11641
|
}, [value2, setValue]);
|
|
11627
|
-
var setResult = (0,
|
|
11642
|
+
var setResult = (0, import_react46.useCallback)(function(result) {
|
|
11628
11643
|
return setValue(options.setResult(result, value2));
|
|
11629
11644
|
}, [value2, setValue]);
|
|
11630
|
-
var setError = (0,
|
|
11645
|
+
var setError = (0, import_react46.useCallback)(function(error) {
|
|
11631
11646
|
return setValue(options.setError(error, value2));
|
|
11632
11647
|
}, [value2, setValue]);
|
|
11633
|
-
var merge = (0,
|
|
11648
|
+
var merge = (0, import_react46.useCallback)(function(state) {
|
|
11634
11649
|
return setValue(_extends({}, value2, {}, state));
|
|
11635
11650
|
}, [value2, setValue]);
|
|
11636
11651
|
return {
|
|
@@ -11644,8 +11659,8 @@ var useAsyncState = function useAsyncState2(options) {
|
|
|
11644
11659
|
};
|
|
11645
11660
|
};
|
|
11646
11661
|
var useIsMounted = function useIsMounted2() {
|
|
11647
|
-
var ref = (0,
|
|
11648
|
-
(0,
|
|
11662
|
+
var ref = (0, import_react46.useRef)(false);
|
|
11663
|
+
(0, import_react46.useEffect)(function() {
|
|
11649
11664
|
ref.current = true;
|
|
11650
11665
|
return function() {
|
|
11651
11666
|
ref.current = false;
|
|
@@ -11656,7 +11671,7 @@ var useIsMounted = function useIsMounted2() {
|
|
|
11656
11671
|
};
|
|
11657
11672
|
};
|
|
11658
11673
|
var useCurrentPromise = function useCurrentPromise2() {
|
|
11659
|
-
var ref = (0,
|
|
11674
|
+
var ref = (0, import_react46.useRef)(null);
|
|
11660
11675
|
return {
|
|
11661
11676
|
set: function set(promise) {
|
|
11662
11677
|
return ref.current = promise;
|
|
@@ -11672,7 +11687,7 @@ var useCurrentPromise = function useCurrentPromise2() {
|
|
|
11672
11687
|
var useAsyncInternal = function useAsyncInternal2(asyncFunction, params, options) {
|
|
11673
11688
|
!params && (params = []);
|
|
11674
11689
|
var normalizedOptions = normalizeOptions(options);
|
|
11675
|
-
var _useState2 = (0,
|
|
11690
|
+
var _useState2 = (0, import_react46.useState)(null), currentParams = _useState2[0], setCurrentParams = _useState2[1];
|
|
11676
11691
|
var AsyncState = useAsyncState(normalizedOptions);
|
|
11677
11692
|
var isMounted = useIsMounted();
|
|
11678
11693
|
var CurrentPromise = useCurrentPromise();
|
|
@@ -11715,11 +11730,11 @@ var useAsyncInternal = function useAsyncInternal2(asyncFunction, params, options
|
|
|
11715
11730
|
return promise;
|
|
11716
11731
|
};
|
|
11717
11732
|
var getLatestExecuteAsyncOperation = useGetter(executeAsyncOperation);
|
|
11718
|
-
var executeAsyncOperationMemo = (0,
|
|
11733
|
+
var executeAsyncOperationMemo = (0, import_react46.useCallback)(function() {
|
|
11719
11734
|
return getLatestExecuteAsyncOperation().apply(void 0, arguments);
|
|
11720
11735
|
}, [getLatestExecuteAsyncOperation]);
|
|
11721
11736
|
var isMounting = !isMounted();
|
|
11722
|
-
(0,
|
|
11737
|
+
(0, import_react46.useEffect)(function() {
|
|
11723
11738
|
var execute = function execute2() {
|
|
11724
11739
|
return getLatestExecuteAsyncOperation().apply(void 0, params);
|
|
11725
11740
|
};
|
|
@@ -11752,7 +11767,7 @@ var useAsyncCallback = function useAsyncCallback2(asyncFunction, options) {
|
|
|
11752
11767
|
};
|
|
11753
11768
|
|
|
11754
11769
|
// ../cli-ui-kit/src/hooks/use-async.ts
|
|
11755
|
-
var
|
|
11770
|
+
var import_react47 = __toESM(require_react(), 1);
|
|
11756
11771
|
var AsyncStatus = (0, import_variant6.variant)(
|
|
11757
11772
|
(0, import_variant6.onTerms)(({ T: _T }) => ({
|
|
11758
11773
|
Error: (error) => ({ error }),
|
|
@@ -11770,7 +11785,7 @@ var AsyncCallbackStatus = (0, import_variant6.variant)(
|
|
|
11770
11785
|
);
|
|
11771
11786
|
var useAsync2 = (fn, args, options) => {
|
|
11772
11787
|
const exit = useExit();
|
|
11773
|
-
const abortController = (0,
|
|
11788
|
+
const abortController = (0, import_react47.useMemo)(() => new AbortController(), []);
|
|
11774
11789
|
const { result, error, status, merge } = useAsync(
|
|
11775
11790
|
fn.bind(null, { signal: abortController.signal }),
|
|
11776
11791
|
args,
|
|
@@ -11779,7 +11794,7 @@ var useAsync2 = (fn, args, options) => {
|
|
|
11779
11794
|
...options ?? {}
|
|
11780
11795
|
}
|
|
11781
11796
|
);
|
|
11782
|
-
(0,
|
|
11797
|
+
(0, import_react47.useEffect)(() => {
|
|
11783
11798
|
return () => {
|
|
11784
11799
|
abortController.abort();
|
|
11785
11800
|
};
|
|
@@ -11799,7 +11814,7 @@ var useAsync2 = (fn, args, options) => {
|
|
|
11799
11814
|
};
|
|
11800
11815
|
var useAsyncCallback3 = (fn, options) => {
|
|
11801
11816
|
const exit = useExit();
|
|
11802
|
-
const abortController = (0,
|
|
11817
|
+
const abortController = (0, import_react47.useMemo)(() => new AbortController(), []);
|
|
11803
11818
|
const { result, error, status, merge, execute } = useAsyncCallback(
|
|
11804
11819
|
fn.bind(null, { signal: abortController.signal }),
|
|
11805
11820
|
{
|
|
@@ -11807,7 +11822,7 @@ var useAsyncCallback3 = (fn, options) => {
|
|
|
11807
11822
|
...options ?? {}
|
|
11808
11823
|
}
|
|
11809
11824
|
);
|
|
11810
|
-
(0,
|
|
11825
|
+
(0, import_react47.useEffect)(() => {
|
|
11811
11826
|
return () => {
|
|
11812
11827
|
abortController.abort();
|
|
11813
11828
|
};
|
|
@@ -11837,11 +11852,11 @@ var useAsyncCallback3 = (fn, options) => {
|
|
|
11837
11852
|
|
|
11838
11853
|
// ../../node_modules/react-i18next/dist/es/Trans.js
|
|
11839
11854
|
init_esm_shims();
|
|
11840
|
-
var
|
|
11855
|
+
var import_react50 = __toESM(require_react(), 1);
|
|
11841
11856
|
|
|
11842
11857
|
// ../../node_modules/react-i18next/dist/es/TransWithoutContext.js
|
|
11843
11858
|
init_esm_shims();
|
|
11844
|
-
var
|
|
11859
|
+
var import_react48 = __toESM(require_react(), 1);
|
|
11845
11860
|
|
|
11846
11861
|
// ../../node_modules/html-parse-stringify/dist/html-parse-stringify.module.js
|
|
11847
11862
|
init_esm_shims();
|
|
@@ -11908,24 +11923,27 @@ var html_parse_stringify_module_default = c;
|
|
|
11908
11923
|
|
|
11909
11924
|
// ../../node_modules/react-i18next/dist/es/utils.js
|
|
11910
11925
|
init_esm_shims();
|
|
11911
|
-
|
|
11912
|
-
|
|
11913
|
-
|
|
11914
|
-
|
|
11915
|
-
|
|
11916
|
-
|
|
11926
|
+
var warn = (i18n, code, msg, rest) => {
|
|
11927
|
+
const args = [msg, {
|
|
11928
|
+
code,
|
|
11929
|
+
...rest || {}
|
|
11930
|
+
}];
|
|
11931
|
+
if (i18n?.services?.logger?.forward) {
|
|
11932
|
+
return i18n.services.logger.forward(args, "warn", "react-i18next::", true);
|
|
11933
|
+
}
|
|
11934
|
+
if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
|
|
11935
|
+
if (i18n?.services?.logger?.warn) {
|
|
11936
|
+
i18n.services.logger.warn(...args);
|
|
11937
|
+
} else if (console?.warn) {
|
|
11917
11938
|
console.warn(...args);
|
|
11918
11939
|
}
|
|
11919
|
-
}
|
|
11940
|
+
};
|
|
11920
11941
|
var alreadyWarned = {};
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
if (isString(args[0])) alreadyWarned[args[0]] = /* @__PURE__ */ new Date();
|
|
11927
|
-
warn(...args);
|
|
11928
|
-
}
|
|
11942
|
+
var warnOnce = (i18n, code, msg, rest) => {
|
|
11943
|
+
if (isString(msg) && alreadyWarned[msg]) return;
|
|
11944
|
+
if (isString(msg)) alreadyWarned[msg] = /* @__PURE__ */ new Date();
|
|
11945
|
+
warn(i18n, code, msg, rest);
|
|
11946
|
+
};
|
|
11929
11947
|
var loadedClb = (i18n, cb) => () => {
|
|
11930
11948
|
if (i18n.isInitialized) {
|
|
11931
11949
|
cb();
|
|
@@ -11944,41 +11962,23 @@ var loadNamespaces = (i18n, ns, cb) => {
|
|
|
11944
11962
|
};
|
|
11945
11963
|
var loadLanguages = (i18n, lng, ns, cb) => {
|
|
11946
11964
|
if (isString(ns)) ns = [ns];
|
|
11965
|
+
if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
|
|
11947
11966
|
ns.forEach((n2) => {
|
|
11948
11967
|
if (i18n.options.ns.indexOf(n2) < 0) i18n.options.ns.push(n2);
|
|
11949
11968
|
});
|
|
11950
11969
|
i18n.loadLanguages(lng, loadedClb(i18n, cb));
|
|
11951
11970
|
};
|
|
11952
|
-
var
|
|
11953
|
-
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
11954
|
-
const lng = i18n.languages[0];
|
|
11955
|
-
const fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
|
|
11956
|
-
const lastLng = i18n.languages[i18n.languages.length - 1];
|
|
11957
|
-
if (lng.toLowerCase() === "cimode") return true;
|
|
11958
|
-
const loadNotPending = (l, n2) => {
|
|
11959
|
-
const loadState = i18n.services.backendConnector.state[`${l}|${n2}`];
|
|
11960
|
-
return loadState === -1 || loadState === 2;
|
|
11961
|
-
};
|
|
11962
|
-
if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns)) return false;
|
|
11963
|
-
if (i18n.hasResourceBundle(lng, ns)) return true;
|
|
11964
|
-
if (!i18n.services.backendConnector.backend || i18n.options.resources && !i18n.options.partialBundledLanguages) return true;
|
|
11965
|
-
if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
|
|
11966
|
-
return false;
|
|
11967
|
-
};
|
|
11968
|
-
var hasLoadedNamespace = function(ns, i18n) {
|
|
11969
|
-
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
11971
|
+
var hasLoadedNamespace = (ns, i18n, options = {}) => {
|
|
11970
11972
|
if (!i18n.languages || !i18n.languages.length) {
|
|
11971
|
-
warnOnce("i18n.languages were undefined or empty",
|
|
11973
|
+
warnOnce(i18n, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
|
|
11974
|
+
languages: i18n.languages
|
|
11975
|
+
});
|
|
11972
11976
|
return true;
|
|
11973
11977
|
}
|
|
11974
|
-
const isNewerI18next = i18n.options.ignoreJSONStructure !== void 0;
|
|
11975
|
-
if (!isNewerI18next) {
|
|
11976
|
-
return oldI18nextHasLoadedNamespace(ns, i18n, options);
|
|
11977
|
-
}
|
|
11978
11978
|
return i18n.hasLoadedNamespace(ns, {
|
|
11979
11979
|
lng: options.lng,
|
|
11980
11980
|
precheck: (i18nInstance2, loadNotPending) => {
|
|
11981
|
-
if (options.bindI18n
|
|
11981
|
+
if (options.bindI18n?.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
|
|
11982
11982
|
}
|
|
11983
11983
|
});
|
|
11984
11984
|
};
|
|
@@ -12027,8 +12027,7 @@ var defaultOptions = {
|
|
|
12027
12027
|
useSuspense: true,
|
|
12028
12028
|
unescape
|
|
12029
12029
|
};
|
|
12030
|
-
var setDefaults =
|
|
12031
|
-
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
12030
|
+
var setDefaults = (options = {}) => {
|
|
12032
12031
|
defaultOptions = {
|
|
12033
12032
|
...defaultOptions,
|
|
12034
12033
|
...options
|
|
@@ -12047,16 +12046,16 @@ var getI18n = () => i18nInstance;
|
|
|
12047
12046
|
// ../../node_modules/react-i18next/dist/es/TransWithoutContext.js
|
|
12048
12047
|
var hasChildren = (node, checkLength) => {
|
|
12049
12048
|
if (!node) return false;
|
|
12050
|
-
const base = node.props
|
|
12049
|
+
const base = node.props?.children ?? node.children;
|
|
12051
12050
|
if (checkLength) return base.length > 0;
|
|
12052
12051
|
return !!base;
|
|
12053
12052
|
};
|
|
12054
12053
|
var getChildren = (node) => {
|
|
12055
12054
|
if (!node) return [];
|
|
12056
|
-
const children = node.props
|
|
12057
|
-
return node.props
|
|
12055
|
+
const children = node.props?.children ?? node.children;
|
|
12056
|
+
return node.props?.i18nIsDynamicList ? getAsArray(children) : children;
|
|
12058
12057
|
};
|
|
12059
|
-
var hasValidReactChildren = (children) => Array.isArray(children) && children.every(
|
|
12058
|
+
var hasValidReactChildren = (children) => Array.isArray(children) && children.every(import_react48.isValidElement);
|
|
12060
12059
|
var getAsArray = (data) => Array.isArray(data) ? data : [data];
|
|
12061
12060
|
var mergeProps = (source, target) => {
|
|
12062
12061
|
const newTarget = {
|
|
@@ -12065,15 +12064,17 @@ var mergeProps = (source, target) => {
|
|
|
12065
12064
|
newTarget.props = Object.assign(source.props, target.props);
|
|
12066
12065
|
return newTarget;
|
|
12067
12066
|
};
|
|
12068
|
-
var nodesToString = (children, i18nOptions) => {
|
|
12067
|
+
var nodesToString = (children, i18nOptions, i18n, i18nKey) => {
|
|
12069
12068
|
if (!children) return "";
|
|
12070
12069
|
let stringNode = "";
|
|
12071
12070
|
const childrenArray = getAsArray(children);
|
|
12072
|
-
const keepArray = i18nOptions
|
|
12071
|
+
const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];
|
|
12073
12072
|
childrenArray.forEach((child, childIndex) => {
|
|
12074
12073
|
if (isString(child)) {
|
|
12075
12074
|
stringNode += `${child}`;
|
|
12076
|
-
|
|
12075
|
+
return;
|
|
12076
|
+
}
|
|
12077
|
+
if ((0, import_react48.isValidElement)(child)) {
|
|
12077
12078
|
const {
|
|
12078
12079
|
props,
|
|
12079
12080
|
type
|
|
@@ -12083,17 +12084,27 @@ var nodesToString = (children, i18nOptions) => {
|
|
|
12083
12084
|
const childChildren = props.children;
|
|
12084
12085
|
if (!childChildren && shouldKeepChild && !childPropsCount) {
|
|
12085
12086
|
stringNode += `<${type}/>`;
|
|
12086
|
-
|
|
12087
|
+
return;
|
|
12088
|
+
}
|
|
12089
|
+
if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {
|
|
12087
12090
|
stringNode += `<${childIndex}></${childIndex}>`;
|
|
12088
|
-
|
|
12091
|
+
return;
|
|
12092
|
+
}
|
|
12093
|
+
if (shouldKeepChild && childPropsCount === 1 && isString(childChildren)) {
|
|
12089
12094
|
stringNode += `<${type}>${childChildren}</${type}>`;
|
|
12090
|
-
|
|
12091
|
-
const content = nodesToString(childChildren, i18nOptions);
|
|
12092
|
-
stringNode += `<${childIndex}>${content}</${childIndex}>`;
|
|
12095
|
+
return;
|
|
12093
12096
|
}
|
|
12094
|
-
|
|
12095
|
-
|
|
12096
|
-
|
|
12097
|
+
const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);
|
|
12098
|
+
stringNode += `<${childIndex}>${content}</${childIndex}>`;
|
|
12099
|
+
return;
|
|
12100
|
+
}
|
|
12101
|
+
if (child === null) {
|
|
12102
|
+
warn(i18n, "TRANS_NULL_VALUE", `Passed in a null value as child`, {
|
|
12103
|
+
i18nKey
|
|
12104
|
+
});
|
|
12105
|
+
return;
|
|
12106
|
+
}
|
|
12107
|
+
if (isObject(child)) {
|
|
12097
12108
|
const {
|
|
12098
12109
|
format,
|
|
12099
12110
|
...clone
|
|
@@ -12102,12 +12113,18 @@ var nodesToString = (children, i18nOptions) => {
|
|
|
12102
12113
|
if (keys.length === 1) {
|
|
12103
12114
|
const value2 = format ? `${keys[0]}, ${format}` : keys[0];
|
|
12104
12115
|
stringNode += `{{${value2}}}`;
|
|
12105
|
-
|
|
12106
|
-
warn(`react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.`, child);
|
|
12116
|
+
return;
|
|
12107
12117
|
}
|
|
12108
|
-
|
|
12109
|
-
|
|
12118
|
+
warn(i18n, "TRANS_INVALID_OBJ", `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {
|
|
12119
|
+
i18nKey,
|
|
12120
|
+
child
|
|
12121
|
+
});
|
|
12122
|
+
return;
|
|
12110
12123
|
}
|
|
12124
|
+
warn(i18n, "TRANS_INVALID_VAR", `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {
|
|
12125
|
+
i18nKey,
|
|
12126
|
+
child
|
|
12127
|
+
});
|
|
12111
12128
|
});
|
|
12112
12129
|
return stringNode;
|
|
12113
12130
|
};
|
|
@@ -12122,7 +12139,7 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
12122
12139
|
childrenArray.forEach((child) => {
|
|
12123
12140
|
if (isString(child)) return;
|
|
12124
12141
|
if (hasChildren(child)) getData(getChildren(child));
|
|
12125
|
-
else if (isObject(child) && !(0,
|
|
12142
|
+
else if (isObject(child) && !(0, import_react48.isValidElement)(child)) Object.assign(data, child);
|
|
12126
12143
|
});
|
|
12127
12144
|
};
|
|
12128
12145
|
getData(children);
|
|
@@ -12134,21 +12151,21 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
12134
12151
|
const renderInner = (child, node, rootReactNode) => {
|
|
12135
12152
|
const childs = getChildren(child);
|
|
12136
12153
|
const mappedChildren = mapAST(childs, node.children, rootReactNode);
|
|
12137
|
-
return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props
|
|
12154
|
+
return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;
|
|
12138
12155
|
};
|
|
12139
12156
|
const pushTranslatedJSX = (child, inner, mem, i2, isVoid) => {
|
|
12140
12157
|
if (child.dummy) {
|
|
12141
12158
|
child.children = inner;
|
|
12142
|
-
mem.push((0,
|
|
12159
|
+
mem.push((0, import_react48.cloneElement)(child, {
|
|
12143
12160
|
key: i2
|
|
12144
12161
|
}, isVoid ? void 0 : inner));
|
|
12145
12162
|
} else {
|
|
12146
|
-
mem.push(...
|
|
12163
|
+
mem.push(...import_react48.Children.map([child], (c2) => {
|
|
12147
12164
|
const props = {
|
|
12148
12165
|
...c2.props
|
|
12149
12166
|
};
|
|
12150
12167
|
delete props.i18nIsDynamicList;
|
|
12151
|
-
return (0,
|
|
12168
|
+
return (0, import_react48.createElement)(c2.type, {
|
|
12152
12169
|
...props,
|
|
12153
12170
|
key: i2,
|
|
12154
12171
|
ref: c2.ref
|
|
@@ -12160,7 +12177,7 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
12160
12177
|
const reactNodes = getAsArray(reactNode);
|
|
12161
12178
|
const astNodes = getAsArray(astNode);
|
|
12162
12179
|
return astNodes.reduce((mem, node, i2) => {
|
|
12163
|
-
const translationContent = node.children
|
|
12180
|
+
const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);
|
|
12164
12181
|
if (node.type === "tag") {
|
|
12165
12182
|
let tmp = reactNodes[parseInt(node.name, 10)];
|
|
12166
12183
|
if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];
|
|
@@ -12168,7 +12185,7 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
12168
12185
|
const child = Object.keys(node.attrs).length !== 0 ? mergeProps({
|
|
12169
12186
|
props: node.attrs
|
|
12170
12187
|
}, tmp) : tmp;
|
|
12171
|
-
const isElement = (0,
|
|
12188
|
+
const isElement = (0, import_react48.isValidElement)(child);
|
|
12172
12189
|
const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;
|
|
12173
12190
|
const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;
|
|
12174
12191
|
const isKnownComponent = isObject(children) && Object.hasOwnProperty.call(children, node.name);
|
|
@@ -12187,12 +12204,12 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
12187
12204
|
pushTranslatedJSX(child, inner, mem, i2, node.voidElement);
|
|
12188
12205
|
} else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {
|
|
12189
12206
|
if (node.voidElement) {
|
|
12190
|
-
mem.push((0,
|
|
12207
|
+
mem.push((0, import_react48.createElement)(node.name, {
|
|
12191
12208
|
key: `${node.name}-${i2}`
|
|
12192
12209
|
}));
|
|
12193
12210
|
} else {
|
|
12194
12211
|
const inner = mapAST(reactNodes, node.children, rootReactNode);
|
|
12195
|
-
mem.push((0,
|
|
12212
|
+
mem.push((0, import_react48.createElement)(node.name, {
|
|
12196
12213
|
key: `${node.name}-${i2}`
|
|
12197
12214
|
}, inner));
|
|
12198
12215
|
}
|
|
@@ -12212,7 +12229,7 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
12212
12229
|
const wrapTextNodes = i18nOptions.transWrapTextNodes;
|
|
12213
12230
|
const content = shouldUnescape ? i18nOptions.unescape(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);
|
|
12214
12231
|
if (wrapTextNodes) {
|
|
12215
|
-
mem.push((0,
|
|
12232
|
+
mem.push((0, import_react48.createElement)(wrapTextNodes, {
|
|
12216
12233
|
key: `${node.name}-${i2}`
|
|
12217
12234
|
}, content));
|
|
12218
12235
|
} else {
|
|
@@ -12228,42 +12245,79 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
|
|
|
12228
12245
|
}], ast, getAsArray(children || []));
|
|
12229
12246
|
return getChildren(result[0]);
|
|
12230
12247
|
};
|
|
12231
|
-
|
|
12232
|
-
|
|
12233
|
-
|
|
12234
|
-
|
|
12235
|
-
|
|
12236
|
-
|
|
12237
|
-
|
|
12238
|
-
|
|
12239
|
-
|
|
12240
|
-
|
|
12241
|
-
|
|
12242
|
-
|
|
12243
|
-
|
|
12244
|
-
|
|
12245
|
-
|
|
12246
|
-
|
|
12247
|
-
|
|
12248
|
+
var fixComponentProps = (component, index, translation) => {
|
|
12249
|
+
const componentKey = component.key || index;
|
|
12250
|
+
const comp = (0, import_react48.cloneElement)(component, {
|
|
12251
|
+
key: componentKey
|
|
12252
|
+
});
|
|
12253
|
+
if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {
|
|
12254
|
+
return comp;
|
|
12255
|
+
}
|
|
12256
|
+
function Componentized() {
|
|
12257
|
+
return (0, import_react48.createElement)(import_react48.Fragment, null, comp);
|
|
12258
|
+
}
|
|
12259
|
+
return (0, import_react48.createElement)(Componentized);
|
|
12260
|
+
};
|
|
12261
|
+
var generateArrayComponents = (components, translation) => components.map((c2, index) => fixComponentProps(c2, index, translation));
|
|
12262
|
+
var generateObjectComponents = (components, translation) => {
|
|
12263
|
+
const componentMap = {};
|
|
12264
|
+
Object.keys(components).forEach((c2) => {
|
|
12265
|
+
Object.assign(componentMap, {
|
|
12266
|
+
[c2]: fixComponentProps(components[c2], c2, translation)
|
|
12267
|
+
});
|
|
12268
|
+
});
|
|
12269
|
+
return componentMap;
|
|
12270
|
+
};
|
|
12271
|
+
var generateComponents = (components, translation, i18n, i18nKey) => {
|
|
12272
|
+
if (!components) return null;
|
|
12273
|
+
if (Array.isArray(components)) {
|
|
12274
|
+
return generateArrayComponents(components, translation);
|
|
12275
|
+
}
|
|
12276
|
+
if (isObject(components)) {
|
|
12277
|
+
return generateObjectComponents(components, translation);
|
|
12278
|
+
}
|
|
12279
|
+
warnOnce(i18n, "TRANS_INVALID_COMPONENTS", `<Trans /> "components" prop expects an object or array`, {
|
|
12280
|
+
i18nKey
|
|
12281
|
+
});
|
|
12282
|
+
return null;
|
|
12283
|
+
};
|
|
12284
|
+
function Trans({
|
|
12285
|
+
children,
|
|
12286
|
+
count,
|
|
12287
|
+
parent,
|
|
12288
|
+
i18nKey,
|
|
12289
|
+
context,
|
|
12290
|
+
tOptions = {},
|
|
12291
|
+
values,
|
|
12292
|
+
defaults: defaults2,
|
|
12293
|
+
components,
|
|
12294
|
+
ns,
|
|
12295
|
+
i18n: i18nFromProps,
|
|
12296
|
+
t: tFromProps,
|
|
12297
|
+
shouldUnescape,
|
|
12298
|
+
...additionalProps
|
|
12299
|
+
}) {
|
|
12248
12300
|
const i18n = i18nFromProps || getI18n();
|
|
12249
12301
|
if (!i18n) {
|
|
12250
|
-
warnOnce("You
|
|
12302
|
+
warnOnce(i18n, "NO_I18NEXT_INSTANCE", `Trans: You need to pass in an i18next instance using i18nextReactModule`, {
|
|
12303
|
+
i18nKey
|
|
12304
|
+
});
|
|
12251
12305
|
return children;
|
|
12252
12306
|
}
|
|
12253
12307
|
const t3 = tFromProps || i18n.t.bind(i18n) || ((k) => k);
|
|
12254
12308
|
const reactI18nextOptions = {
|
|
12255
12309
|
...getDefaults(),
|
|
12256
|
-
...i18n.options
|
|
12310
|
+
...i18n.options?.react
|
|
12257
12311
|
};
|
|
12258
|
-
let namespaces = ns || t3.ns || i18n.options
|
|
12312
|
+
let namespaces = ns || t3.ns || i18n.options?.defaultNS;
|
|
12259
12313
|
namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
|
|
12260
|
-
const nodeAsString = nodesToString(children, reactI18nextOptions);
|
|
12314
|
+
const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);
|
|
12261
12315
|
const defaultValue = defaults2 || nodeAsString || reactI18nextOptions.transEmptyNodeValue || i18nKey;
|
|
12262
12316
|
const {
|
|
12263
12317
|
hashTransKey
|
|
12264
12318
|
} = reactI18nextOptions;
|
|
12265
12319
|
const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);
|
|
12266
|
-
if (i18n.options
|
|
12320
|
+
if (i18n.options?.interpolation?.defaultVariables) {
|
|
12267
12321
|
values = values && Object.keys(values).length > 0 ? {
|
|
12268
12322
|
...values,
|
|
12269
12323
|
...i18n.options.interpolation.defaultVariables
|
|
@@ -12271,7 +12325,7 @@ function Trans(_ref) {
|
|
|
12271
12325
|
...i18n.options.interpolation.defaultVariables
|
|
12272
12326
|
};
|
|
12273
12327
|
}
|
|
12274
|
-
const interpolationOverride = values || count !== void 0 || !children ? tOptions.interpolation : {
|
|
12328
|
+
const interpolationOverride = values || count !== void 0 && !i18n.options?.interpolation?.alwaysFormat || !children ? tOptions.interpolation : {
|
|
12275
12329
|
interpolation: {
|
|
12276
12330
|
...tOptions.interpolation,
|
|
12277
12331
|
prefix: "#$?",
|
|
@@ -12288,24 +12342,15 @@ function Trans(_ref) {
|
|
|
12288
12342
|
ns: namespaces
|
|
12289
12343
|
};
|
|
12290
12344
|
const translation = key ? t3(key, combinedTOpts) : defaultValue;
|
|
12291
|
-
|
|
12292
|
-
|
|
12293
|
-
|
|
12294
|
-
|
|
12295
|
-
function Componentized() {
|
|
12296
|
-
return (0, import_react47.createElement)(import_react47.Fragment, null, comp);
|
|
12297
|
-
}
|
|
12298
|
-
components[c2] = (0, import_react47.createElement)(Componentized);
|
|
12299
|
-
});
|
|
12300
|
-
}
|
|
12301
|
-
const content = renderNodes(components || children, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);
|
|
12302
|
-
const useAsParent = parent !== void 0 ? parent : reactI18nextOptions.defaultTransParent;
|
|
12303
|
-
return useAsParent ? (0, import_react47.createElement)(useAsParent, additionalProps, content) : content;
|
|
12345
|
+
const generatedComponents = generateComponents(components, translation, i18n, i18nKey);
|
|
12346
|
+
const content = renderNodes(generatedComponents || children, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);
|
|
12347
|
+
const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;
|
|
12348
|
+
return useAsParent ? (0, import_react48.createElement)(useAsParent, additionalProps, content) : content;
|
|
12304
12349
|
}
|
|
12305
12350
|
|
|
12306
12351
|
// ../../node_modules/react-i18next/dist/es/context.js
|
|
12307
12352
|
init_esm_shims();
|
|
12308
|
-
var
|
|
12353
|
+
var import_react49 = __toESM(require_react(), 1);
|
|
12309
12354
|
|
|
12310
12355
|
// ../../node_modules/react-i18next/dist/es/initReactI18next.js
|
|
12311
12356
|
init_esm_shims();
|
|
@@ -12318,7 +12363,7 @@ var initReactI18next = {
|
|
|
12318
12363
|
};
|
|
12319
12364
|
|
|
12320
12365
|
// ../../node_modules/react-i18next/dist/es/context.js
|
|
12321
|
-
var I18nContext = (0,
|
|
12366
|
+
var I18nContext = (0, import_react49.createContext)();
|
|
12322
12367
|
var ReportNamespaces = class {
|
|
12323
12368
|
constructor() {
|
|
12324
12369
|
this.usedNamespaces = {};
|
|
@@ -12328,33 +12373,34 @@ var ReportNamespaces = class {
|
|
|
12328
12373
|
if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
|
|
12329
12374
|
});
|
|
12330
12375
|
}
|
|
12331
|
-
getUsedNamespaces
|
|
12376
|
+
getUsedNamespaces() {
|
|
12377
|
+
return Object.keys(this.usedNamespaces);
|
|
12378
|
+
}
|
|
12332
12379
|
};
|
|
12333
12380
|
|
|
12334
12381
|
// ../../node_modules/react-i18next/dist/es/Trans.js
|
|
12335
|
-
function Trans2(
|
|
12336
|
-
|
|
12337
|
-
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
|
|
12341
|
-
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
|
|
12349
|
-
|
|
12350
|
-
|
|
12351
|
-
} = _ref;
|
|
12382
|
+
function Trans2({
|
|
12383
|
+
children,
|
|
12384
|
+
count,
|
|
12385
|
+
parent,
|
|
12386
|
+
i18nKey,
|
|
12387
|
+
context,
|
|
12388
|
+
tOptions = {},
|
|
12389
|
+
values,
|
|
12390
|
+
defaults: defaults2,
|
|
12391
|
+
components,
|
|
12392
|
+
ns,
|
|
12393
|
+
i18n: i18nFromProps,
|
|
12394
|
+
t: tFromProps,
|
|
12395
|
+
shouldUnescape,
|
|
12396
|
+
...additionalProps
|
|
12397
|
+
}) {
|
|
12352
12398
|
const {
|
|
12353
12399
|
i18n: i18nFromContext,
|
|
12354
12400
|
defaultNS: defaultNSFromContext
|
|
12355
|
-
} = (0,
|
|
12401
|
+
} = (0, import_react50.useContext)(I18nContext) || {};
|
|
12356
12402
|
const i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
12357
|
-
const t3 = tFromProps || i18n
|
|
12403
|
+
const t3 = tFromProps || i18n?.t.bind(i18n);
|
|
12358
12404
|
return Trans({
|
|
12359
12405
|
children,
|
|
12360
12406
|
count,
|
|
@@ -12365,7 +12411,7 @@ function Trans2(_ref) {
|
|
|
12365
12411
|
values,
|
|
12366
12412
|
defaults: defaults2,
|
|
12367
12413
|
components,
|
|
12368
|
-
ns: ns || t3
|
|
12414
|
+
ns: ns || t3?.ns || defaultNSFromContext || i18n?.options?.defaultNS,
|
|
12369
12415
|
i18n,
|
|
12370
12416
|
t: tFromProps,
|
|
12371
12417
|
shouldUnescape,
|
|
@@ -12378,29 +12424,28 @@ init_esm_shims();
|
|
|
12378
12424
|
|
|
12379
12425
|
// ../../node_modules/react-i18next/dist/es/useTranslation.js
|
|
12380
12426
|
init_esm_shims();
|
|
12381
|
-
var
|
|
12427
|
+
var import_react51 = __toESM(require_react(), 1);
|
|
12382
12428
|
var usePrevious = (value2, ignore) => {
|
|
12383
|
-
const ref = (0,
|
|
12384
|
-
(0,
|
|
12429
|
+
const ref = (0, import_react51.useRef)();
|
|
12430
|
+
(0, import_react51.useEffect)(() => {
|
|
12385
12431
|
ref.current = ignore ? ref.current : value2;
|
|
12386
12432
|
}, [value2, ignore]);
|
|
12387
12433
|
return ref.current;
|
|
12388
12434
|
};
|
|
12389
12435
|
var alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
|
|
12390
|
-
var useMemoizedT = (i18n, language, namespace, keyPrefix) => (0,
|
|
12391
|
-
var useTranslation =
|
|
12392
|
-
let props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
12436
|
+
var useMemoizedT = (i18n, language, namespace, keyPrefix) => (0, import_react51.useCallback)(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
|
|
12437
|
+
var useTranslation = (ns, props = {}) => {
|
|
12393
12438
|
const {
|
|
12394
12439
|
i18n: i18nFromProps
|
|
12395
12440
|
} = props;
|
|
12396
12441
|
const {
|
|
12397
12442
|
i18n: i18nFromContext,
|
|
12398
12443
|
defaultNS: defaultNSFromContext
|
|
12399
|
-
} = (0,
|
|
12444
|
+
} = (0, import_react51.useContext)(I18nContext) || {};
|
|
12400
12445
|
const i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
12401
12446
|
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
|
|
12402
12447
|
if (!i18n) {
|
|
12403
|
-
warnOnce("You will need to pass in an i18next instance by using initReactI18next");
|
|
12448
|
+
warnOnce(i18n, "NO_I18NEXT_INSTANCE", "useTranslation: You will need to pass in an i18next instance by using initReactI18next");
|
|
12404
12449
|
const notReadyT = (k, optsOrDefaultValue) => {
|
|
12405
12450
|
if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
|
|
12406
12451
|
if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
|
|
@@ -12412,7 +12457,7 @@ var useTranslation = function(ns) {
|
|
|
12412
12457
|
retNotReady.ready = false;
|
|
12413
12458
|
return retNotReady;
|
|
12414
12459
|
}
|
|
12415
|
-
if (i18n.options.react
|
|
12460
|
+
if (i18n.options.react?.wait) warnOnce(i18n, "DEPRECATED_OPTION", "useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
12416
12461
|
const i18nOptions = {
|
|
12417
12462
|
...getDefaults(),
|
|
12418
12463
|
...i18n.options.react,
|
|
@@ -12422,19 +12467,19 @@ var useTranslation = function(ns) {
|
|
|
12422
12467
|
useSuspense,
|
|
12423
12468
|
keyPrefix
|
|
12424
12469
|
} = i18nOptions;
|
|
12425
|
-
let namespaces = ns || defaultNSFromContext || i18n.options
|
|
12470
|
+
let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;
|
|
12426
12471
|
namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
|
|
12427
|
-
|
|
12472
|
+
i18n.reportNamespaces.addUsedNamespaces?.(namespaces);
|
|
12428
12473
|
const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n2) => hasLoadedNamespace(n2, i18n, i18nOptions));
|
|
12429
12474
|
const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
12430
12475
|
const getT = () => memoGetT;
|
|
12431
12476
|
const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
|
|
12432
|
-
const [t3, setT] = (0,
|
|
12477
|
+
const [t3, setT] = (0, import_react51.useState)(getT);
|
|
12433
12478
|
let joinedNS = namespaces.join();
|
|
12434
12479
|
if (props.lng) joinedNS = `${props.lng}${joinedNS}`;
|
|
12435
12480
|
const previousJoinedNS = usePrevious(joinedNS);
|
|
12436
|
-
const isMounted = (0,
|
|
12437
|
-
(0,
|
|
12481
|
+
const isMounted = (0, import_react51.useRef)(true);
|
|
12482
|
+
(0, import_react51.useEffect)(() => {
|
|
12438
12483
|
const {
|
|
12439
12484
|
bindI18n,
|
|
12440
12485
|
bindI18nStore
|
|
@@ -12457,15 +12502,15 @@ var useTranslation = function(ns) {
|
|
|
12457
12502
|
const boundReset = () => {
|
|
12458
12503
|
if (isMounted.current) setT(getNewT);
|
|
12459
12504
|
};
|
|
12460
|
-
if (bindI18n
|
|
12461
|
-
if (bindI18nStore
|
|
12505
|
+
if (bindI18n) i18n?.on(bindI18n, boundReset);
|
|
12506
|
+
if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
|
|
12462
12507
|
return () => {
|
|
12463
12508
|
isMounted.current = false;
|
|
12464
|
-
if (
|
|
12509
|
+
if (i18n) bindI18n?.split(" ").forEach((e2) => i18n.off(e2, boundReset));
|
|
12465
12510
|
if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e2) => i18n.store.off(e2, boundReset));
|
|
12466
12511
|
};
|
|
12467
12512
|
}, [i18n, joinedNS]);
|
|
12468
|
-
(0,
|
|
12513
|
+
(0, import_react51.useEffect)(() => {
|
|
12469
12514
|
if (isMounted.current && ready) {
|
|
12470
12515
|
setT(getT);
|
|
12471
12516
|
}
|
|
@@ -12487,40 +12532,39 @@ var useTranslation = function(ns) {
|
|
|
12487
12532
|
|
|
12488
12533
|
// ../../node_modules/react-i18next/dist/es/withTranslation.js
|
|
12489
12534
|
init_esm_shims();
|
|
12490
|
-
var
|
|
12535
|
+
var import_react52 = __toESM(require_react(), 1);
|
|
12491
12536
|
|
|
12492
12537
|
// ../../node_modules/react-i18next/dist/es/Translation.js
|
|
12493
12538
|
init_esm_shims();
|
|
12494
12539
|
|
|
12495
12540
|
// ../../node_modules/react-i18next/dist/es/I18nextProvider.js
|
|
12496
12541
|
init_esm_shims();
|
|
12497
|
-
var
|
|
12498
|
-
function I18nextProvider(
|
|
12499
|
-
|
|
12500
|
-
|
|
12501
|
-
|
|
12502
|
-
|
|
12503
|
-
|
|
12504
|
-
const value2 = (0, import_react52.useMemo)(() => ({
|
|
12542
|
+
var import_react53 = __toESM(require_react(), 1);
|
|
12543
|
+
function I18nextProvider({
|
|
12544
|
+
i18n,
|
|
12545
|
+
defaultNS,
|
|
12546
|
+
children
|
|
12547
|
+
}) {
|
|
12548
|
+
const value2 = (0, import_react53.useMemo)(() => ({
|
|
12505
12549
|
i18n,
|
|
12506
12550
|
defaultNS
|
|
12507
12551
|
}), [i18n, defaultNS]);
|
|
12508
|
-
return (0,
|
|
12552
|
+
return (0, import_react53.createElement)(I18nContext.Provider, {
|
|
12509
12553
|
value: value2
|
|
12510
12554
|
}, children);
|
|
12511
12555
|
}
|
|
12512
12556
|
|
|
12513
12557
|
// ../../node_modules/react-i18next/dist/es/withSSR.js
|
|
12514
12558
|
init_esm_shims();
|
|
12515
|
-
var
|
|
12559
|
+
var import_react55 = __toESM(require_react(), 1);
|
|
12516
12560
|
|
|
12517
12561
|
// ../../node_modules/react-i18next/dist/es/useSSR.js
|
|
12518
12562
|
init_esm_shims();
|
|
12519
|
-
var
|
|
12563
|
+
var import_react54 = __toESM(require_react(), 1);
|
|
12520
12564
|
|
|
12521
12565
|
// ../cli-i18n/src/I18nProvider.tsx
|
|
12522
12566
|
init_esm_shims();
|
|
12523
|
-
var
|
|
12567
|
+
var import_react56 = __toESM(require_react(), 1);
|
|
12524
12568
|
|
|
12525
12569
|
// ../cli-i18n/src/create-i18n.ts
|
|
12526
12570
|
init_esm_shims();
|
|
@@ -16107,7 +16151,7 @@ var setPath2 = (object, path, newValue) => {
|
|
|
16107
16151
|
e2 = `${p[p.length - 1]}.${e2}`;
|
|
16108
16152
|
p = p.slice(0, p.length - 1);
|
|
16109
16153
|
last = getLastOfPath2(object, p, Object);
|
|
16110
|
-
if (last
|
|
16154
|
+
if (last?.obj && typeof last.obj[`${last.k}.${e2}`] !== "undefined") {
|
|
16111
16155
|
last.obj = void 0;
|
|
16112
16156
|
}
|
|
16113
16157
|
}
|
|
@@ -16127,6 +16171,7 @@ var getPath2 = (object, path) => {
|
|
|
16127
16171
|
k
|
|
16128
16172
|
} = getLastOfPath2(object, path);
|
|
16129
16173
|
if (!obj) return void 0;
|
|
16174
|
+
if (!Object.prototype.hasOwnProperty.call(obj, k)) return void 0;
|
|
16130
16175
|
return obj[k];
|
|
16131
16176
|
};
|
|
16132
16177
|
var getPathWithDefaults = (data, defaultData, key) => {
|
|
@@ -16207,7 +16252,10 @@ var looksLikeObjectPath = (key, nsSeparator, keySeparator) => {
|
|
|
16207
16252
|
var deepFind = function(obj, path) {
|
|
16208
16253
|
let keySeparator = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
|
|
16209
16254
|
if (!obj) return void 0;
|
|
16210
|
-
if (obj[path])
|
|
16255
|
+
if (obj[path]) {
|
|
16256
|
+
if (!Object.prototype.hasOwnProperty.call(obj, path)) return void 0;
|
|
16257
|
+
return obj[path];
|
|
16258
|
+
}
|
|
16211
16259
|
const tokens = path.split(keySeparator);
|
|
16212
16260
|
let current = obj;
|
|
16213
16261
|
for (let i2 = 0; i2 < tokens.length; ) {
|
|
@@ -16234,7 +16282,7 @@ var deepFind = function(obj, path) {
|
|
|
16234
16282
|
}
|
|
16235
16283
|
return current;
|
|
16236
16284
|
};
|
|
16237
|
-
var getCleanedCode = (code) => code
|
|
16285
|
+
var getCleanedCode = (code) => code?.replace("_", "-");
|
|
16238
16286
|
var consoleLogger = {
|
|
16239
16287
|
type: "logger",
|
|
16240
16288
|
log(args) {
|
|
@@ -16247,7 +16295,7 @@ var consoleLogger = {
|
|
|
16247
16295
|
this.output("error", args);
|
|
16248
16296
|
},
|
|
16249
16297
|
output(type, args) {
|
|
16250
|
-
|
|
16298
|
+
console?.[type]?.apply?.(console, args);
|
|
16251
16299
|
}
|
|
16252
16300
|
};
|
|
16253
16301
|
var Logger = class _Logger {
|
|
@@ -16403,7 +16451,7 @@ var ResourceStore = class extends EventEmitter {
|
|
|
16403
16451
|
key = path.slice(2).join(".");
|
|
16404
16452
|
}
|
|
16405
16453
|
if (result || !ignoreJSONStructure || !isString2(key)) return result;
|
|
16406
|
-
return deepFind(this.data
|
|
16454
|
+
return deepFind(this.data?.[lng]?.[ns], key, keySeparator);
|
|
16407
16455
|
}
|
|
16408
16456
|
addResource(lng, ns, key, value2) {
|
|
16409
16457
|
let options = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
@@ -16470,10 +16518,6 @@ var ResourceStore = class extends EventEmitter {
|
|
|
16470
16518
|
}
|
|
16471
16519
|
getResourceBundle(lng, ns) {
|
|
16472
16520
|
if (!ns) ns = this.options.defaultNS;
|
|
16473
|
-
if (this.options.compatibilityAPI === "v1") return {
|
|
16474
|
-
...{},
|
|
16475
|
-
...this.getResource(lng, ns)
|
|
16476
|
-
};
|
|
16477
16521
|
return this.getResource(lng, ns);
|
|
16478
16522
|
}
|
|
16479
16523
|
getDataByLanguage(lng) {
|
|
@@ -16495,7 +16539,7 @@ var postProcessor = {
|
|
|
16495
16539
|
},
|
|
16496
16540
|
handle(processors, value2, key, options, translator) {
|
|
16497
16541
|
processors.forEach((processor) => {
|
|
16498
|
-
|
|
16542
|
+
value2 = this.processors[processor]?.process(value2, key, options, translator) ?? value2;
|
|
16499
16543
|
});
|
|
16500
16544
|
return value2;
|
|
16501
16545
|
}
|
|
@@ -16519,11 +16563,11 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16519
16563
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
16520
16564
|
interpolation: {}
|
|
16521
16565
|
};
|
|
16522
|
-
if (key
|
|
16566
|
+
if (key == null) {
|
|
16523
16567
|
return false;
|
|
16524
16568
|
}
|
|
16525
16569
|
const resolved = this.resolve(key, options);
|
|
16526
|
-
return resolved
|
|
16570
|
+
return resolved?.res !== void 0;
|
|
16527
16571
|
}
|
|
16528
16572
|
extractFromKey(key, options) {
|
|
16529
16573
|
let nsSeparator = options.nsSeparator !== void 0 ? options.nsSeparator : this.options.nsSeparator;
|
|
@@ -16557,7 +16601,7 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16557
16601
|
...options
|
|
16558
16602
|
};
|
|
16559
16603
|
if (!options) options = {};
|
|
16560
|
-
if (keys
|
|
16604
|
+
if (keys == null) return "";
|
|
16561
16605
|
if (!Array.isArray(keys)) keys = [String(keys)];
|
|
16562
16606
|
const returnDetails = options.returnDetails !== void 0 ? options.returnDetails : this.options.returnDetails;
|
|
16563
16607
|
const keySeparator = options.keySeparator !== void 0 ? options.keySeparator : this.options.keySeparator;
|
|
@@ -16568,7 +16612,7 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16568
16612
|
const namespace = namespaces[namespaces.length - 1];
|
|
16569
16613
|
const lng = options.lng || this.language;
|
|
16570
16614
|
const appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
16571
|
-
if (lng
|
|
16615
|
+
if (lng?.toLowerCase() === "cimode") {
|
|
16572
16616
|
if (appendNamespaceToCIMode) {
|
|
16573
16617
|
const nsSeparator = options.nsSeparator || this.options.nsSeparator;
|
|
16574
16618
|
if (returnDetails) {
|
|
@@ -16596,9 +16640,9 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16596
16640
|
return key;
|
|
16597
16641
|
}
|
|
16598
16642
|
const resolved = this.resolve(keys, options);
|
|
16599
|
-
let res = resolved
|
|
16600
|
-
const resUsedKey = resolved
|
|
16601
|
-
const resExactUsedKey = resolved
|
|
16643
|
+
let res = resolved?.res;
|
|
16644
|
+
const resUsedKey = resolved?.usedKey || key;
|
|
16645
|
+
const resExactUsedKey = resolved?.exactUsedKey || key;
|
|
16602
16646
|
const resType = Object.prototype.toString.apply(res);
|
|
16603
16647
|
const noObject = ["[object Number]", "[object Function]", "[object RegExp]"];
|
|
16604
16648
|
const joinArrays = options.joinArrays !== void 0 ? options.joinArrays : this.options.joinArrays;
|
|
@@ -16651,7 +16695,7 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16651
16695
|
const defaultValueSuffixOrdinalFallback = options.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, {
|
|
16652
16696
|
ordinal: false
|
|
16653
16697
|
}) : "";
|
|
16654
|
-
const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0
|
|
16698
|
+
const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0;
|
|
16655
16699
|
const defaultValue = needsZeroSuffixLookup && options[`defaultValue${this.options.pluralSeparator}zero`] || options[`defaultValue${defaultValueSuffix}`] || options[`defaultValue${defaultValueSuffixOrdinalFallback}`] || options.defaultValue;
|
|
16656
16700
|
if (!this.isValidLookup(res) && hasDefaultValue) {
|
|
16657
16701
|
usedDefault = true;
|
|
@@ -16688,7 +16732,7 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16688
16732
|
const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;
|
|
16689
16733
|
if (this.options.missingKeyHandler) {
|
|
16690
16734
|
this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, options);
|
|
16691
|
-
} else if (this.backendConnector
|
|
16735
|
+
} else if (this.backendConnector?.saveMissing) {
|
|
16692
16736
|
this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, options);
|
|
16693
16737
|
}
|
|
16694
16738
|
this.emit("missingKey", l, namespace, k, res);
|
|
@@ -16712,11 +16756,7 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16712
16756
|
res = this.extendTranslation(res, keys, options, resolved, lastKey);
|
|
16713
16757
|
if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = `${namespace}:${key}`;
|
|
16714
16758
|
if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {
|
|
16715
|
-
|
|
16716
|
-
res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}:${key}` : key, usedDefault ? res : void 0);
|
|
16717
|
-
} else {
|
|
16718
|
-
res = this.options.parseMissingKeyHandler(res);
|
|
16719
|
-
}
|
|
16759
|
+
res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}:${key}` : key, usedDefault ? res : void 0);
|
|
16720
16760
|
}
|
|
16721
16761
|
}
|
|
16722
16762
|
if (returnDetails) {
|
|
@@ -16728,7 +16768,7 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16728
16768
|
}
|
|
16729
16769
|
extendTranslation(res, key, options, resolved, lastKey) {
|
|
16730
16770
|
var _this = this;
|
|
16731
|
-
if (this.i18nFormat
|
|
16771
|
+
if (this.i18nFormat?.parse) {
|
|
16732
16772
|
res = this.i18nFormat.parse(res, {
|
|
16733
16773
|
...this.options.interpolation.defaultVariables,
|
|
16734
16774
|
...options
|
|
@@ -16745,7 +16785,7 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16745
16785
|
}
|
|
16746
16786
|
}
|
|
16747
16787
|
});
|
|
16748
|
-
const skipOnVariables = isString2(res) && (options
|
|
16788
|
+
const skipOnVariables = isString2(res) && (options?.interpolation?.skipOnVariables !== void 0 ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
16749
16789
|
let nestBef;
|
|
16750
16790
|
if (skipOnVariables) {
|
|
16751
16791
|
const nb = res.match(this.interpolator.nestingRegexp);
|
|
@@ -16762,12 +16802,12 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16762
16802
|
const nestAft = na && na.length;
|
|
16763
16803
|
if (nestBef < nestAft) options.nest = false;
|
|
16764
16804
|
}
|
|
16765
|
-
if (!options.lng &&
|
|
16805
|
+
if (!options.lng && resolved && resolved.res) options.lng = this.language || resolved.usedLng;
|
|
16766
16806
|
if (options.nest !== false) res = this.interpolator.nest(res, function() {
|
|
16767
16807
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16768
16808
|
args[_key] = arguments[_key];
|
|
16769
16809
|
}
|
|
16770
|
-
if (lastKey
|
|
16810
|
+
if (lastKey?.[0] === args[0] && !options.context) {
|
|
16771
16811
|
_this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);
|
|
16772
16812
|
return null;
|
|
16773
16813
|
}
|
|
@@ -16777,7 +16817,7 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16777
16817
|
}
|
|
16778
16818
|
const postProcess = options.postProcess || this.options.postProcess;
|
|
16779
16819
|
const postProcessorNames = isString2(postProcess) ? [postProcess] : postProcess;
|
|
16780
|
-
if (res
|
|
16820
|
+
if (res != null && postProcessorNames?.length && options.applyPostProcessor !== false) {
|
|
16781
16821
|
res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {
|
|
16782
16822
|
i18nResolved: {
|
|
16783
16823
|
...resolved,
|
|
@@ -16804,13 +16844,13 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16804
16844
|
let namespaces = extracted.namespaces;
|
|
16805
16845
|
if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);
|
|
16806
16846
|
const needsPluralHandling = options.count !== void 0 && !isString2(options.count);
|
|
16807
|
-
const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0
|
|
16847
|
+
const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0;
|
|
16808
16848
|
const needsContextHandling = options.context !== void 0 && (isString2(options.context) || typeof options.context === "number") && options.context !== "";
|
|
16809
16849
|
const codes = options.lngs ? options.lngs : this.languageUtils.toResolveHierarchy(options.lng || this.language, options.fallbackLng);
|
|
16810
16850
|
namespaces.forEach((ns) => {
|
|
16811
16851
|
if (this.isValidLookup(found)) return;
|
|
16812
16852
|
usedNS = ns;
|
|
16813
|
-
if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils
|
|
16853
|
+
if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {
|
|
16814
16854
|
checkedLoadedFor[`${codes[0]}-${ns}`] = true;
|
|
16815
16855
|
this.logger.warn(`key "${usedKey}" for languages "${codes.join(", ")}" won't get resolved as namespace "${usedNS}" 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!!!");
|
|
16816
16856
|
}
|
|
@@ -16818,7 +16858,7 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16818
16858
|
if (this.isValidLookup(found)) return;
|
|
16819
16859
|
usedLng = code;
|
|
16820
16860
|
const finalKeys = [key];
|
|
16821
|
-
if (this.i18nFormat
|
|
16861
|
+
if (this.i18nFormat?.addLookupKeys) {
|
|
16822
16862
|
this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);
|
|
16823
16863
|
} else {
|
|
16824
16864
|
let pluralSuffix;
|
|
@@ -16871,7 +16911,7 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16871
16911
|
}
|
|
16872
16912
|
getResource(code, ns, key) {
|
|
16873
16913
|
let options = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
16874
|
-
if (this.i18nFormat
|
|
16914
|
+
if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);
|
|
16875
16915
|
return this.resourceStore.getResource(code, ns, key, options);
|
|
16876
16916
|
}
|
|
16877
16917
|
getUsedParamsDetails() {
|
|
@@ -16908,7 +16948,6 @@ var Translator = class _Translator extends EventEmitter {
|
|
|
16908
16948
|
return false;
|
|
16909
16949
|
}
|
|
16910
16950
|
};
|
|
16911
|
-
var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
|
|
16912
16951
|
var LanguageUtil = class {
|
|
16913
16952
|
constructor(options) {
|
|
16914
16953
|
this.options = options;
|
|
@@ -16932,32 +16971,19 @@ var LanguageUtil = class {
|
|
|
16932
16971
|
}
|
|
16933
16972
|
formatLanguageCode(code) {
|
|
16934
16973
|
if (isString2(code) && code.indexOf("-") > -1) {
|
|
16935
|
-
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
} catch (e2) {
|
|
16943
|
-
}
|
|
16974
|
+
let formattedCode;
|
|
16975
|
+
try {
|
|
16976
|
+
formattedCode = Intl.getCanonicalLocales(code)[0];
|
|
16977
|
+
} catch (e2) {
|
|
16978
|
+
}
|
|
16979
|
+
if (formattedCode && this.options.lowerCaseLng) {
|
|
16980
|
+
formattedCode = formattedCode.toLowerCase();
|
|
16944
16981
|
}
|
|
16945
|
-
|
|
16946
|
-
let p = code.split("-");
|
|
16982
|
+
if (formattedCode) return formattedCode;
|
|
16947
16983
|
if (this.options.lowerCaseLng) {
|
|
16948
|
-
|
|
16949
|
-
}
|
|
16950
|
-
|
|
16951
|
-
p[1] = p[1].toUpperCase();
|
|
16952
|
-
if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
|
|
16953
|
-
} else if (p.length === 3) {
|
|
16954
|
-
p[0] = p[0].toLowerCase();
|
|
16955
|
-
if (p[1].length === 2) p[1] = p[1].toUpperCase();
|
|
16956
|
-
if (p[0] !== "sgn" && p[2].length === 2) p[2] = p[2].toUpperCase();
|
|
16957
|
-
if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
|
|
16958
|
-
if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());
|
|
16959
|
-
}
|
|
16960
|
-
return p.join("-");
|
|
16984
|
+
return code.toLowerCase();
|
|
16985
|
+
}
|
|
16986
|
+
return code;
|
|
16961
16987
|
}
|
|
16962
16988
|
return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;
|
|
16963
16989
|
}
|
|
@@ -17028,125 +17054,6 @@ var LanguageUtil = class {
|
|
|
17028
17054
|
return codes;
|
|
17029
17055
|
}
|
|
17030
17056
|
};
|
|
17031
|
-
var sets = [{
|
|
17032
|
-
lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
|
|
17033
|
-
nr: [1, 2],
|
|
17034
|
-
fc: 1
|
|
17035
|
-
}, {
|
|
17036
|
-
lngs: ["af", "an", "ast", "az", "bg", "bn", "ca", "da", "de", "dev", "el", "en", "eo", "es", "et", "eu", "fi", "fo", "fur", "fy", "gl", "gu", "ha", "hi", "hu", "hy", "ia", "it", "kk", "kn", "ku", "lb", "mai", "ml", "mn", "mr", "nah", "nap", "nb", "ne", "nl", "nn", "no", "nso", "pa", "pap", "pms", "ps", "pt-PT", "rm", "sco", "se", "si", "so", "son", "sq", "sv", "sw", "ta", "te", "tk", "ur", "yo"],
|
|
17037
|
-
nr: [1, 2],
|
|
17038
|
-
fc: 2
|
|
17039
|
-
}, {
|
|
17040
|
-
lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"],
|
|
17041
|
-
nr: [1],
|
|
17042
|
-
fc: 3
|
|
17043
|
-
}, {
|
|
17044
|
-
lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"],
|
|
17045
|
-
nr: [1, 2, 5],
|
|
17046
|
-
fc: 4
|
|
17047
|
-
}, {
|
|
17048
|
-
lngs: ["ar"],
|
|
17049
|
-
nr: [0, 1, 2, 3, 11, 100],
|
|
17050
|
-
fc: 5
|
|
17051
|
-
}, {
|
|
17052
|
-
lngs: ["cs", "sk"],
|
|
17053
|
-
nr: [1, 2, 5],
|
|
17054
|
-
fc: 6
|
|
17055
|
-
}, {
|
|
17056
|
-
lngs: ["csb", "pl"],
|
|
17057
|
-
nr: [1, 2, 5],
|
|
17058
|
-
fc: 7
|
|
17059
|
-
}, {
|
|
17060
|
-
lngs: ["cy"],
|
|
17061
|
-
nr: [1, 2, 3, 8],
|
|
17062
|
-
fc: 8
|
|
17063
|
-
}, {
|
|
17064
|
-
lngs: ["fr"],
|
|
17065
|
-
nr: [1, 2],
|
|
17066
|
-
fc: 9
|
|
17067
|
-
}, {
|
|
17068
|
-
lngs: ["ga"],
|
|
17069
|
-
nr: [1, 2, 3, 7, 11],
|
|
17070
|
-
fc: 10
|
|
17071
|
-
}, {
|
|
17072
|
-
lngs: ["gd"],
|
|
17073
|
-
nr: [1, 2, 3, 20],
|
|
17074
|
-
fc: 11
|
|
17075
|
-
}, {
|
|
17076
|
-
lngs: ["is"],
|
|
17077
|
-
nr: [1, 2],
|
|
17078
|
-
fc: 12
|
|
17079
|
-
}, {
|
|
17080
|
-
lngs: ["jv"],
|
|
17081
|
-
nr: [0, 1],
|
|
17082
|
-
fc: 13
|
|
17083
|
-
}, {
|
|
17084
|
-
lngs: ["kw"],
|
|
17085
|
-
nr: [1, 2, 3, 4],
|
|
17086
|
-
fc: 14
|
|
17087
|
-
}, {
|
|
17088
|
-
lngs: ["lt"],
|
|
17089
|
-
nr: [1, 2, 10],
|
|
17090
|
-
fc: 15
|
|
17091
|
-
}, {
|
|
17092
|
-
lngs: ["lv"],
|
|
17093
|
-
nr: [1, 2, 0],
|
|
17094
|
-
fc: 16
|
|
17095
|
-
}, {
|
|
17096
|
-
lngs: ["mk"],
|
|
17097
|
-
nr: [1, 2],
|
|
17098
|
-
fc: 17
|
|
17099
|
-
}, {
|
|
17100
|
-
lngs: ["mnk"],
|
|
17101
|
-
nr: [0, 1, 2],
|
|
17102
|
-
fc: 18
|
|
17103
|
-
}, {
|
|
17104
|
-
lngs: ["mt"],
|
|
17105
|
-
nr: [1, 2, 11, 20],
|
|
17106
|
-
fc: 19
|
|
17107
|
-
}, {
|
|
17108
|
-
lngs: ["or"],
|
|
17109
|
-
nr: [2, 1],
|
|
17110
|
-
fc: 2
|
|
17111
|
-
}, {
|
|
17112
|
-
lngs: ["ro"],
|
|
17113
|
-
nr: [1, 2, 20],
|
|
17114
|
-
fc: 20
|
|
17115
|
-
}, {
|
|
17116
|
-
lngs: ["sl"],
|
|
17117
|
-
nr: [5, 1, 2, 3],
|
|
17118
|
-
fc: 21
|
|
17119
|
-
}, {
|
|
17120
|
-
lngs: ["he", "iw"],
|
|
17121
|
-
nr: [1, 2, 20, 21],
|
|
17122
|
-
fc: 22
|
|
17123
|
-
}];
|
|
17124
|
-
var _rulesPluralsTypes = {
|
|
17125
|
-
1: (n2) => Number(n2 > 1),
|
|
17126
|
-
2: (n2) => Number(n2 != 1),
|
|
17127
|
-
3: (n2) => 0,
|
|
17128
|
-
4: (n2) => Number(n2 % 10 == 1 && n2 % 100 != 11 ? 0 : n2 % 10 >= 2 && n2 % 10 <= 4 && (n2 % 100 < 10 || n2 % 100 >= 20) ? 1 : 2),
|
|
17129
|
-
5: (n2) => Number(n2 == 0 ? 0 : n2 == 1 ? 1 : n2 == 2 ? 2 : n2 % 100 >= 3 && n2 % 100 <= 10 ? 3 : n2 % 100 >= 11 ? 4 : 5),
|
|
17130
|
-
6: (n2) => Number(n2 == 1 ? 0 : n2 >= 2 && n2 <= 4 ? 1 : 2),
|
|
17131
|
-
7: (n2) => Number(n2 == 1 ? 0 : n2 % 10 >= 2 && n2 % 10 <= 4 && (n2 % 100 < 10 || n2 % 100 >= 20) ? 1 : 2),
|
|
17132
|
-
8: (n2) => Number(n2 == 1 ? 0 : n2 == 2 ? 1 : n2 != 8 && n2 != 11 ? 2 : 3),
|
|
17133
|
-
9: (n2) => Number(n2 >= 2),
|
|
17134
|
-
10: (n2) => Number(n2 == 1 ? 0 : n2 == 2 ? 1 : n2 < 7 ? 2 : n2 < 11 ? 3 : 4),
|
|
17135
|
-
11: (n2) => Number(n2 == 1 || n2 == 11 ? 0 : n2 == 2 || n2 == 12 ? 1 : n2 > 2 && n2 < 20 ? 2 : 3),
|
|
17136
|
-
12: (n2) => Number(n2 % 10 != 1 || n2 % 100 == 11),
|
|
17137
|
-
13: (n2) => Number(n2 !== 0),
|
|
17138
|
-
14: (n2) => Number(n2 == 1 ? 0 : n2 == 2 ? 1 : n2 == 3 ? 2 : 3),
|
|
17139
|
-
15: (n2) => Number(n2 % 10 == 1 && n2 % 100 != 11 ? 0 : n2 % 10 >= 2 && (n2 % 100 < 10 || n2 % 100 >= 20) ? 1 : 2),
|
|
17140
|
-
16: (n2) => Number(n2 % 10 == 1 && n2 % 100 != 11 ? 0 : n2 !== 0 ? 1 : 2),
|
|
17141
|
-
17: (n2) => Number(n2 == 1 || n2 % 10 == 1 && n2 % 100 != 11 ? 0 : 1),
|
|
17142
|
-
18: (n2) => Number(n2 == 0 ? 0 : n2 == 1 ? 1 : 2),
|
|
17143
|
-
19: (n2) => Number(n2 == 1 ? 0 : n2 == 0 || n2 % 100 > 1 && n2 % 100 < 11 ? 1 : n2 % 100 > 10 && n2 % 100 < 20 ? 2 : 3),
|
|
17144
|
-
20: (n2) => Number(n2 == 1 ? 0 : n2 == 0 || n2 % 100 > 0 && n2 % 100 < 20 ? 1 : 2),
|
|
17145
|
-
21: (n2) => Number(n2 % 100 == 1 ? 1 : n2 % 100 == 2 ? 2 : n2 % 100 == 3 || n2 % 100 == 4 ? 3 : 0),
|
|
17146
|
-
22: (n2) => Number(n2 == 1 ? 0 : n2 == 2 ? 1 : (n2 < 0 || n2 > 10) && n2 % 10 == 0 ? 2 : 3)
|
|
17147
|
-
};
|
|
17148
|
-
var nonIntlVersions = ["v1", "v2", "v3"];
|
|
17149
|
-
var intlVersions = ["v4"];
|
|
17150
17057
|
var suffixesOrder = {
|
|
17151
17058
|
zero: 0,
|
|
17152
17059
|
one: 1,
|
|
@@ -17155,17 +17062,11 @@ var suffixesOrder = {
|
|
|
17155
17062
|
many: 4,
|
|
17156
17063
|
other: 5
|
|
17157
17064
|
};
|
|
17158
|
-
var
|
|
17159
|
-
|
|
17160
|
-
|
|
17161
|
-
|
|
17162
|
-
|
|
17163
|
-
numbers: set.nr,
|
|
17164
|
-
plurals: _rulesPluralsTypes[set.fc]
|
|
17165
|
-
};
|
|
17166
|
-
});
|
|
17167
|
-
});
|
|
17168
|
-
return rules;
|
|
17065
|
+
var dummyRule = {
|
|
17066
|
+
select: (count) => count === 1 ? "one" : "other",
|
|
17067
|
+
resolvedOptions: () => ({
|
|
17068
|
+
pluralCategories: ["one", "other"]
|
|
17069
|
+
})
|
|
17169
17070
|
};
|
|
17170
17071
|
var PluralResolver = class {
|
|
17171
17072
|
constructor(languageUtils) {
|
|
@@ -17173,11 +17074,6 @@ var PluralResolver = class {
|
|
|
17173
17074
|
this.languageUtils = languageUtils;
|
|
17174
17075
|
this.options = options;
|
|
17175
17076
|
this.logger = baseLogger.create("pluralResolver");
|
|
17176
|
-
if ((!this.options.compatibilityJSON || intlVersions.includes(this.options.compatibilityJSON)) && (typeof Intl === "undefined" || !Intl.PluralRules)) {
|
|
17177
|
-
this.options.compatibilityJSON = "v3";
|
|
17178
|
-
this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.");
|
|
17179
|
-
}
|
|
17180
|
-
this.rules = createRules();
|
|
17181
17077
|
this.pluralRulesCache = {};
|
|
17182
17078
|
}
|
|
17183
17079
|
addRule(lng, obj) {
|
|
@@ -17188,38 +17084,37 @@ var PluralResolver = class {
|
|
|
17188
17084
|
}
|
|
17189
17085
|
getRule(code) {
|
|
17190
17086
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
17191
|
-
|
|
17192
|
-
|
|
17193
|
-
|
|
17194
|
-
|
|
17195
|
-
|
|
17087
|
+
const cleanedCode = getCleanedCode(code === "dev" ? "en" : code);
|
|
17088
|
+
const type = options.ordinal ? "ordinal" : "cardinal";
|
|
17089
|
+
const cacheKey = JSON.stringify({
|
|
17090
|
+
cleanedCode,
|
|
17091
|
+
type
|
|
17092
|
+
});
|
|
17093
|
+
if (cacheKey in this.pluralRulesCache) {
|
|
17094
|
+
return this.pluralRulesCache[cacheKey];
|
|
17095
|
+
}
|
|
17096
|
+
let rule;
|
|
17097
|
+
try {
|
|
17098
|
+
rule = new Intl.PluralRules(cleanedCode, {
|
|
17196
17099
|
type
|
|
17197
17100
|
});
|
|
17198
|
-
|
|
17199
|
-
|
|
17200
|
-
|
|
17201
|
-
|
|
17202
|
-
try {
|
|
17203
|
-
rule = new Intl.PluralRules(cleanedCode, {
|
|
17204
|
-
type
|
|
17205
|
-
});
|
|
17206
|
-
} catch (err) {
|
|
17207
|
-
if (!code.match(/-|_/)) return;
|
|
17208
|
-
const lngPart = this.languageUtils.getLanguagePartFromCode(code);
|
|
17209
|
-
rule = this.getRule(lngPart, options);
|
|
17101
|
+
} catch (err) {
|
|
17102
|
+
if (!Intl) {
|
|
17103
|
+
this.logger.error("No Intl support, please use an Intl polyfill!");
|
|
17104
|
+
return dummyRule;
|
|
17210
17105
|
}
|
|
17211
|
-
|
|
17212
|
-
|
|
17106
|
+
if (!code.match(/-|_/)) return dummyRule;
|
|
17107
|
+
const lngPart = this.languageUtils.getLanguagePartFromCode(code);
|
|
17108
|
+
rule = this.getRule(lngPart, options);
|
|
17213
17109
|
}
|
|
17214
|
-
|
|
17110
|
+
this.pluralRulesCache[cacheKey] = rule;
|
|
17111
|
+
return rule;
|
|
17215
17112
|
}
|
|
17216
17113
|
needsPlural(code) {
|
|
17217
17114
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
17218
|
-
|
|
17219
|
-
if (this.
|
|
17220
|
-
|
|
17221
|
-
}
|
|
17222
|
-
return rule && rule.numbers.length > 1;
|
|
17115
|
+
let rule = this.getRule(code, options);
|
|
17116
|
+
if (!rule) rule = this.getRule("dev", options);
|
|
17117
|
+
return rule?.resolvedOptions().pluralCategories.length > 1;
|
|
17223
17118
|
}
|
|
17224
17119
|
getPluralFormsOfKey(code, key) {
|
|
17225
17120
|
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
@@ -17227,51 +17122,19 @@ var PluralResolver = class {
|
|
|
17227
17122
|
}
|
|
17228
17123
|
getSuffixes(code) {
|
|
17229
17124
|
let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
17230
|
-
|
|
17231
|
-
if (!rule)
|
|
17232
|
-
|
|
17233
|
-
}
|
|
17234
|
-
if (this.shouldUseIntlApi()) {
|
|
17235
|
-
return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map((pluralCategory) => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ""}${pluralCategory}`);
|
|
17236
|
-
}
|
|
17237
|
-
return rule.numbers.map((number) => this.getSuffix(code, number, options));
|
|
17125
|
+
let rule = this.getRule(code, options);
|
|
17126
|
+
if (!rule) rule = this.getRule("dev", options);
|
|
17127
|
+
if (!rule) return [];
|
|
17128
|
+
return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map((pluralCategory) => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ""}${pluralCategory}`);
|
|
17238
17129
|
}
|
|
17239
17130
|
getSuffix(code, count) {
|
|
17240
17131
|
let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
17241
17132
|
const rule = this.getRule(code, options);
|
|
17242
17133
|
if (rule) {
|
|
17243
|
-
|
|
17244
|
-
return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ""}${rule.select(count)}`;
|
|
17245
|
-
}
|
|
17246
|
-
return this.getSuffixRetroCompatible(rule, count);
|
|
17134
|
+
return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ""}${rule.select(count)}`;
|
|
17247
17135
|
}
|
|
17248
17136
|
this.logger.warn(`no plural rule found for: ${code}`);
|
|
17249
|
-
return "";
|
|
17250
|
-
}
|
|
17251
|
-
getSuffixRetroCompatible(rule, count) {
|
|
17252
|
-
const idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));
|
|
17253
|
-
let suffix = rule.numbers[idx];
|
|
17254
|
-
if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
|
|
17255
|
-
if (suffix === 2) {
|
|
17256
|
-
suffix = "plural";
|
|
17257
|
-
} else if (suffix === 1) {
|
|
17258
|
-
suffix = "";
|
|
17259
|
-
}
|
|
17260
|
-
}
|
|
17261
|
-
const returnSuffix = () => this.options.prepend && suffix.toString() ? this.options.prepend + suffix.toString() : suffix.toString();
|
|
17262
|
-
if (this.options.compatibilityJSON === "v1") {
|
|
17263
|
-
if (suffix === 1) return "";
|
|
17264
|
-
if (typeof suffix === "number") return `_plural_${suffix.toString()}`;
|
|
17265
|
-
return returnSuffix();
|
|
17266
|
-
} else if (this.options.compatibilityJSON === "v2") {
|
|
17267
|
-
return returnSuffix();
|
|
17268
|
-
} else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
|
|
17269
|
-
return returnSuffix();
|
|
17270
|
-
}
|
|
17271
|
-
return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();
|
|
17272
|
-
}
|
|
17273
|
-
shouldUseIntlApi() {
|
|
17274
|
-
return !nonIntlVersions.includes(this.options.compatibilityJSON);
|
|
17137
|
+
return this.getSuffix("dev", count, options);
|
|
17275
17138
|
}
|
|
17276
17139
|
};
|
|
17277
17140
|
var deepFindWithDefaults = function(data, defaultData, key) {
|
|
@@ -17290,7 +17153,7 @@ var Interpolator = class {
|
|
|
17290
17153
|
let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
17291
17154
|
this.logger = baseLogger.create("interpolator");
|
|
17292
17155
|
this.options = options;
|
|
17293
|
-
this.format = options
|
|
17156
|
+
this.format = options?.interpolation?.format || ((value2) => value2);
|
|
17294
17157
|
this.init(options);
|
|
17295
17158
|
}
|
|
17296
17159
|
init() {
|
|
@@ -17337,7 +17200,7 @@ var Interpolator = class {
|
|
|
17337
17200
|
}
|
|
17338
17201
|
resetRegExp() {
|
|
17339
17202
|
const getOrResetRegExp = (existingRegExp, pattern) => {
|
|
17340
|
-
if (existingRegExp
|
|
17203
|
+
if (existingRegExp?.source === pattern) {
|
|
17341
17204
|
existingRegExp.lastIndex = 0;
|
|
17342
17205
|
return existingRegExp;
|
|
17343
17206
|
}
|
|
@@ -17371,8 +17234,8 @@ var Interpolator = class {
|
|
|
17371
17234
|
});
|
|
17372
17235
|
};
|
|
17373
17236
|
this.resetRegExp();
|
|
17374
|
-
const missingInterpolationHandler = options
|
|
17375
|
-
const skipOnVariables = options
|
|
17237
|
+
const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;
|
|
17238
|
+
const skipOnVariables = options?.interpolation?.skipOnVariables !== void 0 ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
17376
17239
|
const todos = [{
|
|
17377
17240
|
regex: this.regexpUnescape,
|
|
17378
17241
|
safeValue: (val) => regexSafe(val)
|
|
@@ -17431,7 +17294,7 @@ var Interpolator = class {
|
|
|
17431
17294
|
optionsString = this.interpolate(optionsString, clonedOptions);
|
|
17432
17295
|
const matchedSingleQuotes = optionsString.match(/'/g);
|
|
17433
17296
|
const matchedDoubleQuotes = optionsString.match(/"/g);
|
|
17434
|
-
if (matchedSingleQuotes
|
|
17297
|
+
if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {
|
|
17435
17298
|
optionsString = optionsString.replace(/'/g, '"');
|
|
17436
17299
|
}
|
|
17437
17300
|
try {
|
|
@@ -17598,7 +17461,7 @@ var Formatter = class {
|
|
|
17598
17461
|
if (this.formats[formatName]) {
|
|
17599
17462
|
let formatted = mem;
|
|
17600
17463
|
try {
|
|
17601
|
-
const valOptions = options
|
|
17464
|
+
const valOptions = options?.formatParams?.[options.interpolationkey] || {};
|
|
17602
17465
|
const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;
|
|
17603
17466
|
formatted = this.formats[formatName](mem, l, {
|
|
17604
17467
|
...formatOptions,
|
|
@@ -17640,9 +17503,7 @@ var Connector = class extends EventEmitter {
|
|
|
17640
17503
|
this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;
|
|
17641
17504
|
this.state = {};
|
|
17642
17505
|
this.queue = [];
|
|
17643
|
-
|
|
17644
|
-
this.backend.init(services, options.backend, options);
|
|
17645
|
-
}
|
|
17506
|
+
this.backend?.init?.(services, options.backend, options);
|
|
17646
17507
|
}
|
|
17647
17508
|
queueLoad(languages, namespaces, options, callback) {
|
|
17648
17509
|
const toLoad = {};
|
|
@@ -17810,12 +17671,12 @@ var Connector = class extends EventEmitter {
|
|
|
17810
17671
|
let options = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
|
|
17811
17672
|
let clb = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
|
|
17812
17673
|
};
|
|
17813
|
-
if (this.services
|
|
17674
|
+
if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {
|
|
17814
17675
|
this.logger.warn(`did not save key "${key}" as the namespace "${namespace}" 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!!!");
|
|
17815
17676
|
return;
|
|
17816
17677
|
}
|
|
17817
17678
|
if (key === void 0 || key === null || key === "") return;
|
|
17818
|
-
if (this.backend
|
|
17679
|
+
if (this.backend?.create) {
|
|
17819
17680
|
const opts = {
|
|
17820
17681
|
...options,
|
|
17821
17682
|
isUpdate
|
|
@@ -17847,7 +17708,7 @@ var Connector = class extends EventEmitter {
|
|
|
17847
17708
|
};
|
|
17848
17709
|
var get = () => ({
|
|
17849
17710
|
debug: false,
|
|
17850
|
-
|
|
17711
|
+
initAsync: true,
|
|
17851
17712
|
ns: ["translation"],
|
|
17852
17713
|
defaultNS: ["translation"],
|
|
17853
17714
|
fallbackLng: ["dev"],
|
|
@@ -17909,9 +17770,10 @@ var transformOptions = (options) => {
|
|
|
17909
17770
|
if (isString2(options.ns)) options.ns = [options.ns];
|
|
17910
17771
|
if (isString2(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];
|
|
17911
17772
|
if (isString2(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];
|
|
17912
|
-
if (options.supportedLngs
|
|
17773
|
+
if (options.supportedLngs?.indexOf?.("cimode") < 0) {
|
|
17913
17774
|
options.supportedLngs = options.supportedLngs.concat(["cimode"]);
|
|
17914
17775
|
}
|
|
17776
|
+
if (typeof options.initImmediate === "boolean") options.initAsync = options.initImmediate;
|
|
17915
17777
|
return options;
|
|
17916
17778
|
};
|
|
17917
17779
|
var noop4 = () => {
|
|
@@ -17937,7 +17799,7 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
17937
17799
|
};
|
|
17938
17800
|
bindMemberFunctions(this);
|
|
17939
17801
|
if (callback && !this.isInitialized && !options.isClone) {
|
|
17940
|
-
if (!this.options.
|
|
17802
|
+
if (!this.options.initAsync) {
|
|
17941
17803
|
this.init(options, callback);
|
|
17942
17804
|
return this;
|
|
17943
17805
|
}
|
|
@@ -17955,7 +17817,7 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
17955
17817
|
callback = options;
|
|
17956
17818
|
options = {};
|
|
17957
17819
|
}
|
|
17958
|
-
if (
|
|
17820
|
+
if (options.defaultNS == null && options.ns) {
|
|
17959
17821
|
if (isString2(options.ns)) {
|
|
17960
17822
|
options.defaultNS = options.ns;
|
|
17961
17823
|
} else if (options.ns.indexOf("translation") < 0) {
|
|
@@ -17968,12 +17830,10 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
17968
17830
|
...this.options,
|
|
17969
17831
|
...transformOptions(options)
|
|
17970
17832
|
};
|
|
17971
|
-
|
|
17972
|
-
|
|
17973
|
-
|
|
17974
|
-
|
|
17975
|
-
};
|
|
17976
|
-
}
|
|
17833
|
+
this.options.interpolation = {
|
|
17834
|
+
...defOpts.interpolation,
|
|
17835
|
+
...this.options.interpolation
|
|
17836
|
+
};
|
|
17977
17837
|
if (options.keySeparator !== void 0) {
|
|
17978
17838
|
this.options.userDefinedKeySeparator = options.keySeparator;
|
|
17979
17839
|
}
|
|
@@ -17994,7 +17854,7 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
17994
17854
|
let formatter;
|
|
17995
17855
|
if (this.modules.formatter) {
|
|
17996
17856
|
formatter = this.modules.formatter;
|
|
17997
|
-
} else
|
|
17857
|
+
} else {
|
|
17998
17858
|
formatter = Formatter;
|
|
17999
17859
|
}
|
|
18000
17860
|
const lu = new LanguageUtil(this.options);
|
|
@@ -18005,7 +17865,6 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
18005
17865
|
s2.languageUtils = lu;
|
|
18006
17866
|
s2.pluralResolver = new PluralResolver(lu, {
|
|
18007
17867
|
prepend: this.options.pluralSeparator,
|
|
18008
|
-
compatibilityJSON: this.options.compatibilityJSON,
|
|
18009
17868
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
18010
17869
|
});
|
|
18011
17870
|
if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {
|
|
@@ -18076,10 +17935,10 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
18076
17935
|
deferred.resolve(t3);
|
|
18077
17936
|
callback(err, t3);
|
|
18078
17937
|
};
|
|
18079
|
-
if (this.languages &&
|
|
17938
|
+
if (this.languages && !this.isInitialized) return finish(null, this.t.bind(this));
|
|
18080
17939
|
this.changeLanguage(this.options.lng, finish);
|
|
18081
17940
|
};
|
|
18082
|
-
if (this.options.resources || !this.options.
|
|
17941
|
+
if (this.options.resources || !this.options.initAsync) {
|
|
18083
17942
|
load();
|
|
18084
17943
|
} else {
|
|
18085
17944
|
setTimeout(load, 0);
|
|
@@ -18092,7 +17951,7 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
18092
17951
|
const usedLng = isString2(language) ? language : this.language;
|
|
18093
17952
|
if (typeof language === "function") usedCallback = language;
|
|
18094
17953
|
if (!this.options.resources || this.options.partialBundledLanguages) {
|
|
18095
|
-
if (usedLng
|
|
17954
|
+
if (usedLng?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();
|
|
18096
17955
|
const toLoad = [];
|
|
18097
17956
|
const append = (lng) => {
|
|
18098
17957
|
if (!lng) return;
|
|
@@ -18109,9 +17968,7 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
18109
17968
|
} else {
|
|
18110
17969
|
append(usedLng);
|
|
18111
17970
|
}
|
|
18112
|
-
|
|
18113
|
-
this.options.preload.forEach((l) => append(l));
|
|
18114
|
-
}
|
|
17971
|
+
this.options.preload?.forEach?.((l) => append(l));
|
|
18115
17972
|
this.services.backendConnector.load(toLoad, this.options.ns, (e2) => {
|
|
18116
17973
|
if (!e2 && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);
|
|
18117
17974
|
usedCallback(e2);
|
|
@@ -18213,7 +18070,7 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
18213
18070
|
setLngProps(l);
|
|
18214
18071
|
}
|
|
18215
18072
|
if (!this.translator.language) this.translator.changeLanguage(l);
|
|
18216
|
-
|
|
18073
|
+
this.services.languageDetector?.cacheUserLanguage?.(l);
|
|
18217
18074
|
}
|
|
18218
18075
|
this.loadResources(l, (err) => {
|
|
18219
18076
|
done(err, l);
|
|
@@ -18269,10 +18126,16 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
18269
18126
|
return fixedT;
|
|
18270
18127
|
}
|
|
18271
18128
|
t() {
|
|
18272
|
-
|
|
18129
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
18130
|
+
args[_key4] = arguments[_key4];
|
|
18131
|
+
}
|
|
18132
|
+
return this.translator?.translate(...args);
|
|
18273
18133
|
}
|
|
18274
18134
|
exists() {
|
|
18275
|
-
|
|
18135
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
18136
|
+
args[_key5] = arguments[_key5];
|
|
18137
|
+
}
|
|
18138
|
+
return this.translator?.exists(...args);
|
|
18276
18139
|
}
|
|
18277
18140
|
setDefaultNamespace(ns) {
|
|
18278
18141
|
this.options.defaultNS = ns;
|
|
@@ -18337,10 +18200,10 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
18337
18200
|
return deferred;
|
|
18338
18201
|
}
|
|
18339
18202
|
dir(lng) {
|
|
18340
|
-
if (!lng) lng = this.resolvedLanguage || (this.languages
|
|
18203
|
+
if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);
|
|
18341
18204
|
if (!lng) return "rtl";
|
|
18342
18205
|
const rtlLngs = ["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"];
|
|
18343
|
-
const languageUtils = this.services
|
|
18206
|
+
const languageUtils = this.services?.languageUtils || new LanguageUtil(get());
|
|
18344
18207
|
return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
18345
18208
|
}
|
|
18346
18209
|
static createInstance() {
|
|
@@ -18375,13 +18238,24 @@ var I18n = class _I18n extends EventEmitter {
|
|
|
18375
18238
|
hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
|
|
18376
18239
|
};
|
|
18377
18240
|
if (forkResourceStore) {
|
|
18378
|
-
|
|
18241
|
+
const clonedData = Object.keys(this.store.data).reduce((prev, l) => {
|
|
18242
|
+
prev[l] = {
|
|
18243
|
+
...this.store.data[l]
|
|
18244
|
+
};
|
|
18245
|
+
return Object.keys(prev[l]).reduce((acc, n2) => {
|
|
18246
|
+
acc[n2] = {
|
|
18247
|
+
...prev[l][n2]
|
|
18248
|
+
};
|
|
18249
|
+
return acc;
|
|
18250
|
+
}, {});
|
|
18251
|
+
}, {});
|
|
18252
|
+
clone.store = new ResourceStore(clonedData, mergedOptions);
|
|
18379
18253
|
clone.services.resourceStore = clone.store;
|
|
18380
18254
|
}
|
|
18381
18255
|
clone.translator = new Translator(clone.services, mergedOptions);
|
|
18382
18256
|
clone.translator.on("*", function(event) {
|
|
18383
|
-
for (var
|
|
18384
|
-
args[
|
|
18257
|
+
for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
|
|
18258
|
+
args[_key6 - 1] = arguments[_key6];
|
|
18385
18259
|
}
|
|
18386
18260
|
clone.emit(event, ...args);
|
|
18387
18261
|
});
|
|
@@ -18444,8 +18318,8 @@ var I18nProvider = ({
|
|
|
18444
18318
|
messages,
|
|
18445
18319
|
i18n: initialI18n
|
|
18446
18320
|
}) => {
|
|
18447
|
-
const [i18n] = (0,
|
|
18448
|
-
return /* @__PURE__ */
|
|
18321
|
+
const [i18n] = (0, import_react56.useState)(() => initialI18n ?? createI18n(messages));
|
|
18322
|
+
return /* @__PURE__ */ import_react56.default.createElement(I18nextProvider, { i18n }, children);
|
|
18449
18323
|
};
|
|
18450
18324
|
|
|
18451
18325
|
// ../cli-i18n/src/index.ts
|
|
@@ -18466,6 +18340,7 @@ export {
|
|
|
18466
18340
|
Link,
|
|
18467
18341
|
Spinner2 as Spinner,
|
|
18468
18342
|
ErrorDetails,
|
|
18343
|
+
Notification,
|
|
18469
18344
|
useExit,
|
|
18470
18345
|
useAsync2 as useAsync,
|
|
18471
18346
|
useAsyncCallback3 as useAsyncCallback,
|
|
@@ -18523,4 +18398,4 @@ react-reconciler/cjs/react-reconciler-constants.production.min.js:
|
|
|
18523
18398
|
* LICENSE file in the root directory of this source tree.
|
|
18524
18399
|
*)
|
|
18525
18400
|
*/
|
|
18526
|
-
//# sourceMappingURL=chunk-
|
|
18401
|
+
//# sourceMappingURL=chunk-V4DAKO7L.js.map
|