{"ast":null,"code":"import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport { clamp as $4507461a1b870123$re_export$clamp, snapValueToStep as $4507461a1b870123$re_export$snapValueToStep } from \"@react-stately/utils\";\nimport $12uGp$react, { useState as $12uGp$useState, useRef as $12uGp$useRef, useCallback as $12uGp$useCallback, useEffect as $12uGp$useEffect } from \"react\";\nimport { useSSRSafeId as $12uGp$useSSRSafeId } from \"@react-aria/ssr\";\nimport $12uGp$clsx from \"clsx\";\nvar $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof window !== \"undefined\" ? (0, $12uGp$react).useLayoutEffect : function () {};\nfunction $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {\n  var _ref = (0, $12uGp$useState)(defaultValue),\n    _ref2 = _slicedToArray(_ref, 2),\n    value = _ref2[0],\n    setValue = _ref2[1];\n  var valueRef = (0, $12uGp$useRef)(value);\n  var effect = (0, $12uGp$useRef)(null);\n  valueRef.current = value;\n  var nextRef = (0, $12uGp$useRef)(null);\n  nextRef.current = function () {\n    var newValue = effect.current.next();\n    if (newValue.done) {\n      effect.current = null;\n      return;\n    }\n    if (value === newValue.value) nextRef.current();else setValue(newValue.value);\n  };\n  (0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(function () {\n    if (effect.current) nextRef.current();\n  });\n  var queue = (0, $12uGp$useCallback)(function (fn) {\n    effect.current = fn(valueRef.current);\n    nextRef.current();\n  }, [effect, nextRef]);\n  return [value, queue];\n}\nvar $bdb11010cef70236$var$idsUpdaterMap = new Map();\nfunction $bdb11010cef70236$export$f680877a34711e37(defaultId) {\n  var _ref3 = (0, $12uGp$useState)(defaultId),\n    _ref4 = _slicedToArray(_ref3, 2),\n    value = _ref4[0],\n    setValue = _ref4[1];\n  var nextId = (0, $12uGp$useRef)(null);\n  var res = (0, $12uGp$useSSRSafeId)(value);\n  var updateValue = (0, $12uGp$useCallback)(function (val) {\n    nextId.current = val;\n  }, []);\n  $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);\n  (0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(function () {\n    var r = res;\n    return function () {\n      $bdb11010cef70236$var$idsUpdaterMap.delete(r);\n    };\n  }, [res]);\n  (0, $12uGp$useEffect)(function () {\n    var newId = nextId.current;\n    if (newId) {\n      nextId.current = null;\n      setValue(newId);\n    }\n  });\n  return res;\n}\nfunction $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {\n  if (idA === idB) return idA;\n  var setIdA = $bdb11010cef70236$var$idsUpdaterMap.get(idA);\n  if (setIdA) {\n    setIdA(idB);\n    return idB;\n  }\n  var setIdB = $bdb11010cef70236$var$idsUpdaterMap.get(idB);\n  if (setIdB) {\n    setIdB(idA);\n    return idA;\n  }\n  return idB;\n}\nfunction $bdb11010cef70236$export$b4cc09c592e8fdb8() {\n  var depArray = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n  var id = $bdb11010cef70236$export$f680877a34711e37();\n  var _ref5 = (0, $1dbecbe27a04f9af$export$14d238f342723f25)(id),\n    _ref6 = _slicedToArray(_ref5, 2),\n    resolvedId = _ref6[0],\n    setResolvedId = _ref6[1];\n  var updateId = (0, $12uGp$useCallback)(function () {\n    setResolvedId(function* () {\n      yield id;\n      yield document.getElementById(id) ? id : undefined;\n    });\n  }, [id, setResolvedId]);\n  (0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(updateId, [id, updateId].concat(_toConsumableArray(depArray)));\n  return resolvedId;\n}\nfunction $ff5963eb1fccf552$export$e08e3b67e392101e() {\n  for (var _len = arguments.length, callbacks = new Array(_len), _key = 0; _key < _len; _key++) {\n    callbacks[_key] = arguments[_key];\n  }\n  return function () {\n    for (var callback of callbacks) if (typeof callback === \"function\") callback.apply(void 0, arguments);\n  };\n}\nfunction $3ef42575df84b30b$export$9d1611c77c2fe928() {\n  var result = _objectSpread({}, arguments.length <= 0 ? undefined : arguments[0]);\n  for (var i = 1; i < arguments.length; i++) {\n    var props = i < 0 || arguments.length <= i ? undefined : arguments[i];\n    for (var key in props) {\n      var a = result[key];\n      var b = props[key];\n      if (typeof a === \"function\" && typeof b === \"function\" && key[0] === \"o\" && key[1] === \"n\" && key.charCodeAt(2) >= 65 && key.charCodeAt(2) <= 90) result[key] = (0, $ff5963eb1fccf552$export$e08e3b67e392101e)(a, b);else if ((key === \"className\" || key === \"UNSAFE_className\") && typeof a === \"string\" && typeof b === \"string\") result[key] = (0, $12uGp$clsx)(a, b);else if (key === \"id\" && a && b) result.id = (0, $bdb11010cef70236$export$cd8c9cb68f842629)(a, b);else result[key] = b !== undefined ? b : a;\n    }\n  }\n  return result;\n}\nfunction $5dc95899b306f630$export$c9058316764c140e() {\n  for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n    refs[_key2] = arguments[_key2];\n  }\n  return function (value) {\n    for (var ref of refs) {\n      if (typeof ref === \"function\") ref(value);else if (ref != null) ref.current = value;\n    }\n  };\n}\nvar $65484d02dcb7eb3e$var$DOMPropNames = new Set([\"id\"]);\nvar $65484d02dcb7eb3e$var$labelablePropNames = new Set([\"aria-label\", \"aria-labelledby\", \"aria-describedby\", \"aria-details\"]);\nvar $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;\nfunction $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props) {\n  var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  var labelable = opts.labelable,\n    propNames = opts.propNames;\n  var filteredProps = {};\n  for (var prop in props) if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];\n  return filteredProps;\n}\nfunction $7215afc6de606d6b$export$de79e2c695e052f3(element) {\n  if ($7215afc6de606d6b$var$supportsPreventScroll()) element.focus({\n    preventScroll: true\n  });else {\n    var scrollableElements = $7215afc6de606d6b$var$getScrollableElements(element);\n    element.focus();\n    $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements);\n  }\n}\nvar $7215afc6de606d6b$var$supportsPreventScrollCached = null;\nfunction $7215afc6de606d6b$var$supportsPreventScroll() {\n  if ($7215afc6de606d6b$var$supportsPreventScrollCached == null) {\n    $7215afc6de606d6b$var$supportsPreventScrollCached = false;\n    try {\n      var focusElem = document.createElement(\"div\");\n      focusElem.focus({\n        get preventScroll() {\n          $7215afc6de606d6b$var$supportsPreventScrollCached = true;\n          return true;\n        }\n      });\n    } catch (e) {}\n  }\n  return $7215afc6de606d6b$var$supportsPreventScrollCached;\n}\nfunction $7215afc6de606d6b$var$getScrollableElements(element) {\n  var parent = element.parentNode;\n  var scrollableElements = [];\n  var rootScrollingElement = document.scrollingElement || document.documentElement;\n  while (parent instanceof HTMLElement && parent !== rootScrollingElement) {\n    if (parent.offsetHeight < parent.scrollHeight || parent.offsetWidth < parent.scrollWidth) scrollableElements.push({\n      element: parent,\n      scrollTop: parent.scrollTop,\n      scrollLeft: parent.scrollLeft\n    });\n    parent = parent.parentNode;\n  }\n  if (rootScrollingElement instanceof HTMLElement) scrollableElements.push({\n    element: rootScrollingElement,\n    scrollTop: rootScrollingElement.scrollTop,\n    scrollLeft: rootScrollingElement.scrollLeft\n  });\n  return scrollableElements;\n}\nfunction $7215afc6de606d6b$var$restoreScrollPosition(scrollableElements) {\n  for (var _ref7 of scrollableElements) {\n    var element = _ref7.element;\n    var scrollTop = _ref7.scrollTop;\n    var scrollLeft = _ref7.scrollLeft;\n    element.scrollTop = scrollTop;\n    element.scrollLeft = scrollLeft;\n  }\n}\nfunction $ab71dadb03a6fb2e$export$622cea445a1c5b7d(element, reverse) {\n  var orientation = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : \"horizontal\";\n  var rect = element.getBoundingClientRect();\n  if (reverse) return orientation === \"horizontal\" ? rect.right : rect.bottom;\n  return orientation === \"horizontal\" ? rect.left : rect.top;\n}\nvar $bbed8b41f857bcc0$var$transitionsByElement = new Map();\nvar $bbed8b41f857bcc0$var$transitionCallbacks = new Set();\nfunction $bbed8b41f857bcc0$var$setupGlobalEvents() {\n  if (typeof window === \"undefined\") return;\n  var onTransitionStart = function onTransitionStart(e) {\n    var transitions = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);\n    if (!transitions) {\n      transitions = new Set();\n      $bbed8b41f857bcc0$var$transitionsByElement.set(e.target, transitions);\n      e.target.addEventListener(\"transitioncancel\", onTransitionEnd);\n    }\n    transitions.add(e.propertyName);\n  };\n  var onTransitionEnd = function onTransitionEnd(e) {\n    var properties = $bbed8b41f857bcc0$var$transitionsByElement.get(e.target);\n    if (!properties) return;\n    properties.delete(e.propertyName);\n    if (properties.size === 0) {\n      e.target.removeEventListener(\"transitioncancel\", onTransitionEnd);\n      $bbed8b41f857bcc0$var$transitionsByElement.delete(e.target);\n    }\n    if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) {\n      for (var cb of $bbed8b41f857bcc0$var$transitionCallbacks) cb();\n      $bbed8b41f857bcc0$var$transitionCallbacks.clear();\n    }\n  };\n  document.body.addEventListener(\"transitionrun\", onTransitionStart);\n  document.body.addEventListener(\"transitionend\", onTransitionEnd);\n}\nif (typeof document !== \"undefined\") {\n  if (document.readyState !== \"loading\") $bbed8b41f857bcc0$var$setupGlobalEvents();else document.addEventListener(\"DOMContentLoaded\", $bbed8b41f857bcc0$var$setupGlobalEvents);\n}\nfunction $bbed8b41f857bcc0$export$24490316f764c430(fn) {\n  requestAnimationFrame(function () {\n    if ($bbed8b41f857bcc0$var$transitionsByElement.size === 0) fn();else $bbed8b41f857bcc0$var$transitionCallbacks.add(fn);\n  });\n}\nvar $9cc09df9fd7676be$var$draggingElements = [];\nfunction $9cc09df9fd7676be$export$7bbed75feba39706(props) {\n  console.warn(\"useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html\");\n  var containerRef = props.containerRef,\n    reverse = props.reverse,\n    orientation = props.orientation,\n    onHover = props.onHover,\n    onDrag = props.onDrag,\n    onPositionChange = props.onPositionChange,\n    onIncrement = props.onIncrement,\n    onDecrement = props.onDecrement,\n    onIncrementToMax = props.onIncrementToMax,\n    onDecrementToMin = props.onDecrementToMin,\n    onCollapseToggle = props.onCollapseToggle;\n  var getPosition = function getPosition(e) {\n    return orientation === \"horizontal\" ? e.clientX : e.clientY;\n  };\n  var getNextOffset = function getNextOffset(e) {\n    var containerOffset = (0, $ab71dadb03a6fb2e$export$622cea445a1c5b7d)(containerRef.current, reverse, orientation);\n    var mouseOffset = getPosition(e);\n    var nextOffset = reverse ? containerOffset - mouseOffset : mouseOffset - containerOffset;\n    return nextOffset;\n  };\n  var dragging = (0, $12uGp$useRef)(false);\n  var prevPosition = (0, $12uGp$useRef)(0);\n  var handlers = (0, $12uGp$useRef)({\n    onPositionChange: onPositionChange,\n    onDrag: onDrag\n  });\n  handlers.current.onDrag = onDrag;\n  handlers.current.onPositionChange = onPositionChange;\n  var onMouseDragged = function onMouseDragged(e) {\n    e.preventDefault();\n    var nextOffset = getNextOffset(e);\n    if (!dragging.current) {\n      dragging.current = true;\n      if (handlers.current.onDrag) handlers.current.onDrag(true);\n      if (handlers.current.onPositionChange) handlers.current.onPositionChange(nextOffset);\n    }\n    if (prevPosition.current === nextOffset) return;\n    prevPosition.current = nextOffset;\n    if (onPositionChange) onPositionChange(nextOffset);\n  };\n  var onMouseUp = function onMouseUp(e) {\n    var target = e.target;\n    dragging.current = false;\n    var nextOffset = getNextOffset(e);\n    if (handlers.current.onDrag) handlers.current.onDrag(false);\n    if (handlers.current.onPositionChange) handlers.current.onPositionChange(nextOffset);\n    $9cc09df9fd7676be$var$draggingElements.splice($9cc09df9fd7676be$var$draggingElements.indexOf(target), 1);\n    window.removeEventListener(\"mouseup\", onMouseUp, false);\n    window.removeEventListener(\"mousemove\", onMouseDragged, false);\n  };\n  var onMouseDown = function onMouseDown(e) {\n    var target = e.currentTarget;\n    if ($9cc09df9fd7676be$var$draggingElements.some(function (elt) {\n      return target.contains(elt);\n    })) return;\n    $9cc09df9fd7676be$var$draggingElements.push(target);\n    window.addEventListener(\"mousemove\", onMouseDragged, false);\n    window.addEventListener(\"mouseup\", onMouseUp, false);\n  };\n  var onMouseEnter = function onMouseEnter() {\n    if (onHover) onHover(true);\n  };\n  var onMouseOut = function onMouseOut() {\n    if (onHover) onHover(false);\n  };\n  var onKeyDown = function onKeyDown(e) {\n    switch (e.key) {\n      case \"Left\":\n      case \"ArrowLeft\":\n        if (orientation === \"horizontal\") {\n          e.preventDefault();\n          if (onDecrement && !reverse) onDecrement();else if (onIncrement && reverse) onIncrement();\n        }\n        break;\n      case \"Up\":\n      case \"ArrowUp\":\n        if (orientation === \"vertical\") {\n          e.preventDefault();\n          if (onDecrement && !reverse) onDecrement();else if (onIncrement && reverse) onIncrement();\n        }\n        break;\n      case \"Right\":\n      case \"ArrowRight\":\n        if (orientation === \"horizontal\") {\n          e.preventDefault();\n          if (onIncrement && !reverse) onIncrement();else if (onDecrement && reverse) onDecrement();\n        }\n        break;\n      case \"Down\":\n      case \"ArrowDown\":\n        if (orientation === \"vertical\") {\n          e.preventDefault();\n          if (onIncrement && !reverse) onIncrement();else if (onDecrement && reverse) onDecrement();\n        }\n        break;\n      case \"Home\":\n        e.preventDefault();\n        if (onDecrementToMin) onDecrementToMin();\n        break;\n      case \"End\":\n        e.preventDefault();\n        if (onIncrementToMax) onIncrementToMax();\n        break;\n      case \"Enter\":\n        e.preventDefault();\n        if (onCollapseToggle) onCollapseToggle();\n        break;\n    }\n  };\n  return {\n    onMouseDown: onMouseDown,\n    onMouseEnter: onMouseEnter,\n    onMouseOut: onMouseOut,\n    onKeyDown: onKeyDown\n  };\n}\nfunction $03deb23ff14920c4$export$4eaf04e54aa8eed6() {\n  var globalListeners = (0, $12uGp$useRef)(new Map());\n  var addGlobalListener = (0, $12uGp$useCallback)(function (eventTarget, type, listener, options) {\n    var fn = (options === null || options === void 0 ? void 0 : options.once) ? function () {\n      globalListeners.current.delete(listener);\n      listener.apply(void 0, arguments);\n    } : listener;\n    globalListeners.current.set(listener, {\n      type: type,\n      eventTarget: eventTarget,\n      fn: fn,\n      options: options\n    });\n    eventTarget.addEventListener(type, listener, options);\n  }, []);\n  var removeGlobalListener = (0, $12uGp$useCallback)(function (eventTarget, type, listener, options) {\n    var _globalListeners_current_get;\n    var fn = ((_globalListeners_current_get = globalListeners.current.get(listener)) === null || _globalListeners_current_get === void 0 ? void 0 : _globalListeners_current_get.fn) || listener;\n    eventTarget.removeEventListener(type, fn, options);\n    globalListeners.current.delete(listener);\n  }, []);\n  var removeAllGlobalListeners = (0, $12uGp$useCallback)(function () {\n    globalListeners.current.forEach(function (value, key) {\n      removeGlobalListener(value.eventTarget, value.type, key, value.options);\n    });\n  }, [removeGlobalListener]);\n  (0, $12uGp$useEffect)(function () {\n    return removeAllGlobalListeners;\n  }, [removeAllGlobalListeners]);\n  return {\n    addGlobalListener: addGlobalListener,\n    removeGlobalListener: removeGlobalListener,\n    removeAllGlobalListeners: removeAllGlobalListeners\n  };\n}\nfunction $313b98861ee5dd6c$export$d6875122194c7b44(props, defaultLabel) {\n  var id = props.id,\n    label = props[\"aria-label\"],\n    labelledBy = props[\"aria-labelledby\"];\n  id = (0, $bdb11010cef70236$export$f680877a34711e37)(id);\n  if (labelledBy && label) {\n    var ids = new Set([].concat(_toConsumableArray(labelledBy.trim().split(/\\s+/)), [id]));\n    labelledBy = _toConsumableArray(ids).join(\" \");\n  } else if (labelledBy) labelledBy = labelledBy.trim().split(/\\s+/).join(\" \");\n  if (!label && !labelledBy && defaultLabel) label = defaultLabel;\n  return {\n    id: id,\n    \"aria-label\": label,\n    \"aria-labelledby\": labelledBy\n  };\n}\nfunction $df56164dff5785e2$export$4338b53315abf666(forwardedRef) {\n  var objRef = (0, $12uGp$useRef)();\n  (0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(function () {\n    if (!forwardedRef) return;\n    if (typeof forwardedRef === \"function\") forwardedRef(objRef.current);else forwardedRef.current = objRef.current;\n  }, [forwardedRef]);\n  return objRef;\n}\nfunction $4f58c5f72bcf79f7$export$496315a1608d9602(effect, dependencies) {\n  var isInitialMount = (0, $12uGp$useRef)(true);\n  (0, $12uGp$useEffect)(function () {\n    if (isInitialMount.current) isInitialMount.current = false;else effect();\n  }, dependencies);\n}\nfunction $9daab02d461809db$var$hasResizeObserver() {\n  return typeof window.ResizeObserver !== \"undefined\";\n}\nfunction $9daab02d461809db$export$683480f191c0e3ea(options) {\n  var ref = options.ref,\n    onResize = options.onResize;\n  (0, $12uGp$useEffect)(function () {\n    var element = ref === null || ref === void 0 ? void 0 : ref.current;\n    if (!element) return;\n    if (!$9daab02d461809db$var$hasResizeObserver()) {\n      window.addEventListener(\"resize\", onResize, false);\n      return function () {\n        window.removeEventListener(\"resize\", onResize, false);\n      };\n    } else {\n      var resizeObserverInstance = new window.ResizeObserver(function (entries) {\n        if (!entries.length) return;\n        onResize();\n      });\n      resizeObserverInstance.observe(element);\n      return function () {\n        if (element) resizeObserverInstance.unobserve(element);\n      };\n    }\n  }, [onResize, ref]);\n}\nfunction $e7801be82b4b2a53$export$4debdb1a3f0fa79e(context, ref) {\n  (0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(function () {\n    if (context && context.ref && ref) {\n      context.ref.current = ref.current;\n      return function () {\n        context.ref.current = null;\n      };\n    }\n  }, [context, ref]);\n}\nfunction $62d8ded9296f3872$export$cfa2225e87938781(node) {\n  if ($62d8ded9296f3872$export$2bb74740c4e19def(node)) node = node.parentElement;\n  while (node && !$62d8ded9296f3872$export$2bb74740c4e19def(node)) node = node.parentElement;\n  return node || document.scrollingElement || document.documentElement;\n}\nfunction $62d8ded9296f3872$export$2bb74740c4e19def(node) {\n  var style = window.getComputedStyle(node);\n  return /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n}\nvar $5df64b3807dc15ee$var$visualViewport = typeof window !== \"undefined\" && window.visualViewport;\nfunction $5df64b3807dc15ee$export$d699905dd57c73ca() {\n  var _ref8 = (0, $12uGp$useState)(function () {\n      return $5df64b3807dc15ee$var$getViewportSize();\n    }),\n    _ref9 = _slicedToArray(_ref8, 2),\n    size = _ref9[0],\n    setSize = _ref9[1];\n  (0, $12uGp$useEffect)(function () {\n    var onResize = function onResize() {\n      setSize(function (size) {\n        var newSize = $5df64b3807dc15ee$var$getViewportSize();\n        if (newSize.width === size.width && newSize.height === size.height) return size;\n        return newSize;\n      });\n    };\n    if (!$5df64b3807dc15ee$var$visualViewport) window.addEventListener(\"resize\", onResize);else $5df64b3807dc15ee$var$visualViewport.addEventListener(\"resize\", onResize);\n    return function () {\n      if (!$5df64b3807dc15ee$var$visualViewport) window.removeEventListener(\"resize\", onResize);else $5df64b3807dc15ee$var$visualViewport.removeEventListener(\"resize\", onResize);\n    };\n  }, []);\n  return size;\n}\nfunction $5df64b3807dc15ee$var$getViewportSize() {\n  return {\n    width: ($5df64b3807dc15ee$var$visualViewport === null || $5df64b3807dc15ee$var$visualViewport === void 0 ? void 0 : $5df64b3807dc15ee$var$visualViewport.width) || window.innerWidth,\n    height: ($5df64b3807dc15ee$var$visualViewport === null || $5df64b3807dc15ee$var$visualViewport === void 0 ? void 0 : $5df64b3807dc15ee$var$visualViewport.height) || window.innerHeight\n  };\n}\nvar $ef06256079686ba0$var$descriptionId = 0;\nvar $ef06256079686ba0$var$descriptionNodes = new Map();\nfunction $ef06256079686ba0$export$f8aeda7b10753fa1(description) {\n  var _ref10 = (0, $12uGp$useState)(undefined),\n    _ref11 = _slicedToArray(_ref10, 2),\n    id = _ref11[0],\n    setId = _ref11[1];\n  (0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(function () {\n    if (!description) return;\n    var desc = $ef06256079686ba0$var$descriptionNodes.get(description);\n    if (!desc) {\n      var _id = \"react-aria-description-\" + $ef06256079686ba0$var$descriptionId++;\n      setId(_id);\n      var node = document.createElement(\"div\");\n      node.id = _id;\n      node.style.display = \"none\";\n      node.textContent = description;\n      document.body.appendChild(node);\n      desc = {\n        refCount: 0,\n        element: node\n      };\n      $ef06256079686ba0$var$descriptionNodes.set(description, desc);\n    } else setId(desc.element.id);\n    desc.refCount++;\n    return function () {\n      if (--desc.refCount === 0) {\n        desc.element.remove();\n        $ef06256079686ba0$var$descriptionNodes.delete(description);\n      }\n    };\n  }, [description]);\n  return {\n    \"aria-describedby\": description ? id : undefined\n  };\n}\nfunction $c87311424ea30a05$var$testUserAgent(re) {\n  var _window_navigator_userAgentData;\n  if (typeof window === \"undefined\" || window.navigator == null) return false;\n  return ((_window_navigator_userAgentData = window.navigator[\"userAgentData\"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some(function (brand) {\n    return re.test(brand.brand);\n  })) || re.test(window.navigator.userAgent);\n}\nfunction $c87311424ea30a05$var$testPlatform(re) {\n  var _window_navigator_userAgentData;\n  return typeof window !== \"undefined\" && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator[\"userAgentData\"]) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;\n}\nfunction $c87311424ea30a05$export$9ac100e40613ea10() {\n  return $c87311424ea30a05$var$testPlatform(/^Mac/i);\n}\nfunction $c87311424ea30a05$export$186c6964ca17d99() {\n  return $c87311424ea30a05$var$testPlatform(/^iPhone/i);\n}\nfunction $c87311424ea30a05$export$7bef049ce92e4224() {\n  return $c87311424ea30a05$var$testPlatform(/^iPad/i) || $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;\n}\nfunction $c87311424ea30a05$export$fedb369cb70207f1() {\n  return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();\n}\nfunction $c87311424ea30a05$export$e1865c3bedcd822b() {\n  return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();\n}\nfunction $c87311424ea30a05$export$78551043582a6a98() {\n  return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();\n}\nfunction $c87311424ea30a05$export$6446a186d09e379e() {\n  return $c87311424ea30a05$var$testUserAgent(/Chrome/i);\n}\nfunction $c87311424ea30a05$export$a11b0059900ceec8() {\n  return $c87311424ea30a05$var$testUserAgent(/Android/i);\n}\nfunction $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options) {\n  var _this = this;\n  var handlerRef = (0, $12uGp$useRef)(handler);\n  handlerRef.current = handler;\n  var isDisabled = handler == null;\n  (0, $12uGp$useEffect)(function () {\n    if (isDisabled) return;\n    var element = ref.current;\n    var handler = function handler(e) {\n      return handlerRef.current.call(_this, e);\n    };\n    element.addEventListener(event, handler, options);\n    return function () {\n      element.removeEventListener(event, handler, options);\n    };\n  }, [ref, event, options, isDisabled]);\n}\nfunction $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {\n  var offsetX = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, \"left\");\n  var offsetY = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, \"top\");\n  var width = element.offsetWidth;\n  var height = element.offsetHeight;\n  var x = scrollView.scrollLeft;\n  var y = scrollView.scrollTop;\n  var _getComputedStyle = getComputedStyle(scrollView),\n    borderTopWidth = _getComputedStyle.borderTopWidth,\n    borderLeftWidth = _getComputedStyle.borderLeftWidth;\n  var borderAdjustedX = scrollView.scrollLeft + parseInt(borderLeftWidth, 10);\n  var borderAdjustedY = scrollView.scrollTop + parseInt(borderTopWidth, 10);\n  var maxX = borderAdjustedX + scrollView.clientWidth;\n  var maxY = borderAdjustedY + scrollView.clientHeight;\n  if (offsetX <= x) x = offsetX - parseInt(borderLeftWidth, 10);else if (offsetX + width > maxX) x += offsetX + width - maxX;\n  if (offsetY <= borderAdjustedY) y = offsetY - parseInt(borderTopWidth, 10);else if (offsetY + height > maxY) y += offsetY + height - maxY;\n  scrollView.scrollLeft = x;\n  scrollView.scrollTop = y;\n}\nfunction $2f04cbc44ee30ce0$var$relativeOffset(ancestor, child, axis) {\n  var prop = axis === \"left\" ? \"offsetLeft\" : \"offsetTop\";\n  var sum = 0;\n  while (child.offsetParent) {\n    sum += child[prop];\n    if (child.offsetParent === ancestor) break;else if (child.offsetParent.contains(ancestor)) {\n      sum -= ancestor[prop];\n      break;\n    }\n    child = child.offsetParent;\n  }\n  return sum;\n}\nfunction $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {\n  if (document.contains(targetElement)) {\n    var root = document.scrollingElement || document.documentElement;\n    var isScrollPrevented = window.getComputedStyle(root).overflow === \"hidden\";\n    if (!isScrollPrevented) {\n      var _targetElement_scrollIntoView;\n      var _targetElement$getBou = targetElement.getBoundingClientRect(),\n        originalLeft = _targetElement$getBou.left,\n        originalTop = _targetElement$getBou.top;\n      targetElement === null || targetElement === void 0 ? void 0 : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 ? void 0 : _targetElement_scrollIntoView.call(targetElement, {\n        block: \"nearest\"\n      });\n      var _targetElement$getBou2 = targetElement.getBoundingClientRect(),\n        newLeft = _targetElement$getBou2.left,\n        newTop = _targetElement$getBou2.top;\n      if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {\n        var _opts_containingElement, _opts_containingElement_scrollIntoView, _targetElement_scrollIntoView1;\n        opts === null || opts === void 0 ? void 0 : (_opts_containingElement = opts.containingElement) === null || _opts_containingElement === void 0 ? void 0 : (_opts_containingElement_scrollIntoView = _opts_containingElement.scrollIntoView) === null || _opts_containingElement_scrollIntoView === void 0 ? void 0 : _opts_containingElement_scrollIntoView.call(_opts_containingElement, {\n          block: \"center\",\n          inline: \"center\"\n        });\n        (_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === void 0 ? void 0 : _targetElement_scrollIntoView1.call(targetElement, {\n          block: \"nearest\"\n        });\n      }\n    } else {\n      var scrollParent = (0, $62d8ded9296f3872$export$cfa2225e87938781)(targetElement);\n      while (targetElement && scrollParent && targetElement !== root && scrollParent !== root) {\n        $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);\n        targetElement = scrollParent;\n        scrollParent = (0, $62d8ded9296f3872$export$cfa2225e87938781)(targetElement);\n      }\n    }\n  }\n}\nfunction $6a7db85432448f7f$export$60278871457622de(event) {\n  if (event.mozInputSource === 0 && event.isTrusted) return true;\n  if ((0, $c87311424ea30a05$export$a11b0059900ceec8)() && event.pointerType) return event.type === \"click\" && event.buttons === 1;\n  return event.detail === 0 && !event.pointerType;\n}\nfunction $6a7db85432448f7f$export$29bf1b5f2c56cf63(event) {\n  return event.width === 0 && event.height === 0 || event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === \"mouse\";\n}\nexport { $bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId, $ff5963eb1fccf552$export$e08e3b67e392101e as chain, $3ef42575df84b30b$export$9d1611c77c2fe928 as mergeProps, $5dc95899b306f630$export$c9058316764c140e as mergeRefs, $65484d02dcb7eb3e$export$457c3d6518dd4c6f as filterDOMProps, $7215afc6de606d6b$export$de79e2c695e052f3 as focusWithoutScrolling, $ab71dadb03a6fb2e$export$622cea445a1c5b7d as getOffset, $bbed8b41f857bcc0$export$24490316f764c430 as runAfterTransition, $9cc09df9fd7676be$export$7bbed75feba39706 as useDrag1D, $03deb23ff14920c4$export$4eaf04e54aa8eed6 as useGlobalListeners, $313b98861ee5dd6c$export$d6875122194c7b44 as useLabels, $df56164dff5785e2$export$4338b53315abf666 as useObjectRef, $4f58c5f72bcf79f7$export$496315a1608d9602 as useUpdateEffect, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as useLayoutEffect, $9daab02d461809db$export$683480f191c0e3ea as useResizeObserver, $e7801be82b4b2a53$export$4debdb1a3f0fa79e as useSyncRef, $62d8ded9296f3872$export$cfa2225e87938781 as getScrollParent, $62d8ded9296f3872$export$2bb74740c4e19def as isScrollable, $5df64b3807dc15ee$export$d699905dd57c73ca as useViewportSize, $ef06256079686ba0$export$f8aeda7b10753fa1 as useDescription, $c87311424ea30a05$export$9ac100e40613ea10 as isMac, $c87311424ea30a05$export$186c6964ca17d99 as isIPhone, $c87311424ea30a05$export$7bef049ce92e4224 as isIPad, $c87311424ea30a05$export$fedb369cb70207f1 as isIOS, $c87311424ea30a05$export$e1865c3bedcd822b as isAppleDevice, $c87311424ea30a05$export$78551043582a6a98 as isWebKit, $c87311424ea30a05$export$6446a186d09e379e as isChrome, $c87311424ea30a05$export$a11b0059900ceec8 as isAndroid, $e9faafb641e167db$export$90fc3a17d93f704c as useEvent, $1dbecbe27a04f9af$export$14d238f342723f25 as useValueEffect, $2f04cbc44ee30ce0$export$53a0910f038337bd as scrollIntoView, $2f04cbc44ee30ce0$export$c826860796309d1b as scrollIntoViewport, $4507461a1b870123$re_export$clamp as clamp, $4507461a1b870123$re_export$snapValueToStep as snapValueToStep, $6a7db85432448f7f$export$60278871457622de as isVirtualClick, $6a7db85432448f7f$export$29bf1b5f2c56cf63 as isVirtualPointerEvent };","map":{"version":3,"sources":["packages/@react-aria/utils/src/useId.ts","packages/@react-aria/utils/src/useLayoutEffect.ts","packages/@react-aria/utils/src/useValueEffect.ts","packages/@react-aria/utils/src/chain.ts","packages/@react-aria/utils/src/mergeProps.ts","packages/@react-aria/utils/src/mergeRefs.ts","packages/@react-aria/utils/src/filterDOMProps.ts","packages/@react-aria/utils/src/focusWithoutScrolling.ts","packages/@react-aria/utils/src/getOffset.ts","packages/@react-aria/utils/src/runAfterTransition.ts","packages/@react-aria/utils/src/useDrag1D.ts","packages/@react-aria/utils/src/useGlobalListeners.ts","packages/@react-aria/utils/src/useLabels.ts","packages/@react-aria/utils/src/useObjectRef.ts","packages/@react-aria/utils/src/useUpdateEffect.ts","packages/@react-aria/utils/src/useResizeObserver.ts","packages/@react-aria/utils/src/useSyncRef.ts","packages/@react-aria/utils/src/getScrollParent.ts","packages/@react-aria/utils/src/useViewportSize.ts","packages/@react-aria/utils/src/useDescription.ts","packages/@react-aria/utils/src/platform.ts","packages/@react-aria/utils/src/useEvent.ts","packages/@react-aria/utils/src/scrollIntoView.ts","packages/@react-aria/utils/src/isVirtualEvent.ts"],"names":[],"mappings":";;;;;;;;;ACiBO,IAAM,yCAAA,GAAkB,OAAO,MAAA,KAAW,WAAA,GAC7C,CAAA,CAAA,EAAA,YAAK,EAAC,eAAe,GACrB,YAAM,CAAC,CAAC;ACEL,SAAS,yCAAA,CAAkB,YAA2B,EAAoC;EAC/F,IAAA,IAAA,GAAwB,CAAA,CAAA,EAAA,eAAQ,EAAC,YAAA,CAAA;IAAA,KAAA,GAAA,cAAA,CAAA,IAAA;IAA5B,KAAA,GAAA,KAAA;IAAO,QAAA,GAAA,KAAA;EACZ,IAAI,QAAA,GAAW,CAAA,CAAA,EAAA,aAAK,EAAE,KAAA,CAAA;EACtB,IAAI,MAAA,GAAS,CAAA,CAA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AM,OAAO,KAAK,CAAA;EAGrD,OAAO,KAAA,CAAM,MAAM,KAAK,CAAA,IAAK,CAAE,KAAA,CAAuB,WAAW;AACnE;AAEO,SAAS,yCAAA,CAAsB,KAAmB,EAAE;EAOzD,OACG,KAAA,CAAM,KAAK,KAAK,CAAA,IAAK,KAAA,CAAM,MAAM,KAAK,CAAA,IACtC,KAAA,CAAM,KAAK,KAAK,CAAA,IACf,KAAA,CAAM,MAAM,KAAK,CAAA,IACjB,KAAA,CAAM,QAAQ,KAAK,CAAA,IACnB,KAAA,CAAM,MAAM,KAAK,CAAA,IACjB,KAAA,CAAM,WAAW,KAAK,OAAA;AAG5B","sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef, useState} from 'react';\nimport {useLayoutEffect} from './useLayoutEffect';\nimport {useSSRSafeId} from '@react-aria/ssr';\nimport {useValueEffect} from './';\n\nlet idsUpdaterMap: Map<string, (v: string) => void> = new Map();\n\n/**\n * If a default is not provided, generate an id.\n * @param defaultId - Default component id.\n */\nexport function useId(defaultId?: string): string {\n  let [value, setValue] = useState(defaultId);\n  let nextId = useRef(null);\n\n  let res = useSSRSafeId(value);\n\n  let updateValue = useCallback((val) => {\n    nextId.current = val;\n  }, []);\n\n  idsUpdaterMap.set(res, updateValue);\n\n  useLayoutEffect(() => {\n    let r = res;\n    return () => {\n      idsUpdaterMap.delete(r);\n    };\n  }, [res]);\n\n  // This cannot cause an infinite loop because the ref is updated first.\n  // eslint-disable-next-line\n  useEffect(() => {\n    let newId = nextId.current;\n    if (newId) {\n      nextId.current = null;\n      setValue(newId);\n    }\n  });\n\n  return res;\n}\n\n/**\n * Merges two ids.\n * Different ids will trigger a side-effect and re-render components hooked up with `useId`.\n */\nexport function mergeIds(idA: string, idB: string): string {\n  if (idA === idB) {\n    return idA;\n  }\n\n  let setIdA = idsUpdaterMap.get(idA);\n  if (setIdA) {\n    setIdA(idB);\n    return idB;\n  }\n\n  let setIdB = idsUpdaterMap.get(idB);\n  if (setIdB) {\n    setIdB(idA);\n    return idA;\n  }\n\n  return idB;\n}\n\n/**\n * Used to generate an id, and after render, check if that id is rendered so we know\n * if we can use it in places such as labelledby.\n * @param depArray - When to recalculate if the id is in the DOM.\n */\nexport function useSlotId(depArray: ReadonlyArray<any> = []): string {\n  let id = useId();\n  let [resolvedId, setResolvedId] = useValueEffect(id);\n  let updateId = useCallback(() => {\n    setResolvedId(function *() {\n      yield id;\n\n      yield document.getElementById(id) ? id : undefined;\n    });\n  }, [id, setResolvedId]);\n\n  useLayoutEffect(updateId, [id, updateId, ...depArray]);\n\n  return resolvedId;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport React from 'react';\n\n// During SSR, React emits a warning when calling useLayoutEffect.\n// Since neither useLayoutEffect nor useEffect run on the server,\n// we can suppress this by replace it with a noop on the server.\nexport const useLayoutEffect = typeof window !== 'undefined'\n  ? React.useLayoutEffect\n  : () => {};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Dispatch, useCallback, useRef, useState} from 'react';\nimport {useLayoutEffect} from './';\n\ntype SetValueAction<S> = (prev: S) => Generator<any, void, unknown>;\n\n// This hook works like `useState`, but when setting the value, you pass a generator function\n// that can yield multiple values. Each yielded value updates the state and waits for the next\n// layout effect, then continues the generator. This allows sequential updates to state to be\n// written linearly.\nexport function useValueEffect<S>(defaultValue: S | (() => S)): [S, Dispatch<SetValueAction<S>>] {\n  let [value, setValue] = useState(defaultValue);\n  let valueRef = useRef(value);\n  let effect = useRef(null);\n\n  valueRef.current = value;\n\n  // Store the function in a ref so we can always access the current version\n  // which has the proper `value` in scope.\n  let nextRef = useRef(null);\n  nextRef.current = () => {\n    // Run the generator to the next yield.\n    let newValue = effect.current.next();\n\n    // If the generator is done, reset the effect.\n    if (newValue.done) {\n      effect.current = null;\n      return;\n    }\n\n    // If the value is the same as the current value,\n    // then continue to the next yield. Otherwise,\n    // set the value in state and wait for the next layout effect.\n    if (value === newValue.value) {\n      nextRef.current();\n    } else {\n      setValue(newValue.value);\n    }\n  };\n\n  useLayoutEffect(() => {\n    // If there is an effect currently running, continue to the next yield.\n    if (effect.current) {\n      nextRef.current();\n    }\n  });\n\n  let queue = useCallback(fn => {\n    effect.current = fn(valueRef.current);\n    nextRef.current();\n  }, [effect, nextRef]);\n\n  return [value, queue];\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/**\n * Calls all functions in the order they were chained with the same arguments.\n */\nexport function chain(...callbacks: any[]): (...args: any[]) => void {\n  return (...args: any[]) => {\n    for (let callback of callbacks) {\n      if (typeof callback === 'function') {\n        callback(...args);\n      }\n    }\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain} from './chain';\nimport clsx from 'clsx';\nimport {mergeIds} from './useId';\n\ninterface Props {\n  [key: string]: any\n}\n\n// taken from: https://stackoverflow.com/questions/51603250/typescript-3-parameter-list-intersection-type/51604379#51604379\ntype TupleTypes<T> = { [P in keyof T]: T[P] } extends { [key: number]: infer V } ? V : never;\n// eslint-disable-next-line no-undef, @typescript-eslint/no-unused-vars\ntype UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends ((k: infer I) => void) ? I : never;\n\n/**\n * Merges multiple props objects together. Event handlers are chained,\n * classNames are combined, and ids are deduplicated - different ids\n * will trigger a side-effect and re-render components hooked up with `useId`.\n * For all other props, the last prop object overrides all previous ones.\n * @param args - Multiple sets of props to merge together.\n */\nexport function mergeProps<T extends Props[]>(...args: T): UnionToIntersection<TupleTypes<T>> {\n  // Start with a base clone of the first argument. This is a lot faster than starting\n  // with an empty object and adding properties as we go.\n  let result: Props = {...args[0]};\n  for (let i = 1; i < args.length; i++) {\n    let props = args[i];\n    for (let key in props) {\n      let a = result[key];\n      let b = props[key];\n\n      // Chain events\n      if (\n        typeof a === 'function' &&\n        typeof b === 'function' &&\n        // This is a lot faster than a regex.\n        key[0] === 'o' &&\n        key[1] === 'n' &&\n        key.charCodeAt(2) >= /* 'A' */ 65 &&\n        key.charCodeAt(2) <= /* 'Z' */ 90\n      ) {\n        result[key] = chain(a, b);\n\n        // Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check\n      } else if (\n        (key === 'className' || key === 'UNSAFE_className') &&\n        typeof a === 'string' &&\n        typeof b === 'string'\n      ) {\n        result[key] = clsx(a, b);\n      } else if (key === 'id' && a && b) {\n        result.id = mergeIds(a, b);\n        // Override others\n      } else {\n        result[key] = b !== undefined ? b : a;\n      }\n    }\n  }\n\n  return result as UnionToIntersection<TupleTypes<T>>;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {ForwardedRef} from 'react';\n\n/**\n * Merges multiple refs into one. Works with either callback or object refs.\n */\nexport function mergeRefs<T>(...refs: ForwardedRef<T>[]): ForwardedRef<T> {\n  return (value: T) => {\n    for (let ref of refs) {\n      if (typeof ref === 'function') {\n        ref(value);\n      } else if (ref != null) {\n        ref.current = value;\n      }\n    }\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\n\nconst DOMPropNames = new Set([\n  'id'\n]);\n\nconst labelablePropNames = new Set([\n  'aria-label',\n  'aria-labelledby',\n  'aria-describedby',\n  'aria-details'\n]);\n\ninterface Options {\n  /**\n   * If labelling associated aria properties should be included in the filter.\n   */\n  labelable?: boolean,\n  /**\n   * A Set of other property names that should be included in the filter.\n   */\n  propNames?: Set<string>\n}\n\nconst propRe = /^(data-.*)$/;\n\n/**\n * Filters out all props that aren't valid DOM props or defined via override prop obj.\n * @param props - The component props to be filtered.\n * @param opts - Props to override.\n */\nexport function filterDOMProps(props: DOMProps & AriaLabelingProps, opts: Options = {}): DOMProps & AriaLabelingProps {\n  let {labelable, propNames} = opts;\n  let filteredProps = {};\n\n  for (const prop in props) {\n    if (\n      Object.prototype.hasOwnProperty.call(props, prop) && (\n        DOMPropNames.has(prop) ||\n        (labelable && labelablePropNames.has(prop)) ||\n        propNames?.has(prop) ||\n        propRe.test(prop)\n      )\n    ) {\n      filteredProps[prop] = props[prop];\n    }\n  }\n\n  return filteredProps;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {FocusableElement} from '@react-types/shared';\n\n// This is a polyfill for element.focus({preventScroll: true});\n// Currently necessary for Safari and old Edge:\n// https://caniuse.com/#feat=mdn-api_htmlelement_focus_preventscroll_option\n// See https://bugs.webkit.org/show_bug.cgi?id=178583\n//\n\n// Original licensing for the following methods can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/calvellido/focus-options-polyfill\n\ninterface ScrollableElement {\n  element: HTMLElement,\n  scrollTop: number,\n  scrollLeft: number\n}\n\nexport function focusWithoutScrolling(element: FocusableElement) {\n  if (supportsPreventScroll()) {\n    element.focus({preventScroll: true});\n  } else {\n    let scrollableElements = getScrollableElements(element);\n    element.focus();\n    restoreScrollPosition(scrollableElements);\n  }\n}\n\nlet supportsPreventScrollCached: boolean = null;\nfunction supportsPreventScroll() {\n  if (supportsPreventScrollCached == null) {\n    supportsPreventScrollCached = false;\n    try {\n      var focusElem = document.createElement('div');\n      focusElem.focus({\n        get preventScroll() {\n          supportsPreventScrollCached = true;\n          return true;\n        }\n      });\n    } catch (e) {\n      // Ignore\n    }\n  }\n\n  return supportsPreventScrollCached;\n}\n\nfunction getScrollableElements(element: FocusableElement): ScrollableElement[] {\n  var parent = element.parentNode;\n  var scrollableElements: ScrollableElement[] = [];\n  var rootScrollingElement = document.scrollingElement || document.documentElement;\n\n  while (parent instanceof HTMLElement && parent !== rootScrollingElement) {\n    if (\n      parent.offsetHeight < parent.scrollHeight ||\n      parent.offsetWidth < parent.scrollWidth\n    ) {\n      scrollableElements.push({\n        element: parent,\n        scrollTop: parent.scrollTop,\n        scrollLeft: parent.scrollLeft\n      });\n    }\n    parent = parent.parentNode;\n  }\n\n  if (rootScrollingElement instanceof HTMLElement) {\n    scrollableElements.push({\n      element: rootScrollingElement,\n      scrollTop: rootScrollingElement.scrollTop,\n      scrollLeft: rootScrollingElement.scrollLeft\n    });\n  }\n\n  return scrollableElements;\n}\n\nfunction restoreScrollPosition(scrollableElements: ScrollableElement[]) {\n  for (let {element, scrollTop, scrollLeft} of scrollableElements) {\n    element.scrollTop = scrollTop;\n    element.scrollLeft = scrollLeft;\n  }\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport function getOffset(element, reverse, orientation = 'horizontal') {\n  let rect = element.getBoundingClientRect();\n  if (reverse) {\n    return orientation === 'horizontal' ? rect.right : rect.bottom;\n  }\n  return orientation === 'horizontal' ? rect.left : rect.top;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We store a global list of elements that are currently transitioning,\n// mapped to a set of CSS properties that are transitioning for that element.\n// This is necessary rather than a simple count of transitions because of browser\n// bugs, e.g. Chrome sometimes fires both transitionend and transitioncancel rather\n// than one or the other. So we need to track what's actually transitioning so that\n// we can ignore these duplicate events.\nlet transitionsByElement = new Map<EventTarget, Set<string>>();\n\n// A list of callbacks to call once there are no transitioning elements.\nlet transitionCallbacks = new Set<() => void>();\n\nfunction setupGlobalEvents() {\n  if (typeof window === 'undefined') {\n    return;\n  }\n\n  let onTransitionStart = (e: TransitionEvent) => {\n    // Add the transitioning property to the list for this element.\n    let transitions = transitionsByElement.get(e.target);\n    if (!transitions) {\n      transitions = new Set();\n      transitionsByElement.set(e.target, transitions);\n\n      // The transitioncancel event must be registered on the element itself, rather than as a global\n      // event. This enables us to handle when the node is deleted from the document while it is transitioning.\n      // In that case, the cancel event would have nowhere to bubble to so we need to handle it directly.\n      e.target.addEventListener('transitioncancel', onTransitionEnd);\n    }\n\n    transitions.add(e.propertyName);\n  };\n\n  let onTransitionEnd = (e: TransitionEvent) => {\n    // Remove property from list of transitioning properties.\n    let properties = transitionsByElement.get(e.target);\n    if (!properties) {\n      return;\n    }\n\n    properties.delete(e.propertyName);\n\n    // If empty, remove transitioncancel event, and remove the element from the list of transitioning elements.\n    if (properties.size === 0) {\n      e.target.removeEventListener('transitioncancel', onTransitionEnd);\n      transitionsByElement.delete(e.target);\n    }\n\n    // If no transitioning elements, call all of the queued callbacks.\n    if (transitionsByElement.size === 0) {\n      for (let cb of transitionCallbacks) {\n        cb();\n      }\n\n      transitionCallbacks.clear();\n    }\n  };\n\n  document.body.addEventListener('transitionrun', onTransitionStart);\n  document.body.addEventListener('transitionend', onTransitionEnd);\n}\n\nif (typeof document !== 'undefined') {\n  if (document.readyState !== 'loading') {\n    setupGlobalEvents();\n  } else {\n    document.addEventListener('DOMContentLoaded', setupGlobalEvents);\n  }\n}\n\nexport function runAfterTransition(fn: () => void) {\n  // Wait one frame to see if an animation starts, e.g. a transition on mount.\n  requestAnimationFrame(() => {\n    // If no transitions are running, call the function immediately.\n    // Otherwise, add it to a list of callbacks to run at the end of the animation.\n    if (transitionsByElement.size === 0) {\n      fn();\n    } else {\n      transitionCallbacks.add(fn);\n    }\n  });\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getOffset} from './getOffset';\nimport {Orientation} from '@react-types/shared';\nimport React, {HTMLAttributes, MutableRefObject, useRef} from 'react';\n\ninterface UseDrag1DProps {\n  containerRef: MutableRefObject<HTMLElement>,\n  reverse?: boolean,\n  orientation?: Orientation,\n  onHover?: (hovered: boolean) => void,\n  onDrag?: (dragging: boolean) => void,\n  onPositionChange?: (position: number) => void,\n  onIncrement?: () => void,\n  onDecrement?: () => void,\n  onIncrementToMax?: () => void,\n  onDecrementToMin?: () => void,\n  onCollapseToggle?: () => void\n}\n\n// Keep track of elements that we are currently handling dragging for via useDrag1D.\n// If there's an ancestor and a descendant both using useDrag1D(), and the user starts\n// dragging the descendant, we don't want useDrag1D events to fire for the ancestor.\nconst draggingElements: HTMLElement[] = [];\n\n// created for splitview, this should be reusable for things like sliders/dials\n// It also handles keyboard events on the target allowing for increment/decrement by a given stepsize as well as minifying/maximizing and toggling between minified and previous size\n// It can also take a 'reverse' param to say if we should measure from the right/bottom instead of the top/left\n// It can also handle either a vertical or horizontal movement, but not both at the same time\n\nexport function useDrag1D(props: UseDrag1DProps): HTMLAttributes<HTMLElement> {\n  console.warn('useDrag1D is deprecated, please use `useMove` instead https://react-spectrum.adobe.com/react-aria/useMove.html');\n  let {containerRef, reverse, orientation, onHover, onDrag, onPositionChange, onIncrement, onDecrement, onIncrementToMax, onDecrementToMin, onCollapseToggle} = props;\n  let getPosition = (e) => orientation === 'horizontal' ? e.clientX : e.clientY;\n  let getNextOffset = (e: MouseEvent) => {\n    let containerOffset = getOffset(containerRef.current, reverse, orientation);\n    let mouseOffset = getPosition(e);\n    let nextOffset = reverse ? containerOffset - mouseOffset : mouseOffset - containerOffset;\n    return nextOffset;\n  };\n  let dragging = useRef(false);\n  let prevPosition = useRef(0);\n\n  // Keep track of the current handlers in a ref so that the events can access them.\n  let handlers = useRef({onPositionChange, onDrag});\n  handlers.current.onDrag = onDrag;\n  handlers.current.onPositionChange = onPositionChange;\n\n  let onMouseDragged = (e: MouseEvent) => {\n    e.preventDefault();\n    let nextOffset = getNextOffset(e);\n    if (!dragging.current) {\n      dragging.current = true;\n      if (handlers.current.onDrag) {\n        handlers.current.onDrag(true);\n      }\n      if (handlers.current.onPositionChange) {\n        handlers.current.onPositionChange(nextOffset);\n      }\n    }\n    if (prevPosition.current === nextOffset) {\n      return;\n    }\n    prevPosition.current = nextOffset;\n    if (onPositionChange) {\n      onPositionChange(nextOffset);\n    }\n  };\n\n  let onMouseUp = (e: MouseEvent) => {\n    const target = e.target as HTMLElement;\n    dragging.current = false;\n    let nextOffset = getNextOffset(e);\n    if (handlers.current.onDrag) {\n      handlers.current.onDrag(false);\n    }\n    if (handlers.current.onPositionChange) {\n      handlers.current.onPositionChange(nextOffset);\n    }\n\n    draggingElements.splice(draggingElements.indexOf(target), 1);\n    window.removeEventListener('mouseup', onMouseUp, false);\n    window.removeEventListener('mousemove', onMouseDragged, false);\n  };\n\n  let onMouseDown = (e: React.MouseEvent<HTMLElement>) => {\n    const target = e.currentTarget;\n    // If we're already handling dragging on a descendant with useDrag1D, then\n    // we don't want to handle the drag motion on this target as well.\n    if (draggingElements.some(elt => target.contains(elt))) {\n      return;\n    }\n    draggingElements.push(target);\n    window.addEventListener('mousemove', onMouseDragged, false);\n    window.addEventListener('mouseup', onMouseUp, false);\n  };\n\n  let onMouseEnter = () => {\n    if (onHover) {\n      onHover(true);\n    }\n  };\n\n  let onMouseOut = () => {\n    if (onHover) {\n      onHover(false);\n    }\n  };\n\n  let onKeyDown = (e) => {\n    switch (e.key) {\n      case 'Left':\n      case 'ArrowLeft':\n        if (orientation === 'horizontal') {\n          e.preventDefault();\n          if (onDecrement && !reverse) {\n            onDecrement();\n          } else if (onIncrement && reverse) {\n            onIncrement();\n          }\n        }\n        break;\n      case 'Up':\n      case 'ArrowUp':\n        if (orientation === 'vertical') {\n          e.preventDefault();\n          if (onDecrement && !reverse) {\n            onDecrement();\n          } else if (onIncrement && reverse) {\n            onIncrement();\n          }\n        }\n        break;\n      case 'Right':\n      case 'ArrowRight':\n        if (orientation === 'horizontal') {\n          e.preventDefault();\n          if (onIncrement && !reverse) {\n            onIncrement();\n          } else if (onDecrement && reverse) {\n            onDecrement();\n          }\n        }\n        break;\n      case 'Down':\n      case 'ArrowDown':\n        if (orientation === 'vertical') {\n          e.preventDefault();\n          if (onIncrement && !reverse) {\n            onIncrement();\n          } else if (onDecrement && reverse) {\n            onDecrement();\n          }\n        }\n        break;\n      case 'Home':\n        e.preventDefault();\n        if (onDecrementToMin) {\n          onDecrementToMin();\n        }\n        break;\n      case 'End':\n        e.preventDefault();\n        if (onIncrementToMax) {\n          onIncrementToMax();\n        }\n        break;\n      case 'Enter':\n        e.preventDefault();\n        if (onCollapseToggle) {\n          onCollapseToggle();\n        }\n        break;\n    }\n  };\n\n  return {onMouseDown, onMouseEnter, onMouseOut, onKeyDown};\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useEffect, useRef} from 'react';\n\ninterface GlobalListeners {\n  addGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void,\n  addGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void,\n  removeGlobalListener<K extends keyof DocumentEventMap>(el: EventTarget, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void,\n  removeGlobalListener(el: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void,\n  removeAllGlobalListeners(): void\n}\n\nexport function useGlobalListeners(): GlobalListeners {\n  let globalListeners = useRef(new Map());\n  let addGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    // Make sure we remove the listener after it is called with the `once` option.\n    let fn = options?.once ? (...args) => {\n      globalListeners.current.delete(listener);\n      listener(...args);\n    } : listener;\n    globalListeners.current.set(listener, {type, eventTarget, fn, options});\n    eventTarget.addEventListener(type, listener, options);\n  }, []);\n  let removeGlobalListener = useCallback((eventTarget, type, listener, options) => {\n    let fn = globalListeners.current.get(listener)?.fn || listener;\n    eventTarget.removeEventListener(type, fn, options);\n    globalListeners.current.delete(listener);\n  }, []);\n  let removeAllGlobalListeners = useCallback(() => {\n    globalListeners.current.forEach((value, key) => {\n      removeGlobalListener(value.eventTarget, value.type, key, value.options);\n    });\n  }, [removeGlobalListener]);\n\n  // eslint-disable-next-line arrow-body-style\n  useEffect(() => {\n    return removeAllGlobalListeners;\n  }, [removeAllGlobalListeners]);\n\n  return {addGlobalListener, removeGlobalListener, removeAllGlobalListeners};\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps} from '@react-types/shared';\nimport {useId} from './useId';\n\n/**\n * Merges aria-label and aria-labelledby into aria-labelledby when both exist.\n * @param props - Aria label props.\n * @param defaultLabel - Default value for aria-label when not present.\n */\nexport function useLabels(props: DOMProps & AriaLabelingProps, defaultLabel?: string): DOMProps & AriaLabelingProps {\n  let {\n    id,\n    'aria-label': label,\n    'aria-labelledby': labelledBy\n  } = props;\n\n  // If there is both an aria-label and aria-labelledby,\n  // combine them by pointing to the element itself.\n  id = useId(id);\n  if (labelledBy && label) {\n    let ids = new Set([...labelledBy.trim().split(/\\s+/), id]);\n    labelledBy = [...ids].join(' ');\n  } else if (labelledBy) {\n    labelledBy = labelledBy.trim().split(/\\s+/).join(' ');\n  }\n\n  // If no labels are provided, use the default\n  if (!label && !labelledBy && defaultLabel) {\n    label = defaultLabel;\n  }\n\n  return {\n    id,\n    'aria-label': label,\n    'aria-labelledby': labelledBy\n  };\n}\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {MutableRefObject, useRef} from 'react';\nimport {useLayoutEffect} from './';\n\n/**\n * Offers an object ref for a given callback ref or an object ref. Especially\n * helfpul when passing forwarded refs (created using `React.forwardRef`) to\n * React Aria Hooks.\n *\n * @param forwardedRef The original ref intended to be used.\n * @returns An object ref that updates the given ref.\n * @see https://reactjs.org/docs/forwarding-refs.html\n */\nexport function useObjectRef<T>(forwardedRef?: ((instance: T | null) => void) | MutableRefObject<T | null> | null): MutableRefObject<T> {\n  const objRef = useRef<T>();\n\n  /**\n   * We're using `useLayoutEffect` here instead of `useEffect` because we want\n   * to make sure that the `ref` value is up to date before other places in the\n   * the execution cycle try to read it.\n   */\n  useLayoutEffect(() => {\n    if (!forwardedRef) {\n      return;\n    }\n\n    if (typeof forwardedRef === 'function') {\n      forwardedRef(objRef.current);\n    } else {\n      forwardedRef.current = objRef.current;\n    }\n  }, [forwardedRef]);\n\n  return objRef;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {EffectCallback, useEffect, useRef} from 'react';\n\n// Like useEffect, but only called for updates after the initial render.\nexport function useUpdateEffect(effect: EffectCallback, dependencies: any[]) {\n  const isInitialMount = useRef(true);\n\n  useEffect(() => {\n    if (isInitialMount.current) {\n      isInitialMount.current = false;\n    } else {\n      effect();\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, dependencies);\n}\n","import {RefObject, useEffect} from 'react';\n\nfunction hasResizeObserver() {\n  return typeof window.ResizeObserver !== 'undefined';\n}\n\ntype useResizeObserverOptionsType<T> = {\n  ref: RefObject<T | undefined> | undefined,\n  onResize: () => void\n}\n\nexport function useResizeObserver<T extends Element>(options: useResizeObserverOptionsType<T>) {\n  const {ref, onResize} = options;\n\n  useEffect(() => {\n    let element = ref?.current;\n    if (!element) {\n      return;\n    }\n\n    if (!hasResizeObserver()) {\n      window.addEventListener('resize', onResize, false);\n      return () => {\n        window.removeEventListener('resize', onResize, false);\n      };\n    } else {\n\n      const resizeObserverInstance = new window.ResizeObserver((entries) => {\n        if (!entries.length) {\n          return;\n        }\n\n        onResize();\n      });\n      resizeObserverInstance.observe(element);\n\n      return () => {\n        if (element) {\n          resizeObserverInstance.unobserve(element);\n        }\n      };\n    }\n\n  }, [onResize, ref]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {MutableRefObject, RefObject} from 'react';\nimport {useLayoutEffect} from './';\n\ninterface ContextValue<T> {\n  ref?: MutableRefObject<T>\n}\n\n// Syncs ref from context with ref passed to hook\nexport function useSyncRef<T>(context: ContextValue<T>, ref: RefObject<T>) {\n  useLayoutEffect(() => {\n    if (context && context.ref && ref) {\n      context.ref.current = ref.current;\n      return () => {\n        context.ref.current = null;\n      };\n    }\n  }, [context, ref]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nexport function getScrollParent(node: Element): Element {\n  if (isScrollable(node)) {\n    node = node.parentElement;\n  }\n\n  while (node && !isScrollable(node)) {\n    node = node.parentElement;\n  }\n\n  return node || document.scrollingElement || document.documentElement;\n}\n\nexport function isScrollable(node: Element): boolean {\n  let style = window.getComputedStyle(node);\n  return /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useEffect, useState} from 'react';\n\ninterface ViewportSize {\n  width: number,\n  height: number\n}\n\n// @ts-ignore\nlet visualViewport = typeof window !== 'undefined' && window.visualViewport;\n\nexport function useViewportSize(): ViewportSize {\n  let [size, setSize] = useState(() => getViewportSize());\n\n  useEffect(() => {\n    // Use visualViewport api to track available height even on iOS virtual keyboard opening\n    let onResize = () => {\n      setSize(size => {\n        let newSize = getViewportSize();\n        if (newSize.width === size.width && newSize.height === size.height) {\n          return size;\n        }\n        return newSize;\n      });\n    };\n\n    if (!visualViewport) {\n      window.addEventListener('resize', onResize);\n    } else {\n      visualViewport.addEventListener('resize', onResize);\n    }\n\n    return () => {\n      if (!visualViewport) {\n        window.removeEventListener('resize', onResize);\n      } else {\n        visualViewport.removeEventListener('resize', onResize);\n      }\n    };\n  }, []);\n\n  return size;\n}\n\nfunction getViewportSize(): ViewportSize {\n  return {\n    width: visualViewport?.width || window.innerWidth,\n    height: visualViewport?.height || window.innerHeight\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps} from '@react-types/shared';\nimport {useLayoutEffect} from './useLayoutEffect';\nimport {useState} from 'react';\n\nlet descriptionId = 0;\nconst descriptionNodes = new Map<string, {refCount: number, element: Element}>();\n\nexport function useDescription(description: string): AriaLabelingProps {\n  let [id, setId] = useState(undefined);\n\n  useLayoutEffect(() => {\n    if (!description) {\n      return;\n    }\n\n    let desc = descriptionNodes.get(description);\n    if (!desc) {\n      let id = `react-aria-description-${descriptionId++}`;\n      setId(id);\n\n      let node = document.createElement('div');\n      node.id = id;\n      node.style.display = 'none';\n      node.textContent = description;\n      document.body.appendChild(node);\n      desc = {refCount: 0, element: node};\n      descriptionNodes.set(description, desc);\n    } else {\n      setId(desc.element.id);\n    }\n\n    desc.refCount++;\n    return () => {\n      if (--desc.refCount === 0) {\n        desc.element.remove();\n        descriptionNodes.delete(description);\n      }\n    };\n  }, [description]);\n\n  return {\n    'aria-describedby': description ? id : undefined\n  };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nfunction testUserAgent(re: RegExp) {\n  if (typeof window === 'undefined' || window.navigator == null) {\n    return false;\n  }\n  return (\n    window.navigator['userAgentData']?.brands.some((brand: {brand: string, version: string}) => re.test(brand.brand))\n  ) ||\n  re.test(window.navigator.userAgent);\n}\n\nfunction testPlatform(re: RegExp) {\n  return typeof window !== 'undefined' && window.navigator != null\n    ? re.test(window.navigator['userAgentData']?.platform || window.navigator.platform)\n    : false;\n}\n\nexport function isMac() {\n  return testPlatform(/^Mac/i);\n}\n\nexport function isIPhone() {\n  return testPlatform(/^iPhone/i);\n}\n\nexport function isIPad() {\n  return testPlatform(/^iPad/i) ||\n    // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n    (isMac() && navigator.maxTouchPoints > 1);\n}\n\nexport function isIOS() {\n  return isIPhone() || isIPad();\n}\n\nexport function isAppleDevice() {\n  return isMac() || isIOS();\n}\n\nexport function isWebKit() {\n  return testUserAgent(/AppleWebKit/i) && !isChrome();\n}\n\nexport function isChrome() {\n  return testUserAgent(/Chrome/i);\n}\n\nexport function isAndroid() {\n  return testUserAgent(/Android/i);\n}\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {RefObject, useEffect, useRef} from 'react';\n\nexport function useEvent<K extends keyof GlobalEventHandlersEventMap>(\n  ref: RefObject<EventTarget>,\n  event: K,\n  handler: (this: Document, ev: GlobalEventHandlersEventMap[K]) => any,\n  options?: boolean | AddEventListenerOptions\n) {\n  let handlerRef = useRef(handler);\n  handlerRef.current = handler;\n\n  let isDisabled = handler == null;\n\n  useEffect(() => {\n    if (isDisabled) {\n      return;\n    }\n\n    let element = ref.current;\n    let handler = (e: GlobalEventHandlersEventMap[K]) => handlerRef.current.call(this, e);\n\n    element.addEventListener(event, handler, options);\n    return () => {\n      element.removeEventListener(event, handler, options);\n    };\n  }, [ref, event, options, isDisabled]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {getScrollParent} from './';\n\ninterface ScrollIntoViewportOpts {\n  /** The optional containing element of the target to be centered in the viewport. */\n  containingElement?: Element\n}\n\n/**\n * Scrolls `scrollView` so that `element` is visible.\n * Similar to `element.scrollIntoView({block: 'nearest'})` (not supported in Edge),\n * but doesn't affect parents above `scrollView`.\n */\nexport function scrollIntoView(scrollView: HTMLElement, element: HTMLElement) {\n  let offsetX = relativeOffset(scrollView, element, 'left');\n  let offsetY = relativeOffset(scrollView, element, 'top');\n  let width = element.offsetWidth;\n  let height = element.offsetHeight;\n  let x = scrollView.scrollLeft;\n  let y = scrollView.scrollTop;\n\n  // Account for top/left border offsetting the scroll top/Left\n  let {borderTopWidth, borderLeftWidth} = getComputedStyle(scrollView);\n  let borderAdjustedX = scrollView.scrollLeft + parseInt(borderLeftWidth, 10);\n  let borderAdjustedY = scrollView.scrollTop + parseInt(borderTopWidth, 10);\n  // Ignore end/bottom border via clientHeight/Width instead of offsetHeight/Width\n  let maxX = borderAdjustedX + scrollView.clientWidth;\n  let maxY = borderAdjustedY + scrollView.clientHeight;\n\n  if (offsetX <= x) {\n    x = offsetX - parseInt(borderLeftWidth, 10);\n  } else if (offsetX + width > maxX) {\n    x += offsetX + width - maxX;\n  }\n  if (offsetY <= borderAdjustedY) {\n    y = offsetY - parseInt(borderTopWidth, 10);\n  } else if (offsetY + height > maxY) {\n    y += offsetY + height - maxY;\n  }\n  scrollView.scrollLeft = x;\n  scrollView.scrollTop = y;\n}\n\n/**\n * Computes the offset left or top from child to ancestor by accumulating\n * offsetLeft or offsetTop through intervening offsetParents.\n */\nfunction relativeOffset(ancestor: HTMLElement, child: HTMLElement, axis: 'left'|'top') {\n  const prop = axis === 'left' ? 'offsetLeft' : 'offsetTop';\n  let sum = 0;\n  while (child.offsetParent) {\n    sum += child[prop];\n    if (child.offsetParent === ancestor) {\n      // Stop once we have found the ancestor we are interested in.\n      break;\n    } else if (child.offsetParent.contains(ancestor)) {\n      // If the ancestor is not `position:relative`, then we stop at\n      // _its_ offset parent, and we subtract off _its_ offset, so that\n      // we end up with the proper offset from child to ancestor.\n      sum -= ancestor[prop];\n      break;\n    }\n    child = child.offsetParent as HTMLElement;\n  }\n  return sum;\n}\n\n/**\n * Scrolls the `targetElement` so it is visible in the viewport. Accepts an optional `opts.containingElement`\n * that will be centered in the viewport prior to scrolling the targetElement into view. If scrolling is prevented on\n * the body (e.g. targetElement is in a popover), this will only scroll the scroll parents of the targetElement up to but not including the body itself.\n */\nexport function scrollIntoViewport(targetElement: Element, opts?: ScrollIntoViewportOpts) {\n  if (document.contains(targetElement)) {\n    let root = document.scrollingElement || document.documentElement;\n    let isScrollPrevented = window.getComputedStyle(root).overflow === 'hidden';\n    // If scrolling is not currently prevented then we aren’t in a overlay nor is a overlay open, just use element.scrollIntoView to bring the element into view\n    if (!isScrollPrevented) {\n      let {left: originalLeft, top: originalTop} = targetElement.getBoundingClientRect();\n\n      // use scrollIntoView({block: 'nearest'}) instead of .focus to check if the element is fully in view or not since .focus()\n      // won't cause a scroll if the element is already focused and doesn't behave consistently when an element is partially out of view horizontally vs vertically\n      targetElement?.scrollIntoView?.({block: 'nearest'});\n      let {left: newLeft, top: newTop} = targetElement.getBoundingClientRect();\n      // Account for sub pixel differences from rounding\n      if ((Math.abs(originalLeft - newLeft) > 1) || (Math.abs(originalTop - newTop) > 1)) {\n        opts?.containingElement?.scrollIntoView?.({block: 'center', inline: 'center'});\n        targetElement.scrollIntoView?.({block: 'nearest'});\n      }\n    } else {\n      let scrollParent = getScrollParent(targetElement);\n      // If scrolling is prevented, we don't want to scroll the body since it might move the overlay partially offscreen and the user can't scroll it back into view.\n      while (targetElement && scrollParent && targetElement !== root && scrollParent !== root) {\n        scrollIntoView(scrollParent as HTMLElement, targetElement as HTMLElement);\n        targetElement = scrollParent;\n        scrollParent = getScrollParent(targetElement);\n      }\n    }\n  }\n}\n","/*\n * Copyright 2022 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isAndroid} from './platform';\n\n// Original licensing for the following method can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/blob/3c713d513195a53788b3f8bb4b70279d68b15bcc/packages/react-interactions/events/src/dom/shared/index.js#L74-L87\n\n// Keyboards, Assistive Technologies, and element.click() all produce a \"virtual\"\n// click event. This is a method of inferring such clicks. Every browser except\n// IE 11 only sets a zero value of \"detail\" for click events that are \"virtual\".\n// However, IE 11 uses a zero value for all click events. For IE 11 we rely on\n// the quirk that it produces click events that are of type PointerEvent, and\n// where only the \"virtual\" click lacks a pointerType field.\n\nexport function isVirtualClick(event: MouseEvent | PointerEvent): boolean {\n  // JAWS/NVDA with Firefox.\n  if ((event as any).mozInputSource === 0 && event.isTrusted) {\n    return true;\n  }\n\n  // Android TalkBack's detail value varies depending on the event listener providing the event so we have specific logic here instead\n  // If pointerType is defined, event is from a click listener. For events from mousedown listener, detail === 0 is a sufficient check\n  // to detect TalkBack virtual clicks.\n  if (isAndroid() && (event as PointerEvent).pointerType) {\n    return event.type === 'click' && event.buttons === 1;\n  }\n\n  return event.detail === 0 && !(event as PointerEvent).pointerType;\n}\n\nexport function isVirtualPointerEvent(event: PointerEvent) {\n  // If the pointer size is zero, then we assume it's from a screen reader.\n  // Android TalkBack double tap will sometimes return a event with width and height of 1\n  // and pointerType === 'mouse' so we need to check for a specific combination of event attributes.\n  // Cannot use \"event.pressure === 0\" as the sole check due to Safari pointer events always returning pressure === 0\n  // instead of .5, see https://bugs.webkit.org/show_bug.cgi?id=206216. event.pointerType === 'mouse' is to distingush\n  // Talkback double tap from Windows Firefox touch screen press\n  return (\n    (event.width === 0 && event.height === 0) ||\n    (event.width === 1 &&\n      event.height === 1 &&\n      event.pressure === 0 &&\n      event.detail === 0 &&\n      event.pointerType === 'mouse'\n    )\n  );\n}\n"]},"metadata":{},"sourceType":"module"}