bitboss-ui 0.2.4 → 0.2.5

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 (116) hide show
  1. package/dist/index101.js +2 -2
  2. package/dist/index103.js +2 -2
  3. package/dist/index109.js +1 -1
  4. package/dist/index11.js +2 -2
  5. package/dist/index111.js +5 -5
  6. package/dist/index113.js +1 -1
  7. package/dist/index116.js +1 -1
  8. package/dist/index117.js +1 -1
  9. package/dist/index118.js +1 -1
  10. package/dist/index119.js +1 -1
  11. package/dist/index121.js +1 -1
  12. package/dist/index125.js +1 -1
  13. package/dist/index126.js +1 -1
  14. package/dist/index128.js +2 -2
  15. package/dist/index15.js +8 -8
  16. package/dist/index17.js +9 -9
  17. package/dist/index19.js +3 -3
  18. package/dist/index195.js +5 -235
  19. package/dist/index195.js.map +1 -1
  20. package/dist/index196.js +16 -5
  21. package/dist/index196.js.map +1 -1
  22. package/dist/index197.js +10 -10
  23. package/dist/index197.js.map +1 -1
  24. package/dist/index198.js +18 -15
  25. package/dist/index198.js.map +1 -1
  26. package/dist/index199.js +19 -18
  27. package/dist/index199.js.map +1 -1
  28. package/dist/index200.js +24 -15
  29. package/dist/index200.js.map +1 -1
  30. package/dist/index201.js +8 -29
  31. package/dist/index201.js.map +1 -1
  32. package/dist/index202.js +2 -8
  33. package/dist/index202.js.map +1 -1
  34. package/dist/index203.js +235 -2
  35. package/dist/index203.js.map +1 -1
  36. package/dist/index204.js +10 -2
  37. package/dist/index204.js.map +1 -1
  38. package/dist/index205.js +2 -4
  39. package/dist/index205.js.map +1 -1
  40. package/dist/index206.js +4 -2
  41. package/dist/index206.js.map +1 -1
  42. package/dist/index207.js +351 -3
  43. package/dist/index207.js.map +1 -1
  44. package/dist/index208.js +133 -34
  45. package/dist/index208.js.map +1 -1
  46. package/dist/index209.js +2 -6
  47. package/dist/index209.js.map +1 -1
  48. package/dist/index21.js +2 -2
  49. package/dist/index210.js +186 -3
  50. package/dist/index210.js.map +1 -1
  51. package/dist/index211.js +23 -3
  52. package/dist/index211.js.map +1 -1
  53. package/dist/index212.js +347 -329
  54. package/dist/index212.js.map +1 -1
  55. package/dist/index213.js +2 -134
  56. package/dist/index213.js.map +1 -1
  57. package/dist/index214.js +2 -2
  58. package/dist/index214.js.map +1 -1
  59. package/dist/index215.js +3 -186
  60. package/dist/index215.js.map +1 -1
  61. package/dist/index216.js +3 -23
  62. package/dist/index216.js.map +1 -1
  63. package/dist/index217.js +3 -369
  64. package/dist/index217.js.map +1 -1
  65. package/dist/index218.js +2 -10
  66. package/dist/index218.js.map +1 -1
  67. package/dist/index219.js +6 -2
  68. package/dist/index219.js.map +1 -1
  69. package/dist/index220.js +35 -9
  70. package/dist/index220.js.map +1 -1
  71. package/dist/index221.js +7 -114
  72. package/dist/index221.js.map +1 -1
  73. package/dist/index222.js +116 -2
  74. package/dist/index222.js.map +1 -1
  75. package/dist/index23.js +1 -1
  76. package/dist/index236.js +69 -2
  77. package/dist/index236.js.map +1 -1
  78. package/dist/index237.js +154 -61
  79. package/dist/index237.js.map +1 -1
  80. package/dist/index238.js +2 -162
  81. package/dist/index238.js.map +1 -1
  82. package/dist/index239.js +2 -2
  83. package/dist/index240.js +111 -218
  84. package/dist/index240.js.map +1 -1
  85. package/dist/index241.js +94 -246
  86. package/dist/index241.js.map +1 -1
  87. package/dist/index242.js +2 -435
  88. package/dist/index242.js.map +1 -1
  89. package/dist/index243.js +218 -83
  90. package/dist/index243.js.map +1 -1
  91. package/dist/index244.js +258 -2
  92. package/dist/index244.js.map +1 -1
  93. package/dist/index245.js +2 -117
  94. package/dist/index245.js.map +1 -1
  95. package/dist/index246.js +88 -105
  96. package/dist/index246.js.map +1 -1
  97. package/dist/index247.js +435 -2
  98. package/dist/index247.js.map +1 -1
  99. package/dist/index25.js +2 -2
  100. package/dist/index252.js +1 -1
  101. package/dist/index253.js +2 -2
  102. package/dist/index29.js +3 -3
  103. package/dist/index31.js +6 -6
  104. package/dist/index33.js +2 -2
  105. package/dist/index35.js +2 -2
  106. package/dist/index47.js +1 -1
  107. package/dist/index49.js +1 -1
  108. package/dist/index65.js +5 -5
  109. package/dist/index72.js +1 -1
  110. package/dist/index75.js +1 -1
  111. package/dist/index79.js +4 -4
  112. package/dist/index8.js +72 -72
  113. package/dist/index8.js.map +1 -1
  114. package/dist/index81.js +1 -1
  115. package/dist/style.css +1 -1
  116. package/package.json +1 -1
