lizaui 3.0.11

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 (348) hide show
  1. package/README.md +54 -0
  2. package/dist/button/index.cjs.js +2 -0
  3. package/dist/button/index.cjs.js.map +1 -0
  4. package/dist/button/index.es.js +5 -0
  5. package/dist/button/index.es.js.map +1 -0
  6. package/dist/button.d.ts +2 -0
  7. package/dist/calendar/index.cjs.js +425 -0
  8. package/dist/calendar/index.cjs.js.map +1 -0
  9. package/dist/calendar/index.es.js +6105 -0
  10. package/dist/calendar/index.es.js.map +1 -0
  11. package/dist/calendar.d.ts +2 -0
  12. package/dist/checkbox/index.cjs.js +2 -0
  13. package/dist/checkbox/index.cjs.js.map +1 -0
  14. package/dist/checkbox/index.es.js +6 -0
  15. package/dist/checkbox/index.es.js.map +1 -0
  16. package/dist/checkbox.d.ts +2 -0
  17. package/dist/chip/index.cjs.js +2 -0
  18. package/dist/chip/index.cjs.js.map +1 -0
  19. package/dist/chip/index.es.js +533 -0
  20. package/dist/chip/index.es.js.map +1 -0
  21. package/dist/chip.d.ts +2 -0
  22. package/dist/chunks/bundle-mjs-JiDEie86.js +2728 -0
  23. package/dist/chunks/bundle-mjs-JiDEie86.js.map +1 -0
  24. package/dist/chunks/bundle-mjs-W341Qwux.js +2 -0
  25. package/dist/chunks/bundle-mjs-W341Qwux.js.map +1 -0
  26. package/dist/chunks/button-CPpIQ7Z7.js +3971 -0
  27. package/dist/chunks/button-CPpIQ7Z7.js.map +1 -0
  28. package/dist/chunks/button-Dr5w6yIW.js +10 -0
  29. package/dist/chunks/button-Dr5w6yIW.js.map +1 -0
  30. package/dist/chunks/checkbox-C71XoTt2.js +2 -0
  31. package/dist/chunks/checkbox-C71XoTt2.js.map +1 -0
  32. package/dist/chunks/checkbox-DN309yjg.js +312 -0
  33. package/dist/chunks/checkbox-DN309yjg.js.map +1 -0
  34. package/dist/chunks/classes-7MXTIFwM.js +52 -0
  35. package/dist/chunks/classes-7MXTIFwM.js.map +1 -0
  36. package/dist/chunks/classes-P14wj2Ze.js +2 -0
  37. package/dist/chunks/classes-P14wj2Ze.js.map +1 -0
  38. package/dist/chunks/clsx-C11secjj.js +2 -0
  39. package/dist/chunks/clsx-C11secjj.js.map +1 -0
  40. package/dist/chunks/clsx-OuTLNxxd.js +17 -0
  41. package/dist/chunks/clsx-OuTLNxxd.js.map +1 -0
  42. package/dist/chunks/floating-ui.dom-9ZI0iiqa.js +2 -0
  43. package/dist/chunks/floating-ui.dom-9ZI0iiqa.js.map +1 -0
  44. package/dist/chunks/floating-ui.dom-PqoU7a4n.js +1134 -0
  45. package/dist/chunks/floating-ui.dom-PqoU7a4n.js.map +1 -0
  46. package/dist/chunks/floating-ui.react-dom-BQpCDpNU.js +2 -0
  47. package/dist/chunks/floating-ui.react-dom-BQpCDpNU.js.map +1 -0
  48. package/dist/chunks/floating-ui.react-dom-CihJ_dlB.js +204 -0
  49. package/dist/chunks/floating-ui.react-dom-CihJ_dlB.js.map +1 -0
  50. package/dist/chunks/iconBase-C4boY5mo.js +2 -0
  51. package/dist/chunks/iconBase-C4boY5mo.js.map +1 -0
  52. package/dist/chunks/iconBase-DSKTHwal.js +113 -0
  53. package/dist/chunks/iconBase-DSKTHwal.js.map +1 -0
  54. package/dist/chunks/index-CBDkd84T.js +2 -0
  55. package/dist/chunks/index-CBDkd84T.js.map +1 -0
  56. package/dist/chunks/index-C_b6-TON.js +78 -0
  57. package/dist/chunks/index-C_b6-TON.js.map +1 -0
  58. package/dist/chunks/jsx-runtime-BYq8_R6m.js +247 -0
  59. package/dist/chunks/jsx-runtime-BYq8_R6m.js.map +1 -0
  60. package/dist/chunks/jsx-runtime-DFswc9zO.js +2 -0
  61. package/dist/chunks/jsx-runtime-DFswc9zO.js.map +1 -0
  62. package/dist/chunks/pattern-CdQavADx.js +5 -0
  63. package/dist/chunks/pattern-CdQavADx.js.map +1 -0
  64. package/dist/chunks/pattern-F8jUniwt.js +2 -0
  65. package/dist/chunks/pattern-F8jUniwt.js.map +1 -0
  66. package/dist/chunks/refs-DLih6QCP.js +2 -0
  67. package/dist/chunks/refs-DLih6QCP.js.map +1 -0
  68. package/dist/chunks/refs-DcCOPvdv.js +35 -0
  69. package/dist/chunks/refs-DcCOPvdv.js.map +1 -0
  70. package/dist/chunks/select-BoiIj-gw.js +7 -0
  71. package/dist/chunks/select-BoiIj-gw.js.map +1 -0
  72. package/dist/chunks/select-Cy78fn6H.js +4267 -0
  73. package/dist/chunks/select-Cy78fn6H.js.map +1 -0
  74. package/dist/chunks/tooltip-BQVohLC7.js +2 -0
  75. package/dist/chunks/tooltip-BQVohLC7.js.map +1 -0
  76. package/dist/chunks/tooltip-CIcTjpF8.js +959 -0
  77. package/dist/chunks/tooltip-CIcTjpF8.js.map +1 -0
  78. package/dist/chunks/tv-ButAo3dF.js +2669 -0
  79. package/dist/chunks/tv-ButAo3dF.js.map +1 -0
  80. package/dist/chunks/tv-C5lw0tnu.js +2 -0
  81. package/dist/chunks/tv-C5lw0tnu.js.map +1 -0
  82. package/dist/chunks/utils-Blo0iNdk.js +15 -0
  83. package/dist/chunks/utils-Blo0iNdk.js.map +1 -0
  84. package/dist/chunks/utils-DuSyQWep.js +2 -0
  85. package/dist/chunks/utils-DuSyQWep.js.map +1 -0
  86. package/dist/chunks/v4-CRLUkzQ6.js +31 -0
  87. package/dist/chunks/v4-CRLUkzQ6.js.map +1 -0
  88. package/dist/chunks/v4-CqU37_Sa.js +2 -0
  89. package/dist/chunks/v4-CqU37_Sa.js.map +1 -0
  90. package/dist/chunks/variants-BUTPDD09.js +2 -0
  91. package/dist/chunks/variants-BUTPDD09.js.map +1 -0
  92. package/dist/chunks/variants-DhZQjbsQ.js +62 -0
  93. package/dist/chunks/variants-DhZQjbsQ.js.map +1 -0
  94. package/dist/components/button/button.d.ts +6 -0
  95. package/dist/components/button/button.d.ts.map +1 -0
  96. package/dist/components/button/index.d.ts +4 -0
  97. package/dist/components/button/index.d.ts.map +1 -0
  98. package/dist/components/button/spinner.d.ts +3 -0
  99. package/dist/components/button/spinner.d.ts.map +1 -0
  100. package/dist/components/button/use-button.d.ts +328 -0
  101. package/dist/components/button/use-button.d.ts.map +1 -0
  102. package/dist/components/calendar/date-picker/date-picker.d.ts +3 -0
  103. package/dist/components/calendar/date-picker/date-picker.d.ts.map +1 -0
  104. package/dist/components/calendar/date-picker/date-picker.style.d.ts +9 -0
  105. package/dist/components/calendar/date-picker/date-picker.style.d.ts.map +1 -0
  106. package/dist/components/calendar/date-picker/interface/date-picker.interface.d.ts +38 -0
  107. package/dist/components/calendar/date-picker/interface/date-picker.interface.d.ts.map +1 -0
  108. package/dist/components/calendar/icon/icon-calendar.d.ts +11 -0
  109. package/dist/components/calendar/icon/icon-calendar.d.ts.map +1 -0
  110. package/dist/components/calendar/index.d.ts +2 -0
  111. package/dist/components/calendar/index.d.ts.map +1 -0
  112. package/dist/components/calendar/interface/calendar-shared.interface.d.ts +4 -0
  113. package/dist/components/calendar/interface/calendar-shared.interface.d.ts.map +1 -0
  114. package/dist/components/checkbox/checkbox-icon.d.ts +9 -0
  115. package/dist/components/checkbox/checkbox-icon.d.ts.map +1 -0
  116. package/dist/components/checkbox/checkbox.d.ts +7 -0
  117. package/dist/components/checkbox/checkbox.d.ts.map +1 -0
  118. package/dist/components/checkbox/index.d.ts +5 -0
  119. package/dist/components/checkbox/index.d.ts.map +1 -0
  120. package/dist/components/checkbox/use-checkbox.d.ts +57 -0
  121. package/dist/components/checkbox/use-checkbox.d.ts.map +1 -0
  122. package/dist/components/chip/chip.d.ts +6 -0
  123. package/dist/components/chip/chip.d.ts.map +1 -0
  124. package/dist/components/chip/index.d.ts +4 -0
  125. package/dist/components/chip/index.d.ts.map +1 -0
  126. package/dist/components/chip/use-chip.d.ts +441 -0
  127. package/dist/components/chip/use-chip.d.ts.map +1 -0
  128. package/dist/components/divider/divider.d.ts +6 -0
  129. package/dist/components/divider/divider.d.ts.map +1 -0
  130. package/dist/components/divider/index.d.ts +4 -0
  131. package/dist/components/divider/index.d.ts.map +1 -0
  132. package/dist/components/divider/use-divider.d.ts +19 -0
  133. package/dist/components/divider/use-divider.d.ts.map +1 -0
  134. package/dist/components/divider/use-separator.d.ts +22 -0
  135. package/dist/components/divider/use-separator.d.ts.map +1 -0
  136. package/dist/components/icons/close-filled.d.ts +3 -0
  137. package/dist/components/icons/close-filled.d.ts.map +1 -0
  138. package/dist/components/index.d.ts +5 -0
  139. package/dist/components/index.d.ts.map +1 -0
  140. package/dist/components/pagination/function/index.d.ts +7 -0
  141. package/dist/components/pagination/function/index.d.ts.map +1 -0
  142. package/dist/components/pagination/hook/use-pagination.d.ts +3 -0
  143. package/dist/components/pagination/hook/use-pagination.d.ts.map +1 -0
  144. package/dist/components/pagination/index.d.ts +4 -0
  145. package/dist/components/pagination/index.d.ts.map +1 -0
  146. package/dist/components/pagination/interface/pagination-share.interface.d.ts +10 -0
  147. package/dist/components/pagination/interface/pagination-share.interface.d.ts.map +1 -0
  148. package/dist/components/pagination/interface/pagination.interface.d.ts +26 -0
  149. package/dist/components/pagination/interface/pagination.interface.d.ts.map +1 -0
  150. package/dist/components/pagination/pagination-item.d.ts +3 -0
  151. package/dist/components/pagination/pagination-item.d.ts.map +1 -0
  152. package/dist/components/pagination/pagination.d.ts +3 -0
  153. package/dist/components/pagination/pagination.d.ts.map +1 -0
  154. package/dist/components/ripple/ripple.d.ts +20 -0
  155. package/dist/components/ripple/ripple.d.ts.map +1 -0
  156. package/dist/components/ripple/use-ripple.d.ts +10 -0
  157. package/dist/components/ripple/use-ripple.d.ts.map +1 -0
  158. package/dist/components/select/autocomplete/autocomplete.d.ts +3 -0
  159. package/dist/components/select/autocomplete/autocomplete.d.ts.map +1 -0
  160. package/dist/components/select/index.d.ts +3 -0
  161. package/dist/components/select/index.d.ts.map +1 -0
  162. package/dist/components/select/select.d.ts +3 -0
  163. package/dist/components/select/select.d.ts.map +1 -0
  164. package/dist/components/select/style/select-theme.style.d.ts +4 -0
  165. package/dist/components/select/style/select-theme.style.d.ts.map +1 -0
  166. package/dist/components/select/sub-component/clear-indicator.d.ts +3 -0
  167. package/dist/components/select/sub-component/clear-indicator.d.ts.map +1 -0
  168. package/dist/components/select/sub-component/control-start.d.ts +3 -0
  169. package/dist/components/select/sub-component/control-start.d.ts.map +1 -0
  170. package/dist/components/select/sub-component/dropdown-indicator.d.ts +3 -0
  171. package/dist/components/select/sub-component/dropdown-indicator.d.ts.map +1 -0
  172. package/dist/components/select/sub-component/index.d.ts +9 -0
  173. package/dist/components/select/sub-component/index.d.ts.map +1 -0
  174. package/dist/components/select/sub-component/input-select.d.ts +3 -0
  175. package/dist/components/select/sub-component/input-select.d.ts.map +1 -0
  176. package/dist/components/select/sub-component/loading-indicator.d.ts +3 -0
  177. package/dist/components/select/sub-component/loading-indicator.d.ts.map +1 -0
  178. package/dist/components/select/sub-component/loading-message.d.ts +3 -0
  179. package/dist/components/select/sub-component/loading-message.d.ts.map +1 -0
  180. package/dist/components/select/sub-component/no-option-message.d.ts +3 -0
  181. package/dist/components/select/sub-component/no-option-message.d.ts.map +1 -0
  182. package/dist/components/select/sub-component/option-item.d.ts +3 -0
  183. package/dist/components/select/sub-component/option-item.d.ts.map +1 -0
  184. package/dist/components/select/sub-component/single-value.d.ts +3 -0
  185. package/dist/components/select/sub-component/single-value.d.ts.map +1 -0
  186. package/dist/components/table/body/table-body-column.d.ts +4 -0
  187. package/dist/components/table/body/table-body-column.d.ts.map +1 -0
  188. package/dist/components/table/body/table-body-row.d.ts +3 -0
  189. package/dist/components/table/body/table-body-row.d.ts.map +1 -0
  190. package/dist/components/table/body/table-body.d.ts +4 -0
  191. package/dist/components/table/body/table-body.d.ts.map +1 -0
  192. package/dist/components/table/context/table.context.d.ts +3 -0
  193. package/dist/components/table/context/table.context.d.ts.map +1 -0
  194. package/dist/components/table/header/table-header-column.d.ts +4 -0
  195. package/dist/components/table/header/table-header-column.d.ts.map +1 -0
  196. package/dist/components/table/header/table-header-row.d.ts +4 -0
  197. package/dist/components/table/header/table-header-row.d.ts.map +1 -0
  198. package/dist/components/table/header/table-header.d.ts +4 -0
  199. package/dist/components/table/header/table-header.d.ts.map +1 -0
  200. package/dist/components/table/hook/use-table-context.d.ts +2 -0
  201. package/dist/components/table/hook/use-table-context.d.ts.map +1 -0
  202. package/dist/components/table/hook/use-table.d.ts +10 -0
  203. package/dist/components/table/hook/use-table.d.ts.map +1 -0
  204. package/dist/components/table/index.d.ts +4 -0
  205. package/dist/components/table/index.d.ts.map +1 -0
  206. package/dist/components/table/interface/table-share.interface.d.ts +9 -0
  207. package/dist/components/table/interface/table-share.interface.d.ts.map +1 -0
  208. package/dist/components/table/interface/table.interface.d.ts +115 -0
  209. package/dist/components/table/interface/table.interface.d.ts.map +1 -0
  210. package/dist/components/table/search/table-search-column.d.ts +4 -0
  211. package/dist/components/table/search/table-search-column.d.ts.map +1 -0
  212. package/dist/components/table/search/table-search-row.d.ts +4 -0
  213. package/dist/components/table/search/table-search-row.d.ts.map +1 -0
  214. package/dist/components/table/table.d.ts +4 -0
  215. package/dist/components/table/table.d.ts.map +1 -0
  216. package/dist/components/tooltip/index.d.ts +2 -0
  217. package/dist/components/tooltip/index.d.ts.map +1 -0
  218. package/dist/components/tooltip/tooltip.d.ts +11 -0
  219. package/dist/components/tooltip/tooltip.d.ts.map +1 -0
  220. package/dist/components/ui/accordion.d.ts +8 -0
  221. package/dist/components/ui/accordion.d.ts.map +1 -0
  222. package/dist/components/ui/alert-dialog.d.ts +15 -0
  223. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  224. package/dist/components/ui/avatar.d.ts +13 -0
  225. package/dist/components/ui/avatar.d.ts.map +1 -0
  226. package/dist/components/ui/badge.d.ts +218 -0
  227. package/dist/components/ui/badge.d.ts.map +1 -0
  228. package/dist/components/ui/card.d.ts +10 -0
  229. package/dist/components/ui/card.d.ts.map +1 -0
  230. package/dist/components/ui/command.d.ts +19 -0
  231. package/dist/components/ui/command.d.ts.map +1 -0
  232. package/dist/components/ui/confirmation.d.ts +17 -0
  233. package/dist/components/ui/confirmation.d.ts.map +1 -0
  234. package/dist/components/ui/dialog.d.ts +16 -0
  235. package/dist/components/ui/dialog.d.ts.map +1 -0
  236. package/dist/components/ui/dropdown-menu.d.ts +26 -0
  237. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  238. package/dist/components/ui/index.d.ts +21 -0
  239. package/dist/components/ui/index.d.ts.map +1 -0
  240. package/dist/components/ui/input-otp.d.ts +12 -0
  241. package/dist/components/ui/input-otp.d.ts.map +1 -0
  242. package/dist/components/ui/input.d.ts +42 -0
  243. package/dist/components/ui/input.d.ts.map +1 -0
  244. package/dist/components/ui/label-error.d.ts +16 -0
  245. package/dist/components/ui/label-error.d.ts.map +1 -0
  246. package/dist/components/ui/label.d.ts +5 -0
  247. package/dist/components/ui/label.d.ts.map +1 -0
  248. package/dist/components/ui/menubar.d.ts +27 -0
  249. package/dist/components/ui/menubar.d.ts.map +1 -0
  250. package/dist/components/ui/modal.d.ts +16 -0
  251. package/dist/components/ui/modal.d.ts.map +1 -0
  252. package/dist/components/ui/navigation-menu.d.ts +15 -0
  253. package/dist/components/ui/navigation-menu.d.ts.map +1 -0
  254. package/dist/components/ui/popover.d.ts +8 -0
  255. package/dist/components/ui/popover.d.ts.map +1 -0
  256. package/dist/components/ui/resizable.d.ts +9 -0
  257. package/dist/components/ui/resizable.d.ts.map +1 -0
  258. package/dist/components/ui/skeleton.d.ts +3 -0
  259. package/dist/components/ui/skeleton.d.ts.map +1 -0
  260. package/dist/components/ui/switch.d.ts +13 -0
  261. package/dist/components/ui/switch.d.ts.map +1 -0
  262. package/dist/components/ui/tabs.d.ts +8 -0
  263. package/dist/components/ui/tabs.d.ts.map +1 -0
  264. package/dist/divider/index.cjs.js +2 -0
  265. package/dist/divider/index.cjs.js.map +1 -0
  266. package/dist/divider/index.es.js +67 -0
  267. package/dist/divider/index.es.js.map +1 -0
  268. package/dist/divider.d.ts +2 -0
  269. package/dist/functions/assertion.d.ts +14 -0
  270. package/dist/functions/assertion.d.ts.map +1 -0
  271. package/dist/functions/index.d.ts +5 -0
  272. package/dist/functions/index.d.ts.map +1 -0
  273. package/dist/functions/numbers.d.ts +20 -0
  274. package/dist/functions/numbers.d.ts.map +1 -0
  275. package/dist/functions/pattern.d.ts +3 -0
  276. package/dist/functions/pattern.d.ts.map +1 -0
  277. package/dist/functions/refs.d.ts +20 -0
  278. package/dist/functions/refs.d.ts.map +1 -0
  279. package/dist/hooks/use-confirmation.d.ts +21 -0
  280. package/dist/hooks/use-confirmation.d.ts.map +1 -0
  281. package/dist/hooks/use-modal.d.ts +15 -0
  282. package/dist/hooks/use-modal.d.ts.map +1 -0
  283. package/dist/index.cjs.js +2 -0
  284. package/dist/index.cjs.js.map +1 -0
  285. package/dist/index.d.ts +2 -0
  286. package/dist/index.es.js +386 -0
  287. package/dist/index.es.js.map +1 -0
  288. package/dist/lib/tv.d.ts +21 -0
  289. package/dist/lib/tv.d.ts.map +1 -0
  290. package/dist/lib/utils.d.ts +3 -0
  291. package/dist/lib/utils.d.ts.map +1 -0
  292. package/dist/lizaui.css +1 -0
  293. package/dist/pagination/index.cjs.js +2 -0
  294. package/dist/pagination/index.cjs.js.map +1 -0
  295. package/dist/pagination/index.es.js +170 -0
  296. package/dist/pagination/index.es.js.map +1 -0
  297. package/dist/pagination.d.ts +2 -0
  298. package/dist/select/index.cjs.js +2 -0
  299. package/dist/select/index.cjs.js.map +1 -0
  300. package/dist/select/index.es.js +226 -0
  301. package/dist/select/index.es.js.map +1 -0
  302. package/dist/select.d.ts +2 -0
  303. package/dist/table/index.cjs.js +2 -0
  304. package/dist/table/index.cjs.js.map +1 -0
  305. package/dist/table/index.es.js +233 -0
  306. package/dist/table/index.es.js.map +1 -0
  307. package/dist/table.d.ts +2 -0
  308. package/dist/theme/classes.d.ts +34 -0
  309. package/dist/theme/classes.d.ts.map +1 -0
  310. package/dist/theme/color/button.d.ts +162 -0
  311. package/dist/theme/color/button.d.ts.map +1 -0
  312. package/dist/theme/color/checkbox.d.ts +289 -0
  313. package/dist/theme/color/checkbox.d.ts.map +1 -0
  314. package/dist/theme/color/chip.d.ts +321 -0
  315. package/dist/theme/color/chip.d.ts.map +1 -0
  316. package/dist/theme/color/divider.d.ts +29 -0
  317. package/dist/theme/color/divider.d.ts.map +1 -0
  318. package/dist/theme/index.d.ts +3 -0
  319. package/dist/theme/index.d.ts.map +1 -0
  320. package/dist/theme/variants.d.ts +66 -0
  321. package/dist/theme/variants.d.ts.map +1 -0
  322. package/dist/tooltip/index.cjs.js +2 -0
  323. package/dist/tooltip/index.cjs.js.map +1 -0
  324. package/dist/tooltip/index.es.js +5 -0
  325. package/dist/tooltip/index.es.js.map +1 -0
  326. package/dist/tooltip.d.ts +2 -0
  327. package/dist/types/checkbox.type.d.ts +89 -0
  328. package/dist/types/checkbox.type.d.ts.map +1 -0
  329. package/dist/types/global.d.ts +5 -0
  330. package/dist/types/global.d.ts.map +1 -0
  331. package/dist/types/icon.type.d.ts +3 -0
  332. package/dist/types/icon.type.d.ts.map +1 -0
  333. package/dist/types/index.d.ts +8 -0
  334. package/dist/types/index.d.ts.map +1 -0
  335. package/dist/types/select/select-main.type.d.ts +139 -0
  336. package/dist/types/select/select-main.type.d.ts.map +1 -0
  337. package/dist/types/select/select.type.d.ts +8 -0
  338. package/dist/types/select/select.type.d.ts.map +1 -0
  339. package/dist/types/switch.type.d.ts +78 -0
  340. package/dist/types/switch.type.d.ts.map +1 -0
  341. package/dist/types/theme.d.ts +8 -0
  342. package/dist/types/theme.d.ts.map +1 -0
  343. package/dist/ui/index.cjs.js +71 -0
  344. package/dist/ui/index.cjs.js.map +1 -0
  345. package/dist/ui/index.es.js +8189 -0
  346. package/dist/ui/index.es.js.map +1 -0
  347. package/dist/ui.d.ts +2 -0
  348. package/package.json +135 -0
