@trintel/zooy 1.0.1-beta.1 → 1.0.2

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 (254) hide show
  1. package/README.md +4 -4
  2. package/dist/chunks/button--cIzwEQA.js +66 -0
  3. package/dist/chunks/button-i6QyRwAM.js +272 -0
  4. package/dist/chunks/{button-skeleton-BcyctpC3.js → button-skeleton-Bk2Vw5Mq.js} +1 -1
  5. package/dist/chunks/{button-skeleton-DEmHtnd8.js → button-skeleton-D2TeTVpP.js} +5 -5
  6. package/dist/chunks/checkbox-Dyh34VfG.js +201 -0
  7. package/dist/chunks/checkbox-atdz21pu.js +40 -0
  8. package/dist/chunks/{class-map-Dt10N9TS.js → class-map-CziJvhVR.js} +1 -1
  9. package/dist/chunks/{class-map-emHvptF6.js → class-map-hWNVHb09.js} +1 -1
  10. package/dist/chunks/collection-helpers-Bk68Vaau.js +7 -0
  11. package/dist/chunks/collection-helpers-afBvMQaC.js +1 -0
  12. package/dist/chunks/content-switcher-item-88PWpM2j.js +27 -0
  13. package/dist/chunks/content-switcher-item-CpNfKVu-.js +351 -0
  14. package/dist/chunks/defs-C88lSWuJ.js +1 -0
  15. package/dist/chunks/defs-Do0OvCKd.js +1165 -0
  16. package/dist/chunks/dropdown-item-CDbnp5_k.js +621 -0
  17. package/dist/chunks/dropdown-item-CRyAm4Ku.js +69 -0
  18. package/dist/chunks/{focus-Dty12qxz.js → focus-B3iymVyL.js} +1 -1
  19. package/dist/chunks/{focus-Cyj1QfBL.js → focus-WnKGH_xB.js} +1 -1
  20. package/dist/chunks/{icon-loader-C2EqV5wJ.js → icon-loader-C3acLKRm.js} +1 -1
  21. package/dist/chunks/{icon-loader-DS-X84Yz.js → icon-loader-CsKt-G8D.js} +1 -1
  22. package/dist/chunks/{icon-loader-utils-B6kq3DHp.js → icon-loader-utils-DKbXKLDh.js} +1 -1
  23. package/dist/chunks/{icon-loader-utils-BIiU-zGK.js → icon-loader-utils-DXGGCFfD.js} +1 -1
  24. package/dist/chunks/{if-defined--xXVpdta.js → if-defined-D2rCHx2p.js} +1 -1
  25. package/dist/chunks/{if-defined-CFTJFEK6.js → if-defined-uehgcl8e.js} +1 -1
  26. package/dist/chunks/if-non-empty-BEpfFFDX.js +1 -0
  27. package/dist/chunks/{if-non-empty-0zvrDGPr.js → if-non-empty-CcwduEjT.js} +1 -1
  28. package/dist/chunks/index--Q3NhIVC.js +26 -0
  29. package/dist/chunks/index-B16kSrMy.js +259 -0
  30. package/dist/chunks/index-B6vimuhF.js +74 -0
  31. package/dist/chunks/index-B8fGrrzJ.js +235 -0
  32. package/dist/chunks/index-BEDYiyp9.js +15 -0
  33. package/dist/chunks/{index-BKsBoGOO.js → index-BEyCs2cc.js} +147 -135
  34. package/dist/chunks/index-BIJ3miZu.js +103 -0
  35. package/dist/chunks/index-BIvyXnIe.js +62 -0
  36. package/dist/chunks/{index-C6SudlSp.js → index-BMJjuXme.js} +1 -1
  37. package/dist/chunks/{index-B3EmHaO7.js → index-BMNd2Qad.js} +5 -5
  38. package/dist/chunks/{index-TCPPpE9b.js → index-BMNv7Afr.js} +1 -1
  39. package/dist/chunks/index-BMzAaQhy.js +52 -0
  40. package/dist/chunks/index-BODxU-Mu.js +455 -0
  41. package/dist/chunks/{index-CZ2kGMvF.js → index-BPRteboN.js} +6 -6
  42. package/dist/chunks/{index-1G2UuijG.js → index-BTUYIkmg.js} +9 -9
  43. package/dist/chunks/index-BUcMLg1n.js +35 -0
  44. package/dist/chunks/index-BVpkxHll.js +15 -0
  45. package/dist/chunks/index-BWBjCDwY.js +79 -0
  46. package/dist/chunks/index-BYHXKkvf.js +381 -0
  47. package/dist/chunks/index-BeKAg3cB.js +65 -0
  48. package/dist/chunks/index-Bgo3KCFI.js +364 -0
  49. package/dist/chunks/{index-DXoeeipa.js → index-Bh3jqbKV.js} +6 -6
  50. package/dist/chunks/{index-Ci2M9li9.js → index-Bk2MEnMu.js} +181 -182
  51. package/dist/chunks/index-BlAm81hv.js +79 -0
  52. package/dist/chunks/index-Bp5LwA_m.js +75 -0
  53. package/dist/chunks/index-BqExj5O7.js +158 -0
  54. package/dist/chunks/index-BrqEja9V.js +452 -0
  55. package/dist/chunks/{index-h66Bp4Cx.js → index-BtPiuBUm.js} +1 -1
  56. package/dist/chunks/index-Bu6R2tix.js +22 -0
  57. package/dist/chunks/index-Bug3BjgA.js +71 -0
  58. package/dist/chunks/index-BwhAoVy-.js +254 -0
  59. package/dist/chunks/index-BxGUZ-qP.js +17 -0
  60. package/dist/chunks/index-ByNfpHAO.js +368 -0
  61. package/dist/chunks/index-Byf_K1x1.js +111 -0
  62. package/dist/chunks/index-C-P030e_.js +260 -0
  63. package/dist/chunks/{index-BhJiw5Wx.js → index-C1Eehpcx.js} +1 -1
  64. package/dist/chunks/index-C4GpRDm7.js +15 -0
  65. package/dist/chunks/{index-Bd60xpxv.js → index-C5b2680a.js} +1 -1
  66. package/dist/chunks/{index-Df3VILTD.js → index-C5s9Z5Ou.js} +4 -4
  67. package/dist/chunks/index-C9HJjC2j.js +3 -0
  68. package/dist/chunks/index-CFG5exAl.js +19 -0
  69. package/dist/chunks/index-CHIQ4wsM.js +57 -0
  70. package/dist/chunks/index-CO_QGXLN.js +881 -0
  71. package/dist/chunks/index-CPLpCt6z.js +30 -0
  72. package/dist/chunks/{index-CArtDXbg.js → index-CP_zaIyv.js} +1 -1
  73. package/dist/chunks/index-CPzh43Kr.js +45 -0
  74. package/dist/chunks/{index-B1YLd9rD.js → index-CTEnXoVq.js} +1 -1
  75. package/dist/chunks/{index-CmA3uuMd.js → index-CUI3NPWg.js} +1 -1
  76. package/dist/chunks/{index-CZwmnbDv.js → index-C_JOABLw.js} +1 -1
  77. package/dist/chunks/index-C_NhQPDA.js +27 -0
  78. package/dist/chunks/{index-Cl1_9l1N.js → index-CbiknV4d.js} +1 -1
  79. package/dist/chunks/{index-DEcgB0oH.js → index-CcK76f0I.js} +4 -4
  80. package/dist/chunks/{index-D1PpRn2p.js → index-Cd1j7Qp1.js} +40 -31
  81. package/dist/chunks/{index-LR7m5odx.js → index-Chyr-DU2.js} +3 -3
  82. package/dist/chunks/index-CjVvmbL6.js +22 -0
  83. package/dist/chunks/index-CsKII5mz.js +1 -0
  84. package/dist/chunks/index-CwpgmKTP.js +87 -0
  85. package/dist/chunks/index-CxJCioQg.js +77 -0
  86. package/dist/chunks/{index-CKBFfWOV.js → index-CyF5Kef-.js} +7 -7
  87. package/dist/chunks/index-CyR413wv.js +511 -0
  88. package/dist/chunks/{index-C3LD0iwa.js → index-CyvZ9jxn.js} +12 -12
  89. package/dist/chunks/index-Czs-UAWh.js +129 -0
  90. package/dist/chunks/{index-DocEKbBo.js → index-D-iqTNbL.js} +5 -5
  91. package/dist/chunks/index-D9nVgUNo.js +121 -0
  92. package/dist/chunks/{index-BJHILyIN.js → index-DDUqY4Rl.js} +3 -3
  93. package/dist/chunks/index-DEdeVoZn.js +42 -0
  94. package/dist/chunks/index-DEtGo4Q7.js +150 -0
  95. package/dist/chunks/{index-RlFlo7pl.js → index-DGvLgX2O.js} +1 -1
  96. package/dist/chunks/{index-cMdyiXPa.js → index-DGvVa-5J.js} +1 -1
  97. package/dist/chunks/index-DIg4fP-p.js +683 -0
  98. package/dist/chunks/index-DNkLJEg1.js +1604 -0
  99. package/dist/chunks/index-DPCfOgTU.js +89 -0
  100. package/dist/chunks/index-DPnGRDRl.js +1 -0
  101. package/dist/chunks/index-DQ4Y-fiZ.js +150 -0
  102. package/dist/chunks/{index-DkUS58Ay.js → index-DSMPUWJU.js} +14 -14
  103. package/dist/chunks/{index-Clei4V9i.js → index-DSgb2u7b.js} +1 -1
  104. package/dist/chunks/index-DTadLLRG.js +160 -0
  105. package/dist/chunks/index-DTtMSAgV.js +25 -0
  106. package/dist/chunks/index-DX2JlRat.js +12 -0
  107. package/dist/chunks/index-DZrmJ7Ll.js +243 -0
  108. package/dist/chunks/{index-CYg05Ph9.js → index-DdkIREYU.js} +4 -4
  109. package/dist/chunks/index-DkphY0sd.js +46 -0
  110. package/dist/chunks/index-Do9f8Pwe.js +45 -0
  111. package/dist/chunks/index-Dr4evLL7.js +414 -0
  112. package/dist/chunks/{index-BG3BMHhy.js → index-DwCXQC7X.js} +3 -3
  113. package/dist/chunks/index-DwDG_y9_.js +58 -0
  114. package/dist/chunks/index-F2zwTZm1.js +19 -0
  115. package/dist/chunks/index-HbS1lUW6.js +12 -0
  116. package/dist/chunks/index-LtB-4-X9.js +1 -0
  117. package/dist/chunks/index-QuyEX50y.js +49 -0
  118. package/dist/chunks/{index-CYpHcMws.js → index-WpBhhuED.js} +4 -4
  119. package/dist/chunks/{index-DQZqjZ8k.js → index-d0CqW2Cm.js} +7 -7
  120. package/dist/chunks/{index-C_Xg4nHN.js → index-el9l-ZQy.js} +7 -7
  121. package/dist/chunks/index-gfbRBI-d.js +1 -0
  122. package/dist/chunks/index-hhX-bWEv.js +252 -0
  123. package/dist/chunks/{index-Dl6HFhg1.js → index-jdx-M5Y-.js} +1 -1
  124. package/dist/chunks/index-nfJ9ioGW.js +406 -0
  125. package/dist/chunks/{index-BQNhvN2i.js → index-oS8XvY4G.js} +4 -4
  126. package/dist/chunks/index-t9TINCcm.js +563 -0
  127. package/dist/chunks/index-tQGRhvw0.js +337 -0
  128. package/dist/chunks/index-tdmIA8Xp.js +291 -0
  129. package/dist/chunks/index-w027CjA0.js +81 -0
  130. package/dist/chunks/index-wgp15jn2.js +188 -0
  131. package/dist/chunks/index-xipeWGGU.js +2 -0
  132. package/dist/chunks/{loading-icon-D7mJr3sa.js → loading-icon-CN-iehcR.js} +2 -2
  133. package/dist/chunks/{loading-icon-Bw73Z2Lq.js → loading-icon-q__8yLZw.js} +1 -1
  134. package/dist/chunks/main-BPWCMI5R.js +65 -0
  135. package/dist/chunks/{main-DTOZMPON.js → main-BywCEBtD.js} +1437 -1031
  136. package/dist/chunks/{property-C5teVlku.js → property-DCTz3KPt.js} +1 -1
  137. package/dist/chunks/{property-Coy6Dag6.js → property-DzfJpYmn.js} +1 -1
  138. package/dist/chunks/{register-BO2Fr57T.js → register-B4yRiHm6.js} +1 -1
  139. package/dist/chunks/register-C3XDWad0.js +1618 -0
  140. package/dist/chunks/{register-CHuMnx--.js → register-CyNp_638.js} +1 -1
  141. package/dist/chunks/register-DpOrINOx.js +1 -0
  142. package/dist/chunks/search-BCJx6Xft.js +240 -0
  143. package/dist/chunks/search-CzmoEHwa.js +30 -0
  144. package/dist/chunks/select-0jyl720Y.js +357 -0
  145. package/dist/chunks/select-DC0T8Fw_.js +76 -0
  146. package/dist/chunks/{settings-NO9fjW0P.js → settings-Bgpv8zuU.js} +2 -0
  147. package/dist/chunks/{settings-Dy9UPb4i.js → settings-jvP7vP60.js} +2 -0
  148. package/dist/chunks/{state-BFc9dfyj.js → state-BiEAGUqO.js} +1 -1
  149. package/dist/chunks/{state-C2XTwLOv.js → state-DJQLwKiU.js} +1 -1
  150. package/dist/chunks/text-input-BGuFqOdN.js +372 -0
  151. package/dist/chunks/text-input-BPvBDzky.js +68 -0
  152. package/dist/chunks/tooltip-content-BOefn0hU.js +3 -0
  153. package/dist/chunks/tooltip-content-CWdOnBaw.js +135 -0
  154. package/dist/chunks/{unsafe-html-H7RRvoR7.js → unsafe-html-Bi2pB4Lb.js} +1 -1
  155. package/dist/chunks/{unsafe-html-9YCxB3h1.js → unsafe-html-xqClX-6M.js} +1 -1
  156. package/dist/zooy.cjs.js +1 -1
  157. package/dist/zooy.es.js +11 -11
  158. package/package.json +2 -2
  159. package/src/sass/carbon.scss +78 -4
  160. package/src/sass/panels.scss +263 -377
  161. package/src/sass/split.scss +0 -13
  162. package/dist/chunks/button-CgQW6Alg.js +0 -272
  163. package/dist/chunks/button-CnwdjMNF.js +0 -66
  164. package/dist/chunks/checkbox-Bt024Adv.js +0 -40
  165. package/dist/chunks/checkbox-D2LeqAn8.js +0 -201
  166. package/dist/chunks/collection-helpers-BwUB2CEz.js +0 -8
  167. package/dist/chunks/collection-helpers-CYLIiyii.js +0 -1
  168. package/dist/chunks/content-switcher-item-D6gOZCuS.js +0 -351
  169. package/dist/chunks/content-switcher-item-Dtv8UD1x.js +0 -27
  170. package/dist/chunks/defs-DMmigODC.js +0 -1077
  171. package/dist/chunks/defs-DPD20sPK.js +0 -1
  172. package/dist/chunks/dropdown-item-BDRUe-IF.js +0 -621
  173. package/dist/chunks/dropdown-item-DNLmqxnr.js +0 -69
  174. package/dist/chunks/if-non-empty-BIwvmklX.js +0 -1
  175. package/dist/chunks/index-21j_5emj.js +0 -35
  176. package/dist/chunks/index-82K_ozYZ.js +0 -455
  177. package/dist/chunks/index-B4JPT-gj.js +0 -683
  178. package/dist/chunks/index-B5-56fkV.js +0 -62
  179. package/dist/chunks/index-B612bWya.js +0 -58
  180. package/dist/chunks/index-B8nOkbPA.js +0 -77
  181. package/dist/chunks/index-BAEdnwkZ.js +0 -25
  182. package/dist/chunks/index-BAMMtRO9.js +0 -214
  183. package/dist/chunks/index-BC-p6lrw.js +0 -337
  184. package/dist/chunks/index-BEOc7JG-.js +0 -16
  185. package/dist/chunks/index-BHWaezgU.js +0 -259
  186. package/dist/chunks/index-BNjgzCq_.js +0 -1
  187. package/dist/chunks/index-BTND2b3S.js +0 -19
  188. package/dist/chunks/index-BZmOT6Xm.js +0 -89
  189. package/dist/chunks/index-B_C9vt_w.js +0 -30
  190. package/dist/chunks/index-B_JMGygD.js +0 -188
  191. package/dist/chunks/index-Bl6sE0-K.js +0 -1
  192. package/dist/chunks/index-BmvLxuoI.js +0 -16
  193. package/dist/chunks/index-BwMEAhRr.js +0 -2
  194. package/dist/chunks/index-BwOJ4JFm.js +0 -1604
  195. package/dist/chunks/index-BzmpjZ1o.js +0 -26
  196. package/dist/chunks/index-C06cFvgb.js +0 -406
  197. package/dist/chunks/index-C4JzGVcF.js +0 -49
  198. package/dist/chunks/index-C5nYdcCH.js +0 -875
  199. package/dist/chunks/index-C6WHuZdF.js +0 -79
  200. package/dist/chunks/index-C8YWVLB0.js +0 -128
  201. package/dist/chunks/index-C8miW4lw.js +0 -364
  202. package/dist/chunks/index-CDNshf0_.js +0 -57
  203. package/dist/chunks/index-CFYfFa1Z.js +0 -235
  204. package/dist/chunks/index-CJZtiqY-.js +0 -22
  205. package/dist/chunks/index-CMD0FIe-.js +0 -41
  206. package/dist/chunks/index-COcNpxlj.js +0 -87
  207. package/dist/chunks/index-CUTw26ex.js +0 -368
  208. package/dist/chunks/index-CUd_43Fv.js +0 -414
  209. package/dist/chunks/index-CXgbBzE5.js +0 -252
  210. package/dist/chunks/index-C_S3O2rJ.js +0 -79
  211. package/dist/chunks/index-CbuopDOc.js +0 -1
  212. package/dist/chunks/index-CcxiTkam.js +0 -150
  213. package/dist/chunks/index-Ce9jg1n7.js +0 -15
  214. package/dist/chunks/index-CfLbYyk0.js +0 -3
  215. package/dist/chunks/index-CkMd-UJg.js +0 -52
  216. package/dist/chunks/index-Co5m8M3y.js +0 -12
  217. package/dist/chunks/index-CoPuejcu.js +0 -511
  218. package/dist/chunks/index-Cq6Vdh__.js +0 -215
  219. package/dist/chunks/index-Cwe1NunF.js +0 -46
  220. package/dist/chunks/index-D1OTs_P5.js +0 -1
  221. package/dist/chunks/index-D3ldTviC.js +0 -150
  222. package/dist/chunks/index-DBvXH68A.js +0 -26
  223. package/dist/chunks/index-DC7qmnoW.js +0 -74
  224. package/dist/chunks/index-DDRkmmQp.js +0 -156
  225. package/dist/chunks/index-DH9eR0DH.js +0 -32
  226. package/dist/chunks/index-DLUPGsWM.js +0 -71
  227. package/dist/chunks/index-D_pgjOiX.js +0 -81
  228. package/dist/chunks/index-DktSeVhc.js +0 -563
  229. package/dist/chunks/index-Dqe5xXlT.js +0 -160
  230. package/dist/chunks/index-DuGskRLI.js +0 -243
  231. package/dist/chunks/index-DyoG-yF-.js +0 -75
  232. package/dist/chunks/index-E_bjKqnf.js +0 -15
  233. package/dist/chunks/index-GRYR4d36.js +0 -394
  234. package/dist/chunks/index-H-w5fBQG.js +0 -65
  235. package/dist/chunks/index-HvLIPR2y.js +0 -291
  236. package/dist/chunks/index-OhwD9m-A.js +0 -12
  237. package/dist/chunks/index-XTPnXw_W.js +0 -45
  238. package/dist/chunks/index-ZyhwV5v-.js +0 -452
  239. package/dist/chunks/index-cFX6zBu4.js +0 -19
  240. package/dist/chunks/index-fghrBFfu.js +0 -103
  241. package/dist/chunks/index-wTRaGtNG.js +0 -45
  242. package/dist/chunks/index-wigDmvr8.js +0 -121
  243. package/dist/chunks/index-y_a1ZQAA.js +0 -111
  244. package/dist/chunks/main-A63e59aD.js +0 -67
  245. package/dist/chunks/register-B533U9U9.js +0 -1
  246. package/dist/chunks/register-ClkXTZwT.js +0 -1383
  247. package/dist/chunks/search-CsRC23Cp.js +0 -240
  248. package/dist/chunks/search-DsyFfaxl.js +0 -30
  249. package/dist/chunks/select-BoaR85ix.js +0 -76
  250. package/dist/chunks/select-CKe8zwIo.js +0 -357
  251. package/dist/chunks/text-input-BuK8MjZG.js +0 -68
  252. package/dist/chunks/text-input-D2BsjPTx.js +0 -372
  253. package/dist/chunks/tooltip-content-B6aAm7Zu.js +0 -3
  254. package/dist/chunks/tooltip-content-DXrPA6JW.js +0 -135
