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