@copart/ops-tool-kit 1.11.3-alpha.1 → 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-alpha.1";
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,
@@ -49683,15 +50018,27 @@ const offset = function (options) {
49683
50018
  name: 'offset',
49684
50019
  options,
49685
50020
  async fn(state) {
50021
+ var _middlewareData$offse, _middlewareData$arrow;
49686
50022
  const {
49687
50023
  x,
49688
- y
50024
+ y,
50025
+ placement,
50026
+ middlewareData
49689
50027
  } = state;
49690
50028
  const diffCoords = await convertValueToCoords(state, options);
50029
+
50030
+ // If the placement is the same and the arrow caused an alignment offset
50031
+ // then we don't need to change the positioning coordinates.
50032
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
50033
+ return {};
50034
+ }
49691
50035
  return {
49692
50036
  x: x + diffCoords.x,
49693
50037
  y: y + diffCoords.y,
49694
- data: diffCoords
50038
+ data: {
50039
+ ...diffCoords,
50040
+ placement
50041
+ }
49695
50042
  };
49696
50043
  }
49697
50044
  };
@@ -49702,7 +50049,7 @@ const offset = function (options) {
49702
50049
  * keep it in view when it will overflow the clipping boundary.
49703
50050
  * @see https://floating-ui.com/docs/shift
49704
50051
  */
49705
- const shift = function (options) {
50052
+ const shift$1 = function (options) {
49706
50053
  if (options === void 0) {
49707
50054
  options = {};
49708
50055
  }
@@ -49770,6 +50117,156 @@ const shift = function (options) {
49770
50117
  }
49771
50118
  };
49772
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
+ };
49773
50270
 
49774
50271
  function getNodeName(node) {
49775
50272
  if (isNode$1(node)) {
@@ -49782,7 +50279,7 @@ function getNodeName(node) {
49782
50279
  }
49783
50280
  function getWindow(node) {
49784
50281
  var _node$ownerDocument;
49785
- 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;
49786
50283
  }
49787
50284
  function getDocumentElement(node) {
49788
50285
  var _ref;
@@ -49995,8 +50492,9 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
49995
50492
  if (domElement) {
49996
50493
  const win = getWindow(domElement);
49997
50494
  const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
49998
- let currentIFrame = win.frameElement;
49999
- while (currentIFrame && offsetParent && offsetWin !== win) {
50495
+ let currentWin = win;
50496
+ let currentIFrame = currentWin.frameElement;
50497
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
50000
50498
  const iframeScale = getScale(currentIFrame);
50001
50499
  const iframeRect = currentIFrame.getBoundingClientRect();
50002
50500
  const css = getComputedStyle$1(currentIFrame);
@@ -50008,7 +50506,8 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
50008
50506
  height *= iframeScale.y;
50009
50507
  x += left;
50010
50508
  y += top;
50011
- currentIFrame = getWindow(currentIFrame).frameElement;
50509
+ currentWin = getWindow(currentIFrame);
50510
+ currentIFrame = currentWin.frameElement;
50012
50511
  }
50013
50512
  }
50014
50513
  return rectToClientRect({
@@ -50018,15 +50517,27 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
50018
50517
  y
50019
50518
  });
50020
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
+ }
50021
50530
  function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
50022
50531
  let {
50532
+ elements,
50023
50533
  rect,
50024
50534
  offsetParent,
50025
50535
  strategy
50026
50536
  } = _ref;
50027
- const isOffsetParentAnElement = isHTMLElement(offsetParent);
50537
+ const isFixed = strategy === 'fixed';
50028
50538
  const documentElement = getDocumentElement(offsetParent);
50029
- if (offsetParent === documentElement) {
50539
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
50540
+ if (offsetParent === documentElement || topLayer && isFixed) {
50030
50541
  return rect;
50031
50542
  }
50032
50543
  let scroll = {
@@ -50035,7 +50546,8 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
50035
50546
  };
50036
50547
  let scale = createCoords(1);
50037
50548
  const offsets = createCoords(0);
50038
- if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
50549
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
50550
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
50039
50551
  if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
50040
50552
  scroll = getNodeScroll(offsetParent);
50041
50553
  }
@@ -50212,7 +50724,14 @@ function getClippingRect(_ref) {
50212
50724
  };
50213
50725
  }
50214
50726
  function getDimensions(element) {
50215
- return getCssDimensions(element);
50727
+ const {
50728
+ width,
50729
+ height
50730
+ } = getCssDimensions(element);
50731
+ return {
50732
+ width,
50733
+ height
50734
+ };
50216
50735
  }
50217
50736
  function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
50218
50737
  const isOffsetParentAnElement = isHTMLElement(offsetParent);
@@ -50236,9 +50755,11 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
50236
50755
  offsets.x = getWindowScrollBarX(documentElement);
50237
50756
  }
50238
50757
  }
50758
+ const x = rect.left + scroll.scrollLeft - offsets.x;
50759
+ const y = rect.top + scroll.scrollTop - offsets.y;
50239
50760
  return {
50240
- x: rect.left + scroll.scrollLeft - offsets.x,
50241
- y: rect.top + scroll.scrollTop - offsets.y,
50761
+ x,
50762
+ y,
50242
50763
  width: rect.width,
50243
50764
  height: rect.height
50244
50765
  };
