@oliasoft-open-source/react-ui-library 4.18.1-beta-1 → 4.19.0-beta-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -11,11 +11,11 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
11
11
  var _docChanged, _ignoreNextExit, _suggesters, _next, _prev, _handlerMatches, _ignored, _removed, _lastChangeFromAppend, _a;
12
12
  import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
13
13
  import * as React$4 from "react";
14
- import React__default, { useContext, isValidElement, useState, useRef, useEffect, useCallback, createElement, forwardRef, useMemo, useLayoutEffect as useLayoutEffect$1, createContext, useReducer, useDebugValue, Fragment as Fragment$2, Component as Component$1, memo, cloneElement as cloneElement$1, PureComponent, useImperativeHandle } from "react";
14
+ import React__default, { useContext, isValidElement, useState, useRef, useEffect, useCallback, createElement, forwardRef, useMemo, useLayoutEffect as useLayoutEffect$1, createContext, useReducer, useDebugValue, Fragment as Fragment$2, memo as memo$1, cloneElement as cloneElement$1, PureComponent, useImperativeHandle } from "react";
15
15
  import * as PropTypes from "prop-types";
16
16
  import PropTypes__default from "prop-types";
17
- import ReactDOM, { createPortal, unstable_batchedUpdates, render } from "react-dom";
18
- import { noop as noop$2, set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$1, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$2, isObject as isObject$5, isEqual as isEqual$3 } from "lodash";
17
+ import ReactDOM, { createPortal, unstable_batchedUpdates, flushSync as flushSync$1, render } from "react-dom";
18
+ import { noop as noop$2, set, get as get$2, isString as isString$3, isNumber as isNumber$1, isBoolean as isBoolean$1, isFunction as isFunction$3, isEmpty, isArray as isArray$1, toNumber, debounce as debounce$3, isObject as isObject$5, isEqual as isEqual$3 } from "lodash";
19
19
  import { toString as toString$1, isScientificStringNum, roundToPrecision, toNum, validateNumber, cleanNumStr, stripLeadingZeros, roundToFixed, roundByMagnitude, unitFromQuantity, getUnit, KNOWN_UNITS, ALT_UNITS, isValueWithUnit, getValue, withUnit, convertSamePrecision, convertAndGetValue, split as split$1, label as label$b, isValidNum, getAltUnitsListByQuantity, altUnitsList, withPrettyUnitLabel, getUnitsForQuantity, roundByMagnitudeToFixed } from "@oliasoft-open-source/units";
