@sheetxl/utils-react 0.7.5 → 0.7.6
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/cjs/B9stfyU9EqTwUsA3.cjs +6 -0
- package/browser/cjs/index.cjs +3 -3
- package/browser/esm/CxY-6HIFmPob67ga.mjs +12 -0
- package/browser/esm/index.mjs +882 -602
- package/node/assets/style.css +1 -1
- package/node/esm/index.mjs +1034 -752
- package/node/esm/iqYVEUkNtlVZ_Hro.mjs +12 -0
- package/package.json +2 -2
- package/types/index.d.ts +231 -10
package/node/esm/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.
|
|
2
|
+
* @license @sheetxl/utils-react - Utils React - Utilities for React capabilities needed for all SheetXL components. - v0.7.6
|
|
3
3
|
*
|
|
4
4
|
* (C) 2025-present SheetXL Inc. & Michael T. Ford
|
|
5
5
|
* License: The license can be found at https://www.sheetxl.com/license.
|
|
6
6
|
*/
|
|
7
|
-
import { jsx as
|
|
8
|
-
import o, { useCallback as i, useRef as r, memo as s, forwardRef as l, useState as a, useEffect as c, useMemo as h, useImperativeHandle as u, useLayoutEffect as d, createContext as
|
|
7
|
+
import { jsx as t, jsxs as e, Fragment as n } from "react/jsx-runtime";
|
|
8
|
+
import o, { useCallback as i, useRef as r, memo as s, forwardRef as l, useState as a, useEffect as c, useMemo as h, useImperativeHandle as u, useLayoutEffect as d, createContext as p, useContext as f, createElement as _, useReducer as m } from "react";
|
|
9
9
|
import g from "clsx";
|
|
10
10
|
import { useMeasure as y } from "react-use";
|
|
11
11
|
import { CommonUtils as v, DefaultNotifier as x, Notifier as w, InternalClipboard as b, ClipboardUtils as S, MimeType as L } from "@sheetxl/utils";
|
|
@@ -13,708 +13,985 @@ import * as E from "detect-it";
|
|
|
13
13
|
import { mergeRefs as C } from "react-merge-refs";
|
|
14
14
|
import { createRoot as T } from "react-dom/client";
|
|
15
15
|
import { unstable_batchedUpdates as M } from "react-dom";
|
|
16
|
-
const
|
|
17
|
-
const n2 = i((...
|
|
16
|
+
const k = { General: "general", Left: "left", Right: "right", Center: "center", Justify: "justify", Fill: "fill", Distributed: "distributed", CenterContinuous: "centerContinuous" }, D = { Shift: "shift", Alt: "alt", Ctrl: "ctrl", Meta: "meta" }, P = { BackSpace: 8, Tab: 9, Clear: 12, Enter: 13, Shift: 16, Control: 17, Alt: 18, Pause: 19, CapsLock: 20, Escape: 27, Space: 32, PageUp: 33, PageDown: 34, End: 35, Home: 36, Left: 37, Up: 38, Right: 39, Down: 40, Insert: 45, Delete: 46, Digit_8: 56, Y: 89, Z: 90, Meta: 91, F1: 112, F2: 113, F3: 114, F4: 115, F5: 116, F6: 117, F7: 118, F8: 119, F9: 120, F10: 121, F11: 122, F12: 123, NumLock: 144, ScrollLock: 145, BackSlash: 220, Slash: 191, BracketRight: 221, BracketLeft: 219 }, A = { Left: 1, Middle: 2, Right: 3 }, z = { Horizontal: "horizontal", Vertical: "vertical" }, B = (t2, e2) => {
|
|
17
|
+
const n2 = i((...e3) => t2?.(...e3), e2), o2 = r(null);
|
|
18
18
|
o2.current = n2;
|
|
19
|
-
const s2 = i((...
|
|
19
|
+
const s2 = i((...t3) => o2.current?.(...t3), []);
|
|
20
20
|
if (o2.current) return s2;
|
|
21
|
-
}, $ = (
|
|
22
|
-
const { style: n2, orientation: o2 =
|
|
23
|
-
return
|
|
24
|
-
}, O = (
|
|
25
|
-
const { style: n2, orientation: o2 =
|
|
26
|
-
return
|
|
27
|
-
}, K = (
|
|
28
|
-
const { style: n2, orientation: o2 =
|
|
29
|
-
return
|
|
30
|
-
}, V = (
|
|
21
|
+
}, $ = (e2) => {
|
|
22
|
+
const { style: n2, orientation: o2 = z.Vertical, ...i2 } = e2, r2 = o2 === z.Vertical;
|
|
23
|
+
return t("div", { style: { paddingBottom: "0px", paddingRight: "0px", paddingLeft: r2 ? "0px" : "3px", paddingTop: r2 ? "3px" : "0px", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, ...i2, children: t("button", { style: { padding: "0", display: "flex", alignItems: "center", justifyContent: "center", border: "none" }, className: `scrollbar-button ${r2 ? "vertical" : "horizontal"} single-button start`, children: t("svg", { width: "9", height: "9", viewBox: "0 0 6 6", style: { opacity: "inherit" }, children: t("path", { d: r2 ? "m 3.7274761,0.68060577 1.11969,1.93863003 1.12075,1.93912 c 0.0895,0.155 0.12152,0.33658 0.0904,0.51283 -0.0311,0.17625 -0.12336,0.33591 -0.26054,0.45091 -0.13715,0.11495 -0.31044,0.17793 -0.4894,0.17781 H 0.83095614 c -0.20186,0 -0.39542,-0.0802 -0.53814,-0.2229 -0.14272,-0.14272 -0.22291,-0.33629 -0.22291,-0.53814 -3e-4,-0.13308 0.0347,-0.26385 0.10147,-0.379 l 1.11872996,-1.94066 1.11921,-1.93864003 c 0.13594,-0.23541 0.38717,-0.38047 0.65905,-0.38047 0.27188,0 0.52311,0.14506 0.65905,0.38047 z" : "m 0.75051,2.3424298 1.93863,-1.11969 1.93912,-1.12075 c 0.155,-0.0895 0.33658,-0.12152 0.51283,-0.0904 0.17625,0.0311 0.33591,0.12336 0.45091,0.26054 0.11495,0.13715 0.17793,0.31044 0.17781,0.4894 v 4.47742 c 0,0.20186 -0.0802,0.39542 -0.2229,0.53814 -0.14272,0.14272 -0.33629,0.22291 -0.53814,0.22291 -0.13308,3e-4 -0.26385,-0.0347 -0.379,-0.10147 L 2.68911,4.7797998 0.75047,3.6605898 C 0.51506,3.5246498 0.37,3.2734198 0.37,3.0015398 c 0,-0.27188 0.14506,-0.52311 0.38047,-0.65905 z" }) }) }) });
|
|
24
|
+
}, O = (e2) => {
|
|
25
|
+
const { style: n2, orientation: o2 = z.Vertical, ...i2 } = e2, r2 = o2 === z.Vertical;
|
|
26
|
+
return t("div", { style: { paddingLeft: "0px", paddingTop: "0px", paddingRight: r2 ? "0px" : "3px", paddingBottom: r2 ? "3px" : "0px", display: "flex", alignItems: "center", justifyContent: "center", ...n2 }, ...i2, children: t("button", { style: { padding: "0", display: "flex", alignItems: "center", justifyContent: "center", border: "none" }, className: `scrollbar-button ${r2 ? "vertical" : "horizontal"} single-button end`, children: t("svg", { width: "9", height: "9", viewBox: "0 0 6 6", style: { opacity: "inherit" }, children: t("path", { d: r2 ? "M 2.412334,5.319396 1.292644,3.3807659 0.17189405,1.4416459 c -0.0895,-0.155 -0.12152,-0.33658 -0.0904,-0.51282998 0.0311,-0.17625 0.12336,-0.33591 0.26054,-0.45091 0.13715,-0.11495 0.31044,-0.17793 0.4894,-0.17781 H 5.308854 c 0.20186,0 0.39542,0.0802 0.53814,0.2229 0.14272,0.14272 0.22291,0.33629 0.22291,0.53813998 3e-4,0.13308 -0.0347,0.26385 -0.10147,0.379 l -1.11873,1.94066 -1.11921,1.9386401 c -0.13594,0.23541 -0.38717,0.38047 -0.65905,0.38047 -0.27188,0 -0.52311,-0.14506 -0.65905,-0.38047 z" : "m 5.3893002,3.6575719 -1.9386301,1.11969 -1.93912,1.12075 c -0.155,0.0895 -0.33658,0.12152 -0.51282997,0.0904 -0.17625,-0.0311 -0.33591,-0.12336 -0.45091,-0.26054 -0.11495,-0.13715 -0.17793,-0.31044 -0.17781,-0.4894 V 0.76105195 c 0,-0.20186 0.0802,-0.39542 0.2229,-0.53814 C 0.73562013,0.08019195 0.92919013,1.9467784e-6 1.1310401,1.9467784e-6 1.2641201,-2.9805322e-4 1.3948901,0.03470195 1.5100401,0.10147195 l 1.94066,1.11872995 1.9386401,1.11921 c 0.23541,0.13594 0.38047,0.38717 0.38047,0.65905 0,0.27188 -0.14506,0.52311 -0.38047,0.65905 z" }) }) }) });
|
|
27
|
+
}, K = (e2) => {
|
|
28
|
+
const { style: n2, orientation: o2 = z.Vertical, ...i2 } = e2, r2 = o2 === z.Vertical;
|
|
29
|
+
return t("div", { style: { display: "flex", justifyContent: "center", alignItems: "end", transition: "fill-opacity 1s", zIndex: 1, width: "24px", height: "24px", ...n2 }, className: `scrollbar-button ${r2 ? "vertical" : "horizontal"} edge`, ...i2, children: t("svg", { width: "24", height: "24", viewBox: "0 0 24 24", transform: r2 ? "rotate(90) " : "", children: t("path", { style: { transition: "opacity 240ms ease 0s", opacity: e2.disabled ? 0 : 1 }, d: "M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2" }) }) });
|
|
30
|
+
}, V = (t2, e2, n2, o2, i2 = 0) => {
|
|
31
31
|
for (let i3 = 0; i3 < n2.length; i3++) {
|
|
32
32
|
const r2 = n2[i3].getBoundingClientRect();
|
|
33
|
-
let s2 = r2.left -
|
|
33
|
+
let s2 = r2.left - e2, l2 = s2 + r2.width;
|
|
34
34
|
if (o2) {
|
|
35
|
-
if (s2 <
|
|
36
|
-
} else if (Math.ceil(l2) > Math.ceil(
|
|
35
|
+
if (s2 < t2 && l2 >= t2) return s2;
|
|
36
|
+
} else if (Math.ceil(l2) > Math.ceil(t2) + 2) return l2;
|
|
37
37
|
}
|
|
38
38
|
return i2;
|
|
39
|
-
},
|
|
40
|
-
const { offset: s2 = 0, totalSize: l2 = 0, viewportSize: u2 = 0, style: d2, className:
|
|
39
|
+
}, N = Object.freeze(Object.defineProperty({ __proto__: null, getScrollTo: V }, Symbol.toStringTag, { value: "Module" })), H = "_sheetxl-scrollbar_eblx4_6", W = s(l((n2, o2) => {
|
|
40
|
+
const { offset: s2 = 0, totalSize: l2 = 0, viewportSize: u2 = 0, style: d2, className: p2, orientation: f2 = z.Vertical, onScrollOffset: _2, onScroll: m2, showCustomScrollButtons: v2 = false, scrollButtonIncrement: x2 = 200, scrollButtonInitialRepeatDelay: w2 = 260, scrollButtonAdditionalRepeatDelay: b2 = 120, createScrollStartButton: S2 = $, createScrollEndButton: L2 = O, ...E2 } = n2, C2 = B(m2, [m2]), T2 = r(null), [M2, { width: k2, height: D2 }] = y(), [P2, { width: A2, height: K2 }] = y(), N2 = f2 === z.Vertical, W2 = N2 ? "top" : "left", I2 = N2 ? "scrollTop" : "scrollLeft", R2 = N2 ? D2 : k2, j2 = N2 ? K2 : A2, [F2, Y2] = a(null);
|
|
41
41
|
c(() => {
|
|
42
|
-
null !==
|
|
43
|
-
}, [
|
|
44
|
-
const
|
|
42
|
+
null !== F2 && T2.current && T2.current.scrollTo({ behavior: "smooth", [W2]: F2 });
|
|
43
|
+
}, [F2, N2]);
|
|
44
|
+
const X2 = i((t2, e2 = false) => {
|
|
45
45
|
if (!T2.current) return 0;
|
|
46
|
-
const n3 = T2.current.querySelector(".scrollbar-viewport"), o3 = n3.getBoundingClientRect(), i2 = n3.children, r2 =
|
|
47
|
-
return
|
|
48
|
-
}, []), U2 = i((
|
|
46
|
+
const n3 = T2.current.querySelector(".scrollbar-viewport"), o3 = n3.getBoundingClientRect(), i2 = n3.children, r2 = e2 ? 0 : V(t2, o3[W2], i2, true, Math.max(0, t2 - x2));
|
|
47
|
+
return Y2(r2), Math.max(0, r2);
|
|
48
|
+
}, []), U2 = i((t2, e2 = false) => {
|
|
49
49
|
if (!T2.current) return 0;
|
|
50
|
-
const n3 = T2.current.querySelector(".scrollbar-viewport"), o3 = n3.getBoundingClientRect(), i2 = n3.children, r2 = Math.ceil(
|
|
51
|
-
return
|
|
52
|
-
}, [
|
|
50
|
+
const n3 = T2.current.querySelector(".scrollbar-viewport"), o3 = n3.getBoundingClientRect(), i2 = n3.children, r2 = Math.ceil(j2 - R2), s3 = e2 ? r2 : V(t2, o3[W2], i2, false, Math.max(0, t2 + x2));
|
|
51
|
+
return Y2(s3), Math.min(r2, s3);
|
|
52
|
+
}, [j2, R2]), Z2 = r(null), q2 = i((t2) => {
|
|
53
53
|
Z2.current = s2;
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
}, [
|
|
54
|
+
const e2 = t2.target[I2];
|
|
55
|
+
_2(e2, u2, l2), C2?.(t2);
|
|
56
|
+
}, [_2, u2, l2, s2]);
|
|
57
57
|
c(() => {
|
|
58
|
-
const
|
|
59
|
-
Z2.current = null, s2 !==
|
|
60
|
-
}, [s2,
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
}, []),
|
|
64
|
-
J2.current =
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
}, [
|
|
58
|
+
const t2 = Z2.current;
|
|
59
|
+
Z2.current = null, s2 !== t2 && (T2.current[I2] = s2);
|
|
60
|
+
}, [s2, I2]);
|
|
61
|
+
const G2 = r(null), J2 = r(null), Q2 = i(() => {
|
|
62
|
+
G2.current && (clearTimeout(G2.current), G2.current = null, J2.current = null);
|
|
63
|
+
}, []), tt2 = i((t2, e2, n3, o3 = w2) => {
|
|
64
|
+
J2.current = t2, G2.current = setTimeout(() => {
|
|
65
|
+
const e3 = n3 ? X2(J2.current || t2) : U2(J2.current || t2);
|
|
66
|
+
e3 !== J2.current ? tt2(e3, false, n3, b2) : Q2();
|
|
67
|
+
}, e2 ? 0 : o3);
|
|
68
|
+
}, [X2, U2, Q2]);
|
|
69
69
|
c(() => () => Q2(), [Q2]);
|
|
70
|
-
const
|
|
70
|
+
const et2 = s2, nt2 = h(() => {
|
|
71
71
|
if (!v2) return null;
|
|
72
|
-
const
|
|
73
|
-
return S2?.(
|
|
74
|
-
}, [v2,
|
|
72
|
+
const t2 = { orientation: f2, disabled: Math.floor(et2) <= 0 || 0 === Math.floor(j2 - R2), onMouseUp: Q2, onMouseLeave: Q2, onMouseDown: () => tt2(et2, true, true) };
|
|
73
|
+
return S2?.(t2);
|
|
74
|
+
}, [v2, f2, et2, F2, j2, R2]), ot2 = h(() => {
|
|
75
75
|
if (!v2) return null;
|
|
76
|
-
const
|
|
77
|
-
return L2?.(
|
|
78
|
-
}, [v2,
|
|
79
|
-
return
|
|
76
|
+
const t2 = { orientation: f2, disabled: Math.floor(j2 - R2) <= Math.ceil(et2), onMouseUp: Q2, onMouseLeave: Q2, onMouseDown: () => tt2(et2, true, false) };
|
|
77
|
+
return L2?.(t2);
|
|
78
|
+
}, [v2, f2, et2, F2, j2, R2]);
|
|
79
|
+
return e("div", { ref: o2, style: { display: "flex", flex: "1", flexDirection: N2 ? "column" : "row", padding: "0", ...d2 }, className: g(H, p2), ...E2, children: [nt2, t("div", { className: "pseudo-scrollbar", style: { flex: "1 1 100%", display: "flex", boxSizing: "content-box", flexDirection: N2 ? "column" : "row", justifyContent: "center", alignItems: "center" }, ref: M2, children: t("div", { tabIndex: -1, style: { flex: "1 1 100%", overflowY: N2 ? "scroll" : "hidden", overflowX: N2 ? "hidden" : "scroll", position: "relative", willChange: "transform" }, onScroll: q2, ref: T2, children: t("div", { ref: P2, style: { position: "absolute", height: N2 ? l2 - u2 + (D2 ?? 0) : 1, width: N2 ? 1 : l2 - u2 + (k2 ?? 0) }, className: "scrollbar-viewport" }) }) }), ot2] });
|
|
80
80
|
}));
|
|
81
|
-
|
|
82
|
-
let
|
|
83
|
-
const
|
|
84
|
-
let
|
|
85
|
-
return
|
|
86
|
-
},
|
|
87
|
-
let r2 =
|
|
81
|
+
W.displayName = "Scrollbar";
|
|
82
|
+
let I = Date.now, R = 1e3, j = {}, F = 1;
|
|
83
|
+
const Y = (t2) => {
|
|
84
|
+
let e2 = null !== j[t2];
|
|
85
|
+
return e2 && (j[t2] = null), e2;
|
|
86
|
+
}, X = (t2, e2, n2, o2 = 0, i2) => {
|
|
87
|
+
let r2 = I(), s2 = r2, l2 = 0, a2 = 0, c2 = 0, h2 = F++;
|
|
88
88
|
if (h2 % 20 == 0) {
|
|
89
|
-
const
|
|
90
|
-
for (let
|
|
91
|
-
|
|
89
|
+
const t3 = {};
|
|
90
|
+
for (let e3 in j) t3[e3] = true;
|
|
91
|
+
j = t3;
|
|
92
92
|
}
|
|
93
93
|
const u2 = function(d2) {
|
|
94
|
-
let
|
|
94
|
+
let p2 = true !== d2, f2 = I(), _2 = true;
|
|
95
95
|
try {
|
|
96
|
-
|
|
97
|
-
} catch (
|
|
98
|
-
|
|
96
|
+
_2 = (!e2 || e2(h2)) ?? true;
|
|
97
|
+
} catch (t3) {
|
|
98
|
+
_2 = false;
|
|
99
99
|
}
|
|
100
|
-
if (!
|
|
101
|
-
if (
|
|
102
|
-
c2 = Math.round((
|
|
103
|
-
for (let
|
|
100
|
+
if (!j[h2] || !_2) return j[h2] = null, void n2?.(60 - a2 / ((f2 - r2) / R), h2, false);
|
|
101
|
+
if (p2) {
|
|
102
|
+
c2 = Math.round((f2 - s2) / 16.666666666666668) - 1;
|
|
103
|
+
for (let t3 = 0; t3 < Math.min(c2, 4); t3++) u2(true), a2++;
|
|
104
104
|
}
|
|
105
|
-
o2 && (l2 = (
|
|
106
|
-
let
|
|
105
|
+
o2 && (l2 = (f2 - r2) / o2, l2 > 1 && (l2 = 1));
|
|
106
|
+
let m2 = i2 ? i2(l2) : l2, g2 = false;
|
|
107
107
|
try {
|
|
108
|
-
g2 =
|
|
109
|
-
} catch (
|
|
108
|
+
g2 = t2(m2, f2, p2);
|
|
109
|
+
} catch (t3) {
|
|
110
110
|
g2 = false;
|
|
111
111
|
}
|
|
112
|
-
false !== g2 && 1 !== l2 || !
|
|
112
|
+
false !== g2 && 1 !== l2 || !p2 ? p2 && (s2 = f2, requestAnimationFrame(u2)) : (j[h2] = null, n2?.(60 - a2 / ((f2 - r2) / R), h2, 1 === l2 || null == o2));
|
|
113
113
|
};
|
|
114
|
-
return
|
|
115
|
-
}, U = function(
|
|
116
|
-
return Math.pow(
|
|
117
|
-
}, Z = function(
|
|
118
|
-
return (
|
|
114
|
+
return j[h2] = true, requestAnimationFrame(u2), h2;
|
|
115
|
+
}, U = function(t2) {
|
|
116
|
+
return Math.pow(t2 - 1, 3) + 1;
|
|
117
|
+
}, Z = function(t2) {
|
|
118
|
+
return (t2 /= 0.5) < 1 ? 0.5 * Math.pow(t2, 3) : 0.5 * (Math.pow(t2 - 2, 3) + 2);
|
|
119
119
|
};
|
|
120
|
-
class
|
|
121
|
-
constructor(
|
|
122
|
-
this.__isSingleTouch = false, this.__isTracking = false, this.__didDecelerationComplete = false, this.__isGesturing = false, this.__isDragging = false, this.__isDecelerating = 0, this.__isAnimating = 0, this.__interruptedAnimation = false, this.__lastScale = 1, this.__enableScrollX = true, this.__enableScrollY = true, 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 = null, this.__minDecelerationScrollTop = null, this.__maxDecelerationScrollLeft = null, this.__maxDecelerationScrollTop = null, this.__decelerationVelocityX = null, this.__decelerationVelocityY = 0, this.__callback =
|
|
120
|
+
class q {
|
|
121
|
+
constructor(t2, e2) {
|
|
122
|
+
this.__isSingleTouch = false, this.__isTracking = false, this.__didDecelerationComplete = false, this.__isGesturing = false, this.__isDragging = false, this.__isDecelerating = 0, this.__isAnimating = 0, this.__interruptedAnimation = false, this.__lastScale = 1, this.__enableScrollX = true, this.__enableScrollY = true, 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 = null, this.__minDecelerationScrollTop = null, this.__maxDecelerationScrollLeft = null, this.__maxDecelerationScrollTop = null, this.__decelerationVelocityX = null, this.__decelerationVelocityY = 0, this.__callback = t2, this.options = { scrollingX: true, scrollingY: true, animating: true, animationDuration: 250, bouncing: true, locking: true, paging: false, snapping: false, zooming: false, minZoom: 0.5, maxZoom: 3, speedMultiplier: 1, scrollingComplete: void 0, penetrationDeceleration: 0.03, penetrationAcceleration: 0.08, ...e2 };
|
|
123
123
|
}
|
|
124
|
-
setDimensions(
|
|
125
|
-
null !==
|
|
124
|
+
setDimensions(t2, e2, n2, o2) {
|
|
125
|
+
null !== t2 && (this.__clientWidth = t2), null !== e2 && (this.__clientHeight = e2), null !== n2 && (this.__contentWidth = n2), null !== o2 && (this.__contentHeight = o2), this.__computeScrollMax(), this.scrollTo(this.__scrollLeft, this.__scrollTop, true);
|
|
126
126
|
}
|
|
127
|
-
setPosition(
|
|
128
|
-
this.__clientLeft =
|
|
127
|
+
setPosition(t2, e2) {
|
|
128
|
+
this.__clientLeft = t2 || 0, this.__clientTop = e2 || 0;
|
|
129
129
|
}
|
|
130
|
-
setSnapSize(
|
|
131
|
-
this.__snapWidth =
|
|
130
|
+
setSnapSize(t2, e2) {
|
|
131
|
+
this.__snapWidth = t2, this.__snapHeight = e2;
|
|
132
132
|
}
|
|
133
133
|
getValues() {
|
|
134
134
|
return { left: this.__scrollLeft, top: this.__scrollTop, right: this.__scrollLeft + this.__clientWidth / this.__zoomLevel, bottom: this.__scrollTop + this.__clientHeight / this.__zoomLevel, zoom: this.__zoomLevel };
|
|
135
135
|
}
|
|
136
|
-
getPoint(
|
|
136
|
+
getPoint(t2, e2) {
|
|
137
137
|
const n2 = this.getValues();
|
|
138
|
-
return { left:
|
|
138
|
+
return { left: t2 / n2.zoom, top: e2 / n2.zoom };
|
|
139
139
|
}
|
|
140
140
|
getScrollMax() {
|
|
141
141
|
return { left: this.__maxScrollLeft, top: this.__maxScrollTop };
|
|
142
142
|
}
|
|
143
|
-
zoomTo(
|
|
143
|
+
zoomTo(t2, e2 = false, n2, o2, i2) {
|
|
144
144
|
if (!this.options.zooming) throw new Error("Zooming is not enabled!");
|
|
145
|
-
i2 && (this.__zoomComplete = i2), this.__isDecelerating && (
|
|
145
|
+
i2 && (this.__zoomComplete = i2), this.__isDecelerating && (Y(this.__isDecelerating), this.__isDecelerating = 0);
|
|
146
146
|
const r2 = this.__zoomLevel;
|
|
147
|
-
void 0 === n2 && (n2 = this.__clientWidth / 2), void 0 === o2 && (o2 = this.__clientHeight / 2),
|
|
148
|
-
const s2 =
|
|
147
|
+
void 0 === n2 && (n2 = this.__clientWidth / 2), void 0 === o2 && (o2 = this.__clientHeight / 2), t2 = Math.max(Math.min(t2, this.options.maxZoom), this.options.minZoom), this.__computeScrollMax(t2);
|
|
148
|
+
const s2 = t2 / r2;
|
|
149
149
|
let l2 = s2 * (this.__scrollLeft + n2) - n2, a2 = s2 * (this.__scrollTop + o2) - o2;
|
|
150
|
-
l2 > this.__maxScrollLeft ? l2 = this.__maxScrollLeft : l2 < 0 && (l2 = 0), a2 > this.__maxScrollTop ? a2 = this.__maxScrollTop : a2 < 0 && (a2 = 0), this.__publish(l2, a2,
|
|
150
|
+
l2 > this.__maxScrollLeft ? l2 = this.__maxScrollLeft : l2 < 0 && (l2 = 0), a2 > this.__maxScrollTop ? a2 = this.__maxScrollTop : a2 < 0 && (a2 = 0), this.__publish(l2, a2, t2, e2);
|
|
151
151
|
}
|
|
152
|
-
zoomBy(
|
|
153
|
-
this.zoomTo(this.__zoomLevel *
|
|
152
|
+
zoomBy(t2, e2 = false, n2 = 0, o2 = 0, i2) {
|
|
153
|
+
this.zoomTo(this.__zoomLevel * t2, e2, n2, o2, i2);
|
|
154
154
|
}
|
|
155
|
-
scrollTo(
|
|
156
|
-
if (this.__isDecelerating && (
|
|
155
|
+
scrollTo(t2, e2, n2 = false, o2 = 1) {
|
|
156
|
+
if (this.__isDecelerating && (Y(this.__isDecelerating), this.__isDecelerating = 0), void 0 !== o2 && o2 !== this.__zoomLevel) {
|
|
157
157
|
if (!this.options.zooming) throw new Error("Zooming is not enabled!");
|
|
158
|
-
|
|
158
|
+
t2 *= o2, e2 *= o2, this.__computeScrollMax(o2);
|
|
159
159
|
} else o2 = this.__zoomLevel;
|
|
160
|
-
this.options.scrollingX ? this.options.paging ?
|
|
160
|
+
this.options.scrollingX ? this.options.paging ? t2 = Math.round(t2 / this.__clientWidth) * this.__clientWidth : this.options.snapping && (t2 = Math.round(t2 / this.__snapWidth) * this.__snapWidth) : t2 = this.__scrollLeft, this.options.scrollingY ? this.options.paging ? e2 = Math.round(e2 / this.__clientHeight) * this.__clientHeight : this.options.snapping && (e2 = Math.round(e2 / this.__snapHeight) * this.__snapHeight) : e2 = this.__scrollTop, t2 = Math.max(Math.min(this.__maxScrollLeft, t2), 0), e2 = Math.max(Math.min(this.__maxScrollTop, e2), 0), t2 === this.__scrollLeft && e2 === this.__scrollTop && (n2 = false), this.__publish(t2, e2, o2, n2);
|
|
161
161
|
}
|
|
162
|
-
scrollBy(
|
|
162
|
+
scrollBy(t2 = 0, e2 = 0, n2 = false) {
|
|
163
163
|
const o2 = this.__isAnimating ? this.__scheduledLeft : this.__scrollLeft, i2 = this.__isAnimating ? this.__scheduledTop : this.__scrollTop;
|
|
164
|
-
this.scrollTo(o2 + (
|
|
164
|
+
this.scrollTo(o2 + (t2 || 0), i2 + (e2 || 0), n2);
|
|
165
165
|
}
|
|
166
|
-
doMouseZoom(
|
|
167
|
-
const i2 =
|
|
166
|
+
doMouseZoom(t2, e2, n2, o2) {
|
|
167
|
+
const i2 = t2 > 0 ? 0.97 : 1.03;
|
|
168
168
|
return this.zoomTo(this.__zoomLevel * i2, false, n2 - this.__clientLeft, o2 - this.__clientTop);
|
|
169
169
|
}
|
|
170
|
-
doTouchStart(
|
|
171
|
-
if (void 0 ===
|
|
172
|
-
if (
|
|
170
|
+
doTouchStart(t2, e2) {
|
|
171
|
+
if (void 0 === t2.length) throw new Error("Invalid touch list: " + t2);
|
|
172
|
+
if (e2 instanceof Date && (e2 = e2.valueOf()), "number" != typeof e2) throw new Error("Invalid timestamp value: " + e2);
|
|
173
173
|
let n2, o2;
|
|
174
|
-
this.__interruptedAnimation = true, this.__isDecelerating && (
|
|
175
|
-
let i2 = 1 ===
|
|
176
|
-
i2 ? (n2 =
|
|
174
|
+
this.__interruptedAnimation = true, this.__isDecelerating && (Y(this.__isDecelerating), this.__isDecelerating = 0, this.__interruptedAnimation = true), this.__isAnimating && (Y(this.__isAnimating), this.__isAnimating = 0, this.__interruptedAnimation = true);
|
|
175
|
+
let i2 = 1 === t2.length;
|
|
176
|
+
i2 ? (n2 = t2[0].pageX, o2 = t2[0].pageY) : (n2 = Math.abs(t2[0].pageX + t2[1].pageX) / 2, o2 = Math.abs(t2[0].pageY + t2[1].pageY) / 2), this.__initialTouchLeft = n2, this.__initialTouchTop = o2, this.__zoomLevelStart = this.__zoomLevel, this.__lastTouchLeft = n2, this.__lastTouchTop = o2, this.__lastTouchMove = e2, this.__lastScale = 1, this.__enableScrollX = !i2 && this.options.scrollingX, this.__enableScrollY = !i2 && this.options.scrollingY, this.__isTracking = true, this.__didDecelerationComplete = false, this.__isDragging = !i2, this.__isSingleTouch = i2, this.__positions = [];
|
|
177
177
|
}
|
|
178
|
-
doTouchMove(
|
|
179
|
-
if (void 0 ===
|
|
180
|
-
if (
|
|
178
|
+
doTouchMove(t2, e2, n2 = 1) {
|
|
179
|
+
if (void 0 === t2.length) throw new Error("Invalid touch list: " + t2);
|
|
180
|
+
if (e2 instanceof Date && (e2 = e2.valueOf()), "number" != typeof e2) throw new Error("Invalid timestamp value: " + e2);
|
|
181
181
|
if (!this.__isTracking) return;
|
|
182
182
|
let o2, i2;
|
|
183
|
-
2 ===
|
|
183
|
+
2 === t2.length ? (o2 = Math.abs(t2[0].pageX + t2[1].pageX) / 2, i2 = Math.abs(t2[0].pageY + t2[1].pageY) / 2) : (o2 = t2[0].pageX, i2 = t2[0].pageY);
|
|
184
184
|
let r2 = this.__positions;
|
|
185
185
|
if (this.__isDragging) {
|
|
186
|
-
let
|
|
186
|
+
let t3 = o2 - this.__lastTouchLeft, s2 = i2 - this.__lastTouchTop, l2 = this.__scrollLeft, a2 = this.__scrollTop, c2 = this.__zoomLevel;
|
|
187
187
|
if (void 0 !== n2 && this.options.zooming) {
|
|
188
|
-
let
|
|
189
|
-
if (c2 = c2 / this.__lastScale * n2, c2 = Math.max(Math.min(c2, this.options.maxZoom), this.options.minZoom),
|
|
190
|
-
let
|
|
191
|
-
l2 = (
|
|
188
|
+
let t4 = c2;
|
|
189
|
+
if (c2 = c2 / this.__lastScale * n2, c2 = Math.max(Math.min(c2, this.options.maxZoom), this.options.minZoom), t4 !== c2) {
|
|
190
|
+
let e3 = o2 - this.__clientLeft, n3 = i2 - this.__clientTop;
|
|
191
|
+
l2 = (e3 + l2) * c2 / t4 - e3, a2 = (n3 + a2) * c2 / t4 - n3, this.__computeScrollMax(c2);
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
if (this.__enableScrollX) {
|
|
195
|
-
l2 -=
|
|
196
|
-
let
|
|
197
|
-
(l2 >
|
|
195
|
+
l2 -= t3 * this.options.speedMultiplier;
|
|
196
|
+
let e3 = this.__maxScrollLeft;
|
|
197
|
+
(l2 > e3 || l2 < 0) && (this.options.bouncing ? l2 += t3 / 2 * this.options.speedMultiplier : l2 = l2 > e3 ? e3 : 0);
|
|
198
198
|
}
|
|
199
199
|
if (this.__enableScrollY) {
|
|
200
200
|
a2 -= s2 * this.options.speedMultiplier;
|
|
201
|
-
const
|
|
202
|
-
(a2 >
|
|
201
|
+
const t4 = this.__maxScrollTop;
|
|
202
|
+
(a2 > t4 || a2 < 0) && (this.options.bouncing ? a2 += s2 / 2 * this.options.speedMultiplier : a2 = a2 > t4 ? t4 : 0);
|
|
203
203
|
}
|
|
204
|
-
r2.length > 60 && r2.splice(0, 30), r2.push(l2, a2,
|
|
204
|
+
r2.length > 60 && r2.splice(0, 30), r2.push(l2, a2, e2), this.__publish(l2, a2, c2);
|
|
205
205
|
} else {
|
|
206
|
-
let
|
|
207
|
-
this.__enableScrollX = this.options.scrollingX && s2 >=
|
|
206
|
+
let t3 = this.options.locking ? 3 : 0, n3 = 5, s2 = Math.abs(o2 - this.__initialTouchLeft), l2 = Math.abs(i2 - this.__initialTouchTop);
|
|
207
|
+
this.__enableScrollX = this.options.scrollingX && s2 >= t3, this.__enableScrollY = this.options.scrollingY && l2 >= t3, r2.push(this.__scrollLeft, this.__scrollTop, e2), this.__isDragging = (this.__enableScrollX || this.__enableScrollY) && (s2 >= n3 || l2 >= n3), this.__isDragging && (this.__interruptedAnimation = false);
|
|
208
208
|
}
|
|
209
|
-
this.__lastTouchLeft = o2, this.__lastTouchTop = i2, this.__lastTouchMove =
|
|
209
|
+
this.__lastTouchLeft = o2, this.__lastTouchTop = i2, this.__lastTouchMove = e2, this.__lastScale = n2;
|
|
210
210
|
}
|
|
211
|
-
doTouchEnd(
|
|
212
|
-
if (
|
|
211
|
+
doTouchEnd(t2) {
|
|
212
|
+
if (t2 instanceof Date && (t2 = t2.valueOf()), "number" != typeof t2) throw new Error("Invalid timestamp value: " + t2);
|
|
213
213
|
if (this.__isTracking) {
|
|
214
|
-
if (this.__isTracking = false, this.__isDragging) if (this.__isDragging = false, this.__isSingleTouch && this.options.animating &&
|
|
215
|
-
let
|
|
216
|
-
for (let
|
|
214
|
+
if (this.__isTracking = false, this.__isDragging) if (this.__isDragging = false, this.__isSingleTouch && this.options.animating && t2 - this.__lastTouchMove <= 100) {
|
|
215
|
+
let e2 = this.__positions, n2 = e2.length - 1, o2 = n2;
|
|
216
|
+
for (let t3 = n2; t3 > 0 && e2[t3] > this.__lastTouchMove - 100; t3 -= 3) o2 = t3;
|
|
217
217
|
if (o2 !== n2) {
|
|
218
|
-
const i2 =
|
|
218
|
+
const i2 = e2[n2] - e2[o2], r2 = this.__scrollLeft - e2[o2 - 2], s2 = this.__scrollTop - e2[o2 - 1];
|
|
219
219
|
this.__decelerationVelocityX = r2 / i2 * (1e3 / 60), this.__decelerationVelocityY = s2 / i2 * (1e3 / 60);
|
|
220
220
|
const l2 = this.options.paging || this.options.snapping ? 4 : 1;
|
|
221
|
-
(Math.abs(this.__decelerationVelocityX) > l2 || Math.abs(this.__decelerationVelocityY) > l2) && this.__startDeceleration(
|
|
221
|
+
(Math.abs(this.__decelerationVelocityX) > l2 || Math.abs(this.__decelerationVelocityY) > l2) && this.__startDeceleration(t2);
|
|
222
222
|
} else this.options.scrollingComplete?.();
|
|
223
|
-
} else
|
|
223
|
+
} else t2 - this.__lastTouchMove > 100 && this.options.scrollingComplete?.();
|
|
224
224
|
this.__isDecelerating || ((this.__interruptedAnimation || this.__isDragging) && this.options.scrollingComplete?.(), this.scrollTo(this.__scrollLeft, this.__scrollTop, true, this.__zoomLevel)), this.__positions.length = 0;
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
__publish(
|
|
227
|
+
__publish(t2, e2, n2, o2 = false) {
|
|
228
228
|
const i2 = this.__isAnimating;
|
|
229
|
-
if (i2 && (
|
|
230
|
-
this.__scheduledLeft =
|
|
231
|
-
const o3 = this.__scrollLeft, r2 = this.__scrollTop, s2 = this.__zoomLevel, l2 =
|
|
232
|
-
n3 && (this.__scrollLeft = o3 + l2 *
|
|
233
|
-
}.bind(this), u2 = function(
|
|
234
|
-
return this.__isAnimating ===
|
|
235
|
-
}.bind(this), d2 = function(
|
|
236
|
-
|
|
229
|
+
if (i2 && (Y(i2), this.__isAnimating = 0), o2 && this.options.animating) {
|
|
230
|
+
this.__scheduledLeft = t2, this.__scheduledTop = e2, this.__scheduledZoom = n2;
|
|
231
|
+
const o3 = this.__scrollLeft, r2 = this.__scrollTop, s2 = this.__zoomLevel, l2 = t2 - o3, a2 = e2 - r2, c2 = n2 - s2, h2 = function(t3, e3, n3) {
|
|
232
|
+
n3 && (this.__scrollLeft = o3 + l2 * t3, this.__scrollTop = r2 + a2 * t3, this.__zoomLevel = s2 + c2 * t3, this.__callback && this.__callback(this.__scrollLeft, this.__scrollTop, this.__zoomLevel));
|
|
233
|
+
}.bind(this), u2 = function(t3) {
|
|
234
|
+
return this.__isAnimating === t3;
|
|
235
|
+
}.bind(this), d2 = function(t3, e3, n3) {
|
|
236
|
+
e3 === this.__isAnimating && (this.__isAnimating = false), (this.__didDecelerationComplete || n3) && this.options.scrollingComplete?.(), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
|
|
237
237
|
}.bind(this);
|
|
238
|
-
this.__isAnimating =
|
|
239
|
-
} else this.__scheduledLeft = this.__scrollLeft =
|
|
238
|
+
this.__isAnimating = X(h2, u2, d2, this.options.animationDuration, i2 ? U : Z);
|
|
239
|
+
} else this.__scheduledLeft = this.__scrollLeft = t2, this.__scheduledTop = this.__scrollTop = e2, this.__scheduledZoom = this.__zoomLevel = n2, this.__callback && this.__callback(t2, e2, n2), this.options.zooming && (this.__computeScrollMax(), this.__zoomComplete && (this.__zoomComplete(), this.__zoomComplete = null));
|
|
240
240
|
}
|
|
241
|
-
__computeScrollMax(
|
|
242
|
-
this.__maxScrollLeft = Math.max(this.__contentWidth *
|
|
241
|
+
__computeScrollMax(t2 = this.__zoomLevel) {
|
|
242
|
+
this.__maxScrollLeft = Math.max(this.__contentWidth * t2 - this.__clientWidth, 0), this.__maxScrollTop = Math.max(this.__contentHeight * t2 - this.__clientHeight, 0);
|
|
243
243
|
}
|
|
244
|
-
__startDeceleration(
|
|
244
|
+
__startDeceleration(t2) {
|
|
245
245
|
if (this.options.paging) {
|
|
246
|
-
const
|
|
247
|
-
this.__minDecelerationScrollLeft = Math.floor(
|
|
246
|
+
const t3 = Math.max(Math.min(this.__scrollLeft, this.__maxScrollLeft), 0), e3 = Math.max(Math.min(this.__scrollTop, this.__maxScrollTop), 0), n3 = this.__clientWidth, o3 = this.__clientHeight;
|
|
247
|
+
this.__minDecelerationScrollLeft = Math.floor(t3 / n3) * n3, this.__minDecelerationScrollTop = Math.floor(e3 / o3) * o3, this.__maxDecelerationScrollLeft = Math.ceil(t3 / n3) * n3, this.__maxDecelerationScrollTop = Math.ceil(e3 / o3) * o3;
|
|
248
248
|
} else this.__minDecelerationScrollLeft = 0, this.__minDecelerationScrollTop = 0, this.__maxDecelerationScrollLeft = this.__maxScrollLeft, this.__maxDecelerationScrollTop = this.__maxScrollTop;
|
|
249
|
-
const
|
|
249
|
+
const e2 = function(t3, e3, n3) {
|
|
250
250
|
this.__stepThroughDeceleration(n3);
|
|
251
251
|
}.bind(this), n2 = this.options.snapping ? 4 : 0.1, o2 = function() {
|
|
252
|
-
const
|
|
253
|
-
return
|
|
254
|
-
}.bind(this), i2 = function(
|
|
252
|
+
const t3 = Math.abs(this.__decelerationVelocityX) >= n2 || Math.abs(this.__decelerationVelocityY) >= n2;
|
|
253
|
+
return t3 || (this.__didDecelerationComplete = true), t3;
|
|
254
|
+
}.bind(this), i2 = function(t3, e3, n3) {
|
|
255
255
|
this.__isDecelerating = 0, this.__didDecelerationComplete && this.options.scrollingComplete?.(), this.scrollTo(this.__scrollLeft, this.__scrollTop, this.options.snapping);
|
|
256
256
|
}.bind(this);
|
|
257
|
-
this.__isDecelerating =
|
|
257
|
+
this.__isDecelerating = X(e2, o2, i2);
|
|
258
258
|
}
|
|
259
|
-
__stepThroughDeceleration(
|
|
260
|
-
let
|
|
259
|
+
__stepThroughDeceleration(t2) {
|
|
260
|
+
let e2 = this.__scrollLeft + this.__decelerationVelocityX, n2 = this.__scrollTop + this.__decelerationVelocityY;
|
|
261
261
|
if (!this.options.bouncing) {
|
|
262
|
-
const
|
|
263
|
-
|
|
262
|
+
const t3 = Math.max(Math.min(this.__maxDecelerationScrollLeft, e2), this.__minDecelerationScrollLeft);
|
|
263
|
+
t3 !== e2 && (e2 = t3, this.__decelerationVelocityX = 0);
|
|
264
264
|
const o2 = Math.max(Math.min(this.__maxDecelerationScrollTop, n2), this.__minDecelerationScrollTop);
|
|
265
265
|
o2 !== n2 && (n2 = o2, this.__decelerationVelocityY = 0);
|
|
266
266
|
}
|
|
267
|
-
if (
|
|
268
|
-
const
|
|
269
|
-
this.__decelerationVelocityX *=
|
|
267
|
+
if (t2 ? this.__publish(e2, n2, this.__zoomLevel) : (this.__scrollLeft = e2, this.__scrollTop = n2), !this.options.paging) {
|
|
268
|
+
const t3 = 0.95;
|
|
269
|
+
this.__decelerationVelocityX *= t3, this.__decelerationVelocityY *= t3;
|
|
270
270
|
}
|
|
271
271
|
if (this.options.bouncing) {
|
|
272
|
-
let
|
|
273
|
-
|
|
272
|
+
let t3 = 0, o2 = 0, i2 = this.options.penetrationDeceleration, r2 = this.options.penetrationAcceleration;
|
|
273
|
+
e2 < this.__minDecelerationScrollLeft ? t3 = this.__minDecelerationScrollLeft - e2 : e2 > this.__maxDecelerationScrollLeft && (t3 = this.__maxDecelerationScrollLeft - e2), n2 < this.__minDecelerationScrollTop ? o2 = this.__minDecelerationScrollTop - n2 : n2 > this.__maxDecelerationScrollTop && (o2 = this.__maxDecelerationScrollTop - n2), 0 !== t3 && (t3 * this.__decelerationVelocityX <= 0 ? this.__decelerationVelocityX += t3 * i2 : this.__decelerationVelocityX = t3 * r2), 0 !== o2 && (o2 * this.__decelerationVelocityY <= 0 ? this.__decelerationVelocityY += o2 * i2 : this.__decelerationVelocityY = o2 * r2);
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
const
|
|
277
|
+
const G = /* @__PURE__ */ new Set(["INPUT", "TEXTAREA", "SELECT"]), J = {};
|
|
278
278
|
function Q() {
|
|
279
279
|
return E;
|
|
280
280
|
}
|
|
281
|
-
const
|
|
282
|
-
return
|
|
283
|
-
}, createSyntheticEvent: (
|
|
284
|
-
let
|
|
285
|
-
return { nativeEvent:
|
|
286
|
-
|
|
287
|
-
}, isDefaultPrevented: () =>
|
|
288
|
-
n2 = true,
|
|
281
|
+
const tt = (t2) => "BracketLeft" === t2 ? "[" : "BracketRight" === t2 ? "]" : v.camelToPrettyCase(t2), et = Object.freeze(Object.defineProperty({ __proto__: null, EmptyCssProperties: J, boundPixel: function(t2, e2 = false, n2 = 0) {
|
|
282
|
+
return t2;
|
|
283
|
+
}, createSyntheticEvent: (t2) => {
|
|
284
|
+
let e2 = false, n2 = false;
|
|
285
|
+
return { nativeEvent: t2, currentTarget: t2.currentTarget, target: t2.target, bubbles: t2.bubbles, cancelable: t2.cancelable, defaultPrevented: t2.defaultPrevented, eventPhase: t2.eventPhase, isTrusted: t2.isTrusted, preventDefault: () => {
|
|
286
|
+
e2 = true, t2.preventDefault();
|
|
287
|
+
}, isDefaultPrevented: () => e2, stopPropagation: () => {
|
|
288
|
+
n2 = true, t2.stopPropagation();
|
|
289
289
|
}, isPropagationStopped: () => n2, persist: () => {
|
|
290
|
-
}, timeStamp:
|
|
291
|
-
}, detectIt: Q, focusableNodeNames:
|
|
292
|
-
function
|
|
290
|
+
}, timeStamp: t2.timeStamp, type: t2.type };
|
|
291
|
+
}, detectIt: Q, focusableNodeNames: G, toPrettyKeyCode: tt }, Symbol.toStringTag, { value: "Module" })), nt = [];
|
|
292
|
+
function ot(t2, e2, n2 = nt) {
|
|
293
293
|
const o2 = r(null);
|
|
294
|
-
return u(
|
|
294
|
+
return u(t2, () => {
|
|
295
295
|
if (!o2.current) return;
|
|
296
|
-
const
|
|
296
|
+
const t3 = o2.current, n3 = e2?.();
|
|
297
297
|
if (!n3 || "object" != typeof n3) throw new Error("attributes must return a plain object of values");
|
|
298
298
|
const i2 = Object.keys(n3), r2 = i2.length;
|
|
299
|
-
for (let
|
|
300
|
-
const o3 = i2[
|
|
301
|
-
Object.defineProperty(
|
|
299
|
+
for (let e3 = 0; e3 < r2; e3++) {
|
|
300
|
+
const o3 = i2[e3], r3 = n3[o3];
|
|
301
|
+
Object.defineProperty(t3, o3, { value: r3, writable: true, configurable: true, enumerable: true });
|
|
302
302
|
}
|
|
303
|
-
return
|
|
303
|
+
return t3;
|
|
304
304
|
}, n2), o2;
|
|
305
305
|
}
|
|
306
|
-
const
|
|
307
|
-
const { children: l2, viewport: a2, onScrollViewport: u2, showHorizontalScrollbar: d2 = true, showVerticalScrollbar:
|
|
306
|
+
const it = (e2) => t(W, { ...e2 }), rt = ({ width: e2, height: n2 }) => t("div", { className: "corner", style: { minWidth: `${e2}px`, width: `${e2}px`, minHeight: `${n2}px`, height: `${n2}px` } }), st = s(l((o2, s2) => {
|
|
307
|
+
const { children: l2, viewport: a2, onScrollViewport: u2, showHorizontalScrollbar: d2 = true, showVerticalScrollbar: p2 = true, createScrollCorner: f2 = rt, createHorizontalScrollbar: _2 = it, createVerticalScrollbar: m2 = it, style: g2, touchElement: v2, disableTouch: x2, ...w2 } = o2, b2 = B(u2, [u2]), S2 = ot(s2, () => ({ isScrollPane: () => true }), []), L2 = r(null);
|
|
308
308
|
c(() => {
|
|
309
309
|
L2.current && (L2.current.__scrollTop === a2?.top && L2.current.__scrollLeft === a2?.left || L2.current.__isDecelerating || L2.current?.scrollTo(a2?.left, a2?.top, false));
|
|
310
310
|
}, [a2?.left, a2?.top, v2]);
|
|
311
|
-
const E2 = i((
|
|
312
|
-
b2?.({ left:
|
|
313
|
-
}, []), C2 = i((
|
|
314
|
-
L2.current?.doTouchStart(
|
|
315
|
-
}, []), T2 = i((
|
|
316
|
-
|
|
317
|
-
}, []), M2 = i((
|
|
318
|
-
L2.current?.doTouchEnd(
|
|
319
|
-
}, []),
|
|
320
|
-
L2.current.setDimensions(
|
|
311
|
+
const E2 = i((t2, e2) => {
|
|
312
|
+
b2?.({ left: t2, top: e2 });
|
|
313
|
+
}, []), C2 = i((t2) => {
|
|
314
|
+
L2.current?.doTouchStart(t2.touches, t2.timeStamp);
|
|
315
|
+
}, []), T2 = i((t2) => {
|
|
316
|
+
t2.preventDefault(), L2.current?.doTouchMove(t2.touches, t2.timeStamp);
|
|
317
|
+
}, []), M2 = i((t2) => {
|
|
318
|
+
L2.current?.doTouchEnd(t2.timeStamp);
|
|
319
|
+
}, []), k2 = i(({ containerWidth: t2, containerHeight: e2, totalWidth: n2, totalHeight: o3 }) => {
|
|
320
|
+
L2.current.setDimensions(t2, e2, n2, o3);
|
|
321
321
|
}, []);
|
|
322
322
|
c(() => {
|
|
323
|
-
const
|
|
324
|
-
if (!x2 && Q().supportsTouchEvents &&
|
|
323
|
+
const t2 = v2 ?? S2.current;
|
|
324
|
+
if (!x2 && Q().supportsTouchEvents && t2 && a2) {
|
|
325
325
|
if (!L2.current) {
|
|
326
|
-
const
|
|
327
|
-
L2.current = new
|
|
326
|
+
const t3 = { scrollingX: true, scrollingY: true, decelerationRate: 0.95, penetrationAcceleration: 0.08 };
|
|
327
|
+
L2.current = new q(E2, t3);
|
|
328
328
|
}
|
|
329
|
-
Q().supportsTouchEvents && (
|
|
329
|
+
Q().supportsTouchEvents && (t2.addEventListener("touchstart", C2), t2.addEventListener("touchend", M2), t2.addEventListener("touchmove", T2)), k2({ containerWidth: a2?.width, containerHeight: a2?.height, totalWidth: a2?.totalWidth, totalHeight: a2?.totalHeight });
|
|
330
330
|
}
|
|
331
331
|
return () => {
|
|
332
|
-
|
|
332
|
+
t2?.removeEventListener("touchstart", C2), t2?.removeEventListener("touchend", M2), t2?.removeEventListener("touchmove", T2);
|
|
333
333
|
};
|
|
334
334
|
}, [a2?.width, a2?.height, a2?.totalWidth, a2?.totalHeight, x2, v2]);
|
|
335
|
-
const [
|
|
336
|
-
const
|
|
337
|
-
b2?.({ top:
|
|
335
|
+
const [D2, { width: P2 }] = y(), [A2, { height: $2 }] = y(), O2 = h(() => {
|
|
336
|
+
const e2 = m2({ orientation: z.Vertical, offset: a2?.top, viewportSize: a2?.height, totalSize: a2?.totalHeight, onScrollOffset: (t2) => {
|
|
337
|
+
b2?.({ top: t2 });
|
|
338
338
|
} });
|
|
339
|
-
return
|
|
340
|
-
}, [
|
|
341
|
-
const o3 =
|
|
342
|
-
return
|
|
343
|
-
}, [
|
|
344
|
-
return
|
|
339
|
+
return t("div", { style: { display: "flex", flex: "0" }, ref: D2, children: e2 });
|
|
340
|
+
}, [m2, a2?.top, a2?.height, a2?.totalHeight]), K2 = h(() => {
|
|
341
|
+
const o3 = _2({ orientation: z.Horizontal, offset: a2?.left, viewportSize: a2?.width, totalSize: a2?.totalWidth, onScrollOffset: (t2) => b2?.({ left: t2 }) });
|
|
342
|
+
return e("div", { style: { display: "flex", flex: "none", flexDirection: "row", alignItems: "stretch", justifyContent: "center" }, children: [t("div", { style: { display: "flex", flex: "1 1 100%", flexDirection: "column", width: `calc(100% - ${P2}px)` }, children: t("div", { ref: A2, className: "sizer", children: o3 }) }), p2 ? f2({ width: P2, height: $2 }) : t(n, {})] });
|
|
343
|
+
}, [_2, a2?.left, a2?.width, a2?.totalWidth, p2, f2, P2, $2]);
|
|
344
|
+
return t("div", { style: { position: "relative", display: "flex", minWidth: p2 ? `${P2}px` : void 0, minHeight: d2 ? `${$2}px` : void 0, ...g2 }, ...w2, ref: S2, children: e("div", { style: { position: "relative", width: "100%", flex: "1 1 100%", display: "flex", flexDirection: "column", boxSizing: "border-box" }, children: [e("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: [t("div", { style: { display: "flex", flex: "1 1 100%", overflow: "hidden" }, children: l2 }), p2 ? O2 : t(n, {})] }), d2 ? K2 : t(n, {})] }) });
|
|
345
345
|
}));
|
|
346
|
-
|
|
347
|
-
let
|
|
348
|
-
function
|
|
349
|
-
const [
|
|
350
|
-
const
|
|
351
|
-
return
|
|
346
|
+
st.displayName = "ScrollPane";
|
|
347
|
+
let lt = 0;
|
|
348
|
+
function at() {
|
|
349
|
+
const [t2, e2] = a(!!document.fullscreenElement), n2 = i(() => {
|
|
350
|
+
const t3 = document.fullscreenElement;
|
|
351
|
+
return t3 ? t3.querySelector(".fullscreen-portal-root") || t3 : document.body;
|
|
352
352
|
}, []);
|
|
353
353
|
return c(() => {
|
|
354
|
-
function
|
|
355
|
-
const
|
|
356
|
-
if (
|
|
357
|
-
let n3 =
|
|
358
|
-
n3 || (n3 = document.createElement("div"), n3.className = "fullscreen-portal-root _fullscreen-portal-root_1mjsr_4",
|
|
354
|
+
function t3() {
|
|
355
|
+
const t4 = document.fullscreenElement;
|
|
356
|
+
if (e2(!!t4), !t4) return;
|
|
357
|
+
let n3 = t4.querySelector(".fullscreen-portal-root");
|
|
358
|
+
n3 || (n3 = document.createElement("div"), n3.className = "fullscreen-portal-root _fullscreen-portal-root_1mjsr_4", t4.appendChild(n3));
|
|
359
359
|
}
|
|
360
|
-
return
|
|
361
|
-
document.removeEventListener("fullscreenchange",
|
|
362
|
-
|
|
363
|
-
}),
|
|
360
|
+
return lt++, t3(), document.addEventListener("fullscreenchange", t3), () => {
|
|
361
|
+
document.removeEventListener("fullscreenchange", t3), lt--, lt <= 0 && (document.querySelectorAll(".fullscreen-portal-root").forEach((t4) => {
|
|
362
|
+
t4.parentNode && t4.parentNode.removeChild(t4);
|
|
363
|
+
}), lt = 0);
|
|
364
364
|
};
|
|
365
|
-
}, []), { getPortalContainer: n2, isFullscreen:
|
|
365
|
+
}, []), { getPortalContainer: n2, isFullscreen: t2 };
|
|
366
366
|
}
|
|
367
|
-
const
|
|
368
|
-
const { offset: o2 = 0, viewportSize: s2 = 0, totalSize: l2 = 0, minSize: c2 = 0, endGap: h2 =
|
|
369
|
-
|
|
370
|
-
const w2 = B(
|
|
371
|
-
}, []), [
|
|
367
|
+
const ct = 100, ht = 100, ut = 1e6, dt = 100, pt = 50, ft = s(l((e2, n2) => {
|
|
368
|
+
const { offset: o2 = 0, viewportSize: s2 = 0, totalSize: l2 = 0, minSize: c2 = 0, endGap: h2 = ct, endScrollIncrement: u2 = ht, style: p2 = J, onMouseDown: f2, onScrollOffset: _2, onScroll: m2, scaleLimit: g2 = ut, scaleFactor: y2 = dt, precisionFactor: v2 = pt, ...x2 } = e2;
|
|
369
|
+
m2 && console.warn("onScroll not supported for VirtualScrollbar. Use onScrollOffset instead");
|
|
370
|
+
const w2 = B(f2, [f2]), b2 = () => ({ offset: o2, totalSize: 0 === g2 ? l2 : Math.min(l2 ?? 0, Math.max(c2 ?? 0, (o2 ?? 0) + (s2 ?? 0)) + (h2 ?? 0)) }), [S2, L2] = a(b2), E2 = 0 !== g2 && S2.totalSize > g2 ? y2 : 1, C2 = E2 / v2, T2 = Math.ceil(S2.totalSize / E2), M2 = Math.ceil(S2.offset / E2), k2 = Math.ceil(s2 / E2), D2 = i((t2) => {
|
|
371
|
+
}, []), [P2, A2] = a(false), z2 = r(null);
|
|
372
372
|
d(() => {
|
|
373
|
-
if (!
|
|
374
|
-
|
|
375
|
-
const
|
|
376
|
-
L2(
|
|
373
|
+
if (!P2) {
|
|
374
|
+
z2.current = { propTotalSize: l2, propViewportSize: s2, propOffset: o2 };
|
|
375
|
+
const t2 = b2();
|
|
376
|
+
L2(t2);
|
|
377
377
|
}
|
|
378
|
-
}, [l2, s2, o2,
|
|
379
|
-
const $2 = B((
|
|
380
|
-
const i2 =
|
|
381
|
-
|
|
382
|
-
}, [
|
|
383
|
-
document.removeEventListener("mousemove",
|
|
384
|
-
}, []), K2 = i((
|
|
385
|
-
w2?.(
|
|
386
|
-
}, [
|
|
387
|
-
return
|
|
378
|
+
}, [l2, s2, o2, P2, c2, h2, u2]);
|
|
379
|
+
const $2 = B((t2, e3, n3) => {
|
|
380
|
+
const i2 = z2.current;
|
|
381
|
+
z2.current = null, i2 && i2.propTotalSize === l2 && i2.propViewportSize === s2 && i2.propOffset === o2 || (Math.abs(t2 - M2) < C2 && (t2 = M2), _2?.(t2 * E2, M2, k2));
|
|
382
|
+
}, [_2, E2, C2, M2, k2]), O2 = i((t2) => {
|
|
383
|
+
document.removeEventListener("mousemove", D2), document.removeEventListener("mouseup", O2), A2(false);
|
|
384
|
+
}, []), K2 = i((t2) => {
|
|
385
|
+
w2?.(t2), A2(true), document.addEventListener("mousemove", D2, { passive: true }), document.addEventListener("mouseup", O2, { passive: true });
|
|
386
|
+
}, [D2, O2]);
|
|
387
|
+
return t(W, { ref: n2, style: { ...p2 }, ...x2, offset: M2, totalSize: T2, viewportSize: k2, onMouseDown: K2, onScrollOffset: $2 });
|
|
388
388
|
}));
|
|
389
|
-
|
|
390
|
-
const
|
|
391
|
-
const { refFocusStart: o2, ...s2 } =
|
|
389
|
+
ft.displayName = "VirtualScrollbar";
|
|
390
|
+
const _t = { BottomEnd: "bottom-end", BottomStart: "bottom-start", Bottom: "bottom", LeftEnd: "left-end", LeftStart: "left-start", Left: "left", RightEnd: "right-end", RightStart: "right-start", Right: "right", TopEnd: "top-end", TopStart: "top-start", Top: "top" }, mt = s(l((e2, n2) => {
|
|
391
|
+
const { refFocusStart: o2, ...s2 } = e2, l2 = r(null), a2 = i(() => {
|
|
392
392
|
if (o2) return void o2?.current?.focus();
|
|
393
|
-
const
|
|
394
|
-
let
|
|
395
|
-
for (let n3 = 0; n3 <
|
|
396
|
-
const o3 =
|
|
393
|
+
const t2 = l2.current.parentElement.children;
|
|
394
|
+
let e3 = [];
|
|
395
|
+
for (let n3 = 0; n3 < t2.length && t2[n3] !== l2.current; n3++) {
|
|
396
|
+
const o3 = t2[n3].getAttribute("tabindex");
|
|
397
397
|
if (null == o3 || "-1" === o3) continue;
|
|
398
|
-
if ("true" ===
|
|
399
|
-
const i2 =
|
|
400
|
-
i2.focus &&
|
|
398
|
+
if ("true" === t2[n3].getAttribute("disabled")) continue;
|
|
399
|
+
const i2 = t2[n3];
|
|
400
|
+
i2.focus && e3.push({ tabindex: parseInt(o3), child: i2 });
|
|
401
401
|
}
|
|
402
|
-
0 !==
|
|
403
|
-
return
|
|
404
|
-
}),
|
|
402
|
+
0 !== e3.length && (e3.sort(function(t3, e4) {
|
|
403
|
+
return t3.tabindex - e4.tabindex;
|
|
404
|
+
}), e3[0].child.focus());
|
|
405
405
|
}, [o2]);
|
|
406
|
-
return
|
|
406
|
+
return t("div", { tabIndex: 0, ref: C([l2, n2]), onFocus: a2, ...s2 });
|
|
407
407
|
}));
|
|
408
|
-
const
|
|
409
|
-
const { className: l2, style: a2, children: c2, radius: u2 = 4, strokeWidth: d2 = 1, strokeColor:
|
|
410
|
-
const n2 =
|
|
411
|
-
return (function(
|
|
412
|
-
if (0 ===
|
|
413
|
-
function o3(
|
|
414
|
-
let o4 =
|
|
415
|
-
return i3(
|
|
408
|
+
const gt = s(l((i2, s2) => {
|
|
409
|
+
const { className: l2, style: a2, children: c2, radius: u2 = 4, strokeWidth: d2 = 1, strokeColor: p2 = "grey", ...f2 } = i2, [_2, { width: m2, height: g2 }] = y(), v2 = r(null), x2 = (t2, e2 = 0) => {
|
|
410
|
+
const n2 = t2 / 2, o2 = g2 - n2 + e2;
|
|
411
|
+
return (function(t3, e3, n3 = false) {
|
|
412
|
+
if (0 === e3) return t3;
|
|
413
|
+
function o3(t4, e4, n4) {
|
|
414
|
+
let o4 = e4.x - t4.x, r3 = e4.y - t4.y, s4 = Math.sqrt(o4 * o4 + r3 * r3);
|
|
415
|
+
return i3(t4, e4, Math.min(1, n4 / s4));
|
|
416
416
|
}
|
|
417
|
-
function i3(
|
|
418
|
-
return { x:
|
|
417
|
+
function i3(t4, e4, n4) {
|
|
418
|
+
return { x: t4.x + (e4.x - t4.x) * n4, y: t4.y + (e4.y - t4.y) * n4 };
|
|
419
419
|
}
|
|
420
|
-
function r2(
|
|
421
|
-
|
|
420
|
+
function r2(t4, e4) {
|
|
421
|
+
t4.length > 2 && (t4[t4.length - 2] = e4.x, t4[t4.length - 1] = e4.y);
|
|
422
422
|
}
|
|
423
|
-
function s3(
|
|
424
|
-
return { x: parseFloat(
|
|
423
|
+
function s3(t4) {
|
|
424
|
+
return { x: parseFloat(t4[t4.length - 2]), y: parseFloat(t4[t4.length - 1]) };
|
|
425
425
|
}
|
|
426
|
-
let l3 =
|
|
427
|
-
let n4 =
|
|
428
|
-
return n4 ? (
|
|
429
|
-
}, []).reduce(function(
|
|
430
|
-
return parseFloat(
|
|
426
|
+
let l3 = t3.split(/[,\s]/).reduce(function(t4, e4) {
|
|
427
|
+
let n4 = e4.match("([a-zA-Z])(.+)");
|
|
428
|
+
return n4 ? (t4.push(n4[1]), t4.push(n4[2])) : t4.push(e4), t4;
|
|
429
|
+
}, []).reduce(function(t4, e4) {
|
|
430
|
+
return parseFloat(e4) == e4 && t4.length ? t4[t4.length - 1].push(e4) : t4.push([e4]), t4;
|
|
431
431
|
}, []), a3 = [];
|
|
432
432
|
if (l3.length > 1) {
|
|
433
|
-
let
|
|
434
|
-
"Z" === l3[l3.length - 1][0] && l3[0].length > 2 && (c3 = ["L",
|
|
435
|
-
for (let
|
|
436
|
-
let h2 = a3[a3.length - 1], u3 = l3[
|
|
433
|
+
let t4 = s3(l3[0]), c3 = null;
|
|
434
|
+
"Z" === l3[l3.length - 1][0] && l3[0].length > 2 && (c3 = ["L", t4.x, t4.y], l3[l3.length - 1] = c3), a3.push(l3[0]);
|
|
435
|
+
for (let t5 = 1; t5 < l3.length; t5++) {
|
|
436
|
+
let h2 = a3[a3.length - 1], u3 = l3[t5], d3 = u3 === c3 ? l3[1] : l3[t5 + 1];
|
|
437
437
|
if (d3 && h2 && h2.length > 2 && "L" === u3[0] && d3.length > 2 && "L" === d3[0]) {
|
|
438
|
-
let
|
|
439
|
-
n3 ? (
|
|
440
|
-
let
|
|
441
|
-
g3.origPoint =
|
|
438
|
+
let t6, l4, c4 = s3(h2), p3 = s3(u3), f3 = s3(d3);
|
|
439
|
+
n3 ? (t6 = i3(p3, h2.origPoint || c4, e3), l4 = i3(p3, d3.origPoint || f3, e3)) : (t6 = o3(p3, c4, e3), l4 = o3(p3, f3, e3)), r2(u3, t6), u3.origPoint = p3, a3.push(u3);
|
|
440
|
+
let _3 = i3(t6, p3, 0.5), m3 = i3(p3, l4, 0.5), g3 = ["C", _3.x, _3.y, m3.x, m3.y, l4.x, l4.y];
|
|
441
|
+
g3.origPoint = p3, a3.push(g3);
|
|
442
442
|
} else a3.push(u3);
|
|
443
443
|
}
|
|
444
444
|
if (c3) {
|
|
445
|
-
let
|
|
446
|
-
a3.push(["Z"]), r2(a3[0],
|
|
445
|
+
let t5 = s3(a3[a3.length - 1]);
|
|
446
|
+
a3.push(["Z"]), r2(a3[0], t5);
|
|
447
447
|
}
|
|
448
448
|
} else a3 = l3;
|
|
449
|
-
return a3.reduce(function(
|
|
450
|
-
return
|
|
449
|
+
return a3.reduce(function(t4, e4) {
|
|
450
|
+
return t4 + e4.join(" ") + " ";
|
|
451
451
|
}, "");
|
|
452
|
-
})(`${`M 0 ${n2} L ${u2 - 0.5} ${n2} L ${u2 - 0.5} ${o2} L ${2 * u2} ${o2}`} ${`L ${
|
|
453
|
-
}, w2 = h(() => x2(d2), [
|
|
452
|
+
})(`${`M 0 ${n2} L ${u2 - 0.5} ${n2} L ${u2 - 0.5} ${o2} L ${2 * u2} ${o2}`} ${`L ${m2 - 2 * u2} ${o2}`} ${`M ${m2 - 2 * u2} ${o2} L ${m2 - u2} ${o2} L ${m2 - u2} ${n2} L ${m2} ${n2}`}`, u2);
|
|
453
|
+
}, w2 = h(() => x2(d2), [m2, g2, u2, d2]), b2 = h(() => {
|
|
454
454
|
if (0 === u2) return;
|
|
455
|
-
const
|
|
456
|
-
return x2(u2) + `L ${
|
|
455
|
+
const t2 = u2 / 2;
|
|
456
|
+
return x2(u2) + `L ${m2} 0 L 0 0 L 0 ${t2}`;
|
|
457
457
|
}, [w2, u2, d2]), S2 = h(() => ({ style: { clipPath: `path('${b2}')` } }), [b2]);
|
|
458
|
-
return
|
|
459
|
-
})),
|
|
460
|
-
const { onPointerDown: n2, style: o2, splitDirection: i2, paddingBefore: r2 = 0, paddingAfter: s2 = 0, disabled: l2, key: a2, hitAreaProps: c2 =
|
|
461
|
-
return
|
|
462
|
-
},
|
|
463
|
-
if (null ==
|
|
458
|
+
return e("div", { className: l2, style: { display: "flex", flexDirection: "row", ...a2 }, ...f2, ref: C([v2, _2, s2]), children: [o.isValidElement(c2) ? o.cloneElement(c2, S2) : t(n, {}), t("svg", { style: { position: "absolute", top: 0, left: 0, pointerEvents: "none" }, width: m2, height: g2, viewBox: `0 0 ${m2} ${g2}`, children: t("path", { d: w2, stroke: p2, fill: "none", vectorEffect: "non-scaling-stroke", strokeWidth: d2 }) })] });
|
|
459
|
+
})), yt = {}, vt = (e2) => {
|
|
460
|
+
const { onPointerDown: n2, style: o2, splitDirection: i2, paddingBefore: r2 = 0, paddingAfter: s2 = 0, disabled: l2, key: a2, hitAreaProps: c2 = yt, ...h2 } = e2, u2 = "row" === i2, { style: d2, className: p2, ...f2 } = c2;
|
|
461
|
+
return t("div", { style: { ...o2, position: "relative" }, ...h2, children: t("div", { className: g("hit-box", p2), style: { left: (u2 ? -r2 : 0) + "px", width: `calc(100% + ${u2 ? r2 + s2 : 0}px)`, top: (u2 ? 0 : -r2) + "px", height: `calc(100% + ${u2 ? 0 : r2 + s2}px)`, position: "absolute", ...d2 }, onPointerDown: l2 ? void 0 : n2, ...f2 }) }, a2);
|
|
462
|
+
}, xt = {}, wt = (t2, e2, n2 = true) => null === t2 ? null : null !== t2.pixels ? n2 ? t2.pixels : e2 - t2.pixels : (n2 ? t2.percent : 100 - t2.percent) / 100 * e2, bt = (t2, e2 = true) => t2?.percent ? `${e2 ? t2.percent : 100 - t2.percent}%` : t2?.pixels ? `${t2.pixels}px` : void 0, St = (t2, e2) => {
|
|
463
|
+
if (null == t2) return null;
|
|
464
464
|
const n2 = { percent: null, pixels: null };
|
|
465
|
-
let o2 =
|
|
466
|
-
return "string" == typeof
|
|
467
|
-
},
|
|
468
|
-
const { elementBefore: s2, elementAfter: l2, splitDirection: u2 = "row", fixedPane: d2 = null, position:
|
|
465
|
+
let o2 = e2;
|
|
466
|
+
return "string" == typeof t2 && ((t2 = t2.trim().toLowerCase()).endsWith("px") ? (t2 = t2.substring(0, t2.length - 2), o2 = false) : t2.endsWith("%") && (t2 = t2.substring(0, t2.length - 1), o2 = true), t2 = parseFloat(t2)), o2 ? n2.percent = t2 : n2.pixels = t2, Object.freeze(n2);
|
|
467
|
+
}, Lt = s(l((n2, i2) => {
|
|
468
|
+
const { elementBefore: s2, elementAfter: l2, splitDirection: u2 = "row", fixedPane: d2 = null, position: p2, onPositionChange: f2, minBefore: _2, maxBefore: m2, minAfter: v2, maxAfter: x2, children: w2, className: b2, style: S2, disabled: L2 = false, onDragStart: E2, onDragResize: T2, onDragFinish: M2, resizerProps: k2 = xt, paneProps: D2 = xt, paneBeforeProps: P2 = xt, paneAfterProps: A2 = xt, createResizer: z2 = vt } = n2;
|
|
469
469
|
if (w2) throw new Error("Use elementBefore and elementAfter instead of children.");
|
|
470
470
|
const $2 = h(() => o.isValidElement(l2) && o.isValidElement(s2), [l2, s2]), O2 = h(() => {
|
|
471
|
-
let
|
|
472
|
-
d2 && ("before" === d2 ?
|
|
473
|
-
const
|
|
474
|
-
return { fixedPaneOffset:
|
|
475
|
-
}, [
|
|
471
|
+
let t2 = null;
|
|
472
|
+
d2 && ("before" === d2 ? t2 = 0 : "after" === d2 && (t2 = 1));
|
|
473
|
+
const e2 = null === t2;
|
|
474
|
+
return { fixedPaneOffset: t2, isPercent: e2, minBefore: St(_2, e2), maxBefore: St(m2, e2), minAfter: St(v2, e2), maxAfter: St(x2, e2) };
|
|
475
|
+
}, [_2, m2, v2, x2]), K2 = B(f2, [f2]), [V2, N2] = a(() => St(p2, null === d2));
|
|
476
476
|
c(() => {
|
|
477
|
-
|
|
478
|
-
}, [
|
|
479
|
-
const [
|
|
477
|
+
N2(St(p2, null === d2));
|
|
478
|
+
}, [p2, d2]);
|
|
479
|
+
const [H2, { width: W2, height: I2 }] = y(), [R2, { width: j2, height: F2 }] = y(), Y2 = "row" === u2 ? j2 : F2, X2 = "row" === u2 ? W2 : I2, U2 = h(() => ((t2, e2, n3, o2) => {
|
|
480
480
|
const i3 = [null, null], r2 = [null, null];
|
|
481
|
-
if (
|
|
482
|
-
let s3 =
|
|
483
|
-
h2 = (
|
|
484
|
-
const
|
|
485
|
-
return r2[0] =
|
|
486
|
-
})(V2,
|
|
487
|
-
const
|
|
488
|
-
|
|
489
|
-
}, [d2]),
|
|
481
|
+
if (t2 || (t2 = { percent: null === o2.fixedPaneOffset ? 50 : null, pixels: null === o2.fixedPaneOffset ? null : 0 }), 0 === e2) return null != t2?.pixels ? 1 !== o2.fixedPaneOffset ? (i3[0] = t2?.pixels, r2[1] = 100) : (i3[1] = t2?.pixels - n3, r2[0] = 100) : null != t2?.percent && (1 !== o2.fixedPaneOffset ? (r2[0] = t2?.percent, r2[1] = 100 - t2?.percent) : (r2[1] = t2?.percent, r2[0] = 100 - t2?.percent)), { percents: r2, pixels: i3, minBefore: bt(o2.minBefore, true), maxBefore: bt(o2.maxBefore, true), minAfter: bt(o2.minAfter), maxAfter: bt(o2.maxAfter) };
|
|
482
|
+
let s3 = wt(t2, e2, 1 !== o2.fixedPaneOffset), l3 = e2 - n3, a2 = wt(o2.minBefore, l3, true) ?? 0, c2 = wt(o2.maxBefore, l3, true) ?? l3, h2 = 0, u3 = 0, d3 = 0, p3 = l3;
|
|
483
|
+
h2 = (wt(o2.maxAfter, e2, false) ?? n3) - n3, u3 = wt(o2.minAfter, e2, false) ?? e2, d3 = Math.max(a2, h2), p3 = Math.min(c2, u3), s3 = Math.max(d3, Math.min(s3, p3)), u3 = Math.min(l3 - s3, wt(o2.maxAfter, l3 - s3, true) ?? l3), h2 = Math.min(l3 - s3, wt(o2.minAfter, l3 - s3, true) ?? l3), i3[0] = s3, i3[1] = l3 - i3[0];
|
|
484
|
+
const f3 = Math.max(0, Math.min(100, s3 / l3 * 100));
|
|
485
|
+
return r2[0] = f3, r2[1] = 100 - r2[0], { percents: r2, pixels: i3, minBefore: `${a2}px`, minAfter: `${h2}px`, maxBefore: `${i3[0]}px`, maxAfter: `${i3[1]}px` };
|
|
486
|
+
})(V2, X2, Y2, O2), [O2, V2, X2, Y2, u2]), [Z2, q2] = a(false), G2 = B(E2, [E2]), J2 = B(T2, [T2]), Q2 = B(M2, [M2]), tt2 = r(null), et2 = r(null), nt2 = r(null), { style: it2, className: rt2, ...st2 } = D2, lt2 = { minWidth: 0, minHeight: 0, maxWidth: "100%", maxHeight: "100%", display: "flex", overflow: "hidden", ...it2 }, { className: at2, style: ct2, ...ht2 } = P2, { className: ut2, style: dt2, ...pt2 } = A2, ft2 = { flex: "1 1 100%", width: "100%", ...S2, flexDirection: u2, display: "flex" }, { className: _t2, style: mt2, onPointerDown: gt2, ...yt2 } = k2, Lt2 = B((t2) => {
|
|
487
|
+
const e2 = St(t2, null === d2);
|
|
488
|
+
N2(e2);
|
|
489
|
+
}, [d2]), Et2 = B((t2) => {
|
|
490
490
|
if (L2 || !Z2) return;
|
|
491
|
-
const
|
|
491
|
+
const e2 = Mt2.current?.getBoundingClientRect();
|
|
492
492
|
let n3 = 0;
|
|
493
|
-
n3 = "row" === u2 ? (
|
|
494
|
-
}, [O2, u2, L2, Z2, V2,
|
|
495
|
-
if (document.removeEventListener("pointermove",
|
|
496
|
-
if (
|
|
493
|
+
n3 = "row" === u2 ? (t2.clientX ?? t2.touches?.[0]?.clientX) - e2.x : (t2.clientY ?? t2.touches?.[0]?.clientY) - e2.y, n3 = Math.max(0, Math.min(X2, n3)), 1 === O2.fixedPaneOffset && (n3 = X2 - n3), p2 && V2.pixels === n3 || N2({ pixels: n3, percent: null }), J2?.(n3), t2.stopPropagation(), t2.preventDefault();
|
|
494
|
+
}, [O2, u2, L2, Z2, V2, X2]), Ct2 = B((t2) => {
|
|
495
|
+
if (document.removeEventListener("pointermove", Et2), document.removeEventListener("touchmove", Et2), document.removeEventListener("pointerup", Ct2), !Z2) return;
|
|
496
|
+
if (q2(false), !V2) return;
|
|
497
497
|
Q2(V2.pixels);
|
|
498
|
-
if (!
|
|
499
|
-
const
|
|
500
|
-
null ===
|
|
498
|
+
if (!St(p2, null === d2) || V2.pixels !== p2) {
|
|
499
|
+
const t3 = { ...V2 };
|
|
500
|
+
null === t3.percent && (t3.percent = t3.pixels / X2 * 100), K2(t3);
|
|
501
|
+
}
|
|
502
|
+
t2.stopPropagation(), t2.preventDefault();
|
|
503
|
+
}, [V2, Z2, p2, d2, X2]), Tt2 = B((t2) => {
|
|
504
|
+
gt2?.(t2), t2.defaultPrevented || L2 || Z2 || (q2(true), G2(), document.addEventListener("pointermove", Et2, { passive: false }), document.addEventListener("touchmove", Et2, { passive: false }), document.addEventListener("pointerup", Ct2, { passive: false }));
|
|
505
|
+
}, [gt2]), Mt2 = ot(i2, () => ({ setPosition: Lt2, isSplitPane: () => true }), []), kt2 = h(() => $2 ? z2?.({ key: "resizer", ref: C([R2, et2]), className: g("resizer", _t2), onPointerDownCapture: Tt2, style: { cursor: L2 ? void 0 : "row" === u2 ? "ew-resize" : "ns-resize", minWidth: "row" === u2 ? "2px" : void 0, minHeight: "row" !== u2 ? "2px" : void 0, boxSizing: "border-box", pointerEvents: "all", zIndex: 1, ...mt2 }, splitDirection: u2, disabled: L2, ...yt2 }) : null, [$2, _t2, yt2, u2, mt2, L2]), Dt2 = "row" === u2 ? "Width" : "Height", Pt2 = { ...lt2, ...ct2, flex: 0 === O2.fixedPaneOffset && null !== U2?.pixels[0] ? `0 0 ${Math.round(U2?.pixels[0])}px` : `1 1 ${Math.round(U2?.percents[0] ?? 100)}%`, [`min${Dt2}`]: U2?.minBefore, [`max${Dt2}`]: l2 ? U2?.maxBefore : "100%" }, At2 = { ...lt2, ...dt2, flex: 1 === O2.fixedPaneOffset && null !== U2?.pixels[1] ? `0 0 ${Math.round(U2?.pixels[1])}px` : `1 1 ${Math.round(U2?.percents[1] ?? 100)}%`, [`min${Dt2}`]: U2?.minAfter, [`max${Dt2}`]: s2 ? U2?.maxAfter : "100%" }, zt2 = h(() => s2 ? t("div", { ref: tt2, className: g("before", rt2, at2), style: Pt2, ...st2, ...ht2, children: s2 }, "before") : null, [s2, D2, P2, O2, U2]), Bt2 = h(() => l2 ? t("div", { ref: nt2, className: g("after", rt2, ut2), style: At2, ...st2, ...pt2, children: l2 }, "after") : null, [l2, D2, A2, O2, U2]);
|
|
506
|
+
return e("div", { ref: C([H2, Mt2]), className: g("splitPane", "row" === u2 ? "vertical" : "horizontal", { dragging: Z2 }, b2), style: ft2, children: [zt2, kt2, Bt2] });
|
|
507
|
+
}));
|
|
508
|
+
function Et(t2) {
|
|
509
|
+
if ("function" == typeof t2) return t2;
|
|
510
|
+
if ("string" == typeof t2) {
|
|
511
|
+
const e2 = t2.trim();
|
|
512
|
+
if (e2.startsWith("data:image/svg+xml")) {
|
|
513
|
+
const t3 = (function(t4) {
|
|
514
|
+
const e3 = /^data:image\/svg\+xml(;[^,]*)?,(.*)$/i.exec(t4.trim());
|
|
515
|
+
if (!e3) return null;
|
|
516
|
+
const n2 = e3[1] || "", o2 = e3[2] || "";
|
|
517
|
+
try {
|
|
518
|
+
if (/;base64/i.test(n2)) {
|
|
519
|
+
if ("undefined" != typeof atob) {
|
|
520
|
+
const t5 = atob(o2);
|
|
521
|
+
if ("undefined" != typeof TextDecoder) {
|
|
522
|
+
const e5 = new Uint8Array(t5.length);
|
|
523
|
+
for (let n3 = 0; n3 < t5.length; n3++) e5[n3] = t5.charCodeAt(n3);
|
|
524
|
+
return new TextDecoder("utf-8").decode(e5);
|
|
525
|
+
}
|
|
526
|
+
let e4 = "";
|
|
527
|
+
for (let n3 = 0; n3 < t5.length; n3++) {
|
|
528
|
+
e4 += `%${t5.charCodeAt(n3).toString(16).padStart(2, "0")}`;
|
|
529
|
+
}
|
|
530
|
+
return decodeURIComponent(e4);
|
|
531
|
+
}
|
|
532
|
+
return (globalThis.Buffer ? globalThis.Buffer.from(o2, "base64") : require("buffer").Buffer.from(o2, "base64")).toString("utf-8");
|
|
533
|
+
}
|
|
534
|
+
try {
|
|
535
|
+
return decodeURIComponent(o2);
|
|
536
|
+
} catch {
|
|
537
|
+
return o2;
|
|
538
|
+
}
|
|
539
|
+
} catch {
|
|
540
|
+
return null;
|
|
541
|
+
}
|
|
542
|
+
})(e2);
|
|
543
|
+
if (t3) return Mt(t3);
|
|
544
|
+
}
|
|
545
|
+
if (e2.startsWith("<")) {
|
|
546
|
+
if (/^<\s*svg\b/i.test(e2)) return Mt(e2);
|
|
547
|
+
if (/^<\s*path\b/i.test(e2)) {
|
|
548
|
+
const t3 = Ct(e2);
|
|
549
|
+
if (t3) return { paths: [{ d: t3 }] };
|
|
550
|
+
}
|
|
551
|
+
return { paths: [{ d: e2 }] };
|
|
552
|
+
}
|
|
553
|
+
return { paths: [{ d: e2 }] };
|
|
554
|
+
}
|
|
555
|
+
if (Array.isArray(t2)) {
|
|
556
|
+
const e2 = [];
|
|
557
|
+
for (const n2 of t2) if ("string" == typeof n2) {
|
|
558
|
+
const t3 = String(n2).trim();
|
|
559
|
+
if (t3.startsWith("<path")) {
|
|
560
|
+
const n3 = Ct(t3);
|
|
561
|
+
n3 && e2.push({ d: n3 });
|
|
562
|
+
} else e2.push({ d: t3 });
|
|
563
|
+
} else n2 && "object" == typeof n2 && "d" in n2 && "string" == typeof n2.d && e2.push({ ...n2 });
|
|
564
|
+
return { paths: e2 };
|
|
565
|
+
}
|
|
566
|
+
return t2;
|
|
567
|
+
}
|
|
568
|
+
function Ct(t2) {
|
|
569
|
+
const e2 = /\bd\s*=\s*(?:"([^"]+)"|'([^']+)')/i.exec(t2);
|
|
570
|
+
return e2 ? e2[1] ?? e2[2] ?? null : null;
|
|
571
|
+
}
|
|
572
|
+
function Tt(t2) {
|
|
573
|
+
if ("svg" in t2) return { ...t2, svg: Et(t2.svg) };
|
|
574
|
+
if ("url" in t2) {
|
|
575
|
+
const e2 = "string" == typeof t2.url ? { src: t2.url } : t2.url;
|
|
576
|
+
return { ...t2, url: e2 };
|
|
577
|
+
}
|
|
578
|
+
if ("emoji" in t2) {
|
|
579
|
+
const e2 = "string" == typeof t2.emoji ? t2.emoji : t2.emoji.text;
|
|
580
|
+
return { ...t2, emoji: e2 };
|
|
581
|
+
}
|
|
582
|
+
return t2;
|
|
583
|
+
}
|
|
584
|
+
function Mt(t2) {
|
|
585
|
+
try {
|
|
586
|
+
if ("undefined" != typeof DOMParser) {
|
|
587
|
+
const e3 = new DOMParser().parseFromString(t2, "image/svg+xml"), n3 = e3.querySelector("svg"), o3 = n3?.getAttribute("viewBox") ?? void 0, i3 = [];
|
|
588
|
+
return e3.querySelectorAll("path").forEach((t3) => {
|
|
589
|
+
const e4 = t3.getAttribute("d");
|
|
590
|
+
if (!e4) return;
|
|
591
|
+
const n4 = { d: e4 }, o4 = t3.getAttribute("class");
|
|
592
|
+
o4 && (n4.className = o4);
|
|
593
|
+
const r3 = t3.getAttribute("fill");
|
|
594
|
+
r3 && "none" !== r3 && (n4.fill = r3);
|
|
595
|
+
const s2 = t3.getAttribute("stroke");
|
|
596
|
+
s2 && (n4.stroke = s2);
|
|
597
|
+
const l2 = t3.getAttribute("opacity");
|
|
598
|
+
l2 && (n4.opacity = Number(l2));
|
|
599
|
+
const a2 = t3.getAttribute("fill-rule");
|
|
600
|
+
a2 && (n4.fillRule = a2);
|
|
601
|
+
const c2 = t3.getAttribute("clip-rule");
|
|
602
|
+
c2 && (n4.clipRule = c2), i3.push(n4);
|
|
603
|
+
}), { viewBox: o3, paths: i3 };
|
|
604
|
+
}
|
|
605
|
+
} catch {
|
|
606
|
+
}
|
|
607
|
+
const e2 = t2.match(/viewBox="([^"]+)"/i), n2 = e2 ? e2[1] : void 0, o2 = [], i2 = /<path\b[^>]*\sd="([^"]+)"[^>]*>/gi;
|
|
608
|
+
let r2;
|
|
609
|
+
for (; r2 = i2.exec(t2); ) o2.push({ d: r2[1] });
|
|
610
|
+
return { viewBox: n2, paths: o2 };
|
|
611
|
+
}
|
|
612
|
+
function kt(t2) {
|
|
613
|
+
const e2 = {};
|
|
614
|
+
for (const [n3, o3] of Object.entries(t2.icons)) e2[n3] = Tt(o3);
|
|
615
|
+
const n2 = { label: t2.meta?.label ?? "Unnamed", version: t2.meta?.version ?? "1.0.0", license: t2.meta?.license ?? "MIT", defaultViewBox: "0 0 24 24", extends: t2.meta?.extends ?? [] };
|
|
616
|
+
n2.extends.includes("base") || n2.extends.push("base");
|
|
617
|
+
const o2 = { meta: n2, icons: e2 }, i2 = t2.overrides;
|
|
618
|
+
if (i2) {
|
|
619
|
+
const t3 = {};
|
|
620
|
+
for (const [e3, n3] of Object.entries(i2)) {
|
|
621
|
+
const o3 = {};
|
|
622
|
+
for (const [t4, e4] of Object.entries(n3)) o3[t4] = Tt(e4);
|
|
623
|
+
t3[e3] = o3;
|
|
624
|
+
}
|
|
625
|
+
o2.__overrides = t3;
|
|
626
|
+
}
|
|
627
|
+
return o2;
|
|
628
|
+
}
|
|
629
|
+
function Dt() {
|
|
630
|
+
const t2 = /* @__PURE__ */ new Map(), e2 = /* @__PURE__ */ new Map();
|
|
631
|
+
let n2 = "base", o2 = /* @__PURE__ */ new Map();
|
|
632
|
+
async function i2(e3) {
|
|
633
|
+
const o3 = t2.get(e3 ?? n2);
|
|
634
|
+
if (!o3) throw new Error(`Icon pack not registered: ${e3}`);
|
|
635
|
+
if (!o3.pack) {
|
|
636
|
+
if (!o3.loading) {
|
|
637
|
+
if (!o3.loader) throw new Error(`No loader for icon pack: ${e3}`);
|
|
638
|
+
o3.loading = o3.loader().then((t3) => {
|
|
639
|
+
const e4 = t3 && "object" == typeof t3 && "default" in t3 ? t3.default : t3;
|
|
640
|
+
o3.pack = kt(e4);
|
|
641
|
+
}).catch((t3) => {
|
|
642
|
+
throw o3.loading = void 0, t3;
|
|
643
|
+
});
|
|
644
|
+
}
|
|
645
|
+
await o3.loading;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
function r2(t3) {
|
|
649
|
+
const e3 = t3.indexOf(":");
|
|
650
|
+
return e3 > 0 ? { ns: t3.slice(0, e3), key: t3.slice(e3 + 1) } : { key: t3 };
|
|
651
|
+
}
|
|
652
|
+
function s2(n3, o3) {
|
|
653
|
+
const i3 = [n3, ...t2.get(n3)?.pack?.meta.extends ?? []];
|
|
654
|
+
for (const n4 of i3) {
|
|
655
|
+
const i4 = t2.get(n4);
|
|
656
|
+
if (!i4?.pack) continue;
|
|
657
|
+
const { icons: r3 } = i4.pack, s3 = r3[e2.get(n4)?.get(o3) ?? o3] ?? r3[o3];
|
|
658
|
+
if (s3) return { glyph: s3, pack: i4.pack, packKey: n4 };
|
|
659
|
+
}
|
|
660
|
+
return null;
|
|
661
|
+
}
|
|
662
|
+
function l2(e3, o3) {
|
|
663
|
+
const i3 = o3?.packKey ?? n2;
|
|
664
|
+
if (o3?.packKey) return s2(o3.packKey, e3);
|
|
665
|
+
if (!e3) return null;
|
|
666
|
+
const { ns: l3, key: a2 } = r2(e3);
|
|
667
|
+
if (l3) {
|
|
668
|
+
const e4 = t2.get(l3)?.pack;
|
|
669
|
+
if (e4) {
|
|
670
|
+
if (!!t2.get(n2)?.pack) {
|
|
671
|
+
const t3 = e4.__overrides, o5 = t3?.[n2]?.[a2];
|
|
672
|
+
if (o5) return { glyph: o5, pack: e4, packKey: l3 };
|
|
673
|
+
}
|
|
674
|
+
const o4 = s2(l3, a2);
|
|
675
|
+
if (o4) return o4;
|
|
676
|
+
}
|
|
677
|
+
return null;
|
|
678
|
+
}
|
|
679
|
+
return s2(i3, e3);
|
|
680
|
+
}
|
|
681
|
+
return { register: function(e3, o3) {
|
|
682
|
+
const i3 = t2.get(e3) ?? {};
|
|
683
|
+
"function" == typeof o3 ? i3.loader = o3 : i3.pack = kt(o3), t2.set(e3, i3), n2 || (n2 = e3);
|
|
684
|
+
}, prefetch: async function(t3 = n2) {
|
|
685
|
+
const e3 = Array.isArray(t3) ? t3 : [t3];
|
|
686
|
+
await Promise.all(e3.map(i2));
|
|
687
|
+
}, setActive: function(t3) {
|
|
688
|
+
n2 = t3;
|
|
689
|
+
for (const e3 of o2.keys()) try {
|
|
690
|
+
e3(t3);
|
|
691
|
+
} catch (t4) {
|
|
692
|
+
}
|
|
693
|
+
}, getActive: function() {
|
|
694
|
+
return n2;
|
|
695
|
+
}, resolve: async function(e3, o3) {
|
|
696
|
+
let s3 = l2(e3, o3);
|
|
697
|
+
if (s3) return s3;
|
|
698
|
+
const a2 = o3?.packKey ?? n2, { ns: c2 } = r2(e3);
|
|
699
|
+
if (o3?.packKey) {
|
|
700
|
+
if (await i2(a2), s3 = l2(e3, o3), s3) return s3;
|
|
701
|
+
const n3 = t2.get(a2)?.pack?.meta?.extends ?? [];
|
|
702
|
+
if (n3.length && (await Promise.all(n3.map(i2)), s3 = l2(e3, o3), s3)) return s3;
|
|
703
|
+
} else if (c2) {
|
|
704
|
+
if (await i2(c2), s3 = l2(e3, o3), s3) return s3;
|
|
705
|
+
const n3 = t2.get(c2)?.pack?.meta?.extends ?? [];
|
|
706
|
+
if (n3.length && (await Promise.all(n3.map(i2)), s3 = l2(e3, o3), s3)) return s3;
|
|
707
|
+
} else {
|
|
708
|
+
if (await i2(a2), s3 = l2(e3, o3), s3) return s3;
|
|
709
|
+
const n3 = t2.get(a2)?.pack?.meta?.extends ?? [];
|
|
710
|
+
if (n3.length && (await Promise.all(n3.map(i2)), s3 = l2(e3, o3), s3)) return s3;
|
|
711
|
+
}
|
|
712
|
+
return null;
|
|
713
|
+
}, registerAlias: function(t3, n3, o3) {
|
|
714
|
+
e2.has(t3) || e2.set(t3, /* @__PURE__ */ new Map()), e2.get(t3).set(n3, o3);
|
|
715
|
+
}, has: function(t3, e3) {
|
|
716
|
+
return !!l2(t3, e3);
|
|
717
|
+
}, getPack: function(e3) {
|
|
718
|
+
return t2.get(e3 ?? n2)?.pack;
|
|
719
|
+
}, hasPack: function(e3) {
|
|
720
|
+
return !!t2.get(e3)?.pack;
|
|
721
|
+
}, listPacks: function() {
|
|
722
|
+
return Array.from(t2.keys());
|
|
723
|
+
}, listIcons: function(e3) {
|
|
724
|
+
const n3 = t2.get(e3)?.pack;
|
|
725
|
+
return n3 ? Object.keys(n3.icons) : [];
|
|
726
|
+
}, addActiveListener: function(t3) {
|
|
727
|
+
const e3 = o2.get(t3);
|
|
728
|
+
if (e3) return e3;
|
|
729
|
+
const n3 = () => {
|
|
730
|
+
o2.delete(t3);
|
|
731
|
+
};
|
|
732
|
+
return o2.set(t3, n3), n3;
|
|
733
|
+
} };
|
|
734
|
+
}
|
|
735
|
+
const Pt = Dt();
|
|
736
|
+
Pt.register("base", () => import("./iqYVEUkNtlVZ_Hro.mjs"));
|
|
737
|
+
const At = (e2) => t("svg", { ...e2, children: t("path", {}) }), zt = { Icon: "_Icon_1ipwo_10" }, Bt = s((e2) => {
|
|
738
|
+
const { iconKey: n2, packKey: i2, className: r2, style: s2, role: l2, title: a2, size: c2, ariaHidden: u2, sourceProps: d2, children: p2, ...f2 } = e2, [_2, m2] = o.useState(null);
|
|
739
|
+
o.useEffect(() => {
|
|
740
|
+
let t2 = true, e3 = i2, o2 = n2;
|
|
741
|
+
if (!o2) {
|
|
742
|
+
const t3 = Pt.getPack(e3);
|
|
743
|
+
return void m2({ glyph: t3 ? { svg: v.EmptyArray } : void 0, pack: t3 ?? void 0, packKey: e3 ?? Pt.getActive() });
|
|
744
|
+
}
|
|
745
|
+
if (o2.includes(":")) {
|
|
746
|
+
const [t3, n3] = o2.split(":");
|
|
747
|
+
e3 = t3, o2 = n3;
|
|
501
748
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
749
|
+
return Pt.resolve(o2, { packKey: e3 }).then((e4) => {
|
|
750
|
+
t2 && m2(e4);
|
|
751
|
+
}), () => {
|
|
752
|
+
t2 = false;
|
|
753
|
+
};
|
|
754
|
+
}, [n2, i2]);
|
|
755
|
+
const g2 = _2?.pack, y2 = _2?.glyph, x2 = _2?.packKey;
|
|
756
|
+
let w2 = y2 ? y2.svg : void 0;
|
|
757
|
+
const b2 = y2 && !w2 ? y2.url : void 0, S2 = !y2 || w2 || b2 ? void 0 : y2.emoji, L2 = null != c2 ? "number" == typeof c2 ? `${c2}px` : c2 : void 0, E2 = h(() => [zt.Icon, "icon", r2].filter(Boolean).join(" "), [r2]), C2 = h(() => {
|
|
758
|
+
const t2 = { ...s2 };
|
|
759
|
+
return t2["--icon-size"] = L2, t2;
|
|
760
|
+
}, [s2, L2]), T2 = l2 ?? (a2 ? "img" : "presentation"), M2 = u2 ?? (!a2 || void 0), k2 = (e3) => t("span", { className: E2, style: C2, role: T2, "aria-hidden": M2, title: a2, "data-icon-glyph": n2, "data-icon-pack": x2, ...f2, children: e3 });
|
|
761
|
+
if (p2) return k2(p2);
|
|
762
|
+
if (S2) return k2(t("span", { children: "string" == typeof S2 ? S2 : S2.text }));
|
|
763
|
+
if (b2) return k2(t("img", { src: b2.src, alt: a2 ?? "" }));
|
|
764
|
+
if (y2 && "react" in y2) {
|
|
765
|
+
const e3 = y2.react, n3 = { className: E2, style: C2, role: T2, "aria-hidden": M2, title: a2, ...f2, ...d2 };
|
|
766
|
+
return k2(t(e3, { ...n3 }));
|
|
767
|
+
}
|
|
768
|
+
const D2 = { viewBox: w2?.viewBox ?? g2?.meta.defaultViewBox ?? "0 0 24 24" };
|
|
769
|
+
if ("function" == typeof w2) {
|
|
770
|
+
return k2(w2(D2) ?? t(At, { ...D2 }));
|
|
771
|
+
}
|
|
772
|
+
if (!w2) return k2(t(At, { ...D2 }));
|
|
773
|
+
const P2 = w2.paths;
|
|
774
|
+
return k2(t("svg", { ...D2, children: P2 ? P2.map((e3, n3) => t("path", { d: e3.d, className: e3.className, fill: e3.fill, stroke: e3.stroke, opacity: e3.opacity, fillRule: e3.fillRule, clipRule: e3.clipRule }, n3)) : null }));
|
|
775
|
+
});
|
|
776
|
+
function $t(e2) {
|
|
777
|
+
const { isWalking: n2 = false, themedType: o2 = "info", speed: i2 = 120, dashGap: r2 = 3, dashLength: s2 = 5, iconKey: l2, packKey: a2, style: c2, className: u2, ...d2 } = e2, p2 = h(() => {
|
|
778
|
+
if (!n2) return;
|
|
779
|
+
const t2 = { "--walk-duration": `${i2 * (r2 + s2)}ms`, "--walk-dash-length": `${s2}px`, "--walk-dash-gap": `${r2}px` };
|
|
780
|
+
return o2 && "accent" !== o2 && (t2["--icon-accent"] = `var(--icon-${o2})`), t2;
|
|
781
|
+
}, [n2, i2, r2, s2, o2]), f2 = h(() => n2 ? u2 + " walking" : u2, [n2, u2]);
|
|
782
|
+
return t(Bt, { iconKey: l2, packKey: a2, className: f2, style: { ...c2, ...p2 }, ...d2 });
|
|
783
|
+
}
|
|
784
|
+
const Ot = { Default: "default", Error: "error", Success: "success", Warning: "warning", Info: "info" };
|
|
785
|
+
class Kt extends x {
|
|
786
|
+
setOverrides(t2) {
|
|
787
|
+
super.setOverrides(t2);
|
|
511
788
|
}
|
|
512
789
|
getDelegate() {
|
|
513
790
|
return this._overrides;
|
|
514
791
|
}
|
|
515
|
-
showMessage(
|
|
792
|
+
showMessage(t2, e2) {
|
|
516
793
|
const n2 = this.getDelegate();
|
|
517
|
-
if (n2?.showMessage) return n2.showMessage(
|
|
518
|
-
|
|
794
|
+
if (n2?.showMessage) return n2.showMessage(t2, e2);
|
|
795
|
+
e2?.type !== Ot.Warning ? e2?.type !== Ot.Error ? w.log(t2) : w.error(t2) : w.warn(t2);
|
|
519
796
|
}
|
|
520
|
-
showBusy(
|
|
797
|
+
showBusy(t2, e2) {
|
|
521
798
|
const n2 = this.getDelegate();
|
|
522
|
-
return n2?.showBusy ? n2.showBusy(
|
|
523
|
-
|
|
799
|
+
return n2?.showBusy ? n2.showBusy(t2, e2) : new Promise((t3) => {
|
|
800
|
+
t3(() => {
|
|
524
801
|
});
|
|
525
802
|
});
|
|
526
803
|
}
|
|
527
|
-
showWindow(
|
|
804
|
+
showWindow(t2, e2, n2) {
|
|
528
805
|
const o2 = this.getDelegate();
|
|
529
|
-
if (o2?.showWindow) return o2.showWindow(
|
|
806
|
+
if (o2?.showWindow) return o2.showWindow(t2, e2, n2);
|
|
530
807
|
}
|
|
531
|
-
showError(
|
|
532
|
-
const
|
|
533
|
-
|
|
808
|
+
showError(t2) {
|
|
809
|
+
const e2 = this.getDelegate();
|
|
810
|
+
e2?.showError ? e2.showError(t2) : w.error(t2);
|
|
534
811
|
}
|
|
535
|
-
showOptions(
|
|
536
|
-
const
|
|
537
|
-
return
|
|
812
|
+
showOptions(t2) {
|
|
813
|
+
const e2 = this.getDelegate();
|
|
814
|
+
return e2?.showOptions ? e2.showOptions(t2) : Promise.resolve("");
|
|
538
815
|
}
|
|
539
|
-
showInputOptions(
|
|
540
|
-
const
|
|
541
|
-
return
|
|
816
|
+
showInputOptions(t2) {
|
|
817
|
+
const e2 = this.getDelegate();
|
|
818
|
+
return e2?.showInputOptions ? e2.showInputOptions(t2) : Promise.resolve({ input: "", option: "" });
|
|
542
819
|
}
|
|
543
820
|
}
|
|
544
|
-
const
|
|
545
|
-
const
|
|
546
|
-
return w.setOverrides(
|
|
547
|
-
w.setOverrides(
|
|
821
|
+
const Vt = p(new Kt()), Nt = ({ children: t2, notifier: e2 }) => (o.useEffect(() => {
|
|
822
|
+
const t3 = w.getOverrides();
|
|
823
|
+
return w.setOverrides(e2), () => {
|
|
824
|
+
w.setOverrides(t3);
|
|
548
825
|
};
|
|
549
|
-
}, [
|
|
550
|
-
function
|
|
551
|
-
const [
|
|
826
|
+
}, [e2]), o.createElement(Vt.Provider, { value: e2 }, t2)), Ht = () => f(Vt);
|
|
827
|
+
function Wt(t2) {
|
|
828
|
+
const [e2, n2] = a("undefined" != typeof window ? window.devicePixelRatio : 1), o2 = r(null);
|
|
552
829
|
return c(() => {
|
|
553
830
|
if (!("undefined" != typeof window && "matchMedia" in window)) return;
|
|
554
|
-
const
|
|
555
|
-
const
|
|
556
|
-
|
|
831
|
+
const t3 = () => {
|
|
832
|
+
const e3 = window.matchMedia(`screen and (resolution: ${window.devicePixelRatio}dppx)`);
|
|
833
|
+
e3.addEventListener("change", t3, { once: true, passive: true }), n2(window.devicePixelRatio), o2.current = { mediaMatcher: e3, listener: t3 };
|
|
557
834
|
};
|
|
558
|
-
return
|
|
835
|
+
return t3(), () => {
|
|
559
836
|
o2.current && o2.current.mediaMatcher.removeEventListener("change", o2.current.listener);
|
|
560
837
|
};
|
|
561
|
-
}, [
|
|
838
|
+
}, [t2]), e2;
|
|
562
839
|
}
|
|
563
|
-
function
|
|
840
|
+
function It(t2) {
|
|
564
841
|
if ("undefined" == typeof window) return 1;
|
|
565
|
-
const { defaultDpr:
|
|
842
|
+
const { defaultDpr: e2 = 1, maxDpr: n2 = 3, round: o2 = true } = t2 || {}, i2 = "undefined" != typeof window && "number" == typeof window.devicePixelRatio ? window.devicePixelRatio : e2;
|
|
566
843
|
return Math.min(Math.max(1, o2 ? Math.floor(i2) : i2), n2);
|
|
567
844
|
}
|
|
568
|
-
function
|
|
569
|
-
const o2 = B(
|
|
845
|
+
function Rt(t2, e2, n2) {
|
|
846
|
+
const o2 = B(e2, [e2]);
|
|
570
847
|
c(() => {
|
|
571
|
-
const
|
|
572
|
-
|
|
848
|
+
const e3 = (e4) => {
|
|
849
|
+
t2.current && !t2.current.contains(e4.target) && o2(e4);
|
|
573
850
|
};
|
|
574
|
-
return n2 && false === n2.mouseEvents || (document.addEventListener("mousedown",
|
|
575
|
-
document.removeEventListener("mousedown",
|
|
851
|
+
return n2 && false === n2.mouseEvents || (document.addEventListener("mousedown", e3), document.addEventListener("touchstart", e3)), n2 && false === n2.focusEvents || document.addEventListener("focus", e3), () => {
|
|
852
|
+
document.removeEventListener("mousedown", e3), document.removeEventListener("touchstart", e3), document.removeEventListener("focus", e3);
|
|
576
853
|
};
|
|
577
|
-
}, [
|
|
854
|
+
}, [t2]);
|
|
578
855
|
}
|
|
579
|
-
function
|
|
580
|
-
if (!
|
|
581
|
-
const { onPointerDown:
|
|
856
|
+
function jt(t2) {
|
|
857
|
+
if (!t2) throw new Error("must have a PointerHandlerOptions");
|
|
858
|
+
const { onPointerDown: e2, onPointerUp: n2, onPointerMoveOrWait: o2, processTouch: s2 = false, consumeTouch: l2 = true } = t2, a2 = B(e2, [e2]), h2 = B(n2, [n2]), u2 = B(o2, [o2]), d2 = r(false), p2 = t2?.timerInitial ?? 230, f2 = t2?.timerContinuous ?? p2 / 2, _2 = r(null), m2 = r(null), g2 = r(null), y2 = r(null), v2 = i(() => {
|
|
582
859
|
y2.current && (clearTimeout(y2.current), y2.current = null);
|
|
583
|
-
}, []), x2 = i((
|
|
860
|
+
}, []), x2 = i((t3) => {
|
|
584
861
|
y2.current = setTimeout(() => {
|
|
585
862
|
window.requestAnimationFrame(() => {
|
|
586
|
-
false !== d2.current && u2?.(
|
|
587
|
-
}), x2(
|
|
588
|
-
},
|
|
863
|
+
false !== d2.current && u2?.(m2.current, g2.current, _2.current);
|
|
864
|
+
}), x2(f2);
|
|
865
|
+
}, t3 ?? p2);
|
|
589
866
|
}, []);
|
|
590
867
|
c(() => () => v2(), []);
|
|
591
|
-
const w2 = s2 ? "pointer" : "mouse", b2 = i((
|
|
592
|
-
|
|
593
|
-
}, []), S2 = B((
|
|
868
|
+
const w2 = s2 ? "pointer" : "mouse", b2 = i((t3) => {
|
|
869
|
+
t3.stopPropagation(), t3.stopImmediatePropagation(), t3.preventDefault();
|
|
870
|
+
}, []), S2 = B((t3) => {
|
|
594
871
|
document.removeEventListener(`${w2}move`, C2), document.removeEventListener(`${w2}up`, S2), document.removeEventListener("keydown", T2), document.removeEventListener("keyup", M2), document.removeEventListener("touchstart", b2, { capture: true }), document.removeEventListener("touchmove", b2, { capture: true }), window.removeEventListener("blur", L2), v2(), window.requestAnimationFrame(() => {
|
|
595
|
-
false !== d2.current && (d2.current = false, h2?.(
|
|
872
|
+
false !== d2.current && (d2.current = false, h2?.(t3, g2.current, _2.current), g2.current = null);
|
|
596
873
|
});
|
|
597
874
|
}, []), L2 = i(() => {
|
|
598
|
-
false !== d2.current && (d2.current = false, S2(
|
|
875
|
+
false !== d2.current && (d2.current = false, S2(m2.current));
|
|
599
876
|
}, []), E2 = B(() => {
|
|
600
|
-
v2(), x2(
|
|
601
|
-
false !== d2.current && u2?.(
|
|
877
|
+
v2(), x2(f2), window.requestAnimationFrame(() => {
|
|
878
|
+
false !== d2.current && u2?.(m2.current, g2.current, _2.current);
|
|
602
879
|
});
|
|
603
|
-
}, [
|
|
604
|
-
|
|
605
|
-
}, []), T2 = B((
|
|
606
|
-
g2.current = { ctrlKey:
|
|
607
|
-
}, []), M2 = B((
|
|
608
|
-
g2.current = { ctrlKey:
|
|
609
|
-
}, [
|
|
610
|
-
return B((
|
|
611
|
-
if (
|
|
612
|
-
g2.current = { ctrlKey:
|
|
613
|
-
false !== a2(
|
|
614
|
-
}, [
|
|
880
|
+
}, [f2]), C2 = B((t3) => {
|
|
881
|
+
m2.current = t3, E2();
|
|
882
|
+
}, []), T2 = B((t3) => {
|
|
883
|
+
g2.current = { ctrlKey: t3.ctrlKey, shiftKey: t3.shiftKey, altKey: t3.altKey, metaKey: t3.metaKey }, E2();
|
|
884
|
+
}, []), M2 = B((t3) => {
|
|
885
|
+
g2.current = { ctrlKey: t3.ctrlKey, shiftKey: t3.shiftKey, altKey: t3.altKey, metaKey: t3.metaKey }, E2();
|
|
886
|
+
}, [f2]);
|
|
887
|
+
return B((t3) => {
|
|
888
|
+
if (t3.isDefaultPrevented()) return;
|
|
889
|
+
g2.current = { ctrlKey: t3.ctrlKey, shiftKey: t3.shiftKey, altKey: t3.altKey, metaKey: t3.metaKey };
|
|
890
|
+
false !== a2(t3, g2.current) && (_2.current = t3, m2.current = t3.nativeEvent, document.addEventListener(`${w2}up`, S2, { passive: false }), document.addEventListener(`${w2}move`, C2, { passive: false }), document.addEventListener("keydown", T2, { passive: false }), document.addEventListener("keyup", M2, { passive: false }), window.addEventListener("blur", L2, { passive: true }), s2 && l2 && (document.addEventListener("touchstart", b2, { passive: false, capture: true }), document.addEventListener("touchmove", b2, { passive: false, capture: true })), d2.current = true, x2(p2));
|
|
891
|
+
}, [p2, s2]);
|
|
615
892
|
}
|
|
616
|
-
function
|
|
617
|
-
return
|
|
618
|
-
|
|
619
|
-
}, ...
|
|
893
|
+
function Ft(t2, e2) {
|
|
894
|
+
return jt({ onPointerDown: t2, onPointerMoveOrWait: (e3, n2, o2) => {
|
|
895
|
+
t2?.(o2);
|
|
896
|
+
}, ...e2 });
|
|
620
897
|
}
|
|
621
|
-
const
|
|
622
|
-
const o2 = r(
|
|
623
|
-
if ("function" != typeof
|
|
624
|
-
const i2 =
|
|
898
|
+
const Yt = ({ initValue: t2, useHookBody: e2, applyStateChange: n2 }) => {
|
|
899
|
+
const o2 = r(t2);
|
|
900
|
+
if ("function" != typeof e2) throw new Error("function expected as hook body parameter. got " + typeof e2);
|
|
901
|
+
const i2 = e2();
|
|
625
902
|
return d(() => {
|
|
626
903
|
o2.current !== i2 && (o2.current = i2, n2(i2));
|
|
627
904
|
}, [n2, i2]), null;
|
|
628
|
-
},
|
|
629
|
-
console && console.warn && console.warn(
|
|
630
|
-
},
|
|
631
|
-
let
|
|
632
|
-
const
|
|
633
|
-
|
|
634
|
-
},
|
|
905
|
+
}, Xt = (t2) => {
|
|
906
|
+
console && console.warn && console.warn(t2);
|
|
907
|
+
}, Ut = "object" == typeof self && self.self === self && self || "object" == typeof global && global.global === global && global || void 0;
|
|
908
|
+
let Zt = 1, qt = false, Gt = false;
|
|
909
|
+
const Jt = [], Qt = [], te = () => {
|
|
910
|
+
Qt.forEach((t2) => t2());
|
|
911
|
+
}, ee = ({ automaticContainerInternalUseOnly: e2 }) => {
|
|
635
912
|
const [o2, i2] = a([]), s2 = r([]);
|
|
636
|
-
return s2.current = o2,
|
|
637
|
-
let
|
|
913
|
+
return s2.current = o2, e2 || false !== qt || (Gt = true), c(() => {
|
|
914
|
+
let t2 = true;
|
|
638
915
|
function n2() {
|
|
639
|
-
if (
|
|
916
|
+
if (t2) return Qt[0] !== n2 ? (e2 || true !== qt || Xt("SingletonHooksContainer is mounted after some singleton hook has been used.Your SingletonHooksContainer will not be used in favor of internal one."), void i2((t3) => [])) : void i2([...Jt]);
|
|
640
917
|
}
|
|
641
|
-
return
|
|
642
|
-
|
|
918
|
+
return Qt.push(n2), te(), () => {
|
|
919
|
+
t2 = false, s2.current?.length > 0 && Xt("SingletonHooksContainer is unmounted, but it has active singleton hooks. They will be reevaluated once SingletonHooksContainer is mounted again"), Qt.splice(Qt.indexOf(n2), 1), te();
|
|
643
920
|
};
|
|
644
|
-
}, [
|
|
645
|
-
},
|
|
646
|
-
const n2 =
|
|
647
|
-
return
|
|
648
|
-
if (
|
|
649
|
-
const n3 =
|
|
650
|
-
T(n3).render(
|
|
651
|
-
} else
|
|
652
|
-
})(
|
|
653
|
-
|
|
921
|
+
}, [e2]), t(n, { children: o2.map(({ hook: t2, key: e3 }) => _(Yt, { ...t2, key: e3 })) });
|
|
922
|
+
}, ne = (e2) => {
|
|
923
|
+
const n2 = Zt++;
|
|
924
|
+
return Jt.push({ hook: e2, key: n2 }), 0 === Qt.length && false === Gt && (qt = true, ((e3) => {
|
|
925
|
+
if (Ut.document && Ut.document.createElement) {
|
|
926
|
+
const n3 = Ut.document.createElement("div");
|
|
927
|
+
T(n3).render(t(e3, { automaticContainerInternalUseOnly: true }));
|
|
928
|
+
} else Xt("Can not mount SingletonHooksContainer on server side. Did you manage to run useEffect on server? Please mount SingletonHooksContainer into your components tree manually.");
|
|
929
|
+
})(ee)), te(), () => {
|
|
930
|
+
Jt.splice(Jt.findIndex((t2) => t2.key === n2), 1), te();
|
|
654
931
|
};
|
|
655
932
|
};
|
|
656
|
-
let
|
|
657
|
-
|
|
933
|
+
let oe = null;
|
|
934
|
+
oe || (oe = (t2, e2, n2 = {}) => {
|
|
658
935
|
let o2, i2, r2 = false, s2 = false, l2 = [], { unmountIfNoConsumers: h2 = false } = n2;
|
|
659
|
-
const u2 = (
|
|
660
|
-
i2 =
|
|
661
|
-
}, d2 = () => (s2 || (i2 = "function" == typeof
|
|
936
|
+
const u2 = (t3) => {
|
|
937
|
+
i2 = t3, M(() => l2.forEach((e3) => e3(t3)));
|
|
938
|
+
}, d2 = () => (s2 || (i2 = "function" == typeof t2 ? t2() : t2, s2 = true), i2);
|
|
662
939
|
return () => {
|
|
663
940
|
const [n3, s3] = a(d2);
|
|
664
|
-
return c(() => (r2 || (r2 = true, o2 =
|
|
941
|
+
return c(() => (r2 || (r2 = true, o2 = ne({ initValue: t2, useHookBody: e2, applyStateChange: u2 })), l2.push(s3), i2 !== n3 && s3(i2), () => {
|
|
665
942
|
l2.splice(l2.indexOf(s3), 1), 0 === l2.length && h2 && (o2(), r2 = false);
|
|
666
943
|
}), []), n3;
|
|
667
944
|
};
|
|
668
945
|
});
|
|
669
|
-
const
|
|
670
|
-
let
|
|
946
|
+
const ie = oe;
|
|
947
|
+
let re = () => {
|
|
671
948
|
console.warn("You must call useEditMode before setting its state.");
|
|
672
949
|
};
|
|
673
|
-
const
|
|
674
|
-
const [
|
|
675
|
-
return
|
|
676
|
-
}),
|
|
677
|
-
const
|
|
678
|
-
return h(() => ({ setMode: (
|
|
679
|
-
|
|
680
|
-
}, getMode: () =>
|
|
950
|
+
const se = ie(null, () => {
|
|
951
|
+
const [t2, e2] = a(null);
|
|
952
|
+
return re = e2, t2;
|
|
953
|
+
}), le = () => {
|
|
954
|
+
const t2 = se();
|
|
955
|
+
return h(() => ({ setMode: (t3) => {
|
|
956
|
+
re((e2) => ("function" == typeof t3 && (t3 = t3(e2)), t3?.onModeChange?.(t3 ?? null), t3));
|
|
957
|
+
}, getMode: () => t2 }), [t2]);
|
|
681
958
|
};
|
|
682
|
-
class
|
|
683
|
-
constructor(
|
|
684
|
-
this._listenersProperties = /* @__PURE__ */ new Set(), this._listenersExecute = /* @__PURE__ */ new Set(), this._key =
|
|
959
|
+
class ae {
|
|
960
|
+
constructor(t2, e2, n2, o2) {
|
|
961
|
+
this._listenersProperties = /* @__PURE__ */ new Set(), this._listenersExecute = /* @__PURE__ */ new Set(), this._key = t2, this._target = e2, this._applyProps(n2 || {}), this._callback = o2, void 0 === o2 && (this._callback = () => {
|
|
685
962
|
console.log(`implement: ${this.label()} : ${this.description()}`);
|
|
686
963
|
});
|
|
687
964
|
}
|
|
688
965
|
key() {
|
|
689
966
|
return this._key;
|
|
690
967
|
}
|
|
691
|
-
_resolve(
|
|
692
|
-
if ("function" == typeof
|
|
693
|
-
const n2 =
|
|
694
|
-
return
|
|
968
|
+
_resolve(t2, e2) {
|
|
969
|
+
if ("function" == typeof t2) {
|
|
970
|
+
const n2 = e2 ?? this._context;
|
|
971
|
+
return t2("function" == typeof n2 ? n2() : n2);
|
|
695
972
|
}
|
|
696
|
-
return
|
|
973
|
+
return t2;
|
|
697
974
|
}
|
|
698
975
|
target() {
|
|
699
976
|
return "function" == typeof this._target ? this._target() : this._target;
|
|
700
977
|
}
|
|
701
|
-
label(
|
|
702
|
-
const n2 = this._scopedLabels?.[
|
|
978
|
+
label(t2, e2) {
|
|
979
|
+
const n2 = this._scopedLabels?.[t2] || this._label;
|
|
703
980
|
let o2 = null;
|
|
704
981
|
if ("function" == typeof n2) {
|
|
705
|
-
const
|
|
706
|
-
o2 = n2("function" == typeof
|
|
982
|
+
const t3 = e2 ?? this._context;
|
|
983
|
+
o2 = n2("function" == typeof t3 ? t3() : t3);
|
|
707
984
|
} else o2 = n2;
|
|
708
985
|
return o2;
|
|
709
986
|
}
|
|
710
|
-
description(
|
|
711
|
-
return this._resolve(this._description,
|
|
987
|
+
description(t2) {
|
|
988
|
+
return this._resolve(this._description, t2);
|
|
712
989
|
}
|
|
713
|
-
tags(
|
|
714
|
-
return this._resolve(this._tags,
|
|
990
|
+
tags(t2) {
|
|
991
|
+
return this._resolve(this._tags, t2);
|
|
715
992
|
}
|
|
716
|
-
icon(
|
|
717
|
-
return this._resolve(this._icon,
|
|
993
|
+
icon(t2) {
|
|
994
|
+
return this._resolve(this._icon, t2);
|
|
718
995
|
}
|
|
719
996
|
shortcut() {
|
|
720
997
|
return this._resolve(this._shortcut);
|
|
@@ -728,120 +1005,120 @@ class qe {
|
|
|
728
1005
|
context() {
|
|
729
1006
|
return "function" == typeof this._context ? this._context() : this._context;
|
|
730
1007
|
}
|
|
731
|
-
async execute(
|
|
1008
|
+
async execute(t2, e2) {
|
|
732
1009
|
if (!this.disabled() && this._callback) {
|
|
733
1010
|
try {
|
|
734
1011
|
let n2 = true;
|
|
735
|
-
|
|
1012
|
+
e2?.beforeExecute && (n2 = e2?.beforeExecute(this, t2));
|
|
736
1013
|
if (false === await Promise.resolve(n2)) return false;
|
|
737
|
-
const o2 = this._callback.bind(this)(
|
|
1014
|
+
const o2 = this._callback.bind(this)(t2, this);
|
|
738
1015
|
if (false === await Promise.resolve(o2)) return false;
|
|
739
|
-
|
|
1016
|
+
e2?.onExecute?.(this, t2), this._notifyExecute(t2);
|
|
740
1017
|
} catch (n2) {
|
|
741
|
-
return console.warn(n2),
|
|
1018
|
+
return console.warn(n2), e2?.onError(this, n2, t2), this._notifyError(t2, n2), false;
|
|
742
1019
|
}
|
|
743
1020
|
return true;
|
|
744
1021
|
}
|
|
745
1022
|
}
|
|
746
|
-
addPropertyListener(
|
|
747
|
-
if (!
|
|
1023
|
+
addPropertyListener(t2, e2 = false) {
|
|
1024
|
+
if (!t2) throw new Error("listener must be specified");
|
|
748
1025
|
const n2 = this._listenersProperties;
|
|
749
|
-
return n2.add(
|
|
750
|
-
n2.delete(
|
|
1026
|
+
return n2.add(t2), e2 && t2({}, this), () => {
|
|
1027
|
+
n2.delete(t2);
|
|
751
1028
|
};
|
|
752
1029
|
}
|
|
753
|
-
addExecuteListener(
|
|
754
|
-
if (!
|
|
755
|
-
const
|
|
756
|
-
return
|
|
757
|
-
|
|
1030
|
+
addExecuteListener(t2) {
|
|
1031
|
+
if (!t2) throw new Error("listener must be specified");
|
|
1032
|
+
const e2 = this._listenersExecute;
|
|
1033
|
+
return e2.add(t2), function() {
|
|
1034
|
+
e2.delete(t2);
|
|
758
1035
|
};
|
|
759
1036
|
}
|
|
760
|
-
_notifyExecute(
|
|
761
|
-
const
|
|
1037
|
+
_notifyExecute(t2) {
|
|
1038
|
+
const e2 = this;
|
|
762
1039
|
this._listenersExecute.forEach((n2) => {
|
|
763
|
-
n2.onExecute(
|
|
1040
|
+
n2.onExecute(e2, t2);
|
|
764
1041
|
});
|
|
765
1042
|
}
|
|
766
|
-
_notifyError(
|
|
1043
|
+
_notifyError(t2, e2) {
|
|
767
1044
|
const n2 = this;
|
|
768
1045
|
this._listenersExecute.forEach((o2) => {
|
|
769
|
-
o2.onError?.(n2,
|
|
1046
|
+
o2.onError?.(n2, t2, e2);
|
|
770
1047
|
});
|
|
771
1048
|
}
|
|
772
|
-
updateCallback(
|
|
773
|
-
return this._callback =
|
|
1049
|
+
updateCallback(t2) {
|
|
1050
|
+
return this._callback = t2 || null, this;
|
|
774
1051
|
}
|
|
775
|
-
update(
|
|
776
|
-
if (!
|
|
777
|
-
const
|
|
778
|
-
return Object.keys(
|
|
1052
|
+
update(t2) {
|
|
1053
|
+
if (!t2) return;
|
|
1054
|
+
const e2 = this._applyProps(t2);
|
|
1055
|
+
return Object.keys(e2).length > 0 && this._notifyPropertyChange(e2), this;
|
|
779
1056
|
}
|
|
780
|
-
_notifyPropertyChange(
|
|
781
|
-
const
|
|
1057
|
+
_notifyPropertyChange(t2) {
|
|
1058
|
+
const e2 = this;
|
|
782
1059
|
this._listenersProperties.forEach((n2) => {
|
|
783
|
-
n2(
|
|
1060
|
+
n2(t2, e2);
|
|
784
1061
|
});
|
|
785
1062
|
}
|
|
786
|
-
_applyProps(
|
|
787
|
-
let
|
|
788
|
-
return Object.keys(
|
|
789
|
-
let i2 =
|
|
790
|
-
n2["_" + o2] !== i2 && (n2["_" + o2] =
|
|
791
|
-
}),
|
|
1063
|
+
_applyProps(t2) {
|
|
1064
|
+
let e2 = {}, n2 = this;
|
|
1065
|
+
return Object.keys(t2).forEach((o2) => {
|
|
1066
|
+
let i2 = t2[o2];
|
|
1067
|
+
n2["_" + o2] !== i2 && (n2["_" + o2] = e2[o2] = i2);
|
|
1068
|
+
}), e2;
|
|
792
1069
|
}
|
|
793
1070
|
}
|
|
794
|
-
class
|
|
1071
|
+
class ce extends ae {
|
|
795
1072
|
}
|
|
796
|
-
class
|
|
797
|
-
constructor(
|
|
798
|
-
this._target = null, this._groupKey = null, this._root = null, this._parent = null, this._uuid = v.uuidV4(), this._target =
|
|
1073
|
+
class he {
|
|
1074
|
+
constructor(t2, e2) {
|
|
1075
|
+
this._target = null, this._groupKey = null, this._root = null, this._parent = null, this._uuid = v.uuidV4(), this._target = t2, this._groupKey = e2 ?? null, this._root = this, this._nodes = /* @__PURE__ */ new Map(), this._nodes.set(e2, this), this._children = /* @__PURE__ */ new Map(), this._listeners = /* @__PURE__ */ new Set(), this._commandsByKey = /* @__PURE__ */ new Map(), this._commandsByShortcut = /* @__PURE__ */ new Map();
|
|
799
1076
|
const n2 = this;
|
|
800
|
-
this._unListenersByCommand = /* @__PURE__ */ new Map(), this._listenersByKey = /* @__PURE__ */ new Map(), this._commandsPropertyListener = (
|
|
801
|
-
const o2 = n2._root._listenersByKey, i2 =
|
|
802
|
-
r2 && n2._notifyCommands(r2, "onCommandChange",
|
|
1077
|
+
this._unListenersByCommand = /* @__PURE__ */ new Map(), this._listenersByKey = /* @__PURE__ */ new Map(), this._commandsPropertyListener = (t3, e3) => {
|
|
1078
|
+
const o2 = n2._root._listenersByKey, i2 = e3.key(), r2 = o2.get(i2);
|
|
1079
|
+
r2 && n2._notifyCommands(r2, "onCommandChange", e3);
|
|
803
1080
|
};
|
|
804
1081
|
}
|
|
805
|
-
_getCommand(
|
|
806
|
-
const
|
|
807
|
-
return
|
|
1082
|
+
_getCommand(t2) {
|
|
1083
|
+
const e2 = this._commandsByKey.get(t2);
|
|
1084
|
+
return e2 || (this._parent?._getCommand(t2) ?? null);
|
|
808
1085
|
}
|
|
809
|
-
getCommand(
|
|
1086
|
+
getCommand(t2, e2 = false) {
|
|
810
1087
|
const n2 = this._root._focused;
|
|
811
1088
|
let o2 = n2, i2 = n2 === this;
|
|
812
1089
|
for (; !i2 && o2; ) o2 === this && (i2 = true), o2 = o2._parent;
|
|
813
|
-
return (i2 ? n2 : this)._getCommand(
|
|
1090
|
+
return (i2 ? n2 : this)._getCommand(t2);
|
|
814
1091
|
}
|
|
815
|
-
createChildGroup(
|
|
1092
|
+
createChildGroup(t2, e2, n2) {
|
|
816
1093
|
let o2;
|
|
817
1094
|
if (!n2) {
|
|
818
|
-
let
|
|
819
|
-
for (;
|
|
820
|
-
let n3 =
|
|
821
|
-
n3 && (o2 = n3),
|
|
1095
|
+
let t3 = this;
|
|
1096
|
+
for (; t3 && !o2; ) {
|
|
1097
|
+
let n3 = t3._nodes.get(e2);
|
|
1098
|
+
n3 && (o2 = n3), t3 = t3._parent;
|
|
822
1099
|
}
|
|
823
1100
|
}
|
|
824
|
-
o2 || (o2 = new
|
|
825
|
-
const i2 = (
|
|
826
|
-
!
|
|
1101
|
+
o2 || (o2 = new he(t2, e2), o2._parent = this, o2._root = this._root, o2._unListenersByCommand = null, o2._listenersByKey = null, o2._commandsPropertyListener = null);
|
|
1102
|
+
const i2 = (t3, o3) => {
|
|
1103
|
+
!t3.has(e2) || n2 ? t3.set(e2, o3) : void 0 === n2 && console.warn("commandGroup already registered", e2);
|
|
827
1104
|
};
|
|
828
1105
|
i2(this._root._nodes, o2);
|
|
829
1106
|
let r2 = this._parent;
|
|
830
1107
|
for (; r2; ) i2(this._nodes, o2), r2 = r2._parent;
|
|
831
|
-
return this._children.set(
|
|
1108
|
+
return this._children.set(e2, o2), this._notify("onGroupChange"), o2;
|
|
832
1109
|
}
|
|
833
1110
|
getKey() {
|
|
834
1111
|
return this._groupKey;
|
|
835
1112
|
}
|
|
836
|
-
getGroup(
|
|
837
|
-
return this._nodes.get(
|
|
1113
|
+
getGroup(t2) {
|
|
1114
|
+
return this._nodes.get(t2);
|
|
838
1115
|
}
|
|
839
|
-
_addCommands(
|
|
1116
|
+
_addCommands(t2, e2 = void 0) {
|
|
840
1117
|
const n2 = this._commandsByKey, o2 = this._commandsByShortcut, i2 = this._root._commandsPropertyListener, r2 = this._root._unListenersByCommand;
|
|
841
|
-
for (let s2 = 0; s2 <
|
|
842
|
-
const l2 =
|
|
843
|
-
if (n2.has(a2) && !
|
|
844
|
-
void 0 ===
|
|
1118
|
+
for (let s2 = 0; s2 < t2.length; s2++) {
|
|
1119
|
+
const l2 = t2[s2], a2 = l2.key();
|
|
1120
|
+
if (n2.has(a2) && !e2) {
|
|
1121
|
+
void 0 === e2 && console.warn("command already registered", a2);
|
|
845
1122
|
continue;
|
|
846
1123
|
}
|
|
847
1124
|
n2.set(a2, l2);
|
|
@@ -852,55 +1129,55 @@ class Qe {
|
|
|
852
1129
|
const u2 = l2.shortcut();
|
|
853
1130
|
if (!u2) continue;
|
|
854
1131
|
const d2 = Array.isArray(u2) ? u2 : [u2];
|
|
855
|
-
for (let
|
|
856
|
-
const n3 =
|
|
857
|
-
i3 && !
|
|
1132
|
+
for (let t3 = 0; t3 < d2.length; t3++) {
|
|
1133
|
+
const n3 = pe(d2[t3]), i3 = o2.get(n3);
|
|
1134
|
+
i3 && !e2 && void 0 === e2 && console.warn(`Shortcut already registered: ${n3}, ${a2}, ${i3}.`), o2.set(n3, a2);
|
|
858
1135
|
}
|
|
859
1136
|
}
|
|
860
1137
|
}
|
|
861
1138
|
removeFromParent() {
|
|
862
1139
|
if (!this._parent) return;
|
|
863
|
-
let
|
|
1140
|
+
let t2 = this._parent, e2 = [];
|
|
864
1141
|
const n2 = this._groupKey;
|
|
865
|
-
for (;
|
|
866
|
-
|
|
867
|
-
const o2 = (
|
|
868
|
-
|
|
869
|
-
for (let n3 = 0; n3 <
|
|
870
|
-
o2(
|
|
1142
|
+
for (; t2; ) e2.push(t2._nodes), t2._nodes.delete(n2), t2 = t2._parent;
|
|
1143
|
+
t2 = this._parent;
|
|
1144
|
+
const o2 = (t3) => {
|
|
1145
|
+
t3._children.forEach((t4) => {
|
|
1146
|
+
for (let n3 = 0; n3 < e2.length; n3++) t4._nodes.delete(e2[n3]);
|
|
1147
|
+
o2(t4);
|
|
871
1148
|
});
|
|
872
1149
|
};
|
|
873
1150
|
o2(this), this._parent = null, this._notify("onGroupChange");
|
|
874
1151
|
}
|
|
875
|
-
addCommands(
|
|
876
|
-
this._addCommands(
|
|
1152
|
+
addCommands(t2, e2) {
|
|
1153
|
+
this._addCommands(t2, e2), this._notify("onGroupChange");
|
|
877
1154
|
}
|
|
878
1155
|
getActive() {
|
|
879
1156
|
return this._root._focused ?? this._root;
|
|
880
1157
|
}
|
|
881
|
-
activate(
|
|
882
|
-
let
|
|
883
|
-
if (
|
|
1158
|
+
activate(t2) {
|
|
1159
|
+
let e2 = this;
|
|
1160
|
+
if (t2 && (e2 = this._nodes.get(t2), !e2)) return void console.warn("group not found", t2);
|
|
884
1161
|
let n2 = this._root._focused ?? this._root;
|
|
885
1162
|
for (; n2; ) n2 = n2._parent;
|
|
886
|
-
this._root._focused !==
|
|
1163
|
+
this._root._focused !== e2 && (this._root._focused = e2, this._notify("onGroupChange"), this._notify("onActiveChange"));
|
|
887
1164
|
}
|
|
888
|
-
findCommandByEvent(
|
|
889
|
-
const
|
|
890
|
-
|
|
891
|
-
let n2 =
|
|
1165
|
+
findCommandByEvent(t2) {
|
|
1166
|
+
const e2 = [];
|
|
1167
|
+
t2.altKey && e2.push(D.Alt), t2.shiftKey && e2.push(D.Shift), t2.ctrlKey && e2.push(D.Ctrl), t2.metaKey && e2.push(D.Meta);
|
|
1168
|
+
let n2 = pe({ key: t2.code, modifiers: e2 });
|
|
892
1169
|
const o2 = this._commandsByShortcut;
|
|
893
1170
|
let i2 = o2.get(n2);
|
|
894
|
-
i2 || (n2 =
|
|
1171
|
+
i2 || (n2 = pe({ key: t2.key, modifiers: e2 }), i2 = o2.get(n2)), !i2 && t2.code.startsWith("Digit") && (n2 = pe({ key: t2.code.substring(5, t2.code.length), modifiers: e2 }), i2 = this._commandsByShortcut.get(n2)), !i2 && t2.code.startsWith("Key") && (i2 = pe({ key: t2.code.substring(3, t2.code.length), modifiers: e2 }), i2 = o2.get(n2));
|
|
895
1172
|
let r2 = null;
|
|
896
|
-
return i2 && (r2 = this._commandsByKey.get(i2), r2 && r2.disabled() && (r2 = null), !r2 || r2.target() && r2.target().contains(
|
|
1173
|
+
return i2 && (r2 = this._commandsByKey.get(i2), r2 && r2.disabled() && (r2 = null), !r2 || r2.target() && r2.target().contains(t2.target) || (r2 = null)), r2 || (this._parent?.findCommandByEvent(t2) ?? null);
|
|
897
1174
|
}
|
|
898
|
-
dispatchToFocusedCommand(
|
|
899
|
-
const
|
|
900
|
-
if (!
|
|
901
|
-
if (
|
|
902
|
-
const n2 =
|
|
903
|
-
return !!n2 && (n2.execute(),
|
|
1175
|
+
dispatchToFocusedCommand(t2) {
|
|
1176
|
+
const e2 = this.getActive();
|
|
1177
|
+
if (!e2) return false;
|
|
1178
|
+
if (t2.isDefaultPrevented()) return false;
|
|
1179
|
+
const n2 = e2.findCommandByEvent?.(t2);
|
|
1180
|
+
return !!n2 && (n2.execute(), t2.preventDefault(), true);
|
|
904
1181
|
}
|
|
905
1182
|
getRoot() {
|
|
906
1183
|
return this._parent ? this._parent.getRoot() : this;
|
|
@@ -908,300 +1185,305 @@ class Qe {
|
|
|
908
1185
|
getParent() {
|
|
909
1186
|
return this._parent;
|
|
910
1187
|
}
|
|
911
|
-
addListener(
|
|
912
|
-
const n2 = this._listeners, o2 =
|
|
913
|
-
if (o2 && !
|
|
1188
|
+
addListener(t2, e2) {
|
|
1189
|
+
const n2 = this._listeners, o2 = e2?.keys, i2 = this._root._listenersByKey;
|
|
1190
|
+
if (o2 && !t2.onCommandChange) throw new Error("keys were provided but the listener does not contain 'onCommandChange'.");
|
|
914
1191
|
let r2 = null;
|
|
915
|
-
if (o2) for (let
|
|
916
|
-
const n3 = o2[
|
|
1192
|
+
if (o2) for (let e3 = 0; e3 < o2.length; e3++) {
|
|
1193
|
+
const n3 = o2[e3];
|
|
917
1194
|
if (!n3) continue;
|
|
918
1195
|
let s2 = i2.get(n3);
|
|
919
|
-
s2 || (s2 = /* @__PURE__ */ new Set(), i2.set(n3, s2)), r2 || (r2 = []), r2.push(s2), s2.add(
|
|
1196
|
+
s2 || (s2 = /* @__PURE__ */ new Set(), i2.set(n3, s2)), r2 || (r2 = []), r2.push(s2), s2.add(t2);
|
|
920
1197
|
}
|
|
921
|
-
return n2.add(
|
|
922
|
-
if (r2) for (let
|
|
923
|
-
r2[
|
|
1198
|
+
return n2.add(t2), () => {
|
|
1199
|
+
if (r2) for (let e3 = 0; e3 < r2.length; e3++) {
|
|
1200
|
+
r2[e3].delete(t2);
|
|
924
1201
|
}
|
|
925
|
-
n2.delete(
|
|
1202
|
+
n2.delete(t2);
|
|
926
1203
|
};
|
|
927
1204
|
}
|
|
928
|
-
_notifyCommands(
|
|
1205
|
+
_notifyCommands(t2, e2, n2) {
|
|
929
1206
|
const o2 = this;
|
|
930
1207
|
setTimeout(() => {
|
|
931
|
-
|
|
932
|
-
|
|
1208
|
+
t2.forEach((t3) => {
|
|
1209
|
+
t3[e2]?.(o2, n2);
|
|
933
1210
|
});
|
|
934
1211
|
}, 0);
|
|
935
1212
|
}
|
|
936
|
-
_notify(
|
|
1213
|
+
_notify(t2, e2) {
|
|
937
1214
|
const n2 = this;
|
|
938
1215
|
setTimeout(() => {
|
|
939
1216
|
n2._listeners.forEach((o2) => {
|
|
940
|
-
o2[
|
|
941
|
-
}), n2._parent && n2._parent._notify(
|
|
1217
|
+
o2[t2]?.(n2, e2);
|
|
1218
|
+
}), n2._parent && n2._parent._notify(t2, e2);
|
|
942
1219
|
}, 0);
|
|
943
1220
|
}
|
|
944
1221
|
getAllCommands() {
|
|
945
|
-
const
|
|
1222
|
+
const t2 = [], e2 = this._groupKey;
|
|
946
1223
|
return this._commandsByKey.forEach((n2) => {
|
|
947
|
-
|
|
948
|
-
}), this._children.forEach((
|
|
949
|
-
|
|
950
|
-
}),
|
|
1224
|
+
t2.push({ command: n2, groupKey: e2 });
|
|
1225
|
+
}), this._children.forEach((e3) => {
|
|
1226
|
+
t2.push(...e3.getAllCommands());
|
|
1227
|
+
}), t2;
|
|
951
1228
|
}
|
|
952
1229
|
}
|
|
953
|
-
const
|
|
1230
|
+
const ue = v.getOS() === v.OSType.MacOS || v.getOS() === v.OSType.IOS ? "Cmd" : "Ctrl", de = v.getOS() === v.OSType.MacOS || v.getOS() === v.OSType.IOS ? "⌘" : "^", pe = (t2, e2 = false) => {
|
|
954
1231
|
const n2 = {};
|
|
955
|
-
for (let
|
|
1232
|
+
for (let e3 = 0; t2.modifiers && e3 < t2.modifiers.length; e3++) n2[t2.modifiers[e3]] = true;
|
|
956
1233
|
let o2 = "";
|
|
957
|
-
return (n2?.[
|
|
1234
|
+
return (n2?.[D.Ctrl] || n2?.[D.Meta]) && (o2 += (o2.length > 0 ? "+" : "") + (e2 ? de : ue)), n2?.[D.Alt] && (o2 += e2 ? "⌥" : "Alt"), n2?.[D.Shift] && (o2 += (o2.length > 0 ? "+" : "") + (e2 ? "⇧" : "Shift")), o2 += (o2.length > 0 ? "+" : "") + tt(t2.key), o2;
|
|
958
1235
|
};
|
|
959
|
-
function
|
|
960
|
-
const n2 = r(
|
|
961
|
-
n2.current =
|
|
962
|
-
const [o2, i2] =
|
|
1236
|
+
function fe(t2, e2 = null) {
|
|
1237
|
+
const n2 = r(e2);
|
|
1238
|
+
n2.current = e2;
|
|
1239
|
+
const [o2, i2] = m((t3) => t3 + 1, 0), s2 = h(() => Array.isArray(t2) ? t2 : [t2], [t2]);
|
|
963
1240
|
return c(() => {
|
|
964
1241
|
if (!s2 || 0 === s2.length) return;
|
|
965
|
-
const
|
|
966
|
-
n2.current?.onChange?.(
|
|
1242
|
+
const t3 = (t4, e3) => {
|
|
1243
|
+
n2.current?.onChange?.(e3), i2();
|
|
967
1244
|
};
|
|
968
1245
|
let o3 = null;
|
|
969
|
-
|
|
970
|
-
n2.current?.onExecute?.(
|
|
971
|
-
}, onError(
|
|
972
|
-
n2.current?.onError?.(
|
|
1246
|
+
e2 && (o3 = { onExecute(t4, e3) {
|
|
1247
|
+
n2.current?.onExecute?.(t4, e3);
|
|
1248
|
+
}, onError(t4, e3, o4) {
|
|
1249
|
+
n2.current?.onError?.(t4, e3, o4);
|
|
973
1250
|
} });
|
|
974
1251
|
const r2 = /* @__PURE__ */ new Set();
|
|
975
|
-
for (let n3 = 0; n3 < s2.length; n3++) r2.add(s2[n3]?.addPropertyListener(v.debounce(
|
|
1252
|
+
for (let n3 = 0; n3 < s2.length; n3++) r2.add(s2[n3]?.addPropertyListener(v.debounce(t3, 0), true)), e2 && r2.add(s2[n3]?.addExecuteListener(o3));
|
|
976
1253
|
return () => {
|
|
977
|
-
r2.forEach((
|
|
978
|
-
|
|
1254
|
+
r2.forEach((t4) => {
|
|
1255
|
+
t4?.();
|
|
979
1256
|
});
|
|
980
1257
|
};
|
|
981
|
-
}, [
|
|
1258
|
+
}, [t2]), o2;
|
|
982
1259
|
}
|
|
983
|
-
const
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
1260
|
+
const _e = (t2, e2) => {
|
|
1261
|
+
if (!e2 || !t2 || 0 === e2.length) return v.EmptyArray;
|
|
1262
|
+
const n2 = e2.length, o2 = new Array(n2);
|
|
1263
|
+
for (let i2 = 0; i2 < n2; i2++) {
|
|
1264
|
+
const n3 = e2[i2], r2 = n3 ? t2.getCommand(n3) : null;
|
|
1265
|
+
o2[i2] = r2;
|
|
1266
|
+
}
|
|
1267
|
+
return o2;
|
|
990
1268
|
};
|
|
991
|
-
function
|
|
1269
|
+
function me(t2, e2 = null, n2 = null, o2) {
|
|
992
1270
|
const i2 = r(n2);
|
|
993
|
-
i2.current = n2,
|
|
994
|
-
const [s2, l2] = a(
|
|
1271
|
+
i2.current = n2, e2 && !Array.isArray(e2) && (e2 = [e2]);
|
|
1272
|
+
const [s2, l2] = a(_e(t2, e2)), h2 = o2 ? [...o2, t2] : [t2];
|
|
995
1273
|
return c(() => {
|
|
996
1274
|
const n3 = { onGroupChange: () => {
|
|
997
|
-
const n4 =
|
|
1275
|
+
const n4 = _e(t2, e2);
|
|
998
1276
|
l2(n4), i2.current?.onChange?.(this);
|
|
999
1277
|
} };
|
|
1000
1278
|
let o3;
|
|
1001
|
-
|
|
1002
|
-
i2.current?.onChange?.(
|
|
1279
|
+
e2 && e2.length > 0 && (o3 = { keys: e2 }, n3.onCommandChange = (n4, o4) => {
|
|
1280
|
+
i2.current?.onChange?.(t2), l2(_e(t2, e2));
|
|
1003
1281
|
});
|
|
1004
|
-
const r2 =
|
|
1005
|
-
return l2(s3), i2.current?.onChange && i2.current?.onChange(
|
|
1282
|
+
const r2 = t2?.addListener(n3, o3), s3 = _e(t2, e2);
|
|
1283
|
+
return l2(s3), i2.current?.onChange && i2.current?.onChange(t2), () => {
|
|
1006
1284
|
r2?.();
|
|
1007
1285
|
};
|
|
1008
1286
|
}, h2), s2;
|
|
1009
1287
|
}
|
|
1010
|
-
const
|
|
1288
|
+
const ge = { Toolbar: "toolbar", Menuitem: "menuitem" }, ye = ie({ setClipboard: (t2) => {
|
|
1011
1289
|
throw new Error("This is only available via the useClipboard.");
|
|
1012
1290
|
}, getClipboard: () => b.Global, refNativeCopy: { current: null }, refNativeLastKey: { current: null } }, () => {
|
|
1013
|
-
const [
|
|
1014
|
-
return { setClipboard: (
|
|
1015
|
-
}),
|
|
1016
|
-
const { source:
|
|
1291
|
+
const [t2, e2] = a(b.Global);
|
|
1292
|
+
return { setClipboard: (t3) => e2(t3), getClipboard: () => t2, refNativeCopy: r(null), refNativeLastKey: r(null) };
|
|
1293
|
+
}), ve = (t2) => {
|
|
1294
|
+
const { source: e2, target: n2, onPaste: o2, onClipboardUpdate: r2, commands: s2 } = t2, l2 = Ht(), a2 = B(r2, [r2]), u2 = B(o2, [o2]), { getClipboard: d2, refNativeCopy: p2 } = ye(), f2 = d2();
|
|
1017
1295
|
h(() => {
|
|
1018
|
-
const
|
|
1296
|
+
const t3 = e2?.element, o3 = n2?.element ?? e2?.element;
|
|
1019
1297
|
if (!s2) return;
|
|
1020
|
-
const i2 = [new
|
|
1298
|
+
const i2 = [new ce("cut", t3, { label: "Cut", description: "Remove the selection and put it on the clipboard so you can paste it somewhere else.", icon: "cut", shortcut: { key: "X", modifiers: [D.Ctrl] } }), new ce("copy", t3, { label: "Copy", description: "Put a copy of the selection on the clipboard so you can paste it somewhere else.", icon: "copy", shortcut: { key: "C", modifiers: [D.Ctrl] } }), new ce("paste", o3, { label: "Paste", description: "Add content on the clipboard to your document.", icon: "paste", shortcut: [{ key: "V", modifiers: [D.Ctrl] }, { key: "F8", modifiers: [D.Ctrl] }] })];
|
|
1021
1299
|
s2?.addCommands(i2, true);
|
|
1022
1300
|
}, [s2]);
|
|
1023
|
-
const
|
|
1024
|
-
if (!
|
|
1301
|
+
const _2 = B(async (t3) => {
|
|
1302
|
+
if (!e2?.element) return;
|
|
1025
1303
|
let n3 = null;
|
|
1026
1304
|
try {
|
|
1027
|
-
n3 =
|
|
1028
|
-
} catch (
|
|
1029
|
-
throw
|
|
1305
|
+
n3 = e2.doCopy?.(t3), "string" == typeof n3 ? await f2.writeText(n3) : await f2.writeReference(n3);
|
|
1306
|
+
} catch (t4) {
|
|
1307
|
+
throw t4;
|
|
1030
1308
|
}
|
|
1031
|
-
}, [
|
|
1032
|
-
const n3 =
|
|
1309
|
+
}, [e2, l2]), m2 = B(async (t3) => {
|
|
1310
|
+
const n3 = e2?.element?.();
|
|
1033
1311
|
if (n3) {
|
|
1034
|
-
|
|
1312
|
+
p2.current = { sourceElement: n3, args: t3 };
|
|
1035
1313
|
try {
|
|
1036
|
-
await
|
|
1037
|
-
} catch (
|
|
1038
|
-
l2.showError?.(
|
|
1314
|
+
await _2(t3);
|
|
1315
|
+
} catch (t4) {
|
|
1316
|
+
l2.showError?.(t4);
|
|
1039
1317
|
}
|
|
1040
1318
|
}
|
|
1041
|
-
}, [
|
|
1042
|
-
|
|
1043
|
-
}, []), y2 = B(async (
|
|
1319
|
+
}, [e2?.element, l2]), g2 = i(() => {
|
|
1320
|
+
m2({ isCut: true });
|
|
1321
|
+
}, []), y2 = B(async (t3, e3, n3) => {
|
|
1044
1322
|
try {
|
|
1045
|
-
if (false === await
|
|
1046
|
-
u2?.(
|
|
1047
|
-
} catch (
|
|
1048
|
-
l2.showError?.(
|
|
1323
|
+
if (false === await t3.doPaste(e3, n3)) return;
|
|
1324
|
+
u2?.(e3, n3);
|
|
1325
|
+
} catch (t4) {
|
|
1326
|
+
l2.showError?.(t4);
|
|
1049
1327
|
}
|
|
1050
|
-
}, [u2]), x2 = B(async (
|
|
1328
|
+
}, [u2]), x2 = B(async (t3, e3, o3) => {
|
|
1051
1329
|
const i2 = n2?.element?.();
|
|
1052
|
-
if (i2 && await v.whenFocus(i2), !
|
|
1330
|
+
if (i2 && await v.whenFocus(i2), !t3 && !e3) return;
|
|
1053
1331
|
const r3 = await l2.showBusy?.("Pasting...");
|
|
1054
|
-
if (
|
|
1055
|
-
return await y2(n2,
|
|
1056
|
-
} catch (
|
|
1057
|
-
r3?.(), l2.showError?.(
|
|
1332
|
+
if (e3) try {
|
|
1333
|
+
return await y2(n2, e3, o3), void r3?.();
|
|
1334
|
+
} catch (t4) {
|
|
1335
|
+
r3?.(), l2.showError?.(t4);
|
|
1058
1336
|
}
|
|
1059
1337
|
let s3, a3 = n2.importFromExternal;
|
|
1060
|
-
a3 || (a3 = (
|
|
1338
|
+
a3 || (a3 = (e4, n3) => ({ getItemType: () => "text", toText: () => t3.text, isClipboardItem: true }));
|
|
1061
1339
|
try {
|
|
1062
|
-
s3 = await a3(
|
|
1063
|
-
} catch (
|
|
1064
|
-
r3?.(), l2.showError?.(
|
|
1340
|
+
s3 = await a3(t3, { isCut: false });
|
|
1341
|
+
} catch (t4) {
|
|
1342
|
+
r3?.(), l2.showError?.(t4);
|
|
1065
1343
|
}
|
|
1066
1344
|
if (s3) try {
|
|
1067
|
-
const
|
|
1068
|
-
await y2(n2,
|
|
1069
|
-
} catch (
|
|
1070
|
-
r3?.(), l2.showError?.(
|
|
1345
|
+
const t4 = await Promise.resolve(s3);
|
|
1346
|
+
await y2(n2, t4, o3), r3?.();
|
|
1347
|
+
} catch (t4) {
|
|
1348
|
+
r3?.(), l2.showError?.(t4);
|
|
1071
1349
|
}
|
|
1072
1350
|
else r3?.();
|
|
1073
|
-
}, [y2, n2, l2]), w2 = B(async (
|
|
1351
|
+
}, [y2, n2, l2]), w2 = B(async (t3) => {
|
|
1074
1352
|
if (n2?.element) try {
|
|
1075
|
-
const
|
|
1076
|
-
if (
|
|
1353
|
+
const e3 = await f2.readReference();
|
|
1354
|
+
if (e3) return void await x2(null, e3, t3);
|
|
1077
1355
|
const n3 = [];
|
|
1078
|
-
n3[0] = await S.readStringFromClipboard(
|
|
1356
|
+
n3[0] = await S.readStringFromClipboard(f2, L.plain), n3[1] = await S.readHTMLFromClipboard(f2, L.html), n3[2] = await S.readBlobFromClipboard(f2, L.png);
|
|
1079
1357
|
const o3 = { text: n3[0] ?? null, html: n3[1] ?? null, image: n3[2] ?? null };
|
|
1080
|
-
await x2(o3, null,
|
|
1081
|
-
} catch (
|
|
1082
|
-
if ("Document is not focused." ===
|
|
1083
|
-
l2.showError?.(
|
|
1358
|
+
await x2(o3, null, t3);
|
|
1359
|
+
} catch (t4) {
|
|
1360
|
+
if ("Document is not focused." === t4?.message) return;
|
|
1361
|
+
l2.showError?.(t4);
|
|
1084
1362
|
}
|
|
1085
1363
|
}, [x2, n2?.element, l2]);
|
|
1086
|
-
return B(async (
|
|
1087
|
-
}, [
|
|
1364
|
+
return B(async (t3) => {
|
|
1365
|
+
}, [e2?.element]), B(async (t3) => {
|
|
1088
1366
|
}, [n2?.element, x2, l2]), c(() => {
|
|
1089
|
-
if (!
|
|
1090
|
-
const
|
|
1091
|
-
const
|
|
1092
|
-
a2?.(
|
|
1093
|
-
},
|
|
1367
|
+
if (!f2) return;
|
|
1368
|
+
const t3 = async (t4) => {
|
|
1369
|
+
const e4 = await f2.readReference();
|
|
1370
|
+
a2?.(e4);
|
|
1371
|
+
}, e3 = (t4) => {
|
|
1094
1372
|
l2.showMessage?.(b.ErrorMessages.PermsRead, { onceKey: "clipboard.features" });
|
|
1095
|
-
}, n3 = (
|
|
1373
|
+
}, n3 = (t4) => {
|
|
1096
1374
|
l2.showMessage?.(b.ErrorMessages.PermsWrite, { onceKey: "clipboard.features" });
|
|
1097
1375
|
};
|
|
1098
|
-
return
|
|
1099
|
-
|
|
1376
|
+
return f2.addEventListener("clipboardchange", t3), f2.addEventListener("clipboarderrorread", e3), f2.addEventListener("clipboarderrorwrite", n3), () => {
|
|
1377
|
+
f2.removeEventListener("clipboardchange", t3), f2.removeEventListener("clipboarderrorread", e3), f2.removeEventListener("clipboarderrorwrite", n3);
|
|
1100
1378
|
};
|
|
1101
|
-
}, [
|
|
1102
|
-
}, [
|
|
1103
|
-
s2?.getCommand("cut")?.updateCallback(g2).update({ disabled: !
|
|
1104
|
-
}, [
|
|
1379
|
+
}, [f2, l2]), c(() => {
|
|
1380
|
+
}, [_2, x2, e2, n2]), c(() => {
|
|
1381
|
+
s2?.getCommand("cut")?.updateCallback(g2).update({ disabled: !e2 || !n2 }), s2?.getCommand("copy")?.updateCallback(m2).update({ disabled: !e2 }), s2?.getCommand("paste")?.updateCallback(w2).update({ disabled: !n2 });
|
|
1382
|
+
}, [e2, n2, s2]), { paste: w2, copy: m2, clipboard: f2 };
|
|
1105
1383
|
};
|
|
1106
|
-
function
|
|
1107
|
-
const n2 = r(
|
|
1384
|
+
function xe(t2, e2 = true) {
|
|
1385
|
+
const n2 = r(t2);
|
|
1108
1386
|
c(() => {
|
|
1109
|
-
if (
|
|
1110
|
-
const
|
|
1111
|
-
Object.keys(
|
|
1387
|
+
if (e2) {
|
|
1388
|
+
const e3 = Object.entries(t2).reduce((t3, [e4, o2]) => (n2.current[e4] !== o2 && (t3[e4] = [n2.current[e4], o2]), t3), {});
|
|
1389
|
+
Object.keys(e3).length > 0 && console.log("Changed props:", e3);
|
|
1112
1390
|
}
|
|
1113
|
-
n2.current =
|
|
1391
|
+
n2.current = t2;
|
|
1114
1392
|
});
|
|
1115
1393
|
}
|
|
1116
|
-
let
|
|
1117
|
-
var
|
|
1118
|
-
const
|
|
1119
|
-
const
|
|
1120
|
-
const [
|
|
1121
|
-
return
|
|
1122
|
-
null ==
|
|
1394
|
+
let we = false, be = 0;
|
|
1395
|
+
var Se = "undefined" != typeof document ? d : c;
|
|
1396
|
+
const Le = () => "sheetxl-ui-" + be++;
|
|
1397
|
+
const Ee = o["useId".toString()], Ce = null != Ee ? Ee : function() {
|
|
1398
|
+
const [t2, e2] = o.useState(() => we ? Le() : void 0);
|
|
1399
|
+
return Se(() => {
|
|
1400
|
+
null == t2 && e2(Le());
|
|
1123
1401
|
}, []), o.useEffect(() => {
|
|
1124
|
-
|
|
1125
|
-
}, []),
|
|
1126
|
-
},
|
|
1127
|
-
const o2 =
|
|
1402
|
+
we || (we = true);
|
|
1403
|
+
}, []), t2;
|
|
1404
|
+
}, Te = "Undo the last action.", Me = "Repeat the last action or undo the redo.", ke = (t2) => `Redo ${t2}`, De = ({ manager: t2, commands: e2, disabled: n2 }) => {
|
|
1405
|
+
const o2 = Ht(), i2 = B((e3) => {
|
|
1128
1406
|
try {
|
|
1129
|
-
|
|
1130
|
-
} catch (
|
|
1131
|
-
o2.error(
|
|
1407
|
+
t2?.undo(e3);
|
|
1408
|
+
} catch (t3) {
|
|
1409
|
+
o2.error(t3);
|
|
1132
1410
|
}
|
|
1133
|
-
}, [
|
|
1411
|
+
}, [t2]), r2 = B((e3) => {
|
|
1134
1412
|
try {
|
|
1135
|
-
|
|
1136
|
-
} catch (
|
|
1137
|
-
o2.error(
|
|
1413
|
+
t2?.redo(e3);
|
|
1414
|
+
} catch (t3) {
|
|
1415
|
+
o2.error(t3);
|
|
1138
1416
|
}
|
|
1139
|
-
}, [
|
|
1417
|
+
}, [t2]);
|
|
1140
1418
|
return h(() => {
|
|
1141
|
-
if (!
|
|
1142
|
-
const
|
|
1143
|
-
} }, n3 = [new
|
|
1144
|
-
|
|
1145
|
-
}, [
|
|
1146
|
-
if (!
|
|
1419
|
+
if (!e2) return;
|
|
1420
|
+
const t3 = { contains: (t4) => true, focus() {
|
|
1421
|
+
} }, n3 = [new ae("undo", t3, { label: "Undo", description: Te, shortcut: { key: "z", modifiers: [D.Ctrl] }, disabled: true }, i2), new ae("redo", t3, { label: "Redo", description: Me, shortcut: [{ key: "y", modifiers: [D.Ctrl] }, { key: "F4" }, { key: "Enter", modifiers: [D.Alt] }], disabled: true }, r2)];
|
|
1422
|
+
e2?.addCommands(n3, true);
|
|
1423
|
+
}, [e2]), c(() => {
|
|
1424
|
+
if (!e2) return;
|
|
1147
1425
|
const o3 = () => {
|
|
1148
|
-
const o4 =
|
|
1426
|
+
const o4 = t2?.getTopUndoDescription(), i4 = {};
|
|
1149
1427
|
var r3;
|
|
1150
|
-
|
|
1151
|
-
const s2 =
|
|
1152
|
-
|
|
1428
|
+
e2.getCommand("undo").update({ disabled: n2 || !t2 || !t2.hasUndo(), description: o4 ? (r3 = o4, `Undo ${r3}`) : Te, state: i4, context: { undoManager: t2 } });
|
|
1429
|
+
const s2 = t2?.getTopRedoDescription();
|
|
1430
|
+
e2.getCommand("redo").update({ disabled: n2 || !t2 || !t2.hasRedo(), description: s2 ? ke(s2) : Me, state: i4, context: { undoManager: t2 } });
|
|
1153
1431
|
};
|
|
1154
|
-
if (o3(), !
|
|
1155
|
-
const i3 =
|
|
1432
|
+
if (o3(), !t2) return;
|
|
1433
|
+
const i3 = t2.addListener({ onStackChange() {
|
|
1156
1434
|
o3();
|
|
1157
1435
|
} });
|
|
1158
1436
|
return () => i3?.();
|
|
1159
|
-
}, [
|
|
1437
|
+
}, [t2, e2, n2]), { undo: i2, redo: r2 };
|
|
1160
1438
|
};
|
|
1161
1439
|
export {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1440
|
+
ae as Command,
|
|
1441
|
+
ge as CommandButtonType,
|
|
1442
|
+
he as CommandGroup,
|
|
1443
|
+
Pt as DefaultDynamicIconService,
|
|
1444
|
+
Kt as DefaultReactNotifier,
|
|
1445
|
+
Bt as DynamicIcon,
|
|
1446
|
+
mt as FocusKeyNavigation,
|
|
1447
|
+
k as HorizontalAlignment,
|
|
1448
|
+
P as KeyCodes,
|
|
1449
|
+
D as KeyModifiers,
|
|
1450
|
+
A as MouseButtonCodes,
|
|
1451
|
+
Nt as NotifierProvider,
|
|
1452
|
+
Ot as NotifierType,
|
|
1453
|
+
et as ReactUtils,
|
|
1454
|
+
gt as RoundedTab,
|
|
1455
|
+
st as ScrollPane,
|
|
1456
|
+
N as ScrollUtils,
|
|
1457
|
+
W as Scrollbar,
|
|
1458
|
+
z as ScrollbarOrientation,
|
|
1459
|
+
ce as SimpleCommand,
|
|
1460
|
+
Lt as SplitPane,
|
|
1461
|
+
vt as SplitPaneResizer,
|
|
1462
|
+
_t as ToolTipPlacement,
|
|
1463
|
+
ft as VirtualScrollbar,
|
|
1464
|
+
$t as WalkingIcon,
|
|
1465
|
+
Dt as createDynamicIconService,
|
|
1466
|
+
rt as defaultCreateScrollCorner,
|
|
1185
1467
|
K as defaultCreateScrollEdgeButton,
|
|
1186
1468
|
O as defaultCreateScrollEndButton,
|
|
1187
1469
|
$ as defaultCreateScrollStartButton,
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1470
|
+
it as defaultCreateScrollbar,
|
|
1471
|
+
It as getDevicePixelRatio,
|
|
1472
|
+
pe as toShortcutString,
|
|
1191
1473
|
B as useCallbackRef,
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1474
|
+
fe as useCommand,
|
|
1475
|
+
me as useCommands,
|
|
1476
|
+
ve as useCopyPaste,
|
|
1477
|
+
Wt as useDevicePixelRatio,
|
|
1478
|
+
le as useEditMode,
|
|
1479
|
+
at as useFullscreenPortal,
|
|
1480
|
+
ye as useGlobalClipboard,
|
|
1481
|
+
Ce as useId,
|
|
1482
|
+
ot as useImperativeElement,
|
|
1483
|
+
Ft as useMouseDownAndHoldListener,
|
|
1484
|
+
Ht as useNotifier,
|
|
1485
|
+
Rt as useOnClickOrFocusAway,
|
|
1486
|
+
jt as useSynchronizedPointerHandler,
|
|
1487
|
+
xe as useTraceUpdate,
|
|
1488
|
+
De as useUndoManager
|
|
1207
1489
|
};
|