@cfxjs/sirius-next-common 0.1.26 → 0.1.28

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 (307) hide show
  1. package/dist/chunk-24MUZRQJ.js +108 -0
  2. package/dist/chunk-24MUZRQJ.js.map +1 -0
  3. package/dist/chunk-24Z2NTKQ.js +43 -0
  4. package/dist/chunk-24Z2NTKQ.js.map +1 -0
  5. package/dist/chunk-26ABIFHL.js +127 -0
  6. package/dist/chunk-26ABIFHL.js.map +1 -0
  7. package/dist/chunk-27S75HVO.js +108 -0
  8. package/dist/chunk-27S75HVO.js.map +1 -0
  9. package/dist/chunk-2ATI4GSO.js +130 -0
  10. package/dist/chunk-2ATI4GSO.js.map +1 -0
  11. package/dist/chunk-2RR4CX3F.js +141 -0
  12. package/dist/chunk-2RR4CX3F.js.map +1 -0
  13. package/dist/chunk-2S6T3LVP.js +212 -0
  14. package/dist/chunk-2S6T3LVP.js.map +1 -0
  15. package/dist/chunk-3357K7AW.js +108 -0
  16. package/dist/chunk-3357K7AW.js.map +1 -0
  17. package/dist/chunk-3BLNV3M6.js +49 -0
  18. package/dist/chunk-3BLNV3M6.js.map +1 -0
  19. package/dist/chunk-3DOLNPRU.js +27 -0
  20. package/dist/chunk-3DOLNPRU.js.map +1 -0
  21. package/dist/chunk-3MYGXIHH.js +108 -0
  22. package/dist/chunk-3MYGXIHH.js.map +1 -0
  23. package/dist/chunk-3PCM3OLN.js +141 -0
  24. package/dist/chunk-3PCM3OLN.js.map +1 -0
  25. package/dist/chunk-3TBXOB3R.js +141 -0
  26. package/dist/chunk-3TBXOB3R.js.map +1 -0
  27. package/dist/chunk-3XY72AXV.js +49 -0
  28. package/dist/chunk-3XY72AXV.js.map +1 -0
  29. package/dist/chunk-3YBIEQO6.js +212 -0
  30. package/dist/chunk-3YBIEQO6.js.map +1 -0
  31. package/dist/chunk-4A4J7WSV.js +86 -0
  32. package/dist/chunk-4A4J7WSV.js.map +1 -0
  33. package/dist/chunk-4ESGRQGT.js +108 -0
  34. package/dist/chunk-4ESGRQGT.js.map +1 -0
  35. package/dist/chunk-5BIMFEMU.js +1478 -0
  36. package/dist/chunk-5BIMFEMU.js.map +1 -0
  37. package/dist/chunk-5SRYL5WC.js +212 -0
  38. package/dist/chunk-5SRYL5WC.js.map +1 -0
  39. package/dist/chunk-62YQFYHZ.js +3629 -0
  40. package/dist/chunk-62YQFYHZ.js.map +1 -0
  41. package/dist/chunk-6HKZB5HS.js +49 -0
  42. package/dist/chunk-6HKZB5HS.js.map +1 -0
  43. package/dist/chunk-6NC6XI6T.js +108 -0
  44. package/dist/chunk-6NC6XI6T.js.map +1 -0
  45. package/dist/chunk-6VGNSL3V.js +108 -0
  46. package/dist/chunk-6VGNSL3V.js.map +1 -0
  47. package/dist/chunk-74Z6QJ2V.js +108 -0
  48. package/dist/chunk-74Z6QJ2V.js.map +1 -0
  49. package/dist/chunk-77BWMAR2.js +105 -0
  50. package/dist/chunk-77BWMAR2.js.map +1 -0
  51. package/dist/chunk-7EX3S2AT.js +2324 -0
  52. package/dist/chunk-7EX3S2AT.js.map +1 -0
  53. package/dist/chunk-7LU43J6Y.js +2199 -0
  54. package/dist/chunk-7LU43J6Y.js.map +1 -0
  55. package/dist/chunk-7ONFLU6G.js +127 -0
  56. package/dist/chunk-7ONFLU6G.js.map +1 -0
  57. package/dist/chunk-7S7HFNGN.js +49 -0
  58. package/dist/chunk-7S7HFNGN.js.map +1 -0
  59. package/dist/chunk-7T3QFG4C.js +108 -0
  60. package/dist/chunk-7T3QFG4C.js.map +1 -0
  61. package/dist/chunk-ACI4CZ3N.js +141 -0
  62. package/dist/chunk-ACI4CZ3N.js.map +1 -0
  63. package/dist/chunk-AF3NCC5P.js +127 -0
  64. package/dist/chunk-AF3NCC5P.js.map +1 -0
  65. package/dist/chunk-AFTE3PC6.js +141 -0
  66. package/dist/chunk-AFTE3PC6.js.map +1 -0
  67. package/dist/chunk-ARSX76AK.js +49 -0
  68. package/dist/chunk-ARSX76AK.js.map +1 -0
  69. package/dist/chunk-AVOJOQXO.js +108 -0
  70. package/dist/chunk-AVOJOQXO.js.map +1 -0
  71. package/dist/chunk-AWLKSOKJ.js +49 -0
  72. package/dist/chunk-AWLKSOKJ.js.map +1 -0
  73. package/dist/chunk-B5CBBNRH.js +141 -0
  74. package/dist/chunk-B5CBBNRH.js.map +1 -0
  75. package/dist/chunk-BJAVQP5F.js +212 -0
  76. package/dist/chunk-BJAVQP5F.js.map +1 -0
  77. package/dist/chunk-C4DWCONF.js +212 -0
  78. package/dist/chunk-C4DWCONF.js.map +1 -0
  79. package/dist/chunk-CM2VKLWZ.js +127 -0
  80. package/dist/chunk-CM2VKLWZ.js.map +1 -0
  81. package/dist/chunk-CRPUM7SJ.js +212 -0
  82. package/dist/chunk-CRPUM7SJ.js.map +1 -0
  83. package/dist/chunk-CSBHWPRR.js +105 -0
  84. package/dist/chunk-CSBHWPRR.js.map +1 -0
  85. package/dist/chunk-CT7PENLL.js +105 -0
  86. package/dist/chunk-CT7PENLL.js.map +1 -0
  87. package/dist/chunk-DIAD272J.js +49 -0
  88. package/dist/chunk-DIAD272J.js.map +1 -0
  89. package/dist/chunk-DXONM5CJ.js +141 -0
  90. package/dist/chunk-DXONM5CJ.js.map +1 -0
  91. package/dist/chunk-E4LV6EXS.js +108 -0
  92. package/dist/chunk-E4LV6EXS.js.map +1 -0
  93. package/dist/chunk-E6E6MHRM.js +212 -0
  94. package/dist/chunk-E6E6MHRM.js.map +1 -0
  95. package/dist/chunk-E77PCJ2L.js +141 -0
  96. package/dist/chunk-E77PCJ2L.js.map +1 -0
  97. package/dist/chunk-E7F44FIR.js +105 -0
  98. package/dist/chunk-E7F44FIR.js.map +1 -0
  99. package/dist/chunk-EK2YUTFC.js +141 -0
  100. package/dist/chunk-EK2YUTFC.js.map +1 -0
  101. package/dist/chunk-EKQJYLLX.js +212 -0
  102. package/dist/chunk-EKQJYLLX.js.map +1 -0
  103. package/dist/chunk-FA77TXZD.js +127 -0
  104. package/dist/chunk-FA77TXZD.js.map +1 -0
  105. package/dist/chunk-FAFYYMFU.js +108 -0
  106. package/dist/chunk-FAFYYMFU.js.map +1 -0
  107. package/dist/chunk-FHTHKUN5.js +126 -0
  108. package/dist/chunk-FHTHKUN5.js.map +1 -0
  109. package/dist/chunk-GAWACXC2.js +127 -0
  110. package/dist/chunk-GAWACXC2.js.map +1 -0
  111. package/dist/chunk-GR3BLVJV.js +212 -0
  112. package/dist/chunk-GR3BLVJV.js.map +1 -0
  113. package/dist/chunk-GRCSAYBS.js +141 -0
  114. package/dist/chunk-GRCSAYBS.js.map +1 -0
  115. package/dist/chunk-GTRGNGUL.js +212 -0
  116. package/dist/chunk-GTRGNGUL.js.map +1 -0
  117. package/dist/chunk-H6EWZ7XZ.js +105 -0
  118. package/dist/chunk-H6EWZ7XZ.js.map +1 -0
  119. package/dist/chunk-HH3OPBBE.js +108 -0
  120. package/dist/chunk-HH3OPBBE.js.map +1 -0
  121. package/dist/chunk-HRVIZJEA.js +63 -0
  122. package/dist/chunk-HRVIZJEA.js.map +1 -0
  123. package/dist/chunk-I5GYABMO.js +141 -0
  124. package/dist/chunk-I5GYABMO.js.map +1 -0
  125. package/dist/chunk-I5J6GFME.js +141 -0
  126. package/dist/chunk-I5J6GFME.js.map +1 -0
  127. package/dist/chunk-IHFBGGHI.js +2297 -0
  128. package/dist/chunk-IHFBGGHI.js.map +1 -0
  129. package/dist/chunk-IHHNRYGC.js +108 -0
  130. package/dist/chunk-IHHNRYGC.js.map +1 -0
  131. package/dist/chunk-IPF6TU3K.js +212 -0
  132. package/dist/chunk-IPF6TU3K.js.map +1 -0
  133. package/dist/chunk-JNSJK2TR.js +2323 -0
  134. package/dist/chunk-JNSJK2TR.js.map +1 -0
  135. package/dist/chunk-JY62VTMC.js +49 -0
  136. package/dist/chunk-JY62VTMC.js.map +1 -0
  137. package/dist/chunk-KKC3SV7X.js +212 -0
  138. package/dist/chunk-KKC3SV7X.js.map +1 -0
  139. package/dist/chunk-KLKFSFIO.js +127 -0
  140. package/dist/chunk-KLKFSFIO.js.map +1 -0
  141. package/dist/chunk-KLXG7TWR.js +212 -0
  142. package/dist/chunk-KLXG7TWR.js.map +1 -0
  143. package/dist/chunk-KONLD7QH.js +108 -0
  144. package/dist/chunk-KONLD7QH.js.map +1 -0
  145. package/dist/chunk-KVZ4GBCQ.js +212 -0
  146. package/dist/chunk-KVZ4GBCQ.js.map +1 -0
  147. package/dist/chunk-LCX6G6UD.js +49 -0
  148. package/dist/chunk-LCX6G6UD.js.map +1 -0
  149. package/dist/chunk-LTJESAOY.js +49 -0
  150. package/dist/chunk-LTJESAOY.js.map +1 -0
  151. package/dist/chunk-LVOIDBQG.js +5083 -0
  152. package/dist/chunk-LVOIDBQG.js.map +1 -0
  153. package/dist/chunk-M7MZHGIW.js +141 -0
  154. package/dist/chunk-M7MZHGIW.js.map +1 -0
  155. package/dist/chunk-MFLND54Z.js +105 -0
  156. package/dist/chunk-MFLND54Z.js.map +1 -0
  157. package/dist/chunk-MU2VXMVI.js +105 -0
  158. package/dist/chunk-MU2VXMVI.js.map +1 -0
  159. package/dist/chunk-MYFQGX4G.js +130 -0
  160. package/dist/chunk-MYFQGX4G.js.map +1 -0
  161. package/dist/chunk-NIVSHXEJ.js +141 -0
  162. package/dist/chunk-NIVSHXEJ.js.map +1 -0
  163. package/dist/chunk-NJMWUDSI.js +2323 -0
  164. package/dist/chunk-NJMWUDSI.js.map +1 -0
  165. package/dist/chunk-NP4YOCMX.js +127 -0
  166. package/dist/chunk-NP4YOCMX.js.map +1 -0
  167. package/dist/chunk-NVIXO3FX.js +127 -0
  168. package/dist/chunk-NVIXO3FX.js.map +1 -0
  169. package/dist/chunk-OB5SKTJ7.js +2294 -0
  170. package/dist/chunk-OB5SKTJ7.js.map +1 -0
  171. package/dist/chunk-OWG3KRZJ.js +108 -0
  172. package/dist/chunk-OWG3KRZJ.js.map +1 -0
  173. package/dist/chunk-P3FVYMA6.js +127 -0
  174. package/dist/chunk-P3FVYMA6.js.map +1 -0
  175. package/dist/chunk-PJDWYUHP.js +3629 -0
  176. package/dist/chunk-PJDWYUHP.js.map +1 -0
  177. package/dist/chunk-PS6RUUUK.js +86 -0
  178. package/dist/chunk-PS6RUUUK.js.map +1 -0
  179. package/dist/chunk-QAFEK7IY.js +105 -0
  180. package/dist/chunk-QAFEK7IY.js.map +1 -0
  181. package/dist/chunk-QFPKRXR3.js +108 -0
  182. package/dist/chunk-QFPKRXR3.js.map +1 -0
  183. package/dist/chunk-R3N37XCV.js +212 -0
  184. package/dist/chunk-R3N37XCV.js.map +1 -0
  185. package/dist/chunk-R4E42CNE.js +2324 -0
  186. package/dist/chunk-R4E42CNE.js.map +1 -0
  187. package/dist/chunk-R4FMLRKR.js +105 -0
  188. package/dist/chunk-R4FMLRKR.js.map +1 -0
  189. package/dist/chunk-R4ISWFAU.js +2323 -0
  190. package/dist/chunk-R4ISWFAU.js.map +1 -0
  191. package/dist/chunk-R5KOPIFI.js +127 -0
  192. package/dist/chunk-R5KOPIFI.js.map +1 -0
  193. package/dist/chunk-RHM7WSYL.js +127 -0
  194. package/dist/chunk-RHM7WSYL.js.map +1 -0
  195. package/dist/chunk-RMOYI7RJ.js +212 -0
  196. package/dist/chunk-RMOYI7RJ.js.map +1 -0
  197. package/dist/chunk-RQB4FWW7.js +2296 -0
  198. package/dist/chunk-RQB4FWW7.js.map +1 -0
  199. package/dist/chunk-RRQLWLKC.js +127 -0
  200. package/dist/chunk-RRQLWLKC.js.map +1 -0
  201. package/dist/chunk-S7BWR5IZ.js +212 -0
  202. package/dist/chunk-S7BWR5IZ.js.map +1 -0
  203. package/dist/chunk-SUHRSNAI.js +63 -0
  204. package/dist/chunk-SUHRSNAI.js.map +1 -0
  205. package/dist/chunk-T5J4XBWF.js +127 -0
  206. package/dist/chunk-T5J4XBWF.js.map +1 -0
  207. package/dist/chunk-T5OKHLM7.js +86 -0
  208. package/dist/chunk-T5OKHLM7.js.map +1 -0
  209. package/dist/chunk-T6TINFBB.js +49 -0
  210. package/dist/chunk-T6TINFBB.js.map +1 -0
  211. package/dist/chunk-TK4FIUGX.js +105 -0
  212. package/dist/chunk-TK4FIUGX.js.map +1 -0
  213. package/dist/chunk-TSYM32RM.js +2218 -0
  214. package/dist/chunk-TSYM32RM.js.map +1 -0
  215. package/dist/chunk-TYLFHFBL.js +127 -0
  216. package/dist/chunk-TYLFHFBL.js.map +1 -0
  217. package/dist/chunk-TZ6FCCCJ.js +105 -0
  218. package/dist/chunk-TZ6FCCCJ.js.map +1 -0
  219. package/dist/chunk-UFO7XI55.js +212 -0
  220. package/dist/chunk-UFO7XI55.js.map +1 -0
  221. package/dist/chunk-UHGU5YPX.js +127 -0
  222. package/dist/chunk-UHGU5YPX.js.map +1 -0
  223. package/dist/chunk-UTXIA4ZA.js +105 -0
  224. package/dist/chunk-UTXIA4ZA.js.map +1 -0
  225. package/dist/chunk-UYI6WFT7.js +105 -0
  226. package/dist/chunk-UYI6WFT7.js.map +1 -0
  227. package/dist/chunk-VENIIRNN.js +49 -0
  228. package/dist/chunk-VENIIRNN.js.map +1 -0
  229. package/dist/chunk-VIX553CW.js +108 -0
  230. package/dist/chunk-VIX553CW.js.map +1 -0
  231. package/dist/chunk-VLYJFH7W.js +49 -0
  232. package/dist/chunk-VLYJFH7W.js.map +1 -0
  233. package/dist/chunk-VOXSIPTX.js +141 -0
  234. package/dist/chunk-VOXSIPTX.js.map +1 -0
  235. package/dist/chunk-VZNGE73T.js +105 -0
  236. package/dist/chunk-VZNGE73T.js.map +1 -0
  237. package/dist/chunk-W2J2VZEP.js +108 -0
  238. package/dist/chunk-W2J2VZEP.js.map +1 -0
  239. package/dist/chunk-X3QTCV4Q.js +212 -0
  240. package/dist/chunk-X3QTCV4Q.js.map +1 -0
  241. package/dist/chunk-X5ZOQIDW.js +108 -0
  242. package/dist/chunk-X5ZOQIDW.js.map +1 -0
  243. package/dist/chunk-XHG32AO6.js +141 -0
  244. package/dist/chunk-XHG32AO6.js.map +1 -0
  245. package/dist/chunk-XJSNK6B3.js +127 -0
  246. package/dist/chunk-XJSNK6B3.js.map +1 -0
  247. package/dist/chunk-XRKRGNVZ.js +141 -0
  248. package/dist/chunk-XRKRGNVZ.js.map +1 -0
  249. package/dist/chunk-XVA5MO4M.js +2324 -0
  250. package/dist/chunk-XVA5MO4M.js.map +1 -0
  251. package/dist/chunk-XXEJA3Q7.js +86 -0
  252. package/dist/chunk-XXEJA3Q7.js.map +1 -0
  253. package/dist/chunk-XZAEVXPG.js +108 -0
  254. package/dist/chunk-XZAEVXPG.js.map +1 -0
  255. package/dist/chunk-YCVZY6JX.js +141 -0
  256. package/dist/chunk-YCVZY6JX.js.map +1 -0
  257. package/dist/chunk-YQAMFHXE.js +212 -0
  258. package/dist/chunk-YQAMFHXE.js.map +1 -0
  259. package/dist/chunk-YRB4D655.js +141 -0
  260. package/dist/chunk-YRB4D655.js.map +1 -0
  261. package/dist/chunk-YVPSUVSB.js +141 -0
  262. package/dist/chunk-YVPSUVSB.js.map +1 -0
  263. package/dist/chunk-YWEJJEJY.js +105 -0
  264. package/dist/chunk-YWEJJEJY.js.map +1 -0
  265. package/dist/chunk-YXOEPMQS.js +127 -0
  266. package/dist/chunk-YXOEPMQS.js.map +1 -0
  267. package/dist/chunk-ZBNO57AP.js +141 -0
  268. package/dist/chunk-ZBNO57AP.js.map +1 -0
  269. package/dist/chunk-ZZDH4KPF.js +212 -0
  270. package/dist/chunk-ZZDH4KPF.js.map +1 -0
  271. package/dist/components/AddressContainer/CoreAddressContainer.js +6 -6
  272. package/dist/components/AddressContainer/EVMAddressContainer.js +6 -6
  273. package/dist/components/AddressContainer/addressSwitcher.js +4 -4
  274. package/dist/components/AddressContainer/addressView.js +3 -3
  275. package/dist/components/AddressContainer/label.js +2 -2
  276. package/dist/components/Age/index.js +2 -2
  277. package/dist/components/CopyButton/index.js +1 -1
  278. package/dist/components/DownloadCSV/index.js +1 -1
  279. package/dist/components/Highlight/index.js +12 -2
  280. package/dist/components/Highlight/index.js.map +1 -1
  281. package/dist/components/InfoIconWithTooltip/index.js +1 -1
  282. package/dist/components/PhishingAddressContainer/PhishingWarningIcon.d.ts +6 -0
  283. package/dist/components/PhishingAddressContainer/PhishingWarningIcon.js +7 -0
  284. package/dist/components/PhishingAddressContainer/PhishingWarningIcon.js.map +1 -0
  285. package/dist/components/PhishingAddressContainer/index.d.ts +15 -0
  286. package/dist/components/PhishingAddressContainer/index.js +124 -0
  287. package/dist/components/PhishingAddressContainer/index.js.map +1 -0
  288. package/dist/components/PhishingAddressContainer/phishing-warning.svg.svg +3 -0
  289. package/dist/components/Price/index.js +1 -1
  290. package/dist/components/Select/index.js +1 -1
  291. package/dist/components/Select/select.js +1 -1
  292. package/dist/components/Text/index.js +2 -2
  293. package/dist/components/Tooltip/index.d.ts +1 -1
  294. package/dist/components/Tooltip/index.js +1 -1
  295. package/dist/components/Tooltip/tt.d.ts +28 -0
  296. package/dist/components/Tooltip/tt.js +8 -0
  297. package/dist/components/Tooltip/tt.js.map +1 -0
  298. package/dist/components/TransactionAction/coreTransactionAction.js +6 -6
  299. package/dist/components/TransactionAction/evmTransactionAction.js +6 -6
  300. package/dist/contants/cssVariable.d.ts +20 -0
  301. package/dist/contants/cssVariable.js +41 -0
  302. package/dist/contants/cssVariable.js.map +1 -0
  303. package/dist/uno.css +6 -4
  304. package/dist/utils/contractManagerTool.d.ts +50 -0
  305. package/dist/utils/contractManagerTool.js +92 -0
  306. package/dist/utils/contractManagerTool.js.map +1 -0
  307. package/package.json +5 -5
