@copart/ops-tool-kit 1.11.3 → 1.11.4-alpha.1

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.
@@ -33,7 +33,7 @@ var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
33
33
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
34
34
 
35
35
  const name$f = "@copart/ops-tool-kit";
36
- const version$5 = "1.11.3";
36
+ const version$5 = "1.11.4-alpha.1";
37
37
  const main$1 = "dist/ops-tool-kit.js";
38
38
  const style = "dist/ops-tool-kit.css";
39
39
  const files = [
@@ -860,7 +860,7 @@ var b$1 = "function" === typeof Symbol && Symbol.for,
860
860
  m = b$1 ? Symbol.for("react.concurrent_mode") : 60111,
861
861
  n = b$1 ? Symbol.for("react.forward_ref") : 60112,
862
862
  p = b$1 ? Symbol.for("react.suspense") : 60113,
863
- q = b$1 ? Symbol.for("react.suspense_list") : 60120,
863
+ q$1 = b$1 ? Symbol.for("react.suspense_list") : 60120,
864
864
  r = b$1 ? Symbol.for("react.memo") : 60115,
865
865
  t = b$1 ? Symbol.for("react.lazy") : 60116,
866
866
  v = b$1 ? Symbol.for("react.block") : 60121,
@@ -951,7 +951,7 @@ var isSuspense = function (a) {
951
951
  return z$1(a) === p;
952
952
  };
953
953
  var isValidElementType = function (a) {
954
- return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g$1 || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h$1 || a.$$typeof === k$1 || a.$$typeof === n || a.$$typeof === w$1 || a.$$typeof === x$1 || a.$$typeof === y || a.$$typeof === v);
954
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g$1 || a === f || a === p || a === q$1 || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h$1 || a.$$typeof === k$1 || a.$$typeof === n || a.$$typeof === w$1 || a.$$typeof === x$1 || a.$$typeof === y || a.$$typeof === v);
955
955
  };
956
956
  var typeOf = z$1;
957
957
 
@@ -8737,7 +8737,7 @@ var flatten$2 = flatten$1;
8737
8737
  * R.flip(mergeThree)(1, 2, 3); //=> [2, 1, 3]
8738
8738
  * @symb R.flip(f)(a, b, c) = f(b, a, c)
8739
8739
  */
