@iblai/iblai-js 2.7.9 → 2.7.11

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.
@@ -9,6 +9,7 @@ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
9
9
  import * as ReactDOM from 'react-dom';
10
10
  import ReactDOM__default from 'react-dom';
11
11
  import { z } from 'zod';
12
+ import { RemoveScroll } from 'react-remove-scroll';
12
13
  import { skipToken } from '@reduxjs/toolkit/query';
13
14
  import * as DialogPrimitive from '@radix-ui/react-dialog';
14
15
  import { createDialogScope } from '@radix-ui/react-dialog';
@@ -38460,7 +38461,7 @@ const svg$2 = merge$2([aria$3, svg$3, xlink$2, xmlns$2, xml$3], 'svg');
38460
38461
  * @returns {Array<string>}
38461
38462
  * List of tokens.
38462
38463
  */
38463
- function parse$8(value) {
38464
+ function parse$7(value) {
38464
38465
  /** @type {Array<string>} */
38465
38466
  const tokens = [];
38466
38467
  const input = String(value || '');
@@ -38609,7 +38610,7 @@ function parseSelector$1(selector, defaultTagName) {
38609
38610
  * @returns {Array<string>}
38610
38611
  * List of tokens.
38611
38612
  */
38612
- function parse$7(value) {
38613
+ function parse$6(value) {
38613
38614
  const input = String(value || '').trim();
38614
38615
  return input ? input.split(/[ \t\n\r\f]+/g) : []
38615
38616
  }
@@ -38797,11 +38798,11 @@ function addProperty(schema, properties, key, value) {
38797
38798
  // Handle list values.
38798
38799
  else if (typeof value === 'string') {
38799
38800
  if (info.spaceSeparated) {
38800
- result = parse$7(value);
38801
+ result = parse$6(value);
38801
38802
  } else if (info.commaSeparated) {
38802
- result = parse$8(value);
38803
+ result = parse$7(value);
38803
38804
  } else if (info.commaOrSpaceSeparated) {
38804
- result = parse$7(parse$8(value).join(' '));
38805
+ result = parse$6(parse$7(value).join(' '));
38805
38806
  } else {
38806
38807
  result = parsePrimitive$1(info, info.property, value);
38807
38808
  }
@@ -47664,7 +47665,7 @@ new Set([
47664
47665
  * console.log(document.childNodes[1].tagName); //> 'html'
47665
47666
  *```
47666
47667
  */
47667
- function parse$6(html, options) {
47668
+ function parse$5(html, options) {
47668
47669
  return Parser.parse(html, options);
47669
47670
  }
47670
47671
  function parseFragment(fragmentContext, html, options) {
@@ -49618,7 +49619,7 @@ function fromHtml(value, options) {
49618
49619
  const settings = options || emptyOptions$7;
49619
49620
  const onerror = settings.onerror;
49620
49621
  const file = value instanceof VFile ? value : new VFile(value);
49621
- const parseFunction = settings.fragment ? parseFragment : parse$6;
49622
+ const parseFunction = settings.fragment ? parseFragment : parse$5;
49622
49623
  const document = String(file);
49623
49624
  const p5Document = parseFunction(document, {
49624
49625
  sourceCodeLocationInfo: true,
@@ -72499,7 +72500,7 @@ function serializeChunks(chunks, expandTabs) {
72499
72500
  * @returns {ParseContext}
72500
72501
  * Parser.
72501
72502
  */
72502
- function parse$5(options) {
72503
+ function parse$4(options) {
72503
72504
  const settings = options || {};
72504
72505
  const constructs = /** @type {FullNormalizedExtension} */
72505
72506
  combineExtensions([defaultConstructs, ...(settings.extensions || [])]);
@@ -72737,7 +72738,7 @@ function fromMarkdown(value, encoding, options) {
72737
72738
  options = encoding;
72738
72739
  encoding = undefined;
72739
72740
  }
72740
- return compiler(options)(postprocess(parse$5(options).document().write(preprocess()(value, encoding, true))));
72741
+ return compiler(options)(postprocess(parse$4(options).document().write(preprocess()(value, encoding, true))));
72741
72742
  }
72742
72743
 
72743
72744
  /**
@@ -80780,7 +80781,7 @@ function dispatchDiscreteCustomEvent$1(target, event) {
80780
80781
  }
80781
80782
 
80782
80783
  // packages/react/use-callback-ref/src/use-callback-ref.tsx
80783
- function useCallbackRef$2(callback) {
80784
+ function useCallbackRef$1(callback) {
80784
80785
  const callbackRef = React.useRef(callback);
80785
80786
  React.useEffect(() => {
80786
80787
  callbackRef.current = callback;
@@ -80790,7 +80791,7 @@ function useCallbackRef$2(callback) {
80790
80791
 
80791
80792
  // packages/react/use-escape-keydown/src/use-escape-keydown.tsx
80792
80793
  function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
80793
- const onEscapeKeyDown = useCallbackRef$2(onEscapeKeyDownProp);
80794
+ const onEscapeKeyDown = useCallbackRef$1(onEscapeKeyDownProp);
80794
80795
  React.useEffect(() => {
80795
80796
  const handleKeyDown = (event) => {
80796
80797
  if (event.key === "Escape") {
@@ -80927,7 +80928,7 @@ var DismissableLayerBranch$2 = React.forwardRef((props, forwardedRef) => {
80927
80928
  });
80928
80929
  DismissableLayerBranch$2.displayName = BRANCH_NAME$2;
80929
80930
  function usePointerDownOutside$2(onPointerDownOutside, ownerDocument = globalThis?.document) {
80930
- const handlePointerDownOutside = useCallbackRef$2(onPointerDownOutside);
80931
+ const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
80931
80932
  const isPointerInsideReactTreeRef = React.useRef(false);
80932
80933
  const handleClickRef = React.useRef(() => {
80933
80934
  });
@@ -80970,7 +80971,7 @@ function usePointerDownOutside$2(onPointerDownOutside, ownerDocument = globalThi
80970
80971
  };
80971
80972
  }
80972
80973
  function useFocusOutside$2(onFocusOutside, ownerDocument = globalThis?.document) {
80973
- const handleFocusOutside = useCallbackRef$2(onFocusOutside);
80974
+ const handleFocusOutside = useCallbackRef$1(onFocusOutside);
80974
80975
  const isFocusInsideReactTreeRef = React.useRef(false);
80975
80976
  React.useEffect(() => {
80976
80977
  const handleFocus = (event) => {
@@ -81043,8 +81044,8 @@ var FocusScope = React.forwardRef((props, forwardedRef) => {
81043
81044
  ...scopeProps
81044
81045
  } = props;
81045
81046
  const [container, setContainer] = React.useState(null);
81046
- const onMountAutoFocus = useCallbackRef$2(onMountAutoFocusProp);
81047
- const onUnmountAutoFocus = useCallbackRef$2(onUnmountAutoFocusProp);
81047
+ const onMountAutoFocus = useCallbackRef$1(onMountAutoFocusProp);
81048
+ const onUnmountAutoFocus = useCallbackRef$1(onUnmountAutoFocusProp);
81048
81049
  const lastFocusedElementRef = React.useRef(null);
81049
81050
  const composedRefs = useComposedRefs$1(forwardedRef, (node) => setContainer(node));
81050
81051
  const focusScope = React.useRef({
@@ -83597,7 +83598,7 @@ var PopperContent$1 = React.forwardRef(
83597
83598
  ]
83598
83599
  });
83599
83600
  const [placedSide, placedAlign] = getSideAndAlignFromPlacement$1(placement);
83600
- const handlePlaced = useCallbackRef$2(onPlaced);
83601
+ const handlePlaced = useCallbackRef$1(onPlaced);
83601
83602
  useLayoutEffect2$1(() => {
83602
83603
  if (isPositioned) {
83603
83604
  handlePlaced?.();
@@ -83783,7 +83784,7 @@ function useControllableState$1({
83783
83784
  const [uncontrolledProp, setUncontrolledProp] = useUncontrolledState$1({ defaultProp, onChange });
83784
83785
  const isControlled = prop !== void 0;
83785
83786
  const value = isControlled ? prop : uncontrolledProp;
83786
- const handleChange = useCallbackRef$2(onChange);
83787
+ const handleChange = useCallbackRef$1(onChange);
83787
83788
  const setValue = React.useCallback(
83788
83789
  (nextValue) => {
83789
83790
  if (isControlled) {
@@ -83805,7 +83806,7 @@ function useUncontrolledState$1({
83805
83806
  const uncontrolledState = React.useState(defaultProp);
83806
83807
  const [value] = uncontrolledState;
83807
83808
  const prevValueRef = React.useRef(value);
83808
- const handleChange = useCallbackRef$2(onChange);
83809
+ const handleChange = useCallbackRef$1(onChange);
83809
83810
  React.useEffect(() => {
83810
83811
  if (prevValueRef.current !== value) {
83811
83812
  handleChange(value);
@@ -83980,764 +83981,6 @@ var hideOthers = function (originalTarget, parentNode, markerName) {
83980
83981
  return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');
83981
83982
  };
83982
83983
 
83983
- /******************************************************************************
83984
- Copyright (c) Microsoft Corporation.
83985
-
83986
- Permission to use, copy, modify, and/or distribute this software for any
83987
- purpose with or without fee is hereby granted.
83988
-
83989
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
83990
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
83991
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
83992
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
83993
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
83994
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
83995
- PERFORMANCE OF THIS SOFTWARE.
83996
- ***************************************************************************** */
83997
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
83998
-
83999
-
84000
- var __assign = function() {
84001
- __assign = Object.assign || function __assign(t) {
84002
- for (var s, i = 1, n = arguments.length; i < n; i++) {
84003
- s = arguments[i];
84004
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
84005
- }
84006
- return t;
84007
- };
84008
- return __assign.apply(this, arguments);
84009
- };
84010
-
84011
- function __rest$2(s, e) {
84012
- var t = {};
84013
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
84014
- t[p] = s[p];
84015
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
84016
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
84017
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
84018
- t[p[i]] = s[p[i]];
84019
- }
84020
- return t;
84021
- }
84022
-
84023
- function __spreadArray$1(to, from, pack) {
84024
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
84025
- if (ar || !(i in from)) {
84026
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
84027
- ar[i] = from[i];
84028
- }
84029
- }
84030
- return to.concat(ar || Array.prototype.slice.call(from));
84031
- }
84032
-
84033
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
84034
- var e = new Error(message);
84035
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
84036
- };
84037
-
84038
- var zeroRightClassName = 'right-scroll-bar-position';
84039
- var fullWidthClassName = 'width-before-scroll-bar';
84040
- var noScrollbarsClassName = 'with-scroll-bars-hidden';
84041
- /**
84042
- * Name of a CSS variable containing the amount of "hidden" scrollbar
84043
- * ! might be undefined ! use will fallback!
84044
- */
84045
- var removedBarSizeVariable = '--removed-body-scroll-bar-size';
84046
-
84047
- /**
84048
- * Assigns a value for a given ref, no matter of the ref format
84049
- * @param {RefObject} ref - a callback function or ref object
84050
- * @param value - a new value
84051
- *
84052
- * @see https://github.com/theKashey/use-callback-ref#assignref
84053
- * @example
84054
- * const refObject = useRef();
84055
- * const refFn = (ref) => {....}
84056
- *
84057
- * assignRef(refObject, "refValue");
84058
- * assignRef(refFn, "refValue");
84059
- */
84060
- function assignRef(ref, value) {
84061
- if (typeof ref === 'function') {
84062
- ref(value);
84063
- }
84064
- else if (ref) {
84065
- ref.current = value;
84066
- }
84067
- return ref;
84068
- }
84069
-
84070
- /**
84071
- * creates a MutableRef with ref change callback
84072
- * @param initialValue - initial ref value
84073
- * @param {Function} callback - a callback to run when value changes
84074
- *
84075
- * @example
84076
- * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);
84077
- * ref.current = 1;
84078
- * // prints 0 -> 1
84079
- *
84080
- * @see https://reactjs.org/docs/hooks-reference.html#useref
84081
- * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref
84082
- * @returns {MutableRefObject}
84083
- */
84084
- function useCallbackRef$1(initialValue, callback) {
84085
- var ref = useState(function () { return ({
84086
- // value
84087
- value: initialValue,
84088
- // last callback
84089
- callback: callback,
84090
- // "memoized" public interface
84091
- facade: {
84092
- get current() {
84093
- return ref.value;
84094
- },
84095
- set current(value) {
84096
- var last = ref.value;
84097
- if (last !== value) {
84098
- ref.value = value;
84099
- ref.callback(value, last);
84100
- }
84101
- },
84102
- },
84103
- }); })[0];
84104
- // update callback
84105
- ref.callback = callback;
84106
- return ref.facade;
84107
- }
84108
-
84109
- var useIsomorphicLayoutEffect$3 = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
84110
- var currentValues = new WeakMap();
84111
- /**
84112
- * Merges two or more refs together providing a single interface to set their value
84113
- * @param {RefObject|Ref} refs
84114
- * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}
84115
- *
84116
- * @see {@link mergeRefs} a version without buit-in memoization
84117
- * @see https://github.com/theKashey/use-callback-ref#usemergerefs
84118
- * @example
84119
- * const Component = React.forwardRef((props, ref) => {
84120
- * const ownRef = useRef();
84121
- * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together
84122
- * return <div ref={domRef}>...</div>
84123
- * }
84124
- */
84125
- function useMergeRefs(refs, defaultValue) {
84126
- var callbackRef = useCallbackRef$1(null, function (newValue) {
84127
- return refs.forEach(function (ref) { return assignRef(ref, newValue); });
84128
- });
84129
- // handle refs changes - added or removed
84130
- useIsomorphicLayoutEffect$3(function () {
84131
- var oldValue = currentValues.get(callbackRef);
84132
- if (oldValue) {
84133
- var prevRefs_1 = new Set(oldValue);
84134
- var nextRefs_1 = new Set(refs);
84135
- var current_1 = callbackRef.current;
84136
- prevRefs_1.forEach(function (ref) {
84137
- if (!nextRefs_1.has(ref)) {
84138
- assignRef(ref, null);
84139
- }
84140
- });
84141
- nextRefs_1.forEach(function (ref) {
84142
- if (!prevRefs_1.has(ref)) {
84143
- assignRef(ref, current_1);
84144
- }
84145
- });
84146
- }
84147
- currentValues.set(callbackRef, refs);
84148
- }, [refs]);
84149
- return callbackRef;
84150
- }
84151
-
84152
- function ItoI(a) {
84153
- return a;
84154
- }
84155
- function innerCreateMedium(defaults, middleware) {
84156
- if (middleware === void 0) { middleware = ItoI; }
84157
- var buffer = [];
84158
- var assigned = false;
84159
- var medium = {
84160
- read: function () {
84161
- if (assigned) {
84162
- throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');
84163
- }
84164
- if (buffer.length) {
84165
- return buffer[buffer.length - 1];
84166
- }
84167
- return defaults;
84168
- },
84169
- useMedium: function (data) {
84170
- var item = middleware(data, assigned);
84171
- buffer.push(item);
84172
- return function () {
84173
- buffer = buffer.filter(function (x) { return x !== item; });
84174
- };
84175
- },
84176
- assignSyncMedium: function (cb) {
84177
- assigned = true;
84178
- while (buffer.length) {
84179
- var cbs = buffer;
84180
- buffer = [];
84181
- cbs.forEach(cb);
84182
- }
84183
- buffer = {
84184
- push: function (x) { return cb(x); },
84185
- filter: function () { return buffer; },
84186
- };
84187
- },
84188
- assignMedium: function (cb) {
84189
- assigned = true;
84190
- var pendingQueue = [];
84191
- if (buffer.length) {
84192
- var cbs = buffer;
84193
- buffer = [];
84194
- cbs.forEach(cb);
84195
- pendingQueue = buffer;
84196
- }
84197
- var executeQueue = function () {
84198
- var cbs = pendingQueue;
84199
- pendingQueue = [];
84200
- cbs.forEach(cb);
84201
- };
84202
- var cycle = function () { return Promise.resolve().then(executeQueue); };
84203
- cycle();
84204
- buffer = {
84205
- push: function (x) {
84206
- pendingQueue.push(x);
84207
- cycle();
84208
- },
84209
- filter: function (filter) {
84210
- pendingQueue = pendingQueue.filter(filter);
84211
- return buffer;
84212
- },
84213
- };
84214
- },
84215
- };
84216
- return medium;
84217
- }
84218
- // eslint-disable-next-line @typescript-eslint/ban-types
84219
- function createSidecarMedium(options) {
84220
- if (options === void 0) { options = {}; }
84221
- var medium = innerCreateMedium(null);
84222
- medium.options = __assign({ async: true, ssr: false }, options);
84223
- return medium;
84224
- }
84225
-
84226
- var SideCar$1 = function (_a) {
84227
- var sideCar = _a.sideCar, rest = __rest$2(_a, ["sideCar"]);
84228
- if (!sideCar) {
84229
- throw new Error('Sidecar: please provide `sideCar` property to import the right car');
84230
- }
84231
- var Target = sideCar.read();
84232
- if (!Target) {
84233
- throw new Error('Sidecar medium not found');
84234
- }
84235
- return React.createElement(Target, __assign({}, rest));
84236
- };
84237
- SideCar$1.isSideCarExport = true;
84238
- function exportSidecar(medium, exported) {
84239
- medium.useMedium(exported);
84240
- return SideCar$1;
84241
- }
84242
-
84243
- var effectCar = createSidecarMedium();
84244
-
84245
- var nothing = function () {
84246
- return;
84247
- };
84248
- /**
84249
- * Removes scrollbar from the page and contain the scroll within the Lock
84250
- */
84251
- var RemoveScroll = React.forwardRef(function (props, parentRef) {
84252
- var ref = React.useRef(null);
84253
- var _a = React.useState({
84254
- onScrollCapture: nothing,
84255
- onWheelCapture: nothing,
84256
- onTouchMoveCapture: nothing,
84257
- }), callbacks = _a[0], setCallbacks = _a[1];
84258
- var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noRelative = props.noRelative, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, gapMode = props.gapMode, rest = __rest$2(props, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]);
84259
- var SideCar = sideCar;
84260
- var containerRef = useMergeRefs([ref, parentRef]);
84261
- var containerProps = __assign(__assign({}, rest), callbacks);
84262
- return (React.createElement(React.Fragment, null,
84263
- enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noRelative: noRelative, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref, gapMode: gapMode })),
84264
- forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));
84265
- });
84266
- RemoveScroll.defaultProps = {
84267
- enabled: true,
84268
- removeScrollBar: true,
84269
- inert: false,
84270
- };
84271
- RemoveScroll.classNames = {
84272
- fullWidth: fullWidthClassName,
84273
- zeroRight: zeroRightClassName,
84274
- };
84275
-
84276
- var getNonce = function () {
84277
- if (typeof __webpack_nonce__ !== 'undefined') {
84278
- return __webpack_nonce__;
84279
- }
84280
- return undefined;
84281
- };
84282
-
84283
- function makeStyleTag() {
84284
- if (!document)
84285
- return null;
84286
- var tag = document.createElement('style');
84287
- tag.type = 'text/css';
84288
- var nonce = getNonce();
84289
- if (nonce) {
84290
- tag.setAttribute('nonce', nonce);
84291
- }
84292
- return tag;
84293
- }
84294
- function injectStyles(tag, css) {
84295
- // @ts-ignore
84296
- if (tag.styleSheet) {
84297
- // @ts-ignore
84298
- tag.styleSheet.cssText = css;
84299
- }
84300
- else {
84301
- tag.appendChild(document.createTextNode(css));
84302
- }
84303
- }
84304
- function insertStyleTag(tag) {
84305
- var head = document.head || document.getElementsByTagName('head')[0];
84306
- head.appendChild(tag);
84307
- }
84308
- var stylesheetSingleton = function () {
84309
- var counter = 0;
84310
- var stylesheet = null;
84311
- return {
84312
- add: function (style) {
84313
- if (counter == 0) {
84314
- if ((stylesheet = makeStyleTag())) {
84315
- injectStyles(stylesheet, style);
84316
- insertStyleTag(stylesheet);
84317
- }
84318
- }
84319
- counter++;
84320
- },
84321
- remove: function () {
84322
- counter--;
84323
- if (!counter && stylesheet) {
84324
- stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);
84325
- stylesheet = null;
84326
- }
84327
- },
84328
- };
84329
- };
84330
-
84331
- /**
84332
- * creates a hook to control style singleton
84333
- * @see {@link styleSingleton} for a safer component version
84334
- * @example
84335
- * ```tsx
84336
- * const useStyle = styleHookSingleton();
84337
- * ///
84338
- * useStyle('body { overflow: hidden}');
84339
- */
84340
- var styleHookSingleton = function () {
84341
- var sheet = stylesheetSingleton();
84342
- return function (styles, isDynamic) {
84343
- React.useEffect(function () {
84344
- sheet.add(styles);
84345
- return function () {
84346
- sheet.remove();
84347
- };
84348
- }, [styles && isDynamic]);
84349
- };
84350
- };
84351
-
84352
- /**
84353
- * create a Component to add styles on demand
84354
- * - styles are added when first instance is mounted
84355
- * - styles are removed when the last instance is unmounted
84356
- * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior
84357
- */
84358
- var styleSingleton = function () {
84359
- var useStyle = styleHookSingleton();
84360
- var Sheet = function (_a) {
84361
- var styles = _a.styles, dynamic = _a.dynamic;
84362
- useStyle(styles, dynamic);
84363
- return null;
84364
- };
84365
- return Sheet;
84366
- };
84367
-
84368
- var zeroGap = {
84369
- left: 0,
84370
- top: 0,
84371
- right: 0,
84372
- gap: 0,
84373
- };
84374
- var parse$4 = function (x) { return parseInt(x || '', 10) || 0; };
84375
- var getOffset$1 = function (gapMode) {
84376
- var cs = window.getComputedStyle(document.body);
84377
- var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];
84378
- var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];
84379
- var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];
84380
- return [parse$4(left), parse$4(top), parse$4(right)];
84381
- };
84382
- var getGapWidth = function (gapMode) {
84383
- if (gapMode === void 0) { gapMode = 'margin'; }
84384
- if (typeof window === 'undefined') {
84385
- return zeroGap;
84386
- }
84387
- var offsets = getOffset$1(gapMode);
84388
- var documentWidth = document.documentElement.clientWidth;
84389
- var windowWidth = window.innerWidth;
84390
- return {
84391
- left: offsets[0],
84392
- top: offsets[1],
84393
- right: offsets[2],
84394
- gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),
84395
- };
84396
- };
84397
-
84398
- var Style = styleSingleton();
84399
- var lockAttribute = 'data-scroll-locked';
84400
- // important tip - once we measure scrollBar width and remove them
84401
- // we could not repeat this operation
84402
- // thus we are using style-singleton - only the first "yet correct" style will be applied.
84403
- var getStyles = function (_a, allowRelative, gapMode, important) {
84404
- var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;
84405
- if (gapMode === void 0) { gapMode = 'margin'; }
84406
- return "\n .".concat(noScrollbarsClassName, " {\n overflow: hidden ").concat(important, ";\n padding-right: ").concat(gap, "px ").concat(important, ";\n }\n body[").concat(lockAttribute, "] {\n overflow: hidden ").concat(important, ";\n overscroll-behavior: contain;\n ").concat([
84407
- allowRelative && "position: relative ".concat(important, ";"),
84408
- gapMode === 'margin' &&
84409
- "\n padding-left: ".concat(left, "px;\n padding-top: ").concat(top, "px;\n padding-right: ").concat(right, "px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(gap, "px ").concat(important, ";\n "),
84410
- gapMode === 'padding' && "padding-right: ".concat(gap, "px ").concat(important, ";"),
84411
- ]
84412
- .filter(Boolean)
84413
- .join(''), "\n }\n \n .").concat(zeroRightClassName, " {\n right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " {\n margin-right: ").concat(gap, "px ").concat(important, ";\n }\n \n .").concat(zeroRightClassName, " .").concat(zeroRightClassName, " {\n right: 0 ").concat(important, ";\n }\n \n .").concat(fullWidthClassName, " .").concat(fullWidthClassName, " {\n margin-right: 0 ").concat(important, ";\n }\n \n body[").concat(lockAttribute, "] {\n ").concat(removedBarSizeVariable, ": ").concat(gap, "px;\n }\n");
84414
- };
84415
- var getCurrentUseCounter = function () {
84416
- var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);
84417
- return isFinite(counter) ? counter : 0;
84418
- };
84419
- var useLockAttribute = function () {
84420
- React.useEffect(function () {
84421
- document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());
84422
- return function () {
84423
- var newCounter = getCurrentUseCounter() - 1;
84424
- if (newCounter <= 0) {
84425
- document.body.removeAttribute(lockAttribute);
84426
- }
84427
- else {
84428
- document.body.setAttribute(lockAttribute, newCounter.toString());
84429
- }
84430
- };
84431
- }, []);
84432
- };
84433
- /**
84434
- * Removes page scrollbar and blocks page scroll when mounted
84435
- */
84436
- var RemoveScrollBar = function (_a) {
84437
- var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;
84438
- useLockAttribute();
84439
- /*
84440
- gap will be measured on every component mount
84441
- however it will be used only by the "first" invocation
84442
- due to singleton nature of <Style
84443
- */
84444
- var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);
84445
- return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });
84446
- };
84447
-
84448
- var passiveSupported = false;
84449
- if (typeof window !== 'undefined') {
84450
- try {
84451
- var options = Object.defineProperty({}, 'passive', {
84452
- get: function () {
84453
- passiveSupported = true;
84454
- return true;
84455
- },
84456
- });
84457
- // @ts-ignore
84458
- window.addEventListener('test', options, options);
84459
- // @ts-ignore
84460
- window.removeEventListener('test', options, options);
84461
- }
84462
- catch (err) {
84463
- passiveSupported = false;
84464
- }
84465
- }
84466
- var nonPassive = passiveSupported ? { passive: false } : false;
84467
-
84468
- var alwaysContainsScroll = function (node) {
84469
- // textarea will always _contain_ scroll inside self. It only can be hidden
84470
- return node.tagName === 'TEXTAREA';
84471
- };
84472
- var elementCanBeScrolled = function (node, overflow) {
84473
- if (!(node instanceof Element)) {
84474
- return false;
84475
- }
84476
- var styles = window.getComputedStyle(node);
84477
- return (
84478
- // not-not-scrollable
84479
- styles[overflow] !== 'hidden' &&
84480
- // contains scroll inside self
84481
- !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));
84482
- };
84483
- var elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };
84484
- var elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };
84485
- var locationCouldBeScrolled = function (axis, node) {
84486
- var ownerDocument = node.ownerDocument;
84487
- var current = node;
84488
- do {
84489
- // Skip over shadow root
84490
- if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {
84491
- current = current.host;
84492
- }
84493
- var isScrollable = elementCouldBeScrolled(axis, current);
84494
- if (isScrollable) {
84495
- var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];
84496
- if (scrollHeight > clientHeight) {
84497
- return true;
84498
- }
84499
- }
84500
- current = current.parentNode;
84501
- } while (current && current !== ownerDocument.body);
84502
- return false;
84503
- };
84504
- var getVScrollVariables = function (_a) {
84505
- var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
84506
- return [
84507
- scrollTop,
84508
- scrollHeight,
84509
- clientHeight,
84510
- ];
84511
- };
84512
- var getHScrollVariables = function (_a) {
84513
- var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;
84514
- return [
84515
- scrollLeft,
84516
- scrollWidth,
84517
- clientWidth,
84518
- ];
84519
- };
84520
- var elementCouldBeScrolled = function (axis, node) {
84521
- return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);
84522
- };
84523
- var getScrollVariables = function (axis, node) {
84524
- return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);
84525
- };
84526
- var getDirectionFactor = function (axis, direction) {
84527
- /**
84528
- * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,
84529
- * and then increasingly negative as you scroll towards the end of the content.
84530
- * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft
84531
- */
84532
- return axis === 'h' && direction === 'rtl' ? -1 : 1;
84533
- };
84534
- var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {
84535
- var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);
84536
- var delta = directionFactor * sourceDelta;
84537
- // find scrollable target
84538
- var target = event.target;
84539
- var targetInLock = endTarget.contains(target);
84540
- var shouldCancelScroll = false;
84541
- var isDeltaPositive = delta > 0;
84542
- var availableScroll = 0;
84543
- var availableScrollTop = 0;
84544
- do {
84545
- if (!target) {
84546
- break;
84547
- }
84548
- var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];
84549
- var elementScroll = scroll_1 - capacity - directionFactor * position;
84550
- if (position || elementScroll) {
84551
- if (elementCouldBeScrolled(axis, target)) {
84552
- availableScroll += elementScroll;
84553
- availableScrollTop += position;
84554
- }
84555
- }
84556
- var parent_1 = target.parentNode;
84557
- // we will "bubble" from ShadowDom in case we are, or just to the parent in normal case
84558
- // this is the same logic used in focus-lock
84559
- target = (parent_1 && parent_1.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? parent_1.host : parent_1);
84560
- } while (
84561
- // portaled content
84562
- (!targetInLock && target !== document.body) ||
84563
- // self content
84564
- (targetInLock && (endTarget.contains(target) || endTarget === target)));
84565
- // handle epsilon around 0 (non standard zoom levels)
84566
- if (isDeltaPositive &&
84567
- ((Math.abs(availableScroll) < 1) || (false))) {
84568
- shouldCancelScroll = true;
84569
- }
84570
- else if (!isDeltaPositive &&
84571
- ((Math.abs(availableScrollTop) < 1) || (false))) {
84572
- shouldCancelScroll = true;
84573
- }
84574
- return shouldCancelScroll;
84575
- };
84576
-
84577
- var getTouchXY = function (event) {
84578
- return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];
84579
- };
84580
- var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };
84581
- var extractRef = function (ref) {
84582
- return ref && 'current' in ref ? ref.current : ref;
84583
- };
84584
- var deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };
84585
- var generateStyle = function (id) { return "\n .block-interactivity-".concat(id, " {pointer-events: none;}\n .allow-interactivity-").concat(id, " {pointer-events: all;}\n"); };
84586
- var idCounter$1 = 0;
84587
- var lockStack = [];
84588
- function RemoveScrollSideCar(props) {
84589
- var shouldPreventQueue = React.useRef([]);
84590
- var touchStartRef = React.useRef([0, 0]);
84591
- var activeAxis = React.useRef();
84592
- var id = React.useState(idCounter$1++)[0];
84593
- var Style = React.useState(styleSingleton)[0];
84594
- var lastProps = React.useRef(props);
84595
- React.useEffect(function () {
84596
- lastProps.current = props;
84597
- }, [props]);
84598
- React.useEffect(function () {
84599
- if (props.inert) {
84600
- document.body.classList.add("block-interactivity-".concat(id));
84601
- var allow_1 = __spreadArray$1([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);
84602
- allow_1.forEach(function (el) { return el.classList.add("allow-interactivity-".concat(id)); });
84603
- return function () {
84604
- document.body.classList.remove("block-interactivity-".concat(id));
84605
- allow_1.forEach(function (el) { return el.classList.remove("allow-interactivity-".concat(id)); });
84606
- };
84607
- }
84608
- return;
84609
- }, [props.inert, props.lockRef.current, props.shards]);
84610
- var shouldCancelEvent = React.useCallback(function (event, parent) {
84611
- if (('touches' in event && event.touches.length === 2) || (event.type === 'wheel' && event.ctrlKey)) {
84612
- return !lastProps.current.allowPinchZoom;
84613
- }
84614
- var touch = getTouchXY(event);
84615
- var touchStart = touchStartRef.current;
84616
- var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];
84617
- var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];
84618
- var currentAxis;
84619
- var target = event.target;
84620
- var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';
84621
- // allow horizontal touch move on Range inputs. They will not cause any scroll
84622
- if ('touches' in event && moveDirection === 'h' && target.type === 'range') {
84623
- return false;
84624
- }
84625
- // allow drag selection (iOS); check if selection's anchorNode is the same as target or contains target
84626
- var selection = window.getSelection();
84627
- var anchorNode = selection && selection.anchorNode;
84628
- var isTouchingSelection = anchorNode ? anchorNode === target || anchorNode.contains(target) : false;
84629
- if (isTouchingSelection) {
84630
- return false;
84631
- }
84632
- var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
84633
- if (!canBeScrolledInMainDirection) {
84634
- return true;
84635
- }
84636
- if (canBeScrolledInMainDirection) {
84637
- currentAxis = moveDirection;
84638
- }
84639
- else {
84640
- currentAxis = moveDirection === 'v' ? 'h' : 'v';
84641
- canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);
84642
- // other axis might be not scrollable
84643
- }
84644
- if (!canBeScrolledInMainDirection) {
84645
- return false;
84646
- }
84647
- if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {
84648
- activeAxis.current = currentAxis;
84649
- }
84650
- if (!currentAxis) {
84651
- return true;
84652
- }
84653
- var cancelingAxis = activeAxis.current || currentAxis;
84654
- return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY);
84655
- }, []);
84656
- var shouldPrevent = React.useCallback(function (_event) {
84657
- var event = _event;
84658
- if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {
84659
- // not the last active
84660
- return;
84661
- }
84662
- var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);
84663
- var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && (e.target === event.target || event.target === e.shadowParent) && deltaCompare(e.delta, delta); })[0];
84664
- // self event, and should be canceled
84665
- if (sourceEvent && sourceEvent.should) {
84666
- if (event.cancelable) {
84667
- event.preventDefault();
84668
- }
84669
- return;
84670
- }
84671
- // outside or shard event
84672
- if (!sourceEvent) {
84673
- var shardNodes = (lastProps.current.shards || [])
84674
- .map(extractRef)
84675
- .filter(Boolean)
84676
- .filter(function (node) { return node.contains(event.target); });
84677
- var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;
84678
- if (shouldStop) {
84679
- if (event.cancelable) {
84680
- event.preventDefault();
84681
- }
84682
- }
84683
- }
84684
- }, []);
84685
- var shouldCancel = React.useCallback(function (name, delta, target, should) {
84686
- var event = { name: name, delta: delta, target: target, should: should, shadowParent: getOutermostShadowParent(target) };
84687
- shouldPreventQueue.current.push(event);
84688
- setTimeout(function () {
84689
- shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });
84690
- }, 1);
84691
- }, []);
84692
- var scrollTouchStart = React.useCallback(function (event) {
84693
- touchStartRef.current = getTouchXY(event);
84694
- activeAxis.current = undefined;
84695
- }, []);
84696
- var scrollWheel = React.useCallback(function (event) {
84697
- shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
84698
- }, []);
84699
- var scrollTouchMove = React.useCallback(function (event) {
84700
- shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));
84701
- }, []);
84702
- React.useEffect(function () {
84703
- lockStack.push(Style);
84704
- props.setCallbacks({
84705
- onScrollCapture: scrollWheel,
84706
- onWheelCapture: scrollWheel,
84707
- onTouchMoveCapture: scrollTouchMove,
84708
- });
84709
- document.addEventListener('wheel', shouldPrevent, nonPassive);
84710
- document.addEventListener('touchmove', shouldPrevent, nonPassive);
84711
- document.addEventListener('touchstart', scrollTouchStart, nonPassive);
84712
- return function () {
84713
- lockStack = lockStack.filter(function (inst) { return inst !== Style; });
84714
- document.removeEventListener('wheel', shouldPrevent, nonPassive);
84715
- document.removeEventListener('touchmove', shouldPrevent, nonPassive);
84716
- document.removeEventListener('touchstart', scrollTouchStart, nonPassive);
84717
- };
84718
- }, []);
84719
- var removeScrollBar = props.removeScrollBar, inert = props.inert;
84720
- return (React.createElement(React.Fragment, null,
84721
- inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,
84722
- removeScrollBar ? React.createElement(RemoveScrollBar, { noRelative: props.noRelative, gapMode: props.gapMode }) : null));
84723
- }
84724
- function getOutermostShadowParent(node) {
84725
- var shadowParent = null;
84726
- while (node !== null) {
84727
- if (node instanceof ShadowRoot) {
84728
- shadowParent = node.host;
84729
- node = node.host;
84730
- }
84731
- node = node.parentNode;
84732
- }
84733
- return shadowParent;
84734
- }
84735
-
84736
- var SideCar = exportSidecar(effectCar, RemoveScrollSideCar);
84737
-
84738
- var ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });
84739
- ReactRemoveScroll.classNames = RemoveScroll.classNames;
84740
-
84741
83984
  var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
