{"ast":null,"code":"import _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _excluded = [\"shouldFocusWrap\"];\n\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; }\n\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; }\n\nimport { useId as $d6bQb$useId, mergeProps as $d6bQb$mergeProps, filterDOMProps as $d6bQb$filterDOMProps, useSlotId as $d6bQb$useSlotId } from \"@react-aria/utils\";\nimport { useLongPress as $d6bQb$useLongPress, usePress as $d6bQb$usePress, useHover as $d6bQb$useHover, isFocusVisible as $d6bQb$isFocusVisible } from \"@react-aria/interactions\";\nimport { useMessageFormatter as $d6bQb$useMessageFormatter } from \"@react-aria/i18n\";\nimport { useOverlayTrigger as $d6bQb$useOverlayTrigger } from \"@react-aria/overlays\";\nimport { useSelectableList as $d6bQb$useSelectableList, useSelectableItem as $d6bQb$useSelectableItem } from \"@react-aria/selection\";\nimport { getItemCount as $d6bQb$getItemCount } from \"@react-stately/collections\";\n\nfunction $parcel$interopDefault(a) {\n  return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$export(e, n, v, s) {\n  Object.defineProperty(e, n, {\n    get: v,\n    set: s,\n    enumerable: true,\n    configurable: true\n  });\n}\n\nvar $f00d7b16b5e8d6e2$exports = {};\n$parcel$export($f00d7b16b5e8d6e2$exports, \"useMenuTrigger\", function () {\n  return $f00d7b16b5e8d6e2$export$dc9c12ed27dd1b49;\n});\nvar $f51f2c62e1c6fa57$exports = {};\nvar $adce0112009aa371$exports = {};\n$adce0112009aa371$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة\\\"}\");\nvar $1d3f7d096c0dcb28$exports = {};\n$1d3f7d096c0dcb28$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто\\\"}\");\nvar $875ee72102062854$exports = {};\n$875ee72102062854$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku\\\"}\");\nvar $0b027ea084fd351f$exports = {};\n$0b027ea084fd351f$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Langt tryk eller tryk på Alt + pil ned for at åbne menuen\\\"}\");\nvar $24e42099aa962232$exports = {};\n$24e42099aa962232$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen\\\"}\");\nvar $8b22544240ef2695$exports = {};\n$8b22544240ef2695$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού\\\"}\");\nvar $1aba034f8273c2ea$exports = {};\n$1aba034f8273c2ea$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Long press or press Alt + ArrowDown to open menu\\\"}\");\nvar $1f635b4fc2c688b1$exports = {};\n$1f635b4fc2c688b1$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú\\\"}\");\nvar $1e07d5f0de12cbdf$exports = {};\n$1e07d5f0de12cbdf$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool\\\"}\");\nvar $139288a8fe39accd$exports = {};\n$139288a8fe39accd$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli\\\"}\");\nvar $3de19cb0f92fa482$exports = {};\n$3de19cb0f92fa482$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu.\\\"}\");\nvar $76d1f987700e29e7$exports = {};\n$76d1f987700e29e7$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט\\\"}\");\nvar $6a724f202d89d6c5$exports = {};\n$6a724f202d89d6c5$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika\\\"}\");\nvar $39924d5fb7e5765c$exports = {};\n$39924d5fb7e5765c$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához\\\"}\");\nvar $48ca9160c777b181$exports = {};\n$48ca9160c777b181$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Premere a lungo o premere Alt + Freccia giù per aprire il menu\\\"}\");\nvar $2b2fe8258874b24d$exports = {};\n$2b2fe8258874b24d$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"長押しまたは Alt+下矢印キーでメニューを開く\\\"}\");\nvar $7f3bcb0b01302e7d$exports = {};\n$7f3bcb0b01302e7d$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기\\\"}\");\nvar $717248addfa0b001$exports = {};\n$717248addfa0b001$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.\\\"}\");\nvar $250479c82d40d12f$exports = {};\n$250479c82d40d12f$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa\\\"}\");\nvar $b9ec90a40d5da860$exports = {};\n$b9ec90a40d5da860$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Langt trykk eller trykk Alt + PilNed for å åpne menyen\\\"}\");\nvar $84495c8c1264df78$exports = {};\n$84495c8c1264df78$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen\\\"}\");\nvar $1ed1c4abe05d869a$exports = {};\n$1ed1c4abe05d869a$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu\\\"}\");\nvar $6c0bba061244d14f$exports = {};\n$6c0bba061244d14f$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu\\\"}\");\nvar $f89477c065df8892$exports = {};\n$f89477c065df8892$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu\\\"}\");\nvar $8e1026548017f472$exports = {};\n$8e1026548017f472$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul\\\"}\");\nvar $5ffa595127e3e13b$exports = {};\n$5ffa595127e3e13b$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню\\\"}\");\nvar $c0307678aeb82973$exports = {};\n$c0307678aeb82973$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol\\\"}\");\nvar $00213556c76923e2$exports = {};\n$00213556c76923e2$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol\\\"}\");\nvar $cb21f39ff064ff18$exports = {};\n$cb21f39ff064ff18$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni\\\"}\");\nvar $f4f475fcd92bc63b$exports = {};\n$f4f475fcd92bc63b$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn\\\"}\");\nvar $599b86b59326de49$exports = {};\n$599b86b59326de49$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın\\\"}\");\nvar $dea30f1cbd6dd7fc$exports = {};\n$dea30f1cbd6dd7fc$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню\\\"}\");\nvar $95a8ccc80c41dac8$exports = {};\n$95a8ccc80c41dac8$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"长按或按 Alt + 向下方向键以打开菜单\\\"}\");\nvar $54a566c7316e6ef4$exports = {};\n$54a566c7316e6ef4$exports = JSON.parse(\"{\\\"longPressMessage\\\":\\\"長按或按 Alt+向下鍵以開啟功能表\\\"}\");\n$f51f2c62e1c6fa57$exports = {\n  \"ar-AE\": $adce0112009aa371$exports,\n  \"bg-BG\": $1d3f7d096c0dcb28$exports,\n  \"cs-CZ\": $875ee72102062854$exports,\n  \"da-DK\": $0b027ea084fd351f$exports,\n  \"de-DE\": $24e42099aa962232$exports,\n  \"el-GR\": $8b22544240ef2695$exports,\n  \"en-US\": $1aba034f8273c2ea$exports,\n  \"es-ES\": $1f635b4fc2c688b1$exports,\n  \"et-EE\": $1e07d5f0de12cbdf$exports,\n  \"fi-FI\": $139288a8fe39accd$exports,\n  \"fr-FR\": $3de19cb0f92fa482$exports,\n  \"he-IL\": $76d1f987700e29e7$exports,\n  \"hr-HR\": $6a724f202d89d6c5$exports,\n  \"hu-HU\": $39924d5fb7e5765c$exports,\n  \"it-IT\": $48ca9160c777b181$exports,\n  \"ja-JP\": $2b2fe8258874b24d$exports,\n  \"ko-KR\": $7f3bcb0b01302e7d$exports,\n  \"lt-LT\": $717248addfa0b001$exports,\n  \"lv-LV\": $250479c82d40d12f$exports,\n  \"nb-NO\": $b9ec90a40d5da860$exports,\n  \"nl-NL\": $84495c8c1264df78$exports,\n  \"pl-PL\": $1ed1c4abe05d869a$exports,\n  \"pt-BR\": $6c0bba061244d14f$exports,\n  \"pt-PT\": $f89477c065df8892$exports,\n  \"ro-RO\": $8e1026548017f472$exports,\n  \"ru-RU\": $5ffa595127e3e13b$exports,\n  \"sk-SK\": $c0307678aeb82973$exports,\n  \"sl-SI\": $00213556c76923e2$exports,\n  \"sr-SP\": $cb21f39ff064ff18$exports,\n  \"sv-SE\": $f4f475fcd92bc63b$exports,\n  \"tr-TR\": $599b86b59326de49$exports,\n  \"uk-UA\": $dea30f1cbd6dd7fc$exports,\n  \"zh-CN\": $95a8ccc80c41dac8$exports,\n  \"zh-TW\": $54a566c7316e6ef4$exports\n};\n\nfunction $f00d7b16b5e8d6e2$export$dc9c12ed27dd1b49(props, state, ref) {\n  var _props$type = props.type,\n      type = _props$type === void 0 ? 'menu' : _props$type,\n      isDisabled = props.isDisabled,\n      _props$trigger = props.trigger,\n      trigger = _props$trigger === void 0 ? 'press' : _props$trigger;\n  var menuTriggerId = $d6bQb$useId();\n\n  var _$d6bQb$useOverlayTri = $d6bQb$useOverlayTrigger({\n    type: type\n  }, state, ref),\n      triggerProps = _$d6bQb$useOverlayTri.triggerProps,\n      overlayProps = _$d6bQb$useOverlayTri.overlayProps;\n\n  var onKeyDown = function onKeyDown(e) {\n    if (isDisabled) return;\n    if (trigger === 'longPress' && !e.altKey) return;\n    if (ref && ref.current) switch (e.key) {\n      case 'Enter':\n      case ' ':\n        if (trigger === 'longPress') return;\n\n      case 'ArrowDown':\n        if (!('continuePropagation' in e)) e.stopPropagation();\n        e.preventDefault();\n        state.toggle('first');\n        break;\n\n      case 'ArrowUp':\n        if (!('continuePropagation' in e)) e.stopPropagation();\n        e.preventDefault();\n        state.toggle('last');\n        break;\n    }\n  };\n\n  var formatMessage = $d6bQb$useMessageFormatter($parcel$interopDefault($f51f2c62e1c6fa57$exports));\n\n  var _$d6bQb$useLongPress = $d6bQb$useLongPress({\n    accessibilityDescription: formatMessage('longPressMessage'),\n    onLongPressStart: function onLongPressStart() {\n      state.close();\n    },\n    onLongPress: function onLongPress() {\n      state.open('first');\n    }\n  }),\n      longPressProps = _$d6bQb$useLongPress.longPressProps;\n\n  var pressProps = {\n    onPressStart: function onPressStart(e) {\n      if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) state.toggle(e.pointerType === 'virtual' ? 'first' : null);\n    },\n    onPress: function onPress(e) {\n      if (e.pointerType === 'touch' && !isDisabled) state.toggle();\n    }\n  };\n  triggerProps = $d6bQb$mergeProps(triggerProps, trigger === 'press' ? pressProps : longPressProps);\n  return {\n    menuTriggerProps: _objectSpread(_objectSpread({}, triggerProps), {}, {\n      id: menuTriggerId,\n      onKeyDown: onKeyDown\n    }),\n    menuProps: _objectSpread(_objectSpread({}, overlayProps), {}, {\n      'aria-labelledby': menuTriggerId\n    })\n  };\n}\n\nvar $c227569f61491ba9$exports = {};\n$parcel$export($c227569f61491ba9$exports, \"useMenu\", function () {\n  return $c227569f61491ba9$export$38eaa17faae8f579;\n});\n\nfunction $c227569f61491ba9$export$38eaa17faae8f579(props, state, ref) {\n  var _props$shouldFocusWra = props.shouldFocusWrap,\n      shouldFocusWrap = _props$shouldFocusWra === void 0 ? true : _props$shouldFocusWra,\n      otherProps = _objectWithoutProperties(props, _excluded);\n\n  if (!props['aria-label'] && !props['aria-labelledby']) console.warn('An aria-label or aria-labelledby prop is required for accessibility.');\n  var domProps = $d6bQb$filterDOMProps(props, {\n    labelable: true\n  });\n\n  var _$d6bQb$useSelectable = $d6bQb$useSelectableList(_objectSpread(_objectSpread({}, otherProps), {}, {\n    ref: ref,\n    selectionManager: state.selectionManager,\n    collection: state.collection,\n    disabledKeys: state.disabledKeys,\n    shouldFocusWrap: shouldFocusWrap\n  })),\n      listProps = _$d6bQb$useSelectable.listProps;\n\n  return {\n    menuProps: $d6bQb$mergeProps(domProps, _objectSpread({\n      role: 'menu'\n    }, listProps))\n  };\n}\n\nvar $f9449620c639d150$exports = {};\n$parcel$export($f9449620c639d150$exports, \"useMenuItem\", function () {\n  return $f9449620c639d150$export$9d32628fc2aea7da;\n});\n\nfunction $f9449620c639d150$export$9d32628fc2aea7da(props, state, ref) {\n  var isSelected = props.isSelected,\n      isDisabled = props.isDisabled,\n      key = props.key,\n      onClose = props.onClose,\n      closeOnSelect = props.closeOnSelect,\n      isVirtualized = props.isVirtualized,\n      onAction = props.onAction;\n  var role = 'menuitem';\n  if (state.selectionManager.selectionMode === 'single') role = 'menuitemradio';else if (state.selectionManager.selectionMode === 'multiple') role = 'menuitemcheckbox';\n  var labelId = $d6bQb$useSlotId();\n  var descriptionId = $d6bQb$useSlotId();\n  var keyboardId = $d6bQb$useSlotId();\n  var ariaProps = {\n    'aria-disabled': isDisabled,\n    role: role,\n    'aria-label': props['aria-label'],\n    'aria-labelledby': labelId,\n    'aria-describedby': [descriptionId, keyboardId].filter(Boolean).join(' ') || undefined\n  };\n  if (state.selectionManager.selectionMode !== 'none') ariaProps['aria-checked'] = isSelected;\n\n  if (isVirtualized) {\n    ariaProps['aria-posinset'] = state.collection.getItem(key).index;\n    ariaProps['aria-setsize'] = $d6bQb$getItemCount(state.collection);\n  }\n\n  var onKeyDown = function onKeyDown(e) {\n    if (e.repeat) return;\n\n    switch (e.key) {\n      case ' ':\n        if (!isDisabled && state.selectionManager.selectionMode === 'none' && closeOnSelect !== false && onClose) onClose();\n        break;\n\n      case 'Enter':\n        if (!isDisabled && closeOnSelect !== false && onClose) onClose();\n        break;\n    }\n  };\n\n  var onPressStart = function onPressStart(e) {\n    if (e.pointerType === 'keyboard' && onAction) onAction(key);\n  };\n\n  var onPressUp = function onPressUp(e) {\n    if (e.pointerType !== 'keyboard') {\n      if (onAction) onAction(key);\n      if (onClose && (closeOnSelect != null ? closeOnSelect : state.selectionManager.selectionMode !== 'multiple')) onClose();\n    }\n  };\n\n  var _$d6bQb$useSelectable2 = $d6bQb$useSelectableItem({\n    selectionManager: state.selectionManager,\n    key: key,\n    ref: ref,\n    shouldSelectOnPressUp: true\n  }),\n      itemProps = _$d6bQb$useSelectable2.itemProps;\n\n  var _$d6bQb$usePress = $d6bQb$usePress({\n    onPressStart: onPressStart,\n    onPressUp: onPressUp,\n    isDisabled: isDisabled\n  }),\n      pressProps = _$d6bQb$usePress.pressProps;\n\n  var _$d6bQb$useHover = $d6bQb$useHover({\n    isDisabled: isDisabled,\n    onHoverStart: function onHoverStart() {\n      if (!$d6bQb$isFocusVisible()) {\n        state.selectionManager.setFocused(true);\n        state.selectionManager.setFocusedKey(key);\n      }\n    }\n  }),\n      hoverProps = _$d6bQb$useHover.hoverProps;\n\n  return {\n    menuItemProps: _objectSpread(_objectSpread({}, ariaProps), $d6bQb$mergeProps(itemProps, pressProps, hoverProps, {\n      onKeyDown: onKeyDown\n    })),\n    labelProps: {\n      id: labelId\n    },\n    descriptionProps: {\n      id: descriptionId\n    },\n    keyboardShortcutProps: {\n      id: keyboardId\n    }\n  };\n}\n\nvar $eb7748cf1d7e6885$exports = {};\n$parcel$export($eb7748cf1d7e6885$exports, \"useMenuSection\", function () {\n  return $eb7748cf1d7e6885$export$73f7a44322579622;\n});\n\nfunction $eb7748cf1d7e6885$export$73f7a44322579622(props) {\n  var heading = props.heading,\n      ariaLabel = props['aria-label'];\n  var headingId = $d6bQb$useId();\n  return {\n    itemProps: {\n      role: 'presentation'\n    },\n    headingProps: heading ? {\n      id: headingId,\n      'aria-hidden': true\n    } : {},\n    groupProps: {\n      role: 'group',\n      'aria-label': ariaLabel,\n      'aria-labelledby': heading ? headingId : undefined\n    }\n  };\n}\n\nexport { $f00d7b16b5e8d6e2$export$dc9c12ed27dd1b49 as useMenuTrigger, $c227569f61491ba9$export$38eaa17faae8f579 as useMenu, $f9449620c639d150$export$9d32628fc2aea7da as useMenuItem, $eb7748cf1d7e6885$export$73f7a44322579622 as useMenuSection };","map":{"version":3,"sources":["packages/@react-aria/menu/src/useMenuTrigger.ts","packages/@react-aria/menu/intl/*.js","packages/@react-aria/menu/intl/ar-AE.json","packages/@react-aria/menu/intl/bg-BG.json","packages/@react-aria/menu/intl/cs-CZ.json","packages/@react-aria/menu/intl/da-DK.json","packages/@react-aria/menu/intl/de-DE.json","packages/@react-aria/menu/intl/el-GR.json","packages/@react-aria/menu/intl/en-US.json","packages/@react-aria/menu/intl/es-ES.json","packages/@react-aria/menu/intl/et-EE.json","packages/@react-aria/menu/intl/fi-FI.json","packages/@react-aria/menu/intl/fr-FR.json","packages/@react-aria/menu/intl/he-IL.json","packages/@react-aria/menu/intl/hr-HR.json","packages/@react-aria/menu/intl/hu-HU.json","packages/@react-aria/menu/intl/it-IT.json","packages/@react-aria/menu/intl/ja-JP.json","packages/@react-aria/menu/intl/ko-KR.json","packages/@react-aria/menu/intl/lt-LT.json","packages/@react-aria/menu/intl/lv-LV.json","packages/@react-aria/menu/intl/nb-NO.json","packages/@react-aria/menu/intl/nl-NL.json","packages/@react-aria/menu/intl/pl-PL.json","packages/@react-aria/menu/intl/pt-BR.json","packages/@react-aria/menu/intl/pt-PT.json","packages/@react-aria/menu/intl/ro-RO.json","packages/@react-aria/menu/intl/ru-RU.json","packages/@react-aria/menu/intl/sk-SK.json","packages/@react-aria/menu/intl/sl-SI.json","packages/@react-aria/menu/intl/sr-SP.json","packages/@react-aria/menu/intl/sv-SE.json","packages/@react-aria/menu/intl/tr-TR.json","packages/@react-aria/menu/intl/uk-UA.json","packages/@react-aria/menu/intl/zh-CN.json","packages/@react-aria/menu/intl/zh-TW.json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,OAAL,GAAyC,KAAzC,CAAK,OAAL;AAAA,MAA4B,SAA5B,GAAyC,KAAzC,CAAc,YAAd;AACA,MAAI,SAAS,GAAG,YAAK,EAArB;AAEA,SAAO;AACL,IAAA,SAAS,EAAE;AACT,MAAA,IAAI,EAAE;AADG,KADN;AAIL,IAAA,YAAY,EAAE,OAAO,GAAG;AAItB,MAAA,EAAE,EAAE,SAJkB;AAKtB,qBAAe;AALO,KAAH,GAMjB,EAVC;AAWL,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,OADI;AAEV,oBAAc,SAFJ;AAGV,yBAAmB,OAAO,GAAG,SAAH,GAAe;AAH/B;AAXP,GAAP;AAiBD","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 {AriaButtonProps} from '@react-types/button';\nimport {HTMLAttributes, RefObject} from 'react';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {MenuTriggerState} from '@react-stately/menu';\nimport {MenuTriggerType} from '@react-types/menu';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport {useLongPress} from '@react-aria/interactions';\nimport {useMessageFormatter} from '@react-aria/i18n';\nimport {useOverlayTrigger} from '@react-aria/overlays';\n\ninterface MenuTriggerAriaProps {\n  /** The type of menu that the menu trigger opens. */\n  type?: 'menu' | 'listbox',\n  /** Whether menu trigger is disabled. */\n  isDisabled?: boolean,\n  /** How menu is triggered. */\n  trigger?: MenuTriggerType\n}\n\ninterface MenuTriggerAria {\n  /** Props for the menu trigger element. */\n  menuTriggerProps: AriaButtonProps,\n\n  /** Props for the menu. */\n  menuProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a menu trigger.\n * @param props - Props for the menu trigger.\n * @param state - State for the menu trigger.\n */\nexport function useMenuTrigger(props: MenuTriggerAriaProps, state: MenuTriggerState, ref: RefObject<HTMLElement>): MenuTriggerAria {\n  let {\n    type = 'menu' as MenuTriggerAriaProps['type'],\n    isDisabled,\n    trigger = 'press'\n  } = props;\n\n  let menuTriggerId = useId();\n  let {triggerProps, overlayProps} = useOverlayTrigger({type}, state, ref);\n\n  let onKeyDown = (e) => {\n    if (isDisabled) {\n      return;\n    }\n\n    if (trigger === 'longPress' && !e.altKey) {\n      return;\n    }\n\n    if (ref && ref.current) {\n      switch (e.key) {\n        case 'Enter':\n        case ' ':\n          if (trigger === 'longPress') {\n            return;\n          }\n          // fallthrough\n        case 'ArrowDown':\n          // Stop propagation, unless it would already be handled by useKeyboard.\n          if (!('continuePropagation' in e)) {\n            e.stopPropagation();\n          }\n          e.preventDefault();\n          state.toggle('first');\n          break;\n        case 'ArrowUp':\n          if (!('continuePropagation' in e)) {\n            e.stopPropagation();\n          }\n          e.preventDefault();\n          state.toggle('last');\n          break;\n      }\n    }\n  };\n\n  let formatMessage = useMessageFormatter(intlMessages);\n  let {longPressProps} = useLongPress({\n    accessibilityDescription: formatMessage('longPressMessage'),\n    onLongPressStart() {\n      state.close();\n    },\n    onLongPress() {\n      state.open('first');\n    }\n  });\n\n  let pressProps =  {\n    onPressStart(e) {\n      // For consistency with native, open the menu on mouse/key down, but touch up.\n      if (e.pointerType !== 'touch' && e.pointerType !== 'keyboard' && !isDisabled) {\n        // If opened with a screen reader, auto focus the first item.\n        // Otherwise, the menu itself will be focused.\n        state.toggle(e.pointerType === 'virtual' ? 'first' : null);\n      }\n    },\n    onPress(e) {\n      if (e.pointerType === 'touch' && !isDisabled) {\n        state.toggle();\n      }\n    }\n  };\n\n  triggerProps = mergeProps(triggerProps, trigger === 'press' ? pressProps : longPressProps);\n\n  return {\n    menuTriggerProps: {\n      ...triggerProps,\n      id: menuTriggerId,\n      onKeyDown\n    },\n    menuProps: {\n      ...overlayProps,\n      'aria-labelledby': menuTriggerId\n    }\n  };\n}\n","const _temp0 = require(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./zh-TW.json\");\nmodule.exports = {\n  \"ar-AE\": _temp0,\n  \"bg-BG\": _temp1,\n  \"cs-CZ\": _temp2,\n  \"da-DK\": _temp3,\n  \"de-DE\": _temp4,\n  \"el-GR\": _temp5,\n  \"en-US\": _temp6,\n  \"es-ES\": _temp7,\n  \"et-EE\": _temp8,\n  \"fi-FI\": _temp9,\n  \"fr-FR\": _temp10,\n  \"he-IL\": _temp11,\n  \"hr-HR\": _temp12,\n  \"hu-HU\": _temp13,\n  \"it-IT\": _temp14,\n  \"ja-JP\": _temp15,\n  \"ko-KR\": _temp16,\n  \"lt-LT\": _temp17,\n  \"lv-LV\": _temp18,\n  \"nb-NO\": _temp19,\n  \"nl-NL\": _temp20,\n  \"pl-PL\": _temp21,\n  \"pt-BR\": _temp22,\n  \"pt-PT\": _temp23,\n  \"ro-RO\": _temp24,\n  \"ru-RU\": _temp25,\n  \"sk-SK\": _temp26,\n  \"sl-SI\": _temp27,\n  \"sr-SP\": _temp28,\n  \"sv-SE\": _temp29,\n  \"tr-TR\": _temp30,\n  \"uk-UA\": _temp31,\n  \"zh-CN\": _temp32,\n  \"zh-TW\": _temp33\n}","{\n  \"longPressMessage\": \"اضغط مطولاً أو اضغط على Alt + السهم لأسفل لفتح القائمة\"\n}\n","{\n  \"longPressMessage\": \"Натиснете продължително или натиснете Alt+ стрелка надолу, за да отворите менюто\"\n}\n","{\n  \"longPressMessage\": \"Dlouhým stiskem nebo stisknutím kláves Alt + šipka dolů otevřete nabídku\"\n}\n","{\n  \"longPressMessage\": \"Langt tryk eller tryk på Alt + pil ned for at åbne menuen\"\n}\n","{\n  \"longPressMessage\": \"Drücken Sie lange oder drücken Sie Alt + Nach-unten, um das Menü zu öffnen\"\n}\n","{\n  \"longPressMessage\": \"Πιέστε παρατεταμένα ή πατήστε Alt + κάτω βέλος για να ανοίξετε το μενού\"\n}\n","{\n  \"longPressMessage\": \"Long press or press Alt + ArrowDown to open menu\"\n}\n","{\n  \"longPressMessage\": \"Mantenga pulsado o pulse Alt + flecha abajo para abrir el menú\"\n}\n","{\n  \"longPressMessage\": \"Menüü avamiseks vajutage pikalt või vajutage klahve Alt + allanool\"\n}\n","{\n  \"longPressMessage\": \"Avaa valikko painamalla pohjassa tai näppäinyhdistelmällä Alt + Alanuoli\"\n}\n","{\n  \"longPressMessage\": \"Appuyez de manière prolongée ou appuyez sur Alt + Flèche vers le bas pour ouvrir le menu.\"\n}\n","{\n  \"longPressMessage\": \"לחץ לחיצה ארוכה או הקש Alt + ArrowDown כדי לפתוח את התפריט\"\n}\n","{\n  \"longPressMessage\": \"Dugo pritisnite ili pritisnite Alt + strelicu prema dolje za otvaranje izbornika\"\n}\n","{\n  \"longPressMessage\": \"Nyomja meg hosszan, vagy nyomja meg az Alt + lefele nyíl gombot a menü megnyitásához\"\n}\n","{\n  \"longPressMessage\": \"Premere a lungo o premere Alt + Freccia giù per aprire il menu\"\n}\n","{\n  \"longPressMessage\": \"長押しまたは Alt+下矢印キーでメニューを開く\"\n}\n","{\n  \"longPressMessage\": \"길게 누르거나 Alt + 아래쪽 화살표를 눌러 메뉴 열기\"\n}\n","{\n  \"longPressMessage\": \"Norėdami atidaryti meniu, nuspaudę palaikykite arba paspauskite „Alt + ArrowDown“.\"\n}\n","{\n  \"longPressMessage\": \"Lai atvērtu izvēlni, turiet nospiestu vai nospiediet taustiņu kombināciju Alt + lejupvērstā bultiņa\"\n}\n","{\n  \"longPressMessage\": \"Langt trykk eller trykk Alt + PilNed for å åpne menyen\"\n}\n","{\n  \"longPressMessage\": \"Druk lang op Alt + pijl-omlaag of druk op Alt om het menu te openen\"\n}\n","{\n  \"longPressMessage\": \"Naciśnij i przytrzymaj lub naciśnij klawisze Alt + Strzałka w dół, aby otworzyć menu\"\n}\n","{\n  \"longPressMessage\": \"Pressione e segure ou pressione Alt + Seta para baixo para abrir o menu\"\n}\n","{\n  \"longPressMessage\": \"Prima continuamente ou prima Alt + Seta Para Baixo para abrir o menu\"\n}\n","{\n  \"longPressMessage\": \"Apăsați lung sau apăsați pe Alt + săgeată în jos pentru a deschide meniul\"\n}\n","{\n  \"longPressMessage\": \"Нажмите и удерживайте или нажмите Alt + Стрелка вниз, чтобы открыть меню\"\n}\n","{\n  \"longPressMessage\": \"Ponuku otvoríte dlhým stlačením alebo stlačením klávesu Alt + klávesu so šípkou nadol\"\n}\n","{\n  \"longPressMessage\": \"Za odprtje menija pritisnite in držite gumb ali pritisnite Alt+puščica navzdol\"\n}\n","{\n  \"longPressMessage\": \"Dugo pritisnite ili pritisnite Alt + strelicu prema dole da otvorite meni\"\n}\n","{\n  \"longPressMessage\": \"Håll nedtryckt eller tryck på Alt + pil nedåt för att öppna menyn\"\n}\n","{\n  \"longPressMessage\": \"Menüyü açmak için uzun basın veya Alt + Aşağı Ok tuşuna basın\"\n}\n","{\n  \"longPressMessage\": \"Довго або звичайно натисніть комбінацію клавіш Alt і стрілка вниз, щоб відкрити меню\"\n}\n","{\n  \"longPressMessage\": \"长按或按 Alt + 向下方向键以打开菜单\"\n}\n","{\n  \"longPressMessage\": \"長按或按 Alt+向下鍵以開啟功能表\"\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 {AriaMenuProps} from '@react-types/menu';\nimport {filterDOMProps, mergeProps} from '@react-aria/utils';\nimport {HTMLAttributes, RefObject} from 'react';\nimport {KeyboardDelegate} from '@react-types/shared';\nimport {TreeState} from '@react-stately/tree';\nimport {useSelectableList} from '@react-aria/selection';\n\ninterface MenuAria {\n  /** Props for the menu element. */\n  menuProps: HTMLAttributes<HTMLElement>\n}\n\ninterface AriaMenuOptions<T> extends AriaMenuProps<T> {\n  /** Whether the menu uses virtual scrolling. */\n  isVirtualized?: boolean,\n\n  /**\n   * An optional keyboard delegate implementation for type to select,\n   * to override the default.\n   */\n  keyboardDelegate?: KeyboardDelegate\n}\n\n/**\n * Provides the behavior and accessibility implementation for a menu component.\n * A menu displays a list of actions or options that a user can choose.\n * @param props - Props for the menu.\n * @param state - State for the menu, as returned by `useListState`.\n */\nexport function useMenu<T>(props: AriaMenuOptions<T>, state: TreeState<T>, ref: RefObject<HTMLElement>): MenuAria {\n  let {\n    shouldFocusWrap = true,\n    ...otherProps\n  } = props;\n\n  if (!props['aria-label'] && !props['aria-labelledby']) {\n    console.warn('An aria-label or aria-labelledby prop is required for accessibility.');\n  }\n\n  let domProps = filterDOMProps(props, {labelable: true});\n  let {listProps} = useSelectableList({\n    ...otherProps,\n    ref,\n    selectionManager: state.selectionManager,\n    collection: state.collection,\n    disabledKeys: state.disabledKeys,\n    shouldFocusWrap\n  });\n\n  return {\n    menuProps: mergeProps(domProps, {\n      role: 'menu',\n      ...listProps\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 {getItemCount} from '@react-stately/collections';\nimport {HTMLAttributes, Key, RefObject} from 'react';\nimport {isFocusVisible, useHover, usePress} from '@react-aria/interactions';\nimport {mergeProps, useSlotId} from '@react-aria/utils';\nimport {PressEvent} from '@react-types/shared';\nimport {TreeState} from '@react-stately/tree';\nimport {useSelectableItem} from '@react-aria/selection';\n\ninterface MenuItemAria {\n  /** Props for the menu item element. */\n  menuItemProps: HTMLAttributes<HTMLElement>,\n\n  /** Props for the main text element inside the menu item. */\n  labelProps: HTMLAttributes<HTMLElement>,\n\n  /** Props for the description text element inside the menu item, if any. */\n  descriptionProps: HTMLAttributes<HTMLElement>,\n\n  /** Props for the keyboard shortcut text element inside the item, if any. */\n  keyboardShortcutProps: HTMLAttributes<HTMLElement>\n}\n\ninterface AriaMenuItemProps {\n  /** Whether the menu item is disabled. */\n  isDisabled?: boolean,\n\n  /** Whether the menu item is selected. */\n  isSelected?: boolean,\n\n  /** A screen reader only label for the menu item. */\n  'aria-label'?: string,\n\n  /** The unique key for the menu item. */\n  key?: Key,\n\n  /** Handler that is called when the menu should close after selecting an item. */\n  onClose?: () => void,\n\n  /**\n   * Whether the menu should close when the menu item is selected.\n   * @default true\n   */\n  closeOnSelect?: boolean,\n\n  /** Whether the menu item is contained in a virtual scrolling menu. */\n  isVirtualized?: boolean,\n\n  /** Handler that is called when the user activates the item. */\n  onAction?: (key: Key) => void\n}\n\n/**\n * Provides the behavior and accessibility implementation for an item in a menu.\n * See `useMenu` for more details about menus.\n * @param props - Props for the item.\n * @param state - State for the menu, as returned by `useTreeState`.\n */\nexport function useMenuItem<T>(props: AriaMenuItemProps, state: TreeState<T>, ref: RefObject<HTMLElement>): MenuItemAria {\n  let {\n    isSelected,\n    isDisabled,\n    key,\n    onClose,\n    closeOnSelect,\n    isVirtualized,\n    onAction\n  } = props;\n\n  let role = 'menuitem';\n  if (state.selectionManager.selectionMode === 'single') {\n    role = 'menuitemradio';\n  } else if (state.selectionManager.selectionMode === 'multiple') {\n    role = 'menuitemcheckbox';\n  }\n\n  let labelId = useSlotId();\n  let descriptionId = useSlotId();\n  let keyboardId = useSlotId();\n\n  let ariaProps = {\n    'aria-disabled': isDisabled,\n    role,\n    'aria-label': props['aria-label'],\n    'aria-labelledby': labelId,\n    'aria-describedby': [descriptionId, keyboardId].filter(Boolean).join(' ') || undefined\n  };\n\n  if (state.selectionManager.selectionMode !== 'none') {\n    ariaProps['aria-checked'] = isSelected;\n  }\n\n  if (isVirtualized) {\n    ariaProps['aria-posinset'] = state.collection.getItem(key).index;\n    ariaProps['aria-setsize'] = getItemCount(state.collection);\n  }\n\n  let onKeyDown = (e: KeyboardEvent) => {\n    // Ignore repeating events, which may have started on the menu trigger before moving\n    // focus to the menu item. We want to wait for a second complete key press sequence.\n    if (e.repeat) {\n      return;\n    }\n\n    switch (e.key) {\n      case ' ':\n        if (!isDisabled && state.selectionManager.selectionMode === 'none' && closeOnSelect !== false && onClose) {\n          onClose();\n        }\n        break;\n      case 'Enter':\n        // The Enter key should always close on select, except if overridden.\n        if (!isDisabled && closeOnSelect !== false && onClose) {\n          onClose();\n        }\n        break;\n    }\n  };\n\n  let onPressStart = (e: PressEvent) => {\n    if (e.pointerType === 'keyboard' && onAction) {\n      onAction(key);\n    }\n  };\n\n  let onPressUp = (e: PressEvent) => {\n    if (e.pointerType !== 'keyboard') {\n      if (onAction) {\n        onAction(key);\n      }\n\n      // Pressing a menu item should close by default in single selection mode but not multiple\n      // selection mode, except if overridden by the closeOnSelect prop.\n      if (onClose && (closeOnSelect ?? state.selectionManager.selectionMode !== 'multiple')) {\n        onClose();\n      }\n    }\n  };\n\n  let {itemProps} = useSelectableItem({\n    selectionManager: state.selectionManager,\n    key,\n    ref,\n    shouldSelectOnPressUp: true\n  });\n\n  let {pressProps} = usePress({onPressStart, onPressUp, isDisabled});\n  let {hoverProps} = useHover({\n    isDisabled,\n    onHoverStart() {\n      if (!isFocusVisible()) {\n        state.selectionManager.setFocused(true);\n        state.selectionManager.setFocusedKey(key);\n      }\n    }\n  });\n\n  return {\n    menuItemProps: {\n      ...ariaProps,\n      ...mergeProps(itemProps, pressProps, hoverProps, {onKeyDown})\n    },\n    labelProps: {\n      id: labelId\n    },\n    descriptionProps: {\n      id: descriptionId\n    },\n    keyboardShortcutProps: {\n      id: keyboardId\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 {HTMLAttributes, ReactNode} from 'react';\nimport {useId} from '@react-aria/utils';\n\ninterface AriaMenuSectionProps {\n  /** The heading for the section. */\n  heading?: ReactNode,\n  /** An accessibility label for the section. Required if `heading` is not present. */\n  'aria-label'?: string\n}\n\ninterface MenuSectionAria {\n  /** Props for the wrapper list item. */\n  itemProps: HTMLAttributes<HTMLElement>,\n\n  /** Props for the heading element, if any. */\n  headingProps: HTMLAttributes<HTMLElement>,\n\n  /** Props for the group element. */\n  groupProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the behavior and accessibility implementation for a section in a menu.\n * See `useMenu` for more details about menus.\n * @param props - Props for the section.\n */\nexport function useMenuSection(props: AriaMenuSectionProps): MenuSectionAria {\n  let {heading, 'aria-label': ariaLabel} = props;\n  let headingId = useId();\n\n  return {\n    itemProps: {\n      role: 'presentation'\n    },\n    headingProps: heading ? {\n      // Techincally, menus cannot contain headings according to ARIA.\n      // We hide the heading from assistive technology, and only use it\n      // as a label for the nested group.\n      id: headingId,\n      'aria-hidden': true\n    } : {},\n    groupProps: {\n      role: 'group',\n      'aria-label': ariaLabel,\n      'aria-labelledby': heading ? headingId : undefined\n    }\n  };\n}\n"]},"metadata":{},"sourceType":"module"}