@stihl-design-system/components 1.0.0-RC.31 → 1.0.0-RC.34

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 (286) hide show
  1. package/accordion.Dmqocj97.js +12 -0
  2. package/actionbutton.DLQJU6AV.js +12 -0
  3. package/actionlink.DEBrWfN3.js +12 -0
  4. package/{arialiveregions.Fgcshs5k.js → arialiveregions.BUVY9NpY.js} +2 -2
  5. package/assets/Accordion.CzBGud45.css +1 -0
  6. package/assets/Button.C8sNwIeW.css +1 -0
  7. package/assets/Checkbox.CyOw3rXI.css +1 -0
  8. package/assets/CustomReactSelect.E_jJFVew.css +1 -0
  9. package/assets/Dialog.DJkn65Es.css +1 -0
  10. package/assets/Drawer.x3BCQvWE.css +1 -0
  11. package/assets/InputFile.BnIvK65P.css +1 -0
  12. package/assets/InputNumber.BoiCIR1f.css +1 -0
  13. package/assets/InputPassword.Dk3_vNLV.css +1 -0
  14. package/assets/InputSearch.C1_4cVCi.css +1 -0
  15. package/assets/LinkButton.B86yacK5.css +1 -0
  16. package/assets/{MegaMenu.DX9gChtY.css → MegaMenu.D5EtjFeL.css} +1 -1
  17. package/assets/Notification.CvohYEvT.css +1 -0
  18. package/assets/Popover.CXyUaXiO.css +1 -0
  19. package/assets/Select.COxLltX7.css +1 -0
  20. package/assets/Slider.DPEmJ3HD.css +1 -0
  21. package/assets/Stepper.tXJl15yL.css +1 -0
  22. package/assets/{SystemFeedback.RcrPepSZ.css → SystemFeedback.PKzqnXUe.css} +1 -1
  23. package/assets/Textarea.y3MW7VW0.css +1 -0
  24. package/assets/Toast.CGyKXb4V.css +1 -0
  25. package/assets/buttonround.BN3vUDc_.css +1 -0
  26. package/assets/input.DTu4g_iA.css +1 -0
  27. package/assets/logo100years.CQrEg-Vo.css +1 -0
  28. package/assets/step.BeLporJO.css +1 -0
  29. package/assets/switch.B9B-n_3y.css +1 -0
  30. package/assets/tooltip.Co1gWF_0.css +1 -0
  31. package/{asterisk.CR60hx8S.js → asterisk.B2ih8VwF.js} +1 -1
  32. package/{banner.j9YpudOS.js → banner.CI5HnDqD.js} +3 -3
  33. package/breadcrumb.CtwAux3P.js +11 -0
  34. package/button.DHuKanZP.js +13 -0
  35. package/buttonround.CMlmEDaN.js +96 -0
  36. package/checkbox.DwccD0Mp.js +12 -0
  37. package/checkboxgroup.ZiUFfCJ1.js +9 -0
  38. package/chip.B0s_fS8L.js +12 -0
  39. package/chipgroup.Dpu66bo5.js +143 -0
  40. package/chunks/Accordion.CYIfNOWr.js +168 -0
  41. package/chunks/ActionButton.DOYsEHPr.js +180 -0
  42. package/chunks/ActionLink.DbyciN3Y.js +153 -0
  43. package/chunks/{AriaLiveRegions.utils.Cb327d_2.js → AriaLiveRegions.utils.CybNIBSa.js} +2 -2
  44. package/chunks/{Breadcrumb.BGzwzvh8.js → Breadcrumb.BgnpTo01.js} +35 -37
  45. package/chunks/Button.DCZgBNmA.js +142 -0
  46. package/chunks/Checkbox.BcGXAuuP.js +88 -0
  47. package/chunks/{CheckboxGroup.Dy_6tiGk.js → CheckboxGroup.BuFd1luB.js} +5 -5
  48. package/chunks/Chip.D6pubCZV.js +133 -0
  49. package/chunks/{CustomReactSelect.iE5iTdez.js → CustomReactSelect.Dg3wC_VH.js} +484 -473
  50. package/chunks/Dialog.DpqSVrYR.js +102 -0
  51. package/chunks/Drawer.DISWybOa.js +107 -0
  52. package/chunks/{Fieldset.CjIfmN_5.js → Fieldset.DiMtr6Vw.js} +6 -6
  53. package/chunks/Header.7TQL_J9t.js +370 -0
  54. package/chunks/Icon.CDLyB7Pv.js +229 -0
  55. package/chunks/{Input.utils.Cnnzvuk4.js → Input.utils.Dkw7gRrr.js} +17 -17
  56. package/chunks/InputFile.C8nt9Fu8.js +218 -0
  57. package/chunks/InputNumber.CbH1XJfl.js +267 -0
  58. package/chunks/{InputPassword.DC2POUc1.js → InputPassword.DbdjuSiJ.js} +34 -34
  59. package/chunks/InputSearch.joxmugiv.js +173 -0
  60. package/chunks/LinkButton.BZgIGgc8.js +132 -0
  61. package/chunks/MegaMenu.CQbOeaib.js +189 -0
  62. package/chunks/NavigationTabList.G_l0GiUa.js +67 -0
  63. package/chunks/{NavigationTabs.ClpVGcl0.js → NavigationTabs.BwM-6CRm.js} +13 -14
  64. package/chunks/Notification.CrojkJ0E.js +91 -0
  65. package/chunks/Popover.Bb0Pjmvg.js +215 -0
  66. package/chunks/{RadioGroup.peTeMK45.js → RadioGroup.CexC4v2Z.js} +5 -5
  67. package/chunks/Select.BEIdNMML.js +164 -0
  68. package/chunks/{Slider.kyVr7BLk.js → Slider.CR0zYHeZ.js} +70 -71
  69. package/chunks/Stepper.PTQdQBYf.js +152 -0
  70. package/chunks/{SystemFeedback.B9f67mjJ.js → SystemFeedback.CjlARKki.js} +9 -9
  71. package/chunks/Tabs.DyP4whX0.js +83 -0
  72. package/chunks/{Text.DGWeWF1y.js → Text.DpRtTpB4.js} +3 -3
  73. package/chunks/Textarea.Du2RII5u.js +168 -0
  74. package/chunks/Toast.ug_RjGgF.js +76 -0
  75. package/chunks/{arrow-clockwise.BefOjGPg.js → arrow-clockwise.C4iOgjOc.js} +1 -1
  76. package/chunks/{arrow-counterclockwise.C7Ov32BZ.js → arrow-counterclockwise.CgQAuBUe.js} +1 -1
  77. package/chunks/battery-charge-0.DxlgEAto.js +10 -0
  78. package/chunks/battery-charge-100.D0Cax7dU.js +10 -0
  79. package/chunks/{battery.YCg9lYqC.js → battery.6Idoickg.js} +3 -3
  80. package/chunks/bluetooth-off.BzZCh4Q8.js +10 -0
  81. package/chunks/{circle-check-colored.Bye_GwLy.js → circle-check-colored.qP2s3vjI.js} +1 -1
  82. package/chunks/{diamond-exclamationmark-colored.WNKYwZ8q.js → diamond-exclamationmark-colored.CzYiaTZ0.js} +1 -1
  83. package/chunks/document-s.CoOp0kBK.js +10 -0
  84. package/chunks/feather.l1E4nFBx.js +10 -0
  85. package/chunks/file-type-doc.B_RSSYbu.js +10 -0
  86. package/chunks/floating-ui.dom.BT8pKtCQ.js +1005 -0
  87. package/chunks/floating-ui.react.3FjeMiuN.js +1999 -0
  88. package/chunks/helpers.CexwVao7.js +38 -0
  89. package/chunks/{index.CgTHIF3K.js → index.D-sRdssb.js} +1 -1
  90. package/chunks/{index.CEyLAtio.js → index.DL9mof6u.js} +2 -2
  91. package/chunks/{is-animation-disabled.CUl4N3LI.js → is-animation-disabled.B-V_68K-.js} +5 -5
  92. package/chunks/{map.CXgG1iGz.js → map.DNl7PF61.js} +1 -1
  93. package/chunks/moon.5yILPYXs.js +10 -0
  94. package/chunks/muscle.DbNjWasV.js +10 -0
  95. package/chunks/petrol.BGWwCsTw.js +10 -0
  96. package/chunks/sun.CY6ttzTL.js +10 -0
  97. package/chunks/{triangle-exclamationmark-colored.CbVC3Gzi.js → triangle-exclamationmark-colored.e93zvQ6Q.js} +1 -1
  98. package/chunks/upload.BogDfonx.js +10 -0
  99. package/chunks/useBreakpoint.BzR_yaIv.js +42 -0
  100. package/chunks/variants.-R3_RCW8.js +10 -0
  101. package/chunks/weight.DUPu2UT0.js +10 -0
  102. package/combobox.jG5GRA7C.js +65 -0
  103. package/components/ActionButton/ActionButton.d.ts +2 -0
  104. package/components/Button/Button.d.ts +4 -0
  105. package/components/ChipGroup/Chip.d.ts +1 -0
  106. package/components/ChipGroup/ChipGroup.d.ts +4 -0
  107. package/components/ChipGroup/ChipGroup.utils.d.ts +10 -12
  108. package/components/Combobox/Combobox.utils.d.ts +3 -4
  109. package/components/Combobox/CustomReactSelect/CustomReactSelect.d.ts +4 -2
  110. package/components/Header/Header.d.ts +4 -5
  111. package/components/{InputStepper/InputStepper.d.ts → InputNumber/InputNumber.d.ts} +10 -4
  112. package/components/InputNumber/InputNumber.utils.d.ts +13 -0
  113. package/components/LinkButton/LinkButton.d.ts +2 -0
  114. package/components/Logo100Years/Logo100Years.d.ts +1 -0
  115. package/components/Popover/Popover.d.ts +29 -7
  116. package/components/Popover/Popover.utils.d.ts +34 -3
  117. package/components/Scroller/Scroller.d.ts +6 -2
  118. package/components/Stepper/Step.d.ts +33 -0
  119. package/components/Stepper/Step.utils.d.ts +5 -0
  120. package/components/Stepper/Stepper.d.ts +56 -0
  121. package/components/Stepper/Stepper.test.d.ts +1 -0
  122. package/components/Stepper/Stepper.utils.d.ts +30 -0
  123. package/components/Stepper/Stepper.utils.test.d.ts +1 -0
  124. package/components/Tooltip/Tooltip.d.ts +40 -0
  125. package/components/Tooltip/Tooltip.test.d.ts +1 -0
  126. package/components/Tooltip/Tooltip.utils.d.ts +70 -0
  127. package/components/Tooltip/Tooltip.utils.test.d.ts +1 -0
  128. package/components/TopBar/TopBar.d.ts +4 -4
  129. package/components/TopBar/TopBar.utils.d.ts +1 -1
  130. package/customreactselect.BFN8cYJi.js +14 -0
  131. package/dialog.CzM_Cxp0.js +9 -0
  132. package/drawer._A9MQ8Cj.js +9 -0
  133. package/fieldset.CId-NtI5.js +11 -0
  134. package/{filelist.nunJKxkv.js → filelist.DgVuWpR3.js} +23 -24
  135. package/{flag.D_iN8iD6.js → flag.CE32qHPa.js} +3 -3
  136. package/floatingactionbutton.Bsnncudt.js +87 -0
  137. package/header.CelAkqtp.js +12 -0
  138. package/{heading.BXFBZhKv.js → heading.DHLpT4dc.js} +2 -2
  139. package/icon.vzkPwgjZ.js +9 -0
  140. package/index.d.ts +4 -2
  141. package/index.es.js +217 -204
  142. package/input.DuEbg7d6.js +206 -0
  143. package/inputfile.BjgJGefV.js +17 -0
  144. package/inputnumber.BcrxBVv0.js +16 -0
  145. package/inputnumber.d.ts +2 -0
  146. package/inputpassword.CddmBW-T.js +13 -0
  147. package/inputsearch.CFOASqrd.js +14 -0
  148. package/link.f8MMZo-w.js +81 -0
  149. package/linkbutton.BYAvi-_V.js +12 -0
  150. package/{logo.C96KaG1P.js → logo.DprmD8HU.js} +3 -3
  151. package/logo100years.B4d_DIiB.js +24 -0
  152. package/logo100years.d.ts +2 -0
  153. package/megamenu.Cy9Cc-mC.js +12 -0
  154. package/navigationtablist.CkkLyHrM.js +10 -0
  155. package/navigationtabs.Dp7D2fnc.js +9 -0
  156. package/notification.B-norGiB.js +10 -0
  157. package/{numberindicator.Ddf3ESi7.js → numberindicator.BdnPMogE.js} +2 -2
  158. package/{optioncheckbox.D97W3zeW.js → optioncheckbox.nBVwGv6c.js} +3 -3
  159. package/package.json +41 -51
  160. package/partials/index.js +58 -52
  161. package/partials/lib/partials.d.ts +1 -1
  162. package/popover.DFVDZY-m.js +12 -0
  163. package/{radio.7_N_alaS.js → radio.DHUfSPai.js} +2 -2
  164. package/radiogroup.DaThoMfq.js +11 -0
  165. package/scroller.Cu7H_VCT.js +98 -0
  166. package/select.CMdKf7tC.js +13 -0
  167. package/{skiptocontent._F-d8y5b.js → skiptocontent.CHVh0hbr.js} +4 -4
  168. package/slider.C5dK6KcG.js +11 -0
  169. package/{spinner.Dht6FspZ.js → spinner.C9qCeq0R.js} +18 -18
  170. package/step.DKf4CHGr.js +82 -0
  171. package/step.d.ts +6 -0
  172. package/stepper.CCP_igpJ.js +16 -0
  173. package/stepper.d.ts +2 -0
  174. package/{switch.B37S4vfP.js → switch.Bqdyzi2E.js} +5 -5
  175. package/systemfeedback.O7tj1juR.js +10 -0
  176. package/tablist.DZgo49nZ.js +209 -0
  177. package/{tabpane.CB-eudyw.js → tabpane.C4nsUlwc.js} +2 -2
  178. package/tabs.BkoT7feH.js +11 -0
  179. package/text.cLv2PhjQ.js +10 -0
  180. package/textarea.DMn20z4p.js +13 -0
  181. package/{title.Bz_k5Vda.js → title.DuLPB-VK.js} +2 -2
  182. package/toast.Dvs8woTH.js +11 -0
  183. package/toastmanager.pi_Fhd5t.js +89 -0
  184. package/tooltip.QJe_bfO-.js +178 -0
  185. package/tooltip.d.ts +2 -0
  186. package/topbar.Bxwvp9Lf.js +12 -0
  187. package/types/icon-types.d.ts +1 -1
  188. package/types/prettier-plugin-organize-imports.d.ts +1 -0
  189. package/utils/index.d.ts +1 -0
  190. package/utils/mergeRefs.d.ts +5 -0
  191. package/utils/mergeRefs.test.d.ts +1 -0
  192. package/accordion.DkwtJy--.js +0 -12
  193. package/actionbutton.u1qp8oGC.js +0 -11
  194. package/actionlink.C7HzeIVa.js +0 -11
  195. package/assets/Accordion.BJb4TOG0.css +0 -1
  196. package/assets/Button.Dw8H5nFS.css +0 -1
  197. package/assets/Checkbox.BKHQN_tu.css +0 -1
  198. package/assets/CustomReactSelect.D0b1Hg1T.css +0 -1
  199. package/assets/Dialog.CGAg7bnN.css +0 -1
  200. package/assets/Drawer.VOvWQoEr.css +0 -1
  201. package/assets/InputFile.CCQxsulT.css +0 -1
  202. package/assets/InputPassword.124xVOiO.css +0 -1
  203. package/assets/InputSearch.Bkg-1urJ.css +0 -1
  204. package/assets/InputStepper.Dth4qZN_.css +0 -1
  205. package/assets/LinkButton.xMvg_ojf.css +0 -1
  206. package/assets/Notification.BOuaA5GT.css +0 -1
  207. package/assets/Popover.BDTDsPAt.css +0 -1
  208. package/assets/Select.CYACicZ3.css +0 -1
  209. package/assets/Slider.DzwSjDPV.css +0 -1
  210. package/assets/Textarea.BXWhXpXx.css +0 -1
  211. package/assets/Toast.CJ1zhDIT.css +0 -1
  212. package/assets/buttonround.Cw9hnUan.css +0 -1
  213. package/assets/input.ONbL-_C1.css +0 -1
  214. package/assets/switch.Bc9KIyw9.css +0 -1
  215. package/breadcrumb.BS-S3zUI.js +0 -11
  216. package/button.CPilCCUI.js +0 -12
  217. package/buttonround.C426mO4d.js +0 -81
  218. package/checkbox.BtlUvs0z.js +0 -12
  219. package/checkboxgroup.C5NgyyQF.js +0 -9
  220. package/chip.tVIG1ysH.js +0 -11
  221. package/chipgroup.CjIK0Z0x.js +0 -209
  222. package/chunks/Accordion.C5V5IcM-.js +0 -170
  223. package/chunks/ActionButton.B8zFwOrJ.js +0 -165
  224. package/chunks/ActionLink.IX6oRXU3.js +0 -138
  225. package/chunks/Button.B7xF1E19.js +0 -127
  226. package/chunks/Checkbox.DxV7-F5W.js +0 -88
  227. package/chunks/Chip.31UfPwQF.js +0 -119
  228. package/chunks/Dialog.B_2pKRnd.js +0 -135
  229. package/chunks/Drawer.HFlBTcqN.js +0 -140
  230. package/chunks/Header.DqZRryB5.js +0 -366
  231. package/chunks/Icon.DGTYCv63.js +0 -231
  232. package/chunks/InputFile.DvOatDzg.js +0 -220
  233. package/chunks/InputSearch.B0aCuPRZ.js +0 -174
  234. package/chunks/InputStepper.D_1YqlWl.js +0 -263
  235. package/chunks/LinkButton.DdTspmJz.js +0 -117
  236. package/chunks/MegaMenu.BY7eOnhj.js +0 -189
  237. package/chunks/NavigationTabList.dYFYTmWv.js +0 -57
  238. package/chunks/Notification.DIdIhGTQ.js +0 -92
  239. package/chunks/Popover.NGetxKGg.js +0 -159
  240. package/chunks/Select.BDHLJ2ma.js +0 -162
  241. package/chunks/Tabs.CkVL8Jw8.js +0 -83
  242. package/chunks/Textarea.ORkJUx-S.js +0 -163
  243. package/chunks/Toast.DHo4pLH3.js +0 -76
  244. package/chunks/file-type-doc.DlovDOBh.js +0 -10
  245. package/chunks/floating-ui.dom.C9TD1WpB.js +0 -950
  246. package/chunks/floating-ui.react.x0F9CYgn.js +0 -1637
  247. package/chunks/helpers.BbWkXTr3.js +0 -37
  248. package/chunks/petrol.Du6qAgp0.js +0 -10
  249. package/chunks/upload.ZImTAIgx.js +0 -10
  250. package/chunks/useBreakpoint.CMOR9ZOB.js +0 -44
  251. package/combobox.Bk2ycofh.js +0 -60
  252. package/components/InputStepper/InputStepper.utils.d.ts +0 -12
  253. package/customreactselect.Hnch9LGg.js +0 -14
  254. package/dialog.7sWoqGwL.js +0 -10
  255. package/drawer.DsF4KIPn.js +0 -10
  256. package/fieldset.DUFUMcT-.js +0 -11
  257. package/floatingactionbutton.DOH2k0gv.js +0 -72
  258. package/header.QpNjE3N-.js +0 -12
  259. package/icon.vMQcEBnH.js +0 -9
  260. package/input.BKHOY118.js +0 -203
  261. package/inputfile.DK8759wV.js +0 -17
  262. package/inputpassword.rV_ZZw5F.js +0 -13
  263. package/inputsearch.CmhakTpa.js +0 -14
  264. package/inputstepper.Y-YzUHhF.js +0 -16
  265. package/inputstepper.d.ts +0 -2
  266. package/link.D_FjTyoZ.js +0 -66
  267. package/linkbutton.D2C4vykc.js +0 -11
  268. package/megamenu.CdHrEeoh.js +0 -12
  269. package/navigationtablist.CVjh1k-b.js +0 -9
  270. package/navigationtabs.BGfi9AG2.js +0 -9
  271. package/notification.Dn-FZWEL.js +0 -10
  272. package/popover.DXxm1oWI.js +0 -11
  273. package/radiogroup.J8WpEEo8.js +0 -11
  274. package/scroller.BiRLQg__.js +0 -123
  275. package/select.DIzGPVx3.js +0 -13
  276. package/slider.DuJK0RdB.js +0 -11
  277. package/systemfeedback.C_2PhwKe.js +0 -10
  278. package/tablist.g_Nwu6GA.js +0 -256
  279. package/tabs.oh9-wHPp.js +0 -11
  280. package/text.ZOUuesnU.js +0 -10
  281. package/textarea.dQ12-oYB.js +0 -13
  282. package/toast.sMNbfKxi.js +0 -11
  283. package/toastmanager.CVamaS5T.js +0 -116
  284. package/topbar.Dhy_TL0U.js +0 -11
  285. /package/components/{InputStepper/InputStepper.test.d.ts → InputNumber/InputNumber.test.d.ts} +0 -0
  286. /package/components/{InputStepper/InputStepper.utils.test.d.ts → InputNumber/InputNumberutils.test.d.ts} +0 -0