@@ -0,0 +1,1165 @@
1
+ const zt = ["top", "right", "bottom", "left"], j = Math.min, R = Math.max, nt = Math.round, et = Math.floor, P = (t) => ({
2
+ x: t,
3
+ y: t
4
+ }), Xt = {
5
+ left: "right",
6
+ right: "left",
7
+ bottom: "top",
8
+ top: "bottom"
9
+ }, Yt = {
10
+ start: "end",
11
+ end: "start"
12
+ };
13
+ function jt(t, e, n) {
14
+ return R(t, j(e, n));
15
+ }
16
+ function Z(t, e) {
17
+ return typeof t == "function" ? t(e) : t;
18
+ }
19
+ function q(t) {
20
+ return t.split("-")[0];
21
+ }
22
+ function I(t) {
23
+ return t.split("-")[1];
24
+ }
25
+ function Ut(t) {
26
+ return t === "x" ? "y" : "x";
27
+ }
28
+ function mt(t) {
29
+ return t === "y" ? "height" : "width";
30
+ }
31
+ const Vt = /* @__PURE__ */ new Set(["top", "bottom"]);
32
+ function Y(t) {
33
+ return Vt.has(q(t)) ? "y" : "x";
34
+ }
35
+ function ht(t) {
36
+ return Ut(Y(t));
37
+ }
38
+ function qt(t, e, n) {
39
+ n === void 0 && (n = !1);
40
+ const o = I(t), i = ht(t), r = mt(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 = ot(s)), [s, ot(s)];
43
+ }
44
+ function Kt(t) {
45
+ const e = ot(t);
46
+ return [ut(t), e, ut(e)];
47
+ }
48
+ function ut(t) {
49
+ return t.replace(/start|end/g, (e) => Yt[e]);
50
+ }
51
+ const yt = ["left", "right"], bt = ["right", "left"], Jt = ["top", "bottom"], Qt = ["bottom", "top"];
52
+ function Zt(t, e, n) {
53
+ switch (t) {
54
+ case "top":
55
+ case "bottom":
56
+ return n ? e ? bt : yt : e ? yt : bt;
57
+ case "left":
58
+ case "right":
59
+ return e ? Jt : Qt;
60
+ default:
61
+ return [];
62
+ }
63
+ }
64
+ function It(t, e, n, o) {
65
+ const i = I(t);
66
+ let r = Zt(q(t), n === "start", o);
67
+ return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(ut)))), r;
68
+ }
69
+ function ot(t) {
70
+ return t.replace(/left|right|bottom|top/g, (e) => Xt[e]);
71
+ }
72
+ function Nt(t) {
73
+ return {
74
+ top: 0,
75
+ right: 0,
76
+ bottom: 0,
77
+ left: 0,
78
+ ...t
79
+ };
80
+ }
81
+ function Ft(t) {
82
+ return typeof t != "number" ? Nt(t) : {
83
+ top: t,
84
+ right: t,
85
+ bottom: t,
86
+ left: t
87
+ };
88
+ }
89
+ function it(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 xt(t, e, n) {
108
+ let {
109
+ reference: o,
110
+ floating: i
111
+ } = t;
112
+ const r = Y(e), s = ht(e), l = mt(s), a = q(e), c = r === "y", f = o.x + o.width / 2 - i.width / 2, d = o.y + o.height / 2 - i.height / 2, p = o[l] / 2 - i[l] / 2;
113
+ let u;
114
+ switch (a) {
115
+ case "top":
116
+ u = {
117
+ x: f,
118
+ y: o.y - i.height
119
+ };
120
+ break;
121
+ case "bottom":
122
+ u = {
123
+ x: f,
124
+ y: o.y + o.height
125
+ };
126
+ break;
127
+ case "right":
128
+ u = {
129
+ x: o.x + o.width,
130
+ y: d
131
+ };
132
+ break;
133
+ case "left":
134
+ u = {
135
+ x: o.x - i.width,
136
+ y: d
137
+ };
138
+ break;
139
+ default:
140
+ u = {
141
+ x: o.x,
142
+ y: o.y
143
+ };
144
+ }
145
+ switch (I(e)) {
146
+ case "start":
147
+ u[s] -= p * (n && c ? -1 : 1);
148
+ break;
149
+ case "end":
150
+ u[s] += p * (n && c ? -1 : 1);
151
+ break;
152
+ }
153
+ return u;
154
+ }
155
+ const Gt = async (t, e, n) => {
156
+ const {
157
+ placement: o = "bottom",
158
+ strategy: i = "absolute",
159
+ middleware: r = [],
160
+ platform: s
161
+ } = n, l = r.filter(Boolean), a = await (s.isRTL == null ? void 0 : s.isRTL(e));
162
+ let c = await s.getElementRects({
163
+ reference: t,
164
+ floating: e,
165
+ strategy: i
166
+ }), {
167
+ x: f,
168
+ y: d
169
+ } = xt(c, o, a), p = o, u = {}, m = 0;
170
+ for (let g = 0; g < l.length; g++) {
171
+ const {
172
+ name: h,
173
+ fn: w
174
+ } = l[g], {
175
+ x: b,
176
+ y: x,
177
+ data: v,
178
+ reset: y
179
+ } = await w({
180
+ x: f,
181
+ y: d,
182
+ initialPlacement: o,
183
+ placement: p,
184
+ strategy: i,
185
+ middlewareData: u,
186
+ rects: c,
187
+ platform: s,
188
+ elements: {
189
+ reference: t,
190
+ floating: e
191
+ }
192
+ });
193
+ f = b ?? f, d = x ?? d, u = {
194
+ ...u,
195
+ [h]: {
196
+ ...u[h],
197
+ ...v
198
+ }
199
+ }, y && m <= 50 && (m++, typeof y == "object" && (y.placement && (p = y.placement), y.rects && (c = y.rects === !0 ? await s.getElementRects({
200
+ reference: t,
201
+ floating: e,
202
+ strategy: i
203
+ }) : y.rects), {
204
+ x: f,
205
+ y: d
206
+ } = xt(c, p, a)), g = -1);
207
+ }
208
+ return {
209
+ x: f,
210
+ y: d,
211
+ placement: p,
212
+ strategy: i,
213
+ middlewareData: u
214
+ };
215
+ };
216
+ async function st(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: l,
225
+ strategy: a
226
+ } = t, {
227
+ boundary: c = "clippingAncestors",
228
+ rootBoundary: f = "viewport",
229
+ elementContext: d = "floating",
230
+ altBoundary: p = !1,
231
+ padding: u = 0
232
+ } = Z(e, t), m = Ft(u), h = l[p ? d === "floating" ? "reference" : "floating" : d], w = it(await r.getClippingRect({
233
+ element: (n = await (r.isElement == null ? void 0 : r.isElement(h))) == null || n ? h : h.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
234
+ boundary: c,
235
+ rootBoundary: f,
236
+ strategy: a
237
+ })), b = d === "floating" ? {
238
+ x: o,
239
+ y: i,
240
+ width: s.floating.width,
241
+ height: s.floating.height
242
+ } : s.reference, x = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), v = await (r.isElement == null ? void 0 : r.isElement(x)) ? await (r.getScale == null ? void 0 : r.getScale(x)) || {
243
+ x: 1,
244
+ y: 1
245
+ } : {
246
+ x: 1,
247
+ y: 1
248
+ }, y = it(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
249
+ elements: l,
250
+ rect: b,
251
+ offsetParent: x,
252
+ strategy: a
253
+ }) : b);
254
+ return {
255
+ top: (w.top - y.top + m.top) / v.y,
256
+ bottom: (y.bottom - w.bottom + m.bottom) / v.y,
257
+ left: (w.left - y.left + m.left) / v.x,
258
+ right: (y.right - w.right + m.right) / v.x
259
+ };
260
+ }
261
+ const te = (t) => ({
262
+ name: "arrow",
263
+ options: t,
264
+ async fn(e) {
265
+ const {
266
+ x: n,
267
+ y: o,
268
+ placement: i,
269
+ rects: r,
270
+ platform: s,
271
+ elements: l,
272
+ middlewareData: a
273
+ } = e, {
274
+ element: c,
275
+ padding: f = 0
276
+ } = Z(t, e) || {};
277
+ if (c == null)
278
+ return {};
279
+ const d = Ft(f), p = {
280
+ x: n,
281
+ y: o
282
+ }, u = ht(i), m = mt(u), g = await s.getDimensions(c), h = u === "y", w = h ? "top" : "left", b = h ? "bottom" : "right", x = h ? "clientHeight" : "clientWidth", v = r.reference[m] + r.reference[u] - p[u] - r.floating[m], y = p[u] - r.reference[u], S = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c));
283
+ let T = S ? S[x] : 0;
284
+ (!T || !await (s.isElement == null ? void 0 : s.isElement(S))) && (T = l.floating[x] || r.floating[m]);
285
+ const D = v / 2 - y / 2, L = T / 2 - g[m] / 2 - 1, A = j(d[w], L), k = j(d[b], L), F = A, z = T - g[m] - k, C = T / 2 - g[m] / 2 + D, V = jt(F, C, z), M = !a.arrow && I(i) != null && C !== V && r.reference[m] / 2 - (C < F ? A : k) - g[m] / 2 < 0, B = M ? C < F ? C - F : C - z : 0;
286
+ return {
287
+ [u]: p[u] + B,
288
+ data: {
289
+ [u]: V,
290
+ centerOffset: C - V - B,
291
+ ...M && {
292
+ alignmentOffset: B
293
+ }
294
+ },
295
+ reset: M
296
+ };
297
+ }
298
+ }), ee = function(t) {
299
+ return t === void 0 && (t = {}), {
300
+ name: "flip",
301
+ options: t,
302
+ async fn(e) {
303
+ var n, o;
304
+ const {
305
+ placement: i,
306
+ middlewareData: r,
307
+ rects: s,
308
+ initialPlacement: l,
309
+ platform: a,
310
+ elements: c
311
+ } = e, {
312
+ mainAxis: f = !0,
313
+ crossAxis: d = !0,
314
+ fallbackPlacements: p,
315
+ fallbackStrategy: u = "bestFit",
316
+ fallbackAxisSideDirection: m = "none",
317
+ flipAlignment: g = !0,
318
+ ...h
319
+ } = Z(t, e);
320
+ if ((n = r.arrow) != null && n.alignmentOffset)
321
+ return {};
322
+ const w = q(i), b = Y(l), x = q(l) === l, v = await (a.isRTL == null ? void 0 : a.isRTL(c.floating)), y = p || (x || !g ? [ot(l)] : Kt(l)), S = m !== "none";
323
+ !p && S && y.push(...It(l, g, m, v));
324
+ const T = [l, ...y], D = await st(e, h), L = [];
325
+ let A = ((o = r.flip) == null ? void 0 : o.overflows) || [];
326
+ if (f && L.push(D[w]), d) {
327
+ const C = qt(i, s, v);
328
+ L.push(D[C[0]], D[C[1]]);
329
+ }
330
+ if (A = [...A, {
331
+ placement: i,
332
+ overflows: L
333
+ }], !L.every((C) => C <= 0)) {
334
+ var k, F;
335
+ const C = (((k = r.flip) == null ? void 0 : k.index) || 0) + 1, V = T[C];
336
+ if (V && (!(d === "alignment" ? b !== Y(V) : !1) || // We leave the current main axis only if every placement on that axis
337
+ // overflows the main axis.
338
+ A.every((H) => Y(H.placement) === b ? H.overflows[0] > 0 : !0)))
339
+ return {
340
+ data: {
341
+ index: C,
342
+ overflows: A
343
+ },
344
+ reset: {
345
+ placement: V
346
+ }
347
+ };
348
+ let M = (F = A.filter((B) => B.overflows[0] <= 0).sort((B, H) => B.overflows[1] - H.overflows[1])[0]) == null ? void 0 : F.placement;
349
+ if (!M)
350
+ switch (u) {
351
+ case "bestFit": {
352
+ var z;
353
+ const B = (z = A.filter((H) => {
354
+ if (S) {
355
+ const X = Y(H.placement);
356
+ return X === b || // Create a bias to the `y` side axis due to horizontal
357
+ // reading directions favoring greater width.
358
+ X === "y";
359
+ }
360
+ return !0;
361
+ }).map((H) => [H.placement, H.overflows.filter((X) => X > 0).reduce((X, Mt) => X + Mt, 0)]).sort((H, X) => H[1] - X[1])[0]) == null ? void 0 : z[0];
362
+ B && (M = B);
363
+ break;
364
+ }
365
+ case "initialPlacement":
366
+ M = l;
367
+ break;
368
+ }
369
+ if (i !== M)
370
+ return {
371
+ reset: {
372
+ placement: M
373
+ }
374
+ };
375
+ }
376
+ return {};
377
+ }
378
+ };
379
+ };
380
+ function vt(t, e) {
381
+ return {
382
+ top: t.top - e.height,
383
+ right: t.right - e.width,
384
+ bottom: t.bottom - e.height,
385
+ left: t.left - e.width
386
+ };
387
+ }
388
+ function Tt(t) {
389
+ return zt.some((e) => t[e] >= 0);
390
+ }
391
+ const ne = function(t) {
392
+ return t === void 0 && (t = {}), {
393
+ name: "hide",
394
+ options: t,
395
+ async fn(e) {
396
+ const {
397
+ rects: n
398
+ } = e, {
399
+ strategy: o = "referenceHidden",
400
+ ...i
401
+ } = Z(t, e);
402
+ switch (o) {
403
+ case "referenceHidden": {
404
+ const r = await st(e, {
405
+ ...i,
406
+ elementContext: "reference"
407
+ }), s = vt(r, n.reference);
408
+ return {
409
+ data: {
410
+ referenceHiddenOffsets: s,
411
+ referenceHidden: Tt(s)
412
+ }
413
+ };
414
+ }
415
+ case "escaped": {
416
+ const r = await st(e, {
417
+ ...i,
418
+ altBoundary: !0
419
+ }), s = vt(r, n.floating);
420
+ return {
421
+ data: {
422
+ escapedOffsets: s,
423
+ escaped: Tt(s)
424
+ }
425
+ };
426
+ }
427
+ default:
428
+ return {};
429
+ }
430
+ }
431
+ };
432
+ }, oe = /* @__PURE__ */ new Set(["left", "top"]);
433
+ async function ie(t, e) {
434
+ const {
435
+ placement: n,
436
+ platform: o,
437
+ elements: i
438
+ } = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = q(n), l = I(n), a = Y(n) === "y", c = oe.has(s) ? -1 : 1, f = r && a ? -1 : 1, d = Z(e, t);
439
+ let {
440
+ mainAxis: p,
441
+ crossAxis: u,
442
+ alignmentAxis: m
443
+ } = typeof d == "number" ? {
444
+ mainAxis: d,
445
+ crossAxis: 0,
446
+ alignmentAxis: null
447
+ } : {
448
+ mainAxis: d.mainAxis || 0,
449
+ crossAxis: d.crossAxis || 0,
450
+ alignmentAxis: d.alignmentAxis
451
+ };
452
+ return l && typeof m == "number" && (u = l === "end" ? m * -1 : m), a ? {
453
+ x: u * f,
454
+ y: p * c
455
+ } : {
456
+ x: p * c,
457
+ y: u * f
458
+ };
459
+ }
460
+ const se = function(t) {
461
+ return t === void 0 && (t = 0), {
462
+ name: "offset",
463
+ options: t,
464
+ async fn(e) {
465
+ var n, o;
466
+ const {
467
+ x: i,
468
+ y: r,
469
+ placement: s,
470
+ middlewareData: l
471
+ } = e, a = await ie(e, t);
472
+ return s === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
473
+ x: i + a.x,
474
+ y: r + a.y,
475
+ data: {
476
+ ...a,
477
+ placement: s
478
+ }
479
+ };
480
+ }
481
+ };
482
+ }, re = function(t) {
483
+ return t === void 0 && (t = {}), {
484
+ name: "size",
485
+ options: t,
486
+ async fn(e) {
487
+ var n, o;
488
+ const {
489
+ placement: i,
490
+ rects: r,
491
+ platform: s,
492
+ elements: l
493
+ } = e, {
494
+ apply: a = () => {
495
+ },
496
+ ...c
497
+ } = Z(t, e), f = await st(e, c), d = q(i), p = I(i), u = Y(i) === "y", {
498
+ width: m,
499
+ height: g
500
+ } = r.floating;
501
+ let h, w;
502
+ d === "top" || d === "bottom" ? (h = d, w = p === (await (s.isRTL == null ? void 0 : s.isRTL(l.floating)) ? "start" : "end") ? "left" : "right") : (w = d, h = p === "end" ? "top" : "bottom");
503
+ const b = g - f.top - f.bottom, x = m - f.left - f.right, v = j(g - f[h], b), y = j(m - f[w], x), S = !e.middlewareData.shift;
504
+ let T = v, D = y;
505
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (D = x), (o = e.middlewareData.shift) != null && o.enabled.y && (T = b), S && !p) {
506
+ const A = R(f.left, 0), k = R(f.right, 0), F = R(f.top, 0), z = R(f.bottom, 0);
507
+ u ? D = m - 2 * (A !== 0 || k !== 0 ? A + k : R(f.left, f.right)) : T = g - 2 * (F !== 0 || z !== 0 ? F + z : R(f.top, f.bottom));
508
+ }
509
+ await a({
510
+ ...e,
511
+ availableWidth: D,
512
+ availableHeight: T
513
+ });
514
+ const L = await s.getDimensions(l.floating);
515
+ return m !== L.width || g !== L.height ? {
516
+ reset: {
517
+ rects: !0
518
+ }
519
+ } : {};
520
+ }
521
+ };
522
+ };
523
+ function rt() {
524
+ return typeof window < "u";
525
+ }
526
+ function N(t) {
527
+ return kt(t) ? (t.nodeName || "").toLowerCase() : "#document";
528
+ }
529
+ function O(t) {
530
+ var e;
531
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
532
+ }
533
+ function _(t) {
534
+ var e;
535
+ return (e = (kt(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
536
+ }
537
+ function kt(t) {
538
+ return rt() ? t instanceof Node || t instanceof O(t).Node : !1;
539
+ }
540
+ function W(t) {
541
+ return rt() ? t instanceof Element || t instanceof O(t).Element : !1;
542
+ }
543
+ function $(t) {
544
+ return rt() ? t instanceof HTMLElement || t instanceof O(t).HTMLElement : !1;
545
+ }
546
+ function St(t) {
547
+ return !rt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof O(t).ShadowRoot;
548
+ }
549
+ const le = /* @__PURE__ */ new Set(["inline", "contents"]);
550
+ function tt(t) {
551
+ const {
552
+ overflow: e,
553
+ overflowX: n,
554
+ overflowY: o,
555
+ display: i
556
+ } = E(t);
557
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !le.has(i);
558
+ }
559
+ const ce = /* @__PURE__ */ new Set(["table", "td", "th"]);
560
+ function ae(t) {
561
+ return ce.has(N(t));
562
+ }
563
+ const fe = [":popover-open", ":modal"];
564
+ function lt(t) {
565
+ return fe.some((e) => {
566
+ try {
567
+ return t.matches(e);
568
+ } catch {
569
+ return !1;
570
+ }
571
+ });
572
+ }
573
+ const ue = ["transform", "translate", "scale", "rotate", "perspective"], de = ["transform", "translate", "scale", "rotate", "perspective", "filter"], me = ["paint", "layout", "strict", "content"];
574
+ function gt(t) {
575
+ const e = pt(), n = W(t) ? E(t) : t;
576
+ return ue.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) || de.some((o) => (n.willChange || "").includes(o)) || me.some((o) => (n.contain || "").includes(o));
577
+ }
578
+ function he(t) {
579
+ let e = U(t);
580
+ for (; $(e) && !Q(e); ) {
581
+ if (gt(e))
582
+ return e;
583
+ if (lt(e))
584
+ return null;
585
+ e = U(e);
586
+ }
587
+ return null;
588
+ }
589
+ function pt() {
590
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
591
+ }
592
+ const ge = /* @__PURE__ */ new Set(["html", "body", "#document"]);
593
+ function Q(t) {
594
+ return ge.has(N(t));
595
+ }
596
+ function E(t) {
597
+ return O(t).getComputedStyle(t);
598
+ }
599
+ function ct(t) {
600
+ return W(t) ? {
601
+ scrollLeft: t.scrollLeft,
602
+ scrollTop: t.scrollTop
603
+ } : {
604
+ scrollLeft: t.scrollX,
605
+ scrollTop: t.scrollY
606
+ };
607
+ }
608
+ function U(t) {
609
+ if (N(t) === "html")
610
+ return t;
611
+ const e = (
612
+ // Step into the shadow DOM of the parent of a slotted node.
613
+ t.assignedSlot || // DOM Element detected.
614
+ t.parentNode || // ShadowRoot detected.
615
+ St(t) && t.host || // Fallback.
616
+ _(t)
617
+ );
618
+ return St(e) ? e.host : e;
619
+ }
620
+ function Bt(t) {
621
+ const e = U(t);
622
+ return Q(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : $(e) && tt(e) ? e : Bt(e);
623
+ }
624
+ function G(t, e, n) {
625
+ var o;
626
+ e === void 0 && (e = []), n === void 0 && (n = !0);
627
+ const i = Bt(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = O(i);
628
+ if (r) {
629
+ const l = dt(s);
630
+ return e.concat(s, s.visualViewport || [], tt(i) ? i : [], l && n ? G(l) : []);
631
+ }
632
+ return e.concat(i, G(i, [], n));
633
+ }
634
+ function dt(t) {
635
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
636
+ }
637
+ function Ht(t) {
638
+ const e = E(t);
639
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
640
+ const i = $(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, l = nt(n) !== r || nt(o) !== s;
641
+ return l && (n = r, o = s), {
642
+ width: n,
643
+ height: o,
644
+ $: l
645
+ };
646
+ }
647
+ function wt(t) {
648
+ return W(t) ? t : t.contextElement;
649
+ }
650
+ function J(t) {
651
+ const e = wt(t);
652
+ if (!$(e))
653
+ return P(1);
654
+ const n = e.getBoundingClientRect(), {
655
+ width: o,
656
+ height: i,
657
+ $: r
658
+ } = Ht(e);
659
+ let s = (r ? nt(n.width) : n.width) / o, l = (r ? nt(n.height) : n.height) / i;
660
+ return (!s || !Number.isFinite(s)) && (s = 1), (!l || !Number.isFinite(l)) && (l = 1), {
661
+ x: s,
662
+ y: l
663
+ };
664
+ }
665
+ const pe = /* @__PURE__ */ P(0);
666
+ function Wt(t) {
667
+ const e = O(t);
668
+ return !pt() || !e.visualViewport ? pe : {
669
+ x: e.visualViewport.offsetLeft,
670
+ y: e.visualViewport.offsetTop
671
+ };
672
+ }
673
+ function we(t, e, n) {
674
+ return e === void 0 && (e = !1), !n || e && n !== O(t) ? !1 : e;
675
+ }
676
+ function K(t, e, n, o) {
677
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
678
+ const i = t.getBoundingClientRect(), r = wt(t);
679
+ let s = P(1);
680
+ e && (o ? W(o) && (s = J(o)) : s = J(t));
681
+ const l = we(r, n, o) ? Wt(r) : P(0);
682
+ let a = (i.left + l.x) / s.x, c = (i.top + l.y) / s.y, f = i.width / s.x, d = i.height / s.y;
683
+ if (r) {
684
+ const p = O(r), u = o && W(o) ? O(o) : o;
685
+ let m = p, g = dt(m);
686
+ for (; g && o && u !== m; ) {
687
+ const h = J(g), w = g.getBoundingClientRect(), b = E(g), x = w.left + (g.clientLeft + parseFloat(b.paddingLeft)) * h.x, v = w.top + (g.clientTop + parseFloat(b.paddingTop)) * h.y;
688
+ a *= h.x, c *= h.y, f *= h.x, d *= h.y, a += x, c += v, m = O(g), g = dt(m);
689
+ }
690
+ }
691
+ return it({
692
+ width: f,
693
+ height: d,
694
+ x: a,
695
+ y: c
696
+ });
697
+ }
698
+ function at(t, e) {
699
+ const n = ct(t).scrollLeft;
700
+ return e ? e.left + n : K(_(t)).left + n;
701
+ }
702
+ function Et(t, e) {
703
+ const n = t.getBoundingClientRect(), o = n.left + e.scrollLeft - at(t, n), i = n.top + e.scrollTop;
704
+ return {
705
+ x: o,
706
+ y: i
707
+ };
708
+ }
709
+ function ye(t) {
710
+ let {
711
+ elements: e,
712
+ rect: n,
713
+ offsetParent: o,
714
+ strategy: i
715
+ } = t;
716
+ const r = i === "fixed", s = _(o), l = e ? lt(e.floating) : !1;
717
+ if (o === s || l && r)
718
+ return n;
719
+ let a = {
720
+ scrollLeft: 0,
721
+ scrollTop: 0
722
+ }, c = P(1);
723
+ const f = P(0), d = $(o);
724
+ if ((d || !d && !r) && ((N(o) !== "body" || tt(s)) && (a = ct(o)), $(o))) {
725
+ const u = K(o);
726
+ c = J(o), f.x = u.x + o.clientLeft, f.y = u.y + o.clientTop;
727
+ }
728
+ const p = s && !d && !r ? Et(s, a) : P(0);
729
+ return {
730
+ width: n.width * c.x,
731
+ height: n.height * c.y,
732
+ x: n.x * c.x - a.scrollLeft * c.x + f.x + p.x,
733
+ y: n.y * c.y - a.scrollTop * c.y + f.y + p.y
734
+ };
735
+ }
736
+ function be(t) {
737
+ return Array.from(t.getClientRects());
738
+ }
739
+ function xe(t) {
740
+ const e = _(t), n = ct(t), o = t.ownerDocument.body, i = R(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = R(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
741
+ let s = -n.scrollLeft + at(t);
742
+ const l = -n.scrollTop;
743
+ return E(o).direction === "rtl" && (s += R(e.clientWidth, o.clientWidth) - i), {
744
+ width: i,
745
+ height: r,
746
+ x: s,
747
+ y: l
748
+ };
749
+ }
750
+ const At = 25;
751
+ function ve(t, e) {
752
+ const n = O(t), o = _(t), i = n.visualViewport;
753
+ let r = o.clientWidth, s = o.clientHeight, l = 0, a = 0;
754
+ if (i) {
755
+ r = i.width, s = i.height;
756
+ const f = pt();
757
+ (!f || f && e === "fixed") && (l = i.offsetLeft, a = i.offsetTop);
758
+ }
759
+ const c = at(o);
760
+ if (c <= 0) {
761
+ const f = o.ownerDocument, d = f.body, p = getComputedStyle(d), u = f.compatMode === "CSS1Compat" && parseFloat(p.marginLeft) + parseFloat(p.marginRight) || 0, m = Math.abs(o.clientWidth - d.clientWidth - u);
762
+ m <= At && (r -= m);
763
+ } else c <= At && (r += c);
764
+ return {
765
+ width: r,
766
+ height: s,
767
+ x: l,
768
+ y: a
769
+ };
770
+ }
771
+ const Te = /* @__PURE__ */ new Set(["absolute", "fixed"]);
772
+ function Se(t, e) {
773
+ const n = K(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = $(t) ? J(t) : P(1), s = t.clientWidth * r.x, l = t.clientHeight * r.y, a = i * r.x, c = o * r.y;
774
+ return {
775
+ width: s,
776
+ height: l,
777
+ x: a,
778
+ y: c
779
+ };
780
+ }
781
+ function Ct(t, e, n) {
782
+ let o;
783
+ if (e === "viewport")
784
+ o = ve(t, n);
785
+ else if (e === "document")
786
+ o = xe(_(t));
787
+ else if (W(e))
788
+ o = Se(e, n);
789
+ else {
790
+ const i = Wt(t);
791
+ o = {
792
+ x: e.x - i.x,
793
+ y: e.y - i.y,
794
+ width: e.width,
795
+ height: e.height
796
+ };
797
+ }
798
+ return it(o);
799
+ }
800
+ function Pt(t, e) {
801
+ const n = U(t);
802
+ return n === e || !W(n) || Q(n) ? !1 : E(n).position === "fixed" || Pt(n, e);
803
+ }
804
+ function Ae(t, e) {
805
+ const n = e.get(t);
806
+ if (n)
807
+ return n;
808
+ let o = G(t, [], !1).filter((l) => W(l) && N(l) !== "body"), i = null;
809
+ const r = E(t).position === "fixed";
810
+ let s = r ? U(t) : t;
811
+ for (; W(s) && !Q(s); ) {
812
+ const l = E(s), a = gt(s);
813
+ !a && l.position === "fixed" && (i = null), (r ? !a && !i : !a && l.position === "static" && !!i && Te.has(i.position) || tt(s) && !a && Pt(t, s)) ? o = o.filter((f) => f !== s) : i = l, s = U(s);
814
+ }
815
+ return e.set(t, o), o;
816
+ }
817
+ function Ce(t) {
818
+ let {
819
+ element: e,
820
+ boundary: n,
821
+ rootBoundary: o,
822
+ strategy: i
823
+ } = t;
824
+ const s = [...n === "clippingAncestors" ? lt(e) ? [] : Ae(e, this._c) : [].concat(n), o], l = s[0], a = s.reduce((c, f) => {
825
+ const d = Ct(e, f, i);
826
+ return c.top = R(d.top, c.top), c.right = j(d.right, c.right), c.bottom = j(d.bottom, c.bottom), c.left = R(d.left, c.left), c;
827
+ }, Ct(e, l, i));
828
+ return {
829
+ width: a.right - a.left,
830
+ height: a.bottom - a.top,
831
+ x: a.left,
832
+ y: a.top
833
+ };
834
+ }
835
+ function Re(t) {
836
+ const {
837
+ width: e,
838
+ height: n
839
+ } = Ht(t);
840
+ return {
841
+ width: e,
842
+ height: n
843
+ };
844
+ }
845
+ function Oe(t, e, n) {
846
+ const o = $(e), i = _(e), r = n === "fixed", s = K(t, !0, r, e);
847
+ let l = {
848
+ scrollLeft: 0,
849
+ scrollTop: 0
850
+ };
851
+ const a = P(0);
852
+ function c() {
853
+ a.x = at(i);
854
+ }
855
+ if (o || !o && !r)
856
+ if ((N(e) !== "body" || tt(i)) && (l = ct(e)), o) {
857
+ const u = K(e, !0, r, e);
858
+ a.x = u.x + e.clientLeft, a.y = u.y + e.clientTop;
859
+ } else i && c();
860
+ r && !o && i && c();
861
+ const f = i && !o && !r ? Et(i, l) : P(0), d = s.left + l.scrollLeft - a.x - f.x, p = s.top + l.scrollTop - a.y - f.y;
862
+ return {
863
+ x: d,
864
+ y: p,
865
+ width: s.width,
866
+ height: s.height
867
+ };
868
+ }
869
+ function ft(t) {
870
+ return E(t).position === "static";
871
+ }
872
+ function Rt(t, e) {
873
+ if (!$(t) || E(t).position === "fixed")
874
+ return null;
875
+ if (e)
876
+ return e(t);
877
+ let n = t.offsetParent;
878
+ return _(t) === n && (n = n.ownerDocument.body), n;
879
+ }
880
+ function $t(t, e) {
881
+ const n = O(t);
882
+ if (lt(t))
883
+ return n;
884
+ if (!$(t)) {
885
+ let i = U(t);
886
+ for (; i && !Q(i); ) {
887
+ if (W(i) && !ft(i))
888
+ return i;
889
+ i = U(i);
890
+ }
891
+ return n;
892
+ }
893
+ let o = Rt(t, e);
894
+ for (; o && ae(o) && ft(o); )
895
+ o = Rt(o, e);
896
+ return o && Q(o) && ft(o) && !gt(o) ? n : o || he(t) || n;
897
+ }
898
+ const De = async function(t) {
899
+ const e = this.getOffsetParent || $t, n = this.getDimensions, o = await n(t.floating);
900
+ return {
901
+ reference: Oe(t.reference, await e(t.floating), t.strategy),
902
+ floating: {
903
+ x: 0,
904
+ y: 0,
905
+ width: o.width,
906
+ height: o.height
907
+ }
908
+ };
909
+ };
910
+ function Le(t) {
911
+ return E(t).direction === "rtl";
912
+ }
913
+ const Fe = {
914
+ convertOffsetParentRelativeRectToViewportRelativeRect: ye,
915
+ getDocumentElement: _,
916
+ getClippingRect: Ce,
917
+ getOffsetParent: $t,
918
+ getElementRects: De,
919
+ getClientRects: be,
920
+ getDimensions: Re,
921
+ getScale: J,
922
+ isElement: W,
923
+ isRTL: Le
924
+ };
925
+ function _t(t, e) {
926
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
927
+ }
928
+ function ke(t, e) {
929
+ let n = null, o;
930
+ const i = _(t);
931
+ function r() {
932
+ var l;
933
+ clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
934
+ }
935
+ function s(l, a) {
936
+ l === void 0 && (l = !1), a === void 0 && (a = 1), r();
937
+ const c = t.getBoundingClientRect(), {
938
+ left: f,
939
+ top: d,
940
+ width: p,
941
+ height: u
942
+ } = c;
943
+ if (l || e(), !p || !u)
944
+ return;
945
+ const m = et(d), g = et(i.clientWidth - (f + p)), h = et(i.clientHeight - (d + u)), w = et(f), x = {
946
+ rootMargin: -m + "px " + -g + "px " + -h + "px " + -w + "px",
947
+ threshold: R(0, j(1, a)) || 1
948
+ };
949
+ let v = !0;
950
+ function y(S) {
951
+ const T = S[0].intersectionRatio;
952
+ if (T !== a) {
953
+ if (!v)
954
+ return s();
955
+ T ? s(!1, T) : o = setTimeout(() => {
956
+ s(!1, 1e-7);
957
+ }, 1e3);
958
+ }
959
+ T === 1 && !_t(c, t.getBoundingClientRect()) && s(), v = !1;
960
+ }
961
+ try {
962
+ n = new IntersectionObserver(y, {
963
+ ...x,
964
+ // Handle <iframe>s
965
+ root: i.ownerDocument
966
+ });
967
+ } catch {
968
+ n = new IntersectionObserver(y, x);
969
+ }
970
+ n.observe(t);
971
+ }
972
+ return s(!0), r;
973
+ }
974
+ function Be(t, e, n, o) {
975
+ o === void 0 && (o = {});
976
+ const {
977
+ ancestorScroll: i = !0,
978
+ ancestorResize: r = !0,
979
+ elementResize: s = typeof ResizeObserver == "function",
980
+ layoutShift: l = typeof IntersectionObserver == "function",
981
+ animationFrame: a = !1
982
+ } = o, c = wt(t), f = i || r ? [...c ? G(c) : [], ...G(e)] : [];
983
+ f.forEach((w) => {
984
+ i && w.addEventListener("scroll", n, {
985
+ passive: !0
986
+ }), r && w.addEventListener("resize", n);
987
+ });
988
+ const d = c && l ? ke(c, n) : null;
989
+ let p = -1, u = null;
990
+ s && (u = new ResizeObserver((w) => {
991
+ let [b] = w;
992
+ b && b.target === c && u && (u.unobserve(e), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
993
+ var x;
994
+ (x = u) == null || x.observe(e);
995
+ })), n();
996
+ }), c && !a && u.observe(c), u.observe(e));
997
+ let m, g = a ? K(t) : null;
998
+ a && h();
999
+ function h() {
1000
+ const w = K(t);
1001
+ g && !_t(g, w) && n(), g = w, m = requestAnimationFrame(h);
1002
+ }
1003
+ return n(), () => {
1004
+ var w;
1005
+ f.forEach((b) => {
1006
+ i && b.removeEventListener("scroll", n), r && b.removeEventListener("resize", n);
1007
+ }), d?.(), (w = u) == null || w.disconnect(), u = null, a && cancelAnimationFrame(m);
1008
+ };
1009
+ }
1010
+ const He = se, We = ee, Ot = re, Ee = ne, Pe = te, $e = (t, e, n) => {
1011
+ const o = /* @__PURE__ */ new Map(), i = {
1012
+ platform: Fe,
1013
+ ...n
1014
+ }, r = {
1015
+ ...i.platform,
1016
+ _c: o
1017
+ };
1018
+ return Gt(t, e, {
1019
+ ...i,
1020
+ platform: r
1021
+ });
1022
+ };
1023
+ class _e {
1024
+ /**
1025
+ * register with host component
1026
+ * @param host host component
1027
+ */
1028
+ constructor(e) {
1029
+ this.updatePlacement = () => {
1030
+ this.computePlacement();
1031
+ }, this.host = e, e.addController(this);
1032
+ }
1033
+ async setPlacement(e = this.options) {
1034
+ this.options = e;
1035
+ const { trigger: n, target: o } = e;
1036
+ this.cleanup = Be(n, o, this.updatePlacement);
1037
+ }
1038
+ async computePlacement() {
1039
+ var e, n, o;
1040
+ const { arrowElement: i, alignment: r, caret: s, trigger: l, target: a, styleElement: c, matchWidth: f, open: d, alignmentAxisOffset: p, autoAlignBoundary: u, isTabTip: m } = this.options, g = c ?? a;
1041
+ if (!g)
1042
+ return;
1043
+ let h;
1044
+ switch (r) {
1045
+ case "top-left":
1046
+ h = "top-start";
1047
+ break;
1048
+ case "top-right":
1049
+ h = "top-end";
1050
+ break;
1051
+ case "bottom-left":
1052
+ h = "bottom-start";
1053
+ break;
1054
+ case "bottom-right":
1055
+ h = "bottom-end";
1056
+ break;
1057
+ case "left-bottom":
1058
+ h = "left-end";
1059
+ break;
1060
+ case "left-top":
1061
+ h = "left-start";
1062
+ break;
1063
+ case "right-bottom":
1064
+ h = "right-end";
1065
+ break;
1066
+ case "right-top":
1067
+ h = "right-start";
1068
+ break;
1069
+ default:
1070
+ h = r;
1071
+ break;
1072
+ }
1073
+ const w = getComputedStyle(g), x = m ? 0 : (e = ((y) => {
1074
+ const S = parseFloat(y);
1075
+ return y.trim().endsWith("rem") ? S * 16 : S;
1076
+ })(w.getPropertyValue("--cds-popover-offset").trim())) !== null && e !== void 0 ? e : 10, v = [
1077
+ He(s && !m ? { alignmentAxis: p, mainAxis: x } : 0),
1078
+ We({
1079
+ fallbackPlacements: m ? h.includes("bottom") ? ["bottom-start", "bottom-end", "top-start", "top-end"] : ["top-start", "top-end", "bottom-start", "bottom-end"] : h.includes("bottom") ? [
1080
+ "bottom",
1081
+ "bottom-start",
1082
+ "bottom-end",
1083
+ "right",
1084
+ "right-start",
1085
+ "right-end",
1086
+ "left",
1087
+ "left-start",
1088
+ "left-end",
1089
+ "top",
1090
+ "top-start",
1091
+ "top-end"
1092
+ ] : [
1093
+ "top",
1094
+ "top-start",
1095
+ "top-end",
1096
+ "left",
1097
+ "left-start",
1098
+ "left-end",
1099
+ "right",
1100
+ "right-start",
1101
+ "right-end",
1102
+ "bottom",
1103
+ "bottom-start",
1104
+ "bottom-end"
1105
+ ],
1106
+ fallbackStrategy: "initialPlacement",
1107
+ fallbackAxisSideDirection: "start",
1108
+ boundary: u
1109
+ }),
1110
+ ...f && (h === "bottom" || h === "top") ? [
1111
+ Ot({
1112
+ apply({ rects: y, elements: S }) {
1113
+ S.floating.style.width = `${y.reference.width}px`;
1114
+ }
1115
+ })
1116
+ ] : [
1117
+ Ot({
1118
+ apply({ elements: y }) {
1119
+ y.floating.style.removeProperty("width");
1120
+ }
1121
+ })
1122
+ ],
1123
+ ...s && i ? [Pe({ element: i, padding: 15 })] : [],
1124
+ Ee()
1125
+ ];
1126
+ if (d) {
1127
+ const { x: y, y: S, placement: T, middlewareData: D, strategy: L } = await $e(l, g, {
1128
+ strategy: "fixed",
1129
+ middleware: v,
1130
+ placement: h
1131
+ });
1132
+ if (g.setAttribute("align", T), g.style.left = `${y}px`, g.style.top = `${S}px`, g.style.position = `${L}`, g.style.visibility = !((n = D.hide) === null || n === void 0) && n.referenceHidden ? "hidden" : "visible", i) {
1133
+ const { x: A, y: k } = D.arrow, F = {
1134
+ top: "bottom",
1135
+ right: "left",
1136
+ bottom: "top",
1137
+ left: "right"
1138
+ }[T.split("-")[0]];
1139
+ i.style.left = A != null ? `${A}px` : "", i.style.top = k != null ? `${k}px` : "", i.style.right = "", i.style.bottom = "", i.style[F] = `${-i.offsetWidth / 2}px`;
1140
+ }
1141
+ (this.host.tagName === "CDS-AI-LABEL" || this.host.tagName === "CDS-SLUG") && ((o = this.host) === null || o === void 0 || o.setAttribute("alignment", T));
1142
+ }
1143
+ }
1144
+ hostUpdated() {
1145
+ var e;
1146
+ this.host.hasAttribute("open") || ((e = this.cleanup) === null || e === void 0 || e.call(this), this.cleanup = void 0);
1147
+ }
1148
+ hostDisconnected() {
1149
+ var e;
1150
+ (e = this.cleanup) === null || e === void 0 || e.call(this), this.cleanup = void 0;
1151
+ }
1152
+ }
1153
+ var Dt;
1154
+ (function(t) {
1155
+ t.TOP = "top", t.TOP_LEFT = "top-left", t.TOP_RIGHT = "top-right", t.TOP_START = "top-start", t.TOP_END = "top-end", t.BOTTOM = "bottom", t.BOTTOM_LEFT = "bottom-left", t.BOTTOM_RIGHT = "bottom-right", t.BOTTOM_START = "bottom-start", t.BOTTOM_END = "bottom-end", t.LEFT = "left", t.LEFT_BOTTOM = "left-bottom", t.LEFT_TOP = "left-top", t.LEFT_START = "left-start", t.LEFT_END = "left-end", t.RIGHT = "right", t.RIGHT_BOTTOM = "right-bottom", t.RIGHT_TOP = "right-top", t.RIGHT_START = "right-start", t.RIGHT_END = "right-end";
1156
+ })(Dt || (Dt = {}));
1157
+ var Lt;
1158
+ (function(t) {
1159
+ t.LAYER = "layer", t.BACKGROUND = "background";
1160
+ })(Lt || (Lt = {}));
1161
+ export {
1162
+ _e as F,
1163
+ Dt as P,
1164
+ Lt as a
1165
+ };