@spark-ui/components 14.0.0-beta.1 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/dist/Button-B6rA3-e5.js +2 -0
  2. package/dist/{Button-C3xHNaGl.js.map → Button-B6rA3-e5.js.map} +1 -1
  3. package/dist/{Button-D32Avk2j.mjs → Button-C3C0aixy.mjs} +4 -4
  4. package/dist/{Button-D32Avk2j.mjs.map → Button-C3C0aixy.mjs.map} +1 -1
  5. package/dist/DialogContent.styles-BSfXHt21.mjs +61 -0
  6. package/dist/DialogContent.styles-BSfXHt21.mjs.map +1 -0
  7. package/dist/DialogContent.styles-bBs6l8Cy.js +2 -0
  8. package/dist/DialogContent.styles-bBs6l8Cy.js.map +1 -0
  9. package/dist/Icon-CF0W0LKr.js +2 -0
  10. package/dist/{Icon-Bf0XrmiR.js.map → Icon-CF0W0LKr.js.map} +1 -1
  11. package/dist/{Icon-D1RueiPY.mjs → Icon-Ck-dhfLd.mjs} +6 -6
  12. package/dist/{Icon-D1RueiPY.mjs.map → Icon-Ck-dhfLd.mjs.map} +1 -1
  13. package/dist/{IconButton-BY3gYXtU.mjs → IconButton-C62-axzv.mjs} +6 -6
  14. package/dist/{IconButton-BY3gYXtU.mjs.map → IconButton-C62-axzv.mjs.map} +1 -1
  15. package/dist/IconButton-D3g86WpZ.js +2 -0
  16. package/dist/{IconButton-Bf-EDzpI.js.map → IconButton-D3g86WpZ.js.map} +1 -1
  17. package/dist/Slot-D2Bbf8Gw.mjs +14 -0
  18. package/dist/{Slot-C98rL4yy.mjs.map → Slot-D2Bbf8Gw.mjs.map} +1 -1
  19. package/dist/Slot-DQ8z2zsy.js +2 -0
  20. package/dist/{Slot-ghrohQLA.js.map → Slot-DQ8z2zsy.js.map} +1 -1
  21. package/dist/Spinner-_Kffli3B.js +2 -0
  22. package/dist/{Spinner-DK8VEsaR.js.map → Spinner-_Kffli3B.js.map} +1 -1
  23. package/dist/{Spinner-CYL5kyzM.mjs → Spinner-jF3-zoh_.mjs} +3 -3
  24. package/dist/{Spinner-CYL5kyzM.mjs.map → Spinner-jF3-zoh_.mjs.map} +1 -1
  25. package/dist/{TextLink-3MEVs3No.mjs → TextLink-BuzFRWO6.mjs} +3 -3
  26. package/dist/{TextLink-3MEVs3No.mjs.map → TextLink-BuzFRWO6.mjs.map} +1 -1
  27. package/dist/TextLink-C3xDLsbC.js +2 -0
  28. package/dist/{TextLink-DD0VO37q.js.map → TextLink-C3xDLsbC.js.map} +1 -1
  29. package/dist/{VisuallyHidden-AoRh4WRK.js → VisuallyHidden-CB6Nx76j.js} +2 -2
  30. package/dist/{VisuallyHidden-AoRh4WRK.js.map → VisuallyHidden-CB6Nx76j.js.map} +1 -1
  31. package/dist/{VisuallyHidden-ByNP7ZUI.mjs → VisuallyHidden-KH1biLx-.mjs} +2 -2
  32. package/dist/{VisuallyHidden-ByNP7ZUI.mjs.map → VisuallyHidden-KH1biLx-.mjs.map} +1 -1
  33. package/dist/accordion/index.d.mts +15 -0
  34. package/dist/accordion/index.js +1 -1
  35. package/dist/accordion/index.js.map +1 -1
  36. package/dist/accordion/index.mjs +90 -608
  37. package/dist/accordion/index.mjs.map +1 -1
  38. package/dist/alert-dialog/AlertDialogPortal.d.ts +1 -1
  39. package/dist/alert-dialog/index.d.mts +38 -0
  40. package/dist/alert-dialog/index.js +1 -34
  41. package/dist/alert-dialog/index.js.map +1 -1
  42. package/dist/alert-dialog/index.mjs +139 -2475
  43. package/dist/alert-dialog/index.mjs.map +1 -1
  44. package/dist/avatar/index.d.mts +15 -0
  45. package/dist/avatar/index.js +1 -1
  46. package/dist/avatar/index.js.map +1 -1
  47. package/dist/avatar/index.mjs +4 -4
  48. package/dist/badge/index.d.mts +1 -0
  49. package/dist/badge/index.js +1 -1
  50. package/dist/badge/index.js.map +1 -1
  51. package/dist/badge/index.mjs +6 -6
  52. package/dist/breadcrumb/index.d.mts +12 -0
  53. package/dist/breadcrumb/index.js +1 -1
  54. package/dist/breadcrumb/index.js.map +1 -1
  55. package/dist/breadcrumb/index.mjs +21 -21
  56. package/dist/button/Button.d.ts +1 -1
  57. package/dist/button/index.d.mts +1 -0
  58. package/dist/button/index.js +1 -1
  59. package/dist/button/index.mjs +1 -1
  60. package/dist/button/variants/index.d.mts +5 -0
  61. package/dist/card/index.d.mts +8 -0
  62. package/dist/card/index.js +1 -1
  63. package/dist/card/index.js.map +1 -1
  64. package/dist/card/index.mjs +2 -2
  65. package/dist/carousel/index.d.mts +19 -0
  66. package/dist/carousel/index.js +1 -1
  67. package/dist/carousel/index.js.map +1 -1
  68. package/dist/carousel/index.mjs +3 -3
  69. package/dist/checkbox/index.d.mts +2 -0
  70. package/dist/checkbox/index.js +1 -1
  71. package/dist/checkbox/index.js.map +1 -1
  72. package/dist/checkbox/index.mjs +128 -364
  73. package/dist/checkbox/index.mjs.map +1 -1
  74. package/dist/chip/index.d.mts +15 -0
  75. package/dist/chip/index.js +1 -1
  76. package/dist/chip/index.js.map +1 -1
  77. package/dist/chip/index.mjs +196 -370
  78. package/dist/chip/index.mjs.map +1 -1
  79. package/dist/chip/variants/index.d.mts +3 -0
  80. package/dist/collapsible/index.d.mts +7 -0
  81. package/dist/collapsible/index.js +1 -1
  82. package/dist/collapsible/index.js.map +1 -1
  83. package/dist/collapsible/index.mjs +38 -213
  84. package/dist/collapsible/index.mjs.map +1 -1
  85. package/dist/combobox/index.d.mts +35 -0
  86. package/dist/combobox/index.js +1 -1
  87. package/dist/combobox/index.js.map +1 -1
  88. package/dist/combobox/index.mjs +7 -7
  89. package/dist/combobox/utils/index.d.mts +14 -0
  90. package/dist/dialog/Dialog.d.ts +13 -13
  91. package/dist/dialog/DialogClose.d.ts +9 -8
  92. package/dist/dialog/DialogContent.d.ts +4 -4
  93. package/dist/dialog/DialogDescription.d.ts +3 -3
  94. package/dist/dialog/DialogOverlay.d.ts +5 -5
  95. package/dist/dialog/DialogPortal.d.ts +4 -4
  96. package/dist/dialog/DialogTitle.d.ts +3 -3
  97. package/dist/dialog/DialogTrigger.d.ts +5 -9
  98. package/dist/dialog/index.d.mts +37 -0
  99. package/dist/dialog/index.js +1 -1
  100. package/dist/dialog/index.js.map +1 -1
  101. package/dist/dialog/index.mjs +149 -159
  102. package/dist/dialog/index.mjs.map +1 -1
  103. package/dist/divider/index.d.mts +6 -0
  104. package/dist/divider/index.js +1 -1
  105. package/dist/divider/index.js.map +1 -1
  106. package/dist/divider/index.mjs +58 -76
  107. package/dist/divider/index.mjs.map +1 -1
  108. package/dist/drawer/Drawer.d.ts +12 -19
  109. package/dist/drawer/DrawerClose.d.ts +9 -5
  110. package/dist/drawer/DrawerContent.d.ts +5 -5
  111. package/dist/drawer/DrawerDescription.d.ts +4 -4
  112. package/dist/drawer/DrawerOverlay.d.ts +5 -5
  113. package/dist/drawer/DrawerPortal.d.ts +4 -4
  114. package/dist/drawer/DrawerTitle.d.ts +5 -5
  115. package/dist/drawer/DrawerTrigger.d.ts +5 -5
  116. package/dist/drawer/index.d.mts +37 -0
  117. package/dist/drawer/index.d.ts +2 -0
  118. package/dist/drawer/index.js +1 -1
  119. package/dist/drawer/index.js.map +1 -1
  120. package/dist/drawer/index.mjs +143 -114
  121. package/dist/drawer/index.mjs.map +1 -1
  122. package/dist/drawer/useRenderSlot.d.ts +3 -0
  123. package/dist/dropdown/index.d.mts +29 -0
  124. package/dist/dropdown/index.js +1 -1
  125. package/dist/dropdown/index.js.map +1 -1
  126. package/dist/dropdown/index.mjs +5 -5
  127. package/dist/file-upload/index.d.mts +22 -0
  128. package/dist/file-upload/index.js +1 -1
  129. package/dist/file-upload/index.js.map +1 -1
  130. package/dist/file-upload/index.mjs +6 -6
  131. package/dist/form-field/index.d.mts +31 -0
  132. package/dist/form-field/index.js +1 -1
  133. package/dist/form-field/index.js.map +1 -1
  134. package/dist/form-field/index.mjs +47 -47
  135. package/dist/icon/index.d.mts +1 -0
  136. package/dist/icon/index.js +1 -1
  137. package/dist/icon/index.mjs +1 -1
  138. package/dist/icon-button/index.d.mts +1 -0
  139. package/dist/icon-button/index.js +1 -1
  140. package/dist/icon-button/index.mjs +1 -1
  141. package/dist/input/index.d.mts +21 -0
  142. package/dist/input/index.js +1 -1
  143. package/dist/input/index.js.map +1 -1
  144. package/dist/input/index.mjs +4 -4
  145. package/dist/input-otp/index.d.mts +14 -0
  146. package/dist/input-otp/index.js +1 -1
  147. package/dist/input-otp/index.js.map +1 -1
  148. package/dist/input-otp/index.mjs +139 -137
  149. package/dist/input-otp/index.mjs.map +1 -1
  150. package/dist/kbd/index.d.mts +1 -0
  151. package/dist/label/index.d.mts +7 -0
  152. package/dist/label/index.js +1 -1
  153. package/dist/label/index.js.map +1 -1
  154. package/dist/label/index.mjs +37 -2
  155. package/dist/label/index.mjs.map +1 -1
  156. package/dist/link-box/index.d.mts +9 -0
  157. package/dist/link-box/index.js +1 -1
  158. package/dist/link-box/index.js.map +1 -1
  159. package/dist/link-box/index.mjs +7 -7
  160. package/dist/pagination/index.d.mts +18 -0
  161. package/dist/pagination/index.js +1 -1
  162. package/dist/pagination/index.js.map +1 -1
  163. package/dist/pagination/index.mjs +126 -844
  164. package/dist/pagination/index.mjs.map +1 -1
  165. package/dist/popover/index.d.mts +17 -0
  166. package/dist/popover/index.js +1 -1
  167. package/dist/popover/index.js.map +1 -1
  168. package/dist/popover/index.mjs +119 -1748
  169. package/dist/popover/index.mjs.map +1 -1
  170. package/dist/portal/index.d.mts +1 -0
  171. package/dist/portal/index.js +1 -1
  172. package/dist/portal/index.js.map +1 -1
  173. package/dist/portal/index.mjs +3 -3
  174. package/dist/portal/index.mjs.map +1 -1
  175. package/dist/progress/index.d.mts +13 -0
  176. package/dist/progress/index.js +1 -6
  177. package/dist/progress/index.js.map +1 -1
  178. package/dist/progress/index.mjs +87 -162
  179. package/dist/progress/index.mjs.map +1 -1
  180. package/dist/progress-tracker/index.d.mts +10 -0
  181. package/dist/progress-tracker/index.js +1 -1
  182. package/dist/progress-tracker/index.js.map +1 -1
  183. package/dist/progress-tracker/index.mjs +14 -14
  184. package/dist/radio-group/index.d.mts +7 -0
  185. package/dist/radio-group/index.js +1 -1
  186. package/dist/radio-group/index.js.map +1 -1
  187. package/dist/radio-group/index.mjs +85 -312
  188. package/dist/radio-group/index.mjs.map +1 -1
  189. package/dist/rating/index.d.mts +1 -0
  190. package/dist/rating/index.js +1 -1
  191. package/dist/rating/index.js.map +1 -1
  192. package/dist/rating/index.mjs +11 -11
  193. package/dist/scrolling-list/index.d.mts +15 -0
  194. package/dist/scrolling-list/index.js +1 -1
  195. package/dist/scrolling-list/index.js.map +1 -1
  196. package/dist/scrolling-list/index.mjs +168 -333
  197. package/dist/scrolling-list/index.mjs.map +1 -1
  198. package/dist/segmented-gauge/index.d.mts +13 -0
  199. package/dist/segmented-gauge/index.js +1 -1
  200. package/dist/segmented-gauge/index.js.map +1 -1
  201. package/dist/segmented-gauge/index.mjs +1 -1
  202. package/dist/select/index.d.mts +21 -0
  203. package/dist/select/index.js +1 -1
  204. package/dist/select/index.js.map +1 -1
  205. package/dist/select/index.mjs +21 -21
  206. package/dist/skeleton/index.d.mts +8 -0
  207. package/dist/skeleton/index.js +1 -1
  208. package/dist/skeleton/index.js.map +1 -1
  209. package/dist/skeleton/index.mjs +2 -2
  210. package/dist/slider/Slider.d.ts +6 -1
  211. package/dist/slider/SliderContext.d.ts +4 -1
  212. package/dist/slider/index.d.mts +8 -0
  213. package/dist/slider/index.js +1 -1
  214. package/dist/slider/index.js.map +1 -1
  215. package/dist/slider/index.mjs +96 -496
  216. package/dist/slider/index.mjs.map +1 -1
  217. package/dist/slot/index.d.mts +1 -0
  218. package/dist/slot/index.js +1 -1
  219. package/dist/slot/index.mjs +1 -1
  220. package/dist/snackbar/index.d.mts +13 -0
  221. package/dist/snackbar/index.js +1 -1
  222. package/dist/snackbar/index.js.map +1 -1
  223. package/dist/snackbar/index.mjs +189 -1105
  224. package/dist/snackbar/index.mjs.map +1 -1
  225. package/dist/spinner/index.d.mts +1 -0
  226. package/dist/spinner/index.js +1 -1
  227. package/dist/spinner/index.mjs +1 -1
  228. package/dist/stepper/index.d.mts +9 -0
  229. package/dist/stepper/index.js +1 -7
  230. package/dist/stepper/index.js.map +1 -1
  231. package/dist/stepper/index.mjs +137 -2317
  232. package/dist/stepper/index.mjs.map +1 -1
  233. package/dist/switch/index.d.mts +1 -0
  234. package/dist/switch/index.js +1 -1
  235. package/dist/switch/index.js.map +1 -1
  236. package/dist/switch/index.mjs +85 -208
  237. package/dist/switch/index.mjs.map +1 -1
  238. package/dist/tabs/index.d.mts +13 -0
  239. package/dist/tabs/index.js +1 -1
  240. package/dist/tabs/index.js.map +1 -1
  241. package/dist/tabs/index.mjs +179 -329
  242. package/dist/tabs/index.mjs.map +1 -1
  243. package/dist/tag/index.d.mts +1 -0
  244. package/dist/tag/index.js +1 -1
  245. package/dist/tag/index.js.map +1 -1
  246. package/dist/tag/index.mjs +2 -2
  247. package/dist/tag/variants/index.d.mts +3 -0
  248. package/dist/text-link/index.d.mts +1 -0
  249. package/dist/text-link/index.js +1 -1
  250. package/dist/text-link/index.mjs +1 -1
  251. package/dist/textarea/index.d.mts +14 -0
  252. package/dist/textarea/index.js +1 -1
  253. package/dist/textarea/index.js.map +1 -1
  254. package/dist/textarea/index.mjs +6 -6
  255. package/dist/toast/index.d.mts +20 -0
  256. package/dist/toast/index.js +1 -1
  257. package/dist/toast/index.js.map +1 -1
  258. package/dist/toast/index.mjs +146 -1008
  259. package/dist/toast/index.mjs.map +1 -1
  260. package/dist/useRenderSlot-DATwjgpo.js +2 -0
  261. package/dist/useRenderSlot-DATwjgpo.js.map +1 -0
  262. package/dist/useRenderSlot-LwWj8QbC.mjs +10 -0
  263. package/dist/useRenderSlot-LwWj8QbC.mjs.map +1 -0
  264. package/dist/visually-hidden/index.d.mts +1 -0
  265. package/dist/visually-hidden/index.js +1 -1
  266. package/dist/visually-hidden/index.mjs +1 -1
  267. package/package.json +7 -6
  268. package/dist/Button-C3xHNaGl.js +0 -2
  269. package/dist/DialogContent.styles-BrhKaHc_.js +0 -2
  270. package/dist/DialogContent.styles-BrhKaHc_.js.map +0 -1
  271. package/dist/DialogContent.styles-WGWJS9dj.mjs +0 -48
  272. package/dist/DialogContent.styles-WGWJS9dj.mjs.map +0 -1
  273. package/dist/Icon-Bf0XrmiR.js +0 -2
  274. package/dist/IconButton-Bf-EDzpI.js +0 -2
  275. package/dist/Slot-C98rL4yy.mjs +0 -14
  276. package/dist/Slot-ghrohQLA.js +0 -2
  277. package/dist/Spinner-DK8VEsaR.js +0 -2
  278. package/dist/TextLink-DD0VO37q.js +0 -2
  279. package/dist/composite-Br3kM5N9.mjs +0 -40
  280. package/dist/composite-Br3kM5N9.mjs.map +0 -1
  281. package/dist/composite-fJD9R7R0.js +0 -2
  282. package/dist/composite-fJD9R7R0.js.map +0 -1
  283. package/dist/detectBrowser-Bc7rk5fI.mjs +0 -44
  284. package/dist/detectBrowser-Bc7rk5fI.mjs.map +0 -1
  285. package/dist/detectBrowser-DTbs_30X.js +0 -2
  286. package/dist/detectBrowser-DTbs_30X.js.map +0 -1
  287. package/dist/downshift.esm-Ncwetv0s.mjs +0 -3038
  288. package/dist/downshift.esm-Ncwetv0s.mjs.map +0 -1
  289. package/dist/downshift.esm-PfCOUbxq.js +0 -37
  290. package/dist/downshift.esm-PfCOUbxq.js.map +0 -1
  291. package/dist/floating-ui.utils.dom-CCN4I08l.js +0 -2
  292. package/dist/floating-ui.utils.dom-CCN4I08l.js.map +0 -1
  293. package/dist/floating-ui.utils.dom-uiDUZc_y.mjs +0 -136
  294. package/dist/floating-ui.utils.dom-uiDUZc_y.mjs.map +0 -1
  295. package/dist/index-0KYGKeVg.js +0 -2
  296. package/dist/index-0KYGKeVg.js.map +0 -1
  297. package/dist/index-1WIgmEZh.js +0 -2
  298. package/dist/index-1WIgmEZh.js.map +0 -1
  299. package/dist/index-BRi38DTc.mjs +0 -21
  300. package/dist/index-BRi38DTc.mjs.map +0 -1
  301. package/dist/index-BZAtNKwE.mjs +0 -71
  302. package/dist/index-BZAtNKwE.mjs.map +0 -1
  303. package/dist/index-BZPx6jYI.mjs +0 -9
  304. package/dist/index-BZPx6jYI.mjs.map +0 -1
  305. package/dist/index-BlkdpEIe.mjs +0 -55
  306. package/dist/index-BlkdpEIe.mjs.map +0 -1
  307. package/dist/index-BmAFn37q.mjs +0 -49
  308. package/dist/index-BmAFn37q.mjs.map +0 -1
  309. package/dist/index-C-J_tHdS.js +0 -6
  310. package/dist/index-C-J_tHdS.js.map +0 -1
  311. package/dist/index-C1qb0595.mjs +0 -28
  312. package/dist/index-C1qb0595.mjs.map +0 -1
  313. package/dist/index-C34GgsKQ.mjs +0 -54
  314. package/dist/index-C34GgsKQ.mjs.map +0 -1
  315. package/dist/index-CCKe-Mpx.mjs +0 -7
  316. package/dist/index-CCKe-Mpx.mjs.map +0 -1
  317. package/dist/index-CDBBjNXc.js +0 -2
  318. package/dist/index-CDBBjNXc.js.map +0 -1
  319. package/dist/index-CYjGhVvU.mjs +0 -243
  320. package/dist/index-CYjGhVvU.mjs.map +0 -1
  321. package/dist/index-ChLwd62c.js +0 -2
  322. package/dist/index-ChLwd62c.js.map +0 -1
  323. package/dist/index-Cjj_rUPu.js +0 -2
  324. package/dist/index-Cjj_rUPu.js.map +0 -1
  325. package/dist/index-CyMbLkj0.js +0 -2
  326. package/dist/index-CyMbLkj0.js.map +0 -1
  327. package/dist/index-DFZozV_h.mjs +0 -69
  328. package/dist/index-DFZozV_h.mjs.map +0 -1
  329. package/dist/index-DKuHkHFX.js +0 -2
  330. package/dist/index-DKuHkHFX.js.map +0 -1
  331. package/dist/index-DLHLIYPI.mjs +0 -16
  332. package/dist/index-DLHLIYPI.mjs.map +0 -1
  333. package/dist/index-DO-atGp-.js +0 -2
  334. package/dist/index-DO-atGp-.js.map +0 -1
  335. package/dist/index-DWlg8lkk.mjs +0 -179
  336. package/dist/index-DWlg8lkk.mjs.map +0 -1
  337. package/dist/index-DYxWvftI.js +0 -2
  338. package/dist/index-DYxWvftI.js.map +0 -1
  339. package/dist/index-D_lWkK39.mjs +0 -803
  340. package/dist/index-D_lWkK39.mjs.map +0 -1
  341. package/dist/index-DdkVj7D0.js +0 -18
  342. package/dist/index-DdkVj7D0.js.map +0 -1
  343. package/dist/index-De-6atSi.js +0 -2
  344. package/dist/index-De-6atSi.js.map +0 -1
  345. package/dist/index-DhGWNzsz.mjs +0 -83
  346. package/dist/index-DhGWNzsz.mjs.map +0 -1
  347. package/dist/index-Dkj4QRX8.js +0 -2
  348. package/dist/index-Dkj4QRX8.js.map +0 -1
  349. package/dist/index-DlIFg0Eu.mjs +0 -60
  350. package/dist/index-DlIFg0Eu.mjs.map +0 -1
  351. package/dist/index-DnaHaH_0.js +0 -2
  352. package/dist/index-DnaHaH_0.js.map +0 -1
  353. package/dist/index-MHF2-CYX.js +0 -2
  354. package/dist/index-MHF2-CYX.js.map +0 -1
  355. package/dist/index-MQ0c3ZX_.js +0 -2
  356. package/dist/index-MQ0c3ZX_.js.map +0 -1
  357. package/dist/index-MSR-vgWR.mjs +0 -37
  358. package/dist/index-MSR-vgWR.mjs.map +0 -1
  359. package/dist/index-VL0YEmOW.mjs +0 -125
  360. package/dist/index-VL0YEmOW.mjs.map +0 -1
  361. package/dist/index-tXqxYME3.js +0 -42
  362. package/dist/index-tXqxYME3.js.map +0 -1
  363. package/dist/inertValue-Bif5Sqs6.mjs +0 -522
  364. package/dist/inertValue-Bif5Sqs6.mjs.map +0 -1
  365. package/dist/inertValue-ShwihJSN.js +0 -5
  366. package/dist/inertValue-ShwihJSN.js.map +0 -1
  367. package/dist/useCollapsiblePanel-D1dCo0lf.js +0 -4
  368. package/dist/useCollapsiblePanel-D1dCo0lf.js.map +0 -1
  369. package/dist/useCollapsiblePanel-kbMNl4Z4.mjs +0 -287
  370. package/dist/useCollapsiblePanel-kbMNl4Z4.mjs.map +0 -1
  371. package/dist/useFocusWithin-CFNEka2I.js +0 -2
  372. package/dist/useFocusWithin-CFNEka2I.js.map +0 -1
  373. package/dist/useFocusWithin-CoL4390f.mjs +0 -796
  374. package/dist/useFocusWithin-CoL4390f.mjs.map +0 -1
  375. package/dist/useOpenChangeComplete-Dk-u_f2y.js +0 -2
  376. package/dist/useOpenChangeComplete-Dk-u_f2y.js.map +0 -1
  377. package/dist/useOpenChangeComplete-RUbg6RBw.mjs +0 -582
  378. package/dist/useOpenChangeComplete-RUbg6RBw.mjs.map +0 -1
  379. package/dist/useTransitionStatus-CktVVKxz.mjs +0 -46
  380. package/dist/useTransitionStatus-CktVVKxz.mjs.map +0 -1
  381. package/dist/useTransitionStatus-CqbEyvIj.js +0 -2
  382. package/dist/useTransitionStatus-CqbEyvIj.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/nodes.js","../../../../node_modules/@base-ui/utils/esm/useScrollLock.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/createEventEmitter.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingTree.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/enqueueFocus.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/markOthers.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingFocusManager.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/hooks/useClick.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/hooks/useDismiss.js","../../../../node_modules/reselect/dist/reselect.mjs","../../../../node_modules/@base-ui/utils/esm/store/createSelector.js","../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../../../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js","../../../../node_modules/use-sync-external-store/shim/with-selector.js","../../../../node_modules/@base-ui/utils/esm/store/useStore.js","../../../../node_modules/@base-ui/utils/esm/store/Store.js","../../../../node_modules/@base-ui/utils/esm/store/ReactStore.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingRootStore.js","../../../../node_modules/@base-ui/react/esm/utils/popups/popupStoreUtils.js","../../../../node_modules/@base-ui/react/esm/utils/popups/popupTriggerMap.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/getEmptyRootContext.js","../../../../node_modules/@base-ui/react/esm/utils/popups/store.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/hooks/useSyncedFloatingRootContext.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/hooks/useInteractions.js","../../../../node_modules/@base-ui/react/esm/floating-ui-react/hooks/useRole.js","../../../../node_modules/@base-ui/utils/esm/useEnhancedClickHandler.js","../../../../node_modules/@base-ui/react/esm/utils/useOpenInteractionType.js","../../../../node_modules/@base-ui/react/esm/dialog/root/useDialogRoot.js","../../../../node_modules/@base-ui/react/esm/dialog/root/DialogRootContext.js","../../../../node_modules/@base-ui/react/esm/dialog/store/DialogStore.js","../../../../node_modules/@base-ui/react/esm/alert-dialog/root/AlertDialogRoot.js","../../../../node_modules/@base-ui/react/esm/utils/popupStateMapping.js","../../../../node_modules/@base-ui/react/esm/dialog/backdrop/DialogBackdrop.js","../../../../node_modules/@base-ui/react/esm/dialog/close/DialogClose.js","../../../../node_modules/@base-ui/react/esm/dialog/description/DialogDescription.js","../../../../node_modules/@base-ui/react/esm/dialog/popup/DialogPopupCssVars.js","../../../../node_modules/@base-ui/react/esm/dialog/popup/DialogPopupDataAttributes.js","../../../../node_modules/@base-ui/react/esm/dialog/portal/DialogPortalContext.js","../../../../node_modules/@base-ui/react/esm/dialog/popup/DialogPopup.js","../../../../node_modules/@base-ui/react/esm/utils/InternalBackdrop.js","../../../../node_modules/@base-ui/react/esm/dialog/portal/DialogPortal.js","../../../../node_modules/@base-ui/react/esm/dialog/title/DialogTitle.js","../../../../node_modules/@base-ui/react/esm/dialog/trigger/DialogTrigger.js","../../src/alert-dialog/AlertDialogContext.tsx","../../src/alert-dialog/AlertDialog.tsx","../../src/alert-dialog/useRenderSlot.tsx","../../src/alert-dialog/AlertDialogAction.tsx","../../src/alert-dialog/AlertDialogBody.tsx","../../src/alert-dialog/AlertDialogCancel.tsx","../../src/alert-dialog/AlertDialogContent.tsx","../../src/alert-dialog/AlertDialogDescription.tsx","../../src/alert-dialog/AlertDialogFooter.tsx","../../src/alert-dialog/AlertDialogHeader.tsx","../../src/alert-dialog/AlertDialogOverlay.tsx","../../src/alert-dialog/AlertDialogPortal.tsx","../../src/alert-dialog/AlertDialogTitle.tsx","../../src/alert-dialog/AlertDialogTrigger.tsx","../../src/alert-dialog/index.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-loop-func */\n\nexport function getNodeChildren(nodes, id, onlyOpenChildren = true) {\n const directChildren = nodes.filter(node => node.parentId === id && (!onlyOpenChildren || node.context?.open));\n return directChildren.flatMap(child => [child, ...getNodeChildren(nodes, child.id, onlyOpenChildren)]);\n}\nexport function getDeepestNode(nodes, id) {\n let deepestNodeId;\n let maxDepth = -1;\n function findDeepest(nodeId, depth) {\n if (depth > maxDepth) {\n deepestNodeId = nodeId;\n maxDepth = depth;\n }\n const children = getNodeChildren(nodes, nodeId);\n children.forEach(child => {\n findDeepest(child.id, depth + 1);\n });\n }\n findDeepest(id, 0);\n return nodes.find(node => node.id === deepestNodeId);\n}\nexport function getNodeAncestors(nodes, id) {\n let allAncestors = [];\n let currentParentId = nodes.find(node => node.id === id)?.parentId;\n while (currentParentId) {\n const currentNode = nodes.find(node => node.id === currentParentId);\n currentParentId = currentNode?.parentId;\n if (currentNode) {\n allAncestors = allAncestors.concat(currentNode);\n }\n }\n return allAncestors;\n}","'use client';\n\nimport { isOverflowElement } from '@floating-ui/utils/dom';\nimport { isIOS, isWebKit } from \"./detectBrowser.js\";\nimport { ownerDocument, ownerWindow } from \"./owner.js\";\nimport { useIsoLayoutEffect } from \"./useIsoLayoutEffect.js\";\nimport { Timeout } from \"./useTimeout.js\";\nimport { AnimationFrame } from \"./useAnimationFrame.js\";\nimport { NOOP } from \"./empty.js\";\n\n/* eslint-disable lines-between-class-members */\n\nlet originalHtmlStyles = {};\nlet originalBodyStyles = {};\nlet originalHtmlScrollBehavior = '';\nfunction hasInsetScrollbars(referenceElement) {\n if (typeof document === 'undefined') {\n return false;\n }\n const doc = ownerDocument(referenceElement);\n const win = ownerWindow(doc);\n return win.innerWidth - doc.documentElement.clientWidth > 0;\n}\nfunction preventScrollOverlayScrollbars(referenceElement) {\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const body = doc.body;\n\n // If an `overflow` style is present on <html>, we need to lock it, because a lock on <body>\n // won't have any effect.\n // But if <body> has an `overflow` style (like `overflow-x: hidden`), we need to lock it\n // instead, as sticky elements shift otherwise.\n const elementToLock = isOverflowElement(html) ? html : body;\n const originalOverflow = elementToLock.style.overflow;\n elementToLock.style.overflow = 'hidden';\n return () => {\n elementToLock.style.overflow = originalOverflow;\n };\n}\nfunction preventScrollInsetScrollbars(referenceElement) {\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const body = doc.body;\n const win = ownerWindow(html);\n let scrollTop = 0;\n let scrollLeft = 0;\n const resizeFrame = AnimationFrame.create();\n\n // Handle `scrollbar-gutter` in Chrome when there is no scrollable content.\n const supportsStableScrollbarGutter = typeof CSS !== 'undefined' && CSS.supports?.('scrollbar-gutter', 'stable');\n\n // Pinch-zoom in Safari causes a shift. Just don't lock scroll if there's any pinch-zoom.\n if (isWebKit && (win.visualViewport?.scale ?? 1) !== 1) {\n return () => {};\n }\n function lockScroll() {\n /* DOM reads: */\n\n const htmlStyles = win.getComputedStyle(html);\n const bodyStyles = win.getComputedStyle(body);\n const htmlScrollbarGutterValue = htmlStyles.scrollbarGutter || '';\n const hasBothEdges = htmlScrollbarGutterValue.includes('both-edges');\n const scrollbarGutterValue = hasBothEdges ? 'stable both-edges' : 'stable';\n scrollTop = html.scrollTop;\n scrollLeft = html.scrollLeft;\n originalHtmlStyles = {\n scrollbarGutter: html.style.scrollbarGutter,\n overflowY: html.style.overflowY,\n overflowX: html.style.overflowX\n };\n originalHtmlScrollBehavior = html.style.scrollBehavior;\n originalBodyStyles = {\n position: body.style.position,\n height: body.style.height,\n width: body.style.width,\n boxSizing: body.style.boxSizing,\n overflowY: body.style.overflowY,\n overflowX: body.style.overflowX,\n scrollBehavior: body.style.scrollBehavior\n };\n const isScrollableY = html.scrollHeight > html.clientHeight;\n const isScrollableX = html.scrollWidth > html.clientWidth;\n const hasConstantOverflowY = htmlStyles.overflowY === 'scroll' || bodyStyles.overflowY === 'scroll';\n const hasConstantOverflowX = htmlStyles.overflowX === 'scroll' || bodyStyles.overflowX === 'scroll';\n\n // Values can be negative in Firefox\n const scrollbarWidth = Math.max(0, win.innerWidth - html.clientWidth);\n const scrollbarHeight = Math.max(0, win.innerHeight - html.clientHeight);\n\n // Avoid shift due to the default <body> margin. This does cause elements to be clipped\n // with whitespace. Warn if <body> has margins?\n const marginY = parseFloat(bodyStyles.marginTop) + parseFloat(bodyStyles.marginBottom);\n const marginX = parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight);\n const elementToLock = isOverflowElement(html) ? html : body;\n\n /*\n * DOM writes:\n * Do not read the DOM past this point!\n */\n\n if (supportsStableScrollbarGutter) {\n html.style.scrollbarGutter = scrollbarGutterValue;\n elementToLock.style.overflowY = 'hidden';\n elementToLock.style.overflowX = 'hidden';\n return;\n }\n Object.assign(html.style, {\n scrollbarGutter: scrollbarGutterValue,\n overflowY: 'hidden',\n overflowX: 'hidden'\n });\n if (isScrollableY || hasConstantOverflowY) {\n html.style.overflowY = 'scroll';\n }\n if (isScrollableX || hasConstantOverflowX) {\n html.style.overflowX = 'scroll';\n }\n Object.assign(body.style, {\n position: 'relative',\n height: marginY || scrollbarHeight ? `calc(100dvh - ${marginY + scrollbarHeight}px)` : '100dvh',\n width: marginX || scrollbarWidth ? `calc(100vw - ${marginX + scrollbarWidth}px)` : '100vw',\n boxSizing: 'border-box',\n overflow: 'hidden',\n scrollBehavior: 'unset'\n });\n body.scrollTop = scrollTop;\n body.scrollLeft = scrollLeft;\n html.setAttribute('data-base-ui-scroll-locked', '');\n html.style.scrollBehavior = 'unset';\n }\n function cleanup() {\n Object.assign(html.style, originalHtmlStyles);\n Object.assign(body.style, originalBodyStyles);\n if (!supportsStableScrollbarGutter) {\n html.scrollTop = scrollTop;\n html.scrollLeft = scrollLeft;\n html.removeAttribute('data-base-ui-scroll-locked');\n html.style.scrollBehavior = originalHtmlScrollBehavior;\n }\n }\n function handleResize() {\n cleanup();\n resizeFrame.request(lockScroll);\n }\n lockScroll();\n win.addEventListener('resize', handleResize);\n return () => {\n resizeFrame.cancel();\n cleanup();\n // Sometimes this cleanup can be run after test teardown\n // because it is called in a `setTimeout(fn, 0)`,\n // in which case `removeEventListener` wouldn't be available,\n // so we check for it to avoid test failures.\n if (typeof win.removeEventListener === 'function') {\n win.removeEventListener('resize', handleResize);\n }\n };\n}\nclass ScrollLocker {\n lockCount = 0;\n restore = null;\n timeoutLock = Timeout.create();\n timeoutUnlock = Timeout.create();\n acquire(referenceElement) {\n this.lockCount += 1;\n if (this.lockCount === 1 && this.restore === null) {\n this.timeoutLock.start(0, () => this.lock(referenceElement));\n }\n return this.release;\n }\n release = () => {\n this.lockCount -= 1;\n if (this.lockCount === 0 && this.restore) {\n this.timeoutUnlock.start(0, this.unlock);\n }\n };\n unlock = () => {\n if (this.lockCount === 0 && this.restore) {\n this.restore?.();\n this.restore = null;\n }\n };\n lock(referenceElement) {\n if (this.lockCount === 0 || this.restore !== null) {\n return;\n }\n const doc = ownerDocument(referenceElement);\n const html = doc.documentElement;\n const htmlOverflowY = ownerWindow(html).getComputedStyle(html).overflowY;\n\n // If the site author already hid overflow on <html>, respect it and bail out.\n if (htmlOverflowY === 'hidden' || htmlOverflowY === 'clip') {\n this.restore = NOOP;\n return;\n }\n const hasOverlayScrollbars = isIOS || !hasInsetScrollbars(referenceElement);\n\n // On iOS, scroll locking does not work if the navbar is collapsed. Due to numerous\n // side effects and bugs that arise on iOS, it must be researched extensively before\n // being enabled to ensure it doesn't cause the following issues:\n // - Textboxes must scroll into view when focused, nor cause a glitchy scroll animation.\n // - The navbar must not force itself into view and cause layout shift.\n // - Scroll containers must not flicker upon closing a popup when it has an exit animation.\n this.restore = hasOverlayScrollbars ? preventScrollOverlayScrollbars(referenceElement) : preventScrollInsetScrollbars(referenceElement);\n }\n}\nconst SCROLL_LOCKER = new ScrollLocker();\n\n/**\n * Locks the scroll of the document when enabled.\n *\n * @param enabled - Whether to enable the scroll lock.\n * @param referenceElement - Element to use as a reference for lock calculations.\n */\nexport function useScrollLock(enabled = true, referenceElement = null) {\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return undefined;\n }\n return SCROLL_LOCKER.acquire(referenceElement);\n }, [enabled, referenceElement]);\n}","export function createEventEmitter() {\n const map = new Map();\n return {\n emit(event, data) {\n map.get(event)?.forEach(listener => listener(data));\n },\n on(event, listener) {\n if (!map.has(event)) {\n map.set(event, new Set());\n }\n map.get(event).add(listener);\n },\n off(event, listener) {\n map.get(event)?.delete(listener);\n }\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useId } from '@base-ui/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { FloatingTreeStore } from \"./FloatingTreeStore.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst FloatingNodeContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") FloatingNodeContext.displayName = \"FloatingNodeContext\";\nconst FloatingTreeContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Returns the parent node id for nested floating elements, if available.\n * Returns `null` for top-level floating elements.\n */\nif (process.env.NODE_ENV !== \"production\") FloatingTreeContext.displayName = \"FloatingTreeContext\";\nexport const useFloatingParentNodeId = () => React.useContext(FloatingNodeContext)?.id || null;\n\n/**\n * Returns the nearest floating tree context, if available.\n */\nexport const useFloatingTree = externalTree => {\n const contextTree = React.useContext(FloatingTreeContext);\n return externalTree ?? contextTree;\n};\n\n/**\n * Registers a node into the `FloatingTree`, returning its id.\n * @see https://floating-ui.com/docs/FloatingTree\n */\nexport function useFloatingNodeId(externalTree) {\n const id = useId();\n const tree = useFloatingTree(externalTree);\n const parentId = useFloatingParentNodeId();\n useIsoLayoutEffect(() => {\n if (!id) {\n return undefined;\n }\n const node = {\n id,\n parentId\n };\n tree?.addNode(node);\n return () => {\n tree?.removeNode(node);\n };\n }, [tree, id, parentId]);\n return id;\n}\n/**\n * Provides parent node context for nested floating elements.\n * @see https://floating-ui.com/docs/FloatingTree\n * @internal\n */\nexport function FloatingNode(props) {\n const {\n children,\n id\n } = props;\n const parentId = useFloatingParentNodeId();\n return /*#__PURE__*/_jsx(FloatingNodeContext.Provider, {\n value: React.useMemo(() => ({\n id,\n parentId\n }), [id, parentId]),\n children: children\n });\n}\n/**\n * Provides context for nested floating elements when they are not children of\n * each other on the DOM.\n * This is not necessary in all cases, except when there must be explicit communication between parent and child floating elements. It is necessary for:\n * - The `bubbles` option in the `useDismiss()` Hook\n * - Nested virtual list navigation\n * - Nested floating elements that each open on hover\n * - Custom communication between parent and child floating elements\n * @see https://floating-ui.com/docs/FloatingTree\n * @internal\n */\nexport function FloatingTree(props) {\n const {\n children,\n externalTree\n } = props;\n const tree = useRefWithInit(() => externalTree ?? new FloatingTreeStore()).current;\n return /*#__PURE__*/_jsx(FloatingTreeContext.Provider, {\n value: tree,\n children: children\n });\n}","let rafId = 0;\nexport function enqueueFocus(el, options = {}) {\n const {\n preventScroll = false,\n cancelPrevious = true,\n sync = false\n } = options;\n if (cancelPrevious) {\n cancelAnimationFrame(rafId);\n }\n const exec = () => el?.focus({\n preventScroll\n });\n if (sync) {\n exec();\n } else {\n rafId = requestAnimationFrame(exec);\n }\n}","// Modified to add conditional `aria-hidden` support:\n// https://github.com/theKashey/aria-hidden/blob/9220c8f4a4fd35f63bee5510a9f41a37264382d4/src/index.ts\nimport { getNodeName } from '@floating-ui/utils/dom';\nimport { getDocument } from \"./element.js\";\nconst counters = {\n inert: new WeakMap(),\n 'aria-hidden': new WeakMap(),\n none: new WeakMap()\n};\nfunction getCounterMap(control) {\n if (control === 'inert') {\n return counters.inert;\n }\n if (control === 'aria-hidden') {\n return counters['aria-hidden'];\n }\n return counters.none;\n}\nlet uncontrolledElementsSet = new WeakSet();\nlet markerMap = {};\nlet lockCount = 0;\nexport const supportsInert = () => typeof HTMLElement !== 'undefined' && 'inert' in HTMLElement.prototype;\nconst unwrapHost = node => node && (node.host || unwrapHost(node.parentNode));\nconst correctElements = (parent, targets) => targets.map(target => {\n if (parent.contains(target)) {\n return target;\n }\n const correctedTarget = unwrapHost(target);\n if (parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n return null;\n}).filter(x => x != null);\nfunction applyAttributeToOthers(uncorrectedAvoidElements, body, ariaHidden, inert) {\n const markerName = 'data-base-ui-inert';\n // eslint-disable-next-line no-nested-ternary\n const controlAttribute = inert ? 'inert' : ariaHidden ? 'aria-hidden' : null;\n const avoidElements = correctElements(body, uncorrectedAvoidElements);\n const elementsToKeep = new Set();\n const elementsToStop = new Set(avoidElements);\n const hiddenElements = [];\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n const markerCounter = markerMap[markerName];\n avoidElements.forEach(keep);\n deep(body);\n elementsToKeep.clear();\n function keep(el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n if (el.parentNode) {\n keep(el.parentNode);\n }\n }\n function deep(parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n [].forEach.call(parent.children, node => {\n if (getNodeName(node) === 'script') {\n return;\n }\n if (elementsToKeep.has(node)) {\n deep(node);\n } else {\n const attr = controlAttribute ? node.getAttribute(controlAttribute) : null;\n const alreadyHidden = attr !== null && attr !== 'false';\n const counterMap = getCounterMap(controlAttribute);\n const counterValue = (counterMap.get(node) || 0) + 1;\n const markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenElements.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledElementsSet.add(node);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, '');\n }\n if (!alreadyHidden && controlAttribute) {\n node.setAttribute(controlAttribute, controlAttribute === 'inert' ? '' : 'true');\n }\n }\n });\n }\n lockCount += 1;\n return () => {\n hiddenElements.forEach(element => {\n const counterMap = getCounterMap(controlAttribute);\n const currentCounterValue = counterMap.get(element) || 0;\n const counterValue = currentCounterValue - 1;\n const markerValue = (markerCounter.get(element) || 0) - 1;\n counterMap.set(element, counterValue);\n markerCounter.set(element, markerValue);\n if (!counterValue) {\n if (!uncontrolledElementsSet.has(element) && controlAttribute) {\n element.removeAttribute(controlAttribute);\n }\n uncontrolledElementsSet.delete(element);\n }\n if (!markerValue) {\n element.removeAttribute(markerName);\n }\n });\n lockCount -= 1;\n if (!lockCount) {\n counters.inert = new WeakMap();\n counters['aria-hidden'] = new WeakMap();\n counters.none = new WeakMap();\n uncontrolledElementsSet = new WeakSet();\n markerMap = {};\n }\n };\n}\nexport function markOthers(avoidElements, ariaHidden = false, inert = false) {\n const body = getDocument(avoidElements[0]).body;\n return applyAttributeToOthers(avoidElements.concat(Array.from(body.querySelectorAll('[aria-live]'))), body, ariaHidden, inert);\n}","'use client';\n\nimport * as React from 'react';\nimport { tabbable, isTabbable, focusable } from 'tabbable';\nimport { getComputedStyle, getNodeName, isHTMLElement } from '@floating-ui/utils/dom';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { visuallyHidden } from '@base-ui/utils/visuallyHidden';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { ownerWindow } from '@base-ui/utils/owner';\nimport { FocusGuard } from \"../../utils/FocusGuard.js\";\nimport { activeElement, contains, getDocument, getTarget, isTypeableCombobox, isVirtualClick, isVirtualPointerEvent, stopEvent, getNodeAncestors, getNodeChildren, getFloatingFocusElement, getTabbableOptions, isOutsideEvent, getNextTabbable, getPreviousTabbable } from \"../utils.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.js\";\nimport { markOthers } from \"../utils/markOthers.js\";\nimport { usePortalContext } from \"./FloatingPortal.js\";\nimport { useFloatingTree } from \"./FloatingTree.js\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../utils/constants.js\";\nimport { resolveRef } from \"../../utils/resolveRef.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction getEventType(event, lastInteractionType) {\n const win = ownerWindow(event.target);\n if (event instanceof win.KeyboardEvent) {\n return 'keyboard';\n }\n if (event instanceof win.FocusEvent) {\n // Focus events can be caused by a preceding pointer interaction (e.g., focusout on outside press).\n // Prefer the last known pointer type if provided, else treat as keyboard.\n return lastInteractionType || 'keyboard';\n }\n if ('pointerType' in event) {\n return event.pointerType || 'keyboard';\n }\n if ('touches' in event) {\n return 'touch';\n }\n if (event instanceof win.MouseEvent) {\n // onClick events may not contain pointer events, and will fall through to here\n return lastInteractionType || (event.detail === 0 ? 'keyboard' : 'mouse');\n }\n return '';\n}\nconst LIST_LIMIT = 20;\nlet previouslyFocusedElements = [];\nfunction clearDisconnectedPreviouslyFocusedElements() {\n previouslyFocusedElements = previouslyFocusedElements.filter(el => el.isConnected);\n}\nfunction addPreviouslyFocusedElement(element) {\n clearDisconnectedPreviouslyFocusedElements();\n if (element && getNodeName(element) !== 'body') {\n previouslyFocusedElements.push(element);\n if (previouslyFocusedElements.length > LIST_LIMIT) {\n previouslyFocusedElements = previouslyFocusedElements.slice(-LIST_LIMIT);\n }\n }\n}\nfunction getPreviouslyFocusedElement() {\n clearDisconnectedPreviouslyFocusedElements();\n return previouslyFocusedElements[previouslyFocusedElements.length - 1];\n}\nfunction getFirstTabbableElement(container) {\n if (!container) {\n return null;\n }\n const tabbableOptions = getTabbableOptions();\n if (isTabbable(container, tabbableOptions)) {\n return container;\n }\n return tabbable(container, tabbableOptions)[0] || container;\n}\nfunction isFocusable(element) {\n if (!element || !element.isConnected) {\n return false;\n }\n if (typeof element.checkVisibility === 'function') {\n return element.checkVisibility();\n }\n return getComputedStyle(element).display !== 'none';\n}\nfunction handleTabIndex(floatingFocusElement, orderRef) {\n if (!orderRef.current.includes('floating') && !floatingFocusElement.getAttribute('role')?.includes('dialog')) {\n return;\n }\n const options = getTabbableOptions();\n const focusableElements = focusable(floatingFocusElement, options);\n const tabbableContent = focusableElements.filter(element => {\n const dataTabIndex = element.getAttribute('data-tabindex') || '';\n return isTabbable(element, options) || element.hasAttribute('data-tabindex') && !dataTabIndex.startsWith('-');\n });\n const tabIndex = floatingFocusElement.getAttribute('tabindex');\n if (orderRef.current.includes('floating') || tabbableContent.length === 0) {\n if (tabIndex !== '0') {\n floatingFocusElement.setAttribute('tabindex', '0');\n }\n } else if (tabIndex !== '-1' || floatingFocusElement.hasAttribute('data-tabindex') && floatingFocusElement.getAttribute('data-tabindex') !== '-1') {\n floatingFocusElement.setAttribute('tabindex', '-1');\n floatingFocusElement.setAttribute('data-tabindex', '-1');\n }\n}\n/**\n * Provides focus management for the floating element.\n * @see https://floating-ui.com/docs/FloatingFocusManager\n * @internal\n */\nexport function FloatingFocusManager(props) {\n const {\n context,\n children,\n disabled = false,\n order = ['content'],\n initialFocus = true,\n returnFocus = true,\n restoreFocus = false,\n modal = true,\n closeOnFocusOut = true,\n openInteractionType = '',\n getInsideElements: getInsideElementsProp = () => [],\n nextFocusableElement,\n previousFocusableElement,\n beforeContentFocusGuardRef,\n externalTree\n } = props;\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const domReference = store.useState('domReferenceElement');\n const floating = store.useState('floatingElement');\n const {\n events,\n dataRef\n } = store.context;\n const getNodeId = useStableCallback(() => dataRef.current.floatingContext?.nodeId);\n const getInsideElements = useStableCallback(getInsideElementsProp);\n const ignoreInitialFocus = initialFocus === false;\n // If the reference is a combobox and is typeable (e.g. input/textarea),\n // there are different focus semantics. The guards should not be rendered, but\n // aria-hidden should be applied to all nodes still. Further, the visually\n // hidden dismiss button should only appear at the end of the list, not the\n // start.\n const isUntrappedTypeableCombobox = isTypeableCombobox(domReference) && ignoreInitialFocus;\n const orderRef = useValueAsRef(order);\n const initialFocusRef = useValueAsRef(initialFocus);\n const returnFocusRef = useValueAsRef(returnFocus);\n const openInteractionTypeRef = useValueAsRef(openInteractionType);\n const tree = useFloatingTree(externalTree);\n const portalContext = usePortalContext();\n const startDismissButtonRef = React.useRef(null);\n const endDismissButtonRef = React.useRef(null);\n const preventReturnFocusRef = React.useRef(false);\n const isPointerDownRef = React.useRef(false);\n const pointerDownOutsideRef = React.useRef(false);\n const tabbableIndexRef = React.useRef(-1);\n const closeTypeRef = React.useRef('');\n const lastInteractionTypeRef = React.useRef('');\n const blurTimeout = useTimeout();\n const pointerDownTimeout = useTimeout();\n const restoreFocusFrame = useAnimationFrame();\n const isInsidePortal = portalContext != null;\n const floatingFocusElement = getFloatingFocusElement(floating);\n const getTabbableContent = useStableCallback((container = floatingFocusElement) => {\n return container ? tabbable(container, getTabbableOptions()) : [];\n });\n const getTabbableElements = useStableCallback(container => {\n const content = getTabbableContent(container);\n return orderRef.current.map(() => content).filter(Boolean).flat();\n });\n React.useEffect(() => {\n if (disabled) {\n return undefined;\n }\n if (!modal) {\n return undefined;\n }\n function onKeyDown(event) {\n if (event.key === 'Tab') {\n // The focus guards have nothing to focus, so we need to stop the event.\n if (contains(floatingFocusElement, activeElement(getDocument(floatingFocusElement))) && getTabbableContent().length === 0 && !isUntrappedTypeableCombobox) {\n stopEvent(event);\n }\n }\n }\n const doc = getDocument(floatingFocusElement);\n doc.addEventListener('keydown', onKeyDown);\n return () => {\n doc.removeEventListener('keydown', onKeyDown);\n };\n }, [disabled, domReference, floatingFocusElement, modal, orderRef, isUntrappedTypeableCombobox, getTabbableContent, getTabbableElements]);\n React.useEffect(() => {\n if (disabled) {\n return undefined;\n }\n if (!floating) {\n return undefined;\n }\n function handleFocusIn(event) {\n const target = getTarget(event);\n const tabbableContent = getTabbableContent();\n const tabbableIndex = tabbableContent.indexOf(target);\n if (tabbableIndex !== -1) {\n tabbableIndexRef.current = tabbableIndex;\n }\n }\n floating.addEventListener('focusin', handleFocusIn);\n return () => {\n floating.removeEventListener('focusin', handleFocusIn);\n };\n }, [disabled, floating, getTabbableContent]);\n\n // Track the last interaction type at the document level to disambiguate focus events\n React.useEffect(() => {\n if (disabled || !open) {\n return undefined;\n }\n const doc = getDocument(floatingFocusElement);\n function clearPointerDownOutside() {\n pointerDownOutsideRef.current = false;\n }\n function onPointerDown(event) {\n const target = getTarget(event);\n const pointerTargetInside = contains(floating, target) || contains(domReference, target) || contains(portalContext?.portalNode, target);\n pointerDownOutsideRef.current = !pointerTargetInside;\n lastInteractionTypeRef.current = event.pointerType || 'keyboard';\n }\n function onKeyDown() {\n lastInteractionTypeRef.current = 'keyboard';\n }\n doc.addEventListener('pointerdown', onPointerDown, true);\n doc.addEventListener('pointerup', clearPointerDownOutside, true);\n doc.addEventListener('pointercancel', clearPointerDownOutside, true);\n doc.addEventListener('keydown', onKeyDown, true);\n return () => {\n doc.removeEventListener('pointerdown', onPointerDown, true);\n doc.removeEventListener('pointerup', clearPointerDownOutside, true);\n doc.removeEventListener('pointercancel', clearPointerDownOutside, true);\n doc.removeEventListener('keydown', onKeyDown, true);\n };\n }, [disabled, floating, domReference, floatingFocusElement, open, portalContext]);\n React.useEffect(() => {\n if (disabled) {\n return undefined;\n }\n if (!closeOnFocusOut) {\n return undefined;\n }\n\n // In Safari, buttons lose focus when pressing them.\n function handlePointerDown() {\n isPointerDownRef.current = true;\n pointerDownTimeout.start(0, () => {\n isPointerDownRef.current = false;\n });\n }\n function handleFocusOutside(event) {\n const relatedTarget = event.relatedTarget;\n const currentTarget = event.currentTarget;\n const target = getTarget(event);\n queueMicrotask(() => {\n const nodeId = getNodeId();\n const triggers = store.context.triggerElements;\n const movedToUnrelatedNode = !(contains(domReference, relatedTarget) || contains(floating, relatedTarget) || contains(relatedTarget, floating) || contains(portalContext?.portalNode, relatedTarget) || relatedTarget != null && triggers.hasElement(relatedTarget) || triggers.hasMatchingElement(trigger => contains(trigger, relatedTarget)) || relatedTarget?.hasAttribute(createAttribute('focus-guard')) || tree && (getNodeChildren(tree.nodesRef.current, nodeId).find(node => contains(node.context?.elements.floating, relatedTarget) || contains(node.context?.elements.domReference, relatedTarget)) || getNodeAncestors(tree.nodesRef.current, nodeId).find(node => [node.context?.elements.floating, getFloatingFocusElement(node.context?.elements.floating)].includes(relatedTarget) || node.context?.elements.domReference === relatedTarget)));\n if (currentTarget === domReference && floatingFocusElement) {\n handleTabIndex(floatingFocusElement, orderRef);\n }\n\n // Restore focus to the previous tabbable element index to prevent\n // focus from being lost outside the floating tree.\n if (restoreFocus && currentTarget !== domReference && !isFocusable(target) && activeElement(getDocument(floatingFocusElement)) === getDocument(floatingFocusElement).body) {\n // Let `FloatingPortal` effect knows that focus is still inside the\n // floating tree.\n if (isHTMLElement(floatingFocusElement)) {\n floatingFocusElement.focus();\n // If explicitly requested to restore focus to the popup container, do not search\n // for the next/previous tabbable element.\n if (restoreFocus === 'popup') {\n // If the element is removed on pointerdown, focus tries to move it,\n // but since it's removed at the same time, focus gets lost as it\n // happens after the .focus() call above.\n // In this case, focus needs to be moved asynchronously.\n restoreFocusFrame.request(() => {\n floatingFocusElement.focus();\n });\n return;\n }\n }\n const prevTabbableIndex = tabbableIndexRef.current;\n const tabbableContent = getTabbableContent();\n const nodeToFocus = tabbableContent[prevTabbableIndex] || tabbableContent[tabbableContent.length - 1] || floatingFocusElement;\n if (isHTMLElement(nodeToFocus)) {\n nodeToFocus.focus();\n }\n }\n\n // https://github.com/floating-ui/floating-ui/issues/3060\n if (dataRef.current.insideReactTree) {\n dataRef.current.insideReactTree = false;\n return;\n }\n\n // Focus did not move inside the floating tree, and there are no tabbable\n // portal guards to handle closing.\n if ((isUntrappedTypeableCombobox ? true : !modal) && relatedTarget && movedToUnrelatedNode && !isPointerDownRef.current && (\n // Fix React 18 Strict Mode returnFocus due to double rendering.\n // For an \"untrapped\" typeable combobox (input role=combobox with\n // initialFocus=false), re-opening the popup and tabbing out should still close it even\n // when the previously focused element (e.g. the next tabbable outside the popup) is\n // focused again. Otherwise, the popup remains open on the second Tab sequence:\n // click input -> Tab (closes) -> click input -> Tab.\n // Allow closing when `isUntrappedTypeableCombobox` regardless of the previously focused element.\n isUntrappedTypeableCombobox || relatedTarget !== getPreviouslyFocusedElement())) {\n preventReturnFocusRef.current = true;\n store.setOpen(false, createChangeEventDetails(REASONS.focusOut, event));\n }\n });\n }\n function markInsideReactTree() {\n if (pointerDownOutsideRef.current) {\n return;\n }\n dataRef.current.insideReactTree = true;\n blurTimeout.start(0, () => {\n dataRef.current.insideReactTree = false;\n });\n }\n const domReferenceElement = isHTMLElement(domReference) ? domReference : null;\n const cleanups = [];\n if (!floating && !domReferenceElement) {\n return undefined;\n }\n if (domReferenceElement) {\n domReferenceElement.addEventListener('focusout', handleFocusOutside);\n domReferenceElement.addEventListener('pointerdown', handlePointerDown);\n cleanups.push(() => {\n domReferenceElement.removeEventListener('focusout', handleFocusOutside);\n domReferenceElement.removeEventListener('pointerdown', handlePointerDown);\n });\n }\n if (floating) {\n floating.addEventListener('focusout', handleFocusOutside);\n if (portalContext) {\n floating.addEventListener('focusout', markInsideReactTree, true);\n cleanups.push(() => {\n floating.removeEventListener('focusout', markInsideReactTree, true);\n });\n }\n cleanups.push(() => {\n floating.removeEventListener('focusout', handleFocusOutside);\n });\n }\n return () => {\n cleanups.forEach(cleanup => {\n cleanup();\n });\n };\n }, [disabled, domReference, floating, floatingFocusElement, modal, tree, portalContext, store, closeOnFocusOut, restoreFocus, getTabbableContent, isUntrappedTypeableCombobox, getNodeId, orderRef, dataRef, blurTimeout, pointerDownTimeout, restoreFocusFrame]);\n const beforeGuardRef = React.useRef(null);\n const afterGuardRef = React.useRef(null);\n const mergedBeforeGuardRef = useMergedRefs(beforeGuardRef, beforeContentFocusGuardRef, portalContext?.beforeInsideRef);\n const mergedAfterGuardRef = useMergedRefs(afterGuardRef, portalContext?.afterInsideRef);\n React.useEffect(() => {\n if (disabled || !floating || !open) {\n return undefined;\n }\n\n // Don't hide portals nested within the parent portal.\n const portalNodes = Array.from(portalContext?.portalNode?.querySelectorAll(`[${createAttribute('portal')}]`) || []);\n const ancestors = tree ? getNodeAncestors(tree.nodesRef.current, getNodeId()) : [];\n const rootAncestorComboboxDomReference = ancestors.find(node => isTypeableCombobox(node.context?.elements.domReference || null))?.context?.elements.domReference;\n const insideElements = [floating, rootAncestorComboboxDomReference, ...portalNodes, ...getInsideElements(), startDismissButtonRef.current, endDismissButtonRef.current, beforeGuardRef.current, afterGuardRef.current, portalContext?.beforeOutsideRef.current, portalContext?.afterOutsideRef.current, resolveRef(previousFocusableElement), resolveRef(nextFocusableElement), isUntrappedTypeableCombobox ? domReference : null].filter(x => x != null);\n const cleanup = markOthers(insideElements, modal || isUntrappedTypeableCombobox);\n return () => {\n cleanup();\n };\n }, [open, disabled, domReference, floating, modal, orderRef, portalContext, isUntrappedTypeableCombobox, tree, getNodeId, getInsideElements, nextFocusableElement, previousFocusableElement]);\n useIsoLayoutEffect(() => {\n if (!open || disabled || !isHTMLElement(floatingFocusElement)) {\n return;\n }\n const doc = getDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n\n // Wait for any layout effect state setters to execute to set `tabIndex`.\n queueMicrotask(() => {\n const focusableElements = getTabbableElements(floatingFocusElement);\n const initialFocusValueOrFn = initialFocusRef.current;\n const resolvedInitialFocus = typeof initialFocusValueOrFn === 'function' ? initialFocusValueOrFn(openInteractionTypeRef.current || '') : initialFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedInitialFocus === undefined || resolvedInitialFocus === false) {\n return;\n }\n let elToFocus;\n if (resolvedInitialFocus === true || resolvedInitialFocus === null) {\n elToFocus = focusableElements[0] || floatingFocusElement;\n } else {\n elToFocus = resolveRef(resolvedInitialFocus);\n }\n elToFocus = elToFocus || focusableElements[0] || floatingFocusElement;\n const focusAlreadyInsideFloatingEl = contains(floatingFocusElement, previouslyFocusedElement);\n if (focusAlreadyInsideFloatingEl) {\n return;\n }\n enqueueFocus(elToFocus, {\n preventScroll: elToFocus === floatingFocusElement\n });\n });\n }, [disabled, open, floatingFocusElement, ignoreInitialFocus, getTabbableElements, initialFocusRef, openInteractionTypeRef]);\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n const doc = getDocument(floatingFocusElement);\n const previouslyFocusedElement = activeElement(doc);\n addPreviouslyFocusedElement(previouslyFocusedElement);\n\n // Dismissing via outside press should always ignore `returnFocus` to\n // prevent unwanted scrolling.\n function onOpenChangeLocal(details) {\n if (!details.open) {\n closeTypeRef.current = getEventType(details.nativeEvent, lastInteractionTypeRef.current);\n }\n if (details.reason === REASONS.triggerHover && details.nativeEvent.type === 'mouseleave') {\n preventReturnFocusRef.current = true;\n }\n if (details.reason !== REASONS.outsidePress) {\n return;\n }\n if (details.nested) {\n preventReturnFocusRef.current = false;\n } else if (isVirtualClick(details.nativeEvent) || isVirtualPointerEvent(details.nativeEvent)) {\n preventReturnFocusRef.current = false;\n } else {\n let isPreventScrollSupported = false;\n document.createElement('div').focus({\n get preventScroll() {\n isPreventScrollSupported = true;\n return false;\n }\n });\n if (isPreventScrollSupported) {\n preventReturnFocusRef.current = false;\n } else {\n preventReturnFocusRef.current = true;\n }\n }\n }\n events.on('openchange', onOpenChangeLocal);\n const fallbackEl = doc.createElement('span');\n fallbackEl.setAttribute('tabindex', '-1');\n fallbackEl.setAttribute('aria-hidden', 'true');\n Object.assign(fallbackEl.style, visuallyHidden);\n if (isInsidePortal && domReference) {\n domReference.insertAdjacentElement('afterend', fallbackEl);\n }\n function getReturnElement() {\n const returnFocusValueOrFn = returnFocusRef.current;\n let resolvedReturnFocusValue = typeof returnFocusValueOrFn === 'function' ? returnFocusValueOrFn(closeTypeRef.current) : returnFocusValueOrFn;\n\n // `null` should fallback to default behavior in case of an empty ref.\n if (resolvedReturnFocusValue === undefined || resolvedReturnFocusValue === false) {\n return null;\n }\n if (resolvedReturnFocusValue === null) {\n resolvedReturnFocusValue = true;\n }\n if (typeof resolvedReturnFocusValue === 'boolean') {\n const el = domReference || getPreviouslyFocusedElement();\n return el && el.isConnected ? el : fallbackEl;\n }\n const fallback = domReference || getPreviouslyFocusedElement() || fallbackEl;\n return resolveRef(resolvedReturnFocusValue) || fallback;\n }\n return () => {\n events.off('openchange', onOpenChangeLocal);\n const activeEl = activeElement(doc);\n const isFocusInsideFloatingTree = contains(floating, activeEl) || tree && getNodeChildren(tree.nodesRef.current, getNodeId(), false).some(node => contains(node.context?.elements.floating, activeEl));\n const returnElement = getReturnElement();\n queueMicrotask(() => {\n // This is `returnElement`, if it's tabbable, or its first tabbable child.\n const tabbableReturnElement = getFirstTabbableElement(returnElement);\n const hasExplicitReturnFocus = typeof returnFocusRef.current !== 'boolean';\n if (\n // eslint-disable-next-line react-hooks/exhaustive-deps\n returnFocusRef.current && !preventReturnFocusRef.current && isHTMLElement(tabbableReturnElement) && (\n // If the focus moved somewhere else after mount, avoid returning focus\n // since it likely entered a different element which should be\n // respected: https://github.com/floating-ui/floating-ui/issues/2607\n !hasExplicitReturnFocus && tabbableReturnElement !== activeEl && activeEl !== doc.body ? isFocusInsideFloatingTree : true)) {\n tabbableReturnElement.focus({\n preventScroll: true\n });\n }\n fallbackEl.remove();\n });\n };\n }, [disabled, floating, floatingFocusElement, returnFocusRef, dataRef, events, tree, isInsidePortal, domReference, getNodeId]);\n React.useEffect(() => {\n // The `returnFocus` cleanup behavior is inside a microtask; ensure we\n // wait for it to complete before resetting the flag.\n queueMicrotask(() => {\n preventReturnFocusRef.current = false;\n });\n }, [disabled]);\n React.useEffect(() => {\n if (disabled || !open) {\n return undefined;\n }\n function handlePointerDown(event) {\n const target = getTarget(event);\n if (target?.closest(`[${CLICK_TRIGGER_IDENTIFIER}]`)) {\n isPointerDownRef.current = true;\n }\n }\n const doc = getDocument(floatingFocusElement);\n doc.addEventListener('pointerdown', handlePointerDown, true);\n return () => {\n doc.removeEventListener('pointerdown', handlePointerDown, true);\n };\n }, [disabled, open, floatingFocusElement]);\n\n // Synchronize the `context` & `modal` value to the FloatingPortal context.\n // It will decide whether or not it needs to render its own guards.\n useIsoLayoutEffect(() => {\n if (disabled) {\n return undefined;\n }\n if (!portalContext) {\n return undefined;\n }\n portalContext.setFocusManagerState({\n modal,\n closeOnFocusOut,\n open,\n onOpenChange: store.setOpen,\n domReference\n });\n return () => {\n portalContext.setFocusManagerState(null);\n };\n }, [disabled, portalContext, modal, open, store, closeOnFocusOut, domReference]);\n useIsoLayoutEffect(() => {\n if (disabled || !floatingFocusElement) {\n return undefined;\n }\n handleTabIndex(floatingFocusElement, orderRef);\n return () => {\n queueMicrotask(clearDisconnectedPreviouslyFocusedElements);\n };\n }, [disabled, floatingFocusElement, orderRef]);\n const shouldRenderGuards = !disabled && (modal ? !isUntrappedTypeableCombobox : true) && (isInsidePortal || modal);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedBeforeGuardRef,\n onFocus: event => {\n if (modal) {\n const els = getTabbableElements();\n enqueueFocus(els[els.length - 1]);\n } else if (portalContext?.portalNode) {\n preventReturnFocusRef.current = false;\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n } else {\n resolveRef(previousFocusableElement ?? portalContext.beforeOutsideRef)?.focus();\n }\n }\n }\n }), children, shouldRenderGuards && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"inside\",\n ref: mergedAfterGuardRef,\n onFocus: event => {\n if (modal) {\n enqueueFocus(getTabbableElements()[0]);\n } else if (portalContext?.portalNode) {\n if (closeOnFocusOut) {\n preventReturnFocusRef.current = true;\n }\n if (isOutsideEvent(event, portalContext.portalNode)) {\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n } else {\n resolveRef(nextFocusableElement ?? portalContext.afterOutsideRef)?.focus();\n }\n }\n }\n })]\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { EMPTY_OBJECT } from \"../../utils/constants.js\";\nimport { isClickLikeEvent, isMouseLikePointerType, isTypeableElement } from \"../utils.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\n/**\n * Opens or closes the floating element when clicking the reference element.\n * @see https://floating-ui.com/docs/useClick\n */\nexport function useClick(context, props = {}) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const dataRef = store.context.dataRef;\n const {\n enabled = true,\n event: eventOption = 'click',\n toggle = true,\n ignoreMouse = false,\n stickIfOpen = true,\n touchOpenDelay = 0\n } = props;\n const pointerTypeRef = React.useRef(undefined);\n const frame = useAnimationFrame();\n const touchOpenTimeout = useTimeout();\n const reference = React.useMemo(() => ({\n onPointerDown(event) {\n pointerTypeRef.current = event.pointerType;\n },\n onMouseDown(event) {\n const pointerType = pointerTypeRef.current;\n const nativeEvent = event.nativeEvent;\n const open = store.select('open');\n\n // Ignore all buttons except for the \"main\" button.\n // https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button\n if (event.button !== 0 || eventOption === 'click' || isMouseLikePointerType(pointerType, true) && ignoreMouse) {\n return;\n }\n const openEvent = dataRef.current.openEvent;\n const openEventType = openEvent?.type;\n const hasClickedOnInactiveTrigger = store.select('domReferenceElement') !== event.currentTarget;\n const nextOpen = open && hasClickedOnInactiveTrigger || !(open && toggle && (openEvent && stickIfOpen ? openEventType === 'click' || openEventType === 'mousedown' : true));\n\n // Animations sometimes won't run on a typeable element if using a rAF.\n // Focus is always set on these elements. For touch, we may delay opening.\n if (isTypeableElement(nativeEvent.target)) {\n const details = createChangeEventDetails(REASONS.triggerPress, nativeEvent, nativeEvent.target);\n if (nextOpen && pointerType === 'touch' && touchOpenDelay > 0) {\n touchOpenTimeout.start(touchOpenDelay, () => {\n store.setOpen(true, details);\n });\n } else {\n store.setOpen(nextOpen, details);\n }\n return;\n }\n\n // Capture the currentTarget before the rAF.\n // as React sets it to null after the event handler completes.\n const eventCurrentTarget = event.currentTarget;\n\n // Wait until focus is set on the element. This is an alternative to\n // `event.preventDefault()` to avoid :focus-visible from appearing when using a pointer.\n frame.request(() => {\n const details = createChangeEventDetails(REASONS.triggerPress, nativeEvent, eventCurrentTarget);\n if (nextOpen && pointerType === 'touch' && touchOpenDelay > 0) {\n touchOpenTimeout.start(touchOpenDelay, () => {\n store.setOpen(true, details);\n });\n } else {\n store.setOpen(nextOpen, details);\n }\n });\n },\n onClick(event) {\n if (eventOption === 'mousedown-only') {\n return;\n }\n const pointerType = pointerTypeRef.current;\n if (eventOption === 'mousedown' && pointerType) {\n pointerTypeRef.current = undefined;\n return;\n }\n if (isMouseLikePointerType(pointerType, true) && ignoreMouse) {\n return;\n }\n const open = store.select('open');\n const openEvent = dataRef.current.openEvent;\n const hasClickedOnInactiveTrigger = store.select('domReferenceElement') !== event.currentTarget;\n const nextOpen = open && hasClickedOnInactiveTrigger || !(open && toggle && (openEvent && stickIfOpen ? isClickLikeEvent(openEvent) : true));\n const details = createChangeEventDetails(REASONS.triggerPress, event.nativeEvent, event.currentTarget);\n if (nextOpen && pointerType === 'touch' && touchOpenDelay > 0) {\n touchOpenTimeout.start(touchOpenDelay, () => {\n store.setOpen(true, details);\n });\n } else {\n store.setOpen(nextOpen, details);\n }\n },\n onKeyDown() {\n pointerTypeRef.current = undefined;\n }\n }), [dataRef, eventOption, ignoreMouse, store, stickIfOpen, toggle, frame, touchOpenTimeout, touchOpenDelay]);\n return React.useMemo(() => enabled ? {\n reference\n } : EMPTY_OBJECT, [enabled, reference]);\n}","import * as React from 'react';\nimport { getOverflowAncestors } from '@floating-ui/react-dom';\nimport { getComputedStyle, getParentNode, isElement, isHTMLElement, isLastTraversableNode, isWebKit } from '@floating-ui/utils/dom';\nimport { Timeout, useTimeout } from '@base-ui/utils/useTimeout';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { contains, getDocument, getTarget, isEventTargetWithin, isReactEvent, isRootElement, getNodeChildren } from \"../utils.js\";\n\n/* eslint-disable no-underscore-dangle */\n\nimport { useFloatingTree } from \"../components/FloatingTree.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nconst bubbleHandlerKeys = {\n intentional: 'onClick',\n sloppy: 'onPointerDown'\n};\nexport function normalizeProp(normalizable) {\n return {\n escapeKey: typeof normalizable === 'boolean' ? normalizable : normalizable?.escapeKey ?? false,\n outsidePress: typeof normalizable === 'boolean' ? normalizable : normalizable?.outsidePress ?? true\n };\n}\n/**\n * Closes the floating element when a dismissal is requested — by default, when\n * the user presses the `escape` key or outside of the floating element.\n * @see https://floating-ui.com/docs/useDismiss\n */\nexport function useDismiss(context, props = {}) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const referenceElement = store.useState('referenceElement');\n const domReferenceElement = store.useState('domReferenceElement');\n const {\n onOpenChange,\n dataRef\n } = store.context;\n const {\n enabled = true,\n escapeKey = true,\n outsidePress: outsidePressProp = true,\n outsidePressEvent = 'sloppy',\n referencePress = false,\n referencePressEvent = 'sloppy',\n ancestorScroll = false,\n bubbles,\n externalTree\n } = props;\n const tree = useFloatingTree(externalTree);\n const outsidePressFn = useStableCallback(typeof outsidePressProp === 'function' ? outsidePressProp : () => false);\n const outsidePress = typeof outsidePressProp === 'function' ? outsidePressFn : outsidePressProp;\n const endedOrStartedInsideRef = React.useRef(false);\n const {\n escapeKey: escapeKeyBubbles,\n outsidePress: outsidePressBubbles\n } = normalizeProp(bubbles);\n const touchStateRef = React.useRef(null);\n const cancelDismissOnEndTimeout = useTimeout();\n const clearInsideReactTreeTimeout = useTimeout();\n const clearInsideReactTree = useStableCallback(() => {\n clearInsideReactTreeTimeout.clear();\n dataRef.current.insideReactTree = false;\n });\n const isComposingRef = React.useRef(false);\n const currentPointerTypeRef = React.useRef('');\n const trackPointerType = useStableCallback(event => {\n currentPointerTypeRef.current = event.pointerType;\n });\n const getOutsidePressEvent = useStableCallback(() => {\n const type = currentPointerTypeRef.current;\n const computedType = type === 'pen' || !type ? 'mouse' : type;\n const resolved = typeof outsidePressEvent === 'function' ? outsidePressEvent() : outsidePressEvent;\n if (typeof resolved === 'string') {\n return resolved;\n }\n return resolved[computedType];\n });\n const closeOnEscapeKeyDown = useStableCallback(event => {\n if (!open || !enabled || !escapeKey || event.key !== 'Escape') {\n return;\n }\n\n // Wait until IME is settled. Pressing `Escape` while composing should\n // close the compose menu, but not the floating element.\n if (isComposingRef.current) {\n return;\n }\n const nodeId = dataRef.current.floatingContext?.nodeId;\n const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];\n if (!escapeKeyBubbles) {\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n if (child.context?.open && !child.context.dataRef.current.__escapeKeyBubbles) {\n shouldDismiss = false;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n }\n const native = isReactEvent(event) ? event.nativeEvent : event;\n const eventDetails = createChangeEventDetails(REASONS.escapeKey, native);\n store.setOpen(false, eventDetails);\n if (!escapeKeyBubbles && !eventDetails.isPropagationAllowed) {\n event.stopPropagation();\n }\n });\n const shouldIgnoreEvent = useStableCallback(event => {\n const computedOutsidePressEvent = getOutsidePressEvent();\n return computedOutsidePressEvent === 'intentional' && event.type !== 'click' || computedOutsidePressEvent === 'sloppy' && event.type === 'click';\n });\n const markInsideReactTree = useStableCallback(() => {\n dataRef.current.insideReactTree = true;\n clearInsideReactTreeTimeout.start(0, clearInsideReactTree);\n });\n const closeOnPressOutside = useStableCallback((event, endedOrStartedInside = false) => {\n if (shouldIgnoreEvent(event)) {\n clearInsideReactTree();\n return;\n }\n if (dataRef.current.insideReactTree) {\n clearInsideReactTree();\n return;\n }\n if (getOutsidePressEvent() === 'intentional' && endedOrStartedInside) {\n return;\n }\n if (typeof outsidePress === 'function' && !outsidePress(event)) {\n return;\n }\n const target = getTarget(event);\n const inertSelector = `[${createAttribute('inert')}]`;\n const markers = getDocument(store.select('floatingElement')).querySelectorAll(inertSelector);\n const triggers = store.context.triggerElements;\n\n // If another trigger is clicked, don't close the floating element.\n if (target && (triggers.hasElement(target) || triggers.hasMatchingElement(trigger => contains(trigger, target)))) {\n return;\n }\n let targetRootAncestor = isElement(target) ? target : null;\n while (targetRootAncestor && !isLastTraversableNode(targetRootAncestor)) {\n const nextParent = getParentNode(targetRootAncestor);\n if (isLastTraversableNode(nextParent) || !isElement(nextParent)) {\n break;\n }\n targetRootAncestor = nextParent;\n }\n\n // Check if the click occurred on a third-party element injected after the\n // floating element rendered.\n if (markers.length && isElement(target) && !isRootElement(target) &&\n // Clicked on a direct ancestor (e.g. FloatingOverlay).\n !contains(target, store.select('floatingElement')) &&\n // If the target root element contains none of the markers, then the\n // element was injected after the floating element rendered.\n Array.from(markers).every(marker => !contains(targetRootAncestor, marker))) {\n return;\n }\n\n // Check if the click occurred on the scrollbar\n // Skip for touch events: scrollbars don't receive touch events on most platforms\n if (isHTMLElement(target) && !('touches' in event)) {\n const lastTraversableNode = isLastTraversableNode(target);\n const style = getComputedStyle(target);\n const scrollRe = /auto|scroll/;\n const isScrollableX = lastTraversableNode || scrollRe.test(style.overflowX);\n const isScrollableY = lastTraversableNode || scrollRe.test(style.overflowY);\n const canScrollX = isScrollableX && target.clientWidth > 0 && target.scrollWidth > target.clientWidth;\n const canScrollY = isScrollableY && target.clientHeight > 0 && target.scrollHeight > target.clientHeight;\n const isRTL = style.direction === 'rtl';\n\n // Check click position relative to scrollbar.\n // In some browsers it is possible to change the <body> (or window)\n // scrollbar to the left side, but is very rare and is difficult to\n // check for. Plus, for modal dialogs with backdrops, it is more\n // important that the backdrop is checked but not so much the window.\n const pressedVerticalScrollbar = canScrollY && (isRTL ? event.offsetX <= target.offsetWidth - target.clientWidth : event.offsetX > target.clientWidth);\n const pressedHorizontalScrollbar = canScrollX && event.offsetY > target.clientHeight;\n if (pressedVerticalScrollbar || pressedHorizontalScrollbar) {\n return;\n }\n }\n const nodeId = dataRef.current.floatingContext?.nodeId;\n const targetIsInsideChildren = tree && getNodeChildren(tree.nodesRef.current, nodeId).some(node => isEventTargetWithin(event, node.context?.elements.floating));\n if (isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement')) || targetIsInsideChildren) {\n return;\n }\n const children = tree ? getNodeChildren(tree.nodesRef.current, nodeId) : [];\n if (children.length > 0) {\n let shouldDismiss = true;\n children.forEach(child => {\n if (child.context?.open && !child.context.dataRef.current.__outsidePressBubbles) {\n shouldDismiss = false;\n }\n });\n if (!shouldDismiss) {\n return;\n }\n }\n store.setOpen(false, createChangeEventDetails(REASONS.outsidePress, event));\n clearInsideReactTree();\n });\n const handlePointerDown = useStableCallback(event => {\n if (getOutsidePressEvent() !== 'sloppy' || event.pointerType === 'touch' || !store.select('open') || !enabled || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\n return;\n }\n closeOnPressOutside(event);\n });\n const handleTouchStart = useStableCallback(event => {\n if (getOutsidePressEvent() !== 'sloppy' || !store.select('open') || !enabled || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\n return;\n }\n const touch = event.touches[0];\n if (touch) {\n touchStateRef.current = {\n startTime: Date.now(),\n startX: touch.clientX,\n startY: touch.clientY,\n dismissOnTouchEnd: false,\n dismissOnMouseDown: true\n };\n cancelDismissOnEndTimeout.start(1000, () => {\n if (touchStateRef.current) {\n touchStateRef.current.dismissOnTouchEnd = false;\n touchStateRef.current.dismissOnMouseDown = false;\n }\n });\n }\n });\n const handleTouchStartCapture = useStableCallback(event => {\n const target = getTarget(event);\n function callback() {\n handleTouchStart(event);\n target?.removeEventListener(event.type, callback);\n }\n target?.addEventListener(event.type, callback);\n });\n const closeOnPressOutsideCapture = useStableCallback(event => {\n // When click outside is lazy (`up` event), handle dragging.\n // Don't close if:\n // - The click started inside the floating element.\n // - The click ended inside the floating element.\n const endedOrStartedInside = endedOrStartedInsideRef.current;\n endedOrStartedInsideRef.current = false;\n cancelDismissOnEndTimeout.clear();\n if (event.type === 'mousedown' && touchStateRef.current && !touchStateRef.current.dismissOnMouseDown) {\n return;\n }\n const target = getTarget(event);\n function callback() {\n if (event.type === 'pointerdown') {\n handlePointerDown(event);\n } else {\n closeOnPressOutside(event, endedOrStartedInside);\n }\n target?.removeEventListener(event.type, callback);\n }\n target?.addEventListener(event.type, callback);\n });\n const handleTouchMove = useStableCallback(event => {\n if (getOutsidePressEvent() !== 'sloppy' || !touchStateRef.current || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\n return;\n }\n const touch = event.touches[0];\n if (!touch) {\n return;\n }\n const deltaX = Math.abs(touch.clientX - touchStateRef.current.startX);\n const deltaY = Math.abs(touch.clientY - touchStateRef.current.startY);\n const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n if (distance > 5) {\n touchStateRef.current.dismissOnTouchEnd = true;\n }\n if (distance > 10) {\n closeOnPressOutside(event);\n cancelDismissOnEndTimeout.clear();\n touchStateRef.current = null;\n }\n });\n const handleTouchMoveCapture = useStableCallback(event => {\n const target = getTarget(event);\n function callback() {\n handleTouchMove(event);\n target?.removeEventListener(event.type, callback);\n }\n target?.addEventListener(event.type, callback);\n });\n const handleTouchEnd = useStableCallback(event => {\n if (getOutsidePressEvent() !== 'sloppy' || !touchStateRef.current || isEventTargetWithin(event, store.select('floatingElement')) || isEventTargetWithin(event, store.select('domReferenceElement'))) {\n return;\n }\n if (touchStateRef.current.dismissOnTouchEnd) {\n closeOnPressOutside(event);\n }\n cancelDismissOnEndTimeout.clear();\n touchStateRef.current = null;\n });\n const handleTouchEndCapture = useStableCallback(event => {\n const target = getTarget(event);\n function callback() {\n handleTouchEnd(event);\n target?.removeEventListener(event.type, callback);\n }\n target?.addEventListener(event.type, callback);\n });\n React.useEffect(() => {\n if (!open || !enabled) {\n return undefined;\n }\n dataRef.current.__escapeKeyBubbles = escapeKeyBubbles;\n dataRef.current.__outsidePressBubbles = outsidePressBubbles;\n const compositionTimeout = new Timeout();\n function onScroll(event) {\n store.setOpen(false, createChangeEventDetails(REASONS.none, event));\n }\n function handleCompositionStart() {\n compositionTimeout.clear();\n isComposingRef.current = true;\n }\n function handleCompositionEnd() {\n // Safari fires `compositionend` before `keydown`, so we need to wait\n // until the next tick to set `isComposing` to `false`.\n // https://bugs.webkit.org/show_bug.cgi?id=165004\n compositionTimeout.start(\n // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.\n // Only apply to WebKit for the test to remain 0ms.\n isWebKit() ? 5 : 0, () => {\n isComposingRef.current = false;\n });\n }\n const doc = getDocument(floatingElement);\n doc.addEventListener('pointerdown', trackPointerType, true);\n if (escapeKey) {\n doc.addEventListener('keydown', closeOnEscapeKeyDown);\n doc.addEventListener('compositionstart', handleCompositionStart);\n doc.addEventListener('compositionend', handleCompositionEnd);\n }\n if (outsidePress) {\n doc.addEventListener('click', closeOnPressOutsideCapture, true);\n doc.addEventListener('pointerdown', closeOnPressOutsideCapture, true);\n doc.addEventListener('touchstart', handleTouchStartCapture, true);\n doc.addEventListener('touchmove', handleTouchMoveCapture, true);\n doc.addEventListener('touchend', handleTouchEndCapture, true);\n doc.addEventListener('mousedown', closeOnPressOutsideCapture, true);\n }\n let ancestors = [];\n if (ancestorScroll) {\n if (isElement(domReferenceElement)) {\n ancestors = getOverflowAncestors(domReferenceElement);\n }\n if (isElement(floatingElement)) {\n ancestors = ancestors.concat(getOverflowAncestors(floatingElement));\n }\n if (!isElement(referenceElement) && referenceElement && referenceElement.contextElement) {\n ancestors = ancestors.concat(getOverflowAncestors(referenceElement.contextElement));\n }\n }\n\n // Ignore the visual viewport for scrolling dismissal (allow pinch-zoom)\n ancestors = ancestors.filter(ancestor => ancestor !== doc.defaultView?.visualViewport);\n ancestors.forEach(ancestor => {\n ancestor.addEventListener('scroll', onScroll, {\n passive: true\n });\n });\n return () => {\n doc.removeEventListener('pointerdown', trackPointerType, true);\n if (escapeKey) {\n doc.removeEventListener('keydown', closeOnEscapeKeyDown);\n doc.removeEventListener('compositionstart', handleCompositionStart);\n doc.removeEventListener('compositionend', handleCompositionEnd);\n }\n if (outsidePress) {\n doc.removeEventListener('click', closeOnPressOutsideCapture, true);\n doc.removeEventListener('pointerdown', closeOnPressOutsideCapture, true);\n doc.removeEventListener('touchstart', handleTouchStartCapture, true);\n doc.removeEventListener('touchmove', handleTouchMoveCapture, true);\n doc.removeEventListener('touchend', handleTouchEndCapture, true);\n doc.removeEventListener('mousedown', closeOnPressOutsideCapture, true);\n }\n ancestors.forEach(ancestor => {\n ancestor.removeEventListener('scroll', onScroll);\n });\n compositionTimeout.clear();\n };\n }, [dataRef, floatingElement, referenceElement, domReferenceElement, escapeKey, outsidePress, open, onOpenChange, ancestorScroll, enabled, escapeKeyBubbles, outsidePressBubbles, closeOnEscapeKeyDown, closeOnPressOutside, closeOnPressOutsideCapture, handlePointerDown, handleTouchStartCapture, handleTouchMoveCapture, handleTouchEndCapture, trackPointerType, store]);\n React.useEffect(clearInsideReactTree, [outsidePress, clearInsideReactTree]);\n const reference = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n ...(referencePress && {\n [bubbleHandlerKeys[referencePressEvent]]: event => {\n store.setOpen(false, createChangeEventDetails(REASONS.triggerPress, event.nativeEvent));\n },\n ...(referencePressEvent !== 'intentional' && {\n onClick(event) {\n store.setOpen(false, createChangeEventDetails(REASONS.triggerPress, event.nativeEvent));\n }\n })\n })\n }), [closeOnEscapeKeyDown, store, referencePress, referencePressEvent]);\n const handlePressedInside = useStableCallback(event => {\n const target = getTarget(event.nativeEvent);\n if (!contains(store.select('floatingElement'), target) || event.button !== 0) {\n return;\n }\n endedOrStartedInsideRef.current = true;\n });\n const floating = React.useMemo(() => ({\n onKeyDown: closeOnEscapeKeyDown,\n // `onMouseDown` may be blocked if `event.preventDefault()` is called in\n // `onPointerDown`, such as with <NumberField.ScrubArea>.\n // See https://github.com/mui/base-ui/pull/3379\n onPointerDown: handlePressedInside,\n onMouseDown: handlePressedInside,\n onMouseUp: handlePressedInside,\n onClickCapture: markInsideReactTree,\n onMouseDownCapture: markInsideReactTree,\n onPointerDownCapture: markInsideReactTree,\n onMouseUpCapture: markInsideReactTree,\n onTouchEndCapture: markInsideReactTree,\n onTouchMoveCapture: markInsideReactTree\n }), [closeOnEscapeKeyDown, handlePressedInside, markInsideReactTree]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n trigger: reference\n } : {}, [enabled, reference, floating]);\n}","// src/devModeChecks/identityFunctionCheck.ts\nvar runIdentityFunctionCheck = (resultFunc, inputSelectorsResults, outputSelectorResult) => {\n if (inputSelectorsResults.length === 1 && inputSelectorsResults[0] === outputSelectorResult) {\n let isInputSameAsOutput = false;\n try {\n const emptyObject = {};\n if (resultFunc(emptyObject) === emptyObject)\n isInputSameAsOutput = true;\n } catch {\n }\n if (isInputSameAsOutput) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"The result function returned its own inputs without modification. e.g\\n`createSelector([state => state.todos], todos => todos)`\\nThis could lead to inefficient memoization and unnecessary re-renders.\\nEnsure transformation logic is in the result function, and extraction logic is in the input selectors.\",\n { stack }\n );\n }\n }\n};\n\n// src/devModeChecks/inputStabilityCheck.ts\nvar runInputStabilityCheck = (inputSelectorResultsObject, options, inputSelectorArgs) => {\n const { memoize, memoizeOptions } = options;\n const { inputSelectorResults, inputSelectorResultsCopy } = inputSelectorResultsObject;\n const createAnEmptyObject = memoize(() => ({}), ...memoizeOptions);\n const areInputSelectorResultsEqual = createAnEmptyObject.apply(null, inputSelectorResults) === createAnEmptyObject.apply(null, inputSelectorResultsCopy);\n if (!areInputSelectorResultsEqual) {\n let stack = void 0;\n try {\n throw new Error();\n } catch (e) {\n ;\n ({ stack } = e);\n }\n console.warn(\n \"An input selector returned a different result when passed same arguments.\\nThis means your output selector will likely run more frequently than intended.\\nAvoid returning a new reference inside your input selector, e.g.\\n`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)`\",\n {\n arguments: inputSelectorArgs,\n firstInputs: inputSelectorResults,\n secondInputs: inputSelectorResultsCopy,\n stack\n }\n );\n }\n};\n\n// src/devModeChecks/setGlobalDevModeChecks.ts\nvar globalDevModeChecks = {\n inputStabilityCheck: \"once\",\n identityFunctionCheck: \"once\"\n};\nvar setGlobalDevModeChecks = (devModeChecks) => {\n Object.assign(globalDevModeChecks, devModeChecks);\n};\n\n// src/utils.ts\nvar NOT_FOUND = /* @__PURE__ */ Symbol(\"NOT_FOUND\");\nfunction assertIsFunction(func, errorMessage = `expected a function, instead received ${typeof func}`) {\n if (typeof func !== \"function\") {\n throw new TypeError(errorMessage);\n }\n}\nfunction assertIsObject(object, errorMessage = `expected an object, instead received ${typeof object}`) {\n if (typeof object !== \"object\") {\n throw new TypeError(errorMessage);\n }\n}\nfunction assertIsArrayOfFunctions(array, errorMessage = `expected all items to be functions, instead received the following types: `) {\n if (!array.every((item) => typeof item === \"function\")) {\n const itemTypes = array.map(\n (item) => typeof item === \"function\" ? `function ${item.name || \"unnamed\"}()` : typeof item\n ).join(\", \");\n throw new TypeError(`${errorMessage}[${itemTypes}]`);\n }\n}\nvar ensureIsArray = (item) => {\n return Array.isArray(item) ? item : [item];\n};\nfunction getDependencies(createSelectorArgs) {\n const dependencies = Array.isArray(createSelectorArgs[0]) ? createSelectorArgs[0] : createSelectorArgs;\n assertIsArrayOfFunctions(\n dependencies,\n `createSelector expects all input-selectors to be functions, but received the following types: `\n );\n return dependencies;\n}\nfunction collectInputSelectorResults(dependencies, inputSelectorArgs) {\n const inputSelectorResults = [];\n const { length } = dependencies;\n for (let i = 0; i < length; i++) {\n inputSelectorResults.push(dependencies[i].apply(null, inputSelectorArgs));\n }\n return inputSelectorResults;\n}\nvar getDevModeChecksExecutionInfo = (firstRun, devModeChecks) => {\n const { identityFunctionCheck, inputStabilityCheck } = {\n ...globalDevModeChecks,\n ...devModeChecks\n };\n return {\n identityFunctionCheck: {\n shouldRun: identityFunctionCheck === \"always\" || identityFunctionCheck === \"once\" && firstRun,\n run: runIdentityFunctionCheck\n },\n inputStabilityCheck: {\n shouldRun: inputStabilityCheck === \"always\" || inputStabilityCheck === \"once\" && firstRun,\n run: runInputStabilityCheck\n }\n };\n};\n\n// src/autotrackMemoize/autotracking.ts\nvar $REVISION = 0;\nvar CURRENT_TRACKER = null;\nvar Cell = class {\n revision = $REVISION;\n _value;\n _lastValue;\n _isEqual = tripleEq;\n constructor(initialValue, isEqual = tripleEq) {\n this._value = this._lastValue = initialValue;\n this._isEqual = isEqual;\n }\n // Whenever a storage value is read, it'll add itself to the current tracker if\n // one exists, entangling its state with that cache.\n get value() {\n CURRENT_TRACKER?.add(this);\n return this._value;\n }\n // Whenever a storage value is updated, we bump the global revision clock,\n // assign the revision for this storage to the new value, _and_ we schedule a\n // rerender. This is important, and it's what makes autotracking _pull_\n // based. We don't actively tell the caches which depend on the storage that\n // anything has happened. Instead, we recompute the caches when needed.\n set value(newValue) {\n if (this.value === newValue)\n return;\n this._value = newValue;\n this.revision = ++$REVISION;\n }\n};\nfunction tripleEq(a, b) {\n return a === b;\n}\nvar TrackingCache = class {\n _cachedValue;\n _cachedRevision = -1;\n _deps = [];\n hits = 0;\n fn;\n constructor(fn) {\n this.fn = fn;\n }\n clear() {\n this._cachedValue = void 0;\n this._cachedRevision = -1;\n this._deps = [];\n this.hits = 0;\n }\n get value() {\n if (this.revision > this._cachedRevision) {\n const { fn } = this;\n const currentTracker = /* @__PURE__ */ new Set();\n const prevTracker = CURRENT_TRACKER;\n CURRENT_TRACKER = currentTracker;\n this._cachedValue = fn();\n CURRENT_TRACKER = prevTracker;\n this.hits++;\n this._deps = Array.from(currentTracker);\n this._cachedRevision = this.revision;\n }\n CURRENT_TRACKER?.add(this);\n return this._cachedValue;\n }\n get revision() {\n return Math.max(...this._deps.map((d) => d.revision), 0);\n }\n};\nfunction getValue(cell) {\n if (!(cell instanceof Cell)) {\n console.warn(\"Not a valid cell! \", cell);\n }\n return cell.value;\n}\nfunction setValue(storage, value) {\n if (!(storage instanceof Cell)) {\n throw new TypeError(\n \"setValue must be passed a tracked store created with `createStorage`.\"\n );\n }\n storage.value = storage._lastValue = value;\n}\nfunction createCell(initialValue, isEqual = tripleEq) {\n return new Cell(initialValue, isEqual);\n}\nfunction createCache(fn) {\n assertIsFunction(\n fn,\n \"the first parameter to `createCache` must be a function\"\n );\n return new TrackingCache(fn);\n}\n\n// src/autotrackMemoize/tracking.ts\nvar neverEq = (a, b) => false;\nfunction createTag() {\n return createCell(null, neverEq);\n}\nfunction dirtyTag(tag, value) {\n setValue(tag, value);\n}\nvar consumeCollection = (node) => {\n let tag = node.collectionTag;\n if (tag === null) {\n tag = node.collectionTag = createTag();\n }\n getValue(tag);\n};\nvar dirtyCollection = (node) => {\n const tag = node.collectionTag;\n if (tag !== null) {\n dirtyTag(tag, null);\n }\n};\n\n// src/autotrackMemoize/proxy.ts\nvar REDUX_PROXY_LABEL = Symbol();\nvar nextId = 0;\nvar proto = Object.getPrototypeOf({});\nvar ObjectTreeNode = class {\n constructor(value) {\n this.value = value;\n this.value = value;\n this.tag.value = value;\n }\n proxy = new Proxy(this, objectProxyHandler);\n tag = createTag();\n tags = {};\n children = {};\n collectionTag = null;\n id = nextId++;\n};\nvar objectProxyHandler = {\n get(node, key) {\n function calculateResult() {\n const { value } = node;\n const childValue = Reflect.get(value, key);\n if (typeof key === \"symbol\") {\n return childValue;\n }\n if (key in proto) {\n return childValue;\n }\n if (typeof childValue === \"object\" && childValue !== null) {\n let childNode = node.children[key];\n if (childNode === void 0) {\n childNode = node.children[key] = createNode(childValue);\n }\n if (childNode.tag) {\n getValue(childNode.tag);\n }\n return childNode.proxy;\n } else {\n let tag = node.tags[key];\n if (tag === void 0) {\n tag = node.tags[key] = createTag();\n tag.value = childValue;\n }\n getValue(tag);\n return childValue;\n }\n }\n const res = calculateResult();\n return res;\n },\n ownKeys(node) {\n consumeCollection(node);\n return Reflect.ownKeys(node.value);\n },\n getOwnPropertyDescriptor(node, prop) {\n return Reflect.getOwnPropertyDescriptor(node.value, prop);\n },\n has(node, prop) {\n return Reflect.has(node.value, prop);\n }\n};\nvar ArrayTreeNode = class {\n constructor(value) {\n this.value = value;\n this.value = value;\n this.tag.value = value;\n }\n proxy = new Proxy([this], arrayProxyHandler);\n tag = createTag();\n tags = {};\n children = {};\n collectionTag = null;\n id = nextId++;\n};\nvar arrayProxyHandler = {\n get([node], key) {\n if (key === \"length\") {\n consumeCollection(node);\n }\n return objectProxyHandler.get(node, key);\n },\n ownKeys([node]) {\n return objectProxyHandler.ownKeys(node);\n },\n getOwnPropertyDescriptor([node], prop) {\n return objectProxyHandler.getOwnPropertyDescriptor(node, prop);\n },\n has([node], prop) {\n return objectProxyHandler.has(node, prop);\n }\n};\nfunction createNode(value) {\n if (Array.isArray(value)) {\n return new ArrayTreeNode(value);\n }\n return new ObjectTreeNode(value);\n}\nfunction updateNode(node, newValue) {\n const { value, tags, children } = node;\n node.value = newValue;\n if (Array.isArray(value) && Array.isArray(newValue) && value.length !== newValue.length) {\n dirtyCollection(node);\n } else {\n if (value !== newValue) {\n let oldKeysSize = 0;\n let newKeysSize = 0;\n let anyKeysAdded = false;\n for (const _key in value) {\n oldKeysSize++;\n }\n for (const key in newValue) {\n newKeysSize++;\n if (!(key in value)) {\n anyKeysAdded = true;\n break;\n }\n }\n const isDifferent = anyKeysAdded || oldKeysSize !== newKeysSize;\n if (isDifferent) {\n dirtyCollection(node);\n }\n }\n }\n for (const key in tags) {\n const childValue = value[key];\n const newChildValue = newValue[key];\n if (childValue !== newChildValue) {\n dirtyCollection(node);\n dirtyTag(tags[key], newChildValue);\n }\n if (typeof newChildValue === \"object\" && newChildValue !== null) {\n delete tags[key];\n }\n }\n for (const key in children) {\n const childNode = children[key];\n const newChildValue = newValue[key];\n const childValue = childNode.value;\n if (childValue === newChildValue) {\n continue;\n } else if (typeof newChildValue === \"object\" && newChildValue !== null) {\n updateNode(childNode, newChildValue);\n } else {\n deleteNode(childNode);\n delete children[key];\n }\n }\n}\nfunction deleteNode(node) {\n if (node.tag) {\n dirtyTag(node.tag, null);\n }\n dirtyCollection(node);\n for (const key in node.tags) {\n dirtyTag(node.tags[key], null);\n }\n for (const key in node.children) {\n deleteNode(node.children[key]);\n }\n}\n\n// src/lruMemoize.ts\nfunction createSingletonCache(equals) {\n let entry;\n return {\n get(key) {\n if (entry && equals(entry.key, key)) {\n return entry.value;\n }\n return NOT_FOUND;\n },\n put(key, value) {\n entry = { key, value };\n },\n getEntries() {\n return entry ? [entry] : [];\n },\n clear() {\n entry = void 0;\n }\n };\n}\nfunction createLruCache(maxSize, equals) {\n let entries = [];\n function get(key) {\n const cacheIndex = entries.findIndex((entry) => equals(key, entry.key));\n if (cacheIndex > -1) {\n const entry = entries[cacheIndex];\n if (cacheIndex > 0) {\n entries.splice(cacheIndex, 1);\n entries.unshift(entry);\n }\n return entry.value;\n }\n return NOT_FOUND;\n }\n function put(key, value) {\n if (get(key) === NOT_FOUND) {\n entries.unshift({ key, value });\n if (entries.length > maxSize) {\n entries.pop();\n }\n }\n }\n function getEntries() {\n return entries;\n }\n function clear() {\n entries = [];\n }\n return { get, put, getEntries, clear };\n}\nvar referenceEqualityCheck = (a, b) => a === b;\nfunction createCacheKeyComparator(equalityCheck) {\n return function areArgumentsShallowlyEqual(prev, next) {\n if (prev === null || next === null || prev.length !== next.length) {\n return false;\n }\n const { length } = prev;\n for (let i = 0; i < length; i++) {\n if (!equalityCheck(prev[i], next[i])) {\n return false;\n }\n }\n return true;\n };\n}\nfunction lruMemoize(func, equalityCheckOrOptions) {\n const providedOptions = typeof equalityCheckOrOptions === \"object\" ? equalityCheckOrOptions : { equalityCheck: equalityCheckOrOptions };\n const {\n equalityCheck = referenceEqualityCheck,\n maxSize = 1,\n resultEqualityCheck\n } = providedOptions;\n const comparator = createCacheKeyComparator(equalityCheck);\n let resultsCount = 0;\n const cache = maxSize <= 1 ? createSingletonCache(comparator) : createLruCache(maxSize, comparator);\n function memoized() {\n let value = cache.get(arguments);\n if (value === NOT_FOUND) {\n value = func.apply(null, arguments);\n resultsCount++;\n if (resultEqualityCheck) {\n const entries = cache.getEntries();\n const matchingEntry = entries.find(\n (entry) => resultEqualityCheck(entry.value, value)\n );\n if (matchingEntry) {\n value = matchingEntry.value;\n resultsCount !== 0 && resultsCount--;\n }\n }\n cache.put(arguments, value);\n }\n return value;\n }\n memoized.clearCache = () => {\n cache.clear();\n memoized.resetResultsCount();\n };\n memoized.resultsCount = () => resultsCount;\n memoized.resetResultsCount = () => {\n resultsCount = 0;\n };\n return memoized;\n}\n\n// src/autotrackMemoize/autotrackMemoize.ts\nfunction autotrackMemoize(func) {\n const node = createNode(\n []\n );\n let lastArgs = null;\n const shallowEqual = createCacheKeyComparator(referenceEqualityCheck);\n const cache = createCache(() => {\n const res = func.apply(null, node.proxy);\n return res;\n });\n function memoized() {\n if (!shallowEqual(lastArgs, arguments)) {\n updateNode(node, arguments);\n lastArgs = arguments;\n }\n return cache.value;\n }\n memoized.clearCache = () => {\n return cache.clear();\n };\n return memoized;\n}\n\n// src/weakMapMemoize.ts\nvar StrongRef = class {\n constructor(value) {\n this.value = value;\n }\n deref() {\n return this.value;\n }\n};\nvar Ref = typeof WeakRef !== \"undefined\" ? WeakRef : StrongRef;\nvar UNTERMINATED = 0;\nvar TERMINATED = 1;\nfunction createCacheNode() {\n return {\n s: UNTERMINATED,\n v: void 0,\n o: null,\n p: null\n };\n}\nfunction weakMapMemoize(func, options = {}) {\n let fnNode = createCacheNode();\n const { resultEqualityCheck } = options;\n let lastResult;\n let resultsCount = 0;\n function memoized() {\n let cacheNode = fnNode;\n const { length } = arguments;\n for (let i = 0, l = length; i < l; i++) {\n const arg = arguments[i];\n if (typeof arg === \"function\" || typeof arg === \"object\" && arg !== null) {\n let objectCache = cacheNode.o;\n if (objectCache === null) {\n cacheNode.o = objectCache = /* @__PURE__ */ new WeakMap();\n }\n const objectNode = objectCache.get(arg);\n if (objectNode === void 0) {\n cacheNode = createCacheNode();\n objectCache.set(arg, cacheNode);\n } else {\n cacheNode = objectNode;\n }\n } else {\n let primitiveCache = cacheNode.p;\n if (primitiveCache === null) {\n cacheNode.p = primitiveCache = /* @__PURE__ */ new Map();\n }\n const primitiveNode = primitiveCache.get(arg);\n if (primitiveNode === void 0) {\n cacheNode = createCacheNode();\n primitiveCache.set(arg, cacheNode);\n } else {\n cacheNode = primitiveNode;\n }\n }\n }\n const terminatedNode = cacheNode;\n let result;\n if (cacheNode.s === TERMINATED) {\n result = cacheNode.v;\n } else {\n result = func.apply(null, arguments);\n resultsCount++;\n if (resultEqualityCheck) {\n const lastResultValue = lastResult?.deref?.() ?? lastResult;\n if (lastResultValue != null && resultEqualityCheck(lastResultValue, result)) {\n result = lastResultValue;\n resultsCount !== 0 && resultsCount--;\n }\n const needsWeakRef = typeof result === \"object\" && result !== null || typeof result === \"function\";\n lastResult = needsWeakRef ? new Ref(result) : result;\n }\n }\n terminatedNode.s = TERMINATED;\n terminatedNode.v = result;\n return result;\n }\n memoized.clearCache = () => {\n fnNode = createCacheNode();\n memoized.resetResultsCount();\n };\n memoized.resultsCount = () => resultsCount;\n memoized.resetResultsCount = () => {\n resultsCount = 0;\n };\n return memoized;\n}\n\n// src/createSelectorCreator.ts\nfunction createSelectorCreator(memoizeOrOptions, ...memoizeOptionsFromArgs) {\n const createSelectorCreatorOptions = typeof memoizeOrOptions === \"function\" ? {\n memoize: memoizeOrOptions,\n memoizeOptions: memoizeOptionsFromArgs\n } : memoizeOrOptions;\n const createSelector2 = (...createSelectorArgs) => {\n let recomputations = 0;\n let dependencyRecomputations = 0;\n let lastResult;\n let directlyPassedOptions = {};\n let resultFunc = createSelectorArgs.pop();\n if (typeof resultFunc === \"object\") {\n directlyPassedOptions = resultFunc;\n resultFunc = createSelectorArgs.pop();\n }\n assertIsFunction(\n resultFunc,\n `createSelector expects an output function after the inputs, but received: [${typeof resultFunc}]`\n );\n const combinedOptions = {\n ...createSelectorCreatorOptions,\n ...directlyPassedOptions\n };\n const {\n memoize,\n memoizeOptions = [],\n argsMemoize = weakMapMemoize,\n argsMemoizeOptions = [],\n devModeChecks = {}\n } = combinedOptions;\n const finalMemoizeOptions = ensureIsArray(memoizeOptions);\n const finalArgsMemoizeOptions = ensureIsArray(argsMemoizeOptions);\n const dependencies = getDependencies(createSelectorArgs);\n const memoizedResultFunc = memoize(function recomputationWrapper() {\n recomputations++;\n return resultFunc.apply(\n null,\n arguments\n );\n }, ...finalMemoizeOptions);\n let firstRun = true;\n const selector = argsMemoize(function dependenciesChecker() {\n dependencyRecomputations++;\n const inputSelectorResults = collectInputSelectorResults(\n dependencies,\n arguments\n );\n lastResult = memoizedResultFunc.apply(null, inputSelectorResults);\n if (process.env.NODE_ENV !== \"production\") {\n const { identityFunctionCheck, inputStabilityCheck } = getDevModeChecksExecutionInfo(firstRun, devModeChecks);\n if (identityFunctionCheck.shouldRun) {\n identityFunctionCheck.run(\n resultFunc,\n inputSelectorResults,\n lastResult\n );\n }\n if (inputStabilityCheck.shouldRun) {\n const inputSelectorResultsCopy = collectInputSelectorResults(\n dependencies,\n arguments\n );\n inputStabilityCheck.run(\n { inputSelectorResults, inputSelectorResultsCopy },\n { memoize, memoizeOptions: finalMemoizeOptions },\n arguments\n );\n }\n if (firstRun)\n firstRun = false;\n }\n return lastResult;\n }, ...finalArgsMemoizeOptions);\n return Object.assign(selector, {\n resultFunc,\n memoizedResultFunc,\n dependencies,\n dependencyRecomputations: () => dependencyRecomputations,\n resetDependencyRecomputations: () => {\n dependencyRecomputations = 0;\n },\n lastResult: () => lastResult,\n recomputations: () => recomputations,\n resetRecomputations: () => {\n recomputations = 0;\n },\n memoize,\n argsMemoize\n });\n };\n Object.assign(createSelector2, {\n withTypes: () => createSelector2\n });\n return createSelector2;\n}\nvar createSelector = /* @__PURE__ */ createSelectorCreator(weakMapMemoize);\n\n// src/createStructuredSelector.ts\nvar createStructuredSelector = Object.assign(\n (inputSelectorsObject, selectorCreator = createSelector) => {\n assertIsObject(\n inputSelectorsObject,\n `createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof inputSelectorsObject}`\n );\n const inputSelectorKeys = Object.keys(inputSelectorsObject);\n const dependencies = inputSelectorKeys.map(\n (key) => inputSelectorsObject[key]\n );\n const structuredSelector = selectorCreator(\n dependencies,\n (...inputSelectorResults) => {\n return inputSelectorResults.reduce((composition, value, index) => {\n composition[inputSelectorKeys[index]] = value;\n return composition;\n }, {});\n }\n );\n return structuredSelector;\n },\n { withTypes: () => createStructuredSelector }\n);\nexport {\n createSelector,\n createSelectorCreator,\n createStructuredSelector,\n lruMemoize,\n referenceEqualityCheck,\n setGlobalDevModeChecks,\n autotrackMemoize as unstable_autotrackMemoize,\n weakMapMemoize\n};\n//# sourceMappingURL=reselect.mjs.map","import _formatErrorMessage from \"../formatErrorMessage.js\";\nimport { lruMemoize, createSelectorCreator } from 'reselect';\n\n/* eslint-disable no-underscore-dangle */ // __cacheKey__\n\nconst reselectCreateSelector = createSelectorCreator({\n memoize: lruMemoize,\n memoizeOptions: {\n maxSize: 1,\n equalityCheck: Object.is\n }\n});\n/**\n * Creates a selector function that can be used to derive values from the store's state.\n * The selector can take up to three additional arguments that can be used in the selector logic.\n * This function accepts up to six functions and combines them into a single selector function.\n * The last parameter is the combiner function that combines the results of the previous selectors.\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 */\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 new Error('Missing arguments');\n }\n return selector;\n};\n/* eslint-enable id-denylist */\n\nexport const createSelectorMemoized = (...selectors) => {\n const cache = new WeakMap();\n let nextCacheId = 1;\n const combiner = selectors[selectors.length - 1];\n const nSelectors = selectors.length - 1 || 1;\n // (s1, s2, ..., sN, a1, a2, a3) => { ... }\n const argsLength = combiner.length - nSelectors;\n if (argsLength > 3) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Unsupported number of arguments' : _formatErrorMessage(2));\n }\n const selector = (state, a1, a2, a3) => {\n let cacheKey = state.__cacheKey__;\n if (!cacheKey) {\n cacheKey = {\n id: nextCacheId\n };\n state.__cacheKey__ = cacheKey;\n nextCacheId += 1;\n }\n let fn = cache.get(cacheKey);\n if (!fn) {\n let reselectArgs = selectors;\n const selectorArgs = [undefined, undefined, undefined];\n switch (argsLength) {\n case 0:\n break;\n case 1:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], combiner];\n break;\n }\n case 2:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], () => selectorArgs[1], combiner];\n break;\n }\n case 3:\n {\n reselectArgs = [...selectors.slice(0, -1), () => selectorArgs[0], () => selectorArgs[1], () => selectorArgs[2], combiner];\n break;\n }\n default:\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Unsupported number of arguments' : _formatErrorMessage(2));\n }\n fn = reselectCreateSelector(...reselectArgs);\n fn.selectorArgs = selectorArgs;\n cache.set(cacheKey, fn);\n }\n fn.selectorArgs[0] = a1;\n fn.selectorArgs[1] = a2;\n fn.selectorArgs[2] = a3;\n\n // prettier-ignore\n switch (argsLength) {\n case 0:\n return fn(state);\n case 1:\n return fn(state, a1);\n case 2:\n return fn(state, a1, a2);\n case 3:\n return fn(state, a1, a2, a3);\n default:\n throw new Error('unreachable');\n }\n };\n return selector;\n};","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\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\";\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 ? useStoreR19 : 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}\nfunction useStoreLegacy(store, selector, a1, a2, a3) {\n return useSyncExternalStoreWithSelector(store.subscribe, store.getSnapshot, store.getSnapshot, state => selector(state, a1, a2, a3));\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 Store.prototype.setState.call(this, {\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 Store.prototype.setState.call(this, {\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 Store.prototype.setState.call(this, newState);\n }\n}","/* False positives - ESLint thinks we're calling a hook from a class component. */\n/* eslint-disable react-hooks/rules-of-hooks */\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 * Keeps track of which properties are controlled.\n */\n controlledValues = new Map();\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 useIsoLayoutEffect(() => {\n if (this.state[key] !== value) {\n this.set(key, value);\n }\n }, [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 useIsoLayoutEffect(() => {\n if (this.state[key] !== value) {\n this.set(key, value);\n }\n return () => {\n this.set(key, undefined);\n };\n }, [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 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 this.update(statePart);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencies);\n }\n\n /**\n * Registers a controllable prop pair (`controlled`, `defaultValue`) for a specific key.\n * - If `controlled` is non-undefined, the key is marked as controlled and the store's\n * state at `key` is updated to match `controlled`. Local writes to that key are ignored.\n * - If `controlled` is undefined, the key is marked as uncontrolled. The store's state\n * is initialized to `defaultValue` on first render and can be updated with local writes.\n */\n useControlledProp(key, controlled, defaultValue) {\n React.useDebugValue(key);\n const isControlled = controlled !== undefined;\n if (process.env.NODE_ENV !== 'production') {\n const previouslyControlled = this.controlledValues.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 if (!this.controlledValues.has(key)) {\n // First time initialization\n this.controlledValues.set(key, isControlled);\n if (!isControlled && !Object.is(this.state[key], defaultValue)) {\n super.setState({\n ...this.state,\n [key]: defaultValue\n });\n }\n }\n useIsoLayoutEffect(() => {\n if (isControlled && !Object.is(this.state[key], controlled)) {\n // Set the internal state to match the controlled value.\n super.setState({\n ...this.state,\n [key]: controlled\n });\n }\n }, [key, controlled, defaultValue, isControlled]);\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 * If the key is controlled (registered via {@link useControlledProp} with a non-undefined value),\n * the update is ignored and no listeners are notified.\n *\n * @param key The state key to update.\n * @param value The new value to set for the specified key.\n */\n set(key, value) {\n if (this.controlledValues.get(key) === true) {\n // Ignore updates to controlled values\n return;\n }\n super.set(key, value);\n }\n\n /**\n * Merges the provided changes into the current state and notifies listeners if there are changes.\n * Controlled keys are filtered out and not updated.\n *\n * @param values An object containing the changes to apply to the current state.\n */\n update(values) {\n const newValues = {\n ...values\n };\n for (const key in newValues) {\n if (!Object.hasOwn(newValues, key)) {\n continue;\n }\n if (this.controlledValues.get(key) === true) {\n // Ignore updates to controlled values\n delete newValues[key];\n continue;\n }\n }\n super.update(newValues);\n }\n\n /**\n * Updates the entire store's state and notifies all registered listeners.\n * Controlled keys are left unchanged; only uncontrolled keys from `newState` are applied.\n *\n * @param newState The new state to set for the store.\n */\n setState(newState) {\n const newValues = {\n ...newState\n };\n for (const key in newValues) {\n if (!Object.hasOwn(newValues, key)) {\n continue;\n }\n if (this.controlledValues.get(key) === true) {\n // Ignore updates to controlled values\n delete newValues[key];\n continue;\n }\n }\n super.setState({\n ...this.state,\n ...newValues\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 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 useState = (key, a1, a2, a3) => {\n React.useDebugValue(key);\n const selector = this.selectors[key];\n const value = useStore(this, selector, a1, a2, a3);\n return value;\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}","import { createSelector, ReactStore } from '@base-ui/utils/store';\nimport { createEventEmitter } from \"../utils/createEventEmitter.js\";\nimport { isClickLikeEvent } from \"../utils.js\";\nconst selectors = {\n open: createSelector(state => state.open),\n domReferenceElement: createSelector(state => state.domReferenceElement),\n referenceElement: createSelector(state => state.positionReference ?? state.referenceElement),\n floatingElement: createSelector(state => state.floatingElement),\n floatingId: createSelector(state => state.floatingId)\n};\nexport class FloatingRootStore extends ReactStore {\n constructor(options) {\n const {\n nested,\n noEmit,\n onOpenChange,\n triggerElements,\n ...initialState\n } = options;\n super({\n ...initialState,\n positionReference: initialState.referenceElement,\n domReferenceElement: initialState.referenceElement\n }, {\n onOpenChange,\n dataRef: {\n current: {}\n },\n events: createEventEmitter(),\n nested,\n noEmit,\n triggerElements\n }, selectors);\n }\n\n /**\n * Emits the `openchange` event through the internal event emitter and calls the `onOpenChange` handler with the provided arguments.\n *\n * @param newOpen The new open state.\n * @param eventDetails Details about the event that triggered the open state change.\n */\n setOpen = (newOpen, eventDetails) => {\n if (!newOpen || !this.state.open ||\n // Prevent a pending hover-open from overwriting a click-open event, while allowing\n // click events to upgrade a hover-open.\n isClickLikeEvent(eventDetails.event)) {\n this.context.dataRef.current.openEvent = newOpen ? eventDetails.event : undefined;\n }\n if (!this.context.noEmit) {\n const details = {\n open: newOpen,\n reason: eventDetails.reason,\n nativeEvent: eventDetails.event,\n nested: this.context.nested,\n triggerElement: eventDetails.trigger\n };\n this.context.events.emit('openchange', details);\n }\n this.context.onOpenChange?.(newOpen, eventDetails);\n };\n}","import * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useTransitionStatus } from \"../useTransitionStatus.js\";\nimport { useOpenChangeComplete } from \"../useOpenChangeComplete.js\";\n/**\n * Returns a callback ref that registers/unregisters the trigger element in the store.\n *\n * @param store The Store instance where the trigger should be registered.\n */\nexport function useTriggerRegistration(id, store) {\n // Keep track of the currently registered element to unregister it on unmount or id change.\n const registeredElementIdRef = React.useRef(null);\n return React.useCallback(element => {\n if (id === undefined) {\n return;\n }\n if (registeredElementIdRef.current !== null) {\n store.context.triggerElements.delete(registeredElementIdRef.current);\n registeredElementIdRef.current = null;\n }\n if (element !== null) {\n registeredElementIdRef.current = id;\n store.context.triggerElements.add(id, element);\n }\n }, [store, id]);\n}\n\n/**\n * Sets up trigger data forwarding to the store.\n *\n * @param triggerId Id of the trigger.\n * @param triggerElement The trigger DOM element.\n * @param store The Store instance managing the popup state.\n * @param stateUpdates An object with state updates to apply when the trigger is active.\n */\nexport function useTriggerDataForwarding(triggerId, triggerElementRef, store, stateUpdates) {\n const isMountedByThisTrigger = store.useState('isMountedByTrigger', triggerId);\n const baseRegisterTrigger = useTriggerRegistration(triggerId, store);\n const registerTrigger = useStableCallback(element => {\n baseRegisterTrigger(element);\n if (element !== null && store.select('open') && store.select('activeTriggerId') == null) {\n // This runs when popup is open, but no active trigger is set.\n // It can happen when using controlled mode and the trigger is mounted after opening or if `triggerId` prop is not set explicitly.\n // In such cases the first trigger to run this code becomes the active trigger (store.select('activeTriggerId') should not return null after that).\n // This is mostly for compatibility with contained triggers where no explicit `triggerId` was required in controlled mode.\n store.update({\n activeTriggerId: triggerId,\n activeTriggerElement: element,\n ...stateUpdates\n });\n }\n });\n useIsoLayoutEffect(() => {\n if (isMountedByThisTrigger) {\n store.update({\n activeTriggerElement: triggerElementRef.current,\n ...stateUpdates\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isMountedByThisTrigger, store, triggerElementRef, ...Object.values(stateUpdates)]);\n return {\n registerTrigger,\n isMountedByThisTrigger\n };\n}\n/**\n * Ensures that when there's only one trigger element registered, it is set as the active trigger.\n * This allows controlled popups to work correctly without an explicit triggerId, maintaining compatibility\n * with the contained triggers.\n *\n * This should be called on the Root part.\n *\n * @param open Whether the popup is open.\n * @param store The Store instance managing the popup state.\n */\nexport function useImplicitActiveTrigger(store) {\n const open = store.useState('open');\n useIsoLayoutEffect(() => {\n if (open && !store.select('activeTriggerId') && store.context.triggerElements.size === 1) {\n const iteratorResult = store.context.triggerElements.entries().next();\n if (!iteratorResult.done) {\n const [implicitTriggerId, implicitTriggerElement] = iteratorResult.value;\n store.update({\n activeTriggerId: implicitTriggerId,\n activeTriggerElement: implicitTriggerElement\n });\n }\n }\n }, [open, store]);\n}\n\n/**\n * Mangages the mounted state of the popup.\n * Sets up the transition status listeners and handles unmounting when needed.\n * Updates the `mounted` and `transitionStatus` states in the store.\n *\n * @param open Whether the popup is open.\n * @param store The Store instance managing the popup state.\n * @param onUnmount Optional callback to be called when the popup is unmounted.\n *\n * @returns A function to forcibly unmount the popup.\n */\nexport function useOpenStateTransitions(open, store, onUnmount) {\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open);\n store.useSyncedValues({\n mounted,\n transitionStatus\n });\n const forceUnmount = useStableCallback(() => {\n setMounted(false);\n store.update({\n activeTriggerId: null,\n activeTriggerElement: null,\n mounted: false\n });\n onUnmount?.();\n store.context.onOpenChangeComplete?.(false);\n });\n const preventUnmountingOnClose = store.useState('preventUnmountingOnClose');\n useOpenChangeComplete({\n enabled: !preventUnmountingOnClose,\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (!open) {\n forceUnmount();\n }\n }\n });\n return {\n forceUnmount,\n transitionStatus\n };\n}","import _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\n/**\n * Data structure to keep track of popup trigger elements by their IDs.\n * Uses both a set of Elements and a map of IDs to Elements for efficient lookups.\n */\nexport class PopupTriggerMap {\n constructor() {\n this.elements = new Set();\n this.idMap = new Map();\n }\n\n /**\n * Adds a trigger element with the given ID.\n *\n * Note: The provided element is assumed to not be registered under multiple IDs.\n */\n add(id, element) {\n const existingElement = this.idMap.get(id);\n if (existingElement === element) {\n return;\n }\n if (existingElement !== undefined) {\n // We assume that the same element won't be registered under multiple ids.\n // This is safe considering how useTriggerRegistration is implemented.\n this.elements.delete(existingElement);\n }\n this.elements.add(element);\n this.idMap.set(id, element);\n if (process.env.NODE_ENV !== 'production') {\n if (this.elements.size !== this.idMap.size) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.' : _formatErrorMessage(87));\n }\n }\n }\n\n /**\n * Removes the trigger element with the given ID.\n */\n delete(id) {\n const element = this.idMap.get(id);\n if (element) {\n this.elements.delete(element);\n this.idMap.delete(id);\n }\n }\n\n /**\n * Whether the given element is registered as a trigger.\n */\n hasElement(element) {\n return this.elements.has(element);\n }\n\n /**\n * Whether there is a registered trigger element matching the given predicate.\n */\n hasMatchingElement(predicate) {\n for (const element of this.elements) {\n if (predicate(element)) {\n return true;\n }\n }\n return false;\n }\n getById(id) {\n return this.idMap.get(id);\n }\n entries() {\n return this.idMap.entries();\n }\n get size() {\n return this.idMap.size;\n }\n}","import { PopupTriggerMap } from \"../../utils/popups/index.js\";\nimport { FloatingRootStore } from \"../components/FloatingRootStore.js\";\nexport function getEmptyRootContext() {\n return new FloatingRootStore({\n open: false,\n floatingElement: null,\n referenceElement: null,\n triggerElements: new PopupTriggerMap(),\n floatingId: '',\n nested: false,\n noEmit: false,\n onOpenChange: undefined\n });\n}","import { createSelector } from '@base-ui/utils/store';\nimport { getEmptyRootContext } from \"../../floating-ui-react/utils/getEmptyRootContext.js\";\nimport { EMPTY_OBJECT } from \"../constants.js\";\n\n/**\n * State common to all popup stores.\n */\n\nexport function createInitialPopupStoreState() {\n return {\n open: false,\n mounted: false,\n transitionStatus: 'idle',\n floatingRootContext: getEmptyRootContext(),\n preventUnmountingOnClose: false,\n payload: undefined,\n activeTriggerId: null,\n activeTriggerElement: null,\n popupElement: null,\n positionerElement: null,\n activeTriggerProps: EMPTY_OBJECT,\n inactiveTriggerProps: EMPTY_OBJECT,\n popupProps: EMPTY_OBJECT\n };\n}\nexport const popupStoreSelectors = {\n open: createSelector(state => state.open),\n mounted: createSelector(state => state.mounted),\n transitionStatus: createSelector(state => state.transitionStatus),\n floatingRootContext: createSelector(state => state.floatingRootContext),\n preventUnmountingOnClose: createSelector(state => state.preventUnmountingOnClose),\n payload: createSelector(state => state.payload),\n activeTriggerId: createSelector(state => state.activeTriggerId),\n activeTriggerElement: createSelector(state => state.mounted ? state.activeTriggerElement : null),\n /**\n * Whether the trigger with the given ID was used to open the popup.\n */\n isTriggerActive: createSelector((state, triggerId) => triggerId !== undefined && state.activeTriggerId === triggerId),\n /**\n * Whether the popup is open and was activated by a trigger with the given ID.\n */\n isOpenedByTrigger: createSelector((state, triggerId) => triggerId !== undefined && state.activeTriggerId === triggerId && state.open),\n /**\n * Whether the popup is mounted and was activated by a trigger with the given ID.\n */\n isMountedByTrigger: createSelector((state, triggerId) => triggerId !== undefined && state.activeTriggerId === triggerId && state.mounted),\n triggerProps: createSelector((state, isActive) => isActive ? state.activeTriggerProps : state.inactiveTriggerProps),\n popupProps: createSelector(state => state.popupProps),\n popupElement: createSelector(state => state.popupElement),\n positionerElement: createSelector(state => state.positionerElement)\n};","import { useId } from '@base-ui/utils/useId';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { isElement } from '@floating-ui/utils/dom';\nimport { useFloatingParentNodeId } from \"../components/FloatingTree.js\";\nimport { FloatingRootStore } from \"../components/FloatingRootStore.js\";\n/**\n * Initializes a FloatingRootStore that is kept in sync with the provided PopupStore.\n * The new instance is created only once and updated on every render.\n */\nexport function useSyncedFloatingRootContext(options) {\n const {\n popupStore,\n noEmit = false,\n treatPopupAsFloatingElement = false,\n onOpenChange\n } = options;\n const floatingId = useId();\n const nested = useFloatingParentNodeId() != null;\n const open = popupStore.useState('open');\n const referenceElement = popupStore.useState('activeTriggerElement');\n const floatingElement = popupStore.useState(treatPopupAsFloatingElement ? 'popupElement' : 'positionerElement');\n const triggerElements = popupStore.context.triggerElements;\n const store = useRefWithInit(() => new FloatingRootStore({\n open,\n referenceElement,\n floatingElement,\n triggerElements,\n onOpenChange,\n floatingId,\n nested,\n noEmit\n })).current;\n useIsoLayoutEffect(() => {\n const valuesToSync = {\n open,\n floatingId,\n referenceElement,\n floatingElement\n };\n if (isElement(referenceElement)) {\n valuesToSync.domReferenceElement = referenceElement;\n }\n store.update(valuesToSync);\n }, [open, floatingId, referenceElement, floatingElement, store]);\n\n // TODO: When `setOpen` is a part of the PopupStore API, we don't need to sync it.\n store.context.onOpenChange = onOpenChange;\n store.context.nested = nested;\n store.context.noEmit = noEmit;\n return store;\n}","import * as React from 'react';\nimport { ACTIVE_KEY, FOCUSABLE_ATTRIBUTE, SELECTED_KEY } from \"../utils/constants.js\";\n/**\n * Merges an array of interaction hooks' props into prop getters, allowing\n * event handler functions to be composed together without overwriting one\n * another.\n * @see https://floating-ui.com/docs/useInteractions\n */\nexport function useInteractions(propsList = []) {\n const referenceDeps = propsList.map(key => key?.reference);\n const floatingDeps = propsList.map(key => key?.floating);\n const itemDeps = propsList.map(key => key?.item);\n const triggerDeps = propsList.map(key => key?.trigger);\n const getReferenceProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'reference'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n referenceDeps);\n const getFloatingProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'floating'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n floatingDeps);\n const getItemProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'item'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n itemDeps);\n const getTriggerProps = React.useCallback(userProps => mergeProps(userProps, propsList, 'trigger'),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n triggerDeps);\n return React.useMemo(() => ({\n getReferenceProps,\n getFloatingProps,\n getItemProps,\n getTriggerProps\n }), [getReferenceProps, getFloatingProps, getItemProps, getTriggerProps]);\n}\n\n/* eslint-disable guard-for-in */\n\nfunction mergeProps(userProps, propsList, elementKey) {\n const eventHandlers = new Map();\n const isItem = elementKey === 'item';\n const outputProps = {};\n if (elementKey === 'floating') {\n outputProps.tabIndex = -1;\n outputProps[FOCUSABLE_ATTRIBUTE] = '';\n }\n for (const key in userProps) {\n if (isItem && userProps) {\n if (key === ACTIVE_KEY || key === SELECTED_KEY) {\n continue;\n }\n }\n outputProps[key] = userProps[key];\n }\n for (let i = 0; i < propsList.length; i += 1) {\n let props;\n const propsOrGetProps = propsList[i]?.[elementKey];\n if (typeof propsOrGetProps === 'function') {\n props = userProps ? propsOrGetProps(userProps) : null;\n } else {\n props = propsOrGetProps;\n }\n if (!props) {\n continue;\n }\n mutablyMergeProps(outputProps, props, isItem, eventHandlers);\n }\n mutablyMergeProps(outputProps, userProps, isItem, eventHandlers);\n return outputProps;\n}\nfunction mutablyMergeProps(outputProps, props, isItem, eventHandlers) {\n for (const key in props) {\n const value = props[key];\n if (isItem && (key === ACTIVE_KEY || key === SELECTED_KEY)) {\n continue;\n }\n if (!key.startsWith('on')) {\n outputProps[key] = value;\n } else {\n if (!eventHandlers.has(key)) {\n eventHandlers.set(key, []);\n }\n if (typeof value === 'function') {\n eventHandlers.get(key)?.push(value);\n outputProps[key] = (...args) => {\n return eventHandlers.get(key)?.map(fn => fn(...args)).find(val => val !== undefined);\n };\n }\n }\n }\n}","import * as React from 'react';\nimport { useId } from '@base-ui/utils/useId';\nimport { getFloatingFocusElement } from \"../utils.js\";\nimport { useFloatingParentNodeId } from \"../components/FloatingTree.js\";\nimport { EMPTY_OBJECT } from \"../../utils/constants.js\";\nconst componentRoleToAriaRoleMap = new Map([['select', 'listbox'], ['combobox', 'listbox'], ['label', false]]);\n\n/**\n * Adds base screen reader props to the reference and floating elements for a\n * given floating element `role`.\n * @see https://floating-ui.com/docs/useRole\n */\nexport function useRole(context, props = {}) {\n const store = 'rootStore' in context ? context.rootStore : context;\n const open = store.useState('open');\n const defaultFloatingId = store.useState('floatingId');\n const domReference = store.useState('domReferenceElement');\n const floatingElement = store.useState('floatingElement');\n const {\n enabled = true,\n role = 'dialog'\n } = props;\n const defaultReferenceId = useId();\n const referenceId = domReference?.id || defaultReferenceId;\n const floatingId = React.useMemo(() => getFloatingFocusElement(floatingElement)?.id || defaultFloatingId, [floatingElement, defaultFloatingId]);\n const ariaRole = componentRoleToAriaRoleMap.get(role) ?? role;\n const parentId = useFloatingParentNodeId();\n const isNested = parentId != null;\n const trigger = React.useMemo(() => {\n if (ariaRole === 'tooltip' || role === 'label') {\n return EMPTY_OBJECT;\n }\n return {\n 'aria-haspopup': ariaRole === 'alertdialog' ? 'dialog' : ariaRole,\n 'aria-expanded': 'false',\n ...(ariaRole === 'listbox' && {\n role: 'combobox'\n }),\n ...(ariaRole === 'menu' && isNested && {\n role: 'menuitem'\n }),\n ...(role === 'select' && {\n 'aria-autocomplete': 'none'\n }),\n ...(role === 'combobox' && {\n 'aria-autocomplete': 'list'\n })\n };\n }, [ariaRole, isNested, role]);\n const reference = React.useMemo(() => {\n if (ariaRole === 'tooltip' || role === 'label') {\n return {\n [`aria-${role === 'label' ? 'labelledby' : 'describedby'}`]: open ? floatingId : undefined\n };\n }\n const triggerProps = trigger;\n return {\n ...triggerProps,\n 'aria-expanded': open ? 'true' : 'false',\n 'aria-controls': open ? floatingId : undefined,\n ...(ariaRole === 'menu' && {\n id: referenceId\n })\n };\n }, [ariaRole, floatingId, open, referenceId, role, trigger]);\n const floating = React.useMemo(() => {\n const floatingProps = {\n id: floatingId,\n ...(ariaRole && {\n role: ariaRole\n })\n };\n if (ariaRole === 'tooltip' || role === 'label') {\n return floatingProps;\n }\n return {\n ...floatingProps,\n ...(ariaRole === 'menu' && {\n 'aria-labelledby': referenceId\n })\n };\n }, [ariaRole, floatingId, referenceId, role]);\n const item = React.useCallback(({\n active,\n selected\n }) => {\n const commonProps = {\n role: 'option',\n ...(active && {\n id: `${floatingId}-fui-option`\n })\n };\n\n // For `menu`, we are unable to tell if the item is a `menuitemradio`\n // or `menuitemcheckbox`. For backwards-compatibility reasons, also\n // avoid defaulting to `menuitem` as it may overwrite custom role props.\n switch (role) {\n case 'select':\n case 'combobox':\n return {\n ...commonProps,\n 'aria-selected': selected\n };\n default:\n }\n return {};\n }, [floatingId, role]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item,\n trigger\n } : {}, [enabled, reference, floating, trigger, item]);\n}","import * as React from 'react';\n/**\n * Provides a cross-browser way to determine the type of the pointer used to click.\n * Safari and Firefox do not provide the PointerEvent to the click handler (they use MouseEvent) yet.\n * Additionally, this implementation detects if the click was triggered by the keyboard.\n *\n * @param handler The function to be called when the button is clicked. The first parameter is the original event and the second parameter is the pointer type.\n */\nexport function useEnhancedClickHandler(handler) {\n const lastClickInteractionTypeRef = React.useRef('');\n const handlePointerDown = React.useCallback(event => {\n if (event.defaultPrevented) {\n return;\n }\n lastClickInteractionTypeRef.current = event.pointerType;\n handler(event, event.pointerType);\n }, [handler]);\n const handleClick = React.useCallback(event => {\n // event.detail has the number of clicks performed on the element. 0 means it was triggered by the keyboard.\n if (event.detail === 0) {\n handler(event, 'keyboard');\n return;\n }\n if ('pointerType' in event) {\n // Chrome and Edge correctly use PointerEvent\n handler(event, event.pointerType);\n }\n handler(event, lastClickInteractionTypeRef.current);\n lastClickInteractionTypeRef.current = '';\n }, [handler]);\n return {\n onClick: handleClick,\n onPointerDown: handlePointerDown\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useEnhancedClickHandler } from '@base-ui/utils/useEnhancedClickHandler';\n\n/**\n * Determines the interaction type (keyboard, mouse, touch, etc.) that opened the component.\n *\n * @param open The open state of the component.\n */\nexport function useOpenInteractionType(open) {\n const [openMethod, setOpenMethod] = React.useState(null);\n const handleTriggerClick = useStableCallback((_, interactionType) => {\n if (!open) {\n setOpenMethod(interactionType);\n }\n });\n const reset = React.useCallback(() => {\n setOpenMethod(null);\n }, []);\n const {\n onClick,\n onPointerDown\n } = useEnhancedClickHandler(handleTriggerClick);\n return React.useMemo(() => ({\n openMethod,\n reset,\n triggerProps: {\n onClick,\n onPointerDown\n }\n }), [openMethod, reset, onClick, onPointerDown]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useScrollLock } from '@base-ui/utils/useScrollLock';\nimport { useDismiss, useInteractions, useRole, useSyncedFloatingRootContext } from \"../../floating-ui-react/index.js\";\nimport { contains, getTarget } from \"../../floating-ui-react/utils.js\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useImplicitActiveTrigger, useOpenStateTransitions } from \"../../utils/popups/index.js\";\nexport function useDialogRoot(params) {\n const {\n store,\n parentContext,\n actionsRef\n } = params;\n const open = store.useState('open');\n const disablePointerDismissal = store.useState('disablePointerDismissal');\n const modal = store.useState('modal');\n const popupElement = store.useState('popupElement');\n const {\n openMethod,\n triggerProps,\n reset: resetOpenInteractionType\n } = useOpenInteractionType(open);\n useImplicitActiveTrigger(store);\n const {\n forceUnmount\n } = useOpenStateTransitions(open, store, () => {\n resetOpenInteractionType();\n });\n const createDialogEventDetails = useStableCallback(reason => {\n const details = createChangeEventDetails(reason);\n details.preventUnmountOnClose = () => {\n store.set('preventUnmountingOnClose', true);\n };\n return details;\n });\n const handleImperativeClose = React.useCallback(() => {\n store.setOpen(false, createDialogEventDetails(REASONS.imperativeAction));\n }, [store, createDialogEventDetails]);\n React.useImperativeHandle(actionsRef, () => ({\n unmount: forceUnmount,\n close: handleImperativeClose\n }), [forceUnmount, handleImperativeClose]);\n const floatingRootContext = useSyncedFloatingRootContext({\n popupStore: store,\n onOpenChange: store.setOpen,\n treatPopupAsFloatingElement: true,\n noEmit: true\n });\n const [ownNestedOpenDialogs, setOwnNestedOpenDialogs] = React.useState(0);\n const isTopmost = ownNestedOpenDialogs === 0;\n const role = useRole(floatingRootContext);\n const dismiss = useDismiss(floatingRootContext, {\n outsidePressEvent() {\n if (store.context.internalBackdropRef.current || store.context.backdropRef.current) {\n return 'intentional';\n }\n // Ensure `aria-hidden` on outside elements is removed immediately\n // on outside press when trapping focus.\n return {\n mouse: modal === 'trap-focus' ? 'sloppy' : 'intentional',\n touch: 'sloppy'\n };\n },\n outsidePress(event) {\n // For mouse events, only accept left button (button 0)\n // For touch events, a single touch is equivalent to left button\n if ('button' in event && event.button !== 0) {\n return false;\n }\n if ('touches' in event && event.touches.length !== 1) {\n return false;\n }\n const target = getTarget(event);\n if (isTopmost && !disablePointerDismissal) {\n const eventTarget = target;\n // Only close if the click occurred on the dialog's owning backdrop.\n // This supports multiple modal dialogs that aren't nested in the React tree:\n // https://github.com/mui/base-ui/issues/1320\n if (modal) {\n return store.context.internalBackdropRef.current || store.context.backdropRef.current ? store.context.internalBackdropRef.current === eventTarget || store.context.backdropRef.current === eventTarget || contains(eventTarget, popupElement) && !eventTarget?.hasAttribute('data-base-ui-portal') : true;\n }\n return true;\n }\n return false;\n },\n escapeKey: isTopmost\n });\n useScrollLock(open && modal === true, popupElement);\n const {\n getReferenceProps,\n getFloatingProps,\n getTriggerProps\n } = useInteractions([role, dismiss]);\n\n // Listen for nested open/close events on this store to maintain the count\n store.useContextCallback('onNestedDialogOpen', ownChildrenCount => {\n setOwnNestedOpenDialogs(ownChildrenCount + 1);\n });\n store.useContextCallback('onNestedDialogClose', () => {\n setOwnNestedOpenDialogs(0);\n });\n\n // Notify parent of our open/close state using parent callbacks, if any\n React.useEffect(() => {\n if (parentContext?.onNestedDialogOpen && open) {\n parentContext.onNestedDialogOpen(ownNestedOpenDialogs);\n }\n if (parentContext?.onNestedDialogClose && !open) {\n parentContext.onNestedDialogClose();\n }\n return () => {\n if (parentContext?.onNestedDialogClose && open) {\n parentContext.onNestedDialogClose();\n }\n };\n }, [open, parentContext, ownNestedOpenDialogs]);\n const activeTriggerProps = React.useMemo(() => getReferenceProps(triggerProps), [getReferenceProps, triggerProps]);\n const inactiveTriggerProps = React.useMemo(() => getTriggerProps(triggerProps), [getTriggerProps, triggerProps]);\n const popupProps = React.useMemo(() => getFloatingProps(), [getFloatingProps]);\n store.useSyncedValues({\n openMethod,\n activeTriggerProps,\n inactiveTriggerProps,\n popupProps,\n floatingRootContext,\n nestedOpenDialogCount: ownNestedOpenDialogs\n });\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const DialogRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DialogRootContext.displayName = \"DialogRootContext\";\nexport function useDialogRootContext(optional) {\n const dialogRootContext = React.useContext(DialogRootContext);\n if (optional === false && dialogRootContext === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.' : _formatErrorMessage(27));\n }\n return dialogRootContext;\n}","import * as React from 'react';\nimport { createSelector, ReactStore } from '@base-ui/utils/store';\nimport { createInitialPopupStoreState, popupStoreSelectors, PopupTriggerMap } from \"../../utils/popups/index.js\";\nconst selectors = {\n ...popupStoreSelectors,\n modal: createSelector(state => state.modal),\n nested: createSelector(state => state.nested),\n nestedOpenDialogCount: createSelector(state => state.nestedOpenDialogCount),\n disablePointerDismissal: createSelector(state => state.disablePointerDismissal),\n openMethod: createSelector(state => state.openMethod),\n descriptionElementId: createSelector(state => state.descriptionElementId),\n titleElementId: createSelector(state => state.titleElementId),\n viewportElement: createSelector(state => state.viewportElement),\n role: createSelector(state => state.role)\n};\nexport class DialogStore extends ReactStore {\n constructor(initialState) {\n super(createInitialState(initialState), {\n popupRef: /*#__PURE__*/React.createRef(),\n backdropRef: /*#__PURE__*/React.createRef(),\n internalBackdropRef: /*#__PURE__*/React.createRef(),\n triggerElements: new PopupTriggerMap(),\n onOpenChange: undefined,\n onOpenChangeComplete: undefined\n }, selectors);\n }\n setOpen = (nextOpen, eventDetails) => {\n eventDetails.preventUnmountOnClose = () => {\n this.set('preventUnmountingOnClose', true);\n };\n if (!nextOpen && eventDetails.trigger == null && this.state.activeTriggerId != null) {\n // When closing the dialog, pass the old trigger to the onOpenChange event\n // so it's not reset too early (potentially causing focus issues in controlled scenarios).\n eventDetails.trigger = this.state.activeTriggerElement ?? undefined;\n }\n this.context.onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n const details = {\n open: nextOpen,\n nativeEvent: eventDetails.event,\n reason: eventDetails.reason,\n nested: this.state.nested\n };\n this.state.floatingRootContext.context.events?.emit('openchange', details);\n const updatedState = {\n open: nextOpen\n };\n\n // If a popup is closing, the `trigger` may be null.\n // We want to keep the previous value so that exit animations are played and focus is returned correctly.\n const newTriggerId = eventDetails.trigger?.id ?? null;\n if (newTriggerId || nextOpen) {\n updatedState.activeTriggerId = newTriggerId;\n updatedState.activeTriggerElement = eventDetails.trigger ?? null;\n }\n this.update(updatedState);\n };\n}\nfunction createInitialState(initialState = {}) {\n return {\n ...createInitialPopupStoreState(),\n modal: true,\n disablePointerDismissal: false,\n popupElement: null,\n viewportElement: null,\n descriptionElementId: undefined,\n titleElementId: undefined,\n openMethod: null,\n nested: false,\n nestedOpenDialogCount: 0,\n role: 'dialog',\n ...initialState\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { useDialogRoot } from \"../../dialog/root/useDialogRoot.js\";\nimport { DialogRootContext, useDialogRootContext } from \"../../dialog/root/DialogRootContext.js\";\nimport { DialogStore } from \"../../dialog/store/DialogStore.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Groups all parts of the alert dialog.\n * Doesn’t render its own HTML element.\n *\n * Documentation: [Base UI Alert Dialog](https://base-ui.com/react/components/alert-dialog)\n */\nexport function AlertDialogRoot(props) {\n const {\n children,\n open: openProp,\n defaultOpen = false,\n onOpenChange,\n onOpenChangeComplete,\n actionsRef,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null\n } = props;\n const parentDialogRootContext = useDialogRootContext();\n const nested = Boolean(parentDialogRootContext);\n const store = useRefWithInit(() => {\n return handle?.store ?? new DialogStore({\n open: openProp ?? defaultOpen,\n activeTriggerId: triggerIdProp !== undefined ? triggerIdProp : defaultTriggerIdProp,\n modal: true,\n disablePointerDismissal: true,\n nested,\n role: 'alertdialog'\n });\n }).current;\n store.useControlledProp('open', openProp, defaultOpen);\n store.useControlledProp('activeTriggerId', triggerIdProp, defaultTriggerIdProp);\n store.useSyncedValue('nested', nested);\n store.useContextCallback('onOpenChange', onOpenChange);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n const payload = store.useState('payload');\n useDialogRoot({\n store,\n actionsRef,\n parentContext: parentDialogRootContext?.store.context,\n onOpenChange,\n triggerIdProp\n });\n const contextValue = React.useMemo(() => ({\n store\n }), [store]);\n return /*#__PURE__*/_jsx(DialogRootContext.Provider, {\n value: contextValue,\n children: typeof children === 'function' ? children({\n payload\n }) : children\n });\n}","import { TransitionStatusDataAttributes } from \"./stateAttributesMapping.js\";\nexport let CommonPopupDataAttributes = function (CommonPopupDataAttributes) {\n /**\n * Present when the popup is open.\n */\n CommonPopupDataAttributes[\"open\"] = \"data-open\";\n /**\n * Present when the popup is closed.\n */\n CommonPopupDataAttributes[\"closed\"] = \"data-closed\";\n /**\n * Present when the popup is animating in.\n */\n CommonPopupDataAttributes[CommonPopupDataAttributes[\"startingStyle\"] = TransitionStatusDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the popup is animating out.\n */\n CommonPopupDataAttributes[CommonPopupDataAttributes[\"endingStyle\"] = TransitionStatusDataAttributes.endingStyle] = \"endingStyle\";\n /**\n * Present when the anchor is hidden.\n */\n CommonPopupDataAttributes[\"anchorHidden\"] = \"data-anchor-hidden\";\n return CommonPopupDataAttributes;\n}({});\nexport let CommonTriggerDataAttributes = /*#__PURE__*/function (CommonTriggerDataAttributes) {\n /**\n * Present when the popup is open.\n */\n CommonTriggerDataAttributes[\"popupOpen\"] = \"data-popup-open\";\n /**\n * Present when a pressable trigger is pressed.\n */\n CommonTriggerDataAttributes[\"pressed\"] = \"data-pressed\";\n return CommonTriggerDataAttributes;\n}({});\nconst TRIGGER_HOOK = {\n [CommonTriggerDataAttributes.popupOpen]: ''\n};\nconst PRESSABLE_TRIGGER_HOOK = {\n [CommonTriggerDataAttributes.popupOpen]: '',\n [CommonTriggerDataAttributes.pressed]: ''\n};\nconst POPUP_OPEN_HOOK = {\n [CommonPopupDataAttributes.open]: ''\n};\nconst POPUP_CLOSED_HOOK = {\n [CommonPopupDataAttributes.closed]: ''\n};\nconst ANCHOR_HIDDEN_HOOK = {\n [CommonPopupDataAttributes.anchorHidden]: ''\n};\nexport const triggerOpenStateMapping = {\n open(value) {\n if (value) {\n return TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const pressableTriggerOpenStateMapping = {\n open(value) {\n if (value) {\n return PRESSABLE_TRIGGER_HOOK;\n }\n return null;\n }\n};\nexport const popupStateMapping = {\n open(value) {\n if (value) {\n return POPUP_OPEN_HOOK;\n }\n return POPUP_CLOSED_HOOK;\n },\n anchorHidden(value) {\n if (value) {\n return ANCHOR_HIDDEN_HOOK;\n }\n return null;\n }\n};","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { popupStateMapping as baseMapping } from \"../../utils/popupStateMapping.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\nconst stateAttributesMapping = {\n ...baseMapping,\n ...transitionStatusMapping\n};\n\n/**\n * An overlay displayed beneath the popup.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogBackdrop = /*#__PURE__*/React.forwardRef(function DialogBackdrop(componentProps, forwardedRef) {\n const {\n render,\n className,\n forceRender = false,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useDialogRootContext();\n const open = store.useState('open');\n const nested = store.useState('nested');\n const mounted = store.useState('mounted');\n const transitionStatus = store.useState('transitionStatus');\n const state = React.useMemo(() => ({\n open,\n transitionStatus\n }), [open, transitionStatus]);\n return useRenderElement('div', componentProps, {\n state,\n ref: [store.context.backdropRef, forwardedRef],\n stateAttributesMapping,\n props: [{\n role: 'presentation',\n hidden: !mounted,\n style: {\n userSelect: 'none',\n WebkitUserSelect: 'none'\n }\n }, elementProps],\n enabled: forceRender || !nested\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogBackdrop.displayName = \"DialogBackdrop\";","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useButton } from \"../../use-button/index.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\n\n/**\n * A button that closes the dialog.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogClose = /*#__PURE__*/React.forwardRef(function DialogClose(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled = false,\n nativeButton = true,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useDialogRootContext();\n const open = store.useState('open');\n function handleClick(event) {\n if (open) {\n store.setOpen(false, createChangeEventDetails(REASONS.closePress, event.nativeEvent));\n }\n }\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const state = React.useMemo(() => ({\n disabled\n }), [disabled]);\n return useRenderElement('button', componentProps, {\n state,\n ref: [forwardedRef, buttonRef],\n props: [{\n onClick: handleClick\n }, elementProps, getButtonProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogClose.displayName = \"DialogClose\";","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\n/**\n * A paragraph with additional information about the dialog.\n * Renders a `<p>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogDescription = /*#__PURE__*/React.forwardRef(function DialogDescription(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useDialogRootContext();\n const id = useBaseUiId(idProp);\n store.useSyncedValueWithCleanup('descriptionElementId', id);\n return useRenderElement('p', componentProps, {\n ref: forwardedRef,\n props: [{\n id\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogDescription.displayName = \"DialogDescription\";","export let DialogPopupCssVars = /*#__PURE__*/function (DialogPopupCssVars) {\n /**\n * Indicates how many dialogs are nested within.\n * @type {number}\n */\n DialogPopupCssVars[\"nestedDialogs\"] = \"--nested-dialogs\";\n return DialogPopupCssVars;\n}({});","import { CommonPopupDataAttributes } from \"../../utils/popupStateMapping.js\";\nexport let DialogPopupDataAttributes = function (DialogPopupDataAttributes) {\n /**\n * Present when the dialog is open.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"open\"] = CommonPopupDataAttributes.open] = \"open\";\n /**\n * Present when the dialog is closed.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"closed\"] = CommonPopupDataAttributes.closed] = \"closed\";\n /**\n * Present when the dialog is animating in.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"startingStyle\"] = CommonPopupDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the dialog is animating out.\n */\n DialogPopupDataAttributes[DialogPopupDataAttributes[\"endingStyle\"] = CommonPopupDataAttributes.endingStyle] = \"endingStyle\";\n /**\n * Present when the dialog is nested within another dialog.\n */\n DialogPopupDataAttributes[\"nested\"] = \"data-nested\";\n /**\n * Present when the dialog has other open dialogs nested within it.\n */\n DialogPopupDataAttributes[\"nestedDialogOpen\"] = \"data-nested-dialog-open\";\n return DialogPopupDataAttributes;\n}({});","import _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const DialogPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") DialogPortalContext.displayName = \"DialogPortalContext\";\nexport function useDialogPortalContext() {\n const value = React.useContext(DialogPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Dialog.Portal> is missing.' : _formatErrorMessage(26));\n }\n return value;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingFocusManager } from \"../../floating-ui-react/index.js\";\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { popupStateMapping as baseMapping } from \"../../utils/popupStateMapping.js\";\nimport { transitionStatusMapping } from \"../../utils/stateAttributesMapping.js\";\nimport { DialogPopupCssVars } from \"./DialogPopupCssVars.js\";\nimport { DialogPopupDataAttributes } from \"./DialogPopupDataAttributes.js\";\nimport { useDialogPortalContext } from \"../portal/DialogPortalContext.js\";\nimport { useOpenChangeComplete } from \"../../utils/useOpenChangeComplete.js\";\nimport { COMPOSITE_KEYS } from \"../../composite/composite.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst stateAttributesMapping = {\n ...baseMapping,\n ...transitionStatusMapping,\n nestedDialogOpen(value) {\n return value ? {\n [DialogPopupDataAttributes.nestedDialogOpen]: ''\n } : null;\n }\n};\n\n/**\n * A container for the dialog contents.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogPopup = /*#__PURE__*/React.forwardRef(function DialogPopup(componentProps, forwardedRef) {\n const {\n className,\n finalFocus,\n initialFocus,\n render,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useDialogRootContext();\n const descriptionElementId = store.useState('descriptionElementId');\n const disablePointerDismissal = store.useState('disablePointerDismissal');\n const floatingRootContext = store.useState('floatingRootContext');\n const rootPopupProps = store.useState('popupProps');\n const modal = store.useState('modal');\n const mounted = store.useState('mounted');\n const nested = store.useState('nested');\n const nestedOpenDialogCount = store.useState('nestedOpenDialogCount');\n const open = store.useState('open');\n const openMethod = store.useState('openMethod');\n const titleElementId = store.useState('titleElementId');\n const transitionStatus = store.useState('transitionStatus');\n const role = store.useState('role');\n useDialogPortalContext();\n useOpenChangeComplete({\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete?.(true);\n }\n }\n });\n\n // Default initial focus logic:\n // If opened by touch, focus the popup element to prevent the virtual keyboard from opening\n // (this is required for Android specifically as iOS handles this automatically).\n function defaultInitialFocus(interactionType) {\n if (interactionType === 'touch') {\n return store.context.popupRef.current;\n }\n return true;\n }\n const resolvedInitialFocus = initialFocus === undefined ? defaultInitialFocus : initialFocus;\n const nestedDialogOpen = nestedOpenDialogCount > 0;\n const state = React.useMemo(() => ({\n open,\n nested,\n transitionStatus,\n nestedDialogOpen\n }), [open, nested, transitionStatus, nestedDialogOpen]);\n const element = useRenderElement('div', componentProps, {\n state,\n props: [rootPopupProps, {\n 'aria-labelledby': titleElementId ?? undefined,\n 'aria-describedby': descriptionElementId ?? undefined,\n role,\n tabIndex: -1,\n hidden: !mounted,\n onKeyDown(event) {\n if (COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n style: {\n [DialogPopupCssVars.nestedDialogs]: nestedOpenDialogCount\n }\n }, elementProps],\n ref: [forwardedRef, store.context.popupRef, store.useStateSetter('popupElement')],\n stateAttributesMapping\n });\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingRootContext,\n openInteractionType: openMethod,\n disabled: !mounted,\n closeOnFocusOut: !disablePointerDismissal,\n initialFocus: resolvedInitialFocus,\n returnFocus: finalFocus,\n modal: modal !== false,\n restoreFocus: \"popup\",\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogPopup.displayName = \"DialogPopup\";","import * as React from 'react';\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const InternalBackdrop = /*#__PURE__*/React.forwardRef(function InternalBackdrop(props, ref) {\n const {\n cutout,\n ...otherProps\n } = props;\n let clipPath;\n if (cutout) {\n const rect = cutout?.getBoundingClientRect();\n clipPath = `polygon(\n 0% 0%,\n 100% 0%,\n 100% 100%,\n 0% 100%,\n 0% 0%,\n ${rect.left}px ${rect.top}px,\n ${rect.left}px ${rect.bottom}px,\n ${rect.right}px ${rect.bottom}px,\n ${rect.right}px ${rect.top}px,\n ${rect.left}px ${rect.top}px\n )`;\n }\n return /*#__PURE__*/_jsx(\"div\", {\n ref: ref,\n role: \"presentation\"\n // Ensures Floating UI's outside press detection runs, as it considers\n // it an element that existed when the popup rendered.\n ,\n \"data-base-ui-inert\": \"\",\n ...otherProps,\n style: {\n position: 'fixed',\n inset: 0,\n userSelect: 'none',\n WebkitUserSelect: 'none',\n clipPath\n }\n });\n});\nif (process.env.NODE_ENV !== \"production\") InternalBackdrop.displayName = \"InternalBackdrop\";","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { FloatingPortal } from \"../../floating-ui-react/index.js\";\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { DialogPortalContext } from \"./DialogPortalContext.js\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.js\";\n\n/**\n * A portal element that moves the popup 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 Dialog](https://base-ui.com/react/components/dialog)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const DialogPortal = /*#__PURE__*/React.forwardRef(function DialogPortal(props, forwardedRef) {\n const {\n keepMounted = false,\n ...portalProps\n } = props;\n const {\n store\n } = useDialogRootContext();\n const mounted = store.useState('mounted');\n const modal = store.useState('modal');\n const shouldRender = mounted || keepMounted;\n if (!shouldRender) {\n return null;\n }\n return /*#__PURE__*/_jsx(DialogPortalContext.Provider, {\n value: keepMounted,\n children: /*#__PURE__*/_jsxs(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps,\n children: [mounted && modal === true && /*#__PURE__*/_jsx(InternalBackdrop, {\n ref: store.context.internalBackdropRef,\n inert: inertValue(!open)\n }), props.children]\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogPortal.displayName = \"DialogPortal\";","'use client';\n\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\n/**\n * A heading that labels the dialog.\n * Renders an `<h2>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogTitle = /*#__PURE__*/React.forwardRef(function DialogTitle(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useDialogRootContext();\n const id = useBaseUiId(idProp);\n store.useSyncedValueWithCleanup('titleElementId', id);\n return useRenderElement('h2', componentProps, {\n ref: forwardedRef,\n props: [{\n id\n }, elementProps]\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogTitle.displayName = \"DialogTitle\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useDialogRootContext } from \"../root/DialogRootContext.js\";\nimport { useButton } from \"../../use-button/useButton.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { triggerOpenStateMapping } from \"../../utils/popupStateMapping.js\";\nimport { CLICK_TRIGGER_IDENTIFIER } from \"../../utils/constants.js\";\nimport { useTriggerDataForwarding } from \"../../utils/popups/index.js\";\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { useClick, useInteractions } from \"../../floating-ui-react/index.js\";\n\n/**\n * A button that opens the dialog.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Dialog](https://base-ui.com/react/components/dialog)\n */\nexport const DialogTrigger = /*#__PURE__*/React.forwardRef(function DialogTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n disabled = false,\n nativeButton = true,\n id: idProp,\n payload,\n handle,\n ...elementProps\n } = componentProps;\n const dialogRootContext = useDialogRootContext(true);\n const store = handle?.store ?? dialogRootContext?.store;\n if (!store) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.' : _formatErrorMessage(79));\n }\n const thisTriggerId = useBaseUiId(idProp);\n const floatingContext = store.useState('floatingRootContext');\n const isOpenedByThisTrigger = store.useState('isOpenedByTrigger', thisTriggerId);\n const triggerElementRef = React.useRef(null);\n const {\n registerTrigger,\n isMountedByThisTrigger\n } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {\n payload\n });\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n const click = useClick(floatingContext, {\n enabled: floatingContext != null\n });\n const localInteractionProps = useInteractions([click]);\n const state = React.useMemo(() => ({\n disabled,\n open: isOpenedByThisTrigger\n }), [disabled, isOpenedByThisTrigger]);\n const rootTriggerProps = store.useState('triggerProps', isMountedByThisTrigger);\n return useRenderElement('button', componentProps, {\n state,\n ref: [buttonRef, forwardedRef, registerTrigger, triggerElementRef],\n props: [localInteractionProps.getReferenceProps(), rootTriggerProps, {\n [CLICK_TRIGGER_IDENTIFIER]: '',\n id: thisTriggerId\n }, elementProps, getButtonProps],\n stateAttributesMapping: triggerOpenStateMapping\n });\n});\nif (process.env.NODE_ENV !== \"production\") DialogTrigger.displayName = \"DialogTrigger\";","import { createContext, MutableRefObject, type ReactNode, useContext } from 'react'\n\nexport interface AlertDialogContextValue {\n cancelRef: MutableRefObject<HTMLButtonElement | null>\n withFade: boolean\n}\n\nexport const AlertDialogContext = createContext<AlertDialogContextValue | null>(null)\n\nexport const AlertDialogProvider = ({\n children,\n withFade = false,\n cancelRef,\n}: {\n children: ReactNode\n withFade?: boolean\n cancelRef: MutableRefObject<HTMLButtonElement | null>\n}) => {\n return (\n <AlertDialogContext.Provider\n value={{\n cancelRef,\n withFade,\n }}\n >\n {children}\n </AlertDialogContext.Provider>\n )\n}\n\nexport const useAlertDialog = () => {\n const context = useContext(AlertDialogContext)\n\n if (!context) {\n throw Error('useAlertDialog must be used within an AlertDialog provider')\n }\n\n return context\n}\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { ComponentProps, Ref, useRef } from 'react'\n\nimport { AlertDialogProvider } from './AlertDialogContext'\n\nexport interface AlertDialogProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Root>, 'onOpenChange' | 'render'> {\n /**\n * Specifies if the dialog is open or not.\n */\n open?: boolean\n /**\n * Default open state.\n */\n defaultOpen?: boolean\n /**\n * Handler executed on every dialog open state change.\n */\n onOpenChange?: (open: boolean) => void\n /**\n * Specifies if the dialog should have a fade animation on its body (in case it is scrollable).\n */\n withFade?: boolean\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLDivElement>\n}\n\nexport const AlertDialog = ({ onOpenChange, withFade = false, ...props }: AlertDialogProps) => {\n const cancelRef = useRef<HTMLButtonElement | null>(null)\n\n const handleOpenChange = onOpenChange\n ? (open: boolean, _eventDetails: unknown) => {\n onOpenChange(open)\n }\n : undefined\n\n return (\n <AlertDialogProvider withFade={withFade} cancelRef={cancelRef}>\n <BaseAlertDialog.Root\n data-spark-component=\"alert-dialog\"\n onOpenChange={handleOpenChange}\n {...props}\n />\n </AlertDialogProvider>\n )\n}\n\nAlertDialog.displayName = 'AlertDialog'\n","import { Slot } from '../slot'\n\nexport function useRenderSlot(asChild: boolean, defaultTag: string) {\n const Component = asChild ? Slot : defaultTag\n\n return asChild ? ({ ...props }) => <Component {...props} /> : undefined\n}\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { ComponentProps, Ref } from 'react'\n\nimport { useRenderSlot } from './useRenderSlot'\n\nexport interface AlertDialogActionProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Close>, 'render'> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const AlertDialogAction = ({ asChild = false, ...props }: AlertDialogActionProps) => {\n const renderSlot = useRenderSlot(asChild, 'button')\n\n return (\n <BaseAlertDialog.Close\n data-spark-component=\"alert-dialog-action\"\n render={renderSlot}\n {...props}\n />\n )\n}\n\nAlertDialogAction.displayName = 'AlertDialog.Action'\n","import { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { useScrollOverflow } from '@spark-ui/hooks/use-scroll-overflow'\nimport { cx } from 'class-variance-authority'\nimport { type ReactElement, type ReactNode, Ref, useRef } from 'react'\n\nimport { useAlertDialog } from './AlertDialogContext'\n\nexport interface AlertDialogBodyProps {\n children: ReactNode\n className?: string\n tabIndex?: number\n ref?: Ref<HTMLDivElement>\n inset?: boolean\n}\n\nexport const AlertDialogBody = ({\n children,\n className,\n inset = false,\n ref: forwardedRef,\n ...rest\n}: AlertDialogBodyProps): ReactElement => {\n const scrollAreaRef = useRef<HTMLDivElement>(null)\n const ref = useMergeRefs(forwardedRef, scrollAreaRef)\n\n const { withFade } = useAlertDialog()\n const { overflow } = useScrollOverflow(scrollAreaRef)\n\n return (\n <div\n data-spark-component=\"alert-dialog-body\"\n ref={ref}\n className={cx(\n 'focus-visible:u-outline relative grow overflow-y-auto outline-hidden',\n 'transition-all duration-300',\n {\n ['px-xl py-lg']: !inset,\n },\n className\n )}\n style={{\n ...(withFade && {\n maskImage:\n 'linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 44px, rgba(0, 0, 0, 1) calc(100% - 44px), rgba(0, 0, 0, 0))',\n maskSize: `100% calc(100% + ${overflow.top ? '0px' : '44px'} + ${overflow.bottom ? '0px' : '44px'})`,\n maskPosition: `0 ${overflow.top ? '0px' : '-44px'}`,\n }),\n }}\n {...rest}\n >\n {children}\n </div>\n )\n}\n\nAlertDialogBody.displayName = 'AlertDialog.Body'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { ComponentProps, Ref } from 'react'\n\nimport { useAlertDialog } from './AlertDialogContext'\nimport { useRenderSlot } from './useRenderSlot'\n\nexport interface AlertDialogCancelProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Close>, 'render'> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const AlertDialogCancel = ({\n asChild = false,\n ref: forwardedRef,\n ...props\n}: AlertDialogCancelProps) => {\n const { cancelRef } = useAlertDialog()\n const ref = useMergeRefs(forwardedRef, cancelRef)\n const renderSlot = useRenderSlot(asChild, 'button')\n\n return (\n <BaseAlertDialog.Close\n ref={ref}\n data-spark-component=\"alert-dialog-cancel\"\n render={renderSlot}\n {...props}\n />\n )\n}\n\nAlertDialogCancel.displayName = 'AlertDialog.Cancel'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { cx } from 'class-variance-authority'\nimport { ComponentProps, Ref } from 'react'\n\nimport { dialogContentStyles } from '../dialog/DialogContent.styles'\nimport { useAlertDialog } from './AlertDialogContext'\n\nexport interface AlertDialogContentProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Popup>, 'render'> {\n ref?: Ref<HTMLDivElement>\n}\n\nexport const AlertDialogContent = ({\n className,\n ref,\n initialFocus,\n ...others\n}: AlertDialogContentProps) => {\n const { cancelRef } = useAlertDialog()\n\n // Default: focus the cancel button when dialog opens\n // Users can override by passing their own initialFocus prop (RefObject, false, true, or function)\n const handleInitialFocus = initialFocus !== undefined ? initialFocus : () => cancelRef.current\n\n return (\n <BaseAlertDialog.Popup\n ref={ref}\n data-spark-component=\"alert-dialog-content\"\n role=\"alertdialog\"\n className={state =>\n cx(\n dialogContentStyles({ size: 'md', isNarrow: true }),\n 'min-w-sz-288',\n // Base UI automatically adds data-[starting-style] and data-[ending-style] attributes\n // Transition with opacity and scale for smooth open/close animations\n 'transition-all duration-150',\n 'data-starting-style:scale-90 data-starting-style:opacity-0',\n 'data-ending-style:scale-90 data-ending-style:opacity-0',\n typeof className === 'function' ? className(state) : className\n )\n }\n initialFocus={handleInitialFocus}\n {...others}\n />\n )\n}\n\nAlertDialogContent.displayName = 'AlertDialog.Content'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { ComponentProps, Ref } from 'react'\n\nexport interface AlertDialogDescriptionProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Description>, 'render'> {\n ref?: Ref<HTMLParagraphElement>\n}\n\nexport const AlertDialogDescription = (props: AlertDialogDescriptionProps) => {\n return <BaseAlertDialog.Description data-spark-component=\"alert-dialog-description\" {...props} />\n}\n\nAlertDialogDescription.displayName = 'AlertDialog.Description'\n","import { cx } from 'class-variance-authority'\nimport { type ReactElement, type ReactNode, Ref } from 'react'\n\nexport interface AlertDialogFooterProps {\n children: ReactNode\n className?: string\n ref?: Ref<HTMLDivElement>\n}\n\nexport const AlertDialogFooter = ({\n children,\n className,\n ref,\n ...rest\n}: AlertDialogFooterProps): ReactElement => (\n <footer\n data-spark-component=\"alert-dialog-footer\"\n ref={ref}\n className={cx(className, ['px-xl', 'py-lg'])}\n {...rest}\n >\n {children}\n </footer>\n)\n\nAlertDialogFooter.displayName = 'AlertDialog.Footer'\n","import { cx } from 'class-variance-authority'\nimport { type ReactElement, type ReactNode, Ref } from 'react'\n\nexport interface AlertDialogHeaderProps {\n children: ReactNode\n className?: string\n ref?: Ref<HTMLDivElement>\n}\n\nexport const AlertDialogHeader = ({\n children,\n className,\n ref,\n ...rest\n}: AlertDialogHeaderProps): ReactElement => (\n <header\n data-spark-component=\"alert-dialog-header\"\n ref={ref}\n className={cx(className, ['px-xl', 'py-lg'])}\n {...rest}\n >\n {children}\n </header>\n)\n\nAlertDialogHeader.displayName = 'AlertDialog.Header'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { cx } from 'class-variance-authority'\nimport { ComponentProps, Ref } from 'react'\n\nexport interface AlertDialogOverlayProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Backdrop>, 'render'> {\n ref?: Ref<HTMLDivElement>\n}\n\nexport const AlertDialogOverlay = ({ className, ...props }: AlertDialogOverlayProps) => {\n return (\n <BaseAlertDialog.Backdrop\n data-spark-component=\"alert-dialog-overlay\"\n className={state =>\n cx(\n 'z-overlay fixed top-0 left-0 h-screen w-screen',\n 'bg-overlay/dim-1',\n // Base UI automatically adds data-[starting-style] and data-[ending-style] attributes\n 'data-[starting-style]:animate-fade-in',\n 'data-[ending-style]:animate-fade-out',\n typeof className === 'function' ? className(state) : className\n )\n }\n {...props}\n />\n )\n}\n\nAlertDialogOverlay.displayName = 'AlertDialog.Overlay'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { ComponentProps } from 'react'\n\nexport type AlertDialogPortalProps = ComponentProps<typeof BaseAlertDialog.Portal>\n\nexport const AlertDialogPortal = (props: AlertDialogPortalProps) => {\n return <BaseAlertDialog.Portal data-spark-component=\"alert-dialog-portal\" {...props} />\n}\n\nAlertDialogPortal.displayName = 'AlertDialog.Portal'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { cx } from 'class-variance-authority'\nimport { ComponentProps, Ref } from 'react'\n\nexport interface AlertDialogTitleProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Title>, 'render'> {\n ref?: Ref<HTMLHeadingElement>\n}\n\nexport const AlertDialogTitle = ({ className, ...props }: AlertDialogTitleProps) => {\n return (\n <BaseAlertDialog.Title\n data-spark-component=\"alert-dialog-title\"\n className={cx('text-headline-1 text-on-surface', className)}\n {...props}\n />\n )\n}\n\nAlertDialogTitle.displayName = 'AlertDialog.Title'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { ComponentProps, Ref } from 'react'\n\nimport { useRenderSlot } from './useRenderSlot'\n\nexport interface AlertDialogTriggerProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Trigger>, 'render'> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const AlertDialogTrigger = ({ asChild = false, ...props }: AlertDialogTriggerProps) => {\n const renderSlot = useRenderSlot(asChild, 'button')\n\n return (\n <BaseAlertDialog.Trigger\n data-spark-component=\"alert-dialog-trigger\"\n render={renderSlot}\n {...props}\n />\n )\n}\n\nAlertDialogTrigger.displayName = 'AlertDialog.Trigger'\n","import { AlertDialog as Root } from './AlertDialog'\nimport { AlertDialogAction } from './AlertDialogAction'\nimport { AlertDialogBody } from './AlertDialogBody'\nimport { AlertDialogCancel } from './AlertDialogCancel'\nimport { AlertDialogContent } from './AlertDialogContent'\nimport { AlertDialogDescription } from './AlertDialogDescription'\nimport { AlertDialogFooter } from './AlertDialogFooter'\nimport { AlertDialogHeader } from './AlertDialogHeader'\nimport { AlertDialogOverlay } from './AlertDialogOverlay'\nimport { AlertDialogPortal } from './AlertDialogPortal'\nimport { AlertDialogTitle } from './AlertDialogTitle'\nimport { AlertDialogTrigger } from './AlertDialogTrigger'\n\nexport * from './AlertDialog'\nexport { useAlertDialog } from './AlertDialogContext'\nexport { type AlertDialogActionProps } from './AlertDialogAction'\nexport { type AlertDialogBodyProps } from './AlertDialogBody'\nexport { type AlertDialogCancelProps } from './AlertDialogCancel'\nexport { type AlertDialogContentProps } from './AlertDialogContent'\nexport { type AlertDialogDescriptionProps } from './AlertDialogDescription'\nexport { type AlertDialogFooterProps } from './AlertDialogFooter'\nexport { type AlertDialogHeaderProps } from './AlertDialogHeader'\nexport { type AlertDialogOverlayProps } from './AlertDialogOverlay'\nexport { type AlertDialogPortalProps } from './AlertDialogPortal'\nexport { type AlertDialogTitleProps } from './AlertDialogTitle'\nexport { type AlertDialogTriggerProps } from './AlertDialogTrigger'\n\nexport const AlertDialog: typeof Root & {\n Action: typeof AlertDialogAction\n Body: typeof AlertDialogBody\n Cancel: typeof AlertDialogCancel\n Content: typeof AlertDialogContent\n Description: typeof AlertDialogDescription\n Footer: typeof AlertDialogFooter\n Header: typeof AlertDialogHeader\n Overlay: typeof AlertDialogOverlay\n Portal: typeof AlertDialogPortal\n Title: typeof AlertDialogTitle\n Trigger: typeof AlertDialogTrigger\n} = Object.assign(Root, {\n Action: AlertDialogAction,\n Body: AlertDialogBody,\n Cancel: AlertDialogCancel,\n Content: AlertDialogContent,\n Description: AlertDialogDescription,\n Footer: AlertDialogFooter,\n Header: AlertDialogHeader,\n Overlay: AlertDialogOverlay,\n Portal: AlertDialogPortal,\n Title: AlertDialogTitle,\n Trigger: AlertDialogTrigger,\n})\n\nAlertDialog.displayName = 'AlertDialog'\nAlertDialog.Action.displayName = 'AlertDialog.Action'\nAlertDialog.Body.displayName = 'AlertDialog.Body'\nAlertDialog.Cancel.displayName = 'AlertDialog.Cancel'\nAlertDialog.Content.displayName = 'AlertDialog.Content'\nAlertDialog.Description.displayName = 'AlertDialog.Description'\nAlertDialog.Footer.displayName = 'AlertDialog.Footer'\nAlertDialog.Header.displayName = 'AlertDialog.Header'\nAlertDialog.Overlay.displayName = 'AlertDialog.Overlay'\nAlertDialog.Portal.displayName = 'AlertDialog.Portal'\nAlertDialog.Title.displayName = 'AlertDialog.Title'\nAlertDialog.Trigger.displayName = 'AlertDialog.Trigger'\n"],"names":["getNodeChildren","nodes","id","onlyOpenChildren","node","child","getNodeAncestors","allAncestors","currentParentId","currentNode","originalHtmlStyles","originalBodyStyles","originalHtmlScrollBehavior","hasInsetScrollbars","referenceElement","doc","ownerDocument","ownerWindow","preventScrollOverlayScrollbars","html","body","elementToLock","isOverflowElement","originalOverflow","preventScrollInsetScrollbars","win","scrollTop","scrollLeft","resizeFrame","AnimationFrame","supportsStableScrollbarGutter","isWebKit","lockScroll","htmlStyles","bodyStyles","scrollbarGutterValue","isScrollableY","isScrollableX","hasConstantOverflowY","hasConstantOverflowX","scrollbarWidth","scrollbarHeight","marginY","marginX","cleanup","handleResize","ScrollLocker","Timeout","htmlOverflowY","NOOP","hasOverlayScrollbars","isIOS","SCROLL_LOCKER","useScrollLock","enabled","useIsoLayoutEffect","createEventEmitter","map","event","data","listener","FloatingNodeContext","React","FloatingTreeContext","useFloatingParentNodeId","useFloatingTree","externalTree","contextTree","rafId","enqueueFocus","el","options","preventScroll","cancelPrevious","sync","exec","counters","getCounterMap","control","uncontrolledElementsSet","markerMap","lockCount","unwrapHost","correctElements","parent","targets","target","correctedTarget","x","applyAttributeToOthers","uncorrectedAvoidElements","ariaHidden","inert","markerName","controlAttribute","avoidElements","elementsToKeep","elementsToStop","hiddenElements","markerCounter","keep","deep","getNodeName","attr","alreadyHidden","counterMap","counterValue","markerValue","element","markOthers","getDocument","getEventType","lastInteractionType","LIST_LIMIT","previouslyFocusedElements","clearDisconnectedPreviouslyFocusedElements","addPreviouslyFocusedElement","getPreviouslyFocusedElement","getFirstTabbableElement","container","tabbableOptions","getTabbableOptions","isTabbable","tabbable","isFocusable","getComputedStyle","handleTabIndex","floatingFocusElement","orderRef","tabbableContent","focusable","dataTabIndex","tabIndex","FloatingFocusManager","props","context","children","disabled","order","initialFocus","returnFocus","restoreFocus","modal","closeOnFocusOut","openInteractionType","getInsideElementsProp","nextFocusableElement","previousFocusableElement","beforeContentFocusGuardRef","store","open","domReference","floating","events","dataRef","getNodeId","useStableCallback","getInsideElements","ignoreInitialFocus","isUntrappedTypeableCombobox","isTypeableCombobox","useValueAsRef","initialFocusRef","returnFocusRef","openInteractionTypeRef","tree","portalContext","usePortalContext","startDismissButtonRef","endDismissButtonRef","preventReturnFocusRef","isPointerDownRef","pointerDownOutsideRef","tabbableIndexRef","closeTypeRef","lastInteractionTypeRef","blurTimeout","useTimeout","pointerDownTimeout","restoreFocusFrame","useAnimationFrame","isInsidePortal","getFloatingFocusElement","getTabbableContent","getTabbableElements","content","onKeyDown","contains","activeElement","stopEvent","handleFocusIn","getTarget","tabbableIndex","clearPointerDownOutside","onPointerDown","pointerTargetInside","handlePointerDown","handleFocusOutside","relatedTarget","currentTarget","nodeId","triggers","movedToUnrelatedNode","trigger","createAttribute","isHTMLElement","prevTabbableIndex","nodeToFocus","createChangeEventDetails","REASONS.focusOut","markInsideReactTree","domReferenceElement","cleanups","beforeGuardRef","afterGuardRef","mergedBeforeGuardRef","useMergedRefs","mergedAfterGuardRef","portalNodes","rootAncestorComboboxDomReference","insideElements","resolveRef","previouslyFocusedElement","focusableElements","initialFocusValueOrFn","resolvedInitialFocus","elToFocus","onOpenChangeLocal","details","REASONS.triggerHover","REASONS.outsidePress","isVirtualClick","isVirtualPointerEvent","isPreventScrollSupported","fallbackEl","visuallyHidden","getReturnElement","returnFocusValueOrFn","resolvedReturnFocusValue","fallback","activeEl","isFocusInsideFloatingTree","returnElement","tabbableReturnElement","hasExplicitReturnFocus","CLICK_TRIGGER_IDENTIFIER","shouldRenderGuards","_jsxs","_jsx","FocusGuard","els","isOutsideEvent","getNextTabbable","getPreviousTabbable","useClick","eventOption","toggle","ignoreMouse","stickIfOpen","touchOpenDelay","pointerTypeRef","frame","touchOpenTimeout","reference","pointerType","nativeEvent","isMouseLikePointerType","openEvent","openEventType","hasClickedOnInactiveTrigger","nextOpen","isTypeableElement","REASONS.triggerPress","eventCurrentTarget","isClickLikeEvent","EMPTY_OBJECT","bubbleHandlerKeys","normalizeProp","normalizable","useDismiss","floatingElement","onOpenChange","escapeKey","outsidePressProp","outsidePressEvent","referencePress","referencePressEvent","ancestorScroll","bubbles","outsidePressFn","outsidePress","endedOrStartedInsideRef","escapeKeyBubbles","outsidePressBubbles","touchStateRef","cancelDismissOnEndTimeout","clearInsideReactTreeTimeout","clearInsideReactTree","isComposingRef","currentPointerTypeRef","trackPointerType","getOutsidePressEvent","type","computedType","resolved","closeOnEscapeKeyDown","shouldDismiss","native","isReactEvent","eventDetails","REASONS.escapeKey","shouldIgnoreEvent","computedOutsidePressEvent","closeOnPressOutside","endedOrStartedInside","inertSelector","markers","targetRootAncestor","isElement","isLastTraversableNode","nextParent","getParentNode","isRootElement","marker","lastTraversableNode","style","scrollRe","canScrollX","canScrollY","isRTL","pressedVerticalScrollbar","pressedHorizontalScrollbar","targetIsInsideChildren","isEventTargetWithin","handleTouchStart","touch","handleTouchStartCapture","callback","closeOnPressOutsideCapture","handleTouchMove","deltaX","deltaY","distance","handleTouchMoveCapture","handleTouchEnd","handleTouchEndCapture","compositionTimeout","onScroll","REASONS.none","handleCompositionStart","handleCompositionEnd","ancestors","getOverflowAncestors","ancestor","handlePressedInside","runIdentityFunctionCheck","resultFunc","inputSelectorsResults","outputSelectorResult","isInputSameAsOutput","emptyObject","stack","e","runInputStabilityCheck","inputSelectorResultsObject","inputSelectorArgs","memoize","memoizeOptions","inputSelectorResults","inputSelectorResultsCopy","createAnEmptyObject","globalDevModeChecks","NOT_FOUND","assertIsFunction","func","errorMessage","assertIsObject","object","assertIsArrayOfFunctions","array","item","itemTypes","ensureIsArray","getDependencies","createSelectorArgs","dependencies","collectInputSelectorResults","length","i","getDevModeChecksExecutionInfo","firstRun","devModeChecks","identityFunctionCheck","inputStabilityCheck","createSingletonCache","equals","entry","key","value","createLruCache","maxSize","entries","get","cacheIndex","put","getEntries","clear","referenceEqualityCheck","a","b","createCacheKeyComparator","equalityCheck","prev","next","lruMemoize","equalityCheckOrOptions","providedOptions","resultEqualityCheck","comparator","resultsCount","cache","memoized","matchingEntry","StrongRef","Ref","UNTERMINATED","TERMINATED","createCacheNode","weakMapMemoize","fnNode","lastResult","cacheNode","l","arg","objectCache","objectNode","primitiveCache","primitiveNode","terminatedNode","result","lastResultValue","createSelectorCreator","memoizeOrOptions","memoizeOptionsFromArgs","createSelectorCreatorOptions","createSelector2","recomputations","dependencyRecomputations","directlyPassedOptions","combinedOptions","argsMemoize","argsMemoizeOptions","finalMemoizeOptions","finalArgsMemoizeOptions","memoizedResultFunc","selector","createSelector","createStructuredSelector","inputSelectorsObject","selectorCreator","inputSelectorKeys","composition","index","c","d","f","other","_formatErrorMessage","require$$0","shim","require$$1","is","y","objectIs","useSyncExternalStore","useRef","useEffect","useMemo","useDebugValue","withSelector_production","subscribe","getSnapshot","getServerSnapshot","isEqual","instRef","inst","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","withSelector_development","withSelectorModule","canUseRawUseSyncExternalStore","isReactVersionAtLeast","useStoreImplementation","useStoreR19","useStoreLegacy","useStore","a1","a2","a3","getSelection","useSyncExternalStoreWithSelector","state","Store","fn","newState","currentTick","changes","ReactStore","selectors","statePart","p","keys","nextKeys","controlled","defaultValue","isControlled","previouslyControlled","values","newValues","stableFunction","ref","selectFn","prevValue","nextState","nextValue","oldValue","FloatingRootStore","nested","noEmit","triggerElements","initialState","newOpen","useTriggerRegistration","registeredElementIdRef","useTriggerDataForwarding","triggerId","triggerElementRef","stateUpdates","isMountedByThisTrigger","baseRegisterTrigger","registerTrigger","useImplicitActiveTrigger","iteratorResult","implicitTriggerId","implicitTriggerElement","useOpenStateTransitions","onUnmount","mounted","setMounted","transitionStatus","useTransitionStatus","forceUnmount","preventUnmountingOnClose","useOpenChangeComplete","PopupTriggerMap","existingElement","predicate","getEmptyRootContext","createInitialPopupStoreState","popupStoreSelectors","isActive","useSyncedFloatingRootContext","popupStore","treatPopupAsFloatingElement","floatingId","useId","useRefWithInit","valuesToSync","useInteractions","propsList","referenceDeps","floatingDeps","itemDeps","triggerDeps","getReferenceProps","userProps","mergeProps","getFloatingProps","getItemProps","getTriggerProps","elementKey","eventHandlers","isItem","outputProps","FOCUSABLE_ATTRIBUTE","ACTIVE_KEY","SELECTED_KEY","propsOrGetProps","mutablyMergeProps","args","val","componentRoleToAriaRoleMap","useRole","defaultFloatingId","role","defaultReferenceId","referenceId","ariaRole","isNested","floatingProps","active","selected","commonProps","useEnhancedClickHandler","handler","lastClickInteractionTypeRef","useOpenInteractionType","openMethod","setOpenMethod","handleTriggerClick","_","interactionType","reset","onClick","useDialogRoot","params","parentContext","actionsRef","disablePointerDismissal","popupElement","triggerProps","resetOpenInteractionType","createDialogEventDetails","reason","handleImperativeClose","REASONS.imperativeAction","floatingRootContext","ownNestedOpenDialogs","setOwnNestedOpenDialogs","isTopmost","dismiss","eventTarget","ownChildrenCount","activeTriggerProps","inactiveTriggerProps","popupProps","DialogRootContext","useDialogRootContext","optional","dialogRootContext","DialogStore","createInitialState","updatedState","newTriggerId","AlertDialogRoot","openProp","defaultOpen","onOpenChangeComplete","handle","triggerIdProp","defaultTriggerIdProp","parentDialogRootContext","payload","contextValue","CommonPopupDataAttributes","TransitionStatusDataAttributes","CommonTriggerDataAttributes","TRIGGER_HOOK","POPUP_OPEN_HOOK","POPUP_CLOSED_HOOK","ANCHOR_HIDDEN_HOOK","triggerOpenStateMapping","popupStateMapping","stateAttributesMapping","baseMapping","transitionStatusMapping","DialogBackdrop","componentProps","forwardedRef","render","className","forceRender","elementProps","useRenderElement","DialogClose","nativeButton","handleClick","REASONS.closePress","getButtonProps","buttonRef","useButton","DialogDescription","idProp","useBaseUiId","DialogPopupCssVars","DialogPopupDataAttributes","DialogPortalContext","useDialogPortalContext","DialogPopup","finalFocus","descriptionElementId","rootPopupProps","nestedOpenDialogCount","titleElementId","defaultInitialFocus","nestedDialogOpen","COMPOSITE_KEYS","InternalBackdrop","cutout","otherProps","clipPath","rect","DialogPortal","keepMounted","portalProps","FloatingPortal","inertValue","DialogTitle","DialogTrigger","thisTriggerId","floatingContext","isOpenedByThisTrigger","click","localInteractionProps","rootTriggerProps","AlertDialogContext","createContext","AlertDialogProvider","withFade","cancelRef","jsx","useAlertDialog","useContext","AlertDialog","handleOpenChange","_eventDetails","BaseAlertDialog.Root","useRenderSlot","asChild","defaultTag","Component","Slot","AlertDialogAction","renderSlot","BaseAlertDialog.Close","AlertDialogBody","inset","rest","scrollAreaRef","useMergeRefs","overflow","useScrollOverflow","cx","AlertDialogCancel","AlertDialogContent","others","handleInitialFocus","BaseAlertDialog.Popup","dialogContentStyles","AlertDialogDescription","BaseAlertDialog.Description","AlertDialogFooter","AlertDialogHeader","AlertDialogOverlay","BaseAlertDialog.Backdrop","AlertDialogPortal","BaseAlertDialog.Portal","AlertDialogTitle","BaseAlertDialog.Title","AlertDialogTrigger","BaseAlertDialog.Trigger","Root"],"mappings":"66BAEO,SAASA,GAAgBC,EAAOC,EAAIC,EAAmB,GAAM,CAElE,OADuBF,EAAM,OAAOG,GAAQA,EAAK,WAAaF,IAAO,CAACC,GAAoBC,EAAK,SAAS,KAAK,EACvF,QAAQC,GAAS,CAACA,EAAO,GAAGL,GAAgBC,EAAOI,EAAM,GAAIF,CAAgB,CAAC,CAAC,CACvG,CAiBO,SAASG,GAAiBL,EAAOC,EAAI,CAC1C,IAAIK,EAAe,CAAA,EACfC,EAAkBP,EAAM,KAAKG,GAAQA,EAAK,KAAOF,CAAE,GAAG,SAC1D,KAAOM,GAAiB,CACtB,MAAMC,EAAcR,EAAM,KAAKG,GAAQA,EAAK,KAAOI,CAAe,EAClEA,EAAkBC,GAAa,SAC3BA,IACFF,EAAeA,EAAa,OAAOE,CAAW,EAElD,CACA,OAAOF,CACT,CCrBA,IAAIG,GAAqB,CAAA,EACrBC,GAAqB,CAAA,EACrBC,GAA6B,GACjC,SAASC,GAAmBC,EAAkB,CAC5C,GAAI,OAAO,SAAa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EAYT,OAAO,OAAOsC,GAAM,CACtB,OAAQ7B,GACR,KAAMG,GACN,OAAQQ,GACR,QAASC,GACT,YAAaK,GACb,OAAQE,GACR,OAAQC,GACR,QAASC,GACT,OAAQE,GACR,MAAOE,GACP,QAASE,EACX,CAAC,EAEDpC,EAAY,YAAc,cAC1BA,EAAY,OAAO,YAAc,qBACjCA,EAAY,KAAK,YAAc,mBAC/BA,EAAY,OAAO,YAAc,qBACjCA,EAAY,QAAQ,YAAc,sBAClCA,EAAY,YAAY,YAAc,0BACtCA,EAAY,OAAO,YAAc,qBACjCA,EAAY,OAAO,YAAc,qBACjCA,EAAY,QAAQ,YAAc,sBAClCA,EAAY,OAAO,YAAc,qBACjCA,EAAY,MAAM,YAAc,oBAChCA,EAAY,QAAQ,YAAc","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,41,42]}