8740
- var flip$1 = /*#__PURE__*/_curry1(function flip(fn) {
8740
+ var flip$2 = /*#__PURE__*/_curry1(function flip(fn) {
8741
8741
  return curryN$1(fn.length, function (a, b) {
8742
8742
  var args = Array.prototype.slice.call(arguments, 0);
8743
8743
  args[0] = b;
@@ -8745,7 +8745,7 @@ var flip$1 = /*#__PURE__*/_curry1(function flip(fn) {
8745
8745
  return fn.apply(this, args);
8746
8746
  });
8747
8747
  });
8748
- var flip$2 = flip$1;
8748
+ var flip$3 = flip$2;
8749
8749
 
8750
8750
  /**
8751
8751
  * Iterate over an input `object`, calling a provided function `fn` for each
@@ -27359,7 +27359,7 @@ var getYardOptions = /*#__PURE__*/function () {
27359
27359
  };
27360
27360
  }();
27361
27361
  var filterRoles = function filterRoles(roles, invalidCodes) {
27362
- return compose(uniqBy$1(prop$1('roleName')), filter$1(compose(not$1, flip$2(includes$1)(invalidCodes), prop$1('countryCode'))))(roles);
27362
+ return compose(uniqBy$1(prop$1('roleName')), filter$1(compose(not$1, flip$3(includes$1)(invalidCodes), prop$1('countryCode'))))(roles);
27363
27363
  };
27364
27364
  var SettingsView = /*#__PURE__*/function (_React$Component) {
27365
27365
  _inherits$2(SettingsView, _React$Component);
@@ -48438,8 +48438,9 @@ var NavigationBar = function NavigationBar(_ref2) {
48438
48438
  history = _ref2.history,
48439
48439
  getCounts = _ref2.getCounts,
48440
48440
  activeSubmenu = _ref2.activeSubmenu,
48441
- setActiveSubmenu = _ref2.setActiveSubmenu;
48442
- var withCounts = getCounts && typeof getCounts === 'function';
48441
+ setActiveSubmenu = _ref2.setActiveSubmenu,
48442
+ setShowNavigationCounts = _ref2.setShowNavigationCounts;
48443
+ // const withCounts = getCounts && typeof getCounts === 'function'
48443
48444
  var navigateFunction = navigateTo || (history === null || history === void 0 ? void 0 : history.push) || defaultRedirect;
48444
48445
  var _useState = React.useState(null),
48445
48446
  _useState2 = _slicedToArray(_useState, 2),
@@ -48461,6 +48462,10 @@ var NavigationBar = function NavigationBar(_ref2) {
48461
48462
  _useState10 = _slicedToArray(_useState9, 2),
48462
48463
  selected = _useState10[0],
48463
48464
  setSelected = _useState10[1];
48465
+ var _useState11 = React.useState(false),
48466
+ _useState12 = _slicedToArray(_useState11, 2),
48467
+ withCounts = _useState12[0],
48468
+ setWithCounts = _useState12[1];
48464
48469
  React.useEffect(function () {
48465
48470
  if (Array.isArray(navItems)) {
48466
48471
  var isValid = validateConfig(navItems);
@@ -48482,6 +48487,9 @@ var NavigationBar = function NavigationBar(_ref2) {
48482
48487
  setConfigValid(false);
48483
48488
  }
48484
48489
  }, []);
48490
+ React.useEffect(function () {
48491
+ setShowNavigationCounts(withCounts);
48492
+ }, [withCounts]);
48485
48493
  return /*#__PURE__*/React__default["default"].createElement("div", {
48486
48494
  onMouseOver: function onMouseOver() {
48487
48495
  return setHover(true);
@@ -48501,8 +48509,10 @@ var NavigationBar = function NavigationBar(_ref2) {
48501
48509
  setActiveSubmenu: setActiveSubmenu,
48502
48510
  selected: selected,
48503
48511
  setSelected: setSelected,
48504
- getCounts: getCounts
48505
- }) : null, !isConfigValid ? /*#__PURE__*/React__default["default"].createElement("div", null, "Please check your navigation config") : null);
48512
+ getCounts: getCounts,
48513
+ setWithCounts: setWithCounts,
48514
+ withCounts: withCounts
48515
+ }) : null, isConfigValid === false ? /*#__PURE__*/React__default["default"].createElement("div", null, "Please check your navigation config") : null);
48506
48516
  };
48507
48517
  var NavigationMenu = function NavigationMenu(_ref3) {
48508
48518
  var navItems = _ref3.navItems,
@@ -48513,7 +48523,9 @@ var NavigationMenu = function NavigationMenu(_ref3) {
48513
48523
  setActiveSubmenu = _ref3.setActiveSubmenu,
48514
48524
  selected = _ref3.selected,
48515
48525
  setSelected = _ref3.setSelected,
48516
- getCounts = _ref3.getCounts;
48526
+ getCounts = _ref3.getCounts,
48527
+ setWithCounts = _ref3.setWithCounts,
48528
+ withCounts = _ref3.withCounts;
48517
48529
  var redirectUrl = window.location.pathname;
48518
48530
  React.useEffect(function () {
48519
48531
  if (redirectUrl != "/") {
@@ -48554,7 +48566,9 @@ var NavigationMenu = function NavigationMenu(_ref3) {
48554
48566
  selected: selected,
48555
48567
  setSelected: setSelected,
48556
48568
  redirectUrl: redirectUrl,
48557
- getCounts: getCounts
48569
+ getCounts: getCounts,
48570
+ setWithCounts: setWithCounts,
48571
+ withCounts: withCounts
48558
48572
  });
48559
48573
  }));
48560
48574
  };
@@ -48567,7 +48581,9 @@ var NavigationMenuLevel1 = function NavigationMenuLevel1(_ref4) {
48567
48581
  navigateFunction = _ref4.navigateFunction,
48568
48582
  selected = _ref4.selected,
48569
48583
  setSelected = _ref4.setSelected,
48570
- getCounts = _ref4.getCounts;
48584
+ getCounts = _ref4.getCounts,
48585
+ setWithCounts = _ref4.setWithCounts,
48586
+ withCounts = _ref4.withCounts;
48571
48587
  var hasSubMenuItems = navItem.subMenuItems && navItem.subMenuItems.length > 0;
48572
48588
  var shortName = navItem.shortName ? navItem.shortName.toUpperCase() : dotIcon;
48573
48589
  var nameText = isHover ? (_navItem$name = navItem.name) === null || _navItem$name === void 0 ? void 0 : _navItem$name.toUpperCase() : shortName;
@@ -48581,7 +48597,7 @@ var NavigationMenuLevel1 = function NavigationMenuLevel1(_ref4) {
48581
48597
  icon: navItem.icon
48582
48598
  })), /*#__PURE__*/React__default["default"].createElement("div", {
48583
48599
  className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName utilities_ops-app-frame_NavigationBar_NavigationBar--level1NavItem"
48584
- }, nameText), navItem.count && /*#__PURE__*/React__default["default"].createElement("div", {
48600
+ }, nameText), navItem.hasOwnProperty("count") && /*#__PURE__*/React__default["default"].createElement("div", {
48585
48601
  className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemCount"
48586
48602
  }, navItem.count)), /*#__PURE__*/React__default["default"].createElement("div", null, hasSubMenuItems ? navItem.subMenuItems.map(function (subItem) {
48587
48603
  return /*#__PURE__*/React__default["default"].createElement(NavigationMenuLevel2, {
@@ -48593,7 +48609,9 @@ var NavigationMenuLevel1 = function NavigationMenuLevel1(_ref4) {
48593
48609
  activeSubmenu: activeSubmenu,
48594
48610
  setActiveSubmenu: setActiveSubmenu,
48595
48611
  navigateFunction: navigateFunction,
48596
- getCounts: getCounts
48612
+ getCounts: getCounts,
48613
+ setWithCounts: setWithCounts,
48614
+ withCounts: withCounts
48597
48615
  });
48598
48616
  }) : null));
48599
48617
  };
@@ -48605,20 +48623,23 @@ var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref5) {
48605
48623
  activeSubmenu = _ref5.activeSubmenu,
48606
48624
  setActiveSubmenu = _ref5.setActiveSubmenu,
48607
48625
  navigateFunction = _ref5.navigateFunction,
48608
- getCounts = _ref5.getCounts;
48626
+ getCounts = _ref5.getCounts,
48627
+ setWithCounts = _ref5.setWithCounts,
48628
+ withCounts = _ref5.withCounts;
48609
48629
  var isMenuExpanded = activeSubmenu === navItem.fullRoute;
48610
48630
  var showCounts = isMenuExpanded && getCounts && typeof getCounts === 'function';
48611
- var _useState11 = React.useState(null),
48612
- _useState12 = _slicedToArray(_useState11, 2),
48613
- counts = _useState12[0],
48614
- setCounts = _useState12[1];
48615
- var _useState13 = React.useState(false),
48631
+ var _useState13 = React.useState(null),
48616
48632
  _useState14 = _slicedToArray(_useState13, 2),
48617
- countsLoading = _useState14[0],
48618
- setCountsLoading = _useState14[1];
48633
+ counts = _useState14[0],
48634
+ setCounts = _useState14[1];
48635
+ var _useState15 = React.useState(false),
48636
+ _useState16 = _slicedToArray(_useState15, 2),
48637
+ countsLoading = _useState16[0],
48638
+ setCountsLoading = _useState16[1];
48619
48639
  var hasSubMenuItems = navItem.subMenuItems && navItem.subMenuItems.length > 0;
48620
48640
  var isDisabled = typeof navItem.disabled === 'function' ? navItem.disabled() : navItem.disabled;
48621
- var withCounts = getCounts && typeof getCounts === 'function';
48641
+ // const withCounts = getCounts && typeof getCounts === 'function'
48642
+
48622
48643
  React.useEffect(function () {
48623
48644
  if (showCounts) {
48624
48645
  setCountsLoading(true);
@@ -48628,6 +48649,7 @@ var NavigationMenuLevel2 = function NavigationMenuLevel2(_ref5) {
48628
48649
  var reloadCounts = function reloadCounts(menuItemName) {
48629
48650
  getCounts(menuItemName).then(function (result) {
48630
48651
  setCounts(result);
48652
+ setWithCounts(!isEmpty$2(result));
48631
48653
  setCountsLoading(false);
48632
48654
  }).catch(function () {
48633
48655
  setCountsLoading(false);
@@ -48736,7 +48758,7 @@ var NavigationMenuLevel3 = function NavigationMenuLevel3(_ref6) {
48736
48758
  icon: navItem.icon
48737
48759
  })), /*#__PURE__*/React__default["default"].createElement("div", {
48738
48760
  className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemName"
48739
- }, navItem.name), (countsLoading || countText) && /*#__PURE__*/React__default["default"].createElement("div", {
48761
+ }, navItem.name), (countsLoading || !isNil$1(countText)) && /*#__PURE__*/React__default["default"].createElement("div", {
48740
48762
  className: "utilities_ops-app-frame_NavigationBar_NavigationBar--NavItemCount"
48741
48763
  }, countsLoading ? /*#__PURE__*/React__default["default"].createElement(coreComponents.Spinner, {
48742
48764
  size: "xxs"
@@ -48778,6 +48800,10 @@ var AppFrame = function AppFrame(props) {
48778
48800
  _useState4 = _slicedToArray(_useState3, 2),
48779
48801
  activeSubmenu = _useState4[0],
48780
48802
  setActiveSubmenu = _useState4[1];
48803
+ var _useState5 = React.useState(null),
48804
+ _useState6 = _slicedToArray(_useState5, 2),
48805
+ showNavigationCounts = _useState6[0],
48806
+ setShowNavigationCounts = _useState6[1];
48781
48807
  React.useEffect(function () {
48782
48808
  if (appBarMounted) {
48783
48809
  var event = new Event('localStorageChanged');
@@ -48793,7 +48819,8 @@ var AppFrame = function AppFrame(props) {
48793
48819
  var authGuardProps = _objectSpread2(_objectSpread2({}, props), {}, {
48794
48820
  setAppBarMounted: setAppBarMounted
48795
48821
  });
48796
- var showNavigationCounts = props.getCounts && typeof props.getCounts === 'function';
48822
+
48823
+ // const showNavigationCounts = props.getCounts && typeof props.getCounts === 'function'
48797
48824
  var navigationWidth = activeSubmenu && showNavigationCounts ? '100px' : '50px';
48798
48825
  return /*#__PURE__*/React__default["default"].createElement("div", {
48799
48826
  className: "utilities_ops-app-frame_AppFrame_AppFrame--AppFrame",
@@ -48824,7 +48851,8 @@ var AppFrame = function AppFrame(props) {
48824
48851
  ,
48825
48852
  getCounts: props.getCounts,
48826
48853
  activeSubmenu: activeSubmenu,
48827
- setActiveSubmenu: setActiveSubmenu
48854
+ setActiveSubmenu: setActiveSubmenu,
48855
+ setShowNavigationCounts: setShowNavigationCounts
48828
48856
  }) : null, /*#__PURE__*/React__default["default"].createElement("div", {
48829
48857
  style: {
48830
48858
  marginLeft: props.showNavigation ? navigationWidth : '0px'
@@ -49097,6 +49125,14 @@ function Snippet(_ref) {
49097
49125
  })))));
49098
49126
  }
49099
49127
 
49128
+ /**
49129
+ * Custom positioning reference element.
49130
+ * @see https://floating-ui.com/docs/virtual-elements
49131
+ */
49132
+
49133
+ const sides = ['top', 'right', 'bottom', 'left'];
49134
+ const alignments = ['start', 'end'];
49135
+ const placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + "-" + alignments[0], side + "-" + alignments[1]), []);
49100
49136
  const min = Math.min;
49101
49137
  const max = Math.max;
49102
49138
  const round = Math.round;
@@ -49275,7 +49311,7 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
49275
49311
 
49276
49312
  /**
49277
49313
  * Computes the `x` and `y` coordinates that will place the floating element
49278
- * next to a reference element when it is given a certain positioning strategy.
49314
+ * next to a given reference element.
49279
49315
  *
49280
49316
  * This export does not have any `platform` interface logic. You will need to
49281
49317
  * write one for the platform you are using Floating UI with.
@@ -49353,7 +49389,6 @@ const computePosition$1 = async (reference, floating, config) => {
49353
49389
  } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
49354
49390
  }
49355
49391
  i = -1;
49356
- continue;
49357
49392
  }
49358
49393
  }
49359
49394
  return {
@@ -49416,6 +49451,7 @@ async function detectOverflow(state, options) {
49416
49451
  y: 1
49417
49452
  };
49418
49453
  const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
49454
+ elements,
49419
49455
  rect,
49420
49456
  offsetParent,
49421
49457
  strategy
@@ -49433,7 +49469,7 @@ async function detectOverflow(state, options) {
49433
49469
  * appears centered to the reference element.
49434
49470
  * @see https://floating-ui.com/docs/arrow
49435
49471
  */
49436
- const arrow = options => ({
49472
+ const arrow$1 = options => ({
49437
49473
  name: 'arrow',
49438
49474
  options,
49439
49475
  async fn(state) {
@@ -49494,7 +49530,7 @@ const arrow = options => ({
49494
49530
  // to point to nothing for an aligned placement, adjust the offset of the
49495
49531
  // floating element itself. To ensure `shift()` continues to take action,
49496
49532
  // a single reset is performed when this is true.
49497
- const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
49533
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
49498
49534
  const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
49499
49535
  return {
49500
49536
  [axis]: coords[axis] + alignmentOffset,
@@ -49509,6 +49545,108 @@ const arrow = options => ({
49509
49545
  };
49510
49546
  }
49511
49547
  });
49548
+ function getPlacementList(alignment, autoAlignment, allowedPlacements) {
49549
+ const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);
49550
+ return allowedPlacementsSortedByAlignment.filter(placement => {
49551
+ if (alignment) {
49552
+ return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);
49553
+ }
49554
+ return true;
49555
+ });
49556
+ }
49557
+ /**
49558
+ * Optimizes the visibility of the floating element by choosing the placement
49559
+ * that has the most space available automatically, without needing to specify a
49560
+ * preferred placement. Alternative to `flip`.
49561
+ * @see https://floating-ui.com/docs/autoPlacement
49562
+ */
49563
+ const autoPlacement = function (options) {
49564
+ if (options === void 0) {
49565
+ options = {};
49566
+ }
49567
+ return {
49568
+ name: 'autoPlacement',
49569
+ options,
49570
+ async fn(state) {
49571
+ var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;
49572
+ const {
49573
+ rects,
49574
+ middlewareData,
49575
+ placement,
49576
+ platform,
49577
+ elements
49578
+ } = state;
49579
+ const {
49580
+ crossAxis = false,
49581
+ alignment,
49582
+ allowedPlacements = placements,
49583
+ autoAlignment = true,
49584
+ ...detectOverflowOptions
49585
+ } = evaluate(options, state);
49586
+ const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;
49587
+ const overflow = await detectOverflow(state, detectOverflowOptions);
49588
+ const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;
49589
+ const currentPlacement = placements$1[currentIndex];
49590
+ if (currentPlacement == null) {
49591
+ return {};
49592
+ }
49593
+ const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));
49594
+
49595
+ // Make `computeCoords` start from the right place.
49596
+ if (placement !== currentPlacement) {
49597
+ return {
49598
+ reset: {
49599
+ placement: placements$1[0]
49600
+ }
49601
+ };
49602
+ }
49603
+ const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];
49604
+ const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {
49605
+ placement: currentPlacement,
49606
+ overflows: currentOverflows
49607
+ }];
49608
+ const nextPlacement = placements$1[currentIndex + 1];
49609
+
49610
+ // There are more placements to check.
49611
+ if (nextPlacement) {
49612
+ return {
49613
+ data: {
49614
+ index: currentIndex + 1,
49615
+ overflows: allOverflows
49616
+ },
49617
+ reset: {
49618
+ placement: nextPlacement
49619
+ }
49620
+ };
49621
+ }
49622
+ const placementsSortedByMostSpace = allOverflows.map(d => {
49623
+ const alignment = getAlignment(d.placement);
49624
+ return [d.placement, alignment && crossAxis ?
49625
+ // Check along the mainAxis and main crossAxis side.
49626
+ d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :
49627
+ // Check only the mainAxis.
49628
+ d.overflows[0], d.overflows];
49629
+ }).sort((a, b) => a[1] - b[1]);
49630
+ const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,
49631
+ // Aligned placements should not check their opposite crossAxis
49632
+ // side.
49633
+ getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));
49634
+ const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];
49635
+ if (resetPlacement !== placement) {
49636
+ return {
49637
+ data: {
49638
+ index: currentIndex + 1,
49639
+ overflows: allOverflows
49640
+ },
49641
+ reset: {
49642
+ placement: resetPlacement
49643
+ }
49644
+ };
49645
+ }
49646
+ return {};
49647
+ }
49648
+ };
49649
+ };
49512
49650
 
49513
49651
  /**
49514
49652
  * Optimizes the visibility of the floating element by flipping the `placement`
@@ -49516,7 +49654,7 @@ const arrow = options => ({
49516
49654
  * clipping boundary. Alternative to `autoPlacement`.
49517
49655
  * @see https://floating-ui.com/docs/flip
49518
49656
  */
49519
- const flip = function (options) {
49657
+ const flip$1 = function (options) {
49520
49658
  if (options === void 0) {
49521
49659
  options = {};
49522
49660
  }
@@ -49624,9 +49762,208 @@ const flip = function (options) {
49624
49762
  }
49625
49763
  };
49626
49764
  };
49765
+ function getSideOffsets(overflow, rect) {
49766
+ return {
49767
+ top: overflow.top - rect.height,
49768
+ right: overflow.right - rect.width,
49769
+ bottom: overflow.bottom - rect.height,
49770
+ left: overflow.left - rect.width
49771
+ };
49772
+ }
49773
+ function isAnySideFullyClipped(overflow) {
49774
+ return sides.some(side => overflow[side] >= 0);
49775
+ }
49776
+ /**
49777
+ * Provides data to hide the floating element in applicable situations, such as
49778
+ * when it is not in the same clipping context as the reference element.
49779
+ * @see https://floating-ui.com/docs/hide
49780
+ */
49781
+ const hide = function (options) {
49782
+ if (options === void 0) {
49783
+ options = {};
49784
+ }
49785
+ return {
49786
+ name: 'hide',
49787
+ options,
49788
+ async fn(state) {
49789
+ const {
49790
+ rects
49791
+ } = state;
49792
+ const {
49793
+ strategy = 'referenceHidden',
49794
+ ...detectOverflowOptions
49795
+ } = evaluate(options, state);
49796
+ switch (strategy) {
49797
+ case 'referenceHidden':
49798
+ {
49799
+ const overflow = await detectOverflow(state, {
49800
+ ...detectOverflowOptions,
49801
+ elementContext: 'reference'
49802
+ });
49803
+ const offsets = getSideOffsets(overflow, rects.reference);
49804
+ return {
49805
+ data: {
49806
+ referenceHiddenOffsets: offsets,
49807
+ referenceHidden: isAnySideFullyClipped(offsets)
49808
+ }
49809
+ };
49810
+ }
49811
+ case 'escaped':
49812
+ {
49813
+ const overflow = await detectOverflow(state, {
49814
+ ...detectOverflowOptions,
49815
+ altBoundary: true
49816
+ });
49817
+ const offsets = getSideOffsets(overflow, rects.floating);
49818
+ return {
49819
+ data: {
49820
+ escapedOffsets: offsets,
49821
+ escaped: isAnySideFullyClipped(offsets)
49822
+ }
49823
+ };
49824
+ }
49825
+ default:
49826
+ {
49827
+ return {};
49828
+ }
49829
+ }
49830
+ }
49831
+ };
49832
+ };
49833
+ function getBoundingRect(rects) {
49834
+ const minX = min(...rects.map(rect => rect.left));
49835
+ const minY = min(...rects.map(rect => rect.top));
49836
+ const maxX = max(...rects.map(rect => rect.right));
49837
+ const maxY = max(...rects.map(rect => rect.bottom));
49838
+ return {
49839
+ x: minX,
49840
+ y: minY,
49841
+ width: maxX - minX,
49842
+ height: maxY - minY
49843
+ };
49844
+ }
49845
+ function getRectsByLine(rects) {
49846
+ const sortedRects = rects.slice().sort((a, b) => a.y - b.y);
49847
+ const groups = [];
49848
+ let prevRect = null;
49849
+ for (let i = 0; i < sortedRects.length; i++) {
49850
+ const rect = sortedRects[i];
49851
+ if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {
49852
+ groups.push([rect]);
49853
+ } else {
49854
+ groups[groups.length - 1].push(rect);
49855
+ }
49856
+ prevRect = rect;
49857
+ }
49858
+ return groups.map(rect => rectToClientRect(getBoundingRect(rect)));
49859
+ }
49860
+ /**
49861
+ * Provides improved positioning for inline reference elements that can span
49862
+ * over multiple lines, such as hyperlinks or range selections.
49863
+ * @see https://floating-ui.com/docs/inline
49864
+ */
49865
+ const inline = function (options) {
49866
+ if (options === void 0) {
49867
+ options = {};
49868
+ }
49869
+ return {
49870
+ name: 'inline',
49871
+ options,
49872
+ async fn(state) {
49873
+ const {
49874
+ placement,
49875
+ elements,
49876
+ rects,
49877
+ platform,
49878
+ strategy
49879
+ } = state;
49880
+ // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a
49881
+ // ClientRect's bounds, despite the event listener being triggered. A
49882
+ // padding of 2 seems to handle this issue.
49883
+ const {
49884
+ padding = 2,
49885
+ x,
49886
+ y
49887
+ } = evaluate(options, state);
49888
+ const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);
49889
+ const clientRects = getRectsByLine(nativeClientRects);
49890
+ const fallback = rectToClientRect(getBoundingRect(nativeClientRects));
49891
+ const paddingObject = getPaddingObject(padding);
49892
+ function getBoundingClientRect() {
49893
+ // There are two rects and they are disjoined.
49894
+ if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {
49895
+ // Find the first rect in which the point is fully inside.
49896
+ return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;
49897
+ }
49898
+
49899
+ // There are 2 or more connected rects.
49900
+ if (clientRects.length >= 2) {
49901
+ if (getSideAxis(placement) === 'y') {
49902
+ const firstRect = clientRects[0];
49903
+ const lastRect = clientRects[clientRects.length - 1];
49904
+ const isTop = getSide(placement) === 'top';
49905
+ const top = firstRect.top;
49906
+ const bottom = lastRect.bottom;
49907
+ const left = isTop ? firstRect.left : lastRect.left;
49908
+ const right = isTop ? firstRect.right : lastRect.right;
49909
+ const width = right - left;
49910
+ const height = bottom - top;
49911
+ return {
49912
+ top,
49913
+ bottom,
49914
+ left,
49915
+ right,
49916
+ width,
49917
+ height,
49918
+ x: left,
49919
+ y: top
49920
+ };
49921
+ }
49922
+ const isLeftSide = getSide(placement) === 'left';
49923
+ const maxRight = max(...clientRects.map(rect => rect.right));
49924
+ const minLeft = min(...clientRects.map(rect => rect.left));
49925
+ const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);
49926
+ const top = measureRects[0].top;
49927
+ const bottom = measureRects[measureRects.length - 1].bottom;
49928
+ const left = minLeft;
49929
+ const right = maxRight;
49930
+ const width = right - left;
49931
+ const height = bottom - top;
49932
+ return {
49933
+ top,
49934
+ bottom,
49935
+ left,
49936
+ right,
49937
+ width,
49938
+ height,
49939
+ x: left,
49940
+ y: top
49941
+ };
49942
+ }
49943
+ return fallback;
49944
+ }
49945
+ const resetRects = await platform.getElementRects({
49946
+ reference: {
49947
+ getBoundingClientRect
49948
+ },
49949
+ floating: elements.floating,
49950
+ strategy
49951
+ });
49952
+ if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {
49953
+ return {
49954
+ reset: {
49955
+ rects: resetRects
49956
+ }
49957
+ };
49958
+ }
49959
+ return {};
49960
+ }
49961
+ };
49962
+ };
49627
49963
 
49628
49964
  // For type backwards-compatibility, the `OffsetOptions` type was also
49629
49965
  // Derivable.
49966
+
49630
49967
  async function convertValueToCoords(state, options) {
49631
49968
  const {
49632
49969
  placement,
@@ -49640,8 +49977,6 @@ async function convertValueToCoords(state, options) {
49640
49977
  const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
49641
49978
  const crossAxisMulti = rtl && isVertical ? -1 : 1;
49642
49979
  const rawValue = evaluate(options, state);
49643
-
49644
- // eslint-disable-next-line prefer-const
49645
49980
  let {
49646
49981
  mainAxis,
49647
49982
  crossAxis,
@@ -49714,7 +50049,7 @@ const offset = function (options) {
49714
50049
  * keep it in view when it will overflow the clipping boundary.
49715
50050
  * @see https://floating-ui.com/docs/shift
49716
50051
  */
49717
- const shift = function (options) {
50052
+ const shift$1 = function (options) {
49718
50053
  if (options === void 0) {
49719
50054
  options = {};
49720
50055
  }
@@ -49782,6 +50117,156 @@ const shift = function (options) {
49782
50117
  }
49783
50118
  };
49784
50119
  };
50120
+ /**
50121
+ * Built-in `limiter` that will stop `shift()` at a certain point.
50122
+ */
50123
+ const limitShift = function (options) {
50124
+ if (options === void 0) {
50125
+ options = {};
50126
+ }
50127
+ return {
50128
+ options,
50129
+ fn(state) {
50130
+ const {
50131
+ x,
50132
+ y,
50133
+ placement,
50134
+ rects,
50135
+ middlewareData
50136
+ } = state;
50137
+ const {
50138
+ offset = 0,
50139
+ mainAxis: checkMainAxis = true,
50140
+ crossAxis: checkCrossAxis = true
50141
+ } = evaluate(options, state);
50142
+ const coords = {
50143
+ x,
50144
+ y
50145
+ };
50146
+ const crossAxis = getSideAxis(placement);
50147
+ const mainAxis = getOppositeAxis(crossAxis);
50148
+ let mainAxisCoord = coords[mainAxis];
50149
+ let crossAxisCoord = coords[crossAxis];
50150
+ const rawOffset = evaluate(offset, state);
50151
+ const computedOffset = typeof rawOffset === 'number' ? {
50152
+ mainAxis: rawOffset,
50153
+ crossAxis: 0
50154
+ } : {
50155
+ mainAxis: 0,
50156
+ crossAxis: 0,
50157
+ ...rawOffset
50158
+ };
50159
+ if (checkMainAxis) {
50160
+ const len = mainAxis === 'y' ? 'height' : 'width';
50161
+ const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
50162
+ const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
50163
+ if (mainAxisCoord < limitMin) {
50164
+ mainAxisCoord = limitMin;
50165
+ } else if (mainAxisCoord > limitMax) {
50166
+ mainAxisCoord = limitMax;
50167
+ }
50168
+ }
50169
+ if (checkCrossAxis) {
50170
+ var _middlewareData$offse, _middlewareData$offse2;
50171
+ const len = mainAxis === 'y' ? 'width' : 'height';
50172
+ const isOriginSide = ['top', 'left'].includes(getSide(placement));
50173
+ const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
50174
+ const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
50175
+ if (crossAxisCoord < limitMin) {
50176
+ crossAxisCoord = limitMin;
50177
+ } else if (crossAxisCoord > limitMax) {
50178
+ crossAxisCoord = limitMax;
50179
+ }
50180
+ }
50181
+ return {
50182
+ [mainAxis]: mainAxisCoord,
50183
+ [crossAxis]: crossAxisCoord
50184
+ };
50185
+ }
50186
+ };
50187
+ };
50188
+
50189
+ /**
50190
+ * Provides data that allows you to change the size of the floating element —
50191
+ * for instance, prevent it from overflowing the clipping boundary or match the
50192
+ * width of the reference element.
50193
+ * @see https://floating-ui.com/docs/size
50194
+ */
50195
+ const size = function (options) {
50196
+ if (options === void 0) {
50197
+ options = {};
50198
+ }
50199
+ return {
50200
+ name: 'size',
50201
+ options,
50202
+ async fn(state) {
50203
+ const {
50204
+ placement,
50205
+ rects,
50206
+ platform,
50207
+ elements
50208
+ } = state;
50209
+ const {
50210
+ apply = () => {},
50211
+ ...detectOverflowOptions
50212
+ } = evaluate(options, state);
50213
+ const overflow = await detectOverflow(state, detectOverflowOptions);
50214
+ const side = getSide(placement);
50215
+ const alignment = getAlignment(placement);
50216
+ const isYAxis = getSideAxis(placement) === 'y';
50217
+ const {
50218
+ width,
50219
+ height
50220
+ } = rects.floating;
50221
+ let heightSide;
50222
+ let widthSide;
50223
+ if (side === 'top' || side === 'bottom') {
50224
+ heightSide = side;
50225
+ widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
50226
+ } else {
50227
+ widthSide = side;
50228
+ heightSide = alignment === 'end' ? 'top' : 'bottom';
50229
+ }
50230
+ const overflowAvailableHeight = height - overflow[heightSide];
50231
+ const overflowAvailableWidth = width - overflow[widthSide];
50232
+ const noShift = !state.middlewareData.shift;
50233
+ let availableHeight = overflowAvailableHeight;
50234
+ let availableWidth = overflowAvailableWidth;
50235
+ if (isYAxis) {
50236
+ const maximumClippingWidth = width - overflow.left - overflow.right;
50237
+ availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
50238
+ } else {
50239
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
50240
+ availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
50241
+ }
50242
+ if (noShift && !alignment) {
50243
+ const xMin = max(overflow.left, 0);
50244
+ const xMax = max(overflow.right, 0);
50245
+ const yMin = max(overflow.top, 0);
50246
+ const yMax = max(overflow.bottom, 0);
50247
+ if (isYAxis) {
50248
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
50249
+ } else {
50250
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
50251
+ }
50252
+ }
50253
+ await apply({
50254
+ ...state,
50255
+ availableWidth,
50256
+ availableHeight
50257
+ });
50258
+ const nextDimensions = await platform.getDimensions(elements.floating);
50259
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
50260
+ return {
50261
+ reset: {
50262
+ rects: true
50263
+ }
50264
+ };
50265
+ }
50266
+ return {};
50267
+ }
50268
+ };
50269
+ };
49785
50270
 
49786
50271
  function getNodeName(node) {
49787
50272
  if (isNode$1(node)) {
@@ -49794,7 +50279,7 @@ function getNodeName(node) {
49794
50279
  }
49795
50280
  function getWindow(node) {
49796
50281
  var _node$ownerDocument;
49797
- return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
50282
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
49798
50283
  }
49799
50284
  function getDocumentElement(node) {
49800
50285
  var _ref;
@@ -50007,8 +50492,9 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
50007
50492
  if (domElement) {
50008
50493
  const win = getWindow(domElement);
50009
50494
  const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
50010
- let currentIFrame = win.frameElement;
50011
- while (currentIFrame && offsetParent && offsetWin !== win) {
50495
+ let currentWin = win;
50496
+ let currentIFrame = currentWin.frameElement;
50497
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
50012
50498
  const iframeScale = getScale(currentIFrame);
50013
50499
  const iframeRect = currentIFrame.getBoundingClientRect();
50014
50500
  const css = getComputedStyle$1(currentIFrame);
@@ -50020,7 +50506,8 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
50020
50506
  height *= iframeScale.y;
50021
50507
  x += left;
50022
50508
  y += top;
50023
- currentIFrame = getWindow(currentIFrame).frameElement;
50509
+ currentWin = getWindow(currentIFrame);
50510
+ currentIFrame = currentWin.frameElement;
50024
50511
  }
50025
50512
  }
50026
50513
  return rectToClientRect({
@@ -50030,15 +50517,27 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
50030
50517
  y
50031
50518
  });
50032
50519
  }
50520
+ const topLayerSelectors = [':popover-open', ':modal'];
50521
+ function isTopLayer(floating) {
50522
+ return topLayerSelectors.some(selector => {
50523
+ try {
50524
+ return floating.matches(selector);
50525
+ } catch (e) {
50526
+ return false;
50527
+ }
50528
+ });
50529
+ }
50033
50530
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
50034
50531
  let {
50532
+ elements,
50035
50533
  rect,
50036
50534
  offsetParent,
50037
50535
  strategy
50038
50536
  } = _ref;
50039
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
50537
+ const isFixed = strategy === 'fixed';
50040
50538
  const documentElement = getDocumentElement(offsetParent);
50041
- if (offsetParent === documentElement) {
50539
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
50540
+ if (offsetParent === documentElement || topLayer && isFixed) {
50042
50541
  return rect;
50043
50542
  }
50044
50543
  let scroll = {
@@ -50047,7 +50546,8 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
50047
50546
  };
50048
50547
  let scale = createCoords(1);
50049
50548
  const offsets = createCoords(0);
50050
- if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
50549
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
50550
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
50051
50551
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
50052
50552
  scroll = getNodeScroll(offsetParent);
50053
50553
  }
@@ -50224,7 +50724,14 @@ function getClippingRect(_ref) {
50224
50724
  };
50225
50725
  }
50226
50726
  function getDimensions(element) {
50227
- return getCssDimensions(element);
50727
+ const {
50728
+ width,
50729
+ height
50730
+ } = getCssDimensions(element);
50731
+ return {
50732
+ width,
50733
+ height
50734
+ };
50228
50735
  }
50229
50736
  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
50230
50737
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
@@ -50248,9 +50755,11 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
50248
50755
  offsets.x = getWindowScrollBarX(documentElement);
50249
50756
  }
50250
50757
  }
50758
+ const x = rect.left + scroll.scrollLeft - offsets.x;
50759
+ const y = rect.top + scroll.scrollTop - offsets.y;
50251
50760
  return {
50252
- x: rect.left + scroll.scrollLeft - offsets.x,
50253
- y: rect.top + scroll.scrollTop - offsets.y,
50761
+ x,
50762
+ y,
50254
50763
  width: rect.width,
50255
50764
  height: rect.height
50256
50765
  };
@@ -50269,7 +50778,7 @@ function getTrueOffsetParent(element, polyfill) {
50269
50778
  // such as table ancestors and cross browser bugs.
50270
50779
  function getOffsetParent(element, polyfill) {
50271
50780
  const window = getWindow(element);
50272
- if (!isHTMLElement(element)) {
50781
+ if (!isHTMLElement(element) || isTopLayer(element)) {
50273
50782
  return window;
50274
50783
  }
50275
50784
  let offsetParent = getTrueOffsetParent(element, polyfill);
@@ -50281,20 +50790,15 @@ function getOffsetParent(element, polyfill) {
50281
50790
  }
50282
50791
  return offsetParent || getContainingBlock(element) || window;
50283
50792
  }
50284
- const getElementRects = async function (_ref) {
50285
- let {
50286
- reference,
50287
- floating,
50288
- strategy
50289
- } = _ref;
50793
+ const getElementRects = async function (data) {
50290
50794
  const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
50291
50795
  const getDimensionsFn = this.getDimensions;
50292
50796
  return {
50293
- reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
50797
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
50294
50798
  floating: {
50295
50799
  x: 0,
50296
50800
  y: 0,
50297
- ...(await getDimensionsFn(floating))
50801
+ ...(await getDimensionsFn(data.floating))
50298
50802
  }
50299
50803
  };
50300
50804
  };
@@ -50320,8 +50824,9 @@ function observeMove(element, onMove) {
50320
50824
  let timeoutId;
50321
50825
  const root = getDocumentElement(element);
50322
50826
  function cleanup() {
50827
+ var _io;
50323
50828
  clearTimeout(timeoutId);
50324
- io && io.disconnect();
50829
+ (_io = io) == null || _io.disconnect();
50325
50830
  io = null;
50326
50831
  }
50327
50832
  function refresh(skip, threshold) {
@@ -50427,7 +50932,8 @@ function autoUpdate(reference, floating, update, options) {
50427
50932
  resizeObserver.unobserve(floating);
50428
50933
  cancelAnimationFrame(reobserveFrame);
50429
50934
  reobserveFrame = requestAnimationFrame(() => {
50430
- resizeObserver && resizeObserver.observe(floating);
50935
+ var _resizeObserver;
50936
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
50431
50937
  });
50432
50938
  }
50433
50939
  update();
@@ -50452,12 +50958,13 @@ function autoUpdate(reference, floating, update, options) {
50452
50958
  }
50453
50959
  update();
50454
50960
  return () => {
50961
+ var _resizeObserver2;
50455
50962
  ancestors.forEach(ancestor => {
50456
50963
  ancestorScroll && ancestor.removeEventListener('scroll', update);
50457
50964
  ancestorResize && ancestor.removeEventListener('resize', update);
50458
50965
  });
50459
- cleanupIo && cleanupIo();
50460
- resizeObserver && resizeObserver.disconnect();
50966
+ cleanupIo == null || cleanupIo();
50967
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
50461
50968
  resizeObserver = null;
50462
50969
  if (animationFrame) {
50463
50970
  cancelAnimationFrame(frameId);
@@ -50465,10 +50972,66 @@ function autoUpdate(reference, floating, update, options) {
50465
50972
  };
50466
50973
  }
50467
50974
 
50975
+ /**
50976
+ * Optimizes the visibility of the floating element by choosing the placement
50977
+ * that has the most space available automatically, without needing to specify a
50978
+ * preferred placement. Alternative to `flip`.
50979
+ * @see https://floating-ui.com/docs/autoPlacement
50980
+ */
50981
+ autoPlacement;
50982
+
50983
+ /**
50984
+ * Optimizes the visibility of the floating element by shifting it in order to
50985
+ * keep it in view when it will overflow the clipping boundary.
50986
+ * @see https://floating-ui.com/docs/shift
50987
+ */
50988
+ const shift = shift$1;
50989
+
50990
+ /**
50991
+ * Optimizes the visibility of the floating element by flipping the `placement`
50992
+ * in order to keep it in view when the preferred placement(s) will overflow the
50993
+ * clipping boundary. Alternative to `autoPlacement`.
50994
+ * @see https://floating-ui.com/docs/flip
50995
+ */
50996
+ const flip = flip$1;
50997
+
50998
+ /**
50999
+ * Provides data that allows you to change the size of the floating element —
51000
+ * for instance, prevent it from overflowing the clipping boundary or match the
51001
+ * width of the reference element.
51002
+ * @see https://floating-ui.com/docs/size
51003
+ */
51004
+ size;
51005
+
51006
+ /**
51007
+ * Provides data to hide the floating element in applicable situations, such as
51008
+ * when it is not in the same clipping context as the reference element.
51009
+ * @see https://floating-ui.com/docs/hide
51010
+ */
51011
+ hide;
51012
+
51013
+ /**
51014
+ * Provides data to position an inner element of the floating element so that it
51015
+ * appears centered to the reference element.
51016
+ * @see https://floating-ui.com/docs/arrow
51017
+ */
51018
+ const arrow = arrow$1;
51019
+
51020
+ /**
51021
+ * Provides improved positioning for inline reference elements that can span
51022
+ * over multiple lines, such as hyperlinks or range selections.
51023
+ * @see https://floating-ui.com/docs/inline
51024
+ */
51025
+ inline;
51026
+
51027
+ /**
51028
+ * Built-in `limiter` that will stop `shift()` at a certain point.
51029
+ */
51030
+ limitShift;
51031
+
50468
51032
  /**
50469
51033
  * Computes the `x` and `y` coordinates that will place the floating element
50470
- * next to a reference element when it is given a certain CSS positioning
50471
- * strategy.
51034
+ * next to a given reference element.
50472
51035
  */
50473
51036
  const computePosition = (reference, floating, options) => {
50474
51037
  // This caches the expensive `getClippingElementAncestors` function so that
@@ -50501,33 +51064,44 @@ var classnames = createCommonjsModule(function (module) {
50501
51064
 
50502
51065
  var hasOwn = {}.hasOwnProperty;
50503
51066
  function classNames() {
50504
- var classes = [];
51067
+ var classes = '';
50505
51068
  for (var i = 0; i < arguments.length; i++) {
50506
51069
  var arg = arguments[i];
50507
- if (!arg) continue;
50508
- var argType = typeof arg;
50509
- if (argType === 'string' || argType === 'number') {
50510
- classes.push(arg);
50511
- } else if (Array.isArray(arg)) {
50512
- if (arg.length) {
50513
- var inner = classNames.apply(null, arg);
50514
- if (inner) {
50515
- classes.push(inner);
50516
- }
50517
- }
50518
- } else if (argType === 'object') {
50519
- if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
50520
- classes.push(arg.toString());
50521
- continue;
50522
- }
50523
- for (var key in arg) {
50524
- if (hasOwn.call(arg, key) && arg[key]) {
50525
- classes.push(key);
50526
- }
50527
- }
51070
+ if (arg) {
51071
+ classes = appendClass(classes, parseValue(arg));
50528
51072
  }
50529
51073
  }
50530
- return classes.join(' ');
51074
+ return classes;
51075
+ }
51076
+ function parseValue(arg) {
51077
+ if (typeof arg === 'string' || typeof arg === 'number') {
51078
+ return arg;
51079
+ }
51080
+ if (typeof arg !== 'object') {
51081
+ return '';
51082
+ }
51083
+ if (Array.isArray(arg)) {
51084
+ return classNames.apply(null, arg);
51085
+ }
51086
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
51087
+ return arg.toString();
51088
+ }
51089
+ var classes = '';
51090
+ for (var key in arg) {
51091
+ if (hasOwn.call(arg, key) && arg[key]) {
51092
+ classes = appendClass(classes, key);
51093
+ }
51094
+ }
51095
+ return classes;
51096
+ }
51097
+ function appendClass(value, newClass) {
51098
+ if (!newClass) {
51099
+ return value;
51100
+ }
51101
+ if (value) {
51102
+ return value + ' ' + newClass;
51103
+ }
51104
+ return value + newClass;
50531
51105
  }
50532
51106
  if (module.exports) {
50533
51107
  classNames.default = classNames;
@@ -50554,72 +51128,31 @@ function S({
50554
51128
  css: e,
50555
51129
  id: t = w,
50556
51130
  type: o = "base",
50557
- ref: l
51131
+ ref: r
50558
51132
  }) {
50559
- var r, n;
51133
+ var l, n;
50560
51134
  if (!e || "undefined" == typeof document || b[o]) return;
50561
- if ("core" === o && "undefined" != typeof process && (null === (r = null === process || void 0 === process ? void 0 : process.env) || void 0 === r ? void 0 : r.REACT_TOOLTIP_DISABLE_CORE_STYLES)) return;
51135
+ if ("core" === o && "undefined" != typeof process && (null === (l = null === process || void 0 === process ? void 0 : process.env) || void 0 === l ? void 0 : l.REACT_TOOLTIP_DISABLE_CORE_STYLES)) return;
50562
51136
  if ("base" !== o && "undefined" != typeof process && (null === (n = null === process || void 0 === process ? void 0 : process.env) || void 0 === n ? void 0 : n.REACT_TOOLTIP_DISABLE_BASE_STYLES)) return;
50563
- "core" === o && (t = h), l || (l = {});
51137
+ "core" === o && (t = h), r || (r = {});
50564
51138
  const {
50565
51139
  insertAt: c
50566
- } = l;
51140
+ } = r;
50567
51141
  if (document.getElementById(t)) return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);
50568
51142
  const i = document.head || document.getElementsByTagName("head")[0],
50569
51143
  s = document.createElement("style");
50570
51144
  s.id = t, s.type = "text/css", "top" === c && i.firstChild ? i.insertBefore(s, i.firstChild) : i.appendChild(s), s.styleSheet ? s.styleSheet.cssText = e : s.appendChild(document.createTextNode(e)), b[o] = !0;
50571
51145
  }
50572
- const g = (e, t, o) => {
50573
- let l = null;
50574
- return function (...r) {
50575
- const n = () => {
50576
- l = null, o || e.apply(this, r);
50577
- };
50578
- o && !l && (e.apply(this, r), l = setTimeout(n, t)), o || (l && clearTimeout(l), l = setTimeout(n, t));
50579
- };
50580
- },
50581
- _ = "DEFAULT_TOOLTIP_ID",
50582
- A = {
50583
- anchorRefs: new Set(),
50584
- activeAnchor: {
50585
- current: null
50586
- },
50587
- attach: () => {},
50588
- detach: () => {},
50589
- setActiveAnchor: () => {}
50590
- },
50591
- O = React.createContext({
50592
- getTooltipData: () => A
50593
- });
50594
- function k(e = _) {
50595
- return React.useContext(O).getTooltipData(e);
50596
- }
50597
- const C = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect,
50598
- R = e => {
50599
- if (!(e instanceof HTMLElement || e instanceof SVGElement)) return !1;
50600
- const t = getComputedStyle(e);
50601
- return ["overflow", "overflow-x", "overflow-y"].some(e => {
50602
- const o = t.getPropertyValue(e);
50603
- return "auto" === o || "scroll" === o;
50604
- });
50605
- },
50606
- x = e => {
50607
- if (!e) return null;
50608
- let t = e.parentElement;
50609
- for (; t;) {
50610
- if (R(t)) return t;
50611
- t = t.parentElement;
50612
- }
50613
- return document.scrollingElement || document.documentElement;
50614
- },
50615
- N = async ({
51146
+ const g = async ({
50616
51147
  elementReference: e = null,
50617
51148
  tooltipReference: t = null,
50618
51149
  tooltipArrowReference: o = null,
50619
- place: l = "top",
50620
- offset: r = 10,
51150
+ place: r = "top",
51151
+ offset: l = 10,
50621
51152
  strategy: n = "absolute",
50622
- middlewares: c = [offset(Number(r)), flip(), shift({
51153
+ middlewares: c = [offset(Number(l)), flip({
51154
+ fallbackAxisSideDirection: "start"
51155
+ }), shift({
50623
51156
  padding: 5
50624
51157
  })],
50625
51158
  border: i
@@ -50627,28 +51160,28 @@ const C = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect
50627
51160
  if (!e) return {
50628
51161
  tooltipStyles: {},
50629
51162
  tooltipArrowStyles: {},
50630
- place: l
51163
+ place: r
50631
51164
  };
50632
51165
  if (null === t) return {
50633
51166
  tooltipStyles: {},
50634
51167
  tooltipArrowStyles: {},
50635
- place: l
51168
+ place: r
50636
51169
  };
50637
51170
  const s = c;
50638
51171
  return o ? (s.push(arrow({
50639
51172
  element: o,
50640
51173
  padding: 5
50641
51174
  })), computePosition(e, t, {
50642
- placement: l,
51175
+ placement: r,
50643
51176
  strategy: n,
50644
51177
  middleware: s
50645
51178
  }).then(({
50646
51179
  x: e,
50647
51180
  y: t,
50648
51181
  placement: o,
50649
- middlewareData: l
51182
+ middlewareData: r
50650
51183
  }) => {
50651
- var r, n;
51184
+ var l, n;
50652
51185
  const c = {
50653
51186
  left: `${e}px`,
50654
51187
  top: `${t}px`,
@@ -50657,7 +51190,7 @@ const C = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect
50657
51190
  {
50658
51191
  x: s,
50659
51192
  y: a
50660
- } = null !== (r = l.arrow) && void 0 !== r ? r : {
51193
+ } = null !== (l = r.arrow) && void 0 !== l ? l : {
50661
51194
  x: 0,
50662
51195
  y: 0
50663
51196
  },
@@ -50704,8 +51237,65 @@ const C = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect
50704
51237
  tooltipArrowStyles: {},
50705
51238
  place: o
50706
51239
  }));
50707
- };
50708
- var $ = {
51240
+ },
51241
+ A = (e, t) => !("CSS" in window && "supports" in window.CSS) || window.CSS.supports(e, t),
51242
+ _ = (e, t, o) => {
51243
+ let r = null;
51244
+ const l = function (...l) {
51245
+ const n = () => {
51246
+ r = null, o || e.apply(this, l);
51247
+ };
51248
+ o && !r && (e.apply(this, l), r = setTimeout(n, t)), o || (r && clearTimeout(r), r = setTimeout(n, t));
51249
+ };
51250
+ return l.cancel = () => {
51251
+ r && (clearTimeout(r), r = null);
51252
+ }, l;
51253
+ },
51254
+ O = e => null !== e && !Array.isArray(e) && "object" == typeof e,
51255
+ T = (e, t) => {
51256
+ if (e === t) return !0;
51257
+ if (Array.isArray(e) && Array.isArray(t)) return e.length === t.length && e.every((e, o) => T(e, t[o]));
51258
+ if (Array.isArray(e) !== Array.isArray(t)) return !1;
51259
+ if (!O(e) || !O(t)) return e === t;
51260
+ const o = Object.keys(e),
51261
+ r = Object.keys(t);
51262
+ return o.length === r.length && o.every(o => T(e[o], t[o]));
51263
+ },
51264
+ k = e => {
51265
+ if (!(e instanceof HTMLElement || e instanceof SVGElement)) return !1;
51266
+ const t = getComputedStyle(e);
51267
+ return ["overflow", "overflow-x", "overflow-y"].some(e => {
51268
+ const o = t.getPropertyValue(e);
51269
+ return "auto" === o || "scroll" === o;
51270
+ });
51271
+ },
51272
+ C = e => {
51273
+ if (!e) return null;
51274
+ let t = e.parentElement;
51275
+ for (; t;) {
51276
+ if (k(t)) return t;
51277
+ t = t.parentElement;
51278
+ }
51279
+ return document.scrollingElement || document.documentElement;
51280
+ },
51281
+ L = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect,
51282
+ R = "DEFAULT_TOOLTIP_ID",
51283
+ x = {
51284
+ anchorRefs: new Set(),
51285
+ activeAnchor: {
51286
+ current: null
51287
+ },
51288
+ attach: () => {},
51289
+ detach: () => {},
51290
+ setActiveAnchor: () => {}
51291
+ },
51292
+ N = React.createContext({
51293
+ getTooltipData: () => x
51294
+ });
51295
+ function I(e = R) {
51296
+ return React.useContext(N).getTooltipData(e);
51297
+ }
51298
+ var B = {
50709
51299
  tooltip: "core-styles-module_tooltip__3vRRp",
50710
51300
  fixed: "core-styles-module_fixed__pcSol",
50711
51301
  arrow: "core-styles-module_arrow__cvMwQ",
@@ -50714,7 +51304,7 @@ var $ = {
50714
51304
  show: "core-styles-module_show__Nt9eE",
50715
51305
  closing: "core-styles-module_closing__sGnxF"
50716
51306
  },
50717
- j = {
51307
+ z = {
50718
51308
  tooltip: "styles-module_tooltip__mnnfp",
50719
51309
  arrow: "styles-module_arrow__K0L3T",
50720
51310
  dark: "styles-module_dark__xNqje",
@@ -50724,11 +51314,11 @@ var $ = {
50724
51314
  error: "styles-module_error__JvumD",
50725
51315
  info: "styles-module_info__BWdHW"
50726
51316
  };
50727
- const I = ({
51317
+ const D = ({
50728
51318
  forwardRef: t,
50729
51319
  id: r,
50730
- className: n,
50731
- classNameArrow: s,
51320
+ className: c,
51321
+ classNameArrow: i,
50732
51322
  variant: u = "dark",
50733
51323
  anchorId: d,
50734
51324
  anchorSelect: p,
@@ -50739,58 +51329,62 @@ const I = ({
50739
51329
  positionStrategy: b = "absolute",
50740
51330
  middlewares: S,
50741
51331
  wrapper: E,
50742
- delayShow: _ = 0,
50743
- delayHide: A = 0,
50744
- float: O = !1,
50745
- hidden: T = !1,
50746
- noArrow: L = !1,
50747
- clickable: R = !1,
50748
- closeOnEsc: I = !1,
50749
- closeOnScroll: B = !1,
50750
- closeOnResize: z = !1,
50751
- openEvents: D,
50752
- closeEvents: q,
50753
- globalCloseEvents: H,
50754
- imperativeModeOnly: M,
50755
- style: W,
50756
- position: P,
51332
+ delayShow: A = 0,
51333
+ delayHide: O = 0,
51334
+ float: k = !1,
51335
+ hidden: R = !1,
51336
+ noArrow: x = !1,
51337
+ clickable: N = !1,
51338
+ closeOnEsc: $ = !1,
51339
+ closeOnScroll: j = !1,
51340
+ closeOnResize: D = !1,
51341
+ openEvents: q,
51342
+ closeEvents: H,
51343
+ globalCloseEvents: M,
51344
+ imperativeModeOnly: W,
51345
+ style: P,
51346
+ position: V,
50757
51347
  afterShow: F,
50758
51348
  afterHide: K,
50759
51349
  content: U,
50760
51350
  contentWrapperRef: X,
50761
51351
  isOpen: Y,
50762
- setIsOpen: G,
50763
- activeAnchor: V,
50764
- setActiveAnchor: Z,
50765
- border: J,
50766
- opacity: Q,
50767
- arrowColor: ee,
50768
- role: te = "tooltip"
51352
+ defaultIsOpen: G = !1,
51353
+ setIsOpen: Z,
51354
+ activeAnchor: J,
51355
+ setActiveAnchor: Q,
51356
+ border: ee,
51357
+ opacity: te,
51358
+ arrowColor: oe,
51359
+ role: re = "tooltip"
50769
51360
  }) => {
50770
- var oe;
50771
- const le = React.useRef(null),
50772
- re = React.useRef(null),
50773
- ne = React.useRef(null),
51361
+ var le;
51362
+ const ne = React.useRef(null),
50774
51363
  ce = React.useRef(null),
50775
- [ie, se] = React.useState(v),
50776
- [ae, ue] = React.useState({}),
50777
- [de, pe] = React.useState({}),
50778
- [ve, me] = React.useState(!1),
50779
- [fe, ye] = React.useState(!1),
50780
- [he, we] = React.useState(null),
50781
- be = React.useRef(!1),
50782
- Se = React.useRef(null),
51364
+ ie = React.useRef(null),
51365
+ se = React.useRef(null),
51366
+ ae = React.useRef(null),
51367
+ [ue, de] = React.useState({
51368
+ tooltipStyles: {},
51369
+ tooltipArrowStyles: {},
51370
+ place: v
51371
+ }),
51372
+ [pe, ve] = React.useState(!1),
51373
+ [me, fe] = React.useState(!1),
51374
+ [ye, he] = React.useState(null),
51375
+ we = React.useRef(!1),
51376
+ be = React.useRef(null),
50783
51377
  {
50784
- anchorRefs: Ee,
50785
- setActiveAnchor: ge
50786
- } = k(r),
50787
- _e = React.useRef(!1),
50788
- [Ae, Oe] = React.useState([]),
50789
- Te = React.useRef(!1),
50790
- ke = w || h.includes("click"),
50791
- Le = ke || (null == D ? void 0 : D.click) || (null == D ? void 0 : D.dblclick) || (null == D ? void 0 : D.mousedown),
50792
- Ce = D ? {
50793
- ...D
51378
+ anchorRefs: Se,
51379
+ setActiveAnchor: Ee
51380
+ } = I(r),
51381
+ ge = React.useRef(!1),
51382
+ [Ae, _e] = React.useState([]),
51383
+ Oe = React.useRef(!1),
51384
+ Te = w || h.includes("click"),
51385
+ ke = Te || (null == q ? void 0 : q.click) || (null == q ? void 0 : q.dblclick) || (null == q ? void 0 : q.mousedown),
51386
+ Ce = q ? {
51387
+ ...q
50794
51388
  } : {
50795
51389
  mouseenter: !0,
50796
51390
  focus: !0,
@@ -50798,13 +51392,13 @@ const I = ({
50798
51392
  dblclick: !1,
50799
51393
  mousedown: !1
50800
51394
  };
50801
- !D && ke && Object.assign(Ce, {
51395
+ !q && Te && Object.assign(Ce, {
50802
51396
  mouseenter: !1,
50803
51397
  focus: !1,
50804
51398
  click: !0
50805
51399
  });
50806
- const Re = q ? {
50807
- ...q
51400
+ const Le = H ? {
51401
+ ...H
50808
51402
  } : {
50809
51403
  mouseleave: !0,
50810
51404
  blur: !0,
@@ -50812,85 +51406,98 @@ const I = ({
50812
51406
  dblclick: !1,
50813
51407
  mouseup: !1
50814
51408
  };
50815
- !q && ke && Object.assign(Re, {
51409
+ !H && Te && Object.assign(Le, {
50816
51410
  mouseleave: !1,
50817
51411
  blur: !1
50818
51412
  });
50819
- const xe = H ? {
50820
- ...H
51413
+ const Re = M ? {
51414
+ ...M
50821
51415
  } : {
50822
- escape: I || !1,
50823
- scroll: B || !1,
50824
- resize: z || !1,
50825
- clickOutsideAnchor: Le || !1
51416
+ escape: $ || !1,
51417
+ scroll: j || !1,
51418
+ resize: D || !1,
51419
+ clickOutsideAnchor: ke || !1
50826
51420
  };
50827
- M && (Object.assign(Ce, {
51421
+ W && (Object.assign(Ce, {
50828
51422
  mouseenter: !1,
50829
51423
  focus: !1,
50830
51424
  click: !1,
50831
51425
  dblclick: !1,
50832
51426
  mousedown: !1
50833
- }), Object.assign(Re, {
51427
+ }), Object.assign(Le, {
50834
51428
  mouseleave: !1,
50835
51429
  blur: !1,
50836
51430
  click: !1,
50837
51431
  dblclick: !1,
50838
51432
  mouseup: !1
50839
- }), Object.assign(xe, {
51433
+ }), Object.assign(Re, {
50840
51434
  escape: !1,
50841
51435
  scroll: !1,
50842
51436
  resize: !1,
50843
51437
  clickOutsideAnchor: !1
50844
- })), C(() => (Te.current = !0, () => {
50845
- Te.current = !1;
51438
+ })), L(() => (Oe.current = !0, () => {
51439
+ Oe.current = !1;
50846
51440
  }), []);
50847
- const Ne = e => {
50848
- Te.current && (e && ye(!0), setTimeout(() => {
50849
- Te.current && (null == G || G(e), void 0 === Y && me(e));
51441
+ const xe = e => {
51442
+ Oe.current && (e && fe(!0), setTimeout(() => {
51443
+ Oe.current && (null == Z || Z(e), void 0 === Y && ve(e));
50850
51444
  }, 10));
50851
51445
  };
50852
51446
  React.useEffect(() => {
50853
51447
  if (void 0 === Y) return () => null;
50854
- Y && ye(!0);
51448
+ Y && fe(!0);
50855
51449
  const e = setTimeout(() => {
50856
- me(Y);
51450
+ ve(Y);
50857
51451
  }, 10);
50858
51452
  return () => {
50859
51453
  clearTimeout(e);
50860
51454
  };
50861
51455
  }, [Y]), React.useEffect(() => {
50862
- ve !== be.current && (be.current = ve, ve && (null == F || F()));
50863
- }, [ve]);
50864
- const $e = (e = _) => {
50865
- ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
50866
- Ne(!0);
51456
+ if (pe !== we.current) if (ae.current && clearTimeout(ae.current), we.current = pe, pe) null == F || F();else {
51457
+ const e = (e => {
51458
+ const t = e.match(/^([\d.]+)(ms|s)$/);
51459
+ if (!t) return 0;
51460
+ const [, o, r] = t;
51461
+ return Number(o) * ("ms" === r ? 1 : 1e3);
51462
+ })(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));
51463
+ ae.current = setTimeout(() => {
51464
+ fe(!1), he(null), null == K || K();
51465
+ }, e + 25);
51466
+ }
51467
+ }, [pe]);
51468
+ const Ne = e => {
51469
+ de(t => T(t, e) ? t : e);
51470
+ },
51471
+ $e = (e = A) => {
51472
+ ie.current && clearTimeout(ie.current), me ? xe(!0) : ie.current = setTimeout(() => {
51473
+ xe(!0);
50867
51474
  }, e);
50868
51475
  },
50869
- je = (e = A) => {
50870
- ce.current && clearTimeout(ce.current), ce.current = setTimeout(() => {
50871
- _e.current || Ne(!1);
51476
+ Ie = (e = O) => {
51477
+ se.current && clearTimeout(se.current), se.current = setTimeout(() => {
51478
+ ge.current || xe(!1);
50872
51479
  }, e);
50873
51480
  },
50874
- Ie = e => {
51481
+ je = e => {
50875
51482
  var t;
50876
51483
  if (!e) return;
50877
51484
  const o = null !== (t = e.currentTarget) && void 0 !== t ? t : e.target;
50878
- if (!(null == o ? void 0 : o.isConnected)) return Z(null), void ge({
51485
+ if (!(null == o ? void 0 : o.isConnected)) return Q(null), void Ee({
50879
51486
  current: null
50880
51487
  });
50881
- _ ? $e() : Ne(!0), Z(o), ge({
51488
+ A ? $e() : xe(!0), Q(o), Ee({
50882
51489
  current: o
50883
- }), ce.current && clearTimeout(ce.current);
51490
+ }), se.current && clearTimeout(se.current);
50884
51491
  },
50885
51492
  Be = () => {
50886
- R ? je(A || 100) : A ? je() : Ne(!1), ne.current && clearTimeout(ne.current);
51493
+ N ? Ie(O || 100) : O ? Ie() : xe(!1), ie.current && clearTimeout(ie.current);
50887
51494
  },
50888
51495
  ze = ({
50889
51496
  x: e,
50890
51497
  y: t
50891
51498
  }) => {
50892
51499
  var o;
50893
- const l = {
51500
+ const r = {
50894
51501
  getBoundingClientRect: () => ({
50895
51502
  x: e,
50896
51503
  y: t,
@@ -50902,17 +51509,17 @@ const I = ({
50902
51509
  bottom: t
50903
51510
  })
50904
51511
  };
50905
- N({
50906
- place: null !== (o = null == he ? void 0 : he.place) && void 0 !== o ? o : v,
51512
+ g({
51513
+ place: null !== (o = null == ye ? void 0 : ye.place) && void 0 !== o ? o : v,
50907
51514
  offset: m,
50908
- elementReference: l,
50909
- tooltipReference: le.current,
50910
- tooltipArrowReference: re.current,
51515
+ elementReference: r,
51516
+ tooltipReference: ne.current,
51517
+ tooltipArrowReference: ce.current,
50911
51518
  strategy: b,
50912
51519
  middlewares: S,
50913
- border: J
51520
+ border: ee
50914
51521
  }).then(e => {
50915
- Object.keys(e.tooltipStyles).length && ue(e.tooltipStyles), Object.keys(e.tooltipArrowStyles).length && pe(e.tooltipArrowStyles), se(e.place);
51522
+ Ne(e);
50916
51523
  });
50917
51524
  },
50918
51525
  De = e => {
@@ -50922,159 +51529,167 @@ const I = ({
50922
51529
  x: t.clientX,
50923
51530
  y: t.clientY
50924
51531
  };
50925
- ze(o), Se.current = o;
51532
+ ze(o), be.current = o;
50926
51533
  },
50927
51534
  qe = e => {
50928
51535
  var t;
50929
- if (!ve) return;
51536
+ if (!pe) return;
50930
51537
  const o = e.target;
50931
- if (null === (t = le.current) || void 0 === t ? void 0 : t.contains(o)) return;
50932
- [document.querySelector(`[id='${d}']`), ...Ae].some(e => null == e ? void 0 : e.contains(o)) || (Ne(!1), ne.current && clearTimeout(ne.current));
51538
+ if (!o.isConnected) return;
51539
+ if (null === (t = ne.current) || void 0 === t ? void 0 : t.contains(o)) return;
51540
+ [document.querySelector(`[id='${d}']`), ...Ae].some(e => null == e ? void 0 : e.contains(o)) || (xe(!1), ie.current && clearTimeout(ie.current));
50933
51541
  },
50934
- He = g(Ie, 50, !0),
50935
- Me = g(Be, 50, !0),
50936
- We = React.useCallback(() => {
51542
+ He = _(je, 50, !0),
51543
+ Me = _(Be, 50, !0),
51544
+ We = e => {
51545
+ Me.cancel(), He(e);
51546
+ },
51547
+ Pe = () => {
51548
+ He.cancel(), Me();
51549
+ },
51550
+ Ve = React.useCallback(() => {
50937
51551
  var e, t;
50938
- const o = null !== (e = null == he ? void 0 : he.position) && void 0 !== e ? e : P;
50939
- o ? ze(o) : O ? Se.current && ze(Se.current) : (null == V ? void 0 : V.isConnected) && N({
50940
- place: null !== (t = null == he ? void 0 : he.place) && void 0 !== t ? t : v,
51552
+ const o = null !== (e = null == ye ? void 0 : ye.position) && void 0 !== e ? e : V;
51553
+ o ? ze(o) : k ? be.current && ze(be.current) : (null == J ? void 0 : J.isConnected) && g({
51554
+ place: null !== (t = null == ye ? void 0 : ye.place) && void 0 !== t ? t : v,
50941
51555
  offset: m,
50942
- elementReference: V,
50943
- tooltipReference: le.current,
50944
- tooltipArrowReference: re.current,
51556
+ elementReference: J,
51557
+ tooltipReference: ne.current,
51558
+ tooltipArrowReference: ce.current,
50945
51559
  strategy: b,
50946
51560
  middlewares: S,
50947
- border: J
51561
+ border: ee
50948
51562
  }).then(e => {
50949
- Te.current && (Object.keys(e.tooltipStyles).length && ue(e.tooltipStyles), Object.keys(e.tooltipArrowStyles).length && pe(e.tooltipArrowStyles), se(e.place));
51563
+ Oe.current && Ne(e);
50950
51564
  });
50951
- }, [ve, V, U, W, v, null == he ? void 0 : he.place, m, b, P, null == he ? void 0 : he.position, O]);
51565
+ }, [pe, J, U, P, v, null == ye ? void 0 : ye.place, m, b, V, null == ye ? void 0 : ye.position, k]);
50952
51566
  React.useEffect(() => {
50953
51567
  var e, t;
50954
- const o = new Set(Ee);
51568
+ const o = new Set(Se);
50955
51569
  Ae.forEach(e => {
50956
51570
  o.add({
50957
51571
  current: e
50958
51572
  });
50959
51573
  });
50960
- const l = document.querySelector(`[id='${d}']`);
50961
- l && o.add({
50962
- current: l
51574
+ const r = document.querySelector(`[id='${d}']`);
51575
+ r && o.add({
51576
+ current: r
50963
51577
  });
50964
- const r = () => {
50965
- Ne(!1);
51578
+ const l = () => {
51579
+ xe(!1);
50966
51580
  },
50967
- n = x(V),
50968
- c = x(le.current);
50969
- xe.scroll && (window.addEventListener("scroll", r), null == n || n.addEventListener("scroll", r), null == c || c.addEventListener("scroll", r));
51581
+ n = C(J),
51582
+ c = C(ne.current);
51583
+ Re.scroll && (window.addEventListener("scroll", l), null == n || n.addEventListener("scroll", l), null == c || c.addEventListener("scroll", l));
50970
51584
  let i = null;
50971
- xe.resize ? window.addEventListener("resize", r) : V && le.current && (i = autoUpdate(V, le.current, We, {
51585
+ Re.resize ? window.addEventListener("resize", l) : J && ne.current && (i = autoUpdate(J, ne.current, Ve, {
50972
51586
  ancestorResize: !0,
50973
51587
  elementResize: !0,
50974
51588
  layoutShift: !0
50975
51589
  }));
50976
51590
  const s = e => {
50977
- "Escape" === e.key && Ne(!1);
51591
+ "Escape" === e.key && xe(!1);
50978
51592
  };
50979
- xe.escape && window.addEventListener("keydown", s), xe.clickOutsideAnchor && window.addEventListener("click", qe);
51593
+ Re.escape && window.addEventListener("keydown", s), Re.clickOutsideAnchor && window.addEventListener("click", qe);
50980
51594
  const a = [],
50981
51595
  u = e => {
50982
- ve || Ie(e);
51596
+ pe && (null == e ? void 0 : e.target) === J || je(e);
50983
51597
  },
50984
- p = () => {
50985
- ve && Be();
51598
+ p = e => {
51599
+ pe && (null == e ? void 0 : e.target) === J && Be();
50986
51600
  },
50987
51601
  v = ["mouseenter", "mouseleave", "focus", "blur"],
50988
51602
  m = ["click", "dblclick", "mousedown", "mouseup"];
50989
51603
  Object.entries(Ce).forEach(([e, t]) => {
50990
51604
  t && (v.includes(e) ? a.push({
50991
51605
  event: e,
50992
- listener: He
51606
+ listener: We
50993
51607
  }) : m.includes(e) && a.push({
50994
51608
  event: e,
50995
51609
  listener: u
50996
51610
  }));
50997
- }), Object.entries(Re).forEach(([e, t]) => {
51611
+ }), Object.entries(Le).forEach(([e, t]) => {
50998
51612
  t && (v.includes(e) ? a.push({
50999
51613
  event: e,
51000
- listener: Me
51614
+ listener: Pe
51001
51615
  }) : m.includes(e) && a.push({
51002
51616
  event: e,
51003
51617
  listener: p
51004
51618
  }));
51005
- }), O && a.push({
51006
- event: "mousemove",
51619
+ }), k && a.push({
51620
+ event: "pointermove",
51007
51621
  listener: De
51008
51622
  });
51009
51623
  const y = () => {
51010
- _e.current = !0;
51624
+ ge.current = !0;
51011
51625
  },
51012
51626
  h = () => {
51013
- _e.current = !1, Be();
51627
+ ge.current = !1, Be();
51014
51628
  };
51015
- return R && !Le && (null === (e = le.current) || void 0 === e || e.addEventListener("mouseenter", y), null === (t = le.current) || void 0 === t || t.addEventListener("mouseleave", h)), a.forEach(({
51629
+ return N && !ke && (null === (e = ne.current) || void 0 === e || e.addEventListener("mouseenter", y), null === (t = ne.current) || void 0 === t || t.addEventListener("mouseleave", h)), a.forEach(({
51016
51630
  event: e,
51017
51631
  listener: t
51018
51632
  }) => {
51019
51633
  o.forEach(o => {
51020
- var l;
51021
- null === (l = o.current) || void 0 === l || l.addEventListener(e, t);
51634
+ var r;
51635
+ null === (r = o.current) || void 0 === r || r.addEventListener(e, t);
51022
51636
  });
51023
51637
  }), () => {
51024
51638
  var e, t;
51025
- xe.scroll && (window.removeEventListener("scroll", r), null == n || n.removeEventListener("scroll", r), null == c || c.removeEventListener("scroll", r)), xe.resize ? window.removeEventListener("resize", r) : null == i || i(), xe.clickOutsideAnchor && window.removeEventListener("click", qe), xe.escape && window.removeEventListener("keydown", s), R && !Le && (null === (e = le.current) || void 0 === e || e.removeEventListener("mouseenter", y), null === (t = le.current) || void 0 === t || t.removeEventListener("mouseleave", h)), a.forEach(({
51639
+ Re.scroll && (window.removeEventListener("scroll", l), null == n || n.removeEventListener("scroll", l), null == c || c.removeEventListener("scroll", l)), Re.resize ? window.removeEventListener("resize", l) : null == i || i(), Re.clickOutsideAnchor && window.removeEventListener("click", qe), Re.escape && window.removeEventListener("keydown", s), N && !ke && (null === (e = ne.current) || void 0 === e || e.removeEventListener("mouseenter", y), null === (t = ne.current) || void 0 === t || t.removeEventListener("mouseleave", h)), a.forEach(({
51026
51640
  event: e,
51027
51641
  listener: t
51028
51642
  }) => {
51029
51643
  o.forEach(o => {
51030
- var l;
51031
- null === (l = o.current) || void 0 === l || l.removeEventListener(e, t);
51644
+ var r;
51645
+ null === (r = o.current) || void 0 === r || r.removeEventListener(e, t);
51032
51646
  });
51033
51647
  });
51034
51648
  };
51035
- }, [V, We, fe, Ee, Ae, D, q, H, ke]), React.useEffect(() => {
51649
+ }, [J, Ve, me, Se, Ae, q, H, M, Te, A, O]), React.useEffect(() => {
51036
51650
  var e, t;
51037
- let o = null !== (t = null !== (e = null == he ? void 0 : he.anchorSelect) && void 0 !== e ? e : p) && void 0 !== t ? t : "";
51651
+ let o = null !== (t = null !== (e = null == ye ? void 0 : ye.anchorSelect) && void 0 !== e ? e : p) && void 0 !== t ? t : "";
51038
51652
  !o && r && (o = `[data-tooltip-id='${r}']`);
51039
51653
  const l = new MutationObserver(e => {
51040
51654
  const t = [],
51041
51655
  l = [];
51042
51656
  e.forEach(e => {
51043
51657
  if ("attributes" === e.type && "data-tooltip-id" === e.attributeName) {
51044
- e.target.getAttribute("data-tooltip-id") === r && t.push(e.target);
51658
+ e.target.getAttribute("data-tooltip-id") === r ? t.push(e.target) : e.oldValue === r && l.push(e.target);
51045
51659
  }
51046
51660
  if ("childList" === e.type) {
51047
- if (V) {
51661
+ if (J) {
51048
51662
  const t = [...e.removedNodes].filter(e => 1 === e.nodeType);
51049
51663
  if (o) try {
51050
51664
  l.push(...t.filter(e => e.matches(o))), l.push(...t.flatMap(e => [...e.querySelectorAll(o)]));
51051
51665
  } catch (e) {}
51052
51666
  t.some(e => {
51053
51667
  var t;
51054
- return !!(null === (t = null == e ? void 0 : e.contains) || void 0 === t ? void 0 : t.call(e, V)) && (ye(!1), Ne(!1), Z(null), ne.current && clearTimeout(ne.current), ce.current && clearTimeout(ce.current), !0);
51668
+ return !!(null === (t = null == e ? void 0 : e.contains) || void 0 === t ? void 0 : t.call(e, J)) && (fe(!1), xe(!1), Q(null), ie.current && clearTimeout(ie.current), se.current && clearTimeout(se.current), !0);
51055
51669
  });
51056
51670
  }
51057
51671
  if (o) try {
51058
- const l = [...e.addedNodes].filter(e => 1 === e.nodeType);
51059
- t.push(...l.filter(e => e.matches(o))), t.push(...l.flatMap(e => [...e.querySelectorAll(o)]));
51672
+ const r = [...e.addedNodes].filter(e => 1 === e.nodeType);
51673
+ t.push(...r.filter(e => e.matches(o))), t.push(...r.flatMap(e => [...e.querySelectorAll(o)]));
51060
51674
  } catch (e) {}
51061
51675
  }
51062
- }), (t.length || l.length) && Oe(e => [...e.filter(e => !l.includes(e)), ...t]);
51676
+ }), (t.length || l.length) && _e(e => [...e.filter(e => !l.includes(e)), ...t]);
51063
51677
  });
51064
51678
  return l.observe(document.body, {
51065
51679
  childList: !0,
51066
51680
  subtree: !0,
51067
51681
  attributes: !0,
51068
- attributeFilter: ["data-tooltip-id"]
51682
+ attributeFilter: ["data-tooltip-id"],
51683
+ attributeOldValue: !0
51069
51684
  }), () => {
51070
51685
  l.disconnect();
51071
51686
  };
51072
- }, [r, p, null == he ? void 0 : he.anchorSelect, V]), React.useEffect(() => {
51073
- We();
51074
- }, [We]), React.useEffect(() => {
51687
+ }, [r, p, null == ye ? void 0 : ye.anchorSelect, J]), React.useEffect(() => {
51688
+ Ve();
51689
+ }, [Ve]), React.useEffect(() => {
51075
51690
  if (!(null == X ? void 0 : X.current)) return () => null;
51076
51691
  const e = new ResizeObserver(() => {
51077
- We();
51692
+ setTimeout(() => Ve());
51078
51693
  });
51079
51694
  return e.observe(X.current), () => {
51080
51695
  e.disconnect();
@@ -51083,21 +51698,23 @@ const I = ({
51083
51698
  var e;
51084
51699
  const t = document.querySelector(`[id='${d}']`),
51085
51700
  o = [...Ae, t];
51086
- V && o.includes(V) || Z(null !== (e = Ae[0]) && void 0 !== e ? e : t);
51087
- }, [d, Ae, V]), React.useEffect(() => () => {
51088
- ne.current && clearTimeout(ne.current), ce.current && clearTimeout(ce.current);
51089
- }, []), React.useEffect(() => {
51701
+ J && o.includes(J) || Q(null !== (e = Ae[0]) && void 0 !== e ? e : t);
51702
+ }, [d, Ae, J]), React.useEffect(() => (G && xe(!0), () => {
51703
+ ie.current && clearTimeout(ie.current), se.current && clearTimeout(se.current);
51704
+ }), []), React.useEffect(() => {
51090
51705
  var e;
51091
- let t = null !== (e = null == he ? void 0 : he.anchorSelect) && void 0 !== e ? e : p;
51706
+ let t = null !== (e = null == ye ? void 0 : ye.anchorSelect) && void 0 !== e ? e : p;
51092
51707
  if (!t && r && (t = `[data-tooltip-id='${r}']`), t) try {
51093
51708
  const e = Array.from(document.querySelectorAll(t));
51094
- Oe(e);
51709
+ _e(e);
51095
51710
  } catch (e) {
51096
- Oe([]);
51711
+ _e([]);
51097
51712
  }
51098
- }, [r, p, null == he ? void 0 : he.anchorSelect]);
51099
- const Pe = null !== (oe = null == he ? void 0 : he.content) && void 0 !== oe ? oe : U,
51100
- Fe = ve && Object.keys(ae).length > 0;
51713
+ }, [r, p, null == ye ? void 0 : ye.anchorSelect]), React.useEffect(() => {
51714
+ ie.current && (clearTimeout(ie.current), $e(A));
51715
+ }, [A]);
51716
+ const Fe = null !== (le = null == ye ? void 0 : ye.content) && void 0 !== le ? le : U,
51717
+ Ke = pe && Object.keys(ue.tooltipStyles).length > 0;
51101
51718
  return React.useImperativeHandle(t, () => ({
51102
51719
  open: e => {
51103
51720
  if (null == e ? void 0 : e.anchorSelect) try {
@@ -51105,50 +51722,49 @@ const I = ({
51105
51722
  } catch (t) {
51106
51723
  return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`);
51107
51724
  }
51108
- we(null != e ? e : null), (null == e ? void 0 : e.delay) ? $e(e.delay) : Ne(!0);
51725
+ he(null != e ? e : null), (null == e ? void 0 : e.delay) ? $e(e.delay) : xe(!0);
51109
51726
  },
51110
51727
  close: e => {
51111
- (null == e ? void 0 : e.delay) ? je(e.delay) : Ne(!1);
51728
+ (null == e ? void 0 : e.delay) ? Ie(e.delay) : xe(!1);
51112
51729
  },
51113
- activeAnchor: V,
51114
- place: ie,
51115
- isOpen: Boolean(fe && !T && Pe && Fe)
51116
- })), fe && !T && Pe ? React__default["default"].createElement(E, {
51730
+ activeAnchor: J,
51731
+ place: ue.place,
51732
+ isOpen: Boolean(me && !R && Fe && Ke)
51733
+ })), me && !R && Fe ? React__default["default"].createElement(E, {
51117
51734
  id: r,
51118
- role: te,
51119
- className: classnames("react-tooltip", $.tooltip, j.tooltip, j[u], n, `react-tooltip__place-${ie}`, $[Fe ? "show" : "closing"], Fe ? "react-tooltip__show" : "react-tooltip__closing", "fixed" === b && $.fixed, R && $.clickable),
51735
+ role: re,
51736
+ className: classnames("react-tooltip", B.tooltip, z.tooltip, z[u], c, `react-tooltip__place-${ue.place}`, B[Ke ? "show" : "closing"], Ke ? "react-tooltip__show" : "react-tooltip__closing", "fixed" === b && B.fixed, N && B.clickable),
51120
51737
  onTransitionEnd: e => {
51121
- ve || "opacity" !== e.propertyName || (ye(!1), we(null), null == K || K());
51738
+ ae.current && clearTimeout(ae.current), pe || "opacity" !== e.propertyName || (fe(!1), he(null), null == K || K());
51122
51739
  },
51123
51740
  style: {
51124
- ...W,
51125
- ...ae,
51126
- opacity: void 0 !== Q && Fe ? Q : void 0
51741
+ ...P,
51742
+ ...ue.tooltipStyles,
51743
+ opacity: void 0 !== te && Ke ? te : void 0
51127
51744
  },
51128
- ref: le
51129
- }, Pe, React__default["default"].createElement(E, {
51130
- className: classnames("react-tooltip-arrow", $.arrow, j.arrow, s, L && $.noArrow),
51745
+ ref: ne
51746
+ }, Fe, React__default["default"].createElement(E, {
51747
+ className: classnames("react-tooltip-arrow", B.arrow, z.arrow, i, x && B.noArrow),
51131
51748
  style: {
51132
- ...de,
51133
- background: ee ? `linear-gradient(to right bottom, transparent 50%, ${ee} 50%)` : void 0
51749
+ ...ue.tooltipArrowStyles,
51750
+ background: oe ? `linear-gradient(to right bottom, transparent 50%, ${oe} 50%)` : void 0
51134
51751
  },
51135
- ref: re
51752
+ ref: ce
51136
51753
  })) : null;
51137
51754
  },
51138
- B = ({
51755
+ q = ({
51139
51756
  content: t
51140
51757
  }) => React__default["default"].createElement("span", {
51141
51758
  dangerouslySetInnerHTML: {
51142
51759
  __html: t
51143
51760
  }
51144
51761
  }),
51145
- z = (e, t) => !("CSS" in window && "supports" in window.CSS) || window.CSS.supports(e, t),
51146
- D = React__default["default"].forwardRef(({
51762
+ H = React__default["default"].forwardRef(({
51147
51763
  id: t,
51148
- anchorId: l,
51149
- anchorSelect: r,
51150
- content: n,
51151
- html: s,
51764
+ anchorId: r,
51765
+ anchorSelect: n,
51766
+ content: c,
51767
+ html: i,
51152
51768
  render: a,
51153
51769
  className: u,
51154
51770
  classNameArrow: d,
@@ -51163,160 +51779,161 @@ const I = ({
51163
51779
  middlewares: E,
51164
51780
  delayShow: g = 0,
51165
51781
  delayHide: _ = 0,
51166
- float: A = !1,
51167
- hidden: O = !1,
51168
- noArrow: T = !1,
51169
- clickable: L = !1,
51170
- closeOnEsc: C = !1,
51782
+ float: O = !1,
51783
+ hidden: T = !1,
51784
+ noArrow: k = !1,
51785
+ clickable: C = !1,
51786
+ closeOnEsc: L = !1,
51171
51787
  closeOnScroll: R = !1,
51172
51788
  closeOnResize: x = !1,
51173
51789
  openEvents: N,
51174
51790
  closeEvents: $,
51175
51791
  globalCloseEvents: j,
51176
- imperativeModeOnly: D = !1,
51177
- style: q,
51792
+ imperativeModeOnly: B = !1,
51793
+ style: z,
51178
51794
  position: H,
51179
51795
  isOpen: M,
51180
- disableStyleInjection: W = !1,
51181
- border: P,
51796
+ defaultIsOpen: W = !1,
51797
+ disableStyleInjection: P = !1,
51798
+ border: V,
51182
51799
  opacity: F,
51183
51800
  arrowColor: K,
51184
51801
  setIsOpen: U,
51185
51802
  afterShow: X,
51186
51803
  afterHide: Y,
51187
51804
  role: G = "tooltip"
51188
- }, V) => {
51189
- const [Z, J] = React.useState(n),
51190
- [Q, ee] = React.useState(s),
51191
- [te, oe] = React.useState(v),
51192
- [le, re] = React.useState(p),
51193
- [ne, ce] = React.useState(m),
51194
- [ie, se] = React.useState(g),
51195
- [ae, ue] = React.useState(_),
51196
- [de, pe] = React.useState(A),
51197
- [ve, me] = React.useState(O),
51198
- [fe, ye] = React.useState(f),
51199
- [he, we] = React.useState(w),
51200
- [be, Se] = React.useState(S),
51201
- [Ee, ge] = React.useState(null),
51202
- [_e, Ae] = React.useState(null),
51203
- Oe = React.useRef(W),
51805
+ }, Z) => {
51806
+ const [J, Q] = React.useState(c),
51807
+ [ee, te] = React.useState(i),
51808
+ [oe, re] = React.useState(v),
51809
+ [le, ne] = React.useState(p),
51810
+ [ce, ie] = React.useState(m),
51811
+ [se, ae] = React.useState(g),
51812
+ [ue, de] = React.useState(_),
51813
+ [pe, ve] = React.useState(O),
51814
+ [me, fe] = React.useState(T),
51815
+ [ye, he] = React.useState(f),
51816
+ [we, be] = React.useState(w),
51817
+ [Se, Ee] = React.useState(S),
51818
+ [ge, Ae] = React.useState(null),
51819
+ [_e, Oe] = React.useState(null),
51820
+ Te = React.useRef(P),
51204
51821
  {
51205
- anchorRefs: Te,
51206
- activeAnchor: ke
51207
- } = k(t),
51822
+ anchorRefs: ke,
51823
+ activeAnchor: Ce
51824
+ } = I(t),
51208
51825
  Le = e => null == e ? void 0 : e.getAttributeNames().reduce((t, o) => {
51209
- var l;
51826
+ var r;
51210
51827
  if (o.startsWith("data-tooltip-")) {
51211
- t[o.replace(/^data-tooltip-/, "")] = null !== (l = null == e ? void 0 : e.getAttribute(o)) && void 0 !== l ? l : null;
51828
+ t[o.replace(/^data-tooltip-/, "")] = null !== (r = null == e ? void 0 : e.getAttribute(o)) && void 0 !== r ? r : null;
51212
51829
  }
51213
51830
  return t;
51214
51831
  }, {}),
51215
- Ce = e => {
51832
+ Re = e => {
51216
51833
  const t = {
51217
51834
  place: e => {
51218
51835
  var t;
51219
- oe(null !== (t = e) && void 0 !== t ? t : v);
51836
+ re(null !== (t = e) && void 0 !== t ? t : v);
51220
51837
  },
51221
51838
  content: e => {
51222
- J(null != e ? e : n);
51839
+ Q(null != e ? e : c);
51223
51840
  },
51224
51841
  html: e => {
51225
- ee(null != e ? e : s);
51842
+ te(null != e ? e : i);
51226
51843
  },
51227
51844
  variant: e => {
51228
51845
  var t;
51229
- re(null !== (t = e) && void 0 !== t ? t : p);
51846
+ ne(null !== (t = e) && void 0 !== t ? t : p);
51230
51847
  },
51231
51848
  offset: e => {
51232
- ce(null === e ? m : Number(e));
51849
+ ie(null === e ? m : Number(e));
51233
51850
  },
51234
51851
  wrapper: e => {
51235
51852
  var t;
51236
- ye(null !== (t = e) && void 0 !== t ? t : f);
51853
+ he(null !== (t = e) && void 0 !== t ? t : f);
51237
51854
  },
51238
51855
  events: e => {
51239
51856
  const t = null == e ? void 0 : e.split(" ");
51240
- we(null != t ? t : w);
51857
+ be(null != t ? t : w);
51241
51858
  },
51242
51859
  "position-strategy": e => {
51243
51860
  var t;
51244
- Se(null !== (t = e) && void 0 !== t ? t : S);
51861
+ Ee(null !== (t = e) && void 0 !== t ? t : S);
51245
51862
  },
51246
51863
  "delay-show": e => {
51247
- se(null === e ? g : Number(e));
51864
+ ae(null === e ? g : Number(e));
51248
51865
  },
51249
51866
  "delay-hide": e => {
51250
- ue(null === e ? _ : Number(e));
51867
+ de(null === e ? _ : Number(e));
51251
51868
  },
51252
51869
  float: e => {
51253
- pe(null === e ? A : "true" === e);
51870
+ ve(null === e ? O : "true" === e);
51254
51871
  },
51255
51872
  hidden: e => {
51256
- me(null === e ? O : "true" === e);
51873
+ fe(null === e ? T : "true" === e);
51257
51874
  },
51258
51875
  "class-name": e => {
51259
- ge(e);
51876
+ Ae(e);
51260
51877
  }
51261
51878
  };
51262
51879
  Object.values(t).forEach(e => e(null)), Object.entries(e).forEach(([e, o]) => {
51263
- var l;
51264
- null === (l = t[e]) || void 0 === l || l.call(t, o);
51880
+ var r;
51881
+ null === (r = t[e]) || void 0 === r || r.call(t, o);
51265
51882
  });
51266
51883
  };
51267
51884
  React.useEffect(() => {
51268
- J(n);
51269
- }, [n]), React.useEffect(() => {
51270
- ee(s);
51271
- }, [s]), React.useEffect(() => {
51272
- oe(v);
51885
+ Q(c);
51886
+ }, [c]), React.useEffect(() => {
51887
+ te(i);
51888
+ }, [i]), React.useEffect(() => {
51889
+ re(v);
51273
51890
  }, [v]), React.useEffect(() => {
51274
- re(p);
51891
+ ne(p);
51275
51892
  }, [p]), React.useEffect(() => {
51276
- ce(m);
51893
+ ie(m);
51277
51894
  }, [m]), React.useEffect(() => {
51278
- se(g);
51895
+ ae(g);
51279
51896
  }, [g]), React.useEffect(() => {
51280
- ue(_);
51897
+ de(_);
51281
51898
  }, [_]), React.useEffect(() => {
51282
- pe(A);
51283
- }, [A]), React.useEffect(() => {
51284
- me(O);
51899
+ ve(O);
51285
51900
  }, [O]), React.useEffect(() => {
51286
- Se(S);
51901
+ fe(T);
51902
+ }, [T]), React.useEffect(() => {
51903
+ Ee(S);
51287
51904
  }, [S]), React.useEffect(() => {
51288
- Oe.current !== W && console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");
51289
- }, [W]), React.useEffect(() => {
51905
+ Te.current !== P && console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");
51906
+ }, [P]), React.useEffect(() => {
51290
51907
  "undefined" != typeof window && window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles", {
51291
51908
  detail: {
51292
- disableCore: "core" === W,
51293
- disableBase: W
51909
+ disableCore: "core" === P,
51910
+ disableBase: P
51294
51911
  }
51295
51912
  }));
51296
51913
  }, []), React.useEffect(() => {
51297
51914
  var e;
51298
- const o = new Set(Te);
51299
- let n = r;
51300
- if (!n && t && (n = `[data-tooltip-id='${t}']`), n) try {
51301
- document.querySelectorAll(n).forEach(e => {
51915
+ const o = new Set(ke);
51916
+ let l = n;
51917
+ if (!l && t && (l = `[data-tooltip-id='${t}']`), l) try {
51918
+ document.querySelectorAll(l).forEach(e => {
51302
51919
  o.add({
51303
51920
  current: e
51304
51921
  });
51305
51922
  });
51306
51923
  } catch (e) {
51307
- console.warn(`[react-tooltip] "${n}" is not a valid CSS selector`);
51924
+ console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`);
51308
51925
  }
51309
- const c = document.querySelector(`[id='${l}']`);
51926
+ const c = document.querySelector(`[id='${r}']`);
51310
51927
  if (c && o.add({
51311
51928
  current: c
51312
51929
  }), !o.size) return () => null;
51313
- const i = null !== (e = null != _e ? _e : c) && void 0 !== e ? e : ke.current,
51930
+ const i = null !== (e = null != _e ? _e : c) && void 0 !== e ? e : Ce.current,
51314
51931
  s = new MutationObserver(e => {
51315
51932
  e.forEach(e => {
51316
51933
  var t;
51317
51934
  if (!i || "attributes" !== e.type || !(null === (t = e.attributeName) || void 0 === t ? void 0 : t.startsWith("data-tooltip-"))) return;
51318
51935
  const o = Le(i);
51319
- Ce(o);
51936
+ Re(o);
51320
51937
  });
51321
51938
  }),
51322
51939
  a = {
@@ -51326,74 +51943,75 @@ const I = ({
51326
51943
  };
51327
51944
  if (i) {
51328
51945
  const e = Le(i);
51329
- Ce(e), s.observe(i, a);
51946
+ Re(e), s.observe(i, a);
51330
51947
  }
51331
51948
  return () => {
51332
51949
  s.disconnect();
51333
51950
  };
51334
- }, [Te, ke, _e, l, r]), React.useEffect(() => {
51335
- (null == q ? void 0 : q.border) && console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."), P && !z("border", `${P}`) && console.warn(`[react-tooltip] "${P}" is not a valid \`border\`.`), (null == q ? void 0 : q.opacity) && console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."), F && !z("opacity", `${F}`) && console.warn(`[react-tooltip] "${F}" is not a valid \`opacity\`.`);
51951
+ }, [ke, Ce, _e, r, n]), React.useEffect(() => {
51952
+ (null == z ? void 0 : z.border) && console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."), V && !A("border", `${V}`) && console.warn(`[react-tooltip] "${V}" is not a valid \`border\`.`), (null == z ? void 0 : z.opacity) && console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."), F && !A("opacity", `${F}`) && console.warn(`[react-tooltip] "${F}" is not a valid \`opacity\`.`);
51336
51953
  }, []);
51337
- let Re = h;
51338
- const xe = React.useRef(null);
51954
+ let xe = h;
51955
+ const Ne = React.useRef(null);
51339
51956
  if (a) {
51340
51957
  const t = a({
51341
- content: null != Z ? Z : null,
51958
+ content: (null == _e ? void 0 : _e.getAttribute("data-tooltip-content")) || J || null,
51342
51959
  activeAnchor: _e
51343
51960
  });
51344
- Re = t ? React__default["default"].createElement("div", {
51345
- ref: xe,
51961
+ xe = t ? React__default["default"].createElement("div", {
51962
+ ref: Ne,
51346
51963
  className: "react-tooltip-content-wrapper"
51347
51964
  }, t) : null;
51348
- } else Z && (Re = Z);
51349
- Q && (Re = React__default["default"].createElement(B, {
51350
- content: Q
51965
+ } else J && (xe = J);
51966
+ ee && (xe = React__default["default"].createElement(q, {
51967
+ content: ee
51351
51968
  }));
51352
- const Ne = {
51353
- forwardRef: V,
51969
+ const $e = {
51970
+ forwardRef: Z,
51354
51971
  id: t,
51355
- anchorId: l,
51356
- anchorSelect: r,
51357
- className: classnames(u, Ee),
51972
+ anchorId: r,
51973
+ anchorSelect: n,
51974
+ className: classnames(u, ge),
51358
51975
  classNameArrow: d,
51359
- content: Re,
51360
- contentWrapperRef: xe,
51361
- place: te,
51976
+ content: xe,
51977
+ contentWrapperRef: Ne,
51978
+ place: oe,
51362
51979
  variant: le,
51363
- offset: ne,
51364
- wrapper: fe,
51365
- events: he,
51980
+ offset: ce,
51981
+ wrapper: ye,
51982
+ events: we,
51366
51983
  openOnClick: b,
51367
- positionStrategy: be,
51984
+ positionStrategy: Se,
51368
51985
  middlewares: E,
51369
- delayShow: ie,
51370
- delayHide: ae,
51371
- float: de,
51372
- hidden: ve,
51373
- noArrow: T,
51374
- clickable: L,
51375
- closeOnEsc: C,
51986
+ delayShow: se,
51987
+ delayHide: ue,
51988
+ float: pe,
51989
+ hidden: me,
51990
+ noArrow: k,
51991
+ clickable: C,
51992
+ closeOnEsc: L,
51376
51993
  closeOnScroll: R,
51377
51994
  closeOnResize: x,
51378
51995
  openEvents: N,
51379
51996
  closeEvents: $,
51380
51997
  globalCloseEvents: j,
51381
- imperativeModeOnly: D,
51382
- style: q,
51998
+ imperativeModeOnly: B,
51999
+ style: z,
51383
52000
  position: H,
51384
52001
  isOpen: M,
51385
- border: P,
52002
+ defaultIsOpen: W,
52003
+ border: V,
51386
52004
  opacity: F,
51387
52005
  arrowColor: K,
51388
52006
  setIsOpen: U,
51389
52007
  afterShow: X,
51390
52008
  afterHide: Y,
51391
52009
  activeAnchor: _e,
51392
- setActiveAnchor: e => Ae(e),
52010
+ setActiveAnchor: e => Oe(e),
51393
52011
  role: G
51394
52012
  };
51395
- return React__default["default"].createElement(I, {
51396
- ...Ne
52013
+ return React__default["default"].createElement(D, {
52014
+ ...$e
51397
52015
  });
51398
52016
  });
51399
52017
  "undefined" != typeof window && window.addEventListener("react-tooltip-inject-styles", e => {
@@ -51497,7 +52115,7 @@ function ContextualHelp(_ref) {
51497
52115
  color: "#1d5ab9",
51498
52116
  fontSize: "22px"
51499
52117
  }
51500
- })), /*#__PURE__*/React__default["default"].createElement(D, {
52118
+ })), /*#__PURE__*/React__default["default"].createElement(H, {
51501
52119
  anchorSelect: "#helpSnippet1",
51502
52120
  clickable: true,
51503
52121
  className: "utilities_ContextualHelp_ContextualHelp--snippet",