@@ -0,0 +1,1478 @@
1
+ // ../../node_modules/.pnpm/@floating-ui+utils@0.2.1/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
2
+ var sides = ["top", "right", "bottom", "left"];
3
+ var min = Math.min;
4
+ var max = Math.max;
5
+ var oppositeSideMap = {
6
+ left: "right",
7
+ right: "left",
8
+ bottom: "top",
9
+ top: "bottom"
10
+ };
11
+ var oppositeAlignmentMap = {
12
+ start: "end",
13
+ end: "start"
14
+ };
15
+ function clamp(start, value, end) {
16
+ return max(start, min(value, end));
17
+ }
18
+ function evaluate(value, param) {
19
+ return typeof value === "function" ? value(param) : value;
20
+ }
21
+ function getSide(placement) {
22
+ return placement.split("-")[0];
23
+ }
24
+ function getAlignment(placement) {
25
+ return placement.split("-")[1];
26
+ }
27
+ function getOppositeAxis(axis) {
28
+ return axis === "x" ? "y" : "x";
29
+ }
30
+ function getAxisLength(axis) {
31
+ return axis === "y" ? "height" : "width";
32
+ }
33
+ function getSideAxis(placement) {
34
+ return ["top", "bottom"].includes(getSide(placement)) ? "y" : "x";
35
+ }
36
+ function getAlignmentAxis(placement) {
37
+ return getOppositeAxis(getSideAxis(placement));
38
+ }
39
+ function getAlignmentSides(placement, rects, rtl) {
40
+ if (rtl === void 0) {
41
+ rtl = false;
42
+ }
43
+ const alignment = getAlignment(placement);
44
+ const alignmentAxis = getAlignmentAxis(placement);
45
+ const length = getAxisLength(alignmentAxis);
46
+ let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
47
+ if (rects.reference[length] > rects.floating[length]) {
48
+ mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
49
+ }
50
+ return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
51
+ }
52
+ function getExpandedPlacements(placement) {
53
+ const oppositePlacement = getOppositePlacement(placement);
54
+ return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
55
+ }
56
+ function getOppositeAlignmentPlacement(placement) {
57
+ return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
58
+ }
59
+ function getSideList(side, isStart, rtl) {
60
+ const lr = ["left", "right"];
61
+ const rl = ["right", "left"];
62
+ const tb = ["top", "bottom"];
63
+ const bt = ["bottom", "top"];
64
+ switch (side) {
65
+ case "top":
66
+ case "bottom":
67
+ if (rtl)
68
+ return isStart ? rl : lr;
69
+ return isStart ? lr : rl;
70
+ case "left":
71
+ case "right":
72
+ return isStart ? tb : bt;
73
+ default:
74
+ return [];
75
+ }
76
+ }
77
+ function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
78
+ const alignment = getAlignment(placement);
79
+ let list = getSideList(getSide(placement), direction === "start", rtl);
80
+ if (alignment) {
81
+ list = list.map((side) => side + "-" + alignment);
82
+ if (flipAlignment) {
83
+ list = list.concat(list.map(getOppositeAlignmentPlacement));
84
+ }
85
+ }
86
+ return list;
87
+ }
88
+ function getOppositePlacement(placement) {
89
+ return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
90
+ }
91
+ function expandPaddingObject(padding) {
92
+ return {
93
+ top: 0,
94
+ right: 0,
95
+ bottom: 0,
96
+ left: 0,
97
+ ...padding
98
+ };
99
+ }
100
+ function getPaddingObject(padding) {
101
+ return typeof padding !== "number" ? expandPaddingObject(padding) : {
102
+ top: padding,
103
+ right: padding,
104
+ bottom: padding,
105
+ left: padding
106
+ };
107
+ }
108
+ function rectToClientRect(rect) {
109
+ return {
110
+ ...rect,
111
+ top: rect.y,
112
+ left: rect.x,
113
+ right: rect.x + rect.width,
114
+ bottom: rect.y + rect.height
115
+ };
116
+ }
117
+
118
+ // ../../node_modules/.pnpm/@floating-ui+core@1.6.0/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
119
+ function computeCoordsFromPlacement(_ref, placement, rtl) {
120
+ let {
121
+ reference,
122
+ floating
123
+ } = _ref;
124
+ const sideAxis = getSideAxis(placement);
125
+ const alignmentAxis = getAlignmentAxis(placement);
126
+ const alignLength = getAxisLength(alignmentAxis);
127
+ const side = getSide(placement);
128
+ const isVertical = sideAxis === "y";
129
+ const commonX = reference.x + reference.width / 2 - floating.width / 2;
130
+ const commonY = reference.y + reference.height / 2 - floating.height / 2;
131
+ const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
132
+ let coords;
133
+ switch (side) {
134
+ case "top":
135
+ coords = {
136
+ x: commonX,
137
+ y: reference.y - floating.height
138
+ };
139
+ break;
140
+ case "bottom":
141
+ coords = {
142
+ x: commonX,
143
+ y: reference.y + reference.height
144
+ };
145
+ break;
146
+ case "right":
147
+ coords = {
148
+ x: reference.x + reference.width,
149
+ y: commonY
150
+ };
151
+ break;
152
+ case "left":
153
+ coords = {
154
+ x: reference.x - floating.width,
155
+ y: commonY
156
+ };
157
+ break;
158
+ default:
159
+ coords = {
160
+ x: reference.x,
161
+ y: reference.y
162
+ };
163
+ }
164
+ switch (getAlignment(placement)) {
165
+ case "start":
166
+ coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
167
+ break;
168
+ case "end":
169
+ coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
170
+ break;
171
+ }
172
+ return coords;
173
+ }
174
+ var computePosition = async (reference, floating, config) => {
175
+ const {
176
+ placement = "bottom",
177
+ strategy = "absolute",
178
+ middleware = [],
179
+ platform: platform2
180
+ } = config;
181
+ const validMiddleware = middleware.filter(Boolean);
182
+ const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(floating));
183
+ let rects = await platform2.getElementRects({
184
+ reference,
185
+ floating,
186
+ strategy
187
+ });
188
+ let {
189
+ x,
190
+ y
191
+ } = computeCoordsFromPlacement(rects, placement, rtl);
192
+ let statefulPlacement = placement;
193
+ let middlewareData = {};
194
+ let resetCount = 0;
195
+ for (let i = 0; i < validMiddleware.length; i++) {
196
+ const {
197
+ name,
198
+ fn
199
+ } = validMiddleware[i];
200
+ const {
201
+ x: nextX,
202
+ y: nextY,
203
+ data,
204
+ reset
205
+ } = await fn({
206
+ x,
207
+ y,
208
+ initialPlacement: placement,
209
+ placement: statefulPlacement,
210
+ strategy,
211
+ middlewareData,
212
+ rects,
213
+ platform: platform2,
214
+ elements: {
215
+ reference,
216
+ floating
217
+ }
218
+ });
219
+ x = nextX != null ? nextX : x;
220
+ y = nextY != null ? nextY : y;
221
+ middlewareData = {
222
+ ...middlewareData,
223
+ [name]: {
224
+ ...middlewareData[name],
225
+ ...data
226
+ }
227
+ };
228
+ if (reset && resetCount <= 50) {
229
+ resetCount++;
230
+ if (typeof reset === "object") {
231
+ if (reset.placement) {
232
+ statefulPlacement = reset.placement;
233
+ }
234
+ if (reset.rects) {
235
+ rects = reset.rects === true ? await platform2.getElementRects({
236
+ reference,
237
+ floating,
238
+ strategy
239
+ }) : reset.rects;
240
+ }
241
+ ({
242
+ x,
243
+ y
244
+ } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
245
+ }
246
+ i = -1;
247
+ }
248
+ }
249
+ return {
250
+ x,
251
+ y,
252
+ placement: statefulPlacement,
253
+ strategy,
254
+ middlewareData
255
+ };
256
+ };
257
+ async function detectOverflow(state, options) {
258
+ var _await$platform$isEle;
259
+ if (options === void 0) {
260
+ options = {};
261
+ }
262
+ const {
263
+ x,
264
+ y,
265
+ platform: platform2,
266
+ rects,
267
+ elements,
268
+ strategy
269
+ } = state;
270
+ const {
271
+ boundary = "clippingAncestors",
272
+ rootBoundary = "viewport",
273
+ elementContext = "floating",
274
+ altBoundary = false,
275
+ padding = 0
276
+ } = evaluate(options, state);
277
+ const paddingObject = getPaddingObject(padding);
278
+ const altContext = elementContext === "floating" ? "reference" : "floating";
279
+ const element = elements[altBoundary ? altContext : elementContext];
280
+ const clippingClientRect = rectToClientRect(await platform2.getClippingRect({
281
+ element: ((_await$platform$isEle = await (platform2.isElement == null ? void 0 : platform2.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform2.getDocumentElement == null ? void 0 : platform2.getDocumentElement(elements.floating)),
282
+ boundary,
283
+ rootBoundary,
284
+ strategy
285
+ }));
286
+ const rect = elementContext === "floating" ? {
287
+ ...rects.floating,
288
+ x,
289
+ y
290
+ } : rects.reference;
291
+ const offsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(elements.floating));
292
+ const offsetScale = await (platform2.isElement == null ? void 0 : platform2.isElement(offsetParent)) ? await (platform2.getScale == null ? void 0 : platform2.getScale(offsetParent)) || {
293
+ x: 1,
294
+ y: 1
295
+ } : {
296
+ x: 1,
297
+ y: 1
298
+ };
299
+ const elementClientRect = rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({
300
+ elements,
301
+ rect,
302
+ offsetParent,
303
+ strategy
304
+ }) : rect);
305
+ return {
306
+ top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
307
+ bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
308
+ left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
309
+ right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
310
+ };
311
+ }
312
+ var arrow = (options) => ({
313
+ name: "arrow",
314
+ options,
315
+ async fn(state) {
316
+ const {
317
+ x,
318
+ y,
319
+ placement,
320
+ rects,
321
+ platform: platform2,
322
+ elements,
323
+ middlewareData
324
+ } = state;
325
+ const {
326
+ element,
327
+ padding = 0
328
+ } = evaluate(options, state) || {};
329
+ if (element == null) {
330
+ return {};
331
+ }
332
+ const paddingObject = getPaddingObject(padding);
333
+ const coords = {
334
+ x,
335
+ y
336
+ };
337
+ const axis = getAlignmentAxis(placement);
338
+ const length = getAxisLength(axis);
339
+ const arrowDimensions = await platform2.getDimensions(element);
340
+ const isYAxis = axis === "y";
341
+ const minProp = isYAxis ? "top" : "left";
342
+ const maxProp = isYAxis ? "bottom" : "right";
343
+ const clientProp = isYAxis ? "clientHeight" : "clientWidth";
344
+ const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
345
+ const startDiff = coords[axis] - rects.reference[axis];
346
+ const arrowOffsetParent = await (platform2.getOffsetParent == null ? void 0 : platform2.getOffsetParent(element));
347
+ let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
348
+ if (!clientSize || !await (platform2.isElement == null ? void 0 : platform2.isElement(arrowOffsetParent))) {
349
+ clientSize = elements.floating[clientProp] || rects.floating[length];
350
+ }
351
+ const centerToReference = endDiff / 2 - startDiff / 2;
352
+ const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
353
+ const minPadding = min(paddingObject[minProp], largestPossiblePadding);
354
+ const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
355
+ const min$1 = minPadding;
356
+ const max3 = clientSize - arrowDimensions[length] - maxPadding;
357
+ const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
358
+ const offset2 = clamp(min$1, center, max3);
359
+ const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset2 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
360
+ const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max3 : 0;
361
+ return {
362
+ [axis]: coords[axis] + alignmentOffset,
363
+ data: {
364
+ [axis]: offset2,
365
+ centerOffset: center - offset2 - alignmentOffset,
366
+ ...shouldAddOffset && {
367
+ alignmentOffset
368
+ }
369
+ },
370
+ reset: shouldAddOffset
371
+ };
372
+ }
373
+ });
374
+ var flip = function(options) {
375
+ if (options === void 0) {
376
+ options = {};
377
+ }
378
+ return {
379
+ name: "flip",
380
+ options,
381
+ async fn(state) {
382
+ var _middlewareData$arrow, _middlewareData$flip;
383
+ const {
384
+ placement,
385
+ middlewareData,
386
+ rects,
387
+ initialPlacement,
388
+ platform: platform2,
389
+ elements
390
+ } = state;
391
+ const {
392
+ mainAxis: checkMainAxis = true,
393
+ crossAxis: checkCrossAxis = true,
394
+ fallbackPlacements: specifiedFallbackPlacements,
395
+ fallbackStrategy = "bestFit",
396
+ fallbackAxisSideDirection = "none",
397
+ flipAlignment = true,
398
+ ...detectOverflowOptions
399
+ } = evaluate(options, state);
400
+ if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
401
+ return {};
402
+ }
403
+ const side = getSide(placement);
404
+ const isBasePlacement = getSide(initialPlacement) === initialPlacement;
405
+ const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
406
+ const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
407
+ if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") {
408
+ fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
409
+ }
410
+ const placements2 = [initialPlacement, ...fallbackPlacements];
411
+ const overflow = await detectOverflow(state, detectOverflowOptions);
412
+ const overflows = [];
413
+ let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
414
+ if (checkMainAxis) {
415
+ overflows.push(overflow[side]);
416
+ }
417
+ if (checkCrossAxis) {
418
+ const sides2 = getAlignmentSides(placement, rects, rtl);
419
+ overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
420
+ }
421
+ overflowsData = [...overflowsData, {
422
+ placement,
423
+ overflows
424
+ }];
425
+ if (!overflows.every((side2) => side2 <= 0)) {
426
+ var _middlewareData$flip2, _overflowsData$filter;
427
+ const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
428
+ const nextPlacement = placements2[nextIndex];
429
+ if (nextPlacement) {
430
+ return {
431
+ data: {
432
+ index: nextIndex,
433
+ overflows: overflowsData
434
+ },
435
+ reset: {
436
+ placement: nextPlacement
437
+ }
438
+ };
439
+ }
440
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
441
+ if (!resetPlacement) {
442
+ switch (fallbackStrategy) {
443
+ case "bestFit": {
444
+ var _overflowsData$map$so;
445
+ const placement2 = (_overflowsData$map$so = overflowsData.map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
446
+ if (placement2) {
447
+ resetPlacement = placement2;
448
+ }
449
+ break;
450
+ }
451
+ case "initialPlacement":
452
+ resetPlacement = initialPlacement;
453
+ break;
454
+ }
455
+ }
456
+ if (placement !== resetPlacement) {
457
+ return {
458
+ reset: {
459
+ placement: resetPlacement
460
+ }
461
+ };
462
+ }
463
+ }
464
+ return {};
465
+ }
466
+ };
467
+ };
468
+ function getSideOffsets(overflow, rect) {
469
+ return {
470
+ top: overflow.top - rect.height,
471
+ right: overflow.right - rect.width,
472
+ bottom: overflow.bottom - rect.height,
473
+ left: overflow.left - rect.width
474
+ };
475
+ }
476
+ function isAnySideFullyClipped(overflow) {
477
+ return sides.some((side) => overflow[side] >= 0);
478
+ }
479
+ var hide = function(options) {
480
+ if (options === void 0) {
481
+ options = {};
482
+ }
483
+ return {
484
+ name: "hide",
485
+ options,
486
+ async fn(state) {
487
+ const {
488
+ rects
489
+ } = state;
490
+ const {
491
+ strategy = "referenceHidden",
492
+ ...detectOverflowOptions
493
+ } = evaluate(options, state);
494
+ switch (strategy) {
495
+ case "referenceHidden": {
496
+ const overflow = await detectOverflow(state, {
497
+ ...detectOverflowOptions,
498
+ elementContext: "reference"
499
+ });
500
+ const offsets = getSideOffsets(overflow, rects.reference);
501
+ return {
502
+ data: {
503
+ referenceHiddenOffsets: offsets,
504
+ referenceHidden: isAnySideFullyClipped(offsets)
505
+ }
506
+ };
507
+ }
508
+ case "escaped": {
509
+ const overflow = await detectOverflow(state, {
510
+ ...detectOverflowOptions,
511
+ altBoundary: true
512
+ });
513
+ const offsets = getSideOffsets(overflow, rects.floating);
514
+ return {
515
+ data: {
516
+ escapedOffsets: offsets,
517
+ escaped: isAnySideFullyClipped(offsets)
518
+ }
519
+ };
520
+ }
521
+ default: {
522
+ return {};
523
+ }
524
+ }
525
+ }
526
+ };
527
+ };
528
+ async function convertValueToCoords(state, options) {
529
+ const {
530
+ placement,
531
+ platform: platform2,
532
+ elements
533
+ } = state;
534
+ const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
535
+ const side = getSide(placement);
536
+ const alignment = getAlignment(placement);
537
+ const isVertical = getSideAxis(placement) === "y";
538
+ const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
539
+ const crossAxisMulti = rtl && isVertical ? -1 : 1;
540
+ const rawValue = evaluate(options, state);
541
+ let {
542
+ mainAxis,
543
+ crossAxis,
544
+ alignmentAxis
545
+ } = typeof rawValue === "number" ? {
546
+ mainAxis: rawValue,
547
+ crossAxis: 0,
548
+ alignmentAxis: null
549
+ } : {
550
+ mainAxis: 0,
551
+ crossAxis: 0,
552
+ alignmentAxis: null,
553
+ ...rawValue
554
+ };
555
+ if (alignment && typeof alignmentAxis === "number") {
556
+ crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
557
+ }
558
+ return isVertical ? {
559
+ x: crossAxis * crossAxisMulti,
560
+ y: mainAxis * mainAxisMulti
561
+ } : {
562
+ x: mainAxis * mainAxisMulti,
563
+ y: crossAxis * crossAxisMulti
564
+ };
565
+ }
566
+ var offset = function(options) {
567
+ if (options === void 0) {
568
+ options = 0;
569
+ }
570
+ return {
571
+ name: "offset",
572
+ options,
573
+ async fn(state) {
574
+ var _middlewareData$offse, _middlewareData$arrow;
575
+ const {
576
+ x,
577
+ y,
578
+ placement,
579
+ middlewareData
580
+ } = state;
581
+ const diffCoords = await convertValueToCoords(state, options);
582
+ if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
583
+ return {};
584
+ }
585
+ return {
586
+ x: x + diffCoords.x,
587
+ y: y + diffCoords.y,
588
+ data: {
589
+ ...diffCoords,
590
+ placement
591
+ }
592
+ };
593
+ }
594
+ };
595
+ };
596
+ var shift = function(options) {
597
+ if (options === void 0) {
598
+ options = {};
599
+ }
600
+ return {
601
+ name: "shift",
602
+ options,
603
+ async fn(state) {
604
+ const {
605
+ x,
606
+ y,
607
+ placement
608
+ } = state;
609
+ const {
610
+ mainAxis: checkMainAxis = true,
611
+ crossAxis: checkCrossAxis = false,
612
+ limiter = {
613
+ fn: (_ref) => {
614
+ let {
615
+ x: x2,
616
+ y: y2
617
+ } = _ref;
618
+ return {
619
+ x: x2,
620
+ y: y2
621
+ };
622
+ }
623
+ },
624
+ ...detectOverflowOptions
625
+ } = evaluate(options, state);
626
+ const coords = {
627
+ x,
628
+ y
629
+ };
630
+ const overflow = await detectOverflow(state, detectOverflowOptions);
631
+ const crossAxis = getSideAxis(getSide(placement));
632
+ const mainAxis = getOppositeAxis(crossAxis);
633
+ let mainAxisCoord = coords[mainAxis];
634
+ let crossAxisCoord = coords[crossAxis];
635
+ if (checkMainAxis) {
636
+ const minSide = mainAxis === "y" ? "top" : "left";
637
+ const maxSide = mainAxis === "y" ? "bottom" : "right";
638
+ const min3 = mainAxisCoord + overflow[minSide];
639
+ const max3 = mainAxisCoord - overflow[maxSide];
640
+ mainAxisCoord = clamp(min3, mainAxisCoord, max3);
641
+ }
642
+ if (checkCrossAxis) {
643
+ const minSide = crossAxis === "y" ? "top" : "left";
644
+ const maxSide = crossAxis === "y" ? "bottom" : "right";
645
+ const min3 = crossAxisCoord + overflow[minSide];
646
+ const max3 = crossAxisCoord - overflow[maxSide];
647
+ crossAxisCoord = clamp(min3, crossAxisCoord, max3);
648
+ }
649
+ const limitedCoords = limiter.fn({
650
+ ...state,
651
+ [mainAxis]: mainAxisCoord,
652
+ [crossAxis]: crossAxisCoord
653
+ });
654
+ return {
655
+ ...limitedCoords,
656
+ data: {
657
+ x: limitedCoords.x - x,
658
+ y: limitedCoords.y - y
659
+ }
660
+ };
661
+ }
662
+ };
663
+ };
664
+ var limitShift = function(options) {
665
+ if (options === void 0) {
666
+ options = {};
667
+ }
668
+ return {
669
+ options,
670
+ fn(state) {
671
+ const {
672
+ x,
673
+ y,
674
+ placement,
675
+ rects,
676
+ middlewareData
677
+ } = state;
678
+ const {
679
+ offset: offset2 = 0,
680
+ mainAxis: checkMainAxis = true,
681
+ crossAxis: checkCrossAxis = true
682
+ } = evaluate(options, state);
683
+ const coords = {
684
+ x,
685
+ y
686
+ };
687
+ const crossAxis = getSideAxis(placement);
688
+ const mainAxis = getOppositeAxis(crossAxis);
689
+ let mainAxisCoord = coords[mainAxis];
690
+ let crossAxisCoord = coords[crossAxis];
691
+ const rawOffset = evaluate(offset2, state);
692
+ const computedOffset = typeof rawOffset === "number" ? {
693
+ mainAxis: rawOffset,
694
+ crossAxis: 0
695
+ } : {
696
+ mainAxis: 0,
697
+ crossAxis: 0,
698
+ ...rawOffset
699
+ };
700
+ if (checkMainAxis) {
701
+ const len = mainAxis === "y" ? "height" : "width";
702
+ const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
703
+ const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
704
+ if (mainAxisCoord < limitMin) {
705
+ mainAxisCoord = limitMin;
706
+ } else if (mainAxisCoord > limitMax) {
707
+ mainAxisCoord = limitMax;
708
+ }
709
+ }
710
+ if (checkCrossAxis) {
711
+ var _middlewareData$offse, _middlewareData$offse2;
712
+ const len = mainAxis === "y" ? "width" : "height";
713
+ const isOriginSide = ["top", "left"].includes(getSide(placement));
714
+ const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
715
+ const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
716
+ if (crossAxisCoord < limitMin) {
717
+ crossAxisCoord = limitMin;
718
+ } else if (crossAxisCoord > limitMax) {
719
+ crossAxisCoord = limitMax;
720
+ }
721
+ }
722
+ return {
723
+ [mainAxis]: mainAxisCoord,
724
+ [crossAxis]: crossAxisCoord
725
+ };
726
+ }
727
+ };
728
+ };
729
+ var size = function(options) {
730
+ if (options === void 0) {
731
+ options = {};
732
+ }
733
+ return {
734
+ name: "size",
735
+ options,
736
+ async fn(state) {
737
+ const {
738
+ placement,
739
+ rects,
740
+ platform: platform2,
741
+ elements
742
+ } = state;
743
+ const {
744
+ apply = () => {
745
+ },
746
+ ...detectOverflowOptions
747
+ } = evaluate(options, state);
748
+ const overflow = await detectOverflow(state, detectOverflowOptions);
749
+ const side = getSide(placement);
750
+ const alignment = getAlignment(placement);
751
+ const isYAxis = getSideAxis(placement) === "y";
752
+ const {
753
+ width,
754
+ height
755
+ } = rects.floating;
756
+ let heightSide;
757
+ let widthSide;
758
+ if (side === "top" || side === "bottom") {
759
+ heightSide = side;
760
+ widthSide = alignment === (await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
761
+ } else {
762
+ widthSide = side;
763
+ heightSide = alignment === "end" ? "top" : "bottom";
764
+ }
765
+ const overflowAvailableHeight = height - overflow[heightSide];
766
+ const overflowAvailableWidth = width - overflow[widthSide];
767
+ const noShift = !state.middlewareData.shift;
768
+ let availableHeight = overflowAvailableHeight;
769
+ let availableWidth = overflowAvailableWidth;
770
+ if (isYAxis) {
771
+ const maximumClippingWidth = width - overflow.left - overflow.right;
772
+ availableWidth = alignment || noShift ? min(overflowAvailableWidth, maximumClippingWidth) : maximumClippingWidth;
773
+ } else {
774
+ const maximumClippingHeight = height - overflow.top - overflow.bottom;
775
+ availableHeight = alignment || noShift ? min(overflowAvailableHeight, maximumClippingHeight) : maximumClippingHeight;
776
+ }
777
+ if (noShift && !alignment) {
778
+ const xMin = max(overflow.left, 0);
779
+ const xMax = max(overflow.right, 0);
780
+ const yMin = max(overflow.top, 0);
781
+ const yMax = max(overflow.bottom, 0);
782
+ if (isYAxis) {
783
+ availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
784
+ } else {
785
+ availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
786
+ }
787
+ }
788
+ await apply({
789
+ ...state,
790
+ availableWidth,
791
+ availableHeight
792
+ });
793
+ const nextDimensions = await platform2.getDimensions(elements.floating);
794
+ if (width !== nextDimensions.width || height !== nextDimensions.height) {
795
+ return {
796
+ reset: {
797
+ rects: true
798
+ }
799
+ };
800
+ }
801
+ return {};
802
+ }
803
+ };
804
+ };
805
+
806
+ // ../../node_modules/.pnpm/@floating-ui+utils@0.1.6/node_modules/@floating-ui/utils/dom/dist/floating-ui.utils.dom.mjs
807
+ function getNodeName(node) {
808
+ if (isNode(node)) {
809
+ return (node.nodeName || "").toLowerCase();
810
+ }
811
+ return "#document";
812
+ }
813
+ function getWindow(node) {
814
+ var _node$ownerDocument;
815
+ return (node == null ? void 0 : (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
816
+ }
817
+ function getDocumentElement(node) {
818
+ var _ref;
819
+ return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;
820
+ }
821
+ function isNode(value) {
822
+ return value instanceof Node || value instanceof getWindow(value).Node;
823
+ }
824
+ function isElement(value) {
825
+ return value instanceof Element || value instanceof getWindow(value).Element;
826
+ }
827
+ function isHTMLElement(value) {
828
+ return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;
829
+ }
830
+ function isShadowRoot(value) {
831
+ if (typeof ShadowRoot === "undefined") {
832
+ return false;
833
+ }
834
+ return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;
835
+ }
836
+ function isOverflowElement(element) {
837
+ const {
838
+ overflow,
839
+ overflowX,
840
+ overflowY,
841
+ display
842
+ } = getComputedStyle(element);
843
+ return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
844
+ }
845
+ function isTableElement(element) {
846
+ return ["table", "td", "th"].includes(getNodeName(element));
847
+ }
848
+ function isContainingBlock(element) {
849
+ const webkit = isWebKit();
850
+ const css = getComputedStyle(element);
851
+ return css.transform !== "none" || css.perspective !== "none" || (css.containerType ? css.containerType !== "normal" : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== "none" : false) || !webkit && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective", "filter"].some((value) => (css.willChange || "").includes(value)) || ["paint", "layout", "strict", "content"].some((value) => (css.contain || "").includes(value));
852
+ }
853
+ function getContainingBlock(element) {
854
+ let currentNode = getParentNode(element);
855
+ while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
856
+ if (isContainingBlock(currentNode)) {
857
+ return currentNode;
858
+ } else {
859
+ currentNode = getParentNode(currentNode);
860
+ }
861
+ }
862
+ return null;
863
+ }
864
+ function isWebKit() {
865
+ if (typeof CSS === "undefined" || !CSS.supports)
866
+ return false;
867
+ return CSS.supports("-webkit-backdrop-filter", "none");
868
+ }
869
+ function isLastTraversableNode(node) {
870
+ return ["html", "body", "#document"].includes(getNodeName(node));
871
+ }
872
+ function getComputedStyle(element) {
873
+ return getWindow(element).getComputedStyle(element);
874
+ }
875
+ function getNodeScroll(element) {
876
+ if (isElement(element)) {
877
+ return {
878
+ scrollLeft: element.scrollLeft,
879
+ scrollTop: element.scrollTop
880
+ };
881
+ }
882
+ return {
883
+ scrollLeft: element.pageXOffset,
884
+ scrollTop: element.pageYOffset
885
+ };
886
+ }
887
+ function getParentNode(node) {
888
+ if (getNodeName(node) === "html") {
889
+ return node;
890
+ }
891
+ const result = (
892
+ // Step into the shadow DOM of the parent of a slotted node.
893
+ node.assignedSlot || // DOM Element detected.
894
+ node.parentNode || // ShadowRoot detected.
895
+ isShadowRoot(node) && node.host || // Fallback.
896
+ getDocumentElement(node)
897
+ );
898
+ return isShadowRoot(result) ? result.host : result;
899
+ }
900
+ function getNearestOverflowAncestor(node) {
901
+ const parentNode = getParentNode(node);
902
+ if (isLastTraversableNode(parentNode)) {
903
+ return node.ownerDocument ? node.ownerDocument.body : node.body;
904
+ }
905
+ if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
906
+ return parentNode;
907
+ }
908
+ return getNearestOverflowAncestor(parentNode);
909
+ }
910
+ function getOverflowAncestors(node, list, traverseIframes) {
911
+ var _node$ownerDocument2;
912
+ if (list === void 0) {
913
+ list = [];
914
+ }
915
+ if (traverseIframes === void 0) {
916
+ traverseIframes = true;
917
+ }
918
+ const scrollableAncestor = getNearestOverflowAncestor(node);
919
+ const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);
920
+ const win = getWindow(scrollableAncestor);
921
+ if (isBody) {
922
+ return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], win.frameElement && traverseIframes ? getOverflowAncestors(win.frameElement) : []);
923
+ }
924
+ return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));
925
+ }
926
+
927
+ // ../../node_modules/.pnpm/@floating-ui+utils@0.1.6/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
928
+ var min2 = Math.min;
929
+ var max2 = Math.max;
930
+ var round = Math.round;
931
+ var floor = Math.floor;
932
+ var createCoords = (v) => ({
933
+ x: v,
934
+ y: v
935
+ });
936
+
937
+ // ../../node_modules/.pnpm/@floating-ui+dom@1.5.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
938
+ function getCssDimensions(element) {
939
+ const css = getComputedStyle(element);
940
+ let width = parseFloat(css.width) || 0;
941
+ let height = parseFloat(css.height) || 0;
942
+ const hasOffset = isHTMLElement(element);
943
+ const offsetWidth = hasOffset ? element.offsetWidth : width;
944
+ const offsetHeight = hasOffset ? element.offsetHeight : height;
945
+ const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
946
+ if (shouldFallback) {
947
+ width = offsetWidth;
948
+ height = offsetHeight;
949
+ }
950
+ return {
951
+ width,
952
+ height,
953
+ $: shouldFallback
954
+ };
955
+ }
956
+ function unwrapElement(element) {
957
+ return !isElement(element) ? element.contextElement : element;
958
+ }
959
+ function getScale(element) {
960
+ const domElement = unwrapElement(element);
961
+ if (!isHTMLElement(domElement)) {
962
+ return createCoords(1);
963
+ }
964
+ const rect = domElement.getBoundingClientRect();
965
+ const {
966
+ width,
967
+ height,
968
+ $
969
+ } = getCssDimensions(domElement);
970
+ let x = ($ ? round(rect.width) : rect.width) / width;
971
+ let y = ($ ? round(rect.height) : rect.height) / height;
972
+ if (!x || !Number.isFinite(x)) {
973
+ x = 1;
974
+ }
975
+ if (!y || !Number.isFinite(y)) {
976
+ y = 1;
977
+ }
978
+ return {
979
+ x,
980
+ y
981
+ };
982
+ }
983
+ var noOffsets = /* @__PURE__ */ createCoords(0);
984
+ function getVisualOffsets(element) {
985
+ const win = getWindow(element);
986
+ if (!isWebKit() || !win.visualViewport) {
987
+ return noOffsets;
988
+ }
989
+ return {
990
+ x: win.visualViewport.offsetLeft,
991
+ y: win.visualViewport.offsetTop
992
+ };
993
+ }
994
+ function shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {
995
+ if (isFixed === void 0) {
996
+ isFixed = false;
997
+ }
998
+ if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {
999
+ return false;
1000
+ }
1001
+ return isFixed;
1002
+ }
1003
+ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
1004
+ if (includeScale === void 0) {
1005
+ includeScale = false;
1006
+ }
1007
+ if (isFixedStrategy === void 0) {
1008
+ isFixedStrategy = false;
1009
+ }
1010
+ const clientRect = element.getBoundingClientRect();
1011
+ const domElement = unwrapElement(element);
1012
+ let scale = createCoords(1);
1013
+ if (includeScale) {
1014
+ if (offsetParent) {
1015
+ if (isElement(offsetParent)) {
1016
+ scale = getScale(offsetParent);
1017
+ }
1018
+ } else {
1019
+ scale = getScale(element);
1020
+ }
1021
+ }
1022
+ const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);
1023
+ let x = (clientRect.left + visualOffsets.x) / scale.x;
1024
+ let y = (clientRect.top + visualOffsets.y) / scale.y;
1025
+ let width = clientRect.width / scale.x;
1026
+ let height = clientRect.height / scale.y;
1027
+ if (domElement) {
1028
+ const win = getWindow(domElement);
1029
+ const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
1030
+ let currentIFrame = win.frameElement;
1031
+ while (currentIFrame && offsetParent && offsetWin !== win) {
1032
+ const iframeScale = getScale(currentIFrame);
1033
+ const iframeRect = currentIFrame.getBoundingClientRect();
1034
+ const css = getComputedStyle(currentIFrame);
1035
+ const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
1036
+ const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
1037
+ x *= iframeScale.x;
1038
+ y *= iframeScale.y;
1039
+ width *= iframeScale.x;
1040
+ height *= iframeScale.y;
1041
+ x += left;
1042
+ y += top;
1043
+ currentIFrame = getWindow(currentIFrame).frameElement;
1044
+ }
1045
+ }
1046
+ return rectToClientRect({
1047
+ width,
1048
+ height,
1049
+ x,
1050
+ y
1051
+ });
1052
+ }
1053
+ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
1054
+ let {
1055
+ rect,
1056
+ offsetParent,
1057
+ strategy
1058
+ } = _ref;
1059
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1060
+ const documentElement = getDocumentElement(offsetParent);
1061
+ if (offsetParent === documentElement) {
1062
+ return rect;
1063
+ }
1064
+ let scroll = {
1065
+ scrollLeft: 0,
1066
+ scrollTop: 0
1067
+ };
1068
+ let scale = createCoords(1);
1069
+ const offsets = createCoords(0);
1070
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
1071
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
1072
+ scroll = getNodeScroll(offsetParent);
1073
+ }
1074
+ if (isHTMLElement(offsetParent)) {
1075
+ const offsetRect = getBoundingClientRect(offsetParent);
1076
+ scale = getScale(offsetParent);
1077
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1078
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1079
+ }
1080
+ }
1081
+ return {
1082
+ width: rect.width * scale.x,
1083
+ height: rect.height * scale.y,
1084
+ x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x,
1085
+ y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y
1086
+ };
1087
+ }
1088
+ function getClientRects(element) {
1089
+ return Array.from(element.getClientRects());
1090
+ }
1091
+ function getWindowScrollBarX(element) {
1092
+ return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
1093
+ }
1094
+ function getDocumentRect(element) {
1095
+ const html = getDocumentElement(element);
1096
+ const scroll = getNodeScroll(element);
1097
+ const body = element.ownerDocument.body;
1098
+ const width = max2(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
1099
+ const height = max2(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
1100
+ let x = -scroll.scrollLeft + getWindowScrollBarX(element);
1101
+ const y = -scroll.scrollTop;
1102
+ if (getComputedStyle(body).direction === "rtl") {
1103
+ x += max2(html.clientWidth, body.clientWidth) - width;
1104
+ }
1105
+ return {
1106
+ width,
1107
+ height,
1108
+ x,
1109
+ y
1110
+ };
1111
+ }
1112
+ function getViewportRect(element, strategy) {
1113
+ const win = getWindow(element);
1114
+ const html = getDocumentElement(element);
1115
+ const visualViewport = win.visualViewport;
1116
+ let width = html.clientWidth;
1117
+ let height = html.clientHeight;
1118
+ let x = 0;
1119
+ let y = 0;
1120
+ if (visualViewport) {
1121
+ width = visualViewport.width;
1122
+ height = visualViewport.height;
1123
+ const visualViewportBased = isWebKit();
1124
+ if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
1125
+ x = visualViewport.offsetLeft;
1126
+ y = visualViewport.offsetTop;
1127
+ }
1128
+ }
1129
+ return {
1130
+ width,
1131
+ height,
1132
+ x,
1133
+ y
1134
+ };
1135
+ }
1136
+ function getInnerBoundingClientRect(element, strategy) {
1137
+ const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
1138
+ const top = clientRect.top + element.clientTop;
1139
+ const left = clientRect.left + element.clientLeft;
1140
+ const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);
1141
+ const width = element.clientWidth * scale.x;
1142
+ const height = element.clientHeight * scale.y;
1143
+ const x = left * scale.x;
1144
+ const y = top * scale.y;
1145
+ return {
1146
+ width,
1147
+ height,
1148
+ x,
1149
+ y
1150
+ };
1151
+ }
1152
+ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
1153
+ let rect;
1154
+ if (clippingAncestor === "viewport") {
1155
+ rect = getViewportRect(element, strategy);
1156
+ } else if (clippingAncestor === "document") {
1157
+ rect = getDocumentRect(getDocumentElement(element));
1158
+ } else if (isElement(clippingAncestor)) {
1159
+ rect = getInnerBoundingClientRect(clippingAncestor, strategy);
1160
+ } else {
1161
+ const visualOffsets = getVisualOffsets(element);
1162
+ rect = {
1163
+ ...clippingAncestor,
1164
+ x: clippingAncestor.x - visualOffsets.x,
1165
+ y: clippingAncestor.y - visualOffsets.y
1166
+ };
1167
+ }
1168
+ return rectToClientRect(rect);
1169
+ }
1170
+ function hasFixedPositionAncestor(element, stopNode) {
1171
+ const parentNode = getParentNode(element);
1172
+ if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {
1173
+ return false;
1174
+ }
1175
+ return getComputedStyle(parentNode).position === "fixed" || hasFixedPositionAncestor(parentNode, stopNode);
1176
+ }
1177
+ function getClippingElementAncestors(element, cache) {
1178
+ const cachedResult = cache.get(element);
1179
+ if (cachedResult) {
1180
+ return cachedResult;
1181
+ }
1182
+ let result = getOverflowAncestors(element).filter((el) => isElement(el) && getNodeName(el) !== "body");
1183
+ let currentContainingBlockComputedStyle = null;
1184
+ const elementIsFixed = getComputedStyle(element).position === "fixed";
1185
+ let currentNode = elementIsFixed ? getParentNode(element) : element;
1186
+ while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
1187
+ const computedStyle = getComputedStyle(currentNode);
1188
+ const currentNodeIsContaining = isContainingBlock(currentNode);
1189
+ if (!currentNodeIsContaining && computedStyle.position === "fixed") {
1190
+ currentContainingBlockComputedStyle = null;
1191
+ }
1192
+ const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);
1193
+ if (shouldDropCurrentNode) {
1194
+ result = result.filter((ancestor) => ancestor !== currentNode);
1195
+ } else {
1196
+ currentContainingBlockComputedStyle = computedStyle;
1197
+ }
1198
+ currentNode = getParentNode(currentNode);
1199
+ }
1200
+ cache.set(element, result);
1201
+ return result;
1202
+ }
1203
+ function getClippingRect(_ref) {
1204
+ let {
1205
+ element,
1206
+ boundary,
1207
+ rootBoundary,
1208
+ strategy
1209
+ } = _ref;
1210
+ const elementClippingAncestors = boundary === "clippingAncestors" ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
1211
+ const clippingAncestors = [...elementClippingAncestors, rootBoundary];
1212
+ const firstClippingAncestor = clippingAncestors[0];
1213
+ const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
1214
+ const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);
1215
+ accRect.top = max2(rect.top, accRect.top);
1216
+ accRect.right = min2(rect.right, accRect.right);
1217
+ accRect.bottom = min2(rect.bottom, accRect.bottom);
1218
+ accRect.left = max2(rect.left, accRect.left);
1219
+ return accRect;
1220
+ }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));
1221
+ return {
1222
+ width: clippingRect.right - clippingRect.left,
1223
+ height: clippingRect.bottom - clippingRect.top,
1224
+ x: clippingRect.left,
1225
+ y: clippingRect.top
1226
+ };
1227
+ }
1228
+ function getDimensions(element) {
1229
+ return getCssDimensions(element);
1230
+ }
1231
+ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
1232
+ const isOffsetParentAnElement = isHTMLElement(offsetParent);
1233
+ const documentElement = getDocumentElement(offsetParent);
1234
+ const isFixed = strategy === "fixed";
1235
+ const rect = getBoundingClientRect(element, true, isFixed, offsetParent);
1236
+ let scroll = {
1237
+ scrollLeft: 0,
1238
+ scrollTop: 0
1239
+ };
1240
+ const offsets = createCoords(0);
1241
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1242
+ if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
1243
+ scroll = getNodeScroll(offsetParent);
1244
+ }
1245
+ if (isOffsetParentAnElement) {
1246
+ const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);
1247
+ offsets.x = offsetRect.x + offsetParent.clientLeft;
1248
+ offsets.y = offsetRect.y + offsetParent.clientTop;
1249
+ } else if (documentElement) {
1250
+ offsets.x = getWindowScrollBarX(documentElement);
1251
+ }
1252
+ }
1253
+ return {
1254
+ x: rect.left + scroll.scrollLeft - offsets.x,
1255
+ y: rect.top + scroll.scrollTop - offsets.y,
1256
+ width: rect.width,
1257
+ height: rect.height
1258
+ };
1259
+ }
1260
+ function getTrueOffsetParent(element, polyfill) {
1261
+ if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
1262
+ return null;
1263
+ }
1264
+ if (polyfill) {
1265
+ return polyfill(element);
1266
+ }
1267
+ return element.offsetParent;
1268
+ }
1269
+ function getOffsetParent(element, polyfill) {
1270
+ const window2 = getWindow(element);
1271
+ if (!isHTMLElement(element)) {
1272
+ return window2;
1273
+ }
1274
+ let offsetParent = getTrueOffsetParent(element, polyfill);
1275
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
1276
+ offsetParent = getTrueOffsetParent(offsetParent, polyfill);
1277
+ }
1278
+ if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
1279
+ return window2;
1280
+ }
1281
+ return offsetParent || getContainingBlock(element) || window2;
1282
+ }
1283
+ var getElementRects = async function(_ref) {
1284
+ let {
1285
+ reference,
1286
+ floating,
1287
+ strategy
1288
+ } = _ref;
1289
+ const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
1290
+ const getDimensionsFn = this.getDimensions;
1291
+ return {
1292
+ reference: getRectRelativeToOffsetParent(reference, await getOffsetParentFn(floating), strategy),
1293
+ floating: {
1294
+ x: 0,
1295
+ y: 0,
1296
+ ...await getDimensionsFn(floating)
1297
+ }
1298
+ };
1299
+ };
1300
+ function isRTL(element) {
1301
+ return getComputedStyle(element).direction === "rtl";
1302
+ }
1303
+ var platform = {
1304
+ convertOffsetParentRelativeRectToViewportRelativeRect,
1305
+ getDocumentElement,
1306
+ getClippingRect,
1307
+ getOffsetParent,
1308
+ getElementRects,
1309
+ getClientRects,
1310
+ getDimensions,
1311
+ getScale,
1312
+ isElement,
1313
+ isRTL
1314
+ };
1315
+ function observeMove(element, onMove) {
1316
+ let io = null;
1317
+ let timeoutId;
1318
+ const root = getDocumentElement(element);
1319
+ function cleanup() {
1320
+ clearTimeout(timeoutId);
1321
+ io && io.disconnect();
1322
+ io = null;
1323
+ }
1324
+ function refresh(skip, threshold) {
1325
+ if (skip === void 0) {
1326
+ skip = false;
1327
+ }
1328
+ if (threshold === void 0) {
1329
+ threshold = 1;
1330
+ }
1331
+ cleanup();
1332
+ const {
1333
+ left,
1334
+ top,
1335
+ width,
1336
+ height
1337
+ } = element.getBoundingClientRect();
1338
+ if (!skip) {
1339
+ onMove();
1340
+ }
1341
+ if (!width || !height) {
1342
+ return;
1343
+ }
1344
+ const insetTop = floor(top);
1345
+ const insetRight = floor(root.clientWidth - (left + width));
1346
+ const insetBottom = floor(root.clientHeight - (top + height));
1347
+ const insetLeft = floor(left);
1348
+ const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
1349
+ const options = {
1350
+ rootMargin,
1351
+ threshold: max2(0, min2(1, threshold)) || 1
1352
+ };
1353
+ let isFirstUpdate = true;
1354
+ function handleObserve(entries) {
1355
+ const ratio = entries[0].intersectionRatio;
1356
+ if (ratio !== threshold) {
1357
+ if (!isFirstUpdate) {
1358
+ return refresh();
1359
+ }
1360
+ if (!ratio) {
1361
+ timeoutId = setTimeout(() => {
1362
+ refresh(false, 1e-7);
1363
+ }, 100);
1364
+ } else {
1365
+ refresh(false, ratio);
1366
+ }
1367
+ }
1368
+ isFirstUpdate = false;
1369
+ }
1370
+ try {
1371
+ io = new IntersectionObserver(handleObserve, {
1372
+ ...options,
1373
+ // Handle <iframe>s
1374
+ root: root.ownerDocument
1375
+ });
1376
+ } catch (e) {
1377
+ io = new IntersectionObserver(handleObserve, options);
1378
+ }
1379
+ io.observe(element);
1380
+ }
1381
+ refresh(true);
1382
+ return cleanup;
1383
+ }
1384
+ function autoUpdate(reference, floating, update, options) {
1385
+ if (options === void 0) {
1386
+ options = {};
1387
+ }
1388
+ const {
1389
+ ancestorScroll = true,
1390
+ ancestorResize = true,
1391
+ elementResize = typeof ResizeObserver === "function",
1392
+ layoutShift = typeof IntersectionObserver === "function",
1393
+ animationFrame = false
1394
+ } = options;
1395
+ const referenceEl = unwrapElement(reference);
1396
+ const ancestors = ancestorScroll || ancestorResize ? [...referenceEl ? getOverflowAncestors(referenceEl) : [], ...getOverflowAncestors(floating)] : [];
1397
+ ancestors.forEach((ancestor) => {
1398
+ ancestorScroll && ancestor.addEventListener("scroll", update, {
1399
+ passive: true
1400
+ });
1401
+ ancestorResize && ancestor.addEventListener("resize", update);
1402
+ });
1403
+ const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
1404
+ let reobserveFrame = -1;
1405
+ let resizeObserver = null;
1406
+ if (elementResize) {
1407
+ resizeObserver = new ResizeObserver((_ref) => {
1408
+ let [firstEntry] = _ref;
1409
+ if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
1410
+ resizeObserver.unobserve(floating);
1411
+ cancelAnimationFrame(reobserveFrame);
1412
+ reobserveFrame = requestAnimationFrame(() => {
1413
+ resizeObserver && resizeObserver.observe(floating);
1414
+ });
1415
+ }
1416
+ update();
1417
+ });
1418
+ if (referenceEl && !animationFrame) {
1419
+ resizeObserver.observe(referenceEl);
1420
+ }
1421
+ resizeObserver.observe(floating);
1422
+ }
1423
+ let frameId;
1424
+ let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
1425
+ if (animationFrame) {
1426
+ frameLoop();
1427
+ }
1428
+ function frameLoop() {
1429
+ const nextRefRect = getBoundingClientRect(reference);
1430
+ if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
1431
+ update();
1432
+ }
1433
+ prevRefRect = nextRefRect;
1434
+ frameId = requestAnimationFrame(frameLoop);
1435
+ }
1436
+ update();
1437
+ return () => {
1438
+ ancestors.forEach((ancestor) => {
1439
+ ancestorScroll && ancestor.removeEventListener("scroll", update);
1440
+ ancestorResize && ancestor.removeEventListener("resize", update);
1441
+ });
1442
+ cleanupIo && cleanupIo();
1443
+ resizeObserver && resizeObserver.disconnect();
1444
+ resizeObserver = null;
1445
+ if (animationFrame) {
1446
+ cancelAnimationFrame(frameId);
1447
+ }
1448
+ };
1449
+ }
1450
+ var computePosition2 = (reference, floating, options) => {
1451
+ const cache = /* @__PURE__ */ new Map();
1452
+ const mergedOptions = {
1453
+ platform,
1454
+ ...options
1455
+ };
1456
+ const platformWithCache = {
1457
+ ...mergedOptions.platform,
1458
+ _c: cache
1459
+ };
1460
+ return computePosition(reference, floating, {
1461
+ ...mergedOptions,
1462
+ platform: platformWithCache
1463
+ });
1464
+ };
1465
+
1466
+ export {
1467
+ arrow,
1468
+ flip,
1469
+ hide,
1470
+ offset,
1471
+ shift,
1472
+ limitShift,
1473
+ size,
1474
+ getOverflowAncestors,
1475
+ autoUpdate,
1476
+ computePosition2 as computePosition
1477
+ };
1478
+ //# sourceMappingURL=chunk-5BIMFEMU.js.map