1
+ {"version":3,"file":"index.js","sources":["../../src/alert-dialog/AlertDialogContext.tsx","../../src/alert-dialog/AlertDialog.tsx","../../src/alert-dialog/useRenderSlot.tsx","../../src/alert-dialog/AlertDialogAction.tsx","../../src/alert-dialog/AlertDialogBody.tsx","../../src/alert-dialog/AlertDialogCancel.tsx","../../src/alert-dialog/AlertDialogContent.tsx","../../src/alert-dialog/AlertDialogDescription.tsx","../../src/alert-dialog/AlertDialogFooter.tsx","../../src/alert-dialog/AlertDialogHeader.tsx","../../src/alert-dialog/AlertDialogOverlay.tsx","../../src/alert-dialog/AlertDialogPortal.tsx","../../src/alert-dialog/AlertDialogTitle.tsx","../../src/alert-dialog/AlertDialogTrigger.tsx","../../src/alert-dialog/index.ts"],"sourcesContent":["import { createContext, MutableRefObject, type ReactNode, useContext } from 'react'\n\nexport interface AlertDialogContextValue {\n cancelRef: MutableRefObject<HTMLButtonElement | null>\n withFade: boolean\n}\n\nexport const AlertDialogContext = createContext<AlertDialogContextValue | null>(null)\n\nexport const AlertDialogProvider = ({\n children,\n withFade = false,\n cancelRef,\n}: {\n children: ReactNode\n withFade?: boolean\n cancelRef: MutableRefObject<HTMLButtonElement | null>\n}) => {\n return (\n <AlertDialogContext.Provider\n value={{\n cancelRef,\n withFade,\n }}\n >\n {children}\n </AlertDialogContext.Provider>\n )\n}\n\nexport const useAlertDialog = () => {\n const context = useContext(AlertDialogContext)\n\n if (!context) {\n throw Error('useAlertDialog must be used within an AlertDialog provider')\n }\n\n return context\n}\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { ComponentProps, Ref, useRef } from 'react'\n\nimport { AlertDialogProvider } from './AlertDialogContext'\n\nexport interface AlertDialogProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Root>, 'onOpenChange' | 'render'> {\n /**\n * Specifies if the dialog is open or not.\n */\n open?: boolean\n /**\n * Default open state.\n */\n defaultOpen?: boolean\n /**\n * Handler executed on every dialog open state change.\n */\n onOpenChange?: (open: boolean) => void\n /**\n * Specifies if the dialog should have a fade animation on its body (in case it is scrollable).\n */\n withFade?: boolean\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLDivElement>\n}\n\nexport const AlertDialog = ({ onOpenChange, withFade = false, ...props }: AlertDialogProps) => {\n const cancelRef = useRef<HTMLButtonElement | null>(null)\n\n const handleOpenChange = onOpenChange\n ? (open: boolean, _eventDetails: unknown) => {\n onOpenChange(open)\n }\n : undefined\n\n return (\n <AlertDialogProvider withFade={withFade} cancelRef={cancelRef}>\n <BaseAlertDialog.Root\n data-spark-component=\"alert-dialog\"\n onOpenChange={handleOpenChange}\n {...props}\n />\n </AlertDialogProvider>\n )\n}\n\nAlertDialog.displayName = 'AlertDialog'\n","import { Slot } from '../slot'\n\nexport function useRenderSlot(asChild: boolean, defaultTag: string) {\n const Component = asChild ? Slot : defaultTag\n\n return asChild ? ({ ...props }) => <Component {...props} /> : undefined\n}\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { ComponentProps, Ref } from 'react'\n\nimport { useRenderSlot } from './useRenderSlot'\n\nexport interface AlertDialogActionProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Close>, 'render'> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const AlertDialogAction = ({ asChild = false, ...props }: AlertDialogActionProps) => {\n const renderSlot = useRenderSlot(asChild, 'button')\n\n return (\n <BaseAlertDialog.Close\n data-spark-component=\"alert-dialog-action\"\n render={renderSlot}\n {...props}\n />\n )\n}\n\nAlertDialogAction.displayName = 'AlertDialog.Action'\n","import { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { useScrollOverflow } from '@spark-ui/hooks/use-scroll-overflow'\nimport { cx } from 'class-variance-authority'\nimport { type ReactElement, type ReactNode, Ref, useRef } from 'react'\n\nimport { useAlertDialog } from './AlertDialogContext'\n\nexport interface AlertDialogBodyProps {\n children: ReactNode\n className?: string\n tabIndex?: number\n ref?: Ref<HTMLDivElement>\n inset?: boolean\n}\n\nexport const AlertDialogBody = ({\n children,\n className,\n inset = false,\n ref: forwardedRef,\n ...rest\n}: AlertDialogBodyProps): ReactElement => {\n const scrollAreaRef = useRef<HTMLDivElement>(null)\n const ref = useMergeRefs(forwardedRef, scrollAreaRef)\n\n const { withFade } = useAlertDialog()\n const { overflow } = useScrollOverflow(scrollAreaRef)\n\n return (\n <div\n data-spark-component=\"alert-dialog-body\"\n ref={ref}\n className={cx(\n 'focus-visible:u-outline relative grow overflow-y-auto outline-hidden',\n 'transition-all duration-300',\n {\n ['px-xl py-lg']: !inset,\n },\n className\n )}\n style={{\n ...(withFade && {\n maskImage:\n 'linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1) 44px, rgba(0, 0, 0, 1) calc(100% - 44px), rgba(0, 0, 0, 0))',\n maskSize: `100% calc(100% + ${overflow.top ? '0px' : '44px'} + ${overflow.bottom ? '0px' : '44px'})`,\n maskPosition: `0 ${overflow.top ? '0px' : '-44px'}`,\n }),\n }}\n {...rest}\n >\n {children}\n </div>\n )\n}\n\nAlertDialogBody.displayName = 'AlertDialog.Body'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { useMergeRefs } from '@spark-ui/hooks/use-merge-refs'\nimport { ComponentProps, Ref } from 'react'\n\nimport { useAlertDialog } from './AlertDialogContext'\nimport { useRenderSlot } from './useRenderSlot'\n\nexport interface AlertDialogCancelProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Close>, 'render'> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const AlertDialogCancel = ({\n asChild = false,\n ref: forwardedRef,\n ...props\n}: AlertDialogCancelProps) => {\n const { cancelRef } = useAlertDialog()\n const ref = useMergeRefs(forwardedRef, cancelRef)\n const renderSlot = useRenderSlot(asChild, 'button')\n\n return (\n <BaseAlertDialog.Close\n ref={ref}\n data-spark-component=\"alert-dialog-cancel\"\n render={renderSlot}\n {...props}\n />\n )\n}\n\nAlertDialogCancel.displayName = 'AlertDialog.Cancel'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { cx } from 'class-variance-authority'\nimport { ComponentProps, Ref } from 'react'\n\nimport { dialogContentStyles } from '../dialog/DialogContent.styles'\nimport { useAlertDialog } from './AlertDialogContext'\n\nexport interface AlertDialogContentProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Popup>, 'render'> {\n ref?: Ref<HTMLDivElement>\n}\n\nexport const AlertDialogContent = ({\n className,\n ref,\n initialFocus,\n ...others\n}: AlertDialogContentProps) => {\n const { cancelRef } = useAlertDialog()\n\n // Default: focus the cancel button when dialog opens\n // Users can override by passing their own initialFocus prop (RefObject, false, true, or function)\n const handleInitialFocus = initialFocus !== undefined ? initialFocus : () => cancelRef.current\n\n return (\n <BaseAlertDialog.Popup\n ref={ref}\n data-spark-component=\"alert-dialog-content\"\n role=\"alertdialog\"\n className={state =>\n cx(\n dialogContentStyles({ size: 'md', isNarrow: true }),\n 'min-w-sz-288',\n // Base UI automatically adds data-[starting-style] and data-[ending-style] attributes\n // Transition with opacity and scale for smooth open/close animations\n 'transition-all duration-150',\n 'data-starting-style:scale-90 data-starting-style:opacity-0',\n 'data-ending-style:scale-90 data-ending-style:opacity-0',\n typeof className === 'function' ? className(state) : className\n )\n }\n initialFocus={handleInitialFocus}\n {...others}\n />\n )\n}\n\nAlertDialogContent.displayName = 'AlertDialog.Content'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { ComponentProps, Ref } from 'react'\n\nexport interface AlertDialogDescriptionProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Description>, 'render'> {\n ref?: Ref<HTMLParagraphElement>\n}\n\nexport const AlertDialogDescription = (props: AlertDialogDescriptionProps) => {\n return <BaseAlertDialog.Description data-spark-component=\"alert-dialog-description\" {...props} />\n}\n\nAlertDialogDescription.displayName = 'AlertDialog.Description'\n","import { cx } from 'class-variance-authority'\nimport { type ReactElement, type ReactNode, Ref } from 'react'\n\nexport interface AlertDialogFooterProps {\n children: ReactNode\n className?: string\n ref?: Ref<HTMLDivElement>\n}\n\nexport const AlertDialogFooter = ({\n children,\n className,\n ref,\n ...rest\n}: AlertDialogFooterProps): ReactElement => (\n <footer\n data-spark-component=\"alert-dialog-footer\"\n ref={ref}\n className={cx(className, ['px-xl', 'py-lg'])}\n {...rest}\n >\n {children}\n </footer>\n)\n\nAlertDialogFooter.displayName = 'AlertDialog.Footer'\n","import { cx } from 'class-variance-authority'\nimport { type ReactElement, type ReactNode, Ref } from 'react'\n\nexport interface AlertDialogHeaderProps {\n children: ReactNode\n className?: string\n ref?: Ref<HTMLDivElement>\n}\n\nexport const AlertDialogHeader = ({\n children,\n className,\n ref,\n ...rest\n}: AlertDialogHeaderProps): ReactElement => (\n <header\n data-spark-component=\"alert-dialog-header\"\n ref={ref}\n className={cx(className, ['px-xl', 'py-lg'])}\n {...rest}\n >\n {children}\n </header>\n)\n\nAlertDialogHeader.displayName = 'AlertDialog.Header'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { cx } from 'class-variance-authority'\nimport { ComponentProps, Ref } from 'react'\n\nexport interface AlertDialogOverlayProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Backdrop>, 'render'> {\n ref?: Ref<HTMLDivElement>\n}\n\nexport const AlertDialogOverlay = ({ className, ...props }: AlertDialogOverlayProps) => {\n return (\n <BaseAlertDialog.Backdrop\n data-spark-component=\"alert-dialog-overlay\"\n className={state =>\n cx(\n 'z-overlay fixed top-0 left-0 h-screen w-screen',\n 'bg-overlay/dim-1',\n // Base UI automatically adds data-[starting-style] and data-[ending-style] attributes\n 'data-starting-style:animate-fade-in',\n 'data-ending-style:animate-fade-out',\n typeof className === 'function' ? className(state) : className\n )\n }\n {...props}\n />\n )\n}\n\nAlertDialogOverlay.displayName = 'AlertDialog.Overlay'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { cx } from 'class-variance-authority'\nimport { ComponentProps } from 'react'\n\nexport type AlertDialogPortalProps = ComponentProps<typeof BaseAlertDialog.Portal>\n\nexport const AlertDialogPortal = ({ className, ...props }: AlertDialogPortalProps) => {\n return (\n <BaseAlertDialog.Portal\n data-spark-component=\"alert-dialog-portal\"\n className={cx(className, 'z-modal absolute')}\n {...props}\n />\n )\n}\n\nAlertDialogPortal.displayName = 'AlertDialog.Portal'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { cx } from 'class-variance-authority'\nimport { ComponentProps, Ref } from 'react'\n\nexport interface AlertDialogTitleProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Title>, 'render'> {\n ref?: Ref<HTMLHeadingElement>\n}\n\nexport const AlertDialogTitle = ({ className, ...props }: AlertDialogTitleProps) => {\n return (\n <BaseAlertDialog.Title\n data-spark-component=\"alert-dialog-title\"\n className={cx('text-headline-1 text-on-surface', className)}\n {...props}\n />\n )\n}\n\nAlertDialogTitle.displayName = 'AlertDialog.Title'\n","import { AlertDialog as BaseAlertDialog } from '@base-ui/react/alert-dialog'\nimport { ComponentProps, Ref } from 'react'\n\nimport { useRenderSlot } from './useRenderSlot'\n\nexport interface AlertDialogTriggerProps\n extends Omit<ComponentProps<typeof BaseAlertDialog.Trigger>, 'render'> {\n /**\n * Change the default rendered element for the one passed as a child, merging their props and behavior.\n */\n asChild?: boolean\n ref?: Ref<HTMLButtonElement>\n}\n\nexport const AlertDialogTrigger = ({ asChild = false, ...props }: AlertDialogTriggerProps) => {\n const renderSlot = useRenderSlot(asChild, 'button')\n\n return (\n <BaseAlertDialog.Trigger\n data-spark-component=\"alert-dialog-trigger\"\n render={renderSlot}\n {...props}\n />\n )\n}\n\nAlertDialogTrigger.displayName = 'AlertDialog.Trigger'\n","import { AlertDialog as Root } from './AlertDialog'\nimport { AlertDialogAction } from './AlertDialogAction'\nimport { AlertDialogBody } from './AlertDialogBody'\nimport { AlertDialogCancel } from './AlertDialogCancel'\nimport { AlertDialogContent } from './AlertDialogContent'\nimport { AlertDialogDescription } from './AlertDialogDescription'\nimport { AlertDialogFooter } from './AlertDialogFooter'\nimport { AlertDialogHeader } from './AlertDialogHeader'\nimport { AlertDialogOverlay } from './AlertDialogOverlay'\nimport { AlertDialogPortal } from './AlertDialogPortal'\nimport { AlertDialogTitle } from './AlertDialogTitle'\nimport { AlertDialogTrigger } from './AlertDialogTrigger'\n\nexport * from './AlertDialog'\nexport { useAlertDialog } from './AlertDialogContext'\nexport { type AlertDialogActionProps } from './AlertDialogAction'\nexport { type AlertDialogBodyProps } from './AlertDialogBody'\nexport { type AlertDialogCancelProps } from './AlertDialogCancel'\nexport { type AlertDialogContentProps } from './AlertDialogContent'\nexport { type AlertDialogDescriptionProps } from './AlertDialogDescription'\nexport { type AlertDialogFooterProps } from './AlertDialogFooter'\nexport { type AlertDialogHeaderProps } from './AlertDialogHeader'\nexport { type AlertDialogOverlayProps } from './AlertDialogOverlay'\nexport { type AlertDialogPortalProps } from './AlertDialogPortal'\nexport { type AlertDialogTitleProps } from './AlertDialogTitle'\nexport { type AlertDialogTriggerProps } from './AlertDialogTrigger'\n\nexport const AlertDialog: typeof Root & {\n Action: typeof AlertDialogAction\n Body: typeof AlertDialogBody\n Cancel: typeof AlertDialogCancel\n Content: typeof AlertDialogContent\n Description: typeof AlertDialogDescription\n Footer: typeof AlertDialogFooter\n Header: typeof AlertDialogHeader\n Overlay: typeof AlertDialogOverlay\n Portal: typeof AlertDialogPortal\n Title: typeof AlertDialogTitle\n Trigger: typeof AlertDialogTrigger\n} = Object.assign(Root, {\n Action: AlertDialogAction,\n Body: AlertDialogBody,\n Cancel: AlertDialogCancel,\n Content: AlertDialogContent,\n Description: AlertDialogDescription,\n Footer: AlertDialogFooter,\n Header: AlertDialogHeader,\n Overlay: AlertDialogOverlay,\n Portal: AlertDialogPortal,\n Title: AlertDialogTitle,\n Trigger: AlertDialogTrigger,\n})\n\nAlertDialog.displayName = 'AlertDialog'\nAlertDialog.Action.displayName = 'AlertDialog.Action'\nAlertDialog.Body.displayName = 'AlertDialog.Body'\nAlertDialog.Cancel.displayName = 'AlertDialog.Cancel'\nAlertDialog.Content.displayName = 'AlertDialog.Content'\nAlertDialog.Description.displayName = 'AlertDialog.Description'\nAlertDialog.Footer.displayName = 'AlertDialog.Footer'\nAlertDialog.Header.displayName = 'AlertDialog.Header'\nAlertDialog.Overlay.displayName = 'AlertDialog.Overlay'\nAlertDialog.Portal.displayName = 'AlertDialog.Portal'\nAlertDialog.Title.displayName = 'AlertDialog.Title'\nAlertDialog.Trigger.displayName = 'AlertDialog.Trigger'\n"],"names":["AlertDialogContext","createContext","AlertDialogProvider","children","withFade","cancelRef","jsx","useAlertDialog","context","useContext","AlertDialog","onOpenChange","props","useRef","handleOpenChange","open","_eventDetails","BaseAlertDialog","useRenderSlot","asChild","defaultTag","Component","Slot","AlertDialogAction","renderSlot","AlertDialogBody","className","inset","forwardedRef","rest","scrollAreaRef","ref","useMergeRefs","overflow","useScrollOverflow","cx","AlertDialogCancel","AlertDialogContent","initialFocus","others","handleInitialFocus","state","dialogContentStyles","AlertDialogDescription","AlertDialogFooter","AlertDialogHeader","AlertDialogOverlay","AlertDialogPortal","AlertDialogTitle","AlertDialogTrigger","Root"],"mappings":"sYAOaA,EAAqBC,EAAAA,cAA8C,IAAI,EAEvEC,EAAsB,CAAC,CAClC,SAAAC,EACA,SAAAC,EAAW,GACX,UAAAC,CACF,IAMIC,EAAAA,IAACN,EAAmB,SAAnB,CACC,MAAO,CACL,UAAAK,EACA,SAAAD,CAAA,EAGD,SAAAD,CAAA,CAAA,EAKMI,EAAiB,IAAM,CAClC,MAAMC,EAAUC,EAAAA,WAAWT,CAAkB,EAE7C,GAAI,CAACQ,EACH,MAAM,MAAM,4DAA4D,EAG1E,OAAOA,CACT,ECRaE,EAAc,CAAC,CAAE,aAAAC,EAAc,SAAAP,EAAW,GAAO,GAAGQ,KAA8B,CAC7F,MAAMP,EAAYQ,EAAAA,OAAiC,IAAI,EAEjDC,EAAmBH,EACrB,CAACI,EAAeC,IAA2B,CACzCL,EAAaI,CAAI,CACnB,EACA,OAEJ,OACET,EAAAA,IAACJ,EAAA,CAAoB,SAAAE,EAAoB,UAAAC,EACvC,SAAAC,EAAAA,IAACW,EAAAA,YAAgB,KAAhB,CACC,uBAAqB,eACrB,aAAcH,EACb,GAAGF,CAAA,CAAA,EAER,CAEJ,EAEAF,EAAY,YAAc,cChDnB,SAASQ,EAAcC,EAAkBC,EAAoB,CAClE,MAAMC,EAAYF,EAAUG,EAAAA,KAAOF,EAEnC,OAAOD,EAAU,CAAC,CAAE,GAAGP,CAAA,IAAYN,MAACe,EAAA,CAAW,GAAGT,CAAA,CAAO,EAAK,MAChE,CCQO,MAAMW,EAAoB,CAAC,CAAE,QAAAJ,EAAU,GAA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