@g4rcez/components 5.0.2 → 5.0.3

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 (273) hide show
  1. package/dist/AnimatePresence-j36AYeOQ.js +181 -0
  2. package/dist/AnimatePresence-j36AYeOQ.js.map +1 -0
  3. package/dist/Calendar.es-xICmgvjq.js +23 -0
  4. package/dist/Calendar.es-xICmgvjq.js.map +1 -0
  5. package/dist/Funnel.es-DjKVl8Nj.js +23 -0
  6. package/dist/Funnel.es-DjKVl8Nj.js.map +1 -0
  7. package/dist/{MotionConfig-DKKYqBH2.js → MotionConfig-CXHoPGbK.js} +2 -2
  8. package/dist/{MotionConfig-DKKYqBH2.js.map → MotionConfig-CXHoPGbK.js.map} +1 -1
  9. package/dist/Plus.es-DbyRkEE2.js +23 -0
  10. package/dist/Plus.es-DbyRkEE2.js.map +1 -0
  11. package/dist/Trash.es-BFAc8PMf.js +23 -0
  12. package/dist/Trash.es-BFAc8PMf.js.map +1 -0
  13. package/dist/{calendar-PCCZDUIL.js → calendar-DEPkz8sw.js} +364 -502
  14. package/dist/calendar-DEPkz8sw.js.map +1 -0
  15. package/dist/calendar-header-Dfr-CwkY.js +174 -0
  16. package/dist/calendar-header-Dfr-CwkY.js.map +1 -0
  17. package/dist/chunk-jwUa06l-.js +23 -0
  18. package/dist/components/core/button.js +1 -1
  19. package/dist/components/core/heading.js +11 -0
  20. package/dist/components/core/heading.js.map +1 -0
  21. package/dist/{polymorph-BLXhrn9n.js → components/core/polymorph.js} +2 -2
  22. package/dist/components/core/polymorph.js.map +1 -0
  23. package/dist/components/core/render-on-view.js +29 -0
  24. package/dist/components/core/render-on-view.js.map +1 -0
  25. package/dist/components/core/resizable.d.ts +7 -1
  26. package/dist/components/core/resizable.d.ts.map +1 -1
  27. package/dist/components/core/resizable.js +60 -0
  28. package/dist/components/core/resizable.js.map +1 -0
  29. package/dist/components/core/resizable.jsx +46 -40
  30. package/dist/{slot-pC8kH9De.js → components/core/slot.js} +2 -2
  31. package/dist/components/core/slot.js.map +1 -0
  32. package/dist/components/core/tag.js +1 -1
  33. package/dist/components/core/typography.js +40 -0
  34. package/dist/components/core/typography.js.map +1 -0
  35. package/dist/components/display/alert.d.ts.map +1 -1
  36. package/dist/components/display/alert.js +83 -102
  37. package/dist/components/display/alert.js.map +1 -1
  38. package/dist/components/display/alert.jsx +26 -29
  39. package/dist/components/display/calendar.d.ts.map +1 -1
  40. package/dist/components/display/calendar.js +1 -1
  41. package/dist/components/display/calendar.jsx +15 -10
  42. package/dist/components/display/card.js +2 -2
  43. package/dist/components/display/empty.d.ts.map +1 -1
  44. package/dist/components/display/empty.js +25 -0
  45. package/dist/components/display/empty.js.map +1 -0
  46. package/dist/components/display/empty.jsx +3 -1
  47. package/dist/components/display/list.d.ts.map +1 -1
  48. package/dist/components/display/list.js +132 -122
  49. package/dist/components/display/list.js.map +1 -1
  50. package/dist/components/display/list.jsx +30 -25
  51. package/dist/components/display/notifications.d.ts.map +1 -1
  52. package/dist/components/display/notifications.js +1 -1
  53. package/dist/components/display/notifications.jsx +8 -6
  54. package/dist/components/display/progress.d.ts.map +1 -1
  55. package/dist/components/display/progress.js +3 -0
  56. package/dist/components/display/progress.jsx +6 -8
  57. package/dist/components/display/shortcut.js +2 -0
  58. package/dist/components/display/skeleton.js +41 -0
  59. package/dist/components/display/skeleton.js.map +1 -0
  60. package/dist/components/display/spinner.js +17 -0
  61. package/dist/components/display/spinner.js.map +1 -0
  62. package/dist/components/display/step.d.ts.map +1 -1
  63. package/dist/components/display/step.js +3 -0
  64. package/dist/components/display/step.jsx +5 -5
  65. package/dist/components/display/tabs.js +1 -1
  66. package/dist/components/display/timeline.js +1 -1
  67. package/dist/components/floating/command-palette.d.ts.map +1 -1
  68. package/dist/components/floating/command-palette.js +255 -0
  69. package/dist/components/floating/command-palette.js.map +1 -0
  70. package/dist/components/floating/command-palette.jsx +34 -25
  71. package/dist/components/floating/dropdown.js +1 -1
  72. package/dist/components/floating/dropdown.js.map +1 -1
  73. package/dist/components/floating/dropdown.jsx +1 -1
  74. package/dist/components/floating/expand.js +15 -14
  75. package/dist/components/floating/expand.js.map +1 -1
  76. package/dist/components/floating/menu.js +1 -1
  77. package/dist/components/floating/modal.d.ts +14 -11
  78. package/dist/components/floating/modal.d.ts.map +1 -1
  79. package/dist/components/floating/modal.js +1 -1
  80. package/dist/components/floating/modal.jsx +56 -17
  81. package/dist/components/floating/toolbar.d.ts +3 -3
  82. package/dist/components/floating/toolbar.d.ts.map +1 -1
  83. package/dist/components/floating/toolbar.js +20 -0
  84. package/dist/components/floating/toolbar.js.map +1 -0
  85. package/dist/components/floating/toolbar.jsx +7 -3
  86. package/dist/components/floating/tooltip.js +2 -2
  87. package/dist/components/floating/tooltip.js.map +1 -1
  88. package/dist/components/floating/tooltip.jsx +1 -1
  89. package/dist/components/floating/wizard.js +3 -0
  90. package/dist/components/form/autocomplete.d.ts.map +1 -1
  91. package/dist/components/form/autocomplete.js +344 -2
  92. package/dist/components/form/autocomplete.js.map +1 -0
  93. package/dist/components/form/autocomplete.jsx +27 -18
  94. package/dist/components/form/checkbox.d.ts.map +1 -1
  95. package/dist/components/form/checkbox.js +29 -27
  96. package/dist/components/form/checkbox.js.map +1 -1
  97. package/dist/components/form/checkbox.jsx +21 -6
  98. package/dist/components/form/date-picker.js +1 -1
  99. package/dist/components/form/date-picker.jsx +1 -1
  100. package/dist/components/form/file-upload.d.ts +6 -1
  101. package/dist/components/form/file-upload.d.ts.map +1 -1
  102. package/dist/components/form/file-upload.js +1 -1
  103. package/dist/components/form/file-upload.jsx +34 -12
  104. package/dist/components/form/formReset.js +10 -0
  105. package/dist/components/form/formReset.js.map +1 -0
  106. package/dist/components/form/free-text.js +70 -0
  107. package/dist/components/form/free-text.js.map +1 -0
  108. package/dist/components/form/free-text.jsx +1 -1
  109. package/dist/components/form/input-field.d.ts.map +1 -1
  110. package/dist/components/form/input-field.js +3 -0
  111. package/dist/components/form/input-field.jsx +14 -8
  112. package/dist/components/form/input.js +1 -1
  113. package/dist/components/form/multi-select.d.ts.map +1 -1
  114. package/dist/components/form/multi-select.js +420 -0
  115. package/dist/components/form/multi-select.js.map +1 -0
  116. package/dist/components/form/multi-select.jsx +41 -33
  117. package/dist/components/form/select.d.ts.map +1 -1
  118. package/dist/components/form/select.js +55 -51
  119. package/dist/components/form/select.js.map +1 -1
  120. package/dist/components/form/select.jsx +8 -5
  121. package/dist/components/form/slider.js +3 -0
  122. package/dist/components/form/switch.d.ts +2 -1
  123. package/dist/components/form/switch.d.ts.map +1 -1
  124. package/dist/components/form/switch.js +32 -26
  125. package/dist/components/form/switch.js.map +1 -1
  126. package/dist/components/form/switch.jsx +26 -13
  127. package/dist/components/form/textarea.js +19 -0
  128. package/dist/components/form/textarea.js.map +1 -0
  129. package/dist/components/page-calendar/calendar-header.d.ts.map +1 -1
  130. package/dist/components/page-calendar/calendar-header.js +2 -0
  131. package/dist/components/page-calendar/calendar-header.jsx +6 -4
  132. package/dist/components/page-calendar/day-view.js +124 -0
  133. package/dist/components/page-calendar/day-view.js.map +1 -0
  134. package/dist/components/page-calendar/event-pill.js +44 -0
  135. package/dist/components/page-calendar/event-pill.js.map +1 -0
  136. package/dist/components/page-calendar/month-view.d.ts.map +1 -1
  137. package/dist/components/page-calendar/month-view.js +109 -0
  138. package/dist/components/page-calendar/month-view.js.map +1 -0
  139. package/dist/components/page-calendar/month-view.jsx +78 -31
  140. package/dist/components/page-calendar/page-calendar.d.ts.map +1 -1
  141. package/dist/components/page-calendar/page-calendar.js +75 -0
  142. package/dist/components/page-calendar/page-calendar.js.map +1 -0
  143. package/dist/components/page-calendar/page-calendar.jsx +2 -2
  144. package/dist/components/page-calendar/week-view.js +88 -0
  145. package/dist/components/page-calendar/week-view.js.map +1 -0
  146. package/dist/components/table/filter.d.ts.map +1 -1
  147. package/dist/components/table/filter.js +239 -0
  148. package/dist/components/table/filter.js.map +1 -0
  149. package/dist/components/table/filter.jsx +9 -4
  150. package/dist/components/table/group.d.ts.map +1 -1
  151. package/dist/components/table/group.js +3 -0
  152. package/dist/components/table/group.jsx +5 -3
  153. package/dist/components/table/index.js +102 -0
  154. package/dist/components/table/index.js.map +1 -0
  155. package/dist/components/table/inner-table.js +2 -0
  156. package/dist/components/table/inner-table.jsx +1 -1
  157. package/dist/components/table/metadata.js +73 -0
  158. package/dist/components/table/metadata.js.map +1 -0
  159. package/dist/components/table/metadata.jsx +1 -1
  160. package/dist/components/table/pagination.js +70 -0
  161. package/dist/components/table/pagination.js.map +1 -0
  162. package/dist/components/table/row.js +58 -0
  163. package/dist/components/table/row.js.map +1 -0
  164. package/dist/components/table/sort.d.ts.map +1 -1
  165. package/dist/components/table/sort.js +3 -0
  166. package/dist/components/table/sort.jsx +3 -1
  167. package/dist/components/table/thead.js +3 -0
  168. package/dist/config/default-translations.d.ts +18 -0
  169. package/dist/config/default-translations.d.ts.map +1 -1
  170. package/dist/config/default-translations.jsx +18 -0
  171. package/dist/{use-translations-DTLfPE3_.js → context-CsnUsfeP.js} +55 -40
  172. package/dist/context-CsnUsfeP.js.map +1 -0
  173. package/dist/{date-picker-BhKEFZew.js → date-picker-DNzupG8R.js} +301 -317
  174. package/dist/date-picker-DNzupG8R.js.map +1 -0
  175. package/dist/dict-CisoYSMO.js +28 -0
  176. package/dist/dict-CisoYSMO.js.map +1 -0
  177. package/dist/dist-ChfJ5LO9.js +498 -0
  178. package/dist/dist-ChfJ5LO9.js.map +1 -0
  179. package/dist/{dist-BrGpYRaj.js → dist-DIjUECx9.js} +56 -56
  180. package/dist/{dist-BrGpYRaj.js.map → dist-DIjUECx9.js.map} +1 -1
  181. package/dist/dom-Bn4wY_Zx.js.map +1 -1
  182. package/dist/{file-upload-DWbZfeG5.js → file-upload-C2zNnv9n.js} +501 -481
  183. package/dist/{file-upload-DWbZfeG5.js.map → file-upload-C2zNnv9n.js.map} +1 -1
  184. package/dist/fzf-CPGDDCoU.js +64 -0
  185. package/dist/fzf-CPGDDCoU.js.map +1 -0
  186. package/dist/getISOWeek-EcB4Ebqp.js +72 -0
  187. package/dist/getISOWeek-EcB4Ebqp.js.map +1 -0
  188. package/dist/group-Dl14TJXO.js +222 -0
  189. package/dist/group-Dl14TJXO.js.map +1 -0
  190. package/dist/hooks/use-translations.d.ts +18 -0
  191. package/dist/hooks/use-translations.d.ts.map +1 -1
  192. package/dist/index.css +1 -1
  193. package/dist/index.js.map +1 -1
  194. package/dist/inner-table-CeDX60cL.js +151 -0
  195. package/dist/inner-table-CeDX60cL.js.map +1 -0
  196. package/dist/input-Cmyuea4Y.js +412 -0
  197. package/dist/input-Cmyuea4Y.js.map +1 -0
  198. package/dist/{input-field-B_whI66Q.js → input-field-ffx1MbHo.js} +29 -16
  199. package/dist/input-field-ffx1MbHo.js.map +1 -0
  200. package/dist/isSameMonth-C3lsSwcg.js +10 -0
  201. package/dist/isSameMonth-C3lsSwcg.js.map +1 -0
  202. package/dist/isToday-COXfxFui.js +32 -0
  203. package/dist/isToday-COXfxFui.js.map +1 -0
  204. package/dist/lib/dom.d.ts.map +1 -1
  205. package/dist/modal-Df8-6i-o.js +408 -0
  206. package/dist/modal-Df8-6i-o.js.map +1 -0
  207. package/dist/notifications-NhCESJUV.js +1697 -0
  208. package/dist/notifications-NhCESJUV.js.map +1 -0
  209. package/dist/page-calendar.utils-Bd0PHktL.js +102 -0
  210. package/dist/page-calendar.utils-Bd0PHktL.js.map +1 -0
  211. package/dist/preset/preset.tailwind.d.ts.map +1 -1
  212. package/dist/preset/preset.tailwind.js +6 -7
  213. package/dist/preset/src/styles/dark.js +1 -1
  214. package/dist/progress-8LO5gWLp.js +104 -0
  215. package/dist/progress-8LO5gWLp.js.map +1 -0
  216. package/dist/{proxy-BcJ_5Dwq.js → proxy-fP2NxmhM.js} +658 -844
  217. package/dist/proxy-fP2NxmhM.js.map +1 -0
  218. package/dist/shim-Czv-YhKR.js +93 -0
  219. package/dist/shim-Czv-YhKR.js.map +1 -0
  220. package/dist/shortcut-CQCmgmlU.js +100 -0
  221. package/dist/shortcut-CQCmgmlU.js.map +1 -0
  222. package/dist/slider-TX9hiHO-.js +1196 -0
  223. package/dist/slider-TX9hiHO-.js.map +1 -0
  224. package/dist/sort-DGmiselV.js +195 -0
  225. package/dist/sort-DGmiselV.js.map +1 -0
  226. package/dist/step-DFpJ7zCG.js +185 -0
  227. package/dist/step-DFpJ7zCG.js.map +1 -0
  228. package/dist/styles/dark.js +1 -1
  229. package/dist/subMonths-QcCnE3Yh.js +43 -0
  230. package/dist/subMonths-QcCnE3Yh.js.map +1 -0
  231. package/dist/table-lib-1bkYSklk.js +174 -0
  232. package/dist/table-lib-1bkYSklk.js.map +1 -0
  233. package/dist/{tabs-Ciy0l9OF.js → tabs-Brc963EW.js} +2 -2
  234. package/dist/{tabs-Ciy0l9OF.js.map → tabs-Brc963EW.js.map} +1 -1
  235. package/dist/thead-B6WELJZ-.js +211 -0
  236. package/dist/thead-B6WELJZ-.js.map +1 -0
  237. package/dist/use-locale-DPM_sg4s.js +12 -0
  238. package/dist/use-locale-DPM_sg4s.js.map +1 -0
  239. package/dist/use-remove-scroll-pAgC09Sq.js +38 -0
  240. package/dist/use-remove-scroll-pAgC09Sq.js.map +1 -0
  241. package/dist/use-translations-BE4PuhLm.js +11 -0
  242. package/dist/use-translations-BE4PuhLm.js.map +1 -0
  243. package/dist/useAnimationFrame-DnKbaXfi.js +223 -0
  244. package/dist/useAnimationFrame-DnKbaXfi.js.map +1 -0
  245. package/dist/valueToPercent-DZc_m1tm.js +43 -0
  246. package/dist/valueToPercent-DZc_m1tm.js.map +1 -0
  247. package/dist/visuallyHidden-B7wI86yi.js +303 -0
  248. package/dist/visuallyHidden-B7wI86yi.js.map +1 -0
  249. package/dist/with-selector-BFW5n-pb.js +102 -0
  250. package/dist/with-selector-BFW5n-pb.js.map +1 -0
  251. package/dist/wizard-7u_qZ-78.js +218 -0
  252. package/dist/wizard-7u_qZ-78.js.map +1 -0
  253. package/package.json +19 -11
  254. package/dist/autocomplete-D3VOTihi.js +0 -415
  255. package/dist/autocomplete-D3VOTihi.js.map +0 -1
  256. package/dist/calendar-PCCZDUIL.js.map +0 -1
  257. package/dist/components/table/table.js +0 -3
  258. package/dist/date-picker-BhKEFZew.js.map +0 -1
  259. package/dist/input-B7jqwPG4.js +0 -473
  260. package/dist/input-B7jqwPG4.js.map +0 -1
  261. package/dist/input-field-B_whI66Q.js.map +0 -1
  262. package/dist/modal-Bz-61ays.js +0 -373
  263. package/dist/modal-Bz-61ays.js.map +0 -1
  264. package/dist/notifications-MT4XkLov.js +0 -2203
  265. package/dist/notifications-MT4XkLov.js.map +0 -1
  266. package/dist/polymorph-BLXhrn9n.js.map +0 -1
  267. package/dist/proxy-BcJ_5Dwq.js.map +0 -1
  268. package/dist/skeleton-CBYEq3lM.js +0 -26
  269. package/dist/skeleton-CBYEq3lM.js.map +0 -1
  270. package/dist/slot-pC8kH9De.js.map +0 -1
  271. package/dist/table-CUFbAI2k.js +0 -1914
  272. package/dist/table-CUFbAI2k.js.map +0 -1
  273. package/dist/use-translations-DTLfPE3_.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifications-NhCESJUV.js","names":["o","t","e","React","_formatErrorMessage","_formatErrorMessage","React","React","isFocusVisible","React","React","ownerWindow","isFocusVisible","React","_formatErrorMessage","ownerWindow","React","React","useId","useId","React","_formatErrorMessage","React","React","React","React","useId","React","React","_formatErrorMessage"],"sources":["../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@phosphor-icons/react/dist/defs/CircleNotch.es.js","../../../node_modules/.pnpm/@phosphor-icons+react@2.1.10_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@phosphor-icons/react/dist/csr/CircleNotch.es.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/floating-ui-react/utils/composite.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/floating-ui-react/utils/tabbable.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/provider/ToastProviderContext.js","../../../node_modules/.pnpm/@base-ui+utils@0.2.9_@types+react@19.2.14_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/store/createSelector.js","../../../node_modules/.pnpm/@base-ui+utils@0.2.9_@types+react@19.2.14_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/fastHooks.js","../../../node_modules/.pnpm/@base-ui+utils@0.2.9_@types+react@19.2.14_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/store/useStore.js","../../../node_modules/.pnpm/@base-ui+utils@0.2.9_@types+react@19.2.14_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/store/Store.js","../../../node_modules/.pnpm/@base-ui+utils@0.2.9_@types+react@19.2.14_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/store/ReactStore.js","../../../node_modules/.pnpm/@base-ui+utils@0.2.9_@types+react@19.2.14_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/mergeCleanups.js","../../../node_modules/.pnpm/@base-ui+utils@0.2.9_@types+react@19.2.14_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/useTimeout.js","../../../node_modules/.pnpm/@base-ui+utils@0.2.9_@types+react@19.2.14_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/generateId.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/utils/resolvePromiseOptions.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/store.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/provider/ToastProvider.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/utils/FocusGuard.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/viewport/ToastViewportCssVars.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/viewport/ToastViewport.js","../../../node_modules/.pnpm/@base-ui+utils@0.2.9_@types+react@19.2.14_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/utils/esm/inertValue.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/root/ToastRootContext.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/internals/stateAttributesMapping.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/utils/resolveRef.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/internals/useAnimationsFinished.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/internals/useOpenChangeComplete.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/root/ToastRootCssVars.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/internals/constants.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/utils/useSwipeDismiss.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/root/ToastRoot.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/content/ToastContent.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/description/ToastDescription.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/title/ToastTitle.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/internals/composite/root/CompositeRootContext.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/utils/useFocusableWhenDisabled.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/internals/use-button/useButton.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/close/ToastClose.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/floating-ui-react/utils/createAttribute.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingPortal.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/utils/FloatingPortalLite.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/portal/ToastPortal.js","../../../node_modules/.pnpm/@base-ui+react@1.5.0_@types+react@19.2.14_date-fns@4.3.0_react-dom@19.2.3_react@19.2.3__react@19.2.3/node_modules/@base-ui/react/esm/toast/useToastManager.js","../src/hooks/use-hover.ts","../src/components/display/notifications.tsx"],"sourcesContent":["import * as e from \"react\";\nconst a = /* @__PURE__ */ new Map([\n [\n \"bold\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M236,128a108,108,0,0,1-216,0c0-42.52,24.73-81.34,63-98.9A12,12,0,1,1,93,50.91C63.24,64.57,44,94.83,44,128a84,84,0,0,0,168,0c0-33.17-19.24-63.43-49-77.09A12,12,0,1,1,173,29.1C211.27,46.66,236,85.48,236,128Z\" }))\n ],\n [\n \"duotone\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z\", opacity: \"0.2\" }), /* @__PURE__ */ e.createElement(\"path\", { d: \"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z\" }))\n ],\n [\n \"fill\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,176A72,72,0,0,1,92,65.64a8,8,0,0,1,8,13.85,56,56,0,1,0,56,0,8,8,0,0,1,8-13.85A72,72,0,0,1,128,200Z\" }))\n ],\n [\n \"light\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M230,128a102,102,0,0,1-204,0c0-40.18,23.35-76.86,59.5-93.45a6,6,0,0,1,5,10.9C58.61,60.09,38,92.49,38,128a90,90,0,0,0,180,0c0-35.51-20.61-67.91-52.5-82.55a6,6,0,0,1,5-10.9C206.65,51.14,230,87.82,230,128Z\" }))\n ],\n [\n \"regular\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M232,128a104,104,0,0,1-208,0c0-41,23.81-78.36,60.66-95.27a8,8,0,0,1,6.68,14.54C60.15,61.59,40,93.27,40,128a88,88,0,0,0,176,0c0-34.73-20.15-66.41-51.34-80.73a8,8,0,0,1,6.68-14.54C208.19,49.64,232,87,232,128Z\" }))\n ],\n [\n \"thin\",\n /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(\"path\", { d: \"M228,128a100,100,0,0,1-200,0c0-39.4,22.9-75.37,58.33-91.63a4,4,0,1,1,3.34,7.27C57.07,58.6,36,91.71,36,128a92,92,0,0,0,184,0c0-36.29-21.07-69.4-53.67-84.36a4,4,0,1,1,3.34-7.27C205.1,52.63,228,88.6,228,128Z\" }))\n ]\n]);\nexport {\n a as default\n};\n","import * as o from \"react\";\nimport t from \"../lib/IconBase.es.js\";\nimport a from \"../defs/CircleNotch.es.js\";\nconst c = o.forwardRef((e, r) => /* @__PURE__ */ o.createElement(t, { ref: r, ...e, weights: a }));\nc.displayName = \"CircleNotchIcon\";\nconst s = c;\nexport {\n s as CircleNotch,\n c as CircleNotchIcon\n};\n","import { floor } from '@floating-ui/utils';\nimport { getComputedStyle } from '@floating-ui/utils/dom';\nimport { stopEvent } from \"./event.js\";\nimport { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from \"./constants.js\";\nexport function isDifferentGridRow(index, cols, prevRow) {\n return Math.floor(index / cols) !== prevRow;\n}\nexport function isIndexOutOfListBounds(list, index) {\n return index < 0 || index >= list.length;\n}\nexport function getMinListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef.current, {\n disabledIndices\n });\n}\nexport function getMaxListIndex(listRef, disabledIndices) {\n return findNonDisabledListIndex(listRef.current, {\n decrement: true,\n startingIndex: listRef.current.length,\n disabledIndices\n });\n}\nexport function findNonDisabledListIndex(list, {\n startingIndex = -1,\n decrement = false,\n disabledIndices,\n amount = 1\n} = {}) {\n let index = startingIndex;\n do {\n index += decrement ? -amount : amount;\n } while (index >= 0 && index <= list.length - 1 && isListIndexDisabled(list, index, disabledIndices));\n return index;\n}\nexport function getGridNavigatedIndex(list, {\n event,\n orientation,\n loopFocus,\n onLoop,\n rtl,\n cols,\n disabledIndices,\n minIndex,\n maxIndex,\n prevIndex,\n stopEvent: stop = false\n}) {\n let nextIndex = prevIndex;\n let verticalDirection;\n if (event.key === ARROW_UP) {\n verticalDirection = 'up';\n } else if (event.key === ARROW_DOWN) {\n verticalDirection = 'down';\n }\n if (verticalDirection) {\n // -------------------------------------------------------------------------\n // Detect row structure only when handling vertical navigation. This keeps\n // the non-vertical key paths free from row inference work.\n // -------------------------------------------------------------------------\n const rows = [];\n const rowIndexMap = [];\n let hasRoleRow = false;\n let visibleItemCount = 0;\n {\n let currentRowEl = null;\n let currentRowIndex = -1;\n list.forEach((el, idx) => {\n if (el == null) {\n return;\n }\n visibleItemCount += 1;\n const rowEl = el.closest('[role=\"row\"]');\n if (rowEl) {\n hasRoleRow = true;\n }\n if (rowEl !== currentRowEl || currentRowIndex === -1) {\n currentRowEl = rowEl;\n currentRowIndex += 1;\n rows[currentRowIndex] = [];\n }\n rows[currentRowIndex].push(idx);\n rowIndexMap[idx] = currentRowIndex;\n });\n }\n let hasDomRows = false;\n let inferredDomCols = 0;\n if (hasRoleRow) {\n for (const row of rows) {\n const rowLength = row.length;\n if (rowLength > inferredDomCols) {\n inferredDomCols = rowLength;\n }\n if (rowLength !== cols) {\n hasDomRows = true;\n }\n }\n }\n const hasVirtualizedGaps = hasDomRows && visibleItemCount < list.length;\n const verticalCols = inferredDomCols || cols;\n const navigateVertically = direction => {\n if (!hasDomRows || prevIndex === -1) {\n return undefined;\n }\n const currentRow = rowIndexMap[prevIndex];\n if (currentRow == null) {\n return undefined;\n }\n const colInRow = rows[currentRow].indexOf(prevIndex);\n const step = direction === 'up' ? -1 : 1;\n for (let nextRow = currentRow + step, i = 0; i < rows.length; i += 1, nextRow += step) {\n if (nextRow < 0 || nextRow >= rows.length) {\n if (!loopFocus || hasVirtualizedGaps) {\n return undefined;\n }\n nextRow = nextRow < 0 ? rows.length - 1 : 0;\n if (onLoop) {\n const clampedCol = Math.min(colInRow, rows[nextRow].length - 1);\n const targetItemIndex = rows[nextRow][clampedCol] ?? rows[nextRow][0];\n const returnedItemIndex = onLoop(event, prevIndex, targetItemIndex);\n nextRow = rowIndexMap[returnedItemIndex] ?? nextRow;\n }\n }\n const targetRow = rows[nextRow];\n for (let col = Math.min(colInRow, targetRow.length - 1); col >= 0; col -= 1) {\n const candidate = targetRow[col];\n if (!isListIndexDisabled(list, candidate, disabledIndices)) {\n return candidate;\n }\n }\n }\n return undefined;\n };\n const navigateVerticallyWithInferredRows = direction => {\n if (!hasVirtualizedGaps || prevIndex === -1) {\n return undefined;\n }\n const colInRow = prevIndex % verticalCols;\n const rowStep = direction === 'up' ? -verticalCols : verticalCols;\n const lastRowStart = maxIndex - maxIndex % verticalCols;\n const rowCount = floor(maxIndex / verticalCols) + 1;\n for (let rowStart = prevIndex - colInRow + rowStep, i = 0; i < rowCount; i += 1, rowStart += rowStep) {\n if (rowStart < 0 || rowStart > maxIndex) {\n if (!loopFocus) {\n return undefined;\n }\n rowStart = rowStart < 0 ? lastRowStart : 0;\n }\n const rowEnd = Math.min(rowStart + verticalCols - 1, maxIndex);\n for (let candidate = Math.min(rowStart + colInRow, rowEnd); candidate >= rowStart; candidate -= 1) {\n if (!isListIndexDisabled(list, candidate, disabledIndices)) {\n return candidate;\n }\n }\n }\n return undefined;\n };\n if (stop) {\n stopEvent(event);\n }\n const verticalCandidate = navigateVertically(verticalDirection) ?? navigateVerticallyWithInferredRows(verticalDirection);\n if (verticalCandidate !== undefined) {\n nextIndex = verticalCandidate;\n } else if (prevIndex === -1) {\n nextIndex = verticalDirection === 'up' ? maxIndex : minIndex;\n } else {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex,\n amount: verticalCols,\n decrement: verticalDirection === 'up',\n disabledIndices\n });\n if (loopFocus) {\n if (verticalDirection === 'up' && (prevIndex - verticalCols < minIndex || nextIndex < 0)) {\n const col = prevIndex % verticalCols;\n const maxCol = maxIndex % verticalCols;\n const offset = maxIndex - (maxCol - col);\n if (maxCol === col) {\n nextIndex = maxIndex;\n } else {\n nextIndex = maxCol > col ? offset : offset - verticalCols;\n }\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n if (verticalDirection === 'down' && prevIndex + verticalCols > maxIndex) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex % verticalCols - verticalCols,\n amount: verticalCols,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n }\n }\n if (isIndexOutOfListBounds(list, nextIndex)) {\n nextIndex = prevIndex;\n }\n }\n\n // Remains on the same row/column.\n if (orientation === 'both') {\n const prevRow = floor(prevIndex / cols);\n if (event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT)) {\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex % cols !== cols - 1) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex,\n disabledIndices\n });\n if (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n } else if (loopFocus) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n if (event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)) {\n if (stop) {\n stopEvent(event);\n }\n if (prevIndex % cols !== 0) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex,\n decrement: true,\n disabledIndices\n });\n if (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n } else if (loopFocus) {\n nextIndex = findNonDisabledListIndex(list, {\n startingIndex: prevIndex + (cols - prevIndex % cols),\n decrement: true,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n }\n if (isDifferentGridRow(nextIndex, cols, prevRow)) {\n nextIndex = prevIndex;\n }\n }\n const lastRow = floor(maxIndex / cols) === prevRow;\n if (isIndexOutOfListBounds(list, nextIndex)) {\n if (loopFocus && lastRow) {\n nextIndex = event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT) ? maxIndex : findNonDisabledListIndex(list, {\n startingIndex: prevIndex - prevIndex % cols - 1,\n disabledIndices\n });\n if (onLoop) {\n nextIndex = onLoop(event, prevIndex, nextIndex);\n }\n } else {\n nextIndex = prevIndex;\n }\n }\n }\n return nextIndex;\n}\n\n/** For each cell index, gets the item index that occupies that cell */\nexport function createGridCellMap(sizes, cols, dense) {\n const cellMap = [];\n let startIndex = 0;\n sizes.forEach(({\n width,\n height\n }, index) => {\n if (width > cols) {\n if (process.env.NODE_ENV !== 'production') {\n // TODO: fix mui/no-guarded-throw\n // eslint-disable-next-line mui/no-guarded-throw\n throw new Error(`[Floating UI]: Invalid grid - item width at index ${index} is greater than grid columns`);\n }\n }\n let itemPlaced = false;\n if (dense) {\n startIndex = 0;\n }\n while (!itemPlaced) {\n const targetCells = [];\n for (let i = 0; i < width; i += 1) {\n for (let j = 0; j < height; j += 1) {\n targetCells.push(startIndex + i + j * cols);\n }\n }\n if (startIndex % cols + width <= cols && targetCells.every(cell => cellMap[cell] == null)) {\n targetCells.forEach(cell => {\n cellMap[cell] = index;\n });\n itemPlaced = true;\n } else {\n startIndex += 1;\n }\n }\n });\n\n // convert into a non-sparse array\n return [...cellMap];\n}\n\n/** Gets cell index of an item's corner or -1 when index is -1. */\nexport function getGridCellIndexOfCorner(index, sizes, cellMap, cols, corner) {\n if (index === -1) {\n return -1;\n }\n const firstCellIndex = cellMap.indexOf(index);\n const sizeItem = sizes[index];\n switch (corner) {\n case 'tl':\n return firstCellIndex;\n case 'tr':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + sizeItem.width - 1;\n case 'bl':\n if (!sizeItem) {\n return firstCellIndex;\n }\n return firstCellIndex + (sizeItem.height - 1) * cols;\n case 'br':\n return cellMap.lastIndexOf(index);\n default:\n return -1;\n }\n}\n\n/** Gets all cell indices that correspond to the specified indices */\nexport function getGridCellIndices(indices, cellMap) {\n return cellMap.flatMap((index, cellIndex) => indices.includes(index) ? [cellIndex] : []);\n}\nexport function isListIndexDisabled(list, index, disabledIndices) {\n const isExplicitlyDisabled = typeof disabledIndices === 'function' ? disabledIndices(index) : disabledIndices?.includes(index) ?? false;\n if (isExplicitlyDisabled) {\n return true;\n }\n const element = list[index];\n if (!element) {\n return false;\n }\n if (!isElementVisible(element)) {\n return true;\n }\n return !disabledIndices && (element.hasAttribute('disabled') || element.getAttribute('aria-disabled') === 'true');\n}\nexport function isHiddenByStyles(styles) {\n return styles.visibility === 'hidden' || styles.visibility === 'collapse';\n}\nexport function isElementVisible(element, styles = element ? getComputedStyle(element) : null) {\n if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {\n return false;\n }\n if (typeof element.checkVisibility === 'function') {\n return element.checkVisibility();\n }\n return styles.display !== 'none' && styles.display !== 'contents';\n}","import { getComputedStyle, getNodeName, isHTMLElement, isShadowRoot } from '@floating-ui/utils/dom';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { activeElement, contains } from \"./element.js\";\nimport { isElementVisible } from \"./composite.js\";\nconst CANDIDATE_SELECTOR = 'a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable=\"false\"]),audio[controls],video[controls]';\nfunction getParentElement(element) {\n const assignedSlot = element.assignedSlot;\n if (assignedSlot) {\n return assignedSlot;\n }\n if (element.parentElement) {\n return element.parentElement;\n }\n const rootNode = element.getRootNode();\n return isShadowRoot(rootNode) ? rootNode.host : null;\n}\nfunction getDetailsSummary(details) {\n for (const child of Array.from(details.children)) {\n if (getNodeName(child) === 'summary') {\n return child;\n }\n }\n return null;\n}\nfunction isWithinOpenDetailsSummary(element, details) {\n const summary = getDetailsSummary(details);\n return !!summary && (element === summary || contains(summary, element));\n}\nfunction isFocusableCandidate(element) {\n const nodeName = element ? getNodeName(element) : '';\n return element != null && element.matches(CANDIDATE_SELECTOR) && (nodeName !== 'summary' || element.parentElement != null && getNodeName(element.parentElement) === 'details' && getDetailsSummary(element.parentElement) === element) && (nodeName !== 'details' || getDetailsSummary(element) == null) && (nodeName !== 'input' || element.type !== 'hidden');\n}\nfunction isFocusableElement(element) {\n if (!isFocusableCandidate(element) || !element.isConnected || element.matches(':disabled')) {\n return false;\n }\n for (let current = element; current; current = getParentElement(current)) {\n const isAncestor = current !== element;\n const isSlot = getNodeName(current) === 'slot';\n if (current.hasAttribute('inert')) {\n return false;\n }\n if (isAncestor && getNodeName(current) === 'details' && !current.open && !isWithinOpenDetailsSummary(element, current) || current.hasAttribute('hidden') || !isSlot && !isVisibleInTabbableTree(current, isAncestor)) {\n return false;\n }\n }\n return true;\n}\nfunction isVisibleInTabbableTree(element, isAncestor) {\n const styles = getComputedStyle(element);\n if (!isAncestor) {\n return isElementVisible(element, styles);\n }\n return styles.display !== 'none';\n}\nfunction getTabIndex(element) {\n const tabIndex = element.tabIndex;\n if (tabIndex < 0) {\n const nodeName = getNodeName(element);\n if (nodeName === 'details' || nodeName === 'audio' || nodeName === 'video' || isHTMLElement(element) && element.isContentEditable) {\n return 0;\n }\n }\n return tabIndex;\n}\nfunction getNamedRadioInput(element) {\n if (getNodeName(element) !== 'input') {\n return null;\n }\n const input = element;\n return input.type === 'radio' && input.name !== '' ? input : null;\n}\nfunction isTabbableRadio(element, candidates) {\n const input = getNamedRadioInput(element);\n if (!input) {\n return true;\n }\n const checkedRadio = candidates.find(candidate => {\n const radio = getNamedRadioInput(candidate);\n return radio?.name === input.name && radio.form === input.form && radio.checked;\n });\n if (checkedRadio) {\n return checkedRadio === input;\n }\n return candidates.find(candidate => {\n const radio = getNamedRadioInput(candidate);\n return radio?.name === input.name && radio.form === input.form;\n }) === input;\n}\nfunction getComposedChildren(container) {\n if (isHTMLElement(container) && getNodeName(container) === 'slot') {\n const assignedElements = container.assignedElements({\n flatten: true\n });\n if (assignedElements.length > 0) {\n return assignedElements;\n }\n }\n if (isHTMLElement(container) && container.shadowRoot) {\n return Array.from(container.shadowRoot.children);\n }\n return Array.from(container.children);\n}\nfunction appendCandidates(container, list) {\n getComposedChildren(container).forEach(child => {\n if (isFocusableCandidate(child)) {\n list.push(child);\n }\n appendCandidates(child, list);\n });\n}\nfunction appendMatchingElements(container, selector, list) {\n getComposedChildren(container).forEach(child => {\n if (isHTMLElement(child) && child.matches(selector)) {\n list.push(child);\n }\n appendMatchingElements(child, selector, list);\n });\n}\nexport function isTabbable(element) {\n return isFocusableElement(element) && getTabIndex(element) >= 0;\n}\nexport function focusable(container) {\n const candidates = [];\n appendCandidates(container, candidates);\n return candidates.filter(isFocusableElement);\n}\nexport function tabbable(container) {\n const candidates = focusable(container);\n return candidates.filter(element => getTabIndex(element) >= 0 && isTabbableRadio(element, candidates));\n}\nfunction getTabbableIn(container, dir) {\n const list = tabbable(container);\n const len = list.length;\n if (len === 0) {\n return undefined;\n }\n const active = activeElement(ownerDocument(container));\n const index = list.indexOf(active);\n // eslint-disable-next-line no-nested-ternary\n const nextIndex = index === -1 ? dir === 1 ? 0 : len - 1 : index + dir;\n return list[nextIndex];\n}\nexport function getNextTabbable(referenceElement) {\n return getTabbableIn(ownerDocument(referenceElement).body, 1) || referenceElement;\n}\nexport function getPreviousTabbable(referenceElement) {\n return getTabbableIn(ownerDocument(referenceElement).body, -1) || referenceElement;\n}\nfunction getTabbableNearElement(referenceElement, dir) {\n if (!referenceElement) {\n return null;\n }\n const list = tabbable(ownerDocument(referenceElement).body);\n const elementCount = list.length;\n if (elementCount === 0) {\n return null;\n }\n const index = list.indexOf(referenceElement);\n if (index === -1) {\n return null;\n }\n const nextIndex = (index + dir + elementCount) % elementCount;\n return list[nextIndex];\n}\nexport function getTabbableAfterElement(referenceElement) {\n return getTabbableNearElement(referenceElement, 1);\n}\nexport function getTabbableBeforeElement(referenceElement) {\n return getTabbableNearElement(referenceElement, -1);\n}\nexport function isOutsideEvent(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nexport function disableFocusInside(container) {\n const tabbableElements = tabbable(container);\n tabbableElements.forEach(element => {\n element.dataset.tabindex = element.getAttribute('tabindex') || '';\n element.setAttribute('tabindex', '-1');\n });\n}\nexport function enableFocusInside(container) {\n const elements = [];\n appendMatchingElements(container, '[data-tabindex]', elements);\n elements.forEach(element => {\n const tabindex = element.dataset.tabindex;\n delete element.dataset.tabindex;\n if (tabindex) {\n element.setAttribute('tabindex', tabindex);\n } else {\n element.removeAttribute('tabindex');\n }\n });\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ToastContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToastContext.displayName = \"ToastContext\";\nexport function useToastProviderContext() {\n const context = React.useContext(ToastContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: useToastManager must be used within <Toast.Provider>.' : _formatErrorMessage(73));\n }\n return context;\n}","import _formatErrorMessage from \"../formatErrorMessage.js\";\n/**\n * The NoOptionalParams type is a utility type that checks if a function has optional or default parameters.\n * If the function has optional or default parameters, it returns a string literal type with an error message.\n * Otherwise, it returns the original function type.\n *\n * This is used to enforce that the combiner function passed to createSelector does not have optional or default parameters,\n * as memoization relies on the Function.length property, which does not account for optional or default parameters.\n */\n\n/**\n * Creates a selector function that can be used to derive values from the store's state.\n *\n * The combiner function can have up to three additional parameters, but it **cannot have optional or default parameters**.\n *\n * This function accepts up to six functions and combines them into a single selector function.\n * The resulting selector will take the state from the combined selectors and any additional parameters required by the combiner.\n *\n * The return type of the resulting selector is determined by the return type of the combiner function.\n *\n * @example\n * const selector = createSelector(\n * (state) => state.disabled\n * );\n *\n * @example\n * const selector = createSelector(\n * (state) => state.disabled,\n * (state) => state.open,\n * (disabled, open) => ({ disabled, open })\n * );\n */\n/* eslint-disable id-denylist */\nexport const createSelector = (a, b, c, d, e, f, ...other) => {\n if (other.length > 0) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Unsupported number of selectors' : _formatErrorMessage(1));\n }\n let selector;\n if (a && b && c && d && e && f) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n const ve = e(state, a1, a2, a3);\n return f(va, vb, vc, vd, ve, a1, a2, a3);\n };\n } else if (a && b && c && d && e) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n const vd = d(state, a1, a2, a3);\n return e(va, vb, vc, vd, a1, a2, a3);\n };\n } else if (a && b && c && d) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n const vc = c(state, a1, a2, a3);\n return d(va, vb, vc, a1, a2, a3);\n };\n } else if (a && b && c) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n const vb = b(state, a1, a2, a3);\n return c(va, vb, a1, a2, a3);\n };\n } else if (a && b) {\n selector = (state, a1, a2, a3) => {\n const va = a(state, a1, a2, a3);\n return b(va, a1, a2, a3);\n };\n } else if (a) {\n selector = a;\n } else {\n throw /* minify-error-disabled */new Error('Missing arguments');\n }\n return selector;\n};\n/* eslint-enable id-denylist */","import * as React from 'react';\nimport { useRefWithInit } from \"./useRefWithInit.js\";\nconst hooks = [];\nlet currentInstance = undefined;\nexport function getInstance() {\n return currentInstance;\n}\nexport function setInstance(instance) {\n currentInstance = instance;\n}\nexport function register(hook) {\n hooks.push(hook);\n}\nexport function fastComponent(fn) {\n const FastComponent = (props, forwardedRef) => {\n const instance = useRefWithInit(createInstance).current;\n let result;\n try {\n currentInstance = instance;\n for (const hook of hooks) {\n hook.before(instance);\n }\n result = fn(props, forwardedRef);\n for (const hook of hooks) {\n hook.after(instance);\n }\n instance.didInitialize = true;\n } finally {\n currentInstance = undefined;\n }\n return result;\n };\n FastComponent.displayName = fn.displayName || fn.name;\n return FastComponent;\n}\nexport function fastComponentRef(fn) {\n return /*#__PURE__*/React.forwardRef(fastComponent(fn));\n}\nfunction createInstance() {\n return {\n didInitialize: false\n };\n}","import * as React from 'react';\n/* We need to import the shim because React 17 does not support the `useSyncExternalStore` API.\n * More info: https://github.com/mui/mui-x/issues/18303#issuecomment-2958392341 */\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';\nimport { isReactVersionAtLeast } from \"../reactVersion.js\";\nimport { register, getInstance } from \"../fastHooks.js\";\n/* Some tests fail in R18 with the raw useSyncExternalStore. It may be possible to make it work\n * but for now we only enable it for R19+. */\nconst canUseRawUseSyncExternalStore = isReactVersionAtLeast(19);\nconst useStoreImplementation = canUseRawUseSyncExternalStore ? useStoreFast : useStoreLegacy;\nexport function useStore(store, selector, a1, a2, a3) {\n return useStoreImplementation(store, selector, a1, a2, a3);\n}\nfunction useStoreR19(store, selector, a1, a2, a3) {\n const getSelection = React.useCallback(() => selector(store.getSnapshot(), a1, a2, a3), [store, selector, a1, a2, a3]);\n return useSyncExternalStore(store.subscribe, getSelection, getSelection);\n}\nregister({\n before(instance) {\n instance.syncIndex = 0;\n if (!instance.didInitialize) {\n instance.syncTick = 1;\n instance.syncHooks = [];\n instance.didChangeStore = true;\n instance.getSnapshot = () => {\n let didChange = false;\n for (let i = 0; i < instance.syncHooks.length; i += 1) {\n const hook = instance.syncHooks[i];\n const value = hook.selector(hook.store.state, hook.a1, hook.a2, hook.a3);\n if (hook.didChange || !Object.is(hook.value, value)) {\n didChange = true;\n hook.value = value;\n hook.didChange = false;\n }\n }\n if (didChange) {\n instance.syncTick += 1;\n }\n return instance.syncTick;\n };\n }\n },\n after(instance) {\n if (instance.syncHooks.length > 0) {\n if (instance.didChangeStore) {\n instance.didChangeStore = false;\n instance.subscribe = onStoreChange => {\n const stores = new Set();\n for (const hook of instance.syncHooks) {\n stores.add(hook.store);\n }\n const unsubscribes = [];\n for (const store of stores) {\n unsubscribes.push(store.subscribe(onStoreChange));\n }\n return () => {\n for (const unsubscribe of unsubscribes) {\n unsubscribe();\n }\n };\n };\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useSyncExternalStore(instance.subscribe, instance.getSnapshot, instance.getSnapshot);\n }\n }\n});\nfunction useStoreFast(store, selector, a1, a2, a3) {\n const instance = getInstance();\n if (!instance) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useStoreR19(store, selector, a1, a2, a3);\n }\n const index = instance.syncIndex;\n instance.syncIndex += 1;\n let hook;\n if (!instance.didInitialize) {\n hook = {\n store,\n selector,\n a1,\n a2,\n a3,\n value: selector(store.getSnapshot(), a1, a2, a3),\n didChange: false\n };\n instance.syncHooks.push(hook);\n } else {\n hook = instance.syncHooks[index];\n if (hook.store !== store || hook.selector !== selector || !Object.is(hook.a1, a1) || !Object.is(hook.a2, a2) || !Object.is(hook.a3, a3)) {\n if (hook.store !== store) {\n instance.didChangeStore = true;\n }\n hook.store = store;\n hook.selector = selector;\n hook.a1 = a1;\n hook.a2 = a2;\n hook.a3 = a3;\n hook.didChange = true;\n }\n }\n return hook.value;\n}\nfunction useStoreLegacy(store, selector, a1, a2, a3) {\n return useSyncExternalStoreWithSelector(store.subscribe, store.getSnapshot, store.getSnapshot, state => selector(state, a1, a2, a3));\n}","import { useStore } from \"./useStore.js\";\n/**\n * A data store implementation that allows subscribing to state changes and updating the state.\n * It uses an observer pattern to notify subscribers when the state changes.\n */\nexport class Store {\n /**\n * The current state of the store.\n * This property is updated immediately when the state changes as a result of calling {@link setState}, {@link update}, or {@link set}.\n * To subscribe to state changes, use the {@link useState} method. The value returned by {@link useState} is updated after the component renders (similarly to React's useState).\n * The values can be used directly (to avoid subscribing to the store) in effects or event handlers.\n *\n * Do not modify properties in state directly. Instead, use the provided methods to ensure proper state management and listener notification.\n */\n\n // Internal state to handle recursive `setState()` calls\n\n constructor(state) {\n this.state = state;\n this.listeners = new Set();\n this.updateTick = 0;\n }\n\n /**\n * Registers a listener that will be called whenever the store's state changes.\n *\n * @param fn The listener function to be called on state changes.\n * @returns A function to unsubscribe the listener.\n */\n subscribe = fn => {\n this.listeners.add(fn);\n return () => {\n this.listeners.delete(fn);\n };\n };\n\n /**\n * Returns the current state of the store.\n */\n getSnapshot = () => {\n return this.state;\n };\n\n /**\n * Updates the entire store's state and notifies all registered listeners.\n *\n * @param newState The new state to set for the store.\n */\n setState(newState) {\n if (this.state === newState) {\n return;\n }\n this.state = newState;\n this.updateTick += 1;\n const currentTick = this.updateTick;\n for (const listener of this.listeners) {\n if (currentTick !== this.updateTick) {\n // If the tick has changed, a recursive `setState` call has been made,\n // and it has already notified all listeners.\n return;\n }\n listener(newState);\n }\n }\n\n /**\n * Merges the provided changes into the current state and notifies listeners if there are changes.\n *\n * @param changes An object containing the changes to apply to the current state.\n */\n update(changes) {\n for (const key in changes) {\n if (!Object.is(this.state[key], changes[key])) {\n this.setState({\n ...this.state,\n ...changes\n });\n return;\n }\n }\n }\n\n /**\n * Sets a specific key in the store's state to a new value and notifies listeners if the value has changed.\n *\n * @param key The key in the store's state to update.\n * @param value The new value to set for the specified key.\n */\n set(key, value) {\n if (!Object.is(this.state[key], value)) {\n this.setState({\n ...this.state,\n [key]: value\n });\n }\n }\n\n /**\n * Gives the state a new reference and updates all registered listeners.\n */\n notifyAll() {\n const newState = {\n ...this.state\n };\n this.setState(newState);\n }\n use(selector, a1, a2, a3) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useStore(this, selector, a1, a2, a3);\n }\n}","/* False positives - ESLint thinks we're calling a hook from a class component. */\n/* eslint-disable react-hooks/rules-of-hooks */\n'use client';\n\nimport * as React from 'react';\nimport { Store } from \"./Store.js\";\nimport { useStore } from \"./useStore.js\";\nimport { useStableCallback } from \"../useStableCallback.js\";\nimport { useIsoLayoutEffect } from \"../useIsoLayoutEffect.js\";\nimport { NOOP } from \"../empty.js\";\n\n/**\n * A Store that supports controlled state keys, non-reactive values and provides utility methods for React.\n */\nexport class ReactStore extends Store {\n /**\n * Creates a new ReactStore instance.\n *\n * @param state Initial state of the store.\n * @param context Non-reactive context values.\n * @param selectors Optional selectors for use with `useState`.\n */\n constructor(state, context = {}, selectors) {\n super(state);\n this.context = context;\n this.selectors = selectors;\n }\n\n /**\n * Non-reactive values such as refs, callbacks, etc.\n */\n\n /**\n * Synchronizes a single external value into the store.\n *\n * Note that the while the value in `state` is updated immediately, the value returned\n * by `useState` is updated before the next render (similarly to React's `useState`).\n */\n useSyncedValue(key, value) {\n React.useDebugValue(key);\n // eslint-disable-next-line consistent-this\n const store = this;\n useIsoLayoutEffect(() => {\n if (store.state[key] !== value) {\n store.set(key, value);\n }\n }, [store, key, value]);\n }\n\n /**\n * Synchronizes a single external value into the store and\n * cleans it up (sets to `undefined`) on unmount.\n *\n * Note that the while the value in `state` is updated immediately, the value returned\n * by `useState` is updated before the next render (similarly to React's `useState`).\n */\n useSyncedValueWithCleanup(key, value) {\n // eslint-disable-next-line consistent-this\n const store = this;\n useIsoLayoutEffect(() => {\n if (store.state[key] !== value) {\n store.set(key, value);\n }\n return () => {\n store.set(key, undefined);\n };\n }, [store, key, value]);\n }\n\n /**\n * Synchronizes multiple external values into the store.\n *\n * Note that the while the values in `state` are updated immediately, the values returned\n * by `useState` are updated before the next render (similarly to React's `useState`).\n */\n useSyncedValues(statePart) {\n // eslint-disable-next-line consistent-this\n const store = this;\n if (process.env.NODE_ENV !== 'production') {\n // Check that an object with the same shape is passed on every render\n React.useDebugValue(statePart, p => Object.keys(p));\n const keys = React.useRef(Object.keys(statePart)).current;\n const nextKeys = Object.keys(statePart);\n if (keys.length !== nextKeys.length || keys.some((key, index) => key !== nextKeys[index])) {\n console.error('ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.');\n }\n }\n const dependencies = Object.values(statePart);\n useIsoLayoutEffect(() => {\n store.update(statePart);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [store, ...dependencies]);\n }\n\n /**\n * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key. If `controlled`\n * is non-undefined, the store's state at `key` is updated to match `controlled`.\n */\n useControlledProp(key, controlled) {\n React.useDebugValue(key);\n // eslint-disable-next-line consistent-this\n const store = this;\n const isControlled = controlled !== undefined;\n useIsoLayoutEffect(() => {\n if (isControlled && !Object.is(store.state[key], controlled)) {\n // Set the internal state to match the controlled value.\n store.setState({\n ...store.state,\n [key]: controlled\n });\n }\n }, [store, key, controlled, isControlled]);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n const cache = this.controlledValues ??= new Map();\n if (!cache.has(key)) {\n cache.set(key, isControlled);\n }\n const previouslyControlled = cache.get(key);\n if (previouslyControlled !== undefined && previouslyControlled !== isControlled) {\n console.error(`A component is changing the ${isControlled ? '' : 'un'}controlled state of ${key.toString()} to be ${isControlled ? 'un' : ''}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);\n }\n }\n }\n\n /** Gets the current value from the store using a selector with the provided key.\n *\n * @param key Key of the selector to use.\n */\n\n select(key, a1, a2, a3) {\n const selector = this.selectors[key];\n return selector(this.state, a1, a2, a3);\n }\n\n /**\n * Returns a value from the store's state using a selector function.\n * Used to subscribe to specific parts of the state.\n * This methods causes a rerender whenever the selected state changes.\n *\n * @param key Key of the selector to use.\n */\n\n useState(key, a1, a2, a3) {\n React.useDebugValue(key);\n return useStore(this, this.selectors[key], a1, a2, a3);\n }\n\n /**\n * Wraps a function with `useStableCallback` to ensure it has a stable reference\n * and assigns it to the context.\n *\n * @param key Key of the event callback. Must be a function in the context.\n * @param fn Function to assign.\n */\n useContextCallback(key, fn) {\n React.useDebugValue(key);\n const stableFunction = useStableCallback(fn ?? NOOP);\n this.context[key] = stableFunction;\n }\n\n /**\n * Returns a stable setter function for a specific key in the store's state.\n * It's commonly used to pass as a ref callback to React elements.\n *\n * @param key Key of the state to set.\n */\n useStateSetter(key) {\n const ref = React.useRef(undefined);\n if (ref.current === undefined) {\n ref.current = value => {\n this.set(key, value);\n };\n }\n return ref.current;\n }\n\n /**\n * Observes changes derived from the store's selectors and calls the listener when the selected value changes.\n *\n * @param key Key of the selector to observe.\n * @param listener Listener function called when the selector result changes.\n */\n\n observe(selector, listener) {\n let selectFn;\n if (typeof selector === 'function') {\n selectFn = selector;\n } else {\n selectFn = this.selectors[selector];\n }\n let prevValue = selectFn(this.state);\n listener(prevValue, prevValue, this);\n return this.subscribe(nextState => {\n const nextValue = selectFn(nextState);\n if (!Object.is(prevValue, nextValue)) {\n const oldValue = prevValue;\n prevValue = nextValue;\n listener(nextValue, oldValue, this);\n }\n });\n }\n}","/**\n * Combines multiple cleanup functions into a single cleanup function.\n */\nexport function mergeCleanups(...cleanups) {\n return () => {\n for (let i = 0; i < cleanups.length; i += 1) {\n const cleanup = cleanups[i];\n if (cleanup) {\n cleanup();\n }\n }\n };\n}","'use client';\n\nimport { useRefWithInit } from \"./useRefWithInit.js\";\nimport { useOnMount } from \"./useOnMount.js\";\nconst EMPTY = 0;\nexport class Timeout {\n static create() {\n return new Timeout();\n }\n currentId = EMPTY;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = EMPTY;\n fn();\n }, delay); /* Node.js types are enabled in development */\n }\n isStarted() {\n return this.currentId !== EMPTY;\n }\n clear = () => {\n if (this.currentId !== EMPTY) {\n clearTimeout(this.currentId);\n this.currentId = EMPTY;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\n\n/**\n * A `setTimeout` with automatic cleanup and guard.\n */\nexport function useTimeout() {\n const timeout = useRefWithInit(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","let counter = 0;\nexport function generateId(prefix) {\n counter += 1;\n return `${prefix}-${Math.random().toString(36).slice(2, 6)}-${counter}`;\n}","export function resolvePromiseOptions(options, result) {\n if (typeof options === 'string') {\n return {\n description: options\n };\n }\n if (typeof options === 'function') {\n const resolvedOptions = options(result);\n return typeof resolvedOptions === 'string' ? {\n description: resolvedOptions\n } : resolvedOptions;\n }\n return options;\n}","import { ReactStore, createSelector } from '@base-ui/utils/store';\nimport { generateId } from '@base-ui/utils/generateId';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { Timeout } from '@base-ui/utils/useTimeout';\nimport { resolvePromiseOptions } from \"./utils/resolvePromiseOptions.js\";\nimport { activeElement, contains, getTarget } from \"../floating-ui-react/utils.js\";\nimport { isFocusVisible } from \"./utils/focusVisible.js\";\nfunction createToastMetadata(toasts) {\n const metadata = new Map();\n let visibleIndex = 0;\n let offsetY = 0;\n toasts.forEach((toast, toastIndex) => {\n const isEnding = toast.transitionStatus === 'ending';\n metadata.set(toast.id, {\n value: toast,\n domIndex: toastIndex,\n visibleIndex: isEnding ? -1 : visibleIndex,\n offsetY\n });\n offsetY += toast.height || 0;\n if (!isEnding) {\n visibleIndex += 1;\n }\n });\n return metadata;\n}\nconst toastMetadataSelector = state => state.toastMetadata;\nexport const selectors = {\n toasts: createSelector(state => state.toasts),\n isEmpty: createSelector(state => state.toasts.length === 0),\n toast: createSelector(toastMetadataSelector, (toastMetadata, id) => toastMetadata.get(id)?.value),\n toastIndex: createSelector(toastMetadataSelector, (toastMetadata, id) => toastMetadata.get(id)?.domIndex ?? -1),\n toastOffsetY: createSelector(toastMetadataSelector, (toastMetadata, id) => toastMetadata.get(id)?.offsetY ?? 0),\n toastVisibleIndex: createSelector(toastMetadataSelector, (toastMetadata, id) => toastMetadata.get(id)?.visibleIndex ?? -1),\n hovering: createSelector(state => state.hovering),\n focused: createSelector(state => state.focused),\n expanded: createSelector(state => state.hovering || state.focused),\n expandedOrOutOfFocus: createSelector(state => state.hovering || state.focused || !state.isWindowFocused),\n prevFocusElement: createSelector(state => state.prevFocusElement)\n};\nexport class ToastStore extends ReactStore {\n timers = new Map();\n areTimersPaused = false;\n constructor(initialState) {\n super({\n ...initialState,\n toastMetadata: createToastMetadata(initialState.toasts)\n }, {}, selectors);\n }\n setFocused(focused) {\n this.set('focused', focused);\n }\n setHovering(hovering) {\n this.set('hovering', hovering);\n }\n setIsWindowFocused(isWindowFocused) {\n this.set('isWindowFocused', isWindowFocused);\n }\n setPrevFocusElement(prevFocusElement) {\n this.set('prevFocusElement', prevFocusElement);\n }\n setViewport = viewport => {\n this.set('viewport', viewport);\n };\n disposeEffect = () => {\n return () => {\n this.timers.forEach(timer => {\n timer.timeout?.clear();\n });\n this.timers.clear();\n };\n };\n removeToast(toastId, behavior = {}) {\n const index = selectors.toastIndex(this.state, toastId);\n if (index === -1) {\n return;\n }\n const toast = this.state.toasts[index];\n if (!behavior.skipOnRemove) {\n toast?.onRemove?.();\n }\n const newToasts = [...this.state.toasts];\n newToasts.splice(index, 1);\n this.setToasts(newToasts);\n }\n addToast = toast => {\n const {\n timeout,\n limit\n } = this.state;\n const id = toast.id || generateId('toast');\n if (toast.id) {\n const existingToast = selectors.toast(this.state, toast.id);\n if (existingToast) {\n if (existingToast.transitionStatus === 'ending') {\n this.removeToast(toast.id, {\n skipOnRemove: true\n });\n } else {\n const {\n id: ignoredId,\n transitionStatus: ignoredTransitionStatus,\n ...updates\n } = toast;\n this.updateToastInternal(toast.id, updates, {\n resetTimer: true,\n markUpdated: true\n });\n return toast.id;\n }\n }\n }\n const toastToAdd = {\n ...toast,\n id,\n updateKey: 0,\n transitionStatus: 'starting'\n };\n const updatedToasts = [toastToAdd, ...this.state.toasts];\n const activeToasts = updatedToasts.filter(t => t.transitionStatus !== 'ending');\n\n // Mark oldest toasts for removal when over limit\n if (activeToasts.length > limit) {\n const excessCount = activeToasts.length - limit;\n const oldestActiveToasts = activeToasts.slice(-excessCount);\n const limitedIds = new Set(oldestActiveToasts.map(t => t.id));\n this.setToasts(updatedToasts.map(t => {\n const limited = limitedIds.has(t.id);\n if (t.limited !== limited) {\n return {\n ...t,\n limited\n };\n }\n return t;\n }));\n } else {\n this.setToasts(updatedToasts.map(t => t.limited ? {\n ...t,\n limited: false\n } : t));\n }\n const duration = toastToAdd.timeout ?? timeout;\n if (toastToAdd.type !== 'loading' && duration > 0) {\n this.scheduleTimer(id, duration, () => this.closeToast(id));\n }\n if (selectors.expandedOrOutOfFocus(this.state)) {\n this.pauseTimers();\n }\n return id;\n };\n updateToast = (id, updates) => {\n this.updateToastInternal(id, updates, {\n markUpdated: true\n });\n };\n updateToastInternal = (id, updates, behavior = {}) => {\n const {\n timeout,\n toasts\n } = this.state;\n const prevToast = selectors.toast(this.state, id) ?? null;\n if (!prevToast) {\n return;\n }\n\n // Ignore updates for toasts that are already closing.\n // This prevents races where async updates (e.g. promise success/error)\n // can block a dismissal from completing.\n if (prevToast.transitionStatus === 'ending') {\n return;\n }\n const nextToast = {\n ...prevToast,\n ...updates,\n ...(behavior.markUpdated && {\n updateKey: (prevToast.updateKey ?? 0) + 1\n })\n };\n this.setToasts(toasts.map(toast => toast.id === id ? nextToast : toast));\n const nextTimeout = nextToast.timeout ?? timeout;\n const prevTimeout = prevToast?.timeout ?? timeout;\n const timeoutUpdated = Object.hasOwn(updates, 'timeout');\n const shouldHaveTimer = nextToast.transitionStatus !== 'ending' && nextToast.type !== 'loading' && nextTimeout > 0;\n const hasTimer = this.timers.has(id);\n const timeoutChanged = prevTimeout !== nextTimeout;\n const wasLoading = prevToast?.type === 'loading';\n if (!shouldHaveTimer && hasTimer) {\n const timer = this.timers.get(id);\n timer?.timeout?.clear();\n this.timers.delete(id);\n return;\n }\n\n // Schedule or reschedule timer if needed\n if (shouldHaveTimer && (!hasTimer || timeoutChanged || timeoutUpdated || wasLoading || behavior.resetTimer)) {\n const timer = this.timers.get(id);\n if (timer) {\n timer.timeout?.clear();\n this.timers.delete(id);\n }\n this.scheduleTimer(id, nextTimeout, () => this.closeToast(id));\n if (selectors.expandedOrOutOfFocus(this.state)) {\n this.pauseTimers();\n }\n }\n };\n closeToast = toastId => {\n const closeAll = toastId === undefined;\n const {\n limit,\n toasts\n } = this.state;\n let toastsToClose;\n if (closeAll) {\n toastsToClose = toasts;\n this.timers.forEach(timer => {\n timer.timeout?.clear();\n });\n this.timers.clear();\n } else {\n const toast = selectors.toast(this.state, toastId);\n if (!toast) {\n return;\n }\n toastsToClose = [toast];\n const timer = this.timers.get(toastId);\n if (timer?.timeout) {\n timer.timeout.clear();\n this.timers.delete(toastId);\n }\n }\n let activeIndex = 0;\n const newToasts = toasts.map(item => {\n if (closeAll || item.id === toastId) {\n return {\n ...item,\n transitionStatus: 'ending',\n height: 0\n };\n }\n if (item.transitionStatus === 'ending') {\n return item;\n }\n const isLimited = activeIndex >= limit;\n activeIndex += 1;\n return item.limited !== isLimited ? {\n ...item,\n limited: isLimited\n } : item;\n });\n const updates = {\n toasts: newToasts,\n toastMetadata: createToastMetadata(newToasts)\n };\n if (closeAll || toasts.length === 1) {\n updates.hovering = false;\n updates.focused = false;\n }\n this.update(updates);\n toastsToClose.forEach(toast => {\n if (toast.transitionStatus !== 'ending') {\n toast.onClose?.();\n }\n });\n this.handleFocusManagement(toastId);\n };\n promiseToast = (promiseValue, options) => {\n // Create a loading toast (which does not auto-dismiss).\n const loadingOptions = resolvePromiseOptions(options.loading);\n const id = this.addToast({\n ...loadingOptions,\n type: 'loading'\n });\n const handledPromise = promiseValue.then(result => {\n const successOptions = resolvePromiseOptions(options.success, result);\n this.updateToast(id, {\n ...successOptions,\n type: 'success',\n timeout: successOptions.timeout\n });\n return result;\n }).catch(error => {\n const errorOptions = resolvePromiseOptions(options.error, error);\n this.updateToast(id, {\n ...errorOptions,\n type: 'error',\n timeout: errorOptions.timeout\n });\n return Promise.reject(error);\n });\n\n // Private API used exclusively by `Manager` to handoff the promise\n // back to the manager after it's handled here.\n if ({}.hasOwnProperty.call(options, 'setPromise')) {\n options.setPromise(handledPromise);\n }\n return handledPromise;\n };\n pauseTimers() {\n if (this.areTimersPaused) {\n return;\n }\n this.areTimersPaused = true;\n this.timers.forEach(timer => {\n if (timer.timeout) {\n timer.timeout.clear();\n const elapsed = Date.now() - timer.start;\n const remaining = timer.delay - elapsed;\n timer.remaining = remaining > 0 ? remaining : 0;\n }\n });\n }\n resumeTimers() {\n if (!this.areTimersPaused) {\n return;\n }\n this.areTimersPaused = false;\n this.timers.forEach((timer, id) => {\n timer.remaining = timer.remaining > 0 ? timer.remaining : timer.delay;\n timer.timeout ??= Timeout.create();\n timer.timeout.start(timer.remaining, () => {\n this.timers.delete(id);\n timer.callback();\n });\n timer.start = Date.now();\n });\n }\n restoreFocusToPrevElement() {\n this.state.prevFocusElement?.focus({\n preventScroll: true\n });\n }\n handleDocumentPointerDown = event => {\n if (event.pointerType !== 'touch') {\n return;\n }\n const target = getTarget(event);\n if (contains(this.state.viewport, target)) {\n return;\n }\n this.resumeTimers();\n this.update({\n hovering: false,\n focused: false\n });\n };\n scheduleTimer(id, delay, callback) {\n const start = Date.now();\n const shouldStartActive = !selectors.expandedOrOutOfFocus(this.state);\n const currentTimeout = shouldStartActive ? Timeout.create() : undefined;\n currentTimeout?.start(delay, () => {\n this.timers.delete(id);\n callback();\n });\n this.timers.set(id, {\n timeout: currentTimeout,\n start: shouldStartActive ? start : 0,\n delay,\n remaining: delay,\n callback\n });\n }\n setToasts(newToasts) {\n const updates = {\n toasts: newToasts,\n toastMetadata: createToastMetadata(newToasts)\n };\n if (newToasts.length === 0) {\n updates.hovering = false;\n updates.focused = false;\n }\n this.update(updates);\n }\n handleFocusManagement(toastId) {\n const activeEl = activeElement(ownerDocument(this.state.viewport));\n if (!this.state.viewport || !contains(this.state.viewport, activeEl) || !isFocusVisible(activeEl)) {\n return;\n }\n if (toastId === undefined) {\n this.restoreFocusToPrevElement();\n return;\n }\n const toasts = selectors.toasts(this.state);\n const currentIndex = selectors.toastIndex(this.state, toastId);\n let nextToast = null;\n\n // Try to find the next toast that isn't animating out\n let index = currentIndex + 1;\n while (index < toasts.length) {\n if (toasts[index].transitionStatus !== 'ending') {\n nextToast = toasts[index];\n break;\n }\n index += 1;\n }\n\n // Go backwards if no next toast is found\n if (!nextToast) {\n index = currentIndex - 1;\n while (index >= 0) {\n if (toasts[index].transitionStatus !== 'ending') {\n nextToast = toasts[index];\n break;\n }\n index -= 1;\n }\n }\n if (nextToast) {\n nextToast.ref?.current?.focus();\n } else {\n this.restoreFocusToPrevElement();\n }\n }\n}","'use client';\n\nimport * as React from 'react';\nimport { useOnMount } from '@base-ui/utils/useOnMount';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { ToastContext } from \"./ToastProviderContext.js\";\nimport { ToastStore } from \"../store.js\";\n\n/**\n * Provides a context for creating and managing toasts.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const ToastProvider = function ToastProvider(props) {\n const {\n children,\n timeout = 5000,\n limit = 3,\n toastManager\n } = props;\n const store = useRefWithInit(() => new ToastStore({\n timeout,\n limit,\n viewport: null,\n toasts: [],\n hovering: false,\n focused: false,\n isWindowFocused: true,\n prevFocusElement: null\n })).current;\n useOnMount(store.disposeEffect);\n React.useEffect(function subscribeToToastManager() {\n if (!toastManager) {\n return undefined;\n }\n const unsubscribe = toastManager[' subscribe'](({\n action,\n options\n }) => {\n const id = options.id;\n if (action === 'promise' && options.promise) {\n store.promiseToast(options.promise, options);\n } else if (action === 'update' && id) {\n store.updateToast(id, options);\n } else if (action === 'close') {\n store.closeToast(id);\n } else {\n store.addToast(options);\n }\n });\n return unsubscribe;\n }, [store, toastManager]);\n store.useSyncedValues({\n timeout,\n limit\n });\n return /*#__PURE__*/_jsx(ToastContext.Provider, {\n value: store,\n children: children\n });\n};\nif (process.env.NODE_ENV !== \"production\") ToastProvider.displayName = \"ToastProvider\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { isSafari } from '@base-ui/utils/detectBrowser';\nimport { visuallyHidden } from '@base-ui/utils/visuallyHidden';\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const FocusGuard = /*#__PURE__*/React.forwardRef(function FocusGuard(props, ref) {\n const [role, setRole] = React.useState();\n useIsoLayoutEffect(() => {\n if (isSafari) {\n // Unlike other screen readers such as NVDA and JAWS, the virtual cursor\n // on VoiceOver does trigger the onFocus event, so we can use the focus\n // trap element. On Safari, only buttons trigger the onFocus event.\n setRole('button');\n }\n }, []);\n const restProps = {\n tabIndex: 0,\n // Role is only for VoiceOver\n role\n };\n return /*#__PURE__*/_jsx(\"span\", {\n ...props,\n ref: ref,\n style: visuallyHidden,\n \"aria-hidden\": role ? undefined : true,\n ...restProps,\n \"data-base-ui-focus-guard\": \"\"\n });\n});\nif (process.env.NODE_ENV !== \"production\") FocusGuard.displayName = \"FocusGuard\";","export let ToastViewportCssVars = /*#__PURE__*/function (ToastViewportCssVars) {\n /**\n * Indicates the height of the frontmost toast.\n * @type {number}\n */\n ToastViewportCssVars[\"frontmostHeight\"] = \"--toast-frontmost-height\";\n return ToastViewportCssVars;\n}({});","'use client';\n\nimport * as React from 'react';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { visuallyHidden } from '@base-ui/utils/visuallyHidden';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { activeElement, contains, getTarget } from \"../../floating-ui-react/utils.js\";\nimport { FocusGuard } from \"../../utils/FocusGuard.js\";\nimport { useToastProviderContext } from \"../provider/ToastProviderContext.js\";\nimport { useRenderElement } from \"../../internals/useRenderElement.js\";\nimport { isFocusVisible } from \"../utils/focusVisible.js\";\nimport { ToastViewportCssVars } from \"./ToastViewportCssVars.js\";\n\n/**\n * A container viewport for toasts.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const ToastViewport = /*#__PURE__*/React.forwardRef(function ToastViewport(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n children,\n ...elementProps\n } = componentProps;\n const store = useToastProviderContext();\n const windowFocusTimeout = useTimeout();\n const handlingFocusGuardRef = React.useRef(false);\n const markedReadyForMouseLeaveRef = React.useRef(false);\n const touchActiveRef = React.useRef(false);\n const isEmpty = store.useState('isEmpty');\n const toasts = store.useState('toasts');\n const focused = store.useState('focused');\n const expanded = store.useState('expanded');\n const prevFocusElement = store.useState('prevFocusElement');\n const frontmostHeight = toasts[0]?.height ?? 0;\n const hasTransitioningToasts = React.useMemo(() => toasts.some(toast => toast.transitionStatus === 'ending'), [toasts]);\n const highPriorityToasts = React.useMemo(() => toasts.filter(toast => toast.priority === 'high'), [toasts]);\n\n // Listen globally for F6 so we can force-focus the viewport.\n React.useEffect(() => {\n const viewport = store.state.viewport;\n if (!viewport) {\n return undefined;\n }\n function handleGlobalKeyDown(event) {\n if (isEmpty) {\n return;\n }\n if (event.key === 'F6' && getTarget(event) !== viewport) {\n event.preventDefault();\n store.setPrevFocusElement(activeElement(ownerDocument(viewport)));\n viewport?.focus({\n preventScroll: true\n });\n store.pauseTimers();\n store.setFocused(true);\n }\n }\n const win = ownerWindow(viewport);\n return addEventListener(win, 'keydown', handleGlobalKeyDown);\n }, [store, isEmpty]);\n React.useEffect(() => {\n const viewport = store.state.viewport;\n if (!viewport || isEmpty) {\n return undefined;\n }\n const win = ownerWindow(viewport);\n function handleWindowBlur(event) {\n if (getTarget(event) !== win) {\n return;\n }\n store.setIsWindowFocused(false);\n store.pauseTimers();\n }\n function handleWindowFocus(event) {\n if (event.relatedTarget) {\n return;\n }\n const target = getTarget(event);\n const activeEl = activeElement(ownerDocument(viewport));\n if (target === win || !contains(viewport, target) || !isFocusVisible(activeEl)) {\n store.resumeTimers();\n }\n\n // Wait for the `handleFocus` event to fire.\n windowFocusTimeout.start(0, () => store.setIsWindowFocused(true));\n }\n return mergeCleanups(addEventListener(win, 'blur', handleWindowBlur, true), addEventListener(win, 'focus', handleWindowFocus, true));\n }, [store, windowFocusTimeout,\n // `store.state.viewport` isn't available on the first render,\n // since the portal node hasn't yet been created.\n // By adding this dependency, we ensure the window listeners\n // are added when toasts have been created, once the ref is available.\n isEmpty]);\n React.useEffect(() => {\n const viewport = store.state.viewport;\n if (!viewport || isEmpty) {\n return undefined;\n }\n const doc = ownerDocument(viewport);\n return addEventListener(doc, 'pointerdown', store.handleDocumentPointerDown, true);\n }, [isEmpty, store]);\n function handleFocusGuard(event) {\n const viewport = store.state.viewport;\n if (!viewport) {\n return;\n }\n handlingFocusGuardRef.current = true;\n\n // If we're coming off the container, move to the first toast\n if (event.relatedTarget === viewport) {\n toasts[0]?.ref?.current?.focus();\n } else {\n store.restoreFocusToPrevElement();\n }\n }\n function handleKeyDown(event) {\n if (event.key === 'Tab' && event.shiftKey && getTarget(event.nativeEvent) === store.state.viewport) {\n event.preventDefault();\n store.restoreFocusToPrevElement();\n store.resumeTimers();\n }\n }\n function flushMouseLeave() {\n const hasEndingToasts = store.state.toasts.some(toast => toast.transitionStatus === 'ending');\n if (!store.state.isWindowFocused || hasEndingToasts || touchActiveRef.current || !markedReadyForMouseLeaveRef.current) {\n return;\n }\n\n // Once transitions have finished, see if a mouseleave was already triggered\n // but blocked from taking effect. If so, we can now safely resume timers and\n // collapse the viewport.\n store.resumeTimers();\n store.setHovering(false);\n markedReadyForMouseLeaveRef.current = false;\n }\n React.useEffect(flushMouseLeave, [hasTransitioningToasts, store]);\n function handleMouseEnter() {\n store.pauseTimers();\n store.setHovering(true);\n markedReadyForMouseLeaveRef.current = false;\n }\n function handleMouseLeave() {\n if (hasTransitioningToasts || touchActiveRef.current) {\n // When swiping to dismiss, wait until the transitions have settled\n // or the touch interaction ends to avoid collapsing mid-gesture.\n markedReadyForMouseLeaveRef.current = true;\n } else {\n store.resumeTimers();\n store.setHovering(false);\n }\n }\n function handlePointerDown(event) {\n if (event.pointerType === 'touch') {\n touchActiveRef.current = true;\n }\n }\n function handlePointerEnd(event) {\n if (event.pointerType !== 'touch') {\n return;\n }\n touchActiveRef.current = false;\n flushMouseLeave();\n }\n function handleFocus() {\n if (handlingFocusGuardRef.current) {\n handlingFocusGuardRef.current = false;\n return;\n }\n if (focused) {\n return;\n }\n\n // Only set focused when the active element is focus-visible.\n // This prevents the viewport from staying expanded when clicking inside without\n // keyboard navigation.\n if (isFocusVisible(activeElement(ownerDocument(store.state.viewport)))) {\n store.setFocused(true);\n store.pauseTimers();\n }\n }\n function handleBlur(event) {\n if (!focused || contains(store.state.viewport, event.relatedTarget)) {\n return;\n }\n store.setFocused(false);\n store.resumeTimers();\n }\n const defaultProps = {\n tabIndex: -1,\n role: 'region',\n 'aria-live': 'polite',\n 'aria-atomic': false,\n 'aria-relevant': 'additions text',\n 'aria-label': 'Notifications',\n onMouseEnter: handleMouseEnter,\n onMouseMove: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onKeyDown: handleKeyDown,\n onClick: handleFocus,\n onPointerDown: handlePointerDown,\n onPointerUp: handlePointerEnd,\n onPointerCancel: handlePointerEnd\n };\n const state = {\n expanded\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, store.setViewport],\n state,\n props: [defaultProps, {\n style: {\n [ToastViewportCssVars.frontmostHeight]: frontmostHeight ? `${frontmostHeight}px` : undefined\n }\n }, elementProps, {\n children: /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!isEmpty && prevFocusElement && /*#__PURE__*/_jsx(FocusGuard, {\n onFocus: handleFocusGuard\n }), children, !isEmpty && prevFocusElement && /*#__PURE__*/_jsx(FocusGuard, {\n onFocus: handleFocusGuard\n })]\n })\n }]\n });\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!isEmpty && prevFocusElement && /*#__PURE__*/_jsx(FocusGuard, {\n onFocus: handleFocusGuard\n }), element, !focused && highPriorityToasts.length > 0 && /*#__PURE__*/_jsx(\"div\", {\n style: visuallyHidden,\n children: highPriorityToasts.map(toast => /*#__PURE__*/_jsxs(\"div\", {\n role: \"alert\",\n \"aria-atomic\": true,\n children: [/*#__PURE__*/_jsx(\"div\", {\n children: toast.title\n }), /*#__PURE__*/_jsx(\"div\", {\n children: toast.description\n })]\n }, toast.id))\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") ToastViewport.displayName = \"ToastViewport\";","import { isReactVersionAtLeast } from \"./reactVersion.js\";\nexport function inertValue(value) {\n if (isReactVersionAtLeast(19)) {\n return value;\n }\n // compatibility with React < 19\n return value ? 'true' : undefined;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ToastRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ToastRootContext.displayName = \"ToastRootContext\";\nexport function useToastRootContext() {\n const context = React.useContext(ToastRootContext);\n if (!context) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ToastRootContext is missing. Toast parts must be used within <Toast.Root>.' : _formatErrorMessage(66));\n }\n return context;\n}","export let TransitionStatusDataAttributes = /*#__PURE__*/function (TransitionStatusDataAttributes) {\n /**\n * Present when the component is animating in.\n */\n TransitionStatusDataAttributes[\"startingStyle\"] = \"data-starting-style\";\n /**\n * Present when the component is animating out.\n */\n TransitionStatusDataAttributes[\"endingStyle\"] = \"data-ending-style\";\n return TransitionStatusDataAttributes;\n}({});\nconst STARTING_HOOK = {\n [TransitionStatusDataAttributes.startingStyle]: ''\n};\nconst ENDING_HOOK = {\n [TransitionStatusDataAttributes.endingStyle]: ''\n};\nexport const transitionStatusMapping = {\n transitionStatus(value) {\n if (value === 'starting') {\n return STARTING_HOOK;\n }\n if (value === 'ending') {\n return ENDING_HOOK;\n }\n return null;\n }\n};","/**\n * If the provided argument is a ref object, returns its `current` value.\n * Otherwise, returns the argument itself.\n */\nexport function resolveRef(maybeRef) {\n if (maybeRef == null) {\n return maybeRef;\n }\n return 'current' in maybeRef ? maybeRef.current : maybeRef;\n}","'use client';\n\nimport * as ReactDOM from 'react-dom';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { resolveRef } from \"../utils/resolveRef.js\";\nimport { TransitionStatusDataAttributes } from \"./stateAttributesMapping.js\";\n\n/**\n * Executes a function once all animations have finished on the provided element.\n * @param elementOrRef - The element to watch for animations.\n * @param waitForStartingStyleRemoved - Whether to wait for [data-starting-style] to be removed before checking for animations.\n * @param treatAbortedAsFinished - Whether to treat aborted animations as finished. If `false`, and there are aborted animations,\n * the function will check again if any new animations have started and wait for them to finish.\n * @returns A function that takes a callback to execute once all animations have finished, and an optional AbortSignal to abort the callback\n */\nexport function useAnimationsFinished(elementOrRef, waitForStartingStyleRemoved = false, treatAbortedAsFinished = true) {\n const frame = useAnimationFrame();\n return useStableCallback((fnToExecute,\n /**\n * An optional [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) that\n * can be used to abort `fnToExecute` before all the animations have finished.\n * @default null\n */\n signal = null) => {\n frame.cancel();\n const element = resolveRef(elementOrRef);\n if (element == null) {\n return;\n }\n const resolvedElement = element;\n const done = () => {\n // Synchronously flush the unmounting of the component so that the browser doesn't\n // paint: https://github.com/mui/base-ui/issues/979\n ReactDOM.flushSync(fnToExecute);\n };\n if (typeof resolvedElement.getAnimations !== 'function' || globalThis.BASE_UI_ANIMATIONS_DISABLED) {\n fnToExecute();\n return;\n }\n function exec() {\n Promise.all(resolvedElement.getAnimations().map(animation => animation.finished)).then(() => {\n if (!signal?.aborted) {\n done();\n }\n }).catch(() => {\n if (treatAbortedAsFinished) {\n if (!signal?.aborted) {\n done();\n }\n return;\n }\n const currentAnimations = resolvedElement.getAnimations();\n if (!signal?.aborted && currentAnimations.length > 0 && currentAnimations.some(animation => animation.pending || animation.playState !== 'finished')) {\n // Sometimes animations can be aborted because a property they depend on changes while the animation plays.\n // In such cases, we need to re-check if any new animations have started.\n exec();\n }\n });\n }\n if (waitForStartingStyleRemoved) {\n const startingStyleAttribute = TransitionStatusDataAttributes.startingStyle;\n\n // If `[data-starting-style]` isn't present, fall back to waiting one more frame\n // to give \"open\" animations a chance to be registered.\n if (!resolvedElement.hasAttribute(startingStyleAttribute)) {\n frame.request(exec);\n return;\n }\n\n // Wait for `[data-starting-style]` to have been removed.\n const attributeObserver = new MutationObserver(() => {\n if (!resolvedElement.hasAttribute(startingStyleAttribute)) {\n attributeObserver.disconnect();\n exec();\n }\n });\n attributeObserver.observe(resolvedElement, {\n attributes: true,\n attributeFilter: [startingStyleAttribute]\n });\n signal?.addEventListener('abort', () => attributeObserver.disconnect(), {\n once: true\n });\n return;\n }\n frame.request(exec);\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useAnimationsFinished } from \"./useAnimationsFinished.js\";\n\n/**\n * Calls the provided function when the CSS open/close animation or transition completes.\n */\nexport function useOpenChangeComplete(parameters) {\n const {\n enabled = true,\n open,\n ref,\n onComplete: onCompleteParam\n } = parameters;\n const onComplete = useStableCallback(onCompleteParam);\n const runOnceAnimationsFinish = useAnimationsFinished(ref, open, false);\n React.useEffect(() => {\n if (!enabled) {\n return undefined;\n }\n const abortController = new AbortController();\n runOnceAnimationsFinish(onComplete, abortController.signal);\n return () => {\n abortController.abort();\n };\n }, [enabled, open, onComplete, runOnceAnimationsFinish]);\n}","export let ToastRootCssVars = /*#__PURE__*/function (ToastRootCssVars) {\n /**\n * Indicates the index of the toast in the list.\n * @type {number}\n */\n ToastRootCssVars[\"index\"] = \"--toast-index\";\n /**\n * Indicates the vertical pixels offset of the toast in the list when expanded.\n * @type {number}\n */\n ToastRootCssVars[\"offsetY\"] = \"--toast-offset-y\";\n /**\n * Indicates the measured natural height of the toast in pixels.\n * @type {number}\n */\n ToastRootCssVars[\"height\"] = \"--toast-height\";\n /**\n * Indicates the horizontal swipe movement of the toast.\n * @type {number}\n */\n ToastRootCssVars[\"swipeMovementX\"] = \"--toast-swipe-movement-x\";\n /**\n * Indicates the vertical swipe movement of the toast.\n * @type {number}\n */\n ToastRootCssVars[\"swipeMovementY\"] = \"--toast-swipe-movement-y\";\n return ToastRootCssVars;\n}({});","export const TYPEAHEAD_RESET_MS = 500;\nexport const PATIENT_CLICK_THRESHOLD = 500;\nexport const DISABLED_TRANSITIONS_STYLE = {\n style: {\n transition: 'none'\n }\n};\nexport const CLICK_TRIGGER_IDENTIFIER = 'data-base-ui-click-trigger';\nexport const BASE_UI_SWIPE_IGNORE_ATTRIBUTE = 'data-base-ui-swipe-ignore';\nexport const LEGACY_SWIPE_IGNORE_ATTRIBUTE = 'data-swipe-ignore';\nexport const BASE_UI_SWIPE_IGNORE_SELECTOR = `[${BASE_UI_SWIPE_IGNORE_ATTRIBUTE}]`;\nexport const LEGACY_SWIPE_IGNORE_SELECTOR = `[${LEGACY_SWIPE_IGNORE_ATTRIBUTE}]`;\n\n/**\n * Used for dropdowns that usually strictly prefer top/bottom placements and\n * use `var(--available-height)` to limit their height.\n */\nexport const DROPDOWN_COLLISION_AVOIDANCE = {\n fallbackAxisSide: 'none'\n};\n\n/**\n * Used by regular popups that usually aren't scrollable and are allowed to\n * freely flip to any axis of placement.\n */\nexport const POPUP_COLLISION_AVOIDANCE = {\n fallbackAxisSide: 'end'\n};\n\n/**\n * Special visually hidden styles for the aria-owns owner element to ensure owned element\n * accessibility in iOS/Safari/VoiceControl.\n * The owner element is an empty span, so most of the common visually hidden styles are not needed.\n * @see https://github.com/floating-ui/floating-ui/issues/3403\n */\nexport const ownerVisuallyHidden = {\n clipPath: 'inset(50%)',\n position: 'fixed',\n top: 0,\n left: 0\n};","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { ownerDocument, ownerWindow } from '@base-ui/utils/owner';\nimport { contains, getTarget } from \"../floating-ui-react/utils.js\";\nimport { findScrollableTouchTarget, hasScrollableAncestor } from \"./scrollable.js\";\nimport { clamp } from \"../internals/clamp.js\";\nimport { getElementAtPoint } from \"./getElementAtPoint.js\";\nconst DEFAULT_SWIPE_THRESHOLD = 40;\nconst REVERSE_CANCEL_THRESHOLD = 10;\nconst MIN_DRAG_THRESHOLD = 1;\nconst MIN_VELOCITY_DURATION_MS = 50;\nconst MIN_RELEASE_VELOCITY_DURATION_MS = 16;\nconst MAX_RELEASE_VELOCITY_AGE_MS = 80;\nconst DEFAULT_IGNORE_SELECTOR = 'button,a,input,select,textarea,label,[role=\"button\"]';\nexport function getDisplacement(direction, deltaX, deltaY) {\n switch (direction) {\n case 'up':\n return -deltaY;\n case 'down':\n return deltaY;\n case 'left':\n return -deltaX;\n case 'right':\n return deltaX;\n default:\n return 0;\n }\n}\nexport function getElementTransform(element) {\n const computedStyle = ownerWindow(element).getComputedStyle(element);\n const transform = computedStyle.transform;\n let translateX = 0;\n let translateY = 0;\n let scale = 1;\n if (transform && transform !== 'none') {\n const matrix = transform.match(/matrix(?:3d)?\\(([^)]+)\\)/);\n if (matrix) {\n const values = matrix[1].split(', ').map(parseFloat);\n if (values.length === 6) {\n translateX = values[4];\n translateY = values[5];\n scale = Math.sqrt(values[0] * values[0] + values[1] * values[1]);\n } else if (values.length === 16) {\n translateX = values[12];\n translateY = values[13];\n scale = values[0];\n }\n }\n }\n return {\n x: translateX,\n y: translateY,\n scale\n };\n}\nfunction getValidTimeStamp(timeStamp) {\n return Number.isFinite(timeStamp) && timeStamp > 0 ? timeStamp : null;\n}\nfunction hasPrimaryMouseButton(buttons) {\n return buttons % 2 === 1;\n}\nfunction safelyChangePointerCapture(element, pointerId, method) {\n const pointerCaptureMethod = element[method];\n if (typeof pointerCaptureMethod !== 'function') {\n return;\n }\n try {\n pointerCaptureMethod.call(element, pointerId);\n } catch (error) {\n if (error && typeof error === 'object' && 'name' in error && error.name === 'NotFoundError') {\n return;\n }\n throw error;\n }\n}\nexport function useSwipeDismiss(options) {\n const {\n enabled,\n directions,\n elementRef,\n movementCssVars,\n canStart,\n ignoreSelectorWhenTouch = true,\n ignoreScrollableAncestors = false,\n swipeThreshold: swipeThresholdProp,\n onDismiss,\n onProgress,\n onCancel,\n onSwipeStart,\n onRelease,\n onSwipingChange,\n trackDrag = true\n } = options;\n const ignoreSelector = DEFAULT_IGNORE_SELECTOR;\n const primaryDirection = directions.length === 1 ? directions[0] : undefined;\n const swipeThresholdDefault = Math.max(0, typeof swipeThresholdProp === 'number' ? swipeThresholdProp : DEFAULT_SWIPE_THRESHOLD);\n const allowLeft = directions.includes('left');\n const allowRight = directions.includes('right');\n const allowUp = directions.includes('up');\n const allowDown = directions.includes('down');\n const hasHorizontal = allowLeft || allowRight;\n const hasVertical = allowUp || allowDown;\n const scrollAxes = React.useMemo(() => {\n const axes = [];\n if (hasVertical) {\n axes.push('vertical');\n }\n if (hasHorizontal) {\n axes.push('horizontal');\n }\n return axes;\n }, [hasHorizontal, hasVertical]);\n const [currentSwipeDirection, setCurrentSwipeDirection] = React.useState(undefined);\n const [isSwiping, setIsSwiping] = React.useState(false);\n const [isRealSwipe, setIsRealSwipe] = React.useState(false);\n const [dragDismissed, setDragDismissed] = React.useState(false);\n const [dragOffset, setDragOffset] = React.useState({\n x: 0,\n y: 0\n });\n const [initialTransform, setInitialTransform] = React.useState({\n x: 0,\n y: 0,\n scale: 1\n });\n const [lockedDirection, setLockedDirection] = React.useState(null);\n const dragStartPosRef = React.useRef({\n x: 0,\n y: 0\n });\n const dragOffsetRef = React.useRef({\n x: 0,\n y: 0\n });\n const lastMovePosRef = React.useRef(null);\n const initialTransformRef = React.useRef({\n x: 0,\n y: 0,\n scale: 1\n });\n const intendedSwipeDirectionRef = React.useRef(undefined);\n const maxSwipeDisplacementRef = React.useRef(0);\n const cancelledSwipeRef = React.useRef(false);\n const swipeCancelBaselineRef = React.useRef({\n x: 0,\n y: 0\n });\n const isFirstPointerMoveRef = React.useRef(false);\n const pendingSwipeRef = React.useRef(false);\n const pendingSwipeStartPosRef = React.useRef(null);\n const swipeFromScrollableRef = React.useRef(false);\n const sawPrimaryButtonsOnMoveRef = React.useRef(false);\n const elementSizeRef = React.useRef({\n width: 0,\n height: 0\n });\n const swipeProgressRef = React.useRef(0);\n const swipeThresholdRef = React.useRef(swipeThresholdDefault);\n const swipeStartTimeRef = React.useRef(null);\n const lastDragSampleRef = React.useRef(null);\n const lastDragVelocityRef = React.useRef({\n x: 0,\n y: 0\n });\n const lastProgressDetailsRef = React.useRef(null);\n const isSwipingRef = React.useRef(false);\n const setSwiping = useStableCallback(nextSwiping => {\n if (isSwipingRef.current === nextSwiping) {\n return;\n }\n isSwipingRef.current = nextSwiping;\n setIsSwiping(nextSwiping);\n onSwipingChange?.(nextSwiping);\n });\n function resolveSwipeThreshold(direction) {\n if (!direction) {\n return;\n }\n if (typeof swipeThresholdProp !== 'function') {\n swipeThresholdRef.current = swipeThresholdDefault;\n return;\n }\n const element = elementRef.current;\n if (!element) {\n return;\n }\n const value = swipeThresholdProp({\n element,\n direction\n });\n swipeThresholdRef.current = Math.max(0, value);\n }\n const updateSwipeProgress = useStableCallback((progress, details) => {\n const nextProgress = Number.isFinite(progress) ? clamp(progress, 0, 1) : 0;\n const progressChanged = nextProgress !== swipeProgressRef.current;\n let detailsChanged = false;\n if (details) {\n const lastDetails = lastProgressDetailsRef.current;\n detailsChanged = !lastDetails || lastDetails.deltaX !== details.deltaX || lastDetails.deltaY !== details.deltaY || lastDetails.direction !== details.direction;\n }\n if (!progressChanged && !detailsChanged) {\n return;\n }\n swipeProgressRef.current = nextProgress;\n if (details) {\n lastProgressDetailsRef.current = details;\n } else if (progressChanged) {\n lastProgressDetailsRef.current = null;\n }\n onProgress?.(nextProgress, details);\n });\n function recordDragSample(offset, timeStamp) {\n if (timeStamp === null) {\n return;\n }\n const lastSample = lastDragSampleRef.current;\n if (lastSample && timeStamp > lastSample.time) {\n const durationMs = Math.max(timeStamp - lastSample.time, MIN_RELEASE_VELOCITY_DURATION_MS);\n lastDragVelocityRef.current = {\n x: (offset.x - lastSample.x) / durationMs,\n y: (offset.y - lastSample.y) / durationMs\n };\n }\n lastDragSampleRef.current = {\n x: offset.x,\n y: offset.y,\n time: timeStamp\n };\n }\n const reset = React.useCallback(() => {\n setCurrentSwipeDirection(undefined);\n setSwiping(false);\n setIsRealSwipe(false);\n setDragDismissed(false);\n setDragOffset({\n x: 0,\n y: 0\n });\n setInitialTransform({\n x: 0,\n y: 0,\n scale: 1\n });\n setLockedDirection(null);\n updateSwipeProgress(0);\n swipeThresholdRef.current = swipeThresholdDefault;\n dragStartPosRef.current = {\n x: 0,\n y: 0\n };\n dragOffsetRef.current = {\n x: 0,\n y: 0\n };\n initialTransformRef.current = {\n x: 0,\n y: 0,\n scale: 1\n };\n intendedSwipeDirectionRef.current = undefined;\n maxSwipeDisplacementRef.current = 0;\n cancelledSwipeRef.current = false;\n swipeCancelBaselineRef.current = {\n x: 0,\n y: 0\n };\n isFirstPointerMoveRef.current = false;\n lastMovePosRef.current = null;\n pendingSwipeRef.current = false;\n pendingSwipeStartPosRef.current = null;\n swipeFromScrollableRef.current = false;\n sawPrimaryButtonsOnMoveRef.current = false;\n elementSizeRef.current = {\n width: 0,\n height: 0\n };\n swipeStartTimeRef.current = null;\n lastDragSampleRef.current = null;\n lastDragVelocityRef.current = {\n x: 0,\n y: 0\n };\n lastProgressDetailsRef.current = null;\n }, [setSwiping, swipeThresholdDefault, updateSwipeProgress]);\n React.useEffect(() => {\n if (typeof swipeThresholdProp !== 'function') {\n swipeThresholdRef.current = swipeThresholdDefault;\n }\n }, [swipeThresholdDefault, swipeThresholdProp]);\n function getPrimaryPointerPosition(event) {\n if ('touches' in event) {\n const touch = event.touches[0];\n return touch ? {\n x: touch.clientX,\n y: touch.clientY\n } : null;\n }\n return {\n x: event.clientX,\n y: event.clientY\n };\n }\n function isTouchLikeEvent(event) {\n if ('touches' in event) {\n return true;\n }\n return event.pointerType === 'touch';\n }\n function getTargetAtPoint(position, nativeEvent) {\n const doc = ownerDocument(elementRef.current);\n const elementAtPoint = getElementAtPoint(doc, position.x, position.y);\n const target = elementAtPoint ?? getTarget(nativeEvent);\n return target;\n }\n function findGestureScrollableTouchTarget(target, root) {\n if (hasHorizontal && !hasVertical) {\n return findScrollableTouchTarget(target, root, 'horizontal');\n }\n if (hasVertical && !hasHorizontal) {\n return findScrollableTouchTarget(target, root, 'vertical');\n }\n return findScrollableTouchTarget(target, root, 'vertical') ?? findScrollableTouchTarget(target, root, 'horizontal');\n }\n function startSwipeAtPosition(event, position, startOptions) {\n swipeFromScrollableRef.current = false;\n const touchLike = isTouchLikeEvent(event);\n const target = getTargetAtPoint(position, event.nativeEvent);\n const doc = ownerDocument(elementRef.current);\n const body = doc.body;\n const scrollableTarget = touchLike && body ? findGestureScrollableTouchTarget(target, body) : null;\n const ignoreScrollableTarget = startOptions?.ignoreScrollableTarget ?? false;\n if (scrollableTarget && !ignoreScrollableTarget) {\n return false;\n }\n swipeFromScrollableRef.current = Boolean(scrollableTarget && ignoreScrollableTarget);\n const isInteractiveElement = target ? target.closest(ignoreSelector) : false;\n if (isInteractiveElement && (!touchLike || ignoreSelectorWhenTouch)) {\n return false;\n }\n const element = elementRef.current;\n if (ignoreScrollableAncestors && element && target && scrollAxes.length > 0) {\n const ignoreAncestors = startOptions?.ignoreScrollableAncestors ?? false;\n if (!ignoreAncestors && hasScrollableAncestor(target, element, scrollAxes)) {\n return false;\n }\n }\n cancelledSwipeRef.current = false;\n intendedSwipeDirectionRef.current = undefined;\n maxSwipeDisplacementRef.current = 0;\n dragStartPosRef.current = position;\n swipeStartTimeRef.current = getValidTimeStamp(event.timeStamp);\n swipeCancelBaselineRef.current = position;\n lastMovePosRef.current = position;\n if (element) {\n elementSizeRef.current = {\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n resolveSwipeThreshold(primaryDirection);\n const transform = getElementTransform(element);\n initialTransformRef.current = transform;\n dragOffsetRef.current = {\n x: transform.x,\n y: transform.y\n };\n setInitialTransform(transform);\n setDragOffset({\n x: transform.x,\n y: transform.y\n });\n recordDragSample({\n x: transform.x,\n y: transform.y\n }, swipeStartTimeRef.current);\n if (!('touches' in event)) {\n safelyChangePointerCapture(element, event.pointerId, 'setPointerCapture');\n }\n }\n onSwipeStart?.(event.nativeEvent);\n setSwiping(true);\n setIsRealSwipe(false);\n setLockedDirection(null);\n isFirstPointerMoveRef.current = true;\n updateSwipeProgress(0);\n return true;\n }\n function resetPendingSwipeState() {\n clearPendingSwipeStartState();\n swipeFromScrollableRef.current = false;\n lastMovePosRef.current = null;\n }\n function clearPendingSwipeStartState() {\n pendingSwipeRef.current = false;\n pendingSwipeStartPosRef.current = null;\n }\n function cancelSwipeInteraction(event) {\n resetPendingSwipeState();\n if (!isSwipingRef.current) {\n return;\n }\n setSwiping(false);\n setIsRealSwipe(false);\n setLockedDirection(null);\n const resolvedInitialTransform = trackDrag ? initialTransform : initialTransformRef.current;\n dragOffsetRef.current = {\n x: resolvedInitialTransform.x,\n y: resolvedInitialTransform.y\n };\n setDragOffset({\n x: resolvedInitialTransform.x,\n y: resolvedInitialTransform.y\n });\n setCurrentSwipeDirection(undefined);\n sawPrimaryButtonsOnMoveRef.current = false;\n const element = elementRef.current;\n if (element) {\n safelyChangePointerCapture(element, event.pointerId, 'releasePointerCapture');\n }\n updateSwipeProgress(0, {\n deltaX: 0,\n deltaY: 0,\n direction: undefined\n });\n onCancel?.(event.nativeEvent);\n }\n function applyDirectionalDamping(deltaX, deltaY) {\n const exponent = value => value >= 0 ? value ** 0.5 : -(Math.abs(value) ** 0.5);\n const dampAxis = (delta, allowNegative, allowPositive) => {\n if (!allowNegative && delta < 0) {\n return exponent(delta);\n }\n if (!allowPositive && delta > 0) {\n return exponent(delta);\n }\n return delta;\n };\n const newDeltaX = hasHorizontal ? dampAxis(deltaX, allowLeft, allowRight) : exponent(deltaX);\n const newDeltaY = hasVertical ? dampAxis(deltaY, allowUp, allowDown) : exponent(deltaY);\n return {\n x: newDeltaX,\n y: newDeltaY\n };\n }\n function canSwipeFromScrollEdgeOnPendingMove(scrollTarget, deltaX, deltaY) {\n const absDeltaX = Math.abs(deltaX);\n const absDeltaY = Math.abs(deltaY);\n const useVerticalAxis = hasVertical && deltaY !== 0 && (!hasHorizontal || absDeltaY >= absDeltaX);\n if (useVerticalAxis) {\n const maxScrollTop = Math.max(0, scrollTarget.scrollHeight - scrollTarget.clientHeight);\n const atTop = scrollTarget.scrollTop <= 0;\n const atBottom = scrollTarget.scrollTop >= maxScrollTop;\n const movingDown = deltaY > 0;\n const movingUp = deltaY < 0;\n const canSwipeDown = movingDown && atTop && allowDown;\n const canSwipeUp = movingUp && atBottom && allowUp;\n return canSwipeDown || canSwipeUp;\n }\n const useHorizontalAxis = hasHorizontal && deltaX !== 0 && (!hasVertical || absDeltaX > absDeltaY);\n if (useHorizontalAxis) {\n const maxScrollLeft = Math.max(0, scrollTarget.scrollWidth - scrollTarget.clientWidth);\n const atLeft = scrollTarget.scrollLeft <= 0;\n const atRight = scrollTarget.scrollLeft >= maxScrollLeft;\n const movingRight = deltaX > 0;\n const movingLeft = deltaX < 0;\n const canSwipeRight = movingRight && atLeft && allowRight;\n const canSwipeLeft = movingLeft && atRight && allowLeft;\n return canSwipeRight || canSwipeLeft;\n }\n return null;\n }\n const handleStart = useStableCallback(event => {\n if (!enabled) {\n return;\n }\n if (event.defaultPrevented || event.nativeEvent.defaultPrevented) {\n return;\n }\n if (!('touches' in event) && event.button !== 0) {\n return;\n }\n const startPos = getPrimaryPointerPosition(event);\n if (!startPos) {\n return;\n }\n pendingSwipeRef.current = true;\n pendingSwipeStartPosRef.current = startPos;\n swipeFromScrollableRef.current = false;\n sawPrimaryButtonsOnMoveRef.current = false;\n const allowedToStart = canStart ? canStart(startPos, {\n nativeEvent: event.nativeEvent,\n direction: primaryDirection\n }) : true;\n if (!allowedToStart) {\n return;\n }\n if (startSwipeAtPosition(event, startPos)) {\n clearPendingSwipeStartState();\n }\n });\n function handleMoveCore(event, position, movement) {\n if (!enabled || !isSwipingRef.current) {\n return;\n }\n const target = getTarget(event.nativeEvent);\n if (isTouchLikeEvent(event) && !swipeFromScrollableRef.current) {\n const boundaryElement = event.currentTarget;\n if (findGestureScrollableTouchTarget(target, boundaryElement)) {\n return;\n }\n }\n if (!('touches' in event)) {\n // Prevent text selection on Safari\n event.preventDefault();\n }\n if (isFirstPointerMoveRef.current) {\n // Adjust the starting position to the current position on the first move\n // to account for the delay between pointerdown and the first pointermove on iOS.\n dragStartPosRef.current = position;\n const moveTime = getValidTimeStamp(event.timeStamp);\n if (moveTime !== null) {\n swipeStartTimeRef.current = moveTime;\n }\n isFirstPointerMoveRef.current = false;\n }\n const clientX = position.x;\n const clientY = position.y;\n const movementX = movement.x;\n const movementY = movement.y;\n if (movementY < 0 && clientY > swipeCancelBaselineRef.current.y || movementY > 0 && clientY < swipeCancelBaselineRef.current.y) {\n swipeCancelBaselineRef.current = {\n x: swipeCancelBaselineRef.current.x,\n y: clientY\n };\n }\n if (movementX < 0 && clientX > swipeCancelBaselineRef.current.x || movementX > 0 && clientX < swipeCancelBaselineRef.current.x) {\n swipeCancelBaselineRef.current = {\n x: clientX,\n y: swipeCancelBaselineRef.current.y\n };\n }\n const deltaX = clientX - dragStartPosRef.current.x;\n const deltaY = clientY - dragStartPosRef.current.y;\n const cancelDeltaY = clientY - swipeCancelBaselineRef.current.y;\n const cancelDeltaX = clientX - swipeCancelBaselineRef.current.x;\n if (!isRealSwipe) {\n const movementDistance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n if (movementDistance >= MIN_DRAG_THRESHOLD) {\n setIsRealSwipe(true);\n if (lockedDirection === null) {\n if (hasHorizontal && hasVertical) {\n const absX = Math.abs(deltaX);\n const absY = Math.abs(deltaY);\n setLockedDirection(absX > absY ? 'horizontal' : 'vertical');\n }\n }\n }\n }\n let candidate;\n if (!intendedSwipeDirectionRef.current) {\n if (lockedDirection === 'vertical') {\n if (deltaY > 0) {\n candidate = 'down';\n } else if (deltaY < 0) {\n candidate = 'up';\n }\n } else if (lockedDirection === 'horizontal') {\n if (deltaX > 0) {\n candidate = 'right';\n } else if (deltaX < 0) {\n candidate = 'left';\n }\n } else if (Math.abs(deltaX) >= Math.abs(deltaY)) {\n candidate = deltaX > 0 ? 'right' : 'left';\n } else {\n candidate = deltaY > 0 ? 'down' : 'up';\n }\n if (candidate) {\n const isAllowed = candidate === 'left' && allowLeft || candidate === 'right' && allowRight || candidate === 'up' && allowUp || candidate === 'down' && allowDown;\n if (isAllowed) {\n intendedSwipeDirectionRef.current = candidate;\n maxSwipeDisplacementRef.current = getDisplacement(candidate, deltaX, deltaY);\n setCurrentSwipeDirection(candidate);\n resolveSwipeThreshold(candidate);\n }\n }\n } else {\n const direction = intendedSwipeDirectionRef.current;\n const currentDisplacement = getDisplacement(direction, cancelDeltaX, cancelDeltaY);\n if (currentDisplacement > swipeThresholdRef.current) {\n cancelledSwipeRef.current = false;\n setCurrentSwipeDirection(direction);\n } else if (!(allowLeft && allowRight) && !(allowUp && allowDown) && maxSwipeDisplacementRef.current - currentDisplacement >= REVERSE_CANCEL_THRESHOLD) {\n // Mark that a change-of-mind has occurred\n cancelledSwipeRef.current = true;\n }\n }\n const dampedDelta = applyDirectionalDamping(deltaX, deltaY);\n let newOffsetX = initialTransformRef.current.x;\n let newOffsetY = initialTransformRef.current.y;\n if (lockedDirection === 'horizontal') {\n if (hasHorizontal) {\n newOffsetX += dampedDelta.x;\n }\n } else if (lockedDirection === 'vertical') {\n if (hasVertical) {\n newOffsetY += dampedDelta.y;\n }\n } else {\n if (hasHorizontal) {\n newOffsetX += dampedDelta.x;\n }\n if (hasVertical) {\n newOffsetY += dampedDelta.y;\n }\n }\n dragOffsetRef.current = {\n x: newOffsetX,\n y: newOffsetY\n };\n if (trackDrag) {\n setDragOffset({\n x: newOffsetX,\n y: newOffsetY\n });\n }\n recordDragSample({\n x: newOffsetX,\n y: newOffsetY\n }, getValidTimeStamp(event.timeStamp));\n const dragDeltaX = newOffsetX - initialTransformRef.current.x;\n const dragDeltaY = newOffsetY - initialTransformRef.current.y;\n const swipeDirectionDetails = intendedSwipeDirectionRef.current;\n const progressDirection = primaryDirection ?? intendedSwipeDirectionRef.current;\n if (!progressDirection) {\n updateSwipeProgress(0, {\n deltaX: dragDeltaX,\n deltaY: dragDeltaY,\n direction: swipeDirectionDetails\n });\n return;\n }\n const size = progressDirection === 'left' || progressDirection === 'right' ? elementSizeRef.current.width : elementSizeRef.current.height;\n const scale = initialTransformRef.current.scale || 1;\n if (size <= 0 || scale <= 0) {\n updateSwipeProgress(0, {\n deltaX: dragDeltaX,\n deltaY: dragDeltaY,\n direction: swipeDirectionDetails\n });\n return;\n }\n const progressDisplacement = getDisplacement(progressDirection, newOffsetX - initialTransformRef.current.x, newOffsetY - initialTransformRef.current.y);\n if (progressDisplacement <= 0) {\n updateSwipeProgress(0, {\n deltaX: dragDeltaX,\n deltaY: dragDeltaY,\n direction: swipeDirectionDetails\n });\n return;\n }\n updateSwipeProgress(progressDisplacement / (size * scale), {\n deltaX: dragDeltaX,\n deltaY: dragDeltaY,\n direction: swipeDirectionDetails\n });\n }\n const handleMove = useStableCallback(event => {\n const currentPos = getPrimaryPointerPosition(event);\n if (!currentPos) {\n return;\n }\n if (!('touches' in event)) {\n const hasPrimaryButton = hasPrimaryMouseButton(event.buttons);\n if (hasPrimaryButton) {\n sawPrimaryButtonsOnMoveRef.current = true;\n }\n\n // Cancel the swipe if a non-primary button takes over the interaction.\n // This handles cases where a right-click interrupts dragging.\n const lostPrimaryButtonDuringSwipe = event.buttons === 0 && sawPrimaryButtonsOnMoveRef.current;\n if (event.buttons !== 0 && !hasPrimaryButton || lostPrimaryButtonDuringSwipe) {\n cancelSwipeInteraction(event);\n return;\n }\n }\n if (!isSwiping && pendingSwipeRef.current) {\n if (!isTouchLikeEvent(event) && (event.defaultPrevented || event.nativeEvent.defaultPrevented)) {\n resetPendingSwipeState();\n return;\n }\n const allowedToStart = canStart ? canStart(currentPos, {\n nativeEvent: event.nativeEvent,\n direction: primaryDirection\n }) : true;\n if (allowedToStart) {\n const pendingStartPos = pendingSwipeStartPosRef.current;\n let ignoreScrollableOnStart = false;\n if (isTouchLikeEvent(event)) {\n const element = elementRef.current;\n if (pendingStartPos && element) {\n const target = getTargetAtPoint(currentPos, event.nativeEvent);\n const doc = ownerDocument(element);\n const body = doc.body;\n const scrollTarget = body ? findGestureScrollableTouchTarget(target, body) : null;\n if (scrollTarget && (contains(element, scrollTarget) || contains(scrollTarget, element))) {\n const deltaX = currentPos.x - pendingStartPos.x;\n const deltaY = currentPos.y - pendingStartPos.y;\n const canSwipeFromEdge = canSwipeFromScrollEdgeOnPendingMove(scrollTarget, deltaX, deltaY);\n if (canSwipeFromEdge === false) {\n return;\n }\n if (canSwipeFromEdge === true) {\n ignoreScrollableOnStart = true;\n }\n }\n }\n }\n const started = startSwipeAtPosition(event, currentPos, {\n ignoreScrollableTarget: ignoreScrollableOnStart,\n ignoreScrollableAncestors: ignoreScrollableOnStart\n });\n if (started) {\n if (pendingStartPos && ignoreScrollableOnStart) {\n // Preserve displacement between touchstart and the move that activates swipe from\n // a scroll-edge so quick flicks can dismiss.\n clearPendingSwipeStartState();\n dragStartPosRef.current = pendingStartPos;\n swipeCancelBaselineRef.current = pendingStartPos;\n lastMovePosRef.current = pendingStartPos;\n isFirstPointerMoveRef.current = false;\n } else {\n // Start from the current in-bounds position without dropping follow-up move\n // displacement; this avoids jumps when entering from outside the element while\n // keeping swipe tracking responsive on the next move.\n clearPendingSwipeStartState();\n swipeFromScrollableRef.current = false;\n }\n }\n }\n }\n const previousPos = lastMovePosRef.current;\n const movement = previousPos === null ? {\n x: 0,\n y: 0\n } : {\n x: currentPos.x - previousPos.x,\n y: currentPos.y - previousPos.y\n };\n lastMovePosRef.current = currentPos;\n handleMoveCore(event, currentPos, movement);\n });\n const handleEnd = useStableCallback(event => {\n if (!enabled) {\n return;\n }\n const resolvedDragOffset = dragOffsetRef.current;\n const resolvedInitialTransform = initialTransformRef.current;\n const releaseDeltaX = resolvedDragOffset.x - resolvedInitialTransform.x;\n const releaseDeltaY = resolvedDragOffset.y - resolvedInitialTransform.y;\n const progressDetails = {\n deltaX: releaseDeltaX,\n deltaY: releaseDeltaY,\n direction: currentSwipeDirection ?? intendedSwipeDirectionRef.current\n };\n if (!isSwipingRef.current) {\n resetPendingSwipeState();\n updateSwipeProgress(0, progressDetails);\n return;\n }\n setSwiping(false);\n setIsRealSwipe(false);\n setLockedDirection(null);\n resetPendingSwipeState();\n sawPrimaryButtonsOnMoveRef.current = false;\n const element = elementRef.current;\n if (element) {\n if (!('touches' in event)) {\n safelyChangePointerCapture(element, event.pointerId, 'releasePointerCapture');\n }\n }\n const deltaX = releaseDeltaX;\n const deltaY = releaseDeltaY;\n const startTime = swipeStartTimeRef.current;\n const endTime = getValidTimeStamp(event.timeStamp);\n const durationMs = startTime !== null && endTime !== null && endTime > startTime ? endTime - startTime : 0;\n const velocityDurationMs = durationMs > 0 ? Math.max(durationMs, MIN_VELOCITY_DURATION_MS) : 0;\n const velocityX = velocityDurationMs > 0 ? deltaX / velocityDurationMs : 0;\n const velocityY = velocityDurationMs > 0 ? deltaY / velocityDurationMs : 0;\n let releaseVelocityX = lastDragVelocityRef.current.x;\n let releaseVelocityY = lastDragVelocityRef.current.y;\n const lastSample = lastDragSampleRef.current;\n if (lastSample && endTime !== null && endTime >= lastSample.time) {\n const ageMs = endTime - lastSample.time;\n if (ageMs <= MAX_RELEASE_VELOCITY_AGE_MS) {\n const sampleDurationMs = Math.max(ageMs, MIN_RELEASE_VELOCITY_DURATION_MS);\n const deltaFromLastSampleX = resolvedDragOffset.x - lastSample.x;\n const deltaFromLastSampleY = resolvedDragOffset.y - lastSample.y;\n const sampleVelocityX = deltaFromLastSampleX / sampleDurationMs;\n const sampleVelocityY = deltaFromLastSampleY / sampleDurationMs;\n if (sampleVelocityX !== 0) {\n releaseVelocityX = sampleVelocityX;\n }\n if (sampleVelocityY !== 0) {\n releaseVelocityY = sampleVelocityY;\n }\n } else {\n releaseVelocityX = 0;\n releaseVelocityY = 0;\n }\n }\n const releaseDecision = onRelease?.({\n event: event.nativeEvent,\n direction: currentSwipeDirection ?? intendedSwipeDirectionRef.current,\n deltaX,\n deltaY,\n velocityX,\n velocityY,\n releaseVelocityX,\n releaseVelocityY\n });\n const hasReleaseDecision = typeof releaseDecision === 'boolean';\n if (cancelledSwipeRef.current && !hasReleaseDecision) {\n dragOffsetRef.current = {\n x: resolvedInitialTransform.x,\n y: resolvedInitialTransform.y\n };\n setDragOffset({\n x: resolvedInitialTransform.x,\n y: resolvedInitialTransform.y\n });\n setCurrentSwipeDirection(undefined);\n updateSwipeProgress(0, progressDetails);\n return;\n }\n let shouldClose = false;\n let dismissDirection;\n if (hasReleaseDecision) {\n shouldClose = releaseDecision;\n dismissDirection = currentSwipeDirection ?? intendedSwipeDirectionRef.current ?? primaryDirection;\n } else {\n for (const direction of directions) {\n switch (direction) {\n case 'right':\n if (deltaX > swipeThresholdRef.current) {\n shouldClose = true;\n dismissDirection = 'right';\n }\n break;\n case 'left':\n if (deltaX < -swipeThresholdRef.current) {\n shouldClose = true;\n dismissDirection = 'left';\n }\n break;\n case 'down':\n if (deltaY > swipeThresholdRef.current) {\n shouldClose = true;\n dismissDirection = 'down';\n }\n break;\n case 'up':\n if (deltaY < -swipeThresholdRef.current) {\n shouldClose = true;\n dismissDirection = 'up';\n }\n break;\n default:\n break;\n }\n if (shouldClose) {\n break;\n }\n }\n }\n if (shouldClose && dismissDirection) {\n setCurrentSwipeDirection(dismissDirection);\n setDragDismissed(true);\n onDismiss?.(event.nativeEvent, {\n direction: dismissDirection\n });\n } else {\n dragOffsetRef.current = {\n x: resolvedInitialTransform.x,\n y: resolvedInitialTransform.y\n };\n setDragOffset({\n x: resolvedInitialTransform.x,\n y: resolvedInitialTransform.y\n });\n setCurrentSwipeDirection(undefined);\n updateSwipeProgress(0, progressDetails);\n }\n });\n const getDragStyles = React.useCallback(() => {\n const resolvedDragOffset = trackDrag ? dragOffset : dragOffsetRef.current;\n const resolvedInitialTransform = trackDrag ? initialTransform : initialTransformRef.current;\n if (!isSwiping && resolvedDragOffset.x === resolvedInitialTransform.x && resolvedDragOffset.y === resolvedInitialTransform.y && !dragDismissed) {\n return {\n [movementCssVars.x]: '0px',\n [movementCssVars.y]: '0px'\n };\n }\n const deltaX = resolvedDragOffset.x - resolvedInitialTransform.x;\n const deltaY = resolvedDragOffset.y - resolvedInitialTransform.y;\n return {\n transition: isSwiping ? 'none' : undefined,\n // While swiping, freeze the element at its current visual transform so it doesn't snap to the\n // end position.\n transform: isSwiping ? `translateX(${resolvedDragOffset.x}px) translateY(${resolvedDragOffset.y}px) scale(${resolvedInitialTransform.scale})` : undefined,\n [movementCssVars.x]: `${deltaX}px`,\n [movementCssVars.y]: `${deltaY}px`\n };\n }, [dragDismissed, dragOffset, initialTransform, isSwiping, movementCssVars, trackDrag]);\n const getPointerProps = React.useCallback(() => {\n if (!enabled) {\n return {};\n }\n return {\n onPointerDown: handleStart,\n onPointerMove: handleMove,\n onPointerUp: handleEnd,\n onPointerCancel: handleEnd\n };\n }, [enabled, handleEnd, handleMove, handleStart]);\n const getTouchProps = React.useCallback(() => {\n if (!enabled) {\n return {};\n }\n return {\n onTouchStart: handleStart,\n onTouchMove: handleMove,\n onTouchEnd: handleEnd,\n onTouchCancel: handleEnd\n };\n }, [enabled, handleEnd, handleMove, handleStart]);\n return {\n swiping: isSwiping,\n swipeDirection: currentSwipeDirection,\n dragDismissed,\n getPointerProps,\n getTouchProps,\n getDragStyles,\n reset\n };\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { activeElement, contains, getTarget } from \"../../floating-ui-react/utils.js\";\nimport { ToastRootContext } from \"./ToastRootContext.js\";\nimport { transitionStatusMapping } from \"../../internals/stateAttributesMapping.js\";\nimport { useToastProviderContext } from \"../provider/ToastProviderContext.js\";\nimport { useRenderElement } from \"../../internals/useRenderElement.js\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.js\";\nimport { ToastRootCssVars } from \"./ToastRootCssVars.js\";\nimport { BASE_UI_SWIPE_IGNORE_SELECTOR, LEGACY_SWIPE_IGNORE_SELECTOR } from \"../../internals/constants.js\";\nimport { getDisplacement, getElementTransform } from \"../../utils/useSwipeDismiss.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...transitionStatusMapping,\n swipeDirection(value) {\n return value ? {\n 'data-swipe-direction': value\n } : null;\n }\n};\nconst SWIPE_THRESHOLD = 40;\nconst REVERSE_CANCEL_THRESHOLD = 10;\nconst OPPOSITE_DIRECTION_DAMPING_FACTOR = 0.5;\nconst MIN_DRAG_THRESHOLD = 1;\nconst TOAST_SWIPE_IGNORE_SELECTOR = `${BASE_UI_SWIPE_IGNORE_SELECTOR},${LEGACY_SWIPE_IGNORE_SELECTOR}`;\n\n/**\n * Groups all parts of an individual toast.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastRoot = /*#__PURE__*/React.forwardRef(function ToastRoot(componentProps, forwardedRef) {\n const {\n toast,\n render,\n className,\n swipeDirection = ['down', 'right'],\n style,\n ...elementProps\n } = componentProps;\n const isAnchored = toast.positionerProps?.anchor !== undefined;\n let swipeDirections = [];\n if (!isAnchored) {\n swipeDirections = Array.isArray(swipeDirection) ? swipeDirection : [swipeDirection];\n }\n const swipeEnabled = swipeDirections.length > 0;\n const store = useToastProviderContext();\n const [currentSwipeDirection, setCurrentSwipeDirection] = React.useState(undefined);\n const [isSwiping, setIsSwiping] = React.useState(false);\n const [isRealSwipe, setIsRealSwipe] = React.useState(false);\n const [dragDismissed, setDragDismissed] = React.useState(false);\n const [dragOffset, setDragOffset] = React.useState({\n x: 0,\n y: 0\n });\n const [initialTransform, setInitialTransform] = React.useState({\n x: 0,\n y: 0,\n scale: 1\n });\n const [titleId, setTitleId] = React.useState();\n const [descriptionId, setDescriptionId] = React.useState();\n const [lockedDirection, setLockedDirection] = React.useState(null);\n const rootRef = React.useRef(null);\n const dragStartPosRef = React.useRef({\n x: 0,\n y: 0\n });\n const initialTransformRef = React.useRef({\n x: 0,\n y: 0,\n scale: 1\n });\n const intendedSwipeDirectionRef = React.useRef(undefined);\n const maxSwipeDisplacementRef = React.useRef(0);\n const cancelledSwipeRef = React.useRef(false);\n const swipeCancelBaselineRef = React.useRef({\n x: 0,\n y: 0\n });\n const isFirstPointerMoveRef = React.useRef(false);\n const dragOffsetRef = React.useRef({\n x: 0,\n y: 0\n });\n const activePointerIdRef = React.useRef(null);\n const dragAbortControllerRef = React.useRef(null);\n const domIndex = store.useState('toastIndex', toast.id);\n const visibleIndex = store.useState('toastVisibleIndex', toast.id);\n const offsetY = store.useState('toastOffsetY', toast.id);\n const focused = store.useState('focused');\n const expanded = store.useState('expanded');\n useOpenChangeComplete({\n open: toast.transitionStatus !== 'ending',\n ref: rootRef,\n onComplete() {\n if (toast.transitionStatus === 'ending') {\n store.removeToast(toast.id);\n }\n }\n });\n\n // Recalculates the natural height of the toast and updates it in the toast manager.\n // `flushSync` avoids visual flickers when called from observer callbacks.\n const recalculateHeight = useStableCallback((flushSync = false) => {\n const element = rootRef.current;\n if (!element) {\n return;\n }\n const previousHeight = element.style.height;\n element.style.height = 'auto';\n const height = element.offsetHeight;\n element.style.height = previousHeight;\n function update() {\n store.updateToastInternal(toast.id, {\n ref: rootRef,\n height,\n ...(toast.transitionStatus === 'starting' ? {\n transitionStatus: undefined\n } : {})\n });\n }\n if (flushSync) {\n ReactDOM.flushSync(update);\n } else {\n update();\n }\n });\n useIsoLayoutEffect(recalculateHeight, [recalculateHeight]);\n function setResolvedDragOffset(nextDragOffset) {\n dragOffsetRef.current = nextDragOffset;\n setDragOffset(nextDragOffset);\n }\n useIsoLayoutEffect(() => {\n return () => {\n dragAbortControllerRef.current?.abort();\n };\n }, []);\n function applyDirectionalDamping(deltaX, deltaY) {\n let newDeltaX = deltaX;\n let newDeltaY = deltaY;\n if (!swipeDirections.includes('left') && !swipeDirections.includes('right')) {\n newDeltaX = deltaX > 0 ? deltaX ** OPPOSITE_DIRECTION_DAMPING_FACTOR : -(Math.abs(deltaX) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);\n } else {\n if (!swipeDirections.includes('right') && deltaX > 0) {\n newDeltaX = deltaX ** OPPOSITE_DIRECTION_DAMPING_FACTOR;\n }\n if (!swipeDirections.includes('left') && deltaX < 0) {\n newDeltaX = -(Math.abs(deltaX) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);\n }\n }\n if (!swipeDirections.includes('up') && !swipeDirections.includes('down')) {\n newDeltaY = deltaY > 0 ? deltaY ** OPPOSITE_DIRECTION_DAMPING_FACTOR : -(Math.abs(deltaY) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);\n } else {\n if (!swipeDirections.includes('down') && deltaY > 0) {\n newDeltaY = deltaY ** OPPOSITE_DIRECTION_DAMPING_FACTOR;\n }\n if (!swipeDirections.includes('up') && deltaY < 0) {\n newDeltaY = -(Math.abs(deltaY) ** OPPOSITE_DIRECTION_DAMPING_FACTOR);\n }\n }\n return {\n x: newDeltaX,\n y: newDeltaY\n };\n }\n const handleSwipeEnd = useStableCallback(event => {\n if (event.pointerId !== activePointerIdRef.current) {\n return;\n }\n activePointerIdRef.current = null;\n dragAbortControllerRef.current?.abort();\n dragAbortControllerRef.current = null;\n setIsSwiping(false);\n setIsRealSwipe(false);\n setLockedDirection(null);\n const resolvedInitialTransform = initialTransformRef.current;\n if (event.type === 'pointercancel' || cancelledSwipeRef.current) {\n setResolvedDragOffset({\n x: resolvedInitialTransform.x,\n y: resolvedInitialTransform.y\n });\n setCurrentSwipeDirection(undefined);\n return;\n }\n let shouldClose = false;\n const resolvedDragOffset = dragOffsetRef.current;\n const deltaX = resolvedDragOffset.x - resolvedInitialTransform.x;\n const deltaY = resolvedDragOffset.y - resolvedInitialTransform.y;\n let dismissDirection;\n for (const direction of swipeDirections) {\n switch (direction) {\n case 'right':\n if (deltaX > SWIPE_THRESHOLD) {\n shouldClose = true;\n dismissDirection = 'right';\n }\n break;\n case 'left':\n if (deltaX < -SWIPE_THRESHOLD) {\n shouldClose = true;\n dismissDirection = 'left';\n }\n break;\n case 'down':\n if (deltaY > SWIPE_THRESHOLD) {\n shouldClose = true;\n dismissDirection = 'down';\n }\n break;\n case 'up':\n if (deltaY < -SWIPE_THRESHOLD) {\n shouldClose = true;\n dismissDirection = 'up';\n }\n break;\n default:\n break;\n }\n if (shouldClose) {\n break;\n }\n }\n if (shouldClose) {\n setCurrentSwipeDirection(dismissDirection);\n setDragDismissed(true);\n store.closeToast(toast.id);\n } else {\n setResolvedDragOffset({\n x: resolvedInitialTransform.x,\n y: resolvedInitialTransform.y\n });\n setCurrentSwipeDirection(undefined);\n }\n });\n function handlePointerDown(event) {\n if (event.button !== 0) {\n return;\n }\n if (event.pointerType === 'touch') {\n store.pauseTimers();\n }\n const target = getTarget(event.nativeEvent);\n const isInteractiveElement = target ? target.closest(`button,a,input,textarea,[role=\"button\"],${TOAST_SWIPE_IGNORE_SELECTOR}`) : false;\n if (isInteractiveElement) {\n return;\n }\n cancelledSwipeRef.current = false;\n intendedSwipeDirectionRef.current = undefined;\n maxSwipeDisplacementRef.current = 0;\n activePointerIdRef.current = event.pointerId;\n dragStartPosRef.current = {\n x: event.clientX,\n y: event.clientY\n };\n swipeCancelBaselineRef.current = dragStartPosRef.current;\n if (rootRef.current) {\n const transform = getElementTransform(rootRef.current);\n initialTransformRef.current = transform;\n setInitialTransform(transform);\n setResolvedDragOffset({\n x: transform.x,\n y: transform.y\n });\n }\n store.setHovering(true);\n setIsSwiping(true);\n setIsRealSwipe(false);\n setLockedDirection(null);\n isFirstPointerMoveRef.current = true;\n const element = rootRef.current;\n if (element) {\n dragAbortControllerRef.current?.abort();\n const dragAbortController = new AbortController();\n dragAbortControllerRef.current = dragAbortController;\n const doc = ownerDocument(element);\n doc.addEventListener('pointerup', handleSwipeEnd, {\n signal: dragAbortController.signal\n });\n doc.addEventListener('pointercancel', handleSwipeEnd, {\n signal: dragAbortController.signal\n });\n element.setPointerCapture?.(event.pointerId);\n }\n }\n function handlePointerMove(event) {\n if (event.pointerId !== activePointerIdRef.current) {\n return;\n }\n\n // Prevent text selection on Safari\n event.preventDefault();\n if (isFirstPointerMoveRef.current) {\n // Adjust the starting position to the current position on the first move\n // to account for the delay between pointerdown and the first pointermove on iOS.\n dragStartPosRef.current = {\n x: event.clientX,\n y: event.clientY\n };\n isFirstPointerMoveRef.current = false;\n }\n const {\n clientY,\n clientX,\n movementX,\n movementY\n } = event;\n if (movementY < 0 && clientY > swipeCancelBaselineRef.current.y || movementY > 0 && clientY < swipeCancelBaselineRef.current.y) {\n swipeCancelBaselineRef.current = {\n x: swipeCancelBaselineRef.current.x,\n y: clientY\n };\n }\n if (movementX < 0 && clientX > swipeCancelBaselineRef.current.x || movementX > 0 && clientX < swipeCancelBaselineRef.current.x) {\n swipeCancelBaselineRef.current = {\n x: clientX,\n y: swipeCancelBaselineRef.current.y\n };\n }\n const deltaX = clientX - dragStartPosRef.current.x;\n const deltaY = clientY - dragStartPosRef.current.y;\n const cancelDeltaY = clientY - swipeCancelBaselineRef.current.y;\n const cancelDeltaX = clientX - swipeCancelBaselineRef.current.x;\n if (!isRealSwipe) {\n const movementDistance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n if (movementDistance >= MIN_DRAG_THRESHOLD) {\n setIsRealSwipe(true);\n if (lockedDirection === null) {\n const hasHorizontal = swipeDirections.includes('left') || swipeDirections.includes('right');\n const hasVertical = swipeDirections.includes('up') || swipeDirections.includes('down');\n if (hasHorizontal && hasVertical) {\n const absX = Math.abs(deltaX);\n const absY = Math.abs(deltaY);\n setLockedDirection(absX > absY ? 'horizontal' : 'vertical');\n }\n }\n }\n }\n let candidate;\n if (!intendedSwipeDirectionRef.current) {\n if (lockedDirection === 'vertical') {\n if (deltaY > 0) {\n candidate = 'down';\n } else if (deltaY < 0) {\n candidate = 'up';\n }\n } else if (lockedDirection === 'horizontal') {\n if (deltaX > 0) {\n candidate = 'right';\n } else if (deltaX < 0) {\n candidate = 'left';\n }\n } else if (Math.abs(deltaX) >= Math.abs(deltaY)) {\n candidate = deltaX > 0 ? 'right' : 'left';\n } else {\n candidate = deltaY > 0 ? 'down' : 'up';\n }\n if (candidate && swipeDirections.includes(candidate)) {\n intendedSwipeDirectionRef.current = candidate;\n maxSwipeDisplacementRef.current = getDisplacement(candidate, deltaX, deltaY);\n setCurrentSwipeDirection(candidate);\n }\n } else {\n const direction = intendedSwipeDirectionRef.current;\n const currentDisplacement = getDisplacement(direction, cancelDeltaX, cancelDeltaY);\n if (currentDisplacement > SWIPE_THRESHOLD) {\n cancelledSwipeRef.current = false;\n setCurrentSwipeDirection(direction);\n } else if (!(swipeDirections.includes('left') && swipeDirections.includes('right')) && !(swipeDirections.includes('up') && swipeDirections.includes('down')) && maxSwipeDisplacementRef.current - currentDisplacement >= REVERSE_CANCEL_THRESHOLD) {\n // Mark that a change-of-mind has occurred\n cancelledSwipeRef.current = true;\n }\n }\n const dampedDelta = applyDirectionalDamping(deltaX, deltaY);\n let newOffsetX = initialTransformRef.current.x;\n let newOffsetY = initialTransformRef.current.y;\n if (lockedDirection === 'horizontal') {\n if (swipeDirections.includes('left') || swipeDirections.includes('right')) {\n newOffsetX += dampedDelta.x;\n }\n } else if (lockedDirection === 'vertical') {\n if (swipeDirections.includes('up') || swipeDirections.includes('down')) {\n newOffsetY += dampedDelta.y;\n }\n } else {\n if (swipeDirections.includes('left') || swipeDirections.includes('right')) {\n newOffsetX += dampedDelta.x;\n }\n if (swipeDirections.includes('up') || swipeDirections.includes('down')) {\n newOffsetY += dampedDelta.y;\n }\n }\n setResolvedDragOffset({\n x: newOffsetX,\n y: newOffsetY\n });\n }\n function handleKeyDown(event) {\n if (event.key === 'Escape') {\n if (!rootRef.current || !contains(rootRef.current, activeElement(ownerDocument(rootRef.current)))) {\n return;\n }\n store.closeToast(toast.id);\n }\n }\n React.useEffect(() => {\n if (!swipeEnabled) {\n return undefined;\n }\n const element = rootRef.current;\n if (!element) {\n return undefined;\n }\n function preventDefaultTouchStart(event) {\n if (contains(element, getTarget(event))) {\n event.preventDefault();\n }\n }\n return addEventListener(element, 'touchmove', preventDefaultTouchStart, {\n passive: false\n });\n }, [swipeEnabled]);\n function getDragStyles() {\n if (!isSwiping && dragOffset.x === initialTransform.x && dragOffset.y === initialTransform.y && !dragDismissed) {\n return {\n [ToastRootCssVars.swipeMovementX]: '0px',\n [ToastRootCssVars.swipeMovementY]: '0px'\n };\n }\n const deltaX = dragOffset.x - initialTransform.x;\n const deltaY = dragOffset.y - initialTransform.y;\n return {\n transition: isSwiping ? 'none' : undefined,\n // While swiping, freeze the element at its current visual transform so it doesn't snap to the\n // end position.\n transform: isSwiping ? `translateX(${dragOffset.x}px) translateY(${dragOffset.y}px) scale(${initialTransform.scale})` : undefined,\n [ToastRootCssVars.swipeMovementX]: `${deltaX}px`,\n [ToastRootCssVars.swipeMovementY]: `${deltaY}px`\n };\n }\n const isHighPriority = toast.priority === 'high';\n const defaultProps = {\n role: isHighPriority ? 'alertdialog' : 'dialog',\n tabIndex: 0,\n 'aria-modal': false,\n 'aria-labelledby': titleId,\n 'aria-describedby': descriptionId,\n 'aria-hidden': isHighPriority && !focused ? true : undefined,\n onPointerDown: swipeEnabled ? handlePointerDown : undefined,\n onPointerMove: swipeEnabled ? handlePointerMove : undefined,\n onPointerUp: swipeEnabled ? handleSwipeEnd : undefined,\n onPointerCancel: swipeEnabled ? handleSwipeEnd : undefined,\n onKeyDown: handleKeyDown,\n inert: inertValue(toast.limited),\n style: {\n ...getDragStyles(),\n [ToastRootCssVars.index]: toast.transitionStatus === 'ending' ? domIndex : visibleIndex,\n [ToastRootCssVars.offsetY]: `${offsetY}px`,\n [ToastRootCssVars.height]: toast.height ? `${toast.height}px` : undefined\n }\n };\n const toastRoot = React.useMemo(() => ({\n rootRef,\n toast,\n titleId,\n setTitleId,\n descriptionId,\n setDescriptionId,\n swiping: isSwiping,\n swipeDirection: currentSwipeDirection,\n recalculateHeight,\n index: domIndex,\n visibleIndex,\n expanded\n }), [toast, titleId, descriptionId, isSwiping, currentSwipeDirection, recalculateHeight, domIndex, visibleIndex, expanded]);\n const state = {\n transitionStatus: toast.transitionStatus,\n expanded,\n limited: toast.limited || false,\n type: toast.type,\n swiping: toastRoot.swiping,\n swipeDirection: toastRoot.swipeDirection\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, toastRoot.rootRef],\n state,\n stateAttributesMapping,\n props: [defaultProps, elementProps]\n });\n return /*#__PURE__*/_jsx(ToastRootContext.Provider, {\n value: toastRoot,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") ToastRoot.displayName = \"ToastRoot\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useToastRootContext } from \"../root/ToastRootContext.js\";\nimport { useRenderElement } from \"../../internals/useRenderElement.js\";\n\n/**\n * A container for the contents of a toast.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastContent = /*#__PURE__*/React.forwardRef(function ToastContent(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const {\n visibleIndex,\n expanded,\n recalculateHeight\n } = useToastRootContext();\n const contentRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n const node = contentRef.current;\n if (!node) {\n return undefined;\n }\n recalculateHeight();\n if (typeof ResizeObserver !== 'function' || typeof MutationObserver !== 'function') {\n return undefined;\n }\n const resizeObserver = new ResizeObserver(() => recalculateHeight(true));\n const mutationObserver = new MutationObserver(() => recalculateHeight(true));\n resizeObserver.observe(node);\n mutationObserver.observe(node, {\n childList: true,\n subtree: true,\n characterData: true\n });\n return () => {\n resizeObserver.disconnect();\n mutationObserver.disconnect();\n };\n }, [recalculateHeight]);\n const behind = visibleIndex > 0;\n const state = {\n expanded,\n behind\n };\n const element = useRenderElement('div', componentProps, {\n ref: [forwardedRef, contentRef],\n state,\n props: elementProps\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ToastContent.displayName = \"ToastContent\";","'use client';\n\nimport * as React from 'react';\nimport { useId } from '@base-ui/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useToastRootContext } from \"../root/ToastRootContext.js\";\nimport { useRenderElement } from \"../../internals/useRenderElement.js\";\n\n/**\n * A description that describes the toast.\n * Can be used as the default message for the toast when no title is provided.\n * Renders a `<p>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastDescription = /*#__PURE__*/React.forwardRef(function ToastDescription(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n children: childrenProp,\n ...elementProps\n } = componentProps;\n const {\n toast,\n setDescriptionId\n } = useToastRootContext();\n const children = childrenProp ?? toast.description;\n const shouldRender = Boolean(children);\n const id = useId(idProp);\n useIsoLayoutEffect(() => {\n if (!shouldRender) {\n return undefined;\n }\n setDescriptionId(id);\n return () => {\n setDescriptionId(undefined);\n };\n }, [shouldRender, id, setDescriptionId]);\n const state = {\n type: toast.type\n };\n const element = useRenderElement('p', componentProps, {\n ref: forwardedRef,\n state,\n props: {\n ...elementProps,\n id,\n children\n }\n });\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ToastDescription.displayName = \"ToastDescription\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useId } from '@base-ui/utils/useId';\nimport { useToastRootContext } from \"../root/ToastRootContext.js\";\nimport { useRenderElement } from \"../../internals/useRenderElement.js\";\n\n/**\n * A title that labels the toast.\n * Renders an `<h2>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastTitle = /*#__PURE__*/React.forwardRef(function ToastTitle(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n children: childrenProp,\n ...elementProps\n } = componentProps;\n const {\n toast,\n setTitleId\n } = useToastRootContext();\n const children = childrenProp ?? toast.title;\n const shouldRender = Boolean(children);\n const id = useId(idProp);\n useIsoLayoutEffect(() => {\n if (!shouldRender) {\n return undefined;\n }\n setTitleId(id);\n return () => {\n setTitleId(undefined);\n };\n }, [shouldRender, id, setTitleId]);\n const state = {\n type: toast.type\n };\n const element = useRenderElement('h2', componentProps, {\n ref: forwardedRef,\n state,\n props: {\n ...elementProps,\n id,\n children\n }\n });\n if (!shouldRender) {\n return null;\n }\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ToastTitle.displayName = \"ToastTitle\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const CompositeRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") CompositeRootContext.displayName = \"CompositeRootContext\";\nexport function useCompositeRootContext(optional = false) {\n const context = React.useContext(CompositeRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.' : _formatErrorMessage(16));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nexport function useFocusableWhenDisabled(parameters) {\n const {\n focusableWhenDisabled,\n disabled,\n composite = false,\n tabIndex: tabIndexProp = 0,\n isNativeButton\n } = parameters;\n const isFocusableComposite = composite && focusableWhenDisabled !== false;\n const isNonFocusableComposite = composite && focusableWhenDisabled === false;\n\n // we can't explicitly assign `undefined` to any of these props because it\n // would otherwise prevent subsequently merged props from setting them\n const props = React.useMemo(() => {\n const additionalProps = {\n // allow Tabbing away from focusableWhenDisabled elements\n onKeyDown(event) {\n if (disabled && focusableWhenDisabled && event.key !== 'Tab') {\n event.preventDefault();\n }\n }\n };\n if (!composite) {\n additionalProps.tabIndex = tabIndexProp;\n if (!isNativeButton && disabled) {\n additionalProps.tabIndex = focusableWhenDisabled ? tabIndexProp : -1;\n }\n }\n if (isNativeButton && (focusableWhenDisabled || isFocusableComposite) || !isNativeButton && disabled) {\n additionalProps['aria-disabled'] = disabled;\n }\n if (isNativeButton && (!focusableWhenDisabled || isNonFocusableComposite)) {\n additionalProps.disabled = disabled;\n }\n return additionalProps;\n }, [composite, disabled, focusableWhenDisabled, isFocusableComposite, isNonFocusableComposite, isNativeButton, tabIndexProp]);\n return {\n props\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { error } from '@base-ui/utils/error';\nimport { SafeReact } from '@base-ui/utils/safeReact';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { makeEventPreventable, mergeProps } from \"../../merge-props/index.js\";\nimport { useCompositeRootContext } from \"../composite/root/CompositeRootContext.js\";\nimport { useFocusableWhenDisabled } from \"../../utils/useFocusableWhenDisabled.js\";\nexport function useButton(parameters = {}) {\n const {\n disabled = false,\n focusableWhenDisabled,\n tabIndex = 0,\n native: isNativeButton = true,\n composite: compositeProp\n } = parameters;\n const elementRef = React.useRef(null);\n const compositeRootContext = useCompositeRootContext(true);\n const isCompositeItem = compositeProp ?? compositeRootContext !== undefined;\n const {\n props: focusableWhenDisabledProps\n } = useFocusableWhenDisabled({\n focusableWhenDisabled,\n disabled,\n composite: isCompositeItem,\n tabIndex,\n isNativeButton\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (!elementRef.current) {\n return;\n }\n const isButtonTag = isButtonElement(elementRef.current);\n if (isNativeButton) {\n if (!isButtonTag) {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = 'A component that acts as a button expected a native <button> because the ' + '`nativeButton` prop is true. Rendering a non-<button> removes native button ' + 'semantics, which can impact forms and accessibility. Use a real <button> in the ' + '`render` prop, or set `nativeButton` to `false`.';\n error(`${message}${ownerStackMessage}`);\n }\n } else if (isButtonTag) {\n const ownerStackMessage = SafeReact.captureOwnerStack?.() || '';\n const message = 'A component that acts as a button expected a non-<button> because the `nativeButton` ' + 'prop is false. Rendering a <button> keeps native behavior while Base UI applies ' + 'non-native attributes and handlers, which can add unintended extra attributes (such ' + 'as `role` or `aria-disabled`). Use a non-<button> in the `render` prop, or set ' + '`nativeButton` to `true`.';\n error(`${message}${ownerStackMessage}`);\n }\n }, [isNativeButton]);\n }\n\n // handles a disabled composite button rendering another button, e.g.\n // <Toolbar.Button disabled render={<Menu.Trigger />} />\n // the `disabled` prop needs to pass through 2 `useButton`s then finally\n // delete the `disabled` attribute from DOM\n const updateDisabled = React.useCallback(() => {\n const element = elementRef.current;\n if (!isButtonElement(element)) {\n return;\n }\n if (isCompositeItem && disabled && focusableWhenDisabledProps.disabled === undefined && element.disabled) {\n element.disabled = false;\n }\n }, [disabled, focusableWhenDisabledProps.disabled, isCompositeItem]);\n useIsoLayoutEffect(updateDisabled, [updateDisabled]);\n const getButtonProps = React.useCallback((externalProps = {}) => {\n const {\n onClick: externalOnClick,\n onMouseDown: externalOnMouseDown,\n onKeyUp: externalOnKeyUp,\n onKeyDown: externalOnKeyDown,\n onPointerDown: externalOnPointerDown,\n ...otherExternalProps\n } = externalProps;\n return mergeProps({\n onClick(event) {\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnClick?.(event);\n },\n onMouseDown(event) {\n if (!disabled) {\n externalOnMouseDown?.(event);\n }\n },\n onKeyDown(event) {\n if (disabled) {\n return;\n }\n makeEventPreventable(event);\n externalOnKeyDown?.(event);\n if (event.baseUIHandlerPrevented) {\n return;\n }\n const isCurrentTarget = event.target === event.currentTarget;\n const currentTarget = event.currentTarget;\n const isButton = isButtonElement(currentTarget);\n const isLink = !isNativeButton && isValidLinkElement(currentTarget);\n const shouldClick = isCurrentTarget && (isNativeButton ? isButton : !isLink);\n const isEnterKey = event.key === 'Enter';\n const isSpaceKey = event.key === ' ';\n const role = currentTarget.getAttribute('role');\n const isTextNavigationRole = role?.startsWith('menuitem') || role === 'option' || role === 'gridcell';\n if (isCurrentTarget && isCompositeItem && isSpaceKey) {\n if (event.defaultPrevented && isTextNavigationRole) {\n return;\n }\n event.preventDefault();\n if (isLink || isNativeButton && isButton) {\n currentTarget.click();\n event.preventBaseUIHandler();\n } else if (shouldClick) {\n externalOnClick?.(event);\n event.preventBaseUIHandler();\n }\n return;\n }\n\n // Keyboard accessibility for native and non-native elements.\n if (shouldClick) {\n if (!isNativeButton && (isSpaceKey || isEnterKey)) {\n event.preventDefault();\n }\n if (!isNativeButton && isEnterKey) {\n externalOnClick?.(event);\n }\n }\n },\n onKeyUp(event) {\n if (disabled) {\n return;\n }\n\n // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n // https://codesandbox.io/p/sandbox/button-keyup-preventdefault-dn7f0\n makeEventPreventable(event);\n externalOnKeyUp?.(event);\n if (event.target === event.currentTarget && isNativeButton && isCompositeItem && isButtonElement(event.currentTarget) && event.key === ' ') {\n event.preventDefault();\n return;\n }\n if (event.baseUIHandlerPrevented) {\n return;\n }\n\n // Keyboard accessibility for non interactive elements\n if (event.target === event.currentTarget && !isNativeButton && !isCompositeItem && event.key === ' ') {\n externalOnClick?.(event);\n }\n },\n onPointerDown(event) {\n if (disabled) {\n event.preventDefault();\n return;\n }\n externalOnPointerDown?.(event);\n }\n }, isNativeButton ? {\n type: 'button'\n } : {\n role: 'button'\n }, focusableWhenDisabledProps, otherExternalProps);\n }, [disabled, focusableWhenDisabledProps, isCompositeItem, isNativeButton]);\n const buttonRef = useStableCallback(element => {\n elementRef.current = element;\n updateDisabled();\n });\n return {\n getButtonProps,\n buttonRef\n };\n}\nfunction isButtonElement(elem) {\n return isHTMLElement(elem) && elem.tagName === 'BUTTON';\n}\nfunction isValidLinkElement(elem) {\n return Boolean(elem?.tagName === 'A' && elem?.href);\n}","'use client';\n\nimport * as React from 'react';\nimport { useToastRootContext } from \"../root/ToastRootContext.js\";\nimport { useToastProviderContext } from \"../provider/ToastProviderContext.js\";\nimport { useButton } from \"../../internals/use-button/useButton.js\";\nimport { useRenderElement } from \"../../internals/useRenderElement.js\";\n\n/**\n * Closes the toast when clicked.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastClose = /*#__PURE__*/React.forwardRef(function ToastClose(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n disabled,\n nativeButton = true,\n ...elementProps\n } = componentProps;\n const store = useToastProviderContext();\n const {\n toast\n } = useToastRootContext();\n const expanded = store.useState('expanded');\n const [hasFocus, setHasFocus] = React.useState(false);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const state = {\n type: toast.type\n };\n const element = useRenderElement('button', componentProps, {\n ref: [forwardedRef, buttonRef],\n state,\n props: [{\n 'aria-hidden': !expanded && !hasFocus,\n onClick() {\n store.closeToast(toast.id);\n },\n onFocus() {\n setHasFocus(true);\n },\n onBlur() {\n setHasFocus(false);\n }\n }, elementProps, getButtonProps]\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") ToastClose.displayName = \"ToastClose\";","export function createAttribute(name) {\n return `data-base-ui-${name}`;\n}","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { isNode } from '@floating-ui/utils/dom';\nimport { addEventListener } from '@base-ui/utils/addEventListener';\nimport { mergeCleanups } from '@base-ui/utils/mergeCleanups';\nimport { useId } from '@base-ui/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { FocusGuard } from \"../../utils/FocusGuard.js\";\nimport { enableFocusInside, disableFocusInside, getPreviousTabbable, getNextTabbable, isOutsideEvent } from \"../utils/tabbable.js\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../internals/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nimport { useRenderElement } from \"../../internals/useRenderElement.js\";\nimport { ownerVisuallyHidden } from \"../../internals/constants.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") PortalContext.displayName = \"PortalContext\";\nexport const usePortalContext = () => React.useContext(PortalContext);\nconst attr = createAttribute('portal');\nexport function useFloatingPortalNode(props = {}) {\n const {\n ref,\n container: containerProp,\n componentProps = EMPTY_OBJECT,\n elementProps\n } = props;\n const uniqueId = useId();\n const portalContext = usePortalContext();\n const parentPortalNode = portalContext?.portalNode;\n const [containerElement, setContainerElement] = React.useState(null);\n const [portalNode, setPortalNode] = React.useState(null);\n const setPortalNodeRef = useStableCallback(node => {\n if (node !== null) {\n // the useIsoLayoutEffect below watching containerProp / parentPortalNode\n // sets setPortalNode(null) when the container becomes null or changes.\n // So even though the ref callback now ignores null, the portal node still gets cleared.\n setPortalNode(node);\n }\n });\n const containerRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n // Wait for the container to be resolved if explicitly `null`.\n if (containerProp === null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n\n // React 17 does not use React.useId().\n if (uniqueId == null) {\n return;\n }\n const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;\n if (resolvedContainer == null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n if (containerRef.current !== resolvedContainer) {\n containerRef.current = resolvedContainer;\n setPortalNode(null);\n setContainerElement(resolvedContainer);\n }\n }, [containerProp, parentPortalNode, uniqueId]);\n const portalElement = useRenderElement('div', componentProps, {\n ref: [ref, setPortalNodeRef],\n props: [{\n id: uniqueId,\n [attr]: ''\n }, elementProps]\n });\n\n // This `createPortal` call injects `portalElement` into the `container`.\n // Another call inside `FloatingPortal`/`FloatingPortalLite` then injects the children into `portalElement`.\n const portalSubtree = containerElement && portalElement ? /*#__PURE__*/ReactDOM.createPortal(portalElement, containerElement) : null;\n return {\n portalNode,\n portalSubtree\n };\n}\n\n/**\n * Portals the floating element into a given container element — by default,\n * outside of the app root and into the body.\n * This is necessary to ensure the floating element can appear outside any\n * potential parent containers that cause clipping (such as `overflow: hidden`),\n * while retaining its location in the React tree.\n * @see https://floating-ui.com/docs/FloatingPortal\n * @internal\n */\nexport const FloatingPortal = /*#__PURE__*/React.forwardRef(function FloatingPortal(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n children,\n container,\n renderGuards,\n ...elementProps\n } = componentProps;\n const {\n portalNode,\n portalSubtree\n } = useFloatingPortalNode({\n container,\n ref: forwardedRef,\n componentProps,\n elementProps\n });\n const beforeOutsideRef = React.useRef(null);\n const afterOutsideRef = React.useRef(null);\n const beforeInsideRef = React.useRef(null);\n const afterInsideRef = React.useRef(null);\n const [focusManagerState, setFocusManagerState] = React.useState(null);\n const focusInsideDisabledRef = React.useRef(false);\n const modal = focusManagerState?.modal;\n const open = focusManagerState?.open;\n const shouldRenderGuards = typeof renderGuards === 'boolean' ? renderGuards : !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;\n\n // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n React.useEffect(() => {\n if (!portalNode || modal) {\n return undefined;\n }\n\n // Make sure elements inside the portal element are tabbable only when the\n // portal has already been focused, either by tabbing into a focus trap\n // element outside or using the mouse.\n function onFocus(event) {\n if (portalNode && event.relatedTarget && isOutsideEvent(event)) {\n if (event.type === 'focusin') {\n if (focusInsideDisabledRef.current) {\n enableFocusInside(portalNode);\n focusInsideDisabledRef.current = false;\n }\n } else {\n disableFocusInside(portalNode);\n focusInsideDisabledRef.current = true;\n }\n }\n }\n\n // Listen to the event on the capture phase so they run before the focus\n // trap elements onFocus prop is called.\n return mergeCleanups(addEventListener(portalNode, 'focusin', onFocus, true), addEventListener(portalNode, 'focusout', onFocus, true));\n }, [portalNode, modal]);\n React.useEffect(() => {\n if (!portalNode || open !== false) {\n return;\n }\n enableFocusInside(portalNode);\n focusInsideDisabledRef.current = false;\n }, [open, portalNode]);\n const portalContextValue = React.useMemo(() => ({\n beforeOutsideRef,\n afterOutsideRef,\n beforeInsideRef,\n afterInsideRef,\n portalNode,\n setFocusManagerState\n }), [portalNode]);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [portalSubtree, /*#__PURE__*/_jsxs(PortalContext.Provider, {\n value: portalContextValue,\n children: [shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: beforeOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n beforeInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n }\n }\n }), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(\"span\", {\n \"aria-owns\": portalNode.id,\n style: ownerVisuallyHidden\n }), portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: afterOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n afterInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n if (focusManagerState?.closeOnFocusOut) {\n focusManagerState?.onOpenChange(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));\n }\n }\n }\n })]\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") FloatingPortal.displayName = \"FloatingPortal\";","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { useFloatingPortalNode } from \"../floating-ui-react/index.js\";\n\n/**\n * `FloatingPortal` includes tabbable logic handling for focus management.\n * For components that don't need tabbable logic, use `FloatingPortalLite`.\n * @internal\n */\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const FloatingPortalLite = /*#__PURE__*/React.forwardRef(function FloatingPortalLite(componentProps, forwardedRef) {\n const {\n children,\n container,\n className,\n render,\n style,\n ...elementProps\n } = componentProps;\n const {\n portalNode,\n portalSubtree\n } = useFloatingPortalNode({\n container,\n ref: forwardedRef,\n componentProps,\n elementProps\n });\n if (!portalSubtree && !portalNode) {\n return null;\n }\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [portalSubtree, portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode)]\n });\n});\nif (process.env.NODE_ENV !== \"production\") FloatingPortalLite.displayName = \"FloatingPortalLite\";","'use client';\n\nimport { FloatingPortalLite } from \"../../utils/FloatingPortalLite.js\";\n\n/**\n * A portal element that moves the viewport to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Toast](https://base-ui.com/react/components/toast)\n */\nexport const ToastPortal = FloatingPortalLite;","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { ToastContext } from \"./provider/ToastProviderContext.js\";\n/**\n * Returns the array of toasts and methods to manage them.\n */\nexport function useToastManager() {\n const store = React.useContext(ToastContext);\n if (!store) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: useToastManager must be used within <Toast.Provider>.' : _formatErrorMessage(73));\n }\n const toasts = store.useState('toasts');\n return React.useMemo(() => ({\n toasts,\n add: store.addToast,\n close: store.closeToast,\n update: store.updateToast,\n promise: store.promiseToast\n }), [toasts, store]);\n}","import { RefObject, useEffect, useState } from \"react\";\n\nexport const useHover = (ref: RefObject<HTMLElement>) => {\n const [hovered, setHovered] = useState(false);\n const enter = () => setHovered(true);\n const leave = () => setHovered(false);\n\n useEffect(() => {\n const el = ref.current; // cache external ref value for use in cleanup\n if (el) {\n el.addEventListener(\"mouseenter\", enter);\n el.addEventListener(\"mouseleave\", leave);\n return () => {\n el.removeEventListener(\"mouseenter\", enter);\n el.removeEventListener(\"mouseleave\", leave);\n };\n }\n }, [ref]);\n return hovered;\n};\n","\"use client\";\nimport { Toast as Base } from \"@base-ui/react/toast\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { XIcon, CheckCircleIcon, WarningIcon, InfoIcon, CircleNotchIcon } from \"@phosphor-icons/react\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport { createContext, type PropsWithChildren, useCallback, useContext, useRef } from \"react\";\nimport { useHover } from \"../../hooks/use-hover\";\nimport { css } from \"../../lib/dom\";\nimport { Label } from \"../../types\";\n\nconst variants = cva(\n \"shadow-notification text-typography-sm relative isolate z-tooltip flex w-full flex-col overflow-hidden rounded-notification-radius border bg-card-background backdrop-blur-md transition-all duration-300\",\n {\n variants: {\n theme: {\n default: \"border-card-border text-foreground shadow-black/5\",\n info: \"border-alert-info-border bg-alert-info-bg text-alert-info-text\",\n warn: \"border-alert-warn-border bg-alert-warn-bg text-alert-warn-text\",\n muted: \"border-alert-muted-border bg-alert-muted-bg text-alert-muted-text\",\n danger: \"border-alert-danger-border bg-alert-danger-bg text-alert-danger-text\",\n success: \"border-alert-success-border bg-alert-success-bg text-alert-success-text\",\n secondary: \"border-alert-secondary-border bg-alert-secondary-bg text-alert-secondary-text\",\n },\n },\n defaultVariants: { theme: \"default\" },\n }\n);\n\nconst themeIcons = {\n default: InfoIcon,\n info: InfoIcon,\n warn: WarningIcon,\n muted: InfoIcon,\n danger: WarningIcon,\n success: CheckCircleIcon,\n secondary: InfoIcon,\n};\n\ntype NotificationOptions = Partial<{\n id: string;\n title: Label;\n timeout: number;\n closable: boolean;\n loading: boolean;\n theme: VariantProps<typeof variants>[\"theme\"];\n}>;\n\ntype NotificationData = {\n theme?: NotificationOptions[\"theme\"];\n closable?: boolean;\n loading?: boolean;\n};\n\ntype NotificationSubscriber = { close: () => void; clear: () => void };\n\ntype ContextFunction = (description: Label, args?: NotificationOptions) => NotificationSubscriber;\n\nconst NotificationContext = createContext<ContextFunction>(() => {\n throw new Error(\"Not implemented\");\n});\n\nexport const useNotification = () => useContext(NotificationContext);\n\ntype NotificationItemProps = {\n toast: Base.Root.ToastObject<NotificationData>;\n};\n\nfunction Notification(props: NotificationItemProps) {\n const closable = props.toast.data?.closable ?? true;\n const loading = props.toast.data?.loading ?? false;\n const theme = props.toast.data?.theme || \"default\";\n const className = variants({ theme });\n const Icon = loading ? CircleNotchIcon : themeIcons[theme] || InfoIcon;\n\n return (\n <Base.Root toast={props.toast} swipeDirection=\"right\">\n <motion.li\n layout\n initial={{ opacity: 0, y: -20, scale: 0.95 }}\n animate={{ opacity: 1, y: 0, scale: 1 }}\n exit={{ opacity: 0, scale: 0.9, y: -20, transition: { duration: 0.2 } }}\n transition={{\n type: \"spring\",\n damping: 25,\n stiffness: 300,\n }}\n className=\"pointer-events-auto w-full list-none\"\n >\n <Base.Content className={className}>\n <div className=\"flex items-start gap-notification-gap p-notification-p\">\n <div className={css(\"mt-0.5 flex size-4 shrink-0 items-center justify-center opacity-80\", loading && \"animate-spin\")}>\n <Icon aria-hidden=\"true\" />\n </div>\n\n <div className=\"flex flex-1 flex-col gap-notification-inner-gap overflow-hidden\">\n {props.toast.title ? <Base.Title className=\"select-text truncate font-semibold leading-tight tracking-tight\" /> : null}\n <Base.Description className=\"text-typography-xs line-clamp-2 select-text font-medium leading-relaxed opacity-90\" />\n </div>\n\n {closable && !loading ? (\n <Base.Close className=\"-mr-1 -mt-1 shrink-0 rounded-notification-close-radius p-notification-close-p text-foreground/40 transition hover:bg-foreground/10 hover:text-foreground\">\n <span className=\"flex size-3.5 items-center justify-center\">\n <XIcon aria-hidden=\"true\" />\n </span>\n </Base.Close>\n ) : null}\n </div>\n </Base.Content>\n </motion.li>\n </Base.Root>\n );\n}\n\nexport type NotificationProps = Partial<{ max: number; timeout: number }>;\n\nfunction NotificationsViewport({ max = 5 }: NotificationProps) {\n const ref = useRef<HTMLDivElement>(null!);\n const hover = useHover(ref);\n const toastManager = Base.useToastManager();\n const allToasts = max ? toastManager.toasts.slice(0, max) : toastManager.toasts;\n const visibleToasts = hover ? allToasts : allToasts.slice(0, 3);\n const hiddenCount = allToasts.length - visibleToasts.length;\n\n return (\n <Base.Viewport\n ref={ref}\n className=\"pointer-events-none fixed left-1/2 top-notification-list-top z-floating flex w-full max-w-notification-list-max-w -translate-x-1/2 flex-col gap-notification-list-gap overflow-visible outline-none\"\n >\n <AnimatePresence mode=\"popLayout\" initial={false}>\n {visibleToasts.map((toast) => (\n <Notification key={toast.id} toast={toast} />\n ))}\n </AnimatePresence>\n\n {!hover && hiddenCount > 0 && (\n <motion.div\n layout\n initial={{ opacity: 0, y: -10 }}\n animate={{ opacity: 1, y: 0 }}\n exit={{ opacity: 0, y: -10 }}\n className=\"shadow-notification pointer-events-auto cursor-default self-center rounded-full border border-card-border bg-card-background/80 px-notification-badge-px py-notification-badge-py text-notification-badge-text font-bold uppercase tracking-wider text-foreground/50 backdrop-blur transition-all hover:bg-card-background hover:text-foreground/80\"\n >\n +{hiddenCount} more\n </motion.div>\n )}\n </Base.Viewport>\n );\n}\n\nfunction NotificationsInner({ children, max = 5 }: PropsWithChildren<NotificationProps>) {\n const toastManager = Base.useToastManager();\n\n const clear = useCallback(() => {\n toastManager.toasts.forEach((t) => toastManager.close(t.id));\n }, [toastManager]);\n\n const notify = useCallback(\n (description: Label, args?: NotificationOptions) => {\n const data = {\n theme: args?.theme,\n closable: args?.closable,\n loading: args?.loading,\n };\n\n if (args?.id) {\n const existing = toastManager.toasts.find((t) => t.id === args.id);\n if (existing) {\n toastManager.update(args.id, {\n description,\n title: args.title,\n timeout: args.timeout,\n data,\n });\n return { close: () => toastManager.close(args.id!), clear };\n }\n }\n\n const id = toastManager.add({\n description,\n id: args?.id,\n title: args?.title,\n timeout: args?.timeout,\n data,\n });\n\n return {\n close: () => toastManager.close(id),\n clear,\n };\n },\n [toastManager, clear]\n );\n\n return (\n <NotificationContext.Provider value={notify}>\n {children}\n <Base.Portal>\n <NotificationsViewport max={max} />\n </Base.Portal>\n </NotificationContext.Provider>\n );\n}\n\nexport function Notifications({ children, max = 5, timeout = 5000 }: PropsWithChildren<NotificationProps>) {\n return (\n <Base.Provider limit={max} timeout={timeout}>\n <NotificationsInner max={max}>{children}</NotificationsInner>\n </Base.Provider>\n );\n}\n"],"x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40],"mappings":";;;;;;;;;;;;;;;;;;;AACA,IAAM,oBAAoB,IAAI,IAAI;CAChC,CACE,QACgB,kBAAE,cAAc,EAAE,UAAU,MAAsB,kBAAE,cAAc,QAAQ,EAAE,GAAG,gNAAgN,CAAC,CAAC,CACnT;CACA,CACE,WACgB,kBAAE,cAAc,EAAE,UAAU,MAAsB,kBAAE,cAAc,QAAQ;EAAE,GAAG;EAAmD,SAAS;CAAM,CAAC,GAAmB,kBAAE,cAAc,QAAQ,EAAE,GAAG,iNAAiN,CAAC,CAAC,CACva;CACA,CACE,QACgB,kBAAE,cAAc,EAAE,UAAU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