20
20
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
21
21
  function getDefaultExportFromCjs(x2) {
@@ -222,32 +222,32 @@ function _setPrototypeOf$3(t, e2) {
222
222
  function _inheritsLoose$3(t, o) {
223
223
  t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf$3(t, o);
224
224
  }
225
- var extendStatics$1 = function(d2, b2) {
226
- extendStatics$1 = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
225
+ var extendStatics = function(d2, b2) {
226
+ extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
227
227
  d3.__proto__ = b3;
228
228
  } || function(d3, b3) {
229
229
  for (var p in b3) if (Object.prototype.hasOwnProperty.call(b3, p)) d3[p] = b3[p];
230
230
  };
231
- return extendStatics$1(d2, b2);
231
+ return extendStatics(d2, b2);
232
232
  };
233
- function __extends$1(d2, b2) {
233
+ function __extends(d2, b2) {
234
234
  if (typeof b2 !== "function" && b2 !== null)
235
235
  throw new TypeError("Class extends value " + String(b2) + " is not a constructor or null");
236
- extendStatics$1(d2, b2);
236
+ extendStatics(d2, b2);
237
237
  function __() {
238
238
  this.constructor = d2;
239
239
  }
240
240
  d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
241
241
  }
242
- var __assign$4 = function() {
243
- __assign$4 = Object.assign || function __assign2(t) {
242
+ var __assign$3 = function() {
243
+ __assign$3 = Object.assign || function __assign2(t) {
244
244
  for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
245
245
  s = arguments[i];
246
246
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
247
247
  }
248
248
  return t;
249
249
  };
250
- return __assign$4.apply(this, arguments);
250
+ return __assign$3.apply(this, arguments);
251
251
  };
252
252
  function __rest$1(s, e2) {
253
253
  var t = {};
@@ -883,15 +883,15 @@ var DefaultContext = {
883
883
  attr: void 0
884
884
  };
885
885
  var IconContext = React__default.createContext && React__default.createContext(DefaultContext);
886
- var __assign$3 = function() {
887
- __assign$3 = Object.assign || function(t) {
886
+ var __assign$2 = function() {
887
+ __assign$2 = Object.assign || function(t) {
888
888
  for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
889
889
  s = arguments[i];
890
890
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
891
891
  }
892
892
  return t;
893
893
  };
894
- return __assign$3.apply(this, arguments);
894
+ return __assign$2.apply(this, arguments);
895
895
  };
896
896
  var __rest = function(s, e2) {
897
897
  var t = {};
@@ -903,15 +903,15 @@ var __rest = function(s, e2) {
903
903
  };
904
904
  function Tree2Element(tree2) {
905
905
  return tree2 && tree2.map(function(node2, i) {
906
- return React__default.createElement(node2.tag, __assign$3({
906
+ return React__default.createElement(node2.tag, __assign$2({
907
907
  key: i
908
908
  }, node2.attr), Tree2Element(node2.child));
909
909
  });
910
910
  }
911
911
  function GenIcon(data) {
912
912
  return function(props) {
913
- return React__default.createElement(IconBase, __assign$3({
914
- attr: __assign$3({}, data.attr)
913
+ return React__default.createElement(IconBase, __assign$2({
914
+ attr: __assign$2({}, data.attr)
915
915
  }, props), Tree2Element(data.child));
916
916
  };
917
917
  }
@@ -922,13 +922,13 @@ function IconBase(props) {
922
922
  var className;
923
923
  if (conf.className) className = conf.className;
924
924
  if (props.className) className = (className ? className + " " : "") + props.className;
925
- return React__default.createElement("svg", __assign$3({
925
+ return React__default.createElement("svg", __assign$2({
926
926
  stroke: "currentColor",
927
927
  fill: "currentColor",
928
928
  strokeWidth: "0"
929
929
  }, conf.attr, attr, svgProps, {
930
930
  className,
931
- style: __assign$3(__assign$3({
931
+ style: __assign$2(__assign$2({
932
932
  color: props.color || conf.color
933
933
  }, conf.style), props.style),
934
934
  height: computedSize,
@@ -1808,7 +1808,7 @@ var requestAnimationFrame$1 = function() {
1808
1808
  };
1809
1809
  }();
1810
1810
  var trailingTimeout = 2;
1811
- function throttle$2(callback, delay) {
1811
+ function throttle$1(callback, delay) {
1812
1812
  var leadingCall = false, trailingCall = false, lastCallTime = 0;
1813
1813
  function resolvePending() {
1814
1814
  if (leadingCall) {
@@ -1850,7 +1850,7 @@ var ResizeObserverController$1 = (
1850
1850
  this.mutationsObserver_ = null;
1851
1851
  this.observers_ = [];
1852
1852
  this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
1853
- this.refresh = throttle$2(this.refresh.bind(this), REFRESH_DELAY);
1853
+ this.refresh = throttle$1(this.refresh.bind(this), REFRESH_DELAY);
1854
1854
  }
1855
1855
  ResizeObserverController2.prototype.addObserver = function(observer) {
1856
1856
  if (!~this.observers_.indexOf(observer)) {
@@ -2354,7 +2354,7 @@ function useEventSubscriptions() {
2354
2354
  };
2355
2355
  }, []);
2356
2356
  }
2357
- var useIsomorphicLayoutEffect$5 = typeof window !== "undefined" ? useLayoutEffect$1 : useEffect;
2357
+ var useIsomorphicLayoutEffect$6 = typeof window !== "undefined" ? useLayoutEffect$1 : useEffect;
2358
2358
  function useLastState(currentState, enabled) {
2359
2359
  var lastState = useRef(currentState);
2360
2360
  if (!enabled) {
@@ -2602,7 +2602,7 @@ function useTrackElements(_ref) {
2602
2602
  resetWhenReferenceChangedWhileTracking(previousTrigger, trigger2);
2603
2603
  }, [get3, set2, resetWhenReferenceChangedWhileTracking, getScrollContainers]));
2604
2604
  var triggerOptionParent = triggerOption == null ? void 0 : triggerOption.getParent == null ? void 0 : triggerOption.getParent();
2605
- useIsomorphicLayoutEffect$5(function() {
2605
+ useIsomorphicLayoutEffect$6(function() {
2606
2606
  if (!triggerOptionParent) {
2607
2607
  return;
2608
2608
  }
@@ -2612,7 +2612,7 @@ function useTrackElements(_ref) {
2612
2612
  });
2613
2613
  });
2614
2614
  }, [triggerOptionParent, set2, getScrollContainers]);
2615
- useIsomorphicLayoutEffect$5(function() {
2615
+ useIsomorphicLayoutEffect$6(function() {
2616
2616
  if (enabled) {
2617
2617
  if (!hasEventSubscriptions()) {
2618
2618
  addEventListeners();
@@ -2624,7 +2624,7 @@ function useTrackElements(_ref) {
2624
2624
  }
2625
2625
  };
2626
2626
  }, [enabled, hasEventSubscriptions, addEventListeners, removeAllEventSubscriptions]);
2627
- useIsomorphicLayoutEffect$5(function() {
2627
+ useIsomorphicLayoutEffect$6(function() {
2628
2628
  if (enabled) {
2629
2629
  handleChange();
2630
2630
  }
@@ -5308,15 +5308,15 @@ const Card = ({
5308
5308
  }
5309
5309
  );
5310
5310
  };
5311
- var __assign$2 = function() {
5312
- __assign$2 = Object.assign || function __assign2(t) {
5311
+ var __assign$1 = function() {
5312
+ __assign$1 = Object.assign || function __assign2(t) {
5313
5313
  for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
5314
5314
  s = arguments[i];
5315
5315
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
5316
5316
  }
5317
5317
  return t;
5318
5318
  };
5319
- return __assign$2.apply(this, arguments);
5319
+ return __assign$1.apply(this, arguments);
5320
5320
  };
5321
5321
  function __spreadArray$1(to2, from3, pack) {
5322
5322
  if (pack || arguments.length === 2) for (var i = 0, l = from3.length, ar2; i < l; i++) {
@@ -6149,7 +6149,7 @@ var Ie = function(e2) {
6149
6149
  function e2(e3, n2, o) {
6150
6150
  void 0 === e3 && (e3 = C), void 0 === n2 && (n2 = {});
6151
6151
  var r2 = this;
6152
- this.options = __assign$2(__assign$2({}, Te), e3), this.gs = n2, this.names = new Map(o), this.server = !!e3.isServer, !this.server && S && Re && (Re = false, _e(this)), ue(this, function() {
6152
+ this.options = __assign$1(__assign$1({}, Te), e3), this.gs = n2, this.names = new Map(o), this.server = !!e3.isServer, !this.server && S && Re && (Re = false, _e(this)), ue(this, function() {
6153
6153
  return function(e4) {
6154
6154
  for (var t = e4.getTag(), n3 = t.length, o2 = "", r3 = function(n4) {
6155
6155
  var r4 = function(e5) {
@@ -6172,7 +6172,7 @@ var Ie = function(e2) {
6172
6172
  }, e2.prototype.rehydrate = function() {
6173
6173
  !this.server && S && _e(this);
6174
6174
  }, e2.prototype.reconstructWithOptions = function(n2, o) {
6175
- return void 0 === o && (o = true), new e2(__assign$2(__assign$2({}, this.options), n2), this.gs, o && this.names || void 0);
6175
+ return void 0 === o && (o = true), new e2(__assign$1(__assign$1({}, this.options), n2), this.gs, o && this.names || void 0);
6176
6176
  }, e2.prototype.allocateGSInstance = function(e3) {
6177
6177
  return this.gs[e3] = (this.gs[e3] || 0) + 1;
6178
6178
  }, e2.prototype.getTag = function() {
@@ -6345,9 +6345,9 @@ function it$1(e2, r2, s) {
6345
6345
  var i2 = e4.attrs, a3 = e4.componentStyle, c3 = e4.defaultProps, p2 = e4.foldedComponentIds, d3 = e4.styledComponentId, h2 = e4.target, f3 = React__default.useContext(et$1), m3 = Ge(), y3 = e4.shouldForwardProp || m3.shouldForwardProp;
6346
6346
  "production" !== process.env.NODE_ENV && useDebugValue(d3);
6347
6347
  var v2 = I(r4, f3, c3) || C, g3 = function(e5, n2, o) {
6348
- for (var r5, s3 = __assign$2(__assign$2({}, n2), { className: void 0, theme: o }), i3 = 0; i3 < e5.length; i3 += 1) {
6348
+ for (var r5, s3 = __assign$1(__assign$1({}, n2), { className: void 0, theme: o }), i3 = 0; i3 < e5.length; i3 += 1) {
6349
6349
  var a4 = re(r5 = e5[i3]) ? r5(s3) : r5;
6350
- for (var c4 in a4) s3[c4] = "className" === c4 ? ie$2(s3[c4], a4[c4]) : "style" === c4 ? __assign$2(__assign$2({}, s3[c4]), a4[c4]) : a4[c4];
6350
+ for (var c4 in a4) s3[c4] = "className" === c4 ? ie$2(s3[c4], a4[c4]) : "style" === c4 ? __assign$1(__assign$1({}, s3[c4]), a4[c4]) : a4[c4];
6351
6351
  }
6352
6352
  return n2.className && (s3.className = ie$2(s3.className, n2.className)), s3;
6353
6353
  }(i2, r4, v2), S3 = g3.as || h2, w3 = {};
@@ -6403,9 +6403,9 @@ function ut(n2, o, r2) {
6403
6403
  return n2(o, r2, lt$1.apply(void 0, __spreadArray$1([t], s2, false)));
6404
6404
  };
6405
6405
  return s.attrs = function(e2) {
6406
- return ut(n2, o, __assign$2(__assign$2({}, r2), { attrs: Array.prototype.concat(r2.attrs, e2).filter(Boolean) }));
6406
+ return ut(n2, o, __assign$1(__assign$1({}, r2), { attrs: Array.prototype.concat(r2.attrs, e2).filter(Boolean) }));
6407
6407
  }, s.withConfig = function(e2) {
6408
- return ut(n2, o, __assign$2(__assign$2({}, r2), e2));
6408
+ return ut(n2, o, __assign$1(__assign$1({}, r2), e2));
6409
6409
  }, s;
6410
6410
  }
6411
6411
  var pt$1 = function(e2) {
@@ -9501,383 +9501,48 @@ const InputGroupAddon = ({
9501
9501
  })();
9502
9502
  return /* @__PURE__ */ jsx("span", { className: cx$2(styles$u.addon, order2, small2 ? styles$u.small : ""), children });
9503
9503
  };
9504
- /*! *****************************************************************************
9505
- Copyright (c) Microsoft Corporation. All rights reserved.
9506
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
9507
- this file except in compliance with the License. You may obtain a copy of the
9508
- License at http://www.apache.org/licenses/LICENSE-2.0
9509
-
9510
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
9511
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
9512
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
9513
- MERCHANTABLITY OR NON-INFRINGEMENT.
9514
-
9515
- See the Apache Version 2.0 License for specific language governing permissions
9516
- and limitations under the License.
9517
- ***************************************************************************** */
9518
- var extendStatics = function(d2, b2) {
9519
- extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d3, b3) {
9520
- d3.__proto__ = b3;
9521
- } || function(d3, b3) {
9522
- for (var p in b3) if (b3.hasOwnProperty(p)) d3[p] = b3[p];
9523
- };
9524
- return extendStatics(d2, b2);
9525
- };
9526
- function __extends(d2, b2) {
9527
- extendStatics(d2, b2);
9528
- function __() {
9529
- this.constructor = d2;
9530
- }
9531
- d2.prototype = b2 === null ? Object.create(b2) : (__.prototype = b2.prototype, new __());
9532
- }
9533
- var __assign$1 = function() {
9534
- __assign$1 = Object.assign || function __assign2(t) {
9535
- for (var s, i = 1, n2 = arguments.length; i < n2; i++) {
9536
- s = arguments[i];
9537
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
9538
- }
9539
- return t;
9540
- };
9541
- return __assign$1.apply(this, arguments);
9542
- };
9543
- function throttle$1(delay, noTrailing, callback, debounceMode) {
9544
- var timeoutID;
9545
- var cancelled = false;
9546
- var lastExec = 0;
9547
- function clearExistingTimeout() {
9548
- if (timeoutID) {
9549
- clearTimeout(timeoutID);
9550
- }
9551
- }
9552
- function cancel() {
9553
- clearExistingTimeout();
9554
- cancelled = true;
9555
- }
9556
- if (typeof noTrailing !== "boolean") {
9557
- debounceMode = callback;
9558
- callback = noTrailing;
9559
- noTrailing = void 0;
9560
- }
9561
- function wrapper2() {
9562
- var self2 = this;
9563
- var elapsed = Date.now() - lastExec;
9564
- var args = arguments;
9565
- if (cancelled) {
9566
- return;
9567
- }
9568
- function exec() {
9569
- lastExec = Date.now();
9570
- callback.apply(self2, args);
9571
- }
9572
- function clear() {
9573
- timeoutID = void 0;
9574
- }
9575
- if (debounceMode && !timeoutID) {
9576
- exec();
9577
- }
9578
- clearExistingTimeout();
9579
- if (debounceMode === void 0 && elapsed > delay) {
9580
- exec();
9581
- } else if (noTrailing !== true) {
9582
- timeoutID = setTimeout(debounceMode ? clear : exec, debounceMode === void 0 ? delay - elapsed : delay);
9583
- }
9584
- }
9585
- wrapper2.cancel = cancel;
9586
- return wrapper2;
9587
- }
9588
- var ThresholdUnits = {
9589
- Pixel: "Pixel",
9590
- Percent: "Percent"
9591
- };
9592
- var defaultThreshold$1 = {
9593
- unit: ThresholdUnits.Percent,
9594
- value: 0.8
9595
- };
9596
- function parseThreshold(scrollThreshold) {
9597
- if (typeof scrollThreshold === "number") {
9598
- return {
9599
- unit: ThresholdUnits.Percent,
9600
- value: scrollThreshold * 100
9601
- };
9602
- }
9603
- if (typeof scrollThreshold === "string") {
9604
- if (scrollThreshold.match(/^(\d*(\.\d+)?)px$/)) {
9605
- return {
9606
- unit: ThresholdUnits.Pixel,
9607
- value: parseFloat(scrollThreshold)
9608
- };
9609
- }
9610
- if (scrollThreshold.match(/^(\d*(\.\d+)?)%$/)) {
9611
- return {
9612
- unit: ThresholdUnits.Percent,
9613
- value: parseFloat(scrollThreshold)
9614
- };
9615
- }
9616
- console.warn('scrollThreshold format is invalid. Valid formats: "120px", "50%"...');
9617
- return defaultThreshold$1;
9618
- }
9619
- console.warn("scrollThreshold should be string or number");
9620
- return defaultThreshold$1;
9621
- }
9622
- var InfiniteScroll = (
9623
- /** @class */
9624
- function(_super) {
9625
- __extends(InfiniteScroll2, _super);
9626
- function InfiniteScroll2(props) {
9627
- var _this = _super.call(this, props) || this;
9628
- _this.lastScrollTop = 0;
9629
- _this.actionTriggered = false;
9630
- _this.startY = 0;
9631
- _this.currentY = 0;
9632
- _this.dragging = false;
9633
- _this.maxPullDownDistance = 0;
9634
- _this.getScrollableTarget = function() {
9635
- if (_this.props.scrollableTarget instanceof HTMLElement)
9636
- return _this.props.scrollableTarget;
9637
- if (typeof _this.props.scrollableTarget === "string") {
9638
- return document.getElementById(_this.props.scrollableTarget);
9639
- }
9640
- if (_this.props.scrollableTarget === null) {
9641
- console.warn("You are trying to pass scrollableTarget but it is null. This might\n happen because the element may not have been added to DOM yet.\n See https://github.com/ankeetmaini/react-infinite-scroll-component/issues/59 for more info.\n ");
9642
- }
9643
- return null;
9644
- };
9645
- _this.onStart = function(evt) {
9646
- if (_this.lastScrollTop)
9647
- return;
9648
- _this.dragging = true;
9649
- if (evt instanceof MouseEvent) {
9650
- _this.startY = evt.pageY;
9651
- } else if (evt instanceof TouchEvent) {
9652
- _this.startY = evt.touches[0].pageY;
9653
- }
9654
- _this.currentY = _this.startY;
9655
- if (_this._infScroll) {
9656
- _this._infScroll.style.willChange = "transform";
9657
- _this._infScroll.style.transition = "transform 0.2s cubic-bezier(0,0,0.31,1)";
9658
- }
9659
- };
9660
- _this.onMove = function(evt) {
9661
- if (!_this.dragging)
9662
- return;
9663
- if (evt instanceof MouseEvent) {
9664
- _this.currentY = evt.pageY;
9665
- } else if (evt instanceof TouchEvent) {
9666
- _this.currentY = evt.touches[0].pageY;
9667
- }
9668
- if (_this.currentY < _this.startY)
9669
- return;
9670
- if (_this.currentY - _this.startY >= Number(_this.props.pullDownToRefreshThreshold)) {
9671
- _this.setState({
9672
- pullToRefreshThresholdBreached: true
9673
- });
9674
- }
9675
- if (_this.currentY - _this.startY > _this.maxPullDownDistance * 1.5)
9676
- return;
9677
- if (_this._infScroll) {
9678
- _this._infScroll.style.overflow = "visible";
9679
- _this._infScroll.style.transform = "translate3d(0px, " + (_this.currentY - _this.startY) + "px, 0px)";
9680
- }
9681
- };
9682
- _this.onEnd = function() {
9683
- _this.startY = 0;
9684
- _this.currentY = 0;
9685
- _this.dragging = false;
9686
- if (_this.state.pullToRefreshThresholdBreached) {
9687
- _this.props.refreshFunction && _this.props.refreshFunction();
9688
- _this.setState({
9689
- pullToRefreshThresholdBreached: false
9690
- });
9691
- }
9692
- requestAnimationFrame(function() {
9693
- if (_this._infScroll) {
9694
- _this._infScroll.style.overflow = "auto";
9695
- _this._infScroll.style.transform = "none";
9696
- _this._infScroll.style.willChange = "unset";
9697
- }
9698
- });
9699
- };
9700
- _this.onScrollListener = function(event) {
9701
- if (typeof _this.props.onScroll === "function") {
9702
- setTimeout(function() {
9703
- return _this.props.onScroll && _this.props.onScroll(event);
9704
- }, 0);
9705
- }
9706
- var target = _this.props.height || _this._scrollableNode ? event.target : document.documentElement.scrollTop ? document.documentElement : document.body;
9707
- if (_this.actionTriggered)
9708
- return;
9709
- var atBottom = _this.props.inverse ? _this.isElementAtTop(target, _this.props.scrollThreshold) : _this.isElementAtBottom(target, _this.props.scrollThreshold);
9710
- if (atBottom && _this.props.hasMore) {
9711
- _this.actionTriggered = true;
9712
- _this.setState({ showLoader: true });
9713
- _this.props.next && _this.props.next();
9714
- }
9715
- _this.lastScrollTop = target.scrollTop;
9716
- };
9717
- _this.state = {
9718
- showLoader: false,
9719
- pullToRefreshThresholdBreached: false,
9720
- prevDataLength: props.dataLength
9721
- };
9722
- _this.throttledOnScrollListener = throttle$1(150, _this.onScrollListener).bind(_this);
9723
- _this.onStart = _this.onStart.bind(_this);
9724
- _this.onMove = _this.onMove.bind(_this);
9725
- _this.onEnd = _this.onEnd.bind(_this);
9726
- return _this;
9727
- }
9728
- InfiniteScroll2.prototype.componentDidMount = function() {
9729
- if (typeof this.props.dataLength === "undefined") {
9730
- throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');
9731
- }
9732
- this._scrollableNode = this.getScrollableTarget();
9733
- this.el = this.props.height ? this._infScroll : this._scrollableNode || window;
9734
- if (this.el) {
9735
- this.el.addEventListener("scroll", this.throttledOnScrollListener);
9736
- }
9737
- if (typeof this.props.initialScrollY === "number" && this.el && this.el instanceof HTMLElement && this.el.scrollHeight > this.props.initialScrollY) {
9738
- this.el.scrollTo(0, this.props.initialScrollY);
9739
- }
9740
- if (this.props.pullDownToRefresh && this.el) {
9741
- this.el.addEventListener("touchstart", this.onStart);
9742
- this.el.addEventListener("touchmove", this.onMove);
9743
- this.el.addEventListener("touchend", this.onEnd);
9744
- this.el.addEventListener("mousedown", this.onStart);
9745
- this.el.addEventListener("mousemove", this.onMove);
9746
- this.el.addEventListener("mouseup", this.onEnd);
9747
- this.maxPullDownDistance = this._pullDown && this._pullDown.firstChild && this._pullDown.firstChild.getBoundingClientRect().height || 0;
9748
- this.forceUpdate();
9749
- if (typeof this.props.refreshFunction !== "function") {
9750
- throw new Error(`Mandatory prop "refreshFunction" missing.
9751
- Pull Down To Refresh functionality will not work
9752
- as expected. Check README.md for usage'`);
9753
- }
9754
- }
9755
- };
9756
- InfiniteScroll2.prototype.componentWillUnmount = function() {
9757
- if (this.el) {
9758
- this.el.removeEventListener("scroll", this.throttledOnScrollListener);
9759
- if (this.props.pullDownToRefresh) {
9760
- this.el.removeEventListener("touchstart", this.onStart);
9761
- this.el.removeEventListener("touchmove", this.onMove);
9762
- this.el.removeEventListener("touchend", this.onEnd);
9763
- this.el.removeEventListener("mousedown", this.onStart);
9764
- this.el.removeEventListener("mousemove", this.onMove);
9765
- this.el.removeEventListener("mouseup", this.onEnd);
9766
- }
9767
- }
9768
- };
9769
- InfiniteScroll2.prototype.componentDidUpdate = function(prevProps) {
9770
- if (this.props.dataLength === prevProps.dataLength)
9771
- return;
9772
- this.actionTriggered = false;
9773
- this.setState({
9774
- showLoader: false
9775
- });
9776
- };
9777
- InfiniteScroll2.getDerivedStateFromProps = function(nextProps, prevState) {
9778
- var dataLengthChanged = nextProps.dataLength !== prevState.prevDataLength;
9779
- if (dataLengthChanged) {
9780
- return __assign$1(__assign$1({}, prevState), { prevDataLength: nextProps.dataLength });
9781
- }
9782
- return null;
9783
- };
9784
- InfiniteScroll2.prototype.isElementAtTop = function(target, scrollThreshold) {
9785
- if (scrollThreshold === void 0) {
9786
- scrollThreshold = 0.8;
9787
- }
9788
- var clientHeight = target === document.body || target === document.documentElement ? window.screen.availHeight : target.clientHeight;
9789
- var threshold = parseThreshold(scrollThreshold);
9790
- if (threshold.unit === ThresholdUnits.Pixel) {
9791
- return target.scrollTop <= threshold.value + clientHeight - target.scrollHeight + 1;
9792
- }
9793
- return target.scrollTop <= threshold.value / 100 + clientHeight - target.scrollHeight + 1;
9794
- };
9795
- InfiniteScroll2.prototype.isElementAtBottom = function(target, scrollThreshold) {
9796
- if (scrollThreshold === void 0) {
9797
- scrollThreshold = 0.8;
9798
- }
9799
- var clientHeight = target === document.body || target === document.documentElement ? window.screen.availHeight : target.clientHeight;
9800
- var threshold = parseThreshold(scrollThreshold);
9801
- if (threshold.unit === ThresholdUnits.Pixel) {
9802
- return target.scrollTop + clientHeight >= target.scrollHeight - threshold.value;
9803
- }
9804
- return target.scrollTop + clientHeight >= threshold.value / 100 * target.scrollHeight;
9805
- };
9806
- InfiniteScroll2.prototype.render = function() {
9807
- var _this = this;
9808
- var style = __assign$1({ height: this.props.height || "auto", overflow: "auto", WebkitOverflowScrolling: "touch" }, this.props.style);
9809
- var hasChildren2 = this.props.hasChildren || !!(this.props.children && this.props.children instanceof Array && this.props.children.length);
9810
- var outerDivStyle = this.props.pullDownToRefresh && this.props.height ? { overflow: "auto" } : {};
9811
- return React__default.createElement(
9812
- "div",
9813
- { style: outerDivStyle, className: "infinite-scroll-component__outerdiv" },
9814
- React__default.createElement(
9815
- "div",
9816
- { className: "infinite-scroll-component " + (this.props.className || ""), ref: function(infScroll) {
9817
- return _this._infScroll = infScroll;
9818
- }, style },
9819
- this.props.pullDownToRefresh && React__default.createElement(
9820
- "div",
9821
- { style: { position: "relative" }, ref: function(pullDown) {
9822
- return _this._pullDown = pullDown;
9823
- } },
9824
- React__default.createElement("div", { style: {
9825
- position: "absolute",
9826
- left: 0,
9827
- right: 0,
9828
- top: -1 * this.maxPullDownDistance
9829
- } }, this.state.pullToRefreshThresholdBreached ? this.props.releaseToRefreshContent : this.props.pullDownToRefreshContent)
9830
- ),
9831
- this.props.children,
9832
- !this.state.showLoader && !hasChildren2 && this.props.hasMore && this.props.loader,
9833
- this.state.showLoader && this.props.hasMore && this.props.loader,
9834
- !this.props.hasMore && this.props.endMessage
9835
- )
9836
- );
9837
- };
9838
- return InfiniteScroll2;
9839
- }(Component$1)
9840
- );
9841
- const inputInTable$8 = "_inputInTable_7sjlf_1";
9842
- const inputHover$8 = "_inputHover_7sjlf_13";
9843
- const inputFocus$8 = "_inputFocus_7sjlf_18";
9844
- const inputError$8 = "_inputError_7sjlf_25";
9845
- const inputWarning$8 = "_inputWarning_7sjlf_26";
9846
- const inputDisabled$8 = "_inputDisabled_7sjlf_61";
9847
- const hideScrollbars$8 = "_hideScrollbars_7sjlf_67";
9848
- const header$1 = "_header_7sjlf_77";
9849
- const headerTitle = "_headerTitle_7sjlf_77";
9850
- const heading$3 = "_heading_7sjlf_78";
9851
- const itemHeader = "_itemHeader_7sjlf_78";
9852
- const narrow = "_narrow_7sjlf_81";
9853
- const stickyHeader = "_stickyHeader_7sjlf_85";
9854
- const title$3 = "_title_7sjlf_96";
9855
- const name = "_name_7sjlf_102";
9856
- const iconTooltipMargin = "_iconTooltipMargin_7sjlf_105";
9857
- const bold = "_bold_7sjlf_108";
9858
- const toggleNarrow = "_toggleNarrow_7sjlf_117";
9859
- const drag$1 = "_drag_7sjlf_135";
9860
- const dragOverlay$1 = "_dragOverlay_7sjlf_156";
9861
- const list$1 = "_list_7sjlf_161";
9862
- const bordered$1 = "_bordered_7sjlf_165";
9863
- const item$4 = "_item_7sjlf_78";
9864
- const action = "_action_7sjlf_198";
9865
- const active$3 = "_active_7sjlf_201";
9866
- const indented = "_indented_7sjlf_208";
9867
- const disabled$5 = "_disabled_7sjlf_221";
9868
- const label$6 = "_label_7sjlf_232";
9869
- const details$2 = "_details_7sjlf_243";
9870
- const metadata = "_metadata_7sjlf_244";
9871
- const itemContent = "_itemContent_7sjlf_252";
9872
- const indentIcon = "_indentIcon_7sjlf_259";
9873
- const expandIcon = "_expandIcon_7sjlf_264";
9874
- const expanded = "_expanded_7sjlf_271";
9875
- const right$4 = "_right_7sjlf_274";
9876
- const actions = "_actions_7sjlf_282";
9877
- const scrollableList = "_scrollableList_7sjlf_287";
9878
- const infiniteScrollContainer = "_infiniteScrollContainer_7sjlf_292";
9879
- const hideScrollbar = "_hideScrollbar_7sjlf_67";
9880
- const noPointerEvents = "_noPointerEvents_7sjlf_309";
9504
+ const inputInTable$8 = "_inputInTable_1wss1_1";
9505
+ const inputHover$8 = "_inputHover_1wss1_13";
9506
+ const inputFocus$8 = "_inputFocus_1wss1_18";
9507
+ const inputError$8 = "_inputError_1wss1_25";
9508
+ const inputWarning$8 = "_inputWarning_1wss1_26";
9509
+ const inputDisabled$8 = "_inputDisabled_1wss1_61";
9510
+ const hideScrollbars$8 = "_hideScrollbars_1wss1_67";
9511
+ const list$1 = "_list_1wss1_77";
9512
+ const bordered$1 = "_bordered_1wss1_83";
9513
+ const virtualRow = "_virtualRow_1wss1_87";
9514
+ const item$4 = "_item_1wss1_87";
9515
+ const header$1 = "_header_1wss1_90";
9516
+ const headerTitle = "_headerTitle_1wss1_90";
9517
+ const heading$3 = "_heading_1wss1_91";
9518
+ const itemHeader = "_itemHeader_1wss1_91";
9519
+ const narrow = "_narrow_1wss1_94";
9520
+ const stickyHeader = "_stickyHeader_1wss1_98";
9521
+ const title$3 = "_title_1wss1_109";
9522
+ const name = "_name_1wss1_115";
9523
+ const iconTooltipMargin = "_iconTooltipMargin_1wss1_119";
9524
+ const bold = "_bold_1wss1_122";
9525
+ const toggleNarrow = "_toggleNarrow_1wss1_133";
9526
+ const drag$1 = "_drag_1wss1_151";
9527
+ const dragOverlay$1 = "_dragOverlay_1wss1_172";
9528
+ const listContent = "_listContent_1wss1_177";
9529
+ const action = "_action_1wss1_202";
9530
+ const active$3 = "_active_1wss1_205";
9531
+ const indented = "_indented_1wss1_212";
9532
+ const disabled$5 = "_disabled_1wss1_225";
9533
+ const label$6 = "_label_1wss1_236";
9534
+ const details$2 = "_details_1wss1_247";
9535
+ const metadata = "_metadata_1wss1_248";
9536
+ const itemContent = "_itemContent_1wss1_256";
9537
+ const indentIcon = "_indentIcon_1wss1_263";
9538
+ const expandIcon = "_expandIcon_1wss1_268";
9539
+ const expanded = "_expanded_1wss1_275";
9540
+ const right$4 = "_right_1wss1_278";
9541
+ const actions = "_actions_1wss1_286";
9542
+ const scrollableList = "_scrollableList_1wss1_291";
9543
+ const hideScrollbar = "_hideScrollbar_1wss1_67";
9544
+ const noPointerEvents = "_noPointerEvents_1wss1_305";
9545
+ const virtualRows = "_virtualRows_1wss1_308";
9881
9546
  const listStyles = {
9882
9547
  inputInTable: inputInTable$8,
9883
9548
  inputHover: inputHover$8,
@@ -9886,6 +9551,10 @@ const listStyles = {
9886
9551
  inputWarning: inputWarning$8,
9887
9552
  inputDisabled: inputDisabled$8,
9888
9553
  hideScrollbars: hideScrollbars$8,
9554
+ list: list$1,
9555
+ bordered: bordered$1,
9556
+ virtualRow,
9557
+ item: item$4,
9889
9558
  header: header$1,
9890
9559
  headerTitle,
9891
9560
  heading: heading$3,
@@ -9899,9 +9568,7 @@ const listStyles = {
9899
9568
  toggleNarrow,
9900
9569
  drag: drag$1,
9901
9570
  dragOverlay: dragOverlay$1,
9902
- list: list$1,
9903
- bordered: bordered$1,
9904
- item: item$4,
9571
+ listContent,
9905
9572
  action,
9906
9573
  active: active$3,
9907
9574
  indented,
@@ -9916,9 +9583,9 @@ const listStyles = {
9916
9583
  right: right$4,
9917
9584
  actions,
9918
9585
  scrollableList,
9919
- infiniteScrollContainer,
9920
9586
  hideScrollbar,
9921
- noPointerEvents
9587
+ noPointerEvents,
9588
+ virtualRows
9922
9589
  };
9923
9590
  const ToggleNarrow = ({
9924
9591
  toggleNarrow: toggleNarrow2,
@@ -10022,10 +9689,10 @@ function getOwnerDocument(target) {
10022
9689
  }
10023
9690
  return document;
10024
9691
  }
10025
- const useIsomorphicLayoutEffect$4 = canUseDOM ? useLayoutEffect$1 : useEffect;
9692
+ const useIsomorphicLayoutEffect$5 = canUseDOM ? useLayoutEffect$1 : useEffect;
10026
9693
  function useEvent$1(handler) {
10027
9694
  const handlerRef = useRef(handler);
10028
- useIsomorphicLayoutEffect$4(() => {
9695
+ useIsomorphicLayoutEffect$5(() => {
10029
9696
  handlerRef.current = handler;
10030
9697
  });
10031
9698
  return useCallback(function() {
@@ -10053,7 +9720,7 @@ function useLatestValue(value, dependencies) {
10053
9720
  dependencies = [value];
10054
9721
  }
10055
9722
  const valueRef = useRef(value);
10056
- useIsomorphicLayoutEffect$4(() => {
9723
+ useIsomorphicLayoutEffect$5(() => {
10057
9724
  if (valueRef.current !== value) {
10058
9725
  valueRef.current = value;
10059
9726
  }
@@ -10143,9 +9810,9 @@ function isTouchEvent$2(event) {
10143
9810
  return false;
10144
9811
  }
10145
9812
  const {
10146
- TouchEvent: TouchEvent2
9813
+ TouchEvent
10147
9814
  } = getWindow(event.target);
10148
- return TouchEvent2 && event instanceof TouchEvent2;
9815
+ return TouchEvent && event instanceof TouchEvent;
10149
9816
  }
10150
9817
  function getEventCoordinates(event) {
10151
9818
  if (isTouchEvent$2(event)) {
@@ -11965,7 +11632,7 @@ function useRect(element, measure, fallbackRect) {
11965
11632
  const resizeObserver = useResizeObserver({
11966
11633
  callback: measureRect
11967
11634
  });
11968
- useIsomorphicLayoutEffect$4(() => {
11635
+ useIsomorphicLayoutEffect$5(() => {
11969
11636
  measureRect();
11970
11637
  if (element) {
11971
11638
  resizeObserver == null ? void 0 : resizeObserver.observe(element);
@@ -12148,7 +11815,7 @@ function useRects(elements, measure) {
12148
11815
  if (elements.length > 0 && rects === defaultValue$2) {
12149
11816
  measureRects();
12150
11817
  }
12151
- useIsomorphicLayoutEffect$4(() => {
11818
+ useIsomorphicLayoutEffect$5(() => {
12152
11819
  if (elements.length) {
12153
11820
  elements.forEach((element) => resizeObserver == null ? void 0 : resizeObserver.observe(element));
12154
11821
  } else {
@@ -12519,7 +12186,7 @@ function useLayoutShiftScrollCompensation(_ref) {
12519
12186
  x: config,
12520
12187
  y: config
12521
12188
  } : config;
12522
- useIsomorphicLayoutEffect$4(() => {
12189
+ useIsomorphicLayoutEffect$5(() => {
12523
12190
  const disabled2 = !x2 && !y2;
12524
12191
  if (disabled2 || !activeNode) {
12525
12192
  initialized.current = false;
@@ -12563,7 +12230,7 @@ var Status;
12563
12230
  Status2[Status2["Initializing"] = 1] = "Initializing";
12564
12231
  Status2[Status2["Initialized"] = 2] = "Initialized";
12565
12232
  })(Status || (Status = {}));
12566
- const DndContext$1 = /* @__PURE__ */ memo(function DndContext(_ref) {
12233
+ const DndContext$1 = /* @__PURE__ */ memo$1(function DndContext(_ref) {
12567
12234
  var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;
12568
12235
  let {
12569
12236
  id: id2,
@@ -12841,7 +12508,7 @@ const DndContext$1 = /* @__PURE__ */ memo(function DndContext(_ref) {
12841
12508
  }, [draggableNodes, instantiateSensor]);
12842
12509
  const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);
12843
12510
  useSensorSetup(sensors);
12844
- useIsomorphicLayoutEffect$4(() => {
12511
+ useIsomorphicLayoutEffect$5(() => {
12845
12512
  if (activeNodeRect && status === Status.Initializing) {
12846
12513
  setStatus(Status.Initialized);
12847
12514
  }
@@ -12925,7 +12592,7 @@ const DndContext$1 = /* @__PURE__ */ memo(function DndContext(_ref) {
12925
12592
  // eslint-disable-next-line react-hooks/exhaustive-deps
12926
12593
  [overId]
12927
12594
  );
12928
- useIsomorphicLayoutEffect$4(() => {
12595
+ useIsomorphicLayoutEffect$5(() => {
12929
12596
  sensorContext.current = {
12930
12597
  activatorEvent,
12931
12598
  active: active2,
@@ -13052,7 +12719,7 @@ function useDraggable(_ref) {
13052
12719
  const [activatorNode, setActivatorNodeRef] = useNodeRef();
13053
12720
  const listeners = useSyntheticListeners(activators, id2);
13054
12721
  const dataRef = useLatestValue(data);
13055
- useIsomorphicLayoutEffect$4(
12722
+ useIsomorphicLayoutEffect$5(
13056
12723
  () => {
13057
12724
  draggableNodes.set(id2, {
13058
12725
  id: id2,
@@ -13172,7 +12839,7 @@ function useDroppable(_ref) {
13172
12839
  resizeObserverConnected.current = false;
13173
12840
  resizeObserver.observe(nodeRef.current);
13174
12841
  }, [nodeRef, resizeObserver]);
13175
- useIsomorphicLayoutEffect$4(
12842
+ useIsomorphicLayoutEffect$5(
13176
12843
  () => {
13177
12844
  dispatch({
13178
12845
  type: Action.RegisterDroppable,
@@ -13225,7 +12892,7 @@ function AnimationManager(_ref) {
13225
12892
  if (!children && !clonedChildren && previousChildren) {
13226
12893
  setClonedChildren(previousChildren);
13227
12894
  }
13228
- useIsomorphicLayoutEffect$4(() => {
12895
+ useIsomorphicLayoutEffect$5(() => {
13229
12896
  if (!element) {
13230
12897
  return;
13231
12898
  }
@@ -13725,7 +13392,7 @@ function SortableContext(_ref) {
13725
13392
  const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);
13726
13393
  const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;
13727
13394
  const disabled2 = normalizeDisabled(disabledProp);
13728
- useIsomorphicLayoutEffect$4(() => {
13395
+ useIsomorphicLayoutEffect$5(() => {
13729
13396
  if (itemsHaveChanged && isDragging) {
13730
13397
  measureDroppableContainers(items);
13731
13398
  }
@@ -13806,7 +13473,7 @@ function useDerivedTransform(_ref) {
13806
13473
  } = _ref;
13807
13474
  const [derivedTransform, setDerivedtransform] = useState(null);
13808
13475
  const previousIndex = useRef(index2);
13809
- useIsomorphicLayoutEffect$4(() => {
13476
+ useIsomorphicLayoutEffect$5(() => {
13810
13477
  if (!disabled2 && index2 !== previousIndex.current && node2.current) {
13811
13478
  const initial = rect.current;
13812
13479
  if (initial) {
@@ -14201,72 +13868,6 @@ const ListRow = forwardRef(
14201
13868
  return isSubheading ? /* @__PURE__ */ jsx(ListSubheading, { ref: listRowRefs, item: item2, index: index2 }, index2) : draggable ? listElementWithDrag(index2, item2) : listElement(index2, item2);
14202
13869
  }
14203
13870
  );
14204
- const loader = "_loader_477i5_1";
14205
- const fullViewPortSize = "_fullViewPortSize_477i5_7";
14206
- const cover = "_cover_477i5_14";
14207
- const dimmer = "_dimmer_477i5_21";
14208
- const content$2 = "_content_477i5_44";
14209
- const text$1 = "_text_477i5_49";
14210
- const details$1 = "_details_477i5_53";
14211
- const styles$t = {
14212
- loader,
14213
- fullViewPortSize,
14214
- cover,
14215
- dimmer,
14216
- content: content$2,
14217
- text: text$1,
14218
- details: details$1
14219
- };
14220
- const Loader = ({
14221
- width: width2,
14222
- height: height2,
14223
- text: text2 = "",
14224
- details: details2 = "",
14225
- fullViewPortSize: fullViewPortSize2 = false,
14226
- cover: cover2 = false,
14227
- children = null,
14228
- theme = Theme.DARK,
14229
- testId = null
14230
- }) => {
14231
- const color2 = theme === Theme.DARK ? Theme.WHITE : Theme.INHERIT;
14232
- const background2 = theme === "white" ? "var(--color-background-raised)" : theme === "light" ? "var(--color-background)" : "black";
14233
- return /* @__PURE__ */ jsx(
14234
- "div",
14235
- {
14236
- className: cx$2(styles$t.loader, cover2 ? styles$t.cover : "", {
14237
- [styles$t.fullViewPortSize]: fullViewPortSize2
14238
- }),
14239
- style: { width: width2, height: height2 },
14240
- "data-testid": testId,
14241
- children: /* @__PURE__ */ jsx("div", { className: styles$t.dimmer, style: { background: background2, color: color2 }, children: /* @__PURE__ */ jsxs(
14242
- "div",
14243
- {
14244
- className: styles$t.content,
14245
- "data-testid": testId && `${testId}-content`,
14246
- children: [
14247
- children,
14248
- text2 && /* @__PURE__ */ jsx(
14249
- "div",
14250
- {
14251
- className: styles$t.text,
14252
- "data-testid": testId && `${testId}-text`,
14253
- children: text2
14254
- }
14255
- ),
14256
- details2 && /* @__PURE__ */ jsx(
14257
- "div",
14258
- {
14259
- className: styles$t.details,
14260
- "data-testid": testId && `${testId}-details`,
14261
- children: details2
14262
- }
14263
- )
14264
- ]
14265
- }
14266
- ) })
14267
- }
14268
- );
14269
- };
14270
13871
  const ListDragWrapper = ({
14271
13872
  children,
14272
13873
  draggable,
@@ -14281,15 +13882,14 @@ const ListDragWrapper = ({
14281
13882
  setDragIndex(event.active.id);
14282
13883
  };
14283
13884
  const handleDragEnd = (event) => {
14284
- var _a2, _b, _c, _d, _e2, _f, _g, _h;
14285
13885
  setDragIndex(null);
14286
13886
  const { active: active2, over } = event;
14287
- const from3 = (_b = (_a2 = active2 == null ? void 0 : active2.data) == null ? void 0 : _a2.current) == null ? void 0 : _b.sortable.index;
14288
- const to2 = (_d = (_c = over == null ? void 0 : over.data) == null ? void 0 : _c.current) == null ? void 0 : _d.sortable.index;
13887
+ const from3 = active2 == null ? void 0 : active2.id;
13888
+ const to2 = over == null ? void 0 : over.id;
14289
13889
  if (from3 !== to2) {
14290
13890
  onListReorder({
14291
- from: (_f = (_e2 = active2 == null ? void 0 : active2.data) == null ? void 0 : _e2.current) == null ? void 0 : _f.sortable.index,
14292
- to: (_h = (_g = over == null ? void 0 : over.data) == null ? void 0 : _g.current) == null ? void 0 : _h.sortable.index
13891
+ from: Number(from3),
13892
+ to: Number(to2)
14293
13893
  });
14294
13894
  }
14295
13895
  };
@@ -14320,6 +13920,837 @@ const ListDragWrapper = ({
14320
13920
  }
14321
13921
  );
14322
13922
  };
13923
+ function memo(getDeps, fn, opts) {
13924
+ let deps = opts.initialDeps ?? [];
13925
+ let result;
13926
+ return () => {
13927
+ var _a2, _b, _c, _d;
13928
+ let depTime;
13929
+ if (opts.key && ((_a2 = opts.debug) == null ? void 0 : _a2.call(opts))) depTime = Date.now();
13930
+ const newDeps = getDeps();
13931
+ const depsChanged = newDeps.length !== deps.length || newDeps.some((dep, index2) => deps[index2] !== dep);
13932
+ if (!depsChanged) {
13933
+ return result;
13934
+ }
13935
+ deps = newDeps;
13936
+ let resultTime;
13937
+ if (opts.key && ((_b = opts.debug) == null ? void 0 : _b.call(opts))) resultTime = Date.now();
13938
+ result = fn(...newDeps);
13939
+ if (opts.key && ((_c = opts.debug) == null ? void 0 : _c.call(opts))) {
13940
+ const depEndTime = Math.round((Date.now() - depTime) * 100) / 100;
13941
+ const resultEndTime = Math.round((Date.now() - resultTime) * 100) / 100;
13942
+ const resultFpsPercentage = resultEndTime / 16;
13943
+ const pad = (str, num) => {
13944
+ str = String(str);
13945
+ while (str.length < num) {
13946
+ str = " " + str;
13947
+ }
13948
+ return str;
13949
+ };
13950
+ console.info(
13951
+ `%c⏱ ${pad(resultEndTime, 5)} /${pad(depEndTime, 5)} ms`,
13952
+ `
13953
+ font-size: .6rem;
13954
+ font-weight: bold;
13955
+ color: hsl(${Math.max(
13956
+ 0,
13957
+ Math.min(120 - 120 * resultFpsPercentage, 120)
13958
+ )}deg 100% 31%);`,
13959
+ opts == null ? void 0 : opts.key
13960
+ );
13961
+ }
13962
+ (_d = opts == null ? void 0 : opts.onChange) == null ? void 0 : _d.call(opts, result);
13963
+ return result;
13964
+ };
13965
+ }
13966
+ function notUndefined(value, msg2) {
13967
+ if (value === void 0) {
13968
+ throw new Error(`Unexpected undefined${""}`);
13969
+ } else {
13970
+ return value;
13971
+ }
13972
+ }
13973
+ const approxEqual = (a2, b2) => Math.abs(a2 - b2) < 1;
13974
+ const debounce$2 = (targetWindow, fn, ms2) => {
13975
+ let timeoutId;
13976
+ return function(...args) {
13977
+ targetWindow.clearTimeout(timeoutId);
13978
+ timeoutId = targetWindow.setTimeout(() => fn.apply(this, args), ms2);
13979
+ };
13980
+ };
13981
+ const defaultKeyExtractor = (index2) => index2;
13982
+ const defaultRangeExtractor = (range2) => {
13983
+ const start = Math.max(range2.startIndex - range2.overscan, 0);
13984
+ const end = Math.min(range2.endIndex + range2.overscan, range2.count - 1);
13985
+ const arr = [];
13986
+ for (let i = start; i <= end; i++) {
13987
+ arr.push(i);
13988
+ }
13989
+ return arr;
13990
+ };
13991
+ const observeElementRect = (instance, cb2) => {
13992
+ const element = instance.scrollElement;
13993
+ if (!element) {
13994
+ return;
13995
+ }
13996
+ const targetWindow = instance.targetWindow;
13997
+ if (!targetWindow) {
13998
+ return;
13999
+ }
14000
+ const handler = (rect) => {
14001
+ const { width: width2, height: height2 } = rect;
14002
+ cb2({ width: Math.round(width2), height: Math.round(height2) });
14003
+ };
14004
+ handler(element.getBoundingClientRect());
14005
+ if (!targetWindow.ResizeObserver) {
14006
+ return () => {
14007
+ };
14008
+ }
14009
+ const observer = new targetWindow.ResizeObserver((entries2) => {
14010
+ const entry = entries2[0];
14011
+ if (entry == null ? void 0 : entry.borderBoxSize) {
14012
+ const box = entry.borderBoxSize[0];
14013
+ if (box) {
14014
+ handler({ width: box.inlineSize, height: box.blockSize });
14015
+ return;
14016
+ }
14017
+ }
14018
+ handler(element.getBoundingClientRect());
14019
+ });
14020
+ observer.observe(element, { box: "border-box" });
14021
+ return () => {
14022
+ observer.unobserve(element);
14023
+ };
14024
+ };
14025
+ const addEventListenerOptions = {
14026
+ passive: true
14027
+ };
14028
+ const supportsScrollend = typeof window == "undefined" ? true : "onscrollend" in window;
14029
+ const observeElementOffset = (instance, cb2) => {
14030
+ const element = instance.scrollElement;
14031
+ if (!element) {
14032
+ return;
14033
+ }
14034
+ const targetWindow = instance.targetWindow;
14035
+ if (!targetWindow) {
14036
+ return;
14037
+ }
14038
+ let offset = 0;
14039
+ const fallback = instance.options.useScrollendEvent && supportsScrollend ? () => void 0 : debounce$2(
14040
+ targetWindow,
14041
+ () => {
14042
+ cb2(offset, false);
14043
+ },
14044
+ instance.options.isScrollingResetDelay
14045
+ );
14046
+ const createHandler = (isScrolling) => () => {
14047
+ const { horizontal, isRtl } = instance.options;
14048
+ offset = horizontal ? element["scrollLeft"] * (isRtl && -1 || 1) : element["scrollTop"];
14049
+ fallback();
14050
+ cb2(offset, isScrolling);
14051
+ };
14052
+ const handler = createHandler(true);
14053
+ const endHandler = createHandler(false);
14054
+ endHandler();
14055
+ element.addEventListener("scroll", handler, addEventListenerOptions);
14056
+ element.addEventListener("scrollend", endHandler, addEventListenerOptions);
14057
+ return () => {
14058
+ element.removeEventListener("scroll", handler);
14059
+ element.removeEventListener("scrollend", endHandler);
14060
+ };
14061
+ };
14062
+ const measureElement = (element, entry, instance) => {
14063
+ if (entry == null ? void 0 : entry.borderBoxSize) {
14064
+ const box = entry.borderBoxSize[0];
14065
+ if (box) {
14066
+ const size2 = Math.round(
14067
+ box[instance.options.horizontal ? "inlineSize" : "blockSize"]
14068
+ );
14069
+ return size2;
14070
+ }
14071
+ }
14072
+ return Math.round(
14073
+ element.getBoundingClientRect()[instance.options.horizontal ? "width" : "height"]
14074
+ );
14075
+ };
14076
+ const elementScroll = (offset, {
14077
+ adjustments = 0,
14078
+ behavior
14079
+ }, instance) => {
14080
+ var _a2, _b;
14081
+ const toOffset = offset + adjustments;
14082
+ (_b = (_a2 = instance.scrollElement) == null ? void 0 : _a2.scrollTo) == null ? void 0 : _b.call(_a2, {
14083
+ [instance.options.horizontal ? "left" : "top"]: toOffset,
14084
+ behavior
14085
+ });
14086
+ };
14087
+ class Virtualizer {
14088
+ constructor(opts) {
14089
+ this.unsubs = [];
14090
+ this.scrollElement = null;
14091
+ this.targetWindow = null;
14092
+ this.isScrolling = false;
14093
+ this.scrollToIndexTimeoutId = null;
14094
+ this.measurementsCache = [];
14095
+ this.itemSizeCache = /* @__PURE__ */ new Map();
14096
+ this.pendingMeasuredCacheIndexes = [];
14097
+ this.scrollRect = null;
14098
+ this.scrollOffset = null;
14099
+ this.scrollDirection = null;
14100
+ this.scrollAdjustments = 0;
14101
+ this.elementsCache = /* @__PURE__ */ new Map();
14102
+ this.observer = /* @__PURE__ */ (() => {
14103
+ let _ro = null;
14104
+ const get3 = () => {
14105
+ if (_ro) {
14106
+ return _ro;
14107
+ }
14108
+ if (!this.targetWindow || !this.targetWindow.ResizeObserver) {
14109
+ return null;
14110
+ }
14111
+ return _ro = new this.targetWindow.ResizeObserver((entries2) => {
14112
+ entries2.forEach((entry) => {
14113
+ this._measureElement(entry.target, entry);
14114
+ });
14115
+ });
14116
+ };
14117
+ return {
14118
+ disconnect: () => {
14119
+ var _a2;
14120
+ (_a2 = get3()) == null ? void 0 : _a2.disconnect();
14121
+ _ro = null;
14122
+ },
14123
+ observe: (target) => {
14124
+ var _a2;
14125
+ return (_a2 = get3()) == null ? void 0 : _a2.observe(target, { box: "border-box" });
14126
+ },
14127
+ unobserve: (target) => {
14128
+ var _a2;
14129
+ return (_a2 = get3()) == null ? void 0 : _a2.unobserve(target);
14130
+ }
14131
+ };
14132
+ })();
14133
+ this.range = null;
14134
+ this.setOptions = (opts2) => {
14135
+ Object.entries(opts2).forEach(([key2, value]) => {
14136
+ if (typeof value === "undefined") delete opts2[key2];
14137
+ });
14138
+ this.options = {
14139
+ debug: false,
14140
+ initialOffset: 0,
14141
+ overscan: 1,
14142
+ paddingStart: 0,
14143
+ paddingEnd: 0,
14144
+ scrollPaddingStart: 0,
14145
+ scrollPaddingEnd: 0,
14146
+ horizontal: false,
14147
+ getItemKey: defaultKeyExtractor,
14148
+ rangeExtractor: defaultRangeExtractor,
14149
+ onChange: () => {
14150
+ },
14151
+ measureElement,
14152
+ initialRect: { width: 0, height: 0 },
14153
+ scrollMargin: 0,
14154
+ gap: 0,
14155
+ indexAttribute: "data-index",
14156
+ initialMeasurementsCache: [],
14157
+ lanes: 1,
14158
+ isScrollingResetDelay: 150,
14159
+ enabled: true,
14160
+ isRtl: false,
14161
+ useScrollendEvent: true,
14162
+ ...opts2
14163
+ };
14164
+ };
14165
+ this.notify = (sync2) => {
14166
+ var _a2, _b;
14167
+ (_b = (_a2 = this.options).onChange) == null ? void 0 : _b.call(_a2, this, sync2);
14168
+ };
14169
+ this.maybeNotify = memo(
14170
+ () => {
14171
+ this.calculateRange();
14172
+ return [
14173
+ this.isScrolling,
14174
+ this.range ? this.range.startIndex : null,
14175
+ this.range ? this.range.endIndex : null
14176
+ ];
14177
+ },
14178
+ (isScrolling) => {
14179
+ this.notify(isScrolling);
14180
+ },
14181
+ {
14182
+ key: process.env.NODE_ENV !== "production" && "maybeNotify",
14183
+ debug: () => this.options.debug,
14184
+ initialDeps: [
14185
+ this.isScrolling,
14186
+ this.range ? this.range.startIndex : null,
14187
+ this.range ? this.range.endIndex : null
14188
+ ]
14189
+ }
14190
+ );
14191
+ this.cleanup = () => {
14192
+ this.unsubs.filter(Boolean).forEach((d2) => d2());
14193
+ this.unsubs = [];
14194
+ this.observer.disconnect();
14195
+ this.scrollElement = null;
14196
+ this.targetWindow = null;
14197
+ };
14198
+ this._didMount = () => {
14199
+ return () => {
14200
+ this.cleanup();
14201
+ };
14202
+ };
14203
+ this._willUpdate = () => {
14204
+ var _a2;
14205
+ const scrollElement = this.options.enabled ? this.options.getScrollElement() : null;
14206
+ if (this.scrollElement !== scrollElement) {
14207
+ this.cleanup();
14208
+ if (!scrollElement) {
14209
+ this.maybeNotify();
14210
+ return;
14211
+ }
14212
+ this.scrollElement = scrollElement;
14213
+ if (this.scrollElement && "ownerDocument" in this.scrollElement) {
14214
+ this.targetWindow = this.scrollElement.ownerDocument.defaultView;
14215
+ } else {
14216
+ this.targetWindow = ((_a2 = this.scrollElement) == null ? void 0 : _a2.window) ?? null;
14217
+ }
14218
+ this.elementsCache.forEach((cached) => {
14219
+ this.observer.observe(cached);
14220
+ });
14221
+ this._scrollToOffset(this.getScrollOffset(), {
14222
+ adjustments: void 0,
14223
+ behavior: void 0
14224
+ });
14225
+ this.unsubs.push(
14226
+ this.options.observeElementRect(this, (rect) => {
14227
+ this.scrollRect = rect;
14228
+ this.maybeNotify();
14229
+ })
14230
+ );
14231
+ this.unsubs.push(
14232
+ this.options.observeElementOffset(this, (offset, isScrolling) => {
14233
+ this.scrollAdjustments = 0;
14234
+ this.scrollDirection = isScrolling ? this.getScrollOffset() < offset ? "forward" : "backward" : null;
14235
+ this.scrollOffset = offset;
14236
+ this.isScrolling = isScrolling;
14237
+ this.maybeNotify();
14238
+ })
14239
+ );
14240
+ }
14241
+ };
14242
+ this.getSize = () => {
14243
+ if (!this.options.enabled) {
14244
+ this.scrollRect = null;
14245
+ return 0;
14246
+ }
14247
+ this.scrollRect = this.scrollRect ?? this.options.initialRect;
14248
+ return this.scrollRect[this.options.horizontal ? "width" : "height"];
14249
+ };
14250
+ this.getScrollOffset = () => {
14251
+ if (!this.options.enabled) {
14252
+ this.scrollOffset = null;
14253
+ return 0;
14254
+ }
14255
+ this.scrollOffset = this.scrollOffset ?? (typeof this.options.initialOffset === "function" ? this.options.initialOffset() : this.options.initialOffset);
14256
+ return this.scrollOffset;
14257
+ };
14258
+ this.getFurthestMeasurement = (measurements, index2) => {
14259
+ const furthestMeasurementsFound = /* @__PURE__ */ new Map();
14260
+ const furthestMeasurements = /* @__PURE__ */ new Map();
14261
+ for (let m2 = index2 - 1; m2 >= 0; m2--) {
14262
+ const measurement = measurements[m2];
14263
+ if (furthestMeasurementsFound.has(measurement.lane)) {
14264
+ continue;
14265
+ }
14266
+ const previousFurthestMeasurement = furthestMeasurements.get(
14267
+ measurement.lane
14268
+ );
14269
+ if (previousFurthestMeasurement == null || measurement.end > previousFurthestMeasurement.end) {
14270
+ furthestMeasurements.set(measurement.lane, measurement);
14271
+ } else if (measurement.end < previousFurthestMeasurement.end) {
14272
+ furthestMeasurementsFound.set(measurement.lane, true);
14273
+ }
14274
+ if (furthestMeasurementsFound.size === this.options.lanes) {
14275
+ break;
14276
+ }
14277
+ }
14278
+ return furthestMeasurements.size === this.options.lanes ? Array.from(furthestMeasurements.values()).sort((a2, b2) => {
14279
+ if (a2.end === b2.end) {
14280
+ return a2.index - b2.index;
14281
+ }
14282
+ return a2.end - b2.end;
14283
+ })[0] : void 0;
14284
+ };
14285
+ this.getMeasurementOptions = memo(
14286
+ () => [
14287
+ this.options.count,
14288
+ this.options.paddingStart,
14289
+ this.options.scrollMargin,
14290
+ this.options.getItemKey,
14291
+ this.options.enabled
14292
+ ],
14293
+ (count, paddingStart, scrollMargin, getItemKey, enabled) => {
14294
+ this.pendingMeasuredCacheIndexes = [];
14295
+ return {
14296
+ count,
14297
+ paddingStart,
14298
+ scrollMargin,
14299
+ getItemKey,
14300
+ enabled
14301
+ };
14302
+ },
14303
+ {
14304
+ key: false
14305
+ }
14306
+ );
14307
+ this.getMeasurements = memo(
14308
+ () => [this.getMeasurementOptions(), this.itemSizeCache],
14309
+ ({ count, paddingStart, scrollMargin, getItemKey, enabled }, itemSizeCache) => {
14310
+ if (!enabled) {
14311
+ this.measurementsCache = [];
14312
+ this.itemSizeCache.clear();
14313
+ return [];
14314
+ }
14315
+ if (this.measurementsCache.length === 0) {
14316
+ this.measurementsCache = this.options.initialMeasurementsCache;
14317
+ this.measurementsCache.forEach((item2) => {
14318
+ this.itemSizeCache.set(item2.key, item2.size);
14319
+ });
14320
+ }
14321
+ const min = this.pendingMeasuredCacheIndexes.length > 0 ? Math.min(...this.pendingMeasuredCacheIndexes) : 0;
14322
+ this.pendingMeasuredCacheIndexes = [];
14323
+ const measurements = this.measurementsCache.slice(0, min);
14324
+ for (let i = min; i < count; i++) {
14325
+ const key2 = getItemKey(i);
14326
+ const furthestMeasurement = this.options.lanes === 1 ? measurements[i - 1] : this.getFurthestMeasurement(measurements, i);
14327
+ const start = furthestMeasurement ? furthestMeasurement.end + this.options.gap : paddingStart + scrollMargin;
14328
+ const measuredSize = itemSizeCache.get(key2);
14329
+ const size2 = typeof measuredSize === "number" ? measuredSize : this.options.estimateSize(i);
14330
+ const end = start + size2;
14331
+ const lane = furthestMeasurement ? furthestMeasurement.lane : i % this.options.lanes;
14332
+ measurements[i] = {
14333
+ index: i,
14334
+ start,
14335
+ size: size2,
14336
+ end,
14337
+ key: key2,
14338
+ lane
14339
+ };
14340
+ }
14341
+ this.measurementsCache = measurements;
14342
+ return measurements;
14343
+ },
14344
+ {
14345
+ key: process.env.NODE_ENV !== "production" && "getMeasurements",
14346
+ debug: () => this.options.debug
14347
+ }
14348
+ );
14349
+ this.calculateRange = memo(
14350
+ () => [this.getMeasurements(), this.getSize(), this.getScrollOffset()],
14351
+ (measurements, outerSize, scrollOffset) => {
14352
+ return this.range = measurements.length > 0 && outerSize > 0 ? calculateRange({
14353
+ measurements,
14354
+ outerSize,
14355
+ scrollOffset
14356
+ }) : null;
14357
+ },
14358
+ {
14359
+ key: process.env.NODE_ENV !== "production" && "calculateRange",
14360
+ debug: () => this.options.debug
14361
+ }
14362
+ );
14363
+ this.getIndexes = memo(
14364
+ () => [
14365
+ this.options.rangeExtractor,
14366
+ this.calculateRange(),
14367
+ this.options.overscan,
14368
+ this.options.count
14369
+ ],
14370
+ (rangeExtractor, range2, overscan, count) => {
14371
+ return range2 === null ? [] : rangeExtractor({
14372
+ startIndex: range2.startIndex,
14373
+ endIndex: range2.endIndex,
14374
+ overscan,
14375
+ count
14376
+ });
14377
+ },
14378
+ {
14379
+ key: process.env.NODE_ENV !== "production" && "getIndexes",
14380
+ debug: () => this.options.debug
14381
+ }
14382
+ );
14383
+ this.indexFromElement = (node2) => {
14384
+ const attributeName = this.options.indexAttribute;
14385
+ const indexStr = node2.getAttribute(attributeName);
14386
+ if (!indexStr) {
14387
+ console.warn(
14388
+ `Missing attribute name '${attributeName}={index}' on measured element.`
14389
+ );
14390
+ return -1;
14391
+ }
14392
+ return parseInt(indexStr, 10);
14393
+ };
14394
+ this._measureElement = (node2, entry) => {
14395
+ const index2 = this.indexFromElement(node2);
14396
+ const item2 = this.measurementsCache[index2];
14397
+ if (!item2) {
14398
+ return;
14399
+ }
14400
+ const key2 = item2.key;
14401
+ const prevNode = this.elementsCache.get(key2);
14402
+ if (prevNode !== node2) {
14403
+ if (prevNode) {
14404
+ this.observer.unobserve(prevNode);
14405
+ }
14406
+ this.observer.observe(node2);
14407
+ this.elementsCache.set(key2, node2);
14408
+ }
14409
+ if (node2.isConnected) {
14410
+ this.resizeItem(index2, this.options.measureElement(node2, entry, this));
14411
+ }
14412
+ };
14413
+ this.resizeItem = (index2, size2) => {
14414
+ const item2 = this.measurementsCache[index2];
14415
+ if (!item2) {
14416
+ return;
14417
+ }
14418
+ const itemSize = this.itemSizeCache.get(item2.key) ?? item2.size;
14419
+ const delta = size2 - itemSize;
14420
+ if (delta !== 0) {
14421
+ if (this.shouldAdjustScrollPositionOnItemSizeChange !== void 0 ? this.shouldAdjustScrollPositionOnItemSizeChange(item2, delta, this) : item2.start < this.getScrollOffset() + this.scrollAdjustments) {
14422
+ if (process.env.NODE_ENV !== "production" && this.options.debug) {
14423
+ console.info("correction", delta);
14424
+ }
14425
+ this._scrollToOffset(this.getScrollOffset(), {
14426
+ adjustments: this.scrollAdjustments += delta,
14427
+ behavior: void 0
14428
+ });
14429
+ }
14430
+ this.pendingMeasuredCacheIndexes.push(item2.index);
14431
+ this.itemSizeCache = new Map(this.itemSizeCache.set(item2.key, size2));
14432
+ this.notify(false);
14433
+ }
14434
+ };
14435
+ this.measureElement = (node2) => {
14436
+ if (!node2) {
14437
+ this.elementsCache.forEach((cached, key2) => {
14438
+ if (!cached.isConnected) {
14439
+ this.observer.unobserve(cached);
14440
+ this.elementsCache.delete(key2);
14441
+ }
14442
+ });
14443
+ return;
14444
+ }
14445
+ this._measureElement(node2, void 0);
14446
+ };
14447
+ this.getVirtualItems = memo(
14448
+ () => [this.getIndexes(), this.getMeasurements()],
14449
+ (indexes, measurements) => {
14450
+ const virtualItems = [];
14451
+ for (let k2 = 0, len = indexes.length; k2 < len; k2++) {
14452
+ const i = indexes[k2];
14453
+ const measurement = measurements[i];
14454
+ virtualItems.push(measurement);
14455
+ }
14456
+ return virtualItems;
14457
+ },
14458
+ {
14459
+ key: process.env.NODE_ENV !== "production" && "getVirtualItems",
14460
+ debug: () => this.options.debug
14461
+ }
14462
+ );
14463
+ this.getVirtualItemForOffset = (offset) => {
14464
+ const measurements = this.getMeasurements();
14465
+ if (measurements.length === 0) {
14466
+ return void 0;
14467
+ }
14468
+ return notUndefined(
14469
+ measurements[findNearestBinarySearch(
14470
+ 0,
14471
+ measurements.length - 1,
14472
+ (index2) => notUndefined(measurements[index2]).start,
14473
+ offset
14474
+ )]
14475
+ );
14476
+ };
14477
+ this.getOffsetForAlignment = (toOffset, align) => {
14478
+ const size2 = this.getSize();
14479
+ const scrollOffset = this.getScrollOffset();
14480
+ if (align === "auto") {
14481
+ if (toOffset <= scrollOffset) {
14482
+ align = "start";
14483
+ } else if (toOffset >= scrollOffset + size2) {
14484
+ align = "end";
14485
+ } else {
14486
+ align = "start";
14487
+ }
14488
+ }
14489
+ if (align === "start") {
14490
+ toOffset = toOffset;
14491
+ } else if (align === "end") {
14492
+ toOffset = toOffset - size2;
14493
+ } else if (align === "center") {
14494
+ toOffset = toOffset - size2 / 2;
14495
+ }
14496
+ const scrollSizeProp = this.options.horizontal ? "scrollWidth" : "scrollHeight";
14497
+ const scrollSize = this.scrollElement ? "document" in this.scrollElement ? this.scrollElement.document.documentElement[scrollSizeProp] : this.scrollElement[scrollSizeProp] : 0;
14498
+ const maxOffset = scrollSize - size2;
14499
+ return Math.max(Math.min(maxOffset, toOffset), 0);
14500
+ };
14501
+ this.getOffsetForIndex = (index2, align = "auto") => {
14502
+ index2 = Math.max(0, Math.min(index2, this.options.count - 1));
14503
+ const item2 = this.measurementsCache[index2];
14504
+ if (!item2) {
14505
+ return void 0;
14506
+ }
14507
+ const size2 = this.getSize();
14508
+ const scrollOffset = this.getScrollOffset();
14509
+ if (align === "auto") {
14510
+ if (item2.end >= scrollOffset + size2 - this.options.scrollPaddingEnd) {
14511
+ align = "end";
14512
+ } else if (item2.start <= scrollOffset + this.options.scrollPaddingStart) {
14513
+ align = "start";
14514
+ } else {
14515
+ return [scrollOffset, align];
14516
+ }
14517
+ }
14518
+ const toOffset = align === "end" ? item2.end + this.options.scrollPaddingEnd : item2.start - this.options.scrollPaddingStart;
14519
+ return [this.getOffsetForAlignment(toOffset, align), align];
14520
+ };
14521
+ this.isDynamicMode = () => this.elementsCache.size > 0;
14522
+ this.cancelScrollToIndex = () => {
14523
+ if (this.scrollToIndexTimeoutId !== null && this.targetWindow) {
14524
+ this.targetWindow.clearTimeout(this.scrollToIndexTimeoutId);
14525
+ this.scrollToIndexTimeoutId = null;
14526
+ }
14527
+ };
14528
+ this.scrollToOffset = (toOffset, { align = "start", behavior } = {}) => {
14529
+ this.cancelScrollToIndex();
14530
+ if (behavior === "smooth" && this.isDynamicMode()) {
14531
+ console.warn(
14532
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
14533
+ );
14534
+ }
14535
+ this._scrollToOffset(this.getOffsetForAlignment(toOffset, align), {
14536
+ adjustments: void 0,
14537
+ behavior
14538
+ });
14539
+ };
14540
+ this.scrollToIndex = (index2, { align: initialAlign = "auto", behavior } = {}) => {
14541
+ index2 = Math.max(0, Math.min(index2, this.options.count - 1));
14542
+ this.cancelScrollToIndex();
14543
+ if (behavior === "smooth" && this.isDynamicMode()) {
14544
+ console.warn(
14545
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
14546
+ );
14547
+ }
14548
+ const offsetAndAlign = this.getOffsetForIndex(index2, initialAlign);
14549
+ if (!offsetAndAlign) return;
14550
+ const [offset, align] = offsetAndAlign;
14551
+ this._scrollToOffset(offset, { adjustments: void 0, behavior });
14552
+ if (behavior !== "smooth" && this.isDynamicMode() && this.targetWindow) {
14553
+ this.scrollToIndexTimeoutId = this.targetWindow.setTimeout(() => {
14554
+ this.scrollToIndexTimeoutId = null;
14555
+ const elementInDOM = this.elementsCache.has(
14556
+ this.options.getItemKey(index2)
14557
+ );
14558
+ if (elementInDOM) {
14559
+ const [latestOffset] = notUndefined(
14560
+ this.getOffsetForIndex(index2, align)
14561
+ );
14562
+ if (!approxEqual(latestOffset, this.getScrollOffset())) {
14563
+ this.scrollToIndex(index2, { align, behavior });
14564
+ }
14565
+ } else {
14566
+ this.scrollToIndex(index2, { align, behavior });
14567
+ }
14568
+ });
14569
+ }
14570
+ };
14571
+ this.scrollBy = (delta, { behavior } = {}) => {
14572
+ this.cancelScrollToIndex();
14573
+ if (behavior === "smooth" && this.isDynamicMode()) {
14574
+ console.warn(
14575
+ "The `smooth` scroll behavior is not fully supported with dynamic size."
14576
+ );
14577
+ }
14578
+ this._scrollToOffset(this.getScrollOffset() + delta, {
14579
+ adjustments: void 0,
14580
+ behavior
14581
+ });
14582
+ };
14583
+ this.getTotalSize = () => {
14584
+ var _a2;
14585
+ const measurements = this.getMeasurements();
14586
+ let end;
14587
+ if (measurements.length === 0) {
14588
+ end = this.options.paddingStart;
14589
+ } else {
14590
+ end = this.options.lanes === 1 ? ((_a2 = measurements[measurements.length - 1]) == null ? void 0 : _a2.end) ?? 0 : Math.max(
14591
+ ...measurements.slice(-this.options.lanes).map((m2) => m2.end)
14592
+ );
14593
+ }
14594
+ return Math.max(
14595
+ end - this.options.scrollMargin + this.options.paddingEnd,
14596
+ 0
14597
+ );
14598
+ };
14599
+ this._scrollToOffset = (offset, {
14600
+ adjustments,
14601
+ behavior
14602
+ }) => {
14603
+ this.options.scrollToFn(offset, { behavior, adjustments }, this);
14604
+ };
14605
+ this.measure = () => {
14606
+ this.itemSizeCache = /* @__PURE__ */ new Map();
14607
+ this.notify(false);
14608
+ };
14609
+ this.setOptions(opts);
14610
+ }
14611
+ }
14612
+ const findNearestBinarySearch = (low, high, getCurrentValue, value) => {
14613
+ while (low <= high) {
14614
+ const middle = (low + high) / 2 | 0;
14615
+ const currentValue = getCurrentValue(middle);
14616
+ if (currentValue < value) {
14617
+ low = middle + 1;
14618
+ } else if (currentValue > value) {
14619
+ high = middle - 1;
14620
+ } else {
14621
+ return middle;
14622
+ }
14623
+ }
14624
+ if (low > 0) {
14625
+ return low - 1;
14626
+ } else {
14627
+ return 0;
14628
+ }
14629
+ };
14630
+ function calculateRange({
14631
+ measurements,
14632
+ outerSize,
14633
+ scrollOffset
14634
+ }) {
14635
+ const count = measurements.length - 1;
14636
+ const getOffset2 = (index2) => measurements[index2].start;
14637
+ const startIndex = findNearestBinarySearch(0, count, getOffset2, scrollOffset);
14638
+ let endIndex = startIndex;
14639
+ while (endIndex < count && measurements[endIndex].end < scrollOffset + outerSize) {
14640
+ endIndex++;
14641
+ }
14642
+ return { startIndex, endIndex };
14643
+ }
14644
+ const useIsomorphicLayoutEffect$4 = typeof document !== "undefined" ? React$4.useLayoutEffect : React$4.useEffect;
14645
+ function useVirtualizerBase(options) {
14646
+ const rerender = React$4.useReducer(() => ({}), {})[1];
14647
+ const resolvedOptions = {
14648
+ ...options,
14649
+ onChange: (instance2, sync2) => {
14650
+ var _a2;
14651
+ if (sync2) {
14652
+ flushSync$1(rerender);
14653
+ } else {
14654
+ rerender();
14655
+ }
14656
+ (_a2 = options.onChange) == null ? void 0 : _a2.call(options, instance2, sync2);
14657
+ }
14658
+ };
14659
+ const [instance] = React$4.useState(
14660
+ () => new Virtualizer(resolvedOptions)
14661
+ );
14662
+ instance.setOptions(resolvedOptions);
14663
+ React$4.useEffect(() => {
14664
+ return instance._didMount();
14665
+ }, []);
14666
+ useIsomorphicLayoutEffect$4(() => {
14667
+ return instance._willUpdate();
14668
+ });
14669
+ return instance;
14670
+ }
14671
+ function useVirtualizer(options) {
14672
+ return useVirtualizerBase({
14673
+ observeElementRect,
14674
+ observeElementOffset,
14675
+ scrollToFn: elementScroll,
14676
+ ...options
14677
+ });
14678
+ }
14679
+ const ListScrollWrapper = ({
14680
+ items,
14681
+ scrollDetails,
14682
+ children
14683
+ }) => {
14684
+ const {
14685
+ scrollable,
14686
+ hideScrollbar: hideScrollbar2,
14687
+ triggerScrollToActiveItem,
14688
+ infiniteScroll
14689
+ } = scrollDetails;
14690
+ if (!infiniteScroll) {
14691
+ return /* @__PURE__ */ jsx(
14692
+ "div",
14693
+ {
14694
+ className: cx$2(
14695
+ listStyles.listContent,
14696
+ scrollable ? listStyles.scrollableList : "",
14697
+ hideScrollbar2 ? listStyles.hideScrollbar : ""
14698
+ ),
14699
+ children: /* @__PURE__ */ jsx("div", { children: children({}) })
14700
+ }
14701
+ );
14702
+ }
14703
+ const listContainerRef = useRef(null);
14704
+ const estimateItemHeight = () => {
14705
+ let height2 = 37;
14706
+ if (items.length > 0) {
14707
+ const item2 = items[items.length - 1];
14708
+ if (item2.details) height2 += 20;
14709
+ if (item2.metadata) height2 += 20;
14710
+ }
14711
+ return height2;
14712
+ };
14713
+ const virtualizer = useVirtualizer({
14714
+ count: items.length,
14715
+ getScrollElement: () => listContainerRef.current,
14716
+ estimateSize: useCallback(estimateItemHeight, []),
14717
+ overscan: 5
14718
+ });
14719
+ const findFirstActiveItemIndex = (items2) => items2.findIndex((item2) => item2.active === true);
14720
+ const setScrollToActiveItem = (activeItemIndex) => {
14721
+ if (activeItemIndex >= 0) {
14722
+ virtualizer.scrollToIndex(activeItemIndex, {
14723
+ align: "center",
14724
+ behavior: "smooth"
14725
+ });
14726
+ }
14727
+ };
14728
+ useEffect(() => {
14729
+ if (triggerScrollToActiveItem) {
14730
+ const activeItemIndex = findFirstActiveItemIndex(items);
14731
+ setScrollToActiveItem(activeItemIndex);
14732
+ }
14733
+ }, [triggerScrollToActiveItem]);
14734
+ return /* @__PURE__ */ jsx(
14735
+ "div",
14736
+ {
14737
+ className: cx$2(
14738
+ listStyles.listContent,
14739
+ listStyles.scrollableList,
14740
+ hideScrollbar2 ? listStyles.hideScrollbar : ""
14741
+ ),
14742
+ ref: listContainerRef,
14743
+ children: /* @__PURE__ */ jsx(
14744
+ "div",
14745
+ {
14746
+ className: listStyles.virtualRows,
14747
+ style: { height: `${virtualizer.getTotalSize()}px` },
14748
+ children: children({ virtualizer })
14749
+ }
14750
+ )
14751
+ }
14752
+ );
14753
+ };
14323
14754
  const List = ({
14324
14755
  list: list2,
14325
14756
  bordered: bordered2 = false,
@@ -14341,80 +14772,21 @@ const List = ({
14341
14772
  scrollable: false,
14342
14773
  hideScrollbar: false,
14343
14774
  triggerScrollToActiveItem: false,
14344
- infiniteScroll: false,
14345
- limit: 10,
14346
- infiniteScrollTarget: void 0
14775
+ infiniteScroll: false
14347
14776
  }
14348
14777
  }) => {
14349
- const {
14350
- scrollable,
14351
- hideScrollbar: hideScrollbar2,
14352
- triggerScrollToActiveItem,
14353
- infiniteScroll,
14354
- infiniteScrollTarget
14355
- } = scrollDetails;
14356
- const listHeadingRef = useRef(null);
14357
- const listRowRefs = useRef([]);
14358
- const listContainerRef = useRef(null);
14359
- const MIN_ITEM_HEIGHT = 44;
14360
- const pageSize = infiniteScroll ? Math.ceil(window.innerHeight / MIN_ITEM_HEIGHT) : list2.items.length;
14361
- const [numVisibleRows, setNumVisibleRows] = useState(pageSize);
14362
- const [hasMore, setHasMore] = useState(numVisibleRows < (list2 == null ? void 0 : list2.items.length));
14363
- useEffect(() => {
14364
- listRowRefs.current = listRowRefs.current.slice(0, list2.items.length);
14365
- }, [list2.items.length]);
14366
- const loadMoreItems = () => {
14367
- if (numVisibleRows >= list2.items.length) {
14368
- setHasMore(false);
14369
- return;
14370
- }
14371
- const newVisibleRows = pageSize + numVisibleRows;
14372
- setNumVisibleRows(newVisibleRows);
14373
- };
14374
- const findFirstActiveItemIndex = (items) => items.findIndex((item2) => item2.active === true);
14375
- const setScrollToActiveItem = (activeItemIndex) => {
14376
- if (!listContainerRef.current || !listHeadingRef.current) return;
14377
- const itemBorderLength = 1;
14378
- if (triggerScrollToActiveItem && activeItemIndex >= 0) {
14379
- const itemOffsets = listRowRefs.current.reduce((acc, val, index2) => {
14380
- if (index2 < activeItemIndex) {
14381
- return acc + val.clientHeight + itemBorderLength;
14382
- }
14383
- return acc;
14384
- }, 0);
14385
- const centerOffset = listContainerRef.current.clientHeight / 2 - listRowRefs.current[activeItemIndex].clientHeight / 2;
14386
- const scrollOffset = itemOffsets - centerOffset;
14387
- if (stickyHeader2) {
14388
- const headingOffset2 = listHeadingRef.current.clientHeight / 2;
14389
- listContainerRef.current.scrollTop = scrollOffset + headingOffset2;
14390
- }
14391
- const headingOffset = listHeadingRef.current.clientHeight;
14392
- listContainerRef.current.scrollTop = scrollOffset + headingOffset;
14393
- }
14394
- };
14395
- useEffect(() => {
14396
- if (triggerScrollToActiveItem) {
14397
- const activeItemIndex = findFirstActiveItemIndex(list2 == null ? void 0 : list2.items);
14398
- setScrollToActiveItem(activeItemIndex);
14399
- }
14400
- }, [
14401
- listContainerRef.current,
14402
- listHeadingRef.current,
14403
- triggerScrollToActiveItem
14404
- ]);
14405
- return /* @__PURE__ */ jsx(
14778
+ return /* @__PURE__ */ jsxs(
14406
14779
  "div",
14407
14780
  {
14408
14781
  className: cx$2(
14782
+ listStyles.list,
14409
14783
  narrow2 ? listStyles.narrow : "",
14410
- scrollable ? listStyles.scrollableList : "",
14411
- hideScrollbar2 ? listStyles.hideScrollbar : ""
14784
+ bordered2 ? listStyles.bordered : ""
14412
14785
  ),
14413
14786
  "data-testid": testId,
14414
- id: "scrollableDiv",
14415
14787
  style: { height: height2, marginBottom },
14416
- ref: listContainerRef,
14417
- children: /* @__PURE__ */ jsxs(Card, { bordered: bordered2, padding: false, children: [
14788
+ id: "scrollableDiv",
14789
+ children: [
14418
14790
  !noHeader && /* @__PURE__ */ jsx(
14419
14791
  ListHeading,
14420
14792
  {
@@ -14422,53 +14794,115 @@ const List = ({
14422
14794
  actions: list2.actions,
14423
14795
  toggleNarrow: toggleNarrow2,
14424
14796
  onToggleNarrow,
14425
- stickyHeader: stickyHeader2,
14426
- ref: listHeadingRef
14797
+ stickyHeader: stickyHeader2
14427
14798
  }
14428
14799
  ),
14429
- /* @__PURE__ */ jsx("div", { className: cx$2(listStyles.list, bordered2 ? listStyles.bordered : ""), children: /* @__PURE__ */ jsx(
14800
+ /* @__PURE__ */ jsx(
14430
14801
  ListDragWrapper,
14431
14802
  {
14432
14803
  draggable,
14433
14804
  list: list2,
14434
14805
  onListReorder,
14435
- children: infiniteScroll ? /* @__PURE__ */ jsx(
14436
- InfiniteScroll,
14806
+ children: /* @__PURE__ */ jsx(ListScrollWrapper, { items: list2.items, scrollDetails, children: ({ virtualizer }) => virtualizer ? virtualizer.getVirtualItems().map((virtualRow2) => /* @__PURE__ */ jsx(
14807
+ "div",
14437
14808
  {
14438
- dataLength: numVisibleRows,
14439
- next: loadMoreItems,
14440
- hasMore,
14441
- scrollableTarget: infiniteScrollTarget || "scrollableDiv",
14442
- loader: /* @__PURE__ */ jsx(Loader, {}),
14443
- className: listStyles.infiniteScrollContainer,
14444
- children: list2.items.slice(0, numVisibleRows).map((item2, index2) => /* @__PURE__ */ jsx(
14809
+ "data-index": virtualRow2.index,
14810
+ className: listStyles.virtualRow,
14811
+ style: {
14812
+ transform: `translateY(${virtualRow2.start}px)`
14813
+ },
14814
+ ref: virtualizer.measureElement,
14815
+ children: /* @__PURE__ */ jsx(
14445
14816
  ListRow,
14446
14817
  {
14447
- index: index2,
14818
+ index: virtualRow2.index,
14448
14819
  draggable,
14449
- item: item2,
14820
+ item: list2.items[virtualRow2.index],
14450
14821
  expanding,
14451
- invokeEditOnRowClick,
14452
- ref: listRowRefs
14453
- },
14454
- index2
14455
- ))
14456
- }
14457
- ) : list2.items.map((item2, index2) => /* @__PURE__ */ jsx(
14822
+ invokeEditOnRowClick
14823
+ }
14824
+ )
14825
+ },
14826
+ virtualRow2.key
14827
+ )) : list2.items.map((row2, index2) => /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
14458
14828
  ListRow,
14459
14829
  {
14460
14830
  index: index2,
14461
14831
  draggable,
14462
- item: item2,
14832
+ item: row2,
14463
14833
  expanding,
14464
- invokeEditOnRowClick,
14465
- ref: listRowRefs
14466
- },
14467
- index2
14468
- ))
14834
+ invokeEditOnRowClick
14835
+ }
14836
+ ) }, index2)) })
14469
14837
  }
14470
- ) })
14471
- ] })
14838
+ )
14839
+ ]
14840
+ }
14841
+ );
14842
+ };
14843
+ const loader = "_loader_477i5_1";
14844
+ const fullViewPortSize = "_fullViewPortSize_477i5_7";
14845
+ const cover = "_cover_477i5_14";
14846
+ const dimmer = "_dimmer_477i5_21";
14847
+ const content$2 = "_content_477i5_44";
14848
+ const text$1 = "_text_477i5_49";
14849
+ const details$1 = "_details_477i5_53";
14850
+ const styles$t = {
14851
+ loader,
14852
+ fullViewPortSize,
14853
+ cover,
14854
+ dimmer,
14855
+ content: content$2,
14856
+ text: text$1,
14857
+ details: details$1
14858
+ };
14859
+ const Loader = ({
14860
+ width: width2,
14861
+ height: height2,
14862
+ text: text2 = "",
14863
+ details: details2 = "",
14864
+ fullViewPortSize: fullViewPortSize2 = false,
14865
+ cover: cover2 = false,
14866
+ children = null,
14867
+ theme = Theme.DARK,
14868
+ testId = null
14869
+ }) => {
14870
+ const color2 = theme === Theme.DARK ? Theme.WHITE : Theme.INHERIT;
14871
+ const background2 = theme === "white" ? "var(--color-background-raised)" : theme === "light" ? "var(--color-background)" : "black";
14872
+ return /* @__PURE__ */ jsx(
14873
+ "div",
14874
+ {
14875
+ className: cx$2(styles$t.loader, cover2 ? styles$t.cover : "", {
14876
+ [styles$t.fullViewPortSize]: fullViewPortSize2
14877
+ }),
14878
+ style: { width: width2, height: height2 },
14879
+ "data-testid": testId,
14880
+ children: /* @__PURE__ */ jsx("div", { className: styles$t.dimmer, style: { background: background2, color: color2 }, children: /* @__PURE__ */ jsxs(
14881
+ "div",
14882
+ {
14883
+ className: styles$t.content,
14884
+ "data-testid": testId && `${testId}-content`,
14885
+ children: [
14886
+ children,
14887
+ text2 && /* @__PURE__ */ jsx(
14888
+ "div",
14889
+ {
14890
+ className: styles$t.text,
14891
+ "data-testid": testId && `${testId}-text`,
14892
+ children: text2
14893
+ }
14894
+ ),
14895
+ details2 && /* @__PURE__ */ jsx(
14896
+ "div",
14897
+ {
14898
+ className: styles$t.details,
14899
+ "data-testid": testId && `${testId}-details`,
14900
+ children: details2
14901
+ }
14902
+ )
14903
+ ]
14904
+ }
14905
+ ) })
14472
14906
  }
14473
14907
  );
14474
14908
  };
@@ -15242,7 +15676,7 @@ const useFontsReady = () => {
15242
15676
  const getWidth = () => window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
15243
15677
  const useWindowWidth = () => {
15244
15678
  const [width2, setWidth] = useState(getWidth());
15245
- const resizeListener = debounce$2(() => setWidth(getWidth()), 150);
15679
+ const resizeListener = debounce$3(() => setWidth(getWidth()), 150);
15246
15680
  useEffect(() => {
15247
15681
  window.addEventListener("resize", resizeListener);
15248
15682
  return () => {
@@ -48004,7 +48438,7 @@ const styles$d = {
48004
48438
  active: active$2,
48005
48439
  icon: icon$1
48006
48440
  };
48007
- const TooltipIcon = memo(
48441
+ const TooltipIcon = memo$1(
48008
48442
  ({ isOpen: isOpen2, label: label2, icon: icon2, invalid }) => {
48009
48443
  return /* @__PURE__ */ jsxs(Fragment$1, { children: [
48010
48444
  /* @__PURE__ */ jsx(
@@ -48079,7 +48513,7 @@ const Sections = ({
48079
48513
  )
48080
48514
  ] }, i)) });
48081
48515
  };
48082
- const SideBar = memo(
48516
+ const SideBar = memo$1(
48083
48517
  ({
48084
48518
  options,
48085
48519
  startOpen = false,
@@ -50705,19 +51139,19 @@ const Spacer = ({
50705
51139
  }
50706
51140
  }
50707
51141
  );
50708
- const inputInTable$2 = "_inputInTable_xzacf_1";
50709
- const inputHover$2 = "_inputHover_xzacf_13";
50710
- const inputFocus$2 = "_inputFocus_xzacf_18";
50711
- const inputError$2 = "_inputError_xzacf_25";
50712
- const inputWarning$2 = "_inputWarning_xzacf_26";
50713
- const inputDisabled$2 = "_inputDisabled_xzacf_61";
50714
- const hideScrollbars$2 = "_hideScrollbars_xzacf_67";
50715
- const wrapper = "_wrapper_xzacf_85";
50716
- const bordered = "_bordered_xzacf_93";
50717
- const scroll = "_scroll_xzacf_98";
50718
- const table = "_table_xzacf_108";
50719
- const dragOverlay = "_dragOverlay_xzacf_145";
50720
- const striped = "_striped_xzacf_194";
51142
+ const inputInTable$2 = "_inputInTable_xkoxm_1";
51143
+ const inputHover$2 = "_inputHover_xkoxm_13";
51144
+ const inputFocus$2 = "_inputFocus_xkoxm_18";
51145
+ const inputError$2 = "_inputError_xkoxm_25";
51146
+ const inputWarning$2 = "_inputWarning_xkoxm_26";
51147
+ const inputDisabled$2 = "_inputDisabled_xkoxm_61";
51148
+ const hideScrollbars$2 = "_hideScrollbars_xkoxm_67";
51149
+ const wrapper = "_wrapper_xkoxm_85";
51150
+ const bordered = "_bordered_xkoxm_93";
51151
+ const scroll = "_scroll_xkoxm_98";
51152
+ const table = "_table_xkoxm_109";
51153
+ const dragOverlay = "_dragOverlay_xkoxm_145";
51154
+ const striped = "_striped_xkoxm_194";
50721
51155
  const styles$b = {
50722
51156
  inputInTable: inputInTable$2,
50723
51157
  inputHover: inputHover$2,
@@ -50823,36 +51257,6 @@ const hasActions = (rows) => rows.reduce(
50823
51257
  const hasRowActions = (rows, headers) => {
50824
51258
  return hasActions(headers) > 0 || hasActions(rows) > 0;
50825
51259
  };
50826
- const TableScrollWrapper = ({
50827
- table: table2,
50828
- children
50829
- }) => {
50830
- const { rows, infiniteScroll } = table2;
50831
- const pageSize = Math.ceil(window.innerHeight / 30);
50832
- const [visibleRows, setVisibleRows] = infiniteScroll ? useState(pageSize) : [rows.length, null];
50833
- const [hasMore, setHasMore] = infiniteScroll ? useState(visibleRows < rows.length) : [false, null];
50834
- const loadMoreItems = () => {
50835
- if (visibleRows >= rows.length && setHasMore) {
50836
- setHasMore(false);
50837
- return;
50838
- }
50839
- if (setVisibleRows) {
50840
- setVisibleRows(visibleRows + pageSize);
50841
- }
50842
- };
50843
- return /* @__PURE__ */ jsx("div", { id: "scrollWrapper", className: styles$b.scroll, children: infiniteScroll ? /* @__PURE__ */ jsx(
50844
- InfiniteScroll,
50845
- {
50846
- dataLength: Math.min(rows.length, visibleRows + pageSize),
50847
- next: loadMoreItems,
50848
- hasMore,
50849
- scrollableTarget: "scrollWrapper",
50850
- style: { overflow: "initial" },
50851
- loader: null,
50852
- children: children({ visibleRows })
50853
- }
50854
- ) : children({ visibleRows }) });
50855
- };
50856
51260
  const clickableRow = "_clickableRow_10f34_1";
50857
51261
  const hoverableRow = "_hoverableRow_10f34_4";
50858
51262
  const rowActive = "_rowActive_10f34_4";
@@ -51566,6 +51970,7 @@ const Row = ({
51566
51970
  hasRowActions: hasRowActions2,
51567
51971
  draggableTable = false,
51568
51972
  columnWidths,
51973
+ height: height2,
51569
51974
  testId
51570
51975
  //TODO: add testId
51571
51976
  }) => {
@@ -51622,7 +52027,8 @@ const Row = ({
51622
52027
  animateLayoutChanges: () => false
51623
52028
  });
51624
52029
  const style = {
51625
- transform: CSS.Translate.toString(transform),
52030
+ height: height2,
52031
+ transform: CSS.Transform.toString(transform),
51626
52032
  transition,
51627
52033
  opacity: isDragging ? 0 : void 0
51628
52034
  };
@@ -51680,6 +52086,8 @@ const Row = ({
51680
52086
  ),
51681
52087
  "data-error": error2 || null,
51682
52088
  "data-warning": warning2 || null,
52089
+ "data-index": rowIndex,
52090
+ "data-even": rowIndex % 2 === 0,
51683
52091
  style,
51684
52092
  children: [
51685
52093
  draggableTable ? getDragItem() : null,
@@ -51771,6 +52179,36 @@ const TableDragWrapper = (props) => {
51771
52179
  }
51772
52180
  );
51773
52181
  };
52182
+ const TableScrollWrapper = ({
52183
+ table: table2,
52184
+ theadRef,
52185
+ children
52186
+ }) => {
52187
+ var _a2, _b;
52188
+ const { infiniteScroll = false } = table2;
52189
+ if (!infiniteScroll) {
52190
+ return /* @__PURE__ */ jsx("div", { id: "scrollWrapper", className: styles$b.scroll, children: children({}) });
52191
+ }
52192
+ const containerRef = useRef(null);
52193
+ const MIN_ITEM_HEIGHT = 31;
52194
+ const virtualizer = useVirtualizer({
52195
+ count: ((_a2 = table2.rows) == null ? void 0 : _a2.length) ?? 0,
52196
+ getScrollElement: () => containerRef.current,
52197
+ estimateSize: () => MIN_ITEM_HEIGHT,
52198
+ overscan: 10
52199
+ });
52200
+ const theadHeight = ((_b = theadRef.current) == null ? void 0 : _b.clientHeight) ?? 0;
52201
+ const totalHeight = virtualizer.getTotalSize() + theadHeight;
52202
+ const items = virtualizer.getVirtualItems();
52203
+ const paddingTop = items.length > 0 ? items[0].start : 0;
52204
+ const paddingBottom = items.length > 0 ? virtualizer.getTotalSize() - items[items.length - 1].end : 0;
52205
+ const tableStyle = {
52206
+ "--virtualPaddingTop": paddingTop + "px",
52207
+ "--virtualPaddingBottom": paddingBottom + "px",
52208
+ height: totalHeight
52209
+ };
52210
+ return /* @__PURE__ */ jsx("div", { id: "scrollWrapper", className: styles$b.scroll, ref: containerRef, children: children({ virtualizer, tableStyle }) });
52211
+ };
51774
52212
  const Table = (props) => {
51775
52213
  var _a2, _b, _c, _d, _e2, _f, _g;
51776
52214
  const { onListReorder = () => {
@@ -51793,6 +52231,7 @@ const Table = (props) => {
51793
52231
  maxHeight,
51794
52232
  fixedWidth: width2
51795
52233
  } = propTable;
52234
+ const theadRef = useRef(null);
51796
52235
  const tbodyRef = useRef(null);
51797
52236
  const headers = get$2(props, "table.headers", []);
51798
52237
  const columnCount = getColumnCount(propRows, headers);
@@ -51854,7 +52293,7 @@ const Table = (props) => {
51854
52293
  testId: testId && `${testId}-title`
51855
52294
  }
51856
52295
  ),
51857
- /* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, children: ({ visibleRows }) => /* @__PURE__ */ jsx(
52296
+ /* @__PURE__ */ jsx(
51858
52297
  TableDragWrapper,
51859
52298
  {
51860
52299
  colSpan,
@@ -51865,49 +52304,66 @@ const Table = (props) => {
51865
52304
  rowActions,
51866
52305
  rows,
51867
52306
  tbodyRef,
51868
- children: /* @__PURE__ */ jsxs(
51869
- "table",
51870
- {
51871
- className: cx$2(styles$b.table, striped2 ? styles$b.striped : ""),
51872
- "data-testid": testId,
51873
- children: [
51874
- /* @__PURE__ */ jsx("thead", { children: headers.map((row2, rowIndex) => {
51875
- return /* @__PURE__ */ jsx(
52307
+ children: /* @__PURE__ */ jsx(TableScrollWrapper, { table: table2, theadRef, children: ({ virtualizer, tableStyle }) => {
52308
+ return /* @__PURE__ */ jsxs(
52309
+ "table",
52310
+ {
52311
+ className: cx$2(styles$b.table, striped2 ? styles$b.striped : ""),
52312
+ "data-testid": testId,
52313
+ style: tableStyle,
52314
+ children: [
52315
+ /* @__PURE__ */ jsx("thead", { ref: theadRef, children: headers.map((row2, rowIndex) => {
52316
+ return /* @__PURE__ */ jsx(
52317
+ Row,
52318
+ {
52319
+ rowIndex,
52320
+ isHeader: true,
52321
+ row: row2,
52322
+ columnCount,
52323
+ columnWidths,
52324
+ colSpan,
52325
+ hasRowActions: rowActions,
52326
+ columnAlignment,
52327
+ columnHeaderAlignments,
52328
+ draggableTable: draggable
52329
+ },
52330
+ `0_${rowIndex}`
52331
+ );
52332
+ }) }),
52333
+ /* @__PURE__ */ jsx("tbody", { ref: tbodyRef, children: virtualizer ? virtualizer.getVirtualItems().map((virtualRow2) => /* @__PURE__ */ jsx(
51876
52334
  Row,
51877
52335
  {
51878
- rowIndex,
51879
- isHeader: true,
52336
+ rowIndex: virtualRow2.index,
52337
+ row: rows[virtualRow2.index],
52338
+ columnCount,
52339
+ columnWidths,
52340
+ colSpan,
52341
+ hasRowActions: rowActions,
52342
+ columnAlignment,
52343
+ draggableTable: draggable,
52344
+ height: virtualRow2.size
52345
+ },
52346
+ `1_${virtualRow2.index}`
52347
+ )) : rows.map((row2, index2) => /* @__PURE__ */ jsx(
52348
+ Row,
52349
+ {
52350
+ rowIndex: index2,
51880
52351
  row: row2,
51881
52352
  columnCount,
51882
52353
  columnWidths,
51883
52354
  colSpan,
51884
52355
  hasRowActions: rowActions,
51885
52356
  columnAlignment,
51886
- columnHeaderAlignments,
51887
52357
  draggableTable: draggable
51888
52358
  },
51889
- `0_${rowIndex}`
51890
- );
51891
- }) }),
51892
- /* @__PURE__ */ jsx("tbody", { ref: tbodyRef, children: rows.slice(0, visibleRows).map((row2, rowIndex) => /* @__PURE__ */ jsx(
51893
- Row,
51894
- {
51895
- rowIndex,
51896
- row: row2,
51897
- columnCount,
51898
- columnWidths,
51899
- colSpan,
51900
- hasRowActions: rowActions,
51901
- columnAlignment,
51902
- draggableTable: draggable
51903
- },
51904
- `1_${rowIndex}`
51905
- )) })
51906
- ]
51907
- }
51908
- )
52359
+ `1_${index2}`
52360
+ )) })
52361
+ ]
52362
+ }
52363
+ );
52364
+ } })
51909
52365
  }
51910
- ) }),
52366
+ ),
51911
52367
  footer2 && /* @__PURE__ */ jsx(
51912
52368
  Footer,
51913
52369
  {
@@ -55020,7 +55476,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
55020
55476
  }
55021
55477
  let refCount = 0;
55022
55478
  const INSTANCE_SYM = Symbol.for("__REACT_DND_CONTEXT_INSTANCE__");
55023
- var DndProvider = /* @__PURE__ */ memo(function DndProvider2(_param) {
55479
+ var DndProvider = /* @__PURE__ */ memo$1(function DndProvider2(_param) {
55024
55480
  var { children } = _param, props = _objectWithoutProperties(_param, [
55025
55481
  "children"
55026
55482
  ]);
@@ -57381,7 +57837,7 @@ function useFeatures(props, visualElement2, preloadedFeatures) {
57381
57837
  var name_1 = featureNames[i];
57382
57838
  var _a2 = featureDefinitions[name_1], isEnabled = _a2.isEnabled, Component2 = _a2.Component;
57383
57839
  if (isEnabled(props) && Component2) {
57384
- features.push(React$4.createElement(Component2, __assign$4({ key: name_1 }, props, { visualElement: visualElement2 })));
57840
+ features.push(React$4.createElement(Component2, __assign$3({ key: name_1 }, props, { visualElement: visualElement2 })));
57385
57841
  }
57386
57842
  }
57387
57843
  return features;
@@ -57622,7 +58078,7 @@ function useProjection(projectionId, _a2, visualElement2, ProjectionNodeConstruc
57622
58078
  var VisualElementHandler = (
57623
58079
  /** @class */
57624
58080
  function(_super) {
57625
- __extends$1(VisualElementHandler2, _super);
58081
+ __extends(VisualElementHandler2, _super);
57626
58082
  function VisualElementHandler2() {
57627
58083
  return _super !== null && _super.apply(this, arguments) || this;
57628
58084
  }
@@ -57648,20 +58104,20 @@ function createMotionComponent(_a2) {
57648
58104
  preloadedFeatures && loadFeatures(preloadedFeatures);
57649
58105
  function MotionComponent(props, externalRef) {
57650
58106
  var layoutId = useLayoutId(props);
57651
- props = __assign$4(__assign$4({}, props), { layoutId });
58107
+ props = __assign$3(__assign$3({}, props), { layoutId });
57652
58108
  var config = useContext(MotionConfigContext);
57653
58109
  var features = null;
57654
58110
  var context2 = useCreateMotionContext(props);
57655
58111
  var projectionId = config.isStatic ? void 0 : useProjectionId();
57656
58112
  var visualState = useVisualState(props, config.isStatic);
57657
58113
  if (!config.isStatic && isBrowser) {
57658
- context2.visualElement = useVisualElement(Component2, visualState, __assign$4(__assign$4({}, config), props), createVisualElement);
58114
+ context2.visualElement = useVisualElement(Component2, visualState, __assign$3(__assign$3({}, config), props), createVisualElement);
57659
58115
  useProjection(projectionId, props, context2.visualElement, projectionNodeConstructor || featureDefinitions.projectionNodeConstructor);
57660
58116
  features = useFeatures(props, context2.visualElement, preloadedFeatures);
57661
58117
  }
57662
58118
  return React$4.createElement(
57663
58119
  VisualElementHandler,
57664
- { visualElement: context2.visualElement, props: __assign$4(__assign$4({}, config), props) },
58120
+ { visualElement: context2.visualElement, props: __assign$3(__assign$3({}, config), props) },
57665
58121
  features,
57666
58122
  React$4.createElement(MotionContext.Provider, { value: context2 }, useRender(Component2, props, projectionId, useMotionRef(visualState, context2.visualElement, externalRef), visualState, config.isStatic, context2.visualElement))
57667
58123
  );
@@ -57987,7 +58443,7 @@ const filter = Object.assign(Object.assign({}, complex), { getAnimatableNone: (v
57987
58443
  const functions = v2.match(functionRegex);
57988
58444
  return functions ? functions.map(applyDefaultFilter).join(" ") : v2;
57989
58445
  } });
57990
- var int = __assign$4(__assign$4({}, number), { transform: Math.round });
58446
+ var int = __assign$3(__assign$3({}, number), { transform: Math.round });
57991
58447
  var numberValueTypes = {
57992
58448
  // Border props
57993
58449
  borderWidth: px,
@@ -58117,7 +58573,7 @@ function useInitialMotionValues(_a2, visualState, isStatic) {
58117
58573
  var state = createHtmlRenderState();
58118
58574
  buildHTMLStyles(state, visualState, { enableHardwareAcceleration: !isStatic }, transformTemplate);
58119
58575
  var vars = state.vars, style = state.style;
58120
- return __assign$4(__assign$4({}, vars), style);
58576
+ return __assign$3(__assign$3({}, vars), style);
58121
58577
  }, [visualState]);
58122
58578
  }
58123
58579
  function useStyle(props, visualState, isStatic) {
@@ -58275,18 +58731,18 @@ function buildSVGAttrs(state, _a2, options, transformTemplate) {
58275
58731
  }
58276
58732
  }
58277
58733
  var createSvgRenderState = function() {
58278
- return __assign$4(__assign$4({}, createHtmlRenderState()), { attrs: {} });
58734
+ return __assign$3(__assign$3({}, createHtmlRenderState()), { attrs: {} });
58279
58735
  };
58280
58736
  function useSVGProps(props, visualState) {
58281
58737
  var visualProps = useMemo(function() {
58282
58738
  var state = createSvgRenderState();
58283
58739
  buildSVGAttrs(state, visualState, { enableHardwareAcceleration: false }, props.transformTemplate);
58284
- return __assign$4(__assign$4({}, state.attrs), { style: __assign$4({}, state.style) });
58740
+ return __assign$3(__assign$3({}, state.attrs), { style: __assign$3({}, state.style) });
58285
58741
  }, [visualState]);
58286
58742
  if (props.style) {
58287
58743
  var rawStyles = {};
58288
58744
  copyRawValuesOnly(rawStyles, props.style, props);
58289
- visualProps.style = __assign$4(__assign$4({}, rawStyles), visualProps.style);
58745
+ visualProps.style = __assign$3(__assign$3({}, rawStyles), visualProps.style);
58290
58746
  }
58291
58747
  return visualProps;
58292
58748
  }
@@ -58299,7 +58755,7 @@ function createUseRender(forwardMotionProps) {
58299
58755
  var useVisualProps = isSVGComponent(Component2) ? useSVGProps : useHTMLProps;
58300
58756
  var visualProps = useVisualProps(props, latestValues, isStatic);
58301
58757
  var filteredProps = filterProps(props, typeof Component2 === "string", forwardMotionProps);
58302
- var elementProps = __assign$4(__assign$4(__assign$4({}, filteredProps), visualProps), { ref });
58758
+ var elementProps = __assign$3(__assign$3(__assign$3({}, filteredProps), visualProps), { ref });
58303
58759
  if (projectionId) {
58304
58760
  elementProps["data-projection-id"] = projectionId;
58305
58761
  }
@@ -58476,7 +58932,7 @@ var htmlMotionConfig = {
58476
58932
  function createDomMotionConfig(Component2, _a2, preloadedFeatures, createVisualElement, projectionNodeConstructor) {
58477
58933
  var _b = _a2.forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;
58478
58934
  var baseConfig = isSVGComponent(Component2) ? svgMotionConfig : htmlMotionConfig;
58479
- return __assign$4(__assign$4({}, baseConfig), { preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement, projectionNodeConstructor, Component: Component2 });
58935
+ return __assign$3(__assign$3({}, baseConfig), { preloadedFeatures, useRender: createUseRender(forwardMotionProps), createVisualElement, projectionNodeConstructor, Component: Component2 });
58480
58936
  }
58481
58937
  var AnimationType;
58482
58938
  (function(AnimationType2) {
@@ -59563,7 +60019,7 @@ function initIntersectionObserver(_a2) {
59563
60019
  var rootObservers = observers.get(lookupRoot);
59564
60020
  var key2 = JSON.stringify(options);
59565
60021
  if (!rootObservers[key2]) {
59566
- rootObservers[key2] = new IntersectionObserver(fireAllObserverCallbacks, __assign$4({ root: root2 }, options));
60022
+ rootObservers[key2] = new IntersectionObserver(fireAllObserverCallbacks, __assign$3({ root: root2 }, options));
59567
60023
  }
59568
60024
  return rootObservers[key2];
59569
60025
  }
@@ -59781,9 +60237,9 @@ var getDefaultTransition = function(valueKey, to2) {
59781
60237
  } else {
59782
60238
  transitionFactory = defaultTransitions[valueKey] || defaultTransitions.default;
59783
60239
  }
59784
- return __assign$4({ to: to2 }, transitionFactory(to2));
60240
+ return __assign$3({ to: to2 }, transitionFactory(to2));
59785
60241
  };
59786
- var defaultValueTypes = __assign$4(__assign$4({}, numberValueTypes), {
60242
+ var defaultValueTypes = __assign$3(__assign$3({}, numberValueTypes), {
59787
60243
  // Color props
59788
60244
  color,
59789
60245
  backgroundColor: color,
@@ -59825,7 +60281,7 @@ function isTransitionDefined(_a2) {
59825
60281
  var legacyRepeatWarning = false;
59826
60282
  function convertTransitionToAnimationOptions(_a2) {
59827
60283
  var ease = _a2.ease, times = _a2.times, yoyo = _a2.yoyo, flip = _a2.flip, loop = _a2.loop, transition = __rest$1(_a2, ["ease", "times", "yoyo", "flip", "loop"]);
59828
- var options = __assign$4({}, transition);
60284
+ var options = __assign$3({}, transition);
59829
60285
  if (times)
59830
60286
  options["offset"] = times;
59831
60287
  if (transition.duration)
@@ -59872,9 +60328,9 @@ function getPopmotionAnimationOptions(transition, options, key2) {
59872
60328
  }
59873
60329
  hydrateKeyframes(options);
59874
60330
  if (!isTransitionDefined(transition)) {
59875
- transition = __assign$4(__assign$4({}, transition), getDefaultTransition(key2, options.to));
60331
+ transition = __assign$3(__assign$3({}, transition), getDefaultTransition(key2, options.to));
59876
60332
  }
59877
- return __assign$4(__assign$4({}, options), convertTransitionToAnimationOptions(transition));
60333
+ return __assign$3(__assign$3({}, options), convertTransitionToAnimationOptions(transition));
59878
60334
  }
59879
60335
  function getAnimation(key2, value, target, transition, onComplete) {
59880
60336
  var _a2;
@@ -59900,7 +60356,7 @@ function getAnimation(key2, value, target, transition, onComplete) {
59900
60356
  return value.set(v2);
59901
60357
  }
59902
60358
  };
59903
- return valueTransition.type === "inertia" || valueTransition.type === "decay" ? inertia(__assign$4(__assign$4({}, options), valueTransition)) : animate$1(__assign$4(__assign$4({}, getPopmotionAnimationOptions(valueTransition, options, key2)), { onUpdate: function(v2) {
60359
+ return valueTransition.type === "inertia" || valueTransition.type === "decay" ? inertia(__assign$3(__assign$3({}, options), valueTransition)) : animate$1(__assign$3(__assign$3({}, getPopmotionAnimationOptions(valueTransition, options, key2)), { onUpdate: function(v2) {
59904
60360
  var _a3;
59905
60361
  options.onUpdate(v2);
59906
60362
  (_a3 = valueTransition.onUpdate) === null || _a3 === void 0 ? void 0 : _a3.call(valueTransition, v2);
@@ -60153,7 +60609,7 @@ function setTarget(visualElement2, definition) {
60153
60609
  var _a2 = resolved ? visualElement2.makeTargetAnimatable(resolved, false) : {}, _b = _a2.transitionEnd, transitionEnd = _b === void 0 ? {} : _b;
60154
60610
  _a2.transition;
60155
60611
  var target = __rest$1(_a2, ["transitionEnd", "transition"]);
60156
- target = __assign$4(__assign$4({}, target), transitionEnd);
60612
+ target = __assign$3(__assign$3({}, target), transitionEnd);
60157
60613
  for (var key2 in target) {
60158
60614
  var value = resolveFinalValueInKeyframes(target[key2]);
60159
60615
  setMotionValue(visualElement2, key2, value);
@@ -60271,9 +60727,9 @@ function animateTarget(visualElement2, definition, _a2) {
60271
60727
  if (!value || valueTarget === void 0 || animationTypeState && shouldBlockAnimation(animationTypeState, key2)) {
60272
60728
  continue;
60273
60729
  }
60274
- var valueTransition = __assign$4({ delay }, transition);
60730
+ var valueTransition = __assign$3({ delay }, transition);
60275
60731
  if (visualElement2.shouldReduceMotion && isTransformProp(key2)) {
60276
- valueTransition = __assign$4(__assign$4({}, valueTransition), { type: false, delay: 0 });
60732
+ valueTransition = __assign$3(__assign$3({}, valueTransition), { type: false, delay: 0 });
60277
60733
  }
60278
60734
  var animation = startAnimation(key2, value, valueTarget, valueTransition);
60279
60735
  animations2.push(animation);
@@ -60306,7 +60762,7 @@ function animateChildren(visualElement2, variant, delayChildren, staggerChildren
60306
60762
  return maxStaggerDuration - i * staggerChildren;
60307
60763
  };
60308
60764
  Array.from(visualElement2.variantChildren).sort(sortByTreeOrder).forEach(function(child, i) {
60309
- animations2.push(animateVariant(child, variant, __assign$4(__assign$4({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function() {
60765
+ animations2.push(animateVariant(child, variant, __assign$3(__assign$3({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function() {
60310
60766
  return child.notifyAnimationComplete(variant);
60311
60767
  }));
60312
60768
  });
@@ -60350,7 +60806,7 @@ function createAnimationState(visualElement2) {
60350
60806
  if (resolved) {
60351
60807
  resolved.transition;
60352
60808
  var transitionEnd = resolved.transitionEnd, target = __rest$1(resolved, ["transition", "transitionEnd"]);
60353
- acc = __assign$4(__assign$4(__assign$4({}, acc), target), transitionEnd);
60809
+ acc = __assign$3(__assign$3(__assign$3({}, acc), target), transitionEnd);
60354
60810
  }
60355
60811
  return acc;
60356
60812
  };
@@ -60380,7 +60836,7 @@ function createAnimationState(visualElement2) {
60380
60836
  if (isInherited && isInitialRender && visualElement2.manuallyAnimateOnMount) {
60381
60837
  isInherited = false;
60382
60838
  }
60383
- typeState.protectedKeys = __assign$4({}, encounteredKeys);
60839
+ typeState.protectedKeys = __assign$3({}, encounteredKeys);
60384
60840
  if (
60385
60841
  // If it isn't active and hasn't *just* been set as inactive
60386
60842
  !typeState.isActive && activeDelta === null || // If we didn't and don't have any defined prop for this animation type
@@ -60398,7 +60854,7 @@ function createAnimationState(visualElement2) {
60398
60854
  if (activeDelta === false)
60399
60855
  resolvedValues = {};
60400
60856
  var _b = typeState.prevResolvedValues, prevResolvedValues = _b === void 0 ? {} : _b;
60401
- var allKeys = __assign$4(__assign$4({}, prevResolvedValues), resolvedValues);
60857
+ var allKeys = __assign$3(__assign$3({}, prevResolvedValues), resolvedValues);
60402
60858
  var markToAnimate = function(key3) {
60403
60859
  shouldAnimateType = true;
60404
60860
  removedKeys.delete(key3);
@@ -60430,7 +60886,7 @@ function createAnimationState(visualElement2) {
60430
60886
  typeState.prevProp = prop;
60431
60887
  typeState.prevResolvedValues = resolvedValues;
60432
60888
  if (typeState.isActive) {
60433
- encounteredKeys = __assign$4(__assign$4({}, encounteredKeys), resolvedValues);
60889
+ encounteredKeys = __assign$3(__assign$3({}, encounteredKeys), resolvedValues);
60434
60890
  }
60435
60891
  if (isInitialRender && visualElement2.blockInitialAnimation) {
60436
60892
  shouldAnimateType = false;
@@ -60439,7 +60895,7 @@ function createAnimationState(visualElement2) {
60439
60895
  animations2.push.apply(animations2, __spreadArray$2([], __read(definitionList.map(function(animation) {
60440
60896
  return {
60441
60897
  animation,
60442
- options: __assign$4({ type }, options)
60898
+ options: __assign$3({ type }, options)
60443
60899
  };
60444
60900
  })), false));
60445
60901
  }
@@ -60447,7 +60903,7 @@ function createAnimationState(visualElement2) {
60447
60903
  for (var i = 0; i < numAnimationTypes; i++) {
60448
60904
  _loop_1(i);
60449
60905
  }
60450
- allAnimatedKeys = __assign$4({}, encounteredKeys);
60906
+ allAnimatedKeys = __assign$3({}, encounteredKeys);
60451
60907
  if (removedKeys.size) {
60452
60908
  var fallbackAnimation_1 = {};
60453
60909
  removedKeys.forEach(function(key2) {
@@ -60555,7 +61011,7 @@ var PanSession = (
60555
61011
  return;
60556
61012
  var point2 = info3.point;
60557
61013
  var timestamp2 = getFrameData().timestamp;
60558
- _this.history.push(__assign$4(__assign$4({}, point2), { timestamp: timestamp2 }));
61014
+ _this.history.push(__assign$3(__assign$3({}, point2), { timestamp: timestamp2 }));
60559
61015
  var _a3 = _this.handlers, onStart = _a3.onStart, onMove = _a3.onMove;
60560
61016
  if (!isPanStarted) {
60561
61017
  onStart && onStart(_this.lastMoveEvent, info3);
@@ -60589,7 +61045,7 @@ var PanSession = (
60589
61045
  var initialInfo = transformPoint(info2, this.transformPagePoint);
60590
61046
  var point = initialInfo.point;
60591
61047
  var timestamp = getFrameData().timestamp;
60592
- this.history = [__assign$4(__assign$4({}, point), { timestamp })];
61048
+ this.history = [__assign$3(__assign$3({}, point), { timestamp })];
60593
61049
  var onSessionStart = handlers2.onSessionStart;
60594
61050
  onSessionStart && onSessionStart(event, getPanInfo(initialInfo, this.history));
60595
61051
  this.removeListeners = pipe(addPointerEvent(window, "pointermove", this.handlePointerMove), addPointerEvent(window, "pointerup", this.handlePointerUp), addPointerEvent(window, "pointercancel", this.handlePointerUp));
@@ -61110,7 +61566,7 @@ var VisualElementDragControls = (
61110
61566
  transition = { min: 0, max: 0 };
61111
61567
  var bounceStiffness = dragElastic ? 200 : 1e6;
61112
61568
  var bounceDamping = dragElastic ? 40 : 1e7;
61113
- var inertia2 = __assign$4(__assign$4({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness, bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);
61569
+ var inertia2 = __assign$3(__assign$3({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness, bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);
61114
61570
  return _this.startAxisValueAnimation(axis, inertia2);
61115
61571
  });
61116
61572
  return Promise.all(momentumAnimations).then(onDragTransitionEnd);
@@ -61221,7 +61677,7 @@ var VisualElementDragControls = (
61221
61677
  VisualElementDragControls2.prototype.getProps = function() {
61222
61678
  var props = this.visualElement.getProps();
61223
61679
  var _a2 = props.drag, drag2 = _a2 === void 0 ? false : _a2, _b = props.dragDirectionLock, dragDirectionLock = _b === void 0 ? false : _b, _c = props.dragPropagation, dragPropagation = _c === void 0 ? false : _c, _d = props.dragConstraints, dragConstraints = _d === void 0 ? false : _d, _e2 = props.dragElastic, dragElastic = _e2 === void 0 ? defaultElastic : _e2, _f = props.dragMomentum, dragMomentum = _f === void 0 ? true : _f;
61224
- return __assign$4(__assign$4({}, props), { drag: drag2, dragDirectionLock, dragPropagation, dragConstraints, dragElastic, dragMomentum });
61680
+ return __assign$3(__assign$3({}, props), { drag: drag2, dragDirectionLock, dragPropagation, dragConstraints, dragElastic, dragMomentum });
61225
61681
  };
61226
61682
  return VisualElementDragControls2;
61227
61683
  }()
@@ -61378,7 +61834,7 @@ var visualElement = function(_a2) {
61378
61834
  var values2 = /* @__PURE__ */ new Map();
61379
61835
  var valueSubscriptions = /* @__PURE__ */ new Map();
61380
61836
  var prevMotionValues = {};
61381
- var baseTarget = __assign$4({}, latestValues);
61837
+ var baseTarget = __assign$3({}, latestValues);
61382
61838
  var removeFromVariantTree;
61383
61839
  function render2() {
61384
61840
  if (!instance || !isMounted)
@@ -61412,7 +61868,7 @@ var visualElement = function(_a2) {
61412
61868
  }
61413
61869
  var isControllingVariants = checkIfControllingVariants(props);
61414
61870
  var isVariantNode = checkIfVariantNode(props);
61415
- var element = __assign$4(__assign$4({
61871
+ var element = __assign$3(__assign$3({
61416
61872
  treeType,
61417
61873
  /**
61418
61874
  * This is a mirror of the internal instance prop, which keeps
@@ -61777,7 +62233,7 @@ function resolveCSSVariables(visualElement2, _a2, transitionEnd) {
61777
62233
  if (!(element instanceof Element))
61778
62234
  return { target, transitionEnd };
61779
62235
  if (transitionEnd) {
61780
- transitionEnd = __assign$4({}, transitionEnd);
62236
+ transitionEnd = __assign$3({}, transitionEnd);
61781
62237
  }
61782
62238
  visualElement2.forEachValue(function(value) {
61783
62239
  var current2 = value.get();
@@ -61932,8 +62388,8 @@ var checkAndConvertChangedValueTypes = function(visualElement2, target, origin,
61932
62388
  if (transitionEnd === void 0) {
61933
62389
  transitionEnd = {};
61934
62390
  }
61935
- target = __assign$4({}, target);
61936
- transitionEnd = __assign$4({}, transitionEnd);
62391
+ target = __assign$3({}, target);
62392
+ transitionEnd = __assign$3({}, transitionEnd);
61937
62393
  var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);
61938
62394
  var removedTransformValues = [];
61939
62395
  var hasAttemptedToRemoveTransformValues = false;
@@ -62086,7 +62542,7 @@ var htmlConfig = {
62086
62542
  transitionEnd = parsed.transitionEnd;
62087
62543
  target = parsed.target;
62088
62544
  }
62089
- return __assign$4({ transition, transitionEnd }, target);
62545
+ return __assign$3({ transition, transitionEnd }, target);
62090
62546
  },
62091
62547
  scrapeMotionValuesFromProps: scrapeMotionValuesFromProps$1,
62092
62548
  build: function(element, renderState, latestValues, options, props) {
@@ -62098,7 +62554,7 @@ var htmlConfig = {
62098
62554
  render: renderHTML
62099
62555
  };
62100
62556
  var htmlVisualElement = visualElement(htmlConfig);
62101
- var svgVisualElement = visualElement(__assign$4(__assign$4({}, htmlConfig), { getBaseTarget: function(props, key2) {
62557
+ var svgVisualElement = visualElement(__assign$3(__assign$3({}, htmlConfig), { getBaseTarget: function(props, key2) {
62102
62558
  return props[key2];
62103
62559
  }, readValueFromInstance: function(domElement, key2) {
62104
62560
  var _a2;
@@ -62176,7 +62632,7 @@ var correctBoxShadow = {
62176
62632
  var MeasureLayoutWithContext = (
62177
62633
  /** @class */
62178
62634
  function(_super) {
62179
- __extends$1(MeasureLayoutWithContext2, _super);
62635
+ __extends(MeasureLayoutWithContext2, _super);
62180
62636
  function MeasureLayoutWithContext2() {
62181
62637
  return _super !== null && _super.apply(this, arguments) || this;
62182
62638
  }
@@ -62195,7 +62651,7 @@ var MeasureLayoutWithContext = (
62195
62651
  projection.addEventListener("animationComplete", function() {
62196
62652
  _this.safeToRemove();
62197
62653
  });
62198
- projection.setOptions(__assign$4(__assign$4({}, projection.options), { onExitComplete: function() {
62654
+ projection.setOptions(__assign$3(__assign$3({}, projection.options), { onExitComplete: function() {
62199
62655
  return _this.safeToRemove();
62200
62656
  } }));
62201
62657
  }
@@ -62260,10 +62716,10 @@ var MeasureLayoutWithContext = (
62260
62716
  function MeasureLayout(props) {
62261
62717
  var _a2 = __read(usePresence(), 2), isPresent = _a2[0], safeToRemove = _a2[1];
62262
62718
  var layoutGroup = useContext(LayoutGroupContext);
62263
- return React__default.createElement(MeasureLayoutWithContext, __assign$4({}, props, { layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent, safeToRemove }));
62719
+ return React__default.createElement(MeasureLayoutWithContext, __assign$3({}, props, { layoutGroup, switchLayoutGroup: useContext(SwitchLayoutGroupContext), isPresent, safeToRemove }));
62264
62720
  }
62265
62721
  var defaultScaleCorrectors = {
62266
- borderRadius: __assign$4(__assign$4({}, correctBorderRadius), { applyTo: [
62722
+ borderRadius: __assign$3(__assign$3({}, correctBorderRadius), { applyTo: [
62267
62723
  "borderTopLeftRadius",
62268
62724
  "borderTopRightRadius",
62269
62725
  "borderBottomLeftRadius",
@@ -62686,7 +63142,7 @@ function createProjectionNode(_a2) {
62686
63142
  _this.resumingFrom.resumingFrom = void 0;
62687
63143
  }
62688
63144
  _this.setAnimationOrigin(delta, hasOnlyRelativeTargetChanged);
62689
- var animationOptions = __assign$4(__assign$4({}, getValueTransition(layoutTransition, "layout")), { onPlay: onLayoutAnimationStart, onComplete: onLayoutAnimationComplete });
63145
+ var animationOptions = __assign$3(__assign$3({}, getValueTransition(layoutTransition, "layout")), { onPlay: onLayoutAnimationStart, onComplete: onLayoutAnimationComplete });
62690
63146
  if (visualElement2.shouldReduceMotion) {
62691
63147
  animationOptions.delay = 0;
62692
63148
  animationOptions.type = false;
@@ -62940,7 +63396,7 @@ function createProjectionNode(_a2) {
62940
63396
  };
62941
63397
  ProjectionNode.prototype.setOptions = function(options) {
62942
63398
  var _a3;
62943
- this.options = __assign$4(__assign$4(__assign$4({}, this.options), options), { crossfade: (_a3 = options.crossfade) !== null && _a3 !== void 0 ? _a3 : true });
63399
+ this.options = __assign$3(__assign$3(__assign$3({}, this.options), options), { crossfade: (_a3 = options.crossfade) !== null && _a3 !== void 0 ? _a3 : true });
62944
63400
  };
62945
63401
  ProjectionNode.prototype.clearMeasurements = function() {
62946
63402
  this.scroll = void 0;
@@ -63058,7 +63514,7 @@ function createProjectionNode(_a2) {
63058
63514
  }
63059
63515
  var snapshot = this.snapshot;
63060
63516
  var snapshotLatestValues = (snapshot === null || snapshot === void 0 ? void 0 : snapshot.latestValues) || {};
63061
- var mixedValues = __assign$4({}, this.latestValues);
63517
+ var mixedValues = __assign$3({}, this.latestValues);
63062
63518
  var targetDelta = createDelta();
63063
63519
  this.relativeTarget = this.relativeTargetOrigin = void 0;
63064
63520
  this.attemptToResolveRelativeTarget = !hasOnlyRelativeTargetChanged;
@@ -63101,7 +63557,7 @@ function createProjectionNode(_a2) {
63101
63557
  }
63102
63558
  this.pendingAnimation = sync.update(function() {
63103
63559
  globalProjectionState.hasAnimatedSinceResize = true;
63104
- _this.currentAnimation = animate(0, animationTarget, __assign$4(__assign$4({}, options), { onUpdate: function(latest) {
63560
+ _this.currentAnimation = animate(0, animationTarget, __assign$3(__assign$3({}, options), { onUpdate: function(latest) {
63105
63561
  var _a4;
63106
63562
  _this.mixTargetDelta(latest);
63107
63563
  (_a4 = options.onUpdate) === null || _a4 === void 0 ? void 0 : _a4.call(options, latest);
@@ -63469,7 +63925,7 @@ var HTMLProjectionNode = createProjectionNode({
63469
63925
  return Boolean(window.getComputedStyle(instance).position === "fixed");
63470
63926
  }
63471
63927
  });
63472
- var featureBundle = __assign$4(__assign$4(__assign$4(__assign$4({}, animations), gestureAnimations), drag), layoutFeatures);
63928
+ var featureBundle = __assign$3(__assign$3(__assign$3(__assign$3({}, animations), gestureAnimations), drag), layoutFeatures);
63473
63929
  var motion = /* @__PURE__ */ createMotionProxy(function(Component2, config) {
63474
63930
  return createDomMotionConfig(Component2, config, featureBundle, createDomVisualElement, HTMLProjectionNode);
63475
63931
  });