@dovetail-v2/refine 0.0.3 → 0.0.4

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.
@@ -18,6 +18,7 @@ import { setDiagnosticsOptions } from "monaco-yaml";
18
18
  import ReactDOM from "react-dom";
19
19
  import require$$0 from "ky";
20
20
  import require$$2 from "mitt";
21
+ import i18n from "i18next";
21
22
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
22
23
  var jsxRuntime = { exports: {} };
23
24
  var reactJsxRuntime_production_min = {};
@@ -142,9 +143,9 @@ function requireReactJsxRuntime_development() {
142
143
  var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
143
144
  var stack = "";
144
145
  if (currentlyValidatingElement) {
145
- var name = getComponentName(currentlyValidatingElement.type);
146
+ var name2 = getComponentName(currentlyValidatingElement.type);
146
147
  var owner = currentlyValidatingElement._owner;
147
- stack += describeComponentFrame(name, currentlyValidatingElement._source, owner && getComponentName(owner.type));
148
+ stack += describeComponentFrame(name2, currentlyValidatingElement._source, owner && getComponentName(owner.type));
148
149
  }
149
150
  stack += ReactDebugCurrentFrame.getStackAddendum();
150
151
  if (stack !== "") {
@@ -159,22 +160,22 @@ function requireReactJsxRuntime_development() {
159
160
  }
160
161
  }
161
162
  var enableScopeAPI = false;
162
- function isValidElementType(type) {
163
- if (typeof type === "string" || typeof type === "function") {
163
+ function isValidElementType(type2) {
164
+ if (typeof type2 === "string" || typeof type2 === "function") {
164
165
  return true;
165
166
  }
166
- if (type === exports.Fragment || type === REACT_PROFILER_TYPE || type === REACT_DEBUG_TRACING_MODE_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || type === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) {
167
+ if (type2 === exports.Fragment || type2 === REACT_PROFILER_TYPE || type2 === REACT_DEBUG_TRACING_MODE_TYPE || type2 === REACT_STRICT_MODE_TYPE || type2 === REACT_SUSPENSE_TYPE || type2 === REACT_SUSPENSE_LIST_TYPE || type2 === REACT_LEGACY_HIDDEN_TYPE || enableScopeAPI) {
167
168
  return true;
168
169
  }
169
- if (typeof type === "object" && type !== null) {
170
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_BLOCK_TYPE || type[0] === REACT_SERVER_BLOCK_TYPE) {
170
+ if (typeof type2 === "object" && type2 !== null) {
171
+ if (type2.$$typeof === REACT_LAZY_TYPE || type2.$$typeof === REACT_MEMO_TYPE || type2.$$typeof === REACT_PROVIDER_TYPE || type2.$$typeof === REACT_CONTEXT_TYPE || type2.$$typeof === REACT_FORWARD_REF_TYPE || type2.$$typeof === REACT_FUNDAMENTAL_TYPE || type2.$$typeof === REACT_BLOCK_TYPE || type2[0] === REACT_SERVER_BLOCK_TYPE) {
171
172
  return true;
172
173
  }
173
174
  }
174
175
  return false;
175
176
  }
176
177
  var BEFORE_SLASH_RE = /^(.*)[\\\/]/;
177
- function describeComponentFrame(name, source, ownerName) {
178
+ function describeComponentFrame(name2, source, ownerName) {
178
179
  var sourceInfo = "";
179
180
  if (source) {
180
181
  var path = source.fileName;
@@ -195,7 +196,7 @@ function requireReactJsxRuntime_development() {
195
196
  } else if (ownerName) {
196
197
  sourceInfo = " (created by " + ownerName + ")";
197
198
  }
198
- return "\n in " + (name || "Unknown") + sourceInfo;
199
+ return "\n in " + (name2 || "Unknown") + sourceInfo;
199
200
  }
200
201
  var Resolved = 1;
201
202
  function refineResolvedLazyComponent(lazyComponent) {
@@ -205,22 +206,22 @@ function requireReactJsxRuntime_development() {
205
206
  var functionName = innerType.displayName || innerType.name || "";
206
207
  return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName);
207
208
  }
208
- function getComponentName(type) {
209
- if (type == null) {
209
+ function getComponentName(type2) {
210
+ if (type2 == null) {
210
211
  return null;
211
212
  }
212
213
  {
213
- if (typeof type.tag === "number") {
214
+ if (typeof type2.tag === "number") {
214
215
  error("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue.");
215
216
  }
216
217
  }
217
- if (typeof type === "function") {
218
- return type.displayName || type.name || null;
218
+ if (typeof type2 === "function") {
219
+ return type2.displayName || type2.name || null;
219
220
  }
220
- if (typeof type === "string") {
221
- return type;
221
+ if (typeof type2 === "string") {
222
+ return type2;
222
223
  }
223
- switch (type) {
224
+ switch (type2) {
224
225
  case exports.Fragment:
225
226
  return "Fragment";
226
227
  case REACT_PORTAL_TYPE:
@@ -234,20 +235,20 @@ function requireReactJsxRuntime_development() {
234
235
  case REACT_SUSPENSE_LIST_TYPE:
235
236
  return "SuspenseList";
236
237
  }
237
- if (typeof type === "object") {
238
- switch (type.$$typeof) {
238
+ if (typeof type2 === "object") {
239
+ switch (type2.$$typeof) {
239
240
  case REACT_CONTEXT_TYPE:
240
241
  return "Context.Consumer";
241
242
  case REACT_PROVIDER_TYPE:
242
243
  return "Context.Provider";
243
244
  case REACT_FORWARD_REF_TYPE:
244
- return getWrappedName(type, type.render, "ForwardRef");
245
+ return getWrappedName(type2, type2.render, "ForwardRef");
245
246
  case REACT_MEMO_TYPE:
246
- return getComponentName(type.type);
247
+ return getComponentName(type2.type);
247
248
  case REACT_BLOCK_TYPE:
248
- return getComponentName(type.render);
249
+ return getComponentName(type2.render);
249
250
  case REACT_LAZY_TYPE: {
250
- var thenable = type;
251
+ var thenable = type2;
251
252
  var resolvedThenable = refineResolvedLazyComponent(thenable);
252
253
  if (resolvedThenable) {
253
254
  return getComponentName(resolvedThenable);
@@ -374,10 +375,10 @@ function requireReactJsxRuntime_development() {
374
375
  });
375
376
  }
376
377
  }
377
- var ReactElement = function(type, key, ref, self2, source, owner, props) {
378
+ var ReactElement = function(type2, key, ref, self2, source, owner, props) {
378
379
  var element = {
379
380
  $$typeof: REACT_ELEMENT_TYPE,
380
- type,
381
+ type: type2,
381
382
  key,
382
383
  ref,
383
384
  props,
@@ -410,7 +411,7 @@ function requireReactJsxRuntime_development() {
410
411
  }
411
412
  return element;
412
413
  };
413
- function jsxDEV(type, config, maybeKey, source, self2) {
414
+ function jsxDEV(type2, config, maybeKey, source, self2) {
414
415
  {
415
416
  var propName;
416
417
  var props = {};
@@ -431,8 +432,8 @@ function requireReactJsxRuntime_development() {
431
432
  props[propName] = config[propName];
432
433
  }
433
434
  }
434
- if (type && type.defaultProps) {
435
- var defaultProps = type.defaultProps;
435
+ if (type2 && type2.defaultProps) {
436
+ var defaultProps = type2.defaultProps;
436
437
  for (propName in defaultProps) {
437
438
  if (props[propName] === void 0) {
438
439
  props[propName] = defaultProps[propName];
@@ -440,7 +441,7 @@ function requireReactJsxRuntime_development() {
440
441
  }
441
442
  }
442
443
  if (key || ref) {
443
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
444
+ var displayName = typeof type2 === "function" ? type2.displayName || type2.name || "Unknown" : type2;
444
445
  if (key) {
445
446
  defineKeyPropWarningGetter(props, displayName);
446
447
  }
@@ -448,7 +449,7 @@ function requireReactJsxRuntime_development() {
448
449
  defineRefPropWarningGetter(props, displayName);
449
450
  }
450
451
  }
451
- return ReactElement(type, key, ref, self2, source, ReactCurrentOwner.current, props);
452
+ return ReactElement(type2, key, ref, self2, source, ReactCurrentOwner.current, props);
452
453
  }
453
454
  }
454
455
  var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
@@ -468,9 +469,9 @@ function requireReactJsxRuntime_development() {
468
469
  function getDeclarationErrorAddendum() {
469
470
  {
470
471
  if (ReactCurrentOwner$1.current) {
471
- var name = getComponentName(ReactCurrentOwner$1.current.type);
472
- if (name) {
473
- return "\n\nCheck the render method of `" + name + "`.";
472
+ var name2 = getComponentName(ReactCurrentOwner$1.current.type);
473
+ if (name2) {
474
+ return "\n\nCheck the render method of `" + name2 + "`.";
474
475
  }
475
476
  }
476
477
  return "";
@@ -553,27 +554,27 @@ function requireReactJsxRuntime_development() {
553
554
  }
554
555
  function validatePropTypes(element) {
555
556
  {
556
- var type = element.type;
557
- if (type === null || type === void 0 || typeof type === "string") {
557
+ var type2 = element.type;
558
+ if (type2 === null || type2 === void 0 || typeof type2 === "string") {
558
559
  return;
559
560
  }
560
561
  var propTypes;
561
- if (typeof type === "function") {
562
- propTypes = type.propTypes;
563
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_MEMO_TYPE)) {
564
- propTypes = type.propTypes;
562
+ if (typeof type2 === "function") {
563
+ propTypes = type2.propTypes;
564
+ } else if (typeof type2 === "object" && (type2.$$typeof === REACT_FORWARD_REF_TYPE || type2.$$typeof === REACT_MEMO_TYPE)) {
565
+ propTypes = type2.propTypes;
565
566
  } else {
566
567
  return;
567
568
  }
568
569
  if (propTypes) {
569
- var name = getComponentName(type);
570
- checkPropTypes(propTypes, element.props, "prop", name, element);
571
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
570
+ var name2 = getComponentName(type2);
571
+ checkPropTypes(propTypes, element.props, "prop", name2, element);
572
+ } else if (type2.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
572
573
  propTypesMisspellWarningShown = true;
573
- var _name = getComponentName(type);
574
+ var _name = getComponentName(type2);
574
575
  error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
575
576
  }
576
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
577
+ if (typeof type2.getDefaultProps === "function" && !type2.getDefaultProps.isReactClassApproved) {
577
578
  error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
578
579
  }
579
580
  }
@@ -597,12 +598,12 @@ function requireReactJsxRuntime_development() {
597
598
  }
598
599
  }
599
600
  }
600
- function jsxWithValidation(type, props, key, isStaticChildren, source, self2) {
601
+ function jsxWithValidation(type2, props, key, isStaticChildren, source, self2) {
601
602
  {
602
- var validType = isValidElementType(type);
603
+ var validType = isValidElementType(type2);
603
604
  if (!validType) {
604
605
  var info = "";
605
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
606
+ if (type2 === void 0 || typeof type2 === "object" && type2 !== null && Object.keys(type2).length === 0) {
606
607
  info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
607
608
  }
608
609
  var sourceInfo = getSourceInfoErrorAddendum(source);
@@ -612,19 +613,19 @@ function requireReactJsxRuntime_development() {
612
613
  info += getDeclarationErrorAddendum();
613
614
  }
614
615
  var typeString;
615
- if (type === null) {
616
+ if (type2 === null) {
616
617
  typeString = "null";
617
- } else if (Array.isArray(type)) {
618
+ } else if (Array.isArray(type2)) {
618
619
  typeString = "array";
619
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
620
- typeString = "<" + (getComponentName(type.type) || "Unknown") + " />";
620
+ } else if (type2 !== void 0 && type2.$$typeof === REACT_ELEMENT_TYPE) {
621
+ typeString = "<" + (getComponentName(type2.type) || "Unknown") + " />";
621
622
  info = " Did you accidentally export a JSX literal instead of a component?";
622
623
  } else {
623
- typeString = typeof type;
624
+ typeString = typeof type2;
624
625
  }
625
626
  error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
626
627
  }
627
- var element = jsxDEV(type, props, key, source, self2);
628
+ var element = jsxDEV(type2, props, key, source, self2);
628
629
  if (element == null) {
629
630
  return element;
630
631
  }
@@ -634,7 +635,7 @@ function requireReactJsxRuntime_development() {
634
635
  if (isStaticChildren) {
635
636
  if (Array.isArray(children)) {
636
637
  for (var i = 0; i < children.length; i++) {
637
- validateChildKeys(children[i], type);
638
+ validateChildKeys(children[i], type2);
638
639
  }
639
640
  if (Object.freeze) {
640
641
  Object.freeze(children);
@@ -643,11 +644,11 @@ function requireReactJsxRuntime_development() {
643
644
  error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
644
645
  }
645
646
  } else {
646
- validateChildKeys(children, type);
647
+ validateChildKeys(children, type2);
647
648
  }
648
649
  }
649
650
  }
650
- if (type === exports.Fragment) {
651
+ if (type2 === exports.Fragment) {
651
652
  validateFragmentProps(element);
652
653
  } else {
653
654
  validatePropTypes(element);
@@ -655,14 +656,14 @@ function requireReactJsxRuntime_development() {
655
656
  return element;
656
657
  }
657
658
  }
658
- function jsxWithValidationStatic(type, props, key) {
659
+ function jsxWithValidationStatic(type2, props, key) {
659
660
  {
660
- return jsxWithValidation(type, props, key, true);
661
+ return jsxWithValidation(type2, props, key, true);
661
662
  }
662
663
  }
663
- function jsxWithValidationDynamic(type, props, key) {
664
+ function jsxWithValidationDynamic(type2, props, key) {
664
665
  {
665
- return jsxWithValidation(type, props, key, false);
666
+ return jsxWithValidation(type2, props, key, false);
666
667
  }
667
668
  }
668
669
  var jsx = jsxWithValidationDynamic;
@@ -703,7 +704,7 @@ const routerProvider = {
703
704
  const { search: existingSearch, hash: existingHash } = useLocation();
704
705
  const history2 = useHistory();
705
706
  const fn = useCallback(
706
- ({ to, type, query, hash, options: { keepQuery, keepHash } = {} }) => {
707
+ ({ to, type: type2, query, hash, options: { keepQuery, keepHash } = {} }) => {
707
708
  const urlQuery = {
708
709
  ...keepQuery && existingSearch && parse(existingSearch, { ignoreQueryPrefix: true }),
709
710
  ...query
@@ -719,10 +720,10 @@ const routerProvider = {
719
720
  const hasUrlHash = urlHash.length > 1;
720
721
  const urlTo = to || "";
721
722
  const fullPath = `${urlTo}${hasUrlQuery ? stringify(urlQuery, stringifyConfig) : ""}${hasUrlHash ? urlHash : ""}`;
722
- if (type === "path") {
723
+ if (type2 === "path") {
723
724
  return fullPath;
724
725
  }
725
- return history2[type || "push"](fullPath);
726
+ return history2[type2 || "push"](fullPath);
726
727
  },
727
728
  [existingHash, existingSearch, history2]
728
729
  );
@@ -739,10 +740,10 @@ const routerProvider = {
739
740
  var _a;
740
741
  let params = useParams();
741
742
  const { pathname, search } = useLocation();
742
- const { resources } = useContext(ResourceContext);
743
+ const { resources: resources2 } = useContext(ResourceContext);
743
744
  const { resource, action, matchedRoute } = React.useMemo(() => {
744
- return matchResourceFromRoute(pathname, resources);
745
- }, [resources, pathname]);
745
+ return matchResourceFromRoute(pathname, resources2);
746
+ }, [resources2, pathname]);
746
747
  if (Object.entries(params).length === 0 && matchedRoute) {
747
748
  params = ((_a = matchPath(matchedRoute, pathname)) == null ? void 0 : _a.params) || {};
748
749
  }
@@ -807,63 +808,63 @@ function warnOnce() {
807
808
  alreadyWarned[args[0]] = new Date();
808
809
  warn(...args);
809
810
  }
810
- const loadedClb = (i18n, cb) => () => {
811
- if (i18n.isInitialized) {
811
+ const loadedClb = (i18n2, cb) => () => {
812
+ if (i18n2.isInitialized) {
812
813
  cb();
813
814
  } else {
814
815
  const initialized = () => {
815
816
  setTimeout(() => {
816
- i18n.off("initialized", initialized);
817
+ i18n2.off("initialized", initialized);
817
818
  }, 0);
818
819
  cb();
819
820
  };
820
- i18n.on("initialized", initialized);
821
+ i18n2.on("initialized", initialized);
821
822
  }
822
823
  };
823
- function loadNamespaces(i18n, ns, cb) {
824
- i18n.loadNamespaces(ns, loadedClb(i18n, cb));
824
+ function loadNamespaces(i18n2, ns, cb) {
825
+ i18n2.loadNamespaces(ns, loadedClb(i18n2, cb));
825
826
  }
826
- function loadLanguages(i18n, lng, ns, cb) {
827
+ function loadLanguages(i18n2, lng, ns, cb) {
827
828
  if (typeof ns === "string")
828
829
  ns = [ns];
829
830
  ns.forEach((n) => {
830
- if (i18n.options.ns.indexOf(n) < 0)
831
- i18n.options.ns.push(n);
831
+ if (i18n2.options.ns.indexOf(n) < 0)
832
+ i18n2.options.ns.push(n);
832
833
  });
833
- i18n.loadLanguages(lng, loadedClb(i18n, cb));
834
+ i18n2.loadLanguages(lng, loadedClb(i18n2, cb));
834
835
  }
835
- function oldI18nextHasLoadedNamespace(ns, i18n) {
836
+ function oldI18nextHasLoadedNamespace(ns, i18n2) {
836
837
  let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
837
- const lng = i18n.languages[0];
838
- const fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
839
- const lastLng = i18n.languages[i18n.languages.length - 1];
838
+ const lng = i18n2.languages[0];
839
+ const fallbackLng = i18n2.options ? i18n2.options.fallbackLng : false;
840
+ const lastLng = i18n2.languages[i18n2.languages.length - 1];
840
841
  if (lng.toLowerCase() === "cimode")
841
842
  return true;
842
843
  const loadNotPending = (l, n) => {
843
- const loadState = i18n.services.backendConnector.state[`${l}|${n}`];
844
+ const loadState = i18n2.services.backendConnector.state[`${l}|${n}`];
844
845
  return loadState === -1 || loadState === 2;
845
846
  };
846
- if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns))
847
+ if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18n2.services.backendConnector.backend && i18n2.isLanguageChangingTo && !loadNotPending(i18n2.isLanguageChangingTo, ns))
847
848
  return false;
848
- if (i18n.hasResourceBundle(lng, ns))
849
+ if (i18n2.hasResourceBundle(lng, ns))
849
850
  return true;
850
- if (!i18n.services.backendConnector.backend || i18n.options.resources && !i18n.options.partialBundledLanguages)
851
+ if (!i18n2.services.backendConnector.backend || i18n2.options.resources && !i18n2.options.partialBundledLanguages)
851
852
  return true;
852
853
  if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns)))
853
854
  return true;
854
855
  return false;
855
856
  }
856
- function hasLoadedNamespace(ns, i18n) {
857
+ function hasLoadedNamespace(ns, i18n2) {
857
858
  let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
858
- if (!i18n.languages || !i18n.languages.length) {
859
- warnOnce("i18n.languages were undefined or empty", i18n.languages);
859
+ if (!i18n2.languages || !i18n2.languages.length) {
860
+ warnOnce("i18n.languages were undefined or empty", i18n2.languages);
860
861
  return true;
861
862
  }
862
- const isNewerI18next = i18n.options.ignoreJSONStructure !== void 0;
863
+ const isNewerI18next = i18n2.options.ignoreJSONStructure !== void 0;
863
864
  if (!isNewerI18next) {
864
- return oldI18nextHasLoadedNamespace(ns, i18n, options);
865
+ return oldI18nextHasLoadedNamespace(ns, i18n2, options);
865
866
  }
866
- return i18n.hasLoadedNamespace(ns, {
867
+ return i18n2.hasLoadedNamespace(ns, {
867
868
  lng: options.lng,
868
869
  precheck: (i18nInstance2, loadNotPending) => {
869
870
  if (options.bindI18n && options.bindI18n.indexOf("languageChanging") > -1 && i18nInstance2.services.backendConnector.backend && i18nInstance2.isLanguageChangingTo && !loadNotPending(i18nInstance2.isLanguageChangingTo, ns))
@@ -906,13 +907,30 @@ let defaultOptions = {
906
907
  useSuspense: true,
907
908
  unescape
908
909
  };
910
+ function setDefaults() {
911
+ let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
912
+ defaultOptions = {
913
+ ...defaultOptions,
914
+ ...options
915
+ };
916
+ }
909
917
  function getDefaults() {
910
918
  return defaultOptions;
911
919
  }
912
920
  let i18nInstance;
921
+ function setI18n(instance) {
922
+ i18nInstance = instance;
923
+ }
913
924
  function getI18n() {
914
925
  return i18nInstance;
915
926
  }
927
+ const initReactI18next = {
928
+ type: "3rdParty",
929
+ init(instance) {
930
+ setDefaults(instance.options.react);
931
+ setI18n(instance);
932
+ }
933
+ };
916
934
  const I18nContext = createContext();
917
935
  class ReportNamespaces {
918
936
  constructor() {
@@ -944,10 +962,10 @@ function useTranslation(ns) {
944
962
  i18n: i18nFromContext,
945
963
  defaultNS: defaultNSFromContext
946
964
  } = useContext(I18nContext) || {};
947
- const i18n = i18nFromProps || i18nFromContext || getI18n();
948
- if (i18n && !i18n.reportNamespaces)
949
- i18n.reportNamespaces = new ReportNamespaces();
950
- if (!i18n) {
965
+ const i18n2 = i18nFromProps || i18nFromContext || getI18n();
966
+ if (i18n2 && !i18n2.reportNamespaces)
967
+ i18n2.reportNamespaces = new ReportNamespaces();
968
+ if (!i18n2) {
951
969
  warnOnce("You will need to pass in an i18next instance by using initReactI18next");
952
970
  const notReadyT = (k2, optsOrDefaultValue) => {
953
971
  if (typeof optsOrDefaultValue === "string")
@@ -962,24 +980,24 @@ function useTranslation(ns) {
962
980
  retNotReady.ready = false;
963
981
  return retNotReady;
964
982
  }
965
- if (i18n.options.react && i18n.options.react.wait !== void 0)
983
+ if (i18n2.options.react && i18n2.options.react.wait !== void 0)
966
984
  warnOnce("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
967
985
  const i18nOptions = {
968
986
  ...getDefaults(),
969
- ...i18n.options.react,
987
+ ...i18n2.options.react,
970
988
  ...props
971
989
  };
972
990
  const {
973
991
  useSuspense,
974
992
  keyPrefix
975
993
  } = i18nOptions;
976
- let namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
994
+ let namespaces = ns || defaultNSFromContext || i18n2.options && i18n2.options.defaultNS;
977
995
  namespaces = typeof namespaces === "string" ? [namespaces] : namespaces || ["translation"];
978
- if (i18n.reportNamespaces.addUsedNamespaces)
979
- i18n.reportNamespaces.addUsedNamespaces(namespaces);
980
- const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n, i18nOptions));
996
+ if (i18n2.reportNamespaces.addUsedNamespaces)
997
+ i18n2.reportNamespaces.addUsedNamespaces(namespaces);
998
+ const ready2 = (i18n2.isInitialized || i18n2.initializedStoreOnce) && namespaces.every((n) => hasLoadedNamespace(n, i18n2, i18nOptions));
981
999
  function getT() {
982
- return i18n.getFixedT(props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
1000
+ return i18n2.getFixedT(props.lng || null, i18nOptions.nsMode === "fallback" ? namespaces : namespaces[0], keyPrefix);
983
1001
  }
984
1002
  const [t, setT] = useState(getT);
985
1003
  let joinedNS = namespaces.join();
@@ -993,58 +1011,58 @@ function useTranslation(ns) {
993
1011
  bindI18nStore
994
1012
  } = i18nOptions;
995
1013
  isMounted.current = true;
996
- if (!ready && !useSuspense) {
1014
+ if (!ready2 && !useSuspense) {
997
1015
  if (props.lng) {
998
- loadLanguages(i18n, props.lng, namespaces, () => {
1016
+ loadLanguages(i18n2, props.lng, namespaces, () => {
999
1017
  if (isMounted.current)
1000
1018
  setT(getT);
1001
1019
  });
1002
1020
  } else {
1003
- loadNamespaces(i18n, namespaces, () => {
1021
+ loadNamespaces(i18n2, namespaces, () => {
1004
1022
  if (isMounted.current)
1005
1023
  setT(getT);
1006
1024
  });
1007
1025
  }
1008
1026
  }
1009
- if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
1027
+ if (ready2 && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
1010
1028
  setT(getT);
1011
1029
  }
1012
1030
  function boundReset() {
1013
1031
  if (isMounted.current)
1014
1032
  setT(getT);
1015
1033
  }
1016
- if (bindI18n && i18n)
1017
- i18n.on(bindI18n, boundReset);
1018
- if (bindI18nStore && i18n)
1019
- i18n.store.on(bindI18nStore, boundReset);
1034
+ if (bindI18n && i18n2)
1035
+ i18n2.on(bindI18n, boundReset);
1036
+ if (bindI18nStore && i18n2)
1037
+ i18n2.store.on(bindI18nStore, boundReset);
1020
1038
  return () => {
1021
1039
  isMounted.current = false;
1022
- if (bindI18n && i18n)
1023
- bindI18n.split(" ").forEach((e) => i18n.off(e, boundReset));
1024
- if (bindI18nStore && i18n)
1025
- bindI18nStore.split(" ").forEach((e) => i18n.store.off(e, boundReset));
1040
+ if (bindI18n && i18n2)
1041
+ bindI18n.split(" ").forEach((e) => i18n2.off(e, boundReset));
1042
+ if (bindI18nStore && i18n2)
1043
+ bindI18nStore.split(" ").forEach((e) => i18n2.store.off(e, boundReset));
1026
1044
  };
1027
- }, [i18n, joinedNS]);
1045
+ }, [i18n2, joinedNS]);
1028
1046
  const isInitial = useRef(true);
1029
1047
  useEffect(() => {
1030
1048
  if (isMounted.current && !isInitial.current) {
1031
1049
  setT(getT);
1032
1050
  }
1033
1051
  isInitial.current = false;
1034
- }, [i18n, keyPrefix]);
1035
- const ret = [t, i18n, ready];
1052
+ }, [i18n2, keyPrefix]);
1053
+ const ret = [t, i18n2, ready2];
1036
1054
  ret.t = t;
1037
- ret.i18n = i18n;
1038
- ret.ready = ready;
1039
- if (ready)
1055
+ ret.i18n = i18n2;
1056
+ ret.ready = ready2;
1057
+ if (ready2)
1040
1058
  return ret;
1041
- if (!ready && !useSuspense)
1059
+ if (!ready2 && !useSuspense)
1042
1060
  return ret;
1043
1061
  throw new Promise((resolve) => {
1044
1062
  if (props.lng) {
1045
- loadLanguages(i18n, props.lng, namespaces, () => resolve());
1063
+ loadLanguages(i18n2, props.lng, namespaces, () => resolve());
1046
1064
  } else {
1047
- loadNamespaces(i18n, namespaces, () => resolve());
1065
+ loadNamespaces(i18n2, namespaces, () => resolve());
1048
1066
  }
1049
1067
  });
1050
1068
  }
@@ -1666,9 +1684,9 @@ var lodash = { exports: {} };
1666
1684
  return reHasUnicodeWord.test(string);
1667
1685
  }
1668
1686
  function iteratorToArray(iterator) {
1669
- var data, result = [];
1670
- while (!(data = iterator.next()).done) {
1671
- result.push(data.value);
1687
+ var data2, result = [];
1688
+ while (!(data2 = iterator.next()).done) {
1689
+ result.push(data2.value);
1672
1690
  }
1673
1691
  return result;
1674
1692
  }
@@ -1877,11 +1895,11 @@ var lodash = { exports: {} };
1877
1895
  index += dir;
1878
1896
  var iterIndex = -1, value = array[index];
1879
1897
  while (++iterIndex < iterLength) {
1880
- var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
1881
- if (type == LAZY_MAP_FLAG) {
1898
+ var data2 = iteratees[iterIndex], iteratee2 = data2.iteratee, type2 = data2.type, computed = iteratee2(value);
1899
+ if (type2 == LAZY_MAP_FLAG) {
1882
1900
  value = computed;
1883
1901
  } else if (!computed) {
1884
- if (type == LAZY_FILTER_FLAG) {
1902
+ if (type2 == LAZY_FILTER_FLAG) {
1885
1903
  continue outer;
1886
1904
  } else {
1887
1905
  break outer;
@@ -1912,21 +1930,21 @@ var lodash = { exports: {} };
1912
1930
  return result2;
1913
1931
  }
1914
1932
  function hashGet(key) {
1915
- var data = this.__data__;
1933
+ var data2 = this.__data__;
1916
1934
  if (nativeCreate) {
1917
- var result2 = data[key];
1935
+ var result2 = data2[key];
1918
1936
  return result2 === HASH_UNDEFINED ? undefined$1 : result2;
1919
1937
  }
1920
- return hasOwnProperty.call(data, key) ? data[key] : undefined$1;
1938
+ return hasOwnProperty.call(data2, key) ? data2[key] : undefined$1;
1921
1939
  }
1922
1940
  function hashHas(key) {
1923
- var data = this.__data__;
1924
- return nativeCreate ? data[key] !== undefined$1 : hasOwnProperty.call(data, key);
1941
+ var data2 = this.__data__;
1942
+ return nativeCreate ? data2[key] !== undefined$1 : hasOwnProperty.call(data2, key);
1925
1943
  }
1926
1944
  function hashSet(key, value) {
1927
- var data = this.__data__;
1945
+ var data2 = this.__data__;
1928
1946
  this.size += this.has(key) ? 0 : 1;
1929
- data[key] = nativeCreate && value === undefined$1 ? HASH_UNDEFINED : value;
1947
+ data2[key] = nativeCreate && value === undefined$1 ? HASH_UNDEFINED : value;
1930
1948
  return this;
1931
1949
  }
1932
1950
  Hash.prototype.clear = hashClear;
@@ -1947,33 +1965,33 @@ var lodash = { exports: {} };
1947
1965
  this.size = 0;
1948
1966
  }
1949
1967
  function listCacheDelete(key) {
1950
- var data = this.__data__, index = assocIndexOf(data, key);
1968
+ var data2 = this.__data__, index = assocIndexOf(data2, key);
1951
1969
  if (index < 0) {
1952
1970
  return false;
1953
1971
  }
1954
- var lastIndex = data.length - 1;
1972
+ var lastIndex = data2.length - 1;
1955
1973
  if (index == lastIndex) {
1956
- data.pop();
1974
+ data2.pop();
1957
1975
  } else {
1958
- splice.call(data, index, 1);
1976
+ splice.call(data2, index, 1);
1959
1977
  }
1960
1978
  --this.size;
1961
1979
  return true;
1962
1980
  }
1963
1981
  function listCacheGet(key) {
1964
- var data = this.__data__, index = assocIndexOf(data, key);
1965
- return index < 0 ? undefined$1 : data[index][1];
1982
+ var data2 = this.__data__, index = assocIndexOf(data2, key);
1983
+ return index < 0 ? undefined$1 : data2[index][1];
1966
1984
  }
1967
1985
  function listCacheHas(key) {
1968
1986
  return assocIndexOf(this.__data__, key) > -1;
1969
1987
  }
1970
1988
  function listCacheSet(key, value) {
1971
- var data = this.__data__, index = assocIndexOf(data, key);
1989
+ var data2 = this.__data__, index = assocIndexOf(data2, key);
1972
1990
  if (index < 0) {
1973
1991
  ++this.size;
1974
- data.push([key, value]);
1992
+ data2.push([key, value]);
1975
1993
  } else {
1976
- data[index][1] = value;
1994
+ data2[index][1] = value;
1977
1995
  }
1978
1996
  return this;
1979
1997
  }
@@ -2010,9 +2028,9 @@ var lodash = { exports: {} };
2010
2028
  return getMapData(this, key).has(key);
2011
2029
  }
2012
2030
  function mapCacheSet(key, value) {
2013
- var data = getMapData(this, key), size2 = data.size;
2014
- data.set(key, value);
2015
- this.size += data.size == size2 ? 0 : 1;
2031
+ var data2 = getMapData(this, key), size2 = data2.size;
2032
+ data2.set(key, value);
2033
+ this.size += data2.size == size2 ? 0 : 1;
2016
2034
  return this;
2017
2035
  }
2018
2036
  MapCache.prototype.clear = mapCacheClear;
@@ -2037,16 +2055,16 @@ var lodash = { exports: {} };
2037
2055
  SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
2038
2056
  SetCache.prototype.has = setCacheHas;
2039
2057
  function Stack(entries) {
2040
- var data = this.__data__ = new ListCache(entries);
2041
- this.size = data.size;
2058
+ var data2 = this.__data__ = new ListCache(entries);
2059
+ this.size = data2.size;
2042
2060
  }
2043
2061
  function stackClear() {
2044
2062
  this.__data__ = new ListCache();
2045
2063
  this.size = 0;
2046
2064
  }
2047
2065
  function stackDelete(key) {
2048
- var data = this.__data__, result2 = data["delete"](key);
2049
- this.size = data.size;
2066
+ var data2 = this.__data__, result2 = data2["delete"](key);
2067
+ this.size = data2.size;
2050
2068
  return result2;
2051
2069
  }
2052
2070
  function stackGet(key) {
@@ -2056,18 +2074,18 @@ var lodash = { exports: {} };
2056
2074
  return this.__data__.has(key);
2057
2075
  }
2058
2076
  function stackSet(key, value) {
2059
- var data = this.__data__;
2060
- if (data instanceof ListCache) {
2061
- var pairs = data.__data__;
2077
+ var data2 = this.__data__;
2078
+ if (data2 instanceof ListCache) {
2079
+ var pairs = data2.__data__;
2062
2080
  if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
2063
2081
  pairs.push([key, value]);
2064
- this.size = ++data.size;
2082
+ this.size = ++data2.size;
2065
2083
  return this;
2066
2084
  }
2067
- data = this.__data__ = new MapCache(pairs);
2085
+ data2 = this.__data__ = new MapCache(pairs);
2068
2086
  }
2069
- data.set(key, value);
2070
- this.size = data.size;
2087
+ data2.set(key, value);
2088
+ this.size = data2.size;
2071
2089
  return this;
2072
2090
  }
2073
2091
  Stack.prototype.clear = stackClear;
@@ -2486,15 +2504,15 @@ var lodash = { exports: {} };
2486
2504
  }
2487
2505
  object = Object2(object);
2488
2506
  while (index--) {
2489
- var data = matchData[index];
2490
- if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
2507
+ var data2 = matchData[index];
2508
+ if (noCustomizer && data2[2] ? data2[1] !== object[data2[0]] : !(data2[0] in object)) {
2491
2509
  return false;
2492
2510
  }
2493
2511
  }
2494
2512
  while (++index < length) {
2495
- data = matchData[index];
2496
- var key = data[0], objValue = object[key], srcValue = data[1];
2497
- if (noCustomizer && data[2]) {
2513
+ data2 = matchData[index];
2514
+ var key = data2[0], objValue = object[key], srcValue = data2[1];
2515
+ if (noCustomizer && data2[2]) {
2498
2516
  if (objValue === undefined$1 && !(key in object)) {
2499
2517
  return false;
2500
2518
  }
@@ -2797,8 +2815,8 @@ var lodash = { exports: {} };
2797
2815
  }
2798
2816
  return object;
2799
2817
  }
2800
- var baseSetData = !metaMap ? identity : function(func, data) {
2801
- metaMap.set(func, data);
2818
+ var baseSetData = !metaMap ? identity : function(func, data2) {
2819
+ metaMap.set(func, data2);
2802
2820
  return func;
2803
2821
  };
2804
2822
  var baseSetToString = !defineProperty ? identity : function(func, string) {
@@ -3302,9 +3320,9 @@ var lodash = { exports: {} };
3302
3320
  index = wrapper ? index : length;
3303
3321
  while (++index < length) {
3304
3322
  func = funcs[index];
3305
- var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined$1;
3306
- if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
3307
- wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
3323
+ var funcName = getFuncName(func), data2 = funcName == "wrapper" ? getData(func) : undefined$1;
3324
+ if (data2 && isLaziable(data2[0]) && data2[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data2[4].length && data2[9] == 1) {
3325
+ wrapper = wrapper[getFuncName(data2[0])].apply(wrapper, data2[3]);
3308
3326
  } else {
3309
3327
  wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
3310
3328
  }
@@ -3531,7 +3549,7 @@ var lodash = { exports: {} };
3531
3549
  var partialsRight = partials, holdersRight = holders;
3532
3550
  partials = holders = undefined$1;
3533
3551
  }
3534
- var data = isBindKey ? undefined$1 : getData(func);
3552
+ var data2 = isBindKey ? undefined$1 : getData(func);
3535
3553
  var newData = [
3536
3554
  func,
3537
3555
  bitmask,
@@ -3544,8 +3562,8 @@ var lodash = { exports: {} };
3544
3562
  ary2,
3545
3563
  arity
3546
3564
  ];
3547
- if (data) {
3548
- mergeData(newData, data);
3565
+ if (data2) {
3566
+ mergeData(newData, data2);
3549
3567
  }
3550
3568
  func = newData[0];
3551
3569
  bitmask = newData[1];
@@ -3565,7 +3583,7 @@ var lodash = { exports: {} };
3565
3583
  } else {
3566
3584
  result2 = createHybrid.apply(undefined$1, newData);
3567
3585
  }
3568
- var setter = data ? baseSetData : setData;
3586
+ var setter = data2 ? baseSetData : setData;
3569
3587
  return setWrapToString(setter(result2, newData), func, bitmask);
3570
3588
  }
3571
3589
  function customDefaultsAssignIn(objValue, srcValue, key, object) {
@@ -3732,9 +3750,9 @@ var lodash = { exports: {} };
3732
3750
  function getFuncName(func) {
3733
3751
  var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty.call(realNames, result2) ? array.length : 0;
3734
3752
  while (length--) {
3735
- var data = array[length], otherFunc = data.func;
3753
+ var data2 = array[length], otherFunc = data2.func;
3736
3754
  if (otherFunc == null || otherFunc == func) {
3737
- return data.name;
3755
+ return data2.name;
3738
3756
  }
3739
3757
  }
3740
3758
  return result2;
@@ -3749,8 +3767,8 @@ var lodash = { exports: {} };
3749
3767
  return arguments.length ? result2(arguments[0], arguments[1]) : result2;
3750
3768
  }
3751
3769
  function getMapData(map2, key) {
3752
- var data = map2.__data__;
3753
- return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map;
3770
+ var data2 = map2.__data__;
3771
+ return isKeyable(key) ? data2[typeof key == "string" ? "string" : "hash"] : data2.map;
3754
3772
  }
3755
3773
  function getMatchData(object) {
3756
3774
  var result2 = keys(object), length = result2.length;
@@ -3822,8 +3840,8 @@ var lodash = { exports: {} };
3822
3840
  function getView(start, end, transforms) {
3823
3841
  var index = -1, length = transforms.length;
3824
3842
  while (++index < length) {
3825
- var data = transforms[index], size2 = data.size;
3826
- switch (data.type) {
3843
+ var data2 = transforms[index], size2 = data2.size;
3844
+ switch (data2.type) {
3827
3845
  case "drop":
3828
3846
  start += size2;
3829
3847
  break;
@@ -3918,16 +3936,16 @@ var lodash = { exports: {} };
3918
3936
  return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
3919
3937
  }
3920
3938
  function isIndex(value, length) {
3921
- var type = typeof value;
3939
+ var type2 = typeof value;
3922
3940
  length = length == null ? MAX_SAFE_INTEGER : length;
3923
- return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
3941
+ return !!length && (type2 == "number" || type2 != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
3924
3942
  }
3925
3943
  function isIterateeCall(value, index, object) {
3926
3944
  if (!isObject2(object)) {
3927
3945
  return false;
3928
3946
  }
3929
- var type = typeof index;
3930
- if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
3947
+ var type2 = typeof index;
3948
+ if (type2 == "number" ? isArrayLike(object) && isIndex(index, object.length) : type2 == "string" && index in object) {
3931
3949
  return eq(object[index], value);
3932
3950
  }
3933
3951
  return false;
@@ -3936,15 +3954,15 @@ var lodash = { exports: {} };
3936
3954
  if (isArray(value)) {
3937
3955
  return false;
3938
3956
  }
3939
- var type = typeof value;
3940
- if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
3957
+ var type2 = typeof value;
3958
+ if (type2 == "number" || type2 == "symbol" || type2 == "boolean" || value == null || isSymbol(value)) {
3941
3959
  return true;
3942
3960
  }
3943
3961
  return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object);
3944
3962
  }
3945
3963
  function isKeyable(value) {
3946
- var type = typeof value;
3947
- return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
3964
+ var type2 = typeof value;
3965
+ return type2 == "string" || type2 == "number" || type2 == "symbol" || type2 == "boolean" ? value !== "__proto__" : value === null;
3948
3966
  }
3949
3967
  function isLaziable(func) {
3950
3968
  var funcName = getFuncName(func), other = lodash2[funcName];
@@ -3954,8 +3972,8 @@ var lodash = { exports: {} };
3954
3972
  if (func === other) {
3955
3973
  return true;
3956
3974
  }
3957
- var data = getData(other);
3958
- return !!data && func === data[0];
3975
+ var data2 = getData(other);
3976
+ return !!data2 && func === data2[0];
3959
3977
  }
3960
3978
  function isMasked(func) {
3961
3979
  return !!maskSrcKey && maskSrcKey in func;
@@ -3986,41 +4004,41 @@ var lodash = { exports: {} };
3986
4004
  var cache = result2.cache;
3987
4005
  return result2;
3988
4006
  }
3989
- function mergeData(data, source) {
3990
- var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
3991
- var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
4007
+ function mergeData(data2, source) {
4008
+ var bitmask = data2[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
4009
+ var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data2[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
3992
4010
  if (!(isCommon || isCombo)) {
3993
- return data;
4011
+ return data2;
3994
4012
  }
3995
4013
  if (srcBitmask & WRAP_BIND_FLAG) {
3996
- data[2] = source[2];
4014
+ data2[2] = source[2];
3997
4015
  newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
3998
4016
  }
3999
4017
  var value = source[3];
4000
4018
  if (value) {
4001
- var partials = data[3];
4002
- data[3] = partials ? composeArgs(partials, value, source[4]) : value;
4003
- data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
4019
+ var partials = data2[3];
4020
+ data2[3] = partials ? composeArgs(partials, value, source[4]) : value;
4021
+ data2[4] = partials ? replaceHolders(data2[3], PLACEHOLDER) : source[4];
4004
4022
  }
4005
4023
  value = source[5];
4006
4024
  if (value) {
4007
- partials = data[5];
4008
- data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
4009
- data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
4025
+ partials = data2[5];
4026
+ data2[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
4027
+ data2[6] = partials ? replaceHolders(data2[5], PLACEHOLDER) : source[6];
4010
4028
  }
4011
4029
  value = source[7];
4012
4030
  if (value) {
4013
- data[7] = value;
4031
+ data2[7] = value;
4014
4032
  }
4015
4033
  if (srcBitmask & WRAP_ARY_FLAG) {
4016
- data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
4034
+ data2[8] = data2[8] == null ? source[8] : nativeMin(data2[8], source[8]);
4017
4035
  }
4018
- if (data[9] == null) {
4019
- data[9] = source[9];
4036
+ if (data2[9] == null) {
4037
+ data2[9] = source[9];
4020
4038
  }
4021
- data[0] = source[0];
4022
- data[1] = newBitmask;
4023
- return data;
4039
+ data2[0] = source[0];
4040
+ data2[1] = newBitmask;
4041
+ return data2;
4024
4042
  }
4025
4043
  function nativeKeysIn(object) {
4026
4044
  var result2 = [];
@@ -4889,7 +4907,7 @@ var lodash = { exports: {} };
4889
4907
  lastArgs = lastThis = undefined$1;
4890
4908
  return result2;
4891
4909
  }
4892
- function cancel() {
4910
+ function cancel2() {
4893
4911
  if (timerId !== undefined$1) {
4894
4912
  clearTimeout2(timerId);
4895
4913
  }
@@ -4919,7 +4937,7 @@ var lodash = { exports: {} };
4919
4937
  }
4920
4938
  return result2;
4921
4939
  }
4922
- debounced.cancel = cancel;
4940
+ debounced.cancel = cancel2;
4923
4941
  debounced.flush = flush;
4924
4942
  return debounced;
4925
4943
  }
@@ -5139,8 +5157,8 @@ var lodash = { exports: {} };
5139
5157
  return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
5140
5158
  }
5141
5159
  function isObject2(value) {
5142
- var type = typeof value;
5143
- return value != null && (type == "object" || type == "function");
5160
+ var type2 = typeof value;
5161
+ return value != null && (type2 == "object" || type2 == "function");
5144
5162
  }
5145
5163
  function isObjectLike(value) {
5146
5164
  return value != null && typeof value == "object";
@@ -5286,7 +5304,7 @@ var lodash = { exports: {} };
5286
5304
  copyObject(source, keys(source), object, customizer);
5287
5305
  });
5288
5306
  var at = flatRest(baseAt);
5289
- function create(prototype, properties) {
5307
+ function create2(prototype, properties) {
5290
5308
  var result2 = baseCreate(prototype);
5291
5309
  return properties == null ? result2 : baseAssign(result2, properties);
5292
5310
  }
@@ -6033,7 +6051,7 @@ var lodash = { exports: {} };
6033
6051
  lodash2.conforms = conforms;
6034
6052
  lodash2.constant = constant;
6035
6053
  lodash2.countBy = countBy;
6036
- lodash2.create = create;
6054
+ lodash2.create = create2;
6037
6055
  lodash2.curry = curry;
6038
6056
  lodash2.curryRight = curryRight;
6039
6057
  lodash2.debounce = debounce;
@@ -6351,12 +6369,12 @@ var lodash = { exports: {} };
6351
6369
  };
6352
6370
  });
6353
6371
  arrayEach(["filter", "map", "takeWhile"], function(methodName, index) {
6354
- var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
6372
+ var type2 = index + 1, isFilter = type2 == LAZY_FILTER_FLAG || type2 == LAZY_WHILE_FLAG;
6355
6373
  LazyWrapper.prototype[methodName] = function(iteratee2) {
6356
6374
  var result2 = this.clone();
6357
6375
  result2.__iteratees__.push({
6358
6376
  "iteratee": getIteratee(iteratee2, 3),
6359
- "type": type
6377
+ "type": type2
6360
6378
  });
6361
6379
  result2.__filtered__ = result2.__filtered__ || isFilter;
6362
6380
  return result2;
@@ -6924,14 +6942,14 @@ const rfc1035LabelRules = [
6924
6942
  function NamespaceSelectWidget(props) {
6925
6943
  const kit = useUIKit();
6926
6944
  const { action } = useResource();
6927
- const { data } = useList({
6945
+ const { data: data2 } = useList({
6928
6946
  resource: "namespaces",
6929
6947
  meta: {
6930
6948
  resourceBasePath: "/api/v1",
6931
6949
  kind: "Namespace"
6932
6950
  }
6933
6951
  });
6934
- return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.select, { input: props, disabled: action === "edit", children: data == null ? void 0 : data.data.map((namespace) => /* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, { value: namespace.metadata.name, children: namespace.metadata.name }, namespace.metadata.name)) });
6952
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.select, { input: props, disabled: action === "edit", children: data2 == null ? void 0 : data2.data.map((namespace2) => /* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, { value: namespace2.metadata.name, children: namespace2.metadata.name }, namespace2.metadata.name)) });
6935
6953
  }
6936
6954
  const namespaceRules = [
6937
6955
  {
@@ -7195,16 +7213,16 @@ const BASE_WORKLOAD_SPEC_INIT_VALUE = {
7195
7213
  }
7196
7214
  });
7197
7215
  class ResourceModel {
7198
- constructor(data) {
7216
+ constructor(data2) {
7199
7217
  __publicField(this, "id");
7200
7218
  __publicField(this, "apiVersion");
7201
7219
  __publicField(this, "kind");
7202
7220
  __publicField(this, "metadata");
7203
- this.data = data;
7204
- this.id = data.id;
7205
- this.apiVersion = data.apiVersion;
7206
- this.kind = data.kind;
7207
- this.metadata = data.metadata;
7221
+ this.data = data2;
7222
+ this.id = data2.id;
7223
+ this.apiVersion = data2.apiVersion;
7224
+ this.kind = data2.kind;
7225
+ this.metadata = data2.metadata;
7208
7226
  }
7209
7227
  get name() {
7210
7228
  var _a;
@@ -7288,7 +7306,7 @@ const ErrorMsgStyle = "eh2qjnl";
7288
7306
  const ErrorWrapperStyle = "e19q2bnp";
7289
7307
  const YamlEditorStyle = "y16u5v3w";
7290
7308
  const MonacoYamlEditor$2 = React.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$1));
7291
- const MonacoYamlDiffEditor = React.lazy(() => import("./MonacoYamlDiffEditor.a9bce0ec.js"));
7309
+ const MonacoYamlDiffEditor = React.lazy(() => import("./MonacoYamlDiffEditor.0954476c.js"));
7292
7310
  const YamlEditorComponent = forwardRef(
7293
7311
  function YamlEditorComponent2(props, ref) {
7294
7312
  const {
@@ -7537,7 +7555,7 @@ function copyToClipboard(text) {
7537
7555
  document.execCommand("copy");
7538
7556
  document.body.removeChild(input);
7539
7557
  }
7540
- function getCommonErrors(response, i18n) {
7558
+ function getCommonErrors(response, i18n2) {
7541
7559
  var _a;
7542
7560
  if (!((response == null ? void 0 : response.message) || (response == null ? void 0 : response.code) || (response == null ? void 0 : response.reason) || (response == null ? void 0 : response.details) || (response == null ? void 0 : response.graphQLErrors))) {
7543
7561
  return [];
@@ -7546,17 +7564,17 @@ function getCommonErrors(response, i18n) {
7546
7564
  if (causes.length) {
7547
7565
  return causes.map((cause) => {
7548
7566
  let params = {};
7549
- let message = cause.message;
7567
+ let message2 = cause.message;
7550
7568
  try {
7551
7569
  const info = JSON.parse(cause.message);
7552
7570
  params = info.params;
7553
- message = info.message;
7571
+ message2 = info.message;
7554
7572
  } catch {
7555
- return i18n.t(
7573
+ return i18n2.t(
7556
7574
  [
7557
7575
  `error.${cause.reason}`,
7558
7576
  `error.${cause.code}`,
7559
- `${message}${cause.field ? `(${cause.field})` : ""}`
7577
+ `${message2}${cause.field ? `(${cause.field})` : ""}`
7560
7578
  ],
7561
7579
  {
7562
7580
  ...params,
@@ -7564,11 +7582,11 @@ function getCommonErrors(response, i18n) {
7564
7582
  }
7565
7583
  );
7566
7584
  }
7567
- return i18n.t(
7585
+ return i18n2.t(
7568
7586
  [
7569
7587
  `error.${cause.reason}`,
7570
7588
  `error.${cause.code}`,
7571
- `${message}${cause.field ? `(${cause.field})` : ""}`
7589
+ `${message2}${cause.field ? `(${cause.field})` : ""}`
7572
7590
  ],
7573
7591
  {
7574
7592
  ...params,
@@ -7578,7 +7596,7 @@ function getCommonErrors(response, i18n) {
7578
7596
  });
7579
7597
  }
7580
7598
  return [
7581
- i18n.t(
7599
+ i18n2.t(
7582
7600
  [`error.${response.code}`, `error.${response.reason}`, response.message || ""],
7583
7601
  { fallbackLng: "" }
7584
7602
  )
@@ -7598,9 +7616,9 @@ function YamlForm(props) {
7598
7616
  const kit = useUIKit();
7599
7617
  const {
7600
7618
  t,
7601
- i18n
7619
+ i18n: i18n2
7602
7620
  } = useTranslation();
7603
- const responseErrors = errorResponseBody ? getCommonErrors(errorResponseBody, i18n) : [];
7621
+ const responseErrors = errorResponseBody ? getCommonErrors(errorResponseBody, i18n2) : [];
7604
7622
  return /* @__PURE__ */ jsxRuntime.exports.jsx(FormLayout, {
7605
7623
  children: /* @__PURE__ */ jsxRuntime.exports.jsx(kit.form, {
7606
7624
  ...formProps,
@@ -7701,15 +7719,15 @@ function download(filename, content) {
7701
7719
  }
7702
7720
  function useDownloadYAML() {
7703
7721
  return function(options) {
7704
- const { name, item } = options;
7722
+ const { name: name2, item } = options;
7705
7723
  const content = yaml.dump(item);
7706
- download(`${name}.yaml`, content);
7724
+ download(`${name2}.yaml`, content);
7707
7725
  };
7708
7726
  }
7709
7727
  function useEdit() {
7710
7728
  const { resource } = useParsed();
7711
7729
  const go = useGo();
7712
- const edit = useCallback(
7730
+ const edit2 = useCallback(
7713
7731
  (id) => {
7714
7732
  go({
7715
7733
  to: `/${resource == null ? void 0 : resource.name}/edit`,
@@ -7720,14 +7738,14 @@ function useEdit() {
7720
7738
  },
7721
7739
  [go, resource == null ? void 0 : resource.name]
7722
7740
  );
7723
- return { edit };
7741
+ return { edit: edit2 };
7724
7742
  }
7725
7743
  function K8sDropdown(props) {
7726
- const { data } = props;
7744
+ const { data: data2 } = props;
7727
7745
  const kit = useUIKit();
7728
7746
  const useResourceResult = useResource();
7729
7747
  const resource = useResourceResult.resource;
7730
- const { edit } = useEdit();
7748
+ const { edit: edit2 } = useEdit();
7731
7749
  const { modalProps, visible, openDeleteConfirmModal } = useDeleteModal(
7732
7750
  (resource == null ? void 0 : resource.name) || ""
7733
7751
  );
@@ -7742,8 +7760,8 @@ function K8sDropdown(props) {
7742
7760
  kit.menuItem,
7743
7761
  {
7744
7762
  onClick: () => {
7745
- if (data.id) {
7746
- edit(data.id);
7763
+ if (data2.id) {
7764
+ edit2(data2.id);
7747
7765
  }
7748
7766
  },
7749
7767
  children: /* @__PURE__ */ jsxRuntime.exports.jsx(Icon, { src: EditPen16PrimaryIcon, children: t("edit") })
@@ -7754,7 +7772,7 @@ function K8sDropdown(props) {
7754
7772
  {
7755
7773
  danger: true,
7756
7774
  onClick: () => {
7757
- openDeleteConfirmModal(data.id);
7775
+ openDeleteConfirmModal(data2.id);
7758
7776
  },
7759
7777
  children: /* @__PURE__ */ jsxRuntime.exports.jsx(Icon, { src: TrashBinDelete16Icon, children: t("delete") })
7760
7778
  }
@@ -7764,10 +7782,10 @@ function K8sDropdown(props) {
7764
7782
  {
7765
7783
  onClick: () => {
7766
7784
  var _a;
7767
- if (data.id) {
7785
+ if (data2.id) {
7768
7786
  download2({
7769
- name: ((_a = data.metadata) == null ? void 0 : _a.name) || data.kind || "",
7770
- item: data
7787
+ name: ((_a = data2.metadata) == null ? void 0 : _a.name) || data2.kind || "",
7788
+ item: data2
7771
7789
  });
7772
7790
  }
7773
7791
  },
@@ -7922,7 +7940,7 @@ const useNamespacesFilter = () => {
7922
7940
  const NamespacesFilter = () => {
7923
7941
  const kit = useUIKit();
7924
7942
  const { t } = useTranslation();
7925
- const { data } = useList({
7943
+ const { data: data2 } = useList({
7926
7944
  resource: "namespaces",
7927
7945
  meta: {
7928
7946
  resourceBasePath: "/api/v1",
@@ -7941,9 +7959,9 @@ const NamespacesFilter = () => {
7941
7959
  },
7942
7960
  children: [
7943
7961
  /* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, { value: "_all", children: t("dovetail.all_namespaces") }, "_all"),
7944
- data == null ? void 0 : data.data.map((namespace) => {
7945
- const { name } = namespace.metadata;
7946
- return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, { value: name, children: name }, name);
7962
+ data2 == null ? void 0 : data2.data.map((namespace2) => {
7963
+ const { name: name2 } = namespace2.metadata;
7964
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.option, { value: name2, children: name2 }, name2);
7947
7965
  })
7948
7966
  ]
7949
7967
  }
@@ -8003,7 +8021,7 @@ const useEagleTable = (params) => {
8003
8021
  return { tableProps: finalProps, selectedKeys, ...table };
8004
8022
  };
8005
8023
  const index_86mllf = "";
8006
- const StateTag = ({ state }) => {
8024
+ const StateTag = ({ state: state2 }) => {
8007
8025
  const kit = useUIKit();
8008
8026
  const colorMap = {
8009
8027
  running: "green",
@@ -8012,7 +8030,7 @@ const StateTag = ({ state }) => {
8012
8030
  terminated: "red",
8013
8031
  pending: "gray"
8014
8032
  };
8015
- return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.tag, { color: colorMap[(state == null ? void 0 : state.toLowerCase()) || ""] || "green", children: state || "Active" });
8033
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.tag, { color: colorMap[(state2 == null ? void 0 : state2.toLowerCase()) || ""] || "green", children: state2 || "Active" });
8016
8034
  };
8017
8035
  var dayjs_min = { exports: {} };
8018
8036
  (function(module, exports) {
@@ -8337,7 +8355,7 @@ const Time = (props) => {
8337
8355
  const index_1wf16rt = "";
8338
8356
  const NameLink = (props) => {
8339
8357
  var _a;
8340
- const { name, id, resource } = props;
8358
+ const { name: name2, id, resource } = props;
8341
8359
  const kit = useUIKit();
8342
8360
  const go = useGo();
8343
8361
  const navigation = useNavigation();
@@ -8355,7 +8373,7 @@ const NameLink = (props) => {
8355
8373
  }
8356
8374
  });
8357
8375
  },
8358
- children: name
8376
+ children: name2
8359
8377
  }
8360
8378
  );
8361
8379
  };
@@ -8511,13 +8529,13 @@ function styled(tag) {
8511
8529
  const { vars } = options;
8512
8530
  if (vars) {
8513
8531
  const style2 = {};
8514
- for (const name in vars) {
8515
- const variable = vars[name];
8532
+ for (const name2 in vars) {
8533
+ const variable = vars[name2];
8516
8534
  const result = variable[0];
8517
8535
  const unit = variable[1] || "";
8518
8536
  const value = typeof result === "function" ? result(props) : result;
8519
8537
  warnIfInvalid(value, options.name);
8520
- style2[`--${name}`] = `${value}${unit}`;
8538
+ style2[`--${name2}`] = `${value}${unit}`;
8521
8539
  }
8522
8540
  const ownStyle = filteredProps.style || {};
8523
8541
  const keys = Object.keys(ownStyle);
@@ -8634,14 +8652,14 @@ function Table(props) {
8634
8652
  }
8635
8653
  function CreateButton() {
8636
8654
  const { resource } = useResource();
8637
- const { create } = useNavigation();
8655
+ const { create: create2 } = useNavigation();
8638
8656
  const kit = useUIKit();
8639
8657
  const { t } = useTranslation();
8640
8658
  const onClick = useCallback(() => {
8641
8659
  if (resource == null ? void 0 : resource.name) {
8642
- create(resource.name);
8660
+ create2(resource.name);
8643
8661
  }
8644
- }, [create, resource == null ? void 0 : resource.name]);
8662
+ }, [create2, resource == null ? void 0 : resource.name]);
8645
8663
  return /* @__PURE__ */ jsxRuntime.exports.jsx(kit.button, { type: "primary", onClick, children: t("create") });
8646
8664
  }
8647
8665
  const useDeleteManyModal = (resource, ids) => {
@@ -8732,14 +8750,14 @@ function ListPage(props) {
8732
8750
  });
8733
8751
  }
8734
8752
  function ResourceList(props) {
8735
- const { formatter, name, columns, Dropdown } = props;
8736
- const { i18n } = useTranslation();
8753
+ const { formatter, name: name2, columns, Dropdown } = props;
8754
+ const { i18n: i18n2 } = useTranslation();
8737
8755
  const { tableProps, selectedKeys } = useEagleTable({
8738
8756
  useTableParams: {},
8739
8757
  columns: [
8740
- PhaseColumnRenderer(i18n),
8741
- NameColumnRenderer(i18n),
8742
- NameSpaceColumnRenderer(i18n),
8758
+ PhaseColumnRenderer(i18n2),
8759
+ NameColumnRenderer(i18n2),
8760
+ NameSpaceColumnRenderer(i18n2),
8743
8761
  ...columns
8744
8762
  ],
8745
8763
  tableProps: {
@@ -8748,7 +8766,7 @@ function ResourceList(props) {
8748
8766
  formatter,
8749
8767
  Dropdown
8750
8768
  });
8751
- return /* @__PURE__ */ jsxRuntime.exports.jsx(ListPage, { title: name || "", selectedKeys, tableProps });
8769
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(ListPage, { title: name2 || "", selectedKeys, tableProps });
8752
8770
  }
8753
8771
  const index_1hr2h38 = "";
8754
8772
  const index_m52iq6 = "";
@@ -8948,12 +8966,12 @@ const ShowContent = (props) => {
8948
8966
  t
8949
8967
  } = useTranslation();
8950
8968
  const {
8951
- data
8969
+ data: data2
8952
8970
  } = queryResult;
8953
- if (!(data == null ? void 0 : data.data)) {
8971
+ if (!(data2 == null ? void 0 : data2.data)) {
8954
8972
  return null;
8955
8973
  }
8956
- const record = formatter(data == null ? void 0 : data.data);
8974
+ const record = formatter(data2 == null ? void 0 : data2.data);
8957
8975
  const FirstLineFields = [{
8958
8976
  key: "NameSpace",
8959
8977
  title: t("namespace"),
@@ -9107,7 +9125,7 @@ function ResourceShow(props) {
9107
9125
  }
9108
9126
  const ResourceCRUD = (props) => {
9109
9127
  const { configs, urlPrefix } = props;
9110
- const { i18n } = useTranslation();
9128
+ const { i18n: i18n2 } = useTranslation();
9111
9129
  return /* @__PURE__ */ jsxRuntime.exports.jsx(jsxRuntime.exports.Fragment, { children: configs.map((config) => {
9112
9130
  var _a, _b;
9113
9131
  const formatter = config.formatter || ((v2) => new ResourceModel(v2));
@@ -9117,7 +9135,7 @@ const ResourceCRUD = (props) => {
9117
9135
  {
9118
9136
  name: config.kind,
9119
9137
  formatter,
9120
- columns: ((_a = config.columns) == null ? void 0 : _a.call(config, i18n)) || [],
9138
+ columns: ((_a = config.columns) == null ? void 0 : _a.call(config, i18n2)) || [],
9121
9139
  Dropdown: config.Dropdown
9122
9140
  }
9123
9141
  ) }),
@@ -9125,7 +9143,7 @@ const ResourceCRUD = (props) => {
9125
9143
  ResourceShow,
9126
9144
  {
9127
9145
  formatter,
9128
- filedGroups: ((_b = config.showFields) == null ? void 0 : _b.call(config, i18n)) || [],
9146
+ filedGroups: ((_b = config.showFields) == null ? void 0 : _b.call(config, i18n2)) || [],
9129
9147
  Dropdown: config.Dropdown
9130
9148
  }
9131
9149
  ) }),
@@ -9754,12 +9772,12 @@ function resolvePathname(to, from) {
9754
9772
  return result;
9755
9773
  }
9756
9774
  var isProduction$1 = process.env.NODE_ENV === "production";
9757
- function warning(condition, message) {
9775
+ function warning(condition2, message2) {
9758
9776
  if (!isProduction$1) {
9759
- if (condition) {
9777
+ if (condition2) {
9760
9778
  return;
9761
9779
  }
9762
- var text = "Warning: " + message;
9780
+ var text = "Warning: " + message2;
9763
9781
  if (typeof console !== "undefined") {
9764
9782
  console.warn(text);
9765
9783
  }
@@ -9771,14 +9789,14 @@ function warning(condition, message) {
9771
9789
  }
9772
9790
  var isProduction = process.env.NODE_ENV === "production";
9773
9791
  var prefix = "Invariant failed";
9774
- function invariant(condition, message) {
9775
- if (condition) {
9792
+ function invariant(condition2, message2) {
9793
+ if (condition2) {
9776
9794
  return;
9777
9795
  }
9778
9796
  if (isProduction) {
9779
9797
  throw new Error(prefix);
9780
9798
  }
9781
- var provided = typeof message === "function" ? message() : message;
9799
+ var provided = typeof message2 === "function" ? message2() : message2;
9782
9800
  var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
9783
9801
  throw new Error(value);
9784
9802
  }
@@ -9826,11 +9844,11 @@ function createPath(location2) {
9826
9844
  path += hash.charAt(0) === "#" ? hash : "#" + hash;
9827
9845
  return path;
9828
9846
  }
9829
- function createLocation(path, state, key, currentLocation) {
9847
+ function createLocation(path, state2, key, currentLocation) {
9830
9848
  var location2;
9831
9849
  if (typeof path === "string") {
9832
9850
  location2 = parsePath(path);
9833
- location2.state = state;
9851
+ location2.state = state2;
9834
9852
  } else {
9835
9853
  location2 = _extends({}, path);
9836
9854
  if (location2.pathname === void 0)
@@ -9847,8 +9865,8 @@ function createLocation(path, state, key, currentLocation) {
9847
9865
  } else {
9848
9866
  location2.hash = "";
9849
9867
  }
9850
- if (state !== void 0 && location2.state === void 0)
9851
- location2.state = state;
9868
+ if (state2 !== void 0 && location2.state === void 0)
9869
+ location2.state = state2;
9852
9870
  }
9853
9871
  try {
9854
9872
  location2.pathname = decodeURI(location2.pathname);
@@ -9932,8 +9950,8 @@ function createTransitionManager() {
9932
9950
  };
9933
9951
  }
9934
9952
  var canUseDOM = !!(typeof window !== "undefined" && window.document && window.document.createElement);
9935
- function getConfirmation(message, callback) {
9936
- callback(window.confirm(message));
9953
+ function getConfirmation(message2, callback) {
9954
+ callback(window.confirm(message2));
9937
9955
  }
9938
9956
  function supportsGoWithoutReloadUsingHash() {
9939
9957
  return window.navigator.userAgent.indexOf("Firefox") === -1;
@@ -10062,8 +10080,8 @@ function createHashHistory(props) {
10062
10080
  }
10063
10081
  return href + "#" + encodePath2(basename + createPath(location2));
10064
10082
  }
10065
- function push(path2, state) {
10066
- process.env.NODE_ENV !== "production" ? warning(state === void 0, "Hash history cannot push state; it is ignored") : void 0;
10083
+ function push(path2, state2) {
10084
+ process.env.NODE_ENV !== "production" ? warning(state2 === void 0, "Hash history cannot push state; it is ignored") : void 0;
10067
10085
  var action = "PUSH";
10068
10086
  var location2 = createLocation(path2, void 0, void 0, history2.location);
10069
10087
  transitionManager.confirmTransitionTo(location2, action, getUserConfirmation, function(ok) {
@@ -10089,8 +10107,8 @@ function createHashHistory(props) {
10089
10107
  }
10090
10108
  });
10091
10109
  }
10092
- function replace(path2, state) {
10093
- process.env.NODE_ENV !== "production" ? warning(state === void 0, "Hash history cannot replace state; it is ignored") : void 0;
10110
+ function replace(path2, state2) {
10111
+ process.env.NODE_ENV !== "production" ? warning(state2 === void 0, "Hash history cannot replace state; it is ignored") : void 0;
10094
10112
  var action = "REPLACE";
10095
10113
  var location2 = createLocation(path2, void 0, void 0, history2.location);
10096
10114
  transitionManager.confirmTransitionTo(location2, action, getUserConfirmation, function(ok) {
@@ -10241,6 +10259,148 @@ const Layout = ({
10241
10259
  })]
10242
10260
  });
10243
10261
  };
10262
+ const copy$1 = "Copy";
10263
+ const reset_arguments$1 = "Reset";
10264
+ const view_changes$1 = "Show Diff";
10265
+ const back_to_edit$1 = "Edit";
10266
+ const configure_file$1 = "Configuration";
10267
+ const yaml_format_wrong$1 = "Configuration is in an invalid YAML format.";
10268
+ const yaml_value_wrong$1 = "Configuration has invalid values.";
10269
+ const edit_yaml$1 = "Edit YAML";
10270
+ const copied$1 = "Copied";
10271
+ const already_reset$1 = "Already reset";
10272
+ const dovetail$1 = {
10273
+ copy: copy$1,
10274
+ reset_arguments: reset_arguments$1,
10275
+ view_changes: view_changes$1,
10276
+ back_to_edit: back_to_edit$1,
10277
+ configure_file: configure_file$1,
10278
+ yaml_format_wrong: yaml_format_wrong$1,
10279
+ yaml_value_wrong: yaml_value_wrong$1,
10280
+ edit_yaml: edit_yaml$1,
10281
+ copied: copied$1,
10282
+ already_reset: already_reset$1
10283
+ };
10284
+ const EN = {
10285
+ dovetail: dovetail$1
10286
+ };
10287
+ const copy = "\u590D\u5236";
10288
+ const reset_arguments = "\u91CD\u7F6E";
10289
+ const view_changes = "\u67E5\u770B\u6539\u52A8";
10290
+ const back_to_edit = "\u7F16\u8F91";
10291
+ const configure_file = "\u914D\u7F6E\u5185\u5BB9";
10292
+ const yaml_format_wrong = "\u914D\u7F6E\u5185\u5BB9\u4E0D\u662F\u6709\u6548\u7684 yaml \u683C\u5F0F\u3002";
10293
+ const yaml_value_wrong = "\u914D\u7F6E\u5185\u5BB9\u4E2D\u5B58\u5728\u4E0D\u5408\u6CD5\u7684\u503C\u3002";
10294
+ const edit_yaml = "\u7F16\u8F91 YAML";
10295
+ const copied = "\u5DF2\u590D\u5236";
10296
+ const already_reset = "\u5DF2\u91CD\u7F6E";
10297
+ const cancel = "\u53D6\u6D88";
10298
+ const create = "\u521B\u5EFA";
10299
+ const confirm_delete_text = "\u786E\u5B9A\u8981\u5220\u9664 {{target}} \u5417\uFF1F";
10300
+ const edit = "\u7F16\u8F91";
10301
+ const namespace = "\u540D\u5B57\u7A7A\u95F4";
10302
+ const name = "\u540D\u5B57";
10303
+ const state = "\u72B6\u6001";
10304
+ const status = "\u72B6\u6001";
10305
+ const phase = "\u72B6\u6001";
10306
+ const image = "\u955C\u50CF";
10307
+ const replicas = "\u526F\u672C\u6570";
10308
+ const created_time = "\u521B\u5EFA\u65F6\u95F4";
10309
+ const label = "\u6807\u7B7E";
10310
+ const annotation = "\u6CE8\u91CA";
10311
+ const type = "\u7C7B\u578B";
10312
+ const condition = "Condition";
10313
+ const download_yaml = "\u4E0B\u8F7D YAML";
10314
+ const detail = "\u8BE6\u60C5";
10315
+ const node_name = "\u4E3B\u673A\u540D\u79F0";
10316
+ const restarts = "\u91CD\u542F\u6B21\u6570";
10317
+ const updated_time = "\u66F4\u65B0\u65F6\u95F4";
10318
+ const message = "\u6D88\u606F";
10319
+ const save = "\u4FDD\u5B58";
10320
+ const more = "\u66F4\u591A";
10321
+ const workload = "\u5DE5\u4F5C\u8D1F\u8F7D";
10322
+ const all_namespaces = "\u6240\u6709\u540D\u5B57\u7A7A\u95F4";
10323
+ const empty = "\u65E0\u53EF\u663E\u793A\u7684\u6570\u636E";
10324
+ const schedule = "\u8C03\u5EA6";
10325
+ const lastScheduleTime = "\u4E0A\u6B21\u8C03\u5EA6";
10326
+ const duration = "\u6301\u7EED\u65F6\u95F4";
10327
+ const completions = "\u5B8C\u6210 Job \u5386\u53F2\u6570";
10328
+ const started = "\u5F00\u59CB\u65F6\u95F4";
10329
+ const ready = "\u5C31\u7EEA";
10330
+ const init_container = "\u521D\u59CB\u5316\u5BB9\u5668";
10331
+ const container = "\u5BB9\u5668";
10332
+ const redeploy = "\u91CD\u65B0\u90E8\u7F72";
10333
+ const data = "\u6570\u636E";
10334
+ const suspend = "\u6682\u505C";
10335
+ const resume = "\u91CD\u65B0\u5F00\u59CB";
10336
+ const dovetail = {
10337
+ copy,
10338
+ reset_arguments,
10339
+ view_changes,
10340
+ back_to_edit,
10341
+ configure_file,
10342
+ yaml_format_wrong,
10343
+ yaml_value_wrong,
10344
+ edit_yaml,
10345
+ copied,
10346
+ already_reset,
10347
+ cancel,
10348
+ "delete": "\u5220\u9664",
10349
+ create,
10350
+ confirm_delete_text,
10351
+ edit,
10352
+ namespace,
10353
+ name,
10354
+ state,
10355
+ status,
10356
+ phase,
10357
+ image,
10358
+ replicas,
10359
+ created_time,
10360
+ label,
10361
+ annotation,
10362
+ type,
10363
+ condition,
10364
+ download_yaml,
10365
+ detail,
10366
+ node_name,
10367
+ restarts,
10368
+ updated_time,
10369
+ message,
10370
+ save,
10371
+ more,
10372
+ workload,
10373
+ all_namespaces,
10374
+ empty,
10375
+ schedule,
10376
+ lastScheduleTime,
10377
+ duration,
10378
+ completions,
10379
+ started,
10380
+ ready,
10381
+ init_container,
10382
+ container,
10383
+ redeploy,
10384
+ data,
10385
+ suspend,
10386
+ resume
10387
+ };
10388
+ const ZH = {
10389
+ dovetail
10390
+ };
10391
+ const resources = {
10392
+ "en-US": EN,
10393
+ "zh-CN": ZH
10394
+ };
10395
+ i18n.use(initReactI18next).init({
10396
+ supportedLngs: ["en-US", "zh-CN"],
10397
+ resources,
10398
+ ns: Object.keys(resources["zh-CN"]),
10399
+ defaultNS: "dovetail",
10400
+ fallbackLng: ["en-US", "zh-CN"],
10401
+ lng: "zh-CN",
10402
+ nsSeparator: "."
10403
+ });
10244
10404
  const styles = "";
10245
10405
  const antd = "";
10246
10406
  const style = "";