@bigbinary/neeto-atoms 1.0.6 → 1.0.7

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 (501) hide show
  1. package/dist/DataTable-Y4POx0WN.js +3737 -0
  2. package/dist/DataTable-Y4POx0WN.js.map +1 -0
  3. package/dist/button-COIbN8dg.js +40 -0
  4. package/dist/button-COIbN8dg.js.map +1 -0
  5. package/dist/check-Cpkv29p1.js +15 -0
  6. package/dist/check-Cpkv29p1.js.map +1 -0
  7. package/dist/chevron-down-BNi0ntys.js +15 -0
  8. package/dist/chevron-down-BNi0ntys.js.map +1 -0
  9. package/dist/chevron-left-BDoT8E2-.js +15 -0
  10. package/dist/chevron-left-BDoT8E2-.js.map +1 -0
  11. package/dist/chevron-right-DQnrO-ek.js +15 -0
  12. package/dist/chevron-right-DQnrO-ek.js.map +1 -0
  13. package/dist/chevron-up-Bf2G3AAU.js +15 -0
  14. package/dist/chevron-up-Bf2G3AAU.js.map +1 -0
  15. package/dist/cjs/DataTable-DJw2SZ7b.js +3764 -0
  16. package/dist/cjs/DataTable-DJw2SZ7b.js.map +1 -0
  17. package/dist/cjs/button-B8XGl69v.js +63 -0
  18. package/dist/cjs/button-B8XGl69v.js.map +1 -0
  19. package/dist/cjs/check-BQgcDXys.js +17 -0
  20. package/dist/cjs/check-BQgcDXys.js.map +1 -0
  21. package/dist/cjs/chevron-down-CPsWSS51.js +17 -0
  22. package/dist/cjs/chevron-down-CPsWSS51.js.map +1 -0
  23. package/dist/cjs/chevron-left-BldoOh5p.js +17 -0
  24. package/dist/cjs/chevron-left-BldoOh5p.js.map +1 -0
  25. package/dist/cjs/chevron-right-0jNdwX2Q.js +17 -0
  26. package/dist/cjs/chevron-right-0jNdwX2Q.js.map +1 -0
  27. package/dist/cjs/chevron-up-BpwpBnZU.js +17 -0
  28. package/dist/cjs/chevron-up-BpwpBnZU.js.map +1 -0
  29. package/dist/cjs/components/DataTable.js +53 -0
  30. package/dist/cjs/components/DataTable.js.map +1 -0
  31. package/dist/cjs/createLucideIcon-D0tRgV6l.js +149 -0
  32. package/dist/cjs/createLucideIcon-D0tRgV6l.js.map +1 -0
  33. package/dist/cjs/dialog-DzNWLbJ6.js +50 -0
  34. package/dist/cjs/dialog-DzNWLbJ6.js.map +1 -0
  35. package/dist/cjs/ellipsis-4aubOI2n.js +21 -0
  36. package/dist/cjs/ellipsis-4aubOI2n.js.map +1 -0
  37. package/dist/cjs/floating-ui.react-dom-B4Aw6O7R.js +2293 -0
  38. package/dist/cjs/floating-ui.react-dom-B4Aw6O7R.js.map +1 -0
  39. package/dist/cjs/index-9jC1advf.js +34 -0
  40. package/dist/cjs/index-9jC1advf.js.map +1 -0
  41. package/dist/cjs/index-BZhTddX0.js +47 -0
  42. package/dist/cjs/index-BZhTddX0.js.map +1 -0
  43. package/dist/cjs/index-Bf0WsHta.js +63 -0
  44. package/dist/cjs/index-Bf0WsHta.js.map +1 -0
  45. package/dist/cjs/index-BqCr1H3u.js +173 -0
  46. package/dist/cjs/index-BqCr1H3u.js.map +1 -0
  47. package/dist/cjs/index-BrpkRQoS.js +99 -0
  48. package/dist/cjs/index-BrpkRQoS.js.map +1 -0
  49. package/dist/cjs/index-Bvu9MiFi.js +247 -0
  50. package/dist/cjs/index-Bvu9MiFi.js.map +1 -0
  51. package/dist/cjs/index-BwAq9ba8.js +38 -0
  52. package/dist/cjs/index-BwAq9ba8.js.map +1 -0
  53. package/dist/cjs/index-C9ICrOhM.js +328 -0
  54. package/dist/cjs/index-C9ICrOhM.js.map +1 -0
  55. package/dist/cjs/index-CB9xFokC.js +59 -0
  56. package/dist/cjs/index-CB9xFokC.js.map +1 -0
  57. package/dist/cjs/index-CCdG4z4E.js +30 -0
  58. package/dist/cjs/index-CCdG4z4E.js.map +1 -0
  59. package/dist/cjs/index-CF951Pw9.js +38 -0
  60. package/dist/cjs/index-CF951Pw9.js.map +1 -0
  61. package/dist/cjs/index-CGUGhyIp.js +103 -0
  62. package/dist/cjs/index-CGUGhyIp.js.map +1 -0
  63. package/dist/cjs/index-CGet1HH4.js +953 -0
  64. package/dist/cjs/index-CGet1HH4.js.map +1 -0
  65. package/dist/cjs/index-COPkC3I5.js +14 -0
  66. package/dist/cjs/index-COPkC3I5.js.map +1 -0
  67. package/dist/cjs/index-Ch55j1or.js +176 -0
  68. package/dist/cjs/index-Ch55j1or.js.map +1 -0
  69. package/dist/cjs/index-ChSOMM8b.js +1153 -0
  70. package/dist/cjs/index-ChSOMM8b.js.map +1 -0
  71. package/dist/cjs/index-CyrAgb4H.js +93 -0
  72. package/dist/cjs/index-CyrAgb4H.js.map +1 -0
  73. package/dist/cjs/index-D-iDn9RI.js +63 -0
  74. package/dist/cjs/index-D-iDn9RI.js.map +1 -0
  75. package/dist/cjs/index-DAds6mf_.js +433 -0
  76. package/dist/cjs/index-DAds6mf_.js.map +1 -0
  77. package/dist/cjs/index-DMbj7vXd.js +152 -0
  78. package/dist/cjs/index-DMbj7vXd.js.map +1 -0
  79. package/dist/cjs/index-DR7GJU4J.js +248 -0
  80. package/dist/cjs/index-DR7GJU4J.js.map +1 -0
  81. package/dist/cjs/index-DcCSSgb7.js +153 -0
  82. package/dist/cjs/index-DcCSSgb7.js.map +1 -0
  83. package/dist/cjs/index-Df-Ffa3s.js +43 -0
  84. package/dist/cjs/index-Df-Ffa3s.js.map +1 -0
  85. package/dist/cjs/index-DnKJmaCq.js +8 -0
  86. package/dist/cjs/index-DnKJmaCq.js.map +1 -0
  87. package/dist/cjs/index-DuNgWCXZ.js +113 -0
  88. package/dist/cjs/index-DuNgWCXZ.js.map +1 -0
  89. package/dist/cjs/index-EyWRfsCG.js +9 -0
  90. package/dist/cjs/index-EyWRfsCG.js.map +1 -0
  91. package/dist/cjs/index-lWVw05cs.js +35 -0
  92. package/dist/cjs/index-lWVw05cs.js.map +1 -0
  93. package/dist/cjs/index.js +53 -66844
  94. package/dist/cjs/index.js.map +1 -1
  95. package/dist/cjs/input-CgKPISj_.js +11 -0
  96. package/dist/cjs/input-CgKPISj_.js.map +1 -0
  97. package/dist/cjs/input-group-DoK0-4fL.js +66 -0
  98. package/dist/cjs/input-group-DoK0-4fL.js.map +1 -0
  99. package/dist/cjs/label-Bdc9ytTI.js +52 -0
  100. package/dist/cjs/label-Bdc9ytTI.js.map +1 -0
  101. package/dist/cjs/loader-circle-Bw7zP2Gn.js +17 -0
  102. package/dist/cjs/loader-circle-Bw7zP2Gn.js.map +1 -0
  103. package/dist/cjs/primitives/Accordion.js +340 -0
  104. package/dist/cjs/primitives/Accordion.js.map +1 -0
  105. package/dist/cjs/primitives/Alert.js +40 -0
  106. package/dist/cjs/primitives/Alert.js.map +1 -0
  107. package/dist/cjs/primitives/AlertDialog.js +256 -0
  108. package/dist/cjs/primitives/AlertDialog.js.map +1 -0
  109. package/dist/cjs/primitives/AspectRatio.js +75 -0
  110. package/dist/cjs/primitives/AspectRatio.js.map +1 -0
  111. package/dist/cjs/primitives/Avatar.js +189 -0
  112. package/dist/cjs/primitives/Avatar.js.map +1 -0
  113. package/dist/cjs/primitives/Badge.js +34 -0
  114. package/dist/cjs/primitives/Badge.js.map +1 -0
  115. package/dist/cjs/primitives/Breadcrumb.js +50 -0
  116. package/dist/cjs/primitives/Breadcrumb.js.map +1 -0
  117. package/dist/cjs/primitives/Button.js +16 -0
  118. package/dist/cjs/primitives/Button.js.map +1 -0
  119. package/dist/cjs/primitives/ButtonGroup.js +43 -0
  120. package/dist/cjs/primitives/ButtonGroup.js.map +1 -0
  121. package/dist/cjs/primitives/Calendar.js +8030 -0
  122. package/dist/cjs/primitives/Calendar.js.map +1 -0
  123. package/dist/cjs/primitives/Card.js +43 -0
  124. package/dist/cjs/primitives/Card.js.map +1 -0
  125. package/dist/cjs/primitives/Carousel.js +1867 -0
  126. package/dist/cjs/primitives/Carousel.js.map +1 -0
  127. package/dist/cjs/primitives/Chart.js +18787 -0
  128. package/dist/cjs/primitives/Chart.js.map +1 -0
  129. package/dist/cjs/primitives/Checkbox.js +304 -0
  130. package/dist/cjs/primitives/Checkbox.js.map +1 -0
  131. package/dist/cjs/primitives/Collapsible.js +33 -0
  132. package/dist/cjs/primitives/Collapsible.js.map +1 -0
  133. package/dist/cjs/primitives/Combobox.js +10288 -0
  134. package/dist/cjs/primitives/Combobox.js.map +1 -0
  135. package/dist/cjs/primitives/Command.js +248 -0
  136. package/dist/cjs/primitives/Command.js.map +1 -0
  137. package/dist/cjs/primitives/ContextMenu.js +404 -0
  138. package/dist/cjs/primitives/ContextMenu.js.map +1 -0
  139. package/dist/cjs/primitives/Dialog.js +48 -0
  140. package/dist/cjs/primitives/Dialog.js.map +1 -0
  141. package/dist/cjs/primitives/Drawer.js +1715 -0
  142. package/dist/cjs/primitives/Drawer.js.map +1 -0
  143. package/dist/cjs/primitives/DropdownMenu.js +383 -0
  144. package/dist/cjs/primitives/DropdownMenu.js.map +1 -0
  145. package/dist/cjs/primitives/Empty.js +50 -0
  146. package/dist/cjs/primitives/Empty.js.map +1 -0
  147. package/dist/cjs/primitives/Field.js +95 -0
  148. package/dist/cjs/primitives/Field.js.map +1 -0
  149. package/dist/cjs/primitives/HoverCard.js +291 -0
  150. package/dist/cjs/primitives/HoverCard.js.map +1 -0
  151. package/dist/cjs/primitives/Input.js +10 -0
  152. package/dist/cjs/primitives/Input.js.map +1 -0
  153. package/dist/cjs/primitives/InputGroup.js +27 -0
  154. package/dist/cjs/primitives/InputGroup.js.map +1 -0
  155. package/dist/cjs/primitives/InputOTP.js +84 -0
  156. package/dist/cjs/primitives/InputOTP.js.map +1 -0
  157. package/dist/cjs/primitives/Item.js +96 -0
  158. package/dist/cjs/primitives/Item.js.map +1 -0
  159. package/dist/cjs/primitives/Kbd.js +18 -0
  160. package/dist/cjs/primitives/Kbd.js.map +1 -0
  161. package/dist/cjs/primitives/Label.js +14 -0
  162. package/dist/cjs/primitives/Label.js.map +1 -0
  163. package/dist/cjs/primitives/Menubar.js +547 -0
  164. package/dist/cjs/primitives/Menubar.js.map +1 -0
  165. package/dist/cjs/primitives/NativeSelect.js +26 -0
  166. package/dist/cjs/primitives/NativeSelect.js.map +1 -0
  167. package/dist/cjs/primitives/NavigationMenu.js +856 -0
  168. package/dist/cjs/primitives/NavigationMenu.js.map +1 -0
  169. package/dist/cjs/primitives/Pagination.js +52 -0
  170. package/dist/cjs/primitives/Pagination.js.map +1 -0
  171. package/dist/cjs/primitives/Popover.js +444 -0
  172. package/dist/cjs/primitives/Popover.js.map +1 -0
  173. package/dist/cjs/primitives/Progress.js +125 -0
  174. package/dist/cjs/primitives/Progress.js.map +1 -0
  175. package/dist/cjs/primitives/RadioGroup.js +322 -0
  176. package/dist/cjs/primitives/RadioGroup.js.map +1 -0
  177. package/dist/cjs/primitives/Resizable.js +2051 -0
  178. package/dist/cjs/primitives/Resizable.js.map +1 -0
  179. package/dist/cjs/primitives/ScrollArea.js +754 -0
  180. package/dist/cjs/primitives/ScrollArea.js.map +1 -0
  181. package/dist/cjs/primitives/Select.js +1318 -0
  182. package/dist/cjs/primitives/Select.js.map +1 -0
  183. package/dist/cjs/primitives/Separator.js +14 -0
  184. package/dist/cjs/primitives/Separator.js.map +1 -0
  185. package/dist/cjs/primitives/Sheet.js +44 -0
  186. package/dist/cjs/primitives/Sheet.js.map +1 -0
  187. package/dist/cjs/primitives/Sidebar.js +310 -0
  188. package/dist/cjs/primitives/Sidebar.js.map +1 -0
  189. package/dist/cjs/primitives/Skeleton.js +10 -0
  190. package/dist/cjs/primitives/Skeleton.js.map +1 -0
  191. package/dist/cjs/primitives/Slider.js +591 -0
  192. package/dist/cjs/primitives/Slider.js.map +1 -0
  193. package/dist/cjs/primitives/Sonner.js +1260 -0
  194. package/dist/cjs/primitives/Sonner.js.map +1 -0
  195. package/dist/cjs/primitives/Spinner.js +16 -0
  196. package/dist/cjs/primitives/Spinner.js.map +1 -0
  197. package/dist/cjs/primitives/Switch.js +184 -0
  198. package/dist/cjs/primitives/Switch.js.map +1 -0
  199. package/dist/cjs/primitives/Table.js +45 -0
  200. package/dist/cjs/primitives/Table.js.map +1 -0
  201. package/dist/cjs/primitives/Tabs.js +250 -0
  202. package/dist/cjs/primitives/Tabs.js.map +1 -0
  203. package/dist/cjs/primitives/Textarea.js +10 -0
  204. package/dist/cjs/primitives/Textarea.js.map +1 -0
  205. package/dist/cjs/primitives/Toggle.js +19 -0
  206. package/dist/cjs/primitives/Toggle.js.map +1 -0
  207. package/dist/cjs/primitives/ToggleGroup.js +221 -0
  208. package/dist/cjs/primitives/ToggleGroup.js.map +1 -0
  209. package/dist/cjs/primitives/Tooltip.js +33 -0
  210. package/dist/cjs/primitives/Tooltip.js.map +1 -0
  211. package/dist/cjs/primitives/Typography.js +105 -0
  212. package/dist/cjs/primitives/Typography.js.map +1 -0
  213. package/dist/cjs/primitives/index.js +422 -0
  214. package/dist/cjs/primitives/index.js.map +1 -0
  215. package/dist/cjs/reselect-CeyIIDM-.js +457 -0
  216. package/dist/cjs/reselect-CeyIIDM-.js.map +1 -0
  217. package/dist/cjs/separator-CPy2gyg1.js +58 -0
  218. package/dist/cjs/separator-CPy2gyg1.js.map +1 -0
  219. package/dist/cjs/sheet-nHSYZxAA.js +48 -0
  220. package/dist/cjs/sheet-nHSYZxAA.js.map +1 -0
  221. package/dist/cjs/skeleton-DffZ8bV7.js +11 -0
  222. package/dist/cjs/skeleton-DffZ8bV7.js.map +1 -0
  223. package/dist/cjs/textarea-CZSSY75H.js +11 -0
  224. package/dist/cjs/textarea-CZSSY75H.js.map +1 -0
  225. package/dist/cjs/toggle-CaqzT8dI.js +84 -0
  226. package/dist/cjs/toggle-CaqzT8dI.js.map +1 -0
  227. package/dist/cjs/tooltip-CRkOMh1b.js +542 -0
  228. package/dist/cjs/tooltip-CRkOMh1b.js.map +1 -0
  229. package/dist/cjs/use-mobile-B-UYxtqX.js +41 -0
  230. package/dist/cjs/use-mobile-B-UYxtqX.js.map +1 -0
  231. package/dist/cjs/utils-CTr7wn5d.js +3210 -0
  232. package/dist/cjs/utils-CTr7wn5d.js.map +1 -0
  233. package/dist/cjs/x-Brw3FJst.js +20 -0
  234. package/dist/cjs/x-Brw3FJst.js.map +1 -0
  235. package/dist/components/DataTable.js +41 -0
  236. package/dist/components/DataTable.js.map +1 -0
  237. package/dist/createLucideIcon-C8ycilSN.js +147 -0
  238. package/dist/createLucideIcon-C8ycilSN.js.map +1 -0
  239. package/dist/dialog-C97DOTvO.js +39 -0
  240. package/dist/dialog-C97DOTvO.js.map +1 -0
  241. package/dist/ellipsis-lb8Ws6br.js +19 -0
  242. package/dist/ellipsis-lb8Ws6br.js.map +1 -0
  243. package/dist/floating-ui.react-dom-CcGbtPEK.js +2243 -0
  244. package/dist/floating-ui.react-dom-CcGbtPEK.js.map +1 -0
  245. package/dist/index-0o2E3Cnw.js +146 -0
  246. package/dist/index-0o2E3Cnw.js.map +1 -0
  247. package/dist/index-30QpKM0j.js +16 -0
  248. package/dist/index-30QpKM0j.js.map +1 -0
  249. package/dist/index-B4_fVWDx.js +1129 -0
  250. package/dist/index-B4_fVWDx.js.map +1 -0
  251. package/dist/index-BA158WEj.js +12 -0
  252. package/dist/index-BA158WEj.js.map +1 -0
  253. package/dist/index-BNPynZWM.js +225 -0
  254. package/dist/index-BNPynZWM.js.map +1 -0
  255. package/dist/index-BYZaLNq1.js +41 -0
  256. package/dist/index-BYZaLNq1.js.map +1 -0
  257. package/dist/index-BfAAoDv6.js +7 -0
  258. package/dist/index-BfAAoDv6.js.map +1 -0
  259. package/dist/index-BtkPdosV.js +40 -0
  260. package/dist/index-BtkPdosV.js.map +1 -0
  261. package/dist/index-BwxI_qgh.js +915 -0
  262. package/dist/index-BwxI_qgh.js.map +1 -0
  263. package/dist/index-ByEpUy7w.js +302 -0
  264. package/dist/index-ByEpUy7w.js.map +1 -0
  265. package/dist/index-CSMSzzKM.js +93 -0
  266. package/dist/index-CSMSzzKM.js.map +1 -0
  267. package/dist/index-CSUSJzOJ.js +13 -0
  268. package/dist/index-CSUSJzOJ.js.map +1 -0
  269. package/dist/index-CSggBaQF.js +36 -0
  270. package/dist/index-CSggBaQF.js.map +1 -0
  271. package/dist/index-CfriMyrd.js +91 -0
  272. package/dist/index-CfriMyrd.js.map +1 -0
  273. package/dist/index-CiyxEyB0.js +80 -0
  274. package/dist/index-CiyxEyB0.js.map +1 -0
  275. package/dist/index-Cor698lu.js +71 -0
  276. package/dist/index-Cor698lu.js.map +1 -0
  277. package/dist/index-D7Zy7P05.js +45 -0
  278. package/dist/index-D7Zy7P05.js.map +1 -0
  279. package/dist/index-DNzunGHb.js +12 -0
  280. package/dist/index-DNzunGHb.js.map +1 -0
  281. package/dist/index-DOzu5J1s.js +8 -0
  282. package/dist/index-DOzu5J1s.js.map +1 -0
  283. package/dist/index-DZXbzIgC.js +6 -0
  284. package/dist/index-DZXbzIgC.js.map +1 -0
  285. package/dist/index-Dd1i1d2M.js +155 -0
  286. package/dist/index-Dd1i1d2M.js.map +1 -0
  287. package/dist/index-DhnfW8wQ.js +128 -0
  288. package/dist/index-DhnfW8wQ.js.map +1 -0
  289. package/dist/index-PF0ms7Xn.js +402 -0
  290. package/dist/index-PF0ms7Xn.js.map +1 -0
  291. package/dist/index-fV_U4ZJM.js +18 -0
  292. package/dist/index-fV_U4ZJM.js.map +1 -0
  293. package/dist/index-j_qxDBFl.js +224 -0
  294. package/dist/index-j_qxDBFl.js.map +1 -0
  295. package/dist/index-yFgkK_AM.js +131 -0
  296. package/dist/index-yFgkK_AM.js.map +1 -0
  297. package/dist/index-zW4GjM5L.js +16 -0
  298. package/dist/index-zW4GjM5L.js.map +1 -0
  299. package/dist/index.d.ts +0 -55
  300. package/dist/index.js +41 -66510
  301. package/dist/index.js.map +1 -1
  302. package/dist/input-GLCCE2kT.js +9 -0
  303. package/dist/input-GLCCE2kT.js.map +1 -0
  304. package/dist/input-group-CDBpz6Pb.js +59 -0
  305. package/dist/input-group-CDBpz6Pb.js.map +1 -0
  306. package/dist/label-B4qDF3W1.js +30 -0
  307. package/dist/label-B4qDF3W1.js.map +1 -0
  308. package/dist/loader-circle-DycHUAWN.js +15 -0
  309. package/dist/loader-circle-DycHUAWN.js.map +1 -0
  310. package/dist/primitives/Accordion.js +331 -0
  311. package/dist/primitives/Accordion.js.map +1 -0
  312. package/dist/primitives/Alert.js +35 -0
  313. package/dist/primitives/Alert.js.map +1 -0
  314. package/dist/primitives/AlertDialog.js +223 -0
  315. package/dist/primitives/AlertDialog.js.map +1 -0
  316. package/dist/primitives/AspectRatio.js +53 -0
  317. package/dist/primitives/AspectRatio.js.map +1 -0
  318. package/dist/primitives/Avatar.js +162 -0
  319. package/dist/primitives/Avatar.js.map +1 -0
  320. package/dist/primitives/Badge.js +31 -0
  321. package/dist/primitives/Badge.js.map +1 -0
  322. package/dist/primitives/Breadcrumb.js +42 -0
  323. package/dist/primitives/Breadcrumb.js.map +1 -0
  324. package/dist/{components → primitives}/Button.d.ts +1 -1
  325. package/dist/primitives/Button.js +14 -0
  326. package/dist/primitives/Button.js.map +1 -0
  327. package/dist/primitives/ButtonGroup.js +38 -0
  328. package/dist/primitives/ButtonGroup.js.map +1 -0
  329. package/dist/primitives/Calendar.js +8008 -0
  330. package/dist/primitives/Calendar.js.map +1 -0
  331. package/dist/primitives/Card.js +35 -0
  332. package/dist/primitives/Card.js.map +1 -0
  333. package/dist/{components → primitives}/Carousel.d.ts +1 -1
  334. package/dist/primitives/Carousel.js +1841 -0
  335. package/dist/primitives/Carousel.js.map +1 -0
  336. package/dist/primitives/Chart.js +18761 -0
  337. package/dist/primitives/Chart.js.map +1 -0
  338. package/dist/primitives/Checkbox.js +282 -0
  339. package/dist/primitives/Checkbox.js.map +1 -0
  340. package/dist/primitives/Collapsible.js +29 -0
  341. package/dist/primitives/Collapsible.js.map +1 -0
  342. package/dist/primitives/Combobox.js +10251 -0
  343. package/dist/primitives/Combobox.js.map +1 -0
  344. package/dist/primitives/Command.js +218 -0
  345. package/dist/primitives/Command.js.map +1 -0
  346. package/dist/primitives/ContextMenu.js +368 -0
  347. package/dist/primitives/ContextMenu.js.map +1 -0
  348. package/dist/primitives/Dialog.js +37 -0
  349. package/dist/primitives/Dialog.js.map +1 -0
  350. package/dist/primitives/Drawer.js +1685 -0
  351. package/dist/primitives/Drawer.js.map +1 -0
  352. package/dist/primitives/DropdownMenu.js +347 -0
  353. package/dist/primitives/DropdownMenu.js.map +1 -0
  354. package/dist/primitives/Empty.js +43 -0
  355. package/dist/primitives/Empty.js.map +1 -0
  356. package/dist/primitives/Field.js +84 -0
  357. package/dist/primitives/Field.js.map +1 -0
  358. package/dist/primitives/HoverCard.js +267 -0
  359. package/dist/primitives/HoverCard.js.map +1 -0
  360. package/dist/primitives/Input.js +8 -0
  361. package/dist/primitives/Input.js.map +1 -0
  362. package/dist/primitives/InputGroup.js +20 -0
  363. package/dist/primitives/InputGroup.js.map +1 -0
  364. package/dist/primitives/InputOTP.js +59 -0
  365. package/dist/primitives/InputOTP.js.map +1 -0
  366. package/dist/primitives/Item.js +85 -0
  367. package/dist/primitives/Item.js.map +1 -0
  368. package/dist/primitives/Kbd.js +15 -0
  369. package/dist/primitives/Kbd.js.map +1 -0
  370. package/dist/primitives/Label.js +12 -0
  371. package/dist/primitives/Label.js.map +1 -0
  372. package/dist/primitives/Menubar.js +510 -0
  373. package/dist/primitives/Menubar.js.map +1 -0
  374. package/dist/primitives/NativeSelect.js +22 -0
  375. package/dist/primitives/NativeSelect.js.map +1 -0
  376. package/dist/primitives/NavigationMenu.js +823 -0
  377. package/dist/primitives/NavigationMenu.js.map +1 -0
  378. package/dist/primitives/Pagination.js +44 -0
  379. package/dist/primitives/Pagination.js.map +1 -0
  380. package/dist/primitives/Popover.js +416 -0
  381. package/dist/primitives/Popover.js.map +1 -0
  382. package/dist/primitives/Progress.js +103 -0
  383. package/dist/primitives/Progress.js.map +1 -0
  384. package/dist/primitives/RadioGroup.js +299 -0
  385. package/dist/primitives/RadioGroup.js.map +1 -0
  386. package/dist/primitives/Resizable.js +2047 -0
  387. package/dist/primitives/Resizable.js.map +1 -0
  388. package/dist/primitives/ScrollArea.js +731 -0
  389. package/dist/primitives/ScrollArea.js.map +1 -0
  390. package/dist/primitives/Select.js +1286 -0
  391. package/dist/primitives/Select.js.map +1 -0
  392. package/dist/primitives/Separator.js +12 -0
  393. package/dist/primitives/Separator.js.map +1 -0
  394. package/dist/primitives/Sheet.js +35 -0
  395. package/dist/primitives/Sheet.js.map +1 -0
  396. package/dist/primitives/Sidebar.js +265 -0
  397. package/dist/primitives/Sidebar.js.map +1 -0
  398. package/dist/primitives/Skeleton.js +8 -0
  399. package/dist/primitives/Skeleton.js.map +1 -0
  400. package/dist/primitives/Slider.js +569 -0
  401. package/dist/primitives/Slider.js.map +1 -0
  402. package/dist/primitives/Sonner.js +1236 -0
  403. package/dist/primitives/Sonner.js.map +1 -0
  404. package/dist/primitives/Spinner.js +14 -0
  405. package/dist/primitives/Spinner.js.map +1 -0
  406. package/dist/primitives/Switch.js +162 -0
  407. package/dist/primitives/Switch.js.map +1 -0
  408. package/dist/primitives/Table.js +36 -0
  409. package/dist/primitives/Table.js.map +1 -0
  410. package/dist/primitives/Tabs.js +224 -0
  411. package/dist/primitives/Tabs.js.map +1 -0
  412. package/dist/primitives/Textarea.js +8 -0
  413. package/dist/primitives/Textarea.js.map +1 -0
  414. package/dist/primitives/Toggle.js +17 -0
  415. package/dist/primitives/Toggle.js.map +1 -0
  416. package/dist/primitives/ToggleGroup.js +199 -0
  417. package/dist/primitives/ToggleGroup.js.map +1 -0
  418. package/dist/primitives/Tooltip.js +28 -0
  419. package/dist/primitives/Tooltip.js.map +1 -0
  420. package/dist/{components → primitives}/Typography.d.ts +1 -1
  421. package/dist/primitives/Typography.js +83 -0
  422. package/dist/primitives/Typography.js.map +1 -0
  423. package/dist/primitives/index.d.ts +55 -0
  424. package/dist/primitives/index.js +110 -0
  425. package/dist/primitives/index.js.map +1 -0
  426. package/dist/reselect-CABQm5hA.js +448 -0
  427. package/dist/reselect-CABQm5hA.js.map +1 -0
  428. package/dist/separator-BbhgePmX.js +36 -0
  429. package/dist/separator-BbhgePmX.js.map +1 -0
  430. package/dist/shadcn/components/badge.d.ts +1 -1
  431. package/dist/shadcn/components/button.d.ts +2 -2
  432. package/dist/shadcn/components/typography.d.ts +2 -2
  433. package/dist/sheet-D1ngftfX.js +39 -0
  434. package/dist/sheet-D1ngftfX.js.map +1 -0
  435. package/dist/skeleton-AR83txPr.js +9 -0
  436. package/dist/skeleton-AR83txPr.js.map +1 -0
  437. package/dist/textarea-BSZwxzjQ.js +9 -0
  438. package/dist/textarea-BSZwxzjQ.js.map +1 -0
  439. package/dist/toggle-2k9K8a5c.js +60 -0
  440. package/dist/toggle-2k9K8a5c.js.map +1 -0
  441. package/dist/tooltip-D5soNrAP.js +517 -0
  442. package/dist/tooltip-D5soNrAP.js.map +1 -0
  443. package/dist/use-mobile-IRjN_mlT.js +19 -0
  444. package/dist/use-mobile-IRjN_mlT.js.map +1 -0
  445. package/dist/utils-DdHUxIdC.js +3207 -0
  446. package/dist/utils-DdHUxIdC.js.map +1 -0
  447. package/dist/x-_o2T3n6D.js +18 -0
  448. package/dist/x-_o2T3n6D.js.map +1 -0
  449. package/package.json +16 -1
  450. /package/dist/{components → primitives}/Accordion.d.ts +0 -0
  451. /package/dist/{components → primitives}/Alert.d.ts +0 -0
  452. /package/dist/{components → primitives}/AlertDialog.d.ts +0 -0
  453. /package/dist/{components → primitives}/AspectRatio.d.ts +0 -0
  454. /package/dist/{components → primitives}/Avatar.d.ts +0 -0
  455. /package/dist/{components → primitives}/Badge.d.ts +0 -0
  456. /package/dist/{components → primitives}/Breadcrumb.d.ts +0 -0
  457. /package/dist/{components → primitives}/ButtonGroup.d.ts +0 -0
  458. /package/dist/{components → primitives}/Calendar.d.ts +0 -0
  459. /package/dist/{components → primitives}/Card.d.ts +0 -0
  460. /package/dist/{components → primitives}/Chart.d.ts +0 -0
  461. /package/dist/{components → primitives}/Checkbox.d.ts +0 -0
  462. /package/dist/{components → primitives}/Collapsible.d.ts +0 -0
  463. /package/dist/{components → primitives}/Combobox.d.ts +0 -0
  464. /package/dist/{components → primitives}/Command.d.ts +0 -0
  465. /package/dist/{components → primitives}/ContextMenu.d.ts +0 -0
  466. /package/dist/{components → primitives}/Dialog.d.ts +0 -0
  467. /package/dist/{components → primitives}/Drawer.d.ts +0 -0
  468. /package/dist/{components → primitives}/DropdownMenu.d.ts +0 -0
  469. /package/dist/{components → primitives}/Empty.d.ts +0 -0
  470. /package/dist/{components → primitives}/Field.d.ts +0 -0
  471. /package/dist/{components → primitives}/HoverCard.d.ts +0 -0
  472. /package/dist/{components → primitives}/Input.d.ts +0 -0
  473. /package/dist/{components → primitives}/InputGroup.d.ts +0 -0
  474. /package/dist/{components → primitives}/InputOTP.d.ts +0 -0
  475. /package/dist/{components → primitives}/Item.d.ts +0 -0
  476. /package/dist/{components → primitives}/Kbd.d.ts +0 -0
  477. /package/dist/{components → primitives}/Label.d.ts +0 -0
  478. /package/dist/{components → primitives}/Menubar.d.ts +0 -0
  479. /package/dist/{components → primitives}/NativeSelect.d.ts +0 -0
  480. /package/dist/{components → primitives}/NavigationMenu.d.ts +0 -0
  481. /package/dist/{components → primitives}/Pagination.d.ts +0 -0
  482. /package/dist/{components → primitives}/Popover.d.ts +0 -0
  483. /package/dist/{components → primitives}/Progress.d.ts +0 -0
  484. /package/dist/{components → primitives}/RadioGroup.d.ts +0 -0
  485. /package/dist/{components → primitives}/Resizable.d.ts +0 -0
  486. /package/dist/{components → primitives}/ScrollArea.d.ts +0 -0
  487. /package/dist/{components → primitives}/Select.d.ts +0 -0
  488. /package/dist/{components → primitives}/Separator.d.ts +0 -0
  489. /package/dist/{components → primitives}/Sheet.d.ts +0 -0
  490. /package/dist/{components → primitives}/Sidebar.d.ts +0 -0
  491. /package/dist/{components → primitives}/Skeleton.d.ts +0 -0
  492. /package/dist/{components → primitives}/Slider.d.ts +0 -0
  493. /package/dist/{components → primitives}/Sonner.d.ts +0 -0
  494. /package/dist/{components → primitives}/Spinner.d.ts +0 -0
  495. /package/dist/{components → primitives}/Switch.d.ts +0 -0
  496. /package/dist/{components → primitives}/Table.d.ts +0 -0
  497. /package/dist/{components → primitives}/Tabs.d.ts +0 -0
  498. /package/dist/{components → primitives}/Textarea.d.ts +0 -0
  499. /package/dist/{components → primitives}/Toggle.d.ts +0 -0
  500. /package/dist/{components → primitives}/ToggleGroup.d.ts +0 -0
  501. /package/dist/{components → primitives}/Tooltip.d.ts +0 -0
