@tenorlab/react-dashboard 1.5.26 → 1.5.41
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/core.d.ts +80 -0
- package/dist/core.es.js +295 -129
- package/dist/react-dashboard.d.ts +16 -0
- package/dist/react-dashboard.es.js +1628 -1698
- package/package.json +2 -2
|
@@ -1,311 +1,199 @@
|
|
|
1
|
-
import { create as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { jsxs as
|
|
5
|
-
import
|
|
6
|
-
const wt = (e) => (
|
|
7
|
-
const
|
|
8
|
-
return
|
|
9
|
-
let
|
|
10
|
-
if (
|
|
11
|
-
const
|
|
12
|
-
let c =
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
if (!
|
|
1
|
+
import { create as mt } from "zustand";
|
|
2
|
+
import { dashboardStoreUtils as he, blankDashboardConfig as Ce, getDistinctCssClasses as G, ensureZoomScaleIsWithinRange as pt, parseContainerTitle as nt, getWidgetMetaFromCatalog as yt, dashboardSettingsUtils as bt } from "./core.es.js";
|
|
3
|
+
import ve, { useState as ie, useCallback as ce, useMemo as ot, forwardRef as se, useRef as vt, Suspense as xt, useEffect as Ct } from "react";
|
|
4
|
+
import { jsxs as I, jsx as t } from "react/jsx-runtime";
|
|
5
|
+
import at from "react-dom";
|
|
6
|
+
const wt = (e) => (l, r, o) => {
|
|
7
|
+
const s = o.subscribe;
|
|
8
|
+
return o.subscribe = ((f, g, D) => {
|
|
9
|
+
let S = f;
|
|
10
|
+
if (g) {
|
|
11
|
+
const b = D?.equalityFn || Object.is;
|
|
12
|
+
let c = f(o.getState());
|
|
13
|
+
S = (p) => {
|
|
14
|
+
const m = f(p);
|
|
15
|
+
if (!b(c, m)) {
|
|
16
16
|
const T = c;
|
|
17
|
-
|
|
17
|
+
g(c = m, T);
|
|
18
18
|
}
|
|
19
|
-
},
|
|
20
|
-
}
|
|
21
|
-
return
|
|
22
|
-
}), e(
|
|
23
|
-
}, St = wt, Dt = (e) => {
|
|
24
|
-
const i = e.widgets.filter((r) => r.includes("WidgetContainer")).map((r) => Number(r.split("_")[1].replace("container", "")));
|
|
25
|
-
return `container${i.length > 0 ? Math.max(...i) + 1 : 1}`;
|
|
26
|
-
}, Tt = (e, i) => {
|
|
27
|
-
const t = Dt(e);
|
|
28
|
-
return `${i}_${t}`;
|
|
29
|
-
}, Nt = (e) => {
|
|
30
|
-
const { dashboardConfig: i, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets: a } = e;
|
|
31
|
-
if (r) {
|
|
32
|
-
if (a && i.childWidgetsConfig.find(
|
|
33
|
-
(d) => d.parentWidgetKey === r && d.widgetKey === t
|
|
34
|
-
))
|
|
35
|
-
return {
|
|
36
|
-
success: !1,
|
|
37
|
-
message: `DashboardStore: addWidget: Widget already added (${t})`,
|
|
38
|
-
updatedDashboardConfig: i
|
|
39
|
-
};
|
|
40
|
-
const o = [
|
|
41
|
-
...i.childWidgetsConfig,
|
|
42
|
-
{ parentWidgetKey: r, widgetKey: t }
|
|
43
|
-
// new entry
|
|
44
|
-
];
|
|
45
|
-
return {
|
|
46
|
-
success: !0,
|
|
47
|
-
updatedDashboardConfig: {
|
|
48
|
-
...i,
|
|
49
|
-
childWidgetsConfig: o
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
} else {
|
|
53
|
-
if (a && i.widgets.includes(t))
|
|
54
|
-
return {
|
|
55
|
-
success: !1,
|
|
56
|
-
message: `DashboardStore: addWidget: Widget already added (${t})`,
|
|
57
|
-
updatedDashboardConfig: i
|
|
58
|
-
};
|
|
59
|
-
const o = [...i.widgets, t];
|
|
60
|
-
return {
|
|
61
|
-
success: !0,
|
|
62
|
-
updatedDashboardConfig: {
|
|
63
|
-
...i,
|
|
64
|
-
widgets: o
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
}, Et = (e, i, t) => {
|
|
69
|
-
const r = `${i || ""}`.trim().toLowerCase(), a = `${t || ""}`.trim().toLowerCase();
|
|
70
|
-
if (a.length > 0) {
|
|
71
|
-
const o = e.childWidgetsConfig.filter(
|
|
72
|
-
(m) => `${m.parentWidgetKey}`.trim().toLowerCase() !== a
|
|
73
|
-
), d = e.childWidgetsConfig.filter(
|
|
74
|
-
(m) => `${m.parentWidgetKey}`.trim().toLowerCase() === a && `${m.widgetKey}`.trim().toLowerCase() !== r
|
|
75
|
-
), f = [...o, ...d];
|
|
76
|
-
let C = {
|
|
77
|
-
...e,
|
|
78
|
-
childWidgetsConfig: f
|
|
79
|
-
};
|
|
80
|
-
return r.includes("container") && (C = mt(C)), {
|
|
81
|
-
success: !0,
|
|
82
|
-
updatedDashboardConfig: C
|
|
83
|
-
};
|
|
84
|
-
} else {
|
|
85
|
-
const d = (e.widgets || []).filter(
|
|
86
|
-
(C) => `${C}`.trim().toLowerCase() !== r
|
|
87
|
-
), f = e.childWidgetsConfig.filter(
|
|
88
|
-
(C) => `${C.parentWidgetKey}`.trim().toLowerCase() !== r
|
|
89
|
-
);
|
|
90
|
-
return {
|
|
91
|
-
success: !0,
|
|
92
|
-
updatedDashboardConfig: {
|
|
93
|
-
...e,
|
|
94
|
-
widgets: d,
|
|
95
|
-
childWidgetsConfig: f
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
}, _t = (e, i, t, r) => {
|
|
100
|
-
const a = `${t || ""}`.trim().toLowerCase(), o = `${r || ""}`.trim().toLowerCase();
|
|
101
|
-
if (o.length > 0) {
|
|
102
|
-
const d = e.childWidgetsConfig.filter(
|
|
103
|
-
(p) => `${p.parentWidgetKey}`.trim().toLowerCase() !== o
|
|
104
|
-
);
|
|
105
|
-
let f = e.childWidgetsConfig.filter(
|
|
106
|
-
(p) => `${p.parentWidgetKey}`.trim().toLowerCase() === o
|
|
107
|
-
);
|
|
108
|
-
const C = f.find(
|
|
109
|
-
(p) => `${p.widgetKey}`.trim().toLowerCase() === a
|
|
110
|
-
), v = f.indexOf(C);
|
|
111
|
-
let m = v + i;
|
|
112
|
-
if (m = Math.max(0, m), m = Math.min(f.length - 1, m), m === v)
|
|
113
|
-
return {
|
|
114
|
-
success: !1,
|
|
115
|
-
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
116
|
-
updatedDashboardConfig: e
|
|
117
|
-
};
|
|
118
|
-
const c = [...f], [y] = c.splice(v, 1);
|
|
119
|
-
return c.splice(m, 0, y), {
|
|
120
|
-
success: !0,
|
|
121
|
-
updatedDashboardConfig: {
|
|
122
|
-
...e,
|
|
123
|
-
childWidgetsConfig: [...d, ...c]
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
} else {
|
|
127
|
-
const d = e.widgets || [], C = d.map((y) => `${y}`.trim().toLowerCase()).indexOf(a);
|
|
128
|
-
let v = C + i;
|
|
129
|
-
if (v = Math.max(0, v), v = Math.min(d.length - 1, v), v === C)
|
|
130
|
-
return {
|
|
131
|
-
success: !1,
|
|
132
|
-
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
133
|
-
updatedDashboardConfig: e
|
|
134
|
-
};
|
|
135
|
-
const m = [...d], [c] = m.splice(C, 1);
|
|
136
|
-
return m.splice(v, 0, c), {
|
|
137
|
-
success: !0,
|
|
138
|
-
updatedDashboardConfig: {
|
|
139
|
-
...e,
|
|
140
|
-
widgets: m
|
|
141
|
-
}
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
}, Mt = (e, i) => ({
|
|
19
|
+
}, D?.fireImmediately && g(c, c);
|
|
20
|
+
}
|
|
21
|
+
return s(S);
|
|
22
|
+
}), e(l, r, o);
|
|
23
|
+
}, St = wt, Dt = (e, l) => ({
|
|
145
24
|
isLoading: !1,
|
|
146
25
|
isEditing: !1,
|
|
147
|
-
allDashboardConfigs: [
|
|
148
|
-
currentDashboardConfig:
|
|
26
|
+
allDashboardConfigs: [Ce],
|
|
27
|
+
currentDashboardConfig: Ce,
|
|
149
28
|
targetContainerKey: void 0,
|
|
150
|
-
getNextContainerKey: (
|
|
151
|
-
setIsLoading: (
|
|
152
|
-
setIsEditing: (
|
|
153
|
-
let
|
|
154
|
-
return
|
|
29
|
+
getNextContainerKey: (r) => he.getNextContainerKey(l().currentDashboardConfig, r),
|
|
30
|
+
setIsLoading: (r) => (e(() => ({ isLoading: r })), r),
|
|
31
|
+
setIsEditing: (r) => {
|
|
32
|
+
let o = l().targetContainerKey;
|
|
33
|
+
return r || (o = void 0), e(() => ({ isEditing: r, targetContainerKey: o })), r;
|
|
155
34
|
},
|
|
156
|
-
setTargetContainerKey: (
|
|
157
|
-
setAllDashboardConfigs: (
|
|
158
|
-
setCurrentDashboardConfig: (
|
|
159
|
-
const
|
|
160
|
-
...
|
|
161
|
-
|
|
35
|
+
setTargetContainerKey: (r) => (e(() => ({ targetContainerKey: r })), r),
|
|
36
|
+
setAllDashboardConfigs: (r) => (e(() => ({ allDashboardConfigs: r })), l().allDashboardConfigs),
|
|
37
|
+
setCurrentDashboardConfig: (r) => {
|
|
38
|
+
const o = l(), s = [
|
|
39
|
+
...o.allDashboardConfigs.filter((n) => n.dashboardId !== r.dashboardId),
|
|
40
|
+
r
|
|
162
41
|
];
|
|
163
42
|
return e(() => ({
|
|
164
|
-
...
|
|
165
|
-
allDashboardConfigs:
|
|
166
|
-
currentDashboardConfig:
|
|
167
|
-
})),
|
|
43
|
+
...o,
|
|
44
|
+
allDashboardConfigs: s,
|
|
45
|
+
currentDashboardConfig: r
|
|
46
|
+
})), s;
|
|
168
47
|
},
|
|
169
|
-
addDashboardConfig: (
|
|
170
|
-
const
|
|
171
|
-
...
|
|
172
|
-
|
|
48
|
+
addDashboardConfig: (r) => {
|
|
49
|
+
const o = l(), s = [
|
|
50
|
+
...o.allDashboardConfigs.filter((n) => n.dashboardId !== r.dashboardId),
|
|
51
|
+
r
|
|
173
52
|
];
|
|
174
53
|
return e(() => ({
|
|
175
|
-
...
|
|
176
|
-
allDashboardConfigs:
|
|
177
|
-
currentDashboardConfig:
|
|
178
|
-
})),
|
|
54
|
+
...o,
|
|
55
|
+
allDashboardConfigs: s,
|
|
56
|
+
currentDashboardConfig: r
|
|
57
|
+
})), s;
|
|
179
58
|
},
|
|
180
|
-
deleteDashboardConfigById: (
|
|
181
|
-
const
|
|
59
|
+
deleteDashboardConfigById: (r) => {
|
|
60
|
+
const o = l(), s = [...o.allDashboardConfigs.filter((n) => n.dashboardId !== r)];
|
|
182
61
|
return e(() => ({
|
|
183
|
-
...
|
|
184
|
-
allDashboardConfigs:
|
|
185
|
-
currentDashboardConfig:
|
|
186
|
-
})),
|
|
62
|
+
...o,
|
|
63
|
+
allDashboardConfigs: s,
|
|
64
|
+
currentDashboardConfig: s[0] || Ce
|
|
65
|
+
})), s;
|
|
187
66
|
},
|
|
188
|
-
selectDashboardById: (
|
|
189
|
-
const
|
|
190
|
-
return
|
|
191
|
-
currentDashboardConfig:
|
|
67
|
+
selectDashboardById: (r) => (e(() => {
|
|
68
|
+
const o = l(), s = o.allDashboardConfigs.find((n) => n.dashboardId === r);
|
|
69
|
+
return s ? {
|
|
70
|
+
currentDashboardConfig: s
|
|
192
71
|
} : {
|
|
193
|
-
...
|
|
72
|
+
...o
|
|
194
73
|
};
|
|
195
|
-
}),
|
|
196
|
-
addWidget: (
|
|
197
|
-
const
|
|
198
|
-
dashboardConfig:
|
|
199
|
-
...
|
|
200
|
-
}),
|
|
201
|
-
...
|
|
202
|
-
(
|
|
74
|
+
}), l().currentDashboardConfig),
|
|
75
|
+
addWidget: (r) => {
|
|
76
|
+
const o = l(), s = he.addWidget({
|
|
77
|
+
dashboardConfig: o.currentDashboardConfig,
|
|
78
|
+
...r
|
|
79
|
+
}), n = [
|
|
80
|
+
...o.allDashboardConfigs.filter(
|
|
81
|
+
(f) => f.dashboardId !== s.updatedDashboardConfig.dashboardId
|
|
203
82
|
),
|
|
204
|
-
|
|
83
|
+
s.updatedDashboardConfig
|
|
205
84
|
];
|
|
206
|
-
return
|
|
207
|
-
allDashboardConfigs:
|
|
208
|
-
currentDashboardConfig:
|
|
85
|
+
return s.success && e(() => ({
|
|
86
|
+
allDashboardConfigs: n,
|
|
87
|
+
currentDashboardConfig: s.updatedDashboardConfig
|
|
209
88
|
})), {
|
|
210
|
-
...
|
|
211
|
-
allUpdatedDashboardConfigs:
|
|
89
|
+
...s,
|
|
90
|
+
allUpdatedDashboardConfigs: n
|
|
212
91
|
};
|
|
213
92
|
},
|
|
214
|
-
removeWidget: (
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
|
|
93
|
+
removeWidget: (r, o) => {
|
|
94
|
+
const s = l(), n = he.removeWidget(
|
|
95
|
+
s.currentDashboardConfig,
|
|
96
|
+
r,
|
|
97
|
+
o
|
|
98
|
+
), f = [
|
|
99
|
+
...s.allDashboardConfigs.filter(
|
|
100
|
+
(g) => g.dashboardId !== n.updatedDashboardConfig.dashboardId
|
|
218
101
|
),
|
|
219
|
-
|
|
102
|
+
n.updatedDashboardConfig
|
|
220
103
|
];
|
|
221
|
-
return
|
|
222
|
-
allDashboardConfigs:
|
|
223
|
-
currentDashboardConfig:
|
|
104
|
+
return n.success && e(() => ({
|
|
105
|
+
allDashboardConfigs: f,
|
|
106
|
+
currentDashboardConfig: n.updatedDashboardConfig
|
|
224
107
|
})), {
|
|
225
|
-
...
|
|
226
|
-
allUpdatedDashboardConfigs:
|
|
108
|
+
...n,
|
|
109
|
+
allUpdatedDashboardConfigs: f
|
|
227
110
|
};
|
|
228
111
|
},
|
|
229
|
-
moveWidget: (
|
|
230
|
-
const
|
|
231
|
-
|
|
232
|
-
|
|
112
|
+
moveWidget: (r, o, s) => {
|
|
113
|
+
const n = l(), f = he.moveWidget(
|
|
114
|
+
n.currentDashboardConfig,
|
|
115
|
+
r,
|
|
116
|
+
o,
|
|
117
|
+
s
|
|
118
|
+
), g = [
|
|
119
|
+
...n.allDashboardConfigs.filter(
|
|
120
|
+
(D) => D.dashboardId !== f.updatedDashboardConfig.dashboardId
|
|
233
121
|
),
|
|
234
|
-
|
|
122
|
+
f.updatedDashboardConfig
|
|
235
123
|
];
|
|
236
|
-
return
|
|
237
|
-
allDashboardConfigs:
|
|
238
|
-
currentDashboardConfig:
|
|
124
|
+
return f.success && e(() => ({
|
|
125
|
+
allDashboardConfigs: g,
|
|
126
|
+
currentDashboardConfig: f.updatedDashboardConfig
|
|
239
127
|
})), {
|
|
240
|
-
...
|
|
241
|
-
allUpdatedDashboardConfigs:
|
|
128
|
+
...f,
|
|
129
|
+
allUpdatedDashboardConfigs: g
|
|
242
130
|
};
|
|
243
131
|
}
|
|
244
|
-
}),
|
|
132
|
+
}), lr = mt()(
|
|
245
133
|
St((...e) => ({
|
|
246
|
-
...
|
|
134
|
+
...Dt(...e)
|
|
247
135
|
}))
|
|
248
|
-
),
|
|
249
|
-
const [e,
|
|
250
|
-
const c =
|
|
251
|
-
|
|
252
|
-
const
|
|
136
|
+
), cr = () => {
|
|
137
|
+
const [e, l] = ie({}), [r, o] = ie({}), s = ce((b) => {
|
|
138
|
+
const c = b.dashboardId;
|
|
139
|
+
l((p) => {
|
|
140
|
+
const m = {
|
|
253
141
|
undoIndex: 0,
|
|
254
|
-
config:
|
|
142
|
+
config: b
|
|
255
143
|
};
|
|
256
|
-
return
|
|
144
|
+
return o((T) => ({
|
|
257
145
|
...T,
|
|
258
146
|
[c]: 0
|
|
259
147
|
})), {
|
|
260
|
-
...
|
|
261
|
-
[c]: [
|
|
148
|
+
...p,
|
|
149
|
+
[c]: [m]
|
|
262
150
|
// Forces a reset to just this one entry
|
|
263
151
|
};
|
|
264
152
|
});
|
|
265
|
-
}, []),
|
|
266
|
-
(
|
|
267
|
-
|
|
268
|
-
const
|
|
269
|
-
undoIndex:
|
|
153
|
+
}, []), n = ce(
|
|
154
|
+
(b) => {
|
|
155
|
+
l((c) => {
|
|
156
|
+
const p = b.dashboardId, m = c[p] || [], T = r[p] ?? -1, h = m.slice(0, T + 1), y = {
|
|
157
|
+
undoIndex: h.length,
|
|
270
158
|
// New index based on trimmed length
|
|
271
|
-
config:
|
|
272
|
-
},
|
|
273
|
-
return
|
|
274
|
-
...
|
|
275
|
-
[
|
|
159
|
+
config: b
|
|
160
|
+
}, x = [...h, y];
|
|
161
|
+
return o((E) => ({
|
|
162
|
+
...E,
|
|
163
|
+
[p]: x.length - 1
|
|
276
164
|
// Index is now the last element's index
|
|
277
165
|
})), {
|
|
278
166
|
...c,
|
|
279
|
-
[
|
|
167
|
+
[p]: x
|
|
280
168
|
};
|
|
281
169
|
});
|
|
282
170
|
},
|
|
283
|
-
[
|
|
284
|
-
),
|
|
285
|
-
|
|
286
|
-
if (!c[
|
|
171
|
+
[r]
|
|
172
|
+
), f = ce((b) => {
|
|
173
|
+
l((c) => {
|
|
174
|
+
if (!c[b])
|
|
287
175
|
return c;
|
|
288
|
-
const { [
|
|
289
|
-
return
|
|
290
|
-
}),
|
|
291
|
-
const { [
|
|
292
|
-
return
|
|
176
|
+
const { [b]: p, ...m } = c;
|
|
177
|
+
return m;
|
|
178
|
+
}), o((c) => {
|
|
179
|
+
const { [b]: p, ...m } = c;
|
|
180
|
+
return m;
|
|
293
181
|
});
|
|
294
|
-
}, []),
|
|
295
|
-
(
|
|
296
|
-
|
|
297
|
-
const
|
|
298
|
-
return
|
|
182
|
+
}, []), g = ce(
|
|
183
|
+
(b) => {
|
|
184
|
+
o((c) => {
|
|
185
|
+
const p = c[b] ?? -1, m = Math.max(0, p - 1);
|
|
186
|
+
return m !== p ? { ...c, [b]: m } : c;
|
|
299
187
|
});
|
|
300
188
|
},
|
|
301
189
|
[
|
|
302
190
|
//loadConfigFromHistory
|
|
303
191
|
]
|
|
304
|
-
),
|
|
305
|
-
(
|
|
306
|
-
|
|
307
|
-
const
|
|
308
|
-
return T !==
|
|
192
|
+
), D = ce(
|
|
193
|
+
(b) => {
|
|
194
|
+
o((c) => {
|
|
195
|
+
const p = e[b]?.length || 0, m = c[b] ?? -1, T = Math.min(p - 1, m + 1);
|
|
196
|
+
return T !== m ? { ...c, [b]: T } : c;
|
|
309
197
|
});
|
|
310
198
|
},
|
|
311
199
|
[
|
|
@@ -314,26 +202,26 @@ const wt = (e) => (i, t, r) => {
|
|
|
314
202
|
]
|
|
315
203
|
);
|
|
316
204
|
return {
|
|
317
|
-
initializeHistoryForDashboard:
|
|
318
|
-
resetAllHistory: () =>
|
|
319
|
-
addUndoEntry:
|
|
320
|
-
removeUndoHistoryForDashboard:
|
|
321
|
-
undo:
|
|
322
|
-
redo:
|
|
323
|
-
getUndoStatus: (
|
|
324
|
-
const c =
|
|
325
|
-
return { isUndoDisabled:
|
|
205
|
+
initializeHistoryForDashboard: s,
|
|
206
|
+
resetAllHistory: () => l({}),
|
|
207
|
+
addUndoEntry: n,
|
|
208
|
+
removeUndoHistoryForDashboard: f,
|
|
209
|
+
undo: g,
|
|
210
|
+
redo: D,
|
|
211
|
+
getUndoStatus: (b) => {
|
|
212
|
+
const c = r[b] ?? -1, p = e[b]?.length || 0, m = c <= 0, T = c >= p - 1;
|
|
213
|
+
return { isUndoDisabled: m, isRedoDisabled: T };
|
|
326
214
|
},
|
|
327
215
|
undoHistory: e,
|
|
328
|
-
historyIndex:
|
|
216
|
+
historyIndex: r
|
|
329
217
|
// (Optional: You might expose undoHistory and historyIndex if needed for debugging)
|
|
330
218
|
};
|
|
331
219
|
};
|
|
332
|
-
function
|
|
220
|
+
function K({
|
|
333
221
|
children: e,
|
|
334
|
-
className:
|
|
222
|
+
className: l
|
|
335
223
|
}) {
|
|
336
|
-
return /* @__PURE__ */
|
|
224
|
+
return /* @__PURE__ */ t(
|
|
337
225
|
"svg",
|
|
338
226
|
{
|
|
339
227
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -345,243 +233,243 @@ function U({
|
|
|
345
233
|
strokeWidth: "2",
|
|
346
234
|
strokeLinecap: "round",
|
|
347
235
|
strokeLinejoin: "round",
|
|
348
|
-
className:
|
|
236
|
+
className: l,
|
|
349
237
|
children: e
|
|
350
238
|
}
|
|
351
239
|
);
|
|
352
240
|
}
|
|
353
|
-
function
|
|
354
|
-
return /* @__PURE__ */
|
|
355
|
-
/* @__PURE__ */
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
/* @__PURE__ */
|
|
241
|
+
function dr({ className: e }) {
|
|
242
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
|
|
243
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10" }),
|
|
244
|
+
/* @__PURE__ */ t("path", { d: "M8 12h8" }),
|
|
245
|
+
/* @__PURE__ */ t("path", { d: "M12 8v8" })
|
|
358
246
|
] });
|
|
359
247
|
}
|
|
360
|
-
function
|
|
361
|
-
return /* @__PURE__ */
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
/* @__PURE__ */
|
|
364
|
-
/* @__PURE__ */
|
|
365
|
-
/* @__PURE__ */
|
|
366
|
-
/* @__PURE__ */
|
|
248
|
+
function ur({ className: e }) {
|
|
249
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
|
|
250
|
+
/* @__PURE__ */ t("path", { d: "M10 11v6" }),
|
|
251
|
+
/* @__PURE__ */ t("path", { d: "M14 11v6" }),
|
|
252
|
+
/* @__PURE__ */ t("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
253
|
+
/* @__PURE__ */ t("path", { d: "M3 6h18" }),
|
|
254
|
+
/* @__PURE__ */ t("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
367
255
|
] });
|
|
368
256
|
}
|
|
369
|
-
function
|
|
370
|
-
return /* @__PURE__ */
|
|
371
|
-
/* @__PURE__ */
|
|
372
|
-
/* @__PURE__ */
|
|
257
|
+
function fr({ className: e }) {
|
|
258
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
|
|
259
|
+
/* @__PURE__ */ t("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
260
|
+
/* @__PURE__ */ t("path", { d: "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" })
|
|
373
261
|
] });
|
|
374
262
|
}
|
|
375
|
-
function
|
|
376
|
-
return /* @__PURE__ */
|
|
377
|
-
|
|
263
|
+
function hr({ className: e }) {
|
|
264
|
+
return /* @__PURE__ */ I(
|
|
265
|
+
K,
|
|
378
266
|
{
|
|
379
267
|
className: `lucide lucide-text-cursor-input-icon lucide-text-cursor-input ${e}`,
|
|
380
268
|
children: [
|
|
381
|
-
/* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
383
|
-
/* @__PURE__ */
|
|
384
|
-
/* @__PURE__ */
|
|
385
|
-
/* @__PURE__ */
|
|
269
|
+
/* @__PURE__ */ t("path", { d: "M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6" }),
|
|
270
|
+
/* @__PURE__ */ t("path", { d: "M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7" }),
|
|
271
|
+
/* @__PURE__ */ t("path", { d: "M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1" }),
|
|
272
|
+
/* @__PURE__ */ t("path", { d: "M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1" }),
|
|
273
|
+
/* @__PURE__ */ t("path", { d: "M9 6v12" })
|
|
386
274
|
]
|
|
387
275
|
}
|
|
388
276
|
);
|
|
389
277
|
}
|
|
390
|
-
function
|
|
391
|
-
return /* @__PURE__ */
|
|
392
|
-
/* @__PURE__ */
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
396
|
-
/* @__PURE__ */
|
|
278
|
+
function gr({ className: e }) {
|
|
279
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-grid3x3-icon lucide-grid-3x3 ${e}`, children: [
|
|
280
|
+
/* @__PURE__ */ t("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
281
|
+
/* @__PURE__ */ t("path", { d: "M3 9h18" }),
|
|
282
|
+
/* @__PURE__ */ t("path", { d: "M3 15h18" }),
|
|
283
|
+
/* @__PURE__ */ t("path", { d: "M9 3v18" }),
|
|
284
|
+
/* @__PURE__ */ t("path", { d: "M15 3v18" })
|
|
397
285
|
] });
|
|
398
286
|
}
|
|
399
|
-
function
|
|
400
|
-
return /* @__PURE__ */
|
|
401
|
-
/* @__PURE__ */
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
/* @__PURE__ */
|
|
287
|
+
function mr({ className: e }) {
|
|
288
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-monitor-icon lucide-monitor ${e}`, children: [
|
|
289
|
+
/* @__PURE__ */ t("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
290
|
+
/* @__PURE__ */ t("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
|
|
291
|
+
/* @__PURE__ */ t("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
|
|
404
292
|
] });
|
|
405
293
|
}
|
|
406
|
-
function
|
|
407
|
-
return /* @__PURE__ */
|
|
408
|
-
|
|
294
|
+
function pr({ className: e }) {
|
|
295
|
+
return /* @__PURE__ */ I(
|
|
296
|
+
K,
|
|
409
297
|
{
|
|
410
298
|
className: `lucide lucide-monitor-smartphone-icon lucide-monitor-smartphone ${e}`,
|
|
411
299
|
children: [
|
|
412
|
-
/* @__PURE__ */
|
|
413
|
-
/* @__PURE__ */
|
|
414
|
-
/* @__PURE__ */
|
|
415
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ t("path", { d: "M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8" }),
|
|
301
|
+
/* @__PURE__ */ t("path", { d: "M10 19v-3.96 3.15" }),
|
|
302
|
+
/* @__PURE__ */ t("path", { d: "M7 19h5" }),
|
|
303
|
+
/* @__PURE__ */ t("rect", { width: "6", height: "10", x: "16", y: "12", rx: "2" })
|
|
416
304
|
]
|
|
417
305
|
}
|
|
418
306
|
);
|
|
419
307
|
}
|
|
420
308
|
function it({ className: e }) {
|
|
421
|
-
return /* @__PURE__ */
|
|
422
|
-
|
|
309
|
+
return /* @__PURE__ */ I(
|
|
310
|
+
K,
|
|
423
311
|
{
|
|
424
312
|
className: `lucide lucide-circle-arrow-left-icon lucide-circle-arrow-left ${e}`,
|
|
425
313
|
children: [
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10" }),
|
|
315
|
+
/* @__PURE__ */ t("path", { d: "m12 8-4 4 4 4" }),
|
|
316
|
+
/* @__PURE__ */ t("path", { d: "M16 12H8" })
|
|
429
317
|
]
|
|
430
318
|
}
|
|
431
319
|
);
|
|
432
320
|
}
|
|
433
|
-
function
|
|
434
|
-
return /* @__PURE__ */
|
|
435
|
-
|
|
321
|
+
function st({ className: e }) {
|
|
322
|
+
return /* @__PURE__ */ I(
|
|
323
|
+
K,
|
|
436
324
|
{
|
|
437
325
|
className: `lucide lucide-circle-arrow-right-icon lucide-circle-arrow-right ${e}`,
|
|
438
326
|
children: [
|
|
439
|
-
/* @__PURE__ */
|
|
440
|
-
/* @__PURE__ */
|
|
441
|
-
/* @__PURE__ */
|
|
327
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10" }),
|
|
328
|
+
/* @__PURE__ */ t("path", { d: "m12 16 4-4-4-4" }),
|
|
329
|
+
/* @__PURE__ */ t("path", { d: "M8 12h8" })
|
|
442
330
|
]
|
|
443
331
|
}
|
|
444
332
|
);
|
|
445
333
|
}
|
|
446
|
-
function
|
|
447
|
-
return /* @__PURE__ */
|
|
448
|
-
/* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */
|
|
334
|
+
function Tt({ className: e }) {
|
|
335
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-settings-icon lucide-settings ${e}`, children: [
|
|
336
|
+
/* @__PURE__ */ t("path", { d: "M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915" }),
|
|
337
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "3" })
|
|
450
338
|
] });
|
|
451
339
|
}
|
|
452
|
-
function
|
|
453
|
-
return /* @__PURE__ */
|
|
454
|
-
|
|
340
|
+
function yr({ className: e }) {
|
|
341
|
+
return /* @__PURE__ */ I(
|
|
342
|
+
K,
|
|
455
343
|
{
|
|
456
344
|
className: `lucide lucide-tablet-smartphone-icon lucide-tablet-smartphone ${e}`,
|
|
457
345
|
children: [
|
|
458
|
-
/* @__PURE__ */
|
|
459
|
-
/* @__PURE__ */
|
|
460
|
-
/* @__PURE__ */
|
|
346
|
+
/* @__PURE__ */ t("rect", { width: "10", height: "14", x: "3", y: "8", rx: "2" }),
|
|
347
|
+
/* @__PURE__ */ t("path", { d: "M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4" }),
|
|
348
|
+
/* @__PURE__ */ t("path", { d: "M8 18h.01" })
|
|
461
349
|
]
|
|
462
350
|
}
|
|
463
351
|
);
|
|
464
352
|
}
|
|
465
|
-
function
|
|
466
|
-
return /* @__PURE__ */
|
|
467
|
-
/* @__PURE__ */
|
|
468
|
-
/* @__PURE__ */
|
|
469
|
-
/* @__PURE__ */
|
|
353
|
+
function lt({ className: e }) {
|
|
354
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-circle-x-icon lucide-circle-x ${e}`, children: [
|
|
355
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10" }),
|
|
356
|
+
/* @__PURE__ */ t("path", { d: "m15 9-6 6" }),
|
|
357
|
+
/* @__PURE__ */ t("path", { d: "m9 9 6 6" })
|
|
470
358
|
] });
|
|
471
359
|
}
|
|
472
|
-
function
|
|
473
|
-
return /* @__PURE__ */
|
|
474
|
-
/* @__PURE__ */
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */
|
|
477
|
-
/* @__PURE__ */
|
|
360
|
+
function br({ className: e }) {
|
|
361
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
|
|
362
|
+
/* @__PURE__ */ t("circle", { cx: "11", cy: "11", r: "8" }),
|
|
363
|
+
/* @__PURE__ */ t("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
364
|
+
/* @__PURE__ */ t("line", { x1: "11", x2: "11", y1: "8", y2: "14" }),
|
|
365
|
+
/* @__PURE__ */ t("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
478
366
|
] });
|
|
479
367
|
}
|
|
480
|
-
function
|
|
481
|
-
return /* @__PURE__ */
|
|
482
|
-
/* @__PURE__ */
|
|
483
|
-
/* @__PURE__ */
|
|
484
|
-
/* @__PURE__ */
|
|
368
|
+
function vr({ className: e }) {
|
|
369
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-zoom-out-icon lucide-zoom-out ${e}`, children: [
|
|
370
|
+
/* @__PURE__ */ t("circle", { cx: "11", cy: "11", r: "8" }),
|
|
371
|
+
/* @__PURE__ */ t("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
372
|
+
/* @__PURE__ */ t("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
485
373
|
] });
|
|
486
374
|
}
|
|
487
|
-
function
|
|
488
|
-
return /* @__PURE__ */
|
|
489
|
-
/* @__PURE__ */
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
/* @__PURE__ */
|
|
492
|
-
/* @__PURE__ */
|
|
375
|
+
function Et({ className: e }) {
|
|
376
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-timer-reset-icon lucide-timer-reset ${e}`, children: [
|
|
377
|
+
/* @__PURE__ */ t("path", { d: "M10 2h4" }),
|
|
378
|
+
/* @__PURE__ */ t("path", { d: "M12 14v-4" }),
|
|
379
|
+
/* @__PURE__ */ t("path", { d: "M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6" }),
|
|
380
|
+
/* @__PURE__ */ t("path", { d: "M9 17H4v5" })
|
|
493
381
|
] });
|
|
494
382
|
}
|
|
495
|
-
function
|
|
496
|
-
return /* @__PURE__ */
|
|
497
|
-
/* @__PURE__ */
|
|
498
|
-
/* @__PURE__ */
|
|
383
|
+
function Nt({ className: e }) {
|
|
384
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-undo-icon lucide-undo ${e}`, children: [
|
|
385
|
+
/* @__PURE__ */ t("path", { d: "M3 7v6h6" }),
|
|
386
|
+
/* @__PURE__ */ t("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" })
|
|
499
387
|
] });
|
|
500
388
|
}
|
|
501
|
-
function
|
|
502
|
-
return /* @__PURE__ */
|
|
503
|
-
/* @__PURE__ */
|
|
504
|
-
/* @__PURE__ */
|
|
389
|
+
function _t({ className: e }) {
|
|
390
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-redo-icon lucide-redo ${e}`, children: [
|
|
391
|
+
/* @__PURE__ */ t("path", { d: "M21 7v6h-6" }),
|
|
392
|
+
/* @__PURE__ */ t("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" })
|
|
505
393
|
] });
|
|
506
394
|
}
|
|
507
|
-
function
|
|
508
|
-
return /* @__PURE__ */
|
|
509
|
-
/* @__PURE__ */
|
|
510
|
-
/* @__PURE__ */
|
|
511
|
-
/* @__PURE__ */
|
|
512
|
-
/* @__PURE__ */
|
|
395
|
+
function Mt({ className: e }) {
|
|
396
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-hand-icon lucide-hand ${e}`, children: [
|
|
397
|
+
/* @__PURE__ */ t("path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
|
|
398
|
+
/* @__PURE__ */ t("path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
399
|
+
/* @__PURE__ */ t("path", { d: "M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8" }),
|
|
400
|
+
/* @__PURE__ */ t("path", { d: "M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15" })
|
|
513
401
|
] });
|
|
514
402
|
}
|
|
515
|
-
function
|
|
516
|
-
return /* @__PURE__ */
|
|
517
|
-
/* @__PURE__ */
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */
|
|
521
|
-
/* @__PURE__ */
|
|
403
|
+
function Pt({ className: e }) {
|
|
404
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-hand-grab-icon lucide-hand-grab ${e}`, children: [
|
|
405
|
+
/* @__PURE__ */ t("path", { d: "M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4" }),
|
|
406
|
+
/* @__PURE__ */ t("path", { d: "M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
407
|
+
/* @__PURE__ */ t("path", { d: "M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5" }),
|
|
408
|
+
/* @__PURE__ */ t("path", { d: "M6 14a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
|
|
409
|
+
/* @__PURE__ */ t("path", { d: "M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-4a8 8 0 0 1-8-8 2 2 0 1 1 4 0" })
|
|
522
410
|
] });
|
|
523
411
|
}
|
|
524
|
-
function
|
|
525
|
-
return /* @__PURE__ */
|
|
526
|
-
/* @__PURE__ */
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
/* @__PURE__ */
|
|
412
|
+
function It({ className: e }) {
|
|
413
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-crosshair-icon lucide-crosshair ${e}`, children: [
|
|
414
|
+
/* @__PURE__ */ t("line", { x1: "22", x2: "18", y1: "12", y2: "12" }),
|
|
415
|
+
/* @__PURE__ */ t("line", { x1: "6", x2: "2", y1: "12", y2: "12" }),
|
|
416
|
+
/* @__PURE__ */ t("line", { x1: "12", x2: "12", y1: "6", y2: "2" }),
|
|
417
|
+
/* @__PURE__ */ t("line", { x1: "12", x2: "12", y1: "22", y2: "18" })
|
|
530
418
|
] });
|
|
531
419
|
}
|
|
532
|
-
function
|
|
533
|
-
return /* @__PURE__ */
|
|
534
|
-
/* @__PURE__ */
|
|
535
|
-
/* @__PURE__ */
|
|
536
|
-
/* @__PURE__ */
|
|
420
|
+
function xr({ className: e }) {
|
|
421
|
+
return /* @__PURE__ */ I(K, { className: `lucide lucide-target-icon lucide-target ${e}`, children: [
|
|
422
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10" }),
|
|
423
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "6" }),
|
|
424
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "2" })
|
|
537
425
|
] });
|
|
538
426
|
}
|
|
539
|
-
function
|
|
540
|
-
return /* @__PURE__ */
|
|
541
|
-
|
|
427
|
+
function Rt({ className: e }) {
|
|
428
|
+
return /* @__PURE__ */ I(
|
|
429
|
+
K,
|
|
542
430
|
{
|
|
543
431
|
className: `lucide lucide-file-question-mark-icon lucide-file-question-mark ${e}`,
|
|
544
432
|
children: [
|
|
545
|
-
/* @__PURE__ */
|
|
546
|
-
/* @__PURE__ */
|
|
547
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ t("circle", { cx: "12", cy: "12", r: "10" }),
|
|
434
|
+
/* @__PURE__ */ t("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
435
|
+
/* @__PURE__ */ t("path", { d: "M12 17h.01" })
|
|
548
436
|
]
|
|
549
437
|
}
|
|
550
438
|
);
|
|
551
439
|
}
|
|
552
|
-
const
|
|
440
|
+
const ct = ({
|
|
553
441
|
label: e,
|
|
554
|
-
className:
|
|
555
|
-
size:
|
|
556
|
-
value:
|
|
557
|
-
onChange:
|
|
558
|
-
onKeyDown:
|
|
559
|
-
placeholder:
|
|
442
|
+
className: l,
|
|
443
|
+
size: r = "medium",
|
|
444
|
+
value: o,
|
|
445
|
+
onChange: s,
|
|
446
|
+
onKeyDown: n,
|
|
447
|
+
placeholder: f = ""
|
|
560
448
|
}) => {
|
|
561
|
-
const
|
|
449
|
+
const g = ot(() => r === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [r]), D = G("flex flex-col mb-4", l || ""), b = `${G(`
|
|
562
450
|
block w-full rounded-md px-3 py-1.5 text-base
|
|
563
451
|
bg-formfield content-formfield
|
|
564
452
|
outline-1 -outline-offset-1 outline-primary
|
|
565
453
|
placeholder:text-disabled
|
|
566
454
|
focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-200 sm:text-sm/6
|
|
567
|
-
`)} ${
|
|
568
|
-
return /* @__PURE__ */
|
|
569
|
-
/* @__PURE__ */
|
|
570
|
-
/* @__PURE__ */
|
|
455
|
+
`)} ${g}`;
|
|
456
|
+
return /* @__PURE__ */ I("div", { className: D, children: [
|
|
457
|
+
/* @__PURE__ */ t("label", { htmlFor: e, className: "block text-sm/6 font-medium mb-1.5", children: e }),
|
|
458
|
+
/* @__PURE__ */ t(
|
|
571
459
|
"input",
|
|
572
460
|
{
|
|
573
461
|
id: e,
|
|
574
462
|
type: "text",
|
|
575
|
-
value:
|
|
576
|
-
onChange:
|
|
577
|
-
onKeyDown: (c) =>
|
|
578
|
-
placeholder:
|
|
579
|
-
className:
|
|
463
|
+
value: o,
|
|
464
|
+
onChange: s,
|
|
465
|
+
onKeyDown: (c) => n && n(c),
|
|
466
|
+
placeholder: f,
|
|
467
|
+
className: b,
|
|
580
468
|
"aria-label": e
|
|
581
469
|
}
|
|
582
470
|
)
|
|
583
471
|
] });
|
|
584
|
-
},
|
|
472
|
+
}, we = /* @__PURE__ */ new Map([
|
|
585
473
|
[
|
|
586
474
|
"normal",
|
|
587
475
|
"group bg-[category] content-[category] hover:bg-[category] group-hover:bg-[category] focus:outline-[category] focus:outline-offset-[category]"
|
|
@@ -593,67 +481,67 @@ const lt = ({
|
|
|
593
481
|
]);
|
|
594
482
|
function J(e) {
|
|
595
483
|
const {
|
|
596
|
-
tooltip:
|
|
597
|
-
disabled:
|
|
598
|
-
isIconButton:
|
|
599
|
-
className:
|
|
600
|
-
buttonType:
|
|
601
|
-
category:
|
|
602
|
-
px:
|
|
603
|
-
py:
|
|
604
|
-
children:
|
|
605
|
-
...
|
|
484
|
+
tooltip: l,
|
|
485
|
+
disabled: r,
|
|
486
|
+
isIconButton: o,
|
|
487
|
+
className: s,
|
|
488
|
+
buttonType: n,
|
|
489
|
+
category: f,
|
|
490
|
+
px: g,
|
|
491
|
+
py: D,
|
|
492
|
+
children: S,
|
|
493
|
+
...b
|
|
606
494
|
} = e, c = () => {
|
|
607
|
-
const
|
|
608
|
-
let
|
|
609
|
-
|
|
610
|
-
const
|
|
611
|
-
if (
|
|
495
|
+
const m = e.isIconButton || !1, T = e.category || "primary", h = e.buttonType || "normal", y = e.disabled || !1, x = e.className || "", E = e.font || "semibold", C = Number((e.border || 0) > 0 ? e.border : 0);
|
|
496
|
+
let w = (e.borderColor || "").trim();
|
|
497
|
+
w = w.length > 0 ? w : "";
|
|
498
|
+
const i = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), M = e.shadow || "sm", a = e.shadowHover || "md", u = (e.addCss || "").trim(), d = e.justifyCss || "justify-center";
|
|
499
|
+
if (m)
|
|
612
500
|
return G(
|
|
613
501
|
"flex flex-row items-center",
|
|
614
|
-
|
|
615
|
-
|
|
502
|
+
y ? "text-disabled" : `text-${T} hover:brightness-110 cursor-pointer`,
|
|
503
|
+
x || ""
|
|
616
504
|
);
|
|
617
505
|
const _ = [
|
|
618
506
|
"relative cursor-pointer",
|
|
619
507
|
"rounded-sm focus:outline-none focus:ring focus:ring-offset",
|
|
620
508
|
"transition-all duration-150",
|
|
621
509
|
"text-sm",
|
|
622
|
-
`font-${
|
|
510
|
+
`font-${E}`
|
|
623
511
|
];
|
|
624
|
-
if (
|
|
625
|
-
|
|
512
|
+
if (y)
|
|
513
|
+
h === "ghost" ? _.push("text-disabled border-disabled cursor-not-allowed") : _.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
|
|
626
514
|
else {
|
|
627
515
|
_.push("cursor-pointer");
|
|
628
|
-
let
|
|
629
|
-
|
|
630
|
-
const H =
|
|
516
|
+
let R = "";
|
|
517
|
+
we.has(h) ? R = `${we.get(h)}` : R = `${we.get("normal")}`, C < 1 && (R = R.replace("border-[category]", ""));
|
|
518
|
+
const H = R.replace(/\[category\]/g, T).trim();
|
|
631
519
|
_.push(H);
|
|
632
520
|
}
|
|
633
|
-
return
|
|
634
|
-
},
|
|
635
|
-
const
|
|
521
|
+
return C > 0 ? (_.push(`border-[${C}px]`), _.push(`border-${w}`)) : (_.push("border-[1px]"), _.push("border-transparent")), i > 0 ? (_.push(`hover:border-[${i}px] group-hover:border-[${i}px]`), _.push(`hover:border-${w} group-hover:border-${w}`)) : _.push("hover:border-[1px] group-hover:border-[1px]"), _.push(`shadow-${M}`), _.push(`hover:shadow-${a} group-hover:shadow-${a}`), u.length > 0 && _.push(u), u.indexOf("hidden") === -1 && _.push("inline-flex"), _.push(d), _.join(" ").trim();
|
|
522
|
+
}, p = () => {
|
|
523
|
+
const m = e.px || 0.7, T = e.py || 0.25;
|
|
636
524
|
return {
|
|
637
|
-
padding:
|
|
525
|
+
padding: o ? 0 : `${T}rem ${m}rem `
|
|
638
526
|
};
|
|
639
527
|
};
|
|
640
|
-
return /* @__PURE__ */
|
|
528
|
+
return /* @__PURE__ */ t("button", { type: "button", disabled: r, className: c(), style: p(), ...b, children: S });
|
|
641
529
|
}
|
|
642
|
-
const
|
|
643
|
-
function
|
|
644
|
-
const { children:
|
|
645
|
-
return /* @__PURE__ */
|
|
530
|
+
const $t = (e) => e.direction === "row" ? G("flex flex-row items-center gap-2", e.classNames || "") : G("flex flex-col gap-2 w-full", e.classNames || "");
|
|
531
|
+
function Ot(e) {
|
|
532
|
+
const { children: l, testId: r, classNames: o, direction: s, ...n } = e, f = $t(e);
|
|
533
|
+
return /* @__PURE__ */ t("div", { "data-testid": r || "not-set", className: f, ...n, children: l });
|
|
646
534
|
}
|
|
647
|
-
const
|
|
648
|
-
(e,
|
|
649
|
-
const { classNames:
|
|
535
|
+
const Cr = se(
|
|
536
|
+
(e, l) => {
|
|
537
|
+
const { classNames: r, innerClass: o, ...s } = e, n = G(r || "", "w-full"), f = G(
|
|
650
538
|
`w-full flex overflow-hidden justify-between items-center gap-0
|
|
651
539
|
rounded-md border`,
|
|
652
|
-
|
|
540
|
+
o || ""
|
|
653
541
|
);
|
|
654
|
-
return /* @__PURE__ */
|
|
542
|
+
return /* @__PURE__ */ t(Ot, { direction: "row", classNames: n, ...s, children: /* @__PURE__ */ t("div", { className: f, children: e.children }) });
|
|
655
543
|
}
|
|
656
|
-
),
|
|
544
|
+
), wr = se((e, l) => /* @__PURE__ */ t(
|
|
657
545
|
"div",
|
|
658
546
|
{
|
|
659
547
|
"data-testid": e.testId || "not-set",
|
|
@@ -664,8 +552,8 @@ const Nn = se(
|
|
|
664
552
|
},
|
|
665
553
|
children: e.children
|
|
666
554
|
}
|
|
667
|
-
)),
|
|
668
|
-
(e,
|
|
555
|
+
)), Sr = se(
|
|
556
|
+
(e, l) => /* @__PURE__ */ t(
|
|
669
557
|
"div",
|
|
670
558
|
{
|
|
671
559
|
"data-testid": e.testId || "not-set",
|
|
@@ -673,7 +561,7 @@ const Nn = se(
|
|
|
673
561
|
children: e.children
|
|
674
562
|
}
|
|
675
563
|
)
|
|
676
|
-
),
|
|
564
|
+
), Dr = se((e, l) => /* @__PURE__ */ t(
|
|
677
565
|
"div",
|
|
678
566
|
{
|
|
679
567
|
"data-testid": e.testId || "not-set",
|
|
@@ -685,543 +573,543 @@ const Nn = se(
|
|
|
685
573
|
children: e.children
|
|
686
574
|
}
|
|
687
575
|
));
|
|
688
|
-
function
|
|
576
|
+
function kt(e) {
|
|
689
577
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
690
578
|
}
|
|
691
|
-
var de = { exports: {} },
|
|
692
|
-
var
|
|
693
|
-
function
|
|
694
|
-
if (
|
|
695
|
-
|
|
696
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
697
|
-
function
|
|
698
|
-
if (typeof
|
|
699
|
-
var M =
|
|
579
|
+
var de = { exports: {} }, Se = {}, ge = { exports: {} }, me = { exports: {} }, U = {};
|
|
580
|
+
var je;
|
|
581
|
+
function Wt() {
|
|
582
|
+
if (je) return U;
|
|
583
|
+
je = 1;
|
|
584
|
+
var e = typeof Symbol == "function" && Symbol.for, l = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, o = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, s = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, n = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, f = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, g = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, D = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, S = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, b = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, c = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, m = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, T = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, h = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, y = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, E = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
585
|
+
function C(i) {
|
|
586
|
+
if (typeof i == "object" && i !== null) {
|
|
587
|
+
var M = i.$$typeof;
|
|
700
588
|
switch (M) {
|
|
701
|
-
case
|
|
702
|
-
switch (
|
|
703
|
-
case
|
|
704
|
-
case
|
|
705
|
-
case r:
|
|
589
|
+
case l:
|
|
590
|
+
switch (i = i.type, i) {
|
|
591
|
+
case D:
|
|
592
|
+
case S:
|
|
706
593
|
case o:
|
|
707
|
-
case
|
|
594
|
+
case n:
|
|
595
|
+
case s:
|
|
708
596
|
case c:
|
|
709
|
-
return
|
|
597
|
+
return i;
|
|
710
598
|
default:
|
|
711
|
-
switch (
|
|
712
|
-
case
|
|
713
|
-
case
|
|
599
|
+
switch (i = i && i.$$typeof, i) {
|
|
600
|
+
case g:
|
|
601
|
+
case b:
|
|
714
602
|
case T:
|
|
715
|
-
case
|
|
716
|
-
case
|
|
717
|
-
return
|
|
603
|
+
case m:
|
|
604
|
+
case f:
|
|
605
|
+
return i;
|
|
718
606
|
default:
|
|
719
607
|
return M;
|
|
720
608
|
}
|
|
721
609
|
}
|
|
722
|
-
case
|
|
610
|
+
case r:
|
|
723
611
|
return M;
|
|
724
612
|
}
|
|
725
613
|
}
|
|
726
614
|
}
|
|
727
|
-
function
|
|
728
|
-
return
|
|
615
|
+
function w(i) {
|
|
616
|
+
return C(i) === S;
|
|
729
617
|
}
|
|
730
|
-
return
|
|
731
|
-
return
|
|
732
|
-
},
|
|
733
|
-
return
|
|
734
|
-
},
|
|
735
|
-
return
|
|
736
|
-
},
|
|
737
|
-
return typeof
|
|
738
|
-
},
|
|
739
|
-
return
|
|
740
|
-
},
|
|
741
|
-
return
|
|
742
|
-
},
|
|
743
|
-
return
|
|
744
|
-
},
|
|
745
|
-
return
|
|
746
|
-
},
|
|
747
|
-
return
|
|
748
|
-
},
|
|
749
|
-
return
|
|
750
|
-
},
|
|
751
|
-
return
|
|
752
|
-
},
|
|
753
|
-
return
|
|
754
|
-
},
|
|
755
|
-
return typeof
|
|
756
|
-
},
|
|
618
|
+
return U.AsyncMode = D, U.ConcurrentMode = S, U.ContextConsumer = g, U.ContextProvider = f, U.Element = l, U.ForwardRef = b, U.Fragment = o, U.Lazy = T, U.Memo = m, U.Portal = r, U.Profiler = n, U.StrictMode = s, U.Suspense = c, U.isAsyncMode = function(i) {
|
|
619
|
+
return w(i) || C(i) === D;
|
|
620
|
+
}, U.isConcurrentMode = w, U.isContextConsumer = function(i) {
|
|
621
|
+
return C(i) === g;
|
|
622
|
+
}, U.isContextProvider = function(i) {
|
|
623
|
+
return C(i) === f;
|
|
624
|
+
}, U.isElement = function(i) {
|
|
625
|
+
return typeof i == "object" && i !== null && i.$$typeof === l;
|
|
626
|
+
}, U.isForwardRef = function(i) {
|
|
627
|
+
return C(i) === b;
|
|
628
|
+
}, U.isFragment = function(i) {
|
|
629
|
+
return C(i) === o;
|
|
630
|
+
}, U.isLazy = function(i) {
|
|
631
|
+
return C(i) === T;
|
|
632
|
+
}, U.isMemo = function(i) {
|
|
633
|
+
return C(i) === m;
|
|
634
|
+
}, U.isPortal = function(i) {
|
|
635
|
+
return C(i) === r;
|
|
636
|
+
}, U.isProfiler = function(i) {
|
|
637
|
+
return C(i) === n;
|
|
638
|
+
}, U.isStrictMode = function(i) {
|
|
639
|
+
return C(i) === s;
|
|
640
|
+
}, U.isSuspense = function(i) {
|
|
641
|
+
return C(i) === c;
|
|
642
|
+
}, U.isValidElementType = function(i) {
|
|
643
|
+
return typeof i == "string" || typeof i == "function" || i === o || i === S || i === n || i === s || i === c || i === p || typeof i == "object" && i !== null && (i.$$typeof === T || i.$$typeof === m || i.$$typeof === f || i.$$typeof === g || i.$$typeof === b || i.$$typeof === y || i.$$typeof === x || i.$$typeof === E || i.$$typeof === h);
|
|
644
|
+
}, U.typeOf = C, U;
|
|
757
645
|
}
|
|
758
646
|
var Y = {};
|
|
759
|
-
var
|
|
760
|
-
function
|
|
761
|
-
return
|
|
762
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
763
|
-
function
|
|
764
|
-
return typeof
|
|
765
|
-
|
|
766
|
-
}
|
|
767
|
-
function
|
|
768
|
-
if (typeof
|
|
769
|
-
var te =
|
|
647
|
+
var Ae;
|
|
648
|
+
function jt() {
|
|
649
|
+
return Ae || (Ae = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
650
|
+
var e = typeof Symbol == "function" && Symbol.for, l = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, r = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, o = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, s = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, n = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, f = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, g = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, D = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, S = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, b = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, c = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, p = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, m = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, T = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, h = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, y = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, x = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, E = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
651
|
+
function C(N) {
|
|
652
|
+
return typeof N == "string" || typeof N == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
653
|
+
N === o || N === S || N === n || N === s || N === c || N === p || typeof N == "object" && N !== null && (N.$$typeof === T || N.$$typeof === m || N.$$typeof === f || N.$$typeof === g || N.$$typeof === b || N.$$typeof === y || N.$$typeof === x || N.$$typeof === E || N.$$typeof === h);
|
|
654
|
+
}
|
|
655
|
+
function w(N) {
|
|
656
|
+
if (typeof N == "object" && N !== null) {
|
|
657
|
+
var te = N.$$typeof;
|
|
770
658
|
switch (te) {
|
|
771
|
-
case
|
|
772
|
-
var fe =
|
|
659
|
+
case l:
|
|
660
|
+
var fe = N.type;
|
|
773
661
|
switch (fe) {
|
|
774
|
-
case
|
|
775
|
-
case
|
|
776
|
-
case r:
|
|
662
|
+
case D:
|
|
663
|
+
case S:
|
|
777
664
|
case o:
|
|
778
|
-
case
|
|
665
|
+
case n:
|
|
666
|
+
case s:
|
|
779
667
|
case c:
|
|
780
668
|
return fe;
|
|
781
669
|
default:
|
|
782
|
-
var
|
|
783
|
-
switch (
|
|
784
|
-
case
|
|
785
|
-
case
|
|
670
|
+
var We = fe && fe.$$typeof;
|
|
671
|
+
switch (We) {
|
|
672
|
+
case g:
|
|
673
|
+
case b:
|
|
786
674
|
case T:
|
|
787
|
-
case
|
|
788
|
-
case
|
|
789
|
-
return
|
|
675
|
+
case m:
|
|
676
|
+
case f:
|
|
677
|
+
return We;
|
|
790
678
|
default:
|
|
791
679
|
return te;
|
|
792
680
|
}
|
|
793
681
|
}
|
|
794
|
-
case
|
|
682
|
+
case r:
|
|
795
683
|
return te;
|
|
796
684
|
}
|
|
797
685
|
}
|
|
798
686
|
}
|
|
799
|
-
var
|
|
800
|
-
function le(
|
|
801
|
-
return
|
|
687
|
+
var i = D, M = S, a = g, u = f, d = l, _ = b, R = o, H = T, V = m, X = r, Q = n, B = s, ee = c, ae = !1;
|
|
688
|
+
function le(N) {
|
|
689
|
+
return ae || (ae = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), v(N) || w(N) === D;
|
|
802
690
|
}
|
|
803
|
-
function
|
|
804
|
-
return
|
|
691
|
+
function v(N) {
|
|
692
|
+
return w(N) === S;
|
|
805
693
|
}
|
|
806
|
-
function P(
|
|
807
|
-
return
|
|
694
|
+
function P(N) {
|
|
695
|
+
return w(N) === g;
|
|
808
696
|
}
|
|
809
|
-
function j(
|
|
810
|
-
return
|
|
697
|
+
function j(N) {
|
|
698
|
+
return w(N) === f;
|
|
811
699
|
}
|
|
812
|
-
function
|
|
813
|
-
return typeof
|
|
700
|
+
function k(N) {
|
|
701
|
+
return typeof N == "object" && N !== null && N.$$typeof === l;
|
|
814
702
|
}
|
|
815
|
-
function
|
|
816
|
-
return
|
|
703
|
+
function $(N) {
|
|
704
|
+
return w(N) === b;
|
|
817
705
|
}
|
|
818
|
-
function A(
|
|
819
|
-
return
|
|
706
|
+
function A(N) {
|
|
707
|
+
return w(N) === o;
|
|
820
708
|
}
|
|
821
|
-
function
|
|
822
|
-
return
|
|
709
|
+
function O(N) {
|
|
710
|
+
return w(N) === T;
|
|
823
711
|
}
|
|
824
|
-
function
|
|
825
|
-
return
|
|
712
|
+
function W(N) {
|
|
713
|
+
return w(N) === m;
|
|
826
714
|
}
|
|
827
|
-
function
|
|
828
|
-
return
|
|
715
|
+
function q(N) {
|
|
716
|
+
return w(N) === r;
|
|
829
717
|
}
|
|
830
|
-
function F(
|
|
831
|
-
return
|
|
718
|
+
function F(N) {
|
|
719
|
+
return w(N) === n;
|
|
832
720
|
}
|
|
833
|
-
function
|
|
834
|
-
return
|
|
721
|
+
function L(N) {
|
|
722
|
+
return w(N) === s;
|
|
835
723
|
}
|
|
836
|
-
function Z(
|
|
837
|
-
return
|
|
724
|
+
function Z(N) {
|
|
725
|
+
return w(N) === c;
|
|
838
726
|
}
|
|
839
|
-
Y.AsyncMode =
|
|
727
|
+
Y.AsyncMode = i, Y.ConcurrentMode = M, Y.ContextConsumer = a, Y.ContextProvider = u, Y.Element = d, Y.ForwardRef = _, Y.Fragment = R, Y.Lazy = H, Y.Memo = V, Y.Portal = X, Y.Profiler = Q, Y.StrictMode = B, Y.Suspense = ee, Y.isAsyncMode = le, Y.isConcurrentMode = v, Y.isContextConsumer = P, Y.isContextProvider = j, Y.isElement = k, Y.isForwardRef = $, Y.isFragment = A, Y.isLazy = O, Y.isMemo = W, Y.isPortal = q, Y.isProfiler = F, Y.isStrictMode = L, Y.isSuspense = Z, Y.isValidElementType = C, Y.typeOf = w;
|
|
840
728
|
})()), Y;
|
|
841
729
|
}
|
|
842
|
-
var
|
|
843
|
-
function
|
|
844
|
-
return
|
|
730
|
+
var qe;
|
|
731
|
+
function dt() {
|
|
732
|
+
return qe || (qe = 1, process.env.NODE_ENV === "production" ? me.exports = Wt() : me.exports = jt()), me.exports;
|
|
845
733
|
}
|
|
846
|
-
var
|
|
847
|
-
function
|
|
848
|
-
if (Le) return
|
|
734
|
+
var De, Le;
|
|
735
|
+
function At() {
|
|
736
|
+
if (Le) return De;
|
|
849
737
|
Le = 1;
|
|
850
|
-
var e = Object.getOwnPropertySymbols,
|
|
851
|
-
function
|
|
852
|
-
if (
|
|
738
|
+
var e = Object.getOwnPropertySymbols, l = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
|
|
739
|
+
function o(n) {
|
|
740
|
+
if (n == null)
|
|
853
741
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
854
|
-
return Object(
|
|
742
|
+
return Object(n);
|
|
855
743
|
}
|
|
856
|
-
function
|
|
744
|
+
function s() {
|
|
857
745
|
try {
|
|
858
746
|
if (!Object.assign)
|
|
859
747
|
return !1;
|
|
860
|
-
var
|
|
861
|
-
if (
|
|
748
|
+
var n = new String("abc");
|
|
749
|
+
if (n[5] = "de", Object.getOwnPropertyNames(n)[0] === "5")
|
|
862
750
|
return !1;
|
|
863
|
-
for (var
|
|
864
|
-
|
|
865
|
-
var
|
|
866
|
-
return
|
|
751
|
+
for (var f = {}, g = 0; g < 10; g++)
|
|
752
|
+
f["_" + String.fromCharCode(g)] = g;
|
|
753
|
+
var D = Object.getOwnPropertyNames(f).map(function(b) {
|
|
754
|
+
return f[b];
|
|
867
755
|
});
|
|
868
|
-
if (
|
|
756
|
+
if (D.join("") !== "0123456789")
|
|
869
757
|
return !1;
|
|
870
|
-
var
|
|
871
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
872
|
-
|
|
873
|
-
}), Object.keys(Object.assign({},
|
|
758
|
+
var S = {};
|
|
759
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(b) {
|
|
760
|
+
S[b] = b;
|
|
761
|
+
}), Object.keys(Object.assign({}, S)).join("") === "abcdefghijklmnopqrst";
|
|
874
762
|
} catch {
|
|
875
763
|
return !1;
|
|
876
764
|
}
|
|
877
765
|
}
|
|
878
|
-
return
|
|
879
|
-
for (var
|
|
880
|
-
|
|
881
|
-
for (var c in
|
|
882
|
-
|
|
766
|
+
return De = s() ? Object.assign : function(n, f) {
|
|
767
|
+
for (var g, D = o(n), S, b = 1; b < arguments.length; b++) {
|
|
768
|
+
g = Object(arguments[b]);
|
|
769
|
+
for (var c in g)
|
|
770
|
+
l.call(g, c) && (D[c] = g[c]);
|
|
883
771
|
if (e) {
|
|
884
|
-
|
|
885
|
-
for (var
|
|
886
|
-
|
|
772
|
+
S = e(g);
|
|
773
|
+
for (var p = 0; p < S.length; p++)
|
|
774
|
+
r.call(g, S[p]) && (D[S[p]] = g[S[p]]);
|
|
887
775
|
}
|
|
888
776
|
}
|
|
889
|
-
return
|
|
890
|
-
},
|
|
777
|
+
return D;
|
|
778
|
+
}, De;
|
|
891
779
|
}
|
|
892
|
-
var
|
|
893
|
-
function
|
|
894
|
-
if (
|
|
895
|
-
|
|
780
|
+
var Te, Ue;
|
|
781
|
+
function $e() {
|
|
782
|
+
if (Ue) return Te;
|
|
783
|
+
Ue = 1;
|
|
896
784
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
897
|
-
return
|
|
785
|
+
return Te = e, Te;
|
|
898
786
|
}
|
|
899
|
-
var
|
|
900
|
-
function
|
|
901
|
-
return
|
|
787
|
+
var Ee, Ye;
|
|
788
|
+
function ut() {
|
|
789
|
+
return Ye || (Ye = 1, Ee = Function.call.bind(Object.prototype.hasOwnProperty)), Ee;
|
|
902
790
|
}
|
|
903
|
-
var Ne,
|
|
904
|
-
function
|
|
905
|
-
if (
|
|
906
|
-
|
|
791
|
+
var Ne, Fe;
|
|
792
|
+
function qt() {
|
|
793
|
+
if (Fe) return Ne;
|
|
794
|
+
Fe = 1;
|
|
907
795
|
var e = function() {
|
|
908
796
|
};
|
|
909
797
|
if (process.env.NODE_ENV !== "production") {
|
|
910
|
-
var
|
|
911
|
-
e = function(
|
|
912
|
-
var
|
|
913
|
-
typeof console < "u" && console.error(
|
|
798
|
+
var l = /* @__PURE__ */ $e(), r = {}, o = /* @__PURE__ */ ut();
|
|
799
|
+
e = function(n) {
|
|
800
|
+
var f = "Warning: " + n;
|
|
801
|
+
typeof console < "u" && console.error(f);
|
|
914
802
|
try {
|
|
915
|
-
throw new Error(
|
|
803
|
+
throw new Error(f);
|
|
916
804
|
} catch {
|
|
917
805
|
}
|
|
918
806
|
};
|
|
919
807
|
}
|
|
920
|
-
function
|
|
808
|
+
function s(n, f, g, D, S) {
|
|
921
809
|
if (process.env.NODE_ENV !== "production") {
|
|
922
|
-
for (var
|
|
923
|
-
if (
|
|
810
|
+
for (var b in n)
|
|
811
|
+
if (o(n, b)) {
|
|
924
812
|
var c;
|
|
925
813
|
try {
|
|
926
|
-
if (typeof
|
|
927
|
-
var
|
|
928
|
-
(
|
|
814
|
+
if (typeof n[b] != "function") {
|
|
815
|
+
var p = Error(
|
|
816
|
+
(D || "React class") + ": " + g + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
929
817
|
);
|
|
930
|
-
throw
|
|
818
|
+
throw p.name = "Invariant Violation", p;
|
|
931
819
|
}
|
|
932
|
-
c =
|
|
820
|
+
c = n[b](f, b, D, g, null, l);
|
|
933
821
|
} catch (T) {
|
|
934
822
|
c = T;
|
|
935
823
|
}
|
|
936
824
|
if (c && !(c instanceof Error) && e(
|
|
937
|
-
(
|
|
938
|
-
), c instanceof Error && !(c.message in
|
|
939
|
-
|
|
940
|
-
var
|
|
825
|
+
(D || "React class") + ": type specification of " + g + " `" + b + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof c + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
826
|
+
), c instanceof Error && !(c.message in r)) {
|
|
827
|
+
r[c.message] = !0;
|
|
828
|
+
var m = S ? S() : "";
|
|
941
829
|
e(
|
|
942
|
-
"Failed " +
|
|
830
|
+
"Failed " + g + " type: " + c.message + (m ?? "")
|
|
943
831
|
);
|
|
944
832
|
}
|
|
945
833
|
}
|
|
946
834
|
}
|
|
947
835
|
}
|
|
948
|
-
return
|
|
949
|
-
process.env.NODE_ENV !== "production" && (
|
|
950
|
-
}, Ne =
|
|
836
|
+
return s.resetWarningCache = function() {
|
|
837
|
+
process.env.NODE_ENV !== "production" && (r = {});
|
|
838
|
+
}, Ne = s, Ne;
|
|
951
839
|
}
|
|
952
|
-
var
|
|
953
|
-
function
|
|
954
|
-
if (
|
|
955
|
-
|
|
956
|
-
var e =
|
|
840
|
+
var _e, Ke;
|
|
841
|
+
function Lt() {
|
|
842
|
+
if (Ke) return _e;
|
|
843
|
+
Ke = 1;
|
|
844
|
+
var e = dt(), l = At(), r = /* @__PURE__ */ $e(), o = /* @__PURE__ */ ut(), s = /* @__PURE__ */ qt(), n = function() {
|
|
957
845
|
};
|
|
958
|
-
process.env.NODE_ENV !== "production" && (
|
|
959
|
-
var
|
|
960
|
-
typeof console < "u" && console.error(
|
|
846
|
+
process.env.NODE_ENV !== "production" && (n = function(g) {
|
|
847
|
+
var D = "Warning: " + g;
|
|
848
|
+
typeof console < "u" && console.error(D);
|
|
961
849
|
try {
|
|
962
|
-
throw new Error(
|
|
850
|
+
throw new Error(D);
|
|
963
851
|
} catch {
|
|
964
852
|
}
|
|
965
853
|
});
|
|
966
|
-
function
|
|
854
|
+
function f() {
|
|
967
855
|
return null;
|
|
968
856
|
}
|
|
969
|
-
return
|
|
970
|
-
var
|
|
971
|
-
function c(
|
|
972
|
-
var P =
|
|
857
|
+
return _e = function(g, D) {
|
|
858
|
+
var S = typeof Symbol == "function" && Symbol.iterator, b = "@@iterator";
|
|
859
|
+
function c(v) {
|
|
860
|
+
var P = v && (S && v[S] || v[b]);
|
|
973
861
|
if (typeof P == "function")
|
|
974
862
|
return P;
|
|
975
863
|
}
|
|
976
|
-
var
|
|
977
|
-
array:
|
|
978
|
-
bigint:
|
|
979
|
-
bool:
|
|
980
|
-
func:
|
|
981
|
-
number:
|
|
982
|
-
object:
|
|
983
|
-
string:
|
|
984
|
-
symbol:
|
|
985
|
-
any:
|
|
986
|
-
arrayOf:
|
|
987
|
-
element:
|
|
988
|
-
elementType:
|
|
864
|
+
var p = "<<anonymous>>", m = {
|
|
865
|
+
array: x("array"),
|
|
866
|
+
bigint: x("bigint"),
|
|
867
|
+
bool: x("boolean"),
|
|
868
|
+
func: x("function"),
|
|
869
|
+
number: x("number"),
|
|
870
|
+
object: x("object"),
|
|
871
|
+
string: x("string"),
|
|
872
|
+
symbol: x("symbol"),
|
|
873
|
+
any: E(),
|
|
874
|
+
arrayOf: C,
|
|
875
|
+
element: w(),
|
|
876
|
+
elementType: i(),
|
|
989
877
|
instanceOf: M,
|
|
990
878
|
node: _(),
|
|
991
|
-
objectOf:
|
|
992
|
-
oneOf:
|
|
993
|
-
oneOfType:
|
|
879
|
+
objectOf: u,
|
|
880
|
+
oneOf: a,
|
|
881
|
+
oneOfType: d,
|
|
994
882
|
shape: H,
|
|
995
|
-
exact:
|
|
883
|
+
exact: V
|
|
996
884
|
};
|
|
997
|
-
function T(
|
|
998
|
-
return
|
|
885
|
+
function T(v, P) {
|
|
886
|
+
return v === P ? v !== 0 || 1 / v === 1 / P : v !== v && P !== P;
|
|
999
887
|
}
|
|
1000
|
-
function
|
|
1001
|
-
this.message =
|
|
888
|
+
function h(v, P) {
|
|
889
|
+
this.message = v, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
|
|
1002
890
|
}
|
|
1003
|
-
|
|
1004
|
-
function
|
|
891
|
+
h.prototype = Error.prototype;
|
|
892
|
+
function y(v) {
|
|
1005
893
|
if (process.env.NODE_ENV !== "production")
|
|
1006
894
|
var P = {}, j = 0;
|
|
1007
|
-
function
|
|
1008
|
-
if (
|
|
1009
|
-
if (
|
|
1010
|
-
var
|
|
895
|
+
function k(A, O, W, q, F, L, Z) {
|
|
896
|
+
if (q = q || p, L = L || W, Z !== r) {
|
|
897
|
+
if (D) {
|
|
898
|
+
var N = new Error(
|
|
1011
899
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1012
900
|
);
|
|
1013
|
-
throw
|
|
901
|
+
throw N.name = "Invariant Violation", N;
|
|
1014
902
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1015
|
-
var te =
|
|
903
|
+
var te = q + ":" + W;
|
|
1016
904
|
!P[te] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1017
|
-
j < 3 && (
|
|
1018
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
905
|
+
j < 3 && (n(
|
|
906
|
+
"You are manually calling a React.PropTypes validation function for the `" + L + "` prop on `" + q + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1019
907
|
), P[te] = !0, j++);
|
|
1020
908
|
}
|
|
1021
909
|
}
|
|
1022
|
-
return W
|
|
910
|
+
return O[W] == null ? A ? O[W] === null ? new h("The " + F + " `" + L + "` is marked as required " + ("in `" + q + "`, but its value is `null`.")) : new h("The " + F + " `" + L + "` is marked as required in " + ("`" + q + "`, but its value is `undefined`.")) : null : v(O, W, q, F, L);
|
|
1023
911
|
}
|
|
1024
|
-
var
|
|
1025
|
-
return
|
|
1026
|
-
}
|
|
1027
|
-
function
|
|
1028
|
-
function P(j,
|
|
1029
|
-
var
|
|
1030
|
-
if (F !==
|
|
1031
|
-
var
|
|
1032
|
-
return new
|
|
1033
|
-
"Invalid " + A + " `" +
|
|
1034
|
-
{ expectedType:
|
|
912
|
+
var $ = k.bind(null, !1);
|
|
913
|
+
return $.isRequired = k.bind(null, !0), $;
|
|
914
|
+
}
|
|
915
|
+
function x(v) {
|
|
916
|
+
function P(j, k, $, A, O, W) {
|
|
917
|
+
var q = j[k], F = B(q);
|
|
918
|
+
if (F !== v) {
|
|
919
|
+
var L = ee(q);
|
|
920
|
+
return new h(
|
|
921
|
+
"Invalid " + A + " `" + O + "` of type " + ("`" + L + "` supplied to `" + $ + "`, expected ") + ("`" + v + "`."),
|
|
922
|
+
{ expectedType: v }
|
|
1035
923
|
);
|
|
1036
924
|
}
|
|
1037
925
|
return null;
|
|
1038
926
|
}
|
|
1039
|
-
return
|
|
1040
|
-
}
|
|
1041
|
-
function
|
|
1042
|
-
return
|
|
1043
|
-
}
|
|
1044
|
-
function
|
|
1045
|
-
function P(j,
|
|
1046
|
-
if (typeof
|
|
1047
|
-
return new
|
|
1048
|
-
var
|
|
1049
|
-
if (!Array.isArray(
|
|
1050
|
-
var
|
|
1051
|
-
return new
|
|
927
|
+
return y(P);
|
|
928
|
+
}
|
|
929
|
+
function E() {
|
|
930
|
+
return y(f);
|
|
931
|
+
}
|
|
932
|
+
function C(v) {
|
|
933
|
+
function P(j, k, $, A, O) {
|
|
934
|
+
if (typeof v != "function")
|
|
935
|
+
return new h("Property `" + O + "` of component `" + $ + "` has invalid PropType notation inside arrayOf.");
|
|
936
|
+
var W = j[k];
|
|
937
|
+
if (!Array.isArray(W)) {
|
|
938
|
+
var q = B(W);
|
|
939
|
+
return new h("Invalid " + A + " `" + O + "` of type " + ("`" + q + "` supplied to `" + $ + "`, expected an array."));
|
|
1052
940
|
}
|
|
1053
|
-
for (var F = 0; F <
|
|
1054
|
-
var
|
|
1055
|
-
if (
|
|
1056
|
-
return
|
|
941
|
+
for (var F = 0; F < W.length; F++) {
|
|
942
|
+
var L = v(W, F, $, A, O + "[" + F + "]", r);
|
|
943
|
+
if (L instanceof Error)
|
|
944
|
+
return L;
|
|
1057
945
|
}
|
|
1058
946
|
return null;
|
|
1059
947
|
}
|
|
1060
|
-
return
|
|
1061
|
-
}
|
|
1062
|
-
function
|
|
1063
|
-
function
|
|
1064
|
-
var
|
|
1065
|
-
if (!
|
|
1066
|
-
var
|
|
1067
|
-
return new
|
|
948
|
+
return y(P);
|
|
949
|
+
}
|
|
950
|
+
function w() {
|
|
951
|
+
function v(P, j, k, $, A) {
|
|
952
|
+
var O = P[j];
|
|
953
|
+
if (!g(O)) {
|
|
954
|
+
var W = B(O);
|
|
955
|
+
return new h("Invalid " + $ + " `" + A + "` of type " + ("`" + W + "` supplied to `" + k + "`, expected a single ReactElement."));
|
|
1068
956
|
}
|
|
1069
957
|
return null;
|
|
1070
958
|
}
|
|
1071
|
-
return
|
|
1072
|
-
}
|
|
1073
|
-
function
|
|
1074
|
-
function
|
|
1075
|
-
var
|
|
1076
|
-
if (!e.isValidElementType(
|
|
1077
|
-
var
|
|
1078
|
-
return new
|
|
959
|
+
return y(v);
|
|
960
|
+
}
|
|
961
|
+
function i() {
|
|
962
|
+
function v(P, j, k, $, A) {
|
|
963
|
+
var O = P[j];
|
|
964
|
+
if (!e.isValidElementType(O)) {
|
|
965
|
+
var W = B(O);
|
|
966
|
+
return new h("Invalid " + $ + " `" + A + "` of type " + ("`" + W + "` supplied to `" + k + "`, expected a single ReactElement type."));
|
|
1079
967
|
}
|
|
1080
968
|
return null;
|
|
1081
969
|
}
|
|
1082
|
-
return
|
|
970
|
+
return y(v);
|
|
1083
971
|
}
|
|
1084
|
-
function M(
|
|
1085
|
-
function P(j,
|
|
1086
|
-
if (!(j[
|
|
1087
|
-
var
|
|
1088
|
-
return new
|
|
972
|
+
function M(v) {
|
|
973
|
+
function P(j, k, $, A, O) {
|
|
974
|
+
if (!(j[k] instanceof v)) {
|
|
975
|
+
var W = v.name || p, q = le(j[k]);
|
|
976
|
+
return new h("Invalid " + A + " `" + O + "` of type " + ("`" + q + "` supplied to `" + $ + "`, expected ") + ("instance of `" + W + "`."));
|
|
1089
977
|
}
|
|
1090
978
|
return null;
|
|
1091
979
|
}
|
|
1092
|
-
return
|
|
980
|
+
return y(P);
|
|
1093
981
|
}
|
|
1094
|
-
function
|
|
1095
|
-
if (!Array.isArray(
|
|
1096
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ?
|
|
982
|
+
function a(v) {
|
|
983
|
+
if (!Array.isArray(v))
|
|
984
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? n(
|
|
1097
985
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1098
|
-
) :
|
|
1099
|
-
function P(j,
|
|
1100
|
-
for (var
|
|
1101
|
-
if (T(
|
|
986
|
+
) : n("Invalid argument supplied to oneOf, expected an array.")), f;
|
|
987
|
+
function P(j, k, $, A, O) {
|
|
988
|
+
for (var W = j[k], q = 0; q < v.length; q++)
|
|
989
|
+
if (T(W, v[q]))
|
|
1102
990
|
return null;
|
|
1103
|
-
var F = JSON.stringify(
|
|
1104
|
-
var te = ee(
|
|
1105
|
-
return te === "symbol" ? String(
|
|
991
|
+
var F = JSON.stringify(v, function(Z, N) {
|
|
992
|
+
var te = ee(N);
|
|
993
|
+
return te === "symbol" ? String(N) : N;
|
|
1106
994
|
});
|
|
1107
|
-
return new
|
|
995
|
+
return new h("Invalid " + A + " `" + O + "` of value `" + String(W) + "` " + ("supplied to `" + $ + "`, expected one of " + F + "."));
|
|
1108
996
|
}
|
|
1109
|
-
return
|
|
1110
|
-
}
|
|
1111
|
-
function
|
|
1112
|
-
function P(j,
|
|
1113
|
-
if (typeof
|
|
1114
|
-
return new
|
|
1115
|
-
var
|
|
1116
|
-
if (
|
|
1117
|
-
return new
|
|
1118
|
-
for (var F in
|
|
1119
|
-
if (
|
|
1120
|
-
var
|
|
1121
|
-
if (
|
|
1122
|
-
return
|
|
997
|
+
return y(P);
|
|
998
|
+
}
|
|
999
|
+
function u(v) {
|
|
1000
|
+
function P(j, k, $, A, O) {
|
|
1001
|
+
if (typeof v != "function")
|
|
1002
|
+
return new h("Property `" + O + "` of component `" + $ + "` has invalid PropType notation inside objectOf.");
|
|
1003
|
+
var W = j[k], q = B(W);
|
|
1004
|
+
if (q !== "object")
|
|
1005
|
+
return new h("Invalid " + A + " `" + O + "` of type " + ("`" + q + "` supplied to `" + $ + "`, expected an object."));
|
|
1006
|
+
for (var F in W)
|
|
1007
|
+
if (o(W, F)) {
|
|
1008
|
+
var L = v(W, F, $, A, O + "." + F, r);
|
|
1009
|
+
if (L instanceof Error)
|
|
1010
|
+
return L;
|
|
1123
1011
|
}
|
|
1124
1012
|
return null;
|
|
1125
1013
|
}
|
|
1126
|
-
return
|
|
1014
|
+
return y(P);
|
|
1127
1015
|
}
|
|
1128
|
-
function
|
|
1129
|
-
if (!Array.isArray(
|
|
1130
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1131
|
-
for (var P = 0; P <
|
|
1132
|
-
var j =
|
|
1016
|
+
function d(v) {
|
|
1017
|
+
if (!Array.isArray(v))
|
|
1018
|
+
return process.env.NODE_ENV !== "production" && n("Invalid argument supplied to oneOfType, expected an instance of array."), f;
|
|
1019
|
+
for (var P = 0; P < v.length; P++) {
|
|
1020
|
+
var j = v[P];
|
|
1133
1021
|
if (typeof j != "function")
|
|
1134
|
-
return
|
|
1135
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
1136
|
-
),
|
|
1022
|
+
return n(
|
|
1023
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ae(j) + " at index " + P + "."
|
|
1024
|
+
), f;
|
|
1137
1025
|
}
|
|
1138
|
-
function
|
|
1139
|
-
for (var F = [],
|
|
1140
|
-
var Z =
|
|
1141
|
-
if (
|
|
1026
|
+
function k($, A, O, W, q) {
|
|
1027
|
+
for (var F = [], L = 0; L < v.length; L++) {
|
|
1028
|
+
var Z = v[L], N = Z($, A, O, W, q, r);
|
|
1029
|
+
if (N == null)
|
|
1142
1030
|
return null;
|
|
1143
|
-
|
|
1031
|
+
N.data && o(N.data, "expectedType") && F.push(N.data.expectedType);
|
|
1144
1032
|
}
|
|
1145
1033
|
var te = F.length > 0 ? ", expected one of type [" + F.join(", ") + "]" : "";
|
|
1146
|
-
return new
|
|
1034
|
+
return new h("Invalid " + W + " `" + q + "` supplied to " + ("`" + O + "`" + te + "."));
|
|
1147
1035
|
}
|
|
1148
|
-
return
|
|
1036
|
+
return y(k);
|
|
1149
1037
|
}
|
|
1150
1038
|
function _() {
|
|
1151
|
-
function
|
|
1152
|
-
return
|
|
1039
|
+
function v(P, j, k, $, A) {
|
|
1040
|
+
return X(P[j]) ? null : new h("Invalid " + $ + " `" + A + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
|
|
1153
1041
|
}
|
|
1154
|
-
return
|
|
1042
|
+
return y(v);
|
|
1155
1043
|
}
|
|
1156
|
-
function
|
|
1157
|
-
return new
|
|
1158
|
-
(
|
|
1044
|
+
function R(v, P, j, k, $) {
|
|
1045
|
+
return new h(
|
|
1046
|
+
(v || "React class") + ": " + P + " type `" + j + "." + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + $ + "`."
|
|
1159
1047
|
);
|
|
1160
1048
|
}
|
|
1161
|
-
function H(
|
|
1162
|
-
function P(j,
|
|
1163
|
-
var
|
|
1164
|
-
if (
|
|
1165
|
-
return new
|
|
1166
|
-
for (var F in
|
|
1167
|
-
var
|
|
1168
|
-
if (typeof
|
|
1169
|
-
return
|
|
1170
|
-
var Z =
|
|
1049
|
+
function H(v) {
|
|
1050
|
+
function P(j, k, $, A, O) {
|
|
1051
|
+
var W = j[k], q = B(W);
|
|
1052
|
+
if (q !== "object")
|
|
1053
|
+
return new h("Invalid " + A + " `" + O + "` of type `" + q + "` " + ("supplied to `" + $ + "`, expected `object`."));
|
|
1054
|
+
for (var F in v) {
|
|
1055
|
+
var L = v[F];
|
|
1056
|
+
if (typeof L != "function")
|
|
1057
|
+
return R($, A, O, F, ee(L));
|
|
1058
|
+
var Z = L(W, F, $, A, O + "." + F, r);
|
|
1171
1059
|
if (Z)
|
|
1172
1060
|
return Z;
|
|
1173
1061
|
}
|
|
1174
1062
|
return null;
|
|
1175
1063
|
}
|
|
1176
|
-
return
|
|
1177
|
-
}
|
|
1178
|
-
function
|
|
1179
|
-
function P(j,
|
|
1180
|
-
var
|
|
1181
|
-
if (
|
|
1182
|
-
return new
|
|
1183
|
-
var F =
|
|
1184
|
-
for (var
|
|
1185
|
-
var Z =
|
|
1186
|
-
if (
|
|
1187
|
-
return
|
|
1064
|
+
return y(P);
|
|
1065
|
+
}
|
|
1066
|
+
function V(v) {
|
|
1067
|
+
function P(j, k, $, A, O) {
|
|
1068
|
+
var W = j[k], q = B(W);
|
|
1069
|
+
if (q !== "object")
|
|
1070
|
+
return new h("Invalid " + A + " `" + O + "` of type `" + q + "` " + ("supplied to `" + $ + "`, expected `object`."));
|
|
1071
|
+
var F = l({}, j[k], v);
|
|
1072
|
+
for (var L in F) {
|
|
1073
|
+
var Z = v[L];
|
|
1074
|
+
if (o(v, L) && typeof Z != "function")
|
|
1075
|
+
return R($, A, O, L, ee(Z));
|
|
1188
1076
|
if (!Z)
|
|
1189
|
-
return new
|
|
1190
|
-
"Invalid " + A + " `" +
|
|
1191
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
1077
|
+
return new h(
|
|
1078
|
+
"Invalid " + A + " `" + O + "` key `" + L + "` supplied to `" + $ + "`.\nBad object: " + JSON.stringify(j[k], null, " ") + `
|
|
1079
|
+
Valid keys: ` + JSON.stringify(Object.keys(v), null, " ")
|
|
1192
1080
|
);
|
|
1193
|
-
var
|
|
1194
|
-
if (
|
|
1195
|
-
return
|
|
1081
|
+
var N = Z(W, L, $, A, O + "." + L, r);
|
|
1082
|
+
if (N)
|
|
1083
|
+
return N;
|
|
1196
1084
|
}
|
|
1197
1085
|
return null;
|
|
1198
1086
|
}
|
|
1199
|
-
return
|
|
1087
|
+
return y(P);
|
|
1200
1088
|
}
|
|
1201
|
-
function
|
|
1202
|
-
switch (typeof
|
|
1089
|
+
function X(v) {
|
|
1090
|
+
switch (typeof v) {
|
|
1203
1091
|
case "number":
|
|
1204
1092
|
case "string":
|
|
1205
1093
|
case "undefined":
|
|
1206
1094
|
return !0;
|
|
1207
1095
|
case "boolean":
|
|
1208
|
-
return !
|
|
1096
|
+
return !v;
|
|
1209
1097
|
case "object":
|
|
1210
|
-
if (Array.isArray(
|
|
1211
|
-
return
|
|
1212
|
-
if (
|
|
1098
|
+
if (Array.isArray(v))
|
|
1099
|
+
return v.every(X);
|
|
1100
|
+
if (v === null || g(v))
|
|
1213
1101
|
return !0;
|
|
1214
|
-
var P = c(
|
|
1102
|
+
var P = c(v);
|
|
1215
1103
|
if (P) {
|
|
1216
|
-
var j = P.call(
|
|
1217
|
-
if (P !==
|
|
1218
|
-
for (; !(
|
|
1219
|
-
if (!
|
|
1104
|
+
var j = P.call(v), k;
|
|
1105
|
+
if (P !== v.entries) {
|
|
1106
|
+
for (; !(k = j.next()).done; )
|
|
1107
|
+
if (!X(k.value))
|
|
1220
1108
|
return !1;
|
|
1221
1109
|
} else
|
|
1222
|
-
for (; !(
|
|
1223
|
-
var
|
|
1224
|
-
if (
|
|
1110
|
+
for (; !(k = j.next()).done; ) {
|
|
1111
|
+
var $ = k.value;
|
|
1112
|
+
if ($ && !X($[1]))
|
|
1225
1113
|
return !1;
|
|
1226
1114
|
}
|
|
1227
1115
|
} else
|
|
@@ -1231,27 +1119,27 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1231
1119
|
return !1;
|
|
1232
1120
|
}
|
|
1233
1121
|
}
|
|
1234
|
-
function Q(
|
|
1235
|
-
return
|
|
1122
|
+
function Q(v, P) {
|
|
1123
|
+
return v === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
|
|
1236
1124
|
}
|
|
1237
|
-
function B(
|
|
1238
|
-
var P = typeof
|
|
1239
|
-
return Array.isArray(
|
|
1125
|
+
function B(v) {
|
|
1126
|
+
var P = typeof v;
|
|
1127
|
+
return Array.isArray(v) ? "array" : v instanceof RegExp ? "object" : Q(P, v) ? "symbol" : P;
|
|
1240
1128
|
}
|
|
1241
|
-
function ee(
|
|
1242
|
-
if (typeof
|
|
1243
|
-
return "" +
|
|
1244
|
-
var P = B(
|
|
1129
|
+
function ee(v) {
|
|
1130
|
+
if (typeof v > "u" || v === null)
|
|
1131
|
+
return "" + v;
|
|
1132
|
+
var P = B(v);
|
|
1245
1133
|
if (P === "object") {
|
|
1246
|
-
if (
|
|
1134
|
+
if (v instanceof Date)
|
|
1247
1135
|
return "date";
|
|
1248
|
-
if (
|
|
1136
|
+
if (v instanceof RegExp)
|
|
1249
1137
|
return "regexp";
|
|
1250
1138
|
}
|
|
1251
1139
|
return P;
|
|
1252
1140
|
}
|
|
1253
|
-
function
|
|
1254
|
-
var P = ee(
|
|
1141
|
+
function ae(v) {
|
|
1142
|
+
var P = ee(v);
|
|
1255
1143
|
switch (P) {
|
|
1256
1144
|
case "array":
|
|
1257
1145
|
case "object":
|
|
@@ -1264,365 +1152,365 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1264
1152
|
return P;
|
|
1265
1153
|
}
|
|
1266
1154
|
}
|
|
1267
|
-
function le(
|
|
1268
|
-
return !
|
|
1155
|
+
function le(v) {
|
|
1156
|
+
return !v.constructor || !v.constructor.name ? p : v.constructor.name;
|
|
1269
1157
|
}
|
|
1270
|
-
return
|
|
1271
|
-
},
|
|
1158
|
+
return m.checkPropTypes = s, m.resetWarningCache = s.resetWarningCache, m.PropTypes = m, m;
|
|
1159
|
+
}, _e;
|
|
1272
1160
|
}
|
|
1273
|
-
var
|
|
1274
|
-
function
|
|
1275
|
-
if (
|
|
1276
|
-
|
|
1277
|
-
var e = /* @__PURE__ */
|
|
1278
|
-
function
|
|
1161
|
+
var Me, ze;
|
|
1162
|
+
function Ut() {
|
|
1163
|
+
if (ze) return Me;
|
|
1164
|
+
ze = 1;
|
|
1165
|
+
var e = /* @__PURE__ */ $e();
|
|
1166
|
+
function l() {
|
|
1279
1167
|
}
|
|
1280
|
-
function
|
|
1168
|
+
function r() {
|
|
1281
1169
|
}
|
|
1282
|
-
return
|
|
1283
|
-
function
|
|
1170
|
+
return r.resetWarningCache = l, Me = function() {
|
|
1171
|
+
function o(f, g, D, S, b, c) {
|
|
1284
1172
|
if (c !== e) {
|
|
1285
|
-
var
|
|
1173
|
+
var p = new Error(
|
|
1286
1174
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1287
1175
|
);
|
|
1288
|
-
throw
|
|
1176
|
+
throw p.name = "Invariant Violation", p;
|
|
1289
1177
|
}
|
|
1290
1178
|
}
|
|
1291
|
-
|
|
1292
|
-
function
|
|
1293
|
-
return
|
|
1294
|
-
}
|
|
1295
|
-
var
|
|
1296
|
-
array:
|
|
1297
|
-
bigint:
|
|
1298
|
-
bool:
|
|
1299
|
-
func:
|
|
1300
|
-
number:
|
|
1301
|
-
object:
|
|
1302
|
-
string:
|
|
1303
|
-
symbol:
|
|
1304
|
-
any:
|
|
1305
|
-
arrayOf:
|
|
1306
|
-
element:
|
|
1307
|
-
elementType:
|
|
1308
|
-
instanceOf:
|
|
1309
|
-
node:
|
|
1310
|
-
objectOf:
|
|
1311
|
-
oneOf:
|
|
1312
|
-
oneOfType:
|
|
1313
|
-
shape:
|
|
1314
|
-
exact:
|
|
1315
|
-
checkPropTypes:
|
|
1316
|
-
resetWarningCache:
|
|
1179
|
+
o.isRequired = o;
|
|
1180
|
+
function s() {
|
|
1181
|
+
return o;
|
|
1182
|
+
}
|
|
1183
|
+
var n = {
|
|
1184
|
+
array: o,
|
|
1185
|
+
bigint: o,
|
|
1186
|
+
bool: o,
|
|
1187
|
+
func: o,
|
|
1188
|
+
number: o,
|
|
1189
|
+
object: o,
|
|
1190
|
+
string: o,
|
|
1191
|
+
symbol: o,
|
|
1192
|
+
any: o,
|
|
1193
|
+
arrayOf: s,
|
|
1194
|
+
element: o,
|
|
1195
|
+
elementType: o,
|
|
1196
|
+
instanceOf: s,
|
|
1197
|
+
node: o,
|
|
1198
|
+
objectOf: s,
|
|
1199
|
+
oneOf: s,
|
|
1200
|
+
oneOfType: s,
|
|
1201
|
+
shape: s,
|
|
1202
|
+
exact: s,
|
|
1203
|
+
checkPropTypes: r,
|
|
1204
|
+
resetWarningCache: l
|
|
1317
1205
|
};
|
|
1318
|
-
return
|
|
1319
|
-
},
|
|
1206
|
+
return n.PropTypes = n, n;
|
|
1207
|
+
}, Me;
|
|
1320
1208
|
}
|
|
1321
|
-
var
|
|
1322
|
-
function
|
|
1323
|
-
if (
|
|
1324
|
-
if (
|
|
1325
|
-
var e =
|
|
1326
|
-
|
|
1209
|
+
var Be;
|
|
1210
|
+
function ft() {
|
|
1211
|
+
if (Be) return ge.exports;
|
|
1212
|
+
if (Be = 1, process.env.NODE_ENV !== "production") {
|
|
1213
|
+
var e = dt(), l = !0;
|
|
1214
|
+
ge.exports = /* @__PURE__ */ Lt()(e.isElement, l);
|
|
1327
1215
|
} else
|
|
1328
|
-
|
|
1329
|
-
return
|
|
1216
|
+
ge.exports = /* @__PURE__ */ Ut()();
|
|
1217
|
+
return ge.exports;
|
|
1330
1218
|
}
|
|
1331
|
-
var
|
|
1332
|
-
function
|
|
1333
|
-
if (
|
|
1334
|
-
|
|
1335
|
-
function e(
|
|
1336
|
-
var
|
|
1337
|
-
if (typeof
|
|
1338
|
-
else if (typeof
|
|
1339
|
-
var
|
|
1340
|
-
for (
|
|
1341
|
-
} else for (
|
|
1342
|
-
return
|
|
1219
|
+
var pe = { exports: {} }, He;
|
|
1220
|
+
function Yt() {
|
|
1221
|
+
if (He) return pe.exports;
|
|
1222
|
+
He = 1;
|
|
1223
|
+
function e(r) {
|
|
1224
|
+
var o, s, n = "";
|
|
1225
|
+
if (typeof r == "string" || typeof r == "number") n += r;
|
|
1226
|
+
else if (typeof r == "object") if (Array.isArray(r)) {
|
|
1227
|
+
var f = r.length;
|
|
1228
|
+
for (o = 0; o < f; o++) r[o] && (s = e(r[o])) && (n && (n += " "), n += s);
|
|
1229
|
+
} else for (s in r) r[s] && (n && (n += " "), n += s);
|
|
1230
|
+
return n;
|
|
1343
1231
|
}
|
|
1344
|
-
function
|
|
1345
|
-
for (var
|
|
1346
|
-
return
|
|
1232
|
+
function l() {
|
|
1233
|
+
for (var r, o, s = 0, n = "", f = arguments.length; s < f; s++) (r = arguments[s]) && (o = e(r)) && (n && (n += " "), n += o);
|
|
1234
|
+
return n;
|
|
1347
1235
|
}
|
|
1348
|
-
return
|
|
1236
|
+
return pe.exports = l, pe.exports.clsx = l, pe.exports;
|
|
1349
1237
|
}
|
|
1350
|
-
var z = {},
|
|
1351
|
-
function
|
|
1352
|
-
if (
|
|
1353
|
-
|
|
1238
|
+
var z = {}, ne = {}, Ve;
|
|
1239
|
+
function xe() {
|
|
1240
|
+
if (Ve) return ne;
|
|
1241
|
+
Ve = 1, Object.defineProperty(ne, "__esModule", {
|
|
1354
1242
|
value: !0
|
|
1355
|
-
}),
|
|
1356
|
-
function e(
|
|
1357
|
-
for (let
|
|
1358
|
-
if (
|
|
1243
|
+
}), ne.dontSetMe = s, ne.findInArray = e, ne.int = o, ne.isFunction = l, ne.isNum = r;
|
|
1244
|
+
function e(n, f) {
|
|
1245
|
+
for (let g = 0, D = n.length; g < D; g++)
|
|
1246
|
+
if (f.apply(f, [n[g], g, n])) return n[g];
|
|
1359
1247
|
}
|
|
1360
|
-
function
|
|
1361
|
-
return typeof
|
|
1248
|
+
function l(n) {
|
|
1249
|
+
return typeof n == "function" || Object.prototype.toString.call(n) === "[object Function]";
|
|
1362
1250
|
}
|
|
1363
|
-
function
|
|
1364
|
-
return typeof
|
|
1251
|
+
function r(n) {
|
|
1252
|
+
return typeof n == "number" && !isNaN(n);
|
|
1365
1253
|
}
|
|
1366
|
-
function
|
|
1367
|
-
return parseInt(
|
|
1254
|
+
function o(n) {
|
|
1255
|
+
return parseInt(n, 10);
|
|
1368
1256
|
}
|
|
1369
|
-
function
|
|
1370
|
-
if (
|
|
1371
|
-
return new Error(`Invalid prop ${
|
|
1257
|
+
function s(n, f, g) {
|
|
1258
|
+
if (n[f])
|
|
1259
|
+
return new Error(`Invalid prop ${f} passed to ${g} - do not set this, set it on the child.`);
|
|
1372
1260
|
}
|
|
1373
|
-
return
|
|
1261
|
+
return ne;
|
|
1374
1262
|
}
|
|
1375
1263
|
var oe = {}, Xe;
|
|
1376
|
-
function
|
|
1264
|
+
function Ft() {
|
|
1377
1265
|
if (Xe) return oe;
|
|
1378
1266
|
Xe = 1, Object.defineProperty(oe, "__esModule", {
|
|
1379
1267
|
value: !0
|
|
1380
|
-
}), oe.browserPrefixToKey =
|
|
1268
|
+
}), oe.browserPrefixToKey = r, oe.browserPrefixToStyle = o, oe.default = void 0, oe.getPrefix = l;
|
|
1381
1269
|
const e = ["Moz", "Webkit", "O", "ms"];
|
|
1382
|
-
function
|
|
1383
|
-
let
|
|
1270
|
+
function l() {
|
|
1271
|
+
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
|
|
1384
1272
|
if (typeof window > "u") return "";
|
|
1385
|
-
const
|
|
1386
|
-
if (!
|
|
1387
|
-
for (let
|
|
1388
|
-
if (
|
|
1273
|
+
const f = window.document?.documentElement?.style;
|
|
1274
|
+
if (!f || n in f) return "";
|
|
1275
|
+
for (let g = 0; g < e.length; g++)
|
|
1276
|
+
if (r(n, e[g]) in f) return e[g];
|
|
1389
1277
|
return "";
|
|
1390
1278
|
}
|
|
1391
|
-
function
|
|
1392
|
-
return
|
|
1279
|
+
function r(n, f) {
|
|
1280
|
+
return f ? `${f}${s(n)}` : n;
|
|
1393
1281
|
}
|
|
1394
|
-
function
|
|
1395
|
-
return
|
|
1282
|
+
function o(n, f) {
|
|
1283
|
+
return f ? `-${f.toLowerCase()}-${n}` : n;
|
|
1396
1284
|
}
|
|
1397
|
-
function
|
|
1398
|
-
let
|
|
1399
|
-
for (let
|
|
1400
|
-
|
|
1401
|
-
return
|
|
1285
|
+
function s(n) {
|
|
1286
|
+
let f = "", g = !0;
|
|
1287
|
+
for (let D = 0; D < n.length; D++)
|
|
1288
|
+
g ? (f += n[D].toUpperCase(), g = !1) : n[D] === "-" ? g = !0 : f += n[D];
|
|
1289
|
+
return f;
|
|
1402
1290
|
}
|
|
1403
|
-
return oe.default =
|
|
1291
|
+
return oe.default = l(), oe;
|
|
1404
1292
|
}
|
|
1405
|
-
var
|
|
1406
|
-
function
|
|
1407
|
-
if (
|
|
1408
|
-
|
|
1293
|
+
var Ge;
|
|
1294
|
+
function Oe() {
|
|
1295
|
+
if (Ge) return z;
|
|
1296
|
+
Ge = 1, Object.defineProperty(z, "__esModule", {
|
|
1409
1297
|
value: !0
|
|
1410
|
-
}), z.addClassName =
|
|
1411
|
-
var e =
|
|
1412
|
-
function
|
|
1413
|
-
if (typeof WeakMap == "function") var
|
|
1414
|
-
return (
|
|
1415
|
-
if (!H &&
|
|
1416
|
-
var
|
|
1417
|
-
if (
|
|
1418
|
-
if (
|
|
1419
|
-
if (
|
|
1420
|
-
|
|
1298
|
+
}), z.addClassName = i, z.addEvent = f, z.addUserSelectStyles = E, z.createCSSTransform = m, z.createSVGTransform = T, z.getTouch = y, z.getTouchIdentifier = x, z.getTranslation = h, z.innerHeight = b, z.innerWidth = c, z.matchesSelector = s, z.matchesSelectorAndParentsTo = n, z.offsetXYFromParent = p, z.outerHeight = D, z.outerWidth = S, z.removeClassName = M, z.removeEvent = g, z.scheduleRemoveUserSelectStyles = C;
|
|
1299
|
+
var e = xe(), l = r(Ft());
|
|
1300
|
+
function r(a, u) {
|
|
1301
|
+
if (typeof WeakMap == "function") var d = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap();
|
|
1302
|
+
return (r = function(R, H) {
|
|
1303
|
+
if (!H && R && R.__esModule) return R;
|
|
1304
|
+
var V, X, Q = { __proto__: null, default: R };
|
|
1305
|
+
if (R === null || typeof R != "object" && typeof R != "function") return Q;
|
|
1306
|
+
if (V = H ? _ : d) {
|
|
1307
|
+
if (V.has(R)) return V.get(R);
|
|
1308
|
+
V.set(R, Q);
|
|
1421
1309
|
}
|
|
1422
|
-
for (const B in
|
|
1310
|
+
for (const B in R) B !== "default" && {}.hasOwnProperty.call(R, B) && ((X = (V = Object.defineProperty) && Object.getOwnPropertyDescriptor(R, B)) && (X.get || X.set) ? V(Q, B, X) : Q[B] = R[B]);
|
|
1423
1311
|
return Q;
|
|
1424
|
-
})(
|
|
1312
|
+
})(a, u);
|
|
1425
1313
|
}
|
|
1426
|
-
let
|
|
1427
|
-
function a
|
|
1428
|
-
return
|
|
1429
|
-
return (0, e.isFunction)(
|
|
1430
|
-
})), (0, e.isFunction)(
|
|
1314
|
+
let o = "";
|
|
1315
|
+
function s(a, u) {
|
|
1316
|
+
return o || (o = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(d) {
|
|
1317
|
+
return (0, e.isFunction)(a[d]);
|
|
1318
|
+
})), (0, e.isFunction)(a[o]) ? a[o](u) : !1;
|
|
1431
1319
|
}
|
|
1432
|
-
function
|
|
1433
|
-
let _ =
|
|
1320
|
+
function n(a, u, d) {
|
|
1321
|
+
let _ = a;
|
|
1434
1322
|
do {
|
|
1435
|
-
if (
|
|
1436
|
-
if (_ ===
|
|
1323
|
+
if (s(_, u)) return !0;
|
|
1324
|
+
if (_ === d) return !1;
|
|
1437
1325
|
_ = _.parentNode;
|
|
1438
1326
|
} while (_);
|
|
1439
1327
|
return !1;
|
|
1440
1328
|
}
|
|
1441
|
-
function
|
|
1442
|
-
if (!
|
|
1443
|
-
const
|
|
1329
|
+
function f(a, u, d, _) {
|
|
1330
|
+
if (!a) return;
|
|
1331
|
+
const R = {
|
|
1444
1332
|
capture: !0,
|
|
1445
1333
|
..._
|
|
1446
1334
|
};
|
|
1447
|
-
|
|
1335
|
+
a.addEventListener ? a.addEventListener(u, d, R) : a.attachEvent ? a.attachEvent("on" + u, d) : a["on" + u] = d;
|
|
1448
1336
|
}
|
|
1449
|
-
function
|
|
1450
|
-
if (!
|
|
1451
|
-
const
|
|
1337
|
+
function g(a, u, d, _) {
|
|
1338
|
+
if (!a) return;
|
|
1339
|
+
const R = {
|
|
1452
1340
|
capture: !0,
|
|
1453
1341
|
..._
|
|
1454
1342
|
};
|
|
1455
|
-
|
|
1343
|
+
a.removeEventListener ? a.removeEventListener(u, d, R) : a.detachEvent ? a.detachEvent("on" + u, d) : a["on" + u] = null;
|
|
1456
1344
|
}
|
|
1457
|
-
function
|
|
1458
|
-
let
|
|
1459
|
-
const
|
|
1460
|
-
return
|
|
1345
|
+
function D(a) {
|
|
1346
|
+
let u = a.clientHeight;
|
|
1347
|
+
const d = a.ownerDocument.defaultView.getComputedStyle(a);
|
|
1348
|
+
return u += (0, e.int)(d.borderTopWidth), u += (0, e.int)(d.borderBottomWidth), u;
|
|
1461
1349
|
}
|
|
1462
|
-
function
|
|
1463
|
-
let
|
|
1464
|
-
const
|
|
1465
|
-
return
|
|
1350
|
+
function S(a) {
|
|
1351
|
+
let u = a.clientWidth;
|
|
1352
|
+
const d = a.ownerDocument.defaultView.getComputedStyle(a);
|
|
1353
|
+
return u += (0, e.int)(d.borderLeftWidth), u += (0, e.int)(d.borderRightWidth), u;
|
|
1466
1354
|
}
|
|
1467
|
-
function
|
|
1468
|
-
let
|
|
1469
|
-
const
|
|
1470
|
-
return
|
|
1355
|
+
function b(a) {
|
|
1356
|
+
let u = a.clientHeight;
|
|
1357
|
+
const d = a.ownerDocument.defaultView.getComputedStyle(a);
|
|
1358
|
+
return u -= (0, e.int)(d.paddingTop), u -= (0, e.int)(d.paddingBottom), u;
|
|
1471
1359
|
}
|
|
1472
|
-
function c(
|
|
1473
|
-
let
|
|
1474
|
-
const
|
|
1475
|
-
return
|
|
1360
|
+
function c(a) {
|
|
1361
|
+
let u = a.clientWidth;
|
|
1362
|
+
const d = a.ownerDocument.defaultView.getComputedStyle(a);
|
|
1363
|
+
return u -= (0, e.int)(d.paddingLeft), u -= (0, e.int)(d.paddingRight), u;
|
|
1476
1364
|
}
|
|
1477
|
-
function
|
|
1478
|
-
const
|
|
1365
|
+
function p(a, u, d) {
|
|
1366
|
+
const R = u === u.ownerDocument.body ? {
|
|
1479
1367
|
left: 0,
|
|
1480
1368
|
top: 0
|
|
1481
|
-
} :
|
|
1369
|
+
} : u.getBoundingClientRect(), H = (a.clientX + u.scrollLeft - R.left) / d, V = (a.clientY + u.scrollTop - R.top) / d;
|
|
1482
1370
|
return {
|
|
1483
1371
|
x: H,
|
|
1484
|
-
y:
|
|
1372
|
+
y: V
|
|
1485
1373
|
};
|
|
1486
1374
|
}
|
|
1487
|
-
function
|
|
1488
|
-
const
|
|
1375
|
+
function m(a, u) {
|
|
1376
|
+
const d = h(a, u, "px");
|
|
1489
1377
|
return {
|
|
1490
|
-
[(0,
|
|
1378
|
+
[(0, l.browserPrefixToKey)("transform", l.default)]: d
|
|
1491
1379
|
};
|
|
1492
1380
|
}
|
|
1493
|
-
function T(
|
|
1494
|
-
return
|
|
1381
|
+
function T(a, u) {
|
|
1382
|
+
return h(a, u, "");
|
|
1495
1383
|
}
|
|
1496
|
-
function
|
|
1384
|
+
function h(a, u, d) {
|
|
1497
1385
|
let {
|
|
1498
1386
|
x: _,
|
|
1499
|
-
y:
|
|
1500
|
-
} =
|
|
1501
|
-
if (
|
|
1502
|
-
const
|
|
1503
|
-
H = `translate(${
|
|
1387
|
+
y: R
|
|
1388
|
+
} = a, H = `translate(${_}${d},${R}${d})`;
|
|
1389
|
+
if (u) {
|
|
1390
|
+
const V = `${typeof u.x == "string" ? u.x : u.x + d}`, X = `${typeof u.y == "string" ? u.y : u.y + d}`;
|
|
1391
|
+
H = `translate(${V}, ${X})` + H;
|
|
1504
1392
|
}
|
|
1505
1393
|
return H;
|
|
1506
1394
|
}
|
|
1507
|
-
function
|
|
1508
|
-
return
|
|
1395
|
+
function y(a, u) {
|
|
1396
|
+
return a.targetTouches && (0, e.findInArray)(a.targetTouches, (d) => u === d.identifier) || a.changedTouches && (0, e.findInArray)(a.changedTouches, (d) => u === d.identifier);
|
|
1509
1397
|
}
|
|
1510
|
-
function
|
|
1511
|
-
if (
|
|
1512
|
-
if (
|
|
1398
|
+
function x(a) {
|
|
1399
|
+
if (a.targetTouches && a.targetTouches[0]) return a.targetTouches[0].identifier;
|
|
1400
|
+
if (a.changedTouches && a.changedTouches[0]) return a.changedTouches[0].identifier;
|
|
1513
1401
|
}
|
|
1514
|
-
function
|
|
1515
|
-
if (!
|
|
1516
|
-
let
|
|
1517
|
-
|
|
1518
|
-
`,
|
|
1519
|
-
`,
|
|
1402
|
+
function E(a) {
|
|
1403
|
+
if (!a) return;
|
|
1404
|
+
let u = a.getElementById("react-draggable-style-el");
|
|
1405
|
+
u || (u = a.createElement("style"), u.type = "text/css", u.id = "react-draggable-style-el", u.innerHTML = `.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
|
|
1406
|
+
`, u.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
1407
|
+
`, a.getElementsByTagName("head")[0].appendChild(u)), a.body && i(a.body, "react-draggable-transparent-selection");
|
|
1520
1408
|
}
|
|
1521
|
-
function
|
|
1409
|
+
function C(a) {
|
|
1522
1410
|
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
1523
|
-
|
|
1524
|
-
}) :
|
|
1411
|
+
w(a);
|
|
1412
|
+
}) : w(a);
|
|
1525
1413
|
}
|
|
1526
|
-
function
|
|
1527
|
-
if (
|
|
1414
|
+
function w(a) {
|
|
1415
|
+
if (a)
|
|
1528
1416
|
try {
|
|
1529
|
-
if (
|
|
1530
|
-
|
|
1417
|
+
if (a.body && M(a.body, "react-draggable-transparent-selection"), a.selection)
|
|
1418
|
+
a.selection.empty();
|
|
1531
1419
|
else {
|
|
1532
|
-
const
|
|
1533
|
-
|
|
1420
|
+
const u = (a.defaultView || window).getSelection();
|
|
1421
|
+
u && u.type !== "Caret" && u.removeAllRanges();
|
|
1534
1422
|
}
|
|
1535
1423
|
} catch {
|
|
1536
1424
|
}
|
|
1537
1425
|
}
|
|
1538
|
-
function
|
|
1539
|
-
|
|
1426
|
+
function i(a, u) {
|
|
1427
|
+
a.classList ? a.classList.add(u) : a.className.match(new RegExp(`(?:^|\\s)${u}(?!\\S)`)) || (a.className += ` ${u}`);
|
|
1540
1428
|
}
|
|
1541
|
-
function M(
|
|
1542
|
-
|
|
1429
|
+
function M(a, u) {
|
|
1430
|
+
a.classList ? a.classList.remove(u) : a.className = a.className.replace(new RegExp(`(?:^|\\s)${u}(?!\\S)`, "g"), "");
|
|
1543
1431
|
}
|
|
1544
1432
|
return z;
|
|
1545
1433
|
}
|
|
1546
|
-
var
|
|
1547
|
-
function
|
|
1548
|
-
if (
|
|
1549
|
-
|
|
1434
|
+
var re = {}, Ze;
|
|
1435
|
+
function ht() {
|
|
1436
|
+
if (Ze) return re;
|
|
1437
|
+
Ze = 1, Object.defineProperty(re, "__esModule", {
|
|
1550
1438
|
value: !0
|
|
1551
|
-
}),
|
|
1552
|
-
var e =
|
|
1553
|
-
function
|
|
1554
|
-
if (!c.props.bounds) return [
|
|
1439
|
+
}), re.canDragX = s, re.canDragY = n, re.createCoreData = g, re.createDraggableData = D, re.getBoundPosition = r, re.getControlPosition = f, re.snapToGrid = o;
|
|
1440
|
+
var e = xe(), l = Oe();
|
|
1441
|
+
function r(c, p, m) {
|
|
1442
|
+
if (!c.props.bounds) return [p, m];
|
|
1555
1443
|
let {
|
|
1556
1444
|
bounds: T
|
|
1557
1445
|
} = c.props;
|
|
1558
|
-
T = typeof T == "string" ? T :
|
|
1559
|
-
const
|
|
1446
|
+
T = typeof T == "string" ? T : S(T);
|
|
1447
|
+
const h = b(c);
|
|
1560
1448
|
if (typeof T == "string") {
|
|
1561
1449
|
const {
|
|
1562
|
-
ownerDocument:
|
|
1563
|
-
} =
|
|
1564
|
-
let
|
|
1565
|
-
if (T === "parent" ?
|
|
1450
|
+
ownerDocument: y
|
|
1451
|
+
} = h, x = y.defaultView;
|
|
1452
|
+
let E;
|
|
1453
|
+
if (T === "parent" ? E = h.parentNode : E = h.getRootNode().querySelector(T), !(E instanceof x.HTMLElement))
|
|
1566
1454
|
throw new Error('Bounds selector "' + T + '" could not find an element.');
|
|
1567
|
-
const
|
|
1455
|
+
const C = E, w = x.getComputedStyle(h), i = x.getComputedStyle(C);
|
|
1568
1456
|
T = {
|
|
1569
|
-
left: -
|
|
1570
|
-
top: -
|
|
1571
|
-
right: (0,
|
|
1572
|
-
bottom: (0,
|
|
1457
|
+
left: -h.offsetLeft + (0, e.int)(i.paddingLeft) + (0, e.int)(w.marginLeft),
|
|
1458
|
+
top: -h.offsetTop + (0, e.int)(i.paddingTop) + (0, e.int)(w.marginTop),
|
|
1459
|
+
right: (0, l.innerWidth)(C) - (0, l.outerWidth)(h) - h.offsetLeft + (0, e.int)(i.paddingRight) - (0, e.int)(w.marginRight),
|
|
1460
|
+
bottom: (0, l.innerHeight)(C) - (0, l.outerHeight)(h) - h.offsetTop + (0, e.int)(i.paddingBottom) - (0, e.int)(w.marginBottom)
|
|
1573
1461
|
};
|
|
1574
1462
|
}
|
|
1575
|
-
return (0, e.isNum)(T.right) && (
|
|
1463
|
+
return (0, e.isNum)(T.right) && (p = Math.min(p, T.right)), (0, e.isNum)(T.bottom) && (m = Math.min(m, T.bottom)), (0, e.isNum)(T.left) && (p = Math.max(p, T.left)), (0, e.isNum)(T.top) && (m = Math.max(m, T.top)), [p, m];
|
|
1576
1464
|
}
|
|
1577
|
-
function
|
|
1578
|
-
const T = Math.round(
|
|
1579
|
-
return [T,
|
|
1465
|
+
function o(c, p, m) {
|
|
1466
|
+
const T = Math.round(p / c[0]) * c[0], h = Math.round(m / c[1]) * c[1];
|
|
1467
|
+
return [T, h];
|
|
1580
1468
|
}
|
|
1581
|
-
function
|
|
1469
|
+
function s(c) {
|
|
1582
1470
|
return c.props.axis === "both" || c.props.axis === "x";
|
|
1583
1471
|
}
|
|
1584
|
-
function
|
|
1472
|
+
function n(c) {
|
|
1585
1473
|
return c.props.axis === "both" || c.props.axis === "y";
|
|
1586
1474
|
}
|
|
1587
|
-
function
|
|
1588
|
-
const T = typeof
|
|
1589
|
-
if (typeof
|
|
1590
|
-
const
|
|
1591
|
-
return (0,
|
|
1475
|
+
function f(c, p, m) {
|
|
1476
|
+
const T = typeof p == "number" ? (0, l.getTouch)(c, p) : null;
|
|
1477
|
+
if (typeof p == "number" && !T) return null;
|
|
1478
|
+
const h = b(m), y = m.props.offsetParent || h.offsetParent || h.ownerDocument.body;
|
|
1479
|
+
return (0, l.offsetXYFromParent)(T || c, y, m.props.scale);
|
|
1592
1480
|
}
|
|
1593
|
-
function
|
|
1594
|
-
const T = !(0, e.isNum)(c.lastX),
|
|
1481
|
+
function g(c, p, m) {
|
|
1482
|
+
const T = !(0, e.isNum)(c.lastX), h = b(c);
|
|
1595
1483
|
return T ? {
|
|
1596
|
-
node:
|
|
1484
|
+
node: h,
|
|
1597
1485
|
deltaX: 0,
|
|
1598
1486
|
deltaY: 0,
|
|
1599
|
-
lastX:
|
|
1600
|
-
lastY:
|
|
1601
|
-
x:
|
|
1602
|
-
y:
|
|
1487
|
+
lastX: p,
|
|
1488
|
+
lastY: m,
|
|
1489
|
+
x: p,
|
|
1490
|
+
y: m
|
|
1603
1491
|
} : {
|
|
1604
|
-
node:
|
|
1605
|
-
deltaX:
|
|
1606
|
-
deltaY:
|
|
1492
|
+
node: h,
|
|
1493
|
+
deltaX: p - c.lastX,
|
|
1494
|
+
deltaY: m - c.lastY,
|
|
1607
1495
|
lastX: c.lastX,
|
|
1608
1496
|
lastY: c.lastY,
|
|
1609
|
-
x:
|
|
1610
|
-
y:
|
|
1497
|
+
x: p,
|
|
1498
|
+
y: m
|
|
1611
1499
|
};
|
|
1612
1500
|
}
|
|
1613
|
-
function
|
|
1614
|
-
const
|
|
1501
|
+
function D(c, p) {
|
|
1502
|
+
const m = c.props.scale;
|
|
1615
1503
|
return {
|
|
1616
|
-
node:
|
|
1617
|
-
x: c.state.x +
|
|
1618
|
-
y: c.state.y +
|
|
1619
|
-
deltaX:
|
|
1620
|
-
deltaY:
|
|
1504
|
+
node: p.node,
|
|
1505
|
+
x: c.state.x + p.deltaX / m,
|
|
1506
|
+
y: c.state.y + p.deltaY / m,
|
|
1507
|
+
deltaX: p.deltaX / m,
|
|
1508
|
+
deltaY: p.deltaY / m,
|
|
1621
1509
|
lastX: c.state.x,
|
|
1622
1510
|
lastY: c.state.y
|
|
1623
1511
|
};
|
|
1624
1512
|
}
|
|
1625
|
-
function
|
|
1513
|
+
function S(c) {
|
|
1626
1514
|
return {
|
|
1627
1515
|
left: c.left,
|
|
1628
1516
|
top: c.top,
|
|
@@ -1630,66 +1518,66 @@ function ft() {
|
|
|
1630
1518
|
bottom: c.bottom
|
|
1631
1519
|
};
|
|
1632
1520
|
}
|
|
1633
|
-
function
|
|
1634
|
-
const
|
|
1635
|
-
if (!
|
|
1521
|
+
function b(c) {
|
|
1522
|
+
const p = c.findDOMNode();
|
|
1523
|
+
if (!p)
|
|
1636
1524
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
1637
|
-
return
|
|
1525
|
+
return p;
|
|
1638
1526
|
}
|
|
1639
|
-
return
|
|
1527
|
+
return re;
|
|
1640
1528
|
}
|
|
1641
|
-
var ue = {},
|
|
1642
|
-
function
|
|
1643
|
-
if (
|
|
1644
|
-
|
|
1529
|
+
var ue = {}, ye = {}, Je;
|
|
1530
|
+
function gt() {
|
|
1531
|
+
if (Je) return ye;
|
|
1532
|
+
Je = 1, Object.defineProperty(ye, "__esModule", {
|
|
1645
1533
|
value: !0
|
|
1646
|
-
}),
|
|
1534
|
+
}), ye.default = e;
|
|
1647
1535
|
function e() {
|
|
1648
1536
|
}
|
|
1649
|
-
return
|
|
1537
|
+
return ye;
|
|
1650
1538
|
}
|
|
1651
|
-
var
|
|
1652
|
-
function
|
|
1653
|
-
if (
|
|
1654
|
-
|
|
1539
|
+
var Qe;
|
|
1540
|
+
function Kt() {
|
|
1541
|
+
if (Qe) return ue;
|
|
1542
|
+
Qe = 1, Object.defineProperty(ue, "__esModule", {
|
|
1655
1543
|
value: !0
|
|
1656
1544
|
}), ue.default = void 0;
|
|
1657
|
-
var e =
|
|
1658
|
-
function
|
|
1659
|
-
return
|
|
1545
|
+
var e = D(ve), l = g(/* @__PURE__ */ ft()), r = g(at), o = Oe(), s = ht(), n = xe(), f = g(gt());
|
|
1546
|
+
function g(h) {
|
|
1547
|
+
return h && h.__esModule ? h : { default: h };
|
|
1660
1548
|
}
|
|
1661
|
-
function
|
|
1662
|
-
if (typeof WeakMap == "function") var
|
|
1663
|
-
return (
|
|
1664
|
-
if (!
|
|
1665
|
-
var
|
|
1666
|
-
if (
|
|
1667
|
-
if (
|
|
1668
|
-
if (
|
|
1669
|
-
|
|
1549
|
+
function D(h, y) {
|
|
1550
|
+
if (typeof WeakMap == "function") var x = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap();
|
|
1551
|
+
return (D = function(C, w) {
|
|
1552
|
+
if (!w && C && C.__esModule) return C;
|
|
1553
|
+
var i, M, a = { __proto__: null, default: C };
|
|
1554
|
+
if (C === null || typeof C != "object" && typeof C != "function") return a;
|
|
1555
|
+
if (i = w ? E : x) {
|
|
1556
|
+
if (i.has(C)) return i.get(C);
|
|
1557
|
+
i.set(C, a);
|
|
1670
1558
|
}
|
|
1671
|
-
for (const
|
|
1672
|
-
return
|
|
1673
|
-
})(
|
|
1559
|
+
for (const u in C) u !== "default" && {}.hasOwnProperty.call(C, u) && ((M = (i = Object.defineProperty) && Object.getOwnPropertyDescriptor(C, u)) && (M.get || M.set) ? i(a, u, M) : a[u] = C[u]);
|
|
1560
|
+
return a;
|
|
1561
|
+
})(h, y);
|
|
1674
1562
|
}
|
|
1675
|
-
function
|
|
1676
|
-
return (
|
|
1563
|
+
function S(h, y, x) {
|
|
1564
|
+
return (y = b(y)) in h ? Object.defineProperty(h, y, { value: x, enumerable: !0, configurable: !0, writable: !0 }) : h[y] = x, h;
|
|
1677
1565
|
}
|
|
1678
|
-
function
|
|
1679
|
-
var
|
|
1680
|
-
return typeof
|
|
1566
|
+
function b(h) {
|
|
1567
|
+
var y = c(h, "string");
|
|
1568
|
+
return typeof y == "symbol" ? y : y + "";
|
|
1681
1569
|
}
|
|
1682
|
-
function c(
|
|
1683
|
-
if (typeof
|
|
1684
|
-
var
|
|
1685
|
-
if (
|
|
1686
|
-
var
|
|
1687
|
-
if (typeof
|
|
1570
|
+
function c(h, y) {
|
|
1571
|
+
if (typeof h != "object" || !h) return h;
|
|
1572
|
+
var x = h[Symbol.toPrimitive];
|
|
1573
|
+
if (x !== void 0) {
|
|
1574
|
+
var E = x.call(h, y);
|
|
1575
|
+
if (typeof E != "object") return E;
|
|
1688
1576
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1689
1577
|
}
|
|
1690
|
-
return (
|
|
1578
|
+
return (y === "string" ? String : Number)(h);
|
|
1691
1579
|
}
|
|
1692
|
-
const
|
|
1580
|
+
const p = {
|
|
1693
1581
|
touch: {
|
|
1694
1582
|
start: "touchstart",
|
|
1695
1583
|
move: "touchmove",
|
|
@@ -1701,92 +1589,92 @@ function Vt() {
|
|
|
1701
1589
|
stop: "mouseup"
|
|
1702
1590
|
}
|
|
1703
1591
|
};
|
|
1704
|
-
let
|
|
1592
|
+
let m = p.mouse, T = class extends e.Component {
|
|
1705
1593
|
constructor() {
|
|
1706
|
-
super(...arguments),
|
|
1707
|
-
if (this.props.onMouseDown(
|
|
1708
|
-
const
|
|
1709
|
-
if (!
|
|
1594
|
+
super(...arguments), S(this, "dragging", !1), S(this, "lastX", NaN), S(this, "lastY", NaN), S(this, "touchIdentifier", null), S(this, "mounted", !1), S(this, "handleDragStart", (y) => {
|
|
1595
|
+
if (this.props.onMouseDown(y), !this.props.allowAnyClick && typeof y.button == "number" && y.button !== 0) return !1;
|
|
1596
|
+
const x = this.findDOMNode();
|
|
1597
|
+
if (!x || !x.ownerDocument || !x.ownerDocument.body)
|
|
1710
1598
|
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
1711
1599
|
const {
|
|
1712
|
-
ownerDocument:
|
|
1713
|
-
} =
|
|
1714
|
-
if (this.props.disabled || !(
|
|
1600
|
+
ownerDocument: E
|
|
1601
|
+
} = x;
|
|
1602
|
+
if (this.props.disabled || !(y.target instanceof E.defaultView.Node) || this.props.handle && !(0, o.matchesSelectorAndParentsTo)(y.target, this.props.handle, x) || this.props.cancel && (0, o.matchesSelectorAndParentsTo)(y.target, this.props.cancel, x))
|
|
1715
1603
|
return;
|
|
1716
|
-
|
|
1717
|
-
const
|
|
1718
|
-
this.touchIdentifier =
|
|
1719
|
-
const
|
|
1720
|
-
if (
|
|
1604
|
+
y.type === "touchstart" && !this.props.allowMobileScroll && y.preventDefault();
|
|
1605
|
+
const C = (0, o.getTouchIdentifier)(y);
|
|
1606
|
+
this.touchIdentifier = C;
|
|
1607
|
+
const w = (0, s.getControlPosition)(y, C, this);
|
|
1608
|
+
if (w == null) return;
|
|
1721
1609
|
const {
|
|
1722
|
-
x:
|
|
1610
|
+
x: i,
|
|
1723
1611
|
y: M
|
|
1724
|
-
} =
|
|
1725
|
-
(0,
|
|
1726
|
-
}),
|
|
1727
|
-
const
|
|
1728
|
-
if (
|
|
1612
|
+
} = w, a = (0, s.createCoreData)(this, i, M);
|
|
1613
|
+
(0, f.default)("DraggableCore: handleDragStart: %j", a), (0, f.default)("calling", this.props.onStart), !(this.props.onStart(y, a) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, o.addUserSelectStyles)(E), this.dragging = !0, this.lastX = i, this.lastY = M, (0, o.addEvent)(E, m.move, this.handleDrag), (0, o.addEvent)(E, m.stop, this.handleDragStop));
|
|
1614
|
+
}), S(this, "handleDrag", (y) => {
|
|
1615
|
+
const x = (0, s.getControlPosition)(y, this.touchIdentifier, this);
|
|
1616
|
+
if (x == null) return;
|
|
1729
1617
|
let {
|
|
1730
|
-
x:
|
|
1731
|
-
y:
|
|
1732
|
-
} =
|
|
1618
|
+
x: E,
|
|
1619
|
+
y: C
|
|
1620
|
+
} = x;
|
|
1733
1621
|
if (Array.isArray(this.props.grid)) {
|
|
1734
|
-
let M =
|
|
1735
|
-
if ([M,
|
|
1736
|
-
|
|
1622
|
+
let M = E - this.lastX, a = C - this.lastY;
|
|
1623
|
+
if ([M, a] = (0, s.snapToGrid)(this.props.grid, M, a), !M && !a) return;
|
|
1624
|
+
E = this.lastX + M, C = this.lastY + a;
|
|
1737
1625
|
}
|
|
1738
|
-
const
|
|
1739
|
-
if ((0,
|
|
1626
|
+
const w = (0, s.createCoreData)(this, E, C);
|
|
1627
|
+
if ((0, f.default)("DraggableCore: handleDrag: %j", w), this.props.onDrag(y, w) === !1 || this.mounted === !1) {
|
|
1740
1628
|
try {
|
|
1741
1629
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
1742
1630
|
} catch {
|
|
1743
|
-
const
|
|
1744
|
-
|
|
1631
|
+
const a = document.createEvent("MouseEvents");
|
|
1632
|
+
a.initMouseEvent("mouseup", !0, !0, window, 0, 0, 0, 0, 0, !1, !1, !1, !1, 0, null), this.handleDragStop(a);
|
|
1745
1633
|
}
|
|
1746
1634
|
return;
|
|
1747
1635
|
}
|
|
1748
|
-
this.lastX =
|
|
1749
|
-
}),
|
|
1636
|
+
this.lastX = E, this.lastY = C;
|
|
1637
|
+
}), S(this, "handleDragStop", (y) => {
|
|
1750
1638
|
if (!this.dragging) return;
|
|
1751
|
-
const
|
|
1752
|
-
if (
|
|
1639
|
+
const x = (0, s.getControlPosition)(y, this.touchIdentifier, this);
|
|
1640
|
+
if (x == null) return;
|
|
1753
1641
|
let {
|
|
1754
|
-
x:
|
|
1755
|
-
y:
|
|
1756
|
-
} =
|
|
1642
|
+
x: E,
|
|
1643
|
+
y: C
|
|
1644
|
+
} = x;
|
|
1757
1645
|
if (Array.isArray(this.props.grid)) {
|
|
1758
|
-
let
|
|
1759
|
-
[
|
|
1646
|
+
let a = E - this.lastX || 0, u = C - this.lastY || 0;
|
|
1647
|
+
[a, u] = (0, s.snapToGrid)(this.props.grid, a, u), E = this.lastX + a, C = this.lastY + u;
|
|
1760
1648
|
}
|
|
1761
|
-
const
|
|
1762
|
-
if (this.props.onStop(
|
|
1649
|
+
const w = (0, s.createCoreData)(this, E, C);
|
|
1650
|
+
if (this.props.onStop(y, w) === !1 || this.mounted === !1) return !1;
|
|
1763
1651
|
const M = this.findDOMNode();
|
|
1764
|
-
M && this.props.enableUserSelectHack && (0,
|
|
1765
|
-
}),
|
|
1652
|
+
M && this.props.enableUserSelectHack && (0, o.scheduleRemoveUserSelectStyles)(M.ownerDocument), (0, f.default)("DraggableCore: handleDragStop: %j", w), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, M && ((0, f.default)("DraggableCore: Removing handlers"), (0, o.removeEvent)(M.ownerDocument, m.move, this.handleDrag), (0, o.removeEvent)(M.ownerDocument, m.stop, this.handleDragStop));
|
|
1653
|
+
}), S(this, "onMouseDown", (y) => (m = p.mouse, this.handleDragStart(y))), S(this, "onMouseUp", (y) => (m = p.mouse, this.handleDragStop(y))), S(this, "onTouchStart", (y) => (m = p.touch, this.handleDragStart(y))), S(this, "onTouchEnd", (y) => (m = p.touch, this.handleDragStop(y)));
|
|
1766
1654
|
}
|
|
1767
1655
|
componentDidMount() {
|
|
1768
1656
|
this.mounted = !0;
|
|
1769
|
-
const
|
|
1770
|
-
|
|
1657
|
+
const y = this.findDOMNode();
|
|
1658
|
+
y && (0, o.addEvent)(y, p.touch.start, this.onTouchStart, {
|
|
1771
1659
|
passive: !1
|
|
1772
1660
|
});
|
|
1773
1661
|
}
|
|
1774
1662
|
componentWillUnmount() {
|
|
1775
1663
|
this.mounted = !1;
|
|
1776
|
-
const
|
|
1777
|
-
if (
|
|
1664
|
+
const y = this.findDOMNode();
|
|
1665
|
+
if (y) {
|
|
1778
1666
|
const {
|
|
1779
|
-
ownerDocument:
|
|
1780
|
-
} =
|
|
1781
|
-
(0,
|
|
1667
|
+
ownerDocument: x
|
|
1668
|
+
} = y;
|
|
1669
|
+
(0, o.removeEvent)(x, p.mouse.move, this.handleDrag), (0, o.removeEvent)(x, p.touch.move, this.handleDrag), (0, o.removeEvent)(x, p.mouse.stop, this.handleDragStop), (0, o.removeEvent)(x, p.touch.stop, this.handleDragStop), (0, o.removeEvent)(y, p.touch.start, this.onTouchStart, {
|
|
1782
1670
|
passive: !1
|
|
1783
|
-
}), this.props.enableUserSelectHack && (0,
|
|
1671
|
+
}), this.props.enableUserSelectHack && (0, o.scheduleRemoveUserSelectStyles)(x);
|
|
1784
1672
|
}
|
|
1785
1673
|
}
|
|
1786
1674
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
1787
1675
|
// the underlying DOM node ourselves. See the README for more information.
|
|
1788
1676
|
findDOMNode() {
|
|
1789
|
-
return this.props?.nodeRef ? this.props?.nodeRef?.current :
|
|
1677
|
+
return this.props?.nodeRef ? this.props?.nodeRef?.current : r.default.findDOMNode(this);
|
|
1790
1678
|
}
|
|
1791
1679
|
render() {
|
|
1792
1680
|
return /* @__PURE__ */ e.cloneElement(e.Children.only(this.props.children), {
|
|
@@ -1801,14 +1689,14 @@ function Vt() {
|
|
|
1801
1689
|
});
|
|
1802
1690
|
}
|
|
1803
1691
|
};
|
|
1804
|
-
return ue.default = T,
|
|
1692
|
+
return ue.default = T, S(T, "displayName", "DraggableCore"), S(T, "propTypes", {
|
|
1805
1693
|
/**
|
|
1806
1694
|
* `allowAnyClick` allows dragging using any mouse button.
|
|
1807
1695
|
* By default, we only accept the left button.
|
|
1808
1696
|
*
|
|
1809
1697
|
* Defaults to `false`.
|
|
1810
1698
|
*/
|
|
1811
|
-
allowAnyClick:
|
|
1699
|
+
allowAnyClick: l.default.bool,
|
|
1812
1700
|
/**
|
|
1813
1701
|
* `allowMobileScroll` turns off cancellation of the 'touchstart' event
|
|
1814
1702
|
* on mobile devices. Only enable this if you are having trouble with click
|
|
@@ -1816,31 +1704,31 @@ function Vt() {
|
|
|
1816
1704
|
*
|
|
1817
1705
|
* Defaults to `false`.
|
|
1818
1706
|
*/
|
|
1819
|
-
allowMobileScroll:
|
|
1820
|
-
children:
|
|
1707
|
+
allowMobileScroll: l.default.bool,
|
|
1708
|
+
children: l.default.node.isRequired,
|
|
1821
1709
|
/**
|
|
1822
1710
|
* `disabled`, if true, stops the <Draggable> from dragging. All handlers,
|
|
1823
1711
|
* with the exception of `onMouseDown`, will not fire.
|
|
1824
1712
|
*/
|
|
1825
|
-
disabled:
|
|
1713
|
+
disabled: l.default.bool,
|
|
1826
1714
|
/**
|
|
1827
1715
|
* By default, we add 'user-select:none' attributes to the document body
|
|
1828
1716
|
* to prevent ugly text selection during drag. If this is causing problems
|
|
1829
1717
|
* for your app, set this to `false`.
|
|
1830
1718
|
*/
|
|
1831
|
-
enableUserSelectHack:
|
|
1719
|
+
enableUserSelectHack: l.default.bool,
|
|
1832
1720
|
/**
|
|
1833
1721
|
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
1834
1722
|
* instead of using the parent node.
|
|
1835
1723
|
*/
|
|
1836
|
-
offsetParent: function(
|
|
1837
|
-
if (
|
|
1724
|
+
offsetParent: function(h, y) {
|
|
1725
|
+
if (h[y] && h[y].nodeType !== 1)
|
|
1838
1726
|
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
1839
1727
|
},
|
|
1840
1728
|
/**
|
|
1841
1729
|
* `grid` specifies the x and y that dragging should snap to.
|
|
1842
1730
|
*/
|
|
1843
|
-
grid:
|
|
1731
|
+
grid: l.default.arrayOf(l.default.number),
|
|
1844
1732
|
/**
|
|
1845
1733
|
* `handle` specifies a selector to be used as the handle that initiates drag.
|
|
1846
1734
|
*
|
|
@@ -1861,7 +1749,7 @@ function Vt() {
|
|
|
1861
1749
|
* });
|
|
1862
1750
|
* ```
|
|
1863
1751
|
*/
|
|
1864
|
-
handle:
|
|
1752
|
+
handle: l.default.string,
|
|
1865
1753
|
/**
|
|
1866
1754
|
* `cancel` specifies a selector to be used to prevent drag initialization.
|
|
1867
1755
|
*
|
|
@@ -1882,7 +1770,7 @@ function Vt() {
|
|
|
1882
1770
|
* });
|
|
1883
1771
|
* ```
|
|
1884
1772
|
*/
|
|
1885
|
-
cancel:
|
|
1773
|
+
cancel: l.default.string,
|
|
1886
1774
|
/* If running in React Strict mode, ReactDOM.findDOMNode() is deprecated.
|
|
1887
1775
|
* Unfortunately, in order for <Draggable> to work properly, we need raw access
|
|
1888
1776
|
* to the underlying DOM node. If you want to avoid the warning, pass a `nodeRef`
|
|
@@ -1900,38 +1788,38 @@ function Vt() {
|
|
|
1900
1788
|
* This can be used for arbitrarily nested components, so long as the ref ends up
|
|
1901
1789
|
* pointing to the actual child DOM node and not a custom component.
|
|
1902
1790
|
*/
|
|
1903
|
-
nodeRef:
|
|
1791
|
+
nodeRef: l.default.object,
|
|
1904
1792
|
/**
|
|
1905
1793
|
* Called when dragging starts.
|
|
1906
1794
|
* If this function returns the boolean false, dragging will be canceled.
|
|
1907
1795
|
*/
|
|
1908
|
-
onStart:
|
|
1796
|
+
onStart: l.default.func,
|
|
1909
1797
|
/**
|
|
1910
1798
|
* Called while dragging.
|
|
1911
1799
|
* If this function returns the boolean false, dragging will be canceled.
|
|
1912
1800
|
*/
|
|
1913
|
-
onDrag:
|
|
1801
|
+
onDrag: l.default.func,
|
|
1914
1802
|
/**
|
|
1915
1803
|
* Called when dragging stops.
|
|
1916
1804
|
* If this function returns the boolean false, the drag will remain active.
|
|
1917
1805
|
*/
|
|
1918
|
-
onStop:
|
|
1806
|
+
onStop: l.default.func,
|
|
1919
1807
|
/**
|
|
1920
1808
|
* A workaround option which can be passed if onMouseDown needs to be accessed,
|
|
1921
1809
|
* since it'll always be blocked (as there is internal use of onMouseDown)
|
|
1922
1810
|
*/
|
|
1923
|
-
onMouseDown:
|
|
1811
|
+
onMouseDown: l.default.func,
|
|
1924
1812
|
/**
|
|
1925
1813
|
* `scale`, if set, applies scaling while dragging an element
|
|
1926
1814
|
*/
|
|
1927
|
-
scale:
|
|
1815
|
+
scale: l.default.number,
|
|
1928
1816
|
/**
|
|
1929
1817
|
* These properties should be defined on the child, not here.
|
|
1930
1818
|
*/
|
|
1931
|
-
className:
|
|
1932
|
-
style:
|
|
1933
|
-
transform:
|
|
1934
|
-
}),
|
|
1819
|
+
className: n.dontSetMe,
|
|
1820
|
+
style: n.dontSetMe,
|
|
1821
|
+
transform: n.dontSetMe
|
|
1822
|
+
}), S(T, "defaultProps", {
|
|
1935
1823
|
allowAnyClick: !1,
|
|
1936
1824
|
// by default only accept left click
|
|
1937
1825
|
allowMobileScroll: !1,
|
|
@@ -1948,111 +1836,111 @@ function Vt() {
|
|
|
1948
1836
|
scale: 1
|
|
1949
1837
|
}), ue;
|
|
1950
1838
|
}
|
|
1951
|
-
var
|
|
1952
|
-
function
|
|
1953
|
-
return
|
|
1839
|
+
var et;
|
|
1840
|
+
function zt() {
|
|
1841
|
+
return et || (et = 1, (function(e) {
|
|
1954
1842
|
Object.defineProperty(e, "__esModule", {
|
|
1955
1843
|
value: !0
|
|
1956
1844
|
}), Object.defineProperty(e, "DraggableCore", {
|
|
1957
1845
|
enumerable: !0,
|
|
1958
1846
|
get: function() {
|
|
1959
|
-
return
|
|
1847
|
+
return D.default;
|
|
1960
1848
|
}
|
|
1961
1849
|
}), e.default = void 0;
|
|
1962
|
-
var
|
|
1963
|
-
function
|
|
1964
|
-
return
|
|
1965
|
-
}
|
|
1966
|
-
function c(
|
|
1967
|
-
if (typeof WeakMap == "function") var
|
|
1968
|
-
return (c = function(
|
|
1969
|
-
if (!M &&
|
|
1970
|
-
var
|
|
1971
|
-
if (
|
|
1972
|
-
if (
|
|
1973
|
-
if (
|
|
1974
|
-
|
|
1850
|
+
var l = c(ve), r = b(/* @__PURE__ */ ft()), o = b(at), s = Yt(), n = Oe(), f = ht(), g = xe(), D = b(Kt()), S = b(gt());
|
|
1851
|
+
function b(x) {
|
|
1852
|
+
return x && x.__esModule ? x : { default: x };
|
|
1853
|
+
}
|
|
1854
|
+
function c(x, E) {
|
|
1855
|
+
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap();
|
|
1856
|
+
return (c = function(i, M) {
|
|
1857
|
+
if (!M && i && i.__esModule) return i;
|
|
1858
|
+
var a, u, d = { __proto__: null, default: i };
|
|
1859
|
+
if (i === null || typeof i != "object" && typeof i != "function") return d;
|
|
1860
|
+
if (a = M ? w : C) {
|
|
1861
|
+
if (a.has(i)) return a.get(i);
|
|
1862
|
+
a.set(i, d);
|
|
1975
1863
|
}
|
|
1976
|
-
for (const _ in
|
|
1977
|
-
return
|
|
1978
|
-
})(
|
|
1979
|
-
}
|
|
1980
|
-
function
|
|
1981
|
-
return
|
|
1982
|
-
for (var
|
|
1983
|
-
var
|
|
1984
|
-
for (var
|
|
1864
|
+
for (const _ in i) _ !== "default" && {}.hasOwnProperty.call(i, _) && ((u = (a = Object.defineProperty) && Object.getOwnPropertyDescriptor(i, _)) && (u.get || u.set) ? a(d, _, u) : d[_] = i[_]);
|
|
1865
|
+
return d;
|
|
1866
|
+
})(x, E);
|
|
1867
|
+
}
|
|
1868
|
+
function p() {
|
|
1869
|
+
return p = Object.assign ? Object.assign.bind() : function(x) {
|
|
1870
|
+
for (var E = 1; E < arguments.length; E++) {
|
|
1871
|
+
var C = arguments[E];
|
|
1872
|
+
for (var w in C) ({}).hasOwnProperty.call(C, w) && (x[w] = C[w]);
|
|
1985
1873
|
}
|
|
1986
|
-
return
|
|
1987
|
-
},
|
|
1988
|
-
}
|
|
1989
|
-
function
|
|
1990
|
-
return (
|
|
1991
|
-
}
|
|
1992
|
-
function T(
|
|
1993
|
-
var
|
|
1994
|
-
return typeof
|
|
1995
|
-
}
|
|
1996
|
-
function
|
|
1997
|
-
if (typeof
|
|
1998
|
-
var
|
|
1999
|
-
if (
|
|
2000
|
-
var
|
|
2001
|
-
if (typeof
|
|
1874
|
+
return x;
|
|
1875
|
+
}, p.apply(null, arguments);
|
|
1876
|
+
}
|
|
1877
|
+
function m(x, E, C) {
|
|
1878
|
+
return (E = T(E)) in x ? Object.defineProperty(x, E, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : x[E] = C, x;
|
|
1879
|
+
}
|
|
1880
|
+
function T(x) {
|
|
1881
|
+
var E = h(x, "string");
|
|
1882
|
+
return typeof E == "symbol" ? E : E + "";
|
|
1883
|
+
}
|
|
1884
|
+
function h(x, E) {
|
|
1885
|
+
if (typeof x != "object" || !x) return x;
|
|
1886
|
+
var C = x[Symbol.toPrimitive];
|
|
1887
|
+
if (C !== void 0) {
|
|
1888
|
+
var w = C.call(x, E);
|
|
1889
|
+
if (typeof w != "object") return w;
|
|
2002
1890
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2003
1891
|
}
|
|
2004
|
-
return (
|
|
1892
|
+
return (E === "string" ? String : Number)(x);
|
|
2005
1893
|
}
|
|
2006
|
-
class
|
|
1894
|
+
class y extends l.Component {
|
|
2007
1895
|
// React 16.3+
|
|
2008
1896
|
// Arity (props, state)
|
|
2009
|
-
static getDerivedStateFromProps(
|
|
1897
|
+
static getDerivedStateFromProps(E, C) {
|
|
2010
1898
|
let {
|
|
2011
|
-
position:
|
|
2012
|
-
} =
|
|
2013
|
-
prevPropsPosition:
|
|
2014
|
-
} =
|
|
2015
|
-
return
|
|
2016
|
-
position:
|
|
2017
|
-
prevPropsPosition:
|
|
1899
|
+
position: w
|
|
1900
|
+
} = E, {
|
|
1901
|
+
prevPropsPosition: i
|
|
1902
|
+
} = C;
|
|
1903
|
+
return w && (!i || w.x !== i.x || w.y !== i.y) ? ((0, S.default)("Draggable: getDerivedStateFromProps %j", {
|
|
1904
|
+
position: w,
|
|
1905
|
+
prevPropsPosition: i
|
|
2018
1906
|
}), {
|
|
2019
|
-
x:
|
|
2020
|
-
y:
|
|
1907
|
+
x: w.x,
|
|
1908
|
+
y: w.y,
|
|
2021
1909
|
prevPropsPosition: {
|
|
2022
|
-
...
|
|
1910
|
+
...w
|
|
2023
1911
|
}
|
|
2024
1912
|
}) : null;
|
|
2025
1913
|
}
|
|
2026
|
-
constructor(
|
|
2027
|
-
super(
|
|
2028
|
-
if ((0,
|
|
1914
|
+
constructor(E) {
|
|
1915
|
+
super(E), m(this, "onDragStart", (C, w) => {
|
|
1916
|
+
if ((0, S.default)("Draggable: onDragStart: %j", w), this.props.onStart(C, (0, f.createDraggableData)(this, w)) === !1) return !1;
|
|
2029
1917
|
this.setState({
|
|
2030
1918
|
dragging: !0,
|
|
2031
1919
|
dragged: !0
|
|
2032
1920
|
});
|
|
2033
|
-
}),
|
|
1921
|
+
}), m(this, "onDrag", (C, w) => {
|
|
2034
1922
|
if (!this.state.dragging) return !1;
|
|
2035
|
-
(0,
|
|
2036
|
-
const
|
|
2037
|
-
x:
|
|
2038
|
-
y:
|
|
1923
|
+
(0, S.default)("Draggable: onDrag: %j", w);
|
|
1924
|
+
const i = (0, f.createDraggableData)(this, w), M = {
|
|
1925
|
+
x: i.x,
|
|
1926
|
+
y: i.y,
|
|
2039
1927
|
slackX: 0,
|
|
2040
1928
|
slackY: 0
|
|
2041
1929
|
};
|
|
2042
1930
|
if (this.props.bounds) {
|
|
2043
1931
|
const {
|
|
2044
|
-
x:
|
|
2045
|
-
y:
|
|
1932
|
+
x: u,
|
|
1933
|
+
y: d
|
|
2046
1934
|
} = M;
|
|
2047
1935
|
M.x += this.state.slackX, M.y += this.state.slackY;
|
|
2048
|
-
const [_,
|
|
2049
|
-
M.x = _, M.y =
|
|
1936
|
+
const [_, R] = (0, f.getBoundPosition)(this, M.x, M.y);
|
|
1937
|
+
M.x = _, M.y = R, M.slackX = this.state.slackX + (u - M.x), M.slackY = this.state.slackY + (d - M.y), i.x = M.x, i.y = M.y, i.deltaX = M.x - this.state.x, i.deltaY = M.y - this.state.y;
|
|
2050
1938
|
}
|
|
2051
|
-
if (this.props.onDrag(
|
|
1939
|
+
if (this.props.onDrag(C, i) === !1) return !1;
|
|
2052
1940
|
this.setState(M);
|
|
2053
|
-
}),
|
|
2054
|
-
if (!this.state.dragging || this.props.onStop(
|
|
2055
|
-
(0,
|
|
1941
|
+
}), m(this, "onDragStop", (C, w) => {
|
|
1942
|
+
if (!this.state.dragging || this.props.onStop(C, (0, f.createDraggableData)(this, w)) === !1) return !1;
|
|
1943
|
+
(0, S.default)("Draggable: onDragStop: %j", w);
|
|
2056
1944
|
const M = {
|
|
2057
1945
|
dragging: !1,
|
|
2058
1946
|
slackX: 0,
|
|
@@ -2060,10 +1948,10 @@ function Gt() {
|
|
|
2060
1948
|
};
|
|
2061
1949
|
if (!!this.props.position) {
|
|
2062
1950
|
const {
|
|
2063
|
-
x:
|
|
2064
|
-
y:
|
|
1951
|
+
x: u,
|
|
1952
|
+
y: d
|
|
2065
1953
|
} = this.props.position;
|
|
2066
|
-
M.x =
|
|
1954
|
+
M.x = u, M.y = d;
|
|
2067
1955
|
}
|
|
2068
1956
|
this.setState(M);
|
|
2069
1957
|
}), this.state = {
|
|
@@ -2072,17 +1960,17 @@ function Gt() {
|
|
|
2072
1960
|
// Whether or not we have been dragged before.
|
|
2073
1961
|
dragged: !1,
|
|
2074
1962
|
// Current transform x and y.
|
|
2075
|
-
x:
|
|
2076
|
-
y:
|
|
1963
|
+
x: E.position ? E.position.x : E.defaultPosition.x,
|
|
1964
|
+
y: E.position ? E.position.y : E.defaultPosition.y,
|
|
2077
1965
|
prevPropsPosition: {
|
|
2078
|
-
...
|
|
1966
|
+
...E.position
|
|
2079
1967
|
},
|
|
2080
1968
|
// Used for compensating for out-of-bounds drags
|
|
2081
1969
|
slackX: 0,
|
|
2082
1970
|
slackY: 0,
|
|
2083
1971
|
// Can only determine if SVG after mounting
|
|
2084
1972
|
isElementSVG: !1
|
|
2085
|
-
},
|
|
1973
|
+
}, E.position && !(E.onDrag || E.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
|
|
2086
1974
|
}
|
|
2087
1975
|
componentDidMount() {
|
|
2088
1976
|
typeof window.SVGElement < "u" && this.findDOMNode() instanceof window.SVGElement && this.setState({
|
|
@@ -2097,51 +1985,51 @@ function Gt() {
|
|
|
2097
1985
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
2098
1986
|
// the underlying DOM node ourselves. See the README for more information.
|
|
2099
1987
|
findDOMNode() {
|
|
2100
|
-
return this.props?.nodeRef?.current ??
|
|
1988
|
+
return this.props?.nodeRef?.current ?? o.default.findDOMNode(this);
|
|
2101
1989
|
}
|
|
2102
1990
|
render() {
|
|
2103
1991
|
const {
|
|
2104
|
-
axis:
|
|
2105
|
-
bounds:
|
|
2106
|
-
children:
|
|
2107
|
-
defaultPosition:
|
|
1992
|
+
axis: E,
|
|
1993
|
+
bounds: C,
|
|
1994
|
+
children: w,
|
|
1995
|
+
defaultPosition: i,
|
|
2108
1996
|
defaultClassName: M,
|
|
2109
|
-
defaultClassNameDragging:
|
|
2110
|
-
defaultClassNameDragged:
|
|
2111
|
-
position:
|
|
1997
|
+
defaultClassNameDragging: a,
|
|
1998
|
+
defaultClassNameDragged: u,
|
|
1999
|
+
position: d,
|
|
2112
2000
|
positionOffset: _,
|
|
2113
|
-
scale:
|
|
2001
|
+
scale: R,
|
|
2114
2002
|
...H
|
|
2115
2003
|
} = this.props;
|
|
2116
|
-
let
|
|
2117
|
-
const B = !!!
|
|
2004
|
+
let V = {}, X = null;
|
|
2005
|
+
const B = !!!d || this.state.dragging, ee = d || i, ae = {
|
|
2118
2006
|
// Set left if horizontal drag is enabled
|
|
2119
|
-
x: (0,
|
|
2007
|
+
x: (0, f.canDragX)(this) && B ? this.state.x : ee.x,
|
|
2120
2008
|
// Set top if vertical drag is enabled
|
|
2121
|
-
y: (0,
|
|
2009
|
+
y: (0, f.canDragY)(this) && B ? this.state.y : ee.y
|
|
2122
2010
|
};
|
|
2123
|
-
this.state.isElementSVG ?
|
|
2124
|
-
const le = (0,
|
|
2125
|
-
[
|
|
2126
|
-
[
|
|
2011
|
+
this.state.isElementSVG ? X = (0, n.createSVGTransform)(ae, _) : V = (0, n.createCSSTransform)(ae, _);
|
|
2012
|
+
const le = (0, s.clsx)(w.props.className || "", M, {
|
|
2013
|
+
[a]: this.state.dragging,
|
|
2014
|
+
[u]: this.state.dragged
|
|
2127
2015
|
});
|
|
2128
|
-
return /* @__PURE__ */
|
|
2016
|
+
return /* @__PURE__ */ l.createElement(D.default, p({}, H, {
|
|
2129
2017
|
onStart: this.onDragStart,
|
|
2130
2018
|
onDrag: this.onDrag,
|
|
2131
2019
|
onStop: this.onDragStop
|
|
2132
|
-
}), /* @__PURE__ */
|
|
2020
|
+
}), /* @__PURE__ */ l.cloneElement(l.Children.only(w), {
|
|
2133
2021
|
className: le,
|
|
2134
2022
|
style: {
|
|
2135
|
-
...
|
|
2136
|
-
...
|
|
2023
|
+
...w.props.style,
|
|
2024
|
+
...V
|
|
2137
2025
|
},
|
|
2138
|
-
transform:
|
|
2026
|
+
transform: X
|
|
2139
2027
|
}));
|
|
2140
2028
|
}
|
|
2141
2029
|
}
|
|
2142
|
-
e.default =
|
|
2030
|
+
e.default = y, m(y, "displayName", "Draggable"), m(y, "propTypes", {
|
|
2143
2031
|
// Accepts all props <DraggableCore> accepts.
|
|
2144
|
-
...
|
|
2032
|
+
...D.default.propTypes,
|
|
2145
2033
|
/**
|
|
2146
2034
|
* `axis` determines which axis the draggable can move.
|
|
2147
2035
|
*
|
|
@@ -2155,7 +2043,7 @@ function Gt() {
|
|
|
2155
2043
|
*
|
|
2156
2044
|
* Defaults to 'both'.
|
|
2157
2045
|
*/
|
|
2158
|
-
axis:
|
|
2046
|
+
axis: r.default.oneOf(["both", "x", "y", "none"]),
|
|
2159
2047
|
/**
|
|
2160
2048
|
* `bounds` determines the range of movement available to the element.
|
|
2161
2049
|
* Available values are:
|
|
@@ -2182,15 +2070,15 @@ function Gt() {
|
|
|
2182
2070
|
* });
|
|
2183
2071
|
* ```
|
|
2184
2072
|
*/
|
|
2185
|
-
bounds:
|
|
2186
|
-
left:
|
|
2187
|
-
right:
|
|
2188
|
-
top:
|
|
2189
|
-
bottom:
|
|
2190
|
-
}),
|
|
2191
|
-
defaultClassName:
|
|
2192
|
-
defaultClassNameDragging:
|
|
2193
|
-
defaultClassNameDragged:
|
|
2073
|
+
bounds: r.default.oneOfType([r.default.shape({
|
|
2074
|
+
left: r.default.number,
|
|
2075
|
+
right: r.default.number,
|
|
2076
|
+
top: r.default.number,
|
|
2077
|
+
bottom: r.default.number
|
|
2078
|
+
}), r.default.string, r.default.oneOf([!1])]),
|
|
2079
|
+
defaultClassName: r.default.string,
|
|
2080
|
+
defaultClassNameDragging: r.default.string,
|
|
2081
|
+
defaultClassNameDragged: r.default.string,
|
|
2194
2082
|
/**
|
|
2195
2083
|
* `defaultPosition` specifies the x and y that the dragged item should start at
|
|
2196
2084
|
*
|
|
@@ -2208,13 +2096,13 @@ function Gt() {
|
|
|
2208
2096
|
* });
|
|
2209
2097
|
* ```
|
|
2210
2098
|
*/
|
|
2211
|
-
defaultPosition:
|
|
2212
|
-
x:
|
|
2213
|
-
y:
|
|
2099
|
+
defaultPosition: r.default.shape({
|
|
2100
|
+
x: r.default.number,
|
|
2101
|
+
y: r.default.number
|
|
2214
2102
|
}),
|
|
2215
|
-
positionOffset:
|
|
2216
|
-
x:
|
|
2217
|
-
y:
|
|
2103
|
+
positionOffset: r.default.shape({
|
|
2104
|
+
x: r.default.oneOfType([r.default.number, r.default.string]),
|
|
2105
|
+
y: r.default.oneOfType([r.default.number, r.default.string])
|
|
2218
2106
|
}),
|
|
2219
2107
|
/**
|
|
2220
2108
|
* `position`, if present, defines the current position of the element.
|
|
@@ -2236,18 +2124,18 @@ function Gt() {
|
|
|
2236
2124
|
* });
|
|
2237
2125
|
* ```
|
|
2238
2126
|
*/
|
|
2239
|
-
position:
|
|
2240
|
-
x:
|
|
2241
|
-
y:
|
|
2127
|
+
position: r.default.shape({
|
|
2128
|
+
x: r.default.number,
|
|
2129
|
+
y: r.default.number
|
|
2242
2130
|
}),
|
|
2243
2131
|
/**
|
|
2244
2132
|
* These properties should be defined on the child, not here.
|
|
2245
2133
|
*/
|
|
2246
|
-
className:
|
|
2247
|
-
style:
|
|
2248
|
-
transform:
|
|
2249
|
-
}),
|
|
2250
|
-
...
|
|
2134
|
+
className: g.dontSetMe,
|
|
2135
|
+
style: g.dontSetMe,
|
|
2136
|
+
transform: g.dontSetMe
|
|
2137
|
+
}), m(y, "defaultProps", {
|
|
2138
|
+
...D.default.defaultProps,
|
|
2251
2139
|
axis: "both",
|
|
2252
2140
|
bounds: !1,
|
|
2253
2141
|
defaultClassName: "react-draggable",
|
|
@@ -2259,21 +2147,21 @@ function Gt() {
|
|
|
2259
2147
|
},
|
|
2260
2148
|
scale: 1
|
|
2261
2149
|
});
|
|
2262
|
-
})(
|
|
2150
|
+
})(Se)), Se;
|
|
2263
2151
|
}
|
|
2264
|
-
var
|
|
2265
|
-
function
|
|
2266
|
-
if (
|
|
2267
|
-
|
|
2152
|
+
var tt;
|
|
2153
|
+
function Bt() {
|
|
2154
|
+
if (tt) return de.exports;
|
|
2155
|
+
tt = 1;
|
|
2268
2156
|
const {
|
|
2269
2157
|
default: e,
|
|
2270
|
-
DraggableCore:
|
|
2271
|
-
} =
|
|
2272
|
-
return de.exports = e, de.exports.default = e, de.exports.DraggableCore =
|
|
2158
|
+
DraggableCore: l
|
|
2159
|
+
} = zt();
|
|
2160
|
+
return de.exports = e, de.exports.default = e, de.exports.DraggableCore = l, de.exports;
|
|
2273
2161
|
}
|
|
2274
|
-
var
|
|
2275
|
-
const
|
|
2276
|
-
const
|
|
2162
|
+
var Ht = Bt();
|
|
2163
|
+
const Vt = /* @__PURE__ */ kt(Ht), Xt = se((e, l) => {
|
|
2164
|
+
const s = {
|
|
2277
2165
|
...{
|
|
2278
2166
|
// 1. Take it out of the document flow
|
|
2279
2167
|
position: "fixed",
|
|
@@ -2290,38 +2178,38 @@ const Qt = /* @__PURE__ */ qt(Jt), en = se((e, i) => {
|
|
|
2290
2178
|
boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
|
|
2291
2179
|
},
|
|
2292
2180
|
...e.style || {}
|
|
2293
|
-
},
|
|
2181
|
+
}, n = e.testId || "not-set", f = e.className || "panel", g = vt(null);
|
|
2294
2182
|
return (
|
|
2295
2183
|
// 3. Pass the internal ref to the Draggable component via 'nodeRef'
|
|
2296
|
-
/* @__PURE__ */
|
|
2297
|
-
|
|
2184
|
+
/* @__PURE__ */ t(
|
|
2185
|
+
Vt,
|
|
2298
2186
|
{
|
|
2299
|
-
nodeRef:
|
|
2300
|
-
"data-testid":
|
|
2187
|
+
nodeRef: g,
|
|
2188
|
+
"data-testid": n,
|
|
2301
2189
|
axis: "both",
|
|
2302
2190
|
handle: ".handle",
|
|
2303
|
-
onStart: (
|
|
2191
|
+
onStart: (b, c) => {
|
|
2304
2192
|
e.onDraggingChange?.(!0);
|
|
2305
2193
|
},
|
|
2306
|
-
onStop: (
|
|
2194
|
+
onStop: (b, c) => {
|
|
2307
2195
|
setTimeout(() => {
|
|
2308
2196
|
e.onDraggingChange?.(!1);
|
|
2309
2197
|
}, 100);
|
|
2310
2198
|
},
|
|
2311
|
-
children: /* @__PURE__ */
|
|
2199
|
+
children: /* @__PURE__ */ t("div", { ref: g, className: f, style: s, children: e.children })
|
|
2312
2200
|
}
|
|
2313
2201
|
)
|
|
2314
2202
|
);
|
|
2315
2203
|
});
|
|
2316
|
-
function
|
|
2317
|
-
const
|
|
2204
|
+
function Er({ children: e, addCssClasses: l }) {
|
|
2205
|
+
const r = G(
|
|
2318
2206
|
"w-full h-full flex-1 flex flex-col",
|
|
2319
|
-
(
|
|
2207
|
+
(l || "gap-2 items-end justify-end content-end").trim()
|
|
2320
2208
|
);
|
|
2321
|
-
return /* @__PURE__ */
|
|
2209
|
+
return /* @__PURE__ */ t(
|
|
2322
2210
|
"div",
|
|
2323
2211
|
{
|
|
2324
|
-
className:
|
|
2212
|
+
className: r,
|
|
2325
2213
|
style: {
|
|
2326
2214
|
minHeight: "140px"
|
|
2327
2215
|
},
|
|
@@ -2329,53 +2217,53 @@ function $n({ children: e, addCssClasses: i }) {
|
|
|
2329
2217
|
}
|
|
2330
2218
|
);
|
|
2331
2219
|
}
|
|
2332
|
-
function
|
|
2333
|
-
const
|
|
2220
|
+
function Nr({ children: e, addCssClasses: l }) {
|
|
2221
|
+
const r = G(
|
|
2334
2222
|
"w-full flex flex-col",
|
|
2335
|
-
(
|
|
2223
|
+
(l || "items-end").trim()
|
|
2336
2224
|
);
|
|
2337
|
-
return /* @__PURE__ */
|
|
2225
|
+
return /* @__PURE__ */ t("div", { className: r, children: e });
|
|
2338
2226
|
}
|
|
2339
|
-
const
|
|
2227
|
+
const _r = (e) => {
|
|
2340
2228
|
console.warn("showToast TODO", e);
|
|
2341
|
-
},
|
|
2342
|
-
let
|
|
2343
|
-
const
|
|
2344
|
-
"--bwj-dashboard-transform-scale":
|
|
2345
|
-
"--bwj-dashboard-add-cols":
|
|
2346
|
-
},
|
|
2229
|
+
}, Gt = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, Mr = se((e, l) => {
|
|
2230
|
+
let r = pt(Number(e.zoomScale || 0));
|
|
2231
|
+
const o = e.responsiveGrid || !1, s = e.isEditing || !1, n = {
|
|
2232
|
+
"--bwj-dashboard-transform-scale": r,
|
|
2233
|
+
"--bwj-dashboard-add-cols": Gt(r)
|
|
2234
|
+
}, f = G(
|
|
2347
2235
|
"dashboard-main-grid w-full",
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
`border border-dashed ${
|
|
2236
|
+
s ? "editing" : "",
|
|
2237
|
+
o ? "responsive-grid" : "",
|
|
2238
|
+
`border border-dashed ${s ? "border-primary border-opacity-50" : "border-transparent"}`
|
|
2351
2239
|
);
|
|
2352
|
-
return /* @__PURE__ */
|
|
2353
|
-
}),
|
|
2354
|
-
const
|
|
2355
|
-
let
|
|
2356
|
-
|
|
2357
|
-
const
|
|
2240
|
+
return /* @__PURE__ */ t("div", { className: f, style: n, children: e.children });
|
|
2241
|
+
}), Pe = "size-5", Zt = (e, l) => {
|
|
2242
|
+
const r = e.hideTitle && !e.isEditing, o = e.noBorder;
|
|
2243
|
+
let s = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
|
|
2244
|
+
o ? s = `${s} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? s = `${s} ${e.borderCssClasses}` : s = `${s} border-card-invert border-opacity-20`, e.noShadow && (s = `${s} no-shadow`), e.noPadding && (s = `${s} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? s = `${s} ${e.backgroundCssClasses}` : s = `${s} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (s = `${s} ${e.size}-widget`);
|
|
2245
|
+
const n = () => {
|
|
2358
2246
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey, e.parentWidgetKey);
|
|
2359
|
-
},
|
|
2360
|
-
e.onMoveClick && e.widgetKey && e.onMoveClick(
|
|
2361
|
-
},
|
|
2247
|
+
}, f = (D) => {
|
|
2248
|
+
e.onMoveClick && e.widgetKey && e.onMoveClick(D, e.widgetKey, e.parentWidgetKey);
|
|
2249
|
+
}, g = G(
|
|
2362
2250
|
"widget-header",
|
|
2363
|
-
|
|
2364
|
-
|
|
2251
|
+
r ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
|
|
2252
|
+
r ? "border-opacity-0" : "border-opacity-20"
|
|
2365
2253
|
);
|
|
2366
|
-
return /* @__PURE__ */
|
|
2367
|
-
/* @__PURE__ */
|
|
2368
|
-
/* @__PURE__ */
|
|
2369
|
-
/* @__PURE__ */
|
|
2254
|
+
return /* @__PURE__ */ I("div", { className: s, children: [
|
|
2255
|
+
/* @__PURE__ */ I("div", { className: g, children: [
|
|
2256
|
+
/* @__PURE__ */ I("div", { className: "widget-title-wrapper w-full flex flex-row gap-2 items-center justify-between", children: [
|
|
2257
|
+
/* @__PURE__ */ I("h2", { className: "widget-title", children: [
|
|
2370
2258
|
e.title,
|
|
2371
2259
|
" "
|
|
2372
2260
|
] }),
|
|
2373
|
-
/* @__PURE__ */
|
|
2261
|
+
/* @__PURE__ */ t("div", {})
|
|
2374
2262
|
] }),
|
|
2375
|
-
/* @__PURE__ */
|
|
2376
|
-
/* @__PURE__ */
|
|
2377
|
-
/* @__PURE__ */
|
|
2378
|
-
/* @__PURE__ */
|
|
2263
|
+
/* @__PURE__ */ t("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ I("div", { className: "actions-inner", children: [
|
|
2264
|
+
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("span", { className: "hidden", children: "Widget" }) }),
|
|
2265
|
+
/* @__PURE__ */ I("div", { className: "actions-buttons-container", children: [
|
|
2266
|
+
/* @__PURE__ */ t(
|
|
2379
2267
|
J,
|
|
2380
2268
|
{
|
|
2381
2269
|
"data-testid": `move-widget-left_${e.title}`,
|
|
@@ -2385,11 +2273,11 @@ const Rn = (e) => {
|
|
|
2385
2273
|
placement: "top",
|
|
2386
2274
|
title: `${e.index < 1 ? "Already at min position" : "Move Widget to the left/up"}`
|
|
2387
2275
|
},
|
|
2388
|
-
onClick: () =>
|
|
2389
|
-
children: /* @__PURE__ */
|
|
2276
|
+
onClick: () => f(-1),
|
|
2277
|
+
children: /* @__PURE__ */ t(it, { className: Pe })
|
|
2390
2278
|
}
|
|
2391
2279
|
),
|
|
2392
|
-
/* @__PURE__ */
|
|
2280
|
+
/* @__PURE__ */ t(
|
|
2393
2281
|
J,
|
|
2394
2282
|
{
|
|
2395
2283
|
"data-testid": `move-widget-right_${e.title}`,
|
|
@@ -2399,11 +2287,11 @@ const Rn = (e) => {
|
|
|
2399
2287
|
placement: "top",
|
|
2400
2288
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Widget to the right/down"}`
|
|
2401
2289
|
},
|
|
2402
|
-
onClick: () =>
|
|
2403
|
-
children: /* @__PURE__ */
|
|
2290
|
+
onClick: () => f(1),
|
|
2291
|
+
children: /* @__PURE__ */ t(st, { className: Pe })
|
|
2404
2292
|
}
|
|
2405
2293
|
),
|
|
2406
|
-
/* @__PURE__ */
|
|
2294
|
+
/* @__PURE__ */ t(
|
|
2407
2295
|
J,
|
|
2408
2296
|
{
|
|
2409
2297
|
"data-testid": `remove-container_${e.title}`,
|
|
@@ -2412,188 +2300,230 @@ const Rn = (e) => {
|
|
|
2412
2300
|
placement: "top",
|
|
2413
2301
|
title: "Remove Widget"
|
|
2414
2302
|
},
|
|
2415
|
-
onClick: () =>
|
|
2416
|
-
children: /* @__PURE__ */
|
|
2303
|
+
onClick: () => n(),
|
|
2304
|
+
children: /* @__PURE__ */ t(lt, { className: Pe })
|
|
2417
2305
|
}
|
|
2418
2306
|
)
|
|
2419
2307
|
] })
|
|
2420
2308
|
] }) })
|
|
2421
2309
|
] }),
|
|
2422
|
-
/* @__PURE__ */
|
|
2310
|
+
/* @__PURE__ */ t("div", { className: "widget-inner", children: e.children })
|
|
2423
2311
|
] });
|
|
2424
|
-
},
|
|
2425
|
-
|
|
2426
|
-
|
|
2312
|
+
}, Jt = se(Zt);
|
|
2313
|
+
function rt(e) {
|
|
2314
|
+
const { widgetKey: l, parentWidgetKey: r, index: o, maxIndex: s, isEditing: n, onRemoveClick: f, onMoveClick: g } = e, D = e.extraProps;
|
|
2315
|
+
return /* @__PURE__ */ t(
|
|
2316
|
+
Jt,
|
|
2317
|
+
{
|
|
2318
|
+
widgetKey: l,
|
|
2319
|
+
title: "Widget Error",
|
|
2320
|
+
parentWidgetKey: r,
|
|
2321
|
+
index: o,
|
|
2322
|
+
maxIndex: s,
|
|
2323
|
+
isEditing: n,
|
|
2324
|
+
onRemoveClick: f,
|
|
2325
|
+
onMoveClick: g,
|
|
2326
|
+
children: /* @__PURE__ */ I("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2327
|
+
/* @__PURE__ */ I("span", { className: "font-bold", children: [
|
|
2328
|
+
'Failed to load "',
|
|
2329
|
+
l,
|
|
2330
|
+
'"'
|
|
2331
|
+
] }),
|
|
2332
|
+
D?.versionMismatch && /* @__PURE__ */ I("div", { className: "flex flex-col", children: [
|
|
2333
|
+
/* @__PURE__ */ I("span", { className: "font-bold text-sm", children: [
|
|
2334
|
+
"Version Mismatch: ",
|
|
2335
|
+
l
|
|
2336
|
+
] }),
|
|
2337
|
+
/* @__PURE__ */ I("div", { className: "flex flex-col text-xs", children: [
|
|
2338
|
+
/* @__PURE__ */ I("span", { children: [
|
|
2339
|
+
"Widget requires: Vue ",
|
|
2340
|
+
D?.requiredVer,
|
|
2341
|
+
"."
|
|
2342
|
+
] }),
|
|
2343
|
+
/* @__PURE__ */ I("span", { children: [
|
|
2344
|
+
"Host version: ",
|
|
2345
|
+
D?.hostVer,
|
|
2346
|
+
"."
|
|
2347
|
+
] })
|
|
2348
|
+
] }),
|
|
2349
|
+
/* @__PURE__ */ I("div", { className: "flex flex-col mt-3", children: [
|
|
2350
|
+
/* @__PURE__ */ t("h5", { children: "Externals:" }),
|
|
2351
|
+
/* @__PURE__ */ t("dl", { className: "ml-2 flex flex-col text-xs", children: D?.externalDependencies.map((S, b) => /* @__PURE__ */ I("dd", { children: [
|
|
2352
|
+
"- ",
|
|
2353
|
+
S
|
|
2354
|
+
] }, `dep-${b}`)) })
|
|
2355
|
+
] })
|
|
2356
|
+
] }),
|
|
2357
|
+
!D?.versionMismatch && /* @__PURE__ */ I("div", { className: "flex flex-col", children: [
|
|
2358
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col text-xs italic", children: /* @__PURE__ */ t("span", { children: "The remote plugin is unavailable." }) }),
|
|
2359
|
+
/* @__PURE__ */ t("span", { className: "font-bold text-sm", children: "Error Details:" }),
|
|
2360
|
+
/* @__PURE__ */ I("div", { className: "flex flex-col mt-3", children: [
|
|
2361
|
+
/* @__PURE__ */ t("h5", { children: "Details:" }),
|
|
2362
|
+
/* @__PURE__ */ t("div", { className: "text-xs break-all", children: D?.errorMessage || "Unknown error occurred." })
|
|
2363
|
+
] })
|
|
2364
|
+
] })
|
|
2365
|
+
] })
|
|
2366
|
+
}
|
|
2367
|
+
);
|
|
2368
|
+
}
|
|
2369
|
+
const Qt = (e, l) => {
|
|
2370
|
+
const r = (n) => n.replace(/[^0-9.]/g, ""), o = r(e).split(".").map(Number), s = r(l).split(".").map(Number);
|
|
2371
|
+
return !(o[0] !== s[0] || o[1] < s[1]);
|
|
2427
2372
|
};
|
|
2428
|
-
function
|
|
2429
|
-
return /* @__PURE__ */
|
|
2430
|
-
/* @__PURE__ */
|
|
2431
|
-
/* @__PURE__ */
|
|
2373
|
+
function er(e) {
|
|
2374
|
+
return /* @__PURE__ */ t("div", { className: "dashboard-widget", children: /* @__PURE__ */ I("div", { className: "absolute inset-0 bg-black flex flex-col items-center justify-center text-center", children: [
|
|
2375
|
+
/* @__PURE__ */ t("div", { className: "w-full absolute opacity-100 text-primary", children: e.title }),
|
|
2376
|
+
/* @__PURE__ */ t("div", { className: "animate-ping rounded-full h-32 w-32 border-8 border-white" })
|
|
2432
2377
|
] }) });
|
|
2433
2378
|
}
|
|
2434
|
-
function
|
|
2379
|
+
function tr({
|
|
2435
2380
|
index: e,
|
|
2436
|
-
maxIndex:
|
|
2437
|
-
widgetKey:
|
|
2438
|
-
parentWidgetKey:
|
|
2439
|
-
targetContainerKey:
|
|
2440
|
-
childWidgetsConfig:
|
|
2441
|
-
widgetCatalog:
|
|
2442
|
-
isEditing:
|
|
2381
|
+
maxIndex: l,
|
|
2382
|
+
widgetKey: r,
|
|
2383
|
+
parentWidgetKey: o,
|
|
2384
|
+
targetContainerKey: s,
|
|
2385
|
+
childWidgetsConfig: n,
|
|
2386
|
+
widgetCatalog: f,
|
|
2387
|
+
isEditing: g,
|
|
2443
2388
|
// for additional props passed to all widget from the dashboard through the DynamicWidgetLoader:
|
|
2444
|
-
extraProps:
|
|
2445
|
-
onRemoveClick:
|
|
2446
|
-
onMoveClick:
|
|
2389
|
+
extraProps: D,
|
|
2390
|
+
onRemoveClick: S,
|
|
2391
|
+
onMoveClick: b,
|
|
2447
2392
|
selectContainer: c
|
|
2448
2393
|
}) {
|
|
2449
|
-
const
|
|
2450
|
-
if (!
|
|
2451
|
-
return /* @__PURE__ */
|
|
2394
|
+
const p = `${r}`.split("_"), m = p.length > 1, T = m ? p[0] : r, h = f.get(T);
|
|
2395
|
+
if (!h)
|
|
2396
|
+
return /* @__PURE__ */ t("div", { className: "flex", children: /* @__PURE__ */ I("p", { children: [
|
|
2452
2397
|
"Widget not found in catalog: ",
|
|
2453
2398
|
T
|
|
2454
2399
|
] }) });
|
|
2455
|
-
let
|
|
2456
|
-
const
|
|
2400
|
+
let y = null, x = !1;
|
|
2401
|
+
const E = !!h.isContainer, C = m ? nt(r) : "", w = E ? (n || []).filter((a) => a.parentWidgetKey === r) : [], i = {
|
|
2457
2402
|
index: e,
|
|
2458
|
-
maxIndex:
|
|
2459
|
-
widgetKey:
|
|
2460
|
-
parentWidgetKey:
|
|
2461
|
-
isEditing:
|
|
2462
|
-
extraProps:
|
|
2463
|
-
title:
|
|
2464
|
-
onRemoveClick:
|
|
2465
|
-
onMoveClick:
|
|
2403
|
+
maxIndex: l,
|
|
2404
|
+
widgetKey: r,
|
|
2405
|
+
parentWidgetKey: o,
|
|
2406
|
+
isEditing: g,
|
|
2407
|
+
extraProps: D,
|
|
2408
|
+
title: m ? C : h.title,
|
|
2409
|
+
onRemoveClick: S,
|
|
2410
|
+
onMoveClick: b
|
|
2466
2411
|
};
|
|
2467
|
-
if (
|
|
2468
|
-
if (!
|
|
2469
|
-
const
|
|
2470
|
-
if (
|
|
2471
|
-
const _ =
|
|
2472
|
-
if (!
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
/* @__PURE__ */ $("p", { className: "text-xs", children: [
|
|
2487
|
-
"Widget requires ",
|
|
2488
|
-
/* @__PURE__ */ $("strong", { children: [
|
|
2489
|
-
"React ",
|
|
2490
|
-
_
|
|
2491
|
-
] }),
|
|
2492
|
-
". Host is running",
|
|
2493
|
-
" ",
|
|
2494
|
-
/* @__PURE__ */ n("strong", { children: s }),
|
|
2495
|
-
"."
|
|
2496
|
-
] })
|
|
2497
|
-
] }),
|
|
2498
|
-
/* @__PURE__ */ $("div", { className: "flex flex-col mt-3", children: [
|
|
2499
|
-
/* @__PURE__ */ n("h5", { children: "Externals:" }),
|
|
2500
|
-
/* @__PURE__ */ n("dl", { className: "ml-2 flex flex-col text-xs", children: h.map((I, H) => /* @__PURE__ */ $("dd", { children: [
|
|
2501
|
-
"- ",
|
|
2502
|
-
I
|
|
2503
|
-
] }, H)) })
|
|
2504
|
-
] })
|
|
2505
|
-
] }) })
|
|
2412
|
+
if (h.component ? (y = h.component, x = !1) : h.loader && (x = !0, y = ot(() => {
|
|
2413
|
+
if (!h) return null;
|
|
2414
|
+
const a = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", u = h.meta?.externalDependencies || [], d = u.find((_) => _.startsWith("react@"));
|
|
2415
|
+
if (d) {
|
|
2416
|
+
const _ = d.split("@")[1];
|
|
2417
|
+
if (!Qt(a, _)) {
|
|
2418
|
+
const R = {
|
|
2419
|
+
...i.extraProps,
|
|
2420
|
+
hostVer: a,
|
|
2421
|
+
requiredVer: _,
|
|
2422
|
+
externalDependencies: u,
|
|
2423
|
+
errorMessage: `Incompatible React version. Required: ${_}, Host: ${a}`,
|
|
2424
|
+
versionMismatch: !0
|
|
2425
|
+
};
|
|
2426
|
+
return i.extraProps = {
|
|
2427
|
+
...i.extraProps,
|
|
2428
|
+
...R
|
|
2429
|
+
}, ve.lazy(async () => ({
|
|
2430
|
+
default: () => /* @__PURE__ */ t(rt, { ...i })
|
|
2506
2431
|
}));
|
|
2432
|
+
}
|
|
2507
2433
|
}
|
|
2508
|
-
if (
|
|
2509
|
-
return
|
|
2510
|
-
if (
|
|
2434
|
+
if (h.component)
|
|
2435
|
+
return h.component;
|
|
2436
|
+
if (h.loader) {
|
|
2511
2437
|
const _ = async () => {
|
|
2512
2438
|
try {
|
|
2513
|
-
return await
|
|
2514
|
-
} catch (
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2439
|
+
return await h.loader();
|
|
2440
|
+
} catch (R) {
|
|
2441
|
+
console.error(`Widget Load Error [${r}]:`, R);
|
|
2442
|
+
const H = {
|
|
2443
|
+
...i.extraProps,
|
|
2444
|
+
hostVer: a,
|
|
2445
|
+
requiredVer: d ? d.split("@")[1] : "Unknown",
|
|
2446
|
+
externalDependencies: u,
|
|
2447
|
+
errorMessage: R.message,
|
|
2448
|
+
versionMismatch: !1
|
|
2449
|
+
};
|
|
2450
|
+
return i.extraProps = {
|
|
2451
|
+
...i.extraProps,
|
|
2452
|
+
...H
|
|
2453
|
+
}, {
|
|
2454
|
+
default: () => /* @__PURE__ */ t(rt, { ...i })
|
|
2525
2455
|
};
|
|
2526
2456
|
}
|
|
2527
2457
|
};
|
|
2528
|
-
return
|
|
2458
|
+
return ve.lazy(_);
|
|
2529
2459
|
}
|
|
2530
2460
|
return null;
|
|
2531
|
-
}, [
|
|
2532
|
-
return /* @__PURE__ */
|
|
2461
|
+
}, [h, r])), !y)
|
|
2462
|
+
return /* @__PURE__ */ t("div", { className: "flex", children: /* @__PURE__ */ I("p", { children: [
|
|
2533
2463
|
"Widget definition incomplete: ",
|
|
2534
2464
|
T
|
|
2535
2465
|
] }) });
|
|
2536
|
-
const M =
|
|
2537
|
-
highlight:
|
|
2466
|
+
const M = E ? {
|
|
2467
|
+
highlight: s === r,
|
|
2538
2468
|
selectContainer: c,
|
|
2539
2469
|
// The children prop is the recursive call back to DynamicWidgetLoader
|
|
2540
|
-
children:
|
|
2541
|
-
|
|
2470
|
+
children: w.map((a, u) => /* @__PURE__ */ t(
|
|
2471
|
+
tr,
|
|
2542
2472
|
{
|
|
2543
|
-
index:
|
|
2544
|
-
maxIndex:
|
|
2545
|
-
widgetKey:
|
|
2546
|
-
parentWidgetKey:
|
|
2547
|
-
widgetCatalog:
|
|
2548
|
-
isEditing:
|
|
2549
|
-
extraProps:
|
|
2550
|
-
onRemoveClick:
|
|
2551
|
-
onMoveClick:
|
|
2473
|
+
index: u,
|
|
2474
|
+
maxIndex: w.length - 1,
|
|
2475
|
+
widgetKey: a.widgetKey,
|
|
2476
|
+
parentWidgetKey: a.parentWidgetKey,
|
|
2477
|
+
widgetCatalog: f,
|
|
2478
|
+
isEditing: g,
|
|
2479
|
+
extraProps: D,
|
|
2480
|
+
onRemoveClick: S,
|
|
2481
|
+
onMoveClick: b
|
|
2552
2482
|
},
|
|
2553
|
-
`${
|
|
2483
|
+
`${a.widgetKey}_${u}`
|
|
2554
2484
|
))
|
|
2555
2485
|
} : {};
|
|
2556
|
-
return
|
|
2486
|
+
return x ? /* @__PURE__ */ t(xt, { fallback: /* @__PURE__ */ t(er, { title: `Loading ${h.title}` }), children: /* @__PURE__ */ t(y, { ...i, ...M }) }) : /* @__PURE__ */ t(y, { ...i, ...M });
|
|
2557
2487
|
}
|
|
2558
|
-
const
|
|
2559
|
-
function
|
|
2560
|
-
const
|
|
2561
|
-
let
|
|
2562
|
-
const
|
|
2563
|
-
let
|
|
2564
|
-
["large", "xlarge"].indexOf(e.size || "") > -1 && (
|
|
2565
|
-
let
|
|
2566
|
-
|
|
2488
|
+
const be = "size-5";
|
|
2489
|
+
function ke(e) {
|
|
2490
|
+
const l = e.highlight || !1, r = e.direction || "column", o = e.children.length > 0, s = e.isEditing || !1;
|
|
2491
|
+
let g = l ? "border-transparent" : s && !o ? "border-card-invert" : "border-transparent";
|
|
2492
|
+
const D = ["large", "xlarge"].includes(e.size || "");
|
|
2493
|
+
let S = "";
|
|
2494
|
+
["large", "xlarge"].indexOf(e.size || "") > -1 && (S = `${e.size}-widget`);
|
|
2495
|
+
let b = "";
|
|
2496
|
+
r === "row" && !o ? b = "min-h-48" : r === "column" && !o && (b = "min-h-96");
|
|
2567
2497
|
let c = G(
|
|
2568
2498
|
"dashboard-widget-container relative ",
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
`direction-${
|
|
2575
|
-
`border ${
|
|
2576
|
-
`${
|
|
2577
|
-
),
|
|
2578
|
-
const
|
|
2499
|
+
o ? "" : "has-no-children",
|
|
2500
|
+
s ? "editing" : "",
|
|
2501
|
+
b,
|
|
2502
|
+
S,
|
|
2503
|
+
D ? "widget-container-grid" : "widget-container-flex",
|
|
2504
|
+
`direction-${r}`,
|
|
2505
|
+
`border ${g}`,
|
|
2506
|
+
`${l ? "highlight-container" : ""} ${g}`
|
|
2507
|
+
), p = `widget-container-header direction-${r} flex items-center border-1 ${g}`;
|
|
2508
|
+
const m = () => {
|
|
2579
2509
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
|
|
2580
|
-
}, T = (
|
|
2581
|
-
e.onMoveClick && e.widgetKey && e.onMoveClick(
|
|
2582
|
-
},
|
|
2510
|
+
}, T = (y) => {
|
|
2511
|
+
e.onMoveClick && e.widgetKey && e.onMoveClick(y, e.widgetKey, e.parentWidgetKey);
|
|
2512
|
+
}, h = () => {
|
|
2583
2513
|
e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
|
|
2584
2514
|
};
|
|
2585
|
-
return /* @__PURE__ */
|
|
2586
|
-
/* @__PURE__ */
|
|
2587
|
-
/* @__PURE__ */
|
|
2515
|
+
return /* @__PURE__ */ I("div", { "data-testid": `container_${e.widgetKey}`, className: c, children: [
|
|
2516
|
+
/* @__PURE__ */ I("div", { className: p, children: [
|
|
2517
|
+
/* @__PURE__ */ t(
|
|
2588
2518
|
"div",
|
|
2589
2519
|
{
|
|
2590
2520
|
className: "widget-title-wrapper w-full flex whitespace-nowrap",
|
|
2591
|
-
onClick:
|
|
2592
|
-
children: /* @__PURE__ */
|
|
2521
|
+
onClick: h,
|
|
2522
|
+
children: /* @__PURE__ */ t("span", { className: "text-sm font-semibold capitalize", children: e.title })
|
|
2593
2523
|
}
|
|
2594
2524
|
),
|
|
2595
|
-
/* @__PURE__ */
|
|
2596
|
-
/* @__PURE__ */
|
|
2525
|
+
/* @__PURE__ */ t("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ t("div", { className: "actions-inner", children: /* @__PURE__ */ I("div", { className: "actions-buttons-container", children: [
|
|
2526
|
+
/* @__PURE__ */ t(
|
|
2597
2527
|
J,
|
|
2598
2528
|
{
|
|
2599
2529
|
"data-testid": `open-widgets-catalog-from-container_${e.title}`,
|
|
@@ -2603,16 +2533,16 @@ function We(e) {
|
|
|
2603
2533
|
placement: "top",
|
|
2604
2534
|
title: "Target this Container"
|
|
2605
2535
|
},
|
|
2606
|
-
onClick:
|
|
2607
|
-
children: /* @__PURE__ */
|
|
2608
|
-
|
|
2536
|
+
onClick: h,
|
|
2537
|
+
children: /* @__PURE__ */ t(
|
|
2538
|
+
It,
|
|
2609
2539
|
{
|
|
2610
|
-
className: `${
|
|
2540
|
+
className: `${be} ${l ? "text-success" : "text-disabled"}`
|
|
2611
2541
|
}
|
|
2612
2542
|
)
|
|
2613
2543
|
}
|
|
2614
2544
|
),
|
|
2615
|
-
/* @__PURE__ */
|
|
2545
|
+
/* @__PURE__ */ t(
|
|
2616
2546
|
J,
|
|
2617
2547
|
{
|
|
2618
2548
|
"data-testid": `move-container-left_${e.title}`,
|
|
@@ -2623,10 +2553,10 @@ function We(e) {
|
|
|
2623
2553
|
title: `${e.index < 1 ? "Already at min position" : "Move Container to the left/up"}`
|
|
2624
2554
|
},
|
|
2625
2555
|
onClick: () => T(-1),
|
|
2626
|
-
children: /* @__PURE__ */
|
|
2556
|
+
children: /* @__PURE__ */ t(it, { className: be })
|
|
2627
2557
|
}
|
|
2628
2558
|
),
|
|
2629
|
-
/* @__PURE__ */
|
|
2559
|
+
/* @__PURE__ */ t(
|
|
2630
2560
|
J,
|
|
2631
2561
|
{
|
|
2632
2562
|
"data-testid": `move-container-right_${e.title}`,
|
|
@@ -2637,10 +2567,10 @@ function We(e) {
|
|
|
2637
2567
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Container to the right/down"}`
|
|
2638
2568
|
},
|
|
2639
2569
|
onClick: () => T(1),
|
|
2640
|
-
children: /* @__PURE__ */
|
|
2570
|
+
children: /* @__PURE__ */ t(st, { className: be })
|
|
2641
2571
|
}
|
|
2642
2572
|
),
|
|
2643
|
-
/* @__PURE__ */
|
|
2573
|
+
/* @__PURE__ */ t(
|
|
2644
2574
|
J,
|
|
2645
2575
|
{
|
|
2646
2576
|
"data-testid": `remove-container_${e.title}`,
|
|
@@ -2649,140 +2579,140 @@ function We(e) {
|
|
|
2649
2579
|
placement: "top",
|
|
2650
2580
|
title: "Remove Container"
|
|
2651
2581
|
},
|
|
2652
|
-
onClick: () =>
|
|
2653
|
-
children: /* @__PURE__ */
|
|
2582
|
+
onClick: () => m(),
|
|
2583
|
+
children: /* @__PURE__ */ t(lt, { className: be })
|
|
2654
2584
|
}
|
|
2655
2585
|
)
|
|
2656
2586
|
] }) }) })
|
|
2657
2587
|
] }),
|
|
2658
|
-
/* @__PURE__ */
|
|
2588
|
+
/* @__PURE__ */ t("div", { "data-testid": `childrenwrapper_${e.widgetKey}`, className: "widget-container-inner", children: e.children })
|
|
2659
2589
|
] });
|
|
2660
2590
|
}
|
|
2661
|
-
function
|
|
2662
|
-
const { direction:
|
|
2663
|
-
return /* @__PURE__ */
|
|
2591
|
+
function Pr(e) {
|
|
2592
|
+
const { direction: l, ...r } = e;
|
|
2593
|
+
return /* @__PURE__ */ t(ke, { direction: "column", ...r });
|
|
2664
2594
|
}
|
|
2665
|
-
function
|
|
2666
|
-
const { size:
|
|
2667
|
-
return /* @__PURE__ */
|
|
2595
|
+
function Ir(e) {
|
|
2596
|
+
const { size: l, ...r } = e;
|
|
2597
|
+
return /* @__PURE__ */ t(ke, { size: "large", ...r });
|
|
2668
2598
|
}
|
|
2669
|
-
function
|
|
2670
|
-
const { direction:
|
|
2671
|
-
return /* @__PURE__ */
|
|
2599
|
+
function Rr(e) {
|
|
2600
|
+
const { direction: l, ...r } = e;
|
|
2601
|
+
return /* @__PURE__ */ t(ke, { direction: "row", ...r });
|
|
2672
2602
|
}
|
|
2673
|
-
function
|
|
2603
|
+
function Ie({
|
|
2674
2604
|
// widgetKey,
|
|
2675
2605
|
metaData: e,
|
|
2676
|
-
alreadyAdded:
|
|
2677
|
-
addWidget:
|
|
2606
|
+
alreadyAdded: l,
|
|
2607
|
+
addWidget: r
|
|
2678
2608
|
}) {
|
|
2679
|
-
const [
|
|
2609
|
+
const [o, s] = ie(!1), n = e.icon || Rt, f = e.name || "Unknown", g = e.description || "---", S = (e.noDuplicatedWidgets || !1) && l, b = G(`
|
|
2680
2610
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2681
|
-
${
|
|
2611
|
+
${S ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
|
|
2682
2612
|
`);
|
|
2683
|
-
return /* @__PURE__ */
|
|
2684
|
-
|
|
2613
|
+
return /* @__PURE__ */ I("div", { className: b, style: { width: "calc(100% - 1rem)" }, onClick: () => {
|
|
2614
|
+
S || r();
|
|
2685
2615
|
}, children: [
|
|
2686
|
-
/* @__PURE__ */ n
|
|
2687
|
-
/* @__PURE__ */
|
|
2688
|
-
/* @__PURE__ */
|
|
2689
|
-
/* @__PURE__ */
|
|
2690
|
-
/* @__PURE__ */
|
|
2616
|
+
/* @__PURE__ */ t(n, { className: "" }),
|
|
2617
|
+
/* @__PURE__ */ I("div", { className: "w-full", children: [
|
|
2618
|
+
/* @__PURE__ */ I("div", { className: "flex flex-row items-center gap-2 justify-between", children: [
|
|
2619
|
+
/* @__PURE__ */ t("span", { className: "font-bold", children: f }),
|
|
2620
|
+
/* @__PURE__ */ t("div", { className: "text-xs", children: S ? "(Added)" : "" })
|
|
2691
2621
|
] }),
|
|
2692
|
-
/* @__PURE__ */
|
|
2693
|
-
/* @__PURE__ */
|
|
2694
|
-
/* @__PURE__ */
|
|
2695
|
-
|
|
2622
|
+
/* @__PURE__ */ I("div", { className: "flex flex-col text-xs", children: [
|
|
2623
|
+
/* @__PURE__ */ t("div", { children: g }),
|
|
2624
|
+
/* @__PURE__ */ t("div", { className: "mt-3 cursor-pointer", onClick: (m) => {
|
|
2625
|
+
m.stopPropagation(), m.preventDefault(), s(!o);
|
|
2696
2626
|
}, children: "Externals:" }),
|
|
2697
|
-
|
|
2627
|
+
o && /* @__PURE__ */ t("dl", { className: "ml-2 flex flex-col text-xs", children: e.externalDependencies.map((m, T) => /* @__PURE__ */ I("dd", { children: [
|
|
2698
2628
|
"- ",
|
|
2699
|
-
|
|
2629
|
+
m
|
|
2700
2630
|
] }, T)) })
|
|
2701
2631
|
] })
|
|
2702
2632
|
] })
|
|
2703
2633
|
] });
|
|
2704
2634
|
}
|
|
2705
|
-
function
|
|
2706
|
-
const
|
|
2635
|
+
function rr({ item: e, onSettingItemChanged: l }) {
|
|
2636
|
+
const r = e.name || "Unknown", o = e.description || "---", s = G(`
|
|
2707
2637
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2708
|
-
`),
|
|
2709
|
-
const
|
|
2710
|
-
if (["ArrowUp", "ArrowDown"].includes(
|
|
2711
|
-
|
|
2712
|
-
const
|
|
2638
|
+
`), n = (g) => {
|
|
2639
|
+
const D = g.key;
|
|
2640
|
+
if (["ArrowUp", "ArrowDown"].includes(D)) {
|
|
2641
|
+
g.preventDefault();
|
|
2642
|
+
const S = bt.incrementOrDecrementValue(
|
|
2713
2643
|
e,
|
|
2714
|
-
|
|
2644
|
+
D === "ArrowUp" ? 1 : -1
|
|
2715
2645
|
);
|
|
2716
|
-
|
|
2646
|
+
l(S);
|
|
2717
2647
|
}
|
|
2718
|
-
},
|
|
2719
|
-
|
|
2648
|
+
}, f = (g) => {
|
|
2649
|
+
l({
|
|
2720
2650
|
...e,
|
|
2721
|
-
value:
|
|
2651
|
+
value: g.target.value || ""
|
|
2722
2652
|
});
|
|
2723
2653
|
};
|
|
2724
|
-
return /* @__PURE__ */
|
|
2725
|
-
/* @__PURE__ */
|
|
2726
|
-
/* @__PURE__ */
|
|
2727
|
-
/* @__PURE__ */
|
|
2654
|
+
return /* @__PURE__ */ t("div", { className: s, style: { width: "calc(100% - 1rem)" }, children: /* @__PURE__ */ I("div", { className: "w-full", children: [
|
|
2655
|
+
/* @__PURE__ */ t("div", { className: "flex flex-row items-center gap-2 justify-between", children: /* @__PURE__ */ t("span", { className: "font-bold", children: r }) }),
|
|
2656
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-2 text-xs", children: /* @__PURE__ */ t("div", { children: o }) }),
|
|
2657
|
+
/* @__PURE__ */ I("div", { children: [
|
|
2728
2658
|
"Value:",
|
|
2729
|
-
/* @__PURE__ */
|
|
2730
|
-
|
|
2659
|
+
/* @__PURE__ */ t(
|
|
2660
|
+
ct,
|
|
2731
2661
|
{
|
|
2732
2662
|
label: "Filter...",
|
|
2733
2663
|
size: "small",
|
|
2734
2664
|
className: "w-full",
|
|
2735
2665
|
value: e.value,
|
|
2736
|
-
onChange:
|
|
2737
|
-
onKeyDown:
|
|
2666
|
+
onChange: f,
|
|
2667
|
+
onKeyDown: n
|
|
2738
2668
|
}
|
|
2739
2669
|
)
|
|
2740
2670
|
] })
|
|
2741
2671
|
] }) });
|
|
2742
2672
|
}
|
|
2743
|
-
const
|
|
2744
|
-
...
|
|
2745
|
-
...
|
|
2673
|
+
const Re = (e, l) => [
|
|
2674
|
+
...l.widgets.filter((o) => o.indexOf("Container") === -1),
|
|
2675
|
+
...l.childWidgetsConfig.map((o) => o.widgetKey)
|
|
2746
2676
|
].includes(e);
|
|
2747
|
-
function
|
|
2677
|
+
function $r(e) {
|
|
2748
2678
|
const {
|
|
2749
|
-
currentDashboardConfig:
|
|
2750
|
-
undoStatus:
|
|
2751
|
-
addContainer:
|
|
2752
|
-
onResetToDefaultDashboardClick:
|
|
2753
|
-
onUndoOrRedo:
|
|
2754
|
-
onDoneClick:
|
|
2755
|
-
} = e, [
|
|
2756
|
-
widgetKey:
|
|
2757
|
-
metaData: yt(
|
|
2758
|
-
})),
|
|
2759
|
-
|
|
2760
|
-
},
|
|
2679
|
+
currentDashboardConfig: l,
|
|
2680
|
+
undoStatus: r,
|
|
2681
|
+
addContainer: o,
|
|
2682
|
+
onResetToDefaultDashboardClick: s,
|
|
2683
|
+
onUndoOrRedo: n,
|
|
2684
|
+
onDoneClick: f
|
|
2685
|
+
} = e, [g, D] = ie("Editing"), [S, b] = ie(0), [c, p] = ie(""), T = Array.from(e.widgetsCatalog.keys()).map((d) => ({
|
|
2686
|
+
widgetKey: d,
|
|
2687
|
+
metaData: yt(d, e.widgetsCatalog)
|
|
2688
|
+
})), h = !!e.targetContainerKey, y = (d) => {
|
|
2689
|
+
p(d.target.value);
|
|
2690
|
+
}, x = (d) => {
|
|
2761
2691
|
const _ = c.trim().toLowerCase();
|
|
2762
|
-
return _.length < 1 ? !0 :
|
|
2763
|
-
},
|
|
2692
|
+
return _.length < 1 ? !0 : d.name.trim().toLowerCase().includes(_) || d.description.toLowerCase().includes(_);
|
|
2693
|
+
}, E = (d) => {
|
|
2764
2694
|
const _ = c.trim().toLowerCase();
|
|
2765
|
-
return _.length < 1 ? !0 :
|
|
2766
|
-
},
|
|
2695
|
+
return _.length < 1 ? !0 : d.name.trim().toLowerCase().includes(_) || d.description.toLowerCase().includes(_);
|
|
2696
|
+
}, C = (d) => G(
|
|
2767
2697
|
"px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
|
|
2768
|
-
|
|
2769
|
-
),
|
|
2770
|
-
|
|
2771
|
-
},
|
|
2772
|
-
const _ = (e.currentDashboardConfig.cssSettings || []).map((
|
|
2698
|
+
d === S ? "text-primary border-primary" : ""
|
|
2699
|
+
), w = (d) => {
|
|
2700
|
+
h ? e.addWidget(d, e.targetContainerKey) : e.addWidget(d);
|
|
2701
|
+
}, i = (d) => {
|
|
2702
|
+
const _ = (e.currentDashboardConfig.cssSettings || []).map((R) => R.key === d.key ? d : R);
|
|
2773
2703
|
e.onSettingItemsUpdated(_);
|
|
2774
|
-
}, [M,
|
|
2775
|
-
|
|
2704
|
+
}, [M, a] = ie(!1), u = (d) => {
|
|
2705
|
+
a(d);
|
|
2776
2706
|
};
|
|
2777
2707
|
return Ct(() => {
|
|
2778
2708
|
if (e.targetContainerKey) {
|
|
2779
|
-
|
|
2780
|
-
const
|
|
2781
|
-
|
|
2709
|
+
b(0);
|
|
2710
|
+
const d = nt(e.targetContainerKey);
|
|
2711
|
+
D(`Editing ${d}`);
|
|
2782
2712
|
} else
|
|
2783
|
-
|
|
2784
|
-
}, [e.targetContainerKey]), /* @__PURE__ */
|
|
2785
|
-
|
|
2713
|
+
D("Editing Dashboard");
|
|
2714
|
+
}, [e.targetContainerKey]), /* @__PURE__ */ t(
|
|
2715
|
+
Xt,
|
|
2786
2716
|
{
|
|
2787
2717
|
testId: "dashboard-catalog-flyout",
|
|
2788
2718
|
className: "bg-body content-body bg-opacity-70 border-2 border-primary",
|
|
@@ -2794,22 +2724,22 @@ function An(e) {
|
|
|
2794
2724
|
minHeight: "360px",
|
|
2795
2725
|
backdropFilter: "blur(8px)"
|
|
2796
2726
|
},
|
|
2797
|
-
onDraggingChange:
|
|
2798
|
-
children: /* @__PURE__ */
|
|
2799
|
-
/* @__PURE__ */
|
|
2800
|
-
/* @__PURE__ */
|
|
2801
|
-
M ? /* @__PURE__ */
|
|
2802
|
-
/* @__PURE__ */
|
|
2727
|
+
onDraggingChange: u,
|
|
2728
|
+
children: /* @__PURE__ */ I("div", { className: "flex flex-col gap-2 p-2", children: [
|
|
2729
|
+
/* @__PURE__ */ I("div", { className: "flex flex-row gap-2 justify-between", children: [
|
|
2730
|
+
/* @__PURE__ */ I("div", { className: "handle flex-1 flex gap-2 w-full hover:text-primary cursor-grab", children: [
|
|
2731
|
+
M ? /* @__PURE__ */ t(Pt, { className: "size-5" }) : /* @__PURE__ */ t(Mt, { className: "size-5" }),
|
|
2732
|
+
/* @__PURE__ */ t(
|
|
2803
2733
|
"h2",
|
|
2804
2734
|
{
|
|
2805
2735
|
className: "flex-1 text-base margin-0 capitalize",
|
|
2806
|
-
title:
|
|
2807
|
-
children:
|
|
2736
|
+
title: h ? g : `Editing dashboard: ${l.dashboardName}`,
|
|
2737
|
+
children: g
|
|
2808
2738
|
}
|
|
2809
2739
|
)
|
|
2810
2740
|
] }),
|
|
2811
|
-
/* @__PURE__ */
|
|
2812
|
-
/* @__PURE__ */
|
|
2741
|
+
/* @__PURE__ */ I("div", { className: "flex flex-row gap-2 items-center", children: [
|
|
2742
|
+
/* @__PURE__ */ t(
|
|
2813
2743
|
J,
|
|
2814
2744
|
{
|
|
2815
2745
|
"data-testid": "undo-dashboard-config-change",
|
|
@@ -2818,12 +2748,12 @@ function An(e) {
|
|
|
2818
2748
|
placement: "bottom",
|
|
2819
2749
|
title: "Undo"
|
|
2820
2750
|
},
|
|
2821
|
-
disabled:
|
|
2822
|
-
onClick: () =>
|
|
2823
|
-
children: /* @__PURE__ */
|
|
2751
|
+
disabled: r.isUndoDisabled,
|
|
2752
|
+
onClick: () => n("Undo"),
|
|
2753
|
+
children: /* @__PURE__ */ t(Nt, { className: "size-5" })
|
|
2824
2754
|
}
|
|
2825
2755
|
),
|
|
2826
|
-
/* @__PURE__ */
|
|
2756
|
+
/* @__PURE__ */ t(
|
|
2827
2757
|
J,
|
|
2828
2758
|
{
|
|
2829
2759
|
"data-testid": "redo-dashboard-config-change",
|
|
@@ -2832,12 +2762,12 @@ function An(e) {
|
|
|
2832
2762
|
placement: "bottom",
|
|
2833
2763
|
title: "Redo"
|
|
2834
2764
|
},
|
|
2835
|
-
disabled:
|
|
2836
|
-
onClick: () =>
|
|
2837
|
-
children: /* @__PURE__ */
|
|
2765
|
+
disabled: r.isRedoDisabled,
|
|
2766
|
+
onClick: () => n("Redo"),
|
|
2767
|
+
children: /* @__PURE__ */ t(_t, { className: "size-5" })
|
|
2838
2768
|
}
|
|
2839
2769
|
),
|
|
2840
|
-
/* @__PURE__ */
|
|
2770
|
+
/* @__PURE__ */ t(
|
|
2841
2771
|
J,
|
|
2842
2772
|
{
|
|
2843
2773
|
"data-testid": "reset-dashboard-to-default",
|
|
@@ -2846,29 +2776,29 @@ function An(e) {
|
|
|
2846
2776
|
placement: "bottom",
|
|
2847
2777
|
title: "Reset this dashboard to the default configuration"
|
|
2848
2778
|
},
|
|
2849
|
-
onClick:
|
|
2850
|
-
children: /* @__PURE__ */
|
|
2779
|
+
onClick: s,
|
|
2780
|
+
children: /* @__PURE__ */ t(Et, { className: "size-5" })
|
|
2851
2781
|
}
|
|
2852
2782
|
)
|
|
2853
2783
|
] })
|
|
2854
2784
|
] }),
|
|
2855
|
-
/* @__PURE__ */
|
|
2856
|
-
/* @__PURE__ */
|
|
2857
|
-
/* @__PURE__ */
|
|
2858
|
-
!
|
|
2859
|
-
!
|
|
2785
|
+
/* @__PURE__ */ I("div", { className: "flex border-b border-gray-200", children: [
|
|
2786
|
+
/* @__PURE__ */ t("button", { onClick: () => b(0), className: C(0), children: "Widgets" }),
|
|
2787
|
+
/* @__PURE__ */ t("button", { onClick: () => b(1), className: C(1), children: "Charts" }),
|
|
2788
|
+
!h && /* @__PURE__ */ t("button", { onClick: () => b(2), className: C(2), children: "Containers" }),
|
|
2789
|
+
!h && /* @__PURE__ */ t("button", { onClick: () => b(3), className: C(3), children: /* @__PURE__ */ t(Tt, {}) })
|
|
2860
2790
|
] }),
|
|
2861
|
-
/* @__PURE__ */
|
|
2862
|
-
|
|
2791
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-between gap-1 w-full", children: /* @__PURE__ */ t(
|
|
2792
|
+
ct,
|
|
2863
2793
|
{
|
|
2864
2794
|
label: "Filter...",
|
|
2865
2795
|
size: "small",
|
|
2866
2796
|
className: "w-full",
|
|
2867
2797
|
value: c,
|
|
2868
|
-
onChange:
|
|
2798
|
+
onChange: y
|
|
2869
2799
|
}
|
|
2870
2800
|
) }),
|
|
2871
|
-
/* @__PURE__ */
|
|
2801
|
+
/* @__PURE__ */ I(
|
|
2872
2802
|
"div",
|
|
2873
2803
|
{
|
|
2874
2804
|
className: "flex flex-col gap-2 overflow-x-hidden overflow-y-auto",
|
|
@@ -2876,52 +2806,52 @@ function An(e) {
|
|
|
2876
2806
|
maxHeight: "360px"
|
|
2877
2807
|
},
|
|
2878
2808
|
children: [
|
|
2879
|
-
|
|
2880
|
-
(
|
|
2881
|
-
).map((
|
|
2882
|
-
|
|
2809
|
+
S === 0 && T.filter(
|
|
2810
|
+
(d) => d.metaData.categories.includes("Widget") && x(d.metaData)
|
|
2811
|
+
).map((d) => /* @__PURE__ */ t(
|
|
2812
|
+
Ie,
|
|
2883
2813
|
{
|
|
2884
|
-
widgetKey:
|
|
2885
|
-
metaData:
|
|
2886
|
-
alreadyAdded:
|
|
2887
|
-
addWidget: () =>
|
|
2814
|
+
widgetKey: d.widgetKey,
|
|
2815
|
+
metaData: d.metaData,
|
|
2816
|
+
alreadyAdded: Re(d.widgetKey, l),
|
|
2817
|
+
addWidget: () => w(d.widgetKey)
|
|
2888
2818
|
},
|
|
2889
|
-
|
|
2819
|
+
d.widgetKey
|
|
2890
2820
|
)),
|
|
2891
|
-
|
|
2892
|
-
(
|
|
2893
|
-
).map((
|
|
2894
|
-
|
|
2821
|
+
S === 1 && T.filter(
|
|
2822
|
+
(d) => d.metaData.categories.includes("Chart") && x(d.metaData)
|
|
2823
|
+
).map((d) => /* @__PURE__ */ t(
|
|
2824
|
+
Ie,
|
|
2895
2825
|
{
|
|
2896
|
-
widgetKey:
|
|
2897
|
-
metaData:
|
|
2898
|
-
alreadyAdded:
|
|
2899
|
-
addWidget: () =>
|
|
2826
|
+
widgetKey: d.widgetKey,
|
|
2827
|
+
metaData: d.metaData,
|
|
2828
|
+
alreadyAdded: Re(d.widgetKey, l),
|
|
2829
|
+
addWidget: () => w(d.widgetKey)
|
|
2900
2830
|
},
|
|
2901
|
-
|
|
2831
|
+
d.widgetKey
|
|
2902
2832
|
)),
|
|
2903
|
-
!
|
|
2904
|
-
|
|
2833
|
+
!h && S === 2 && T.filter((d) => d.metaData.categories.includes("Container")).map((d) => /* @__PURE__ */ t(
|
|
2834
|
+
Ie,
|
|
2905
2835
|
{
|
|
2906
|
-
widgetKey:
|
|
2907
|
-
metaData:
|
|
2908
|
-
alreadyAdded:
|
|
2909
|
-
addWidget: () =>
|
|
2836
|
+
widgetKey: d.widgetKey,
|
|
2837
|
+
metaData: d.metaData,
|
|
2838
|
+
alreadyAdded: Re(d.widgetKey, l),
|
|
2839
|
+
addWidget: () => o(d.widgetKey)
|
|
2910
2840
|
},
|
|
2911
|
-
|
|
2841
|
+
d.widgetKey
|
|
2912
2842
|
)),
|
|
2913
|
-
!
|
|
2914
|
-
|
|
2843
|
+
!h && S === 3 && (l.cssSettings || []).filter(E).map((d) => /* @__PURE__ */ t(
|
|
2844
|
+
rr,
|
|
2915
2845
|
{
|
|
2916
|
-
item:
|
|
2917
|
-
onSettingItemChanged:
|
|
2846
|
+
item: d,
|
|
2847
|
+
onSettingItemChanged: i
|
|
2918
2848
|
},
|
|
2919
|
-
|
|
2849
|
+
d.key
|
|
2920
2850
|
))
|
|
2921
2851
|
]
|
|
2922
2852
|
}
|
|
2923
2853
|
),
|
|
2924
|
-
/* @__PURE__ */
|
|
2854
|
+
/* @__PURE__ */ t("div", { className: "mt-4 w-full flex flex-row justify-end pt-1", children: /* @__PURE__ */ t(
|
|
2925
2855
|
J,
|
|
2926
2856
|
{
|
|
2927
2857
|
className: "bg-opacity-100",
|
|
@@ -2929,7 +2859,7 @@ function An(e) {
|
|
|
2929
2859
|
placement: "bottom",
|
|
2930
2860
|
title: "Click to exit edit mode"
|
|
2931
2861
|
},
|
|
2932
|
-
onClick:
|
|
2862
|
+
onClick: f,
|
|
2933
2863
|
children: "Done"
|
|
2934
2864
|
}
|
|
2935
2865
|
) })
|
|
@@ -2938,48 +2868,48 @@ function An(e) {
|
|
|
2938
2868
|
);
|
|
2939
2869
|
}
|
|
2940
2870
|
export {
|
|
2941
|
-
|
|
2871
|
+
dr as AddIcon,
|
|
2942
2872
|
J as Button,
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2873
|
+
Rt as CircleQuestionMark,
|
|
2874
|
+
It as CrosshairIcon,
|
|
2875
|
+
Mr as DashboardGrid,
|
|
2876
|
+
Jt as DashboardWidgetBase,
|
|
2877
|
+
ur as DeleteIcon,
|
|
2878
|
+
Xt as DraggablePanel,
|
|
2879
|
+
tr as DynamicWidgetLoader,
|
|
2880
|
+
fr as EditIcon,
|
|
2881
|
+
gr as GridIcon,
|
|
2882
|
+
Pt as HandGrabIcon,
|
|
2883
|
+
Mt as HandIcon,
|
|
2884
|
+
Cr as ListItem,
|
|
2885
|
+
wr as ListItemLeftChild,
|
|
2886
|
+
Sr as ListItemMiddleChild,
|
|
2887
|
+
Dr as ListItemRightChild,
|
|
2888
|
+
mr as MonitorIcon,
|
|
2889
|
+
pr as MonitorSmartphoneIcon,
|
|
2960
2890
|
it as MoveLeftIcon,
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2891
|
+
st as MoveRightIcon,
|
|
2892
|
+
_t as RedoIcon,
|
|
2893
|
+
hr as RenameIcon,
|
|
2894
|
+
Tt as SettingsIcon,
|
|
2895
|
+
Ot as Stack,
|
|
2896
|
+
K as SvgBaseWrapper,
|
|
2897
|
+
yr as TabletSmartphoneIcon,
|
|
2898
|
+
xr as TargetIcon,
|
|
2899
|
+
ct as TextField,
|
|
2900
|
+
Et as TimerResetIcon,
|
|
2901
|
+
Nt as UndoIcon,
|
|
2902
|
+
Pr as WidgetContainerColumn,
|
|
2903
|
+
Ir as WidgetContainerLarge,
|
|
2904
|
+
Rr as WidgetContainerRow,
|
|
2905
|
+
$r as WidgetsCatalogFlyout,
|
|
2906
|
+
Er as WrapperColumnContent,
|
|
2907
|
+
Nr as WrapperColumnContentListItem,
|
|
2908
|
+
lt as XCircleIcon,
|
|
2909
|
+
br as ZoomInIcon,
|
|
2910
|
+
vr as ZoomOutIcon,
|
|
2911
|
+
Qt as _isVersionCompatible,
|
|
2912
|
+
_r as showToast,
|
|
2913
|
+
lr as useDashboardStore,
|
|
2914
|
+
cr as useDashboardUndoService
|
|
2985
2915
|
};
|