package/dist/index212.js CHANGED
@@ -1,354 +1,372 @@
1
- import { computePosition as Z } from "./index217.js";
2
- import { arrow as Ct, detectOverflow as Et, flip as Ot, offset as Tt, shift as Lt } from "./index217.js";
3
- import { createCoords as x, rectToClientRect as U, round as A, max as T, min as H, floor as B } from "./index245.js";
4
- import { getOverflowAncestors as I, isElement as y, getWindow as E, getComputedStyle as m, getDocumentElement as b, isHTMLElement as v, isWebKit as _, getNodeName as F, isOverflowElement as z, getNodeScroll as N, isTableElement as P, isContainingBlock as K, getContainingBlock as tt, getParentNode as V, isLastTraversableNode as X } from "./index246.js";
5
- function j(t) {
6
- const e = m(t);
7
- let o = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
8
- const n = v(t), c = n ? t.offsetWidth : o, s = n ? t.offsetHeight : i, r = A(o) !== c || A(i) !== s;
9
- return r && (o = c, i = s), {
10
- width: o,
11
- height: i,
12
- $: r
13
- };
14
- }
15
- function M(t) {
16
- return y(t) ? t : t.contextElement;
17
- }
18
- function L(t) {
19
- const e = M(t);
20
- if (!v(e))
21
- return x(1);
22
- const o = e.getBoundingClientRect(), {
23
- width: i,
24
- height: n,
25
- $: c
26
- } = j(e);
27
- let s = (c ? A(o.width) : o.width) / i, r = (c ? A(o.height) : o.height) / n;
28
- return (!s || !Number.isFinite(s)) && (s = 1), (!r || !Number.isFinite(r)) && (r = 1), {
29
- x: s,
30
- y: r
31
- };
32
- }
33
- const et = /* @__PURE__ */ x(0);
34
- function G(t) {
35
- const e = E(t);
36
- return !_() || !e.visualViewport ? et : {
37
- x: e.visualViewport.offsetLeft,
38
- y: e.visualViewport.offsetTop
39
- };
40
- }
41
- function ot(t, e, o) {
42
- return e === void 0 && (e = !1), !o || e && o !== E(t) ? !1 : e;
43
- }
44
- function O(t, e, o, i) {
45
- e === void 0 && (e = !1), o === void 0 && (o = !1);
46
- const n = t.getBoundingClientRect(), c = M(t);
47
- let s = x(1);
48
- e && (i ? y(i) && (s = L(i)) : s = L(t));
49
- const r = ot(c, o, i) ? G(c) : x(0);
50
- let l = (n.left + r.x) / s.x, f = (n.top + r.y) / s.y, p = n.width / s.x, d = n.height / s.y;
51
- if (c) {
52
- const w = E(c), a = i && y(i) ? E(i) : i;
53
- let g = w.frameElement;
54
- for (; g && i && a !== w; ) {
55
- const h = L(g), R = g.getBoundingClientRect(), u = m(g), C = R.left + (g.clientLeft + parseFloat(u.paddingLeft)) * h.x, W = R.top + (g.clientTop + parseFloat(u.paddingTop)) * h.y;
56
- l *= h.x, f *= h.y, p *= h.x, d *= h.y, l += C, f += W, g = E(g).frameElement;
57
- }
58
- }
59
- return U({
60
- width: p,
61
- height: d,
62
- x: l,
63
- y: f
64
- });
65
- }
66
- function it(t) {
1
+ import { evaluate as j, getSide as M, getOppositePlacement as J, getExpandedPlacements as K, getOppositeAxisPlacements as N, getAlignmentSides as Q, getSideAxis as F, clamp as B, getPaddingObject as I, rectToClientRect as X, getAlignmentAxis as W, getAlignment as Y, getOppositeAxis as U, getAxisLength as $, min as z } from "./index240.js";
2
+ function H(o, i, d) {
67
3
  let {
68
- rect: e,
69
- offsetParent: o,
70
- strategy: i
71
- } = t;
72
- const n = v(o), c = b(o);
73
- if (o === c)
74
- return e;
75
- let s = {
76
- scrollLeft: 0,
77
- scrollTop: 0
78
- }, r = x(1);
79
- const l = x(0);
80
- if ((n || !n && i !== "fixed") && ((F(o) !== "body" || z(c)) && (s = N(o)), v(o))) {
81
- const f = O(o);
82
- r = L(o), l.x = f.x + o.clientLeft, l.y = f.y + o.clientTop;
4
+ reference: e,
5
+ floating: c
6
+ } = o;
7
+ const n = F(i), a = W(i), r = $(a), u = M(i), x = n === "y", m = e.x + e.width / 2 - c.width / 2, l = e.y + e.height / 2 - c.height / 2, f = e[r] / 2 - c[r] / 2;
8
+ let t;
9
+ switch (u) {
10
+ case "top":
11
+ t = {
12
+ x: m,
13
+ y: e.y - c.height
14
+ };
15
+ break;
16
+ case "bottom":
17
+ t = {
18
+ x: m,
19
+ y: e.y + e.height
20
+ };
21
+ break;
22
+ case "right":
23
+ t = {
24
+ x: e.x + e.width,
25
+ y: l
26
+ };
27
+ break;
28
+ case "left":
29
+ t = {
30
+ x: e.x - c.width,
31
+ y: l
32
+ };
33
+ break;
34
+ default:
35
+ t = {
36
+ x: e.x,
37
+ y: e.y
38
+ };
83
39
  }
84
- return {
85
- width: e.width * r.x,
86
- height: e.height * r.y,
87
- x: e.x * r.x - s.scrollLeft * r.x + l.x,
88
- y: e.y * r.y - s.scrollTop * r.y + l.y
89
- };
90
- }
91
- function nt(t) {
92
- return Array.from(t.getClientRects());
93
- }
94
- function J(t) {
95
- return O(b(t)).left + N(t).scrollLeft;
96
- }
97
- function st(t) {
98
- const e = b(t), o = N(t), i = t.ownerDocument.body, n = T(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), c = T(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
99
- let s = -o.scrollLeft + J(t);
100
- const r = -o.scrollTop;
101
- return m(i).direction === "rtl" && (s += T(e.clientWidth, i.clientWidth) - n), {
102
- width: n,
103
- height: c,
104
- x: s,
105
- y: r
106
- };
40
+ switch (Y(i)) {
41
+ case "start":
42
+ t[a] -= f * (d && x ? -1 : 1);
43
+ break;
44
+ case "end":
45
+ t[a] += f * (d && x ? -1 : 1);
46
+ break;
47
+ }
48
+ return t;
107
49
  }
108
- function rt(t, e) {
109
- const o = E(t), i = b(t), n = o.visualViewport;
110
- let c = i.clientWidth, s = i.clientHeight, r = 0, l = 0;
111
- if (n) {
112
- c = n.width, s = n.height;
113
- const f = _();
114
- (!f || f && e === "fixed") && (r = n.offsetLeft, l = n.offsetTop);
50
+ const tt = async (o, i, d) => {
51
+ const {
52
+ placement: e = "bottom",
53
+ strategy: c = "absolute",
54
+ middleware: n = [],
55
+ platform: a
56
+ } = d, r = n.filter(Boolean), u = await (a.isRTL == null ? void 0 : a.isRTL(i));
57
+ let x = await a.getElementRects({
58
+ reference: o,
59
+ floating: i,
60
+ strategy: c
61
+ }), {
62
+ x: m,
63
+ y: l
64
+ } = H(x, e, u), f = e, t = {}, s = 0;
65
+ for (let p = 0; p < r.length; p++) {
66
+ const {
67
+ name: g,
68
+ fn: w
69
+ } = r[p], {
70
+ x: h,
71
+ y,
72
+ data: P,
73
+ reset: v
74
+ } = await w({
75
+ x: m,
76
+ y: l,
77
+ initialPlacement: e,
78
+ placement: f,
79
+ strategy: c,
80
+ middlewareData: t,
81
+ rects: x,
82
+ platform: a,
83
+ elements: {
84
+ reference: o,
85
+ floating: i
86
+ }
87
+ });
88
+ if (m = h ?? m, l = y ?? l, t = {
89
+ ...t,
90
+ [g]: {
91
+ ...t[g],
92
+ ...P
93
+ }
94
+ }, v && s <= 50) {
95
+ s++, typeof v == "object" && (v.placement && (f = v.placement), v.rects && (x = v.rects === !0 ? await a.getElementRects({
96
+ reference: o,
97
+ floating: i,
98
+ strategy: c
99
+ }) : v.rects), {
100
+ x: m,
101
+ y: l
102
+ } = H(x, f, u)), p = -1;
103
+ continue;
104
+ }
115
105
  }
116
106
  return {
117
- width: c,
118
- height: s,
119
- x: r,
120
- y: l
107
+ x: m,
108
+ y: l,
109
+ placement: f,
110
+ strategy: c,
111
+ middlewareData: t
121
112
  };
122
- }
123
- function ct(t, e) {
124
- const o = O(t, !0, e === "fixed"), i = o.top + t.clientTop, n = o.left + t.clientLeft, c = v(t) ? L(t) : x(1), s = t.clientWidth * c.x, r = t.clientHeight * c.y, l = n * c.x, f = i * c.y;
113
+ };
114
+ async function q(o, i) {
115
+ var d;
116
+ i === void 0 && (i = {});
117
+ const {
118
+ x: e,
119
+ y: c,
120
+ platform: n,
121
+ rects: a,
122
+ elements: r,
123
+ strategy: u
124
+ } = o, {
125
+ boundary: x = "clippingAncestors",
126
+ rootBoundary: m = "viewport",
127
+ elementContext: l = "floating",
128
+ altBoundary: f = !1,
129
+ padding: t = 0
130
+ } = j(i, o), s = I(t), g = r[f ? l === "floating" ? "reference" : "floating" : l], w = X(await n.getClippingRect({
131
+ element: (d = await (n.isElement == null ? void 0 : n.isElement(g))) == null || d ? g : g.contextElement || await (n.getDocumentElement == null ? void 0 : n.getDocumentElement(r.floating)),
132
+ boundary: x,
133
+ rootBoundary: m,
134
+ strategy: u
135
+ })), h = l === "floating" ? {
136
+ ...a.floating,
137
+ x: e,
138
+ y: c
139
+ } : a.reference, y = await (n.getOffsetParent == null ? void 0 : n.getOffsetParent(r.floating)), P = await (n.isElement == null ? void 0 : n.isElement(y)) ? await (n.getScale == null ? void 0 : n.getScale(y)) || {
140
+ x: 1,
141
+ y: 1
142
+ } : {
143
+ x: 1,
144
+ y: 1
145
+ }, v = X(n.convertOffsetParentRelativeRectToViewportRelativeRect ? await n.convertOffsetParentRelativeRectToViewportRelativeRect({
146
+ rect: h,
147
+ offsetParent: y,
148
+ strategy: u
149
+ }) : h);
125
150
  return {
126
- width: s,
127
- height: r,
128
- x: l,
129
- y: f
151
+ top: (w.top - v.top + s.top) / P.y,
152
+ bottom: (v.bottom - w.bottom + s.bottom) / P.y,
153
+ left: (w.left - v.left + s.left) / P.x,
154
+ right: (v.right - w.right + s.right) / P.x
130
155
  };
131
156
  }
132
- function k(t, e, o) {
133
- let i;
134
- if (e === "viewport")
135
- i = rt(t, o);
136
- else if (e === "document")
137
- i = st(b(t));
138
- else if (y(e))
139
- i = ct(e, o);
140
- else {
141
- const n = G(t);
142
- i = {
143
- ...e,
144
- x: e.x - n.x,
145
- y: e.y - n.y
157
+ const et = (o) => ({
158
+ name: "arrow",
159
+ options: o,
160
+ async fn(i) {
161
+ const {
162
+ x: d,
163
+ y: e,
164
+ placement: c,
165
+ rects: n,
166
+ platform: a,
167
+ elements: r,
168
+ middlewareData: u
169
+ } = i, {
170
+ element: x,
171
+ padding: m = 0
172
+ } = j(o, i) || {};
173
+ if (x == null)
174
+ return {};
175
+ const l = I(m), f = {
176
+ x: d,
177
+ y: e
178
+ }, t = W(c), s = $(t), p = await a.getDimensions(x), g = t === "y", w = g ? "top" : "left", h = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", P = n.reference[s] + n.reference[t] - f[t] - n.floating[s], v = f[t] - n.reference[t], E = await (a.getOffsetParent == null ? void 0 : a.getOffsetParent(x));
179
+ let O = E ? E[y] : 0;
180
+ (!O || !await (a.isElement == null ? void 0 : a.isElement(E))) && (O = r.floating[y] || n.floating[s]);
181
+ const S = P / 2 - v / 2, T = O / 2 - p[s] / 2 - 1, D = z(l[w], T), L = z(l[h], T), b = D, V = O - p[s] - L, A = O / 2 - p[s] / 2 + S, R = B(b, A, V), k = !u.arrow && Y(c) != null && A != R && n.reference[s] / 2 - (A < b ? D : L) - p[s] / 2 < 0, C = k ? A < b ? A - b : A - V : 0;
182
+ return {
183
+ [t]: f[t] + C,
184
+ data: {
185
+ [t]: R,
186
+ centerOffset: A - R - C,
187
+ ...k && {
188
+ alignmentOffset: C
189
+ }
190
+ },
191
+ reset: k
146
192
  };
147
193
  }
148
- return U(i);
149
- }
150
- function Q(t, e) {
151
- const o = V(t);
152
- return o === e || !y(o) || X(o) ? !1 : m(o).position === "fixed" || Q(o, e);
153
- }
154
- function lt(t, e) {
155
- const o = e.get(t);
156
- if (o)
157
- return o;
158
- let i = I(t, [], !1).filter((r) => y(r) && F(r) !== "body"), n = null;
159
- const c = m(t).position === "fixed";
160
- let s = c ? V(t) : t;
161
- for (; y(s) && !X(s); ) {
162
- const r = m(s), l = K(s);
163
- !l && r.position === "fixed" && (n = null), (c ? !l && !n : !l && r.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || z(s) && !l && Q(t, s)) ? i = i.filter((p) => p !== s) : n = r, s = V(s);
164
- }
165
- return e.set(t, i), i;
166
- }
167
- function ft(t) {
168
- let {
169
- element: e,
170
- boundary: o,
171
- rootBoundary: i,
172
- strategy: n
173
- } = t;
174
- const s = [...o === "clippingAncestors" ? lt(e, this._c) : [].concat(o), i], r = s[0], l = s.reduce((f, p) => {
175
- const d = k(e, p, n);
176
- return f.top = T(d.top, f.top), f.right = H(d.right, f.right), f.bottom = H(d.bottom, f.bottom), f.left = T(d.left, f.left), f;
177
- }, k(e, r, n));
178
- return {
179
- width: l.right - l.left,
180
- height: l.bottom - l.top,
181
- x: l.left,
182
- y: l.top
194
+ }), nt = function(o) {
195
+ return o === void 0 && (o = {}), {
196
+ name: "flip",
197
+ options: o,
198
+ async fn(i) {
199
+ var d, e;
200
+ const {
201
+ placement: c,
202
+ middlewareData: n,
203
+ rects: a,
204
+ initialPlacement: r,
205
+ platform: u,
206
+ elements: x
207
+ } = i, {
208
+ mainAxis: m = !0,
209
+ crossAxis: l = !0,
210
+ fallbackPlacements: f,
211
+ fallbackStrategy: t = "bestFit",
212
+ fallbackAxisSideDirection: s = "none",
213
+ flipAlignment: p = !0,
214
+ ...g
215
+ } = j(o, i);
216
+ if ((d = n.arrow) != null && d.alignmentOffset)
217
+ return {};
218
+ const w = M(c), h = M(r) === r, y = await (u.isRTL == null ? void 0 : u.isRTL(x.floating)), P = f || (h || !p ? [J(r)] : K(r));
219
+ !f && s !== "none" && P.push(...N(r, p, s, y));
220
+ const v = [r, ...P], E = await q(i, g), O = [];
221
+ let S = ((e = n.flip) == null ? void 0 : e.overflows) || [];
222
+ if (m && O.push(E[w]), l) {
223
+ const b = Q(c, a, y);
224
+ O.push(E[b[0]], E[b[1]]);
225
+ }
226
+ if (S = [...S, {
227
+ placement: c,
228
+ overflows: O
229
+ }], !O.every((b) => b <= 0)) {
230
+ var T, D;
231
+ const b = (((T = n.flip) == null ? void 0 : T.index) || 0) + 1, V = v[b];
232
+ if (V)
233
+ return {
234
+ data: {
235
+ index: b,
236
+ overflows: S
237
+ },
238
+ reset: {
239
+ placement: V
240
+ }
241
+ };
242
+ let A = (D = S.filter((R) => R.overflows[0] <= 0).sort((R, k) => R.overflows[1] - k.overflows[1])[0]) == null ? void 0 : D.placement;
243
+ if (!A)
244
+ switch (t) {
245
+ case "bestFit": {
246
+ var L;
247
+ const R = (L = S.map((k) => [k.placement, k.overflows.filter((C) => C > 0).reduce((C, G) => C + G, 0)]).sort((k, C) => k[1] - C[1])[0]) == null ? void 0 : L[0];
248
+ R && (A = R);
249
+ break;
250
+ }
251
+ case "initialPlacement":
252
+ A = r;
253
+ break;
254
+ }
255
+ if (c !== A)
256
+ return {
257
+ reset: {
258
+ placement: A
259
+ }
260
+ };
261
+ }
262
+ return {};
263
+ }
183
264
  };
184
- }
185
- function ut(t) {
186
- return j(t);
187
- }
188
- function ht(t, e, o) {
189
- const i = v(e), n = b(e), c = o === "fixed", s = O(t, !0, c, e);
190
- let r = {
191
- scrollLeft: 0,
192
- scrollTop: 0
265
+ };
266
+ async function Z(o, i) {
267
+ const {
268
+ placement: d,
269
+ platform: e,
270
+ elements: c
271
+ } = o, n = await (e.isRTL == null ? void 0 : e.isRTL(c.floating)), a = M(d), r = Y(d), u = F(d) === "y", x = ["left", "top"].includes(a) ? -1 : 1, m = n && u ? -1 : 1, l = j(i, o);
272
+ let {
273
+ mainAxis: f,
274
+ crossAxis: t,
275
+ alignmentAxis: s
276
+ } = typeof l == "number" ? {
277
+ mainAxis: l,
278
+ crossAxis: 0,
279
+ alignmentAxis: null
280
+ } : {
281
+ mainAxis: 0,
282
+ crossAxis: 0,
283
+ alignmentAxis: null,
284
+ ...l
193
285
  };
194
- const l = x(0);
195
- if (i || !i && !c)
196
- if ((F(e) !== "body" || z(n)) && (r = N(e)), i) {
197
- const f = O(e, !0, c, e);
198
- l.x = f.x + e.clientLeft, l.y = f.y + e.clientTop;
199
- } else
200
- n && (l.x = J(n));
201
- return {
202
- x: s.left + r.scrollLeft - l.x,
203
- y: s.top + r.scrollTop - l.y,
204
- width: s.width,
205
- height: s.height
286
+ return r && typeof s == "number" && (t = r === "end" ? s * -1 : s), u ? {
287
+ x: t * m,
288
+ y: f * x
289
+ } : {
290
+ x: f * x,
291
+ y: t * m
206
292
  };
207
293
  }
208
- function q(t, e) {
209
- return !v(t) || m(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
210
- }
211
- function Y(t, e) {
212
- const o = E(t);
213
- if (!v(t))
214
- return o;
215
- let i = q(t, e);
216
- for (; i && P(i) && m(i).position === "static"; )
217
- i = q(i, e);
218
- return i && (F(i) === "html" || F(i) === "body" && m(i).position === "static" && !K(i)) ? o : i || tt(t) || o;
219
- }
220
- const at = async function(t) {
221
- let {
222
- reference: e,
223
- floating: o,
224
- strategy: i
225
- } = t;
226
- const n = this.getOffsetParent || Y, c = this.getDimensions;
227
- return {
228
- reference: ht(e, await n(o), i),
229
- floating: {
230
- x: 0,
231
- y: 0,
232
- ...await c(o)
294
+ const it = function(o) {
295
+ return o === void 0 && (o = 0), {
296
+ name: "offset",
297
+ options: o,
298
+ async fn(i) {
299
+ const {
300
+ x: d,
301
+ y: e
302
+ } = i, c = await Z(i, o);
303
+ return {
304
+ x: d + c.x,
305
+ y: e + c.y,
306
+ data: c
307
+ };
233
308
  }
234
309
  };
235
- };
236
- function dt(t) {
237
- return m(t).direction === "rtl";
238
- }
239
- const gt = {
240
- convertOffsetParentRelativeRectToViewportRelativeRect: it,
241
- getDocumentElement: b,
242
- getClippingRect: ft,
243
- getOffsetParent: Y,
244
- getElementRects: at,
245
- getClientRects: nt,
246
- getDimensions: ut,
247
- getScale: L,
248
- isElement: y,
249
- isRTL: dt
250
- };
251
- function pt(t, e) {
252
- let o = null, i;
253
- const n = b(t);
254
- function c() {
255
- clearTimeout(i), o && o.disconnect(), o = null;
256
- }
257
- function s(r, l) {
258
- r === void 0 && (r = !1), l === void 0 && (l = 1), c();
259
- const {
260
- left: f,
261
- top: p,
262
- width: d,
263
- height: w
264
- } = t.getBoundingClientRect();
265
- if (r || e(), !d || !w)
266
- return;
267
- const a = B(p), g = B(n.clientWidth - (f + d)), h = B(n.clientHeight - (p + w)), R = B(f), C = {
268
- rootMargin: -a + "px " + -g + "px " + -h + "px " + -R + "px",
269
- threshold: T(0, H(1, l)) || 1
270
- };
271
- let W = !0;
272
- function S($) {
273
- const D = $[0].intersectionRatio;
274
- if (D !== l) {
275
- if (!W)
276
- return s();
277
- D ? s(!1, D) : i = setTimeout(() => {
278
- s(!1, 1e-7);
279
- }, 100);
310
+ }, ot = function(o) {
311
+ return o === void 0 && (o = {}), {
312
+ name: "shift",
313
+ options: o,
314
+ async fn(i) {
315
+ const {
316
+ x: d,
317
+ y: e,
318
+ placement: c
319
+ } = i, {
320
+ mainAxis: n = !0,
321
+ crossAxis: a = !1,
322
+ limiter: r = {
323
+ fn: (g) => {
324
+ let {
325
+ x: w,
326
+ y: h
327
+ } = g;
328
+ return {
329
+ x: w,
330
+ y: h
331
+ };
332
+ }
333
+ },
334
+ ...u
335
+ } = j(o, i), x = {
336
+ x: d,
337
+ y: e
338
+ }, m = await q(i, u), l = F(M(c)), f = U(l);
339
+ let t = x[f], s = x[l];
340
+ if (n) {
341
+ const g = f === "y" ? "top" : "left", w = f === "y" ? "bottom" : "right", h = t + m[g], y = t - m[w];
342
+ t = B(h, t, y);
280
343
  }
281
- W = !1;
282
- }
283
- try {
284
- o = new IntersectionObserver(S, {
285
- ...C,
286
- // Handle <iframe>s
287
- root: n.ownerDocument
344
+ if (a) {
345
+ const g = l === "y" ? "top" : "left", w = l === "y" ? "bottom" : "right", h = s + m[g], y = s - m[w];
346
+ s = B(h, s, y);
347
+ }
348
+ const p = r.fn({
349
+ ...i,
350
+ [f]: t,
351
+ [l]: s
288
352
  });
289
- } catch {
290
- o = new IntersectionObserver(S, C);
353
+ return {
354
+ ...p,
355
+ data: {
356
+ x: p.x - d,
357
+ y: p.y - e
358
+ }
359
+ };
291
360
  }
292
- o.observe(t);
293
- }
294
- return s(!0), c;
295
- }
296
- function yt(t, e, o, i) {
297
- i === void 0 && (i = {});
298
- const {
299
- ancestorScroll: n = !0,
300
- ancestorResize: c = !0,
301
- elementResize: s = typeof ResizeObserver == "function",
302
- layoutShift: r = typeof IntersectionObserver == "function",
303
- animationFrame: l = !1
304
- } = i, f = M(t), p = n || c ? [...f ? I(f) : [], ...I(e)] : [];
305
- p.forEach((u) => {
306
- n && u.addEventListener("scroll", o, {
307
- passive: !0
308
- }), c && u.addEventListener("resize", o);
309
- });
310
- const d = f && r ? pt(f, o) : null;
311
- let w = -1, a = null;
312
- s && (a = new ResizeObserver((u) => {
313
- let [C] = u;
314
- C && C.target === f && a && (a.unobserve(e), cancelAnimationFrame(w), w = requestAnimationFrame(() => {
315
- a && a.observe(e);
316
- })), o();
317
- }), f && !l && a.observe(f), a.observe(e));
318
- let g, h = l ? O(t) : null;
319
- l && R();
320
- function R() {
321
- const u = O(t);
322
- h && (u.x !== h.x || u.y !== h.y || u.width !== h.width || u.height !== h.height) && o(), h = u, g = requestAnimationFrame(R);
323
- }
324
- return o(), () => {
325
- p.forEach((u) => {
326
- n && u.removeEventListener("scroll", o), c && u.removeEventListener("resize", o);
327
- }), d && d(), a && a.disconnect(), a = null, l && cancelAnimationFrame(g);
328
- };
329
- }
330
- const vt = (t, e, o) => {
331
- const i = /* @__PURE__ */ new Map(), n = {
332
- platform: gt,
333
- ...o
334
- }, c = {
335
- ...n.platform,
336
- _c: i
337
361
  };
338
- return Z(t, e, {
339
- ...n,
340
- platform: c
341
- });
342
362
  };
343
363
  export {
344
- Ct as arrow,
345
- yt as autoUpdate,
346
- vt as computePosition,
347
- Et as detectOverflow,
348
- Ot as flip,
349
- I as getOverflowAncestors,
350
- Tt as offset,
351
- gt as platform,
352
- Lt as shift
364
+ et as arrow,
365
+ tt as computePosition,
366
+ q as detectOverflow,
367
+ nt as flip,
368
+ it as offset,
369
+ X as rectToClientRect,
370
+ ot as shift
353
371
  };
354
372
  //# sourceMappingURL=index212.js.map