@@ -50257,7 +50778,7 @@ function getTrueOffsetParent(element, polyfill) {
50257
50778
  // such as table ancestors and cross browser bugs.
50258
50779
  function getOffsetParent(element, polyfill) {
50259
50780
  const window = getWindow(element);
50260
- if (!isHTMLElement(element)) {
50781
+ if (!isHTMLElement(element) || isTopLayer(element)) {
50261
50782
  return window;
50262
50783
  }
50263
50784
  let offsetParent = getTrueOffsetParent(element, polyfill);
@@ -50269,20 +50790,15 @@ function getOffsetParent(element, polyfill) {
50269
50790
  }
50270
50791
  return offsetParent || getContainingBlock(element) || window;
50271
50792
  }
50272
- const getElementRects = async function (_ref) {
50273
- let {
50274
- reference,
50275
- floating,
50276
- strategy
50277
- } = _ref;
50793
+ const getElementRects = async function (data) {
50278
50794
  const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
50279
50795
  const getDimensionsFn = this.getDimensions;
50280
50796
  return {
50281
- reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
50797
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
50282
50798
  floating: {
50283
50799
  x: 0,
50284
50800
  y: 0,
50285
- ...(await getDimensionsFn(floating))
50801
+ ...(await getDimensionsFn(data.floating))
50286
50802
  }
50287
50803
  };
50288
50804
  };
@@ -50308,8 +50824,9 @@ function observeMove(element, onMove) {
50308
50824
  let timeoutId;
50309
50825
  const root = getDocumentElement(element);
50310
50826
  function cleanup() {
50827
+ var _io;
50311
50828
  clearTimeout(timeoutId);
50312
- io && io.disconnect();
50829
+ (_io = io) == null || _io.disconnect();
50313
50830
  io = null;
50314
50831
  }
50315
50832
  function refresh(skip, threshold) {
@@ -50415,7 +50932,8 @@ function autoUpdate(reference, floating, update, options) {
50415
50932
  resizeObserver.unobserve(floating);
50416
50933
  cancelAnimationFrame(reobserveFrame);
50417
50934
  reobserveFrame = requestAnimationFrame(() => {
50418
- resizeObserver && resizeObserver.observe(floating);
50935
+ var _resizeObserver;
50936
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
50419
50937
  });
50420
50938
  }
50421
50939
  update();
@@ -50440,12 +50958,13 @@ function autoUpdate(reference, floating, update, options) {
50440
50958
  }
50441
50959
  update();
50442
50960
  return () => {
50961
+ var _resizeObserver2;
50443
50962
  ancestors.forEach(ancestor => {
50444
50963
  ancestorScroll && ancestor.removeEventListener('scroll', update);
50445
50964
  ancestorResize && ancestor.removeEventListener('resize', update);
50446
50965
  });
50447
- cleanupIo && cleanupIo();
50448
- resizeObserver && resizeObserver.disconnect();
50966
+ cleanupIo == null || cleanupIo();
50967
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
50449
50968
  resizeObserver = null;
50450
50969
  if (animationFrame) {
50451
50970
  cancelAnimationFrame(frameId);
@@ -50453,10 +50972,66 @@ function autoUpdate(reference, floating, update, options) {
50453
50972
  };
50454
50973
  }
50455
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
+
50456
51032
  /**
50457
51033
  * Computes the `x` and `y` coordinates that will place the floating element
50458
- * next to a reference element when it is given a certain CSS positioning
50459
- * strategy.
51034
+ * next to a given reference element.
50460
51035
  */
50461
51036
  const computePosition = (reference, floating, options) => {
50462
51037
  // This caches the expensive `getClippingElementAncestors` function so that
@@ -50489,33 +51064,44 @@ var classnames = createCommonjsModule(function (module) {
50489
51064
 
50490
51065
  var hasOwn = {}.hasOwnProperty;
50491
51066
  function classNames() {
50492
- var classes = [];
51067
+ var classes = '';
50493
51068
  for (var i = 0; i < arguments.length; i++) {
50494
51069
  var arg = arguments[i];
50495
- if (!arg) continue;
50496
- var argType = typeof arg;
50497
- if (argType === 'string' || argType === 'number') {
50498
- classes.push(arg);
50499
- } else if (Array.isArray(arg)) {
50500
- if (arg.length) {
50501
- var inner = classNames.apply(null, arg);
50502
- if (inner) {
50503
- classes.push(inner);
50504
- }
50505
- }
50506
- } else if (argType === 'object') {
50507
- if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
50508
- classes.push(arg.toString());
50509
- continue;
50510
- }
50511
- for (var key in arg) {
50512
- if (hasOwn.call(arg, key) && arg[key]) {
50513
- classes.push(key);
50514
- }
50515
- }
51070
+ if (arg) {
51071
+ classes = appendClass(classes, parseValue(arg));
51072
+ }
51073
+ }
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);
50516
51093
  }
50517
51094
  }
50518
- return classes.join(' ');
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;
50519
51105
  }
50520
51106
  if (module.exports) {
50521
51107
  classNames.default = classNames;
@@ -50542,72 +51128,31 @@ function S({
50542
51128
  css: e,
50543
51129
  id: t = w,
50544
51130
  type: o = "base",
50545
- ref: l
51131
+ ref: r
50546
51132
  }) {
50547
- var r, n;
51133
+ var l, n;
50548
51134
  if (!e || "undefined" == typeof document || b[o]) return;
50549
- 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;
50550
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;
50551
- "core" === o && (t = h), l || (l = {});
51137
+ "core" === o && (t = h), r || (r = {});
50552
51138
  const {
50553
51139
  insertAt: c
50554
- } = l;
51140
+ } = r;
50555
51141
  if (document.getElementById(t)) return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);
50556
51142
  const i = document.head || document.getElementsByTagName("head")[0],
50557
51143
  s = document.createElement("style");
50558
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;
50559
51145
  }
50560
- const g = (e, t, o) => {
50561
- let l = null;
50562
- return function (...r) {
50563
- const n = () => {
50564
- l = null, o || e.apply(this, r);
50565
- };
50566
- o && !l && (e.apply(this, r), l = setTimeout(n, t)), o || (l && clearTimeout(l), l = setTimeout(n, t));
50567
- };
50568
- },
50569
- _ = "DEFAULT_TOOLTIP_ID",
50570
- A = {
50571
- anchorRefs: new Set(),
50572
- activeAnchor: {
50573
- current: null
50574
- },
50575
- attach: () => {},
50576
- detach: () => {},
50577
- setActiveAnchor: () => {}
50578
- },
50579
- O = React.createContext({
50580
- getTooltipData: () => A
50581
- });
50582
- function k(e = _) {
50583
- return React.useContext(O).getTooltipData(e);
50584
- }
50585
- const C = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect,
50586
- R = e => {
50587
- if (!(e instanceof HTMLElement || e instanceof SVGElement)) return !1;
50588
- const t = getComputedStyle(e);
50589
- return ["overflow", "overflow-x", "overflow-y"].some(e => {
50590
- const o = t.getPropertyValue(e);
50591
- return "auto" === o || "scroll" === o;
50592
- });
50593
- },
50594
- x = e => {
50595
- if (!e) return null;
50596
- let t = e.parentElement;
50597
- for (; t;) {
50598
- if (R(t)) return t;
50599
- t = t.parentElement;
50600
- }
50601
- return document.scrollingElement || document.documentElement;
50602
- },
50603
- N = async ({
51146
+ const g = async ({
50604
51147
  elementReference: e = null,
50605
51148
  tooltipReference: t = null,
50606
51149
  tooltipArrowReference: o = null,
50607
- place: l = "top",
50608
- offset: r = 10,
51150
+ place: r = "top",
51151
+ offset: l = 10,
50609
51152
  strategy: n = "absolute",
50610
- middlewares: c = [offset(Number(r)), flip(), shift({
51153
+ middlewares: c = [offset(Number(l)), flip({
51154
+ fallbackAxisSideDirection: "start"
51155
+ }), shift({
50611
51156
  padding: 5
50612
51157
  })],
50613
51158
  border: i
@@ -50615,28 +51160,28 @@ const C = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect
50615
51160
  if (!e) return {
50616
51161
  tooltipStyles: {},
50617
51162
  tooltipArrowStyles: {},
50618
- place: l
51163
+ place: r
50619
51164
  };
50620
51165
  if (null === t) return {
50621
51166
  tooltipStyles: {},
50622
51167
  tooltipArrowStyles: {},
50623
- place: l
51168
+ place: r
50624
51169
  };
50625
51170
  const s = c;
50626
51171
  return o ? (s.push(arrow({
50627
51172
  element: o,
50628
51173
  padding: 5
50629
51174
  })), computePosition(e, t, {
50630
- placement: l,
51175
+ placement: r,
50631
51176
  strategy: n,
50632
51177
  middleware: s
50633
51178
  }).then(({
50634
51179
  x: e,
50635
51180
  y: t,
50636
51181
  placement: o,
50637
- middlewareData: l
51182
+ middlewareData: r
50638
51183
  }) => {
50639
- var r, n;
51184
+ var l, n;
50640
51185
  const c = {
50641
51186
  left: `${e}px`,
50642
51187
  top: `${t}px`,
@@ -50645,17 +51190,17 @@ const C = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect
50645
51190
  {
50646
51191
  x: s,
50647
51192
  y: a
50648
- } = null !== (r = l.arrow) && void 0 !== r ? r : {
51193
+ } = null !== (l = r.arrow) && void 0 !== l ? l : {
50649
51194
  x: 0,
50650
51195
  y: 0
50651
51196
  },
50652
- d = null !== (n = {
51197
+ u = null !== (n = {
50653
51198
  top: "bottom",
50654
51199
  right: "left",
50655
51200
  bottom: "top",
50656
51201
  left: "right"
50657
51202
  }[o.split("-")[0]]) && void 0 !== n ? n : "bottom",
50658
- u = i && {
51203
+ d = i && {
50659
51204
  borderBottom: i,
50660
51205
  borderRight: i
50661
51206
  };
@@ -50671,8 +51216,8 @@ const C = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect
50671
51216
  top: null != a ? `${a}px` : "",
50672
51217
  right: "",
50673
51218
  bottom: "",
50674
- ...u,
50675
- [d]: `-${4 + p}px`
51219
+ ...d,
51220
+ [u]: `-${4 + p}px`
50676
51221
  },
50677
51222
  place: o
50678
51223
  };
@@ -50692,8 +51237,65 @@ const C = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect
50692
51237
  tooltipArrowStyles: {},
50693
51238
  place: o
50694
51239
  }));
50695
- };
50696
- 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 = {
50697
51299
  tooltip: "core-styles-module_tooltip__3vRRp",
50698
51300
  fixed: "core-styles-module_fixed__pcSol",
50699
51301
  arrow: "core-styles-module_arrow__cvMwQ",
@@ -50702,7 +51304,7 @@ var $ = {
50702
51304
  show: "core-styles-module_show__Nt9eE",
50703
51305
  closing: "core-styles-module_closing__sGnxF"
50704
51306
  },
50705
- j = {
51307
+ z = {
50706
51308
  tooltip: "styles-module_tooltip__mnnfp",
50707
51309
  arrow: "styles-module_arrow__K0L3T",
50708
51310
  dark: "styles-module_dark__xNqje",
@@ -50712,13 +51314,13 @@ var $ = {
50712
51314
  error: "styles-module_error__JvumD",
50713
51315
  info: "styles-module_info__BWdHW"
50714
51316
  };
50715
- const I = ({
51317
+ const D = ({
50716
51318
  forwardRef: t,
50717
51319
  id: r,
50718
- className: n,
50719
- classNameArrow: s,
50720
- variant: d = "dark",
50721
- anchorId: u,
51320
+ className: c,
51321
+ classNameArrow: i,
51322
+ variant: u = "dark",
51323
+ anchorId: d,
50722
51324
  anchorSelect: p,
50723
51325
  place: v = "top",
50724
51326
  offset: m = 10,
@@ -50727,58 +51329,62 @@ const I = ({
50727
51329
  positionStrategy: b = "absolute",
50728
51330
  middlewares: S,
50729
51331
  wrapper: E,
50730
- delayShow: _ = 0,
50731
- delayHide: A = 0,
50732
- float: O = !1,
50733
- hidden: T = !1,
50734
- noArrow: L = !1,
50735
- clickable: R = !1,
50736
- closeOnEsc: I = !1,
50737
- closeOnScroll: B = !1,
50738
- closeOnResize: z = !1,
50739
- openEvents: D,
50740
- closeEvents: q,
50741
- globalCloseEvents: H,
50742
- imperativeModeOnly: M,
50743
- style: W,
50744
- 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,
50745
51347
  afterShow: F,
50746
51348
  afterHide: K,
50747
51349
  content: U,
50748
51350
  contentWrapperRef: X,
50749
51351
  isOpen: Y,
50750
- setIsOpen: G,
50751
- activeAnchor: V,
50752
- setActiveAnchor: Z,
50753
- border: J,
50754
- opacity: Q,
50755
- arrowColor: ee,
50756
- 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"
50757
51360
  }) => {
50758
- var oe;
50759
- const le = React.useRef(null),
50760
- re = React.useRef(null),
50761
- ne = React.useRef(null),
51361
+ var le;
51362
+ const ne = React.useRef(null),
50762
51363
  ce = React.useRef(null),
50763
- [ie, se] = React.useState(v),
50764
- [ae, de] = React.useState({}),
50765
- [ue, pe] = React.useState({}),
50766
- [ve, me] = React.useState(!1),
50767
- [fe, ye] = React.useState(!1),
50768
- [he, we] = React.useState(null),
50769
- be = React.useRef(!1),
50770
- 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),
50771
51377
  {
50772
- anchorRefs: Ee,
50773
- setActiveAnchor: ge
50774
- } = k(r),
50775
- _e = React.useRef(!1),
50776
- [Ae, Oe] = React.useState([]),
50777
- Te = React.useRef(!1),
50778
- ke = w || h.includes("click"),
50779
- Le = ke || (null == D ? void 0 : D.click) || (null == D ? void 0 : D.dblclick) || (null == D ? void 0 : D.mousedown),
50780
- Ce = D ? {
50781
- ...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
50782
51388
  } : {
50783
51389
  mouseenter: !0,
50784
51390
  focus: !0,
@@ -50786,13 +51392,13 @@ const I = ({
50786
51392
  dblclick: !1,
50787
51393
  mousedown: !1
50788
51394
  };
50789
- !D && ke && Object.assign(Ce, {
51395
+ !q && Te && Object.assign(Ce, {
50790
51396
  mouseenter: !1,
50791
51397
  focus: !1,
50792
51398
  click: !0
50793
51399
  });
50794
- const Re = q ? {
50795
- ...q
51400
+ const Le = H ? {
51401
+ ...H
50796
51402
  } : {
50797
51403
  mouseleave: !0,
50798
51404
  blur: !0,
@@ -50800,85 +51406,98 @@ const I = ({
50800
51406
  dblclick: !1,
50801
51407
  mouseup: !1
50802
51408
  };
50803
- !q && ke && Object.assign(Re, {
51409
+ !H && Te && Object.assign(Le, {
50804
51410
  mouseleave: !1,
50805
51411
  blur: !1
50806
51412
  });
50807
- const xe = H ? {
50808
- ...H
51413
+ const Re = M ? {
51414
+ ...M
50809
51415
  } : {
50810
- escape: I || !1,
50811
- scroll: B || !1,
50812
- resize: z || !1,
50813
- clickOutsideAnchor: Le || !1
51416
+ escape: $ || !1,
51417
+ scroll: j || !1,
51418
+ resize: D || !1,
51419
+ clickOutsideAnchor: ke || !1
50814
51420
  };
50815
- M && (Object.assign(Ce, {
51421
+ W && (Object.assign(Ce, {
50816
51422
  mouseenter: !1,
50817
51423
  focus: !1,
50818
51424
  click: !1,
50819
51425
  dblclick: !1,
50820
51426
  mousedown: !1
50821
- }), Object.assign(Re, {
51427
+ }), Object.assign(Le, {
50822
51428
  mouseleave: !1,
50823
51429
  blur: !1,
50824
51430
  click: !1,
50825
51431
  dblclick: !1,
50826
51432
  mouseup: !1
50827
- }), Object.assign(xe, {
51433
+ }), Object.assign(Re, {
50828
51434
  escape: !1,
50829
51435
  scroll: !1,
50830
51436
  resize: !1,
50831
51437
  clickOutsideAnchor: !1
50832
- })), C(() => (Te.current = !0, () => {
50833
- Te.current = !1;
51438
+ })), L(() => (Oe.current = !0, () => {
51439
+ Oe.current = !1;
50834
51440
  }), []);
50835
- const Ne = e => {
50836
- Te.current && (e && ye(!0), setTimeout(() => {
50837
- 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));
50838
51444
  }, 10));
50839
51445
  };
50840
51446
  React.useEffect(() => {
50841
51447
  if (void 0 === Y) return () => null;
50842
- Y && ye(!0);
51448
+ Y && fe(!0);
50843
51449
  const e = setTimeout(() => {
50844
- me(Y);
51450
+ ve(Y);
50845
51451
  }, 10);
50846
51452
  return () => {
50847
51453
  clearTimeout(e);
50848
51454
  };
50849
51455
  }, [Y]), React.useEffect(() => {
50850
- ve !== be.current && (be.current = ve, ve && (null == F || F()));
50851
- }, [ve]);
50852
- const $e = (e = _) => {
50853
- ne.current && clearTimeout(ne.current), ne.current = setTimeout(() => {
50854
- 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);
50855
51474
  }, e);
50856
51475
  },
50857
- je = (e = A) => {
50858
- ce.current && clearTimeout(ce.current), ce.current = setTimeout(() => {
50859
- _e.current || Ne(!1);
51476
+ Ie = (e = O) => {
51477
+ se.current && clearTimeout(se.current), se.current = setTimeout(() => {
51478
+ ge.current || xe(!1);
50860
51479
  }, e);
50861
51480
  },
50862
- Ie = e => {
51481
+ je = e => {
50863
51482
  var t;
50864
51483
  if (!e) return;
50865
51484
  const o = null !== (t = e.currentTarget) && void 0 !== t ? t : e.target;
50866
- 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({
50867
51486
  current: null
50868
51487
  });
50869
- _ ? $e() : Ne(!0), Z(o), ge({
51488
+ A ? $e() : xe(!0), Q(o), Ee({
50870
51489
  current: o
50871
- }), ce.current && clearTimeout(ce.current);
51490
+ }), se.current && clearTimeout(se.current);
50872
51491
  },
50873
51492
  Be = () => {
50874
- 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);
50875
51494
  },
50876
51495
  ze = ({
50877
51496
  x: e,
50878
51497
  y: t
50879
51498
  }) => {
50880
51499
  var o;
50881
- const l = {
51500
+ const r = {
50882
51501
  getBoundingClientRect: () => ({
50883
51502
  x: e,
50884
51503
  y: t,
@@ -50890,17 +51509,17 @@ const I = ({
50890
51509
  bottom: t
50891
51510
  })
50892
51511
  };
50893
- N({
50894
- 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,
50895
51514
  offset: m,
50896
- elementReference: l,
50897
- tooltipReference: le.current,
50898
- tooltipArrowReference: re.current,
51515
+ elementReference: r,
51516
+ tooltipReference: ne.current,
51517
+ tooltipArrowReference: ce.current,
50899
51518
  strategy: b,
50900
51519
  middlewares: S,
50901
- border: J
51520
+ border: ee
50902
51521
  }).then(e => {
50903
- Object.keys(e.tooltipStyles).length && de(e.tooltipStyles), Object.keys(e.tooltipArrowStyles).length && pe(e.tooltipArrowStyles), se(e.place);
51522
+ Ne(e);
50904
51523
  });
50905
51524
  },
50906
51525
  De = e => {
@@ -50910,182 +51529,192 @@ const I = ({
50910
51529
  x: t.clientX,
50911
51530
  y: t.clientY
50912
51531
  };
50913
- ze(o), Se.current = o;
51532
+ ze(o), be.current = o;
50914
51533
  },
50915
51534
  qe = e => {
50916
51535
  var t;
50917
- if (!ve) return;
51536
+ if (!pe) return;
50918
51537
  const o = e.target;
50919
- if (null === (t = le.current) || void 0 === t ? void 0 : t.contains(o)) return;
50920
- [document.querySelector(`[id='${u}']`), ...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));
51541
+ },
51542
+ He = _(je, 50, !0),
51543
+ Me = _(Be, 50, !0),
51544
+ We = e => {
51545
+ Me.cancel(), He(e);
50921
51546
  },
50922
- He = g(Ie, 50, !0),
50923
- Me = g(Be, 50, !0),
50924
- We = React.useCallback(() => {
51547
+ Pe = () => {
51548
+ He.cancel(), Me();
51549
+ },
51550
+ Ve = React.useCallback(() => {
50925
51551
  var e, t;
50926
- const o = null !== (e = null == he ? void 0 : he.position) && void 0 !== e ? e : P;
50927
- o ? ze(o) : O ? Se.current && ze(Se.current) : (null == V ? void 0 : V.isConnected) && N({
50928
- 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,
50929
51555
  offset: m,
50930
- elementReference: V,
50931
- tooltipReference: le.current,
50932
- tooltipArrowReference: re.current,
51556
+ elementReference: J,
51557
+ tooltipReference: ne.current,
51558
+ tooltipArrowReference: ce.current,
50933
51559
  strategy: b,
50934
51560
  middlewares: S,
50935
- border: J
51561
+ border: ee
50936
51562
  }).then(e => {
50937
- Te.current && (Object.keys(e.tooltipStyles).length && de(e.tooltipStyles), Object.keys(e.tooltipArrowStyles).length && pe(e.tooltipArrowStyles), se(e.place));
51563
+ Oe.current && Ne(e);
50938
51564
  });
50939
- }, [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]);
50940
51566
  React.useEffect(() => {
50941
51567
  var e, t;
50942
- const o = new Set(Ee);
51568
+ const o = new Set(Se);
50943
51569
  Ae.forEach(e => {
50944
51570
  o.add({
50945
51571
  current: e
50946
51572
  });
50947
51573
  });
50948
- const l = document.querySelector(`[id='${u}']`);
50949
- l && o.add({
50950
- current: l
51574
+ const r = document.querySelector(`[id='${d}']`);
51575
+ r && o.add({
51576
+ current: r
50951
51577
  });
50952
- const r = () => {
50953
- Ne(!1);
51578
+ const l = () => {
51579
+ xe(!1);
50954
51580
  },
50955
- n = x(V),
50956
- c = x(le.current);
50957
- 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));
50958
51584
  let i = null;
50959
- 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, {
50960
51586
  ancestorResize: !0,
50961
51587
  elementResize: !0,
50962
51588
  layoutShift: !0
50963
51589
  }));
50964
51590
  const s = e => {
50965
- "Escape" === e.key && Ne(!1);
51591
+ "Escape" === e.key && xe(!1);
50966
51592
  };
50967
- 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);
50968
51594
  const a = [],
50969
- d = e => {
50970
- ve || Ie(e);
51595
+ u = e => {
51596
+ pe && (null == e ? void 0 : e.target) === J || je(e);
50971
51597
  },
50972
- p = () => {
50973
- ve && Be();
51598
+ p = e => {
51599
+ pe && (null == e ? void 0 : e.target) === J && Be();
50974
51600
  },
50975
51601
  v = ["mouseenter", "mouseleave", "focus", "blur"],
50976
51602
  m = ["click", "dblclick", "mousedown", "mouseup"];
50977
51603
  Object.entries(Ce).forEach(([e, t]) => {
50978
51604
  t && (v.includes(e) ? a.push({
50979
51605
  event: e,
50980
- listener: He
51606
+ listener: We
50981
51607
  }) : m.includes(e) && a.push({
50982
51608
  event: e,
50983
- listener: d
51609
+ listener: u
50984
51610
  }));
50985
- }), Object.entries(Re).forEach(([e, t]) => {
51611
+ }), Object.entries(Le).forEach(([e, t]) => {
50986
51612
  t && (v.includes(e) ? a.push({
50987
51613
  event: e,
50988
- listener: Me
51614
+ listener: Pe
50989
51615
  }) : m.includes(e) && a.push({
50990
51616
  event: e,
50991
51617
  listener: p
50992
51618
  }));
50993
- }), O && a.push({
50994
- event: "mousemove",
51619
+ }), k && a.push({
51620
+ event: "pointermove",
50995
51621
  listener: De
50996
51622
  });
50997
51623
  const y = () => {
50998
- _e.current = !0;
51624
+ ge.current = !0;
50999
51625
  },
51000
51626
  h = () => {
51001
- _e.current = !1, Be();
51627
+ ge.current = !1, Be();
51002
51628
  };
51003
- 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(({
51004
51630
  event: e,
51005
51631
  listener: t
51006
51632
  }) => {
51007
51633
  o.forEach(o => {
51008
- var l;
51009
- 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);
51010
51636
  });
51011
51637
  }), () => {
51012
51638
  var e, t;
51013
- 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(({
51014
51640
  event: e,
51015
51641
  listener: t
51016
51642
  }) => {
51017
51643
  o.forEach(o => {
51018
- var l;
51019
- 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);
51020
51646
  });
51021
51647
  });
51022
51648
  };
51023
- }, [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(() => {
51024
51650
  var e, t;
51025
- 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 : "";
51026
51652
  !o && r && (o = `[data-tooltip-id='${r}']`);
51027
51653
  const l = new MutationObserver(e => {
51028
51654
  const t = [],
51029
51655
  l = [];
51030
51656
  e.forEach(e => {
51031
51657
  if ("attributes" === e.type && "data-tooltip-id" === e.attributeName) {
51032
- 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);
51033
51659
  }
51034
51660
  if ("childList" === e.type) {
51035
- if (V) {
51661
+ if (J) {
51036
51662
  const t = [...e.removedNodes].filter(e => 1 === e.nodeType);
51037
51663
  if (o) try {
51038
51664
  l.push(...t.filter(e => e.matches(o))), l.push(...t.flatMap(e => [...e.querySelectorAll(o)]));
51039
51665
  } catch (e) {}
51040
51666
  t.some(e => {
51041
51667
  var t;
51042
- 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);
51043
51669
  });
51044
51670
  }
51045
51671
  if (o) try {
51046
- const l = [...e.addedNodes].filter(e => 1 === e.nodeType);
51047
- 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)]));
51048
51674
  } catch (e) {}
51049
51675
  }
51050
- }), (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]);
51051
51677
  });
51052
51678
  return l.observe(document.body, {
51053
51679
  childList: !0,
51054
51680
  subtree: !0,
51055
51681
  attributes: !0,
51056
- attributeFilter: ["data-tooltip-id"]
51682
+ attributeFilter: ["data-tooltip-id"],
51683
+ attributeOldValue: !0
51057
51684
  }), () => {
51058
51685
  l.disconnect();
51059
51686
  };
51060
- }, [r, p, null == he ? void 0 : he.anchorSelect, V]), React.useEffect(() => {
51061
- We();
51062
- }, [We]), React.useEffect(() => {
51687
+ }, [r, p, null == ye ? void 0 : ye.anchorSelect, J]), React.useEffect(() => {
51688
+ Ve();
51689
+ }, [Ve]), React.useEffect(() => {
51063
51690
  if (!(null == X ? void 0 : X.current)) return () => null;
51064
51691
  const e = new ResizeObserver(() => {
51065
- We();
51692
+ setTimeout(() => Ve());
51066
51693
  });
51067
51694
  return e.observe(X.current), () => {
51068
51695
  e.disconnect();
51069
51696
  };
51070
51697
  }, [U, null == X ? void 0 : X.current]), React.useEffect(() => {
51071
51698
  var e;
51072
- const t = document.querySelector(`[id='${u}']`),
51699
+ const t = document.querySelector(`[id='${d}']`),
51073
51700
  o = [...Ae, t];
51074
- V && o.includes(V) || Z(null !== (e = Ae[0]) && void 0 !== e ? e : t);
51075
- }, [u, Ae, V]), React.useEffect(() => () => {
51076
- ne.current && clearTimeout(ne.current), ce.current && clearTimeout(ce.current);
51077
- }, []), 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(() => {
51078
51705
  var e;
51079
- 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;
51080
51707
  if (!t && r && (t = `[data-tooltip-id='${r}']`), t) try {
51081
51708
  const e = Array.from(document.querySelectorAll(t));
51082
- Oe(e);
51709
+ _e(e);
51083
51710
  } catch (e) {
51084
- Oe([]);
51711
+ _e([]);
51085
51712
  }
51086
- }, [r, p, null == he ? void 0 : he.anchorSelect]);
51087
- const Pe = null !== (oe = null == he ? void 0 : he.content) && void 0 !== oe ? oe : U,
51088
- 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;
51089
51718
  return React.useImperativeHandle(t, () => ({
51090
51719
  open: e => {
51091
51720
  if (null == e ? void 0 : e.anchorSelect) try {
@@ -51093,214 +51722,218 @@ const I = ({
51093
51722
  } catch (t) {
51094
51723
  return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`);
51095
51724
  }
51096
- 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);
51097
51726
  },
51098
51727
  close: e => {
51099
- (null == e ? void 0 : e.delay) ? je(e.delay) : Ne(!1);
51728
+ (null == e ? void 0 : e.delay) ? Ie(e.delay) : xe(!1);
51100
51729
  },
51101
- activeAnchor: V,
51102
- place: ie,
51103
- isOpen: Boolean(fe && !T && Pe && Fe)
51104
- })), 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, {
51105
51734
  id: r,
51106
- role: te,
51107
- className: classnames("react-tooltip", $.tooltip, j.tooltip, j[d], 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),
51108
51737
  onTransitionEnd: e => {
51109
- 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());
51110
51739
  },
51111
51740
  style: {
51112
- ...W,
51113
- ...ae,
51114
- opacity: void 0 !== Q && Fe ? Q : void 0
51741
+ ...P,
51742
+ ...ue.tooltipStyles,
51743
+ opacity: void 0 !== te && Ke ? te : void 0
51115
51744
  },
51116
- ref: le
51117
- }, Pe, React__default["default"].createElement(E, {
51118
- 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),
51119
51748
  style: {
51120
- ...ue,
51121
- 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
51122
51751
  },
51123
- ref: re
51752
+ ref: ce
51124
51753
  })) : null;
51125
51754
  },
51126
- B = ({
51755
+ q = ({
51127
51756
  content: t
51128
51757
  }) => React__default["default"].createElement("span", {
51129
51758
  dangerouslySetInnerHTML: {
51130
51759
  __html: t
51131
51760
  }
51132
51761
  }),
51133
- z = (e, t) => !("CSS" in window && "supports" in window.CSS) || window.CSS.supports(e, t),
51134
- D = React__default["default"].forwardRef(({
51762
+ H = React__default["default"].forwardRef(({
51135
51763
  id: t,
51136
- anchorId: l,
51137
- anchorSelect: r,
51138
- content: n,
51139
- html: s,
51764
+ anchorId: r,
51765
+ anchorSelect: n,
51766
+ content: c,
51767
+ html: i,
51140
51768
  render: a,
51141
- className: d,
51142
- classNameArrow: u,
51769
+ className: u,
51770
+ classNameArrow: d,
51143
51771
  variant: p = "dark",
51144
51772
  place: v = "top",
51145
51773
  offset: m = 10,
51146
51774
  wrapper: f = "div",
51147
- children: y = null,
51148
- events: h = ["hover"],
51149
- openOnClick: w = !1,
51150
- positionStrategy: b = "absolute",
51151
- middlewares: S,
51152
- delayShow: E = 0,
51153
- delayHide: g = 0,
51154
- float: _ = !1,
51155
- hidden: A = !1,
51156
- noArrow: O = !1,
51157
- clickable: T = !1,
51775
+ children: h = null,
51776
+ events: w = ["hover"],
51777
+ openOnClick: b = !1,
51778
+ positionStrategy: S = "absolute",
51779
+ middlewares: E,
51780
+ delayShow: g = 0,
51781
+ delayHide: _ = 0,
51782
+ float: O = !1,
51783
+ hidden: T = !1,
51784
+ noArrow: k = !1,
51785
+ clickable: C = !1,
51158
51786
  closeOnEsc: L = !1,
51159
- closeOnScroll: C = !1,
51160
- closeOnResize: R = !1,
51161
- openEvents: x,
51162
- closeEvents: N,
51163
- globalCloseEvents: $,
51164
- imperativeModeOnly: j = !1,
51165
- style: D,
51166
- position: q,
51167
- isOpen: H,
51168
- disableStyleInjection: M = !1,
51169
- border: W,
51170
- opacity: P,
51171
- arrowColor: F,
51172
- setIsOpen: K,
51173
- afterShow: U,
51174
- afterHide: X,
51175
- role: Y = "tooltip"
51176
- }, G) => {
51177
- const [V, Z] = React.useState(n),
51178
- [J, Q] = React.useState(s),
51179
- [ee, te] = React.useState(v),
51180
- [oe, le] = React.useState(p),
51181
- [re, ne] = React.useState(m),
51182
- [ce, ie] = React.useState(E),
51787
+ closeOnScroll: R = !1,
51788
+ closeOnResize: x = !1,
51789
+ openEvents: N,
51790
+ closeEvents: $,
51791
+ globalCloseEvents: j,
51792
+ imperativeModeOnly: B = !1,
51793
+ style: z,
51794
+ position: H,
51795
+ isOpen: M,
51796
+ defaultIsOpen: W = !1,
51797
+ disableStyleInjection: P = !1,
51798
+ border: V,
51799
+ opacity: F,
51800
+ arrowColor: K,
51801
+ setIsOpen: U,
51802
+ afterShow: X,
51803
+ afterHide: Y,
51804
+ role: G = "tooltip"
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),
51183
51811
  [se, ae] = React.useState(g),
51184
- [de, ue] = React.useState(_),
51185
- [pe, ve] = React.useState(A),
51186
- [me, fe] = React.useState(f),
51187
- [ye, he] = React.useState(h),
51188
- [we, be] = React.useState(b),
51189
- [Se, Ee] = React.useState(null),
51190
- ge = React.useRef(M),
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),
51191
51821
  {
51192
- anchorRefs: _e,
51193
- activeAnchor: Ae
51194
- } = k(t),
51195
- Oe = e => null == e ? void 0 : e.getAttributeNames().reduce((t, o) => {
51196
- var l;
51822
+ anchorRefs: ke,
51823
+ activeAnchor: Ce
51824
+ } = I(t),
51825
+ Le = e => null == e ? void 0 : e.getAttributeNames().reduce((t, o) => {
51826
+ var r;
51197
51827
  if (o.startsWith("data-tooltip-")) {
51198
- 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;
51199
51829
  }
51200
51830
  return t;
51201
51831
  }, {}),
51202
- Te = e => {
51832
+ Re = e => {
51203
51833
  const t = {
51204
51834
  place: e => {
51205
51835
  var t;
51206
- te(null !== (t = e) && void 0 !== t ? t : v);
51836
+ re(null !== (t = e) && void 0 !== t ? t : v);
51207
51837
  },
51208
51838
  content: e => {
51209
- Z(null != e ? e : n);
51839
+ Q(null != e ? e : c);
51210
51840
  },
51211
51841
  html: e => {
51212
- Q(null != e ? e : s);
51842
+ te(null != e ? e : i);
51213
51843
  },
51214
51844
  variant: e => {
51215
51845
  var t;
51216
- le(null !== (t = e) && void 0 !== t ? t : p);
51846
+ ne(null !== (t = e) && void 0 !== t ? t : p);
51217
51847
  },
51218
51848
  offset: e => {
51219
- ne(null === e ? m : Number(e));
51849
+ ie(null === e ? m : Number(e));
51220
51850
  },
51221
51851
  wrapper: e => {
51222
51852
  var t;
51223
- fe(null !== (t = e) && void 0 !== t ? t : f);
51853
+ he(null !== (t = e) && void 0 !== t ? t : f);
51224
51854
  },
51225
51855
  events: e => {
51226
51856
  const t = null == e ? void 0 : e.split(" ");
51227
- he(null != t ? t : h);
51857
+ be(null != t ? t : w);
51228
51858
  },
51229
51859
  "position-strategy": e => {
51230
51860
  var t;
51231
- be(null !== (t = e) && void 0 !== t ? t : b);
51861
+ Ee(null !== (t = e) && void 0 !== t ? t : S);
51232
51862
  },
51233
51863
  "delay-show": e => {
51234
- ie(null === e ? E : Number(e));
51864
+ ae(null === e ? g : Number(e));
51235
51865
  },
51236
51866
  "delay-hide": e => {
51237
- ae(null === e ? g : Number(e));
51867
+ de(null === e ? _ : Number(e));
51238
51868
  },
51239
51869
  float: e => {
51240
- ue(null === e ? _ : "true" === e);
51870
+ ve(null === e ? O : "true" === e);
51241
51871
  },
51242
51872
  hidden: e => {
51243
- ve(null === e ? A : "true" === e);
51873
+ fe(null === e ? T : "true" === e);
51874
+ },
51875
+ "class-name": e => {
51876
+ Ae(e);
51244
51877
  }
51245
51878
  };
51246
51879
  Object.values(t).forEach(e => e(null)), Object.entries(e).forEach(([e, o]) => {
51247
- var l;
51248
- 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);
51249
51882
  });
51250
51883
  };
51251
51884
  React.useEffect(() => {
51252
- Z(n);
51253
- }, [n]), React.useEffect(() => {
51254
- Q(s);
51255
- }, [s]), React.useEffect(() => {
51256
- te(v);
51885
+ Q(c);
51886
+ }, [c]), React.useEffect(() => {
51887
+ te(i);
51888
+ }, [i]), React.useEffect(() => {
51889
+ re(v);
51257
51890
  }, [v]), React.useEffect(() => {
51258
- le(p);
51891
+ ne(p);
51259
51892
  }, [p]), React.useEffect(() => {
51260
- ne(m);
51893
+ ie(m);
51261
51894
  }, [m]), React.useEffect(() => {
51262
- ie(E);
51263
- }, [E]), React.useEffect(() => {
51264
51895
  ae(g);
51265
51896
  }, [g]), React.useEffect(() => {
51266
- ue(_);
51897
+ de(_);
51267
51898
  }, [_]), React.useEffect(() => {
51268
- ve(A);
51269
- }, [A]), React.useEffect(() => {
51270
- be(b);
51271
- }, [b]), React.useEffect(() => {
51272
- ge.current !== M && console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");
51273
- }, [M]), React.useEffect(() => {
51899
+ ve(O);
51900
+ }, [O]), React.useEffect(() => {
51901
+ fe(T);
51902
+ }, [T]), React.useEffect(() => {
51903
+ Ee(S);
51904
+ }, [S]), React.useEffect(() => {
51905
+ Te.current !== P && console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");
51906
+ }, [P]), React.useEffect(() => {
51274
51907
  "undefined" != typeof window && window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles", {
51275
51908
  detail: {
51276
- disableCore: "core" === M,
51277
- disableBase: M
51909
+ disableCore: "core" === P,
51910
+ disableBase: P
51278
51911
  }
51279
51912
  }));
51280
51913
  }, []), React.useEffect(() => {
51281
51914
  var e;
51282
- const o = new Set(_e);
51283
- let n = r;
51284
- if (!n && t && (n = `[data-tooltip-id='${t}']`), n) try {
51285
- 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 => {
51286
51919
  o.add({
51287
51920
  current: e
51288
51921
  });
51289
51922
  });
51290
51923
  } catch (e) {
51291
- console.warn(`[react-tooltip] "${n}" is not a valid CSS selector`);
51924
+ console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`);
51292
51925
  }
51293
- const c = document.querySelector(`[id='${l}']`);
51926
+ const c = document.querySelector(`[id='${r}']`);
51294
51927
  if (c && o.add({
51295
51928
  current: c
51296
51929
  }), !o.size) return () => null;
51297
- const i = null !== (e = null != Se ? Se : c) && void 0 !== e ? e : Ae.current,
51930
+ const i = null !== (e = null != _e ? _e : c) && void 0 !== e ? e : Ce.current,
51298
51931
  s = new MutationObserver(e => {
51299
51932
  e.forEach(e => {
51300
51933
  var t;
51301
51934
  if (!i || "attributes" !== e.type || !(null === (t = e.attributeName) || void 0 === t ? void 0 : t.startsWith("data-tooltip-"))) return;
51302
- const o = Oe(i);
51303
- Te(o);
51935
+ const o = Le(i);
51936
+ Re(o);
51304
51937
  });
51305
51938
  }),
51306
51939
  a = {
@@ -51309,75 +51942,76 @@ const I = ({
51309
51942
  subtree: !1
51310
51943
  };
51311
51944
  if (i) {
51312
- const e = Oe(i);
51313
- Te(e), s.observe(i, a);
51945
+ const e = Le(i);
51946
+ Re(e), s.observe(i, a);
51314
51947
  }
51315
51948
  return () => {
51316
51949
  s.disconnect();
51317
51950
  };
51318
- }, [_e, Ae, Se, l, r]), React.useEffect(() => {
51319
- (null == D ? void 0 : D.border) && console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."), W && !z("border", `${W}`) && console.warn(`[react-tooltip] "${W}" is not a valid \`border\`.`), (null == D ? void 0 : D.opacity) && console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."), P && !z("opacity", `${P}`) && console.warn(`[react-tooltip] "${P}" 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\`.`);
51320
51953
  }, []);
51321
- let ke = y;
51322
- const Le = React.useRef(null);
51954
+ let xe = h;
51955
+ const Ne = React.useRef(null);
51323
51956
  if (a) {
51324
51957
  const t = a({
51325
- content: null != V ? V : null,
51326
- activeAnchor: Se
51958
+ content: (null == _e ? void 0 : _e.getAttribute("data-tooltip-content")) || J || null,
51959
+ activeAnchor: _e
51327
51960
  });
51328
- ke = t ? React__default["default"].createElement("div", {
51329
- ref: Le,
51961
+ xe = t ? React__default["default"].createElement("div", {
51962
+ ref: Ne,
51330
51963
  className: "react-tooltip-content-wrapper"
51331
51964
  }, t) : null;
51332
- } else V && (ke = V);
51333
- J && (ke = React__default["default"].createElement(B, {
51334
- content: J
51965
+ } else J && (xe = J);
51966
+ ee && (xe = React__default["default"].createElement(q, {
51967
+ content: ee
51335
51968
  }));
51336
- const Ce = {
51337
- forwardRef: G,
51969
+ const $e = {
51970
+ forwardRef: Z,
51338
51971
  id: t,
51339
- anchorId: l,
51340
- anchorSelect: r,
51341
- className: d,
51342
- classNameArrow: u,
51343
- content: ke,
51344
- contentWrapperRef: Le,
51345
- place: ee,
51346
- variant: oe,
51347
- offset: re,
51348
- wrapper: me,
51349
- events: ye,
51350
- openOnClick: w,
51351
- positionStrategy: we,
51352
- middlewares: S,
51353
- delayShow: ce,
51354
- delayHide: se,
51355
- float: de,
51356
- hidden: pe,
51357
- noArrow: O,
51358
- clickable: T,
51972
+ anchorId: r,
51973
+ anchorSelect: n,
51974
+ className: classnames(u, ge),
51975
+ classNameArrow: d,
51976
+ content: xe,
51977
+ contentWrapperRef: Ne,
51978
+ place: oe,
51979
+ variant: le,
51980
+ offset: ce,
51981
+ wrapper: ye,
51982
+ events: we,
51983
+ openOnClick: b,
51984
+ positionStrategy: Se,
51985
+ middlewares: E,
51986
+ delayShow: se,
51987
+ delayHide: ue,
51988
+ float: pe,
51989
+ hidden: me,
51990
+ noArrow: k,
51991
+ clickable: C,
51359
51992
  closeOnEsc: L,
51360
- closeOnScroll: C,
51361
- closeOnResize: R,
51362
- openEvents: x,
51363
- closeEvents: N,
51364
- globalCloseEvents: $,
51365
- imperativeModeOnly: j,
51366
- style: D,
51367
- position: q,
51368
- isOpen: H,
51369
- border: W,
51370
- opacity: P,
51371
- arrowColor: F,
51372
- setIsOpen: K,
51373
- afterShow: U,
51374
- afterHide: X,
51375
- activeAnchor: Se,
51376
- setActiveAnchor: e => Ee(e),
51377
- role: Y
51993
+ closeOnScroll: R,
51994
+ closeOnResize: x,
51995
+ openEvents: N,
51996
+ closeEvents: $,
51997
+ globalCloseEvents: j,
51998
+ imperativeModeOnly: B,
51999
+ style: z,
52000
+ position: H,
52001
+ isOpen: M,
52002
+ defaultIsOpen: W,
52003
+ border: V,
52004
+ opacity: F,
52005
+ arrowColor: K,
52006
+ setIsOpen: U,
52007
+ afterShow: X,
52008
+ afterHide: Y,
52009
+ activeAnchor: _e,
52010
+ setActiveAnchor: e => Oe(e),
52011
+ role: G
51378
52012
  };
51379
- return React__default["default"].createElement(I, {
51380
- ...Ce
52013
+ return React__default["default"].createElement(D, {
52014
+ ...$e
51381
52015
  });
51382
52016
  });
51383
52017
  "undefined" != typeof window && window.addEventListener("react-tooltip-inject-styles", e => {
@@ -51481,7 +52115,7 @@ function ContextualHelp(_ref) {
51481
52115
  color: "#1d5ab9",
51482
52116
  fontSize: "22px"
51483
52117
  }
51484
- })), /*#__PURE__*/React__default["default"].createElement(D, {
52118
+ })), /*#__PURE__*/React__default["default"].createElement(H, {
51485
52119
  anchorSelect: "#helpSnippet1",
51486
52120
  clickable: true,
51487
52121
  className: "utilities_ContextualHelp_ContextualHelp--snippet",