@@ -0,0 +1,2243 @@
1
+ import * as React from 'react';
2
+ import { useLayoutEffect } from 'react';
3
+ import * as ReactDOM from 'react-dom';
4
+
5
+ /**
6
+ * Custom positioning reference element.
7
+ * @see https://floating-ui.com/docs/virtual-elements
8
+ */
9
+
10
+ const sides = ['top', 'right', 'bottom', 'left'];
11
+ const min = Math.min;
12
+ const max = Math.max;
13
+ const round = Math.round;
14
+ const floor = Math.floor;
15
+ const createCoords = v => ({
16
+ x: v,
17
+ y: v
18
+ });
19
+ const oppositeSideMap = {
20
+ left: 'right',
21
+ right: 'left',
22
+ bottom: 'top',
23
+ top: 'bottom'
24
+ };
25
+ function clamp(start, value, end) {
26
+ return max(start, min(value, end));
27
+ }
28
+ function evaluate(value, param) {
29
+ return typeof value === 'function' ? value(param) : value;
30
+ }
31
+ function getSide(placement) {
32
+ return placement.split('-')[0];
33
+ }
34
+ function getAlignment(placement) {
35
+ return placement.split('-')[1];
36
+ }
37
+ function getOppositeAxis(axis) {
38
+ return axis === 'x' ? 'y' : 'x';
39
+ }
40
+ function getAxisLength(axis) {
41
+ return axis === 'y' ? 'height' : 'width';
42
+ }
43
+ function getSideAxis(placement) {
44
+ const firstChar = placement[0];
45
+ return firstChar === 't' || firstChar === 'b' ? 'y' : 'x';
46
+ }
47
+ function getAlignmentAxis(placement) {
48
+ return getOppositeAxis(getSideAxis(placement));
49
+ }
50
+ function getAlignmentSides(placement, rects, rtl) {
51
+ if (rtl === void 0) {
52
+ rtl = false;
53
+ }
54
+ const alignment = getAlignment(placement);
55
+ const alignmentAxis = getAlignmentAxis(placement);
56
+ const length = getAxisLength(alignmentAxis);
57
+ let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';
58
+ if (rects.reference[length] > rects.floating[length]) {
59
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
60
+ }
61
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
62
+ }
63
+ function getExpandedPlacements(placement) {
64
+ const oppositePlacement = getOppositePlacement(placement);
65
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
66
+ }
67
+ function getOppositeAlignmentPlacement(placement) {
68
+ return placement.includes('start') ? placement.replace('start', 'end') : placement.replace('end', 'start');
69
+ }
70
+ const lrPlacement = ['left', 'right'];
71
+ const rlPlacement = ['right', 'left'];
72
+ const tbPlacement = ['top', 'bottom'];
73
+ const btPlacement = ['bottom', 'top'];
74
+ function getSideList(side, isStart, rtl) {
75
+ switch (side) {
76
+ case 'top':
77
+ case 'bottom':
78
+ if (rtl) return isStart ? rlPlacement : lrPlacement;
79
+ return isStart ? lrPlacement : rlPlacement;
80
+ case 'left':
81
+ case 'right':
82
+ return isStart ? tbPlacement : btPlacement;
83
+ default:
84
+ return [];
85
+ }
86
+ }
87
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
88
+ const alignment = getAlignment(placement);
89
+ let list = getSideList(getSide(placement), direction === 'start', rtl);
90
+ if (alignment) {
91
+ list = list.map(side => side + "-" + alignment);
92
+ if (flipAlignment) {
93
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
94
+ }
95
+ }
96
+ return list;
97
+ }
98
+ function getOppositePlacement(placement) {
99
+ const side = getSide(placement);
100
+ return oppositeSideMap[side] + placement.slice(side.length);
101
+ }
102
+ function expandPaddingObject(padding) {
103
+ return {
104
+ top: 0,
105
+ right: 0,
106
+ bottom: 0,
107
+ left: 0,
108
+ ...padding
109
+ };
110
+ }
111
+ function getPaddingObject(padding) {
112
+ return typeof padding !== 'number' ? expandPaddingObject(padding) : {
113
+ top: padding,
114
+ right: padding,
115
+ bottom: padding,
116
+ left: padding
117
+ };
118
+ }
119
+ function rectToClientRect(rect) {
120
+ const {
121
+ x,
122
+ y,
123
+ width,
124
+ height
125
+ } = rect;
126
+ return {
127
+ width,
128
+ height,
129
+ top: y,
130
+ left: x,
131
+ right: x + width,
132
+ bottom: y + height,
133
+ x,
134
+ y
135
+ };
136
+ }
137
+
138
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
139
+ let {
140
+ reference,
141
+ floating
142
+ } = _ref;
143
+ const sideAxis = getSideAxis(placement);
144
+ const alignmentAxis = getAlignmentAxis(placement);
145
+ const alignLength = getAxisLength(alignmentAxis);
146
+ const side = getSide(placement);
147
+ const isVertical = sideAxis === 'y';
148
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
149
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
150
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
151
+ let coords;
152
+ switch (side) {
153
+ case 'top':
154
+ coords = {
155
+ x: commonX,
156
+ y: reference.y - floating.height
157
+ };
158
+ break;
159
+ case 'bottom':
160
+ coords = {
161
+ x: commonX,
162
+ y: reference.y + reference.height
163
+ };
164
+ break;
165
+ case 'right':
166
+ coords = {
167
+ x: reference.x + reference.width,
168
+ y: commonY
169
+ };
170
+ break;
171
+ case 'left':
172
+ coords = {
173
+ x: reference.x - floating.width,
174
+ y: commonY
175
+ };
176
+ break;
177
+ default:
178
+ coords = {
179
+ x: reference.x,
180
+ y: reference.y
181
+ };
182
+ }
183
+ switch (getAlignment(placement)) {
184
+ case 'start':
185
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
186
+ break;
187
+ case 'end':
188
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
189
+ break;
190
+ }
191
+ return coords;
192
+ }
193
+
194
+ /**
195
+ * Resolves with an object of overflow side offsets that determine how much the
196
+ * element is overflowing a given clipping boundary on each side.
197
+ * - positive = overflowing the boundary by that number of pixels
198
+ * - negative = how many pixels left before it will overflow
199
+ * - 0 = lies flush with the boundary
200
+ * @see https://floating-ui.com/docs/detectOverflow
201
+ */
202
+ async function detectOverflow(state, options) {
203
+ var _await$platform$isEle;
204
+ if (options === void 0) {
205
+ options = {};
206
+ }
207
+ const {
208
+ x,
209
+ y,
210
+ platform,
211
+ rects,
212
+ elements,
213
+ strategy
214
+ } = state;
215
+ const {
216
+ boundary = 'clippingAncestors',
217
+ rootBoundary = 'viewport',
218
+ elementContext = 'floating',
219
+ altBoundary = false,
220
+ padding = 0
221
+ } = evaluate(options, state);
222
+ const paddingObject = getPaddingObject(padding);
223
+ const altContext = elementContext === 'floating' ? 'reference' : 'floating';
224
+ const element = elements[altBoundary ? altContext : elementContext];
225
+ const clippingClientRect = rectToClientRect(await platform.getClippingRect({
226
+ element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),
227
+ boundary,
228
+ rootBoundary,
229
+ strategy
230
+ }));
231
+ const rect = elementContext === 'floating' ? {
232
+ x,
233
+ y,
234
+ width: rects.floating.width,
235
+ height: rects.floating.height
236
+ } : rects.reference;
237
+ const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
238
+ const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {
239
+ x: 1,
240
+ y: 1
241
+ } : {
242
+ x: 1,
243
+ y: 1
244
+ };
245
+ const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
246
+ elements,
247
+ rect,
248
+ offsetParent,
249
+ strategy
250
+ }) : rect);
251
+ return {
252
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
253
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
254
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
255
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
256
+ };
257
+ }
258
+
259
+ // Maximum number of resets that can occur before bailing to avoid infinite reset loops.
260
+ const MAX_RESET_COUNT = 50;
261
+
262
+ /**
263
+ * Computes the `x` and `y` coordinates that will place the floating element
264
+ * next to a given reference element.
265
+ *
266
+ * This export does not have any `platform` interface logic. You will need to
267
+ * write one for the platform you are using Floating UI with.
268
+ */
269
+ const computePosition$1 = async (reference, floating, config) => {
270
+ const {
271
+ placement = 'bottom',
272
+ strategy = 'absolute',
273
+ middleware = [],
274
+ platform
275
+ } = config;
276
+ const platformWithDetectOverflow = platform.detectOverflow ? platform : {
277
+ ...platform,
278
+ detectOverflow
279
+ };
280
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
281
+ let rects = await platform.getElementRects({
282
+ reference,
283
+ floating,
284
+ strategy
285
+ });
286
+ let {
287
+ x,
288
+ y
289
+ } = computeCoordsFromPlacement(rects, placement, rtl);
290
+ let statefulPlacement = placement;
291
+ let resetCount = 0;
292
+ const middlewareData = {};
293
+ for (let i = 0; i < middleware.length; i++) {
294
+ const currentMiddleware = middleware[i];
295
+ if (!currentMiddleware) {
296
+ continue;
297
+ }
298
+ const {
299
+ name,
300
+ fn
301
+ } = currentMiddleware;
302
+ const {
303
+ x: nextX,
304
+ y: nextY,
305
+ data,
306
+ reset
307
+ } = await fn({
308
+ x,
309
+ y,
310
+ initialPlacement: placement,
311
+ placement: statefulPlacement,
312
+ strategy,
313
+ middlewareData,
314
+ rects,
315
+ platform: platformWithDetectOverflow,
316
+ elements: {
317
+ reference,
318
+ floating
319
+ }
320
+ });
321
+ x = nextX != null ? nextX : x;
322
+ y = nextY != null ? nextY : y;
323
+ middlewareData[name] = {
324
+ ...middlewareData[name],
325
+ ...data
326
+ };
327
+ if (reset && resetCount < MAX_RESET_COUNT) {
328
+ resetCount++;
329
+ if (typeof reset === 'object') {
330
+ if (reset.placement) {
331
+ statefulPlacement = reset.placement;
332
+ }
333
+ if (reset.rects) {
334
+ rects = reset.rects === true ? await platform.getElementRects({
335
+ reference,
336
+ floating,
337
+ strategy
338
+ }) : reset.rects;
339
+ }
340
+ ({
341
+ x,
342
+ y
343
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
344
+ }
345
+ i = -1;
346
+ }
347
+ }
348
+ return {
349
+ x,
350
+ y,
351
+ placement: statefulPlacement,
352
+ strategy,
353
+ middlewareData
354
+ };
355
+ };
356
+
357
+ /**
358
+ * Provides data to position an inner element of the floating element so that it
359
+ * appears centered to the reference element.
360
+ * @see https://floating-ui.com/docs/arrow
361
+ */
362
+ const arrow$3 = options => ({
363
+ name: 'arrow',
364
+ options,
365
+ async fn(state) {
366
+ const {
367
+ x,
368
+ y,
369
+ placement,
370
+ rects,
371
+ platform,
372
+ elements,
373
+ middlewareData
374
+ } = state;
375
+ // Since `element` is required, we don't Partial<> the type.
376
+ const {
377
+ element,
378
+ padding = 0
379
+ } = evaluate(options, state) || {};
380
+ if (element == null) {
381
+ return {};
382
+ }
383
+ const paddingObject = getPaddingObject(padding);
384
+ const coords = {
385
+ x,
386
+ y
387
+ };
388
+ const axis = getAlignmentAxis(placement);
389
+ const length = getAxisLength(axis);
390
+ const arrowDimensions = await platform.getDimensions(element);
391
+ const isYAxis = axis === 'y';
392
+ const minProp = isYAxis ? 'top' : 'left';
393
+ const maxProp = isYAxis ? 'bottom' : 'right';
394
+ const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';
395
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
396
+ const startDiff = coords[axis] - rects.reference[axis];
397
+ const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
398
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
399
+
400
+ // DOM platform can return `window` as the `offsetParent`.
401
+ if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {
402
+ clientSize = elements.floating[clientProp] || rects.floating[length];
403
+ }
404
+ const centerToReference = endDiff / 2 - startDiff / 2;
405
+
406
+ // If the padding is large enough that it causes the arrow to no longer be
407
+ // centered, modify the padding so that it is centered.
408
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
409
+ const minPadding = min(paddingObject[minProp], largestPossiblePadding);
410
+ const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
411
+
412
+ // Make sure the arrow doesn't overflow the floating element if the center
413
+ // point is outside the floating element's bounds.
414
+ const min$1 = minPadding;
415
+ const max = clientSize - arrowDimensions[length] - maxPadding;
416
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
417
+ const offset = clamp(min$1, center, max);
418
+
419
+ // If the reference is small enough that the arrow's padding causes it to
420
+ // to point to nothing for an aligned placement, adjust the offset of the
421
+ // floating element itself. To ensure `shift()` continues to take action,
422
+ // a single reset is performed when this is true.
423
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
424
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;
425
+ return {
426
+ [axis]: coords[axis] + alignmentOffset,
427
+ data: {
428
+ [axis]: offset,
429
+ centerOffset: center - offset - alignmentOffset,
430
+ ...(shouldAddOffset && {
431
+ alignmentOffset
432
+ })
433
+ },
434
+ reset: shouldAddOffset
435
+ };
436
+ }
437
+ });
438
+
439
+ /**
440
+ * Optimizes the visibility of the floating element by flipping the `placement`
441
+ * in order to keep it in view when the preferred placement(s) will overflow the
442
+ * clipping boundary. Alternative to `autoPlacement`.
443
+ * @see https://floating-ui.com/docs/flip
444
+ */
445
+ const flip$2 = function (options) {
446
+ if (options === void 0) {
447
+ options = {};
448
+ }
449
+ return {
450
+ name: 'flip',
451
+ options,
452
+ async fn(state) {
453
+ var _middlewareData$arrow, _middlewareData$flip;
454
+ const {
455
+ placement,
456
+ middlewareData,
457
+ rects,
458
+ initialPlacement,
459
+ platform,
460
+ elements
461
+ } = state;
462
+ const {
463
+ mainAxis: checkMainAxis = true,
464
+ crossAxis: checkCrossAxis = true,
465
+ fallbackPlacements: specifiedFallbackPlacements,
466
+ fallbackStrategy = 'bestFit',
467
+ fallbackAxisSideDirection = 'none',
468
+ flipAlignment = true,
469
+ ...detectOverflowOptions
470
+ } = evaluate(options, state);
471
+
472
+ // If a reset by the arrow was caused due to an alignment offset being
473
+ // added, we should skip any logic now since `flip()` has already done its
474
+ // work.
475
+ // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643
476
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
477
+ return {};
478
+ }
479
+ const side = getSide(placement);
480
+ const initialSideAxis = getSideAxis(initialPlacement);
481
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
482
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
483
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
484
+ const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';
485
+ if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
486
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
487
+ }
488
+ const placements = [initialPlacement, ...fallbackPlacements];
489
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
490
+ const overflows = [];
491
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
492
+ if (checkMainAxis) {
493
+ overflows.push(overflow[side]);
494
+ }
495
+ if (checkCrossAxis) {
496
+ const sides = getAlignmentSides(placement, rects, rtl);
497
+ overflows.push(overflow[sides[0]], overflow[sides[1]]);
498
+ }
499
+ overflowsData = [...overflowsData, {
500
+ placement,
501
+ overflows
502
+ }];
503
+
504
+ // One or more sides is overflowing.
505
+ if (!overflows.every(side => side <= 0)) {
506
+ var _middlewareData$flip2, _overflowsData$filter;
507
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
508
+ const nextPlacement = placements[nextIndex];
509
+ if (nextPlacement) {
510
+ const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;
511
+ if (!ignoreCrossAxisOverflow ||
512
+ // We leave the current main axis only if every placement on that axis
513
+ // overflows the main axis.
514
+ overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
515
+ // Try next placement and re-run the lifecycle.
516
+ return {
517
+ data: {
518
+ index: nextIndex,
519
+ overflows: overflowsData
520
+ },
521
+ reset: {
522
+ placement: nextPlacement
523
+ }
524
+ };
525
+ }
526
+ }
527
+
528
+ // First, find the candidates that fit on the mainAxis side of overflow,
529
+ // then find the placement that fits the best on the main crossAxis side.
530
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
531
+
532
+ // Otherwise fallback.
533
+ if (!resetPlacement) {
534
+ switch (fallbackStrategy) {
535
+ case 'bestFit':
536
+ {
537
+ var _overflowsData$filter2;
538
+ const placement = (_overflowsData$filter2 = overflowsData.filter(d => {
539
+ if (hasFallbackAxisSideDirection) {
540
+ const currentSideAxis = getSideAxis(d.placement);
541
+ return currentSideAxis === initialSideAxis ||
542
+ // Create a bias to the `y` side axis due to horizontal
543
+ // reading directions favoring greater width.
544
+ currentSideAxis === 'y';
545
+ }
546
+ return true;
547
+ }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
548
+ if (placement) {
549
+ resetPlacement = placement;
550
+ }
551
+ break;
552
+ }
553
+ case 'initialPlacement':
554
+ resetPlacement = initialPlacement;
555
+ break;
556
+ }
557
+ }
558
+ if (placement !== resetPlacement) {
559
+ return {
560
+ reset: {
561
+ placement: resetPlacement
562
+ }
563
+ };
564
+ }
565
+ }
566
+ return {};
567
+ }
568
+ };
569
+ };
570
+
571
+ function getSideOffsets(overflow, rect) {
572
+ return {
573
+ top: overflow.top - rect.height,
574
+ right: overflow.right - rect.width,
575
+ bottom: overflow.bottom - rect.height,
576
+ left: overflow.left - rect.width
577
+ };
578
+ }
579
+ function isAnySideFullyClipped(overflow) {
580
+ return sides.some(side => overflow[side] >= 0);
581
+ }
582
+ /**
583
+ * Provides data to hide the floating element in applicable situations, such as
584
+ * when it is not in the same clipping context as the reference element.
585
+ * @see https://floating-ui.com/docs/hide
586
+ */
587
+ const hide$2 = function (options) {
588
+ if (options === void 0) {
589
+ options = {};
590
+ }
591
+ return {
592
+ name: 'hide',
593
+ options,
594
+ async fn(state) {
595
+ const {
596
+ rects,
597
+ platform
598
+ } = state;
599
+ const {
600
+ strategy = 'referenceHidden',
601
+ ...detectOverflowOptions
602
+ } = evaluate(options, state);
603
+ switch (strategy) {
604
+ case 'referenceHidden':
605
+ {
606
+ const overflow = await platform.detectOverflow(state, {
607
+ ...detectOverflowOptions,
608
+ elementContext: 'reference'
609
+ });
610
+ const offsets = getSideOffsets(overflow, rects.reference);
611
+ return {
612
+ data: {
613
+ referenceHiddenOffsets: offsets,
614
+ referenceHidden: isAnySideFullyClipped(offsets)
615
+ }
616
+ };
617
+ }
618
+ case 'escaped':
619
+ {
620
+ const overflow = await platform.detectOverflow(state, {
621
+ ...detectOverflowOptions,
622
+ altBoundary: true
623
+ });
624
+ const offsets = getSideOffsets(overflow, rects.floating);
625
+ return {
626
+ data: {
627
+ escapedOffsets: offsets,
628
+ escaped: isAnySideFullyClipped(offsets)
629
+ }
630
+ };
631
+ }
632
+ default:
633
+ {
634
+ return {};
635
+ }
636
+ }
637
+ }
638
+ };
639
+ };
640
+
641
+ const originSides = /*#__PURE__*/new Set(['left', 'top']);
642
+
643
+ // For type backwards-compatibility, the `OffsetOptions` type was also
644
+ // Derivable.
645
+
646
+ async function convertValueToCoords(state, options) {
647
+ const {
648
+ placement,
649
+ platform,
650
+ elements
651
+ } = state;
652
+ const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
653
+ const side = getSide(placement);
654
+ const alignment = getAlignment(placement);
655
+ const isVertical = getSideAxis(placement) === 'y';
656
+ const mainAxisMulti = originSides.has(side) ? -1 : 1;
657
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
658
+ const rawValue = evaluate(options, state);
659
+
660
+ // eslint-disable-next-line prefer-const
661
+ let {
662
+ mainAxis,
663
+ crossAxis,
664
+ alignmentAxis
665
+ } = typeof rawValue === 'number' ? {
666
+ mainAxis: rawValue,
667
+ crossAxis: 0,
668
+ alignmentAxis: null
669
+ } : {
670
+ mainAxis: rawValue.mainAxis || 0,
671
+ crossAxis: rawValue.crossAxis || 0,
672
+ alignmentAxis: rawValue.alignmentAxis
673
+ };
674
+ if (alignment && typeof alignmentAxis === 'number') {
675
+ crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;
676
+ }
677
+ return isVertical ? {
678
+ x: crossAxis * crossAxisMulti,
679
+ y: mainAxis * mainAxisMulti
680
+ } : {
681
+ x: mainAxis * mainAxisMulti,
682
+ y: crossAxis * crossAxisMulti
683
+ };
684
+ }
685
+
686
+ /**
687
+ * Modifies the placement by translating the floating element along the
688
+ * specified axes.
689
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
690
+ * object may be passed.
691
+ * @see https://floating-ui.com/docs/offset
692
+ */
693
+ const offset$2 = function (options) {
694
+ if (options === void 0) {
695
+ options = 0;
696
+ }
697
+ return {
698
+ name: 'offset',
699
+ options,
700
+ async fn(state) {
701
+ var _middlewareData$offse, _middlewareData$arrow;
702
+ const {
703
+ x,
704
+ y,
705
+ placement,
706
+ middlewareData
707
+ } = state;
708
+ const diffCoords = await convertValueToCoords(state, options);
709
+
710
+ // If the placement is the same and the arrow caused an alignment offset
711
+ // then we don't need to change the positioning coordinates.
712
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
713
+ return {};
714
+ }
715
+ return {
716
+ x: x + diffCoords.x,
717
+ y: y + diffCoords.y,
718
+ data: {
719
+ ...diffCoords,
720
+ placement
721
+ }
722
+ };
723
+ }
724
+ };
725
+ };
726
+
727
+ /**
728
+ * Optimizes the visibility of the floating element by shifting it in order to
729
+ * keep it in view when it will overflow the clipping boundary.
730
+ * @see https://floating-ui.com/docs/shift
731
+ */
732
+ const shift$2 = function (options) {
733
+ if (options === void 0) {
734
+ options = {};
735
+ }
736
+ return {
737
+ name: 'shift',
738
+ options,
739
+ async fn(state) {
740
+ const {
741
+ x,
742
+ y,
743
+ placement,
744
+ platform
745
+ } = state;
746
+ const {
747
+ mainAxis: checkMainAxis = true,
748
+ crossAxis: checkCrossAxis = false,
749
+ limiter = {
750
+ fn: _ref => {
751
+ let {
752
+ x,
753
+ y
754
+ } = _ref;
755
+ return {
756
+ x,
757
+ y
758
+ };
759
+ }
760
+ },
761
+ ...detectOverflowOptions
762
+ } = evaluate(options, state);
763
+ const coords = {
764
+ x,
765
+ y
766
+ };
767
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
768
+ const crossAxis = getSideAxis(getSide(placement));
769
+ const mainAxis = getOppositeAxis(crossAxis);
770
+ let mainAxisCoord = coords[mainAxis];
771
+ let crossAxisCoord = coords[crossAxis];
772
+ if (checkMainAxis) {
773
+ const minSide = mainAxis === 'y' ? 'top' : 'left';
774
+ const maxSide = mainAxis === 'y' ? 'bottom' : 'right';
775
+ const min = mainAxisCoord + overflow[minSide];
776
+ const max = mainAxisCoord - overflow[maxSide];
777
+ mainAxisCoord = clamp(min, mainAxisCoord, max);
778
+ }
779
+ if (checkCrossAxis) {
780
+ const minSide = crossAxis === 'y' ? 'top' : 'left';
781
+ const maxSide = crossAxis === 'y' ? 'bottom' : 'right';
782
+ const min = crossAxisCoord + overflow[minSide];
783
+ const max = crossAxisCoord - overflow[maxSide];
784
+ crossAxisCoord = clamp(min, crossAxisCoord, max);
785
+ }
786
+ const limitedCoords = limiter.fn({
787
+ ...state,
788
+ [mainAxis]: mainAxisCoord,
789
+ [crossAxis]: crossAxisCoord
790
+ });
791
+ return {
792
+ ...limitedCoords,
793
+ data: {
794
+ x: limitedCoords.x - x,
795
+ y: limitedCoords.y - y,
796
+ enabled: {
797
+ [mainAxis]: checkMainAxis,
798
+ [crossAxis]: checkCrossAxis
799
+ }
800
+ }
801
+ };
802
+ }
803
+ };
804
+ };
805
+ /**
806
+ * Built-in `limiter` that will stop `shift()` at a certain point.
807
+ */
808
+ const limitShift$2 = function (options) {
809
+ if (options === void 0) {
810
+ options = {};
811
+ }
812
+ return {
813
+ options,
814
+ fn(state) {
815
+ const {
816
+ x,
817
+ y,
818
+ placement,
819
+ rects,
820
+ middlewareData
821
+ } = state;
822
+ const {
823
+ offset = 0,
824
+ mainAxis: checkMainAxis = true,
825
+ crossAxis: checkCrossAxis = true
826
+ } = evaluate(options, state);
827
+ const coords = {
828
+ x,
829
+ y
830
+ };
831
+ const crossAxis = getSideAxis(placement);
832
+ const mainAxis = getOppositeAxis(crossAxis);
833
+ let mainAxisCoord = coords[mainAxis];
834
+ let crossAxisCoord = coords[crossAxis];
835
+ const rawOffset = evaluate(offset, state);
836
+ const computedOffset = typeof rawOffset === 'number' ? {
837
+ mainAxis: rawOffset,
838
+ crossAxis: 0
839
+ } : {
840
+ mainAxis: 0,
841
+ crossAxis: 0,
842
+ ...rawOffset
843
+ };
844
+ if (checkMainAxis) {
845
+ const len = mainAxis === 'y' ? 'height' : 'width';
846
+ const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
847
+ const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
848
+ if (mainAxisCoord < limitMin) {
849
+ mainAxisCoord = limitMin;
850
+ } else if (mainAxisCoord > limitMax) {
851
+ mainAxisCoord = limitMax;
852
+ }
853
+ }
854
+ if (checkCrossAxis) {
855
+ var _middlewareData$offse, _middlewareData$offse2;
856
+ const len = mainAxis === 'y' ? 'width' : 'height';
857
+ const isOriginSide = originSides.has(getSide(placement));
858
+ const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
859
+ const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
860
+ if (crossAxisCoord < limitMin) {
861
+ crossAxisCoord = limitMin;
862
+ } else if (crossAxisCoord > limitMax) {
863
+ crossAxisCoord = limitMax;
864
+ }
865
+ }
866
+ return {
867
+ [mainAxis]: mainAxisCoord,
868
+ [crossAxis]: crossAxisCoord
869
+ };
870
+ }
871
+ };
872
+ };
873
+
874
+ /**
875
+ * Provides data that allows you to change the size of the floating element —
876
+ * for instance, prevent it from overflowing the clipping boundary or match the
877
+ * width of the reference element.
878
+ * @see https://floating-ui.com/docs/size
879
+ */
880
+ const size$2 = function (options) {
881
+ if (options === void 0) {
882
+ options = {};
883
+ }
884
+ return {
885
+ name: 'size',
886
+ options,
887
+ async fn(state) {
888
+ var _state$middlewareData, _state$middlewareData2;
889
+ const {
890
+ placement,
891
+ rects,
892
+ platform,
893
+ elements
894
+ } = state;
895
+ const {
896
+ apply = () => {},
897
+ ...detectOverflowOptions
898
+ } = evaluate(options, state);
899
+ const overflow = await platform.detectOverflow(state, detectOverflowOptions);
900
+ const side = getSide(placement);
901
+ const alignment = getAlignment(placement);
902
+ const isYAxis = getSideAxis(placement) === 'y';
903
+ const {
904
+ width,
905
+ height
906
+ } = rects.floating;
907
+ let heightSide;
908
+ let widthSide;
909
+ if (side === 'top' || side === 'bottom') {
910
+ heightSide = side;
911
+ widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';
912
+ } else {
913
+ widthSide = side;
914
+ heightSide = alignment === 'end' ? 'top' : 'bottom';
915
+ }
916
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
917
+ const maximumClippingWidth = width - overflow.left - overflow.right;
918
+ const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
919
+ const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
920
+ const noShift = !state.middlewareData.shift;
921
+ let availableHeight = overflowAvailableHeight;
922
+ let availableWidth = overflowAvailableWidth;
923
+ if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
924
+ availableWidth = maximumClippingWidth;
925
+ }
926
+ if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
927
+ availableHeight = maximumClippingHeight;
928
+ }
929
+ if (noShift && !alignment) {
930
+ const xMin = max(overflow.left, 0);
931
+ const xMax = max(overflow.right, 0);
932
+ const yMin = max(overflow.top, 0);
933
+ const yMax = max(overflow.bottom, 0);
934
+ if (isYAxis) {
935
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
936
+ } else {
937
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
938
+ }
939
+ }
940
+ await apply({
941
+ ...state,
942
+ availableWidth,
943
+ availableHeight
944
+ });
945
+ const nextDimensions = await platform.getDimensions(elements.floating);
946
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
947
+ return {
948
+ reset: {
949
+ rects: true
950
+ }
951
+ };
952
+ }
953
+ return {};
954
+ }
955
+ };
956
+ };
957
+
958
+ function hasWindow() {
959
+ return typeof window !== 'undefined';
960
+ }
961
+ function getNodeName(node) {
962
+ if (isNode(node)) {
963
+ return (node.nodeName || '').toLowerCase();
964
+ }
965
+ // Mocked nodes in testing environments may not be instances of Node. By
966
+ // returning `#document` an infinite loop won't occur.
967
+ // https://github.com/floating-ui/floating-ui/issues/2317
968
+ return '#document';
969
+ }
970
+ function getWindow(node) {
971
+ var _node$ownerDocument;
972
+ return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
973
+ }
974
+ function getDocumentElement(node) {
975
+ var _ref;
976
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
977
+ }
978
+ function isNode(value) {
979
+ if (!hasWindow()) {
980
+ return false;
981
+ }
982
+ return value instanceof Node || value instanceof getWindow(value).Node;
983
+ }
984
+ function isElement(value) {
985
+ if (!hasWindow()) {
986
+ return false;
987
+ }
988
+ return value instanceof Element || value instanceof getWindow(value).Element;
989
+ }
990
+ function isHTMLElement(value) {
991
+ if (!hasWindow()) {
992
+ return false;
993
+ }
994
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
995
+ }
996
+ function isShadowRoot(value) {
997
+ if (!hasWindow() || typeof ShadowRoot === 'undefined') {
998
+ return false;
999
+ }
1000
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
1001
+ }
1002
+ function isOverflowElement(element) {
1003
+ const {
1004
+ overflow,
1005
+ overflowX,
1006
+ overflowY,
1007
+ display
1008
+ } = getComputedStyle$1(element);
1009
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && display !== 'inline' && display !== 'contents';
1010
+ }
1011
+ function isTableElement(element) {
1012
+ return /^(table|td|th)$/.test(getNodeName(element));
1013
+ }
1014
+ function isTopLayer(element) {
1015
+ try {
1016
+ if (element.matches(':popover-open')) {
1017
+ return true;
1018
+ }
1019
+ } catch (_e) {
1020
+ // no-op
1021
+ }
1022
+ try {
1023
+ return element.matches(':modal');
1024
+ } catch (_e) {
1025
+ return false;
1026
+ }
1027
+ }
1028
+ const willChangeRe = /transform|translate|scale|rotate|perspective|filter/;
1029
+ const containRe = /paint|layout|strict|content/;
1030
+ const isNotNone = value => !!value && value !== 'none';
1031
+ let isWebKitValue;
1032
+ function isContainingBlock(elementOrCss) {
1033
+ const css = isElement(elementOrCss) ? getComputedStyle$1(elementOrCss) : elementOrCss;
1034
+
1035
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1036
+ // https://drafts.csswg.org/css-transforms-2/#individual-transforms
1037
+ return isNotNone(css.transform) || isNotNone(css.translate) || isNotNone(css.scale) || isNotNone(css.rotate) || isNotNone(css.perspective) || !isWebKit() && (isNotNone(css.backdropFilter) || isNotNone(css.filter)) || willChangeRe.test(css.willChange || '') || containRe.test(css.contain || '');
1038
+ }
1039
+ function getContainingBlock(element) {
1040
+ let currentNode = getParentNode(element);
1041
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
1042
+ if (isContainingBlock(currentNode)) {
1043
+ return currentNode;
1044
+ } else if (isTopLayer(currentNode)) {
1045
+ return null;
1046
+ }
1047
+ currentNode = getParentNode(currentNode);
1048
+ }
1049
+ return null;
1050
+ }
1051
+ function isWebKit() {
1052
+ if (isWebKitValue == null) {
1053
+ isWebKitValue = typeof CSS !== 'undefined' && CSS.supports && CSS.supports('-webkit-backdrop-filter', 'none');
1054
+ }
1055
+ return isWebKitValue;
1056
+ }
1057
+ function isLastTraversableNode(node) {
1058
+ return /^(html|body|#document)$/.test(getNodeName(node));
1059
+ }
1060
+ function getComputedStyle$1(element) {
1061
+ return getWindow(element).getComputedStyle(element);
1062
+ }
1063
+ function getNodeScroll(element) {
1064
+ if (isElement(element)) {
1065
+ return {
1066
+ scrollLeft: element.scrollLeft,
1067
+ scrollTop: element.scrollTop
1068
+ };
1069
+ }
1070
+ return {
1071
+ scrollLeft: element.scrollX,
1072
+ scrollTop: element.scrollY
1073
+ };
1074
+ }
1075
+ function getParentNode(node) {
1076
+ if (getNodeName(node) === 'html') {
1077
+ return node;
1078
+ }
1079
+ const result =
1080
+ // Step into the shadow DOM of the parent of a slotted node.
1081
+ node.assignedSlot ||
1082
+ // DOM Element detected.
1083
+ node.parentNode ||
1084
+ // ShadowRoot detected.
1085
+ isShadowRoot(node) && node.host ||
1086
+ // Fallback.
1087
+ getDocumentElement(node);
1088
+ return isShadowRoot(result) ? result.host : result;
1089
+ }
1090
+ function getNearestOverflowAncestor(node) {
1091
+ const parentNode = getParentNode(node);
1092
+ if (isLastTraversableNode(parentNode)) {
1093
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
1094
+ }
1095
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
1096
+ return parentNode;
1097
+ }
1098
+ return getNearestOverflowAncestor(parentNode);
1099
+ }
1100
+ function getOverflowAncestors(node, list, traverseIframes) {
1101
+ var _node$ownerDocument2;
1102
+ if (list === void 0) {
1103
+ list = [];
1104
+ }
1105
+ if (traverseIframes === void 0) {
1106
+ traverseIframes = true;
1107
+ }
1108
+ const scrollableAncestor = getNearestOverflowAncestor(node);
1109
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
1110
+ const win = getWindow(scrollableAncestor);
1111
+ if (isBody) {
1112
+ const frameElement = getFrameElement(win);
1113
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);
1114
+ } else {
1115
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
1116
+ }
1117
+ }
1118
+ function getFrameElement(win) {
1119
+ return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;
1120
+ }
1121
+
1122
+ function getCssDimensions(element) {
1123
+ const css = getComputedStyle$1(element);
1124
+ // In testing environments, the `width` and `height` properties are empty
1125
+ // strings for SVG elements, returning NaN. Fallback to `0` in this case.
1126
+ let width = parseFloat(css.width) || 0;
1127
+ let height = parseFloat(css.height) || 0;
1128
+ const hasOffset = isHTMLElement(element);
1129
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
1130
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
1131
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
1132
+ if (shouldFallback) {
1133
+ width = offsetWidth;
1134
+ height = offsetHeight;
1135
+ }
1136
+ return {
1137
+ width,
1138
+ height,
1139
+ $: shouldFallback
1140
+ };
1141
+ }
1142
+
1143
+ function unwrapElement(element) {
1144
+ return !isElement(element) ? element.contextElement : element;
1145
+ }
1146
+
1147
+ function getScale(element) {
1148
+ const domElement = unwrapElement(element);
1149
+ if (!isHTMLElement(domElement)) {
1150
+ return createCoords(1);
1151
+ }
1152
+ const rect = domElement.getBoundingClientRect();
1153
+ const {
1154
+ width,
1155
+ height,
1156
+ $
1157
+ } = getCssDimensions(domElement);
1158
+ let x = ($ ? round(rect.width) : rect.width) / width;
1159
+ let y = ($ ? round(rect.height) : rect.height) / height;
1160
+
1161
+ // 0, NaN, or Infinity should always fallback to 1.
1162
+
1163
+ if (!x || !Number.isFinite(x)) {
1164
+ x = 1;
1165
+ }
1166
+ if (!y || !Number.isFinite(y)) {
1167
+ y = 1;
1168
+ }
1169
+ return {
1170
+ x,
1171
+ y
1172
+ };
1173
+ }
1174
+
1175
+ const noOffsets = /*#__PURE__*/createCoords(0);
1176
+ function getVisualOffsets(element) {
1177
+ const win = getWindow(element);
1178
+ if (!isWebKit() || !win.visualViewport) {
1179
+ return noOffsets;
1180
+ }
1181
+ return {
1182
+ x: win.visualViewport.offsetLeft,
1183
+ y: win.visualViewport.offsetTop
1184
+ };
1185
+ }
1186
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
1187
+ if (isFixed === void 0) {
1188
+ isFixed = false;
1189
+ }
1190
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
1191
+ return false;
1192
+ }
1193
+ return isFixed;
1194
+ }
1195
+
1196
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1197
+ if (includeScale === void 0) {
1198
+ includeScale = false;
1199
+ }
1200
+ if (isFixedStrategy === void 0) {
1201
+ isFixedStrategy = false;
1202
+ }
1203
+ const clientRect = element.getBoundingClientRect();
1204
+ const domElement = unwrapElement(element);
1205
+ let scale = createCoords(1);
1206
+ if (includeScale) {
1207
+ if (offsetParent) {
1208
+ if (isElement(offsetParent)) {
1209
+ scale = getScale(offsetParent);
1210
+ }
1211
+ } else {
1212
+ scale = getScale(element);
1213
+ }
1214
+ }
1215
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
1216
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
1217
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
1218
+ let width = clientRect.width / scale.x;
1219
+ let height = clientRect.height / scale.y;
1220
+ if (domElement) {
1221
+ const win = getWindow(domElement);
1222
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1223
+ let currentWin = win;
1224
+ let currentIFrame = getFrameElement(currentWin);
1225
+ while (currentIFrame && offsetParent && offsetWin !== currentWin) {
1226
+ const iframeScale = getScale(currentIFrame);
1227
+ const iframeRect = currentIFrame.getBoundingClientRect();
1228
+ const css = getComputedStyle$1(currentIFrame);
1229
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1230
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1231
+ x *= iframeScale.x;
1232
+ y *= iframeScale.y;
1233
+ width *= iframeScale.x;
1234
+ height *= iframeScale.y;
1235
+ x += left;
1236
+ y += top;
1237
+ currentWin = getWindow(currentIFrame);
1238
+ currentIFrame = getFrameElement(currentWin);
1239
+ }
1240
+ }
1241
+ return rectToClientRect({
1242
+ width,
1243
+ height,
1244
+ x,
1245
+ y
1246
+ });
1247
+ }
1248
+
1249
+ // If <html> has a CSS width greater than the viewport, then this will be
1250
+ // incorrect for RTL.
1251
+ function getWindowScrollBarX(element, rect) {
1252
+ const leftScroll = getNodeScroll(element).scrollLeft;
1253
+ if (!rect) {
1254
+ return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;
1255
+ }
1256
+ return rect.left + leftScroll;
1257
+ }
1258
+
1259
+ function getHTMLOffset(documentElement, scroll) {
1260
+ const htmlRect = documentElement.getBoundingClientRect();
1261
+ const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);
1262
+ const y = htmlRect.top + scroll.scrollTop;
1263
+ return {
1264
+ x,
1265
+ y
1266
+ };
1267
+ }
1268
+
1269
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1270
+ let {
1271
+ elements,
1272
+ rect,
1273
+ offsetParent,
1274
+ strategy
1275
+ } = _ref;
1276
+ const isFixed = strategy === 'fixed';
1277
+ const documentElement = getDocumentElement(offsetParent);
1278
+ const topLayer = elements ? isTopLayer(elements.floating) : false;
1279
+ if (offsetParent === documentElement || topLayer && isFixed) {
1280
+ return rect;
1281
+ }
1282
+ let scroll = {
1283
+ scrollLeft: 0,
1284
+ scrollTop: 0
1285
+ };
1286
+ let scale = createCoords(1);
1287
+ const offsets = createCoords(0);
1288
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1289
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1290
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1291
+ scroll = getNodeScroll(offsetParent);
1292
+ }
1293
+ if (isOffsetParentAnElement) {
1294
+ const offsetRect = getBoundingClientRect(offsetParent);
1295
+ scale = getScale(offsetParent);
1296
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1297
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1298
+ }
1299
+ }
1300
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1301
+ return {
1302
+ width: rect.width * scale.x,
1303
+ height: rect.height * scale.y,
1304
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,
1305
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y
1306
+ };
1307
+ }
1308
+
1309
+ function getClientRects(element) {
1310
+ return Array.from(element.getClientRects());
1311
+ }
1312
+
1313
+ // Gets the entire size of the scrollable document area, even extending outside
1314
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable.
1315
+ function getDocumentRect(element) {
1316
+ const html = getDocumentElement(element);
1317
+ const scroll = getNodeScroll(element);
1318
+ const body = element.ownerDocument.body;
1319
+ const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1320
+ const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1321
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1322
+ const y = -scroll.scrollTop;
1323
+ if (getComputedStyle$1(body).direction === 'rtl') {
1324
+ x += max(html.clientWidth, body.clientWidth) - width;
1325
+ }
1326
+ return {
1327
+ width,
1328
+ height,
1329
+ x,
1330
+ y
1331
+ };
1332
+ }
1333
+
1334
+ // Safety check: ensure the scrollbar space is reasonable in case this
1335
+ // calculation is affected by unusual styles.
1336
+ // Most scrollbars leave 15-18px of space.
1337
+ const SCROLLBAR_MAX = 25;
1338
+ function getViewportRect(element, strategy) {
1339
+ const win = getWindow(element);
1340
+ const html = getDocumentElement(element);
1341
+ const visualViewport = win.visualViewport;
1342
+ let width = html.clientWidth;
1343
+ let height = html.clientHeight;
1344
+ let x = 0;
1345
+ let y = 0;
1346
+ if (visualViewport) {
1347
+ width = visualViewport.width;
1348
+ height = visualViewport.height;
1349
+ const visualViewportBased = isWebKit();
1350
+ if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {
1351
+ x = visualViewport.offsetLeft;
1352
+ y = visualViewport.offsetTop;
1353
+ }
1354
+ }
1355
+ const windowScrollbarX = getWindowScrollBarX(html);
1356
+ // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the
1357
+ // visual width of the <html> but this is not considered in the size
1358
+ // of `html.clientWidth`.
1359
+ if (windowScrollbarX <= 0) {
1360
+ const doc = html.ownerDocument;
1361
+ const body = doc.body;
1362
+ const bodyStyles = getComputedStyle(body);
1363
+ const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
1364
+ const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);
1365
+ if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
1366
+ width -= clippingStableScrollbarWidth;
1367
+ }
1368
+ } else if (windowScrollbarX <= SCROLLBAR_MAX) {
1369
+ // If the <body> scrollbar is on the left, the width needs to be extended
1370
+ // by the scrollbar amount so there isn't extra space on the right.
1371
+ width += windowScrollbarX;
1372
+ }
1373
+ return {
1374
+ width,
1375
+ height,
1376
+ x,
1377
+ y
1378
+ };
1379
+ }
1380
+
1381
+ // Returns the inner client rect, subtracting scrollbars if present.
1382
+ function getInnerBoundingClientRect(element, strategy) {
1383
+ const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');
1384
+ const top = clientRect.top + element.clientTop;
1385
+ const left = clientRect.left + element.clientLeft;
1386
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
1387
+ const width = element.clientWidth * scale.x;
1388
+ const height = element.clientHeight * scale.y;
1389
+ const x = left * scale.x;
1390
+ const y = top * scale.y;
1391
+ return {
1392
+ width,
1393
+ height,
1394
+ x,
1395
+ y
1396
+ };
1397
+ }
1398
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1399
+ let rect;
1400
+ if (clippingAncestor === 'viewport') {
1401
+ rect = getViewportRect(element, strategy);
1402
+ } else if (clippingAncestor === 'document') {
1403
+ rect = getDocumentRect(getDocumentElement(element));
1404
+ } else if (isElement(clippingAncestor)) {
1405
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
1406
+ } else {
1407
+ const visualOffsets = getVisualOffsets(element);
1408
+ rect = {
1409
+ x: clippingAncestor.x - visualOffsets.x,
1410
+ y: clippingAncestor.y - visualOffsets.y,
1411
+ width: clippingAncestor.width,
1412
+ height: clippingAncestor.height
1413
+ };
1414
+ }
1415
+ return rectToClientRect(rect);
1416
+ }
1417
+ function hasFixedPositionAncestor(element, stopNode) {
1418
+ const parentNode = getParentNode(element);
1419
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1420
+ return false;
1421
+ }
1422
+ return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);
1423
+ }
1424
+
1425
+ // A "clipping ancestor" is an `overflow` element with the characteristic of
1426
+ // clipping (or hiding) child elements. This returns all clipping ancestors
1427
+ // of the given element up the tree.
1428
+ function getClippingElementAncestors(element, cache) {
1429
+ const cachedResult = cache.get(element);
1430
+ if (cachedResult) {
1431
+ return cachedResult;
1432
+ }
1433
+ let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');
1434
+ let currentContainingBlockComputedStyle = null;
1435
+ const elementIsFixed = getComputedStyle$1(element).position === 'fixed';
1436
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1437
+
1438
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
1439
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1440
+ const computedStyle = getComputedStyle$1(currentNode);
1441
+ const currentNodeIsContaining = isContainingBlock(currentNode);
1442
+ if (!currentNodeIsContaining && computedStyle.position === 'fixed') {
1443
+ currentContainingBlockComputedStyle = null;
1444
+ }
1445
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && (currentContainingBlockComputedStyle.position === 'absolute' || currentContainingBlockComputedStyle.position === 'fixed') || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1446
+ if (shouldDropCurrentNode) {
1447
+ // Drop non-containing blocks.
1448
+ result = result.filter(ancestor => ancestor !== currentNode);
1449
+ } else {
1450
+ // Record last containing block for next iteration.
1451
+ currentContainingBlockComputedStyle = computedStyle;
1452
+ }
1453
+ currentNode = getParentNode(currentNode);
1454
+ }
1455
+ cache.set(element, result);
1456
+ return result;
1457
+ }
1458
+
1459
+ // Gets the maximum area that the element is visible in due to any number of
1460
+ // clipping ancestors.
1461
+ function getClippingRect(_ref) {
1462
+ let {
1463
+ element,
1464
+ boundary,
1465
+ rootBoundary,
1466
+ strategy
1467
+ } = _ref;
1468
+ const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);
1469
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1470
+ const firstRect = getClientRectFromClippingAncestor(element, clippingAncestors[0], strategy);
1471
+ let top = firstRect.top;
1472
+ let right = firstRect.right;
1473
+ let bottom = firstRect.bottom;
1474
+ let left = firstRect.left;
1475
+ for (let i = 1; i < clippingAncestors.length; i++) {
1476
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestors[i], strategy);
1477
+ top = max(rect.top, top);
1478
+ right = min(rect.right, right);
1479
+ bottom = min(rect.bottom, bottom);
1480
+ left = max(rect.left, left);
1481
+ }
1482
+ return {
1483
+ width: right - left,
1484
+ height: bottom - top,
1485
+ x: left,
1486
+ y: top
1487
+ };
1488
+ }
1489
+
1490
+ function getDimensions(element) {
1491
+ const {
1492
+ width,
1493
+ height
1494
+ } = getCssDimensions(element);
1495
+ return {
1496
+ width,
1497
+ height
1498
+ };
1499
+ }
1500
+
1501
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1502
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1503
+ const documentElement = getDocumentElement(offsetParent);
1504
+ const isFixed = strategy === 'fixed';
1505
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1506
+ let scroll = {
1507
+ scrollLeft: 0,
1508
+ scrollTop: 0
1509
+ };
1510
+ const offsets = createCoords(0);
1511
+
1512
+ // If the <body> scrollbar appears on the left (e.g. RTL systems). Use
1513
+ // Firefox with layout.scrollbar.side = 3 in about:config to test this.
1514
+ function setLeftRTLScrollbarOffset() {
1515
+ offsets.x = getWindowScrollBarX(documentElement);
1516
+ }
1517
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1518
+ if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {
1519
+ scroll = getNodeScroll(offsetParent);
1520
+ }
1521
+ if (isOffsetParentAnElement) {
1522
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1523
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1524
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1525
+ } else if (documentElement) {
1526
+ setLeftRTLScrollbarOffset();
1527
+ }
1528
+ }
1529
+ if (isFixed && !isOffsetParentAnElement && documentElement) {
1530
+ setLeftRTLScrollbarOffset();
1531
+ }
1532
+ const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);
1533
+ const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;
1534
+ const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;
1535
+ return {
1536
+ x,
1537
+ y,
1538
+ width: rect.width,
1539
+ height: rect.height
1540
+ };
1541
+ }
1542
+
1543
+ function isStaticPositioned(element) {
1544
+ return getComputedStyle$1(element).position === 'static';
1545
+ }
1546
+
1547
+ function getTrueOffsetParent(element, polyfill) {
1548
+ if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
1549
+ return null;
1550
+ }
1551
+ if (polyfill) {
1552
+ return polyfill(element);
1553
+ }
1554
+ let rawOffsetParent = element.offsetParent;
1555
+
1556
+ // Firefox returns the <html> element as the offsetParent if it's non-static,
1557
+ // while Chrome and Safari return the <body> element. The <body> element must
1558
+ // be used to perform the correct calculations even if the <html> element is
1559
+ // non-static.
1560
+ if (getDocumentElement(element) === rawOffsetParent) {
1561
+ rawOffsetParent = rawOffsetParent.ownerDocument.body;
1562
+ }
1563
+ return rawOffsetParent;
1564
+ }
1565
+
1566
+ // Gets the closest ancestor positioned element. Handles some edge cases,
1567
+ // such as table ancestors and cross browser bugs.
1568
+ function getOffsetParent(element, polyfill) {
1569
+ const win = getWindow(element);
1570
+ if (isTopLayer(element)) {
1571
+ return win;
1572
+ }
1573
+ if (!isHTMLElement(element)) {
1574
+ let svgOffsetParent = getParentNode(element);
1575
+ while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {
1576
+ if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {
1577
+ return svgOffsetParent;
1578
+ }
1579
+ svgOffsetParent = getParentNode(svgOffsetParent);
1580
+ }
1581
+ return win;
1582
+ }
1583
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1584
+ while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {
1585
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1586
+ }
1587
+ if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {
1588
+ return win;
1589
+ }
1590
+ return offsetParent || getContainingBlock(element) || win;
1591
+ }
1592
+
1593
+ const getElementRects = async function (data) {
1594
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1595
+ const getDimensionsFn = this.getDimensions;
1596
+ const floatingDimensions = await getDimensionsFn(data.floating);
1597
+ return {
1598
+ reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
1599
+ floating: {
1600
+ x: 0,
1601
+ y: 0,
1602
+ width: floatingDimensions.width,
1603
+ height: floatingDimensions.height
1604
+ }
1605
+ };
1606
+ };
1607
+
1608
+ function isRTL(element) {
1609
+ return getComputedStyle$1(element).direction === 'rtl';
1610
+ }
1611
+
1612
+ const platform = {
1613
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1614
+ getDocumentElement,
1615
+ getClippingRect,
1616
+ getOffsetParent,
1617
+ getElementRects,
1618
+ getClientRects,
1619
+ getDimensions,
1620
+ getScale,
1621
+ isElement,
1622
+ isRTL
1623
+ };
1624
+
1625
+ function rectsAreEqual(a, b) {
1626
+ return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;
1627
+ }
1628
+
1629
+ // https://samthor.au/2021/observing-dom/
1630
+ function observeMove(element, onMove) {
1631
+ let io = null;
1632
+ let timeoutId;
1633
+ const root = getDocumentElement(element);
1634
+ function cleanup() {
1635
+ var _io;
1636
+ clearTimeout(timeoutId);
1637
+ (_io = io) == null || _io.disconnect();
1638
+ io = null;
1639
+ }
1640
+ function refresh(skip, threshold) {
1641
+ if (skip === void 0) {
1642
+ skip = false;
1643
+ }
1644
+ if (threshold === void 0) {
1645
+ threshold = 1;
1646
+ }
1647
+ cleanup();
1648
+ const elementRectForRootMargin = element.getBoundingClientRect();
1649
+ const {
1650
+ left,
1651
+ top,
1652
+ width,
1653
+ height
1654
+ } = elementRectForRootMargin;
1655
+ if (!skip) {
1656
+ onMove();
1657
+ }
1658
+ if (!width || !height) {
1659
+ return;
1660
+ }
1661
+ const insetTop = floor(top);
1662
+ const insetRight = floor(root.clientWidth - (left + width));
1663
+ const insetBottom = floor(root.clientHeight - (top + height));
1664
+ const insetLeft = floor(left);
1665
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
1666
+ const options = {
1667
+ rootMargin,
1668
+ threshold: max(0, min(1, threshold)) || 1
1669
+ };
1670
+ let isFirstUpdate = true;
1671
+ function handleObserve(entries) {
1672
+ const ratio = entries[0].intersectionRatio;
1673
+ if (ratio !== threshold) {
1674
+ if (!isFirstUpdate) {
1675
+ return refresh();
1676
+ }
1677
+ if (!ratio) {
1678
+ // If the reference is clipped, the ratio is 0. Throttle the refresh
1679
+ // to prevent an infinite loop of updates.
1680
+ timeoutId = setTimeout(() => {
1681
+ refresh(false, 1e-7);
1682
+ }, 1000);
1683
+ } else {
1684
+ refresh(false, ratio);
1685
+ }
1686
+ }
1687
+ if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {
1688
+ // It's possible that even though the ratio is reported as 1, the
1689
+ // element is not actually fully within the IntersectionObserver's root
1690
+ // area anymore. This can happen under performance constraints. This may
1691
+ // be a bug in the browser's IntersectionObserver implementation. To
1692
+ // work around this, we compare the element's bounding rect now with
1693
+ // what it was at the time we created the IntersectionObserver. If they
1694
+ // are not equal then the element moved, so we refresh.
1695
+ refresh();
1696
+ }
1697
+ isFirstUpdate = false;
1698
+ }
1699
+
1700
+ // Older browsers don't support a `document` as the root and will throw an
1701
+ // error.
1702
+ try {
1703
+ io = new IntersectionObserver(handleObserve, {
1704
+ ...options,
1705
+ // Handle <iframe>s
1706
+ root: root.ownerDocument
1707
+ });
1708
+ } catch (_e) {
1709
+ io = new IntersectionObserver(handleObserve, options);
1710
+ }
1711
+ io.observe(element);
1712
+ }
1713
+ refresh(true);
1714
+ return cleanup;
1715
+ }
1716
+
1717
+ /**
1718
+ * Automatically updates the position of the floating element when necessary.
1719
+ * Should only be called when the floating element is mounted on the DOM or
1720
+ * visible on the screen.
1721
+ * @returns cleanup function that should be invoked when the floating element is
1722
+ * removed from the DOM or hidden from the screen.
1723
+ * @see https://floating-ui.com/docs/autoUpdate
1724
+ */
1725
+ function autoUpdate(reference, floating, update, options) {
1726
+ if (options === void 0) {
1727
+ options = {};
1728
+ }
1729
+ const {
1730
+ ancestorScroll = true,
1731
+ ancestorResize = true,
1732
+ elementResize = typeof ResizeObserver === 'function',
1733
+ layoutShift = typeof IntersectionObserver === 'function',
1734
+ animationFrame = false
1735
+ } = options;
1736
+ const referenceEl = unwrapElement(reference);
1737
+ const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...(floating ? getOverflowAncestors(floating) : [])] : [];
1738
+ ancestors.forEach(ancestor => {
1739
+ ancestorScroll && ancestor.addEventListener('scroll', update, {
1740
+ passive: true
1741
+ });
1742
+ ancestorResize && ancestor.addEventListener('resize', update);
1743
+ });
1744
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
1745
+ let reobserveFrame = -1;
1746
+ let resizeObserver = null;
1747
+ if (elementResize) {
1748
+ resizeObserver = new ResizeObserver(_ref => {
1749
+ let [firstEntry] = _ref;
1750
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver && floating) {
1751
+ // Prevent update loops when using the `size` middleware.
1752
+ // https://github.com/floating-ui/floating-ui/issues/1740
1753
+ resizeObserver.unobserve(floating);
1754
+ cancelAnimationFrame(reobserveFrame);
1755
+ reobserveFrame = requestAnimationFrame(() => {
1756
+ var _resizeObserver;
1757
+ (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
1758
+ });
1759
+ }
1760
+ update();
1761
+ });
1762
+ if (referenceEl && !animationFrame) {
1763
+ resizeObserver.observe(referenceEl);
1764
+ }
1765
+ if (floating) {
1766
+ resizeObserver.observe(floating);
1767
+ }
1768
+ }
1769
+ let frameId;
1770
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1771
+ if (animationFrame) {
1772
+ frameLoop();
1773
+ }
1774
+ function frameLoop() {
1775
+ const nextRefRect = getBoundingClientRect(reference);
1776
+ if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {
1777
+ update();
1778
+ }
1779
+ prevRefRect = nextRefRect;
1780
+ frameId = requestAnimationFrame(frameLoop);
1781
+ }
1782
+ update();
1783
+ return () => {
1784
+ var _resizeObserver2;
1785
+ ancestors.forEach(ancestor => {
1786
+ ancestorScroll && ancestor.removeEventListener('scroll', update);
1787
+ ancestorResize && ancestor.removeEventListener('resize', update);
1788
+ });
1789
+ cleanupIo == null || cleanupIo();
1790
+ (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
1791
+ resizeObserver = null;
1792
+ if (animationFrame) {
1793
+ cancelAnimationFrame(frameId);
1794
+ }
1795
+ };
1796
+ }
1797
+
1798
+ /**
1799
+ * Modifies the placement by translating the floating element along the
1800
+ * specified axes.
1801
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
1802
+ * object may be passed.
1803
+ * @see https://floating-ui.com/docs/offset
1804
+ */
1805
+ const offset$1 = offset$2;
1806
+
1807
+ /**
1808
+ * Optimizes the visibility of the floating element by shifting it in order to
1809
+ * keep it in view when it will overflow the clipping boundary.
1810
+ * @see https://floating-ui.com/docs/shift
1811
+ */
1812
+ const shift$1 = shift$2;
1813
+
1814
+ /**
1815
+ * Optimizes the visibility of the floating element by flipping the `placement`
1816
+ * in order to keep it in view when the preferred placement(s) will overflow the
1817
+ * clipping boundary. Alternative to `autoPlacement`.
1818
+ * @see https://floating-ui.com/docs/flip
1819
+ */
1820
+ const flip$1 = flip$2;
1821
+
1822
+ /**
1823
+ * Provides data that allows you to change the size of the floating element —
1824
+ * for instance, prevent it from overflowing the clipping boundary or match the
1825
+ * width of the reference element.
1826
+ * @see https://floating-ui.com/docs/size
1827
+ */
1828
+ const size$1 = size$2;
1829
+
1830
+ /**
1831
+ * Provides data to hide the floating element in applicable situations, such as
1832
+ * when it is not in the same clipping context as the reference element.
1833
+ * @see https://floating-ui.com/docs/hide
1834
+ */
1835
+ const hide$1 = hide$2;
1836
+
1837
+ /**
1838
+ * Provides data to position an inner element of the floating element so that it
1839
+ * appears centered to the reference element.
1840
+ * @see https://floating-ui.com/docs/arrow
1841
+ */
1842
+ const arrow$2 = arrow$3;
1843
+
1844
+ /**
1845
+ * Built-in `limiter` that will stop `shift()` at a certain point.
1846
+ */
1847
+ const limitShift$1 = limitShift$2;
1848
+
1849
+ /**
1850
+ * Computes the `x` and `y` coordinates that will place the floating element
1851
+ * next to a given reference element.
1852
+ */
1853
+ const computePosition = (reference, floating, options) => {
1854
+ // This caches the expensive `getClippingElementAncestors` function so that
1855
+ // multiple lifecycle resets re-use the same result. It only lives for a
1856
+ // single call. If other functions become expensive, we can add them as well.
1857
+ const cache = new Map();
1858
+ const mergedOptions = {
1859
+ platform,
1860
+ ...options
1861
+ };
1862
+ const platformWithCache = {
1863
+ ...mergedOptions.platform,
1864
+ _c: cache
1865
+ };
1866
+ return computePosition$1(reference, floating, {
1867
+ ...mergedOptions,
1868
+ platform: platformWithCache
1869
+ });
1870
+ };
1871
+
1872
+ var isClient = typeof document !== 'undefined';
1873
+
1874
+ var noop = function noop() {};
1875
+ var index = isClient ? useLayoutEffect : noop;
1876
+
1877
+ // Fork of `fast-deep-equal` that only does the comparisons we need and compares
1878
+ // functions
1879
+ function deepEqual(a, b) {
1880
+ if (a === b) {
1881
+ return true;
1882
+ }
1883
+ if (typeof a !== typeof b) {
1884
+ return false;
1885
+ }
1886
+ if (typeof a === 'function' && a.toString() === b.toString()) {
1887
+ return true;
1888
+ }
1889
+ let length;
1890
+ let i;
1891
+ let keys;
1892
+ if (a && b && typeof a === 'object') {
1893
+ if (Array.isArray(a)) {
1894
+ length = a.length;
1895
+ if (length !== b.length) return false;
1896
+ for (i = length; i-- !== 0;) {
1897
+ if (!deepEqual(a[i], b[i])) {
1898
+ return false;
1899
+ }
1900
+ }
1901
+ return true;
1902
+ }
1903
+ keys = Object.keys(a);
1904
+ length = keys.length;
1905
+ if (length !== Object.keys(b).length) {
1906
+ return false;
1907
+ }
1908
+ for (i = length; i-- !== 0;) {
1909
+ if (!{}.hasOwnProperty.call(b, keys[i])) {
1910
+ return false;
1911
+ }
1912
+ }
1913
+ for (i = length; i-- !== 0;) {
1914
+ const key = keys[i];
1915
+ if (key === '_owner' && a.$$typeof) {
1916
+ continue;
1917
+ }
1918
+ if (!deepEqual(a[key], b[key])) {
1919
+ return false;
1920
+ }
1921
+ }
1922
+ return true;
1923
+ }
1924
+ return a !== a && b !== b;
1925
+ }
1926
+
1927
+ function getDPR(element) {
1928
+ if (typeof window === 'undefined') {
1929
+ return 1;
1930
+ }
1931
+ const win = element.ownerDocument.defaultView || window;
1932
+ return win.devicePixelRatio || 1;
1933
+ }
1934
+
1935
+ function roundByDPR(element, value) {
1936
+ const dpr = getDPR(element);
1937
+ return Math.round(value * dpr) / dpr;
1938
+ }
1939
+
1940
+ function useLatestRef(value) {
1941
+ const ref = React.useRef(value);
1942
+ index(() => {
1943
+ ref.current = value;
1944
+ });
1945
+ return ref;
1946
+ }
1947
+
1948
+ /**
1949
+ * Provides data to position a floating element.
1950
+ * @see https://floating-ui.com/docs/useFloating
1951
+ */
1952
+ function useFloating(options) {
1953
+ if (options === void 0) {
1954
+ options = {};
1955
+ }
1956
+ const {
1957
+ placement = 'bottom',
1958
+ strategy = 'absolute',
1959
+ middleware = [],
1960
+ platform,
1961
+ elements: {
1962
+ reference: externalReference,
1963
+ floating: externalFloating
1964
+ } = {},
1965
+ transform = true,
1966
+ whileElementsMounted,
1967
+ open
1968
+ } = options;
1969
+ const [data, setData] = React.useState({
1970
+ x: 0,
1971
+ y: 0,
1972
+ strategy,
1973
+ placement,
1974
+ middlewareData: {},
1975
+ isPositioned: false
1976
+ });
1977
+ const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);
1978
+ if (!deepEqual(latestMiddleware, middleware)) {
1979
+ setLatestMiddleware(middleware);
1980
+ }
1981
+ const [_reference, _setReference] = React.useState(null);
1982
+ const [_floating, _setFloating] = React.useState(null);
1983
+ const setReference = React.useCallback(node => {
1984
+ if (node !== referenceRef.current) {
1985
+ referenceRef.current = node;
1986
+ _setReference(node);
1987
+ }
1988
+ }, []);
1989
+ const setFloating = React.useCallback(node => {
1990
+ if (node !== floatingRef.current) {
1991
+ floatingRef.current = node;
1992
+ _setFloating(node);
1993
+ }
1994
+ }, []);
1995
+ const referenceEl = externalReference || _reference;
1996
+ const floatingEl = externalFloating || _floating;
1997
+ const referenceRef = React.useRef(null);
1998
+ const floatingRef = React.useRef(null);
1999
+ const dataRef = React.useRef(data);
2000
+ const hasWhileElementsMounted = whileElementsMounted != null;
2001
+ const whileElementsMountedRef = useLatestRef(whileElementsMounted);
2002
+ const platformRef = useLatestRef(platform);
2003
+ const openRef = useLatestRef(open);
2004
+ const update = React.useCallback(() => {
2005
+ if (!referenceRef.current || !floatingRef.current) {
2006
+ return;
2007
+ }
2008
+ const config = {
2009
+ placement,
2010
+ strategy,
2011
+ middleware: latestMiddleware
2012
+ };
2013
+ if (platformRef.current) {
2014
+ config.platform = platformRef.current;
2015
+ }
2016
+ computePosition(referenceRef.current, floatingRef.current, config).then(data => {
2017
+ const fullData = {
2018
+ ...data,
2019
+ // The floating element's position may be recomputed while it's closed
2020
+ // but still mounted (such as when transitioning out). To ensure
2021
+ // `isPositioned` will be `false` initially on the next open, avoid
2022
+ // setting it to `true` when `open === false` (must be specified).
2023
+ isPositioned: openRef.current !== false
2024
+ };
2025
+ if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
2026
+ dataRef.current = fullData;
2027
+ ReactDOM.flushSync(() => {
2028
+ setData(fullData);
2029
+ });
2030
+ }
2031
+ });
2032
+ }, [latestMiddleware, placement, strategy, platformRef, openRef]);
2033
+ index(() => {
2034
+ if (open === false && dataRef.current.isPositioned) {
2035
+ dataRef.current.isPositioned = false;
2036
+ setData(data => ({
2037
+ ...data,
2038
+ isPositioned: false
2039
+ }));
2040
+ }
2041
+ }, [open]);
2042
+ const isMountedRef = React.useRef(false);
2043
+ index(() => {
2044
+ isMountedRef.current = true;
2045
+ return () => {
2046
+ isMountedRef.current = false;
2047
+ };
2048
+ }, []);
2049
+ index(() => {
2050
+ if (referenceEl) referenceRef.current = referenceEl;
2051
+ if (floatingEl) floatingRef.current = floatingEl;
2052
+ if (referenceEl && floatingEl) {
2053
+ if (whileElementsMountedRef.current) {
2054
+ return whileElementsMountedRef.current(referenceEl, floatingEl, update);
2055
+ }
2056
+ update();
2057
+ }
2058
+ }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
2059
+ const refs = React.useMemo(() => ({
2060
+ reference: referenceRef,
2061
+ floating: floatingRef,
2062
+ setReference,
2063
+ setFloating
2064
+ }), [setReference, setFloating]);
2065
+ const elements = React.useMemo(() => ({
2066
+ reference: referenceEl,
2067
+ floating: floatingEl
2068
+ }), [referenceEl, floatingEl]);
2069
+ const floatingStyles = React.useMemo(() => {
2070
+ const initialStyles = {
2071
+ position: strategy,
2072
+ left: 0,
2073
+ top: 0
2074
+ };
2075
+ if (!elements.floating) {
2076
+ return initialStyles;
2077
+ }
2078
+ const x = roundByDPR(elements.floating, data.x);
2079
+ const y = roundByDPR(elements.floating, data.y);
2080
+ if (transform) {
2081
+ return {
2082
+ ...initialStyles,
2083
+ transform: "translate(" + x + "px, " + y + "px)",
2084
+ ...(getDPR(elements.floating) >= 1.5 && {
2085
+ willChange: 'transform'
2086
+ })
2087
+ };
2088
+ }
2089
+ return {
2090
+ position: strategy,
2091
+ left: x,
2092
+ top: y
2093
+ };
2094
+ }, [strategy, transform, elements.floating, data.x, data.y]);
2095
+ return React.useMemo(() => ({
2096
+ ...data,
2097
+ update,
2098
+ refs,
2099
+ elements,
2100
+ floatingStyles
2101
+ }), [data, update, refs, elements, floatingStyles]);
2102
+ }
2103
+
2104
+ /**
2105
+ * Provides data to position an inner element of the floating element so that it
2106
+ * appears centered to the reference element.
2107
+ * This wraps the core `arrow` middleware to allow React refs as the element.
2108
+ * @see https://floating-ui.com/docs/arrow
2109
+ */
2110
+ const arrow$1 = options => {
2111
+ function isRef(value) {
2112
+ return {}.hasOwnProperty.call(value, 'current');
2113
+ }
2114
+ return {
2115
+ name: 'arrow',
2116
+ options,
2117
+ fn(state) {
2118
+ const {
2119
+ element,
2120
+ padding
2121
+ } = typeof options === 'function' ? options(state) : options;
2122
+ if (element && isRef(element)) {
2123
+ if (element.current != null) {
2124
+ return arrow$2({
2125
+ element: element.current,
2126
+ padding
2127
+ }).fn(state);
2128
+ }
2129
+ return {};
2130
+ }
2131
+ if (element) {
2132
+ return arrow$2({
2133
+ element,
2134
+ padding
2135
+ }).fn(state);
2136
+ }
2137
+ return {};
2138
+ }
2139
+ };
2140
+ };
2141
+
2142
+ /**
2143
+ * Modifies the placement by translating the floating element along the
2144
+ * specified axes.
2145
+ * A number (shorthand for `mainAxis` or distance), or an axes configuration
2146
+ * object may be passed.
2147
+ * @see https://floating-ui.com/docs/offset
2148
+ */
2149
+ const offset = (options, deps) => {
2150
+ const result = offset$1(options);
2151
+ return {
2152
+ name: result.name,
2153
+ fn: result.fn,
2154
+ options: [options, deps]
2155
+ };
2156
+ };
2157
+
2158
+ /**
2159
+ * Optimizes the visibility of the floating element by shifting it in order to
2160
+ * keep it in view when it will overflow the clipping boundary.
2161
+ * @see https://floating-ui.com/docs/shift
2162
+ */
2163
+ const shift = (options, deps) => {
2164
+ const result = shift$1(options);
2165
+ return {
2166
+ name: result.name,
2167
+ fn: result.fn,
2168
+ options: [options, deps]
2169
+ };
2170
+ };
2171
+
2172
+ /**
2173
+ * Built-in `limiter` that will stop `shift()` at a certain point.
2174
+ */
2175
+ const limitShift = (options, deps) => {
2176
+ const result = limitShift$1(options);
2177
+ return {
2178
+ fn: result.fn,
2179
+ options: [options, deps]
2180
+ };
2181
+ };
2182
+
2183
+ /**
2184
+ * Optimizes the visibility of the floating element by flipping the `placement`
2185
+ * in order to keep it in view when the preferred placement(s) will overflow the
2186
+ * clipping boundary. Alternative to `autoPlacement`.
2187
+ * @see https://floating-ui.com/docs/flip
2188
+ */
2189
+ const flip = (options, deps) => {
2190
+ const result = flip$1(options);
2191
+ return {
2192
+ name: result.name,
2193
+ fn: result.fn,
2194
+ options: [options, deps]
2195
+ };
2196
+ };
2197
+
2198
+ /**
2199
+ * Provides data that allows you to change the size of the floating element —
2200
+ * for instance, prevent it from overflowing the clipping boundary or match the
2201
+ * width of the reference element.
2202
+ * @see https://floating-ui.com/docs/size
2203
+ */
2204
+ const size = (options, deps) => {
2205
+ const result = size$1(options);
2206
+ return {
2207
+ name: result.name,
2208
+ fn: result.fn,
2209
+ options: [options, deps]
2210
+ };
2211
+ };
2212
+
2213
+ /**
2214
+ * Provides data to hide the floating element in applicable situations, such as
2215
+ * when it is not in the same clipping context as the reference element.
2216
+ * @see https://floating-ui.com/docs/hide
2217
+ */
2218
+ const hide = (options, deps) => {
2219
+ const result = hide$1(options);
2220
+ return {
2221
+ name: result.name,
2222
+ fn: result.fn,
2223
+ options: [options, deps]
2224
+ };
2225
+ };
2226
+
2227
+ /**
2228
+ * Provides data to position an inner element of the floating element so that it
2229
+ * appears centered to the reference element.
2230
+ * This wraps the core `arrow` middleware to allow React refs as the element.
2231
+ * @see https://floating-ui.com/docs/arrow
2232
+ */
2233
+ const arrow = (options, deps) => {
2234
+ const result = arrow$1(options);
2235
+ return {
2236
+ name: result.name,
2237
+ fn: result.fn,
2238
+ options: [options, deps]
2239
+ };
2240
+ };
2241
+
2242
+ export { clamp as A, getSide as B, getSideAxis as C, size as a, arrow as b, autoUpdate as c, isShadowRoot as d, floor as e, flip as f, getComputedStyle$1 as g, hide as h, isHTMLElement as i, getWindow as j, isOverflowElement as k, limitShift as l, getNodeName as m, isNode as n, offset as o, isWebKit as p, isElement as q, isLastTraversableNode as r, shift as s, getParentNode as t, useFloating as u, evaluate as v, getPaddingObject as w, getAlignmentAxis as x, getAlignment as y, getAxisLength as z };
2243
+ //# sourceMappingURL=floating-ui.react-dom-CcGbtPEK.js.map