@wix/cli 1.1.58 → 1.1.60

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.
Files changed (121) hide show
  1. package/build/{DevCommand-32POU3TX.js → DevCommand-AEGLMQVP.js} +15 -16
  2. package/build/{DevCommand-32POU3TX.js.map → DevCommand-AEGLMQVP.js.map} +1 -1
  3. package/build/DevCommand-GO3Z73V7.js +7561 -0
  4. package/build/DevCommand-GO3Z73V7.js.map +1 -0
  5. package/build/{LoginCommand-WRCKEWCE.js → LoginCommand-SGLKXJF6.js} +13 -13
  6. package/build/{LogoutCommand-BYWH527O.js → LogoutCommand-YL6M6BT7.js} +9 -9
  7. package/build/{WhoamiCommand-WKXZCRSJ.js → WhoamiCommand-4EJZYY4W.js} +5 -5
  8. package/build/{chunk-WZEZZAE4.js → chunk-24KEFD7K.js} +126 -70
  9. package/build/chunk-24KEFD7K.js.map +1 -0
  10. package/build/{chunk-Q5WMVJRK.js → chunk-2DE7QM5C.js} +2 -2
  11. package/build/{chunk-6F2RSXHN.js → chunk-2NWGTFAC.js} +3 -3
  12. package/build/{chunk-6F2RSXHN.js.map → chunk-2NWGTFAC.js.map} +1 -1
  13. package/build/{chunk-LOJ4G3VD.js → chunk-5XUFGBCU.js} +2 -2
  14. package/build/{chunk-WYEQRRT2.js → chunk-B23S4M74.js} +3422 -424
  15. package/build/chunk-B23S4M74.js.map +1 -0
  16. package/build/{chunk-IFQQVSBK.js → chunk-BGKFJNUK.js} +2 -2
  17. package/build/{chunk-53UCEZFU.js → chunk-BNWDAMAL.js} +175 -45
  18. package/build/chunk-BNWDAMAL.js.map +1 -0
  19. package/build/{chunk-3KIPOGXI.js → chunk-BVAC4BZH.js} +5 -5
  20. package/build/{chunk-UQXJQCG3.js → chunk-CRXPC3TE.js} +2 -2
  21. package/build/{chunk-4S2ZMDZM.js → chunk-DWEFYET4.js} +7 -7
  22. package/build/{chunk-24HYCAK2.js → chunk-EDNJGHVN.js} +10 -5
  23. package/build/chunk-EDNJGHVN.js.map +1 -0
  24. package/build/{chunk-3R4OZ46Z.js → chunk-G6TDIUNY.js} +2 -2
  25. package/build/{chunk-WRMFR7CU.js → chunk-GFSMOEGG.js} +8 -8
  26. package/build/{chunk-XU2RG4HE.js → chunk-GG7YZNYL.js} +10 -2
  27. package/build/{chunk-XU2RG4HE.js.map → chunk-GG7YZNYL.js.map} +1 -1
  28. package/build/{chunk-X7GWN4JO.js → chunk-GIS574I5.js} +2 -2
  29. package/build/{chunk-ZOWPPCOU.js → chunk-J2FXQRPG.js} +5 -5
  30. package/build/{chunk-F63O2UMD.js → chunk-KCTZ5EX4.js} +401 -116
  31. package/build/chunk-KCTZ5EX4.js.map +1 -0
  32. package/build/{chunk-MPSJ2YGQ.js → chunk-LCYX5MZA.js} +3 -3
  33. package/build/{chunk-RJBLVNKS.js → chunk-LPA74SM5.js} +7 -7
  34. package/build/{chunk-CQHI53JJ.js → chunk-OISYBAR4.js} +5043 -659
  35. package/build/chunk-OISYBAR4.js.map +1 -0
  36. package/build/{chunk-LC2NSYSB.js → chunk-P5FUKDOS.js} +8 -8
  37. package/build/{chunk-BQ6AW6QJ.js → chunk-PGR3OZNK.js} +6 -6
  38. package/build/{chunk-NK4U57KS.js → chunk-QZJC3FP3.js} +5 -5
  39. package/build/{chunk-KT54TL6D.js → chunk-RNMVLLSA.js} +6 -6
  40. package/build/{chunk-KOCJZPLK.js → chunk-SELJR2HV.js} +2 -2
  41. package/build/{chunk-IRR7PD4K.js → chunk-VNZYI6OK.js} +3 -3
  42. package/build/{chunk-W32TRG4E.js → chunk-WN3D6AOY.js} +39 -25
  43. package/build/chunk-WN3D6AOY.js.map +1 -0
  44. package/build/{chunk-5EXKEGN6.js → chunk-WVS26NCB.js} +301 -441
  45. package/build/chunk-WVS26NCB.js.map +1 -0
  46. package/build/{chunk-JMUOY2KY.js → chunk-XANTHYQG.js} +9 -9
  47. package/build/{chunk-JMUOY2KY.js.map → chunk-XANTHYQG.js.map} +1 -1
  48. package/build/{chunk-OIH7DI4E.js → chunk-XWFG3TRU.js} +74 -6
  49. package/build/{chunk-OIH7DI4E.js.map → chunk-XWFG3TRU.js.map} +1 -1
  50. package/build/{chunk-KLWKSELB.js → chunk-YQ2ZYOKK.js} +6 -6
  51. package/build/{dev-M7P6GT7S.js → dev-72CJF6Z6.js} +25 -26
  52. package/build/{dev-M7P6GT7S.js.map → dev-72CJF6Z6.js.map} +1 -1
  53. package/build/index.js +28 -28
  54. package/build/{install-SX7OQQGW.js → install-7NZK44CY.js} +19 -19
  55. package/build/{preview-7WGCS2DK.js → preview-NIPXK2PL.js} +20 -20
  56. package/build/{publish-U7Y5KNMR.js → publish-Z3WVKI47.js} +20 -20
  57. package/build/{render-command-P4B7B4WB.js → render-command-GJLP3KAJ.js} +13 -13
  58. package/build/{render-command-TJTVTOHT.js → render-command-I6OSOLTK.js} +12 -12
  59. package/build/{render-command-6GZ7MNO5.js → render-command-OTTR4HS4.js} +13 -13
  60. package/build/{run-command-ZLQ3PKCS.js → run-command-BR7STFFP.js} +10 -10
  61. package/build/{src-WBDWTVY2.js → src-7HIQOGPY.js} +9 -9
  62. package/build/{src-I6QIZSAX.js → src-IRKCACSZ.js} +8 -8
  63. package/build/{src-Q3X5WF65.js → src-QCND6FA3.js} +6 -6
  64. package/build/{src-WKNIYADZ.js → src-QJJ7EIYT.js} +8 -8
  65. package/build/{src-JGFI4IQH.js → src-U45WATPX.js} +19 -19
  66. package/build/{src-5XWKD5UB.js → src-U7SGKJCW.js} +2 -2
  67. package/build/{src-BMV74WCO.js → src-XSN6C5L2.js} +3 -3
  68. package/build/sync-types-JLBBFIOB.js +30 -0
  69. package/build/{uninstall-L6JBTJHG.js → uninstall-KQDD5ADQ.js} +18 -18
  70. package/package.json +6 -6
  71. package/build/DevCommand-WT3DJON6.js +0 -1040
  72. package/build/DevCommand-WT3DJON6.js.map +0 -1
  73. package/build/chunk-24HYCAK2.js.map +0 -1
  74. package/build/chunk-53UCEZFU.js.map +0 -1
  75. package/build/chunk-5EXKEGN6.js.map +0 -1
  76. package/build/chunk-CQHI53JJ.js.map +0 -1
  77. package/build/chunk-F63O2UMD.js.map +0 -1
  78. package/build/chunk-OUBPZBBH.js +0 -558
  79. package/build/chunk-OUBPZBBH.js.map +0 -1
  80. package/build/chunk-W32TRG4E.js.map +0 -1
  81. package/build/chunk-WYEQRRT2.js.map +0 -1
  82. package/build/chunk-WZEZZAE4.js.map +0 -1
  83. package/build/sync-types-6XPVFG3C.js +0 -31
  84. /package/build/{LoginCommand-WRCKEWCE.js.map → LoginCommand-SGLKXJF6.js.map} +0 -0
  85. /package/build/{LogoutCommand-BYWH527O.js.map → LogoutCommand-YL6M6BT7.js.map} +0 -0
  86. /package/build/{WhoamiCommand-WKXZCRSJ.js.map → WhoamiCommand-4EJZYY4W.js.map} +0 -0
  87. /package/build/{chunk-Q5WMVJRK.js.map → chunk-2DE7QM5C.js.map} +0 -0
  88. /package/build/{chunk-LOJ4G3VD.js.map → chunk-5XUFGBCU.js.map} +0 -0
  89. /package/build/{chunk-IFQQVSBK.js.map → chunk-BGKFJNUK.js.map} +0 -0
  90. /package/build/{chunk-3KIPOGXI.js.map → chunk-BVAC4BZH.js.map} +0 -0
  91. /package/build/{chunk-UQXJQCG3.js.map → chunk-CRXPC3TE.js.map} +0 -0
  92. /package/build/{chunk-4S2ZMDZM.js.map → chunk-DWEFYET4.js.map} +0 -0
  93. /package/build/{chunk-3R4OZ46Z.js.map → chunk-G6TDIUNY.js.map} +0 -0
  94. /package/build/{chunk-WRMFR7CU.js.map → chunk-GFSMOEGG.js.map} +0 -0
  95. /package/build/{chunk-X7GWN4JO.js.map → chunk-GIS574I5.js.map} +0 -0
  96. /package/build/{chunk-ZOWPPCOU.js.map → chunk-J2FXQRPG.js.map} +0 -0
  97. /package/build/{chunk-MPSJ2YGQ.js.map → chunk-LCYX5MZA.js.map} +0 -0
  98. /package/build/{chunk-RJBLVNKS.js.map → chunk-LPA74SM5.js.map} +0 -0
  99. /package/build/{chunk-LC2NSYSB.js.map → chunk-P5FUKDOS.js.map} +0 -0
  100. /package/build/{chunk-BQ6AW6QJ.js.map → chunk-PGR3OZNK.js.map} +0 -0
  101. /package/build/{chunk-NK4U57KS.js.map → chunk-QZJC3FP3.js.map} +0 -0
  102. /package/build/{chunk-KT54TL6D.js.map → chunk-RNMVLLSA.js.map} +0 -0
  103. /package/build/{chunk-KOCJZPLK.js.map → chunk-SELJR2HV.js.map} +0 -0
  104. /package/build/{chunk-IRR7PD4K.js.map → chunk-VNZYI6OK.js.map} +0 -0
  105. /package/build/{chunk-KLWKSELB.js.map → chunk-YQ2ZYOKK.js.map} +0 -0
  106. /package/build/{install-SX7OQQGW.js.map → install-7NZK44CY.js.map} +0 -0
  107. /package/build/{preview-7WGCS2DK.js.map → preview-NIPXK2PL.js.map} +0 -0
  108. /package/build/{publish-U7Y5KNMR.js.map → publish-Z3WVKI47.js.map} +0 -0
  109. /package/build/{render-command-P4B7B4WB.js.map → render-command-GJLP3KAJ.js.map} +0 -0
  110. /package/build/{render-command-TJTVTOHT.js.map → render-command-I6OSOLTK.js.map} +0 -0
  111. /package/build/{render-command-6GZ7MNO5.js.map → render-command-OTTR4HS4.js.map} +0 -0
  112. /package/build/{run-command-ZLQ3PKCS.js.map → run-command-BR7STFFP.js.map} +0 -0
  113. /package/build/{src-5XWKD5UB.js.map → src-7HIQOGPY.js.map} +0 -0
  114. /package/build/{src-I6QIZSAX.js.map → src-IRKCACSZ.js.map} +0 -0
  115. /package/build/{src-BMV74WCO.js.map → src-QCND6FA3.js.map} +0 -0
  116. /package/build/{src-WKNIYADZ.js.map → src-QJJ7EIYT.js.map} +0 -0
  117. /package/build/{src-JGFI4IQH.js.map → src-U45WATPX.js.map} +0 -0
  118. /package/build/{src-Q3X5WF65.js.map → src-U7SGKJCW.js.map} +0 -0
  119. /package/build/{src-WBDWTVY2.js.map → src-XSN6C5L2.js.map} +0 -0
  120. /package/build/{sync-types-6XPVFG3C.js.map → sync-types-JLBBFIOB.js.map} +0 -0
  121. /package/build/{uninstall-L6JBTJHG.js.map → uninstall-KQDD5ADQ.js.map} +0 -0