@@ -1,950 +0,0 @@
1
- "use client";
2
- const U = Math.min, F = Math.max, K = Math.round, X = Math.floor, C = (t) => ({
3
- x: t,
4
- y: t
5
- }), Pt = {
6
- left: "right",
7
- right: "left",
8
- bottom: "top",
9
- top: "bottom"
10
- }, Bt = {
11
- start: "end",
12
- end: "start"
13
- };
14
- function gt(t, e, n) {
15
- return F(t, U(e, n));
16
- }
17
- function Q(t, e) {
18
- return typeof t == "function" ? t(e) : t;
19
- }
20
- function P(t) {
21
- return t.split("-")[0];
22
- }
23
- function Z(t) {
24
- return t.split("-")[1];
25
- }
26
- function vt(t) {
27
- return t === "x" ? "y" : "x";
28
- }
29
- function bt(t) {
30
- return t === "y" ? "height" : "width";
31
- }
32
- function W(t) {
33
- return ["top", "bottom"].includes(P(t)) ? "y" : "x";
34
- }
35
- function At(t) {
36
- return vt(W(t));
37
- }
38
- function Mt(t, e, n) {
39
- n === void 0 && (n = !1);
40
- const o = Z(t), i = At(t), r = bt(i);
41
- let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
42
- return e.reference[r] > e.floating[r] && (s = G(s)), [s, G(s)];
43
- }
44
- function Nt(t) {
45
- const e = G(t);
46
- return [st(t), e, st(e)];
47
- }
48
- function st(t) {
49
- return t.replace(/start|end/g, (e) => Bt[e]);
50
- }
51
- function Vt(t, e, n) {
52
- const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
53
- switch (t) {
54
- case "top":
55
- case "bottom":
56
- return n ? e ? i : o : e ? o : i;
57
- case "left":
58
- case "right":
59
- return e ? r : s;
60
- default:
61
- return [];
62
- }
63
- }
64
- function Wt(t, e, n, o) {
65
- const i = Z(t);
66
- let r = Vt(P(t), n === "start", o);
67
- return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(st)))), r;
68
- }
69
- function G(t) {
70
- return t.replace(/left|right|bottom|top/g, (e) => Pt[e]);
71
- }
72
- function Ht(t) {
73
- return {
74
- top: 0,
75
- right: 0,
76
- bottom: 0,
77
- left: 0,
78
- ...t
79
- };
80
- }
81
- function $t(t) {
82
- return typeof t != "number" ? Ht(t) : {
83
- top: t,
84
- right: t,
85
- bottom: t,
86
- left: t
87
- };
88
- }
89
- function J(t) {
90
- const {
91
- x: e,
92
- y: n,
93
- width: o,
94
- height: i
95
- } = t;
96
- return {
97
- width: o,
98
- height: i,
99
- top: n,
100
- left: e,
101
- right: e + o,
102
- bottom: n + i,
103
- x: e,
104
- y: n
105
- };
106
- }
107
- function pt(t, e, n) {
108
- let {
109
- reference: o,
110
- floating: i
111
- } = t;
112
- const r = W(e), s = At(e), c = bt(s), l = P(e), f = r === "y", d = o.x + o.width / 2 - i.width / 2, a = o.y + o.height / 2 - i.height / 2, m = o[c] / 2 - i[c] / 2;
113
- let u;
114
- switch (l) {
115
- case "top":
116
- u = {
117
- x: d,
118
- y: o.y - i.height
119
- };
120
- break;
121
- case "bottom":
122
- u = {
123
- x: d,
124
- y: o.y + o.height
125
- };
126
- break;
127
- case "right":
128
- u = {
129
- x: o.x + o.width,
130
- y: a
131
- };
132
- break;
133
- case "left":
134
- u = {
135
- x: o.x - i.width,
136
- y: a
137
- };
138
- break;
139
- default:
140
- u = {
141
- x: o.x,
142
- y: o.y
143
- };
144
- }
145
- switch (Z(e)) {
146
- case "start":
147
- u[s] -= m * (n && f ? -1 : 1);
148
- break;
149
- case "end":
150
- u[s] += m * (n && f ? -1 : 1);
151
- break;
152
- }
153
- return u;
154
- }
155
- const _t = async (t, e, n) => {
156
- const {
157
- placement: o = "bottom",
158
- strategy: i = "absolute",
159
- middleware: r = [],
160
- platform: s
161
- } = n, c = r.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(e));
162
- let f = await s.getElementRects({
163
- reference: t,
164
- floating: e,
165
- strategy: i
166
- }), {
167
- x: d,
168
- y: a
169
- } = pt(f, o, l), m = o, u = {}, h = 0;
170
- for (let p = 0; p < c.length; p++) {
171
- const {
172
- name: w,
173
- fn: g
174
- } = c[p], {
175
- x,
176
- y,
177
- data: b,
178
- reset: v
179
- } = await g({
180
- x: d,
181
- y: a,
182
- initialPlacement: o,
183
- placement: m,
184
- strategy: i,
185
- middlewareData: u,
186
- rects: f,
187
- platform: s,
188
- elements: {
189
- reference: t,
190
- floating: e
191
- }
192
- });
193
- d = x ?? d, a = y ?? a, u = {
194
- ...u,
195
- [w]: {
196
- ...u[w],
197
- ...b
198
- }
199
- }, v && h <= 50 && (h++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (f = v.rects === !0 ? await s.getElementRects({
200
- reference: t,
201
- floating: e,
202
- strategy: i
203
- }) : v.rects), {
204
- x: d,
205
- y: a
206
- } = pt(f, m, l)), p = -1);
207
- }
208
- return {
209
- x: d,
210
- y: a,
211
- placement: m,
212
- strategy: i,
213
- middlewareData: u
214
- };
215
- };
216
- async function Rt(t, e) {
217
- var n;
218
- e === void 0 && (e = {});
219
- const {
220
- x: o,
221
- y: i,
222
- platform: r,
223
- rects: s,
224
- elements: c,
225
- strategy: l
226
- } = t, {
227
- boundary: f = "clippingAncestors",
228
- rootBoundary: d = "viewport",
229
- elementContext: a = "floating",
230
- altBoundary: m = !1,
231
- padding: u = 0
232
- } = Q(e, t), h = $t(u), w = c[m ? a === "floating" ? "reference" : "floating" : a], g = J(await r.getClippingRect({
233
- element: (n = await (r.isElement == null ? void 0 : r.isElement(w))) == null || n ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
234
- boundary: f,
235
- rootBoundary: d,
236
- strategy: l
237
- })), x = a === "floating" ? {
238
- x: o,
239
- y: i,
240
- width: s.floating.width,
241
- height: s.floating.height
242
- } : s.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), b = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
243
- x: 1,
244
- y: 1
245
- } : {
246
- x: 1,
247
- y: 1
248
- }, v = J(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
249
- elements: c,
250
- rect: x,
251
- offsetParent: y,
252
- strategy: l
253
- }) : x);
254
- return {
255
- top: (g.top - v.top + h.top) / b.y,
256
- bottom: (v.bottom - g.bottom + h.bottom) / b.y,
257
- left: (g.left - v.left + h.left) / b.x,
258
- right: (v.right - g.right + h.right) / b.x
259
- };
260
- }
261
- const zt = function(t) {
262
- return t === void 0 && (t = {}), {
263
- name: "flip",
264
- options: t,
265
- async fn(e) {
266
- var n, o;
267
- const {
268
- placement: i,
269
- middlewareData: r,
270
- rects: s,
271
- initialPlacement: c,
272
- platform: l,
273
- elements: f
274
- } = e, {
275
- mainAxis: d = !0,
276
- crossAxis: a = !0,
277
- fallbackPlacements: m,
278
- fallbackStrategy: u = "bestFit",
279
- fallbackAxisSideDirection: h = "none",
280
- flipAlignment: p = !0,
281
- ...w
282
- } = Q(t, e);
283
- if ((n = r.arrow) != null && n.alignmentOffset)
284
- return {};
285
- const g = P(i), x = W(c), y = P(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(f.floating)), v = m || (y || !p ? [G(c)] : Nt(c)), _ = h !== "none";
286
- !m && _ && v.push(...Wt(c, p, h, b));
287
- const M = [c, ...v], ot = await Rt(e, w), q = [];
288
- let z = ((o = r.flip) == null ? void 0 : o.overflows) || [];
289
- if (d && q.push(ot[g]), a) {
290
- const k = Mt(i, s, b);
291
- q.push(ot[k[0]], ot[k[1]]);
292
- }
293
- if (z = [...z, {
294
- placement: i,
295
- overflows: q
296
- }], !q.every((k) => k <= 0)) {
297
- var ut, dt;
298
- const k = (((ut = r.flip) == null ? void 0 : ut.index) || 0) + 1, ht = M[k];
299
- if (ht)
300
- return {
301
- data: {
302
- index: k,
303
- overflows: z
304
- },
305
- reset: {
306
- placement: ht
307
- }
308
- };
309
- let I = (dt = z.filter((N) => N.overflows[0] <= 0).sort((N, L) => N.overflows[1] - L.overflows[1])[0]) == null ? void 0 : dt.placement;
310
- if (!I)
311
- switch (u) {
312
- case "bestFit": {
313
- var mt;
314
- const N = (mt = z.filter((L) => {
315
- if (_) {
316
- const S = W(L.placement);
317
- return S === x || // Create a bias to the `y` side axis due to horizontal
318
- // reading directions favoring greater width.
319
- S === "y";
320
- }
321
- return !0;
322
- }).map((L) => [L.placement, L.overflows.filter((S) => S > 0).reduce((S, Ft) => S + Ft, 0)]).sort((L, S) => L[1] - S[1])[0]) == null ? void 0 : mt[0];
323
- N && (I = N);
324
- break;
325
- }
326
- case "initialPlacement":
327
- I = c;
328
- break;
329
- }
330
- if (i !== I)
331
- return {
332
- reset: {
333
- placement: I
334
- }
335
- };
336
- }
337
- return {};
338
- }
339
- };
340
- };
341
- async function It(t, e) {
342
- const {
343
- placement: n,
344
- platform: o,
345
- elements: i
346
- } = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = P(n), c = Z(n), l = W(n) === "y", f = ["left", "top"].includes(s) ? -1 : 1, d = r && l ? -1 : 1, a = Q(e, t);
347
- let {
348
- mainAxis: m,
349
- crossAxis: u,
350
- alignmentAxis: h
351
- } = typeof a == "number" ? {
352
- mainAxis: a,
353
- crossAxis: 0,
354
- alignmentAxis: null
355
- } : {
356
- mainAxis: a.mainAxis || 0,
357
- crossAxis: a.crossAxis || 0,
358
- alignmentAxis: a.alignmentAxis
359
- };
360
- return c && typeof h == "number" && (u = c === "end" ? h * -1 : h), l ? {
361
- x: u * d,
362
- y: m * f
363
- } : {
364
- x: m * f,
365
- y: u * d
366
- };
367
- }
368
- const jt = function(t) {
369
- return t === void 0 && (t = 0), {
370
- name: "offset",
371
- options: t,
372
- async fn(e) {
373
- var n, o;
374
- const {
375
- x: i,
376
- y: r,
377
- placement: s,
378
- middlewareData: c
379
- } = e, l = await It(e, t);
380
- return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
381
- x: i + l.x,
382
- y: r + l.y,
383
- data: {
384
- ...l,
385
- placement: s
386
- }
387
- };
388
- }
389
- };
390
- }, Yt = function(t) {
391
- return t === void 0 && (t = {}), {
392
- name: "shift",
393
- options: t,
394
- async fn(e) {
395
- const {
396
- x: n,
397
- y: o,
398
- placement: i
399
- } = e, {
400
- mainAxis: r = !0,
401
- crossAxis: s = !1,
402
- limiter: c = {
403
- fn: (w) => {
404
- let {
405
- x: g,
406
- y: x
407
- } = w;
408
- return {
409
- x: g,
410
- y: x
411
- };
412
- }
413
- },
414
- ...l
415
- } = Q(t, e), f = {
416
- x: n,
417
- y: o
418
- }, d = await Rt(e, l), a = W(P(i)), m = vt(a);
419
- let u = f[m], h = f[a];
420
- if (r) {
421
- const w = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", x = u + d[w], y = u - d[g];
422
- u = gt(x, u, y);
423
- }
424
- if (s) {
425
- const w = a === "y" ? "top" : "left", g = a === "y" ? "bottom" : "right", x = h + d[w], y = h - d[g];
426
- h = gt(x, h, y);
427
- }
428
- const p = c.fn({
429
- ...e,
430
- [m]: u,
431
- [a]: h
432
- });
433
- return {
434
- ...p,
435
- data: {
436
- x: p.x - n,
437
- y: p.y - o,
438
- enabled: {
439
- [m]: r,
440
- [a]: s
441
- }
442
- }
443
- };
444
- }
445
- };
446
- };
447
- function tt() {
448
- return typeof window < "u";
449
- }
450
- function $(t) {
451
- return Ot(t) ? (t.nodeName || "").toLowerCase() : "#document";
452
- }
453
- function A(t) {
454
- var e;
455
- return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
456
- }
457
- function T(t) {
458
- var e;
459
- return (e = (Ot(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
460
- }
461
- function Ot(t) {
462
- return tt() ? t instanceof Node || t instanceof A(t).Node : !1;
463
- }
464
- function R(t) {
465
- return tt() ? t instanceof Element || t instanceof A(t).Element : !1;
466
- }
467
- function E(t) {
468
- return tt() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
469
- }
470
- function wt(t) {
471
- return !tt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
472
- }
473
- function Y(t) {
474
- const {
475
- overflow: e,
476
- overflowX: n,
477
- overflowY: o,
478
- display: i
479
- } = O(t);
480
- return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(i);
481
- }
482
- function qt(t) {
483
- return ["table", "td", "th"].includes($(t));
484
- }
485
- function et(t) {
486
- return [":popover-open", ":modal"].some((e) => {
487
- try {
488
- return t.matches(e);
489
- } catch {
490
- return !1;
491
- }
492
- });
493
- }
494
- function ct(t) {
495
- const e = lt(), n = R(t) ? O(t) : t;
496
- return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
497
- }
498
- function Xt(t) {
499
- let e = D(t);
500
- for (; E(e) && !H(e); ) {
501
- if (ct(e))
502
- return e;
503
- if (et(e))
504
- return null;
505
- e = D(e);
506
- }
507
- return null;
508
- }
509
- function lt() {
510
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
511
- }
512
- function H(t) {
513
- return ["html", "body", "#document"].includes($(t));
514
- }
515
- function O(t) {
516
- return A(t).getComputedStyle(t);
517
- }
518
- function nt(t) {
519
- return R(t) ? {
520
- scrollLeft: t.scrollLeft,
521
- scrollTop: t.scrollTop
522
- } : {
523
- scrollLeft: t.scrollX,
524
- scrollTop: t.scrollY
525
- };
526
- }
527
- function D(t) {
528
- if ($(t) === "html")
529
- return t;
530
- const e = (
531
- // Step into the shadow DOM of the parent of a slotted node.
532
- t.assignedSlot || // DOM Element detected.
533
- t.parentNode || // ShadowRoot detected.
534
- wt(t) && t.host || // Fallback.
535
- T(t)
536
- );
537
- return wt(e) ? e.host : e;
538
- }
539
- function Ct(t) {
540
- const e = D(t);
541
- return H(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : E(e) && Y(e) ? e : Ct(e);
542
- }
543
- function j(t, e, n) {
544
- var o;
545
- e === void 0 && (e = []), n === void 0 && (n = !0);
546
- const i = Ct(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(i);
547
- if (r) {
548
- const c = rt(s);
549
- return e.concat(s, s.visualViewport || [], Y(i) ? i : [], c && n ? j(c) : []);
550
- }
551
- return e.concat(i, j(i, [], n));
552
- }
553
- function rt(t) {
554
- return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
555
- }
556
- function Et(t) {
557
- const e = O(t);
558
- let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
559
- const i = E(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, c = K(n) !== r || K(o) !== s;
560
- return c && (n = r, o = s), {
561
- width: n,
562
- height: o,
563
- $: c
564
- };
565
- }
566
- function ft(t) {
567
- return R(t) ? t : t.contextElement;
568
- }
569
- function V(t) {
570
- const e = ft(t);
571
- if (!E(e))
572
- return C(1);
573
- const n = e.getBoundingClientRect(), {
574
- width: o,
575
- height: i,
576
- $: r
577
- } = Et(e);
578
- let s = (r ? K(n.width) : n.width) / o, c = (r ? K(n.height) : n.height) / i;
579
- return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
580
- x: s,
581
- y: c
582
- };
583
- }
584
- const Ut = /* @__PURE__ */ C(0);
585
- function Tt(t) {
586
- const e = A(t);
587
- return !lt() || !e.visualViewport ? Ut : {
588
- x: e.visualViewport.offsetLeft,
589
- y: e.visualViewport.offsetTop
590
- };
591
- }
592
- function Kt(t, e, n) {
593
- return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
594
- }
595
- function B(t, e, n, o) {
596
- e === void 0 && (e = !1), n === void 0 && (n = !1);
597
- const i = t.getBoundingClientRect(), r = ft(t);
598
- let s = C(1);
599
- e && (o ? R(o) && (s = V(o)) : s = V(t));
600
- const c = Kt(r, n, o) ? Tt(r) : C(0);
601
- let l = (i.left + c.x) / s.x, f = (i.top + c.y) / s.y, d = i.width / s.x, a = i.height / s.y;
602
- if (r) {
603
- const m = A(r), u = o && R(o) ? A(o) : o;
604
- let h = m, p = rt(h);
605
- for (; p && o && u !== h; ) {
606
- const w = V(p), g = p.getBoundingClientRect(), x = O(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
607
- l *= w.x, f *= w.y, d *= w.x, a *= w.y, l += y, f += b, h = A(p), p = rt(h);
608
- }
609
- }
610
- return J({
611
- width: d,
612
- height: a,
613
- x: l,
614
- y: f
615
- });
616
- }
617
- function at(t, e) {
618
- const n = nt(t).scrollLeft;
619
- return e ? e.left + n : B(T(t)).left + n;
620
- }
621
- function Lt(t, e, n) {
622
- n === void 0 && (n = !1);
623
- const o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - (n ? 0 : (
624
- // RTL <body> scrollbar.
625
- at(t, o)
626
- )), r = o.top + e.scrollTop;
627
- return {
628
- x: i,
629
- y: r
630
- };
631
- }
632
- function Gt(t) {
633
- let {
634
- elements: e,
635
- rect: n,
636
- offsetParent: o,
637
- strategy: i
638
- } = t;
639
- const r = i === "fixed", s = T(o), c = e ? et(e.floating) : !1;
640
- if (o === s || c && r)
641
- return n;
642
- let l = {
643
- scrollLeft: 0,
644
- scrollTop: 0
645
- }, f = C(1);
646
- const d = C(0), a = E(o);
647
- if ((a || !a && !r) && (($(o) !== "body" || Y(s)) && (l = nt(o)), E(o))) {
648
- const u = B(o);
649
- f = V(o), d.x = u.x + o.clientLeft, d.y = u.y + o.clientTop;
650
- }
651
- const m = s && !a && !r ? Lt(s, l, !0) : C(0);
652
- return {
653
- width: n.width * f.x,
654
- height: n.height * f.y,
655
- x: n.x * f.x - l.scrollLeft * f.x + d.x + m.x,
656
- y: n.y * f.y - l.scrollTop * f.y + d.y + m.y
657
- };
658
- }
659
- function Jt(t) {
660
- return Array.from(t.getClientRects());
661
- }
662
- function Qt(t) {
663
- const e = T(t), n = nt(t), o = t.ownerDocument.body, i = F(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = F(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
664
- let s = -n.scrollLeft + at(t);
665
- const c = -n.scrollTop;
666
- return O(o).direction === "rtl" && (s += F(e.clientWidth, o.clientWidth) - i), {
667
- width: i,
668
- height: r,
669
- x: s,
670
- y: c
671
- };
672
- }
673
- function Zt(t, e) {
674
- const n = A(t), o = T(t), i = n.visualViewport;
675
- let r = o.clientWidth, s = o.clientHeight, c = 0, l = 0;
676
- if (i) {
677
- r = i.width, s = i.height;
678
- const f = lt();
679
- (!f || f && e === "fixed") && (c = i.offsetLeft, l = i.offsetTop);
680
- }
681
- return {
682
- width: r,
683
- height: s,
684
- x: c,
685
- y: l
686
- };
687
- }
688
- function te(t, e) {
689
- const n = B(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = E(t) ? V(t) : C(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = i * r.x, f = o * r.y;
690
- return {
691
- width: s,
692
- height: c,
693
- x: l,
694
- y: f
695
- };
696
- }
697
- function xt(t, e, n) {
698
- let o;
699
- if (e === "viewport")
700
- o = Zt(t, n);
701
- else if (e === "document")
702
- o = Qt(T(t));
703
- else if (R(e))
704
- o = te(e, n);
705
- else {
706
- const i = Tt(t);
707
- o = {
708
- x: e.x - i.x,
709
- y: e.y - i.y,
710
- width: e.width,
711
- height: e.height
712
- };
713
- }
714
- return J(o);
715
- }
716
- function St(t, e) {
717
- const n = D(t);
718
- return n === e || !R(n) || H(n) ? !1 : O(n).position === "fixed" || St(n, e);
719
- }
720
- function ee(t, e) {
721
- const n = e.get(t);
722
- if (n)
723
- return n;
724
- let o = j(t, [], !1).filter((c) => R(c) && $(c) !== "body"), i = null;
725
- const r = O(t).position === "fixed";
726
- let s = r ? D(t) : t;
727
- for (; R(s) && !H(s); ) {
728
- const c = O(s), l = ct(s);
729
- !l && c.position === "fixed" && (i = null), (r ? !l && !i : !l && c.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Y(s) && !l && St(t, s)) ? o = o.filter((d) => d !== s) : i = c, s = D(s);
730
- }
731
- return e.set(t, o), o;
732
- }
733
- function ne(t) {
734
- let {
735
- element: e,
736
- boundary: n,
737
- rootBoundary: o,
738
- strategy: i
739
- } = t;
740
- const s = [...n === "clippingAncestors" ? et(e) ? [] : ee(e, this._c) : [].concat(n), o], c = s[0], l = s.reduce((f, d) => {
741
- const a = xt(e, d, i);
742
- return f.top = F(a.top, f.top), f.right = U(a.right, f.right), f.bottom = U(a.bottom, f.bottom), f.left = F(a.left, f.left), f;
743
- }, xt(e, c, i));
744
- return {
745
- width: l.right - l.left,
746
- height: l.bottom - l.top,
747
- x: l.left,
748
- y: l.top
749
- };
750
- }
751
- function oe(t) {
752
- const {
753
- width: e,
754
- height: n
755
- } = Et(t);
756
- return {
757
- width: e,
758
- height: n
759
- };
760
- }
761
- function ie(t, e, n) {
762
- const o = E(e), i = T(e), r = n === "fixed", s = B(t, !0, r, e);
763
- let c = {
764
- scrollLeft: 0,
765
- scrollTop: 0
766
- };
767
- const l = C(0);
768
- if (o || !o && !r)
769
- if (($(e) !== "body" || Y(i)) && (c = nt(e)), o) {
770
- const m = B(e, !0, r, e);
771
- l.x = m.x + e.clientLeft, l.y = m.y + e.clientTop;
772
- } else i && (l.x = at(i));
773
- const f = i && !o && !r ? Lt(i, c) : C(0), d = s.left + c.scrollLeft - l.x - f.x, a = s.top + c.scrollTop - l.y - f.y;
774
- return {
775
- x: d,
776
- y: a,
777
- width: s.width,
778
- height: s.height
779
- };
780
- }
781
- function it(t) {
782
- return O(t).position === "static";
783
- }
784
- function yt(t, e) {
785
- if (!E(t) || O(t).position === "fixed")
786
- return null;
787
- if (e)
788
- return e(t);
789
- let n = t.offsetParent;
790
- return T(t) === n && (n = n.ownerDocument.body), n;
791
- }
792
- function Dt(t, e) {
793
- const n = A(t);
794
- if (et(t))
795
- return n;
796
- if (!E(t)) {
797
- let i = D(t);
798
- for (; i && !H(i); ) {
799
- if (R(i) && !it(i))
800
- return i;
801
- i = D(i);
802
- }
803
- return n;
804
- }
805
- let o = yt(t, e);
806
- for (; o && qt(o) && it(o); )
807
- o = yt(o, e);
808
- return o && H(o) && it(o) && !ct(o) ? n : o || Xt(t) || n;
809
- }
810
- const se = async function(t) {
811
- const e = this.getOffsetParent || Dt, n = this.getDimensions, o = await n(t.floating);
812
- return {
813
- reference: ie(t.reference, await e(t.floating), t.strategy),
814
- floating: {
815
- x: 0,
816
- y: 0,
817
- width: o.width,
818
- height: o.height
819
- }
820
- };
821
- };
822
- function re(t) {
823
- return O(t).direction === "rtl";
824
- }
825
- const ce = {
826
- convertOffsetParentRelativeRectToViewportRelativeRect: Gt,
827
- getDocumentElement: T,
828
- getClippingRect: ne,
829
- getOffsetParent: Dt,
830
- getElementRects: se,
831
- getClientRects: Jt,
832
- getDimensions: oe,
833
- getScale: V,
834
- isElement: R,
835
- isRTL: re
836
- };
837
- function kt(t, e) {
838
- return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
839
- }
840
- function le(t, e) {
841
- let n = null, o;
842
- const i = T(t);
843
- function r() {
844
- var c;
845
- clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
846
- }
847
- function s(c, l) {
848
- c === void 0 && (c = !1), l === void 0 && (l = 1), r();
849
- const f = t.getBoundingClientRect(), {
850
- left: d,
851
- top: a,
852
- width: m,
853
- height: u
854
- } = f;
855
- if (c || e(), !m || !u)
856
- return;
857
- const h = X(a), p = X(i.clientWidth - (d + m)), w = X(i.clientHeight - (a + u)), g = X(d), y = {
858
- rootMargin: -h + "px " + -p + "px " + -w + "px " + -g + "px",
859
- threshold: F(0, U(1, l)) || 1
860
- };
861
- let b = !0;
862
- function v(_) {
863
- const M = _[0].intersectionRatio;
864
- if (M !== l) {
865
- if (!b)
866
- return s();
867
- M ? s(!1, M) : o = setTimeout(() => {
868
- s(!1, 1e-7);
869
- }, 1e3);
870
- }
871
- M === 1 && !kt(f, t.getBoundingClientRect()) && s(), b = !1;
872
- }
873
- try {
874
- n = new IntersectionObserver(v, {
875
- ...y,
876
- // Handle <iframe>s
877
- root: i.ownerDocument
878
- });
879
- } catch {
880
- n = new IntersectionObserver(v, y);
881
- }
882
- n.observe(t);
883
- }
884
- return s(!0), r;
885
- }
886
- function fe(t, e, n, o) {
887
- o === void 0 && (o = {});
888
- const {
889
- ancestorScroll: i = !0,
890
- ancestorResize: r = !0,
891
- elementResize: s = typeof ResizeObserver == "function",
892
- layoutShift: c = typeof IntersectionObserver == "function",
893
- animationFrame: l = !1
894
- } = o, f = ft(t), d = i || r ? [...f ? j(f) : [], ...j(e)] : [];
895
- d.forEach((g) => {
896
- i && g.addEventListener("scroll", n, {
897
- passive: !0
898
- }), r && g.addEventListener("resize", n);
899
- });
900
- const a = f && c ? le(f, n) : null;
901
- let m = -1, u = null;
902
- s && (u = new ResizeObserver((g) => {
903
- let [x] = g;
904
- x && x.target === f && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
905
- var y;
906
- (y = u) == null || y.observe(e);
907
- })), n();
908
- }), f && !l && u.observe(f), u.observe(e));
909
- let h, p = l ? B(t) : null;
910
- l && w();
911
- function w() {
912
- const g = B(t);
913
- p && !kt(p, g) && n(), p = g, h = requestAnimationFrame(w);
914
- }
915
- return n(), () => {
916
- var g;
917
- d.forEach((x) => {
918
- i && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
919
- }), a == null || a(), (g = u) == null || g.disconnect(), u = null, l && cancelAnimationFrame(h);
920
- };
921
- }
922
- const ae = jt, ue = Yt, de = zt, me = (t, e, n) => {
923
- const o = /* @__PURE__ */ new Map(), i = {
924
- platform: ce,
925
- ...n
926
- }, r = {
927
- ...i.platform,
928
- _c: o
929
- };
930
- return _t(t, e, {
931
- ...i,
932
- platform: r
933
- });
934
- };
935
- export {
936
- fe as a,
937
- E as b,
938
- me as c,
939
- R as d,
940
- H as e,
941
- de as f,
942
- $ as g,
943
- D as h,
944
- wt as i,
945
- O as j,
946
- j as k,
947
- lt as l,
948
- ae as o,
949
- ue as s
950
- };