@eightshift/ui-components 6.3.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (973) hide show
  1. package/dist/Button-h6xF_WrP.js +225 -0
  2. package/dist/Dialog-i5VLQw1o.js +2488 -0
  3. package/dist/Disclosure-NYWFw9RJ.js +188 -0
  4. package/dist/FieldError-BWDbP5Db.js +213 -0
  5. package/dist/FocusScope-CgwbGOBB.js +746 -0
  6. package/dist/Form-DTMkbrQY.js +5 -0
  7. package/dist/Heading-Hol-wS_B.js +16 -0
  8. package/dist/Hidden-8TB37dpK.js +51 -0
  9. package/dist/Input-BURqyJXW.js +161 -0
  10. package/dist/Label-DFXXxMKY.js +17 -0
  11. package/dist/List-CMK5qsNF.js +506 -0
  12. package/dist/ListBox-B21SgugS.js +601 -0
  13. package/dist/NumberFormatter-m5VW6MTK.js +122 -0
  14. package/dist/OverlayArrow-BoloUPQM.js +573 -0
  15. package/dist/PortalProvider-DinZZCKX.js +14 -0
  16. package/dist/RSPContexts-C_z0bI8W.js +12 -0
  17. package/dist/RadioGroup-BwlGtCja.js +329 -0
  18. package/dist/SearchField-DR_I4_yn.js +765 -0
  19. package/dist/SelectionIndicator-31L6EI9F.js +13 -0
  20. package/dist/SelectionManager-B8lLv6Ue.js +2176 -0
  21. package/dist/Slider-DW1RuMVp.js +827 -0
  22. package/dist/Text-O6VBBDlP.js +16 -0
  23. package/dist/VisuallyHidden-CfsnJHZb.js +43 -0
  24. package/dist/animation-Bd2peown.js +62 -0
  25. package/dist/assets/style-admin.css +197 -200
  26. package/dist/assets/style-editor.css +197 -200
  27. package/dist/assets/style.css +197 -200
  28. package/dist/build-module-sxK3nxOK.js +855 -0
  29. package/dist/button-COTeluL8.js +524 -0
  30. package/dist/checkbox-D0AWkLhp.js +338 -0
  31. package/dist/clsx-BUU5J41u.js +16 -0
  32. package/dist/color-swatch-CBYsO_Zs.js +2572 -0
  33. package/dist/components/animated-visibility/animated-visibility.js +87 -111
  34. package/dist/components/base-control/base-control.js +73 -86
  35. package/dist/components/base-control/container.js +199 -227
  36. package/dist/components/breakpoint-preview/breakpoint-preview.js +162 -158
  37. package/dist/components/button/button.js +3 -580
  38. package/dist/components/checkbox/checkbox.js +2 -391
  39. package/dist/components/color-pickers/color-picker.js +172 -276
  40. package/dist/components/color-pickers/color-swatch.js +3 -7
  41. package/dist/components/color-pickers/gradient-editor.js +4 -552
  42. package/dist/components/color-pickers/solid-color-picker.js +3 -1710
  43. package/dist/components/component-toggle/component-toggle.js +107 -160
  44. package/dist/components/container-panel/container-panel.js +94 -151
  45. package/dist/components/draggable/draggable-context.js +4 -4
  46. package/dist/components/draggable/draggable-handle.js +27 -43
  47. package/dist/components/draggable/draggable.js +3 -7638
  48. package/dist/components/draggable-list/draggable-list-context.js +4 -4
  49. package/dist/components/draggable-list/draggable-list-item.js +63 -80
  50. package/dist/components/draggable-list/draggable-list.js +115 -142
  51. package/dist/components/expandable/expandable.js +105 -407
  52. package/dist/components/index.js +30 -106
  53. package/dist/components/input-field/input-field.js +2 -326
  54. package/dist/components/item-collection/item-collection.js +50 -56
  55. package/dist/components/layout/hstack.js +27 -29
  56. package/dist/components/layout/vstack.js +27 -29
  57. package/dist/components/link-input/link-input.js +3 -1943
  58. package/dist/components/matrix-align/matrix-align.js +127 -161
  59. package/dist/components/menu/menu.js +253 -356
  60. package/dist/components/modal/modal.js +3 -399
  61. package/dist/components/notice/notice.js +99 -139
  62. package/dist/components/number-picker/number-picker.js +3 -344
  63. package/dist/components/option-select/option-select.js +226 -404
  64. package/dist/components/options-panel/options-panel.js +138 -175
  65. package/dist/components/placeholders/file-picker-shell.js +91 -141
  66. package/dist/components/placeholders/file-placeholder.js +41 -53
  67. package/dist/components/placeholders/image-placeholder.js +65 -96
  68. package/dist/components/placeholders/media-placeholder.js +65 -68
  69. package/dist/components/popover/popover.js +147 -221
  70. package/dist/components/portal-provider/portal-provider.js +23 -21
  71. package/dist/components/radio/radio.js +246 -294
  72. package/dist/components/repeater/repeater-context.js +4 -4
  73. package/dist/components/repeater/repeater-item.js +95 -114
  74. package/dist/components/repeater/repeater.js +221 -278
  75. package/dist/components/responsive/mini-responsive.js +403 -495
  76. package/dist/components/responsive/responsive-legacy.js +271 -336
  77. package/dist/components/responsive/responsive.js +445 -562
  78. package/dist/components/responsive-preview/responsive-preview.js +94 -117
  79. package/dist/components/rich-label/rich-label.js +80 -75
  80. package/dist/components/select/async-multi-select.js +360 -589
  81. package/dist/components/select/async-select.js +284 -492
  82. package/dist/components/select/multi-select.js +340 -552
  83. package/dist/components/select/shared.js +3 -17
  84. package/dist/components/select/single-select.js +278 -475
  85. package/dist/components/select/styles.js +84 -0
  86. package/dist/components/slider/column-config-slider.js +170 -301
  87. package/dist/components/slider/slider.js +258 -405
  88. package/dist/components/slider/utils.js +77 -121
  89. package/dist/components/smart-image/image-analysis-worker.js +128 -0
  90. package/dist/components/smart-image/smart-image.js +3 -205
  91. package/dist/components/smart-image/worker-inline.js +4 -4
  92. package/dist/components/spacer/spacer.js +80 -94
  93. package/dist/components/tabs/tabs.js +3 -1051
  94. package/dist/components/toggle/switch.js +2 -295
  95. package/dist/components/toggle/toggle.js +54 -64
  96. package/dist/components/toggle-button/toggle-button.js +2 -451
  97. package/dist/components/tooltip/tooltip.js +2 -535
  98. package/dist/context-C-XNeJ_l.js +93 -0
  99. package/dist/debounce-throttle-DXxSAKpq.js +120 -0
  100. package/dist/dist-DIK9pFxO.js +55 -0
  101. package/dist/draggable-CYQyD9gG.js +6961 -0
  102. package/dist/es-dash-HqXWZZ3_.js +303 -0
  103. package/dist/filterDOMProps-_2_3GD-K.js +69 -0
  104. package/dist/general-D-7dwhuF.js +4277 -0
  105. package/dist/gradient-editor-DbH8NU2p.js +604 -0
  106. package/dist/icons/block-icon.js +34 -39
  107. package/dist/icons/generated-icon-loaders.js +759 -0
  108. package/dist/icons/generic-color-swatch.js +81 -111
  109. package/dist/icons/icon.js +67 -0
  110. package/dist/icons/icons.js +218 -3656
  111. package/dist/icons/index.js +756 -10
  112. package/dist/icons/internal.js +758 -0
  113. package/dist/icons/jsx-svg.js +2 -94
  114. package/dist/icons/spinner.js +16 -18
  115. package/dist/icons/ui-icons/a11y-warning.js +34 -0
  116. package/dist/icons/ui-icons/a11y.js +29 -0
  117. package/dist/icons/ui-icons/accelerometer.js +51 -0
  118. package/dist/icons/ui-icons/activity-log.js +53 -0
  119. package/dist/icons/ui-icons/add.js +20 -0
  120. package/dist/icons/ui-icons/alert.js +31 -0
  121. package/dist/icons/ui-icons/align-horizontal-vertical-alt.js +37 -0
  122. package/dist/icons/ui-icons/align-horizontal-vertical-alt2.js +36 -0
  123. package/dist/icons/ui-icons/align-horizontal-vertical.js +34 -0
  124. package/dist/icons/ui-icons/alt-text-generic-alt.js +19 -0
  125. package/dist/icons/ui-icons/alt-text-generic.js +25 -0
  126. package/dist/icons/ui-icons/alt-text.js +36 -0
  127. package/dist/icons/ui-icons/anchor-page.js +44 -0
  128. package/dist/icons/ui-icons/anchor.js +28 -0
  129. package/dist/icons/ui-icons/angle.js +24 -0
  130. package/dist/icons/ui-icons/animation-file.js +66 -0
  131. package/dist/icons/ui-icons/animation-generic.js +36 -0
  132. package/dist/icons/ui-icons/animation-list-generic.js +41 -0
  133. package/dist/icons/ui-icons/animation-settings-generic.js +41 -0
  134. package/dist/icons/ui-icons/animation.js +55 -0
  135. package/dist/icons/ui-icons/archive-file.js +24 -0
  136. package/dist/icons/ui-icons/archive.js +39 -0
  137. package/dist/icons/ui-icons/aria-label.js +42 -0
  138. package/dist/icons/ui-icons/arrow-down-circle-alt.js +28 -0
  139. package/dist/icons/ui-icons/arrow-down-circle.js +28 -0
  140. package/dist/icons/ui-icons/arrow-down-square-alt.js +28 -0
  141. package/dist/icons/ui-icons/arrow-down-square.js +28 -0
  142. package/dist/icons/ui-icons/arrow-down.js +20 -0
  143. package/dist/icons/ui-icons/arrow-left-circle-alt.js +28 -0
  144. package/dist/icons/ui-icons/arrow-left-circle.js +28 -0
  145. package/dist/icons/ui-icons/arrow-left-square-alt.js +28 -0
  146. package/dist/icons/ui-icons/arrow-left-square.js +28 -0
  147. package/dist/icons/ui-icons/arrow-left.js +20 -0
  148. package/dist/icons/ui-icons/arrow-right-circle-alt.js +28 -0
  149. package/dist/icons/ui-icons/arrow-right-circle.js +28 -0
  150. package/dist/icons/ui-icons/arrow-right-square-alt.js +28 -0
  151. package/dist/icons/ui-icons/arrow-right-square.js +28 -0
  152. package/dist/icons/ui-icons/arrow-right.js +20 -0
  153. package/dist/icons/ui-icons/arrow-up-circle-alt.js +28 -0
  154. package/dist/icons/ui-icons/arrow-up-circle.js +28 -0
  155. package/dist/icons/ui-icons/arrow-up-square-alt.js +28 -0
  156. package/dist/icons/ui-icons/arrow-up-square.js +28 -0
  157. package/dist/icons/ui-icons/arrow-up.js +20 -0
  158. package/dist/icons/ui-icons/arrows-down.js +38 -0
  159. package/dist/icons/ui-icons/arrows-horizontal.js +20 -0
  160. package/dist/icons/ui-icons/arrows-left-diagonal.js +20 -0
  161. package/dist/icons/ui-icons/arrows-left.js +38 -0
  162. package/dist/icons/ui-icons/arrows-right-diagonal.js +20 -0
  163. package/dist/icons/ui-icons/arrows-right.js +38 -0
  164. package/dist/icons/ui-icons/arrows-up.js +38 -0
  165. package/dist/icons/ui-icons/arrows-vertical.js +20 -0
  166. package/dist/icons/ui-icons/aspect-ratio-auto.js +38 -0
  167. package/dist/icons/ui-icons/aspect-ratio-nine-sixteen.js +28 -0
  168. package/dist/icons/ui-icons/aspect-ratio-sixteen-nine.js +28 -0
  169. package/dist/icons/ui-icons/aspect-ratio-square.js +28 -0
  170. package/dist/icons/ui-icons/aspect-ratio-three-two.js +28 -0
  171. package/dist/icons/ui-icons/aspect-ratio-twenty-one-nine.js +28 -0
  172. package/dist/icons/ui-icons/aspect-ratio.js +27 -0
  173. package/dist/icons/ui-icons/attachment.js +19 -0
  174. package/dist/icons/ui-icons/auto-close.js +26 -0
  175. package/dist/icons/ui-icons/auto-pause-scroll.js +39 -0
  176. package/dist/icons/ui-icons/auto-pause.js +26 -0
  177. package/dist/icons/ui-icons/automatic-alt.js +19 -0
  178. package/dist/icons/ui-icons/automatic.js +20 -0
  179. package/dist/icons/ui-icons/autoplay-alt.js +34 -0
  180. package/dist/icons/ui-icons/autoplay-alt2.js +23 -0
  181. package/dist/icons/ui-icons/autoplay.js +36 -0
  182. package/dist/icons/ui-icons/award.js +39 -0
  183. package/dist/icons/ui-icons/background-blur.js +66 -0
  184. package/dist/icons/ui-icons/background-color-swatch.js +48 -0
  185. package/dist/icons/ui-icons/background-image.js +41 -0
  186. package/dist/icons/ui-icons/background-repeat.js +95 -0
  187. package/dist/icons/ui-icons/background-type-alt.js +38 -0
  188. package/dist/icons/ui-icons/background-type-alt2.js +27 -0
  189. package/dist/icons/ui-icons/background-type.js +27 -0
  190. package/dist/icons/ui-icons/block-parts.js +54 -0
  191. package/dist/icons/ui-icons/bold.js +21 -0
  192. package/dist/icons/ui-icons/book.js +40 -0
  193. package/dist/icons/ui-icons/bookmark.js +18 -0
  194. package/dist/icons/ui-icons/boolean-exclude.js +24 -0
  195. package/dist/icons/ui-icons/boolean-intersect.js +31 -0
  196. package/dist/icons/ui-icons/boolean-subtract.js +27 -0
  197. package/dist/icons/ui-icons/boolean-union.js +33 -0
  198. package/dist/icons/ui-icons/border-color.js +79 -0
  199. package/dist/icons/ui-icons/border.js +60 -0
  200. package/dist/icons/ui-icons/bot-deny.js +61 -0
  201. package/dist/icons/ui-icons/bot.js +47 -0
  202. package/dist/icons/ui-icons/box.js +35 -0
  203. package/dist/icons/ui-icons/brain.js +20 -0
  204. package/dist/icons/ui-icons/branch-fork.js +46 -0
  205. package/dist/icons/ui-icons/branch.js +46 -0
  206. package/dist/icons/ui-icons/briefcase.js +26 -0
  207. package/dist/icons/ui-icons/browser.js +60 -0
  208. package/dist/icons/ui-icons/button-disabled.js +30 -0
  209. package/dist/icons/ui-icons/button-filled.js +19 -0
  210. package/dist/icons/ui-icons/button-ghost.js +28 -0
  211. package/dist/icons/ui-icons/button-outline.js +27 -0
  212. package/dist/icons/ui-icons/calculator.js +139 -0
  213. package/dist/icons/ui-icons/calendar-add.js +51 -0
  214. package/dist/icons/ui-icons/calendar-download.js +62 -0
  215. package/dist/icons/ui-icons/calendar-remove.js +51 -0
  216. package/dist/icons/ui-icons/calendar.js +34 -0
  217. package/dist/icons/ui-icons/caption-generic.js +25 -0
  218. package/dist/icons/ui-icons/card-featured.js +28 -0
  219. package/dist/icons/ui-icons/caret-down-fill.js +19 -0
  220. package/dist/icons/ui-icons/caret-down.js +19 -0
  221. package/dist/icons/ui-icons/caret-left-fill.js +19 -0
  222. package/dist/icons/ui-icons/caret-left.js +19 -0
  223. package/dist/icons/ui-icons/caret-right-fill.js +19 -0
  224. package/dist/icons/ui-icons/caret-right.js +19 -0
  225. package/dist/icons/ui-icons/caret-up-fill.js +19 -0
  226. package/dist/icons/ui-icons/caret-up.js +19 -0
  227. package/dist/icons/ui-icons/center-point.js +25 -0
  228. package/dist/icons/ui-icons/chat-bubble-alt.js +25 -0
  229. package/dist/icons/ui-icons/chat-bubble.js +19 -0
  230. package/dist/icons/ui-icons/chat.js +25 -0
  231. package/dist/icons/ui-icons/check-circle-fill-transparent.js +24 -0
  232. package/dist/icons/ui-icons/check-circle-fill.js +17 -0
  233. package/dist/icons/ui-icons/check-circle.js +27 -0
  234. package/dist/icons/ui-icons/check-square.js +28 -0
  235. package/dist/icons/ui-icons/check.js +20 -0
  236. package/dist/icons/ui-icons/checks-circle.js +26 -0
  237. package/dist/icons/ui-icons/checks.js +26 -0
  238. package/dist/icons/ui-icons/chevron-down.js +20 -0
  239. package/dist/icons/ui-icons/chevron-left.js +20 -0
  240. package/dist/icons/ui-icons/chevron-right.js +20 -0
  241. package/dist/icons/ui-icons/chevron-up.js +20 -0
  242. package/dist/icons/ui-icons/clear-alt.js +25 -0
  243. package/dist/icons/ui-icons/clear.js +20 -0
  244. package/dist/icons/ui-icons/clipboard-plain.js +35 -0
  245. package/dist/icons/ui-icons/clipboard.js +43 -0
  246. package/dist/icons/ui-icons/clock.js +26 -0
  247. package/dist/icons/ui-icons/closed-captions.js +27 -0
  248. package/dist/icons/ui-icons/code-variable.js +20 -0
  249. package/dist/icons/ui-icons/code.js +20 -0
  250. package/dist/icons/ui-icons/color-alt.js +40 -0
  251. package/dist/icons/ui-icons/color-fill-swatch.js +61 -0
  252. package/dist/icons/ui-icons/color-picker-fill.js +42 -0
  253. package/dist/icons/ui-icons/color-picker-list-marker.js +41 -0
  254. package/dist/icons/ui-icons/color-picker-text-highlight.js +19 -0
  255. package/dist/icons/ui-icons/color-picker-text.js +20 -0
  256. package/dist/icons/ui-icons/color-select.js +33 -0
  257. package/dist/icons/ui-icons/color.js +22 -0
  258. package/dist/icons/ui-icons/column-gutters-lr.js +54 -0
  259. package/dist/icons/ui-icons/columns.js +42 -0
  260. package/dist/icons/ui-icons/columns3366.js +30 -0
  261. package/dist/icons/ui-icons/columns6633.js +30 -0
  262. package/dist/icons/ui-icons/component-generic.js +27 -0
  263. package/dist/icons/ui-icons/component-options.js +36 -0
  264. package/dist/icons/ui-icons/condition-h.js +20 -0
  265. package/dist/icons/ui-icons/condition-v.js +20 -0
  266. package/dist/icons/ui-icons/conditional-visibility.js +26 -0
  267. package/dist/icons/ui-icons/container-height.js +68 -0
  268. package/dist/icons/ui-icons/container-spacing-h.js +41 -0
  269. package/dist/icons/ui-icons/container-spacing.js +41 -0
  270. package/dist/icons/ui-icons/container-width.js +68 -0
  271. package/dist/icons/ui-icons/content-bottom-left.js +31 -0
  272. package/dist/icons/ui-icons/content-bottom-right.js +31 -0
  273. package/dist/icons/ui-icons/content-center.js +31 -0
  274. package/dist/icons/ui-icons/content-top-left.js +31 -0
  275. package/dist/icons/ui-icons/content-top-right.js +31 -0
  276. package/dist/icons/ui-icons/contrast-alt.js +27 -0
  277. package/dist/icons/ui-icons/contrast.js +26 -0
  278. package/dist/icons/ui-icons/cookie-alt.js +124 -0
  279. package/dist/icons/ui-icons/cookie.js +76 -0
  280. package/dist/icons/ui-icons/copy.js +26 -0
  281. package/dist/icons/ui-icons/currency.js +48 -0
  282. package/dist/icons/ui-icons/current-page.js +42 -0
  283. package/dist/icons/ui-icons/cursor-disabled.js +35 -0
  284. package/dist/icons/ui-icons/cursor-move.js +20 -0
  285. package/dist/icons/ui-icons/dark-mode.js +20 -0
  286. package/dist/icons/ui-icons/data.js +33 -0
  287. package/dist/icons/ui-icons/date-time.js +67 -0
  288. package/dist/icons/ui-icons/defer.js +26 -0
  289. package/dist/icons/ui-icons/description-link.js +40 -0
  290. package/dist/icons/ui-icons/design.js +48 -0
  291. package/dist/icons/ui-icons/dice.js +59 -0
  292. package/dist/icons/ui-icons/divider-bottom.js +23 -0
  293. package/dist/icons/ui-icons/divider-side.js +53 -0
  294. package/dist/icons/ui-icons/divider-status.js +53 -0
  295. package/dist/icons/ui-icons/divider-top.js +23 -0
  296. package/dist/icons/ui-icons/divider.js +23 -0
  297. package/dist/icons/ui-icons/door-in.js +32 -0
  298. package/dist/icons/ui-icons/door-out.js +32 -0
  299. package/dist/icons/ui-icons/door.js +27 -0
  300. package/dist/icons/ui-icons/download.js +20 -0
  301. package/dist/icons/ui-icons/dropdown-caret-alt.js +17 -0
  302. package/dist/icons/ui-icons/dropdown-caret.js +20 -0
  303. package/dist/icons/ui-icons/dropdown-close.js +52 -0
  304. package/dist/icons/ui-icons/dropdown-open.js +38 -0
  305. package/dist/icons/ui-icons/dropdown.js +38 -0
  306. package/dist/icons/ui-icons/dummy-spacer.js +17 -0
  307. package/dist/icons/ui-icons/edit-options.js +32 -0
  308. package/dist/icons/ui-icons/edit.js +22 -0
  309. package/dist/icons/ui-icons/email-remove.js +42 -0
  310. package/dist/icons/ui-icons/email.js +28 -0
  311. package/dist/icons/ui-icons/embed.js +28 -0
  312. package/dist/icons/ui-icons/empty-circle.js +23 -0
  313. package/dist/icons/ui-icons/empty-rect.js +25 -0
  314. package/dist/icons/ui-icons/equal-columns.js +25 -0
  315. package/dist/icons/ui-icons/equal-rows.js +25 -0
  316. package/dist/icons/ui-icons/equals.js +20 -0
  317. package/dist/icons/ui-icons/error-circle-fill-transparent.js +23 -0
  318. package/dist/icons/ui-icons/error-circle-fill.js +17 -0
  319. package/dist/icons/ui-icons/error-circle.js +24 -0
  320. package/dist/icons/ui-icons/exclude-item-alt.js +38 -0
  321. package/dist/icons/ui-icons/exclude-item.js +42 -0
  322. package/dist/icons/ui-icons/exclude.js +29 -0
  323. package/dist/icons/ui-icons/expand-xl.js +20 -0
  324. package/dist/icons/ui-icons/expand.js +20 -0
  325. package/dist/icons/ui-icons/experiment.js +33 -0
  326. package/dist/icons/ui-icons/external-link.js +25 -0
  327. package/dist/icons/ui-icons/extract-alt.js +25 -0
  328. package/dist/icons/ui-icons/extract.js +25 -0
  329. package/dist/icons/ui-icons/eyedropper.js +36 -0
  330. package/dist/icons/ui-icons/fast-forward.js +26 -0
  331. package/dist/icons/ui-icons/fast-reverse.js +26 -0
  332. package/dist/icons/ui-icons/field-after-text.js +54 -0
  333. package/dist/icons/ui-icons/field-before-text.js +46 -0
  334. package/dist/icons/ui-icons/field-disabled.js +35 -0
  335. package/dist/icons/ui-icons/field-help.js +46 -0
  336. package/dist/icons/ui-icons/field-label.js +38 -0
  337. package/dist/icons/ui-icons/field-name.js +45 -0
  338. package/dist/icons/ui-icons/field-placeholder.js +49 -0
  339. package/dist/icons/ui-icons/field-readonly.js +36 -0
  340. package/dist/icons/ui-icons/field-required.js +37 -0
  341. package/dist/icons/ui-icons/field-type.js +36 -0
  342. package/dist/icons/ui-icons/field-value.js +46 -0
  343. package/dist/icons/ui-icons/field-width.js +27 -0
  344. package/dist/icons/ui-icons/file-download.js +33 -0
  345. package/dist/icons/ui-icons/file-error.js +25 -0
  346. package/dist/icons/ui-icons/file-metadata.js +41 -0
  347. package/dist/icons/ui-icons/file-pdf.js +34 -0
  348. package/dist/icons/ui-icons/file-size-max.js +33 -0
  349. package/dist/icons/ui-icons/file-size-min.js +33 -0
  350. package/dist/icons/ui-icons/file-size.js +34 -0
  351. package/dist/icons/ui-icons/file-type.js +42 -0
  352. package/dist/icons/ui-icons/file-upload.js +33 -0
  353. package/dist/icons/ui-icons/file.js +24 -0
  354. package/dist/icons/ui-icons/files.js +34 -0
  355. package/dist/icons/ui-icons/fill-color.js +49 -0
  356. package/dist/icons/ui-icons/filter-alt.js +24 -0
  357. package/dist/icons/ui-icons/filter.js +20 -0
  358. package/dist/icons/ui-icons/flag-alt.js +24 -0
  359. package/dist/icons/ui-icons/flag.js +24 -0
  360. package/dist/icons/ui-icons/flip-h.js +27 -0
  361. package/dist/icons/ui-icons/flip-v.js +27 -0
  362. package/dist/icons/ui-icons/focus.js +21 -0
  363. package/dist/icons/ui-icons/folder-add.js +22 -0
  364. package/dist/icons/ui-icons/folder-open-solid.js +17 -0
  365. package/dist/icons/ui-icons/folder-open.js +19 -0
  366. package/dist/icons/ui-icons/folder-solid.js +17 -0
  367. package/dist/icons/ui-icons/folder-top-level.js +22 -0
  368. package/dist/icons/ui-icons/folder.js +19 -0
  369. package/dist/icons/ui-icons/font-family.js +24 -0
  370. package/dist/icons/ui-icons/footer.js +23 -0
  371. package/dist/icons/ui-icons/form-alt.js +71 -0
  372. package/dist/icons/ui-icons/form.js +53 -0
  373. package/dist/icons/ui-icons/four-columns.js +38 -0
  374. package/dist/icons/ui-icons/frame.js +33 -0
  375. package/dist/icons/ui-icons/full-max-shield.js +26 -0
  376. package/dist/icons/ui-icons/full-max-text.js +20 -0
  377. package/dist/icons/ui-icons/full-width-image.js +35 -0
  378. package/dist/icons/ui-icons/gears-fill.js +19 -0
  379. package/dist/icons/ui-icons/gears.js +38 -0
  380. package/dist/icons/ui-icons/generic-color-swatch.js +6 -0
  381. package/dist/icons/ui-icons/generic-shapes-alt.js +33 -0
  382. package/dist/icons/ui-icons/generic-shapes.js +38 -0
  383. package/dist/icons/ui-icons/globe-anchor.js +55 -0
  384. package/dist/icons/ui-icons/globe-hash.js +40 -0
  385. package/dist/icons/ui-icons/globe.js +37 -0
  386. package/dist/icons/ui-icons/google-tag-manager.js +36 -0
  387. package/dist/icons/ui-icons/gradient-repeat.js +41 -0
  388. package/dist/icons/ui-icons/gradient-stop.js +36 -0
  389. package/dist/icons/ui-icons/gradient.js +54 -0
  390. package/dist/icons/ui-icons/grid-alt.js +19 -0
  391. package/dist/icons/ui-icons/grid-auto-cols.js +46 -0
  392. package/dist/icons/ui-icons/grid-auto-rows.js +41 -0
  393. package/dist/icons/ui-icons/grid-col.js +22 -0
  394. package/dist/icons/ui-icons/grid-height.js +22 -0
  395. package/dist/icons/ui-icons/grid-list-toggle.js +48 -0
  396. package/dist/icons/ui-icons/grid-manual.js +18 -0
  397. package/dist/icons/ui-icons/grid-row.js +22 -0
  398. package/dist/icons/ui-icons/grid-width.js +22 -0
  399. package/dist/icons/ui-icons/group.js +33 -0
  400. package/dist/icons/ui-icons/gutter.js +28 -0
  401. package/dist/icons/ui-icons/gyroscope.js +53 -0
  402. package/dist/icons/ui-icons/h1.js +28 -0
  403. package/dist/icons/ui-icons/h2.js +28 -0
  404. package/dist/icons/ui-icons/h3.js +28 -0
  405. package/dist/icons/ui-icons/h4.js +28 -0
  406. package/dist/icons/ui-icons/h5.js +28 -0
  407. package/dist/icons/ui-icons/h6.js +28 -0
  408. package/dist/icons/ui-icons/hamburger-menu.js +19 -0
  409. package/dist/icons/ui-icons/hard-drive.js +35 -0
  410. package/dist/icons/ui-icons/header.js +23 -0
  411. package/dist/icons/ui-icons/heading-level-alt.js +28 -0
  412. package/dist/icons/ui-icons/heading-level.js +28 -0
  413. package/dist/icons/ui-icons/heading.js +20 -0
  414. package/dist/icons/ui-icons/heart-fill-transparent.js +19 -0
  415. package/dist/icons/ui-icons/heart-fill.js +18 -0
  416. package/dist/icons/ui-icons/heart.js +18 -0
  417. package/dist/icons/ui-icons/height.js +30 -0
  418. package/dist/icons/ui-icons/help-fill.js +19 -0
  419. package/dist/icons/ui-icons/help.js +38 -0
  420. package/dist/icons/ui-icons/hide.js +29 -0
  421. package/dist/icons/ui-icons/highlighted-checkmark.js +24 -0
  422. package/dist/icons/ui-icons/highlighted-exclamation-mark.js +33 -0
  423. package/dist/icons/ui-icons/history.js +26 -0
  424. package/dist/icons/ui-icons/horizontal-align-alt.js +27 -0
  425. package/dist/icons/ui-icons/horizontal-align-around.js +37 -0
  426. package/dist/icons/ui-icons/horizontal-align-between-alt.js +37 -0
  427. package/dist/icons/ui-icons/horizontal-align-between.js +46 -0
  428. package/dist/icons/ui-icons/horizontal-align-center.js +41 -0
  429. package/dist/icons/ui-icons/horizontal-align-evenly.js +37 -0
  430. package/dist/icons/ui-icons/horizontal-align-left.js +44 -0
  431. package/dist/icons/ui-icons/horizontal-align-right.js +48 -0
  432. package/dist/icons/ui-icons/horizontal-align-stretch.js +37 -0
  433. package/dist/icons/ui-icons/horizontal-align.js +35 -0
  434. package/dist/icons/ui-icons/hover-background-glow.js +61 -0
  435. package/dist/icons/ui-icons/hover-background-type.js +34 -0
  436. package/dist/icons/ui-icons/hover-invert-object.js +42 -0
  437. package/dist/icons/ui-icons/hover-invert-text.js +32 -0
  438. package/dist/icons/ui-icons/hover-rotate.js +20 -0
  439. package/dist/icons/ui-icons/hover-zoom.js +25 -0
  440. package/dist/icons/ui-icons/hyphenate-alt.js +20 -0
  441. package/dist/icons/ui-icons/hyphenate-alt2.js +20 -0
  442. package/dist/icons/ui-icons/hyphenate.js +25 -0
  443. package/dist/icons/ui-icons/icon-generic.js +23 -0
  444. package/dist/icons/ui-icons/id-card.js +45 -0
  445. package/dist/icons/ui-icons/id.js +28 -0
  446. package/dist/icons/ui-icons/image-blur.js +50 -0
  447. package/dist/icons/ui-icons/image-caption.js +36 -0
  448. package/dist/icons/ui-icons/image-error.js +36 -0
  449. package/dist/icons/ui-icons/image-file.js +40 -0
  450. package/dist/icons/ui-icons/image-lazy-load.js +52 -0
  451. package/dist/icons/ui-icons/image-opacity.js +31 -0
  452. package/dist/icons/ui-icons/image-overlay-alt.js +93 -0
  453. package/dist/icons/ui-icons/image-overlay-alt2.js +93 -0
  454. package/dist/icons/ui-icons/image-overlay.js +92 -0
  455. package/dist/icons/ui-icons/image-remove.js +46 -0
  456. package/dist/icons/ui-icons/image.js +25 -0
  457. package/dist/icons/ui-icons/index.js +753 -0
  458. package/dist/icons/ui-icons/info-circle-fill-transparent.js +21 -0
  459. package/dist/icons/ui-icons/info-circle-fill.js +17 -0
  460. package/dist/icons/ui-icons/info-circle.js +24 -0
  461. package/dist/icons/ui-icons/info.js +17 -0
  462. package/dist/icons/ui-icons/inherit.js +41 -0
  463. package/dist/icons/ui-icons/inline-gradient-format.js +62 -0
  464. package/dist/icons/ui-icons/input-field.js +27 -0
  465. package/dist/icons/ui-icons/italic.js +20 -0
  466. package/dist/icons/ui-icons/item-limit.js +35 -0
  467. package/dist/icons/ui-icons/item-select.js +33 -0
  468. package/dist/icons/ui-icons/item-wrap.js +60 -0
  469. package/dist/icons/ui-icons/items-per-page.js +48 -0
  470. package/dist/icons/ui-icons/items-per-row.js +45 -0
  471. package/dist/icons/ui-icons/key.js +25 -0
  472. package/dist/icons/ui-icons/keyboard.js +19 -0
  473. package/dist/icons/ui-icons/large.js +24 -0
  474. package/dist/icons/ui-icons/latest-posts.js +44 -0
  475. package/dist/icons/ui-icons/layer-off.js +20 -0
  476. package/dist/icons/ui-icons/layer.js +19 -0
  477. package/dist/icons/ui-icons/layers.js +33 -0
  478. package/dist/icons/ui-icons/layout-alt.js +19 -0
  479. package/dist/icons/ui-icons/layout-alt2.js +23 -0
  480. package/dist/icons/ui-icons/layout-alt3.js +19 -0
  481. package/dist/icons/ui-icons/layout-alt4.js +19 -0
  482. package/dist/icons/ui-icons/layout-bento-box.js +19 -0
  483. package/dist/icons/ui-icons/layout-masonry.js +79 -0
  484. package/dist/icons/ui-icons/layout.js +43 -0
  485. package/dist/icons/ui-icons/left-panel-alt.js +25 -0
  486. package/dist/icons/ui-icons/left-panel.js +22 -0
  487. package/dist/icons/ui-icons/light-bulb-alt.js +30 -0
  488. package/dist/icons/ui-icons/light-bulb.js +33 -0
  489. package/dist/icons/ui-icons/light-mode.js +26 -0
  490. package/dist/icons/ui-icons/limit-width.js +26 -0
  491. package/dist/icons/ui-icons/line-break-alt-off.js +26 -0
  492. package/dist/icons/ui-icons/line-break-alt.js +25 -0
  493. package/dist/icons/ui-icons/line-break-off-alt.js +35 -0
  494. package/dist/icons/ui-icons/line-break-off.js +41 -0
  495. package/dist/icons/ui-icons/line-break.js +29 -0
  496. package/dist/icons/ui-icons/line-breaks-hyphenation.js +36 -0
  497. package/dist/icons/ui-icons/link-add.js +41 -0
  498. package/dist/icons/ui-icons/link-nav.js +59 -0
  499. package/dist/icons/ui-icons/link-remove.js +41 -0
  500. package/dist/icons/ui-icons/link.js +19 -0
  501. package/dist/icons/ui-icons/list-indent.js +26 -0
  502. package/dist/icons/ui-icons/list-ordered.js +43 -0
  503. package/dist/icons/ui-icons/list-outdent.js +26 -0
  504. package/dist/icons/ui-icons/list-unordered.js +43 -0
  505. package/dist/icons/ui-icons/loader-alt.js +19 -0
  506. package/dist/icons/ui-icons/loader.js +19 -0
  507. package/dist/icons/ui-icons/location-add.js +44 -0
  508. package/dist/icons/ui-icons/location-allow.js +44 -0
  509. package/dist/icons/ui-icons/location-deny.js +44 -0
  510. package/dist/icons/ui-icons/location-settings.js +36 -0
  511. package/dist/icons/ui-icons/location.js +26 -0
  512. package/dist/icons/ui-icons/lock.js +44 -0
  513. package/dist/icons/ui-icons/loop-mode.js +20 -0
  514. package/dist/icons/ui-icons/magic-alt-fill-transparent.js +20 -0
  515. package/dist/icons/ui-icons/magic-alt-fill.js +19 -0
  516. package/dist/icons/ui-icons/magic-alt.js +19 -0
  517. package/dist/icons/ui-icons/magic-fill-transparent.js +20 -0
  518. package/dist/icons/ui-icons/magic-fill.js +19 -0
  519. package/dist/icons/ui-icons/magic.js +19 -0
  520. package/dist/icons/ui-icons/map-layer-json.js +35 -0
  521. package/dist/icons/ui-icons/map-layer-raster.js +121 -0
  522. package/dist/icons/ui-icons/map-layer-vector.js +81 -0
  523. package/dist/icons/ui-icons/map-layer.js +26 -0
  524. package/dist/icons/ui-icons/map-pin.js +41 -0
  525. package/dist/icons/ui-icons/matrix-align-control-dot-active.js +23 -0
  526. package/dist/icons/ui-icons/matrix-align-control-dot-inactive.js +21 -0
  527. package/dist/icons/ui-icons/media.js +49 -0
  528. package/dist/icons/ui-icons/medium.js +24 -0
  529. package/dist/icons/ui-icons/menu-item-check.js +20 -0
  530. package/dist/icons/ui-icons/menu-item-circle.js +19 -0
  531. package/dist/icons/ui-icons/microphone.js +23 -0
  532. package/dist/icons/ui-icons/migration-alt-v.js +20 -0
  533. package/dist/icons/ui-icons/migration-alt.js +20 -0
  534. package/dist/icons/ui-icons/migration.js +26 -0
  535. package/dist/icons/ui-icons/module.js +24 -0
  536. package/dist/icons/ui-icons/money-paper.js +58 -0
  537. package/dist/icons/ui-icons/more-h-circle.js +40 -0
  538. package/dist/icons/ui-icons/more-h.js +33 -0
  539. package/dist/icons/ui-icons/more-v-circle.js +44 -0
  540. package/dist/icons/ui-icons/more-v.js +36 -0
  541. package/dist/icons/ui-icons/mouse-cursor.js +20 -0
  542. package/dist/icons/ui-icons/mouse-wheel.js +27 -0
  543. package/dist/icons/ui-icons/multi-item-left-inset-mobile.js +58 -0
  544. package/dist/icons/ui-icons/multi-item-left-inset.js +39 -0
  545. package/dist/icons/ui-icons/multi-item-right-inset-mobile.js +55 -0
  546. package/dist/icons/ui-icons/multi-item-right-inset.js +36 -0
  547. package/dist/icons/ui-icons/multiple.js +34 -0
  548. package/dist/icons/ui-icons/music-note.js +40 -0
  549. package/dist/icons/ui-icons/mute-centered.js +20 -0
  550. package/dist/icons/ui-icons/mute.js +20 -0
  551. package/dist/icons/ui-icons/narrow-bottom.js +49 -0
  552. package/dist/icons/ui-icons/narrow-left.js +49 -0
  553. package/dist/icons/ui-icons/narrow-right.js +49 -0
  554. package/dist/icons/ui-icons/narrow-top.js +49 -0
  555. package/dist/icons/ui-icons/navigation-buttons.js +39 -0
  556. package/dist/icons/ui-icons/new-tab.js +27 -0
  557. package/dist/icons/ui-icons/newspaper.js +45 -0
  558. package/dist/icons/ui-icons/none.js +25 -0
  559. package/dist/icons/ui-icons/notebook.js +44 -0
  560. package/dist/icons/ui-icons/num0-circle-alt.js +24 -0
  561. package/dist/icons/ui-icons/num0-circle.js +24 -0
  562. package/dist/icons/ui-icons/num0-square-alt.js +26 -0
  563. package/dist/icons/ui-icons/num0-square.js +26 -0
  564. package/dist/icons/ui-icons/num1-circle-alt.js +26 -0
  565. package/dist/icons/ui-icons/num1-circle.js +26 -0
  566. package/dist/icons/ui-icons/num1-square-alt.js +28 -0
  567. package/dist/icons/ui-icons/num1-square.js +28 -0
  568. package/dist/icons/ui-icons/num2-circle-alt.js +26 -0
  569. package/dist/icons/ui-icons/num2-circle.js +26 -0
  570. package/dist/icons/ui-icons/num2-square-alt.js +28 -0
  571. package/dist/icons/ui-icons/num2-square.js +28 -0
  572. package/dist/icons/ui-icons/num3-circle-alt.js +26 -0
  573. package/dist/icons/ui-icons/num3-circle.js +26 -0
  574. package/dist/icons/ui-icons/num3-square-alt.js +28 -0
  575. package/dist/icons/ui-icons/num3-square.js +28 -0
  576. package/dist/icons/ui-icons/num4-circle-alt.js +26 -0
  577. package/dist/icons/ui-icons/num4-circle.js +26 -0
  578. package/dist/icons/ui-icons/num4-square-alt.js +28 -0
  579. package/dist/icons/ui-icons/num4-square.js +28 -0
  580. package/dist/icons/ui-icons/num5-circle-alt.js +26 -0
  581. package/dist/icons/ui-icons/num5-circle.js +26 -0
  582. package/dist/icons/ui-icons/num5-square-alt.js +28 -0
  583. package/dist/icons/ui-icons/num5-square.js +28 -0
  584. package/dist/icons/ui-icons/num6-circle-alt.js +26 -0
  585. package/dist/icons/ui-icons/num6-circle.js +26 -0
  586. package/dist/icons/ui-icons/num6-square-alt.js +28 -0
  587. package/dist/icons/ui-icons/num6-square.js +28 -0
  588. package/dist/icons/ui-icons/num7-circle-alt.js +26 -0
  589. package/dist/icons/ui-icons/num7-circle.js +26 -0
  590. package/dist/icons/ui-icons/num7-square-alt.js +28 -0
  591. package/dist/icons/ui-icons/num7-square.js +28 -0
  592. package/dist/icons/ui-icons/num8-circle-alt.js +24 -0
  593. package/dist/icons/ui-icons/num8-circle.js +24 -0
  594. package/dist/icons/ui-icons/num8-square-alt.js +26 -0
  595. package/dist/icons/ui-icons/num8-square.js +26 -0
  596. package/dist/icons/ui-icons/num9-circle-alt.js +26 -0
  597. package/dist/icons/ui-icons/num9-circle.js +26 -0
  598. package/dist/icons/ui-icons/num9-square-alt.js +28 -0
  599. package/dist/icons/ui-icons/num9-square.js +28 -0
  600. package/dist/icons/ui-icons/office-building.js +203 -0
  601. package/dist/icons/ui-icons/office-buildings.js +256 -0
  602. package/dist/icons/ui-icons/offset-auto.js +46 -0
  603. package/dist/icons/ui-icons/offset.js +39 -0
  604. package/dist/icons/ui-icons/option-list-alt.js +61 -0
  605. package/dist/icons/ui-icons/option-list.js +63 -0
  606. package/dist/icons/ui-icons/options.js +24 -0
  607. package/dist/icons/ui-icons/order.js +49 -0
  608. package/dist/icons/ui-icons/padding-bottom.js +35 -0
  609. package/dist/icons/ui-icons/padding-top.js +35 -0
  610. package/dist/icons/ui-icons/padding.js +34 -0
  611. package/dist/icons/ui-icons/pagination.js +49 -0
  612. package/dist/icons/ui-icons/palette-color.js +111 -0
  613. package/dist/icons/ui-icons/panel-collapse.js +41 -0
  614. package/dist/icons/ui-icons/panel-expand.js +41 -0
  615. package/dist/icons/ui-icons/paragraph.js +24 -0
  616. package/dist/icons/ui-icons/paste.js +52 -0
  617. package/dist/icons/ui-icons/pause.js +20 -0
  618. package/dist/icons/ui-icons/people-group.js +57 -0
  619. package/dist/icons/ui-icons/people.js +43 -0
  620. package/dist/icons/ui-icons/person.js +26 -0
  621. package/dist/icons/ui-icons/photo-camera.js +26 -0
  622. package/dist/icons/ui-icons/picture-in-picture.js +33 -0
  623. package/dist/icons/ui-icons/play-reverse.js +20 -0
  624. package/dist/icons/ui-icons/play.js +20 -0
  625. package/dist/icons/ui-icons/playback-options.js +24 -0
  626. package/dist/icons/ui-icons/plus-circle-fill-alt.js +23 -0
  627. package/dist/icons/ui-icons/plus-circle-fill.js +17 -0
  628. package/dist/icons/ui-icons/plus-circle.js +26 -0
  629. package/dist/icons/ui-icons/plus-minus-buttons-h.js +25 -0
  630. package/dist/icons/ui-icons/plus-minus-buttons-v.js +25 -0
  631. package/dist/icons/ui-icons/plus-square-fill-transparent.js +27 -0
  632. package/dist/icons/ui-icons/plus-square-fill.js +17 -0
  633. package/dist/icons/ui-icons/plus-square.js +27 -0
  634. package/dist/icons/ui-icons/pointer-hand-disabled.js +34 -0
  635. package/dist/icons/ui-icons/pointer-hand.js +20 -0
  636. package/dist/icons/ui-icons/position-arrows-h.js +26 -0
  637. package/dist/icons/ui-icons/position-arrows-inverted-h.js +26 -0
  638. package/dist/icons/ui-icons/position-arrows-inverted-v.js +26 -0
  639. package/dist/icons/ui-icons/position-arrows-inverted.js +26 -0
  640. package/dist/icons/ui-icons/position-arrows-v.js +26 -0
  641. package/dist/icons/ui-icons/position-arrows.js +26 -0
  642. package/dist/icons/ui-icons/position-h-center.js +43 -0
  643. package/dist/icons/ui-icons/position-h-end.js +43 -0
  644. package/dist/icons/ui-icons/position-h-start.js +43 -0
  645. package/dist/icons/ui-icons/position-left.js +31 -0
  646. package/dist/icons/ui-icons/position-right.js +31 -0
  647. package/dist/icons/ui-icons/position-v-center.js +43 -0
  648. package/dist/icons/ui-icons/position-v-end.js +43 -0
  649. package/dist/icons/ui-icons/position-v-start.js +43 -0
  650. package/dist/icons/ui-icons/position2x2-bottom-left.js +52 -0
  651. package/dist/icons/ui-icons/position2x2-bottom-right.js +52 -0
  652. package/dist/icons/ui-icons/position2x2-empty.js +51 -0
  653. package/dist/icons/ui-icons/position2x2-top-left.js +52 -0
  654. package/dist/icons/ui-icons/position2x2-top-right.js +52 -0
  655. package/dist/icons/ui-icons/position3x3-bottom-center.js +97 -0
  656. package/dist/icons/ui-icons/position3x3-bottom-left.js +97 -0
  657. package/dist/icons/ui-icons/position3x3-bottom-right.js +97 -0
  658. package/dist/icons/ui-icons/position3x3-center-center.js +97 -0
  659. package/dist/icons/ui-icons/position3x3-center-left.js +97 -0
  660. package/dist/icons/ui-icons/position3x3-center-right.js +97 -0
  661. package/dist/icons/ui-icons/position3x3-empty.js +96 -0
  662. package/dist/icons/ui-icons/position3x3-top-center.js +97 -0
  663. package/dist/icons/ui-icons/position3x3-top-left.js +97 -0
  664. package/dist/icons/ui-icons/position3x3-top-right.js +97 -0
  665. package/dist/icons/ui-icons/positioning-guide-alt.js +30 -0
  666. package/dist/icons/ui-icons/positioning-guide.js +30 -0
  667. package/dist/icons/ui-icons/positioning-width-guide.js +40 -0
  668. package/dist/icons/ui-icons/preload.js +44 -0
  669. package/dist/icons/ui-icons/preview-responsive.js +48 -0
  670. package/dist/icons/ui-icons/preview.js +35 -0
  671. package/dist/icons/ui-icons/progressbar-intermittent.js +26 -0
  672. package/dist/icons/ui-icons/progressbar.js +30 -0
  673. package/dist/icons/ui-icons/range-max.js +48 -0
  674. package/dist/icons/ui-icons/range-mid.js +40 -0
  675. package/dist/icons/ui-icons/range-min.js +48 -0
  676. package/dist/icons/ui-icons/range.js +61 -0
  677. package/dist/icons/ui-icons/read-only.js +25 -0
  678. package/dist/icons/ui-icons/reduce-height-bottom.js +49 -0
  679. package/dist/icons/ui-icons/reduce-height-top.js +49 -0
  680. package/dist/icons/ui-icons/regex.js +39 -0
  681. package/dist/icons/ui-icons/remove.js +20 -0
  682. package/dist/icons/ui-icons/rename.js +24 -0
  683. package/dist/icons/ui-icons/reorder-grabber-h.js +51 -0
  684. package/dist/icons/ui-icons/reorder-grabber-v.js +57 -0
  685. package/dist/icons/ui-icons/reorder.js +35 -0
  686. package/dist/icons/ui-icons/required-alt.js +20 -0
  687. package/dist/icons/ui-icons/required.js +19 -0
  688. package/dist/icons/ui-icons/reset-to-zero.js +33 -0
  689. package/dist/icons/ui-icons/reset.js +25 -0
  690. package/dist/icons/ui-icons/responsive-overrides-alt-fill.js +26 -0
  691. package/dist/icons/ui-icons/responsive-overrides-alt.js +49 -0
  692. package/dist/icons/ui-icons/responsive-overrides-alt2-fill.js +34 -0
  693. package/dist/icons/ui-icons/responsive-overrides-alt2.js +45 -0
  694. package/dist/icons/ui-icons/responsive-overrides-alt3-fill.js +33 -0
  695. package/dist/icons/ui-icons/responsive-overrides.js +39 -0
  696. package/dist/icons/ui-icons/responsive.js +33 -0
  697. package/dist/icons/ui-icons/right-panel-alt.js +23 -0
  698. package/dist/icons/ui-icons/right-panel.js +22 -0
  699. package/dist/icons/ui-icons/rotate-left.js +20 -0
  700. package/dist/icons/ui-icons/rotate-right.js +20 -0
  701. package/dist/icons/ui-icons/rounded-corners.js +19 -0
  702. package/dist/icons/ui-icons/route.js +27 -0
  703. package/dist/icons/ui-icons/row-add.js +45 -0
  704. package/dist/icons/ui-icons/row-empty.js +51 -0
  705. package/dist/icons/ui-icons/row.js +45 -0
  706. package/dist/icons/ui-icons/rows.js +42 -0
  707. package/dist/icons/ui-icons/ruler.js +28 -0
  708. package/dist/icons/ui-icons/save.js +26 -0
  709. package/dist/icons/ui-icons/screen-desktop.js +32 -0
  710. package/dist/icons/ui-icons/screen-large.js +23 -0
  711. package/dist/icons/ui-icons/screen-mobile.js +39 -0
  712. package/dist/icons/ui-icons/screen-tablet-large.js +36 -0
  713. package/dist/icons/ui-icons/screen-tablet.js +36 -0
  714. package/dist/icons/ui-icons/scrollbar-h.js +40 -0
  715. package/dist/icons/ui-icons/scrollbar-v.js +41 -0
  716. package/dist/icons/ui-icons/scrollbars.js +55 -0
  717. package/dist/icons/ui-icons/search-empty.js +37 -0
  718. package/dist/icons/ui-icons/search.js +25 -0
  719. package/dist/icons/ui-icons/separator-h.js +41 -0
  720. package/dist/icons/ui-icons/separator-v.js +39 -0
  721. package/dist/icons/ui-icons/shadow.js +61 -0
  722. package/dist/icons/ui-icons/share.js +26 -0
  723. package/dist/icons/ui-icons/shield-plus-alt.js +27 -0
  724. package/dist/icons/ui-icons/shield-plus.js +20 -0
  725. package/dist/icons/ui-icons/shield.js +20 -0
  726. package/dist/icons/ui-icons/shrink-diagonal-left-xl.js +20 -0
  727. package/dist/icons/ui-icons/shrink-diagonal-left.js +20 -0
  728. package/dist/icons/ui-icons/shrink-diagonal-right-xl.js +20 -0
  729. package/dist/icons/ui-icons/shrink-diagonal-right.js +20 -0
  730. package/dist/icons/ui-icons/shrink-xl.js +20 -0
  731. package/dist/icons/ui-icons/shrink.js +20 -0
  732. package/dist/icons/ui-icons/shuffle.js +20 -0
  733. package/dist/icons/ui-icons/sidebar-flip.js +22 -0
  734. package/dist/icons/ui-icons/sidebar.js +22 -0
  735. package/dist/icons/ui-icons/single-item-left-inset-mobile.js +48 -0
  736. package/dist/icons/ui-icons/single-item-left-inset.js +23 -0
  737. package/dist/icons/ui-icons/single-item-right-inset-mobile.js +50 -0
  738. package/dist/icons/ui-icons/single-item-right-inset.js +23 -0
  739. package/dist/icons/ui-icons/size-alt.js +33 -0
  740. package/dist/icons/ui-icons/size.js +29 -0
  741. package/dist/icons/ui-icons/slider.js +31 -0
  742. package/dist/icons/ui-icons/sliders.js +68 -0
  743. package/dist/icons/ui-icons/small.js +24 -0
  744. package/dist/icons/ui-icons/solid-circle-fill-transparent.js +22 -0
  745. package/dist/icons/ui-icons/solid-circle-filled.js +21 -0
  746. package/dist/icons/ui-icons/solid-circle-gradient.js +31 -0
  747. package/dist/icons/ui-icons/solid-circle.js +21 -0
  748. package/dist/icons/ui-icons/solid-color.js +19 -0
  749. package/dist/icons/ui-icons/solid-rect-fill-transparent.js +24 -0
  750. package/dist/icons/ui-icons/solid-rect-filled.js +23 -0
  751. package/dist/icons/ui-icons/solid-rect-gradient.js +33 -0
  752. package/dist/icons/ui-icons/solid-rect.js +23 -0
  753. package/dist/icons/ui-icons/sort-asc.js +20 -0
  754. package/dist/icons/ui-icons/sort-desc.js +20 -0
  755. package/dist/icons/ui-icons/sort-generic.js +25 -0
  756. package/dist/icons/ui-icons/spacing-bottom-in.js +23 -0
  757. package/dist/icons/ui-icons/spacing-bottom.js +23 -0
  758. package/dist/icons/ui-icons/spacing-left-in.js +23 -0
  759. package/dist/icons/ui-icons/spacing-left.js +23 -0
  760. package/dist/icons/ui-icons/spacing-right-in.js +23 -0
  761. package/dist/icons/ui-icons/spacing-right.js +23 -0
  762. package/dist/icons/ui-icons/spacing-top-in.js +23 -0
  763. package/dist/icons/ui-icons/spacing-top.js +23 -0
  764. package/dist/icons/ui-icons/speed.js +25 -0
  765. package/dist/icons/ui-icons/stagger.js +53 -0
  766. package/dist/icons/ui-icons/star.js +18 -0
  767. package/dist/icons/ui-icons/step.js +27 -0
  768. package/dist/icons/ui-icons/stop.js +20 -0
  769. package/dist/icons/ui-icons/swap.js +41 -0
  770. package/dist/icons/ui-icons/tag-alt.js +24 -0
  771. package/dist/icons/ui-icons/tag.js +26 -0
  772. package/dist/icons/ui-icons/text-abc.js +40 -0
  773. package/dist/icons/ui-icons/text-above.js +25 -0
  774. package/dist/icons/ui-icons/text-align-center.js +20 -0
  775. package/dist/icons/ui-icons/text-align-generic.js +20 -0
  776. package/dist/icons/ui-icons/text-align-justify.js +20 -0
  777. package/dist/icons/ui-icons/text-align-left.js +20 -0
  778. package/dist/icons/ui-icons/text-align-right.js +20 -0
  779. package/dist/icons/ui-icons/text-below.js +25 -0
  780. package/dist/icons/ui-icons/text-box-edit.js +35 -0
  781. package/dist/icons/ui-icons/text-color-swatch.js +40 -0
  782. package/dist/icons/ui-icons/text-highlight-color-swatch-alt.js +49 -0
  783. package/dist/icons/ui-icons/text-highlight-color-swatch.js +48 -0
  784. package/dist/icons/ui-icons/text-larger.js +23 -0
  785. package/dist/icons/ui-icons/text-length.js +20 -0
  786. package/dist/icons/ui-icons/text-size-alt.js +23 -0
  787. package/dist/icons/ui-icons/text-size.js +20 -0
  788. package/dist/icons/ui-icons/text-smaller.js +23 -0
  789. package/dist/icons/ui-icons/text-strikethrough.js +26 -0
  790. package/dist/icons/ui-icons/text-uppercase.js +25 -0
  791. package/dist/icons/ui-icons/text-write.js +39 -0
  792. package/dist/icons/ui-icons/thumbs-down.js +22 -0
  793. package/dist/icons/ui-icons/thumbs-up.js +22 -0
  794. package/dist/icons/ui-icons/title-generic.js +25 -0
  795. package/dist/icons/ui-icons/toggle-off.js +33 -0
  796. package/dist/icons/ui-icons/toggle-on-alt.js +19 -0
  797. package/dist/icons/ui-icons/toggle-on.js +31 -0
  798. package/dist/icons/ui-icons/tools.js +25 -0
  799. package/dist/icons/ui-icons/total-items.js +45 -0
  800. package/dist/icons/ui-icons/trash-alt.js +44 -0
  801. package/dist/icons/ui-icons/trash.js +33 -0
  802. package/dist/icons/ui-icons/tree-alt.js +62 -0
  803. package/dist/icons/ui-icons/tree-alt2.js +79 -0
  804. package/dist/icons/ui-icons/tree.js +70 -0
  805. package/dist/icons/ui-icons/troubleshoot-alt.js +39 -0
  806. package/dist/icons/ui-icons/two-cards-left.js +32 -0
  807. package/dist/icons/ui-icons/two-cards-right.js +32 -0
  808. package/dist/icons/ui-icons/two-columns.js +30 -0
  809. package/dist/icons/ui-icons/typography-options.js +77 -0
  810. package/dist/icons/ui-icons/typography.js +71 -0
  811. package/dist/icons/ui-icons/underline.js +19 -0
  812. package/dist/icons/ui-icons/ungroup.js +39 -0
  813. package/dist/icons/ui-icons/upload.js +20 -0
  814. package/dist/icons/ui-icons/venn-diagram-alt.js +34 -0
  815. package/dist/icons/ui-icons/venn-diagram-alt2.js +34 -0
  816. package/dist/icons/ui-icons/venn-diagram-alt3.js +34 -0
  817. package/dist/icons/ui-icons/venn-diagram-alt4.js +34 -0
  818. package/dist/icons/ui-icons/venn-diagram-alt5.js +34 -0
  819. package/dist/icons/ui-icons/venn-diagram-alt6.js +34 -0
  820. package/dist/icons/ui-icons/venn-diagram-alt7.js +39 -0
  821. package/dist/icons/ui-icons/venn-diagram.js +26 -0
  822. package/dist/icons/ui-icons/vertical-align-alt.js +27 -0
  823. package/dist/icons/ui-icons/vertical-align-around.js +39 -0
  824. package/dist/icons/ui-icons/vertical-align-between-alt.js +39 -0
  825. package/dist/icons/ui-icons/vertical-align-between.js +48 -0
  826. package/dist/icons/ui-icons/vertical-align-bottom.js +44 -0
  827. package/dist/icons/ui-icons/vertical-align-center.js +39 -0
  828. package/dist/icons/ui-icons/vertical-align-evenly.js +39 -0
  829. package/dist/icons/ui-icons/vertical-align-stretch.js +39 -0
  830. package/dist/icons/ui-icons/vertical-align-top.js +46 -0
  831. package/dist/icons/ui-icons/vertical-align.js +35 -0
  832. package/dist/icons/ui-icons/vertical-spacing.js +28 -0
  833. package/dist/icons/ui-icons/video-chapters.js +25 -0
  834. package/dist/icons/ui-icons/video-controls.js +67 -0
  835. package/dist/icons/ui-icons/video-file.js +40 -0
  836. package/dist/icons/ui-icons/video-poster-image.js +40 -0
  837. package/dist/icons/ui-icons/video-subtitle-alt.js +39 -0
  838. package/dist/icons/ui-icons/video-subtitle.js +27 -0
  839. package/dist/icons/ui-icons/video.js +36 -0
  840. package/dist/icons/ui-icons/visibility-alt.js +40 -0
  841. package/dist/icons/ui-icons/visibility-alt2.js +41 -0
  842. package/dist/icons/ui-icons/visibility.js +45 -0
  843. package/dist/icons/ui-icons/visible.js +28 -0
  844. package/dist/icons/ui-icons/volume.js +25 -0
  845. package/dist/icons/ui-icons/warning-circle-fill-transparent.js +30 -0
  846. package/dist/icons/ui-icons/warning-circle-fill.js +17 -0
  847. package/dist/icons/ui-icons/warning-circle.js +33 -0
  848. package/dist/icons/ui-icons/warning-fill-transparent.js +30 -0
  849. package/dist/icons/ui-icons/warning-fill.js +17 -0
  850. package/dist/icons/ui-icons/warning.js +30 -0
  851. package/dist/icons/ui-icons/web-video.js +63 -0
  852. package/dist/icons/ui-icons/wide-bottom.js +49 -0
  853. package/dist/icons/ui-icons/wide-left.js +49 -0
  854. package/dist/icons/ui-icons/wide-right.js +49 -0
  855. package/dist/icons/ui-icons/wide-top.js +49 -0
  856. package/dist/icons/ui-icons/width.js +29 -0
  857. package/dist/icons/ui-icons/wordpress.js +17 -0
  858. package/dist/icons/ui-icons/wrapper-alt.js +71 -0
  859. package/dist/icons/ui-icons/wrapper-config.js +41 -0
  860. package/dist/icons/ui-icons/wrapper-off-alt.js +19 -0
  861. package/dist/icons/ui-icons/wrapper-overflow.js +31 -0
  862. package/dist/icons/ui-icons/wrapper-simple-alt.js +58 -0
  863. package/dist/icons/ui-icons/wrapper-simple.js +32 -0
  864. package/dist/icons/ui-icons/wrapper.js +42 -0
  865. package/dist/icons/ui-icons/wrench.js +19 -0
  866. package/dist/icons/ui-icons/zap-fill.js +20 -0
  867. package/dist/icons/ui-icons/zap.js +19 -0
  868. package/dist/index.js +32 -108
  869. package/dist/input-field-UCZL5bqv.js +290 -0
  870. package/dist/jsx-svg-OBADs_Qs.js +11123 -0
  871. package/dist/link-input-D7iDRpOM.js +1821 -0
  872. package/dist/modal-DbVLYMkH.js +318 -0
  873. package/dist/number-ZZIxJukn.js +40 -0
  874. package/dist/number-picker-CkA1iJNZ.js +268 -0
  875. package/dist/proxy-BG7-_Ou3.js +9638 -0
  876. package/dist/shared-DFDimxvX.js +1038 -0
  877. package/dist/smart-image-CbSsEASF.js +284 -0
  878. package/dist/solid-color-picker-DbT-aoVx.js +1415 -0
  879. package/dist/style-admin.js +1 -1
  880. package/dist/style-editor.js +1 -1
  881. package/dist/style.js +1 -1
  882. package/dist/switch-L8dFSQWQ.js +274 -0
  883. package/dist/tabs-BrdyBER5.js +975 -0
  884. package/dist/textSelection-Dv6WPj0Z.js +45 -0
  885. package/dist/toggle-button-DJ8jNQ-9.js +424 -0
  886. package/dist/tooltip-BzJzYlcc.js +440 -0
  887. package/dist/useAsyncList-BNzwKoX4.js +412 -0
  888. package/dist/useButton-ra1ZSZ4z.js +57 -0
  889. package/dist/useEvent-DkZVfgsS.js +22 -0
  890. package/dist/useField-D0WrzR2F.js +32 -0
  891. package/dist/useFilter-OiMnf6sb.js +44 -0
  892. package/dist/useFocusRing-DuYL4cdO.js +98 -0
  893. package/dist/useFormReset-DdkykzAn.js +18 -0
  894. package/dist/useHover-qaMm3XFO.js +982 -0
  895. package/dist/useLabel-2EohW5l6.js +27 -0
  896. package/dist/useLabels-B2p7RXi5.js +16 -0
  897. package/dist/useListState-CD_5vfyy.js +147 -0
  898. package/dist/useLocalizedStringFormatter-Dv2diN3k.js +108 -0
  899. package/dist/useNumberField-2xbi3jRV.js +1318 -0
  900. package/dist/useNumberFormatter-C2Cm2mNj.js +10 -0
  901. package/dist/usePress-ZP1TjkFf.js +678 -0
  902. package/dist/useToggle-ecIirvIM.js +64 -0
  903. package/dist/useToggleState-IIDbiKPl.js +23 -0
  904. package/dist/utilities/array-helpers.js +38 -49
  905. package/dist/utilities/debounce-throttle.js +2 -123
  906. package/dist/utilities/es-dash.js +2 -400
  907. package/dist/utilities/general.js +2 -10
  908. package/dist/utilities/hash.js +31 -35
  909. package/dist/utilities/index.js +6 -41
  910. package/dist/utilities/text-helpers.js +96 -129
  911. package/dist/utilities/web-workers.js +61 -44
  912. package/dist/utilities-CPFDXC3B.js +7 -0
  913. package/dist/utils-B_uiqNa4.js +372 -0
  914. package/dist/workers/image-analysis.worker.js +56 -48
  915. package/package.json +30 -18
  916. package/dist/Button-DtRmB6b8.js +0 -243
  917. package/dist/Dialog-DTIxSDhz.js +0 -2790
  918. package/dist/FieldError-BPG0hKfB.js +0 -42
  919. package/dist/FocusScope-CjFQ7cbd.js +0 -832
  920. package/dist/Form-Cq3fu75_.js +0 -5
  921. package/dist/Heading-CY-_gt-U.js +0 -16
  922. package/dist/Hidden-DOH36apC.js +0 -58
  923. package/dist/Input-BG9DaxYN.js +0 -169
  924. package/dist/Label-_aSf9-8u.js +0 -18
  925. package/dist/List-CQFXnN4w.js +0 -590
  926. package/dist/ListBox-DXFyyj_r.js +0 -695
  927. package/dist/NumberFormatter-DA8u1Ot7.js +0 -140
  928. package/dist/OverlayArrow-Fuxj-1QM.js +0 -614
  929. package/dist/PortalProvider-BQ1X8vGX.js +0 -19
  930. package/dist/RSPContexts-CJ-HBf0L.js +0 -18
  931. package/dist/RadioGroup-DCeiLxLK.js +0 -371
  932. package/dist/SearchField-B_yKFXRk.js +0 -817
  933. package/dist/SelectionIndicator-D7WMzeAW.js +0 -7
  934. package/dist/SelectionManager-B02LcxLr.js +0 -2505
  935. package/dist/SharedElementTransition-CtoWSaF0.js +0 -12
  936. package/dist/Slider-bR3fAmim.js +0 -897
  937. package/dist/Text-CjFEHSfr.js +0 -17
  938. package/dist/VisuallyHidden-DZnWrkn8.js +0 -48
  939. package/dist/animation-Dfl8uEb3.js +0 -67
  940. package/dist/clsx-DgYk2OaC.js +0 -16
  941. package/dist/color-swatch-bUFkK7ox.js +0 -2570
  942. package/dist/components/smart-image/image-analysis-worker-next.js +0 -144
  943. package/dist/components/smart-image/smart-image-next.js +0 -294
  944. package/dist/context-iUFQCK8m.js +0 -95
  945. package/dist/default-i18n-CnQeC5Pl.js +0 -731
  946. package/dist/filterDOMProps-eGTqWSTd.js +0 -71
  947. package/dist/general-BfKmjm56.js +0 -4378
  948. package/dist/index-BHpUy2Ix.js +0 -44
  949. package/dist/index-BL5gdWX4.js +0 -28323
  950. package/dist/number-7sOvrqo0.js +0 -41
  951. package/dist/proxy-CNEXmkdK.js +0 -7948
  952. package/dist/react-jsx-parser.min-DAh4myol.js +0 -11736
  953. package/dist/shared-CNH8QfV9.js +0 -1111
  954. package/dist/sprintf-DmNrJSYG.js +0 -51
  955. package/dist/textSelection-DA3VcKpG.js +0 -46
  956. package/dist/useAsyncList-DsZvQXls.js +0 -453
  957. package/dist/useButton-DyMX0EVr.js +0 -59
  958. package/dist/useEvent-Bfy68GHZ.js +0 -22
  959. package/dist/useFilter-Bg5C34XC.js +0 -50
  960. package/dist/useFocusRing-B2glEZ25.js +0 -114
  961. package/dist/useFormReset-BoxsKyJ9.js +0 -20
  962. package/dist/useFormValidation-BrbMhS2N.js +0 -232
  963. package/dist/useHover-DkmPQdGE.js +0 -1047
  964. package/dist/useLabel-DzXzKZZZ.js +0 -27
  965. package/dist/useLabels-D8O3gOdV.js +0 -23
  966. package/dist/useListState-BjnzKozj.js +0 -171
  967. package/dist/useLocalizedStringFormatter-CEDs0LsA.js +0 -121
  968. package/dist/useNumberField-CsygZKz9.js +0 -1330
  969. package/dist/useNumberFormatter-CG_IQXp9.js +0 -13
  970. package/dist/usePress-Ck5xMtDr.js +0 -701
  971. package/dist/useToggle-Ddc7N8pR.js +0 -72
  972. package/dist/useToggleState-H_lORSWO.js +0 -23
  973. package/dist/utils-Cr3pLd9c.js +0 -420
