@stihl-design-system/components 1.0.0-RC.25 → 1.0.0-RC.27

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 (164) hide show
  1. package/{accordion.Dw3qTPN8.js → accordion.CBaDU14g.js} +2 -2
  2. package/{actionbutton.wYg4A5a2.js → actionbutton.DEJsLxnQ.js} +2 -2
  3. package/{actionlink.BoWrs0Mo.js → actionlink.Cs6BTCA3.js} +2 -2
  4. package/{arialiveregions.DVsA5OTR.js → arialiveregions.Fgcshs5k.js} +1 -1
  5. package/assets/ActionButton.Ewi0i1hW.css +1 -0
  6. package/assets/ActionLink.BdPEvuGm.css +1 -0
  7. package/assets/CustomReactSelect.B9f_KYFg.css +1 -0
  8. package/assets/Icon.QeJ7TxZs.css +1 -0
  9. package/assets/InputFile.Dqjz53mb.css +1 -0
  10. package/assets/InputPassword.BuVQ9dRy.css +1 -0
  11. package/assets/InputSearch.Dwtb3Mhw.css +1 -0
  12. package/assets/InputStepper.CBt99L83.css +1 -0
  13. package/assets/Popover.BDTDsPAt.css +1 -0
  14. package/assets/Select.CghDnBUQ.css +1 -0
  15. package/assets/Textarea.BgtH-TTe.css +1 -0
  16. package/assets/banner.D9EiZqqR.css +1 -0
  17. package/assets/input.DFwunFjw.css +1 -0
  18. package/assets/radio.BCB51D_y.css +1 -0
  19. package/assets/scroller.Hszs1Yq4.css +1 -0
  20. package/banner.CgQdUb_c.js +55 -0
  21. package/banner.d.ts +2 -0
  22. package/{breadcrumb.C07HDyGp.js → breadcrumb.x78HJy5P.js} +3 -3
  23. package/{button.BBqDvwVm.js → button.BD_04tIG.js} +3 -3
  24. package/{buttonround.Vy1EygFm.js → buttonround.BT3OfowK.js} +2 -2
  25. package/{checkbox.CvWI1Jrx.js → checkbox.BktYXQmJ.js} +3 -3
  26. package/{checkboxgroup.BLpSLo9t.js → checkboxgroup.YK8H0YoX.js} +2 -2
  27. package/{chip.BsDriMfL.js → chip.BKtNbt4y.js} +2 -2
  28. package/chipgroup.BWpqUzXF.js +209 -0
  29. package/chunks/{Accordion.Cjc_1Bu1.js → Accordion.eVOD7J_8.js} +2 -2
  30. package/chunks/ActionButton.Ck1rGqgm.js +165 -0
  31. package/chunks/ActionLink.DnUNjoAT.js +138 -0
  32. package/chunks/{AriaLiveRegions.utils.zSFFD3SF.js → AriaLiveRegions.utils.Cb327d_2.js} +1 -1
  33. package/chunks/{Breadcrumb.QhD6byzd.js → Breadcrumb.B7g30dIO.js} +3 -3
  34. package/chunks/{Button.DZNUuPKC.js → Button.CC0qEsuR.js} +4 -4
  35. package/chunks/{Checkbox.Ch8DBzws.js → Checkbox.BIQAKBVy.js} +3 -3
  36. package/chunks/{CheckboxGroup.C8D6tjVI.js → CheckboxGroup.DHzpgOWp.js} +3 -3
  37. package/chunks/{Chip.CHy8cZJz.js → Chip.DifLxHH7.js} +3 -3
  38. package/chunks/{CustomReactSelect.hdDSE0ON.js → CustomReactSelect.BPnzhvw1.js} +1356 -1593
  39. package/chunks/{Dialog.DPeGj8-T.js → Dialog.BuEEJ199.js} +2 -2
  40. package/chunks/{Drawer.BMibxANc.js → Drawer.BXUGmpJI.js} +2 -2
  41. package/chunks/{Fieldset.DHccz6TP.js → Fieldset.BX46NuLh.js} +2 -2
  42. package/chunks/Header.Djs1adPW.js +361 -0
  43. package/chunks/{Icon.CAXZUNWo.js → Icon.C0161Glk.js} +70 -67
  44. package/chunks/{Input.utils.CCYTBWD_.js → Input.utils.Cnnzvuk4.js} +1 -1
  45. package/chunks/{InputFile.fltVIulD.js → InputFile.vkkg5Pab.js} +32 -32
  46. package/chunks/InputPassword.D42uUEGy.js +136 -0
  47. package/chunks/InputSearch.aIbUXVQU.js +174 -0
  48. package/chunks/InputStepper.DFEdUWm7.js +263 -0
  49. package/chunks/{LinkButton.DyTU9sfN.js → LinkButton.DmXVHeyZ.js} +3 -3
  50. package/chunks/{NavigationTabList.D2NVVTjK.js → NavigationTabList.IQM074Vb.js} +1 -1
  51. package/chunks/{NavigationTabs.TfdsA8GX.js → NavigationTabs.BofhX8bD.js} +2 -2
  52. package/chunks/{Notification.BRg1qlng.js → Notification.B-3dPVUE.js} +2 -2
  53. package/chunks/Popover.hXQTvwwd.js +1685 -0
  54. package/chunks/{RadioGroup.D9mECdMK.js → RadioGroup.c7YYJdUe.js} +3 -3
  55. package/chunks/{Select.DCxMPsCm.js → Select.B_EHpk22.js} +25 -25
  56. package/chunks/{Slider.Cljc14kS.js → Slider.DMSwmGwD.js} +2 -2
  57. package/chunks/{Tabs.GvcCCCFT.js → Tabs.Bl4K3Kjn.js} +2 -2
  58. package/chunks/{Text.TS4XdA9e.js → Text.DGWeWF1y.js} +1 -1
  59. package/chunks/{Textarea.Bs4-nzu8.js → Textarea.Ce26v6ht.js} +54 -54
  60. package/chunks/{Toast.DawJ9OSY.js → Toast.BHz0vlGz.js} +2 -2
  61. package/chunks/floating-ui.dom.C9TD1WpB.js +950 -0
  62. package/chunks/helpers.BbWkXTr3.js +37 -0
  63. package/chunks/is-animation-disabled.CUl4N3LI.js +20 -0
  64. package/{combobox.DW_ey38o.js → combobox.AaK6QjRl.js} +1 -1
  65. package/components/ActionButton/ActionButton.d.ts +9 -5
  66. package/components/ActionButton/ActionButton.utils.d.ts +4 -2
  67. package/components/ActionLink/ActionLink.d.ts +9 -5
  68. package/components/ActionLink/ActionLink.utils.d.ts +4 -2
  69. package/components/Banner/Banner.d.ts +32 -0
  70. package/components/Banner/Banner.utils.d.ts +2 -0
  71. package/components/Button/Button.utils.d.ts +1 -1
  72. package/components/Header/Header.utils.d.ts +0 -2
  73. package/components/Icon/Icon.d.ts +1 -1
  74. package/components/Icon/Icon.utils.d.ts +1 -1
  75. package/components/Popover/Popover.d.ts +40 -0
  76. package/components/Popover/Popover.test.d.ts +1 -0
  77. package/components/Popover/Popover.utils.d.ts +53 -0
  78. package/components/Popover/Popover.utils.test.d.ts +1 -0
  79. package/components/Scroller/Scroller.d.ts +20 -0
  80. package/components/Scroller/Scroller.utils.d.ts +3 -0
  81. package/components/Tabs/TabList/TabList.d.ts +1 -1
  82. package/components/Tabs/TabList/TabList.utils.d.ts +0 -4
  83. package/connected-icon.svg +1 -0
  84. package/{customreactselect.DcH7h1mb.js → customreactselect.Bu1i8wkh.js} +4 -4
  85. package/{dialog.D6d_WXOM.js → dialog.CGsUCqhR.js} +2 -2
  86. package/{drawer.BmQWFOuF.js → drawer.BcAo4TO0.js} +2 -2
  87. package/{fieldset.D6q9YXrO.js → fieldset.DM9ELUJa.js} +2 -2
  88. package/{filelist.Dnd5nOdw.js → filelist.Cj9U-Jx8.js} +3 -3
  89. package/{flag.BR312AU-.js → flag.BHaAfp6B.js} +1 -1
  90. package/{floatingactionbutton.Do6eNSHq.js → floatingactionbutton.DSZXUHB_.js} +2 -2
  91. package/{header.5iwPmK5V.js → header.WhQHSuB1.js} +2 -2
  92. package/{icon.HkVs68n_.js → icon.DwfGhFCd.js} +1 -1
  93. package/icon.svg +1 -1
  94. package/imow-icon.svg +1 -0
  95. package/index.d.ts +6 -0
  96. package/index.es.js +201 -188
  97. package/{input.mPceLGnf.js → input.DhxUW3zc.js} +37 -37
  98. package/{inputfile.CIpE9i-3.js → inputfile.Cmkxf4Vq.js} +6 -6
  99. package/{inputpassword.DkiyI-yo.js → inputpassword.CaJBCMA0.js} +3 -3
  100. package/{inputsearch.DcOp_VUd.js → inputsearch.B06DhYzo.js} +4 -4
  101. package/{inputstepper.D7TpDXst.js → inputstepper.DNY7nzP8.js} +4 -4
  102. package/{link.B5NZ1QKr.js → link.DGuYGfh2.js} +2 -2
  103. package/{linkbutton.CMVcQVxI.js → linkbutton.B3q0B_yb.js} +3 -3
  104. package/{logo.B9taqlZR.js → logo.C96KaG1P.js} +1 -1
  105. package/mystihl-icon.svg +1 -0
  106. package/{navigationtablist.BMJTC9qo.js → navigationtablist.CS9yEGdP.js} +2 -2
  107. package/{navigationtabs.BQeKKIFy.js → navigationtabs.DQ1kE-h4.js} +2 -2
  108. package/{notification.Bzli8Qlq.js → notification.D8BDaU5x.js} +3 -3
  109. package/{optioncheckbox.DYKRBTy0.js → optioncheckbox.CEEPAq0u.js} +1 -1
  110. package/package.json +4 -2
  111. package/partials/assets.const.js +2 -0
  112. package/partials/copyAssets.js +4 -2
  113. package/partials/index.js +109 -81
  114. package/partials/lib/partials.d.ts +1 -1
  115. package/popover.BFx99cHg.js +10 -0
  116. package/popover.d.ts +2 -0
  117. package/radio.Be4pFOLf.js +134 -0
  118. package/{radiogroup.BnMkpjvV.js → radiogroup.BRjwP01C.js} +3 -3
  119. package/scroller.CCA6kFR6.js +123 -0
  120. package/scroller.d.ts +2 -0
  121. package/{select.BSvjDIVC.js → select.3zE96eWc.js} +3 -3
  122. package/{skiptocontent.CQ4aARqd.js → skiptocontent.D1UkPmhD.js} +2 -2
  123. package/{slider.LRlFFlYL.js → slider.CTCf7Xdm.js} +2 -2
  124. package/{spinner.t5FHjIEK.js → spinner.CeGt8DxU.js} +1 -1
  125. package/{switch.QUUSE9ZF.js → switch.CtULjgZq.js} +2 -2
  126. package/{systemfeedback.BpKZEv4U.js → systemfeedback.CLQCbTF6.js} +1 -1
  127. package/tablist.Dzwe0_J4.js +256 -0
  128. package/{tabs.CXkSN2kd.js → tabs.yudjJk9d.js} +2 -2
  129. package/{text.CPwbk8Gy.js → text.ZOUuesnU.js} +2 -2
  130. package/{textarea.D0ADOdR6.js → textarea.B_3fPtmd.js} +3 -3
  131. package/{toast.CYYvK4DJ.js → toast.Bhpwj1NF.js} +3 -3
  132. package/{toastmanager.k9iGb7MN.js → toastmanager.BHk65ynQ.js} +3 -3
  133. package/topbar.2b8fjmA4.js +11 -0
  134. package/utils/get-rect.d.ts +4 -0
  135. package/utils/get-rect.test.d.ts +1 -0
  136. package/utils/helpers.d.ts +10 -0
  137. package/utils/index.d.ts +2 -1
  138. package/utils/is-animation-disabled.d.ts +14 -0
  139. package/utils/is-animation-disabled.test.d.ts +1 -0
  140. package/assets/ActionButton.DZVAnm-p.css +0 -1
  141. package/assets/ActionLink.DuklSL3c.css +0 -1
  142. package/assets/CustomReactSelect.B8l6al4B.css +0 -1
  143. package/assets/Icon.ZNrKuqgu.css +0 -1
  144. package/assets/InputFile.Dx_CULYq.css +0 -1
  145. package/assets/InputPassword.CkHF5zCh.css +0 -1
  146. package/assets/InputSearch.BV8Q2EUL.css +0 -1
  147. package/assets/InputStepper.DzzrAdma.css +0 -1
  148. package/assets/Select.e1fTfWmm.css +0 -1
  149. package/assets/Textarea.BGV7Z0Z9.css +0 -1
  150. package/assets/input.Cj4tF_F7.css +0 -1
  151. package/assets/radio.CqaNn1Gz.css +0 -1
  152. package/chipgroup.D1Km301k.js +0 -186
  153. package/chunks/ActionButton.DFI8P9-f.js +0 -159
  154. package/chunks/ActionLink.CLQ1yQZF.js +0 -132
  155. package/chunks/Header.DPafHEKw.js +0 -384
  156. package/chunks/InputPassword.C4QhwijC.js +0 -136
  157. package/chunks/InputSearch.DdWBmEmu.js +0 -174
  158. package/chunks/InputStepper.BRzbuEho.js +0 -263
  159. package/chunks/helpers.CcqWV-wZ.js +0 -8
  160. package/radio.Dm9bDBzM.js +0 -134
  161. package/tablist.DGGeFOi1.js +0 -266
  162. package/topbar.BPSDyH0N.js +0 -10
  163. package/utils/isAnimationDisabled.d.ts +0 -1
  164. /package/components/{Tabs/TabList/TabList.utils.test.d.ts → Banner/Banner.test.d.ts} +0 -0
