minerva-design 1.19.2 → 1.19.3
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/CHANGELOG.md +10 -0
- package/dist/dom/dismissable-layer.d.cts +7 -5
- package/dist/dom/dismissable-layer.d.ts +7 -5
- package/dist/dom/focus-scope.d.cts +3 -2
- package/dist/dom/focus-scope.d.ts +3 -2
- package/dist/dom/index.cjs +2 -2
- package/dist/dom/index.cjs.map +1 -1
- package/dist/dom/index.js +398 -374
- package/dist/dom/index.js.map +1 -1
- package/dist/dom/internal/shared-state.d.cts +13 -0
- package/dist/dom/internal/shared-state.d.ts +13 -0
- package/dist/taro/{components-R1m1BIE0.js → components-BUS7TwNX.js} +1 -1
- package/dist/taro/icons.js +1 -1
- package/dist/taro/index.js +1 -1
- package/dist/taro/monaco.js +1 -1
- package/dist/uni/AutoComplete.vue +33 -25
- package/dist/web-components/cdn/minerva.js +414 -414
- package/dist/web-components/cdn/minerva.js.map +1 -1
- package/package.json +1 -1
package/dist/dom/index.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { DESIGN_ATTRIBUTES as e, PALETTES as t, activeCueText as n, createTypeahead as r, cueText as i, dashboardCardMove as a, dashboardInsertIndex as o, dashboardKeyAction as s, dashboardKeyboardTarget as c, dashboardSlots as l, designAttributes as u, getNextIndex as d, isDashboardNoop as f, isPalette as p, isSrtSource as m, isThemeMode as h, isThemeName as g, loadCaptions as _, presetPalette as v, primaryColorTokens as y, themeKeys as b, themes as x, tokenToCss as S } from "../core/index.js";
|
|
2
|
-
import { arrow as
|
|
2
|
+
import { arrow as ee, autoUpdate as te, computePosition as ne, flip as re, limitShift as C, offset as ie, shift as w, size as ae } from "@floating-ui/dom";
|
|
3
3
|
//#region src/dom.ts
|
|
4
|
-
function
|
|
4
|
+
function T() {
|
|
5
5
|
return typeof window < "u" && typeof document < "u" && typeof document.createElement == "function";
|
|
6
6
|
}
|
|
7
|
-
function
|
|
7
|
+
function E(e) {
|
|
8
8
|
if (e) {
|
|
9
9
|
if (e.nodeType === 9) return e;
|
|
10
10
|
if (e.ownerDocument) return e.ownerDocument;
|
|
11
11
|
}
|
|
12
12
|
return document;
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
return
|
|
14
|
+
function oe(e) {
|
|
15
|
+
return E(e).defaultView ?? window;
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function D(e) {
|
|
18
18
|
if (!e || typeof e != "object") return !1;
|
|
19
19
|
let t = e;
|
|
20
20
|
if (t.nodeType !== 1) return !1;
|
|
21
21
|
let n = t.ownerDocument?.defaultView;
|
|
22
22
|
return n && e instanceof n.HTMLElement ? !0 : typeof HTMLElement < "u" && e instanceof HTMLElement;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function O(e = document) {
|
|
25
25
|
let t = e.activeElement;
|
|
26
26
|
for (; t?.shadowRoot?.activeElement;) t = t.shadowRoot.activeElement;
|
|
27
27
|
return t;
|
|
28
28
|
}
|
|
29
|
-
function
|
|
29
|
+
function k(e, t) {
|
|
30
30
|
if (!e || !t) return !1;
|
|
31
31
|
let n = t;
|
|
32
32
|
for (; n;) {
|
|
33
33
|
if (e === n || e.contains(n)) return !0;
|
|
34
34
|
let t = n.getRootNode();
|
|
35
|
-
n =
|
|
35
|
+
n = A(t) ? t.host : null;
|
|
36
36
|
}
|
|
37
|
-
for (let n =
|
|
37
|
+
for (let n = se(t); n; n = se(n)) if (n === e) return !0;
|
|
38
38
|
return !1;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function se(e) {
|
|
41
41
|
let t = e.parentNode;
|
|
42
42
|
if (!t) return null;
|
|
43
|
-
if (
|
|
43
|
+
if (A(t)) return t.host;
|
|
44
44
|
let n = t.shadowRoot;
|
|
45
|
-
return n ?
|
|
45
|
+
return n ? M(e, n) : t;
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function A(e) {
|
|
48
48
|
return e.nodeType === 11 && "host" in e && !!e.host;
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function j(e) {
|
|
51
51
|
let t = e.composedPath?.();
|
|
52
52
|
return (t && t.length > 0 ? t[0] : e.target) ?? null;
|
|
53
53
|
}
|
|
54
|
-
var
|
|
55
|
-
function
|
|
54
|
+
var ce = "a[href],area[href],button,input,select,textarea,iframe,object,embed,audio[controls],video[controls],summary,[contenteditable],[tabindex]";
|
|
55
|
+
function le(e) {
|
|
56
56
|
if (e.disabled === !0 || e.hasAttribute("disabled") && "disabled" in e) return !0;
|
|
57
57
|
let t = e.closest("fieldset[disabled]");
|
|
58
58
|
if (t && "disabled" in e) {
|
|
@@ -61,20 +61,20 @@ function ce(e) {
|
|
|
61
61
|
}
|
|
62
62
|
return !1;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function M(e, t) {
|
|
65
65
|
let n = e.assignedSlot;
|
|
66
66
|
if (n) return n;
|
|
67
67
|
let r = e.nodeType === 1 ? e.getAttribute("slot") ?? "" : "";
|
|
68
68
|
return Array.from(t.querySelectorAll("slot")).find((e) => (e.getAttribute("name") ?? "") === r) ?? null;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function ue(e) {
|
|
71
71
|
let t = e.parentElement;
|
|
72
|
-
if (t?.shadowRoot) return
|
|
72
|
+
if (t?.shadowRoot) return M(e, t.shadowRoot) ?? !1;
|
|
73
73
|
if (t) return t;
|
|
74
74
|
let n = e.parentNode;
|
|
75
|
-
return n &&
|
|
75
|
+
return n && A(n) ? n.host : null;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function de(e) {
|
|
78
78
|
let t = e.ownerDocument.defaultView;
|
|
79
79
|
if (!t) return !1;
|
|
80
80
|
for (let n = e; n;) {
|
|
@@ -83,17 +83,17 @@ function ue(e) {
|
|
|
83
83
|
let t = n.querySelector(":scope > summary");
|
|
84
84
|
if (!t || !t.contains(e)) return !0;
|
|
85
85
|
}
|
|
86
|
-
let r =
|
|
86
|
+
let r = ue(n);
|
|
87
87
|
if (r === !1) return !0;
|
|
88
88
|
n = r;
|
|
89
89
|
}
|
|
90
90
|
let n = t.getComputedStyle(e).visibility;
|
|
91
91
|
return n === "hidden" || n === "collapse";
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return !e.matches(
|
|
93
|
+
function N(e) {
|
|
94
|
+
return !e.matches(ce) || e.matches("[contenteditable='false']") && !e.hasAttribute("tabindex") || e.tagName === "INPUT" && e.type === "hidden" || e.tagName === "SUMMARY" && e.parentElement?.tagName === "DETAILS" && e.parentElement.querySelector(":scope > summary") !== e || le(e) || e.closest("[inert]") ? !1 : !de(e);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function P(e) {
|
|
97
97
|
let t = e.getAttribute("tabindex");
|
|
98
98
|
if (t !== null && t.trim() !== "") {
|
|
99
99
|
let e = Number.parseInt(t, 10);
|
|
@@ -101,13 +101,13 @@ function F(e) {
|
|
|
101
101
|
}
|
|
102
102
|
return 0;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
105
|
-
return
|
|
104
|
+
function F(e) {
|
|
105
|
+
return N(e) && P(e) >= 0;
|
|
106
106
|
}
|
|
107
107
|
function I(e, t) {
|
|
108
|
-
for (let n of Array.from(e.children))
|
|
108
|
+
for (let n of Array.from(e.children)) L(n, t);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
110
|
+
function L(e, t) {
|
|
111
111
|
if (t.push(e), e.shadowRoot) {
|
|
112
112
|
I(e.shadowRoot, t);
|
|
113
113
|
return;
|
|
@@ -115,57 +115,57 @@ function fe(e, t) {
|
|
|
115
115
|
if (e.tagName === "SLOT") {
|
|
116
116
|
let n = e.assignedElements?.({ flatten: !0 }) ?? [];
|
|
117
117
|
if (n.length > 0) {
|
|
118
|
-
for (let e of n)
|
|
118
|
+
for (let e of n) L(e, t);
|
|
119
119
|
return;
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
I(e, t);
|
|
123
123
|
}
|
|
124
|
-
function
|
|
124
|
+
function fe(e) {
|
|
125
125
|
return e.shadowRoot ?? e;
|
|
126
126
|
}
|
|
127
|
-
function
|
|
127
|
+
function R(e, t = {}) {
|
|
128
128
|
let n = [];
|
|
129
|
-
return t.includeContainer && e.nodeType === 1 && n.push(e), I(
|
|
129
|
+
return t.includeContainer && e.nodeType === 1 && n.push(e), I(fe(e), n), n.filter((e) => D(e) && N(e));
|
|
130
130
|
}
|
|
131
|
-
function
|
|
131
|
+
function z(e) {
|
|
132
132
|
let t = e;
|
|
133
133
|
return t.tagName === "INPUT" && t.type === "radio" && t.name ? t : null;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function pe(e) {
|
|
136
136
|
return [e.form ?? e.getRootNode(), e.name];
|
|
137
137
|
}
|
|
138
138
|
function B(e, t = {}) {
|
|
139
|
-
let { radioGroups: n = !0 } = t, r =
|
|
139
|
+
let { radioGroups: n = !0 } = t, r = R(e, t).filter((e) => P(e) >= 0);
|
|
140
140
|
if (n) {
|
|
141
141
|
let e = /* @__PURE__ */ new Map();
|
|
142
142
|
for (let t of r) {
|
|
143
|
-
let n =
|
|
143
|
+
let n = z(t);
|
|
144
144
|
if (!n) continue;
|
|
145
|
-
let [r, i] =
|
|
145
|
+
let [r, i] = pe(n), a = e.get(r);
|
|
146
146
|
a || e.set(r, a = /* @__PURE__ */ new Map());
|
|
147
147
|
let o = a.get(i);
|
|
148
148
|
(!o || !o.checked && n.checked) && a.set(i, n);
|
|
149
149
|
}
|
|
150
150
|
r = r.filter((t) => {
|
|
151
|
-
let n =
|
|
151
|
+
let n = z(t);
|
|
152
152
|
if (!n) return !0;
|
|
153
|
-
let [r, i] =
|
|
153
|
+
let [r, i] = pe(n);
|
|
154
154
|
return e.get(r)?.get(i) === n;
|
|
155
155
|
});
|
|
156
156
|
}
|
|
157
157
|
let i = r.map((e, t) => ({
|
|
158
158
|
el: e,
|
|
159
159
|
index: t,
|
|
160
|
-
tabIndex:
|
|
161
|
-
})).filter((e) => e.tabIndex > 0).sort((e, t) => e.tabIndex - t.tabIndex || e.index - t.index).map((e) => e.el), a = r.filter((e) =>
|
|
160
|
+
tabIndex: P(e)
|
|
161
|
+
})).filter((e) => e.tabIndex > 0).sort((e, t) => e.tabIndex - t.tabIndex || e.index - t.index).map((e) => e.el), a = r.filter((e) => P(e) === 0);
|
|
162
162
|
return [...i, ...a];
|
|
163
163
|
}
|
|
164
164
|
function V(e, t = {}) {
|
|
165
165
|
if (!e || typeof e.focus != "function") return !1;
|
|
166
|
-
let n =
|
|
166
|
+
let n = E(e), r = O(n);
|
|
167
167
|
e.focus({ preventScroll: t.preventScroll ?? !1 });
|
|
168
|
-
let i =
|
|
168
|
+
let i = O(n) === e;
|
|
169
169
|
return i && t.select && e !== r && (e.tagName === "INPUT" || e.tagName === "TEXTAREA") && typeof e.select == "function" && e.select(), i;
|
|
170
170
|
}
|
|
171
171
|
function me(e, t = {}) {
|
|
@@ -173,40 +173,57 @@ function me(e, t = {}) {
|
|
|
173
173
|
return null;
|
|
174
174
|
}
|
|
175
175
|
//#endregion
|
|
176
|
+
//#region src/internal/shared-state.ts
|
|
177
|
+
function H(e, t) {
|
|
178
|
+
let n = Symbol.for(`minerva.dom.${e}`), r = globalThis[n];
|
|
179
|
+
return r === void 0 && (r = t(), Object.defineProperty(globalThis, n, {
|
|
180
|
+
value: r,
|
|
181
|
+
configurable: !0,
|
|
182
|
+
enumerable: !1,
|
|
183
|
+
writable: !1
|
|
184
|
+
})), r;
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
176
187
|
//#region src/focus-scope.ts
|
|
177
|
-
var he = "minerva.focusScope.autoFocusOnMount", ge = "minerva.focusScope.autoFocusOnUnmount",
|
|
188
|
+
var he = "minerva.focusScope.autoFocusOnMount", ge = "minerva.focusScope.autoFocusOnUnmount", U = H("focus-scope.v1", () => []);
|
|
178
189
|
function _e(e) {
|
|
179
|
-
|
|
190
|
+
for (let t = U.length - 1; t >= 0; t--) if (U[t].doc === e) return U[t];
|
|
180
191
|
}
|
|
181
192
|
function ve(e) {
|
|
182
|
-
|
|
183
|
-
|
|
193
|
+
_e(e.doc)?.setStackPaused(!0), ye(e), U.push(e), e.setStackPaused(!1);
|
|
194
|
+
}
|
|
195
|
+
function ye(e) {
|
|
196
|
+
let t = U.indexOf(e);
|
|
197
|
+
t !== -1 && (U.splice(t, 1), _e(e.doc)?.setStackPaused(!1));
|
|
184
198
|
}
|
|
185
|
-
function
|
|
199
|
+
function be(e, t, n) {
|
|
186
200
|
let r = new ((e.ownerDocument.defaultView?.CustomEvent) ?? CustomEvent)(t, {
|
|
187
201
|
bubbles: !1,
|
|
188
202
|
cancelable: !0
|
|
189
203
|
});
|
|
190
204
|
return e.dispatchEvent(r), n?.(r) !== !1 && !r.defaultPrevented;
|
|
191
205
|
}
|
|
192
|
-
function
|
|
206
|
+
function xe(e) {
|
|
193
207
|
let t = (e) => e.tagName === "A";
|
|
194
208
|
return [...e.filter((e) => !t(e)), ...e.filter(t)];
|
|
195
209
|
}
|
|
196
|
-
function
|
|
197
|
-
let { trapped: n = !1, loop: r = !1, autoFocus: i = !0, restoreFocus: a = !0, onMountAutoFocus: o, onUnmountAutoFocus: s } = t, c =
|
|
198
|
-
|
|
199
|
-
|
|
210
|
+
function Se(e, t = {}) {
|
|
211
|
+
let { trapped: n = !1, loop: r = !1, autoFocus: i = !0, restoreFocus: a = !0, onMountAutoFocus: o, onUnmountAutoFocus: s } = t, c = E(e), l = !1, u = !1, d = !1, f = null, p = null, m = !1, h = null, g = () => u || d, _ = {
|
|
212
|
+
doc: c,
|
|
213
|
+
setStackPaused(e) {
|
|
214
|
+
d = e;
|
|
215
|
+
}
|
|
216
|
+
}, v = () => V(p?.isConnected ? p : e, { select: !0 }) || V(e), y = (t) => {
|
|
200
217
|
if (!n || g()) return;
|
|
201
|
-
let r =
|
|
202
|
-
r instanceof Node &&
|
|
218
|
+
let r = j(t);
|
|
219
|
+
r instanceof Node && k(e, r) ? D(r) && (p = r) : v();
|
|
203
220
|
}, b = (t) => {
|
|
204
221
|
if (!n || g()) return;
|
|
205
222
|
let r = t.relatedTarget;
|
|
206
|
-
r !== null && (r instanceof Node && r.shadowRoot &&
|
|
223
|
+
r !== null && (r instanceof Node && r.shadowRoot && k(r, e) || (!(r instanceof Node) || !k(e, r)) && v());
|
|
207
224
|
}, x = (t) => {
|
|
208
225
|
if (!r && !n || g() || t.defaultPrevented || t.key !== "Tab" || t.altKey || t.ctrlKey || t.metaKey) return;
|
|
209
|
-
let i =
|
|
226
|
+
let i = O(c), a = B(e);
|
|
210
227
|
if (a.length === 0) {
|
|
211
228
|
(i === e || n) && t.preventDefault();
|
|
212
229
|
return;
|
|
@@ -215,11 +232,11 @@ function xe(e, t = {}) {
|
|
|
215
232
|
!t.shiftKey && i === s ? (t.preventDefault(), r && V(o, { select: !0 })) : t.shiftKey && (i === o || i === e) && (t.preventDefault(), r && V(s, { select: !0 }));
|
|
216
233
|
}, S = () => {
|
|
217
234
|
if (!n || g()) return;
|
|
218
|
-
let t =
|
|
235
|
+
let t = O(c);
|
|
219
236
|
(!t || t === c.body) && V(e);
|
|
220
|
-
},
|
|
221
|
-
let t = () =>
|
|
222
|
-
if (
|
|
237
|
+
}, ee = () => {
|
|
238
|
+
let t = () => xe(B(e));
|
|
239
|
+
if (D(i)) return [i, ...t()];
|
|
223
240
|
if (typeof i == "function") {
|
|
224
241
|
let e = i();
|
|
225
242
|
return e ? [e, ...t()] : t();
|
|
@@ -230,26 +247,26 @@ function xe(e, t = {}) {
|
|
|
230
247
|
activate() {
|
|
231
248
|
if (l) return;
|
|
232
249
|
l = !0, u = !1;
|
|
233
|
-
let t =
|
|
234
|
-
f =
|
|
250
|
+
let t = O(c);
|
|
251
|
+
f = D(t) ? t : null, e.hasAttribute("tabindex") || (e.setAttribute("tabindex", "-1"), m = !0), ve(_), c.addEventListener("focusin", y), c.addEventListener("focusout", b), e.addEventListener("keydown", x);
|
|
235
252
|
let n = c.defaultView?.MutationObserver ?? (typeof MutationObserver < "u" ? MutationObserver : null);
|
|
236
253
|
n && (h = new n(S), h.observe(e, {
|
|
237
254
|
childList: !0,
|
|
238
255
|
subtree: !0
|
|
239
|
-
})), t instanceof Node &&
|
|
240
|
-
let r =
|
|
241
|
-
|
|
256
|
+
})), t instanceof Node && k(e, t) ? p = D(t) ? t : null : i !== !1 && be(e, "minerva.focusScope.autoFocusOnMount", o) && (me(ee(), { select: !0 }) || V(e));
|
|
257
|
+
let r = O(c);
|
|
258
|
+
D(r) && k(e, r) && (p = r);
|
|
242
259
|
},
|
|
243
260
|
deactivate() {
|
|
244
261
|
if (!l) return;
|
|
245
|
-
l = !1, c.removeEventListener("focusin", y), c.removeEventListener("focusout", b), e.removeEventListener("keydown", x), h?.disconnect(), h = null,
|
|
262
|
+
l = !1, c.removeEventListener("focusin", y), c.removeEventListener("focusout", b), e.removeEventListener("keydown", x), h?.disconnect(), h = null, ye(_), m && (e.removeAttribute("tabindex"), m = !1);
|
|
246
263
|
let t = a === !1 ? null : a === !0 ? f : a;
|
|
247
264
|
if (f = null, p = null, !t) return;
|
|
248
265
|
let n = c.defaultView;
|
|
249
266
|
(n?.setTimeout.bind(n) ?? setTimeout)(() => {
|
|
250
267
|
if (!t.isConnected) return;
|
|
251
|
-
let n =
|
|
252
|
-
n && n !== c.body && n.isConnected && !
|
|
268
|
+
let n = O(c);
|
|
269
|
+
n && n !== c.body && n.isConnected && !k(e, n) || be(e, "minerva.focusScope.autoFocusOnUnmount", s) && V(t, { select: !0 });
|
|
253
270
|
}, 0);
|
|
254
271
|
},
|
|
255
272
|
pause() {
|
|
@@ -263,53 +280,56 @@ function xe(e, t = {}) {
|
|
|
263
280
|
}
|
|
264
281
|
};
|
|
265
282
|
}
|
|
266
|
-
function
|
|
267
|
-
return
|
|
283
|
+
function Ce() {
|
|
284
|
+
return U.length;
|
|
268
285
|
}
|
|
269
286
|
//#endregion
|
|
270
287
|
//#region src/dismissable-layer.ts
|
|
271
|
-
var
|
|
272
|
-
|
|
273
|
-
|
|
288
|
+
var we = "data-minerva-escape-consumer", { layers: W, documents: G } = H("dismissable-layer.v1", () => ({
|
|
289
|
+
layers: [],
|
|
290
|
+
documents: /* @__PURE__ */ new WeakMap()
|
|
291
|
+
}));
|
|
292
|
+
function K(e) {
|
|
293
|
+
return W.filter((t) => t.doc === e);
|
|
274
294
|
}
|
|
275
295
|
function Te(e) {
|
|
296
|
+
return e ? W.find((t) => t.handle === e) ?? W.find((t) => t.element === e) ?? null : null;
|
|
297
|
+
}
|
|
298
|
+
function Ee(e) {
|
|
276
299
|
let { parent: t } = e.options;
|
|
277
|
-
return t === null ? null : t === void 0 ?
|
|
300
|
+
return t === null ? null : t === void 0 ? W.includes(e.implicitParent) ? e.implicitParent : null : typeof t == "object" && "destroy" in t ? Te(t) : Te(t) ?? [...W].reverse().find((n) => n !== e && k(n.element, t)) ?? null;
|
|
278
301
|
}
|
|
279
|
-
function
|
|
302
|
+
function De(e, t) {
|
|
280
303
|
let n = /* @__PURE__ */ new Set();
|
|
281
|
-
for (let r =
|
|
304
|
+
for (let r = Ee(t); r && !n.has(r); r = Ee(r)) {
|
|
282
305
|
if (r === e) return !0;
|
|
283
306
|
n.add(r);
|
|
284
307
|
}
|
|
285
308
|
return !1;
|
|
286
309
|
}
|
|
287
|
-
function
|
|
288
|
-
return
|
|
310
|
+
function Oe(e, t) {
|
|
311
|
+
return k(e.element, t) || (e.options.branches?.() ?? []).some((e) => e && k(e, t)) ? !0 : W.some((n) => n !== e && De(e, n) && (k(n.element, t) || (n.options.branches?.() ?? []).some((e) => e && k(e, t))));
|
|
289
312
|
}
|
|
290
|
-
function
|
|
291
|
-
for (let
|
|
313
|
+
function ke(e) {
|
|
314
|
+
for (let t = e.length - 1; t >= 0; t--) if (e[t].options.disableOutsidePointerEvents) return t;
|
|
292
315
|
return -1;
|
|
293
316
|
}
|
|
294
|
-
function
|
|
295
|
-
|
|
317
|
+
function Ae(e) {
|
|
318
|
+
let t = K(e.doc);
|
|
319
|
+
return t.indexOf(e) >= ke(t);
|
|
296
320
|
}
|
|
297
|
-
function
|
|
321
|
+
function je(e, t) {
|
|
298
322
|
let n = e.style;
|
|
299
323
|
n && (t === null || t === "" ? n.removeProperty("pointer-events") : n.pointerEvents = t);
|
|
300
324
|
}
|
|
301
|
-
function
|
|
302
|
-
let e =
|
|
303
|
-
|
|
304
|
-
let r =
|
|
305
|
-
|
|
306
|
-
}
|
|
307
|
-
U.forEach((t, n) => {
|
|
308
|
-
let r = e !== -1 && n >= e;
|
|
309
|
-
G(t.element, r ? "auto" : t.originalPointerEvents);
|
|
325
|
+
function Me(e) {
|
|
326
|
+
let t = K(e), n = ke(t), r = G.get(e), i = e.body;
|
|
327
|
+
r && i && (n !== -1 && r.bodyPointerEvents === null ? (r.bodyPointerEvents = i.style.pointerEvents ?? "", i.style.pointerEvents = "none") : n === -1 && r.bodyPointerEvents !== null && (je(i, r.bodyPointerEvents), r.bodyPointerEvents = null)), t.forEach((e, t) => {
|
|
328
|
+
let r = n !== -1 && t >= n;
|
|
329
|
+
je(e.element, r ? "auto" : e.originalPointerEvents);
|
|
310
330
|
});
|
|
311
331
|
}
|
|
312
|
-
function
|
|
332
|
+
function Ne(e, t) {
|
|
313
333
|
let n = e.defaultPrevented, r = !1, i = !1, a = !e.cancelable;
|
|
314
334
|
if (a) {
|
|
315
335
|
let t = e.preventDefault;
|
|
@@ -327,36 +347,36 @@ function je(e, t) {
|
|
|
327
347
|
}
|
|
328
348
|
return i && (r = !0), !r && (n || !e.defaultPrevented);
|
|
329
349
|
}
|
|
330
|
-
function
|
|
331
|
-
let
|
|
332
|
-
if (!
|
|
333
|
-
let
|
|
334
|
-
for (let n of
|
|
335
|
-
if (!
|
|
350
|
+
function Pe(e, t, n) {
|
|
351
|
+
let r = j(e);
|
|
352
|
+
if (!r || typeof r != "object" || !("nodeType" in r)) return;
|
|
353
|
+
let i = r, a = K(n).reverse().filter((e) => t === "pointer" && (!e.pointerReady || !Ae(e)) || e.options.excludeFromOutside?.(i) ? !1 : !Oe(e, i));
|
|
354
|
+
for (let n of a) {
|
|
355
|
+
if (!W.includes(n)) continue;
|
|
336
356
|
let { options: r } = n;
|
|
337
|
-
|
|
357
|
+
Ne(e, [t === "pointer" ? r.onPointerDownOutside : r.onFocusOutside, r.onInteractOutside]) && r.onDismiss?.();
|
|
338
358
|
}
|
|
339
359
|
}
|
|
340
|
-
function
|
|
341
|
-
let t =
|
|
360
|
+
function Fe(e) {
|
|
361
|
+
let t = G.get(e);
|
|
342
362
|
if (t) {
|
|
343
363
|
t.refs += 1;
|
|
344
364
|
return;
|
|
345
365
|
}
|
|
346
366
|
let n = (t) => {
|
|
347
|
-
if (t.key !== "Escape" ||
|
|
348
|
-
let n =
|
|
349
|
-
|
|
367
|
+
if (t.key !== "Escape" || j(t)?.closest?.("[data-minerva-escape-consumer]")) return;
|
|
368
|
+
let n = K(e), r = n[n.length - 1];
|
|
369
|
+
r && Ne(t, [r.options.onEscapeKeyDown]) && r.options.onDismiss && (t.preventDefault(), r.options.onDismiss());
|
|
350
370
|
}, r = null, i = (t) => {
|
|
351
371
|
if (r && (e.removeEventListener("click", r), r = null), t.pointerType === "touch") {
|
|
352
372
|
r = () => {
|
|
353
|
-
r = null,
|
|
373
|
+
r = null, Pe(t, "pointer", e);
|
|
354
374
|
}, e.addEventListener("click", r, { once: !0 });
|
|
355
375
|
return;
|
|
356
376
|
}
|
|
357
|
-
|
|
358
|
-
}, a = (
|
|
359
|
-
e.addEventListener("keydown", n, !0), e.addEventListener("pointerdown", i, !0), e.addEventListener("focusin", a, !0),
|
|
377
|
+
Pe(t, "pointer", e);
|
|
378
|
+
}, a = (t) => Pe(t, "focus", e);
|
|
379
|
+
e.addEventListener("keydown", n, !0), e.addEventListener("pointerdown", i, !0), e.addEventListener("focusin", a, !0), G.set(e, {
|
|
360
380
|
refs: 1,
|
|
361
381
|
bodyPointerEvents: null,
|
|
362
382
|
cleanup() {
|
|
@@ -364,119 +384,123 @@ function Ne(e) {
|
|
|
364
384
|
}
|
|
365
385
|
});
|
|
366
386
|
}
|
|
367
|
-
function
|
|
368
|
-
let t =
|
|
369
|
-
t && (--t.refs, !(t.refs > 0) && (t.cleanup(), t.bodyPointerEvents !== null && e.body &&
|
|
387
|
+
function Ie(e) {
|
|
388
|
+
let t = G.get(e);
|
|
389
|
+
t && (--t.refs, !(t.refs > 0) && (t.cleanup(), t.bodyPointerEvents !== null && e.body && je(e.body, t.bodyPointerEvents), G.delete(e)));
|
|
370
390
|
}
|
|
371
|
-
function
|
|
372
|
-
let n =
|
|
391
|
+
function Le(e, t = {}) {
|
|
392
|
+
let n = E(e), r = K(n), i = [...r].reverse().find((t) => k(t.element, e)) ?? r[r.length - 1] ?? null, a = !1, o = {
|
|
373
393
|
element: e,
|
|
374
394
|
destroy() {
|
|
375
|
-
if (
|
|
376
|
-
|
|
377
|
-
let t =
|
|
378
|
-
t !== -1 &&
|
|
395
|
+
if (a) return;
|
|
396
|
+
a = !0, clearTimeout(s.readyTimer);
|
|
397
|
+
let t = W.indexOf(s);
|
|
398
|
+
t !== -1 && W.splice(t, 1), je(e, s.originalPointerEvents), Me(n), Ie(n);
|
|
379
399
|
},
|
|
380
400
|
update(e) {
|
|
381
|
-
|
|
382
|
-
...
|
|
401
|
+
a || (s.options = {
|
|
402
|
+
...s.options,
|
|
383
403
|
...e
|
|
384
|
-
},
|
|
404
|
+
}, Me(n));
|
|
385
405
|
}
|
|
386
|
-
},
|
|
387
|
-
handle:
|
|
406
|
+
}, s = {
|
|
407
|
+
handle: o,
|
|
388
408
|
element: e,
|
|
409
|
+
doc: n,
|
|
389
410
|
options: { ...t },
|
|
390
411
|
pointerReady: !1,
|
|
391
412
|
readyTimer: void 0,
|
|
392
413
|
originalPointerEvents: e.style?.getPropertyValue("pointer-events") || null,
|
|
393
|
-
implicitParent:
|
|
414
|
+
implicitParent: i
|
|
394
415
|
};
|
|
395
|
-
|
|
396
|
-
let
|
|
397
|
-
return
|
|
398
|
-
|
|
399
|
-
}, 0),
|
|
400
|
-
}
|
|
401
|
-
function
|
|
402
|
-
return
|
|
416
|
+
W.push(s), Fe(n), Me(n);
|
|
417
|
+
let c = n.defaultView;
|
|
418
|
+
return s.readyTimer = (c?.setTimeout.bind(c) ?? setTimeout)(() => {
|
|
419
|
+
s.pointerReady = !0;
|
|
420
|
+
}, 0), o;
|
|
421
|
+
}
|
|
422
|
+
function Re() {
|
|
423
|
+
return W.map((e) => ({
|
|
403
424
|
element: e.element,
|
|
404
425
|
disableOutsidePointerEvents: !!e.options.disableOutsidePointerEvents,
|
|
405
|
-
parent:
|
|
426
|
+
parent: Ee(e)?.element ?? null
|
|
406
427
|
}));
|
|
407
428
|
}
|
|
408
429
|
//#endregion
|
|
409
430
|
//#region src/scroll-lock.ts
|
|
410
|
-
var
|
|
411
|
-
function
|
|
431
|
+
var q = "--minerva-scrollbar-gap", J = H("scroll-lock.v1", () => /* @__PURE__ */ new WeakMap());
|
|
432
|
+
function ze(e) {
|
|
412
433
|
let t = e.ownerDocument, n = t.defaultView, r = e === t.body || e === t.documentElement ? (n?.innerWidth ?? 0) - t.documentElement.clientWidth : e.offsetWidth - e.clientWidth;
|
|
413
434
|
return Math.max(0, r || 0);
|
|
414
435
|
}
|
|
415
|
-
function
|
|
416
|
-
let t = e.ownerDocument, n = t.documentElement, r = e === t.body, i =
|
|
436
|
+
function Be(e) {
|
|
437
|
+
let t = e.ownerDocument, n = t.documentElement, r = e === t.body, i = ze(e), a = {
|
|
417
438
|
overflow: e.style.overflow,
|
|
418
439
|
paddingRight: e.style.paddingRight,
|
|
419
440
|
htmlOverflow: n.style.overflow,
|
|
420
|
-
gapVar: n.style.getPropertyValue(
|
|
441
|
+
gapVar: n.style.getPropertyValue(q)
|
|
421
442
|
};
|
|
422
443
|
if (i > 0) {
|
|
423
444
|
let n = t.defaultView?.getComputedStyle(e).paddingRight, r = Number.parseFloat(n ?? "") || 0;
|
|
424
445
|
e.style.paddingRight = `${r + i}px`;
|
|
425
446
|
}
|
|
426
|
-
return e.style.overflow = "hidden", r && (n.style.overflow = "hidden", n.style.setProperty(
|
|
427
|
-
e.style.overflow = a.overflow, e.style.paddingRight = a.paddingRight, r && (n.style.overflow = a.htmlOverflow, a.gapVar ? n.style.setProperty(
|
|
447
|
+
return e.style.overflow = "hidden", r && (n.style.overflow = "hidden", n.style.setProperty(q, `${i}px`)), () => {
|
|
448
|
+
e.style.overflow = a.overflow, e.style.paddingRight = a.paddingRight, r && (n.style.overflow = a.htmlOverflow, a.gapVar ? n.style.setProperty(q, a.gapVar) : n.style.removeProperty(q));
|
|
428
449
|
};
|
|
429
450
|
}
|
|
430
|
-
function
|
|
431
|
-
if (!
|
|
432
|
-
let t = e ?? document.body, n =
|
|
451
|
+
function Ve(e) {
|
|
452
|
+
if (!T()) return () => {};
|
|
453
|
+
let t = e ?? document.body, n = J.get(t);
|
|
433
454
|
n ? n.count += 1 : (n = {
|
|
434
455
|
count: 1,
|
|
435
|
-
restore:
|
|
436
|
-
},
|
|
456
|
+
restore: Be(t)
|
|
457
|
+
}, J.set(t, n));
|
|
437
458
|
let r = !1;
|
|
438
459
|
return () => {
|
|
439
460
|
if (r) return;
|
|
440
461
|
r = !0;
|
|
441
|
-
let e =
|
|
442
|
-
e && (--e.count, e.count === 0 && (
|
|
462
|
+
let e = J.get(t);
|
|
463
|
+
e && (--e.count, e.count === 0 && (J.delete(t), e.restore()));
|
|
443
464
|
};
|
|
444
465
|
}
|
|
445
|
-
function
|
|
446
|
-
return
|
|
466
|
+
function He(e) {
|
|
467
|
+
return T() ? J.has(e ?? document.body) : !1;
|
|
447
468
|
}
|
|
448
469
|
//#endregion
|
|
449
470
|
//#region src/hide-others.ts
|
|
450
|
-
var
|
|
471
|
+
var Ue = "[aria-live], [data-minerva-keep-visible]", We = /* @__PURE__ */ new Set([
|
|
451
472
|
"SCRIPT",
|
|
452
473
|
"STYLE",
|
|
453
474
|
"TEMPLATE",
|
|
454
475
|
"LINK",
|
|
455
476
|
"META"
|
|
456
|
-
]),
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
477
|
+
]), { counters: Y, preexisting: Ge } = H("hide-others.v1", () => ({
|
|
478
|
+
counters: {
|
|
479
|
+
"aria-hidden": /* @__PURE__ */ new WeakMap(),
|
|
480
|
+
inert: /* @__PURE__ */ new WeakMap()
|
|
481
|
+
},
|
|
482
|
+
preexisting: {
|
|
483
|
+
"aria-hidden": /* @__PURE__ */ new WeakSet(),
|
|
484
|
+
inert: /* @__PURE__ */ new WeakSet()
|
|
485
|
+
}
|
|
486
|
+
}));
|
|
487
|
+
function Ke(e, t) {
|
|
464
488
|
if (t === "aria-hidden") {
|
|
465
489
|
let t = e.getAttribute("aria-hidden");
|
|
466
490
|
return t !== null && t !== "false";
|
|
467
491
|
}
|
|
468
492
|
return e.hasAttribute(t);
|
|
469
493
|
}
|
|
470
|
-
function
|
|
471
|
-
let n =
|
|
472
|
-
n === 0 && (
|
|
494
|
+
function qe(e, t) {
|
|
495
|
+
let n = Y[t].get(e) ?? 0;
|
|
496
|
+
n === 0 && (Ke(e, t) ? Ge[t].add(e) : (Ge[t].delete(e), e.setAttribute(t, t === "inert" ? "" : "true"))), Y[t].set(e, n + 1);
|
|
473
497
|
}
|
|
474
|
-
function
|
|
475
|
-
let n =
|
|
476
|
-
n <= 0 || (n === 1 ? (
|
|
498
|
+
function Je(e, t) {
|
|
499
|
+
let n = Y[t].get(e) ?? 0;
|
|
500
|
+
n <= 0 || (n === 1 ? (Y[t].delete(e), Ge[t].has(e) || e.removeAttribute(t), Ge[t].delete(e)) : Y[t].set(e, n - 1));
|
|
477
501
|
}
|
|
478
|
-
function
|
|
479
|
-
if (!
|
|
502
|
+
function Ye(e, t = {}) {
|
|
503
|
+
if (!T()) return () => {};
|
|
480
504
|
let { root: n = document.body, attribute: r = "aria-hidden" } = t, i = (Array.isArray(e) ? e : [e]).filter((e) => e && n.contains(e) && e !== n);
|
|
481
505
|
if (i.length === 0) return () => {};
|
|
482
506
|
let a = new Set(i), o = /* @__PURE__ */ new Set();
|
|
@@ -487,7 +511,7 @@ function Ke(e, t = {}) {
|
|
|
487
511
|
a.has(t) || c(t);
|
|
488
512
|
continue;
|
|
489
513
|
}
|
|
490
|
-
|
|
514
|
+
We.has(t.tagName) || t.matches("[aria-live], [data-minerva-keep-visible]") || (qe(t, r), s.push(t));
|
|
491
515
|
}
|
|
492
516
|
};
|
|
493
517
|
c(n);
|
|
@@ -495,23 +519,23 @@ function Ke(e, t = {}) {
|
|
|
495
519
|
return () => {
|
|
496
520
|
if (!l) {
|
|
497
521
|
l = !0;
|
|
498
|
-
for (let e of s)
|
|
522
|
+
for (let e of s) Je(e, r);
|
|
499
523
|
}
|
|
500
524
|
};
|
|
501
525
|
}
|
|
502
526
|
//#endregion
|
|
503
527
|
//#region src/roving-focus.ts
|
|
504
|
-
var
|
|
505
|
-
function
|
|
506
|
-
let { itemSelector: n = "[data-minerva-item]", orientation: i = "vertical", dir: a = "ltr", loop: o = !0, getItemText: s =
|
|
528
|
+
var Xe = (e) => e.hasAttribute("disabled") || e.getAttribute("aria-disabled") === "true" || e.hasAttribute("data-disabled"), Ze = (e) => e.dataset.textValue ?? e.textContent ?? "";
|
|
529
|
+
function Qe(e, t = {}) {
|
|
530
|
+
let { itemSelector: n = "[data-minerva-item]", orientation: i = "vertical", dir: a = "ltr", loop: o = !0, getItemText: s = Ze, isItemDisabled: c = Xe, onActiveChange: l, focusOnMove: u = !0, pageSize: f } = t, p = t.typeahead ? r(t.typeahead === !0 ? {} : t.typeahead) : null, m = () => t.getItems ? t.getItems() : Array.from(e.querySelectorAll(n)), h = null, g = (e = m()) => {
|
|
507
531
|
(!h || !e.includes(h)) && (h = e.find((e) => e.getAttribute("tabindex") === "0") ?? e.find((e) => !c(e)) ?? null);
|
|
508
532
|
for (let t of e) t.setAttribute("tabindex", t === h ? "0" : "-1");
|
|
509
533
|
}, _ = (e, t, n) => {
|
|
510
534
|
let r = e !== h;
|
|
511
535
|
h = e, g(t), n && V(e), r && l?.(e, t.indexOf(e));
|
|
512
536
|
}, v = (e, t) => {
|
|
513
|
-
let n =
|
|
514
|
-
return n instanceof Node ? t.find((e) =>
|
|
537
|
+
let n = j(e);
|
|
538
|
+
return n instanceof Node ? t.find((e) => k(e, n)) ?? null : null;
|
|
515
539
|
}, y = (e) => {
|
|
516
540
|
if (e.defaultPrevented) return;
|
|
517
541
|
let t = m();
|
|
@@ -562,7 +586,7 @@ function Ye(e, t = {}) {
|
|
|
562
586
|
}
|
|
563
587
|
//#endregion
|
|
564
588
|
//#region src/nearest-in-row.ts
|
|
565
|
-
function
|
|
589
|
+
function $e(e, t, n) {
|
|
566
590
|
let r = t.getBoundingClientRect(), i = r.left + r.width / 2, a = null, o = Infinity, s = Infinity;
|
|
567
591
|
for (let c of e) {
|
|
568
592
|
if (c === t) continue;
|
|
@@ -577,71 +601,71 @@ function Xe(e, t, n) {
|
|
|
577
601
|
}
|
|
578
602
|
//#endregion
|
|
579
603
|
//#region src/direction.ts
|
|
580
|
-
function
|
|
604
|
+
function et(e) {
|
|
581
605
|
if (e.assignedSlot) return e.assignedSlot;
|
|
582
606
|
if (e.parentElement) return e.parentElement;
|
|
583
607
|
let t = e.parentNode;
|
|
584
608
|
return t && t.nodeType === 11 && "host" in t ? t.host : null;
|
|
585
609
|
}
|
|
586
|
-
function
|
|
587
|
-
for (let t = e ?? null; t; t =
|
|
610
|
+
function tt(e) {
|
|
611
|
+
for (let t = e ?? null; t; t = et(t)) {
|
|
588
612
|
let e = t.getAttribute("dir")?.toLowerCase();
|
|
589
613
|
if (e === "rtl" || e === "ltr") return e;
|
|
590
614
|
}
|
|
591
615
|
return e && (e.ownerDocument?.defaultView)?.getComputedStyle?.(e).direction === "rtl" ? "rtl" : "ltr";
|
|
592
616
|
}
|
|
593
|
-
function
|
|
594
|
-
return e ??
|
|
617
|
+
function nt(e, t) {
|
|
618
|
+
return e ?? tt(t);
|
|
595
619
|
}
|
|
596
|
-
function
|
|
597
|
-
return e !== "ArrowLeft" && e !== "ArrowRight" ||
|
|
620
|
+
function rt(e, t, n) {
|
|
621
|
+
return e !== "ArrowLeft" && e !== "ArrowRight" || nt(n, t) !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : "ArrowLeft";
|
|
598
622
|
}
|
|
599
623
|
//#endregion
|
|
600
624
|
//#region src/center-in-scroller.ts
|
|
601
|
-
function
|
|
625
|
+
function it(e, t) {
|
|
602
626
|
let n = e.scrollWidth - e.clientWidth;
|
|
603
627
|
if (n <= 0) return;
|
|
604
|
-
let r = e.getBoundingClientRect(), i = t.getBoundingClientRect(), a = i.left + i.width / 2 - (r.left + r.width / 2), o = e.scrollLeft + a, [s, c] =
|
|
628
|
+
let r = e.getBoundingClientRect(), i = t.getBoundingClientRect(), a = i.left + i.width / 2 - (r.left + r.width / 2), o = e.scrollLeft + a, [s, c] = tt(e) === "rtl" ? [-n, 0] : [0, n], l = Math.round(Math.min(c, Math.max(s, o)));
|
|
605
629
|
l !== e.scrollLeft && (e.scrollLeft = l);
|
|
606
630
|
}
|
|
607
631
|
//#endregion
|
|
608
632
|
//#region src/portal.ts
|
|
609
|
-
function
|
|
610
|
-
return e || (
|
|
633
|
+
function at(e) {
|
|
634
|
+
return e || (T() ? document.body : null);
|
|
611
635
|
}
|
|
612
|
-
var
|
|
613
|
-
function
|
|
614
|
-
let t =
|
|
636
|
+
var ot = "data-minerva-portal";
|
|
637
|
+
function st(e = {}) {
|
|
638
|
+
let t = at(e.parent);
|
|
615
639
|
if (!t) throw Error("createPortalHost() requires a DOM environment");
|
|
616
640
|
let n = t.ownerDocument.createElement(e.tagName ?? "div");
|
|
617
|
-
n.setAttribute(
|
|
641
|
+
n.setAttribute(ot, ""), e.id && (n.id = e.id);
|
|
618
642
|
for (let [t, r] of Object.entries(e.attributes ?? {})) n.setAttribute(t, r);
|
|
619
643
|
return t.appendChild(n), n;
|
|
620
644
|
}
|
|
621
645
|
//#endregion
|
|
622
646
|
//#region src/positioning.ts
|
|
623
|
-
var
|
|
624
|
-
function
|
|
625
|
-
let { offset: n, flip: r = !0, shift: i = !0, matchAnchorWidth: a = !1, fitViewportHeight: o = !1, arrowElement: s, padding: c = 8 } = e, l = n?.mainAxis ?? 8, u = n?.crossAxis ?? 0, d = [
|
|
647
|
+
var ct = 8, lt = 6;
|
|
648
|
+
function ut(e, t) {
|
|
649
|
+
let { offset: n, flip: r = !0, shift: i = !0, matchAnchorWidth: a = !1, fitViewportHeight: o = !1, arrowElement: s, padding: c = 8 } = e, l = n?.mainAxis ?? 8, u = n?.crossAxis ?? 0, d = [ie({
|
|
626
650
|
mainAxis: l,
|
|
627
651
|
crossAxis: u
|
|
628
652
|
})];
|
|
629
|
-
r && d.push(
|
|
653
|
+
r && d.push(re({
|
|
630
654
|
padding: c,
|
|
631
655
|
crossAxis: "alignment"
|
|
632
|
-
})), i && d.push(
|
|
656
|
+
})), i && d.push(w({
|
|
633
657
|
padding: c,
|
|
634
|
-
limiter:
|
|
658
|
+
limiter: C()
|
|
635
659
|
}));
|
|
636
660
|
let f = !!a || o;
|
|
637
|
-
return d.push(
|
|
661
|
+
return d.push(ae({
|
|
638
662
|
padding: c,
|
|
639
663
|
apply({ rects: e, availableHeight: n, availableWidth: r, elements: i }) {
|
|
640
664
|
if (t.availableWidth = r, t.availableHeight = n, !f) return;
|
|
641
665
|
let s = i.floating.style;
|
|
642
666
|
a === "exact" ? s.width = `${e.reference.width}px` : a === "min" && (s.minWidth = `${e.reference.width}px`), s.maxWidth = `${Math.max(0, r)}px`, o && (s.maxHeight = `${Math.max(0, n)}px`);
|
|
643
667
|
}
|
|
644
|
-
})), s && d.push(
|
|
668
|
+
})), s && d.push(ee({
|
|
645
669
|
element: s,
|
|
646
670
|
padding: 6
|
|
647
671
|
})), d.push({
|
|
@@ -649,11 +673,11 @@ function ot(e, t) {
|
|
|
649
673
|
fn: ({ rects: e }) => ({ data: { ...e } })
|
|
650
674
|
}), d;
|
|
651
675
|
}
|
|
652
|
-
async function
|
|
653
|
-
let r = {}, i = await
|
|
676
|
+
async function dt(e, t, n = {}) {
|
|
677
|
+
let r = {}, i = await ne(e, t, {
|
|
654
678
|
placement: n.placement ?? "bottom",
|
|
655
679
|
strategy: "fixed",
|
|
656
|
-
middleware:
|
|
680
|
+
middleware: ut(n, r)
|
|
657
681
|
}), a = i.middlewareData.arrow;
|
|
658
682
|
return {
|
|
659
683
|
x: i.x,
|
|
@@ -670,9 +694,9 @@ async function st(e, t, n = {}) {
|
|
|
670
694
|
rects: i.middlewareData.minervaRects
|
|
671
695
|
};
|
|
672
696
|
}
|
|
673
|
-
function
|
|
674
|
-
let i = !0, a =
|
|
675
|
-
|
|
697
|
+
function ft(e, t, n, r) {
|
|
698
|
+
let i = !0, a = te(e, t, () => {
|
|
699
|
+
dt(e, t, n).then((e) => {
|
|
676
700
|
i && r(e);
|
|
677
701
|
});
|
|
678
702
|
}, n.autoUpdate);
|
|
@@ -680,17 +704,17 @@ function ct(e, t, n, r) {
|
|
|
680
704
|
i = !1, a();
|
|
681
705
|
};
|
|
682
706
|
}
|
|
683
|
-
function
|
|
707
|
+
function pt(e) {
|
|
684
708
|
let [t, n] = e.split("-");
|
|
685
709
|
return {
|
|
686
710
|
side: t,
|
|
687
711
|
align: n ?? "center"
|
|
688
712
|
};
|
|
689
713
|
}
|
|
690
|
-
function
|
|
714
|
+
function mt(e, t = "center") {
|
|
691
715
|
return t === "center" ? e : `${e}-${t}`;
|
|
692
716
|
}
|
|
693
|
-
var
|
|
717
|
+
var ht = /* @__PURE__ */ (() => {
|
|
694
718
|
let e = {};
|
|
695
719
|
for (let t of [
|
|
696
720
|
"top",
|
|
@@ -700,14 +724,14 @@ var dt = /* @__PURE__ */ (() => {
|
|
|
700
724
|
]) e[t] = t, e[`${t}Start`] = `${t}-start`, e[`${t}End`] = `${t}-end`;
|
|
701
725
|
return e;
|
|
702
726
|
})();
|
|
703
|
-
function
|
|
704
|
-
return
|
|
727
|
+
function gt(e) {
|
|
728
|
+
return ht[e] ?? e;
|
|
705
729
|
}
|
|
706
|
-
function
|
|
730
|
+
function _t(e) {
|
|
707
731
|
return e.replace(/-(\w)/, (e, t) => t.toUpperCase());
|
|
708
732
|
}
|
|
709
|
-
function
|
|
710
|
-
let { side: r, align: i } =
|
|
733
|
+
function vt(e, t, n = 0) {
|
|
734
|
+
let { side: r, align: i } = pt(e), a = {
|
|
711
735
|
start: "0%",
|
|
712
736
|
center: "50%",
|
|
713
737
|
end: "100%"
|
|
@@ -719,15 +743,15 @@ function mt(e, t, n = 0) {
|
|
|
719
743
|
}[r];
|
|
720
744
|
return o ? `${s} ${c}` : `${c} ${s}`;
|
|
721
745
|
}
|
|
722
|
-
function
|
|
723
|
-
let { style: r } = e, { side: i, align: a } =
|
|
724
|
-
r.position = t.strategy, r.left = `${t.x}px`, r.top = `${t.y}px`, e.setAttribute("data-side", i), e.setAttribute("data-align", a), e.setAttribute("data-placement", t.placement), r.setProperty("--minerva-transform-origin",
|
|
746
|
+
function yt(e, t, n = {}) {
|
|
747
|
+
let { style: r } = e, { side: i, align: a } = pt(t.placement);
|
|
748
|
+
r.position = t.strategy, r.left = `${t.x}px`, r.top = `${t.y}px`, e.setAttribute("data-side", i), e.setAttribute("data-align", a), e.setAttribute("data-placement", t.placement), r.setProperty("--minerva-transform-origin", vt(t.placement, t.arrow, n.arrowSize));
|
|
725
749
|
let o = t.rects?.reference;
|
|
726
750
|
o && (r.setProperty("--minerva-anchor-width", `${o.width}px`), r.setProperty("--minerva-anchor-height", `${o.height}px`)), t.availableWidth != null && r.setProperty("--minerva-available-width", `${Math.max(0, t.availableWidth)}px`), t.availableHeight != null && r.setProperty("--minerva-available-height", `${Math.max(0, t.availableHeight)}px`);
|
|
727
751
|
}
|
|
728
752
|
//#endregion
|
|
729
753
|
//#region src/pointer-grace.ts
|
|
730
|
-
function
|
|
754
|
+
function bt(e, t) {
|
|
731
755
|
let { x: n, y: r } = e, i = !1;
|
|
732
756
|
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
|
|
733
757
|
let o = t[e].x, s = t[e].y, c = t[a].x, l = t[a].y;
|
|
@@ -735,7 +759,7 @@ function gt(e, t) {
|
|
|
735
759
|
}
|
|
736
760
|
return i;
|
|
737
761
|
}
|
|
738
|
-
function
|
|
762
|
+
function xt(e, t, n, r = 5) {
|
|
739
763
|
switch (n) {
|
|
740
764
|
case "right": return [
|
|
741
765
|
{
|
|
@@ -827,14 +851,14 @@ function _t(e, t, n, r = 5) {
|
|
|
827
851
|
];
|
|
828
852
|
}
|
|
829
853
|
}
|
|
830
|
-
function
|
|
854
|
+
function St(e = {}) {
|
|
831
855
|
let { padding: t = 5, timeout: n = 300 } = e, r = null, i = 0, a = () => n > 0 && Date.now() - i > n;
|
|
832
856
|
return {
|
|
833
857
|
start(e, n, a) {
|
|
834
|
-
r =
|
|
858
|
+
r = xt(e, n, a, t), i = Date.now();
|
|
835
859
|
},
|
|
836
860
|
isInGraceArea(e) {
|
|
837
|
-
return r ? a() ? (r = null, !1) :
|
|
861
|
+
return r ? a() ? (r = null, !1) : bt(e, r) : !1;
|
|
838
862
|
},
|
|
839
863
|
clear() {
|
|
840
864
|
r = null;
|
|
@@ -846,20 +870,20 @@ function vt(e = {}) {
|
|
|
846
870
|
}
|
|
847
871
|
//#endregion
|
|
848
872
|
//#region src/presence.ts
|
|
849
|
-
function
|
|
873
|
+
function Ct(e) {
|
|
850
874
|
return e ? Math.max(0, ...e.split(",").map((e) => {
|
|
851
875
|
let t = e.trim(), n = Number.parseFloat(t);
|
|
852
876
|
return Number.isNaN(n) ? 0 : t.endsWith("ms") ? n : n * 1e3;
|
|
853
877
|
})) : 0;
|
|
854
878
|
}
|
|
855
|
-
function
|
|
879
|
+
function wt(e) {
|
|
856
880
|
let t = e.ownerDocument.defaultView;
|
|
857
881
|
if (!t) return 0;
|
|
858
|
-
let n = t.getComputedStyle(e), r = n.animationName, i = r && r !== "none" ?
|
|
882
|
+
let n = t.getComputedStyle(e), r = n.animationName, i = r && r !== "none" ? Ct(n.animationDuration) + Ct(n.animationDelay) : 0, a = Ct(n.transitionDuration) + Ct(n.transitionDelay);
|
|
859
883
|
return Math.max(i, a);
|
|
860
884
|
}
|
|
861
|
-
function
|
|
862
|
-
let n =
|
|
885
|
+
function Tt(e, t = {}) {
|
|
886
|
+
let n = wt(e);
|
|
863
887
|
if (n <= 0) return Promise.resolve();
|
|
864
888
|
let r = e.ownerDocument.defaultView, i = t.timeout ?? n + 50;
|
|
865
889
|
return new Promise((t) => {
|
|
@@ -880,15 +904,15 @@ function xt(e, t = {}) {
|
|
|
880
904
|
}
|
|
881
905
|
//#endregion
|
|
882
906
|
//#region src/adjacent-tabbable.ts
|
|
883
|
-
function
|
|
884
|
-
let t =
|
|
907
|
+
function Et(e) {
|
|
908
|
+
let t = R(e.ownerDocument.body).filter((t) => !k(e, t) && F(t)), n = t.find((t) => e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_FOLLOWING);
|
|
885
909
|
if (n) return n;
|
|
886
910
|
let r = t.filter((t) => e.compareDocumentPosition(t) & Node.DOCUMENT_POSITION_PRECEDING);
|
|
887
911
|
return r[r.length - 1] ?? null;
|
|
888
912
|
}
|
|
889
913
|
//#endregion
|
|
890
914
|
//#region src/editable-target.ts
|
|
891
|
-
var
|
|
915
|
+
var Dt = [
|
|
892
916
|
"button",
|
|
893
917
|
"checkbox",
|
|
894
918
|
"color",
|
|
@@ -899,12 +923,12 @@ var Ct = [
|
|
|
899
923
|
"reset",
|
|
900
924
|
"submit"
|
|
901
925
|
];
|
|
902
|
-
function
|
|
903
|
-
return typeof HTMLElement > "u" || !(e instanceof HTMLElement) ? !1 : e.isContentEditable || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? !0 : e instanceof HTMLInputElement && !
|
|
926
|
+
function Ot(e) {
|
|
927
|
+
return typeof HTMLElement > "u" || !(e instanceof HTMLElement) ? !1 : e.isContentEditable || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? !0 : e instanceof HTMLInputElement && !Dt.includes(e.type);
|
|
904
928
|
}
|
|
905
929
|
//#endregion
|
|
906
930
|
//#region src/interactive-target.ts
|
|
907
|
-
var
|
|
931
|
+
var kt = [
|
|
908
932
|
"a[href]",
|
|
909
933
|
"area[href]",
|
|
910
934
|
"button",
|
|
@@ -936,7 +960,7 @@ var Tt = [
|
|
|
936
960
|
"combobox"
|
|
937
961
|
].map((e) => `[role='${e}']`)
|
|
938
962
|
].join(",");
|
|
939
|
-
function
|
|
963
|
+
function At(e, t) {
|
|
940
964
|
if (typeof Element > "u") return !1;
|
|
941
965
|
let n = e.composedPath?.() ?? [];
|
|
942
966
|
if (!n.length) {
|
|
@@ -945,24 +969,24 @@ function Et(e, t) {
|
|
|
945
969
|
}
|
|
946
970
|
for (let e of n) {
|
|
947
971
|
if (e === t) return !1;
|
|
948
|
-
if (e instanceof Element && e.matches(
|
|
972
|
+
if (e instanceof Element && e.matches(kt)) return !0;
|
|
949
973
|
}
|
|
950
974
|
return !1;
|
|
951
975
|
}
|
|
952
976
|
//#endregion
|
|
953
977
|
//#region src/dashboard-drag.ts
|
|
954
|
-
var
|
|
955
|
-
function
|
|
956
|
-
let t = (e) => e.parentElement?.closest(`[${
|
|
957
|
-
columns: () => Array.from(e.querySelectorAll(`[${
|
|
958
|
-
columnKey: (e) => e.getAttribute(
|
|
978
|
+
var X = "data-dashboard-column", Z = "data-dashboard-card", jt = 4, Mt = 250, Nt = 8, Q = 48, Pt = 16, Ft = (e) => (e?.textContent ?? "").replace(/\s+/g, " ").trim();
|
|
979
|
+
function It(e) {
|
|
980
|
+
let t = (e) => e.parentElement?.closest(`[${X}]`), n = (e, n) => Array.from(e.querySelectorAll(n.map((e) => `[data-minerva="dashboard-column"][data-part="${e}"]`).join(","))).filter((n) => t(n) === e), r = {
|
|
981
|
+
columns: () => Array.from(e.querySelectorAll(`[${X}]`)).filter((t) => t.parentElement?.closest("[data-minerva=\"dashboard-columns\"]") === e),
|
|
982
|
+
columnKey: (e) => e.getAttribute(X),
|
|
959
983
|
columnLabel: (e) => {
|
|
960
984
|
let [t] = n(e, ["title"]);
|
|
961
|
-
return
|
|
985
|
+
return Ft(t) || e.getAttribute("aria-label") || r.columnKey(e) || "";
|
|
962
986
|
},
|
|
963
|
-
cards: (e) => Array.from(e.querySelectorAll(`[${
|
|
964
|
-
cardKey: (e) => e.getAttribute(
|
|
965
|
-
cardLabel: (e) => e.getAttribute("aria-label") ||
|
|
987
|
+
cards: (e) => Array.from(e.querySelectorAll(`[${Z}]`)).filter((n) => t(n) === e),
|
|
988
|
+
cardKey: (e) => e.getAttribute(Z),
|
|
989
|
+
cardLabel: (e) => e.getAttribute("aria-label") || Ft(e) || r.cardKey(e) || "",
|
|
966
990
|
body: (e) => {
|
|
967
991
|
let t = n(e, ["list", "empty"]), i = t.find((e) => e.dataset.part === "list"), a = t.find((e) => e.dataset.part === "empty");
|
|
968
992
|
return r.cards(e).length > 0 ? i ?? a ?? null : a ?? i ?? null;
|
|
@@ -970,8 +994,8 @@ function Mt(e) {
|
|
|
970
994
|
};
|
|
971
995
|
return r;
|
|
972
996
|
}
|
|
973
|
-
var
|
|
974
|
-
function
|
|
997
|
+
var Lt = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0";
|
|
998
|
+
function Rt(e, t) {
|
|
975
999
|
let n = e.ownerDocument, r = n.defaultView ?? window, i = null, u = null, d = null, p = null, m = null, h = null, g = 0, _ = !1, v = () => t.columns().map((e) => ({
|
|
976
1000
|
element: e,
|
|
977
1001
|
key: t.columnKey(e)
|
|
@@ -991,45 +1015,45 @@ function Pt(e, t) {
|
|
|
991
1015
|
};
|
|
992
1016
|
}
|
|
993
1017
|
return null;
|
|
994
|
-
},
|
|
1018
|
+
}, ee = (t) => {
|
|
995
1019
|
for (let n of t.composedPath()) {
|
|
996
1020
|
if (n === e) return null;
|
|
997
1021
|
let t = S(n);
|
|
998
1022
|
if (t) return t;
|
|
999
1023
|
}
|
|
1000
1024
|
return null;
|
|
1001
|
-
}, ee = () => {
|
|
1002
|
-
d || (d = n.createElement("div"), d.setAttribute("data-dashboard-layer", ""), d.style.cssText = "position:fixed;top:0;left:0;width:0;height:0;overflow:visible;pointer-events:none;z-index:var(--z-popover, 1000)", p = n.createElement("span"), p.hidden = !0, m = n.createElement("div"), m.setAttribute("role", "status"), m.setAttribute("aria-live", "assertive"), m.setAttribute("aria-atomic", "true"), m.style.cssText = Nt, d.append(p, m));
|
|
1003
1025
|
}, te = () => {
|
|
1026
|
+
d || (d = n.createElement("div"), d.setAttribute("data-dashboard-layer", ""), d.style.cssText = "position:fixed;top:0;left:0;width:0;height:0;overflow:visible;pointer-events:none;z-index:var(--z-popover, 1000)", p = n.createElement("span"), p.hidden = !0, m = n.createElement("div"), m.setAttribute("role", "status"), m.setAttribute("aria-live", "assertive"), m.setAttribute("aria-atomic", "true"), m.style.cssText = Lt, d.append(p, m));
|
|
1027
|
+
}, ne = () => {
|
|
1004
1028
|
if (_) return;
|
|
1005
1029
|
if (!t.enabled()) {
|
|
1006
|
-
i &&
|
|
1030
|
+
i && O(), d?.remove();
|
|
1007
1031
|
return;
|
|
1008
1032
|
}
|
|
1009
|
-
|
|
1033
|
+
te();
|
|
1010
1034
|
let n = t.layerParent?.() ?? e;
|
|
1011
1035
|
d.parentNode !== n && n.append(d), p.id = t.hintId, p.textContent = t.t("dashboard.dragHint");
|
|
1012
|
-
},
|
|
1036
|
+
}, re = !1, C = (e, n) => {
|
|
1013
1037
|
if (!i || !m) return;
|
|
1014
1038
|
let r = b(), a = x(n.column);
|
|
1015
|
-
|
|
1039
|
+
re = !re, m.textContent = t.t(`dashboard.${e}`, {
|
|
1016
1040
|
card: i.label,
|
|
1017
1041
|
column: a ? t.columnLabel(a) : n.column,
|
|
1018
1042
|
position: n.index + 1,
|
|
1019
1043
|
total: l(r, i.key, n.column)
|
|
1020
|
-
}) + (
|
|
1021
|
-
},
|
|
1044
|
+
}) + (re ? "\xA0" : "");
|
|
1045
|
+
}, ie = () => {
|
|
1022
1046
|
let e = d?.getBoundingClientRect();
|
|
1023
1047
|
return {
|
|
1024
1048
|
x: e?.left ?? 0,
|
|
1025
1049
|
y: e?.top ?? 0
|
|
1026
1050
|
};
|
|
1027
|
-
},
|
|
1051
|
+
}, w = (e) => f(e) || !t.canDrop || t.canDrop(e), ae = (e, n) => {
|
|
1028
1052
|
if (!i) return null;
|
|
1029
1053
|
let r = t.scroller();
|
|
1030
1054
|
if (r) {
|
|
1031
1055
|
let t = r.getBoundingClientRect();
|
|
1032
|
-
if (e < t.left -
|
|
1056
|
+
if (e < t.left - Q || e > t.right + Q || n < t.top - Q || n > t.bottom + Q) return null;
|
|
1033
1057
|
}
|
|
1034
1058
|
let s = null, c = Infinity;
|
|
1035
1059
|
for (let t of v()) {
|
|
@@ -1044,11 +1068,11 @@ function Pt(e, t) {
|
|
|
1044
1068
|
column: s.key,
|
|
1045
1069
|
index: o(l, n)
|
|
1046
1070
|
});
|
|
1047
|
-
return u &&
|
|
1071
|
+
return u && w(u) ? {
|
|
1048
1072
|
column: u.toColumn,
|
|
1049
1073
|
index: u.toIndex
|
|
1050
1074
|
} : null;
|
|
1051
|
-
},
|
|
1075
|
+
}, T = () => {
|
|
1052
1076
|
if (!i) return;
|
|
1053
1077
|
let e = i.target ? x(i.target.column) : null;
|
|
1054
1078
|
if (i.column !== e && (i.column?.removeAttribute("data-dashboard-drop-target"), e?.setAttribute("data-dashboard-drop-target", ""), i.column = e), !e || !i.target) {
|
|
@@ -1065,13 +1089,13 @@ function Pt(e, t) {
|
|
|
1065
1089
|
c = n.left, l = n.width;
|
|
1066
1090
|
}
|
|
1067
1091
|
s = Math.min(Math.max(s, a.top), a.bottom);
|
|
1068
|
-
let u =
|
|
1092
|
+
let u = ie();
|
|
1069
1093
|
h.style.left = `${c - u.x}px`, h.style.top = `${s - u.y}px`, h.style.width = `${l}px`;
|
|
1070
|
-
},
|
|
1094
|
+
}, E = () => {
|
|
1071
1095
|
if (!i?.ghost) return;
|
|
1072
|
-
let e =
|
|
1096
|
+
let e = ie();
|
|
1073
1097
|
i.ghost.style.left = `${i.x - i.grabX - e.x}px`, i.ghost.style.top = `${i.y - i.grabY - e.y}px`;
|
|
1074
|
-
},
|
|
1098
|
+
}, oe = (a, o, s) => {
|
|
1075
1099
|
let c = b().find((e) => e.key === a.column).cards.indexOf(a.key);
|
|
1076
1100
|
if (i = {
|
|
1077
1101
|
mode: o,
|
|
@@ -1092,33 +1116,33 @@ function Pt(e, t) {
|
|
|
1092
1116
|
grabX: 0,
|
|
1093
1117
|
grabY: 0,
|
|
1094
1118
|
pointerId: s?.id
|
|
1095
|
-
},
|
|
1119
|
+
}, te(), ne(), a.element.setAttribute("data-dashboard-dragging", o), e.setAttribute("data-dashboard-dragging", o), s) {
|
|
1096
1120
|
let e = a.element.getBoundingClientRect();
|
|
1097
1121
|
i.grabX = s.x - e.left, i.grabY = s.y - e.top;
|
|
1098
1122
|
let t = a.element.cloneNode(!0);
|
|
1099
1123
|
for (let e of [t, ...t.querySelectorAll("[id]")]) e.removeAttribute("id");
|
|
1100
|
-
t.removeAttribute("data-dashboard-dragging"), t.removeAttribute(
|
|
1124
|
+
t.removeAttribute("data-dashboard-dragging"), t.removeAttribute(Z), t.removeAttribute("tabindex"), t.setAttribute("aria-hidden", "true"), t.setAttribute("inert", ""), t.setAttribute("data-dashboard-ghost", ""), t.style.position = "absolute", t.style.boxSizing = "border-box", t.style.width = `${e.width}px`, t.style.margin = "0", t.style.pointerEvents = "none", t.style.opacity = "0.92", t.style.transform = "rotate(1.5deg)", t.style.boxShadow = "var(--shadow-lg, 0 10px 24px rgb(0 0 0 / 0.18))", t.style.cursor = "grabbing", i.ghost = t, d.append(t), E(), r.getSelection?.()?.removeAllRanges(), n.addEventListener("keydown", pe, !0), n.addEventListener("contextmenu", A, !0), g = r.requestAnimationFrame(fe);
|
|
1101
1125
|
} else a.element.addEventListener("blur", B);
|
|
1102
|
-
|
|
1103
|
-
},
|
|
1126
|
+
T(), C("lifted", i.from);
|
|
1127
|
+
}, D = () => {
|
|
1104
1128
|
let t = i;
|
|
1105
|
-
return t ? (t.card.removeAttribute("data-dashboard-dragging"), t.card.removeEventListener("blur", B), t.column?.removeAttribute("data-dashboard-drop-target"), e.removeAttribute("data-dashboard-dragging"), t.ghost?.remove(), h?.remove(), h = null, r.cancelAnimationFrame(g), n.removeEventListener("keydown",
|
|
1106
|
-
},
|
|
1129
|
+
return t ? (t.card.removeAttribute("data-dashboard-dragging"), t.card.removeEventListener("blur", B), t.column?.removeAttribute("data-dashboard-drop-target"), e.removeAttribute("data-dashboard-dragging"), t.ghost?.remove(), h?.remove(), h = null, r.cancelAnimationFrame(g), n.removeEventListener("keydown", pe, !0), n.removeEventListener("contextmenu", A, !0), j(), t) : null;
|
|
1130
|
+
}, O = () => {
|
|
1107
1131
|
let e = i;
|
|
1108
|
-
e && (
|
|
1109
|
-
},
|
|
1132
|
+
e && (C("cancelled", e.from), D(), i = null);
|
|
1133
|
+
}, k = () => {
|
|
1110
1134
|
let e = i;
|
|
1111
1135
|
if (!e) return;
|
|
1112
1136
|
let n = e.target ? a(b(), e.key, e.target) : void 0;
|
|
1113
|
-
if (!n || !
|
|
1114
|
-
|
|
1137
|
+
if (!n || !w(n)) {
|
|
1138
|
+
O();
|
|
1115
1139
|
return;
|
|
1116
1140
|
}
|
|
1117
|
-
|
|
1141
|
+
C("dropped", {
|
|
1118
1142
|
column: n.toColumn,
|
|
1119
1143
|
index: n.toIndex
|
|
1120
|
-
}),
|
|
1121
|
-
},
|
|
1144
|
+
}), D(), i = null, !f(n) && (t.onMove(n), e.mode === "keyboard" && se(e.key, e.card));
|
|
1145
|
+
}, se = (e, t) => {
|
|
1122
1146
|
let i = () => {
|
|
1123
1147
|
if (_) return;
|
|
1124
1148
|
let r = n.activeElement;
|
|
@@ -1133,26 +1157,26 @@ function Pt(e, t) {
|
|
|
1133
1157
|
r.requestAnimationFrame(() => {
|
|
1134
1158
|
i(), r.requestAnimationFrame(i);
|
|
1135
1159
|
});
|
|
1136
|
-
},
|
|
1137
|
-
u?.timer && clearTimeout(u.timer), u = null, n.removeEventListener("pointermove",
|
|
1138
|
-
},
|
|
1160
|
+
}, A = (e) => e.preventDefault(), j = () => {
|
|
1161
|
+
u?.timer && clearTimeout(u.timer), u = null, n.removeEventListener("pointermove", ue), n.removeEventListener("pointerup", N), n.removeEventListener("pointercancel", F), e.removeEventListener("touchmove", I);
|
|
1162
|
+
}, ce = (e, t) => {
|
|
1139
1163
|
if (!u) return;
|
|
1140
1164
|
let n = S(u.card), r = u.pointerId;
|
|
1141
|
-
u.timer && clearTimeout(u.timer), u = null, n &&
|
|
1165
|
+
u.timer && clearTimeout(u.timer), u = null, n && oe(n, "pointer", {
|
|
1142
1166
|
x: e,
|
|
1143
1167
|
y: t,
|
|
1144
1168
|
id: r
|
|
1145
1169
|
});
|
|
1146
|
-
},
|
|
1170
|
+
}, le = (e, t) => {
|
|
1147
1171
|
for (let n of e.composedPath()) {
|
|
1148
1172
|
if (n === t) return !1;
|
|
1149
|
-
if (n instanceof Element && !(t.shadowRoot && n.getRootNode() === t.shadowRoot) && n.matches(
|
|
1173
|
+
if (n instanceof Element && !(t.shadowRoot && n.getRootNode() === t.shadowRoot) && n.matches(kt)) return !0;
|
|
1150
1174
|
}
|
|
1151
1175
|
return !1;
|
|
1152
|
-
},
|
|
1176
|
+
}, M = (r) => {
|
|
1153
1177
|
if (!t.enabled() || i || u || !r.isPrimary || r.pointerType === "mouse" && r.button) return;
|
|
1154
|
-
let a =
|
|
1155
|
-
if (!a ||
|
|
1178
|
+
let a = ee(r);
|
|
1179
|
+
if (!a || le(r, a.element)) return;
|
|
1156
1180
|
let o = r.pointerType !== "mouse";
|
|
1157
1181
|
if (u = {
|
|
1158
1182
|
card: a.element,
|
|
@@ -1162,106 +1186,106 @@ function Pt(e, t) {
|
|
|
1162
1186
|
y: r.clientY
|
|
1163
1187
|
}, o) {
|
|
1164
1188
|
let { x: t, y: n } = u;
|
|
1165
|
-
u.timer = setTimeout(() =>
|
|
1189
|
+
u.timer = setTimeout(() => ce(t, n), Mt), e.addEventListener("touchmove", I, { passive: !1 });
|
|
1166
1190
|
}
|
|
1167
|
-
n.addEventListener("pointermove",
|
|
1168
|
-
},
|
|
1191
|
+
n.addEventListener("pointermove", ue), n.addEventListener("pointerup", N), n.addEventListener("pointercancel", F);
|
|
1192
|
+
}, ue = (e) => {
|
|
1169
1193
|
if (u && e.pointerId === u.pointerId) {
|
|
1170
1194
|
let t = Math.hypot(e.clientX - u.x, e.clientY - u.y);
|
|
1171
1195
|
if (u.touch) {
|
|
1172
|
-
t >
|
|
1196
|
+
t > Nt && j();
|
|
1173
1197
|
return;
|
|
1174
1198
|
}
|
|
1175
|
-
if (t <
|
|
1176
|
-
|
|
1199
|
+
if (t < jt) return;
|
|
1200
|
+
ce(u.x, u.y);
|
|
1177
1201
|
}
|
|
1178
|
-
i && i.mode === "pointer" && e.pointerId === i.pointerId && (e.preventDefault(), i.x = e.clientX, i.y = e.clientY,
|
|
1179
|
-
},
|
|
1202
|
+
i && i.mode === "pointer" && e.pointerId === i.pointerId && (e.preventDefault(), i.x = e.clientX, i.y = e.clientY, E(), de());
|
|
1203
|
+
}, de = () => {
|
|
1180
1204
|
if (!i) return;
|
|
1181
|
-
let e =
|
|
1182
|
-
i.target = e,
|
|
1183
|
-
},
|
|
1205
|
+
let e = ae(i.x, i.y), t = e === i.target || e && i.target && e.column === i.target.column && e.index === i.target.index;
|
|
1206
|
+
i.target = e, T(), !t && e && C("over", e);
|
|
1207
|
+
}, N = (e) => {
|
|
1184
1208
|
if (i?.mode === "pointer" && e.pointerId === i.pointerId) {
|
|
1185
|
-
n.addEventListener("click",
|
|
1209
|
+
n.addEventListener("click", P, !0), setTimeout(() => n.removeEventListener("click", P, !0), 0), k();
|
|
1186
1210
|
return;
|
|
1187
1211
|
}
|
|
1188
|
-
u && e.pointerId === u.pointerId &&
|
|
1212
|
+
u && e.pointerId === u.pointerId && j();
|
|
1213
|
+
}, P = (e) => {
|
|
1214
|
+
e.preventDefault(), e.stopPropagation(), n.removeEventListener("click", P, !0);
|
|
1189
1215
|
}, F = (e) => {
|
|
1190
|
-
e.
|
|
1191
|
-
}, de = (e) => {
|
|
1192
|
-
i?.mode === "pointer" && e.pointerId === i.pointerId ? k() : u && e.pointerId === u.pointerId && M();
|
|
1216
|
+
i?.mode === "pointer" && e.pointerId === i.pointerId ? O() : u && e.pointerId === u.pointerId && j();
|
|
1193
1217
|
}, I = (e) => {
|
|
1194
1218
|
i?.mode === "pointer" && e.cancelable && e.preventDefault();
|
|
1195
|
-
},
|
|
1196
|
-
let r = e.getBoundingClientRect(), [i, a] = t === "x" ? [r.left, r.right] : [r.top, r.bottom], o = Math.min(
|
|
1219
|
+
}, L = (e, t, n) => {
|
|
1220
|
+
let r = e.getBoundingClientRect(), [i, a] = t === "x" ? [r.left, r.right] : [r.top, r.bottom], o = Math.min(Q, (a - i) / 4);
|
|
1197
1221
|
if (o <= 0) return !1;
|
|
1198
1222
|
let s = 0;
|
|
1199
|
-
if (n < i + o ? s = -Math.ceil(
|
|
1223
|
+
if (n < i + o ? s = -Math.ceil(Pt * (1 - Math.max(0, n - i) / o)) : n > a - o && (s = Math.ceil(Pt * (1 - Math.max(0, a - n) / o))), !s) return !1;
|
|
1200
1224
|
let c = t === "x" ? e.scrollLeft : e.scrollTop;
|
|
1201
1225
|
return t === "x" ? e.scrollLeft += s : e.scrollTop += s, (t === "x" ? e.scrollLeft : e.scrollTop) !== c;
|
|
1202
|
-
},
|
|
1226
|
+
}, fe = () => {
|
|
1203
1227
|
if (!i || i.mode !== "pointer") return;
|
|
1204
|
-
let e = t.scroller(), n = e ?
|
|
1205
|
-
a && (n =
|
|
1206
|
-
},
|
|
1228
|
+
let e = t.scroller(), n = e ? L(e, "x", i.x) : !1, a = i.column ? t.body(i.column) : null;
|
|
1229
|
+
a && (n = L(a, "y", i.y) || n), n && de(), g = r.requestAnimationFrame(fe);
|
|
1230
|
+
}, R = (e, t) => {
|
|
1207
1231
|
if (!e) return;
|
|
1208
1232
|
let n = e.getBoundingClientRect(), r = t.getBoundingClientRect();
|
|
1209
1233
|
r.left < n.left ? e.scrollLeft -= n.left - r.left : r.right > n.right && (e.scrollLeft += Math.min(r.right - n.right, r.left - n.left)), r.top < n.top ? e.scrollTop -= n.top - r.top : r.bottom > n.bottom && (e.scrollTop += Math.min(r.bottom - n.bottom, r.top - n.top));
|
|
1210
|
-
},
|
|
1234
|
+
}, z = (n) => {
|
|
1211
1235
|
if (!t.enabled() || n.defaultPrevented || n.altKey || n.ctrlKey || n.metaKey) return;
|
|
1212
|
-
let r = s(n.key,
|
|
1236
|
+
let r = s(n.key, tt(e) === "rtl");
|
|
1213
1237
|
if (!r) return;
|
|
1214
1238
|
if (!i) {
|
|
1215
1239
|
if (r !== "toggle" || n.repeat) return;
|
|
1216
1240
|
let e = S(n.target);
|
|
1217
1241
|
if (!e) return;
|
|
1218
|
-
n.preventDefault(),
|
|
1242
|
+
n.preventDefault(), oe(e, "keyboard");
|
|
1219
1243
|
return;
|
|
1220
1244
|
}
|
|
1221
1245
|
if (i.mode !== "keyboard" || n.target !== i.card) return;
|
|
1222
1246
|
if (n.preventDefault(), n.stopPropagation(), r === "toggle") {
|
|
1223
|
-
n.repeat ||
|
|
1247
|
+
n.repeat || k();
|
|
1224
1248
|
return;
|
|
1225
1249
|
}
|
|
1226
1250
|
if (r === "cancel") {
|
|
1227
|
-
|
|
1251
|
+
O();
|
|
1228
1252
|
return;
|
|
1229
1253
|
}
|
|
1230
|
-
let a = i.target ?? i.from, o = c(b(), i.key, a, r, t.canDrop ?
|
|
1254
|
+
let a = i.target ?? i.from, o = c(b(), i.key, a, r, t.canDrop ? w : void 0);
|
|
1231
1255
|
if (!o) return;
|
|
1232
1256
|
i.target = o;
|
|
1233
1257
|
let l = x(o.column);
|
|
1234
1258
|
if (l) {
|
|
1235
|
-
|
|
1259
|
+
R(t.scroller(), l);
|
|
1236
1260
|
let e = y(l).filter((e) => e.element !== i.card)[o.index], n = t.body(l);
|
|
1237
|
-
e ?
|
|
1261
|
+
e ? R(n, e.element) : n && (n.scrollTop = n.scrollHeight);
|
|
1238
1262
|
}
|
|
1239
|
-
|
|
1240
|
-
},
|
|
1241
|
-
i?.mode === "pointer" && s(e.key) === "cancel" && (e.preventDefault(), e.stopPropagation(),
|
|
1263
|
+
T(), C("over", o);
|
|
1264
|
+
}, pe = (e) => {
|
|
1265
|
+
i?.mode === "pointer" && s(e.key) === "cancel" && (e.preventDefault(), e.stopPropagation(), O());
|
|
1242
1266
|
}, B = () => {
|
|
1243
|
-
i?.mode === "keyboard" &&
|
|
1267
|
+
i?.mode === "keyboard" && O();
|
|
1244
1268
|
}, V = (n) => {
|
|
1245
|
-
t.enabled() && (i || u || n.target === e ||
|
|
1269
|
+
t.enabled() && (i || u || n.target === e || ee(n)) && n.preventDefault();
|
|
1246
1270
|
};
|
|
1247
|
-
return e.addEventListener("pointerdown",
|
|
1271
|
+
return e.addEventListener("pointerdown", M), e.addEventListener("keydown", z), e.addEventListener("dragstart", V), ne(), {
|
|
1248
1272
|
get dragging() {
|
|
1249
1273
|
return i !== null;
|
|
1250
1274
|
},
|
|
1251
|
-
refresh:
|
|
1252
|
-
cancel:
|
|
1275
|
+
refresh: ne,
|
|
1276
|
+
cancel: O,
|
|
1253
1277
|
destroy() {
|
|
1254
|
-
|
|
1278
|
+
D(), i = null, _ = !0, e.removeEventListener("pointerdown", M), e.removeEventListener("keydown", z), e.removeEventListener("dragstart", V), d?.remove(), d = null;
|
|
1255
1279
|
}
|
|
1256
1280
|
};
|
|
1257
1281
|
}
|
|
1258
|
-
var
|
|
1282
|
+
var zt = X, Bt = Z, Vt = It, Ht = Rt, Ut = (e) => async (t) => {
|
|
1259
1283
|
if (typeof fetch != "function") throw Error("fetch is unavailable");
|
|
1260
1284
|
let n = await fetch(t, { credentials: e === "use-credentials" ? "include" : "same-origin" });
|
|
1261
1285
|
if (!n.ok) throw Error(`HTTP ${n.status}`);
|
|
1262
1286
|
return n.text();
|
|
1263
1287
|
};
|
|
1264
|
-
function
|
|
1288
|
+
function Wt(e) {
|
|
1265
1289
|
let t = e?.activeCues;
|
|
1266
1290
|
if (!t) return "";
|
|
1267
1291
|
let n = [];
|
|
@@ -1271,7 +1295,7 @@ function Bt(e) {
|
|
|
1271
1295
|
}
|
|
1272
1296
|
return n.join("\n");
|
|
1273
1297
|
}
|
|
1274
|
-
function
|
|
1298
|
+
function Gt(e, t, r, i, a = {}) {
|
|
1275
1299
|
let o = Array.from(e.children).filter((e) => e.localName === "track"), s = (e) => {
|
|
1276
1300
|
try {
|
|
1277
1301
|
return e?.track ?? null;
|
|
@@ -1293,7 +1317,7 @@ function Vt(e, t, r, i, a = {}) {
|
|
|
1293
1317
|
e.addEventListener(t, n), f.push(() => e.removeEventListener(t, n));
|
|
1294
1318
|
}, h = !1, g = () => {
|
|
1295
1319
|
let t = [], r = () => u(n(t, e.currentTime));
|
|
1296
|
-
u(""), p(e, "timeupdate", r), p(e, "seeked", r), _(d.src, a.fetchText ??
|
|
1320
|
+
u(""), p(e, "timeupdate", r), p(e, "seeked", r), _(d.src, a.fetchText ?? Ut(a.crossOrigin)).then((e) => {
|
|
1297
1321
|
h || (t = e, r());
|
|
1298
1322
|
}, () => {
|
|
1299
1323
|
h || u("");
|
|
@@ -1302,7 +1326,7 @@ function Vt(e, t, r, i, a = {}) {
|
|
|
1302
1326
|
if (v && y && !m(d.src)) {
|
|
1303
1327
|
y.mode = "hidden";
|
|
1304
1328
|
let t = !0, n = () => {
|
|
1305
|
-
t && u(
|
|
1329
|
+
t && u(Wt(y));
|
|
1306
1330
|
};
|
|
1307
1331
|
p(y, "cuechange", n), p(v, "error", () => {
|
|
1308
1332
|
t && !h && (t = !1, g());
|
|
@@ -1322,10 +1346,10 @@ function Vt(e, t, r, i, a = {}) {
|
|
|
1322
1346
|
}
|
|
1323
1347
|
//#endregion
|
|
1324
1348
|
//#region src/code-selection.ts
|
|
1325
|
-
function
|
|
1349
|
+
function Kt(e) {
|
|
1326
1350
|
return e instanceof Element && e.localName === "code" ? e : e.querySelector("code") ?? e;
|
|
1327
1351
|
}
|
|
1328
|
-
function
|
|
1352
|
+
function qt(e, t) {
|
|
1329
1353
|
if ("rangeCount" in e) {
|
|
1330
1354
|
if (!e.rangeCount) return null;
|
|
1331
1355
|
let n = t.getRootNode(), r = null;
|
|
@@ -1339,7 +1363,7 @@ function Ut(e, t) {
|
|
|
1339
1363
|
}
|
|
1340
1364
|
return [[e.startContainer, e.startOffset], [e.endContainer, e.endOffset]];
|
|
1341
1365
|
}
|
|
1342
|
-
function
|
|
1366
|
+
function Jt(e, [t, n], r) {
|
|
1343
1367
|
if (t === e || e.contains(t)) {
|
|
1344
1368
|
let i = (e.ownerDocument ?? document).createRange();
|
|
1345
1369
|
return i.setStart(e, 0), i.setEnd(t, n), Math.min(r, i.toString().length);
|
|
@@ -1352,19 +1376,19 @@ function Wt(e, [t, n], r) {
|
|
|
1352
1376
|
}
|
|
1353
1377
|
return i & Node.DOCUMENT_POSITION_PRECEDING ? 0 : r;
|
|
1354
1378
|
}
|
|
1355
|
-
function
|
|
1379
|
+
function Yt(e, t, n) {
|
|
1356
1380
|
let r = e && typeof e.closest == "function" ? e.closest("mark[data-mark-index]") : null;
|
|
1357
1381
|
if (!r || !t.contains(r)) return;
|
|
1358
1382
|
let i = t.getRootNode().getSelection?.() ?? t.ownerDocument.getSelection();
|
|
1359
1383
|
if (!(i && !i.isCollapsed && t.contains(i.anchorNode))) return n?.[Number(r.getAttribute("data-mark-index"))];
|
|
1360
1384
|
}
|
|
1361
|
-
function
|
|
1385
|
+
function Xt(e, t) {
|
|
1362
1386
|
if (!e || typeof document > "u") return null;
|
|
1363
|
-
let n =
|
|
1387
|
+
let n = Kt(e), r = t === void 0 ? (n.ownerDocument?.defaultView ?? window).getSelection() : t;
|
|
1364
1388
|
if (!r) return null;
|
|
1365
|
-
let i =
|
|
1389
|
+
let i = qt(r, n);
|
|
1366
1390
|
if (!i) return null;
|
|
1367
|
-
let a = n.textContent ?? "", o =
|
|
1391
|
+
let a = n.textContent ?? "", o = Jt(n, i[0], a.length), s = Jt(n, i[1], a.length), c = Math.min(o, s), l = Math.max(o, s);
|
|
1368
1392
|
return c === l ? null : {
|
|
1369
1393
|
start: c,
|
|
1370
1394
|
end: l,
|
|
@@ -1373,32 +1397,32 @@ function Kt(e, t) {
|
|
|
1373
1397
|
}
|
|
1374
1398
|
//#endregion
|
|
1375
1399
|
//#region src/theme/apply-theme.ts
|
|
1376
|
-
var
|
|
1400
|
+
var Zt = "(prefers-color-scheme: dark)", Qt = () => typeof window > "u" || !window.matchMedia ? "light" : window.matchMedia(Zt).matches ? "dark" : "light", $t = (e) => typeof e == "object" && !!e && "light" in e && "dark" in e && typeof e.light == "object" && typeof e.dark == "object", en = (e, t = Qt()) => {
|
|
1377
1401
|
if (e === "auto" || e === "system") return x[t];
|
|
1378
1402
|
if (typeof e == "string") {
|
|
1379
1403
|
if (!g(e)) throw Error(`Unsupported theme "${e}", expected one of: auto, system, ${Object.keys(x).join(", ")}`);
|
|
1380
1404
|
return x[e];
|
|
1381
1405
|
}
|
|
1382
|
-
return
|
|
1383
|
-
},
|
|
1406
|
+
return $t(e) ? e[t] : e;
|
|
1407
|
+
}, tn = H("theme-applied-keys.v1", () => /* @__PURE__ */ new WeakMap()), nn = (e, t) => {
|
|
1384
1408
|
let n = /* @__PURE__ */ new Set();
|
|
1385
1409
|
Object.entries(t).forEach(([e, t]) => {
|
|
1386
1410
|
t != null && t !== "" && n.add(e);
|
|
1387
|
-
}), (/* @__PURE__ */ new Set([...
|
|
1411
|
+
}), (/* @__PURE__ */ new Set([...tn.get(e) ?? [], ...b])).forEach((t) => {
|
|
1388
1412
|
n.has(t) || e.removeProperty(`--${t}`);
|
|
1389
1413
|
}), n.forEach((n) => {
|
|
1390
1414
|
e.setProperty(`--${n}`, String(t[n]));
|
|
1391
|
-
}),
|
|
1392
|
-
},
|
|
1393
|
-
|
|
1394
|
-
},
|
|
1395
|
-
function
|
|
1415
|
+
}), tn.set(e, n);
|
|
1416
|
+
}, rn = (e, t) => {
|
|
1417
|
+
nn(document.documentElement.style, en(e, t));
|
|
1418
|
+
}, an = "theme", on = "palette", sn = 31536e3;
|
|
1419
|
+
function cn(e, t = "system") {
|
|
1396
1420
|
return h(e) ? e : t;
|
|
1397
1421
|
}
|
|
1398
|
-
function
|
|
1422
|
+
function ln(e, t = null) {
|
|
1399
1423
|
return p(e) ? e : t;
|
|
1400
1424
|
}
|
|
1401
|
-
function
|
|
1425
|
+
function un(e, t) {
|
|
1402
1426
|
if (e) for (let n of e.split(";")) {
|
|
1403
1427
|
let e = n.indexOf("=");
|
|
1404
1428
|
if (e === -1 || n.slice(0, e).trim() !== t) continue;
|
|
@@ -1410,21 +1434,21 @@ function on(e, t) {
|
|
|
1410
1434
|
}
|
|
1411
1435
|
}
|
|
1412
1436
|
}
|
|
1413
|
-
function
|
|
1437
|
+
function dn(e, t = {}) {
|
|
1414
1438
|
return {
|
|
1415
|
-
theme:
|
|
1416
|
-
palette:
|
|
1439
|
+
theme: cn(un(e, an), t.theme ?? "system"),
|
|
1440
|
+
palette: ln(un(e, on), t.palette ?? null)
|
|
1417
1441
|
};
|
|
1418
1442
|
}
|
|
1419
|
-
function
|
|
1420
|
-
return `${e}=${encodeURIComponent(t)}; path=/; max-age=${
|
|
1443
|
+
function fn(e, t) {
|
|
1444
|
+
return `${e}=${encodeURIComponent(t)}; path=/; max-age=${sn}; SameSite=Lax`;
|
|
1421
1445
|
}
|
|
1422
|
-
var
|
|
1423
|
-
function
|
|
1424
|
-
let n =
|
|
1425
|
-
return `(function(){try{var d=document.documentElement,c=document.cookie,P=${`[${t.map((e) => `'${e}'`).join(",")}]`};var tm=c.match(${`/(?:^|; )${
|
|
1446
|
+
var pn = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1447
|
+
function mn(e = {}) {
|
|
1448
|
+
let n = cn(e.defaultTheme), r = e.defaultPalette === void 0 ? v(e.design?.preset) : e.defaultPalette, i = p(r) ? r : "", a = e.design ? Object.entries(u(e.design)).map(([e, t]) => `d.setAttribute('${e}','${t}');`).join("") : "";
|
|
1449
|
+
return `(function(){try{var d=document.documentElement,c=document.cookie,P=${`[${t.map((e) => `'${e}'`).join(",")}]`};var tm=c.match(${`/(?:^|; )${pn(an)}=([^;]+)/`});var t=tm?tm[1]:'${n}';if(t!=='light'&&t!=='dark'&&t!=='system')t='${n}';if(t==='system')t=window.matchMedia&&window.matchMedia('(prefers-color-scheme: dark)').matches?'dark':'light';d.dataset.theme=t;d.style.colorScheme=t;var hp=d.dataset.palette;var f=P.indexOf(hp)>-1?hp:'${i}';var pm=c.match(${`/(?:^|; )${pn(on)}=([^;]+)/`});var p=pm?pm[1]:f;if(P.indexOf(p)<0)p=f;if(p)d.dataset.palette=p;else delete d.dataset.palette;${a}}catch(e){}})();`;
|
|
1426
1450
|
}
|
|
1427
|
-
var
|
|
1451
|
+
var hn = /* @__PURE__ */ mn(), gn = [
|
|
1428
1452
|
1116352408,
|
|
1429
1453
|
1899447441,
|
|
1430
1454
|
3049323471,
|
|
@@ -1490,7 +1514,7 @@ var dn = /* @__PURE__ */ un(), fn = [
|
|
|
1490
1514
|
3204031479,
|
|
1491
1515
|
3329325298
|
|
1492
1516
|
];
|
|
1493
|
-
function
|
|
1517
|
+
function _n(e) {
|
|
1494
1518
|
let t = [];
|
|
1495
1519
|
for (let n of e) {
|
|
1496
1520
|
let e = n.codePointAt(0);
|
|
@@ -1498,8 +1522,8 @@ function pn(e) {
|
|
|
1498
1522
|
}
|
|
1499
1523
|
return t;
|
|
1500
1524
|
}
|
|
1501
|
-
function
|
|
1502
|
-
let t =
|
|
1525
|
+
function vn(e) {
|
|
1526
|
+
let t = _n(e), n = t.length * 8;
|
|
1503
1527
|
for (t.push(128); t.length % 64 != 56;) t.push(0);
|
|
1504
1528
|
let r = Math.floor(n / 4294967296);
|
|
1505
1529
|
for (let e of [r, n >>> 0]) t.push(e >>> 24 & 255, e >>> 16 & 255, e >>> 8 & 255, e & 255);
|
|
@@ -1524,7 +1548,7 @@ function mn(e) {
|
|
|
1524
1548
|
}
|
|
1525
1549
|
let [n, r, s, c, l, u, d, f] = i;
|
|
1526
1550
|
for (let e = 0; e < 64; e++) {
|
|
1527
|
-
let t = o(l, 6) ^ o(l, 11) ^ o(l, 25), i = l & u ^ ~l & d, p = f + t + i +
|
|
1551
|
+
let t = o(l, 6) ^ o(l, 11) ^ o(l, 25), i = l & u ^ ~l & d, p = f + t + i + gn[e] + a[e] | 0, m = (o(n, 2) ^ o(n, 13) ^ o(n, 22)) + (n & r ^ n & s ^ r & s) | 0;
|
|
1528
1552
|
f = d, d = u, u = l, l = c + p | 0, c = s, s = r, r = n, n = p + m | 0;
|
|
1529
1553
|
}
|
|
1530
1554
|
i[0] = i[0] + n | 0, i[1] = i[1] + r | 0, i[2] = i[2] + s | 0, i[3] = i[3] + c | 0, i[4] = i[4] + l | 0, i[5] = i[5] + u | 0, i[6] = i[6] + d | 0, i[7] = i[7] + f | 0;
|
|
@@ -1536,22 +1560,22 @@ function mn(e) {
|
|
|
1536
1560
|
e & 255
|
|
1537
1561
|
]);
|
|
1538
1562
|
}
|
|
1539
|
-
var
|
|
1540
|
-
function
|
|
1563
|
+
var $ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
1564
|
+
function yn(e) {
|
|
1541
1565
|
let t = "";
|
|
1542
1566
|
for (let n = 0; n < e.length; n += 3) {
|
|
1543
1567
|
let [r, i = 0, a = 0] = e.slice(n, n + 3), o = r << 16 | i << 8 | a;
|
|
1544
|
-
t +=
|
|
1568
|
+
t += $[o >> 18 & 63] + $[o >> 12 & 63], t += n + 1 < e.length ? $[o >> 6 & 63] : "=", t += n + 2 < e.length ? $[o & 63] : "=";
|
|
1545
1569
|
}
|
|
1546
1570
|
return t;
|
|
1547
1571
|
}
|
|
1548
|
-
function
|
|
1549
|
-
return `'sha256-${
|
|
1572
|
+
function bn(e) {
|
|
1573
|
+
return `'sha256-${yn(vn(e))}'`;
|
|
1550
1574
|
}
|
|
1551
|
-
var
|
|
1575
|
+
var xn = /* @__PURE__ */ bn(hn);
|
|
1552
1576
|
//#endregion
|
|
1553
1577
|
//#region src/theme/design-attributes.ts
|
|
1554
|
-
function
|
|
1578
|
+
function Sn(t, n, { all: r = !1 } = {}) {
|
|
1555
1579
|
let i = n ? u(n, { all: r }) : {};
|
|
1556
1580
|
for (let n of Object.values(e)) {
|
|
1557
1581
|
let e = i[n];
|
|
@@ -1560,14 +1584,14 @@ function yn(t, n, { all: r = !1 } = {}) {
|
|
|
1560
1584
|
}
|
|
1561
1585
|
//#endregion
|
|
1562
1586
|
//#region src/theme/primary-color.ts
|
|
1563
|
-
function
|
|
1587
|
+
function Cn(e, t, n) {
|
|
1564
1588
|
return Object.fromEntries(Object.entries(y(e[t], n)).map(([e, t]) => [e, S(t)]));
|
|
1565
1589
|
}
|
|
1566
|
-
function
|
|
1567
|
-
let r = (t) => Object.entries(
|
|
1590
|
+
function wn(e, { selector: t = ":root", base: n } = {}) {
|
|
1591
|
+
let r = (t) => Object.entries(Cn(e, t, n?.[t])).map(([e, t]) => `--${e}:${String(t)}`).join(";");
|
|
1568
1592
|
return `${t}:not([data-theme=dark]){${r("light")}}${t}[data-theme=dark]{${r("dark")}}`;
|
|
1569
1593
|
}
|
|
1570
1594
|
//#endregion
|
|
1571
|
-
export {
|
|
1595
|
+
export { lt as ARROW_PADDING, Z as DASHBOARD_CARD_ATTRIBUTE, X as DASHBOARD_COLUMN_ATTRIBUTE, we as ESCAPE_CONSUMER_ATTRIBUTE, he as FOCUS_SCOPE_MOUNT_EVENT, ge as FOCUS_SCOPE_UNMOUNT_EVENT, kt as INTERACTIVE_SELECTOR, Bt as KANBAN_CARD_ATTRIBUTE, zt as KANBAN_COLUMN_ATTRIBUTE, Ue as KEEP_VISIBLE_SELECTOR, on as PALETTE_COOKIE_NAME, ot as PORTAL_HOST_ATTRIBUTE, q as SCROLLBAR_GAP_VAR, sn as THEME_COOKIE_MAX_AGE, an as THEME_COOKIE_NAME, hn as THEME_INIT_SCRIPT, xn as THEME_INIT_SCRIPT_HASH, ct as VIEWPORT_PADDING, Sn as applyDesignAttributes, yt as applyPosition, rn as applyThemeStyles, ft as autoPosition, Gt as bindMediaCaptions, T as canUseDOM, it as centerInScroller, Yt as clickedCodeMark, dt as computeAnchoredPosition, k as contains, Rt as createDashboardDrag, Le as createDismissableLayer, Se as createFocusScope, Ht as createKanbanDrag, St as createPointerGrace, st as createPortalHost, Qe as createRovingFocus, mn as createThemeInitScript, bn as cspHash, It as dashboardDataAdapter, V as focusElement, me as focusFirst, gt as fromCamelPlacement, nn as generateCSSVariables, O as getActiveElement, Et as getAdjacentTabbable, Xt as getCodeSelectionRange, tt as getDirection, j as getEventTarget, wt as getExitAnimationDuration, Ce as getFocusScopeCount, R as getFocusables, xt as getGraceArea, Re as getLayerStack, E as getOwnerDocument, oe as getOwnerWindow, at as getPortalContainer, ze as getScrollbarGap, Qt as getSystemTheme, B as getTabbables, vt as getTransformOrigin, Ye as hideOthers, $t as isBilingualTheme, Ot as isEditableTarget, N as isFocusable, D as isHTMLElement, At as isInteractiveEventTarget, bt as isPointInPolygon, He as isScrollLocked, F as isTabbable, Vt as kanbanDataAdapter, Ve as lockScroll, rt as logicalArrowKey, $e as nearestInRow, ln as parsePaletteCookie, pt as parsePlacement, cn as parseThemeCookie, dn as parseThemeCookies, wn as primaryColorCss, Cn as primaryColorTheme, un as readCookieValue, nt as resolveDirection, en as resolveTheme, fn as serializeThemeCookie, Wt as textTrackCueText, _t as toCamelPlacement, mt as toPlacement, Tt as waitForExitAnimation };
|
|
1572
1596
|
|
|
1573
1597
|
//# sourceMappingURL=index.js.map
|