@devalok/shilp-sutra 0.26.0 → 0.27.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.
- package/dist/_chunks/framer.js +4824 -805
- package/dist/_chunks/sonner.js +747 -0
- package/dist/_chunks/tiptap.js +3949 -2969
- package/dist/_chunks/vendor-client.js +1070 -1792
- package/dist/_chunks/vendor-utils.js +2946 -88058
- package/dist/composed/avatar-group.js +1 -1
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/file-preview.js +54 -54
- package/dist/composed/markdown-viewer.js +38 -38
- package/dist/composed/priority-indicator.js +1 -1
- package/dist/composed/status-badge.js +1 -1
- package/dist/tailwind/index.cjs +37 -3
- package/dist/tailwind/preset.js +1 -1
- package/dist/ui/alert.js +1 -1
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/badge.js +1 -1
- package/dist/ui/banner.js +4 -4
- package/dist/ui/button.js +7 -7
- package/dist/ui/card.js +1 -1
- package/dist/ui/chip.js +1 -1
- package/dist/ui/input.js +1 -1
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/progress.js +12 -12
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/select.js +1 -1
- package/dist/ui/sheet.js +6 -6
- package/dist/ui/sidebar.js +15 -15
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/tabs.js +18 -18
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/toast.js +1 -1
- package/dist/ui/toaster.js +1 -1
- package/dist/ui/toggle.js +4 -4
- package/llms-full.txt +1 -1
- package/llms.txt +16 -0
- package/package.json +14 -2
|
@@ -1,15 +1,35 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
2
|
+
import * as w from "react";
|
|
3
|
+
import { useState as Se, useLayoutEffect as Ce } from "react";
|
|
4
|
+
import * as Re from "react-dom";
|
|
5
|
+
var I = function() {
|
|
6
|
+
return I = Object.assign || function(e) {
|
|
7
|
+
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
8
|
+
n = arguments[r];
|
|
9
|
+
for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
|
|
10
|
+
}
|
|
11
|
+
return e;
|
|
12
|
+
}, I.apply(this, arguments);
|
|
13
|
+
};
|
|
14
|
+
function re(t, e) {
|
|
15
|
+
var n = {};
|
|
16
|
+
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
|
|
17
|
+
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
18
|
+
for (var o = 0, r = Object.getOwnPropertySymbols(t); o < r.length; o++)
|
|
19
|
+
e.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[o]) && (n[r[o]] = t[r[o]]);
|
|
20
|
+
return n;
|
|
21
|
+
}
|
|
22
|
+
function Ae(t, e, n) {
|
|
23
|
+
if (n || arguments.length === 2) for (var r = 0, o = e.length, i; r < o; r++)
|
|
24
|
+
(i || !(r in e)) && (i || (i = Array.prototype.slice.call(e, 0, r)), i[r] = e[r]);
|
|
25
|
+
return t.concat(i || Array.prototype.slice.call(e));
|
|
26
|
+
}
|
|
27
|
+
var ht = "right-scroll-bar-position", mt = "width-before-scroll-bar", Ee = "with-scroll-bars-hidden", Oe = "--removed-body-scroll-bar-size";
|
|
28
|
+
function At(t, e) {
|
|
9
29
|
return typeof t == "function" ? t(e) : t && (t.current = e), t;
|
|
10
30
|
}
|
|
11
|
-
function
|
|
12
|
-
var n =
|
|
31
|
+
function Pe(t, e) {
|
|
32
|
+
var n = Se(function() {
|
|
13
33
|
return {
|
|
14
34
|
// value
|
|
15
35
|
value: t,
|
|
@@ -20,62 +40,62 @@ function Hn(t, e) {
|
|
|
20
40
|
get current() {
|
|
21
41
|
return n.value;
|
|
22
42
|
},
|
|
23
|
-
set current(
|
|
24
|
-
var
|
|
25
|
-
|
|
43
|
+
set current(r) {
|
|
44
|
+
var o = n.value;
|
|
45
|
+
o !== r && (n.value = r, n.callback(r, o));
|
|
26
46
|
}
|
|
27
47
|
}
|
|
28
48
|
};
|
|
29
49
|
})[0];
|
|
30
50
|
return n.callback = e, n.facade;
|
|
31
51
|
}
|
|
32
|
-
var
|
|
33
|
-
function
|
|
34
|
-
var n =
|
|
35
|
-
return t.forEach(function(
|
|
36
|
-
return
|
|
52
|
+
var Me = typeof window < "u" ? w.useLayoutEffect : w.useEffect, It = /* @__PURE__ */ new WeakMap();
|
|
53
|
+
function ke(t, e) {
|
|
54
|
+
var n = Pe(null, function(r) {
|
|
55
|
+
return t.forEach(function(o) {
|
|
56
|
+
return At(o, r);
|
|
37
57
|
});
|
|
38
58
|
});
|
|
39
|
-
return
|
|
40
|
-
var
|
|
41
|
-
if (
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
i.has(
|
|
45
|
-
}), i.forEach(function(
|
|
46
|
-
|
|
59
|
+
return Me(function() {
|
|
60
|
+
var r = It.get(n);
|
|
61
|
+
if (r) {
|
|
62
|
+
var o = new Set(r), i = new Set(t), c = n.current;
|
|
63
|
+
o.forEach(function(s) {
|
|
64
|
+
i.has(s) || At(s, null);
|
|
65
|
+
}), i.forEach(function(s) {
|
|
66
|
+
o.has(s) || At(s, c);
|
|
47
67
|
});
|
|
48
68
|
}
|
|
49
|
-
|
|
69
|
+
It.set(n, t);
|
|
50
70
|
}, [t]), n;
|
|
51
71
|
}
|
|
52
|
-
function
|
|
72
|
+
function Le(t) {
|
|
53
73
|
return t;
|
|
54
74
|
}
|
|
55
|
-
function
|
|
56
|
-
e === void 0 && (e =
|
|
57
|
-
var n = [],
|
|
75
|
+
function Te(t, e) {
|
|
76
|
+
e === void 0 && (e = Le);
|
|
77
|
+
var n = [], r = !1, o = {
|
|
58
78
|
read: function() {
|
|
59
|
-
if (
|
|
79
|
+
if (r)
|
|
60
80
|
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
61
81
|
return n.length ? n[n.length - 1] : t;
|
|
62
82
|
},
|
|
63
83
|
useMedium: function(i) {
|
|
64
|
-
var
|
|
65
|
-
return n.push(
|
|
66
|
-
n = n.filter(function(
|
|
67
|
-
return
|
|
84
|
+
var c = e(i, r);
|
|
85
|
+
return n.push(c), function() {
|
|
86
|
+
n = n.filter(function(s) {
|
|
87
|
+
return s !== c;
|
|
68
88
|
});
|
|
69
89
|
};
|
|
70
90
|
},
|
|
71
91
|
assignSyncMedium: function(i) {
|
|
72
|
-
for (
|
|
73
|
-
var
|
|
74
|
-
n = [],
|
|
92
|
+
for (r = !0; n.length; ) {
|
|
93
|
+
var c = n;
|
|
94
|
+
n = [], c.forEach(i);
|
|
75
95
|
}
|
|
76
96
|
n = {
|
|
77
|
-
push: function(
|
|
78
|
-
return i(
|
|
97
|
+
push: function(s) {
|
|
98
|
+
return i(s);
|
|
79
99
|
},
|
|
80
100
|
filter: function() {
|
|
81
101
|
return n;
|
|
@@ -83,501 +103,501 @@ function zn(t, e) {
|
|
|
83
103
|
};
|
|
84
104
|
},
|
|
85
105
|
assignMedium: function(i) {
|
|
86
|
-
|
|
87
|
-
var
|
|
106
|
+
r = !0;
|
|
107
|
+
var c = [];
|
|
88
108
|
if (n.length) {
|
|
89
|
-
var
|
|
90
|
-
n = [],
|
|
109
|
+
var s = n;
|
|
110
|
+
n = [], s.forEach(i), c = n;
|
|
91
111
|
}
|
|
92
|
-
var
|
|
93
|
-
var
|
|
94
|
-
|
|
95
|
-
},
|
|
96
|
-
return Promise.resolve().then(
|
|
112
|
+
var u = function() {
|
|
113
|
+
var l = c;
|
|
114
|
+
c = [], l.forEach(i);
|
|
115
|
+
}, f = function() {
|
|
116
|
+
return Promise.resolve().then(u);
|
|
97
117
|
};
|
|
98
|
-
|
|
99
|
-
push: function(
|
|
100
|
-
|
|
118
|
+
f(), n = {
|
|
119
|
+
push: function(l) {
|
|
120
|
+
c.push(l), f();
|
|
101
121
|
},
|
|
102
|
-
filter: function(
|
|
103
|
-
return
|
|
122
|
+
filter: function(l) {
|
|
123
|
+
return c = c.filter(l), n;
|
|
104
124
|
}
|
|
105
125
|
};
|
|
106
126
|
}
|
|
107
127
|
};
|
|
108
|
-
return
|
|
128
|
+
return o;
|
|
109
129
|
}
|
|
110
|
-
function
|
|
130
|
+
function De(t) {
|
|
111
131
|
t === void 0 && (t = {});
|
|
112
|
-
var e =
|
|
113
|
-
return e.options =
|
|
132
|
+
var e = Te(null);
|
|
133
|
+
return e.options = I({ async: !0, ssr: !1 }, t), e;
|
|
114
134
|
}
|
|
115
|
-
var
|
|
116
|
-
var e = t.sideCar, n =
|
|
135
|
+
var oe = function(t) {
|
|
136
|
+
var e = t.sideCar, n = re(t, ["sideCar"]);
|
|
117
137
|
if (!e)
|
|
118
138
|
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
119
|
-
var
|
|
120
|
-
if (!
|
|
139
|
+
var r = e.read();
|
|
140
|
+
if (!r)
|
|
121
141
|
throw new Error("Sidecar medium not found");
|
|
122
|
-
return
|
|
142
|
+
return w.createElement(r, I({}, n));
|
|
123
143
|
};
|
|
124
|
-
|
|
125
|
-
function
|
|
126
|
-
return t.useMedium(e),
|
|
127
|
-
}
|
|
128
|
-
var
|
|
129
|
-
},
|
|
130
|
-
var n =
|
|
131
|
-
onScrollCapture:
|
|
132
|
-
onWheelCapture:
|
|
133
|
-
onTouchMoveCapture:
|
|
134
|
-
}),
|
|
135
|
-
return
|
|
136
|
-
|
|
144
|
+
oe.isSideCarExport = !0;
|
|
145
|
+
function We(t, e) {
|
|
146
|
+
return t.useMedium(e), oe;
|
|
147
|
+
}
|
|
148
|
+
var ie = De(), Et = function() {
|
|
149
|
+
}, xt = w.forwardRef(function(t, e) {
|
|
150
|
+
var n = w.useRef(null), r = w.useState({
|
|
151
|
+
onScrollCapture: Et,
|
|
152
|
+
onWheelCapture: Et,
|
|
153
|
+
onTouchMoveCapture: Et
|
|
154
|
+
}), o = r[0], i = r[1], c = t.forwardProps, s = t.children, u = t.className, f = t.removeScrollBar, l = t.enabled, a = t.shards, m = t.sideCar, h = t.noRelative, v = t.noIsolation, d = t.inert, g = t.allowPinchZoom, p = t.as, y = p === void 0 ? "div" : p, x = t.gapMode, b = re(t, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), S = m, C = ke([n, e]), R = I(I({}, b), o);
|
|
155
|
+
return w.createElement(
|
|
156
|
+
w.Fragment,
|
|
137
157
|
null,
|
|
138
|
-
|
|
139
|
-
|
|
158
|
+
l && w.createElement(S, { sideCar: ie, removeScrollBar: f, shards: a, noRelative: h, noIsolation: v, inert: d, setCallbacks: i, allowPinchZoom: !!g, lockRef: n, gapMode: x }),
|
|
159
|
+
c ? w.cloneElement(w.Children.only(s), I(I({}, R), { ref: C })) : w.createElement(y, I({}, R, { className: u, ref: C }), s)
|
|
140
160
|
);
|
|
141
161
|
});
|
|
142
|
-
|
|
162
|
+
xt.defaultProps = {
|
|
143
163
|
enabled: !0,
|
|
144
164
|
removeScrollBar: !0,
|
|
145
165
|
inert: !1
|
|
146
166
|
};
|
|
147
|
-
|
|
148
|
-
fullWidth:
|
|
149
|
-
zeroRight:
|
|
167
|
+
xt.classNames = {
|
|
168
|
+
fullWidth: mt,
|
|
169
|
+
zeroRight: ht
|
|
150
170
|
};
|
|
151
|
-
var
|
|
171
|
+
var Ne = function() {
|
|
152
172
|
if (typeof __webpack_nonce__ < "u")
|
|
153
173
|
return __webpack_nonce__;
|
|
154
174
|
};
|
|
155
|
-
function
|
|
175
|
+
function Be() {
|
|
156
176
|
if (typeof document === "undefined")
|
|
157
177
|
return null;
|
|
158
178
|
var t = document.createElement("style");
|
|
159
179
|
t.type = "text/css";
|
|
160
|
-
var e =
|
|
180
|
+
var e = Ne();
|
|
161
181
|
return e && t.setAttribute("nonce", e), t;
|
|
162
182
|
}
|
|
163
|
-
function
|
|
183
|
+
function Fe(t, e) {
|
|
164
184
|
t.styleSheet ? t.styleSheet.cssText = e : t.appendChild(document.createTextNode(e));
|
|
165
185
|
}
|
|
166
|
-
function
|
|
186
|
+
function Ve(t) {
|
|
167
187
|
var e = document.head || document.getElementsByTagName("head")[0];
|
|
168
188
|
e.appendChild(t);
|
|
169
189
|
}
|
|
170
|
-
var
|
|
190
|
+
var He = function() {
|
|
171
191
|
var t = 0, e = null;
|
|
172
192
|
return {
|
|
173
193
|
add: function(n) {
|
|
174
|
-
t == 0 && (e =
|
|
194
|
+
t == 0 && (e = Be()) && (Fe(e, n), Ve(e)), t++;
|
|
175
195
|
},
|
|
176
196
|
remove: function() {
|
|
177
197
|
t--, !t && e && (e.parentNode && e.parentNode.removeChild(e), e = null);
|
|
178
198
|
}
|
|
179
199
|
};
|
|
180
|
-
},
|
|
181
|
-
var t =
|
|
200
|
+
}, $e = function() {
|
|
201
|
+
var t = He();
|
|
182
202
|
return function(e, n) {
|
|
183
|
-
|
|
203
|
+
w.useEffect(function() {
|
|
184
204
|
return t.add(e), function() {
|
|
185
205
|
t.remove();
|
|
186
206
|
};
|
|
187
207
|
}, [e && n]);
|
|
188
208
|
};
|
|
189
|
-
},
|
|
190
|
-
var t =
|
|
191
|
-
var
|
|
192
|
-
return t(
|
|
209
|
+
}, ce = function() {
|
|
210
|
+
var t = $e(), e = function(n) {
|
|
211
|
+
var r = n.styles, o = n.dynamic;
|
|
212
|
+
return t(r, o), null;
|
|
193
213
|
};
|
|
194
214
|
return e;
|
|
195
|
-
},
|
|
215
|
+
}, Ie = {
|
|
196
216
|
left: 0,
|
|
197
217
|
top: 0,
|
|
198
218
|
right: 0,
|
|
199
219
|
gap: 0
|
|
200
|
-
},
|
|
220
|
+
}, Ot = function(t) {
|
|
201
221
|
return parseInt(t || "", 10) || 0;
|
|
202
|
-
},
|
|
203
|
-
var e = window.getComputedStyle(document.body), n = e[t === "padding" ? "paddingLeft" : "marginLeft"],
|
|
204
|
-
return [
|
|
205
|
-
},
|
|
222
|
+
}, _e = function(t) {
|
|
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 [Ot(n), Ot(r), Ot(o)];
|
|
225
|
+
}, ze = function(t) {
|
|
206
226
|
if (t === void 0 && (t = "margin"), typeof window > "u")
|
|
207
|
-
return
|
|
208
|
-
var e =
|
|
227
|
+
return Ie;
|
|
228
|
+
var e = _e(t), n = document.documentElement.clientWidth, r = window.innerWidth;
|
|
209
229
|
return {
|
|
210
230
|
left: e[0],
|
|
211
231
|
top: e[1],
|
|
212
232
|
right: e[2],
|
|
213
|
-
gap: Math.max(0,
|
|
233
|
+
gap: Math.max(0, r - n + e[2] - e[0])
|
|
214
234
|
};
|
|
215
|
-
},
|
|
216
|
-
var
|
|
235
|
+
}, je = ce(), et = "data-scroll-locked", Xe = function(t, e, n, r) {
|
|
236
|
+
var o = t.left, i = t.top, c = t.right, s = t.gap;
|
|
217
237
|
return n === void 0 && (n = "margin"), `
|
|
218
|
-
.`.concat(
|
|
219
|
-
overflow: hidden `).concat(
|
|
220
|
-
padding-right: `).concat(
|
|
238
|
+
.`.concat(Ee, ` {
|
|
239
|
+
overflow: hidden `).concat(r, `;
|
|
240
|
+
padding-right: `).concat(s, "px ").concat(r, `;
|
|
221
241
|
}
|
|
222
|
-
body[`).concat(
|
|
223
|
-
overflow: hidden `).concat(
|
|
242
|
+
body[`).concat(et, `] {
|
|
243
|
+
overflow: hidden `).concat(r, `;
|
|
224
244
|
overscroll-behavior: contain;
|
|
225
245
|
`).concat([
|
|
226
|
-
e && "position: relative ".concat(
|
|
246
|
+
e && "position: relative ".concat(r, ";"),
|
|
227
247
|
n === "margin" && `
|
|
228
|
-
padding-left: `.concat(
|
|
248
|
+
padding-left: `.concat(o, `px;
|
|
229
249
|
padding-top: `).concat(i, `px;
|
|
230
|
-
padding-right: `).concat(
|
|
250
|
+
padding-right: `).concat(c, `px;
|
|
231
251
|
margin-left:0;
|
|
232
252
|
margin-top:0;
|
|
233
|
-
margin-right: `).concat(
|
|
253
|
+
margin-right: `).concat(s, "px ").concat(r, `;
|
|
234
254
|
`),
|
|
235
|
-
n === "padding" && "padding-right: ".concat(
|
|
255
|
+
n === "padding" && "padding-right: ".concat(s, "px ").concat(r, ";")
|
|
236
256
|
].filter(Boolean).join(""), `
|
|
237
257
|
}
|
|
238
258
|
|
|
239
|
-
.`).concat(
|
|
240
|
-
right: `).concat(
|
|
259
|
+
.`).concat(ht, ` {
|
|
260
|
+
right: `).concat(s, "px ").concat(r, `;
|
|
241
261
|
}
|
|
242
262
|
|
|
243
|
-
.`).concat(
|
|
244
|
-
margin-right: `).concat(
|
|
263
|
+
.`).concat(mt, ` {
|
|
264
|
+
margin-right: `).concat(s, "px ").concat(r, `;
|
|
245
265
|
}
|
|
246
266
|
|
|
247
|
-
.`).concat(
|
|
248
|
-
right: 0 `).concat(
|
|
267
|
+
.`).concat(ht, " .").concat(ht, ` {
|
|
268
|
+
right: 0 `).concat(r, `;
|
|
249
269
|
}
|
|
250
270
|
|
|
251
|
-
.`).concat(
|
|
252
|
-
margin-right: 0 `).concat(
|
|
271
|
+
.`).concat(mt, " .").concat(mt, ` {
|
|
272
|
+
margin-right: 0 `).concat(r, `;
|
|
253
273
|
}
|
|
254
274
|
|
|
255
|
-
body[`).concat(
|
|
256
|
-
`).concat(
|
|
275
|
+
body[`).concat(et, `] {
|
|
276
|
+
`).concat(Oe, ": ").concat(s, `px;
|
|
257
277
|
}
|
|
258
278
|
`);
|
|
259
|
-
},
|
|
260
|
-
var t = parseInt(document.body.getAttribute(
|
|
279
|
+
}, _t = function() {
|
|
280
|
+
var t = parseInt(document.body.getAttribute(et) || "0", 10);
|
|
261
281
|
return isFinite(t) ? t : 0;
|
|
262
|
-
},
|
|
263
|
-
|
|
264
|
-
return document.body.setAttribute(
|
|
265
|
-
var t =
|
|
266
|
-
t <= 0 ? document.body.removeAttribute(
|
|
282
|
+
}, Ye = function() {
|
|
283
|
+
w.useEffect(function() {
|
|
284
|
+
return document.body.setAttribute(et, (_t() + 1).toString()), function() {
|
|
285
|
+
var t = _t() - 1;
|
|
286
|
+
t <= 0 ? document.body.removeAttribute(et) : document.body.setAttribute(et, t.toString());
|
|
267
287
|
};
|
|
268
288
|
}, []);
|
|
269
|
-
},
|
|
270
|
-
var e = t.noRelative, n = t.noImportant,
|
|
271
|
-
|
|
272
|
-
var i =
|
|
273
|
-
return
|
|
274
|
-
}, [
|
|
275
|
-
return
|
|
276
|
-
},
|
|
289
|
+
}, qe = function(t) {
|
|
290
|
+
var e = t.noRelative, n = t.noImportant, r = t.gapMode, o = r === void 0 ? "margin" : r;
|
|
291
|
+
Ye();
|
|
292
|
+
var i = w.useMemo(function() {
|
|
293
|
+
return ze(o);
|
|
294
|
+
}, [o]);
|
|
295
|
+
return w.createElement(je, { styles: Xe(i, !e, o, n ? "" : "!important") });
|
|
296
|
+
}, Lt = !1;
|
|
277
297
|
if (typeof window < "u")
|
|
278
298
|
try {
|
|
279
|
-
var
|
|
299
|
+
var at = Object.defineProperty({}, "passive", {
|
|
280
300
|
get: function() {
|
|
281
|
-
return
|
|
301
|
+
return Lt = !0, !0;
|
|
282
302
|
}
|
|
283
303
|
});
|
|
284
|
-
window.addEventListener("test",
|
|
304
|
+
window.addEventListener("test", at, at), window.removeEventListener("test", at, at);
|
|
285
305
|
} catch {
|
|
286
|
-
|
|
306
|
+
Lt = !1;
|
|
287
307
|
}
|
|
288
|
-
var
|
|
308
|
+
var Q = Lt ? { passive: !1 } : !1, Ze = function(t) {
|
|
289
309
|
return t.tagName === "TEXTAREA";
|
|
290
|
-
},
|
|
310
|
+
}, se = function(t, e) {
|
|
291
311
|
if (!(t instanceof Element))
|
|
292
312
|
return !1;
|
|
293
313
|
var n = window.getComputedStyle(t);
|
|
294
314
|
return (
|
|
295
315
|
// not-not-scrollable
|
|
296
316
|
n[e] !== "hidden" && // contains scroll inside self
|
|
297
|
-
!(n.overflowY === n.overflowX && !
|
|
317
|
+
!(n.overflowY === n.overflowX && !Ze(t) && n[e] === "visible")
|
|
298
318
|
);
|
|
299
|
-
},
|
|
300
|
-
return
|
|
301
|
-
},
|
|
302
|
-
return
|
|
303
|
-
},
|
|
304
|
-
var n = e.ownerDocument,
|
|
319
|
+
}, Ue = function(t) {
|
|
320
|
+
return se(t, "overflowY");
|
|
321
|
+
}, Ge = function(t) {
|
|
322
|
+
return se(t, "overflowX");
|
|
323
|
+
}, zt = function(t, e) {
|
|
324
|
+
var n = e.ownerDocument, r = e;
|
|
305
325
|
do {
|
|
306
|
-
typeof ShadowRoot < "u" &&
|
|
307
|
-
var
|
|
308
|
-
if (
|
|
309
|
-
var i =
|
|
310
|
-
if (
|
|
326
|
+
typeof ShadowRoot < "u" && r instanceof ShadowRoot && (r = r.host);
|
|
327
|
+
var o = ae(t, r);
|
|
328
|
+
if (o) {
|
|
329
|
+
var i = le(t, r), c = i[1], s = i[2];
|
|
330
|
+
if (c > s)
|
|
311
331
|
return !0;
|
|
312
332
|
}
|
|
313
|
-
|
|
314
|
-
} while (
|
|
333
|
+
r = r.parentNode;
|
|
334
|
+
} while (r && r !== n.body);
|
|
315
335
|
return !1;
|
|
316
|
-
},
|
|
317
|
-
var e = t.scrollTop, n = t.scrollHeight,
|
|
336
|
+
}, Ke = function(t) {
|
|
337
|
+
var e = t.scrollTop, n = t.scrollHeight, r = t.clientHeight;
|
|
318
338
|
return [
|
|
319
339
|
e,
|
|
320
340
|
n,
|
|
321
|
-
|
|
341
|
+
r
|
|
322
342
|
];
|
|
323
|
-
},
|
|
324
|
-
var e = t.scrollLeft, n = t.scrollWidth,
|
|
343
|
+
}, Qe = function(t) {
|
|
344
|
+
var e = t.scrollLeft, n = t.scrollWidth, r = t.clientWidth;
|
|
325
345
|
return [
|
|
326
346
|
e,
|
|
327
347
|
n,
|
|
328
|
-
|
|
348
|
+
r
|
|
329
349
|
];
|
|
330
|
-
},
|
|
331
|
-
return t === "v" ?
|
|
332
|
-
},
|
|
333
|
-
return t === "v" ?
|
|
334
|
-
},
|
|
350
|
+
}, ae = function(t, e) {
|
|
351
|
+
return t === "v" ? Ue(e) : Ge(e);
|
|
352
|
+
}, le = function(t, e) {
|
|
353
|
+
return t === "v" ? Ke(e) : Qe(e);
|
|
354
|
+
}, Je = function(t, e) {
|
|
335
355
|
return t === "h" && e === "rtl" ? -1 : 1;
|
|
336
|
-
},
|
|
337
|
-
var i =
|
|
356
|
+
}, tn = function(t, e, n, r, o) {
|
|
357
|
+
var i = Je(t, window.getComputedStyle(e).direction), c = i * r, s = n.target, u = e.contains(s), f = !1, l = c > 0, a = 0, m = 0;
|
|
338
358
|
do {
|
|
339
|
-
if (!
|
|
359
|
+
if (!s)
|
|
340
360
|
break;
|
|
341
|
-
var
|
|
342
|
-
(
|
|
343
|
-
var
|
|
344
|
-
|
|
361
|
+
var h = le(t, s), v = h[0], d = h[1], g = h[2], p = d - g - i * v;
|
|
362
|
+
(v || p) && ae(t, s) && (a += p, m += v);
|
|
363
|
+
var y = s.parentNode;
|
|
364
|
+
s = y && y.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? y.host : y;
|
|
345
365
|
} while (
|
|
346
366
|
// portaled content
|
|
347
|
-
!
|
|
348
|
-
|
|
367
|
+
!u && s !== document.body || // self content
|
|
368
|
+
u && (e.contains(s) || e === s)
|
|
349
369
|
);
|
|
350
|
-
return (
|
|
351
|
-
},
|
|
370
|
+
return (l && Math.abs(a) < 1 || !l && Math.abs(m) < 1) && (f = !0), f;
|
|
371
|
+
}, lt = function(t) {
|
|
352
372
|
return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
|
|
353
|
-
},
|
|
373
|
+
}, jt = function(t) {
|
|
354
374
|
return [t.deltaX, t.deltaY];
|
|
355
|
-
},
|
|
375
|
+
}, Xt = function(t) {
|
|
356
376
|
return t && "current" in t ? t.current : t;
|
|
357
|
-
},
|
|
377
|
+
}, en = function(t, e) {
|
|
358
378
|
return t[0] === e[0] && t[1] === e[1];
|
|
359
|
-
},
|
|
379
|
+
}, nn = function(t) {
|
|
360
380
|
return `
|
|
361
381
|
.block-interactivity-`.concat(t, ` {pointer-events: none;}
|
|
362
382
|
.allow-interactivity-`).concat(t, ` {pointer-events: all;}
|
|
363
383
|
`);
|
|
364
|
-
},
|
|
365
|
-
function
|
|
366
|
-
var e =
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
}, [t]),
|
|
384
|
+
}, rn = 0, J = [];
|
|
385
|
+
function on(t) {
|
|
386
|
+
var e = w.useRef([]), n = w.useRef([0, 0]), r = w.useRef(), o = w.useState(rn++)[0], i = w.useState(ce)[0], c = w.useRef(t);
|
|
387
|
+
w.useEffect(function() {
|
|
388
|
+
c.current = t;
|
|
389
|
+
}, [t]), w.useEffect(function() {
|
|
370
390
|
if (t.inert) {
|
|
371
|
-
document.body.classList.add("block-interactivity-".concat(
|
|
372
|
-
var
|
|
373
|
-
return
|
|
374
|
-
return
|
|
391
|
+
document.body.classList.add("block-interactivity-".concat(o));
|
|
392
|
+
var d = Ae([t.lockRef.current], (t.shards || []).map(Xt), !0).filter(Boolean);
|
|
393
|
+
return d.forEach(function(g) {
|
|
394
|
+
return g.classList.add("allow-interactivity-".concat(o));
|
|
375
395
|
}), function() {
|
|
376
|
-
document.body.classList.remove("block-interactivity-".concat(
|
|
377
|
-
return
|
|
396
|
+
document.body.classList.remove("block-interactivity-".concat(o)), d.forEach(function(g) {
|
|
397
|
+
return g.classList.remove("allow-interactivity-".concat(o));
|
|
378
398
|
});
|
|
379
399
|
};
|
|
380
400
|
}
|
|
381
401
|
}, [t.inert, t.lockRef.current, t.shards]);
|
|
382
|
-
var
|
|
383
|
-
if ("touches" in
|
|
384
|
-
return !
|
|
385
|
-
var
|
|
386
|
-
if ("touches" in
|
|
402
|
+
var s = w.useCallback(function(d, g) {
|
|
403
|
+
if ("touches" in d && d.touches.length === 2 || d.type === "wheel" && d.ctrlKey)
|
|
404
|
+
return !c.current.allowPinchZoom;
|
|
405
|
+
var p = lt(d), y = n.current, x = "deltaX" in d ? d.deltaX : y[0] - p[0], b = "deltaY" in d ? d.deltaY : y[1] - p[1], S, C = d.target, R = Math.abs(x) > Math.abs(b) ? "h" : "v";
|
|
406
|
+
if ("touches" in d && R === "h" && C.type === "range")
|
|
387
407
|
return !1;
|
|
388
|
-
var
|
|
389
|
-
if (
|
|
408
|
+
var P = window.getSelection(), L = P && P.anchorNode, O = L ? L === C || L.contains(C) : !1;
|
|
409
|
+
if (O)
|
|
390
410
|
return !1;
|
|
391
|
-
var
|
|
392
|
-
if (!
|
|
411
|
+
var M = zt(R, C);
|
|
412
|
+
if (!M)
|
|
393
413
|
return !0;
|
|
394
|
-
if (
|
|
414
|
+
if (M ? S = R : (S = R === "v" ? "h" : "v", M = zt(R, C)), !M)
|
|
395
415
|
return !1;
|
|
396
|
-
if (!
|
|
416
|
+
if (!r.current && "changedTouches" in d && (x || b) && (r.current = S), !S)
|
|
397
417
|
return !0;
|
|
398
|
-
var
|
|
399
|
-
return
|
|
400
|
-
}, []),
|
|
401
|
-
var
|
|
402
|
-
if (!(!
|
|
403
|
-
var
|
|
404
|
-
return
|
|
418
|
+
var T = r.current || S;
|
|
419
|
+
return tn(T, g, d, T === "h" ? x : b);
|
|
420
|
+
}, []), u = w.useCallback(function(d) {
|
|
421
|
+
var g = d;
|
|
422
|
+
if (!(!J.length || J[J.length - 1] !== i)) {
|
|
423
|
+
var p = "deltaY" in g ? jt(g) : lt(g), y = e.current.filter(function(S) {
|
|
424
|
+
return S.name === g.type && (S.target === g.target || g.target === S.shadowParent) && en(S.delta, p);
|
|
405
425
|
})[0];
|
|
406
|
-
if (
|
|
407
|
-
|
|
426
|
+
if (y && y.should) {
|
|
427
|
+
g.cancelable && g.preventDefault();
|
|
408
428
|
return;
|
|
409
429
|
}
|
|
410
|
-
if (!
|
|
411
|
-
var
|
|
412
|
-
return
|
|
413
|
-
}),
|
|
414
|
-
|
|
430
|
+
if (!y) {
|
|
431
|
+
var x = (c.current.shards || []).map(Xt).filter(Boolean).filter(function(S) {
|
|
432
|
+
return S.contains(g.target);
|
|
433
|
+
}), b = x.length > 0 ? s(g, x[0]) : !c.current.noIsolation;
|
|
434
|
+
b && g.cancelable && g.preventDefault();
|
|
415
435
|
}
|
|
416
436
|
}
|
|
417
|
-
}, []),
|
|
418
|
-
var
|
|
419
|
-
e.current.push(
|
|
420
|
-
e.current = e.current.filter(function(
|
|
421
|
-
return
|
|
437
|
+
}, []), f = w.useCallback(function(d, g, p, y) {
|
|
438
|
+
var x = { name: d, delta: g, target: p, should: y, shadowParent: cn(p) };
|
|
439
|
+
e.current.push(x), setTimeout(function() {
|
|
440
|
+
e.current = e.current.filter(function(b) {
|
|
441
|
+
return b !== x;
|
|
422
442
|
});
|
|
423
443
|
}, 1);
|
|
424
|
-
}, []),
|
|
425
|
-
n.current =
|
|
426
|
-
}, []),
|
|
427
|
-
|
|
428
|
-
}, []),
|
|
429
|
-
|
|
444
|
+
}, []), l = w.useCallback(function(d) {
|
|
445
|
+
n.current = lt(d), r.current = void 0;
|
|
446
|
+
}, []), a = w.useCallback(function(d) {
|
|
447
|
+
f(d.type, jt(d), d.target, s(d, t.lockRef.current));
|
|
448
|
+
}, []), m = w.useCallback(function(d) {
|
|
449
|
+
f(d.type, lt(d), d.target, s(d, t.lockRef.current));
|
|
430
450
|
}, []);
|
|
431
|
-
|
|
432
|
-
return
|
|
433
|
-
onScrollCapture:
|
|
434
|
-
onWheelCapture:
|
|
435
|
-
onTouchMoveCapture:
|
|
436
|
-
}), document.addEventListener("wheel",
|
|
437
|
-
|
|
438
|
-
return
|
|
439
|
-
}), document.removeEventListener("wheel",
|
|
451
|
+
w.useEffect(function() {
|
|
452
|
+
return J.push(i), t.setCallbacks({
|
|
453
|
+
onScrollCapture: a,
|
|
454
|
+
onWheelCapture: a,
|
|
455
|
+
onTouchMoveCapture: m
|
|
456
|
+
}), document.addEventListener("wheel", u, Q), document.addEventListener("touchmove", u, Q), document.addEventListener("touchstart", l, Q), function() {
|
|
457
|
+
J = J.filter(function(d) {
|
|
458
|
+
return d !== i;
|
|
459
|
+
}), document.removeEventListener("wheel", u, Q), document.removeEventListener("touchmove", u, Q), document.removeEventListener("touchstart", l, Q);
|
|
440
460
|
};
|
|
441
461
|
}, []);
|
|
442
|
-
var
|
|
443
|
-
return
|
|
444
|
-
|
|
462
|
+
var h = t.removeScrollBar, v = t.inert;
|
|
463
|
+
return w.createElement(
|
|
464
|
+
w.Fragment,
|
|
445
465
|
null,
|
|
446
|
-
|
|
447
|
-
|
|
466
|
+
v ? w.createElement(i, { styles: nn(o) }) : null,
|
|
467
|
+
h ? w.createElement(qe, { noRelative: t.noRelative, gapMode: t.gapMode }) : null
|
|
448
468
|
);
|
|
449
469
|
}
|
|
450
|
-
function
|
|
470
|
+
function cn(t) {
|
|
451
471
|
for (var e = null; t !== null; )
|
|
452
472
|
t instanceof ShadowRoot && (e = t.host, t = t.host), t = t.parentNode;
|
|
453
473
|
return e;
|
|
454
474
|
}
|
|
455
|
-
const
|
|
456
|
-
var
|
|
457
|
-
return
|
|
475
|
+
const sn = We(ie, on);
|
|
476
|
+
var an = w.forwardRef(function(t, e) {
|
|
477
|
+
return w.createElement(xt, I({}, t, { ref: e, sideCar: sn }));
|
|
458
478
|
});
|
|
459
|
-
|
|
460
|
-
var
|
|
479
|
+
an.classNames = xt.classNames;
|
|
480
|
+
var ln = function(t) {
|
|
461
481
|
if (typeof document > "u")
|
|
462
482
|
return null;
|
|
463
483
|
var e = Array.isArray(t) ? t[0] : t;
|
|
464
484
|
return e.ownerDocument.body;
|
|
465
|
-
},
|
|
466
|
-
return t && (t.host ||
|
|
467
|
-
},
|
|
485
|
+
}, tt = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), ut = {}, Pt = 0, fe = function(t) {
|
|
486
|
+
return t && (t.host || fe(t.parentNode));
|
|
487
|
+
}, fn = function(t, e) {
|
|
468
488
|
return e.map(function(n) {
|
|
469
489
|
if (t.contains(n))
|
|
470
490
|
return n;
|
|
471
|
-
var
|
|
472
|
-
return
|
|
491
|
+
var r = fe(n);
|
|
492
|
+
return r && t.contains(r) ? r : (console.error("aria-hidden", n, "in not contained inside", t, ". Doing nothing"), null);
|
|
473
493
|
}).filter(function(n) {
|
|
474
494
|
return !!n;
|
|
475
495
|
});
|
|
476
|
-
},
|
|
477
|
-
var
|
|
478
|
-
|
|
479
|
-
var i =
|
|
480
|
-
!
|
|
496
|
+
}, un = function(t, e, n, r) {
|
|
497
|
+
var o = fn(e, Array.isArray(t) ? t : [t]);
|
|
498
|
+
ut[n] || (ut[n] = /* @__PURE__ */ new WeakMap());
|
|
499
|
+
var i = ut[n], c = [], s = /* @__PURE__ */ new Set(), u = new Set(o), f = function(a) {
|
|
500
|
+
!a || s.has(a) || (s.add(a), f(a.parentNode));
|
|
481
501
|
};
|
|
482
|
-
|
|
483
|
-
var
|
|
484
|
-
!
|
|
485
|
-
if (
|
|
486
|
-
|
|
502
|
+
o.forEach(f);
|
|
503
|
+
var l = function(a) {
|
|
504
|
+
!a || u.has(a) || Array.prototype.forEach.call(a.children, function(m) {
|
|
505
|
+
if (s.has(m))
|
|
506
|
+
l(m);
|
|
487
507
|
else
|
|
488
508
|
try {
|
|
489
|
-
var
|
|
490
|
-
|
|
491
|
-
} catch (
|
|
492
|
-
console.error("aria-hidden: cannot operate on ",
|
|
509
|
+
var h = m.getAttribute(r), v = h !== null && h !== "false", d = (tt.get(m) || 0) + 1, g = (i.get(m) || 0) + 1;
|
|
510
|
+
tt.set(m, d), i.set(m, g), c.push(m), d === 1 && v && ft.set(m, !0), g === 1 && m.setAttribute(n, "true"), v || m.setAttribute(r, "true");
|
|
511
|
+
} catch (p) {
|
|
512
|
+
console.error("aria-hidden: cannot operate on ", m, p);
|
|
493
513
|
}
|
|
494
514
|
});
|
|
495
515
|
};
|
|
496
|
-
return
|
|
497
|
-
|
|
498
|
-
var
|
|
499
|
-
|
|
500
|
-
}),
|
|
516
|
+
return l(e), s.clear(), Pt++, function() {
|
|
517
|
+
c.forEach(function(a) {
|
|
518
|
+
var m = tt.get(a) - 1, h = i.get(a) - 1;
|
|
519
|
+
tt.set(a, m), i.set(a, h), m || (ft.has(a) || a.removeAttribute(r), ft.delete(a)), h || a.removeAttribute(n);
|
|
520
|
+
}), Pt--, Pt || (tt = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), ft = /* @__PURE__ */ new WeakMap(), ut = {});
|
|
501
521
|
};
|
|
502
|
-
},
|
|
522
|
+
}, gr = function(t, e, n) {
|
|
503
523
|
n === void 0 && (n = "data-aria-hidden");
|
|
504
|
-
var
|
|
505
|
-
return
|
|
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"))), un(r, o, n, "aria-hidden")) : function() {
|
|
506
526
|
return null;
|
|
507
527
|
};
|
|
508
528
|
};
|
|
509
|
-
const
|
|
529
|
+
const dn = ["top", "right", "bottom", "left"], U = Math.min, B = Math.max, vt = Math.round, dt = Math.floor, z = (t) => ({
|
|
510
530
|
x: t,
|
|
511
531
|
y: t
|
|
512
|
-
}),
|
|
532
|
+
}), hn = {
|
|
513
533
|
left: "right",
|
|
514
534
|
right: "left",
|
|
515
535
|
bottom: "top",
|
|
516
536
|
top: "bottom"
|
|
517
|
-
},
|
|
537
|
+
}, mn = {
|
|
518
538
|
start: "end",
|
|
519
539
|
end: "start"
|
|
520
540
|
};
|
|
521
|
-
function
|
|
522
|
-
return
|
|
541
|
+
function Tt(t, e, n) {
|
|
542
|
+
return B(t, U(e, n));
|
|
523
543
|
}
|
|
524
|
-
function
|
|
544
|
+
function Y(t, e) {
|
|
525
545
|
return typeof t == "function" ? t(e) : t;
|
|
526
546
|
}
|
|
527
|
-
function
|
|
547
|
+
function q(t) {
|
|
528
548
|
return t.split("-")[0];
|
|
529
549
|
}
|
|
530
|
-
function
|
|
550
|
+
function ot(t) {
|
|
531
551
|
return t.split("-")[1];
|
|
532
552
|
}
|
|
533
|
-
function
|
|
553
|
+
function Nt(t) {
|
|
534
554
|
return t === "x" ? "y" : "x";
|
|
535
555
|
}
|
|
536
|
-
function
|
|
556
|
+
function Bt(t) {
|
|
537
557
|
return t === "y" ? "height" : "width";
|
|
538
558
|
}
|
|
539
|
-
const
|
|
540
|
-
function
|
|
541
|
-
return
|
|
559
|
+
const gn = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
560
|
+
function _(t) {
|
|
561
|
+
return gn.has(q(t)) ? "y" : "x";
|
|
542
562
|
}
|
|
543
|
-
function
|
|
544
|
-
return
|
|
563
|
+
function Ft(t) {
|
|
564
|
+
return Nt(_(t));
|
|
545
565
|
}
|
|
546
|
-
function
|
|
566
|
+
function vn(t, e, n) {
|
|
547
567
|
n === void 0 && (n = !1);
|
|
548
|
-
const
|
|
549
|
-
let
|
|
550
|
-
return e.reference[i] > e.floating[i] && (
|
|
568
|
+
const r = ot(t), o = Ft(t), i = Bt(o);
|
|
569
|
+
let c = o === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
570
|
+
return e.reference[i] > e.floating[i] && (c = pt(c)), [c, pt(c)];
|
|
551
571
|
}
|
|
552
|
-
function
|
|
553
|
-
const e =
|
|
554
|
-
return [
|
|
572
|
+
function pn(t) {
|
|
573
|
+
const e = pt(t);
|
|
574
|
+
return [Dt(t), e, Dt(e)];
|
|
555
575
|
}
|
|
556
|
-
function
|
|
557
|
-
return t.replace(/start|end/g, (e) =>
|
|
576
|
+
function Dt(t) {
|
|
577
|
+
return t.replace(/start|end/g, (e) => mn[e]);
|
|
558
578
|
}
|
|
559
|
-
const
|
|
560
|
-
function
|
|
579
|
+
const Yt = ["left", "right"], qt = ["right", "left"], wn = ["top", "bottom"], yn = ["bottom", "top"];
|
|
580
|
+
function xn(t, e, n) {
|
|
561
581
|
switch (t) {
|
|
562
582
|
case "top":
|
|
563
583
|
case "bottom":
|
|
564
|
-
return n ? e ?
|
|
584
|
+
return n ? e ? qt : Yt : e ? Yt : qt;
|
|
565
585
|
case "left":
|
|
566
586
|
case "right":
|
|
567
|
-
return e ?
|
|
587
|
+
return e ? wn : yn;
|
|
568
588
|
default:
|
|
569
589
|
return [];
|
|
570
590
|
}
|
|
571
591
|
}
|
|
572
|
-
function
|
|
573
|
-
const
|
|
574
|
-
let i =
|
|
575
|
-
return
|
|
592
|
+
function bn(t, e, n, r) {
|
|
593
|
+
const o = ot(t);
|
|
594
|
+
let i = xn(q(t), n === "start", r);
|
|
595
|
+
return o && (i = i.map((c) => c + "-" + o), e && (i = i.concat(i.map(Dt)))), i;
|
|
576
596
|
}
|
|
577
|
-
function
|
|
578
|
-
return t.replace(/left|right|bottom|top/g, (e) =>
|
|
597
|
+
function pt(t) {
|
|
598
|
+
return t.replace(/left|right|bottom|top/g, (e) => hn[e]);
|
|
579
599
|
}
|
|
580
|
-
function
|
|
600
|
+
function Sn(t) {
|
|
581
601
|
return {
|
|
582
602
|
top: 0,
|
|
583
603
|
right: 0,
|
|
@@ -586,301 +606,301 @@ function No(t) {
|
|
|
586
606
|
...t
|
|
587
607
|
};
|
|
588
608
|
}
|
|
589
|
-
function
|
|
590
|
-
return typeof t != "number" ?
|
|
609
|
+
function ue(t) {
|
|
610
|
+
return typeof t != "number" ? Sn(t) : {
|
|
591
611
|
top: t,
|
|
592
612
|
right: t,
|
|
593
613
|
bottom: t,
|
|
594
614
|
left: t
|
|
595
615
|
};
|
|
596
616
|
}
|
|
597
|
-
function
|
|
617
|
+
function wt(t) {
|
|
598
618
|
const {
|
|
599
619
|
x: e,
|
|
600
620
|
y: n,
|
|
601
|
-
width:
|
|
602
|
-
height:
|
|
621
|
+
width: r,
|
|
622
|
+
height: o
|
|
603
623
|
} = t;
|
|
604
624
|
return {
|
|
605
|
-
width:
|
|
606
|
-
height:
|
|
625
|
+
width: r,
|
|
626
|
+
height: o,
|
|
607
627
|
top: n,
|
|
608
628
|
left: e,
|
|
609
|
-
right: e +
|
|
610
|
-
bottom: n +
|
|
629
|
+
right: e + r,
|
|
630
|
+
bottom: n + o,
|
|
611
631
|
x: e,
|
|
612
632
|
y: n
|
|
613
633
|
};
|
|
614
634
|
}
|
|
615
|
-
function
|
|
635
|
+
function Zt(t, e, n) {
|
|
616
636
|
let {
|
|
617
|
-
reference:
|
|
618
|
-
floating:
|
|
637
|
+
reference: r,
|
|
638
|
+
floating: o
|
|
619
639
|
} = t;
|
|
620
|
-
const i =
|
|
621
|
-
let
|
|
622
|
-
switch (
|
|
640
|
+
const i = _(e), c = Ft(e), s = Bt(c), u = q(e), f = i === "y", l = r.x + r.width / 2 - o.width / 2, a = r.y + r.height / 2 - o.height / 2, m = r[s] / 2 - o[s] / 2;
|
|
641
|
+
let h;
|
|
642
|
+
switch (u) {
|
|
623
643
|
case "top":
|
|
624
|
-
|
|
625
|
-
x:
|
|
626
|
-
y:
|
|
644
|
+
h = {
|
|
645
|
+
x: l,
|
|
646
|
+
y: r.y - o.height
|
|
627
647
|
};
|
|
628
648
|
break;
|
|
629
649
|
case "bottom":
|
|
630
|
-
|
|
631
|
-
x:
|
|
632
|
-
y:
|
|
650
|
+
h = {
|
|
651
|
+
x: l,
|
|
652
|
+
y: r.y + r.height
|
|
633
653
|
};
|
|
634
654
|
break;
|
|
635
655
|
case "right":
|
|
636
|
-
|
|
637
|
-
x:
|
|
638
|
-
y:
|
|
656
|
+
h = {
|
|
657
|
+
x: r.x + r.width,
|
|
658
|
+
y: a
|
|
639
659
|
};
|
|
640
660
|
break;
|
|
641
661
|
case "left":
|
|
642
|
-
|
|
643
|
-
x:
|
|
644
|
-
y:
|
|
662
|
+
h = {
|
|
663
|
+
x: r.x - o.width,
|
|
664
|
+
y: a
|
|
645
665
|
};
|
|
646
666
|
break;
|
|
647
667
|
default:
|
|
648
|
-
|
|
649
|
-
x:
|
|
650
|
-
y:
|
|
668
|
+
h = {
|
|
669
|
+
x: r.x,
|
|
670
|
+
y: r.y
|
|
651
671
|
};
|
|
652
672
|
}
|
|
653
|
-
switch (
|
|
673
|
+
switch (ot(e)) {
|
|
654
674
|
case "start":
|
|
655
|
-
|
|
675
|
+
h[c] -= m * (n && f ? -1 : 1);
|
|
656
676
|
break;
|
|
657
677
|
case "end":
|
|
658
|
-
|
|
678
|
+
h[c] += m * (n && f ? -1 : 1);
|
|
659
679
|
break;
|
|
660
680
|
}
|
|
661
|
-
return
|
|
681
|
+
return h;
|
|
662
682
|
}
|
|
663
|
-
async function
|
|
683
|
+
async function Cn(t, e) {
|
|
664
684
|
var n;
|
|
665
685
|
e === void 0 && (e = {});
|
|
666
686
|
const {
|
|
667
|
-
x:
|
|
668
|
-
y:
|
|
687
|
+
x: r,
|
|
688
|
+
y: o,
|
|
669
689
|
platform: i,
|
|
670
|
-
rects:
|
|
671
|
-
elements:
|
|
672
|
-
strategy:
|
|
690
|
+
rects: c,
|
|
691
|
+
elements: s,
|
|
692
|
+
strategy: u
|
|
673
693
|
} = t, {
|
|
674
|
-
boundary:
|
|
675
|
-
rootBoundary:
|
|
676
|
-
elementContext:
|
|
677
|
-
altBoundary:
|
|
678
|
-
padding:
|
|
679
|
-
} =
|
|
680
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(
|
|
681
|
-
boundary:
|
|
682
|
-
rootBoundary:
|
|
683
|
-
strategy:
|
|
684
|
-
})),
|
|
685
|
-
x:
|
|
686
|
-
y:
|
|
687
|
-
width:
|
|
688
|
-
height:
|
|
689
|
-
} :
|
|
694
|
+
boundary: f = "clippingAncestors",
|
|
695
|
+
rootBoundary: l = "viewport",
|
|
696
|
+
elementContext: a = "floating",
|
|
697
|
+
altBoundary: m = !1,
|
|
698
|
+
padding: h = 0
|
|
699
|
+
} = Y(e, t), v = ue(h), g = s[m ? a === "floating" ? "reference" : "floating" : a], p = wt(await i.getClippingRect({
|
|
700
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(g))) == null || n ? g : g.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(s.floating)),
|
|
701
|
+
boundary: f,
|
|
702
|
+
rootBoundary: l,
|
|
703
|
+
strategy: u
|
|
704
|
+
})), y = a === "floating" ? {
|
|
705
|
+
x: r,
|
|
706
|
+
y: o,
|
|
707
|
+
width: c.floating.width,
|
|
708
|
+
height: c.floating.height
|
|
709
|
+
} : c.reference, x = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(s.floating)), b = await (i.isElement == null ? void 0 : i.isElement(x)) ? await (i.getScale == null ? void 0 : i.getScale(x)) || {
|
|
690
710
|
x: 1,
|
|
691
711
|
y: 1
|
|
692
712
|
} : {
|
|
693
713
|
x: 1,
|
|
694
714
|
y: 1
|
|
695
|
-
},
|
|
696
|
-
elements:
|
|
697
|
-
rect:
|
|
698
|
-
offsetParent:
|
|
699
|
-
strategy:
|
|
700
|
-
}) :
|
|
715
|
+
}, S = wt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
716
|
+
elements: s,
|
|
717
|
+
rect: y,
|
|
718
|
+
offsetParent: x,
|
|
719
|
+
strategy: u
|
|
720
|
+
}) : y);
|
|
701
721
|
return {
|
|
702
|
-
top: (
|
|
703
|
-
bottom: (
|
|
704
|
-
left: (
|
|
705
|
-
right: (
|
|
722
|
+
top: (p.top - S.top + v.top) / b.y,
|
|
723
|
+
bottom: (S.bottom - p.bottom + v.bottom) / b.y,
|
|
724
|
+
left: (p.left - S.left + v.left) / b.x,
|
|
725
|
+
right: (S.right - p.right + v.right) / b.x
|
|
706
726
|
};
|
|
707
727
|
}
|
|
708
|
-
const
|
|
728
|
+
const Rn = async (t, e, n) => {
|
|
709
729
|
const {
|
|
710
|
-
placement:
|
|
711
|
-
strategy:
|
|
730
|
+
placement: r = "bottom",
|
|
731
|
+
strategy: o = "absolute",
|
|
712
732
|
middleware: i = [],
|
|
713
|
-
platform:
|
|
714
|
-
} = n,
|
|
715
|
-
let
|
|
733
|
+
platform: c
|
|
734
|
+
} = n, s = i.filter(Boolean), u = await (c.isRTL == null ? void 0 : c.isRTL(e));
|
|
735
|
+
let f = await c.getElementRects({
|
|
716
736
|
reference: t,
|
|
717
737
|
floating: e,
|
|
718
|
-
strategy:
|
|
738
|
+
strategy: o
|
|
719
739
|
}), {
|
|
720
|
-
x:
|
|
721
|
-
y:
|
|
722
|
-
} =
|
|
723
|
-
for (let
|
|
724
|
-
var
|
|
740
|
+
x: l,
|
|
741
|
+
y: a
|
|
742
|
+
} = Zt(f, r, u), m = r, h = {}, v = 0;
|
|
743
|
+
for (let g = 0; g < s.length; g++) {
|
|
744
|
+
var d;
|
|
725
745
|
const {
|
|
726
|
-
name:
|
|
727
|
-
fn:
|
|
728
|
-
} =
|
|
729
|
-
x
|
|
730
|
-
y:
|
|
731
|
-
data:
|
|
732
|
-
reset:
|
|
733
|
-
} = await
|
|
734
|
-
x:
|
|
735
|
-
y:
|
|
736
|
-
initialPlacement:
|
|
737
|
-
placement:
|
|
738
|
-
strategy:
|
|
739
|
-
middlewareData:
|
|
740
|
-
rects:
|
|
746
|
+
name: p,
|
|
747
|
+
fn: y
|
|
748
|
+
} = s[g], {
|
|
749
|
+
x,
|
|
750
|
+
y: b,
|
|
751
|
+
data: S,
|
|
752
|
+
reset: C
|
|
753
|
+
} = await y({
|
|
754
|
+
x: l,
|
|
755
|
+
y: a,
|
|
756
|
+
initialPlacement: r,
|
|
757
|
+
placement: m,
|
|
758
|
+
strategy: o,
|
|
759
|
+
middlewareData: h,
|
|
760
|
+
rects: f,
|
|
741
761
|
platform: {
|
|
742
|
-
...
|
|
743
|
-
detectOverflow: (
|
|
762
|
+
...c,
|
|
763
|
+
detectOverflow: (d = c.detectOverflow) != null ? d : Cn
|
|
744
764
|
},
|
|
745
765
|
elements: {
|
|
746
766
|
reference: t,
|
|
747
767
|
floating: e
|
|
748
768
|
}
|
|
749
769
|
});
|
|
750
|
-
|
|
751
|
-
...
|
|
752
|
-
[
|
|
753
|
-
...
|
|
754
|
-
...
|
|
770
|
+
l = x ?? l, a = b ?? a, h = {
|
|
771
|
+
...h,
|
|
772
|
+
[p]: {
|
|
773
|
+
...h[p],
|
|
774
|
+
...S
|
|
755
775
|
}
|
|
756
|
-
},
|
|
776
|
+
}, C && v <= 50 && (v++, typeof C == "object" && (C.placement && (m = C.placement), C.rects && (f = C.rects === !0 ? await c.getElementRects({
|
|
757
777
|
reference: t,
|
|
758
778
|
floating: e,
|
|
759
|
-
strategy:
|
|
760
|
-
}) :
|
|
761
|
-
x:
|
|
762
|
-
y:
|
|
763
|
-
} =
|
|
779
|
+
strategy: o
|
|
780
|
+
}) : C.rects), {
|
|
781
|
+
x: l,
|
|
782
|
+
y: a
|
|
783
|
+
} = Zt(f, m, u)), g = -1);
|
|
764
784
|
}
|
|
765
785
|
return {
|
|
766
|
-
x:
|
|
767
|
-
y:
|
|
768
|
-
placement:
|
|
769
|
-
strategy:
|
|
770
|
-
middlewareData:
|
|
786
|
+
x: l,
|
|
787
|
+
y: a,
|
|
788
|
+
placement: m,
|
|
789
|
+
strategy: o,
|
|
790
|
+
middlewareData: h
|
|
771
791
|
};
|
|
772
|
-
},
|
|
792
|
+
}, An = (t) => ({
|
|
773
793
|
name: "arrow",
|
|
774
794
|
options: t,
|
|
775
795
|
async fn(e) {
|
|
776
796
|
const {
|
|
777
797
|
x: n,
|
|
778
|
-
y:
|
|
779
|
-
placement:
|
|
798
|
+
y: r,
|
|
799
|
+
placement: o,
|
|
780
800
|
rects: i,
|
|
781
|
-
platform:
|
|
782
|
-
elements:
|
|
783
|
-
middlewareData:
|
|
801
|
+
platform: c,
|
|
802
|
+
elements: s,
|
|
803
|
+
middlewareData: u
|
|
784
804
|
} = e, {
|
|
785
|
-
element:
|
|
786
|
-
padding:
|
|
787
|
-
} =
|
|
788
|
-
if (
|
|
805
|
+
element: f,
|
|
806
|
+
padding: l = 0
|
|
807
|
+
} = Y(t, e) || {};
|
|
808
|
+
if (f == null)
|
|
789
809
|
return {};
|
|
790
|
-
const
|
|
810
|
+
const a = ue(l), m = {
|
|
791
811
|
x: n,
|
|
792
|
-
y:
|
|
793
|
-
},
|
|
794
|
-
let
|
|
795
|
-
(!
|
|
796
|
-
const
|
|
812
|
+
y: r
|
|
813
|
+
}, h = Ft(o), v = Bt(h), d = await c.getDimensions(f), g = h === "y", p = g ? "top" : "left", y = g ? "bottom" : "right", x = g ? "clientHeight" : "clientWidth", b = i.reference[v] + i.reference[h] - m[h] - i.floating[v], S = m[h] - i.reference[h], C = await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(f));
|
|
814
|
+
let R = C ? C[x] : 0;
|
|
815
|
+
(!R || !await (c.isElement == null ? void 0 : c.isElement(C))) && (R = s.floating[x] || i.floating[v]);
|
|
816
|
+
const P = b / 2 - S / 2, L = R / 2 - d[v] / 2 - 1, O = U(a[p], L), M = U(a[y], L), T = O, D = R - d[v] - M, E = R / 2 - d[v] / 2 + P, $ = Tt(T, E, D), k = !u.arrow && ot(o) != null && E !== $ && i.reference[v] / 2 - (E < T ? O : M) - d[v] / 2 < 0, W = k ? E < T ? E - T : E - D : 0;
|
|
797
817
|
return {
|
|
798
|
-
[
|
|
818
|
+
[h]: m[h] + W,
|
|
799
819
|
data: {
|
|
800
|
-
[
|
|
801
|
-
centerOffset:
|
|
802
|
-
...
|
|
803
|
-
alignmentOffset:
|
|
820
|
+
[h]: $,
|
|
821
|
+
centerOffset: E - $ - W,
|
|
822
|
+
...k && {
|
|
823
|
+
alignmentOffset: W
|
|
804
824
|
}
|
|
805
825
|
},
|
|
806
|
-
reset:
|
|
826
|
+
reset: k
|
|
807
827
|
};
|
|
808
828
|
}
|
|
809
|
-
}),
|
|
829
|
+
}), En = function(t) {
|
|
810
830
|
return t === void 0 && (t = {}), {
|
|
811
831
|
name: "flip",
|
|
812
832
|
options: t,
|
|
813
833
|
async fn(e) {
|
|
814
|
-
var n,
|
|
834
|
+
var n, r;
|
|
815
835
|
const {
|
|
816
|
-
placement:
|
|
836
|
+
placement: o,
|
|
817
837
|
middlewareData: i,
|
|
818
|
-
rects:
|
|
819
|
-
initialPlacement:
|
|
820
|
-
platform:
|
|
821
|
-
elements:
|
|
838
|
+
rects: c,
|
|
839
|
+
initialPlacement: s,
|
|
840
|
+
platform: u,
|
|
841
|
+
elements: f
|
|
822
842
|
} = e, {
|
|
823
|
-
mainAxis:
|
|
824
|
-
crossAxis:
|
|
825
|
-
fallbackPlacements:
|
|
826
|
-
fallbackStrategy:
|
|
827
|
-
fallbackAxisSideDirection:
|
|
828
|
-
flipAlignment:
|
|
829
|
-
...
|
|
830
|
-
} =
|
|
843
|
+
mainAxis: l = !0,
|
|
844
|
+
crossAxis: a = !0,
|
|
845
|
+
fallbackPlacements: m,
|
|
846
|
+
fallbackStrategy: h = "bestFit",
|
|
847
|
+
fallbackAxisSideDirection: v = "none",
|
|
848
|
+
flipAlignment: d = !0,
|
|
849
|
+
...g
|
|
850
|
+
} = Y(t, e);
|
|
831
851
|
if ((n = i.arrow) != null && n.alignmentOffset)
|
|
832
852
|
return {};
|
|
833
|
-
const
|
|
834
|
-
!
|
|
835
|
-
const
|
|
836
|
-
let
|
|
837
|
-
if (
|
|
838
|
-
const
|
|
839
|
-
|
|
853
|
+
const p = q(o), y = _(s), x = q(s) === s, b = await (u.isRTL == null ? void 0 : u.isRTL(f.floating)), S = m || (x || !d ? [pt(s)] : pn(s)), C = v !== "none";
|
|
854
|
+
!m && C && S.push(...bn(s, d, v, b));
|
|
855
|
+
const R = [s, ...S], P = await u.detectOverflow(e, g), L = [];
|
|
856
|
+
let O = ((r = i.flip) == null ? void 0 : r.overflows) || [];
|
|
857
|
+
if (l && L.push(P[p]), a) {
|
|
858
|
+
const E = vn(o, c, b);
|
|
859
|
+
L.push(P[E[0]], P[E[1]]);
|
|
840
860
|
}
|
|
841
|
-
if (
|
|
842
|
-
placement:
|
|
843
|
-
overflows:
|
|
844
|
-
}],
|
|
845
|
-
var
|
|
846
|
-
const
|
|
847
|
-
if (
|
|
861
|
+
if (O = [...O, {
|
|
862
|
+
placement: o,
|
|
863
|
+
overflows: L
|
|
864
|
+
}], !L.every((E) => E <= 0)) {
|
|
865
|
+
var M, T;
|
|
866
|
+
const E = (((M = i.flip) == null ? void 0 : M.index) || 0) + 1, $ = R[E];
|
|
867
|
+
if ($ && (!(a === "alignment" ? y !== _($) : !1) || // We leave the current main axis only if every placement on that axis
|
|
848
868
|
// overflows the main axis.
|
|
849
|
-
|
|
869
|
+
O.every((A) => _(A.placement) === y ? A.overflows[0] > 0 : !0)))
|
|
850
870
|
return {
|
|
851
871
|
data: {
|
|
852
|
-
index:
|
|
853
|
-
overflows:
|
|
872
|
+
index: E,
|
|
873
|
+
overflows: O
|
|
854
874
|
},
|
|
855
875
|
reset: {
|
|
856
|
-
placement:
|
|
876
|
+
placement: $
|
|
857
877
|
}
|
|
858
878
|
};
|
|
859
|
-
let
|
|
860
|
-
if (!
|
|
861
|
-
switch (
|
|
879
|
+
let k = (T = O.filter((W) => W.overflows[0] <= 0).sort((W, A) => W.overflows[1] - A.overflows[1])[0]) == null ? void 0 : T.placement;
|
|
880
|
+
if (!k)
|
|
881
|
+
switch (h) {
|
|
862
882
|
case "bestFit": {
|
|
863
|
-
var
|
|
864
|
-
const
|
|
865
|
-
if (
|
|
866
|
-
const
|
|
867
|
-
return
|
|
883
|
+
var D;
|
|
884
|
+
const W = (D = O.filter((A) => {
|
|
885
|
+
if (C) {
|
|
886
|
+
const N = _(A.placement);
|
|
887
|
+
return N === y || // Create a bias to the `y` side axis due to horizontal
|
|
868
888
|
// reading directions favoring greater width.
|
|
869
|
-
|
|
889
|
+
N === "y";
|
|
870
890
|
}
|
|
871
891
|
return !0;
|
|
872
|
-
}).map((
|
|
873
|
-
|
|
892
|
+
}).map((A) => [A.placement, A.overflows.filter((N) => N > 0).reduce((N, Z) => N + Z, 0)]).sort((A, N) => A[1] - N[1])[0]) == null ? void 0 : D[0];
|
|
893
|
+
W && (k = W);
|
|
874
894
|
break;
|
|
875
895
|
}
|
|
876
896
|
case "initialPlacement":
|
|
877
|
-
|
|
897
|
+
k = s;
|
|
878
898
|
break;
|
|
879
899
|
}
|
|
880
|
-
if (
|
|
900
|
+
if (o !== k)
|
|
881
901
|
return {
|
|
882
902
|
reset: {
|
|
883
|
-
placement:
|
|
903
|
+
placement: k
|
|
884
904
|
}
|
|
885
905
|
};
|
|
886
906
|
}
|
|
@@ -888,7 +908,7 @@ const Lo = async (t, e, n) => {
|
|
|
888
908
|
}
|
|
889
909
|
};
|
|
890
910
|
};
|
|
891
|
-
function
|
|
911
|
+
function Ut(t, e) {
|
|
892
912
|
return {
|
|
893
913
|
top: t.top - e.height,
|
|
894
914
|
right: t.right - e.width,
|
|
@@ -896,43 +916,43 @@ function Ve(t, e) {
|
|
|
896
916
|
left: t.left - e.width
|
|
897
917
|
};
|
|
898
918
|
}
|
|
899
|
-
function
|
|
900
|
-
return
|
|
919
|
+
function Gt(t) {
|
|
920
|
+
return dn.some((e) => t[e] >= 0);
|
|
901
921
|
}
|
|
902
|
-
const
|
|
922
|
+
const On = function(t) {
|
|
903
923
|
return t === void 0 && (t = {}), {
|
|
904
924
|
name: "hide",
|
|
905
925
|
options: t,
|
|
906
926
|
async fn(e) {
|
|
907
927
|
const {
|
|
908
928
|
rects: n,
|
|
909
|
-
platform:
|
|
929
|
+
platform: r
|
|
910
930
|
} = e, {
|
|
911
|
-
strategy:
|
|
931
|
+
strategy: o = "referenceHidden",
|
|
912
932
|
...i
|
|
913
|
-
} =
|
|
914
|
-
switch (
|
|
933
|
+
} = Y(t, e);
|
|
934
|
+
switch (o) {
|
|
915
935
|
case "referenceHidden": {
|
|
916
|
-
const
|
|
936
|
+
const c = await r.detectOverflow(e, {
|
|
917
937
|
...i,
|
|
918
938
|
elementContext: "reference"
|
|
919
|
-
}),
|
|
939
|
+
}), s = Ut(c, n.reference);
|
|
920
940
|
return {
|
|
921
941
|
data: {
|
|
922
|
-
referenceHiddenOffsets:
|
|
923
|
-
referenceHidden:
|
|
942
|
+
referenceHiddenOffsets: s,
|
|
943
|
+
referenceHidden: Gt(s)
|
|
924
944
|
}
|
|
925
945
|
};
|
|
926
946
|
}
|
|
927
947
|
case "escaped": {
|
|
928
|
-
const
|
|
948
|
+
const c = await r.detectOverflow(e, {
|
|
929
949
|
...i,
|
|
930
950
|
altBoundary: !0
|
|
931
|
-
}),
|
|
951
|
+
}), s = Ut(c, n.floating);
|
|
932
952
|
return {
|
|
933
953
|
data: {
|
|
934
|
-
escapedOffsets:
|
|
935
|
-
escaped:
|
|
954
|
+
escapedOffsets: s,
|
|
955
|
+
escaped: Gt(s)
|
|
936
956
|
}
|
|
937
957
|
};
|
|
938
958
|
}
|
|
@@ -941,189 +961,189 @@ const Io = function(t) {
|
|
|
941
961
|
}
|
|
942
962
|
}
|
|
943
963
|
};
|
|
944
|
-
},
|
|
945
|
-
async function
|
|
964
|
+
}, de = /* @__PURE__ */ new Set(["left", "top"]);
|
|
965
|
+
async function Pn(t, e) {
|
|
946
966
|
const {
|
|
947
967
|
placement: n,
|
|
948
|
-
platform:
|
|
949
|
-
elements:
|
|
950
|
-
} = t, i = await (
|
|
968
|
+
platform: r,
|
|
969
|
+
elements: o
|
|
970
|
+
} = t, i = await (r.isRTL == null ? void 0 : r.isRTL(o.floating)), c = q(n), s = ot(n), u = _(n) === "y", f = de.has(c) ? -1 : 1, l = i && u ? -1 : 1, a = Y(e, t);
|
|
951
971
|
let {
|
|
952
|
-
mainAxis:
|
|
953
|
-
crossAxis:
|
|
954
|
-
alignmentAxis:
|
|
955
|
-
} = typeof
|
|
956
|
-
mainAxis:
|
|
972
|
+
mainAxis: m,
|
|
973
|
+
crossAxis: h,
|
|
974
|
+
alignmentAxis: v
|
|
975
|
+
} = typeof a == "number" ? {
|
|
976
|
+
mainAxis: a,
|
|
957
977
|
crossAxis: 0,
|
|
958
978
|
alignmentAxis: null
|
|
959
979
|
} : {
|
|
960
|
-
mainAxis:
|
|
961
|
-
crossAxis:
|
|
962
|
-
alignmentAxis:
|
|
980
|
+
mainAxis: a.mainAxis || 0,
|
|
981
|
+
crossAxis: a.crossAxis || 0,
|
|
982
|
+
alignmentAxis: a.alignmentAxis
|
|
963
983
|
};
|
|
964
|
-
return
|
|
965
|
-
x:
|
|
966
|
-
y:
|
|
984
|
+
return s && typeof v == "number" && (h = s === "end" ? v * -1 : v), u ? {
|
|
985
|
+
x: h * l,
|
|
986
|
+
y: m * f
|
|
967
987
|
} : {
|
|
968
|
-
x:
|
|
969
|
-
y:
|
|
988
|
+
x: m * f,
|
|
989
|
+
y: h * l
|
|
970
990
|
};
|
|
971
991
|
}
|
|
972
|
-
const
|
|
992
|
+
const Mn = function(t) {
|
|
973
993
|
return t === void 0 && (t = 0), {
|
|
974
994
|
name: "offset",
|
|
975
995
|
options: t,
|
|
976
996
|
async fn(e) {
|
|
977
|
-
var n,
|
|
997
|
+
var n, r;
|
|
978
998
|
const {
|
|
979
|
-
x:
|
|
999
|
+
x: o,
|
|
980
1000
|
y: i,
|
|
981
|
-
placement:
|
|
982
|
-
middlewareData:
|
|
983
|
-
} = e,
|
|
984
|
-
return
|
|
985
|
-
x:
|
|
986
|
-
y: i +
|
|
1001
|
+
placement: c,
|
|
1002
|
+
middlewareData: s
|
|
1003
|
+
} = e, u = await Pn(e, t);
|
|
1004
|
+
return c === ((n = s.offset) == null ? void 0 : n.placement) && (r = s.arrow) != null && r.alignmentOffset ? {} : {
|
|
1005
|
+
x: o + u.x,
|
|
1006
|
+
y: i + u.y,
|
|
987
1007
|
data: {
|
|
988
|
-
...
|
|
989
|
-
placement:
|
|
1008
|
+
...u,
|
|
1009
|
+
placement: c
|
|
990
1010
|
}
|
|
991
1011
|
};
|
|
992
1012
|
}
|
|
993
1013
|
};
|
|
994
|
-
},
|
|
1014
|
+
}, kn = function(t) {
|
|
995
1015
|
return t === void 0 && (t = {}), {
|
|
996
1016
|
name: "shift",
|
|
997
1017
|
options: t,
|
|
998
1018
|
async fn(e) {
|
|
999
1019
|
const {
|
|
1000
1020
|
x: n,
|
|
1001
|
-
y:
|
|
1002
|
-
placement:
|
|
1021
|
+
y: r,
|
|
1022
|
+
placement: o,
|
|
1003
1023
|
platform: i
|
|
1004
1024
|
} = e, {
|
|
1005
|
-
mainAxis:
|
|
1006
|
-
crossAxis:
|
|
1007
|
-
limiter:
|
|
1008
|
-
fn: (
|
|
1025
|
+
mainAxis: c = !0,
|
|
1026
|
+
crossAxis: s = !1,
|
|
1027
|
+
limiter: u = {
|
|
1028
|
+
fn: (p) => {
|
|
1009
1029
|
let {
|
|
1010
|
-
x:
|
|
1011
|
-
y:
|
|
1012
|
-
} =
|
|
1030
|
+
x: y,
|
|
1031
|
+
y: x
|
|
1032
|
+
} = p;
|
|
1013
1033
|
return {
|
|
1014
|
-
x:
|
|
1015
|
-
y:
|
|
1034
|
+
x: y,
|
|
1035
|
+
y: x
|
|
1016
1036
|
};
|
|
1017
1037
|
}
|
|
1018
1038
|
},
|
|
1019
|
-
...
|
|
1020
|
-
} =
|
|
1039
|
+
...f
|
|
1040
|
+
} = Y(t, e), l = {
|
|
1021
1041
|
x: n,
|
|
1022
|
-
y:
|
|
1023
|
-
},
|
|
1024
|
-
let
|
|
1025
|
-
if (
|
|
1026
|
-
const
|
|
1027
|
-
|
|
1042
|
+
y: r
|
|
1043
|
+
}, a = await i.detectOverflow(e, f), m = _(q(o)), h = Nt(m);
|
|
1044
|
+
let v = l[h], d = l[m];
|
|
1045
|
+
if (c) {
|
|
1046
|
+
const p = h === "y" ? "top" : "left", y = h === "y" ? "bottom" : "right", x = v + a[p], b = v - a[y];
|
|
1047
|
+
v = Tt(x, v, b);
|
|
1028
1048
|
}
|
|
1029
|
-
if (
|
|
1030
|
-
const
|
|
1031
|
-
|
|
1049
|
+
if (s) {
|
|
1050
|
+
const p = m === "y" ? "top" : "left", y = m === "y" ? "bottom" : "right", x = d + a[p], b = d - a[y];
|
|
1051
|
+
d = Tt(x, d, b);
|
|
1032
1052
|
}
|
|
1033
|
-
const
|
|
1053
|
+
const g = u.fn({
|
|
1034
1054
|
...e,
|
|
1035
|
-
[
|
|
1036
|
-
[
|
|
1055
|
+
[h]: v,
|
|
1056
|
+
[m]: d
|
|
1037
1057
|
});
|
|
1038
1058
|
return {
|
|
1039
|
-
...
|
|
1059
|
+
...g,
|
|
1040
1060
|
data: {
|
|
1041
|
-
x:
|
|
1042
|
-
y:
|
|
1061
|
+
x: g.x - n,
|
|
1062
|
+
y: g.y - r,
|
|
1043
1063
|
enabled: {
|
|
1044
|
-
[
|
|
1045
|
-
[
|
|
1064
|
+
[h]: c,
|
|
1065
|
+
[m]: s
|
|
1046
1066
|
}
|
|
1047
1067
|
}
|
|
1048
1068
|
};
|
|
1049
1069
|
}
|
|
1050
1070
|
};
|
|
1051
|
-
},
|
|
1071
|
+
}, Ln = function(t) {
|
|
1052
1072
|
return t === void 0 && (t = {}), {
|
|
1053
1073
|
options: t,
|
|
1054
1074
|
fn(e) {
|
|
1055
1075
|
const {
|
|
1056
1076
|
x: n,
|
|
1057
|
-
y:
|
|
1058
|
-
placement:
|
|
1077
|
+
y: r,
|
|
1078
|
+
placement: o,
|
|
1059
1079
|
rects: i,
|
|
1060
|
-
middlewareData:
|
|
1080
|
+
middlewareData: c
|
|
1061
1081
|
} = e, {
|
|
1062
|
-
offset:
|
|
1063
|
-
mainAxis:
|
|
1064
|
-
crossAxis:
|
|
1065
|
-
} =
|
|
1082
|
+
offset: s = 0,
|
|
1083
|
+
mainAxis: u = !0,
|
|
1084
|
+
crossAxis: f = !0
|
|
1085
|
+
} = Y(t, e), l = {
|
|
1066
1086
|
x: n,
|
|
1067
|
-
y:
|
|
1068
|
-
},
|
|
1069
|
-
let
|
|
1070
|
-
const
|
|
1071
|
-
mainAxis:
|
|
1087
|
+
y: r
|
|
1088
|
+
}, a = _(o), m = Nt(a);
|
|
1089
|
+
let h = l[m], v = l[a];
|
|
1090
|
+
const d = Y(s, e), g = typeof d == "number" ? {
|
|
1091
|
+
mainAxis: d,
|
|
1072
1092
|
crossAxis: 0
|
|
1073
1093
|
} : {
|
|
1074
1094
|
mainAxis: 0,
|
|
1075
1095
|
crossAxis: 0,
|
|
1076
|
-
...
|
|
1096
|
+
...d
|
|
1077
1097
|
};
|
|
1078
|
-
if (
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1098
|
+
if (u) {
|
|
1099
|
+
const x = m === "y" ? "height" : "width", b = i.reference[m] - i.floating[x] + g.mainAxis, S = i.reference[m] + i.reference[x] - g.mainAxis;
|
|
1100
|
+
h < b ? h = b : h > S && (h = S);
|
|
1081
1101
|
}
|
|
1082
|
-
if (
|
|
1083
|
-
var
|
|
1084
|
-
const
|
|
1085
|
-
|
|
1102
|
+
if (f) {
|
|
1103
|
+
var p, y;
|
|
1104
|
+
const x = m === "y" ? "width" : "height", b = de.has(q(o)), S = i.reference[a] - i.floating[x] + (b && ((p = c.offset) == null ? void 0 : p[a]) || 0) + (b ? 0 : g.crossAxis), C = i.reference[a] + i.reference[x] + (b ? 0 : ((y = c.offset) == null ? void 0 : y[a]) || 0) - (b ? g.crossAxis : 0);
|
|
1105
|
+
v < S ? v = S : v > C && (v = C);
|
|
1086
1106
|
}
|
|
1087
1107
|
return {
|
|
1088
|
-
[
|
|
1089
|
-
[
|
|
1108
|
+
[m]: h,
|
|
1109
|
+
[a]: v
|
|
1090
1110
|
};
|
|
1091
1111
|
}
|
|
1092
1112
|
};
|
|
1093
|
-
},
|
|
1113
|
+
}, Tn = function(t) {
|
|
1094
1114
|
return t === void 0 && (t = {}), {
|
|
1095
1115
|
name: "size",
|
|
1096
1116
|
options: t,
|
|
1097
1117
|
async fn(e) {
|
|
1098
|
-
var n,
|
|
1118
|
+
var n, r;
|
|
1099
1119
|
const {
|
|
1100
|
-
placement:
|
|
1120
|
+
placement: o,
|
|
1101
1121
|
rects: i,
|
|
1102
|
-
platform:
|
|
1103
|
-
elements:
|
|
1122
|
+
platform: c,
|
|
1123
|
+
elements: s
|
|
1104
1124
|
} = e, {
|
|
1105
|
-
apply:
|
|
1125
|
+
apply: u = () => {
|
|
1106
1126
|
},
|
|
1107
|
-
...
|
|
1108
|
-
} =
|
|
1109
|
-
width:
|
|
1110
|
-
height:
|
|
1127
|
+
...f
|
|
1128
|
+
} = Y(t, e), l = await c.detectOverflow(e, f), a = q(o), m = ot(o), h = _(o) === "y", {
|
|
1129
|
+
width: v,
|
|
1130
|
+
height: d
|
|
1111
1131
|
} = i.floating;
|
|
1112
|
-
let
|
|
1113
|
-
|
|
1114
|
-
const
|
|
1115
|
-
let
|
|
1116
|
-
if ((n = e.middlewareData.shift) != null && n.enabled.x && (
|
|
1117
|
-
const
|
|
1118
|
-
|
|
1132
|
+
let g, p;
|
|
1133
|
+
a === "top" || a === "bottom" ? (g = a, p = m === (await (c.isRTL == null ? void 0 : c.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (p = a, g = m === "end" ? "top" : "bottom");
|
|
1134
|
+
const y = d - l.top - l.bottom, x = v - l.left - l.right, b = U(d - l[g], y), S = U(v - l[p], x), C = !e.middlewareData.shift;
|
|
1135
|
+
let R = b, P = S;
|
|
1136
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && (P = x), (r = e.middlewareData.shift) != null && r.enabled.y && (R = y), C && !m) {
|
|
1137
|
+
const O = B(l.left, 0), M = B(l.right, 0), T = B(l.top, 0), D = B(l.bottom, 0);
|
|
1138
|
+
h ? P = v - 2 * (O !== 0 || M !== 0 ? O + M : B(l.left, l.right)) : R = d - 2 * (T !== 0 || D !== 0 ? T + D : B(l.top, l.bottom));
|
|
1119
1139
|
}
|
|
1120
|
-
await
|
|
1140
|
+
await u({
|
|
1121
1141
|
...e,
|
|
1122
|
-
availableWidth:
|
|
1123
|
-
availableHeight:
|
|
1142
|
+
availableWidth: P,
|
|
1143
|
+
availableHeight: R
|
|
1124
1144
|
});
|
|
1125
|
-
const
|
|
1126
|
-
return
|
|
1145
|
+
const L = await c.getDimensions(s.floating);
|
|
1146
|
+
return v !== L.width || d !== L.height ? {
|
|
1127
1147
|
reset: {
|
|
1128
1148
|
rects: !0
|
|
1129
1149
|
}
|
|
@@ -1131,49 +1151,49 @@ const Fo = function(t) {
|
|
|
1131
1151
|
}
|
|
1132
1152
|
};
|
|
1133
1153
|
};
|
|
1134
|
-
function
|
|
1154
|
+
function bt() {
|
|
1135
1155
|
return typeof window < "u";
|
|
1136
1156
|
}
|
|
1137
|
-
function
|
|
1138
|
-
return
|
|
1157
|
+
function it(t) {
|
|
1158
|
+
return he(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
1139
1159
|
}
|
|
1140
|
-
function
|
|
1160
|
+
function F(t) {
|
|
1141
1161
|
var e;
|
|
1142
1162
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
1143
1163
|
}
|
|
1144
|
-
function
|
|
1164
|
+
function X(t) {
|
|
1145
1165
|
var e;
|
|
1146
|
-
return (e = (
|
|
1166
|
+
return (e = (he(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
1147
1167
|
}
|
|
1148
|
-
function
|
|
1149
|
-
return
|
|
1168
|
+
function he(t) {
|
|
1169
|
+
return bt() ? t instanceof Node || t instanceof F(t).Node : !1;
|
|
1150
1170
|
}
|
|
1151
|
-
function
|
|
1152
|
-
return
|
|
1171
|
+
function V(t) {
|
|
1172
|
+
return bt() ? t instanceof Element || t instanceof F(t).Element : !1;
|
|
1153
1173
|
}
|
|
1154
|
-
function
|
|
1155
|
-
return
|
|
1174
|
+
function j(t) {
|
|
1175
|
+
return bt() ? t instanceof HTMLElement || t instanceof F(t).HTMLElement : !1;
|
|
1156
1176
|
}
|
|
1157
|
-
function
|
|
1158
|
-
return !
|
|
1177
|
+
function Kt(t) {
|
|
1178
|
+
return !bt() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof F(t).ShadowRoot;
|
|
1159
1179
|
}
|
|
1160
|
-
const
|
|
1161
|
-
function
|
|
1180
|
+
const Dn = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
1181
|
+
function st(t) {
|
|
1162
1182
|
const {
|
|
1163
1183
|
overflow: e,
|
|
1164
1184
|
overflowX: n,
|
|
1165
|
-
overflowY:
|
|
1166
|
-
display:
|
|
1167
|
-
} =
|
|
1168
|
-
return /auto|scroll|overlay|hidden|clip/.test(e +
|
|
1169
|
-
}
|
|
1170
|
-
const
|
|
1171
|
-
function
|
|
1172
|
-
return
|
|
1173
|
-
}
|
|
1174
|
-
const
|
|
1175
|
-
function
|
|
1176
|
-
return
|
|
1185
|
+
overflowY: r,
|
|
1186
|
+
display: o
|
|
1187
|
+
} = H(t);
|
|
1188
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + r + n) && !Dn.has(o);
|
|
1189
|
+
}
|
|
1190
|
+
const Wn = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
1191
|
+
function Nn(t) {
|
|
1192
|
+
return Wn.has(it(t));
|
|
1193
|
+
}
|
|
1194
|
+
const Bn = [":popover-open", ":modal"];
|
|
1195
|
+
function St(t) {
|
|
1196
|
+
return Bn.some((e) => {
|
|
1177
1197
|
try {
|
|
1178
1198
|
return t.matches(e);
|
|
1179
1199
|
} catch {
|
|
@@ -1181,34 +1201,34 @@ function oe(t) {
|
|
|
1181
1201
|
}
|
|
1182
1202
|
});
|
|
1183
1203
|
}
|
|
1184
|
-
const
|
|
1185
|
-
function
|
|
1186
|
-
const e =
|
|
1187
|
-
return
|
|
1204
|
+
const Fn = ["transform", "translate", "scale", "rotate", "perspective"], Vn = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Hn = ["paint", "layout", "strict", "content"];
|
|
1205
|
+
function Vt(t) {
|
|
1206
|
+
const e = Ht(), n = V(t) ? H(t) : t;
|
|
1207
|
+
return Fn.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) || Vn.some((r) => (n.willChange || "").includes(r)) || Hn.some((r) => (n.contain || "").includes(r));
|
|
1188
1208
|
}
|
|
1189
|
-
function
|
|
1190
|
-
let e =
|
|
1191
|
-
for (;
|
|
1192
|
-
if (
|
|
1209
|
+
function $n(t) {
|
|
1210
|
+
let e = G(t);
|
|
1211
|
+
for (; j(e) && !rt(e); ) {
|
|
1212
|
+
if (Vt(e))
|
|
1193
1213
|
return e;
|
|
1194
|
-
if (
|
|
1214
|
+
if (St(e))
|
|
1195
1215
|
return null;
|
|
1196
|
-
e =
|
|
1216
|
+
e = G(e);
|
|
1197
1217
|
}
|
|
1198
1218
|
return null;
|
|
1199
1219
|
}
|
|
1200
|
-
function
|
|
1220
|
+
function Ht() {
|
|
1201
1221
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1202
1222
|
}
|
|
1203
|
-
const
|
|
1204
|
-
function
|
|
1205
|
-
return
|
|
1223
|
+
const In = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
1224
|
+
function rt(t) {
|
|
1225
|
+
return In.has(it(t));
|
|
1206
1226
|
}
|
|
1207
|
-
function
|
|
1208
|
-
return
|
|
1227
|
+
function H(t) {
|
|
1228
|
+
return F(t).getComputedStyle(t);
|
|
1209
1229
|
}
|
|
1210
|
-
function
|
|
1211
|
-
return
|
|
1230
|
+
function Ct(t) {
|
|
1231
|
+
return V(t) ? {
|
|
1212
1232
|
scrollLeft: t.scrollLeft,
|
|
1213
1233
|
scrollTop: t.scrollTop
|
|
1214
1234
|
} : {
|
|
@@ -1216,569 +1236,569 @@ function re(t) {
|
|
|
1216
1236
|
scrollTop: t.scrollY
|
|
1217
1237
|
};
|
|
1218
1238
|
}
|
|
1219
|
-
function
|
|
1220
|
-
if (
|
|
1239
|
+
function G(t) {
|
|
1240
|
+
if (it(t) === "html")
|
|
1221
1241
|
return t;
|
|
1222
1242
|
const e = (
|
|
1223
1243
|
// Step into the shadow DOM of the parent of a slotted node.
|
|
1224
1244
|
t.assignedSlot || // DOM Element detected.
|
|
1225
1245
|
t.parentNode || // ShadowRoot detected.
|
|
1226
|
-
|
|
1227
|
-
|
|
1246
|
+
Kt(t) && t.host || // Fallback.
|
|
1247
|
+
X(t)
|
|
1228
1248
|
);
|
|
1229
|
-
return
|
|
1249
|
+
return Kt(e) ? e.host : e;
|
|
1230
1250
|
}
|
|
1231
|
-
function
|
|
1232
|
-
const e =
|
|
1233
|
-
return
|
|
1251
|
+
function me(t) {
|
|
1252
|
+
const e = G(t);
|
|
1253
|
+
return rt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : j(e) && st(e) ? e : me(e);
|
|
1234
1254
|
}
|
|
1235
|
-
function
|
|
1236
|
-
var
|
|
1255
|
+
function ct(t, e, n) {
|
|
1256
|
+
var r;
|
|
1237
1257
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
1238
|
-
const
|
|
1258
|
+
const o = me(t), i = o === ((r = t.ownerDocument) == null ? void 0 : r.body), c = F(o);
|
|
1239
1259
|
if (i) {
|
|
1240
|
-
const
|
|
1241
|
-
return e.concat(
|
|
1260
|
+
const s = Wt(c);
|
|
1261
|
+
return e.concat(c, c.visualViewport || [], st(o) ? o : [], s && n ? ct(s) : []);
|
|
1242
1262
|
}
|
|
1243
|
-
return e.concat(
|
|
1263
|
+
return e.concat(o, ct(o, [], n));
|
|
1244
1264
|
}
|
|
1245
|
-
function
|
|
1265
|
+
function Wt(t) {
|
|
1246
1266
|
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
1247
1267
|
}
|
|
1248
|
-
function
|
|
1249
|
-
const e =
|
|
1250
|
-
let n = parseFloat(e.width) || 0,
|
|
1251
|
-
const
|
|
1252
|
-
return
|
|
1268
|
+
function ge(t) {
|
|
1269
|
+
const e = H(t);
|
|
1270
|
+
let n = parseFloat(e.width) || 0, r = parseFloat(e.height) || 0;
|
|
1271
|
+
const o = j(t), i = o ? t.offsetWidth : n, c = o ? t.offsetHeight : r, s = vt(n) !== i || vt(r) !== c;
|
|
1272
|
+
return s && (n = i, r = c), {
|
|
1253
1273
|
width: n,
|
|
1254
|
-
height:
|
|
1255
|
-
$:
|
|
1274
|
+
height: r,
|
|
1275
|
+
$: s
|
|
1256
1276
|
};
|
|
1257
1277
|
}
|
|
1258
|
-
function
|
|
1259
|
-
return
|
|
1278
|
+
function $t(t) {
|
|
1279
|
+
return V(t) ? t : t.contextElement;
|
|
1260
1280
|
}
|
|
1261
|
-
function
|
|
1262
|
-
const e =
|
|
1263
|
-
if (!
|
|
1264
|
-
return
|
|
1281
|
+
function nt(t) {
|
|
1282
|
+
const e = $t(t);
|
|
1283
|
+
if (!j(e))
|
|
1284
|
+
return z(1);
|
|
1265
1285
|
const n = e.getBoundingClientRect(), {
|
|
1266
|
-
width:
|
|
1267
|
-
height:
|
|
1286
|
+
width: r,
|
|
1287
|
+
height: o,
|
|
1268
1288
|
$: i
|
|
1269
|
-
} =
|
|
1270
|
-
let
|
|
1271
|
-
return (!
|
|
1272
|
-
x:
|
|
1273
|
-
y:
|
|
1289
|
+
} = ge(e);
|
|
1290
|
+
let c = (i ? vt(n.width) : n.width) / r, s = (i ? vt(n.height) : n.height) / o;
|
|
1291
|
+
return (!c || !Number.isFinite(c)) && (c = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
1292
|
+
x: c,
|
|
1293
|
+
y: s
|
|
1274
1294
|
};
|
|
1275
1295
|
}
|
|
1276
|
-
const
|
|
1277
|
-
function
|
|
1278
|
-
const e =
|
|
1279
|
-
return !
|
|
1296
|
+
const _n = /* @__PURE__ */ z(0);
|
|
1297
|
+
function ve(t) {
|
|
1298
|
+
const e = F(t);
|
|
1299
|
+
return !Ht() || !e.visualViewport ? _n : {
|
|
1280
1300
|
x: e.visualViewport.offsetLeft,
|
|
1281
1301
|
y: e.visualViewport.offsetTop
|
|
1282
1302
|
};
|
|
1283
1303
|
}
|
|
1284
|
-
function
|
|
1285
|
-
return e === void 0 && (e = !1), !n || e && n !==
|
|
1304
|
+
function zn(t, e, n) {
|
|
1305
|
+
return e === void 0 && (e = !1), !n || e && n !== F(t) ? !1 : e;
|
|
1286
1306
|
}
|
|
1287
|
-
function
|
|
1307
|
+
function K(t, e, n, r) {
|
|
1288
1308
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
1289
|
-
const
|
|
1290
|
-
let
|
|
1291
|
-
e && (
|
|
1292
|
-
const
|
|
1293
|
-
let
|
|
1309
|
+
const o = t.getBoundingClientRect(), i = $t(t);
|
|
1310
|
+
let c = z(1);
|
|
1311
|
+
e && (r ? V(r) && (c = nt(r)) : c = nt(t));
|
|
1312
|
+
const s = zn(i, n, r) ? ve(i) : z(0);
|
|
1313
|
+
let u = (o.left + s.x) / c.x, f = (o.top + s.y) / c.y, l = o.width / c.x, a = o.height / c.y;
|
|
1294
1314
|
if (i) {
|
|
1295
|
-
const
|
|
1296
|
-
let
|
|
1297
|
-
for (;
|
|
1298
|
-
const
|
|
1299
|
-
|
|
1315
|
+
const m = F(i), h = r && V(r) ? F(r) : r;
|
|
1316
|
+
let v = m, d = Wt(v);
|
|
1317
|
+
for (; d && r && h !== v; ) {
|
|
1318
|
+
const g = nt(d), p = d.getBoundingClientRect(), y = H(d), x = p.left + (d.clientLeft + parseFloat(y.paddingLeft)) * g.x, b = p.top + (d.clientTop + parseFloat(y.paddingTop)) * g.y;
|
|
1319
|
+
u *= g.x, f *= g.y, l *= g.x, a *= g.y, u += x, f += b, v = F(d), d = Wt(v);
|
|
1300
1320
|
}
|
|
1301
1321
|
}
|
|
1302
|
-
return
|
|
1303
|
-
width:
|
|
1304
|
-
height:
|
|
1305
|
-
x:
|
|
1306
|
-
y:
|
|
1322
|
+
return wt({
|
|
1323
|
+
width: l,
|
|
1324
|
+
height: a,
|
|
1325
|
+
x: u,
|
|
1326
|
+
y: f
|
|
1307
1327
|
});
|
|
1308
1328
|
}
|
|
1309
|
-
function
|
|
1310
|
-
const n =
|
|
1311
|
-
return e ? e.left + n :
|
|
1329
|
+
function Rt(t, e) {
|
|
1330
|
+
const n = Ct(t).scrollLeft;
|
|
1331
|
+
return e ? e.left + n : K(X(t)).left + n;
|
|
1312
1332
|
}
|
|
1313
|
-
function
|
|
1314
|
-
const n = t.getBoundingClientRect(),
|
|
1333
|
+
function pe(t, e) {
|
|
1334
|
+
const n = t.getBoundingClientRect(), r = n.left + e.scrollLeft - Rt(t, n), o = n.top + e.scrollTop;
|
|
1315
1335
|
return {
|
|
1316
|
-
x:
|
|
1317
|
-
y:
|
|
1336
|
+
x: r,
|
|
1337
|
+
y: o
|
|
1318
1338
|
};
|
|
1319
1339
|
}
|
|
1320
|
-
function
|
|
1340
|
+
function jn(t) {
|
|
1321
1341
|
let {
|
|
1322
1342
|
elements: e,
|
|
1323
1343
|
rect: n,
|
|
1324
|
-
offsetParent:
|
|
1325
|
-
strategy:
|
|
1344
|
+
offsetParent: r,
|
|
1345
|
+
strategy: o
|
|
1326
1346
|
} = t;
|
|
1327
|
-
const i =
|
|
1328
|
-
if (
|
|
1347
|
+
const i = o === "fixed", c = X(r), s = e ? St(e.floating) : !1;
|
|
1348
|
+
if (r === c || s && i)
|
|
1329
1349
|
return n;
|
|
1330
|
-
let
|
|
1350
|
+
let u = {
|
|
1331
1351
|
scrollLeft: 0,
|
|
1332
1352
|
scrollTop: 0
|
|
1333
|
-
},
|
|
1334
|
-
const
|
|
1335
|
-
if ((
|
|
1336
|
-
const
|
|
1337
|
-
|
|
1353
|
+
}, f = z(1);
|
|
1354
|
+
const l = z(0), a = j(r);
|
|
1355
|
+
if ((a || !a && !i) && ((it(r) !== "body" || st(c)) && (u = Ct(r)), j(r))) {
|
|
1356
|
+
const h = K(r);
|
|
1357
|
+
f = nt(r), l.x = h.x + r.clientLeft, l.y = h.y + r.clientTop;
|
|
1338
1358
|
}
|
|
1339
|
-
const
|
|
1359
|
+
const m = c && !a && !i ? pe(c, u) : z(0);
|
|
1340
1360
|
return {
|
|
1341
|
-
width: n.width *
|
|
1342
|
-
height: n.height *
|
|
1343
|
-
x: n.x *
|
|
1344
|
-
y: n.y *
|
|
1361
|
+
width: n.width * f.x,
|
|
1362
|
+
height: n.height * f.y,
|
|
1363
|
+
x: n.x * f.x - u.scrollLeft * f.x + l.x + m.x,
|
|
1364
|
+
y: n.y * f.y - u.scrollTop * f.y + l.y + m.y
|
|
1345
1365
|
};
|
|
1346
1366
|
}
|
|
1347
|
-
function
|
|
1367
|
+
function Xn(t) {
|
|
1348
1368
|
return Array.from(t.getClientRects());
|
|
1349
1369
|
}
|
|
1350
|
-
function
|
|
1351
|
-
const e =
|
|
1352
|
-
let
|
|
1353
|
-
const
|
|
1354
|
-
return
|
|
1355
|
-
width:
|
|
1370
|
+
function Yn(t) {
|
|
1371
|
+
const e = X(t), n = Ct(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);
|
|
1372
|
+
let c = -n.scrollLeft + Rt(t);
|
|
1373
|
+
const s = -n.scrollTop;
|
|
1374
|
+
return H(r).direction === "rtl" && (c += B(e.clientWidth, r.clientWidth) - o), {
|
|
1375
|
+
width: o,
|
|
1356
1376
|
height: i,
|
|
1357
|
-
x:
|
|
1358
|
-
y:
|
|
1377
|
+
x: c,
|
|
1378
|
+
y: s
|
|
1359
1379
|
};
|
|
1360
1380
|
}
|
|
1361
|
-
const
|
|
1362
|
-
function
|
|
1363
|
-
const n =
|
|
1364
|
-
let i =
|
|
1365
|
-
if (
|
|
1366
|
-
i =
|
|
1367
|
-
const
|
|
1368
|
-
(!
|
|
1381
|
+
const Qt = 25;
|
|
1382
|
+
function qn(t, e) {
|
|
1383
|
+
const n = F(t), r = X(t), o = n.visualViewport;
|
|
1384
|
+
let i = r.clientWidth, c = r.clientHeight, s = 0, u = 0;
|
|
1385
|
+
if (o) {
|
|
1386
|
+
i = o.width, c = o.height;
|
|
1387
|
+
const l = Ht();
|
|
1388
|
+
(!l || l && e === "fixed") && (s = o.offsetLeft, u = o.offsetTop);
|
|
1369
1389
|
}
|
|
1370
|
-
const
|
|
1371
|
-
if (
|
|
1372
|
-
const
|
|
1373
|
-
|
|
1374
|
-
} else
|
|
1390
|
+
const f = Rt(r);
|
|
1391
|
+
if (f <= 0) {
|
|
1392
|
+
const l = r.ownerDocument, a = l.body, m = getComputedStyle(a), h = l.compatMode === "CSS1Compat" && parseFloat(m.marginLeft) + parseFloat(m.marginRight) || 0, v = Math.abs(r.clientWidth - a.clientWidth - h);
|
|
1393
|
+
v <= Qt && (i -= v);
|
|
1394
|
+
} else f <= Qt && (i += f);
|
|
1375
1395
|
return {
|
|
1376
1396
|
width: i,
|
|
1377
|
-
height:
|
|
1378
|
-
x:
|
|
1379
|
-
y:
|
|
1397
|
+
height: c,
|
|
1398
|
+
x: s,
|
|
1399
|
+
y: u
|
|
1380
1400
|
};
|
|
1381
1401
|
}
|
|
1382
|
-
const
|
|
1383
|
-
function
|
|
1384
|
-
const n =
|
|
1402
|
+
const Zn = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
1403
|
+
function Un(t, e) {
|
|
1404
|
+
const n = K(t, !0, e === "fixed"), r = n.top + t.clientTop, o = n.left + t.clientLeft, i = j(t) ? nt(t) : z(1), c = t.clientWidth * i.x, s = t.clientHeight * i.y, u = o * i.x, f = r * i.y;
|
|
1385
1405
|
return {
|
|
1386
|
-
width:
|
|
1387
|
-
height:
|
|
1388
|
-
x:
|
|
1389
|
-
y:
|
|
1406
|
+
width: c,
|
|
1407
|
+
height: s,
|
|
1408
|
+
x: u,
|
|
1409
|
+
y: f
|
|
1390
1410
|
};
|
|
1391
1411
|
}
|
|
1392
|
-
function
|
|
1393
|
-
let
|
|
1412
|
+
function Jt(t, e, n) {
|
|
1413
|
+
let r;
|
|
1394
1414
|
if (e === "viewport")
|
|
1395
|
-
|
|
1415
|
+
r = qn(t, n);
|
|
1396
1416
|
else if (e === "document")
|
|
1397
|
-
|
|
1398
|
-
else if (
|
|
1399
|
-
|
|
1417
|
+
r = Yn(X(t));
|
|
1418
|
+
else if (V(e))
|
|
1419
|
+
r = Un(e, n);
|
|
1400
1420
|
else {
|
|
1401
|
-
const
|
|
1402
|
-
|
|
1403
|
-
x: e.x -
|
|
1404
|
-
y: e.y -
|
|
1421
|
+
const o = ve(t);
|
|
1422
|
+
r = {
|
|
1423
|
+
x: e.x - o.x,
|
|
1424
|
+
y: e.y - o.y,
|
|
1405
1425
|
width: e.width,
|
|
1406
1426
|
height: e.height
|
|
1407
1427
|
};
|
|
1408
1428
|
}
|
|
1409
|
-
return
|
|
1429
|
+
return wt(r);
|
|
1410
1430
|
}
|
|
1411
|
-
function
|
|
1412
|
-
const n =
|
|
1413
|
-
return n === e || !
|
|
1431
|
+
function we(t, e) {
|
|
1432
|
+
const n = G(t);
|
|
1433
|
+
return n === e || !V(n) || rt(n) ? !1 : H(n).position === "fixed" || we(n, e);
|
|
1414
1434
|
}
|
|
1415
|
-
function
|
|
1435
|
+
function Gn(t, e) {
|
|
1416
1436
|
const n = e.get(t);
|
|
1417
1437
|
if (n)
|
|
1418
1438
|
return n;
|
|
1419
|
-
let
|
|
1420
|
-
const i =
|
|
1421
|
-
let
|
|
1422
|
-
for (;
|
|
1423
|
-
const
|
|
1424
|
-
!
|
|
1439
|
+
let r = ct(t, [], !1).filter((s) => V(s) && it(s) !== "body"), o = null;
|
|
1440
|
+
const i = H(t).position === "fixed";
|
|
1441
|
+
let c = i ? G(t) : t;
|
|
1442
|
+
for (; V(c) && !rt(c); ) {
|
|
1443
|
+
const s = H(c), u = Vt(c);
|
|
1444
|
+
!u && s.position === "fixed" && (o = null), (i ? !u && !o : !u && s.position === "static" && !!o && Zn.has(o.position) || st(c) && !u && we(t, c)) ? r = r.filter((l) => l !== c) : o = s, c = G(c);
|
|
1425
1445
|
}
|
|
1426
|
-
return e.set(t,
|
|
1446
|
+
return e.set(t, r), r;
|
|
1427
1447
|
}
|
|
1428
|
-
function
|
|
1448
|
+
function Kn(t) {
|
|
1429
1449
|
let {
|
|
1430
1450
|
element: e,
|
|
1431
1451
|
boundary: n,
|
|
1432
|
-
rootBoundary:
|
|
1433
|
-
strategy:
|
|
1452
|
+
rootBoundary: r,
|
|
1453
|
+
strategy: o
|
|
1434
1454
|
} = t;
|
|
1435
|
-
const
|
|
1436
|
-
const
|
|
1437
|
-
return
|
|
1438
|
-
},
|
|
1455
|
+
const c = [...n === "clippingAncestors" ? St(e) ? [] : Gn(e, this._c) : [].concat(n), r], s = c[0], u = c.reduce((f, l) => {
|
|
1456
|
+
const a = Jt(e, l, o);
|
|
1457
|
+
return f.top = B(a.top, f.top), f.right = U(a.right, f.right), f.bottom = U(a.bottom, f.bottom), f.left = B(a.left, f.left), f;
|
|
1458
|
+
}, Jt(e, s, o));
|
|
1439
1459
|
return {
|
|
1440
|
-
width:
|
|
1441
|
-
height:
|
|
1442
|
-
x:
|
|
1443
|
-
y:
|
|
1460
|
+
width: u.right - u.left,
|
|
1461
|
+
height: u.bottom - u.top,
|
|
1462
|
+
x: u.left,
|
|
1463
|
+
y: u.top
|
|
1444
1464
|
};
|
|
1445
1465
|
}
|
|
1446
|
-
function
|
|
1466
|
+
function Qn(t) {
|
|
1447
1467
|
const {
|
|
1448
1468
|
width: e,
|
|
1449
1469
|
height: n
|
|
1450
|
-
} =
|
|
1470
|
+
} = ge(t);
|
|
1451
1471
|
return {
|
|
1452
1472
|
width: e,
|
|
1453
1473
|
height: n
|
|
1454
1474
|
};
|
|
1455
1475
|
}
|
|
1456
|
-
function
|
|
1457
|
-
const
|
|
1458
|
-
let
|
|
1476
|
+
function Jn(t, e, n) {
|
|
1477
|
+
const r = j(e), o = X(e), i = n === "fixed", c = K(t, !0, i, e);
|
|
1478
|
+
let s = {
|
|
1459
1479
|
scrollLeft: 0,
|
|
1460
1480
|
scrollTop: 0
|
|
1461
1481
|
};
|
|
1462
|
-
const
|
|
1463
|
-
function
|
|
1464
|
-
|
|
1482
|
+
const u = z(0);
|
|
1483
|
+
function f() {
|
|
1484
|
+
u.x = Rt(o);
|
|
1465
1485
|
}
|
|
1466
|
-
if (
|
|
1467
|
-
if ((
|
|
1468
|
-
const
|
|
1469
|
-
|
|
1470
|
-
} else
|
|
1471
|
-
i && !
|
|
1472
|
-
const
|
|
1486
|
+
if (r || !r && !i)
|
|
1487
|
+
if ((it(e) !== "body" || st(o)) && (s = Ct(e)), r) {
|
|
1488
|
+
const h = K(e, !0, i, e);
|
|
1489
|
+
u.x = h.x + e.clientLeft, u.y = h.y + e.clientTop;
|
|
1490
|
+
} else o && f();
|
|
1491
|
+
i && !r && o && f();
|
|
1492
|
+
const l = o && !r && !i ? pe(o, s) : z(0), a = c.left + s.scrollLeft - u.x - l.x, m = c.top + s.scrollTop - u.y - l.y;
|
|
1473
1493
|
return {
|
|
1474
|
-
x:
|
|
1475
|
-
y:
|
|
1476
|
-
width:
|
|
1477
|
-
height:
|
|
1494
|
+
x: a,
|
|
1495
|
+
y: m,
|
|
1496
|
+
width: c.width,
|
|
1497
|
+
height: c.height
|
|
1478
1498
|
};
|
|
1479
1499
|
}
|
|
1480
|
-
function
|
|
1481
|
-
return
|
|
1500
|
+
function Mt(t) {
|
|
1501
|
+
return H(t).position === "static";
|
|
1482
1502
|
}
|
|
1483
|
-
function
|
|
1484
|
-
if (!
|
|
1503
|
+
function te(t, e) {
|
|
1504
|
+
if (!j(t) || H(t).position === "fixed")
|
|
1485
1505
|
return null;
|
|
1486
1506
|
if (e)
|
|
1487
1507
|
return e(t);
|
|
1488
1508
|
let n = t.offsetParent;
|
|
1489
|
-
return
|
|
1509
|
+
return X(t) === n && (n = n.ownerDocument.body), n;
|
|
1490
1510
|
}
|
|
1491
|
-
function
|
|
1492
|
-
const n =
|
|
1493
|
-
if (
|
|
1511
|
+
function ye(t, e) {
|
|
1512
|
+
const n = F(t);
|
|
1513
|
+
if (St(t))
|
|
1494
1514
|
return n;
|
|
1495
|
-
if (!
|
|
1496
|
-
let
|
|
1497
|
-
for (;
|
|
1498
|
-
if (
|
|
1499
|
-
return
|
|
1500
|
-
|
|
1515
|
+
if (!j(t)) {
|
|
1516
|
+
let o = G(t);
|
|
1517
|
+
for (; o && !rt(o); ) {
|
|
1518
|
+
if (V(o) && !Mt(o))
|
|
1519
|
+
return o;
|
|
1520
|
+
o = G(o);
|
|
1501
1521
|
}
|
|
1502
1522
|
return n;
|
|
1503
1523
|
}
|
|
1504
|
-
let
|
|
1505
|
-
for (;
|
|
1506
|
-
|
|
1507
|
-
return
|
|
1524
|
+
let r = te(t, e);
|
|
1525
|
+
for (; r && Nn(r) && Mt(r); )
|
|
1526
|
+
r = te(r, e);
|
|
1527
|
+
return r && rt(r) && Mt(r) && !Vt(r) ? n : r || $n(t) || n;
|
|
1508
1528
|
}
|
|
1509
|
-
const
|
|
1510
|
-
const e = this.getOffsetParent ||
|
|
1529
|
+
const tr = async function(t) {
|
|
1530
|
+
const e = this.getOffsetParent || ye, n = this.getDimensions, r = await n(t.floating);
|
|
1511
1531
|
return {
|
|
1512
|
-
reference:
|
|
1532
|
+
reference: Jn(t.reference, await e(t.floating), t.strategy),
|
|
1513
1533
|
floating: {
|
|
1514
1534
|
x: 0,
|
|
1515
1535
|
y: 0,
|
|
1516
|
-
width:
|
|
1517
|
-
height:
|
|
1536
|
+
width: r.width,
|
|
1537
|
+
height: r.height
|
|
1518
1538
|
}
|
|
1519
1539
|
};
|
|
1520
1540
|
};
|
|
1521
|
-
function
|
|
1522
|
-
return
|
|
1523
|
-
}
|
|
1524
|
-
const
|
|
1525
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
1526
|
-
getDocumentElement:
|
|
1527
|
-
getClippingRect:
|
|
1528
|
-
getOffsetParent:
|
|
1529
|
-
getElementRects:
|
|
1530
|
-
getClientRects:
|
|
1531
|
-
getDimensions:
|
|
1532
|
-
getScale:
|
|
1533
|
-
isElement:
|
|
1534
|
-
isRTL:
|
|
1541
|
+
function er(t) {
|
|
1542
|
+
return H(t).direction === "rtl";
|
|
1543
|
+
}
|
|
1544
|
+
const nr = {
|
|
1545
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: jn,
|
|
1546
|
+
getDocumentElement: X,
|
|
1547
|
+
getClippingRect: Kn,
|
|
1548
|
+
getOffsetParent: ye,
|
|
1549
|
+
getElementRects: tr,
|
|
1550
|
+
getClientRects: Xn,
|
|
1551
|
+
getDimensions: Qn,
|
|
1552
|
+
getScale: nt,
|
|
1553
|
+
isElement: V,
|
|
1554
|
+
isRTL: er
|
|
1535
1555
|
};
|
|
1536
|
-
function
|
|
1556
|
+
function xe(t, e) {
|
|
1537
1557
|
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1538
1558
|
}
|
|
1539
|
-
function
|
|
1540
|
-
let n = null,
|
|
1541
|
-
const
|
|
1559
|
+
function rr(t, e) {
|
|
1560
|
+
let n = null, r;
|
|
1561
|
+
const o = X(t);
|
|
1542
1562
|
function i() {
|
|
1543
|
-
var
|
|
1544
|
-
clearTimeout(
|
|
1563
|
+
var s;
|
|
1564
|
+
clearTimeout(r), (s = n) == null || s.disconnect(), n = null;
|
|
1545
1565
|
}
|
|
1546
|
-
function s
|
|
1547
|
-
|
|
1548
|
-
const
|
|
1549
|
-
left:
|
|
1550
|
-
top:
|
|
1551
|
-
width:
|
|
1552
|
-
height:
|
|
1553
|
-
} =
|
|
1554
|
-
if (
|
|
1566
|
+
function c(s, u) {
|
|
1567
|
+
s === void 0 && (s = !1), u === void 0 && (u = 1), i();
|
|
1568
|
+
const f = t.getBoundingClientRect(), {
|
|
1569
|
+
left: l,
|
|
1570
|
+
top: a,
|
|
1571
|
+
width: m,
|
|
1572
|
+
height: h
|
|
1573
|
+
} = f;
|
|
1574
|
+
if (s || e(), !m || !h)
|
|
1555
1575
|
return;
|
|
1556
|
-
const
|
|
1557
|
-
rootMargin: -
|
|
1558
|
-
threshold:
|
|
1576
|
+
const v = dt(a), d = dt(o.clientWidth - (l + m)), g = dt(o.clientHeight - (a + h)), p = dt(l), x = {
|
|
1577
|
+
rootMargin: -v + "px " + -d + "px " + -g + "px " + -p + "px",
|
|
1578
|
+
threshold: B(0, U(1, u)) || 1
|
|
1559
1579
|
};
|
|
1560
|
-
let
|
|
1561
|
-
function
|
|
1562
|
-
const
|
|
1563
|
-
if (
|
|
1564
|
-
if (!
|
|
1565
|
-
return
|
|
1566
|
-
|
|
1567
|
-
|
|
1580
|
+
let b = !0;
|
|
1581
|
+
function S(C) {
|
|
1582
|
+
const R = C[0].intersectionRatio;
|
|
1583
|
+
if (R !== u) {
|
|
1584
|
+
if (!b)
|
|
1585
|
+
return c();
|
|
1586
|
+
R ? c(!1, R) : r = setTimeout(() => {
|
|
1587
|
+
c(!1, 1e-7);
|
|
1568
1588
|
}, 1e3);
|
|
1569
1589
|
}
|
|
1570
|
-
|
|
1590
|
+
R === 1 && !xe(f, t.getBoundingClientRect()) && c(), b = !1;
|
|
1571
1591
|
}
|
|
1572
1592
|
try {
|
|
1573
|
-
n = new IntersectionObserver(
|
|
1574
|
-
...
|
|
1593
|
+
n = new IntersectionObserver(S, {
|
|
1594
|
+
...x,
|
|
1575
1595
|
// Handle <iframe>s
|
|
1576
|
-
root:
|
|
1596
|
+
root: o.ownerDocument
|
|
1577
1597
|
});
|
|
1578
1598
|
} catch {
|
|
1579
|
-
n = new IntersectionObserver(
|
|
1599
|
+
n = new IntersectionObserver(S, x);
|
|
1580
1600
|
}
|
|
1581
1601
|
n.observe(t);
|
|
1582
1602
|
}
|
|
1583
|
-
return
|
|
1603
|
+
return c(!0), i;
|
|
1584
1604
|
}
|
|
1585
|
-
function
|
|
1586
|
-
|
|
1605
|
+
function vr(t, e, n, r) {
|
|
1606
|
+
r === void 0 && (r = {});
|
|
1587
1607
|
const {
|
|
1588
|
-
ancestorScroll:
|
|
1608
|
+
ancestorScroll: o = !0,
|
|
1589
1609
|
ancestorResize: i = !0,
|
|
1590
|
-
elementResize:
|
|
1591
|
-
layoutShift:
|
|
1592
|
-
animationFrame:
|
|
1593
|
-
} =
|
|
1594
|
-
|
|
1595
|
-
|
|
1610
|
+
elementResize: c = typeof ResizeObserver == "function",
|
|
1611
|
+
layoutShift: s = typeof IntersectionObserver == "function",
|
|
1612
|
+
animationFrame: u = !1
|
|
1613
|
+
} = r, f = $t(t), l = o || i ? [...f ? ct(f) : [], ...ct(e)] : [];
|
|
1614
|
+
l.forEach((p) => {
|
|
1615
|
+
o && p.addEventListener("scroll", n, {
|
|
1596
1616
|
passive: !0
|
|
1597
|
-
}), i &&
|
|
1617
|
+
}), i && p.addEventListener("resize", n);
|
|
1598
1618
|
});
|
|
1599
|
-
const
|
|
1600
|
-
let
|
|
1601
|
-
|
|
1602
|
-
let [
|
|
1603
|
-
|
|
1604
|
-
var
|
|
1605
|
-
(
|
|
1619
|
+
const a = f && s ? rr(f, n) : null;
|
|
1620
|
+
let m = -1, h = null;
|
|
1621
|
+
c && (h = new ResizeObserver((p) => {
|
|
1622
|
+
let [y] = p;
|
|
1623
|
+
y && y.target === f && h && (h.unobserve(e), cancelAnimationFrame(m), m = requestAnimationFrame(() => {
|
|
1624
|
+
var x;
|
|
1625
|
+
(x = h) == null || x.observe(e);
|
|
1606
1626
|
})), n();
|
|
1607
|
-
}),
|
|
1608
|
-
let
|
|
1609
|
-
|
|
1610
|
-
function
|
|
1611
|
-
const
|
|
1612
|
-
|
|
1627
|
+
}), f && !u && h.observe(f), h.observe(e));
|
|
1628
|
+
let v, d = u ? K(t) : null;
|
|
1629
|
+
u && g();
|
|
1630
|
+
function g() {
|
|
1631
|
+
const p = K(t);
|
|
1632
|
+
d && !xe(d, p) && n(), d = p, v = requestAnimationFrame(g);
|
|
1613
1633
|
}
|
|
1614
1634
|
return n(), () => {
|
|
1615
|
-
var
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
}),
|
|
1635
|
+
var p;
|
|
1636
|
+
l.forEach((y) => {
|
|
1637
|
+
o && y.removeEventListener("scroll", n), i && y.removeEventListener("resize", n);
|
|
1638
|
+
}), a == null || a(), (p = h) == null || p.disconnect(), h = null, u && cancelAnimationFrame(v);
|
|
1619
1639
|
};
|
|
1620
1640
|
}
|
|
1621
|
-
const
|
|
1622
|
-
const
|
|
1623
|
-
platform:
|
|
1641
|
+
const or = Mn, ir = kn, cr = En, sr = Tn, ar = On, ee = An, lr = Ln, fr = (t, e, n) => {
|
|
1642
|
+
const r = /* @__PURE__ */ new Map(), o = {
|
|
1643
|
+
platform: nr,
|
|
1624
1644
|
...n
|
|
1625
1645
|
}, i = {
|
|
1626
|
-
...
|
|
1627
|
-
_c:
|
|
1646
|
+
...o.platform,
|
|
1647
|
+
_c: r
|
|
1628
1648
|
};
|
|
1629
|
-
return
|
|
1630
|
-
...
|
|
1649
|
+
return Rn(t, e, {
|
|
1650
|
+
...o,
|
|
1631
1651
|
platform: i
|
|
1632
1652
|
});
|
|
1633
1653
|
};
|
|
1634
|
-
var
|
|
1635
|
-
},
|
|
1636
|
-
function
|
|
1654
|
+
var ur = typeof document < "u", dr = function() {
|
|
1655
|
+
}, gt = ur ? Ce : dr;
|
|
1656
|
+
function yt(t, e) {
|
|
1637
1657
|
if (t === e)
|
|
1638
1658
|
return !0;
|
|
1639
1659
|
if (typeof t != typeof e)
|
|
1640
1660
|
return !1;
|
|
1641
1661
|
if (typeof t == "function" && t.toString() === e.toString())
|
|
1642
1662
|
return !0;
|
|
1643
|
-
let n,
|
|
1663
|
+
let n, r, o;
|
|
1644
1664
|
if (t && e && typeof t == "object") {
|
|
1645
1665
|
if (Array.isArray(t)) {
|
|
1646
1666
|
if (n = t.length, n !== e.length) return !1;
|
|
1647
|
-
for (
|
|
1648
|
-
if (!
|
|
1667
|
+
for (r = n; r-- !== 0; )
|
|
1668
|
+
if (!yt(t[r], e[r]))
|
|
1649
1669
|
return !1;
|
|
1650
1670
|
return !0;
|
|
1651
1671
|
}
|
|
1652
|
-
if (
|
|
1672
|
+
if (o = Object.keys(t), n = o.length, n !== Object.keys(e).length)
|
|
1653
1673
|
return !1;
|
|
1654
|
-
for (
|
|
1655
|
-
if (!{}.hasOwnProperty.call(e,
|
|
1674
|
+
for (r = n; r-- !== 0; )
|
|
1675
|
+
if (!{}.hasOwnProperty.call(e, o[r]))
|
|
1656
1676
|
return !1;
|
|
1657
|
-
for (
|
|
1658
|
-
const i =
|
|
1659
|
-
if (!(i === "_owner" && t.$$typeof) && !
|
|
1677
|
+
for (r = n; r-- !== 0; ) {
|
|
1678
|
+
const i = o[r];
|
|
1679
|
+
if (!(i === "_owner" && t.$$typeof) && !yt(t[i], e[i]))
|
|
1660
1680
|
return !1;
|
|
1661
1681
|
}
|
|
1662
1682
|
return !0;
|
|
1663
1683
|
}
|
|
1664
1684
|
return t !== t && e !== e;
|
|
1665
1685
|
}
|
|
1666
|
-
function
|
|
1686
|
+
function be(t) {
|
|
1667
1687
|
return typeof window > "u" ? 1 : (t.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1668
1688
|
}
|
|
1669
|
-
function
|
|
1670
|
-
const n =
|
|
1689
|
+
function ne(t, e) {
|
|
1690
|
+
const n = be(t);
|
|
1671
1691
|
return Math.round(e * n) / n;
|
|
1672
1692
|
}
|
|
1673
|
-
function
|
|
1674
|
-
const e =
|
|
1675
|
-
return
|
|
1693
|
+
function kt(t) {
|
|
1694
|
+
const e = w.useRef(t);
|
|
1695
|
+
return gt(() => {
|
|
1676
1696
|
e.current = t;
|
|
1677
1697
|
}), e;
|
|
1678
1698
|
}
|
|
1679
|
-
function
|
|
1699
|
+
function pr(t) {
|
|
1680
1700
|
t === void 0 && (t = {});
|
|
1681
1701
|
const {
|
|
1682
1702
|
placement: e = "bottom",
|
|
1683
1703
|
strategy: n = "absolute",
|
|
1684
|
-
middleware:
|
|
1685
|
-
platform:
|
|
1704
|
+
middleware: r = [],
|
|
1705
|
+
platform: o,
|
|
1686
1706
|
elements: {
|
|
1687
1707
|
reference: i,
|
|
1688
|
-
floating:
|
|
1708
|
+
floating: c
|
|
1689
1709
|
} = {},
|
|
1690
|
-
transform:
|
|
1691
|
-
whileElementsMounted:
|
|
1692
|
-
open:
|
|
1693
|
-
} = t, [
|
|
1710
|
+
transform: s = !0,
|
|
1711
|
+
whileElementsMounted: u,
|
|
1712
|
+
open: f
|
|
1713
|
+
} = t, [l, a] = w.useState({
|
|
1694
1714
|
x: 0,
|
|
1695
1715
|
y: 0,
|
|
1696
1716
|
strategy: n,
|
|
1697
1717
|
placement: e,
|
|
1698
1718
|
middlewareData: {},
|
|
1699
1719
|
isPositioned: !1
|
|
1700
|
-
}), [
|
|
1701
|
-
|
|
1702
|
-
const [
|
|
1703
|
-
|
|
1704
|
-
}, []),
|
|
1705
|
-
|
|
1706
|
-
}, []),
|
|
1707
|
-
if (!
|
|
1720
|
+
}), [m, h] = w.useState(r);
|
|
1721
|
+
yt(m, r) || h(r);
|
|
1722
|
+
const [v, d] = w.useState(null), [g, p] = w.useState(null), y = w.useCallback((A) => {
|
|
1723
|
+
A !== C.current && (C.current = A, d(A));
|
|
1724
|
+
}, []), x = w.useCallback((A) => {
|
|
1725
|
+
A !== R.current && (R.current = A, p(A));
|
|
1726
|
+
}, []), b = i || v, S = c || g, C = w.useRef(null), R = w.useRef(null), P = w.useRef(l), L = u != null, O = kt(u), M = kt(o), T = kt(f), D = w.useCallback(() => {
|
|
1727
|
+
if (!C.current || !R.current)
|
|
1708
1728
|
return;
|
|
1709
|
-
const
|
|
1729
|
+
const A = {
|
|
1710
1730
|
placement: e,
|
|
1711
1731
|
strategy: n,
|
|
1712
|
-
middleware:
|
|
1732
|
+
middleware: m
|
|
1713
1733
|
};
|
|
1714
|
-
|
|
1715
|
-
const
|
|
1716
|
-
...
|
|
1734
|
+
M.current && (A.platform = M.current), fr(C.current, R.current, A).then((N) => {
|
|
1735
|
+
const Z = {
|
|
1736
|
+
...N,
|
|
1717
1737
|
// The floating element's position may be recomputed while it's closed
|
|
1718
1738
|
// but still mounted (such as when transitioning out). To ensure
|
|
1719
1739
|
// `isPositioned` will be `false` initially on the next open, avoid
|
|
1720
1740
|
// setting it to `true` when `open === false` (must be specified).
|
|
1721
|
-
isPositioned:
|
|
1741
|
+
isPositioned: T.current !== !1
|
|
1722
1742
|
};
|
|
1723
|
-
|
|
1724
|
-
|
|
1743
|
+
E.current && !yt(P.current, Z) && (P.current = Z, Re.flushSync(() => {
|
|
1744
|
+
a(Z);
|
|
1725
1745
|
}));
|
|
1726
1746
|
});
|
|
1727
|
-
}, [
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
...
|
|
1747
|
+
}, [m, e, n, M, T]);
|
|
1748
|
+
gt(() => {
|
|
1749
|
+
f === !1 && P.current.isPositioned && (P.current.isPositioned = !1, a((A) => ({
|
|
1750
|
+
...A,
|
|
1731
1751
|
isPositioned: !1
|
|
1732
1752
|
})));
|
|
1733
|
-
}, [
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
}), []),
|
|
1738
|
-
if (
|
|
1739
|
-
if (
|
|
1740
|
-
return
|
|
1741
|
-
|
|
1753
|
+
}, [f]);
|
|
1754
|
+
const E = w.useRef(!1);
|
|
1755
|
+
gt(() => (E.current = !0, () => {
|
|
1756
|
+
E.current = !1;
|
|
1757
|
+
}), []), gt(() => {
|
|
1758
|
+
if (b && (C.current = b), S && (R.current = S), b && S) {
|
|
1759
|
+
if (O.current)
|
|
1760
|
+
return O.current(b, S, D);
|
|
1761
|
+
D();
|
|
1742
1762
|
}
|
|
1743
|
-
}, [
|
|
1744
|
-
const
|
|
1745
|
-
reference:
|
|
1746
|
-
floating:
|
|
1747
|
-
setReference:
|
|
1748
|
-
setFloating:
|
|
1749
|
-
}), [
|
|
1750
|
-
reference:
|
|
1751
|
-
floating:
|
|
1752
|
-
}), [
|
|
1753
|
-
const
|
|
1763
|
+
}, [b, S, D, O, L]);
|
|
1764
|
+
const $ = w.useMemo(() => ({
|
|
1765
|
+
reference: C,
|
|
1766
|
+
floating: R,
|
|
1767
|
+
setReference: y,
|
|
1768
|
+
setFloating: x
|
|
1769
|
+
}), [y, x]), k = w.useMemo(() => ({
|
|
1770
|
+
reference: b,
|
|
1771
|
+
floating: S
|
|
1772
|
+
}), [b, S]), W = w.useMemo(() => {
|
|
1773
|
+
const A = {
|
|
1754
1774
|
position: n,
|
|
1755
1775
|
left: 0,
|
|
1756
1776
|
top: 0
|
|
1757
1777
|
};
|
|
1758
|
-
if (!
|
|
1759
|
-
return
|
|
1760
|
-
const
|
|
1761
|
-
return
|
|
1762
|
-
...
|
|
1763
|
-
transform: "translate(" +
|
|
1764
|
-
...
|
|
1778
|
+
if (!k.floating)
|
|
1779
|
+
return A;
|
|
1780
|
+
const N = ne(k.floating, l.x), Z = ne(k.floating, l.y);
|
|
1781
|
+
return s ? {
|
|
1782
|
+
...A,
|
|
1783
|
+
transform: "translate(" + N + "px, " + Z + "px)",
|
|
1784
|
+
...be(k.floating) >= 1.5 && {
|
|
1765
1785
|
willChange: "transform"
|
|
1766
1786
|
}
|
|
1767
1787
|
} : {
|
|
1768
1788
|
position: n,
|
|
1769
|
-
left:
|
|
1770
|
-
top:
|
|
1789
|
+
left: N,
|
|
1790
|
+
top: Z
|
|
1771
1791
|
};
|
|
1772
|
-
}, [n,
|
|
1773
|
-
return
|
|
1774
|
-
...
|
|
1775
|
-
update:
|
|
1776
|
-
refs:
|
|
1777
|
-
elements:
|
|
1778
|
-
floatingStyles:
|
|
1779
|
-
}), [
|
|
1780
|
-
}
|
|
1781
|
-
const
|
|
1792
|
+
}, [n, s, k.floating, l.x, l.y]);
|
|
1793
|
+
return w.useMemo(() => ({
|
|
1794
|
+
...l,
|
|
1795
|
+
update: D,
|
|
1796
|
+
refs: $,
|
|
1797
|
+
elements: k,
|
|
1798
|
+
floatingStyles: W
|
|
1799
|
+
}), [l, D, $, k, W]);
|
|
1800
|
+
}
|
|
1801
|
+
const hr = (t) => {
|
|
1782
1802
|
function e(n) {
|
|
1783
1803
|
return {}.hasOwnProperty.call(n, "current");
|
|
1784
1804
|
}
|
|
@@ -1787,792 +1807,50 @@ const Er = (t) => {
|
|
|
1787
1807
|
options: t,
|
|
1788
1808
|
fn(n) {
|
|
1789
1809
|
const {
|
|
1790
|
-
element:
|
|
1791
|
-
padding:
|
|
1810
|
+
element: r,
|
|
1811
|
+
padding: o
|
|
1792
1812
|
} = typeof t == "function" ? t(n) : t;
|
|
1793
|
-
return
|
|
1794
|
-
element:
|
|
1795
|
-
padding:
|
|
1796
|
-
}).fn(n) : {} :
|
|
1797
|
-
element:
|
|
1798
|
-
padding:
|
|
1813
|
+
return r && e(r) ? r.current != null ? ee({
|
|
1814
|
+
element: r.current,
|
|
1815
|
+
padding: o
|
|
1816
|
+
}).fn(n) : {} : r ? ee({
|
|
1817
|
+
element: r,
|
|
1818
|
+
padding: o
|
|
1799
1819
|
}).fn(n) : {};
|
|
1800
1820
|
}
|
|
1801
1821
|
};
|
|
1802
|
-
},
|
|
1803
|
-
...
|
|
1822
|
+
}, wr = (t, e) => ({
|
|
1823
|
+
...or(t),
|
|
1804
1824
|
options: [t, e]
|
|
1805
|
-
}),
|
|
1806
|
-
...
|
|
1825
|
+
}), yr = (t, e) => ({
|
|
1826
|
+
...ir(t),
|
|
1807
1827
|
options: [t, e]
|
|
1808
|
-
}),
|
|
1809
|
-
...
|
|
1828
|
+
}), xr = (t, e) => ({
|
|
1829
|
+
...lr(t),
|
|
1810
1830
|
options: [t, e]
|
|
1811
|
-
}),
|
|
1812
|
-
...
|
|
1831
|
+
}), br = (t, e) => ({
|
|
1832
|
+
...cr(t),
|
|
1813
1833
|
options: [t, e]
|
|
1814
|
-
}),
|
|
1815
|
-
...
|
|
1834
|
+
}), Sr = (t, e) => ({
|
|
1835
|
+
...sr(t),
|
|
1816
1836
|
options: [t, e]
|
|
1817
|
-
}),
|
|
1818
|
-
...
|
|
1837
|
+
}), Cr = (t, e) => ({
|
|
1838
|
+
...ar(t),
|
|
1819
1839
|
options: [t, e]
|
|
1820
|
-
}),
|
|
1821
|
-
...
|
|
1840
|
+
}), Rr = (t, e) => ({
|
|
1841
|
+
...hr(t),
|
|
1822
1842
|
options: [t, e]
|
|
1823
1843
|
});
|
|
1824
|
-
function Rr(t) {
|
|
1825
|
-
if (typeof document > "u") return;
|
|
1826
|
-
let e = document.head || document.getElementsByTagName("head")[0], n = document.createElement("style");
|
|
1827
|
-
n.type = "text/css", e.appendChild(n), n.styleSheet ? n.styleSheet.cssText = t : n.appendChild(document.createTextNode(t));
|
|
1828
|
-
}
|
|
1829
|
-
const Cr = (t) => {
|
|
1830
|
-
switch (t) {
|
|
1831
|
-
case "success":
|
|
1832
|
-
return kr;
|
|
1833
|
-
case "info":
|
|
1834
|
-
return Or;
|
|
1835
|
-
case "warning":
|
|
1836
|
-
return Mr;
|
|
1837
|
-
case "error":
|
|
1838
|
-
return Dr;
|
|
1839
|
-
default:
|
|
1840
|
-
return null;
|
|
1841
|
-
}
|
|
1842
|
-
}, Tr = Array(12).fill(0), Ar = ({ visible: t, className: e }) => /* @__PURE__ */ v.createElement("div", {
|
|
1843
|
-
className: [
|
|
1844
|
-
"sonner-loading-wrapper",
|
|
1845
|
-
e
|
|
1846
|
-
].filter(Boolean).join(" "),
|
|
1847
|
-
"data-visible": t
|
|
1848
|
-
}, /* @__PURE__ */ v.createElement("div", {
|
|
1849
|
-
className: "sonner-spinner"
|
|
1850
|
-
}, Tr.map((n, o) => /* @__PURE__ */ v.createElement("div", {
|
|
1851
|
-
className: "sonner-loading-bar",
|
|
1852
|
-
key: `spinner-bar-${o}`
|
|
1853
|
-
})))), kr = /* @__PURE__ */ v.createElement("svg", {
|
|
1854
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1855
|
-
viewBox: "0 0 20 20",
|
|
1856
|
-
fill: "currentColor",
|
|
1857
|
-
height: "20",
|
|
1858
|
-
width: "20"
|
|
1859
|
-
}, /* @__PURE__ */ v.createElement("path", {
|
|
1860
|
-
fillRule: "evenodd",
|
|
1861
|
-
d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",
|
|
1862
|
-
clipRule: "evenodd"
|
|
1863
|
-
})), Mr = /* @__PURE__ */ v.createElement("svg", {
|
|
1864
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1865
|
-
viewBox: "0 0 24 24",
|
|
1866
|
-
fill: "currentColor",
|
|
1867
|
-
height: "20",
|
|
1868
|
-
width: "20"
|
|
1869
|
-
}, /* @__PURE__ */ v.createElement("path", {
|
|
1870
|
-
fillRule: "evenodd",
|
|
1871
|
-
d: "M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",
|
|
1872
|
-
clipRule: "evenodd"
|
|
1873
|
-
})), Or = /* @__PURE__ */ v.createElement("svg", {
|
|
1874
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1875
|
-
viewBox: "0 0 20 20",
|
|
1876
|
-
fill: "currentColor",
|
|
1877
|
-
height: "20",
|
|
1878
|
-
width: "20"
|
|
1879
|
-
}, /* @__PURE__ */ v.createElement("path", {
|
|
1880
|
-
fillRule: "evenodd",
|
|
1881
|
-
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",
|
|
1882
|
-
clipRule: "evenodd"
|
|
1883
|
-
})), Dr = /* @__PURE__ */ v.createElement("svg", {
|
|
1884
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1885
|
-
viewBox: "0 0 20 20",
|
|
1886
|
-
fill: "currentColor",
|
|
1887
|
-
height: "20",
|
|
1888
|
-
width: "20"
|
|
1889
|
-
}, /* @__PURE__ */ v.createElement("path", {
|
|
1890
|
-
fillRule: "evenodd",
|
|
1891
|
-
d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",
|
|
1892
|
-
clipRule: "evenodd"
|
|
1893
|
-
})), Nr = /* @__PURE__ */ v.createElement("svg", {
|
|
1894
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
1895
|
-
width: "12",
|
|
1896
|
-
height: "12",
|
|
1897
|
-
viewBox: "0 0 24 24",
|
|
1898
|
-
fill: "none",
|
|
1899
|
-
stroke: "currentColor",
|
|
1900
|
-
strokeWidth: "1.5",
|
|
1901
|
-
strokeLinecap: "round",
|
|
1902
|
-
strokeLinejoin: "round"
|
|
1903
|
-
}, /* @__PURE__ */ v.createElement("line", {
|
|
1904
|
-
x1: "18",
|
|
1905
|
-
y1: "6",
|
|
1906
|
-
x2: "6",
|
|
1907
|
-
y2: "18"
|
|
1908
|
-
}), /* @__PURE__ */ v.createElement("line", {
|
|
1909
|
-
x1: "6",
|
|
1910
|
-
y1: "6",
|
|
1911
|
-
x2: "18",
|
|
1912
|
-
y2: "18"
|
|
1913
|
-
})), Pr = () => {
|
|
1914
|
-
const [t, e] = v.useState(document.hidden);
|
|
1915
|
-
return v.useEffect(() => {
|
|
1916
|
-
const n = () => {
|
|
1917
|
-
e(document.hidden);
|
|
1918
|
-
};
|
|
1919
|
-
return document.addEventListener("visibilitychange", n), () => window.removeEventListener("visibilitychange", n);
|
|
1920
|
-
}, []), t;
|
|
1921
|
-
};
|
|
1922
|
-
let be = 1;
|
|
1923
|
-
class Lr {
|
|
1924
|
-
constructor() {
|
|
1925
|
-
this.subscribe = (e) => (this.subscribers.push(e), () => {
|
|
1926
|
-
const n = this.subscribers.indexOf(e);
|
|
1927
|
-
this.subscribers.splice(n, 1);
|
|
1928
|
-
}), this.publish = (e) => {
|
|
1929
|
-
this.subscribers.forEach((n) => n(e));
|
|
1930
|
-
}, this.addToast = (e) => {
|
|
1931
|
-
this.publish(e), this.toasts = [
|
|
1932
|
-
...this.toasts,
|
|
1933
|
-
e
|
|
1934
|
-
];
|
|
1935
|
-
}, this.create = (e) => {
|
|
1936
|
-
var n;
|
|
1937
|
-
const { message: o, ...a } = e, i = typeof (e == null ? void 0 : e.id) == "number" || ((n = e.id) == null ? void 0 : n.length) > 0 ? e.id : be++, s = this.toasts.find((d) => d.id === i), l = e.dismissible === void 0 ? !0 : e.dismissible;
|
|
1938
|
-
return this.dismissedToasts.has(i) && this.dismissedToasts.delete(i), s ? this.toasts = this.toasts.map((d) => d.id === i ? (this.publish({
|
|
1939
|
-
...d,
|
|
1940
|
-
...e,
|
|
1941
|
-
id: i,
|
|
1942
|
-
title: o
|
|
1943
|
-
}), {
|
|
1944
|
-
...d,
|
|
1945
|
-
...e,
|
|
1946
|
-
id: i,
|
|
1947
|
-
dismissible: l,
|
|
1948
|
-
title: o
|
|
1949
|
-
}) : d) : this.addToast({
|
|
1950
|
-
title: o,
|
|
1951
|
-
...a,
|
|
1952
|
-
dismissible: l,
|
|
1953
|
-
id: i
|
|
1954
|
-
}), i;
|
|
1955
|
-
}, this.dismiss = (e) => (e ? (this.dismissedToasts.add(e), requestAnimationFrame(() => this.subscribers.forEach((n) => n({
|
|
1956
|
-
id: e,
|
|
1957
|
-
dismiss: !0
|
|
1958
|
-
})))) : this.toasts.forEach((n) => {
|
|
1959
|
-
this.subscribers.forEach((o) => o({
|
|
1960
|
-
id: n.id,
|
|
1961
|
-
dismiss: !0
|
|
1962
|
-
}));
|
|
1963
|
-
}), e), this.message = (e, n) => this.create({
|
|
1964
|
-
...n,
|
|
1965
|
-
message: e
|
|
1966
|
-
}), this.error = (e, n) => this.create({
|
|
1967
|
-
...n,
|
|
1968
|
-
message: e,
|
|
1969
|
-
type: "error"
|
|
1970
|
-
}), this.success = (e, n) => this.create({
|
|
1971
|
-
...n,
|
|
1972
|
-
type: "success",
|
|
1973
|
-
message: e
|
|
1974
|
-
}), this.info = (e, n) => this.create({
|
|
1975
|
-
...n,
|
|
1976
|
-
type: "info",
|
|
1977
|
-
message: e
|
|
1978
|
-
}), this.warning = (e, n) => this.create({
|
|
1979
|
-
...n,
|
|
1980
|
-
type: "warning",
|
|
1981
|
-
message: e
|
|
1982
|
-
}), this.loading = (e, n) => this.create({
|
|
1983
|
-
...n,
|
|
1984
|
-
type: "loading",
|
|
1985
|
-
message: e
|
|
1986
|
-
}), this.promise = (e, n) => {
|
|
1987
|
-
if (!n)
|
|
1988
|
-
return;
|
|
1989
|
-
let o;
|
|
1990
|
-
n.loading !== void 0 && (o = this.create({
|
|
1991
|
-
...n,
|
|
1992
|
-
promise: e,
|
|
1993
|
-
type: "loading",
|
|
1994
|
-
message: n.loading,
|
|
1995
|
-
description: typeof n.description != "function" ? n.description : void 0
|
|
1996
|
-
}));
|
|
1997
|
-
const a = Promise.resolve(e instanceof Function ? e() : e);
|
|
1998
|
-
let i = o !== void 0, s;
|
|
1999
|
-
const l = a.then(async (c) => {
|
|
2000
|
-
if (s = [
|
|
2001
|
-
"resolve",
|
|
2002
|
-
c
|
|
2003
|
-
], v.isValidElement(c))
|
|
2004
|
-
i = !1, this.create({
|
|
2005
|
-
id: o,
|
|
2006
|
-
type: "default",
|
|
2007
|
-
message: c
|
|
2008
|
-
});
|
|
2009
|
-
else if (_r(c) && !c.ok) {
|
|
2010
|
-
i = !1;
|
|
2011
|
-
const r = typeof n.error == "function" ? await n.error(`HTTP error! status: ${c.status}`) : n.error, f = typeof n.description == "function" ? await n.description(`HTTP error! status: ${c.status}`) : n.description, p = typeof r == "object" && !v.isValidElement(r) ? r : {
|
|
2012
|
-
message: r
|
|
2013
|
-
};
|
|
2014
|
-
this.create({
|
|
2015
|
-
id: o,
|
|
2016
|
-
type: "error",
|
|
2017
|
-
description: f,
|
|
2018
|
-
...p
|
|
2019
|
-
});
|
|
2020
|
-
} else if (c instanceof Error) {
|
|
2021
|
-
i = !1;
|
|
2022
|
-
const r = typeof n.error == "function" ? await n.error(c) : n.error, f = typeof n.description == "function" ? await n.description(c) : n.description, p = typeof r == "object" && !v.isValidElement(r) ? r : {
|
|
2023
|
-
message: r
|
|
2024
|
-
};
|
|
2025
|
-
this.create({
|
|
2026
|
-
id: o,
|
|
2027
|
-
type: "error",
|
|
2028
|
-
description: f,
|
|
2029
|
-
...p
|
|
2030
|
-
});
|
|
2031
|
-
} else if (n.success !== void 0) {
|
|
2032
|
-
i = !1;
|
|
2033
|
-
const r = typeof n.success == "function" ? await n.success(c) : n.success, f = typeof n.description == "function" ? await n.description(c) : n.description, p = typeof r == "object" && !v.isValidElement(r) ? r : {
|
|
2034
|
-
message: r
|
|
2035
|
-
};
|
|
2036
|
-
this.create({
|
|
2037
|
-
id: o,
|
|
2038
|
-
type: "success",
|
|
2039
|
-
description: f,
|
|
2040
|
-
...p
|
|
2041
|
-
});
|
|
2042
|
-
}
|
|
2043
|
-
}).catch(async (c) => {
|
|
2044
|
-
if (s = [
|
|
2045
|
-
"reject",
|
|
2046
|
-
c
|
|
2047
|
-
], n.error !== void 0) {
|
|
2048
|
-
i = !1;
|
|
2049
|
-
const u = typeof n.error == "function" ? await n.error(c) : n.error, r = typeof n.description == "function" ? await n.description(c) : n.description, m = typeof u == "object" && !v.isValidElement(u) ? u : {
|
|
2050
|
-
message: u
|
|
2051
|
-
};
|
|
2052
|
-
this.create({
|
|
2053
|
-
id: o,
|
|
2054
|
-
type: "error",
|
|
2055
|
-
description: r,
|
|
2056
|
-
...m
|
|
2057
|
-
});
|
|
2058
|
-
}
|
|
2059
|
-
}).finally(() => {
|
|
2060
|
-
i && (this.dismiss(o), o = void 0), n.finally == null || n.finally.call(n);
|
|
2061
|
-
}), d = () => new Promise((c, u) => l.then(() => s[0] === "reject" ? u(s[1]) : c(s[1])).catch(u));
|
|
2062
|
-
return typeof o != "string" && typeof o != "number" ? {
|
|
2063
|
-
unwrap: d
|
|
2064
|
-
} : Object.assign(o, {
|
|
2065
|
-
unwrap: d
|
|
2066
|
-
});
|
|
2067
|
-
}, this.custom = (e, n) => {
|
|
2068
|
-
const o = (n == null ? void 0 : n.id) || be++;
|
|
2069
|
-
return this.create({
|
|
2070
|
-
jsx: e(o),
|
|
2071
|
-
id: o,
|
|
2072
|
-
...n
|
|
2073
|
-
}), o;
|
|
2074
|
-
}, this.getActiveToasts = () => this.toasts.filter((e) => !this.dismissedToasts.has(e.id)), this.subscribers = [], this.toasts = [], this.dismissedToasts = /* @__PURE__ */ new Set();
|
|
2075
|
-
}
|
|
2076
|
-
}
|
|
2077
|
-
const U = new Lr(), Br = (t, e) => {
|
|
2078
|
-
const n = (e == null ? void 0 : e.id) || be++;
|
|
2079
|
-
return U.addToast({
|
|
2080
|
-
title: t,
|
|
2081
|
-
...e,
|
|
2082
|
-
id: n
|
|
2083
|
-
}), n;
|
|
2084
|
-
}, _r = (t) => t && typeof t == "object" && "ok" in t && typeof t.ok == "boolean" && "status" in t && typeof t.status == "number", Ir = Br, Hr = () => U.toasts, Fr = () => U.getActiveToasts(), ua = Object.assign(Ir, {
|
|
2085
|
-
success: U.success,
|
|
2086
|
-
info: U.info,
|
|
2087
|
-
warning: U.warning,
|
|
2088
|
-
error: U.error,
|
|
2089
|
-
custom: U.custom,
|
|
2090
|
-
message: U.message,
|
|
2091
|
-
promise: U.promise,
|
|
2092
|
-
dismiss: U.dismiss,
|
|
2093
|
-
loading: U.loading
|
|
2094
|
-
}, {
|
|
2095
|
-
getHistory: Hr,
|
|
2096
|
-
getToasts: Fr
|
|
2097
|
-
});
|
|
2098
|
-
Rr("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
2099
|
-
function Ut(t) {
|
|
2100
|
-
return t.label !== void 0;
|
|
2101
|
-
}
|
|
2102
|
-
const Wr = 3, $r = "24px", zr = "16px", Ge = 4e3, Vr = 356, Yr = 14, jr = 45, Xr = 200;
|
|
2103
|
-
function rt(...t) {
|
|
2104
|
-
return t.filter(Boolean).join(" ");
|
|
2105
|
-
}
|
|
2106
|
-
function Ur(t) {
|
|
2107
|
-
const [e, n] = t.split("-"), o = [];
|
|
2108
|
-
return e && o.push(e), n && o.push(n), o;
|
|
2109
|
-
}
|
|
2110
|
-
const qr = (t) => {
|
|
2111
|
-
var e, n, o, a, i, s, l, d, c;
|
|
2112
|
-
const { invert: u, toast: r, unstyled: f, interacting: m, setHeights: p, visibleToasts: h, heights: y, index: g, toasts: b, expanded: w, removeToast: x, defaultRichColors: E, closeButton: R, style: A, cancelButtonStyle: D, actionButtonStyle: $, className: B = "", descriptionClassName: H = "", duration: _, position: N, gap: P, expandByDefault: j, classNames: C, icons: O, closeButtonAriaLabel: k = "Close toast" } = t, [F, z] = v.useState(null), [pt, _t] = v.useState(null), [M, W] = v.useState(!1), [I, Q] = v.useState(!1), [bt, L] = v.useState(!1), [wt, It] = v.useState(!1), [Ht, xt] = v.useState(!1), [bn, ie] = v.useState(0), [wn, Te] = v.useState(0), Pt = v.useRef(r.duration || _ || Ge), Ae = v.useRef(null), ct = v.useRef(null), xn = g === 0, Sn = g + 1 <= h, q = r.type, St = r.dismissible !== !1, En = r.className || "", Rn = r.descriptionClassName || "", Ft = v.useMemo(() => y.findIndex((T) => T.toastId === r.id) || 0, [
|
|
2113
|
-
y,
|
|
2114
|
-
r.id
|
|
2115
|
-
]), Cn = v.useMemo(() => {
|
|
2116
|
-
var T;
|
|
2117
|
-
return (T = r.closeButton) != null ? T : R;
|
|
2118
|
-
}, [
|
|
2119
|
-
r.closeButton,
|
|
2120
|
-
R
|
|
2121
|
-
]), ke = v.useMemo(() => r.duration || _ || Ge, [
|
|
2122
|
-
r.duration,
|
|
2123
|
-
_
|
|
2124
|
-
]), se = v.useRef(0), Et = v.useRef(0), Me = v.useRef(0), Rt = v.useRef(null), [Tn, An] = N.split("-"), Oe = v.useMemo(() => y.reduce((T, V, X) => X >= Ft ? T : T + V.height, 0), [
|
|
2125
|
-
y,
|
|
2126
|
-
Ft
|
|
2127
|
-
]), De = Pr(), kn = r.invert || u, le = q === "loading";
|
|
2128
|
-
Et.current = v.useMemo(() => Ft * P + Oe, [
|
|
2129
|
-
Ft,
|
|
2130
|
-
Oe
|
|
2131
|
-
]), v.useEffect(() => {
|
|
2132
|
-
Pt.current = ke;
|
|
2133
|
-
}, [
|
|
2134
|
-
ke
|
|
2135
|
-
]), v.useEffect(() => {
|
|
2136
|
-
W(!0);
|
|
2137
|
-
}, []), v.useEffect(() => {
|
|
2138
|
-
const T = ct.current;
|
|
2139
|
-
if (T) {
|
|
2140
|
-
const V = T.getBoundingClientRect().height;
|
|
2141
|
-
return Te(V), p((X) => [
|
|
2142
|
-
{
|
|
2143
|
-
toastId: r.id,
|
|
2144
|
-
height: V,
|
|
2145
|
-
position: r.position
|
|
2146
|
-
},
|
|
2147
|
-
...X
|
|
2148
|
-
]), () => p((X) => X.filter((K) => K.toastId !== r.id));
|
|
2149
|
-
}
|
|
2150
|
-
}, [
|
|
2151
|
-
p,
|
|
2152
|
-
r.id
|
|
2153
|
-
]), v.useLayoutEffect(() => {
|
|
2154
|
-
if (!M) return;
|
|
2155
|
-
const T = ct.current, V = T.style.height;
|
|
2156
|
-
T.style.height = "auto";
|
|
2157
|
-
const X = T.getBoundingClientRect().height;
|
|
2158
|
-
T.style.height = V, Te(X), p((K) => K.find((Y) => Y.toastId === r.id) ? K.map((Y) => Y.toastId === r.id ? {
|
|
2159
|
-
...Y,
|
|
2160
|
-
height: X
|
|
2161
|
-
} : Y) : [
|
|
2162
|
-
{
|
|
2163
|
-
toastId: r.id,
|
|
2164
|
-
height: X,
|
|
2165
|
-
position: r.position
|
|
2166
|
-
},
|
|
2167
|
-
...K
|
|
2168
|
-
]);
|
|
2169
|
-
}, [
|
|
2170
|
-
M,
|
|
2171
|
-
r.title,
|
|
2172
|
-
r.description,
|
|
2173
|
-
p,
|
|
2174
|
-
r.id,
|
|
2175
|
-
r.jsx,
|
|
2176
|
-
r.action,
|
|
2177
|
-
r.cancel
|
|
2178
|
-
]);
|
|
2179
|
-
const ft = v.useCallback(() => {
|
|
2180
|
-
Q(!0), ie(Et.current), p((T) => T.filter((V) => V.toastId !== r.id)), setTimeout(() => {
|
|
2181
|
-
x(r);
|
|
2182
|
-
}, Xr);
|
|
2183
|
-
}, [
|
|
2184
|
-
r,
|
|
2185
|
-
x,
|
|
2186
|
-
p,
|
|
2187
|
-
Et
|
|
2188
|
-
]);
|
|
2189
|
-
v.useEffect(() => {
|
|
2190
|
-
if (r.promise && q === "loading" || r.duration === 1 / 0 || r.type === "loading") return;
|
|
2191
|
-
let T;
|
|
2192
|
-
return w || m || De ? (() => {
|
|
2193
|
-
if (Me.current < se.current) {
|
|
2194
|
-
const K = (/* @__PURE__ */ new Date()).getTime() - se.current;
|
|
2195
|
-
Pt.current = Pt.current - K;
|
|
2196
|
-
}
|
|
2197
|
-
Me.current = (/* @__PURE__ */ new Date()).getTime();
|
|
2198
|
-
})() : (() => {
|
|
2199
|
-
Pt.current !== 1 / 0 && (se.current = (/* @__PURE__ */ new Date()).getTime(), T = setTimeout(() => {
|
|
2200
|
-
r.onAutoClose == null || r.onAutoClose.call(r, r), ft();
|
|
2201
|
-
}, Pt.current));
|
|
2202
|
-
})(), () => clearTimeout(T);
|
|
2203
|
-
}, [
|
|
2204
|
-
w,
|
|
2205
|
-
m,
|
|
2206
|
-
r,
|
|
2207
|
-
q,
|
|
2208
|
-
De,
|
|
2209
|
-
ft
|
|
2210
|
-
]), v.useEffect(() => {
|
|
2211
|
-
r.delete && (ft(), r.onDismiss == null || r.onDismiss.call(r, r));
|
|
2212
|
-
}, [
|
|
2213
|
-
ft,
|
|
2214
|
-
r.delete
|
|
2215
|
-
]);
|
|
2216
|
-
function Mn() {
|
|
2217
|
-
var T;
|
|
2218
|
-
if (O != null && O.loading) {
|
|
2219
|
-
var V;
|
|
2220
|
-
return /* @__PURE__ */ v.createElement("div", {
|
|
2221
|
-
className: rt(C == null ? void 0 : C.loader, r == null || (V = r.classNames) == null ? void 0 : V.loader, "sonner-loader"),
|
|
2222
|
-
"data-visible": q === "loading"
|
|
2223
|
-
}, O.loading);
|
|
2224
|
-
}
|
|
2225
|
-
return /* @__PURE__ */ v.createElement(Ar, {
|
|
2226
|
-
className: rt(C == null ? void 0 : C.loader, r == null || (T = r.classNames) == null ? void 0 : T.loader),
|
|
2227
|
-
visible: q === "loading"
|
|
2228
|
-
});
|
|
2229
|
-
}
|
|
2230
|
-
const On = r.icon || (O == null ? void 0 : O[q]) || Cr(q);
|
|
2231
|
-
var Ne, Pe;
|
|
2232
|
-
return /* @__PURE__ */ v.createElement("li", {
|
|
2233
|
-
tabIndex: 0,
|
|
2234
|
-
ref: ct,
|
|
2235
|
-
className: rt(B, En, C == null ? void 0 : C.toast, r == null || (e = r.classNames) == null ? void 0 : e.toast, C == null ? void 0 : C.default, C == null ? void 0 : C[q], r == null || (n = r.classNames) == null ? void 0 : n[q]),
|
|
2236
|
-
"data-sonner-toast": "",
|
|
2237
|
-
"data-rich-colors": (Ne = r.richColors) != null ? Ne : E,
|
|
2238
|
-
"data-styled": !(r.jsx || r.unstyled || f),
|
|
2239
|
-
"data-mounted": M,
|
|
2240
|
-
"data-promise": !!r.promise,
|
|
2241
|
-
"data-swiped": Ht,
|
|
2242
|
-
"data-removed": I,
|
|
2243
|
-
"data-visible": Sn,
|
|
2244
|
-
"data-y-position": Tn,
|
|
2245
|
-
"data-x-position": An,
|
|
2246
|
-
"data-index": g,
|
|
2247
|
-
"data-front": xn,
|
|
2248
|
-
"data-swiping": bt,
|
|
2249
|
-
"data-dismissible": St,
|
|
2250
|
-
"data-type": q,
|
|
2251
|
-
"data-invert": kn,
|
|
2252
|
-
"data-swipe-out": wt,
|
|
2253
|
-
"data-swipe-direction": pt,
|
|
2254
|
-
"data-expanded": !!(w || j && M),
|
|
2255
|
-
"data-testid": r.testId,
|
|
2256
|
-
style: {
|
|
2257
|
-
"--index": g,
|
|
2258
|
-
"--toasts-before": g,
|
|
2259
|
-
"--z-index": b.length - g,
|
|
2260
|
-
"--offset": `${I ? bn : Et.current}px`,
|
|
2261
|
-
"--initial-height": j ? "auto" : `${wn}px`,
|
|
2262
|
-
...A,
|
|
2263
|
-
...r.style
|
|
2264
|
-
},
|
|
2265
|
-
onDragEnd: () => {
|
|
2266
|
-
L(!1), z(null), Rt.current = null;
|
|
2267
|
-
},
|
|
2268
|
-
onPointerDown: (T) => {
|
|
2269
|
-
T.button !== 2 && (le || !St || (Ae.current = /* @__PURE__ */ new Date(), ie(Et.current), T.target.setPointerCapture(T.pointerId), T.target.tagName !== "BUTTON" && (L(!0), Rt.current = {
|
|
2270
|
-
x: T.clientX,
|
|
2271
|
-
y: T.clientY
|
|
2272
|
-
})));
|
|
2273
|
-
},
|
|
2274
|
-
onPointerUp: () => {
|
|
2275
|
-
var T, V, X;
|
|
2276
|
-
if (wt || !St) return;
|
|
2277
|
-
Rt.current = null;
|
|
2278
|
-
const K = Number(((T = ct.current) == null ? void 0 : T.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), Wt = Number(((V = ct.current) == null ? void 0 : V.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), Y = (/* @__PURE__ */ new Date()).getTime() - ((X = Ae.current) == null ? void 0 : X.getTime()), J = F === "x" ? K : Wt, $t = Math.abs(J) / Y;
|
|
2279
|
-
if (Math.abs(J) >= jr || $t > 0.11) {
|
|
2280
|
-
ie(Et.current), r.onDismiss == null || r.onDismiss.call(r, r), _t(F === "x" ? K > 0 ? "right" : "left" : Wt > 0 ? "down" : "up"), ft(), It(!0);
|
|
2281
|
-
return;
|
|
2282
|
-
} else {
|
|
2283
|
-
var tt, et;
|
|
2284
|
-
(tt = ct.current) == null || tt.style.setProperty("--swipe-amount-x", "0px"), (et = ct.current) == null || et.style.setProperty("--swipe-amount-y", "0px");
|
|
2285
|
-
}
|
|
2286
|
-
xt(!1), L(!1), z(null);
|
|
2287
|
-
},
|
|
2288
|
-
onPointerMove: (T) => {
|
|
2289
|
-
var V, X, K;
|
|
2290
|
-
if (!Rt.current || !St || ((V = window.getSelection()) == null ? void 0 : V.toString().length) > 0) return;
|
|
2291
|
-
const Y = T.clientY - Rt.current.y, J = T.clientX - Rt.current.x;
|
|
2292
|
-
var $t;
|
|
2293
|
-
const tt = ($t = t.swipeDirections) != null ? $t : Ur(N);
|
|
2294
|
-
!F && (Math.abs(J) > 1 || Math.abs(Y) > 1) && z(Math.abs(J) > Math.abs(Y) ? "x" : "y");
|
|
2295
|
-
let et = {
|
|
2296
|
-
x: 0,
|
|
2297
|
-
y: 0
|
|
2298
|
-
};
|
|
2299
|
-
const Le = (vt) => 1 / (1.5 + Math.abs(vt) / 20);
|
|
2300
|
-
if (F === "y") {
|
|
2301
|
-
if (tt.includes("top") || tt.includes("bottom"))
|
|
2302
|
-
if (tt.includes("top") && Y < 0 || tt.includes("bottom") && Y > 0)
|
|
2303
|
-
et.y = Y;
|
|
2304
|
-
else {
|
|
2305
|
-
const vt = Y * Le(Y);
|
|
2306
|
-
et.y = Math.abs(vt) < Math.abs(Y) ? vt : Y;
|
|
2307
|
-
}
|
|
2308
|
-
} else if (F === "x" && (tt.includes("left") || tt.includes("right")))
|
|
2309
|
-
if (tt.includes("left") && J < 0 || tt.includes("right") && J > 0)
|
|
2310
|
-
et.x = J;
|
|
2311
|
-
else {
|
|
2312
|
-
const vt = J * Le(J);
|
|
2313
|
-
et.x = Math.abs(vt) < Math.abs(J) ? vt : J;
|
|
2314
|
-
}
|
|
2315
|
-
(Math.abs(et.x) > 0 || Math.abs(et.y) > 0) && xt(!0), (X = ct.current) == null || X.style.setProperty("--swipe-amount-x", `${et.x}px`), (K = ct.current) == null || K.style.setProperty("--swipe-amount-y", `${et.y}px`);
|
|
2316
|
-
}
|
|
2317
|
-
}, Cn && !r.jsx && q !== "loading" ? /* @__PURE__ */ v.createElement("button", {
|
|
2318
|
-
"aria-label": k,
|
|
2319
|
-
"data-disabled": le,
|
|
2320
|
-
"data-close-button": !0,
|
|
2321
|
-
onClick: le || !St ? () => {
|
|
2322
|
-
} : () => {
|
|
2323
|
-
ft(), r.onDismiss == null || r.onDismiss.call(r, r);
|
|
2324
|
-
},
|
|
2325
|
-
className: rt(C == null ? void 0 : C.closeButton, r == null || (o = r.classNames) == null ? void 0 : o.closeButton)
|
|
2326
|
-
}, (Pe = O == null ? void 0 : O.close) != null ? Pe : Nr) : null, (q || r.icon || r.promise) && r.icon !== null && ((O == null ? void 0 : O[q]) !== null || r.icon) ? /* @__PURE__ */ v.createElement("div", {
|
|
2327
|
-
"data-icon": "",
|
|
2328
|
-
className: rt(C == null ? void 0 : C.icon, r == null || (a = r.classNames) == null ? void 0 : a.icon)
|
|
2329
|
-
}, r.promise || r.type === "loading" && !r.icon ? r.icon || Mn() : null, r.type !== "loading" ? On : null) : null, /* @__PURE__ */ v.createElement("div", {
|
|
2330
|
-
"data-content": "",
|
|
2331
|
-
className: rt(C == null ? void 0 : C.content, r == null || (i = r.classNames) == null ? void 0 : i.content)
|
|
2332
|
-
}, /* @__PURE__ */ v.createElement("div", {
|
|
2333
|
-
"data-title": "",
|
|
2334
|
-
className: rt(C == null ? void 0 : C.title, r == null || (s = r.classNames) == null ? void 0 : s.title)
|
|
2335
|
-
}, r.jsx ? r.jsx : typeof r.title == "function" ? r.title() : r.title), r.description ? /* @__PURE__ */ v.createElement("div", {
|
|
2336
|
-
"data-description": "",
|
|
2337
|
-
className: rt(H, Rn, C == null ? void 0 : C.description, r == null || (l = r.classNames) == null ? void 0 : l.description)
|
|
2338
|
-
}, typeof r.description == "function" ? r.description() : r.description) : null), /* @__PURE__ */ v.isValidElement(r.cancel) ? r.cancel : r.cancel && Ut(r.cancel) ? /* @__PURE__ */ v.createElement("button", {
|
|
2339
|
-
"data-button": !0,
|
|
2340
|
-
"data-cancel": !0,
|
|
2341
|
-
style: r.cancelButtonStyle || D,
|
|
2342
|
-
onClick: (T) => {
|
|
2343
|
-
Ut(r.cancel) && St && (r.cancel.onClick == null || r.cancel.onClick.call(r.cancel, T), ft());
|
|
2344
|
-
},
|
|
2345
|
-
className: rt(C == null ? void 0 : C.cancelButton, r == null || (d = r.classNames) == null ? void 0 : d.cancelButton)
|
|
2346
|
-
}, r.cancel.label) : null, /* @__PURE__ */ v.isValidElement(r.action) ? r.action : r.action && Ut(r.action) ? /* @__PURE__ */ v.createElement("button", {
|
|
2347
|
-
"data-button": !0,
|
|
2348
|
-
"data-action": !0,
|
|
2349
|
-
style: r.actionButtonStyle || $,
|
|
2350
|
-
onClick: (T) => {
|
|
2351
|
-
Ut(r.action) && (r.action.onClick == null || r.action.onClick.call(r.action, T), !T.defaultPrevented && ft());
|
|
2352
|
-
},
|
|
2353
|
-
className: rt(C == null ? void 0 : C.actionButton, r == null || (c = r.classNames) == null ? void 0 : c.actionButton)
|
|
2354
|
-
}, r.action.label) : null);
|
|
2355
|
-
};
|
|
2356
|
-
function Qe() {
|
|
2357
|
-
if (typeof window > "u" || typeof document > "u") return "ltr";
|
|
2358
|
-
const t = document.documentElement.getAttribute("dir");
|
|
2359
|
-
return t === "auto" || !t ? window.getComputedStyle(document.documentElement).direction : t;
|
|
2360
|
-
}
|
|
2361
|
-
function Kr(t, e) {
|
|
2362
|
-
const n = {};
|
|
2363
|
-
return [
|
|
2364
|
-
t,
|
|
2365
|
-
e
|
|
2366
|
-
].forEach((o, a) => {
|
|
2367
|
-
const i = a === 1, s = i ? "--mobile-offset" : "--offset", l = i ? zr : $r;
|
|
2368
|
-
function d(c) {
|
|
2369
|
-
[
|
|
2370
|
-
"top",
|
|
2371
|
-
"right",
|
|
2372
|
-
"bottom",
|
|
2373
|
-
"left"
|
|
2374
|
-
].forEach((u) => {
|
|
2375
|
-
n[`${s}-${u}`] = typeof c == "number" ? `${c}px` : c;
|
|
2376
|
-
});
|
|
2377
|
-
}
|
|
2378
|
-
typeof o == "number" || typeof o == "string" ? d(o) : typeof o == "object" ? [
|
|
2379
|
-
"top",
|
|
2380
|
-
"right",
|
|
2381
|
-
"bottom",
|
|
2382
|
-
"left"
|
|
2383
|
-
].forEach((c) => {
|
|
2384
|
-
o[c] === void 0 ? n[`${s}-${c}`] = l : n[`${s}-${c}`] = typeof o[c] == "number" ? `${o[c]}px` : o[c];
|
|
2385
|
-
}) : d(l);
|
|
2386
|
-
}), n;
|
|
2387
|
-
}
|
|
2388
|
-
const da = /* @__PURE__ */ v.forwardRef(function(e, n) {
|
|
2389
|
-
const { id: o, invert: a, position: i = "bottom-right", hotkey: s = [
|
|
2390
|
-
"altKey",
|
|
2391
|
-
"KeyT"
|
|
2392
|
-
], expand: l, closeButton: d, className: c, offset: u, mobileOffset: r, theme: f = "light", richColors: m, duration: p, style: h, visibleToasts: y = Wr, toastOptions: g, dir: b = Qe(), gap: w = Yr, icons: x, containerAriaLabel: E = "Notifications" } = e, [R, A] = v.useState([]), D = v.useMemo(() => o ? R.filter((M) => M.toasterId === o) : R.filter((M) => !M.toasterId), [
|
|
2393
|
-
R,
|
|
2394
|
-
o
|
|
2395
|
-
]), $ = v.useMemo(() => Array.from(new Set([
|
|
2396
|
-
i
|
|
2397
|
-
].concat(D.filter((M) => M.position).map((M) => M.position)))), [
|
|
2398
|
-
D,
|
|
2399
|
-
i
|
|
2400
|
-
]), [B, H] = v.useState([]), [_, N] = v.useState(!1), [P, j] = v.useState(!1), [C, O] = v.useState(f !== "system" ? f : typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light"), k = v.useRef(null), F = s.join("+").replace(/Key/g, "").replace(/Digit/g, ""), z = v.useRef(null), pt = v.useRef(!1), _t = v.useCallback((M) => {
|
|
2401
|
-
A((W) => {
|
|
2402
|
-
var I;
|
|
2403
|
-
return (I = W.find((Q) => Q.id === M.id)) != null && I.delete || U.dismiss(M.id), W.filter(({ id: Q }) => Q !== M.id);
|
|
2404
|
-
});
|
|
2405
|
-
}, []);
|
|
2406
|
-
return v.useEffect(() => U.subscribe((M) => {
|
|
2407
|
-
if (M.dismiss) {
|
|
2408
|
-
requestAnimationFrame(() => {
|
|
2409
|
-
A((W) => W.map((I) => I.id === M.id ? {
|
|
2410
|
-
...I,
|
|
2411
|
-
delete: !0
|
|
2412
|
-
} : I));
|
|
2413
|
-
});
|
|
2414
|
-
return;
|
|
2415
|
-
}
|
|
2416
|
-
setTimeout(() => {
|
|
2417
|
-
Bn.flushSync(() => {
|
|
2418
|
-
A((W) => {
|
|
2419
|
-
const I = W.findIndex((Q) => Q.id === M.id);
|
|
2420
|
-
return I !== -1 ? [
|
|
2421
|
-
...W.slice(0, I),
|
|
2422
|
-
{
|
|
2423
|
-
...W[I],
|
|
2424
|
-
...M
|
|
2425
|
-
},
|
|
2426
|
-
...W.slice(I + 1)
|
|
2427
|
-
] : [
|
|
2428
|
-
M,
|
|
2429
|
-
...W
|
|
2430
|
-
];
|
|
2431
|
-
});
|
|
2432
|
-
});
|
|
2433
|
-
});
|
|
2434
|
-
}), [
|
|
2435
|
-
R
|
|
2436
|
-
]), v.useEffect(() => {
|
|
2437
|
-
if (f !== "system") {
|
|
2438
|
-
O(f);
|
|
2439
|
-
return;
|
|
2440
|
-
}
|
|
2441
|
-
if (f === "system" && (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? O("dark") : O("light")), typeof window > "u") return;
|
|
2442
|
-
const M = window.matchMedia("(prefers-color-scheme: dark)");
|
|
2443
|
-
try {
|
|
2444
|
-
M.addEventListener("change", ({ matches: W }) => {
|
|
2445
|
-
O(W ? "dark" : "light");
|
|
2446
|
-
});
|
|
2447
|
-
} catch {
|
|
2448
|
-
M.addListener(({ matches: I }) => {
|
|
2449
|
-
try {
|
|
2450
|
-
O(I ? "dark" : "light");
|
|
2451
|
-
} catch (Q) {
|
|
2452
|
-
console.error(Q);
|
|
2453
|
-
}
|
|
2454
|
-
});
|
|
2455
|
-
}
|
|
2456
|
-
}, [
|
|
2457
|
-
f
|
|
2458
|
-
]), v.useEffect(() => {
|
|
2459
|
-
R.length <= 1 && N(!1);
|
|
2460
|
-
}, [
|
|
2461
|
-
R
|
|
2462
|
-
]), v.useEffect(() => {
|
|
2463
|
-
const M = (W) => {
|
|
2464
|
-
var I;
|
|
2465
|
-
if (s.every((L) => W[L] || W.code === L)) {
|
|
2466
|
-
var bt;
|
|
2467
|
-
N(!0), (bt = k.current) == null || bt.focus();
|
|
2468
|
-
}
|
|
2469
|
-
W.code === "Escape" && (document.activeElement === k.current || (I = k.current) != null && I.contains(document.activeElement)) && N(!1);
|
|
2470
|
-
};
|
|
2471
|
-
return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
|
|
2472
|
-
}, [
|
|
2473
|
-
s
|
|
2474
|
-
]), v.useEffect(() => {
|
|
2475
|
-
if (k.current)
|
|
2476
|
-
return () => {
|
|
2477
|
-
z.current && (z.current.focus({
|
|
2478
|
-
preventScroll: !0
|
|
2479
|
-
}), z.current = null, pt.current = !1);
|
|
2480
|
-
};
|
|
2481
|
-
}, [
|
|
2482
|
-
k.current
|
|
2483
|
-
]), // Remove item from normal navigation flow, only available via hotkey
|
|
2484
|
-
/* @__PURE__ */ v.createElement("section", {
|
|
2485
|
-
ref: n,
|
|
2486
|
-
"aria-label": `${E} ${F}`,
|
|
2487
|
-
tabIndex: -1,
|
|
2488
|
-
"aria-live": "polite",
|
|
2489
|
-
"aria-relevant": "additions text",
|
|
2490
|
-
"aria-atomic": "false",
|
|
2491
|
-
suppressHydrationWarning: !0
|
|
2492
|
-
}, $.map((M, W) => {
|
|
2493
|
-
var I;
|
|
2494
|
-
const [Q, bt] = M.split("-");
|
|
2495
|
-
return D.length ? /* @__PURE__ */ v.createElement("ol", {
|
|
2496
|
-
key: M,
|
|
2497
|
-
dir: b === "auto" ? Qe() : b,
|
|
2498
|
-
tabIndex: -1,
|
|
2499
|
-
ref: k,
|
|
2500
|
-
className: c,
|
|
2501
|
-
"data-sonner-toaster": !0,
|
|
2502
|
-
"data-sonner-theme": C,
|
|
2503
|
-
"data-y-position": Q,
|
|
2504
|
-
"data-x-position": bt,
|
|
2505
|
-
style: {
|
|
2506
|
-
"--front-toast-height": `${((I = B[0]) == null ? void 0 : I.height) || 0}px`,
|
|
2507
|
-
"--width": `${Vr}px`,
|
|
2508
|
-
"--gap": `${w}px`,
|
|
2509
|
-
...h,
|
|
2510
|
-
...Kr(u, r)
|
|
2511
|
-
},
|
|
2512
|
-
onBlur: (L) => {
|
|
2513
|
-
pt.current && !L.currentTarget.contains(L.relatedTarget) && (pt.current = !1, z.current && (z.current.focus({
|
|
2514
|
-
preventScroll: !0
|
|
2515
|
-
}), z.current = null));
|
|
2516
|
-
},
|
|
2517
|
-
onFocus: (L) => {
|
|
2518
|
-
L.target instanceof HTMLElement && L.target.dataset.dismissible === "false" || pt.current || (pt.current = !0, z.current = L.relatedTarget);
|
|
2519
|
-
},
|
|
2520
|
-
onMouseEnter: () => N(!0),
|
|
2521
|
-
onMouseMove: () => N(!0),
|
|
2522
|
-
onMouseLeave: () => {
|
|
2523
|
-
P || N(!1);
|
|
2524
|
-
},
|
|
2525
|
-
onDragEnd: () => N(!1),
|
|
2526
|
-
onPointerDown: (L) => {
|
|
2527
|
-
L.target instanceof HTMLElement && L.target.dataset.dismissible === "false" || j(!0);
|
|
2528
|
-
},
|
|
2529
|
-
onPointerUp: () => j(!1)
|
|
2530
|
-
}, D.filter((L) => !L.position && W === 0 || L.position === M).map((L, wt) => {
|
|
2531
|
-
var It, Ht;
|
|
2532
|
-
return /* @__PURE__ */ v.createElement(qr, {
|
|
2533
|
-
key: L.id,
|
|
2534
|
-
icons: x,
|
|
2535
|
-
index: wt,
|
|
2536
|
-
toast: L,
|
|
2537
|
-
defaultRichColors: m,
|
|
2538
|
-
duration: (It = g == null ? void 0 : g.duration) != null ? It : p,
|
|
2539
|
-
className: g == null ? void 0 : g.className,
|
|
2540
|
-
descriptionClassName: g == null ? void 0 : g.descriptionClassName,
|
|
2541
|
-
invert: a,
|
|
2542
|
-
visibleToasts: y,
|
|
2543
|
-
closeButton: (Ht = g == null ? void 0 : g.closeButton) != null ? Ht : d,
|
|
2544
|
-
interacting: P,
|
|
2545
|
-
position: M,
|
|
2546
|
-
style: g == null ? void 0 : g.style,
|
|
2547
|
-
unstyled: g == null ? void 0 : g.unstyled,
|
|
2548
|
-
classNames: g == null ? void 0 : g.classNames,
|
|
2549
|
-
cancelButtonStyle: g == null ? void 0 : g.cancelButtonStyle,
|
|
2550
|
-
actionButtonStyle: g == null ? void 0 : g.actionButtonStyle,
|
|
2551
|
-
closeButtonAriaLabel: g == null ? void 0 : g.closeButtonAriaLabel,
|
|
2552
|
-
removeToast: _t,
|
|
2553
|
-
toasts: D.filter((xt) => xt.position == L.position),
|
|
2554
|
-
heights: B.filter((xt) => xt.position == L.position),
|
|
2555
|
-
setHeights: H,
|
|
2556
|
-
expandByDefault: l,
|
|
2557
|
-
gap: w,
|
|
2558
|
-
expanded: _,
|
|
2559
|
-
swipeDirections: e.swipeDirections
|
|
2560
|
-
});
|
|
2561
|
-
})) : null;
|
|
2562
|
-
}));
|
|
2563
|
-
});
|
|
2564
1844
|
export {
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
ua as t,
|
|
2577
|
-
na as u
|
|
1845
|
+
an as R,
|
|
1846
|
+
Sr as a,
|
|
1847
|
+
Rr as b,
|
|
1848
|
+
Cr as c,
|
|
1849
|
+
vr as d,
|
|
1850
|
+
br as f,
|
|
1851
|
+
gr as h,
|
|
1852
|
+
xr as l,
|
|
1853
|
+
wr as o,
|
|
1854
|
+
yr as s,
|
|
1855
|
+
pr as u
|
|
2578
1856
|
};
|