@@ -15,15 +15,15 @@ import {
15
15
  require_cli_spinners,
16
16
  source_default,
17
17
  stripAnsi
18
- } from "./chunk-6F2RSXHN.js";
18
+ } from "./chunk-2NWGTFAC.js";
19
19
  import {
20
20
  getTestOverrides
21
- } from "./chunk-53UCEZFU.js";
21
+ } from "./chunk-BNWDAMAL.js";
22
22
  import {
23
23
  CliError,
24
24
  CliErrorCode,
25
25
  require_lib
26
- } from "./chunk-XU2RG4HE.js";
26
+ } from "./chunk-GG7YZNYL.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
- return /* @__PURE__ */ import_react41.default.createElement(
11482
- Transform,
11483
- {
11484
- transform: (children2) => transform(terminalLink(children2, url, { fallback: true }))
11485
- },
11486
- /* @__PURE__ */ import_react41.default.createElement(Text2, { skin }, children)
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
  };
@@ -11925,24 +11923,27 @@ var html_parse_stringify_module_default = c;
11925
11923
 
11926
11924
  // ../../node_modules/react-i18next/dist/es/utils.js
11927
11925
  init_esm_shims();
11928
- function warn() {
11929
- if (console && console.warn) {
11930
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
11931
- args[_key] = arguments[_key];
11932
- }
11933
- if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;
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) {
11934
11938
  console.warn(...args);
11935
11939
  }
11936
- }
11940
+ };
11937
11941
  var alreadyWarned = {};
11938
- function warnOnce() {
11939
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
11940
- args[_key2] = arguments[_key2];
11941
- }
11942
- if (isString(args[0]) && alreadyWarned[args[0]]) return;
11943
- if (isString(args[0])) alreadyWarned[args[0]] = /* @__PURE__ */ new Date();
11944
- warn(...args);
11945
- }
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
+ };
11946
11947
  var loadedClb = (i18n, cb) => () => {
11947
11948
  if (i18n.isInitialized) {
11948
11949
  cb();
@@ -11961,41 +11962,23 @@ var loadNamespaces = (i18n, ns, cb) => {
11961
11962
  };
11962
11963
  var loadLanguages = (i18n, lng, ns, cb) => {
11963
11964
  if (isString(ns)) ns = [ns];
11965
+ if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);
11964
11966
  ns.forEach((n2) => {
11965
11967
  if (i18n.options.ns.indexOf(n2) < 0) i18n.options.ns.push(n2);
11966
11968
  });
11967
11969
  i18n.loadLanguages(lng, loadedClb(i18n, cb));
11968
11970
  };
11969
- var oldI18nextHasLoadedNamespace = function(ns, i18n) {
11970
- let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
11971
- const lng = i18n.languages[0];
11972
- const fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
11973
- const lastLng = i18n.languages[i18n.languages.length - 1];
11974
- if (lng.toLowerCase() === "cimode") return true;
11975
- const loadNotPending = (l, n2) => {
11976
- const loadState = i18n.services.backendConnector.state[`${l}|${n2}`];
11977
- return loadState === -1 || loadState === 2;
11978
- };
11979
- if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns)) return false;
11980
- if (i18n.hasResourceBundle(lng, ns)) return true;
11981
- if (!i18n.services.backendConnector.backend || i18n.options.resources && !i18n.options.partialBundledLanguages) return true;
11982
- if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
11983
- return false;
11984
- };
11985
- var hasLoadedNamespace = function(ns, i18n) {
11986
- let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
11971
+ var hasLoadedNamespace = (ns, i18n, options = {}) => {
11987
11972
  if (!i18n.languages || !i18n.languages.length) {
11988
- warnOnce("i18n.languages were undefined or empty", i18n.languages);
11973
+ warnOnce(i18n, "NO_LANGUAGES", "i18n.languages were undefined or empty", {
11974
+ languages: i18n.languages
11975
+ });
11989
11976
  return true;
11990
11977
  }
11991
- const isNewerI18next = i18n.options.ignoreJSONStructure !== void 0;
11992
- if (!isNewerI18next) {
11993
- return oldI18nextHasLoadedNamespace(ns, i18n, options);
11994
- }
11995
11978
  return i18n.hasLoadedNamespace(ns, {
11996
11979
  lng: options.lng,
11997
11980
  precheck: (i18nInstance2, loadNotPending) => {
11998
- if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
11981
+ if (options.bindI18n?.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns)) return false;
11999
11982
  }
12000
11983
  });
12001
11984
  };
@@ -12044,8 +12027,7 @@ var defaultOptions = {
12044
12027
  useSuspense: true,
12045
12028
  unescape
12046
12029
  };
