@tenorlab/react-dashboard 1.1.6 → 1.1.8
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsxs as W, jsx as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import ae, { useState as le, useCallback as ue, useMemo as st, forwardRef as ce, useRef as Ct, Suspense as St, useEffect as Dt } from "react";
|
|
2
|
+
import { jsxs as W, jsx as a } from "react/jsx-runtime";
|
|
3
|
+
import lt from "react-dom";
|
|
4
|
+
const Nt = [
|
|
5
5
|
{
|
|
6
6
|
key: "grid-gap",
|
|
7
7
|
displayName: "Gap",
|
|
@@ -79,12 +79,12 @@ const Dt = [
|
|
|
79
79
|
defaultValue: "1.0rem",
|
|
80
80
|
value: "1.0rem"
|
|
81
81
|
}
|
|
82
|
-
],
|
|
82
|
+
], Tt = ["rem", "pc", "cm", "in", "em", "vh", "vw", "%"], Et = (e, n) => Tt.includes(e) ? n : 1, _t = {
|
|
83
83
|
incrementOrDecrementValue: (e, n) => {
|
|
84
|
-
const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0,
|
|
84
|
+
const t = e.value.match(/([\d.]+)/), r = t ? parseFloat(t[1]) : 0, o = e.value.match(/([^\d.]+)/), i = o ? o[1] : e.defaultUnit, s = Et(i, e.step) * n, b = `${Math.max(r + s, e.minValue).toFixed(1)}${i}`;
|
|
85
85
|
return {
|
|
86
86
|
...e,
|
|
87
|
-
value:
|
|
87
|
+
value: b
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
90
|
}, Ce = {
|
|
@@ -96,62 +96,62 @@ const Dt = [
|
|
|
96
96
|
responsiveGrid: !1,
|
|
97
97
|
widgets: [],
|
|
98
98
|
childWidgetsConfig: [],
|
|
99
|
-
cssSettings: [...
|
|
100
|
-
}, Ae = 0.7, Le = 1,
|
|
99
|
+
cssSettings: [...Nt]
|
|
100
|
+
}, Ae = 0.7, Le = 1, Mt = 0.05, ct = (e) => {
|
|
101
101
|
let n = Number(e || 0);
|
|
102
102
|
return n < Ae && (n = Ae), n > Le && (n = Le), n;
|
|
103
|
-
},
|
|
104
|
-
let t = Number(Number((
|
|
105
|
-
return
|
|
106
|
-
},
|
|
103
|
+
}, Pn = (e, n) => {
|
|
104
|
+
let t = Number(Number((Mt * n).toFixed(2)).toFixed(2)), r = Number((Number(e) + t).toFixed(2));
|
|
105
|
+
return ct(r);
|
|
106
|
+
}, $n = (e) => {
|
|
107
107
|
let n = {
|
|
108
108
|
...e
|
|
109
109
|
};
|
|
110
110
|
return n.widgets = n.widgets.filter((t) => {
|
|
111
111
|
if (`${t}`.includes("WidgetContainer")) {
|
|
112
112
|
const r = n.childWidgetsConfig.filter(
|
|
113
|
-
(
|
|
113
|
+
(o) => o.parentWidgetKey === t
|
|
114
114
|
);
|
|
115
115
|
if (!r || r.length === 0)
|
|
116
116
|
return n.widgets = n.widgets.filter(
|
|
117
|
-
(
|
|
117
|
+
(o) => o !== t
|
|
118
118
|
), !1;
|
|
119
119
|
}
|
|
120
120
|
return !0;
|
|
121
121
|
}), n;
|
|
122
|
-
},
|
|
122
|
+
}, Pt = (e) => {
|
|
123
123
|
const n = e.widgets.filter(
|
|
124
124
|
(r) => r.includes("WidgetContainer")
|
|
125
125
|
), t = {};
|
|
126
|
-
return n.forEach((r,
|
|
127
|
-
const d = `${r.split("_container")[0]}_container${
|
|
126
|
+
return n.forEach((r, o) => {
|
|
127
|
+
const d = `${r.split("_container")[0]}_container${o + 1}`;
|
|
128
128
|
t[r] = d;
|
|
129
129
|
}), e.widgets = e.widgets.map((r) => t[r] || r), e.childWidgetsConfig = e.childWidgetsConfig.map((r) => {
|
|
130
|
-
const
|
|
130
|
+
const o = r.parentWidgetKey, i = t[o];
|
|
131
131
|
return {
|
|
132
132
|
...r,
|
|
133
133
|
// If a new key exists, use it. If not, keep the original key.
|
|
134
|
-
parentWidgetKey:
|
|
134
|
+
parentWidgetKey: i || o
|
|
135
135
|
};
|
|
136
136
|
}), e;
|
|
137
137
|
}, ge = (e, n) => {
|
|
138
|
-
const t = `${e}`.includes("Container"), r = t ? ["Container"] : ["Widget"],
|
|
138
|
+
const t = `${e}`.includes("Container"), r = t ? ["Container"] : ["Widget"], o = n?.title || e, i = n?.description || (t ? "Container" : "Unknown");
|
|
139
139
|
return {
|
|
140
|
-
title:
|
|
140
|
+
title: o,
|
|
141
141
|
displayName: e,
|
|
142
|
-
description:
|
|
142
|
+
description: i,
|
|
143
143
|
categories: r,
|
|
144
144
|
noDuplicatedWidgets: !0,
|
|
145
145
|
icon: void 0,
|
|
146
146
|
externalDependencies: []
|
|
147
147
|
};
|
|
148
|
-
},
|
|
148
|
+
}, Wn = (e, n, t) => {
|
|
149
149
|
const r = n[e];
|
|
150
150
|
return r || ge(e, t);
|
|
151
|
-
},
|
|
151
|
+
}, $t = (e, n) => {
|
|
152
152
|
const r = n.get(e)?.meta;
|
|
153
153
|
return r || ge(e);
|
|
154
|
-
},
|
|
154
|
+
}, Wt = (e, n, t) => {
|
|
155
155
|
const r = t || ge(e);
|
|
156
156
|
return [
|
|
157
157
|
e,
|
|
@@ -163,7 +163,7 @@ const Dt = [
|
|
|
163
163
|
component: n
|
|
164
164
|
}
|
|
165
165
|
];
|
|
166
|
-
},
|
|
166
|
+
}, dt = (e, n, t) => {
|
|
167
167
|
const r = t || ge(e);
|
|
168
168
|
return [
|
|
169
169
|
e,
|
|
@@ -175,26 +175,26 @@ const Dt = [
|
|
|
175
175
|
loader: n
|
|
176
176
|
}
|
|
177
177
|
];
|
|
178
|
-
},
|
|
178
|
+
}, It = (e) => {
|
|
179
179
|
const n = e.match(/\/widget-([a-zA-Z0-9-]+)\/index\.ts$/);
|
|
180
180
|
if (n && n[1]) {
|
|
181
|
-
const t = n[1], r = `Widget${t.split("-").map((
|
|
182
|
-
return { key: r, title:
|
|
181
|
+
const t = n[1], r = `Widget${t.split("-").map((i) => i.charAt(0).toUpperCase() + i.slice(1)).join("")}`, o = t.split("-").map((i) => i.charAt(0).toUpperCase() + i.slice(1)).join(" ");
|
|
182
|
+
return { key: r, title: o, folder: t };
|
|
183
183
|
}
|
|
184
184
|
return null;
|
|
185
|
-
},
|
|
186
|
-
const
|
|
187
|
-
if (
|
|
188
|
-
return
|
|
189
|
-
},
|
|
185
|
+
}, Ot = (e, n, t, r) => {
|
|
186
|
+
const o = `${n}/widget-${t}/widget-${t}.meta.ts`, i = e[o], s = `${r}Meta`;
|
|
187
|
+
if (i && i[s])
|
|
188
|
+
return i[s];
|
|
189
|
+
}, In = async (e) => new Promise(async (n, t) => {
|
|
190
190
|
const r = [];
|
|
191
191
|
try {
|
|
192
|
-
const
|
|
193
|
-
for (const
|
|
194
|
-
const d =
|
|
192
|
+
const i = await (await fetch(`${e}?${Math.random()}`)).json();
|
|
193
|
+
for (const s in i) {
|
|
194
|
+
const d = i[s], b = () => import(
|
|
195
195
|
/* @vite-ignore */
|
|
196
196
|
d.url
|
|
197
|
-
),
|
|
197
|
+
), g = {
|
|
198
198
|
displayName: d.meta.displayName,
|
|
199
199
|
description: d.meta.description || "Remote Plugin",
|
|
200
200
|
categories: d.meta.categories || ["Widget"],
|
|
@@ -203,80 +203,80 @@ const Dt = [
|
|
|
203
203
|
// Or a logic to map a string name to a Lucide component
|
|
204
204
|
externalDependencies: d.meta.externalDependencies || []
|
|
205
205
|
};
|
|
206
|
-
r.push(
|
|
206
|
+
r.push(dt(s, b, g));
|
|
207
207
|
}
|
|
208
208
|
n({
|
|
209
209
|
entries: r,
|
|
210
210
|
message: "",
|
|
211
211
|
details: ""
|
|
212
212
|
});
|
|
213
|
-
} catch (
|
|
214
|
-
console.error("Remote plugin discovery failed:",
|
|
213
|
+
} catch (o) {
|
|
214
|
+
console.error("Remote plugin discovery failed:", o), t({
|
|
215
215
|
entries: [],
|
|
216
216
|
message: "Remote plugin discovery failed:",
|
|
217
|
-
details: typeof
|
|
217
|
+
details: typeof o == "object" ? JSON.stringify(o) : o
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
}),
|
|
221
|
-
const
|
|
222
|
-
for (const
|
|
223
|
-
const
|
|
224
|
-
if (d &&
|
|
225
|
-
const { key:
|
|
226
|
-
let u =
|
|
227
|
-
if (u || (u = ge(
|
|
228
|
-
title:
|
|
220
|
+
}), On = (e, n, t, r = !0) => {
|
|
221
|
+
const o = [];
|
|
222
|
+
for (const i in n) {
|
|
223
|
+
const s = n[i], d = It(i);
|
|
224
|
+
if (d && s) {
|
|
225
|
+
const { key: b, title: g, folder: h } = d;
|
|
226
|
+
let u = Ot(t, e, h, b);
|
|
227
|
+
if (u || (u = ge(b, {
|
|
228
|
+
title: g,
|
|
229
229
|
description: `Local ${r ? "dynamic" : "static"} widget`
|
|
230
230
|
})), r) {
|
|
231
|
-
const
|
|
232
|
-
|
|
231
|
+
const m = s;
|
|
232
|
+
o.push(dt(b, m, u));
|
|
233
233
|
} else {
|
|
234
|
-
const
|
|
235
|
-
|
|
234
|
+
const m = s.default || s;
|
|
235
|
+
o.push(Wt(b, m, u));
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
|
-
return
|
|
239
|
+
return o;
|
|
240
240
|
}, Fe = (e) => {
|
|
241
241
|
let n;
|
|
242
|
-
const t = /* @__PURE__ */ new Set(), r = (
|
|
243
|
-
const u = typeof
|
|
242
|
+
const t = /* @__PURE__ */ new Set(), r = (g, h) => {
|
|
243
|
+
const u = typeof g == "function" ? g(n) : g;
|
|
244
244
|
if (!Object.is(u, n)) {
|
|
245
|
-
const
|
|
246
|
-
n = h ?? (typeof u != "object" || u === null) ? u : Object.assign({}, n, u), t.forEach((
|
|
245
|
+
const m = n;
|
|
246
|
+
n = h ?? (typeof u != "object" || u === null) ? u : Object.assign({}, n, u), t.forEach((y) => y(n, m));
|
|
247
247
|
}
|
|
248
|
-
},
|
|
248
|
+
}, o = () => n, d = { setState: r, getState: o, getInitialState: () => b, subscribe: (g) => (t.add(g), () => t.delete(g)) }, b = n = e(r, o, d);
|
|
249
249
|
return d;
|
|
250
|
-
},
|
|
251
|
-
function
|
|
252
|
-
const t =
|
|
250
|
+
}, Rt = ((e) => e ? Fe(e) : Fe), kt = (e) => e;
|
|
251
|
+
function jt(e, n = kt) {
|
|
252
|
+
const t = ae.useSyncExternalStore(
|
|
253
253
|
e.subscribe,
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
ae.useCallback(() => n(e.getState()), [e, n]),
|
|
255
|
+
ae.useCallback(() => n(e.getInitialState()), [e, n])
|
|
256
256
|
);
|
|
257
|
-
return
|
|
257
|
+
return ae.useDebugValue(t), t;
|
|
258
258
|
}
|
|
259
|
-
const
|
|
260
|
-
const n =
|
|
259
|
+
const At = (e) => {
|
|
260
|
+
const n = Rt(e), t = (r) => jt(n, r);
|
|
261
261
|
return Object.assign(t, n), t;
|
|
262
|
-
},
|
|
262
|
+
}, Lt = ((e) => At), Ft = (e) => {
|
|
263
263
|
const n = e.widgets.filter((r) => r.includes("WidgetContainer")).map((r) => Number(r.split("_")[1].replace("container", "")));
|
|
264
264
|
return `container${n.length > 0 ? Math.max(...n) + 1 : 1}`;
|
|
265
|
-
},
|
|
266
|
-
const t =
|
|
265
|
+
}, Vt = (e, n) => {
|
|
266
|
+
const t = Ft(e);
|
|
267
267
|
return `${n}_${t}`;
|
|
268
268
|
}, Ut = (e) => {
|
|
269
|
-
const { dashboardConfig: n, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets:
|
|
269
|
+
const { dashboardConfig: n, widgetKey: t, parentWidgetKey: r, noDuplicatedWidgets: o } = e;
|
|
270
270
|
if (r) {
|
|
271
|
-
if (
|
|
272
|
-
(
|
|
271
|
+
if (o && n.childWidgetsConfig.find(
|
|
272
|
+
(s) => s.parentWidgetKey === r && s.widgetKey === t
|
|
273
273
|
))
|
|
274
274
|
return {
|
|
275
275
|
success: !1,
|
|
276
276
|
message: `DashboardStore: addWidget: Widget already added (${t})`,
|
|
277
277
|
updatedDashboardConfig: n
|
|
278
278
|
};
|
|
279
|
-
const
|
|
279
|
+
const i = [
|
|
280
280
|
...n.childWidgetsConfig,
|
|
281
281
|
{ parentWidgetKey: r, widgetKey: t }
|
|
282
282
|
// new entry
|
|
@@ -285,88 +285,88 @@ const jt = (e) => {
|
|
|
285
285
|
success: !0,
|
|
286
286
|
updatedDashboardConfig: {
|
|
287
287
|
...n,
|
|
288
|
-
childWidgetsConfig:
|
|
288
|
+
childWidgetsConfig: i
|
|
289
289
|
}
|
|
290
290
|
};
|
|
291
291
|
} else {
|
|
292
|
-
if (
|
|
292
|
+
if (o && n.widgets.includes(t))
|
|
293
293
|
return {
|
|
294
294
|
success: !1,
|
|
295
295
|
message: `DashboardStore: addWidget: Widget already added (${t})`,
|
|
296
296
|
updatedDashboardConfig: n
|
|
297
297
|
};
|
|
298
|
-
const
|
|
298
|
+
const i = [...n.widgets, t];
|
|
299
299
|
return {
|
|
300
300
|
success: !0,
|
|
301
301
|
updatedDashboardConfig: {
|
|
302
302
|
...n,
|
|
303
|
-
widgets:
|
|
303
|
+
widgets: i
|
|
304
304
|
}
|
|
305
305
|
};
|
|
306
306
|
}
|
|
307
|
-
},
|
|
307
|
+
}, qt = (e, n, t) => {
|
|
308
308
|
if ((t || "").trim().length > 0) {
|
|
309
309
|
const r = e.childWidgetsConfig.filter(
|
|
310
|
-
(
|
|
311
|
-
),
|
|
312
|
-
(
|
|
313
|
-
),
|
|
314
|
-
let
|
|
310
|
+
(b) => b.parentWidgetKey !== t
|
|
311
|
+
), o = e.childWidgetsConfig.filter(
|
|
312
|
+
(b) => b.parentWidgetKey === t && b.widgetKey !== n
|
|
313
|
+
), i = [...r, ...o];
|
|
314
|
+
let s = {
|
|
315
315
|
...e,
|
|
316
|
-
childWidgetsConfig:
|
|
316
|
+
childWidgetsConfig: i
|
|
317
317
|
};
|
|
318
|
-
return `${n}`.includes("Container") && (
|
|
318
|
+
return `${n}`.includes("Container") && (s = Pt(s)), {
|
|
319
319
|
success: !0,
|
|
320
|
-
updatedDashboardConfig:
|
|
320
|
+
updatedDashboardConfig: s
|
|
321
321
|
};
|
|
322
322
|
} else {
|
|
323
|
-
const r = e.widgets.filter((
|
|
324
|
-
(
|
|
323
|
+
const r = e.widgets.filter((i) => i !== n), o = e.childWidgetsConfig.filter(
|
|
324
|
+
(i) => i.parentWidgetKey !== n
|
|
325
325
|
);
|
|
326
326
|
return {
|
|
327
327
|
success: !0,
|
|
328
328
|
updatedDashboardConfig: {
|
|
329
329
|
...e,
|
|
330
330
|
widgets: r,
|
|
331
|
-
childWidgetsConfig:
|
|
331
|
+
childWidgetsConfig: o
|
|
332
332
|
}
|
|
333
333
|
};
|
|
334
334
|
}
|
|
335
335
|
}, Yt = (e, n, t, r) => {
|
|
336
336
|
if ((r || "").trim().length > 0) {
|
|
337
|
-
const
|
|
337
|
+
const o = e.childWidgetsConfig.filter(
|
|
338
338
|
(h) => h.parentWidgetKey !== r
|
|
339
339
|
);
|
|
340
|
-
let
|
|
340
|
+
let i = e.childWidgetsConfig.filter(
|
|
341
341
|
(h) => h.parentWidgetKey === r
|
|
342
342
|
);
|
|
343
|
-
const
|
|
344
|
-
let d =
|
|
345
|
-
if (d = Math.max(0, d), d = Math.min(
|
|
343
|
+
const s = i.indexOf(t);
|
|
344
|
+
let d = s + n;
|
|
345
|
+
if (d = Math.max(0, d), d = Math.min(i.length - 1, d), d === s)
|
|
346
346
|
return {
|
|
347
347
|
success: !1,
|
|
348
348
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
349
349
|
updatedDashboardConfig: e
|
|
350
350
|
};
|
|
351
|
-
const
|
|
352
|
-
return
|
|
351
|
+
const b = [...i], [g] = b.splice(s, 1);
|
|
352
|
+
return b.splice(d, 0, g), {
|
|
353
353
|
success: !0,
|
|
354
354
|
updatedDashboardConfig: {
|
|
355
355
|
...e,
|
|
356
|
-
childWidgetsConfig: [...
|
|
356
|
+
childWidgetsConfig: [...o, ...b]
|
|
357
357
|
}
|
|
358
358
|
};
|
|
359
359
|
} else {
|
|
360
|
-
const
|
|
361
|
-
let
|
|
362
|
-
if (
|
|
360
|
+
const o = e.widgets || [], i = o.indexOf(t);
|
|
361
|
+
let s = i + n;
|
|
362
|
+
if (s = Math.max(0, s), s = Math.min(o.length - 1, s), s === i)
|
|
363
363
|
return {
|
|
364
364
|
success: !1,
|
|
365
365
|
message: `DashboardStore: moveWidget: Widget already at min/max position (${t})`,
|
|
366
366
|
updatedDashboardConfig: e
|
|
367
367
|
};
|
|
368
|
-
const d = [...
|
|
369
|
-
return d.splice(
|
|
368
|
+
const d = [...o], [b] = d.splice(i, 1);
|
|
369
|
+
return d.splice(s, 0, b), {
|
|
370
370
|
success: !0,
|
|
371
371
|
updatedDashboardConfig: {
|
|
372
372
|
...e,
|
|
@@ -374,13 +374,13 @@ const jt = (e) => {
|
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
|
-
},
|
|
377
|
+
}, zt = (e, n) => ({
|
|
378
378
|
isLoading: !1,
|
|
379
379
|
isEditing: !1,
|
|
380
380
|
allDashboardConfigs: [Ce],
|
|
381
381
|
currentDashboardConfig: Ce,
|
|
382
382
|
targetContainerKey: void 0,
|
|
383
|
-
getNextContainerKey: (t) =>
|
|
383
|
+
getNextContainerKey: (t) => Vt(n().currentDashboardConfig, t),
|
|
384
384
|
setIsLoading: (t) => (e(() => ({ isLoading: t })), t),
|
|
385
385
|
setIsEditing: (t) => {
|
|
386
386
|
let r = n().targetContainerKey;
|
|
@@ -389,206 +389,206 @@ const jt = (e) => {
|
|
|
389
389
|
setTargetContainerKey: (t) => (e(() => ({ targetContainerKey: t })), t),
|
|
390
390
|
setAllDashboardConfigs: (t) => (e(() => ({ allDashboardConfigs: t })), n().allDashboardConfigs),
|
|
391
391
|
setCurrentDashboardConfig: (t) => {
|
|
392
|
-
const r = n(),
|
|
393
|
-
...r.allDashboardConfigs.filter((
|
|
392
|
+
const r = n(), o = [
|
|
393
|
+
...r.allDashboardConfigs.filter((i) => i.dashboardId !== t.dashboardId),
|
|
394
394
|
t
|
|
395
395
|
];
|
|
396
396
|
return e(() => ({
|
|
397
397
|
...r,
|
|
398
|
-
allDashboardConfigs:
|
|
398
|
+
allDashboardConfigs: o,
|
|
399
399
|
currentDashboardConfig: t
|
|
400
|
-
})),
|
|
400
|
+
})), o;
|
|
401
401
|
},
|
|
402
402
|
addDashboardConfig: (t) => {
|
|
403
|
-
const r = n(),
|
|
404
|
-
...r.allDashboardConfigs.filter((
|
|
403
|
+
const r = n(), o = [
|
|
404
|
+
...r.allDashboardConfigs.filter((i) => i.dashboardId !== t.dashboardId),
|
|
405
405
|
t
|
|
406
406
|
];
|
|
407
407
|
return e(() => ({
|
|
408
408
|
...r,
|
|
409
|
-
allDashboardConfigs:
|
|
409
|
+
allDashboardConfigs: o,
|
|
410
410
|
currentDashboardConfig: t
|
|
411
|
-
})),
|
|
411
|
+
})), o;
|
|
412
412
|
},
|
|
413
413
|
deleteDashboardConfigById: (t) => {
|
|
414
|
-
const r = n(),
|
|
414
|
+
const r = n(), o = [...r.allDashboardConfigs.filter((i) => i.dashboardId !== t)];
|
|
415
415
|
return e(() => ({
|
|
416
416
|
...r,
|
|
417
|
-
allDashboardConfigs:
|
|
418
|
-
currentDashboardConfig:
|
|
419
|
-
})),
|
|
417
|
+
allDashboardConfigs: o,
|
|
418
|
+
currentDashboardConfig: o[0] || Ce
|
|
419
|
+
})), o;
|
|
420
420
|
},
|
|
421
421
|
selectDashboardById: (t) => (e(() => {
|
|
422
|
-
const r = n(),
|
|
423
|
-
return
|
|
424
|
-
currentDashboardConfig:
|
|
422
|
+
const r = n(), o = r.allDashboardConfigs.find((i) => i.dashboardId === t);
|
|
423
|
+
return o ? {
|
|
424
|
+
currentDashboardConfig: o
|
|
425
425
|
} : {
|
|
426
426
|
...r
|
|
427
427
|
};
|
|
428
428
|
}), n().currentDashboardConfig),
|
|
429
429
|
addWidget: (t) => {
|
|
430
|
-
const r = n(),
|
|
430
|
+
const r = n(), o = Ut({
|
|
431
431
|
dashboardConfig: r.currentDashboardConfig,
|
|
432
432
|
...t
|
|
433
|
-
}),
|
|
433
|
+
}), i = [
|
|
434
434
|
...r.allDashboardConfigs.filter(
|
|
435
|
-
(
|
|
435
|
+
(s) => s.dashboardId !== o.updatedDashboardConfig.dashboardId
|
|
436
436
|
),
|
|
437
|
-
|
|
437
|
+
o.updatedDashboardConfig
|
|
438
438
|
];
|
|
439
|
-
return
|
|
440
|
-
allDashboardConfigs:
|
|
441
|
-
currentDashboardConfig:
|
|
439
|
+
return o.success && e(() => ({
|
|
440
|
+
allDashboardConfigs: i,
|
|
441
|
+
currentDashboardConfig: o.updatedDashboardConfig
|
|
442
442
|
})), {
|
|
443
|
-
...
|
|
444
|
-
allUpdatedDashboardConfigs:
|
|
443
|
+
...o,
|
|
444
|
+
allUpdatedDashboardConfigs: i
|
|
445
445
|
};
|
|
446
446
|
},
|
|
447
447
|
removeWidget: (t, r) => {
|
|
448
|
-
const
|
|
449
|
-
...
|
|
450
|
-
(d) => d.dashboardId !==
|
|
448
|
+
const o = n(), i = qt(o.currentDashboardConfig, t, r), s = [
|
|
449
|
+
...o.allDashboardConfigs.filter(
|
|
450
|
+
(d) => d.dashboardId !== i.updatedDashboardConfig.dashboardId
|
|
451
451
|
),
|
|
452
|
-
|
|
452
|
+
i.updatedDashboardConfig
|
|
453
453
|
];
|
|
454
|
-
return
|
|
455
|
-
allDashboardConfigs:
|
|
456
|
-
currentDashboardConfig:
|
|
454
|
+
return i.success && e(() => ({
|
|
455
|
+
allDashboardConfigs: s,
|
|
456
|
+
currentDashboardConfig: i.updatedDashboardConfig
|
|
457
457
|
})), {
|
|
458
|
-
...
|
|
459
|
-
allUpdatedDashboardConfigs:
|
|
458
|
+
...i,
|
|
459
|
+
allUpdatedDashboardConfigs: s
|
|
460
460
|
};
|
|
461
461
|
},
|
|
462
|
-
moveWidget: (t, r,
|
|
463
|
-
const
|
|
464
|
-
...
|
|
465
|
-
(
|
|
462
|
+
moveWidget: (t, r, o) => {
|
|
463
|
+
const i = n(), s = Yt(i.currentDashboardConfig, t, r, o), d = [
|
|
464
|
+
...i.allDashboardConfigs.filter(
|
|
465
|
+
(b) => b.dashboardId !== s.updatedDashboardConfig.dashboardId
|
|
466
466
|
),
|
|
467
|
-
|
|
467
|
+
s.updatedDashboardConfig
|
|
468
468
|
];
|
|
469
|
-
return
|
|
469
|
+
return s.success && e(() => ({
|
|
470
470
|
allDashboardConfigs: d,
|
|
471
|
-
currentDashboardConfig:
|
|
471
|
+
currentDashboardConfig: s.updatedDashboardConfig
|
|
472
472
|
})), {
|
|
473
|
-
...
|
|
473
|
+
...s,
|
|
474
474
|
allUpdatedDashboardConfigs: d
|
|
475
475
|
};
|
|
476
476
|
}
|
|
477
|
-
}),
|
|
478
|
-
...
|
|
479
|
-
})),
|
|
480
|
-
const
|
|
481
|
-
if (
|
|
477
|
+
}), Rn = Lt()((...e) => ({
|
|
478
|
+
...zt(...e)
|
|
479
|
+
})), ut = (e, n) => `dashboards_${n}_${e}`, Bt = async (e, n, t, r) => {
|
|
480
|
+
const o = localStorage.getItem(ut(e, n));
|
|
481
|
+
if (o)
|
|
482
482
|
try {
|
|
483
|
-
const
|
|
484
|
-
return
|
|
485
|
-
|
|
486
|
-
const d = (
|
|
487
|
-
(
|
|
483
|
+
const i = JSON.parse(o);
|
|
484
|
+
return i.length < 1 ? [r] : (i.forEach((s) => {
|
|
485
|
+
s.dashboardId || (s.dashboardId = "default"), s.dashboardName || (s.dashboardName = `Dashboard ${s.dashboardId}`), s.responsiveGrid = s.responsiveGrid ?? !1, (s.widgets || []).length < 1 && (s.widgets = r.widgets);
|
|
486
|
+
const d = (s.cssSettings || []).filter(
|
|
487
|
+
(b) => r.cssSettings.some((g) => g.key === b.key)
|
|
488
488
|
);
|
|
489
489
|
if (d.length < 1)
|
|
490
|
-
|
|
490
|
+
s.cssSettings = [...r.cssSettings];
|
|
491
491
|
else {
|
|
492
|
-
d.forEach((
|
|
493
|
-
|
|
492
|
+
d.forEach((g) => {
|
|
493
|
+
g.value = (g.value || "").replace(/NaN/g, "");
|
|
494
494
|
const h = r.cssSettings.find(
|
|
495
|
-
(u) => u.key ===
|
|
495
|
+
(u) => u.key === g.key
|
|
496
496
|
);
|
|
497
497
|
h && (Object.keys(h).forEach((u) => {
|
|
498
|
-
u in
|
|
499
|
-
}),
|
|
498
|
+
u in g || (g[u] = h[u]);
|
|
499
|
+
}), g.step = h.step, g.minValue = h.minValue, g.defaultValue = h.defaultValue, g.defaultUnit = h.defaultUnit, /\d+/g.test(g.value) === !1 && (g.value = h ? h.value : "1.0rem"));
|
|
500
500
|
});
|
|
501
|
-
const
|
|
502
|
-
(h) => h.key ===
|
|
501
|
+
const b = r.cssSettings.filter((g) => !d.some(
|
|
502
|
+
(h) => h.key === g.key
|
|
503
503
|
));
|
|
504
|
-
|
|
504
|
+
s.cssSettings = [...d, ...b];
|
|
505
505
|
}
|
|
506
|
-
|
|
507
|
-
(
|
|
508
|
-
),
|
|
509
|
-
(
|
|
510
|
-
),
|
|
511
|
-
}),
|
|
512
|
-
} catch (
|
|
513
|
-
console.warn("Error parsing saved dashboard config:",
|
|
506
|
+
s.widgets = s.widgets.filter(
|
|
507
|
+
(b) => b.includes("WidgetContainer") || t.has(b)
|
|
508
|
+
), s.childWidgetsConfig = s.childWidgetsConfig.filter(
|
|
509
|
+
(b) => t.has(b.widgetKey)
|
|
510
|
+
), s.zoomScale ? s.zoomScale < 0.7 && (s.zoomScale = 0.7) : s.zoomScale = 1;
|
|
511
|
+
}), i);
|
|
512
|
+
} catch (i) {
|
|
513
|
+
console.warn("Error parsing saved dashboard config:", i);
|
|
514
514
|
}
|
|
515
515
|
return [r];
|
|
516
|
-
},
|
|
517
|
-
t.forEach((
|
|
518
|
-
if (
|
|
516
|
+
}, Ht = async (e, n, t, r) => {
|
|
517
|
+
t.forEach((i) => {
|
|
518
|
+
if (i.userID = e, i.clientAppKey = n, i.responsiveGrid = i.responsiveGrid ?? !1, typeof i != "object")
|
|
519
519
|
throw new Error("Invalid dashboard configuration");
|
|
520
|
-
|
|
521
|
-
(
|
|
522
|
-
),
|
|
523
|
-
(
|
|
524
|
-
),
|
|
520
|
+
i.widgets = i.widgets.filter(
|
|
521
|
+
(s) => s.includes("WidgetContainer") || r.has(s)
|
|
522
|
+
), i.childWidgetsConfig = i.childWidgetsConfig.filter(
|
|
523
|
+
(s) => r.has(s.widgetKey)
|
|
524
|
+
), i.zoomScale ? i.zoomScale < 0.7 && (i.zoomScale = 0.7) : i.zoomScale = 1;
|
|
525
525
|
});
|
|
526
|
-
const
|
|
527
|
-
return localStorage.setItem(
|
|
526
|
+
const o = JSON.stringify(t);
|
|
527
|
+
return localStorage.setItem(ut(e, n), o), !0;
|
|
528
528
|
}, Kt = {
|
|
529
|
-
getSavedDashboards:
|
|
530
|
-
saveDashboards:
|
|
531
|
-
},
|
|
532
|
-
const [e, n] = le({}), [t, r] = le({}),
|
|
529
|
+
getSavedDashboards: Bt,
|
|
530
|
+
saveDashboards: Ht
|
|
531
|
+
}, kn = () => Kt, jn = () => {
|
|
532
|
+
const [e, n] = le({}), [t, r] = le({}), o = ue((h) => {
|
|
533
533
|
const u = h.dashboardId;
|
|
534
|
-
n((
|
|
535
|
-
const
|
|
534
|
+
n((m) => {
|
|
535
|
+
const y = {
|
|
536
536
|
undoIndex: 0,
|
|
537
537
|
config: h
|
|
538
538
|
};
|
|
539
|
-
return r((
|
|
540
|
-
...
|
|
539
|
+
return r((D) => ({
|
|
540
|
+
...D,
|
|
541
541
|
[u]: 0
|
|
542
542
|
})), {
|
|
543
|
-
...
|
|
544
|
-
[u]: [
|
|
543
|
+
...m,
|
|
544
|
+
[u]: [y]
|
|
545
545
|
// Forces a reset to just this one entry
|
|
546
546
|
};
|
|
547
547
|
});
|
|
548
|
-
}, []),
|
|
548
|
+
}, []), i = ue(
|
|
549
549
|
(h) => {
|
|
550
550
|
n((u) => {
|
|
551
|
-
const
|
|
552
|
-
undoIndex:
|
|
551
|
+
const m = h.dashboardId, y = u[m] || [], D = t[m] ?? -1, p = y.slice(0, D + 1), v = {
|
|
552
|
+
undoIndex: p.length,
|
|
553
553
|
// New index based on trimmed length
|
|
554
554
|
config: h
|
|
555
|
-
},
|
|
555
|
+
}, w = [...p, v];
|
|
556
556
|
return r((N) => ({
|
|
557
557
|
...N,
|
|
558
|
-
[
|
|
558
|
+
[m]: w.length - 1
|
|
559
559
|
// Index is now the last element's index
|
|
560
560
|
})), {
|
|
561
561
|
...u,
|
|
562
|
-
[
|
|
562
|
+
[m]: w
|
|
563
563
|
};
|
|
564
564
|
});
|
|
565
565
|
},
|
|
566
566
|
[t]
|
|
567
|
-
),
|
|
567
|
+
), s = ue((h) => {
|
|
568
568
|
n((u) => {
|
|
569
569
|
if (!u[h])
|
|
570
570
|
return u;
|
|
571
|
-
const { [h]:
|
|
572
|
-
return
|
|
571
|
+
const { [h]: m, ...y } = u;
|
|
572
|
+
return y;
|
|
573
573
|
}), r((u) => {
|
|
574
|
-
const { [h]:
|
|
575
|
-
return
|
|
574
|
+
const { [h]: m, ...y } = u;
|
|
575
|
+
return y;
|
|
576
576
|
});
|
|
577
577
|
}, []), d = ue(
|
|
578
578
|
(h) => {
|
|
579
579
|
r((u) => {
|
|
580
|
-
const
|
|
581
|
-
return
|
|
580
|
+
const m = u[h] ?? -1, y = Math.max(0, m - 1);
|
|
581
|
+
return y !== m ? { ...u, [h]: y } : u;
|
|
582
582
|
});
|
|
583
583
|
},
|
|
584
584
|
[
|
|
585
585
|
//loadConfigFromHistory
|
|
586
586
|
]
|
|
587
|
-
),
|
|
587
|
+
), b = ue(
|
|
588
588
|
(h) => {
|
|
589
589
|
r((u) => {
|
|
590
|
-
const
|
|
591
|
-
return
|
|
590
|
+
const m = e[h]?.length || 0, y = u[h] ?? -1, D = Math.min(m - 1, y + 1);
|
|
591
|
+
return D !== y ? { ...u, [h]: D } : u;
|
|
592
592
|
});
|
|
593
593
|
},
|
|
594
594
|
[
|
|
@@ -597,26 +597,26 @@ const jt = (e) => {
|
|
|
597
597
|
]
|
|
598
598
|
);
|
|
599
599
|
return {
|
|
600
|
-
initializeHistoryForDashboard:
|
|
600
|
+
initializeHistoryForDashboard: o,
|
|
601
601
|
resetAllHistory: () => n({}),
|
|
602
|
-
addUndoEntry:
|
|
603
|
-
removeUndoHistoryForDashboard:
|
|
602
|
+
addUndoEntry: i,
|
|
603
|
+
removeUndoHistoryForDashboard: s,
|
|
604
604
|
undo: d,
|
|
605
|
-
redo:
|
|
605
|
+
redo: b,
|
|
606
606
|
getUndoStatus: (h) => {
|
|
607
|
-
const u = t[h] ?? -1,
|
|
608
|
-
return { isUndoDisabled:
|
|
607
|
+
const u = t[h] ?? -1, m = e[h]?.length || 0, y = u <= 0, D = u >= m - 1;
|
|
608
|
+
return { isUndoDisabled: y, isRedoDisabled: D };
|
|
609
609
|
},
|
|
610
610
|
undoHistory: e,
|
|
611
611
|
historyIndex: t
|
|
612
612
|
// (Optional: You might expose undoHistory and historyIndex if needed for debugging)
|
|
613
613
|
};
|
|
614
614
|
};
|
|
615
|
-
function
|
|
615
|
+
function H({
|
|
616
616
|
children: e,
|
|
617
617
|
className: n
|
|
618
618
|
}) {
|
|
619
|
-
return /* @__PURE__ */
|
|
619
|
+
return /* @__PURE__ */ a(
|
|
620
620
|
"svg",
|
|
621
621
|
{
|
|
622
622
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -633,186 +633,186 @@ function K({
|
|
|
633
633
|
}
|
|
634
634
|
);
|
|
635
635
|
}
|
|
636
|
-
function jn({ className: e }) {
|
|
637
|
-
return /* @__PURE__ */ W(K, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
|
|
638
|
-
/* @__PURE__ */ s("circle", { cx: "12", cy: "12", r: "10" }),
|
|
639
|
-
/* @__PURE__ */ s("path", { d: "M8 12h8" }),
|
|
640
|
-
/* @__PURE__ */ s("path", { d: "M12 8v8" })
|
|
641
|
-
] });
|
|
642
|
-
}
|
|
643
636
|
function An({ className: e }) {
|
|
644
|
-
return /* @__PURE__ */ W(
|
|
645
|
-
/* @__PURE__ */
|
|
646
|
-
/* @__PURE__ */
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
/* @__PURE__ */ s("path", { d: "M3 6h18" }),
|
|
649
|
-
/* @__PURE__ */ s("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
637
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-circle-plus-icon lucide-circle-plus ${e}`, children: [
|
|
638
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
639
|
+
/* @__PURE__ */ a("path", { d: "M8 12h8" }),
|
|
640
|
+
/* @__PURE__ */ a("path", { d: "M12 8v8" })
|
|
650
641
|
] });
|
|
651
642
|
}
|
|
652
643
|
function Ln({ className: e }) {
|
|
653
|
-
return /* @__PURE__ */ W(
|
|
654
|
-
/* @__PURE__ */
|
|
655
|
-
/* @__PURE__ */
|
|
644
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-trash2-icon lucide-trash-2 ${e}`, children: [
|
|
645
|
+
/* @__PURE__ */ a("path", { d: "M10 11v6" }),
|
|
646
|
+
/* @__PURE__ */ a("path", { d: "M14 11v6" }),
|
|
647
|
+
/* @__PURE__ */ a("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
|
|
648
|
+
/* @__PURE__ */ a("path", { d: "M3 6h18" }),
|
|
649
|
+
/* @__PURE__ */ a("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
|
|
656
650
|
] });
|
|
657
651
|
}
|
|
658
652
|
function Fn({ className: e }) {
|
|
659
|
-
return /* @__PURE__ */ W(
|
|
660
|
-
/* @__PURE__ */
|
|
661
|
-
/* @__PURE__ */
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
653
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-square-pen-icon lucide-square-pen ${e}`, children: [
|
|
654
|
+
/* @__PURE__ */ a("path", { d: "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
|
|
655
|
+
/* @__PURE__ */ a("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" })
|
|
656
|
+
] });
|
|
657
|
+
}
|
|
658
|
+
function Vn({ className: e }) {
|
|
659
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-grid3x3-icon lucide-grid-3x3 ${e}`, children: [
|
|
660
|
+
/* @__PURE__ */ a("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
|
|
661
|
+
/* @__PURE__ */ a("path", { d: "M3 9h18" }),
|
|
662
|
+
/* @__PURE__ */ a("path", { d: "M3 15h18" }),
|
|
663
|
+
/* @__PURE__ */ a("path", { d: "M9 3v18" }),
|
|
664
|
+
/* @__PURE__ */ a("path", { d: "M15 3v18" })
|
|
665
665
|
] });
|
|
666
666
|
}
|
|
667
667
|
function Un({ className: e }) {
|
|
668
|
-
return /* @__PURE__ */ W(
|
|
669
|
-
/* @__PURE__ */
|
|
670
|
-
/* @__PURE__ */
|
|
671
|
-
/* @__PURE__ */
|
|
668
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-monitor-icon lucide-monitor ${e}`, children: [
|
|
669
|
+
/* @__PURE__ */ a("rect", { width: "20", height: "14", x: "2", y: "3", rx: "2" }),
|
|
670
|
+
/* @__PURE__ */ a("line", { x1: "8", x2: "16", y1: "21", y2: "21" }),
|
|
671
|
+
/* @__PURE__ */ a("line", { x1: "12", x2: "12", y1: "17", y2: "21" })
|
|
672
672
|
] });
|
|
673
673
|
}
|
|
674
|
-
function
|
|
674
|
+
function qn({ className: e }) {
|
|
675
675
|
return /* @__PURE__ */ W(
|
|
676
|
-
|
|
676
|
+
H,
|
|
677
677
|
{
|
|
678
678
|
className: `lucide lucide-monitor-smartphone-icon lucide-monitor-smartphone ${e}`,
|
|
679
679
|
children: [
|
|
680
|
-
/* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */
|
|
682
|
-
/* @__PURE__ */
|
|
683
|
-
/* @__PURE__ */
|
|
680
|
+
/* @__PURE__ */ a("path", { d: "M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8" }),
|
|
681
|
+
/* @__PURE__ */ a("path", { d: "M10 19v-3.96 3.15" }),
|
|
682
|
+
/* @__PURE__ */ a("path", { d: "M7 19h5" }),
|
|
683
|
+
/* @__PURE__ */ a("rect", { width: "6", height: "10", x: "16", y: "12", rx: "2" })
|
|
684
684
|
]
|
|
685
685
|
}
|
|
686
686
|
);
|
|
687
687
|
}
|
|
688
|
-
function
|
|
688
|
+
function ft({ className: e }) {
|
|
689
689
|
return /* @__PURE__ */ W(
|
|
690
|
-
|
|
690
|
+
H,
|
|
691
691
|
{
|
|
692
692
|
className: `lucide lucide-circle-arrow-left-icon lucide-circle-arrow-left ${e}`,
|
|
693
693
|
children: [
|
|
694
|
-
/* @__PURE__ */
|
|
695
|
-
/* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
695
|
+
/* @__PURE__ */ a("path", { d: "m12 8-4 4 4 4" }),
|
|
696
|
+
/* @__PURE__ */ a("path", { d: "M16 12H8" })
|
|
697
697
|
]
|
|
698
698
|
}
|
|
699
699
|
);
|
|
700
700
|
}
|
|
701
|
-
function
|
|
701
|
+
function ht({ className: e }) {
|
|
702
702
|
return /* @__PURE__ */ W(
|
|
703
|
-
|
|
703
|
+
H,
|
|
704
704
|
{
|
|
705
705
|
className: `lucide lucide-circle-arrow-right-icon lucide-circle-arrow-right ${e}`,
|
|
706
706
|
children: [
|
|
707
|
-
/* @__PURE__ */
|
|
708
|
-
/* @__PURE__ */
|
|
709
|
-
/* @__PURE__ */
|
|
707
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
708
|
+
/* @__PURE__ */ a("path", { d: "m12 16 4-4-4-4" }),
|
|
709
|
+
/* @__PURE__ */ a("path", { d: "M8 12h8" })
|
|
710
710
|
]
|
|
711
711
|
}
|
|
712
712
|
);
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
return /* @__PURE__ */ W(
|
|
716
|
-
/* @__PURE__ */
|
|
717
|
-
/* @__PURE__ */
|
|
714
|
+
function Xt({ className: e }) {
|
|
715
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-settings-icon lucide-settings ${e}`, children: [
|
|
716
|
+
/* @__PURE__ */ a("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" }),
|
|
717
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "3" })
|
|
718
718
|
] });
|
|
719
719
|
}
|
|
720
720
|
function Yn({ className: e }) {
|
|
721
721
|
return /* @__PURE__ */ W(
|
|
722
|
-
|
|
722
|
+
H,
|
|
723
723
|
{
|
|
724
724
|
className: `lucide lucide-tablet-smartphone-icon lucide-tablet-smartphone ${e}`,
|
|
725
725
|
children: [
|
|
726
|
-
/* @__PURE__ */
|
|
727
|
-
/* @__PURE__ */
|
|
728
|
-
/* @__PURE__ */
|
|
726
|
+
/* @__PURE__ */ a("rect", { width: "10", height: "14", x: "3", y: "8", rx: "2" }),
|
|
727
|
+
/* @__PURE__ */ a("path", { d: "M5 4a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v16a2 2 0 0 1-2 2h-2.4" }),
|
|
728
|
+
/* @__PURE__ */ a("path", { d: "M8 18h.01" })
|
|
729
729
|
]
|
|
730
730
|
}
|
|
731
731
|
);
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
return /* @__PURE__ */ W(
|
|
735
|
-
/* @__PURE__ */
|
|
736
|
-
/* @__PURE__ */
|
|
737
|
-
/* @__PURE__ */
|
|
738
|
-
] });
|
|
739
|
-
}
|
|
740
|
-
function qn({ className: e }) {
|
|
741
|
-
return /* @__PURE__ */ W(K, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
|
|
742
|
-
/* @__PURE__ */ s("circle", { cx: "11", cy: "11", r: "8" }),
|
|
743
|
-
/* @__PURE__ */ s("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
744
|
-
/* @__PURE__ */ s("line", { x1: "11", x2: "11", y1: "8", y2: "14" }),
|
|
745
|
-
/* @__PURE__ */ s("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
733
|
+
function gt({ className: e }) {
|
|
734
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-circle-x-icon lucide-circle-x ${e}`, children: [
|
|
735
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
736
|
+
/* @__PURE__ */ a("path", { d: "m15 9-6 6" }),
|
|
737
|
+
/* @__PURE__ */ a("path", { d: "m9 9 6 6" })
|
|
746
738
|
] });
|
|
747
739
|
}
|
|
748
740
|
function zn({ className: e }) {
|
|
749
|
-
return /* @__PURE__ */ W(
|
|
750
|
-
/* @__PURE__ */
|
|
751
|
-
/* @__PURE__ */
|
|
752
|
-
/* @__PURE__ */
|
|
741
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-zoom-in-icon lucide-zoom-in ${e}`, children: [
|
|
742
|
+
/* @__PURE__ */ a("circle", { cx: "11", cy: "11", r: "8" }),
|
|
743
|
+
/* @__PURE__ */ a("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
744
|
+
/* @__PURE__ */ a("line", { x1: "11", x2: "11", y1: "8", y2: "14" }),
|
|
745
|
+
/* @__PURE__ */ a("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
753
746
|
] });
|
|
754
747
|
}
|
|
755
|
-
function
|
|
756
|
-
return /* @__PURE__ */ W(
|
|
757
|
-
/* @__PURE__ */
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
-
/* @__PURE__ */
|
|
760
|
-
/* @__PURE__ */ s("path", { d: "M9 17H4v5" })
|
|
748
|
+
function Bn({ className: e }) {
|
|
749
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-zoom-out-icon lucide-zoom-out ${e}`, children: [
|
|
750
|
+
/* @__PURE__ */ a("circle", { cx: "11", cy: "11", r: "8" }),
|
|
751
|
+
/* @__PURE__ */ a("line", { x1: "21", x2: "16.65", y1: "21", y2: "16.65" }),
|
|
752
|
+
/* @__PURE__ */ a("line", { x1: "8", x2: "14", y1: "11", y2: "11" })
|
|
761
753
|
] });
|
|
762
754
|
}
|
|
763
755
|
function Gt({ className: e }) {
|
|
764
|
-
return /* @__PURE__ */ W(
|
|
765
|
-
/* @__PURE__ */
|
|
766
|
-
/* @__PURE__ */
|
|
756
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-timer-reset-icon lucide-timer-reset ${e}`, children: [
|
|
757
|
+
/* @__PURE__ */ a("path", { d: "M10 2h4" }),
|
|
758
|
+
/* @__PURE__ */ a("path", { d: "M12 14v-4" }),
|
|
759
|
+
/* @__PURE__ */ a("path", { d: "M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6" }),
|
|
760
|
+
/* @__PURE__ */ a("path", { d: "M9 17H4v5" })
|
|
767
761
|
] });
|
|
768
762
|
}
|
|
769
763
|
function Zt({ className: e }) {
|
|
770
|
-
return /* @__PURE__ */ W(
|
|
771
|
-
/* @__PURE__ */
|
|
772
|
-
/* @__PURE__ */
|
|
764
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-undo-icon lucide-undo ${e}`, children: [
|
|
765
|
+
/* @__PURE__ */ a("path", { d: "M3 7v6h6" }),
|
|
766
|
+
/* @__PURE__ */ a("path", { d: "M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" })
|
|
773
767
|
] });
|
|
774
768
|
}
|
|
775
769
|
function Jt({ className: e }) {
|
|
776
|
-
return /* @__PURE__ */ W(
|
|
777
|
-
/* @__PURE__ */
|
|
778
|
-
/* @__PURE__ */
|
|
779
|
-
/* @__PURE__ */ s("path", { d: "M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8" }),
|
|
780
|
-
/* @__PURE__ */ s("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" })
|
|
770
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-redo-icon lucide-redo ${e}`, children: [
|
|
771
|
+
/* @__PURE__ */ a("path", { d: "M21 7v6h-6" }),
|
|
772
|
+
/* @__PURE__ */ a("path", { d: "M3 17a9 9 0 0 1 9-9 9 9 0 0 1 6 2.3l3 2.7" })
|
|
781
773
|
] });
|
|
782
774
|
}
|
|
783
775
|
function Qt({ className: e }) {
|
|
784
|
-
return /* @__PURE__ */ W(
|
|
785
|
-
/* @__PURE__ */
|
|
786
|
-
/* @__PURE__ */
|
|
787
|
-
/* @__PURE__ */
|
|
788
|
-
/* @__PURE__ */
|
|
789
|
-
/* @__PURE__ */ s("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" })
|
|
776
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-hand-icon lucide-hand ${e}`, children: [
|
|
777
|
+
/* @__PURE__ */ a("path", { d: "M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
|
|
778
|
+
/* @__PURE__ */ a("path", { d: "M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
779
|
+
/* @__PURE__ */ a("path", { d: "M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8" }),
|
|
780
|
+
/* @__PURE__ */ a("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" })
|
|
790
781
|
] });
|
|
791
782
|
}
|
|
792
783
|
function en({ className: e }) {
|
|
793
|
-
return /* @__PURE__ */ W(
|
|
794
|
-
/* @__PURE__ */
|
|
795
|
-
/* @__PURE__ */
|
|
796
|
-
/* @__PURE__ */
|
|
797
|
-
/* @__PURE__ */
|
|
784
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-hand-grab-icon lucide-hand-grab ${e}`, children: [
|
|
785
|
+
/* @__PURE__ */ a("path", { d: "M18 11.5V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1.4" }),
|
|
786
|
+
/* @__PURE__ */ a("path", { d: "M14 10V8a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2" }),
|
|
787
|
+
/* @__PURE__ */ a("path", { d: "M10 9.9V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v5" }),
|
|
788
|
+
/* @__PURE__ */ a("path", { d: "M6 14a2 2 0 0 0-2-2a2 2 0 0 0-2 2" }),
|
|
789
|
+
/* @__PURE__ */ a("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" })
|
|
798
790
|
] });
|
|
799
791
|
}
|
|
800
|
-
function
|
|
801
|
-
return /* @__PURE__ */ W(
|
|
802
|
-
/* @__PURE__ */
|
|
803
|
-
/* @__PURE__ */
|
|
804
|
-
/* @__PURE__ */
|
|
792
|
+
function tn({ className: e }) {
|
|
793
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-crosshair-icon lucide-crosshair ${e}`, children: [
|
|
794
|
+
/* @__PURE__ */ a("line", { x1: "22", x2: "18", y1: "12", y2: "12" }),
|
|
795
|
+
/* @__PURE__ */ a("line", { x1: "6", x2: "2", y1: "12", y2: "12" }),
|
|
796
|
+
/* @__PURE__ */ a("line", { x1: "12", x2: "12", y1: "6", y2: "2" }),
|
|
797
|
+
/* @__PURE__ */ a("line", { x1: "12", x2: "12", y1: "22", y2: "18" })
|
|
805
798
|
] });
|
|
806
799
|
}
|
|
807
|
-
function
|
|
800
|
+
function Hn({ className: e }) {
|
|
801
|
+
return /* @__PURE__ */ W(H, { className: `lucide lucide-target-icon lucide-target ${e}`, children: [
|
|
802
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
803
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "6" }),
|
|
804
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "2" })
|
|
805
|
+
] });
|
|
806
|
+
}
|
|
807
|
+
function nn({ className: e }) {
|
|
808
808
|
return /* @__PURE__ */ W(
|
|
809
|
-
|
|
809
|
+
H,
|
|
810
810
|
{
|
|
811
811
|
className: `lucide lucide-file-question-mark-icon lucide-file-question-mark ${e}`,
|
|
812
812
|
children: [
|
|
813
|
-
/* @__PURE__ */
|
|
814
|
-
/* @__PURE__ */
|
|
815
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ a("circle", { cx: "12", cy: "12", r: "10" }),
|
|
814
|
+
/* @__PURE__ */ a("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
|
|
815
|
+
/* @__PURE__ */ a("path", { d: "M12 17h.01" })
|
|
816
816
|
]
|
|
817
817
|
}
|
|
818
818
|
);
|
|
@@ -824,7 +824,7 @@ const Z = (e, ...n) => [
|
|
|
824
824
|
].join(" ").trim(), re = (e, n = "color") => {
|
|
825
825
|
if (typeof window > "u") return "#FFFFFF";
|
|
826
826
|
const t = document.createElement("div");
|
|
827
|
-
Array.isArray(e) ? e.forEach((
|
|
827
|
+
Array.isArray(e) ? e.forEach((o) => t.classList.add(o)) : e.split(" ").forEach((o) => t.classList.add(o)), t.style.display = "none", document.body.appendChild(t);
|
|
828
828
|
const r = window.getComputedStyle(t)[n];
|
|
829
829
|
return document.body.removeChild(t), r;
|
|
830
830
|
}, Kn = {
|
|
@@ -837,7 +837,7 @@ const Z = (e, ...n) => [
|
|
|
837
837
|
disabled: re("text-disabled", "color"),
|
|
838
838
|
neutral: re("text-neutral", "color"),
|
|
839
839
|
body: re("text-body", "color")
|
|
840
|
-
},
|
|
840
|
+
}, Xn = {
|
|
841
841
|
getCssVariableValue: (e) => {
|
|
842
842
|
const n = document.documentElement;
|
|
843
843
|
return getComputedStyle(n).getPropertyValue(e).trim() || null;
|
|
@@ -851,36 +851,36 @@ const Z = (e, ...n) => [
|
|
|
851
851
|
n.style.setProperty(t.cssProperty, t.value);
|
|
852
852
|
});
|
|
853
853
|
}
|
|
854
|
-
},
|
|
854
|
+
}, mt = (e) => {
|
|
855
855
|
const n = `${e}`.split("_");
|
|
856
856
|
return n.length > 1 ? n[1].replace(/(\D)(\d+)/, "$1 $2") : "Container";
|
|
857
|
-
},
|
|
857
|
+
}, pt = ({
|
|
858
858
|
label: e,
|
|
859
859
|
className: n,
|
|
860
860
|
size: t = "medium",
|
|
861
861
|
value: r,
|
|
862
|
-
onChange:
|
|
863
|
-
onKeyDown:
|
|
864
|
-
placeholder:
|
|
862
|
+
onChange: o,
|
|
863
|
+
onKeyDown: i,
|
|
864
|
+
placeholder: s = ""
|
|
865
865
|
}) => {
|
|
866
|
-
const d =
|
|
866
|
+
const d = st(() => t === "small" ? "py-1.5 px-3 text-sm" : "py-2.5 px-4 text-base", [t]), b = Z("flex flex-col mb-4", n || ""), h = `${Z(`
|
|
867
867
|
block w-full rounded-md px-3 py-1.5 text-base
|
|
868
868
|
bg-formfield content-formfield
|
|
869
869
|
outline-1 -outline-offset-1 outline-primary
|
|
870
870
|
placeholder:text-disabled
|
|
871
871
|
focus:outline-2 focus:-outline-offset-2 focus:outline-indigo-200 sm:text-sm/6
|
|
872
872
|
`)} ${d}`;
|
|
873
|
-
return /* @__PURE__ */ W("div", { className:
|
|
874
|
-
/* @__PURE__ */
|
|
875
|
-
/* @__PURE__ */
|
|
873
|
+
return /* @__PURE__ */ W("div", { className: b, children: [
|
|
874
|
+
/* @__PURE__ */ a("label", { htmlFor: e, className: "block text-sm/6 font-medium mb-1.5", children: e }),
|
|
875
|
+
/* @__PURE__ */ a(
|
|
876
876
|
"input",
|
|
877
877
|
{
|
|
878
878
|
id: e,
|
|
879
879
|
type: "text",
|
|
880
880
|
value: r,
|
|
881
|
-
onChange:
|
|
882
|
-
onKeyDown: (u) =>
|
|
883
|
-
placeholder:
|
|
881
|
+
onChange: o,
|
|
882
|
+
onKeyDown: (u) => i && i(u),
|
|
883
|
+
placeholder: s,
|
|
884
884
|
className: h,
|
|
885
885
|
"aria-label": e
|
|
886
886
|
}
|
|
@@ -901,23 +901,23 @@ function J(e) {
|
|
|
901
901
|
tooltip: n,
|
|
902
902
|
disabled: t,
|
|
903
903
|
isIconButton: r,
|
|
904
|
-
className:
|
|
905
|
-
buttonType:
|
|
906
|
-
category:
|
|
904
|
+
className: o,
|
|
905
|
+
buttonType: i,
|
|
906
|
+
category: s,
|
|
907
907
|
px: d,
|
|
908
|
-
py:
|
|
909
|
-
children:
|
|
908
|
+
py: b,
|
|
909
|
+
children: g,
|
|
910
910
|
...h
|
|
911
911
|
} = e, u = () => {
|
|
912
|
-
const
|
|
913
|
-
let
|
|
914
|
-
|
|
915
|
-
const c = Number((e.borderHover || 0) > 0 ? e.borderHover : 0),
|
|
916
|
-
if (
|
|
912
|
+
const y = e.isIconButton || !1, D = e.category || "primary", p = e.buttonType || "normal", v = e.disabled || !1, w = e.className || "", N = e.font || "semibold", C = Number((e.border || 0) > 0 ? e.border : 0);
|
|
913
|
+
let S = (e.borderColor || "").trim();
|
|
914
|
+
S = S.length > 0 ? S : "";
|
|
915
|
+
const c = Number((e.borderHover || 0) > 0 ? e.borderHover : 0), E = e.shadow || "sm", l = e.shadowHover || "md", f = (e.addCss || "").trim(), M = e.justifyCss || "justify-center";
|
|
916
|
+
if (y)
|
|
917
917
|
return Z(
|
|
918
918
|
"flex flex-row items-center",
|
|
919
|
-
|
|
920
|
-
|
|
919
|
+
v ? "text-disabled" : `text-${D} hover:brightness-110 cursor-pointer`,
|
|
920
|
+
w || ""
|
|
921
921
|
);
|
|
922
922
|
const $ = [
|
|
923
923
|
"relative cursor-pointer",
|
|
@@ -926,39 +926,39 @@ function J(e) {
|
|
|
926
926
|
"text-sm",
|
|
927
927
|
`font-${N}`
|
|
928
928
|
];
|
|
929
|
-
if (
|
|
930
|
-
|
|
929
|
+
if (v)
|
|
930
|
+
p === "ghost" ? $.push("text-disabled border-disabled cursor-not-allowed") : $.push("bg-disabled content-disabled border-disabled cursor-not-allowed");
|
|
931
931
|
else {
|
|
932
932
|
$.push("cursor-pointer");
|
|
933
|
-
let
|
|
934
|
-
Se.has(
|
|
935
|
-
const
|
|
936
|
-
$.push(
|
|
937
|
-
}
|
|
938
|
-
return
|
|
939
|
-
},
|
|
940
|
-
const
|
|
933
|
+
let I = "";
|
|
934
|
+
Se.has(p) ? I = `${Se.get(p)}` : I = `${Se.get("normal")}`, C < 1 && (I = I.replace("border-[category]", ""));
|
|
935
|
+
const T = I.replace(/\[category\]/g, D).trim();
|
|
936
|
+
$.push(T);
|
|
937
|
+
}
|
|
938
|
+
return C > 0 ? ($.push(`border-[${C}px]`), $.push(`border-${S}`)) : ($.push("border-[1px]"), $.push("border-transparent")), c > 0 ? ($.push(`hover:border-[${c}px] group-hover:border-[${c}px]`), $.push(`hover:border-${S} group-hover:border-${S}`)) : $.push("hover:border-[1px] group-hover:border-[1px]"), $.push(`shadow-${E}`), $.push(`hover:shadow-${l} group-hover:shadow-${l}`), f.length > 0 && $.push(f), f.indexOf("hidden") === -1 && $.push("inline-flex"), $.push(M), $.join(" ").trim();
|
|
939
|
+
}, m = () => {
|
|
940
|
+
const y = e.px || 0.7, D = e.py || 0.25;
|
|
941
941
|
return {
|
|
942
|
-
padding: r ? 0 : `${
|
|
942
|
+
padding: r ? 0 : `${D}rem ${y}rem `
|
|
943
943
|
};
|
|
944
944
|
};
|
|
945
|
-
return /* @__PURE__ */
|
|
945
|
+
return /* @__PURE__ */ a("button", { type: "button", disabled: t, className: u(), style: m(), ...h, children: g });
|
|
946
946
|
}
|
|
947
|
-
const
|
|
948
|
-
function
|
|
949
|
-
const { children: n, testId: t, classNames: r, direction:
|
|
950
|
-
return /* @__PURE__ */
|
|
947
|
+
const rn = (e) => e.direction === "row" ? Z("flex flex-row items-center gap-2", e.classNames || "") : Z("flex flex-col gap-2 w-full", e.classNames || "");
|
|
948
|
+
function on(e) {
|
|
949
|
+
const { children: n, testId: t, classNames: r, direction: o, ...i } = e, s = rn(e);
|
|
950
|
+
return /* @__PURE__ */ a("div", { "data-testid": t || "not-set", className: s, ...i, children: n });
|
|
951
951
|
}
|
|
952
|
-
const
|
|
952
|
+
const Gn = ce(
|
|
953
953
|
(e, n) => {
|
|
954
|
-
const { classNames: t, innerClass: r, ...
|
|
954
|
+
const { classNames: t, innerClass: r, ...o } = e, i = Z(t || "", "w-full"), s = Z(
|
|
955
955
|
`w-full flex overflow-hidden justify-between items-center gap-0
|
|
956
956
|
rounded-md border`,
|
|
957
957
|
r || ""
|
|
958
958
|
);
|
|
959
|
-
return /* @__PURE__ */
|
|
959
|
+
return /* @__PURE__ */ a(on, { direction: "row", classNames: i, ...o, children: /* @__PURE__ */ a("div", { className: s, children: e.children }) });
|
|
960
960
|
}
|
|
961
|
-
),
|
|
961
|
+
), Zn = ce((e, n) => /* @__PURE__ */ a(
|
|
962
962
|
"div",
|
|
963
963
|
{
|
|
964
964
|
"data-testid": e.testId || "not-set",
|
|
@@ -969,8 +969,8 @@ const Xn = ce(
|
|
|
969
969
|
},
|
|
970
970
|
children: e.children
|
|
971
971
|
}
|
|
972
|
-
)),
|
|
973
|
-
(e, n) => /* @__PURE__ */
|
|
972
|
+
)), Jn = ce(
|
|
973
|
+
(e, n) => /* @__PURE__ */ a(
|
|
974
974
|
"div",
|
|
975
975
|
{
|
|
976
976
|
"data-testid": e.testId || "not-set",
|
|
@@ -978,7 +978,7 @@ const Xn = ce(
|
|
|
978
978
|
children: e.children
|
|
979
979
|
}
|
|
980
980
|
)
|
|
981
|
-
),
|
|
981
|
+
), Qn = ce((e, n) => /* @__PURE__ */ a(
|
|
982
982
|
"div",
|
|
983
983
|
{
|
|
984
984
|
"data-testid": e.testId || "not-set",
|
|
@@ -990,97 +990,97 @@ const Xn = ce(
|
|
|
990
990
|
children: e.children
|
|
991
991
|
}
|
|
992
992
|
));
|
|
993
|
-
function
|
|
993
|
+
function an(e) {
|
|
994
994
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
995
995
|
}
|
|
996
|
-
var fe = { exports: {} }, De = {}, pe = { exports: {} }, ye = { exports: {} },
|
|
997
|
-
var
|
|
998
|
-
function
|
|
999
|
-
if (
|
|
1000
|
-
|
|
1001
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107,
|
|
1002
|
-
function
|
|
996
|
+
var fe = { exports: {} }, De = {}, pe = { exports: {} }, ye = { exports: {} }, U = {};
|
|
997
|
+
var Ve;
|
|
998
|
+
function sn() {
|
|
999
|
+
if (Ve) return U;
|
|
1000
|
+
Ve = 1;
|
|
1001
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, p = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1002
|
+
function C(c) {
|
|
1003
1003
|
if (typeof c == "object" && c !== null) {
|
|
1004
|
-
var
|
|
1005
|
-
switch (
|
|
1004
|
+
var E = c.$$typeof;
|
|
1005
|
+
switch (E) {
|
|
1006
1006
|
case n:
|
|
1007
1007
|
switch (c = c.type, c) {
|
|
1008
|
-
case
|
|
1009
|
-
case
|
|
1008
|
+
case b:
|
|
1009
|
+
case g:
|
|
1010
1010
|
case r:
|
|
1011
|
-
case o:
|
|
1012
1011
|
case i:
|
|
1012
|
+
case o:
|
|
1013
1013
|
case u:
|
|
1014
1014
|
return c;
|
|
1015
1015
|
default:
|
|
1016
1016
|
switch (c = c && c.$$typeof, c) {
|
|
1017
1017
|
case d:
|
|
1018
1018
|
case h:
|
|
1019
|
-
case
|
|
1020
|
-
case
|
|
1021
|
-
case
|
|
1019
|
+
case D:
|
|
1020
|
+
case y:
|
|
1021
|
+
case s:
|
|
1022
1022
|
return c;
|
|
1023
1023
|
default:
|
|
1024
|
-
return
|
|
1024
|
+
return E;
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
1027
|
case t:
|
|
1028
|
-
return
|
|
1028
|
+
return E;
|
|
1029
1029
|
}
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1033
|
-
return
|
|
1034
|
-
}
|
|
1035
|
-
return
|
|
1036
|
-
return
|
|
1037
|
-
},
|
|
1038
|
-
return
|
|
1039
|
-
},
|
|
1040
|
-
return
|
|
1041
|
-
},
|
|
1032
|
+
function S(c) {
|
|
1033
|
+
return C(c) === g;
|
|
1034
|
+
}
|
|
1035
|
+
return U.AsyncMode = b, U.ConcurrentMode = g, U.ContextConsumer = d, U.ContextProvider = s, U.Element = n, U.ForwardRef = h, U.Fragment = r, U.Lazy = D, U.Memo = y, U.Portal = t, U.Profiler = i, U.StrictMode = o, U.Suspense = u, U.isAsyncMode = function(c) {
|
|
1036
|
+
return S(c) || C(c) === b;
|
|
1037
|
+
}, U.isConcurrentMode = S, U.isContextConsumer = function(c) {
|
|
1038
|
+
return C(c) === d;
|
|
1039
|
+
}, U.isContextProvider = function(c) {
|
|
1040
|
+
return C(c) === s;
|
|
1041
|
+
}, U.isElement = function(c) {
|
|
1042
1042
|
return typeof c == "object" && c !== null && c.$$typeof === n;
|
|
1043
|
-
},
|
|
1044
|
-
return
|
|
1045
|
-
},
|
|
1046
|
-
return
|
|
1047
|
-
},
|
|
1048
|
-
return
|
|
1049
|
-
},
|
|
1050
|
-
return
|
|
1051
|
-
},
|
|
1052
|
-
return
|
|
1053
|
-
},
|
|
1054
|
-
return
|
|
1055
|
-
},
|
|
1056
|
-
return
|
|
1057
|
-
},
|
|
1058
|
-
return
|
|
1059
|
-
},
|
|
1060
|
-
return typeof c == "string" || typeof c == "function" || c === r || c ===
|
|
1061
|
-
},
|
|
1043
|
+
}, U.isForwardRef = function(c) {
|
|
1044
|
+
return C(c) === h;
|
|
1045
|
+
}, U.isFragment = function(c) {
|
|
1046
|
+
return C(c) === r;
|
|
1047
|
+
}, U.isLazy = function(c) {
|
|
1048
|
+
return C(c) === D;
|
|
1049
|
+
}, U.isMemo = function(c) {
|
|
1050
|
+
return C(c) === y;
|
|
1051
|
+
}, U.isPortal = function(c) {
|
|
1052
|
+
return C(c) === t;
|
|
1053
|
+
}, U.isProfiler = function(c) {
|
|
1054
|
+
return C(c) === i;
|
|
1055
|
+
}, U.isStrictMode = function(c) {
|
|
1056
|
+
return C(c) === o;
|
|
1057
|
+
}, U.isSuspense = function(c) {
|
|
1058
|
+
return C(c) === u;
|
|
1059
|
+
}, U.isValidElementType = function(c) {
|
|
1060
|
+
return typeof c == "string" || typeof c == "function" || c === r || c === g || c === i || c === o || c === u || c === m || typeof c == "object" && c !== null && (c.$$typeof === D || c.$$typeof === y || c.$$typeof === s || c.$$typeof === d || c.$$typeof === h || c.$$typeof === v || c.$$typeof === w || c.$$typeof === N || c.$$typeof === p);
|
|
1061
|
+
}, U.typeOf = C, U;
|
|
1062
1062
|
}
|
|
1063
|
-
var
|
|
1064
|
-
var
|
|
1065
|
-
function
|
|
1066
|
-
return
|
|
1067
|
-
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107,
|
|
1068
|
-
function
|
|
1063
|
+
var q = {};
|
|
1064
|
+
var Ue;
|
|
1065
|
+
function ln() {
|
|
1066
|
+
return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
1067
|
+
var e = typeof Symbol == "function" && Symbol.for, n = e ? /* @__PURE__ */ Symbol.for("react.element") : 60103, t = e ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, r = e ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = e ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, i = e ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, s = e ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, d = e ? /* @__PURE__ */ Symbol.for("react.context") : 60110, b = e ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, g = e ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, h = e ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, u = e ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, m = e ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, y = e ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, D = e ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, p = e ? /* @__PURE__ */ Symbol.for("react.block") : 60121, v = e ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, w = e ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, N = e ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
1068
|
+
function C(_) {
|
|
1069
1069
|
return typeof _ == "string" || typeof _ == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1070
|
-
_ === r || _ ===
|
|
1070
|
+
_ === r || _ === g || _ === i || _ === o || _ === u || _ === m || typeof _ == "object" && _ !== null && (_.$$typeof === D || _.$$typeof === y || _.$$typeof === s || _.$$typeof === d || _.$$typeof === h || _.$$typeof === v || _.$$typeof === w || _.$$typeof === N || _.$$typeof === p);
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1072
|
+
function S(_) {
|
|
1073
1073
|
if (typeof _ == "object" && _ !== null) {
|
|
1074
1074
|
var te = _.$$typeof;
|
|
1075
1075
|
switch (te) {
|
|
1076
1076
|
case n:
|
|
1077
1077
|
var me = _.type;
|
|
1078
1078
|
switch (me) {
|
|
1079
|
-
case
|
|
1080
|
-
case
|
|
1079
|
+
case b:
|
|
1080
|
+
case g:
|
|
1081
1081
|
case r:
|
|
1082
|
-
case o:
|
|
1083
1082
|
case i:
|
|
1083
|
+
case o:
|
|
1084
1084
|
case u:
|
|
1085
1085
|
return me;
|
|
1086
1086
|
default:
|
|
@@ -1088,9 +1088,9 @@ function sn() {
|
|
|
1088
1088
|
switch (je) {
|
|
1089
1089
|
case d:
|
|
1090
1090
|
case h:
|
|
1091
|
-
case
|
|
1092
|
-
case
|
|
1093
|
-
case
|
|
1091
|
+
case D:
|
|
1092
|
+
case y:
|
|
1093
|
+
case s:
|
|
1094
1094
|
return je;
|
|
1095
1095
|
default:
|
|
1096
1096
|
return te;
|
|
@@ -1101,97 +1101,97 @@ function sn() {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
|
-
var c =
|
|
1104
|
+
var c = b, E = g, l = d, f = s, M = n, $ = h, I = r, T = D, z = y, X = t, Q = i, K = o, ee = u, se = !1;
|
|
1105
1105
|
function de(_) {
|
|
1106
|
-
return
|
|
1106
|
+
return se || (se = !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.")), x(_) || S(_) === b;
|
|
1107
1107
|
}
|
|
1108
1108
|
function x(_) {
|
|
1109
|
-
return
|
|
1109
|
+
return S(_) === g;
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1112
|
-
return
|
|
1111
|
+
function P(_) {
|
|
1112
|
+
return S(_) === d;
|
|
1113
1113
|
}
|
|
1114
1114
|
function A(_) {
|
|
1115
|
-
return
|
|
1115
|
+
return S(_) === s;
|
|
1116
1116
|
}
|
|
1117
1117
|
function k(_) {
|
|
1118
1118
|
return typeof _ == "object" && _ !== null && _.$$typeof === n;
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1121
|
-
return
|
|
1120
|
+
function O(_) {
|
|
1121
|
+
return S(_) === h;
|
|
1122
1122
|
}
|
|
1123
1123
|
function L(_) {
|
|
1124
|
-
return
|
|
1124
|
+
return S(_) === r;
|
|
1125
1125
|
}
|
|
1126
1126
|
function R(_) {
|
|
1127
|
-
return
|
|
1127
|
+
return S(_) === D;
|
|
1128
1128
|
}
|
|
1129
1129
|
function j(_) {
|
|
1130
|
-
return
|
|
1130
|
+
return S(_) === y;
|
|
1131
1131
|
}
|
|
1132
1132
|
function F(_) {
|
|
1133
|
-
return
|
|
1133
|
+
return S(_) === t;
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1136
|
-
return
|
|
1135
|
+
function Y(_) {
|
|
1136
|
+
return S(_) === i;
|
|
1137
1137
|
}
|
|
1138
|
-
function
|
|
1139
|
-
return
|
|
1138
|
+
function V(_) {
|
|
1139
|
+
return S(_) === o;
|
|
1140
1140
|
}
|
|
1141
1141
|
function G(_) {
|
|
1142
|
-
return
|
|
1142
|
+
return S(_) === u;
|
|
1143
1143
|
}
|
|
1144
|
-
|
|
1145
|
-
})()),
|
|
1144
|
+
q.AsyncMode = c, q.ConcurrentMode = E, q.ContextConsumer = l, q.ContextProvider = f, q.Element = M, q.ForwardRef = $, q.Fragment = I, q.Lazy = T, q.Memo = z, q.Portal = X, q.Profiler = Q, q.StrictMode = K, q.Suspense = ee, q.isAsyncMode = de, q.isConcurrentMode = x, q.isContextConsumer = P, q.isContextProvider = A, q.isElement = k, q.isForwardRef = O, q.isFragment = L, q.isLazy = R, q.isMemo = j, q.isPortal = F, q.isProfiler = Y, q.isStrictMode = V, q.isSuspense = G, q.isValidElementType = C, q.typeOf = S;
|
|
1145
|
+
})()), q;
|
|
1146
1146
|
}
|
|
1147
|
-
var
|
|
1148
|
-
function
|
|
1149
|
-
return
|
|
1147
|
+
var qe;
|
|
1148
|
+
function yt() {
|
|
1149
|
+
return qe || (qe = 1, process.env.NODE_ENV === "production" ? ye.exports = sn() : ye.exports = ln()), ye.exports;
|
|
1150
1150
|
}
|
|
1151
|
-
var Ne,
|
|
1152
|
-
function
|
|
1153
|
-
if (
|
|
1154
|
-
|
|
1151
|
+
var Ne, Ye;
|
|
1152
|
+
function cn() {
|
|
1153
|
+
if (Ye) return Ne;
|
|
1154
|
+
Ye = 1;
|
|
1155
1155
|
var e = Object.getOwnPropertySymbols, n = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
1156
|
-
function r(
|
|
1157
|
-
if (
|
|
1156
|
+
function r(i) {
|
|
1157
|
+
if (i == null)
|
|
1158
1158
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
1159
|
-
return Object(
|
|
1159
|
+
return Object(i);
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1161
|
+
function o() {
|
|
1162
1162
|
try {
|
|
1163
1163
|
if (!Object.assign)
|
|
1164
1164
|
return !1;
|
|
1165
|
-
var
|
|
1166
|
-
if (
|
|
1165
|
+
var i = new String("abc");
|
|
1166
|
+
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
|
|
1167
1167
|
return !1;
|
|
1168
|
-
for (var
|
|
1169
|
-
|
|
1170
|
-
var
|
|
1171
|
-
return
|
|
1168
|
+
for (var s = {}, d = 0; d < 10; d++)
|
|
1169
|
+
s["_" + String.fromCharCode(d)] = d;
|
|
1170
|
+
var b = Object.getOwnPropertyNames(s).map(function(h) {
|
|
1171
|
+
return s[h];
|
|
1172
1172
|
});
|
|
1173
|
-
if (
|
|
1173
|
+
if (b.join("") !== "0123456789")
|
|
1174
1174
|
return !1;
|
|
1175
|
-
var
|
|
1175
|
+
var g = {};
|
|
1176
1176
|
return "abcdefghijklmnopqrst".split("").forEach(function(h) {
|
|
1177
|
-
|
|
1178
|
-
}), Object.keys(Object.assign({},
|
|
1177
|
+
g[h] = h;
|
|
1178
|
+
}), Object.keys(Object.assign({}, g)).join("") === "abcdefghijklmnopqrst";
|
|
1179
1179
|
} catch {
|
|
1180
1180
|
return !1;
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
|
-
return Ne =
|
|
1184
|
-
for (var d,
|
|
1183
|
+
return Ne = o() ? Object.assign : function(i, s) {
|
|
1184
|
+
for (var d, b = r(i), g, h = 1; h < arguments.length; h++) {
|
|
1185
1185
|
d = Object(arguments[h]);
|
|
1186
1186
|
for (var u in d)
|
|
1187
|
-
n.call(d, u) && (
|
|
1187
|
+
n.call(d, u) && (b[u] = d[u]);
|
|
1188
1188
|
if (e) {
|
|
1189
|
-
|
|
1190
|
-
for (var
|
|
1191
|
-
t.call(d, m
|
|
1189
|
+
g = e(d);
|
|
1190
|
+
for (var m = 0; m < g.length; m++)
|
|
1191
|
+
t.call(d, g[m]) && (b[g[m]] = d[g[m]]);
|
|
1192
1192
|
}
|
|
1193
1193
|
}
|
|
1194
|
-
return
|
|
1194
|
+
return b;
|
|
1195
1195
|
}, Ne;
|
|
1196
1196
|
}
|
|
1197
1197
|
var Te, ze;
|
|
@@ -1202,306 +1202,306 @@ function Oe() {
|
|
|
1202
1202
|
return Te = e, Te;
|
|
1203
1203
|
}
|
|
1204
1204
|
var Ee, Be;
|
|
1205
|
-
function
|
|
1205
|
+
function bt() {
|
|
1206
1206
|
return Be || (Be = 1, Ee = Function.call.bind(Object.prototype.hasOwnProperty)), Ee;
|
|
1207
1207
|
}
|
|
1208
|
-
var _e,
|
|
1209
|
-
function
|
|
1210
|
-
if (
|
|
1211
|
-
|
|
1208
|
+
var _e, He;
|
|
1209
|
+
function dn() {
|
|
1210
|
+
if (He) return _e;
|
|
1211
|
+
He = 1;
|
|
1212
1212
|
var e = function() {
|
|
1213
1213
|
};
|
|
1214
1214
|
if (process.env.NODE_ENV !== "production") {
|
|
1215
|
-
var n = /* @__PURE__ */ Oe(), t = {}, r = /* @__PURE__ */
|
|
1216
|
-
e = function(
|
|
1217
|
-
var
|
|
1218
|
-
typeof console < "u" && console.error(
|
|
1215
|
+
var n = /* @__PURE__ */ Oe(), t = {}, r = /* @__PURE__ */ bt();
|
|
1216
|
+
e = function(i) {
|
|
1217
|
+
var s = "Warning: " + i;
|
|
1218
|
+
typeof console < "u" && console.error(s);
|
|
1219
1219
|
try {
|
|
1220
|
-
throw new Error(
|
|
1220
|
+
throw new Error(s);
|
|
1221
1221
|
} catch {
|
|
1222
1222
|
}
|
|
1223
1223
|
};
|
|
1224
1224
|
}
|
|
1225
|
-
function i
|
|
1225
|
+
function o(i, s, d, b, g) {
|
|
1226
1226
|
if (process.env.NODE_ENV !== "production") {
|
|
1227
|
-
for (var h in
|
|
1228
|
-
if (r(
|
|
1227
|
+
for (var h in i)
|
|
1228
|
+
if (r(i, h)) {
|
|
1229
1229
|
var u;
|
|
1230
1230
|
try {
|
|
1231
|
-
if (typeof
|
|
1232
|
-
var
|
|
1233
|
-
(
|
|
1231
|
+
if (typeof i[h] != "function") {
|
|
1232
|
+
var m = Error(
|
|
1233
|
+
(b || "React class") + ": " + d + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1234
1234
|
);
|
|
1235
|
-
throw
|
|
1235
|
+
throw m.name = "Invariant Violation", m;
|
|
1236
1236
|
}
|
|
1237
|
-
u =
|
|
1238
|
-
} catch (
|
|
1239
|
-
u =
|
|
1237
|
+
u = i[h](s, h, b, d, null, n);
|
|
1238
|
+
} catch (D) {
|
|
1239
|
+
u = D;
|
|
1240
1240
|
}
|
|
1241
1241
|
if (u && !(u instanceof Error) && e(
|
|
1242
|
-
(
|
|
1242
|
+
(b || "React class") + ": type specification of " + d + " `" + h + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1243
1243
|
), u instanceof Error && !(u.message in t)) {
|
|
1244
1244
|
t[u.message] = !0;
|
|
1245
|
-
var
|
|
1245
|
+
var y = g ? g() : "";
|
|
1246
1246
|
e(
|
|
1247
|
-
"Failed " + d + " type: " + u.message + (
|
|
1247
|
+
"Failed " + d + " type: " + u.message + (y ?? "")
|
|
1248
1248
|
);
|
|
1249
1249
|
}
|
|
1250
1250
|
}
|
|
1251
1251
|
}
|
|
1252
1252
|
}
|
|
1253
|
-
return
|
|
1253
|
+
return o.resetWarningCache = function() {
|
|
1254
1254
|
process.env.NODE_ENV !== "production" && (t = {});
|
|
1255
|
-
}, _e =
|
|
1255
|
+
}, _e = o, _e;
|
|
1256
1256
|
}
|
|
1257
|
-
var Me,
|
|
1258
|
-
function
|
|
1259
|
-
if (
|
|
1260
|
-
|
|
1261
|
-
var e =
|
|
1257
|
+
var Me, Ke;
|
|
1258
|
+
function un() {
|
|
1259
|
+
if (Ke) return Me;
|
|
1260
|
+
Ke = 1;
|
|
1261
|
+
var e = yt(), n = cn(), t = /* @__PURE__ */ Oe(), r = /* @__PURE__ */ bt(), o = /* @__PURE__ */ dn(), i = function() {
|
|
1262
1262
|
};
|
|
1263
|
-
process.env.NODE_ENV !== "production" && (
|
|
1264
|
-
var
|
|
1265
|
-
typeof console < "u" && console.error(
|
|
1263
|
+
process.env.NODE_ENV !== "production" && (i = function(d) {
|
|
1264
|
+
var b = "Warning: " + d;
|
|
1265
|
+
typeof console < "u" && console.error(b);
|
|
1266
1266
|
try {
|
|
1267
|
-
throw new Error(
|
|
1267
|
+
throw new Error(b);
|
|
1268
1268
|
} catch {
|
|
1269
1269
|
}
|
|
1270
1270
|
});
|
|
1271
|
-
function
|
|
1271
|
+
function s() {
|
|
1272
1272
|
return null;
|
|
1273
1273
|
}
|
|
1274
|
-
return Me = function(d,
|
|
1275
|
-
var
|
|
1274
|
+
return Me = function(d, b) {
|
|
1275
|
+
var g = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
|
|
1276
1276
|
function u(x) {
|
|
1277
|
-
var
|
|
1278
|
-
if (typeof
|
|
1279
|
-
return
|
|
1277
|
+
var P = x && (g && x[g] || x[h]);
|
|
1278
|
+
if (typeof P == "function")
|
|
1279
|
+
return P;
|
|
1280
1280
|
}
|
|
1281
|
-
var
|
|
1282
|
-
array:
|
|
1283
|
-
bigint:
|
|
1284
|
-
bool:
|
|
1285
|
-
func:
|
|
1286
|
-
number:
|
|
1287
|
-
object:
|
|
1288
|
-
string:
|
|
1289
|
-
symbol:
|
|
1281
|
+
var m = "<<anonymous>>", y = {
|
|
1282
|
+
array: w("array"),
|
|
1283
|
+
bigint: w("bigint"),
|
|
1284
|
+
bool: w("boolean"),
|
|
1285
|
+
func: w("function"),
|
|
1286
|
+
number: w("number"),
|
|
1287
|
+
object: w("object"),
|
|
1288
|
+
string: w("string"),
|
|
1289
|
+
symbol: w("symbol"),
|
|
1290
1290
|
any: N(),
|
|
1291
|
-
arrayOf:
|
|
1292
|
-
element:
|
|
1291
|
+
arrayOf: C,
|
|
1292
|
+
element: S(),
|
|
1293
1293
|
elementType: c(),
|
|
1294
|
-
instanceOf:
|
|
1294
|
+
instanceOf: E,
|
|
1295
1295
|
node: $(),
|
|
1296
1296
|
objectOf: f,
|
|
1297
1297
|
oneOf: l,
|
|
1298
|
-
oneOfType:
|
|
1299
|
-
shape:
|
|
1298
|
+
oneOfType: M,
|
|
1299
|
+
shape: T,
|
|
1300
1300
|
exact: z
|
|
1301
1301
|
};
|
|
1302
|
-
function
|
|
1303
|
-
return x ===
|
|
1302
|
+
function D(x, P) {
|
|
1303
|
+
return x === P ? x !== 0 || 1 / x === 1 / P : x !== x && P !== P;
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1306
|
-
this.message = x, this.data =
|
|
1305
|
+
function p(x, P) {
|
|
1306
|
+
this.message = x, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
|
|
1307
1307
|
}
|
|
1308
|
-
|
|
1309
|
-
function
|
|
1308
|
+
p.prototype = Error.prototype;
|
|
1309
|
+
function v(x) {
|
|
1310
1310
|
if (process.env.NODE_ENV !== "production")
|
|
1311
|
-
var
|
|
1312
|
-
function k(L, R, j, F,
|
|
1313
|
-
if (F = F ||
|
|
1314
|
-
if (
|
|
1311
|
+
var P = {}, A = 0;
|
|
1312
|
+
function k(L, R, j, F, Y, V, G) {
|
|
1313
|
+
if (F = F || m, V = V || j, G !== t) {
|
|
1314
|
+
if (b) {
|
|
1315
1315
|
var _ = new Error(
|
|
1316
1316
|
"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"
|
|
1317
1317
|
);
|
|
1318
1318
|
throw _.name = "Invariant Violation", _;
|
|
1319
1319
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1320
1320
|
var te = F + ":" + j;
|
|
1321
|
-
!
|
|
1322
|
-
A < 3 && (
|
|
1323
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
1324
|
-
),
|
|
1321
|
+
!P[te] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
1322
|
+
A < 3 && (i(
|
|
1323
|
+
"You are manually calling a React.PropTypes validation function for the `" + V + "` prop on `" + F + "`. 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."
|
|
1324
|
+
), P[te] = !0, A++);
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
1327
|
-
return R[j] == null ? L ? R[j] === null ? new
|
|
1327
|
+
return R[j] == null ? L ? R[j] === null ? new p("The " + Y + " `" + V + "` is marked as required " + ("in `" + F + "`, but its value is `null`.")) : new p("The " + Y + " `" + V + "` is marked as required in " + ("`" + F + "`, but its value is `undefined`.")) : null : x(R, j, F, Y, V);
|
|
1328
1328
|
}
|
|
1329
|
-
var
|
|
1330
|
-
return
|
|
1331
|
-
}
|
|
1332
|
-
function
|
|
1333
|
-
function
|
|
1334
|
-
var F = A[k],
|
|
1335
|
-
if (
|
|
1336
|
-
var
|
|
1337
|
-
return new
|
|
1338
|
-
"Invalid " + L + " `" + R + "` of type " + ("`" +
|
|
1329
|
+
var O = k.bind(null, !1);
|
|
1330
|
+
return O.isRequired = k.bind(null, !0), O;
|
|
1331
|
+
}
|
|
1332
|
+
function w(x) {
|
|
1333
|
+
function P(A, k, O, L, R, j) {
|
|
1334
|
+
var F = A[k], Y = K(F);
|
|
1335
|
+
if (Y !== x) {
|
|
1336
|
+
var V = ee(F);
|
|
1337
|
+
return new p(
|
|
1338
|
+
"Invalid " + L + " `" + R + "` of type " + ("`" + V + "` supplied to `" + O + "`, expected ") + ("`" + x + "`."),
|
|
1339
1339
|
{ expectedType: x }
|
|
1340
1340
|
);
|
|
1341
1341
|
}
|
|
1342
1342
|
return null;
|
|
1343
1343
|
}
|
|
1344
|
-
return
|
|
1344
|
+
return v(P);
|
|
1345
1345
|
}
|
|
1346
1346
|
function N() {
|
|
1347
|
-
return
|
|
1347
|
+
return v(s);
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1350
|
-
function
|
|
1349
|
+
function C(x) {
|
|
1350
|
+
function P(A, k, O, L, R) {
|
|
1351
1351
|
if (typeof x != "function")
|
|
1352
|
-
return new
|
|
1352
|
+
return new p("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside arrayOf.");
|
|
1353
1353
|
var j = A[k];
|
|
1354
1354
|
if (!Array.isArray(j)) {
|
|
1355
|
-
var F =
|
|
1356
|
-
return new
|
|
1355
|
+
var F = K(j);
|
|
1356
|
+
return new p("Invalid " + L + " `" + R + "` of type " + ("`" + F + "` supplied to `" + O + "`, expected an array."));
|
|
1357
1357
|
}
|
|
1358
|
-
for (var
|
|
1359
|
-
var
|
|
1360
|
-
if (
|
|
1361
|
-
return
|
|
1358
|
+
for (var Y = 0; Y < j.length; Y++) {
|
|
1359
|
+
var V = x(j, Y, O, L, R + "[" + Y + "]", t);
|
|
1360
|
+
if (V instanceof Error)
|
|
1361
|
+
return V;
|
|
1362
1362
|
}
|
|
1363
1363
|
return null;
|
|
1364
1364
|
}
|
|
1365
|
-
return
|
|
1365
|
+
return v(P);
|
|
1366
1366
|
}
|
|
1367
|
-
function
|
|
1368
|
-
function x(
|
|
1369
|
-
var R =
|
|
1367
|
+
function S() {
|
|
1368
|
+
function x(P, A, k, O, L) {
|
|
1369
|
+
var R = P[A];
|
|
1370
1370
|
if (!d(R)) {
|
|
1371
|
-
var j =
|
|
1372
|
-
return new
|
|
1371
|
+
var j = K(R);
|
|
1372
|
+
return new p("Invalid " + O + " `" + L + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement."));
|
|
1373
1373
|
}
|
|
1374
1374
|
return null;
|
|
1375
1375
|
}
|
|
1376
|
-
return
|
|
1376
|
+
return v(x);
|
|
1377
1377
|
}
|
|
1378
1378
|
function c() {
|
|
1379
|
-
function x(
|
|
1380
|
-
var R =
|
|
1379
|
+
function x(P, A, k, O, L) {
|
|
1380
|
+
var R = P[A];
|
|
1381
1381
|
if (!e.isValidElementType(R)) {
|
|
1382
|
-
var j =
|
|
1383
|
-
return new
|
|
1382
|
+
var j = K(R);
|
|
1383
|
+
return new p("Invalid " + O + " `" + L + "` of type " + ("`" + j + "` supplied to `" + k + "`, expected a single ReactElement type."));
|
|
1384
1384
|
}
|
|
1385
1385
|
return null;
|
|
1386
1386
|
}
|
|
1387
|
-
return
|
|
1387
|
+
return v(x);
|
|
1388
1388
|
}
|
|
1389
|
-
function
|
|
1390
|
-
function
|
|
1389
|
+
function E(x) {
|
|
1390
|
+
function P(A, k, O, L, R) {
|
|
1391
1391
|
if (!(A[k] instanceof x)) {
|
|
1392
|
-
var j = x.name ||
|
|
1393
|
-
return new
|
|
1392
|
+
var j = x.name || m, F = de(A[k]);
|
|
1393
|
+
return new p("Invalid " + L + " `" + R + "` of type " + ("`" + F + "` supplied to `" + O + "`, expected ") + ("instance of `" + j + "`."));
|
|
1394
1394
|
}
|
|
1395
1395
|
return null;
|
|
1396
1396
|
}
|
|
1397
|
-
return
|
|
1397
|
+
return v(P);
|
|
1398
1398
|
}
|
|
1399
1399
|
function l(x) {
|
|
1400
1400
|
if (!Array.isArray(x))
|
|
1401
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ?
|
|
1401
|
+
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
1402
1402
|
"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])."
|
|
1403
|
-
) :
|
|
1404
|
-
function
|
|
1403
|
+
) : i("Invalid argument supplied to oneOf, expected an array.")), s;
|
|
1404
|
+
function P(A, k, O, L, R) {
|
|
1405
1405
|
for (var j = A[k], F = 0; F < x.length; F++)
|
|
1406
|
-
if (
|
|
1406
|
+
if (D(j, x[F]))
|
|
1407
1407
|
return null;
|
|
1408
|
-
var
|
|
1408
|
+
var Y = JSON.stringify(x, function(G, _) {
|
|
1409
1409
|
var te = ee(_);
|
|
1410
1410
|
return te === "symbol" ? String(_) : _;
|
|
1411
1411
|
});
|
|
1412
|
-
return new
|
|
1412
|
+
return new p("Invalid " + L + " `" + R + "` of value `" + String(j) + "` " + ("supplied to `" + O + "`, expected one of " + Y + "."));
|
|
1413
1413
|
}
|
|
1414
|
-
return
|
|
1414
|
+
return v(P);
|
|
1415
1415
|
}
|
|
1416
1416
|
function f(x) {
|
|
1417
|
-
function
|
|
1417
|
+
function P(A, k, O, L, R) {
|
|
1418
1418
|
if (typeof x != "function")
|
|
1419
|
-
return new
|
|
1420
|
-
var j = A[k], F =
|
|
1419
|
+
return new p("Property `" + R + "` of component `" + O + "` has invalid PropType notation inside objectOf.");
|
|
1420
|
+
var j = A[k], F = K(j);
|
|
1421
1421
|
if (F !== "object")
|
|
1422
|
-
return new
|
|
1423
|
-
for (var
|
|
1424
|
-
if (r(j,
|
|
1425
|
-
var
|
|
1426
|
-
if (
|
|
1427
|
-
return
|
|
1422
|
+
return new p("Invalid " + L + " `" + R + "` of type " + ("`" + F + "` supplied to `" + O + "`, expected an object."));
|
|
1423
|
+
for (var Y in j)
|
|
1424
|
+
if (r(j, Y)) {
|
|
1425
|
+
var V = x(j, Y, O, L, R + "." + Y, t);
|
|
1426
|
+
if (V instanceof Error)
|
|
1427
|
+
return V;
|
|
1428
1428
|
}
|
|
1429
1429
|
return null;
|
|
1430
1430
|
}
|
|
1431
|
-
return
|
|
1431
|
+
return v(P);
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function M(x) {
|
|
1434
1434
|
if (!Array.isArray(x))
|
|
1435
|
-
return process.env.NODE_ENV !== "production" &&
|
|
1436
|
-
for (var
|
|
1437
|
-
var A = x[
|
|
1435
|
+
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), s;
|
|
1436
|
+
for (var P = 0; P < x.length; P++) {
|
|
1437
|
+
var A = x[P];
|
|
1438
1438
|
if (typeof A != "function")
|
|
1439
|
-
return
|
|
1440
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
1441
|
-
),
|
|
1439
|
+
return i(
|
|
1440
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + se(A) + " at index " + P + "."
|
|
1441
|
+
), s;
|
|
1442
1442
|
}
|
|
1443
|
-
function k(
|
|
1444
|
-
for (var
|
|
1445
|
-
var G = x[
|
|
1443
|
+
function k(O, L, R, j, F) {
|
|
1444
|
+
for (var Y = [], V = 0; V < x.length; V++) {
|
|
1445
|
+
var G = x[V], _ = G(O, L, R, j, F, t);
|
|
1446
1446
|
if (_ == null)
|
|
1447
1447
|
return null;
|
|
1448
|
-
_.data && r(_.data, "expectedType") &&
|
|
1448
|
+
_.data && r(_.data, "expectedType") && Y.push(_.data.expectedType);
|
|
1449
1449
|
}
|
|
1450
|
-
var te =
|
|
1451
|
-
return new
|
|
1450
|
+
var te = Y.length > 0 ? ", expected one of type [" + Y.join(", ") + "]" : "";
|
|
1451
|
+
return new p("Invalid " + j + " `" + F + "` supplied to " + ("`" + R + "`" + te + "."));
|
|
1452
1452
|
}
|
|
1453
|
-
return
|
|
1453
|
+
return v(k);
|
|
1454
1454
|
}
|
|
1455
1455
|
function $() {
|
|
1456
|
-
function x(
|
|
1457
|
-
return X(
|
|
1456
|
+
function x(P, A, k, O, L) {
|
|
1457
|
+
return X(P[A]) ? null : new p("Invalid " + O + " `" + L + "` supplied to " + ("`" + k + "`, expected a ReactNode."));
|
|
1458
1458
|
}
|
|
1459
|
-
return
|
|
1459
|
+
return v(x);
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1462
|
-
return new
|
|
1463
|
-
(x || "React class") + ": " +
|
|
1461
|
+
function I(x, P, A, k, O) {
|
|
1462
|
+
return new p(
|
|
1463
|
+
(x || "React class") + ": " + P + " type `" + A + "." + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + O + "`."
|
|
1464
1464
|
);
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1467
|
-
function
|
|
1468
|
-
var j = A[k], F =
|
|
1466
|
+
function T(x) {
|
|
1467
|
+
function P(A, k, O, L, R) {
|
|
1468
|
+
var j = A[k], F = K(j);
|
|
1469
1469
|
if (F !== "object")
|
|
1470
|
-
return new
|
|
1471
|
-
for (var
|
|
1472
|
-
var
|
|
1473
|
-
if (typeof
|
|
1474
|
-
return O
|
|
1475
|
-
var G =
|
|
1470
|
+
return new p("Invalid " + L + " `" + R + "` of type `" + F + "` " + ("supplied to `" + O + "`, expected `object`."));
|
|
1471
|
+
for (var Y in x) {
|
|
1472
|
+
var V = x[Y];
|
|
1473
|
+
if (typeof V != "function")
|
|
1474
|
+
return I(O, L, R, Y, ee(V));
|
|
1475
|
+
var G = V(j, Y, O, L, R + "." + Y, t);
|
|
1476
1476
|
if (G)
|
|
1477
1477
|
return G;
|
|
1478
1478
|
}
|
|
1479
1479
|
return null;
|
|
1480
1480
|
}
|
|
1481
|
-
return
|
|
1481
|
+
return v(P);
|
|
1482
1482
|
}
|
|
1483
1483
|
function z(x) {
|
|
1484
|
-
function
|
|
1485
|
-
var j = A[k], F =
|
|
1484
|
+
function P(A, k, O, L, R) {
|
|
1485
|
+
var j = A[k], F = K(j);
|
|
1486
1486
|
if (F !== "object")
|
|
1487
|
-
return new
|
|
1488
|
-
var
|
|
1489
|
-
for (var
|
|
1490
|
-
var G = x[
|
|
1491
|
-
if (r(x,
|
|
1492
|
-
return O
|
|
1487
|
+
return new p("Invalid " + L + " `" + R + "` of type `" + F + "` " + ("supplied to `" + O + "`, expected `object`."));
|
|
1488
|
+
var Y = n({}, A[k], x);
|
|
1489
|
+
for (var V in Y) {
|
|
1490
|
+
var G = x[V];
|
|
1491
|
+
if (r(x, V) && typeof G != "function")
|
|
1492
|
+
return I(O, L, R, V, ee(G));
|
|
1493
1493
|
if (!G)
|
|
1494
|
-
return new
|
|
1495
|
-
"Invalid " + L + " `" + R + "` key `" +
|
|
1494
|
+
return new p(
|
|
1495
|
+
"Invalid " + L + " `" + R + "` key `" + V + "` supplied to `" + O + "`.\nBad object: " + JSON.stringify(A[k], null, " ") + `
|
|
1496
1496
|
Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
1497
1497
|
);
|
|
1498
|
-
var _ = G(j,
|
|
1498
|
+
var _ = G(j, V, O, L, R + "." + V, t);
|
|
1499
1499
|
if (_)
|
|
1500
1500
|
return _;
|
|
1501
1501
|
}
|
|
1502
1502
|
return null;
|
|
1503
1503
|
}
|
|
1504
|
-
return
|
|
1504
|
+
return v(P);
|
|
1505
1505
|
}
|
|
1506
1506
|
function X(x) {
|
|
1507
1507
|
switch (typeof x) {
|
|
@@ -1516,17 +1516,17 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1516
1516
|
return x.every(X);
|
|
1517
1517
|
if (x === null || d(x))
|
|
1518
1518
|
return !0;
|
|
1519
|
-
var
|
|
1520
|
-
if (
|
|
1521
|
-
var A =
|
|
1522
|
-
if (
|
|
1519
|
+
var P = u(x);
|
|
1520
|
+
if (P) {
|
|
1521
|
+
var A = P.call(x), k;
|
|
1522
|
+
if (P !== x.entries) {
|
|
1523
1523
|
for (; !(k = A.next()).done; )
|
|
1524
1524
|
if (!X(k.value))
|
|
1525
1525
|
return !1;
|
|
1526
1526
|
} else
|
|
1527
1527
|
for (; !(k = A.next()).done; ) {
|
|
1528
|
-
var
|
|
1529
|
-
if (
|
|
1528
|
+
var O = k.value;
|
|
1529
|
+
if (O && !X(O[1]))
|
|
1530
1530
|
return !1;
|
|
1531
1531
|
}
|
|
1532
1532
|
} else
|
|
@@ -1536,47 +1536,47 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
1536
1536
|
return !1;
|
|
1537
1537
|
}
|
|
1538
1538
|
}
|
|
1539
|
-
function Q(x,
|
|
1540
|
-
return x === "symbol" ? !0 :
|
|
1539
|
+
function Q(x, P) {
|
|
1540
|
+
return x === "symbol" ? !0 : P ? P["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && P instanceof Symbol : !1;
|
|
1541
1541
|
}
|
|
1542
|
-
function
|
|
1543
|
-
var
|
|
1544
|
-
return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : Q(
|
|
1542
|
+
function K(x) {
|
|
1543
|
+
var P = typeof x;
|
|
1544
|
+
return Array.isArray(x) ? "array" : x instanceof RegExp ? "object" : Q(P, x) ? "symbol" : P;
|
|
1545
1545
|
}
|
|
1546
1546
|
function ee(x) {
|
|
1547
1547
|
if (typeof x > "u" || x === null)
|
|
1548
1548
|
return "" + x;
|
|
1549
|
-
var
|
|
1550
|
-
if (
|
|
1549
|
+
var P = K(x);
|
|
1550
|
+
if (P === "object") {
|
|
1551
1551
|
if (x instanceof Date)
|
|
1552
1552
|
return "date";
|
|
1553
1553
|
if (x instanceof RegExp)
|
|
1554
1554
|
return "regexp";
|
|
1555
1555
|
}
|
|
1556
|
-
return
|
|
1556
|
+
return P;
|
|
1557
1557
|
}
|
|
1558
|
-
function
|
|
1559
|
-
var
|
|
1560
|
-
switch (
|
|
1558
|
+
function se(x) {
|
|
1559
|
+
var P = ee(x);
|
|
1560
|
+
switch (P) {
|
|
1561
1561
|
case "array":
|
|
1562
1562
|
case "object":
|
|
1563
|
-
return "an " +
|
|
1563
|
+
return "an " + P;
|
|
1564
1564
|
case "boolean":
|
|
1565
1565
|
case "date":
|
|
1566
1566
|
case "regexp":
|
|
1567
|
-
return "a " +
|
|
1567
|
+
return "a " + P;
|
|
1568
1568
|
default:
|
|
1569
|
-
return
|
|
1569
|
+
return P;
|
|
1570
1570
|
}
|
|
1571
1571
|
}
|
|
1572
1572
|
function de(x) {
|
|
1573
|
-
return !x.constructor || !x.constructor.name ?
|
|
1573
|
+
return !x.constructor || !x.constructor.name ? m : x.constructor.name;
|
|
1574
1574
|
}
|
|
1575
|
-
return
|
|
1575
|
+
return y.checkPropTypes = o, y.resetWarningCache = o.resetWarningCache, y.PropTypes = y, y;
|
|
1576
1576
|
}, Me;
|
|
1577
1577
|
}
|
|
1578
1578
|
var Pe, Xe;
|
|
1579
|
-
function
|
|
1579
|
+
function fn() {
|
|
1580
1580
|
if (Xe) return Pe;
|
|
1581
1581
|
Xe = 1;
|
|
1582
1582
|
var e = /* @__PURE__ */ Oe();
|
|
@@ -1585,19 +1585,19 @@ function un() {
|
|
|
1585
1585
|
function t() {
|
|
1586
1586
|
}
|
|
1587
1587
|
return t.resetWarningCache = n, Pe = function() {
|
|
1588
|
-
function r(
|
|
1588
|
+
function r(s, d, b, g, h, u) {
|
|
1589
1589
|
if (u !== e) {
|
|
1590
|
-
var
|
|
1590
|
+
var m = new Error(
|
|
1591
1591
|
"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"
|
|
1592
1592
|
);
|
|
1593
|
-
throw
|
|
1593
|
+
throw m.name = "Invariant Violation", m;
|
|
1594
1594
|
}
|
|
1595
1595
|
}
|
|
1596
1596
|
r.isRequired = r;
|
|
1597
|
-
function
|
|
1597
|
+
function o() {
|
|
1598
1598
|
return r;
|
|
1599
1599
|
}
|
|
1600
|
-
var
|
|
1600
|
+
var i = {
|
|
1601
1601
|
array: r,
|
|
1602
1602
|
bigint: r,
|
|
1603
1603
|
bool: r,
|
|
@@ -1607,212 +1607,212 @@ function un() {
|
|
|
1607
1607
|
string: r,
|
|
1608
1608
|
symbol: r,
|
|
1609
1609
|
any: r,
|
|
1610
|
-
arrayOf:
|
|
1610
|
+
arrayOf: o,
|
|
1611
1611
|
element: r,
|
|
1612
1612
|
elementType: r,
|
|
1613
|
-
instanceOf:
|
|
1613
|
+
instanceOf: o,
|
|
1614
1614
|
node: r,
|
|
1615
|
-
objectOf:
|
|
1616
|
-
oneOf:
|
|
1617
|
-
oneOfType:
|
|
1618
|
-
shape:
|
|
1619
|
-
exact:
|
|
1615
|
+
objectOf: o,
|
|
1616
|
+
oneOf: o,
|
|
1617
|
+
oneOfType: o,
|
|
1618
|
+
shape: o,
|
|
1619
|
+
exact: o,
|
|
1620
1620
|
checkPropTypes: t,
|
|
1621
1621
|
resetWarningCache: n
|
|
1622
1622
|
};
|
|
1623
|
-
return
|
|
1623
|
+
return i.PropTypes = i, i;
|
|
1624
1624
|
}, Pe;
|
|
1625
1625
|
}
|
|
1626
1626
|
var Ge;
|
|
1627
1627
|
function vt() {
|
|
1628
1628
|
if (Ge) return pe.exports;
|
|
1629
1629
|
if (Ge = 1, process.env.NODE_ENV !== "production") {
|
|
1630
|
-
var e =
|
|
1631
|
-
pe.exports = /* @__PURE__ */
|
|
1630
|
+
var e = yt(), n = !0;
|
|
1631
|
+
pe.exports = /* @__PURE__ */ un()(e.isElement, n);
|
|
1632
1632
|
} else
|
|
1633
|
-
pe.exports = /* @__PURE__ */
|
|
1633
|
+
pe.exports = /* @__PURE__ */ fn()();
|
|
1634
1634
|
return pe.exports;
|
|
1635
1635
|
}
|
|
1636
|
-
var
|
|
1637
|
-
function
|
|
1638
|
-
if (Ze) return
|
|
1636
|
+
var be = { exports: {} }, Ze;
|
|
1637
|
+
function hn() {
|
|
1638
|
+
if (Ze) return be.exports;
|
|
1639
1639
|
Ze = 1;
|
|
1640
1640
|
function e(t) {
|
|
1641
|
-
var r,
|
|
1642
|
-
if (typeof t == "string" || typeof t == "number")
|
|
1641
|
+
var r, o, i = "";
|
|
1642
|
+
if (typeof t == "string" || typeof t == "number") i += t;
|
|
1643
1643
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1644
|
-
var
|
|
1645
|
-
for (r = 0; r <
|
|
1646
|
-
} else for (
|
|
1647
|
-
return
|
|
1644
|
+
var s = t.length;
|
|
1645
|
+
for (r = 0; r < s; r++) t[r] && (o = e(t[r])) && (i && (i += " "), i += o);
|
|
1646
|
+
} else for (o in t) t[o] && (i && (i += " "), i += o);
|
|
1647
|
+
return i;
|
|
1648
1648
|
}
|
|
1649
1649
|
function n() {
|
|
1650
|
-
for (var t, r,
|
|
1651
|
-
return
|
|
1650
|
+
for (var t, r, o = 0, i = "", s = arguments.length; o < s; o++) (t = arguments[o]) && (r = e(t)) && (i && (i += " "), i += r);
|
|
1651
|
+
return i;
|
|
1652
1652
|
}
|
|
1653
|
-
return
|
|
1653
|
+
return be.exports = n, be.exports.clsx = n, be.exports;
|
|
1654
1654
|
}
|
|
1655
|
-
var B = {},
|
|
1655
|
+
var B = {}, ie = {}, Je;
|
|
1656
1656
|
function we() {
|
|
1657
|
-
if (Je) return
|
|
1658
|
-
Je = 1, Object.defineProperty(
|
|
1657
|
+
if (Je) return ie;
|
|
1658
|
+
Je = 1, Object.defineProperty(ie, "__esModule", {
|
|
1659
1659
|
value: !0
|
|
1660
|
-
}),
|
|
1661
|
-
function e(
|
|
1662
|
-
for (let d = 0,
|
|
1663
|
-
if (
|
|
1660
|
+
}), ie.dontSetMe = o, ie.findInArray = e, ie.int = r, ie.isFunction = n, ie.isNum = t;
|
|
1661
|
+
function e(i, s) {
|
|
1662
|
+
for (let d = 0, b = i.length; d < b; d++)
|
|
1663
|
+
if (s.apply(s, [i[d], d, i])) return i[d];
|
|
1664
1664
|
}
|
|
1665
|
-
function n(
|
|
1666
|
-
return typeof
|
|
1665
|
+
function n(i) {
|
|
1666
|
+
return typeof i == "function" || Object.prototype.toString.call(i) === "[object Function]";
|
|
1667
1667
|
}
|
|
1668
|
-
function t(
|
|
1669
|
-
return typeof
|
|
1668
|
+
function t(i) {
|
|
1669
|
+
return typeof i == "number" && !isNaN(i);
|
|
1670
1670
|
}
|
|
1671
|
-
function r(
|
|
1672
|
-
return parseInt(
|
|
1671
|
+
function r(i) {
|
|
1672
|
+
return parseInt(i, 10);
|
|
1673
1673
|
}
|
|
1674
|
-
function i
|
|
1675
|
-
if (
|
|
1676
|
-
return new Error(`Invalid prop ${
|
|
1674
|
+
function o(i, s, d) {
|
|
1675
|
+
if (i[s])
|
|
1676
|
+
return new Error(`Invalid prop ${s} passed to ${d} - do not set this, set it on the child.`);
|
|
1677
1677
|
}
|
|
1678
|
-
return
|
|
1678
|
+
return ie;
|
|
1679
1679
|
}
|
|
1680
|
-
var
|
|
1681
|
-
function
|
|
1682
|
-
if (Qe) return
|
|
1683
|
-
Qe = 1, Object.defineProperty(
|
|
1680
|
+
var oe = {}, Qe;
|
|
1681
|
+
function gn() {
|
|
1682
|
+
if (Qe) return oe;
|
|
1683
|
+
Qe = 1, Object.defineProperty(oe, "__esModule", {
|
|
1684
1684
|
value: !0
|
|
1685
|
-
}),
|
|
1685
|
+
}), oe.browserPrefixToKey = t, oe.browserPrefixToStyle = r, oe.default = void 0, oe.getPrefix = n;
|
|
1686
1686
|
const e = ["Moz", "Webkit", "O", "ms"];
|
|
1687
1687
|
function n() {
|
|
1688
|
-
let
|
|
1688
|
+
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "transform";
|
|
1689
1689
|
if (typeof window > "u") return "";
|
|
1690
|
-
const
|
|
1691
|
-
if (!
|
|
1690
|
+
const s = window.document?.documentElement?.style;
|
|
1691
|
+
if (!s || i in s) return "";
|
|
1692
1692
|
for (let d = 0; d < e.length; d++)
|
|
1693
|
-
if (t(
|
|
1693
|
+
if (t(i, e[d]) in s) return e[d];
|
|
1694
1694
|
return "";
|
|
1695
1695
|
}
|
|
1696
|
-
function t(
|
|
1697
|
-
return
|
|
1696
|
+
function t(i, s) {
|
|
1697
|
+
return s ? `${s}${o(i)}` : i;
|
|
1698
1698
|
}
|
|
1699
|
-
function r(
|
|
1700
|
-
return
|
|
1699
|
+
function r(i, s) {
|
|
1700
|
+
return s ? `-${s.toLowerCase()}-${i}` : i;
|
|
1701
1701
|
}
|
|
1702
|
-
function i
|
|
1703
|
-
let
|
|
1704
|
-
for (let
|
|
1705
|
-
d ? (
|
|
1706
|
-
return
|
|
1702
|
+
function o(i) {
|
|
1703
|
+
let s = "", d = !0;
|
|
1704
|
+
for (let b = 0; b < i.length; b++)
|
|
1705
|
+
d ? (s += i[b].toUpperCase(), d = !1) : i[b] === "-" ? d = !0 : s += i[b];
|
|
1706
|
+
return s;
|
|
1707
1707
|
}
|
|
1708
|
-
return
|
|
1708
|
+
return oe.default = n(), oe;
|
|
1709
1709
|
}
|
|
1710
1710
|
var et;
|
|
1711
1711
|
function Re() {
|
|
1712
1712
|
if (et) return B;
|
|
1713
1713
|
et = 1, Object.defineProperty(B, "__esModule", {
|
|
1714
1714
|
value: !0
|
|
1715
|
-
}), B.addClassName = c, B.addEvent =
|
|
1716
|
-
var e = we(), n = t(
|
|
1715
|
+
}), B.addClassName = c, B.addEvent = s, B.addUserSelectStyles = N, B.createCSSTransform = y, B.createSVGTransform = D, B.getTouch = v, B.getTouchIdentifier = w, B.getTranslation = p, B.innerHeight = h, B.innerWidth = u, B.matchesSelector = o, B.matchesSelectorAndParentsTo = i, B.offsetXYFromParent = m, B.outerHeight = b, B.outerWidth = g, B.removeClassName = E, B.removeEvent = d, B.scheduleRemoveUserSelectStyles = C;
|
|
1716
|
+
var e = we(), n = t(gn());
|
|
1717
1717
|
function t(l, f) {
|
|
1718
|
-
if (typeof WeakMap == "function") var
|
|
1719
|
-
return (t = function(
|
|
1720
|
-
if (!
|
|
1721
|
-
var z, X, Q = { __proto__: null, default:
|
|
1722
|
-
if (
|
|
1723
|
-
if (z =
|
|
1724
|
-
if (z.has(
|
|
1725
|
-
z.set(
|
|
1718
|
+
if (typeof WeakMap == "function") var M = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakMap();
|
|
1719
|
+
return (t = function(I, T) {
|
|
1720
|
+
if (!T && I && I.__esModule) return I;
|
|
1721
|
+
var z, X, Q = { __proto__: null, default: I };
|
|
1722
|
+
if (I === null || typeof I != "object" && typeof I != "function") return Q;
|
|
1723
|
+
if (z = T ? $ : M) {
|
|
1724
|
+
if (z.has(I)) return z.get(I);
|
|
1725
|
+
z.set(I, Q);
|
|
1726
1726
|
}
|
|
1727
|
-
for (const
|
|
1727
|
+
for (const K in I) K !== "default" && {}.hasOwnProperty.call(I, K) && ((X = (z = Object.defineProperty) && Object.getOwnPropertyDescriptor(I, K)) && (X.get || X.set) ? z(Q, K, X) : Q[K] = I[K]);
|
|
1728
1728
|
return Q;
|
|
1729
1729
|
})(l, f);
|
|
1730
1730
|
}
|
|
1731
1731
|
let r = "";
|
|
1732
|
-
function
|
|
1733
|
-
return r || (r = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(
|
|
1734
|
-
return (0, e.isFunction)(l[
|
|
1732
|
+
function o(l, f) {
|
|
1733
|
+
return r || (r = (0, e.findInArray)(["matches", "webkitMatchesSelector", "mozMatchesSelector", "msMatchesSelector", "oMatchesSelector"], function(M) {
|
|
1734
|
+
return (0, e.isFunction)(l[M]);
|
|
1735
1735
|
})), (0, e.isFunction)(l[r]) ? l[r](f) : !1;
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1737
|
+
function i(l, f, M) {
|
|
1738
1738
|
let $ = l;
|
|
1739
1739
|
do {
|
|
1740
|
-
if (
|
|
1741
|
-
if ($ ===
|
|
1740
|
+
if (o($, f)) return !0;
|
|
1741
|
+
if ($ === M) return !1;
|
|
1742
1742
|
$ = $.parentNode;
|
|
1743
1743
|
} while ($);
|
|
1744
1744
|
return !1;
|
|
1745
1745
|
}
|
|
1746
|
-
function
|
|
1746
|
+
function s(l, f, M, $) {
|
|
1747
1747
|
if (!l) return;
|
|
1748
|
-
const
|
|
1748
|
+
const I = {
|
|
1749
1749
|
capture: !0,
|
|
1750
1750
|
...$
|
|
1751
1751
|
};
|
|
1752
|
-
l.addEventListener ? l.addEventListener(f,
|
|
1752
|
+
l.addEventListener ? l.addEventListener(f, M, I) : l.attachEvent ? l.attachEvent("on" + f, M) : l["on" + f] = M;
|
|
1753
1753
|
}
|
|
1754
|
-
function d(l, f,
|
|
1754
|
+
function d(l, f, M, $) {
|
|
1755
1755
|
if (!l) return;
|
|
1756
|
-
const
|
|
1756
|
+
const I = {
|
|
1757
1757
|
capture: !0,
|
|
1758
1758
|
...$
|
|
1759
1759
|
};
|
|
1760
|
-
l.removeEventListener ? l.removeEventListener(f,
|
|
1760
|
+
l.removeEventListener ? l.removeEventListener(f, M, I) : l.detachEvent ? l.detachEvent("on" + f, M) : l["on" + f] = null;
|
|
1761
1761
|
}
|
|
1762
|
-
function
|
|
1762
|
+
function b(l) {
|
|
1763
1763
|
let f = l.clientHeight;
|
|
1764
|
-
const
|
|
1765
|
-
return f += (0, e.int)(
|
|
1764
|
+
const M = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1765
|
+
return f += (0, e.int)(M.borderTopWidth), f += (0, e.int)(M.borderBottomWidth), f;
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1767
|
+
function g(l) {
|
|
1768
1768
|
let f = l.clientWidth;
|
|
1769
|
-
const
|
|
1770
|
-
return f += (0, e.int)(
|
|
1769
|
+
const M = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1770
|
+
return f += (0, e.int)(M.borderLeftWidth), f += (0, e.int)(M.borderRightWidth), f;
|
|
1771
1771
|
}
|
|
1772
1772
|
function h(l) {
|
|
1773
1773
|
let f = l.clientHeight;
|
|
1774
|
-
const
|
|
1775
|
-
return f -= (0, e.int)(
|
|
1774
|
+
const M = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1775
|
+
return f -= (0, e.int)(M.paddingTop), f -= (0, e.int)(M.paddingBottom), f;
|
|
1776
1776
|
}
|
|
1777
1777
|
function u(l) {
|
|
1778
1778
|
let f = l.clientWidth;
|
|
1779
|
-
const
|
|
1780
|
-
return f -= (0, e.int)(
|
|
1779
|
+
const M = l.ownerDocument.defaultView.getComputedStyle(l);
|
|
1780
|
+
return f -= (0, e.int)(M.paddingLeft), f -= (0, e.int)(M.paddingRight), f;
|
|
1781
1781
|
}
|
|
1782
|
-
function
|
|
1783
|
-
const
|
|
1782
|
+
function m(l, f, M) {
|
|
1783
|
+
const I = f === f.ownerDocument.body ? {
|
|
1784
1784
|
left: 0,
|
|
1785
1785
|
top: 0
|
|
1786
|
-
} : f.getBoundingClientRect(),
|
|
1786
|
+
} : f.getBoundingClientRect(), T = (l.clientX + f.scrollLeft - I.left) / M, z = (l.clientY + f.scrollTop - I.top) / M;
|
|
1787
1787
|
return {
|
|
1788
|
-
x:
|
|
1788
|
+
x: T,
|
|
1789
1789
|
y: z
|
|
1790
1790
|
};
|
|
1791
1791
|
}
|
|
1792
|
-
function
|
|
1793
|
-
const
|
|
1792
|
+
function y(l, f) {
|
|
1793
|
+
const M = p(l, f, "px");
|
|
1794
1794
|
return {
|
|
1795
|
-
[(0, n.browserPrefixToKey)("transform", n.default)]:
|
|
1795
|
+
[(0, n.browserPrefixToKey)("transform", n.default)]: M
|
|
1796
1796
|
};
|
|
1797
1797
|
}
|
|
1798
|
-
function
|
|
1799
|
-
return
|
|
1798
|
+
function D(l, f) {
|
|
1799
|
+
return p(l, f, "");
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1801
|
+
function p(l, f, M) {
|
|
1802
1802
|
let {
|
|
1803
1803
|
x: $,
|
|
1804
|
-
y:
|
|
1805
|
-
} = l,
|
|
1804
|
+
y: I
|
|
1805
|
+
} = l, T = `translate(${$}${M},${I}${M})`;
|
|
1806
1806
|
if (f) {
|
|
1807
|
-
const z = `${typeof f.x == "string" ? f.x : f.x +
|
|
1808
|
-
|
|
1807
|
+
const z = `${typeof f.x == "string" ? f.x : f.x + M}`, X = `${typeof f.y == "string" ? f.y : f.y + M}`;
|
|
1808
|
+
T = `translate(${z}, ${X})` + T;
|
|
1809
1809
|
}
|
|
1810
|
-
return
|
|
1810
|
+
return T;
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1813
|
-
return l.targetTouches && (0, e.findInArray)(l.targetTouches, (
|
|
1812
|
+
function v(l, f) {
|
|
1813
|
+
return l.targetTouches && (0, e.findInArray)(l.targetTouches, (M) => f === M.identifier) || l.changedTouches && (0, e.findInArray)(l.changedTouches, (M) => f === M.identifier);
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1815
|
+
function w(l) {
|
|
1816
1816
|
if (l.targetTouches && l.targetTouches[0]) return l.targetTouches[0].identifier;
|
|
1817
1817
|
if (l.changedTouches && l.changedTouches[0]) return l.changedTouches[0].identifier;
|
|
1818
1818
|
}
|
|
@@ -1823,15 +1823,15 @@ function Re() {
|
|
|
1823
1823
|
`, f.innerHTML += `.react-draggable-transparent-selection *::selection {all: inherit;}
|
|
1824
1824
|
`, l.getElementsByTagName("head")[0].appendChild(f)), l.body && c(l.body, "react-draggable-transparent-selection");
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1826
|
+
function C(l) {
|
|
1827
1827
|
window.requestAnimationFrame ? window.requestAnimationFrame(() => {
|
|
1828
|
-
|
|
1829
|
-
}) :
|
|
1828
|
+
S(l);
|
|
1829
|
+
}) : S(l);
|
|
1830
1830
|
}
|
|
1831
|
-
function
|
|
1831
|
+
function S(l) {
|
|
1832
1832
|
if (l)
|
|
1833
1833
|
try {
|
|
1834
|
-
if (l.body &&
|
|
1834
|
+
if (l.body && E(l.body, "react-draggable-transparent-selection"), l.selection)
|
|
1835
1835
|
l.selection.empty();
|
|
1836
1836
|
else {
|
|
1837
1837
|
const f = (l.defaultView || window).getSelection();
|
|
@@ -1843,91 +1843,91 @@ function Re() {
|
|
|
1843
1843
|
function c(l, f) {
|
|
1844
1844
|
l.classList ? l.classList.add(f) : l.className.match(new RegExp(`(?:^|\\s)${f}(?!\\S)`)) || (l.className += ` ${f}`);
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function E(l, f) {
|
|
1847
1847
|
l.classList ? l.classList.remove(f) : l.className = l.className.replace(new RegExp(`(?:^|\\s)${f}(?!\\S)`, "g"), "");
|
|
1848
1848
|
}
|
|
1849
1849
|
return B;
|
|
1850
1850
|
}
|
|
1851
1851
|
var ne = {}, tt;
|
|
1852
|
-
function
|
|
1852
|
+
function xt() {
|
|
1853
1853
|
if (tt) return ne;
|
|
1854
1854
|
tt = 1, Object.defineProperty(ne, "__esModule", {
|
|
1855
1855
|
value: !0
|
|
1856
|
-
}), ne.canDragX =
|
|
1856
|
+
}), ne.canDragX = o, ne.canDragY = i, ne.createCoreData = d, ne.createDraggableData = b, ne.getBoundPosition = t, ne.getControlPosition = s, ne.snapToGrid = r;
|
|
1857
1857
|
var e = we(), n = Re();
|
|
1858
|
-
function t(u,
|
|
1859
|
-
if (!u.props.bounds) return [
|
|
1858
|
+
function t(u, m, y) {
|
|
1859
|
+
if (!u.props.bounds) return [m, y];
|
|
1860
1860
|
let {
|
|
1861
|
-
bounds:
|
|
1861
|
+
bounds: D
|
|
1862
1862
|
} = u.props;
|
|
1863
|
-
|
|
1864
|
-
const
|
|
1865
|
-
if (typeof
|
|
1863
|
+
D = typeof D == "string" ? D : g(D);
|
|
1864
|
+
const p = h(u);
|
|
1865
|
+
if (typeof D == "string") {
|
|
1866
1866
|
const {
|
|
1867
|
-
ownerDocument:
|
|
1868
|
-
} =
|
|
1867
|
+
ownerDocument: v
|
|
1868
|
+
} = p, w = v.defaultView;
|
|
1869
1869
|
let N;
|
|
1870
|
-
if (
|
|
1871
|
-
throw new Error('Bounds selector "' +
|
|
1872
|
-
const
|
|
1873
|
-
|
|
1874
|
-
left: -
|
|
1875
|
-
top: -
|
|
1876
|
-
right: (0, n.innerWidth)(
|
|
1877
|
-
bottom: (0, n.innerHeight)(
|
|
1870
|
+
if (D === "parent" ? N = p.parentNode : N = p.getRootNode().querySelector(D), !(N instanceof w.HTMLElement))
|
|
1871
|
+
throw new Error('Bounds selector "' + D + '" could not find an element.');
|
|
1872
|
+
const C = N, S = w.getComputedStyle(p), c = w.getComputedStyle(C);
|
|
1873
|
+
D = {
|
|
1874
|
+
left: -p.offsetLeft + (0, e.int)(c.paddingLeft) + (0, e.int)(S.marginLeft),
|
|
1875
|
+
top: -p.offsetTop + (0, e.int)(c.paddingTop) + (0, e.int)(S.marginTop),
|
|
1876
|
+
right: (0, n.innerWidth)(C) - (0, n.outerWidth)(p) - p.offsetLeft + (0, e.int)(c.paddingRight) - (0, e.int)(S.marginRight),
|
|
1877
|
+
bottom: (0, n.innerHeight)(C) - (0, n.outerHeight)(p) - p.offsetTop + (0, e.int)(c.paddingBottom) - (0, e.int)(S.marginBottom)
|
|
1878
1878
|
};
|
|
1879
1879
|
}
|
|
1880
|
-
return (0, e.isNum)(
|
|
1880
|
+
return (0, e.isNum)(D.right) && (m = Math.min(m, D.right)), (0, e.isNum)(D.bottom) && (y = Math.min(y, D.bottom)), (0, e.isNum)(D.left) && (m = Math.max(m, D.left)), (0, e.isNum)(D.top) && (y = Math.max(y, D.top)), [m, y];
|
|
1881
1881
|
}
|
|
1882
|
-
function r(u,
|
|
1883
|
-
const
|
|
1884
|
-
return [
|
|
1882
|
+
function r(u, m, y) {
|
|
1883
|
+
const D = Math.round(m / u[0]) * u[0], p = Math.round(y / u[1]) * u[1];
|
|
1884
|
+
return [D, p];
|
|
1885
1885
|
}
|
|
1886
|
-
function
|
|
1886
|
+
function o(u) {
|
|
1887
1887
|
return u.props.axis === "both" || u.props.axis === "x";
|
|
1888
1888
|
}
|
|
1889
|
-
function
|
|
1889
|
+
function i(u) {
|
|
1890
1890
|
return u.props.axis === "both" || u.props.axis === "y";
|
|
1891
1891
|
}
|
|
1892
|
-
function
|
|
1893
|
-
const
|
|
1894
|
-
if (typeof
|
|
1895
|
-
const
|
|
1896
|
-
return (0, n.offsetXYFromParent)(
|
|
1892
|
+
function s(u, m, y) {
|
|
1893
|
+
const D = typeof m == "number" ? (0, n.getTouch)(u, m) : null;
|
|
1894
|
+
if (typeof m == "number" && !D) return null;
|
|
1895
|
+
const p = h(y), v = y.props.offsetParent || p.offsetParent || p.ownerDocument.body;
|
|
1896
|
+
return (0, n.offsetXYFromParent)(D || u, v, y.props.scale);
|
|
1897
1897
|
}
|
|
1898
|
-
function d(u,
|
|
1899
|
-
const
|
|
1900
|
-
return
|
|
1901
|
-
node:
|
|
1898
|
+
function d(u, m, y) {
|
|
1899
|
+
const D = !(0, e.isNum)(u.lastX), p = h(u);
|
|
1900
|
+
return D ? {
|
|
1901
|
+
node: p,
|
|
1902
1902
|
deltaX: 0,
|
|
1903
1903
|
deltaY: 0,
|
|
1904
|
-
lastX:
|
|
1905
|
-
lastY:
|
|
1906
|
-
x:
|
|
1907
|
-
y
|
|
1904
|
+
lastX: m,
|
|
1905
|
+
lastY: y,
|
|
1906
|
+
x: m,
|
|
1907
|
+
y
|
|
1908
1908
|
} : {
|
|
1909
|
-
node:
|
|
1910
|
-
deltaX:
|
|
1911
|
-
deltaY:
|
|
1909
|
+
node: p,
|
|
1910
|
+
deltaX: m - u.lastX,
|
|
1911
|
+
deltaY: y - u.lastY,
|
|
1912
1912
|
lastX: u.lastX,
|
|
1913
1913
|
lastY: u.lastY,
|
|
1914
|
-
x:
|
|
1915
|
-
y
|
|
1914
|
+
x: m,
|
|
1915
|
+
y
|
|
1916
1916
|
};
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1919
|
-
const
|
|
1918
|
+
function b(u, m) {
|
|
1919
|
+
const y = u.props.scale;
|
|
1920
1920
|
return {
|
|
1921
|
-
node:
|
|
1922
|
-
x: u.state.x +
|
|
1923
|
-
y: u.state.y +
|
|
1924
|
-
deltaX:
|
|
1925
|
-
deltaY:
|
|
1921
|
+
node: m.node,
|
|
1922
|
+
x: u.state.x + m.deltaX / y,
|
|
1923
|
+
y: u.state.y + m.deltaY / y,
|
|
1924
|
+
deltaX: m.deltaX / y,
|
|
1925
|
+
deltaY: m.deltaY / y,
|
|
1926
1926
|
lastX: u.state.x,
|
|
1927
1927
|
lastY: u.state.y
|
|
1928
1928
|
};
|
|
1929
1929
|
}
|
|
1930
|
-
function
|
|
1930
|
+
function g(u) {
|
|
1931
1931
|
return {
|
|
1932
1932
|
left: u.left,
|
|
1933
1933
|
top: u.top,
|
|
@@ -1936,65 +1936,65 @@ function bt() {
|
|
|
1936
1936
|
};
|
|
1937
1937
|
}
|
|
1938
1938
|
function h(u) {
|
|
1939
|
-
const
|
|
1940
|
-
if (!
|
|
1939
|
+
const m = u.findDOMNode();
|
|
1940
|
+
if (!m)
|
|
1941
1941
|
throw new Error("<DraggableCore>: Unmounted during event!");
|
|
1942
|
-
return
|
|
1942
|
+
return m;
|
|
1943
1943
|
}
|
|
1944
1944
|
return ne;
|
|
1945
1945
|
}
|
|
1946
|
-
var he = {},
|
|
1947
|
-
function
|
|
1948
|
-
if (nt) return
|
|
1949
|
-
nt = 1, Object.defineProperty(
|
|
1946
|
+
var he = {}, ve = {}, nt;
|
|
1947
|
+
function wt() {
|
|
1948
|
+
if (nt) return ve;
|
|
1949
|
+
nt = 1, Object.defineProperty(ve, "__esModule", {
|
|
1950
1950
|
value: !0
|
|
1951
|
-
}),
|
|
1951
|
+
}), ve.default = e;
|
|
1952
1952
|
function e() {
|
|
1953
1953
|
}
|
|
1954
|
-
return
|
|
1954
|
+
return ve;
|
|
1955
1955
|
}
|
|
1956
1956
|
var rt;
|
|
1957
|
-
function
|
|
1957
|
+
function mn() {
|
|
1958
1958
|
if (rt) return he;
|
|
1959
1959
|
rt = 1, Object.defineProperty(he, "__esModule", {
|
|
1960
1960
|
value: !0
|
|
1961
1961
|
}), he.default = void 0;
|
|
1962
|
-
var e =
|
|
1963
|
-
function d(
|
|
1964
|
-
return
|
|
1965
|
-
}
|
|
1966
|
-
function
|
|
1967
|
-
if (typeof WeakMap == "function") var
|
|
1968
|
-
return (
|
|
1969
|
-
if (!
|
|
1970
|
-
var c,
|
|
1971
|
-
if (
|
|
1972
|
-
if (c =
|
|
1973
|
-
if (c.has(
|
|
1974
|
-
c.set(
|
|
1962
|
+
var e = b(ae), n = d(/* @__PURE__ */ vt()), t = d(lt), r = Re(), o = xt(), i = we(), s = d(wt());
|
|
1963
|
+
function d(p) {
|
|
1964
|
+
return p && p.__esModule ? p : { default: p };
|
|
1965
|
+
}
|
|
1966
|
+
function b(p, v) {
|
|
1967
|
+
if (typeof WeakMap == "function") var w = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap();
|
|
1968
|
+
return (b = function(C, S) {
|
|
1969
|
+
if (!S && C && C.__esModule) return C;
|
|
1970
|
+
var c, E, l = { __proto__: null, default: C };
|
|
1971
|
+
if (C === null || typeof C != "object" && typeof C != "function") return l;
|
|
1972
|
+
if (c = S ? N : w) {
|
|
1973
|
+
if (c.has(C)) return c.get(C);
|
|
1974
|
+
c.set(C, l);
|
|
1975
1975
|
}
|
|
1976
|
-
for (const f in
|
|
1976
|
+
for (const f in C) f !== "default" && {}.hasOwnProperty.call(C, f) && ((E = (c = Object.defineProperty) && Object.getOwnPropertyDescriptor(C, f)) && (E.get || E.set) ? c(l, f, E) : l[f] = C[f]);
|
|
1977
1977
|
return l;
|
|
1978
|
-
})(
|
|
1978
|
+
})(p, v);
|
|
1979
1979
|
}
|
|
1980
|
-
function
|
|
1981
|
-
return (
|
|
1980
|
+
function g(p, v, w) {
|
|
1981
|
+
return (v = h(v)) in p ? Object.defineProperty(p, v, { value: w, enumerable: !0, configurable: !0, writable: !0 }) : p[v] = w, p;
|
|
1982
1982
|
}
|
|
1983
|
-
function h(
|
|
1984
|
-
var
|
|
1985
|
-
return typeof
|
|
1983
|
+
function h(p) {
|
|
1984
|
+
var v = u(p, "string");
|
|
1985
|
+
return typeof v == "symbol" ? v : v + "";
|
|
1986
1986
|
}
|
|
1987
|
-
function u(
|
|
1988
|
-
if (typeof
|
|
1989
|
-
var
|
|
1990
|
-
if (
|
|
1991
|
-
var N =
|
|
1987
|
+
function u(p, v) {
|
|
1988
|
+
if (typeof p != "object" || !p) return p;
|
|
1989
|
+
var w = p[Symbol.toPrimitive];
|
|
1990
|
+
if (w !== void 0) {
|
|
1991
|
+
var N = w.call(p, v);
|
|
1992
1992
|
if (typeof N != "object") return N;
|
|
1993
1993
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1994
1994
|
}
|
|
1995
|
-
return (
|
|
1995
|
+
return (v === "string" ? String : Number)(p);
|
|
1996
1996
|
}
|
|
1997
|
-
const
|
|
1997
|
+
const m = {
|
|
1998
1998
|
touch: {
|
|
1999
1999
|
start: "touchstart",
|
|
2000
2000
|
move: "touchmove",
|
|
@@ -2006,42 +2006,42 @@ function gn() {
|
|
|
2006
2006
|
stop: "mouseup"
|
|
2007
2007
|
}
|
|
2008
2008
|
};
|
|
2009
|
-
let
|
|
2009
|
+
let y = m.mouse, D = class extends e.Component {
|
|
2010
2010
|
constructor() {
|
|
2011
|
-
super(...arguments),
|
|
2012
|
-
if (this.props.onMouseDown(
|
|
2013
|
-
const
|
|
2014
|
-
if (!
|
|
2011
|
+
super(...arguments), g(this, "dragging", !1), g(this, "lastX", NaN), g(this, "lastY", NaN), g(this, "touchIdentifier", null), g(this, "mounted", !1), g(this, "handleDragStart", (v) => {
|
|
2012
|
+
if (this.props.onMouseDown(v), !this.props.allowAnyClick && typeof v.button == "number" && v.button !== 0) return !1;
|
|
2013
|
+
const w = this.findDOMNode();
|
|
2014
|
+
if (!w || !w.ownerDocument || !w.ownerDocument.body)
|
|
2015
2015
|
throw new Error("<DraggableCore> not mounted on DragStart!");
|
|
2016
2016
|
const {
|
|
2017
2017
|
ownerDocument: N
|
|
2018
|
-
} =
|
|
2019
|
-
if (this.props.disabled || !(
|
|
2018
|
+
} = w;
|
|
2019
|
+
if (this.props.disabled || !(v.target instanceof N.defaultView.Node) || this.props.handle && !(0, r.matchesSelectorAndParentsTo)(v.target, this.props.handle, w) || this.props.cancel && (0, r.matchesSelectorAndParentsTo)(v.target, this.props.cancel, w))
|
|
2020
2020
|
return;
|
|
2021
|
-
|
|
2022
|
-
const
|
|
2023
|
-
this.touchIdentifier =
|
|
2024
|
-
const
|
|
2025
|
-
if (
|
|
2021
|
+
v.type === "touchstart" && !this.props.allowMobileScroll && v.preventDefault();
|
|
2022
|
+
const C = (0, r.getTouchIdentifier)(v);
|
|
2023
|
+
this.touchIdentifier = C;
|
|
2024
|
+
const S = (0, o.getControlPosition)(v, C, this);
|
|
2025
|
+
if (S == null) return;
|
|
2026
2026
|
const {
|
|
2027
2027
|
x: c,
|
|
2028
|
-
y:
|
|
2029
|
-
} =
|
|
2030
|
-
(0,
|
|
2031
|
-
}),
|
|
2032
|
-
const
|
|
2033
|
-
if (
|
|
2028
|
+
y: E
|
|
2029
|
+
} = S, l = (0, o.createCoreData)(this, c, E);
|
|
2030
|
+
(0, s.default)("DraggableCore: handleDragStart: %j", l), (0, s.default)("calling", this.props.onStart), !(this.props.onStart(v, l) === !1 || this.mounted === !1) && (this.props.enableUserSelectHack && (0, r.addUserSelectStyles)(N), this.dragging = !0, this.lastX = c, this.lastY = E, (0, r.addEvent)(N, y.move, this.handleDrag), (0, r.addEvent)(N, y.stop, this.handleDragStop));
|
|
2031
|
+
}), g(this, "handleDrag", (v) => {
|
|
2032
|
+
const w = (0, o.getControlPosition)(v, this.touchIdentifier, this);
|
|
2033
|
+
if (w == null) return;
|
|
2034
2034
|
let {
|
|
2035
2035
|
x: N,
|
|
2036
|
-
y:
|
|
2037
|
-
} =
|
|
2036
|
+
y: C
|
|
2037
|
+
} = w;
|
|
2038
2038
|
if (Array.isArray(this.props.grid)) {
|
|
2039
|
-
let
|
|
2040
|
-
if ([
|
|
2041
|
-
N = this.lastX +
|
|
2039
|
+
let E = N - this.lastX, l = C - this.lastY;
|
|
2040
|
+
if ([E, l] = (0, o.snapToGrid)(this.props.grid, E, l), !E && !l) return;
|
|
2041
|
+
N = this.lastX + E, C = this.lastY + l;
|
|
2042
2042
|
}
|
|
2043
|
-
const
|
|
2044
|
-
if ((0,
|
|
2043
|
+
const S = (0, o.createCoreData)(this, N, C);
|
|
2044
|
+
if ((0, s.default)("DraggableCore: handleDrag: %j", S), this.props.onDrag(v, S) === !1 || this.mounted === !1) {
|
|
2045
2045
|
try {
|
|
2046
2046
|
this.handleDragStop(new MouseEvent("mouseup"));
|
|
2047
2047
|
} catch {
|
|
@@ -2050,42 +2050,42 @@ function gn() {
|
|
|
2050
2050
|
}
|
|
2051
2051
|
return;
|
|
2052
2052
|
}
|
|
2053
|
-
this.lastX = N, this.lastY =
|
|
2054
|
-
}),
|
|
2053
|
+
this.lastX = N, this.lastY = C;
|
|
2054
|
+
}), g(this, "handleDragStop", (v) => {
|
|
2055
2055
|
if (!this.dragging) return;
|
|
2056
|
-
const
|
|
2057
|
-
if (
|
|
2056
|
+
const w = (0, o.getControlPosition)(v, this.touchIdentifier, this);
|
|
2057
|
+
if (w == null) return;
|
|
2058
2058
|
let {
|
|
2059
2059
|
x: N,
|
|
2060
|
-
y:
|
|
2061
|
-
} =
|
|
2060
|
+
y: C
|
|
2061
|
+
} = w;
|
|
2062
2062
|
if (Array.isArray(this.props.grid)) {
|
|
2063
|
-
let l = N - this.lastX || 0, f =
|
|
2064
|
-
[l, f] = (0,
|
|
2063
|
+
let l = N - this.lastX || 0, f = C - this.lastY || 0;
|
|
2064
|
+
[l, f] = (0, o.snapToGrid)(this.props.grid, l, f), N = this.lastX + l, C = this.lastY + f;
|
|
2065
2065
|
}
|
|
2066
|
-
const
|
|
2067
|
-
if (this.props.onStop(
|
|
2068
|
-
const
|
|
2069
|
-
|
|
2070
|
-
}),
|
|
2066
|
+
const S = (0, o.createCoreData)(this, N, C);
|
|
2067
|
+
if (this.props.onStop(v, S) === !1 || this.mounted === !1) return !1;
|
|
2068
|
+
const E = this.findDOMNode();
|
|
2069
|
+
E && this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(E.ownerDocument), (0, s.default)("DraggableCore: handleDragStop: %j", S), this.dragging = !1, this.lastX = NaN, this.lastY = NaN, E && ((0, s.default)("DraggableCore: Removing handlers"), (0, r.removeEvent)(E.ownerDocument, y.move, this.handleDrag), (0, r.removeEvent)(E.ownerDocument, y.stop, this.handleDragStop));
|
|
2070
|
+
}), g(this, "onMouseDown", (v) => (y = m.mouse, this.handleDragStart(v))), g(this, "onMouseUp", (v) => (y = m.mouse, this.handleDragStop(v))), g(this, "onTouchStart", (v) => (y = m.touch, this.handleDragStart(v))), g(this, "onTouchEnd", (v) => (y = m.touch, this.handleDragStop(v)));
|
|
2071
2071
|
}
|
|
2072
2072
|
componentDidMount() {
|
|
2073
2073
|
this.mounted = !0;
|
|
2074
|
-
const
|
|
2075
|
-
|
|
2074
|
+
const v = this.findDOMNode();
|
|
2075
|
+
v && (0, r.addEvent)(v, m.touch.start, this.onTouchStart, {
|
|
2076
2076
|
passive: !1
|
|
2077
2077
|
});
|
|
2078
2078
|
}
|
|
2079
2079
|
componentWillUnmount() {
|
|
2080
2080
|
this.mounted = !1;
|
|
2081
|
-
const
|
|
2082
|
-
if (
|
|
2081
|
+
const v = this.findDOMNode();
|
|
2082
|
+
if (v) {
|
|
2083
2083
|
const {
|
|
2084
|
-
ownerDocument:
|
|
2085
|
-
} =
|
|
2086
|
-
(0, r.removeEvent)(
|
|
2084
|
+
ownerDocument: w
|
|
2085
|
+
} = v;
|
|
2086
|
+
(0, r.removeEvent)(w, m.mouse.move, this.handleDrag), (0, r.removeEvent)(w, m.touch.move, this.handleDrag), (0, r.removeEvent)(w, m.mouse.stop, this.handleDragStop), (0, r.removeEvent)(w, m.touch.stop, this.handleDragStop), (0, r.removeEvent)(v, m.touch.start, this.onTouchStart, {
|
|
2087
2087
|
passive: !1
|
|
2088
|
-
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(
|
|
2088
|
+
}), this.props.enableUserSelectHack && (0, r.scheduleRemoveUserSelectStyles)(w);
|
|
2089
2089
|
}
|
|
2090
2090
|
}
|
|
2091
2091
|
// React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
|
|
@@ -2106,7 +2106,7 @@ function gn() {
|
|
|
2106
2106
|
});
|
|
2107
2107
|
}
|
|
2108
2108
|
};
|
|
2109
|
-
return he.default =
|
|
2109
|
+
return he.default = D, g(D, "displayName", "DraggableCore"), g(D, "propTypes", {
|
|
2110
2110
|
/**
|
|
2111
2111
|
* `allowAnyClick` allows dragging using any mouse button.
|
|
2112
2112
|
* By default, we only accept the left button.
|
|
@@ -2138,8 +2138,8 @@ function gn() {
|
|
|
2138
2138
|
* `offsetParent`, if set, uses the passed DOM node to compute drag offsets
|
|
2139
2139
|
* instead of using the parent node.
|
|
2140
2140
|
*/
|
|
2141
|
-
offsetParent: function(
|
|
2142
|
-
if (v
|
|
2141
|
+
offsetParent: function(p, v) {
|
|
2142
|
+
if (p[v] && p[v].nodeType !== 1)
|
|
2143
2143
|
throw new Error("Draggable's offsetParent must be a DOM Node.");
|
|
2144
2144
|
},
|
|
2145
2145
|
/**
|
|
@@ -2233,10 +2233,10 @@ function gn() {
|
|
|
2233
2233
|
/**
|
|
2234
2234
|
* These properties should be defined on the child, not here.
|
|
2235
2235
|
*/
|
|
2236
|
-
className:
|
|
2237
|
-
style:
|
|
2238
|
-
transform:
|
|
2239
|
-
}),
|
|
2236
|
+
className: i.dontSetMe,
|
|
2237
|
+
style: i.dontSetMe,
|
|
2238
|
+
transform: i.dontSetMe
|
|
2239
|
+
}), g(D, "defaultProps", {
|
|
2240
2240
|
allowAnyClick: !1,
|
|
2241
2241
|
// by default only accept left click
|
|
2242
2242
|
allowMobileScroll: !1,
|
|
@@ -2253,92 +2253,92 @@ function gn() {
|
|
|
2253
2253
|
scale: 1
|
|
2254
2254
|
}), he;
|
|
2255
2255
|
}
|
|
2256
|
-
var
|
|
2257
|
-
function
|
|
2258
|
-
return
|
|
2256
|
+
var it;
|
|
2257
|
+
function pn() {
|
|
2258
|
+
return it || (it = 1, (function(e) {
|
|
2259
2259
|
Object.defineProperty(e, "__esModule", {
|
|
2260
2260
|
value: !0
|
|
2261
2261
|
}), Object.defineProperty(e, "DraggableCore", {
|
|
2262
2262
|
enumerable: !0,
|
|
2263
2263
|
get: function() {
|
|
2264
|
-
return
|
|
2264
|
+
return b.default;
|
|
2265
2265
|
}
|
|
2266
2266
|
}), e.default = void 0;
|
|
2267
|
-
var n = u(
|
|
2268
|
-
function h(
|
|
2269
|
-
return
|
|
2270
|
-
}
|
|
2271
|
-
function u(
|
|
2272
|
-
if (typeof WeakMap == "function") var
|
|
2273
|
-
return (u = function(c,
|
|
2274
|
-
if (!
|
|
2275
|
-
var l, f,
|
|
2276
|
-
if (c === null || typeof c != "object" && typeof c != "function") return
|
|
2277
|
-
if (l =
|
|
2267
|
+
var n = u(ae), t = h(/* @__PURE__ */ vt()), r = h(lt), o = hn(), i = Re(), s = xt(), d = we(), b = h(mn()), g = h(wt());
|
|
2268
|
+
function h(w) {
|
|
2269
|
+
return w && w.__esModule ? w : { default: w };
|
|
2270
|
+
}
|
|
2271
|
+
function u(w, N) {
|
|
2272
|
+
if (typeof WeakMap == "function") var C = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap();
|
|
2273
|
+
return (u = function(c, E) {
|
|
2274
|
+
if (!E && c && c.__esModule) return c;
|
|
2275
|
+
var l, f, M = { __proto__: null, default: c };
|
|
2276
|
+
if (c === null || typeof c != "object" && typeof c != "function") return M;
|
|
2277
|
+
if (l = E ? S : C) {
|
|
2278
2278
|
if (l.has(c)) return l.get(c);
|
|
2279
|
-
l.set(c,
|
|
2279
|
+
l.set(c, M);
|
|
2280
2280
|
}
|
|
2281
|
-
for (const $ in c) $ !== "default" && {}.hasOwnProperty.call(c, $) && ((f = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(c, $)) && (f.get || f.set) ? l(
|
|
2282
|
-
return
|
|
2283
|
-
})(
|
|
2281
|
+
for (const $ in c) $ !== "default" && {}.hasOwnProperty.call(c, $) && ((f = (l = Object.defineProperty) && Object.getOwnPropertyDescriptor(c, $)) && (f.get || f.set) ? l(M, $, f) : M[$] = c[$]);
|
|
2282
|
+
return M;
|
|
2283
|
+
})(w, N);
|
|
2284
2284
|
}
|
|
2285
|
-
function
|
|
2286
|
-
return
|
|
2285
|
+
function m() {
|
|
2286
|
+
return m = Object.assign ? Object.assign.bind() : function(w) {
|
|
2287
2287
|
for (var N = 1; N < arguments.length; N++) {
|
|
2288
|
-
var
|
|
2289
|
-
for (var
|
|
2288
|
+
var C = arguments[N];
|
|
2289
|
+
for (var S in C) ({}).hasOwnProperty.call(C, S) && (w[S] = C[S]);
|
|
2290
2290
|
}
|
|
2291
|
-
return
|
|
2292
|
-
},
|
|
2291
|
+
return w;
|
|
2292
|
+
}, m.apply(null, arguments);
|
|
2293
2293
|
}
|
|
2294
|
-
function
|
|
2295
|
-
return (N =
|
|
2294
|
+
function y(w, N, C) {
|
|
2295
|
+
return (N = D(N)) in w ? Object.defineProperty(w, N, { value: C, enumerable: !0, configurable: !0, writable: !0 }) : w[N] = C, w;
|
|
2296
2296
|
}
|
|
2297
|
-
function w
|
|
2298
|
-
var N =
|
|
2297
|
+
function D(w) {
|
|
2298
|
+
var N = p(w, "string");
|
|
2299
2299
|
return typeof N == "symbol" ? N : N + "";
|
|
2300
2300
|
}
|
|
2301
|
-
function
|
|
2302
|
-
if (typeof
|
|
2303
|
-
var
|
|
2304
|
-
if (
|
|
2305
|
-
var
|
|
2306
|
-
if (typeof
|
|
2301
|
+
function p(w, N) {
|
|
2302
|
+
if (typeof w != "object" || !w) return w;
|
|
2303
|
+
var C = w[Symbol.toPrimitive];
|
|
2304
|
+
if (C !== void 0) {
|
|
2305
|
+
var S = C.call(w, N);
|
|
2306
|
+
if (typeof S != "object") return S;
|
|
2307
2307
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
2308
2308
|
}
|
|
2309
|
-
return (N === "string" ? String : Number)(
|
|
2309
|
+
return (N === "string" ? String : Number)(w);
|
|
2310
2310
|
}
|
|
2311
|
-
class
|
|
2311
|
+
class v extends n.Component {
|
|
2312
2312
|
// React 16.3+
|
|
2313
2313
|
// Arity (props, state)
|
|
2314
|
-
static getDerivedStateFromProps(N,
|
|
2314
|
+
static getDerivedStateFromProps(N, C) {
|
|
2315
2315
|
let {
|
|
2316
|
-
position:
|
|
2316
|
+
position: S
|
|
2317
2317
|
} = N, {
|
|
2318
2318
|
prevPropsPosition: c
|
|
2319
|
-
} =
|
|
2320
|
-
return
|
|
2321
|
-
position:
|
|
2319
|
+
} = C;
|
|
2320
|
+
return S && (!c || S.x !== c.x || S.y !== c.y) ? ((0, g.default)("Draggable: getDerivedStateFromProps %j", {
|
|
2321
|
+
position: S,
|
|
2322
2322
|
prevPropsPosition: c
|
|
2323
2323
|
}), {
|
|
2324
|
-
x:
|
|
2325
|
-
y:
|
|
2324
|
+
x: S.x,
|
|
2325
|
+
y: S.y,
|
|
2326
2326
|
prevPropsPosition: {
|
|
2327
|
-
...
|
|
2327
|
+
...S
|
|
2328
2328
|
}
|
|
2329
2329
|
}) : null;
|
|
2330
2330
|
}
|
|
2331
2331
|
constructor(N) {
|
|
2332
|
-
super(N),
|
|
2333
|
-
if ((0,
|
|
2332
|
+
super(N), y(this, "onDragStart", (C, S) => {
|
|
2333
|
+
if ((0, g.default)("Draggable: onDragStart: %j", S), this.props.onStart(C, (0, s.createDraggableData)(this, S)) === !1) return !1;
|
|
2334
2334
|
this.setState({
|
|
2335
2335
|
dragging: !0,
|
|
2336
2336
|
dragged: !0
|
|
2337
2337
|
});
|
|
2338
|
-
}),
|
|
2338
|
+
}), y(this, "onDrag", (C, S) => {
|
|
2339
2339
|
if (!this.state.dragging) return !1;
|
|
2340
|
-
(0,
|
|
2341
|
-
const c = (0,
|
|
2340
|
+
(0, g.default)("Draggable: onDrag: %j", S);
|
|
2341
|
+
const c = (0, s.createDraggableData)(this, S), E = {
|
|
2342
2342
|
x: c.x,
|
|
2343
2343
|
y: c.y,
|
|
2344
2344
|
slackX: 0,
|
|
@@ -2347,18 +2347,18 @@ function mn() {
|
|
|
2347
2347
|
if (this.props.bounds) {
|
|
2348
2348
|
const {
|
|
2349
2349
|
x: f,
|
|
2350
|
-
y:
|
|
2351
|
-
} =
|
|
2352
|
-
|
|
2353
|
-
const [$,
|
|
2354
|
-
|
|
2350
|
+
y: M
|
|
2351
|
+
} = E;
|
|
2352
|
+
E.x += this.state.slackX, E.y += this.state.slackY;
|
|
2353
|
+
const [$, I] = (0, s.getBoundPosition)(this, E.x, E.y);
|
|
2354
|
+
E.x = $, E.y = I, E.slackX = this.state.slackX + (f - E.x), E.slackY = this.state.slackY + (M - E.y), c.x = E.x, c.y = E.y, c.deltaX = E.x - this.state.x, c.deltaY = E.y - this.state.y;
|
|
2355
2355
|
}
|
|
2356
|
-
if (this.props.onDrag(
|
|
2357
|
-
this.setState(
|
|
2358
|
-
}),
|
|
2359
|
-
if (!this.state.dragging || this.props.onStop(
|
|
2360
|
-
(0,
|
|
2361
|
-
const
|
|
2356
|
+
if (this.props.onDrag(C, c) === !1) return !1;
|
|
2357
|
+
this.setState(E);
|
|
2358
|
+
}), y(this, "onDragStop", (C, S) => {
|
|
2359
|
+
if (!this.state.dragging || this.props.onStop(C, (0, s.createDraggableData)(this, S)) === !1) return !1;
|
|
2360
|
+
(0, g.default)("Draggable: onDragStop: %j", S);
|
|
2361
|
+
const E = {
|
|
2362
2362
|
dragging: !1,
|
|
2363
2363
|
slackX: 0,
|
|
2364
2364
|
slackY: 0
|
|
@@ -2366,11 +2366,11 @@ function mn() {
|
|
|
2366
2366
|
if (!!this.props.position) {
|
|
2367
2367
|
const {
|
|
2368
2368
|
x: f,
|
|
2369
|
-
y:
|
|
2369
|
+
y: M
|
|
2370
2370
|
} = this.props.position;
|
|
2371
|
-
|
|
2371
|
+
E.x = f, E.y = M;
|
|
2372
2372
|
}
|
|
2373
|
-
this.setState(
|
|
2373
|
+
this.setState(E);
|
|
2374
2374
|
}), this.state = {
|
|
2375
2375
|
// Whether or not we are currently dragging.
|
|
2376
2376
|
dragging: !1,
|
|
@@ -2407,46 +2407,46 @@ function mn() {
|
|
|
2407
2407
|
render() {
|
|
2408
2408
|
const {
|
|
2409
2409
|
axis: N,
|
|
2410
|
-
bounds:
|
|
2411
|
-
children:
|
|
2410
|
+
bounds: C,
|
|
2411
|
+
children: S,
|
|
2412
2412
|
defaultPosition: c,
|
|
2413
|
-
defaultClassName:
|
|
2413
|
+
defaultClassName: E,
|
|
2414
2414
|
defaultClassNameDragging: l,
|
|
2415
2415
|
defaultClassNameDragged: f,
|
|
2416
|
-
position:
|
|
2416
|
+
position: M,
|
|
2417
2417
|
positionOffset: $,
|
|
2418
|
-
scale:
|
|
2419
|
-
...
|
|
2418
|
+
scale: I,
|
|
2419
|
+
...T
|
|
2420
2420
|
} = this.props;
|
|
2421
2421
|
let z = {}, X = null;
|
|
2422
|
-
const
|
|
2422
|
+
const K = !!!M || this.state.dragging, ee = M || c, se = {
|
|
2423
2423
|
// Set left if horizontal drag is enabled
|
|
2424
|
-
x: (0,
|
|
2424
|
+
x: (0, s.canDragX)(this) && K ? this.state.x : ee.x,
|
|
2425
2425
|
// Set top if vertical drag is enabled
|
|
2426
|
-
y: (0,
|
|
2426
|
+
y: (0, s.canDragY)(this) && K ? this.state.y : ee.y
|
|
2427
2427
|
};
|
|
2428
|
-
this.state.isElementSVG ? X = (0,
|
|
2429
|
-
const de = (0,
|
|
2428
|
+
this.state.isElementSVG ? X = (0, i.createSVGTransform)(se, $) : z = (0, i.createCSSTransform)(se, $);
|
|
2429
|
+
const de = (0, o.clsx)(S.props.className || "", E, {
|
|
2430
2430
|
[l]: this.state.dragging,
|
|
2431
2431
|
[f]: this.state.dragged
|
|
2432
2432
|
});
|
|
2433
|
-
return /* @__PURE__ */ n.createElement(
|
|
2433
|
+
return /* @__PURE__ */ n.createElement(b.default, m({}, T, {
|
|
2434
2434
|
onStart: this.onDragStart,
|
|
2435
2435
|
onDrag: this.onDrag,
|
|
2436
2436
|
onStop: this.onDragStop
|
|
2437
|
-
}), /* @__PURE__ */ n.cloneElement(n.Children.only(
|
|
2437
|
+
}), /* @__PURE__ */ n.cloneElement(n.Children.only(S), {
|
|
2438
2438
|
className: de,
|
|
2439
2439
|
style: {
|
|
2440
|
-
...
|
|
2440
|
+
...S.props.style,
|
|
2441
2441
|
...z
|
|
2442
2442
|
},
|
|
2443
2443
|
transform: X
|
|
2444
2444
|
}));
|
|
2445
2445
|
}
|
|
2446
2446
|
}
|
|
2447
|
-
e.default =
|
|
2447
|
+
e.default = v, y(v, "displayName", "Draggable"), y(v, "propTypes", {
|
|
2448
2448
|
// Accepts all props <DraggableCore> accepts.
|
|
2449
|
-
...
|
|
2449
|
+
...b.default.propTypes,
|
|
2450
2450
|
/**
|
|
2451
2451
|
* `axis` determines which axis the draggable can move.
|
|
2452
2452
|
*
|
|
@@ -2551,8 +2551,8 @@ function mn() {
|
|
|
2551
2551
|
className: d.dontSetMe,
|
|
2552
2552
|
style: d.dontSetMe,
|
|
2553
2553
|
transform: d.dontSetMe
|
|
2554
|
-
}),
|
|
2555
|
-
...
|
|
2554
|
+
}), y(v, "defaultProps", {
|
|
2555
|
+
...b.default.defaultProps,
|
|
2556
2556
|
axis: "both",
|
|
2557
2557
|
bounds: !1,
|
|
2558
2558
|
defaultClassName: "react-draggable",
|
|
@@ -2566,18 +2566,18 @@ function mn() {
|
|
|
2566
2566
|
});
|
|
2567
2567
|
})(De)), De;
|
|
2568
2568
|
}
|
|
2569
|
-
var
|
|
2570
|
-
function
|
|
2571
|
-
if (
|
|
2572
|
-
|
|
2569
|
+
var ot;
|
|
2570
|
+
function yn() {
|
|
2571
|
+
if (ot) return fe.exports;
|
|
2572
|
+
ot = 1;
|
|
2573
2573
|
const {
|
|
2574
2574
|
default: e,
|
|
2575
2575
|
DraggableCore: n
|
|
2576
|
-
} =
|
|
2576
|
+
} = pn();
|
|
2577
2577
|
return fe.exports = e, fe.exports.default = e, fe.exports.DraggableCore = n, fe.exports;
|
|
2578
2578
|
}
|
|
2579
|
-
var
|
|
2580
|
-
const vn = /* @__PURE__ */
|
|
2579
|
+
var bn = yn();
|
|
2580
|
+
const vn = /* @__PURE__ */ an(bn), xn = ce((e, n) => {
|
|
2581
2581
|
const r = {
|
|
2582
2582
|
...{
|
|
2583
2583
|
// 1. Take it out of the document flow
|
|
@@ -2595,31 +2595,31 @@ const vn = /* @__PURE__ */ on(yn), bn = ce((e, n) => {
|
|
|
2595
2595
|
boxShadow: "rgba(0, 0, 0, 0.5) 7px 7px 10px 0px"
|
|
2596
2596
|
},
|
|
2597
2597
|
...e.style || {}
|
|
2598
|
-
},
|
|
2598
|
+
}, o = e.testId || "not-set", i = e.className || "panel", s = Ct(null);
|
|
2599
2599
|
return (
|
|
2600
2600
|
// 3. Pass the internal ref to the Draggable component via 'nodeRef'
|
|
2601
|
-
/* @__PURE__ */
|
|
2601
|
+
/* @__PURE__ */ a(
|
|
2602
2602
|
vn,
|
|
2603
2603
|
{
|
|
2604
|
-
nodeRef:
|
|
2605
|
-
"data-testid":
|
|
2604
|
+
nodeRef: s,
|
|
2605
|
+
"data-testid": o,
|
|
2606
2606
|
axis: "both",
|
|
2607
2607
|
handle: ".handle",
|
|
2608
|
-
onStart: (
|
|
2608
|
+
onStart: (g, h) => {
|
|
2609
2609
|
e.onDraggingChange?.(!0);
|
|
2610
2610
|
},
|
|
2611
|
-
onStop: (
|
|
2611
|
+
onStop: (g, h) => {
|
|
2612
2612
|
setTimeout(() => {
|
|
2613
2613
|
e.onDraggingChange?.(!1);
|
|
2614
2614
|
}, 100);
|
|
2615
2615
|
},
|
|
2616
|
-
children: /* @__PURE__ */
|
|
2616
|
+
children: /* @__PURE__ */ a("div", { ref: s, className: i, style: r, children: e.children })
|
|
2617
2617
|
}
|
|
2618
2618
|
)
|
|
2619
2619
|
);
|
|
2620
2620
|
});
|
|
2621
|
-
function
|
|
2622
|
-
return /* @__PURE__ */
|
|
2621
|
+
function tr({ children: e }) {
|
|
2622
|
+
return /* @__PURE__ */ a(
|
|
2623
2623
|
"div",
|
|
2624
2624
|
{
|
|
2625
2625
|
className: "w-full h-full flex-1 flex flex-col gap-2 items-end justify-end content-end",
|
|
@@ -2630,49 +2630,49 @@ function er({ children: e }) {
|
|
|
2630
2630
|
}
|
|
2631
2631
|
);
|
|
2632
2632
|
}
|
|
2633
|
-
function
|
|
2634
|
-
return /* @__PURE__ */
|
|
2633
|
+
function nr({ children: e }) {
|
|
2634
|
+
return /* @__PURE__ */ a("div", { className: "w-full flex flex-col items-end", children: e });
|
|
2635
2635
|
}
|
|
2636
|
-
const
|
|
2636
|
+
const rr = (e) => {
|
|
2637
2637
|
console.warn("showToast TODO", e);
|
|
2638
|
-
},
|
|
2639
|
-
let t =
|
|
2640
|
-
const r = e.responsiveGrid || !1,
|
|
2638
|
+
}, wn = (e) => e < 0.8 ? 1 : e <= 1 ? 0 : e > 1 ? -1 : 0, ir = ce((e, n) => {
|
|
2639
|
+
let t = ct(Number(e.zoomScale || 0));
|
|
2640
|
+
const r = e.responsiveGrid || !1, o = e.isEditing || !1, i = {
|
|
2641
2641
|
"--bwj-dashboard-transform-scale": t,
|
|
2642
|
-
"--bwj-dashboard-add-cols":
|
|
2643
|
-
},
|
|
2642
|
+
"--bwj-dashboard-add-cols": wn(t)
|
|
2643
|
+
}, s = Z(
|
|
2644
2644
|
"dashboard-main-grid w-full",
|
|
2645
|
-
|
|
2645
|
+
o ? "editing" : "",
|
|
2646
2646
|
r ? "responsive-grid" : "",
|
|
2647
|
-
`border border-dashed ${
|
|
2647
|
+
`border border-dashed ${o ? "border-primary border-opacity-50" : "border-transparent"}`
|
|
2648
2648
|
);
|
|
2649
|
-
return /* @__PURE__ */
|
|
2650
|
-
}), $e = "size-5",
|
|
2649
|
+
return /* @__PURE__ */ a("div", { className: s, style: i, children: e.children });
|
|
2650
|
+
}), $e = "size-5", Cn = (e, n) => {
|
|
2651
2651
|
const t = e.hideTitle && !e.isEditing, r = e.noBorder;
|
|
2652
|
-
let
|
|
2653
|
-
r ?
|
|
2654
|
-
const
|
|
2652
|
+
let o = `dashboard-widget ${e.isEditing ? "editing" : ""} border border-solid`;
|
|
2653
|
+
r ? o = `${o} border-transparent border-opacity-0` : (e.borderCssClasses || "").trim().length > 0 ? o = `${o} ${e.borderCssClasses}` : o = `${o} border-card-invert border-opacity-20`, e.noShadow && (o = `${o} no-shadow`), e.noPadding && (o = `${o} no-padding p-0`), (e.backgroundCssClasses || "").trim().length > 0 ? o = `${o} ${e.backgroundCssClasses}` : o = `${o} bg-card content-card`, ["large", "xlarge"].indexOf(e.size || "") > -1 && (o = `${o} ${e.size}-widget`);
|
|
2654
|
+
const i = () => {
|
|
2655
2655
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey, e.parentWidgetKey);
|
|
2656
|
-
},
|
|
2657
|
-
e.onMoveClick && e.widgetKey && e.onMoveClick(
|
|
2656
|
+
}, s = (b) => {
|
|
2657
|
+
e.onMoveClick && e.widgetKey && e.onMoveClick(b, e.widgetKey, e.parentWidgetKey);
|
|
2658
2658
|
}, d = Z(
|
|
2659
2659
|
"widget-header",
|
|
2660
2660
|
t ? "hidden" : "flex items-center justify-between border-b border-solid border-card-invert",
|
|
2661
2661
|
t ? "border-opacity-0" : "border-opacity-20"
|
|
2662
2662
|
);
|
|
2663
|
-
return /* @__PURE__ */ W("div", { className:
|
|
2663
|
+
return /* @__PURE__ */ W("div", { className: o, children: [
|
|
2664
2664
|
/* @__PURE__ */ W("div", { className: d, children: [
|
|
2665
2665
|
/* @__PURE__ */ W("div", { className: "widget-title-wrapper w-full flex flex-row gap-2 items-center justify-between", children: [
|
|
2666
2666
|
/* @__PURE__ */ W("h2", { className: "widget-title", children: [
|
|
2667
2667
|
e.title,
|
|
2668
2668
|
" "
|
|
2669
2669
|
] }),
|
|
2670
|
-
/* @__PURE__ */
|
|
2670
|
+
/* @__PURE__ */ a("div", {})
|
|
2671
2671
|
] }),
|
|
2672
|
-
/* @__PURE__ */
|
|
2673
|
-
/* @__PURE__ */
|
|
2672
|
+
/* @__PURE__ */ a("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ W("div", { className: "actions-inner", children: [
|
|
2673
|
+
/* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("span", { className: "hidden", children: "Widget" }) }),
|
|
2674
2674
|
/* @__PURE__ */ W("div", { className: "actions-buttons-container", children: [
|
|
2675
|
-
/* @__PURE__ */
|
|
2675
|
+
/* @__PURE__ */ a(
|
|
2676
2676
|
J,
|
|
2677
2677
|
{
|
|
2678
2678
|
"data-testid": `move-widget-left_${e.title}`,
|
|
@@ -2682,11 +2682,11 @@ const nr = (e) => {
|
|
|
2682
2682
|
placement: "top",
|
|
2683
2683
|
title: `${e.index < 1 ? "Already at min position" : "Move Widget to the left/up"}`
|
|
2684
2684
|
},
|
|
2685
|
-
onClick: () =>
|
|
2686
|
-
children: /* @__PURE__ */
|
|
2685
|
+
onClick: () => s(-1),
|
|
2686
|
+
children: /* @__PURE__ */ a(ft, { className: $e })
|
|
2687
2687
|
}
|
|
2688
2688
|
),
|
|
2689
|
-
/* @__PURE__ */
|
|
2689
|
+
/* @__PURE__ */ a(
|
|
2690
2690
|
J,
|
|
2691
2691
|
{
|
|
2692
2692
|
"data-testid": `move-widget-right_${e.title}`,
|
|
@@ -2696,11 +2696,11 @@ const nr = (e) => {
|
|
|
2696
2696
|
placement: "top",
|
|
2697
2697
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Widget to the right/down"}`
|
|
2698
2698
|
},
|
|
2699
|
-
onClick: () =>
|
|
2700
|
-
children: /* @__PURE__ */
|
|
2699
|
+
onClick: () => s(1),
|
|
2700
|
+
children: /* @__PURE__ */ a(ht, { className: $e })
|
|
2701
2701
|
}
|
|
2702
2702
|
),
|
|
2703
|
-
/* @__PURE__ */
|
|
2703
|
+
/* @__PURE__ */ a(
|
|
2704
2704
|
J,
|
|
2705
2705
|
{
|
|
2706
2706
|
"data-testid": `remove-container_${e.title}`,
|
|
@@ -2709,141 +2709,188 @@ const nr = (e) => {
|
|
|
2709
2709
|
placement: "top",
|
|
2710
2710
|
title: "Remove Widget"
|
|
2711
2711
|
},
|
|
2712
|
-
onClick: () =>
|
|
2713
|
-
children: /* @__PURE__ */
|
|
2712
|
+
onClick: () => i(),
|
|
2713
|
+
children: /* @__PURE__ */ a(gt, { className: $e })
|
|
2714
2714
|
}
|
|
2715
2715
|
)
|
|
2716
2716
|
] })
|
|
2717
2717
|
] }) })
|
|
2718
2718
|
] }),
|
|
2719
|
-
/* @__PURE__ */
|
|
2719
|
+
/* @__PURE__ */ a("div", { className: "widget-inner", children: e.children })
|
|
2720
2720
|
] });
|
|
2721
|
-
},
|
|
2722
|
-
|
|
2723
|
-
return
|
|
2724
|
-
|
|
2725
|
-
|
|
2721
|
+
}, at = ce(Cn), Sn = (e, n) => {
|
|
2722
|
+
const t = (i) => i.replace(/[^0-9.]/g, ""), r = t(e).split(".").map(Number), o = t(n).split(".").map(Number);
|
|
2723
|
+
return !(r[0] !== o[0] || r[1] < o[1]);
|
|
2724
|
+
};
|
|
2725
|
+
function Dn(e) {
|
|
2726
|
+
return /* @__PURE__ */ a("div", { className: "dashboard-widget", children: /* @__PURE__ */ W("div", { className: "absolute inset-0 bg-black flex flex-col items-center justify-center text-center", children: [
|
|
2727
|
+
/* @__PURE__ */ a("div", { className: "w-full absolute opacity-100 text-primary", children: e.title }),
|
|
2728
|
+
/* @__PURE__ */ a("div", { className: "animate-ping rounded-full h-32 w-32 border-8 border-white" })
|
|
2726
2729
|
] }) });
|
|
2727
2730
|
}
|
|
2728
|
-
function
|
|
2731
|
+
function Nn({
|
|
2729
2732
|
index: e,
|
|
2730
2733
|
maxIndex: n,
|
|
2731
2734
|
widgetKey: t,
|
|
2732
2735
|
parentWidgetKey: r,
|
|
2733
|
-
targetContainerKey:
|
|
2734
|
-
childWidgetsConfig:
|
|
2735
|
-
widgetCatalog:
|
|
2736
|
+
targetContainerKey: o,
|
|
2737
|
+
childWidgetsConfig: i,
|
|
2738
|
+
widgetCatalog: s,
|
|
2736
2739
|
isEditing: d,
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
+
// for additional props passed to all widget from the dashboard through the DynamicWidgetLoader:
|
|
2741
|
+
extraProps: b,
|
|
2742
|
+
onRemoveClick: g,
|
|
2743
|
+
onMoveClick: h,
|
|
2744
|
+
selectContainer: u
|
|
2740
2745
|
}) {
|
|
2741
|
-
const
|
|
2742
|
-
if (!
|
|
2743
|
-
return /* @__PURE__ */
|
|
2746
|
+
const m = `${t}`.split("_"), y = m.length > 1, D = y ? m[0] : t, p = s.get(D);
|
|
2747
|
+
if (!p)
|
|
2748
|
+
return /* @__PURE__ */ a("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2744
2749
|
"Widget not found in catalog: ",
|
|
2745
|
-
|
|
2750
|
+
D
|
|
2746
2751
|
] }) });
|
|
2747
|
-
let v = null,
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2752
|
+
let v = null, w = !1;
|
|
2753
|
+
const N = !!p.isContainer, C = y ? mt(t) : "", S = N ? (i || []).filter((l) => l.parentWidgetKey === t) : [], c = {
|
|
2754
|
+
index: e,
|
|
2755
|
+
maxIndex: n,
|
|
2756
|
+
widgetKey: t,
|
|
2757
|
+
parentWidgetKey: r,
|
|
2758
|
+
isEditing: d,
|
|
2759
|
+
extraProps: b,
|
|
2760
|
+
title: y ? C : p.title,
|
|
2761
|
+
onRemoveClick: g,
|
|
2762
|
+
onMoveClick: h
|
|
2763
|
+
};
|
|
2764
|
+
if (p.component ? (v = p.component, w = !1) : p.loader && (w = !0, v = st(() => {
|
|
2765
|
+
if (!p) return null;
|
|
2766
|
+
const l = typeof __HOST_REACT_VERSION__ < "u" ? __HOST_REACT_VERSION__ : "19.2.3", f = p.meta?.externalDependencies || [], M = f.find(($) => $.startsWith("react@"));
|
|
2767
|
+
if (M) {
|
|
2768
|
+
const $ = M.split("@")[1];
|
|
2769
|
+
if (!Sn(l, $))
|
|
2770
|
+
return ae.lazy(async () => ({
|
|
2771
|
+
default: () => /* @__PURE__ */ a(at, { ...c, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2772
|
+
/* @__PURE__ */ W("p", { className: "font-bold", children: [
|
|
2773
|
+
'Failed to load "',
|
|
2774
|
+
t,
|
|
2775
|
+
'"'
|
|
2776
|
+
] }),
|
|
2777
|
+
/* @__PURE__ */ W("p", { className: "text-xs italic", children: [
|
|
2778
|
+
"The remote plugin is unavailable or incompatible.",
|
|
2779
|
+
/* @__PURE__ */ W("p", { className: "font-bold text-sm", children: [
|
|
2780
|
+
"Version Mismatch: ",
|
|
2781
|
+
t
|
|
2782
|
+
] }),
|
|
2783
|
+
/* @__PURE__ */ W("p", { className: "text-xs", children: [
|
|
2784
|
+
"Widget requires ",
|
|
2785
|
+
/* @__PURE__ */ W("strong", { children: [
|
|
2786
|
+
"React ",
|
|
2787
|
+
$
|
|
2788
|
+
] }),
|
|
2789
|
+
". Host is running",
|
|
2790
|
+
" ",
|
|
2791
|
+
/* @__PURE__ */ a("strong", { children: l }),
|
|
2792
|
+
"."
|
|
2793
|
+
] })
|
|
2794
|
+
] }),
|
|
2795
|
+
/* @__PURE__ */ W("div", { className: "flex flex-col mt-3", children: [
|
|
2796
|
+
/* @__PURE__ */ a("h5", { children: "Externals:" }),
|
|
2797
|
+
/* @__PURE__ */ a("dl", { className: "ml-2 flex flex-col text-xs", children: f.map((I, T) => /* @__PURE__ */ W("dd", { children: [
|
|
2798
|
+
"- ",
|
|
2799
|
+
I
|
|
2800
|
+
] }, T)) })
|
|
2801
|
+
] })
|
|
2802
|
+
] }) })
|
|
2803
|
+
}));
|
|
2804
|
+
}
|
|
2805
|
+
if (p.component)
|
|
2806
|
+
return p.component;
|
|
2807
|
+
if (p.loader) {
|
|
2808
|
+
const $ = async () => {
|
|
2754
2809
|
try {
|
|
2755
|
-
return await
|
|
2756
|
-
} catch (
|
|
2757
|
-
return console.error(`CDN Load Failure for ${t}:`,
|
|
2758
|
-
default: () => /* @__PURE__ */
|
|
2810
|
+
return await p.loader();
|
|
2811
|
+
} catch (I) {
|
|
2812
|
+
return console.error(`CDN Load Failure for ${t}:`, I), {
|
|
2813
|
+
default: () => /* @__PURE__ */ a(at, { ...c, children: /* @__PURE__ */ W("div", { className: "p-4 border border-dashed border-danger", children: [
|
|
2759
2814
|
/* @__PURE__ */ W("p", { className: "font-bold", children: [
|
|
2760
2815
|
'Failed to load "',
|
|
2761
2816
|
t,
|
|
2762
2817
|
'"'
|
|
2763
2818
|
] }),
|
|
2764
|
-
/* @__PURE__ */
|
|
2765
|
-
/* @__PURE__ */
|
|
2819
|
+
/* @__PURE__ */ a("p", { className: "text-xs italic", children: "The remote plugin is unavailable or incompatible." }),
|
|
2820
|
+
/* @__PURE__ */ a("pre", { className: "text-xs overflow-hidden", children: JSON.stringify(p.meta || {}, null, 2) })
|
|
2766
2821
|
] }) })
|
|
2767
2822
|
};
|
|
2768
2823
|
}
|
|
2769
2824
|
};
|
|
2770
|
-
return
|
|
2825
|
+
return ae.lazy($);
|
|
2771
2826
|
}
|
|
2772
2827
|
return null;
|
|
2773
|
-
}, [
|
|
2774
|
-
return /* @__PURE__ */
|
|
2828
|
+
}, [p, t])), !v)
|
|
2829
|
+
return /* @__PURE__ */ a("div", { className: "flex", children: /* @__PURE__ */ W("p", { children: [
|
|
2775
2830
|
"Widget definition incomplete: ",
|
|
2776
|
-
|
|
2831
|
+
D
|
|
2777
2832
|
] }) });
|
|
2778
|
-
const
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
widgetKey: t,
|
|
2782
|
-
parentWidgetKey: r,
|
|
2783
|
-
isEditing: d,
|
|
2784
|
-
title: g ? N : w.title,
|
|
2785
|
-
onRemoveClick: y,
|
|
2786
|
-
onMoveClick: m
|
|
2787
|
-
}, c = C ? {
|
|
2788
|
-
highlight: i === t,
|
|
2789
|
-
selectContainer: h,
|
|
2833
|
+
const E = N ? {
|
|
2834
|
+
highlight: o === t,
|
|
2835
|
+
selectContainer: u,
|
|
2790
2836
|
// The children prop is the recursive call back to DynamicWidgetLoader
|
|
2791
|
-
children: S.map((l, f) => /* @__PURE__ */
|
|
2792
|
-
|
|
2837
|
+
children: S.map((l, f) => /* @__PURE__ */ a(
|
|
2838
|
+
Nn,
|
|
2793
2839
|
{
|
|
2794
2840
|
index: f,
|
|
2795
2841
|
maxIndex: S.length - 1,
|
|
2796
2842
|
widgetKey: l.widgetKey,
|
|
2797
2843
|
parentWidgetKey: l.parentWidgetKey,
|
|
2798
|
-
widgetCatalog:
|
|
2844
|
+
widgetCatalog: s,
|
|
2799
2845
|
isEditing: d,
|
|
2800
|
-
|
|
2801
|
-
|
|
2846
|
+
extraProps: b,
|
|
2847
|
+
onRemoveClick: g,
|
|
2848
|
+
onMoveClick: h
|
|
2802
2849
|
},
|
|
2803
2850
|
`${l.widgetKey}_${f}`
|
|
2804
2851
|
))
|
|
2805
|
-
} : {}
|
|
2806
|
-
return
|
|
2852
|
+
} : {};
|
|
2853
|
+
return w ? /* @__PURE__ */ a(St, { fallback: /* @__PURE__ */ a(Dn, { title: `Loading ${p.title}` }), children: /* @__PURE__ */ a(v, { ...c, ...E }) }) : /* @__PURE__ */ a(v, { ...c, ...E });
|
|
2807
2854
|
}
|
|
2808
2855
|
const xe = "size-5";
|
|
2809
2856
|
function ke(e) {
|
|
2810
|
-
const n = e.highlight || !1, t = e.direction || "column", r = e.children.length > 0,
|
|
2811
|
-
let d = n ? "border-transparent" :
|
|
2812
|
-
const
|
|
2813
|
-
let
|
|
2814
|
-
["large", "xlarge"].indexOf(e.size || "") > -1 && (
|
|
2857
|
+
const n = e.highlight || !1, t = e.direction || "column", r = e.children.length > 0, o = e.isEditing || !1;
|
|
2858
|
+
let d = n ? "border-transparent" : o && !r ? "border-card-invert" : "border-transparent";
|
|
2859
|
+
const b = ["large", "xlarge"].includes(e.size || "");
|
|
2860
|
+
let g = "";
|
|
2861
|
+
["large", "xlarge"].indexOf(e.size || "") > -1 && (g = `${e.size}-widget`);
|
|
2815
2862
|
let h = "";
|
|
2816
2863
|
t === "row" && !r ? h = "min-h-48" : t === "column" && !r && (h = "min-h-96");
|
|
2817
2864
|
let u = Z(
|
|
2818
2865
|
"dashboard-widget-container relative ",
|
|
2819
2866
|
r ? "" : "has-no-children",
|
|
2820
|
-
|
|
2867
|
+
o ? "editing" : "",
|
|
2821
2868
|
h,
|
|
2822
|
-
|
|
2823
|
-
|
|
2869
|
+
g,
|
|
2870
|
+
b ? "widget-container-grid" : "widget-container-flex",
|
|
2824
2871
|
`direction-${t}`,
|
|
2825
2872
|
`border ${d}`,
|
|
2826
2873
|
`${n ? "highlight-container" : ""} ${d}`
|
|
2827
|
-
),
|
|
2828
|
-
const
|
|
2874
|
+
), m = `widget-container-header direction-${t} flex items-center border-1 ${d}`;
|
|
2875
|
+
const y = () => {
|
|
2829
2876
|
e.onRemoveClick && e.widgetKey && e.onRemoveClick(e.widgetKey);
|
|
2830
|
-
},
|
|
2831
|
-
e.onMoveClick && e.widgetKey && e.onMoveClick(
|
|
2832
|
-
},
|
|
2877
|
+
}, D = (v) => {
|
|
2878
|
+
e.onMoveClick && e.widgetKey && e.onMoveClick(v, e.widgetKey, e.parentWidgetKey);
|
|
2879
|
+
}, p = () => {
|
|
2833
2880
|
e.selectContainer && e.widgetKey && e.selectContainer(e.widgetKey);
|
|
2834
2881
|
};
|
|
2835
2882
|
return /* @__PURE__ */ W("div", { "data-testid": `container_${e.widgetKey}`, className: u, children: [
|
|
2836
|
-
/* @__PURE__ */ W("div", { className:
|
|
2837
|
-
/* @__PURE__ */
|
|
2883
|
+
/* @__PURE__ */ W("div", { className: m, children: [
|
|
2884
|
+
/* @__PURE__ */ a(
|
|
2838
2885
|
"div",
|
|
2839
2886
|
{
|
|
2840
2887
|
className: "widget-title-wrapper w-full flex whitespace-nowrap",
|
|
2841
|
-
onClick:
|
|
2842
|
-
children: /* @__PURE__ */
|
|
2888
|
+
onClick: p,
|
|
2889
|
+
children: /* @__PURE__ */ a("span", { className: "text-sm font-semibold capitalize", children: e.title })
|
|
2843
2890
|
}
|
|
2844
2891
|
),
|
|
2845
|
-
/* @__PURE__ */
|
|
2846
|
-
/* @__PURE__ */
|
|
2892
|
+
/* @__PURE__ */ a("div", { "data-testid": "collapse-and-other-actions", children: /* @__PURE__ */ a("div", { className: "actions-inner", children: /* @__PURE__ */ W("div", { className: "actions-buttons-container", children: [
|
|
2893
|
+
/* @__PURE__ */ a(
|
|
2847
2894
|
J,
|
|
2848
2895
|
{
|
|
2849
2896
|
"data-testid": `open-widgets-catalog-from-container_${e.title}`,
|
|
@@ -2853,16 +2900,16 @@ function ke(e) {
|
|
|
2853
2900
|
placement: "top",
|
|
2854
2901
|
title: "Target this Container"
|
|
2855
2902
|
},
|
|
2856
|
-
onClick:
|
|
2857
|
-
children: /* @__PURE__ */
|
|
2858
|
-
|
|
2903
|
+
onClick: p,
|
|
2904
|
+
children: /* @__PURE__ */ a(
|
|
2905
|
+
tn,
|
|
2859
2906
|
{
|
|
2860
2907
|
className: `${xe} ${n ? "text-success" : "text-disabled"}`
|
|
2861
2908
|
}
|
|
2862
2909
|
)
|
|
2863
2910
|
}
|
|
2864
2911
|
),
|
|
2865
|
-
/* @__PURE__ */
|
|
2912
|
+
/* @__PURE__ */ a(
|
|
2866
2913
|
J,
|
|
2867
2914
|
{
|
|
2868
2915
|
"data-testid": `move-container-left_${e.title}`,
|
|
@@ -2872,11 +2919,11 @@ function ke(e) {
|
|
|
2872
2919
|
placement: "top",
|
|
2873
2920
|
title: `${e.index < 1 ? "Already at min position" : "Move Container to the left/up"}`
|
|
2874
2921
|
},
|
|
2875
|
-
onClick: () =>
|
|
2876
|
-
children: /* @__PURE__ */
|
|
2922
|
+
onClick: () => D(-1),
|
|
2923
|
+
children: /* @__PURE__ */ a(ft, { className: xe })
|
|
2877
2924
|
}
|
|
2878
2925
|
),
|
|
2879
|
-
/* @__PURE__ */
|
|
2926
|
+
/* @__PURE__ */ a(
|
|
2880
2927
|
J,
|
|
2881
2928
|
{
|
|
2882
2929
|
"data-testid": `move-container-right_${e.title}`,
|
|
@@ -2886,11 +2933,11 @@ function ke(e) {
|
|
|
2886
2933
|
placement: "top",
|
|
2887
2934
|
title: `${e.index >= e.maxIndex ? "Already at max position" : "Move Container to the right/down"}`
|
|
2888
2935
|
},
|
|
2889
|
-
onClick: () =>
|
|
2890
|
-
children: /* @__PURE__ */
|
|
2936
|
+
onClick: () => D(1),
|
|
2937
|
+
children: /* @__PURE__ */ a(ht, { className: xe })
|
|
2891
2938
|
}
|
|
2892
2939
|
),
|
|
2893
|
-
/* @__PURE__ */
|
|
2940
|
+
/* @__PURE__ */ a(
|
|
2894
2941
|
J,
|
|
2895
2942
|
{
|
|
2896
2943
|
"data-testid": `remove-container_${e.title}`,
|
|
@@ -2899,26 +2946,26 @@ function ke(e) {
|
|
|
2899
2946
|
placement: "top",
|
|
2900
2947
|
title: "Remove Container"
|
|
2901
2948
|
},
|
|
2902
|
-
onClick: () =>
|
|
2903
|
-
children: /* @__PURE__ */
|
|
2949
|
+
onClick: () => y(),
|
|
2950
|
+
children: /* @__PURE__ */ a(gt, { className: xe })
|
|
2904
2951
|
}
|
|
2905
2952
|
)
|
|
2906
2953
|
] }) }) })
|
|
2907
2954
|
] }),
|
|
2908
|
-
/* @__PURE__ */
|
|
2955
|
+
/* @__PURE__ */ a("div", { "data-testid": `childrenwrapper_${e.widgetKey}`, className: "widget-container-inner", children: e.children })
|
|
2909
2956
|
] });
|
|
2910
2957
|
}
|
|
2911
2958
|
function or(e) {
|
|
2912
2959
|
const { direction: n, ...t } = e;
|
|
2913
|
-
return /* @__PURE__ */
|
|
2960
|
+
return /* @__PURE__ */ a(ke, { direction: "column", ...t });
|
|
2914
2961
|
}
|
|
2915
|
-
function
|
|
2962
|
+
function ar(e) {
|
|
2916
2963
|
const { size: n, ...t } = e;
|
|
2917
|
-
return /* @__PURE__ */
|
|
2964
|
+
return /* @__PURE__ */ a(ke, { size: "large", ...t });
|
|
2918
2965
|
}
|
|
2919
|
-
function
|
|
2966
|
+
function sr(e) {
|
|
2920
2967
|
const { direction: n, ...t } = e;
|
|
2921
|
-
return /* @__PURE__ */
|
|
2968
|
+
return /* @__PURE__ */ a(ke, { direction: "row", ...t });
|
|
2922
2969
|
}
|
|
2923
2970
|
function We({
|
|
2924
2971
|
// widgetKey,
|
|
@@ -2926,68 +2973,68 @@ function We({
|
|
|
2926
2973
|
alreadyAdded: n,
|
|
2927
2974
|
addWidget: t
|
|
2928
2975
|
}) {
|
|
2929
|
-
const [r,
|
|
2976
|
+
const [r, o] = le(!1), i = e.icon || nn, s = e.displayName || "Unknown", d = e.description || "---", g = (e.noDuplicatedWidgets || !1) && n, h = Z(`
|
|
2930
2977
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2931
|
-
${
|
|
2978
|
+
${g ? "border-disabled fill-disabled text-disabled" : "cursor-pointer border-primary fill-danger hover:fill-primary content-primary hover:brightness-110"}
|
|
2932
2979
|
`);
|
|
2933
2980
|
return /* @__PURE__ */ W("div", { className: h, style: { width: "calc(100% - 1rem)" }, onClick: () => {
|
|
2934
|
-
|
|
2981
|
+
g || t();
|
|
2935
2982
|
}, children: [
|
|
2936
|
-
/* @__PURE__ */
|
|
2983
|
+
/* @__PURE__ */ a(i, { className: "" }),
|
|
2937
2984
|
/* @__PURE__ */ W("div", { className: "w-full", children: [
|
|
2938
2985
|
/* @__PURE__ */ W("div", { className: "flex flex-row items-center gap-2 justify-between", children: [
|
|
2939
|
-
/* @__PURE__ */
|
|
2940
|
-
/* @__PURE__ */
|
|
2986
|
+
/* @__PURE__ */ a("span", { className: "font-bold", children: s }),
|
|
2987
|
+
/* @__PURE__ */ a("div", { className: "text-xs", children: g ? "(Added)" : "" })
|
|
2941
2988
|
] }),
|
|
2942
2989
|
/* @__PURE__ */ W("div", { className: "flex flex-col text-xs", children: [
|
|
2943
|
-
/* @__PURE__ */
|
|
2944
|
-
/* @__PURE__ */
|
|
2945
|
-
|
|
2990
|
+
/* @__PURE__ */ a("div", { children: d }),
|
|
2991
|
+
/* @__PURE__ */ a("div", { className: "mt-3 cursor-pointer", onClick: (y) => {
|
|
2992
|
+
y.stopPropagation(), y.preventDefault(), o(!r);
|
|
2946
2993
|
}, children: "Externals:" }),
|
|
2947
|
-
r && /* @__PURE__ */
|
|
2994
|
+
r && /* @__PURE__ */ a("dl", { className: "ml-2 flex flex-col text-xs", children: e.externalDependencies.map((y, D) => /* @__PURE__ */ W("dd", { children: [
|
|
2948
2995
|
"- ",
|
|
2949
|
-
|
|
2950
|
-
] },
|
|
2996
|
+
y
|
|
2997
|
+
] }, D)) })
|
|
2951
2998
|
] })
|
|
2952
2999
|
] })
|
|
2953
3000
|
] });
|
|
2954
3001
|
}
|
|
2955
|
-
function
|
|
3002
|
+
function Tn({
|
|
2956
3003
|
item: e,
|
|
2957
3004
|
onSettingItemChanged: n
|
|
2958
3005
|
}) {
|
|
2959
|
-
const t = e.displayName || "Unknown", r = e.description || "---",
|
|
3006
|
+
const t = e.displayName || "Unknown", r = e.description || "---", o = Z(`
|
|
2960
3007
|
flex flex-row gap-2 p-2 rounded-md border text-sm bg-card content-card backdrop-opacity-100
|
|
2961
|
-
`),
|
|
2962
|
-
const
|
|
2963
|
-
if (["ArrowUp", "ArrowDown"].includes(
|
|
3008
|
+
`), i = (d) => {
|
|
3009
|
+
const b = d.key;
|
|
3010
|
+
if (["ArrowUp", "ArrowDown"].includes(b)) {
|
|
2964
3011
|
d.preventDefault();
|
|
2965
|
-
const
|
|
3012
|
+
const g = _t.incrementOrDecrementValue(
|
|
2966
3013
|
e,
|
|
2967
|
-
|
|
3014
|
+
b === "ArrowUp" ? 1 : -1
|
|
2968
3015
|
);
|
|
2969
|
-
n(
|
|
3016
|
+
n(g);
|
|
2970
3017
|
}
|
|
2971
|
-
},
|
|
3018
|
+
}, s = (d) => {
|
|
2972
3019
|
n({
|
|
2973
3020
|
...e,
|
|
2974
3021
|
value: d.target.value || ""
|
|
2975
3022
|
});
|
|
2976
3023
|
};
|
|
2977
|
-
return /* @__PURE__ */
|
|
2978
|
-
/* @__PURE__ */
|
|
2979
|
-
/* @__PURE__ */
|
|
3024
|
+
return /* @__PURE__ */ a("div", { className: o, style: { width: "calc(100% - 1rem)" }, children: /* @__PURE__ */ W("div", { className: "w-full", children: [
|
|
3025
|
+
/* @__PURE__ */ a("div", { className: "flex flex-row items-center gap-2 justify-between", children: /* @__PURE__ */ a("span", { className: "font-bold", children: t }) }),
|
|
3026
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-2 text-xs", children: /* @__PURE__ */ a("div", { children: r }) }),
|
|
2980
3027
|
/* @__PURE__ */ W("div", { children: [
|
|
2981
3028
|
"Value:",
|
|
2982
|
-
/* @__PURE__ */
|
|
2983
|
-
|
|
3029
|
+
/* @__PURE__ */ a(
|
|
3030
|
+
pt,
|
|
2984
3031
|
{
|
|
2985
3032
|
label: "Filter...",
|
|
2986
3033
|
size: "small",
|
|
2987
3034
|
className: "w-full",
|
|
2988
3035
|
value: e.value,
|
|
2989
|
-
onChange:
|
|
2990
|
-
onKeyDown:
|
|
3036
|
+
onChange: s,
|
|
3037
|
+
onKeyDown: i
|
|
2991
3038
|
}
|
|
2992
3039
|
)
|
|
2993
3040
|
] })
|
|
@@ -2997,49 +3044,49 @@ const Ie = (e, n) => [
|
|
|
2997
3044
|
...n.widgets.filter((r) => r.indexOf("Container") === -1),
|
|
2998
3045
|
...n.childWidgetsConfig.map((r) => r.widgetKey)
|
|
2999
3046
|
].includes(e);
|
|
3000
|
-
function
|
|
3047
|
+
function lr({
|
|
3001
3048
|
targetContainerKey: e,
|
|
3002
3049
|
widgetsCatalog: n,
|
|
3003
3050
|
currentDashboardConfig: t,
|
|
3004
3051
|
undoStatus: r,
|
|
3005
|
-
addWidget:
|
|
3006
|
-
addContainer:
|
|
3007
|
-
onSettingItemsUpdated:
|
|
3052
|
+
addWidget: o,
|
|
3053
|
+
addContainer: i,
|
|
3054
|
+
onSettingItemsUpdated: s,
|
|
3008
3055
|
onResetToDefaultDashboardClick: d,
|
|
3009
|
-
onUndoOrRedo:
|
|
3010
|
-
onDoneClick:
|
|
3056
|
+
onUndoOrRedo: b,
|
|
3057
|
+
onDoneClick: g
|
|
3011
3058
|
}) {
|
|
3012
|
-
const [h, u] = le("Editing"), [
|
|
3013
|
-
widgetKey:
|
|
3014
|
-
metaData:
|
|
3015
|
-
})), N = (
|
|
3016
|
-
|
|
3017
|
-
},
|
|
3018
|
-
const z =
|
|
3019
|
-
return z.length < 1 ? !0 :
|
|
3020
|
-
},
|
|
3021
|
-
const z =
|
|
3022
|
-
return z.length < 1 ? !0 :
|
|
3023
|
-
}, c = (
|
|
3059
|
+
const [h, u] = le("Editing"), [m, y] = le(0), [D, p] = le(""), w = Array.from(n.keys()).map((T) => ({
|
|
3060
|
+
widgetKey: T,
|
|
3061
|
+
metaData: $t(T, n)
|
|
3062
|
+
})), N = (T) => {
|
|
3063
|
+
p(T.target.value);
|
|
3064
|
+
}, C = (T) => {
|
|
3065
|
+
const z = D.trim().toLowerCase();
|
|
3066
|
+
return z.length < 1 ? !0 : T.displayName.trim().toLowerCase().includes(z) || T.description.toLowerCase().includes(z);
|
|
3067
|
+
}, S = (T) => {
|
|
3068
|
+
const z = D.trim().toLowerCase();
|
|
3069
|
+
return z.length < 1 ? !0 : T.displayName.trim().toLowerCase().includes(z) || T.description.toLowerCase().includes(z);
|
|
3070
|
+
}, c = (T) => Z(
|
|
3024
3071
|
"px-4 py-2 font-medium cursor-pointer border-b-2 border-transparent hover:border-primary focus:outline-none",
|
|
3025
|
-
|
|
3026
|
-
),
|
|
3027
|
-
|
|
3072
|
+
T === m ? "text-primary border-primary" : ""
|
|
3073
|
+
), E = !!e;
|
|
3074
|
+
Dt(() => {
|
|
3028
3075
|
if (e) {
|
|
3029
|
-
|
|
3030
|
-
const
|
|
3031
|
-
u(`Editing ${
|
|
3076
|
+
y(0);
|
|
3077
|
+
const T = mt(e);
|
|
3078
|
+
u(`Editing ${T}`);
|
|
3032
3079
|
} else
|
|
3033
3080
|
u("Editing Dashboard");
|
|
3034
3081
|
}, [e]);
|
|
3035
|
-
const l = (
|
|
3036
|
-
|
|
3037
|
-
}, f = (
|
|
3038
|
-
const z = (t.cssSettings || []).map((X) => X.key ===
|
|
3039
|
-
|
|
3040
|
-
}, [
|
|
3041
|
-
return /* @__PURE__ */
|
|
3042
|
-
|
|
3082
|
+
const l = (T) => {
|
|
3083
|
+
E ? o(T, e) : o(T);
|
|
3084
|
+
}, f = (T) => {
|
|
3085
|
+
const z = (t.cssSettings || []).map((X) => X.key === T.key ? T : X);
|
|
3086
|
+
s(z);
|
|
3087
|
+
}, [M, $] = le(!1);
|
|
3088
|
+
return /* @__PURE__ */ a(
|
|
3089
|
+
xn,
|
|
3043
3090
|
{
|
|
3044
3091
|
testId: "dashboard-catalog-flyout",
|
|
3045
3092
|
className: "bg-body content-body bg-opacity-70 border-2 border-primary",
|
|
@@ -3050,24 +3097,24 @@ function sr({
|
|
|
3050
3097
|
minHeight: "360px",
|
|
3051
3098
|
backdropFilter: "blur(8px)"
|
|
3052
3099
|
},
|
|
3053
|
-
onDraggingChange: (
|
|
3054
|
-
$(
|
|
3100
|
+
onDraggingChange: (T) => {
|
|
3101
|
+
$(T);
|
|
3055
3102
|
},
|
|
3056
3103
|
children: /* @__PURE__ */ W("div", { className: "flex flex-col gap-2 p-2", children: [
|
|
3057
3104
|
/* @__PURE__ */ W("div", { className: "flex flex-row gap-2 justify-between", children: [
|
|
3058
3105
|
/* @__PURE__ */ W("div", { className: "handle flex-1 flex gap-2 w-full hover:text-primary cursor-grab", children: [
|
|
3059
|
-
|
|
3060
|
-
/* @__PURE__ */
|
|
3106
|
+
M ? /* @__PURE__ */ a(en, { className: "size-5" }) : /* @__PURE__ */ a(Qt, { className: "size-5" }),
|
|
3107
|
+
/* @__PURE__ */ a(
|
|
3061
3108
|
"h2",
|
|
3062
3109
|
{
|
|
3063
3110
|
className: "flex-1 text-base margin-0 capitalize",
|
|
3064
|
-
title:
|
|
3111
|
+
title: E ? h : `Editing dashboard: ${t.dashboardName}`,
|
|
3065
3112
|
children: h
|
|
3066
3113
|
}
|
|
3067
3114
|
)
|
|
3068
3115
|
] }),
|
|
3069
3116
|
/* @__PURE__ */ W("div", { className: "flex flex-row gap-2 items-center", children: [
|
|
3070
|
-
/* @__PURE__ */
|
|
3117
|
+
/* @__PURE__ */ a(
|
|
3071
3118
|
J,
|
|
3072
3119
|
{
|
|
3073
3120
|
"data-testid": "undo-dashboard-config-change",
|
|
@@ -3077,11 +3124,11 @@ function sr({
|
|
|
3077
3124
|
title: "Undo"
|
|
3078
3125
|
},
|
|
3079
3126
|
disabled: r.isUndoDisabled,
|
|
3080
|
-
onClick: () =>
|
|
3081
|
-
children: /* @__PURE__ */
|
|
3127
|
+
onClick: () => b("Undo"),
|
|
3128
|
+
children: /* @__PURE__ */ a(Zt, { className: "size-5" })
|
|
3082
3129
|
}
|
|
3083
3130
|
),
|
|
3084
|
-
/* @__PURE__ */
|
|
3131
|
+
/* @__PURE__ */ a(
|
|
3085
3132
|
J,
|
|
3086
3133
|
{
|
|
3087
3134
|
"data-testid": "redo-dashboard-config-change",
|
|
@@ -3091,11 +3138,11 @@ function sr({
|
|
|
3091
3138
|
title: "Redo"
|
|
3092
3139
|
},
|
|
3093
3140
|
disabled: r.isRedoDisabled,
|
|
3094
|
-
onClick: () =>
|
|
3095
|
-
children: /* @__PURE__ */
|
|
3141
|
+
onClick: () => b("Redo"),
|
|
3142
|
+
children: /* @__PURE__ */ a(Jt, { className: "size-5" })
|
|
3096
3143
|
}
|
|
3097
3144
|
),
|
|
3098
|
-
/* @__PURE__ */
|
|
3145
|
+
/* @__PURE__ */ a(
|
|
3099
3146
|
J,
|
|
3100
3147
|
{
|
|
3101
3148
|
"data-testid": "reset-dashboard-to-default",
|
|
@@ -3105,24 +3152,24 @@ function sr({
|
|
|
3105
3152
|
title: "Reset this dashboard to the default configuration"
|
|
3106
3153
|
},
|
|
3107
3154
|
onClick: d,
|
|
3108
|
-
children: /* @__PURE__ */
|
|
3155
|
+
children: /* @__PURE__ */ a(Gt, { className: "size-5" })
|
|
3109
3156
|
}
|
|
3110
3157
|
)
|
|
3111
3158
|
] })
|
|
3112
3159
|
] }),
|
|
3113
3160
|
/* @__PURE__ */ W("div", { className: "flex border-b border-gray-200", children: [
|
|
3114
|
-
/* @__PURE__ */
|
|
3115
|
-
/* @__PURE__ */
|
|
3116
|
-
!
|
|
3117
|
-
!
|
|
3161
|
+
/* @__PURE__ */ a("button", { onClick: () => y(0), className: c(0), children: "Widgets" }),
|
|
3162
|
+
/* @__PURE__ */ a("button", { onClick: () => y(1), className: c(1), children: "Charts" }),
|
|
3163
|
+
!E && /* @__PURE__ */ a("button", { onClick: () => y(2), className: c(2), children: "Containers" }),
|
|
3164
|
+
!E && /* @__PURE__ */ a("button", { onClick: () => y(3), className: c(3), children: /* @__PURE__ */ a(Xt, {}) })
|
|
3118
3165
|
] }),
|
|
3119
|
-
/* @__PURE__ */
|
|
3120
|
-
|
|
3166
|
+
/* @__PURE__ */ a("div", { className: "flex items-center justify-between gap-1 w-full", children: /* @__PURE__ */ a(
|
|
3167
|
+
pt,
|
|
3121
3168
|
{
|
|
3122
3169
|
label: "Filter...",
|
|
3123
3170
|
size: "small",
|
|
3124
3171
|
className: "w-full",
|
|
3125
|
-
value:
|
|
3172
|
+
value: D,
|
|
3126
3173
|
onChange: N
|
|
3127
3174
|
}
|
|
3128
3175
|
) }),
|
|
@@ -3134,52 +3181,52 @@ function sr({
|
|
|
3134
3181
|
maxHeight: "360px"
|
|
3135
3182
|
},
|
|
3136
3183
|
children: [
|
|
3137
|
-
|
|
3138
|
-
(
|
|
3139
|
-
).map((
|
|
3184
|
+
m === 0 && w.filter(
|
|
3185
|
+
(T) => T.metaData.categories.includes("Widget") && C(T.metaData)
|
|
3186
|
+
).map((T) => /* @__PURE__ */ a(
|
|
3140
3187
|
We,
|
|
3141
3188
|
{
|
|
3142
|
-
widgetKey:
|
|
3143
|
-
metaData:
|
|
3144
|
-
alreadyAdded: Ie(
|
|
3145
|
-
addWidget: () => l(
|
|
3189
|
+
widgetKey: T.widgetKey,
|
|
3190
|
+
metaData: T.metaData,
|
|
3191
|
+
alreadyAdded: Ie(T.widgetKey, t),
|
|
3192
|
+
addWidget: () => l(T.widgetKey)
|
|
3146
3193
|
},
|
|
3147
|
-
|
|
3194
|
+
T.widgetKey
|
|
3148
3195
|
)),
|
|
3149
|
-
|
|
3150
|
-
(
|
|
3151
|
-
).map((
|
|
3196
|
+
m === 1 && w.filter(
|
|
3197
|
+
(T) => T.metaData.categories.includes("Chart") && C(T.metaData)
|
|
3198
|
+
).map((T) => /* @__PURE__ */ a(
|
|
3152
3199
|
We,
|
|
3153
3200
|
{
|
|
3154
|
-
widgetKey:
|
|
3155
|
-
metaData:
|
|
3156
|
-
alreadyAdded: Ie(
|
|
3157
|
-
addWidget: () => l(
|
|
3201
|
+
widgetKey: T.widgetKey,
|
|
3202
|
+
metaData: T.metaData,
|
|
3203
|
+
alreadyAdded: Ie(T.widgetKey, t),
|
|
3204
|
+
addWidget: () => l(T.widgetKey)
|
|
3158
3205
|
},
|
|
3159
|
-
|
|
3206
|
+
T.widgetKey
|
|
3160
3207
|
)),
|
|
3161
|
-
!
|
|
3208
|
+
!E && m === 2 && w.filter((T) => T.metaData.categories.includes("Container")).map((T) => /* @__PURE__ */ a(
|
|
3162
3209
|
We,
|
|
3163
3210
|
{
|
|
3164
|
-
widgetKey:
|
|
3165
|
-
metaData:
|
|
3166
|
-
alreadyAdded: Ie(
|
|
3167
|
-
addWidget: () =>
|
|
3211
|
+
widgetKey: T.widgetKey,
|
|
3212
|
+
metaData: T.metaData,
|
|
3213
|
+
alreadyAdded: Ie(T.widgetKey, t),
|
|
3214
|
+
addWidget: () => i(T.widgetKey)
|
|
3168
3215
|
},
|
|
3169
|
-
|
|
3216
|
+
T.widgetKey
|
|
3170
3217
|
)),
|
|
3171
|
-
!
|
|
3172
|
-
|
|
3218
|
+
!E && m === 3 && (t.cssSettings || []).filter(S).map((T) => /* @__PURE__ */ a(
|
|
3219
|
+
Tn,
|
|
3173
3220
|
{
|
|
3174
|
-
item:
|
|
3221
|
+
item: T,
|
|
3175
3222
|
onSettingItemChanged: f
|
|
3176
3223
|
},
|
|
3177
|
-
|
|
3224
|
+
T.key
|
|
3178
3225
|
))
|
|
3179
3226
|
]
|
|
3180
3227
|
}
|
|
3181
3228
|
),
|
|
3182
|
-
/* @__PURE__ */
|
|
3229
|
+
/* @__PURE__ */ a("div", { className: "mt-4 w-full flex flex-row justify-end pt-1", children: /* @__PURE__ */ a(
|
|
3183
3230
|
J,
|
|
3184
3231
|
{
|
|
3185
3232
|
className: "bg-opacity-100",
|
|
@@ -3187,7 +3234,7 @@ function sr({
|
|
|
3187
3234
|
placement: "bottom",
|
|
3188
3235
|
title: "Click to exit edit mode"
|
|
3189
3236
|
},
|
|
3190
|
-
onClick:
|
|
3237
|
+
onClick: g,
|
|
3191
3238
|
children: "Done"
|
|
3192
3239
|
}
|
|
3193
3240
|
) })
|
|
@@ -3196,71 +3243,72 @@ function sr({
|
|
|
3196
3243
|
);
|
|
3197
3244
|
}
|
|
3198
3245
|
export {
|
|
3199
|
-
|
|
3246
|
+
An as AddIcon,
|
|
3200
3247
|
J as Button,
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3248
|
+
nn as CircleQuestionMark,
|
|
3249
|
+
tn as CrosshairIcon,
|
|
3250
|
+
ir as DashboardGrid,
|
|
3204
3251
|
Le as DashboardMaxZoomScale,
|
|
3205
3252
|
Ae as DashboardMinZoomScale,
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3253
|
+
at as DashboardWidgetBase,
|
|
3254
|
+
Mt as DashboardZoomStep,
|
|
3255
|
+
Ln as DeleteIcon,
|
|
3256
|
+
xn as DraggablePanel,
|
|
3257
|
+
Nn as DynamicWidgetLoader,
|
|
3258
|
+
Fn as EditIcon,
|
|
3259
|
+
Vn as GridIcon,
|
|
3260
|
+
en as HandGrabIcon,
|
|
3261
|
+
Qt as HandIcon,
|
|
3262
|
+
Gn as ListItem,
|
|
3263
|
+
Zn as ListItemLeftChild,
|
|
3264
|
+
Jn as ListItemMiddleChild,
|
|
3265
|
+
Qn as ListItemRightChild,
|
|
3219
3266
|
Un as MonitorIcon,
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3267
|
+
qn as MonitorSmartphoneIcon,
|
|
3268
|
+
ft as MoveLeftIcon,
|
|
3269
|
+
ht as MoveRightIcon,
|
|
3270
|
+
Jt as RedoIcon,
|
|
3271
|
+
Xt as SettingsIcon,
|
|
3272
|
+
on as Stack,
|
|
3273
|
+
H as SvgBaseWrapper,
|
|
3227
3274
|
Yn as TabletSmartphoneIcon,
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3275
|
+
Hn as TargetIcon,
|
|
3276
|
+
pt as TextField,
|
|
3277
|
+
Gt as TimerResetIcon,
|
|
3278
|
+
Zt as UndoIcon,
|
|
3232
3279
|
or as WidgetContainerColumn,
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3280
|
+
ar as WidgetContainerLarge,
|
|
3281
|
+
sr as WidgetContainerRow,
|
|
3282
|
+
lr as WidgetsCatalogFlyout,
|
|
3283
|
+
tr as WrapperColumnContent,
|
|
3284
|
+
nr as WrapperColumnContentListItem,
|
|
3285
|
+
gt as XCircleIcon,
|
|
3286
|
+
zn as ZoomInIcon,
|
|
3287
|
+
Bn as ZoomOutIcon,
|
|
3288
|
+
Sn as _isVersionCompatible,
|
|
3241
3289
|
Ce as blankDashboardConfig,
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3290
|
+
dt as createDynamicEntry,
|
|
3291
|
+
Wt as createStaticEntry,
|
|
3292
|
+
Nt as cssSettingsCatalog,
|
|
3293
|
+
Xn as cssVarsUtils,
|
|
3294
|
+
_t as dashboardSettingsUtils,
|
|
3295
|
+
Pt as ensureContainersSequence,
|
|
3296
|
+
ct as ensureZoomScaleIsWithinRange,
|
|
3249
3297
|
ge as getDefaultWidgetMetaFromKey,
|
|
3250
|
-
|
|
3298
|
+
Wn as getDefaultWidgetMetaFromMap,
|
|
3251
3299
|
Z as getDistinctCssClasses,
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3300
|
+
Ot as getMetaInfoFromFile,
|
|
3301
|
+
Pn as getNewZoomScaleWithinRange,
|
|
3302
|
+
$t as getWidgetMetaFromCatalog,
|
|
3303
|
+
On as localWidgetDiscovery,
|
|
3304
|
+
mt as parseContainerTitle,
|
|
3305
|
+
It as parseKeyAndTitleFromFilePath,
|
|
3306
|
+
In as remoteWidgetDiscovery,
|
|
3307
|
+
$n as removeEmptyContainers,
|
|
3260
3308
|
re as resolveColorFromClass,
|
|
3261
3309
|
Kn as resolvedColors,
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3310
|
+
rr as showToast,
|
|
3311
|
+
kn as useDashboardStorageService,
|
|
3312
|
+
Rn as useDashboardStore,
|
|
3313
|
+
jn as useDashboardUndoService
|
|
3266
3314
|
};
|