@@ -0,0 +1,950 @@
1
+ "use client";
2
+ const U = Math.min, F = Math.max, K = Math.round, X = Math.floor, C = (t) => ({
3
+ x: t,
4
+ y: t
5
+ }), Pt = {
6
+ left: "right",
7
+ right: "left",
8
+ bottom: "top",
9
+ top: "bottom"
10
+ }, Bt = {
11
+ start: "end",
12
+ end: "start"
13
+ };
14
+ function gt(t, e, n) {
15
+ return F(t, U(e, n));
16
+ }
17
+ function Q(t, e) {
18
+ return typeof t == "function" ? t(e) : t;
19
+ }
20
+ function P(t) {
21
+ return t.split("-")[0];
22
+ }
23
+ function Z(t) {
24
+ return t.split("-")[1];
25
+ }
26
+ function vt(t) {
27
+ return t === "x" ? "y" : "x";
28
+ }
29
+ function bt(t) {
30
+ return t === "y" ? "height" : "width";
31
+ }
32
+ function W(t) {
33
+ return ["top", "bottom"].includes(P(t)) ? "y" : "x";
34
+ }
35
+ function At(t) {
36
+ return vt(W(t));
37
+ }
38
+ function Mt(t, e, n) {
39
+ n === void 0 && (n = !1);
40
+ const o = Z(t), i = At(t), r = bt(i);
41
+ let s = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
42
+ return e.reference[r] > e.floating[r] && (s = G(s)), [s, G(s)];
43
+ }
44
+ function Nt(t) {
45
+ const e = G(t);
46
+ return [st(t), e, st(e)];
47
+ }
48
+ function st(t) {
49
+ return t.replace(/start|end/g, (e) => Bt[e]);
50
+ }
51
+ function Vt(t, e, n) {
52
+ const o = ["left", "right"], i = ["right", "left"], r = ["top", "bottom"], s = ["bottom", "top"];
53
+ switch (t) {
54
+ case "top":
55
+ case "bottom":
56
+ return n ? e ? i : o : e ? o : i;
57
+ case "left":
58
+ case "right":
59
+ return e ? r : s;
60
+ default:
61
+ return [];
62
+ }
63
+ }
64
+ function Wt(t, e, n, o) {
65
+ const i = Z(t);
66
+ let r = Vt(P(t), n === "start", o);
67
+ return i && (r = r.map((s) => s + "-" + i), e && (r = r.concat(r.map(st)))), r;
68
+ }
69
+ function G(t) {
70
+ return t.replace(/left|right|bottom|top/g, (e) => Pt[e]);
71
+ }
72
+ function Ht(t) {
73
+ return {
74
+ top: 0,
75
+ right: 0,
76
+ bottom: 0,
77
+ left: 0,
78
+ ...t
79
+ };
80
+ }
81
+ function $t(t) {
82
+ return typeof t != "number" ? Ht(t) : {
83
+ top: t,
84
+ right: t,
85
+ bottom: t,
86
+ left: t
87
+ };
88
+ }
89
+ function J(t) {
90
+ const {
91
+ x: e,
92
+ y: n,
93
+ width: o,
94
+ height: i
95
+ } = t;
96
+ return {
97
+ width: o,
98
+ height: i,
99
+ top: n,
100
+ left: e,
101
+ right: e + o,
102
+ bottom: n + i,
103
+ x: e,
104
+ y: n
105
+ };
106
+ }
107
+ function pt(t, e, n) {
108
+ let {
109
+ reference: o,
110
+ floating: i
111
+ } = t;
112
+ const r = W(e), s = At(e), c = bt(s), l = P(e), f = r === "y", d = o.x + o.width / 2 - i.width / 2, a = o.y + o.height / 2 - i.height / 2, m = o[c] / 2 - i[c] / 2;
113
+ let u;
114
+ switch (l) {
115
+ case "top":
116
+ u = {
117
+ x: d,
118
+ y: o.y - i.height
119
+ };
120
+ break;
121
+ case "bottom":
122
+ u = {
123
+ x: d,
124
+ y: o.y + o.height
125
+ };
126
+ break;
127
+ case "right":
128
+ u = {
129
+ x: o.x + o.width,
130
+ y: a
131
+ };
132
+ break;
133
+ case "left":
134
+ u = {
135
+ x: o.x - i.width,
136
+ y: a
137
+ };
138
+ break;
139
+ default:
140
+ u = {
141
+ x: o.x,
142
+ y: o.y
143
+ };
144
+ }
145
+ switch (Z(e)) {
146
+ case "start":
147
+ u[s] -= m * (n && f ? -1 : 1);
148
+ break;
149
+ case "end":
150
+ u[s] += m * (n && f ? -1 : 1);
151
+ break;
152
+ }
153
+ return u;
154
+ }
155
+ const _t = async (t, e, n) => {
156
+ const {
157
+ placement: o = "bottom",
158
+ strategy: i = "absolute",
159
+ middleware: r = [],
160
+ platform: s
161
+ } = n, c = r.filter(Boolean), l = await (s.isRTL == null ? void 0 : s.isRTL(e));
162
+ let f = await s.getElementRects({
163
+ reference: t,
164
+ floating: e,
165
+ strategy: i
166
+ }), {
167
+ x: d,
168
+ y: a
169
+ } = pt(f, o, l), m = o, u = {}, h = 0;
170
+ for (let p = 0; p < c.length; p++) {
171
+ const {
172
+ name: w,
173
+ fn: g
174
+ } = c[p], {
175
+ x,
176
+ y,
177
+ data: b,
178
+ reset: v
179
+ } = await g({
180
+ x: d,
181
+ y: a,
182
+ initialPlacement: o,
183
+ placement: m,
184
+ strategy: i,
185
+ middlewareData: u,
186
+ rects: f,
187
+ platform: s,
188
+ elements: {
189
+ reference: t,
190
+ floating: e
191
+ }
192
+ });
193
+ d = x ?? d, a = y ?? a, u = {
194
+ ...u,
195
+ [w]: {
196
+ ...u[w],
197
+ ...b
198
+ }
199
+ }, v && h <= 50 && (h++, typeof v == "object" && (v.placement && (m = v.placement), v.rects && (f = v.rects === !0 ? await s.getElementRects({
200
+ reference: t,
201
+ floating: e,
202
+ strategy: i
203
+ }) : v.rects), {
204
+ x: d,
205
+ y: a
206
+ } = pt(f, m, l)), p = -1);
207
+ }
208
+ return {
209
+ x: d,
210
+ y: a,
211
+ placement: m,
212
+ strategy: i,
213
+ middlewareData: u
214
+ };
215
+ };
216
+ async function Rt(t, e) {
217
+ var n;
218
+ e === void 0 && (e = {});
219
+ const {
220
+ x: o,
221
+ y: i,
222
+ platform: r,
223
+ rects: s,
224
+ elements: c,
225
+ strategy: l
226
+ } = t, {
227
+ boundary: f = "clippingAncestors",
228
+ rootBoundary: d = "viewport",
229
+ elementContext: a = "floating",
230
+ altBoundary: m = !1,
231
+ padding: u = 0
232
+ } = Q(e, t), h = $t(u), w = c[m ? a === "floating" ? "reference" : "floating" : a], g = J(await r.getClippingRect({
233
+ element: (n = await (r.isElement == null ? void 0 : r.isElement(w))) == null || n ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(c.floating)),
234
+ boundary: f,
235
+ rootBoundary: d,
236
+ strategy: l
237
+ })), x = a === "floating" ? {
238
+ x: o,
239
+ y: i,
240
+ width: s.floating.width,
241
+ height: s.floating.height
242
+ } : s.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(c.floating)), b = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
243
+ x: 1,
244
+ y: 1
245
+ } : {
246
+ x: 1,
247
+ y: 1
248
+ }, v = J(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
249
+ elements: c,
250
+ rect: x,
251
+ offsetParent: y,
252
+ strategy: l
253
+ }) : x);
254
+ return {
255
+ top: (g.top - v.top + h.top) / b.y,
256
+ bottom: (v.bottom - g.bottom + h.bottom) / b.y,
257
+ left: (g.left - v.left + h.left) / b.x,
258
+ right: (v.right - g.right + h.right) / b.x
259
+ };
260
+ }
261
+ const zt = function(t) {
262
+ return t === void 0 && (t = {}), {
263
+ name: "flip",
264
+ options: t,
265
+ async fn(e) {
266
+ var n, o;
267
+ const {
268
+ placement: i,
269
+ middlewareData: r,
270
+ rects: s,
271
+ initialPlacement: c,
272
+ platform: l,
273
+ elements: f
274
+ } = e, {
275
+ mainAxis: d = !0,
276
+ crossAxis: a = !0,
277
+ fallbackPlacements: m,
278
+ fallbackStrategy: u = "bestFit",
279
+ fallbackAxisSideDirection: h = "none",
280
+ flipAlignment: p = !0,
281
+ ...w
282
+ } = Q(t, e);
283
+ if ((n = r.arrow) != null && n.alignmentOffset)
284
+ return {};
285
+ const g = P(i), x = W(c), y = P(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(f.floating)), v = m || (y || !p ? [G(c)] : Nt(c)), _ = h !== "none";
286
+ !m && _ && v.push(...Wt(c, p, h, b));
287
+ const M = [c, ...v], ot = await Rt(e, w), q = [];
288
+ let z = ((o = r.flip) == null ? void 0 : o.overflows) || [];
289
+ if (d && q.push(ot[g]), a) {
290
+ const k = Mt(i, s, b);
291
+ q.push(ot[k[0]], ot[k[1]]);
292
+ }
293
+ if (z = [...z, {
294
+ placement: i,
295
+ overflows: q
296
+ }], !q.every((k) => k <= 0)) {
297
+ var ut, dt;
298
+ const k = (((ut = r.flip) == null ? void 0 : ut.index) || 0) + 1, ht = M[k];
299
+ if (ht)
300
+ return {
301
+ data: {
302
+ index: k,
303
+ overflows: z
304
+ },
305
+ reset: {
306
+ placement: ht
307
+ }
308
+ };
309
+ let I = (dt = z.filter((N) => N.overflows[0] <= 0).sort((N, L) => N.overflows[1] - L.overflows[1])[0]) == null ? void 0 : dt.placement;
310
+ if (!I)
311
+ switch (u) {
312
+ case "bestFit": {
313
+ var mt;
314
+ const N = (mt = z.filter((L) => {
315
+ if (_) {
316
+ const S = W(L.placement);
317
+ return S === x || // Create a bias to the `y` side axis due to horizontal
318
+ // reading directions favoring greater width.
319
+ S === "y";
320
+ }
321
+ return !0;
322
+ }).map((L) => [L.placement, L.overflows.filter((S) => S > 0).reduce((S, Ft) => S + Ft, 0)]).sort((L, S) => L[1] - S[1])[0]) == null ? void 0 : mt[0];
323
+ N && (I = N);
324
+ break;
325
+ }
326
+ case "initialPlacement":
327
+ I = c;
328
+ break;
329
+ }
330
+ if (i !== I)
331
+ return {
332
+ reset: {
333
+ placement: I
334
+ }
335
+ };
336
+ }
337
+ return {};
338
+ }
339
+ };
340
+ };
341
+ async function It(t, e) {
342
+ const {
343
+ placement: n,
344
+ platform: o,
345
+ elements: i
346
+ } = t, r = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), s = P(n), c = Z(n), l = W(n) === "y", f = ["left", "top"].includes(s) ? -1 : 1, d = r && l ? -1 : 1, a = Q(e, t);
347
+ let {
348
+ mainAxis: m,
349
+ crossAxis: u,
350
+ alignmentAxis: h
351
+ } = typeof a == "number" ? {
352
+ mainAxis: a,
353
+ crossAxis: 0,
354
+ alignmentAxis: null
355
+ } : {
356
+ mainAxis: a.mainAxis || 0,
357
+ crossAxis: a.crossAxis || 0,
358
+ alignmentAxis: a.alignmentAxis
359
+ };
360
+ return c && typeof h == "number" && (u = c === "end" ? h * -1 : h), l ? {
361
+ x: u * d,
362
+ y: m * f
363
+ } : {
364
+ x: m * f,
365
+ y: u * d
366
+ };
367
+ }
368
+ const jt = function(t) {
369
+ return t === void 0 && (t = 0), {
370
+ name: "offset",
371
+ options: t,
372
+ async fn(e) {
373
+ var n, o;
374
+ const {
375
+ x: i,
376
+ y: r,
377
+ placement: s,
378
+ middlewareData: c
379
+ } = e, l = await It(e, t);
380
+ return s === ((n = c.offset) == null ? void 0 : n.placement) && (o = c.arrow) != null && o.alignmentOffset ? {} : {
381
+ x: i + l.x,
382
+ y: r + l.y,
383
+ data: {
384
+ ...l,
385
+ placement: s
386
+ }
387
+ };
388
+ }
389
+ };
390
+ }, Yt = function(t) {
391
+ return t === void 0 && (t = {}), {
392
+ name: "shift",
393
+ options: t,
394
+ async fn(e) {
395
+ const {
396
+ x: n,
397
+ y: o,
398
+ placement: i
399
+ } = e, {
400
+ mainAxis: r = !0,
401
+ crossAxis: s = !1,
402
+ limiter: c = {
403
+ fn: (w) => {
404
+ let {
405
+ x: g,
406
+ y: x
407
+ } = w;
408
+ return {
409
+ x: g,
410
+ y: x
411
+ };
412
+ }
413
+ },
414
+ ...l
415
+ } = Q(t, e), f = {
416
+ x: n,
417
+ y: o
418
+ }, d = await Rt(e, l), a = W(P(i)), m = vt(a);
419
+ let u = f[m], h = f[a];
420
+ if (r) {
421
+ const w = m === "y" ? "top" : "left", g = m === "y" ? "bottom" : "right", x = u + d[w], y = u - d[g];
422
+ u = gt(x, u, y);
423
+ }
424
+ if (s) {
425
+ const w = a === "y" ? "top" : "left", g = a === "y" ? "bottom" : "right", x = h + d[w], y = h - d[g];
426
+ h = gt(x, h, y);
427
+ }
428
+ const p = c.fn({
429
+ ...e,
430
+ [m]: u,
431
+ [a]: h
432
+ });
433
+ return {
434
+ ...p,
435
+ data: {
436
+ x: p.x - n,
437
+ y: p.y - o,
438
+ enabled: {
439
+ [m]: r,
440
+ [a]: s
441
+ }
442
+ }
443
+ };
444
+ }
445
+ };
446
+ };
447
+ function tt() {
448
+ return typeof window < "u";
449
+ }
450
+ function $(t) {
451
+ return Ot(t) ? (t.nodeName || "").toLowerCase() : "#document";
452
+ }
453
+ function A(t) {
454
+ var e;
455
+ return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
456
+ }
457
+ function T(t) {
458
+ var e;
459
+ return (e = (Ot(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
460
+ }
461
+ function Ot(t) {
462
+ return tt() ? t instanceof Node || t instanceof A(t).Node : !1;
463
+ }
464
+ function R(t) {
465
+ return tt() ? t instanceof Element || t instanceof A(t).Element : !1;
466
+ }
467
+ function E(t) {
468
+ return tt() ? t instanceof HTMLElement || t instanceof A(t).HTMLElement : !1;
469
+ }
470
+ function wt(t) {
471
+ return !tt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof A(t).ShadowRoot;
472
+ }
473
+ function Y(t) {
474
+ const {
475
+ overflow: e,
476
+ overflowX: n,
477
+ overflowY: o,
478
+ display: i
479
+ } = O(t);
480
+ return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !["inline", "contents"].includes(i);
481
+ }
482
+ function qt(t) {
483
+ return ["table", "td", "th"].includes($(t));
484
+ }
485
+ function et(t) {
486
+ return [":popover-open", ":modal"].some((e) => {
487
+ try {
488
+ return t.matches(e);
489
+ } catch {
490
+ return !1;
491
+ }
492
+ });
493
+ }
494
+ function ct(t) {
495
+ const e = lt(), n = R(t) ? O(t) : t;
496
+ return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => n[o] ? n[o] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (n.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (n.contain || "").includes(o));
497
+ }
498
+ function Xt(t) {
499
+ let e = D(t);
500
+ for (; E(e) && !H(e); ) {
501
+ if (ct(e))
502
+ return e;
503
+ if (et(e))
504
+ return null;
505
+ e = D(e);
506
+ }
507
+ return null;
508
+ }
509
+ function lt() {
510
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
511
+ }
512
+ function H(t) {
513
+ return ["html", "body", "#document"].includes($(t));
514
+ }
515
+ function O(t) {
516
+ return A(t).getComputedStyle(t);
517
+ }
518
+ function nt(t) {
519
+ return R(t) ? {
520
+ scrollLeft: t.scrollLeft,
521
+ scrollTop: t.scrollTop
522
+ } : {
523
+ scrollLeft: t.scrollX,
524
+ scrollTop: t.scrollY
525
+ };
526
+ }
527
+ function D(t) {
528
+ if ($(t) === "html")
529
+ return t;
530
+ const e = (
531
+ // Step into the shadow DOM of the parent of a slotted node.
532
+ t.assignedSlot || // DOM Element detected.
533
+ t.parentNode || // ShadowRoot detected.
534
+ wt(t) && t.host || // Fallback.
535
+ T(t)
536
+ );
537
+ return wt(e) ? e.host : e;
538
+ }
539
+ function Ct(t) {
540
+ const e = D(t);
541
+ return H(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : E(e) && Y(e) ? e : Ct(e);
542
+ }
543
+ function j(t, e, n) {
544
+ var o;
545
+ e === void 0 && (e = []), n === void 0 && (n = !0);
546
+ const i = Ct(t), r = i === ((o = t.ownerDocument) == null ? void 0 : o.body), s = A(i);
547
+ if (r) {
548
+ const c = rt(s);
549
+ return e.concat(s, s.visualViewport || [], Y(i) ? i : [], c && n ? j(c) : []);
550
+ }
551
+ return e.concat(i, j(i, [], n));
552
+ }
553
+ function rt(t) {
554
+ return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
555
+ }
556
+ function Et(t) {
557
+ const e = O(t);
558
+ let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
559
+ const i = E(t), r = i ? t.offsetWidth : n, s = i ? t.offsetHeight : o, c = K(n) !== r || K(o) !== s;
560
+ return c && (n = r, o = s), {
561
+ width: n,
562
+ height: o,
563
+ $: c
564
+ };
565
+ }
566
+ function ft(t) {
567
+ return R(t) ? t : t.contextElement;
568
+ }
569
+ function V(t) {
570
+ const e = ft(t);
571
+ if (!E(e))
572
+ return C(1);
573
+ const n = e.getBoundingClientRect(), {
574
+ width: o,
575
+ height: i,
576
+ $: r
577
+ } = Et(e);
578
+ let s = (r ? K(n.width) : n.width) / o, c = (r ? K(n.height) : n.height) / i;
579
+ return (!s || !Number.isFinite(s)) && (s = 1), (!c || !Number.isFinite(c)) && (c = 1), {
580
+ x: s,
581
+ y: c
582
+ };
583
+ }
584
+ const Ut = /* @__PURE__ */ C(0);
585
+ function Tt(t) {
586
+ const e = A(t);
587
+ return !lt() || !e.visualViewport ? Ut : {
588
+ x: e.visualViewport.offsetLeft,
589
+ y: e.visualViewport.offsetTop
590
+ };
591
+ }
592
+ function Kt(t, e, n) {
593
+ return e === void 0 && (e = !1), !n || e && n !== A(t) ? !1 : e;
594
+ }
595
+ function B(t, e, n, o) {
596
+ e === void 0 && (e = !1), n === void 0 && (n = !1);
597
+ const i = t.getBoundingClientRect(), r = ft(t);
598
+ let s = C(1);
599
+ e && (o ? R(o) && (s = V(o)) : s = V(t));
600
+ const c = Kt(r, n, o) ? Tt(r) : C(0);
601
+ let l = (i.left + c.x) / s.x, f = (i.top + c.y) / s.y, d = i.width / s.x, a = i.height / s.y;
602
+ if (r) {
603
+ const m = A(r), u = o && R(o) ? A(o) : o;
604
+ let h = m, p = rt(h);
605
+ for (; p && o && u !== h; ) {
606
+ const w = V(p), g = p.getBoundingClientRect(), x = O(p), y = g.left + (p.clientLeft + parseFloat(x.paddingLeft)) * w.x, b = g.top + (p.clientTop + parseFloat(x.paddingTop)) * w.y;
607
+ l *= w.x, f *= w.y, d *= w.x, a *= w.y, l += y, f += b, h = A(p), p = rt(h);
608
+ }
609
+ }
610
+ return J({
611
+ width: d,
612
+ height: a,
613
+ x: l,
614
+ y: f
615
+ });
616
+ }
617
+ function at(t, e) {
618
+ const n = nt(t).scrollLeft;
619
+ return e ? e.left + n : B(T(t)).left + n;
620
+ }
621
+ function Lt(t, e, n) {
622
+ n === void 0 && (n = !1);
623
+ const o = t.getBoundingClientRect(), i = o.left + e.scrollLeft - (n ? 0 : (
624
+ // RTL <body> scrollbar.
625
+ at(t, o)
626
+ )), r = o.top + e.scrollTop;
627
+ return {
628
+ x: i,
629
+ y: r
630
+ };
631
+ }
632
+ function Gt(t) {
633
+ let {
634
+ elements: e,
635
+ rect: n,
636
+ offsetParent: o,
637
+ strategy: i
638
+ } = t;
639
+ const r = i === "fixed", s = T(o), c = e ? et(e.floating) : !1;
640
+ if (o === s || c && r)
641
+ return n;
642
+ let l = {
643
+ scrollLeft: 0,
644
+ scrollTop: 0
645
+ }, f = C(1);
646
+ const d = C(0), a = E(o);
647
+ if ((a || !a && !r) && (($(o) !== "body" || Y(s)) && (l = nt(o)), E(o))) {
648
+ const u = B(o);
649
+ f = V(o), d.x = u.x + o.clientLeft, d.y = u.y + o.clientTop;
650
+ }
651
+ const m = s && !a && !r ? Lt(s, l, !0) : C(0);
652
+ return {
653
+ width: n.width * f.x,
654
+ height: n.height * f.y,
655
+ x: n.x * f.x - l.scrollLeft * f.x + d.x + m.x,
656
+ y: n.y * f.y - l.scrollTop * f.y + d.y + m.y
657
+ };
658
+ }
659
+ function Jt(t) {
660
+ return Array.from(t.getClientRects());
661
+ }
662
+ function Qt(t) {
663
+ const e = T(t), n = nt(t), o = t.ownerDocument.body, i = F(e.scrollWidth, e.clientWidth, o.scrollWidth, o.clientWidth), r = F(e.scrollHeight, e.clientHeight, o.scrollHeight, o.clientHeight);
664
+ let s = -n.scrollLeft + at(t);
665
+ const c = -n.scrollTop;
666
+ return O(o).direction === "rtl" && (s += F(e.clientWidth, o.clientWidth) - i), {
667
+ width: i,
668
+ height: r,
669
+ x: s,
670
+ y: c
671
+ };
672
+ }
673
+ function Zt(t, e) {
674
+ const n = A(t), o = T(t), i = n.visualViewport;
675
+ let r = o.clientWidth, s = o.clientHeight, c = 0, l = 0;
676
+ if (i) {
677
+ r = i.width, s = i.height;
678
+ const f = lt();
679
+ (!f || f && e === "fixed") && (c = i.offsetLeft, l = i.offsetTop);
680
+ }
681
+ return {
682
+ width: r,
683
+ height: s,
684
+ x: c,
685
+ y: l
686
+ };
687
+ }
688
+ function te(t, e) {
689
+ const n = B(t, !0, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft, r = E(t) ? V(t) : C(1), s = t.clientWidth * r.x, c = t.clientHeight * r.y, l = i * r.x, f = o * r.y;
690
+ return {
691
+ width: s,
692
+ height: c,
693
+ x: l,
694
+ y: f
695
+ };
696
+ }
697
+ function xt(t, e, n) {
698
+ let o;
699
+ if (e === "viewport")
700
+ o = Zt(t, n);
701
+ else if (e === "document")
702
+ o = Qt(T(t));
703
+ else if (R(e))
704
+ o = te(e, n);
705
+ else {
706
+ const i = Tt(t);
707
+ o = {
708
+ x: e.x - i.x,
709
+ y: e.y - i.y,
710
+ width: e.width,
711
+ height: e.height
712
+ };
713
+ }
714
+ return J(o);
715
+ }
716
+ function St(t, e) {
717
+ const n = D(t);
718
+ return n === e || !R(n) || H(n) ? !1 : O(n).position === "fixed" || St(n, e);
719
+ }
720
+ function ee(t, e) {
721
+ const n = e.get(t);
722
+ if (n)
723
+ return n;
724
+ let o = j(t, [], !1).filter((c) => R(c) && $(c) !== "body"), i = null;
725
+ const r = O(t).position === "fixed";
726
+ let s = r ? D(t) : t;
727
+ for (; R(s) && !H(s); ) {
728
+ const c = O(s), l = ct(s);
729
+ !l && c.position === "fixed" && (i = null), (r ? !l && !i : !l && c.position === "static" && !!i && ["absolute", "fixed"].includes(i.position) || Y(s) && !l && St(t, s)) ? o = o.filter((d) => d !== s) : i = c, s = D(s);
730
+ }
731
+ return e.set(t, o), o;
732
+ }
733
+ function ne(t) {
734
+ let {
735
+ element: e,
736
+ boundary: n,
737
+ rootBoundary: o,
738
+ strategy: i
739
+ } = t;
740
+ const s = [...n === "clippingAncestors" ? et(e) ? [] : ee(e, this._c) : [].concat(n), o], c = s[0], l = s.reduce((f, d) => {
741
+ const a = xt(e, d, i);
742
+ return f.top = F(a.top, f.top), f.right = U(a.right, f.right), f.bottom = U(a.bottom, f.bottom), f.left = F(a.left, f.left), f;
743
+ }, xt(e, c, i));
744
+ return {
745
+ width: l.right - l.left,
746
+ height: l.bottom - l.top,
747
+ x: l.left,
748
+ y: l.top
749
+ };
750
+ }
751
+ function oe(t) {
752
+ const {
753
+ width: e,
754
+ height: n
755
+ } = Et(t);
756
+ return {
757
+ width: e,
758
+ height: n
759
+ };
760
+ }
761
+ function ie(t, e, n) {
762
+ const o = E(e), i = T(e), r = n === "fixed", s = B(t, !0, r, e);
763
+ let c = {
764
+ scrollLeft: 0,
765
+ scrollTop: 0
766
+ };
767
+ const l = C(0);
768
+ if (o || !o && !r)
769
+ if (($(e) !== "body" || Y(i)) && (c = nt(e)), o) {
770
+ const m = B(e, !0, r, e);
771
+ l.x = m.x + e.clientLeft, l.y = m.y + e.clientTop;
772
+ } else i && (l.x = at(i));
773
+ const f = i && !o && !r ? Lt(i, c) : C(0), d = s.left + c.scrollLeft - l.x - f.x, a = s.top + c.scrollTop - l.y - f.y;
774
+ return {
775
+ x: d,
776
+ y: a,
777
+ width: s.width,
778
+ height: s.height
779
+ };
780
+ }
781
+ function it(t) {
782
+ return O(t).position === "static";
783
+ }
784
+ function yt(t, e) {
785
+ if (!E(t) || O(t).position === "fixed")
786
+ return null;
787
+ if (e)
788
+ return e(t);
789
+ let n = t.offsetParent;
790
+ return T(t) === n && (n = n.ownerDocument.body), n;
791
+ }
792
+ function Dt(t, e) {
793
+ const n = A(t);
794
+ if (et(t))
795
+ return n;
796
+ if (!E(t)) {
797
+ let i = D(t);
798
+ for (; i && !H(i); ) {
799
+ if (R(i) && !it(i))
800
+ return i;
801
+ i = D(i);
802
+ }
803
+ return n;
804
+ }
805
+ let o = yt(t, e);
806
+ for (; o && qt(o) && it(o); )
807
+ o = yt(o, e);
808
+ return o && H(o) && it(o) && !ct(o) ? n : o || Xt(t) || n;
809
+ }
810
+ const se = async function(t) {
811
+ const e = this.getOffsetParent || Dt, n = this.getDimensions, o = await n(t.floating);
812
+ return {
813
+ reference: ie(t.reference, await e(t.floating), t.strategy),
814
+ floating: {
815
+ x: 0,
816
+ y: 0,
817
+ width: o.width,
818
+ height: o.height
819
+ }
820
+ };
821
+ };
822
+ function re(t) {
823
+ return O(t).direction === "rtl";
824
+ }
825
+ const ce = {
826
+ convertOffsetParentRelativeRectToViewportRelativeRect: Gt,
827
+ getDocumentElement: T,
828
+ getClippingRect: ne,
829
+ getOffsetParent: Dt,
830
+ getElementRects: se,
831
+ getClientRects: Jt,
832
+ getDimensions: oe,
833
+ getScale: V,
834
+ isElement: R,
835
+ isRTL: re
836
+ };
837
+ function kt(t, e) {
838
+ return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
839
+ }
840
+ function le(t, e) {
841
+ let n = null, o;
842
+ const i = T(t);
843
+ function r() {
844
+ var c;
845
+ clearTimeout(o), (c = n) == null || c.disconnect(), n = null;
846
+ }
847
+ function s(c, l) {
848
+ c === void 0 && (c = !1), l === void 0 && (l = 1), r();
849
+ const f = t.getBoundingClientRect(), {
850
+ left: d,
851
+ top: a,
852
+ width: m,
853
+ height: u
854
+ } = f;
855
+ if (c || e(), !m || !u)
856
+ return;
857
+ const h = X(a), p = X(i.clientWidth - (d + m)), w = X(i.clientHeight - (a + u)), g = X(d), y = {
858
+ rootMargin: -h + "px " + -p + "px " + -w + "px " + -g + "px",
859
+ threshold: F(0, U(1, l)) || 1
860
+ };
861
+ let b = !0;
862
+ function v(_) {
863
+ const M = _[0].intersectionRatio;
864
+ if (M !== l) {
865
+ if (!b)
866
+ return s();
867
+ M ? s(!1, M) : o = setTimeout(() => {
868
+ s(!1, 1e-7);
869
+ }, 1e3);
870
+ }
871
+ M === 1 && !kt(f, t.getBoundingClientRect()) && s(), b = !1;
872
+ }
873
+ try {
874
+ n = new IntersectionObserver(v, {
875
+ ...y,
876
+ // Handle <iframe>s
877
+ root: i.ownerDocument
878
+ });
879
+ } catch {
880
+ n = new IntersectionObserver(v, y);
881
+ }
882
+ n.observe(t);
883
+ }
884
+ return s(!0), r;
885
+ }
886
+ function fe(t, e, n, o) {
887
+ o === void 0 && (o = {});
888
+ const {
889
+ ancestorScroll: i = !0,
890
+ ancestorResize: r = !0,
891
+ elementResize: s = typeof ResizeObserver == "function",
892
+ layoutShift: c = typeof IntersectionObserver == "function",
893
+ animationFrame: l = !1
894
+ } = o, f = ft(t), d = i || r ? [...f ? j(f) : [], ...j(e)] : [];
895
+ d.forEach((g) => {
896
+ i && g.addEventListener("scroll", n, {
897
+ passive: !0
898
+ }), r && g.addEventListener("resize", n);
899
+ });
900
+ const a = f && c ? le(f, n) : null;
901
+ let m = -1, u = null;
902
+ s && (u = new ResizeObserver((g) => {
903
+ let [x] = g;
904
+ x && x.target === f && u && (u.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
905
+ var y;
906
+ (y = u) == null || y.observe(e);
907
+ })), n();
908
+ }), f && !l && u.observe(f), u.observe(e));
909
+ let h, p = l ? B(t) : null;
910
+ l && w();
911
+ function w() {
912
+ const g = B(t);
913
+ p && !kt(p, g) && n(), p = g, h = requestAnimationFrame(w);
914
+ }
915
+ return n(), () => {
916
+ var g;
917
+ d.forEach((x) => {
918
+ i && x.removeEventListener("scroll", n), r && x.removeEventListener("resize", n);
919
+ }), a == null || a(), (g = u) == null || g.disconnect(), u = null, l && cancelAnimationFrame(h);
920
+ };
921
+ }
922
+ const ae = jt, ue = Yt, de = zt, me = (t, e, n) => {
923
+ const o = /* @__PURE__ */ new Map(), i = {
924
+ platform: ce,
925
+ ...n
926
+ }, r = {
927
+ ...i.platform,
928
+ _c: o
929
+ };
930
+ return _t(t, e, {
931
+ ...i,
932
+ platform: r
933
+ });
934
+ };
935
+ export {
936
+ fe as a,
937
+ E as b,
938
+ me as c,
939
+ R as d,
940
+ H as e,
941
+ de as f,
942
+ $ as g,
943
+ D as h,
944
+ wt as i,
945
+ O as j,
946
+ j as k,
947
+ lt as l,
948
+ ae as o,
949
+ ue as s
950
+ };