@devalok/shilp-sutra 0.32.0 → 0.33.1

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 (66) hide show
  1. package/LICENSE +21 -0
  2. package/dist/_chunks/date-time-picker.js +851 -0
  3. package/dist/_chunks/framer.js +1777 -1728
  4. package/dist/_chunks/mention-suggestion.js +362 -0
  5. package/dist/_chunks/tiptap.js +11595 -7731
  6. package/dist/_chunks/use-calendar.js +115 -956
  7. package/dist/_chunks/vendor-client.js +1062 -878
  8. package/dist/composed/date-picker/index.js +9 -8
  9. package/dist/composed/emoji-picker.d.ts +8 -2
  10. package/dist/composed/emoji-picker.d.ts.map +1 -1
  11. package/dist/composed/emoji-picker.js +65 -56
  12. package/dist/composed/extensions/emoji-data.d.ts +35 -0
  13. package/dist/composed/extensions/emoji-data.d.ts.map +1 -0
  14. package/dist/composed/extensions/emoji-node.d.ts +11 -0
  15. package/dist/composed/extensions/emoji-node.d.ts.map +1 -0
  16. package/dist/composed/extensions/emoji-suggestion.d.ts +4 -6
  17. package/dist/composed/extensions/emoji-suggestion.d.ts.map +1 -1
  18. package/dist/composed/extensions/slash-command.d.ts +35 -0
  19. package/dist/composed/extensions/slash-command.d.ts.map +1 -0
  20. package/dist/composed/index.d.ts +7 -1
  21. package/dist/composed/index.d.ts.map +1 -1
  22. package/dist/composed/index.js +79 -70
  23. package/dist/composed/rich-chat-input/attachment-strip.d.ts +15 -0
  24. package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -0
  25. package/dist/composed/rich-chat-input/audio-player.d.ts +11 -0
  26. package/dist/composed/rich-chat-input/audio-player.d.ts.map +1 -0
  27. package/dist/composed/rich-chat-input/audio-waveform.d.ts +24 -0
  28. package/dist/composed/rich-chat-input/audio-waveform.d.ts.map +1 -0
  29. package/dist/composed/rich-chat-input/chat-toolbar.d.ts +51 -0
  30. package/dist/composed/rich-chat-input/chat-toolbar.d.ts.map +1 -0
  31. package/dist/composed/rich-chat-input/recording-overlay.d.ts +15 -0
  32. package/dist/composed/rich-chat-input/recording-overlay.d.ts.map +1 -0
  33. package/dist/composed/rich-chat-input/reply-banner.d.ts +8 -0
  34. package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -0
  35. package/dist/composed/rich-chat-input/schedule-send.d.ts +22 -0
  36. package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -0
  37. package/dist/composed/rich-chat-input/use-voice-recorder.d.ts +18 -0
  38. package/dist/composed/rich-chat-input/use-voice-recorder.d.ts.map +1 -0
  39. package/dist/composed/rich-chat-input.d.ts +91 -0
  40. package/dist/composed/rich-chat-input.d.ts.map +1 -0
  41. package/dist/composed/rich-chat-input.js +1861 -0
  42. package/dist/composed/rich-text-editor.d.ts +3 -0
  43. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  44. package/dist/composed/rich-text-editor.js +278 -448
  45. package/dist/ui/button-group.d.ts +27 -37
  46. package/dist/ui/button-group.d.ts.map +1 -1
  47. package/dist/ui/button-group.js +95 -29
  48. package/dist/ui/button.d.ts.map +1 -1
  49. package/dist/ui/button.js +110 -106
  50. package/dist/ui/index.d.ts +1 -0
  51. package/dist/ui/index.d.ts.map +1 -1
  52. package/dist/ui/index.js +335 -333
  53. package/dist/ui/lib/index.d.ts +1 -0
  54. package/dist/ui/lib/index.d.ts.map +1 -1
  55. package/dist/ui/split-button.d.ts +45 -0
  56. package/dist/ui/split-button.d.ts.map +1 -0
  57. package/dist/ui/split-button.js +282 -0
  58. package/docs/components/composed/emoji-picker.md +9 -0
  59. package/docs/components/composed/rich-chat-input.md +88 -0
  60. package/docs/components/composed/rich-text-editor.md +5 -0
  61. package/docs/components/ui/button-group.md +9 -0
  62. package/docs/components/ui/button.md +4 -0
  63. package/docs/components/ui/split-button.md +41 -0
  64. package/llms-full.txt +157 -1
  65. package/llms.txt +22 -2
  66. package/package.json +38 -34
@@ -1,17 +1,17 @@
1
1
  "use client";