84742
83985
  var SELECTION_KEYS$1 = [" ", "Enter"];
84743
83986
  var SELECT_NAME = "Select";
@@ -85145,7 +84388,7 @@ var SelectContentImpl = React.forwardRef(
85145
84388
  position,
85146
84389
  isPositioned,
85147
84390
  searchRef,
85148
- children: /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot$3, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
84391
+ children: /* @__PURE__ */ jsx(RemoveScroll, { as: Slot$3, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
85149
84392
  FocusScope,
85150
84393
  {
85151
84394
  asChild: true,
@@ -85802,7 +85045,7 @@ var BubbleSelect = React.forwardRef(
85802
85045
  );
85803
85046
  BubbleSelect.displayName = "BubbleSelect";
85804
85047
  function useTypeaheadSearch(onSearchChange) {
85805
- const handleSearchChange = useCallbackRef$2(onSearchChange);
85048
+ const handleSearchChange = useCallbackRef$1(onSearchChange);
85806
85049
  const searchRef = React.useRef("");
85807
85050
  const timerRef = React.useRef(0);
85808
85051
  const handleTypeaheadSearch = React.useCallback(
@@ -86046,7 +85289,7 @@ var DismissableLayerBranch$1 = React.forwardRef((props, forwardedRef) => {
86046
85289
  });
86047
85290
  DismissableLayerBranch$1.displayName = BRANCH_NAME$1;
86048
85291
  function usePointerDownOutside$1(onPointerDownOutside, ownerDocument = globalThis?.document) {
86049
- const handlePointerDownOutside = useCallbackRef$2(onPointerDownOutside);
85292
+ const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
86050
85293
  const isPointerInsideReactTreeRef = React.useRef(false);
86051
85294
  const handleClickRef = React.useRef(() => {
86052
85295
  });
@@ -86089,7 +85332,7 @@ function usePointerDownOutside$1(onPointerDownOutside, ownerDocument = globalThi
86089
85332
  };
86090
85333
  }
86091
85334
  function useFocusOutside$1(onFocusOutside, ownerDocument = globalThis?.document) {
86092
- const handleFocusOutside = useCallbackRef$2(onFocusOutside);
85335
+ const handleFocusOutside = useCallbackRef$1(onFocusOutside);
86093
85336
  const isFocusInsideReactTreeRef = React.useRef(false);
86094
85337
  React.useEffect(() => {
86095
85338
  const handleFocus = (event) => {
@@ -86242,7 +85485,7 @@ var PopperContent = React.forwardRef(
86242
85485
  ]
86243
85486
  });
86244
85487
  const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
86245
- const handlePlaced = useCallbackRef$2(onPlaced);
85488
+ const handlePlaced = useCallbackRef$1(onPlaced);
86246
85489
  useLayoutEffect2$1(() => {
86247
85490
  if (isPositioned) {
86248
85491
  handlePlaced?.();
@@ -88265,7 +87508,7 @@ var DismissableLayerBranch = React.forwardRef((props, forwardedRef) => {
88265
87508
  });
88266
87509
  DismissableLayerBranch.displayName = BRANCH_NAME;
88267
87510
  function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
88268
- const handlePointerDownOutside = useCallbackRef$2(onPointerDownOutside);
87511
+ const handlePointerDownOutside = useCallbackRef$1(onPointerDownOutside);
88269
87512
  const isPointerInsideReactTreeRef = React.useRef(false);
88270
87513
  const handleClickRef = React.useRef(() => {
88271
87514
  });
@@ -88308,7 +87551,7 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
88308
87551
  };
88309
87552
  }
88310
87553
  function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
88311
- const handleFocusOutside = useCallbackRef$2(onFocusOutside);
87554
+ const handleFocusOutside = useCallbackRef$1(onFocusOutside);
88312
87555
  const isFocusInsideReactTreeRef = React.useRef(false);
88313
87556
  React.useEffect(() => {
88314
87557
  const handleFocus = (event) => {
@@ -88744,8 +87987,8 @@ var Toast$1 = React.forwardRef(
88744
87987
  ...toastProps,
88745
87988
  ref: forwardedRef,
88746
87989
  onClose: () => setOpen(false),
88747
- onPause: useCallbackRef$2(props.onPause),
88748
- onResume: useCallbackRef$2(props.onResume),
87990
+ onPause: useCallbackRef$1(props.onPause),
87991
+ onResume: useCallbackRef$1(props.onResume),
88749
87992
  onSwipeStart: composeEventHandlers$2(props.onSwipeStart, (event) => {
88750
87993
  event.currentTarget.setAttribute("data-swipe", "start");
88751
87994
  }),
@@ -88807,7 +88050,7 @@ var ToastImpl = React.forwardRef(
88807
88050
  const closeTimerRemainingTimeRef = React.useRef(duration);
88808
88051
  const closeTimerRef = React.useRef(0);
88809
88052
  const { onToastAdd, onToastRemove } = context;
88810
- const handleClose = useCallbackRef$2(() => {
88053
+ const handleClose = useCallbackRef$1(() => {
88811
88054
  const isFocusInToast = node?.contains(document.activeElement);
88812
88055
  if (isFocusInToast) context.viewport?.focus();
88813
88056
  onClose();
@@ -89076,7 +88319,7 @@ var isDeltaInDirection = (delta, direction, threshold = 0) => {
89076
88319
  };
89077
88320
  function useNextFrame(callback = () => {
89078
88321
  }) {
89079
- const fn = useCallbackRef$2(callback);
88322
+ const fn = useCallbackRef$1(callback);
89080
88323
  useLayoutEffect2$1(() => {
89081
88324
  let raf1 = 0;
89082
88325
  let raf2 = 0;
@@ -89373,7 +88616,7 @@ var AvatarImage$1 = React.forwardRef(
89373
88616
  }, ...imageProps } = props;
89374
88617
  const context = useAvatarContext(IMAGE_NAME, __scopeAvatar);
89375
88618
  const imageLoadingStatus = useImageLoadingStatus(src, imageProps);
89376
- const handleLoadingStatusChange = useCallbackRef$2((status) => {
88619
+ const handleLoadingStatusChange = useCallbackRef$1((status) => {
89377
88620
  onLoadingStatusChange(status);
89378
88621
  context.onImageLoadingStatusChange(status);
89379
88622
  });
@@ -89505,7 +88748,7 @@ var RovingFocusGroupImpl$1 = React.forwardRef((props, forwardedRef) => {
89505
88748
  onChange: onCurrentTabStopIdChange
89506
88749
  });
89507
88750
  const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);
89508
- const handleEntryFocus = useCallbackRef$2(onEntryFocus);
88751
+ const handleEntryFocus = useCallbackRef$1(onEntryFocus);
89509
88752
  const getItems = useCollection$2(__scopeRovingFocusGroup);
89510
88753
  const isClickFocusRef = React.useRef(false);
89511
88754
  const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);
@@ -145057,7 +144300,7 @@ var Menu = (props) => {
145057
144300
  const popperScope = usePopperScope$1(__scopeMenu);
145058
144301
  const [content, setContent] = React.useState(null);
145059
144302
  const isUsingKeyboardRef = React.useRef(false);
145060
- const handleOpenChange = useCallbackRef$2(onOpenChange);
144303
+ const handleOpenChange = useCallbackRef$1(onOpenChange);
145061
144304
  const direction = useDirection$1(dir);
145062
144305
  React.useEffect(() => {
145063
144306
  const handleKeyDown = () => {
@@ -145200,7 +144443,7 @@ var MenuContentImpl = React.forwardRef(
145200
144443
  const pointerGraceIntentRef = React.useRef(null);
145201
144444
  const pointerDirRef = React.useRef("right");
145202
144445
  const lastPointerXRef = React.useRef(0);
145203
- const ScrollLockWrapper = disableOutsideScroll ? ReactRemoveScroll : React.Fragment;
144446
+ const ScrollLockWrapper = disableOutsideScroll ? RemoveScroll : React.Fragment;
145204
144447
  const scrollLockWrapperProps = disableOutsideScroll ? { as: Slot$1, allowPinchZoom: true } : void 0;
145205
144448
  const handleTypeaheadSearch = (key) => {
145206
144449
  const search = searchRef.current + key;
@@ -145504,7 +144747,7 @@ var [RadioGroupProvider$1, useRadioGroupContext$1] = createMenuContext(
145504
144747
  var MenuRadioGroup = React.forwardRef(
145505
144748
  (props, forwardedRef) => {
145506
144749
  const { value, onValueChange, ...groupProps } = props;
145507
- const handleValueChange = useCallbackRef$2(onValueChange);
144750
+ const handleValueChange = useCallbackRef$1(onValueChange);
145508
144751
  return /* @__PURE__ */ jsx(RadioGroupProvider$1, { scope: props.__scopeMenu, value, onValueChange: handleValueChange, children: /* @__PURE__ */ jsx(MenuGroup, { ...groupProps, ref: forwardedRef }) });
145509
144752
  }
145510
144753
  );
@@ -145592,7 +144835,7 @@ var MenuSub = (props) => {
145592
144835
  const popperScope = usePopperScope$1(__scopeMenu);
145593
144836
  const [trigger, setTrigger] = React.useState(null);
145594
144837
  const [content, setContent] = React.useState(null);
145595
- const handleOpenChange = useCallbackRef$2(onOpenChange);
144838
+ const handleOpenChange = useCallbackRef$1(onOpenChange);
145596
144839
  React.useEffect(() => {
145597
144840
  if (parentMenuContext.open === false) handleOpenChange(false);
145598
144841
  return () => handleOpenChange(false);
@@ -150301,7 +149544,7 @@ var PopoverContentModal = React.forwardRef(
150301
149544
  const content = contentRef.current;
150302
149545
  if (content) return hideOthers(content);
150303
149546
  }, []);
150304
- return /* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
149547
+ return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(
150305
149548
  PopoverContentImpl,
150306
149549
  {
150307
149550
  ...props,