12047
- var setDefaults = function() {
12048
- let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
12030
+ var setDefaults = (options = {}) => {
12049
12031
  defaultOptions = {
12050
12032
  ...defaultOptions,
12051
12033
  ...options
@@ -12064,14 +12046,14 @@ var getI18n = () => i18nInstance;
12064
12046
  // ../../node_modules/react-i18next/dist/es/TransWithoutContext.js
12065
12047
  var hasChildren = (node, checkLength) => {
12066
12048
  if (!node) return false;
12067
- const base = node.props ? node.props.children : node.children;
12049
+ const base = node.props?.children ?? node.children;
12068
12050
  if (checkLength) return base.length > 0;
12069
12051
  return !!base;
12070
12052
  };
12071
12053
  var getChildren = (node) => {
12072
12054
  if (!node) return [];
12073
- const children = node.props ? node.props.children : node.children;
12074
- return node.props && node.props.i18nIsDynamicList ? getAsArray(children) : children;
12055
+ const children = node.props?.children ?? node.children;
12056
+ return node.props?.i18nIsDynamicList ? getAsArray(children) : children;
12075
12057
  };
12076
12058
  var hasValidReactChildren = (children) => Array.isArray(children) && children.every(import_react48.isValidElement);
12077
12059
  var getAsArray = (data) => Array.isArray(data) ? data : [data];
@@ -12082,15 +12064,17 @@ var mergeProps = (source, target) => {
12082
12064
  newTarget.props = Object.assign(source.props, target.props);
12083
12065
  return newTarget;
12084
12066
  };
12085
- var nodesToString = (children, i18nOptions) => {
12067
+ var nodesToString = (children, i18nOptions, i18n, i18nKey) => {
12086
12068
  if (!children) return "";
12087
12069
  let stringNode = "";
12088
12070
  const childrenArray = getAsArray(children);
12089
- const keepArray = i18nOptions.transSupportBasicHtmlNodes && i18nOptions.transKeepBasicHtmlNodesFor ? i18nOptions.transKeepBasicHtmlNodesFor : [];
12071
+ const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];
12090
12072
  childrenArray.forEach((child, childIndex) => {
12091
12073
  if (isString(child)) {
12092
12074
  stringNode += `${child}`;
12093
- } else if ((0, import_react48.isValidElement)(child)) {
12075
+ return;
12076
+ }
12077
+ if ((0, import_react48.isValidElement)(child)) {
12094
12078
  const {
12095
12079
  props,
12096
12080
  type
@@ -12100,17 +12084,27 @@ var nodesToString = (children, i18nOptions) => {
12100
12084
  const childChildren = props.children;
12101
12085
  if (!childChildren && shouldKeepChild && !childPropsCount) {
12102
12086
  stringNode += `<${type}/>`;
12103
- } else if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {
12087
+ return;
12088
+ }
12089
+ if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {
12104
12090
  stringNode += `<${childIndex}></${childIndex}>`;
12105
- } else if (shouldKeepChild && childPropsCount === 1 && isString(childChildren)) {
12091
+ return;
12092
+ }
12093
+ if (shouldKeepChild && childPropsCount === 1 && isString(childChildren)) {
12106
12094
  stringNode += `<${type}>${childChildren}</${type}>`;
12107
- } else {
12108
- const content = nodesToString(childChildren, i18nOptions);
12109
- stringNode += `<${childIndex}>${content}</${childIndex}>`;
12095
+ return;
12110
12096
  }
12111
- } else if (child === null) {
12112
- warn(`Trans: the passed in value is invalid - seems you passed in a null child.`);
12113
- } else if (isObject(child)) {
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)) {
12114
12108
  const {
12115
12109
  format,
12116
12110
  ...clone
@@ -12119,12 +12113,18 @@ var nodesToString = (children, i18nOptions) => {
12119
12113
  if (keys.length === 1) {
12120
12114
  const value2 = format ? `${keys[0]}, ${format}` : keys[0];
12121
12115
  stringNode += `{{${value2}}}`;
12122
- } else {
12123
- 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;
12124
12117
  }
12125
- } else {
12126
- warn(`Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.`, child);
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;
12127
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
+ });
12128
12128
  });
12129
12129
  return stringNode;
12130
12130
  };
@@ -12151,7 +12151,7 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
12151
12151
  const renderInner = (child, node, rootReactNode) => {
12152
12152
  const childs = getChildren(child);
12153
12153
  const mappedChildren = mapAST(childs, node.children, rootReactNode);
12154
- return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props && child.props.i18nIsDynamicList ? childs : mappedChildren;
12154
+ return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;
12155
12155
  };
12156
12156
  const pushTranslatedJSX = (child, inner, mem, i2, isVoid) => {
12157
12157
  if (child.dummy) {
@@ -12177,7 +12177,7 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
12177
12177
  const reactNodes = getAsArray(reactNode);
12178
12178
  const astNodes = getAsArray(astNode);
12179
12179
  return astNodes.reduce((mem, node, i2) => {
12180
- const translationContent = node.children && node.children[0] && node.children[0].content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);
12180
+ const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);
12181
12181
  if (node.type === "tag") {
12182
12182
  let tmp = reactNodes[parseInt(node.name, 10)];
12183
12183
  if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];
@@ -12245,42 +12245,79 @@ var renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, sho
12245
12245
  }], ast, getAsArray(children || []));
12246
12246
  return getChildren(result[0]);
12247
12247
  };
12248
- function Trans(_ref) {
12249
- let {
12250
- children,
12251
- count,
12252
- parent,
12253
- i18nKey,
12254
- context,
12255
- tOptions = {},
12256
- values,
12257
- defaults: defaults2,
12258
- components,
12259
- ns,
12260
- i18n: i18nFromProps,
12261
- t: tFromProps,
12262
- shouldUnescape,
12263
- ...additionalProps
12264
- } = _ref;
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
+ }) {
12265
12300
  const i18n = i18nFromProps || getI18n();
12266
12301
  if (!i18n) {
12267
- warnOnce("You will need to pass in an i18next instance by using i18nextReactModule");
12302
+ warnOnce(i18n, "NO_I18NEXT_INSTANCE", `Trans: You need to pass in an i18next instance using i18nextReactModule`, {
12303
+ i18nKey
12304
+ });
12268
12305
  return children;
12269
12306
  }
12270
12307
  const t3 = tFromProps || i18n.t.bind(i18n) || ((k) => k);
12271
12308
  const reactI18nextOptions = {
12272
12309
  ...getDefaults(),
12273
- ...i18n.options && i18n.options.react
12310
+ ...i18n.options?.react
12274
12311
  };
12275
- let namespaces = ns || t3.ns || i18n.options && i18n.options.defaultNS;
12312
+ let namespaces = ns || t3.ns || i18n.options?.defaultNS;
12276
12313
  namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
12277
- const nodeAsString = nodesToString(children, reactI18nextOptions);
12314
+ const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);
12278
12315
  const defaultValue = defaults2 || nodeAsString || reactI18nextOptions.transEmptyNodeValue || i18nKey;
12279
12316
  const {
12280
12317
  hashTransKey
12281
12318
  } = reactI18nextOptions;
12282
12319
  const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);
12283
- if (i18n.options && i18n.options.interpolation && i18n.options.interpolation.defaultVariables) {
12320
+ if (i18n.options?.interpolation?.defaultVariables) {
12284
12321
  values = values && Object.keys(values).length > 0 ? {
12285
12322
  ...values,
12286
12323
  ...i18n.options.interpolation.defaultVariables
@@ -12288,7 +12325,7 @@ function Trans(_ref) {
12288
12325
  ...i18n.options.interpolation.defaultVariables
12289
12326
  };
12290
12327
  }
12291
- const interpolationOverride = values || count !== void 0 || !children ? tOptions.interpolation : {
12328
+ const interpolationOverride = values || count !== void 0 && !i18n.options?.interpolation?.alwaysFormat || !children ? tOptions.interpolation : {
12292
12329
  interpolation: {
12293
12330
  ...tOptions.interpolation,
12294
12331
  prefix: "#$?",
@@ -12305,18 +12342,9 @@ function Trans(_ref) {
12305
12342
  ns: namespaces
12306
12343
  };
12307
12344
  const translation = key ? t3(key, combinedTOpts) : defaultValue;
12308
- if (components) {
12309
- Object.keys(components).forEach((c2) => {
12310
- const comp = components[c2];
12311
- if (typeof comp.type === "function" || !comp.props || !comp.props.children || translation.indexOf(`${c2}/>`) < 0 && translation.indexOf(`${c2} />`) < 0) return;
12312
- function Componentized() {
12313
- return (0, import_react48.createElement)(import_react48.Fragment, null, comp);
12314
- }
12315
- components[c2] = (0, import_react48.createElement)(Componentized);
12316
- });
12317
- }
12318
- const content = renderNodes(components || children, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);
12319
- const useAsParent = parent !== void 0 ? parent : reactI18nextOptions.defaultTransParent;
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;
12320
12348
  return useAsParent ? (0, import_react48.createElement)(useAsParent, additionalProps, content) : content;
12321
12349
  }
12322
12350
 
@@ -12345,33 +12373,34 @@ var ReportNamespaces = class {
12345
12373
  if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;
12346
12374
  });
12347
12375
  }
12348
- getUsedNamespaces = () => Object.keys(this.usedNamespaces);
12376
+ getUsedNamespaces() {
12377
+ return Object.keys(this.usedNamespaces);
12378
+ }
12349
12379
  };
12350
12380
 
12351
12381
  // ../../node_modules/react-i18next/dist/es/Trans.js
12352
- function Trans2(_ref) {
12353
- let {
12354
- children,
12355
- count,
12356
- parent,
12357
- i18nKey,
12358
- context,
12359
- tOptions = {},
12360
- values,
12361
- defaults: defaults2,
12362
- components,
12363
- ns,
12364
- i18n: i18nFromProps,
12365
- t: tFromProps,
12366
- shouldUnescape,
12367
- ...additionalProps
12368
- } = _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
+ }) {
12369
12398
  const {
12370
12399
  i18n: i18nFromContext,
12371
12400
  defaultNS: defaultNSFromContext
12372
12401
  } = (0, import_react50.useContext)(I18nContext) || {};
12373
12402
  const i18n = i18nFromProps || i18nFromContext || getI18n();
12374
- const t3 = tFromProps || i18n && i18n.t.bind(i18n);
12403
+ const t3 = tFromProps || i18n?.t.bind(i18n);
12375
12404
  return Trans({
12376
12405
  children,
12377
12406
  count,
@@ -12382,7 +12411,7 @@ function Trans2(_ref) {
12382
12411
  values,
12383
12412
  defaults: defaults2,
12384
12413
  components,
12385
- ns: ns || t3 && t3.ns || defaultNSFromContext || i18n && i18n.options && i18n.options.defaultNS,
12414
+ ns: ns || t3?.ns || defaultNSFromContext || i18n?.options?.defaultNS,
12386
12415
  i18n,
12387
12416
  t: tFromProps,
12388
12417
  shouldUnescape,
@@ -12405,8 +12434,7 @@ var usePrevious = (value2, ignore) => {
12405
12434
  };
12406
12435
  var alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);
12407
12436
  var useMemoizedT = (i18n, language, namespace, keyPrefix) => (0, import_react51.useCallback)(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);
12408
- var useTranslation = function(ns) {
12409
- let props = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
12437
+ var useTranslation = (ns, props = {}) => {
12410
12438
  const {
12411
12439
  i18n: i18nFromProps
12412
12440
  } = props;
@@ -12417,7 +12445,7 @@ var useTranslation = function(ns) {
12417
12445
  const i18n = i18nFromProps || i18nFromContext || getI18n();
12418
12446
  if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
12419
12447
  if (!i18n) {
12420
- 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");
12421
12449
  const notReadyT = (k, optsOrDefaultValue) => {
12422
12450
  if (isString(optsOrDefaultValue)) return optsOrDefaultValue;
12423
12451
  if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;
@@ -12429,7 +12457,7 @@ var useTranslation = function(ns) {
12429
12457
  retNotReady.ready = false;
12430
12458
  return retNotReady;
12431
12459
  }
12432
- if (i18n.options.react && i18n.options.react.wait !== void 0) warnOnce("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
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.");
12433
12461
  const i18nOptions = {
12434
12462
  ...getDefaults(),
12435
12463
  ...i18n.options.react,
@@ -12439,9 +12467,9 @@ var useTranslation = function(ns) {
12439
12467
  useSuspense,
12440
12468
  keyPrefix
12441
12469
  } = i18nOptions;
12442
- let namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
12470
+ let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;
12443
12471
  namespaces = isString(namespaces) ? [namespaces] : namespaces || ["translation"];
12444
- if (i18n.reportNamespaces.addUsedNamespaces) i18n.reportNamespaces.addUsedNamespaces(namespaces);
12472
+ i18n.reportNamespaces.addUsedNamespaces?.(namespaces);
12445
12473
  const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n2) => hasLoadedNamespace(n2, i18n, i18nOptions));
12446
12474
  const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
12447
12475
  const getT = () => memoGetT;
@@ -12474,11 +12502,11 @@ var useTranslation = function(ns) {
12474
12502
  const boundReset = () => {
12475
12503
  if (isMounted.current) setT(getNewT);
12476
12504
  };
12477
- if (bindI18n && i18n) i18n.on(bindI18n, boundReset);
12478
- if (bindI18nStore && i18n) i18n.store.on(bindI18nStore, boundReset);
12505
+ if (bindI18n) i18n?.on(bindI18n, boundReset);
12506
+ if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);
12479
12507
  return () => {
12480
12508
  isMounted.current = false;
12481
- if (bindI18n && i18n) bindI18n.split(" ").forEach((e2) => i18n.off(e2, boundReset));
12509
+ if (i18n) bindI18n?.split(" ").forEach((e2) => i18n.off(e2, boundReset));
12482
12510
  if (bindI18nStore && i18n) bindI18nStore.split(" ").forEach((e2) => i18n.store.off(e2, boundReset));
12483
12511
  };
12484
12512
  }, [i18n, joinedNS]);
@@ -12512,12 +12540,11 @@ init_esm_shims();
12512
12540
  // ../../node_modules/react-i18next/dist/es/I18nextProvider.js
12513
12541
  init_esm_shims();
12514
12542
  var import_react53 = __toESM(require_react(), 1);
12515
- function I18nextProvider(_ref) {
12516
- let {
12517
- i18n,
12518
- defaultNS,
12519
- children
12520
- } = _ref;
12543
+ function I18nextProvider({
12544
+ i18n,
12545
+ defaultNS,
12546
+ children
12547
+ }) {
12521
12548
  const value2 = (0, import_react53.useMemo)(() => ({
12522
12549
  i18n,
12523
12550
  defaultNS
@@ -15456,6 +15483,9 @@ function _isPatternSyntax(c2) {
15456
15483
  return c2 >= 33 && c2 <= 35 || c2 === 36 || c2 >= 37 && c2 <= 39 || c2 === 40 || c2 === 41 || c2 === 42 || c2 === 43 || c2 === 44 || c2 === 45 || c2 >= 46 && c2 <= 47 || c2 >= 58 && c2 <= 59 || c2 >= 60 && c2 <= 62 || c2 >= 63 && c2 <= 64 || c2 === 91 || c2 === 92 || c2 === 93 || c2 === 94 || c2 === 96 || c2 === 123 || c2 === 124 || c2 === 125 || c2 === 126 || c2 === 161 || c2 >= 162 && c2 <= 165 || c2 === 166 || c2 === 167 || c2 === 169 || c2 === 171 || c2 === 172 || c2 === 174 || c2 === 176 || c2 === 177 || c2 === 182 || c2 === 187 || c2 === 191 || c2 === 215 || c2 === 247 || c2 >= 8208 && c2 <= 8213 || c2 >= 8214 && c2 <= 8215 || c2 === 8216 || c2 === 8217 || c2 === 8218 || c2 >= 8219 && c2 <= 8220 || c2 === 8221 || c2 === 8222 || c2 === 8223 || c2 >= 8224 && c2 <= 8231 || c2 >= 8240 && c2 <= 8248 || c2 === 8249 || c2 === 8250 || c2 >= 8251 && c2 <= 8254 || c2 >= 8257 && c2 <= 8259 || c2 === 8260 || c2 === 8261 || c2 === 8262 || c2 >= 8263 && c2 <= 8273 || c2 === 8274 || c2 === 8275 || c2 >= 8277 && c2 <= 8286 || c2 >= 8592 && c2 <= 8596 || c2 >= 8597 && c2 <= 8601 || c2 >= 8602 && c2 <= 8603 || c2 >= 8604 && c2 <= 8607 || c2 === 8608 || c2 >= 8609 && c2 <= 8610 || c2 === 8611 || c2 >= 8612 && c2 <= 8613 || c2 === 8614 || c2 >= 8615 && c2 <= 8621 || c2 === 8622 || c2 >= 8623 && c2 <= 8653 || c2 >= 8654 && c2 <= 8655 || c2 >= 8656 && c2 <= 8657 || c2 === 8658 || c2 === 8659 || c2 === 8660 || c2 >= 8661 && c2 <= 8691 || c2 >= 8692 && c2 <= 8959 || c2 >= 8960 && c2 <= 8967 || c2 === 8968 || c2 === 8969 || c2 === 8970 || c2 === 8971 || c2 >= 8972 && c2 <= 8991 || c2 >= 8992 && c2 <= 8993 || c2 >= 8994 && c2 <= 9e3 || c2 === 9001 || c2 === 9002 || c2 >= 9003 && c2 <= 9083 || c2 === 9084 || c2 >= 9085 && c2 <= 9114 || c2 >= 9115 && c2 <= 9139 || c2 >= 9140 && c2 <= 9179 || c2 >= 9180 && c2 <= 9185 || c2 >= 9186 && c2 <= 9254 || c2 >= 9255 && c2 <= 9279 || c2 >= 9280 && c2 <= 9290 || c2 >= 9291 && c2 <= 9311 || c2 >= 9472 && c2 <= 9654 || c2 === 9655 || c2 >= 9656 && c2 <= 9664 || c2 === 9665 || c2 >= 9666 && c2 <= 9719 || c2 >= 9720 && c2 <= 9727 || c2 >= 9728 && c2 <= 9838 || c2 === 9839 || c2 >= 9840 && c2 <= 10087 || c2 === 10088 || c2 === 10089 || c2 === 10090 || c2 === 10091 || c2 === 10092 || c2 === 10093 || c2 === 10094 || c2 === 10095 || c2 === 10096 || c2 === 10097 || c2 === 10098 || c2 === 10099 || c2 === 10100 || c2 === 10101 || c2 >= 10132 && c2 <= 10175 || c2 >= 10176 && c2 <= 10180 || c2 === 10181 || c2 === 10182 || c2 >= 10183 && c2 <= 10213 || c2 === 10214 || c2 === 10215 || c2 === 10216 || c2 === 10217 || c2 === 10218 || c2 === 10219 || c2 === 10220 || c2 === 10221 || c2 === 10222 || c2 === 10223 || c2 >= 10224 && c2 <= 10239 || c2 >= 10240 && c2 <= 10495 || c2 >= 10496 && c2 <= 10626 || c2 === 10627 || c2 === 10628 || c2 === 10629 || c2 === 10630 || c2 === 10631 || c2 === 10632 || c2 === 10633 || c2 === 10634 || c2 === 10635 || c2 === 10636 || c2 === 10637 || c2 === 10638 || c2 === 10639 || c2 === 10640 || c2 === 10641 || c2 === 10642 || c2 === 10643 || c2 === 10644 || c2 === 10645 || c2 === 10646 || c2 === 10647 || c2 === 10648 || c2 >= 10649 && c2 <= 10711 || c2 === 10712 || c2 === 10713 || c2 === 10714 || c2 === 10715 || c2 >= 10716 && c2 <= 10747 || c2 === 10748 || c2 === 10749 || c2 >= 10750 && c2 <= 11007 || c2 >= 11008 && c2 <= 11055 || c2 >= 11056 && c2 <= 11076 || c2 >= 11077 && c2 <= 11078 || c2 >= 11079 && c2 <= 11084 || c2 >= 11085 && c2 <= 11123 || c2 >= 11124 && c2 <= 11125 || c2 >= 11126 && c2 <= 11157 || c2 === 11158 || c2 >= 11159 && c2 <= 11263 || c2 >= 11776 && c2 <= 11777 || c2 === 11778 || c2 === 11779 || c2 === 11780 || c2 === 11781 || c2 >= 11782 && c2 <= 11784 || c2 === 11785 || c2 === 11786 || c2 === 11787 || c2 === 11788 || c2 === 11789 || c2 >= 11790 && c2 <= 11798 || c2 === 11799 || c2 >= 11800 && c2 <= 11801 || c2 === 11802 || c2 === 11803 || c2 === 11804 || c2 === 11805 || c2 >= 11806 && c2 <= 11807 || c2 === 11808 || c2 === 11809 || c2 === 11810 || c2 === 11811 || c2 === 11812 || c2 === 11813 || c2 === 11814 || c2 === 11815 || c2 === 11816 || c2 === 11817 || c2 >= 11818 && c2 <= 11822 || c2 === 11823 || c2 >= 11824 && c2 <= 11833 || c2 >= 11834 && c2 <= 11835 || c2 >= 11836 && c2 <= 11839 || c2 === 11840 || c2 === 11841 || c2 === 11842 || c2 >= 11843 && c2 <= 11855 || c2 >= 11856 && c2 <= 11857 || c2 === 11858 || c2 >= 11859 && c2 <= 11903 || c2 >= 12289 && c2 <= 12291 || c2 === 12296 || c2 === 12297 || c2 === 12298 || c2 === 12299 || c2 === 12300 || c2 === 12301 || c2 === 12302 || c2 === 12303 || c2 === 12304 || c2 === 12305 || c2 >= 12306 && c2 <= 12307 || c2 === 12308 || c2 === 12309 || c2 === 12310 || c2 === 12311 || c2 === 12312 || c2 === 12313 || c2 === 12314 || c2 === 12315 || c2 === 12316 || c2 === 12317 || c2 >= 12318 && c2 <= 12319 || c2 === 12320 || c2 === 12336 || c2 === 64830 || c2 === 64831 || c2 >= 65093 && c2 <= 65094;
15457
15484
  }
15458
15485
 
15486
+ // ../../node_modules/@formatjs/icu-messageformat-parser/lib/manipulator.js
15487
+ init_esm_shims();
15488
+
15459
15489
  // ../../node_modules/@formatjs/icu-messageformat-parser/lib/index.js
15460
15490
  function pruneLocation(els) {
15461
15491
  els.forEach(function(el) {
@@ -16124,7 +16154,7 @@ var setPath2 = (object, path, newValue) => {
16124
16154
  e2 = `${p[p.length - 1]}.${e2}`;
16125
16155
  p = p.slice(0, p.length - 1);
16126
16156
  last = getLastOfPath2(object, p, Object);
16127
- if (last && last.obj && typeof last.obj[`${last.k}.${e2}`] !== "undefined") {
16157
+ if (last?.obj && typeof last.obj[`${last.k}.${e2}`] !== "undefined") {
16128
16158
  last.obj = void 0;
16129
16159
  }
16130
16160
  }
@@ -16144,6 +16174,7 @@ var getPath2 = (object, path) => {
16144
16174
  k
16145
16175
  } = getLastOfPath2(object, path);
16146
16176
  if (!obj) return void 0;
16177
+ if (!Object.prototype.hasOwnProperty.call(obj, k)) return void 0;
16147
16178
  return obj[k];
16148
16179
  };
16149
16180
  var getPathWithDefaults = (data, defaultData, key) => {
@@ -16224,7 +16255,10 @@ var looksLikeObjectPath = (key, nsSeparator, keySeparator) => {
16224
16255
  var deepFind = function(obj, path) {
16225
16256
  let keySeparator = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
16226
16257
  if (!obj) return void 0;
16227
- if (obj[path]) return obj[path];
16258
+ if (obj[path]) {
16259
+ if (!Object.prototype.hasOwnProperty.call(obj, path)) return void 0;
16260
+ return obj[path];
16261
+ }
16228
16262
  const tokens = path.split(keySeparator);
16229
16263
  let current = obj;
16230
16264
  for (let i2 = 0; i2 < tokens.length; ) {
@@ -16251,7 +16285,7 @@ var deepFind = function(obj, path) {
16251
16285
  }
16252
16286
  return current;
16253
16287
  };
16254
- var getCleanedCode = (code) => code && code.replace("_", "-");
16288
+ var getCleanedCode = (code) => code?.replace("_", "-");
16255
16289
  var consoleLogger = {
16256
16290
  type: "logger",
16257
16291
  log(args) {
@@ -16264,7 +16298,7 @@ var consoleLogger = {
16264
16298
  this.output("error", args);
16265
16299
  },
16266
16300
  output(type, args) {
16267
- if (console && console[type]) console[type].apply(console, args);
16301
+ console?.[type]?.apply?.(console, args);
16268
16302
  }
16269
16303
  };
16270
16304
  var Logger = class _Logger {
@@ -16420,7 +16454,7 @@ var ResourceStore = class extends EventEmitter {
16420
16454
  key = path.slice(2).join(".");
16421
16455
  }
16422
16456
  if (result || !ignoreJSONStructure || !isString2(key)) return result;
16423
- return deepFind(this.data && this.data[lng] && this.data[lng][ns], key, keySeparator);
16457
+ return deepFind(this.data?.[lng]?.[ns], key, keySeparator);
16424
16458
  }
16425
16459
  addResource(lng, ns, key, value2) {
16426
16460
  let options = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
@@ -16487,10 +16521,6 @@ var ResourceStore = class extends EventEmitter {
16487
16521
  }
16488
16522
  getResourceBundle(lng, ns) {
16489
16523
  if (!ns) ns = this.options.defaultNS;
16490
- if (this.options.compatibilityAPI === "v1") return {
16491
- ...{},
16492
- ...this.getResource(lng, ns)
16493
- };
16494
16524
  return this.getResource(lng, ns);
16495
16525
  }
16496
16526
  getDataByLanguage(lng) {
@@ -16512,7 +16542,7 @@ var postProcessor = {
16512
16542
  },
16513
16543
  handle(processors, value2, key, options, translator) {
16514
16544
  processors.forEach((processor) => {
16515
- if (this.processors[processor]) value2 = this.processors[processor].process(value2, key, options, translator);
16545
+ value2 = this.processors[processor]?.process(value2, key, options, translator) ?? value2;
16516
16546
  });
16517
16547
  return value2;
16518
16548
  }
@@ -16536,11 +16566,11 @@ var Translator = class _Translator extends EventEmitter {
16536
16566
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
16537
16567
  interpolation: {}
16538
16568
  };
16539
- if (key === void 0 || key === null) {
16569
+ if (key == null) {
16540
16570
  return false;
16541
16571
  }
16542
16572
  const resolved = this.resolve(key, options);
16543
- return resolved && resolved.res !== void 0;
16573
+ return resolved?.res !== void 0;
16544
16574
  }
16545
16575
  extractFromKey(key, options) {
16546
16576
  let nsSeparator = options.nsSeparator !== void 0 ? options.nsSeparator : this.options.nsSeparator;
@@ -16574,7 +16604,7 @@ var Translator = class _Translator extends EventEmitter {
16574
16604
  ...options
16575
16605
  };
16576
16606
  if (!options) options = {};
16577
- if (keys === void 0 || keys === null) return "";
16607
+ if (keys == null) return "";
16578
16608
  if (!Array.isArray(keys)) keys = [String(keys)];
16579
16609
  const returnDetails = options.returnDetails !== void 0 ? options.returnDetails : this.options.returnDetails;
16580
16610
  const keySeparator = options.keySeparator !== void 0 ? options.keySeparator : this.options.keySeparator;
@@ -16585,7 +16615,7 @@ var Translator = class _Translator extends EventEmitter {
16585
16615
  const namespace = namespaces[namespaces.length - 1];
16586
16616
  const lng = options.lng || this.language;
16587
16617
  const appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
16588
- if (lng && lng.toLowerCase() === "cimode") {
16618
+ if (lng?.toLowerCase() === "cimode") {
16589
16619
  if (appendNamespaceToCIMode) {
16590
16620
  const nsSeparator = options.nsSeparator || this.options.nsSeparator;
16591
16621
  if (returnDetails) {
@@ -16613,9 +16643,9 @@ var Translator = class _Translator extends EventEmitter {
16613
16643
  return key;
16614
16644
  }
16615
16645
  const resolved = this.resolve(keys, options);
16616
- let res = resolved && resolved.res;
16617
- const resUsedKey = resolved && resolved.usedKey || key;
16618
- const resExactUsedKey = resolved && resolved.exactUsedKey || key;
16646
+ let res = resolved?.res;
16647
+ const resUsedKey = resolved?.usedKey || key;
16648
+ const resExactUsedKey = resolved?.exactUsedKey || key;
16619
16649
  const resType = Object.prototype.toString.apply(res);
16620
16650
  const noObject = ["[object Number]", "[object Function]", "[object RegExp]"];
16621
16651
  const joinArrays = options.joinArrays !== void 0 ? options.joinArrays : this.options.joinArrays;
@@ -16668,7 +16698,7 @@ var Translator = class _Translator extends EventEmitter {
16668
16698
  const defaultValueSuffixOrdinalFallback = options.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, {
16669
16699
  ordinal: false
16670
16700
  }) : "";
16671
- const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0 && this.pluralResolver.shouldUseIntlApi();
16701
+ const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0;
16672
16702
  const defaultValue = needsZeroSuffixLookup && options[`defaultValue${this.options.pluralSeparator}zero`] || options[`defaultValue${defaultValueSuffix}`] || options[`defaultValue${defaultValueSuffixOrdinalFallback}`] || options.defaultValue;
16673
16703
  if (!this.isValidLookup(res) && hasDefaultValue) {
16674
16704
  usedDefault = true;
@@ -16705,7 +16735,7 @@ var Translator = class _Translator extends EventEmitter {
16705
16735
  const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;
16706
16736
  if (this.options.missingKeyHandler) {
16707
16737
  this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, options);
16708
- } else if (this.backendConnector && this.backendConnector.saveMissing) {
16738
+ } else if (this.backendConnector?.saveMissing) {
16709
16739
  this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, options);
16710
16740
  }
16711
16741
  this.emit("missingKey", l, namespace, k, res);
@@ -16729,11 +16759,7 @@ var Translator = class _Translator extends EventEmitter {
16729
16759
  res = this.extendTranslation(res, keys, options, resolved, lastKey);
16730
16760
  if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = `${namespace}:${key}`;
16731
16761
  if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {
16732
- if (this.options.compatibilityAPI !== "v1") {
16733
- res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}:${key}` : key, usedDefault ? res : void 0);
16734
- } else {
16735
- res = this.options.parseMissingKeyHandler(res);
16736
- }
16762
+ res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}:${key}` : key, usedDefault ? res : void 0);
16737
16763
  }
16738
16764
  }
16739
16765
  if (returnDetails) {
@@ -16745,7 +16771,7 @@ var Translator = class _Translator extends EventEmitter {
16745
16771
  }
16746
16772
  extendTranslation(res, key, options, resolved, lastKey) {
16747
16773
  var _this = this;
16748
- if (this.i18nFormat && this.i18nFormat.parse) {
16774
+ if (this.i18nFormat?.parse) {
16749
16775
  res = this.i18nFormat.parse(res, {
16750
16776
  ...this.options.interpolation.defaultVariables,
16751
16777
  ...options
@@ -16762,7 +16788,7 @@ var Translator = class _Translator extends EventEmitter {
16762
16788
  }
16763
16789
  }
16764
16790
  });
16765
- const skipOnVariables = isString2(res) && (options && options.interpolation && options.interpolation.skipOnVariables !== void 0 ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
16791
+ const skipOnVariables = isString2(res) && (options?.interpolation?.skipOnVariables !== void 0 ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
16766
16792
  let nestBef;
16767
16793
  if (skipOnVariables) {
16768
16794
  const nb = res.match(this.interpolator.nestingRegexp);
@@ -16779,12 +16805,12 @@ var Translator = class _Translator extends EventEmitter {
16779
16805
  const nestAft = na && na.length;
16780
16806
  if (nestBef < nestAft) options.nest = false;
16781
16807
  }
16782
- if (!options.lng && this.options.compatibilityAPI !== "v1" && resolved && resolved.res) options.lng = this.language || resolved.usedLng;
16808
+ if (!options.lng && resolved && resolved.res) options.lng = this.language || resolved.usedLng;
16783
16809
  if (options.nest !== false) res = this.interpolator.nest(res, function() {
16784
16810
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
16785
16811
  args[_key] = arguments[_key];
16786
16812
  }
16787
- if (lastKey && lastKey[0] === args[0] && !options.context) {
16813
+ if (lastKey?.[0] === args[0] && !options.context) {
16788
16814
  _this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);
16789
16815
  return null;
16790
16816
  }
@@ -16794,7 +16820,7 @@ var Translator = class _Translator extends EventEmitter {
16794
16820
  }
16795
16821
  const postProcess = options.postProcess || this.options.postProcess;
16796
16822
  const postProcessorNames = isString2(postProcess) ? [postProcess] : postProcess;
16797
- if (res !== void 0 && res !== null && postProcessorNames && postProcessorNames.length && options.applyPostProcessor !== false) {
16823
+ if (res != null && postProcessorNames?.length && options.applyPostProcessor !== false) {
16798
16824
  res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {
16799
16825
  i18nResolved: {
16800
16826
  ...resolved,
@@ -16821,13 +16847,13 @@ var Translator = class _Translator extends EventEmitter {
16821
16847
  let namespaces = extracted.namespaces;
16822
16848
  if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);
16823
16849
  const needsPluralHandling = options.count !== void 0 && !isString2(options.count);
16824
- const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0 && this.pluralResolver.shouldUseIntlApi();
16850
+ const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0;
16825
16851
  const needsContextHandling = options.context !== void 0 && (isString2(options.context) || typeof options.context === "number") && options.context !== "";
16826
16852
  const codes = options.lngs ? options.lngs : this.languageUtils.toResolveHierarchy(options.lng || this.language, options.fallbackLng);
16827
16853
  namespaces.forEach((ns) => {
16828
16854
  if (this.isValidLookup(found)) return;
16829
16855
  usedNS = ns;
16830
- if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(usedNS)) {
16856
+ if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {
16831
16857
  checkedLoadedFor[`${codes[0]}-${ns}`] = true;
16832
16858
  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!!!");
16833
16859
  }
@@ -16835,7 +16861,7 @@ var Translator = class _Translator extends EventEmitter {
16835
16861
  if (this.isValidLookup(found)) return;
16836
16862
  usedLng = code;
16837
16863
  const finalKeys = [key];
16838
- if (this.i18nFormat && this.i18nFormat.addLookupKeys) {
16864
+ if (this.i18nFormat?.addLookupKeys) {
16839
16865
  this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);
16840
16866
  } else {
16841
16867
  let pluralSuffix;
@@ -16888,7 +16914,7 @@ var Translator = class _Translator extends EventEmitter {
16888
16914
  }
16889
16915
  getResource(code, ns, key) {
16890
16916
  let options = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
16891
- if (this.i18nFormat && this.i18nFormat.getResource) return this.i18nFormat.getResource(code, ns, key, options);
16917
+ if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);
16892
16918
  return this.resourceStore.getResource(code, ns, key, options);
16893
16919
  }
16894
16920
  getUsedParamsDetails() {
@@ -16925,7 +16951,6 @@ var Translator = class _Translator extends EventEmitter {
16925
16951
  return false;
16926
16952
  }
16927
16953
  };
16928
- var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
16929
16954
  var LanguageUtil = class {
16930
16955
  constructor(options) {
16931
16956
  this.options = options;
@@ -16949,32 +16974,19 @@ var LanguageUtil = class {
16949
16974
  }
16950
16975
  formatLanguageCode(code) {
16951
16976
  if (isString2(code) && code.indexOf("-") > -1) {
16952
- if (typeof Intl !== "undefined" && typeof Intl.getCanonicalLocales !== "undefined") {
16953
- try {
16954
- let formattedCode = Intl.getCanonicalLocales(code)[0];
16955
- if (formattedCode && this.options.lowerCaseLng) {
16956
- formattedCode = formattedCode.toLowerCase();
16957
- }
16958
- if (formattedCode) return formattedCode;
16959
- } catch (e2) {
16960
- }
16977
+ let formattedCode;
16978
+ try {
16979
+ formattedCode = Intl.getCanonicalLocales(code)[0];
16980
+ } catch (e2) {
16961
16981
  }
16962
- const specialCases = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
16963
- let p = code.split("-");
16982
+ if (formattedCode && this.options.lowerCaseLng) {
16983
+ formattedCode = formattedCode.toLowerCase();
16984
+ }
16985
+ if (formattedCode) return formattedCode;
16964
16986
  if (this.options.lowerCaseLng) {
16965
- p = p.map((part) => part.toLowerCase());
16966
- } else if (p.length === 2) {
16967
- p[0] = p[0].toLowerCase();
16968
- p[1] = p[1].toUpperCase();
16969
- if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
16970
- } else if (p.length === 3) {
16971
- p[0] = p[0].toLowerCase();
16972
- if (p[1].length === 2) p[1] = p[1].toUpperCase();
16973
- if (p[0] !== "sgn" && p[2].length === 2) p[2] = p[2].toUpperCase();
16974
- if (specialCases.indexOf(p[1].toLowerCase()) > -1) p[1] = capitalize(p[1].toLowerCase());
16975
- if (specialCases.indexOf(p[2].toLowerCase()) > -1) p[2] = capitalize(p[2].toLowerCase());
16976
- }
16977
- return p.join("-");
16987
+ return code.toLowerCase();
16988
+ }
16989
+ return code;
16978
16990
  }
16979
16991
  return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;
16980
16992
  }
@@ -17045,125 +17057,6 @@ var LanguageUtil = class {
17045
17057
  return codes;
17046
17058
  }
17047
17059
  };
17048
- var sets = [{
17049
- lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
17050
- nr: [1, 2],
17051
- fc: 1
17052
- }, {
17053
- 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"],
17054
- nr: [1, 2],
17055
- fc: 2
17056
- }, {
17057
- lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"],
17058
- nr: [1],
17059
- fc: 3
17060
- }, {
17061
- lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"],
17062
- nr: [1, 2, 5],
17063
- fc: 4
17064
- }, {
17065
- lngs: ["ar"],
17066
- nr: [0, 1, 2, 3, 11, 100],
17067
- fc: 5
17068
- }, {
17069
- lngs: ["cs", "sk"],
17070
- nr: [1, 2, 5],
17071
- fc: 6
17072
- }, {
17073
- lngs: ["csb", "pl"],
17074
- nr: [1, 2, 5],
17075
- fc: 7
17076
- }, {
17077
- lngs: ["cy"],
17078
- nr: [1, 2, 3, 8],
17079
- fc: 8
17080
- }, {
17081
- lngs: ["fr"],
17082
- nr: [1, 2],
17083
- fc: 9
17084
- }, {
17085
- lngs: ["ga"],
17086
- nr: [1, 2, 3, 7, 11],
17087
- fc: 10
17088
- }, {
17089
- lngs: ["gd"],
17090
- nr: [1, 2, 3, 20],
17091
- fc: 11
17092
- }, {
17093
- lngs: ["is"],
17094
- nr: [1, 2],
17095
- fc: 12
17096
- }, {
17097
- lngs: ["jv"],
17098
- nr: [0, 1],
17099
- fc: 13
17100
- }, {
17101
- lngs: ["kw"],
17102
- nr: [1, 2, 3, 4],
17103
- fc: 14
17104
- }, {
17105
- lngs: ["lt"],
17106
- nr: [1, 2, 10],
17107
- fc: 15
17108
- }, {
17109
- lngs: ["lv"],
17110
- nr: [1, 2, 0],
17111
- fc: 16
17112
- }, {
17113
- lngs: ["mk"],
17114
- nr: [1, 2],
17115
- fc: 17
17116
- }, {
17117
- lngs: ["mnk"],
17118
- nr: [0, 1, 2],
17119
- fc: 18
17120
- }, {
17121
- lngs: ["mt"],
17122
- nr: [1, 2, 11, 20],
17123
- fc: 19
17124
- }, {
17125
- lngs: ["or"],
17126
- nr: [2, 1],
17127
- fc: 2
17128
- }, {
17129
- lngs: ["ro"],
17130
- nr: [1, 2, 20],
17131
- fc: 20
17132
- }, {
17133
- lngs: ["sl"],
17134
- nr: [5, 1, 2, 3],
17135
- fc: 21
17136
- }, {
17137
- lngs: ["he", "iw"],
17138
- nr: [1, 2, 20, 21],
17139
- fc: 22
17140
- }];
17141
- var _rulesPluralsTypes = {
17142
- 1: (n2) => Number(n2 > 1),
17143
- 2: (n2) => Number(n2 != 1),
17144
- 3: (n2) => 0,
17145
- 4: (n2) => Number(n2 % 10 == 1 && n2 % 100 != 11 ? 0 : n2 % 10 >= 2 && n2 % 10 <= 4 && (n2 % 100 < 10 || n2 % 100 >= 20) ? 1 : 2),
17146
- 5: (n2) => Number(n2 == 0 ? 0 : n2 == 1 ? 1 : n2 == 2 ? 2 : n2 % 100 >= 3 && n2 % 100 <= 10 ? 3 : n2 % 100 >= 11 ? 4 : 5),
17147
- 6: (n2) => Number(n2 == 1 ? 0 : n2 >= 2 && n2 <= 4 ? 1 : 2),
17148
- 7: (n2) => Number(n2 == 1 ? 0 : n2 % 10 >= 2 && n2 % 10 <= 4 && (n2 % 100 < 10 || n2 % 100 >= 20) ? 1 : 2),
17149
- 8: (n2) => Number(n2 == 1 ? 0 : n2 == 2 ? 1 : n2 != 8 && n2 != 11 ? 2 : 3),
17150
- 9: (n2) => Number(n2 >= 2),
17151
- 10: (n2) => Number(n2 == 1 ? 0 : n2 == 2 ? 1 : n2 < 7 ? 2 : n2 < 11 ? 3 : 4),
17152
- 11: (n2) => Number(n2 == 1 || n2 == 11 ? 0 : n2 == 2 || n2 == 12 ? 1 : n2 > 2 && n2 < 20 ? 2 : 3),
17153
- 12: (n2) => Number(n2 % 10 != 1 || n2 % 100 == 11),
17154
- 13: (n2) => Number(n2 !== 0),
17155
- 14: (n2) => Number(n2 == 1 ? 0 : n2 == 2 ? 1 : n2 == 3 ? 2 : 3),
17156
- 15: (n2) => Number(n2 % 10 == 1 && n2 % 100 != 11 ? 0 : n2 % 10 >= 2 && (n2 % 100 < 10 || n2 % 100 >= 20) ? 1 : 2),
17157
- 16: (n2) => Number(n2 % 10 == 1 && n2 % 100 != 11 ? 0 : n2 !== 0 ? 1 : 2),
17158
- 17: (n2) => Number(n2 == 1 || n2 % 10 == 1 && n2 % 100 != 11 ? 0 : 1),
17159
- 18: (n2) => Number(n2 == 0 ? 0 : n2 == 1 ? 1 : 2),
17160
- 19: (n2) => Number(n2 == 1 ? 0 : n2 == 0 || n2 % 100 > 1 && n2 % 100 < 11 ? 1 : n2 % 100 > 10 && n2 % 100 < 20 ? 2 : 3),
17161
- 20: (n2) => Number(n2 == 1 ? 0 : n2 == 0 || n2 % 100 > 0 && n2 % 100 < 20 ? 1 : 2),
17162
- 21: (n2) => Number(n2 % 100 == 1 ? 1 : n2 % 100 == 2 ? 2 : n2 % 100 == 3 || n2 % 100 == 4 ? 3 : 0),
17163
- 22: (n2) => Number(n2 == 1 ? 0 : n2 == 2 ? 1 : (n2 < 0 || n2 > 10) && n2 % 10 == 0 ? 2 : 3)
17164
- };
17165
- var nonIntlVersions = ["v1", "v2", "v3"];
17166
- var intlVersions = ["v4"];
17167
17060
  var suffixesOrder = {
17168
17061
  zero: 0,
17169
17062
  one: 1,
@@ -17172,17 +17065,11 @@ var suffixesOrder = {
17172
17065
  many: 4,
17173
17066
  other: 5
17174
17067
  };
17175
- var createRules = () => {
17176
- const rules = {};
17177
- sets.forEach((set) => {
17178
- set.lngs.forEach((l) => {
17179
- rules[l] = {
17180
- numbers: set.nr,
17181
- plurals: _rulesPluralsTypes[set.fc]
17182
- };
17183
- });
17184
- });
17185
- return rules;
17068
+ var dummyRule = {
17069
+ select: (count) => count === 1 ? "one" : "other",
17070
+ resolvedOptions: () => ({
17071
+ pluralCategories: ["one", "other"]
17072
+ })
17186
17073
  };
17187
17074
  var PluralResolver = class {
17188
17075
  constructor(languageUtils) {
@@ -17190,11 +17077,6 @@ var PluralResolver = class {
17190
17077
  this.languageUtils = languageUtils;
17191
17078
  this.options = options;
17192
17079
  this.logger = baseLogger.create("pluralResolver");
17193
- if ((!this.options.compatibilityJSON || intlVersions.includes(this.options.compatibilityJSON)) && (typeof Intl === "undefined" || !Intl.PluralRules)) {
17194
- this.options.compatibilityJSON = "v3";
17195
- 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.");
17196
- }
17197
- this.rules = createRules();
17198
17080
  this.pluralRulesCache = {};
17199
17081
  }
17200
17082
  addRule(lng, obj) {
@@ -17205,38 +17087,37 @@ var PluralResolver = class {
17205
17087
  }
17206
17088
  getRule(code) {
17207
17089
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
17208
- if (this.shouldUseIntlApi()) {
17209
- const cleanedCode = getCleanedCode(code === "dev" ? "en" : code);
17210
- const type = options.ordinal ? "ordinal" : "cardinal";
17211
- const cacheKey = JSON.stringify({
17212
- cleanedCode,
17090
+ const cleanedCode = getCleanedCode(code === "dev" ? "en" : code);
17091
+ const type = options.ordinal ? "ordinal" : "cardinal";
17092
+ const cacheKey = JSON.stringify({
17093
+ cleanedCode,
17094
+ type
17095
+ });
17096
+ if (cacheKey in this.pluralRulesCache) {
17097
+ return this.pluralRulesCache[cacheKey];
17098
+ }
17099
+ let rule;
17100
+ try {
17101
+ rule = new Intl.PluralRules(cleanedCode, {
17213
17102
  type
17214
17103
  });
17215
- if (cacheKey in this.pluralRulesCache) {
17216
- return this.pluralRulesCache[cacheKey];
17217
- }
17218
- let rule;
17219
- try {
17220
- rule = new Intl.PluralRules(cleanedCode, {
17221
- type
17222
- });
17223
- } catch (err) {
17224
- if (!code.match(/-|_/)) return;
17225
- const lngPart = this.languageUtils.getLanguagePartFromCode(code);
17226
- rule = this.getRule(lngPart, options);
17104
+ } catch (err) {
17105
+ if (!Intl) {
17106
+ this.logger.error("No Intl support, please use an Intl polyfill!");
17107
+ return dummyRule;
17227
17108
  }
17228
- this.pluralRulesCache[cacheKey] = rule;
17229
- return rule;
17109
+ if (!code.match(/-|_/)) return dummyRule;
17110
+ const lngPart = this.languageUtils.getLanguagePartFromCode(code);
17111
+ rule = this.getRule(lngPart, options);
17230
17112
  }
17231
- return this.rules[code] || this.rules[this.languageUtils.getLanguagePartFromCode(code)];
17113
+ this.pluralRulesCache[cacheKey] = rule;
17114
+ return rule;
17232
17115
  }
17233
17116
  needsPlural(code) {
17234
17117
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
17235
- const rule = this.getRule(code, options);
17236
- if (this.shouldUseIntlApi()) {
17237
- return rule && rule.resolvedOptions().pluralCategories.length > 1;
17238
- }
17239
- return rule && rule.numbers.length > 1;
17118
+ let rule = this.getRule(code, options);
17119
+ if (!rule) rule = this.getRule("dev", options);
17120
+ return rule?.resolvedOptions().pluralCategories.length > 1;
17240
17121
  }
17241
17122
  getPluralFormsOfKey(code, key) {
17242
17123
  let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
@@ -17244,51 +17125,19 @@ var PluralResolver = class {
17244
17125
  }
17245
17126
  getSuffixes(code) {
17246
17127
  let options = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
17247
- const rule = this.getRule(code, options);
17248
- if (!rule) {
17249
- return [];
17250
- }
17251
- if (this.shouldUseIntlApi()) {
17252
- return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map((pluralCategory) => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ""}${pluralCategory}`);
17253
- }
17254
- return rule.numbers.map((number) => this.getSuffix(code, number, options));
17128
+ let rule = this.getRule(code, options);
17129
+ if (!rule) rule = this.getRule("dev", options);
17130
+ if (!rule) return [];
17131
+ return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map((pluralCategory) => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ""}${pluralCategory}`);
17255
17132
  }
17256
17133
  getSuffix(code, count) {
17257
17134
  let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
17258
17135
  const rule = this.getRule(code, options);
17259
17136
  if (rule) {
17260
- if (this.shouldUseIntlApi()) {
17261
- return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ""}${rule.select(count)}`;
17262
- }
17263
- return this.getSuffixRetroCompatible(rule, count);
17137
+ return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ""}${rule.select(count)}`;
17264
17138
  }
17265
17139
  this.logger.warn(`no plural rule found for: ${code}`);
17266
- return "";
17267
- }
17268
- getSuffixRetroCompatible(rule, count) {
17269
- const idx = rule.noAbs ? rule.plurals(count) : rule.plurals(Math.abs(count));
17270
- let suffix = rule.numbers[idx];
17271
- if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
17272
- if (suffix === 2) {
17273
- suffix = "plural";
17274
- } else if (suffix === 1) {
17275
- suffix = "";
17276
- }
17277
- }
17278
- const returnSuffix = () => this.options.prepend && suffix.toString() ? this.options.prepend + suffix.toString() : suffix.toString();
17279
- if (this.options.compatibilityJSON === "v1") {
17280
- if (suffix === 1) return "";
17281
- if (typeof suffix === "number") return `_plural_${suffix.toString()}`;
17282
- return returnSuffix();
17283
- } else if (this.options.compatibilityJSON === "v2") {
17284
- return returnSuffix();
17285
- } else if (this.options.simplifyPluralSuffix && rule.numbers.length === 2 && rule.numbers[0] === 1) {
17286
- return returnSuffix();
17287
- }
17288
- return this.options.prepend && idx.toString() ? this.options.prepend + idx.toString() : idx.toString();
17289
- }
17290
- shouldUseIntlApi() {
17291
- return !nonIntlVersions.includes(this.options.compatibilityJSON);
17140
+ return this.getSuffix("dev", count, options);
17292
17141
  }
17293
17142
  };
17294
17143
  var deepFindWithDefaults = function(data, defaultData, key) {
@@ -17307,7 +17156,7 @@ var Interpolator = class {
17307
17156
  let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
17308
17157
  this.logger = baseLogger.create("interpolator");
17309
17158
  this.options = options;
17310
- this.format = options.interpolation && options.interpolation.format || ((value2) => value2);
17159
+ this.format = options?.interpolation?.format || ((value2) => value2);
17311
17160
  this.init(options);
17312
17161
  }
17313
17162
  init() {
@@ -17354,7 +17203,7 @@ var Interpolator = class {
17354
17203
  }
17355
17204
  resetRegExp() {
17356
17205
  const getOrResetRegExp = (existingRegExp, pattern) => {
17357
- if (existingRegExp && existingRegExp.source === pattern) {
17206
+ if (existingRegExp?.source === pattern) {
17358
17207
  existingRegExp.lastIndex = 0;
17359
17208
  return existingRegExp;
17360
17209
  }
@@ -17388,8 +17237,8 @@ var Interpolator = class {
17388
17237
  });
17389
17238
  };
17390
17239
  this.resetRegExp();
17391
- const missingInterpolationHandler = options && options.missingInterpolationHandler || this.options.missingInterpolationHandler;
17392
- const skipOnVariables = options && options.interpolation && options.interpolation.skipOnVariables !== void 0 ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
17240
+ const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;
17241
+ const skipOnVariables = options?.interpolation?.skipOnVariables !== void 0 ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
17393
17242
  const todos = [{
17394
17243
  regex: this.regexpUnescape,
17395
17244
  safeValue: (val) => regexSafe(val)
@@ -17448,7 +17297,7 @@ var Interpolator = class {
17448
17297
  optionsString = this.interpolate(optionsString, clonedOptions);
17449
17298
  const matchedSingleQuotes = optionsString.match(/'/g);
17450
17299
  const matchedDoubleQuotes = optionsString.match(/"/g);
17451
- if (matchedSingleQuotes && matchedSingleQuotes.length % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {
17300
+ if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {
17452
17301
  optionsString = optionsString.replace(/'/g, '"');
17453
17302
  }
17454
17303
  try {
@@ -17615,7 +17464,7 @@ var Formatter = class {
17615
17464
  if (this.formats[formatName]) {
17616
17465
  let formatted = mem;
17617
17466
  try {
17618
- const valOptions = options && options.formatParams && options.formatParams[options.interpolationkey] || {};
17467
+ const valOptions = options?.formatParams?.[options.interpolationkey] || {};
17619
17468
  const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;
17620
17469
  formatted = this.formats[formatName](mem, l, {
17621
17470
  ...formatOptions,
@@ -17657,9 +17506,7 @@ var Connector = class extends EventEmitter {
17657
17506
  this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;
17658
17507
  this.state = {};
17659
17508
  this.queue = [];
17660
- if (this.backend && this.backend.init) {
17661
- this.backend.init(services, options.backend, options);
17662
- }
17509
+ this.backend?.init?.(services, options.backend, options);
17663
17510
  }
17664
17511
  queueLoad(languages, namespaces, options, callback) {
17665
17512
  const toLoad = {};
@@ -17827,12 +17674,12 @@ var Connector = class extends EventEmitter {
17827
17674
  let options = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : {};
17828
17675
  let clb = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : () => {
17829
17676
  };
17830
- if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(namespace)) {
17677
+ if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {
17831
17678
  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!!!");
17832
17679
  return;
17833
17680
  }
17834
17681
  if (key === void 0 || key === null || key === "") return;
17835
- if (this.backend && this.backend.create) {
17682
+ if (this.backend?.create) {
17836
17683
  const opts = {
17837
17684
  ...options,
17838
17685
  isUpdate
@@ -17864,7 +17711,7 @@ var Connector = class extends EventEmitter {
17864
17711
  };
17865
17712
  var get = () => ({
17866
17713
  debug: false,
17867
- initImmediate: true,
17714
+ initAsync: true,
17868
17715
  ns: ["translation"],
17869
17716
  defaultNS: ["translation"],
17870
17717
  fallbackLng: ["dev"],
@@ -17926,9 +17773,10 @@ var transformOptions = (options) => {
17926
17773
  if (isString2(options.ns)) options.ns = [options.ns];
17927
17774
  if (isString2(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];
17928
17775
  if (isString2(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];
17929
- if (options.supportedLngs && options.supportedLngs.indexOf("cimode") < 0) {
17776
+ if (options.supportedLngs?.indexOf?.("cimode") < 0) {
17930
17777
  options.supportedLngs = options.supportedLngs.concat(["cimode"]);
17931
17778
  }
17779
+ if (typeof options.initImmediate === "boolean") options.initAsync = options.initImmediate;
17932
17780
  return options;
17933
17781
  };
17934
17782
  var noop4 = () => {
@@ -17954,7 +17802,7 @@ var I18n = class _I18n extends EventEmitter {
17954
17802
  };
17955
17803
  bindMemberFunctions(this);
17956
17804
  if (callback && !this.isInitialized && !options.isClone) {
17957
- if (!this.options.initImmediate) {
17805
+ if (!this.options.initAsync) {
17958
17806
  this.init(options, callback);
17959
17807
  return this;
17960
17808
  }
@@ -17972,7 +17820,7 @@ var I18n = class _I18n extends EventEmitter {
17972
17820
  callback = options;
17973
17821
  options = {};
17974
17822
  }
17975
- if (!options.defaultNS && options.defaultNS !== false && options.ns) {
17823
+ if (options.defaultNS == null && options.ns) {
17976
17824
  if (isString2(options.ns)) {
17977
17825
  options.defaultNS = options.ns;
17978
17826
  } else if (options.ns.indexOf("translation") < 0) {
@@ -17985,12 +17833,10 @@ var I18n = class _I18n extends EventEmitter {
17985
17833
  ...this.options,
17986
17834
  ...transformOptions(options)
17987
17835
  };
17988
- if (this.options.compatibilityAPI !== "v1") {
17989
- this.options.interpolation = {
17990
- ...defOpts.interpolation,
17991
- ...this.options.interpolation
17992
- };
17993
- }
17836
+ this.options.interpolation = {
17837
+ ...defOpts.interpolation,
17838
+ ...this.options.interpolation
17839
+ };
17994
17840
  if (options.keySeparator !== void 0) {
17995
17841
  this.options.userDefinedKeySeparator = options.keySeparator;
17996
17842
  }
@@ -18011,7 +17857,7 @@ var I18n = class _I18n extends EventEmitter {
18011
17857
  let formatter;
18012
17858
  if (this.modules.formatter) {
18013
17859
  formatter = this.modules.formatter;
18014
- } else if (typeof Intl !== "undefined") {
17860
+ } else {
18015
17861
  formatter = Formatter;
18016
17862
  }
18017
17863
  const lu = new LanguageUtil(this.options);
@@ -18022,7 +17868,6 @@ var I18n = class _I18n extends EventEmitter {
18022
17868
  s2.languageUtils = lu;
18023
17869
  s2.pluralResolver = new PluralResolver(lu, {
18024
17870
  prepend: this.options.pluralSeparator,
18025
- compatibilityJSON: this.options.compatibilityJSON,
18026
17871
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
18027
17872
  });
18028
17873
  if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {
@@ -18093,10 +17938,10 @@ var I18n = class _I18n extends EventEmitter {
18093
17938
  deferred.resolve(t3);
18094
17939
  callback(err, t3);
18095
17940
  };
18096
- if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized) return finish(null, this.t.bind(this));
17941
+ if (this.languages && !this.isInitialized) return finish(null, this.t.bind(this));
18097
17942
  this.changeLanguage(this.options.lng, finish);
18098
17943
  };
18099
- if (this.options.resources || !this.options.initImmediate) {
17944
+ if (this.options.resources || !this.options.initAsync) {
18100
17945
  load();
18101
17946
  } else {
18102
17947
  setTimeout(load, 0);
@@ -18109,7 +17954,7 @@ var I18n = class _I18n extends EventEmitter {
18109
17954
  const usedLng = isString2(language) ? language : this.language;
18110
17955
  if (typeof language === "function") usedCallback = language;
18111
17956
  if (!this.options.resources || this.options.partialBundledLanguages) {
18112
- if (usedLng && usedLng.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();
17957
+ if (usedLng?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();
18113
17958
  const toLoad = [];
18114
17959
  const append = (lng) => {
18115
17960
  if (!lng) return;
@@ -18126,9 +17971,7 @@ var I18n = class _I18n extends EventEmitter {
18126
17971
  } else {
18127
17972
  append(usedLng);
18128
17973
  }
18129
- if (this.options.preload) {
18130
- this.options.preload.forEach((l) => append(l));
18131
- }
17974
+ this.options.preload?.forEach?.((l) => append(l));
18132
17975
  this.services.backendConnector.load(toLoad, this.options.ns, (e2) => {
18133
17976
  if (!e2 && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);
18134
17977
  usedCallback(e2);
@@ -18230,7 +18073,7 @@ var I18n = class _I18n extends EventEmitter {
18230
18073
  setLngProps(l);
18231
18074
  }
18232
18075
  if (!this.translator.language) this.translator.changeLanguage(l);
18233
- if (this.services.languageDetector && this.services.languageDetector.cacheUserLanguage) this.services.languageDetector.cacheUserLanguage(l);
18076
+ this.services.languageDetector?.cacheUserLanguage?.(l);
18234
18077
  }
18235
18078
  this.loadResources(l, (err) => {
18236
18079
  done(err, l);
@@ -18286,10 +18129,16 @@ var I18n = class _I18n extends EventEmitter {
18286
18129
  return fixedT;
18287
18130
  }
18288
18131
  t() {
18289
- return this.translator && this.translator.translate(...arguments);
18132
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
18133
+ args[_key4] = arguments[_key4];
18134
+ }
18135
+ return this.translator?.translate(...args);
18290
18136
  }
18291
18137
  exists() {
18292
- return this.translator && this.translator.exists(...arguments);
18138
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
18139
+ args[_key5] = arguments[_key5];
18140
+ }
18141
+ return this.translator?.exists(...args);
18293
18142
  }
18294
18143
  setDefaultNamespace(ns) {
18295
18144
  this.options.defaultNS = ns;
@@ -18354,10 +18203,10 @@ var I18n = class _I18n extends EventEmitter {
18354
18203
  return deferred;
18355
18204
  }
18356
18205
  dir(lng) {
18357
- if (!lng) lng = this.resolvedLanguage || (this.languages && this.languages.length > 0 ? this.languages[0] : this.language);
18206
+ if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);
18358
18207
  if (!lng) return "rtl";
18359
18208
  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"];
18360
- const languageUtils = this.services && this.services.languageUtils || new LanguageUtil(get());
18209
+ const languageUtils = this.services?.languageUtils || new LanguageUtil(get());
18361
18210
  return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
18362
18211
  }
18363
18212
  static createInstance() {
@@ -18392,13 +18241,24 @@ var I18n = class _I18n extends EventEmitter {
18392
18241
  hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)
18393
18242
  };
18394
18243
  if (forkResourceStore) {
18395
- clone.store = new ResourceStore(this.store.data, mergedOptions);
18244
+ const clonedData = Object.keys(this.store.data).reduce((prev, l) => {
18245
+ prev[l] = {
18246
+ ...this.store.data[l]
18247
+ };
18248
+ return Object.keys(prev[l]).reduce((acc, n2) => {
18249
+ acc[n2] = {
18250
+ ...prev[l][n2]
18251
+ };
18252
+ return acc;
18253
+ }, {});
18254
+ }, {});
18255
+ clone.store = new ResourceStore(clonedData, mergedOptions);
18396
18256
  clone.services.resourceStore = clone.store;
18397
18257
  }
18398
18258
  clone.translator = new Translator(clone.services, mergedOptions);
18399
18259
  clone.translator.on("*", function(event) {
18400
- for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
18401
- args[_key4 - 1] = arguments[_key4];
18260
+ for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {
18261
+ args[_key6 - 1] = arguments[_key6];
18402
18262
  }
18403
18263
  clone.emit(event, ...args);
18404
18264
  });
@@ -18541,4 +18401,4 @@ react-reconciler/cjs/react-reconciler-constants.production.min.js:
18541
18401
  * LICENSE file in the root directory of this source tree.
18542
18402
  *)
18543
18403
  */
18544
- //# sourceMappingURL=chunk-5EXKEGN6.js.map
18404
+ //# sourceMappingURL=chunk-WVS26NCB.js.map