@copart/ops-tool-kit 1.10.0-alpha.23 → 1.10.0-alpha.25

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.10.0-alpha.23";
36
+ const version$5 = "1.10.0-alpha.25";
37
37
  const main$1 = "dist/ops-tool-kit.js";
38
38
  const style = "dist/ops-tool-kit.css";
39
39
  const files = [
@@ -113,7 +113,8 @@ const dependencies$1 = {
113
113
  "storage-changed": "^2.0.0",
114
114
  warning: "^4.0.1",
115
115
  "@wordpress/block-library": "5.0.1",
116
- websocket: "^1.0.34"
116
+ websocket: "^1.0.34",
117
+ "react-tooltip": "^5.20.0"
117
118
  };
118
119
  const jest = {
119
120
  setupTestFrameworkScriptFile: "./jest/setup.js",
@@ -3940,32 +3941,32 @@ var runtime = createCommonjsModule(function (module) {
3940
3941
 
3941
3942
  // This method of obtaining a reference to the global object needs to be
3942
3943
  // kept identical to the way it is obtained in runtime.js
3943
- var g$1 = (function() {
3944
+ var g$2 = (function() {
3944
3945
  return this || (typeof self === "object" && self);
3945
3946
  })() || Function("return this")();
3946
3947
 
3947
3948
  // Use `getOwnPropertyNames` because not all browsers support calling
3948
3949
  // `hasOwnProperty` on the global `self` object in a worker. See #183.
3949
- var hadRuntime = g$1.regeneratorRuntime &&
3950
- Object.getOwnPropertyNames(g$1).indexOf("regeneratorRuntime") >= 0;
3950
+ var hadRuntime = g$2.regeneratorRuntime &&
3951
+ Object.getOwnPropertyNames(g$2).indexOf("regeneratorRuntime") >= 0;
3951
3952
 
3952
3953
  // Save the old regeneratorRuntime in case it needs to be restored later.
3953
- var oldRuntime = hadRuntime && g$1.regeneratorRuntime;
3954
+ var oldRuntime = hadRuntime && g$2.regeneratorRuntime;
3954
3955
 
3955
3956
  // Force reevalutation of runtime.js.
3956
- g$1.regeneratorRuntime = undefined;
3957
+ g$2.regeneratorRuntime = undefined;
3957
3958
 
3958
3959
  var runtimeModule = runtime;
3959
3960
 
3960
3961
  if (hadRuntime) {
3961
3962
  // Restore the original runtime.
3962
- g$1.regeneratorRuntime = oldRuntime;
3963
+ g$2.regeneratorRuntime = oldRuntime;
3963
3964
  } else {
3964
3965
  // Remove the global property added by runtime.js.
3965
3966
  try {
3966
- delete g$1.regeneratorRuntime;
3967
+ delete g$2.regeneratorRuntime;
3967
3968
  } catch(e) {
3968
- g$1.regeneratorRuntime = undefined;
3969
+ g$2.regeneratorRuntime = undefined;
3969
3970
  }
3970
3971
  }
3971
3972
 
@@ -4602,13 +4603,13 @@ function nonStandardBrowserEnv() {
4602
4603
 
4603
4604
  var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
4604
4605
 
4605
- function E() {
4606
+ function E$1() {
4606
4607
  this.message = 'String contains an invalid character';
4607
4608
  }
4608
4609
 
4609
- E.prototype = new Error();
4610
- E.prototype.code = 5;
4611
- E.prototype.name = 'InvalidCharacterError';
4610
+ E$1.prototype = new Error();
4611
+ E$1.prototype.code = 5;
4612
+ E$1.prototype.name = 'InvalidCharacterError';
4612
4613
 
4613
4614
  function btoa$2(input) {
4614
4615
  var str = String(input);
@@ -4623,7 +4624,7 @@ function btoa$2(input) {
4623
4624
  charCode = str.charCodeAt(idx += 3 / 4);
4624
4625
 
4625
4626
  if (charCode > 0xFF) {
4626
- throw new E();
4627
+ throw new E$1();
4627
4628
  }
4628
4629
 
4629
4630
  block = block << 8 | charCode;
@@ -10442,7 +10443,7 @@ var flatten$1 = flatten;
10442
10443
  * @symb R.flip(f)(a, b, c) = f(b, a, c)
10443
10444
  */
10444
10445
 
10445
- var flip =
10446
+ var flip$1 =
10446
10447
  /*#__PURE__*/
10447
10448
  _curry1(function flip(fn) {
10448
10449
  return curryN$1(fn.length, function (a, b) {
@@ -10453,7 +10454,7 @@ _curry1(function flip(fn) {
10453
10454
  });
10454
10455
  });
10455
10456
 
10456
- var flip$1 = flip;
10457
+ var flip$2 = flip$1;
10457
10458
 
10458
10459
  /**
10459
10460
  * Iterate over an input `object`, calling a provided function `fn` for each
@@ -17194,7 +17195,7 @@ try {
17194
17195
  */
17195
17196
 
17196
17197
 
17197
- function getWindow(rootElement) {
17198
+ function getWindow$1(rootElement) {
17198
17199
  if (_isSSR || typeof _window === 'undefined') {
17199
17200
  return undefined;
17200
17201
  } else {
@@ -17351,7 +17352,7 @@ function () {
17351
17352
  var _this = this;
17352
17353
 
17353
17354
  var immediateId = 0;
17354
- var win = getWindow(targetElement);
17355
+ var win = getWindow$1(targetElement);
17355
17356
 
17356
17357
  if (!this._isDisposed) {
17357
17358
  if (!this._immediateIds) {
@@ -17390,7 +17391,7 @@ function () {
17390
17391
 
17391
17392
 
17392
17393
  Async.prototype.clearImmediate = function (id, targetElement) {
17393
- var win = getWindow(targetElement);
17394
+ var win = getWindow$1(targetElement);
17394
17395
 
17395
17396
  if (this._immediateIds && this._immediateIds[id]) {
17396
17397
  /* tslint:disable:ban-native-functions */
@@ -17682,7 +17683,7 @@ function () {
17682
17683
  var _this = this;
17683
17684
 
17684
17685
  var animationFrameId = 0;
17685
- var win = getWindow(targetElement);
17686
+ var win = getWindow$1(targetElement);
17686
17687
 
17687
17688
  if (!this._isDisposed) {
17688
17689
  if (!this._animationFrameIds) {
@@ -17714,7 +17715,7 @@ function () {
17714
17715
  };
17715
17716
 
17716
17717
  Async.prototype.cancelAnimationFrame = function (id, targetElement) {
17717
- var win = getWindow(targetElement);
17718
+ var win = getWindow$1(targetElement);
17718
17719
 
17719
17720
  if (this._animationFrameIds && this._animationFrameIds[id]) {
17720
17721
  /* tslint:disable:ban-native-functions */
@@ -18208,7 +18209,7 @@ function findScrollableParent(startingElement) {
18208
18209
 
18209
18210
  if (!el || el === doc.body) {
18210
18211
  // tslint:disable-next-line:no-any
18211
- el = getWindow(startingElement);
18212
+ el = getWindow$1(startingElement);
18212
18213
  }
18213
18214
 
18214
18215
  return el;
@@ -18428,7 +18429,7 @@ function () {
18428
18429
  function _getGlobalSettings() {
18429
18430
  var _a;
18430
18431
 
18431
- var win = getWindow();
18432
+ var win = getWindow$1();
18432
18433
  var globalObj = win || {};
18433
18434
 
18434
18435
  if (!globalObj[GLOBAL_SETTINGS_PROP_NAME]) {
@@ -19026,7 +19027,7 @@ function classNamesFunction(options) {
19026
19027
  }
19027
19028
 
19028
19029
  if (styleCalcCount > (options.cacheSize || MAX_CACHE_COUNT)) {
19029
- var win = getWindow();
19030
+ var win = getWindow$1();
19030
19031
 
19031
19032
  if ((_b = (_a = win) === null || _a === void 0 ? void 0 : _a.FabricConfig) === null || _b === void 0 ? void 0 : _b.enableClassNameCacheFullWarning) {
19032
19033
  console.warn("Styles are being recalculated too frequently. Cache miss rate is " + styleCalcCount + "/" + getClassNamesCount + "."); // tslint:disable-next-line:no-console
@@ -19850,7 +19851,7 @@ function focusAsync(element) {
19850
19851
  }
19851
19852
 
19852
19853
  targetToFocusOnNextRepaint = element;
19853
- var win = getWindow(element);
19854
+ var win = getWindow$1(element);
19854
19855
 
19855
19856
  if (win) {
19856
19857
  // element.focus() is a no-op if the element is no longer in the DOM, meaning this is always safe
@@ -19911,7 +19912,7 @@ function getElementIndexPath(fromElement, toElement) {
19911
19912
  var CURRENT_ID_PROPERTY = '__currentId__';
19912
19913
  var DEFAULT_ID_STRING = 'id__'; // tslint:disable-next-line:no-any
19913
19914
 
19914
- var _global = getWindow() || {};
19915
+ var _global = getWindow$1() || {};
19915
19916
 
19916
19917
  if (_global[CURRENT_ID_PROPERTY] === undefined) {
19917
19918
  _global[CURRENT_ID_PROPERTY] = 0;
@@ -20191,7 +20192,7 @@ var IsFocusHiddenClassName = 'ms-Fabric--isFocusHidden';
20191
20192
  */
20192
20193
 
20193
20194
  function setFocusVisibility(enabled, target) {
20194
- var win = target ? getWindow(target) : getWindow();
20195
+ var win = target ? getWindow$1(target) : getWindow$1();
20195
20196
 
20196
20197
  if (win) {
20197
20198
  var classList = win.document.body.classList;
@@ -20240,7 +20241,7 @@ function setMountCounters(key, delta) {
20240
20241
  function useFocusRects(rootRef) {
20241
20242
  var _a;
20242
20243
 
20243
- var win = getWindow((_a = rootRef) === null || _a === void 0 ? void 0 : _a.current);
20244
+ var win = getWindow$1((_a = rootRef) === null || _a === void 0 ? void 0 : _a.current);
20244
20245
  React__namespace.useEffect(function () {
20245
20246
  var _a;
20246
20247
 
@@ -20309,7 +20310,7 @@ function getItem$1(key) {
20309
20310
  var result = null;
20310
20311
 
20311
20312
  try {
20312
- var win = getWindow();
20313
+ var win = getWindow$1();
20313
20314
  result = win ? win.localStorage.getItem(key) : null;
20314
20315
  } catch (e) {
20315
20316
  /* Eat the exception */
@@ -21043,7 +21044,7 @@ function _getFontBaseUrl() {
21043
21044
  var _a, _b, _c; // tslint:disable-next-line:no-any
21044
21045
 
21045
21046
 
21046
- var fabricConfig = (_a = getWindow()) === null || _a === void 0 ? void 0 : _a.FabricConfig;
21047
+ var fabricConfig = (_a = getWindow$1()) === null || _a === void 0 ? void 0 : _a.FabricConfig;
21047
21048
  return _c = (_b = fabricConfig) === null || _b === void 0 ? void 0 : _b.fontBaseUrl, _c !== null && _c !== void 0 ? _c : DefaultBaseUrl;
21048
21049
  }
21049
21050
  /**
@@ -21211,7 +21212,7 @@ var _theme = createTheme({
21211
21212
  var ThemeSettingName = 'theme';
21212
21213
 
21213
21214
  if (!Customizations.getSettings([ThemeSettingName]).theme) {
21214
- var win = getWindow(); // tslint:disable-line:no-any
21215
+ var win = getWindow$1(); // tslint:disable-line:no-any
21215
21216
 
21216
21217
  if ((_c = (_b = win) === null || _b === void 0 ? void 0 : _b.FabricConfig) === null || _c === void 0 ? void 0 : _c.theme) {
21217
21218
  _theme = createTheme(win.FabricConfig.theme);
@@ -22255,7 +22256,7 @@ function (_super) {
22255
22256
  if (this._root.current) {
22256
22257
  this._disposables.push(on(this._root.current, 'focus', this._onFocus, true), on(this._root.current, 'blur', this._onBlur, true));
22257
22258
 
22258
- var currentWindow = getWindow(this._root.current);
22259
+ var currentWindow = getWindow$1(this._root.current);
22259
22260
 
22260
22261
  if (currentWindow) {
22261
22262
  this._disposables.push(on(currentWindow, 'keydown', this._onKeyDown));
@@ -22818,23 +22819,23 @@ function (_super) {
22818
22819
  if (typeof target === 'string') {
22819
22820
  var currentDoc = getDocument(currentElement);
22820
22821
  this._target = currentDoc ? currentDoc.querySelector(target) : null;
22821
- this._targetWindow = getWindow(currentElement);
22822
+ this._targetWindow = getWindow$1(currentElement);
22822
22823
  } else if (!!target.stopPropagation) {
22823
- this._targetWindow = getWindow(target.target);
22824
+ this._targetWindow = getWindow$1(target.target);
22824
22825
  this._target = target;
22825
22826
  } else if (!!target.getBoundingClientRect) {
22826
22827
  var targetElement = target;
22827
- this._targetWindow = getWindow(targetElement);
22828
+ this._targetWindow = getWindow$1(targetElement);
22828
22829
  this._target = target;
22829
22830
  } else if (target.current !== undefined) {
22830
22831
  this._target = target.current;
22831
- this._targetWindow = getWindow(this._target); // HTMLImgElements can have x and y values. The check for it being a point must go last.
22832
+ this._targetWindow = getWindow$1(this._target); // HTMLImgElements can have x and y values. The check for it being a point must go last.
22832
22833
  } else {
22833
- this._targetWindow = getWindow(currentElement);
22834
+ this._targetWindow = getWindow$1(currentElement);
22834
22835
  this._target = target;
22835
22836
  }
22836
22837
  } else {
22837
- this._targetWindow = getWindow(currentElement);
22838
+ this._targetWindow = getWindow$1(currentElement);
22838
22839
  }
22839
22840
  };
22840
22841
 
@@ -23910,7 +23911,7 @@ function (_super) {
23910
23911
  _allInstances[this._id] = this;
23911
23912
 
23912
23913
  if (root) {
23913
- this._windowElement = getWindow(root);
23914
+ this._windowElement = getWindow$1(root);
23914
23915
  var parentElement = getParent(root, ALLOW_VIRTUAL_ELEMENTS);
23915
23916
 
23916
23917
  while (parentElement && parentElement !== this._getDocument().body && parentElement.nodeType === 1) {
@@ -27687,8 +27688,6 @@ var HelpSideBar = function HelpSideBar(_ref) {
27687
27688
  };
27688
27689
 
27689
27690
  var getArticles = function getArticles(type) {
27690
- console.log('+++getArticles type=', type);
27691
-
27692
27691
  switch (type) {
27693
27692
  case contentType.RECOMMENDED_HELP_RESOURCES.type:
27694
27693
  return getRecommendedHelpArticles(helpContent);
@@ -30465,7 +30464,7 @@ function () {
30465
30464
  }();
30466
30465
 
30467
30466
  var filterRoles = function filterRoles(roles, invalidCodes) {
30468
- return compose(uniqBy$1(prop$1('roleName')), filter$1(compose(not$1, flip$1(includes$1)(invalidCodes), prop$1('countryCode'))))(roles);
30467
+ return compose(uniqBy$1(prop$1('roleName')), filter$1(compose(not$1, flip$2(includes$1)(invalidCodes), prop$1('countryCode'))))(roles);
30469
30468
  };
30470
30469
 
30471
30470
  var SettingsView =
@@ -38433,27 +38432,27 @@ styleInject(css_248z$5);
38433
38432
  * LICENSE file in the root directory of this source tree.
38434
38433
  */
38435
38434
 
38436
- var b = "function" === typeof Symbol && Symbol.for,
38437
- c = b ? Symbol.for("react.element") : 60103,
38438
- d = b ? Symbol.for("react.portal") : 60106,
38439
- e = b ? Symbol.for("react.fragment") : 60107,
38440
- f = b ? Symbol.for("react.strict_mode") : 60108,
38441
- g = b ? Symbol.for("react.profiler") : 60114,
38442
- h = b ? Symbol.for("react.provider") : 60109,
38443
- k = b ? Symbol.for("react.context") : 60110,
38444
- l = b ? Symbol.for("react.async_mode") : 60111,
38445
- m = b ? Symbol.for("react.concurrent_mode") : 60111,
38446
- n = b ? Symbol.for("react.forward_ref") : 60112,
38447
- p = b ? Symbol.for("react.suspense") : 60113,
38448
- q = b ? Symbol.for("react.suspense_list") : 60120,
38449
- r = b ? Symbol.for("react.memo") : 60115,
38450
- t = b ? Symbol.for("react.lazy") : 60116,
38451
- v = b ? Symbol.for("react.block") : 60121,
38452
- w = b ? Symbol.for("react.fundamental") : 60117,
38453
- x = b ? Symbol.for("react.responder") : 60118,
38454
- y = b ? Symbol.for("react.scope") : 60119;
38455
-
38456
- function z(a) {
38435
+ var b$1 = "function" === typeof Symbol && Symbol.for,
38436
+ c = b$1 ? Symbol.for("react.element") : 60103,
38437
+ d = b$1 ? Symbol.for("react.portal") : 60106,
38438
+ e = b$1 ? Symbol.for("react.fragment") : 60107,
38439
+ f$1 = b$1 ? Symbol.for("react.strict_mode") : 60108,
38440
+ g$1 = b$1 ? Symbol.for("react.profiler") : 60114,
38441
+ h$1 = b$1 ? Symbol.for("react.provider") : 60109,
38442
+ k$1 = b$1 ? Symbol.for("react.context") : 60110,
38443
+ l = b$1 ? Symbol.for("react.async_mode") : 60111,
38444
+ m = b$1 ? Symbol.for("react.concurrent_mode") : 60111,
38445
+ n = b$1 ? Symbol.for("react.forward_ref") : 60112,
38446
+ p = b$1 ? Symbol.for("react.suspense") : 60113,
38447
+ q$1 = b$1 ? Symbol.for("react.suspense_list") : 60120,
38448
+ r = b$1 ? Symbol.for("react.memo") : 60115,
38449
+ t = b$1 ? Symbol.for("react.lazy") : 60116,
38450
+ v = b$1 ? Symbol.for("react.block") : 60121,
38451
+ w$1 = b$1 ? Symbol.for("react.fundamental") : 60117,
38452
+ x$1 = b$1 ? Symbol.for("react.responder") : 60118,
38453
+ y = b$1 ? Symbol.for("react.scope") : 60119;
38454
+
38455
+ function z$1(a) {
38457
38456
  if ("object" === typeof a && null !== a) {
38458
38457
  var u = a.$$typeof;
38459
38458
 
@@ -38463,18 +38462,18 @@ function z(a) {
38463
38462
  case l:
38464
38463
  case m:
38465
38464
  case e:
38466
- case g:
38467
- case f:
38465
+ case g$1:
38466
+ case f$1:
38468
38467
  case p:
38469
38468
  return a;
38470
38469
 
38471
38470
  default:
38472
38471
  switch (a = a && a.$$typeof, a) {
38473
- case k:
38472
+ case k$1:
38474
38473
  case n:
38475
38474
  case t:
38476
38475
  case r:
38477
- case h:
38476
+ case h$1:
38478
38477
  return a;
38479
38478
 
38480
38479
  default:
@@ -38489,79 +38488,79 @@ function z(a) {
38489
38488
  }
38490
38489
  }
38491
38490
 
38492
- function A(a) {
38493
- return z(a) === m;
38491
+ function A$1(a) {
38492
+ return z$1(a) === m;
38494
38493
  }
38495
38494
 
38496
38495
  var AsyncMode = l;
38497
38496
  var ConcurrentMode = m;
38498
- var ContextConsumer = k;
38499
- var ContextProvider = h;
38497
+ var ContextConsumer = k$1;
38498
+ var ContextProvider = h$1;
38500
38499
  var Element$1 = c;
38501
38500
  var ForwardRef = n;
38502
38501
  var Fragment = e;
38503
38502
  var Lazy = t;
38504
38503
  var Memo = r;
38505
38504
  var Portal = d;
38506
- var Profiler = g;
38507
- var StrictMode = f;
38505
+ var Profiler = g$1;
38506
+ var StrictMode = f$1;
38508
38507
  var Suspense = p;
38509
38508
 
38510
38509
  var isAsyncMode = function (a) {
38511
- return A(a) || z(a) === l;
38510
+ return A$1(a) || z$1(a) === l;
38512
38511
  };
38513
38512
 
38514
- var isConcurrentMode = A;
38513
+ var isConcurrentMode = A$1;
38515
38514
 
38516
38515
  var isContextConsumer = function (a) {
38517
- return z(a) === k;
38516
+ return z$1(a) === k$1;
38518
38517
  };
38519
38518
 
38520
38519
  var isContextProvider = function (a) {
38521
- return z(a) === h;
38520
+ return z$1(a) === h$1;
38522
38521
  };
38523
38522
 
38524
- var isElement = function (a) {
38523
+ var isElement$1 = function (a) {
38525
38524
  return "object" === typeof a && null !== a && a.$$typeof === c;
38526
38525
  };
38527
38526
 
38528
38527
  var isForwardRef = function (a) {
38529
- return z(a) === n;
38528
+ return z$1(a) === n;
38530
38529
  };
38531
38530
 
38532
38531
  var isFragment = function (a) {
38533
- return z(a) === e;
38532
+ return z$1(a) === e;
38534
38533
  };
38535
38534
 
38536
38535
  var isLazy = function (a) {
38537
- return z(a) === t;
38536
+ return z$1(a) === t;
38538
38537
  };
38539
38538
 
38540
38539
  var isMemo = function (a) {
38541
- return z(a) === r;
38540
+ return z$1(a) === r;
38542
38541
  };
38543
38542
 
38544
38543
  var isPortal = function (a) {
38545
- return z(a) === d;
38544
+ return z$1(a) === d;
38546
38545
  };
38547
38546
 
38548
38547
  var isProfiler = function (a) {
38549
- return z(a) === g;
38548
+ return z$1(a) === g$1;
38550
38549
  };
38551
38550
 
38552
38551
  var isStrictMode = function (a) {
38553
- return z(a) === f;
38552
+ return z$1(a) === f$1;
38554
38553
  };
38555
38554
 
38556
38555
  var isSuspense = function (a) {
38557
- return z(a) === p;
38556
+ return z$1(a) === p;
38558
38557
  };
38559
38558
 
38560
38559
  var isValidElementType = function (a) {
38561
- return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
38560
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g$1 || a === f$1 || 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);
38562
38561
  };
38563
38562
 
38564
- var typeOf = z;
38563
+ var typeOf = z$1;
38565
38564
 
38566
38565
  var reactIs_production_min = {
38567
38566
  AsyncMode: AsyncMode,
@@ -38581,7 +38580,7 @@ var reactIs_production_min = {
38581
38580
  isConcurrentMode: isConcurrentMode,
38582
38581
  isContextConsumer: isContextConsumer,
38583
38582
  isContextProvider: isContextProvider,
38584
- isElement: isElement,
38583
+ isElement: isElement$1,
38585
38584
  isForwardRef: isForwardRef,
38586
38585
  isFragment: isFragment,
38587
38586
  isLazy: isLazy,
@@ -41741,7 +41740,9 @@ function attachHandlers(firebase, updateNotifications, updateAllFirebaseNotifica
41741
41740
  var today = getTodayDate();
41742
41741
  firebase.database().ref().child('ops-news').orderByChild('ends_at').startAt(today).on('value', function (snapshot) {
41743
41742
  compose(updateNotifications, filterNotificationsFireBase, mapNotifications, values$1)(snapshot.val());
41744
- compose(updateAllFirebaseNotificationsList, mapNotifications, values$1)(snapshot.val());
41743
+ setTimeout(function () {
41744
+ compose(updateAllFirebaseNotificationsList, mapNotifications, values$1)(snapshot.val());
41745
+ }, 500);
41745
41746
  });
41746
41747
  }
41747
41748
 
@@ -42185,6 +42186,11 @@ var AppBar = function AppBar(_ref) {
42185
42186
  firebaseInitialized = _useState20[0],
42186
42187
  setFirebaseinitialized = _useState20[1];
42187
42188
 
42189
+ var listOfAllNotificationsRef = React.useRef(listOfAllNotifications);
42190
+ React.useEffect(function () {
42191
+ listOfAllNotificationsRef.current = listOfAllNotifications;
42192
+ }, [listOfAllNotifications]);
42193
+
42188
42194
  var updateNotifications = function updateNotifications(newNotifications) {
42189
42195
  setNotifications(function (notifications) {
42190
42196
  return filterDuplicateAndSave(notifications, newNotifications);
@@ -42251,7 +42257,6 @@ var AppBar = function AppBar(_ref) {
42251
42257
  var _notification$newsTar;
42252
42258
 
42253
42259
  if (notification === null || notification === void 0 ? void 0 : (_notification$newsTar = notification.newsTarget) === null || _notification$newsTar === void 0 ? void 0 : _notification$newsTar.audience_value) {
42254
- removeNotification(notification);
42255
42260
  var startTime = moment.utc(notification.startsAt).local().format("YYYY-MM-DD HH:mm:ss");
42256
42261
  var currentDate = new Date();
42257
42262
 
@@ -42259,6 +42264,8 @@ var AppBar = function AppBar(_ref) {
42259
42264
  setListOfAllFirebaseNotifications(function (notifications) {
42260
42265
  return filterDuplicateAndSave(notifications, newNotifications);
42261
42266
  });
42267
+ } else {
42268
+ removeNotification(notification);
42262
42269
  }
42263
42270
  }
42264
42271
  });
@@ -42283,6 +42290,12 @@ var AppBar = function AppBar(_ref) {
42283
42290
  return !notificationIds.includes(notification.notificationId);
42284
42291
  });
42285
42292
  var filterednewNotifications = newNotifications.filter(function (notification) {
42293
+ if (notification.isFirebase && listOfAllNotificationsRef.current.find(function (n) {
42294
+ return n.notificationId === notification.notificationId;
42295
+ })) {
42296
+ return false;
42297
+ }
42298
+
42286
42299
  return !actionCompletedNotificationIds.includes(notification.notificationId);
42287
42300
  });
42288
42301
  return sortNotifications([].concat(_toConsumableArray(filterednewNotifications), _toConsumableArray(filteredNotifications)));
@@ -42391,7 +42404,7 @@ var AppBar = function AppBar(_ref) {
42391
42404
  if (listOfAllFirebaseNotifications.length) {
42392
42405
  compose(updateNotifications, filterNotificationsFireBase)(listOfAllFirebaseNotifications);
42393
42406
  }
42394
- }, 20000);
42407
+ }, 21000);
42395
42408
  return function () {
42396
42409
  clearInterval(interval);
42397
42410
  };
@@ -42967,20 +42980,26 @@ AutoRefresh.defaultProps = {
42967
42980
  version: ''
42968
42981
  };
42969
42982
 
42970
- var css_248z = ".utilities_ContextualHelp_ContextualHelp--snippet {\r\n padding: 15px;\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--title {\r\n font-size: 24px;\r\n color: #1d5ab9;\r\n font-weight: 600;\r\n margin-bottom: 5px;\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--linkedArticle {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n color: #1d5ab9;\r\n border-top: 3px solid #ccc;\r\n margin-top: 10px;\r\n font-size: 14px;\r\n padding-top: 10px;\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--linkedArticle p {\r\n cursor: pointer;\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--linkedArticle p i {\r\n font-size: 10px;\r\n color: #1d5ab9;\r\n position: relative;\r\n top: -3px;\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--linkedArticle.utilities_ContextualHelp_ContextualHelp--noLink {\r\n justify-content: flex-end;\r\n}\r\n";
42983
+ var css_248z = ".utilities_ContextualHelp_ContextualHelp--snippetContainer .utilities_ContextualHelp_ContextualHelp--snippet {\r\n padding: 5px;\r\n background-color: #fff;\r\n opacity: 1;\r\n z-index: 999;\r\n box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.2);\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--snippetContainer .utilities_ContextualHelp_ContextualHelp--snippet .utilities_ContextualHelp_ContextualHelp--snippet-arrow {\r\n box-shadow: 0px 0px 1px 1px rgba(0, 0, 0, 0.2);\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--title {\r\n font-size: 24px;\r\n color: #1d5ab9;\r\n font-weight: 600;\r\n margin-bottom: 5px;\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--linkedArticle {\r\n display: flex;\r\n justify-content: space-between;\r\n align-items: center;\r\n color: #1d5ab9;\r\n border-top: 3px solid #ccc;\r\n margin-top: 10px;\r\n font-size: 14px;\r\n padding-top: 10px;\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--linkedArticle p {\r\n cursor: pointer;\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--linkedArticle p i {\r\n font-size: 10px;\r\n color: #1d5ab9;\r\n position: relative;\r\n top: -3px;\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--linkedArticle.utilities_ContextualHelp_ContextualHelp--noLink {\r\n justify-content: flex-end;\r\n}\r\n.utilities_ContextualHelp_ContextualHelp--snippetContainer .utilities_ContextualHelp_ContextualHelp--snippetArticle {\r\n background-color: #fff;\r\n opacity: 1;\r\n z-index: 999;\r\n max-width: 400px;\r\n min-width: 250px;\r\n /* max-height: 500px; */\r\n min-height: 200px;\r\n overflow: auto;\r\n padding: 15px;\r\n}\r\n";
42971
42984
  styleInject(css_248z);
42972
42985
 
42973
42986
  var _styleModuleImportMap = {
42974
42987
  "./ContextualHelp.css": {
42988
+ "snippetContainer": "utilities_ContextualHelp_ContextualHelp--snippetContainer",
42975
42989
  "snippet": "utilities_ContextualHelp_ContextualHelp--snippet",
42990
+ "snippet-arrow": "utilities_ContextualHelp_ContextualHelp--snippet-arrow",
42976
42991
  "title": "utilities_ContextualHelp_ContextualHelp--title",
42977
42992
  "linkedArticle": "utilities_ContextualHelp_ContextualHelp--linkedArticle",
42978
- "noLink": "utilities_ContextualHelp_ContextualHelp--noLink"
42993
+ "noLink": "utilities_ContextualHelp_ContextualHelp--noLink",
42994
+ "snippetArticle": "utilities_ContextualHelp_ContextualHelp--snippetArticle"
42979
42995
  }
42980
42996
  };
42981
42997
 
42982
42998
  function Snippet(_ref) {
42983
- var article = _ref.article;
42999
+ var article = _ref.article,
43000
+ setTooltipStyles = _ref.setTooltipStyles,
43001
+ isMihelpEnabled = _ref.isMihelpEnabled,
43002
+ articleRef = _ref.articleRef;
42984
43003
 
42985
43004
  var OpenLinkedArticle = function OpenLinkedArticle() {
42986
43005
  var _article$linkedArticl;
@@ -42999,8 +43018,20 @@ function Snippet(_ref) {
42999
43018
  });
43000
43019
  };
43001
43020
 
43002
- return React__default["default"].createElement("div", {
43003
- className: "utilities_ContextualHelp_ContextualHelp--snippet"
43021
+ React.useEffect(function () {
43022
+ setTooltipStyles();
43023
+ }, []);
43024
+ return React__default["default"].createElement(React__default["default"].Fragment, null, !isMihelpEnabled ? React__default["default"].createElement("h3", {
43025
+ style: {
43026
+ color: 'rgba(224, 26, 26, 0.8)'
43027
+ }
43028
+ }, "Mihelp is not enabled for this app") : !article || !(article === null || article === void 0 ? void 0 : article.id) ? React__default["default"].createElement("h3", {
43029
+ style: {
43030
+ color: 'rgba(224, 26, 26, 0.8)'
43031
+ }
43032
+ }, "Article Not Found") : React__default["default"].createElement("div", {
43033
+ className: "utilities_ContextualHelp_ContextualHelp--snippetArticle",
43034
+ ref: articleRef
43004
43035
  }, React__default["default"].createElement("div", {
43005
43036
  className: "utilities_ContextualHelp_ContextualHelp--title"
43006
43037
  }, React__default["default"].createElement("span", {
@@ -43027,11 +43058,2416 @@ function Snippet(_ref) {
43027
43058
  color: '#1d5ab9',
43028
43059
  cursor: 'pointer'
43029
43060
  }
43030
- }))));
43061
+ })))));
43062
+ }
43063
+
43064
+ const min = Math.min;
43065
+ const max = Math.max;
43066
+ const round = Math.round;
43067
+ const floor = Math.floor;
43068
+
43069
+ const createCoords = v => ({
43070
+ x: v,
43071
+ y: v
43072
+ });
43073
+
43074
+ const oppositeSideMap = {
43075
+ left: 'right',
43076
+ right: 'left',
43077
+ bottom: 'top',
43078
+ top: 'bottom'
43079
+ };
43080
+ const oppositeAlignmentMap = {
43081
+ start: 'end',
43082
+ end: 'start'
43083
+ };
43084
+
43085
+ function clamp(start, value, end) {
43086
+ return max(start, min(value, end));
43087
+ }
43088
+
43089
+ function evaluate(value, param) {
43090
+ return typeof value === 'function' ? value(param) : value;
43091
+ }
43092
+
43093
+ function getSide(placement) {
43094
+ return placement.split('-')[0];
43095
+ }
43096
+
43097
+ function getAlignment(placement) {
43098
+ return placement.split('-')[1];
43099
+ }
43100
+
43101
+ function getOppositeAxis(axis) {
43102
+ return axis === 'x' ? 'y' : 'x';
43103
+ }
43104
+
43105
+ function getAxisLength(axis) {
43106
+ return axis === 'y' ? 'height' : 'width';
43107
+ }
43108
+
43109
+ function getSideAxis(placement) {
43110
+ return ['top', 'bottom'].includes(getSide(placement)) ? 'y' : 'x';
43111
+ }
43112
+
43113
+ function getAlignmentAxis(placement) {
43114
+ return getOppositeAxis(getSideAxis(placement));
43115
+ }
43116
+
43117
+ function getAlignmentSides(placement, rects, rtl) {
43118
+ if (rtl === void 0) {
43119
+ rtl = false;
43120
+ }
43121
+
43122
+ const alignment = getAlignment(placement);
43123
+ const alignmentAxis = getAlignmentAxis(placement);
43124
+ const length = getAxisLength(alignmentAxis);
43125
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
43126
+
43127
+ if (rects.reference[length] > rects.floating[length]) {
43128
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
43129
+ }
43130
+
43131
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
43132
+ }
43133
+
43134
+ function getExpandedPlacements(placement) {
43135
+ const oppositePlacement = getOppositePlacement(placement);
43136
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
43137
+ }
43138
+
43139
+ function getOppositeAlignmentPlacement(placement) {
43140
+ return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);
43141
+ }
43142
+
43143
+ function getSideList(side, isStart, rtl) {
43144
+ const lr = ['left', 'right'];
43145
+ const rl = ['right', 'left'];
43146
+ const tb = ['top', 'bottom'];
43147
+ const bt = ['bottom', 'top'];
43148
+
43149
+ switch (side) {
43150
+ case 'top':
43151
+ case 'bottom':
43152
+ if (rtl) return isStart ? rl : lr;
43153
+ return isStart ? lr : rl;
43154
+
43155
+ case 'left':
43156
+ case 'right':
43157
+ return isStart ? tb : bt;
43158
+
43159
+ default:
43160
+ return [];
43161
+ }
43162
+ }
43163
+
43164
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
43165
+ const alignment = getAlignment(placement);
43166
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
43167
+
43168
+ if (alignment) {
43169
+ list = list.map(side => side + "-" + alignment);
43170
+
43171
+ if (flipAlignment) {
43172
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
43173
+ }
43174
+ }
43175
+
43176
+ return list;
43177
+ }
43178
+
43179
+ function getOppositePlacement(placement) {
43180
+ return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);
43181
+ }
43182
+
43183
+ function expandPaddingObject(padding) {
43184
+ return {
43185
+ top: 0,
43186
+ right: 0,
43187
+ bottom: 0,
43188
+ left: 0,
43189
+ ...padding
43190
+ };
43191
+ }
43192
+
43193
+ function getPaddingObject(padding) {
43194
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
43195
+ top: padding,
43196
+ right: padding,
43197
+ bottom: padding,
43198
+ left: padding
43199
+ };
43200
+ }
43201
+
43202
+ function rectToClientRect(rect) {
43203
+ return { ...rect,
43204
+ top: rect.y,
43205
+ left: rect.x,
43206
+ right: rect.x + rect.width,
43207
+ bottom: rect.y + rect.height
43208
+ };
43209
+ }
43210
+
43211
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
43212
+ let {
43213
+ reference,
43214
+ floating
43215
+ } = _ref;
43216
+ const sideAxis = getSideAxis(placement);
43217
+ const alignmentAxis = getAlignmentAxis(placement);
43218
+ const alignLength = getAxisLength(alignmentAxis);
43219
+ const side = getSide(placement);
43220
+ const isVertical = sideAxis === 'y';
43221
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
43222
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
43223
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
43224
+ let coords;
43225
+
43226
+ switch (side) {
43227
+ case 'top':
43228
+ coords = {
43229
+ x: commonX,
43230
+ y: reference.y - floating.height
43231
+ };
43232
+ break;
43233
+
43234
+ case 'bottom':
43235
+ coords = {
43236
+ x: commonX,
43237
+ y: reference.y + reference.height
43238
+ };
43239
+ break;
43240
+
43241
+ case 'right':
43242
+ coords = {
43243
+ x: reference.x + reference.width,
43244
+ y: commonY
43245
+ };
43246
+ break;
43247
+
43248
+ case 'left':
43249
+ coords = {
43250
+ x: reference.x - floating.width,
43251
+ y: commonY
43252
+ };
43253
+ break;
43254
+
43255
+ default:
43256
+ coords = {
43257
+ x: reference.x,
43258
+ y: reference.y
43259
+ };
43260
+ }
43261
+
43262
+ switch (getAlignment(placement)) {
43263
+ case 'start':
43264
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
43265
+ break;
43266
+
43267
+ case 'end':
43268
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
43269
+ break;
43270
+ }
43271
+
43272
+ return coords;
43273
+ }
43274
+ /**
43275
+ * Computes the `x` and `y` coordinates that will place the floating element
43276
+ * next to a reference element when it is given a certain positioning strategy.
43277
+ *
43278
+ * This export does not have any `platform` interface logic. You will need to
43279
+ * write one for the platform you are using Floating UI with.
43280
+ */
43281
+
43282
+
43283
+ const computePosition$1 = async (reference, floating, config) => {
43284
+ const {
43285
+ placement = 'bottom',
43286
+ strategy = 'absolute',
43287
+ middleware = [],
43288
+ platform
43289
+ } = config;
43290
+ const validMiddleware = middleware.filter(Boolean);
43291
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
43292
+ let rects = await platform.getElementRects({
43293
+ reference,
43294
+ floating,
43295
+ strategy
43296
+ });
43297
+ let {
43298
+ x,
43299
+ y
43300
+ } = computeCoordsFromPlacement(rects, placement, rtl);
43301
+ let statefulPlacement = placement;
43302
+ let middlewareData = {};
43303
+ let resetCount = 0;
43304
+
43305
+ for (let i = 0; i < validMiddleware.length; i++) {
43306
+ const {
43307
+ name,
43308
+ fn
43309
+ } = validMiddleware[i];
43310
+ const {
43311
+ x: nextX,
43312
+ y: nextY,
43313
+ data,
43314
+ reset
43315
+ } = await fn({
43316
+ x,
43317
+ y,
43318
+ initialPlacement: placement,
43319
+ placement: statefulPlacement,
43320
+ strategy,
43321
+ middlewareData,
43322
+ rects,
43323
+ platform,
43324
+ elements: {
43325
+ reference,
43326
+ floating
43327
+ }
43328
+ });
43329
+ x = nextX != null ? nextX : x;
43330
+ y = nextY != null ? nextY : y;
43331
+ middlewareData = { ...middlewareData,
43332
+ [name]: { ...middlewareData[name],
43333
+ ...data
43334
+ }
43335
+ };
43336
+
43337
+ if (reset && resetCount <= 50) {
43338
+ resetCount++;
43339
+
43340
+ if (typeof reset === 'object') {
43341
+ if (reset.placement) {
43342
+ statefulPlacement = reset.placement;
43343
+ }
43344
+
43345
+ if (reset.rects) {
43346
+ rects = reset.rects === true ? await platform.getElementRects({
43347
+ reference,
43348
+ floating,
43349
+ strategy
43350
+ }) : reset.rects;
43351
+ }
43352
+
43353
+ ({
43354
+ x,
43355
+ y
43356
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
43357
+ }
43358
+
43359
+ i = -1;
43360
+ continue;
43361
+ }
43362
+ }
43363
+
43364
+ return {
43365
+ x,
43366
+ y,
43367
+ placement: statefulPlacement,
43368
+ strategy,
43369
+ middlewareData
43370
+ };
43371
+ };
43372
+ /**
43373
+ * Resolves with an object of overflow side offsets that determine how much the
43374
+ * element is overflowing a given clipping boundary on each side.
43375
+ * - positive = overflowing the boundary by that number of pixels
43376
+ * - negative = how many pixels left before it will overflow
43377
+ * - 0 = lies flush with the boundary
43378
+ * @see https://floating-ui.com/docs/detectOverflow
43379
+ */
43380
+
43381
+
43382
+ async function detectOverflow(state, options) {
43383
+ var _await$platform$isEle;
43384
+
43385
+ if (options === void 0) {
43386
+ options = {};
43387
+ }
43388
+
43389
+ const {
43390
+ x,
43391
+ y,
43392
+ platform,
43393
+ rects,
43394
+ elements,
43395
+ strategy
43396
+ } = state;
43397
+ const {
43398
+ boundary = 'clippingAncestors',
43399
+ rootBoundary = 'viewport',
43400
+ elementContext = 'floating',
43401
+ altBoundary = false,
43402
+ padding = 0
43403
+ } = evaluate(options, state);
43404
+ const paddingObject = getPaddingObject(padding);
43405
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
43406
+ const element = elements[altBoundary ? altContext : elementContext];
43407
+ const clippingClientRect = rectToClientRect((await platform.getClippingRect({
43408
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
43409
+ boundary,
43410
+ rootBoundary,
43411
+ strategy
43412
+ })));
43413
+ const rect = elementContext === 'floating' ? { ...rects.floating,
43414
+ x,
43415
+ y
43416
+ } : rects.reference;
43417
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
43418
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
43419
+ x: 1,
43420
+ y: 1
43421
+ } : {
43422
+ x: 1,
43423
+ y: 1
43424
+ };
43425
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
43426
+ rect,
43427
+ offsetParent,
43428
+ strategy
43429
+ }) : rect);
43430
+ return {
43431
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
43432
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
43433
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
43434
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
43435
+ };
43436
+ }
43437
+ /**
43438
+ * Provides data to position an inner element of the floating element so that it
43439
+ * appears centered to the reference element.
43440
+ * @see https://floating-ui.com/docs/arrow
43441
+ */
43442
+
43443
+
43444
+ const arrow = options => ({
43445
+ name: 'arrow',
43446
+ options,
43447
+
43448
+ async fn(state) {
43449
+ const {
43450
+ x,
43451
+ y,
43452
+ placement,
43453
+ rects,
43454
+ platform,
43455
+ elements
43456
+ } = state; // Since `element` is required, we don't Partial<> the type.
43457
+
43458
+ const {
43459
+ element,
43460
+ padding = 0
43461
+ } = evaluate(options, state) || {};
43462
+
43463
+ if (element == null) {
43464
+ return {};
43465
+ }
43466
+
43467
+ const paddingObject = getPaddingObject(padding);
43468
+ const coords = {
43469
+ x,
43470
+ y
43471
+ };
43472
+ const axis = getAlignmentAxis(placement);
43473
+ const length = getAxisLength(axis);
43474
+ const arrowDimensions = await platform.getDimensions(element);
43475
+ const isYAxis = axis === 'y';
43476
+ const minProp = isYAxis ? 'top' : 'left';
43477
+ const maxProp = isYAxis ? 'bottom' : 'right';
43478
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
43479
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
43480
+ const startDiff = coords[axis] - rects.reference[axis];
43481
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
43482
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0; // DOM platform can return `window` as the `offsetParent`.
43483
+
43484
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
43485
+ clientSize = elements.floating[clientProp] || rects.floating[length];
43486
+ }
43487
+
43488
+ const centerToReference = endDiff / 2 - startDiff / 2; // If the padding is large enough that it causes the arrow to no longer be
43489
+ // centered, modify the padding so that it is centered.
43490
+
43491
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
43492
+ const minPadding = min(paddingObject[minProp], largestPossiblePadding);
43493
+ const maxPadding = min(paddingObject[maxProp], largestPossiblePadding); // Make sure the arrow doesn't overflow the floating element if the center
43494
+ // point is outside the floating element's bounds.
43495
+
43496
+ const min$1 = minPadding;
43497
+ const max = clientSize - arrowDimensions[length] - maxPadding;
43498
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
43499
+ const offset = clamp(min$1, center, max); // If the reference is small enough that the arrow's padding causes it to
43500
+ // to point to nothing for an aligned placement, adjust the offset of the
43501
+ // floating element itself. This stops `shift()` from taking action, but can
43502
+ // be worked around by calling it again after the `arrow()` if desired.
43503
+
43504
+ const shouldAddOffset = getAlignment(placement) != null && center != offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
43505
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? min$1 - center : max - center : 0;
43506
+ return {
43507
+ [axis]: coords[axis] - alignmentOffset,
43508
+ data: {
43509
+ [axis]: offset,
43510
+ centerOffset: center - offset + alignmentOffset
43511
+ }
43512
+ };
43513
+ }
43514
+
43515
+ });
43516
+ /**
43517
+ * Optimizes the visibility of the floating element by flipping the `placement`
43518
+ * in order to keep it in view when the preferred placement(s) will overflow the
43519
+ * clipping boundary. Alternative to `autoPlacement`.
43520
+ * @see https://floating-ui.com/docs/flip
43521
+ */
43522
+
43523
+
43524
+ const flip = function (options) {
43525
+ if (options === void 0) {
43526
+ options = {};
43527
+ }
43528
+
43529
+ return {
43530
+ name: 'flip',
43531
+ options,
43532
+
43533
+ async fn(state) {
43534
+ var _middlewareData$flip;
43535
+
43536
+ const {
43537
+ placement,
43538
+ middlewareData,
43539
+ rects,
43540
+ initialPlacement,
43541
+ platform,
43542
+ elements
43543
+ } = state;
43544
+ const {
43545
+ mainAxis: checkMainAxis = true,
43546
+ crossAxis: checkCrossAxis = true,
43547
+ fallbackPlacements: specifiedFallbackPlacements,
43548
+ fallbackStrategy = 'bestFit',
43549
+ fallbackAxisSideDirection = 'none',
43550
+ flipAlignment = true,
43551
+ ...detectOverflowOptions
43552
+ } = evaluate(options, state);
43553
+ const side = getSide(placement);
43554
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
43555
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
43556
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
43557
+
43558
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== 'none') {
43559
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
43560
+ }
43561
+
43562
+ const placements = [initialPlacement, ...fallbackPlacements];
43563
+ const overflow = await detectOverflow(state, detectOverflowOptions);
43564
+ const overflows = [];
43565
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
43566
+
43567
+ if (checkMainAxis) {
43568
+ overflows.push(overflow[side]);
43569
+ }
43570
+
43571
+ if (checkCrossAxis) {
43572
+ const sides = getAlignmentSides(placement, rects, rtl);
43573
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
43574
+ }
43575
+
43576
+ overflowsData = [...overflowsData, {
43577
+ placement,
43578
+ overflows
43579
+ }]; // One or more sides is overflowing.
43580
+
43581
+ if (!overflows.every(side => side <= 0)) {
43582
+ var _middlewareData$flip2, _overflowsData$filter;
43583
+
43584
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
43585
+ const nextPlacement = placements[nextIndex];
43586
+
43587
+ if (nextPlacement) {
43588
+ // Try next placement and re-run the lifecycle.
43589
+ return {
43590
+ data: {
43591
+ index: nextIndex,
43592
+ overflows: overflowsData
43593
+ },
43594
+ reset: {
43595
+ placement: nextPlacement
43596
+ }
43597
+ };
43598
+ } // First, find the candidates that fit on the mainAxis side of overflow,
43599
+ // then find the placement that fits the best on the main crossAxis side.
43600
+
43601
+
43602
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement; // Otherwise fallback.
43603
+
43604
+ if (!resetPlacement) {
43605
+ switch (fallbackStrategy) {
43606
+ case 'bestFit':
43607
+ {
43608
+ var _overflowsData$map$so;
43609
+
43610
+ const placement = (_overflowsData$map$so = overflowsData.map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
43611
+
43612
+ if (placement) {
43613
+ resetPlacement = placement;
43614
+ }
43615
+
43616
+ break;
43617
+ }
43618
+
43619
+ case 'initialPlacement':
43620
+ resetPlacement = initialPlacement;
43621
+ break;
43622
+ }
43623
+ }
43624
+
43625
+ if (placement !== resetPlacement) {
43626
+ return {
43627
+ reset: {
43628
+ placement: resetPlacement
43629
+ }
43630
+ };
43631
+ }
43632
+ }
43633
+
43634
+ return {};
43635
+ }
43636
+
43637
+ };
43638
+ };
43639
+ // Derivable.
43640
+
43641
+
43642
+ async function convertValueToCoords(state, options) {
43643
+ const {
43644
+ placement,
43645
+ platform,
43646
+ elements
43647
+ } = state;
43648
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
43649
+ const side = getSide(placement);
43650
+ const alignment = getAlignment(placement);
43651
+ const isVertical = getSideAxis(placement) === 'y';
43652
+ const mainAxisMulti = ['left', 'top'].includes(side) ? -1 : 1;
43653
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
43654
+ const rawValue = evaluate(options, state); // eslint-disable-next-line prefer-const
43655
+
43656
+ let {
43657
+ mainAxis,
43658
+ crossAxis,
43659
+ alignmentAxis
43660
+ } = typeof rawValue === 'number' ? {
43661
+ mainAxis: rawValue,
43662
+ crossAxis: 0,
43663
+ alignmentAxis: null
43664
+ } : {
43665
+ mainAxis: 0,
43666
+ crossAxis: 0,
43667
+ alignmentAxis: null,
43668
+ ...rawValue
43669
+ };
43670
+
43671
+ if (alignment && typeof alignmentAxis === 'number') {
43672
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
43673
+ }
43674
+
43675
+ return isVertical ? {
43676
+ x: crossAxis * crossAxisMulti,
43677
+ y: mainAxis * mainAxisMulti
43678
+ } : {
43679
+ x: mainAxis * mainAxisMulti,
43680
+ y: crossAxis * crossAxisMulti
43681
+ };
43682
+ }
43683
+ /**
43684
+ * Modifies the placement by translating the floating element along the
43685
+ * specified axes.
43686
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
43687
+ * object may be passed.
43688
+ * @see https://floating-ui.com/docs/offset
43689
+ */
43690
+
43691
+
43692
+ const offset = function (options) {
43693
+ if (options === void 0) {
43694
+ options = 0;
43695
+ }
43696
+
43697
+ return {
43698
+ name: 'offset',
43699
+ options,
43700
+
43701
+ async fn(state) {
43702
+ const {
43703
+ x,
43704
+ y
43705
+ } = state;
43706
+ const diffCoords = await convertValueToCoords(state, options);
43707
+ return {
43708
+ x: x + diffCoords.x,
43709
+ y: y + diffCoords.y,
43710
+ data: diffCoords
43711
+ };
43712
+ }
43713
+
43714
+ };
43715
+ };
43716
+ /**
43717
+ * Optimizes the visibility of the floating element by shifting it in order to
43718
+ * keep it in view when it will overflow the clipping boundary.
43719
+ * @see https://floating-ui.com/docs/shift
43720
+ */
43721
+
43722
+
43723
+ const shift = function (options) {
43724
+ if (options === void 0) {
43725
+ options = {};
43726
+ }
43727
+
43728
+ return {
43729
+ name: 'shift',
43730
+ options,
43731
+
43732
+ async fn(state) {
43733
+ const {
43734
+ x,
43735
+ y,
43736
+ placement
43737
+ } = state;
43738
+ const {
43739
+ mainAxis: checkMainAxis = true,
43740
+ crossAxis: checkCrossAxis = false,
43741
+ limiter = {
43742
+ fn: _ref => {
43743
+ let {
43744
+ x,
43745
+ y
43746
+ } = _ref;
43747
+ return {
43748
+ x,
43749
+ y
43750
+ };
43751
+ }
43752
+ },
43753
+ ...detectOverflowOptions
43754
+ } = evaluate(options, state);
43755
+ const coords = {
43756
+ x,
43757
+ y
43758
+ };
43759
+ const overflow = await detectOverflow(state, detectOverflowOptions);
43760
+ const crossAxis = getSideAxis(getSide(placement));
43761
+ const mainAxis = getOppositeAxis(crossAxis);
43762
+ let mainAxisCoord = coords[mainAxis];
43763
+ let crossAxisCoord = coords[crossAxis];
43764
+
43765
+ if (checkMainAxis) {
43766
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
43767
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
43768
+ const min = mainAxisCoord + overflow[minSide];
43769
+ const max = mainAxisCoord - overflow[maxSide];
43770
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
43771
+ }
43772
+
43773
+ if (checkCrossAxis) {
43774
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
43775
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
43776
+ const min = crossAxisCoord + overflow[minSide];
43777
+ const max = crossAxisCoord - overflow[maxSide];
43778
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
43779
+ }
43780
+
43781
+ const limitedCoords = limiter.fn({ ...state,
43782
+ [mainAxis]: mainAxisCoord,
43783
+ [crossAxis]: crossAxisCoord
43784
+ });
43785
+ return { ...limitedCoords,
43786
+ data: {
43787
+ x: limitedCoords.x - x,
43788
+ y: limitedCoords.y - y
43789
+ }
43790
+ };
43791
+ }
43792
+
43793
+ };
43794
+ };
43795
+
43796
+ function getNodeName(node) {
43797
+ if (isNode$1(node)) {
43798
+ return (node.nodeName || '').toLowerCase();
43799
+ } // Mocked nodes in testing environments may not be instances of Node. By
43800
+ // returning `#document` an infinite loop won't occur.
43801
+ // https://github.com/floating-ui/floating-ui/issues/2317
43802
+
43803
+
43804
+ return '#document';
43805
+ }
43806
+
43807
+ function getWindow(node) {
43808
+ var _node$ownerDocument;
43809
+
43810
+ return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
43811
+ }
43812
+
43813
+ function getDocumentElement(node) {
43814
+ var _ref;
43815
+
43816
+ return (_ref = (isNode$1(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
43817
+ }
43818
+
43819
+ function isNode$1(value) {
43820
+ return value instanceof Node || value instanceof getWindow(value).Node;
43821
+ }
43822
+
43823
+ function isElement(value) {
43824
+ return value instanceof Element || value instanceof getWindow(value).Element;
43825
+ }
43826
+
43827
+ function isHTMLElement(value) {
43828
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
43829
+ }
43830
+
43831
+ function isShadowRoot(value) {
43832
+ // Browsers without `ShadowRoot` support.
43833
+ if (typeof ShadowRoot === 'undefined') {
43834
+ return false;
43835
+ }
43836
+
43837
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
43838
+ }
43839
+
43840
+ function isOverflowElement(element) {
43841
+ const {
43842
+ overflow,
43843
+ overflowX,
43844
+ overflowY,
43845
+ display
43846
+ } = getComputedStyle$1(element);
43847
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);
43848
+ }
43849
+
43850
+ function isTableElement(element) {
43851
+ return ['table', 'td', 'th'].includes(getNodeName(element));
43852
+ }
43853
+
43854
+ function isContainingBlock(element) {
43855
+ const webkit = isWebKit();
43856
+ const css = getComputedStyle$1(element); // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
43857
+
43858
+ return css.transform !== 'none' || css.perspective !== 'none' || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));
43859
+ }
43860
+
43861
+ function getContainingBlock(element) {
43862
+ let currentNode = getParentNode(element);
43863
+
43864
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
43865
+ if (isContainingBlock(currentNode)) {
43866
+ return currentNode;
43867
+ } else {
43868
+ currentNode = getParentNode(currentNode);
43869
+ }
43870
+ }
43871
+
43872
+ return null;
43873
+ }
43874
+
43875
+ function isWebKit() {
43876
+ if (typeof CSS === 'undefined' || !CSS.supports) return false;
43877
+ return CSS.supports('-webkit-backdrop-filter', 'none');
43878
+ }
43879
+
43880
+ function isLastTraversableNode(node) {
43881
+ return ['html', 'body', '#document'].includes(getNodeName(node));
43882
+ }
43883
+
43884
+ function getComputedStyle$1(element) {
43885
+ return getWindow(element).getComputedStyle(element);
43886
+ }
43887
+
43888
+ function getNodeScroll(element) {
43889
+ if (isElement(element)) {
43890
+ return {
43891
+ scrollLeft: element.scrollLeft,
43892
+ scrollTop: element.scrollTop
43893
+ };
43894
+ }
43895
+
43896
+ return {
43897
+ scrollLeft: element.pageXOffset,
43898
+ scrollTop: element.pageYOffset
43899
+ };
43900
+ }
43901
+
43902
+ function getParentNode(node) {
43903
+ if (getNodeName(node) === 'html') {
43904
+ return node;
43905
+ }
43906
+
43907
+ const result = // Step into the shadow DOM of the parent of a slotted node.
43908
+ node.assignedSlot || // DOM Element detected.
43909
+ node.parentNode || // ShadowRoot detected.
43910
+ isShadowRoot(node) && node.host || // Fallback.
43911
+ getDocumentElement(node);
43912
+ return isShadowRoot(result) ? result.host : result;
43913
+ }
43914
+
43915
+ function getNearestOverflowAncestor(node) {
43916
+ const parentNode = getParentNode(node);
43917
+
43918
+ if (isLastTraversableNode(parentNode)) {
43919
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
43920
+ }
43921
+
43922
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
43923
+ return parentNode;
43924
+ }
43925
+
43926
+ return getNearestOverflowAncestor(parentNode);
43927
+ }
43928
+
43929
+ function getOverflowAncestors(node, list) {
43930
+ var _node$ownerDocument2;
43931
+
43932
+ if (list === void 0) {
43933
+ list = [];
43934
+ }
43935
+
43936
+ const scrollableAncestor = getNearestOverflowAncestor(node);
43937
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
43938
+ const win = getWindow(scrollableAncestor);
43939
+
43940
+ if (isBody) {
43941
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : []);
43942
+ }
43943
+
43944
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
43945
+ }
43946
+
43947
+ function getCssDimensions(element) {
43948
+ const css = getComputedStyle$1(element); // In testing environments, the `width` and `height` properties are empty
43949
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
43950
+
43951
+ let width = parseFloat(css.width) || 0;
43952
+ let height = parseFloat(css.height) || 0;
43953
+ const hasOffset = isHTMLElement(element);
43954
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
43955
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
43956
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
43957
+
43958
+ if (shouldFallback) {
43959
+ width = offsetWidth;
43960
+ height = offsetHeight;
43961
+ }
43962
+
43963
+ return {
43964
+ width,
43965
+ height,
43966
+ $: shouldFallback
43967
+ };
43968
+ }
43969
+
43970
+ function unwrapElement(element) {
43971
+ return !isElement(element) ? element.contextElement : element;
43972
+ }
43973
+
43974
+ function getScale(element) {
43975
+ const domElement = unwrapElement(element);
43976
+
43977
+ if (!isHTMLElement(domElement)) {
43978
+ return createCoords(1);
43979
+ }
43980
+
43981
+ const rect = domElement.getBoundingClientRect();
43982
+ const {
43983
+ width,
43984
+ height,
43985
+ $
43986
+ } = getCssDimensions(domElement);
43987
+ let x = ($ ? round(rect.width) : rect.width) / width;
43988
+ let y = ($ ? round(rect.height) : rect.height) / height; // 0, NaN, or Infinity should always fallback to 1.
43989
+
43990
+ if (!x || !Number.isFinite(x)) {
43991
+ x = 1;
43992
+ }
43993
+
43994
+ if (!y || !Number.isFinite(y)) {
43995
+ y = 1;
43996
+ }
43997
+
43998
+ return {
43999
+ x,
44000
+ y
44001
+ };
44002
+ }
44003
+
44004
+ const noOffsets =
44005
+ /*#__PURE__*/
44006
+ createCoords(0);
44007
+
44008
+ function getVisualOffsets(element) {
44009
+ const win = getWindow(element);
44010
+
44011
+ if (!isWebKit() || !win.visualViewport) {
44012
+ return noOffsets;
44013
+ }
44014
+
44015
+ return {
44016
+ x: win.visualViewport.offsetLeft,
44017
+ y: win.visualViewport.offsetTop
44018
+ };
44019
+ }
44020
+
44021
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
44022
+ if (isFixed === void 0) {
44023
+ isFixed = false;
44024
+ }
44025
+
44026
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
44027
+ return false;
44028
+ }
44029
+
44030
+ return isFixed;
44031
+ }
44032
+
44033
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
44034
+ if (includeScale === void 0) {
44035
+ includeScale = false;
44036
+ }
44037
+
44038
+ if (isFixedStrategy === void 0) {
44039
+ isFixedStrategy = false;
44040
+ }
44041
+
44042
+ const clientRect = element.getBoundingClientRect();
44043
+ const domElement = unwrapElement(element);
44044
+ let scale = createCoords(1);
44045
+
44046
+ if (includeScale) {
44047
+ if (offsetParent) {
44048
+ if (isElement(offsetParent)) {
44049
+ scale = getScale(offsetParent);
44050
+ }
44051
+ } else {
44052
+ scale = getScale(element);
44053
+ }
44054
+ }
44055
+
44056
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
44057
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
44058
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
44059
+ let width = clientRect.width / scale.x;
44060
+ let height = clientRect.height / scale.y;
44061
+
44062
+ if (domElement) {
44063
+ const win = getWindow(domElement);
44064
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
44065
+ let currentIFrame = win.frameElement;
44066
+
44067
+ while (currentIFrame && offsetParent && offsetWin !== win) {
44068
+ const iframeScale = getScale(currentIFrame);
44069
+ const iframeRect = currentIFrame.getBoundingClientRect();
44070
+ const css = getComputedStyle$1(currentIFrame);
44071
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
44072
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
44073
+ x *= iframeScale.x;
44074
+ y *= iframeScale.y;
44075
+ width *= iframeScale.x;
44076
+ height *= iframeScale.y;
44077
+ x += left;
44078
+ y += top;
44079
+ currentIFrame = getWindow(currentIFrame).frameElement;
44080
+ }
44081
+ }
44082
+
44083
+ return rectToClientRect({
44084
+ width,
44085
+ height,
44086
+ x,
44087
+ y
44088
+ });
44089
+ }
44090
+
44091
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
44092
+ let {
44093
+ rect,
44094
+ offsetParent,
44095
+ strategy
44096
+ } = _ref;
44097
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
44098
+ const documentElement = getDocumentElement(offsetParent);
44099
+
44100
+ if (offsetParent === documentElement) {
44101
+ return rect;
44102
+ }
44103
+
44104
+ let scroll = {
44105
+ scrollLeft: 0,
44106
+ scrollTop: 0
44107
+ };
44108
+ let scale = createCoords(1);
44109
+ const offsets = createCoords(0);
44110
+
44111
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== 'fixed') {
44112
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
44113
+ scroll = getNodeScroll(offsetParent);
44114
+ }
44115
+
44116
+ if (isHTMLElement(offsetParent)) {
44117
+ const offsetRect = getBoundingClientRect(offsetParent);
44118
+ scale = getScale(offsetParent);
44119
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
44120
+ offsets.y = offsetRect.y + offsetParent.clientTop;
44121
+ }
44122
+ }
44123
+
44124
+ return {
44125
+ width: rect.width * scale.x,
44126
+ height: rect.height * scale.y,
44127
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
44128
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
44129
+ };
44130
+ }
44131
+
44132
+ function getClientRects(element) {
44133
+ return Array.from(element.getClientRects());
44134
+ }
44135
+
44136
+ function getWindowScrollBarX(element) {
44137
+ // If <html> has a CSS width greater than the viewport, then this will be
44138
+ // incorrect for RTL.
44139
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
44140
+ } // Gets the entire size of the scrollable document area, even extending outside
44141
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
44142
+
44143
+
44144
+ function getDocumentRect(element) {
44145
+ const html = getDocumentElement(element);
44146
+ const scroll = getNodeScroll(element);
44147
+ const body = element.ownerDocument.body;
44148
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
44149
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
44150
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
44151
+ const y = -scroll.scrollTop;
44152
+
44153
+ if (getComputedStyle$1(body).direction === 'rtl') {
44154
+ x += max(html.clientWidth, body.clientWidth) - width;
44155
+ }
44156
+
44157
+ return {
44158
+ width,
44159
+ height,
44160
+ x,
44161
+ y
44162
+ };
44163
+ }
44164
+
44165
+ function getViewportRect(element, strategy) {
44166
+ const win = getWindow(element);
44167
+ const html = getDocumentElement(element);
44168
+ const visualViewport = win.visualViewport;
44169
+ let width = html.clientWidth;
44170
+ let height = html.clientHeight;
44171
+ let x = 0;
44172
+ let y = 0;
44173
+
44174
+ if (visualViewport) {
44175
+ width = visualViewport.width;
44176
+ height = visualViewport.height;
44177
+ const visualViewportBased = isWebKit();
44178
+
44179
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
44180
+ x = visualViewport.offsetLeft;
44181
+ y = visualViewport.offsetTop;
44182
+ }
44183
+ }
44184
+
44185
+ return {
44186
+ width,
44187
+ height,
44188
+ x,
44189
+ y
44190
+ };
44191
+ } // Returns the inner client rect, subtracting scrollbars if present.
44192
+
44193
+
44194
+ function getInnerBoundingClientRect(element, strategy) {
44195
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
44196
+ const top = clientRect.top + element.clientTop;
44197
+ const left = clientRect.left + element.clientLeft;
44198
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
44199
+ const width = element.clientWidth * scale.x;
44200
+ const height = element.clientHeight * scale.y;
44201
+ const x = left * scale.x;
44202
+ const y = top * scale.y;
44203
+ return {
44204
+ width,
44205
+ height,
44206
+ x,
44207
+ y
44208
+ };
44209
+ }
44210
+
44211
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
44212
+ let rect;
44213
+
44214
+ if (clippingAncestor === 'viewport') {
44215
+ rect = getViewportRect(element, strategy);
44216
+ } else if (clippingAncestor === 'document') {
44217
+ rect = getDocumentRect(getDocumentElement(element));
44218
+ } else if (isElement(clippingAncestor)) {
44219
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
44220
+ } else {
44221
+ const visualOffsets = getVisualOffsets(element);
44222
+ rect = { ...clippingAncestor,
44223
+ x: clippingAncestor.x - visualOffsets.x,
44224
+ y: clippingAncestor.y - visualOffsets.y
44225
+ };
44226
+ }
44227
+
44228
+ return rectToClientRect(rect);
44229
+ }
44230
+
44231
+ function hasFixedPositionAncestor(element, stopNode) {
44232
+ const parentNode = getParentNode(element);
44233
+
44234
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
44235
+ return false;
44236
+ }
44237
+
44238
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
44239
+ } // A "clipping ancestor" is an `overflow` element with the characteristic of
44240
+ // clipping (or hiding) child elements. This returns all clipping ancestors
44241
+ // of the given element up the tree.
44242
+
44243
+
44244
+ function getClippingElementAncestors(element, cache) {
44245
+ const cachedResult = cache.get(element);
44246
+
44247
+ if (cachedResult) {
44248
+ return cachedResult;
44249
+ }
44250
+
44251
+ let result = getOverflowAncestors(element).filter(el => isElement(el) && getNodeName(el) !== 'body');
44252
+ let currentContainingBlockComputedStyle = null;
44253
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
44254
+ let currentNode = elementIsFixed ? getParentNode(element) : element; // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
44255
+
44256
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
44257
+ const computedStyle = getComputedStyle$1(currentNode);
44258
+ const currentNodeIsContaining = isContainingBlock(currentNode);
44259
+
44260
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
44261
+ currentContainingBlockComputedStyle = null;
44262
+ }
44263
+
44264
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && ['absolute', 'fixed'].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
44265
+
44266
+ if (shouldDropCurrentNode) {
44267
+ // Drop non-containing blocks.
44268
+ result = result.filter(ancestor => ancestor !== currentNode);
44269
+ } else {
44270
+ // Record last containing block for next iteration.
44271
+ currentContainingBlockComputedStyle = computedStyle;
44272
+ }
44273
+
44274
+ currentNode = getParentNode(currentNode);
44275
+ }
44276
+
44277
+ cache.set(element, result);
44278
+ return result;
44279
+ } // Gets the maximum area that the element is visible in due to any number of
44280
+ // clipping ancestors.
44281
+
44282
+
44283
+ function getClippingRect(_ref) {
44284
+ let {
44285
+ element,
44286
+ boundary,
44287
+ rootBoundary,
44288
+ strategy
44289
+ } = _ref;
44290
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
44291
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
44292
+ const firstClippingAncestor = clippingAncestors[0];
44293
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
44294
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
44295
+ accRect.top = max(rect.top, accRect.top);
44296
+ accRect.right = min(rect.right, accRect.right);
44297
+ accRect.bottom = min(rect.bottom, accRect.bottom);
44298
+ accRect.left = max(rect.left, accRect.left);
44299
+ return accRect;
44300
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
44301
+ return {
44302
+ width: clippingRect.right - clippingRect.left,
44303
+ height: clippingRect.bottom - clippingRect.top,
44304
+ x: clippingRect.left,
44305
+ y: clippingRect.top
44306
+ };
44307
+ }
44308
+
44309
+ function getDimensions(element) {
44310
+ return getCssDimensions(element);
44311
+ }
44312
+
44313
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
44314
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
44315
+ const documentElement = getDocumentElement(offsetParent);
44316
+ const isFixed = strategy === 'fixed';
44317
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
44318
+ let scroll = {
44319
+ scrollLeft: 0,
44320
+ scrollTop: 0
44321
+ };
44322
+ const offsets = createCoords(0);
44323
+
44324
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
44325
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
44326
+ scroll = getNodeScroll(offsetParent);
44327
+ }
44328
+
44329
+ if (isOffsetParentAnElement) {
44330
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
44331
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
44332
+ offsets.y = offsetRect.y + offsetParent.clientTop;
44333
+ } else if (documentElement) {
44334
+ offsets.x = getWindowScrollBarX(documentElement);
44335
+ }
44336
+ }
44337
+
44338
+ return {
44339
+ x: rect.left + scroll.scrollLeft - offsets.x,
44340
+ y: rect.top + scroll.scrollTop - offsets.y,
44341
+ width: rect.width,
44342
+ height: rect.height
44343
+ };
44344
+ }
44345
+
44346
+ function getTrueOffsetParent(element, polyfill) {
44347
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
44348
+ return null;
44349
+ }
44350
+
44351
+ if (polyfill) {
44352
+ return polyfill(element);
44353
+ }
44354
+
44355
+ return element.offsetParent;
44356
+ } // Gets the closest ancestor positioned element. Handles some edge cases,
44357
+ // such as table ancestors and cross browser bugs.
44358
+
44359
+
44360
+ function getOffsetParent(element, polyfill) {
44361
+ const window = getWindow(element);
44362
+
44363
+ if (!isHTMLElement(element)) {
44364
+ return window;
44365
+ }
44366
+
44367
+ let offsetParent = getTrueOffsetParent(element, polyfill);
44368
+
44369
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
44370
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
44371
+ }
44372
+
44373
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
44374
+ return window;
44375
+ }
44376
+
44377
+ return offsetParent || getContainingBlock(element) || window;
43031
44378
  }
43032
44379
 
44380
+ const getElementRects = async function (_ref) {
44381
+ let {
44382
+ reference,
44383
+ floating,
44384
+ strategy
44385
+ } = _ref;
44386
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
44387
+ const getDimensionsFn = this.getDimensions;
44388
+ return {
44389
+ reference: getRectRelativeToOffsetParent(reference, (await getOffsetParentFn(floating)), strategy),
44390
+ floating: {
44391
+ x: 0,
44392
+ y: 0,
44393
+ ...(await getDimensionsFn(floating))
44394
+ }
44395
+ };
44396
+ };
44397
+
44398
+ function isRTL(element) {
44399
+ return getComputedStyle$1(element).direction === 'rtl';
44400
+ }
44401
+
44402
+ const platform = {
44403
+ convertOffsetParentRelativeRectToViewportRelativeRect,
44404
+ getDocumentElement,
44405
+ getClippingRect,
44406
+ getOffsetParent,
44407
+ getElementRects,
44408
+ getClientRects,
44409
+ getDimensions,
44410
+ getScale,
44411
+ isElement,
44412
+ isRTL
44413
+ }; // https://samthor.au/2021/observing-dom/
44414
+
44415
+ function observeMove(element, onMove) {
44416
+ let io = null;
44417
+ let timeoutId;
44418
+ const root = getDocumentElement(element);
44419
+
44420
+ function cleanup() {
44421
+ clearTimeout(timeoutId);
44422
+ io && io.disconnect();
44423
+ io = null;
44424
+ }
44425
+
44426
+ function refresh(skip, threshold) {
44427
+ if (skip === void 0) {
44428
+ skip = false;
44429
+ }
44430
+
44431
+ if (threshold === void 0) {
44432
+ threshold = 1;
44433
+ }
44434
+
44435
+ cleanup();
44436
+ const {
44437
+ left,
44438
+ top,
44439
+ width,
44440
+ height
44441
+ } = element.getBoundingClientRect();
44442
+
44443
+ if (!skip) {
44444
+ onMove();
44445
+ }
44446
+
44447
+ if (!width || !height) {
44448
+ return;
44449
+ }
44450
+
44451
+ const insetTop = floor(top);
44452
+ const insetRight = floor(root.clientWidth - (left + width));
44453
+ const insetBottom = floor(root.clientHeight - (top + height));
44454
+ const insetLeft = floor(left);
44455
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
44456
+ const options = {
44457
+ rootMargin,
44458
+ threshold: max(0, min(1, threshold)) || 1
44459
+ };
44460
+ let isFirstUpdate = true;
44461
+
44462
+ function handleObserve(entries) {
44463
+ const ratio = entries[0].intersectionRatio;
44464
+
44465
+ if (ratio !== threshold) {
44466
+ if (!isFirstUpdate) {
44467
+ return refresh();
44468
+ }
44469
+
44470
+ if (!ratio) {
44471
+ timeoutId = setTimeout(() => {
44472
+ refresh(false, 1e-7);
44473
+ }, 100);
44474
+ } else {
44475
+ refresh(false, ratio);
44476
+ }
44477
+ }
44478
+
44479
+ isFirstUpdate = false;
44480
+ } // Older browsers don't support a `document` as the root and will throw an
44481
+ // error.
44482
+
44483
+
44484
+ try {
44485
+ io = new IntersectionObserver(handleObserve, { ...options,
44486
+ // Handle <iframe>s
44487
+ root: root.ownerDocument
44488
+ });
44489
+ } catch (e) {
44490
+ io = new IntersectionObserver(handleObserve, options);
44491
+ }
44492
+
44493
+ io.observe(element);
44494
+ }
44495
+
44496
+ refresh(true);
44497
+ return cleanup;
44498
+ }
44499
+ /**
44500
+ * Automatically updates the position of the floating element when necessary.
44501
+ * Should only be called when the floating element is mounted on the DOM or
44502
+ * visible on the screen.
44503
+ * @returns cleanup function that should be invoked when the floating element is
44504
+ * removed from the DOM or hidden from the screen.
44505
+ * @see https://floating-ui.com/docs/autoUpdate
44506
+ */
44507
+
44508
+
44509
+ function autoUpdate(reference, floating, update, options) {
44510
+ if (options === void 0) {
44511
+ options = {};
44512
+ }
44513
+
44514
+ const {
44515
+ ancestorScroll = true,
44516
+ ancestorResize = true,
44517
+ elementResize = typeof ResizeObserver === 'function',
44518
+ layoutShift = typeof IntersectionObserver === 'function',
44519
+ animationFrame = false
44520
+ } = options;
44521
+ const referenceEl = unwrapElement(reference);
44522
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
44523
+ ancestors.forEach(ancestor => {
44524
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
44525
+ passive: true
44526
+ });
44527
+ ancestorResize && ancestor.addEventListener('resize', update);
44528
+ });
44529
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
44530
+ let reobserveFrame = -1;
44531
+ let resizeObserver = null;
44532
+
44533
+ if (elementResize) {
44534
+ resizeObserver = new ResizeObserver(_ref => {
44535
+ let [firstEntry] = _ref;
44536
+
44537
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
44538
+ // Prevent update loops when using the `size` middleware.
44539
+ // https://github.com/floating-ui/floating-ui/issues/1740
44540
+ resizeObserver.unobserve(floating);
44541
+ cancelAnimationFrame(reobserveFrame);
44542
+ reobserveFrame = requestAnimationFrame(() => {
44543
+ resizeObserver && resizeObserver.observe(floating);
44544
+ });
44545
+ }
44546
+
44547
+ update();
44548
+ });
44549
+
44550
+ if (referenceEl && !animationFrame) {
44551
+ resizeObserver.observe(referenceEl);
44552
+ }
44553
+
44554
+ resizeObserver.observe(floating);
44555
+ }
44556
+
44557
+ let frameId;
44558
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
44559
+
44560
+ if (animationFrame) {
44561
+ frameLoop();
44562
+ }
44563
+
44564
+ function frameLoop() {
44565
+ const nextRefRect = getBoundingClientRect(reference);
44566
+
44567
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
44568
+ update();
44569
+ }
44570
+
44571
+ prevRefRect = nextRefRect;
44572
+ frameId = requestAnimationFrame(frameLoop);
44573
+ }
44574
+
44575
+ update();
44576
+ return () => {
44577
+ ancestors.forEach(ancestor => {
44578
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
44579
+ ancestorResize && ancestor.removeEventListener('resize', update);
44580
+ });
44581
+ cleanupIo && cleanupIo();
44582
+ resizeObserver && resizeObserver.disconnect();
44583
+ resizeObserver = null;
44584
+
44585
+ if (animationFrame) {
44586
+ cancelAnimationFrame(frameId);
44587
+ }
44588
+ };
44589
+ }
44590
+ /**
44591
+ * Computes the `x` and `y` coordinates that will place the floating element
44592
+ * next to a reference element when it is given a certain CSS positioning
44593
+ * strategy.
44594
+ */
44595
+
44596
+
44597
+ const computePosition = (reference, floating, options) => {
44598
+ // This caches the expensive `getClippingElementAncestors` function so that
44599
+ // multiple lifecycle resets re-use the same result. It only lives for a
44600
+ // single call. If other functions become expensive, we can add them as well.
44601
+ const cache = new Map();
44602
+ const mergedOptions = {
44603
+ platform,
44604
+ ...options
44605
+ };
44606
+ const platformWithCache = { ...mergedOptions.platform,
44607
+ _c: cache
44608
+ };
44609
+ return computePosition$1(reference, floating, { ...mergedOptions,
44610
+ platform: platformWithCache
44611
+ });
44612
+ };
44613
+
44614
+ var classnames = createCommonjsModule(function (module) {
44615
+ /*!
44616
+ Copyright (c) 2018 Jed Watson.
44617
+ Licensed under the MIT License (MIT), see
44618
+ http://jedwatson.github.io/classnames
44619
+ */
44620
+
44621
+ /* global define */
44622
+ (function () {
44623
+
44624
+ var hasOwn = {}.hasOwnProperty;
44625
+
44626
+ function classNames() {
44627
+ var classes = [];
44628
+
44629
+ for (var i = 0; i < arguments.length; i++) {
44630
+ var arg = arguments[i];
44631
+ if (!arg) continue;
44632
+ var argType = typeof arg;
44633
+
44634
+ if (argType === 'string' || argType === 'number') {
44635
+ classes.push(arg);
44636
+ } else if (Array.isArray(arg)) {
44637
+ if (arg.length) {
44638
+ var inner = classNames.apply(null, arg);
44639
+
44640
+ if (inner) {
44641
+ classes.push(inner);
44642
+ }
44643
+ }
44644
+ } else if (argType === 'object') {
44645
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
44646
+ classes.push(arg.toString());
44647
+ continue;
44648
+ }
44649
+
44650
+ for (var key in arg) {
44651
+ if (hasOwn.call(arg, key) && arg[key]) {
44652
+ classes.push(key);
44653
+ }
44654
+ }
44655
+ }
44656
+ }
44657
+
44658
+ return classes.join(' ');
44659
+ }
44660
+
44661
+ if (module.exports) {
44662
+ classNames.default = classNames;
44663
+ module.exports = classNames;
44664
+ } else {
44665
+ window.classNames = classNames;
44666
+ }
44667
+ })();
44668
+ });
44669
+
44670
+ /*
44671
+ * React Tooltip
44672
+ * {@link https://github.com/ReactTooltip/react-tooltip}
44673
+ * @copyright ReactTooltip Team
44674
+ * @license MIT
44675
+ */
44676
+ const f = "react-tooltip-core-styles",
44677
+ h = "react-tooltip-base-styles",
44678
+ w = {
44679
+ core: !1,
44680
+ base: !1
44681
+ };
44682
+
44683
+ function b({
44684
+ css: e,
44685
+ id: t = h,
44686
+ type: r = "base",
44687
+ ref: o
44688
+ }) {
44689
+ var n, l;
44690
+ if (!e || "undefined" == typeof document || w[r]) return;
44691
+ if ("core" === r && "undefined" != typeof process && (null === (n = null === process || void 0 === process ? void 0 : process.env) || void 0 === n ? void 0 : n.REACT_TOOLTIP_DISABLE_CORE_STYLES)) return;
44692
+ if ("base" !== r && "undefined" != typeof process && (null === (l = null === process || void 0 === process ? void 0 : process.env) || void 0 === l ? void 0 : l.REACT_TOOLTIP_DISABLE_BASE_STYLES)) return;
44693
+ "core" === r && (t = f), o || (o = {});
44694
+ const {
44695
+ insertAt: i
44696
+ } = o;
44697
+ if (document.getElementById(t)) return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);
44698
+ const c = document.head || document.getElementsByTagName("head")[0],
44699
+ s = document.createElement("style");
44700
+ s.id = t, s.type = "text/css", "top" === i && c.firstChild ? c.insertBefore(s, c.firstChild) : c.appendChild(s), s.styleSheet ? s.styleSheet.cssText = e : s.appendChild(document.createTextNode(e)), w[r] = !0;
44701
+ }
44702
+
44703
+ const E = (e, t, r) => {
44704
+ let o = null;
44705
+ return function (...n) {
44706
+ const l = () => {
44707
+ o = null, r || e.apply(this, n);
44708
+ };
44709
+
44710
+ r && !o && (e.apply(this, n), o = setTimeout(l, t)), r || (o && clearTimeout(o), o = setTimeout(l, t));
44711
+ };
44712
+ },
44713
+ _ = "DEFAULT_TOOLTIP_ID",
44714
+ g = {
44715
+ anchorRefs: new Set(),
44716
+ activeAnchor: {
44717
+ current: null
44718
+ },
44719
+ attach: () => {},
44720
+ detach: () => {},
44721
+ setActiveAnchor: () => {}
44722
+ },
44723
+ A = React.createContext({
44724
+ getTooltipData: () => g
44725
+ });
44726
+
44727
+ function L(e = _) {
44728
+ return React.useContext(A).getTooltipData(e);
44729
+ }
44730
+
44731
+ const R = "undefined" != typeof window ? React.useLayoutEffect : React.useEffect,
44732
+ N = e => {
44733
+ if (!(e instanceof HTMLElement || e instanceof SVGElement)) return !1;
44734
+ const t = getComputedStyle(e);
44735
+ return ["overflow", "overflow-x", "overflow-y"].some(e => {
44736
+ const r = t.getPropertyValue(e);
44737
+ return "auto" === r || "scroll" === r;
44738
+ });
44739
+ },
44740
+ x = e => {
44741
+ if (!e) return null;
44742
+ let t = e.parentElement;
44743
+
44744
+ for (; t;) {
44745
+ if (N(t)) return t;
44746
+ t = t.parentElement;
44747
+ }
44748
+
44749
+ return document.scrollingElement || document.documentElement;
44750
+ },
44751
+ k = async ({
44752
+ elementReference: e = null,
44753
+ tooltipReference: t = null,
44754
+ tooltipArrowReference: r = null,
44755
+ place: o = "top",
44756
+ offset: n = 10,
44757
+ strategy: l = "absolute",
44758
+ middlewares: i = [offset(Number(n)), flip(), shift({
44759
+ padding: 5
44760
+ })],
44761
+ border: c
44762
+ }) => {
44763
+ if (!e) return {
44764
+ tooltipStyles: {},
44765
+ tooltipArrowStyles: {},
44766
+ place: o
44767
+ };
44768
+ if (null === t) return {
44769
+ tooltipStyles: {},
44770
+ tooltipArrowStyles: {},
44771
+ place: o
44772
+ };
44773
+ const s = i;
44774
+ return r ? (s.push(arrow({
44775
+ element: r,
44776
+ padding: 5
44777
+ })), computePosition(e, t, {
44778
+ placement: o,
44779
+ strategy: l,
44780
+ middleware: s
44781
+ }).then(({
44782
+ x: e,
44783
+ y: t,
44784
+ placement: r,
44785
+ middlewareData: o
44786
+ }) => {
44787
+ var n, l;
44788
+ const i = {
44789
+ left: `${e}px`,
44790
+ top: `${t}px`,
44791
+ border: c
44792
+ },
44793
+ {
44794
+ x: s,
44795
+ y: a
44796
+ } = null !== (n = o.arrow) && void 0 !== n ? n : {
44797
+ x: 0,
44798
+ y: 0
44799
+ },
44800
+ d = null !== (l = {
44801
+ top: "bottom",
44802
+ right: "left",
44803
+ bottom: "top",
44804
+ left: "right"
44805
+ }[r.split("-")[0]]) && void 0 !== l ? l : "bottom",
44806
+ u = c && {
44807
+ top: {
44808
+ borderBottom: c,
44809
+ borderRight: c
44810
+ },
44811
+ right: {
44812
+ borderBottom: c,
44813
+ borderLeft: c
44814
+ },
44815
+ bottom: {
44816
+ borderTop: c,
44817
+ borderLeft: c
44818
+ },
44819
+ left: {
44820
+ borderTop: c,
44821
+ borderRight: c
44822
+ }
44823
+ }[r.split("-")[0]];
44824
+ let p = 0;
44825
+
44826
+ if (c) {
44827
+ const e = `${c}`.match(/(\d+)px/);
44828
+ p = (null == e ? void 0 : e[1]) ? Number(e[1]) : 1;
44829
+ }
44830
+
44831
+ return {
44832
+ tooltipStyles: i,
44833
+ tooltipArrowStyles: {
44834
+ left: null != s ? `${s}px` : "",
44835
+ top: null != a ? `${a}px` : "",
44836
+ right: "",
44837
+ bottom: "",
44838
+ ...u,
44839
+ [d]: `-${4 + p}px`
44840
+ },
44841
+ place: r
44842
+ };
44843
+ })) : computePosition(e, t, {
44844
+ placement: "bottom",
44845
+ strategy: l,
44846
+ middleware: s
44847
+ }).then(({
44848
+ x: e,
44849
+ y: t,
44850
+ placement: r
44851
+ }) => ({
44852
+ tooltipStyles: {
44853
+ left: `${e}px`,
44854
+ top: `${t}px`
44855
+ },
44856
+ tooltipArrowStyles: {},
44857
+ place: r
44858
+ }));
44859
+ };
44860
+
44861
+ var $ = "core-styles-module_tooltip__3vRRp",
44862
+ C = "core-styles-module_fixed__pcSol",
44863
+ I = "core-styles-module_arrow__cvMwQ",
44864
+ B = "core-styles-module_noArrow__xock6",
44865
+ j = "core-styles-module_clickable__ZuTTB",
44866
+ D = "core-styles-module_show__Nt9eE",
44867
+ H = {
44868
+ tooltip: "styles-module_tooltip__mnnfp",
44869
+ arrow: "styles-module_arrow__K0L3T",
44870
+ dark: "styles-module_dark__xNqje",
44871
+ light: "styles-module_light__Z6W-X",
44872
+ success: "styles-module_success__A2AKt",
44873
+ warning: "styles-module_warning__SCK0X",
44874
+ error: "styles-module_error__JvumD",
44875
+ info: "styles-module_info__BWdHW"
44876
+ };
44877
+
44878
+ const z = ({
44879
+ id: t,
44880
+ className: n,
44881
+ classNameArrow: l,
44882
+ variant: s = "dark",
44883
+ anchorId: a,
44884
+ anchorSelect: d,
44885
+ place: u = "top",
44886
+ offset: p = 10,
44887
+ events: v = ["hover"],
44888
+ openOnClick: f = !1,
44889
+ positionStrategy: h = "absolute",
44890
+ middlewares: w,
44891
+ wrapper: b,
44892
+ delayShow: S = 0,
44893
+ delayHide: _ = 0,
44894
+ float: g = !1,
44895
+ hidden: A = !1,
44896
+ noArrow: T = !1,
44897
+ clickable: O = !1,
44898
+ closeOnEsc: N = !1,
44899
+ closeOnScroll: z = !1,
44900
+ closeOnResize: q = !1,
44901
+ style: W,
44902
+ position: M,
44903
+ afterShow: P,
44904
+ afterHide: F,
44905
+ content: K,
44906
+ contentWrapperRef: U,
44907
+ isOpen: X,
44908
+ setIsOpen: Y,
44909
+ activeAnchor: V,
44910
+ setActiveAnchor: Z,
44911
+ border: G,
44912
+ opacity: J
44913
+ }) => {
44914
+ const Q = React.useRef(null),
44915
+ ee = React.useRef(null),
44916
+ te = React.useRef(null),
44917
+ re = React.useRef(null),
44918
+ [oe, ne] = React.useState(u),
44919
+ [le, ie] = React.useState({}),
44920
+ [ce, se] = React.useState({}),
44921
+ [ae, de] = React.useState(!1),
44922
+ [ue, pe] = React.useState(!1),
44923
+ ve = React.useRef(!1),
44924
+ me = React.useRef(null),
44925
+ {
44926
+ anchorRefs: ye,
44927
+ setActiveAnchor: fe
44928
+ } = L(t),
44929
+ he = React.useRef(!1),
44930
+ [we, be] = React.useState([]),
44931
+ Se = React.useRef(!1),
44932
+ Ee = f || v.includes("click");
44933
+ R(() => (Se.current = !0, () => {
44934
+ Se.current = !1;
44935
+ }), []), React.useEffect(() => {
44936
+ if (!ae) {
44937
+ const e = setTimeout(() => {
44938
+ pe(!1);
44939
+ }, 150);
44940
+ return () => {
44941
+ clearTimeout(e);
44942
+ };
44943
+ }
44944
+
44945
+ return () => null;
44946
+ }, [ae]);
44947
+
44948
+ const _e = e => {
44949
+ Se.current && (e && pe(!0), setTimeout(() => {
44950
+ Se.current && (null == Y || Y(e), void 0 === X && de(e));
44951
+ }, 10));
44952
+ };
44953
+
44954
+ React.useEffect(() => {
44955
+ if (void 0 === X) return () => null;
44956
+ X && pe(!0);
44957
+ const e = setTimeout(() => {
44958
+ de(X);
44959
+ }, 10);
44960
+ return () => {
44961
+ clearTimeout(e);
44962
+ };
44963
+ }, [X]), React.useEffect(() => {
44964
+ ae !== ve.current && (ve.current = ae, ae ? null == P || P() : null == F || F());
44965
+ }, [ae]);
44966
+
44967
+ const ge = (e = _) => {
44968
+ re.current && clearTimeout(re.current), re.current = setTimeout(() => {
44969
+ he.current || _e(!1);
44970
+ }, e);
44971
+ },
44972
+ Ae = e => {
44973
+ var t;
44974
+ if (!e) return;
44975
+ const r = null !== (t = e.currentTarget) && void 0 !== t ? t : e.target;
44976
+ if (!(null == r ? void 0 : r.isConnected)) return Z(null), void fe({
44977
+ current: null
44978
+ });
44979
+ S ? (te.current && clearTimeout(te.current), te.current = setTimeout(() => {
44980
+ _e(!0);
44981
+ }, S)) : _e(!0), Z(r), fe({
44982
+ current: r
44983
+ }), re.current && clearTimeout(re.current);
44984
+ },
44985
+ Te = () => {
44986
+ O ? ge(_ || 100) : _ ? ge() : _e(!1), te.current && clearTimeout(te.current);
44987
+ },
44988
+ Le = ({
44989
+ x: e,
44990
+ y: t
44991
+ }) => {
44992
+ k({
44993
+ place: u,
44994
+ offset: p,
44995
+ elementReference: {
44996
+ getBoundingClientRect: () => ({
44997
+ x: e,
44998
+ y: t,
44999
+ width: 0,
45000
+ height: 0,
45001
+ top: t,
45002
+ left: e,
45003
+ right: e,
45004
+ bottom: t
45005
+ })
45006
+ },
45007
+ tooltipReference: Q.current,
45008
+ tooltipArrowReference: ee.current,
45009
+ strategy: h,
45010
+ middlewares: w,
45011
+ border: G
45012
+ }).then(e => {
45013
+ Object.keys(e.tooltipStyles).length && ie(e.tooltipStyles), Object.keys(e.tooltipArrowStyles).length && se(e.tooltipArrowStyles), ne(e.place);
45014
+ });
45015
+ },
45016
+ Oe = e => {
45017
+ if (!e) return;
45018
+ const t = e,
45019
+ r = {
45020
+ x: t.clientX,
45021
+ y: t.clientY
45022
+ };
45023
+ Le(r), me.current = r;
45024
+ },
45025
+ Re = e => {
45026
+ Ae(e), _ && ge();
45027
+ },
45028
+ Ne = e => {
45029
+ var t;
45030
+ [document.querySelector(`[id='${a}']`), ...we].some(t => null == t ? void 0 : t.contains(e.target)) || (null === (t = Q.current) || void 0 === t ? void 0 : t.contains(e.target)) || (_e(!1), te.current && clearTimeout(te.current));
45031
+ },
45032
+ xe = E(Ae, 50, !0),
45033
+ ke = E(Te, 50, !0),
45034
+ $e = React.useCallback(() => {
45035
+ M ? Le(M) : g ? me.current && Le(me.current) : k({
45036
+ place: u,
45037
+ offset: p,
45038
+ elementReference: V,
45039
+ tooltipReference: Q.current,
45040
+ tooltipArrowReference: ee.current,
45041
+ strategy: h,
45042
+ middlewares: w,
45043
+ border: G
45044
+ }).then(e => {
45045
+ Se.current && (Object.keys(e.tooltipStyles).length && ie(e.tooltipStyles), Object.keys(e.tooltipArrowStyles).length && se(e.tooltipArrowStyles), ne(e.place));
45046
+ });
45047
+ }, [ae, V, K, W, u, p, h, M, g]);
45048
+
45049
+ React.useEffect(() => {
45050
+ var e, t;
45051
+ const r = new Set(ye);
45052
+ we.forEach(e => {
45053
+ r.add({
45054
+ current: e
45055
+ });
45056
+ });
45057
+ const o = document.querySelector(`[id='${a}']`);
45058
+ o && r.add({
45059
+ current: o
45060
+ });
45061
+
45062
+ const n = () => {
45063
+ _e(!1);
45064
+ },
45065
+ l = x(V),
45066
+ i = x(Q.current);
45067
+
45068
+ z && (window.addEventListener("scroll", n), null == l || l.addEventListener("scroll", n), null == i || i.addEventListener("scroll", n));
45069
+ let c = null;
45070
+ q ? window.addEventListener("resize", n) : V && Q.current && (c = autoUpdate(V, Q.current, $e, {
45071
+ ancestorResize: !0,
45072
+ elementResize: !0,
45073
+ layoutShift: !0
45074
+ }));
45075
+
45076
+ const s = e => {
45077
+ "Escape" === e.key && _e(!1);
45078
+ };
45079
+
45080
+ N && window.addEventListener("keydown", s);
45081
+ const d = [];
45082
+ Ee ? (window.addEventListener("click", Ne), d.push({
45083
+ event: "click",
45084
+ listener: Re
45085
+ })) : (d.push({
45086
+ event: "mouseenter",
45087
+ listener: xe
45088
+ }, {
45089
+ event: "mouseleave",
45090
+ listener: ke
45091
+ }, {
45092
+ event: "focus",
45093
+ listener: xe
45094
+ }, {
45095
+ event: "blur",
45096
+ listener: ke
45097
+ }), g && d.push({
45098
+ event: "mousemove",
45099
+ listener: Oe
45100
+ }));
45101
+
45102
+ const u = () => {
45103
+ he.current = !0;
45104
+ },
45105
+ p = () => {
45106
+ he.current = !1, Te();
45107
+ };
45108
+
45109
+ return O && !Ee && (null === (e = Q.current) || void 0 === e || e.addEventListener("mouseenter", u), null === (t = Q.current) || void 0 === t || t.addEventListener("mouseleave", p)), d.forEach(({
45110
+ event: e,
45111
+ listener: t
45112
+ }) => {
45113
+ r.forEach(r => {
45114
+ var o;
45115
+ null === (o = r.current) || void 0 === o || o.addEventListener(e, t);
45116
+ });
45117
+ }), () => {
45118
+ var e, t;
45119
+ z && (window.removeEventListener("scroll", n), null == l || l.removeEventListener("scroll", n), null == i || i.removeEventListener("scroll", n)), q ? window.removeEventListener("resize", n) : null == c || c(), Ee && window.removeEventListener("click", Ne), N && window.removeEventListener("keydown", s), O && !Ee && (null === (e = Q.current) || void 0 === e || e.removeEventListener("mouseenter", u), null === (t = Q.current) || void 0 === t || t.removeEventListener("mouseleave", p)), d.forEach(({
45120
+ event: e,
45121
+ listener: t
45122
+ }) => {
45123
+ r.forEach(r => {
45124
+ var o;
45125
+ null === (o = r.current) || void 0 === o || o.removeEventListener(e, t);
45126
+ });
45127
+ });
45128
+ };
45129
+ }, [V, $e, ue, ye, we, N, v]), React.useEffect(() => {
45130
+ let e = null != d ? d : "";
45131
+ !e && t && (e = `[data-tooltip-id='${t}']`);
45132
+ const r = new MutationObserver(r => {
45133
+ const o = [];
45134
+ r.forEach(r => {
45135
+ if ("attributes" === r.type && "data-tooltip-id" === r.attributeName) {
45136
+ r.target.getAttribute("data-tooltip-id") === t && o.push(r.target);
45137
+ }
45138
+
45139
+ if ("childList" === r.type && (V && [...r.removedNodes].some(e => {
45140
+ var t;
45141
+ return !!(null === (t = null == e ? void 0 : e.contains) || void 0 === t ? void 0 : t.call(e, V)) && (pe(!1), _e(!1), Z(null), te.current && clearTimeout(te.current), re.current && clearTimeout(re.current), !0);
45142
+ }), e)) try {
45143
+ const t = [...r.addedNodes].filter(e => 1 === e.nodeType);
45144
+ o.push(...t.filter(t => t.matches(e))), o.push(...t.flatMap(t => [...t.querySelectorAll(e)]));
45145
+ } catch (e) {}
45146
+ }), o.length && be(e => [...e, ...o]);
45147
+ });
45148
+ return r.observe(document.body, {
45149
+ childList: !0,
45150
+ subtree: !0,
45151
+ attributes: !0,
45152
+ attributeFilter: ["data-tooltip-id"]
45153
+ }), () => {
45154
+ r.disconnect();
45155
+ };
45156
+ }, [t, d, V]), React.useEffect(() => {
45157
+ $e();
45158
+ }, [$e]), React.useEffect(() => {
45159
+ if (!(null == U ? void 0 : U.current)) return () => null;
45160
+ const e = new ResizeObserver(() => {
45161
+ $e();
45162
+ });
45163
+ return e.observe(U.current), () => {
45164
+ e.disconnect();
45165
+ };
45166
+ }, [K, null == U ? void 0 : U.current]), React.useEffect(() => {
45167
+ var e;
45168
+ const t = document.querySelector(`[id='${a}']`),
45169
+ r = [...we, t];
45170
+ V && r.includes(V) || Z(null !== (e = we[0]) && void 0 !== e ? e : t);
45171
+ }, [a, we, V]), React.useEffect(() => () => {
45172
+ te.current && clearTimeout(te.current), re.current && clearTimeout(re.current);
45173
+ }, []), React.useEffect(() => {
45174
+ let e = d;
45175
+ if (!e && t && (e = `[data-tooltip-id='${t}']`), e) try {
45176
+ const t = Array.from(document.querySelectorAll(e));
45177
+ be(t);
45178
+ } catch (e) {
45179
+ be([]);
45180
+ }
45181
+ }, [t, d]);
45182
+ const Ce = !A && K && ae && Object.keys(le).length > 0;
45183
+ return ue ? React__default["default"].createElement(b, {
45184
+ id: t,
45185
+ role: "tooltip",
45186
+ className: classnames("react-tooltip", $, H.tooltip, H[s], n, `react-tooltip__place-${oe}`, {
45187
+ "react-tooltip__show": Ce,
45188
+ [D]: Ce,
45189
+ [C]: "fixed" === h,
45190
+ [j]: O
45191
+ }),
45192
+ style: { ...W,
45193
+ ...le,
45194
+ opacity: void 0 !== J && Ce ? J : void 0
45195
+ },
45196
+ ref: Q
45197
+ }, K, React__default["default"].createElement(b, {
45198
+ className: classnames("react-tooltip-arrow", I, H.arrow, l, {
45199
+ [B]: T
45200
+ }),
45201
+ style: ce,
45202
+ ref: ee
45203
+ })) : null;
45204
+ },
45205
+ q = ({
45206
+ content: t
45207
+ }) => React__default["default"].createElement("span", {
45208
+ dangerouslySetInnerHTML: {
45209
+ __html: t
45210
+ }
45211
+ }),
45212
+ W = ({
45213
+ id: t,
45214
+ anchorId: o,
45215
+ anchorSelect: n,
45216
+ content: l,
45217
+ html: s,
45218
+ render: a,
45219
+ className: d,
45220
+ classNameArrow: u,
45221
+ variant: p = "dark",
45222
+ place: v = "top",
45223
+ offset: m = 10,
45224
+ wrapper: y = "div",
45225
+ children: f = null,
45226
+ events: h = ["hover"],
45227
+ openOnClick: w = !1,
45228
+ positionStrategy: b = "absolute",
45229
+ middlewares: S,
45230
+ delayShow: E = 0,
45231
+ delayHide: _ = 0,
45232
+ float: g = !1,
45233
+ hidden: A = !1,
45234
+ noArrow: T = !1,
45235
+ clickable: O = !1,
45236
+ closeOnEsc: R = !1,
45237
+ closeOnScroll: N = !1,
45238
+ closeOnResize: x = !1,
45239
+ style: k,
45240
+ position: $,
45241
+ isOpen: C,
45242
+ disableStyleInjection: I = !1,
45243
+ border: B,
45244
+ opacity: j,
45245
+ setIsOpen: D,
45246
+ afterShow: H,
45247
+ afterHide: W
45248
+ }) => {
45249
+ const [M, P] = React.useState(l),
45250
+ [F, K] = React.useState(s),
45251
+ [U, X] = React.useState(v),
45252
+ [Y, V] = React.useState(p),
45253
+ [Z, G] = React.useState(m),
45254
+ [J, Q] = React.useState(E),
45255
+ [ee, te] = React.useState(_),
45256
+ [re, oe] = React.useState(g),
45257
+ [ne, le] = React.useState(A),
45258
+ [ie, ce] = React.useState(y),
45259
+ [se, ae] = React.useState(h),
45260
+ [de, ue] = React.useState(b),
45261
+ [pe, ve] = React.useState(null),
45262
+ me = React.useRef(I),
45263
+ {
45264
+ anchorRefs: ye,
45265
+ activeAnchor: fe
45266
+ } = L(t),
45267
+ he = e => null == e ? void 0 : e.getAttributeNames().reduce((t, r) => {
45268
+ var o;
45269
+
45270
+ if (r.startsWith("data-tooltip-")) {
45271
+ t[r.replace(/^data-tooltip-/, "")] = null !== (o = null == e ? void 0 : e.getAttribute(r)) && void 0 !== o ? o : null;
45272
+ }
45273
+
45274
+ return t;
45275
+ }, {}),
45276
+ we = e => {
45277
+ const t = {
45278
+ place: e => {
45279
+ var t;
45280
+ X(null !== (t = e) && void 0 !== t ? t : v);
45281
+ },
45282
+ content: e => {
45283
+ P(null != e ? e : l);
45284
+ },
45285
+ html: e => {
45286
+ K(null != e ? e : s);
45287
+ },
45288
+ variant: e => {
45289
+ var t;
45290
+ V(null !== (t = e) && void 0 !== t ? t : p);
45291
+ },
45292
+ offset: e => {
45293
+ G(null === e ? m : Number(e));
45294
+ },
45295
+ wrapper: e => {
45296
+ var t;
45297
+ ce(null !== (t = e) && void 0 !== t ? t : y);
45298
+ },
45299
+ events: e => {
45300
+ const t = null == e ? void 0 : e.split(" ");
45301
+ ae(null != t ? t : h);
45302
+ },
45303
+ "position-strategy": e => {
45304
+ var t;
45305
+ ue(null !== (t = e) && void 0 !== t ? t : b);
45306
+ },
45307
+ "delay-show": e => {
45308
+ Q(null === e ? E : Number(e));
45309
+ },
45310
+ "delay-hide": e => {
45311
+ te(null === e ? _ : Number(e));
45312
+ },
45313
+ float: e => {
45314
+ oe(null === e ? g : "true" === e);
45315
+ },
45316
+ hidden: e => {
45317
+ le(null === e ? A : "true" === e);
45318
+ }
45319
+ };
45320
+ Object.values(t).forEach(e => e(null)), Object.entries(e).forEach(([e, r]) => {
45321
+ var o;
45322
+ null === (o = t[e]) || void 0 === o || o.call(t, r);
45323
+ });
45324
+ };
45325
+
45326
+ React.useEffect(() => {
45327
+ P(l);
45328
+ }, [l]), React.useEffect(() => {
45329
+ K(s);
45330
+ }, [s]), React.useEffect(() => {
45331
+ X(v);
45332
+ }, [v]), React.useEffect(() => {
45333
+ V(p);
45334
+ }, [p]), React.useEffect(() => {
45335
+ G(m);
45336
+ }, [m]), React.useEffect(() => {
45337
+ Q(E);
45338
+ }, [E]), React.useEffect(() => {
45339
+ te(_);
45340
+ }, [_]), React.useEffect(() => {
45341
+ oe(g);
45342
+ }, [g]), React.useEffect(() => {
45343
+ le(A);
45344
+ }, [A]), React.useEffect(() => {
45345
+ ue(b);
45346
+ }, [b]), React.useEffect(() => {
45347
+ me.current !== I && console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.");
45348
+ }, [I]), React.useEffect(() => {
45349
+ "undefined" != typeof window && window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles", {
45350
+ detail: {
45351
+ disableCore: "core" === I,
45352
+ disableBase: I
45353
+ }
45354
+ }));
45355
+ }, []), React.useEffect(() => {
45356
+ var e;
45357
+ const r = new Set(ye);
45358
+ let l = n;
45359
+ if (!l && t && (l = `[data-tooltip-id='${t}']`), l) try {
45360
+ document.querySelectorAll(l).forEach(e => {
45361
+ r.add({
45362
+ current: e
45363
+ });
45364
+ });
45365
+ } catch (e) {
45366
+ console.warn(`[react-tooltip] "${l}" is not a valid CSS selector`);
45367
+ }
45368
+ const i = document.querySelector(`[id='${o}']`);
45369
+ if (i && r.add({
45370
+ current: i
45371
+ }), !r.size) return () => null;
45372
+ const c = null !== (e = null != pe ? pe : i) && void 0 !== e ? e : fe.current,
45373
+ s = new MutationObserver(e => {
45374
+ e.forEach(e => {
45375
+ var t;
45376
+ if (!c || "attributes" !== e.type || !(null === (t = e.attributeName) || void 0 === t ? void 0 : t.startsWith("data-tooltip-"))) return;
45377
+ const r = he(c);
45378
+ we(r);
45379
+ });
45380
+ }),
45381
+ a = {
45382
+ attributes: !0,
45383
+ childList: !1,
45384
+ subtree: !1
45385
+ };
45386
+
45387
+ if (c) {
45388
+ const e = he(c);
45389
+ we(e), s.observe(c, a);
45390
+ }
45391
+
45392
+ return () => {
45393
+ s.disconnect();
45394
+ };
45395
+ }, [ye, fe, pe, o, n]), React.useEffect(() => {
45396
+ (null == k ? void 0 : k.border) && console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."), B && !CSS.supports("border", `${B}`) && console.warn(`[react-tooltip] "${B}" is not a valid \`border\`.`), (null == k ? void 0 : k.opacity) && console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."), j && !CSS.supports("opacity", `${j}`) && console.warn(`[react-tooltip] "${j}" is not a valid \`opacity\`.`);
45397
+ }, []);
45398
+ let be = f;
45399
+ const Se = React.useRef(null);
45400
+
45401
+ if (a) {
45402
+ const t = a({
45403
+ content: null != M ? M : null,
45404
+ activeAnchor: pe
45405
+ });
45406
+ be = t ? React__default["default"].createElement("div", {
45407
+ ref: Se,
45408
+ className: "react-tooltip-content-wrapper"
45409
+ }, t) : null;
45410
+ } else M && (be = M);
45411
+
45412
+ F && (be = React__default["default"].createElement(q, {
45413
+ content: F
45414
+ }));
45415
+ const Ee = {
45416
+ id: t,
45417
+ anchorId: o,
45418
+ anchorSelect: n,
45419
+ className: d,
45420
+ classNameArrow: u,
45421
+ content: be,
45422
+ contentWrapperRef: Se,
45423
+ place: U,
45424
+ variant: Y,
45425
+ offset: Z,
45426
+ wrapper: ie,
45427
+ events: se,
45428
+ openOnClick: w,
45429
+ positionStrategy: de,
45430
+ middlewares: S,
45431
+ delayShow: J,
45432
+ delayHide: ee,
45433
+ float: re,
45434
+ hidden: ne,
45435
+ noArrow: T,
45436
+ clickable: O,
45437
+ closeOnEsc: R,
45438
+ closeOnScroll: N,
45439
+ closeOnResize: x,
45440
+ style: k,
45441
+ position: $,
45442
+ isOpen: C,
45443
+ border: B,
45444
+ opacity: j,
45445
+ setIsOpen: D,
45446
+ afterShow: H,
45447
+ afterHide: W,
45448
+ activeAnchor: pe,
45449
+ setActiveAnchor: e => ve(e)
45450
+ };
45451
+ return React__default["default"].createElement(z, { ...Ee
45452
+ });
45453
+ };
45454
+
45455
+ "undefined" != typeof window && window.addEventListener("react-tooltip-inject-styles", e => {
45456
+ e.detail.disableCore || b({
45457
+ css: `:root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9}.core-styles-module_tooltip__3vRRp{visibility:hidden;position:absolute;top:0;left:0;pointer-events:none;opacity:0;transition:opacity 0.3s ease-out;will-change:opacity,visibility}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{visibility:visible;opacity:var(--rt-opacity)}`,
45458
+ type: "core"
45459
+ }), e.detail.disableBase || b({
45460
+ css: `
45461
+ .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px;transform:rotate(45deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,
45462
+ type: "base"
45463
+ });
45464
+ });
45465
+
43033
45466
  function ContextualHelp(_ref) {
43034
45467
  var id = _ref.id;
45468
+ var snippetContainerRef = React.useRef();
45469
+ var snippetRef = React.useRef();
45470
+ var articleRef = React.useRef();
43035
45471
 
43036
45472
  var _useState = React.useState(null),
43037
45473
  _useState2 = _slicedToArray(_useState, 2),
@@ -43053,6 +45489,32 @@ function ContextualHelp(_ref) {
43053
45489
  isMihelpEnabled && getArticle();
43054
45490
  }, []);
43055
45491
 
45492
+ var setTooltipStyles = function setTooltipStyles() {
45493
+ if (snippetRef.current && snippetContainerRef.current) {
45494
+ var rect = snippetRef.current.getBoundingClientRect();
45495
+ var topSpace = rect.top;
45496
+ var bottomSpace = window.innerHeight - rect.bottom;
45497
+ var maxHeight = Math.max(topSpace, bottomSpace);
45498
+
45499
+ if (articleRef.current) {
45500
+ articleRef.current.style.maxHeight = "".concat(maxHeight - 45, "px");
45501
+ }
45502
+
45503
+ setTimeout(function () {
45504
+ var arrowEl = snippetContainerRef.current.querySelector('.snippet-arrow');
45505
+ var tooltipEl = snippetContainerRef.current.querySelector('.react-tooltip');
45506
+
45507
+ if (tooltipEl.classList.toString().includes('react-tooltip__place-bottom')) {
45508
+ arrowEl.style.borderLeft = '1px solid rgba(0, 0, 0, 0.2)';
45509
+ arrowEl.style.borderTop = '1px solid rgba(0, 0, 0, 0.2)';
45510
+ } else {
45511
+ arrowEl.style.borderRight = '1px solid rgba(0, 0, 0, 0.2)';
45512
+ arrowEl.style.borderBottom = '1px solid rgba(0, 0, 0, 0.2)';
45513
+ }
45514
+ }, 100);
45515
+ }
45516
+ };
45517
+
43056
45518
  var getArticle =
43057
45519
  /*#__PURE__*/
43058
45520
  function () {
@@ -43099,18 +45561,12 @@ function ContextualHelp(_ref) {
43099
45561
  };
43100
45562
  }();
43101
45563
 
43102
- return React__default["default"].createElement("div", null, React__default["default"].createElement(coreComponents.Tooltip, {
43103
- content: !isMihelpEnabled ? React__default["default"].createElement("h3", {
43104
- style: {
43105
- color: 'rgba(224, 26, 26, 0.8)'
43106
- }
43107
- }, "Mihelp is not enabled for this app") : !article || !(article === null || article === void 0 ? void 0 : article.id) ? React__default["default"].createElement("h3", {
43108
- style: {
43109
- color: 'rgba(224, 26, 26, 0.8)'
43110
- }
43111
- }, "Article Not Found") : React__default["default"].createElement(Snippet, {
43112
- article: article
43113
- })
45564
+ return React__default["default"].createElement("div", {
45565
+ className: "utilities_ContextualHelp_ContextualHelp--snippetContainer",
45566
+ ref: snippetContainerRef
45567
+ }, React__default["default"].createElement("span", {
45568
+ id: "helpSnippet1",
45569
+ ref: snippetRef
43114
45570
  }, React__default["default"].createElement(coreComponents.Icon, {
43115
45571
  name: "help",
43116
45572
  variant: "material",
@@ -43119,6 +45575,16 @@ function ContextualHelp(_ref) {
43119
45575
  color: '#1d5ab9',
43120
45576
  cursor: 'default'
43121
45577
  }
45578
+ })), React__default["default"].createElement(W, {
45579
+ anchorSelect: "#helpSnippet1",
45580
+ clickable: true,
45581
+ className: "utilities_ContextualHelp_ContextualHelp--snippet",
45582
+ classNameArrow: "snippet-arrow"
45583
+ }, React__default["default"].createElement(Snippet, {
45584
+ article: article,
45585
+ setTooltipStyles: setTooltipStyles,
45586
+ isMihelpEnabled: isMihelpEnabled,
45587
+ articleRef: articleRef
43122
45588
  })));
43123
45589
  }
43124
45590