@@ -1,2505 +0,0 @@
1
- import { E as $c87311424ea30a05$export$9ac100e40613ea10, d as $c87311424ea30a05$export$fedb369cb70207f1, t as $c87311424ea30a05$export$6446a186d09e379e, g as $03deb23ff14920c4$export$4eaf04e54aa8eed6, e as $431fbd86ca7dc216$export$b204af158042fbac, A as $7215afc6de606d6b$export$de79e2c695e052f3, j as $d4ee10de306f2510$export$cd4e5573fbe2b576, L as $c87311424ea30a05$export$e1865c3bedcd822b, h as $d4ee10de306f2510$export$4282f70798064fe0, b as $d4ee10de306f2510$export$e58f029f0fbfdb29, M as $ea8dcbcb9ea1b556$export$9a302a45f65d0572, u as $3ad3f6e1647bc98d$export$80f3e147d781571c, v as $507fabe10e71c6fb$export$630ff653c5ada6a9, D as $d4ee10de306f2510$export$b4f377a2b6254582, q as $b4b717babfbb907b$export$bebd5a1431fec25d, K as $ea8dcbcb9ea1b556$export$95185d699e05d4d7, N as $f645667febf57a63$export$f9762fab77588ecb, a as $458b0a5536c1a7cf$export$40bfa8c7b0832715 } from "./useHover-DkmPQdGE.js";
2
- import $dbSRa$react__default, { useRef, useState, useEffect, useMemo, cloneElement, useContext, createContext, forwardRef, useCallback, isValidElement } from "react";
3
- import { c as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, b as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $bdb11010cef70236$export$f680877a34711e37, o as $ff5963eb1fccf552$export$e08e3b67e392101e, m as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-Cr3pLd9c.js";
4
- import { $ as $e9faafb641e167db$export$90fc3a17d93f704c } from "./useEvent-Bfy68GHZ.js";
5
- import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "./FocusScope-CjFQ7cbd.js";
6
- import { r as reactDomExports } from "./index-BL5gdWX4.js";
7
- import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "./context-iUFQCK8m.js";
8
- import { $ as $f6c31cce2adf654f$export$45712eceda6fad21 } from "./usePress-Ck5xMtDr.js";
9
- import { a as $f39a9eba43920ace$export$8dc98ba7eadeaa56 } from "./Hidden-DOH36apC.js";
10
- function $ca9b37712f007381$export$72ef708ab07251f1(effect, dependencies) {
11
- const isInitialMount = useRef(true);
12
- const lastDeps = useRef(null);
13
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
14
- isInitialMount.current = true;
15
- return () => {
16
- isInitialMount.current = false;
17
- };
18
- }, []);
19
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
20
- if (isInitialMount.current) isInitialMount.current = false;
21
- else if (!lastDeps.current || dependencies.some((dep, i) => !Object.is(dep, lastDeps[i]))) effect();
22
- lastDeps.current = dependencies;
23
- }, dependencies);
24
- }
25
- function $cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow) {
26
- if (!node) return false;
27
- let style = window.getComputedStyle(node);
28
- let root = document.scrollingElement || document.documentElement;
29
- let isScrollable = /(auto|scroll)/.test(style.overflow + style.overflowX + style.overflowY);
30
- if (node === root && style.overflow !== "hidden") isScrollable = true;
31
- if (isScrollable && checkForOverflow) isScrollable = node.scrollHeight !== node.clientHeight || node.scrollWidth !== node.clientWidth;
32
- return isScrollable;
33
- }
34
- function $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(node, checkForOverflow) {
35
- let parentElements = [];
36
- let root = document.scrollingElement || document.documentElement;
37
- do {
38
- if ($cc38e7bd3fc7b213$export$2bb74740c4e19def(node, checkForOverflow)) parentElements.push(node);
39
- node = node.parentElement;
40
- } while (node && node !== root);
41
- return parentElements;
42
- }
43
- function $21f1aa98acb08317$export$16792effe837dba3(e) {
44
- if ($c87311424ea30a05$export$9ac100e40613ea10()) return e.metaKey;
45
- return e.ctrlKey;
46
- }
47
- const $21f1aa98acb08317$var$nonTextInputTypes = /* @__PURE__ */ new Set([
48
- "checkbox",
49
- "radio",
50
- "range",
51
- "color",
52
- "file",
53
- "image",
54
- "button",
55
- "submit",
56
- "reset"
57
- ]);
58
- function $21f1aa98acb08317$export$c57958e35f31ed73(target) {
59
- return target instanceof HTMLInputElement && !$21f1aa98acb08317$var$nonTextInputTypes.has(target.type) || target instanceof HTMLTextAreaElement || target instanceof HTMLElement && target.isContentEditable;
60
- }
61
- let $ef06256079686ba0$var$descriptionId = 0;
62
- const $ef06256079686ba0$var$descriptionNodes = /* @__PURE__ */ new Map();
63
- function $ef06256079686ba0$export$f8aeda7b10753fa1(description) {
64
- let [id, setId] = useState();
65
- $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
66
- if (!description) return;
67
- let desc = $ef06256079686ba0$var$descriptionNodes.get(description);
68
- if (!desc) {
69
- let id2 = `react-aria-description-${$ef06256079686ba0$var$descriptionId++}`;
70
- setId(id2);
71
- let node = document.createElement("div");
72
- node.id = id2;
73
- node.style.display = "none";
74
- node.textContent = description;
75
- document.body.appendChild(node);
76
- desc = {
77
- refCount: 0,
78
- element: node
79
- };
80
- $ef06256079686ba0$var$descriptionNodes.set(description, desc);
81
- } else setId(desc.element.id);
82
- desc.refCount++;
83
- return () => {
84
- if (desc && --desc.refCount === 0) {
85
- desc.element.remove();
86
- $ef06256079686ba0$var$descriptionNodes.delete(description);
87
- }
88
- };
89
- }, [
90
- description
91
- ]);
92
- return {
93
- "aria-describedby": description ? id : void 0
94
- };
95
- }
96
- function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element, opts = {}) {
97
- let { block = "nearest", inline = "nearest" } = opts;
98
- if (scrollView === element) return;
99
- let y = scrollView.scrollTop;
100
- let x = scrollView.scrollLeft;
101
- let target = element.getBoundingClientRect();
102
- let view = scrollView.getBoundingClientRect();
103
- let itemStyle = window.getComputedStyle(element);
104
- let viewStyle = window.getComputedStyle(scrollView);
105
- let root = document.scrollingElement || document.documentElement;
106
- let viewTop = scrollView === root ? 0 : view.top;
107
- let viewBottom = scrollView === root ? scrollView.clientHeight : view.bottom;
108
- let viewLeft = scrollView === root ? 0 : view.left;
109
- let viewRight = scrollView === root ? scrollView.clientWidth : view.right;
110
- let scrollMarginTop = parseInt(itemStyle.scrollMarginTop, 10) || 0;
111
- let scrollMarginBottom = parseInt(itemStyle.scrollMarginBottom, 10) || 0;
112
- let scrollMarginLeft = parseInt(itemStyle.scrollMarginLeft, 10) || 0;
113
- let scrollMarginRight = parseInt(itemStyle.scrollMarginRight, 10) || 0;
114
- let scrollPaddingTop = parseInt(viewStyle.scrollPaddingTop, 10) || 0;
115
- let scrollPaddingBottom = parseInt(viewStyle.scrollPaddingBottom, 10) || 0;
116
- let scrollPaddingLeft = parseInt(viewStyle.scrollPaddingLeft, 10) || 0;
117
- let scrollPaddingRight = parseInt(viewStyle.scrollPaddingRight, 10) || 0;
118
- let borderTopWidth = parseInt(viewStyle.borderTopWidth, 10) || 0;
119
- let borderBottomWidth = parseInt(viewStyle.borderBottomWidth, 10) || 0;
120
- let borderLeftWidth = parseInt(viewStyle.borderLeftWidth, 10) || 0;
121
- let borderRightWidth = parseInt(viewStyle.borderRightWidth, 10) || 0;
122
- let scrollAreaTop = target.top - scrollMarginTop;
123
- let scrollAreaBottom = target.bottom + scrollMarginBottom;
124
- let scrollAreaLeft = target.left - scrollMarginLeft;
125
- let scrollAreaRight = target.right + scrollMarginRight;
126
- let scrollBarOffsetX = scrollView === root ? 0 : borderLeftWidth + borderRightWidth;
127
- let scrollBarOffsetY = scrollView === root ? 0 : borderTopWidth + borderBottomWidth;
128
- let scrollBarWidth = scrollView.offsetWidth - scrollView.clientWidth - scrollBarOffsetX;
129
- let scrollBarHeight = scrollView.offsetHeight - scrollView.clientHeight - scrollBarOffsetY;
130
- let scrollPortTop = viewTop + borderTopWidth + scrollPaddingTop;
131
- let scrollPortBottom = viewBottom - borderBottomWidth - scrollPaddingBottom - scrollBarHeight;
132
- let scrollPortLeft = viewLeft + borderLeftWidth + scrollPaddingLeft;
133
- let scrollPortRight = viewRight - borderRightWidth - scrollPaddingRight;
134
- if (viewStyle.direction === "rtl" && !$c87311424ea30a05$export$fedb369cb70207f1()) scrollPortLeft += scrollBarWidth;
135
- else scrollPortRight -= scrollBarWidth;
136
- let shouldScrollBlock = scrollAreaTop < scrollPortTop || scrollAreaBottom > scrollPortBottom;
137
- let shouldScrollInline = scrollAreaLeft < scrollPortLeft || scrollAreaRight > scrollPortRight;
138
- if (shouldScrollBlock && block === "start") y += scrollAreaTop - scrollPortTop;
139
- else if (shouldScrollBlock && block === "center") y += (scrollAreaTop + scrollAreaBottom) / 2 - (scrollPortTop + scrollPortBottom) / 2;
140
- else if (shouldScrollBlock && block === "end") y += scrollAreaBottom - scrollPortBottom;
141
- else if (shouldScrollBlock && block === "nearest") {
142
- let start = scrollAreaTop - scrollPortTop;
143
- let end = scrollAreaBottom - scrollPortBottom;
144
- y += Math.abs(start) <= Math.abs(end) ? start : end;
145
- }
146
- if (shouldScrollInline && inline === "start") x += scrollAreaLeft - scrollPortLeft;
147
- else if (shouldScrollInline && inline === "center") x += (scrollAreaLeft + scrollAreaRight) / 2 - (scrollPortLeft + scrollPortRight) / 2;
148
- else if (shouldScrollInline && inline === "end") x += scrollAreaRight - scrollPortRight;
149
- else if (shouldScrollInline && inline === "nearest") {
150
- let start = scrollAreaLeft - scrollPortLeft;
151
- let end = scrollAreaRight - scrollPortRight;
152
- x += Math.abs(start) <= Math.abs(end) ? start : end;
153
- }
154
- if (process.env.NODE_ENV === "test") {
155
- scrollView.scrollLeft = x;
156
- scrollView.scrollTop = y;
157
- return;
158
- }
159
- scrollView.scrollTo({
160
- left: x,
161
- top: y
162
- });
163
- }
164
- function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts = {}) {
165
- let { containingElement } = opts;
166
- if (targetElement && targetElement.isConnected) {
167
- let root = document.scrollingElement || document.documentElement;
168
- let isScrollPrevented = window.getComputedStyle(root).overflow === "hidden";
169
- if (!isScrollPrevented && !$c87311424ea30a05$export$6446a186d09e379e()) {
170
- var _targetElement_scrollIntoView;
171
- let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
172
- targetElement === null || targetElement === void 0 ? void 0 : (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 ? void 0 : _targetElement_scrollIntoView.call(targetElement, {
173
- block: "nearest"
174
- });
175
- let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
176
- if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
177
- var _containingElement_scrollIntoView, _targetElement_scrollIntoView1;
178
- containingElement === null || containingElement === void 0 ? void 0 : (_containingElement_scrollIntoView = containingElement.scrollIntoView) === null || _containingElement_scrollIntoView === void 0 ? void 0 : _containingElement_scrollIntoView.call(containingElement, {
179
- block: "center",
180
- inline: "center"
181
- });
182
- (_targetElement_scrollIntoView1 = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView1 === void 0 ? void 0 : _targetElement_scrollIntoView1.call(targetElement, {
183
- block: "nearest"
184
- });
185
- }
186
- } else {
187
- let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
188
- let scrollParents = $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(targetElement, true);
189
- for (let scrollParent of scrollParents) $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);
190
- let { left: newLeft, top: newTop } = targetElement.getBoundingClientRect();
191
- if (Math.abs(originalLeft - newLeft) > 1 || Math.abs(originalTop - newTop) > 1) {
192
- scrollParents = containingElement ? $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(containingElement, true) : [];
193
- for (let scrollParent of scrollParents) $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, containingElement, {
194
- block: "center",
195
- inline: "center"
196
- });
197
- }
198
- }
199
- }
200
- }
201
- const $5671b20cf9b562b2$export$447a38995de2c711 = "react-aria-clear-focus";
202
- const $5671b20cf9b562b2$export$831c820ad60f9d12 = "react-aria-focus";
203
- const $8a26561d2877236e$var$DEFAULT_THRESHOLD = 500;
204
- function $8a26561d2877236e$export$c24ed0104d07eab9(props) {
205
- let { isDisabled, onLongPressStart, onLongPressEnd, onLongPress, threshold = $8a26561d2877236e$var$DEFAULT_THRESHOLD, accessibilityDescription } = props;
206
- const timeRef = useRef(void 0);
207
- let { addGlobalListener, removeGlobalListener } = $03deb23ff14920c4$export$4eaf04e54aa8eed6();
208
- let { pressProps } = $f6c31cce2adf654f$export$45712eceda6fad21({
209
- isDisabled,
210
- onPressStart(e) {
211
- e.continuePropagation();
212
- if (e.pointerType === "mouse" || e.pointerType === "touch") {
213
- if (onLongPressStart) onLongPressStart({
214
- ...e,
215
- type: "longpressstart"
216
- });
217
- timeRef.current = setTimeout(() => {
218
- e.target.dispatchEvent(new PointerEvent("pointercancel", {
219
- bubbles: true
220
- }));
221
- if ($431fbd86ca7dc216$export$b204af158042fbac(e.target).activeElement !== e.target) $7215afc6de606d6b$export$de79e2c695e052f3(e.target);
222
- if (onLongPress) onLongPress({
223
- ...e,
224
- type: "longpress"
225
- });
226
- timeRef.current = void 0;
227
- }, threshold);
228
- if (e.pointerType === "touch") {
229
- let onContextMenu = (e2) => {
230
- e2.preventDefault();
231
- };
232
- addGlobalListener(e.target, "contextmenu", onContextMenu, {
233
- once: true
234
- });
235
- addGlobalListener(window, "pointerup", () => {
236
- setTimeout(() => {
237
- removeGlobalListener(e.target, "contextmenu", onContextMenu);
238
- }, 30);
239
- }, {
240
- once: true
241
- });
242
- }
243
- }
244
- },
245
- onPressEnd(e) {
246
- if (timeRef.current) clearTimeout(timeRef.current);
247
- if (onLongPressEnd && (e.pointerType === "mouse" || e.pointerType === "touch")) onLongPressEnd({
248
- ...e,
249
- type: "longpressend"
250
- });
251
- }
252
- });
253
- let descriptionProps = $ef06256079686ba0$export$f8aeda7b10753fa1(onLongPress && !isDisabled ? accessibilityDescription : void 0);
254
- return {
255
- longPressProps: $3ef42575df84b30b$export$9d1611c77c2fe928(pressProps, descriptionProps)
256
- };
257
- }
258
- function $55f9b1ae81f22853$export$76e4e37e5339496d(to) {
259
- let from = $55f9b1ae81f22853$export$759df0d867455a91($431fbd86ca7dc216$export$b204af158042fbac(to));
260
- if (from !== to) {
261
- if (from) $55f9b1ae81f22853$export$6c5dc7e81d2cc29a(from, to);
262
- if (to) $55f9b1ae81f22853$export$2b35b76d2e30e129(to, from);
263
- }
264
- }
265
- function $55f9b1ae81f22853$export$6c5dc7e81d2cc29a(from, to) {
266
- from.dispatchEvent(new FocusEvent("blur", {
267
- relatedTarget: to
268
- }));
269
- from.dispatchEvent(new FocusEvent("focusout", {
270
- bubbles: true,
271
- relatedTarget: to
272
- }));
273
- }
274
- function $55f9b1ae81f22853$export$2b35b76d2e30e129(to, from) {
275
- to.dispatchEvent(new FocusEvent("focus", {
276
- relatedTarget: from
277
- }));
278
- to.dispatchEvent(new FocusEvent("focusin", {
279
- bubbles: true,
280
- relatedTarget: from
281
- }));
282
- }
283
- function $55f9b1ae81f22853$export$759df0d867455a91(document2) {
284
- let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576(document2);
285
- let activeDescendant = activeElement === null || activeElement === void 0 ? void 0 : activeElement.getAttribute("aria-activedescendant");
286
- if (activeDescendant) return document2.getElementById(activeDescendant) || activeElement;
287
- return activeElement;
288
- }
289
- function $feb5ffebff200149$export$d3e3bd3e26688c04(e) {
290
- return $c87311424ea30a05$export$e1865c3bedcd822b() ? e.altKey : e.ctrlKey;
291
- }
292
- function $feb5ffebff200149$export$c3d8340acf92597f(collectionRef, key) {
293
- var _collectionRef_current, _collectionRef_current1;
294
- let selector = `[data-key="${CSS.escape(String(key))}"]`;
295
- let collection = (_collectionRef_current = collectionRef.current) === null || _collectionRef_current === void 0 ? void 0 : _collectionRef_current.dataset.collection;
296
- if (collection) selector = `[data-collection="${CSS.escape(collection)}"]${selector}`;
297
- return (_collectionRef_current1 = collectionRef.current) === null || _collectionRef_current1 === void 0 ? void 0 : _collectionRef_current1.querySelector(selector);
298
- }
299
- const $feb5ffebff200149$var$collectionMap = /* @__PURE__ */ new WeakMap();
300
- function $feb5ffebff200149$export$881eb0d9f3605d9d(collection) {
301
- let id = $bdb11010cef70236$export$f680877a34711e37();
302
- $feb5ffebff200149$var$collectionMap.set(collection, id);
303
- return id;
304
- }
305
- function $feb5ffebff200149$export$6aeb1680a0ae8741(collection) {
306
- return $feb5ffebff200149$var$collectionMap.get(collection);
307
- }
308
- const $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS = 1e3;
309
- function $fb3050f43d946246$export$e32c88dfddc6e1d8(options) {
310
- let { keyboardDelegate, selectionManager, onTypeSelect } = options;
311
- let state = useRef({
312
- search: "",
313
- timeout: void 0
314
- }).current;
315
- let onKeyDown = (e) => {
316
- let character = $fb3050f43d946246$var$getStringForKey(e.key);
317
- if (!character || e.ctrlKey || e.metaKey || !$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e)) || state.search.length === 0 && character === " ") return;
318
- if (character === " " && state.search.trim().length > 0) {
319
- e.preventDefault();
320
- if (!("continuePropagation" in e)) e.stopPropagation();
321
- }
322
- state.search += character;
323
- if (keyboardDelegate.getKeyForSearch != null) {
324
- let key = keyboardDelegate.getKeyForSearch(state.search, selectionManager.focusedKey);
325
- if (key == null) key = keyboardDelegate.getKeyForSearch(state.search);
326
- if (key != null) {
327
- selectionManager.setFocusedKey(key);
328
- if (onTypeSelect) onTypeSelect(key);
329
- }
330
- }
331
- clearTimeout(state.timeout);
332
- state.timeout = setTimeout(() => {
333
- state.search = "";
334
- }, $fb3050f43d946246$var$TYPEAHEAD_DEBOUNCE_WAIT_MS);
335
- };
336
- return {
337
- typeSelectProps: {
338
- // Using a capturing listener to catch the keydown event before
339
- // other hooks in order to handle the Spacebar event.
340
- onKeyDownCapture: keyboardDelegate.getKeyForSearch ? onKeyDown : void 0
341
- }
342
- };
343
- }
344
- function $fb3050f43d946246$var$getStringForKey(key) {
345
- if (key.length === 1 || !/^[A-Z]/i.test(key)) return key;
346
- return "";
347
- }
348
- function $ae20dd8cbca75726$export$d6daf82dcd84e87c(options) {
349
- let { selectionManager: manager, keyboardDelegate: delegate, ref, autoFocus = false, shouldFocusWrap = false, disallowEmptySelection = false, disallowSelectAll = false, escapeKeyBehavior = "clearSelection", selectOnFocus = manager.selectionBehavior === "replace", disallowTypeAhead = false, shouldUseVirtualFocus, allowsTabNavigation = false, scrollRef = ref, linkBehavior = "action" } = options;
350
- let { direction } = $18f2051aff69b9bf$export$43bb16f9c6d9e3f7();
351
- let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
352
- let onKeyDown = (e) => {
353
- if (e.altKey && e.key === "Tab") e.preventDefault();
354
- if (!ref.current || !$d4ee10de306f2510$export$4282f70798064fe0(ref.current, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) return;
355
- const navigateToKey = (key, childFocus) => {
356
- if (key != null) {
357
- if (manager.isLink(key) && linkBehavior === "selection" && selectOnFocus && !$feb5ffebff200149$export$d3e3bd3e26688c04(e)) {
358
- reactDomExports.flushSync(() => {
359
- manager.setFocusedKey(key, childFocus);
360
- });
361
- let item = $feb5ffebff200149$export$c3d8340acf92597f(ref, key);
362
- let itemProps = manager.getItemProps(key);
363
- if (item) router.open(item, e, itemProps.href, itemProps.routerOptions);
364
- return;
365
- }
366
- manager.setFocusedKey(key, childFocus);
367
- if (manager.isLink(key) && linkBehavior === "override") return;
368
- if (e.shiftKey && manager.selectionMode === "multiple") manager.extendSelection(key);
369
- else if (selectOnFocus && !$feb5ffebff200149$export$d3e3bd3e26688c04(e)) manager.replaceSelection(key);
370
- }
371
- };
372
- switch (e.key) {
373
- case "ArrowDown":
374
- if (delegate.getKeyBelow) {
375
- var _delegate_getKeyBelow, _delegate_getFirstKey, _delegate_getFirstKey1;
376
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyBelow = delegate.getKeyBelow) === null || _delegate_getKeyBelow === void 0 ? void 0 : _delegate_getKeyBelow.call(delegate, manager.focusedKey) : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate);
377
- if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getFirstKey1 = delegate.getFirstKey) === null || _delegate_getFirstKey1 === void 0 ? void 0 : _delegate_getFirstKey1.call(delegate, manager.focusedKey);
378
- if (nextKey != null) {
379
- e.preventDefault();
380
- navigateToKey(nextKey);
381
- }
382
- }
383
- break;
384
- case "ArrowUp":
385
- if (delegate.getKeyAbove) {
386
- var _delegate_getKeyAbove, _delegate_getLastKey, _delegate_getLastKey1;
387
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyAbove = delegate.getKeyAbove) === null || _delegate_getKeyAbove === void 0 ? void 0 : _delegate_getKeyAbove.call(delegate, manager.focusedKey) : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate);
388
- if (nextKey == null && shouldFocusWrap) nextKey = (_delegate_getLastKey1 = delegate.getLastKey) === null || _delegate_getLastKey1 === void 0 ? void 0 : _delegate_getLastKey1.call(delegate, manager.focusedKey);
389
- if (nextKey != null) {
390
- e.preventDefault();
391
- navigateToKey(nextKey);
392
- }
393
- }
394
- break;
395
- case "ArrowLeft":
396
- if (delegate.getKeyLeftOf) {
397
- var _delegate_getKeyLeftOf, _delegate_getFirstKey2, _delegate_getLastKey2;
398
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyLeftOf = delegate.getKeyLeftOf) === null || _delegate_getKeyLeftOf === void 0 ? void 0 : _delegate_getKeyLeftOf.call(delegate, manager.focusedKey) : null;
399
- if (nextKey == null && shouldFocusWrap) nextKey = direction === "rtl" ? (_delegate_getFirstKey2 = delegate.getFirstKey) === null || _delegate_getFirstKey2 === void 0 ? void 0 : _delegate_getFirstKey2.call(delegate, manager.focusedKey) : (_delegate_getLastKey2 = delegate.getLastKey) === null || _delegate_getLastKey2 === void 0 ? void 0 : _delegate_getLastKey2.call(delegate, manager.focusedKey);
400
- if (nextKey != null) {
401
- e.preventDefault();
402
- navigateToKey(nextKey, direction === "rtl" ? "first" : "last");
403
- }
404
- }
405
- break;
406
- case "ArrowRight":
407
- if (delegate.getKeyRightOf) {
408
- var _delegate_getKeyRightOf, _delegate_getLastKey3, _delegate_getFirstKey3;
409
- let nextKey = manager.focusedKey != null ? (_delegate_getKeyRightOf = delegate.getKeyRightOf) === null || _delegate_getKeyRightOf === void 0 ? void 0 : _delegate_getKeyRightOf.call(delegate, manager.focusedKey) : null;
410
- if (nextKey == null && shouldFocusWrap) nextKey = direction === "rtl" ? (_delegate_getLastKey3 = delegate.getLastKey) === null || _delegate_getLastKey3 === void 0 ? void 0 : _delegate_getLastKey3.call(delegate, manager.focusedKey) : (_delegate_getFirstKey3 = delegate.getFirstKey) === null || _delegate_getFirstKey3 === void 0 ? void 0 : _delegate_getFirstKey3.call(delegate, manager.focusedKey);
411
- if (nextKey != null) {
412
- e.preventDefault();
413
- navigateToKey(nextKey, direction === "rtl" ? "last" : "first");
414
- }
415
- }
416
- break;
417
- case "Home":
418
- if (delegate.getFirstKey) {
419
- if (manager.focusedKey === null && e.shiftKey) return;
420
- e.preventDefault();
421
- let firstKey = delegate.getFirstKey(manager.focusedKey, $21f1aa98acb08317$export$16792effe837dba3(e));
422
- manager.setFocusedKey(firstKey);
423
- if (firstKey != null) {
424
- if ($21f1aa98acb08317$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") manager.extendSelection(firstKey);
425
- else if (selectOnFocus) manager.replaceSelection(firstKey);
426
- }
427
- }
428
- break;
429
- case "End":
430
- if (delegate.getLastKey) {
431
- if (manager.focusedKey === null && e.shiftKey) return;
432
- e.preventDefault();
433
- let lastKey = delegate.getLastKey(manager.focusedKey, $21f1aa98acb08317$export$16792effe837dba3(e));
434
- manager.setFocusedKey(lastKey);
435
- if (lastKey != null) {
436
- if ($21f1aa98acb08317$export$16792effe837dba3(e) && e.shiftKey && manager.selectionMode === "multiple") manager.extendSelection(lastKey);
437
- else if (selectOnFocus) manager.replaceSelection(lastKey);
438
- }
439
- }
440
- break;
441
- case "PageDown":
442
- if (delegate.getKeyPageBelow && manager.focusedKey != null) {
443
- let nextKey = delegate.getKeyPageBelow(manager.focusedKey);
444
- if (nextKey != null) {
445
- e.preventDefault();
446
- navigateToKey(nextKey);
447
- }
448
- }
449
- break;
450
- case "PageUp":
451
- if (delegate.getKeyPageAbove && manager.focusedKey != null) {
452
- let nextKey = delegate.getKeyPageAbove(manager.focusedKey);
453
- if (nextKey != null) {
454
- e.preventDefault();
455
- navigateToKey(nextKey);
456
- }
457
- }
458
- break;
459
- case "a":
460
- if ($21f1aa98acb08317$export$16792effe837dba3(e) && manager.selectionMode === "multiple" && disallowSelectAll !== true) {
461
- e.preventDefault();
462
- manager.selectAll();
463
- }
464
- break;
465
- case "Escape":
466
- if (escapeKeyBehavior === "clearSelection" && !disallowEmptySelection && manager.selectedKeys.size !== 0) {
467
- e.stopPropagation();
468
- e.preventDefault();
469
- manager.clearSelection();
470
- }
471
- break;
472
- case "Tab":
473
- if (!allowsTabNavigation) {
474
- if (e.shiftKey) ref.current.focus();
475
- else {
476
- let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ref.current, {
477
- tabbable: true
478
- });
479
- let next = void 0;
480
- let last;
481
- do {
482
- last = walker.lastChild();
483
- if (last) next = last;
484
- } while (last);
485
- let activeElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
486
- if (next && (!$d4ee10de306f2510$export$b4f377a2b6254582(next) || activeElement && !$b4b717babfbb907b$export$bebd5a1431fec25d(activeElement))) $7215afc6de606d6b$export$de79e2c695e052f3(next);
487
- }
488
- break;
489
- }
490
- }
491
- };
492
- let scrollPos = useRef({
493
- top: 0,
494
- left: 0
495
- });
496
- $e9faafb641e167db$export$90fc3a17d93f704c(scrollRef, "scroll", () => {
497
- var _scrollRef_current, _scrollRef_current1;
498
- var _scrollRef_current_scrollTop, _scrollRef_current_scrollLeft;
499
- scrollPos.current = {
500
- top: (_scrollRef_current_scrollTop = (_scrollRef_current = scrollRef.current) === null || _scrollRef_current === void 0 ? void 0 : _scrollRef_current.scrollTop) !== null && _scrollRef_current_scrollTop !== void 0 ? _scrollRef_current_scrollTop : 0,
501
- left: (_scrollRef_current_scrollLeft = (_scrollRef_current1 = scrollRef.current) === null || _scrollRef_current1 === void 0 ? void 0 : _scrollRef_current1.scrollLeft) !== null && _scrollRef_current_scrollLeft !== void 0 ? _scrollRef_current_scrollLeft : 0
502
- };
503
- });
504
- let onFocus = (e) => {
505
- if (manager.isFocused) {
506
- if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) manager.setFocused(false);
507
- return;
508
- }
509
- if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, $d4ee10de306f2510$export$e58f029f0fbfdb29(e))) return;
510
- manager.setFocused(true);
511
- if (manager.focusedKey == null) {
512
- var _delegate_getLastKey, _delegate_getFirstKey;
513
- let navigateToKey = (key) => {
514
- if (key != null) {
515
- manager.setFocusedKey(key);
516
- if (selectOnFocus && !manager.isSelected(key)) manager.replaceSelection(key);
517
- }
518
- };
519
- let relatedTarget = e.relatedTarget;
520
- var _manager_lastSelectedKey, _manager_firstSelectedKey;
521
- if (relatedTarget && e.currentTarget.compareDocumentPosition(relatedTarget) & Node.DOCUMENT_POSITION_FOLLOWING) navigateToKey((_manager_lastSelectedKey = manager.lastSelectedKey) !== null && _manager_lastSelectedKey !== void 0 ? _manager_lastSelectedKey : (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate));
522
- else navigateToKey((_manager_firstSelectedKey = manager.firstSelectedKey) !== null && _manager_firstSelectedKey !== void 0 ? _manager_firstSelectedKey : (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate));
523
- } else if (scrollRef.current) {
524
- scrollRef.current.scrollTop = scrollPos.current.top;
525
- scrollRef.current.scrollLeft = scrollPos.current.left;
526
- }
527
- if (manager.focusedKey != null && scrollRef.current) {
528
- let element = $feb5ffebff200149$export$c3d8340acf92597f(ref, manager.focusedKey);
529
- if (element instanceof HTMLElement) {
530
- if (!$d4ee10de306f2510$export$b4f377a2b6254582(element) && !shouldUseVirtualFocus) $7215afc6de606d6b$export$de79e2c695e052f3(element);
531
- let modality = $507fabe10e71c6fb$export$630ff653c5ada6a9();
532
- if (modality === "keyboard") $2f04cbc44ee30ce0$export$c826860796309d1b(element, {
533
- containingElement: ref.current
534
- });
535
- }
536
- }
537
- };
538
- let onBlur = (e) => {
539
- if (!$d4ee10de306f2510$export$4282f70798064fe0(e.currentTarget, e.relatedTarget)) manager.setFocused(false);
540
- };
541
- let shouldVirtualFocusFirst = useRef(false);
542
- $e9faafb641e167db$export$90fc3a17d93f704c(ref, $5671b20cf9b562b2$export$831c820ad60f9d12, !shouldUseVirtualFocus ? void 0 : (e) => {
543
- let { detail } = e;
544
- e.stopPropagation();
545
- manager.setFocused(true);
546
- if ((detail === null || detail === void 0 ? void 0 : detail.focusStrategy) === "first") shouldVirtualFocusFirst.current = true;
547
- });
548
- $ca9b37712f007381$export$72ef708ab07251f1(() => {
549
- if (shouldVirtualFocusFirst.current) {
550
- var _delegate_getFirstKey;
551
- var _delegate_getFirstKey1;
552
- let keyToFocus = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null;
553
- if (keyToFocus == null) {
554
- let previousActiveElement = $d4ee10de306f2510$export$cd4e5573fbe2b576();
555
- $55f9b1ae81f22853$export$76e4e37e5339496d(ref.current);
556
- $55f9b1ae81f22853$export$2b35b76d2e30e129(previousActiveElement, null);
557
- if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
558
- } else {
559
- manager.setFocusedKey(keyToFocus);
560
- shouldVirtualFocusFirst.current = false;
561
- }
562
- }
563
- }, [
564
- manager.collection
565
- ]);
566
- $ca9b37712f007381$export$72ef708ab07251f1(() => {
567
- if (manager.collection.size > 0) shouldVirtualFocusFirst.current = false;
568
- }, [
569
- manager.focusedKey
570
- ]);
571
- $e9faafb641e167db$export$90fc3a17d93f704c(ref, $5671b20cf9b562b2$export$447a38995de2c711, !shouldUseVirtualFocus ? void 0 : (e) => {
572
- var _e_detail;
573
- e.stopPropagation();
574
- manager.setFocused(false);
575
- if ((_e_detail = e.detail) === null || _e_detail === void 0 ? void 0 : _e_detail.clearFocusKey) manager.setFocusedKey(null);
576
- });
577
- const autoFocusRef = useRef(autoFocus);
578
- const didAutoFocusRef = useRef(false);
579
- useEffect(() => {
580
- if (autoFocusRef.current) {
581
- var _delegate_getFirstKey, _delegate_getLastKey;
582
- let focusedKey = null;
583
- var _delegate_getFirstKey1;
584
- if (autoFocus === "first") focusedKey = (_delegate_getFirstKey1 = (_delegate_getFirstKey = delegate.getFirstKey) === null || _delegate_getFirstKey === void 0 ? void 0 : _delegate_getFirstKey.call(delegate)) !== null && _delegate_getFirstKey1 !== void 0 ? _delegate_getFirstKey1 : null;
585
- var _delegate_getLastKey1;
586
- if (autoFocus === "last") focusedKey = (_delegate_getLastKey1 = (_delegate_getLastKey = delegate.getLastKey) === null || _delegate_getLastKey === void 0 ? void 0 : _delegate_getLastKey.call(delegate)) !== null && _delegate_getLastKey1 !== void 0 ? _delegate_getLastKey1 : null;
587
- let selectedKeys = manager.selectedKeys;
588
- if (selectedKeys.size) {
589
- for (let key of selectedKeys) if (manager.canSelectItem(key)) {
590
- focusedKey = key;
591
- break;
592
- }
593
- }
594
- manager.setFocused(true);
595
- manager.setFocusedKey(focusedKey);
596
- if (focusedKey == null && !shouldUseVirtualFocus && ref.current) $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
597
- if (manager.collection.size > 0) {
598
- autoFocusRef.current = false;
599
- didAutoFocusRef.current = true;
600
- }
601
- }
602
- });
603
- let lastFocusedKey = useRef(manager.focusedKey);
604
- let raf = useRef(null);
605
- useEffect(() => {
606
- if (manager.isFocused && manager.focusedKey != null && (manager.focusedKey !== lastFocusedKey.current || didAutoFocusRef.current) && scrollRef.current && ref.current) {
607
- let modality = $507fabe10e71c6fb$export$630ff653c5ada6a9();
608
- let element = $feb5ffebff200149$export$c3d8340acf92597f(ref, manager.focusedKey);
609
- if (!(element instanceof HTMLElement))
610
- return;
611
- if (modality === "keyboard" || didAutoFocusRef.current) {
612
- if (raf.current) cancelAnimationFrame(raf.current);
613
- raf.current = requestAnimationFrame(() => {
614
- if (scrollRef.current) {
615
- $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollRef.current, element);
616
- if (modality !== "virtual") $2f04cbc44ee30ce0$export$c826860796309d1b(element, {
617
- containingElement: ref.current
618
- });
619
- }
620
- });
621
- }
622
- }
623
- if (!shouldUseVirtualFocus && manager.isFocused && manager.focusedKey == null && lastFocusedKey.current != null && ref.current) $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
624
- lastFocusedKey.current = manager.focusedKey;
625
- didAutoFocusRef.current = false;
626
- });
627
- useEffect(() => {
628
- return () => {
629
- if (raf.current) cancelAnimationFrame(raf.current);
630
- };
631
- }, []);
632
- $e9faafb641e167db$export$90fc3a17d93f704c(ref, "react-aria-focus-scope-restore", (e) => {
633
- e.preventDefault();
634
- manager.setFocused(true);
635
- });
636
- let handlers = {
637
- onKeyDown,
638
- onFocus,
639
- onBlur,
640
- onMouseDown(e) {
641
- if (scrollRef.current === $d4ee10de306f2510$export$e58f029f0fbfdb29(e))
642
- e.preventDefault();
643
- }
644
- };
645
- let { typeSelectProps } = $fb3050f43d946246$export$e32c88dfddc6e1d8({
646
- keyboardDelegate: delegate,
647
- selectionManager: manager
648
- });
649
- if (!disallowTypeAhead) handlers = $3ef42575df84b30b$export$9d1611c77c2fe928(typeSelectProps, handlers);
650
- let tabIndex = void 0;
651
- if (!shouldUseVirtualFocus) tabIndex = manager.focusedKey == null ? 0 : -1;
652
- let collectionId = $feb5ffebff200149$export$881eb0d9f3605d9d(manager.collection);
653
- return {
654
- collectionProps: $3ef42575df84b30b$export$9d1611c77c2fe928(handlers, {
655
- tabIndex,
656
- "data-collection": collectionId
657
- })
658
- };
659
- }
660
- function $880e95eb8b93ba9a$export$ecf600387e221c37(options) {
661
- let { id, selectionManager: manager, key, ref, shouldSelectOnPressUp, shouldUseVirtualFocus, focus, isDisabled, onAction, allowsDifferentPressOrigin, linkBehavior = "action" } = options;
662
- let router = $ea8dcbcb9ea1b556$export$9a302a45f65d0572();
663
- id = $bdb11010cef70236$export$f680877a34711e37(id);
664
- let onSelect = (e) => {
665
- if (e.pointerType === "keyboard" && $feb5ffebff200149$export$d3e3bd3e26688c04(e)) manager.toggleSelection(key);
666
- else {
667
- if (manager.selectionMode === "none") return;
668
- if (manager.isLink(key)) {
669
- if (linkBehavior === "selection" && ref.current) {
670
- let itemProps2 = manager.getItemProps(key);
671
- router.open(ref.current, e, itemProps2.href, itemProps2.routerOptions);
672
- manager.setSelectedKeys(manager.selectedKeys);
673
- return;
674
- } else if (linkBehavior === "override" || linkBehavior === "none") return;
675
- }
676
- if (manager.selectionMode === "single") {
677
- if (manager.isSelected(key) && !manager.disallowEmptySelection) manager.toggleSelection(key);
678
- else manager.replaceSelection(key);
679
- } else if (e && e.shiftKey) manager.extendSelection(key);
680
- else if (manager.selectionBehavior === "toggle" || e && ($21f1aa98acb08317$export$16792effe837dba3(e) || e.pointerType === "touch" || e.pointerType === "virtual"))
681
- manager.toggleSelection(key);
682
- else manager.replaceSelection(key);
683
- }
684
- };
685
- useEffect(() => {
686
- let isFocused = key === manager.focusedKey;
687
- if (isFocused && manager.isFocused) {
688
- if (!shouldUseVirtualFocus) {
689
- if (focus) focus();
690
- else if ($d4ee10de306f2510$export$cd4e5573fbe2b576() !== ref.current && ref.current) $3ad3f6e1647bc98d$export$80f3e147d781571c(ref.current);
691
- } else $55f9b1ae81f22853$export$76e4e37e5339496d(ref.current);
692
- }
693
- }, [
694
- ref,
695
- key,
696
- manager.focusedKey,
697
- manager.childFocusStrategy,
698
- manager.isFocused,
699
- shouldUseVirtualFocus
700
- ]);
701
- isDisabled = isDisabled || manager.isDisabled(key);
702
- let itemProps = {};
703
- if (!shouldUseVirtualFocus && !isDisabled) itemProps = {
704
- tabIndex: key === manager.focusedKey ? 0 : -1,
705
- onFocus(e) {
706
- if ($d4ee10de306f2510$export$e58f029f0fbfdb29(e) === ref.current) manager.setFocusedKey(key);
707
- }
708
- };
709
- else if (isDisabled) itemProps.onMouseDown = (e) => {
710
- e.preventDefault();
711
- };
712
- useEffect(() => {
713
- if (isDisabled && manager.focusedKey === key) manager.setFocusedKey(null);
714
- }, [
715
- manager,
716
- isDisabled,
717
- key
718
- ]);
719
- let isLinkOverride = manager.isLink(key) && linkBehavior === "override";
720
- let isActionOverride = onAction && options["UNSTABLE_itemBehavior"] === "action";
721
- let hasLinkAction = manager.isLink(key) && linkBehavior !== "selection" && linkBehavior !== "none";
722
- let allowsSelection = !isDisabled && manager.canSelectItem(key) && !isLinkOverride && !isActionOverride;
723
- let allowsActions = (onAction || hasLinkAction) && !isDisabled;
724
- let hasPrimaryAction = allowsActions && (manager.selectionBehavior === "replace" ? !allowsSelection : !allowsSelection || manager.isEmpty);
725
- let hasSecondaryAction = allowsActions && allowsSelection && manager.selectionBehavior === "replace";
726
- let hasAction = hasPrimaryAction || hasSecondaryAction;
727
- let modality = useRef(null);
728
- let longPressEnabled = hasAction && allowsSelection;
729
- let longPressEnabledOnPressStart = useRef(false);
730
- let hadPrimaryActionOnPressStart = useRef(false);
731
- let collectionItemProps = manager.getItemProps(key);
732
- let performAction = (e) => {
733
- if (onAction) {
734
- var _ref_current;
735
- onAction();
736
- (_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.dispatchEvent(new CustomEvent("react-aria-item-action", {
737
- bubbles: true
738
- }));
739
- }
740
- if (hasLinkAction && ref.current) router.open(ref.current, e, collectionItemProps.href, collectionItemProps.routerOptions);
741
- };
742
- let itemPressProps = {
743
- ref
744
- };
745
- if (shouldSelectOnPressUp) {
746
- itemPressProps.onPressStart = (e) => {
747
- modality.current = e.pointerType;
748
- longPressEnabledOnPressStart.current = longPressEnabled;
749
- if (e.pointerType === "keyboard" && (!hasAction || $880e95eb8b93ba9a$var$isSelectionKey(e.key))) onSelect(e);
750
- };
751
- if (!allowsDifferentPressOrigin) itemPressProps.onPress = (e) => {
752
- if (hasPrimaryAction || hasSecondaryAction && e.pointerType !== "mouse") {
753
- if (e.pointerType === "keyboard" && !$880e95eb8b93ba9a$var$isActionKey(e.key)) return;
754
- performAction(e);
755
- } else if (e.pointerType !== "keyboard" && allowsSelection) onSelect(e);
756
- };
757
- else {
758
- itemPressProps.onPressUp = hasPrimaryAction ? void 0 : (e) => {
759
- if (e.pointerType === "mouse" && allowsSelection) onSelect(e);
760
- };
761
- itemPressProps.onPress = hasPrimaryAction ? performAction : (e) => {
762
- if (e.pointerType !== "keyboard" && e.pointerType !== "mouse" && allowsSelection) onSelect(e);
763
- };
764
- }
765
- } else {
766
- itemPressProps.onPressStart = (e) => {
767
- modality.current = e.pointerType;
768
- longPressEnabledOnPressStart.current = longPressEnabled;
769
- hadPrimaryActionOnPressStart.current = hasPrimaryAction;
770
- if (allowsSelection && (e.pointerType === "mouse" && !hasPrimaryAction || e.pointerType === "keyboard" && (!allowsActions || $880e95eb8b93ba9a$var$isSelectionKey(e.key)))) onSelect(e);
771
- };
772
- itemPressProps.onPress = (e) => {
773
- if (e.pointerType === "touch" || e.pointerType === "pen" || e.pointerType === "virtual" || e.pointerType === "keyboard" && hasAction && $880e95eb8b93ba9a$var$isActionKey(e.key) || e.pointerType === "mouse" && hadPrimaryActionOnPressStart.current) {
774
- if (hasAction) performAction(e);
775
- else if (allowsSelection) onSelect(e);
776
- }
777
- };
778
- }
779
- itemProps["data-collection"] = $feb5ffebff200149$export$6aeb1680a0ae8741(manager.collection);
780
- itemProps["data-key"] = key;
781
- itemPressProps.preventFocusOnPress = shouldUseVirtualFocus;
782
- if (shouldUseVirtualFocus) itemPressProps = $3ef42575df84b30b$export$9d1611c77c2fe928(itemPressProps, {
783
- onPressStart(e) {
784
- if (e.pointerType !== "touch") {
785
- manager.setFocused(true);
786
- manager.setFocusedKey(key);
787
- }
788
- },
789
- onPress(e) {
790
- if (e.pointerType === "touch") {
791
- manager.setFocused(true);
792
- manager.setFocusedKey(key);
793
- }
794
- }
795
- });
796
- if (collectionItemProps) {
797
- for (let key2 of [
798
- "onPressStart",
799
- "onPressEnd",
800
- "onPressChange",
801
- "onPress",
802
- "onPressUp",
803
- "onClick"
804
- ]) if (collectionItemProps[key2]) itemPressProps[key2] = $ff5963eb1fccf552$export$e08e3b67e392101e(itemPressProps[key2], collectionItemProps[key2]);
805
- }
806
- let { pressProps, isPressed } = $f6c31cce2adf654f$export$45712eceda6fad21(itemPressProps);
807
- let onDoubleClick = hasSecondaryAction ? (e) => {
808
- if (modality.current === "mouse") {
809
- e.stopPropagation();
810
- e.preventDefault();
811
- performAction(e);
812
- }
813
- } : void 0;
814
- let { longPressProps } = $8a26561d2877236e$export$c24ed0104d07eab9({
815
- isDisabled: !longPressEnabled,
816
- onLongPress(e) {
817
- if (e.pointerType === "touch") {
818
- onSelect(e);
819
- manager.setSelectionBehavior("toggle");
820
- }
821
- }
822
- });
823
- let onDragStartCapture = (e) => {
824
- if (modality.current === "touch" && longPressEnabledOnPressStart.current) e.preventDefault();
825
- };
826
- let onClick = linkBehavior !== "none" && manager.isLink(key) ? (e) => {
827
- if (!$ea8dcbcb9ea1b556$export$95185d699e05d4d7.isOpening) e.preventDefault();
828
- } : void 0;
829
- return {
830
- itemProps: $3ef42575df84b30b$export$9d1611c77c2fe928(
831
- itemProps,
832
- allowsSelection || hasPrimaryAction || shouldUseVirtualFocus && !isDisabled ? pressProps : {},
833
- longPressEnabled ? longPressProps : {},
834
- {
835
- onDoubleClick,
836
- onDragStartCapture,
837
- onClick,
838
- id
839
- },
840
- // Prevent DOM focus from moving on mouse down when using virtual focus
841
- shouldUseVirtualFocus ? {
842
- onMouseDown: (e) => e.preventDefault()
843
- } : void 0
844
- ),
845
- isPressed,
846
- isSelected: manager.isSelected(key),
847
- isFocused: manager.isFocused && manager.focusedKey === key,
848
- isDisabled,
849
- allowsSelection,
850
- hasAction
851
- };
852
- }
853
- function $880e95eb8b93ba9a$var$isActionKey(key) {
854
- return key === "Enter";
855
- }
856
- function $880e95eb8b93ba9a$var$isSelectionKey(key) {
857
- return key === " ";
858
- }
859
- class $eb2240fc39a57fa5$export$bf788dd355e3a401 {
860
- build(props, context) {
861
- this.context = context;
862
- return $eb2240fc39a57fa5$var$iterable(() => this.iterateCollection(props));
863
- }
864
- *iterateCollection(props) {
865
- let { children, items } = props;
866
- if ($dbSRa$react__default.isValidElement(children) && children.type === $dbSRa$react__default.Fragment) yield* this.iterateCollection({
867
- children: children.props.children,
868
- items
869
- });
870
- else if (typeof children === "function") {
871
- if (!items) throw new Error("props.children was a function but props.items is missing");
872
- let index = 0;
873
- for (let item of items) {
874
- yield* this.getFullNode({
875
- value: item,
876
- index
877
- }, {
878
- renderer: children
879
- });
880
- index++;
881
- }
882
- } else {
883
- let items2 = [];
884
- $dbSRa$react__default.Children.forEach(children, (child) => {
885
- if (child) items2.push(child);
886
- });
887
- let index = 0;
888
- for (let item of items2) {
889
- let nodes = this.getFullNode({
890
- element: item,
891
- index
892
- }, {});
893
- for (let node of nodes) {
894
- index++;
895
- yield node;
896
- }
897
- }
898
- }
899
- }
900
- getKey(item, partialNode, state, parentKey) {
901
- if (item.key != null) return item.key;
902
- if (partialNode.type === "cell" && partialNode.key != null) return `${parentKey}${partialNode.key}`;
903
- let v = partialNode.value;
904
- if (v != null) {
905
- var _v_key;
906
- let key = (_v_key = v.key) !== null && _v_key !== void 0 ? _v_key : v.id;
907
- if (key == null) throw new Error("No key found for item");
908
- return key;
909
- }
910
- return parentKey ? `${parentKey}.${partialNode.index}` : `$.${partialNode.index}`;
911
- }
912
- getChildState(state, partialNode) {
913
- return {
914
- renderer: partialNode.renderer || state.renderer
915
- };
916
- }
917
- *getFullNode(partialNode, state, parentKey, parentNode) {
918
- if ($dbSRa$react__default.isValidElement(partialNode.element) && partialNode.element.type === $dbSRa$react__default.Fragment) {
919
- let children = [];
920
- $dbSRa$react__default.Children.forEach(partialNode.element.props.children, (child) => {
921
- children.push(child);
922
- });
923
- var _partialNode_index;
924
- let index = (_partialNode_index = partialNode.index) !== null && _partialNode_index !== void 0 ? _partialNode_index : 0;
925
- for (const child of children) yield* this.getFullNode({
926
- element: child,
927
- index: index++
928
- }, state, parentKey, parentNode);
929
- return;
930
- }
931
- let element = partialNode.element;
932
- if (!element && partialNode.value && state && state.renderer) {
933
- let cached = this.cache.get(partialNode.value);
934
- if (cached && (!cached.shouldInvalidate || !cached.shouldInvalidate(this.context))) {
935
- cached.index = partialNode.index;
936
- cached.parentKey = parentNode ? parentNode.key : null;
937
- yield cached;
938
- return;
939
- }
940
- element = state.renderer(partialNode.value);
941
- }
942
- if ($dbSRa$react__default.isValidElement(element)) {
943
- let type = element.type;
944
- if (typeof type !== "function" && typeof type.getCollectionNode !== "function") {
945
- let name = element.type;
946
- throw new Error(`Unknown element <${name}> in collection.`);
947
- }
948
- let childNodes = type.getCollectionNode(element.props, this.context);
949
- var _partialNode_index1;
950
- let index = (_partialNode_index1 = partialNode.index) !== null && _partialNode_index1 !== void 0 ? _partialNode_index1 : 0;
951
- let result = childNodes.next();
952
- while (!result.done && result.value) {
953
- let childNode = result.value;
954
- partialNode.index = index;
955
- var _childNode_key;
956
- let nodeKey = (_childNode_key = childNode.key) !== null && _childNode_key !== void 0 ? _childNode_key : null;
957
- if (nodeKey == null) nodeKey = childNode.element ? null : this.getKey(element, partialNode, state, parentKey);
958
- let nodes = this.getFullNode({
959
- ...childNode,
960
- key: nodeKey,
961
- index,
962
- wrapper: $eb2240fc39a57fa5$var$compose(partialNode.wrapper, childNode.wrapper)
963
- }, this.getChildState(state, childNode), parentKey ? `${parentKey}${element.key}` : element.key, parentNode);
964
- let children = [
965
- ...nodes
966
- ];
967
- for (let node2 of children) {
968
- var _childNode_value, _ref;
969
- node2.value = (_ref = (_childNode_value = childNode.value) !== null && _childNode_value !== void 0 ? _childNode_value : partialNode.value) !== null && _ref !== void 0 ? _ref : null;
970
- if (node2.value) this.cache.set(node2.value, node2);
971
- var _parentNode_type;
972
- if (partialNode.type && node2.type !== partialNode.type) throw new Error(`Unsupported type <${$eb2240fc39a57fa5$var$capitalize(node2.type)}> in <${$eb2240fc39a57fa5$var$capitalize((_parentNode_type = parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) !== null && _parentNode_type !== void 0 ? _parentNode_type : "unknown parent type")}>. Only <${$eb2240fc39a57fa5$var$capitalize(partialNode.type)}> is supported.`);
973
- index++;
974
- yield node2;
975
- }
976
- result = childNodes.next(children);
977
- }
978
- return;
979
- }
980
- if (partialNode.key == null || partialNode.type == null) return;
981
- let builder = this;
982
- var _partialNode_value, _partialNode_textValue;
983
- let node = {
984
- type: partialNode.type,
985
- props: partialNode.props,
986
- key: partialNode.key,
987
- parentKey: parentNode ? parentNode.key : null,
988
- value: (_partialNode_value = partialNode.value) !== null && _partialNode_value !== void 0 ? _partialNode_value : null,
989
- level: parentNode ? parentNode.level + 1 : 0,
990
- index: partialNode.index,
991
- rendered: partialNode.rendered,
992
- textValue: (_partialNode_textValue = partialNode.textValue) !== null && _partialNode_textValue !== void 0 ? _partialNode_textValue : "",
993
- "aria-label": partialNode["aria-label"],
994
- wrapper: partialNode.wrapper,
995
- shouldInvalidate: partialNode.shouldInvalidate,
996
- hasChildNodes: partialNode.hasChildNodes || false,
997
- childNodes: $eb2240fc39a57fa5$var$iterable(function* () {
998
- if (!partialNode.hasChildNodes || !partialNode.childNodes) return;
999
- let index = 0;
1000
- for (let child of partialNode.childNodes()) {
1001
- if (child.key != null)
1002
- child.key = `${node.key}${child.key}`;
1003
- let nodes = builder.getFullNode({
1004
- ...child,
1005
- index
1006
- }, builder.getChildState(state, child), node.key, node);
1007
- for (let node2 of nodes) {
1008
- index++;
1009
- yield node2;
1010
- }
1011
- }
1012
- })
1013
- };
1014
- yield node;
1015
- }
1016
- constructor() {
1017
- this.cache = /* @__PURE__ */ new WeakMap();
1018
- }
1019
- }
1020
- function $eb2240fc39a57fa5$var$iterable(iterator) {
1021
- let cache = [];
1022
- let iterable = null;
1023
- return {
1024
- *[Symbol.iterator]() {
1025
- for (let item of cache) yield item;
1026
- if (!iterable) iterable = iterator();
1027
- for (let item of iterable) {
1028
- cache.push(item);
1029
- yield item;
1030
- }
1031
- }
1032
- };
1033
- }
1034
- function $eb2240fc39a57fa5$var$compose(outer, inner) {
1035
- if (outer && inner) return (element) => outer(inner(element));
1036
- if (outer) return outer;
1037
- if (inner) return inner;
1038
- }
1039
- function $eb2240fc39a57fa5$var$capitalize(str) {
1040
- return str[0].toUpperCase() + str.slice(1);
1041
- }
1042
- function $7613b1592d41b092$export$6cd28814d92fa9c9(props, factory, context) {
1043
- let builder = useMemo(() => new $eb2240fc39a57fa5$export$bf788dd355e3a401(), []);
1044
- let { children, items, collection } = props;
1045
- let result = useMemo(() => {
1046
- if (collection) return collection;
1047
- let nodes = builder.build({
1048
- children,
1049
- items
1050
- }, context);
1051
- return factory(nodes);
1052
- }, [
1053
- builder,
1054
- children,
1055
- items,
1056
- collection,
1057
- context,
1058
- factory
1059
- ]);
1060
- return result;
1061
- }
1062
- function $c5a24bc478652b5f$export$1005530eda016c13(node, collection) {
1063
- if (typeof collection.getChildren === "function") return collection.getChildren(node.key);
1064
- return node.childNodes;
1065
- }
1066
- function $c5a24bc478652b5f$export$fbdeaa6a76694f71(iterable) {
1067
- return $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable);
1068
- }
1069
- function $c5a24bc478652b5f$export$5f3398f8733f90e2(iterable, index) {
1070
- for (let item of iterable) {
1071
- return item;
1072
- }
1073
- }
1074
- function $c5a24bc478652b5f$export$8c434b3a7a4dad6(collection, a, b) {
1075
- if (a.parentKey === b.parentKey) return a.index - b.index;
1076
- let aAncestors = [
1077
- ...$c5a24bc478652b5f$var$getAncestors(collection, a),
1078
- a
1079
- ];
1080
- let bAncestors = [
1081
- ...$c5a24bc478652b5f$var$getAncestors(collection, b),
1082
- b
1083
- ];
1084
- let firstNonMatchingAncestor = aAncestors.slice(0, bAncestors.length).findIndex((a2, i) => a2 !== bAncestors[i]);
1085
- if (firstNonMatchingAncestor !== -1) {
1086
- a = aAncestors[firstNonMatchingAncestor];
1087
- b = bAncestors[firstNonMatchingAncestor];
1088
- return a.index - b.index;
1089
- }
1090
- if (aAncestors.findIndex((node) => node === b) >= 0) return 1;
1091
- else if (bAncestors.findIndex((node) => node === a) >= 0) return -1;
1092
- return -1;
1093
- }
1094
- function $c5a24bc478652b5f$var$getAncestors(collection, node) {
1095
- let parents = [];
1096
- let currNode = node;
1097
- while ((currNode === null || currNode === void 0 ? void 0 : currNode.parentKey) != null) {
1098
- currNode = collection.getItem(currNode.parentKey);
1099
- if (currNode) parents.unshift(currNode);
1100
- }
1101
- return parents;
1102
- }
1103
- class $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
1104
- get childNodes() {
1105
- throw new Error("childNodes is not supported");
1106
- }
1107
- clone() {
1108
- let node = new this.constructor(this.key);
1109
- node.value = this.value;
1110
- node.level = this.level;
1111
- node.hasChildNodes = this.hasChildNodes;
1112
- node.rendered = this.rendered;
1113
- node.textValue = this.textValue;
1114
- node["aria-label"] = this["aria-label"];
1115
- node.index = this.index;
1116
- node.parentKey = this.parentKey;
1117
- node.prevKey = this.prevKey;
1118
- node.nextKey = this.nextKey;
1119
- node.firstChildKey = this.firstChildKey;
1120
- node.lastChildKey = this.lastChildKey;
1121
- node.props = this.props;
1122
- node.render = this.render;
1123
- node.colSpan = this.colSpan;
1124
- node.colIndex = this.colIndex;
1125
- return node;
1126
- }
1127
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1128
- filter(collection, newCollection, filterFn) {
1129
- let clone = this.clone();
1130
- newCollection.addDescendants(clone, collection);
1131
- return clone;
1132
- }
1133
- constructor(key) {
1134
- this.value = null;
1135
- this.level = 0;
1136
- this.hasChildNodes = false;
1137
- this.rendered = null;
1138
- this.textValue = "";
1139
- this["aria-label"] = void 0;
1140
- this.index = 0;
1141
- this.parentKey = null;
1142
- this.prevKey = null;
1143
- this.nextKey = null;
1144
- this.firstChildKey = null;
1145
- this.lastChildKey = null;
1146
- this.props = {};
1147
- this.colSpan = null;
1148
- this.colIndex = null;
1149
- this.type = this.constructor.type;
1150
- this.key = key;
1151
- }
1152
- }
1153
- class $23b9f4fcf0fe224b$export$b1918e978f1ee46f extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
1154
- filter(collection, newCollection, filterFn) {
1155
- let [firstKey, lastKey] = $23b9f4fcf0fe224b$var$filterChildren(collection, newCollection, this.firstChildKey, filterFn);
1156
- let newNode = this.clone();
1157
- newNode.firstChildKey = firstKey;
1158
- newNode.lastChildKey = lastKey;
1159
- return newNode;
1160
- }
1161
- }
1162
- class $23b9f4fcf0fe224b$export$5ae2504e948afce5 extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
1163
- }
1164
- $23b9f4fcf0fe224b$export$5ae2504e948afce5.type = "header";
1165
- class $23b9f4fcf0fe224b$export$8258a0665a675899 extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
1166
- }
1167
- $23b9f4fcf0fe224b$export$8258a0665a675899.type = "loader";
1168
- class $23b9f4fcf0fe224b$export$fd11f34e1d07f134 extends $23b9f4fcf0fe224b$export$b1918e978f1ee46f {
1169
- filter(collection, newCollection, filterFn) {
1170
- if (filterFn(this.textValue, this)) {
1171
- let clone = this.clone();
1172
- newCollection.addDescendants(clone, collection);
1173
- return clone;
1174
- }
1175
- return null;
1176
- }
1177
- }
1178
- $23b9f4fcf0fe224b$export$fd11f34e1d07f134.type = "item";
1179
- class $23b9f4fcf0fe224b$export$437f11dc9b403b78 extends $23b9f4fcf0fe224b$export$b1918e978f1ee46f {
1180
- filter(collection, newCollection, filterFn) {
1181
- let filteredSection = super.filter(collection, newCollection, filterFn);
1182
- if (filteredSection) {
1183
- if (filteredSection.lastChildKey !== null) {
1184
- let lastChild = collection.getItem(filteredSection.lastChildKey);
1185
- if (lastChild && lastChild.type !== "header") return filteredSection;
1186
- }
1187
- }
1188
- return null;
1189
- }
1190
- }
1191
- $23b9f4fcf0fe224b$export$437f11dc9b403b78.type = "section";
1192
- class $23b9f4fcf0fe224b$export$408d25a4e12db025 {
1193
- get size() {
1194
- return this.itemCount;
1195
- }
1196
- getKeys() {
1197
- return this.keyMap.keys();
1198
- }
1199
- *[Symbol.iterator]() {
1200
- let node = this.firstKey != null ? this.keyMap.get(this.firstKey) : void 0;
1201
- while (node) {
1202
- yield node;
1203
- node = node.nextKey != null ? this.keyMap.get(node.nextKey) : void 0;
1204
- }
1205
- }
1206
- getChildren(key) {
1207
- let keyMap = this.keyMap;
1208
- return {
1209
- *[Symbol.iterator]() {
1210
- let parent = keyMap.get(key);
1211
- let node = (parent === null || parent === void 0 ? void 0 : parent.firstChildKey) != null ? keyMap.get(parent.firstChildKey) : null;
1212
- while (node) {
1213
- yield node;
1214
- node = node.nextKey != null ? keyMap.get(node.nextKey) : void 0;
1215
- }
1216
- }
1217
- };
1218
- }
1219
- getKeyBefore(key) {
1220
- let node = this.keyMap.get(key);
1221
- if (!node) return null;
1222
- if (node.prevKey != null) {
1223
- node = this.keyMap.get(node.prevKey);
1224
- while (node && node.type !== "item" && node.lastChildKey != null) node = this.keyMap.get(node.lastChildKey);
1225
- var _node_key;
1226
- return (_node_key = node === null || node === void 0 ? void 0 : node.key) !== null && _node_key !== void 0 ? _node_key : null;
1227
- }
1228
- return node.parentKey;
1229
- }
1230
- getKeyAfter(key) {
1231
- let node = this.keyMap.get(key);
1232
- if (!node) return null;
1233
- if (node.type !== "item" && node.firstChildKey != null) return node.firstChildKey;
1234
- while (node) {
1235
- if (node.nextKey != null) return node.nextKey;
1236
- if (node.parentKey != null) node = this.keyMap.get(node.parentKey);
1237
- else return null;
1238
- }
1239
- return null;
1240
- }
1241
- getFirstKey() {
1242
- return this.firstKey;
1243
- }
1244
- getLastKey() {
1245
- let node = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;
1246
- while ((node === null || node === void 0 ? void 0 : node.lastChildKey) != null) node = this.keyMap.get(node.lastChildKey);
1247
- var _node_key;
1248
- return (_node_key = node === null || node === void 0 ? void 0 : node.key) !== null && _node_key !== void 0 ? _node_key : null;
1249
- }
1250
- getItem(key) {
1251
- var _this_keyMap_get;
1252
- return (_this_keyMap_get = this.keyMap.get(key)) !== null && _this_keyMap_get !== void 0 ? _this_keyMap_get : null;
1253
- }
1254
- at() {
1255
- throw new Error("Not implemented");
1256
- }
1257
- clone() {
1258
- let Constructor = this.constructor;
1259
- let collection = new Constructor();
1260
- collection.keyMap = new Map(this.keyMap);
1261
- collection.firstKey = this.firstKey;
1262
- collection.lastKey = this.lastKey;
1263
- collection.itemCount = this.itemCount;
1264
- return collection;
1265
- }
1266
- addNode(node) {
1267
- if (this.frozen) throw new Error("Cannot add a node to a frozen collection");
1268
- if (node.type === "item" && this.keyMap.get(node.key) == null) this.itemCount++;
1269
- this.keyMap.set(node.key, node);
1270
- }
1271
- // Deeply add a node and its children to the collection from another collection, primarily used when filtering a collection
1272
- addDescendants(node, oldCollection) {
1273
- this.addNode(node);
1274
- let children = oldCollection.getChildren(node.key);
1275
- for (let child of children) this.addDescendants(child, oldCollection);
1276
- }
1277
- removeNode(key) {
1278
- if (this.frozen) throw new Error("Cannot remove a node to a frozen collection");
1279
- let node = this.keyMap.get(key);
1280
- if (node != null && node.type === "item") this.itemCount--;
1281
- this.keyMap.delete(key);
1282
- }
1283
- commit(firstKey, lastKey, isSSR = false) {
1284
- if (this.frozen) throw new Error("Cannot commit a frozen collection");
1285
- this.firstKey = firstKey;
1286
- this.lastKey = lastKey;
1287
- this.frozen = !isSSR;
1288
- }
1289
- filter(filterFn) {
1290
- let newCollection = new this.constructor();
1291
- let [firstKey, lastKey] = $23b9f4fcf0fe224b$var$filterChildren(this, newCollection, this.firstKey, filterFn);
1292
- newCollection === null || newCollection === void 0 ? void 0 : newCollection.commit(firstKey, lastKey);
1293
- return newCollection;
1294
- }
1295
- constructor() {
1296
- this.keyMap = /* @__PURE__ */ new Map();
1297
- this.firstKey = null;
1298
- this.lastKey = null;
1299
- this.frozen = false;
1300
- this.itemCount = 0;
1301
- }
1302
- }
1303
- function $23b9f4fcf0fe224b$var$filterChildren(collection, newCollection, firstChildKey, filterFn) {
1304
- if (firstChildKey == null) return [
1305
- null,
1306
- null
1307
- ];
1308
- let firstNode = null;
1309
- let lastNode = null;
1310
- let currentNode = collection.getItem(firstChildKey);
1311
- while (currentNode != null) {
1312
- let newNode = currentNode.filter(collection, newCollection, filterFn);
1313
- if (newNode != null) {
1314
- newNode.nextKey = null;
1315
- if (lastNode) {
1316
- newNode.prevKey = lastNode.key;
1317
- lastNode.nextKey = newNode.key;
1318
- }
1319
- if (firstNode == null) firstNode = newNode;
1320
- newCollection.addNode(newNode);
1321
- lastNode = newNode;
1322
- }
1323
- currentNode = currentNode.nextKey ? collection.getItem(currentNode.nextKey) : null;
1324
- }
1325
- if (lastNode && lastNode.type === "separator") {
1326
- let prevKey = lastNode.prevKey;
1327
- newCollection.removeNode(lastNode.key);
1328
- if (prevKey) {
1329
- lastNode = newCollection.getItem(prevKey);
1330
- lastNode.nextKey = null;
1331
- } else lastNode = null;
1332
- }
1333
- var _firstNode_key, _lastNode_key;
1334
- return [
1335
- (_firstNode_key = firstNode === null || firstNode === void 0 ? void 0 : firstNode.key) !== null && _firstNode_key !== void 0 ? _firstNode_key : null,
1336
- (_lastNode_key = lastNode === null || lastNode === void 0 ? void 0 : lastNode.key) !== null && _lastNode_key !== void 0 ? _lastNode_key : null
1337
- ];
1338
- }
1339
- class $681cc3c98f569e39$export$410b0c854570d131 {
1340
- *[Symbol.iterator]() {
1341
- let node = this.firstChild;
1342
- while (node) {
1343
- yield node;
1344
- node = node.nextSibling;
1345
- }
1346
- }
1347
- get firstChild() {
1348
- return this._firstChild;
1349
- }
1350
- set firstChild(firstChild) {
1351
- this._firstChild = firstChild;
1352
- this.ownerDocument.markDirty(this);
1353
- }
1354
- get lastChild() {
1355
- return this._lastChild;
1356
- }
1357
- set lastChild(lastChild) {
1358
- this._lastChild = lastChild;
1359
- this.ownerDocument.markDirty(this);
1360
- }
1361
- get previousSibling() {
1362
- return this._previousSibling;
1363
- }
1364
- set previousSibling(previousSibling) {
1365
- this._previousSibling = previousSibling;
1366
- this.ownerDocument.markDirty(this);
1367
- }
1368
- get nextSibling() {
1369
- return this._nextSibling;
1370
- }
1371
- set nextSibling(nextSibling) {
1372
- this._nextSibling = nextSibling;
1373
- this.ownerDocument.markDirty(this);
1374
- }
1375
- get parentNode() {
1376
- return this._parentNode;
1377
- }
1378
- set parentNode(parentNode) {
1379
- this._parentNode = parentNode;
1380
- this.ownerDocument.markDirty(this);
1381
- }
1382
- get isConnected() {
1383
- var _this_parentNode;
1384
- return ((_this_parentNode = this.parentNode) === null || _this_parentNode === void 0 ? void 0 : _this_parentNode.isConnected) || false;
1385
- }
1386
- invalidateChildIndices(child) {
1387
- if (this._minInvalidChildIndex == null || !this._minInvalidChildIndex.isConnected || child.index < this._minInvalidChildIndex.index) {
1388
- this._minInvalidChildIndex = child;
1389
- this.ownerDocument.markDirty(this);
1390
- }
1391
- }
1392
- updateChildIndices() {
1393
- let node = this._minInvalidChildIndex;
1394
- while (node) {
1395
- node.index = node.previousSibling ? node.previousSibling.index + 1 : 0;
1396
- node = node.nextSibling;
1397
- }
1398
- this._minInvalidChildIndex = null;
1399
- }
1400
- appendChild(child) {
1401
- if (child.parentNode) child.parentNode.removeChild(child);
1402
- if (this.firstChild == null) this.firstChild = child;
1403
- if (this.lastChild) {
1404
- this.lastChild.nextSibling = child;
1405
- child.index = this.lastChild.index + 1;
1406
- child.previousSibling = this.lastChild;
1407
- } else {
1408
- child.previousSibling = null;
1409
- child.index = 0;
1410
- }
1411
- child.parentNode = this;
1412
- child.nextSibling = null;
1413
- this.lastChild = child;
1414
- this.ownerDocument.markDirty(this);
1415
- if (this.isConnected) this.ownerDocument.queueUpdate();
1416
- }
1417
- insertBefore(newNode, referenceNode) {
1418
- if (referenceNode == null) return this.appendChild(newNode);
1419
- if (newNode.parentNode) newNode.parentNode.removeChild(newNode);
1420
- newNode.nextSibling = referenceNode;
1421
- newNode.previousSibling = referenceNode.previousSibling;
1422
- newNode.index = referenceNode.index - 1;
1423
- if (this.firstChild === referenceNode) this.firstChild = newNode;
1424
- else if (referenceNode.previousSibling) referenceNode.previousSibling.nextSibling = newNode;
1425
- referenceNode.previousSibling = newNode;
1426
- newNode.parentNode = referenceNode.parentNode;
1427
- this.invalidateChildIndices(newNode);
1428
- if (this.isConnected) this.ownerDocument.queueUpdate();
1429
- }
1430
- removeChild(child) {
1431
- if (child.parentNode !== this) return;
1432
- if (this._minInvalidChildIndex === child) this._minInvalidChildIndex = null;
1433
- if (child.nextSibling) {
1434
- this.invalidateChildIndices(child.nextSibling);
1435
- child.nextSibling.previousSibling = child.previousSibling;
1436
- }
1437
- if (child.previousSibling) child.previousSibling.nextSibling = child.nextSibling;
1438
- if (this.firstChild === child) this.firstChild = child.nextSibling;
1439
- if (this.lastChild === child) this.lastChild = child.previousSibling;
1440
- child.parentNode = null;
1441
- child.nextSibling = null;
1442
- child.previousSibling = null;
1443
- child.index = 0;
1444
- this.ownerDocument.markDirty(child);
1445
- if (this.isConnected) this.ownerDocument.queueUpdate();
1446
- }
1447
- addEventListener() {
1448
- }
1449
- removeEventListener() {
1450
- }
1451
- get previousVisibleSibling() {
1452
- let node = this.previousSibling;
1453
- while (node && node.isHidden) node = node.previousSibling;
1454
- return node;
1455
- }
1456
- get nextVisibleSibling() {
1457
- let node = this.nextSibling;
1458
- while (node && node.isHidden) node = node.nextSibling;
1459
- return node;
1460
- }
1461
- get firstVisibleChild() {
1462
- let node = this.firstChild;
1463
- while (node && node.isHidden) node = node.nextSibling;
1464
- return node;
1465
- }
1466
- get lastVisibleChild() {
1467
- let node = this.lastChild;
1468
- while (node && node.isHidden) node = node.previousSibling;
1469
- return node;
1470
- }
1471
- constructor(ownerDocument) {
1472
- this._firstChild = null;
1473
- this._lastChild = null;
1474
- this._previousSibling = null;
1475
- this._nextSibling = null;
1476
- this._parentNode = null;
1477
- this._minInvalidChildIndex = null;
1478
- this.ownerDocument = ownerDocument;
1479
- }
1480
- }
1481
- class $681cc3c98f569e39$export$dc064fe9e59310fd extends $681cc3c98f569e39$export$410b0c854570d131 {
1482
- get index() {
1483
- return this._index;
1484
- }
1485
- set index(index) {
1486
- this._index = index;
1487
- this.ownerDocument.markDirty(this);
1488
- }
1489
- get level() {
1490
- var _this_parentNode_node;
1491
- if (this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd) return this.parentNode.level + (((_this_parentNode_node = this.parentNode.node) === null || _this_parentNode_node === void 0 ? void 0 : _this_parentNode_node.type) === "item" ? 1 : 0);
1492
- return 0;
1493
- }
1494
- /**
1495
- * Lazily gets a mutable instance of a Node. If the node has already
1496
- * been cloned during this update cycle, it just returns the existing one.
1497
- */
1498
- getMutableNode() {
1499
- if (this.node == null) return null;
1500
- if (!this.isMutated) {
1501
- this.node = this.node.clone();
1502
- this.isMutated = true;
1503
- }
1504
- this.ownerDocument.markDirty(this);
1505
- return this.node;
1506
- }
1507
- updateNode() {
1508
- var _this_parentNode_node, _this_previousVisibleSibling_node, _this_previousVisibleSibling, _nextSibling_node, _this_firstVisibleChild_node, _this_firstVisibleChild, _this_lastVisibleChild_node, _this_lastVisibleChild;
1509
- let nextSibling = this.nextVisibleSibling;
1510
- let node = this.getMutableNode();
1511
- if (node == null) return;
1512
- node.index = this.index;
1513
- node.level = this.level;
1514
- var _this_parentNode_node_key;
1515
- node.parentKey = this.parentNode instanceof $681cc3c98f569e39$export$dc064fe9e59310fd ? (_this_parentNode_node_key = (_this_parentNode_node = this.parentNode.node) === null || _this_parentNode_node === void 0 ? void 0 : _this_parentNode_node.key) !== null && _this_parentNode_node_key !== void 0 ? _this_parentNode_node_key : null : null;
1516
- var _this_previousVisibleSibling_node_key;
1517
- node.prevKey = (_this_previousVisibleSibling_node_key = (_this_previousVisibleSibling = this.previousVisibleSibling) === null || _this_previousVisibleSibling === void 0 ? void 0 : (_this_previousVisibleSibling_node = _this_previousVisibleSibling.node) === null || _this_previousVisibleSibling_node === void 0 ? void 0 : _this_previousVisibleSibling_node.key) !== null && _this_previousVisibleSibling_node_key !== void 0 ? _this_previousVisibleSibling_node_key : null;
1518
- var _nextSibling_node_key;
1519
- node.nextKey = (_nextSibling_node_key = nextSibling === null || nextSibling === void 0 ? void 0 : (_nextSibling_node = nextSibling.node) === null || _nextSibling_node === void 0 ? void 0 : _nextSibling_node.key) !== null && _nextSibling_node_key !== void 0 ? _nextSibling_node_key : null;
1520
- node.hasChildNodes = !!this.firstChild;
1521
- var _this_firstVisibleChild_node_key;
1522
- node.firstChildKey = (_this_firstVisibleChild_node_key = (_this_firstVisibleChild = this.firstVisibleChild) === null || _this_firstVisibleChild === void 0 ? void 0 : (_this_firstVisibleChild_node = _this_firstVisibleChild.node) === null || _this_firstVisibleChild_node === void 0 ? void 0 : _this_firstVisibleChild_node.key) !== null && _this_firstVisibleChild_node_key !== void 0 ? _this_firstVisibleChild_node_key : null;
1523
- var _this_lastVisibleChild_node_key;
1524
- node.lastChildKey = (_this_lastVisibleChild_node_key = (_this_lastVisibleChild = this.lastVisibleChild) === null || _this_lastVisibleChild === void 0 ? void 0 : (_this_lastVisibleChild_node = _this_lastVisibleChild.node) === null || _this_lastVisibleChild_node === void 0 ? void 0 : _this_lastVisibleChild_node.key) !== null && _this_lastVisibleChild_node_key !== void 0 ? _this_lastVisibleChild_node_key : null;
1525
- if ((node.colSpan != null || node.colIndex != null) && nextSibling) {
1526
- var _node_colIndex, _node_colSpan;
1527
- let nextColIndex = ((_node_colIndex = node.colIndex) !== null && _node_colIndex !== void 0 ? _node_colIndex : node.index) + ((_node_colSpan = node.colSpan) !== null && _node_colSpan !== void 0 ? _node_colSpan : 1);
1528
- if (nextSibling.node != null && nextColIndex !== nextSibling.node.colIndex) {
1529
- let siblingNode = nextSibling.getMutableNode();
1530
- siblingNode.colIndex = nextColIndex;
1531
- }
1532
- }
1533
- }
1534
- setProps(obj, ref, CollectionNodeClass, rendered, render) {
1535
- let node;
1536
- let { value: value1, textValue, id, ...props } = obj;
1537
- if (this.node == null) {
1538
- node = new CollectionNodeClass(id !== null && id !== void 0 ? id : `react-aria-${++this.ownerDocument.nodeId}`);
1539
- this.node = node;
1540
- } else node = this.getMutableNode();
1541
- props.ref = ref;
1542
- node.props = props;
1543
- node.rendered = rendered;
1544
- node.render = render;
1545
- node.value = value1;
1546
- if (obj["aria-label"]) node["aria-label"] = obj["aria-label"];
1547
- node.textValue = textValue || (typeof props.children === "string" ? props.children : "") || obj["aria-label"] || "";
1548
- if (id != null && id !== node.key) throw new Error("Cannot change the id of an item");
1549
- if (props.colSpan != null) node.colSpan = props.colSpan;
1550
- if (this.isConnected) this.ownerDocument.queueUpdate();
1551
- }
1552
- get style() {
1553
- let element = this;
1554
- return {
1555
- get display() {
1556
- return element.isHidden ? "none" : "";
1557
- },
1558
- set display(value) {
1559
- let isHidden = value === "none";
1560
- if (element.isHidden !== isHidden) {
1561
- var _element_parentNode, _element_parentNode1;
1562
- if (((_element_parentNode = element.parentNode) === null || _element_parentNode === void 0 ? void 0 : _element_parentNode.firstVisibleChild) === element || ((_element_parentNode1 = element.parentNode) === null || _element_parentNode1 === void 0 ? void 0 : _element_parentNode1.lastVisibleChild) === element) element.ownerDocument.markDirty(element.parentNode);
1563
- let prev = element.previousVisibleSibling;
1564
- let next = element.nextVisibleSibling;
1565
- if (prev) element.ownerDocument.markDirty(prev);
1566
- if (next) element.ownerDocument.markDirty(next);
1567
- element.isHidden = isHidden;
1568
- element.ownerDocument.markDirty(element);
1569
- }
1570
- }
1571
- };
1572
- }
1573
- hasAttribute() {
1574
- }
1575
- setAttribute() {
1576
- }
1577
- setAttributeNS() {
1578
- }
1579
- removeAttribute() {
1580
- }
1581
- constructor(type, ownerDocument) {
1582
- super(ownerDocument), this.nodeType = 8, this.isMutated = true, this._index = 0, this.isHidden = false;
1583
- this.node = null;
1584
- }
1585
- }
1586
- class $681cc3c98f569e39$export$b34a105447964f9f extends $681cc3c98f569e39$export$410b0c854570d131 {
1587
- get isConnected() {
1588
- return true;
1589
- }
1590
- createElement(type) {
1591
- return new $681cc3c98f569e39$export$dc064fe9e59310fd(type, this);
1592
- }
1593
- getMutableCollection() {
1594
- if (!this.nextCollection) this.nextCollection = this.collection.clone();
1595
- return this.nextCollection;
1596
- }
1597
- markDirty(node) {
1598
- this.dirtyNodes.add(node);
1599
- }
1600
- addNode(element) {
1601
- if (element.isHidden || element.node == null) return;
1602
- let collection = this.getMutableCollection();
1603
- if (!collection.getItem(element.node.key)) for (let child of element) this.addNode(child);
1604
- collection.addNode(element.node);
1605
- }
1606
- removeNode(node) {
1607
- for (let child of node) this.removeNode(child);
1608
- if (node.node) {
1609
- let collection = this.getMutableCollection();
1610
- collection.removeNode(node.node.key);
1611
- }
1612
- }
1613
- /** Finalizes the collection update, updating all nodes and freezing the collection. */
1614
- getCollection() {
1615
- if (this.inSubscription) return this.collection;
1616
- this.queuedRender = false;
1617
- this.updateCollection();
1618
- return this.collection;
1619
- }
1620
- updateCollection() {
1621
- for (let element of this.dirtyNodes) if (element instanceof $681cc3c98f569e39$export$dc064fe9e59310fd && (!element.isConnected || element.isHidden)) this.removeNode(element);
1622
- else element.updateChildIndices();
1623
- for (let element of this.dirtyNodes) if (element instanceof $681cc3c98f569e39$export$dc064fe9e59310fd) {
1624
- if (element.isConnected && !element.isHidden) {
1625
- element.updateNode();
1626
- this.addNode(element);
1627
- }
1628
- if (element.node) this.dirtyNodes.delete(element);
1629
- element.isMutated = false;
1630
- } else this.dirtyNodes.delete(element);
1631
- if (this.nextCollection) {
1632
- var _this_firstVisibleChild_node, _this_firstVisibleChild, _this_lastVisibleChild_node, _this_lastVisibleChild;
1633
- var _this_firstVisibleChild_node_key, _this_lastVisibleChild_node_key;
1634
- this.nextCollection.commit((_this_firstVisibleChild_node_key = (_this_firstVisibleChild = this.firstVisibleChild) === null || _this_firstVisibleChild === void 0 ? void 0 : (_this_firstVisibleChild_node = _this_firstVisibleChild.node) === null || _this_firstVisibleChild_node === void 0 ? void 0 : _this_firstVisibleChild_node.key) !== null && _this_firstVisibleChild_node_key !== void 0 ? _this_firstVisibleChild_node_key : null, (_this_lastVisibleChild_node_key = (_this_lastVisibleChild = this.lastVisibleChild) === null || _this_lastVisibleChild === void 0 ? void 0 : (_this_lastVisibleChild_node = _this_lastVisibleChild.node) === null || _this_lastVisibleChild_node === void 0 ? void 0 : _this_lastVisibleChild_node.key) !== null && _this_lastVisibleChild_node_key !== void 0 ? _this_lastVisibleChild_node_key : null, this.isSSR);
1635
- if (!this.isSSR) {
1636
- this.collection = this.nextCollection;
1637
- this.nextCollection = null;
1638
- }
1639
- }
1640
- }
1641
- queueUpdate() {
1642
- if (this.dirtyNodes.size === 0 || this.queuedRender) return;
1643
- this.queuedRender = true;
1644
- this.inSubscription = true;
1645
- if (!this.isSSR) this.collection = this.collection.clone();
1646
- for (let fn of this.subscriptions) fn();
1647
- this.inSubscription = false;
1648
- }
1649
- subscribe(fn) {
1650
- this.subscriptions.add(fn);
1651
- return () => this.subscriptions.delete(fn);
1652
- }
1653
- resetAfterSSR() {
1654
- if (this.isSSR) {
1655
- this.isSSR = false;
1656
- this.firstChild = null;
1657
- this.lastChild = null;
1658
- this.nodeId = 0;
1659
- }
1660
- }
1661
- constructor(collection) {
1662
- super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = false, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.nextCollection = null, this.subscriptions = /* @__PURE__ */ new Set(), this.queuedRender = false, this.inSubscription = false;
1663
- this.collection = collection;
1664
- this.nextCollection = collection;
1665
- }
1666
- }
1667
- function $e948873055cbafe4$export$727c8fc270210f13(props) {
1668
- let { children, items, idScope, addIdAndValue, dependencies = [] } = props;
1669
- let cache = useMemo(() => /* @__PURE__ */ new WeakMap(), dependencies);
1670
- return useMemo(() => {
1671
- if (items && typeof children === "function") {
1672
- let res = [];
1673
- for (let item of items) {
1674
- let rendered = cache.get(item);
1675
- if (!rendered) {
1676
- rendered = children(item);
1677
- var _rendered_props_id, _ref;
1678
- let key = (_ref = (_rendered_props_id = rendered.props.id) !== null && _rendered_props_id !== void 0 ? _rendered_props_id : item.key) !== null && _ref !== void 0 ? _ref : item.id;
1679
- if (key == null) throw new Error("Could not determine key for item");
1680
- if (idScope != null) key = idScope + ":" + key;
1681
- rendered = cloneElement(rendered, addIdAndValue ? {
1682
- key,
1683
- id: key,
1684
- value: item
1685
- } : {
1686
- key
1687
- });
1688
- cache.set(item, rendered);
1689
- }
1690
- res.push(rendered);
1691
- }
1692
- return res;
1693
- } else if (typeof children !== "function") return children;
1694
- }, [
1695
- children,
1696
- items,
1697
- cache,
1698
- idScope,
1699
- addIdAndValue
1700
- ]);
1701
- }
1702
- var shim = { exports: {} };
1703
- var useSyncExternalStoreShim_production = {};
1704
- /**
1705
- * @license React
1706
- * use-sync-external-store-shim.production.js
1707
- *
1708
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1709
- *
1710
- * This source code is licensed under the MIT license found in the
1711
- * LICENSE file in the root directory of this source tree.
1712
- */
1713
- var hasRequiredUseSyncExternalStoreShim_production;
1714
- function requireUseSyncExternalStoreShim_production() {
1715
- if (hasRequiredUseSyncExternalStoreShim_production) return useSyncExternalStoreShim_production;
1716
- hasRequiredUseSyncExternalStoreShim_production = 1;
1717
- var React = $dbSRa$react__default;
1718
- function is(x, y) {
1719
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
1720
- }
1721
- var objectIs = "function" === typeof Object.is ? Object.is : is, useState2 = React.useState, useEffect2 = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue;
1722
- function useSyncExternalStore$2(subscribe, getSnapshot) {
1723
- var value = getSnapshot(), _useState = useState2({ inst: { value, getSnapshot } }), inst = _useState[0].inst, forceUpdate = _useState[1];
1724
- useLayoutEffect(
1725
- function() {
1726
- inst.value = value;
1727
- inst.getSnapshot = getSnapshot;
1728
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1729
- },
1730
- [subscribe, value, getSnapshot]
1731
- );
1732
- useEffect2(
1733
- function() {
1734
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1735
- return subscribe(function() {
1736
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1737
- });
1738
- },
1739
- [subscribe]
1740
- );
1741
- useDebugValue(value);
1742
- return value;
1743
- }
1744
- function checkIfSnapshotChanged(inst) {
1745
- var latestGetSnapshot = inst.getSnapshot;
1746
- inst = inst.value;
1747
- try {
1748
- var nextValue = latestGetSnapshot();
1749
- return !objectIs(inst, nextValue);
1750
- } catch (error) {
1751
- return true;
1752
- }
1753
- }
1754
- function useSyncExternalStore$1(subscribe, getSnapshot) {
1755
- return getSnapshot();
1756
- }
1757
- var shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
1758
- useSyncExternalStoreShim_production.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim2;
1759
- return useSyncExternalStoreShim_production;
1760
- }
1761
- var useSyncExternalStoreShim_development = {};
1762
- /**
1763
- * @license React
1764
- * use-sync-external-store-shim.development.js
1765
- *
1766
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1767
- *
1768
- * This source code is licensed under the MIT license found in the
1769
- * LICENSE file in the root directory of this source tree.
1770
- */
1771
- var hasRequiredUseSyncExternalStoreShim_development;
1772
- function requireUseSyncExternalStoreShim_development() {
1773
- if (hasRequiredUseSyncExternalStoreShim_development) return useSyncExternalStoreShim_development;
1774
- hasRequiredUseSyncExternalStoreShim_development = 1;
1775
- "production" !== process.env.NODE_ENV && (function() {
1776
- function is(x, y) {
1777
- return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
1778
- }
1779
- function useSyncExternalStore$2(subscribe, getSnapshot) {
1780
- didWarnOld18Alpha || void 0 === React.startTransition || (didWarnOld18Alpha = true, console.error(
1781
- "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
1782
- ));
1783
- var value = getSnapshot();
1784
- if (!didWarnUncachedGetSnapshot) {
1785
- var cachedValue = getSnapshot();
1786
- objectIs(value, cachedValue) || (console.error(
1787
- "The result of getSnapshot should be cached to avoid an infinite loop"
1788
- ), didWarnUncachedGetSnapshot = true);
1789
- }
1790
- cachedValue = useState2({
1791
- inst: { value, getSnapshot }
1792
- });
1793
- var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
1794
- useLayoutEffect(
1795
- function() {
1796
- inst.value = value;
1797
- inst.getSnapshot = getSnapshot;
1798
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1799
- },
1800
- [subscribe, value, getSnapshot]
1801
- );
1802
- useEffect2(
1803
- function() {
1804
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1805
- return subscribe(function() {
1806
- checkIfSnapshotChanged(inst) && forceUpdate({ inst });
1807
- });
1808
- },
1809
- [subscribe]
1810
- );
1811
- useDebugValue(value);
1812
- return value;
1813
- }
1814
- function checkIfSnapshotChanged(inst) {
1815
- var latestGetSnapshot = inst.getSnapshot;
1816
- inst = inst.value;
1817
- try {
1818
- var nextValue = latestGetSnapshot();
1819
- return !objectIs(inst, nextValue);
1820
- } catch (error) {
1821
- return true;
1822
- }
1823
- }
1824
- function useSyncExternalStore$1(subscribe, getSnapshot) {
1825
- return getSnapshot();
1826
- }
1827
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
1828
- var React = $dbSRa$react__default, objectIs = "function" === typeof Object.is ? Object.is : is, useState2 = React.useState, useEffect2 = React.useEffect, useLayoutEffect = React.useLayoutEffect, useDebugValue = React.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim2 = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
1829
- useSyncExternalStoreShim_development.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim2;
1830
- "undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
1831
- })();
1832
- return useSyncExternalStoreShim_development;
1833
- }
1834
- var hasRequiredShim;
1835
- function requireShim() {
1836
- if (hasRequiredShim) return shim.exports;
1837
- hasRequiredShim = 1;
1838
- if (process.env.NODE_ENV === "production") {
1839
- shim.exports = requireUseSyncExternalStoreShim_production();
1840
- } else {
1841
- shim.exports = requireUseSyncExternalStoreShim_development();
1842
- }
1843
- return shim.exports;
1844
- }
1845
- var shimExports = requireShim();
1846
- const $e1995378a142960e$var$ShallowRenderContext = /* @__PURE__ */ createContext(false);
1847
- const $e1995378a142960e$var$CollectionDocumentContext = /* @__PURE__ */ createContext(null);
1848
- function $e1995378a142960e$export$bf788dd355e3a401(props) {
1849
- let doc = useContext($e1995378a142960e$var$CollectionDocumentContext);
1850
- if (doc)
1851
- return props.content;
1852
- let { collection, document: document2 } = $e1995378a142960e$var$useCollectionDocument(props.createCollection);
1853
- return /* @__PURE__ */ $dbSRa$react__default.createElement($dbSRa$react__default.Fragment, null, /* @__PURE__ */ $dbSRa$react__default.createElement($f39a9eba43920ace$export$8dc98ba7eadeaa56, null, /* @__PURE__ */ $dbSRa$react__default.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider, {
1854
- value: document2
1855
- }, props.content)), /* @__PURE__ */ $dbSRa$react__default.createElement($e1995378a142960e$var$CollectionInner, {
1856
- render: props.children,
1857
- collection
1858
- }));
1859
- }
1860
- function $e1995378a142960e$var$CollectionInner({ collection, render }) {
1861
- return render(collection);
1862
- }
1863
- function $e1995378a142960e$var$useSyncExternalStoreFallback(subscribe, getSnapshot, getServerSnapshot) {
1864
- let isSSR = $b5e257d569688ac6$export$535bd6ca7f90a273();
1865
- let isSSRRef = useRef(isSSR);
1866
- isSSRRef.current = isSSR;
1867
- let getSnapshotWrapper = useCallback(() => {
1868
- return isSSRRef.current ? getServerSnapshot() : getSnapshot();
1869
- }, [
1870
- getSnapshot,
1871
- getServerSnapshot
1872
- ]);
1873
- return shimExports.useSyncExternalStore(subscribe, getSnapshotWrapper);
1874
- }
1875
- const $e1995378a142960e$var$useSyncExternalStore = typeof $dbSRa$react__default["useSyncExternalStore"] === "function" ? $dbSRa$react__default["useSyncExternalStore"] : $e1995378a142960e$var$useSyncExternalStoreFallback;
1876
- function $e1995378a142960e$var$useCollectionDocument(createCollection) {
1877
- let [document2] = useState(() => new $681cc3c98f569e39$export$b34a105447964f9f((createCollection === null || createCollection === void 0 ? void 0 : createCollection()) || new $23b9f4fcf0fe224b$export$408d25a4e12db025()));
1878
- let subscribe = useCallback((fn) => document2.subscribe(fn), [
1879
- document2
1880
- ]);
1881
- let getSnapshot = useCallback(() => {
1882
- let collection2 = document2.getCollection();
1883
- if (document2.isSSR)
1884
- document2.resetAfterSSR();
1885
- return collection2;
1886
- }, [
1887
- document2
1888
- ]);
1889
- let getServerSnapshot = useCallback(() => {
1890
- document2.isSSR = true;
1891
- return document2.getCollection();
1892
- }, [
1893
- document2
1894
- ]);
1895
- let collection = $e1995378a142960e$var$useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1896
- return {
1897
- collection,
1898
- document: document2
1899
- };
1900
- }
1901
- const $e1995378a142960e$var$SSRContext = /* @__PURE__ */ createContext(null);
1902
- function $e1995378a142960e$var$createCollectionNodeClass(type) {
1903
- var _class;
1904
- let NodeClass = (_class = class extends $23b9f4fcf0fe224b$export$d68d59712b04d9d1 {
1905
- }, _class.type = type, _class);
1906
- return NodeClass;
1907
- }
1908
- function $e1995378a142960e$var$useSSRCollectionNode(CollectionNodeClass, props, ref, rendered, children, render) {
1909
- if (typeof CollectionNodeClass === "string") CollectionNodeClass = $e1995378a142960e$var$createCollectionNodeClass(CollectionNodeClass);
1910
- let itemRef = useCallback((element) => {
1911
- element === null || element === void 0 ? void 0 : element.setProps(props, ref, CollectionNodeClass, rendered, render);
1912
- }, [
1913
- props,
1914
- ref,
1915
- rendered,
1916
- render,
1917
- CollectionNodeClass
1918
- ]);
1919
- let parentNode = useContext($e1995378a142960e$var$SSRContext);
1920
- if (parentNode) {
1921
- let element = parentNode.ownerDocument.nodesByProps.get(props);
1922
- if (!element) {
1923
- element = parentNode.ownerDocument.createElement(CollectionNodeClass.type);
1924
- element.setProps(props, ref, CollectionNodeClass, rendered, render);
1925
- parentNode.appendChild(element);
1926
- parentNode.ownerDocument.updateCollection();
1927
- parentNode.ownerDocument.nodesByProps.set(props, element);
1928
- }
1929
- return children ? /* @__PURE__ */ $dbSRa$react__default.createElement($e1995378a142960e$var$SSRContext.Provider, {
1930
- value: element
1931
- }, children) : null;
1932
- }
1933
- return /* @__PURE__ */ $dbSRa$react__default.createElement(CollectionNodeClass.type, {
1934
- ref: itemRef
1935
- }, children);
1936
- }
1937
- function $e1995378a142960e$export$18af5c7a9e9b3664(CollectionNodeClass, render) {
1938
- let Component = ({ node }) => render(node.props, node.props.ref, node);
1939
- let Result = forwardRef((props, ref) => {
1940
- let focusableProps = useContext($f645667febf57a63$export$f9762fab77588ecb);
1941
- let isShallow = useContext($e1995378a142960e$var$ShallowRenderContext);
1942
- if (!isShallow) {
1943
- if (render.length >= 3) throw new Error(render.name + " cannot be rendered outside a collection.");
1944
- return render(props, ref);
1945
- }
1946
- return $e1995378a142960e$var$useSSRCollectionNode(CollectionNodeClass, props, ref, "children" in props ? props.children : null, null, (node) => (
1947
- // Forward FocusableContext to real DOM tree so tooltips work.
1948
- /* @__PURE__ */ $dbSRa$react__default.createElement($f645667febf57a63$export$f9762fab77588ecb.Provider, {
1949
- value: focusableProps
1950
- }, /* @__PURE__ */ $dbSRa$react__default.createElement(Component, {
1951
- node
1952
- }))
1953
- ));
1954
- });
1955
- Result.displayName = render.name;
1956
- return Result;
1957
- }
1958
- function $e1995378a142960e$export$e953bb1cd0f19726(CollectionNodeClass, render, useChildren = $e1995378a142960e$var$useCollectionChildren) {
1959
- let Component = ({ node }) => render(node.props, node.props.ref, node);
1960
- let Result = forwardRef((props, ref) => {
1961
- let children = useChildren(props);
1962
- var _useSSRCollectionNode;
1963
- return (_useSSRCollectionNode = $e1995378a142960e$var$useSSRCollectionNode(CollectionNodeClass, props, ref, null, children, (node) => /* @__PURE__ */ $dbSRa$react__default.createElement(Component, {
1964
- node
1965
- }))) !== null && _useSSRCollectionNode !== void 0 ? _useSSRCollectionNode : /* @__PURE__ */ $dbSRa$react__default.createElement($dbSRa$react__default.Fragment, null);
1966
- });
1967
- Result.displayName = render.name;
1968
- return Result;
1969
- }
1970
- function $e1995378a142960e$var$useCollectionChildren(options) {
1971
- return $e948873055cbafe4$export$727c8fc270210f13({
1972
- ...options,
1973
- addIdAndValue: true
1974
- });
1975
- }
1976
- const $e1995378a142960e$var$CollectionContext = /* @__PURE__ */ createContext(null);
1977
- function $e1995378a142960e$export$fb8073518f34e6ec(props) {
1978
- let ctx = useContext($e1995378a142960e$var$CollectionContext);
1979
- let dependencies = ((ctx === null || ctx === void 0 ? void 0 : ctx.dependencies) || []).concat(props.dependencies);
1980
- var _props_idScope;
1981
- let idScope = (_props_idScope = props.idScope) !== null && _props_idScope !== void 0 ? _props_idScope : ctx === null || ctx === void 0 ? void 0 : ctx.idScope;
1982
- let children = $e1995378a142960e$var$useCollectionChildren({
1983
- ...props,
1984
- idScope,
1985
- dependencies
1986
- });
1987
- let doc = useContext($e1995378a142960e$var$CollectionDocumentContext);
1988
- if (doc) children = /* @__PURE__ */ $dbSRa$react__default.createElement($e1995378a142960e$var$CollectionRoot, null, children);
1989
- ctx = useMemo(() => ({
1990
- dependencies,
1991
- idScope
1992
- }), [
1993
- idScope,
1994
- ...dependencies
1995
- ]);
1996
- return /* @__PURE__ */ $dbSRa$react__default.createElement($e1995378a142960e$var$CollectionContext.Provider, {
1997
- value: ctx
1998
- }, children);
1999
- }
2000
- function $e1995378a142960e$var$CollectionRoot({ children }) {
2001
- let doc = useContext($e1995378a142960e$var$CollectionDocumentContext);
2002
- let wrappedChildren = useMemo(() => /* @__PURE__ */ $dbSRa$react__default.createElement($e1995378a142960e$var$CollectionDocumentContext.Provider, {
2003
- value: null
2004
- }, /* @__PURE__ */ $dbSRa$react__default.createElement($e1995378a142960e$var$ShallowRenderContext.Provider, {
2005
- value: true
2006
- }, children)), [
2007
- children
2008
- ]);
2009
- return $b5e257d569688ac6$export$535bd6ca7f90a273() ? /* @__PURE__ */ $dbSRa$react__default.createElement($e1995378a142960e$var$SSRContext.Provider, {
2010
- value: doc
2011
- }, wrappedChildren) : /* @__PURE__ */ reactDomExports.createPortal(wrappedChildren, doc);
2012
- }
2013
- const $7135fc7d473fd974$export$d40e14dec8b060a8 = /* @__PURE__ */ createContext(null);
2014
- const $7135fc7d473fd974$export$a164736487e3f0ae = {
2015
- CollectionRoot({ collection, renderDropIndicator }) {
2016
- return $7135fc7d473fd974$var$useCollectionRender(collection, null, renderDropIndicator);
2017
- },
2018
- CollectionBranch({ collection, parent, renderDropIndicator }) {
2019
- return $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDropIndicator);
2020
- }
2021
- };
2022
- function $7135fc7d473fd974$var$useCollectionRender(collection, parent, renderDropIndicator) {
2023
- return $e948873055cbafe4$export$727c8fc270210f13({
2024
- items: parent ? collection.getChildren(parent.key) : collection,
2025
- dependencies: [
2026
- renderDropIndicator
2027
- ],
2028
- children(node) {
2029
- if (node.type === "content") return /* @__PURE__ */ $dbSRa$react__default.createElement($dbSRa$react__default.Fragment, null);
2030
- let rendered = node.render(node);
2031
- if (!renderDropIndicator || node.type !== "item") return rendered;
2032
- return /* @__PURE__ */ $dbSRa$react__default.createElement($dbSRa$react__default.Fragment, null, renderDropIndicator({
2033
- type: "item",
2034
- key: node.key,
2035
- dropPosition: "before"
2036
- }), rendered, $7135fc7d473fd974$export$2dbbd341daed716d(collection, node, renderDropIndicator));
2037
- }
2038
- });
2039
- }
2040
- function $7135fc7d473fd974$export$2dbbd341daed716d(collection, node, renderDropIndicator) {
2041
- let key = node.key;
2042
- let keyAfter = collection.getKeyAfter(key);
2043
- let nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;
2044
- while (nextItemInFlattenedCollection != null && nextItemInFlattenedCollection.type !== "item") {
2045
- keyAfter = collection.getKeyAfter(nextItemInFlattenedCollection.key);
2046
- nextItemInFlattenedCollection = keyAfter != null ? collection.getItem(keyAfter) : null;
2047
- }
2048
- let nextItemInSameLevel = node.nextKey != null ? collection.getItem(node.nextKey) : null;
2049
- while (nextItemInSameLevel != null && nextItemInSameLevel.type !== "item") nextItemInSameLevel = nextItemInSameLevel.nextKey != null ? collection.getItem(nextItemInSameLevel.nextKey) : null;
2050
- let afterIndicators = [];
2051
- if (nextItemInSameLevel == null) {
2052
- let current = node;
2053
- while ((current === null || current === void 0 ? void 0 : current.type) === "item" && (!nextItemInFlattenedCollection || current.parentKey !== nextItemInFlattenedCollection.parentKey && nextItemInFlattenedCollection.level < current.level)) {
2054
- let indicator = renderDropIndicator({
2055
- type: "item",
2056
- key: current.key,
2057
- dropPosition: "after"
2058
- });
2059
- if (/* @__PURE__ */ isValidElement(indicator)) afterIndicators.push(/* @__PURE__ */ cloneElement(indicator, {
2060
- key: `${current.key}-after`
2061
- }));
2062
- current = current.parentKey != null ? collection.getItem(current.parentKey) : null;
2063
- }
2064
- }
2065
- return afterIndicators;
2066
- }
2067
- const $7135fc7d473fd974$export$4feb769f8ddf26c5 = /* @__PURE__ */ createContext($7135fc7d473fd974$export$a164736487e3f0ae);
2068
- function $7135fc7d473fd974$export$90e00781bc59d8f9(focusedKey) {
2069
- return useMemo(() => focusedKey != null ? /* @__PURE__ */ new Set([
2070
- focusedKey
2071
- ]) : null, [
2072
- focusedKey
2073
- ]);
2074
- }
2075
- class $e40ea825a81a3709$export$52baac22726c72bf extends Set {
2076
- constructor(keys, anchorKey, currentKey) {
2077
- super(keys);
2078
- if (keys instanceof $e40ea825a81a3709$export$52baac22726c72bf) {
2079
- this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : keys.anchorKey;
2080
- this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : keys.currentKey;
2081
- } else {
2082
- this.anchorKey = anchorKey !== null && anchorKey !== void 0 ? anchorKey : null;
2083
- this.currentKey = currentKey !== null && currentKey !== void 0 ? currentKey : null;
2084
- }
2085
- }
2086
- }
2087
- function $7af3f5b51489e0b5$var$equalSets(setA, setB) {
2088
- if (setA.size !== setB.size) return false;
2089
- for (let item of setA) {
2090
- if (!setB.has(item)) return false;
2091
- }
2092
- return true;
2093
- }
2094
- function $7af3f5b51489e0b5$export$253fe78d46329472(props) {
2095
- let { selectionMode = "none", disallowEmptySelection = false, allowDuplicateSelectionEvents, selectionBehavior: selectionBehaviorProp = "toggle", disabledBehavior = "all" } = props;
2096
- let isFocusedRef = useRef(false);
2097
- let [, setFocused] = useState(false);
2098
- let focusedKeyRef = useRef(null);
2099
- let childFocusStrategyRef = useRef(null);
2100
- let [, setFocusedKey] = useState(null);
2101
- let selectedKeysProp = useMemo(() => $7af3f5b51489e0b5$var$convertSelection(props.selectedKeys), [
2102
- props.selectedKeys
2103
- ]);
2104
- let defaultSelectedKeys = useMemo(() => $7af3f5b51489e0b5$var$convertSelection(props.defaultSelectedKeys, new $e40ea825a81a3709$export$52baac22726c72bf()), [
2105
- props.defaultSelectedKeys
2106
- ]);
2107
- let [selectedKeys, setSelectedKeys] = $458b0a5536c1a7cf$export$40bfa8c7b0832715(selectedKeysProp, defaultSelectedKeys, props.onSelectionChange);
2108
- let disabledKeysProp = useMemo(() => props.disabledKeys ? new Set(props.disabledKeys) : /* @__PURE__ */ new Set(), [
2109
- props.disabledKeys
2110
- ]);
2111
- let [selectionBehavior, setSelectionBehavior] = useState(selectionBehaviorProp);
2112
- if (selectionBehaviorProp === "replace" && selectionBehavior === "toggle" && typeof selectedKeys === "object" && selectedKeys.size === 0) setSelectionBehavior("replace");
2113
- let lastSelectionBehavior = useRef(selectionBehaviorProp);
2114
- useEffect(() => {
2115
- if (selectionBehaviorProp !== lastSelectionBehavior.current) {
2116
- setSelectionBehavior(selectionBehaviorProp);
2117
- lastSelectionBehavior.current = selectionBehaviorProp;
2118
- }
2119
- }, [
2120
- selectionBehaviorProp
2121
- ]);
2122
- return {
2123
- selectionMode,
2124
- disallowEmptySelection,
2125
- selectionBehavior,
2126
- setSelectionBehavior,
2127
- get isFocused() {
2128
- return isFocusedRef.current;
2129
- },
2130
- setFocused(f) {
2131
- isFocusedRef.current = f;
2132
- setFocused(f);
2133
- },
2134
- get focusedKey() {
2135
- return focusedKeyRef.current;
2136
- },
2137
- get childFocusStrategy() {
2138
- return childFocusStrategyRef.current;
2139
- },
2140
- setFocusedKey(k, childFocusStrategy = "first") {
2141
- focusedKeyRef.current = k;
2142
- childFocusStrategyRef.current = childFocusStrategy;
2143
- setFocusedKey(k);
2144
- },
2145
- selectedKeys,
2146
- setSelectedKeys(keys) {
2147
- if (allowDuplicateSelectionEvents || !$7af3f5b51489e0b5$var$equalSets(keys, selectedKeys)) setSelectedKeys(keys);
2148
- },
2149
- disabledKeys: disabledKeysProp,
2150
- disabledBehavior
2151
- };
2152
- }
2153
- function $7af3f5b51489e0b5$var$convertSelection(selection, defaultValue) {
2154
- if (!selection) return defaultValue;
2155
- return selection === "all" ? "all" : new $e40ea825a81a3709$export$52baac22726c72bf(selection);
2156
- }
2157
- class $d496c0a20b6e58ec$export$6c8a5aaad13c9852 {
2158
- /**
2159
- * The type of selection that is allowed in the collection.
2160
- */
2161
- get selectionMode() {
2162
- return this.state.selectionMode;
2163
- }
2164
- /**
2165
- * Whether the collection allows empty selection.
2166
- */
2167
- get disallowEmptySelection() {
2168
- return this.state.disallowEmptySelection;
2169
- }
2170
- /**
2171
- * The selection behavior for the collection.
2172
- */
2173
- get selectionBehavior() {
2174
- return this.state.selectionBehavior;
2175
- }
2176
- /**
2177
- * Sets the selection behavior for the collection.
2178
- */
2179
- setSelectionBehavior(selectionBehavior) {
2180
- this.state.setSelectionBehavior(selectionBehavior);
2181
- }
2182
- /**
2183
- * Whether the collection is currently focused.
2184
- */
2185
- get isFocused() {
2186
- return this.state.isFocused;
2187
- }
2188
- /**
2189
- * Sets whether the collection is focused.
2190
- */
2191
- setFocused(isFocused) {
2192
- this.state.setFocused(isFocused);
2193
- }
2194
- /**
2195
- * The current focused key in the collection.
2196
- */
2197
- get focusedKey() {
2198
- return this.state.focusedKey;
2199
- }
2200
- /** Whether the first or last child of the focused key should receive focus. */
2201
- get childFocusStrategy() {
2202
- return this.state.childFocusStrategy;
2203
- }
2204
- /**
2205
- * Sets the focused key.
2206
- */
2207
- setFocusedKey(key, childFocusStrategy) {
2208
- if (key == null || this.collection.getItem(key)) this.state.setFocusedKey(key, childFocusStrategy);
2209
- }
2210
- /**
2211
- * The currently selected keys in the collection.
2212
- */
2213
- get selectedKeys() {
2214
- return this.state.selectedKeys === "all" ? new Set(this.getSelectAllKeys()) : this.state.selectedKeys;
2215
- }
2216
- /**
2217
- * The raw selection value for the collection.
2218
- * Either 'all' for select all, or a set of keys.
2219
- */
2220
- get rawSelection() {
2221
- return this.state.selectedKeys;
2222
- }
2223
- /**
2224
- * Returns whether a key is selected.
2225
- */
2226
- isSelected(key) {
2227
- if (this.state.selectionMode === "none") return false;
2228
- let mappedKey = this.getKey(key);
2229
- if (mappedKey == null) return false;
2230
- return this.state.selectedKeys === "all" ? this.canSelectItem(mappedKey) : this.state.selectedKeys.has(mappedKey);
2231
- }
2232
- /**
2233
- * Whether the selection is empty.
2234
- */
2235
- get isEmpty() {
2236
- return this.state.selectedKeys !== "all" && this.state.selectedKeys.size === 0;
2237
- }
2238
- /**
2239
- * Whether all items in the collection are selected.
2240
- */
2241
- get isSelectAll() {
2242
- if (this.isEmpty) return false;
2243
- if (this.state.selectedKeys === "all") return true;
2244
- if (this._isSelectAll != null) return this._isSelectAll;
2245
- let allKeys = this.getSelectAllKeys();
2246
- let selectedKeys = this.state.selectedKeys;
2247
- this._isSelectAll = allKeys.every((k) => selectedKeys.has(k));
2248
- return this._isSelectAll;
2249
- }
2250
- get firstSelectedKey() {
2251
- let first = null;
2252
- for (let key of this.state.selectedKeys) {
2253
- let item = this.collection.getItem(key);
2254
- if (!first || item && $c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, item, first) < 0) first = item;
2255
- }
2256
- var _first_key;
2257
- return (_first_key = first === null || first === void 0 ? void 0 : first.key) !== null && _first_key !== void 0 ? _first_key : null;
2258
- }
2259
- get lastSelectedKey() {
2260
- let last = null;
2261
- for (let key of this.state.selectedKeys) {
2262
- let item = this.collection.getItem(key);
2263
- if (!last || item && $c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, item, last) > 0) last = item;
2264
- }
2265
- var _last_key;
2266
- return (_last_key = last === null || last === void 0 ? void 0 : last.key) !== null && _last_key !== void 0 ? _last_key : null;
2267
- }
2268
- get disabledKeys() {
2269
- return this.state.disabledKeys;
2270
- }
2271
- get disabledBehavior() {
2272
- return this.state.disabledBehavior;
2273
- }
2274
- /**
2275
- * Extends the selection to the given key.
2276
- */
2277
- extendSelection(toKey) {
2278
- if (this.selectionMode === "none") return;
2279
- if (this.selectionMode === "single") {
2280
- this.replaceSelection(toKey);
2281
- return;
2282
- }
2283
- let mappedToKey = this.getKey(toKey);
2284
- if (mappedToKey == null) return;
2285
- let selection;
2286
- if (this.state.selectedKeys === "all") selection = new $e40ea825a81a3709$export$52baac22726c72bf([
2287
- mappedToKey
2288
- ], mappedToKey, mappedToKey);
2289
- else {
2290
- let selectedKeys = this.state.selectedKeys;
2291
- var _selectedKeys_anchorKey;
2292
- let anchorKey = (_selectedKeys_anchorKey = selectedKeys.anchorKey) !== null && _selectedKeys_anchorKey !== void 0 ? _selectedKeys_anchorKey : mappedToKey;
2293
- selection = new $e40ea825a81a3709$export$52baac22726c72bf(selectedKeys, anchorKey, mappedToKey);
2294
- var _selectedKeys_currentKey;
2295
- for (let key of this.getKeyRange(anchorKey, (_selectedKeys_currentKey = selectedKeys.currentKey) !== null && _selectedKeys_currentKey !== void 0 ? _selectedKeys_currentKey : mappedToKey)) selection.delete(key);
2296
- for (let key of this.getKeyRange(mappedToKey, anchorKey)) if (this.canSelectItem(key)) selection.add(key);
2297
- }
2298
- this.state.setSelectedKeys(selection);
2299
- }
2300
- getKeyRange(from, to) {
2301
- let fromItem = this.collection.getItem(from);
2302
- let toItem = this.collection.getItem(to);
2303
- if (fromItem && toItem) {
2304
- if ($c5a24bc478652b5f$export$8c434b3a7a4dad6(this.collection, fromItem, toItem) <= 0) return this.getKeyRangeInternal(from, to);
2305
- return this.getKeyRangeInternal(to, from);
2306
- }
2307
- return [];
2308
- }
2309
- getKeyRangeInternal(from, to) {
2310
- var _this_layoutDelegate;
2311
- if ((_this_layoutDelegate = this.layoutDelegate) === null || _this_layoutDelegate === void 0 ? void 0 : _this_layoutDelegate.getKeyRange) return this.layoutDelegate.getKeyRange(from, to);
2312
- let keys = [];
2313
- let key = from;
2314
- while (key != null) {
2315
- let item = this.collection.getItem(key);
2316
- if (item && (item.type === "item" || item.type === "cell" && this.allowsCellSelection)) keys.push(key);
2317
- if (key === to) return keys;
2318
- key = this.collection.getKeyAfter(key);
2319
- }
2320
- return [];
2321
- }
2322
- getKey(key) {
2323
- let item = this.collection.getItem(key);
2324
- if (!item)
2325
- return key;
2326
- if (item.type === "cell" && this.allowsCellSelection) return key;
2327
- while (item && item.type !== "item" && item.parentKey != null) item = this.collection.getItem(item.parentKey);
2328
- if (!item || item.type !== "item") return null;
2329
- return item.key;
2330
- }
2331
- /**
2332
- * Toggles whether the given key is selected.
2333
- */
2334
- toggleSelection(key) {
2335
- if (this.selectionMode === "none") return;
2336
- if (this.selectionMode === "single" && !this.isSelected(key)) {
2337
- this.replaceSelection(key);
2338
- return;
2339
- }
2340
- let mappedKey = this.getKey(key);
2341
- if (mappedKey == null) return;
2342
- let keys = new $e40ea825a81a3709$export$52baac22726c72bf(this.state.selectedKeys === "all" ? this.getSelectAllKeys() : this.state.selectedKeys);
2343
- if (keys.has(mappedKey)) keys.delete(mappedKey);
2344
- else if (this.canSelectItem(mappedKey)) {
2345
- keys.add(mappedKey);
2346
- keys.anchorKey = mappedKey;
2347
- keys.currentKey = mappedKey;
2348
- }
2349
- if (this.disallowEmptySelection && keys.size === 0) return;
2350
- this.state.setSelectedKeys(keys);
2351
- }
2352
- /**
2353
- * Replaces the selection with only the given key.
2354
- */
2355
- replaceSelection(key) {
2356
- if (this.selectionMode === "none") return;
2357
- let mappedKey = this.getKey(key);
2358
- if (mappedKey == null) return;
2359
- let selection = this.canSelectItem(mappedKey) ? new $e40ea825a81a3709$export$52baac22726c72bf([
2360
- mappedKey
2361
- ], mappedKey, mappedKey) : new $e40ea825a81a3709$export$52baac22726c72bf();
2362
- this.state.setSelectedKeys(selection);
2363
- }
2364
- /**
2365
- * Replaces the selection with the given keys.
2366
- */
2367
- setSelectedKeys(keys) {
2368
- if (this.selectionMode === "none") return;
2369
- let selection = new $e40ea825a81a3709$export$52baac22726c72bf();
2370
- for (let key of keys) {
2371
- let mappedKey = this.getKey(key);
2372
- if (mappedKey != null) {
2373
- selection.add(mappedKey);
2374
- if (this.selectionMode === "single") break;
2375
- }
2376
- }
2377
- this.state.setSelectedKeys(selection);
2378
- }
2379
- getSelectAllKeys() {
2380
- let keys = [];
2381
- let addKeys = (key) => {
2382
- while (key != null) {
2383
- if (this.canSelectItem(key)) {
2384
- var _getFirstItem;
2385
- let item = this.collection.getItem(key);
2386
- if ((item === null || item === void 0 ? void 0 : item.type) === "item") keys.push(key);
2387
- var _getFirstItem_key;
2388
- if ((item === null || item === void 0 ? void 0 : item.hasChildNodes) && (this.allowsCellSelection || item.type !== "item")) addKeys((_getFirstItem_key = (_getFirstItem = $c5a24bc478652b5f$export$fbdeaa6a76694f71($c5a24bc478652b5f$export$1005530eda016c13(item, this.collection))) === null || _getFirstItem === void 0 ? void 0 : _getFirstItem.key) !== null && _getFirstItem_key !== void 0 ? _getFirstItem_key : null);
2389
- }
2390
- key = this.collection.getKeyAfter(key);
2391
- }
2392
- };
2393
- addKeys(this.collection.getFirstKey());
2394
- return keys;
2395
- }
2396
- /**
2397
- * Selects all items in the collection.
2398
- */
2399
- selectAll() {
2400
- if (!this.isSelectAll && this.selectionMode === "multiple") this.state.setSelectedKeys("all");
2401
- }
2402
- /**
2403
- * Removes all keys from the selection.
2404
- */
2405
- clearSelection() {
2406
- if (!this.disallowEmptySelection && (this.state.selectedKeys === "all" || this.state.selectedKeys.size > 0)) this.state.setSelectedKeys(new $e40ea825a81a3709$export$52baac22726c72bf());
2407
- }
2408
- /**
2409
- * Toggles between select all and an empty selection.
2410
- */
2411
- toggleSelectAll() {
2412
- if (this.isSelectAll) this.clearSelection();
2413
- else this.selectAll();
2414
- }
2415
- select(key, e) {
2416
- if (this.selectionMode === "none") return;
2417
- if (this.selectionMode === "single") {
2418
- if (this.isSelected(key) && !this.disallowEmptySelection) this.toggleSelection(key);
2419
- else this.replaceSelection(key);
2420
- } else if (this.selectionBehavior === "toggle" || e && (e.pointerType === "touch" || e.pointerType === "virtual"))
2421
- this.toggleSelection(key);
2422
- else this.replaceSelection(key);
2423
- }
2424
- /**
2425
- * Returns whether the current selection is equal to the given selection.
2426
- */
2427
- isSelectionEqual(selection) {
2428
- if (selection === this.state.selectedKeys) return true;
2429
- let selectedKeys = this.selectedKeys;
2430
- if (selection.size !== selectedKeys.size) return false;
2431
- for (let key of selection) {
2432
- if (!selectedKeys.has(key)) return false;
2433
- }
2434
- for (let key of selectedKeys) {
2435
- if (!selection.has(key)) return false;
2436
- }
2437
- return true;
2438
- }
2439
- canSelectItem(key) {
2440
- var _item_props;
2441
- if (this.state.selectionMode === "none" || this.state.disabledKeys.has(key)) return false;
2442
- let item = this.collection.getItem(key);
2443
- if (!item || (item === null || item === void 0 ? void 0 : (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.isDisabled) || item.type === "cell" && !this.allowsCellSelection) return false;
2444
- return true;
2445
- }
2446
- isDisabled(key) {
2447
- var _this_collection_getItem_props, _this_collection_getItem;
2448
- return this.state.disabledBehavior === "all" && (this.state.disabledKeys.has(key) || !!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === void 0 ? void 0 : _this_collection_getItem_props.isDisabled));
2449
- }
2450
- isLink(key) {
2451
- var _this_collection_getItem_props, _this_collection_getItem;
2452
- return !!((_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : (_this_collection_getItem_props = _this_collection_getItem.props) === null || _this_collection_getItem_props === void 0 ? void 0 : _this_collection_getItem_props.href);
2453
- }
2454
- getItemProps(key) {
2455
- var _this_collection_getItem;
2456
- return (_this_collection_getItem = this.collection.getItem(key)) === null || _this_collection_getItem === void 0 ? void 0 : _this_collection_getItem.props;
2457
- }
2458
- withCollection(collection) {
2459
- return new $d496c0a20b6e58ec$export$6c8a5aaad13c9852(collection, this.state, {
2460
- allowsCellSelection: this.allowsCellSelection,
2461
- layoutDelegate: this.layoutDelegate || void 0
2462
- });
2463
- }
2464
- constructor(collection, state, options) {
2465
- this.collection = collection;
2466
- this.state = state;
2467
- var _options_allowsCellSelection;
2468
- this.allowsCellSelection = (_options_allowsCellSelection = options === null || options === void 0 ? void 0 : options.allowsCellSelection) !== null && _options_allowsCellSelection !== void 0 ? _options_allowsCellSelection : false;
2469
- this._isSelectAll = null;
2470
- this.layoutDelegate = (options === null || options === void 0 ? void 0 : options.layoutDelegate) || null;
2471
- }
2472
- }
2473
- export {
2474
- $e1995378a142960e$export$fb8073518f34e6ec as $,
2475
- $55f9b1ae81f22853$export$759df0d867455a91 as A,
2476
- $feb5ffebff200149$export$c3d8340acf92597f as B,
2477
- $8a26561d2877236e$export$c24ed0104d07eab9 as C,
2478
- $23b9f4fcf0fe224b$export$5ae2504e948afce5 as D,
2479
- $7af3f5b51489e0b5$export$253fe78d46329472 as a,
2480
- $7613b1592d41b092$export$6cd28814d92fa9c9 as b,
2481
- $d496c0a20b6e58ec$export$6c8a5aaad13c9852 as c,
2482
- $21f1aa98acb08317$export$c57958e35f31ed73 as d,
2483
- $cc38e7bd3fc7b213$export$2bb74740c4e19def as e,
2484
- $880e95eb8b93ba9a$export$ecf600387e221c37 as f,
2485
- $e1995378a142960e$export$bf788dd355e3a401 as g,
2486
- $e1995378a142960e$export$e953bb1cd0f19726 as h,
2487
- $23b9f4fcf0fe224b$export$437f11dc9b403b78 as i,
2488
- $e1995378a142960e$export$18af5c7a9e9b3664 as j,
2489
- $23b9f4fcf0fe224b$export$fd11f34e1d07f134 as k,
2490
- $7135fc7d473fd974$export$4feb769f8ddf26c5 as l,
2491
- $7135fc7d473fd974$export$d40e14dec8b060a8 as m,
2492
- $23b9f4fcf0fe224b$export$8258a0665a675899 as n,
2493
- $ae20dd8cbca75726$export$d6daf82dcd84e87c as o,
2494
- $23b9f4fcf0fe224b$export$d68d59712b04d9d1 as p,
2495
- $7135fc7d473fd974$export$90e00781bc59d8f9 as q,
2496
- $7135fc7d473fd974$export$a164736487e3f0ae as r,
2497
- $c5a24bc478652b5f$export$1005530eda016c13 as s,
2498
- $55f9b1ae81f22853$export$2b35b76d2e30e129 as t,
2499
- $fb3050f43d946246$export$e32c88dfddc6e1d8 as u,
2500
- $5671b20cf9b562b2$export$831c820ad60f9d12 as v,
2501
- $55f9b1ae81f22853$export$76e4e37e5339496d as w,
2502
- $5671b20cf9b562b2$export$447a38995de2c711 as x,
2503
- $55f9b1ae81f22853$export$6c5dc7e81d2cc29a as y,
2504
- $21f1aa98acb08317$export$16792effe837dba3 as z
2505
- };