@@ -0,0 +1,959 @@
1
+ import { j as V } from "./jsx-runtime-BYq8_R6m.js";
2
+ import * as i from "react";
3
+ import { useLayoutEffect as Oe, useEffect as Fe, useState as ke, useRef as Ae } from "react";
4
+ import { i as _e, d as ae, e as N, g as Ne, j as te, k as Ce, m as je, n as ne, p as Ke, q as $e } from "./floating-ui.dom-PqoU7a4n.js";
5
+ import "react-dom";
6
+ import { u as We, o as Be, f as He, s as Ve, a as Ye } from "./floating-ui.react-dom-CihJ_dlB.js";
7
+ import { t as Ue } from "./bundle-mjs-JiDEie86.js";
8
+ import { c as Xe } from "./clsx-OuTLNxxd.js";
9
+ function qe() {
10
+ const e = navigator.userAgentData;
11
+ return e != null && e.platform ? e.platform : navigator.platform;
12
+ }
13
+ function Ge() {
14
+ const e = navigator.userAgentData;
15
+ return e && Array.isArray(e.brands) ? e.brands.map((o) => {
16
+ let {
17
+ brand: n,
18
+ version: t
19
+ } = o;
20
+ return n + "/" + t;
21
+ }).join(" ") : navigator.userAgent;
22
+ }
23
+ function Je() {
24
+ return /apple/i.test(navigator.vendor);
25
+ }
26
+ function Qe() {
27
+ return qe().toLowerCase().startsWith("mac") && !navigator.maxTouchPoints;
28
+ }
29
+ function Ze() {
30
+ return Ge().includes("jsdom/");
31
+ }
32
+ const pe = "data-floating-ui-focusable", ze = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";
33
+ function Re(e) {
34
+ let o = e.activeElement;
35
+ for (; ((n = o) == null || (n = n.shadowRoot) == null ? void 0 : n.activeElement) != null; ) {
36
+ var n;
37
+ o = o.shadowRoot.activeElement;
38
+ }
39
+ return o;
40
+ }
41
+ function Z(e, o) {
42
+ if (!e || !o)
43
+ return !1;
44
+ const n = o.getRootNode == null ? void 0 : o.getRootNode();
45
+ if (e.contains(o))
46
+ return !0;
47
+ if (n && _e(n)) {
48
+ let t = o;
49
+ for (; t; ) {
50
+ if (e === t)
51
+ return !0;
52
+ t = t.parentNode || t.host;
53
+ }
54
+ }
55
+ return !1;
56
+ }
57
+ function G(e) {
58
+ return "composedPath" in e ? e.composedPath()[0] : e.target;
59
+ }
60
+ function oe(e, o) {
61
+ if (o == null)
62
+ return !1;
63
+ if ("composedPath" in e)
64
+ return e.composedPath().includes(o);
65
+ const n = e;
66
+ return n.target != null && o.contains(n.target);
67
+ }
68
+ function et(e) {
69
+ return e.matches("html,body");
70
+ }
71
+ function X(e) {
72
+ return (e == null ? void 0 : e.ownerDocument) || document;
73
+ }
74
+ function tt(e) {
75
+ return ae(e) && e.matches(ze);
76
+ }
77
+ function nt(e) {
78
+ if (!e || Ze()) return !0;
79
+ try {
80
+ return e.matches(":focus-visible");
81
+ } catch {
82
+ return !0;
83
+ }
84
+ }
85
+ function ot(e) {
86
+ return e ? e.hasAttribute(pe) ? e : e.querySelector("[" + pe + "]") || e : null;
87
+ }
88
+ function re(e, o, n) {
89
+ n === void 0 && (n = !0);
90
+ let t = e.filter((a) => {
91
+ var c;
92
+ return a.parentId === o && ((c = a.context) == null ? void 0 : c.open);
93
+ }), s = t;
94
+ for (; s.length; )
95
+ s = n ? e.filter((a) => {
96
+ var c;
97
+ return (c = s) == null ? void 0 : c.some((r) => {
98
+ var f;
99
+ return a.parentId === r.id && ((f = a.context) == null ? void 0 : f.open);
100
+ });
101
+ }) : e, t = t.concat(s);
102
+ return t;
103
+ }
104
+ function rt(e) {
105
+ return "nativeEvent" in e;
106
+ }
107
+ function le(e, o) {
108
+ const n = ["mouse", "pen"];
109
+ return n.push("", void 0), n.includes(e);
110
+ }
111
+ var q = typeof document < "u" ? Oe : Fe;
112
+ const st = {
113
+ ...i
114
+ };
115
+ function ee(e) {
116
+ const o = i.useRef(e);
117
+ return q(() => {
118
+ o.current = e;
119
+ }), o;
120
+ }
121
+ const it = st.useInsertionEffect, ct = it || ((e) => e());
122
+ function U(e) {
123
+ const o = i.useRef(() => {
124
+ if (process.env.NODE_ENV !== "production")
125
+ throw new Error("Cannot call an event handler while rendering.");
126
+ });
127
+ return ct(() => {
128
+ o.current = e;
129
+ }), i.useCallback(function() {
130
+ for (var n = arguments.length, t = new Array(n), s = 0; s < n; s++)
131
+ t[s] = arguments[s];
132
+ return o.current == null ? void 0 : o.current(...t);
133
+ }, []);
134
+ }
135
+ const ut = "data-floating-ui-focusable", Ee = "active", he = "selected", lt = {
136
+ ...i
137
+ };
138
+ let be = !1, at = 0;
139
+ const we = () => (
140
+ // Ensure the id is unique with multiple independent versions of Floating UI
141
+ // on <React 18
142
+ "floating-ui-" + Math.random().toString(36).slice(2, 6) + at++
143
+ );
144
+ function ft() {
145
+ const [e, o] = i.useState(() => be ? we() : void 0);
146
+ return q(() => {
147
+ e == null && o(we());
148
+ }, []), i.useEffect(() => {
149
+ be = !0;
150
+ }, []), e;
151
+ }
152
+ const dt = lt.useId, fe = dt || ft;
153
+ let z;
154
+ process.env.NODE_ENV !== "production" && (z = /* @__PURE__ */ new Set());
155
+ function mt() {
156
+ for (var e, o = arguments.length, n = new Array(o), t = 0; t < o; t++)
157
+ n[t] = arguments[t];
158
+ const s = "Floating UI: " + n.join(" ");
159
+ if (!((e = z) != null && e.has(s))) {
160
+ var a;
161
+ (a = z) == null || a.add(s);
162
+ }
163
+ }
164
+ function vt() {
165
+ for (var e, o = arguments.length, n = new Array(o), t = 0; t < o; t++)
166
+ n[t] = arguments[t];
167
+ const s = "Floating UI: " + n.join(" ");
168
+ if (!((e = z) != null && e.has(s))) {
169
+ var a;
170
+ (a = z) == null || a.add(s);
171
+ }
172
+ }
173
+ const gt = /* @__PURE__ */ i.forwardRef(function(o, n) {
174
+ const {
175
+ context: {
176
+ placement: t,
177
+ elements: {
178
+ floating: s
179
+ },
180
+ middlewareData: {
181
+ arrow: a,
182
+ shift: c
183
+ }
184
+ },
185
+ width: r = 14,
186
+ height: f = 7,
187
+ tipRadius: p = 0,
188
+ strokeWidth: R = 0,
189
+ staticOffset: y,
190
+ stroke: h,
191
+ d: u,
192
+ style: {
193
+ transform: b,
194
+ ...d
195
+ } = {},
196
+ ...x
197
+ } = o;
198
+ process.env.NODE_ENV !== "production" && (n || mt("The `ref` prop is required for `FloatingArrow`."));
199
+ const M = fe(), [C, w] = i.useState(!1);
200
+ if (q(() => {
201
+ if (!s) return;
202
+ Ce(s).direction === "rtl" && w(!0);
203
+ }, [s]), !s)
204
+ return null;
205
+ const [L, j] = t.split("-"), F = L === "top" || L === "bottom";
206
+ let O = y;
207
+ (F && c != null && c.x || !F && c != null && c.y) && (O = null);
208
+ const k = R * 2, A = k / 2, $ = r / 2 * (p / -8 + 1), W = f / 2 * p / 4, D = !!u, B = O && j === "end" ? "bottom" : "top";
209
+ let _ = O && j === "end" ? "right" : "left";
210
+ O && C && (_ = j === "end" ? "left" : "right");
211
+ const g = (a == null ? void 0 : a.x) != null ? O || a.x : "", T = (a == null ? void 0 : a.y) != null ? O || a.y : "", v = u || "M0,0" + (" H" + r) + (" L" + (r - $) + "," + (f - W)) + (" Q" + r / 2 + "," + f + " " + $ + "," + (f - W)) + " Z", m = {
212
+ top: D ? "rotate(180deg)" : "",
213
+ left: D ? "rotate(90deg)" : "rotate(-90deg)",
214
+ bottom: D ? "" : "rotate(180deg)",
215
+ right: D ? "rotate(-90deg)" : "rotate(90deg)"
216
+ }[L];
217
+ return /* @__PURE__ */ V.jsxs("svg", {
218
+ ...x,
219
+ "aria-hidden": !0,
220
+ ref: n,
221
+ width: D ? r : r + k,
222
+ height: r,
223
+ viewBox: "0 0 " + r + " " + (f > r ? f : r),
224
+ style: {
225
+ position: "absolute",
226
+ pointerEvents: "none",
227
+ [_]: g,
228
+ [B]: T,
229
+ [L]: F || D ? "100%" : "calc(100% - " + k / 2 + "px)",
230
+ transform: [m, b].filter((l) => !!l).join(" "),
231
+ ...d
232
+ },
233
+ children: [k > 0 && /* @__PURE__ */ V.jsx("path", {
234
+ clipPath: "url(#" + M + ")",
235
+ fill: "none",
236
+ stroke: h,
237
+ strokeWidth: k + (u ? 0 : 1),
238
+ d: v
239
+ }), /* @__PURE__ */ V.jsx("path", {
240
+ stroke: k && !u ? x.fill : "none",
241
+ d: v
242
+ }), /* @__PURE__ */ V.jsx("clipPath", {
243
+ id: M,
244
+ children: /* @__PURE__ */ V.jsx("rect", {
245
+ x: -A,
246
+ y: A * (D ? -1 : 1),
247
+ width: r + k,
248
+ height: r
249
+ })
250
+ })]
251
+ });
252
+ });
253
+ function pt() {
254
+ const e = /* @__PURE__ */ new Map();
255
+ return {
256
+ emit(o, n) {
257
+ var t;
258
+ (t = e.get(o)) == null || t.forEach((s) => s(n));
259
+ },
260
+ on(o, n) {
261
+ e.has(o) || e.set(o, /* @__PURE__ */ new Set()), e.get(o).add(n);
262
+ },
263
+ off(o, n) {
264
+ var t;
265
+ (t = e.get(o)) == null || t.delete(n);
266
+ }
267
+ };
268
+ }
269
+ const Rt = /* @__PURE__ */ i.createContext(null), Et = /* @__PURE__ */ i.createContext(null), de = () => {
270
+ var e;
271
+ return ((e = i.useContext(Rt)) == null ? void 0 : e.id) || null;
272
+ }, me = () => i.useContext(Et);
273
+ function ve(e) {
274
+ return "data-floating-ui-" + e;
275
+ }
276
+ function H(e) {
277
+ e.current !== -1 && (clearTimeout(e.current), e.current = -1);
278
+ }
279
+ const ye = /* @__PURE__ */ ve("safe-polygon");
280
+ function se(e, o, n) {
281
+ if (n && !le(n))
282
+ return 0;
283
+ if (typeof e == "number")
284
+ return e;
285
+ if (typeof e == "function") {
286
+ const t = e();
287
+ return typeof t == "number" ? t : t == null ? void 0 : t[o];
288
+ }
289
+ return e == null ? void 0 : e[o];
290
+ }
291
+ function ie(e) {
292
+ return typeof e == "function" ? e() : e;
293
+ }
294
+ function ht(e, o) {
295
+ o === void 0 && (o = {});
296
+ const {
297
+ open: n,
298
+ onOpenChange: t,
299
+ dataRef: s,
300
+ events: a,
301
+ elements: c
302
+ } = e, {
303
+ enabled: r = !0,
304
+ delay: f = 0,
305
+ handleClose: p = null,
306
+ mouseOnly: R = !1,
307
+ restMs: y = 0,
308
+ move: h = !0
309
+ } = o, u = me(), b = de(), d = ee(p), x = ee(f), M = ee(n), C = ee(y), w = i.useRef(), L = i.useRef(-1), j = i.useRef(), F = i.useRef(-1), O = i.useRef(!0), k = i.useRef(!1), A = i.useRef(() => {
310
+ }), $ = i.useRef(!1), W = i.useCallback(() => {
311
+ var v;
312
+ const m = (v = s.current.openEvent) == null ? void 0 : v.type;
313
+ return (m == null ? void 0 : m.includes("mouse")) && m !== "mousedown";
314
+ }, [s]);
315
+ i.useEffect(() => {
316
+ if (!r) return;
317
+ function v(m) {
318
+ let {
319
+ open: l
320
+ } = m;
321
+ l || (H(L), H(F), O.current = !0, $.current = !1);
322
+ }
323
+ return a.on("openchange", v), () => {
324
+ a.off("openchange", v);
325
+ };
326
+ }, [r, a]), i.useEffect(() => {
327
+ if (!r || !d.current || !n) return;
328
+ function v(l) {
329
+ W() && t(!1, l, "hover");
330
+ }
331
+ const m = X(c.floating).documentElement;
332
+ return m.addEventListener("mouseleave", v), () => {
333
+ m.removeEventListener("mouseleave", v);
334
+ };
335
+ }, [c.floating, n, t, r, d, W]);
336
+ const D = i.useCallback(function(v, m, l) {
337
+ m === void 0 && (m = !0), l === void 0 && (l = "hover");
338
+ const P = se(x.current, "close", w.current);
339
+ P && !j.current ? (H(L), L.current = window.setTimeout(() => t(!1, v, l), P)) : m && (H(L), t(!1, v, l));
340
+ }, [x, t]), B = U(() => {
341
+ A.current(), j.current = void 0;
342
+ }), _ = U(() => {
343
+ if (k.current) {
344
+ const v = X(c.floating).body;
345
+ v.style.pointerEvents = "", v.removeAttribute(ye), k.current = !1;
346
+ }
347
+ }), g = U(() => s.current.openEvent ? ["click", "mousedown"].includes(s.current.openEvent.type) : !1);
348
+ i.useEffect(() => {
349
+ if (!r) return;
350
+ function v(E) {
351
+ if (H(L), O.current = !1, R && !le(w.current) || ie(C.current) > 0 && !se(x.current, "open"))
352
+ return;
353
+ const I = se(x.current, "open", w.current);
354
+ I ? L.current = window.setTimeout(() => {
355
+ M.current || t(!0, E, "hover");
356
+ }, I) : n || t(!0, E, "hover");
357
+ }
358
+ function m(E) {
359
+ if (g()) {
360
+ _();
361
+ return;
362
+ }
363
+ A.current();
364
+ const I = X(c.floating);
365
+ if (H(F), $.current = !1, d.current && s.current.floatingContext) {
366
+ n || H(L), j.current = d.current({
367
+ ...s.current.floatingContext,
368
+ tree: u,
369
+ x: E.clientX,
370
+ y: E.clientY,
371
+ onClose() {
372
+ _(), B(), g() || D(E, !0, "safe-polygon");
373
+ }
374
+ });
375
+ const J = j.current;
376
+ I.addEventListener("mousemove", J), A.current = () => {
377
+ I.removeEventListener("mousemove", J);
378
+ };
379
+ return;
380
+ }
381
+ (w.current === "touch" ? !Z(c.floating, E.relatedTarget) : !0) && D(E);
382
+ }
383
+ function l(E) {
384
+ g() || s.current.floatingContext && (d.current == null || d.current({
385
+ ...s.current.floatingContext,
386
+ tree: u,
387
+ x: E.clientX,
388
+ y: E.clientY,
389
+ onClose() {
390
+ _(), B(), g() || D(E);
391
+ }
392
+ })(E));
393
+ }
394
+ function P() {
395
+ H(L);
396
+ }
397
+ function S(E) {
398
+ g() || D(E, !1);
399
+ }
400
+ if (N(c.domReference)) {
401
+ const E = c.domReference, I = c.floating;
402
+ return n && E.addEventListener("mouseleave", l), h && E.addEventListener("mousemove", v, {
403
+ once: !0
404
+ }), E.addEventListener("mouseenter", v), E.addEventListener("mouseleave", m), I && (I.addEventListener("mouseleave", l), I.addEventListener("mouseenter", P), I.addEventListener("mouseleave", S)), () => {
405
+ n && E.removeEventListener("mouseleave", l), h && E.removeEventListener("mousemove", v), E.removeEventListener("mouseenter", v), E.removeEventListener("mouseleave", m), I && (I.removeEventListener("mouseleave", l), I.removeEventListener("mouseenter", P), I.removeEventListener("mouseleave", S));
406
+ };
407
+ }
408
+ }, [c, r, e, R, h, D, B, _, t, n, M, u, x, d, s, g, C]), q(() => {
409
+ var v;
410
+ if (r && n && (v = d.current) != null && v.__options.blockPointerEvents && W()) {
411
+ k.current = !0;
412
+ const l = c.floating;
413
+ if (N(c.domReference) && l) {
414
+ var m;
415
+ const P = X(c.floating).body;
416
+ P.setAttribute(ye, "");
417
+ const S = c.domReference, E = u == null || (m = u.nodesRef.current.find((I) => I.id === b)) == null || (m = m.context) == null ? void 0 : m.elements.floating;
418
+ return E && (E.style.pointerEvents = ""), P.style.pointerEvents = "none", S.style.pointerEvents = "auto", l.style.pointerEvents = "auto", () => {
419
+ P.style.pointerEvents = "", S.style.pointerEvents = "", l.style.pointerEvents = "";
420
+ };
421
+ }
422
+ }
423
+ }, [r, n, b, c, u, d, W]), q(() => {
424
+ n || (w.current = void 0, $.current = !1, B(), _());
425
+ }, [n, B, _]), i.useEffect(() => () => {
426
+ B(), H(L), H(F), _();
427
+ }, [r, c.domReference, B, _]);
428
+ const T = i.useMemo(() => {
429
+ function v(m) {
430
+ w.current = m.pointerType;
431
+ }
432
+ return {
433
+ onPointerDown: v,
434
+ onPointerEnter: v,
435
+ onMouseMove(m) {
436
+ const {
437
+ nativeEvent: l
438
+ } = m;
439
+ function P() {
440
+ !O.current && !M.current && t(!0, l, "hover");
441
+ }
442
+ R && !le(w.current) || n || ie(C.current) === 0 || $.current && m.movementX ** 2 + m.movementY ** 2 < 2 || (H(F), w.current === "touch" ? P() : ($.current = !0, F.current = window.setTimeout(P, ie(C.current))));
443
+ }
444
+ };
445
+ }, [R, t, n, M, C]);
446
+ return i.useMemo(() => r ? {
447
+ reference: T
448
+ } : {}, [r, T]);
449
+ }
450
+ const bt = {
451
+ pointerdown: "onPointerDown",
452
+ mousedown: "onMouseDown",
453
+ click: "onClick"
454
+ }, wt = {
455
+ pointerdown: "onPointerDownCapture",
456
+ mousedown: "onMouseDownCapture",
457
+ click: "onClickCapture"
458
+ }, xe = (e) => {
459
+ var o, n;
460
+ return {
461
+ escapeKey: typeof e == "boolean" ? e : (o = e == null ? void 0 : e.escapeKey) != null ? o : !1,
462
+ outsidePress: typeof e == "boolean" ? e : (n = e == null ? void 0 : e.outsidePress) != null ? n : !0
463
+ };
464
+ };
465
+ function yt(e, o) {
466
+ o === void 0 && (o = {});
467
+ const {
468
+ open: n,
469
+ onOpenChange: t,
470
+ elements: s,
471
+ dataRef: a
472
+ } = e, {
473
+ enabled: c = !0,
474
+ escapeKey: r = !0,
475
+ outsidePress: f = !0,
476
+ outsidePressEvent: p = "pointerdown",
477
+ referencePress: R = !1,
478
+ referencePressEvent: y = "pointerdown",
479
+ ancestorScroll: h = !1,
480
+ bubbles: u,
481
+ capture: b
482
+ } = o, d = me(), x = U(typeof f == "function" ? f : () => !1), M = typeof f == "function" ? x : f, C = i.useRef(!1), w = i.useRef(!1), {
483
+ escapeKey: L,
484
+ outsidePress: j
485
+ } = xe(u), {
486
+ escapeKey: F,
487
+ outsidePress: O
488
+ } = xe(b), k = i.useRef(!1), A = U((g) => {
489
+ var T;
490
+ if (!n || !c || !r || g.key !== "Escape" || k.current)
491
+ return;
492
+ const v = (T = a.current.floatingContext) == null ? void 0 : T.nodeId, m = d ? re(d.nodesRef.current, v) : [];
493
+ if (!L && (g.stopPropagation(), m.length > 0)) {
494
+ let l = !0;
495
+ if (m.forEach((P) => {
496
+ var S;
497
+ if ((S = P.context) != null && S.open && !P.context.dataRef.current.__escapeKeyBubbles) {
498
+ l = !1;
499
+ return;
500
+ }
501
+ }), !l)
502
+ return;
503
+ }
504
+ t(!1, rt(g) ? g.nativeEvent : g, "escape-key");
505
+ }), $ = U((g) => {
506
+ var T;
507
+ const v = () => {
508
+ var m;
509
+ A(g), (m = G(g)) == null || m.removeEventListener("keydown", v);
510
+ };
511
+ (T = G(g)) == null || T.addEventListener("keydown", v);
512
+ }), W = U((g) => {
513
+ var T;
514
+ const v = C.current;
515
+ C.current = !1;
516
+ const m = w.current;
517
+ if (w.current = !1, p === "click" && m || v || typeof M == "function" && !M(g))
518
+ return;
519
+ const l = G(g), P = "[" + ve("inert") + "]", S = X(s.floating).querySelectorAll(P);
520
+ let E = N(l) ? l : null;
521
+ for (; E && !ne(E); ) {
522
+ const K = Ke(E);
523
+ if (ne(K) || !N(K))
524
+ break;
525
+ E = K;
526
+ }
527
+ if (S.length && N(l) && !et(l) && // Clicked on a direct ancestor (e.g. FloatingOverlay).
528
+ !Z(l, s.floating) && // If the target root element contains none of the markers, then the
529
+ // element was injected after the floating element rendered.
530
+ Array.from(S).every((K) => !Z(E, K)))
531
+ return;
532
+ if (ae(l) && _) {
533
+ const K = ne(l), Y = Ce(l), Q = /auto|scroll/, Me = K || Q.test(Y.overflowX), Pe = K || Q.test(Y.overflowY), Le = Me && l.clientWidth > 0 && l.scrollWidth > l.clientWidth, Te = Pe && l.clientHeight > 0 && l.scrollHeight > l.clientHeight, Se = Y.direction === "rtl", Ie = Te && (Se ? g.offsetX <= l.offsetWidth - l.clientWidth : g.offsetX > l.clientWidth), De = Le && g.offsetY > l.clientHeight;
534
+ if (Ie || De)
535
+ return;
536
+ }
537
+ const I = (T = a.current.floatingContext) == null ? void 0 : T.nodeId, ge = d && re(d.nodesRef.current, I).some((K) => {
538
+ var Y;
539
+ return oe(g, (Y = K.context) == null ? void 0 : Y.elements.floating);
540
+ });
541
+ if (oe(g, s.floating) || oe(g, s.domReference) || ge)
542
+ return;
543
+ const J = d ? re(d.nodesRef.current, I) : [];
544
+ if (J.length > 0) {
545
+ let K = !0;
546
+ if (J.forEach((Y) => {
547
+ var Q;
548
+ if ((Q = Y.context) != null && Q.open && !Y.context.dataRef.current.__outsidePressBubbles) {
549
+ K = !1;
550
+ return;
551
+ }
552
+ }), !K)
553
+ return;
554
+ }
555
+ t(!1, g, "outside-press");
556
+ }), D = U((g) => {
557
+ var T;
558
+ const v = () => {
559
+ var m;
560
+ W(g), (m = G(g)) == null || m.removeEventListener(p, v);
561
+ };
562
+ (T = G(g)) == null || T.addEventListener(p, v);
563
+ });
564
+ i.useEffect(() => {
565
+ if (!n || !c)
566
+ return;
567
+ a.current.__escapeKeyBubbles = L, a.current.__outsidePressBubbles = j;
568
+ let g = -1;
569
+ function T(S) {
570
+ t(!1, S, "ancestor-scroll");
571
+ }
572
+ function v() {
573
+ window.clearTimeout(g), k.current = !0;
574
+ }
575
+ function m() {
576
+ g = window.setTimeout(
577
+ () => {
578
+ k.current = !1;
579
+ },
580
+ // 0ms or 1ms don't work in Safari. 5ms appears to consistently work.
581
+ // Only apply to WebKit for the test to remain 0ms.
582
+ je() ? 5 : 0
583
+ );
584
+ }
585
+ const l = X(s.floating);
586
+ r && (l.addEventListener("keydown", F ? $ : A, F), l.addEventListener("compositionstart", v), l.addEventListener("compositionend", m)), M && l.addEventListener(p, O ? D : W, O);
587
+ let P = [];
588
+ return h && (N(s.domReference) && (P = te(s.domReference)), N(s.floating) && (P = P.concat(te(s.floating))), !N(s.reference) && s.reference && s.reference.contextElement && (P = P.concat(te(s.reference.contextElement)))), P = P.filter((S) => {
589
+ var E;
590
+ return S !== ((E = l.defaultView) == null ? void 0 : E.visualViewport);
591
+ }), P.forEach((S) => {
592
+ S.addEventListener("scroll", T, {
593
+ passive: !0
594
+ });
595
+ }), () => {
596
+ r && (l.removeEventListener("keydown", F ? $ : A, F), l.removeEventListener("compositionstart", v), l.removeEventListener("compositionend", m)), M && l.removeEventListener(p, O ? D : W, O), P.forEach((S) => {
597
+ S.removeEventListener("scroll", T);
598
+ }), window.clearTimeout(g);
599
+ };
600
+ }, [a, s, r, M, p, n, t, h, c, L, j, A, F, $, W, O, D]), i.useEffect(() => {
601
+ C.current = !1;
602
+ }, [M, p]);
603
+ const B = i.useMemo(() => ({
604
+ onKeyDown: A,
605
+ ...R && {
606
+ [bt[y]]: (g) => {
607
+ t(!1, g.nativeEvent, "reference-press");
608
+ },
609
+ ...y !== "click" && {
610
+ onClick(g) {
611
+ t(!1, g.nativeEvent, "reference-press");
612
+ }
613
+ }
614
+ }
615
+ }), [A, t, R, y]), _ = i.useMemo(() => ({
616
+ onKeyDown: A,
617
+ onMouseDown() {
618
+ w.current = !0;
619
+ },
620
+ onMouseUp() {
621
+ w.current = !0;
622
+ },
623
+ [wt[p]]: () => {
624
+ C.current = !0;
625
+ }
626
+ }), [A, p]);
627
+ return i.useMemo(() => c ? {
628
+ reference: B,
629
+ floating: _
630
+ } : {}, [c, B, _]);
631
+ }
632
+ function xt(e) {
633
+ const {
634
+ open: o = !1,
635
+ onOpenChange: n,
636
+ elements: t
637
+ } = e, s = fe(), a = i.useRef({}), [c] = i.useState(() => pt()), r = de() != null;
638
+ if (process.env.NODE_ENV !== "production") {
639
+ const u = t.reference;
640
+ u && !N(u) && vt("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `refs.setPositionReference()`", "instead.");
641
+ }
642
+ const [f, p] = i.useState(t.reference), R = U((u, b, d) => {
643
+ a.current.openEvent = u ? b : void 0, c.emit("openchange", {
644
+ open: u,
645
+ event: b,
646
+ reason: d,
647
+ nested: r
648
+ }), n == null || n(u, b, d);
649
+ }), y = i.useMemo(() => ({
650
+ setPositionReference: p
651
+ }), []), h = i.useMemo(() => ({
652
+ reference: f || t.reference || null,
653
+ floating: t.floating || null,
654
+ domReference: t.reference
655
+ }), [f, t.reference, t.floating]);
656
+ return i.useMemo(() => ({
657
+ dataRef: a,
658
+ open: o,
659
+ onOpenChange: R,
660
+ elements: h,
661
+ events: c,
662
+ floatingId: s,
663
+ refs: y
664
+ }), [o, R, h, c, s, y]);
665
+ }
666
+ function Ct(e) {
667
+ e === void 0 && (e = {});
668
+ const {
669
+ nodeId: o
670
+ } = e, n = xt({
671
+ ...e,
672
+ elements: {
673
+ reference: null,
674
+ floating: null,
675
+ ...e.elements
676
+ }
677
+ }), t = e.rootContext || n, s = t.elements, [a, c] = i.useState(null), [r, f] = i.useState(null), R = (s == null ? void 0 : s.domReference) || a, y = i.useRef(null), h = me();
678
+ q(() => {
679
+ R && (y.current = R);
680
+ }, [R]);
681
+ const u = We({
682
+ ...e,
683
+ elements: {
684
+ ...s,
685
+ ...r && {
686
+ reference: r
687
+ }
688
+ }
689
+ }), b = i.useCallback((w) => {
690
+ const L = N(w) ? {
691
+ getBoundingClientRect: () => w.getBoundingClientRect(),
692
+ getClientRects: () => w.getClientRects(),
693
+ contextElement: w
694
+ } : w;
695
+ f(L), u.refs.setReference(L);
696
+ }, [u.refs]), d = i.useCallback((w) => {
697
+ (N(w) || w === null) && (y.current = w, c(w)), (N(u.refs.reference.current) || u.refs.reference.current === null || // Don't allow setting virtual elements using the old technique back to
698
+ // `null` to support `positionReference` + an unstable `reference`
699
+ // callback ref.
700
+ w !== null && !N(w)) && u.refs.setReference(w);
701
+ }, [u.refs]), x = i.useMemo(() => ({
702
+ ...u.refs,
703
+ setReference: d,
704
+ setPositionReference: b,
705
+ domReference: y
706
+ }), [u.refs, d, b]), M = i.useMemo(() => ({
707
+ ...u.elements,
708
+ domReference: R
709
+ }), [u.elements, R]), C = i.useMemo(() => ({
710
+ ...u,
711
+ ...t,
712
+ refs: x,
713
+ elements: M,
714
+ nodeId: o
715
+ }), [u, x, M, o, t]);
716
+ return q(() => {
717
+ t.dataRef.current.floatingContext = C;
718
+ const w = h == null ? void 0 : h.nodesRef.current.find((L) => L.id === o);
719
+ w && (w.context = C);
720
+ }), i.useMemo(() => ({
721
+ ...u,
722
+ context: C,
723
+ refs: x,
724
+ elements: M
725
+ }), [u, x, M, C]);
726
+ }
727
+ function ce() {
728
+ return Qe() && Je();
729
+ }
730
+ function Mt(e, o) {
731
+ o === void 0 && (o = {});
732
+ const {
733
+ open: n,
734
+ onOpenChange: t,
735
+ events: s,
736
+ dataRef: a,
737
+ elements: c
738
+ } = e, {
739
+ enabled: r = !0,
740
+ visibleOnly: f = !0
741
+ } = o, p = i.useRef(!1), R = i.useRef(-1), y = i.useRef(!0);
742
+ i.useEffect(() => {
743
+ if (!r) return;
744
+ const u = Ne(c.domReference);
745
+ function b() {
746
+ !n && ae(c.domReference) && c.domReference === Re(X(c.domReference)) && (p.current = !0);
747
+ }
748
+ function d() {
749
+ y.current = !0;
750
+ }
751
+ function x() {
752
+ y.current = !1;
753
+ }
754
+ return u.addEventListener("blur", b), ce() && (u.addEventListener("keydown", d, !0), u.addEventListener("pointerdown", x, !0)), () => {
755
+ u.removeEventListener("blur", b), ce() && (u.removeEventListener("keydown", d, !0), u.removeEventListener("pointerdown", x, !0));
756
+ };
757
+ }, [c.domReference, n, r]), i.useEffect(() => {
758
+ if (!r) return;
759
+ function u(b) {
760
+ let {
761
+ reason: d
762
+ } = b;
763
+ (d === "reference-press" || d === "escape-key") && (p.current = !0);
764
+ }
765
+ return s.on("openchange", u), () => {
766
+ s.off("openchange", u);
767
+ };
768
+ }, [s, r]), i.useEffect(() => () => {
769
+ H(R);
770
+ }, []);
771
+ const h = i.useMemo(() => ({
772
+ onMouseLeave() {
773
+ p.current = !1;
774
+ },
775
+ onFocus(u) {
776
+ if (p.current) return;
777
+ const b = G(u.nativeEvent);
778
+ if (f && N(b)) {
779
+ if (ce() && !u.relatedTarget) {
780
+ if (!y.current && !tt(b))
781
+ return;
782
+ } else if (!nt(b))
783
+ return;
784
+ }
785
+ t(!0, u.nativeEvent, "focus");
786
+ },
787
+ onBlur(u) {
788
+ p.current = !1;
789
+ const b = u.relatedTarget, d = u.nativeEvent, x = N(b) && b.hasAttribute(ve("focus-guard")) && b.getAttribute("data-type") === "outside";
790
+ R.current = window.setTimeout(() => {
791
+ var M;
792
+ const C = Re(c.domReference ? c.domReference.ownerDocument : document);
793
+ !b && C === c.domReference || Z((M = a.current.floatingContext) == null ? void 0 : M.refs.floating.current, C) || Z(c.domReference, C) || x || t(!1, d, "focus");
794
+ });
795
+ }
796
+ }), [a, c.domReference, t, f]);
797
+ return i.useMemo(() => r ? {
798
+ reference: h
799
+ } : {}, [r, h]);
800
+ }
801
+ function ue(e, o, n) {
802
+ const t = /* @__PURE__ */ new Map(), s = n === "item";
803
+ let a = e;
804
+ if (s && e) {
805
+ const {
806
+ [Ee]: c,
807
+ [he]: r,
808
+ ...f
809
+ } = e;
810
+ a = f;
811
+ }
812
+ return {
813
+ ...n === "floating" && {
814
+ tabIndex: -1,
815
+ [ut]: ""
816
+ },
817
+ ...a,
818
+ ...o.map((c) => {
819
+ const r = c ? c[n] : null;
820
+ return typeof r == "function" ? e ? r(e) : null : r;
821
+ }).concat(e).reduce((c, r) => (r && Object.entries(r).forEach((f) => {
822
+ let [p, R] = f;
823
+ if (!(s && [Ee, he].includes(p)))
824
+ if (p.indexOf("on") === 0) {
825
+ if (t.has(p) || t.set(p, []), typeof R == "function") {
826
+ var y;
827
+ (y = t.get(p)) == null || y.push(R), c[p] = function() {
828
+ for (var h, u = arguments.length, b = new Array(u), d = 0; d < u; d++)
829
+ b[d] = arguments[d];
830
+ return (h = t.get(p)) == null ? void 0 : h.map((x) => x(...b)).find((x) => x !== void 0);
831
+ };
832
+ }
833
+ } else
834
+ c[p] = R;
835
+ }), c), {})
836
+ };
837
+ }
838
+ function Pt(e) {
839
+ e === void 0 && (e = []);
840
+ const o = e.map((r) => r == null ? void 0 : r.reference), n = e.map((r) => r == null ? void 0 : r.floating), t = e.map((r) => r == null ? void 0 : r.item), s = i.useCallback(
841
+ (r) => ue(r, e, "reference"),
842
+ // eslint-disable-next-line react-hooks/exhaustive-deps
843
+ o
844
+ ), a = i.useCallback(
845
+ (r) => ue(r, e, "floating"),
846
+ // eslint-disable-next-line react-hooks/exhaustive-deps
847
+ n
848
+ ), c = i.useCallback(
849
+ (r) => ue(r, e, "item"),
850
+ // eslint-disable-next-line react-hooks/exhaustive-deps
851
+ t
852
+ );
853
+ return i.useMemo(() => ({
854
+ getReferenceProps: s,
855
+ getFloatingProps: a,
856
+ getItemProps: c
857
+ }), [s, a, c]);
858
+ }
859
+ const Lt = /* @__PURE__ */ new Map([["select", "listbox"], ["combobox", "listbox"], ["label", !1]]);
860
+ function Tt(e, o) {
861
+ var n, t;
862
+ o === void 0 && (o = {});
863
+ const {
864
+ open: s,
865
+ elements: a,
866
+ floatingId: c
867
+ } = e, {
868
+ enabled: r = !0,
869
+ role: f = "dialog"
870
+ } = o, p = fe(), R = ((n = a.domReference) == null ? void 0 : n.id) || p, y = i.useMemo(() => {
871
+ var C;
872
+ return ((C = ot(a.floating)) == null ? void 0 : C.id) || c;
873
+ }, [a.floating, c]), h = (t = Lt.get(f)) != null ? t : f, b = de() != null, d = i.useMemo(() => h === "tooltip" || f === "label" ? {
874
+ ["aria-" + (f === "label" ? "labelledby" : "describedby")]: s ? y : void 0
875
+ } : {
876
+ "aria-expanded": s ? "true" : "false",
877
+ "aria-haspopup": h === "alertdialog" ? "dialog" : h,
878
+ "aria-controls": s ? y : void 0,
879
+ ...h === "listbox" && {
880
+ role: "combobox"
881
+ },
882
+ ...h === "menu" && {
883
+ id: R
884
+ },
885
+ ...h === "menu" && b && {
886
+ role: "menuitem"
887
+ },
888
+ ...f === "select" && {
889
+ "aria-autocomplete": "none"
890
+ },
891
+ ...f === "combobox" && {
892
+ "aria-autocomplete": "list"
893
+ }
894
+ }, [h, y, b, s, R, f]), x = i.useMemo(() => {
895
+ const C = {
896
+ id: y,
897
+ ...h && {
898
+ role: h
899
+ }
900
+ };
901
+ return h === "tooltip" || f === "label" ? C : {
902
+ ...C,
903
+ ...h === "menu" && {
904
+ "aria-labelledby": R
905
+ }
906
+ };
907
+ }, [h, y, R, f]), M = i.useCallback((C) => {
908
+ let {
909
+ active: w,
910
+ selected: L
911
+ } = C;
912
+ const j = {
913
+ role: "option",
914
+ ...w && {
915
+ id: y + "-fui-option"
916
+ }
917
+ };
918
+ switch (f) {
919
+ case "select":
920
+ return {
921
+ ...j,
922
+ "aria-selected": w && L
923
+ };
924
+ case "combobox":
925
+ return {
926
+ ...j,
927
+ "aria-selected": L
928
+ };
929
+ }
930
+ return {};
931
+ }, [y, f]);
932
+ return i.useMemo(() => r ? {
933
+ reference: d,
934
+ floating: x,
935
+ item: M
936
+ } : {}, [r, d, x, M]);
937
+ }
938
+ const _t = ({ children: e, content: o, className: n, placement: t = "top", showArrow: s = !0 }) => {
939
+ const [a, c] = ke(!1), r = Ae(null), { refs: f, floatingStyles: p, context: R } = Ct({
940
+ open: a,
941
+ onOpenChange: c,
942
+ placement: t,
943
+ middleware: [Be(8), He(), Ve(), Ye({ element: r })],
944
+ whileElementsMounted: $e
945
+ }), y = ht(R), h = Mt(R), u = yt(R), b = Tt(R), { getReferenceProps: d, getFloatingProps: x } = Pt([y, h, u, b]), M = Ue(
946
+ Xe("bg-content1 text-normal text-sm rounded-md shadow-md z-10 px-2.5 py-1 outline-none box-border subpixel-antialiased normal-case", n)
947
+ );
948
+ return /* @__PURE__ */ V.jsxs(V.Fragment, { children: [
949
+ /* @__PURE__ */ V.jsx("div", { ref: f.setReference, ...d(), children: e }),
950
+ a && /* @__PURE__ */ V.jsxs("div", { ref: f.setFloating, style: p, ...x(), className: M, children: [
951
+ o,
952
+ s && /* @__PURE__ */ V.jsx(gt, { ref: r, context: R, className: "text-content1", fill: "currentColor" })
953
+ ] })
954
+ ] });
955
+ };
956
+ export {
957
+ _t as T
958
+ };
959
+ //# sourceMappingURL=tooltip-CIcTjpF8.js.map