@sheetxl/utils-react 0.8.0-beta.21 → 0.8.0-beta.23
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/browser/esm/{B6U1YOdlMBIiMwIo.mjs → Beey1FcDMZw-Es1N.mjs} +1 -1
- package/browser/esm/{C74v7_u2uwgwlCTV.mjs → BwIznhbqhOkSCXok.mjs} +4 -4
- package/browser/esm/{B8oCr4YRlNEgrVTE.mjs → DIPveSWh74Ni0w6H.mjs} +2 -2
- package/browser/esm/index.mjs +1116 -1161
- package/node/esm/{CZoJwu33P3QdiHsu.mjs → B5pWqSf3jcgyK-cu.mjs} +1 -1
- package/node/esm/{BRFcIf1L6jIUdzP7.mjs → VSEK8OvCIKoam06_.mjs} +1 -1
- package/node/esm/index.mjs +1069 -1113
- package/package.json +2 -2
- package/types/src/float/_FloatTheme.d.ts +2 -3
- package/types/src/hooks/useEditMode.d.ts +2 -2
- package/types/src/scroll/scrollbarTheming.d.ts +2 -23
- package/types/src/theme/ThemeStyle.d.ts +22 -0
- package/types/src/theme/TokenTheme.d.ts +2 -1
- package/types/src/theme/buildThemeCSS.d.ts +9 -0
- package/types/src/theme/defaultTheme.d.ts +6 -0
- package/types/src/theme/index.d.ts +2 -1
- package/types/src/theme/themeAttrs.d.ts +5 -4
- package/types/src/theme/tokenVar.d.ts +20 -0
- package/types/src/theme/useResolvedThemeMode.d.ts +6 -2
- package/types/src/theme/TokenThemeProvider.d.ts +0 -97
package/node/esm/index.mjs
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.8.0-beta.
|
|
2
|
+
* @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.8.0-beta.23
|
|
3
3
|
*
|
|
4
4
|
* (C) 2026-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: MIT
|
|
6
6
|
*/
|
|
7
7
|
import { CommonUtils as e, DefaultLanguagePackService as t, ExpectedError as n, InternalClipboard as o, Notifier as r, TimerUtils as i, fetchLocaleResourceAll as s, formatMessage as l, loadPackageLocales as a, mergeMessageFiles as c, onResourceRootsChange as u, resolveLocaleChain as h } from "@sheetxl/utils";
|
|
8
8
|
import * as d from "react";
|
|
9
|
-
import f, { Component as p, cloneElement as m, createContext as g, createElement as _, forwardRef as v, isValidElement as y, lazy as b, memo as w, useCallback as x, useContext as S, useEffect as M,
|
|
10
|
-
import { Fragment as
|
|
11
|
-
import * as
|
|
12
|
-
import { createRoot as
|
|
13
|
-
import { createPortal as H, unstable_batchedUpdates as
|
|
14
|
-
import { useMergeRefs as
|
|
15
|
-
import
|
|
16
|
-
import { autoUpdate as
|
|
17
|
-
import { DraggableCore as
|
|
18
|
-
import
|
|
19
|
-
var
|
|
9
|
+
import f, { Component as p, cloneElement as m, createContext as g, createElement as _, forwardRef as v, isValidElement as y, lazy as b, memo as w, useCallback as x, useContext as S, useEffect as M, useImperativeHandle as E, useLayoutEffect as C, useMemo as L, useReducer as T, useRef as k, useState as z, useSyncExternalStore as A } from "react";
|
|
10
|
+
import { Fragment as D, jsx as P, jsxs as R } from "react/jsx-runtime";
|
|
11
|
+
import * as $ from "detect-it";
|
|
12
|
+
import { createRoot as B } from "react-dom/client";
|
|
13
|
+
import { createPortal as H, unstable_batchedUpdates as O } from "react-dom";
|
|
14
|
+
import { useMergeRefs as I } from "react-merge-refs";
|
|
15
|
+
import N from "clsx";
|
|
16
|
+
import { autoUpdate as F, flip as W, offset as K, shift as V, size as j, useFloating as Y } from "@floating-ui/react-dom";
|
|
17
|
+
import { DraggableCore as X } from "react-draggable";
|
|
18
|
+
import Z from "prop-types";
|
|
19
|
+
var q = Object.defineProperty, U = (e, t) => {
|
|
20
20
|
let n = {};
|
|
21
|
-
for (var o in e)
|
|
21
|
+
for (var o in e) q(n, o, {
|
|
22
22
|
get: e[o],
|
|
23
23
|
enumerable: !0
|
|
24
24
|
});
|
|
25
|
-
return t ||
|
|
26
|
-
},
|
|
25
|
+
return t || q(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
26
|
+
}, G = {
|
|
27
27
|
Shift: "shift",
|
|
28
28
|
Alt: "alt",
|
|
29
29
|
Ctrl: "ctrl",
|
|
30
30
|
Meta: "meta"
|
|
31
|
-
},
|
|
31
|
+
}, J = {
|
|
32
32
|
BackSpace: 8,
|
|
33
33
|
Tab: 9,
|
|
34
34
|
Clear: 12,
|
|
@@ -73,15 +73,15 @@ var U = Object.defineProperty, G = (e, t) => {
|
|
|
73
73
|
BracketRight: 221,
|
|
74
74
|
BracketLeft: 219,
|
|
75
75
|
Composition: 229
|
|
76
|
-
},
|
|
76
|
+
}, Q = {
|
|
77
77
|
Left: 1,
|
|
78
78
|
Middle: 2,
|
|
79
79
|
Right: 3
|
|
80
|
-
},
|
|
80
|
+
}, ee = {
|
|
81
81
|
Toolbar: "toolbar",
|
|
82
82
|
Menuitem: "menuitem"
|
|
83
|
-
},
|
|
84
|
-
function
|
|
83
|
+
}, te = /* @__PURE__ */ new Set(["disabledReasons", "tags"]);
|
|
84
|
+
function ne(e, t) {
|
|
85
85
|
const n = {}, o = {}, r = t.length;
|
|
86
86
|
for (let i = 0; i < r; i++) {
|
|
87
87
|
const r = t[i];
|
|
@@ -90,7 +90,7 @@ function oe(e, t) {
|
|
|
90
90
|
if ("key" === e) continue;
|
|
91
91
|
const t = r[e];
|
|
92
92
|
if (void 0 !== t) {
|
|
93
|
-
if (
|
|
93
|
+
if (te.has(e) && Array.isArray(t)) {
|
|
94
94
|
const o = n[e];
|
|
95
95
|
n[e] = [...t, ...o ?? []];
|
|
96
96
|
} else n[e] = t;
|
|
@@ -104,7 +104,7 @@ function oe(e, t) {
|
|
|
104
104
|
contributedBy: o
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
-
var
|
|
107
|
+
var oe = class {
|
|
108
108
|
constructor() {
|
|
109
109
|
this._byName = /* @__PURE__ */ new Map(), this._dynamicByName = /* @__PURE__ */ new Map(), this._listeners = /* @__PURE__ */ new Set(), this._batchDepth = 0, this._batchDirty = !1, this._version = 0;
|
|
110
110
|
}
|
|
@@ -176,7 +176,7 @@ var re = class {
|
|
|
176
176
|
const n = this._byName.get(e)?.get(t);
|
|
177
177
|
if (n && 0 !== n.length) return {
|
|
178
178
|
key: t,
|
|
179
|
-
...
|
|
179
|
+
...ne(t, n.map((e) => ({
|
|
180
180
|
key: t,
|
|
181
181
|
...e.def
|
|
182
182
|
}))).props
|
|
@@ -223,12 +223,12 @@ var re = class {
|
|
|
223
223
|
_notify() {
|
|
224
224
|
this._version++, this._batchDepth > 0 ? this._batchDirty = !0 : this._listeners.forEach((e) => e.onChange?.());
|
|
225
225
|
}
|
|
226
|
-
},
|
|
226
|
+
}, re = new oe(), ie = (e) => e && "-" !== e ? "string" == typeof e ? e.toLowerCase() : e.key?.toLowerCase() ?? null : null, se = (e, t) => {
|
|
227
227
|
if (e) {
|
|
228
228
|
for (const n in e) if (n.toLowerCase() === t) return e[n];
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
|
-
var
|
|
231
|
+
var le = new class {
|
|
232
232
|
constructor() {
|
|
233
233
|
this._items = /* @__PURE__ */ new Map(), this._version = 0, this._listeners = /* @__PURE__ */ new Set();
|
|
234
234
|
}
|
|
@@ -249,13 +249,13 @@ var ae = new class {
|
|
|
249
249
|
const r = function(e) {
|
|
250
250
|
const { getLabel: n, getDescription: o, getIcon: r } = e, i = e.key, s = { ...e };
|
|
251
251
|
return s.getLabel = (e) => {
|
|
252
|
-
const o = e && e !== i ? e : void 0, r =
|
|
252
|
+
const o = e && e !== i ? e : void 0, r = re.findByKey(i)?.def, s = (o ? r?.groupLabels?.[o] : void 0) ?? r?.label;
|
|
253
253
|
return "string" == typeof s ? r?.params ? l(s, r.params, t.getActive()) : s : (o ? t.lookup(`cmd.${i}.label@${o}`) : void 0) ?? t.lookup(`cmd.${i}.label`) ?? n?.(e);
|
|
254
254
|
}, s.getDescription = (e) => {
|
|
255
|
-
const n = e && e !== i ? e : void 0, r =
|
|
255
|
+
const n = e && e !== i ? e : void 0, r = re.findByKey(i)?.def, s = (n ? r?.groupDescriptions?.[n] : void 0) ?? r?.description;
|
|
256
256
|
return "string" == typeof s ? r?.params ? l(s, r.params, t.getActive()) : s : (n ? t.lookup(`cmd.${i}.desc@${n}`) : void 0) ?? t.lookup(`cmd.${i}.desc`) ?? o?.(e);
|
|
257
257
|
}, s.getIcon = (e) => {
|
|
258
|
-
const t = e && e !== i ? e : void 0, n =
|
|
258
|
+
const t = e && e !== i ? e : void 0, n = re.findByKey(i)?.def, o = (t ? n?.groupIcons?.[t] : void 0) ?? n?.icon;
|
|
259
259
|
return "string" == typeof o ? o : r ? r(e) : void 0;
|
|
260
260
|
}, s;
|
|
261
261
|
}(e);
|
|
@@ -275,7 +275,7 @@ var ae = new class {
|
|
|
275
275
|
if (!n || !Array.isArray(n.members)) return null;
|
|
276
276
|
const o = n.members, r = /* @__PURE__ */ new Set();
|
|
277
277
|
for (const e of o) {
|
|
278
|
-
const t =
|
|
278
|
+
const t = ie(e);
|
|
279
279
|
t && r.add(t);
|
|
280
280
|
}
|
|
281
281
|
const i = [];
|
|
@@ -284,7 +284,7 @@ var ae = new class {
|
|
|
284
284
|
const n = e.key;
|
|
285
285
|
if (!n || n.toLowerCase() === t) continue;
|
|
286
286
|
if (r.has(n.toLowerCase())) continue;
|
|
287
|
-
const o =
|
|
287
|
+
const o = se(e.contributions, t);
|
|
288
288
|
o && i.push({
|
|
289
289
|
key: n,
|
|
290
290
|
placement: o,
|
|
@@ -302,7 +302,7 @@ var ae = new class {
|
|
|
302
302
|
const t = e.placement.order ?? 0;
|
|
303
303
|
let n;
|
|
304
304
|
if (e.placement.anchor) {
|
|
305
|
-
const r = e.placement.anchor.toLowerCase(), i = o.findIndex((e) =>
|
|
305
|
+
const r = e.placement.anchor.toLowerCase(), i = o.findIndex((e) => ie(e) === r);
|
|
306
306
|
n = i >= 0 ? i : t < 0 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;
|
|
307
307
|
} else n = t < 0 ? Number.NEGATIVE_INFINITY : Number.POSITIVE_INFINITY;
|
|
308
308
|
l.push({
|
|
@@ -318,34 +318,34 @@ var ae = new class {
|
|
|
318
318
|
for (const e of l) "before" !== e.divider && "both" !== e.divider || a.push("-"), a.push(e.member), "after" !== e.divider && "both" !== e.divider || a.push("-");
|
|
319
319
|
return a;
|
|
320
320
|
}
|
|
321
|
-
}(),
|
|
322
|
-
function
|
|
323
|
-
return
|
|
324
|
-
const n = t.addChangeListener(e), o =
|
|
321
|
+
}(), ae = g(null);
|
|
322
|
+
function ce() {
|
|
323
|
+
return A((e) => {
|
|
324
|
+
const n = t.addChangeListener(e), o = re.addListener({ onChange: e }), r = le.addListener({ onChange: e });
|
|
325
325
|
return () => {
|
|
326
326
|
n(), o(), r();
|
|
327
327
|
};
|
|
328
|
-
}, () => `${t.getActive()}:${
|
|
328
|
+
}, () => `${t.getActive()}:${re.getVersion()}:${le.getVersion()}`, () => `${t.getActive()}:${re.getVersion()}:${le.getVersion()}`), S(ae) ?? le;
|
|
329
329
|
}
|
|
330
|
-
function
|
|
331
|
-
return
|
|
330
|
+
function ue({ registry: e = le, children: t }) {
|
|
331
|
+
return P(ae.Provider, {
|
|
332
332
|
value: e,
|
|
333
333
|
children: t
|
|
334
334
|
});
|
|
335
335
|
}
|
|
336
|
-
function
|
|
337
|
-
return
|
|
336
|
+
function he(e) {
|
|
337
|
+
return ce().get(e);
|
|
338
338
|
}
|
|
339
|
-
var
|
|
340
|
-
const { entryKey: t, groupKey: n, fallback: o } = e, r =
|
|
341
|
-
return
|
|
339
|
+
var de = w((e) => {
|
|
340
|
+
const { entryKey: t, groupKey: n, fallback: o } = e, r = he(t);
|
|
341
|
+
return P(D, { children: r?.getLabel?.(n) ?? o ?? t });
|
|
342
342
|
});
|
|
343
|
-
|
|
344
|
-
var
|
|
345
|
-
function
|
|
343
|
+
de.displayName = "CommandButtonEntryLabel";
|
|
344
|
+
var fe = "quickAction";
|
|
345
|
+
function pe(e, t) {
|
|
346
346
|
return "function" == typeof e ? e("function" == typeof t ? t() : t) : e;
|
|
347
347
|
}
|
|
348
|
-
function
|
|
348
|
+
function me(e, n) {
|
|
349
349
|
const { key: o, props: r, contributedBy: i } = e, s = r.callback, a = () => r.disabledReasons ?? [], c = () => a().length > 0 || !s, u = {
|
|
350
350
|
contributedBy: i,
|
|
351
351
|
getKey: () => o,
|
|
@@ -353,16 +353,16 @@ function ge(e, n) {
|
|
|
353
353
|
getTarget: () => "function" == typeof r.target ? r.target() : r.target,
|
|
354
354
|
getState: () => r.state,
|
|
355
355
|
getLabel: (e) => {
|
|
356
|
-
const n =
|
|
356
|
+
const n = pe((void 0 !== e ? r.groupLabels?.[e] : void 0) ?? r.label, r.context);
|
|
357
357
|
return r.params && void 0 !== n ? l(n, r.params, t.getActive()) : n;
|
|
358
358
|
},
|
|
359
359
|
getDescription: (e) => {
|
|
360
|
-
const n =
|
|
360
|
+
const n = pe((void 0 !== e ? r.groupDescriptions?.[e] : void 0) ?? r.description, r.context);
|
|
361
361
|
return r.params && void 0 !== n ? l(n, r.params, t.getActive()) : n;
|
|
362
362
|
},
|
|
363
|
-
getTags: () =>
|
|
364
|
-
getIcon: (e) =>
|
|
365
|
-
getShortcut: () =>
|
|
363
|
+
getTags: () => pe(r.tags, r.context),
|
|
364
|
+
getIcon: (e) => pe((void 0 !== e ? r.groupIcons?.[e] : void 0) ?? r.icon, r.context),
|
|
365
|
+
getShortcut: () => pe(r.shortcut, r.context),
|
|
366
366
|
disabledReasons: a,
|
|
367
367
|
disabled: c,
|
|
368
368
|
execute: async (e) => {
|
|
@@ -383,39 +383,39 @@ function ge(e, n) {
|
|
|
383
383
|
};
|
|
384
384
|
return u;
|
|
385
385
|
}
|
|
386
|
-
var
|
|
386
|
+
var ge = [
|
|
387
387
|
"ctrl",
|
|
388
388
|
"shift",
|
|
389
389
|
"alt",
|
|
390
390
|
"meta"
|
|
391
|
-
],
|
|
392
|
-
function
|
|
391
|
+
], _e = new Set(ge);
|
|
392
|
+
function ve(e) {
|
|
393
393
|
const t = e.split("+"), n = t[t.length - 1], o = [];
|
|
394
394
|
for (let e = 0; e < t.length - 1; e++) {
|
|
395
395
|
const n = t[e].toLowerCase();
|
|
396
|
-
|
|
396
|
+
_e.has(n) && o.push(n);
|
|
397
397
|
}
|
|
398
398
|
return o.length ? {
|
|
399
399
|
key: n,
|
|
400
400
|
modifiers: o
|
|
401
401
|
} : { key: n };
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
return [...(e.modifiers ?? []).slice().sort((e, t) =>
|
|
403
|
+
function ye(e) {
|
|
404
|
+
return [...(e.modifiers ?? []).slice().sort((e, t) => ge.indexOf(e) - ge.indexOf(t)), e.key].join("+");
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function be(e) {
|
|
407
407
|
return e;
|
|
408
408
|
}
|
|
409
|
-
async function
|
|
409
|
+
async function we(e) {
|
|
410
410
|
const t = await fetch(e);
|
|
411
411
|
if (!t.ok) throw new Error(`Failed to fetch command catalog '${String(e)}': ${t.status} ${t.statusText}`);
|
|
412
412
|
return await t.json();
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function xe(e) {
|
|
415
415
|
const t = {};
|
|
416
|
-
return void 0 !== e.label && (t.label = e.label), void 0 !== e.description && (t.description = e.description), void 0 !== e.groupLabels && (t.groupLabels = e.groupLabels), void 0 !== e.groupDescriptions && (t.groupDescriptions = e.groupDescriptions), void 0 !== e.icon && (t.icon = e.icon), void 0 !== e.groupIcons && (t.groupIcons = e.groupIcons), void 0 !== e.shortcut && null !== e.shortcut && (t.shortcut = Array.isArray(e.shortcut) ? e.shortcut.map(
|
|
416
|
+
return void 0 !== e.label && (t.label = e.label), void 0 !== e.description && (t.description = e.description), void 0 !== e.groupLabels && (t.groupLabels = e.groupLabels), void 0 !== e.groupDescriptions && (t.groupDescriptions = e.groupDescriptions), void 0 !== e.icon && (t.icon = e.icon), void 0 !== e.groupIcons && (t.groupIcons = e.groupIcons), void 0 !== e.shortcut && null !== e.shortcut && (t.shortcut = Array.isArray(e.shortcut) ? e.shortcut.map(ve) : ve(e.shortcut)), void 0 !== e.tags && (t.tags = e.tags), void 0 !== e.params && (t.params = e.params), t;
|
|
417
417
|
}
|
|
418
|
-
function
|
|
418
|
+
function Se(e, t) {
|
|
419
419
|
return t ? e ? {
|
|
420
420
|
...e,
|
|
421
421
|
...t,
|
|
@@ -433,7 +433,7 @@ function Me(e, t) {
|
|
|
433
433
|
} : void 0
|
|
434
434
|
} : t : e ?? {};
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function Me(e = re) {
|
|
437
437
|
const n = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set();
|
|
438
438
|
let d = t.getActive();
|
|
439
439
|
function f(e) {
|
|
@@ -476,7 +476,7 @@ function Ee(e = ie) {
|
|
|
476
476
|
let o = t.contributors.get(n);
|
|
477
477
|
o || (o = (e) => {
|
|
478
478
|
const o = g(t);
|
|
479
|
-
if (o) for (const [r, i] of Object.entries(o.commands)) (n === t.scope || i.borrow?.includes(n)) && e.updateCommand(r,
|
|
479
|
+
if (o) for (const [r, i] of Object.entries(o.commands)) (n === t.scope || i.borrow?.includes(n)) && e.updateCommand(r, xe(i));
|
|
480
480
|
}, t.contributors.set(n, o)), e.registerStatic(n, o);
|
|
481
481
|
}
|
|
482
482
|
});
|
|
@@ -520,7 +520,7 @@ function Ee(e = ie) {
|
|
|
520
520
|
for (const o of i) {
|
|
521
521
|
const i = h(o, r), l = /* @__PURE__ */ new Map();
|
|
522
522
|
for (const e of [...i].reverse()) for (const t of r[e]?.catalogs ?? []) l.set(`${t.scope}\0${t.sourceId}`, t);
|
|
523
|
-
for (const t of l.values()) y(t.scope, o, async () => f((await Promise.all([...i].reverse().map((o) => s(e, `${o}/${t.file}`, n)))).flat().map(
|
|
523
|
+
for (const t of l.values()) y(t.scope, o, async () => f((await Promise.all([...i].reverse().map((o) => s(e, `${o}/${t.file}`, n)))).flat().map(be).reverse()), { sourceId: t.sourceId });
|
|
524
524
|
r[o].messages?.length && t.registerMessages(e, o, async () => {
|
|
525
525
|
const t = await Promise.all([...i].reverse().map((t) => c(e, t, r[t]?.messages ?? [], n)));
|
|
526
526
|
return Object.assign({}, ...t);
|
|
@@ -561,11 +561,11 @@ function Ee(e = ie) {
|
|
|
561
561
|
dispose: () => S()
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
var
|
|
565
|
-
function
|
|
566
|
-
return S(
|
|
564
|
+
var Ee = Me(), Ce = g(null);
|
|
565
|
+
function Le() {
|
|
566
|
+
return S(Ce);
|
|
567
567
|
}
|
|
568
|
-
var
|
|
568
|
+
var Te = class e {
|
|
569
569
|
constructor(e, t = null, n) {
|
|
570
570
|
this._children = /* @__PURE__ */ new Map(), this._defs = /* @__PURE__ */ new Map(), this._layers = /* @__PURE__ */ new Map(), this._layerSeq = 0, this._middleware = [], this._version = 0, this._resolveCache = /* @__PURE__ */ new WeakMap(), this._resolveCacheVersion = -1, this._listeners = /* @__PURE__ */ new Set(), this._notifyPending = !1, this._notifyDirty = !1, this._executeListeners = /* @__PURE__ */ new Map(), this._resolveStaticCache = /* @__PURE__ */ new Map(), this._resolveStaticCacheVersion = -1, this._elements = [], this.key = e, this.name = n?.name ?? e, this._parent = t, this._root = t ? t._root : this, n?.registry && (this._registry = n.registry, this._registryUnsub = n.registry.addListener({ onChange: () => this._bump() }));
|
|
571
571
|
}
|
|
@@ -623,7 +623,7 @@ var ke = class e {
|
|
|
623
623
|
let n = e;
|
|
624
624
|
for (; n;) {
|
|
625
625
|
const e = t.get(n);
|
|
626
|
-
if (e) return
|
|
626
|
+
if (e) return ke(e) ?? void 0;
|
|
627
627
|
n = n.parentElement;
|
|
628
628
|
}
|
|
629
629
|
}
|
|
@@ -780,7 +780,7 @@ var ke = class e {
|
|
|
780
780
|
}
|
|
781
781
|
let _;
|
|
782
782
|
if (m.length > 0) {
|
|
783
|
-
const t =
|
|
783
|
+
const t = ne(e, m), n = t.contributedBy.callback;
|
|
784
784
|
if (t.props.callback && void 0 !== n) {
|
|
785
785
|
const e = g[n]?.getMiddleware();
|
|
786
786
|
if (e && e.length > 0) {
|
|
@@ -789,7 +789,7 @@ var ke = class e {
|
|
|
789
789
|
t.props.callback = n;
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
|
-
_ =
|
|
792
|
+
_ = me(t, () => i._executeListeners.get(e));
|
|
793
793
|
}
|
|
794
794
|
return l || f || c.set(e, _), _;
|
|
795
795
|
}
|
|
@@ -801,14 +801,14 @@ var ke = class e {
|
|
|
801
801
|
if (n._resolveStaticCache.has(r)) return n._resolveStaticCache.get(r);
|
|
802
802
|
const i = o.findByKey(e, t);
|
|
803
803
|
let s;
|
|
804
|
-
if (i) s =
|
|
804
|
+
if (i) s = me(ne(e, [i.def]), () => n._executeListeners.get(e));
|
|
805
805
|
return n._resolveStaticCache.set(r, s), s;
|
|
806
806
|
}
|
|
807
807
|
};
|
|
808
|
-
function
|
|
809
|
-
return e ? e instanceof
|
|
808
|
+
function ke(e) {
|
|
809
|
+
return e ? e instanceof Te ? e : "function" == typeof e ? e() : e.getAnchor() : null;
|
|
810
810
|
}
|
|
811
|
-
var
|
|
811
|
+
var ze = class {
|
|
812
812
|
constructor(e = null) {
|
|
813
813
|
this._listeners = /* @__PURE__ */ new Set(), this._current = e;
|
|
814
814
|
}
|
|
@@ -823,7 +823,7 @@ var Ae = class {
|
|
|
823
823
|
this._listeners.delete(e);
|
|
824
824
|
};
|
|
825
825
|
}
|
|
826
|
-
},
|
|
826
|
+
}, Ae = class {
|
|
827
827
|
constructor(e) {
|
|
828
828
|
this._scope = e;
|
|
829
829
|
}
|
|
@@ -833,7 +833,7 @@ var Ae = class {
|
|
|
833
833
|
subscribe() {
|
|
834
834
|
return () => {};
|
|
835
835
|
}
|
|
836
|
-
},
|
|
836
|
+
}, De = class {
|
|
837
837
|
constructor(e, t) {
|
|
838
838
|
this._scopes = /* @__PURE__ */ new Map(), this._rootElement = null, this._lastFocusEvent = null, this._current = null, this._currentElement = null, this._recall = null, this._recallPending = !1, this._listeners = /* @__PURE__ */ new Set(), this._root = e ?? null, "function" == typeof t ? (this._recall = t, this._invokeRecall()) : null != t && (t instanceof Promise ? t.then((e) => {
|
|
839
839
|
null != e && this._seed(e);
|
|
@@ -857,7 +857,7 @@ var Ae = class {
|
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
859
|
getAnchor() {
|
|
860
|
-
return this._currentElement && !this._currentElement.isConnected && (this._current = null, this._currentElement = null, this._recall && !this._recallPending && (this._recallPending = !0, Promise.resolve().then(() => this._invokeRecall()))),
|
|
860
|
+
return this._currentElement && !this._currentElement.isConnected && (this._current = null, this._currentElement = null, this._recall && !this._recallPending && (this._recallPending = !0, Promise.resolve().then(() => this._invokeRecall()))), ke(this._current);
|
|
861
861
|
}
|
|
862
862
|
getElement() {
|
|
863
863
|
return this._rootElement;
|
|
@@ -893,7 +893,7 @@ var Ae = class {
|
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
895
|
findScope(e) {
|
|
896
|
-
return
|
|
896
|
+
return ke(this.findSource(e) ?? null) ?? void 0;
|
|
897
897
|
}
|
|
898
898
|
attach(e) {
|
|
899
899
|
this._rootElement = e;
|
|
@@ -911,7 +911,7 @@ var Ae = class {
|
|
|
911
911
|
_notify() {
|
|
912
912
|
this._listeners.forEach((e) => e());
|
|
913
913
|
}
|
|
914
|
-
},
|
|
914
|
+
}, Pe = class {
|
|
915
915
|
constructor(e) {
|
|
916
916
|
this._layers = [], this._listeners = /* @__PURE__ */ new Set(), this._base = e, this._top = e;
|
|
917
917
|
}
|
|
@@ -942,25 +942,25 @@ var Ae = class {
|
|
|
942
942
|
this._listeners.delete(e);
|
|
943
943
|
};
|
|
944
944
|
}
|
|
945
|
-
},
|
|
946
|
-
EmptyCssProperties: () =>
|
|
947
|
-
createSyntheticEvent: () =>
|
|
948
|
-
detectIt: () =>
|
|
949
|
-
edgeCenter: () =>
|
|
950
|
-
edgeTrailingShift: () =>
|
|
951
|
-
focusableNodeNames: () =>
|
|
952
|
-
getDevicePixelRatio: () =>
|
|
953
|
-
isEditable: () =>
|
|
954
|
-
replaceRangeText: () =>
|
|
955
|
-
snapDeviceEdge: () =>
|
|
956
|
-
snapDeviceWidth: () =>
|
|
957
|
-
snapLineCenter: () =>
|
|
958
|
-
toPrettyKeyCode: () =>
|
|
959
|
-
}),
|
|
945
|
+
}, Re = U({
|
|
946
|
+
EmptyCssProperties: () => Be,
|
|
947
|
+
createSyntheticEvent: () => Ze,
|
|
948
|
+
detectIt: () => Ne,
|
|
949
|
+
edgeCenter: () => Ye,
|
|
950
|
+
edgeTrailingShift: () => je,
|
|
951
|
+
focusableNodeNames: () => $e,
|
|
952
|
+
getDevicePixelRatio: () => Fe,
|
|
953
|
+
isEditable: () => Oe,
|
|
954
|
+
replaceRangeText: () => Ie,
|
|
955
|
+
snapDeviceEdge: () => Ke,
|
|
956
|
+
snapDeviceWidth: () => We,
|
|
957
|
+
snapLineCenter: () => Ve,
|
|
958
|
+
toPrettyKeyCode: () => Xe
|
|
959
|
+
}), $e = /* @__PURE__ */ new Set([
|
|
960
960
|
"INPUT",
|
|
961
961
|
"TEXTAREA",
|
|
962
962
|
"SELECT"
|
|
963
|
-
]),
|
|
963
|
+
]), Be = {}, He = /* @__PURE__ */ new Set([
|
|
964
964
|
"button",
|
|
965
965
|
"checkbox",
|
|
966
966
|
"radio",
|
|
@@ -972,41 +972,41 @@ var Ae = class {
|
|
|
972
972
|
"image",
|
|
973
973
|
"hidden"
|
|
974
974
|
]);
|
|
975
|
-
function
|
|
975
|
+
function Oe(e) {
|
|
976
976
|
if (!e) return !1;
|
|
977
977
|
const t = e.tagName;
|
|
978
978
|
return "TEXTAREA" === t || ("INPUT" === t ? !He.has(e.type) : !0 === e.isContentEditable);
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function Ie(e, t, n, o) {
|
|
981
981
|
e.setSelectionRange(t, n);
|
|
982
982
|
try {
|
|
983
983
|
if ("undefined" != typeof document && document.activeElement === e && "function" == typeof document.execCommand && document.execCommand("insertText", !1, o)) return !0;
|
|
984
984
|
} catch {}
|
|
985
985
|
return e.setRangeText(o, t, n, "end"), e.dispatchEvent(new Event("input", { bubbles: !0 })), !0;
|
|
986
986
|
}
|
|
987
|
-
function
|
|
988
|
-
return
|
|
987
|
+
function Ne() {
|
|
988
|
+
return $;
|
|
989
989
|
}
|
|
990
|
-
function
|
|
990
|
+
function Fe() {
|
|
991
991
|
return "undefined" != typeof window && window.devicePixelRatio || 1;
|
|
992
992
|
}
|
|
993
|
-
function
|
|
993
|
+
function We(e, t = Fe()) {
|
|
994
994
|
return Math.max(1, Math.round(e * t)) / t;
|
|
995
995
|
}
|
|
996
|
-
function
|
|
996
|
+
function Ke(e, t = Fe()) {
|
|
997
997
|
return Math.round(e * t) / t;
|
|
998
998
|
}
|
|
999
|
-
function
|
|
999
|
+
function Ve(e, t = 1, n = Fe()) {
|
|
1000
1000
|
const o = Math.max(1, Math.round(t * n)) % 2 * .5;
|
|
1001
1001
|
return (Math.round(e * n - o) + o) / n;
|
|
1002
1002
|
}
|
|
1003
|
-
function
|
|
1003
|
+
function je(e, t, n = Fe()) {
|
|
1004
1004
|
return Math.round(t) % 2 == 0 && "trailing" === e ? 1 / n : 0;
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1007
|
-
return
|
|
1006
|
+
function Ye(e, t, n, o = Fe()) {
|
|
1007
|
+
return Ve(e + je(t, n, o), n / o, o);
|
|
1008
1008
|
}
|
|
1009
|
-
var
|
|
1009
|
+
var Xe = (t) => "BracketLeft" === t ? "[" : "BracketRight" === t ? "]" : e.camelToPrettyCase(t), Ze = (e, t) => {
|
|
1010
1010
|
let n = !1, o = !1;
|
|
1011
1011
|
const r = {
|
|
1012
1012
|
nativeEvent: e,
|
|
@@ -1032,7 +1032,7 @@ var Ze = (t) => "BracketLeft" === t ? "[" : "BracketRight" === t ? "]" : e.camel
|
|
|
1032
1032
|
for (const t in e) t in r || "function" == typeof e[t] || (r[t] = e[t]);
|
|
1033
1033
|
return r;
|
|
1034
1034
|
};
|
|
1035
|
-
function
|
|
1035
|
+
function qe(e, t, n) {
|
|
1036
1036
|
if (!globalThis.__sxlKeyDebug) return;
|
|
1037
1037
|
const o = e.target, r = [
|
|
1038
1038
|
e.ctrlKey && "ctrl",
|
|
@@ -1046,11 +1046,11 @@ function Ue(e, t, n) {
|
|
|
1046
1046
|
const t = e.type ? `[type=${e.type}]` : "", n = e.getAttribute?.("class")?.split(" ").slice(0, 2).join(".") ?? "";
|
|
1047
1047
|
return `${e.tagName.toLowerCase()}${t}${n ? "." + n : ""}`;
|
|
1048
1048
|
})(o),
|
|
1049
|
-
editable:
|
|
1049
|
+
editable: Oe(o),
|
|
1050
1050
|
delivery: e.nativeEvent ? "synthetic" : "native"
|
|
1051
1051
|
});
|
|
1052
1052
|
}
|
|
1053
|
-
var
|
|
1053
|
+
var Ue = /* @__PURE__ */ new Set([
|
|
1054
1054
|
"Backspace",
|
|
1055
1055
|
"Delete",
|
|
1056
1056
|
"Insert",
|
|
@@ -1063,10 +1063,10 @@ var Ge = /* @__PURE__ */ new Set([
|
|
|
1063
1063
|
"ArrowUp",
|
|
1064
1064
|
"ArrowDown"
|
|
1065
1065
|
]);
|
|
1066
|
-
function
|
|
1067
|
-
return
|
|
1066
|
+
function Ge(e) {
|
|
1067
|
+
return Ue.has(e.key);
|
|
1068
1068
|
}
|
|
1069
|
-
var
|
|
1069
|
+
var Je = class {
|
|
1070
1070
|
constructor(e) {
|
|
1071
1071
|
this._lastEvent = null, this._resolver = e;
|
|
1072
1072
|
}
|
|
@@ -1084,12 +1084,12 @@ var Qe = class {
|
|
|
1084
1084
|
return t && "number" == typeof t.nodeType ? t : null;
|
|
1085
1085
|
}
|
|
1086
1086
|
dispatch(e) {
|
|
1087
|
-
if (this._lastEvent === e) return
|
|
1087
|
+
if (this._lastEvent === e) return qe(e, null, "de-duped (reached dispatch again)"), !1;
|
|
1088
1088
|
this._lastEvent = e;
|
|
1089
1089
|
const t = this.findKey(e);
|
|
1090
|
-
if (!t) return
|
|
1090
|
+
if (!t) return qe(e, null, "unmatched"), !1;
|
|
1091
1091
|
const n = this._resolver.resolve(t, this._eventOrigin(e));
|
|
1092
|
-
return n ? n.disabled() ? (
|
|
1092
|
+
return n ? n.disabled() ? (qe(e, t, "disabled"), !1) : (qe(e, t, "EXECUTED"), e.preventDefault(), e.stopPropagation(), n.execute(), !0) : (qe(e, t, "unresolved at this origin"), !1);
|
|
1093
1093
|
}
|
|
1094
1094
|
attach(e) {
|
|
1095
1095
|
const t = (e) => {
|
|
@@ -1108,29 +1108,29 @@ var Qe = class {
|
|
|
1108
1108
|
return e;
|
|
1109
1109
|
}
|
|
1110
1110
|
_eventCandidates(e) {
|
|
1111
|
-
return
|
|
1111
|
+
return et(e);
|
|
1112
1112
|
}
|
|
1113
1113
|
_shortcutString(e) {
|
|
1114
|
-
return
|
|
1114
|
+
return Qe(e);
|
|
1115
1115
|
}
|
|
1116
1116
|
};
|
|
1117
|
-
function
|
|
1117
|
+
function Qe(e) {
|
|
1118
1118
|
const t = e.modifiers ?? [];
|
|
1119
|
-
return
|
|
1119
|
+
return tt(t.includes(G.Ctrl) || t.includes(G.Meta), t.includes(G.Alt), t.includes(G.Shift)) + nt(e.key);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1122
|
-
const t =
|
|
1123
|
-
return /* @__PURE__ */ new Set([t +
|
|
1121
|
+
function et(e) {
|
|
1122
|
+
const t = tt(e.ctrlKey || e.metaKey, e.altKey, e.shiftKey);
|
|
1123
|
+
return /* @__PURE__ */ new Set([t + nt(e.code), t + nt(e.key)]);
|
|
1124
1124
|
}
|
|
1125
|
-
function
|
|
1125
|
+
function tt(e, t, n) {
|
|
1126
1126
|
return (e ? "mod+" : "") + (t ? "alt+" : "") + (n ? "shift+" : "");
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function nt(e) {
|
|
1129
1129
|
return e ? e.length > 3 && e.startsWith("Key") ? e.slice(3).toUpperCase() : e.length > 5 && e.startsWith("Digit") ? e.slice(5) : 1 === e.length ? e.toUpperCase() : e : "";
|
|
1130
1130
|
}
|
|
1131
|
-
var
|
|
1131
|
+
var ot = class {
|
|
1132
1132
|
constructor(e, t, n) {
|
|
1133
|
-
this._version = 0, this._listeners = /* @__PURE__ */ new Set(), this._dirty = !1, this._hadAnchor = !1, this._unsubs = [], this._connected = !1, this._injectors = /* @__PURE__ */ new Set(), this._keyBindsEl = null, this.scope = e, this._tracker = t, this._root = n?.root, this._debounceMs = n?.debounce ?? 0, this._autoKeyBindings = n?.keyBindings ?? !0, this._keyBindings = new
|
|
1133
|
+
this._version = 0, this._listeners = /* @__PURE__ */ new Set(), this._dirty = !1, this._hadAnchor = !1, this._unsubs = [], this._connected = !1, this._injectors = /* @__PURE__ */ new Set(), this._keyBindsEl = null, this.scope = e, this._tracker = t, this._root = n?.root, this._debounceMs = n?.debounce ?? 0, this._autoKeyBindings = n?.keyBindings ?? !0, this._keyBindings = new Je(this);
|
|
1134
1134
|
}
|
|
1135
1135
|
connect() {
|
|
1136
1136
|
this._connected || (this._connected = !0, this._unsubs = [this.scope.addListener({ onChange: () => this._emit() }), this._tracker.subscribe(() => {
|
|
@@ -1201,19 +1201,19 @@ var rt = class {
|
|
|
1201
1201
|
_notify() {
|
|
1202
1202
|
this._version++, this._listeners.forEach((e) => e());
|
|
1203
1203
|
}
|
|
1204
|
-
},
|
|
1205
|
-
function
|
|
1206
|
-
return S(
|
|
1204
|
+
}, rt = g(null);
|
|
1205
|
+
function it() {
|
|
1206
|
+
return S(rt);
|
|
1207
1207
|
}
|
|
1208
|
-
var
|
|
1209
|
-
function
|
|
1210
|
-
return S(
|
|
1208
|
+
var st = g(0);
|
|
1209
|
+
function lt() {
|
|
1210
|
+
return S(st);
|
|
1211
1211
|
}
|
|
1212
|
-
var
|
|
1213
|
-
function
|
|
1214
|
-
return S(
|
|
1212
|
+
var at = g(null);
|
|
1213
|
+
function ct() {
|
|
1214
|
+
return S(at);
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function ut(e, t) {
|
|
1217
1217
|
let n, o = !1;
|
|
1218
1218
|
const r = () => {
|
|
1219
1219
|
if (o) return;
|
|
@@ -1224,8 +1224,8 @@ function ht(e, t) {
|
|
|
1224
1224
|
o = !0, n?.();
|
|
1225
1225
|
};
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1228
|
-
const a =
|
|
1227
|
+
function ht({ spec: e, scope: t, use: n, order: o, elementRef: r, region: i, scopeRef: s, children: l }) {
|
|
1228
|
+
const a = ct(), c = it(), u = lt(), h = o ?? u, d = e ? "string" == typeof e.scopeName ? e.scopeName : e.scopeName.key : null, f = L(() => e && a ? a.createChild(e.scopeName) : null, [a, d]), p = f ?? t ?? null;
|
|
1229
1229
|
M(() => {
|
|
1230
1230
|
if (!f) return;
|
|
1231
1231
|
const e = c ? c.register(f, h) : void 0;
|
|
@@ -1259,38 +1259,38 @@ function dt({ spec: e, scope: t, use: n, order: o, elementRef: r, region: i, sco
|
|
|
1259
1259
|
s.current = null;
|
|
1260
1260
|
};
|
|
1261
1261
|
}, [s, p]);
|
|
1262
|
-
const _ =
|
|
1263
|
-
|
|
1264
|
-
const y =
|
|
1265
|
-
return
|
|
1262
|
+
const _ = k(null), v = r ?? _;
|
|
1263
|
+
dt(r || "function" == typeof l ? p : null, v, i);
|
|
1264
|
+
const y = L(() => f ? f.getRegistry()?.getDynamic(f.name) ?? [] : [], [f]);
|
|
1265
|
+
return P(at.Provider, {
|
|
1266
1266
|
value: p,
|
|
1267
|
-
children:
|
|
1267
|
+
children: R(rt.Provider, {
|
|
1268
1268
|
value: f ? null : c,
|
|
1269
|
-
children: [f && y.map((e, t) =>
|
|
1269
|
+
children: [f && y.map((e, t) => P(e, {
|
|
1270
1270
|
scope: f,
|
|
1271
1271
|
data: g
|
|
1272
1272
|
}, t)), "function" == typeof l ? l(v) : l]
|
|
1273
1273
|
})
|
|
1274
1274
|
});
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1276
|
+
function dt(e, t, n) {
|
|
1277
1277
|
M(() => {
|
|
1278
1278
|
if (!e) return;
|
|
1279
|
-
if (!n) return
|
|
1279
|
+
if (!n) return ut(t, (t) => e.attachBounds(t));
|
|
1280
1280
|
const o = !0 === n ? void 0 : n;
|
|
1281
|
-
return
|
|
1281
|
+
return ut(t, (t) => e.attachElement(t, o));
|
|
1282
1282
|
}, [
|
|
1283
1283
|
e,
|
|
1284
1284
|
t,
|
|
1285
1285
|
n
|
|
1286
1286
|
]);
|
|
1287
1287
|
}
|
|
1288
|
-
var
|
|
1289
|
-
function
|
|
1290
|
-
return S(
|
|
1288
|
+
var ft = g(null);
|
|
1289
|
+
function pt() {
|
|
1290
|
+
return S(ft);
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1293
|
-
const s =
|
|
1292
|
+
function mt({ tracker: e, debounce: t, keyBindings: n, root: o, elementRef: r, children: i }) {
|
|
1293
|
+
const s = ct(), l = "synthetic" === n, a = L(() => s ? new ot(s, e, {
|
|
1294
1294
|
debounce: t,
|
|
1295
1295
|
keyBindings: !l && n,
|
|
1296
1296
|
root: o
|
|
@@ -1302,12 +1302,12 @@ function gt({ tracker: e, debounce: t, keyBindings: n, root: o, elementRef: r, c
|
|
|
1302
1302
|
o
|
|
1303
1303
|
]);
|
|
1304
1304
|
M(() => (a?.connect(), () => a?.dispose()), [a]);
|
|
1305
|
-
const c =
|
|
1305
|
+
const c = k(null), u = r ?? (l ? c : null);
|
|
1306
1306
|
return M(() => {
|
|
1307
|
-
if (u && e.attach) return
|
|
1308
|
-
}, [u, e]),
|
|
1307
|
+
if (u && e.attach) return ut(u, (t) => e.attach(t));
|
|
1308
|
+
}, [u, e]), P(ft.Provider, l ? {
|
|
1309
1309
|
value: a,
|
|
1310
|
-
children:
|
|
1310
|
+
children: P("div", {
|
|
1311
1311
|
className: "sxl-command-key-seam",
|
|
1312
1312
|
style: { display: "contents" },
|
|
1313
1313
|
ref: c,
|
|
@@ -1321,35 +1321,35 @@ function gt({ tracker: e, debounce: t, keyBindings: n, root: o, elementRef: r, c
|
|
|
1321
1321
|
children: i
|
|
1322
1322
|
});
|
|
1323
1323
|
}
|
|
1324
|
-
function
|
|
1325
|
-
const e =
|
|
1324
|
+
function gt() {
|
|
1325
|
+
const e = pt();
|
|
1326
1326
|
return x((t, n) => e ? e.execute(t, n) : Promise.resolve(!1), [e]);
|
|
1327
1327
|
}
|
|
1328
|
-
var
|
|
1329
|
-
function
|
|
1330
|
-
return S(
|
|
1328
|
+
var _t = g(null);
|
|
1329
|
+
function vt() {
|
|
1330
|
+
return S(_t);
|
|
1331
1331
|
}
|
|
1332
|
-
var
|
|
1333
|
-
function
|
|
1334
|
-
return
|
|
1335
|
-
value: e ??
|
|
1332
|
+
var yt = [];
|
|
1333
|
+
function bt({ prefer: e, children: t }) {
|
|
1334
|
+
return P(_t.Provider, {
|
|
1335
|
+
value: e ?? yt,
|
|
1336
1336
|
children: t
|
|
1337
1337
|
});
|
|
1338
1338
|
}
|
|
1339
|
-
var
|
|
1340
|
-
function
|
|
1341
|
-
return S(
|
|
1339
|
+
var wt = g(null), xt = wt.Provider;
|
|
1340
|
+
function St() {
|
|
1341
|
+
return S(wt);
|
|
1342
1342
|
}
|
|
1343
|
-
var
|
|
1344
|
-
const e =
|
|
1345
|
-
return
|
|
1343
|
+
var Mt = g(null), Et = Mt.Provider, Ct = () => S(Mt), Lt = () => () => {}, Tt = () => {
|
|
1344
|
+
const e = Ct(), t = e?.getRoot();
|
|
1345
|
+
return A(t?.subscribeOpenPopups ?? Lt, () => t?.isPopupOpenOutside(e) ?? !1, () => !1);
|
|
1346
1346
|
};
|
|
1347
|
-
function
|
|
1348
|
-
const n =
|
|
1347
|
+
function kt(e, t) {
|
|
1348
|
+
const n = pt(), o = vt(), r = Array.isArray(e) ? e.join("\0") : String(e), i = L(() => Array.isArray(e) ? [...e] : [e], [r]), s = k(t);
|
|
1349
1349
|
s.current = t;
|
|
1350
|
-
const l =
|
|
1350
|
+
const l = Ct(), a = k(l);
|
|
1351
1351
|
a.current = l;
|
|
1352
|
-
const c =
|
|
1352
|
+
const c = St(), u = k(c);
|
|
1353
1353
|
u.current = c;
|
|
1354
1354
|
const h = x((e) => {
|
|
1355
1355
|
if (!n) return () => {};
|
|
@@ -1369,8 +1369,8 @@ function zt(e, t) {
|
|
|
1369
1369
|
return () => {
|
|
1370
1370
|
for (const e of t) e();
|
|
1371
1371
|
};
|
|
1372
|
-
}, [n, i]), d =
|
|
1373
|
-
return
|
|
1372
|
+
}, [n, i]), d = A(h, () => n ? n.getVersion() : 0, () => 0);
|
|
1373
|
+
return L(() => n ? i.map((e) => {
|
|
1374
1374
|
return n.resolve(e) || (o ? n.scope.resolveStatic(e, o) : void 0);
|
|
1375
1375
|
}) : i.map(() => {}), [
|
|
1376
1376
|
n,
|
|
@@ -1379,8 +1379,8 @@ function zt(e, t) {
|
|
|
1379
1379
|
o
|
|
1380
1380
|
]);
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1383
|
-
const t =
|
|
1382
|
+
function zt(e) {
|
|
1383
|
+
const t = ct();
|
|
1384
1384
|
M(() => {
|
|
1385
1385
|
if (!t) return;
|
|
1386
1386
|
const n = [];
|
|
@@ -1393,73 +1393,73 @@ function At(e) {
|
|
|
1393
1393
|
};
|
|
1394
1394
|
}, [t, e]);
|
|
1395
1395
|
}
|
|
1396
|
-
var
|
|
1397
|
-
ACCUMULATE: () =>
|
|
1398
|
-
CommandAnchorProvider: () =>
|
|
1399
|
-
CommandButtonEntryLabel: () =>
|
|
1400
|
-
CommandButtonRegistryContext: () =>
|
|
1401
|
-
CommandButtonRegistryProvider: () =>
|
|
1402
|
-
CommandButtonType: () =>
|
|
1403
|
-
CommandChainContext: () =>
|
|
1404
|
-
CommandFallbackContext: () =>
|
|
1405
|
-
CommandFallbackProvider: () =>
|
|
1406
|
-
CommandFocusProvider: () =>
|
|
1407
|
-
CommandOrderContext: () =>
|
|
1408
|
-
CommandRegistry: () =>
|
|
1409
|
-
CommandRegistryContext: () =>
|
|
1410
|
-
CommandResolver: () =>
|
|
1411
|
-
CommandResolverContext: () =>
|
|
1412
|
-
CommandScope: () =>
|
|
1413
|
-
CommandScopeContext: () =>
|
|
1414
|
-
CommandScopeProvider: () =>
|
|
1415
|
-
ConstantActivation: () =>
|
|
1416
|
-
DefaultCommandButtonRegistry: () =>
|
|
1417
|
-
DefaultCommandCatalogService: () =>
|
|
1418
|
-
DefaultCommandRegistry: () =>
|
|
1419
|
-
FocusActivation: () =>
|
|
1420
|
-
KeyBindingDispatcher: () =>
|
|
1421
|
-
LayerActivation: () =>
|
|
1422
|
-
ManualActivation: () =>
|
|
1423
|
-
QUICK_ACTION_TAG: () =>
|
|
1424
|
-
asCommandCatalog: () =>
|
|
1425
|
-
attachWhenReady: () =>
|
|
1426
|
-
chromeToPartial: () =>
|
|
1427
|
-
createCommandCatalogService: () =>
|
|
1428
|
-
createResolvedCommand: () =>
|
|
1429
|
-
fetchCatalog: () =>
|
|
1430
|
-
isCaretKey: () =>
|
|
1431
|
-
keyEventCanonicals: () =>
|
|
1432
|
-
keyStrokeToCanonical: () =>
|
|
1433
|
-
mergeChrome: () =>
|
|
1434
|
-
parseShortcutString: () =>
|
|
1435
|
-
reduceDefinitions: () =>
|
|
1436
|
-
resolveAnchorSource: () =>
|
|
1437
|
-
serializeShortcut: () =>
|
|
1438
|
-
useCommandButtonEntry: () =>
|
|
1439
|
-
useCommandButtonRegistry: () =>
|
|
1440
|
-
useCommandChain: () =>
|
|
1441
|
-
useCommandElement: () =>
|
|
1442
|
-
useCommandExecute: () =>
|
|
1443
|
-
useCommandFallback: () =>
|
|
1444
|
-
useCommandFocusRestore: () =>
|
|
1445
|
-
useCommandOrder: () =>
|
|
1446
|
-
useCommandRegistry: () =>
|
|
1447
|
-
useCommandResolver: () =>
|
|
1448
|
-
useCommandScope: () =>
|
|
1449
|
-
useCommands: () =>
|
|
1450
|
-
useContributeCommands: () =>
|
|
1451
|
-
}),
|
|
1396
|
+
var At = U({
|
|
1397
|
+
ACCUMULATE: () => te,
|
|
1398
|
+
CommandAnchorProvider: () => mt,
|
|
1399
|
+
CommandButtonEntryLabel: () => de,
|
|
1400
|
+
CommandButtonRegistryContext: () => ae,
|
|
1401
|
+
CommandButtonRegistryProvider: () => ue,
|
|
1402
|
+
CommandButtonType: () => ee,
|
|
1403
|
+
CommandChainContext: () => rt,
|
|
1404
|
+
CommandFallbackContext: () => _t,
|
|
1405
|
+
CommandFallbackProvider: () => bt,
|
|
1406
|
+
CommandFocusProvider: () => xt,
|
|
1407
|
+
CommandOrderContext: () => st,
|
|
1408
|
+
CommandRegistry: () => oe,
|
|
1409
|
+
CommandRegistryContext: () => Ce,
|
|
1410
|
+
CommandResolver: () => ot,
|
|
1411
|
+
CommandResolverContext: () => ft,
|
|
1412
|
+
CommandScope: () => Te,
|
|
1413
|
+
CommandScopeContext: () => at,
|
|
1414
|
+
CommandScopeProvider: () => ht,
|
|
1415
|
+
ConstantActivation: () => Ae,
|
|
1416
|
+
DefaultCommandButtonRegistry: () => le,
|
|
1417
|
+
DefaultCommandCatalogService: () => Ee,
|
|
1418
|
+
DefaultCommandRegistry: () => re,
|
|
1419
|
+
FocusActivation: () => De,
|
|
1420
|
+
KeyBindingDispatcher: () => Je,
|
|
1421
|
+
LayerActivation: () => Pe,
|
|
1422
|
+
ManualActivation: () => ze,
|
|
1423
|
+
QUICK_ACTION_TAG: () => fe,
|
|
1424
|
+
asCommandCatalog: () => be,
|
|
1425
|
+
attachWhenReady: () => ut,
|
|
1426
|
+
chromeToPartial: () => xe,
|
|
1427
|
+
createCommandCatalogService: () => Me,
|
|
1428
|
+
createResolvedCommand: () => me,
|
|
1429
|
+
fetchCatalog: () => we,
|
|
1430
|
+
isCaretKey: () => Ge,
|
|
1431
|
+
keyEventCanonicals: () => et,
|
|
1432
|
+
keyStrokeToCanonical: () => Qe,
|
|
1433
|
+
mergeChrome: () => Se,
|
|
1434
|
+
parseShortcutString: () => ve,
|
|
1435
|
+
reduceDefinitions: () => ne,
|
|
1436
|
+
resolveAnchorSource: () => ke,
|
|
1437
|
+
serializeShortcut: () => ye,
|
|
1438
|
+
useCommandButtonEntry: () => he,
|
|
1439
|
+
useCommandButtonRegistry: () => ce,
|
|
1440
|
+
useCommandChain: () => it,
|
|
1441
|
+
useCommandElement: () => dt,
|
|
1442
|
+
useCommandExecute: () => gt,
|
|
1443
|
+
useCommandFallback: () => vt,
|
|
1444
|
+
useCommandFocusRestore: () => St,
|
|
1445
|
+
useCommandOrder: () => lt,
|
|
1446
|
+
useCommandRegistry: () => Le,
|
|
1447
|
+
useCommandResolver: () => pt,
|
|
1448
|
+
useCommandScope: () => ct,
|
|
1449
|
+
useCommands: () => kt,
|
|
1450
|
+
useContributeCommands: () => zt
|
|
1451
|
+
}), Dt = "idle", Pt = g({
|
|
1452
1452
|
mode: "idle",
|
|
1453
1453
|
interrupt: () => {}
|
|
1454
1454
|
});
|
|
1455
|
-
function
|
|
1456
|
-
return S(
|
|
1455
|
+
function Rt() {
|
|
1456
|
+
return S(Pt);
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1459
|
-
const t =
|
|
1460
|
-
o(
|
|
1458
|
+
function $t({ children: e }) {
|
|
1459
|
+
const t = Rt(), [n, o] = z(Dt), r = k(null), i = x(() => {
|
|
1460
|
+
o(Dt), null !== r.current && clearTimeout(r.current), r.current = setTimeout(() => o(Dt), 400);
|
|
1461
1461
|
}, []), s = "interrupted" === n || "interrupted" === t?.mode ? "interrupted" : "idle";
|
|
1462
|
-
return
|
|
1462
|
+
return P(Pt.Provider, {
|
|
1463
1463
|
value: {
|
|
1464
1464
|
mode: s,
|
|
1465
1465
|
interrupt: i
|
|
@@ -1467,7 +1467,7 @@ function Bt({ children: e }) {
|
|
|
1467
1467
|
children: e
|
|
1468
1468
|
});
|
|
1469
1469
|
}
|
|
1470
|
-
var
|
|
1470
|
+
var Bt = {
|
|
1471
1471
|
Default: "default",
|
|
1472
1472
|
Error: "error",
|
|
1473
1473
|
Success: "success",
|
|
@@ -1478,10 +1478,10 @@ function Ht(e = () => {}, t = () => {}, n = () => {}) {
|
|
|
1478
1478
|
const o = () => e();
|
|
1479
1479
|
return o.setProgress = t, o.setMessage = n, o;
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1481
|
+
function Ot() {
|
|
1482
1482
|
return Ht();
|
|
1483
1483
|
}
|
|
1484
|
-
var
|
|
1484
|
+
var It = [
|
|
1485
1485
|
"debug",
|
|
1486
1486
|
"log",
|
|
1487
1487
|
"warn",
|
|
@@ -1492,9 +1492,9 @@ var Nt = [
|
|
|
1492
1492
|
"showWindow",
|
|
1493
1493
|
"showOptions",
|
|
1494
1494
|
"showInput"
|
|
1495
|
-
],
|
|
1495
|
+
], Nt = (...e) => {
|
|
1496
1496
|
const t = {};
|
|
1497
|
-
for (const n of
|
|
1497
|
+
for (const n of It) for (const o of e) {
|
|
1498
1498
|
const e = o?.[n];
|
|
1499
1499
|
if ("function" == typeof e) {
|
|
1500
1500
|
t[n] = e.bind(o);
|
|
@@ -1502,47 +1502,47 @@ var Nt = [
|
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
1504
1504
|
return t;
|
|
1505
|
-
},
|
|
1505
|
+
}, Ft = {
|
|
1506
1506
|
debug: (e, t) => r.debug(e, t),
|
|
1507
1507
|
log: (e, t) => r.log(e, t),
|
|
1508
1508
|
warn: (e, t) => r.warn(e, t),
|
|
1509
1509
|
error: (e, t) => r.error(e, t),
|
|
1510
1510
|
showMessage: () => {},
|
|
1511
1511
|
showError: (e) => r.error(e),
|
|
1512
|
-
showBusy: () => Promise.resolve(
|
|
1512
|
+
showBusy: () => Promise.resolve(Ot()),
|
|
1513
1513
|
showWindow: () => Promise.resolve(document.createElement("div")),
|
|
1514
1514
|
showOptions: () => Promise.resolve(""),
|
|
1515
1515
|
showInput: () => Promise.resolve({
|
|
1516
1516
|
input: "",
|
|
1517
1517
|
option: ""
|
|
1518
1518
|
})
|
|
1519
|
-
},
|
|
1520
|
-
const n = S(
|
|
1521
|
-
return _(
|
|
1522
|
-
},
|
|
1523
|
-
const e = S(
|
|
1524
|
-
return
|
|
1525
|
-
},
|
|
1526
|
-
const n = x((...t) => e?.(...t), t), o =
|
|
1519
|
+
}, Wt = g(e.EmptyObject), Kt = ({ children: e, notifier: t }) => {
|
|
1520
|
+
const n = S(Wt), o = L(() => Nt(n, t), [n, t]);
|
|
1521
|
+
return _(Wt.Provider, { value: o }, e);
|
|
1522
|
+
}, Vt = () => {
|
|
1523
|
+
const e = S(Wt);
|
|
1524
|
+
return L(() => Nt(e, Ft), [e]);
|
|
1525
|
+
}, jt = (e, t) => {
|
|
1526
|
+
const n = x((...t) => e?.(...t), t), o = k(null);
|
|
1527
1527
|
o.current = n;
|
|
1528
1528
|
const r = x((...e) => o.current?.(...e), []);
|
|
1529
1529
|
if (o.current) return r;
|
|
1530
|
-
},
|
|
1531
|
-
function
|
|
1532
|
-
const n = x((t) => e ? e(t) :
|
|
1533
|
-
return
|
|
1530
|
+
}, Yt = () => {};
|
|
1531
|
+
function Xt(e, t) {
|
|
1532
|
+
const n = x((t) => e ? e(t) : Yt, [e]), o = x(() => t ? t() : null, [t]);
|
|
1533
|
+
return A(n, o, o);
|
|
1534
1534
|
}
|
|
1535
|
-
function
|
|
1535
|
+
function Zt(e, t) {
|
|
1536
1536
|
const n = x((t) => e.subscribe(t), [e]), o = x(() => t(e), [e, t]);
|
|
1537
|
-
return
|
|
1537
|
+
return A(n, o, o);
|
|
1538
1538
|
}
|
|
1539
|
-
var
|
|
1540
|
-
function
|
|
1541
|
-
const n = x((t) => e ? e.subscribe(t) :
|
|
1542
|
-
return
|
|
1539
|
+
var qt = () => {};
|
|
1540
|
+
function Ut(e, t) {
|
|
1541
|
+
const n = x((t) => e ? e.subscribe(t) : qt, [e]), o = x(() => e ? t(e) : null, [e, t]);
|
|
1542
|
+
return A(n, o, o);
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1545
|
-
const [t, n] =
|
|
1544
|
+
function Gt(e) {
|
|
1545
|
+
const [t, n] = z("undefined" != typeof window ? window.devicePixelRatio : 1), o = k(null);
|
|
1546
1546
|
return M(() => {
|
|
1547
1547
|
if ("undefined" == typeof window || !("matchMedia" in window)) return;
|
|
1548
1548
|
const e = () => {
|
|
@@ -1560,13 +1560,13 @@ function Jt(e) {
|
|
|
1560
1560
|
};
|
|
1561
1561
|
}, [e]), t;
|
|
1562
1562
|
}
|
|
1563
|
-
function
|
|
1563
|
+
function Jt(e) {
|
|
1564
1564
|
if ("undefined" == typeof window) return 1;
|
|
1565
1565
|
const { defaultDpr: t = 1, maxDpr: n = 3, round: o = !0 } = e || {}, r = "undefined" != typeof window && "number" == typeof window.devicePixelRatio ? window.devicePixelRatio : t;
|
|
1566
1566
|
return Math.min(Math.max(1, o ? Math.floor(r) : r), n);
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1569
|
-
const o =
|
|
1568
|
+
function Qt(e, t, n) {
|
|
1569
|
+
const o = jt(t, [t]);
|
|
1570
1570
|
M(() => {
|
|
1571
1571
|
const t = (t) => {
|
|
1572
1572
|
e.current && !e.current.contains(t.target) && o(t);
|
|
@@ -1576,8 +1576,8 @@ function en(e, t, n) {
|
|
|
1576
1576
|
};
|
|
1577
1577
|
}, [e]);
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1580
|
-
const { target: t, onChange: n, onError: o, requestFullScreenOptions: r } = e, [i, s] =
|
|
1579
|
+
function en(e = {}) {
|
|
1580
|
+
const { target: t, onChange: n, onError: o, requestFullScreenOptions: r } = e, [i, s] = z(!1), [l, a] = z(null), [c, u] = z(!1);
|
|
1581
1581
|
M(() => {
|
|
1582
1582
|
s(function() {
|
|
1583
1583
|
if ("undefined" == typeof document) return !1;
|
|
@@ -1612,21 +1612,21 @@ function tn(e = {}) {
|
|
|
1612
1612
|
toggleFullscreen: f
|
|
1613
1613
|
};
|
|
1614
1614
|
}
|
|
1615
|
-
var
|
|
1615
|
+
var tn = "_portal-root_105xh_14", nn = "_fullscreen_105xh_31", on = 0, rn = "sxl-portal-root", sn = () => {
|
|
1616
1616
|
const e = document.fullscreenElement, t = e ?? document.body;
|
|
1617
|
-
let n = document.querySelector("." +
|
|
1618
|
-
n || (n = document.createElement("div"), n.className = `${
|
|
1617
|
+
let n = document.querySelector("." + rn);
|
|
1618
|
+
n || (n = document.createElement("div"), n.className = `${rn} ${tn}`), n.parentElement !== t && t.appendChild(n);
|
|
1619
1619
|
const o = !!e;
|
|
1620
|
-
return n.classList.toggle("sxl-fullscreen", o), n.classList.toggle(
|
|
1620
|
+
return n.classList.toggle("sxl-fullscreen", o), n.classList.toggle(nn, o), n;
|
|
1621
1621
|
};
|
|
1622
|
-
function
|
|
1623
|
-
const [e, t] =
|
|
1622
|
+
function ln() {
|
|
1623
|
+
const [e, t] = z(!!document.fullscreenElement), n = x(() => sn(), []);
|
|
1624
1624
|
return M(() => {
|
|
1625
1625
|
const e = () => {
|
|
1626
|
-
t(!!document.fullscreenElement),
|
|
1626
|
+
t(!!document.fullscreenElement), sn();
|
|
1627
1627
|
};
|
|
1628
|
-
return
|
|
1629
|
-
document.removeEventListener("fullscreenchange", e), --
|
|
1628
|
+
return on++, sn(), document.addEventListener("fullscreenchange", e), () => {
|
|
1629
|
+
document.removeEventListener("fullscreenchange", e), --on <= 0 && (on = 0, document.querySelectorAll("." + rn).forEach((e) => {
|
|
1630
1630
|
e.parentNode?.removeChild(e);
|
|
1631
1631
|
}));
|
|
1632
1632
|
};
|
|
@@ -1635,35 +1635,35 @@ function an() {
|
|
|
1635
1635
|
isFullscreen: e
|
|
1636
1636
|
};
|
|
1637
1637
|
}
|
|
1638
|
-
var
|
|
1638
|
+
var an, cn = "_dragging_at5p4_10", un = /* @__PURE__ */ new Set([
|
|
1639
1639
|
"text",
|
|
1640
1640
|
"search",
|
|
1641
1641
|
"url",
|
|
1642
1642
|
"tel",
|
|
1643
1643
|
"password",
|
|
1644
1644
|
""
|
|
1645
|
-
]),
|
|
1645
|
+
]), hn = (e, t, n) => {
|
|
1646
1646
|
const o = e.getBoundingClientRect();
|
|
1647
1647
|
if (!o.width || !o.height) return null;
|
|
1648
1648
|
const r = Math.min(Math.max(t, o.left + 1), o.right - 1), i = Math.min(Math.max(n, o.top + 1), o.bottom - 1), s = e.ownerDocument, l = s.caretPositionFromPoint?.(r, i);
|
|
1649
1649
|
if (l) return l.offset;
|
|
1650
1650
|
const a = s.caretRangeFromPoint?.(r, i);
|
|
1651
1651
|
return a ? a.startOffset : null;
|
|
1652
|
-
},
|
|
1653
|
-
const e =
|
|
1652
|
+
}, dn = () => {
|
|
1653
|
+
const e = k(null);
|
|
1654
1654
|
return M(() => () => {
|
|
1655
1655
|
e.current?.();
|
|
1656
|
-
}, []),
|
|
1656
|
+
}, []), L(() => ({
|
|
1657
1657
|
onPointerDown: (t) => {
|
|
1658
1658
|
if (void 0 !== t?.button && 0 !== t.button) return;
|
|
1659
1659
|
if (e.current) return;
|
|
1660
|
-
const n = t?.shiftKey ? null : (o = t?.target, o instanceof HTMLTextAreaElement ? o.disabled ? null : o : o instanceof HTMLInputElement && !o.disabled &&
|
|
1660
|
+
const n = t?.shiftKey ? null : (o = t?.target, o instanceof HTMLTextAreaElement ? o.disabled ? null : o : o instanceof HTMLInputElement && !o.disabled && un.has(o.type) ? o : null);
|
|
1661
1661
|
var o;
|
|
1662
|
-
const r = n && void 0 !== t?.clientX && void 0 !== t?.clientY ?
|
|
1662
|
+
const r = n && void 0 !== t?.clientX && void 0 !== t?.clientY ? hn(n, t.clientX, t.clientY) : null;
|
|
1663
1663
|
let i = null !== n && null !== r, s = t?.clientX ?? 0, l = t?.clientY ?? 0;
|
|
1664
1664
|
const a = (e, t) => {
|
|
1665
1665
|
if (!i || !n || null === r) return;
|
|
1666
|
-
const o =
|
|
1666
|
+
const o = hn(n, e, t);
|
|
1667
1667
|
null !== o && n.setSelectionRange(Math.min(r, o), Math.max(r, o), o < r ? "backward" : "forward");
|
|
1668
1668
|
}, c = (e) => {
|
|
1669
1669
|
s = e.clientX, l = e.clientY, a(s, l);
|
|
@@ -1680,9 +1680,9 @@ var cn, un = "_dragging_at5p4_10", hn = /* @__PURE__ */ new Set([
|
|
|
1680
1680
|
const r = (e) => Math.max(-24, Math.min(24, e));
|
|
1681
1681
|
n.scrollLeft += r(t), n.scrollTop += r(o), a(s, l);
|
|
1682
1682
|
}, 50) : 0, f = () => {
|
|
1683
|
-
e.current = null, h.classList.remove(
|
|
1683
|
+
e.current = null, h.classList.remove(cn), d && window.clearInterval(d), window.removeEventListener("mousedown", u, !0), window.removeEventListener("pointermove", c, !0), window.removeEventListener("pointerup", f, !0), window.removeEventListener("pointercancel", f, !0);
|
|
1684
1684
|
};
|
|
1685
|
-
e.current = f, h.classList.add(
|
|
1685
|
+
e.current = f, h.classList.add(cn), i && window.addEventListener("mousedown", u, {
|
|
1686
1686
|
capture: !0,
|
|
1687
1687
|
once: !0
|
|
1688
1688
|
}), window.addEventListener("pointermove", c, !0), window.addEventListener("pointerup", f, !0), window.addEventListener("pointercancel", f, !0);
|
|
@@ -1692,15 +1692,15 @@ var cn, un = "_dragging_at5p4_10", hn = /* @__PURE__ */ new Set([
|
|
|
1692
1692
|
}
|
|
1693
1693
|
}), []);
|
|
1694
1694
|
};
|
|
1695
|
-
function
|
|
1695
|
+
function fn(e, t) {
|
|
1696
1696
|
const n = (() => {
|
|
1697
|
-
if (void 0 !==
|
|
1697
|
+
if (void 0 !== an) return an;
|
|
1698
1698
|
try {
|
|
1699
|
-
|
|
1699
|
+
an = "undefined" == typeof document ? null : document.createElement("canvas").getContext("2d") ?? null;
|
|
1700
1700
|
} catch {
|
|
1701
|
-
|
|
1701
|
+
an = null;
|
|
1702
1702
|
}
|
|
1703
|
-
return
|
|
1703
|
+
return an;
|
|
1704
1704
|
})();
|
|
1705
1705
|
return n ? (n.font = `${t.style ?? "normal"} ${t.weight ?? "normal"} ${t.size}px ${o = t.family || "sans-serif", o.split(",").map((e) => {
|
|
1706
1706
|
const t = e.trim();
|
|
@@ -1708,9 +1708,9 @@ function pn(e, t) {
|
|
|
1708
1708
|
}).join(", ")}`, n.measureText(e).width) : e.length * t.size * .6;
|
|
1709
1709
|
var o;
|
|
1710
1710
|
}
|
|
1711
|
-
function
|
|
1711
|
+
function pn(e) {
|
|
1712
1712
|
if (!e) throw new Error("must have a PointerHandlerOptions");
|
|
1713
|
-
const { onPointerDown: t, onPointerUp: n, onPointerMoveOrWait: o, processTouch: r = !1 } = e, i =
|
|
1713
|
+
const { onPointerDown: t, onPointerUp: n, onPointerMoveOrWait: o, processTouch: r = !1 } = e, i = jt(t, [t]), s = jt(n, [n]), l = jt(o, [o]), a = k(!1), c = e?.timerInitial ?? 230, u = e?.timerContinuous ?? c / 2, h = k(null), d = k(null), f = k(null), p = k(null), m = x(() => {
|
|
1714
1714
|
p.current && (clearTimeout(p.current), p.current = null);
|
|
1715
1715
|
}, []), g = x((e) => {
|
|
1716
1716
|
p.current = setTimeout(() => {
|
|
@@ -1718,41 +1718,41 @@ function mn(e) {
|
|
|
1718
1718
|
if (!1 === a.current) return;
|
|
1719
1719
|
const e = d.current, t = h.current;
|
|
1720
1720
|
if (!e || !t) return;
|
|
1721
|
-
const n =
|
|
1721
|
+
const n = Ze(e, t.currentTarget);
|
|
1722
1722
|
l?.(n, f.current, t);
|
|
1723
1723
|
}), g(u);
|
|
1724
1724
|
}, e ?? c);
|
|
1725
1725
|
}, []);
|
|
1726
1726
|
M(() => () => m(), []);
|
|
1727
|
-
const _ = r ? "pointer" : "mouse", v =
|
|
1727
|
+
const _ = r ? "pointer" : "mouse", v = jt((e) => {
|
|
1728
1728
|
document.removeEventListener(`${_}move`, w), document.removeEventListener(`${_}up`, v), document.removeEventListener("pointercancel", v), document.removeEventListener("keydown", S), document.removeEventListener("keyup", E), window.removeEventListener("blur", y), m(), window.requestAnimationFrame(() => {
|
|
1729
1729
|
if (!1 === a.current) return;
|
|
1730
1730
|
a.current = !1;
|
|
1731
1731
|
const t = e, n = h.current;
|
|
1732
1732
|
if (!n) return;
|
|
1733
|
-
const o =
|
|
1733
|
+
const o = Ze(t, n.currentTarget);
|
|
1734
1734
|
s?.(o, f.current, n), f.current = null;
|
|
1735
1735
|
});
|
|
1736
1736
|
}, []), y = x(() => {
|
|
1737
1737
|
!1 !== a.current && d.current && v(d.current);
|
|
1738
|
-
}, []), b =
|
|
1738
|
+
}, []), b = jt(() => {
|
|
1739
1739
|
m(), g(u), window.requestAnimationFrame(() => {
|
|
1740
1740
|
if (!1 === a.current) return;
|
|
1741
1741
|
const e = d.current, t = h.current;
|
|
1742
1742
|
if (!e || !t) return;
|
|
1743
|
-
const n =
|
|
1743
|
+
const n = Ze(e, t.currentTarget);
|
|
1744
1744
|
l?.(n, f.current, t);
|
|
1745
1745
|
});
|
|
1746
|
-
}, [u]), w =
|
|
1746
|
+
}, [u]), w = jt((e) => {
|
|
1747
1747
|
d.current = e, b();
|
|
1748
|
-
}, []), S =
|
|
1748
|
+
}, []), S = jt((e) => {
|
|
1749
1749
|
f.current = {
|
|
1750
1750
|
ctrlKey: e.ctrlKey,
|
|
1751
1751
|
shiftKey: e.shiftKey,
|
|
1752
1752
|
altKey: e.altKey,
|
|
1753
1753
|
metaKey: e.metaKey
|
|
1754
1754
|
}, b();
|
|
1755
|
-
}, []), E =
|
|
1755
|
+
}, []), E = jt((e) => {
|
|
1756
1756
|
f.current = {
|
|
1757
1757
|
ctrlKey: e.ctrlKey,
|
|
1758
1758
|
shiftKey: e.shiftKey,
|
|
@@ -1760,7 +1760,7 @@ function mn(e) {
|
|
|
1760
1760
|
metaKey: e.metaKey
|
|
1761
1761
|
}, b();
|
|
1762
1762
|
}, [u]);
|
|
1763
|
-
return
|
|
1763
|
+
return jt((e) => {
|
|
1764
1764
|
e.isDefaultPrevented() || (f.current = {
|
|
1765
1765
|
ctrlKey: e.ctrlKey,
|
|
1766
1766
|
shiftKey: e.shiftKey,
|
|
@@ -1769,8 +1769,8 @@ function mn(e) {
|
|
|
1769
1769
|
}, !1 !== i(e, f.current) && (h.current = e, d.current = e.nativeEvent, document.addEventListener(`${_}up`, v, { passive: !1 }), document.addEventListener(`${_}move`, w, { passive: !1 }), document.addEventListener("pointercancel", v, { passive: !1 }), document.addEventListener("keydown", S, { passive: !1 }), document.addEventListener("keyup", E, { passive: !1 }), window.addEventListener("blur", y, { passive: !0 }), a.current = !0, g(c)));
|
|
1770
1770
|
}, [c, r]);
|
|
1771
1771
|
}
|
|
1772
|
-
function
|
|
1773
|
-
return
|
|
1772
|
+
function mn(e, t) {
|
|
1773
|
+
return pn({
|
|
1774
1774
|
onPointerDown: e,
|
|
1775
1775
|
onPointerMoveOrWait: (t, n, o) => {
|
|
1776
1776
|
e?.(o);
|
|
@@ -1778,63 +1778,63 @@ function gn(e, t) {
|
|
|
1778
1778
|
...t
|
|
1779
1779
|
});
|
|
1780
1780
|
}
|
|
1781
|
-
var
|
|
1781
|
+
var gn = null, _n = /* @__PURE__ */ new Set(), vn = !1, yn = () => "touch" == ("touch" === Ne().primaryInput ? "touch" : "mouse") ? "touch" : gn ?? "mouse", bn = (e) => {
|
|
1782
1782
|
const t = "touch" === e.pointerType ? "touch" : "mouse";
|
|
1783
|
-
if (t ===
|
|
1784
|
-
const n =
|
|
1785
|
-
|
|
1786
|
-
},
|
|
1783
|
+
if (t === gn) return;
|
|
1784
|
+
const n = yn();
|
|
1785
|
+
gn = t, yn() !== n && _n.forEach((e) => e());
|
|
1786
|
+
}, wn = (e) => (_n.add(e), vn || "undefined" == typeof document || (document.addEventListener("pointerdown", bn, {
|
|
1787
1787
|
capture: !0,
|
|
1788
1788
|
passive: !0
|
|
1789
|
-
}),
|
|
1790
|
-
|
|
1791
|
-
}),
|
|
1792
|
-
const o =
|
|
1789
|
+
}), vn = !0), () => {
|
|
1790
|
+
_n.delete(e), 0 === _n.size && vn && (document.removeEventListener("pointerdown", bn, { capture: !0 }), vn = !1);
|
|
1791
|
+
}), xn = () => "mouse", Sn = () => A(wn, yn, xn), Mn = ({ initValue: e, useHookBody: t, applyStateChange: n }) => {
|
|
1792
|
+
const o = k(e);
|
|
1793
1793
|
if ("function" != typeof t) throw new Error("function expected as hook body parameter. got " + typeof t);
|
|
1794
1794
|
const r = t();
|
|
1795
|
-
return
|
|
1795
|
+
return C(() => {
|
|
1796
1796
|
o.current !== r && (o.current = r, n(r));
|
|
1797
1797
|
}, [n, r]), null;
|
|
1798
|
-
},
|
|
1798
|
+
}, En = (e) => {
|
|
1799
1799
|
console && console.warn && console.warn(e);
|
|
1800
|
-
},
|
|
1801
|
-
|
|
1802
|
-
},
|
|
1803
|
-
const [t, n] =
|
|
1804
|
-
return o.current = t, e || !1 !==
|
|
1800
|
+
}, Cn = globalThis, Ln = 1, Tn = !1, kn = !1, zn = [], An = [], Dn = () => {
|
|
1801
|
+
An.forEach((e) => e());
|
|
1802
|
+
}, Pn = ({ automaticContainerInternalUseOnly: e }) => {
|
|
1803
|
+
const [t, n] = z([]), o = k([]);
|
|
1804
|
+
return o.current = t, e || !1 !== Tn || (kn = !0), M(() => {
|
|
1805
1805
|
let t = !0;
|
|
1806
1806
|
function r() {
|
|
1807
|
-
if (t) return
|
|
1807
|
+
if (t) return An[0] !== r ? (e || !0 !== Tn || En("SingletonHooksContainer is mounted after some singleton hook has been used.Your SingletonHooksContainer will not be used in favor of internal one."), void n((e) => [])) : void n([...zn]);
|
|
1808
1808
|
}
|
|
1809
|
-
return
|
|
1810
|
-
t = !1, o.current?.length > 0 &&
|
|
1809
|
+
return An.push(r), Dn(), () => {
|
|
1810
|
+
t = !1, o.current?.length > 0 && En("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), An.splice(An.indexOf(r), 1), Dn();
|
|
1811
1811
|
};
|
|
1812
|
-
}, [e]),
|
|
1812
|
+
}, [e]), P(D, { children: t.map(({ hook: e, key: t }) => _(Mn, {
|
|
1813
1813
|
...e,
|
|
1814
1814
|
key: t
|
|
1815
1815
|
})) });
|
|
1816
|
-
},
|
|
1817
|
-
const t =
|
|
1818
|
-
return
|
|
1816
|
+
}, Rn = (e) => {
|
|
1817
|
+
const t = Ln++;
|
|
1818
|
+
return zn.push({
|
|
1819
1819
|
hook: e,
|
|
1820
1820
|
key: t
|
|
1821
|
-
}), 0 ===
|
|
1822
|
-
if (
|
|
1823
|
-
const t =
|
|
1824
|
-
|
|
1825
|
-
} else
|
|
1826
|
-
})(
|
|
1827
|
-
|
|
1821
|
+
}), 0 === An.length && !1 === kn && (Tn = !0, ((e) => {
|
|
1822
|
+
if (Cn.document && Cn.document.createElement) {
|
|
1823
|
+
const t = Cn.document.createElement("div");
|
|
1824
|
+
B(t).render(P(e, { automaticContainerInternalUseOnly: !0 }));
|
|
1825
|
+
} else En("Can not mount SingletonHooksContainer on server side. Did you manage to run useEffect on server? Please mount SingletonHooksContainer into your components tree manually.");
|
|
1826
|
+
})(Pn)), Dn(), () => {
|
|
1827
|
+
zn.splice(zn.findIndex((e) => e.key === t), 1), Dn();
|
|
1828
1828
|
};
|
|
1829
|
-
},
|
|
1830
|
-
|
|
1829
|
+
}, $n = null;
|
|
1830
|
+
$n || ($n = (e, t, n = {}) => {
|
|
1831
1831
|
let o, r, i = !1, s = !1, l = [], { unmountIfNoConsumers: a = !1 } = n;
|
|
1832
1832
|
const c = (e) => {
|
|
1833
|
-
r = e,
|
|
1833
|
+
r = e, O(() => l.forEach((t) => t(e)));
|
|
1834
1834
|
}, u = () => (s || (r = "function" == typeof e ? e() : e, s = !0), r);
|
|
1835
1835
|
return () => {
|
|
1836
|
-
const [n, s] =
|
|
1837
|
-
return M(() => (i || (i = !0, o =
|
|
1836
|
+
const [n, s] = z(u);
|
|
1837
|
+
return M(() => (i || (i = !0, o = Rn({
|
|
1838
1838
|
initValue: e,
|
|
1839
1839
|
useHookBody: t,
|
|
1840
1840
|
applyStateChange: c
|
|
@@ -1843,32 +1843,30 @@ Bn || (Bn = (e, t, n = {}) => {
|
|
|
1843
1843
|
}), []), n;
|
|
1844
1844
|
};
|
|
1845
1845
|
});
|
|
1846
|
-
var
|
|
1847
|
-
|
|
1848
|
-
}, In = On(null, () => {
|
|
1849
|
-
const [e, t] = A(null);
|
|
1846
|
+
var Bn = $n, Hn = () => {}, On = Bn(null, () => {
|
|
1847
|
+
const [e, t] = z(null);
|
|
1850
1848
|
return Hn = t, e;
|
|
1851
|
-
}),
|
|
1849
|
+
}), In = (e) => {
|
|
1852
1850
|
Hn((t) => ("function" == typeof e && (e = e(t)), t?.onModeChange?.(e ?? null), e));
|
|
1853
|
-
},
|
|
1854
|
-
|
|
1855
|
-
},
|
|
1856
|
-
|
|
1857
|
-
}),
|
|
1858
|
-
const e =
|
|
1859
|
-
return
|
|
1860
|
-
setMode:
|
|
1851
|
+
}, Nn = /* @__PURE__ */ new Set(), Fn = (e, t) => {
|
|
1852
|
+
Nn.forEach((n) => n(e, t)), "done" === t ? e.done?.() : e.cancel?.();
|
|
1853
|
+
}, Wn = (e) => (Nn.add(e), () => {
|
|
1854
|
+
Nn.delete(e);
|
|
1855
|
+
}), Kn = () => {
|
|
1856
|
+
const e = On();
|
|
1857
|
+
return L(() => ({
|
|
1858
|
+
setMode: In,
|
|
1861
1859
|
getMode: () => e
|
|
1862
1860
|
}), [e]);
|
|
1863
|
-
},
|
|
1864
|
-
function
|
|
1865
|
-
return
|
|
1861
|
+
}, Vn = { Active: "language" };
|
|
1862
|
+
function jn() {
|
|
1863
|
+
return A((e) => t.addChangeListener(e), () => t.getActive(), () => t.getActive());
|
|
1866
1864
|
}
|
|
1867
|
-
function
|
|
1868
|
-
const e =
|
|
1869
|
-
return
|
|
1865
|
+
function Yn() {
|
|
1866
|
+
const e = A((e) => t.addChangeListener(e), () => t.getRevision(), () => t.getRevision());
|
|
1867
|
+
return L(() => (e, n) => t.lookup(e, n) ?? e, [e]);
|
|
1870
1868
|
}
|
|
1871
|
-
var
|
|
1869
|
+
var Xn = (e, t, n, o) => ({
|
|
1872
1870
|
x: e,
|
|
1873
1871
|
y: t,
|
|
1874
1872
|
width: n,
|
|
@@ -1887,9 +1885,9 @@ var Zn = (e, t, n, o) => ({
|
|
|
1887
1885
|
right: e + n,
|
|
1888
1886
|
bottom: t + o
|
|
1889
1887
|
})
|
|
1890
|
-
}),
|
|
1891
|
-
return
|
|
1892
|
-
},
|
|
1888
|
+
}), Zn = (e) => {
|
|
1889
|
+
return Xn(e.textareaRect.left + (e.markerRect.left - e.mirrorRect.left) - e.scrollLeft, e.textareaRect.top + (e.markerRect.top - e.mirrorRect.top) - e.scrollTop, 0, e.markerRect.height);
|
|
1890
|
+
}, qn = [
|
|
1893
1891
|
"paddingTop",
|
|
1894
1892
|
"paddingRight",
|
|
1895
1893
|
"paddingBottom",
|
|
@@ -1919,18 +1917,18 @@ var Zn = (e, t, n, o) => ({
|
|
|
1919
1917
|
"wordBreak",
|
|
1920
1918
|
"overflowWrap",
|
|
1921
1919
|
"tabSize"
|
|
1922
|
-
],
|
|
1923
|
-
if (!e || "undefined" == typeof document) return
|
|
1920
|
+
], Un = (e, t, n, o = 0) => {
|
|
1921
|
+
if (!e || "undefined" == typeof document) return Xn(0, 0, 0, 0);
|
|
1924
1922
|
const r = e.value, i = Math.max(0, Math.min(t ?? e.selectionStart ?? r.length, r.length)), s = !n, l = n ?? document.createElement("div");
|
|
1925
1923
|
l.setAttribute("aria-hidden", "true"), ((e, t) => {
|
|
1926
1924
|
const n = getComputedStyle(t), o = e.style;
|
|
1927
|
-
for (const e of
|
|
1925
|
+
for (const e of qn) o[e] = n[e];
|
|
1928
1926
|
o.position = "absolute", o.top = "0", o.left = "0", o.visibility = "hidden", o.pointerEvents = "none", o.overflow = "hidden", o.boxSizing = "border-box", o.height = "auto", o.width = `${t.offsetWidth}px`;
|
|
1929
1927
|
})(l, e), l.textContent = r.slice(0, i);
|
|
1930
1928
|
const a = document.createElement("span");
|
|
1931
1929
|
a.textContent = r.slice(i) || "", l.appendChild(a), s && document.body.appendChild(l);
|
|
1932
1930
|
try {
|
|
1933
|
-
const t = getComputedStyle(e), n = a.getBoundingClientRect(), r = l.getBoundingClientRect(), i = n.height || parseFloat(t.lineHeight) || 1.2 * parseFloat(t.fontSize) || 0, s =
|
|
1931
|
+
const t = getComputedStyle(e), n = a.getBoundingClientRect(), r = l.getBoundingClientRect(), i = n.height || parseFloat(t.lineHeight) || 1.2 * parseFloat(t.fontSize) || 0, s = Zn({
|
|
1934
1932
|
textareaRect: e.getBoundingClientRect(),
|
|
1935
1933
|
mirrorRect: r,
|
|
1936
1934
|
markerRect: {
|
|
@@ -1941,12 +1939,12 @@ var Zn = (e, t, n, o) => ({
|
|
|
1941
1939
|
scrollLeft: e.scrollLeft,
|
|
1942
1940
|
scrollTop: e.scrollTop
|
|
1943
1941
|
});
|
|
1944
|
-
return o ?
|
|
1942
|
+
return o ? Xn(s.left - o, s.top, 0, s.height) : s;
|
|
1945
1943
|
} finally {
|
|
1946
1944
|
s ? l.remove() : l.textContent = "";
|
|
1947
1945
|
}
|
|
1948
|
-
},
|
|
1949
|
-
const t =
|
|
1946
|
+
}, Gn = (e) => {
|
|
1947
|
+
const t = k(null);
|
|
1950
1948
|
M(() => {
|
|
1951
1949
|
if ("undefined" == typeof document) return;
|
|
1952
1950
|
const e = document.createElement("div");
|
|
@@ -1954,12 +1952,12 @@ var Zn = (e, t, n, o) => ({
|
|
|
1954
1952
|
e.remove(), t.current = null;
|
|
1955
1953
|
};
|
|
1956
1954
|
}, []);
|
|
1957
|
-
const n = x((n, o) =>
|
|
1955
|
+
const n = x((n, o) => Un(e.current, n, t.current ?? void 0, o), [e]);
|
|
1958
1956
|
return {
|
|
1959
1957
|
getCaretRect: n,
|
|
1960
1958
|
caretAnchor: x((e, t) => ({ getBoundingClientRect: () => n("function" == typeof e ? e() : e, "function" == typeof t ? t() : t) }), [n])
|
|
1961
1959
|
};
|
|
1962
|
-
},
|
|
1960
|
+
}, Jn = Bn({
|
|
1963
1961
|
setClipboard: (e) => {
|
|
1964
1962
|
throw new Error("This is only available via the useClipboard.");
|
|
1965
1963
|
},
|
|
@@ -1967,16 +1965,16 @@ var Zn = (e, t, n, o) => ({
|
|
|
1967
1965
|
refNativeCopy: { current: null },
|
|
1968
1966
|
refNativeLastKey: { current: null }
|
|
1969
1967
|
}, () => {
|
|
1970
|
-
const [e, t] =
|
|
1968
|
+
const [e, t] = z(o.Global);
|
|
1971
1969
|
return {
|
|
1972
1970
|
setClipboard: (e) => t(e),
|
|
1973
1971
|
getClipboard: () => e,
|
|
1974
|
-
refNativeCopy:
|
|
1975
|
-
refNativeLastKey:
|
|
1972
|
+
refNativeCopy: k(null),
|
|
1973
|
+
refNativeLastKey: k(null)
|
|
1976
1974
|
};
|
|
1977
1975
|
});
|
|
1978
|
-
function
|
|
1979
|
-
const n =
|
|
1976
|
+
function Qn(e, t = !0) {
|
|
1977
|
+
const n = k(e);
|
|
1980
1978
|
M(() => {
|
|
1981
1979
|
if (t) {
|
|
1982
1980
|
const t = Object.entries(e).reduce((e, [t, o]) => (n.current[t] !== o && (e[t] = [n.current[t], o]), e), {});
|
|
@@ -1985,18 +1983,18 @@ function eo(e, t = !0) {
|
|
|
1985
1983
|
n.current = e;
|
|
1986
1984
|
});
|
|
1987
1985
|
}
|
|
1988
|
-
var
|
|
1989
|
-
var
|
|
1990
|
-
const [e, t] =
|
|
1991
|
-
return
|
|
1992
|
-
null == e && t(
|
|
1986
|
+
var eo = !1, to = 0, no = "undefined" != typeof document ? C : M, oo = () => "sheetxl-ui-" + to++;
|
|
1987
|
+
var ro = f["useId".toString()], io = null != ro ? ro : function() {
|
|
1988
|
+
const [e, t] = z(() => eo ? oo() : void 0);
|
|
1989
|
+
return no(() => {
|
|
1990
|
+
null == e && t(oo());
|
|
1993
1991
|
}, []), M(() => {
|
|
1994
|
-
|
|
1992
|
+
eo || (eo = !0);
|
|
1995
1993
|
}, []), e;
|
|
1996
|
-
},
|
|
1997
|
-
function
|
|
1998
|
-
const r =
|
|
1999
|
-
return
|
|
1994
|
+
}, so = [];
|
|
1995
|
+
function lo(e, t, n = so, o) {
|
|
1996
|
+
const r = k(null), i = k(null);
|
|
1997
|
+
return E(e ?? i, () => {
|
|
2000
1998
|
const e = void 0 === o ? r.current : o;
|
|
2001
1999
|
if (!e) return;
|
|
2002
2000
|
const n = t?.();
|
|
@@ -2014,20 +2012,20 @@ function ao(e, t, n = lo, o) {
|
|
|
2014
2012
|
return e;
|
|
2015
2013
|
}, void 0 === o ? n : [...n, o]), r;
|
|
2016
2014
|
}
|
|
2017
|
-
var
|
|
2018
|
-
const e =
|
|
2019
|
-
return e ?
|
|
2015
|
+
var ao = () => "undefined" == typeof navigator ? null : navigator.virtualKeyboard ?? null, co = null, uo = () => "undefined" != typeof window ? window.visualViewport ?? null : null, ho = () => {
|
|
2016
|
+
const e = uo();
|
|
2017
|
+
return e ? co && co.width === e.width && co.height === e.height && co.offsetTop === e.offsetTop && co.offsetLeft === e.offsetLeft ? co : co = {
|
|
2020
2018
|
width: e.width,
|
|
2021
2019
|
height: e.height,
|
|
2022
2020
|
offsetTop: e.offsetTop,
|
|
2023
2021
|
offsetLeft: e.offsetLeft
|
|
2024
2022
|
} : null;
|
|
2025
|
-
},
|
|
2026
|
-
const t =
|
|
2023
|
+
}, fo = (e) => {
|
|
2024
|
+
const t = uo(), n = ao();
|
|
2027
2025
|
return t || n ? (t?.addEventListener("resize", e), t?.addEventListener("scroll", e), n?.addEventListener("geometrychange", e), () => {
|
|
2028
2026
|
t?.removeEventListener("resize", e), t?.removeEventListener("scroll", e), n?.removeEventListener("geometrychange", e);
|
|
2029
2027
|
}) : () => {};
|
|
2030
|
-
},
|
|
2028
|
+
}, po = () => () => {}, mo = () => null, go = (e = !0) => A(e ? fo : po, e ? ho : mo, mo), _o = "undefined" != typeof window ? C : M, vo = Object.freeze({
|
|
2031
2029
|
x: 0,
|
|
2032
2030
|
y: 0,
|
|
2033
2031
|
width: 0,
|
|
@@ -2037,9 +2035,9 @@ var co = () => "undefined" == typeof navigator ? null : navigator.virtualKeyboar
|
|
|
2037
2035
|
bottom: 0,
|
|
2038
2036
|
right: 0
|
|
2039
2037
|
});
|
|
2040
|
-
function
|
|
2041
|
-
const [e, t] =
|
|
2042
|
-
return
|
|
2038
|
+
function yo() {
|
|
2039
|
+
const [e, t] = z(null), [n, o] = z(vo), r = k(n), i = x((e) => t(e), []);
|
|
2040
|
+
return _o(() => {
|
|
2043
2041
|
if (!e || "undefined" == typeof ResizeObserver) return;
|
|
2044
2042
|
const t = (e) => {
|
|
2045
2043
|
var t, n;
|
|
@@ -2079,24 +2077,24 @@ function bo() {
|
|
|
2079
2077
|
return i.observe(e), () => i.disconnect();
|
|
2080
2078
|
}, [e]), [i, n];
|
|
2081
2079
|
}
|
|
2082
|
-
var
|
|
2083
|
-
if (
|
|
2084
|
-
|
|
2080
|
+
var bo = "sxl-history-change", wo = !1, xo = () => {
|
|
2081
|
+
if (wo) return;
|
|
2082
|
+
wo = !0;
|
|
2085
2083
|
const e = window.history;
|
|
2086
2084
|
for (const t of ["pushState", "replaceState"]) {
|
|
2087
2085
|
const n = e[t];
|
|
2088
2086
|
e[t] = function(...e) {
|
|
2089
2087
|
const t = n.apply(this, e);
|
|
2090
|
-
return window.dispatchEvent(new Event(
|
|
2088
|
+
return window.dispatchEvent(new Event(bo)), t;
|
|
2091
2089
|
};
|
|
2092
2090
|
}
|
|
2093
|
-
},
|
|
2094
|
-
window.removeEventListener("popstate", e), window.removeEventListener(
|
|
2095
|
-
}),
|
|
2096
|
-
function
|
|
2097
|
-
return
|
|
2091
|
+
}, So = (e) => (xo(), window.addEventListener("popstate", e), window.addEventListener(bo, e), () => {
|
|
2092
|
+
window.removeEventListener("popstate", e), window.removeEventListener(bo, e);
|
|
2093
|
+
}), Mo = () => window.location.search, Eo = () => "";
|
|
2094
|
+
function Co() {
|
|
2095
|
+
return A(So, Mo, Eo);
|
|
2098
2096
|
}
|
|
2099
|
-
var
|
|
2097
|
+
var Lo = 3, To = .5, ko = 50, zo = (e) => ({
|
|
2100
2098
|
x: e.x,
|
|
2101
2099
|
y: e.y,
|
|
2102
2100
|
width: e.width,
|
|
@@ -2106,8 +2104,8 @@ var To = 3, ko = .5, zo = 50, Ao = (e) => ({
|
|
|
2106
2104
|
right: e.right,
|
|
2107
2105
|
bottom: e.bottom
|
|
2108
2106
|
});
|
|
2109
|
-
function
|
|
2110
|
-
const { threshold: t =
|
|
2107
|
+
function Ao(e = {}) {
|
|
2108
|
+
const { threshold: t = To, stillnessThreshold: n = Lo, maxHierarchyDepth: o = ko } = e, [r, i] = yo(), s = k(null), [l, a] = T((e) => e + 1, 0), c = k(void 0), u = k({
|
|
2111
2109
|
x: 0,
|
|
2112
2110
|
y: 0,
|
|
2113
2111
|
width: 0,
|
|
@@ -2118,7 +2116,7 @@ function Do(e = {}) {
|
|
|
2118
2116
|
bottom: 0
|
|
2119
2117
|
}), h = x((e) => {
|
|
2120
2118
|
s.current = e, r(e);
|
|
2121
|
-
}, [r]), [d, f] =
|
|
2119
|
+
}, [r]), [d, f] = z(i);
|
|
2122
2120
|
return M(() => {
|
|
2123
2121
|
i && !d && f(i);
|
|
2124
2122
|
}, [i, d]), M(() => {
|
|
@@ -2128,7 +2126,7 @@ function Do(e = {}) {
|
|
|
2128
2126
|
const l = () => {
|
|
2129
2127
|
if (!e) return;
|
|
2130
2128
|
const o = e.getBoundingClientRect(), s = u.current;
|
|
2131
|
-
Math.abs(o.x - s.x) > t || Math.abs(o.y - s.y) > t || Math.abs(o.width - s.width) > t || Math.abs(o.height - s.height) > t ? (r || (r = !0, f(
|
|
2129
|
+
Math.abs(o.x - s.x) > t || Math.abs(o.y - s.y) > t || Math.abs(o.width - s.width) > t || Math.abs(o.height - s.height) > t ? (r || (r = !0, f(zo(o)), a()), i = 0) : i++, r && i >= n && (r = !1, f(zo(o)), a()), u.current = zo(o), c.current = requestAnimationFrame(l);
|
|
2132
2130
|
};
|
|
2133
2131
|
c.current = requestAnimationFrame(l);
|
|
2134
2132
|
const h = (e) => {
|
|
@@ -2152,8 +2150,8 @@ function Do(e = {}) {
|
|
|
2152
2150
|
o
|
|
2153
2151
|
]), [h, d];
|
|
2154
2152
|
}
|
|
2155
|
-
var
|
|
2156
|
-
const { refFocusStart: n, ...o } = e, r =
|
|
2153
|
+
var Do = w(v((e, t) => {
|
|
2154
|
+
const { refFocusStart: n, ...o } = e, r = k(null), i = x(() => {
|
|
2157
2155
|
if (n) return void n?.current?.focus();
|
|
2158
2156
|
const e = r.current?.parentElement;
|
|
2159
2157
|
if (!e) return;
|
|
@@ -2170,18 +2168,18 @@ var Po = w(v((e, t) => {
|
|
|
2170
2168
|
0 !== o.length && (o.sort(function(e, t) {
|
|
2171
2169
|
return e.tabindex - t.tabindex;
|
|
2172
2170
|
}), o[0].child.focus());
|
|
2173
|
-
}, [n]), s =
|
|
2174
|
-
return
|
|
2171
|
+
}, [n]), s = I([r, t]);
|
|
2172
|
+
return P("div", {
|
|
2175
2173
|
tabIndex: 0,
|
|
2176
2174
|
ref: s,
|
|
2177
2175
|
onFocus: i,
|
|
2178
2176
|
...o
|
|
2179
2177
|
});
|
|
2180
|
-
})),
|
|
2178
|
+
})), Po = (e) => {
|
|
2181
2179
|
const { render: t, props: n } = e;
|
|
2182
2180
|
return t ? t(n) : null;
|
|
2183
2181
|
};
|
|
2184
|
-
function
|
|
2182
|
+
function Ro(e, t, n = !1) {
|
|
2185
2183
|
if (0 === t) return e;
|
|
2186
2184
|
function o(e, t, n) {
|
|
2187
2185
|
let o = t.x - e.x, i = t.y - e.y, s = Math.sqrt(o * o + i * i);
|
|
@@ -2241,10 +2239,10 @@ function $o(e, t, n = !1) {
|
|
|
2241
2239
|
return e + t.join(" ") + " ";
|
|
2242
2240
|
}, "");
|
|
2243
2241
|
}
|
|
2244
|
-
var
|
|
2245
|
-
const { className: n, style: o, children: r, radius: i = 4, strokeWidth: s = 1, strokeColor: l = "grey", variant: a = "tab", clipInset: c, ...u } = e, [h, { width: d, height: f }] =
|
|
2242
|
+
var $o = w(v((e, t) => {
|
|
2243
|
+
const { className: n, style: o, children: r, radius: i = 4, strokeWidth: s = 1, strokeColor: l = "grey", variant: a = "tab", clipInset: c, ...u } = e, [h, { width: d, height: f }] = yo(), p = k(null), g = c?.top ?? 0, _ = c?.right ?? 0, v = c?.bottom ?? 0, b = c?.left ?? 0, w = L(() => {
|
|
2246
2244
|
const e = d - _, t = f - v;
|
|
2247
|
-
return
|
|
2245
|
+
return Ro(`M ${b} ${g} L ${e} ${g} L ${e} ${t} L ${b} ${t} Z`, i);
|
|
2248
2246
|
}, [
|
|
2249
2247
|
d,
|
|
2250
2248
|
f,
|
|
@@ -2253,9 +2251,9 @@ var Bo = w(v((e, t) => {
|
|
|
2253
2251
|
_,
|
|
2254
2252
|
v,
|
|
2255
2253
|
b
|
|
2256
|
-
]), x =
|
|
2254
|
+
]), x = L(() => "rounded" === a ? w : ((e, t = 0) => {
|
|
2257
2255
|
const n = e / 2, o = f - n + t;
|
|
2258
|
-
return
|
|
2256
|
+
return Ro(`M 0 ${n} L ${i} ${n} L ${i} ${o} L ${2 * i} ${o} L ${d - 2 * i} ${o} M ${d - 2 * i} ${o} L ${d - i} ${o} L ${d - i} ${n} L ${d} ${n}`, i);
|
|
2259
2257
|
})(s), [
|
|
2260
2258
|
a,
|
|
2261
2259
|
w,
|
|
@@ -2263,11 +2261,11 @@ var Bo = w(v((e, t) => {
|
|
|
2263
2261
|
f,
|
|
2264
2262
|
i,
|
|
2265
2263
|
s
|
|
2266
|
-
]), S =
|
|
2264
|
+
]), S = L(() => {
|
|
2267
2265
|
if (0 === i) return;
|
|
2268
2266
|
if ("rounded" === a) return w;
|
|
2269
2267
|
const e = f - s / 2;
|
|
2270
|
-
return
|
|
2268
|
+
return Ro(`M 0 0 L ${i} 0 L ${i} ${e} L ${d - i} ${e} L ${d - i} 0 L ${d} 0`, i);
|
|
2271
2269
|
}, [
|
|
2272
2270
|
d,
|
|
2273
2271
|
f,
|
|
@@ -2275,15 +2273,15 @@ var Bo = w(v((e, t) => {
|
|
|
2275
2273
|
s,
|
|
2276
2274
|
a,
|
|
2277
2275
|
w
|
|
2278
|
-
]), M =
|
|
2276
|
+
]), M = L(() => ({ style: {
|
|
2279
2277
|
...y(r) ? r.props?.style : void 0,
|
|
2280
2278
|
clipPath: `path('${S}')`
|
|
2281
|
-
} }), [S, r]), E =
|
|
2279
|
+
} }), [S, r]), E = I([
|
|
2282
2280
|
p,
|
|
2283
2281
|
h,
|
|
2284
2282
|
t
|
|
2285
2283
|
]);
|
|
2286
|
-
return
|
|
2284
|
+
return R("div", {
|
|
2287
2285
|
className: n,
|
|
2288
2286
|
style: {
|
|
2289
2287
|
display: "flex",
|
|
@@ -2292,7 +2290,7 @@ var Bo = w(v((e, t) => {
|
|
|
2292
2290
|
},
|
|
2293
2291
|
...u,
|
|
2294
2292
|
ref: E,
|
|
2295
|
-
children: [y(r) ? m(r, M) :
|
|
2293
|
+
children: [y(r) ? m(r, M) : P(D, {}), P("svg", {
|
|
2296
2294
|
style: {
|
|
2297
2295
|
position: "absolute",
|
|
2298
2296
|
top: 0,
|
|
@@ -2302,7 +2300,7 @@ var Bo = w(v((e, t) => {
|
|
|
2302
2300
|
width: d,
|
|
2303
2301
|
height: f,
|
|
2304
2302
|
viewBox: `0 0 ${d} ${f}`,
|
|
2305
|
-
children:
|
|
2303
|
+
children: P("path", {
|
|
2306
2304
|
d: x,
|
|
2307
2305
|
stroke: l,
|
|
2308
2306
|
fill: "none",
|
|
@@ -2311,11 +2309,11 @@ var Bo = w(v((e, t) => {
|
|
|
2311
2309
|
})
|
|
2312
2310
|
})]
|
|
2313
2311
|
});
|
|
2314
|
-
})),
|
|
2312
|
+
})), Bo = g(null);
|
|
2315
2313
|
function Ho() {
|
|
2316
|
-
return S(
|
|
2314
|
+
return S(Bo);
|
|
2317
2315
|
}
|
|
2318
|
-
function
|
|
2316
|
+
function Oo(e, t) {
|
|
2319
2317
|
const n = t?.renderError;
|
|
2320
2318
|
let o = null;
|
|
2321
2319
|
const r = () => {
|
|
@@ -2340,16 +2338,16 @@ function Io(e, t) {
|
|
|
2340
2338
|
return t;
|
|
2341
2339
|
}, i = () => ((!o || o.failed && o.shown) && (o = r()), o.component);
|
|
2342
2340
|
return (e) => {
|
|
2343
|
-
const [t, n] =
|
|
2341
|
+
const [t, n] = z(i), s = x(() => {
|
|
2344
2342
|
n(() => (o && !o.failed || (o = r()), o.component));
|
|
2345
2343
|
}, []);
|
|
2346
|
-
return
|
|
2344
|
+
return P(Bo.Provider, {
|
|
2347
2345
|
value: s,
|
|
2348
|
-
children:
|
|
2346
|
+
children: P(t, { ...e })
|
|
2349
2347
|
});
|
|
2350
2348
|
};
|
|
2351
2349
|
}
|
|
2352
|
-
var
|
|
2350
|
+
var Io = class extends p {
|
|
2353
2351
|
constructor(...e) {
|
|
2354
2352
|
super(...e), this.state = { error: null }, this._reportedMessage = null;
|
|
2355
2353
|
}
|
|
@@ -2365,27 +2363,27 @@ var No = class extends p {
|
|
|
2365
2363
|
render() {
|
|
2366
2364
|
return this.state.error ? this.props.fallback ?? null : this.props.children;
|
|
2367
2365
|
}
|
|
2368
|
-
},
|
|
2369
|
-
const n =
|
|
2366
|
+
}, No = ({ children: e, fallback: t }) => {
|
|
2367
|
+
const n = Vt(), o = x((e) => {
|
|
2370
2368
|
n.showError(e);
|
|
2371
2369
|
}, [n]);
|
|
2372
|
-
return
|
|
2370
|
+
return P(Io, {
|
|
2373
2371
|
fallback: t,
|
|
2374
2372
|
onError: o,
|
|
2375
2373
|
children: e
|
|
2376
2374
|
});
|
|
2377
|
-
},
|
|
2378
|
-
function
|
|
2375
|
+
}, Fo = /\b(?:chrome|moz|safari-web|ms-browser)-extension:\/\//, Wo = /\breact_devtools_backend/;
|
|
2376
|
+
function Ko(e, t) {
|
|
2379
2377
|
const n = `${e ?? ""}\n${t instanceof Error ? t.stack ?? "" : ""}`;
|
|
2380
|
-
return
|
|
2378
|
+
return Fo.test(n) || Wo.test(n);
|
|
2381
2379
|
}
|
|
2382
|
-
var
|
|
2380
|
+
var Vo = class {
|
|
2383
2381
|
constructor(e) {
|
|
2384
2382
|
this.notifier = e, this.handleUnhandledRejection = (e) => {
|
|
2385
2383
|
const t = e.reason;
|
|
2386
|
-
t instanceof Error && t.message && t.message.startsWith("Maximum update depth exceeded") ? console.warn(t) : t instanceof DOMException && "AbortError" === t.name ||
|
|
2384
|
+
t instanceof Error && t.message && t.message.startsWith("Maximum update depth exceeded") ? console.warn(t) : t instanceof DOMException && "AbortError" === t.name || Ko(void 0, t) || (this.notifier.showError(t), t instanceof n && e.preventDefault());
|
|
2387
2385
|
}, this.handleGlobalError = (e) => {
|
|
2388
|
-
"string" == typeof e.message && e.message.includes("ResizeObserver loop") ||
|
|
2386
|
+
"string" == typeof e.message && e.message.includes("ResizeObserver loop") || Ko(e.filename, e.error) || this.notifier.showError(e.error ?? e.message);
|
|
2389
2387
|
}, this.setupGlobalHandlers();
|
|
2390
2388
|
}
|
|
2391
2389
|
setupGlobalHandlers() {
|
|
@@ -2394,19 +2392,19 @@ var jo = class {
|
|
|
2394
2392
|
cleanup() {
|
|
2395
2393
|
window.removeEventListener("unhandledrejection", this.handleUnhandledRejection), window.removeEventListener("error", this.handleGlobalError);
|
|
2396
2394
|
}
|
|
2397
|
-
},
|
|
2398
|
-
const t =
|
|
2395
|
+
}, jo = ({ children: e }) => {
|
|
2396
|
+
const t = Vt();
|
|
2399
2397
|
return M(() => {
|
|
2400
|
-
const e = new
|
|
2398
|
+
const e = new Vo(t);
|
|
2401
2399
|
return () => {
|
|
2402
2400
|
e.cleanup();
|
|
2403
2401
|
};
|
|
2404
|
-
}, [t]),
|
|
2405
|
-
},
|
|
2402
|
+
}, [t]), P(D, { children: e });
|
|
2403
|
+
}, Yo = {
|
|
2406
2404
|
grid: 1250,
|
|
2407
2405
|
popup: 1300,
|
|
2408
2406
|
tooltip: 1500
|
|
2409
|
-
},
|
|
2407
|
+
}, Xo = (e, t = 0) => Zo(`var(--sxl-z-${e}, ${Yo[e]})`, t), Zo = (e, t) => t ? "number" == typeof e ? e + t : `calc(${e} ${t < 0 ? "-" : "+"} ${Math.abs(t)})` : e, qo = 7, Uo = 3, Go = {
|
|
2410
2408
|
light: {
|
|
2411
2409
|
"color-base-100": "#ffffff",
|
|
2412
2410
|
"color-base-200": "#f5f5f5",
|
|
@@ -2445,6 +2443,11 @@ var jo = class {
|
|
|
2445
2443
|
"#12a4af",
|
|
2446
2444
|
"#d01884"
|
|
2447
2445
|
],
|
|
2446
|
+
"color-bracket": [
|
|
2447
|
+
"#0431fa",
|
|
2448
|
+
"#319331",
|
|
2449
|
+
"#7b3814"
|
|
2450
|
+
],
|
|
2448
2451
|
"font-family": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
|
|
2449
2452
|
"font-family-mono": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
|
|
2450
2453
|
"font-size": "13px",
|
|
@@ -2453,9 +2456,9 @@ var jo = class {
|
|
|
2453
2456
|
"radius-field": "4px",
|
|
2454
2457
|
"radius-box": "6px",
|
|
2455
2458
|
border: "1px",
|
|
2456
|
-
"z-grid": String(
|
|
2457
|
-
"z-popup": String(
|
|
2458
|
-
"z-tooltip": String(
|
|
2459
|
+
"z-grid": String(Yo.grid),
|
|
2460
|
+
"z-popup": String(Yo.popup),
|
|
2461
|
+
"z-tooltip": String(Yo.tooltip),
|
|
2459
2462
|
"image-background": "none"
|
|
2460
2463
|
},
|
|
2461
2464
|
dark: {
|
|
@@ -2471,7 +2474,7 @@ var jo = class {
|
|
|
2471
2474
|
"color-base-emphasis-content": "var(--sxl-color-primary-content, rgba(0, 0, 0, 0.87))",
|
|
2472
2475
|
"color-input": "#121212",
|
|
2473
2476
|
"color-input-border": "rgba(255, 255, 255, 0.2)",
|
|
2474
|
-
"color-elevated": "#
|
|
2477
|
+
"color-elevated": "#262626",
|
|
2475
2478
|
"color-elevated-border": "transparent",
|
|
2476
2479
|
"color-accent": "rgb(56, 161, 105)",
|
|
2477
2480
|
"color-accent-content": "#0a0a0a",
|
|
@@ -2486,7 +2489,7 @@ var jo = class {
|
|
|
2486
2489
|
"color-error": "#f44336",
|
|
2487
2490
|
"color-error-content": "#0a0a0a",
|
|
2488
2491
|
"color-neutral": "#9e9e9e",
|
|
2489
|
-
"color-shadow": "rgba(
|
|
2492
|
+
"color-shadow": "rgba(0, 0, 0, 0.5)",
|
|
2490
2493
|
"color-series": [
|
|
2491
2494
|
"#8ab4f8",
|
|
2492
2495
|
"#f28b82",
|
|
@@ -2496,6 +2499,11 @@ var jo = class {
|
|
|
2496
2499
|
"#78d9ec",
|
|
2497
2500
|
"#ff8bcb"
|
|
2498
2501
|
],
|
|
2502
|
+
"color-bracket": [
|
|
2503
|
+
"#ffd700",
|
|
2504
|
+
"#da70d6",
|
|
2505
|
+
"#179fff"
|
|
2506
|
+
],
|
|
2499
2507
|
"font-family": "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Arial, sans-serif",
|
|
2500
2508
|
"font-family-mono": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
|
|
2501
2509
|
"font-size": "13px",
|
|
@@ -2504,9 +2512,9 @@ var jo = class {
|
|
|
2504
2512
|
"radius-field": "4px",
|
|
2505
2513
|
"radius-box": "6px",
|
|
2506
2514
|
border: "1px",
|
|
2507
|
-
"z-grid": String(
|
|
2508
|
-
"z-popup": String(
|
|
2509
|
-
"z-tooltip": String(
|
|
2515
|
+
"z-grid": String(Yo.grid),
|
|
2516
|
+
"z-popup": String(Yo.popup),
|
|
2517
|
+
"z-tooltip": String(Yo.tooltip),
|
|
2510
2518
|
"image-background": "linear-gradient(rgba(255,255,255,0.10), rgba(255,255,255,0.10))"
|
|
2511
2519
|
}
|
|
2512
2520
|
}, Jo = "--sxl-";
|
|
@@ -2523,12 +2531,24 @@ function Qo(e) {
|
|
|
2523
2531
|
function er(e, ...t) {
|
|
2524
2532
|
return Qo(Object.assign({}, Go[e], ...t.filter(Boolean)));
|
|
2525
2533
|
}
|
|
2526
|
-
var tr =
|
|
2534
|
+
var tr = {
|
|
2535
|
+
"color-series": 7,
|
|
2536
|
+
"color-bracket": 3
|
|
2537
|
+
};
|
|
2538
|
+
function nr(e, t) {
|
|
2539
|
+
if ("color-series" === e || "color-bracket" === e) {
|
|
2540
|
+
const n = tr[e], o = ((t ?? 0) % n + n) % n, r = `--sxl-${e}-${o + 1}`, i = Go.light[e]?.[o];
|
|
2541
|
+
return null == i ? `var(${r})` : `var(${r}, ${i})`;
|
|
2542
|
+
}
|
|
2543
|
+
const n = Go.light[e];
|
|
2544
|
+
return null == n ? `var(--sxl-${e})` : `var(--sxl-${e}, ${n})`;
|
|
2545
|
+
}
|
|
2546
|
+
var or = ["light", "dark"], rr = "--sxl-input-selection", ir = "color-mix(in srgb, var(--sxl-color-primary, rgb(0, 120, 215)) 20%, transparent)", sr = `:where(input,textarea,[contenteditable]:not([contenteditable="false"]))::selection{background-color:var(${rr},${ir});}`, lr = [
|
|
2527
2547
|
"sxl-defaults",
|
|
2528
2548
|
"sxl-app",
|
|
2529
2549
|
"sxl-overrides"
|
|
2530
|
-
],
|
|
2531
|
-
function
|
|
2550
|
+
], ar = `@layer ${lr.join(", ")};`;
|
|
2551
|
+
function cr(e) {
|
|
2532
2552
|
let t = "";
|
|
2533
2553
|
for (const n in e) {
|
|
2534
2554
|
const o = e[n];
|
|
@@ -2538,168 +2558,130 @@ function lr(e) {
|
|
|
2538
2558
|
}
|
|
2539
2559
|
return t;
|
|
2540
2560
|
}
|
|
2541
|
-
function
|
|
2542
|
-
const { app: t = Go, surfaces: n = {}, hc: o, modeAttr: r = "data-sxl-theme-mode", surfaceAttr: i = "data-sxl-theme-surface", layer: s, scope: l } = e,
|
|
2561
|
+
function ur(e = {}) {
|
|
2562
|
+
const { app: t = Go, surfaces: n = {}, hc: o, modeAttr: r = "data-sxl-theme-mode", surfaceAttr: i = "data-sxl-theme-surface", layer: s, scope: l, baseline: a = !0 } = e, c = [], u = {
|
|
2543
2563
|
app: {
|
|
2544
2564
|
light: t.light,
|
|
2545
2565
|
dark: t.dark
|
|
2546
2566
|
},
|
|
2547
2567
|
...n
|
|
2548
|
-
},
|
|
2549
|
-
a
|
|
2550
|
-
|
|
2551
|
-
const
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2568
|
+
}, h = l ? ":scope" : ":root", d = (e) => l ? `:scope${e},${e}` : e, f = (e) => l ? `:where(:scope[${i}="${e}"],[${i}="${e}"])` : `:where([${i}="${e}"])`, p = (e, t) => `${e} ${t}`;
|
|
2569
|
+
if (a) {
|
|
2570
|
+
c.push(`:where(${h}){color-scheme:light;${cr(t.light)}}`);
|
|
2571
|
+
for (const [e, t] of Object.entries(u)) {
|
|
2572
|
+
const n = t?.light;
|
|
2573
|
+
n && Object.keys(n).length && c.push(`${f(e)}{${cr(n)}}`);
|
|
2574
|
+
}
|
|
2575
|
+
}
|
|
2576
|
+
for (const e of or) {
|
|
2577
|
+
c.push(`${d(`[${r}="${e}"]`)}{color-scheme:${e};${cr(t[e])}}`);
|
|
2578
|
+
for (const [t, n] of Object.entries(u)) {
|
|
2557
2579
|
const o = n?.[e];
|
|
2558
|
-
o && Object.keys(o).length &&
|
|
2580
|
+
o && Object.keys(o).length && c.push(`${p(`[${r}="${e}"]`, `[${i}="${t}"]`)}{${cr(o)}}`);
|
|
2559
2581
|
}
|
|
2560
2582
|
}
|
|
2561
|
-
for (const e of
|
|
2583
|
+
for (const e of or) for (const [t, n] of Object.entries(u)) {
|
|
2562
2584
|
const o = n?.[e];
|
|
2563
|
-
o && Object.keys(o).length &&
|
|
2585
|
+
o && Object.keys(o).length && c.push(`${d(`[${r}="${e}"][${i}="${t}"]`)}{${cr(o)}}`);
|
|
2564
2586
|
}
|
|
2565
|
-
o && Object.keys(o).length &&
|
|
2566
|
-
let
|
|
2567
|
-
return l && (
|
|
2587
|
+
o && Object.keys(o).length && c.push(`${d(`[${r}="hc"]`)}{${cr(o)}}`), a && c.push(sr);
|
|
2588
|
+
let m = c.join("\n");
|
|
2589
|
+
return l && (m = `@scope (${l}){\n${m}\n}`), s && (m = `${ar}\n@layer ${s}{\n${m}\n}`), m;
|
|
2568
2590
|
}
|
|
2569
|
-
var
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
},
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2591
|
+
var hr = "data-sxl-theme-mode", dr = "data-sxl-theme-surface", fr = (e, t) => ({
|
|
2592
|
+
[dr]: e,
|
|
2593
|
+
[hr]: t
|
|
2594
|
+
}), pr = (e, t) => `sheetxl-${e}-${t.replace(/[^A-Za-z0-9_-]/g, "")}`, mr = "sxl-theme-layer-order", gr = (e = document) => {
|
|
2595
|
+
if ("undefined" == typeof document) return;
|
|
2596
|
+
if (e.getElementById(mr)) return;
|
|
2597
|
+
const t = document.createElement("style");
|
|
2598
|
+
t.id = mr, t.textContent = ar, (e instanceof Document ? e.head : e).prepend(t);
|
|
2599
|
+
}, _r = w(({ css: e }) => {
|
|
2600
|
+
const t = k(null);
|
|
2601
|
+
return C(() => {
|
|
2602
|
+
const e = t.current?.getRootNode();
|
|
2603
|
+
(e instanceof Document || e instanceof ShadowRoot) && gr(e);
|
|
2604
|
+
}, []), P("style", {
|
|
2605
|
+
ref: t,
|
|
2606
|
+
children: e
|
|
2607
|
+
});
|
|
2608
|
+
});
|
|
2609
|
+
_r.displayName = "ThemeStyle";
|
|
2610
|
+
var vr = g("light");
|
|
2611
|
+
function yr(e) {
|
|
2612
|
+
const { mode: t, fallback: n } = e || {}, o = S(vr), r = "auto" === t, i = r ? void 0 : t, s = r ? "system" : n ?? o, [l, a] = z(() => {
|
|
2613
|
+
if ("light" === i || "dark" === i) return {
|
|
2614
|
+
themeMode: i,
|
|
2577
2615
|
source: "prop"
|
|
2578
2616
|
};
|
|
2579
2617
|
if ("undefined" != typeof document) {
|
|
2580
|
-
const e =
|
|
2618
|
+
const e = wr();
|
|
2581
2619
|
if (e) return {
|
|
2582
2620
|
themeMode: e,
|
|
2583
2621
|
source: "class"
|
|
2584
2622
|
};
|
|
2585
2623
|
}
|
|
2586
|
-
return
|
|
2624
|
+
return br(s);
|
|
2587
2625
|
});
|
|
2588
2626
|
return M(() => {
|
|
2589
2627
|
const e = () => {
|
|
2590
|
-
if (
|
|
2628
|
+
if (i) return void (i === l.themeMode && "prop" === l.source || a((e) => ({
|
|
2591
2629
|
...e,
|
|
2592
|
-
themeMode:
|
|
2630
|
+
themeMode: i,
|
|
2593
2631
|
source: "prop"
|
|
2594
2632
|
})));
|
|
2595
|
-
const e =
|
|
2596
|
-
|
|
2633
|
+
const e = wr();
|
|
2634
|
+
a(e ? {
|
|
2597
2635
|
themeMode: e,
|
|
2598
2636
|
source: "class"
|
|
2599
|
-
} :
|
|
2600
|
-
},
|
|
2601
|
-
for (const e of
|
|
2637
|
+
} : br(s));
|
|
2638
|
+
}, t = new MutationObserver(e), n = [document.documentElement, document.body].filter(Boolean);
|
|
2639
|
+
for (const e of n) t.observe(e, {
|
|
2602
2640
|
attributes: !0,
|
|
2603
2641
|
attributeFilter: ["class"]
|
|
2604
2642
|
});
|
|
2605
|
-
const
|
|
2606
|
-
return
|
|
2607
|
-
|
|
2643
|
+
const o = "system" === s ? window.matchMedia("(prefers-color-scheme: dark)") : null;
|
|
2644
|
+
return o?.addEventListener("change", e), e(), () => {
|
|
2645
|
+
t.disconnect(), o?.removeEventListener("change", e);
|
|
2608
2646
|
};
|
|
2609
|
-
}, [
|
|
2647
|
+
}, [i, s]), l;
|
|
2610
2648
|
}
|
|
2611
|
-
function
|
|
2649
|
+
function br(e) {
|
|
2612
2650
|
return "system" === e ? {
|
|
2613
|
-
themeMode:
|
|
2651
|
+
themeMode: xr(),
|
|
2614
2652
|
source: "media"
|
|
2615
2653
|
} : {
|
|
2616
2654
|
themeMode: e,
|
|
2617
2655
|
source: "fallback"
|
|
2618
2656
|
};
|
|
2619
2657
|
}
|
|
2620
|
-
function
|
|
2658
|
+
function wr() {
|
|
2621
2659
|
if ("undefined" == typeof document) return null;
|
|
2622
2660
|
const e = [...Array.from(document.body.classList), ...document.documentElement ? Array.from(document.documentElement.classList) : []];
|
|
2623
2661
|
return e.includes("dark") ? "dark" : e.includes("light") ? "light" : null;
|
|
2624
2662
|
}
|
|
2625
|
-
function
|
|
2663
|
+
function xr() {
|
|
2626
2664
|
return "undefined" == typeof window ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
2627
2665
|
}
|
|
2628
|
-
|
|
2629
|
-
const { light: t, dark: n, base: o, surfaces: r, mode: i, surface: s, isolate: l = !1, layer: a = "sxl-overrides", children: c } = e, u = yr(), h = T(() => ({
|
|
2630
|
-
...o?.light ?? {},
|
|
2631
|
-
...u?.light ?? {},
|
|
2632
|
-
...t ?? {}
|
|
2633
|
-
}), [
|
|
2634
|
-
o?.light,
|
|
2635
|
-
u?.light,
|
|
2636
|
-
t
|
|
2637
|
-
]), d = T(() => ({
|
|
2638
|
-
...o?.dark ?? {},
|
|
2639
|
-
...u?.dark ?? {},
|
|
2640
|
-
...n ?? {}
|
|
2641
|
-
}), [
|
|
2642
|
-
o?.dark,
|
|
2643
|
-
u?.dark,
|
|
2644
|
-
n
|
|
2645
|
-
]), p = dr("token", E()), { themeMode: m } = pr("light" === i || "dark" === i ? { mode: i } : { fallback: "system" }), g = void 0 === i ? void 0 : "auto" === i ? m : i, _ = g ?? u?.mode, v = T(() => ar({
|
|
2646
|
-
app: {
|
|
2647
|
-
light: h,
|
|
2648
|
-
dark: d
|
|
2649
|
-
},
|
|
2650
|
-
surfaces: r,
|
|
2651
|
-
layer: a,
|
|
2652
|
-
scope: l ? `.${p}` : void 0
|
|
2653
|
-
}), [
|
|
2654
|
-
h,
|
|
2655
|
-
d,
|
|
2656
|
-
r,
|
|
2657
|
-
a,
|
|
2658
|
-
l,
|
|
2659
|
-
p
|
|
2660
|
-
]), y = T(() => ({
|
|
2661
|
-
scopeClass: l ? p : void 0,
|
|
2662
|
-
mode: _,
|
|
2663
|
-
light: h,
|
|
2664
|
-
dark: d
|
|
2665
|
-
}), [
|
|
2666
|
-
l,
|
|
2667
|
-
p,
|
|
2668
|
-
_,
|
|
2669
|
-
h,
|
|
2670
|
-
d
|
|
2671
|
-
]), b = R("style", { children: v }), w = {};
|
|
2672
|
-
g && (w[cr] = g), s && (w[ur] = s);
|
|
2673
|
-
let x = c;
|
|
2674
|
-
if (l || Object.keys(w).length > 0) {
|
|
2675
|
-
const e = f.Children.only(c);
|
|
2676
|
-
l && (w.className = [p, e.props?.className].filter(Boolean).join(" ") || void 0), x = f.cloneElement(e, w);
|
|
2677
|
-
}
|
|
2678
|
-
return $(vr.Provider, {
|
|
2679
|
-
value: y,
|
|
2680
|
-
children: [b, x]
|
|
2681
|
-
});
|
|
2682
|
-
};
|
|
2683
|
-
function wr(e, t) {
|
|
2666
|
+
function Sr(e, t) {
|
|
2684
2667
|
if (!e || "undefined" == typeof getComputedStyle) return;
|
|
2685
|
-
const n = getComputedStyle(e).getPropertyValue(
|
|
2668
|
+
const n = getComputedStyle(e).getPropertyValue(Er(t)).trim();
|
|
2686
2669
|
return "" === n ? void 0 : n;
|
|
2687
2670
|
}
|
|
2688
|
-
function
|
|
2671
|
+
function Mr(e, t) {
|
|
2689
2672
|
const n = {};
|
|
2690
2673
|
if (!e || "undefined" == typeof getComputedStyle) return n;
|
|
2691
2674
|
const o = getComputedStyle(e);
|
|
2692
2675
|
for (const e of t) {
|
|
2693
|
-
const t = o.getPropertyValue(
|
|
2676
|
+
const t = o.getPropertyValue(Er(e)).trim();
|
|
2694
2677
|
"" !== t && (n[e] = t);
|
|
2695
2678
|
}
|
|
2696
2679
|
return n;
|
|
2697
2680
|
}
|
|
2698
|
-
function
|
|
2681
|
+
function Er(e) {
|
|
2699
2682
|
return e.startsWith("--") ? e : `--sxl-${e}`;
|
|
2700
2683
|
}
|
|
2701
|
-
|
|
2702
|
-
var Mr = g(null), Er = () => {
|
|
2684
|
+
var Cr = g(null), Lr = () => {
|
|
2703
2685
|
const e = (t, n) => {
|
|
2704
2686
|
if (null === n) return;
|
|
2705
2687
|
t.add(n);
|
|
@@ -2762,47 +2744,33 @@ var Mr = g(null), Er = () => {
|
|
|
2762
2744
|
})
|
|
2763
2745
|
};
|
|
2764
2746
|
return r;
|
|
2765
|
-
},
|
|
2747
|
+
}, Tr = () => S(Cr), kr = (e) => {
|
|
2766
2748
|
const t = {};
|
|
2767
|
-
return e ? (e.mode && (t[
|
|
2749
|
+
return e ? (e.mode && (t[hr] = e.mode), e.surface && (t[dr] = e.surface), {
|
|
2768
2750
|
className: e.classes?.length ? e.classes.join(" ") : void 0,
|
|
2769
2751
|
attrs: t
|
|
2770
2752
|
}) : { attrs: t };
|
|
2771
|
-
},
|
|
2753
|
+
}, zr = (e) => {
|
|
2772
2754
|
const t = e?.ownerDocument, n = x((e) => {
|
|
2773
2755
|
if (!t || "undefined" == typeof MutationObserver) return () => {};
|
|
2774
2756
|
const n = new MutationObserver(e);
|
|
2775
2757
|
return n.observe(t.documentElement, {
|
|
2776
2758
|
attributes: !0,
|
|
2777
2759
|
subtree: !0,
|
|
2778
|
-
attributeFilter: [
|
|
2760
|
+
attributeFilter: [hr, dr]
|
|
2779
2761
|
}), () => n.disconnect();
|
|
2780
|
-
}, [t]), o = () => `${e?.closest("[data-sxl-theme-mode]")?.getAttribute("data-sxl-theme-mode") ?? ""}\n${e?.closest("[data-sxl-theme-surface]")?.getAttribute("data-sxl-theme-surface") ?? ""}`, [r, i] =
|
|
2781
|
-
return r && (s[
|
|
2782
|
-
},
|
|
2783
|
-
const e = S(Mr), t = yr();
|
|
2784
|
-
return T(() => {
|
|
2785
|
-
const n = e?.themeScope;
|
|
2786
|
-
return t?.scopeClass || t?.mode ? {
|
|
2787
|
-
classes: t?.scopeClass ? [...n?.classes ?? [], t.scopeClass] : n?.classes,
|
|
2788
|
-
surface: n?.surface,
|
|
2789
|
-
mode: n?.mode ?? t?.mode
|
|
2790
|
-
} : n;
|
|
2791
|
-
}, [
|
|
2792
|
-
e?.themeScope,
|
|
2793
|
-
t?.scopeClass,
|
|
2794
|
-
t?.mode
|
|
2795
|
-
]);
|
|
2796
|
-
}, zr = "_float-popper_1z06c_1", Ar = "_float-popper-grow_1z06c_14", Dr = "_entered_1z06c_22", Pr = [0, 2], Rr = (e) => {
|
|
2762
|
+
}, [t]), o = () => `${e?.closest("[data-sxl-theme-mode]")?.getAttribute("data-sxl-theme-mode") ?? ""}\n${e?.closest("[data-sxl-theme-surface]")?.getAttribute("data-sxl-theme-surface") ?? ""}`, [r, i] = A(n, o, o).split("\n"), s = {};
|
|
2763
|
+
return r && (s[hr] = r), i && (s[dr] = i), s;
|
|
2764
|
+
}, Ar = () => S(Cr)?.themeScope, Dr = "_float-popper_1z06c_1", Pr = "_float-popper-grow_1z06c_14", Rr = "_entered_1z06c_22", $r = [0, 2], Br = (e) => {
|
|
2797
2765
|
const t = "function" == typeof e ? e() : e;
|
|
2798
2766
|
if (!t) return null;
|
|
2799
2767
|
if (1 === t.nodeType) return t;
|
|
2800
2768
|
const n = t.contextElement;
|
|
2801
2769
|
return n && 1 === n.nodeType ? n : null;
|
|
2802
|
-
},
|
|
2803
|
-
const { open: o, children: r, label: i, offsets: s =
|
|
2770
|
+
}, Hr = w(v((t, n) => {
|
|
2771
|
+
const { open: o, children: r, label: i, offsets: s = $r, anchorEl: l, anchorPosition: a, placement: c = "bottom-start", resizeOnOverflow: u = !0, boundary: h, shift: d = !1, transition: f = !0, container: p, zIndex: m, strategy: g = "absolute", themeFrom: _ = "provider", followAnchor: v = !1, style: y, className: b, onMount: w, onOpening: S, onOpen: C, onClosing: T, onClose: A, ...D } = t;
|
|
2804
2772
|
if (Array.isArray(r)) throw new Error("children can not be an array");
|
|
2805
|
-
const
|
|
2773
|
+
const R = jt(w ?? (() => {}), [w]), $ = jt(S ?? (() => {}), [S]), B = jt(C ?? (() => {}), [C]), O = jt(T ?? (() => {}), [T]), I = jt(A ?? (() => {}), [A]), [X, Z] = z(!1), [q, U] = z(!1), [G, J] = z(!1), [Q, ee] = z(), [te, ne] = z(), oe = k(null), re = k(null), { getPortalContainer: ie } = ln(), se = Ar(), le = zr(a ? null : Br(l)), ae = k(h);
|
|
2806
2774
|
ae.current = h;
|
|
2807
2775
|
const ce = !!h, ue = d ? "object" == typeof d ? d.padding ?? 0 : 0 : null, { mainAxis: he, crossAxis: de, alignmentAxis: fe } = Array.isArray(s) ? {
|
|
2808
2776
|
mainAxis: s[1] ?? 0,
|
|
@@ -2812,13 +2780,13 @@ var Mr = g(null), Er = () => {
|
|
|
2812
2780
|
mainAxis: s.mainAxis ?? 0,
|
|
2813
2781
|
crossAxis: s.crossAxis ?? 0,
|
|
2814
2782
|
alignmentAxis: s.alignmentAxis
|
|
2815
|
-
}, pe =
|
|
2816
|
-
const e = () => ae.current?.(), t = [
|
|
2783
|
+
}, pe = L(() => {
|
|
2784
|
+
const e = () => ae.current?.(), t = [K({
|
|
2817
2785
|
mainAxis: he,
|
|
2818
2786
|
crossAxis: de,
|
|
2819
2787
|
alignmentAxis: fe
|
|
2820
|
-
}),
|
|
2821
|
-
if (null !== ue && t.push(
|
|
2788
|
+
}), W(ce ? () => ({ boundary: e() }) : { rootBoundary: "document" })];
|
|
2789
|
+
if (null !== ue && t.push(V(() => ({
|
|
2822
2790
|
boundary: e(),
|
|
2823
2791
|
padding: ue
|
|
2824
2792
|
}))), u) {
|
|
@@ -2828,7 +2796,7 @@ var Mr = g(null), Er = () => {
|
|
|
2828
2796
|
const o = Math.max(0, Math.round(t - 10));
|
|
2829
2797
|
ne((e) => e === o ? e : o);
|
|
2830
2798
|
};
|
|
2831
|
-
t.push(
|
|
2799
|
+
t.push(j(ce ? () => ({
|
|
2832
2800
|
boundary: e(),
|
|
2833
2801
|
apply: n
|
|
2834
2802
|
}) : {
|
|
@@ -2844,16 +2812,16 @@ var Mr = g(null), Er = () => {
|
|
|
2844
2812
|
fe,
|
|
2845
2813
|
ce,
|
|
2846
2814
|
ue
|
|
2847
|
-
]), me =
|
|
2815
|
+
]), me = L(() => ({
|
|
2848
2816
|
getBoundingClientRect: () => {
|
|
2849
2817
|
if (a) return new DOMRect(a.left || 0, a.top || 0, 0, 0);
|
|
2850
2818
|
const e = (("function" == typeof l ? l() : l) ?? null)?.getBoundingClientRect?.();
|
|
2851
2819
|
return e && (e.width || e.height || e.x || e.y) ? (re.current = e, e) : re.current ?? new DOMRect(0, 0, 0, 0);
|
|
2852
2820
|
},
|
|
2853
2821
|
get contextElement() {
|
|
2854
|
-
if (!a) return
|
|
2822
|
+
if (!a) return Br(l) ?? void 0;
|
|
2855
2823
|
}
|
|
2856
|
-
}), [a, l]), ge =
|
|
2824
|
+
}), [a, l]), ge = L(() => v ? (e, t, n) => F(e, t, n, { animationFrame: !0 }) : F, [v]), { refs: _e, floatingStyles: ve, isPositioned: ye, placement: be, update: we } = Y({
|
|
2857
2825
|
placement: c,
|
|
2858
2826
|
strategy: g,
|
|
2859
2827
|
middleware: pe,
|
|
@@ -2862,47 +2830,47 @@ var Mr = g(null), Er = () => {
|
|
|
2862
2830
|
}), xe = x((e) => {
|
|
2863
2831
|
oe.current = e, _e.setFloating(e);
|
|
2864
2832
|
}, [_e]);
|
|
2865
|
-
|
|
2833
|
+
E(n, () => ({
|
|
2866
2834
|
instance: () => oe.current ? { update: we } : null,
|
|
2867
2835
|
element: () => oe.current
|
|
2868
2836
|
}), [we]), M(() => {
|
|
2869
2837
|
o && Z(!0);
|
|
2870
2838
|
}, [o]), M(() => {
|
|
2871
|
-
|
|
2839
|
+
X && ye && !q && (U(!0), R?.(oe.current, { update: we }));
|
|
2872
2840
|
}, [
|
|
2873
|
-
|
|
2841
|
+
X,
|
|
2874
2842
|
ye,
|
|
2875
2843
|
q
|
|
2876
2844
|
]), M(() => {
|
|
2877
|
-
o && q ? $?.() : !o &&
|
|
2845
|
+
o && q ? $?.() : !o && X && O?.();
|
|
2878
2846
|
}, [o, q]), M(() => {
|
|
2879
|
-
if (
|
|
2847
|
+
if (X && q && o) {
|
|
2880
2848
|
if (!f) return J(!0), void B?.();
|
|
2881
2849
|
const e = requestAnimationFrame(() => J(!0));
|
|
2882
2850
|
return () => cancelAnimationFrame(e);
|
|
2883
2851
|
}
|
|
2884
2852
|
}, [
|
|
2885
|
-
|
|
2853
|
+
X,
|
|
2886
2854
|
q,
|
|
2887
2855
|
o,
|
|
2888
2856
|
f
|
|
2889
2857
|
]), M(() => {
|
|
2890
|
-
!o &&
|
|
2891
|
-
}, [o,
|
|
2892
|
-
const Se =
|
|
2858
|
+
!o && X && (J(!1), Z(!1), U(!1), I?.());
|
|
2859
|
+
}, [o, X]);
|
|
2860
|
+
const Se = jt((e) => {
|
|
2893
2861
|
e.target === e.currentTarget && o && G && B?.();
|
|
2894
2862
|
}, [o, G]);
|
|
2895
|
-
if (!
|
|
2896
|
-
const Me = (be ?? c).startsWith("bottom") ? "left top" : "center bottom", { className: Ee, attrs: Ce } =
|
|
2863
|
+
if (!X) return null;
|
|
2864
|
+
const Me = (be ?? c).startsWith("bottom") ? "left top" : "center bottom", { className: Ee, attrs: Ce } = kr(se);
|
|
2897
2865
|
let Le;
|
|
2898
2866
|
Le = "anchor" === _ ? {
|
|
2899
2867
|
...Ce,
|
|
2900
2868
|
...le
|
|
2901
2869
|
} : Ee || Ce["data-sxl-theme-mode"] || Ce["data-sxl-theme-surface"] ? Ce : le;
|
|
2902
|
-
const Te = m ??
|
|
2903
|
-
return H(
|
|
2870
|
+
const Te = m ?? Xo("popup"), ke = r || e.EmptyArray;
|
|
2871
|
+
return H(P("div", {
|
|
2904
2872
|
ref: xe,
|
|
2905
|
-
className:
|
|
2873
|
+
className: N(Dr, b, Ee),
|
|
2906
2874
|
role: void 0,
|
|
2907
2875
|
"data-placement": be ?? c,
|
|
2908
2876
|
...Le,
|
|
@@ -2910,49 +2878,49 @@ var Mr = g(null), Er = () => {
|
|
|
2910
2878
|
...ve,
|
|
2911
2879
|
maxHeight: u ? Q : void 0,
|
|
2912
2880
|
maxWidth: u ? te : void 0,
|
|
2913
|
-
zIndex: o ? Te :
|
|
2914
|
-
pointerEvents:
|
|
2881
|
+
zIndex: o ? Te : Zo(Te, -1),
|
|
2882
|
+
pointerEvents: X && o ? void 0 : "none",
|
|
2915
2883
|
...y
|
|
2916
2884
|
},
|
|
2917
2885
|
...D,
|
|
2918
|
-
children: f ?
|
|
2919
|
-
className:
|
|
2886
|
+
children: f ? P("div", {
|
|
2887
|
+
className: N(Pr, { [Rr]: G }),
|
|
2920
2888
|
style: { transformOrigin: Me },
|
|
2921
2889
|
onTransitionEnd: Se,
|
|
2922
2890
|
children: ke
|
|
2923
2891
|
}) : ke
|
|
2924
2892
|
}), p ?? ie());
|
|
2925
2893
|
}));
|
|
2926
|
-
|
|
2927
|
-
var
|
|
2894
|
+
Hr.displayName = "FloatPopper";
|
|
2895
|
+
var Or = "_float-popup_juap7_1", Ir = (e) => {
|
|
2928
2896
|
const { closeFloat: t, closeFloatAll: n, floatReference: o, popupContainer: r, children: i, className: s, ...l } = e;
|
|
2929
|
-
return
|
|
2930
|
-
className:
|
|
2897
|
+
return P("div", {
|
|
2898
|
+
className: N("sxl-menu", Or, s),
|
|
2931
2899
|
...l,
|
|
2932
2900
|
children: i
|
|
2933
2901
|
});
|
|
2934
|
-
},
|
|
2935
|
-
const { floatReference: n, popupContainer: o, renderPopupPanel: r =
|
|
2902
|
+
}, Nr = "_float-panel_qj0za_1", Fr = w(v((e, t) => {
|
|
2903
|
+
const { floatReference: n, popupContainer: o, renderPopupPanel: r = Ir, children: i, className: s, ...l } = e, a = {
|
|
2936
2904
|
popupContainer: o,
|
|
2937
2905
|
floatReference: n,
|
|
2938
2906
|
children: i,
|
|
2939
2907
|
...l
|
|
2940
2908
|
};
|
|
2941
|
-
return
|
|
2909
|
+
return P("div", {
|
|
2942
2910
|
ref: t,
|
|
2943
|
-
className:
|
|
2911
|
+
className: N(Nr, s),
|
|
2944
2912
|
tabIndex: 0,
|
|
2945
|
-
children:
|
|
2913
|
+
children: P(Po, {
|
|
2946
2914
|
render: r,
|
|
2947
2915
|
props: a
|
|
2948
2916
|
})
|
|
2949
2917
|
});
|
|
2950
2918
|
}));
|
|
2951
|
-
|
|
2952
|
-
var
|
|
2953
|
-
const { open: n, anchorEl: o, anchorPosition: r, label: i, floatReference: s, renderPopupPanel: l =
|
|
2919
|
+
Fr.displayName = "FloatPanelSurface";
|
|
2920
|
+
var Wr = w(v((e, t) => {
|
|
2921
|
+
const { open: n, anchorEl: o, anchorPosition: r, label: i, floatReference: s, renderPopupPanel: l = Ir, propsPopper: a, onMount: c, onClosing: u, onClose: h, onOpening: d, onOpen: f, children: p, className: m, ...g } = e, _ = jt(u ?? (() => {}), [u]), v = jt(h ?? (() => {}), [h]), y = jt(d ?? (() => {}), [d]), b = jt(f ?? (() => {}), [f]), [w, x] = z(), S = k(null), M = jt((e, t) => {
|
|
2954
2922
|
x(e), c?.(S.current, t);
|
|
2955
|
-
}, [c]), E =
|
|
2923
|
+
}, [c]), E = L(() => P(Fr, {
|
|
2956
2924
|
ref: S,
|
|
2957
2925
|
className: m,
|
|
2958
2926
|
floatReference: s,
|
|
@@ -2966,7 +2934,7 @@ var Nr = w(v((e, t) => {
|
|
|
2966
2934
|
w,
|
|
2967
2935
|
s
|
|
2968
2936
|
]);
|
|
2969
|
-
return
|
|
2937
|
+
return P(Hr, {
|
|
2970
2938
|
ref: t,
|
|
2971
2939
|
anchorEl: o,
|
|
2972
2940
|
anchorPosition: r,
|
|
@@ -2981,9 +2949,9 @@ var Nr = w(v((e, t) => {
|
|
|
2981
2949
|
children: E
|
|
2982
2950
|
});
|
|
2983
2951
|
}));
|
|
2984
|
-
|
|
2985
|
-
var
|
|
2986
|
-
const { renderFloatPanel: t, renderPopupPanel: n, propsFloatPanel: o, themeScopeClass: r, themeSurface: i, themeMode: s, isolate: l, rootRef: a, children: c } = e, u = S(
|
|
2952
|
+
Wr.displayName = "FloatPanel";
|
|
2953
|
+
var Kr = (e) => P(Wr, { ...e }), Vr = (e) => {
|
|
2954
|
+
const { renderFloatPanel: t, renderPopupPanel: n, propsFloatPanel: o, themeScopeClass: r, themeSurface: i, themeMode: s, isolate: l, rootRef: a, children: c } = e, u = S(Cr), h = L(() => {
|
|
2987
2955
|
const e = u?.themeScope, l = r ? [...e?.classes ?? [], r] : e?.classes, a = i ?? e?.surface, c = s ?? e?.mode, h = l?.length || a || c ? {
|
|
2988
2956
|
classes: l,
|
|
2989
2957
|
surface: a,
|
|
@@ -3003,15 +2971,15 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3003
2971
|
i,
|
|
3004
2972
|
s,
|
|
3005
2973
|
u
|
|
3006
|
-
]), d =
|
|
3007
|
-
let f =
|
|
2974
|
+
]), d = Ct();
|
|
2975
|
+
let f = P(Cr.Provider, {
|
|
3008
2976
|
value: h,
|
|
3009
2977
|
children: c
|
|
3010
2978
|
});
|
|
3011
|
-
const p = l || !d, m =
|
|
3012
|
-
p && null === m.current && (m.current =
|
|
2979
|
+
const p = l || !d, m = k(null);
|
|
2980
|
+
p && null === m.current && (m.current = Lr());
|
|
3013
2981
|
const g = p ? m.current : null;
|
|
3014
|
-
g && (f =
|
|
2982
|
+
g && (f = P(Et, {
|
|
3015
2983
|
value: g,
|
|
3016
2984
|
children: f
|
|
3017
2985
|
}));
|
|
@@ -3023,51 +2991,51 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3023
2991
|
a.current = null;
|
|
3024
2992
|
});
|
|
3025
2993
|
}, [a, _]), f;
|
|
3026
|
-
},
|
|
3027
|
-
const { anchor: t, autoFocus: n = !0, disableClickAway: o = !1, label: r = null, parentFloat: i = null, onOpen: s, onClose: l, propsPopper: a, renderPopupPanel: c, renderFloatPanel: u } = e ?? {}, h =
|
|
2994
|
+
}, jr = (e) => {
|
|
2995
|
+
const { anchor: t, autoFocus: n = !0, disableClickAway: o = !1, label: r = null, parentFloat: i = null, onOpen: s, onClose: l, propsPopper: a, renderPopupPanel: c, renderFloatPanel: u } = e ?? {}, h = jt(s ?? (() => {}), [s]), d = jt(l ?? (() => {}), [l]), f = Tr(), p = u ?? f?.renderFloatPanel ?? Kr, m = void 0 === c ? f?.renderPopupPanel ?? Ir : c, g = Ct(), [_, v] = z(null), [y, b] = z(!1), [w, S] = z(!1), E = L(() => i ?? g ?? Lr(), []), C = L(() => E.getRoot(), []), A = L(() => ({ label: r }), []), D = k(null), R = k(t);
|
|
3028
2996
|
M(() => {
|
|
3029
|
-
|
|
2997
|
+
R.current = t;
|
|
3030
2998
|
}, [t]);
|
|
3031
2999
|
const $ = (e) => {
|
|
3032
3000
|
const t = C.floatByParents.get(e);
|
|
3033
3001
|
let n = null;
|
|
3034
3002
|
return t && (n = C.statesByMovables.get(t)?.close(0) ?? null), n;
|
|
3035
|
-
}, B = () => $(G.key), [
|
|
3003
|
+
}, B = () => $(G.key), [H, O] = z(null), I = () => {
|
|
3036
3004
|
if (!_) return V(), null;
|
|
3037
3005
|
const e = new Promise((e) => {
|
|
3038
|
-
|
|
3006
|
+
O((t) => [...t ?? [], { resolve: e }]);
|
|
3039
3007
|
});
|
|
3040
3008
|
return B(), C.floatByParents.delete(E.key), v(!1), e;
|
|
3041
3009
|
};
|
|
3042
3010
|
M(() => {
|
|
3043
|
-
if (
|
|
3044
|
-
for (const e of
|
|
3045
|
-
|
|
3011
|
+
if (H) {
|
|
3012
|
+
for (const e of H) e.resolve();
|
|
3013
|
+
O(null);
|
|
3046
3014
|
}
|
|
3047
3015
|
}, [
|
|
3048
3016
|
y,
|
|
3049
3017
|
w,
|
|
3050
|
-
|
|
3018
|
+
H
|
|
3051
3019
|
]);
|
|
3052
3020
|
const N = x(() => {
|
|
3053
3021
|
let e = E;
|
|
3054
3022
|
for (; e.parent;) e = e.parent;
|
|
3055
3023
|
return $(e.key);
|
|
3056
|
-
}, []), F =
|
|
3024
|
+
}, []), F = k(null), W = () => {
|
|
3057
3025
|
if (_) return void V();
|
|
3058
3026
|
E && C.statesByMovables.get(E.key)?.open(0);
|
|
3059
3027
|
const e = C.floatByParents.get(E.key);
|
|
3060
|
-
e && e !==
|
|
3028
|
+
e && e !== A && C.statesByMovables.get(e)?.close(0);
|
|
3061
3029
|
const t = document.activeElement;
|
|
3062
3030
|
t && t !== document.body && "function" == typeof t.focus && (F.current = t), requestAnimationFrame(() => {
|
|
3063
3031
|
C.floatByParents.set(E.key, G.key), v(!0);
|
|
3064
3032
|
});
|
|
3065
|
-
}, [K, V] =
|
|
3033
|
+
}, [K, V] = T((e) => e + 1, 0), j = x((e) => null === m ? null : m({
|
|
3066
3034
|
closeFloat: Z,
|
|
3067
3035
|
closeFloatAll: U,
|
|
3068
3036
|
...e
|
|
3069
|
-
}), [m]), Y = null === m, X =
|
|
3070
|
-
key:
|
|
3037
|
+
}), [m]), Y = null === m, X = jt((e = 120) => C.debounce(e, W, /* @__PURE__ */ new Set([G]), !1)(), [W]), Z = jt((e = 60) => C.debounce(e, I, C.descendants(G), !0)(), [I]), q = jt((e = 360) => C.debounce(e, B, C.descendants(C.getChildRef(G)), !0)(), [B]), U = jt(N, [N]), G = L(() => ({
|
|
3038
|
+
key: A,
|
|
3071
3039
|
isRoot: !1,
|
|
3072
3040
|
label: r,
|
|
3073
3041
|
parent: E,
|
|
@@ -3083,19 +3051,19 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3083
3051
|
closeAll: U,
|
|
3084
3052
|
getRoot: () => C,
|
|
3085
3053
|
floatElement: () => D.current,
|
|
3086
|
-
anchorElement: () =>
|
|
3054
|
+
anchorElement: () => R.current
|
|
3087
3055
|
}), []);
|
|
3088
3056
|
M(() => {
|
|
3089
|
-
C.statesByMovables.set(
|
|
3057
|
+
C.statesByMovables.set(A, G);
|
|
3090
3058
|
}, [G]), M(() => () => {
|
|
3091
|
-
C.statesByMovables.delete(
|
|
3059
|
+
C.statesByMovables.delete(A), Z(0);
|
|
3092
3060
|
}, []), M(() => {
|
|
3093
3061
|
_ && !Y && (b(!0), E.onChildVisible());
|
|
3094
3062
|
}, [_, Y]), M(() => {
|
|
3095
3063
|
if (_ && !Y) return C.addOpenPopup(G);
|
|
3096
3064
|
}, [_, Y]);
|
|
3097
|
-
const
|
|
3098
|
-
e.which ===
|
|
3065
|
+
const Q = x((e) => {
|
|
3066
|
+
e.which === J.Escape && (e.preventDefault(), e.stopPropagation(), Z(0));
|
|
3099
3067
|
}, []), ee = x(() => {
|
|
3100
3068
|
const e = F.current, t = D.current;
|
|
3101
3069
|
e && t && (requestAnimationFrame(() => {
|
|
@@ -3113,11 +3081,11 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3113
3081
|
requestAnimationFrame(() => {
|
|
3114
3082
|
e.contains(document.activeElement) || t === document.activeElement && e.focus();
|
|
3115
3083
|
});
|
|
3116
|
-
}, [n]), [ne, oe] =
|
|
3084
|
+
}, [n]), [ne, oe] = z();
|
|
3117
3085
|
M(() => {
|
|
3118
|
-
Y && (_ ? h?.() : !1 === _ && d?.()), oe(y ?
|
|
3086
|
+
Y && (_ ? h?.() : !1 === _ && d?.()), oe(y ? P(Et, {
|
|
3119
3087
|
value: G,
|
|
3120
|
-
children:
|
|
3088
|
+
children: P(Po, {
|
|
3121
3089
|
render: p,
|
|
3122
3090
|
props: {
|
|
3123
3091
|
...f?.propsFloatPanel,
|
|
@@ -3134,7 +3102,7 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3134
3102
|
},
|
|
3135
3103
|
onMount: te,
|
|
3136
3104
|
propsPopper: {
|
|
3137
|
-
onKeyDown:
|
|
3105
|
+
onKeyDown: Q,
|
|
3138
3106
|
onMouseEnter: (e) => {
|
|
3139
3107
|
_ && C.lastDebounced?.isClose && C.lastDebounced.setReferences.has(G) && (C.lastDebounced.fn.clear(), C.lastDebounced = null, G.closeChild());
|
|
3140
3108
|
},
|
|
@@ -3155,7 +3123,7 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3155
3123
|
f?.propsFloatPanel,
|
|
3156
3124
|
K
|
|
3157
3125
|
]);
|
|
3158
|
-
const re =
|
|
3126
|
+
const re = jt((e) => {
|
|
3159
3127
|
if (0 === C.floatByParents.size) return;
|
|
3160
3128
|
let t = !1;
|
|
3161
3129
|
const n = e.composedPath?.() ?? [], r = (t) => !!t && (n.length > 0 ? n.includes(t) : !!t.contains?.(e.target));
|
|
@@ -3181,16 +3149,16 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3181
3149
|
reference: G,
|
|
3182
3150
|
isOpen: !0 === _
|
|
3183
3151
|
};
|
|
3184
|
-
},
|
|
3185
|
-
const { onPointerDown: t, style: n, splitDirection: o, paddingBefore: r = 0, paddingAfter: i = 0, disabled: s, key: l, propsHitArea: a =
|
|
3186
|
-
return
|
|
3152
|
+
}, Yr = {}, Xr = (e) => {
|
|
3153
|
+
const { onPointerDown: t, style: n, splitDirection: o, paddingBefore: r = 0, paddingAfter: i = 0, disabled: s, key: l, propsHitArea: a = Yr, ...c } = e, u = "row" === o, { style: h, className: d, ...f } = a;
|
|
3154
|
+
return P("div", {
|
|
3187
3155
|
style: {
|
|
3188
3156
|
...n,
|
|
3189
3157
|
position: "relative"
|
|
3190
3158
|
},
|
|
3191
3159
|
...c,
|
|
3192
|
-
children:
|
|
3193
|
-
className:
|
|
3160
|
+
children: P("div", {
|
|
3161
|
+
className: N("sxl-hit-box", d),
|
|
3194
3162
|
style: {
|
|
3195
3163
|
left: (u ? -r : 0) + "px",
|
|
3196
3164
|
width: `calc(100% + ${u ? r + i : 0}px)`,
|
|
@@ -3203,7 +3171,7 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3203
3171
|
...f
|
|
3204
3172
|
})
|
|
3205
3173
|
}, l);
|
|
3206
|
-
},
|
|
3174
|
+
}, Zr = {}, qr = (e, t, n = !0) => null === e ? null : null !== e.pixels ? n ? e.pixels : t - e.pixels : (n ? e.percent : 100 - e.percent) / 100 * t, Ur = (e, t = !0) => e?.percent ? `${t ? e.percent : 100 - e.percent}%` : e?.pixels ? `${e.pixels}px` : void 0, Gr = (e, t) => {
|
|
3207
3175
|
if (null == e) return null;
|
|
3208
3176
|
const n = {
|
|
3209
3177
|
percent: null,
|
|
@@ -3211,31 +3179,31 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3211
3179
|
};
|
|
3212
3180
|
let o = t;
|
|
3213
3181
|
return "string" == typeof e && ((e = e.trim().toLowerCase()).endsWith("px") ? (e = e.substring(0, e.length - 2), o = !1) : e.endsWith("%") && (e = e.substring(0, e.length - 1), o = !0), e = parseFloat(e)), o ? n.percent = e : n.pixels = e, Object.freeze(n);
|
|
3214
|
-
},
|
|
3215
|
-
const { elementBefore: n, elementAfter: o, splitDirection: r = "row", fixedPane: i = null, position: s, onPositionChange: l, minBefore: a, maxBefore: c, minAfter: u, maxAfter: h, children: d, className: f, style: p, disabled: m = !1, onDragStart: g, onDragResize: _, onDragFinish: v, propsResizer: b =
|
|
3182
|
+
}, Jr = w(v((e, t) => {
|
|
3183
|
+
const { elementBefore: n, elementAfter: o, splitDirection: r = "row", fixedPane: i = null, position: s, onPositionChange: l, minBefore: a, maxBefore: c, minAfter: u, maxAfter: h, children: d, className: f, style: p, disabled: m = !1, onDragStart: g, onDragResize: _, onDragFinish: v, propsResizer: b = Zr, propsPane: w = Zr, propsPaneBefore: x = Zr, propsPaneAfter: S = Zr, renderResizer: E = Xr } = e;
|
|
3216
3184
|
if (d) throw new Error("Use elementBefore and elementAfter instead of children.");
|
|
3217
|
-
const C =
|
|
3185
|
+
const C = L(() => y(o) && y(n), [o, n]), T = L(() => {
|
|
3218
3186
|
let e = null;
|
|
3219
3187
|
i && ("before" === i ? e = 0 : "after" === i && (e = 1));
|
|
3220
3188
|
const t = null === e;
|
|
3221
3189
|
return {
|
|
3222
3190
|
fixedPaneOffset: e,
|
|
3223
3191
|
isPercent: t,
|
|
3224
|
-
minBefore:
|
|
3225
|
-
maxBefore:
|
|
3226
|
-
minAfter:
|
|
3227
|
-
maxAfter:
|
|
3192
|
+
minBefore: Gr(a, t),
|
|
3193
|
+
maxBefore: Gr(c, t),
|
|
3194
|
+
minAfter: Gr(u, t),
|
|
3195
|
+
maxAfter: Gr(h, t)
|
|
3228
3196
|
};
|
|
3229
3197
|
}, [
|
|
3230
3198
|
a,
|
|
3231
3199
|
c,
|
|
3232
3200
|
u,
|
|
3233
3201
|
h
|
|
3234
|
-
]),
|
|
3202
|
+
]), A = jt(l ?? (() => {}), [l]), [D, $] = z(() => Gr(s, null === i));
|
|
3235
3203
|
M(() => {
|
|
3236
|
-
|
|
3204
|
+
$(Gr(s, null === i));
|
|
3237
3205
|
}, [s, i]);
|
|
3238
|
-
const [B, { width:
|
|
3206
|
+
const [B, { width: H, height: O }] = yo(), [F, { width: W, height: K }] = yo(), V = "row" === r ? W : K, j = "row" === r ? H : O, Y = L(() => ((e, t, n, o) => {
|
|
3239
3207
|
const r = [null, null], i = [null, null];
|
|
3240
3208
|
if (e || (e = {
|
|
3241
3209
|
percent: null === o.fixedPaneOffset ? 50 : null,
|
|
@@ -3243,13 +3211,13 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3243
3211
|
}), 0 === t) return void 0 !== e.pixels && null !== e.pixels ? 1 !== o.fixedPaneOffset ? (r[0] = e.pixels, i[1] = 100) : (r[1] = e.pixels - n, i[0] = 100) : void 0 !== e.percent && null !== e.percent && (1 !== o.fixedPaneOffset ? (i[0] = e.percent, i[1] = 100 - e.percent) : (i[1] = e.percent, i[0] = 100 - e.percent)), {
|
|
3244
3212
|
percents: i,
|
|
3245
3213
|
pixels: r,
|
|
3246
|
-
minBefore:
|
|
3247
|
-
maxBefore:
|
|
3248
|
-
minAfter:
|
|
3249
|
-
maxAfter:
|
|
3214
|
+
minBefore: Ur(o.minBefore, !0),
|
|
3215
|
+
maxBefore: Ur(o.maxBefore, !0),
|
|
3216
|
+
minAfter: Ur(o.minAfter),
|
|
3217
|
+
maxAfter: Ur(o.maxAfter)
|
|
3250
3218
|
};
|
|
3251
|
-
let s =
|
|
3252
|
-
u = (
|
|
3219
|
+
let s = qr(e, t, 1 !== o.fixedPaneOffset) ?? 0, l = t - n, a = qr(o.minBefore, l, !0) ?? 0, c = qr(o.maxBefore, l, !0) ?? l, u = 0, h = 0, d = 0, f = l;
|
|
3220
|
+
u = (qr(o.maxAfter, t, !1) ?? n) - n, h = qr(o.minAfter, t, !1) ?? t, d = Math.max(a, u), f = Math.min(c, h), s = Math.max(d, Math.min(s, f)), h = Math.min(l - s, qr(o.maxAfter, l - s, !0) ?? l), u = Math.min(l - s, qr(o.minAfter, l - s, !0) ?? l), r[0] = s, r[1] = l - s;
|
|
3253
3221
|
const p = Math.max(0, Math.min(100, s / l * 100));
|
|
3254
3222
|
return i[0] = p, i[1] = 100 - p, {
|
|
3255
3223
|
percents: i,
|
|
@@ -3259,13 +3227,13 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3259
3227
|
maxBefore: `${r[0]}px`,
|
|
3260
3228
|
maxAfter: `${r[1]}px`
|
|
3261
3229
|
};
|
|
3262
|
-
})(D, j, V,
|
|
3263
|
-
|
|
3230
|
+
})(D, j, V, T), [
|
|
3231
|
+
T,
|
|
3264
3232
|
D,
|
|
3265
3233
|
j,
|
|
3266
3234
|
V,
|
|
3267
3235
|
r
|
|
3268
|
-
]), [X, Z] =
|
|
3236
|
+
]), [X, Z] = z(!1), q = jt(g ?? (() => {}), [g]), U = jt(_ ?? (() => {}), [_]), G = jt(v ?? (() => {}), [v]), J = k(null), Q = k(null), ee = k(null), { style: te, className: ne, ...oe } = w, re = {
|
|
3269
3237
|
minWidth: 0,
|
|
3270
3238
|
minHeight: 0,
|
|
3271
3239
|
maxWidth: "100%",
|
|
@@ -3282,32 +3250,32 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3282
3250
|
...p,
|
|
3283
3251
|
flexDirection: r,
|
|
3284
3252
|
display: "flex"
|
|
3285
|
-
}, { className: de, style: fe, onPointerDown: pe, ...me } = b, ge =
|
|
3286
|
-
const t =
|
|
3287
|
-
|
|
3288
|
-
}, [i]), _e =
|
|
3253
|
+
}, { className: de, style: fe, onPointerDown: pe, ...me } = b, ge = jt((e) => {
|
|
3254
|
+
const t = Gr(e, null === i);
|
|
3255
|
+
$(t);
|
|
3256
|
+
}, [i]), _e = jt((e) => {
|
|
3289
3257
|
if (m || !X) return;
|
|
3290
3258
|
const t = be.current?.getBoundingClientRect();
|
|
3291
3259
|
let n = 0;
|
|
3292
|
-
n = "row" === r ? (e.clientX ?? e.touches?.[0]?.clientX) - t.x : (e.clientY ?? e.touches?.[0]?.clientY) - t.y, n = Math.max(0, Math.min(j, n)), 1 ===
|
|
3260
|
+
n = "row" === r ? (e.clientX ?? e.touches?.[0]?.clientX) - t.x : (e.clientY ?? e.touches?.[0]?.clientY) - t.y, n = Math.max(0, Math.min(j, n)), 1 === T.fixedPaneOffset && (n = j - n), s && D?.pixels === n || $({
|
|
3293
3261
|
pixels: n,
|
|
3294
3262
|
percent: null
|
|
3295
3263
|
}), U?.(n), e.stopPropagation(), e.preventDefault();
|
|
3296
3264
|
}, [
|
|
3297
|
-
|
|
3265
|
+
T,
|
|
3298
3266
|
r,
|
|
3299
3267
|
m,
|
|
3300
3268
|
X,
|
|
3301
3269
|
D,
|
|
3302
3270
|
j
|
|
3303
|
-
]), ve =
|
|
3271
|
+
]), ve = jt((e) => {
|
|
3304
3272
|
if (document.removeEventListener("pointermove", _e), document.removeEventListener("touchmove", _e), document.removeEventListener("pointerup", ve), X && (Z(!1), D)) {
|
|
3305
|
-
if (G(D.pixels ?? 0), !
|
|
3273
|
+
if (G(D.pixels ?? 0), !Gr(s, null === i) || D.pixels !== s) {
|
|
3306
3274
|
const e = D.pixels ?? 0, t = {
|
|
3307
3275
|
pixels: e,
|
|
3308
3276
|
percent: D.percent ?? e / j * 100
|
|
3309
3277
|
};
|
|
3310
|
-
|
|
3278
|
+
A(t);
|
|
3311
3279
|
}
|
|
3312
3280
|
e.stopPropagation(), e.preventDefault();
|
|
3313
3281
|
}
|
|
@@ -3317,16 +3285,16 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3317
3285
|
s,
|
|
3318
3286
|
i,
|
|
3319
3287
|
j
|
|
3320
|
-
]), ye =
|
|
3288
|
+
]), ye = jt((e) => {
|
|
3321
3289
|
pe?.(e), e.defaultPrevented || m || X || (Z(!0), q(), document.addEventListener("pointermove", _e, { passive: !1 }), document.addEventListener("touchmove", _e, { passive: !1 }), document.addEventListener("pointerup", ve, { passive: !1 }));
|
|
3322
|
-
}, [pe]), be =
|
|
3290
|
+
}, [pe]), be = lo(t, () => ({
|
|
3323
3291
|
setPosition: ge,
|
|
3324
3292
|
isSplitPane: () => !0
|
|
3325
|
-
}), []), we =
|
|
3293
|
+
}), []), we = I([F, Q]), xe = L(() => C ? P(Po, {
|
|
3326
3294
|
render: E,
|
|
3327
3295
|
props: {
|
|
3328
3296
|
ref: we,
|
|
3329
|
-
className:
|
|
3297
|
+
className: N("sxl-resizer", de),
|
|
3330
3298
|
onPointerDownCapture: ye,
|
|
3331
3299
|
style: {
|
|
3332
3300
|
cursor: m ? void 0 : "row" === r ? "ew-resize" : "ns-resize",
|
|
@@ -3349,18 +3317,18 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3349
3317
|
r,
|
|
3350
3318
|
fe,
|
|
3351
3319
|
m
|
|
3352
|
-
]), Se = "row" === r ? "Width" : "Height", Me =
|
|
3320
|
+
]), Se = "row" === r ? "Width" : "Height", Me = L(() => {
|
|
3353
3321
|
if (!n) return null;
|
|
3354
3322
|
const e = {
|
|
3355
3323
|
...re,
|
|
3356
3324
|
...se,
|
|
3357
|
-
flex: 0 ===
|
|
3325
|
+
flex: 0 === T.fixedPaneOffset && null !== Y?.pixels[0] ? `0 0 ${Math.round(Y?.pixels[0] ?? 0)}px` : `1 1 ${Math.round(Y?.percents[0] ?? 100)}%`,
|
|
3358
3326
|
[`min${Se}`]: Y?.minBefore,
|
|
3359
3327
|
[`max${Se}`]: o ? Y?.maxBefore : "100%"
|
|
3360
3328
|
};
|
|
3361
|
-
return
|
|
3329
|
+
return P("div", {
|
|
3362
3330
|
ref: J,
|
|
3363
|
-
className:
|
|
3331
|
+
className: N("sxl-before", ne, ie),
|
|
3364
3332
|
style: e,
|
|
3365
3333
|
...oe,
|
|
3366
3334
|
...le,
|
|
@@ -3370,20 +3338,20 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3370
3338
|
n,
|
|
3371
3339
|
w,
|
|
3372
3340
|
x,
|
|
3373
|
-
|
|
3341
|
+
T,
|
|
3374
3342
|
Y
|
|
3375
|
-
]), Ee =
|
|
3343
|
+
]), Ee = L(() => {
|
|
3376
3344
|
if (!o) return null;
|
|
3377
3345
|
const e = {
|
|
3378
3346
|
...re,
|
|
3379
3347
|
...ce,
|
|
3380
|
-
flex: 1 ===
|
|
3348
|
+
flex: 1 === T.fixedPaneOffset && null !== Y?.pixels[1] ? `0 0 ${Math.round(Y?.pixels[1] ?? 0)}px` : `1 1 ${Math.round(Y?.percents[1] ?? 100)}%`,
|
|
3381
3349
|
[`min${Se}`]: Y?.minAfter,
|
|
3382
3350
|
[`max${Se}`]: n ? Y?.maxAfter : "100%"
|
|
3383
3351
|
};
|
|
3384
|
-
return
|
|
3352
|
+
return P("div", {
|
|
3385
3353
|
ref: ee,
|
|
3386
|
-
className:
|
|
3354
|
+
className: N("sxl-after", ne, ae),
|
|
3387
3355
|
style: e,
|
|
3388
3356
|
...oe,
|
|
3389
3357
|
...ue,
|
|
@@ -3393,12 +3361,12 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3393
3361
|
o,
|
|
3394
3362
|
w,
|
|
3395
3363
|
S,
|
|
3396
|
-
|
|
3364
|
+
T,
|
|
3397
3365
|
Y
|
|
3398
|
-
]), Ce =
|
|
3399
|
-
return
|
|
3366
|
+
]), Ce = I([B, be]);
|
|
3367
|
+
return R("div", {
|
|
3400
3368
|
ref: Ce,
|
|
3401
|
-
className:
|
|
3369
|
+
className: N("sxl-splitPane", "row" === r ? "sxl-vertical" : "sxl-horizontal", { "sxl-dragging": X }, f),
|
|
3402
3370
|
style: he,
|
|
3403
3371
|
children: [
|
|
3404
3372
|
Me,
|
|
@@ -3407,7 +3375,7 @@ var Fr = (e) => R(Nr, { ...e }), Wr = (e) => {
|
|
|
3407
3375
|
]
|
|
3408
3376
|
});
|
|
3409
3377
|
}));
|
|
3410
|
-
function
|
|
3378
|
+
function Qr(e) {
|
|
3411
3379
|
if ("function" == typeof e) return e;
|
|
3412
3380
|
if ("string" == typeof e) {
|
|
3413
3381
|
const t = e.trim();
|
|
@@ -3440,12 +3408,12 @@ function Gr(e) {
|
|
|
3440
3408
|
return null;
|
|
3441
3409
|
}
|
|
3442
3410
|
}(t);
|
|
3443
|
-
if (e) return
|
|
3411
|
+
if (e) return ni(e);
|
|
3444
3412
|
}
|
|
3445
3413
|
if (t.startsWith("<")) {
|
|
3446
|
-
if (/^<\s*svg\b/i.test(t)) return
|
|
3414
|
+
if (/^<\s*svg\b/i.test(t)) return ni(t);
|
|
3447
3415
|
if (/^<\s*path\b/i.test(t)) {
|
|
3448
|
-
const e =
|
|
3416
|
+
const e = ei(t);
|
|
3449
3417
|
if (e) return { paths: [{ d: e }] };
|
|
3450
3418
|
}
|
|
3451
3419
|
return { paths: [{ d: t }] };
|
|
@@ -3457,7 +3425,7 @@ function Gr(e) {
|
|
|
3457
3425
|
for (const n of e) if ("string" == typeof n) {
|
|
3458
3426
|
const e = String(n).trim();
|
|
3459
3427
|
if (e.startsWith("<path")) {
|
|
3460
|
-
const n =
|
|
3428
|
+
const n = ei(e);
|
|
3461
3429
|
n && t.push({ d: n });
|
|
3462
3430
|
} else t.push({ d: e });
|
|
3463
3431
|
} else n && "object" == typeof n && "d" in n && "string" == typeof n.d && t.push({ ...n });
|
|
@@ -3465,14 +3433,14 @@ function Gr(e) {
|
|
|
3465
3433
|
}
|
|
3466
3434
|
return e;
|
|
3467
3435
|
}
|
|
3468
|
-
function
|
|
3436
|
+
function ei(e) {
|
|
3469
3437
|
const t = /\bd\s*=\s*(?:"([^"]+)"|'([^']+)')/i.exec(e);
|
|
3470
3438
|
return t ? t[1] ?? t[2] ?? null : null;
|
|
3471
3439
|
}
|
|
3472
|
-
function
|
|
3440
|
+
function ti(e) {
|
|
3473
3441
|
if ("svg" in e) return {
|
|
3474
3442
|
...e,
|
|
3475
|
-
svg:
|
|
3443
|
+
svg: Qr(e.svg)
|
|
3476
3444
|
};
|
|
3477
3445
|
if ("url" in e) {
|
|
3478
3446
|
const t = "string" == typeof e.url ? { src: e.url } : e.url;
|
|
@@ -3490,7 +3458,7 @@ function Qr(e) {
|
|
|
3490
3458
|
}
|
|
3491
3459
|
return e;
|
|
3492
3460
|
}
|
|
3493
|
-
function
|
|
3461
|
+
function ni(e) {
|
|
3494
3462
|
try {
|
|
3495
3463
|
if ("undefined" != typeof DOMParser) {
|
|
3496
3464
|
const t = new DOMParser().parseFromString(e, "image/svg+xml"), n = t.querySelector("svg")?.getAttribute("viewBox") ?? void 0, o = [];
|
|
@@ -3523,9 +3491,9 @@ function ei(e) {
|
|
|
3523
3491
|
paths: o
|
|
3524
3492
|
};
|
|
3525
3493
|
}
|
|
3526
|
-
function
|
|
3494
|
+
function oi(e) {
|
|
3527
3495
|
const t = {};
|
|
3528
|
-
for (const [n, o] of Object.entries(e.icons)) t[n] =
|
|
3496
|
+
for (const [n, o] of Object.entries(e.icons)) t[n] = ti(o);
|
|
3529
3497
|
const n = {
|
|
3530
3498
|
label: e.meta?.label ?? "Unnamed",
|
|
3531
3499
|
version: e.meta?.version ?? "1.0.0",
|
|
@@ -3542,14 +3510,14 @@ function ti(e) {
|
|
|
3542
3510
|
const e = {};
|
|
3543
3511
|
for (const [t, n] of Object.entries(r)) {
|
|
3544
3512
|
const o = {};
|
|
3545
|
-
for (const [e, t] of Object.entries(n)) o[e] =
|
|
3513
|
+
for (const [e, t] of Object.entries(n)) o[e] = ti(t);
|
|
3546
3514
|
e[t] = o;
|
|
3547
3515
|
}
|
|
3548
3516
|
o.__overrides = e;
|
|
3549
3517
|
}
|
|
3550
3518
|
return o;
|
|
3551
3519
|
}
|
|
3552
|
-
function
|
|
3520
|
+
function ri() {
|
|
3553
3521
|
const e = /* @__PURE__ */ new Map(), t = /* @__PURE__ */ new Map();
|
|
3554
3522
|
let n = "base", o = /* @__PURE__ */ new Map();
|
|
3555
3523
|
async function r(t) {
|
|
@@ -3560,7 +3528,7 @@ function ni() {
|
|
|
3560
3528
|
if (!o.loader) throw new Error(`No loader for icon pack: ${t}`);
|
|
3561
3529
|
o.loading = o.loader().then((e) => {
|
|
3562
3530
|
const t = e && "object" == typeof e && "default" in e ? e.default : e;
|
|
3563
|
-
o.pack =
|
|
3531
|
+
o.pack = oi(t);
|
|
3564
3532
|
}).catch((e) => {
|
|
3565
3533
|
throw o.loading = void 0, e;
|
|
3566
3534
|
});
|
|
@@ -3615,7 +3583,7 @@ function ni() {
|
|
|
3615
3583
|
return {
|
|
3616
3584
|
register: function(t, o) {
|
|
3617
3585
|
const r = e.get(t) ?? {};
|
|
3618
|
-
"function" == typeof o ? r.loader = o : r.pack =
|
|
3586
|
+
"function" == typeof o ? r.loader = o : r.pack = oi(o), e.set(t, r), n || (n = t);
|
|
3619
3587
|
},
|
|
3620
3588
|
prefetch: async function(e = n) {
|
|
3621
3589
|
const t = Array.isArray(e) ? e : [e];
|
|
@@ -3678,25 +3646,25 @@ function ni() {
|
|
|
3678
3646
|
}
|
|
3679
3647
|
};
|
|
3680
3648
|
}
|
|
3681
|
-
|
|
3682
|
-
var
|
|
3683
|
-
|
|
3684
|
-
var
|
|
3649
|
+
Jr.displayName = "SplitPane";
|
|
3650
|
+
var ii = ri();
|
|
3651
|
+
ii.register("base", () => import("./B5pWqSf3jcgyK-cu.mjs")), ii.register("cf", () => import("./VSEK8OvCIKoam06_.mjs"));
|
|
3652
|
+
var si = (e) => P("svg", {
|
|
3685
3653
|
...e,
|
|
3686
|
-
children:
|
|
3687
|
-
}),
|
|
3688
|
-
Icon: "
|
|
3689
|
-
"sxl-walk": "_sxl-
|
|
3690
|
-
},
|
|
3691
|
-
const { iconKey: n, packKey: o, className: r, style: i, role: s, title: l, size: a, ariaHidden: c, propsSource: u, children: h, ...d } = t, [f, p] =
|
|
3654
|
+
children: P("path", {})
|
|
3655
|
+
}), li = {
|
|
3656
|
+
Icon: "_Icon_1cewm_10",
|
|
3657
|
+
"sxl-walk": "_sxl-walk_1cewm_1"
|
|
3658
|
+
}, ai = w((t) => {
|
|
3659
|
+
const { iconKey: n, packKey: o, className: r, style: i, role: s, title: l, size: a, ariaHidden: c, propsSource: u, children: h, ...d } = t, [f, p] = z(null);
|
|
3692
3660
|
M(() => {
|
|
3693
3661
|
let t = !0, r = o, i = n;
|
|
3694
3662
|
if (!i) {
|
|
3695
|
-
const t =
|
|
3663
|
+
const t = ii.getPack(r);
|
|
3696
3664
|
p({
|
|
3697
3665
|
glyph: t ? { svg: e.EmptyArray } : void 0,
|
|
3698
3666
|
pack: t ?? void 0,
|
|
3699
|
-
packKey: r ??
|
|
3667
|
+
packKey: r ?? ii.getActive()
|
|
3700
3668
|
});
|
|
3701
3669
|
return;
|
|
3702
3670
|
}
|
|
@@ -3704,7 +3672,7 @@ var ri = (e) => R("svg", {
|
|
|
3704
3672
|
const [e, t] = i.split(":");
|
|
3705
3673
|
r = e, i = t;
|
|
3706
3674
|
}
|
|
3707
|
-
return
|
|
3675
|
+
return ii.resolve(i, { packKey: r }).then((e) => {
|
|
3708
3676
|
t && p(e);
|
|
3709
3677
|
}).catch(() => {}), () => {
|
|
3710
3678
|
t = !1;
|
|
@@ -3712,14 +3680,14 @@ var ri = (e) => R("svg", {
|
|
|
3712
3680
|
}, [n, o]);
|
|
3713
3681
|
const m = f?.pack, g = f?.glyph, _ = f?.packKey;
|
|
3714
3682
|
let v = g ? g.svg : void 0;
|
|
3715
|
-
const y = g && !v ? g.url : void 0, b = !g || v || y ? void 0 : g.emoji, w = null != a ? "number" == typeof a ? `${a}px` : a : void 0, x =
|
|
3716
|
-
|
|
3683
|
+
const y = g && !v ? g.url : void 0, b = !g || v || y ? void 0 : g.emoji, w = null != a ? "number" == typeof a ? `${a}px` : a : void 0, x = L(() => [
|
|
3684
|
+
li.Icon,
|
|
3717
3685
|
"icon",
|
|
3718
3686
|
r
|
|
3719
|
-
].filter(Boolean).join(" "), [r]), S =
|
|
3687
|
+
].filter(Boolean).join(" "), [r]), S = L(() => {
|
|
3720
3688
|
const e = { ...i };
|
|
3721
3689
|
return e["--icon-size"] = w, e;
|
|
3722
|
-
}, [i, w]), E = s ?? (l ? "img" : "presentation"), C = c ?? (!l || void 0),
|
|
3690
|
+
}, [i, w]), E = s ?? (l ? "img" : "presentation"), C = c ?? (!l || void 0), T = (e) => P("span", {
|
|
3723
3691
|
className: x,
|
|
3724
3692
|
style: S,
|
|
3725
3693
|
role: E,
|
|
@@ -3730,9 +3698,9 @@ var ri = (e) => R("svg", {
|
|
|
3730
3698
|
...d,
|
|
3731
3699
|
children: e
|
|
3732
3700
|
});
|
|
3733
|
-
if (h) return
|
|
3734
|
-
if (b) return
|
|
3735
|
-
if (y) return
|
|
3701
|
+
if (h) return T(h);
|
|
3702
|
+
if (b) return T(P("span", { children: "string" == typeof b ? b : b.text }));
|
|
3703
|
+
if (y) return T(P("img", {
|
|
3736
3704
|
src: y.src,
|
|
3737
3705
|
alt: l ?? ""
|
|
3738
3706
|
}));
|
|
@@ -3746,15 +3714,15 @@ var ri = (e) => R("svg", {
|
|
|
3746
3714
|
...d,
|
|
3747
3715
|
...u
|
|
3748
3716
|
};
|
|
3749
|
-
return
|
|
3717
|
+
return T(P(e, { ...t }));
|
|
3750
3718
|
}
|
|
3751
3719
|
const k = { viewBox: v?.viewBox ?? m?.meta.defaultViewBox ?? "0 0 24 24" };
|
|
3752
|
-
if ("function" == typeof v) return
|
|
3753
|
-
if (!v) return
|
|
3754
|
-
const
|
|
3755
|
-
return
|
|
3720
|
+
if ("function" == typeof v) return T(v(k) ?? P(si, { ...k }));
|
|
3721
|
+
if (!v) return T(P(si, { ...k }));
|
|
3722
|
+
const A = v.paths;
|
|
3723
|
+
return T(P("svg", {
|
|
3756
3724
|
...k,
|
|
3757
|
-
children:
|
|
3725
|
+
children: A ? A.map((e, t) => P("path", {
|
|
3758
3726
|
d: e.d,
|
|
3759
3727
|
className: e.className,
|
|
3760
3728
|
fill: e.fill,
|
|
@@ -3765,8 +3733,8 @@ var ri = (e) => R("svg", {
|
|
|
3765
3733
|
}, t)) : null
|
|
3766
3734
|
}));
|
|
3767
3735
|
});
|
|
3768
|
-
function
|
|
3769
|
-
const { isWalking: t = !1, themedType: n = "primary", speed: o = 120, dashGap: r = 3, dashLength: i = 5, iconKey: s, packKey: l, style: a, className: c, ...u } = e, h =
|
|
3736
|
+
function ci(e) {
|
|
3737
|
+
const { isWalking: t = !1, themedType: n = "primary", speed: o = 120, dashGap: r = 3, dashLength: i = 5, iconKey: s, packKey: l, style: a, className: c, ...u } = e, h = L(() => {
|
|
3770
3738
|
if (!t) return;
|
|
3771
3739
|
const e = {
|
|
3772
3740
|
"--walk-duration": `${o * (r + i)}ms`,
|
|
@@ -3780,8 +3748,8 @@ function li(e) {
|
|
|
3780
3748
|
r,
|
|
3781
3749
|
i,
|
|
3782
3750
|
n
|
|
3783
|
-
]), d =
|
|
3784
|
-
return
|
|
3751
|
+
]), d = L(() => t ? c + " walking" : c, [t, c]);
|
|
3752
|
+
return P(ai, {
|
|
3785
3753
|
iconKey: s,
|
|
3786
3754
|
packKey: l,
|
|
3787
3755
|
className: d,
|
|
@@ -3792,7 +3760,7 @@ function li(e) {
|
|
|
3792
3760
|
...u
|
|
3793
3761
|
});
|
|
3794
3762
|
}
|
|
3795
|
-
var
|
|
3763
|
+
var ui = class {
|
|
3796
3764
|
constructor() {
|
|
3797
3765
|
this.store = /* @__PURE__ */ new Map();
|
|
3798
3766
|
}
|
|
@@ -3805,36 +3773,36 @@ var ai = class {
|
|
|
3805
3773
|
removeItem(e) {
|
|
3806
3774
|
this.store.delete(e);
|
|
3807
3775
|
}
|
|
3808
|
-
},
|
|
3776
|
+
}, hi = g(null), di = Object.freeze({}), fi = {
|
|
3809
3777
|
parse: (e) => e ? JSON.parse(e) : null,
|
|
3810
3778
|
stringify: JSON.stringify
|
|
3811
|
-
},
|
|
3812
|
-
store: new
|
|
3779
|
+
}, pi = /* @__PURE__ */ new Map(), mi = {
|
|
3780
|
+
store: new ui(),
|
|
3813
3781
|
namespace: "",
|
|
3814
|
-
serializer:
|
|
3782
|
+
serializer: fi,
|
|
3815
3783
|
onReady: (e) => {
|
|
3816
3784
|
e();
|
|
3817
3785
|
},
|
|
3818
3786
|
debounceMs: 0,
|
|
3819
|
-
defaultValues:
|
|
3787
|
+
defaultValues: di,
|
|
3820
3788
|
notify: (e, t) => {
|
|
3821
|
-
const n =
|
|
3789
|
+
const n = pi.get(e);
|
|
3822
3790
|
n && n.forEach((e) => e(t));
|
|
3823
3791
|
},
|
|
3824
3792
|
subscribeKey: (e, t) => {
|
|
3825
|
-
const n =
|
|
3826
|
-
return n.add(t),
|
|
3827
|
-
const n =
|
|
3828
|
-
n && (n.delete(t), 0 === n.size &&
|
|
3793
|
+
const n = pi.get(e) ?? /* @__PURE__ */ new Set();
|
|
3794
|
+
return n.add(t), pi.set(e, n), () => {
|
|
3795
|
+
const n = pi.get(e);
|
|
3796
|
+
n && (n.delete(t), 0 === n.size && pi.delete(e));
|
|
3829
3797
|
};
|
|
3830
3798
|
}
|
|
3831
3799
|
};
|
|
3832
|
-
function
|
|
3833
|
-
const { store: o, namespace: r, serializer: i, debounceMs: s, subscribeKey: l, notify: a, defaultValues: c } = S(
|
|
3800
|
+
function gi(e, t, n = _i) {
|
|
3801
|
+
const { store: o, namespace: r, serializer: i, debounceMs: s, subscribeKey: l, notify: a, defaultValues: c } = S(hi) || mi, u = n.serializer ?? i ?? fi, h = k(null), d = L(() => null == e ? null : `${r}:${e}`, [r, e]), f = d ? `${d}::v` : null, p = () => {
|
|
3834
3802
|
if (null != e && Object.prototype.hasOwnProperty.call(c, e)) return c[e];
|
|
3835
3803
|
const n = t;
|
|
3836
3804
|
return "function" == typeof n ? n() : n;
|
|
3837
|
-
}, [m, g] =
|
|
3805
|
+
}, [m, g] = z(() => {
|
|
3838
3806
|
if (null == d) return p();
|
|
3839
3807
|
let e, t = o.getItem(d);
|
|
3840
3808
|
if (null == t) return p();
|
|
@@ -3844,9 +3812,9 @@ function pi(e, t, n = mi) {
|
|
|
3844
3812
|
e = p();
|
|
3845
3813
|
}
|
|
3846
3814
|
return e;
|
|
3847
|
-
}), _ =
|
|
3815
|
+
}), _ = k(m);
|
|
3848
3816
|
_.current = m;
|
|
3849
|
-
const v =
|
|
3817
|
+
const v = k(!1);
|
|
3850
3818
|
M(() => {
|
|
3851
3819
|
null == d && g(p());
|
|
3852
3820
|
}, [d]), M(() => {
|
|
@@ -3901,20 +3869,20 @@ function pi(e, t, n = mi) {
|
|
|
3901
3869
|
M(() => () => {
|
|
3902
3870
|
h.current && clearTimeout(h.current);
|
|
3903
3871
|
}, []);
|
|
3904
|
-
const E =
|
|
3872
|
+
const E = k(b);
|
|
3905
3873
|
E.current = b;
|
|
3906
|
-
const C =
|
|
3874
|
+
const C = k(w);
|
|
3907
3875
|
return C.current = w, [
|
|
3908
3876
|
m,
|
|
3909
3877
|
x((e) => E.current(e), []),
|
|
3910
3878
|
x(() => C.current(), [])
|
|
3911
3879
|
];
|
|
3912
3880
|
}
|
|
3913
|
-
var
|
|
3914
|
-
function
|
|
3915
|
-
const { store: t, namespace: n = "", serializer: o =
|
|
3916
|
-
|
|
3917
|
-
const a = l.current, c =
|
|
3881
|
+
var _i = {};
|
|
3882
|
+
function vi(e) {
|
|
3883
|
+
const { store: t, namespace: n = "", serializer: o = wi, debounceMs: r = 150, defaultValues: i = di, children: s } = e, l = k(i);
|
|
3884
|
+
xi(l.current, i) || (l.current = i);
|
|
3885
|
+
const a = l.current, c = L(() => "undefined" == typeof window ? new ui() : t ?? new ui(), [t]), u = k(/* @__PURE__ */ new Map()), h = L(() => ({
|
|
3918
3886
|
store: c,
|
|
3919
3887
|
namespace: n,
|
|
3920
3888
|
serializer: o,
|
|
@@ -3947,19 +3915,19 @@ function gi(e) {
|
|
|
3947
3915
|
const t = e.slice(h.namespace.length + 1);
|
|
3948
3916
|
h.notify(t);
|
|
3949
3917
|
});
|
|
3950
|
-
}, [h]),
|
|
3918
|
+
}, [h]), P(hi.Provider, {
|
|
3951
3919
|
value: h,
|
|
3952
3920
|
children: s
|
|
3953
3921
|
});
|
|
3954
3922
|
}
|
|
3955
|
-
var
|
|
3923
|
+
var yi, bi, wi = {
|
|
3956
3924
|
parse: (e) => null == e ? null : JSON.parse(e),
|
|
3957
3925
|
stringify: JSON.stringify
|
|
3958
|
-
},
|
|
3926
|
+
}, xi = (e, t) => {
|
|
3959
3927
|
if (e === t) return !0;
|
|
3960
3928
|
const n = Object.keys(e);
|
|
3961
3929
|
return n.length === Object.keys(t).length && n.every((n) => Object.prototype.hasOwnProperty.call(t, n) && Object.is(e[n], t[n]));
|
|
3962
|
-
},
|
|
3930
|
+
}, Si = class {
|
|
3963
3931
|
constructor(e = window.localStorage) {
|
|
3964
3932
|
this.storage = e;
|
|
3965
3933
|
}
|
|
@@ -3986,10 +3954,10 @@ var _i, vi, yi = {
|
|
|
3986
3954
|
};
|
|
3987
3955
|
return window.addEventListener("storage", t), () => window.removeEventListener("storage", t);
|
|
3988
3956
|
}
|
|
3989
|
-
},
|
|
3990
|
-
(
|
|
3991
|
-
let t =
|
|
3992
|
-
t || (t = /* @__PURE__ */ new Set(),
|
|
3957
|
+
}, Mi = /* @__PURE__ */ new WeakMap();
|
|
3958
|
+
(bi = yi || (yi = {})).begin = function(e) {
|
|
3959
|
+
let t = Mi.get(e);
|
|
3960
|
+
t || (t = /* @__PURE__ */ new Set(), Mi.set(e, t));
|
|
3993
3961
|
let n = () => {};
|
|
3994
3962
|
const o = new Promise((e) => {
|
|
3995
3963
|
n = e;
|
|
@@ -4000,52 +3968,52 @@ var _i, vi, yi = {
|
|
|
4000
3968
|
return () => {
|
|
4001
3969
|
r || (r = !0, i.delete(o), n());
|
|
4002
3970
|
};
|
|
4003
|
-
},
|
|
4004
|
-
return (
|
|
3971
|
+
}, bi.isPending = function(e) {
|
|
3972
|
+
return (Mi.get(e)?.size ?? 0) > 0;
|
|
4005
3973
|
};
|
|
4006
|
-
var
|
|
4007
|
-
const t =
|
|
3974
|
+
var Ei = async (e) => {
|
|
3975
|
+
const t = Mi.get(e);
|
|
4008
3976
|
for (; t && t.size > 0;) await Promise.allSettled([...t]);
|
|
4009
|
-
},
|
|
4010
|
-
const n = S(
|
|
3977
|
+
}, Ci = g(null), Li = (e) => f.createElement(Ci.Provider, { value: e.scope }, e.children), Ti = (e, t) => {
|
|
3978
|
+
const n = S(Ci), o = void 0 === t ? n : t;
|
|
4011
3979
|
M(() => {
|
|
4012
|
-
if (o && e) return
|
|
3980
|
+
if (o && e) return yi.begin(o);
|
|
4013
3981
|
}, [o, e]);
|
|
4014
|
-
},
|
|
3982
|
+
}, ki = {
|
|
4015
3983
|
Horizontal: "horizontal",
|
|
4016
3984
|
Vertical: "vertical"
|
|
4017
|
-
},
|
|
4018
|
-
const { style: t, orientation: n =
|
|
4019
|
-
return
|
|
3985
|
+
}, zi = "_scrollbar_z7hk1_1", Ai = "_track_z7hk1_29", Di = "_thumb_z7hk1_41", Pi = "_scrollbar-button_z7hk1_90", Ri = "_touch-thumb_z7hk1_125", $i = "M 5.4951012,0.62494002 7.1746358,3.4734472 8.8557603,6.3226744 c 0.13425,0.2277477 0.18228,0.4945506 0.1356,0.7535218 -0.04665,0.2589712 -0.18504,0.4935661 -0.3908099,0.6625402 C 8.3948254,7.9076371 8.1348905,8.0001761 7.8664506,7.9999997 H 1.1503225 c -0.30278993,0 -0.59312985,-0.117841 -0.80720983,-0.3275159 -0.2140799,-0.2097042 -0.3343649,-0.4941244 -0.3343649,-0.7907107 -4.5e-4,-0.1955399 0.05205,-0.3876855 0.152205,-0.55688 L 1.8390472,3.4734031 3.5178618,0.62488125 C 3.7217717,0.27898385 4.0986166,0.0658413 4.5064365,0.0658413 c 0.4078199,0 0.7846648,0.21314255 0.9885747,0.55903995 z", Bi = "M 0.6632643,3.5136438 3.5117715,1.8341092 6.3609987,0.15298466 c 0.2277477,-0.13425 0.4945506,-0.18228 0.7535218,-0.1356 0.2589712,0.04665 0.4935661,0.18504 0.6625402,0.3908099 0.1689007,0.205725 0.2614397,0.4656599 0.2612633,0.73409984 v 6.7161281 c 0,0.3027899 -0.117841,0.5931298 -0.3275159,0.8072098 -0.2097042,0.2140799 -0.4941244,0.3343649 -0.7907107,0.3343649 -0.1955399,4.5e-4 -0.3876855,-0.05205 -0.55688,-0.152205 L 3.5117274,7.1696978 0.6632056,5.4908832 C 0.31730817,5.2869733 0.10416562,4.9101284 0.10416562,4.5023085 c 0,-0.4078199 0.21314255,-0.7846648 0.55903998,-0.9885747 z", Hi = { transform: "rotate(180deg)" }, Oi = (e) => {
|
|
3986
|
+
const { style: t, orientation: n = ki.Vertical, isBefore: o, disabled: r, ...i } = e, s = n === ki.Vertical ? $i : Bi;
|
|
3987
|
+
return P("button", {
|
|
4020
3988
|
style: t,
|
|
4021
|
-
className:
|
|
3989
|
+
className: N(Pi, `sxl-${n}`, "sxl-scroll-button"),
|
|
4022
3990
|
disabled: r,
|
|
4023
3991
|
...i,
|
|
4024
|
-
children:
|
|
3992
|
+
children: P("svg", {
|
|
4025
3993
|
width: "9",
|
|
4026
3994
|
height: "9",
|
|
4027
3995
|
viewBox: "0 0 9 9",
|
|
4028
|
-
children:
|
|
3996
|
+
children: P("path", { d: s })
|
|
4029
3997
|
})
|
|
4030
3998
|
});
|
|
4031
|
-
},
|
|
4032
|
-
const { style: t, orientation: n =
|
|
4033
|
-
return
|
|
3999
|
+
}, Ii = (e) => {
|
|
4000
|
+
const { style: t, orientation: n = ki.Vertical, isBefore: o, disabled: r, ...i } = e, s = n === ki.Vertical ? $i : Bi;
|
|
4001
|
+
return P("button", {
|
|
4034
4002
|
style: t,
|
|
4035
|
-
className:
|
|
4003
|
+
className: N(Pi, `sxl-${n}`, "sxl-scroll-button"),
|
|
4036
4004
|
disabled: r,
|
|
4037
4005
|
...i,
|
|
4038
|
-
children:
|
|
4006
|
+
children: P("svg", {
|
|
4039
4007
|
width: "9",
|
|
4040
4008
|
height: "9",
|
|
4041
4009
|
viewBox: "0 0 9 9",
|
|
4042
|
-
style:
|
|
4043
|
-
children:
|
|
4010
|
+
style: Hi,
|
|
4011
|
+
children: P("path", { d: s })
|
|
4044
4012
|
})
|
|
4045
4013
|
});
|
|
4046
|
-
},
|
|
4047
|
-
const { style: t, orientation: n =
|
|
4048
|
-
return
|
|
4014
|
+
}, Ni = (e) => {
|
|
4015
|
+
const { style: t, orientation: n = ki.Vertical, isBefore: o, ...r } = e, i = n === ki.Vertical;
|
|
4016
|
+
return P("div", {
|
|
4049
4017
|
style: {
|
|
4050
4018
|
display: "flex",
|
|
4051
4019
|
justifyContent: "center",
|
|
@@ -4058,7 +4026,7 @@ var Si = async (e) => {
|
|
|
4058
4026
|
},
|
|
4059
4027
|
className: `sxl-scrollbar-button ${i ? "sxl-vertical" : "sxl-horizontal"} sxl-edge`,
|
|
4060
4028
|
...r,
|
|
4061
|
-
children:
|
|
4029
|
+
children: P(ai, {
|
|
4062
4030
|
style: {
|
|
4063
4031
|
transition: "opacity 240ms ease 0s",
|
|
4064
4032
|
opacity: e.disabled ? 0 : 1,
|
|
@@ -4068,7 +4036,7 @@ var Si = async (e) => {
|
|
|
4068
4036
|
iconKey: "MoreHorizontal"
|
|
4069
4037
|
})
|
|
4070
4038
|
});
|
|
4071
|
-
},
|
|
4039
|
+
}, Fi = 60, Wi = 260, Ki = 120, Vi = (e) => {
|
|
4072
4040
|
const { vertical: t, getTrackRect: n, getThumb: o, onStart: r, onDragModeChange: i, edgeHoldIntervalMs: s = 60, pageInitialDelayMs: l = 260, pageRepeatDelayMs: a = 120 } = e;
|
|
4073
4041
|
let c = null, u = null, h = 0, d = 0, f = 1, p = 0, m = 0, g = 0, _ = null;
|
|
4074
4042
|
const v = () => {
|
|
@@ -4118,10 +4086,10 @@ var Si = async (e) => {
|
|
|
4118
4086
|
},
|
|
4119
4087
|
dispose: () => v()
|
|
4120
4088
|
};
|
|
4121
|
-
},
|
|
4122
|
-
const [t, n] =
|
|
4089
|
+
}, ji = (e) => {
|
|
4090
|
+
const [t, n] = z(null), o = k(e);
|
|
4123
4091
|
o.current = e;
|
|
4124
|
-
const r =
|
|
4092
|
+
const r = L(() => Vi({
|
|
4125
4093
|
vertical: o.current.vertical,
|
|
4126
4094
|
getTrackRect: () => o.current.getTrackRect(),
|
|
4127
4095
|
getThumb: () => o.current.getThumb(),
|
|
@@ -4137,20 +4105,20 @@ var Si = async (e) => {
|
|
|
4137
4105
|
onPointerUp: r.onPointerUp,
|
|
4138
4106
|
dragMode: t
|
|
4139
4107
|
};
|
|
4140
|
-
},
|
|
4108
|
+
}, Yi = 22, Xi = 1.8, Zi = 8, qi = 4, Ui = 8, Gi = -2, Ji = (e = 22) => e / 2 + 8, Qi = (e = 22) => e + 16, es = g(null), ts = (e) => {
|
|
4141
4109
|
const { value: t, children: n } = e;
|
|
4142
|
-
return
|
|
4110
|
+
return P(es.Provider, {
|
|
4143
4111
|
value: t,
|
|
4144
4112
|
children: n
|
|
4145
4113
|
});
|
|
4146
|
-
},
|
|
4147
|
-
const { borderColor: n = "var(--sxl-color-primary, rgb(33, 115, 70))", backgroundColor: o = "var(--sxl-color-base-100, white)", fillColor: r = "var(--sxl-color-neutral, grey)", borderWidth: i = 3, size: s = 22, style: l, className: a, orientation: c =
|
|
4148
|
-
if (!
|
|
4149
|
-
const _ = c ===
|
|
4114
|
+
}, ns = () => S(es), os = Ne().supportsTouchEvents, rs = (e) => e < 0 ? 0 : e > 1 ? 1 : e, is = w(v((e, t) => {
|
|
4115
|
+
const { borderColor: n = "var(--sxl-color-primary, rgb(33, 115, 70))", backgroundColor: o = "var(--sxl-color-base-100, white)", fillColor: r = "var(--sxl-color-neutral, grey)", borderWidth: i = 3, size: s = 22, style: l, className: a, orientation: c = ki.Vertical, fraction: u = 0, onScrollToFraction: h, onEdgeHold: d, onDraggingChange: f, currentTouchAnchor: p, key: m, ...g } = e;
|
|
4116
|
+
if (!os) return null;
|
|
4117
|
+
const _ = c === ki.Vertical, v = ns(), y = jt(h ?? (() => {}), [h]), b = jt(d ?? (() => {}), [d]), w = jt(f ?? (() => {}), [f]), x = k(null), S = I([x, t]), E = jt((e) => ({
|
|
4150
4118
|
dragging: e,
|
|
4151
4119
|
element: x.current,
|
|
4152
4120
|
source: "touch"
|
|
4153
|
-
}), []), [C,
|
|
4121
|
+
}), []), [C, T] = z(!1), A = k({
|
|
4154
4122
|
isVertical: _,
|
|
4155
4123
|
travel: 0,
|
|
4156
4124
|
startAlong: 0,
|
|
@@ -4164,12 +4132,12 @@ var Si = async (e) => {
|
|
|
4164
4132
|
count: 0,
|
|
4165
4133
|
timer: null
|
|
4166
4134
|
});
|
|
4167
|
-
|
|
4168
|
-
const D =
|
|
4169
|
-
const e =
|
|
4135
|
+
A.current.isVertical = _, A.current.fraction = rs(u), A.current.hasEdgeHold = !!d;
|
|
4136
|
+
const D = jt(() => {
|
|
4137
|
+
const e = A.current;
|
|
4170
4138
|
e.timer && clearTimeout(e.timer), e.timer = null;
|
|
4171
|
-
}, []),
|
|
4172
|
-
const e =
|
|
4139
|
+
}, []), R = jt(() => {
|
|
4140
|
+
const e = A.current;
|
|
4173
4141
|
if (e.timer = null, !e.edge || !e.dragging) return;
|
|
4174
4142
|
e.count++;
|
|
4175
4143
|
const t = Math.max(0, e.edge > 0 ? e.rawFraction - 1 : -e.rawFraction) * e.travel;
|
|
@@ -4177,42 +4145,42 @@ var Si = async (e) => {
|
|
|
4177
4145
|
count: e.count,
|
|
4178
4146
|
heldMs: Date.now() - e.engagedAt,
|
|
4179
4147
|
overshootPx: t
|
|
4180
|
-
}) && (e.timer = setTimeout(
|
|
4181
|
-
}, []), $ =
|
|
4182
|
-
const e =
|
|
4148
|
+
}) && (e.timer = setTimeout(R, 60));
|
|
4149
|
+
}, []), $ = jt(() => {
|
|
4150
|
+
const e = A.current;
|
|
4183
4151
|
if (!e.hasEdgeHold) return;
|
|
4184
4152
|
const t = e.rawFraction < 0 ? -1 : e.rawFraction > 1 ? 1 : 0;
|
|
4185
|
-
t !== e.edge && (e.edge = t, D(), t && (e.engagedAt = Date.now(), e.count = 0, e.timer = setTimeout(
|
|
4186
|
-
}, []), B =
|
|
4153
|
+
t !== e.edge && (e.edge = t, D(), t && (e.engagedAt = Date.now(), e.count = 0, e.timer = setTimeout(R, 60)));
|
|
4154
|
+
}, []), B = pn(L(() => ({
|
|
4187
4155
|
processTouch: !0,
|
|
4188
4156
|
onPointerDown: (e, t) => {
|
|
4189
|
-
const n =
|
|
4190
|
-
n.startAlong = n.isVertical ? e.clientY : e.clientX, n.startFraction = n.fraction, n.rawFraction = n.fraction, n.edge = 0, n.dragging = !0,
|
|
4157
|
+
const n = A.current;
|
|
4158
|
+
n.startAlong = n.isVertical ? e.clientY : e.clientX, n.startFraction = n.fraction, n.rawFraction = n.fraction, n.edge = 0, n.dragging = !0, T(!0), w?.(E(!0)), e.preventDefault(), e.stopPropagation();
|
|
4191
4159
|
},
|
|
4192
4160
|
onPointerMoveOrWait: (e) => {
|
|
4193
|
-
const t =
|
|
4194
|
-
t.rawFraction = t.startFraction + (t.travel > 0 ? n / t.travel : 0), y?.(
|
|
4161
|
+
const t = A.current, n = (t.isVertical ? e.clientY : e.clientX) - t.startAlong;
|
|
4162
|
+
t.rawFraction = t.startFraction + (t.travel > 0 ? n / t.travel : 0), y?.(rs(t.rawFraction)), $();
|
|
4195
4163
|
},
|
|
4196
4164
|
onPointerUp: (e) => {
|
|
4197
|
-
const t =
|
|
4198
|
-
t.edge = 0, t.dragging = !1, D(),
|
|
4165
|
+
const t = A.current;
|
|
4166
|
+
t.edge = 0, t.dragging = !1, D(), T(!1), w?.(E(!1)), e.preventDefault(), e.stopPropagation();
|
|
4199
4167
|
}
|
|
4200
4168
|
}), []));
|
|
4201
4169
|
if (M(() => () => {
|
|
4202
|
-
const e =
|
|
4170
|
+
const e = A.current;
|
|
4203
4171
|
e.timer && clearTimeout(e.timer), e.dragging && (e.dragging = !1, w?.(E(!1)));
|
|
4204
4172
|
}, []), !v?.portalTarget) return null;
|
|
4205
|
-
const O = 1.8 * s,
|
|
4206
|
-
|
|
4207
|
-
const q = j + 4 + O / 2 +
|
|
4173
|
+
const O = 1.8 * s, F = _ ? s : O, W = _ ? O : s, K = _ ? v.viewportHeight : v.viewportWidth, V = _ ? v.height : v.width, j = Math.max(0, V - K), Y = _ ? v.reserveVertical : v.reserveHorizontal, X = Y > 0 ? -2 : 4, Z = Math.max(0, K - Y - O - 4 - X);
|
|
4174
|
+
A.current.travel = Z;
|
|
4175
|
+
const q = j + 4 + O / 2 + rs(u) * Z;
|
|
4208
4176
|
let U, G;
|
|
4209
|
-
return _ ? (U = v.width - v.crossInset -
|
|
4210
|
-
className:
|
|
4177
|
+
return _ ? (U = v.width - v.crossInset - F / 2, G = q - W / 2) : (G = v.height - v.crossInset - W / 2, U = q - F / 2), H(P("div", {
|
|
4178
|
+
className: N("sxl-touch-thumb", Ri, a, { "sxl-dragging": C }),
|
|
4211
4179
|
ref: S,
|
|
4212
4180
|
style: {
|
|
4213
4181
|
left: U,
|
|
4214
4182
|
top: G,
|
|
4215
|
-
width:
|
|
4183
|
+
width: F,
|
|
4216
4184
|
height: W,
|
|
4217
4185
|
zIndex: 20,
|
|
4218
4186
|
borderWidth: `${i}px`,
|
|
@@ -4232,22 +4200,22 @@ var Si = async (e) => {
|
|
|
4232
4200
|
...g
|
|
4233
4201
|
}), v.portalTarget, m);
|
|
4234
4202
|
}));
|
|
4235
|
-
|
|
4236
|
-
var
|
|
4237
|
-
const { offset: n = 0, totalSize: o = 0, viewportSize: r = 0, style: i, className: s, orientation: l =
|
|
4238
|
-
|
|
4239
|
-
const [
|
|
4203
|
+
is.displayName = "TouchThumbHandle";
|
|
4204
|
+
var ss = "_scrollbar-themed_5hlx8_9", ls = "_scrollbar-colors_5hlx8_5", as = 24, cs = w(v((e, t) => {
|
|
4205
|
+
const { offset: n = 0, totalSize: o = 0, viewportSize: r = 0, style: i, className: s, orientation: l = ki.Vertical, onScrollOffset: a, onScroll: c, showCustomScrollButtons: u, scrollButtonIncrement: h = 200, scrollButtonInitialRepeatDelay: d = 260, scrollButtonAdditionalRepeatDelay: f = 120, minThumbSize: p = as, maxThumbSize: m, renderScrollButtonStart: g = Oi, renderScrollButtonEnd: _ = Ii, propsTouchThumb: v, propsThumb: y, onThumbEdgeHold: b, onThumbDrag: w, onMouseDown: S, ...E } = e, C = "touch" === Sn(), T = u ?? !C;
|
|
4206
|
+
jt(c ?? (() => {}), [c]);
|
|
4207
|
+
const [A, $] = z({
|
|
4240
4208
|
offset: 0,
|
|
4241
4209
|
length: 0,
|
|
4242
4210
|
disabled: !1
|
|
4243
|
-
}), B =
|
|
4211
|
+
}), B = k(-1), H = l === ki.Vertical, [O, { width: F, height: W }] = yo(), K = H ? W : F, V = k(null), j = I([O, V]), Y = jt((e, t, n) => {
|
|
4244
4212
|
if (0 === t || 0 === n) {
|
|
4245
4213
|
const e = {
|
|
4246
4214
|
offset: 0,
|
|
4247
4215
|
length: p,
|
|
4248
4216
|
disabled: !0
|
|
4249
4217
|
};
|
|
4250
|
-
return
|
|
4218
|
+
return $(e), e;
|
|
4251
4219
|
}
|
|
4252
4220
|
if (t >= n) return {
|
|
4253
4221
|
offset: 0,
|
|
@@ -4264,47 +4232,47 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4264
4232
|
K,
|
|
4265
4233
|
p,
|
|
4266
4234
|
m
|
|
4267
|
-
]), X =
|
|
4235
|
+
]), X = jt((e) => {
|
|
4268
4236
|
const t = o / K, n = Math.round(e * t);
|
|
4269
|
-
|
|
4237
|
+
$(Y(n, r, o)), a?.(n, r, o), B.current = e;
|
|
4270
4238
|
}, [
|
|
4271
4239
|
a,
|
|
4272
4240
|
r,
|
|
4273
4241
|
o,
|
|
4274
4242
|
K,
|
|
4275
|
-
|
|
4276
|
-
]), Z =
|
|
4277
|
-
|
|
4243
|
+
A
|
|
4244
|
+
]), Z = jt((e) => {
|
|
4245
|
+
$(Y(e, r, o)), a?.(e, r, o), B.current = e;
|
|
4278
4246
|
}, [
|
|
4279
4247
|
a,
|
|
4280
4248
|
r,
|
|
4281
4249
|
o
|
|
4282
4250
|
]);
|
|
4283
4251
|
M(() => {
|
|
4284
|
-
B.current !== n && 0 !== K && (B.current = -1,
|
|
4252
|
+
B.current !== n && 0 !== K && (B.current = -1, $(Y(n, r, o)));
|
|
4285
4253
|
}, [n]), M(() => {
|
|
4286
|
-
0 !== K &&
|
|
4254
|
+
0 !== K && $(Y(n, r, o));
|
|
4287
4255
|
}, [
|
|
4288
4256
|
r,
|
|
4289
4257
|
o,
|
|
4290
|
-
|
|
4258
|
+
H,
|
|
4291
4259
|
K
|
|
4292
4260
|
]);
|
|
4293
|
-
const q = Math.max(0, o - r), U =
|
|
4261
|
+
const q = Math.max(0, o - r), U = lo(t, () => ({ isScrollbar: () => !0 }), []), G = jt((e) => {
|
|
4294
4262
|
const t = Math.max(1, Math.floor(.9 * r)), o = e > 0 ? Math.min(q, n + t) : Math.max(0, n - t);
|
|
4295
4263
|
Z(o);
|
|
4296
4264
|
}, [
|
|
4297
4265
|
r,
|
|
4298
4266
|
n,
|
|
4299
4267
|
q
|
|
4300
|
-
]), Q =
|
|
4301
|
-
vertical:
|
|
4268
|
+
]), Q = ji({
|
|
4269
|
+
vertical: H,
|
|
4302
4270
|
getTrackRect: () => V.current?.getBoundingClientRect() ?? null,
|
|
4303
|
-
getThumb: () =>
|
|
4304
|
-
offset:
|
|
4305
|
-
length:
|
|
4271
|
+
getThumb: () => A.disabled ? null : {
|
|
4272
|
+
offset: A.offset,
|
|
4273
|
+
length: A.length
|
|
4306
4274
|
},
|
|
4307
|
-
onStart:
|
|
4275
|
+
onStart: jt((e) => A.disabled ? null : "thumb" === e ? (w?.({
|
|
4308
4276
|
dragging: !0,
|
|
4309
4277
|
element: ne.current,
|
|
4310
4278
|
source: "thumb"
|
|
@@ -4321,29 +4289,29 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4321
4289
|
page: G,
|
|
4322
4290
|
dragMode: "page"
|
|
4323
4291
|
}, [
|
|
4324
|
-
|
|
4292
|
+
A,
|
|
4325
4293
|
b,
|
|
4326
4294
|
w
|
|
4327
4295
|
])
|
|
4328
|
-
}), ee = "thumb" === Q.dragMode, te =
|
|
4296
|
+
}), ee = "thumb" === Q.dragMode, te = jt((e) => {
|
|
4329
4297
|
const t = Math.max(1, Math.floor(.9 * r));
|
|
4330
|
-
|
|
4298
|
+
H ? ("ArrowDown" === e.key && X(Math.min(q, n + 1)), "ArrowUp" === e.key && X(Math.max(0, n - 1)), "PageDown" === e.key && X(Math.min(q, n + t)), "PageUp" === e.key && X(Math.max(0, n - t)), "Home" === e.key && X(0), "End" === e.key && X(q)) : ("ArrowRight" === e.key && X(Math.min(q, n + 1)), "ArrowLeft" === e.key && X(Math.max(0, n - 1)), "PageDown" === e.key && X(Math.min(q, n + t)), "PageUp" === e.key && X(Math.max(0, n - t)), "Home" === e.key && X(0), "End" === e.key && X(q));
|
|
4331
4299
|
}, [
|
|
4332
|
-
|
|
4300
|
+
H,
|
|
4333
4301
|
r,
|
|
4334
4302
|
o,
|
|
4335
4303
|
n,
|
|
4336
4304
|
q
|
|
4337
|
-
]), ne =
|
|
4338
|
-
const e =
|
|
4305
|
+
]), ne = k(null), oe = L(() => {
|
|
4306
|
+
const e = A.disabled;
|
|
4339
4307
|
if (e) return null;
|
|
4340
|
-
const t =
|
|
4308
|
+
const t = P("div", {
|
|
4341
4309
|
...y,
|
|
4342
|
-
className:
|
|
4310
|
+
className: N(Di, { "sxl-disabled": e }),
|
|
4343
4311
|
ref: ne,
|
|
4344
4312
|
role: "slider",
|
|
4345
|
-
"aria-label":
|
|
4346
|
-
"aria-orientation":
|
|
4313
|
+
"aria-label": H ? "Rows" : "Columns",
|
|
4314
|
+
"aria-orientation": H ? "vertical" : "horizontal",
|
|
4347
4315
|
"aria-valuemin": 0,
|
|
4348
4316
|
"aria-valuemax": q,
|
|
4349
4317
|
"aria-valuenow": n,
|
|
@@ -4351,29 +4319,29 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4351
4319
|
style: {
|
|
4352
4320
|
...y?.style,
|
|
4353
4321
|
position: "relative",
|
|
4354
|
-
[
|
|
4355
|
-
[
|
|
4356
|
-
transform:
|
|
4357
|
-
[
|
|
4322
|
+
[H ? "height" : "width"]: `${A.length}px`,
|
|
4323
|
+
[H ? "width" : "height"]: "100%",
|
|
4324
|
+
transform: H ? `translateY(${A.offset}px)` : `translateX(${A.offset}px)`,
|
|
4325
|
+
[H ? "minHeight" : "minWidth"]: `${p}px`
|
|
4358
4326
|
},
|
|
4359
4327
|
onMouseDown: S
|
|
4360
4328
|
});
|
|
4361
4329
|
if (!C || e) return t;
|
|
4362
|
-
const o = Math.max(0, K -
|
|
4363
|
-
return
|
|
4330
|
+
const o = Math.max(0, K - A.length);
|
|
4331
|
+
return R(D, { children: [t, P(is, {
|
|
4364
4332
|
...v,
|
|
4365
|
-
orientation:
|
|
4366
|
-
fraction: o > 0 ?
|
|
4333
|
+
orientation: H ? ki.Vertical : ki.Horizontal,
|
|
4334
|
+
fraction: o > 0 ? A.offset / o : 0,
|
|
4367
4335
|
onScrollToFraction: (e) => X(e * o),
|
|
4368
4336
|
onEdgeHold: b,
|
|
4369
4337
|
onDraggingChange: w
|
|
4370
4338
|
})] });
|
|
4371
4339
|
}, [
|
|
4372
|
-
|
|
4340
|
+
A,
|
|
4373
4341
|
p,
|
|
4374
4342
|
q,
|
|
4375
4343
|
n,
|
|
4376
|
-
|
|
4344
|
+
H,
|
|
4377
4345
|
C,
|
|
4378
4346
|
S,
|
|
4379
4347
|
v,
|
|
@@ -4381,7 +4349,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4381
4349
|
K,
|
|
4382
4350
|
b,
|
|
4383
4351
|
w
|
|
4384
|
-
]), [re, ie] =
|
|
4352
|
+
]), [re, ie] = z(null), se = jt(() => {
|
|
4385
4353
|
let e;
|
|
4386
4354
|
e = "function" == typeof h ? h(n, r, o) : n - h;
|
|
4387
4355
|
const t = Math.max(0, e);
|
|
@@ -4391,7 +4359,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4391
4359
|
n,
|
|
4392
4360
|
r,
|
|
4393
4361
|
o
|
|
4394
|
-
]), le =
|
|
4362
|
+
]), le = jt(() => {
|
|
4395
4363
|
let e;
|
|
4396
4364
|
e = "function" == typeof h ? h(n, r, o) : n + h;
|
|
4397
4365
|
const t = Math.min(q, e);
|
|
@@ -4402,7 +4370,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4402
4370
|
q,
|
|
4403
4371
|
r,
|
|
4404
4372
|
o
|
|
4405
|
-
]), ae =
|
|
4373
|
+
]), ae = k(null), ce = k(null), ue = x(() => {
|
|
4406
4374
|
ae.current && (clearTimeout(ae.current), ae.current = null, ce.current = null);
|
|
4407
4375
|
}, []), he = x((e, t, n, o = d) => {
|
|
4408
4376
|
ce.current = e, ae.current = setTimeout(() => {
|
|
@@ -4415,7 +4383,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4415
4383
|
ue
|
|
4416
4384
|
]);
|
|
4417
4385
|
M(() => () => ue(), [ue]);
|
|
4418
|
-
const de =
|
|
4386
|
+
const de = L(() => T ? P(Po, {
|
|
4419
4387
|
render: g,
|
|
4420
4388
|
props: {
|
|
4421
4389
|
orientation: l,
|
|
@@ -4425,11 +4393,11 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4425
4393
|
onMouseDown: () => he(n, !0, !0)
|
|
4426
4394
|
}
|
|
4427
4395
|
}) : null, [
|
|
4428
|
-
|
|
4396
|
+
T,
|
|
4429
4397
|
l,
|
|
4430
4398
|
n,
|
|
4431
4399
|
re
|
|
4432
|
-
]), fe =
|
|
4400
|
+
]), fe = L(() => T ? P(Po, {
|
|
4433
4401
|
render: _,
|
|
4434
4402
|
props: {
|
|
4435
4403
|
orientation: l,
|
|
@@ -4439,15 +4407,15 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4439
4407
|
onMouseDown: () => he(n, !0, !1)
|
|
4440
4408
|
}
|
|
4441
4409
|
}) : null, [
|
|
4442
|
-
|
|
4410
|
+
T,
|
|
4443
4411
|
l,
|
|
4444
4412
|
n,
|
|
4445
4413
|
q,
|
|
4446
4414
|
re
|
|
4447
|
-
]), pe =
|
|
4448
|
-
return
|
|
4449
|
-
ref:
|
|
4450
|
-
className:
|
|
4415
|
+
]), pe = H ? "vertical" : "horizontal", me = `sxl-${pe}`, ge = I([U, t]);
|
|
4416
|
+
return R("div", {
|
|
4417
|
+
ref: ge,
|
|
4418
|
+
className: N(s, zi, ls, me, {
|
|
4451
4419
|
"sxl-dragging": ee,
|
|
4452
4420
|
"sxl-has-touch-thumb": C
|
|
4453
4421
|
}),
|
|
@@ -4455,7 +4423,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4455
4423
|
...E,
|
|
4456
4424
|
children: [
|
|
4457
4425
|
de,
|
|
4458
|
-
|
|
4426
|
+
P("div", {
|
|
4459
4427
|
ref: j,
|
|
4460
4428
|
role: "scrollbar",
|
|
4461
4429
|
"aria-orientation": pe,
|
|
@@ -4463,7 +4431,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4463
4431
|
"aria-valuemax": q,
|
|
4464
4432
|
"aria-valuenow": n,
|
|
4465
4433
|
tabIndex: 0,
|
|
4466
|
-
className:
|
|
4434
|
+
className: N(Ai, "sxl-track", me),
|
|
4467
4435
|
onMouseDown: S,
|
|
4468
4436
|
onPointerDown: Q.onPointerDown,
|
|
4469
4437
|
onPointerMove: Q.onPointerMove,
|
|
@@ -4474,24 +4442,24 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4474
4442
|
fe
|
|
4475
4443
|
]
|
|
4476
4444
|
});
|
|
4477
|
-
})),
|
|
4478
|
-
let t = null !==
|
|
4479
|
-
return t && (
|
|
4480
|
-
},
|
|
4481
|
-
let i =
|
|
4445
|
+
})), us = Date.now, hs = 1e3, ds = {}, fs = 1, ps = (e) => {
|
|
4446
|
+
let t = null !== ds[e];
|
|
4447
|
+
return t && (ds[e] = null), t;
|
|
4448
|
+
}, ms = (e, t, n, o = 0, r) => {
|
|
4449
|
+
let i = us(), s = i, l = 0, a = 0, c = 0, u = fs++;
|
|
4482
4450
|
if (u % 20 == 0) {
|
|
4483
4451
|
const e = {};
|
|
4484
|
-
for (let t in
|
|
4485
|
-
|
|
4452
|
+
for (let t in ds) e[t] = !0;
|
|
4453
|
+
ds = e;
|
|
4486
4454
|
}
|
|
4487
4455
|
const h = function(d) {
|
|
4488
|
-
let f = !0 !== d, p =
|
|
4456
|
+
let f = !0 !== d, p = us(), m = !0;
|
|
4489
4457
|
try {
|
|
4490
4458
|
m = (!t || t(u)) ?? !0;
|
|
4491
4459
|
} catch (e) {
|
|
4492
4460
|
m = !1;
|
|
4493
4461
|
}
|
|
4494
|
-
if (!
|
|
4462
|
+
if (!ds[u] || !m) return ds[u] = null, void n?.(60 - a / ((p - i) / hs), u, !1);
|
|
4495
4463
|
if (f) {
|
|
4496
4464
|
c = Math.round((p - s) / 16.666666666666668) - 1;
|
|
4497
4465
|
for (let e = 0; e < Math.min(c, 4); e++) h(!0), a++;
|
|
@@ -4503,17 +4471,17 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4503
4471
|
} catch (e) {
|
|
4504
4472
|
_ = !1;
|
|
4505
4473
|
}
|
|
4506
|
-
!1 !== _ && 1 !== l || !f ? f && (s = p, requestAnimationFrame(h)) : (
|
|
4474
|
+
!1 !== _ && 1 !== l || !f ? f && (s = p, requestAnimationFrame(h)) : (ds[u] = null, n?.(60 - a / ((p - i) / hs), u, 1 === l || null == o));
|
|
4507
4475
|
};
|
|
4508
|
-
return
|
|
4509
|
-
},
|
|
4476
|
+
return ds[u] = !0, requestAnimationFrame(h), u;
|
|
4477
|
+
}, gs = function(e) {
|
|
4510
4478
|
return Math.pow(e - 1, 3) + 1;
|
|
4511
|
-
},
|
|
4479
|
+
}, _s = function(e) {
|
|
4512
4480
|
return (e /= .5) < 1 ? .5 * Math.pow(e, 3) : .5 * (Math.pow(e - 2, 3) + 2);
|
|
4513
|
-
},
|
|
4481
|
+
}, vs = Math.log(1.15) / 100, ys = (e) => {
|
|
4514
4482
|
const t = e[1].pageX - e[0].pageX, n = e[1].pageY - e[0].pageY;
|
|
4515
4483
|
return Math.sqrt(t * t + n * n);
|
|
4516
|
-
},
|
|
4484
|
+
}, bs = class {
|
|
4517
4485
|
constructor(e, t) {
|
|
4518
4486
|
this.__isSingleTouch = !1, this.__isTracking = !1, this.__didDecelerationComplete = !1, this.__isGesturing = !1, this.__isZooming = !1, this.__pinchStartDistance = 0, this.__gestureMoveX = 0, this.__gestureMoveY = 0, this.__isDragging = !1, this.__isDecelerating = 0, this.__isAnimating = 0, this.__interruptedAnimation = !1, this.__lastScale = 1, this.__enableScrollX = !0, this.__enableScrollY = !0, this.__clientLeft = 0, this.__clientTop = 0, this.__clientWidth = 0, this.__clientHeight = 0, this.__contentWidth = 0, this.__contentHeight = 0, this.__snapWidth = 100, this.__snapHeight = 100, this.__zoomLevel = 1, this.__scrollLeft = 0, this.__scrollTop = 0, this.__maxScrollLeft = 0, this.__maxScrollTop = 0, this.__scheduledLeft = 0, this.__scheduledTop = 0, this.__scheduledZoom = 0, this.__lastTouchLeft = 0, this.__lastTouchTop = 0, this.__lastTouchMove = 0, this.__positions = [], this.__initialTouchLeft = 0, this.__initialTouchTop = 0, this.__zoomLevelStart = 1, this.__minDecelerationScrollLeft = 0, this.__minDecelerationScrollTop = 0, this.__maxDecelerationScrollLeft = 0, this.__maxDecelerationScrollTop = 0, this.__decelerationVelocityX = 0, this.__decelerationVelocityY = 0, this.__zoomComplete = null, this.__callback = e, this.options = {
|
|
4519
4487
|
scrollingX: !0,
|
|
@@ -4567,7 +4535,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4567
4535
|
}
|
|
4568
4536
|
zoomTo(e, t = !1, n, o, r) {
|
|
4569
4537
|
if (!this.options.zooming) throw new Error("Zooming is not enabled!");
|
|
4570
|
-
r && (this.__zoomComplete = r), this.__isDecelerating && (
|
|
4538
|
+
r && (this.__zoomComplete = r), this.__isDecelerating && (ps(this.__isDecelerating), this.__isDecelerating = 0);
|
|
4571
4539
|
const i = this.__zoomLevel;
|
|
4572
4540
|
void 0 === n && (n = this.__clientWidth / 2), void 0 === o && (o = this.__clientHeight / 2), e = Math.max(Math.min(e, this.options.maxZoom), this.options.minZoom), this.__computeScrollMax(e);
|
|
4573
4541
|
const s = e / i;
|
|
@@ -4586,7 +4554,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4586
4554
|
this.zoomTo(this.__zoomLevel * e, t, n, o, r);
|
|
4587
4555
|
}
|
|
4588
4556
|
scrollTo(e, t, n = !1, o) {
|
|
4589
|
-
if (this.__isDecelerating && (
|
|
4557
|
+
if (this.__isDecelerating && (ps(this.__isDecelerating), this.__isDecelerating = 0), void 0 !== o && o !== this.__zoomLevel) {
|
|
4590
4558
|
if (!this.options.zooming) throw new Error("Zooming is not enabled!");
|
|
4591
4559
|
e *= o, t *= o, this.__computeScrollMax(o);
|
|
4592
4560
|
} else o = this.__zoomLevel;
|
|
@@ -4597,16 +4565,16 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4597
4565
|
this.scrollTo(o + (e || 0), r + (t || 0), n);
|
|
4598
4566
|
}
|
|
4599
4567
|
doMouseZoom(e, t, n, o) {
|
|
4600
|
-
const r = Math.exp(-e *
|
|
4568
|
+
const r = Math.exp(-e * vs);
|
|
4601
4569
|
return this.zoomTo(this.__zoomLevel * r, !1, n - this.__clientLeft, o - this.__clientTop);
|
|
4602
4570
|
}
|
|
4603
4571
|
doTouchStart(e, t) {
|
|
4604
4572
|
if (void 0 === e.length) throw new Error("Invalid touch list: " + e);
|
|
4605
4573
|
if (t instanceof Date && (t = t.valueOf()), "number" != typeof t) throw new Error("Invalid timestamp value: " + t);
|
|
4606
4574
|
let n, o;
|
|
4607
|
-
this.__interruptedAnimation = !0, this.__isDecelerating && (
|
|
4575
|
+
this.__interruptedAnimation = !0, this.__isDecelerating && (ps(this.__isDecelerating), this.__isDecelerating = 0, this.__interruptedAnimation = !0), this.__isAnimating && (ps(this.__isAnimating), this.__isAnimating = 0, this.__interruptedAnimation = !0);
|
|
4608
4576
|
let r = 1 === e.length;
|
|
4609
|
-
r ? (n = e[0].pageX, o = e[0].pageY) : (n = Math.abs(e[0].pageX + e[1].pageX) / 2, o = Math.abs(e[0].pageY + e[1].pageY) / 2), this.__initialTouchLeft = n, this.__initialTouchTop = o, this.__zoomLevelStart = this.__zoomLevel, this.__pinchStartDistance = r ? 0 :
|
|
4577
|
+
r ? (n = e[0].pageX, o = e[0].pageY) : (n = Math.abs(e[0].pageX + e[1].pageX) / 2, o = Math.abs(e[0].pageY + e[1].pageY) / 2), this.__initialTouchLeft = n, this.__initialTouchTop = o, this.__zoomLevelStart = this.__zoomLevel, this.__pinchStartDistance = r ? 0 : ys(e), this.__isGesturing = !r && !!this.options.zooming, this.__gestureMoveX = 0, this.__gestureMoveY = 0, this.__lastTouchLeft = n, this.__lastTouchTop = o, this.__lastTouchMove = t, this.__lastScale = 1, this.__enableScrollX = !r && !!this.options.scrollingX, this.__enableScrollY = !r && !!this.options.scrollingY, this.__isTracking = !0, this.__didDecelerationComplete = !1, this.__isDragging = !r, this.__isSingleTouch = r, this.__positions = [], this.__enableScrollX, this.__enableScrollY, this.__isDragging, this.__maxScrollLeft, this.__maxScrollTop;
|
|
4610
4578
|
}
|
|
4611
4579
|
doTouchMove(e, t) {
|
|
4612
4580
|
if (void 0 === e.length) throw new Error("Invalid touch list: " + e);
|
|
@@ -4615,7 +4583,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4615
4583
|
let n, o;
|
|
4616
4584
|
2 === e.length ? (n = Math.abs(e[0].pageX + e[1].pageX) / 2, o = Math.abs(e[0].pageY + e[1].pageY) / 2) : (n = e[0].pageX, o = e[0].pageY);
|
|
4617
4585
|
let r = this.__positions;
|
|
4618
|
-
const i = 2 === e.length && this.__pinchStartDistance > 0 ?
|
|
4586
|
+
const i = 2 === e.length && this.__pinchStartDistance > 0 ? ys(e) / this.__pinchStartDistance : 1;
|
|
4619
4587
|
if (this.__isDragging) {
|
|
4620
4588
|
let e = n - this.__lastTouchLeft, s = o - this.__lastTouchTop;
|
|
4621
4589
|
this.__gestureMoveX = e, this.__gestureMoveY = s;
|
|
@@ -4662,14 +4630,14 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4662
4630
|
}
|
|
4663
4631
|
__publish(e, t, n, o = !1) {
|
|
4664
4632
|
const r = this.__isAnimating;
|
|
4665
|
-
if (r && (
|
|
4633
|
+
if (r && (ps(r), this.__isAnimating = 0), o && this.options.animating) {
|
|
4666
4634
|
this.__scheduledLeft = e, this.__scheduledTop = t, this.__scheduledZoom = n;
|
|
4667
4635
|
const o = this.__scrollLeft, i = this.__scrollTop, s = this.__zoomLevel, l = e - o, a = t - i, c = n - s, u = (e, t, n = !1) => {
|
|
4668
4636
|
n && (this.__scrollLeft = o + l * e, this.__scrollTop = i + a * e, this.__zoomLevel = s + c * e, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
|
|
4669
4637
|
}, h = (e) => this.__isAnimating === e, d = (e, t, n = !1) => {
|
|
4670
4638
|
t === this.__isAnimating && (this.__isAnimating = 0), (this.__didDecelerationComplete || n) && this.options.scrollingComplete?.(), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
|
|
4671
4639
|
};
|
|
4672
|
-
this.__isAnimating =
|
|
4640
|
+
this.__isAnimating = ms(u, h, d, this.options.animationDuration, r ? gs : _s);
|
|
4673
4641
|
} else this.__scheduledLeft = this.__scrollLeft = e, this.__scheduledTop = this.__scrollTop = t, this.__scheduledZoom = this.__zoomLevel = n, this.__callback && this.__callback(e, t, n), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
|
|
4674
4642
|
}
|
|
4675
4643
|
__computeScrollMax(e = this.__zoomLevel) {
|
|
@@ -4681,7 +4649,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4681
4649
|
this.__minDecelerationScrollLeft = Math.floor(e / n) * n, this.__minDecelerationScrollTop = Math.floor(t / o) * o, this.__maxDecelerationScrollLeft = Math.ceil(e / n) * n, this.__maxDecelerationScrollTop = Math.ceil(t / o) * o;
|
|
4682
4650
|
} else this.__minDecelerationScrollLeft = 0, this.__minDecelerationScrollTop = 0, this.__maxDecelerationScrollLeft = this.__maxScrollLeft, this.__maxDecelerationScrollTop = this.__maxScrollTop;
|
|
4683
4651
|
const t = this.options.snapping ? 4 : .1;
|
|
4684
|
-
this.__isDecelerating =
|
|
4652
|
+
this.__isDecelerating = ms((e, t, n = !1) => {
|
|
4685
4653
|
this.__stepThroughDeceleration(n);
|
|
4686
4654
|
}, () => {
|
|
4687
4655
|
const e = Math.abs(this.__decelerationVelocityX) >= t || Math.abs(this.__decelerationVelocityY) >= t;
|
|
@@ -4707,11 +4675,11 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4707
4675
|
t < this.__minDecelerationScrollLeft ? e = this.__minDecelerationScrollLeft - t : t > this.__maxDecelerationScrollLeft && (e = this.__maxDecelerationScrollLeft - t), n < this.__minDecelerationScrollTop ? o = this.__minDecelerationScrollTop - n : n > this.__maxDecelerationScrollTop && (o = this.__maxDecelerationScrollTop - n), 0 !== e && (e * this.__decelerationVelocityX <= 0 ? this.__decelerationVelocityX += e * r : this.__decelerationVelocityX = e * i), 0 !== o && (o * this.__decelerationVelocityY <= 0 ? this.__decelerationVelocityY += o * r : this.__decelerationVelocityY = o * i);
|
|
4708
4676
|
}
|
|
4709
4677
|
}
|
|
4710
|
-
},
|
|
4678
|
+
}, ws = /* @__PURE__ */ new Set([
|
|
4711
4679
|
"auto",
|
|
4712
4680
|
"scroll",
|
|
4713
4681
|
"overlay"
|
|
4714
|
-
]),
|
|
4682
|
+
]), xs = /* @__PURE__ */ new Set(["contain", "none"]), Ss = (e, t) => {
|
|
4715
4683
|
const { deltaX: n, deltaY: o, shiftKey: r } = e, i = r || Math.abs(n) > Math.abs(o), s = r ? o : i ? n : o;
|
|
4716
4684
|
if (0 === s) return null;
|
|
4717
4685
|
let l = e.target instanceof Element ? e.target : null;
|
|
@@ -4720,21 +4688,21 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4720
4688
|
const e = i ? l.scrollWidth - l.clientWidth : l.scrollHeight - l.clientHeight;
|
|
4721
4689
|
if (e > 0) {
|
|
4722
4690
|
const t = getComputedStyle(l);
|
|
4723
|
-
if (
|
|
4691
|
+
if (ws.has(i ? t.overflowX : t.overflowY)) {
|
|
4724
4692
|
const n = i ? l.scrollLeft : l.scrollTop;
|
|
4725
4693
|
if (s < 0 ? n > 0 : n < e - 1) return "native";
|
|
4726
|
-
if (
|
|
4694
|
+
if (xs.has(i ? t.overscrollBehaviorX : t.overscrollBehaviorY)) return "contained";
|
|
4727
4695
|
}
|
|
4728
4696
|
}
|
|
4729
4697
|
l = l.parentElement;
|
|
4730
4698
|
}
|
|
4731
4699
|
return null;
|
|
4732
|
-
},
|
|
4700
|
+
}, Ms = 100 / 3, Es = U({
|
|
4733
4701
|
PANE_SCROLLER_ATTRIBUTE: () => "data-sxl-pane-scroller",
|
|
4734
|
-
defaultRenderScrollbar: () =>
|
|
4735
|
-
getScrollTo: () =>
|
|
4736
|
-
getWheelOwner: () =>
|
|
4737
|
-
}),
|
|
4702
|
+
defaultRenderScrollbar: () => Ls,
|
|
4703
|
+
getScrollTo: () => Cs,
|
|
4704
|
+
getWheelOwner: () => Ss
|
|
4705
|
+
}), Cs = (e, t, n, o, r = 0) => {
|
|
4738
4706
|
for (let r = 0; r < n.length; r++) {
|
|
4739
4707
|
const i = n[r].getBoundingClientRect();
|
|
4740
4708
|
let s = i.left - t, l = s + i.width;
|
|
@@ -4743,22 +4711,22 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4743
4711
|
} else if (Math.ceil(l) > Math.ceil(e) + 2) return l;
|
|
4744
4712
|
}
|
|
4745
4713
|
return r;
|
|
4746
|
-
},
|
|
4714
|
+
}, Ls = (e) => P(cs, { ...e }), Ts = (e) => {
|
|
4747
4715
|
const t = e.ownerDocument?.defaultView;
|
|
4748
4716
|
return t ? t.getComputedStyle(e).touchAction : "";
|
|
4749
|
-
},
|
|
4717
|
+
}, ks = (e) => {
|
|
4750
4718
|
const t = e.trim();
|
|
4751
4719
|
return "" === t || "auto" === t || "manipulation" === t || t.split(/\s+/).some((e) => e.startsWith("pan-"));
|
|
4752
|
-
},
|
|
4753
|
-
const { children: n, viewport: o, disableMouseWheel: r = !1, onWheelScroll: i, zoomable: s = !1, showHorizontalScrollbar: l = !0, showVerticalScrollbar: a = !0, renderScrollCorner: c =
|
|
4720
|
+
}, zs = "_scrollpane_zdrii_2", As = "_scrollpane-content_zdrii_20", Ds = "_scrollpane-content-cell_zdrii_33", Ps = "_vertical-container_zdrii_42", Rs = "_horizontal-container_zdrii_50", $s = "_corner-container_zdrii_59", Bs = "_touch-thumb-overlay_zdrii_68", Hs = w(v((e, t) => {
|
|
4721
|
+
const { children: n, viewport: o, disableMouseWheel: r = !1, onWheelScroll: i, zoomable: s = !1, showHorizontalScrollbar: l = !0, showVerticalScrollbar: a = !0, renderScrollCorner: c = Os, renderScrollbarHorizontal: u = Ls, renderScrollbarVertical: h = Ls, style: d, className: f, disableTouch: p, ...m } = e, g = l && u, _ = a && h, v = Ut(o, (e) => e.getMetrics()), y = x((e, t) => {
|
|
4754
4722
|
if (!o) return;
|
|
4755
4723
|
const n = o.getTarget();
|
|
4756
4724
|
o.setTarget(e.left ?? n.left, e.top ?? n.top, t);
|
|
4757
|
-
}, [o]), b =
|
|
4725
|
+
}, [o]), b = lo(t, () => ({ isScrollPane: () => !0 }), []);
|
|
4758
4726
|
M(() => {}, []);
|
|
4759
|
-
const w =
|
|
4727
|
+
const w = k(null), S = jt((e) => {
|
|
4760
4728
|
o?.requestZoom(e);
|
|
4761
|
-
}, [o]), E =
|
|
4729
|
+
}, [o]), E = k({
|
|
4762
4730
|
active: !1,
|
|
4763
4731
|
lastZoom: 1,
|
|
4764
4732
|
focal: {
|
|
@@ -4775,7 +4743,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4775
4743
|
panY: 0,
|
|
4776
4744
|
phase: "end"
|
|
4777
4745
|
}), o && w.current?.setZoomLevel(o.getZoom()));
|
|
4778
|
-
}, [o]),
|
|
4746
|
+
}, [o]), T = jt((e, t, n) => {
|
|
4779
4747
|
const o = w.current;
|
|
4780
4748
|
if (!o) return;
|
|
4781
4749
|
const r = E.current;
|
|
@@ -4790,21 +4758,21 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4790
4758
|
const e = E.current;
|
|
4791
4759
|
e.endTimer && (clearTimeout(e.endTimer), e.endTimer = null);
|
|
4792
4760
|
}, []), ((e, t) => {
|
|
4793
|
-
const { enabled: n = !0, onScrollBy: o, onWheelScroll: r, onZoomBy: i } = t, s =
|
|
4761
|
+
const { enabled: n = !0, onScrollBy: o, onWheelScroll: r, onZoomBy: i } = t, s = jt(o, [o]), l = jt(r ?? (() => {}), [r]), a = jt(i ?? (() => {}), [i]), c = k(!!i);
|
|
4794
4762
|
c.current = !!i;
|
|
4795
|
-
const u =
|
|
4763
|
+
const u = k(null), h = k(null), d = k({
|
|
4796
4764
|
deltaY: 0,
|
|
4797
4765
|
clientX: 0,
|
|
4798
4766
|
clientY: 0
|
|
4799
|
-
}), f =
|
|
4767
|
+
}), f = jt((t) => {
|
|
4800
4768
|
const n = t.shiftKey, { deltaX: o, deltaY: r, deltaMode: i } = t, f = c.current && !n && (t.ctrlKey || t.metaKey);
|
|
4801
4769
|
if (!f && e.current) {
|
|
4802
|
-
const n =
|
|
4770
|
+
const n = Ss(t, e.current);
|
|
4803
4771
|
if ("native" === n) return;
|
|
4804
4772
|
if ("contained" === n) return void t.preventDefault();
|
|
4805
4773
|
}
|
|
4806
4774
|
if (t.preventDefault(), f) {
|
|
4807
|
-
const e = 1 === i ?
|
|
4775
|
+
const e = 1 === i ? Ms : 2 === i ? 800 : 1, n = d.current;
|
|
4808
4776
|
if (n.deltaY += r * e, n.clientX = t.clientX, n.clientY = t.clientY, h.current) return;
|
|
4809
4777
|
h.current = window.requestAnimationFrame(() => {
|
|
4810
4778
|
h.current = null;
|
|
@@ -4843,24 +4811,24 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4843
4811
|
}, !0);
|
|
4844
4812
|
},
|
|
4845
4813
|
onWheelScroll: i,
|
|
4846
|
-
onZoomBy: s ?
|
|
4814
|
+
onZoomBy: s ? T : void 0
|
|
4847
4815
|
});
|
|
4848
|
-
const
|
|
4816
|
+
const A = k(!1), D = Ut(o, (e) => e.getZoom());
|
|
4849
4817
|
M(() => {
|
|
4850
4818
|
w.current && null != D && (E.current.active || (w.current.setZoomLevel(D), E.current.lastZoom = w.current.__zoomLevel));
|
|
4851
4819
|
}, [D]), M(() => {
|
|
4852
4820
|
if (w.current && v && (w.current.__scrollTop !== v?.top || w.current.__scrollLeft !== v?.left)) if (w.current.__isDecelerating || w.current.__isTracking) w.current.__isTracking, w.current.__isDecelerating;
|
|
4853
4821
|
else {
|
|
4854
|
-
w.current.__scrollLeft, w.current.__scrollTop, v.left, v.top,
|
|
4822
|
+
w.current.__scrollLeft, w.current.__scrollTop, v.left, v.top, A.current = !0;
|
|
4855
4823
|
try {
|
|
4856
4824
|
w.current?.scrollTo(v.left, v.top, !1);
|
|
4857
4825
|
} finally {
|
|
4858
|
-
|
|
4826
|
+
A.current = !1;
|
|
4859
4827
|
}
|
|
4860
4828
|
}
|
|
4861
4829
|
}, [v?.left, v?.top]);
|
|
4862
|
-
const
|
|
4863
|
-
if (
|
|
4830
|
+
const $ = x((e, t, n) => {
|
|
4831
|
+
if (A.current) return;
|
|
4864
4832
|
const o = w.current;
|
|
4865
4833
|
if (o && !o.__isTracking && !o.__isDecelerating && !o.__isZooming) return;
|
|
4866
4834
|
const r = E.current;
|
|
@@ -4883,29 +4851,29 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4883
4851
|
left: e,
|
|
4884
4852
|
top: t
|
|
4885
4853
|
});
|
|
4886
|
-
}, []), B =
|
|
4887
|
-
1 === e.touches.length && (B.current = ((e, t, n =
|
|
4854
|
+
}, []), B = k(!1), H = x((e) => {
|
|
4855
|
+
1 === e.touches.length && (B.current = ((e, t, n = Ts) => {
|
|
4888
4856
|
let o = e instanceof Element ? e : null;
|
|
4889
4857
|
for (; o && o !== t;) {
|
|
4890
|
-
if (!
|
|
4858
|
+
if (!ks(n(o))) return !0;
|
|
4891
4859
|
o = o.parentElement;
|
|
4892
4860
|
}
|
|
4893
4861
|
return !1;
|
|
4894
4862
|
})(e.target, b.current)), e.touches.length, B.current, B.current || w.current?.doTouchStart(e.touches, e.timeStamp);
|
|
4895
|
-
}, []),
|
|
4863
|
+
}, []), O = x((e) => {
|
|
4896
4864
|
B.current || (e.preventDefault(), 2 === e.touches.length && (E.current.focal = {
|
|
4897
4865
|
clientX: (e.touches[0].clientX + e.touches[1].clientX) / 2,
|
|
4898
4866
|
clientY: (e.touches[0].clientY + e.touches[1].clientY) / 2
|
|
4899
4867
|
}), e.touches.length, w.current, w.current, w.current, w.current?.doTouchMove(e.touches, e.timeStamp));
|
|
4900
4868
|
}, []), I = x((e) => {
|
|
4901
4869
|
B.current ? 0 === e.touches.length && (B.current = !1) : (w.current?.doTouchEnd(e.timeStamp), C());
|
|
4902
|
-
}, [C]),
|
|
4870
|
+
}, [C]), F = x(({ containerWidth: e, containerHeight: t, totalWidth: n, totalHeight: o }) => {
|
|
4903
4871
|
w.current && w.current.setDimensions(e, t, n, o);
|
|
4904
4872
|
}, []);
|
|
4905
4873
|
M(() => {
|
|
4906
|
-
const e = b.current, t = !p &&
|
|
4874
|
+
const e = b.current, t = !p && Ne().supportsTouchEvents;
|
|
4907
4875
|
if ((t || s) && e && v) {
|
|
4908
|
-
w.current || (w.current = new
|
|
4876
|
+
w.current || (w.current = new bs($, {
|
|
4909
4877
|
scrollingX: !0,
|
|
4910
4878
|
scrollingY: !0,
|
|
4911
4879
|
decelerationRate: .95,
|
|
@@ -4913,9 +4881,9 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4913
4881
|
zooming: !0,
|
|
4914
4882
|
minZoom: .1,
|
|
4915
4883
|
maxZoom: 4
|
|
4916
|
-
}), w.current.setZoomLevel(o?.getZoom() ?? 1), E.current.lastZoom = w.current.__zoomLevel), t && (e.addEventListener("touchstart",
|
|
4884
|
+
}), w.current.setZoomLevel(o?.getZoom() ?? 1), E.current.lastZoom = w.current.__zoomLevel), t && (e.addEventListener("touchstart", H, { passive: !1 }), e.addEventListener("touchend", I), e.addEventListener("touchmove", O, { passive: !1 }));
|
|
4917
4885
|
const n = o?.getZoom() || 1;
|
|
4918
|
-
|
|
4886
|
+
F({
|
|
4919
4887
|
containerWidth: v?.width,
|
|
4920
4888
|
containerHeight: v?.height,
|
|
4921
4889
|
totalWidth: v?.totalWidth / n,
|
|
@@ -4923,7 +4891,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4923
4891
|
});
|
|
4924
4892
|
}
|
|
4925
4893
|
return () => {
|
|
4926
|
-
e?.removeEventListener("touchstart",
|
|
4894
|
+
e?.removeEventListener("touchstart", H), e?.removeEventListener("touchend", I), e?.removeEventListener("touchmove", O);
|
|
4927
4895
|
};
|
|
4928
4896
|
}, [
|
|
4929
4897
|
v?.width,
|
|
@@ -4934,11 +4902,11 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4934
4902
|
p,
|
|
4935
4903
|
s
|
|
4936
4904
|
]);
|
|
4937
|
-
const W =
|
|
4905
|
+
const W = Ne().supportsTouchEvents, [K, V] = z(null), [j, { width: Y, height: X }] = yo(), Z = x((e) => {
|
|
4938
4906
|
V(e), j(e);
|
|
4939
|
-
}, [j]), q =
|
|
4907
|
+
}, [j]), q = L(() => {
|
|
4940
4908
|
if (!K) return null;
|
|
4941
|
-
const e =
|
|
4909
|
+
const e = Qi(), t = Math.min(Y, v?.width ?? Y), n = Math.min(X, v?.height ?? X);
|
|
4942
4910
|
return {
|
|
4943
4911
|
portalTarget: K,
|
|
4944
4912
|
width: Y,
|
|
@@ -4947,7 +4915,7 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4947
4915
|
viewportHeight: n,
|
|
4948
4916
|
reserveVertical: g ? e : 0,
|
|
4949
4917
|
reserveHorizontal: _ ? e : 0,
|
|
4950
|
-
crossInset:
|
|
4918
|
+
crossInset: Ji()
|
|
4951
4919
|
};
|
|
4952
4920
|
}, [
|
|
4953
4921
|
K,
|
|
@@ -4957,12 +4925,12 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4957
4925
|
v?.height,
|
|
4958
4926
|
g,
|
|
4959
4927
|
_
|
|
4960
|
-
]), U =
|
|
4928
|
+
]), U = L(() => {
|
|
4961
4929
|
if (!_) return null;
|
|
4962
|
-
const e =
|
|
4930
|
+
const e = P(Po, {
|
|
4963
4931
|
render: h,
|
|
4964
4932
|
props: {
|
|
4965
|
-
orientation:
|
|
4933
|
+
orientation: ki.Vertical,
|
|
4966
4934
|
offset: v?.top ?? 0,
|
|
4967
4935
|
viewportSize: v?.height ?? 0,
|
|
4968
4936
|
totalSize: v?.totalHeight ?? 0,
|
|
@@ -4971,8 +4939,8 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4971
4939
|
}
|
|
4972
4940
|
}
|
|
4973
4941
|
});
|
|
4974
|
-
return
|
|
4975
|
-
className:
|
|
4942
|
+
return P("div", {
|
|
4943
|
+
className: N("sxl-vertical-container", Ps),
|
|
4976
4944
|
children: e
|
|
4977
4945
|
});
|
|
4978
4946
|
}, [
|
|
@@ -4980,12 +4948,12 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4980
4948
|
v?.top,
|
|
4981
4949
|
v?.height,
|
|
4982
4950
|
v?.totalHeight
|
|
4983
|
-
]), G =
|
|
4951
|
+
]), G = L(() => {
|
|
4984
4952
|
if (!g) return null;
|
|
4985
|
-
const e =
|
|
4953
|
+
const e = P(Po, {
|
|
4986
4954
|
render: u,
|
|
4987
4955
|
props: {
|
|
4988
|
-
orientation:
|
|
4956
|
+
orientation: ki.Horizontal,
|
|
4989
4957
|
offset: v?.left ?? 0,
|
|
4990
4958
|
viewportSize: v?.width ?? 0,
|
|
4991
4959
|
totalSize: v?.totalWidth ?? 0,
|
|
@@ -4994,8 +4962,8 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
4994
4962
|
}
|
|
4995
4963
|
}
|
|
4996
4964
|
});
|
|
4997
|
-
return
|
|
4998
|
-
className:
|
|
4965
|
+
return P("div", {
|
|
4966
|
+
className: N("sxl-horizontal-container", Rs),
|
|
4999
4967
|
children: e
|
|
5000
4968
|
});
|
|
5001
4969
|
}, [
|
|
@@ -5003,9 +4971,9 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
5003
4971
|
v?.left,
|
|
5004
4972
|
v?.width,
|
|
5005
4973
|
v?.totalWidth
|
|
5006
|
-
]), J =
|
|
5007
|
-
className:
|
|
5008
|
-
children:
|
|
4974
|
+
]), J = L(() => _ && g ? P("div", {
|
|
4975
|
+
className: N("sxl-corner-container", $s),
|
|
4976
|
+
children: P(Po, {
|
|
5009
4977
|
render: c,
|
|
5010
4978
|
props: {}
|
|
5011
4979
|
})
|
|
@@ -5014,36 +4982,36 @@ var rs = 24, is = w(v((e, t) => {
|
|
|
5014
4982
|
g,
|
|
5015
4983
|
c
|
|
5016
4984
|
]);
|
|
5017
|
-
return
|
|
5018
|
-
className:
|
|
4985
|
+
return P("div", {
|
|
4986
|
+
className: N(f, "sxl-scrollpane", zs),
|
|
5019
4987
|
style: d,
|
|
5020
4988
|
...m,
|
|
5021
4989
|
ref: b,
|
|
5022
|
-
children:
|
|
4990
|
+
children: P(ts, {
|
|
5023
4991
|
value: q,
|
|
5024
|
-
children:
|
|
5025
|
-
className:
|
|
4992
|
+
children: R("div", {
|
|
4993
|
+
className: N("sxl-scrollpane-content", As),
|
|
5026
4994
|
children: [
|
|
5027
|
-
|
|
5028
|
-
className:
|
|
4995
|
+
P("div", {
|
|
4996
|
+
className: N("sxl-scrollpane-content-cell", Ds),
|
|
5029
4997
|
children: n
|
|
5030
4998
|
}),
|
|
5031
4999
|
_ ? U : null,
|
|
5032
5000
|
g ? G : null,
|
|
5033
5001
|
J,
|
|
5034
|
-
W ?
|
|
5002
|
+
W ? P("div", {
|
|
5035
5003
|
ref: Z,
|
|
5036
|
-
className:
|
|
5004
|
+
className: N("sxl-touch-thumb-overlay", Bs)
|
|
5037
5005
|
}) : null
|
|
5038
5006
|
]
|
|
5039
5007
|
})
|
|
5040
5008
|
})
|
|
5041
5009
|
});
|
|
5042
5010
|
}));
|
|
5043
|
-
|
|
5044
|
-
var
|
|
5011
|
+
Hs.displayName = "ScrollPane";
|
|
5012
|
+
var Os = (e) => {
|
|
5045
5013
|
const { size: t, style: n, ...o } = e;
|
|
5046
|
-
return
|
|
5014
|
+
return P("div", {
|
|
5047
5015
|
className: "sxl-corner",
|
|
5048
5016
|
style: {
|
|
5049
5017
|
width: "100%",
|
|
@@ -5052,7 +5020,7 @@ var Rs = (e) => {
|
|
|
5052
5020
|
},
|
|
5053
5021
|
...o
|
|
5054
5022
|
});
|
|
5055
|
-
},
|
|
5023
|
+
}, Is = class {
|
|
5056
5024
|
constructor(e) {
|
|
5057
5025
|
this._bounds = {
|
|
5058
5026
|
minLeft: 0,
|
|
@@ -5171,7 +5139,7 @@ var Rs = (e) => {
|
|
|
5171
5139
|
}
|
|
5172
5140
|
_applyBounds(e) {
|
|
5173
5141
|
this._bounds = e;
|
|
5174
|
-
const t =
|
|
5142
|
+
const t = Xs(this._target.left, e.minLeft, e.maxLeft), n = Xs(this._target.top, e.minTop, e.maxTop);
|
|
5175
5143
|
t === this._target.left && n === this._target.top || (this._target = {
|
|
5176
5144
|
left: t,
|
|
5177
5145
|
top: n
|
|
@@ -5193,12 +5161,12 @@ var Rs = (e) => {
|
|
|
5193
5161
|
return this._observe(e, "both");
|
|
5194
5162
|
}
|
|
5195
5163
|
_observe(e, t) {
|
|
5196
|
-
if (!e) return
|
|
5164
|
+
if (!e) return Ys;
|
|
5197
5165
|
const n = (e, n) => {
|
|
5198
5166
|
const o = this._measuredClient;
|
|
5199
5167
|
this._setMeasuredClient("height" === t ? o?.width ?? 0 : e, "width" === t ? o?.height ?? 0 : n);
|
|
5200
5168
|
};
|
|
5201
|
-
if (!
|
|
5169
|
+
if (!js()) return n(0, 0), Ys;
|
|
5202
5170
|
const o = new ResizeObserver((e) => {
|
|
5203
5171
|
const t = e[0]?.contentRect;
|
|
5204
5172
|
t && n(t.width, t.height);
|
|
@@ -5245,17 +5213,17 @@ var Rs = (e) => {
|
|
|
5245
5213
|
}
|
|
5246
5214
|
setTarget(e, t, n) {
|
|
5247
5215
|
const o = this._bounds;
|
|
5248
|
-
return e =
|
|
5216
|
+
return e = Xs(e, o.minLeft, o.maxLeft), t = Xs(t, o.minTop, o.maxTop), this._target.left === e && this._target.top === t ? (this._current.left === e && this._current.top === t || this._ensureTicking(), !1) : (this._target = {
|
|
5249
5217
|
left: e,
|
|
5250
5218
|
top: t
|
|
5251
5219
|
}, n ? this._startAnimation() : this._anim = null, this._ensureTicking(), !0);
|
|
5252
5220
|
}
|
|
5253
5221
|
_startAnimation() {
|
|
5254
|
-
const e = this._current, t = this._target, n = this._effClient(), o = n.width > 0 ? n.width *
|
|
5255
|
-
this._anim = a <=
|
|
5222
|
+
const e = this._current, t = this._target, n = this._effClient(), o = n.width > 0 ? n.width * Ws : 1 / 0, r = n.height > 0 ? n.height * Ws : 1 / 0, i = Xs(e.left, t.left - o, t.left + o), s = Xs(e.top, t.top - r, t.top + r), l = Math.max(Math.abs(t.left - i), Math.abs(t.top - s)), a = Math.min(200, l * Fs);
|
|
5223
|
+
this._anim = a <= Ks ? null : {
|
|
5256
5224
|
fromLeft: i,
|
|
5257
5225
|
fromTop: s,
|
|
5258
|
-
start:
|
|
5226
|
+
start: Vs(),
|
|
5259
5227
|
duration: a
|
|
5260
5228
|
};
|
|
5261
5229
|
}
|
|
@@ -5294,7 +5262,7 @@ var Rs = (e) => {
|
|
|
5294
5262
|
const e = this._current, t = this._target, n = this._anim;
|
|
5295
5263
|
let o, r, i = !1;
|
|
5296
5264
|
if (n) {
|
|
5297
|
-
const e = (
|
|
5265
|
+
const e = (Vs() - n.start) / n.duration;
|
|
5298
5266
|
if (e >= 1) o = t.left, r = t.top, this._anim = null;
|
|
5299
5267
|
else {
|
|
5300
5268
|
const s = 1 - Math.pow(1 - e, 3);
|
|
@@ -5306,7 +5274,7 @@ var Rs = (e) => {
|
|
|
5306
5274
|
top: r
|
|
5307
5275
|
}, this._viewport = null, this._emit()), i;
|
|
5308
5276
|
}
|
|
5309
|
-
},
|
|
5277
|
+
}, Ns = 200, Fs = 2.5, Ws = 1.5, Ks = 17, Vs = () => "undefined" != typeof performance ? performance.now() : Date.now(), js = () => "undefined" != typeof ResizeObserver, Ys = () => {}, Xs = (e, t, n) => Math.min(n, Math.max(t, e)), Zs = class {
|
|
5310
5278
|
constructor(e, t, n, o, r) {
|
|
5311
5279
|
this._h = e, this._v = t, this._followH = n, this._followV = o, this._zoomCtrl = r, this._combined = null, this._hSnap = null, this._vSnap = null, this._vp = null, this._vpH = null, this._vpV = null;
|
|
5312
5280
|
}
|
|
@@ -5419,10 +5387,10 @@ var Rs = (e) => {
|
|
|
5419
5387
|
setContent(e, t, n = 0, o = 0) {
|
|
5420
5388
|
this._same ? this._h.setContent(e, t, n, o) : (this._followH || this._h.setContentAxis("width", e, n), this._followV || this._v.setContentAxis("height", t, o));
|
|
5421
5389
|
}
|
|
5422
|
-
},
|
|
5423
|
-
const { offset: n = 0, viewportSize: o = 0, totalSize: r = 0, minSize: i = 0, endGap: s =
|
|
5390
|
+
}, qs = 300, Us = 100, Gs = 1e6, Js = 100, Qs = 50, el = w(v((e, t) => {
|
|
5391
|
+
const { offset: n = 0, viewportSize: o = 0, totalSize: r = 0, minSize: i = 0, endGap: s = qs, endScrollIncrement: l = Us, style: a = Be, onMouseDown: c, onThumbDrag: u, onScrollOffset: h, onScroll: d, scaleLimit: f = Gs, scaleFactor: p = Js, precisionFactor: m = Qs, renderScrollbar: g = Ls, ..._ } = e;
|
|
5424
5392
|
d && console.warn("onScroll not supported for VirtualScrollbar. Use onScrollOffset instead");
|
|
5425
|
-
const v =
|
|
5393
|
+
const v = jt(c ?? (() => {}), [c]), [y, b] = z(!1), w = k(0), S = L(() => {
|
|
5426
5394
|
let e = 0 === f ? r : Math.min(r ?? 0, Math.max(i ?? 0, (n ?? 0) + (o ?? 0)) + (s ?? 0));
|
|
5427
5395
|
y && (e = Math.max(e, w.current)), w.current = e;
|
|
5428
5396
|
const t = 0 !== f && e > f ? p : 1, l = t / m, a = Math.ceil(e / t);
|
|
@@ -5444,24 +5412,24 @@ var Rs = (e) => {
|
|
|
5444
5412
|
i,
|
|
5445
5413
|
s,
|
|
5446
5414
|
l
|
|
5447
|
-
]), M =
|
|
5415
|
+
]), M = jt((e, t, n) => {
|
|
5448
5416
|
const o = S.offset;
|
|
5449
5417
|
Math.abs(e - o) < S.precision && (e = o), h?.(e * S.factor, o, S.viewportSize);
|
|
5450
|
-
}, [h, S]), E =
|
|
5418
|
+
}, [h, S]), E = jt((e, t) => {
|
|
5451
5419
|
const n = 1 + Math.min(3, t.heldMs / 1e3), o = Math.max(0, S.scaledTotalSize - S.scaledViewportSize), r = Math.min(o, Math.max(0, S.scaledOffset + e * l * n));
|
|
5452
5420
|
return r !== S.scaledOffset && (h?.(r, S.scaledViewportSize, S.scaledTotalSize), !0);
|
|
5453
5421
|
}, [
|
|
5454
5422
|
S,
|
|
5455
5423
|
l,
|
|
5456
5424
|
h
|
|
5457
|
-
]), C =
|
|
5425
|
+
]), C = jt((e) => {
|
|
5458
5426
|
b(e.dragging), u?.(e);
|
|
5459
|
-
}, [u]),
|
|
5460
|
-
document.removeEventListener("mousemove",
|
|
5427
|
+
}, [u]), T = x((e) => {}, []), A = x((e) => {
|
|
5428
|
+
document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", A), b(!1);
|
|
5461
5429
|
}, []), D = x((e) => {
|
|
5462
|
-
b(!0), v?.(e), document.addEventListener("mousemove",
|
|
5463
|
-
}, [
|
|
5464
|
-
return
|
|
5430
|
+
b(!0), v?.(e), document.addEventListener("mousemove", T, { passive: !0 }), document.addEventListener("mouseup", A, { passive: !0 });
|
|
5431
|
+
}, [T, A]);
|
|
5432
|
+
return P(Po, {
|
|
5465
5433
|
render: g,
|
|
5466
5434
|
props: {
|
|
5467
5435
|
style: a,
|
|
@@ -5477,27 +5445,15 @@ var Rs = (e) => {
|
|
|
5477
5445
|
}
|
|
5478
5446
|
});
|
|
5479
5447
|
}));
|
|
5480
|
-
|
|
5481
|
-
var
|
|
5482
|
-
"--scrollbar-track-color": e.track,
|
|
5483
|
-
"--scrollbar-thumb-color": e.thumb,
|
|
5484
|
-
"--scrollbar-button-color": e.button || e.thumb,
|
|
5485
|
-
"--scrollbar-active-color": e.active,
|
|
5486
|
-
"--scrollbar-corner-color": e.corner || e.thumb,
|
|
5487
|
-
"--scrollbar-border-color": e.border ?? e.track,
|
|
5488
|
-
"--scrollbar-width": "13px",
|
|
5489
|
-
"--scrollbar-height": "13px",
|
|
5490
|
-
"--scrollbar-border-radius": "9999px",
|
|
5491
|
-
"--scrollbar-border-width": "2px",
|
|
5492
|
-
"--scrollbar-min-thumb-size": "24px"
|
|
5493
|
-
}), Qs = (e) => {
|
|
5448
|
+
el.displayName = "VirtualScrollbar";
|
|
5449
|
+
var tl = ss, nl = (e) => {
|
|
5494
5450
|
if ("undefined" == typeof window) return !1;
|
|
5495
|
-
const t =
|
|
5451
|
+
const t = ao();
|
|
5496
5452
|
if (t?.overlaysContent) return t.boundingRect.height > 150;
|
|
5497
5453
|
const n = window.visualViewport;
|
|
5498
5454
|
return !!n && (e ?? window.innerHeight) - n.height * n.scale > 150;
|
|
5499
|
-
},
|
|
5500
|
-
const t = Object.freeze({ ...e }), n = !(t.disabled ?? "mouseOnly" ===
|
|
5455
|
+
}, ol = (e) => {
|
|
5456
|
+
const t = Object.freeze({ ...e }), n = !(t.disabled ?? "mouseOnly" === Ne().deviceType);
|
|
5501
5457
|
let o = {
|
|
5502
5458
|
active: !1,
|
|
5503
5459
|
inputMode: "text"
|
|
@@ -5529,8 +5485,8 @@ var Gs = "_scrollbar-themed_nj3vu_7", Js = (e) => ({
|
|
|
5529
5485
|
i.delete(e);
|
|
5530
5486
|
})
|
|
5531
5487
|
};
|
|
5532
|
-
},
|
|
5533
|
-
const { store: t, disabled: n, disableScrollIntoView: o, keepOnTap: r, children: i } = e, s =
|
|
5488
|
+
}, rl = null, il = g(null), sl = (e) => {
|
|
5489
|
+
const { store: t, disabled: n, disableScrollIntoView: o, keepOnTap: r, children: i } = e, s = L(() => t ?? ol({
|
|
5534
5490
|
disabled: n,
|
|
5535
5491
|
disableScrollIntoView: o,
|
|
5536
5492
|
keepOnTap: r
|
|
@@ -5540,20 +5496,20 @@ var Gs = "_scrollbar-themed_nj3vu_7", Js = (e) => ({
|
|
|
5540
5496
|
o,
|
|
5541
5497
|
r
|
|
5542
5498
|
]);
|
|
5543
|
-
return _(
|
|
5544
|
-
},
|
|
5545
|
-
const e =
|
|
5546
|
-
return
|
|
5547
|
-
},
|
|
5548
|
-
null === t &&
|
|
5549
|
-
},
|
|
5550
|
-
|
|
5551
|
-
}),
|
|
5552
|
-
const { floating: n, anchor: o = null, onShownChange: r, onKeyboardClose: i, className: s, style: l, children: a } = e, [c, u] =
|
|
5499
|
+
return _(il.Provider, { value: s }, i);
|
|
5500
|
+
}, ll = () => S(il) ?? (rl || (rl = ol()), rl), al = () => {
|
|
5501
|
+
const e = ll();
|
|
5502
|
+
return A(e.subscribe, e.getState, e.getState), e;
|
|
5503
|
+
}, cl = null, ul = null, hl = /* @__PURE__ */ new Set(), dl = (e, t) => {
|
|
5504
|
+
null === t && ul !== e || cl === t && ul === e || (cl = t, ul = null === t ? null : e, hl.forEach((e) => e()));
|
|
5505
|
+
}, fl = () => cl, pl = (e) => (hl.add(e), () => {
|
|
5506
|
+
hl.delete(e);
|
|
5507
|
+
}), ml = v((e, t) => {
|
|
5508
|
+
const { floating: n, anchor: o = null, onShownChange: r, onKeyboardClose: i, className: s, style: l, children: a } = e, [c, u] = z(null), h = x((e) => {
|
|
5553
5509
|
u(e), "function" == typeof t ? t(e) : t && (t.current = e);
|
|
5554
|
-
}, [t]), d =
|
|
5510
|
+
}, [t]), d = k(n);
|
|
5555
5511
|
d.current = n;
|
|
5556
|
-
const f =
|
|
5512
|
+
const f = k({
|
|
5557
5513
|
onShownChange: r,
|
|
5558
5514
|
onKeyboardClose: i
|
|
5559
5515
|
});
|
|
@@ -5561,17 +5517,17 @@ var Gs = "_scrollbar-themed_nj3vu_7", Js = (e) => ({
|
|
|
5561
5517
|
onShownChange: r,
|
|
5562
5518
|
onKeyboardClose: i
|
|
5563
5519
|
};
|
|
5564
|
-
const p =
|
|
5565
|
-
|
|
5520
|
+
const p = k(null);
|
|
5521
|
+
_o(() => {
|
|
5566
5522
|
if (!c || "undefined" == typeof window) return;
|
|
5567
5523
|
const e = {};
|
|
5568
5524
|
let t = 0, n = 0, o = !1, r = !1, i = window.innerHeight, s = !1;
|
|
5569
|
-
const l =
|
|
5525
|
+
const l = ao();
|
|
5570
5526
|
let a = !1;
|
|
5571
5527
|
const u = (e) => {
|
|
5572
5528
|
l && e !== a && (a = e, l.overlaysContent = e);
|
|
5573
5529
|
}, h = (t) => {
|
|
5574
|
-
t !== r && (r = t, c.style.opacity = t ? "1" : "0", c.style.pointerEvents = t ? "auto" : "none", t ||
|
|
5530
|
+
t !== r && (r = t, c.style.opacity = t ? "1" : "0", c.style.pointerEvents = t ? "auto" : "none", t || dl(e, null), f.current.onShownChange?.(t));
|
|
5575
5531
|
}, m = () => {
|
|
5576
5532
|
t = 0;
|
|
5577
5533
|
const n = window.visualViewport, r = n?.scale ?? 1, i = n?.offsetTop ?? 0, s = n?.height ?? window.innerHeight, u = d.current && !o;
|
|
@@ -5580,11 +5536,11 @@ var Gs = "_scrollbar-themed_nj3vu_7", Js = (e) => ({
|
|
|
5580
5536
|
const e = l.boundingRect.height;
|
|
5581
5537
|
c.style.bottom = "auto", c.style.top = i + s - (e + c.offsetHeight) / r + "px", c.style.left = `${n.offsetLeft}px`, c.style.width = n.width * r + "px", c.style.transform = `scale(${1 / r})`;
|
|
5582
5538
|
} else c.style.top = "auto", c.style.bottom = "env(keyboard-inset-height, 0px)", c.style.left = "0px", c.style.width = "100%", c.style.transform = "";
|
|
5583
|
-
c.style.transition = "opacity 150ms ease-out", h(!0),
|
|
5539
|
+
c.style.transition = "opacity 150ms ease-out", h(!0), dl(e, c.getBoundingClientRect().top);
|
|
5584
5540
|
return;
|
|
5585
5541
|
}
|
|
5586
5542
|
const f = u ? i + s - c.offsetHeight / r : i;
|
|
5587
|
-
c.style.bottom = "auto", c.style.top = `${f}px`, c.style.left = `${n?.offsetLeft ?? 0}px`, c.style.width = (n?.width ?? window.innerWidth) * r + "px", c.style.transform = 1 !== r ? `scale(${1 / r})` : "", u ? (c.style.transition = "opacity 150ms ease-out", h(!0),
|
|
5543
|
+
c.style.bottom = "auto", c.style.top = `${f}px`, c.style.left = `${n?.offsetLeft ?? 0}px`, c.style.width = (n?.width ?? window.innerWidth) * r + "px", c.style.transform = 1 !== r ? `scale(${1 / r})` : "", u ? (c.style.transition = "opacity 150ms ease-out", h(!0), dl(e, f)) : (c.style.transition = "none", h(!1));
|
|
5588
5544
|
}, g = () => {
|
|
5589
5545
|
t || (t = requestAnimationFrame(m));
|
|
5590
5546
|
}, _ = () => {
|
|
@@ -5594,10 +5550,10 @@ var Gs = "_scrollbar-themed_nj3vu_7", Js = (e) => ({
|
|
|
5594
5550
|
}, v = () => {
|
|
5595
5551
|
_(), g();
|
|
5596
5552
|
}, y = () => {
|
|
5597
|
-
v(), d.current && (
|
|
5553
|
+
v(), d.current && (nl(i) ? s = !0 : s && (s = !1, f.current.onKeyboardClose?.()));
|
|
5598
5554
|
}, b = () => {
|
|
5599
5555
|
s = !1, window.setTimeout(() => {
|
|
5600
|
-
|
|
5556
|
+
nl() || (i = window.innerHeight);
|
|
5601
5557
|
}, 300);
|
|
5602
5558
|
};
|
|
5603
5559
|
p.current = () => {
|
|
@@ -5611,17 +5567,17 @@ var Gs = "_scrollbar-themed_nj3vu_7", Js = (e) => ({
|
|
|
5611
5567
|
c.addEventListener("focusin", x), c.addEventListener("focusout", S), l?.addEventListener("geometrychange", y);
|
|
5612
5568
|
const M = window.visualViewport;
|
|
5613
5569
|
return M?.addEventListener("resize", y), M?.addEventListener("scroll", v), window.addEventListener("scroll", v, { passive: !0 }), window.addEventListener("resize", v), window.addEventListener("orientationchange", b), d.current && p.current(), m(), () => {
|
|
5614
|
-
cancelAnimationFrame(t), clearTimeout(n), w?.disconnect(), M?.removeEventListener("resize", y), M?.removeEventListener("scroll", v), window.removeEventListener("scroll", v), window.removeEventListener("resize", v), window.removeEventListener("orientationchange", b), c.removeEventListener("focusin", x), c.removeEventListener("focusout", S), l?.removeEventListener("geometrychange", y), u(!1), p.current = null,
|
|
5570
|
+
cancelAnimationFrame(t), clearTimeout(n), w?.disconnect(), M?.removeEventListener("resize", y), M?.removeEventListener("scroll", v), window.removeEventListener("scroll", v), window.removeEventListener("resize", v), window.removeEventListener("orientationchange", b), c.removeEventListener("focusin", x), c.removeEventListener("focusout", S), l?.removeEventListener("geometrychange", y), u(!1), p.current = null, dl(e, null), r && f.current.onShownChange?.(!1);
|
|
5615
5571
|
};
|
|
5616
5572
|
}, [c]), M(() => {
|
|
5617
5573
|
p.current?.();
|
|
5618
5574
|
}, [n]);
|
|
5619
|
-
const m =
|
|
5575
|
+
const m = Ar(), g = zr(o), { className: _, attrs: v } = kr(m), y = _ || Object.keys(v).length > 0 ? v : g, { getPortalContainer: b } = ln(), [, w] = z(0);
|
|
5620
5576
|
return M(() => {
|
|
5621
5577
|
c && !c.isConnected && w((e) => e + 1);
|
|
5622
|
-
}), "undefined" == typeof document ? null : H(
|
|
5578
|
+
}), "undefined" == typeof document ? null : H(P("div", {
|
|
5623
5579
|
ref: h,
|
|
5624
|
-
className:
|
|
5580
|
+
className: N("sxl-keyboard-accessory", _, s),
|
|
5625
5581
|
...y,
|
|
5626
5582
|
style: {
|
|
5627
5583
|
position: "fixed",
|
|
@@ -5629,7 +5585,7 @@ var Gs = "_scrollbar-themed_nj3vu_7", Js = (e) => ({
|
|
|
5629
5585
|
left: 0,
|
|
5630
5586
|
boxSizing: "border-box",
|
|
5631
5587
|
transformOrigin: "top left",
|
|
5632
|
-
zIndex:
|
|
5588
|
+
zIndex: Xo("grid"),
|
|
5633
5589
|
opacity: 0,
|
|
5634
5590
|
pointerEvents: "none",
|
|
5635
5591
|
...l
|
|
@@ -5637,12 +5593,12 @@ var Gs = "_scrollbar-themed_nj3vu_7", Js = (e) => ({
|
|
|
5637
5593
|
children: a
|
|
5638
5594
|
}), b());
|
|
5639
5595
|
});
|
|
5640
|
-
|
|
5641
|
-
var
|
|
5596
|
+
ml.displayName = "KeyboardAccessory";
|
|
5597
|
+
var gl = {
|
|
5642
5598
|
inset: 0,
|
|
5643
5599
|
offsetTop: 0
|
|
5644
|
-
},
|
|
5645
|
-
const t =
|
|
5600
|
+
}, _l = (e) => {
|
|
5601
|
+
const t = go(e), n = !!t && nl(), o = t?.height, r = k(!1);
|
|
5646
5602
|
return M(() => {
|
|
5647
5603
|
if (void 0 === o) return;
|
|
5648
5604
|
const e = r.current;
|
|
@@ -5650,46 +5606,46 @@ var fl = {
|
|
|
5650
5606
|
}, [o, n]), t && n ? {
|
|
5651
5607
|
inset: Math.max(0, Math.round(window.innerHeight - t.height)),
|
|
5652
5608
|
offsetTop: Math.round(t.offsetTop)
|
|
5653
|
-
} :
|
|
5609
|
+
} : gl;
|
|
5654
5610
|
};
|
|
5655
|
-
var
|
|
5656
|
-
axis:
|
|
5611
|
+
var vl = {
|
|
5612
|
+
axis: Z.oneOf([
|
|
5657
5613
|
"both",
|
|
5658
5614
|
"x",
|
|
5659
5615
|
"y",
|
|
5660
5616
|
"none"
|
|
5661
5617
|
]),
|
|
5662
|
-
className:
|
|
5663
|
-
children:
|
|
5664
|
-
draggableOpts:
|
|
5665
|
-
allowAnyClick:
|
|
5666
|
-
cancel:
|
|
5667
|
-
children:
|
|
5668
|
-
disabled:
|
|
5669
|
-
enableUserSelectHack:
|
|
5670
|
-
offsetParent: "undefined" != typeof Element ?
|
|
5671
|
-
grid:
|
|
5672
|
-
handle:
|
|
5673
|
-
nodeRef:
|
|
5674
|
-
onStart:
|
|
5675
|
-
onDrag:
|
|
5676
|
-
onStop:
|
|
5677
|
-
onMouseDown:
|
|
5678
|
-
scale:
|
|
5618
|
+
className: Z.string,
|
|
5619
|
+
children: Z.element.isRequired,
|
|
5620
|
+
draggableOpts: Z.shape({
|
|
5621
|
+
allowAnyClick: Z.bool,
|
|
5622
|
+
cancel: Z.string,
|
|
5623
|
+
children: Z.node,
|
|
5624
|
+
disabled: Z.bool,
|
|
5625
|
+
enableUserSelectHack: Z.bool,
|
|
5626
|
+
offsetParent: "undefined" != typeof Element ? Z.instanceOf(Element) : Z.any,
|
|
5627
|
+
grid: Z.arrayOf(Z.number),
|
|
5628
|
+
handle: Z.string,
|
|
5629
|
+
nodeRef: Z.object,
|
|
5630
|
+
onStart: Z.func,
|
|
5631
|
+
onDrag: Z.func,
|
|
5632
|
+
onStop: Z.func,
|
|
5633
|
+
onMouseDown: Z.func,
|
|
5634
|
+
scale: Z.number
|
|
5679
5635
|
}),
|
|
5680
5636
|
height: (...e) => {
|
|
5681
5637
|
const [t] = e;
|
|
5682
|
-
return "both" === t.axis || "y" === t.axis ?
|
|
5638
|
+
return "both" === t.axis || "y" === t.axis ? Z.number.isRequired(...e) : Z.number(...e);
|
|
5683
5639
|
},
|
|
5684
|
-
handle:
|
|
5685
|
-
handleSize:
|
|
5686
|
-
lockAspectRatio:
|
|
5687
|
-
maxConstraints:
|
|
5688
|
-
minConstraints:
|
|
5689
|
-
onResizeStop:
|
|
5690
|
-
onResizeStart:
|
|
5691
|
-
onResize:
|
|
5692
|
-
resizeHandles:
|
|
5640
|
+
handle: Z.oneOfType([Z.node, Z.func]),
|
|
5641
|
+
handleSize: Z.arrayOf(Z.number),
|
|
5642
|
+
lockAspectRatio: Z.bool,
|
|
5643
|
+
maxConstraints: Z.arrayOf(Z.number),
|
|
5644
|
+
minConstraints: Z.arrayOf(Z.number),
|
|
5645
|
+
onResizeStop: Z.func,
|
|
5646
|
+
onResizeStart: Z.func,
|
|
5647
|
+
onResize: Z.func,
|
|
5648
|
+
resizeHandles: Z.arrayOf(Z.oneOf([
|
|
5693
5649
|
"s",
|
|
5694
5650
|
"w",
|
|
5695
5651
|
"e",
|
|
@@ -5699,17 +5655,17 @@ var ml = {
|
|
|
5699
5655
|
"se",
|
|
5700
5656
|
"ne"
|
|
5701
5657
|
])),
|
|
5702
|
-
transformScale:
|
|
5658
|
+
transformScale: Z.number,
|
|
5703
5659
|
width: (...e) => {
|
|
5704
5660
|
const [t] = e;
|
|
5705
|
-
return "both" === t.axis || "x" === t.axis ?
|
|
5661
|
+
return "both" === t.axis || "x" === t.axis ? Z.number.isRequired(...e) : Z.number(...e);
|
|
5706
5662
|
}
|
|
5707
|
-
},
|
|
5663
|
+
}, yl = class extends d.Component {
|
|
5708
5664
|
constructor(...e) {
|
|
5709
5665
|
super(...e), this.handleRefs = {}, this.lastHandleRect = null, this.slack = null, this.lastSize = null;
|
|
5710
5666
|
}
|
|
5711
5667
|
static {
|
|
5712
|
-
this.propTypes =
|
|
5668
|
+
this.propTypes = vl;
|
|
5713
5669
|
}
|
|
5714
5670
|
static {
|
|
5715
5671
|
this.defaultProps = {
|
|
@@ -5770,7 +5726,7 @@ var ml = {
|
|
|
5770
5726
|
}
|
|
5771
5727
|
renderResizeHandle(e, t) {
|
|
5772
5728
|
const { handle: n } = this.props;
|
|
5773
|
-
if (!n) return
|
|
5729
|
+
if (!n) return P("span", {
|
|
5774
5730
|
className: `react-resizable-handle react-resizable-handle-${e}`,
|
|
5775
5731
|
ref: t
|
|
5776
5732
|
});
|
|
@@ -5788,7 +5744,7 @@ var ml = {
|
|
|
5788
5744
|
className: (t ? `${t} ` : "") + "react-resizable",
|
|
5789
5745
|
children: [...d.Children.toArray(e.props.children), ...g.map((e) => {
|
|
5790
5746
|
const t = this.handleRefs[e] ?? (this.handleRefs[e] = d.createRef());
|
|
5791
|
-
return _(
|
|
5747
|
+
return _(X, {
|
|
5792
5748
|
...n,
|
|
5793
5749
|
nodeRef: t,
|
|
5794
5750
|
key: `resizableHandle-${e}`,
|
|
@@ -5803,7 +5759,7 @@ var ml = {
|
|
|
5803
5759
|
}), w.className && b.props.className && (w.className = `${b.props.className} ${w.className}`), f.cloneElement(b, w);
|
|
5804
5760
|
var b, w;
|
|
5805
5761
|
}
|
|
5806
|
-
},
|
|
5762
|
+
}, bl = class extends d.Component {
|
|
5807
5763
|
constructor(...e) {
|
|
5808
5764
|
super(...e), this.state = {
|
|
5809
5765
|
width: this.props.width,
|
|
@@ -5817,8 +5773,8 @@ var ml = {
|
|
|
5817
5773
|
}
|
|
5818
5774
|
static {
|
|
5819
5775
|
this.propTypes = {
|
|
5820
|
-
...
|
|
5821
|
-
children:
|
|
5776
|
+
...vl,
|
|
5777
|
+
children: Z.element
|
|
5822
5778
|
};
|
|
5823
5779
|
}
|
|
5824
5780
|
static getDerivedStateFromProps(e, t) {
|
|
@@ -5831,7 +5787,7 @@ var ml = {
|
|
|
5831
5787
|
}
|
|
5832
5788
|
render() {
|
|
5833
5789
|
const { handle: e, handleSize: t, onResize: n, onResizeStart: o, onResizeStop: r, draggableOpts: i, minConstraints: s, maxConstraints: l, lockAspectRatio: a, axis: c, width: u, height: h, resizeHandles: d, style: f, transformScale: p, ...m } = this.props;
|
|
5834
|
-
return
|
|
5790
|
+
return P(yl, {
|
|
5835
5791
|
axis: c,
|
|
5836
5792
|
draggableOpts: i,
|
|
5837
5793
|
handle: e,
|
|
@@ -5846,7 +5802,7 @@ var ml = {
|
|
|
5846
5802
|
resizeHandles: d,
|
|
5847
5803
|
transformScale: p,
|
|
5848
5804
|
width: this.state.width,
|
|
5849
|
-
children:
|
|
5805
|
+
children: P("div", {
|
|
5850
5806
|
...m,
|
|
5851
5807
|
style: {
|
|
5852
5808
|
...f,
|
|
@@ -5857,4 +5813,4 @@ var ml = {
|
|
|
5857
5813
|
});
|
|
5858
5814
|
}
|
|
5859
5815
|
};
|
|
5860
|
-
export {
|
|
5816
|
+
export { te as ACCUMULATE, $t as AnimationModeProvider, Zs as AxisViewport, Uo as BRACKET_COUNT, At as Command, mt as CommandAnchorProvider, de as CommandButtonEntryLabel, ae as CommandButtonRegistryContext, ue as CommandButtonRegistryProvider, ee as CommandButtonType, rt as CommandChainContext, _t as CommandFallbackContext, bt as CommandFallbackProvider, xt as CommandFocusProvider, st as CommandOrderContext, oe as CommandRegistry, Ce as CommandRegistryContext, ot as CommandResolver, ft as CommandResolverContext, Te as CommandScope, at as CommandScopeContext, ht as CommandScopeProvider, Ae as ConstantActivation, le as DefaultCommandButtonRegistry, Ee as DefaultCommandCatalogService, re as DefaultCommandRegistry, ii as DefaultIconService, ai as DynamicIcon, Fi as EDGE_HOLD_INTERVAL_MS, Wr as FloatPanel, Fr as FloatPanelSurface, Hr as FloatPopper, Vr as FloatProvider, Et as FloatStackProvider, De as FocusActivation, Do as FocusKeyNavigation, ir as INPUT_SELECTION_TINT, rr as INPUT_SELECTION_VAR, ui as InMemoryStore, Je as KeyBindingDispatcher, J as KeyCodes, G as KeyModifiers, ml as KeyboardAccessory, Vn as LanguageStateKey, Pe as LayerActivation, Si as LocalStorageStore, ze as ManualActivation, Q as MouseButtonCodes, Bt as NotifierType, Wi as PAGE_INITIAL_DELAY_MS, Ki as PAGE_REPEAT_DELAY_MS, yi as PendingRender, Li as PendingRenderScope, vi as PersistentStateProvider, fe as QUICK_ACTION_TAG, No as ReactErrorBoundary, Kt as ReactNotifierProvider, Re as ReactUtils, Po as RenderSlot, yl as Resizable, bl as ResizableBox, $o as RoundedTab, Ns as SCROLL_ANIMATION_MS, qo as SERIES_COUNT, lr as SXL_THEME_LAYERS, ar as SXL_THEME_LAYER_ORDER, Hs as ScrollPane, Es as ScrollUtils, cs as Scrollbar, ki as ScrollbarOrientation, Jr as SplitPane, Xr as SplitPaneResizer, hr as THEME_MODE_ATTR, dr as THEME_SURFACE_ATTR, Xi as TOUCH_THUMB_ASPECT, Zi as TOUCH_THUMB_MARGIN, Ui as TOUCH_THUMB_MARGIN_CROSS, Gi as TOUCH_THUMB_MARGIN_END, qi as TOUCH_THUMB_MARGIN_START, Yi as TOUCH_THUMB_SIZE, vr as ThemeModeFallbackContext, _r as ThemeStyle, ts as TouchThumbFrameProvider, is as TouchThumbHandle, jo as UncaughtErrorBoundary, Is as Viewport, sl as VirtualKeyboardProvider, el as VirtualScrollbar, ci as WalkingIcon, Yo as Z_INDEX, be as asCommandCatalog, ut as attachWhenReady, ur as buildThemeCSS, xe as chromeToPartial, Zn as composeCaretRect, Ht as createBusyHandle, Me as createCommandCatalogService, ri as createDynamicIconService, Ot as createNoopBusyHandle, me as createResolvedCommand, pr as createThemeScopeClass, Vi as createTrackDrag, ol as createVirtualKeyboardStore, Kr as defaultRenderFloatPanel, Ir as defaultRenderFloatPopupPanel, Ni as defaultRenderScrollButtonEdge, Ii as defaultRenderScrollButtonEnd, Oi as defaultRenderScrollButtonStart, Os as defaultRenderScrollCorner, Go as defaultTheme, gr as ensureThemeLayerOrder, Fn as exitEditMode, we as fetchCatalog, kr as floatThemeScopeProps, Jt as getDevicePixelRatio, yn as getInputModality, fl as getKeyboardAccessoryTop, Un as getTextareaCaretRect, ho as getVisualViewportRect, Ge as isCaretKey, nl as isVirtualKeyboardUp, et as keyEventCanonicals, Qe as keyStrokeToCanonical, Oo as lazyComponent, fn as measureUIText, Se as mergeChrome, Zo as offsetZIndex, ve as parseShortcutString, ne as reduceDefinitions, ke as resolveAnchorSource, Sr as resolveToken, Mr as resolveTokens, tl as scrollbarThemedClassName, ye as serializeShortcut, In as setEditMode, Wn as subscribeEditModeExit, wn as subscribeInputModality, pl as subscribeKeyboardAccessoryTop, fo as subscribeVisualViewport, fr as themeSurfaceProps, er as themeVars, Qo as toVars, nr as tokenVar, Qi as touchThumbCornerReserve, Ji as touchThumbCrossInset, Ao as useAnimatedMeasure, Rt as useAnimationMode, Zt as useBoundSyncExternalStore, jt as useCallbackRef, he as useCommandButtonEntry, ce as useCommandButtonRegistry, it as useCommandChain, dt as useCommandElement, gt as useCommandExecute, vt as useCommandFallback, St as useCommandFocusRestore, lt as useCommandOrder, Le as useCommandRegistry, pt as useCommandResolver, ct as useCommandScope, kt as useCommands, zt as useContributeCommands, Gt as useDevicePixelRatio, Kn as useEditMode, Ct as useFloat, Tt as useFloatPopupOpen, jr as useFloatStack, Tr as useFloatSurface, en as useFullscreen, ln as useFullscreenPortal, Jn as useGlobalClipboard, io as useId, lo as useImperativeElement, Sn as useInputModality, _o as useIsomorphicLayoutEffect, _l as useKeyboardResize, jn as useLanguage, Ho as useLazyRetry, Co as useLocationSearch, yo as useMeasure, mn as useMouseDownAndHoldListener, Vt as useNotifier, Qt as useOnClickOrFocusAway, Ut as useOptionalBoundSyncExternalStore, Xt as useOptionalSyncExternalStore, Ti as usePendingRender, gi as usePersistentState, yr as useResolvedThemeMode, pn as useSynchronizedPointerHandler, dn as useTextSelectionDrag, Gn as useTextareaCaretRect, ns as useTouchThumbFrame, Qn as useTraceUpdate, ji as useTrackDrag, Yn as useTranslator, al as useVirtualKeyboard, ll as useVirtualKeyboardStore, go as useVisualViewportRect, Ei as whenRenderSettled, Xo as zIndexVar };
|