2
- import * as b from "react";
3
- import D, { useState as ye, useRef as J, useEffect as St, useCallback as je, useLayoutEffect as be, useMemo as Xe } from "react";
4
- import * as Ye from "react-dom";
5
- var z = function() {
6
- return z = Object.assign || function(e) {
2
+ import * as S from "react";
3
+ import W, { useState as Ce, useRef as et, useEffect as Ct, useCallback as Qe, useLayoutEffect as Ee, useMemo as Ge } from "react";
4
+ import * as Je from "react-dom";
5
+ var K = function() {
6
+ return K = Object.assign || function(e) {
7
7
  for (var n, r = 1, o = arguments.length; r < o; r++) {
8
8
  n = arguments[r];
9
9
  for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
10
10
  }
11
11
  return e;
12
- }, z.apply(this, arguments);
12
+ }, K.apply(this, arguments);
13
13
  };
14
- function xe(t, e) {
14
+ function Ae(t, e) {
15
15
  var n = {};
16
16
  for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
17
17
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -19,17 +19,17 @@ function xe(t, e) {
19
19
  e.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[o]) && (n[r[o]] = t[r[o]]);
20
20
  return n;
21
21
  }
22
- function qe(t, e, n) {
22
+ function tn(t, e, n) {
23
23
  if (n || arguments.length === 2) for (var r = 0, o = e.length, i; r < o; r++)
24
24
  (i || !(r in e)) && (i || (i = Array.prototype.slice.call(e, 0, r)), i[r] = e[r]);
25
25
  return t.concat(i || Array.prototype.slice.call(e));
26
26
  }
27
- var yt = "right-scroll-bar-position", bt = "width-before-scroll-bar", Ke = "with-scroll-bars-hidden", Ze = "--removed-body-scroll-bar-size";
28
- function Tt(t, e) {
27
+ var xt = "right-scroll-bar-position", St = "width-before-scroll-bar", en = "with-scroll-bars-hidden", nn = "--removed-body-scroll-bar-size";
28
+ function Nt(t, e) {
29
29
  return typeof t == "function" ? t(e) : t && (t.current = e), t;
30
30
  }
31
- function Ue(t, e) {
32
- var n = ye(function() {
31
+ function rn(t, e) {
32
+ var n = Ce(function() {
33
33
  return {
34
34
  // value
35
35
  value: t,
@@ -49,31 +49,31 @@ function Ue(t, e) {
49
49
  })[0];
50
50
  return n.callback = e, n.facade;
51
51
  }
52
- var Qe = typeof window < "u" ? b.useLayoutEffect : b.useEffect, te = /* @__PURE__ */ new WeakMap();
53
- function Ge(t, e) {
54
- var n = Ue(null, function(r) {
52
+ var on = typeof window < "u" ? S.useLayoutEffect : S.useEffect, re = /* @__PURE__ */ new WeakMap();
53
+ function cn(t, e) {
54
+ var n = rn(null, function(r) {
55
55
  return t.forEach(function(o) {
56
- return Tt(o, r);
56
+ return Nt(o, r);
57
57
  });
58
58
  });
59
- return Qe(function() {
60
- var r = te.get(n);
59
+ return on(function() {
60
+ var r = re.get(n);
61
61
  if (r) {
62
62
  var o = new Set(r), i = new Set(t), c = n.current;
63
63
  o.forEach(function(a) {
64
- i.has(a) || Tt(a, null);
64
+ i.has(a) || Nt(a, null);
65
65
  }), i.forEach(function(a) {
66
- o.has(a) || Tt(a, c);
66
+ o.has(a) || Nt(a, c);
67
67
  });
68
68
  }
69
- te.set(n, t);
69
+ re.set(n, t);
70
70
  }, [t]), n;
71
71
  }
72
- function Je(t) {
72
+ function an(t) {
73
73
  return t;
74
74
  }
75
- function tn(t, e) {
76
- e === void 0 && (e = Je);
75
+ function sn(t, e) {
76
+ e === void 0 && (e = an);
77
77
  var n = [], r = !1, o = {
78
78
  read: function() {
79
79
  if (r)
@@ -109,15 +109,15 @@ function tn(t, e) {
109
109
  var a = n;
110
110
  n = [], a.forEach(i), c = n;
111
111
  }
112
- var l = function() {
112
+ var f = function() {
113
113
  var u = c;
114
114
  c = [], u.forEach(i);
115
- }, s = function() {
116
- return Promise.resolve().then(l);
115
+ }, l = function() {
116
+ return Promise.resolve().then(f);
117
117
  };
118
- s(), n = {
118
+ l(), n = {
119
119
  push: function(u) {
120
- c.push(u), s();
120
+ c.push(u), l();
121
121
  },
122
122
  filter: function(u) {
123
123
  return c = c.filter(u), n;
@@ -127,119 +127,119 @@ function tn(t, e) {
127
127
  };
128
128
  return o;
129
129
  }
130
- function en(t) {
130
+ function ln(t) {
131
131
  t === void 0 && (t = {});
132
- var e = tn(null);
133
- return e.options = z({ async: !0, ssr: !1 }, t), e;
132
+ var e = sn(null);
133
+ return e.options = K({ async: !0, ssr: !1 }, t), e;
134
134
  }
135
- var Se = function(t) {
136
- var e = t.sideCar, n = xe(t, ["sideCar"]);
135
+ var Oe = function(t) {
136
+ var e = t.sideCar, n = Ae(t, ["sideCar"]);
137
137
  if (!e)
138
138
  throw new Error("Sidecar: please provide `sideCar` property to import the right car");
139
139
  var r = e.read();
140
140
  if (!r)
141
141
  throw new Error("Sidecar medium not found");
142
- return b.createElement(r, z({}, n));
142
+ return S.createElement(r, K({}, n));
143
143
  };
144
- Se.isSideCarExport = !0;
145
- function nn(t, e) {
146
- return t.useMedium(e), Se;
147
- }
148
- var Ce = en(), Dt = function() {
149
- }, Ot = b.forwardRef(function(t, e) {
150
- var n = b.useRef(null), r = b.useState({
151
- onScrollCapture: Dt,
152
- onWheelCapture: Dt,
153
- onTouchMoveCapture: Dt
154
- }), o = r[0], i = r[1], c = t.forwardProps, a = t.children, l = t.className, s = t.removeScrollBar, u = t.enabled, f = t.shards, m = t.sideCar, h = t.noRelative, p = t.noIsolation, d = t.inert, v = t.allowPinchZoom, g = t.as, w = g === void 0 ? "div" : g, y = t.gapMode, x = xe(t, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = m, C = Ge([n, e]), R = z(z({}, x), o);
155
- return b.createElement(
156
- b.Fragment,
144
+ Oe.isSideCarExport = !0;
145
+ function un(t, e) {
146
+ return t.useMedium(e), Oe;
147
+ }
148
+ var Me = ln(), Bt = function() {
149
+ }, _t = S.forwardRef(function(t, e) {
150
+ var n = S.useRef(null), r = S.useState({
151
+ onScrollCapture: Bt,
152
+ onWheelCapture: Bt,
153
+ onTouchMoveCapture: Bt
154
+ }), o = r[0], i = r[1], c = t.forwardProps, a = t.children, f = t.className, l = t.removeScrollBar, u = t.enabled, s = t.shards, m = t.sideCar, h = t.noRelative, p = t.noIsolation, d = t.inert, g = t.allowPinchZoom, v = t.as, w = v === void 0 ? "div" : v, y = t.gapMode, b = Ae(t, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), x = m, R = cn([n, e]), E = K(K({}, b), o);
155
+ return S.createElement(
156
+ S.Fragment,
157
157
  null,
158
- u && b.createElement(S, { sideCar: Ce, removeScrollBar: s, shards: f, noRelative: h, noIsolation: p, inert: d, setCallbacks: i, allowPinchZoom: !!v, lockRef: n, gapMode: y }),
159
- c ? b.cloneElement(b.Children.only(a), z(z({}, R), { ref: C })) : b.createElement(w, z({}, R, { className: l, ref: C }), a)
158
+ u && S.createElement(x, { sideCar: Me, removeScrollBar: l, shards: s, noRelative: h, noIsolation: p, inert: d, setCallbacks: i, allowPinchZoom: !!g, lockRef: n, gapMode: y }),
159
+ c ? S.cloneElement(S.Children.only(a), K(K({}, E), { ref: R })) : S.createElement(w, K({}, E, { className: f, ref: R }), a)
160
160
  );
161
161
  });
162
- Ot.defaultProps = {
162
+ _t.defaultProps = {
163
163
  enabled: !0,
164
164
  removeScrollBar: !0,
165
165
  inert: !1
166
166
  };
167
- Ot.classNames = {
168
- fullWidth: bt,
169
- zeroRight: yt
167
+ _t.classNames = {
168
+ fullWidth: St,
169
+ zeroRight: xt
170
170
  };
171
- var rn = function() {
171
+ var fn = function() {
172
172
  if (typeof __webpack_nonce__ < "u")
173
173
  return __webpack_nonce__;
174
174
  };
175
- function on() {
175
+ function dn() {
176
176
  if (typeof document === "undefined")
177
177
  return null;
178
178
  var t = document.createElement("style");
179
179
  t.type = "text/css";
180
- var e = rn();
180
+ var e = fn();
181
181
  return e && t.setAttribute("nonce", e), t;
182
182
  }
183
- function cn(t, e) {
183
+ function hn(t, e) {
184
184
  t.styleSheet ? t.styleSheet.cssText = e : t.appendChild(document.createTextNode(e));
185
185
  }
186
- function an(t) {
186
+ function mn(t) {
187
187
  var e = document.head || document.getElementsByTagName("head")[0];
188
188
  e.appendChild(t);
189
189
  }
190
- var sn = function() {
190
+ var gn = function() {
191
191
  var t = 0, e = null;
192
192
  return {
193
193
  add: function(n) {
194
- t == 0 && (e = on()) && (cn(e, n), an(e)), t++;
194
+ t == 0 && (e = dn()) && (hn(e, n), mn(e)), t++;
195
195
  },
196
196
  remove: function() {
197
197
  t--, !t && e && (e.parentNode && e.parentNode.removeChild(e), e = null);
198
198
  }
199
199
  };
200
- }, ln = function() {
201
- var t = sn();
200
+ }, vn = function() {
201
+ var t = gn();
202
202
  return function(e, n) {
203
- b.useEffect(function() {
203
+ S.useEffect(function() {
204
204
  return t.add(e), function() {
205
205
  t.remove();
206
206
  };
207
207
  }, [e && n]);
208
208
  };
209
- }, Re = function() {
210
- var t = ln(), e = function(n) {
209
+ }, _e = function() {
210
+ var t = vn(), e = function(n) {
211
211
  var r = n.styles, o = n.dynamic;
212
212
  return t(r, o), null;
213
213
  };
214
214
  return e;
215
- }, un = {
215
+ }, pn = {
216
216
  left: 0,
217
217
  top: 0,
218
218
  right: 0,
219
219
  gap: 0
220
- }, Nt = function(t) {
220
+ }, Wt = function(t) {
221
221
  return parseInt(t || "", 10) || 0;
222
- }, fn = function(t) {
222
+ }, wn = function(t) {
223
223
  var e = window.getComputedStyle(document.body), n = e[t === "padding" ? "paddingLeft" : "marginLeft"], r = e[t === "padding" ? "paddingTop" : "marginTop"], o = e[t === "padding" ? "paddingRight" : "marginRight"];
224
- return [Nt(n), Nt(r), Nt(o)];
225
- }, dn = function(t) {
224
+ return [Wt(n), Wt(r), Wt(o)];
225
+ }, yn = function(t) {
226
226
  if (t === void 0 && (t = "margin"), typeof window > "u")
227
- return un;
228
- var e = fn(t), n = document.documentElement.clientWidth, r = window.innerWidth;
227
+ return pn;
228
+ var e = wn(t), n = document.documentElement.clientWidth, r = window.innerWidth;
229
229
  return {
230
230
  left: e[0],
231
231
  top: e[1],
232
232
  right: e[2],
233
233
  gap: Math.max(0, r - n + e[2] - e[0])
234
234
  };
235
- }, hn = Re(), ot = "data-scroll-locked", mn = function(t, e, n, r) {
235
+ }, bn = _e(), ct = "data-scroll-locked", xn = function(t, e, n, r) {
236
236
  var o = t.left, i = t.top, c = t.right, a = t.gap;
237
237
  return n === void 0 && (n = "margin"), `
238
- .`.concat(Ke, ` {
238
+ .`.concat(en, ` {
239
239
  overflow: hidden `).concat(r, `;
240
240
  padding-right: `).concat(a, "px ").concat(r, `;
241
241
  }
242
- body[`).concat(ot, `] {
242
+ body[`).concat(ct, `] {
243
243
  overflow: hidden `).concat(r, `;
244
244
  overscroll-behavior: contain;
245
245
  `).concat([
@@ -256,278 +256,278 @@ var sn = function() {
256
256
  ].filter(Boolean).join(""), `
257
257
  }
258
258
 
259
- .`).concat(yt, ` {
259
+ .`).concat(xt, ` {
260
260
  right: `).concat(a, "px ").concat(r, `;
261
261
  }
262
262
 
263
- .`).concat(bt, ` {
263
+ .`).concat(St, ` {
264
264
  margin-right: `).concat(a, "px ").concat(r, `;
265
265
  }
266
266
 
267
- .`).concat(yt, " .").concat(yt, ` {
267
+ .`).concat(xt, " .").concat(xt, ` {
268
268
  right: 0 `).concat(r, `;
269
269
  }
270
270
 
271
- .`).concat(bt, " .").concat(bt, ` {
271
+ .`).concat(St, " .").concat(St, ` {
272
272
  margin-right: 0 `).concat(r, `;
273
273
  }
274
274
 
275
- body[`).concat(ot, `] {
276
- `).concat(Ze, ": ").concat(a, `px;
275
+ body[`).concat(ct, `] {
276
+ `).concat(nn, ": ").concat(a, `px;
277
277
  }
278
278
  `);
279
- }, ee = function() {
280
- var t = parseInt(document.body.getAttribute(ot) || "0", 10);
279
+ }, oe = function() {
280
+ var t = parseInt(document.body.getAttribute(ct) || "0", 10);
281
281
  return isFinite(t) ? t : 0;
282
- }, vn = function() {
283
- b.useEffect(function() {
284
- return document.body.setAttribute(ot, (ee() + 1).toString()), function() {
285
- var t = ee() - 1;
286
- t <= 0 ? document.body.removeAttribute(ot) : document.body.setAttribute(ot, t.toString());
282
+ }, Sn = function() {
283
+ S.useEffect(function() {
284
+ return document.body.setAttribute(ct, (oe() + 1).toString()), function() {
285
+ var t = oe() - 1;
286
+ t <= 0 ? document.body.removeAttribute(ct) : document.body.setAttribute(ct, t.toString());
287
287
  };
288
288
  }, []);
289
- }, gn = function(t) {
289
+ }, Rn = function(t) {
290
290
  var e = t.noRelative, n = t.noImportant, r = t.gapMode, o = r === void 0 ? "margin" : r;
291
- vn();
292
- var i = b.useMemo(function() {
293
- return dn(o);
291
+ Sn();
292
+ var i = S.useMemo(function() {
293
+ return yn(o);
294
294
  }, [o]);
295
- return b.createElement(hn, { styles: mn(i, !e, o, n ? "" : "!important") });
296
- }, Ht = !1;
295
+ return S.createElement(bn, { styles: xn(i, !e, o, n ? "" : "!important") });
296
+ }, Vt = !1;
297
297
  if (typeof window < "u")
298
298
  try {
299
- var ht = Object.defineProperty({}, "passive", {
299
+ var gt = Object.defineProperty({}, "passive", {
300
300
  get: function() {
301
- return Ht = !0, !0;
301
+ return Vt = !0, !0;
302
302
  }
303
303
  });
304
- window.addEventListener("test", ht, ht), window.removeEventListener("test", ht, ht);
304
+ window.addEventListener("test", gt, gt), window.removeEventListener("test", gt, gt);
305
305
  } catch {
306
- Ht = !1;
306
+ Vt = !1;
307
307
  }
308
- var et = Ht ? { passive: !1 } : !1, pn = function(t) {
308
+ var rt = Vt ? { passive: !1 } : !1, Cn = function(t) {
309
309
  return t.tagName === "TEXTAREA";
310
- }, Ee = function(t, e) {
310
+ }, Pe = function(t, e) {
311
311
  if (!(t instanceof Element))
312
312
  return !1;
313
313
  var n = window.getComputedStyle(t);
314
314
  return (
315
315
  // not-not-scrollable
316
316
  n[e] !== "hidden" && // contains scroll inside self
317
- !(n.overflowY === n.overflowX && !pn(t) && n[e] === "visible")
317
+ !(n.overflowY === n.overflowX && !Cn(t) && n[e] === "visible")
318
318
  );
319
- }, wn = function(t) {
320
- return Ee(t, "overflowY");
321
- }, yn = function(t) {
322
- return Ee(t, "overflowX");
323
- }, ne = function(t, e) {
319
+ }, En = function(t) {
320
+ return Pe(t, "overflowY");
321
+ }, An = function(t) {
322
+ return Pe(t, "overflowX");
323
+ }, ie = function(t, e) {
324
324
  var n = e.ownerDocument, r = e;
325
325
  do {
326
326
  typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
327
- var o = Ae(t, r);
327
+ var o = ke(t, r);
328
328
  if (o) {
329
- var i = Oe(t, r), c = i[1], a = i[2];
329
+ var i = Le(t, r), c = i[1], a = i[2];
330
330
  if (c > a)
331
331
  return !0;
332
332
  }
333
333
  r = r.parentNode;
334
334
  } while (r && r !== n.body);
335
335
  return !1;
336
- }, bn = function(t) {
336
+ }, On = function(t) {
337
337
  var e = t.scrollTop, n = t.scrollHeight, r = t.clientHeight;
338
338
  return [
339
339
  e,
340
340
  n,
341
341
  r
342
342
  ];
343
- }, xn = function(t) {
343
+ }, Mn = function(t) {
344
344
  var e = t.scrollLeft, n = t.scrollWidth, r = t.clientWidth;
345
345
  return [
346
346
  e,
347
347
  n,
348
348
  r
349
349
  ];
350
- }, Ae = function(t, e) {
351
- return t === "v" ? wn(e) : yn(e);
352
- }, Oe = function(t, e) {
353
- return t === "v" ? bn(e) : xn(e);
354
- }, Sn = function(t, e) {
350
+ }, ke = function(t, e) {
351
+ return t === "v" ? En(e) : An(e);
352
+ }, Le = function(t, e) {
353
+ return t === "v" ? On(e) : Mn(e);
354
+ }, _n = function(t, e) {
355
355
  return t === "h" && e === "rtl" ? -1 : 1;
356
- }, Cn = function(t, e, n, r, o) {
357
- var i = Sn(t, window.getComputedStyle(e).direction), c = i * r, a = n.target, l = e.contains(a), s = !1, u = c > 0, f = 0, m = 0;
356
+ }, Pn = function(t, e, n, r, o) {
357
+ var i = _n(t, window.getComputedStyle(e).direction), c = i * r, a = n.target, f = e.contains(a), l = !1, u = c > 0, s = 0, m = 0;
358
358
  do {
359
359
  if (!a)
360
360
  break;
361
- var h = Oe(t, a), p = h[0], d = h[1], v = h[2], g = d - v - i * p;
362
- (p || g) && Ae(t, a) && (f += g, m += p);
361
+ var h = Le(t, a), p = h[0], d = h[1], g = h[2], v = d - g - i * p;
362
+ (p || v) && ke(t, a) && (s += v, m += p);
363
363
  var w = a.parentNode;
364
364
  a = w && w.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? w.host : w;
365
365
  } while (
366
366
  // portaled content
367
- !l && a !== document.body || // self content
368
- l && (e.contains(a) || e === a)
367
+ !f && a !== document.body || // self content
368
+ f && (e.contains(a) || e === a)
369
369
  );
370
- return (u && Math.abs(f) < 1 || !u && Math.abs(m) < 1) && (s = !0), s;
371
- }, mt = function(t) {
370
+ return (u && Math.abs(s) < 1 || !u && Math.abs(m) < 1) && (l = !0), l;
371
+ }, vt = function(t) {
372
372
  return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
373
- }, re = function(t) {
373
+ }, ce = function(t) {
374
374
  return [t.deltaX, t.deltaY];
375
- }, oe = function(t) {
375
+ }, ae = function(t) {
376
376
  return t && "current" in t ? t.current : t;
377
- }, Rn = function(t, e) {
377
+ }, kn = function(t, e) {
378
378
  return t[0] === e[0] && t[1] === e[1];
379
- }, En = function(t) {
379
+ }, Ln = function(t) {
380
380
  return `
381
381
  .block-interactivity-`.concat(t, ` {pointer-events: none;}
382
382
  .allow-interactivity-`).concat(t, ` {pointer-events: all;}
383
383
  `);
384
- }, An = 0, nt = [];
385
- function On(t) {
386
- var e = b.useRef([]), n = b.useRef([0, 0]), r = b.useRef(), o = b.useState(An++)[0], i = b.useState(Re)[0], c = b.useRef(t);
387
- b.useEffect(function() {
384
+ }, Tn = 0, ot = [];
385
+ function Dn(t) {
386
+ var e = S.useRef([]), n = S.useRef([0, 0]), r = S.useRef(), o = S.useState(Tn++)[0], i = S.useState(_e)[0], c = S.useRef(t);
387
+ S.useEffect(function() {
388
388
  c.current = t;
389
- }, [t]), b.useEffect(function() {
389
+ }, [t]), S.useEffect(function() {
390
390
  if (t.inert) {
391
391
  document.body.classList.add("block-interactivity-".concat(o));
392
- var d = qe([t.lockRef.current], (t.shards || []).map(oe), !0).filter(Boolean);
393
- return d.forEach(function(v) {
394
- return v.classList.add("allow-interactivity-".concat(o));
392
+ var d = tn([t.lockRef.current], (t.shards || []).map(ae), !0).filter(Boolean);
393
+ return d.forEach(function(g) {
394
+ return g.classList.add("allow-interactivity-".concat(o));
395
395
  }), function() {
396
- document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(v) {
397
- return v.classList.remove("allow-interactivity-".concat(o));
396
+ document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(g) {
397
+ return g.classList.remove("allow-interactivity-".concat(o));
398
398
  });
399
399
  };
400
400
  }
401
401
  }, [t.inert, t.lockRef.current, t.shards]);
402
- var a = b.useCallback(function(d, v) {
402
+ var a = S.useCallback(function(d, g) {
403
403
  if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
404
404
  return !c.current.allowPinchZoom;
405
- var g = mt(d), w = n.current, y = "deltaX" in d ? d.deltaX : w[0] - g[0], x = "deltaY" in d ? d.deltaY : w[1] - g[1], S, C = d.target, R = Math.abs(y) > Math.abs(x) ? "h" : "v";
406
- if ("touches" in d && R === "h" && C.type === "range")
405
+ var v = vt(d), w = n.current, y = "deltaX" in d ? d.deltaX : w[0] - v[0], b = "deltaY" in d ? d.deltaY : w[1] - v[1], x, R = d.target, E = Math.abs(y) > Math.abs(b) ? "h" : "v";
406
+ if ("touches" in d && E === "h" && R.type === "range")
407
407
  return !1;
408
- var M = window.getSelection(), P = M && M.anchorNode, O = P ? P === C || P.contains(C) : !1;
409
- if (O)
408
+ var k = window.getSelection(), _ = k && k.anchorNode, C = _ ? _ === R || _.contains(R) : !1;
409
+ if (C)
410
410
  return !1;
411
- var k = ne(R, C);
412
- if (!k)
411
+ var O = ie(E, R);
412
+ if (!O)
413
413
  return !0;
414
- if (k ? S = R : (S = R === "v" ? "h" : "v", k = ne(R, C)), !k)
414
+ if (O ? x = E : (x = E === "v" ? "h" : "v", O = ie(E, R)), !O)
415
415
  return !1;
416
- if (!r.current && "changedTouches" in d && (y || x) && (r.current = S), !S)
416
+ if (!r.current && "changedTouches" in d && (y || b) && (r.current = x), !x)
417
417
  return !0;
418
- var T = r.current || S;
419
- return Cn(T, v, d, T === "h" ? y : x);
420
- }, []), l = b.useCallback(function(d) {
421
- var v = d;
422
- if (!(!nt.length || nt[nt.length - 1] !== i)) {
423
- var g = "deltaY" in v ? re(v) : mt(v), w = e.current.filter(function(S) {
424
- return S.name === v.type && (S.target === v.target || v.target === S.shadowParent) && Rn(S.delta, g);
418
+ var P = r.current || x;
419
+ return Pn(P, g, d, P === "h" ? y : b);
420
+ }, []), f = S.useCallback(function(d) {
421
+ var g = d;
422
+ if (!(!ot.length || ot[ot.length - 1] !== i)) {
423
+ var v = "deltaY" in g ? ce(g) : vt(g), w = e.current.filter(function(x) {
424
+ return x.name === g.type && (x.target === g.target || g.target === x.shadowParent) && kn(x.delta, v);
425
425
  })[0];
426
426
  if (w && w.should) {
427
- v.cancelable && v.preventDefault();
427
+ g.cancelable && g.preventDefault();
428
428
  return;
429
429
  }
430
430
  if (!w) {
431
- var y = (c.current.shards || []).map(oe).filter(Boolean).filter(function(S) {
432
- return S.contains(v.target);
433
- }), x = y.length > 0 ? a(v, y[0]) : !c.current.noIsolation;
434
- x && v.cancelable && v.preventDefault();
431
+ var y = (c.current.shards || []).map(ae).filter(Boolean).filter(function(x) {
432
+ return x.contains(g.target);
433
+ }), b = y.length > 0 ? a(g, y[0]) : !c.current.noIsolation;
434
+ b && g.cancelable && g.preventDefault();
435
435
  }
436
436
  }
437
- }, []), s = b.useCallback(function(d, v, g, w) {
438
- var y = { name: d, delta: v, target: g, should: w, shadowParent: Mn(g) };
437
+ }, []), l = S.useCallback(function(d, g, v, w) {
438
+ var y = { name: d, delta: g, target: v, should: w, shadowParent: Nn(v) };
439
439
  e.current.push(y), setTimeout(function() {
440
- e.current = e.current.filter(function(x) {
441
- return x !== y;
440
+ e.current = e.current.filter(function(b) {
441
+ return b !== y;
442
442
  });
443
443
  }, 1);
444
- }, []), u = b.useCallback(function(d) {
445
- n.current = mt(d), r.current = void 0;
446
- }, []), f = b.useCallback(function(d) {
447
- s(d.type, re(d), d.target, a(d, t.lockRef.current));
448
- }, []), m = b.useCallback(function(d) {
449
- s(d.type, mt(d), d.target, a(d, t.lockRef.current));
444
+ }, []), u = S.useCallback(function(d) {
445
+ n.current = vt(d), r.current = void 0;
446
+ }, []), s = S.useCallback(function(d) {
447
+ l(d.type, ce(d), d.target, a(d, t.lockRef.current));
448
+ }, []), m = S.useCallback(function(d) {
449
+ l(d.type, vt(d), d.target, a(d, t.lockRef.current));
450
450
  }, []);
451
- b.useEffect(function() {
452
- return nt.push(i), t.setCallbacks({
453
- onScrollCapture: f,
454
- onWheelCapture: f,
451
+ S.useEffect(function() {
452
+ return ot.push(i), t.setCallbacks({
453
+ onScrollCapture: s,
454
+ onWheelCapture: s,
455
455
  onTouchMoveCapture: m
456
- }), document.addEventListener("wheel", l, et), document.addEventListener("touchmove", l, et), document.addEventListener("touchstart", u, et), function() {
457
- nt = nt.filter(function(d) {
456
+ }), document.addEventListener("wheel", f, rt), document.addEventListener("touchmove", f, rt), document.addEventListener("touchstart", u, rt), function() {
457
+ ot = ot.filter(function(d) {
458
458
  return d !== i;
459
- }), document.removeEventListener("wheel", l, et), document.removeEventListener("touchmove", l, et), document.removeEventListener("touchstart", u, et);
459
+ }), document.removeEventListener("wheel", f, rt), document.removeEventListener("touchmove", f, rt), document.removeEventListener("touchstart", u, rt);
460
460
  };
461
461
  }, []);
462
462
  var h = t.removeScrollBar, p = t.inert;
463
- return b.createElement(
464
- b.Fragment,
463
+ return S.createElement(
464
+ S.Fragment,
465
465
  null,
466
- p ? b.createElement(i, { styles: En(o) }) : null,
467
- h ? b.createElement(gn, { noRelative: t.noRelative, gapMode: t.gapMode }) : null
466
+ p ? S.createElement(i, { styles: Ln(o) }) : null,
467
+ h ? S.createElement(Rn, { noRelative: t.noRelative, gapMode: t.gapMode }) : null
468
468
  );
469
469
  }
470
- function Mn(t) {
470
+ function Nn(t) {
471
471
  for (var e = null; t !== null; )
472
472
  t instanceof ShadowRoot && (e = t.host, t = t.host), t = t.parentNode;
473
473
  return e;
474
474
  }
475
- const kn = nn(Ce, On);
476
- var _n = b.forwardRef(function(t, e) {
477
- return b.createElement(Ot, z({}, t, { ref: e, sideCar: kn }));
475
+ const Bn = un(Me, Dn);
476
+ var Wn = S.forwardRef(function(t, e) {
477
+ return S.createElement(_t, K({}, t, { ref: e, sideCar: Bn }));
478
478
  });
479
- _n.classNames = Ot.classNames;
480
- var Ln = function(t) {
479
+ Wn.classNames = _t.classNames;
480
+ var Fn = function(t) {
481
481
  if (typeof document > "u")
482
482
  return null;
483
483
  var e = Array.isArray(t) ? t[0] : t;
484
484
  return e.ownerDocument.body;
485
- }, rt = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), gt = {}, Wt = 0, Me = function(t) {
486
- return t && (t.host || Me(t.parentNode));
487
- }, Pn = function(t, e) {
485
+ }, it = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), wt = {}, Ft = 0, Te = function(t) {
486
+ return t && (t.host || Te(t.parentNode));
487
+ }, Hn = function(t, e) {
488
488
  return e.map(function(n) {
489
489
  if (t.contains(n))
490
490
  return n;
491
- var r = Me(n);
491
+ var r = Te(n);
492
492
  return r && t.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", t, ". Doing nothing"), null);
493
493
  }).filter(function(n) {
494
494
  return !!n;
495
495
  });
496
- }, Tn = function(t, e, n, r) {
497
- var o = Pn(e, Array.isArray(t) ? t : [t]);
498
- gt[n] || (gt[n] = /* @__PURE__ */ new WeakMap());
499
- var i = gt[n], c = [], a = /* @__PURE__ */ new Set(), l = new Set(o), s = function(f) {
500
- !f || a.has(f) || (a.add(f), s(f.parentNode));
496
+ }, $n = function(t, e, n, r) {
497
+ var o = Hn(e, Array.isArray(t) ? t : [t]);
498
+ wt[n] || (wt[n] = /* @__PURE__ */ new WeakMap());
499
+ var i = wt[n], c = [], a = /* @__PURE__ */ new Set(), f = new Set(o), l = function(s) {
500
+ !s || a.has(s) || (a.add(s), l(s.parentNode));
501
501
  };
502
- o.forEach(s);
503
- var u = function(f) {
504
- !f || l.has(f) || Array.prototype.forEach.call(f.children, function(m) {
502
+ o.forEach(l);
503
+ var u = function(s) {
504
+ !s || f.has(s) || Array.prototype.forEach.call(s.children, function(m) {
505
505
  if (a.has(m))
506
506
  u(m);
507
507
  else
508
508
  try {
509
- var h = m.getAttribute(r), p = h !== null && h !== "false", d = (rt.get(m) || 0) + 1, v = (i.get(m) || 0) + 1;
510
- rt.set(m, d), i.set(m, v), c.push(m), d === 1 && p && vt.set(m, !0), v === 1 && m.setAttribute(n, "true"), p || m.setAttribute(r, "true");
511
- } catch (g) {
512
- console.error("aria-hidden: cannot operate on ", m, g);
509
+ var h = m.getAttribute(r), p = h !== null && h !== "false", d = (it.get(m) || 0) + 1, g = (i.get(m) || 0) + 1;
510
+ it.set(m, d), i.set(m, g), c.push(m), d === 1 && p && pt.set(m, !0), g === 1 && m.setAttribute(n, "true"), p || m.setAttribute(r, "true");
511
+ } catch (v) {
512
+ console.error("aria-hidden: cannot operate on ", m, v);
513
513
  }
514
514
  });
515
515
  };
516
- return u(e), a.clear(), Wt++, function() {
517
- c.forEach(function(f) {
518
- var m = rt.get(f) - 1, h = i.get(f) - 1;
519
- rt.set(f, m), i.set(f, h), m || (vt.has(f) || f.removeAttribute(r), vt.delete(f)), h || f.removeAttribute(n);
520
- }), Wt--, Wt || (rt = /* @__PURE__ */ new WeakMap(), rt = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), gt = {});
516
+ return u(e), a.clear(), Ft++, function() {
517
+ c.forEach(function(s) {
518
+ var m = it.get(s) - 1, h = i.get(s) - 1;
519
+ it.set(s, m), i.set(s, h), m || (pt.has(s) || s.removeAttribute(r), pt.delete(s)), h || s.removeAttribute(n);
520
+ }), Ft--, Ft || (it = /* @__PURE__ */ new WeakMap(), it = /* @__PURE__ */ new WeakMap(), pt = /* @__PURE__ */ new WeakMap(), wt = {});
521
521
  };
522
- }, Gr = function(t, e, n) {
522
+ }, to = function(t, e, n) {
523
523
  n === void 0 && (n = "data-aria-hidden");
524
- var r = Array.from(Array.isArray(t) ? t : [t]), o = Ln(t);
525
- return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), Tn(r, o, n, "aria-hidden")) : function() {
524
+ var r = Array.from(Array.isArray(t) ? t : [t]), o = Fn(t);
525
+ return o ? (r.push.apply(r, Array.from(o.querySelectorAll("[aria-live], script"))), $n(r, o, n, "aria-hidden")) : function() {
526
526
  return null;
527
527
  };
528
528
  };
529
- function Mt() {
530
- return (Mt = Object.assign || function(t) {
529
+ function Pt() {
530
+ return (Pt = Object.assign || function(t) {
531
531
  for (var e = 1; e < arguments.length; e++) {
532
532
  var n = arguments[e];
533
533
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
@@ -535,231 +535,229 @@ function Mt() {
535
535
  return t;
536
536
  }).apply(this, arguments);
537
537
  }
538
- function ke(t, e) {
538
+ function De(t, e) {
539
539
  if (t == null) return {};
540
540
  var n, r, o = {}, i = Object.keys(t);
541
541
  for (r = 0; r < i.length; r++) e.indexOf(n = i[r]) >= 0 || (o[n] = t[n]);
542
542
  return o;
543
543
  }
544
- function It(t) {
545
- var e = J(t), n = J(function(r) {
544
+ function zt(t) {
545
+ var e = et(t), n = et(function(r) {
546
546
  e.current && e.current(r);
547
547
  });
548
548
  return e.current = t, n.current;
549
549
  }
550
- var ut = function(t, e, n) {
550
+ var dt = function(t, e, n) {
551
551
  return e === void 0 && (e = 0), n === void 0 && (n = 1), t > n ? n : t < e ? e : t;
552
- }, lt = function(t) {
552
+ }, ft = function(t) {
553
553
  return "touches" in t;
554
- }, Vt = function(t) {
554
+ }, jt = function(t) {
555
555
  return t && t.ownerDocument.defaultView || self;
556
- }, ie = function(t, e, n) {
557
- var r = t.getBoundingClientRect(), o = lt(e) ? (function(i, c) {
556
+ }, se = function(t, e, n) {
557
+ var r = t.getBoundingClientRect(), o = ft(e) ? (function(i, c) {
558
558
  for (var a = 0; a < i.length; a++) if (i[a].identifier === c) return i[a];
559
559
  return i[0];
560
560
  })(e.touches, n) : e;
561
- return { left: ut((o.pageX - (r.left + Vt(t).pageXOffset)) / r.width), top: ut((o.pageY - (r.top + Vt(t).pageYOffset)) / r.height) };
562
- }, ce = function(t) {
563
- !lt(t) && t.preventDefault();
564
- }, _e = D.memo(function(t) {
565
- var e = t.onMove, n = t.onKey, r = ke(t, ["onMove", "onKey"]), o = J(null), i = It(e), c = It(n), a = J(null), l = J(!1), s = Xe(function() {
566
- var h = function(v) {
567
- ce(v), (lt(v) ? v.touches.length > 0 : v.buttons > 0) && o.current ? i(ie(o.current, v, a.current)) : d(!1);
561
+ return { left: dt((o.pageX - (r.left + jt(t).pageXOffset)) / r.width), top: dt((o.pageY - (r.top + jt(t).pageYOffset)) / r.height) };
562
+ }, le = function(t) {
563
+ !ft(t) && t.preventDefault();
564
+ }, Ne = W.memo(function(t) {
565
+ var e = t.onMove, n = t.onKey, r = De(t, ["onMove", "onKey"]), o = et(null), i = zt(e), c = zt(n), a = et(null), f = et(!1), l = Ge(function() {
566
+ var h = function(g) {
567
+ le(g), (ft(g) ? g.touches.length > 0 : g.buttons > 0) && o.current ? i(se(o.current, g, a.current)) : d(!1);
568
568
  }, p = function() {
569
569
  return d(!1);
570
570
  };
571
- function d(v) {
572
- var g = l.current, w = Vt(o.current), y = v ? w.addEventListener : w.removeEventListener;
573
- y(g ? "touchmove" : "mousemove", h), y(g ? "touchend" : "mouseup", p);
571
+ function d(g) {
572
+ var v = f.current, w = jt(o.current), y = g ? w.addEventListener : w.removeEventListener;
573
+ y(v ? "touchmove" : "mousemove", h), y(v ? "touchend" : "mouseup", p);
574
574
  }
575
- return [function(v) {
576
- var g = v.nativeEvent, w = o.current;
577
- if (w && (ce(g), !(function(x, S) {
578
- return S && !lt(x);
579
- })(g, l.current) && w)) {
580
- if (lt(g)) {
581
- l.current = !0;
582
- var y = g.changedTouches || [];
575
+ return [function(g) {
576
+ var v = g.nativeEvent, w = o.current;
577
+ if (w && (le(v), !(function(b, x) {
578
+ return x && !ft(b);
579
+ })(v, f.current) && w)) {
580
+ if (ft(v)) {
581
+ f.current = !0;
582
+ var y = v.changedTouches || [];
583
583
  y.length && (a.current = y[0].identifier);
584
584
  }
585
- w.focus(), i(ie(w, g, a.current)), d(!0);
585
+ w.focus(), i(se(w, v, a.current)), d(!0);
586
586
  }
587
- }, function(v) {
588
- var g = v.which || v.keyCode;
589
- g < 37 || g > 40 || (v.preventDefault(), c({ left: g === 39 ? 0.05 : g === 37 ? -0.05 : 0, top: g === 40 ? 0.05 : g === 38 ? -0.05 : 0 }));
587
+ }, function(g) {
588
+ var v = g.which || g.keyCode;
589
+ v < 37 || v > 40 || (g.preventDefault(), c({ left: v === 39 ? 0.05 : v === 37 ? -0.05 : 0, top: v === 40 ? 0.05 : v === 38 ? -0.05 : 0 }));
590
590
  }, d];
591
- }, [c, i]), u = s[0], f = s[1], m = s[2];
592
- return St(function() {
591
+ }, [c, i]), u = l[0], s = l[1], m = l[2];
592
+ return Ct(function() {
593
593
  return m;
594
- }, [m]), D.createElement("div", Mt({}, r, { onTouchStart: u, onMouseDown: u, className: "react-colorful__interactive", ref: o, onKeyDown: f, tabIndex: 0, role: "slider" }));
595
- }), qt = function(t) {
594
+ }, [m]), W.createElement("div", Pt({}, r, { onTouchStart: u, onMouseDown: u, className: "react-colorful__interactive", ref: o, onKeyDown: s, tabIndex: 0, role: "slider" }));
595
+ }), Ut = function(t) {
596
596
  return t.filter(Boolean).join(" ");
597
- }, Le = function(t) {
598
- var e = t.color, n = t.left, r = t.top, o = r === void 0 ? 0.5 : r, i = qt(["react-colorful__pointer", t.className]);
599
- return D.createElement("div", { className: i, style: { top: 100 * o + "%", left: 100 * n + "%" } }, D.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: e } }));
600
- }, L = function(t, e, n) {
597
+ }, Be = function(t) {
598
+ var e = t.color, n = t.left, r = t.top, o = r === void 0 ? 0.5 : r, i = Ut(["react-colorful__pointer", t.className]);
599
+ return W.createElement("div", { className: i, style: { top: 100 * o + "%", left: 100 * n + "%" } }, W.createElement("div", { className: "react-colorful__pointer-fill", style: { backgroundColor: e } }));
600
+ }, D = function(t, e, n) {
601
601
  return e === void 0 && (e = 0), n === void 0 && (n = Math.pow(10, e)), Math.round(n * t) / n;
602
- }, Dn = function(t) {
603
- return Hn($t(t));
604
- }, $t = function(t) {
605
- return t[0] === "#" && (t = t.substring(1)), t.length < 6 ? { r: parseInt(t[0] + t[0], 16), g: parseInt(t[1] + t[1], 16), b: parseInt(t[2] + t[2], 16), a: t.length === 4 ? L(parseInt(t[3] + t[3], 16) / 255, 2) : 1 } : { r: parseInt(t.substring(0, 2), 16), g: parseInt(t.substring(2, 4), 16), b: parseInt(t.substring(4, 6), 16), a: t.length === 8 ? L(parseInt(t.substring(6, 8), 16) / 255, 2) : 1 };
606
- }, Nn = function(t) {
607
- return Fn(Bn(t));
608
- }, Wn = function(t) {
602
+ }, In = function(t) {
603
+ return Yn(Xt(t));
604
+ }, Xt = function(t) {
605
+ return t[0] === "#" && (t = t.substring(1)), t.length < 6 ? { r: parseInt(t[0] + t[0], 16), g: parseInt(t[1] + t[1], 16), b: parseInt(t[2] + t[2], 16), a: t.length === 4 ? D(parseInt(t[3] + t[3], 16) / 255, 2) : 1 } : { r: parseInt(t.substring(0, 2), 16), g: parseInt(t.substring(2, 4), 16), b: parseInt(t.substring(4, 6), 16), a: t.length === 8 ? D(parseInt(t.substring(6, 8), 16) / 255, 2) : 1 };
606
+ }, Vn = function(t) {
607
+ return Xn(jn(t));
608
+ }, zn = function(t) {
609
609
  var e = t.s, n = t.v, r = t.a, o = (200 - e) * n / 100;
610
- return { h: L(t.h), s: L(o > 0 && o < 200 ? e * n / 100 / (o <= 100 ? o : 200 - o) * 100 : 0), l: L(o / 2), a: L(r, 2) };
611
- }, zt = function(t) {
612
- var e = Wn(t);
610
+ return { h: D(t.h), s: D(o > 0 && o < 200 ? e * n / 100 / (o <= 100 ? o : 200 - o) * 100 : 0), l: D(o / 2), a: D(r, 2) };
611
+ }, Yt = function(t) {
612
+ var e = zn(t);
613
613
  return "hsl(" + e.h + ", " + e.s + "%, " + e.l + "%)";
614
- }, Bn = function(t) {
614
+ }, jn = function(t) {
615
615
  var e = t.h, n = t.s, r = t.v, o = t.a;
616
616
  e = e / 360 * 6, n /= 100, r /= 100;
617
- var i = Math.floor(e), c = r * (1 - n), a = r * (1 - (e - i) * n), l = r * (1 - (1 - e + i) * n), s = i % 6;
618
- return { r: L(255 * [r, a, c, c, l, r][s]), g: L(255 * [l, r, r, a, c, c][s]), b: L(255 * [c, c, l, r, r, a][s]), a: L(o, 2) };
619
- }, pt = function(t) {
617
+ var i = Math.floor(e), c = r * (1 - n), a = r * (1 - (e - i) * n), f = r * (1 - (1 - e + i) * n), l = i % 6;
618
+ return { r: D(255 * [r, a, c, c, f, r][l]), g: D(255 * [f, r, r, a, c, c][l]), b: D(255 * [c, c, f, r, r, a][l]), a: D(o, 2) };
619
+ }, yt = function(t) {
620
620
  var e = t.toString(16);
621
621
  return e.length < 2 ? "0" + e : e;
622
- }, Fn = function(t) {
623
- var e = t.r, n = t.g, r = t.b, o = t.a, i = o < 1 ? pt(L(255 * o)) : "";
624
- return "#" + pt(e) + pt(n) + pt(r) + i;
625
- }, Hn = function(t) {
622
+ }, Xn = function(t) {
623
+ var e = t.r, n = t.g, r = t.b, o = t.a, i = o < 1 ? yt(D(255 * o)) : "";
624
+ return "#" + yt(e) + yt(n) + yt(r) + i;
625
+ }, Yn = function(t) {
626
626
  var e = t.r, n = t.g, r = t.b, o = t.a, i = Math.max(e, n, r), c = i - Math.min(e, n, r), a = c ? i === e ? (n - r) / c : i === n ? 2 + (r - e) / c : 4 + (e - n) / c : 0;
627
- return { h: L(60 * (a < 0 ? a + 6 : a)), s: L(i ? c / i * 100 : 0), v: L(i / 255 * 100), a: o };
628
- }, In = D.memo(function(t) {
629
- var e = t.hue, n = t.onChange, r = qt(["react-colorful__hue", t.className]);
630
- return D.createElement("div", { className: r }, D.createElement(_e, { onMove: function(o) {
627
+ return { h: D(60 * (a < 0 ? a + 6 : a)), s: D(i ? c / i * 100 : 0), v: D(i / 255 * 100), a: o };
628
+ }, qn = W.memo(function(t) {
629
+ var e = t.hue, n = t.onChange, r = Ut(["react-colorful__hue", t.className]);
630
+ return W.createElement("div", { className: r }, W.createElement(Ne, { onMove: function(o) {
631
631
  n({ h: 360 * o.left });
632
632
  }, onKey: function(o) {
633
- n({ h: ut(e + 360 * o.left, 0, 360) });
634
- }, "aria-label": "Hue", "aria-valuenow": L(e), "aria-valuemax": "360", "aria-valuemin": "0" }, D.createElement(Le, { className: "react-colorful__hue-pointer", left: e / 360, color: zt({ h: e, s: 100, v: 100, a: 1 }) })));
635
- }), Vn = D.memo(function(t) {
636
- var e = t.hsva, n = t.onChange, r = { backgroundColor: zt({ h: e.h, s: 100, v: 100, a: 1 }) };
637
- return D.createElement("div", { className: "react-colorful__saturation", style: r }, D.createElement(_e, { onMove: function(o) {
633
+ n({ h: dt(e + 360 * o.left, 0, 360) });
634
+ }, "aria-label": "Hue", "aria-valuenow": D(e), "aria-valuemax": "360", "aria-valuemin": "0" }, W.createElement(Be, { className: "react-colorful__hue-pointer", left: e / 360, color: Yt({ h: e, s: 100, v: 100, a: 1 }) })));
635
+ }), Kn = W.memo(function(t) {
636
+ var e = t.hsva, n = t.onChange, r = { backgroundColor: Yt({ h: e.h, s: 100, v: 100, a: 1 }) };
637
+ return W.createElement("div", { className: "react-colorful__saturation", style: r }, W.createElement(Ne, { onMove: function(o) {
638
638
  n({ s: 100 * o.left, v: 100 - 100 * o.top });
639
639
  }, onKey: function(o) {
640
- n({ s: ut(e.s + 100 * o.left, 0, 100), v: ut(e.v - 100 * o.top, 0, 100) });
641
- }, "aria-label": "Color", "aria-valuetext": "Saturation " + L(e.s) + "%, Brightness " + L(e.v) + "%" }, D.createElement(Le, { className: "react-colorful__saturation-pointer", top: 1 - e.v / 100, left: e.s / 100, color: zt(e) })));
642
- }), Pe = function(t, e) {
640
+ n({ s: dt(e.s + 100 * o.left, 0, 100), v: dt(e.v - 100 * o.top, 0, 100) });
641
+ }, "aria-label": "Color", "aria-valuetext": "Saturation " + D(e.s) + "%, Brightness " + D(e.v) + "%" }, W.createElement(Be, { className: "react-colorful__saturation-pointer", top: 1 - e.v / 100, left: e.s / 100, color: Yt(e) })));
642
+ }), We = function(t, e) {
643
643
  if (t === e) return !0;
644
644
  for (var n in t) if (t[n] !== e[n]) return !1;
645
645
  return !0;
646
- }, $n = function(t, e) {
647
- return t.toLowerCase() === e.toLowerCase() || Pe($t(t), $t(e));
646
+ }, Un = function(t, e) {
647
+ return t.toLowerCase() === e.toLowerCase() || We(Xt(t), Xt(e));
648
648
  };
649
- function zn(t, e, n) {
650
- var r = It(n), o = ye(function() {
649
+ function Zn(t, e, n) {
650
+ var r = zt(n), o = Ce(function() {
651
651
  return t.toHsva(e);
652
- }), i = o[0], c = o[1], a = J({ color: e, hsva: i });
653
- St(function() {
652
+ }), i = o[0], c = o[1], a = et({ color: e, hsva: i });
653
+ Ct(function() {
654
654
  if (!t.equal(e, a.current.color)) {
655
- var s = t.toHsva(e);
656
- a.current = { hsva: s, color: e }, c(s);
655
+ var l = t.toHsva(e);
656
+ a.current = { hsva: l, color: e }, c(l);
657
657
  }
658
- }, [e, t]), St(function() {
659
- var s;
660
- Pe(i, a.current.hsva) || t.equal(s = t.fromHsva(i), a.current.color) || (a.current = { hsva: i, color: s }, r(s));
658
+ }, [e, t]), Ct(function() {
659
+ var l;
660
+ We(i, a.current.hsva) || t.equal(l = t.fromHsva(i), a.current.color) || (a.current = { hsva: i, color: l }, r(l));
661
661
  }, [i, t, r]);
662
- var l = je(function(s) {
662
+ var f = Qe(function(l) {
663
663
  c(function(u) {
664
- return Object.assign({}, u, s);
664
+ return Object.assign({}, u, l);
665
665
  });
666
666
  }, []);
667
- return [i, l];
667
+ return [i, f];
668
668
  }
669
- var jn = typeof window < "u" ? be : St, Xn = function() {
669
+ var Qn = typeof window < "u" ? Ee : Ct, Gn = function() {
670
670
  return typeof __webpack_nonce__ < "u" ? __webpack_nonce__ : void 0;
671
- }, ae = /* @__PURE__ */ new Map(), Yn = function(t) {
672
- jn(function() {
671
+ }, ue = /* @__PURE__ */ new Map(), Jn = function(t) {
672
+ Qn(function() {
673
673
  var e = t.current ? t.current.ownerDocument : document;
674
- if (e !== void 0 && !ae.has(e)) {
674
+ if (e !== void 0 && !ue.has(e)) {
675
675
  var n = e.createElement("style");
676
- n.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, ae.set(e, n);
677
- var r = Xn();
676
+ n.innerHTML = `.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`, ue.set(e, n);
677
+ var r = Gn();
678
678
  r && n.setAttribute("nonce", r), e.head.appendChild(n);
679
679
  }
680
680
  }, []);
681
- }, qn = function(t) {
682
- var e = t.className, n = t.colorModel, r = t.color, o = r === void 0 ? n.defaultColor : r, i = t.onChange, c = ke(t, ["className", "colorModel", "color", "onChange"]), a = J(null);
683
- Yn(a);
684
- var l = zn(n, o, i), s = l[0], u = l[1], f = qt(["react-colorful", e]);
685
- return D.createElement("div", Mt({}, c, { ref: a, className: f }), D.createElement(Vn, { hsva: s, onChange: u }), D.createElement(In, { hue: s.h, onChange: u, className: "react-colorful__last-control" }));
686
- }, Kn = { defaultColor: "000", toHsva: Dn, fromHsva: function(t) {
687
- return Nn({ h: t.h, s: t.s, v: t.v, a: 1 });
688
- }, equal: $n }, Jr = function(t) {
689
- return D.createElement(qn, Mt({}, t, { colorModel: Kn }));
681
+ }, tr = function(t) {
682
+ var e = t.className, n = t.colorModel, r = t.color, o = r === void 0 ? n.defaultColor : r, i = t.onChange, c = De(t, ["className", "colorModel", "color", "onChange"]), a = et(null);
683
+ Jn(a);
684
+ var f = Zn(n, o, i), l = f[0], u = f[1], s = Ut(["react-colorful", e]);
685
+ return W.createElement("div", Pt({}, c, { ref: a, className: s }), W.createElement(Kn, { hsva: l, onChange: u }), W.createElement(qn, { hue: l.h, onChange: u, className: "react-colorful__last-control" }));
686
+ }, er = { defaultColor: "000", toHsva: In, fromHsva: function(t) {
687
+ return Vn({ h: t.h, s: t.s, v: t.v, a: 1 });
688
+ }, equal: Un }, eo = function(t) {
689
+ return W.createElement(tr, Pt({}, t, { colorModel: er }));
690
690
  };
691
- const Zn = ["top", "right", "bottom", "left"], Q = Math.min, F = Math.max, Ct = Math.round, wt = Math.floor, X = (t) => ({
691
+ const Fe = ["top", "right", "bottom", "left"], fe = ["start", "end"], de = /* @__PURE__ */ Fe.reduce((t, e) => t.concat(e, e + "-" + fe[0], e + "-" + fe[1]), []), j = Math.min, B = Math.max, Et = Math.round, bt = Math.floor, U = (t) => ({
692
692
  x: t,
693
693
  y: t
694
- }), Un = {
694
+ }), nr = {
695
695
  left: "right",
696
696
  right: "left",
697
697
  bottom: "top",
698
698
  top: "bottom"
699
- }, Qn = {
700
- start: "end",
701
- end: "start"
702
699
  };
703
- function jt(t, e, n) {
704
- return F(t, Q(e, n));
700
+ function qt(t, e, n) {
701
+ return B(t, j(e, n));
705
702
  }
706
- function K(t, e) {
703
+ function X(t, e) {
707
704
  return typeof t == "function" ? t(e) : t;
708
705
  }
709
- function Z(t) {
706
+ function I(t) {
710
707
  return t.split("-")[0];
711
708
  }
712
- function at(t) {
709
+ function z(t) {
713
710
  return t.split("-")[1];
714
711
  }
715
- function Kt(t) {
712
+ function Zt(t) {
716
713
  return t === "x" ? "y" : "x";
717
714
  }
718
- function Zt(t) {
715
+ function Qt(t) {
719
716
  return t === "y" ? "height" : "width";
720
717
  }
721
- const Gn = /* @__PURE__ */ new Set(["top", "bottom"]);
722
- function j(t) {
723
- return Gn.has(Z(t)) ? "y" : "x";
718
+ function V(t) {
719
+ const e = t[0];
720
+ return e === "t" || e === "b" ? "y" : "x";
724
721
  }
725
- function Ut(t) {
726
- return Kt(j(t));
722
+ function Gt(t) {
723
+ return Zt(V(t));
727
724
  }
728
- function Jn(t, e, n) {
725
+ function He(t, e, n) {
729
726
  n === void 0 && (n = !1);
730
- const r = at(t), o = Ut(t), i = Zt(o);
727
+ const r = z(t), o = Gt(t), i = Qt(o);
731
728
  let c = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
732
- return e.reference[i] > e.floating[i] && (c = Rt(c)), [c, Rt(c)];
729
+ return e.reference[i] > e.floating[i] && (c = Ot(c)), [c, Ot(c)];
733
730
  }
734
- function tr(t) {
735
- const e = Rt(t);
736
- return [Xt(t), e, Xt(e)];
731
+ function rr(t) {
732
+ const e = Ot(t);
733
+ return [At(t), e, At(e)];
737
734
  }
738
- function Xt(t) {
739
- return t.replace(/start|end/g, (e) => Qn[e]);
735
+ function At(t) {
736
+ return t.includes("start") ? t.replace("start", "end") : t.replace("end", "start");
740
737
  }
741
- const se = ["left", "right"], le = ["right", "left"], er = ["top", "bottom"], nr = ["bottom", "top"];
742
- function rr(t, e, n) {
738
+ const he = ["left", "right"], me = ["right", "left"], or = ["top", "bottom"], ir = ["bottom", "top"];
739
+ function cr(t, e, n) {
743
740
  switch (t) {
744
741
  case "top":
745
742
  case "bottom":
746
- return n ? e ? le : se : e ? se : le;
743
+ return n ? e ? me : he : e ? he : me;
747
744
  case "left":
748
745
  case "right":
749
- return e ? er : nr;
746
+ return e ? or : ir;
750
747
  default:
751
748
  return [];
752
749
  }
753
750
  }
754
- function or(t, e, n, r) {
755
- const o = at(t);
756
- let i = rr(Z(t), n === "start", r);
757
- return o && (i = i.map((c) => c + "-" + o), e && (i = i.concat(i.map(Xt)))), i;
751
+ function ar(t, e, n, r) {
752
+ const o = z(t);
753
+ let i = cr(I(t), n === "start", r);
754
+ return o && (i = i.map((c) => c + "-" + o), e && (i = i.concat(i.map(At)))), i;
758
755
  }
759
- function Rt(t) {
760
- return t.replace(/left|right|bottom|top/g, (e) => Un[e]);
756
+ function Ot(t) {
757
+ const e = I(t);
758
+ return nr[e] + t.slice(e.length);
761
759
  }
762
- function ir(t) {
760
+ function sr(t) {
763
761
  return {
764
762
  top: 0,
765
763
  right: 0,
@@ -768,15 +766,15 @@ function ir(t) {
768
766
  ...t
769
767
  };
770
768
  }
771
- function Te(t) {
772
- return typeof t != "number" ? ir(t) : {
769
+ function Jt(t) {
770
+ return typeof t != "number" ? sr(t) : {
773
771
  top: t,
774
772
  right: t,
775
773
  bottom: t,
776
774
  left: t
777
775
  };
778
776
  }
779
- function Et(t) {
777
+ function st(t) {
780
778
  const {
781
779
  x: e,
782
780
  y: n,
@@ -794,14 +792,14 @@ function Et(t) {
794
792
  y: n
795
793
  };
796
794
  }
797
- function ue(t, e, n) {
795
+ function ge(t, e, n) {
798
796
  let {
799
797
  reference: r,
800
798
  floating: o
801
799
  } = t;
802
- const i = j(e), c = Ut(e), a = Zt(c), l = Z(e), s = i === "y", u = r.x + r.width / 2 - o.width / 2, f = r.y + r.height / 2 - o.height / 2, m = r[a] / 2 - o[a] / 2;
800
+ const i = V(e), c = Gt(e), a = Qt(c), f = I(e), l = i === "y", u = r.x + r.width / 2 - o.width / 2, s = r.y + r.height / 2 - o.height / 2, m = r[a] / 2 - o[a] / 2;
803
801
  let h;
804
- switch (l) {
802
+ switch (f) {
805
803
  case "top":
806
804
  h = {
807
805
  x: u,
@@ -817,13 +815,13 @@ function ue(t, e, n) {
817
815
  case "right":
818
816
  h = {
819
817
  x: r.x + r.width,
820
- y: f
818
+ y: s
821
819
  };
822
820
  break;
823
821
  case "left":
824
822
  h = {
825
823
  x: r.x - o.width,
826
- y: f
824
+ y: s
827
825
  };
828
826
  break;
829
827
  default:
@@ -832,17 +830,17 @@ function ue(t, e, n) {
832
830
  y: r.y
833
831
  };
834
832
  }
835
- switch (at(e)) {
833
+ switch (z(e)) {
836
834
  case "start":
837
- h[c] -= m * (n && s ? -1 : 1);
835
+ h[c] -= m * (n && l ? -1 : 1);
838
836
  break;
839
837
  case "end":
840
- h[c] += m * (n && s ? -1 : 1);
838
+ h[c] += m * (n && l ? -1 : 1);
841
839
  break;
842
840
  }
843
841
  return h;
844
842
  }
845
- async function cr(t, e) {
843
+ async function lr(t, e) {
846
844
  var n;
847
845
  e === void 0 && (e = {});
848
846
  const {
@@ -851,107 +849,107 @@ async function cr(t, e) {
851
849
  platform: i,
852
850
  rects: c,
853
851
  elements: a,
854
- strategy: l
852
+ strategy: f
855
853
  } = t, {
856
- boundary: s = "clippingAncestors",
854
+ boundary: l = "clippingAncestors",
857
855
  rootBoundary: u = "viewport",
858
- elementContext: f = "floating",
856
+ elementContext: s = "floating",
859
857
  altBoundary: m = !1,
860
858
  padding: h = 0
861
- } = K(e, t), p = Te(h), v = a[m ? f === "floating" ? "reference" : "floating" : f], g = Et(await i.getClippingRect({
862
- element: (n = await (i.isElement == null ? void 0 : i.isElement(v))) == null || n ? v : v.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
863
- boundary: s,
859
+ } = X(e, t), p = Jt(h), g = a[m ? s === "floating" ? "reference" : "floating" : s], v = st(await i.getClippingRect({
860
+ element: (n = await (i.isElement == null ? void 0 : i.isElement(g))) == null || n ? g : g.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(a.floating)),
861
+ boundary: l,
864
862
  rootBoundary: u,
865
- strategy: l
866
- })), w = f === "floating" ? {
863
+ strategy: f
864
+ })), w = s === "floating" ? {
867
865
  x: r,
868
866
  y: o,
869
867
  width: c.floating.width,
870
868
  height: c.floating.height
871
- } : c.reference, y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), x = await (i.isElement == null ? void 0 : i.isElement(y)) ? await (i.getScale == null ? void 0 : i.getScale(y)) || {
869
+ } : c.reference, y = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(a.floating)), b = await (i.isElement == null ? void 0 : i.isElement(y)) ? await (i.getScale == null ? void 0 : i.getScale(y)) || {
872
870
  x: 1,
873
871
  y: 1
874
872
  } : {
875
873
  x: 1,
876
874
  y: 1
877
- }, S = Et(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
875
+ }, x = st(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
878
876
  elements: a,
879
877
  rect: w,
880
878
  offsetParent: y,
881
- strategy: l
879
+ strategy: f
882
880
  }) : w);
883
881
  return {
884
- top: (g.top - S.top + p.top) / x.y,
885
- bottom: (S.bottom - g.bottom + p.bottom) / x.y,
886
- left: (g.left - S.left + p.left) / x.x,
887
- right: (S.right - g.right + p.right) / x.x
882
+ top: (v.top - x.top + p.top) / b.y,
883
+ bottom: (x.bottom - v.bottom + p.bottom) / b.y,
884
+ left: (v.left - x.left + p.left) / b.x,
885
+ right: (x.right - v.right + p.right) / b.x
888
886
  };
889
887
  }
890
- const ar = async (t, e, n) => {
888
+ const ur = 50, fr = async (t, e, n) => {
891
889
  const {
892
890
  placement: r = "bottom",
893
891
  strategy: o = "absolute",
894
892
  middleware: i = [],
895
893
  platform: c
896
- } = n, a = i.filter(Boolean), l = await (c.isRTL == null ? void 0 : c.isRTL(e));
897
- let s = await c.getElementRects({
894
+ } = n, a = c.detectOverflow ? c : {
895
+ ...c,
896
+ detectOverflow: lr
897
+ }, f = await (c.isRTL == null ? void 0 : c.isRTL(e));
898
+ let l = await c.getElementRects({
898
899
  reference: t,
899
900
  floating: e,
900
901
  strategy: o
901
902
  }), {
902
903
  x: u,
903
- y: f
904
- } = ue(s, r, l), m = r, h = {}, p = 0;
905
- for (let v = 0; v < a.length; v++) {
906
- var d;
904
+ y: s
905
+ } = ge(l, r, f), m = r, h = 0;
906
+ const p = {};
907
+ for (let d = 0; d < i.length; d++) {
908
+ const g = i[d];
909
+ if (!g)
910
+ continue;
907
911
  const {
908
- name: g,
912
+ name: v,
909
913
  fn: w
910
- } = a[v], {
914
+ } = g, {
911
915
  x: y,
912
- y: x,
913
- data: S,
914
- reset: C
916
+ y: b,
917
+ data: x,
918
+ reset: R
915
919
  } = await w({
916
920
  x: u,
917
- y: f,
921
+ y: s,
918
922
  initialPlacement: r,
919
923
  placement: m,
920
924
  strategy: o,
921
- middlewareData: h,
922
- rects: s,
923
- platform: {
924
- ...c,
925
- detectOverflow: (d = c.detectOverflow) != null ? d : cr
926
- },
925
+ middlewareData: p,
926
+ rects: l,
927
+ platform: a,
927
928
  elements: {
928
929
  reference: t,
929
930
  floating: e
930
931
  }
931
932
  });
932
- u = y ?? u, f = x ?? f, h = {
933
- ...h,
934
- [g]: {
935
- ...h[g],
936
- ...S
937
- }
938
- }, C && p <= 50 && (p++, typeof C == "object" && (C.placement && (m = C.placement), C.rects && (s = C.rects === !0 ? await c.getElementRects({
933
+ u = y ?? u, s = b ?? s, p[v] = {
934
+ ...p[v],
935
+ ...x
936
+ }, R && h < ur && (h++, typeof R == "object" && (R.placement && (m = R.placement), R.rects && (l = R.rects === !0 ? await c.getElementRects({
939
937
  reference: t,
940
938
  floating: e,
941
939
  strategy: o
942
- }) : C.rects), {
940
+ }) : R.rects), {
943
941
  x: u,
944
- y: f
945
- } = ue(s, m, l)), v = -1);
942
+ y: s
943
+ } = ge(l, m, f)), d = -1);
946
944
  }
947
945
  return {
948
946
  x: u,
949
- y: f,
947
+ y: s,
950
948
  placement: m,
951
949
  strategy: o,
952
- middlewareData: h
950
+ middlewareData: p
953
951
  };
954
- }, sr = (t) => ({
952
+ }, dr = (t) => ({
955
953
  name: "arrow",
956
954
  options: t,
957
955
  async fn(e) {
@@ -962,33 +960,105 @@ const ar = async (t, e, n) => {
962
960
  rects: i,
963
961
  platform: c,
964
962
  elements: a,
965
- middlewareData: l
963
+ middlewareData: f
966
964
  } = e, {
967
- element: s,
965
+ element: l,
968
966
  padding: u = 0
969
- } = K(t, e) || {};
970
- if (s == null)
967
+ } = X(t, e) || {};
968
+ if (l == null)
971
969
  return {};
972
- const f = Te(u), m = {
970
+ const s = Jt(u), m = {
973
971
  x: n,
974
972
  y: r
975
- }, h = Ut(o), p = Zt(h), d = await c.getDimensions(s), v = h === "y", g = v ? "top" : "left", w = v ? "bottom" : "right", y = v ? "clientHeight" : "clientWidth", x = i.reference[p] + i.reference[h] - m[h] - i.floating[p], S = m[h] - i.reference[h], C = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(s));
976
- let R = C ? C[y] : 0;
977
- (!R || !await (c.isElement == null ? void 0 : c.isElement(C))) && (R = a.floating[y] || i.floating[p]);
978
- const M = x / 2 - S / 2, P = R / 2 - d[p] / 2 - 1, O = Q(f[g], P), k = Q(f[w], P), T = O, N = R - d[p] - k, A = R / 2 - d[p] / 2 + M, $ = jt(T, A, N), _ = !l.arrow && at(o) != null && A !== $ && i.reference[p] / 2 - (A < T ? O : k) - d[p] / 2 < 0, W = _ ? A < T ? A - T : A - N : 0;
973
+ }, h = Gt(o), p = Qt(h), d = await c.getDimensions(l), g = h === "y", v = g ? "top" : "left", w = g ? "bottom" : "right", y = g ? "clientHeight" : "clientWidth", b = i.reference[p] + i.reference[h] - m[h] - i.floating[p], x = m[h] - i.reference[h], R = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(l));
974
+ let E = R ? R[y] : 0;
975
+ (!E || !await (c.isElement == null ? void 0 : c.isElement(R))) && (E = a.floating[y] || i.floating[p]);
976
+ const k = b / 2 - x / 2, _ = E / 2 - d[p] / 2 - 1, C = j(s[v], _), O = j(s[w], _), P = C, L = E - d[p] - O, M = E / 2 - d[p] / 2 + k, F = qt(P, M, L), T = !f.arrow && z(o) != null && M !== F && i.reference[p] / 2 - (M < P ? C : O) - d[p] / 2 < 0, N = T ? M < P ? M - P : M - L : 0;
979
977
  return {
980
- [h]: m[h] + W,
978
+ [h]: m[h] + N,
981
979
  data: {
982
- [h]: $,
983
- centerOffset: A - $ - W,
984
- ..._ && {
985
- alignmentOffset: W
980
+ [h]: F,
981
+ centerOffset: M - F - N,
982
+ ...T && {
983
+ alignmentOffset: N
986
984
  }
987
985
  },
988
- reset: _
986
+ reset: T
989
987
  };
990
988
  }
991
- }), lr = function(t) {
989
+ });
990
+ function hr(t, e, n) {
991
+ return (t ? [...n.filter((o) => z(o) === t), ...n.filter((o) => z(o) !== t)] : n.filter((o) => I(o) === o)).filter((o) => t ? z(o) === t || (e ? At(o) !== o : !1) : !0);
992
+ }
993
+ const mr = function(t) {
994
+ return t === void 0 && (t = {}), {
995
+ name: "autoPlacement",
996
+ options: t,
997
+ async fn(e) {
998
+ var n, r, o;
999
+ const {
1000
+ rects: i,
1001
+ middlewareData: c,
1002
+ placement: a,
1003
+ platform: f,
1004
+ elements: l
1005
+ } = e, {
1006
+ crossAxis: u = !1,
1007
+ alignment: s,
1008
+ allowedPlacements: m = de,
1009
+ autoAlignment: h = !0,
1010
+ ...p
1011
+ } = X(t, e), d = s !== void 0 || m === de ? hr(s || null, h, m) : m, g = await f.detectOverflow(e, p), v = ((n = c.autoPlacement) == null ? void 0 : n.index) || 0, w = d[v];
1012
+ if (w == null)
1013
+ return {};
1014
+ const y = He(w, i, await (f.isRTL == null ? void 0 : f.isRTL(l.floating)));
1015
+ if (a !== w)
1016
+ return {
1017
+ reset: {
1018
+ placement: d[0]
1019
+ }
1020
+ };
1021
+ const b = [g[I(w)], g[y[0]], g[y[1]]], x = [...((r = c.autoPlacement) == null ? void 0 : r.overflows) || [], {
1022
+ placement: w,
1023
+ overflows: b
1024
+ }], R = d[v + 1];
1025
+ if (R)
1026
+ return {
1027
+ data: {
1028
+ index: v + 1,
1029
+ overflows: x
1030
+ },
1031
+ reset: {
1032
+ placement: R
1033
+ }
1034
+ };
1035
+ const E = x.map((C) => {
1036
+ const O = z(C.placement);
1037
+ return [C.placement, O && u ? (
1038
+ // Check along the mainAxis and main crossAxis side.
1039
+ C.overflows.slice(0, 2).reduce((P, L) => P + L, 0)
1040
+ ) : (
1041
+ // Check only the mainAxis.
1042
+ C.overflows[0]
1043
+ ), C.overflows];
1044
+ }).sort((C, O) => C[1] - O[1]), _ = ((o = E.filter((C) => C[2].slice(
1045
+ 0,
1046
+ // Aligned placements should not check their opposite crossAxis
1047
+ // side.
1048
+ z(C[0]) ? 2 : 3
1049
+ ).every((O) => O <= 0))[0]) == null ? void 0 : o[0]) || E[0][0];
1050
+ return _ !== a ? {
1051
+ data: {
1052
+ index: v + 1,
1053
+ overflows: x
1054
+ },
1055
+ reset: {
1056
+ placement: _
1057
+ }
1058
+ } : {};
1059
+ }
1060
+ };
1061
+ }, gr = function(t) {
992
1062
  return t === void 0 && (t = {}), {
993
1063
  name: "flip",
994
1064
  options: t,
@@ -999,70 +1069,70 @@ const ar = async (t, e, n) => {
999
1069
  middlewareData: i,
1000
1070
  rects: c,
1001
1071
  initialPlacement: a,
1002
- platform: l,
1003
- elements: s
1072
+ platform: f,
1073
+ elements: l
1004
1074
  } = e, {
1005
1075
  mainAxis: u = !0,
1006
- crossAxis: f = !0,
1076
+ crossAxis: s = !0,
1007
1077
  fallbackPlacements: m,
1008
1078
  fallbackStrategy: h = "bestFit",
1009
1079
  fallbackAxisSideDirection: p = "none",
1010
1080
  flipAlignment: d = !0,
1011
- ...v
1012
- } = K(t, e);
1081
+ ...g
1082
+ } = X(t, e);
1013
1083
  if ((n = i.arrow) != null && n.alignmentOffset)
1014
1084
  return {};
1015
- const g = Z(o), w = j(a), y = Z(a) === a, x = await (l.isRTL == null ? void 0 : l.isRTL(s.floating)), S = m || (y || !d ? [Rt(a)] : tr(a)), C = p !== "none";
1016
- !m && C && S.push(...or(a, d, p, x));
1017
- const R = [a, ...S], M = await l.detectOverflow(e, v), P = [];
1018
- let O = ((r = i.flip) == null ? void 0 : r.overflows) || [];
1019
- if (u && P.push(M[g]), f) {
1020
- const A = Jn(o, c, x);
1021
- P.push(M[A[0]], M[A[1]]);
1085
+ const v = I(o), w = V(a), y = I(a) === a, b = await (f.isRTL == null ? void 0 : f.isRTL(l.floating)), x = m || (y || !d ? [Ot(a)] : rr(a)), R = p !== "none";
1086
+ !m && R && x.push(...ar(a, d, p, b));
1087
+ const E = [a, ...x], k = await f.detectOverflow(e, g), _ = [];
1088
+ let C = ((r = i.flip) == null ? void 0 : r.overflows) || [];
1089
+ if (u && _.push(k[v]), s) {
1090
+ const M = He(o, c, b);
1091
+ _.push(k[M[0]], k[M[1]]);
1022
1092
  }
1023
- if (O = [...O, {
1093
+ if (C = [...C, {
1024
1094
  placement: o,
1025
- overflows: P
1026
- }], !P.every((A) => A <= 0)) {
1027
- var k, T;
1028
- const A = (((k = i.flip) == null ? void 0 : k.index) || 0) + 1, $ = R[A];
1029
- if ($ && (!(f === "alignment" ? w !== j($) : !1) || // We leave the current main axis only if every placement on that axis
1095
+ overflows: _
1096
+ }], !_.every((M) => M <= 0)) {
1097
+ var O, P;
1098
+ const M = (((O = i.flip) == null ? void 0 : O.index) || 0) + 1, F = E[M];
1099
+ if (F && (!(s === "alignment" ? w !== V(F) : !1) || // We leave the current main axis only if every placement on that axis
1030
1100
  // overflows the main axis.
1031
- O.every((E) => j(E.placement) === w ? E.overflows[0] > 0 : !0)))
1101
+ C.every((A) => V(A.placement) === w ? A.overflows[0] > 0 : !0)))
1032
1102
  return {
1033
1103
  data: {
1034
- index: A,
1035
- overflows: O
1104
+ index: M,
1105
+ overflows: C
1036
1106
  },
1037
1107
  reset: {
1038
- placement: $
1108
+ placement: F
1039
1109
  }
1040
1110
  };
1041
- let _ = (T = O.filter((W) => W.overflows[0] <= 0).sort((W, E) => W.overflows[1] - E.overflows[1])[0]) == null ? void 0 : T.placement;
1042
- if (!_)
1111
+ let T = (P = C.filter((N) => N.overflows[0] <= 0).sort((N, A) => N.overflows[1] - A.overflows[1])[0]) == null ? void 0 : P.placement;
1112
+ if (!T)
1043
1113
  switch (h) {
1044
1114
  case "bestFit": {
1045
- var N;
1046
- const W = (N = O.filter((E) => {
1047
- if (C) {
1048
- const B = j(E.placement);
1049
- return B === w || // Create a bias to the `y` side axis due to horizontal
1115
+ var L;
1116
+ const N = (L = C.filter((A) => {
1117
+ if (R) {
1118
+ const H = V(A.placement);
1119
+ return H === w || // Create a bias to the `y` side axis due to horizontal
1050
1120
  // reading directions favoring greater width.
1051
- B === "y";
1121
+ H === "y";
1052
1122
  }
1053
1123
  return !0;
1054
- }).map((E) => [E.placement, E.overflows.filter((B) => B > 0).reduce((B, U) => B + U, 0)]).sort((E, B) => E[1] - B[1])[0]) == null ? void 0 : N[0];
1055
- W && (_ = W);
1124
+ }).map((A) => [A.placement, A.overflows.filter((H) => H > 0).reduce((H, G) => H + G, 0)]).sort((A, H) => A[1] - H[1])[0]) == null ? void 0 : L[0];
1125
+ N && (T = N);
1056
1126
  break;
1057
1127
  }
1058
1128
  case "initialPlacement":
1059
- _ = a;
1129
+ T = a;
1060
1130
  break;
1061
1131
  }
1062
- if (o !== _)
1132
+ if (o !== T)
1063
1133
  return {
1064
1134
  reset: {
1065
- placement: _
1135
+ placement: T
1066
1136
  }
1067
1137
  };
1068
1138
  }
@@ -1070,7 +1140,7 @@ const ar = async (t, e, n) => {
1070
1140
  }
1071
1141
  };
1072
1142
  };
1073
- function fe(t, e) {
1143
+ function ve(t, e) {
1074
1144
  return {
1075
1145
  top: t.top - e.height,
1076
1146
  right: t.right - e.width,
@@ -1078,10 +1148,10 @@ function fe(t, e) {
1078
1148
  left: t.left - e.width
1079
1149
  };
1080
1150
  }
1081
- function de(t) {
1082
- return Zn.some((e) => t[e] >= 0);
1151
+ function pe(t) {
1152
+ return Fe.some((e) => t[e] >= 0);
1083
1153
  }
1084
- const ur = function(t) {
1154
+ const vr = function(t) {
1085
1155
  return t === void 0 && (t = {}), {
1086
1156
  name: "hide",
1087
1157
  options: t,
@@ -1092,17 +1162,17 @@ const ur = function(t) {
1092
1162
  } = e, {
1093
1163
  strategy: o = "referenceHidden",
1094
1164
  ...i
1095
- } = K(t, e);
1165
+ } = X(t, e);
1096
1166
  switch (o) {
1097
1167
  case "referenceHidden": {
1098
1168
  const c = await r.detectOverflow(e, {
1099
1169
  ...i,
1100
1170
  elementContext: "reference"
1101
- }), a = fe(c, n.reference);
1171
+ }), a = ve(c, n.reference);
1102
1172
  return {
1103
1173
  data: {
1104
1174
  referenceHiddenOffsets: a,
1105
- referenceHidden: de(a)
1175
+ referenceHidden: pe(a)
1106
1176
  }
1107
1177
  };
1108
1178
  }
@@ -1110,11 +1180,11 @@ const ur = function(t) {
1110
1180
  const c = await r.detectOverflow(e, {
1111
1181
  ...i,
1112
1182
  altBoundary: !0
1113
- }), a = fe(c, n.floating);
1183
+ }), a = ve(c, n.floating);
1114
1184
  return {
1115
1185
  data: {
1116
1186
  escapedOffsets: a,
1117
- escaped: de(a)
1187
+ escaped: pe(a)
1118
1188
  }
1119
1189
  };
1120
1190
  }
@@ -1123,35 +1193,115 @@ const ur = function(t) {
1123
1193
  }
1124
1194
  }
1125
1195
  };
1126
- }, De = /* @__PURE__ */ new Set(["left", "top"]);
1127
- async function fr(t, e) {
1196
+ };
1197
+ function $e(t) {
1198
+ const e = j(...t.map((i) => i.left)), n = j(...t.map((i) => i.top)), r = B(...t.map((i) => i.right)), o = B(...t.map((i) => i.bottom));
1199
+ return {
1200
+ x: e,
1201
+ y: n,
1202
+ width: r - e,
1203
+ height: o - n
1204
+ };
1205
+ }
1206
+ function pr(t) {
1207
+ const e = t.slice().sort((o, i) => o.y - i.y), n = [];
1208
+ let r = null;
1209
+ for (let o = 0; o < e.length; o++) {
1210
+ const i = e[o];
1211
+ !r || i.y - r.y > r.height / 2 ? n.push([i]) : n[n.length - 1].push(i), r = i;
1212
+ }
1213
+ return n.map((o) => st($e(o)));
1214
+ }
1215
+ const wr = function(t) {
1216
+ return t === void 0 && (t = {}), {
1217
+ name: "inline",
1218
+ options: t,
1219
+ async fn(e) {
1220
+ const {
1221
+ placement: n,
1222
+ elements: r,
1223
+ rects: o,
1224
+ platform: i,
1225
+ strategy: c
1226
+ } = e, {
1227
+ padding: a = 2,
1228
+ x: f,
1229
+ y: l
1230
+ } = X(t, e), u = Array.from(await (i.getClientRects == null ? void 0 : i.getClientRects(r.reference)) || []), s = pr(u), m = st($e(u)), h = Jt(a);
1231
+ function p() {
1232
+ if (s.length === 2 && s[0].left > s[1].right && f != null && l != null)
1233
+ return s.find((g) => f > g.left - h.left && f < g.right + h.right && l > g.top - h.top && l < g.bottom + h.bottom) || m;
1234
+ if (s.length >= 2) {
1235
+ if (V(n) === "y") {
1236
+ const C = s[0], O = s[s.length - 1], P = I(n) === "top", L = C.top, M = O.bottom, F = P ? C.left : O.left, T = P ? C.right : O.right, N = T - F, A = M - L;
1237
+ return {
1238
+ top: L,
1239
+ bottom: M,
1240
+ left: F,
1241
+ right: T,
1242
+ width: N,
1243
+ height: A,
1244
+ x: F,
1245
+ y: L
1246
+ };
1247
+ }
1248
+ const g = I(n) === "left", v = B(...s.map((C) => C.right)), w = j(...s.map((C) => C.left)), y = s.filter((C) => g ? C.left === w : C.right === v), b = y[0].top, x = y[y.length - 1].bottom, R = w, E = v, k = E - R, _ = x - b;
1249
+ return {
1250
+ top: b,
1251
+ bottom: x,
1252
+ left: R,
1253
+ right: E,
1254
+ width: k,
1255
+ height: _,
1256
+ x: R,
1257
+ y: b
1258
+ };
1259
+ }
1260
+ return m;
1261
+ }
1262
+ const d = await i.getElementRects({
1263
+ reference: {
1264
+ getBoundingClientRect: p
1265
+ },
1266
+ floating: r.floating,
1267
+ strategy: c
1268
+ });
1269
+ return o.reference.x !== d.reference.x || o.reference.y !== d.reference.y || o.reference.width !== d.reference.width || o.reference.height !== d.reference.height ? {
1270
+ reset: {
1271
+ rects: d
1272
+ }
1273
+ } : {};
1274
+ }
1275
+ };
1276
+ }, Ie = /* @__PURE__ */ new Set(["left", "top"]);
1277
+ async function yr(t, e) {
1128
1278
  const {
1129
1279
  placement: n,
1130
1280
  platform: r,
1131
1281
  elements: o
1132
- } = t, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), c = Z(n), a = at(n), l = j(n) === "y", s = De.has(c) ? -1 : 1, u = i && l ? -1 : 1, f = K(e, t);
1282
+ } = t, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), c = I(n), a = z(n), f = V(n) === "y", l = Ie.has(c) ? -1 : 1, u = i && f ? -1 : 1, s = X(e, t);
1133
1283
  let {
1134
1284
  mainAxis: m,
1135
1285
  crossAxis: h,
1136
1286
  alignmentAxis: p
1137
- } = typeof f == "number" ? {
1138
- mainAxis: f,
1287
+ } = typeof s == "number" ? {
1288
+ mainAxis: s,
1139
1289
  crossAxis: 0,
1140
1290
  alignmentAxis: null
1141
1291
  } : {
1142
- mainAxis: f.mainAxis || 0,
1143
- crossAxis: f.crossAxis || 0,
1144
- alignmentAxis: f.alignmentAxis
1292
+ mainAxis: s.mainAxis || 0,
1293
+ crossAxis: s.crossAxis || 0,
1294
+ alignmentAxis: s.alignmentAxis
1145
1295
  };
1146
- return a && typeof p == "number" && (h = a === "end" ? p * -1 : p), l ? {
1296
+ return a && typeof p == "number" && (h = a === "end" ? p * -1 : p), f ? {
1147
1297
  x: h * u,
1148
- y: m * s
1298
+ y: m * l
1149
1299
  } : {
1150
- x: m * s,
1300
+ x: m * l,
1151
1301
  y: h * u
1152
1302
  };
1153
1303
  }
1154
- const dr = function(t) {
1304
+ const br = function(t) {
1155
1305
  return t === void 0 && (t = 0), {
1156
1306
  name: "offset",
1157
1307
  options: t,
@@ -1162,18 +1312,18 @@ const dr = function(t) {
1162
1312
  y: i,
1163
1313
  placement: c,
1164
1314
  middlewareData: a
1165
- } = e, l = await fr(e, t);
1315
+ } = e, f = await yr(e, t);
1166
1316
  return c === ((n = a.offset) == null ? void 0 : n.placement) && (r = a.arrow) != null && r.alignmentOffset ? {} : {
1167
- x: o + l.x,
1168
- y: i + l.y,
1317
+ x: o + f.x,
1318
+ y: i + f.y,
1169
1319
  data: {
1170
- ...l,
1320
+ ...f,
1171
1321
  placement: c
1172
1322
  }
1173
1323
  };
1174
1324
  }
1175
1325
  };
1176
- }, hr = function(t) {
1326
+ }, xr = function(t) {
1177
1327
  return t === void 0 && (t = {}), {
1178
1328
  name: "shift",
1179
1329
  options: t,
@@ -1186,42 +1336,42 @@ const dr = function(t) {
1186
1336
  } = e, {
1187
1337
  mainAxis: c = !0,
1188
1338
  crossAxis: a = !1,
1189
- limiter: l = {
1190
- fn: (g) => {
1339
+ limiter: f = {
1340
+ fn: (v) => {
1191
1341
  let {
1192
1342
  x: w,
1193
1343
  y
1194
- } = g;
1344
+ } = v;
1195
1345
  return {
1196
1346
  x: w,
1197
1347
  y
1198
1348
  };
1199
1349
  }
1200
1350
  },
1201
- ...s
1202
- } = K(t, e), u = {
1351
+ ...l
1352
+ } = X(t, e), u = {
1203
1353
  x: n,
1204
1354
  y: r
1205
- }, f = await i.detectOverflow(e, s), m = j(Z(o)), h = Kt(m);
1355
+ }, s = await i.detectOverflow(e, l), m = V(I(o)), h = Zt(m);
1206
1356
  let p = u[h], d = u[m];
1207
1357
  if (c) {
1208
- const g = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", y = p + f[g], x = p - f[w];
1209
- p = jt(y, p, x);
1358
+ const v = h === "y" ? "top" : "left", w = h === "y" ? "bottom" : "right", y = p + s[v], b = p - s[w];
1359
+ p = qt(y, p, b);
1210
1360
  }
1211
1361
  if (a) {
1212
- const g = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", y = d + f[g], x = d - f[w];
1213
- d = jt(y, d, x);
1362
+ const v = m === "y" ? "top" : "left", w = m === "y" ? "bottom" : "right", y = d + s[v], b = d - s[w];
1363
+ d = qt(y, d, b);
1214
1364
  }
1215
- const v = l.fn({
1365
+ const g = f.fn({
1216
1366
  ...e,
1217
1367
  [h]: p,
1218
1368
  [m]: d
1219
1369
  });
1220
1370
  return {
1221
- ...v,
1371
+ ...g,
1222
1372
  data: {
1223
- x: v.x - n,
1224
- y: v.y - r,
1373
+ x: g.x - n,
1374
+ y: g.y - r,
1225
1375
  enabled: {
1226
1376
  [h]: c,
1227
1377
  [m]: a
@@ -1230,7 +1380,7 @@ const dr = function(t) {
1230
1380
  };
1231
1381
  }
1232
1382
  };
1233
- }, mr = function(t) {
1383
+ }, Sr = function(t) {
1234
1384
  return t === void 0 && (t = {}), {
1235
1385
  options: t,
1236
1386
  fn(e) {
@@ -1242,14 +1392,14 @@ const dr = function(t) {
1242
1392
  middlewareData: c
1243
1393
  } = e, {
1244
1394
  offset: a = 0,
1245
- mainAxis: l = !0,
1246
- crossAxis: s = !0
1247
- } = K(t, e), u = {
1395
+ mainAxis: f = !0,
1396
+ crossAxis: l = !0
1397
+ } = X(t, e), u = {
1248
1398
  x: n,
1249
1399
  y: r
1250
- }, f = j(o), m = Kt(f);
1251
- let h = u[m], p = u[f];
1252
- const d = K(a, e), v = typeof d == "number" ? {
1400
+ }, s = V(o), m = Zt(s);
1401
+ let h = u[m], p = u[s];
1402
+ const d = X(a, e), g = typeof d == "number" ? {
1253
1403
  mainAxis: d,
1254
1404
  crossAxis: 0
1255
1405
  } : {
@@ -1257,22 +1407,22 @@ const dr = function(t) {
1257
1407
  crossAxis: 0,
1258
1408
  ...d
1259
1409
  };
1260
- if (l) {
1261
- const y = m === "y" ? "height" : "width", x = i.reference[m] - i.floating[y] + v.mainAxis, S = i.reference[m] + i.reference[y] - v.mainAxis;
1262
- h < x ? h = x : h > S && (h = S);
1410
+ if (f) {
1411
+ const y = m === "y" ? "height" : "width", b = i.reference[m] - i.floating[y] + g.mainAxis, x = i.reference[m] + i.reference[y] - g.mainAxis;
1412
+ h < b ? h = b : h > x && (h = x);
1263
1413
  }
1264
- if (s) {
1265
- var g, w;
1266
- const y = m === "y" ? "width" : "height", x = De.has(Z(o)), S = i.reference[f] - i.floating[y] + (x && ((g = c.offset) == null ? void 0 : g[f]) || 0) + (x ? 0 : v.crossAxis), C = i.reference[f] + i.reference[y] + (x ? 0 : ((w = c.offset) == null ? void 0 : w[f]) || 0) - (x ? v.crossAxis : 0);
1267
- p < S ? p = S : p > C && (p = C);
1414
+ if (l) {
1415
+ var v, w;
1416
+ const y = m === "y" ? "width" : "height", b = Ie.has(I(o)), x = i.reference[s] - i.floating[y] + (b && ((v = c.offset) == null ? void 0 : v[s]) || 0) + (b ? 0 : g.crossAxis), R = i.reference[s] + i.reference[y] + (b ? 0 : ((w = c.offset) == null ? void 0 : w[s]) || 0) - (b ? g.crossAxis : 0);
1417
+ p < x ? p = x : p > R && (p = R);
1268
1418
  }
1269
1419
  return {
1270
1420
  [m]: h,
1271
- [f]: p
1421
+ [s]: p
1272
1422
  };
1273
1423
  }
1274
1424
  };
1275
- }, vr = function(t) {
1425
+ }, Rr = function(t) {
1276
1426
  return t === void 0 && (t = {}), {
1277
1427
  name: "size",
1278
1428
  options: t,
@@ -1284,28 +1434,28 @@ const dr = function(t) {
1284
1434
  platform: c,
1285
1435
  elements: a
1286
1436
  } = e, {
1287
- apply: l = () => {
1437
+ apply: f = () => {
1288
1438
  },
1289
- ...s
1290
- } = K(t, e), u = await c.detectOverflow(e, s), f = Z(o), m = at(o), h = j(o) === "y", {
1439
+ ...l
1440
+ } = X(t, e), u = await c.detectOverflow(e, l), s = I(o), m = z(o), h = V(o) === "y", {
1291
1441
  width: p,
1292
1442
  height: d
1293
1443
  } = i.floating;
1294
- let v, g;
1295
- f === "top" || f === "bottom" ? (v = f, g = m === (await (c.isRTL == null ? void 0 : c.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = f, v = m === "end" ? "top" : "bottom");
1296
- const w = d - u.top - u.bottom, y = p - u.left - u.right, x = Q(d - u[v], w), S = Q(p - u[g], y), C = !e.middlewareData.shift;
1297
- let R = x, M = S;
1298
- if ((n = e.middlewareData.shift) != null && n.enabled.x && (M = y), (r = e.middlewareData.shift) != null && r.enabled.y && (R = w), C && !m) {
1299
- const O = F(u.left, 0), k = F(u.right, 0), T = F(u.top, 0), N = F(u.bottom, 0);
1300
- h ? M = p - 2 * (O !== 0 || k !== 0 ? O + k : F(u.left, u.right)) : R = d - 2 * (T !== 0 || N !== 0 ? T + N : F(u.top, u.bottom));
1444
+ let g, v;
1445
+ s === "top" || s === "bottom" ? (g = s, v = m === (await (c.isRTL == null ? void 0 : c.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (v = s, g = m === "end" ? "top" : "bottom");
1446
+ const w = d - u.top - u.bottom, y = p - u.left - u.right, b = j(d - u[g], w), x = j(p - u[v], y), R = !e.middlewareData.shift;
1447
+ let E = b, k = x;
1448
+ if ((n = e.middlewareData.shift) != null && n.enabled.x && (k = y), (r = e.middlewareData.shift) != null && r.enabled.y && (E = w), R && !m) {
1449
+ const C = B(u.left, 0), O = B(u.right, 0), P = B(u.top, 0), L = B(u.bottom, 0);
1450
+ h ? k = p - 2 * (C !== 0 || O !== 0 ? C + O : B(u.left, u.right)) : E = d - 2 * (P !== 0 || L !== 0 ? P + L : B(u.top, u.bottom));
1301
1451
  }
1302
- await l({
1452
+ await f({
1303
1453
  ...e,
1304
- availableWidth: M,
1305
- availableHeight: R
1454
+ availableWidth: k,
1455
+ availableHeight: E
1306
1456
  });
1307
- const P = await c.getDimensions(a.floating);
1308
- return p !== P.width || d !== P.height ? {
1457
+ const _ = await c.getDimensions(a.floating);
1458
+ return p !== _.width || d !== _.height ? {
1309
1459
  reset: {
1310
1460
  rects: !0
1311
1461
  }
@@ -1316,81 +1466,81 @@ const dr = function(t) {
1316
1466
  function kt() {
1317
1467
  return typeof window < "u";
1318
1468
  }
1319
- function st(t) {
1320
- return Ne(t) ? (t.nodeName || "").toLowerCase() : "#document";
1469
+ function ut(t) {
1470
+ return Ve(t) ? (t.nodeName || "").toLowerCase() : "#document";
1321
1471
  }
1322
- function H(t) {
1472
+ function $(t) {
1323
1473
  var e;
1324
1474
  return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
1325
1475
  }
1326
- function q(t) {
1476
+ function Z(t) {
1327
1477
  var e;
1328
- return (e = (Ne(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
1329
- }
1330
- function Ne(t) {
1331
- return kt() ? t instanceof Node || t instanceof H(t).Node : !1;
1478
+ return (e = (Ve(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
1332
1479
  }
1333
- function I(t) {
1334
- return kt() ? t instanceof Element || t instanceof H(t).Element : !1;
1480
+ function Ve(t) {
1481
+ return kt() ? t instanceof Node || t instanceof $(t).Node : !1;
1335
1482
  }
1336
1483
  function Y(t) {
1337
- return kt() ? t instanceof HTMLElement || t instanceof H(t).HTMLElement : !1;
1484
+ return kt() ? t instanceof Element || t instanceof $(t).Element : !1;
1338
1485
  }
1339
- function he(t) {
1340
- return !kt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof H(t).ShadowRoot;
1486
+ function Q(t) {
1487
+ return kt() ? t instanceof HTMLElement || t instanceof $(t).HTMLElement : !1;
1341
1488
  }
1342
- const gr = /* @__PURE__ */ new Set(["inline", "contents"]);
1343
- function dt(t) {
1489
+ function we(t) {
1490
+ return !kt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof $(t).ShadowRoot;
1491
+ }
1492
+ function mt(t) {
1344
1493
  const {
1345
1494
  overflow: e,
1346
1495
  overflowX: n,
1347
1496
  overflowY: r,
1348
1497
  display: o
1349
- } = V(t);
1350
- return /auto|scroll|overlay|hidden|clip/.test(e + r + n) && !gr.has(o);
1498
+ } = q(t);
1499
+ return /auto|scroll|overlay|hidden|clip/.test(e + r + n) && o !== "inline" && o !== "contents";
1351
1500
  }
1352
- const pr = /* @__PURE__ */ new Set(["table", "td", "th"]);
1353
- function wr(t) {
1354
- return pr.has(st(t));
1501
+ function Cr(t) {
1502
+ return /^(table|td|th)$/.test(ut(t));
1355
1503
  }
1356
- const yr = [":popover-open", ":modal"];
1357
- function _t(t) {
1358
- return yr.some((e) => {
1359
- try {
1360
- return t.matches(e);
1361
- } catch {
1362
- return !1;
1363
- }
1364
- });
1504
+ function Lt(t) {
1505
+ try {
1506
+ if (t.matches(":popover-open"))
1507
+ return !0;
1508
+ } catch {
1509
+ }
1510
+ try {
1511
+ return t.matches(":modal");
1512
+ } catch {
1513
+ return !1;
1514
+ }
1365
1515
  }
1366
- const br = ["transform", "translate", "scale", "rotate", "perspective"], xr = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Sr = ["paint", "layout", "strict", "content"];
1367
- function Qt(t) {
1368
- const e = Gt(), n = I(t) ? V(t) : t;
1369
- return br.some((r) => n[r] ? n[r] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || xr.some((r) => (n.willChange || "").includes(r)) || Sr.some((r) => (n.contain || "").includes(r));
1516
+ const Er = /transform|translate|scale|rotate|perspective|filter/, Ar = /paint|layout|strict|content/, tt = (t) => !!t && t !== "none";
1517
+ let Ht;
1518
+ function te(t) {
1519
+ const e = Y(t) ? q(t) : t;
1520
+ return tt(e.transform) || tt(e.translate) || tt(e.scale) || tt(e.rotate) || tt(e.perspective) || !ee() && (tt(e.backdropFilter) || tt(e.filter)) || Er.test(e.willChange || "") || Ar.test(e.contain || "");
1370
1521
  }
1371
- function Cr(t) {
1372
- let e = G(t);
1373
- for (; Y(e) && !ct(e); ) {
1374
- if (Qt(e))
1522
+ function Or(t) {
1523
+ let e = J(t);
1524
+ for (; Q(e) && !lt(e); ) {
1525
+ if (te(e))
1375
1526
  return e;
1376
- if (_t(e))
1527
+ if (Lt(e))
1377
1528
  return null;
1378
- e = G(e);
1529
+ e = J(e);
1379
1530
  }
1380
1531
  return null;
1381
1532
  }
1382
- function Gt() {
1383
- return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1533
+ function ee() {
1534
+ return Ht == null && (Ht = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Ht;
1384
1535
  }
1385
- const Rr = /* @__PURE__ */ new Set(["html", "body", "#document"]);
1386
- function ct(t) {
1387
- return Rr.has(st(t));
1536
+ function lt(t) {
1537
+ return /^(html|body|#document)$/.test(ut(t));
1388
1538
  }
1389
- function V(t) {
1390
- return H(t).getComputedStyle(t);
1539
+ function q(t) {
1540
+ return $(t).getComputedStyle(t);
1391
1541
  }
1392
- function Lt(t) {
1393
- return I(t) ? {
1542
+ function Tt(t) {
1543
+ return Y(t) ? {
1394
1544
  scrollLeft: t.scrollLeft,
1395
1545
  scrollTop: t.scrollTop
1396
1546
  } : {
@@ -1398,189 +1548,188 @@ function Lt(t) {
1398
1548
  scrollTop: t.scrollY
1399
1549
  };
1400
1550
  }
1401
- function G(t) {
1402
- if (st(t) === "html")
1551
+ function J(t) {
1552
+ if (ut(t) === "html")
1403
1553
  return t;
1404
1554
  const e = (
1405
1555
  // Step into the shadow DOM of the parent of a slotted node.
1406
1556
  t.assignedSlot || // DOM Element detected.
1407
1557
  t.parentNode || // ShadowRoot detected.
1408
- he(t) && t.host || // Fallback.
1409
- q(t)
1558
+ we(t) && t.host || // Fallback.
1559
+ Z(t)
1410
1560
  );
1411
- return he(e) ? e.host : e;
1561
+ return we(e) ? e.host : e;
1412
1562
  }
1413
- function We(t) {
1414
- const e = G(t);
1415
- return ct(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : Y(e) && dt(e) ? e : We(e);
1563
+ function ze(t) {
1564
+ const e = J(t);
1565
+ return lt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : Q(e) && mt(e) ? e : ze(e);
1416
1566
  }
1417
- function ft(t, e, n) {
1567
+ function ht(t, e, n) {
1418
1568
  var r;
1419
1569
  e === void 0 && (e = []), n === void 0 && (n = !0);
1420
- const o = We(t), i = o === ((r = t.ownerDocument) == null ? void 0 : r.body), c = H(o);
1570
+ const o = ze(t), i = o === ((r = t.ownerDocument) == null ? void 0 : r.body), c = $(o);
1421
1571
  if (i) {
1422
- const a = Yt(c);
1423
- return e.concat(c, c.visualViewport || [], dt(o) ? o : [], a && n ? ft(a) : []);
1424
- }
1425
- return e.concat(o, ft(o, [], n));
1572
+ const a = Kt(c);
1573
+ return e.concat(c, c.visualViewport || [], mt(o) ? o : [], a && n ? ht(a) : []);
1574
+ } else
1575
+ return e.concat(o, ht(o, [], n));
1426
1576
  }
1427
- function Yt(t) {
1577
+ function Kt(t) {
1428
1578
  return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
1429
1579
  }
1430
- function Be(t) {
1431
- const e = V(t);
1580
+ function je(t) {
1581
+ const e = q(t);
1432
1582
  let n = parseFloat(e.width) || 0, r = parseFloat(e.height) || 0;
1433
- const o = Y(t), i = o ? t.offsetWidth : n, c = o ? t.offsetHeight : r, a = Ct(n) !== i || Ct(r) !== c;
1583
+ const o = Q(t), i = o ? t.offsetWidth : n, c = o ? t.offsetHeight : r, a = Et(n) !== i || Et(r) !== c;
1434
1584
  return a && (n = i, r = c), {
1435
1585
  width: n,
1436
1586
  height: r,
1437
1587
  $: a
1438
1588
  };
1439
1589
  }
1440
- function Jt(t) {
1441
- return I(t) ? t : t.contextElement;
1590
+ function ne(t) {
1591
+ return Y(t) ? t : t.contextElement;
1442
1592
  }
1443
- function it(t) {
1444
- const e = Jt(t);
1445
- if (!Y(e))
1446
- return X(1);
1593
+ function at(t) {
1594
+ const e = ne(t);
1595
+ if (!Q(e))
1596
+ return U(1);
1447
1597
  const n = e.getBoundingClientRect(), {
1448
1598
  width: r,
1449
1599
  height: o,
1450
1600
  $: i
1451
- } = Be(e);
1452
- let c = (i ? Ct(n.width) : n.width) / r, a = (i ? Ct(n.height) : n.height) / o;
1601
+ } = je(e);
1602
+ let c = (i ? Et(n.width) : n.width) / r, a = (i ? Et(n.height) : n.height) / o;
1453
1603
  return (!c || !Number.isFinite(c)) && (c = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1454
1604
  x: c,
1455
1605
  y: a
1456
1606
  };
1457
1607
  }
1458
- const Er = /* @__PURE__ */ X(0);
1459
- function Fe(t) {
1460
- const e = H(t);
1461
- return !Gt() || !e.visualViewport ? Er : {
1608
+ const Mr = /* @__PURE__ */ U(0);
1609
+ function Xe(t) {
1610
+ const e = $(t);
1611
+ return !ee() || !e.visualViewport ? Mr : {
1462
1612
  x: e.visualViewport.offsetLeft,
1463
1613
  y: e.visualViewport.offsetTop
1464
1614
  };
1465
1615
  }
1466
- function Ar(t, e, n) {
1467
- return e === void 0 && (e = !1), !n || e && n !== H(t) ? !1 : e;
1616
+ function _r(t, e, n) {
1617
+ return e === void 0 && (e = !1), !n || e && n !== $(t) ? !1 : e;
1468
1618
  }
1469
- function tt(t, e, n, r) {
1619
+ function nt(t, e, n, r) {
1470
1620
  e === void 0 && (e = !1), n === void 0 && (n = !1);
1471
- const o = t.getBoundingClientRect(), i = Jt(t);
1472
- let c = X(1);
1473
- e && (r ? I(r) && (c = it(r)) : c = it(t));
1474
- const a = Ar(i, n, r) ? Fe(i) : X(0);
1475
- let l = (o.left + a.x) / c.x, s = (o.top + a.y) / c.y, u = o.width / c.x, f = o.height / c.y;
1621
+ const o = t.getBoundingClientRect(), i = ne(t);
1622
+ let c = U(1);
1623
+ e && (r ? Y(r) && (c = at(r)) : c = at(t));
1624
+ const a = _r(i, n, r) ? Xe(i) : U(0);
1625
+ let f = (o.left + a.x) / c.x, l = (o.top + a.y) / c.y, u = o.width / c.x, s = o.height / c.y;
1476
1626
  if (i) {
1477
- const m = H(i), h = r && I(r) ? H(r) : r;
1478
- let p = m, d = Yt(p);
1627
+ const m = $(i), h = r && Y(r) ? $(r) : r;
1628
+ let p = m, d = Kt(p);
1479
1629
  for (; d && r && h !== p; ) {
1480
- const v = it(d), g = d.getBoundingClientRect(), w = V(d), y = g.left + (d.clientLeft + parseFloat(w.paddingLeft)) * v.x, x = g.top + (d.clientTop + parseFloat(w.paddingTop)) * v.y;
1481
- l *= v.x, s *= v.y, u *= v.x, f *= v.y, l += y, s += x, p = H(d), d = Yt(p);
1630
+ const g = at(d), v = d.getBoundingClientRect(), w = q(d), y = v.left + (d.clientLeft + parseFloat(w.paddingLeft)) * g.x, b = v.top + (d.clientTop + parseFloat(w.paddingTop)) * g.y;
1631
+ f *= g.x, l *= g.y, u *= g.x, s *= g.y, f += y, l += b, p = $(d), d = Kt(p);
1482
1632
  }
1483
1633
  }
1484
- return Et({
1634
+ return st({
1485
1635
  width: u,
1486
- height: f,
1487
- x: l,
1488
- y: s
1636
+ height: s,
1637
+ x: f,
1638
+ y: l
1489
1639
  });
1490
1640
  }
1491
- function Pt(t, e) {
1492
- const n = Lt(t).scrollLeft;
1493
- return e ? e.left + n : tt(q(t)).left + n;
1641
+ function Dt(t, e) {
1642
+ const n = Tt(t).scrollLeft;
1643
+ return e ? e.left + n : nt(Z(t)).left + n;
1494
1644
  }
1495
- function He(t, e) {
1496
- const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - Pt(t, n), o = n.top + e.scrollTop;
1645
+ function Ye(t, e) {
1646
+ const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - Dt(t, n), o = n.top + e.scrollTop;
1497
1647
  return {
1498
1648
  x: r,
1499
1649
  y: o
1500
1650
  };
1501
1651
  }
1502
- function Or(t) {
1652
+ function Pr(t) {
1503
1653
  let {
1504
1654
  elements: e,
1505
1655
  rect: n,
1506
1656
  offsetParent: r,
1507
1657
  strategy: o
1508
1658
  } = t;
1509
- const i = o === "fixed", c = q(r), a = e ? _t(e.floating) : !1;
1659
+ const i = o === "fixed", c = Z(r), a = e ? Lt(e.floating) : !1;
1510
1660
  if (r === c || a && i)
1511
1661
  return n;
1512
- let l = {
1662
+ let f = {
1513
1663
  scrollLeft: 0,
1514
1664
  scrollTop: 0
1515
- }, s = X(1);
1516
- const u = X(0), f = Y(r);
1517
- if ((f || !f && !i) && ((st(r) !== "body" || dt(c)) && (l = Lt(r)), Y(r))) {
1518
- const h = tt(r);
1519
- s = it(r), u.x = h.x + r.clientLeft, u.y = h.y + r.clientTop;
1665
+ }, l = U(1);
1666
+ const u = U(0), s = Q(r);
1667
+ if ((s || !s && !i) && ((ut(r) !== "body" || mt(c)) && (f = Tt(r)), s)) {
1668
+ const h = nt(r);
1669
+ l = at(r), u.x = h.x + r.clientLeft, u.y = h.y + r.clientTop;
1520
1670
  }
1521
- const m = c && !f && !i ? He(c, l) : X(0);
1671
+ const m = c && !s && !i ? Ye(c, f) : U(0);
1522
1672
  return {
1523
- width: n.width * s.x,
1524
- height: n.height * s.y,
1525
- x: n.x * s.x - l.scrollLeft * s.x + u.x + m.x,
1526
- y: n.y * s.y - l.scrollTop * s.y + u.y + m.y
1673
+ width: n.width * l.x,
1674
+ height: n.height * l.y,
1675
+ x: n.x * l.x - f.scrollLeft * l.x + u.x + m.x,
1676
+ y: n.y * l.y - f.scrollTop * l.y + u.y + m.y
1527
1677
  };
1528
1678
  }
1529
- function Mr(t) {
1679
+ function kr(t) {
1530
1680
  return Array.from(t.getClientRects());
1531
1681
  }
1532
- function kr(t) {
1533
- const e = q(t), n = Lt(t), r = t.ownerDocument.body, o = F(e.scrollWidth, e.clientWidth, r.scrollWidth, r.clientWidth), i = F(e.scrollHeight, e.clientHeight, r.scrollHeight, r.clientHeight);
1534
- let c = -n.scrollLeft + Pt(t);
1682
+ function Lr(t) {
1683
+ const e = Z(t), n = Tt(t), r = t.ownerDocument.body, o = B(e.scrollWidth, e.clientWidth, r.scrollWidth, r.clientWidth), i = B(e.scrollHeight, e.clientHeight, r.scrollHeight, r.clientHeight);
1684
+ let c = -n.scrollLeft + Dt(t);
1535
1685
  const a = -n.scrollTop;
1536
- return V(r).direction === "rtl" && (c += F(e.clientWidth, r.clientWidth) - o), {
1686
+ return q(r).direction === "rtl" && (c += B(e.clientWidth, r.clientWidth) - o), {
1537
1687
  width: o,
1538
1688
  height: i,
1539
1689
  x: c,
1540
1690
  y: a
1541
1691
  };
1542
1692
  }
1543
- const me = 25;
1544
- function _r(t, e) {
1545
- const n = H(t), r = q(t), o = n.visualViewport;
1546
- let i = r.clientWidth, c = r.clientHeight, a = 0, l = 0;
1693
+ const ye = 25;
1694
+ function Tr(t, e) {
1695
+ const n = $(t), r = Z(t), o = n.visualViewport;
1696
+ let i = r.clientWidth, c = r.clientHeight, a = 0, f = 0;
1547
1697
  if (o) {
1548
1698
  i = o.width, c = o.height;
1549
- const u = Gt();
1550
- (!u || u && e === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
1699
+ const u = ee();
1700
+ (!u || u && e === "fixed") && (a = o.offsetLeft, f = o.offsetTop);
1551
1701
  }
1552
- const s = Pt(r);
1553
- if (s <= 0) {
1554
- const u = r.ownerDocument, f = u.body, m = getComputedStyle(f), h = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, p = Math.abs(r.clientWidth - f.clientWidth - h);
1555
- p <= me && (i -= p);
1556
- } else s <= me && (i += s);
1702
+ const l = Dt(r);
1703
+ if (l <= 0) {
1704
+ const u = r.ownerDocument, s = u.body, m = getComputedStyle(s), h = u.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, p = Math.abs(r.clientWidth - s.clientWidth - h);
1705
+ p <= ye && (i -= p);
1706
+ } else l <= ye && (i += l);
1557
1707
  return {
1558
1708
  width: i,
1559
1709
  height: c,
1560
1710
  x: a,
1561
- y: l
1711
+ y: f
1562
1712
  };
1563
1713
  }
1564
- const Lr = /* @__PURE__ */ new Set(["absolute", "fixed"]);
1565
- function Pr(t, e) {
1566
- const n = tt(t, !0, e === "fixed"), r = n.top + t.clientTop, o = n.left + t.clientLeft, i = Y(t) ? it(t) : X(1), c = t.clientWidth * i.x, a = t.clientHeight * i.y, l = o * i.x, s = r * i.y;
1714
+ function Dr(t, e) {
1715
+ const n = nt(t, !0, e === "fixed"), r = n.top + t.clientTop, o = n.left + t.clientLeft, i = Q(t) ? at(t) : U(1), c = t.clientWidth * i.x, a = t.clientHeight * i.y, f = o * i.x, l = r * i.y;
1567
1716
  return {
1568
1717
  width: c,
1569
1718
  height: a,
1570
- x: l,
1571
- y: s
1719
+ x: f,
1720
+ y: l
1572
1721
  };
1573
1722
  }
1574
- function ve(t, e, n) {
1723
+ function be(t, e, n) {
1575
1724
  let r;
1576
1725
  if (e === "viewport")
1577
- r = _r(t, n);
1726
+ r = Tr(t, n);
1578
1727
  else if (e === "document")
1579
- r = kr(q(t));
1580
- else if (I(e))
1581
- r = Pr(e, n);
1728
+ r = Lr(Z(t));
1729
+ else if (Y(e))
1730
+ r = Dr(e, n);
1582
1731
  else {
1583
- const o = Fe(t);
1732
+ const o = Xe(t);
1584
1733
  r = {
1585
1734
  x: e.x - o.x,
1586
1735
  y: e.y - o.y,
@@ -1588,110 +1737,112 @@ function ve(t, e, n) {
1588
1737
  height: e.height
1589
1738
  };
1590
1739
  }
1591
- return Et(r);
1740
+ return st(r);
1592
1741
  }
1593
- function Ie(t, e) {
1594
- const n = G(t);
1595
- return n === e || !I(n) || ct(n) ? !1 : V(n).position === "fixed" || Ie(n, e);
1742
+ function qe(t, e) {
1743
+ const n = J(t);
1744
+ return n === e || !Y(n) || lt(n) ? !1 : q(n).position === "fixed" || qe(n, e);
1596
1745
  }
1597
- function Tr(t, e) {
1746
+ function Nr(t, e) {
1598
1747
  const n = e.get(t);
1599
1748
  if (n)
1600
1749
  return n;
1601
- let r = ft(t, [], !1).filter((a) => I(a) && st(a) !== "body"), o = null;
1602
- const i = V(t).position === "fixed";
1603
- let c = i ? G(t) : t;
1604
- for (; I(c) && !ct(c); ) {
1605
- const a = V(c), l = Qt(c);
1606
- !l && a.position === "fixed" && (o = null), (i ? !l && !o : !l && a.position === "static" && !!o && Lr.has(o.position) || dt(c) && !l && Ie(t, c)) ? r = r.filter((u) => u !== c) : o = a, c = G(c);
1750
+ let r = ht(t, [], !1).filter((a) => Y(a) && ut(a) !== "body"), o = null;
1751
+ const i = q(t).position === "fixed";
1752
+ let c = i ? J(t) : t;
1753
+ for (; Y(c) && !lt(c); ) {
1754
+ const a = q(c), f = te(c);
1755
+ !f && a.position === "fixed" && (o = null), (i ? !f && !o : !f && a.position === "static" && !!o && (o.position === "absolute" || o.position === "fixed") || mt(c) && !f && qe(t, c)) ? r = r.filter((u) => u !== c) : o = a, c = J(c);
1607
1756
  }
1608
1757
  return e.set(t, r), r;
1609
1758
  }
1610
- function Dr(t) {
1759
+ function Br(t) {
1611
1760
  let {
1612
1761
  element: e,
1613
1762
  boundary: n,
1614
1763
  rootBoundary: r,
1615
1764
  strategy: o
1616
1765
  } = t;
1617
- const c = [...n === "clippingAncestors" ? _t(e) ? [] : Tr(e, this._c) : [].concat(n), r], a = c[0], l = c.reduce((s, u) => {
1618
- const f = ve(e, u, o);
1619
- return s.top = F(f.top, s.top), s.right = Q(f.right, s.right), s.bottom = Q(f.bottom, s.bottom), s.left = F(f.left, s.left), s;
1620
- }, ve(e, a, o));
1766
+ const c = [...n === "clippingAncestors" ? Lt(e) ? [] : Nr(e, this._c) : [].concat(n), r], a = be(e, c[0], o);
1767
+ let f = a.top, l = a.right, u = a.bottom, s = a.left;
1768
+ for (let m = 1; m < c.length; m++) {
1769
+ const h = be(e, c[m], o);
1770
+ f = B(h.top, f), l = j(h.right, l), u = j(h.bottom, u), s = B(h.left, s);
1771
+ }
1621
1772
  return {
1622
- width: l.right - l.left,
1623
- height: l.bottom - l.top,
1624
- x: l.left,
1625
- y: l.top
1773
+ width: l - s,
1774
+ height: u - f,
1775
+ x: s,
1776
+ y: f
1626
1777
  };
1627
1778
  }
1628
- function Nr(t) {
1779
+ function Wr(t) {
1629
1780
  const {
1630
1781
  width: e,
1631
1782
  height: n
1632
- } = Be(t);
1783
+ } = je(t);
1633
1784
  return {
1634
1785
  width: e,
1635
1786
  height: n
1636
1787
  };
1637
1788
  }
1638
- function Wr(t, e, n) {
1639
- const r = Y(e), o = q(e), i = n === "fixed", c = tt(t, !0, i, e);
1789
+ function Fr(t, e, n) {
1790
+ const r = Q(e), o = Z(e), i = n === "fixed", c = nt(t, !0, i, e);
1640
1791
  let a = {
1641
1792
  scrollLeft: 0,
1642
1793
  scrollTop: 0
1643
1794
  };
1644
- const l = X(0);
1645
- function s() {
1646
- l.x = Pt(o);
1795
+ const f = U(0);
1796
+ function l() {
1797
+ f.x = Dt(o);
1647
1798
  }
1648
1799
  if (r || !r && !i)
1649
- if ((st(e) !== "body" || dt(o)) && (a = Lt(e)), r) {
1650
- const h = tt(e, !0, i, e);
1651
- l.x = h.x + e.clientLeft, l.y = h.y + e.clientTop;
1652
- } else o && s();
1653
- i && !r && o && s();
1654
- const u = o && !r && !i ? He(o, a) : X(0), f = c.left + a.scrollLeft - l.x - u.x, m = c.top + a.scrollTop - l.y - u.y;
1800
+ if ((ut(e) !== "body" || mt(o)) && (a = Tt(e)), r) {
1801
+ const h = nt(e, !0, i, e);
1802
+ f.x = h.x + e.clientLeft, f.y = h.y + e.clientTop;
1803
+ } else o && l();
1804
+ i && !r && o && l();
1805
+ const u = o && !r && !i ? Ye(o, a) : U(0), s = c.left + a.scrollLeft - f.x - u.x, m = c.top + a.scrollTop - f.y - u.y;
1655
1806
  return {
1656
- x: f,
1807
+ x: s,
1657
1808
  y: m,
1658
1809
  width: c.width,
1659
1810
  height: c.height
1660
1811
  };
1661
1812
  }
1662
- function Bt(t) {
1663
- return V(t).position === "static";
1813
+ function $t(t) {
1814
+ return q(t).position === "static";
1664
1815
  }
1665
- function ge(t, e) {
1666
- if (!Y(t) || V(t).position === "fixed")
1816
+ function xe(t, e) {
1817
+ if (!Q(t) || q(t).position === "fixed")
1667
1818
  return null;
1668
1819
  if (e)
1669
1820
  return e(t);
1670
1821
  let n = t.offsetParent;
1671
- return q(t) === n && (n = n.ownerDocument.body), n;
1822
+ return Z(t) === n && (n = n.ownerDocument.body), n;
1672
1823
  }
1673
- function Ve(t, e) {
1674
- const n = H(t);
1675
- if (_t(t))
1824
+ function Ke(t, e) {
1825
+ const n = $(t);
1826
+ if (Lt(t))
1676
1827
  return n;
1677
- if (!Y(t)) {
1678
- let o = G(t);
1679
- for (; o && !ct(o); ) {
1680
- if (I(o) && !Bt(o))
1828
+ if (!Q(t)) {
1829
+ let o = J(t);
1830
+ for (; o && !lt(o); ) {
1831
+ if (Y(o) && !$t(o))
1681
1832
  return o;
1682
- o = G(o);
1833
+ o = J(o);
1683
1834
  }
1684
1835
  return n;
1685
1836
  }
1686
- let r = ge(t, e);
1687
- for (; r && wr(r) && Bt(r); )
1688
- r = ge(r, e);
1689
- return r && ct(r) && Bt(r) && !Qt(r) ? n : r || Cr(t) || n;
1837
+ let r = xe(t, e);
1838
+ for (; r && Cr(r) && $t(r); )
1839
+ r = xe(r, e);
1840
+ return r && lt(r) && $t(r) && !te(r) ? n : r || Or(t) || n;
1690
1841
  }
1691
- const Br = async function(t) {
1692
- const e = this.getOffsetParent || Ve, n = this.getDimensions, r = await n(t.floating);
1842
+ const Hr = async function(t) {
1843
+ const e = this.getOffsetParent || Ke, n = this.getDimensions, r = await n(t.floating);
1693
1844
  return {
1694
- reference: Wr(t.reference, await e(t.floating), t.strategy),
1845
+ reference: Fr(t.reference, await e(t.floating), t.strategy),
1695
1846
  floating: {
1696
1847
  x: 0,
1697
1848
  y: 0,
@@ -1700,122 +1851,122 @@ const Br = async function(t) {
1700
1851
  }
1701
1852
  };
1702
1853
  };
1703
- function Fr(t) {
1704
- return V(t).direction === "rtl";
1705
- }
1706
- const Hr = {
1707
- convertOffsetParentRelativeRectToViewportRelativeRect: Or,
1708
- getDocumentElement: q,
1709
- getClippingRect: Dr,
1710
- getOffsetParent: Ve,
1711
- getElementRects: Br,
1712
- getClientRects: Mr,
1713
- getDimensions: Nr,
1714
- getScale: it,
1715
- isElement: I,
1716
- isRTL: Fr
1854
+ function $r(t) {
1855
+ return q(t).direction === "rtl";
1856
+ }
1857
+ const Ir = {
1858
+ convertOffsetParentRelativeRectToViewportRelativeRect: Pr,
1859
+ getDocumentElement: Z,
1860
+ getClippingRect: Br,
1861
+ getOffsetParent: Ke,
1862
+ getElementRects: Hr,
1863
+ getClientRects: kr,
1864
+ getDimensions: Wr,
1865
+ getScale: at,
1866
+ isElement: Y,
1867
+ isRTL: $r
1717
1868
  };
1718
- function $e(t, e) {
1869
+ function Ue(t, e) {
1719
1870
  return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
1720
1871
  }
1721
- function Ir(t, e) {
1872
+ function Vr(t, e) {
1722
1873
  let n = null, r;
1723
- const o = q(t);
1874
+ const o = Z(t);
1724
1875
  function i() {
1725
1876
  var a;
1726
1877
  clearTimeout(r), (a = n) == null || a.disconnect(), n = null;
1727
1878
  }
1728
- function c(a, l) {
1729
- a === void 0 && (a = !1), l === void 0 && (l = 1), i();
1730
- const s = t.getBoundingClientRect(), {
1879
+ function c(a, f) {
1880
+ a === void 0 && (a = !1), f === void 0 && (f = 1), i();
1881
+ const l = t.getBoundingClientRect(), {
1731
1882
  left: u,
1732
- top: f,
1883
+ top: s,
1733
1884
  width: m,
1734
1885
  height: h
1735
- } = s;
1886
+ } = l;
1736
1887
  if (a || e(), !m || !h)
1737
1888
  return;
1738
- const p = wt(f), d = wt(o.clientWidth - (u + m)), v = wt(o.clientHeight - (f + h)), g = wt(u), y = {
1739
- rootMargin: -p + "px " + -d + "px " + -v + "px " + -g + "px",
1740
- threshold: F(0, Q(1, l)) || 1
1889
+ const p = bt(s), d = bt(o.clientWidth - (u + m)), g = bt(o.clientHeight - (s + h)), v = bt(u), y = {
1890
+ rootMargin: -p + "px " + -d + "px " + -g + "px " + -v + "px",
1891
+ threshold: B(0, j(1, f)) || 1
1741
1892
  };
1742
- let x = !0;
1743
- function S(C) {
1744
- const R = C[0].intersectionRatio;
1745
- if (R !== l) {
1746
- if (!x)
1893
+ let b = !0;
1894
+ function x(R) {
1895
+ const E = R[0].intersectionRatio;
1896
+ if (E !== f) {
1897
+ if (!b)
1747
1898
  return c();
1748
- R ? c(!1, R) : r = setTimeout(() => {
1899
+ E ? c(!1, E) : r = setTimeout(() => {
1749
1900
  c(!1, 1e-7);
1750
1901
  }, 1e3);
1751
1902
  }
1752
- R === 1 && !$e(s, t.getBoundingClientRect()) && c(), x = !1;
1903
+ E === 1 && !Ue(l, t.getBoundingClientRect()) && c(), b = !1;
1753
1904
  }
1754
1905
  try {
1755
- n = new IntersectionObserver(S, {
1906
+ n = new IntersectionObserver(x, {
1756
1907
  ...y,
1757
1908
  // Handle <iframe>s
1758
1909
  root: o.ownerDocument
1759
1910
  });
1760
1911
  } catch {
1761
- n = new IntersectionObserver(S, y);
1912
+ n = new IntersectionObserver(x, y);
1762
1913
  }
1763
1914
  n.observe(t);
1764
1915
  }
1765
1916
  return c(!0), i;
1766
1917
  }
1767
- function to(t, e, n, r) {
1918
+ function no(t, e, n, r) {
1768
1919
  r === void 0 && (r = {});
1769
1920
  const {
1770
1921
  ancestorScroll: o = !0,
1771
1922
  ancestorResize: i = !0,
1772
1923
  elementResize: c = typeof ResizeObserver == "function",
1773
1924
  layoutShift: a = typeof IntersectionObserver == "function",
1774
- animationFrame: l = !1
1775
- } = r, s = Jt(t), u = o || i ? [...s ? ft(s) : [], ...ft(e)] : [];
1776
- u.forEach((g) => {
1777
- o && g.addEventListener("scroll", n, {
1925
+ animationFrame: f = !1
1926
+ } = r, l = ne(t), u = o || i ? [...l ? ht(l) : [], ...e ? ht(e) : []] : [];
1927
+ u.forEach((v) => {
1928
+ o && v.addEventListener("scroll", n, {
1778
1929
  passive: !0
1779
- }), i && g.addEventListener("resize", n);
1930
+ }), i && v.addEventListener("resize", n);
1780
1931
  });
1781
- const f = s && a ? Ir(s, n) : null;
1932
+ const s = l && a ? Vr(l, n) : null;
1782
1933
  let m = -1, h = null;
1783
- c && (h = new ResizeObserver((g) => {
1784
- let [w] = g;
1785
- w && w.target === s && h && (h.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1934
+ c && (h = new ResizeObserver((v) => {
1935
+ let [w] = v;
1936
+ w && w.target === l && h && e && (h.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
1786
1937
  var y;
1787
1938
  (y = h) == null || y.observe(e);
1788
1939
  })), n();
1789
- }), s && !l && h.observe(s), h.observe(e));
1790
- let p, d = l ? tt(t) : null;
1791
- l && v();
1792
- function v() {
1793
- const g = tt(t);
1794
- d && !$e(d, g) && n(), d = g, p = requestAnimationFrame(v);
1940
+ }), l && !f && h.observe(l), e && h.observe(e));
1941
+ let p, d = f ? nt(t) : null;
1942
+ f && g();
1943
+ function g() {
1944
+ const v = nt(t);
1945
+ d && !Ue(d, v) && n(), d = v, p = requestAnimationFrame(g);
1795
1946
  }
1796
1947
  return n(), () => {
1797
- var g;
1948
+ var v;
1798
1949
  u.forEach((w) => {
1799
1950
  o && w.removeEventListener("scroll", n), i && w.removeEventListener("resize", n);
1800
- }), f?.(), (g = h) == null || g.disconnect(), h = null, l && cancelAnimationFrame(p);
1951
+ }), s?.(), (v = h) == null || v.disconnect(), h = null, f && cancelAnimationFrame(p);
1801
1952
  };
1802
1953
  }
1803
- const Vr = dr, $r = hr, zr = lr, jr = vr, Xr = ur, pe = sr, Yr = mr, qr = (t, e, n) => {
1954
+ const zr = br, ro = mr, jr = xr, Xr = gr, Yr = Rr, qr = vr, Se = dr, oo = wr, Kr = Sr, Ur = (t, e, n) => {
1804
1955
  const r = /* @__PURE__ */ new Map(), o = {
1805
- platform: Hr,
1956
+ platform: Ir,
1806
1957
  ...n
1807
1958
  }, i = {
1808
1959
  ...o.platform,
1809
1960
  _c: r
1810
1961
  };
1811
- return ar(t, e, {
1962
+ return fr(t, e, {
1812
1963
  ...o,
1813
1964
  platform: i
1814
1965
  });
1815
1966
  };
1816
- var Kr = typeof document < "u", Zr = function() {
1817
- }, xt = Kr ? be : Zr;
1818
- function At(t, e) {
1967
+ var Zr = typeof document < "u", Qr = function() {
1968
+ }, Rt = Zr ? Ee : Qr;
1969
+ function Mt(t, e) {
1819
1970
  if (t === e)
1820
1971
  return !0;
1821
1972
  if (typeof t != typeof e)
@@ -1827,7 +1978,7 @@ function At(t, e) {
1827
1978
  if (Array.isArray(t)) {
1828
1979
  if (n = t.length, n !== e.length) return !1;
1829
1980
  for (r = n; r-- !== 0; )
1830
- if (!At(t[r], e[r]))
1981
+ if (!Mt(t[r], e[r]))
1831
1982
  return !1;
1832
1983
  return !0;
1833
1984
  }
@@ -1838,27 +1989,27 @@ function At(t, e) {
1838
1989
  return !1;
1839
1990
  for (r = n; r-- !== 0; ) {
1840
1991
  const i = o[r];
1841
- if (!(i === "_owner" && t.$$typeof) && !At(t[i], e[i]))
1992
+ if (!(i === "_owner" && t.$$typeof) && !Mt(t[i], e[i]))
1842
1993
  return !1;
1843
1994
  }
1844
1995
  return !0;
1845
1996
  }
1846
1997
  return t !== t && e !== e;
1847
1998
  }
1848
- function ze(t) {
1999
+ function Ze(t) {
1849
2000
  return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
1850
2001
  }
1851
- function we(t, e) {
1852
- const n = ze(t);
2002
+ function Re(t, e) {
2003
+ const n = Ze(t);
1853
2004
  return Math.round(e * n) / n;
1854
2005
  }
1855
- function Ft(t) {
1856
- const e = b.useRef(t);
1857
- return xt(() => {
2006
+ function It(t) {
2007
+ const e = S.useRef(t);
2008
+ return Rt(() => {
1858
2009
  e.current = t;
1859
2010
  }), e;
1860
2011
  }
1861
- function eo(t) {
2012
+ function io(t) {
1862
2013
  t === void 0 && (t = {});
1863
2014
  const {
1864
2015
  placement: e = "bottom",
@@ -1870,97 +2021,97 @@ function eo(t) {
1870
2021
  floating: c
1871
2022
  } = {},
1872
2023
  transform: a = !0,
1873
- whileElementsMounted: l,
1874
- open: s
1875
- } = t, [u, f] = b.useState({
2024
+ whileElementsMounted: f,
2025
+ open: l
2026
+ } = t, [u, s] = S.useState({
1876
2027
  x: 0,
1877
2028
  y: 0,
1878
2029
  strategy: n,
1879
2030
  placement: e,
1880
2031
  middlewareData: {},
1881
2032
  isPositioned: !1
1882
- }), [m, h] = b.useState(r);
1883
- At(m, r) || h(r);
1884
- const [p, d] = b.useState(null), [v, g] = b.useState(null), w = b.useCallback((E) => {
1885
- E !== C.current && (C.current = E, d(E));
1886
- }, []), y = b.useCallback((E) => {
1887
- E !== R.current && (R.current = E, g(E));
1888
- }, []), x = i || p, S = c || v, C = b.useRef(null), R = b.useRef(null), M = b.useRef(u), P = l != null, O = Ft(l), k = Ft(o), T = Ft(s), N = b.useCallback(() => {
1889
- if (!C.current || !R.current)
2033
+ }), [m, h] = S.useState(r);
2034
+ Mt(m, r) || h(r);
2035
+ const [p, d] = S.useState(null), [g, v] = S.useState(null), w = S.useCallback((A) => {
2036
+ A !== R.current && (R.current = A, d(A));
2037
+ }, []), y = S.useCallback((A) => {
2038
+ A !== E.current && (E.current = A, v(A));
2039
+ }, []), b = i || p, x = c || g, R = S.useRef(null), E = S.useRef(null), k = S.useRef(u), _ = f != null, C = It(f), O = It(o), P = It(l), L = S.useCallback(() => {
2040
+ if (!R.current || !E.current)
1890
2041
  return;
1891
- const E = {
2042
+ const A = {
1892
2043
  placement: e,
1893
2044
  strategy: n,
1894
2045
  middleware: m
1895
2046
  };
1896
- k.current && (E.platform = k.current), qr(C.current, R.current, E).then((B) => {
1897
- const U = {
1898
- ...B,
2047
+ O.current && (A.platform = O.current), Ur(R.current, E.current, A).then((H) => {
2048
+ const G = {
2049
+ ...H,
1899
2050
  // The floating element's position may be recomputed while it's closed
1900
2051
  // but still mounted (such as when transitioning out). To ensure
1901
2052
  // `isPositioned` will be `false` initially on the next open, avoid
1902
2053
  // setting it to `true` when `open === false` (must be specified).
1903
- isPositioned: T.current !== !1
2054
+ isPositioned: P.current !== !1
1904
2055
  };
1905
- A.current && !At(M.current, U) && (M.current = U, Ye.flushSync(() => {
1906
- f(U);
2056
+ M.current && !Mt(k.current, G) && (k.current = G, Je.flushSync(() => {
2057
+ s(G);
1907
2058
  }));
1908
2059
  });
1909
- }, [m, e, n, k, T]);
1910
- xt(() => {
1911
- s === !1 && M.current.isPositioned && (M.current.isPositioned = !1, f((E) => ({
1912
- ...E,
2060
+ }, [m, e, n, O, P]);
2061
+ Rt(() => {
2062
+ l === !1 && k.current.isPositioned && (k.current.isPositioned = !1, s((A) => ({
2063
+ ...A,
1913
2064
  isPositioned: !1
1914
2065
  })));
1915
- }, [s]);
1916
- const A = b.useRef(!1);
1917
- xt(() => (A.current = !0, () => {
1918
- A.current = !1;
1919
- }), []), xt(() => {
1920
- if (x && (C.current = x), S && (R.current = S), x && S) {
1921
- if (O.current)
1922
- return O.current(x, S, N);
1923
- N();
2066
+ }, [l]);
2067
+ const M = S.useRef(!1);
2068
+ Rt(() => (M.current = !0, () => {
2069
+ M.current = !1;
2070
+ }), []), Rt(() => {
2071
+ if (b && (R.current = b), x && (E.current = x), b && x) {
2072
+ if (C.current)
2073
+ return C.current(b, x, L);
2074
+ L();
1924
2075
  }
1925
- }, [x, S, N, O, P]);
1926
- const $ = b.useMemo(() => ({
1927
- reference: C,
1928
- floating: R,
2076
+ }, [b, x, L, C, _]);
2077
+ const F = S.useMemo(() => ({
2078
+ reference: R,
2079
+ floating: E,
1929
2080
  setReference: w,
1930
2081
  setFloating: y
1931
- }), [w, y]), _ = b.useMemo(() => ({
1932
- reference: x,
1933
- floating: S
1934
- }), [x, S]), W = b.useMemo(() => {
1935
- const E = {
2082
+ }), [w, y]), T = S.useMemo(() => ({
2083
+ reference: b,
2084
+ floating: x
2085
+ }), [b, x]), N = S.useMemo(() => {
2086
+ const A = {
1936
2087
  position: n,
1937
2088
  left: 0,
1938
2089
  top: 0
1939
2090
  };
1940
- if (!_.floating)
1941
- return E;
1942
- const B = we(_.floating, u.x), U = we(_.floating, u.y);
2091
+ if (!T.floating)
2092
+ return A;
2093
+ const H = Re(T.floating, u.x), G = Re(T.floating, u.y);
1943
2094
  return a ? {
1944
- ...E,
1945
- transform: "translate(" + B + "px, " + U + "px)",
1946
- ...ze(_.floating) >= 1.5 && {
2095
+ ...A,
2096
+ transform: "translate(" + H + "px, " + G + "px)",
2097
+ ...Ze(T.floating) >= 1.5 && {
1947
2098
  willChange: "transform"
1948
2099
  }
1949
2100
  } : {
1950
2101
  position: n,
1951
- left: B,
1952
- top: U
2102
+ left: H,
2103
+ top: G
1953
2104
  };
1954
- }, [n, a, _.floating, u.x, u.y]);
1955
- return b.useMemo(() => ({
2105
+ }, [n, a, T.floating, u.x, u.y]);
2106
+ return S.useMemo(() => ({
1956
2107
  ...u,
1957
- update: N,
1958
- refs: $,
1959
- elements: _,
1960
- floatingStyles: W
1961
- }), [u, N, $, _, W]);
2108
+ update: L,
2109
+ refs: F,
2110
+ elements: T,
2111
+ floatingStyles: N
2112
+ }), [u, L, F, T, N]);
1962
2113
  }
1963
- const Ur = (t) => {
2114
+ const Gr = (t) => {
1964
2115
  function e(n) {
1965
2116
  return {}.hasOwnProperty.call(n, "current");
1966
2117
  }
@@ -1972,48 +2123,81 @@ const Ur = (t) => {
1972
2123
  element: r,
1973
2124
  padding: o
1974
2125
  } = typeof t == "function" ? t(n) : t;
1975
- return r && e(r) ? r.current != null ? pe({
2126
+ return r && e(r) ? r.current != null ? Se({
1976
2127
  element: r.current,
1977
2128
  padding: o
1978
- }).fn(n) : {} : r ? pe({
2129
+ }).fn(n) : {} : r ? Se({
1979
2130
  element: r,
1980
2131
  padding: o
1981
2132
  }).fn(n) : {};
1982
2133
  }
1983
2134
  };
1984
- }, no = (t, e) => ({
1985
- ...Vr(t),
1986
- options: [t, e]
1987
- }), ro = (t, e) => ({
1988
- ...$r(t),
1989
- options: [t, e]
1990
- }), oo = (t, e) => ({
1991
- ...Yr(t),
1992
- options: [t, e]
1993
- }), io = (t, e) => ({
1994
- ...zr(t),
1995
- options: [t, e]
1996
- }), co = (t, e) => ({
1997
- ...jr(t),
1998
- options: [t, e]
1999
- }), ao = (t, e) => ({
2000
- ...Xr(t),
2001
- options: [t, e]
2002
- }), so = (t, e) => ({
2003
- ...Ur(t),
2135
+ }, co = (t, e) => {
2136
+ const n = zr(t);
2137
+ return {
2138
+ name: n.name,
2139
+ fn: n.fn,
2140
+ options: [t, e]
2141
+ };
2142
+ }, ao = (t, e) => {
2143
+ const n = jr(t);
2144
+ return {
2145
+ name: n.name,
2146
+ fn: n.fn,
2147
+ options: [t, e]
2148
+ };
2149
+ }, so = (t, e) => ({
2150
+ fn: Kr(t).fn,
2004
2151
  options: [t, e]
2005
- });
2152
+ }), lo = (t, e) => {
2153
+ const n = Xr(t);
2154
+ return {
2155
+ name: n.name,
2156
+ fn: n.fn,
2157
+ options: [t, e]
2158
+ };
2159
+ }, uo = (t, e) => {
2160
+ const n = Yr(t);
2161
+ return {
2162
+ name: n.name,
2163
+ fn: n.fn,
2164
+ options: [t, e]
2165
+ };
2166
+ }, fo = (t, e) => {
2167
+ const n = qr(t);
2168
+ return {
2169
+ name: n.name,
2170
+ fn: n.fn,
2171
+ options: [t, e]
2172
+ };
2173
+ }, ho = (t, e) => {
2174
+ const n = Gr(t);
2175
+ return {
2176
+ name: n.name,
2177
+ fn: n.fn,
2178
+ options: [t, e]
2179
+ };
2180
+ };
2006
2181
  export {
2007
- _n as R,
2008
- Jr as Z,
2009
- co as a,
2010
- so as b,
2011
- ao as c,
2012
- to as d,
2013
- io as f,
2014
- Gr as h,
2015
- oo as l,
2016
- no as o,
2017
- ro as s,
2018
- eo as u
2182
+ Wn as R,
2183
+ eo as Z,
2184
+ uo as a,
2185
+ ho as b,
2186
+ fo as c,
2187
+ no as d,
2188
+ Xr as e,
2189
+ lo as f,
2190
+ jr as g,
2191
+ to as h,
2192
+ zr as i,
2193
+ Se as j,
2194
+ Yr as k,
2195
+ so as l,
2196
+ ro as m,
2197
+ qr as n,
2198
+ co as o,
2199
+ oo as p,
2200
+ Ur as q,
2201
+ ao as s,
2202
+ io as u
2019
2203
  };