@devalok/shilp-sutra 0.32.0 → 0.33.0

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