kiban-design-system 1.1.3 → 1.1.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.
package/dist/index.cjs.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var React3 = require('react');
3
+ var React2 = require('react');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var ReactDOM = require('react-dom');
6
6
 
@@ -21,7 +21,7 @@ function _interopNamespaceDefault(e) {
21
21
  return Object.freeze(n);
22
22
  }
23
23
 
24
- var React3__namespace = /*#__PURE__*/_interopNamespaceDefault(React3);
24
+ var React2__namespace = /*#__PURE__*/_interopNamespaceDefault(React2);
25
25
 
26
26
  const Activity = () => /*#__PURE__*/jsxRuntime.jsx("polyline", {
27
27
  points: "22 12 18 12 15 21 9 3 6 12 2 12"
@@ -4442,7 +4442,7 @@ const Icon = ({
4442
4442
  strokeWidth: "2",
4443
4443
  strokeLinecap: "round",
4444
4444
  strokeLinejoin: "round",
4445
- children: /*#__PURE__*/React3.createElement(Icons[name])
4445
+ children: /*#__PURE__*/React2.createElement(Icons[name])
4446
4446
  });
4447
4447
 
4448
4448
  const MAIN_CLASS$t = 'Alert';
@@ -4556,7 +4556,7 @@ const Button = ({
4556
4556
  });
4557
4557
  };
4558
4558
 
4559
- const ThemeContext = /*#__PURE__*/React3.createContext({
4559
+ const ThemeContext = /*#__PURE__*/React2.createContext({
4560
4560
  theme: "CLOUD",
4561
4561
  setTheme: () => null
4562
4562
  });
@@ -4565,8 +4565,8 @@ const ThemeProvider = ({
4565
4565
  children,
4566
4566
  theme
4567
4567
  }) => {
4568
- const [themeValue, setThemeValue] = React3.useState('CLOUD');
4569
- React3.useEffect(() => {
4568
+ const [themeValue, setThemeValue] = React2.useState('CLOUD');
4569
+ React2.useEffect(() => {
4570
4570
  if (theme) setThemeValue(theme);
4571
4571
  }, []);
4572
4572
  const setTheme = newTheme => setThemeValue(newTheme);
@@ -4582,7 +4582,7 @@ const useTheme = () => {
4582
4582
  const {
4583
4583
  theme,
4584
4584
  setTheme
4585
- } = React3.useContext(ThemeContext);
4585
+ } = React2.useContext(ThemeContext);
4586
4586
  return {
4587
4587
  theme,
4588
4588
  setTheme
@@ -4590,7 +4590,7 @@ const useTheme = () => {
4590
4590
  };
4591
4591
 
4592
4592
  const isComponentTypeOf = (childComponent, parentComponent) => {
4593
- if (childComponent === null || ! /*#__PURE__*/React3.isValidElement(childComponent) || typeof childComponent === "string") {
4593
+ if (childComponent === null || ! /*#__PURE__*/React2.isValidElement(childComponent) || typeof childComponent === "string") {
4594
4594
  return false;
4595
4595
  }
4596
4596
  const {
@@ -6393,13 +6393,13 @@ const Logo = ({
6393
6393
  }) => {
6394
6394
  const logoName = isWhite ? `${name}White` : name;
6395
6395
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
6396
- children: /*#__PURE__*/React3.createElement(Logos[logoName], {
6396
+ children: /*#__PURE__*/React2.createElement(Logos[logoName], {
6397
6397
  size
6398
6398
  })
6399
6399
  });
6400
6400
  };
6401
6401
 
6402
- const AlertContext = /*#__PURE__*/React3.createContext({
6402
+ const AlertContext = /*#__PURE__*/React2.createContext({
6403
6403
  addAlert: () => null,
6404
6404
  limit: 0,
6405
6405
  deleteAlert: () => {}
@@ -6410,9 +6410,9 @@ const AlertProvider = ({
6410
6410
  limit
6411
6411
  }) => {
6412
6412
  const portalTarget = document.body;
6413
- const [alertList, setAlertList] = React3.useState([]);
6414
- const [newAlert, setNewAlert] = React3.useState();
6415
- React3.useEffect(() => {
6413
+ const [alertList, setAlertList] = React2.useState([]);
6414
+ const [newAlert, setNewAlert] = React2.useState();
6415
+ React2.useEffect(() => {
6416
6416
  if (newAlert) {
6417
6417
  const alerts = alertList.map(alertElem => ({
6418
6418
  ...alertElem
@@ -6439,7 +6439,7 @@ const AlertProvider = ({
6439
6439
  alerts = alerts.filter(alertElement => alertElement.duration === "infinite" || typeof alertElement.duration === "number" && alertElement.duration > 0);
6440
6440
  setAlertList(alerts);
6441
6441
  };
6442
- React3.useEffect(() => {
6442
+ React2.useEffect(() => {
6443
6443
  const interval = setInterval(() => {
6444
6444
  if (alertList.length > 0) countDownAlerts();else {
6445
6445
  clearInterval(interval);
@@ -6497,13 +6497,13 @@ const AlertProvider = ({
6497
6497
  const useShowAlert = () => {
6498
6498
  const {
6499
6499
  addAlert
6500
- } = React3.useContext(AlertContext);
6500
+ } = React2.useContext(AlertContext);
6501
6501
  return addAlert;
6502
6502
  };
6503
6503
  const useDeleteAlert = () => {
6504
6504
  const {
6505
6505
  deleteAlert
6506
- } = React3.useContext(AlertContext);
6506
+ } = React2.useContext(AlertContext);
6507
6507
  return deleteAlert;
6508
6508
  };
6509
6509
 
@@ -6570,7 +6570,7 @@ const AlphaAttributeInput = ({
6570
6570
  label,
6571
6571
  isRequired
6572
6572
  }) => {
6573
- const [isFocused, setIsFocused] = React3.useState(false);
6573
+ const [isFocused, setIsFocused] = React2.useState(false);
6574
6574
  const className = cssClassName(COMPONENT_NAME$F, isFocused && 'isFocused');
6575
6575
  const handleBlur = callback => {
6576
6576
  setIsFocused(false);
@@ -6598,7 +6598,7 @@ const AlphaAttributeInput = ({
6598
6598
  className: `${COMPONENT_NAME$F}__Divider`,
6599
6599
  children: divider
6600
6600
  }) : null;
6601
- return /*#__PURE__*/jsxRuntime.jsxs(React3.Fragment, {
6601
+ return /*#__PURE__*/jsxRuntime.jsxs(React2.Fragment, {
6602
6602
  children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
6603
6603
  className: `${COMPONENT_NAME$F}__Item`,
6604
6604
  children: [itemLabelMarkup, /*#__PURE__*/jsxRuntime.jsx("input", {
@@ -6900,14 +6900,14 @@ const Overlay = ({
6900
6900
  theme,
6901
6901
  onClick
6902
6902
  }) => {
6903
- const tooltipRef = React3.useRef(null);
6903
+ const tooltipRef = React2.useRef(null);
6904
6904
  const overlayClassName = cssClassName(COMPONENT_NAME$z, position && `is-${position}`, appearance && `is-${appearance}`, theme && appearance === 'default' && `is-${theme}`);
6905
- const [positionStyles, setPositionStyles] = React3.useState({
6905
+ const [positionStyles, setPositionStyles] = React2.useState({
6906
6906
  '--tooltip-overlay-top': 0,
6907
6907
  '--tooltip-overlay-left': 0,
6908
6908
  '--tooltip-overlay-width': 'auto'
6909
6909
  });
6910
- React3.useEffect(() => {
6910
+ React2.useEffect(() => {
6911
6911
  if (activator && active && tooltipRef.current) {
6912
6912
  const {
6913
6913
  top,
@@ -6934,7 +6934,7 @@ const Overlay = ({
6934
6934
  setPositionStyles(styles);
6935
6935
  }
6936
6936
  }, [active, activator]);
6937
- React3.useEffect(() => {
6937
+ React2.useEffect(() => {
6938
6938
  if (zIndexOverride) {
6939
6939
  setPositionStyles({
6940
6940
  ...positionStyles,
@@ -6968,20 +6968,20 @@ const AlphaTooltip = ({
6968
6968
  persistence,
6969
6969
  theme
6970
6970
  }) => {
6971
- const [activatorNode, setActivatorNode] = React3.useState(null);
6972
- const [isActive, setIsActive] = React3.useState(isActiveProp);
6973
- const [isActivePersistence, setIsActivePersistence] = React3.useState(false);
6974
- const isMouseOver = React3.useRef(false);
6975
- const activatorContainer = React3.useRef(null);
6971
+ const [activatorNode, setActivatorNode] = React2.useState(null);
6972
+ const [isActive, setIsActive] = React2.useState(isActiveProp);
6973
+ const [isActivePersistence, setIsActivePersistence] = React2.useState(false);
6974
+ const isMouseOver = React2.useRef(false);
6975
+ const activatorContainer = React2.useRef(null);
6976
6976
  const WrapperComponent = activatorWrapper;
6977
6977
  const className = cssClassName(COMPONENT_NAME$y);
6978
- const handleOpen = React3.useCallback(() => {
6978
+ const handleOpen = React2.useCallback(() => {
6979
6979
  if (!isActivePersistence) {
6980
6980
  setIsActive(true);
6981
6981
  onOpen && onOpen();
6982
6982
  }
6983
6983
  }, [isActive, isActivePersistence]);
6984
- const handleClose = React3.useCallback(() => {
6984
+ const handleClose = React2.useCallback(() => {
6985
6985
  if (!isActivePersistence) {
6986
6986
  setIsActive(false);
6987
6987
  onClose && onClose();
@@ -7015,15 +7015,15 @@ const AlphaTooltip = ({
7015
7015
  onClose && onClose();
7016
7016
  }
7017
7017
  };
7018
- React3.useEffect(() => {
7018
+ React2.useEffect(() => {
7019
7019
  if (persistence && isActiveProp !== undefined && isActiveProp !== null) {
7020
7020
  setIsActive(isActiveProp);
7021
7021
  }
7022
7022
  }, [isActiveProp]);
7023
- React3.useEffect(() => {
7023
+ React2.useEffect(() => {
7024
7024
  if (isActivePersistence) setIsActive(isActivePersistence);
7025
7025
  }, [isActivePersistence]);
7026
- React3.useEffect(() => {
7026
+ React2.useEffect(() => {
7027
7027
  if (isActive && parentTooltip) {
7028
7028
  document.addEventListener('click', handleClickOutside);
7029
7029
  }
@@ -7258,7 +7258,7 @@ function getRangeDate(range, date) {
7258
7258
  }
7259
7259
 
7260
7260
  const COMPONENT_NAME$x = 'DatePicker__Day';
7261
- const Day = /*#__PURE__*/React3.memo(function Day({
7261
+ const Day = /*#__PURE__*/React2.memo(function Day({
7262
7262
  day,
7263
7263
  isDisabled,
7264
7264
  isFirstSelectedDay,
@@ -7308,8 +7308,8 @@ const Month = ({
7308
7308
  weekDays
7309
7309
  }) => {
7310
7310
  const className = cssClassName(COMPONENT_NAME$w);
7311
- const weeks = React3.useMemo(() => getWeeksByMonth(month, year, weekStartsOn), [month, year, weekStartsOn]);
7312
- const handleDateClick = React3.useCallback(selectedDate => {
7311
+ const weeks = React2.useMemo(() => getWeeksByMonth(month, year, weekStartsOn), [month, year, weekStartsOn]);
7312
+ const handleDateClick = React2.useCallback(selectedDate => {
7313
7313
  if (onChange) {
7314
7314
  onChange(getRangeDate(allowRange ? selected : undefined, selectedDate));
7315
7315
  }
@@ -7394,29 +7394,29 @@ const Header$2 = ({
7394
7394
  onChange,
7395
7395
  months
7396
7396
  }) => {
7397
- const [yearValue, setYearValue] = React3.useState(year);
7397
+ const [yearValue, setYearValue] = React2.useState(year);
7398
7398
  const headerClassName = cssClassName(COMPONENT_NAME$u);
7399
- const handleMonthChange = React3.useCallback((month, year) => {
7399
+ const handleMonthChange = React2.useCallback((month, year) => {
7400
7400
  if (onChange) {
7401
7401
  onChange(month, year);
7402
7402
  }
7403
7403
  }, [onChange]);
7404
- const handleYearChange = React3.useCallback(newYear => {
7404
+ const handleYearChange = React2.useCallback(newYear => {
7405
7405
  if (onChange) {
7406
7406
  onChange(month, newYear);
7407
7407
  }
7408
7408
  }, [onChange, year]);
7409
- const handleYearBlur = React3.useCallback(() => {
7409
+ const handleYearBlur = React2.useCallback(() => {
7410
7410
  if (!yearValue || yearValue < MINIMUM_SELECTABLE_YEAR) {
7411
7411
  setYearValue(year);
7412
7412
  }
7413
7413
  }, [yearValue, year]);
7414
- React3.useEffect(() => {
7414
+ React2.useEffect(() => {
7415
7415
  if (yearValue && yearValue >= MINIMUM_SELECTABLE_YEAR) {
7416
7416
  handleYearChange(yearValue);
7417
7417
  }
7418
7418
  }, [yearValue]);
7419
- React3.useEffect(() => {
7419
+ React2.useEffect(() => {
7420
7420
  if (year) setYearValue(year);
7421
7421
  }, [year]);
7422
7422
  const montName = !months ? MONT_NAME[month] : months[month];
@@ -7471,7 +7471,7 @@ const DatePicker = ({
7471
7471
  weekDays
7472
7472
  }) => {
7473
7473
  const className = cssClassName(COMPONENT_NAME$t);
7474
- const handleDateChange = React3.useCallback(dateRange => {
7474
+ const handleDateChange = React2.useCallback(dateRange => {
7475
7475
  if (onChange) {
7476
7476
  onChange(dateRange);
7477
7477
  }
@@ -7512,12 +7512,12 @@ const Tooltip = ({
7512
7512
  const {
7513
7513
  theme
7514
7514
  } = useTheme();
7515
- const [isTooltipShowed, setIsTooltipShowed] = React3.useState(false);
7516
- const [coords, setCoords] = React3.useState({
7515
+ const [isTooltipShowed, setIsTooltipShowed] = React2.useState(false);
7516
+ const [coords, setCoords] = React2.useState({
7517
7517
  left: -1,
7518
7518
  top: -1
7519
7519
  });
7520
- const [coordsParent, setCoordsParent] = React3.useState({
7520
+ const [coordsParent, setCoordsParent] = React2.useState({
7521
7521
  left: 0,
7522
7522
  top: 0,
7523
7523
  width: 0,
@@ -7607,12 +7607,12 @@ const Tooltip = ({
7607
7607
  });
7608
7608
  }
7609
7609
  };
7610
- React3.useEffect(() => {
7610
+ React2.useEffect(() => {
7611
7611
  if (isTooltipShowed) {
7612
7612
  getCoords();
7613
7613
  }
7614
7614
  }, [isTooltipShowed, coordsParent]);
7615
- React3.useEffect(() => {
7615
+ React2.useEffect(() => {
7616
7616
  if (isActive) {
7617
7617
  handleHover();
7618
7618
  } else {
@@ -7702,11 +7702,11 @@ const InputText = ({
7702
7702
  inputMode,
7703
7703
  tooltipLabel
7704
7704
  }) => {
7705
- const inputRef = React3.useRef(null);
7706
- const textAreaRef = React3.useRef(null);
7707
- const inputContainerRef = React3.useRef(null);
7708
- const [isFocusActive, setIsFocusActive] = React3.useState(false);
7709
- const [parentCoord, setParentCoords] = React3.useState();
7705
+ const inputRef = React2.useRef(null);
7706
+ const textAreaRef = React2.useRef(null);
7707
+ const inputContainerRef = React2.useRef(null);
7708
+ const [isFocusActive, setIsFocusActive] = React2.useState(false);
7709
+ const [parentCoord, setParentCoords] = React2.useState();
7710
7710
  const handleClickFocus = () => {
7711
7711
  const input = isMultiline ? textAreaRef.current : inputRef.current;
7712
7712
  if (input) input?.focus();
@@ -7729,7 +7729,7 @@ const InputText = ({
7729
7729
  const renderInput = () => {
7730
7730
  const clasessContainer = ['InputText-container__inputBody', disabled && 'InputText-container__inputBody--is-disabled', isErrorMode && 'InputText-container__inputBody--is-error', isHelperMode && 'InputText-container__inputBody--is-help', (isFocused || isFocusActive) && 'InputText-container__inputBody--focus', (isFocused || isFocusActive) && isHelperMode && 'InputText-container__inputBody--focus-help', (isFocused || isFocusActive) && isErrorMode && 'InputText-container__inputBody--focus-error', isMultiline && 'InputText-container__inputBody--multiline'].filter(Boolean).join(' ');
7731
7731
  const clasessInput = ['InputText-container__inputBody-input', isHelperMode && 'InputText-container__inputBody-input--is-help', icon && 'InputText-container__inputBody-input--icon', isErrorMode && 'InputText-container__inputBody-input--is-error', prefix && 'InputText-container__inputBody-input--prefix', disabled && 'InputText-container__inputBody-input--disabled', isMultiline && 'InputText-container__inputBody-input--multiline'].filter(Boolean).join(' ');
7732
- const input = /*#__PURE__*/React3.createElement(InputComponent, {
7732
+ const input = /*#__PURE__*/React2.createElement(InputComponent, {
7733
7733
  'aria-label': ariaLabel,
7734
7734
  className: clasessInput,
7735
7735
  ref: isMultiline ? textAreaRef : inputRef,
@@ -7785,13 +7785,13 @@ const InputText = ({
7785
7785
  toggleType: isErrorMode ? 'error' : 'primary',
7786
7786
  children: renderInput()
7787
7787
  });
7788
- React3.useEffect(() => {
7788
+ React2.useEffect(() => {
7789
7789
  if (inputContainerRef.current) {
7790
7790
  setParentCoords(inputContainerRef.current.getBoundingClientRect());
7791
7791
  }
7792
7792
  }, [inputContainerRef]);
7793
7793
  const showLabelContainer = label || secondaryAction;
7794
- const tooltipLabelMarkup = React3.useMemo(() => tooltipLabel ? /*#__PURE__*/jsxRuntime.jsx(AlphaTooltip, {
7794
+ const tooltipLabelMarkup = React2.useMemo(() => tooltipLabel ? /*#__PURE__*/jsxRuntime.jsx(AlphaTooltip, {
7795
7795
  content: tooltipLabel.content,
7796
7796
  theme: tooltipLabel.theme,
7797
7797
  width: "default",
@@ -7898,17 +7898,17 @@ const Popover$1 = ({
7898
7898
  isFixed = false,
7899
7899
  className
7900
7900
  }) => {
7901
- const activatorRef = React3.useRef(null);
7902
- const popoverRef = React3.useRef(null);
7903
- const popoverOriginalHeight = React3.useRef(0);
7904
- const scrollableRef = React3.useRef(null);
7905
- const [popoverPosition, setPopoverPosition] = React3.useState({
7901
+ const activatorRef = React2.useRef(null);
7902
+ const popoverRef = React2.useRef(null);
7903
+ const popoverOriginalHeight = React2.useRef(0);
7904
+ const scrollableRef = React2.useRef(null);
7905
+ const [popoverPosition, setPopoverPosition] = React2.useState({
7906
7906
  top: undefined,
7907
7907
  left: undefined,
7908
7908
  height: undefined
7909
7909
  });
7910
- const [popoverWidth, setPopoverWidth] = React3.useState();
7911
- const setPopoverPositionCallback = React3.useCallback(() => {
7910
+ const [popoverWidth, setPopoverWidth] = React2.useState();
7911
+ const setPopoverPositionCallback = React2.useCallback(() => {
7912
7912
  if (activatorRef.current) {
7913
7913
  return setPosition(activatorRef, {
7914
7914
  ...popoverPosition
@@ -7916,7 +7916,7 @@ const Popover$1 = ({
7916
7916
  }
7917
7917
  return undefined;
7918
7918
  }, [isActive]);
7919
- React3.useEffect(() => {
7919
+ React2.useEffect(() => {
7920
7920
  const findScrollableContainer = element => {
7921
7921
  if (!element) return null;
7922
7922
  if (!(element instanceof HTMLElement)) {
@@ -7946,7 +7946,7 @@ const Popover$1 = ({
7946
7946
  }
7947
7947
  }
7948
7948
  };
7949
- React3.useEffect(() => {
7949
+ React2.useEffect(() => {
7950
7950
  try {
7951
7951
  const observer = new IntersectionObserver(entries => {
7952
7952
  entries.forEach(entry => {
@@ -7969,7 +7969,7 @@ const Popover$1 = ({
7969
7969
  document.removeEventListener("click", handleClickOutside);
7970
7970
  };
7971
7971
  });
7972
- const handleScroll = React3.useCallback(() => {
7972
+ const handleScroll = React2.useCallback(() => {
7973
7973
  if (isFixed || !isActive && !popoverRef.current) {
7974
7974
  return;
7975
7975
  }
@@ -7980,7 +7980,7 @@ const Popover$1 = ({
7980
7980
  });
7981
7981
  }
7982
7982
  }, [isActive, isFixed]);
7983
- React3.useEffect(() => {
7983
+ React2.useEffect(() => {
7984
7984
  const scrollableContainer = scrollableRef.current;
7985
7985
  if (!scrollableContainer) {
7986
7986
  window.addEventListener("scroll", handleScroll);
@@ -7997,12 +7997,12 @@ const Popover$1 = ({
7997
7997
  window.removeEventListener("resize", handleScroll);
7998
7998
  };
7999
7999
  }, [isFixed]);
8000
- React3.useEffect(() => {
8000
+ React2.useEffect(() => {
8001
8001
  if (activatorRef.current && isFullWidth) {
8002
8002
  setPopoverWidth(activatorRef.current.children[0].getBoundingClientRect().width);
8003
8003
  }
8004
8004
  }, [isFullWidth, activatorRef, isActive]);
8005
- React3.useEffect(() => {
8005
+ React2.useEffect(() => {
8006
8006
  if (isActive && popoverRef.current) {
8007
8007
  popoverOriginalHeight.current = popoverRef.current.getBoundingClientRect().height;
8008
8008
  const stylesObj = setPopoverPositionCallback();
@@ -8020,7 +8020,7 @@ const Popover$1 = ({
8020
8020
  });
8021
8021
  }
8022
8022
  }, [popoverRef, isActive]);
8023
- React3.useEffect(() => {
8023
+ React2.useEffect(() => {
8024
8024
  if (popoverPosition.top === 0 && popoverPosition.left === 0 || !isActive || !popoverRef.current) {
8025
8025
  return;
8026
8026
  }
@@ -8036,7 +8036,7 @@ const Popover$1 = ({
8036
8036
  return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
8037
8037
  children: [/*#__PURE__*/jsxRuntime.jsx("div", {
8038
8038
  ref: activatorRef,
8039
- children: React3.Children.only(activator)
8039
+ children: React2.Children.only(activator)
8040
8040
  }), isActive && /*#__PURE__*/ReactDOM.createPortal(/*#__PURE__*/jsxRuntime.jsx("div", {
8041
8041
  ref: popoverRef,
8042
8042
  className: `Popover__container${className ? ` ${className}` : ""}
@@ -9110,18 +9110,10 @@ class Locale {
9110
9110
 
9111
9111
  months(length, format = false) {
9112
9112
  return listStuff(this, length, months, () => {
9113
- // Workaround for "ja" locale: formatToParts does not label all parts of the month
9114
- // as "month" and for this locale there is no difference between "format" and "non-format".
9115
- // As such, just use format() instead of formatToParts() and take the whole string
9116
- const monthSpecialCase = this.intl === "ja" || this.intl.startsWith("ja-");
9117
- format &= !monthSpecialCase;
9118
9113
  const intl = format ? { month: length, day: "numeric" } : { month: length },
9119
9114
  formatStr = format ? "format" : "standalone";
9120
9115
  if (!this.monthsCache[formatStr][length]) {
9121
- const mapper = !monthSpecialCase
9122
- ? (dt) => this.extract(dt, intl, "month")
9123
- : (dt) => this.dtFormatter(dt, intl).format();
9124
- this.monthsCache[formatStr][length] = mapMonths(mapper);
9116
+ this.monthsCache[formatStr][length] = mapMonths((dt) => this.extract(dt, intl, "month"));
9125
9117
  }
9126
9118
  return this.monthsCache[formatStr][length];
9127
9119
  });
@@ -10107,24 +10099,10 @@ function parseMillis(fraction) {
10107
10099
  }
10108
10100
  }
10109
10101
 
10110
- function roundTo(number, digits, rounding = "round") {
10111
- const factor = 10 ** digits;
10112
- switch (rounding) {
10113
- case "expand":
10114
- return number > 0
10115
- ? Math.ceil(number * factor) / factor
10116
- : Math.floor(number * factor) / factor;
10117
- case "trunc":
10118
- return Math.trunc(number * factor) / factor;
10119
- case "round":
10120
- return Math.round(number * factor) / factor;
10121
- case "floor":
10122
- return Math.floor(number * factor) / factor;
10123
- case "ceil":
10124
- return Math.ceil(number * factor) / factor;
10125
- default:
10126
- throw new RangeError(`Value rounding ${rounding} is out of range`);
10127
- }
10102
+ function roundTo(number, digits, towardZero = false) {
10103
+ const factor = 10 ** digits,
10104
+ rounder = towardZero ? Math.trunc : Math.round;
10105
+ return rounder(number * factor) / factor;
10128
10106
  }
10129
10107
 
10130
10108
  // DATE BASICS
@@ -10232,7 +10210,7 @@ function signedOffset(offHourStr, offMinuteStr) {
10232
10210
 
10233
10211
  function asNumber(value) {
10234
10212
  const numericValue = Number(value);
10235
- if (typeof value === "boolean" || value === "" || !Number.isFinite(numericValue))
10213
+ if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue))
10236
10214
  throw new InvalidArgumentError(`Invalid unit value ${value}`);
10237
10215
  return numericValue;
10238
10216
  }
@@ -10491,12 +10469,8 @@ class Formatter {
10491
10469
  for (let i = 0; i < fmt.length; i++) {
10492
10470
  const c = fmt.charAt(i);
10493
10471
  if (c === "'") {
10494
- // turn '' into a literal signal quote instead of just skipping the empty literal
10495
- if (currentFull.length > 0 || bracketed) {
10496
- splits.push({
10497
- literal: bracketed || /^\s+$/.test(currentFull),
10498
- val: currentFull === "" ? "'" : currentFull,
10499
- });
10472
+ if (currentFull.length > 0) {
10473
+ splits.push({ literal: bracketed || /^\s+$/.test(currentFull), val: currentFull });
10500
10474
  }
10501
10475
  current = null;
10502
10476
  currentFull = "";
@@ -10560,7 +10534,7 @@ class Formatter {
10560
10534
  return this.dtFormatter(dt, opts).resolvedOptions();
10561
10535
  }
10562
10536
 
10563
- num(n, p = 0, signDisplay = undefined) {
10537
+ num(n, p = 0) {
10564
10538
  // we get some perf out of doing this here, annoyingly
10565
10539
  if (this.opts.forceSimple) {
10566
10540
  return padStart(n, p);
@@ -10571,9 +10545,6 @@ class Formatter {
10571
10545
  if (p > 0) {
10572
10546
  opts.padTo = p;
10573
10547
  }
10574
- if (signDisplay) {
10575
- opts.signDisplay = signDisplay;
10576
- }
10577
10548
 
10578
10549
  return this.loc.numberFormatter(opts).format(n);
10579
10550
  }
@@ -10809,44 +10780,32 @@ class Formatter {
10809
10780
  }
10810
10781
 
10811
10782
  formatDurationFromString(dur, fmt) {
10812
- const invertLargest = this.opts.signMode === "negativeLargestOnly" ? -1 : 1;
10813
10783
  const tokenToField = (token) => {
10814
10784
  switch (token[0]) {
10815
10785
  case "S":
10816
- return "milliseconds";
10786
+ return "millisecond";
10817
10787
  case "s":
10818
- return "seconds";
10788
+ return "second";
10819
10789
  case "m":
10820
- return "minutes";
10790
+ return "minute";
10821
10791
  case "h":
10822
- return "hours";
10792
+ return "hour";
10823
10793
  case "d":
10824
- return "days";
10794
+ return "day";
10825
10795
  case "w":
10826
- return "weeks";
10796
+ return "week";
10827
10797
  case "M":
10828
- return "months";
10798
+ return "month";
10829
10799
  case "y":
10830
- return "years";
10800
+ return "year";
10831
10801
  default:
10832
10802
  return null;
10833
10803
  }
10834
10804
  },
10835
- tokenToString = (lildur, info) => (token) => {
10805
+ tokenToString = (lildur) => (token) => {
10836
10806
  const mapped = tokenToField(token);
10837
10807
  if (mapped) {
10838
- const inversionFactor =
10839
- info.isNegativeDuration && mapped !== info.largestUnit ? invertLargest : 1;
10840
- let signDisplay;
10841
- if (this.opts.signMode === "negativeLargestOnly" && mapped !== info.largestUnit) {
10842
- signDisplay = "never";
10843
- } else if (this.opts.signMode === "all") {
10844
- signDisplay = "always";
10845
- } else {
10846
- // "auto" and "negative" are the same, but "auto" has better support
10847
- signDisplay = "auto";
10848
- }
10849
- return this.num(lildur.get(mapped) * inversionFactor, token.length, signDisplay);
10808
+ return this.num(lildur.get(mapped), token.length);
10850
10809
  } else {
10851
10810
  return token;
10852
10811
  }
@@ -10856,14 +10815,8 @@ class Formatter {
10856
10815
  (found, { literal, val }) => (literal ? found : found.concat(val)),
10857
10816
  []
10858
10817
  ),
10859
- collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t)),
10860
- durationInfo = {
10861
- isNegativeDuration: collapsed < 0,
10862
- // this relies on "collapsed" being based on "shiftTo", which builds up the object
10863
- // in order
10864
- largestUnit: Object.keys(collapsed.values)[0],
10865
- };
10866
- return stringifyTokens(tokens, tokenToString(collapsed, durationInfo));
10818
+ collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t));
10819
+ return stringifyTokens(tokens, tokenToString(collapsed));
10867
10820
  }
10868
10821
  }
10869
10822
 
@@ -10924,11 +10877,11 @@ function simpleParse(...keys) {
10924
10877
  }
10925
10878
 
10926
10879
  // ISO and SQL parsing
10927
- const offsetRegex = /(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/;
10880
+ const offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/;
10928
10881
  const isoExtendedZone = `(?:${offsetRegex.source}?(?:\\[(${ianaRegex.source})\\])?)?`;
10929
10882
  const isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/;
10930
10883
  const isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);
10931
- const isoTimeExtensionRegex = RegExp(`(?:[Tt]${isoTimeRegex.source})?`);
10884
+ const isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`);
10932
10885
  const isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/;
10933
10886
  const isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/;
10934
10887
  const isoOrdinalRegex = /(\d{4})-?(\d{3})/;
@@ -11643,13 +11596,9 @@ class Duration {
11643
11596
  * @param {string} fmt - the format string
11644
11597
  * @param {Object} opts - options
11645
11598
  * @param {boolean} [opts.floor=true] - floor numerical values
11646
- * @param {'negative'|'all'|'negativeLargestOnly'} [opts.signMode=negative] - How to handle signs
11647
11599
  * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2"
11648
11600
  * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002"
11649
11601
  * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000"
11650
- * @example Duration.fromObject({ days: 6, seconds: 2 }).toFormat("d s", { signMode: "all" }) //=> "+6 +2"
11651
- * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat("d s", { signMode: "all" }) //=> "-6 -2"
11652
- * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat("d s", { signMode: "negativeLargestOnly" }) //=> "-6 2"
11653
11602
  * @return {string}
11654
11603
  */
11655
11604
  toFormat(fmt, opts = {}) {
@@ -11669,25 +11618,21 @@ class Duration {
11669
11618
  * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options
11670
11619
  * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.
11671
11620
  * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.
11672
- * @param {boolean} [opts.showZeros=true] - Show all units previously used by the duration even if they are zero
11673
11621
  * @example
11674
11622
  * ```js
11675
- * var dur = Duration.fromObject({ months: 1, weeks: 0, hours: 5, minutes: 6 })
11676
- * dur.toHuman() //=> '1 month, 0 weeks, 5 hours, 6 minutes'
11677
- * dur.toHuman({ listStyle: "long" }) //=> '1 month, 0 weeks, 5 hours, and 6 minutes'
11678
- * dur.toHuman({ unitDisplay: "short" }) //=> '1 mth, 0 wks, 5 hr, 6 min'
11679
- * dur.toHuman({ showZeros: false }) //=> '1 month, 5 hours, 6 minutes'
11623
+ * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })
11624
+ * dur.toHuman() //=> '1 day, 5 hours, 6 minutes'
11625
+ * dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes'
11626
+ * dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min'
11680
11627
  * ```
11681
11628
  */
11682
11629
  toHuman(opts = {}) {
11683
11630
  if (!this.isValid) return INVALID$2;
11684
11631
 
11685
- const showZeros = opts.showZeros !== false;
11686
-
11687
11632
  const l = orderedUnits$1
11688
11633
  .map((unit) => {
11689
11634
  const val = this.values[unit];
11690
- if (isUndefined(val) || (val === 0 && !showZeros)) {
11635
+ if (isUndefined(val)) {
11691
11636
  return null;
11692
11637
  }
11693
11638
  return this.loc
@@ -12047,17 +11992,6 @@ class Duration {
12047
11992
  return clone$2(this, { values: negated }, true);
12048
11993
  }
12049
11994
 
12050
- /**
12051
- * Removes all units with values equal to 0 from this Duration.
12052
- * @example Duration.fromObject({ years: 2, days: 0, hours: 0, minutes: 0 }).removeZeros().toObject() //=> { years: 2 }
12053
- * @return {Duration}
12054
- */
12055
- removeZeros() {
12056
- if (!this.isValid) return this;
12057
- const vals = removeZeroes(this.values);
12058
- return clone$2(this, { values: vals }, true);
12059
- }
12060
-
12061
11995
  /**
12062
11996
  * Get the years.
12063
11997
  * @type {number}
@@ -12368,8 +12302,7 @@ class Interval {
12368
12302
  }
12369
12303
 
12370
12304
  /**
12371
- * Returns the end of the Interval. This is the first instant which is not part of the interval
12372
- * (Interval is half-open).
12305
+ * Returns the end of the Interval
12373
12306
  * @type {DateTime}
12374
12307
  */
12375
12308
  get end() {
@@ -13800,22 +13733,21 @@ function toTechFormat(dt, format, allowZ = true) {
13800
13733
  : null;
13801
13734
  }
13802
13735
 
13803
- function toISODate(o, extended, precision) {
13736
+ function toISODate(o, extended) {
13804
13737
  const longFormat = o.c.year > 9999 || o.c.year < 0;
13805
13738
  let c = "";
13806
13739
  if (longFormat && o.c.year >= 0) c += "+";
13807
13740
  c += padStart(o.c.year, longFormat ? 6 : 4);
13808
- if (precision === "year") return c;
13741
+
13809
13742
  if (extended) {
13810
13743
  c += "-";
13811
13744
  c += padStart(o.c.month);
13812
- if (precision === "month") return c;
13813
13745
  c += "-";
13746
+ c += padStart(o.c.day);
13814
13747
  } else {
13815
13748
  c += padStart(o.c.month);
13816
- if (precision === "month") return c;
13749
+ c += padStart(o.c.day);
13817
13750
  }
13818
- c += padStart(o.c.day);
13819
13751
  return c;
13820
13752
  }
13821
13753
 
@@ -13825,39 +13757,26 @@ function toISOTime(
13825
13757
  suppressSeconds,
13826
13758
  suppressMilliseconds,
13827
13759
  includeOffset,
13828
- extendedZone,
13829
- precision
13760
+ extendedZone
13830
13761
  ) {
13831
- let showSeconds = !suppressSeconds || o.c.millisecond !== 0 || o.c.second !== 0,
13832
- c = "";
13833
- switch (precision) {
13834
- case "day":
13835
- case "month":
13836
- case "year":
13837
- break;
13838
- default:
13839
- c += padStart(o.c.hour);
13840
- if (precision === "hour") break;
13841
- if (extended) {
13842
- c += ":";
13843
- c += padStart(o.c.minute);
13844
- if (precision === "minute") break;
13845
- if (showSeconds) {
13846
- c += ":";
13847
- c += padStart(o.c.second);
13848
- }
13849
- } else {
13850
- c += padStart(o.c.minute);
13851
- if (precision === "minute") break;
13852
- if (showSeconds) {
13853
- c += padStart(o.c.second);
13854
- }
13855
- }
13856
- if (precision === "second") break;
13857
- if (showSeconds && (!suppressMilliseconds || o.c.millisecond !== 0)) {
13858
- c += ".";
13859
- c += padStart(o.c.millisecond, 3);
13860
- }
13762
+ let c = padStart(o.c.hour);
13763
+ if (extended) {
13764
+ c += ":";
13765
+ c += padStart(o.c.minute);
13766
+ if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {
13767
+ c += ":";
13768
+ }
13769
+ } else {
13770
+ c += padStart(o.c.minute);
13771
+ }
13772
+
13773
+ if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {
13774
+ c += padStart(o.c.second);
13775
+
13776
+ if (o.c.millisecond !== 0 || !suppressMilliseconds) {
13777
+ c += ".";
13778
+ c += padStart(o.c.millisecond, 3);
13779
+ }
13861
13780
  }
13862
13781
 
13863
13782
  if (includeOffset) {
@@ -14049,9 +13968,8 @@ function quickDT(obj, opts) {
14049
13968
 
14050
13969
  function diffRelative(start, end, opts) {
14051
13970
  const round = isUndefined(opts.round) ? true : opts.round,
14052
- rounding = isUndefined(opts.rounding) ? "trunc" : opts.rounding,
14053
13971
  format = (c, unit) => {
14054
- c = roundTo(c, round || opts.calendary ? 0 : 2, opts.calendary ? "round" : rounding);
13972
+ c = roundTo(c, round || opts.calendary ? 0 : 2, true);
14055
13973
  const formatter = end.loc.clone(opts).relFormatter(opts);
14056
13974
  return formatter.format(c, unit);
14057
13975
  },
@@ -15430,13 +15348,10 @@ class DateTime {
15430
15348
  * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
15431
15349
  * @param {boolean} [opts.extendedZone=false] - add the time zone format extension
15432
15350
  * @param {string} [opts.format='extended'] - choose between the basic and extended format
15433
- * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'years', 'months', 'days', 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.
15434
15351
  * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'
15435
15352
  * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'
15436
15353
  * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'
15437
15354
  * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'
15438
- * @example DateTime.now().toISO({ precision: 'day' }) //=> '2017-04-22Z'
15439
- * @example DateTime.now().toISO({ precision: 'minute' }) //=> '2017-04-22T20:47Z'
15440
15355
  * @return {string|null}
15441
15356
  */
15442
15357
  toISO({
@@ -15445,26 +15360,16 @@ class DateTime {
15445
15360
  suppressMilliseconds = false,
15446
15361
  includeOffset = true,
15447
15362
  extendedZone = false,
15448
- precision = "milliseconds",
15449
15363
  } = {}) {
15450
15364
  if (!this.isValid) {
15451
15365
  return null;
15452
15366
  }
15453
15367
 
15454
- precision = normalizeUnit(precision);
15455
15368
  const ext = format === "extended";
15456
15369
 
15457
- let c = toISODate(this, ext, precision);
15458
- if (orderedUnits.indexOf(precision) >= 3) c += "T";
15459
- c += toISOTime(
15460
- this,
15461
- ext,
15462
- suppressSeconds,
15463
- suppressMilliseconds,
15464
- includeOffset,
15465
- extendedZone,
15466
- precision
15467
- );
15370
+ let c = toISODate(this, ext);
15371
+ c += "T";
15372
+ c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);
15468
15373
  return c;
15469
15374
  }
15470
15375
 
@@ -15472,17 +15377,16 @@ class DateTime {
15472
15377
  * Returns an ISO 8601-compliant string representation of this DateTime's date component
15473
15378
  * @param {Object} opts - options
15474
15379
  * @param {string} [opts.format='extended'] - choose between the basic and extended format
15475
- * @param {string} [opts.precision='day'] - truncate output to desired precision: 'years', 'months', or 'days'.
15476
15380
  * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'
15477
15381
  * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'
15478
- * @example DateTime.utc(1982, 5, 25).toISODate({ precision: 'month' }) //=> '1982-05'
15479
15382
  * @return {string|null}
15480
15383
  */
15481
- toISODate({ format = "extended", precision = "day" } = {}) {
15384
+ toISODate({ format = "extended" } = {}) {
15482
15385
  if (!this.isValid) {
15483
15386
  return null;
15484
15387
  }
15485
- return toISODate(this, format === "extended", normalizeUnit(precision));
15388
+
15389
+ return toISODate(this, format === "extended");
15486
15390
  }
15487
15391
 
15488
15392
  /**
@@ -15503,12 +15407,10 @@ class DateTime {
15503
15407
  * @param {boolean} [opts.extendedZone=true] - add the time zone format extension
15504
15408
  * @param {boolean} [opts.includePrefix=false] - include the `T` prefix
15505
15409
  * @param {string} [opts.format='extended'] - choose between the basic and extended format
15506
- * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.
15507
15410
  * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'
15508
15411
  * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'
15509
15412
  * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'
15510
15413
  * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'
15511
- * @example DateTime.utc().set({ hour: 7, minute: 34, second: 56 }).toISOTime({ precision: 'minute' }) //=> '07:34Z'
15512
15414
  * @return {string}
15513
15415
  */
15514
15416
  toISOTime({
@@ -15518,14 +15420,12 @@ class DateTime {
15518
15420
  includePrefix = false,
15519
15421
  extendedZone = false,
15520
15422
  format = "extended",
15521
- precision = "milliseconds",
15522
15423
  } = {}) {
15523
15424
  if (!this.isValid) {
15524
15425
  return null;
15525
15426
  }
15526
15427
 
15527
- precision = normalizeUnit(precision);
15528
- let c = includePrefix && orderedUnits.indexOf(precision) >= 3 ? "T" : "";
15428
+ let c = includePrefix ? "T" : "";
15529
15429
  return (
15530
15430
  c +
15531
15431
  toISOTime(
@@ -15534,8 +15434,7 @@ class DateTime {
15534
15434
  suppressSeconds,
15535
15435
  suppressMilliseconds,
15536
15436
  includeOffset,
15537
- extendedZone,
15538
- precision
15437
+ extendedZone
15539
15438
  )
15540
15439
  );
15541
15440
  }
@@ -15813,13 +15712,12 @@ class DateTime {
15813
15712
 
15814
15713
  /**
15815
15714
  * Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your
15816
- * platform supports Intl.RelativeTimeFormat. Rounds towards zero by default.
15715
+ * platform supports Intl.RelativeTimeFormat. Rounds down by default.
15817
15716
  * @param {Object} options - options that affect the output
15818
15717
  * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
15819
15718
  * @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow"
15820
15719
  * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds"
15821
15720
  * @param {boolean} [options.round=true] - whether to round the numbers in the output.
15822
- * @param {string} [options.rounding="trunc"] - rounding method to use when rounding the numbers in the output. Can be "trunc" (toward zero), "expand" (away from zero), "round", "floor", or "ceil".
15823
15721
  * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.
15824
15722
  * @param {string} options.locale - override the locale of this DateTime
15825
15723
  * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
@@ -16249,18 +16147,18 @@ const AlphaInputDate = ({
16249
16147
  months,
16250
16148
  weekdays
16251
16149
  }) => {
16252
- const [isPopoverActive, setIsPopoverActive] = React3.useState(false);
16150
+ const [isPopoverActive, setIsPopoverActive] = React2.useState(false);
16253
16151
  const [{
16254
16152
  month,
16255
16153
  year
16256
- }, setDate] = React3.useState({
16154
+ }, setDate] = React2.useState({
16257
16155
  month: new Date().getMonth(),
16258
16156
  year: new Date().getFullYear()
16259
16157
  });
16260
- const [inputValue, setInputValue] = React3.useState();
16261
- const [isErrorTooltipActive, setIsErrorTooltipActive] = React3.useState(false);
16262
- const [selectedDate, setSelectedDate] = React3.useState();
16263
- const inputRef = React3.useRef(null);
16158
+ const [inputValue, setInputValue] = React2.useState();
16159
+ const [isErrorTooltipActive, setIsErrorTooltipActive] = React2.useState(false);
16160
+ const [selectedDate, setSelectedDate] = React2.useState();
16161
+ const inputRef = React2.useRef(null);
16264
16162
  const className = cssClassName(COMPONENT_NAME$s);
16265
16163
  const handleMonthChange = (monthValue, yearValue) => {
16266
16164
  setDate({
@@ -16328,7 +16226,7 @@ const AlphaInputDate = ({
16328
16226
  onBlur();
16329
16227
  }
16330
16228
  };
16331
- React3.useEffect(() => {
16229
+ React2.useEffect(() => {
16332
16230
  if (value !== undefined && !selectedDate) {
16333
16231
  setSelectedDate(getValidDate(value) || null);
16334
16232
  }
@@ -16340,7 +16238,7 @@ const AlphaInputDate = ({
16340
16238
  setSelectedDate(undefined);
16341
16239
  }
16342
16240
  }, [value, inputValue]);
16343
- React3.useEffect(() => {
16241
+ React2.useEffect(() => {
16344
16242
  if (inputRef.current) {
16345
16243
  inputRef.current.querySelector('input')?.addEventListener('paste', handlePaste);
16346
16244
  }
@@ -16350,7 +16248,7 @@ const AlphaInputDate = ({
16350
16248
  }
16351
16249
  };
16352
16250
  }, [inputRef]);
16353
- React3.useEffect(() => {
16251
+ React2.useEffect(() => {
16354
16252
  if (inputValue !== undefined) {
16355
16253
  if (getValidDate(inputValue)) {
16356
16254
  setSelectedDate(getValidDate(inputValue) || null);
@@ -16359,7 +16257,7 @@ const AlphaInputDate = ({
16359
16257
  }
16360
16258
  }
16361
16259
  }, [inputValue]);
16362
- React3.useEffect(() => {
16260
+ React2.useEffect(() => {
16363
16261
  if (selectedDate !== undefined) {
16364
16262
  if (selectedDate) {
16365
16263
  setDate({
@@ -16437,8 +16335,8 @@ const OptionList = ({
16437
16335
  const isSelected = ({
16438
16336
  value
16439
16337
  }, selected) => selected.indexOf(value) > -1;
16440
- const [cursor, setCursor] = React3.useState(-1);
16441
- const [section, setSection] = React3.useState(0);
16338
+ const [cursor, setCursor] = React2.useState(-1);
16339
+ const [section, setSection] = React2.useState(0);
16442
16340
  const handleSelectItem = item => {
16443
16341
  if (onChange) {
16444
16342
  if (isMultiple) {
@@ -16636,12 +16534,12 @@ const Select = ({
16636
16534
  action,
16637
16535
  showSearch = true
16638
16536
  }) => {
16639
- const [isActivePopover, setIsActive] = React3.useState(false);
16640
- const selectActivatorRef = React3.useRef(null);
16641
- const [parentCoord, setParentCoords] = React3.useState();
16642
- const [search, setSearch] = React3.useState("");
16643
- const [sectionsFiltered, setSectionsFiltered] = React3.useState(sections);
16644
- const [itemsFiltered, setItemsFiltered] = React3.useState(items);
16537
+ const [isActivePopover, setIsActive] = React2.useState(false);
16538
+ const selectActivatorRef = React2.useRef(null);
16539
+ const [parentCoord, setParentCoords] = React2.useState();
16540
+ const [search, setSearch] = React2.useState("");
16541
+ const [sectionsFiltered, setSectionsFiltered] = React2.useState(sections);
16542
+ const [itemsFiltered, setItemsFiltered] = React2.useState(items);
16645
16543
  const {
16646
16544
  theme
16647
16545
  } = useTheme();
@@ -16685,7 +16583,7 @@ const Select = ({
16685
16583
  setIsActive(false);
16686
16584
  }
16687
16585
  };
16688
- React3.useEffect(() => {
16586
+ React2.useEffect(() => {
16689
16587
  if (isReadOnly && isActivePopover) {
16690
16588
  document.addEventListener("click", handleClickSelectReadOnlyOutside);
16691
16589
  return () => {
@@ -16693,10 +16591,10 @@ const Select = ({
16693
16591
  };
16694
16592
  }
16695
16593
  }, [isActivePopover]);
16696
- React3.useEffect(() => {
16594
+ React2.useEffect(() => {
16697
16595
  setSectionsFiltered(sections);
16698
16596
  }, [sections]);
16699
- React3.useEffect(() => {
16597
+ React2.useEffect(() => {
16700
16598
  setItemsFiltered(items);
16701
16599
  }, [items]);
16702
16600
  const handleOpenPopover = () => setIsActive(!isActivePopover);
@@ -16761,7 +16659,7 @@ const Select = ({
16761
16659
  } else if (key.key === "Escape") onEscKeyDown();
16762
16660
  };
16763
16661
  const clasessSelect = ["Select__input-container", isDisabled && "Select__input-container--is-disabled", isActivePopover && "Select__input-container--is-focus", isHelperMode && "Select__input-container--is-help", isDanger && "Select__input-container--is-error", isActivePopover && isHelperMode && "Select__input-container--is-focus-help", isActivePopover && isDanger && "Select__input-container--is-focus-error"].filter(Boolean).join(" ");
16764
- const handleActionClick = React3.useCallback(() => {
16662
+ const handleActionClick = React2.useCallback(() => {
16765
16663
  if (!action) return;
16766
16664
  action.onClick?.();
16767
16665
  setIsActive(false);
@@ -16862,13 +16760,13 @@ const Select = ({
16862
16760
  children: renderInput()
16863
16761
  });
16864
16762
  };
16865
- React3.useEffect(() => {
16763
+ React2.useEffect(() => {
16866
16764
  if (selectActivatorRef.current) {
16867
16765
  setParentCoords(selectActivatorRef.current.getBoundingClientRect());
16868
16766
  }
16869
16767
  }, [selectActivatorRef]);
16870
16768
  const showLabelContainer = label || secondaryAction;
16871
- const tooltipLabelMarkup = React3.useMemo(() => tooltipLabel ? /*#__PURE__*/jsxRuntime.jsx(AlphaTooltip, {
16769
+ const tooltipLabelMarkup = React2.useMemo(() => tooltipLabel ? /*#__PURE__*/jsxRuntime.jsx(AlphaTooltip, {
16872
16770
  content: tooltipLabel.content,
16873
16771
  theme: tooltipLabel.theme,
16874
16772
  width: "default",
@@ -17048,10 +16946,10 @@ const Modal = ({
17048
16946
  const handleOnKeyUp = event => {
17049
16947
  if (isOpen && event.key == 'Escape' && onClose) onClose();
17050
16948
  };
17051
- React3.useEffect(() => {
16949
+ React2.useEffect(() => {
17052
16950
  document.addEventListener('keyup', handleOnKeyUp);
17053
16951
  });
17054
- React3.useEffect(() => {
16952
+ React2.useEffect(() => {
17055
16953
  if (isOpen) document.body.style.overflow = 'hidden';else document.body.removeAttribute('style');
17056
16954
  }, [isOpen]);
17057
16955
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
@@ -17113,8 +17011,8 @@ const Group = ({
17113
17011
  children,
17114
17012
  condensed
17115
17013
  }) => {
17116
- const itemsMarkup = React3.Children.map(children, (child, index) => {
17117
- if (! /*#__PURE__*/React3.isValidElement(child)) return child;
17014
+ const itemsMarkup = React2.Children.map(children, (child, index) => {
17015
+ if (! /*#__PURE__*/React2.isValidElement(child)) return child;
17118
17016
  return /*#__PURE__*/jsxRuntime.jsx(Item$3, {
17119
17017
  children: child
17120
17018
  }, index);
@@ -17130,7 +17028,7 @@ const FormLayout = ({
17130
17028
  children
17131
17029
  }) => {
17132
17030
  const renderItems = (child, index) => {
17133
- if (! /*#__PURE__*/React3.isValidElement(child) || child.type === Group) {
17031
+ if (! /*#__PURE__*/React2.isValidElement(child) || child.type === Group) {
17134
17032
  return child;
17135
17033
  }
17136
17034
  return /*#__PURE__*/jsxRuntime.jsx(Item$3, {
@@ -17139,7 +17037,7 @@ const FormLayout = ({
17139
17037
  };
17140
17038
  return /*#__PURE__*/jsxRuntime.jsx("div", {
17141
17039
  className: "FormLayout",
17142
- children: React3.Children.map(children, renderItems)
17040
+ children: React2.Children.map(children, renderItems)
17143
17041
  });
17144
17042
  };
17145
17043
  FormLayout.Group = Group;
@@ -17302,7 +17200,7 @@ const FilterField$1 = ({
17302
17200
  } else nValue = newValue;
17303
17201
  if (onChange) onChange(nValue, id);
17304
17202
  };
17305
- const valueField = React3.useMemo(() => {
17203
+ const valueField = React2.useMemo(() => {
17306
17204
  if (filterValue === null) return undefined;
17307
17205
  if (type === 'DATE' && !filterValue) return undefined;
17308
17206
  return filterValue || '';
@@ -17335,9 +17233,9 @@ const AlphaFilterControl = ({
17335
17233
  title,
17336
17234
  values
17337
17235
  }) => {
17338
- const [selectedTab, setSelectedTab] = React3.useState(0);
17339
- const [fieldsSearch, setFieldsSearch] = React3.useState([]);
17340
- const [filterValues, setFilterValues] = React3.useState(structuredClone(values));
17236
+ const [selectedTab, setSelectedTab] = React2.useState(0);
17237
+ const [fieldsSearch, setFieldsSearch] = React2.useState([]);
17238
+ const [filterValues, setFilterValues] = React2.useState(structuredClone(values));
17341
17239
  const tabsConfig = sections.map(section => ({
17342
17240
  content: section.title,
17343
17241
  id: section.id,
@@ -17385,7 +17283,7 @@ const AlphaFilterControl = ({
17385
17283
  })
17386
17284
  }, `key-${field.key}`);
17387
17285
  };
17388
- const formMarkup = React3.useMemo(() => /*#__PURE__*/jsxRuntime.jsx(Grid, {
17286
+ const formMarkup = React2.useMemo(() => /*#__PURE__*/jsxRuntime.jsx(Grid, {
17389
17287
  children: fieldsSearch.map(renderField)
17390
17288
  }), [fieldsSearch, filterValues]);
17391
17289
  const handleOnApply = () => {
@@ -17397,16 +17295,16 @@ const AlphaFilterControl = ({
17397
17295
  primaryAction.onClick(filtersValues);
17398
17296
  };
17399
17297
  const handleOnChangeTab = index => setSelectedTab(index);
17400
- React3.useEffect(() => {
17298
+ React2.useEffect(() => {
17401
17299
  setFieldsSearch(sections[selectedTab].fields);
17402
17300
  }, [selectedTab]);
17403
- React3.useEffect(() => {
17301
+ React2.useEffect(() => {
17404
17302
  setFieldsSearch(sections[selectedTab].fields);
17405
17303
  }, [sections]);
17406
- React3.useEffect(() => {
17304
+ React2.useEffect(() => {
17407
17305
  setFilterValues(values);
17408
17306
  }, [values]);
17409
- const bodyMarkup = React3.useMemo(() => /*#__PURE__*/jsxRuntime.jsx("div", {
17307
+ const bodyMarkup = React2.useMemo(() => /*#__PURE__*/jsxRuntime.jsx("div", {
17410
17308
  className: `${MAIN_CLASS$g}__BodyWrapper`,
17411
17309
  children: /*#__PURE__*/jsxRuntime.jsx(Tabs, {
17412
17310
  selected: selectedTab,
@@ -17685,8 +17583,8 @@ const InputTag$1 = ({
17685
17583
  tagRemoveIcon,
17686
17584
  helpText
17687
17585
  }) => {
17688
- const [isFocused, setIsFocused] = React3.useState(false);
17689
- const inputRef = React3.useRef(null);
17586
+ const [isFocused, setIsFocused] = React2.useState(false);
17587
+ const inputRef = React2.useRef(null);
17690
17588
  const handleInputFocus = () => {
17691
17589
  setIsFocused(true);
17692
17590
  if (onFocus) {
@@ -17792,7 +17690,7 @@ const List = ({
17792
17690
  selected,
17793
17691
  onChange
17794
17692
  }) => {
17795
- const listWrapperRef = React3.useRef(null);
17693
+ const listWrapperRef = React2.useRef(null);
17796
17694
  const scrollToSelected = () => {
17797
17695
  const listWrapper = listWrapperRef.current;
17798
17696
  if (listWrapper) {
@@ -17811,7 +17709,7 @@ const List = ({
17811
17709
  }
17812
17710
  }
17813
17711
  };
17814
- React3.useEffect(() => {
17712
+ React2.useEffect(() => {
17815
17713
  scrollToSelected();
17816
17714
  });
17817
17715
  const handleChange = value => {
@@ -17910,9 +17808,9 @@ const AlphaMultiSelectionPicker = ({
17910
17808
  value: number
17911
17809
  }));
17912
17810
  };
17913
- const headersPicker = React3.useMemo(() => items.map(item => item.plural), [items]);
17914
- const itemsPicker = React3.useMemo(() => items.map(item => getListItem(item.min, item.max)), [items]);
17915
- const valuesSelected = React3.useMemo(() => items.map(item => item.value), [items]);
17811
+ const headersPicker = React2.useMemo(() => items.map(item => item.plural), [items]);
17812
+ const itemsPicker = React2.useMemo(() => items.map(item => getListItem(item.min, item.max)), [items]);
17813
+ const valuesSelected = React2.useMemo(() => items.map(item => item.value), [items]);
17916
17814
  const pickerMarkup = /*#__PURE__*/jsxRuntime.jsx(Picker, {
17917
17815
  items: itemsPicker,
17918
17816
  headers: headersPicker,
@@ -17964,7 +17862,7 @@ const AlphaSegmentedControl = ({
17964
17862
  });
17965
17863
  };
17966
17864
 
17967
- const SideMenuContext = /*#__PURE__*/React3.createContext({});
17865
+ const SideMenuContext = /*#__PURE__*/React2.createContext({});
17968
17866
 
17969
17867
  const COMPONENT_NAME$h = "AlphaSideMenu__Item";
17970
17868
  const Item$2 = ({
@@ -17988,16 +17886,16 @@ const Item$2 = ({
17988
17886
  collapsed,
17989
17887
  setCurrentTierItems,
17990
17888
  location
17991
- } = React3.useContext(SideMenuContext);
17889
+ } = React2.useContext(SideMenuContext);
17992
17890
  const isCollapsed = isCollapsedProp !== undefined ? isCollapsedProp : collapsed;
17993
17891
  const AnchorComponent = !isExternal ? anchorComponent || "a" : "a";
17994
- const isActive = React3.useMemo(() => {
17892
+ const isActive = React2.useMemo(() => {
17995
17893
  if (location?.pathname && url) {
17996
17894
  return isExact ? location.pathname === url : location.pathname.includes(url);
17997
17895
  }
17998
17896
  return isActiveProp;
17999
17897
  }, [location?.pathname, isExact, isActiveProp, url]);
18000
- React3.useEffect(() => {
17898
+ React2.useEffect(() => {
18001
17899
  if (isActive && subNavigationItems) {
18002
17900
  setCurrentTierItems?.(subNavigationItems || [], {
18003
17901
  label,
@@ -18020,7 +17918,7 @@ const Item$2 = ({
18020
17918
  const iconSource = icon && isValidIcon(icon?.icon) ? /*#__PURE__*/jsxRuntime.jsx(AlphaIcon, {
18021
17919
  source: icon?.icon,
18022
17920
  outlined: icon?.outlined
18023
- }) : /*#__PURE__*/jsxRuntime.jsx(React3.Fragment, {
17921
+ }) : /*#__PURE__*/jsxRuntime.jsx(React2.Fragment, {
18024
17922
  children: icon
18025
17923
  });
18026
17924
  const iconMarkup = icon ? /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -18085,7 +17983,7 @@ const Section$1 = ({
18085
17983
  }) => {
18086
17984
  const {
18087
17985
  collapsed
18088
- } = React3.useContext(SideMenuContext);
17986
+ } = React2.useContext(SideMenuContext);
18089
17987
  const isCollapsed = isCollapsedProp !== undefined ? isCollapsedProp : collapsed;
18090
17988
  const titleClassNames = cssClassName(`${COMPONENT_NAME$g}__TitleWrapper`, (isCollapsed !== undefined ? isCollapsed : collapsed) && "isCollapsed");
18091
17989
  const titleMarkup = title ? /*#__PURE__*/jsxRuntime.jsx("div", {
@@ -18160,7 +18058,7 @@ const Tier = ({
18160
18058
  }) => {
18161
18059
  const {
18162
18060
  collapsed
18163
- } = React3.useContext(SideMenuContext);
18061
+ } = React2.useContext(SideMenuContext);
18164
18062
  const isMenuCollapsed = isCollapsed !== undefined ? isCollapsed : collapsed;
18165
18063
  const titleMarkup = title ? /*#__PURE__*/jsxRuntime.jsx("div", {
18166
18064
  // layout
@@ -18201,16 +18099,16 @@ const AlphaSideMenu = ({
18201
18099
  collapseExpandIcon,
18202
18100
  location
18203
18101
  }) => {
18204
- const [isCollapsed, setIsCollapsed] = React3.useState(false);
18205
- const [subNavigationTierItems, setSubNavigationTierItems] = React3.useState([]);
18206
- const [subNavigationTierTitle, setSubNavigationTierTitle] = React3.useState(undefined);
18207
- React3.useEffect(() => {
18102
+ const [isCollapsed, setIsCollapsed] = React2.useState(false);
18103
+ const [subNavigationTierItems, setSubNavigationTierItems] = React2.useState([]);
18104
+ const [subNavigationTierTitle, setSubNavigationTierTitle] = React2.useState(undefined);
18105
+ React2.useEffect(() => {
18208
18106
  if (collapsed !== undefined) {
18209
18107
  setIsCollapsed(collapsed);
18210
18108
  }
18211
18109
  }, [collapsed]);
18212
- React3.Children.forEach(children, child => {
18213
- if (! /*#__PURE__*/React3.isValidElement(child) || child.type !== Section$1) {
18110
+ React2.Children.forEach(children, child => {
18111
+ if (! /*#__PURE__*/React2.isValidElement(child) || child.type !== Section$1) {
18214
18112
  console.error("AlphaSideMenu only accepts Section components as children");
18215
18113
  }
18216
18114
  });
@@ -18461,11 +18359,11 @@ const TimeSelector = ({
18461
18359
  if (!theme) {
18462
18360
  return null;
18463
18361
  }
18464
- const [items, setItems] = React3.useState([]);
18465
- const [keysValues, setKeysValues] = React3.useState([]);
18466
- const fieldRef = React3.useRef(null);
18467
- const [isFocused, setIsFocused] = React3.useState(false);
18468
- const [isActive, setIsActive] = React3.useState(false);
18362
+ const [items, setItems] = React2.useState([]);
18363
+ const [keysValues, setKeysValues] = React2.useState([]);
18364
+ const fieldRef = React2.useRef(null);
18365
+ const [isFocused, setIsFocused] = React2.useState(false);
18366
+ const [isActive, setIsActive] = React2.useState(false);
18469
18367
  const toggleTimePicker = () => setIsActive(!isActive);
18470
18368
  const hasError = !!error;
18471
18369
  const getMaxMins = () => {
@@ -18622,10 +18520,10 @@ const TimeSelector = ({
18622
18520
  onClose: handleClosePopover,
18623
18521
  children: timePickerMarkup
18624
18522
  });
18625
- React3.useEffect(() => {
18523
+ React2.useEffect(() => {
18626
18524
  setItems(getItemsMultiSelectionPicker());
18627
18525
  }, []);
18628
- React3.useEffect(() => {
18526
+ React2.useEffect(() => {
18629
18527
  setItems(getItemsMultiSelectionPicker());
18630
18528
  }, [value]);
18631
18529
  const className = cssClassName(COMPONENT_NAME$9, theme, !value && "isEmpty");
@@ -18734,8 +18632,8 @@ const AlphaZipCodeInput = ({
18734
18632
  loading,
18735
18633
  placeholder
18736
18634
  }) => {
18737
- const [isFocusActive, setIsFocusActive] = React3.useState(false);
18738
- const [showPopover, setShowPopover] = React3.useState(false);
18635
+ const [isFocusActive, setIsFocusActive] = React2.useState(false);
18636
+ const [showPopover, setShowPopover] = React2.useState(false);
18739
18637
  const handleOnBlur = () => {
18740
18638
  setIsFocusActive(false);
18741
18639
  if (onBlur) onBlur();
@@ -18801,7 +18699,7 @@ const AlphaZipCodeInput = ({
18801
18699
  className: `${COMPONENT_NAME$7}__EmptyItems`,
18802
18700
  children: labelEmpty
18803
18701
  }) : null;
18804
- const popoverMarkup = React3.useMemo(() => /*#__PURE__*/jsxRuntime.jsx(Popover$1, {
18702
+ const popoverMarkup = React2.useMemo(() => /*#__PURE__*/jsxRuntime.jsx(Popover$1, {
18805
18703
  activator: inputMarkup,
18806
18704
  isActive: showPopover,
18807
18705
  isFullWidth: true,
@@ -18811,7 +18709,7 @@ const AlphaZipCodeInput = ({
18811
18709
  children: [optionListMarkup, emptyItemsMarkup]
18812
18710
  })
18813
18711
  }), [items, value, showPopover, emptyItemsMarkup, optionListMarkup, isFocusActive]);
18814
- React3.useEffect(() => {
18712
+ React2.useEffect(() => {
18815
18713
  if (items) {
18816
18714
  setShowPopover(true);
18817
18715
  } else setShowPopover(false);
@@ -24896,32 +24794,32 @@ const CalendarPicker = ({
24896
24794
  // We get the current date
24897
24795
  const currentDate = new Date();
24898
24796
  // In this state we save the day that the user selects, as the initial value is the current day.Check defaultProps.
24899
- const [selectedDay, setSelectedDay] = React3.useState(parseInt(date.slice(0, 2), 10));
24797
+ const [selectedDay, setSelectedDay] = React2.useState(parseInt(date.slice(0, 2), 10));
24900
24798
  // In this state we save the month selected by the user, its default value is the current month. The + 1, we put it to normalize the number of months, since the getMonth () method returns them starting from 0, that is, 0 would be equivalent to January, with + 1 the counter is normalized and 1 would be equivalent to January . Check defaultProps.
24901
24799
  const todayMonth = parseInt(date.slice(3, 5), 10);
24902
- const [month, setMonth] = React3.useState(todayMonth);
24903
- const [selectedMonth, setSelectedMonth] = React3.useState([`${todayMonth}`]);
24800
+ const [month, setMonth] = React2.useState(todayMonth);
24801
+ const [selectedMonth, setSelectedMonth] = React2.useState([`${todayMonth}`]);
24904
24802
  const months = getMonths(language);
24905
24803
  const weekDays = getDays(language);
24906
24804
  // In this state we save the year selected by the user, its default value is the current year. Check defaultProps.
24907
24805
  const todayYear = parseInt(date.slice(6, 10), 10);
24908
- const [year, setYear] = React3.useState(parseInt(date.slice(6, 10), 10));
24909
- const [selectedYear, setSelectedYear] = React3.useState([`${todayYear}`]);
24806
+ const [year, setYear] = React2.useState(parseInt(date.slice(6, 10), 10));
24807
+ const [selectedYear, setSelectedYear] = React2.useState([`${todayYear}`]);
24910
24808
 
24911
24809
  // In this state we save the days to render in the calendar, both the days of the current month and the subsequent and previous days that are shown with opacity.
24912
- const [dateDays, setDateDays] = React3.useState([]);
24810
+ const [dateDays, setDateDays] = React2.useState([]);
24913
24811
  // In this state we save on which day of the week the month begins, 1 = Sunday, 2 = Monday, 3 = Tuesday, 4 = Wednesday, 5 = Thursday, 6 = Friday, 7 = Saturday. We use it as a parameter to add the opacity to the days that correspond to the last month or the following month that are also shown in the calendar.
24914
- const [positionDay, setPositionDay] = React3.useState(0);
24812
+ const [positionDay, setPositionDay] = React2.useState(0);
24915
24813
  // In this state we save how many days the selected month brings.
24916
- const [monthDays, setMonthDays] = React3.useState(0);
24814
+ const [monthDays, setMonthDays] = React2.useState(0);
24917
24815
  // Flag to show or hide the calendar.
24918
- const [showCalendar, setShowCalendar] = React3.useState(false);
24816
+ const [showCalendar, setShowCalendar] = React2.useState(false);
24919
24817
  // Reference to the input that shows the date already selected.
24920
24818
  // Create ref to show or hidden the calendar
24921
- const refShow = React3.useRef(null);
24819
+ const refShow = React2.useRef(null);
24922
24820
  // Functions to set the month and year from the select.
24923
- const [isDelete, setIsDelete] = React3.useState(false);
24924
- const [isValidDate, setIsValidDate] = React3.useState(false);
24821
+ const [isDelete, setIsDelete] = React2.useState(false);
24822
+ const [isValidDate, setIsValidDate] = React2.useState(false);
24925
24823
  const onMonthChange = month => {
24926
24824
  setMonth(parseInt(month[0]));
24927
24825
  setSelectedMonth(month);
@@ -24944,10 +24842,10 @@ const CalendarPicker = ({
24944
24842
  }
24945
24843
  }
24946
24844
  };
24947
- const [finalDate, setFinalDate] = React3.useState(`${selectedDay < 10 ? '0' : ''}${selectedDay}/${month < 10 ? '0' : ''}${month}/${year}`);
24948
- const [showPlaceHolder, setShowPlaceHolder] = React3.useState(placeHolder !== '');
24845
+ const [finalDate, setFinalDate] = React2.useState(`${selectedDay < 10 ? '0' : ''}${selectedDay}/${month < 10 ? '0' : ''}${month}/${year}`);
24846
+ const [showPlaceHolder, setShowPlaceHolder] = React2.useState(placeHolder !== '');
24949
24847
  const dateRgex = /([0-2][0-9]|3[0-1])(\/)(0[1-9]|1[0-2])\2(\d{4})$/;
24950
- const [calendarPosition, setCalendarPosition] = React3.useState('bottom');
24848
+ const [calendarPosition, setCalendarPosition] = React2.useState('bottom');
24951
24849
  // The arrangement of years to render in the select is created, by default we show a range of 5 years before the current year and 5 after this. This range can be changed using props.
24952
24850
  const years = [];
24953
24851
  for (let i = currentDate.getFullYear() - minYear; i <= currentDate.getFullYear() + maxYear; i++) {
@@ -24959,7 +24857,7 @@ const CalendarPicker = ({
24959
24857
  }
24960
24858
 
24961
24859
  // In this useEffect all the magic happens, it is anchored to the values ​​of the year, month and selected day.
24962
- React3.useEffect(() => {
24860
+ React2.useEffect(() => {
24963
24861
  // We obtain the days of last month, by passing 0 in the constructor, we are asking for the last day of last month, remember that we homologate the months so that the account will start at 0 and not at 1, that is, 1 is equivalent to January, Therefore, to obtain the number of days last month we have to subtract 1 from the month.
24964
24862
  const daysOfPreviousMonth = new Date(year, month - 1, 0).getDate();
24965
24863
  // We obtain the total days of the current month.
@@ -24987,13 +24885,13 @@ const CalendarPicker = ({
24987
24885
  }, [year, month, selectedDay]);
24988
24886
 
24989
24887
  // The listener is created to identify what is outside the container
24990
- React3.useEffect(() => {
24888
+ React2.useEffect(() => {
24991
24889
  document.addEventListener('click', handleClickOutside, true);
24992
24890
  return () => {
24993
24891
  document.removeEventListener('click', handleClickOutside, true);
24994
24892
  };
24995
24893
  });
24996
- React3.useEffect(() => {
24894
+ React2.useEffect(() => {
24997
24895
  if (finalDate !== '' && dateRgex.test(finalDate)) {
24998
24896
  handleChangeDate(finalDate);
24999
24897
  const dateArray = finalDate.split('/');
@@ -32475,7 +32373,7 @@ const Filedrop = ({
32475
32373
  isMultipleFiles = false,
32476
32374
  isShowButton = true
32477
32375
  }) => {
32478
- const refInputFile = React3.useRef(null);
32376
+ const refInputFile = React2.useRef(null);
32479
32377
 
32480
32378
  // eslint-disable-next-line jsdoc/require-jsdoc
32481
32379
  async function readFileAsDataURL(file) {
@@ -32512,7 +32410,7 @@ const Filedrop = ({
32512
32410
  }
32513
32411
  return encodeFile;
32514
32412
  };
32515
- React3.useEffect(() => {
32413
+ React2.useEffect(() => {
32516
32414
  if (arrayFiles.length && isEncodeBase64) {
32517
32415
  (async () => {
32518
32416
  const encodeFiles = await Promise.all(arrayFiles.map(file => convertFileToBase64(file)));
@@ -32618,7 +32516,7 @@ var hasRequiredLib;
32618
32516
  function requireLib () {
32619
32517
  if (hasRequiredLib) return lib;
32620
32518
  hasRequiredLib = 1;
32621
- lib=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:false,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=true,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:true,get:n});},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:true});},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:true,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}([function(e,t){e.exports=React3;},function(e,t,r){var n;
32519
+ lib=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:false,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=true,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:true,get:n});},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:true});},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:true,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=9)}([function(e,t){e.exports=React2;},function(e,t,r){var n;
32622
32520
  /*!
32623
32521
  Copyright (c) 2017 Jed Watson.
32624
32522
  Licensed under the MIT License (MIT), see
@@ -33159,9 +33057,9 @@ const InputPhoneNumber = ({
33159
33057
  isRequired,
33160
33058
  tooltipLabel
33161
33059
  }) => {
33162
- const inputContainerRef = React3.useRef(null);
33163
- const [isFocusActive, setIsFocusActive] = React3.useState(false);
33164
- const [parentCoord, setParentCoords] = React3.useState();
33060
+ const inputContainerRef = React2.useRef(null);
33061
+ const [isFocusActive, setIsFocusActive] = React2.useState(false);
33062
+ const [parentCoord, setParentCoords] = React2.useState();
33165
33063
  const handleOnFocus = (_event, dataOnFocus) => {
33166
33064
  setIsFocusActive(true);
33167
33065
  if (onFocus) onFocus(dataOnFocus);
@@ -33177,7 +33075,7 @@ const InputPhoneNumber = ({
33177
33075
  formattedValue
33178
33076
  });
33179
33077
  };
33180
- React3.useEffect(() => {
33078
+ React2.useEffect(() => {
33181
33079
  const allInputPhone = document.querySelectorAll(".selected-flag");
33182
33080
  allInputPhone.forEach(inputPhone => {
33183
33081
  inputPhone.removeAttribute("tabindex");
@@ -33215,7 +33113,7 @@ const InputPhoneNumber = ({
33215
33113
  toggleType: isErrorMode ? "error" : "primary",
33216
33114
  children: renderInput()
33217
33115
  });
33218
- const tooltipLabelMarkup = React3.useMemo(() => tooltipLabel ? /*#__PURE__*/jsxRuntime.jsx(AlphaTooltip, {
33116
+ const tooltipLabelMarkup = React2.useMemo(() => tooltipLabel ? /*#__PURE__*/jsxRuntime.jsx(AlphaTooltip, {
33219
33117
  content: tooltipLabel.content,
33220
33118
  theme: tooltipLabel.theme,
33221
33119
  width: "default",
@@ -33227,7 +33125,7 @@ const InputPhoneNumber = ({
33227
33125
  })
33228
33126
  })
33229
33127
  }) : null, [tooltipLabel, parentCoord]);
33230
- React3.useEffect(() => {
33128
+ React2.useEffect(() => {
33231
33129
  if (inputContainerRef.current) {
33232
33130
  setParentCoords(inputContainerRef.current.getBoundingClientRect());
33233
33131
  }
@@ -33430,7 +33328,7 @@ const FormField = ({
33430
33328
  minLength
33431
33329
  }) => {
33432
33330
  const FieldComponent = FORM_FIELDS[type];
33433
- const [inputTagValue, setInputTagValue] = React3.useState('');
33331
+ const [inputTagValue, setInputTagValue] = React2.useState('');
33434
33332
  const handleInputTagValueChange = newValue => {
33435
33333
  setInputTagValue(newValue);
33436
33334
  };
@@ -33455,7 +33353,7 @@ const FormField = ({
33455
33353
  onChange(nValue);
33456
33354
  }
33457
33355
  };
33458
- const fieldValue = React3.useMemo(() => {
33356
+ const fieldValue = React2.useMemo(() => {
33459
33357
  if (value === null) return undefined;
33460
33358
  if (typeof value === 'object' && !(value instanceof Date) && value.dialCode) {
33461
33359
  const phoneValue = value;
@@ -33537,7 +33435,7 @@ function Form$1({
33537
33435
  fieldsSection,
33538
33436
  iconHelperText,
33539
33437
  onChange,
33540
- fieldWrapperElement = /*#__PURE__*/jsxRuntime.jsx(React3.Fragment, {}),
33438
+ fieldWrapperElement = /*#__PURE__*/jsxRuntime.jsx(React2.Fragment, {}),
33541
33439
  tagRemoveIcon,
33542
33440
  extraPropsField
33543
33441
  }) {
@@ -33662,12 +33560,12 @@ function Form$1({
33662
33560
  isReadOnly: isReadOnlyField
33663
33561
  }) : null;
33664
33562
  if (typeof fieldWrapperElement !== "string") {
33665
- return /*#__PURE__*/React3.cloneElement(fieldWrapperElement, {
33563
+ return /*#__PURE__*/React2.cloneElement(fieldWrapperElement, {
33666
33564
  ...fieldWrapperElement.props,
33667
33565
  key: index
33668
33566
  }, fieldMarkup);
33669
33567
  }
33670
- return /*#__PURE__*/React3.createElement(fieldWrapperElement, {
33568
+ return /*#__PURE__*/React2.createElement(fieldWrapperElement, {
33671
33569
  key: index
33672
33570
  }, fieldMarkup);
33673
33571
  };
@@ -33680,7 +33578,7 @@ function Form$1({
33680
33578
  label: section
33681
33579
  });
33682
33580
  const fieldsMarkup = fields ? fields.map(renderField) : null;
33683
- return /*#__PURE__*/jsxRuntime.jsxs(React3.Fragment, {
33581
+ return /*#__PURE__*/jsxRuntime.jsxs(React2.Fragment, {
33684
33582
  children: [dividerMarkup, fieldsMarkup]
33685
33583
  }, `FieldSection-${index}`);
33686
33584
  };
@@ -36571,7 +36469,7 @@ _extends(Remove, {
36571
36469
  Sortable.mount(new AutoScrollPlugin());
36572
36470
  Sortable.mount(Remove, Revert);
36573
36471
 
36574
- const Context = /*#__PURE__*/React3.createContext({});
36472
+ const Context = /*#__PURE__*/React2.createContext({});
36575
36473
 
36576
36474
  const COMPONENT_NAME$4 = 'SortableList__Item';
36577
36475
  const Item$1 = ({
@@ -36579,7 +36477,7 @@ const Item$1 = ({
36579
36477
  }) => {
36580
36478
  const {
36581
36479
  hasHandle
36582
- } = React3.useContext(Context);
36480
+ } = React2.useContext(Context);
36583
36481
  const className = cssClassName(COMPONENT_NAME$4, !hasHandle && 'no-handle');
36584
36482
  const handleMarkup = hasHandle ? /*#__PURE__*/jsxRuntime.jsxs("span", {
36585
36483
  className: `${COMPONENT_NAME$4}__Handle`,
@@ -36606,7 +36504,7 @@ const SortableList = function ({
36606
36504
  onSort,
36607
36505
  hasHandle
36608
36506
  }) {
36609
- const listRef = React3.useRef(null);
36507
+ const listRef = React2.useRef(null);
36610
36508
  const className = cssClassName(COMPONENT_NAME$3);
36611
36509
  const hasItems = items && items.length > 0;
36612
36510
  const handleSortEnd = event => {
@@ -36621,7 +36519,7 @@ const SortableList = function ({
36621
36519
  onSort([...items]);
36622
36520
  }
36623
36521
  };
36624
- React3.useEffect(() => {
36522
+ React2.useEffect(() => {
36625
36523
  if (!listRef.current) return;
36626
36524
  const sortable = Sortable.create(listRef.current, {
36627
36525
  onEnd: handleSortEnd,
@@ -36643,7 +36541,7 @@ const SortableList = function ({
36643
36541
  const listMarkup = hasItems ? /*#__PURE__*/jsxRuntime.jsx("ul", {
36644
36542
  ref: listRef,
36645
36543
  className: listClassName,
36646
- children: React3.Children.toArray(items.map(renderItemElement))
36544
+ children: React2.Children.toArray(items.map(renderItemElement))
36647
36545
  }) : null;
36648
36546
  const contextValue = {
36649
36547
  hasHandle
@@ -36770,7 +36668,7 @@ const Popover = ({
36770
36668
  selectedAvailableItems = [],
36771
36669
  onCancel
36772
36670
  }) => {
36773
- const [areAvailableItemsOpen, setAreAvailableItemsOpen] = React3.useState(false);
36671
+ const [areAvailableItemsOpen, setAreAvailableItemsOpen] = React2.useState(false);
36774
36672
  const addVisibleOverflowToShowFullCalendarPicker = () => {
36775
36673
  const popoverContainer = document.getElementsByClassName("Popover__container");
36776
36674
  const popover = document.getElementsByClassName("Filters__popover")[0];
@@ -36781,10 +36679,10 @@ const Popover = ({
36781
36679
  }
36782
36680
  }
36783
36681
  };
36784
- React3.useEffect(() => {
36682
+ React2.useEffect(() => {
36785
36683
  addVisibleOverflowToShowFullCalendarPicker();
36786
36684
  });
36787
- React3.useEffect(() => {
36685
+ React2.useEffect(() => {
36788
36686
  if (!isActive) {
36789
36687
  setAreAvailableItemsOpen(false);
36790
36688
  }
@@ -36904,7 +36802,7 @@ const getFromPopover = props => {
36904
36802
  emptyState,
36905
36803
  ...rest
36906
36804
  } = props;
36907
- const contentMarkup = React3.Children.toArray(children).length > 0 ? children : emptyState;
36805
+ const contentMarkup = React2.Children.toArray(children).length > 0 ? children : emptyState;
36908
36806
  return /*#__PURE__*/jsxRuntime.jsx(Popover, {
36909
36807
  ...rest,
36910
36808
  children: contentMarkup
@@ -36939,13 +36837,13 @@ const FilterControl = ({
36939
36837
  onCloseSortControl,
36940
36838
  actionGroup
36941
36839
  }) => {
36942
- const [selectedSorts, setSelectedSorts] = React3.useState([]);
36943
- const [selectedFilters, setSelectedFilters] = React3.useState([]);
36944
- const [isActionGroupOpen, setIsActionGroupOpen] = React3.useState(false);
36840
+ const [selectedSorts, setSelectedSorts] = React2.useState([]);
36841
+ const [selectedFilters, setSelectedFilters] = React2.useState([]);
36842
+ const [isActionGroupOpen, setIsActionGroupOpen] = React2.useState(false);
36945
36843
  const toggleActionGroup = () => setIsActionGroupOpen(!isActionGroupOpen);
36946
- const selectedFiltersRef = React3.useRef([]);
36947
- const selectedSortsRef = React3.useRef([]);
36948
- React3.useEffect(() => {
36844
+ const selectedFiltersRef = React2.useRef([]);
36845
+ const selectedSortsRef = React2.useRef([]);
36846
+ React2.useEffect(() => {
36949
36847
  if (appliedFilters) {
36950
36848
  let appliedWithoutNested = [...appliedFilters];
36951
36849
  if (filtersNested) {
@@ -36970,7 +36868,7 @@ const FilterControl = ({
36970
36868
  }
36971
36869
  }
36972
36870
  }, [appliedFilters]);
36973
- React3.useEffect(() => {
36871
+ React2.useEffect(() => {
36974
36872
  if (appliedSorts) {
36975
36873
  selectedSortsRef.current = structuredClone(appliedSorts);
36976
36874
  if (appliedSorts.length !== selectedSorts.length) {
@@ -37071,7 +36969,7 @@ const FilterControl = ({
37071
36969
  }
37072
36970
  if (filterNested && filterNested.options) {
37073
36971
  const keyNested = filterNested.key;
37074
- return /*#__PURE__*/jsxRuntime.jsxs(React3.Fragment, {
36972
+ return /*#__PURE__*/jsxRuntime.jsxs(React2.Fragment, {
37075
36973
  children: [/*#__PURE__*/jsxRuntime.jsx(FilterItem, {
37076
36974
  label: filter.label,
37077
36975
  filter: filter.filter,
@@ -37253,8 +37151,8 @@ const Filters = ({
37253
37151
  extraActions,
37254
37152
  selectedFilters = []
37255
37153
  }) => {
37256
- const [isPopoverOpen, setIsPopoverOpen] = React3.useState(false);
37257
- const mainContainerRef = React3.useRef(null);
37154
+ const [isPopoverOpen, setIsPopoverOpen] = React2.useState(false);
37155
+ const mainContainerRef = React2.useRef(null);
37258
37156
  const handleSelectFilter = selected => {
37259
37157
  const [selectedFilter] = selected;
37260
37158
  const foundFilter = filters.find(filter => filter.key === selectedFilter);
@@ -37286,7 +37184,7 @@ const Filters = ({
37286
37184
  onChange: handleSelectFilter
37287
37185
  })
37288
37186
  }) : null;
37289
- const extraActionsMarkup = extraActions ? extraActions.map((extraAction, index) => /*#__PURE__*/React3.createElement(AlphaButton, {
37187
+ const extraActionsMarkup = extraActions ? extraActions.map((extraAction, index) => /*#__PURE__*/React2.createElement(AlphaButton, {
37290
37188
  ...extraAction,
37291
37189
  key: `extra-action-${index}`
37292
37190
  }, extraAction.label)) : null;
@@ -37501,8 +37399,258 @@ const Header$1 = ({
37501
37399
  });
37502
37400
  };
37503
37401
 
37402
+ var dist = {};
37403
+
37404
+ var hasRequiredDist;
37405
+
37406
+ function requireDist () {
37407
+ if (hasRequiredDist) return dist;
37408
+ hasRequiredDist = 1;
37409
+ Object.defineProperty(dist, "__esModule", { value: true });
37410
+ dist.parse = parse;
37411
+ dist.serialize = serialize;
37412
+ /**
37413
+ * RegExp to match cookie-name in RFC 6265 sec 4.1.1
37414
+ * This refers out to the obsoleted definition of token in RFC 2616 sec 2.2
37415
+ * which has been replaced by the token definition in RFC 7230 appendix B.
37416
+ *
37417
+ * cookie-name = token
37418
+ * token = 1*tchar
37419
+ * tchar = "!" / "#" / "$" / "%" / "&" / "'" /
37420
+ * "*" / "+" / "-" / "." / "^" / "_" /
37421
+ * "`" / "|" / "~" / DIGIT / ALPHA
37422
+ *
37423
+ * Note: Allowing more characters - https://github.com/jshttp/cookie/issues/191
37424
+ * Allow same range as cookie value, except `=`, which delimits end of name.
37425
+ */
37426
+ const cookieNameRegExp = /^[\u0021-\u003A\u003C\u003E-\u007E]+$/;
37427
+ /**
37428
+ * RegExp to match cookie-value in RFC 6265 sec 4.1.1
37429
+ *
37430
+ * cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )
37431
+ * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
37432
+ * ; US-ASCII characters excluding CTLs,
37433
+ * ; whitespace DQUOTE, comma, semicolon,
37434
+ * ; and backslash
37435
+ *
37436
+ * Allowing more characters: https://github.com/jshttp/cookie/issues/191
37437
+ * Comma, backslash, and DQUOTE are not part of the parsing algorithm.
37438
+ */
37439
+ const cookieValueRegExp = /^[\u0021-\u003A\u003C-\u007E]*$/;
37440
+ /**
37441
+ * RegExp to match domain-value in RFC 6265 sec 4.1.1
37442
+ *
37443
+ * domain-value = <subdomain>
37444
+ * ; defined in [RFC1034], Section 3.5, as
37445
+ * ; enhanced by [RFC1123], Section 2.1
37446
+ * <subdomain> = <label> | <subdomain> "." <label>
37447
+ * <label> = <let-dig> [ [ <ldh-str> ] <let-dig> ]
37448
+ * Labels must be 63 characters or less.
37449
+ * 'let-dig' not 'letter' in the first char, per RFC1123
37450
+ * <ldh-str> = <let-dig-hyp> | <let-dig-hyp> <ldh-str>
37451
+ * <let-dig-hyp> = <let-dig> | "-"
37452
+ * <let-dig> = <letter> | <digit>
37453
+ * <letter> = any one of the 52 alphabetic characters A through Z in
37454
+ * upper case and a through z in lower case
37455
+ * <digit> = any one of the ten digits 0 through 9
37456
+ *
37457
+ * Keep support for leading dot: https://github.com/jshttp/cookie/issues/173
37458
+ *
37459
+ * > (Note that a leading %x2E ("."), if present, is ignored even though that
37460
+ * character is not permitted, but a trailing %x2E ("."), if present, will
37461
+ * cause the user agent to ignore the attribute.)
37462
+ */
37463
+ const domainValueRegExp = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i;
37464
+ /**
37465
+ * RegExp to match path-value in RFC 6265 sec 4.1.1
37466
+ *
37467
+ * path-value = <any CHAR except CTLs or ";">
37468
+ * CHAR = %x01-7F
37469
+ * ; defined in RFC 5234 appendix B.1
37470
+ */
37471
+ const pathValueRegExp = /^[\u0020-\u003A\u003D-\u007E]*$/;
37472
+ const __toString = Object.prototype.toString;
37473
+ const NullObject = /* @__PURE__ */ (() => {
37474
+ const C = function () { };
37475
+ C.prototype = Object.create(null);
37476
+ return C;
37477
+ })();
37478
+ /**
37479
+ * Parse a cookie header.
37480
+ *
37481
+ * Parse the given cookie header string into an object
37482
+ * The object has the various cookies as keys(names) => values
37483
+ */
37484
+ function parse(str, options) {
37485
+ const obj = new NullObject();
37486
+ const len = str.length;
37487
+ // RFC 6265 sec 4.1.1, RFC 2616 2.2 defines a cookie name consists of one char minimum, plus '='.
37488
+ if (len < 2)
37489
+ return obj;
37490
+ const dec = options?.decode || decode;
37491
+ let index = 0;
37492
+ do {
37493
+ const eqIdx = str.indexOf("=", index);
37494
+ if (eqIdx === -1)
37495
+ break; // No more cookie pairs.
37496
+ const colonIdx = str.indexOf(";", index);
37497
+ const endIdx = colonIdx === -1 ? len : colonIdx;
37498
+ if (eqIdx > endIdx) {
37499
+ // backtrack on prior semicolon
37500
+ index = str.lastIndexOf(";", eqIdx - 1) + 1;
37501
+ continue;
37502
+ }
37503
+ const keyStartIdx = startIndex(str, index, eqIdx);
37504
+ const keyEndIdx = endIndex(str, eqIdx, keyStartIdx);
37505
+ const key = str.slice(keyStartIdx, keyEndIdx);
37506
+ // only assign once
37507
+ if (obj[key] === undefined) {
37508
+ let valStartIdx = startIndex(str, eqIdx + 1, endIdx);
37509
+ let valEndIdx = endIndex(str, endIdx, valStartIdx);
37510
+ const value = dec(str.slice(valStartIdx, valEndIdx));
37511
+ obj[key] = value;
37512
+ }
37513
+ index = endIdx + 1;
37514
+ } while (index < len);
37515
+ return obj;
37516
+ }
37517
+ function startIndex(str, index, max) {
37518
+ do {
37519
+ const code = str.charCodeAt(index);
37520
+ if (code !== 0x20 /* */ && code !== 0x09 /* \t */)
37521
+ return index;
37522
+ } while (++index < max);
37523
+ return max;
37524
+ }
37525
+ function endIndex(str, index, min) {
37526
+ while (index > min) {
37527
+ const code = str.charCodeAt(--index);
37528
+ if (code !== 0x20 /* */ && code !== 0x09 /* \t */)
37529
+ return index + 1;
37530
+ }
37531
+ return min;
37532
+ }
37533
+ /**
37534
+ * Serialize data into a cookie header.
37535
+ *
37536
+ * Serialize a name value pair into a cookie string suitable for
37537
+ * http headers. An optional options object specifies cookie parameters.
37538
+ *
37539
+ * serialize('foo', 'bar', { httpOnly: true })
37540
+ * => "foo=bar; httpOnly"
37541
+ */
37542
+ function serialize(name, val, options) {
37543
+ const enc = options?.encode || encodeURIComponent;
37544
+ if (!cookieNameRegExp.test(name)) {
37545
+ throw new TypeError(`argument name is invalid: ${name}`);
37546
+ }
37547
+ const value = enc(val);
37548
+ if (!cookieValueRegExp.test(value)) {
37549
+ throw new TypeError(`argument val is invalid: ${val}`);
37550
+ }
37551
+ let str = name + "=" + value;
37552
+ if (!options)
37553
+ return str;
37554
+ if (options.maxAge !== undefined) {
37555
+ if (!Number.isInteger(options.maxAge)) {
37556
+ throw new TypeError(`option maxAge is invalid: ${options.maxAge}`);
37557
+ }
37558
+ str += "; Max-Age=" + options.maxAge;
37559
+ }
37560
+ if (options.domain) {
37561
+ if (!domainValueRegExp.test(options.domain)) {
37562
+ throw new TypeError(`option domain is invalid: ${options.domain}`);
37563
+ }
37564
+ str += "; Domain=" + options.domain;
37565
+ }
37566
+ if (options.path) {
37567
+ if (!pathValueRegExp.test(options.path)) {
37568
+ throw new TypeError(`option path is invalid: ${options.path}`);
37569
+ }
37570
+ str += "; Path=" + options.path;
37571
+ }
37572
+ if (options.expires) {
37573
+ if (!isDate(options.expires) ||
37574
+ !Number.isFinite(options.expires.valueOf())) {
37575
+ throw new TypeError(`option expires is invalid: ${options.expires}`);
37576
+ }
37577
+ str += "; Expires=" + options.expires.toUTCString();
37578
+ }
37579
+ if (options.httpOnly) {
37580
+ str += "; HttpOnly";
37581
+ }
37582
+ if (options.secure) {
37583
+ str += "; Secure";
37584
+ }
37585
+ if (options.partitioned) {
37586
+ str += "; Partitioned";
37587
+ }
37588
+ if (options.priority) {
37589
+ const priority = typeof options.priority === "string"
37590
+ ? options.priority.toLowerCase()
37591
+ : undefined;
37592
+ switch (priority) {
37593
+ case "low":
37594
+ str += "; Priority=Low";
37595
+ break;
37596
+ case "medium":
37597
+ str += "; Priority=Medium";
37598
+ break;
37599
+ case "high":
37600
+ str += "; Priority=High";
37601
+ break;
37602
+ default:
37603
+ throw new TypeError(`option priority is invalid: ${options.priority}`);
37604
+ }
37605
+ }
37606
+ if (options.sameSite) {
37607
+ const sameSite = typeof options.sameSite === "string"
37608
+ ? options.sameSite.toLowerCase()
37609
+ : options.sameSite;
37610
+ switch (sameSite) {
37611
+ case true:
37612
+ case "strict":
37613
+ str += "; SameSite=Strict";
37614
+ break;
37615
+ case "lax":
37616
+ str += "; SameSite=Lax";
37617
+ break;
37618
+ case "none":
37619
+ str += "; SameSite=None";
37620
+ break;
37621
+ default:
37622
+ throw new TypeError(`option sameSite is invalid: ${options.sameSite}`);
37623
+ }
37624
+ }
37625
+ return str;
37626
+ }
37627
+ /**
37628
+ * URL-decode string value. Optimized to skip native call when no %.
37629
+ */
37630
+ function decode(str) {
37631
+ if (str.indexOf("%") === -1)
37632
+ return str;
37633
+ try {
37634
+ return decodeURIComponent(str);
37635
+ }
37636
+ catch (e) {
37637
+ return str;
37638
+ }
37639
+ }
37640
+ /**
37641
+ * Determine if value is a Date.
37642
+ */
37643
+ function isDate(val) {
37644
+ return __toString.call(val) === "[object Date]";
37645
+ }
37646
+
37647
+ return dist;
37648
+ }
37649
+
37650
+ requireDist();
37651
+
37504
37652
  /**
37505
- * react-router v7.8.2
37653
+ * react-router v7.6.2
37506
37654
  *
37507
37655
  * Copyright (c) Remix Software Inc.
37508
37656
  *
@@ -37701,12 +37849,12 @@ function createBrowserURLImpl(to, isAbsolute = false) {
37701
37849
  base = window.location.origin !== "null" ? window.location.origin : window.location.href;
37702
37850
  }
37703
37851
  invariant(base, "No window.location.(origin|href) available to create URL");
37704
- let href = typeof to === "string" ? to : createPath(to);
37705
- href = href.replace(/ $/, "%20");
37706
- if (!isAbsolute && href.startsWith("//")) {
37707
- href = base + href;
37852
+ let href2 = typeof to === "string" ? to : createPath(to);
37853
+ href2 = href2.replace(/ $/, "%20");
37854
+ if (!isAbsolute && href2.startsWith("//")) {
37855
+ href2 = base + href2;
37708
37856
  }
37709
- return new URL(href, base);
37857
+ return new URL(href2, base);
37710
37858
  }
37711
37859
  function matchRoutes(routes, locationArg, basename = "/") {
37712
37860
  return matchRoutesImpl(routes, locationArg, basename, false);
@@ -37730,8 +37878,8 @@ function matchRoutesImpl(routes, locationArg, basename, allowPartial) {
37730
37878
  }
37731
37879
  return matches;
37732
37880
  }
37733
- function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "", _hasParentOptionalSegments = false) {
37734
- let flattenRoute = (route, index, hasParentOptionalSegments = _hasParentOptionalSegments, relativePath) => {
37881
+ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "") {
37882
+ let flattenRoute = (route, index, relativePath) => {
37735
37883
  let meta = {
37736
37884
  relativePath: relativePath === void 0 ? route.path || "" : relativePath,
37737
37885
  caseSensitive: route.caseSensitive === true,
@@ -37739,9 +37887,6 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "",
37739
37887
  route
37740
37888
  };
37741
37889
  if (meta.relativePath.startsWith("/")) {
37742
- if (!meta.relativePath.startsWith(parentPath) && hasParentOptionalSegments) {
37743
- return;
37744
- }
37745
37890
  invariant(
37746
37891
  meta.relativePath.startsWith(parentPath),
37747
37892
  `Absolute route path "${meta.relativePath}" nested under path "${parentPath}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`
@@ -37757,13 +37902,7 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "",
37757
37902
  route.index !== true,
37758
37903
  `Index routes must not have child routes. Please remove all child routes from route path "${path}".`
37759
37904
  );
37760
- flattenRoutes(
37761
- route.children,
37762
- branches,
37763
- routesMeta,
37764
- path,
37765
- hasParentOptionalSegments
37766
- );
37905
+ flattenRoutes(route.children, branches, routesMeta, path);
37767
37906
  }
37768
37907
  if (route.path == null && !route.index) {
37769
37908
  return;
@@ -37779,7 +37918,7 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "",
37779
37918
  flattenRoute(route, index);
37780
37919
  } else {
37781
37920
  for (let exploded of explodeOptionalSegments(route.path)) {
37782
- flattenRoute(route, index, true, exploded);
37921
+ flattenRoute(route, index, exploded);
37783
37922
  }
37784
37923
  }
37785
37924
  });
@@ -37943,7 +38082,7 @@ function compilePath(path, caseSensitive = false, end = true) {
37943
38082
  params.push({ paramName, isOptional: isOptional != null });
37944
38083
  return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
37945
38084
  }
37946
- ).replace(/\/([\w-]+)\?(\/|$)/g, "(/$1)?$2");
38085
+ );
37947
38086
  if (path.endsWith("*")) {
37948
38087
  params.push({ paramName: "*" });
37949
38088
  regexpSource += path === "*" || path === "/*" ? "(.*)$" : "(?:\\/(.+)|\\/*)$";
@@ -38086,36 +38225,35 @@ var validRequestMethodsArr = [
38086
38225
  ...validMutationMethodsArr
38087
38226
  ];
38088
38227
  new Set(validRequestMethodsArr);
38089
- var DataRouterContext = React3__namespace.createContext(null);
38228
+ var DataRouterContext = React2__namespace.createContext(null);
38090
38229
  DataRouterContext.displayName = "DataRouter";
38091
- var DataRouterStateContext = React3__namespace.createContext(null);
38230
+ var DataRouterStateContext = React2__namespace.createContext(null);
38092
38231
  DataRouterStateContext.displayName = "DataRouterState";
38093
- React3__namespace.createContext(false);
38094
- var ViewTransitionContext = React3__namespace.createContext({
38232
+ var ViewTransitionContext = React2__namespace.createContext({
38095
38233
  isTransitioning: false
38096
38234
  });
38097
38235
  ViewTransitionContext.displayName = "ViewTransition";
38098
- var FetchersContext = React3__namespace.createContext(
38236
+ var FetchersContext = React2__namespace.createContext(
38099
38237
  /* @__PURE__ */ new Map()
38100
38238
  );
38101
38239
  FetchersContext.displayName = "Fetchers";
38102
- var AwaitContext = React3__namespace.createContext(null);
38240
+ var AwaitContext = React2__namespace.createContext(null);
38103
38241
  AwaitContext.displayName = "Await";
38104
- var NavigationContext = React3__namespace.createContext(
38242
+ var NavigationContext = React2__namespace.createContext(
38105
38243
  null
38106
38244
  );
38107
38245
  NavigationContext.displayName = "Navigation";
38108
- var LocationContext = React3__namespace.createContext(
38246
+ var LocationContext = React2__namespace.createContext(
38109
38247
  null
38110
38248
  );
38111
38249
  LocationContext.displayName = "Location";
38112
- var RouteContext = React3__namespace.createContext({
38250
+ var RouteContext = React2__namespace.createContext({
38113
38251
  outlet: null,
38114
38252
  matches: [],
38115
38253
  isDataRoute: false
38116
38254
  });
38117
38255
  RouteContext.displayName = "Route";
38118
- var RouteErrorContext = React3__namespace.createContext(null);
38256
+ var RouteErrorContext = React2__namespace.createContext(null);
38119
38257
  RouteErrorContext.displayName = "RouteError";
38120
38258
  function useHref(to, { relative } = {}) {
38121
38259
  invariant(
@@ -38124,7 +38262,7 @@ function useHref(to, { relative } = {}) {
38124
38262
  // router loaded. We can help them understand how to avoid that.
38125
38263
  `useHref() may be used only in the context of a <Router> component.`
38126
38264
  );
38127
- let { basename, navigator } = React3__namespace.useContext(NavigationContext);
38265
+ let { basename, navigator } = React2__namespace.useContext(NavigationContext);
38128
38266
  let { hash, pathname, search } = useResolvedPath(to, { relative });
38129
38267
  let joinedPathname = pathname;
38130
38268
  if (basename !== "/") {
@@ -38133,7 +38271,7 @@ function useHref(to, { relative } = {}) {
38133
38271
  return navigator.createHref({ pathname: joinedPathname, search, hash });
38134
38272
  }
38135
38273
  function useInRouterContext() {
38136
- return React3__namespace.useContext(LocationContext) != null;
38274
+ return React2__namespace.useContext(LocationContext) != null;
38137
38275
  }
38138
38276
  function useLocation() {
38139
38277
  invariant(
@@ -38142,17 +38280,17 @@ function useLocation() {
38142
38280
  // router loaded. We can help them understand how to avoid that.
38143
38281
  `useLocation() may be used only in the context of a <Router> component.`
38144
38282
  );
38145
- return React3__namespace.useContext(LocationContext).location;
38283
+ return React2__namespace.useContext(LocationContext).location;
38146
38284
  }
38147
38285
  var navigateEffectWarning = `You should call navigate() in a React.useEffect(), not when your component is first rendered.`;
38148
38286
  function useIsomorphicLayoutEffect(cb) {
38149
- let isStatic = React3__namespace.useContext(NavigationContext).static;
38287
+ let isStatic = React2__namespace.useContext(NavigationContext).static;
38150
38288
  if (!isStatic) {
38151
- React3__namespace.useLayoutEffect(cb);
38289
+ React2__namespace.useLayoutEffect(cb);
38152
38290
  }
38153
38291
  }
38154
38292
  function useNavigate() {
38155
- let { isDataRoute } = React3__namespace.useContext(RouteContext);
38293
+ let { isDataRoute } = React2__namespace.useContext(RouteContext);
38156
38294
  return isDataRoute ? useNavigateStable() : useNavigateUnstable();
38157
38295
  }
38158
38296
  function useNavigateUnstable() {
@@ -38162,16 +38300,16 @@ function useNavigateUnstable() {
38162
38300
  // router loaded. We can help them understand how to avoid that.
38163
38301
  `useNavigate() may be used only in the context of a <Router> component.`
38164
38302
  );
38165
- let dataRouterContext = React3__namespace.useContext(DataRouterContext);
38166
- let { basename, navigator } = React3__namespace.useContext(NavigationContext);
38167
- let { matches } = React3__namespace.useContext(RouteContext);
38303
+ let dataRouterContext = React2__namespace.useContext(DataRouterContext);
38304
+ let { basename, navigator } = React2__namespace.useContext(NavigationContext);
38305
+ let { matches } = React2__namespace.useContext(RouteContext);
38168
38306
  let { pathname: locationPathname } = useLocation();
38169
38307
  let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));
38170
- let activeRef = React3__namespace.useRef(false);
38308
+ let activeRef = React2__namespace.useRef(false);
38171
38309
  useIsomorphicLayoutEffect(() => {
38172
38310
  activeRef.current = true;
38173
38311
  });
38174
- let navigate = React3__namespace.useCallback(
38312
+ let navigate = React2__namespace.useCallback(
38175
38313
  (to, options = {}) => {
38176
38314
  warning(activeRef.current, navigateEffectWarning);
38177
38315
  if (!activeRef.current) return;
@@ -38204,12 +38342,12 @@ function useNavigateUnstable() {
38204
38342
  );
38205
38343
  return navigate;
38206
38344
  }
38207
- React3__namespace.createContext(null);
38345
+ React2__namespace.createContext(null);
38208
38346
  function useResolvedPath(to, { relative } = {}) {
38209
- let { matches } = React3__namespace.useContext(RouteContext);
38347
+ let { matches } = React2__namespace.useContext(RouteContext);
38210
38348
  let { pathname: locationPathname } = useLocation();
38211
38349
  let routePathnamesJson = JSON.stringify(getResolveToMatches(matches));
38212
- return React3__namespace.useMemo(
38350
+ return React2__namespace.useMemo(
38213
38351
  () => resolveTo(
38214
38352
  to,
38215
38353
  JSON.parse(routePathnamesJson),
@@ -38219,15 +38357,15 @@ function useResolvedPath(to, { relative } = {}) {
38219
38357
  [to, routePathnamesJson, locationPathname, relative]
38220
38358
  );
38221
38359
  }
38222
- function useRoutesImpl(routes, locationArg, dataRouterState, unstable_onError, future) {
38360
+ function useRoutesImpl(routes, locationArg, dataRouterState, future) {
38223
38361
  invariant(
38224
38362
  useInRouterContext(),
38225
38363
  // TODO: This error is probably because they somehow have 2 versions of the
38226
38364
  // router loaded. We can help them understand how to avoid that.
38227
38365
  `useRoutes() may be used only in the context of a <Router> component.`
38228
38366
  );
38229
- let { navigator } = React3__namespace.useContext(NavigationContext);
38230
- let { matches: parentMatches } = React3__namespace.useContext(RouteContext);
38367
+ let { navigator } = React2__namespace.useContext(NavigationContext);
38368
+ let { matches: parentMatches } = React2__namespace.useContext(RouteContext);
38231
38369
  let routeMatch = parentMatches[parentMatches.length - 1];
38232
38370
  let parentParams = routeMatch ? routeMatch.params : {};
38233
38371
  let parentPathname = routeMatch ? routeMatch.pathname : "/";
@@ -38284,7 +38422,6 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
38284
38422
  ),
38285
38423
  parentMatches,
38286
38424
  dataRouterState,
38287
- unstable_onError,
38288
38425
  future
38289
38426
  );
38290
38427
  return renderedMatches;
@@ -38302,12 +38439,12 @@ function DefaultErrorComponent() {
38302
38439
  "Error handled by React Router default ErrorBoundary:",
38303
38440
  error
38304
38441
  );
38305
- devInfo = /* @__PURE__ */ React3__namespace.createElement(React3__namespace.Fragment, null, /* @__PURE__ */ React3__namespace.createElement("p", null, "\u{1F4BF} Hey developer \u{1F44B}"), /* @__PURE__ */ React3__namespace.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ React3__namespace.createElement("code", { style: codeStyles }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ React3__namespace.createElement("code", { style: codeStyles }, "errorElement"), " prop on your route."));
38442
+ devInfo = /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, /* @__PURE__ */ React2__namespace.createElement("p", null, "\u{1F4BF} Hey developer \u{1F44B}"), /* @__PURE__ */ React2__namespace.createElement("p", null, "You can provide a way better UX than this when your app throws errors by providing your own ", /* @__PURE__ */ React2__namespace.createElement("code", { style: codeStyles }, "ErrorBoundary"), " or", " ", /* @__PURE__ */ React2__namespace.createElement("code", { style: codeStyles }, "errorElement"), " prop on your route."));
38306
38443
  }
38307
- return /* @__PURE__ */ React3__namespace.createElement(React3__namespace.Fragment, null, /* @__PURE__ */ React3__namespace.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ React3__namespace.createElement("h3", { style: { fontStyle: "italic" } }, message), stack ? /* @__PURE__ */ React3__namespace.createElement("pre", { style: preStyles }, stack) : null, devInfo);
38444
+ return /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, /* @__PURE__ */ React2__namespace.createElement("h2", null, "Unexpected Application Error!"), /* @__PURE__ */ React2__namespace.createElement("h3", { style: { fontStyle: "italic" } }, message), stack ? /* @__PURE__ */ React2__namespace.createElement("pre", { style: preStyles }, stack) : null, devInfo);
38308
38445
  }
38309
- var defaultErrorElement = /* @__PURE__ */ React3__namespace.createElement(DefaultErrorComponent, null);
38310
- var RenderErrorBoundary = class extends React3__namespace.Component {
38446
+ var defaultErrorElement = /* @__PURE__ */ React2__namespace.createElement(DefaultErrorComponent, null);
38447
+ var RenderErrorBoundary = class extends React2__namespace.Component {
38311
38448
  constructor(props) {
38312
38449
  super(props);
38313
38450
  this.state = {
@@ -38334,17 +38471,14 @@ var RenderErrorBoundary = class extends React3__namespace.Component {
38334
38471
  };
38335
38472
  }
38336
38473
  componentDidCatch(error, errorInfo) {
38337
- if (this.props.unstable_onError) {
38338
- this.props.unstable_onError(error, errorInfo);
38339
- } else {
38340
- console.error(
38341
- "React Router caught the following error during render",
38342
- error
38343
- );
38344
- }
38474
+ console.error(
38475
+ "React Router caught the following error during render",
38476
+ error,
38477
+ errorInfo
38478
+ );
38345
38479
  }
38346
38480
  render() {
38347
- return this.state.error !== void 0 ? /* @__PURE__ */ React3__namespace.createElement(RouteContext.Provider, { value: this.props.routeContext }, /* @__PURE__ */ React3__namespace.createElement(
38481
+ return this.state.error !== void 0 ? /* @__PURE__ */ React2__namespace.createElement(RouteContext.Provider, { value: this.props.routeContext }, /* @__PURE__ */ React2__namespace.createElement(
38348
38482
  RouteErrorContext.Provider,
38349
38483
  {
38350
38484
  value: this.state.error,
@@ -38354,13 +38488,13 @@ var RenderErrorBoundary = class extends React3__namespace.Component {
38354
38488
  }
38355
38489
  };
38356
38490
  function RenderedRoute({ routeContext, match, children }) {
38357
- let dataRouterContext = React3__namespace.useContext(DataRouterContext);
38491
+ let dataRouterContext = React2__namespace.useContext(DataRouterContext);
38358
38492
  if (dataRouterContext && dataRouterContext.static && dataRouterContext.staticContext && (match.route.errorElement || match.route.ErrorBoundary)) {
38359
38493
  dataRouterContext.staticContext._deepestRenderedBoundaryId = match.route.id;
38360
38494
  }
38361
- return /* @__PURE__ */ React3__namespace.createElement(RouteContext.Provider, { value: routeContext }, children);
38495
+ return /* @__PURE__ */ React2__namespace.createElement(RouteContext.Provider, { value: routeContext }, children);
38362
38496
  }
38363
- function _renderMatches(matches, parentMatches = [], dataRouterState = null, unstable_onError = null, future = null) {
38497
+ function _renderMatches(matches, parentMatches = [], dataRouterState = null, future = null) {
38364
38498
  if (matches == null) {
38365
38499
  if (!dataRouterState) {
38366
38500
  return null;
@@ -38413,88 +38547,84 @@ function _renderMatches(matches, parentMatches = [], dataRouterState = null, uns
38413
38547
  }
38414
38548
  }
38415
38549
  }
38416
- return renderedMatches.reduceRight(
38417
- (outlet, match, index) => {
38418
- let error;
38419
- let shouldRenderHydrateFallback = false;
38420
- let errorElement = null;
38421
- let hydrateFallbackElement = null;
38422
- if (dataRouterState) {
38423
- error = errors && match.route.id ? errors[match.route.id] : void 0;
38424
- errorElement = match.route.errorElement || defaultErrorElement;
38425
- if (renderFallback) {
38426
- if (fallbackIndex < 0 && index === 0) {
38427
- warningOnce(
38428
- "route-fallback",
38429
- false,
38430
- "No `HydrateFallback` element provided to render during initial hydration"
38431
- );
38432
- shouldRenderHydrateFallback = true;
38433
- hydrateFallbackElement = null;
38434
- } else if (fallbackIndex === index) {
38435
- shouldRenderHydrateFallback = true;
38436
- hydrateFallbackElement = match.route.hydrateFallbackElement || null;
38437
- }
38550
+ return renderedMatches.reduceRight((outlet, match, index) => {
38551
+ let error;
38552
+ let shouldRenderHydrateFallback = false;
38553
+ let errorElement = null;
38554
+ let hydrateFallbackElement = null;
38555
+ if (dataRouterState) {
38556
+ error = errors && match.route.id ? errors[match.route.id] : void 0;
38557
+ errorElement = match.route.errorElement || defaultErrorElement;
38558
+ if (renderFallback) {
38559
+ if (fallbackIndex < 0 && index === 0) {
38560
+ warningOnce(
38561
+ "route-fallback",
38562
+ false,
38563
+ "No `HydrateFallback` element provided to render during initial hydration"
38564
+ );
38565
+ shouldRenderHydrateFallback = true;
38566
+ hydrateFallbackElement = null;
38567
+ } else if (fallbackIndex === index) {
38568
+ shouldRenderHydrateFallback = true;
38569
+ hydrateFallbackElement = match.route.hydrateFallbackElement || null;
38438
38570
  }
38439
38571
  }
38440
- let matches2 = parentMatches.concat(renderedMatches.slice(0, index + 1));
38441
- let getChildren = () => {
38442
- let children;
38443
- if (error) {
38444
- children = errorElement;
38445
- } else if (shouldRenderHydrateFallback) {
38446
- children = hydrateFallbackElement;
38447
- } else if (match.route.Component) {
38448
- children = /* @__PURE__ */ React3__namespace.createElement(match.route.Component, null);
38449
- } else if (match.route.element) {
38450
- children = match.route.element;
38451
- } else {
38452
- children = outlet;
38453
- }
38454
- return /* @__PURE__ */ React3__namespace.createElement(
38455
- RenderedRoute,
38456
- {
38457
- match,
38458
- routeContext: {
38459
- outlet,
38460
- matches: matches2,
38461
- isDataRoute: dataRouterState != null
38462
- },
38463
- children
38464
- }
38465
- );
38466
- };
38467
- return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React3__namespace.createElement(
38468
- RenderErrorBoundary,
38572
+ }
38573
+ let matches2 = parentMatches.concat(renderedMatches.slice(0, index + 1));
38574
+ let getChildren = () => {
38575
+ let children;
38576
+ if (error) {
38577
+ children = errorElement;
38578
+ } else if (shouldRenderHydrateFallback) {
38579
+ children = hydrateFallbackElement;
38580
+ } else if (match.route.Component) {
38581
+ children = /* @__PURE__ */ React2__namespace.createElement(match.route.Component, null);
38582
+ } else if (match.route.element) {
38583
+ children = match.route.element;
38584
+ } else {
38585
+ children = outlet;
38586
+ }
38587
+ return /* @__PURE__ */ React2__namespace.createElement(
38588
+ RenderedRoute,
38469
38589
  {
38470
- location: dataRouterState.location,
38471
- revalidation: dataRouterState.revalidation,
38472
- component: errorElement,
38473
- error,
38474
- children: getChildren(),
38475
- routeContext: { outlet: null, matches: matches2, isDataRoute: true },
38476
- unstable_onError
38590
+ match,
38591
+ routeContext: {
38592
+ outlet,
38593
+ matches: matches2,
38594
+ isDataRoute: dataRouterState != null
38595
+ },
38596
+ children
38477
38597
  }
38478
- ) : getChildren();
38479
- },
38480
- null
38481
- );
38598
+ );
38599
+ };
38600
+ return dataRouterState && (match.route.ErrorBoundary || match.route.errorElement || index === 0) ? /* @__PURE__ */ React2__namespace.createElement(
38601
+ RenderErrorBoundary,
38602
+ {
38603
+ location: dataRouterState.location,
38604
+ revalidation: dataRouterState.revalidation,
38605
+ component: errorElement,
38606
+ error,
38607
+ children: getChildren(),
38608
+ routeContext: { outlet: null, matches: matches2, isDataRoute: true }
38609
+ }
38610
+ ) : getChildren();
38611
+ }, null);
38482
38612
  }
38483
38613
  function getDataRouterConsoleError(hookName) {
38484
38614
  return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
38485
38615
  }
38486
38616
  function useDataRouterContext(hookName) {
38487
- let ctx = React3__namespace.useContext(DataRouterContext);
38617
+ let ctx = React2__namespace.useContext(DataRouterContext);
38488
38618
  invariant(ctx, getDataRouterConsoleError(hookName));
38489
38619
  return ctx;
38490
38620
  }
38491
38621
  function useDataRouterState(hookName) {
38492
- let state = React3__namespace.useContext(DataRouterStateContext);
38622
+ let state = React2__namespace.useContext(DataRouterStateContext);
38493
38623
  invariant(state, getDataRouterConsoleError(hookName));
38494
38624
  return state;
38495
38625
  }
38496
38626
  function useRouteContext(hookName) {
38497
- let route = React3__namespace.useContext(RouteContext);
38627
+ let route = React2__namespace.useContext(RouteContext);
38498
38628
  invariant(route, getDataRouterConsoleError(hookName));
38499
38629
  return route;
38500
38630
  }
@@ -38511,7 +38641,7 @@ function useRouteId() {
38511
38641
  return useCurrentRouteId("useRouteId" /* UseRouteId */);
38512
38642
  }
38513
38643
  function useRouteError() {
38514
- let error = React3__namespace.useContext(RouteErrorContext);
38644
+ let error = React2__namespace.useContext(RouteErrorContext);
38515
38645
  let state = useDataRouterState("useRouteError" /* UseRouteError */);
38516
38646
  let routeId = useCurrentRouteId("useRouteError" /* UseRouteError */);
38517
38647
  if (error !== void 0) {
@@ -38522,11 +38652,11 @@ function useRouteError() {
38522
38652
  function useNavigateStable() {
38523
38653
  let { router } = useDataRouterContext("useNavigate" /* UseNavigateStable */);
38524
38654
  let id = useCurrentRouteId("useNavigate" /* UseNavigateStable */);
38525
- let activeRef = React3__namespace.useRef(false);
38655
+ let activeRef = React2__namespace.useRef(false);
38526
38656
  useIsomorphicLayoutEffect(() => {
38527
38657
  activeRef.current = true;
38528
38658
  });
38529
- let navigate = React3__namespace.useCallback(
38659
+ let navigate = React2__namespace.useCallback(
38530
38660
  async (to, options = {}) => {
38531
38661
  warning(activeRef.current, navigateEffectWarning);
38532
38662
  if (!activeRef.current) return;
@@ -38547,14 +38677,13 @@ function warningOnce(key, cond, message) {
38547
38677
  warning(false, message);
38548
38678
  }
38549
38679
  }
38550
- React3__namespace.memo(DataRoutes);
38680
+ React2__namespace.memo(DataRoutes);
38551
38681
  function DataRoutes({
38552
38682
  routes,
38553
38683
  future,
38554
- state,
38555
- unstable_onError
38684
+ state
38556
38685
  }) {
38557
- return useRoutesImpl(routes, void 0, state, unstable_onError, future);
38686
+ return useRoutesImpl(routes, void 0, state, future);
38558
38687
  }
38559
38688
  function Router({
38560
38689
  basename: basenameProp = "/",
@@ -38569,7 +38698,7 @@ function Router({
38569
38698
  `You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`
38570
38699
  );
38571
38700
  let basename = basenameProp.replace(/^\/*/, "/");
38572
- let navigationContext = React3__namespace.useMemo(
38701
+ let navigationContext = React2__namespace.useMemo(
38573
38702
  () => ({
38574
38703
  basename,
38575
38704
  navigator,
@@ -38588,7 +38717,7 @@ function Router({
38588
38717
  state = null,
38589
38718
  key = "default"
38590
38719
  } = locationProp;
38591
- let locationContext = React3__namespace.useMemo(() => {
38720
+ let locationContext = React2__namespace.useMemo(() => {
38592
38721
  let trailingPathname = stripBasename(pathname, basename);
38593
38722
  if (trailingPathname == null) {
38594
38723
  return null;
@@ -38611,7 +38740,7 @@ function Router({
38611
38740
  if (locationContext == null) {
38612
38741
  return null;
38613
38742
  }
38614
- return /* @__PURE__ */ React3__namespace.createElement(NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ React3__namespace.createElement(LocationContext.Provider, { children, value: locationContext }));
38743
+ return /* @__PURE__ */ React2__namespace.createElement(NavigationContext.Provider, { value: navigationContext }, /* @__PURE__ */ React2__namespace.createElement(LocationContext.Provider, { children, value: locationContext }));
38615
38744
  }
38616
38745
 
38617
38746
  // lib/dom/dom.ts
@@ -38718,7 +38847,6 @@ function getFormSubmissionInfo(target, basename) {
38718
38847
  }
38719
38848
  return { action, method: method.toLowerCase(), encType, formData, body };
38720
38849
  }
38721
- Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
38722
38850
 
38723
38851
  // lib/dom/ssr/invariant.ts
38724
38852
  function invariant2(value, message) {
@@ -38726,22 +38854,6 @@ function invariant2(value, message) {
38726
38854
  throw new Error(message);
38727
38855
  }
38728
38856
  }
38729
- function singleFetchUrl(reqUrl, basename, extension) {
38730
- let url = typeof reqUrl === "string" ? new URL(
38731
- reqUrl,
38732
- // This can be called during the SSR flow via PrefetchPageLinksImpl so
38733
- // don't assume window is available
38734
- typeof window === "undefined" ? "server://singlefetch/" : window.location.origin
38735
- ) : reqUrl;
38736
- if (url.pathname === "/") {
38737
- url.pathname = `_root.${extension}`;
38738
- } else if (basename && stripBasename(url.pathname, basename) === "/") {
38739
- url.pathname = `${basename.replace(/\/$/, "")}/_root.${extension}`;
38740
- } else {
38741
- url.pathname = `${url.pathname.replace(/\/$/, "")}.${extension}`;
38742
- }
38743
- return url;
38744
- }
38745
38857
 
38746
38858
  // lib/dom/ssr/routeModules.ts
38747
38859
  async function loadRouteModule(route, routeModulesCache) {
@@ -38888,10 +39000,28 @@ function dedupeLinkDescriptors(descriptors, preloads) {
38888
39000
  return deduped;
38889
39001
  }, []);
38890
39002
  }
39003
+ Object.getOwnPropertyNames(Object.prototype).sort().join("\0");
39004
+ var NO_BODY_STATUS_CODES = /* @__PURE__ */ new Set([100, 101, 204, 205]);
39005
+ function singleFetchUrl(reqUrl, basename) {
39006
+ let url = typeof reqUrl === "string" ? new URL(
39007
+ reqUrl,
39008
+ // This can be called during the SSR flow via PrefetchPageLinksImpl so
39009
+ // don't assume window is available
39010
+ typeof window === "undefined" ? "server://singlefetch/" : window.location.origin
39011
+ ) : reqUrl;
39012
+ if (url.pathname === "/") {
39013
+ url.pathname = "_root.data";
39014
+ } else if (basename && stripBasename(url.pathname, basename) === "/") {
39015
+ url.pathname = `${basename.replace(/\/$/, "")}/_root.data`;
39016
+ } else {
39017
+ url.pathname = `${url.pathname.replace(/\/$/, "")}.data`;
39018
+ }
39019
+ return url;
39020
+ }
38891
39021
 
38892
39022
  // lib/dom/ssr/components.tsx
38893
39023
  function useDataRouterContext2() {
38894
- let context = React3__namespace.useContext(DataRouterContext);
39024
+ let context = React2__namespace.useContext(DataRouterContext);
38895
39025
  invariant2(
38896
39026
  context,
38897
39027
  "You must render this element inside a <DataRouterContext.Provider> element"
@@ -38899,17 +39029,17 @@ function useDataRouterContext2() {
38899
39029
  return context;
38900
39030
  }
38901
39031
  function useDataRouterStateContext() {
38902
- let context = React3__namespace.useContext(DataRouterStateContext);
39032
+ let context = React2__namespace.useContext(DataRouterStateContext);
38903
39033
  invariant2(
38904
39034
  context,
38905
39035
  "You must render this element inside a <DataRouterStateContext.Provider> element"
38906
39036
  );
38907
39037
  return context;
38908
39038
  }
38909
- var FrameworkContext = React3__namespace.createContext(void 0);
39039
+ var FrameworkContext = React2__namespace.createContext(void 0);
38910
39040
  FrameworkContext.displayName = "FrameworkContext";
38911
39041
  function useFrameworkContext() {
38912
- let context = React3__namespace.useContext(FrameworkContext);
39042
+ let context = React2__namespace.useContext(FrameworkContext);
38913
39043
  invariant2(
38914
39044
  context,
38915
39045
  "You must render this element inside a <HydratedRouter> element"
@@ -38917,12 +39047,12 @@ function useFrameworkContext() {
38917
39047
  return context;
38918
39048
  }
38919
39049
  function usePrefetchBehavior(prefetch, theirElementProps) {
38920
- let frameworkContext = React3__namespace.useContext(FrameworkContext);
38921
- let [maybePrefetch, setMaybePrefetch] = React3__namespace.useState(false);
38922
- let [shouldPrefetch, setShouldPrefetch] = React3__namespace.useState(false);
39050
+ let frameworkContext = React2__namespace.useContext(FrameworkContext);
39051
+ let [maybePrefetch, setMaybePrefetch] = React2__namespace.useState(false);
39052
+ let [shouldPrefetch, setShouldPrefetch] = React2__namespace.useState(false);
38923
39053
  let { onFocus, onBlur, onMouseEnter, onMouseLeave, onTouchStart } = theirElementProps;
38924
- let ref = React3__namespace.useRef(null);
38925
- React3__namespace.useEffect(() => {
39054
+ let ref = React2__namespace.useRef(null);
39055
+ React2__namespace.useEffect(() => {
38926
39056
  if (prefetch === "render") {
38927
39057
  setShouldPrefetch(true);
38928
39058
  }
@@ -38939,7 +39069,7 @@ function usePrefetchBehavior(prefetch, theirElementProps) {
38939
39069
  };
38940
39070
  }
38941
39071
  }, [prefetch]);
38942
- React3__namespace.useEffect(() => {
39072
+ React2__namespace.useEffect(() => {
38943
39073
  if (maybePrefetch) {
38944
39074
  let id = setTimeout(() => {
38945
39075
  setShouldPrefetch(true);
@@ -38982,21 +39112,24 @@ function composeEventHandlers(theirHandler, ourHandler) {
38982
39112
  }
38983
39113
  };
38984
39114
  }
38985
- function PrefetchPageLinks({ page, ...linkProps }) {
39115
+ function PrefetchPageLinks({
39116
+ page,
39117
+ ...dataLinkProps
39118
+ }) {
38986
39119
  let { router } = useDataRouterContext2();
38987
- let matches = React3__namespace.useMemo(
39120
+ let matches = React2__namespace.useMemo(
38988
39121
  () => matchRoutes(router.routes, page, router.basename),
38989
39122
  [router.routes, page, router.basename]
38990
39123
  );
38991
39124
  if (!matches) {
38992
39125
  return null;
38993
39126
  }
38994
- return /* @__PURE__ */ React3__namespace.createElement(PrefetchPageLinksImpl, { page, matches, ...linkProps });
39127
+ return /* @__PURE__ */ React2__namespace.createElement(PrefetchPageLinksImpl, { page, matches, ...dataLinkProps });
38995
39128
  }
38996
39129
  function useKeyedPrefetchLinks(matches) {
38997
39130
  let { manifest, routeModules } = useFrameworkContext();
38998
- let [keyedPrefetchLinks, setKeyedPrefetchLinks] = React3__namespace.useState([]);
38999
- React3__namespace.useEffect(() => {
39131
+ let [keyedPrefetchLinks, setKeyedPrefetchLinks] = React2__namespace.useState([]);
39132
+ React2__namespace.useEffect(() => {
39000
39133
  let interrupted = false;
39001
39134
  void getKeyedPrefetchLinks(matches, manifest, routeModules).then(
39002
39135
  (links) => {
@@ -39020,7 +39153,7 @@ function PrefetchPageLinksImpl({
39020
39153
  let { manifest, routeModules } = useFrameworkContext();
39021
39154
  let { basename } = useDataRouterContext2();
39022
39155
  let { loaderData, matches } = useDataRouterStateContext();
39023
- let newMatchesForData = React3__namespace.useMemo(
39156
+ let newMatchesForData = React2__namespace.useMemo(
39024
39157
  () => getNewMatchesForLinks(
39025
39158
  page,
39026
39159
  nextMatches,
@@ -39031,7 +39164,7 @@ function PrefetchPageLinksImpl({
39031
39164
  ),
39032
39165
  [page, nextMatches, matches, manifest, location]
39033
39166
  );
39034
- let newMatchesForAssets = React3__namespace.useMemo(
39167
+ let newMatchesForAssets = React2__namespace.useMemo(
39035
39168
  () => getNewMatchesForLinks(
39036
39169
  page,
39037
39170
  nextMatches,
@@ -39042,7 +39175,7 @@ function PrefetchPageLinksImpl({
39042
39175
  ),
39043
39176
  [page, nextMatches, matches, manifest, location]
39044
39177
  );
39045
- let dataHrefs = React3__namespace.useMemo(() => {
39178
+ let dataHrefs = React2__namespace.useMemo(() => {
39046
39179
  if (page === location.pathname + location.search + location.hash) {
39047
39180
  return [];
39048
39181
  }
@@ -39064,7 +39197,7 @@ function PrefetchPageLinksImpl({
39064
39197
  if (routesParams.size === 0) {
39065
39198
  return [];
39066
39199
  }
39067
- let url = singleFetchUrl(page, basename, "data");
39200
+ let url = singleFetchUrl(page, basename);
39068
39201
  if (foundOptOutRoute && routesParams.size > 0) {
39069
39202
  url.searchParams.set(
39070
39203
  "_routes",
@@ -39082,15 +39215,15 @@ function PrefetchPageLinksImpl({
39082
39215
  page,
39083
39216
  routeModules
39084
39217
  ]);
39085
- let moduleHrefs = React3__namespace.useMemo(
39218
+ let moduleHrefs = React2__namespace.useMemo(
39086
39219
  () => getModuleLinkHrefs(newMatchesForAssets, manifest),
39087
39220
  [newMatchesForAssets, manifest]
39088
39221
  );
39089
39222
  let keyedPrefetchLinks = useKeyedPrefetchLinks(newMatchesForAssets);
39090
- return /* @__PURE__ */ React3__namespace.createElement(React3__namespace.Fragment, null, dataHrefs.map((href) => /* @__PURE__ */ React3__namespace.createElement("link", { key: href, rel: "prefetch", as: "fetch", href, ...linkProps })), moduleHrefs.map((href) => /* @__PURE__ */ React3__namespace.createElement("link", { key: href, rel: "modulepreload", href, ...linkProps })), keyedPrefetchLinks.map(({ key, link }) => (
39223
+ return /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, dataHrefs.map((href2) => /* @__PURE__ */ React2__namespace.createElement("link", { key: href2, rel: "prefetch", as: "fetch", href: href2, ...linkProps })), moduleHrefs.map((href2) => /* @__PURE__ */ React2__namespace.createElement("link", { key: href2, rel: "modulepreload", href: href2, ...linkProps })), keyedPrefetchLinks.map(({ key, link }) => (
39091
39224
  // these don't spread `linkProps` because they are full link descriptors
39092
39225
  // already with their own props
39093
- /* @__PURE__ */ React3__namespace.createElement("link", { key, nonce: linkProps.nonce, ...link })
39226
+ /* @__PURE__ */ React2__namespace.createElement("link", { key, ...link })
39094
39227
  )));
39095
39228
  }
39096
39229
  function mergeRefs(...refs) {
@@ -39104,11 +39237,12 @@ function mergeRefs(...refs) {
39104
39237
  });
39105
39238
  };
39106
39239
  }
39240
+
39241
+ // lib/dom/lib.tsx
39107
39242
  var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
39108
39243
  try {
39109
39244
  if (isBrowser) {
39110
- window.__reactRouterVersion = // @ts-expect-error
39111
- "7.8.2";
39245
+ window.__reactRouterVersion = "7.6.2";
39112
39246
  }
39113
39247
  } catch (e) {
39114
39248
  }
@@ -39117,23 +39251,23 @@ function BrowserRouter({
39117
39251
  children,
39118
39252
  window: window2
39119
39253
  }) {
39120
- let historyRef = React3__namespace.useRef();
39254
+ let historyRef = React2__namespace.useRef();
39121
39255
  if (historyRef.current == null) {
39122
39256
  historyRef.current = createBrowserHistory({ window: window2, v5Compat: true });
39123
39257
  }
39124
39258
  let history = historyRef.current;
39125
- let [state, setStateImpl] = React3__namespace.useState({
39259
+ let [state, setStateImpl] = React2__namespace.useState({
39126
39260
  action: history.action,
39127
39261
  location: history.location
39128
39262
  });
39129
- let setState = React3__namespace.useCallback(
39263
+ let setState = React2__namespace.useCallback(
39130
39264
  (newState) => {
39131
- React3__namespace.startTransition(() => setStateImpl(newState));
39265
+ React2__namespace.startTransition(() => setStateImpl(newState));
39132
39266
  },
39133
39267
  [setStateImpl]
39134
39268
  );
39135
- React3__namespace.useLayoutEffect(() => history.listen(setState), [history, setState]);
39136
- return /* @__PURE__ */ React3__namespace.createElement(
39269
+ React2__namespace.useLayoutEffect(() => history.listen(setState), [history, setState]);
39270
+ return /* @__PURE__ */ React2__namespace.createElement(
39137
39271
  Router,
39138
39272
  {
39139
39273
  basename,
@@ -39145,7 +39279,7 @@ function BrowserRouter({
39145
39279
  );
39146
39280
  }
39147
39281
  var ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
39148
- var Link$1 = React3__namespace.forwardRef(
39282
+ var Link$1 = React2__namespace.forwardRef(
39149
39283
  function LinkWithRef({
39150
39284
  onClick,
39151
39285
  discover = "render",
@@ -39160,7 +39294,7 @@ var Link$1 = React3__namespace.forwardRef(
39160
39294
  viewTransition,
39161
39295
  ...rest
39162
39296
  }, forwardedRef) {
39163
- let { basename } = React3__namespace.useContext(NavigationContext);
39297
+ let { basename } = React2__namespace.useContext(NavigationContext);
39164
39298
  let isAbsolute = typeof to === "string" && ABSOLUTE_URL_REGEX2.test(to);
39165
39299
  let absoluteHref;
39166
39300
  let isExternal = false;
@@ -39184,7 +39318,7 @@ var Link$1 = React3__namespace.forwardRef(
39184
39318
  }
39185
39319
  }
39186
39320
  }
39187
- let href = useHref(to, { relative });
39321
+ let href2 = useHref(to, { relative });
39188
39322
  let [shouldPrefetch, prefetchRef, prefetchHandlers] = usePrefetchBehavior(
39189
39323
  prefetch,
39190
39324
  rest
@@ -39205,12 +39339,12 @@ var Link$1 = React3__namespace.forwardRef(
39205
39339
  }
39206
39340
  let link = (
39207
39341
  // eslint-disable-next-line jsx-a11y/anchor-has-content
39208
- /* @__PURE__ */ React3__namespace.createElement(
39342
+ /* @__PURE__ */ React2__namespace.createElement(
39209
39343
  "a",
39210
39344
  {
39211
39345
  ...rest,
39212
39346
  ...prefetchHandlers,
39213
- href: absoluteHref || href,
39347
+ href: absoluteHref || href2,
39214
39348
  onClick: isExternal || reloadDocument ? onClick : handleClick,
39215
39349
  ref: mergeRefs(forwardedRef, prefetchRef),
39216
39350
  target,
@@ -39218,11 +39352,11 @@ var Link$1 = React3__namespace.forwardRef(
39218
39352
  }
39219
39353
  )
39220
39354
  );
39221
- return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React3__namespace.createElement(React3__namespace.Fragment, null, link, /* @__PURE__ */ React3__namespace.createElement(PrefetchPageLinks, { page: href })) : link;
39355
+ return shouldPrefetch && !isAbsolute ? /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, link, /* @__PURE__ */ React2__namespace.createElement(PrefetchPageLinks, { page: href2 })) : link;
39222
39356
  }
39223
39357
  );
39224
39358
  Link$1.displayName = "Link";
39225
- var NavLink = React3__namespace.forwardRef(
39359
+ var NavLink = React2__namespace.forwardRef(
39226
39360
  function NavLinkWithRef({
39227
39361
  "aria-current": ariaCurrentProp = "page",
39228
39362
  caseSensitive = false,
@@ -39236,8 +39370,8 @@ var NavLink = React3__namespace.forwardRef(
39236
39370
  }, ref) {
39237
39371
  let path = useResolvedPath(to, { relative: rest.relative });
39238
39372
  let location = useLocation();
39239
- let routerState = React3__namespace.useContext(DataRouterStateContext);
39240
- let { navigator, basename } = React3__namespace.useContext(NavigationContext);
39373
+ let routerState = React2__namespace.useContext(DataRouterStateContext);
39374
+ let { navigator, basename } = React2__namespace.useContext(NavigationContext);
39241
39375
  let isTransitioning = routerState != null && // Conditional usage is OK here because the usage of a data router is static
39242
39376
  // eslint-disable-next-line react-hooks/rules-of-hooks
39243
39377
  useViewTransitionState(path) && viewTransition === true;
@@ -39273,7 +39407,7 @@ var NavLink = React3__namespace.forwardRef(
39273
39407
  ].filter(Boolean).join(" ");
39274
39408
  }
39275
39409
  let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
39276
- return /* @__PURE__ */ React3__namespace.createElement(
39410
+ return /* @__PURE__ */ React2__namespace.createElement(
39277
39411
  Link$1,
39278
39412
  {
39279
39413
  ...rest,
@@ -39289,7 +39423,7 @@ var NavLink = React3__namespace.forwardRef(
39289
39423
  }
39290
39424
  );
39291
39425
  NavLink.displayName = "NavLink";
39292
- var Form = React3__namespace.forwardRef(
39426
+ var Form = React2__namespace.forwardRef(
39293
39427
  ({
39294
39428
  discover = "render",
39295
39429
  fetcherKey,
@@ -39326,7 +39460,7 @@ var Form = React3__namespace.forwardRef(
39326
39460
  viewTransition
39327
39461
  });
39328
39462
  };
39329
- return /* @__PURE__ */ React3__namespace.createElement(
39463
+ return /* @__PURE__ */ React2__namespace.createElement(
39330
39464
  "form",
39331
39465
  {
39332
39466
  ref: forwardedRef,
@@ -39344,7 +39478,7 @@ function getDataRouterConsoleError2(hookName) {
39344
39478
  return `${hookName} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`;
39345
39479
  }
39346
39480
  function useDataRouterContext3(hookName) {
39347
- let ctx = React3__namespace.useContext(DataRouterContext);
39481
+ let ctx = React2__namespace.useContext(DataRouterContext);
39348
39482
  invariant(ctx, getDataRouterConsoleError2(hookName));
39349
39483
  return ctx;
39350
39484
  }
@@ -39359,7 +39493,7 @@ function useLinkClickHandler(to, {
39359
39493
  let navigate = useNavigate();
39360
39494
  let location = useLocation();
39361
39495
  let path = useResolvedPath(to, { relative });
39362
- return React3__namespace.useCallback(
39496
+ return React2__namespace.useCallback(
39363
39497
  (event) => {
39364
39498
  if (shouldProcessLinkClick(event, target)) {
39365
39499
  event.preventDefault();
@@ -39391,9 +39525,9 @@ var fetcherId = 0;
39391
39525
  var getUniqueFetcherId = () => `__${String(++fetcherId)}__`;
39392
39526
  function useSubmit() {
39393
39527
  let { router } = useDataRouterContext3("useSubmit" /* UseSubmit */);
39394
- let { basename } = React3__namespace.useContext(NavigationContext);
39528
+ let { basename } = React2__namespace.useContext(NavigationContext);
39395
39529
  let currentRouteId = useRouteId();
39396
- return React3__namespace.useCallback(
39530
+ return React2__namespace.useCallback(
39397
39531
  async (target, options = {}) => {
39398
39532
  let { action, method, encType, formData, body } = getFormSubmissionInfo(
39399
39533
  target,
@@ -39428,8 +39562,8 @@ function useSubmit() {
39428
39562
  );
39429
39563
  }
39430
39564
  function useFormAction(action, { relative } = {}) {
39431
- let { basename } = React3__namespace.useContext(NavigationContext);
39432
- let routeContext = React3__namespace.useContext(RouteContext);
39565
+ let { basename } = React2__namespace.useContext(NavigationContext);
39566
+ let routeContext = React2__namespace.useContext(RouteContext);
39433
39567
  invariant(routeContext, "useFormAction must be used inside a RouteContext");
39434
39568
  let [match] = routeContext.matches.slice(-1);
39435
39569
  let path = { ...useResolvedPath(action ? action : ".", { relative }) };
@@ -39454,8 +39588,8 @@ function useFormAction(action, { relative } = {}) {
39454
39588
  }
39455
39589
  return createPath(path);
39456
39590
  }
39457
- function useViewTransitionState(to, { relative } = {}) {
39458
- let vtContext = React3__namespace.useContext(ViewTransitionContext);
39591
+ function useViewTransitionState(to, opts = {}) {
39592
+ let vtContext = React2__namespace.useContext(ViewTransitionContext);
39459
39593
  invariant(
39460
39594
  vtContext != null,
39461
39595
  "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?"
@@ -39463,7 +39597,7 @@ function useViewTransitionState(to, { relative } = {}) {
39463
39597
  let { basename } = useDataRouterContext3(
39464
39598
  "useViewTransitionState" /* useViewTransitionState */
39465
39599
  );
39466
- let path = useResolvedPath(to, { relative });
39600
+ let path = useResolvedPath(to, { relative: opts.relative });
39467
39601
  if (!vtContext.isTransitioning) {
39468
39602
  return false;
39469
39603
  }
@@ -39472,6 +39606,12 @@ function useViewTransitionState(to, { relative } = {}) {
39472
39606
  return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
39473
39607
  }
39474
39608
 
39609
+ // lib/server-runtime/single-fetch.ts
39610
+ /* @__PURE__ */ new Set([
39611
+ ...NO_BODY_STATUS_CODES,
39612
+ 304
39613
+ ]);
39614
+
39475
39615
  const Section = ({
39476
39616
  items,
39477
39617
  title,
@@ -39659,11 +39799,11 @@ const InputTag = ({
39659
39799
  isRequired,
39660
39800
  tooltipLabel
39661
39801
  }) => {
39662
- const [isBoxHover, setIsBoxHover] = React3.useState(false);
39663
- const hiddenSpan = React3.useRef(null);
39664
- const inputTagFocus = React3.useRef(null);
39665
- const inputContainerRef = React3.useRef(null);
39666
- const [parentCoord, setParentCoords] = React3.useState();
39802
+ const [isBoxHover, setIsBoxHover] = React2.useState(false);
39803
+ const hiddenSpan = React2.useRef(null);
39804
+ const inputTagFocus = React2.useRef(null);
39805
+ const inputContainerRef = React2.useRef(null);
39806
+ const [parentCoord, setParentCoords] = React2.useState();
39667
39807
  const focusInputTag = () => {
39668
39808
  if (inputTagFocus && inputTagFocus.current) {
39669
39809
  inputTagFocus.current.focus();
@@ -39743,7 +39883,7 @@ const InputTag = ({
39743
39883
  toggleType: isDanger ? 'error' : 'primary',
39744
39884
  children: renderInput()
39745
39885
  });
39746
- const tooltipLabelMarkup = React3.useMemo(() => tooltipLabel ? /*#__PURE__*/jsxRuntime.jsx(AlphaTooltip, {
39886
+ const tooltipLabelMarkup = React2.useMemo(() => tooltipLabel ? /*#__PURE__*/jsxRuntime.jsx(AlphaTooltip, {
39747
39887
  content: tooltipLabel.content,
39748
39888
  theme: tooltipLabel.theme,
39749
39889
  width: "default",
@@ -39755,7 +39895,7 @@ const InputTag = ({
39755
39895
  })
39756
39896
  })
39757
39897
  }) : null, [tooltipLabel, parentCoord]);
39758
- React3.useEffect(() => {
39898
+ React2.useEffect(() => {
39759
39899
  if (inputContainerRef.current) {
39760
39900
  setParentCoords(inputContainerRef.current.getBoundingClientRect());
39761
39901
  }
@@ -39787,14 +39927,14 @@ const Accordion = ({
39787
39927
  id,
39788
39928
  isLastSon = false
39789
39929
  }) => {
39790
- const [isOpen, setIsOpen] = React3.useState(false);
39930
+ const [isOpen, setIsOpen] = React2.useState(false);
39791
39931
  const {
39792
39932
  theme
39793
39933
  } = useTheme();
39794
39934
  const handleAccordion = () => {
39795
39935
  setIsOpen(!isOpen);
39796
39936
  };
39797
- React3.useEffect(() => {
39937
+ React2.useEffect(() => {
39798
39938
  if (isParentClick === true) {
39799
39939
  setIsOpen(isGlobalOpen);
39800
39940
  }
@@ -39841,8 +39981,8 @@ const JsonViewer = ({
39841
39981
  sortFields,
39842
39982
  keysShowBtnDownload
39843
39983
  }) => {
39844
- const [isOpen, setIsOpen] = React3.useState(false);
39845
- const [isParentClick, setIsParentClick] = React3.useState(false);
39984
+ const [isOpen, setIsOpen] = React2.useState(false);
39985
+ const [isParentClick, setIsParentClick] = React2.useState(false);
39846
39986
  const {
39847
39987
  theme
39848
39988
  } = useTheme();
@@ -39870,14 +40010,14 @@ const JsonViewer = ({
39870
40010
  return getPrettyJson(newData);
39871
40011
  };
39872
40012
  const printPrimitiveValues = (primitiveData, id, objectTemplate = []) => {
39873
- let responseDiv = /*#__PURE__*/jsxRuntime.jsx(React3.Fragment, {});
40013
+ let responseDiv = /*#__PURE__*/jsxRuntime.jsx(React2.Fragment, {});
39874
40014
  const arrayTem = [];
39875
40015
  let i = 0;
39876
40016
  const objToPrint = primitiveData && objectTemplate.length === 0 ? Object.keys(primitiveData) : objectTemplate;
39877
40017
  if (typeof objToPrint !== "string") {
39878
40018
  objToPrint.forEach((key, index) => {
39879
40019
  i = index > 0 && index % 4 === 0 ? i + 1 : i;
39880
- arrayTem[i] = /*#__PURE__*/jsxRuntime.jsxs(React3.Fragment, {
40020
+ arrayTem[i] = /*#__PURE__*/jsxRuntime.jsxs(React2.Fragment, {
39881
40021
  children: [arrayTem[i], /*#__PURE__*/jsxRuntime.jsxs("div", {
39882
40022
  className: "JsonViewer__label",
39883
40023
  children: [/*#__PURE__*/jsxRuntime.jsx("label", {
@@ -39893,7 +40033,7 @@ const JsonViewer = ({
39893
40033
  });
39894
40034
  } else {
39895
40035
  /** String values are added as primitive values */
39896
- arrayTem.push(/*#__PURE__*/jsxRuntime.jsx(React3.Fragment, {
40036
+ arrayTem.push(/*#__PURE__*/jsxRuntime.jsx(React2.Fragment, {
39897
40037
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
39898
40038
  className: "JsonViewer__label",
39899
40039
  children: primitiveData && /*#__PURE__*/jsxRuntime.jsx("label", {
@@ -39903,7 +40043,7 @@ const JsonViewer = ({
39903
40043
  })
39904
40044
  }, `data-content-${0}-${primitiveData}-${id}`));
39905
40045
  }
39906
- responseDiv = /*#__PURE__*/jsxRuntime.jsxs(React3.Fragment, {
40046
+ responseDiv = /*#__PURE__*/jsxRuntime.jsxs(React2.Fragment, {
39907
40047
  children: [responseDiv, arrayTem.map((item, index) => {
39908
40048
  return /*#__PURE__*/jsxRuntime.jsx("div", {
39909
40049
  className: "JsonViewer__content",
@@ -39937,7 +40077,7 @@ const JsonViewer = ({
39937
40077
  const primitiveValues = typeof data !== "string" ? getPrimitiveValues(Object(data)) : data; /** Get all primitive values from data, is data is already a string data is returned */
39938
40078
  const objectValues = getObjectValues(data); /** Get all objects from data */
39939
40079
  const objectTemplate = Object.prototype.toString.call(data) === "[object Array]" /** Validate if data is an object */ ? getObjectTemplate(data) /** If it is an array, iterates within it to obtain the object that has more attributes than others to use as a template for the other objects in the array */ : objTemplate.length > 0 && Object.keys(primitiveValues).length === 0 /** If the objTemplate parameter is different from null and primitiveValues exist, it is because it continues to iterate within the same array (it makes recursion in this function) and the template is the same */ ? objTemplate : [];
39940
- let primitiveRender = /*#__PURE__*/jsxRuntime.jsx(React3.Fragment, {});
40080
+ let primitiveRender = /*#__PURE__*/jsxRuntime.jsx(React2.Fragment, {});
39941
40081
  if (primitiveValues && Object.keys(primitiveValues).length > 0 || objectValues && Object.keys(objectValues).length > 0) {
39942
40082
  primitiveRender = /*#__PURE__*/jsxRuntime.jsx(Accordion, {
39943
40083
  title: levelName,
@@ -39993,7 +40133,7 @@ const JsonViewer = ({
39993
40133
  setIsOpen(!isOpen);
39994
40134
  setIsParentClick(true);
39995
40135
  };
39996
- React3.useEffect(() => {
40136
+ React2.useEffect(() => {
39997
40137
  setTimeout(() => setIsParentClick(false), 500);
39998
40138
  });
39999
40139
  const sortData = (data = {}) => {
@@ -40091,9 +40231,9 @@ const Nip = ({
40091
40231
  } = useTheme();
40092
40232
 
40093
40233
  // Create a fixed array of refs to avoid conditional hook calls
40094
- const refsInputs = [React3.useRef(null), React3.useRef(null), React3.useRef(null), React3.useRef(null), React3.useRef(null), React3.useRef(null), React3.useRef(null), React3.useRef(null), React3.useRef(null), React3.useRef(null)];
40234
+ const refsInputs = [React2.useRef(null), React2.useRef(null), React2.useRef(null), React2.useRef(null), React2.useRef(null), React2.useRef(null), React2.useRef(null), React2.useRef(null), React2.useRef(null), React2.useRef(null)];
40095
40235
  const arrayLenght = nipLength ? nipLength : 4;
40096
- const handleNipChange = React3.useCallback((value, id) => {
40236
+ const handleNipChange = React2.useCallback((value, id) => {
40097
40237
  const index = id;
40098
40238
  if (value.length < 2) {
40099
40239
  const tempoNip = [...nip];
@@ -40106,7 +40246,7 @@ const Nip = ({
40106
40246
  }
40107
40247
  }
40108
40248
  }, [nip]);
40109
- const handlePaste = React3.useCallback(e => {
40249
+ const handlePaste = React2.useCallback(e => {
40110
40250
  const textPaste = e.clipboardData.getData("text");
40111
40251
  const nipUpdate = [...nip];
40112
40252
  textPaste.split("").map((item, index) => {
@@ -40127,7 +40267,7 @@ const Nip = ({
40127
40267
  }
40128
40268
  }
40129
40269
  };
40130
- const renderInputs = React3.useCallback(() => {
40270
+ const renderInputs = React2.useCallback(() => {
40131
40271
  const items = [];
40132
40272
  const itemsToMap = Array.from({
40133
40273
  length: arrayLenght
@@ -40405,7 +40545,7 @@ const Panel = ({
40405
40545
  const handleOnKeyUp = event => {
40406
40546
  if (isOpen && event.key == "Escape" && onClose) onClose();
40407
40547
  };
40408
- React3.useEffect(() => {
40548
+ React2.useEffect(() => {
40409
40549
  document.addEventListener("keyup", handleOnKeyUp);
40410
40550
  });
40411
40551
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
@@ -40520,7 +40660,7 @@ const Spinner = ({
40520
40660
  appearance = "info",
40521
40661
  themeAppearance
40522
40662
  }) => {
40523
- React3.useEffect(() => {
40663
+ React2.useEffect(() => {
40524
40664
  if (isOpen) document.body.style.overflow = "hidden";else document.body.removeAttribute("style");
40525
40665
  }, [isOpen]);
40526
40666
  return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
@@ -40572,7 +40712,7 @@ const Stack = ({
40572
40712
  }, index);
40573
40713
  return /*#__PURE__*/jsxRuntime.jsx("div", {
40574
40714
  className: className,
40575
- children: React3.Children.map(children, renderItems)
40715
+ children: React2.Children.map(children, renderItems)
40576
40716
  });
40577
40717
  };
40578
40718
 
@@ -40620,7 +40760,7 @@ const Table = ({
40620
40760
  onSelectAllRows,
40621
40761
  areAllRowsSelected
40622
40762
  }) => {
40623
- React3.useEffect(() => {
40763
+ React2.useEffect(() => {
40624
40764
  if (headingsTypes) {
40625
40765
  const rows = document.getElementById('tbody')?.children;
40626
40766
  if (rows) {