react-semaphor 0.1.544 → 0.1.545
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/analytics-protocol/index.js +35 -34
- package/dist/assistant-context/index.js +1 -1
- package/dist/brand-studio/index.js +2 -2
- package/dist/briefings/index.js +50 -47
- package/dist/chunks/{class-utils-Df1OVOT1.js → _commonjsHelpers-DimLPMtv.js} +124 -98
- package/dist/chunks/{apply-dashboard-operations-Bz4n1Lq6.js → apply-dashboard-operations-CZEMsx8E.js} +778 -958
- package/dist/chunks/{assistant-chat-BNLkCDml.js → assistant-chat-D7sWTypJ.js} +308 -309
- package/dist/chunks/calendar-day-equality-dvoQp1xW.js +410 -0
- package/dist/chunks/{comparison-window-caption-BTkrN3W4.js → comparison-window-caption-D4E6IHPD.js} +56 -55
- package/dist/chunks/{custom-visual-inputs-DUtpYZOk.js → custom-visual-inputs-DLCD9Y5V.js} +8 -2
- package/dist/chunks/{dashboard-g5a4DKWq.js → dashboard-B1tMju0u.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-DQ_8O_e2.js → dashboard-briefing-launcher-CePgIu0Z.js} +771 -776
- package/dist/chunks/{dashboard-controls-8RyBTQUO.js → dashboard-controls-Cq05n3e0.js} +28 -28
- package/dist/chunks/{dashboard-json-7qT9jmfL.js → dashboard-json-CoYRPqxx.js} +3 -3
- package/dist/chunks/document-dashboard-inputs-BesAHZvB.js +3112 -0
- package/dist/chunks/{edit-dashboard-visual-BfJwnRIZ.js → edit-dashboard-visual-JPtNfJRb.js} +5624 -5615
- package/dist/chunks/{filter-value-text-CYsVYPuD.js → filter-value-text-ff7osJr7.js} +1 -1
- package/dist/chunks/{index-DkAyQvC6.js → index-DRWiuqyd.js} +378 -333
- package/dist/chunks/{matrix-formatter-CxJLkztA.js → matrix-formatter-DnCyRXJE.js} +13 -13
- package/dist/chunks/{numeric-presentation-DESvLiu9.js → numeric-presentation-7X_IrD58.js} +2571 -2572
- package/dist/chunks/{raw-temporal-presentation-CLiVi90c.js → raw-temporal-presentation-C3mUgnEx.js} +1 -1
- package/dist/chunks/{zoned-wall-clock-MulfA26h.js → relative-date-label-Bk2j94pA.js} +21 -64
- package/dist/chunks/rendered-file-D8xEuVVx.js +108 -0
- package/dist/chunks/{report-preferences-dialog-Df7VpRVW.js → report-preferences-dialog-DUtuUL_5.js} +631 -603
- package/dist/chunks/resolve-dashboard-input-context-DJ2tICwz.js +9415 -0
- package/dist/chunks/{saved-dashboard-context-B-mQ--nV.js → saved-dashboard-context-LrF_kW0l.js} +183 -211
- package/dist/chunks/selection-filter-compiler-BKXmyLrS.js +79 -0
- package/dist/chunks/{semaphor-ready-indicator-DDAxk8us.js → semaphor-ready-indicator-BxF96Yhv.js} +45764 -46519
- package/dist/chunks/{shelf-drop-preview-context-BSRPwaED.js → shelf-drop-preview-context-CNaM_Gmh.js} +885 -866
- package/dist/chunks/{switch-C3jLxlG0.js → switch-uDtPgQlQ.js} +44 -45
- package/dist/chunks/{table-export-sheet-CPfGAQ9X.js → table-export-sheet-YzMioA7Y.js} +1 -1
- package/dist/chunks/{use-create-flow-overlay-state-BxzFviM-.js → use-create-flow-overlay-state-CjB7ig1o.js} +105 -105
- package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +556 -544
- package/dist/data-app-sdk/index.js +1 -1
- package/dist/format-utils/index.js +163 -152
- package/dist/index.js +351 -323
- package/dist/style.css +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/briefings/attachment-outcomes.d.ts +1 -1
- package/dist/types/briefings/attachments.d.ts +33 -6
- package/dist/types/briefings/index.d.ts +6 -5
- package/dist/types/components/surfboard/filter/types.d.ts +0 -14
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-authoring.d.ts +68 -82
- package/dist/types/lib/dashboard-inputs/dashboard-input-target-context.d.ts +0 -8
- package/dist/types/lib/dashboard-inputs/dashboard-input-values.d.ts +35 -1
- package/dist/types/lib/dashboard-inputs/filter-settings.d.ts +199 -0
- package/dist/types/lib/dashboard-inputs/resolve-dashboard-input-context.d.ts +7 -2
- package/dist/types/lib/dashboard-inputs/resolve-selection-input.d.ts +1 -1
- package/dist/types/lib/dashboard-viewer/captured-runtime-values.d.ts +40 -0
- package/dist/types/lib/dashboard-viewer/compatibility-input-storage.d.ts +16 -16
- package/dist/types/lib/dashboard-viewer/viewer-state.d.ts +11 -9
- package/dist/types/lib/download-pdf.d.ts +75 -1
- package/dist/types/lib/hooks/use-date-filter.d.ts +5 -0
- package/dist/types/lib/hooks/use-text-filter.d.ts +5 -0
- package/dist/types/lib/matrix-table/matrix-delivery-policy.d.ts +5 -4
- package/dist/types/lib/query-context/assemble-card-query.d.ts +158 -0
- package/dist/types/lib/query-context/build-card-query-context.d.ts +3 -3
- package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +15 -6
- package/dist/types/lib/query-context/build-dashboard-execution-snapshot.d.ts +11 -13
- package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +22 -12
- package/dist/types/lib/stores/dashboard-store.d.ts +39 -55
- package/dist/types/lib/stores/editor-store.d.ts +0 -3
- package/dist/types/lib/types/common-types.d.ts +21 -6
- package/dist/types/shared/assistant-context/saved-dashboard-context.d.ts +4 -11
- package/dist/types/shared/dashboard-authoring/control-execution-contract.d.ts +12 -12
- package/dist/types/shared/dashboard-authoring/dashboard-filter-mapping-contract.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/dashboard-input-scope.d.ts +92 -0
- package/dist/types/shared/dashboard-authoring/filter-model/ad-hoc-filter-values.d.ts +10 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-definitions.d.ts +29 -0
- package/dist/types/shared/dashboard-authoring/filter-model/filter-values.d.ts +58 -0
- package/dist/types/shared/dashboard-authoring/filter-model/index.d.ts +7 -0
- package/dist/types/shared/dashboard-authoring/filter-model/prototype-document-inputs.d.ts +15 -0
- package/dist/types/shared/dashboard-authoring/filter-model/read-dashboard-filter-model.d.ts +78 -0
- package/dist/types/shared/dashboard-authoring/filter-model/stored-dashboard.d.ts +18 -0
- package/dist/types/shared/dashboard-authoring/filter-model/toolbar-filter-reach.d.ts +23 -0
- package/dist/types/shared/dashboard-authoring/index.d.ts +2 -0
- package/dist/types/shared/format-utils/exporters/index.d.ts +2 -0
- package/dist/types/shared/format-utils/exporters/rendered-file.d.ts +106 -0
- package/package.json +2 -2
- package/dist/chunks/_commonjsHelpers-BkfeUUK-.js +0 -28
- package/dist/chunks/calendar-day-equality-BmJAWduY.js +0 -460
- package/dist/chunks/document-dashboard-inputs-BC6p-ESg.js +0 -8087
- package/dist/chunks/document-sheet-utils-Duo9uLoH.js +0 -3619
- package/dist/chunks/sort-target-MT1WK1vX.js +0 -29
- package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +0 -88
- package/dist/types/lib/dashboard-inputs/dashboard-input-scope.d.ts +0 -10
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import zn, { forwardRef as
|
|
4
|
-
import {
|
|
5
|
-
import { C as Et, y as It, z as ze, A as pe, D as Rt, E as
|
|
6
|
-
import { f as
|
|
7
|
-
import {
|
|
8
|
-
import { f as
|
|
1
|
+
import { jsxs as Ne, jsx as L, Fragment as ft } from "react/jsx-runtime";
|
|
2
|
+
import * as T from "react";
|
|
3
|
+
import zn, { forwardRef as Fe, createElement as xe, useContext as rt, createContext as xt, useRef as q, useLayoutEffect as Pn, useImperativeHandle as zt, useEffect as re, useState as ce, useCallback as O, useMemo as G, memo as wn, Suspense as Cn, useSyncExternalStore as En } from "react";
|
|
4
|
+
import { aV as In, $ as ie, aW as Pt, a0 as wt, aX as ot, aY as Ct, aZ as Rn, a_ as Dn, a$ as An, b0 as Nn, u as Re, b1 as Mn, b2 as Ln, b3 as _n, b4 as kn, b5 as Tn, b6 as Hn, b7 as Vn, b8 as $n, b9 as Fn } from "./semaphor-ready-indicator-BxF96Yhv.js";
|
|
5
|
+
import { C as Et, y as It, z as ze, A as pe, D as Rt, E as Kn, F as Bn, G as Pe, H as qn, J as Dt, K as On, M as Gn } from "./switch-uDtPgQlQ.js";
|
|
6
|
+
import { f as Un, r as At } from "./editor-draft-sync-BN5qYHPF.js";
|
|
7
|
+
import { aU as Wn, aV as Xn } from "./resolve-dashboard-input-context-DJ2tICwz.js";
|
|
8
|
+
import { f as Yn, r as Nt, g as Mt, a as Je, c as Te, n as jn, b as Qn } from "./custom-visual-inputs-DLCD9Y5V.js";
|
|
9
9
|
import "./index-CuHybtft.js";
|
|
10
10
|
import "./validators-DMHTpf7a.js";
|
|
11
11
|
import "./matrix-operation-contract-8OIO4gob.js";
|
|
12
12
|
import "./analytics-base-schemas-BFAoRlkU.js";
|
|
13
13
|
import "zod";
|
|
14
14
|
import "../value-format-preferences/index.js";
|
|
15
|
-
import { c as we } from "./
|
|
15
|
+
import { c as we } from "./_commonjsHelpers-DimLPMtv.js";
|
|
16
16
|
import { u as Jn } from "./appearance-context-DEYtWinQ.js";
|
|
17
17
|
const wo = zn.memo(function({
|
|
18
18
|
context: t = "editor"
|
|
19
19
|
} = {}) {
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ Ne(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
23
|
"data-content": "fields-section",
|
|
24
24
|
className: "flex h-full grow flex-col items-center overflow-hidden",
|
|
25
25
|
children: [
|
|
26
26
|
" ",
|
|
27
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ L(In, { context: t }),
|
|
28
28
|
" "
|
|
29
29
|
]
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
|
-
}),
|
|
33
|
-
|
|
34
|
-
const
|
|
32
|
+
}), Ke = xt(null);
|
|
33
|
+
Ke.displayName = "PanelGroupContext";
|
|
34
|
+
const B = {
|
|
35
35
|
group: "data-panel-group",
|
|
36
36
|
groupDirection: "data-panel-group-direction",
|
|
37
37
|
groupId: "data-panel-group-id",
|
|
@@ -44,10 +44,10 @@ const K = {
|
|
|
44
44
|
resizeHandleEnabled: "data-panel-resize-handle-enabled",
|
|
45
45
|
resizeHandleId: "data-panel-resize-handle-id",
|
|
46
46
|
resizeHandleState: "data-resize-handle-state"
|
|
47
|
-
}, it = 10, me = Pn, pt =
|
|
47
|
+
}, it = 10, me = Pn, pt = T.useId, Zn = typeof pt == "function" ? pt : () => null;
|
|
48
48
|
let er = 0;
|
|
49
49
|
function st(e = null) {
|
|
50
|
-
const t = Zn(), n =
|
|
50
|
+
const t = Zn(), n = q(e || t || null);
|
|
51
51
|
return n.current === null && (n.current = "" + er++), e ?? n.current;
|
|
52
52
|
}
|
|
53
53
|
function Lt({
|
|
@@ -60,32 +60,32 @@ function Lt({
|
|
|
60
60
|
id: s,
|
|
61
61
|
maxSize: l,
|
|
62
62
|
minSize: a,
|
|
63
|
-
onCollapse:
|
|
64
|
-
onExpand:
|
|
63
|
+
onCollapse: d,
|
|
64
|
+
onExpand: f,
|
|
65
65
|
onResize: u,
|
|
66
66
|
order: c,
|
|
67
|
-
style:
|
|
68
|
-
tagName:
|
|
69
|
-
...
|
|
67
|
+
style: m,
|
|
68
|
+
tagName: p = "div",
|
|
69
|
+
...g
|
|
70
70
|
}) {
|
|
71
|
-
const
|
|
72
|
-
if (
|
|
71
|
+
const v = rt(Ke);
|
|
72
|
+
if (v === null)
|
|
73
73
|
throw Error("Panel components must be rendered within a PanelGroup container");
|
|
74
74
|
const {
|
|
75
|
-
collapsePanel:
|
|
76
|
-
expandPanel:
|
|
75
|
+
collapsePanel: h,
|
|
76
|
+
expandPanel: A,
|
|
77
77
|
getPanelSize: x,
|
|
78
|
-
getPanelStyle:
|
|
79
|
-
groupId:
|
|
80
|
-
isPanelCollapsed:
|
|
78
|
+
getPanelStyle: R,
|
|
79
|
+
groupId: D,
|
|
80
|
+
isPanelCollapsed: k,
|
|
81
81
|
reevaluatePanelConstraints: w,
|
|
82
|
-
registerPanel:
|
|
83
|
-
resizePanel:
|
|
84
|
-
unregisterPanel:
|
|
85
|
-
} =
|
|
82
|
+
registerPanel: X,
|
|
83
|
+
resizePanel: Q,
|
|
84
|
+
unregisterPanel: $
|
|
85
|
+
} = v, _ = st(s), M = q({
|
|
86
86
|
callbacks: {
|
|
87
|
-
onCollapse:
|
|
88
|
-
onExpand:
|
|
87
|
+
onCollapse: d,
|
|
88
|
+
onExpand: f,
|
|
89
89
|
onResize: u
|
|
90
90
|
},
|
|
91
91
|
constraints: {
|
|
@@ -95,73 +95,73 @@ function Lt({
|
|
|
95
95
|
maxSize: l,
|
|
96
96
|
minSize: a
|
|
97
97
|
},
|
|
98
|
-
id:
|
|
98
|
+
id: _,
|
|
99
99
|
idIsFromProps: s !== void 0,
|
|
100
100
|
order: c
|
|
101
101
|
});
|
|
102
|
-
|
|
102
|
+
q({
|
|
103
103
|
didLogMissingDefaultSizeWarning: !1
|
|
104
104
|
}), me(() => {
|
|
105
105
|
const {
|
|
106
|
-
callbacks:
|
|
107
|
-
constraints:
|
|
108
|
-
} =
|
|
109
|
-
...
|
|
106
|
+
callbacks: F,
|
|
107
|
+
constraints: H
|
|
108
|
+
} = M.current, V = {
|
|
109
|
+
...H
|
|
110
110
|
};
|
|
111
|
-
|
|
111
|
+
M.current.id = _, M.current.idIsFromProps = s !== void 0, M.current.order = c, F.onCollapse = d, F.onExpand = f, F.onResize = u, H.collapsedSize = n, H.collapsible = r, H.defaultSize = i, H.maxSize = l, H.minSize = a, (V.collapsedSize !== H.collapsedSize || V.collapsible !== H.collapsible || V.maxSize !== H.maxSize || V.minSize !== H.minSize) && w(M.current, V);
|
|
112
112
|
}), me(() => {
|
|
113
|
-
const
|
|
114
|
-
return
|
|
115
|
-
|
|
113
|
+
const F = M.current;
|
|
114
|
+
return X(F), () => {
|
|
115
|
+
$(F);
|
|
116
116
|
};
|
|
117
|
-
}, [c,
|
|
117
|
+
}, [c, _, X, $]), zt(o, () => ({
|
|
118
118
|
collapse: () => {
|
|
119
|
-
|
|
119
|
+
h(M.current);
|
|
120
120
|
},
|
|
121
|
-
expand: (
|
|
122
|
-
|
|
121
|
+
expand: (F) => {
|
|
122
|
+
A(M.current, F);
|
|
123
123
|
},
|
|
124
124
|
getId() {
|
|
125
|
-
return
|
|
125
|
+
return _;
|
|
126
126
|
},
|
|
127
127
|
getSize() {
|
|
128
|
-
return x(
|
|
128
|
+
return x(M.current);
|
|
129
129
|
},
|
|
130
130
|
isCollapsed() {
|
|
131
|
-
return M
|
|
131
|
+
return k(M.current);
|
|
132
132
|
},
|
|
133
133
|
isExpanded() {
|
|
134
|
-
return !M
|
|
134
|
+
return !k(M.current);
|
|
135
135
|
},
|
|
136
|
-
resize: (
|
|
137
|
-
|
|
136
|
+
resize: (F) => {
|
|
137
|
+
Q(M.current, F);
|
|
138
138
|
}
|
|
139
|
-
}), [
|
|
140
|
-
const
|
|
141
|
-
return xe(
|
|
142
|
-
...
|
|
139
|
+
}), [h, A, x, k, _, Q]);
|
|
140
|
+
const U = R(M.current, i);
|
|
141
|
+
return xe(p, {
|
|
142
|
+
...g,
|
|
143
143
|
children: e,
|
|
144
144
|
className: t,
|
|
145
|
-
id:
|
|
145
|
+
id: _,
|
|
146
146
|
style: {
|
|
147
|
-
...
|
|
148
|
-
...
|
|
147
|
+
...U,
|
|
148
|
+
...m
|
|
149
149
|
},
|
|
150
150
|
// CSS selectors
|
|
151
|
-
[
|
|
152
|
-
[
|
|
153
|
-
[
|
|
154
|
-
[
|
|
155
|
-
[
|
|
151
|
+
[B.groupId]: D,
|
|
152
|
+
[B.panel]: "",
|
|
153
|
+
[B.panelCollapsible]: r || void 0,
|
|
154
|
+
[B.panelId]: _,
|
|
155
|
+
[B.panelSize]: parseFloat("" + U.flexGrow).toFixed(1)
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
-
const tr =
|
|
158
|
+
const tr = Fe((e, t) => xe(Lt, {
|
|
159
159
|
...e,
|
|
160
160
|
forwardedRef: t
|
|
161
161
|
}));
|
|
162
162
|
Lt.displayName = "Panel";
|
|
163
163
|
tr.displayName = "forwardRef(Panel)";
|
|
164
|
-
let Ze = null,
|
|
164
|
+
let Ze = null, He = -1, ae = null;
|
|
165
165
|
function nr(e, t) {
|
|
166
166
|
if (t) {
|
|
167
167
|
const n = (t & Vt) !== 0, r = (t & $t) !== 0, i = (t & Ft) !== 0, o = (t & Kt) !== 0;
|
|
@@ -184,17 +184,17 @@ function nr(e, t) {
|
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
186
|
function rr() {
|
|
187
|
-
|
|
187
|
+
ae !== null && (document.head.removeChild(ae), Ze = null, ae = null, He = -1);
|
|
188
188
|
}
|
|
189
189
|
function We(e, t) {
|
|
190
190
|
var n, r;
|
|
191
191
|
const i = nr(e, t);
|
|
192
192
|
if (Ze !== i) {
|
|
193
|
-
if (Ze = i,
|
|
193
|
+
if (Ze = i, ae === null && (ae = document.createElement("style"), document.head.appendChild(ae)), He >= 0) {
|
|
194
194
|
var o;
|
|
195
|
-
(o =
|
|
195
|
+
(o = ae.sheet) === null || o === void 0 || o.removeRule(He);
|
|
196
196
|
}
|
|
197
|
-
|
|
197
|
+
He = (n = (r = ae.sheet) === null || r === void 0 ? void 0 : r.insertRule(`*{cursor: ${i} !important;}`)) !== null && n !== void 0 ? n : -1;
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
200
|
function _t(e) {
|
|
@@ -206,7 +206,7 @@ function kt(e) {
|
|
|
206
206
|
function Tt(e) {
|
|
207
207
|
return e.type.startsWith("mouse");
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Be(e) {
|
|
210
210
|
if (kt(e)) {
|
|
211
211
|
if (e.isPrimary)
|
|
212
212
|
return {
|
|
@@ -239,7 +239,7 @@ function sr(e, t) {
|
|
|
239
239
|
let r;
|
|
240
240
|
for (; n.a.at(-1) === n.b.at(-1); )
|
|
241
241
|
e = n.a.pop(), t = n.b.pop(), r = e;
|
|
242
|
-
|
|
242
|
+
I(r, "Stacking order can only be calculated for elements with a common ancestor");
|
|
243
243
|
const i = {
|
|
244
244
|
a: gt(mt(n.a)),
|
|
245
245
|
b: gt(mt(n.b))
|
|
@@ -272,7 +272,7 @@ function mt(e) {
|
|
|
272
272
|
let t = e.length;
|
|
273
273
|
for (; t--; ) {
|
|
274
274
|
const n = e[t];
|
|
275
|
-
if (
|
|
275
|
+
if (I(n, "Missing node"), cr(n)) return n;
|
|
276
276
|
}
|
|
277
277
|
return null;
|
|
278
278
|
}
|
|
@@ -292,8 +292,8 @@ function Ht(e) {
|
|
|
292
292
|
return t && t instanceof ShadowRoot ? t.host : t;
|
|
293
293
|
}
|
|
294
294
|
const Vt = 1, $t = 2, Ft = 4, Kt = 8, ur = or() === "coarse";
|
|
295
|
-
let
|
|
296
|
-
const
|
|
295
|
+
let se = [], be = !1, fe = /* @__PURE__ */ new Map(), qe = /* @__PURE__ */ new Map();
|
|
296
|
+
const Me = /* @__PURE__ */ new Set();
|
|
297
297
|
function dr(e, t, n, r, i) {
|
|
298
298
|
var o;
|
|
299
299
|
const {
|
|
@@ -304,13 +304,13 @@ function dr(e, t, n, r, i) {
|
|
|
304
304
|
hitAreaMargins: r,
|
|
305
305
|
setResizeHandlerState: i
|
|
306
306
|
}, a = (o = fe.get(s)) !== null && o !== void 0 ? o : 0;
|
|
307
|
-
return fe.set(s, a + 1),
|
|
308
|
-
var
|
|
309
|
-
|
|
310
|
-
const u = (
|
|
311
|
-
if (fe.set(s, u - 1),
|
|
312
|
-
const c =
|
|
313
|
-
c >= 0 &&
|
|
307
|
+
return fe.set(s, a + 1), Me.add(l), Ve(), function() {
|
|
308
|
+
var f;
|
|
309
|
+
qe.delete(e), Me.delete(l);
|
|
310
|
+
const u = (f = fe.get(s)) !== null && f !== void 0 ? f : 1;
|
|
311
|
+
if (fe.set(s, u - 1), Ve(), u === 1 && fe.delete(s), se.includes(l)) {
|
|
312
|
+
const c = se.indexOf(l);
|
|
313
|
+
c >= 0 && se.splice(c, 1), at(), i("up", !0, null);
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
316
|
}
|
|
@@ -320,19 +320,19 @@ function fr(e) {
|
|
|
320
320
|
} = e, {
|
|
321
321
|
x: n,
|
|
322
322
|
y: r
|
|
323
|
-
} =
|
|
323
|
+
} = Be(e);
|
|
324
324
|
be = !0, lt({
|
|
325
325
|
target: t,
|
|
326
326
|
x: n,
|
|
327
327
|
y: r
|
|
328
|
-
}),
|
|
328
|
+
}), Ve(), se.length > 0 && ($e("down", e), e.preventDefault(), Bt(t) || e.stopImmediatePropagation());
|
|
329
329
|
}
|
|
330
|
-
function
|
|
330
|
+
function Xe(e) {
|
|
331
331
|
const {
|
|
332
332
|
x: t,
|
|
333
333
|
y: n
|
|
334
|
-
} =
|
|
335
|
-
if (be && e.buttons === 0 && (be = !1,
|
|
334
|
+
} = Be(e);
|
|
335
|
+
if (be && e.buttons === 0 && (be = !1, $e("up", e)), !be) {
|
|
336
336
|
const {
|
|
337
337
|
target: r
|
|
338
338
|
} = e;
|
|
@@ -342,25 +342,25 @@ function Ye(e) {
|
|
|
342
342
|
y: n
|
|
343
343
|
});
|
|
344
344
|
}
|
|
345
|
-
|
|
345
|
+
$e("move", e), at(), se.length > 0 && e.preventDefault();
|
|
346
346
|
}
|
|
347
|
-
function
|
|
347
|
+
function Ye(e) {
|
|
348
348
|
const {
|
|
349
349
|
target: t
|
|
350
350
|
} = e, {
|
|
351
351
|
x: n,
|
|
352
352
|
y: r
|
|
353
|
-
} =
|
|
354
|
-
|
|
353
|
+
} = Be(e);
|
|
354
|
+
qe.clear(), be = !1, se.length > 0 && (e.preventDefault(), Bt(t) || e.stopImmediatePropagation()), $e("up", e), lt({
|
|
355
355
|
target: t,
|
|
356
356
|
x: n,
|
|
357
357
|
y: r
|
|
358
|
-
}), at(),
|
|
358
|
+
}), at(), Ve();
|
|
359
359
|
}
|
|
360
360
|
function Bt(e) {
|
|
361
361
|
let t = e;
|
|
362
362
|
for (; t; ) {
|
|
363
|
-
if (t.hasAttribute(
|
|
363
|
+
if (t.hasAttribute(B.resizeHandle))
|
|
364
364
|
return !0;
|
|
365
365
|
t = t.parentElement;
|
|
366
366
|
}
|
|
@@ -371,86 +371,86 @@ function lt({
|
|
|
371
371
|
x: t,
|
|
372
372
|
y: n
|
|
373
373
|
}) {
|
|
374
|
-
|
|
374
|
+
se.splice(0);
|
|
375
375
|
let r = null;
|
|
376
|
-
(e instanceof HTMLElement || e instanceof SVGElement) && (r = e),
|
|
376
|
+
(e instanceof HTMLElement || e instanceof SVGElement) && (r = e), Me.forEach((i) => {
|
|
377
377
|
const {
|
|
378
378
|
element: o,
|
|
379
379
|
hitAreaMargins: s
|
|
380
380
|
} = i, l = o.getBoundingClientRect(), {
|
|
381
381
|
bottom: a,
|
|
382
|
-
left:
|
|
383
|
-
right:
|
|
382
|
+
left: d,
|
|
383
|
+
right: f,
|
|
384
384
|
top: u
|
|
385
385
|
} = l, c = ur ? s.coarse : s.fine;
|
|
386
|
-
if (t >=
|
|
386
|
+
if (t >= d - c && t <= f + c && n >= u - c && n <= a + c) {
|
|
387
387
|
if (r !== null && document.contains(r) && o !== r && !o.contains(r) && !r.contains(o) && // Calculating stacking order has a cost, so we should avoid it if possible
|
|
388
388
|
// That is why we only check potentially intersecting handles,
|
|
389
389
|
// and why we skip if the event target is within the handle's DOM
|
|
390
390
|
sr(r, o) > 0) {
|
|
391
|
-
let
|
|
392
|
-
for (;
|
|
393
|
-
if (ir(
|
|
394
|
-
|
|
391
|
+
let p = r, g = !1;
|
|
392
|
+
for (; p && !p.contains(o); ) {
|
|
393
|
+
if (ir(p.getBoundingClientRect(), l)) {
|
|
394
|
+
g = !0;
|
|
395
395
|
break;
|
|
396
396
|
}
|
|
397
|
-
|
|
397
|
+
p = p.parentElement;
|
|
398
398
|
}
|
|
399
|
-
if (
|
|
399
|
+
if (g)
|
|
400
400
|
return;
|
|
401
401
|
}
|
|
402
|
-
|
|
402
|
+
se.push(i);
|
|
403
403
|
}
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
406
|
function je(e, t) {
|
|
407
|
-
|
|
407
|
+
qe.set(e, t);
|
|
408
408
|
}
|
|
409
409
|
function at() {
|
|
410
410
|
let e = !1, t = !1;
|
|
411
|
-
|
|
411
|
+
se.forEach((r) => {
|
|
412
412
|
const {
|
|
413
413
|
direction: i
|
|
414
414
|
} = r;
|
|
415
415
|
i === "horizontal" ? e = !0 : t = !0;
|
|
416
416
|
});
|
|
417
417
|
let n = 0;
|
|
418
|
-
|
|
418
|
+
qe.forEach((r) => {
|
|
419
419
|
n |= r;
|
|
420
420
|
}), e && t ? We("intersection", n) : e ? We("horizontal", n) : t ? We("vertical", n) : rr();
|
|
421
421
|
}
|
|
422
422
|
let Qe = new AbortController();
|
|
423
|
-
function
|
|
423
|
+
function Ve() {
|
|
424
424
|
Qe.abort(), Qe = new AbortController();
|
|
425
425
|
const e = {
|
|
426
426
|
capture: !0,
|
|
427
427
|
signal: Qe.signal
|
|
428
428
|
};
|
|
429
|
-
|
|
429
|
+
Me.size && (be ? (se.length > 0 && fe.forEach((t, n) => {
|
|
430
430
|
const {
|
|
431
431
|
body: r
|
|
432
432
|
} = n;
|
|
433
|
-
t > 0 && (r.addEventListener("contextmenu",
|
|
434
|
-
}), window.addEventListener("pointerup",
|
|
433
|
+
t > 0 && (r.addEventListener("contextmenu", Ye, e), r.addEventListener("pointerleave", Xe, e), r.addEventListener("pointermove", Xe, e));
|
|
434
|
+
}), window.addEventListener("pointerup", Ye, e), window.addEventListener("pointercancel", Ye, e)) : fe.forEach((t, n) => {
|
|
435
435
|
const {
|
|
436
436
|
body: r
|
|
437
437
|
} = n;
|
|
438
|
-
t > 0 && (r.addEventListener("pointerdown", fr, e), r.addEventListener("pointermove",
|
|
438
|
+
t > 0 && (r.addEventListener("pointerdown", fr, e), r.addEventListener("pointermove", Xe, e));
|
|
439
439
|
}));
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
|
|
441
|
+
function $e(e, t) {
|
|
442
|
+
Me.forEach((n) => {
|
|
443
443
|
const {
|
|
444
444
|
setResizeHandlerState: r
|
|
445
|
-
} = n, i =
|
|
445
|
+
} = n, i = se.includes(n);
|
|
446
446
|
r(e, i, t);
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
449
|
function pr() {
|
|
450
|
-
const [e, t] =
|
|
450
|
+
const [e, t] = ce(0);
|
|
451
451
|
return O(() => t((n) => n + 1), []);
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function I(e, t) {
|
|
454
454
|
if (!e)
|
|
455
455
|
throw console.error(t), Error(t);
|
|
456
456
|
}
|
|
@@ -460,7 +460,7 @@ function ge(e, t, n = it) {
|
|
|
460
460
|
function le(e, t, n = it) {
|
|
461
461
|
return ge(e, t, n) === 0;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function te(e, t, n) {
|
|
464
464
|
return ge(e, t, n) === 0;
|
|
465
465
|
}
|
|
466
466
|
function mr(e, t, n) {
|
|
@@ -468,7 +468,7 @@ function mr(e, t, n) {
|
|
|
468
468
|
return !1;
|
|
469
469
|
for (let r = 0; r < e.length; r++) {
|
|
470
470
|
const i = e[r], o = t[r];
|
|
471
|
-
if (!
|
|
471
|
+
if (!te(i, o, n))
|
|
472
472
|
return !1;
|
|
473
473
|
}
|
|
474
474
|
return !0;
|
|
@@ -479,7 +479,7 @@ function Se({
|
|
|
479
479
|
size: n
|
|
480
480
|
}) {
|
|
481
481
|
const r = e[t];
|
|
482
|
-
|
|
482
|
+
I(r != null, `Panel constraints not found for index ${t}`);
|
|
483
483
|
let {
|
|
484
484
|
collapsedSize: i = 0,
|
|
485
485
|
collapsible: o,
|
|
@@ -494,7 +494,7 @@ function Se({
|
|
|
494
494
|
n = l;
|
|
495
495
|
return n = Math.min(s, n), n = parseFloat(n.toFixed(it)), n;
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function De({
|
|
498
498
|
delta: e,
|
|
499
499
|
initialLayout: t,
|
|
500
500
|
panelConstraints: n,
|
|
@@ -502,73 +502,73 @@ function Re({
|
|
|
502
502
|
prevLayout: i,
|
|
503
503
|
trigger: o
|
|
504
504
|
}) {
|
|
505
|
-
if (
|
|
505
|
+
if (te(e, 0))
|
|
506
506
|
return t;
|
|
507
507
|
const s = [...t], [l, a] = r;
|
|
508
|
-
|
|
509
|
-
let
|
|
508
|
+
I(l != null, "Invalid first pivot index"), I(a != null, "Invalid second pivot index");
|
|
509
|
+
let d = 0;
|
|
510
510
|
if (o === "keyboard") {
|
|
511
511
|
{
|
|
512
512
|
const u = e < 0 ? a : l, c = n[u];
|
|
513
|
-
|
|
513
|
+
I(c, `Panel constraints not found for index ${u}`);
|
|
514
514
|
const {
|
|
515
|
-
collapsedSize:
|
|
516
|
-
collapsible:
|
|
517
|
-
minSize:
|
|
515
|
+
collapsedSize: m = 0,
|
|
516
|
+
collapsible: p,
|
|
517
|
+
minSize: g = 0
|
|
518
518
|
} = c;
|
|
519
|
-
if (
|
|
520
|
-
const
|
|
521
|
-
if (
|
|
522
|
-
const
|
|
523
|
-
ge(
|
|
519
|
+
if (p) {
|
|
520
|
+
const v = t[u];
|
|
521
|
+
if (I(v != null, `Previous layout not found for panel index ${u}`), te(v, m)) {
|
|
522
|
+
const h = g - v;
|
|
523
|
+
ge(h, Math.abs(e)) > 0 && (e = e < 0 ? 0 - h : h);
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
{
|
|
528
528
|
const u = e < 0 ? l : a, c = n[u];
|
|
529
|
-
|
|
529
|
+
I(c, `No panel constraints found for index ${u}`);
|
|
530
530
|
const {
|
|
531
|
-
collapsedSize:
|
|
532
|
-
collapsible:
|
|
533
|
-
minSize:
|
|
531
|
+
collapsedSize: m = 0,
|
|
532
|
+
collapsible: p,
|
|
533
|
+
minSize: g = 0
|
|
534
534
|
} = c;
|
|
535
|
-
if (
|
|
536
|
-
const
|
|
537
|
-
if (
|
|
538
|
-
const
|
|
539
|
-
ge(
|
|
535
|
+
if (p) {
|
|
536
|
+
const v = t[u];
|
|
537
|
+
if (I(v != null, `Previous layout not found for panel index ${u}`), te(v, g)) {
|
|
538
|
+
const h = v - m;
|
|
539
|
+
ge(h, Math.abs(e)) > 0 && (e = e < 0 ? 0 - h : h);
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
{
|
|
545
545
|
const u = e < 0 ? 1 : -1;
|
|
546
|
-
let c = e < 0 ? a : l,
|
|
546
|
+
let c = e < 0 ? a : l, m = 0;
|
|
547
547
|
for (; ; ) {
|
|
548
|
-
const
|
|
549
|
-
|
|
550
|
-
const
|
|
548
|
+
const g = t[c];
|
|
549
|
+
I(g != null, `Previous layout not found for panel index ${c}`);
|
|
550
|
+
const h = Se({
|
|
551
551
|
panelConstraints: n,
|
|
552
552
|
panelIndex: c,
|
|
553
553
|
size: 100
|
|
554
|
-
}) -
|
|
555
|
-
if (
|
|
554
|
+
}) - g;
|
|
555
|
+
if (m += h, c += u, c < 0 || c >= n.length)
|
|
556
556
|
break;
|
|
557
557
|
}
|
|
558
|
-
const
|
|
559
|
-
e = e < 0 ? 0 -
|
|
558
|
+
const p = Math.min(Math.abs(e), Math.abs(m));
|
|
559
|
+
e = e < 0 ? 0 - p : p;
|
|
560
560
|
}
|
|
561
561
|
{
|
|
562
562
|
let c = e < 0 ? l : a;
|
|
563
563
|
for (; c >= 0 && c < n.length; ) {
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
const
|
|
564
|
+
const m = Math.abs(e) - Math.abs(d), p = t[c];
|
|
565
|
+
I(p != null, `Previous layout not found for panel index ${c}`);
|
|
566
|
+
const g = p - m, v = Se({
|
|
567
567
|
panelConstraints: n,
|
|
568
568
|
panelIndex: c,
|
|
569
|
-
size:
|
|
569
|
+
size: g
|
|
570
570
|
});
|
|
571
|
-
if (!
|
|
571
|
+
if (!te(p, v) && (d += p - v, s[c] = v, d.toPrecision(3).localeCompare(Math.abs(e).toPrecision(3), void 0, {
|
|
572
572
|
numeric: !0
|
|
573
573
|
}) >= 0))
|
|
574
574
|
break;
|
|
@@ -579,30 +579,30 @@ function Re({
|
|
|
579
579
|
return i;
|
|
580
580
|
{
|
|
581
581
|
const u = e < 0 ? a : l, c = t[u];
|
|
582
|
-
|
|
583
|
-
const
|
|
582
|
+
I(c != null, `Previous layout not found for panel index ${u}`);
|
|
583
|
+
const m = c + d, p = Se({
|
|
584
584
|
panelConstraints: n,
|
|
585
585
|
panelIndex: u,
|
|
586
|
-
size:
|
|
586
|
+
size: m
|
|
587
587
|
});
|
|
588
|
-
if (s[u] =
|
|
589
|
-
let
|
|
590
|
-
for (;
|
|
591
|
-
const
|
|
592
|
-
|
|
593
|
-
const x =
|
|
588
|
+
if (s[u] = p, !te(p, m)) {
|
|
589
|
+
let g = m - p, h = e < 0 ? a : l;
|
|
590
|
+
for (; h >= 0 && h < n.length; ) {
|
|
591
|
+
const A = s[h];
|
|
592
|
+
I(A != null, `Previous layout not found for panel index ${h}`);
|
|
593
|
+
const x = A + g, R = Se({
|
|
594
594
|
panelConstraints: n,
|
|
595
|
-
panelIndex:
|
|
595
|
+
panelIndex: h,
|
|
596
596
|
size: x
|
|
597
597
|
});
|
|
598
|
-
if (
|
|
598
|
+
if (te(A, R) || (g -= R - A, s[h] = R), te(g, 0))
|
|
599
599
|
break;
|
|
600
|
-
e > 0 ?
|
|
600
|
+
e > 0 ? h-- : h++;
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
|
-
const
|
|
605
|
-
return
|
|
604
|
+
const f = s.reduce((u, c) => c + u, 0);
|
|
605
|
+
return te(f, 100) ? s : i;
|
|
606
606
|
}
|
|
607
607
|
function gr({
|
|
608
608
|
layout: e,
|
|
@@ -611,27 +611,27 @@ function gr({
|
|
|
611
611
|
}) {
|
|
612
612
|
let r = 0, i = 100, o = 0, s = 0;
|
|
613
613
|
const l = n[0];
|
|
614
|
-
|
|
614
|
+
I(l != null, "No pivot index found"), t.forEach((u, c) => {
|
|
615
615
|
const {
|
|
616
|
-
constraints:
|
|
616
|
+
constraints: m
|
|
617
617
|
} = u, {
|
|
618
|
-
maxSize:
|
|
619
|
-
minSize:
|
|
620
|
-
} =
|
|
621
|
-
c === l ? (r =
|
|
618
|
+
maxSize: p = 100,
|
|
619
|
+
minSize: g = 0
|
|
620
|
+
} = m;
|
|
621
|
+
c === l ? (r = g, i = p) : (o += g, s += p);
|
|
622
622
|
});
|
|
623
|
-
const a = Math.min(i, 100 - o),
|
|
623
|
+
const a = Math.min(i, 100 - o), d = Math.max(r, 100 - s), f = e[l];
|
|
624
624
|
return {
|
|
625
625
|
valueMax: a,
|
|
626
|
-
valueMin:
|
|
627
|
-
valueNow:
|
|
626
|
+
valueMin: d,
|
|
627
|
+
valueNow: f
|
|
628
628
|
};
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
return Array.from(t.querySelectorAll(`[${
|
|
630
|
+
function Le(e, t = document) {
|
|
631
|
+
return Array.from(t.querySelectorAll(`[${B.resizeHandleId}][data-panel-group-id="${e}"]`));
|
|
632
632
|
}
|
|
633
633
|
function qt(e, t, n = document) {
|
|
634
|
-
const i =
|
|
634
|
+
const i = Le(e, n).findIndex((o) => o.getAttribute(B.resizeHandleId) === t);
|
|
635
635
|
return i ?? null;
|
|
636
636
|
}
|
|
637
637
|
function Ot(e, t, n) {
|
|
@@ -645,13 +645,13 @@ function Gt(e, t = document) {
|
|
|
645
645
|
const r = t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);
|
|
646
646
|
return r || null;
|
|
647
647
|
}
|
|
648
|
-
function
|
|
649
|
-
const n = t.querySelector(`[${
|
|
648
|
+
function Oe(e, t = document) {
|
|
649
|
+
const n = t.querySelector(`[${B.resizeHandleId}="${e}"]`);
|
|
650
650
|
return n || null;
|
|
651
651
|
}
|
|
652
652
|
function hr(e, t, n, r = document) {
|
|
653
653
|
var i, o, s, l;
|
|
654
|
-
const a =
|
|
654
|
+
const a = Oe(t, r), d = Le(e, r), f = a ? d.indexOf(a) : -1, u = (i = (o = n[f]) === null || o === void 0 ? void 0 : o.id) !== null && i !== void 0 ? i : null, c = (s = (l = n[f + 1]) === null || l === void 0 ? void 0 : l.id) !== null && s !== void 0 ? s : null;
|
|
655
655
|
return [u, c];
|
|
656
656
|
}
|
|
657
657
|
function yr({
|
|
@@ -663,16 +663,16 @@ function yr({
|
|
|
663
663
|
panelGroupElement: o,
|
|
664
664
|
setLayout: s
|
|
665
665
|
}) {
|
|
666
|
-
|
|
666
|
+
q({
|
|
667
667
|
didWarnAboutMissingResizeHandle: !1
|
|
668
668
|
}), me(() => {
|
|
669
669
|
if (!o)
|
|
670
670
|
return;
|
|
671
|
-
const l =
|
|
671
|
+
const l = Le(n, o);
|
|
672
672
|
for (let a = 0; a < i.length - 1; a++) {
|
|
673
673
|
const {
|
|
674
|
-
valueMax:
|
|
675
|
-
valueMin:
|
|
674
|
+
valueMax: d,
|
|
675
|
+
valueMin: f,
|
|
676
676
|
valueNow: u
|
|
677
677
|
} = gr({
|
|
678
678
|
layout: r,
|
|
@@ -680,65 +680,65 @@ function yr({
|
|
|
680
680
|
pivotIndices: [a, a + 1]
|
|
681
681
|
}), c = l[a];
|
|
682
682
|
if (c != null) {
|
|
683
|
-
const
|
|
684
|
-
|
|
683
|
+
const m = i[a];
|
|
684
|
+
I(m, `No panel data found for index "${a}"`), c.setAttribute("aria-controls", m.id), c.setAttribute("aria-valuemax", "" + Math.round(d)), c.setAttribute("aria-valuemin", "" + Math.round(f)), c.setAttribute("aria-valuenow", u != null ? "" + Math.round(u) : "");
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
687
|
return () => {
|
|
688
|
-
l.forEach((a,
|
|
688
|
+
l.forEach((a, d) => {
|
|
689
689
|
a.removeAttribute("aria-controls"), a.removeAttribute("aria-valuemax"), a.removeAttribute("aria-valuemin"), a.removeAttribute("aria-valuenow");
|
|
690
690
|
});
|
|
691
691
|
};
|
|
692
|
-
}, [n, r, i, o]),
|
|
692
|
+
}, [n, r, i, o]), re(() => {
|
|
693
693
|
if (!o)
|
|
694
694
|
return;
|
|
695
695
|
const l = t.current;
|
|
696
|
-
|
|
696
|
+
I(l, "Eager values not found");
|
|
697
697
|
const {
|
|
698
698
|
panelDataArray: a
|
|
699
|
-
} = l,
|
|
700
|
-
|
|
701
|
-
const
|
|
702
|
-
|
|
703
|
-
const u =
|
|
704
|
-
const
|
|
705
|
-
|
|
706
|
-
const [
|
|
707
|
-
if (
|
|
699
|
+
} = l, d = Gt(n, o);
|
|
700
|
+
I(d != null, `No group found for id "${n}"`);
|
|
701
|
+
const f = Le(n, o);
|
|
702
|
+
I(f, `No resize handles found for group id "${n}"`);
|
|
703
|
+
const u = f.map((c) => {
|
|
704
|
+
const m = c.getAttribute(B.resizeHandleId);
|
|
705
|
+
I(m, "Resize handle element has no handle id attribute");
|
|
706
|
+
const [p, g] = hr(n, m, a, o);
|
|
707
|
+
if (p == null || g == null)
|
|
708
708
|
return () => {
|
|
709
709
|
};
|
|
710
|
-
const
|
|
711
|
-
if (!
|
|
712
|
-
switch (
|
|
710
|
+
const v = (h) => {
|
|
711
|
+
if (!h.defaultPrevented)
|
|
712
|
+
switch (h.key) {
|
|
713
713
|
case "Enter": {
|
|
714
|
-
|
|
715
|
-
const
|
|
716
|
-
if (
|
|
717
|
-
const x = a[
|
|
718
|
-
|
|
719
|
-
const
|
|
720
|
-
collapsedSize:
|
|
721
|
-
collapsible:
|
|
714
|
+
h.preventDefault();
|
|
715
|
+
const A = a.findIndex((x) => x.id === p);
|
|
716
|
+
if (A >= 0) {
|
|
717
|
+
const x = a[A];
|
|
718
|
+
I(x, `No panel data found for index ${A}`);
|
|
719
|
+
const R = r[A], {
|
|
720
|
+
collapsedSize: D = 0,
|
|
721
|
+
collapsible: k,
|
|
722
722
|
minSize: w = 0
|
|
723
723
|
} = x.constraints;
|
|
724
|
-
if (
|
|
725
|
-
const
|
|
726
|
-
delta:
|
|
724
|
+
if (R != null && k) {
|
|
725
|
+
const X = De({
|
|
726
|
+
delta: te(R, D) ? w - D : D - R,
|
|
727
727
|
initialLayout: r,
|
|
728
|
-
panelConstraints: a.map((
|
|
729
|
-
pivotIndices: Ot(n,
|
|
728
|
+
panelConstraints: a.map((Q) => Q.constraints),
|
|
729
|
+
pivotIndices: Ot(n, m, o),
|
|
730
730
|
prevLayout: r,
|
|
731
731
|
trigger: "keyboard"
|
|
732
732
|
});
|
|
733
|
-
r !==
|
|
733
|
+
r !== X && s(X);
|
|
734
734
|
}
|
|
735
735
|
}
|
|
736
736
|
break;
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
739
|
};
|
|
740
|
-
return c.addEventListener("keydown",
|
|
741
|
-
c.removeEventListener("keydown",
|
|
740
|
+
return c.addEventListener("keydown", v), () => {
|
|
741
|
+
c.removeEventListener("keydown", v);
|
|
742
742
|
};
|
|
743
743
|
});
|
|
744
744
|
return () => {
|
|
@@ -758,21 +758,21 @@ function Ut(e, t) {
|
|
|
758
758
|
const n = e === "horizontal", {
|
|
759
759
|
x: r,
|
|
760
760
|
y: i
|
|
761
|
-
} =
|
|
761
|
+
} = Be(t);
|
|
762
762
|
return n ? r : i;
|
|
763
763
|
}
|
|
764
764
|
function vr(e, t, n, r, i) {
|
|
765
|
-
const o = n === "horizontal", s =
|
|
766
|
-
|
|
767
|
-
const l = s.getAttribute(
|
|
768
|
-
|
|
765
|
+
const o = n === "horizontal", s = Oe(t, i);
|
|
766
|
+
I(s, `No resize handle element found for id "${t}"`);
|
|
767
|
+
const l = s.getAttribute(B.groupId);
|
|
768
|
+
I(l, "Resize handle element has no group id attribute");
|
|
769
769
|
let {
|
|
770
770
|
initialCursorPosition: a
|
|
771
771
|
} = r;
|
|
772
|
-
const
|
|
773
|
-
|
|
774
|
-
const u =
|
|
775
|
-
return (
|
|
772
|
+
const d = Ut(n, e), f = Gt(l, i);
|
|
773
|
+
I(f, `No group element found for id "${l}"`);
|
|
774
|
+
const u = f.getBoundingClientRect(), c = o ? u.width : u.height;
|
|
775
|
+
return (d - a) / c * 100;
|
|
776
776
|
}
|
|
777
777
|
function Sr(e, t, n, r, i, o) {
|
|
778
778
|
if (_t(e)) {
|
|
@@ -811,7 +811,7 @@ function br({
|
|
|
811
811
|
let r = 0, i = 100;
|
|
812
812
|
for (let o = 0; o < e.length; o++) {
|
|
813
813
|
const s = n[o];
|
|
814
|
-
|
|
814
|
+
I(s, `Panel constraints not found for index ${o}`);
|
|
815
815
|
const {
|
|
816
816
|
defaultSize: l
|
|
817
817
|
} = s;
|
|
@@ -819,41 +819,41 @@ function br({
|
|
|
819
819
|
}
|
|
820
820
|
for (let o = 0; o < e.length; o++) {
|
|
821
821
|
const s = n[o];
|
|
822
|
-
|
|
822
|
+
I(s, `Panel constraints not found for index ${o}`);
|
|
823
823
|
const {
|
|
824
824
|
defaultSize: l
|
|
825
825
|
} = s;
|
|
826
826
|
if (l != null)
|
|
827
827
|
continue;
|
|
828
|
-
const a = e.length - r,
|
|
829
|
-
r++, t[o] =
|
|
828
|
+
const a = e.length - r, d = i / a;
|
|
829
|
+
r++, t[o] = d, i -= d;
|
|
830
830
|
}
|
|
831
831
|
return t;
|
|
832
832
|
}
|
|
833
833
|
function ye(e, t, n) {
|
|
834
834
|
t.forEach((r, i) => {
|
|
835
835
|
const o = e[i];
|
|
836
|
-
|
|
836
|
+
I(o, `Panel data not found for index ${i}`);
|
|
837
837
|
const {
|
|
838
838
|
callbacks: s,
|
|
839
839
|
constraints: l,
|
|
840
840
|
id: a
|
|
841
841
|
} = o, {
|
|
842
|
-
collapsedSize:
|
|
843
|
-
collapsible:
|
|
842
|
+
collapsedSize: d = 0,
|
|
843
|
+
collapsible: f
|
|
844
844
|
} = l, u = n[a];
|
|
845
845
|
if (u == null || r !== u) {
|
|
846
846
|
n[a] = r;
|
|
847
847
|
const {
|
|
848
848
|
onCollapse: c,
|
|
849
|
-
onExpand:
|
|
850
|
-
onResize:
|
|
849
|
+
onExpand: m,
|
|
850
|
+
onResize: p
|
|
851
851
|
} = s;
|
|
852
|
-
|
|
852
|
+
p && p(r, u), f && (c || m) && (m && (u == null || le(u, d)) && !le(r, d) && m(), c && (u == null || !le(u, d)) && le(r, d) && c());
|
|
853
853
|
}
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function ke(e, t) {
|
|
857
857
|
if (e.length !== t.length)
|
|
858
858
|
return !1;
|
|
859
859
|
for (let n = 0; n < e.length; n++)
|
|
@@ -906,7 +906,7 @@ function vt(e) {
|
|
|
906
906
|
function Wt(e) {
|
|
907
907
|
return `react-resizable-panels:${e}`;
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function Xt(e) {
|
|
910
910
|
return e.map((t) => {
|
|
911
911
|
const {
|
|
912
912
|
constraints: n,
|
|
@@ -917,7 +917,7 @@ function Yt(e) {
|
|
|
917
917
|
return i ? r : o ? `${o}:${JSON.stringify(n)}` : JSON.stringify(n);
|
|
918
918
|
}).sort((t, n) => t.localeCompare(n)).join(",");
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function Yt(e, t) {
|
|
921
921
|
try {
|
|
922
922
|
const n = Wt(e), r = t.getItem(n);
|
|
923
923
|
if (r) {
|
|
@@ -931,20 +931,20 @@ function Xt(e, t) {
|
|
|
931
931
|
}
|
|
932
932
|
function Pr(e, t, n) {
|
|
933
933
|
var r, i;
|
|
934
|
-
const o = (r =
|
|
934
|
+
const o = (r = Yt(e, n)) !== null && r !== void 0 ? r : {}, s = Xt(t);
|
|
935
935
|
return (i = o[s]) !== null && i !== void 0 ? i : null;
|
|
936
936
|
}
|
|
937
937
|
function wr(e, t, n, r, i) {
|
|
938
938
|
var o;
|
|
939
|
-
const s = Wt(e), l =
|
|
939
|
+
const s = Wt(e), l = Xt(t), a = (o = Yt(e, i)) !== null && o !== void 0 ? o : {};
|
|
940
940
|
a[l] = {
|
|
941
941
|
expandToSizes: Object.fromEntries(n.entries()),
|
|
942
942
|
layout: r
|
|
943
943
|
};
|
|
944
944
|
try {
|
|
945
945
|
i.setItem(s, JSON.stringify(a));
|
|
946
|
-
} catch (
|
|
947
|
-
console.error(
|
|
946
|
+
} catch (d) {
|
|
947
|
+
console.error(d);
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
950
|
function St({
|
|
@@ -954,17 +954,17 @@ function St({
|
|
|
954
954
|
const n = [...e], r = n.reduce((o, s) => o + s, 0);
|
|
955
955
|
if (n.length !== t.length)
|
|
956
956
|
throw Error(`Invalid ${t.length} panel layout: ${n.map((o) => `${o}%`).join(", ")}`);
|
|
957
|
-
if (!
|
|
957
|
+
if (!te(r, 100) && n.length > 0)
|
|
958
958
|
for (let o = 0; o < t.length; o++) {
|
|
959
959
|
const s = n[o];
|
|
960
|
-
|
|
960
|
+
I(s != null, `No layout data found for index ${o}`);
|
|
961
961
|
const l = 100 / r * s;
|
|
962
962
|
n[o] = l;
|
|
963
963
|
}
|
|
964
964
|
let i = 0;
|
|
965
965
|
for (let o = 0; o < t.length; o++) {
|
|
966
966
|
const s = n[o];
|
|
967
|
-
|
|
967
|
+
I(s != null, `No layout data found for index ${o}`);
|
|
968
968
|
const l = Se({
|
|
969
969
|
panelConstraints: t,
|
|
970
970
|
panelIndex: o,
|
|
@@ -972,24 +972,24 @@ function St({
|
|
|
972
972
|
});
|
|
973
973
|
s != l && (i += s - l, n[o] = l);
|
|
974
974
|
}
|
|
975
|
-
if (!
|
|
975
|
+
if (!te(i, 0))
|
|
976
976
|
for (let o = 0; o < t.length; o++) {
|
|
977
977
|
const s = n[o];
|
|
978
|
-
|
|
978
|
+
I(s != null, `No layout data found for index ${o}`);
|
|
979
979
|
const l = s + i, a = Se({
|
|
980
980
|
panelConstraints: t,
|
|
981
981
|
panelIndex: o,
|
|
982
982
|
size: l
|
|
983
983
|
});
|
|
984
|
-
if (s !== a && (i -= a - s, n[o] = a,
|
|
984
|
+
if (s !== a && (i -= a - s, n[o] = a, te(i, 0)))
|
|
985
985
|
break;
|
|
986
986
|
}
|
|
987
987
|
return n;
|
|
988
988
|
}
|
|
989
|
-
const Cr = 100,
|
|
990
|
-
getItem: (e) => (vt(
|
|
989
|
+
const Cr = 100, Ae = {
|
|
990
|
+
getItem: (e) => (vt(Ae), Ae.getItem(e)),
|
|
991
991
|
setItem: (e, t) => {
|
|
992
|
-
vt(
|
|
992
|
+
vt(Ae), Ae.setItem(e, t);
|
|
993
993
|
}
|
|
994
994
|
}, bt = {};
|
|
995
995
|
function jt({
|
|
@@ -1001,340 +1001,340 @@ function jt({
|
|
|
1001
1001
|
id: o = null,
|
|
1002
1002
|
onLayout: s = null,
|
|
1003
1003
|
keyboardResizeBy: l = null,
|
|
1004
|
-
storage: a =
|
|
1005
|
-
style:
|
|
1006
|
-
tagName:
|
|
1004
|
+
storage: a = Ae,
|
|
1005
|
+
style: d,
|
|
1006
|
+
tagName: f = "div",
|
|
1007
1007
|
...u
|
|
1008
1008
|
}) {
|
|
1009
|
-
const c = st(o),
|
|
1009
|
+
const c = st(o), m = q(null), [p, g] = ce(null), [v, h] = ce([]), A = pr(), x = q({}), R = q(/* @__PURE__ */ new Map()), D = q(0), k = q({
|
|
1010
1010
|
autoSaveId: e,
|
|
1011
1011
|
direction: r,
|
|
1012
|
-
dragState:
|
|
1012
|
+
dragState: p,
|
|
1013
1013
|
id: c,
|
|
1014
1014
|
keyboardResizeBy: l,
|
|
1015
1015
|
onLayout: s,
|
|
1016
1016
|
storage: a
|
|
1017
|
-
}), w =
|
|
1018
|
-
layout:
|
|
1017
|
+
}), w = q({
|
|
1018
|
+
layout: v,
|
|
1019
1019
|
panelDataArray: [],
|
|
1020
1020
|
panelDataArrayChanged: !1
|
|
1021
1021
|
});
|
|
1022
|
-
|
|
1022
|
+
q({
|
|
1023
1023
|
didLogIdAndOrderWarning: !1,
|
|
1024
1024
|
didLogPanelConstraintsWarning: !1,
|
|
1025
1025
|
prevPanelIds: []
|
|
1026
1026
|
}), zt(i, () => ({
|
|
1027
|
-
getId: () =>
|
|
1027
|
+
getId: () => k.current.id,
|
|
1028
1028
|
getLayout: () => {
|
|
1029
1029
|
const {
|
|
1030
|
-
layout:
|
|
1030
|
+
layout: S
|
|
1031
1031
|
} = w.current;
|
|
1032
|
-
return
|
|
1032
|
+
return S;
|
|
1033
1033
|
},
|
|
1034
|
-
setLayout: (
|
|
1034
|
+
setLayout: (S) => {
|
|
1035
1035
|
const {
|
|
1036
|
-
onLayout:
|
|
1037
|
-
} =
|
|
1038
|
-
layout:
|
|
1039
|
-
panelDataArray:
|
|
1040
|
-
} = w.current,
|
|
1041
|
-
layout:
|
|
1042
|
-
panelConstraints:
|
|
1036
|
+
onLayout: P
|
|
1037
|
+
} = k.current, {
|
|
1038
|
+
layout: E,
|
|
1039
|
+
panelDataArray: z
|
|
1040
|
+
} = w.current, b = St({
|
|
1041
|
+
layout: S,
|
|
1042
|
+
panelConstraints: z.map((C) => C.constraints)
|
|
1043
1043
|
});
|
|
1044
|
-
yt(
|
|
1044
|
+
yt(E, b) || (h(b), w.current.layout = b, P && P(b), ye(z, b, x.current));
|
|
1045
1045
|
}
|
|
1046
1046
|
}), []), me(() => {
|
|
1047
|
-
|
|
1047
|
+
k.current.autoSaveId = e, k.current.direction = r, k.current.dragState = p, k.current.id = c, k.current.onLayout = s, k.current.storage = a;
|
|
1048
1048
|
}), yr({
|
|
1049
|
-
committedValuesRef:
|
|
1049
|
+
committedValuesRef: k,
|
|
1050
1050
|
eagerValuesRef: w,
|
|
1051
1051
|
groupId: c,
|
|
1052
|
-
layout:
|
|
1052
|
+
layout: v,
|
|
1053
1053
|
panelDataArray: w.current.panelDataArray,
|
|
1054
|
-
setLayout:
|
|
1055
|
-
panelGroupElement:
|
|
1056
|
-
}),
|
|
1054
|
+
setLayout: h,
|
|
1055
|
+
panelGroupElement: m.current
|
|
1056
|
+
}), re(() => {
|
|
1057
1057
|
const {
|
|
1058
|
-
panelDataArray:
|
|
1058
|
+
panelDataArray: S
|
|
1059
1059
|
} = w.current;
|
|
1060
1060
|
if (e) {
|
|
1061
|
-
if (
|
|
1061
|
+
if (v.length === 0 || v.length !== S.length)
|
|
1062
1062
|
return;
|
|
1063
|
-
let
|
|
1064
|
-
|
|
1065
|
-
const
|
|
1066
|
-
|
|
1063
|
+
let P = bt[e];
|
|
1064
|
+
P == null && (P = zr(wr, Cr), bt[e] = P);
|
|
1065
|
+
const E = [...S], z = new Map(R.current);
|
|
1066
|
+
P(e, E, z, v, a);
|
|
1067
1067
|
}
|
|
1068
|
-
}, [e,
|
|
1068
|
+
}, [e, v, a]), re(() => {
|
|
1069
1069
|
});
|
|
1070
|
-
const
|
|
1070
|
+
const X = O((S) => {
|
|
1071
1071
|
const {
|
|
1072
|
-
onLayout:
|
|
1073
|
-
} =
|
|
1074
|
-
layout:
|
|
1075
|
-
panelDataArray:
|
|
1072
|
+
onLayout: P
|
|
1073
|
+
} = k.current, {
|
|
1074
|
+
layout: E,
|
|
1075
|
+
panelDataArray: z
|
|
1076
1076
|
} = w.current;
|
|
1077
|
-
if (
|
|
1078
|
-
const
|
|
1079
|
-
collapsedSize:
|
|
1080
|
-
panelSize:
|
|
1081
|
-
pivotIndices:
|
|
1082
|
-
} = de(
|
|
1083
|
-
if (
|
|
1084
|
-
|
|
1085
|
-
const
|
|
1086
|
-
delta:
|
|
1087
|
-
initialLayout:
|
|
1088
|
-
panelConstraints:
|
|
1089
|
-
pivotIndices:
|
|
1090
|
-
prevLayout:
|
|
1077
|
+
if (S.constraints.collapsible) {
|
|
1078
|
+
const b = z.map((j) => j.constraints), {
|
|
1079
|
+
collapsedSize: C = 0,
|
|
1080
|
+
panelSize: y,
|
|
1081
|
+
pivotIndices: N
|
|
1082
|
+
} = de(z, S, E);
|
|
1083
|
+
if (I(y != null, `Panel size not found for panel "${S.id}"`), !le(y, C)) {
|
|
1084
|
+
R.current.set(S.id, y);
|
|
1085
|
+
const J = ve(z, S) === z.length - 1 ? y - C : C - y, K = De({
|
|
1086
|
+
delta: J,
|
|
1087
|
+
initialLayout: E,
|
|
1088
|
+
panelConstraints: b,
|
|
1089
|
+
pivotIndices: N,
|
|
1090
|
+
prevLayout: E,
|
|
1091
1091
|
trigger: "imperative-api"
|
|
1092
1092
|
});
|
|
1093
|
-
|
|
1093
|
+
ke(E, K) || (h(K), w.current.layout = K, P && P(K), ye(z, K, x.current));
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
|
-
}, []),
|
|
1096
|
+
}, []), Q = O((S, P) => {
|
|
1097
1097
|
const {
|
|
1098
|
-
onLayout:
|
|
1099
|
-
} =
|
|
1100
|
-
layout:
|
|
1101
|
-
panelDataArray:
|
|
1098
|
+
onLayout: E
|
|
1099
|
+
} = k.current, {
|
|
1100
|
+
layout: z,
|
|
1101
|
+
panelDataArray: b
|
|
1102
1102
|
} = w.current;
|
|
1103
|
-
if (
|
|
1104
|
-
const
|
|
1105
|
-
collapsedSize:
|
|
1106
|
-
panelSize:
|
|
1107
|
-
minSize:
|
|
1108
|
-
pivotIndices:
|
|
1109
|
-
} = de(
|
|
1110
|
-
if (le(
|
|
1111
|
-
const
|
|
1112
|
-
delta:
|
|
1113
|
-
initialLayout:
|
|
1114
|
-
panelConstraints:
|
|
1115
|
-
pivotIndices:
|
|
1116
|
-
prevLayout:
|
|
1103
|
+
if (S.constraints.collapsible) {
|
|
1104
|
+
const C = b.map((oe) => oe.constraints), {
|
|
1105
|
+
collapsedSize: y = 0,
|
|
1106
|
+
panelSize: N = 0,
|
|
1107
|
+
minSize: j = 0,
|
|
1108
|
+
pivotIndices: J
|
|
1109
|
+
} = de(b, S, z), K = P ?? j;
|
|
1110
|
+
if (le(N, y)) {
|
|
1111
|
+
const oe = R.current.get(S.id), Ee = oe != null && oe >= K ? oe : K, Ue = ve(b, S) === b.length - 1 ? N - Ee : Ee - N, Z = De({
|
|
1112
|
+
delta: Ue,
|
|
1113
|
+
initialLayout: z,
|
|
1114
|
+
panelConstraints: C,
|
|
1115
|
+
pivotIndices: J,
|
|
1116
|
+
prevLayout: z,
|
|
1117
1117
|
trigger: "imperative-api"
|
|
1118
1118
|
});
|
|
1119
|
-
|
|
1119
|
+
ke(z, Z) || (h(Z), w.current.layout = Z, E && E(Z), ye(b, Z, x.current));
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
|
-
}, []),
|
|
1122
|
+
}, []), $ = O((S) => {
|
|
1123
1123
|
const {
|
|
1124
|
-
layout:
|
|
1125
|
-
panelDataArray:
|
|
1124
|
+
layout: P,
|
|
1125
|
+
panelDataArray: E
|
|
1126
1126
|
} = w.current, {
|
|
1127
|
-
panelSize:
|
|
1128
|
-
} = de(
|
|
1129
|
-
return
|
|
1130
|
-
}, []),
|
|
1127
|
+
panelSize: z
|
|
1128
|
+
} = de(E, S, P);
|
|
1129
|
+
return I(z != null, `Panel size not found for panel "${S.id}"`), z;
|
|
1130
|
+
}, []), _ = O((S, P) => {
|
|
1131
1131
|
const {
|
|
1132
|
-
panelDataArray:
|
|
1133
|
-
} = w.current,
|
|
1132
|
+
panelDataArray: E
|
|
1133
|
+
} = w.current, z = ve(E, S);
|
|
1134
1134
|
return xr({
|
|
1135
|
-
defaultSize:
|
|
1136
|
-
dragState:
|
|
1137
|
-
layout:
|
|
1138
|
-
panelData:
|
|
1139
|
-
panelIndex:
|
|
1135
|
+
defaultSize: P,
|
|
1136
|
+
dragState: p,
|
|
1137
|
+
layout: v,
|
|
1138
|
+
panelData: E,
|
|
1139
|
+
panelIndex: z
|
|
1140
1140
|
});
|
|
1141
|
-
}, [
|
|
1141
|
+
}, [p, v]), M = O((S) => {
|
|
1142
1142
|
const {
|
|
1143
|
-
layout:
|
|
1144
|
-
panelDataArray:
|
|
1143
|
+
layout: P,
|
|
1144
|
+
panelDataArray: E
|
|
1145
1145
|
} = w.current, {
|
|
1146
|
-
collapsedSize:
|
|
1147
|
-
collapsible:
|
|
1148
|
-
panelSize:
|
|
1149
|
-
} = de(
|
|
1150
|
-
return
|
|
1151
|
-
}, []),
|
|
1146
|
+
collapsedSize: z = 0,
|
|
1147
|
+
collapsible: b,
|
|
1148
|
+
panelSize: C
|
|
1149
|
+
} = de(E, S, P);
|
|
1150
|
+
return I(C != null, `Panel size not found for panel "${S.id}"`), b === !0 && le(C, z);
|
|
1151
|
+
}, []), U = O((S) => {
|
|
1152
1152
|
const {
|
|
1153
|
-
layout:
|
|
1154
|
-
panelDataArray:
|
|
1153
|
+
layout: P,
|
|
1154
|
+
panelDataArray: E
|
|
1155
1155
|
} = w.current, {
|
|
1156
|
-
collapsedSize:
|
|
1157
|
-
collapsible:
|
|
1158
|
-
panelSize:
|
|
1159
|
-
} = de(
|
|
1160
|
-
return
|
|
1161
|
-
}, []),
|
|
1156
|
+
collapsedSize: z = 0,
|
|
1157
|
+
collapsible: b,
|
|
1158
|
+
panelSize: C
|
|
1159
|
+
} = de(E, S, P);
|
|
1160
|
+
return I(C != null, `Panel size not found for panel "${S.id}"`), !b || ge(C, z) > 0;
|
|
1161
|
+
}, []), F = O((S) => {
|
|
1162
1162
|
const {
|
|
1163
|
-
panelDataArray:
|
|
1163
|
+
panelDataArray: P
|
|
1164
1164
|
} = w.current;
|
|
1165
|
-
|
|
1166
|
-
const
|
|
1167
|
-
return
|
|
1168
|
-
}), w.current.panelDataArrayChanged = !0,
|
|
1169
|
-
}, [
|
|
1165
|
+
P.push(S), P.sort((E, z) => {
|
|
1166
|
+
const b = E.order, C = z.order;
|
|
1167
|
+
return b == null && C == null ? 0 : b == null ? -1 : C == null ? 1 : b - C;
|
|
1168
|
+
}), w.current.panelDataArrayChanged = !0, A();
|
|
1169
|
+
}, [A]);
|
|
1170
1170
|
me(() => {
|
|
1171
1171
|
if (w.current.panelDataArrayChanged) {
|
|
1172
1172
|
w.current.panelDataArrayChanged = !1;
|
|
1173
1173
|
const {
|
|
1174
|
-
autoSaveId:
|
|
1175
|
-
onLayout:
|
|
1176
|
-
storage:
|
|
1177
|
-
} =
|
|
1178
|
-
layout:
|
|
1179
|
-
panelDataArray:
|
|
1174
|
+
autoSaveId: S,
|
|
1175
|
+
onLayout: P,
|
|
1176
|
+
storage: E
|
|
1177
|
+
} = k.current, {
|
|
1178
|
+
layout: z,
|
|
1179
|
+
panelDataArray: b
|
|
1180
1180
|
} = w.current;
|
|
1181
|
-
let
|
|
1182
|
-
if (
|
|
1183
|
-
const
|
|
1184
|
-
|
|
1181
|
+
let C = null;
|
|
1182
|
+
if (S) {
|
|
1183
|
+
const N = Pr(S, b, E);
|
|
1184
|
+
N && (R.current = new Map(Object.entries(N.expandToSizes)), C = N.layout);
|
|
1185
1185
|
}
|
|
1186
|
-
|
|
1187
|
-
panelDataArray:
|
|
1186
|
+
C == null && (C = br({
|
|
1187
|
+
panelDataArray: b
|
|
1188
1188
|
}));
|
|
1189
|
-
const
|
|
1190
|
-
layout:
|
|
1191
|
-
panelConstraints:
|
|
1189
|
+
const y = St({
|
|
1190
|
+
layout: C,
|
|
1191
|
+
panelConstraints: b.map((N) => N.constraints)
|
|
1192
1192
|
});
|
|
1193
|
-
yt(
|
|
1193
|
+
yt(z, y) || (h(y), w.current.layout = y, P && P(y), ye(b, y, x.current));
|
|
1194
1194
|
}
|
|
1195
1195
|
}), me(() => {
|
|
1196
|
-
const
|
|
1196
|
+
const S = w.current;
|
|
1197
1197
|
return () => {
|
|
1198
|
-
|
|
1198
|
+
S.layout = [];
|
|
1199
1199
|
};
|
|
1200
1200
|
}, []);
|
|
1201
|
-
const
|
|
1202
|
-
let
|
|
1203
|
-
const
|
|
1204
|
-
return
|
|
1205
|
-
|
|
1206
|
-
const
|
|
1207
|
-
if (!
|
|
1201
|
+
const H = O((S) => {
|
|
1202
|
+
let P = !1;
|
|
1203
|
+
const E = m.current;
|
|
1204
|
+
return E && window.getComputedStyle(E, null).getPropertyValue("direction") === "rtl" && (P = !0), function(b) {
|
|
1205
|
+
b.preventDefault();
|
|
1206
|
+
const C = m.current;
|
|
1207
|
+
if (!C)
|
|
1208
1208
|
return () => null;
|
|
1209
1209
|
const {
|
|
1210
|
-
direction:
|
|
1211
|
-
dragState:
|
|
1212
|
-
id:
|
|
1213
|
-
keyboardResizeBy:
|
|
1214
|
-
onLayout:
|
|
1215
|
-
} =
|
|
1216
|
-
layout:
|
|
1210
|
+
direction: y,
|
|
1211
|
+
dragState: N,
|
|
1212
|
+
id: j,
|
|
1213
|
+
keyboardResizeBy: J,
|
|
1214
|
+
onLayout: K
|
|
1215
|
+
} = k.current, {
|
|
1216
|
+
layout: oe,
|
|
1217
1217
|
panelDataArray: Ee
|
|
1218
1218
|
} = w.current, {
|
|
1219
|
-
initialLayout:
|
|
1220
|
-
} =
|
|
1221
|
-
let
|
|
1222
|
-
const ut =
|
|
1223
|
-
ut &&
|
|
1224
|
-
const bn = Ee.map((xn) => xn.constraints), Ie =
|
|
1225
|
-
delta:
|
|
1226
|
-
initialLayout:
|
|
1219
|
+
initialLayout: _e
|
|
1220
|
+
} = N ?? {}, Ue = Ot(j, S, C);
|
|
1221
|
+
let Z = Sr(b, S, y, N, J, C);
|
|
1222
|
+
const ut = y === "horizontal";
|
|
1223
|
+
ut && P && (Z = -Z);
|
|
1224
|
+
const bn = Ee.map((xn) => xn.constraints), Ie = De({
|
|
1225
|
+
delta: Z,
|
|
1226
|
+
initialLayout: _e ?? oe,
|
|
1227
1227
|
panelConstraints: bn,
|
|
1228
|
-
pivotIndices:
|
|
1229
|
-
prevLayout:
|
|
1230
|
-
trigger: _t(
|
|
1231
|
-
}), dt = !
|
|
1232
|
-
(kt(
|
|
1228
|
+
pivotIndices: Ue,
|
|
1229
|
+
prevLayout: oe,
|
|
1230
|
+
trigger: _t(b) ? "keyboard" : "mouse-or-touch"
|
|
1231
|
+
}), dt = !ke(oe, Ie);
|
|
1232
|
+
(kt(b) || Tt(b)) && D.current != Z && (D.current = Z, !dt && Z !== 0 ? ut ? je(S, Z < 0 ? Vt : $t) : je(S, Z < 0 ? Ft : Kt) : je(S, 0)), dt && (h(Ie), w.current.layout = Ie, K && K(Ie), ye(Ee, Ie, x.current));
|
|
1233
1233
|
};
|
|
1234
|
-
}, []),
|
|
1234
|
+
}, []), V = O((S, P) => {
|
|
1235
1235
|
const {
|
|
1236
|
-
onLayout:
|
|
1237
|
-
} =
|
|
1238
|
-
layout:
|
|
1239
|
-
panelDataArray:
|
|
1240
|
-
} = w.current,
|
|
1241
|
-
panelSize:
|
|
1242
|
-
pivotIndices:
|
|
1243
|
-
} = de(
|
|
1244
|
-
|
|
1245
|
-
const
|
|
1246
|
-
delta:
|
|
1247
|
-
initialLayout:
|
|
1248
|
-
panelConstraints:
|
|
1249
|
-
pivotIndices:
|
|
1250
|
-
prevLayout:
|
|
1236
|
+
onLayout: E
|
|
1237
|
+
} = k.current, {
|
|
1238
|
+
layout: z,
|
|
1239
|
+
panelDataArray: b
|
|
1240
|
+
} = w.current, C = b.map((oe) => oe.constraints), {
|
|
1241
|
+
panelSize: y,
|
|
1242
|
+
pivotIndices: N
|
|
1243
|
+
} = de(b, S, z);
|
|
1244
|
+
I(y != null, `Panel size not found for panel "${S.id}"`);
|
|
1245
|
+
const J = ve(b, S) === b.length - 1 ? y - P : P - y, K = De({
|
|
1246
|
+
delta: J,
|
|
1247
|
+
initialLayout: z,
|
|
1248
|
+
panelConstraints: C,
|
|
1249
|
+
pivotIndices: N,
|
|
1250
|
+
prevLayout: z,
|
|
1251
1251
|
trigger: "imperative-api"
|
|
1252
1252
|
});
|
|
1253
|
-
|
|
1254
|
-
}, []),
|
|
1253
|
+
ke(z, K) || (h(K), w.current.layout = K, E && E(K), ye(b, K, x.current));
|
|
1254
|
+
}, []), Y = O((S, P) => {
|
|
1255
1255
|
const {
|
|
1256
|
-
layout:
|
|
1257
|
-
panelDataArray:
|
|
1256
|
+
layout: E,
|
|
1257
|
+
panelDataArray: z
|
|
1258
1258
|
} = w.current, {
|
|
1259
|
-
collapsedSize:
|
|
1260
|
-
collapsible:
|
|
1261
|
-
} =
|
|
1262
|
-
collapsedSize:
|
|
1263
|
-
collapsible:
|
|
1264
|
-
maxSize:
|
|
1265
|
-
minSize:
|
|
1266
|
-
} =
|
|
1267
|
-
panelSize:
|
|
1268
|
-
} = de(
|
|
1269
|
-
|
|
1270
|
-
}, [
|
|
1259
|
+
collapsedSize: b = 0,
|
|
1260
|
+
collapsible: C
|
|
1261
|
+
} = P, {
|
|
1262
|
+
collapsedSize: y = 0,
|
|
1263
|
+
collapsible: N,
|
|
1264
|
+
maxSize: j = 100,
|
|
1265
|
+
minSize: J = 0
|
|
1266
|
+
} = S.constraints, {
|
|
1267
|
+
panelSize: K
|
|
1268
|
+
} = de(z, S, E);
|
|
1269
|
+
K != null && (C && N && le(K, b) ? le(b, y) || V(S, y) : K < J ? V(S, J) : K > j && V(S, j));
|
|
1270
|
+
}, [V]), W = O((S, P) => {
|
|
1271
1271
|
const {
|
|
1272
|
-
direction:
|
|
1273
|
-
} =
|
|
1274
|
-
layout:
|
|
1272
|
+
direction: E
|
|
1273
|
+
} = k.current, {
|
|
1274
|
+
layout: z
|
|
1275
1275
|
} = w.current;
|
|
1276
|
-
if (!
|
|
1276
|
+
if (!m.current)
|
|
1277
1277
|
return;
|
|
1278
|
-
const
|
|
1279
|
-
|
|
1280
|
-
const
|
|
1281
|
-
|
|
1282
|
-
dragHandleId:
|
|
1283
|
-
dragHandleRect:
|
|
1284
|
-
initialCursorPosition:
|
|
1285
|
-
initialLayout:
|
|
1278
|
+
const b = Oe(S, m.current);
|
|
1279
|
+
I(b, `Drag handle element not found for id "${S}"`);
|
|
1280
|
+
const C = Ut(E, P);
|
|
1281
|
+
g({
|
|
1282
|
+
dragHandleId: S,
|
|
1283
|
+
dragHandleRect: b.getBoundingClientRect(),
|
|
1284
|
+
initialCursorPosition: C,
|
|
1285
|
+
initialLayout: z
|
|
1286
1286
|
});
|
|
1287
|
-
}, []),
|
|
1288
|
-
|
|
1289
|
-
}, []), he = O((
|
|
1287
|
+
}, []), ee = O(() => {
|
|
1288
|
+
g(null);
|
|
1289
|
+
}, []), he = O((S) => {
|
|
1290
1290
|
const {
|
|
1291
|
-
panelDataArray:
|
|
1292
|
-
} = w.current,
|
|
1293
|
-
|
|
1294
|
-
}, [
|
|
1295
|
-
collapsePanel:
|
|
1291
|
+
panelDataArray: P
|
|
1292
|
+
} = w.current, E = ve(P, S);
|
|
1293
|
+
E >= 0 && (P.splice(E, 1), delete x.current[S.id], w.current.panelDataArrayChanged = !0, A());
|
|
1294
|
+
}, [A]), ne = G(() => ({
|
|
1295
|
+
collapsePanel: X,
|
|
1296
1296
|
direction: r,
|
|
1297
|
-
dragState:
|
|
1298
|
-
expandPanel:
|
|
1299
|
-
getPanelSize:
|
|
1300
|
-
getPanelStyle:
|
|
1297
|
+
dragState: p,
|
|
1298
|
+
expandPanel: Q,
|
|
1299
|
+
getPanelSize: $,
|
|
1300
|
+
getPanelStyle: _,
|
|
1301
1301
|
groupId: c,
|
|
1302
|
-
isPanelCollapsed:
|
|
1303
|
-
isPanelExpanded:
|
|
1304
|
-
reevaluatePanelConstraints:
|
|
1305
|
-
registerPanel:
|
|
1306
|
-
registerResizeHandle:
|
|
1307
|
-
resizePanel:
|
|
1308
|
-
startDragging:
|
|
1309
|
-
stopDragging:
|
|
1302
|
+
isPanelCollapsed: M,
|
|
1303
|
+
isPanelExpanded: U,
|
|
1304
|
+
reevaluatePanelConstraints: Y,
|
|
1305
|
+
registerPanel: F,
|
|
1306
|
+
registerResizeHandle: H,
|
|
1307
|
+
resizePanel: V,
|
|
1308
|
+
startDragging: W,
|
|
1309
|
+
stopDragging: ee,
|
|
1310
1310
|
unregisterPanel: he,
|
|
1311
|
-
panelGroupElement:
|
|
1312
|
-
}), [
|
|
1311
|
+
panelGroupElement: m.current
|
|
1312
|
+
}), [X, p, r, Q, $, _, c, M, U, Y, F, H, V, W, ee, he]), ue = {
|
|
1313
1313
|
display: "flex",
|
|
1314
1314
|
flexDirection: r === "horizontal" ? "row" : "column",
|
|
1315
1315
|
height: "100%",
|
|
1316
1316
|
overflow: "hidden",
|
|
1317
1317
|
width: "100%"
|
|
1318
1318
|
};
|
|
1319
|
-
return xe(
|
|
1320
|
-
value:
|
|
1321
|
-
}, xe(
|
|
1319
|
+
return xe(Ke.Provider, {
|
|
1320
|
+
value: ne
|
|
1321
|
+
}, xe(f, {
|
|
1322
1322
|
...u,
|
|
1323
1323
|
children: t,
|
|
1324
1324
|
className: n,
|
|
1325
1325
|
id: o,
|
|
1326
|
-
ref:
|
|
1326
|
+
ref: m,
|
|
1327
1327
|
style: {
|
|
1328
|
-
...
|
|
1329
|
-
...
|
|
1328
|
+
...ue,
|
|
1329
|
+
...d
|
|
1330
1330
|
},
|
|
1331
1331
|
// CSS selectors
|
|
1332
|
-
[
|
|
1333
|
-
[
|
|
1334
|
-
[
|
|
1332
|
+
[B.group]: "",
|
|
1333
|
+
[B.groupDirection]: r,
|
|
1334
|
+
[B.groupId]: c
|
|
1335
1335
|
}));
|
|
1336
1336
|
}
|
|
1337
|
-
const Er =
|
|
1337
|
+
const Er = Fe((e, t) => xe(jt, {
|
|
1338
1338
|
...e,
|
|
1339
1339
|
forwardedRef: t
|
|
1340
1340
|
}));
|
|
@@ -1357,10 +1357,10 @@ function Ir({
|
|
|
1357
1357
|
resizeHandler: n,
|
|
1358
1358
|
panelGroupElement: r
|
|
1359
1359
|
}) {
|
|
1360
|
-
|
|
1360
|
+
re(() => {
|
|
1361
1361
|
if (e || n == null || r == null)
|
|
1362
1362
|
return;
|
|
1363
|
-
const i =
|
|
1363
|
+
const i = Oe(t, r);
|
|
1364
1364
|
if (i == null)
|
|
1365
1365
|
return;
|
|
1366
1366
|
const o = (s) => {
|
|
@@ -1377,12 +1377,12 @@ function Ir({
|
|
|
1377
1377
|
}
|
|
1378
1378
|
case "F6": {
|
|
1379
1379
|
s.preventDefault();
|
|
1380
|
-
const l = i.getAttribute(
|
|
1381
|
-
|
|
1382
|
-
const a =
|
|
1383
|
-
|
|
1384
|
-
const
|
|
1385
|
-
a[
|
|
1380
|
+
const l = i.getAttribute(B.groupId);
|
|
1381
|
+
I(l, `No group element found for id "${l}"`);
|
|
1382
|
+
const a = Le(l, r), d = qt(l, t, r);
|
|
1383
|
+
I(d !== null, `No resize element found for id "${t}"`);
|
|
1384
|
+
const f = s.shiftKey ? d > 0 ? d - 1 : a.length - 1 : d + 1 < a.length ? d + 1 : 0;
|
|
1385
|
+
a[f].focus();
|
|
1386
1386
|
break;
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
@@ -1402,107 +1402,107 @@ function Rr({
|
|
|
1402
1402
|
onClick: s,
|
|
1403
1403
|
onDragging: l,
|
|
1404
1404
|
onFocus: a,
|
|
1405
|
-
onPointerDown:
|
|
1406
|
-
onPointerUp:
|
|
1405
|
+
onPointerDown: d,
|
|
1406
|
+
onPointerUp: f,
|
|
1407
1407
|
style: u = {},
|
|
1408
1408
|
tabIndex: c = 0,
|
|
1409
|
-
tagName:
|
|
1410
|
-
...
|
|
1409
|
+
tagName: m = "div",
|
|
1410
|
+
...p
|
|
1411
1411
|
}) {
|
|
1412
|
-
var
|
|
1413
|
-
const
|
|
1412
|
+
var g, v;
|
|
1413
|
+
const h = q(null), A = q({
|
|
1414
1414
|
onClick: s,
|
|
1415
1415
|
onDragging: l,
|
|
1416
|
-
onPointerDown:
|
|
1417
|
-
onPointerUp:
|
|
1416
|
+
onPointerDown: d,
|
|
1417
|
+
onPointerUp: f
|
|
1418
1418
|
});
|
|
1419
|
-
|
|
1420
|
-
|
|
1419
|
+
re(() => {
|
|
1420
|
+
A.current.onClick = s, A.current.onDragging = l, A.current.onPointerDown = d, A.current.onPointerUp = f;
|
|
1421
1421
|
});
|
|
1422
|
-
const x = rt(
|
|
1422
|
+
const x = rt(Ke);
|
|
1423
1423
|
if (x === null)
|
|
1424
1424
|
throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");
|
|
1425
1425
|
const {
|
|
1426
|
-
direction:
|
|
1427
|
-
groupId:
|
|
1428
|
-
registerResizeHandle:
|
|
1426
|
+
direction: R,
|
|
1427
|
+
groupId: D,
|
|
1428
|
+
registerResizeHandle: k,
|
|
1429
1429
|
startDragging: w,
|
|
1430
|
-
stopDragging:
|
|
1431
|
-
panelGroupElement:
|
|
1432
|
-
} = x,
|
|
1433
|
-
state:
|
|
1430
|
+
stopDragging: X,
|
|
1431
|
+
panelGroupElement: Q
|
|
1432
|
+
} = x, $ = st(i), [_, M] = ce("inactive"), [U, F] = ce(!1), [H, V] = ce(null), Y = q({
|
|
1433
|
+
state: _
|
|
1434
1434
|
});
|
|
1435
1435
|
me(() => {
|
|
1436
|
-
|
|
1437
|
-
}),
|
|
1436
|
+
Y.current.state = _;
|
|
1437
|
+
}), re(() => {
|
|
1438
1438
|
if (n)
|
|
1439
|
-
|
|
1439
|
+
V(null);
|
|
1440
1440
|
else {
|
|
1441
|
-
const
|
|
1442
|
-
|
|
1441
|
+
const ne = k($);
|
|
1442
|
+
V(() => ne);
|
|
1443
1443
|
}
|
|
1444
|
-
}, [n,
|
|
1445
|
-
const
|
|
1446
|
-
return
|
|
1447
|
-
if (n ||
|
|
1444
|
+
}, [n, $, k]);
|
|
1445
|
+
const W = (g = r == null ? void 0 : r.coarse) !== null && g !== void 0 ? g : 15, ee = (v = r == null ? void 0 : r.fine) !== null && v !== void 0 ? v : 5;
|
|
1446
|
+
return re(() => {
|
|
1447
|
+
if (n || H == null)
|
|
1448
1448
|
return;
|
|
1449
|
-
const
|
|
1450
|
-
|
|
1451
|
-
let
|
|
1452
|
-
return dr(
|
|
1453
|
-
coarse:
|
|
1454
|
-
fine:
|
|
1455
|
-
}, (
|
|
1456
|
-
if (!
|
|
1457
|
-
|
|
1449
|
+
const ne = h.current;
|
|
1450
|
+
I(ne, "Element ref not attached");
|
|
1451
|
+
let ue = !1;
|
|
1452
|
+
return dr($, ne, R, {
|
|
1453
|
+
coarse: W,
|
|
1454
|
+
fine: ee
|
|
1455
|
+
}, (P, E, z) => {
|
|
1456
|
+
if (!E) {
|
|
1457
|
+
M("inactive");
|
|
1458
1458
|
return;
|
|
1459
1459
|
}
|
|
1460
|
-
switch (
|
|
1460
|
+
switch (P) {
|
|
1461
1461
|
case "down": {
|
|
1462
|
-
|
|
1462
|
+
M("drag"), ue = !1, I(z, 'Expected event to be defined for "down" action'), w($, z);
|
|
1463
1463
|
const {
|
|
1464
|
-
onDragging:
|
|
1465
|
-
onPointerDown:
|
|
1466
|
-
} =
|
|
1467
|
-
|
|
1464
|
+
onDragging: b,
|
|
1465
|
+
onPointerDown: C
|
|
1466
|
+
} = A.current;
|
|
1467
|
+
b == null || b(!0), C == null || C();
|
|
1468
1468
|
break;
|
|
1469
1469
|
}
|
|
1470
1470
|
case "move": {
|
|
1471
1471
|
const {
|
|
1472
|
-
state:
|
|
1473
|
-
} =
|
|
1474
|
-
|
|
1472
|
+
state: b
|
|
1473
|
+
} = Y.current;
|
|
1474
|
+
ue = !0, b !== "drag" && M("hover"), I(z, 'Expected event to be defined for "move" action'), H(z);
|
|
1475
1475
|
break;
|
|
1476
1476
|
}
|
|
1477
1477
|
case "up": {
|
|
1478
|
-
|
|
1478
|
+
M("hover"), X();
|
|
1479
1479
|
const {
|
|
1480
|
-
onClick:
|
|
1481
|
-
onDragging:
|
|
1482
|
-
onPointerUp:
|
|
1483
|
-
} =
|
|
1484
|
-
|
|
1480
|
+
onClick: b,
|
|
1481
|
+
onDragging: C,
|
|
1482
|
+
onPointerUp: y
|
|
1483
|
+
} = A.current;
|
|
1484
|
+
C == null || C(!1), y == null || y(), ue || b == null || b();
|
|
1485
1485
|
break;
|
|
1486
1486
|
}
|
|
1487
1487
|
}
|
|
1488
1488
|
});
|
|
1489
|
-
}, [
|
|
1489
|
+
}, [W, R, n, ee, k, $, H, w, X]), Ir({
|
|
1490
1490
|
disabled: n,
|
|
1491
|
-
handleId:
|
|
1492
|
-
resizeHandler:
|
|
1493
|
-
panelGroupElement:
|
|
1494
|
-
}), xe(
|
|
1495
|
-
...
|
|
1491
|
+
handleId: $,
|
|
1492
|
+
resizeHandler: H,
|
|
1493
|
+
panelGroupElement: Q
|
|
1494
|
+
}), xe(m, {
|
|
1495
|
+
...p,
|
|
1496
1496
|
children: e,
|
|
1497
1497
|
className: t,
|
|
1498
1498
|
id: i,
|
|
1499
1499
|
onBlur: () => {
|
|
1500
|
-
|
|
1500
|
+
F(!1), o == null || o();
|
|
1501
1501
|
},
|
|
1502
1502
|
onFocus: () => {
|
|
1503
|
-
|
|
1503
|
+
F(!0), a == null || a();
|
|
1504
1504
|
},
|
|
1505
|
-
ref:
|
|
1505
|
+
ref: h,
|
|
1506
1506
|
role: "separator",
|
|
1507
1507
|
style: {
|
|
1508
1508
|
...{
|
|
@@ -1513,48 +1513,48 @@ function Rr({
|
|
|
1513
1513
|
},
|
|
1514
1514
|
tabIndex: c,
|
|
1515
1515
|
// CSS selectors
|
|
1516
|
-
[
|
|
1517
|
-
[
|
|
1518
|
-
[
|
|
1519
|
-
[
|
|
1520
|
-
[
|
|
1521
|
-
[
|
|
1522
|
-
[
|
|
1516
|
+
[B.groupDirection]: R,
|
|
1517
|
+
[B.groupId]: D,
|
|
1518
|
+
[B.resizeHandle]: "",
|
|
1519
|
+
[B.resizeHandleActive]: _ === "drag" ? "pointer" : U ? "keyboard" : void 0,
|
|
1520
|
+
[B.resizeHandleEnabled]: !n,
|
|
1521
|
+
[B.resizeHandleId]: $,
|
|
1522
|
+
[B.resizeHandleState]: _
|
|
1523
1523
|
});
|
|
1524
1524
|
}
|
|
1525
1525
|
Rr.displayName = "PanelResizeHandle";
|
|
1526
1526
|
function Qt() {
|
|
1527
|
-
var a,
|
|
1528
|
-
const e =
|
|
1529
|
-
() =>
|
|
1527
|
+
var a, d;
|
|
1528
|
+
const e = ie((f) => f.card), t = ie((f) => f.frame), n = G(
|
|
1529
|
+
() => Yn(t, e),
|
|
1530
1530
|
[t, e]
|
|
1531
1531
|
), { manifest: r } = Pt(
|
|
1532
1532
|
((a = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : a.url) || ""
|
|
1533
|
-
), i =
|
|
1533
|
+
), i = G(
|
|
1534
1534
|
() => {
|
|
1535
|
-
var
|
|
1536
|
-
return (
|
|
1535
|
+
var f;
|
|
1536
|
+
return (f = r == null ? void 0 : r.visuals) == null ? void 0 : f.find(
|
|
1537
1537
|
(u) => {
|
|
1538
1538
|
var c;
|
|
1539
1539
|
return u.name === ((c = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : c.componentName);
|
|
1540
1540
|
}
|
|
1541
1541
|
);
|
|
1542
1542
|
},
|
|
1543
|
-
[r, (
|
|
1544
|
-
), o = Nt(n, i), s =
|
|
1543
|
+
[r, (d = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : d.componentName]
|
|
1544
|
+
), o = Nt(n, i), s = G(
|
|
1545
1545
|
() => Mt({
|
|
1546
1546
|
frame: t,
|
|
1547
1547
|
configCard: n,
|
|
1548
1548
|
isMultiInputVisual: o === "multiple"
|
|
1549
1549
|
}),
|
|
1550
1550
|
[t, n, o]
|
|
1551
|
-
), l =
|
|
1552
|
-
const
|
|
1551
|
+
), l = G(() => {
|
|
1552
|
+
const f = s.findIndex(
|
|
1553
1553
|
(u) => (u == null ? void 0 : u.id) === e.id
|
|
1554
1554
|
);
|
|
1555
|
-
return
|
|
1555
|
+
return f < 0 ? -1 : Je(e, f);
|
|
1556
1556
|
}, [s, e]);
|
|
1557
|
-
return
|
|
1557
|
+
return G(() => !n || o !== "multiple" || l < 0 ? e.type : Te(
|
|
1558
1558
|
e,
|
|
1559
1559
|
l,
|
|
1560
1560
|
i == null ? void 0 : i.slots
|
|
@@ -1566,74 +1566,74 @@ function Jt({
|
|
|
1566
1566
|
onStoreUpdate: n,
|
|
1567
1567
|
delay: r = 300
|
|
1568
1568
|
}) {
|
|
1569
|
-
const [i, o] =
|
|
1570
|
-
s.current && (clearTimeout(s.current), s.current = null),
|
|
1569
|
+
const [i, o] = ce(e ?? t), s = q(null), l = q(i), a = q(e), d = q(!1), f = O(() => {
|
|
1570
|
+
s.current && (clearTimeout(s.current), s.current = null), d.current && l.current !== (a.current ?? t) && (n(l.current), a.current = l.current);
|
|
1571
1571
|
}, [t, n]);
|
|
1572
|
-
|
|
1572
|
+
re(() => {
|
|
1573
1573
|
if (e !== a.current) {
|
|
1574
1574
|
s.current && (clearTimeout(s.current), s.current = null);
|
|
1575
1575
|
const c = e ?? t;
|
|
1576
|
-
o(c), l.current = c, a.current = e,
|
|
1576
|
+
o(c), l.current = c, a.current = e, d.current = !1;
|
|
1577
1577
|
}
|
|
1578
|
-
}, [e, t]),
|
|
1579
|
-
if (
|
|
1578
|
+
}, [e, t]), re(() => {
|
|
1579
|
+
if (d.current)
|
|
1580
1580
|
return s.current = setTimeout(() => {
|
|
1581
|
-
|
|
1581
|
+
f();
|
|
1582
1582
|
}, r), () => {
|
|
1583
1583
|
s.current && (clearTimeout(s.current), s.current = null);
|
|
1584
1584
|
};
|
|
1585
|
-
}, [r,
|
|
1585
|
+
}, [r, f, i]), re(() => () => {
|
|
1586
1586
|
s.current && clearTimeout(s.current);
|
|
1587
1587
|
}, []);
|
|
1588
1588
|
const u = O(
|
|
1589
1589
|
(c) => {
|
|
1590
|
-
const
|
|
1591
|
-
|
|
1590
|
+
const m = c ?? t;
|
|
1591
|
+
d.current = !0, l.current = m, o(m);
|
|
1592
1592
|
},
|
|
1593
1593
|
[t]
|
|
1594
1594
|
);
|
|
1595
|
-
return { value: i, onChange: u, flush:
|
|
1595
|
+
return { value: i, onChange: u, flush: f };
|
|
1596
1596
|
}
|
|
1597
1597
|
function Zt({
|
|
1598
1598
|
queryClient: e,
|
|
1599
1599
|
readQueryKey: t,
|
|
1600
1600
|
setRunSql: n
|
|
1601
1601
|
}) {
|
|
1602
|
-
|
|
1602
|
+
Un(), setTimeout(() => {
|
|
1603
1603
|
e.resetQueries({ queryKey: t(), exact: !0 }), n(!0);
|
|
1604
1604
|
}, 0);
|
|
1605
1605
|
}
|
|
1606
1606
|
const Dr = 300;
|
|
1607
1607
|
function Ar({ className: e }, t) {
|
|
1608
|
-
const n =
|
|
1609
|
-
c.current =
|
|
1610
|
-
const
|
|
1611
|
-
|
|
1612
|
-
const
|
|
1608
|
+
const n = ie((x) => x.card.sql), r = ie((x) => x.sqlGen), i = ie((x) => x.card), o = Qt(), { setCardSql: s, setSqlGen: l, setRunSql: a } = wt(), d = G(() => o !== i.type ? { ...i, type: o } : i, [i, o]), { queryKey: f } = ot(d), u = Ct(), c = q(f);
|
|
1609
|
+
c.current = f;
|
|
1610
|
+
const m = q(r);
|
|
1611
|
+
m.current = r;
|
|
1612
|
+
const p = O(
|
|
1613
1613
|
(x) => {
|
|
1614
1614
|
s(x);
|
|
1615
1615
|
},
|
|
1616
1616
|
[s]
|
|
1617
1617
|
), {
|
|
1618
|
-
value:
|
|
1619
|
-
onChange:
|
|
1620
|
-
flush:
|
|
1618
|
+
value: g,
|
|
1619
|
+
onChange: v,
|
|
1620
|
+
flush: h
|
|
1621
1621
|
} = Jt({
|
|
1622
1622
|
storeValue: n,
|
|
1623
1623
|
defaultValue: "",
|
|
1624
|
-
onStoreUpdate:
|
|
1624
|
+
onStoreUpdate: p,
|
|
1625
1625
|
delay: Dr
|
|
1626
1626
|
});
|
|
1627
|
-
|
|
1628
|
-
function
|
|
1629
|
-
|
|
1627
|
+
re(() => At(h), [h]);
|
|
1628
|
+
function A(x) {
|
|
1629
|
+
v(x), Wn(m.current) || l({});
|
|
1630
1630
|
}
|
|
1631
|
-
return /* @__PURE__ */
|
|
1631
|
+
return /* @__PURE__ */ L("div", { className: "relative h-full w-full", children: /* @__PURE__ */ L(
|
|
1632
1632
|
Et,
|
|
1633
1633
|
{
|
|
1634
1634
|
ref: t,
|
|
1635
|
-
value:
|
|
1636
|
-
onValueChange:
|
|
1635
|
+
value: g ?? "",
|
|
1636
|
+
onValueChange: A,
|
|
1637
1637
|
language: "sql-jinja",
|
|
1638
1638
|
embedded: !0,
|
|
1639
1639
|
hideLineNumbers: !0,
|
|
@@ -1650,19 +1650,19 @@ function Ar({ className: e }, t) {
|
|
|
1650
1650
|
}
|
|
1651
1651
|
) });
|
|
1652
1652
|
}
|
|
1653
|
-
const Co =
|
|
1653
|
+
const Co = Fe(Ar), Nr = 300, Mr = `# 'data' holds the SQL result.
|
|
1654
1654
|
# Set 'result' to a list of dicts to replace it, for example:
|
|
1655
1655
|
# import pandas as pd
|
|
1656
1656
|
# result = pd.DataFrame(data).to_dict('records')`;
|
|
1657
1657
|
function Lr({ className: e }, t) {
|
|
1658
|
-
const n =
|
|
1659
|
-
|
|
1660
|
-
const { value: u, onChange: c, flush:
|
|
1658
|
+
const n = ie((p) => p.card.python), r = ie((p) => p.card), i = Qt(), { setCardPython: o, setRunSql: s } = wt(), l = G(() => i !== r.type ? { ...r, type: i } : r, [r, i]), { queryKey: a } = ot(l), d = Ct(), f = q(a);
|
|
1659
|
+
f.current = a;
|
|
1660
|
+
const { value: u, onChange: c, flush: m } = Jt({
|
|
1661
1661
|
storeValue: n,
|
|
1662
1662
|
onStoreUpdate: o,
|
|
1663
1663
|
delay: Nr
|
|
1664
1664
|
});
|
|
1665
|
-
return
|
|
1665
|
+
return re(() => At(m), [m]), /* @__PURE__ */ L(
|
|
1666
1666
|
Et,
|
|
1667
1667
|
{
|
|
1668
1668
|
ref: t,
|
|
@@ -1678,52 +1678,52 @@ function Lr({ className: e }, t) {
|
|
|
1678
1678
|
"[&_.code-editor-pre]:!pt-2 [&_.code-editor-textarea]:!pt-2",
|
|
1679
1679
|
e
|
|
1680
1680
|
),
|
|
1681
|
-
onKeyDown: (
|
|
1682
|
-
|
|
1683
|
-
queryClient:
|
|
1684
|
-
readQueryKey: () =>
|
|
1681
|
+
onKeyDown: (p) => {
|
|
1682
|
+
p.key === "Enter" && p.shiftKey && (p.preventDefault(), Zt({
|
|
1683
|
+
queryClient: d,
|
|
1684
|
+
readQueryKey: () => f.current,
|
|
1685
1685
|
setRunSql: s
|
|
1686
1686
|
}));
|
|
1687
1687
|
}
|
|
1688
1688
|
}
|
|
1689
1689
|
);
|
|
1690
1690
|
}
|
|
1691
|
-
const Eo =
|
|
1691
|
+
const Eo = Fe(Lr);
|
|
1692
1692
|
function _r({ card: e }) {
|
|
1693
|
-
var
|
|
1694
|
-
const t = Rn(), [n, r] =
|
|
1693
|
+
var P, E, z, b, C;
|
|
1694
|
+
const t = Rn(), [n, r] = ce({}), { authToken: i } = Dn(), o = Xn(i == null ? void 0 : i.accessToken), { compiledAppearance: s } = Jn(), l = G(
|
|
1695
1695
|
() => An(s),
|
|
1696
1696
|
[s]
|
|
1697
|
-
), a =
|
|
1698
|
-
(
|
|
1699
|
-
),
|
|
1700
|
-
(
|
|
1701
|
-
), u =
|
|
1702
|
-
(
|
|
1703
|
-
), c = e, { getCard:
|
|
1704
|
-
((
|
|
1705
|
-
),
|
|
1706
|
-
(
|
|
1707
|
-
var
|
|
1708
|
-
return
|
|
1697
|
+
), a = ie((y) => y.frame), d = ie(
|
|
1698
|
+
(y) => y.inlineFilterValuesMap[e.id]
|
|
1699
|
+
), f = ie(
|
|
1700
|
+
(y) => y.actions.setCardInlineFilterValue
|
|
1701
|
+
), u = ie(
|
|
1702
|
+
(y) => y.actions.removeCardInlineFilterValue
|
|
1703
|
+
), c = e, { getCard: m, manifest: p } = Pt(
|
|
1704
|
+
((P = c.customCardPreferences) == null ? void 0 : P.url) || ""
|
|
1705
|
+
), g = (E = p == null ? void 0 : p.visuals) == null ? void 0 : E.find(
|
|
1706
|
+
(y) => {
|
|
1707
|
+
var N;
|
|
1708
|
+
return y.name === ((N = c.customCardPreferences) == null ? void 0 : N.componentName);
|
|
1709
1709
|
}
|
|
1710
|
-
),
|
|
1710
|
+
), v = Nt(c, g) ?? "single", h = G(
|
|
1711
1711
|
() => Mt({
|
|
1712
1712
|
frame: a,
|
|
1713
1713
|
configCard: c,
|
|
1714
|
-
isMultiInputVisual:
|
|
1714
|
+
isMultiInputVisual: v === "multiple"
|
|
1715
1715
|
}),
|
|
1716
|
-
[a, c,
|
|
1717
|
-
),
|
|
1718
|
-
const
|
|
1719
|
-
(
|
|
1716
|
+
[a, c, v]
|
|
1717
|
+
), A = G(() => {
|
|
1718
|
+
const y = h.findIndex(
|
|
1719
|
+
(N) => (N == null ? void 0 : N.id) === e.id
|
|
1720
1720
|
);
|
|
1721
|
-
return
|
|
1722
|
-
}, [
|
|
1721
|
+
return y < 0 ? -1 : Je(e, y);
|
|
1722
|
+
}, [h, e]), x = G(() => v !== "multiple" || A < 0 ? e.type : Te(
|
|
1723
1723
|
e,
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
) ?? e.type, [
|
|
1724
|
+
A,
|
|
1725
|
+
g == null ? void 0 : g.slots
|
|
1726
|
+
) ?? e.type, [v, A, e, g == null ? void 0 : g.slots]), R = G(() => v === "multiple" ? {
|
|
1727
1727
|
...e,
|
|
1728
1728
|
connectionId: void 0,
|
|
1729
1729
|
dataSource: void 0,
|
|
@@ -1731,153 +1731,172 @@ function _r({ card: e }) {
|
|
|
1731
1731
|
python: "",
|
|
1732
1732
|
config: void 0,
|
|
1733
1733
|
queryConfig: void 0
|
|
1734
|
-
} : x !== e.type ? { ...e, type: x } : e, [e, x,
|
|
1734
|
+
} : x !== e.type ? { ...e, type: x } : e, [e, x, v]), { data: D, effectiveCardConfig: k } = ot(R), w = Nn(), X = Re((y) => y.dashboard), Q = Re(
|
|
1735
|
+
(y) => y.dashboardInputValues
|
|
1736
|
+
), $ = Re(
|
|
1737
|
+
(y) => y.adHocFilterValues
|
|
1738
|
+
), _ = Re(
|
|
1739
|
+
(y) => {
|
|
1740
|
+
var N;
|
|
1741
|
+
return ((N = y.reportContext) == null ? void 0 : N.calendar) ?? null;
|
|
1742
|
+
}
|
|
1743
|
+
), M = Re((y) => y.selectedSheetId), U = G(
|
|
1735
1744
|
() => Mn({
|
|
1736
1745
|
card: e,
|
|
1737
|
-
sheetId:
|
|
1738
|
-
inlineFilterValues:
|
|
1739
|
-
setInlineFilterValue: (
|
|
1740
|
-
removeInlineFilterValue: (
|
|
1746
|
+
sheetId: M || "",
|
|
1747
|
+
inlineFilterValues: d,
|
|
1748
|
+
setInlineFilterValue: (y) => f(e.id, y),
|
|
1749
|
+
removeInlineFilterValue: (y) => u(e.id, y)
|
|
1741
1750
|
}),
|
|
1742
1751
|
[
|
|
1743
1752
|
e,
|
|
1744
|
-
|
|
1753
|
+
M,
|
|
1754
|
+
d,
|
|
1745
1755
|
f,
|
|
1746
|
-
p,
|
|
1747
1756
|
u
|
|
1748
1757
|
]
|
|
1749
|
-
), {
|
|
1750
|
-
|
|
1758
|
+
), {
|
|
1759
|
+
filterInputs: F,
|
|
1760
|
+
filters: H,
|
|
1761
|
+
filterValues: V
|
|
1762
|
+
} = G(
|
|
1763
|
+
() => Ln({
|
|
1764
|
+
dashboard: X,
|
|
1751
1765
|
card: e,
|
|
1766
|
+
sheetId: M,
|
|
1767
|
+
dashboardInputValues: Q,
|
|
1768
|
+
adHocFilterValues: $,
|
|
1752
1769
|
transientContexts: w,
|
|
1753
|
-
|
|
1754
|
-
filterValues: j,
|
|
1755
|
-
selectedSheetId: V
|
|
1770
|
+
calendar: _
|
|
1756
1771
|
}),
|
|
1757
1772
|
[
|
|
1773
|
+
$,
|
|
1758
1774
|
e,
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1775
|
+
Q,
|
|
1776
|
+
_,
|
|
1777
|
+
X,
|
|
1778
|
+
M,
|
|
1779
|
+
w
|
|
1763
1780
|
]
|
|
1764
|
-
),
|
|
1765
|
-
(
|
|
1766
|
-
const
|
|
1767
|
-
r((
|
|
1768
|
-
...
|
|
1769
|
-
[
|
|
1781
|
+
), Y = O(
|
|
1782
|
+
(y, N) => {
|
|
1783
|
+
const j = jn(N);
|
|
1784
|
+
r((J) => ({
|
|
1785
|
+
...J,
|
|
1786
|
+
[y]: j
|
|
1770
1787
|
}));
|
|
1771
1788
|
},
|
|
1772
1789
|
[]
|
|
1773
|
-
),
|
|
1774
|
-
(
|
|
1790
|
+
), W = (z = c.customCardPreferences) == null ? void 0 : z.componentName, ee = W ? m(W) : null, he = _n(
|
|
1791
|
+
(b = c.customCardPreferences) == null ? void 0 : b.settings,
|
|
1775
1792
|
c
|
|
1776
|
-
),
|
|
1777
|
-
() => Qn(
|
|
1778
|
-
[
|
|
1779
|
-
),
|
|
1780
|
-
() =>
|
|
1781
|
-
(
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1793
|
+
), ne = G(
|
|
1794
|
+
() => Qn(h),
|
|
1795
|
+
[h]
|
|
1796
|
+
), ue = G(
|
|
1797
|
+
() => ne.map(
|
|
1798
|
+
(y, N) => Te(
|
|
1799
|
+
y,
|
|
1800
|
+
N,
|
|
1801
|
+
g == null ? void 0 : g.slots
|
|
1785
1802
|
)
|
|
1786
1803
|
),
|
|
1787
|
-
[
|
|
1788
|
-
),
|
|
1789
|
-
() =>
|
|
1790
|
-
|
|
1791
|
-
slotOrderedCards:
|
|
1804
|
+
[ne, g == null ? void 0 : g.slots]
|
|
1805
|
+
), S = G(
|
|
1806
|
+
() => kn(
|
|
1807
|
+
v === "multiple" ? Tn({
|
|
1808
|
+
slotOrderedCards: ne,
|
|
1792
1809
|
multiInputData: n,
|
|
1793
1810
|
valueFormatPreferences: t
|
|
1794
1811
|
}) : [
|
|
1795
1812
|
{
|
|
1796
1813
|
card: e,
|
|
1797
|
-
cardConfig:
|
|
1798
|
-
columns:
|
|
1799
|
-
columnKeyMap:
|
|
1814
|
+
cardConfig: k,
|
|
1815
|
+
columns: D == null ? void 0 : D.columns,
|
|
1816
|
+
columnKeyMap: D == null ? void 0 : D.columnKeyMap,
|
|
1800
1817
|
valueFormatPreferences: t
|
|
1801
1818
|
}
|
|
1802
1819
|
]
|
|
1803
1820
|
),
|
|
1804
1821
|
[
|
|
1805
1822
|
e,
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1823
|
+
D == null ? void 0 : D.columnKeyMap,
|
|
1824
|
+
D == null ? void 0 : D.columns,
|
|
1825
|
+
k,
|
|
1809
1826
|
n,
|
|
1810
|
-
|
|
1811
|
-
|
|
1827
|
+
ne,
|
|
1828
|
+
v,
|
|
1812
1829
|
t
|
|
1813
1830
|
]
|
|
1814
1831
|
);
|
|
1815
|
-
return
|
|
1832
|
+
return W ? /* @__PURE__ */ L("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ Ne(
|
|
1816
1833
|
Cn,
|
|
1817
1834
|
{
|
|
1818
|
-
fallback: /* @__PURE__ */
|
|
1835
|
+
fallback: /* @__PURE__ */ L(ft, {}),
|
|
1819
1836
|
children: [
|
|
1820
|
-
|
|
1821
|
-
|
|
1837
|
+
ee && v === "single" && /* @__PURE__ */ L(
|
|
1838
|
+
ee,
|
|
1822
1839
|
{
|
|
1823
1840
|
editing: !0,
|
|
1824
1841
|
params: o,
|
|
1825
1842
|
theme: l,
|
|
1826
|
-
settings:
|
|
1827
|
-
cardMetadata:
|
|
1843
|
+
settings: he,
|
|
1844
|
+
cardMetadata: Hn({
|
|
1828
1845
|
card: e,
|
|
1829
|
-
dataMetadata:
|
|
1846
|
+
dataMetadata: D == null ? void 0 : D.metadata
|
|
1830
1847
|
}),
|
|
1831
|
-
onDataChange:
|
|
1832
|
-
data: (
|
|
1833
|
-
columns: (
|
|
1834
|
-
formatTemporalBucketValue:
|
|
1835
|
-
|
|
1848
|
+
onDataChange: Y,
|
|
1849
|
+
data: (D == null ? void 0 : D.records) || [],
|
|
1850
|
+
columns: (D == null ? void 0 : D.columns) || [],
|
|
1851
|
+
formatTemporalBucketValue: S,
|
|
1852
|
+
filterInputs: F,
|
|
1853
|
+
filters: H,
|
|
1836
1854
|
filterValues: [
|
|
1837
|
-
...
|
|
1838
|
-
...
|
|
1855
|
+
...V || [],
|
|
1856
|
+
...d || []
|
|
1839
1857
|
],
|
|
1840
|
-
inlineFilters:
|
|
1858
|
+
inlineFilters: U
|
|
1841
1859
|
}
|
|
1842
1860
|
),
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
if (!
|
|
1846
|
-
const
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1861
|
+
ee && v === "multiple" && /* @__PURE__ */ Ne(ft, { children: [
|
|
1862
|
+
h.map((y, N) => {
|
|
1863
|
+
if (!y) return null;
|
|
1864
|
+
const j = Je(y, N), J = Te(
|
|
1865
|
+
y,
|
|
1866
|
+
j,
|
|
1867
|
+
g == null ? void 0 : g.slots
|
|
1850
1868
|
);
|
|
1851
|
-
return /* @__PURE__ */
|
|
1852
|
-
|
|
1869
|
+
return /* @__PURE__ */ L(
|
|
1870
|
+
Vn,
|
|
1853
1871
|
{
|
|
1854
|
-
onDataChange:
|
|
1855
|
-
card:
|
|
1856
|
-
effectiveCardType:
|
|
1872
|
+
onDataChange: Y,
|
|
1873
|
+
card: y,
|
|
1874
|
+
effectiveCardType: J
|
|
1857
1875
|
},
|
|
1858
|
-
`${
|
|
1876
|
+
`${y.id}-${j}`
|
|
1859
1877
|
);
|
|
1860
1878
|
}),
|
|
1861
|
-
/* @__PURE__ */
|
|
1862
|
-
|
|
1879
|
+
/* @__PURE__ */ L("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ L(
|
|
1880
|
+
ee,
|
|
1863
1881
|
{
|
|
1864
1882
|
editing: !0,
|
|
1865
|
-
onDataChange:
|
|
1866
|
-
|
|
1883
|
+
onDataChange: Y,
|
|
1884
|
+
...$n({
|
|
1867
1885
|
configCard: c,
|
|
1868
|
-
slotOrderedCards:
|
|
1869
|
-
slotTypes:
|
|
1886
|
+
slotOrderedCards: ne,
|
|
1887
|
+
slotTypes: ue,
|
|
1870
1888
|
multiInputData: n,
|
|
1871
1889
|
params: o,
|
|
1872
1890
|
theme: l,
|
|
1873
|
-
chartSettings:
|
|
1874
|
-
|
|
1891
|
+
chartSettings: he,
|
|
1892
|
+
filterInputs: F,
|
|
1893
|
+
filters: H,
|
|
1875
1894
|
filterValues: [
|
|
1876
|
-
...
|
|
1877
|
-
...
|
|
1895
|
+
...V || [],
|
|
1896
|
+
...d || []
|
|
1878
1897
|
],
|
|
1879
|
-
inlineFilters:
|
|
1880
|
-
formatTemporalBucketValue:
|
|
1898
|
+
inlineFilters: U,
|
|
1899
|
+
formatTemporalBucketValue: S
|
|
1881
1900
|
})
|
|
1882
1901
|
}
|
|
1883
1902
|
) })
|
|
@@ -1888,14 +1907,14 @@ function _r({ card: e }) {
|
|
|
1888
1907
|
) }) : null;
|
|
1889
1908
|
}
|
|
1890
1909
|
const Io = wn(_r);
|
|
1891
|
-
var en = "Toggle", tn =
|
|
1910
|
+
var en = "Toggle", tn = T.forwardRef((e, t) => {
|
|
1892
1911
|
const { pressed: n, defaultPressed: r, onPressedChange: i, ...o } = e, [s, l] = It({
|
|
1893
1912
|
prop: n,
|
|
1894
1913
|
onChange: i,
|
|
1895
1914
|
defaultProp: r ?? !1,
|
|
1896
1915
|
caller: en
|
|
1897
1916
|
});
|
|
1898
|
-
return /* @__PURE__ */
|
|
1917
|
+
return /* @__PURE__ */ L(
|
|
1899
1918
|
ze.button,
|
|
1900
1919
|
{
|
|
1901
1920
|
type: "button",
|
|
@@ -1931,7 +1950,7 @@ const kr = Rt(
|
|
|
1931
1950
|
size: "default"
|
|
1932
1951
|
}
|
|
1933
1952
|
}
|
|
1934
|
-
), Tr =
|
|
1953
|
+
), Tr = T.forwardRef(({ className: e, variant: t, size: n, ...r }, i) => /* @__PURE__ */ L(
|
|
1935
1954
|
nn,
|
|
1936
1955
|
{
|
|
1937
1956
|
ref: i,
|
|
@@ -1953,7 +1972,7 @@ const Hr = Rt(
|
|
|
1953
1972
|
variant: "default"
|
|
1954
1973
|
}
|
|
1955
1974
|
}
|
|
1956
|
-
), Vr =
|
|
1975
|
+
), Vr = T.forwardRef(({ className: e, variant: t, ...n }, r) => /* @__PURE__ */ L(
|
|
1957
1976
|
"div",
|
|
1958
1977
|
{
|
|
1959
1978
|
ref: r,
|
|
@@ -1963,7 +1982,7 @@ const Hr = Rt(
|
|
|
1963
1982
|
}
|
|
1964
1983
|
));
|
|
1965
1984
|
Vr.displayName = "Alert";
|
|
1966
|
-
const $r =
|
|
1985
|
+
const $r = T.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ L(
|
|
1967
1986
|
"h5",
|
|
1968
1987
|
{
|
|
1969
1988
|
ref: n,
|
|
@@ -1972,7 +1991,7 @@ const $r = k.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ A(
|
|
|
1972
1991
|
}
|
|
1973
1992
|
));
|
|
1974
1993
|
$r.displayName = "AlertTitle";
|
|
1975
|
-
const Fr =
|
|
1994
|
+
const Fr = T.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ L(
|
|
1976
1995
|
"div",
|
|
1977
1996
|
{
|
|
1978
1997
|
ref: n,
|
|
@@ -1986,9 +2005,9 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
1986
2005
|
"from-right": ["Home", "PageDown", "ArrowDown", "ArrowRight"],
|
|
1987
2006
|
"from-bottom": ["Home", "PageDown", "ArrowDown", "ArrowLeft"],
|
|
1988
2007
|
"from-top": ["Home", "PageDown", "ArrowUp", "ArrowLeft"]
|
|
1989
|
-
}, Ce = "Slider", [et, Kr, Br] =
|
|
2008
|
+
}, Ce = "Slider", [et, Kr, Br] = Bn(Ce), [ln] = Kn(Ce, [
|
|
1990
2009
|
Br
|
|
1991
|
-
]), [qr,
|
|
2010
|
+
]), [qr, Ge] = ln(Ce), an = T.forwardRef(
|
|
1992
2011
|
(e, t) => {
|
|
1993
2012
|
const {
|
|
1994
2013
|
name: n,
|
|
@@ -1998,47 +2017,47 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
1998
2017
|
orientation: s = "horizontal",
|
|
1999
2018
|
disabled: l = !1,
|
|
2000
2019
|
minStepsBetweenThumbs: a = 0,
|
|
2001
|
-
defaultValue:
|
|
2002
|
-
value:
|
|
2020
|
+
defaultValue: d = [r],
|
|
2021
|
+
value: f,
|
|
2003
2022
|
onValueChange: u = () => {
|
|
2004
2023
|
},
|
|
2005
2024
|
onValueCommit: c = () => {
|
|
2006
2025
|
},
|
|
2007
|
-
inverted:
|
|
2008
|
-
form:
|
|
2009
|
-
...
|
|
2010
|
-
} = e,
|
|
2011
|
-
prop:
|
|
2012
|
-
defaultProp:
|
|
2013
|
-
onChange: (
|
|
2014
|
-
var
|
|
2015
|
-
(
|
|
2026
|
+
inverted: m = !1,
|
|
2027
|
+
form: p,
|
|
2028
|
+
...g
|
|
2029
|
+
} = e, v = T.useRef(/* @__PURE__ */ new Set()), h = T.useRef(0), x = s === "horizontal" ? Or : Gr, [R = [], D] = It({
|
|
2030
|
+
prop: f,
|
|
2031
|
+
defaultProp: d,
|
|
2032
|
+
onChange: (_) => {
|
|
2033
|
+
var U;
|
|
2034
|
+
(U = [...v.current][h.current]) == null || U.focus(), u(_);
|
|
2016
2035
|
}
|
|
2017
|
-
}),
|
|
2018
|
-
function w(
|
|
2019
|
-
const
|
|
2020
|
-
|
|
2036
|
+
}), k = T.useRef(R);
|
|
2037
|
+
function w(_) {
|
|
2038
|
+
const M = jr(R, _);
|
|
2039
|
+
$(_, M);
|
|
2021
2040
|
}
|
|
2022
|
-
function
|
|
2023
|
-
|
|
2041
|
+
function X(_) {
|
|
2042
|
+
$(_, h.current);
|
|
2024
2043
|
}
|
|
2025
|
-
function
|
|
2026
|
-
const
|
|
2027
|
-
|
|
2044
|
+
function Q() {
|
|
2045
|
+
const _ = k.current[h.current];
|
|
2046
|
+
R[h.current] !== _ && c(R);
|
|
2028
2047
|
}
|
|
2029
|
-
function
|
|
2030
|
-
const
|
|
2031
|
-
|
|
2032
|
-
const
|
|
2033
|
-
if (Zr(
|
|
2034
|
-
|
|
2035
|
-
const
|
|
2036
|
-
return
|
|
2048
|
+
function $(_, M, { commit: U } = { commit: !1 }) {
|
|
2049
|
+
const F = eo(o), H = to(Math.round((_ - r) / o) * o + r, F), V = Dt(H, [r, i]);
|
|
2050
|
+
D((Y = []) => {
|
|
2051
|
+
const W = Xr(Y, V, M);
|
|
2052
|
+
if (Zr(W, a * o)) {
|
|
2053
|
+
h.current = W.indexOf(V);
|
|
2054
|
+
const ee = String(W) !== String(Y);
|
|
2055
|
+
return ee && U && c(W), ee ? W : Y;
|
|
2037
2056
|
} else
|
|
2038
|
-
return
|
|
2057
|
+
return Y;
|
|
2039
2058
|
});
|
|
2040
2059
|
}
|
|
2041
|
-
return /* @__PURE__ */
|
|
2060
|
+
return /* @__PURE__ */ L(
|
|
2042
2061
|
qr,
|
|
2043
2062
|
{
|
|
2044
2063
|
scope: e.__scopeSlider,
|
|
@@ -2046,33 +2065,33 @@ var rn = ["PageUp", "PageDown"], on = ["ArrowUp", "ArrowDown", "ArrowLeft", "Arr
|
|
|
2046
2065
|
disabled: l,
|
|
2047
2066
|
min: r,
|
|
2048
2067
|
max: i,
|
|
2049
|
-
valueIndexToChangeRef:
|
|
2050
|
-
thumbs:
|
|
2051
|
-
values:
|
|
2068
|
+
valueIndexToChangeRef: h,
|
|
2069
|
+
thumbs: v.current,
|
|
2070
|
+
values: R,
|
|
2052
2071
|
orientation: s,
|
|
2053
|
-
form:
|
|
2054
|
-
children: /* @__PURE__ */
|
|
2072
|
+
form: p,
|
|
2073
|
+
children: /* @__PURE__ */ L(et.Provider, { scope: e.__scopeSlider, children: /* @__PURE__ */ L(et.Slot, { scope: e.__scopeSlider, children: /* @__PURE__ */ L(
|
|
2055
2074
|
x,
|
|
2056
2075
|
{
|
|
2057
2076
|
"aria-disabled": l,
|
|
2058
2077
|
"data-disabled": l ? "" : void 0,
|
|
2059
|
-
...
|
|
2078
|
+
...g,
|
|
2060
2079
|
ref: t,
|
|
2061
|
-
onPointerDown: pe(
|
|
2062
|
-
l || (
|
|
2080
|
+
onPointerDown: pe(g.onPointerDown, () => {
|
|
2081
|
+
l || (k.current = R);
|
|
2063
2082
|
}),
|
|
2064
2083
|
min: r,
|
|
2065
2084
|
max: i,
|
|
2066
|
-
inverted:
|
|
2085
|
+
inverted: m,
|
|
2067
2086
|
onSlideStart: l ? void 0 : w,
|
|
2068
|
-
onSlideMove: l ? void 0 :
|
|
2069
|
-
onSlideEnd: l ? void 0 :
|
|
2070
|
-
onHomeKeyDown: () => !l &&
|
|
2071
|
-
onEndKeyDown: () => !l &&
|
|
2072
|
-
onStepKeyDown: ({ event:
|
|
2087
|
+
onSlideMove: l ? void 0 : X,
|
|
2088
|
+
onSlideEnd: l ? void 0 : Q,
|
|
2089
|
+
onHomeKeyDown: () => !l && $(r, 0, { commit: !0 }),
|
|
2090
|
+
onEndKeyDown: () => !l && $(i, R.length - 1, { commit: !0 }),
|
|
2091
|
+
onStepKeyDown: ({ event: _, direction: M }) => {
|
|
2073
2092
|
if (!l) {
|
|
2074
|
-
const
|
|
2075
|
-
|
|
2093
|
+
const H = rn.includes(_.key) || _.shiftKey && on.includes(_.key) ? 10 : 1, V = h.current, Y = R[V], W = o * H * M;
|
|
2094
|
+
$(Y + W, V, { commit: !0 });
|
|
2076
2095
|
}
|
|
2077
2096
|
}
|
|
2078
2097
|
}
|
|
@@ -2087,7 +2106,7 @@ var [cn, un] = ln(Ce, {
|
|
|
2087
2106
|
endEdge: "right",
|
|
2088
2107
|
size: "width",
|
|
2089
2108
|
direction: 1
|
|
2090
|
-
}), Or =
|
|
2109
|
+
}), Or = T.forwardRef(
|
|
2091
2110
|
(e, t) => {
|
|
2092
2111
|
const {
|
|
2093
2112
|
min: n,
|
|
@@ -2097,53 +2116,53 @@ var [cn, un] = ln(Ce, {
|
|
|
2097
2116
|
onSlideStart: s,
|
|
2098
2117
|
onSlideMove: l,
|
|
2099
2118
|
onSlideEnd: a,
|
|
2100
|
-
onStepKeyDown:
|
|
2101
|
-
...
|
|
2102
|
-
} = e, [u, c] =
|
|
2103
|
-
function
|
|
2104
|
-
const
|
|
2105
|
-
return
|
|
2119
|
+
onStepKeyDown: d,
|
|
2120
|
+
...f
|
|
2121
|
+
} = e, [u, c] = T.useState(null), m = Pe(t, (x) => c(x)), p = T.useRef(void 0), g = qn(i), v = g === "ltr", h = v && !o || !v && o;
|
|
2122
|
+
function A(x) {
|
|
2123
|
+
const R = p.current || u.getBoundingClientRect(), D = [0, R.width], w = ct(D, h ? [n, r] : [r, n]);
|
|
2124
|
+
return p.current = R, w(x - R.left);
|
|
2106
2125
|
}
|
|
2107
|
-
return /* @__PURE__ */
|
|
2126
|
+
return /* @__PURE__ */ L(
|
|
2108
2127
|
cn,
|
|
2109
2128
|
{
|
|
2110
2129
|
scope: e.__scopeSlider,
|
|
2111
|
-
startEdge:
|
|
2112
|
-
endEdge:
|
|
2113
|
-
direction:
|
|
2130
|
+
startEdge: h ? "left" : "right",
|
|
2131
|
+
endEdge: h ? "right" : "left",
|
|
2132
|
+
direction: h ? 1 : -1,
|
|
2114
2133
|
size: "width",
|
|
2115
|
-
children: /* @__PURE__ */
|
|
2134
|
+
children: /* @__PURE__ */ L(
|
|
2116
2135
|
dn,
|
|
2117
2136
|
{
|
|
2118
|
-
dir:
|
|
2137
|
+
dir: g,
|
|
2119
2138
|
"data-orientation": "horizontal",
|
|
2120
|
-
...
|
|
2121
|
-
ref:
|
|
2139
|
+
...f,
|
|
2140
|
+
ref: m,
|
|
2122
2141
|
style: {
|
|
2123
|
-
...
|
|
2142
|
+
...f.style,
|
|
2124
2143
|
"--radix-slider-thumb-transform": "translateX(-50%)"
|
|
2125
2144
|
},
|
|
2126
2145
|
onSlideStart: (x) => {
|
|
2127
|
-
const
|
|
2128
|
-
s == null || s(
|
|
2146
|
+
const R = A(x.clientX);
|
|
2147
|
+
s == null || s(R);
|
|
2129
2148
|
},
|
|
2130
2149
|
onSlideMove: (x) => {
|
|
2131
|
-
const
|
|
2132
|
-
l == null || l(
|
|
2150
|
+
const R = A(x.clientX);
|
|
2151
|
+
l == null || l(R);
|
|
2133
2152
|
},
|
|
2134
2153
|
onSlideEnd: () => {
|
|
2135
|
-
|
|
2154
|
+
p.current = void 0, a == null || a();
|
|
2136
2155
|
},
|
|
2137
2156
|
onStepKeyDown: (x) => {
|
|
2138
|
-
const
|
|
2139
|
-
|
|
2157
|
+
const D = sn[h ? "from-left" : "from-right"].includes(x.key);
|
|
2158
|
+
d == null || d({ event: x, direction: D ? -1 : 1 });
|
|
2140
2159
|
}
|
|
2141
2160
|
}
|
|
2142
2161
|
)
|
|
2143
2162
|
}
|
|
2144
2163
|
);
|
|
2145
2164
|
}
|
|
2146
|
-
), Gr =
|
|
2165
|
+
), Gr = T.forwardRef(
|
|
2147
2166
|
(e, t) => {
|
|
2148
2167
|
const {
|
|
2149
2168
|
min: n,
|
|
@@ -2153,51 +2172,51 @@ var [cn, un] = ln(Ce, {
|
|
|
2153
2172
|
onSlideMove: s,
|
|
2154
2173
|
onSlideEnd: l,
|
|
2155
2174
|
onStepKeyDown: a,
|
|
2156
|
-
...
|
|
2157
|
-
} = e,
|
|
2158
|
-
function
|
|
2159
|
-
const
|
|
2160
|
-
return c.current =
|
|
2175
|
+
...d
|
|
2176
|
+
} = e, f = T.useRef(null), u = Pe(t, f), c = T.useRef(void 0), m = !i;
|
|
2177
|
+
function p(g) {
|
|
2178
|
+
const v = c.current || f.current.getBoundingClientRect(), h = [0, v.height], x = ct(h, m ? [r, n] : [n, r]);
|
|
2179
|
+
return c.current = v, x(g - v.top);
|
|
2161
2180
|
}
|
|
2162
|
-
return /* @__PURE__ */
|
|
2181
|
+
return /* @__PURE__ */ L(
|
|
2163
2182
|
cn,
|
|
2164
2183
|
{
|
|
2165
2184
|
scope: e.__scopeSlider,
|
|
2166
|
-
startEdge:
|
|
2167
|
-
endEdge:
|
|
2185
|
+
startEdge: m ? "bottom" : "top",
|
|
2186
|
+
endEdge: m ? "top" : "bottom",
|
|
2168
2187
|
size: "height",
|
|
2169
|
-
direction:
|
|
2170
|
-
children: /* @__PURE__ */
|
|
2188
|
+
direction: m ? 1 : -1,
|
|
2189
|
+
children: /* @__PURE__ */ L(
|
|
2171
2190
|
dn,
|
|
2172
2191
|
{
|
|
2173
2192
|
"data-orientation": "vertical",
|
|
2174
|
-
...
|
|
2193
|
+
...d,
|
|
2175
2194
|
ref: u,
|
|
2176
2195
|
style: {
|
|
2177
|
-
...
|
|
2196
|
+
...d.style,
|
|
2178
2197
|
"--radix-slider-thumb-transform": "translateY(50%)"
|
|
2179
2198
|
},
|
|
2180
|
-
onSlideStart: (
|
|
2181
|
-
const
|
|
2182
|
-
o == null || o(
|
|
2199
|
+
onSlideStart: (g) => {
|
|
2200
|
+
const v = p(g.clientY);
|
|
2201
|
+
o == null || o(v);
|
|
2183
2202
|
},
|
|
2184
|
-
onSlideMove: (
|
|
2185
|
-
const
|
|
2186
|
-
s == null || s(
|
|
2203
|
+
onSlideMove: (g) => {
|
|
2204
|
+
const v = p(g.clientY);
|
|
2205
|
+
s == null || s(v);
|
|
2187
2206
|
},
|
|
2188
2207
|
onSlideEnd: () => {
|
|
2189
2208
|
c.current = void 0, l == null || l();
|
|
2190
2209
|
},
|
|
2191
|
-
onStepKeyDown: (
|
|
2192
|
-
const
|
|
2193
|
-
a == null || a({ event:
|
|
2210
|
+
onStepKeyDown: (g) => {
|
|
2211
|
+
const h = sn[m ? "from-bottom" : "from-top"].includes(g.key);
|
|
2212
|
+
a == null || a({ event: g, direction: h ? -1 : 1 });
|
|
2194
2213
|
}
|
|
2195
2214
|
}
|
|
2196
2215
|
)
|
|
2197
2216
|
}
|
|
2198
2217
|
);
|
|
2199
2218
|
}
|
|
2200
|
-
), dn =
|
|
2219
|
+
), dn = T.forwardRef(
|
|
2201
2220
|
(e, t) => {
|
|
2202
2221
|
const {
|
|
2203
2222
|
__scopeSlider: n,
|
|
@@ -2207,19 +2226,19 @@ var [cn, un] = ln(Ce, {
|
|
|
2207
2226
|
onHomeKeyDown: s,
|
|
2208
2227
|
onEndKeyDown: l,
|
|
2209
2228
|
onStepKeyDown: a,
|
|
2210
|
-
...
|
|
2211
|
-
} = e,
|
|
2212
|
-
return /* @__PURE__ */
|
|
2229
|
+
...d
|
|
2230
|
+
} = e, f = Ge(Ce, n);
|
|
2231
|
+
return /* @__PURE__ */ L(
|
|
2213
2232
|
ze.span,
|
|
2214
2233
|
{
|
|
2215
|
-
...
|
|
2234
|
+
...d,
|
|
2216
2235
|
ref: t,
|
|
2217
2236
|
onKeyDown: pe(e.onKeyDown, (u) => {
|
|
2218
2237
|
u.key === "Home" ? (s(u), u.preventDefault()) : u.key === "End" ? (l(u), u.preventDefault()) : rn.concat(on).includes(u.key) && (a(u), u.preventDefault());
|
|
2219
2238
|
}),
|
|
2220
2239
|
onPointerDown: pe(e.onPointerDown, (u) => {
|
|
2221
2240
|
const c = u.target;
|
|
2222
|
-
c.setPointerCapture(u.pointerId), u.preventDefault(),
|
|
2241
|
+
c.setPointerCapture(u.pointerId), u.preventDefault(), f.thumbs.has(c) ? c.focus() : r(u);
|
|
2223
2242
|
}),
|
|
2224
2243
|
onPointerMove: pe(e.onPointerMove, (u) => {
|
|
2225
2244
|
u.target.hasPointerCapture(u.pointerId) && i(u);
|
|
@@ -2231,10 +2250,10 @@ var [cn, un] = ln(Ce, {
|
|
|
2231
2250
|
}
|
|
2232
2251
|
);
|
|
2233
2252
|
}
|
|
2234
|
-
), fn = "SliderTrack", pn =
|
|
2253
|
+
), fn = "SliderTrack", pn = T.forwardRef(
|
|
2235
2254
|
(e, t) => {
|
|
2236
|
-
const { __scopeSlider: n, ...r } = e, i =
|
|
2237
|
-
return /* @__PURE__ */
|
|
2255
|
+
const { __scopeSlider: n, ...r } = e, i = Ge(fn, n);
|
|
2256
|
+
return /* @__PURE__ */ L(
|
|
2238
2257
|
ze.span,
|
|
2239
2258
|
{
|
|
2240
2259
|
"data-disabled": i.disabled ? "" : void 0,
|
|
@@ -2246,12 +2265,12 @@ var [cn, un] = ln(Ce, {
|
|
|
2246
2265
|
}
|
|
2247
2266
|
);
|
|
2248
2267
|
pn.displayName = fn;
|
|
2249
|
-
var tt = "SliderRange", mn =
|
|
2268
|
+
var tt = "SliderRange", mn = T.forwardRef(
|
|
2250
2269
|
(e, t) => {
|
|
2251
|
-
const { __scopeSlider: n, ...r } = e, i =
|
|
2270
|
+
const { __scopeSlider: n, ...r } = e, i = Ge(tt, n), o = un(tt, n), s = T.useRef(null), l = Pe(t, s), a = i.values.length, d = i.values.map(
|
|
2252
2271
|
(c) => yn(c, i.min, i.max)
|
|
2253
|
-
),
|
|
2254
|
-
return /* @__PURE__ */
|
|
2272
|
+
), f = a > 1 ? Math.min(...d) : 0, u = 100 - Math.max(...d);
|
|
2273
|
+
return /* @__PURE__ */ L(
|
|
2255
2274
|
ze.span,
|
|
2256
2275
|
{
|
|
2257
2276
|
"data-orientation": i.orientation,
|
|
@@ -2260,7 +2279,7 @@ var tt = "SliderRange", mn = k.forwardRef(
|
|
|
2260
2279
|
ref: l,
|
|
2261
2280
|
style: {
|
|
2262
2281
|
...e.style,
|
|
2263
|
-
[o.startEdge]:
|
|
2282
|
+
[o.startEdge]: f + "%",
|
|
2264
2283
|
[o.endEdge]: u + "%"
|
|
2265
2284
|
}
|
|
2266
2285
|
}
|
|
@@ -2268,57 +2287,57 @@ var tt = "SliderRange", mn = k.forwardRef(
|
|
|
2268
2287
|
}
|
|
2269
2288
|
);
|
|
2270
2289
|
mn.displayName = tt;
|
|
2271
|
-
var nt = "SliderThumb", gn =
|
|
2290
|
+
var nt = "SliderThumb", gn = T.forwardRef(
|
|
2272
2291
|
(e, t) => {
|
|
2273
|
-
const n = Kr(e.__scopeSlider), [r, i] =
|
|
2292
|
+
const n = Kr(e.__scopeSlider), [r, i] = T.useState(null), o = Pe(t, (l) => i(l)), s = T.useMemo(
|
|
2274
2293
|
() => r ? n().findIndex((l) => l.ref.current === r) : -1,
|
|
2275
2294
|
[n, r]
|
|
2276
2295
|
);
|
|
2277
|
-
return /* @__PURE__ */
|
|
2296
|
+
return /* @__PURE__ */ L(Ur, { ...e, ref: o, index: s });
|
|
2278
2297
|
}
|
|
2279
|
-
), Ur =
|
|
2298
|
+
), Ur = T.forwardRef(
|
|
2280
2299
|
(e, t) => {
|
|
2281
|
-
const { __scopeSlider: n, index: r, name: i, ...o } = e, s =
|
|
2282
|
-
return
|
|
2300
|
+
const { __scopeSlider: n, index: r, name: i, ...o } = e, s = Ge(nt, n), l = un(nt, n), [a, d] = T.useState(null), f = Pe(t, (A) => d(A)), u = a ? s.form || !!a.closest("form") : !0, c = On(a), m = s.values[r], p = m === void 0 ? 0 : yn(m, s.min, s.max), g = Yr(r, s.values.length), v = c == null ? void 0 : c[l.size], h = v ? Qr(v, p, l.direction) : 0;
|
|
2301
|
+
return T.useEffect(() => {
|
|
2283
2302
|
if (a)
|
|
2284
2303
|
return s.thumbs.add(a), () => {
|
|
2285
2304
|
s.thumbs.delete(a);
|
|
2286
2305
|
};
|
|
2287
|
-
}, [a, s.thumbs]), /* @__PURE__ */
|
|
2306
|
+
}, [a, s.thumbs]), /* @__PURE__ */ Ne(
|
|
2288
2307
|
"span",
|
|
2289
2308
|
{
|
|
2290
2309
|
style: {
|
|
2291
2310
|
transform: "var(--radix-slider-thumb-transform)",
|
|
2292
2311
|
position: "absolute",
|
|
2293
|
-
[l.startEdge]: `calc(${
|
|
2312
|
+
[l.startEdge]: `calc(${p}% + ${h}px)`
|
|
2294
2313
|
},
|
|
2295
2314
|
children: [
|
|
2296
|
-
/* @__PURE__ */
|
|
2315
|
+
/* @__PURE__ */ L(et.ItemSlot, { scope: e.__scopeSlider, children: /* @__PURE__ */ L(
|
|
2297
2316
|
ze.span,
|
|
2298
2317
|
{
|
|
2299
2318
|
role: "slider",
|
|
2300
|
-
"aria-label": e["aria-label"] ||
|
|
2319
|
+
"aria-label": e["aria-label"] || g,
|
|
2301
2320
|
"aria-valuemin": s.min,
|
|
2302
|
-
"aria-valuenow":
|
|
2321
|
+
"aria-valuenow": m,
|
|
2303
2322
|
"aria-valuemax": s.max,
|
|
2304
2323
|
"aria-orientation": s.orientation,
|
|
2305
2324
|
"data-orientation": s.orientation,
|
|
2306
2325
|
"data-disabled": s.disabled ? "" : void 0,
|
|
2307
2326
|
tabIndex: s.disabled ? void 0 : 0,
|
|
2308
2327
|
...o,
|
|
2309
|
-
ref:
|
|
2310
|
-
style:
|
|
2328
|
+
ref: f,
|
|
2329
|
+
style: m === void 0 ? { display: "none" } : e.style,
|
|
2311
2330
|
onFocus: pe(e.onFocus, () => {
|
|
2312
2331
|
s.valueIndexToChangeRef.current = r;
|
|
2313
2332
|
})
|
|
2314
2333
|
}
|
|
2315
2334
|
) }),
|
|
2316
|
-
u && /* @__PURE__ */
|
|
2335
|
+
u && /* @__PURE__ */ L(
|
|
2317
2336
|
hn,
|
|
2318
2337
|
{
|
|
2319
2338
|
name: i ?? (s.name ? s.name + (s.values.length > 1 ? "[]" : "") : void 0),
|
|
2320
2339
|
form: s.form,
|
|
2321
|
-
value:
|
|
2340
|
+
value: m
|
|
2322
2341
|
},
|
|
2323
2342
|
r
|
|
2324
2343
|
)
|
|
@@ -2328,18 +2347,18 @@ var nt = "SliderThumb", gn = k.forwardRef(
|
|
|
2328
2347
|
}
|
|
2329
2348
|
);
|
|
2330
2349
|
gn.displayName = nt;
|
|
2331
|
-
var Wr = "RadioBubbleInput", hn =
|
|
2350
|
+
var Wr = "RadioBubbleInput", hn = T.forwardRef(
|
|
2332
2351
|
({ __scopeSlider: e, value: t, ...n }, r) => {
|
|
2333
|
-
const i =
|
|
2334
|
-
return
|
|
2352
|
+
const i = T.useRef(null), o = Pe(i, r), s = Gn(t);
|
|
2353
|
+
return T.useEffect(() => {
|
|
2335
2354
|
const l = i.current;
|
|
2336
2355
|
if (!l) return;
|
|
2337
|
-
const a = window.HTMLInputElement.prototype,
|
|
2338
|
-
if (s !== t &&
|
|
2356
|
+
const a = window.HTMLInputElement.prototype, f = Object.getOwnPropertyDescriptor(a, "value").set;
|
|
2357
|
+
if (s !== t && f) {
|
|
2339
2358
|
const u = new Event("input", { bubbles: !0 });
|
|
2340
|
-
|
|
2359
|
+
f.call(l, t), l.dispatchEvent(u);
|
|
2341
2360
|
}
|
|
2342
|
-
}, [s, t]), /* @__PURE__ */
|
|
2361
|
+
}, [s, t]), /* @__PURE__ */ L(
|
|
2343
2362
|
ze.input,
|
|
2344
2363
|
{
|
|
2345
2364
|
style: { display: "none" },
|
|
@@ -2351,7 +2370,7 @@ var Wr = "RadioBubbleInput", hn = k.forwardRef(
|
|
|
2351
2370
|
}
|
|
2352
2371
|
);
|
|
2353
2372
|
hn.displayName = Wr;
|
|
2354
|
-
function
|
|
2373
|
+
function Xr(e = [], t, n) {
|
|
2355
2374
|
const r = [...e];
|
|
2356
2375
|
return r[n] = t, r.sort((i, o) => i - o);
|
|
2357
2376
|
}
|
|
@@ -2359,7 +2378,7 @@ function yn(e, t, n) {
|
|
|
2359
2378
|
const o = 100 / (n - t) * (e - t);
|
|
2360
2379
|
return Dt(o, [0, 100]);
|
|
2361
2380
|
}
|
|
2362
|
-
function
|
|
2381
|
+
function Yr(e, t) {
|
|
2363
2382
|
return t > 2 ? `Value ${e + 1} of ${t}` : t === 2 ? ["Minimum", "Maximum"][e] : void 0;
|
|
2364
2383
|
}
|
|
2365
2384
|
function jr(e, t) {
|
|
@@ -2396,7 +2415,7 @@ function to(e, t) {
|
|
|
2396
2415
|
return Math.round(e * n) / n;
|
|
2397
2416
|
}
|
|
2398
2417
|
var vn = an, no = pn, ro = mn, oo = gn;
|
|
2399
|
-
const io =
|
|
2418
|
+
const io = T.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ Ne(
|
|
2400
2419
|
vn,
|
|
2401
2420
|
{
|
|
2402
2421
|
ref: n,
|
|
@@ -2406,13 +2425,13 @@ const io = k.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ Ae(
|
|
|
2406
2425
|
),
|
|
2407
2426
|
...t,
|
|
2408
2427
|
children: [
|
|
2409
|
-
/* @__PURE__ */
|
|
2410
|
-
/* @__PURE__ */
|
|
2428
|
+
/* @__PURE__ */ L(no, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ L(ro, { className: "absolute h-full bg-primary" }) }),
|
|
2429
|
+
/* @__PURE__ */ L(oo, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
|
|
2411
2430
|
]
|
|
2412
2431
|
}
|
|
2413
2432
|
));
|
|
2414
2433
|
io.displayName = vn.displayName;
|
|
2415
|
-
const so = xt(null), lo =
|
|
2434
|
+
const so = xt(null), lo = Fn();
|
|
2416
2435
|
function Sn(e) {
|
|
2417
2436
|
const t = rt(so) ?? lo;
|
|
2418
2437
|
return En(t.subscribe, () => e(t.get()), () => e(null));
|